diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index d11353b0..5e28b8f7 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1,6 +1,6 @@ # Component Index -> 158 components exported from carbon-components-svelte@0.29.2. +> 160 components exported from carbon-components-svelte@0.29.2. ## Components @@ -61,6 +61,7 @@ - [`HeaderUtilities`](#headerutilities) - [`Icon`](#icon) - [`IconSkeleton`](#iconskeleton) +- [`ImageLoader`](#imageloader) - [`InlineLoading`](#inlineloading) - [`InlineNotification`](#inlinenotification) - [`Link`](#link) @@ -72,6 +73,7 @@ - [`ListBoxSelection`](#listboxselection) - [`ListItem`](#listitem) - [`Loading`](#loading) +- [`LocalStorage`](#localstorage) - [`Modal`](#modal) - [`ModalBody`](#modalbody) - [`ModalFooter`](#modalfooter) @@ -342,6 +344,7 @@ None. | hasIconOnly | let | Yes | boolean | false | Set to `true` for the icon-only variant | | kind | let | No | "primary" | "secondary" | "tertiary" | "ghost" | "danger" | "danger-tertiary" | "danger-ghost" | "primary" | Specify the kind of button | | size | let | No | "default" | "field" | "small" | "default" | Specify the size of button | +| isSelected | let | No | boolean | false | Set to `true` to enable the selected state for an icon-only, ghost button | | icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | | iconDescription | let | No | string | -- | Specify the ARIA label for the button icon | | tooltipAlignment | let | No | "start" | "center" | "end" | "center" | Set the alignment of the tooltip relative to the icon
`hasIconOnly` must be set to `true` | @@ -1723,6 +1726,35 @@ None. | mouseenter | forwarded | -- | | mouseleave | forwarded | -- | +## `ImageLoader` + +### Props + +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :----------------- | :------- | :------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| error | let | Yes | boolean | false | Set to `true` if an error occurs when loading the image | +| loaded | let | Yes | boolean | false | Set to `true` when the image is loaded | +| loading | let | Yes | boolean | false | Set to `true` when `loaded` is `true` and `error` is false | +| src | let | No | string | "" | Specify the image source | +| alt | let | No | string | "" | Specify the image alt text | +| ratio | let | No | "2x1" | "16x9" | "4x3" | "1x1" | "3x4" | "9x16" | "1x2" | -- | Specify the aspect ratio for the image wrapper | +| fadeIn | let | No | boolean | false | Set to `true` to fade in the image on load
The duration uses the `fast-02` value following Carbon guidelines on motion | +| loadImage | const | No | (url?: string) => void | (url) => { if (image != null) image = null; loaded = false; error = false; image = new Image(); image.src = url || src; image.onload = () => (loaded = true); image.onerror = () => (error = true); } | Method invoked to load the image provided a `src` value | + +### Slots + +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :---- | :------- | +| error | No | -- | -- | +| loading | No | -- | -- | + +### Events + +| Event name | Type | Detail | +| :--------- | :--------- | :--------------- | +| load | dispatched | any | +| error | dispatched | any | + ## `InlineLoading` ### Props @@ -1957,7 +1989,7 @@ export type ListBoxSelectionTranslationId = "clearAll" | "clearSelection"; | Prop name | Kind | Reactive | Type | Default value | Description | | :-------------- | :----------------- | :------- | :----------------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------ | | ref | let | Yes | null | HTMLDivElement | null | Obtain a reference to the top-level HTML element | -| selectionCount | let | No | any | -- | Specify the number of selected items | +| selectionCount | let | No | number | -- | Specify the number of selected items | | disabled | let | No | boolean | false | Set to `true` to disable the list box selection | | translationIds | const | No | { clearAll: "clearAll", clearSelection: "clearSelection", } | { clearAll: "clearAll", clearSelection: "clearSelection", } | Default translation ids | | translateWithId | let | No | (id: ListBoxSelectionTranslationId) => string | (id) => defaultTranslations[id] | Override the default translation ids | @@ -2013,6 +2045,26 @@ None. None. +## `LocalStorage` + +### Props + +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :------------------ | -------------------------------- | ----------------------------- | +| value | let | Yes | any | "" | Provide a value to persist | +| key | let | No | string | "local-storage-key" | Specify the local storage key | + +### Slots + +None. + +### Events + +| Event name | Type | Detail | +| :--------- | :--------- | :------------------------------------------- | +| save | dispatched | any | +| update | dispatched | { prevValue: any; value: any; } | + ## `Modal` ### Props @@ -2183,13 +2235,13 @@ None. ### Events -| Event name | Type | Detail | -| :--------- | :--------- | :----- | -| clear | forwarded | -- | -| keydown | forwarded | -- | -| focus | forwarded | -- | -| blur | forwarded | -- | -| select | dispatched | -- | +| Event name | Type | Detail | +| :--------- | :--------- | :-------------------------------------------------------------------------------------------------- | +| select | dispatched | { selectedIds: string[]; selected: MultiSelectItem[]; unselected: MultiSelectItem[]; } | +| clear | forwarded | -- | +| keydown | forwarded | -- | +| focus | forwarded | -- | +| blur | forwarded | -- | ## `NotificationActionButton` @@ -2694,15 +2746,17 @@ None. | :------------ | :--------------- | :------- | :------------------------------------------ | ------------------------- | -------------------------------------------- | | selected | let | Yes | string | -- | Set the selected radio button value | | disabled | let | No | boolean | false | Set to `true` to disable the radio buttons | +| legendText | let | No | string | "" | Specify the legend text | | labelPosition | let | No | "right" | "left" | "right" | Specify the label position | | orientation | let | No | "horizontal" | "vertical" | "horizontal" | Specify the orientation of the radio buttons | | id | let | No | string | -- | Set an id for the container div element | ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :---- | :------- | -| -- | Yes | -- | -- | +| Slot name | Default | Props | Fallback | +| :--------- | :------ | :---- | :------------------------ | +| -- | Yes | -- | -- | +| legendText | No | -- | {legendText} | ### Events @@ -3083,7 +3137,9 @@ None. ### Slots -None. +| Slot name | Default | Props | Fallback | +| :-------- | :------ | :---- | :------------------ | +| -- | Yes | -- | {text} | ### Events @@ -3647,16 +3703,17 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------ | -| type | let | No | "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast" | -- | Specify the type of tag | -| size | let | No | "sm" | "default" | "default" | -- | -| filter | let | No | boolean | false | Set to `true` to use filterable variant | -| disabled | let | No | boolean | false | Set to `true` to disable a filterable tag | -| skeleton | let | No | boolean | false | Set to `true` to display the skeleton state | -| title | let | No | string | "Clear filter" | Set the title for the close button in a filterable tag | -| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | -| id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the filterable tag | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :---------- | :--------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------- | +| type | let | No | "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast" | -- | Specify the type of tag | +| size | let | No | "sm" | "default" | "default" | -- | +| filter | let | No | boolean | false | Set to `true` to use filterable variant | +| disabled | let | No | boolean | false | Set to `true` to disable a filterable tag | +| interactive | let | No | boolean | false | Set to `true` to render a `button` element instead of a `div` | +| skeleton | let | No | boolean | false | Set to `true` to display the skeleton state | +| title | let | No | string | "Clear filter" | Set the title for the close button in a filterable tag | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | +| id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the filterable tag | ### Slots @@ -4183,6 +4240,7 @@ None. | Event name | Type | Detail | | :--------- | :-------- | :----- | +| clear | forwarded | -- | | change | forwarded | -- | | input | forwarded | -- | | focus | forwarded | -- | diff --git a/docs/package.json b/docs/package.json index fd6c270e..f4d109ec 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@sveltech/routify": "^1.9.9", "autoprefixer": "^10.2.3", - "carbon-components": "10.29.0", + "carbon-components": "10.30.0", "carbon-components-svelte": "../", "clipboard-copy": "^3.1.0", "mdsvex": "^0.8.8", diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 34654213..aee2c87c 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -1,5 +1,5 @@ { - "total": 158, + "total": 160, "components": [ { "moduleName": "Accordion", @@ -368,6 +368,16 @@ "constant": false, "reactive": false }, + { + "name": "isSelected", + "kind": "let", + "description": "Set to `true` to enable the selected state for an icon-only, ghost button", + "type": "boolean", + "value": "false", + "isFunction": false, + "constant": false, + "reactive": false + }, { "name": "hasIconOnly", "kind": "let", @@ -1387,7 +1397,7 @@ "ts": "interface ComboBoxItem { id: string; text: string; }" } ], - "rest_props": { "type": "Element", "name": "div" } + "rest_props": { "type": "Element", "name": "input" } }, { "moduleName": "ComposedModal", @@ -2239,7 +2249,7 @@ { "type": "forwarded", "name": "blur", "element": "input" } ], "typedefs": [], - "rest_props": { "type": "Element", "name": "div" } + "rest_props": { "type": "Element", "name": "input" } }, { "moduleName": "DatePickerSkeleton", @@ -4042,6 +4052,101 @@ "typedefs": [], "rest_props": { "type": "Element", "name": "div" } }, + { + "moduleName": "ImageLoader", + "filePath": "src/ImageLoader/ImageLoader.svelte", + "props": [ + { + "name": "src", + "kind": "let", + "description": "Specify the image source", + "type": "string", + "value": "\"\"", + "isFunction": false, + "constant": false, + "reactive": false + }, + { + "name": "alt", + "kind": "let", + "description": "Specify the image alt text", + "type": "string", + "value": "\"\"", + "isFunction": false, + "constant": false, + "reactive": false + }, + { + "name": "ratio", + "kind": "let", + "description": "Specify the aspect ratio for the image wrapper", + "type": "\"2x1\" | \"16x9\" | \"4x3\" | \"1x1\" | \"3x4\" | \"9x16\" | \"1x2\"", + "isFunction": false, + "constant": false, + "reactive": false + }, + { + "name": "loading", + "kind": "let", + "description": "Set to `true` when `loaded` is `true` and `error` is false", + "type": "boolean", + "value": "false", + "isFunction": false, + "constant": false, + "reactive": true + }, + { + "name": "loaded", + "kind": "let", + "description": "Set to `true` when the image is loaded", + "type": "boolean", + "value": "false", + "isFunction": false, + "constant": false, + "reactive": true + }, + { + "name": "error", + "kind": "let", + "description": "Set to `true` if an error occurs when loading the image", + "type": "boolean", + "value": "false", + "isFunction": false, + "constant": false, + "reactive": true + }, + { + "name": "fadeIn", + "kind": "let", + "description": "Set to `true` to fade in the image on load\nThe duration uses the `fast-02` value following Carbon guidelines on motion", + "type": "boolean", + "value": "false", + "isFunction": false, + "constant": false, + "reactive": false + }, + { + "name": "loadImage", + "kind": "const", + "description": "Method invoked to load the image provided a `src` value", + "type": "(url?: string) => void", + "value": "(url) => { if (image != null) image = null; loaded = false; error = false; image = new Image(); image.src = url || src; image.onload = () => (loaded = true); image.onerror = () => (error = true); }", + "isFunction": true, + "constant": true, + "reactive": false + } + ], + "slots": [ + { "name": "error", "default": false, "slot_props": "{}" }, + { "name": "loading", "default": false, "slot_props": "{}" } + ], + "events": [ + { "type": "dispatched", "name": "load", "detail": "any" }, + { "type": "dispatched", "name": "error", "detail": "any" } + ], + "typedefs": [], + "rest_props": { "type": "Element", "name": "img" } + }, { "moduleName": "InlineLoading", "filePath": "src/InlineLoading/InlineLoading.svelte", @@ -4585,7 +4690,7 @@ "name": "selectionCount", "kind": "let", "description": "Specify the number of selected items", - "type": "any", + "type": "number", "isFunction": false, "constant": false, "reactive": false @@ -4716,6 +4821,42 @@ "typedefs": [], "rest_props": { "type": "Element", "name": "div" } }, + { + "moduleName": "LocalStorage", + "filePath": "src/LocalStorage/LocalStorage.svelte", + "props": [ + { + "name": "key", + "kind": "let", + "description": "Specify the local storage key", + "type": "string", + "value": "\"local-storage-key\"", + "isFunction": false, + "constant": false, + "reactive": false + }, + { + "name": "value", + "kind": "let", + "description": "Provide a value to persist", + "type": "any", + "value": "\"\"", + "isFunction": false, + "constant": false, + "reactive": true + } + ], + "slots": [], + "events": [ + { "type": "dispatched", "name": "save", "detail": "any" }, + { + "type": "dispatched", + "name": "update", + "detail": "{ prevValue: any; value: any; }" + } + ], + "typedefs": [] + }, { "moduleName": "Modal", "filePath": "src/Modal/Modal.svelte", @@ -5393,11 +5534,15 @@ ], "slots": [], "events": [ + { + "type": "dispatched", + "name": "select", + "detail": "{ selectedIds: string[]; selected: MultiSelectItem[]; unselected: MultiSelectItem[]; }" + }, { "type": "forwarded", "name": "clear", "element": "ListBoxSelection" }, { "type": "forwarded", "name": "keydown", "element": "input" }, { "type": "forwarded", "name": "focus", "element": "input" }, - { "type": "forwarded", "name": "blur", "element": "input" }, - { "type": "dispatched", "name": "select" } + { "type": "forwarded", "name": "blur", "element": "input" } ], "typedefs": [ { @@ -5416,7 +5561,7 @@ "ts": "interface MultiSelectItem { id: MultiSelectItemId; text: MultiSelectItemText; }" } ], - "rest_props": { "type": "Element", "name": "div" } + "rest_props": { "type": "Element", "name": "input" } }, { "moduleName": "NotificationActionButton", @@ -5827,7 +5972,7 @@ "ts": "type NumberInputTranslationId = \"increment\" | \"decrement\"" } ], - "rest_props": { "type": "Element", "name": "div" } + "rest_props": { "type": "Element", "name": "input" } }, { "moduleName": "NumberInputSkeleton", @@ -6950,6 +7095,16 @@ "constant": false, "reactive": false }, + { + "name": "legendText", + "kind": "let", + "description": "Specify the legend text", + "type": "string", + "value": "\"\"", + "isFunction": false, + "constant": false, + "reactive": false + }, { "name": "labelPosition", "kind": "let", @@ -6980,7 +7135,15 @@ "reactive": false } ], - "slots": [{ "name": "__default__", "default": true, "slot_props": "{}" }], + "slots": [ + { "name": "__default__", "default": true, "slot_props": "{}" }, + { + "name": "legendText", + "default": false, + "fallback": "{legendText}", + "slot_props": "{}" + } + ], "events": [ { "type": "forwarded", "name": "click", "element": "div" }, { "type": "forwarded", "name": "mouseover", "element": "div" }, @@ -7947,7 +8110,14 @@ "reactive": true } ], - "slots": [], + "slots": [ + { + "name": "__default__", + "default": true, + "fallback": "{text}", + "slot_props": "{}" + } + ], "events": [{ "type": "forwarded", "name": "click", "element": "a" }], "typedefs": [], "rest_props": { "type": "Element", "name": "a" } @@ -9032,6 +9202,16 @@ "constant": false, "reactive": false }, + { + "name": "interactive", + "kind": "let", + "description": "Set to `true` to render a `button` element instead of a `div`", + "type": "boolean", + "value": "false", + "isFunction": false, + "constant": false, + "reactive": false + }, { "name": "skeleton", "kind": "let", @@ -9748,7 +9928,7 @@ { "type": "forwarded", "name": "blur", "element": "input" } ], "typedefs": [], - "rest_props": { "type": "Element", "name": "div" } + "rest_props": { "type": "Element", "name": "input" } }, { "moduleName": "TimePickerSelect", @@ -10372,6 +10552,7 @@ ], "slots": [], "events": [ + { "type": "forwarded", "name": "clear", "element": "Search" }, { "type": "forwarded", "name": "change", "element": "Search" }, { "type": "forwarded", "name": "input", "element": "Search" }, { "type": "forwarded", "name": "focus", "element": "Search" }, diff --git a/docs/src/pages/_layout.svelte b/docs/src/pages/_layout.svelte index 1d3e0340..3b1a616d 100644 --- a/docs/src/pages/_layout.svelte +++ b/docs/src/pages/_layout.svelte @@ -13,11 +13,15 @@ SideNavItems, SideNavMenu, SideNavMenuItem, + Tag, } from "carbon-components-svelte"; import LogoGithub20 from "carbon-icons-svelte/lib/LogoGithub20"; import Theme from "../components/Theme.svelte"; import Footer from "../components/Footer.svelte"; + const deprecated = ["ToggleSmall", "Icon"]; + const new_components = ["ImageLoader", "LocalStorage"]; + let isOpen = false; let isSideNavOpen = true; let innerWidth = 2048; @@ -98,16 +102,25 @@ text="{child.title}" href="{$url(child.path)}" isSelected="{$isActive($url(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} diff --git a/docs/src/pages/components/AspectRatio.svx b/docs/src/pages/components/AspectRatio.svx index e2d015cc..8b920a20 100644 --- a/docs/src/pages/components/AspectRatio.svx +++ b/docs/src/pages/components/AspectRatio.svx @@ -5,7 +5,7 @@ The `AspectRatio` component is useful for constraining fluid content within an aspect ratio. To demo this, resize your browser for the examples below. -Supported aspect ratios: `"2x1"`, `"16x9"`, `"4x3"`, `"1x1"`, `"3x4"`, `"9x16"`, `"1x2"` +Supported aspect ratios include `"2x1"`, `"16x9"`, `"4x3"`, `"1x1"`, `"3x4"`, `"9x16"` and `"1x2"`. ### Default (2x1) diff --git a/docs/src/pages/components/Button.svx b/docs/src/pages/components/Button.svx index 64c05e2d..d464c41c 100644 --- a/docs/src/pages/components/Button.svx +++ b/docs/src/pages/components/Button.svx @@ -2,7 +2,12 @@ import { Button } from "carbon-components-svelte"; import Add16 from "carbon-icons-svelte/lib/Add16"; import TrashCan16 from "carbon-icons-svelte/lib/TrashCan16"; + import TextBold16 from "carbon-icons-svelte/lib/TextBold16"; + import TextItalic16 from "carbon-icons-svelte/lib/TextItalic16"; + import TextUnderline16 from "carbon-icons-svelte/lib/TextUnderline16"; import Preview from "../../components/Preview.svelte"; + + let index = 1; ### Primary button @@ -55,6 +60,12 @@ The tooltip position and alignment can be controlled by `tooltipPosition` and `t +{#key key}{/key} + +### Programmatic usage + +In this example, a component reference is obtained to programmatically trigger the `loadImage` method. + + \ No newline at end of file diff --git a/docs/src/pages/components/LocalStorage.svx b/docs/src/pages/components/LocalStorage.svx new file mode 100644 index 00000000..b2250719 --- /dev/null +++ b/docs/src/pages/components/LocalStorage.svx @@ -0,0 +1,9 @@ + + +This utility component wraps the [Window.localStorage API](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) and is useful for persisting ephemeral data (e.g., color theme) at the browser level. + +### Reactive example + + \ No newline at end of file diff --git a/docs/src/pages/components/MultiSelect.svx b/docs/src/pages/components/MultiSelect.svx index 3ac22723..018bd30f 100644 --- a/docs/src/pages/components/MultiSelect.svx +++ b/docs/src/pages/components/MultiSelect.svx @@ -24,6 +24,16 @@ To prevent alphabetical item ordering, pass an empty function to the `sortItem` sortItem="{() => {}}" /> +### Filterable + +`$$restProps` are spread to the underlying input element. + + + ### Initial selected items To select (or bind) items, pass an array of item ids to `selectedIds`. @@ -93,13 +103,7 @@ Set `direction` to `"top"` for the dropdown menu to appear above the input. {id: "2", text: "Fax"}]}" /> -### Filterable - ### Invalid state diff --git a/docs/src/pages/components/NumberInput.svx b/docs/src/pages/components/NumberInput.svx index 54ffc7c0..2bc9afbf 100644 --- a/docs/src/pages/components/NumberInput.svx +++ b/docs/src/pages/components/NumberInput.svx @@ -27,10 +27,6 @@ components: ["NumberInput", "NumberInputSkeleton"] -### Mobile variant - - - ### Extra-large size diff --git a/docs/src/pages/components/PasswordInput.svx b/docs/src/pages/components/PasswordInput.svx index 0cf32697..ad0d89ff 100644 --- a/docs/src/pages/components/PasswordInput.svx +++ b/docs/src/pages/components/PasswordInput.svx @@ -7,6 +7,12 @@ +### Custom tooltip alignment + +Customize the tooltip alignment and position of the visibility toggle through the `tooltipAlignment` and `tooltipPosition` props. + + + ### Password is visible Set prop `type` to `"text"` to toggle password visibility. diff --git a/docs/src/pages/components/RadioButton.svx b/docs/src/pages/components/RadioButton.svx index b1aed1ce..54ec568d 100644 --- a/docs/src/pages/components/RadioButton.svx +++ b/docs/src/pages/components/RadioButton.svx @@ -3,19 +3,43 @@ components: ["RadioButtonGroup", "RadioButton", "RadioButtonSkeleton"] --- ### Default - - - - - - - + + + + + + +### With legend text + + + + + + + +### Legend text slot + +Use the named "legendText" slot to customize the legend text. + + +
+ Storage tier (disk) + +

+ Storage tiers may vary based on geolocation. +

+
+
+ + + +
### Programmatic usage @@ -25,40 +49,32 @@ Bind the selected value using the `selected` prop. ### Label text aligned left - - - - - - - + + + + + ### Vertical orientation - - - - - - - + + + + + ### Skeleton - - - - - - - + + + + + ### Skeleton (vertical orientation) - - - - - - - \ No newline at end of file + + + + + \ No newline at end of file diff --git a/docs/src/pages/components/Search.svx b/docs/src/pages/components/Search.svx index 08009c0e..af600573 100644 --- a/docs/src/pages/components/Search.svx +++ b/docs/src/pages/components/Search.svx @@ -17,6 +17,12 @@ The `Search` component size is extra-large by default. There are [large](#large- +### on:clear + +The "clear" event is dispatched when clicking the "X" button in the search input element. + + console.log('clear')}/> + ### Light variant diff --git a/docs/src/pages/components/Tag.svx b/docs/src/pages/components/Tag.svx index 193720e6..1c15daf1 100644 --- a/docs/src/pages/components/Tag.svx +++ b/docs/src/pages/components/Tag.svx @@ -1,7 +1,6 @@ @@ -31,6 +30,10 @@ carbon-components +### Filterable (disabled) + +carbon-components + ### Filterable (small) carbon-components @@ -41,6 +44,13 @@ Note: rendering a custom icon cannnot be used with the filterable variant. IBM Cloud +### Interactive variant + +Set `interactive` to `true` to render a `button` element instead of a `div`. + +Machine learning +Machine learning + ### Skeleton diff --git a/docs/src/pages/components/ToggleSmall.svx b/docs/src/pages/components/ToggleSmall.svx index ac2a06ca..26230d05 100644 --- a/docs/src/pages/components/ToggleSmall.svx +++ b/docs/src/pages/components/ToggleSmall.svx @@ -7,7 +7,7 @@ components: ["ToggleSmall", "ToggleSmallSkeleton"] import Preview from "../../components/Preview.svelte"; - +
This component will be removed in the next major release. Use the Toggle small variant instead.
diff --git a/docs/src/pages/components/Tooltip.svx b/docs/src/pages/components/Tooltip.svx index f4f6d538..2ea0bbf9 100644 --- a/docs/src/pages/components/Tooltip.svx +++ b/docs/src/pages/components/Tooltip.svx @@ -4,7 +4,9 @@ import Preview from "../../components/Preview.svelte"; -### Default (icon-only, "bottom" direction) +### Default + +By default, the tooltip is triggered by an information icon.

diff --git a/docs/src/pages/framed/Button/SelectedIconOnlyButton.svelte b/docs/src/pages/framed/Button/SelectedIconOnlyButton.svelte new file mode 100644 index 00000000..ca23da37 --- /dev/null +++ b/docs/src/pages/framed/Button/SelectedIconOnlyButton.svelte @@ -0,0 +1,30 @@ + + + + + +

+ +
+
diff --git a/docs/src/pages/framed/LocalStorage/LocalStorage.svelte b/docs/src/pages/framed/LocalStorage/LocalStorage.svelte new file mode 100644 index 00000000..c6115dc5 --- /dev/null +++ b/docs/src/pages/framed/LocalStorage/LocalStorage.svelte @@ -0,0 +1,29 @@ + + + + + + +
+ +
+  {JSON.stringify(events, null, 2)}
+
diff --git a/docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte b/docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte index f0cffa46..ee361f5b 100644 --- a/docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte +++ b/docs/src/pages/framed/RadioButton/ProgrammaticRadioButton.svelte @@ -2,7 +2,6 @@ import { ButtonSet, Button, - FormGroup, RadioButtonGroup, RadioButton, } from "carbon-components-svelte"; @@ -10,17 +9,17 @@ let plan = "standard"; - - - - - - - + + + + + - + {#each ["free", "standard", "pro"] as value} +{:else if interactive} + {:else}
{/if} -
+
diff --git a/src/TimePicker/TimePicker.svelte b/src/TimePicker/TimePicker.svelte index 4e7dfcc3..bdac8fae 100644 --- a/src/TimePicker/TimePicker.svelte +++ b/src/TimePicker/TimePicker.svelte @@ -59,7 +59,6 @@
-
+
{#if !hideIcon}
{triggerText} diff --git a/src/UIShell/SideNav/SideNav.svelte b/src/UIShell/SideNav/SideNav.svelte index f90a551d..728ffdb2 100644 --- a/src/UIShell/SideNav/SideNav.svelte +++ b/src/UIShell/SideNav/SideNav.svelte @@ -30,6 +30,7 @@ >
{/if}