diff --git a/docs/src/layouts/Recipe.svelte b/docs/src/layouts/Recipe.svelte deleted file mode 100644 index 1122660a..00000000 --- a/docs/src/layouts/Recipe.svelte +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - -

{component}

-
- -
-
-
- - - -
-
Table of Contents
- -
- -
-
-
- - -
-
Table of Contents
- -
-
-
- - diff --git a/docs/src/pages/_layout.svelte b/docs/src/pages/_layout.svelte index 672f44a3..44a7e9cb 100644 --- a/docs/src/pages/_layout.svelte +++ b/docs/src/pages/_layout.svelte @@ -11,7 +11,6 @@ SkipToContent, SideNav, SideNavItems, - SideNavMenu, SideNavMenuItem, Tag, } from "carbon-components-svelte"; @@ -29,7 +28,6 @@ $: components = $layout.children.filter( (child) => child.title === "components" )[0]; - $: recipes = $layout.children.filter((child) => child.title === "recipes")[0]; $beforeUrlChange(() => { if (isMobile) isSideNavOpen = false; @@ -99,48 +97,33 @@ - - {#each components.children.filter((child) => !deprecated.includes(child.title)) as child, i (child.path)} - - {child.title} - {#if deprecated.includes(child.title)} - - Deprecated - - {/if} - {#if new_components.includes(child.title)} - - New - - {/if} - - {/each} - - - {#each recipes.children as child, i (child.path)} - - {child.title} - - {/each} - + {#each components.children.filter((child) => !deprecated.includes(child.title)) as child (child.path)} + + {child.title} + {#if deprecated.includes(child.title)} + + Deprecated + + {/if} + {#if new_components.includes(child.title)} + + New + + {/if} + + {/each} diff --git a/docs/src/pages/components/Accordion.svx b/docs/src/pages/components/Accordion.svx index 0890d559..c64f0f99 100644 --- a/docs/src/pages/components/Accordion.svx +++ b/docs/src/pages/components/Accordion.svx @@ -10,8 +10,6 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"] import Preview from "../../components/Preview.svelte"; -See the [ExpandableAccordion recipe](/recipes/ExpandableAccordion) for a toggleable accordion component. - ### Default @@ -84,6 +82,12 @@ See the [ExpandableAccordion recipe](/recipes/ExpandableAccordion) for a togglea +### Programmatic example + +This example demonstrates how a list of items can be programmatically expanded and collapsed. + + + ### Extra-large size diff --git a/docs/src/pages/components/Breadcrumb.svx b/docs/src/pages/components/Breadcrumb.svx index c236dc61..660f9467 100644 --- a/docs/src/pages/components/Breadcrumb.svx +++ b/docs/src/pages/components/Breadcrumb.svx @@ -12,8 +12,6 @@ components: ["Breadcrumb", "BreadcrumbItem"] import Preview from "../../components/Preview.svelte"; -See the [Breadcrumbs recipe](/recipes/Breadcrumbs) for a reusable breadcrumbs component. - ### Default @@ -43,6 +41,10 @@ See the [Breadcrumbs recipe](/recipes/Breadcrumbs) for a reusable breadcrumbs co Usage +### Breadcrumb trail + + + ### Skeleton \ No newline at end of file diff --git a/docs/src/pages/framed/Accordion/ExpandableAccordion.svelte b/docs/src/pages/framed/Accordion/ExpandableAccordion.svelte index ec03614d..3b8ce26e 100644 --- a/docs/src/pages/framed/Accordion/ExpandableAccordion.svelte +++ b/docs/src/pages/framed/Accordion/ExpandableAccordion.svelte @@ -1,5 +1,7 @@ - {#each items as item} - -
{item.title}
+

{item.description}

{/each} diff --git a/docs/src/pages/framed/Breadcrumbs/Breadcrumbs.svelte b/docs/src/pages/framed/Breadcrumbs/Breadcrumbs.svelte index cd77ead9..6a43e299 100644 --- a/docs/src/pages/framed/Breadcrumbs/Breadcrumbs.svelte +++ b/docs/src/pages/framed/Breadcrumbs/Breadcrumbs.svelte @@ -1,32 +1,17 @@ - - - - {#each items as item, i} - - {item.text} - - {/each} - - - + + {#each items as item, i} + + {item.text} + + {/each} + diff --git a/docs/src/pages/index.svelte b/docs/src/pages/index.svelte index d439f9f1..94b0cc69 100644 --- a/docs/src/pages/index.svelte +++ b/docs/src/pages/index.svelte @@ -61,7 +61,7 @@ - +

Carbon Components Svelte

diff --git a/docs/src/pages/recipes/Breadcrumbs.svx b/docs/src/pages/recipes/Breadcrumbs.svx deleted file mode 100644 index d8f7afc0..00000000 --- a/docs/src/pages/recipes/Breadcrumbs.svx +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: recipe ---- - - - -## Breadcrumb trail - - diff --git a/docs/src/pages/recipes/ExpandableAccordion.svx b/docs/src/pages/recipes/ExpandableAccordion.svx deleted file mode 100644 index 09ba3cf0..00000000 --- a/docs/src/pages/recipes/ExpandableAccordion.svx +++ /dev/null @@ -1,13 +0,0 @@ ---- -layout: recipe ---- - - - -## Expandable accordion - -This example expands and collapses all accordion items. - - diff --git a/docs/src/pages/recipes/TileAspectRatio.svx b/docs/src/pages/recipes/TileAspectRatio.svx deleted file mode 100644 index 61602f18..00000000 --- a/docs/src/pages/recipes/TileAspectRatio.svx +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: recipe ---- - - - -## Tile (16x9 ratio) - - - - Content - - diff --git a/docs/svelte.config.js b/docs/svelte.config.js index 034e0ec0..ac82385b 100644 --- a/docs/svelte.config.js +++ b/docs/svelte.config.js @@ -139,8 +139,6 @@ function carbonify() { }; } -const NODE_ENV = process.env.NODE_ENV || "production"; - module.exports = { extensions: [".svelte", ".svx"], preprocess: [ @@ -159,14 +157,13 @@ module.exports = { mdsvex({ remarkPlugins: [plugin, slug, carbonify], layout: { - recipe: path.join(__dirname, "src/layouts/Recipe.svelte"), _: path.join(__dirname, "src/layouts/ComponentLayout.svelte"), }, }), { markup({ content, filename }) { if (/node_modules/.test(filename)) return null; - if (filename.endsWith(".svx") && filename.match(/pages\/(recipes)/)) { + if (filename.endsWith(".svx")) { const toc = []; walk(parse(content), {