diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 52f127a8..f8fe4f0b 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -198,6 +198,7 @@ import { Accordion } from "carbon-components-svelte"; | Prop name | Type | Default value | | :-------- | :-------------------------------- | :------------ | | align | "start" | "end" | "end" | +| size | "sm" | "xl" | -- | | skeleton | boolean | false | ### Slots @@ -262,10 +263,12 @@ import { AccordionSkeleton } from "carbon-components-svelte"; ### Props -| Prop name | Type | Default value | -| :-------- | :------------------- | :------------ | -| count | number | 4 | -| open | boolean | true | +| Prop name | Type | Default value | +| :-------- | :-------------------------------- | :------------ | +| count | number | 4 | +| align | "start" | "end" | "end" | +| size | "sm" | "xl" | -- | +| open | boolean | true | ### Slots diff --git a/docs/package.json b/docs/package.json index 208780bf..5be73cd4 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,7 @@ "@carbon/themes": "^10.20.0", "@sveltech/routify": "^1.9.9", "autoprefixer": "^10.0.1", - "carbon-components": "^10.21.0", + "carbon-components": "^10.22.0", "carbon-components-svelte": "../", "clipboard-copy": "^3.1.0", "fs-extra": "^9.0.1", diff --git a/docs/src/pages/components/Accordion.svx b/docs/src/pages/components/Accordion.svx index f1993f6a..64ff137d 100644 --- a/docs/src/pages/components/Accordion.svx +++ b/docs/src/pages/components/Accordion.svx @@ -63,9 +63,9 @@ -### Large size +### Extra-large size - + Content 1 @@ -107,3 +107,11 @@ +### Skeleton (extra-large) + + + +### Skeleton (small) + + + diff --git a/docs/yarn.lock b/docs/yarn.lock index f543447e..9f02ffbb 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -771,15 +771,15 @@ caniuse-lite@^1.0.30001135, caniuse-lite@^1.0.30001137: integrity sha512-VAy5RHDfTJhpxnDdp2n40GPPLp3KqNrXz1QqFv4J64HvArKs8nuNMOWkB3ICOaBTU/Aj4rYAo/ytdQDDFF/Pug== carbon-components-svelte@../: - version "0.15.0" + version "0.16.0" dependencies: carbon-icons-svelte "^10.17.0" flatpickr "4.6.3" -carbon-components@^10.21.0: - version "10.21.0" - resolved "https://registry.npmjs.org/carbon-components/-/carbon-components-10.21.0.tgz#3e7f79530af79039aab7bf937f0f129642806316" - integrity sha512-IS8WPFGg74g6ZyWpJc4cDlkhqGeNZ1sJshAVTftkb7Nur9W58lSRcu6G9cRMgeL+I/YAia3Q+X4lPh/X16JsGw== +carbon-components@^10.22.0: + version "10.22.0" + resolved "https://registry.npmjs.org/carbon-components/-/carbon-components-10.22.0.tgz#866791ca8e3f651054543d63f6a898cff6bcacf9" + integrity sha512-0cADWQf1e+6YsxXnjEz630Z7GZa3Z1ssO0UW/HnnJy03Dr+qdT3o6sIgSqObYLddJliAVcjeTlwJshZ9K4bWJQ== dependencies: flatpickr "4.6.1" lodash.debounce "^4.0.8" diff --git a/src/Accordion/Accordion.Skeleton.svelte b/src/Accordion/Accordion.Skeleton.svelte index 79574236..f34c6997 100644 --- a/src/Accordion/Accordion.Skeleton.svelte +++ b/src/Accordion/Accordion.Skeleton.svelte @@ -11,6 +11,12 @@ */ export let align = "end"; + /** + * Specify the size of the accordion + * @type {"sm" | "xl"} [size] + */ + export let size = undefined; + /** * Set to `false` to close the first accordion item * @type {boolean} [open=true] @@ -25,7 +31,9 @@ class:bx--accordion="{true}" class:bx--skeleton="{true}" {...$$restProps} - class="bx--accordion--{align} {$$restProps.class}" + class="bx--accordion--{align} + {size && `bx--accordion--${size}`} + {$$restProps.class}" on:click on:mouseover on:mouseenter diff --git a/src/Accordion/Accordion.svelte b/src/Accordion/Accordion.svelte index 0a4a1482..140e7eea 100644 --- a/src/Accordion/Accordion.svelte +++ b/src/Accordion/Accordion.svelte @@ -7,7 +7,7 @@ /** * Specify the size of the accordion - * @type {"sm" | "lg"} [size] + * @type {"sm" | "xl"} [size] */ export let size = undefined; @@ -24,6 +24,7 @@