From 64879d9832f136be770056edcaf1688ea45788bc Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Sat, 1 Jan 2022 10:29:25 -0800 Subject: [PATCH] refactor(docs): use svelte:fragment where applicable --- docs/src/pages/_layout.svelte | 4 +-- docs/src/pages/components/Accordion.svx | 12 ++++---- docs/src/pages/components/DataTable.svx | 28 +++++++++---------- docs/src/pages/components/ImageLoader.svx | 8 +++--- .../pages/components/InlineNotification.svx | 4 +-- docs/src/pages/components/Tabs.svx | 12 ++++---- .../DataTable/DataTableAppendColumns.svelte | 4 +-- .../DataTableNonExpandableRows.svelte | 4 +-- .../ProgrammaticImageLoader.svelte | 4 +-- .../src/pages/framed/Tabs/TabsReactive.svelte | 4 +-- docs/src/pages/framed/UIShell/Header.svelte | 5 ++-- .../src/pages/framed/UIShell/HeaderNav.svelte | 5 ++-- .../pages/framed/UIShell/HeaderNavRail.svelte | 5 ++-- .../pages/framed/UIShell/HeaderSearch.svelte | 4 +-- .../framed/UIShell/HeaderSwitcher.svelte | 4 +-- .../framed/UIShell/HeaderUtilities.svelte | 4 +-- .../UIShell/PersistedHamburgerMenu.svelte | 5 ++-- docs/src/pages/index.svelte | 4 +-- 18 files changed, 58 insertions(+), 62 deletions(-) diff --git a/docs/src/pages/_layout.svelte b/docs/src/pages/_layout.svelte index c5f66c23..7c25d441 100644 --- a/docs/src/pages/_layout.svelte +++ b/docs/src/pages/_layout.svelte @@ -48,9 +48,9 @@ expandedByDefault="{true}" bind:isSideNavOpen > -
+ -
+ Carbon Components Svelte diff --git a/docs/src/pages/components/Accordion.svx b/docs/src/pages/components/Accordion.svx index 078fd257..0890d559 100644 --- a/docs/src/pages/components/Accordion.svx +++ b/docs/src/pages/components/Accordion.svx @@ -46,25 +46,25 @@ See the [ExpandableAccordion recipe](/recipes/ExpandableAccordion) for a togglea -
+
Natural Language Classifier
AI / Machine Learning
-
+

Natural Language Classifier uses advanced natural language processing and machine learning techniques to create custom classification models. Users train their data and the service predicts the appropriate category for the inputted text.

-
+
Natural Language Understanding
AI / Machine Learning
-
+

Analyze text to extract meta-data from content such as concepts, entities, emotion, relations, sentiment and more.

-
+
Language Translator
AI / Machine Learning
-
+

Translate text, documents, and websites from one language to another. Create industry or region-specific translations via the service's customization capability.

diff --git a/docs/src/pages/components/DataTable.svx b/docs/src/pages/components/DataTable.svx index 60baa463..9e8a754e 100644 --- a/docs/src/pages/components/DataTable.svx +++ b/docs/src/pages/components/DataTable.svx @@ -131,20 +131,20 @@ The slot name for the table header cells is `"cell-header"`. }, ]}" > - + {#if header.key === 'port'} {header.value} (network) {:else} {header.value} {/if} - - + + {#if cell.key === 'rule' && cell.value === 'Round robin'} {cell.value} {:else} {cell.value} {/if} - + ### With title, description @@ -1018,11 +1018,11 @@ In the following example, each row in the sortable data table has an overflow me }, ]}" > -
+
       {JSON.stringify(row, null, 2)}
     
-
+ ### Non-expandable rows @@ -1085,11 +1085,11 @@ Use `nonExpandableRowIds` to specify the ids for rows that should not be expanda }, ]}" > -
+
       {JSON.stringify(row, null, 2)}
     
-
+ ### Expandable (short size) @@ -1146,11 +1146,11 @@ Use `nonExpandableRowIds` to specify the ids for rows that should not be expanda }, ]}" > -
+
       {JSON.stringify(row, null, 2)}
     
-
+ ### Expandable (tall size) @@ -1207,11 +1207,11 @@ Use `nonExpandableRowIds` to specify the ids for rows that should not be expanda }, ]}" > -
+
       {JSON.stringify(row, null, 2)}
     
-
+ ### Batch expansion @@ -1268,11 +1268,11 @@ Use `nonExpandableRowIds` to specify the ids for rows that should not be expanda }, ]}" > -
+
       {JSON.stringify(row, null, 2)}
     
-
+ ### Skeleton diff --git a/docs/src/pages/components/ImageLoader.svx b/docs/src/pages/components/ImageLoader.svx index 34808896..9bc498a9 100644 --- a/docs/src/pages/components/ImageLoader.svx +++ b/docs/src/pages/components/ImageLoader.svx @@ -16,12 +16,12 @@ This utility component uses the [Image API](https://developer.mozilla.org/en-US/ Use the "loading" and "error" named slots to render an element when the image is loading or has an error. -
+ -
-
+ + An error occurred. -
+
### With aspect ratio diff --git a/docs/src/pages/components/InlineNotification.svx b/docs/src/pages/components/InlineNotification.svx index 88b75733..98b461d4 100644 --- a/docs/src/pages/components/InlineNotification.svx +++ b/docs/src/pages/components/InlineNotification.svx @@ -25,9 +25,9 @@ source: Notification/InlineNotification.svelte ### With actions -
+ Learn more -
+
### Notification variants diff --git a/docs/src/pages/components/Tabs.svx b/docs/src/pages/components/Tabs.svx index e89b5e44..e35a5956 100644 --- a/docs/src/pages/components/Tabs.svx +++ b/docs/src/pages/components/Tabs.svx @@ -13,11 +13,11 @@ components: ["Tabs", "Tab", "TabContent", "TabsSkeleton"] -
+ Content 1 Content 2 Content 3 -
+ ### Auto width @@ -30,11 +30,11 @@ Set `autoWidth` to `true` for tabs to have an automatically set width. -
+ Content 1 Content 2 Content 3 -
+ ### Reactive example @@ -47,11 +47,11 @@ Set `autoWidth` to `true` for tabs to have an automatically set width. -
+ Content 1 Content 2 Content 3 -
+ ### Skeleton (default) diff --git a/docs/src/pages/framed/DataTable/DataTableAppendColumns.svelte b/docs/src/pages/framed/DataTable/DataTableAppendColumns.svelte index c013365d..dffa197f 100644 --- a/docs/src/pages/framed/DataTable/DataTableAppendColumns.svelte +++ b/docs/src/pages/framed/DataTable/DataTableAppendColumns.svelte @@ -23,7 +23,7 @@ - + {#if cell.key === "overflow"} @@ -34,5 +34,5 @@ {:else}{cell.value}{/if} - + diff --git a/docs/src/pages/framed/DataTable/DataTableNonExpandableRows.svelte b/docs/src/pages/framed/DataTable/DataTableNonExpandableRows.svelte index ff08ef97..6e362b41 100644 --- a/docs/src/pages/framed/DataTable/DataTableNonExpandableRows.svelte +++ b/docs/src/pages/framed/DataTable/DataTableNonExpandableRows.svelte @@ -60,9 +60,9 @@ ]}" rows="{rows}" > -
+
       {JSON.stringify(row, null, 2)}
     
-
+ diff --git a/docs/src/pages/framed/ImageLoader/ProgrammaticImageLoader.svelte b/docs/src/pages/framed/ImageLoader/ProgrammaticImageLoader.svelte index 471a15c8..dab9501e 100644 --- a/docs/src/pages/framed/ImageLoader/ProgrammaticImageLoader.svelte +++ b/docs/src/pages/framed/ImageLoader/ProgrammaticImageLoader.svelte @@ -18,9 +18,9 @@ -
+ -
+
diff --git a/docs/src/pages/framed/Tabs/TabsReactive.svelte b/docs/src/pages/framed/Tabs/TabsReactive.svelte index 68a5b4ba..f85e5c07 100644 --- a/docs/src/pages/framed/Tabs/TabsReactive.svelte +++ b/docs/src/pages/framed/Tabs/TabsReactive.svelte @@ -8,11 +8,11 @@ -
+ Content 1 Content 2 Content 3 -
+
diff --git a/docs/src/pages/framed/UIShell/Header.svelte b/docs/src/pages/framed/UIShell/Header.svelte index a1a6fddf..4f09da2f 100644 --- a/docs/src/pages/framed/UIShell/Header.svelte +++ b/docs/src/pages/framed/UIShell/Header.svelte @@ -15,10 +15,9 @@
-
+ -
- + diff --git a/docs/src/pages/framed/UIShell/HeaderNav.svelte b/docs/src/pages/framed/UIShell/HeaderNav.svelte index 8035eb68..0f8024a3 100644 --- a/docs/src/pages/framed/UIShell/HeaderNav.svelte +++ b/docs/src/pages/framed/UIShell/HeaderNav.svelte @@ -21,10 +21,9 @@
-
+ -
- + diff --git a/docs/src/pages/framed/UIShell/HeaderNavRail.svelte b/docs/src/pages/framed/UIShell/HeaderNavRail.svelte index 0cf9e43a..846971c8 100644 --- a/docs/src/pages/framed/UIShell/HeaderNavRail.svelte +++ b/docs/src/pages/framed/UIShell/HeaderNavRail.svelte @@ -22,10 +22,9 @@
-
+ -
- + diff --git a/docs/src/pages/framed/UIShell/HeaderSearch.svelte b/docs/src/pages/framed/UIShell/HeaderSearch.svelte index d5d30ebd..221dc304 100644 --- a/docs/src/pages/framed/UIShell/HeaderSearch.svelte +++ b/docs/src/pages/framed/UIShell/HeaderSearch.svelte @@ -66,9 +66,9 @@
-
+ -
+
-
+ -
+ diff --git a/docs/src/pages/framed/UIShell/HeaderUtilities.svelte b/docs/src/pages/framed/UIShell/HeaderUtilities.svelte index 9e1019bc..439a95ce 100644 --- a/docs/src/pages/framed/UIShell/HeaderUtilities.svelte +++ b/docs/src/pages/framed/UIShell/HeaderUtilities.svelte @@ -27,9 +27,9 @@
-
+ -
+ -
+ -
- + diff --git a/docs/src/pages/index.svelte b/docs/src/pages/index.svelte index bf5990df..c9be5bcc 100644 --- a/docs/src/pages/index.svelte +++ b/docs/src/pages/index.svelte @@ -131,7 +131,7 @@ -
+

This library ships with six pre-compiled CSS StyleSheets built @@ -199,7 +199,7 @@ for documentation.

-
+