let
| No | "sm" | "xl"
| undefined
| Set the size of the combobox |
| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the combobox |
| titleText | No | let
| No | string
| ""
| Specify the title text of the combobox |
+| hideLabel | No | let
| No | boolean
| false
| Set to `true` to visually hide the label text |
| placeholder | No | let
| No | string
| ""
| Specify the placeholder text |
| helperText | No | let
| No | string
| ""
| Specify the helper text |
| invalidText | No | let
| No | string
| ""
| Specify the invalid state text |
@@ -2418,6 +2419,7 @@ export interface MultiSelectItem {
| clear | dispatched | null
|
| blur | dispatched | FocusEvent | CustomEvent
|
| keydown | forwarded | -- |
+| input | forwarded | -- |
| keyup | forwarded | -- |
| focus | forwarded | -- |
| paste | forwarded | -- |
@@ -2680,24 +2682,25 @@ None.
### Props
-| Prop name | Required | Kind | Reactive | Type | Default value | Description |
-| :-------------------- | :------- | :--------------- | :------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------ |
-| pageSize | No | let
| Yes | number
| 10
| Specify the number of items to display in a page |
-| page | No | let
| Yes | number
| 1
| Specify the current page index |
-| totalItems | No | let
| No | number
| 0
| Specify the total number of items |
-| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the pagination |
-| forwardText | No | let
| No | string
| "Next page"
| Specify the forward button text |
-| backwardText | No | let
| No | string
| "Previous page"
| Specify the backward button text |
-| itemsPerPageText | No | let
| No | string
| "Items per page:"
| Specify the items per page text |
-| itemText | No | let
| No | (min: number, max: number) => string
| (min, max) => \`${min}–${max} item${max === 1 ? "" : "s"}\`
| Override the item text |
-| itemRangeText | No | let
| No | (min: number, max: number, total: number) => string
| (min, max, total) => \`${min}–${max} of ${total} item${max === 1 ? "" : "s"}\`
| Override the item range text |
-| pageInputDisabled | No | let
| No | boolean
| false
| Set to `true` to disable the page input |
-| pageSizeInputDisabled | No | let
| No | boolean
| false
| Set to `true` to disable the page size input |
-| pageSizes | No | let
| No | ReadonlyArray
| [10]
| Specify the available page sizes |
-| pagesUnknown | No | let
| No | boolean
| false
| Set to `true` if the number of pages is unknown |
-| pageText | No | let
| No | (page: number) => string
| (page) => \`page ${page}\`
| Override the page text |
-| pageRangeText | No | let
| No | (current: number, total: number) => string
| (current, total) => \`of ${total} page${total === 1 ? "" : "s"}\`
| Override the page range text |
-| id | No | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the top-level element |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------------------- | :------- | :--------------- | :------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| pageSize | No | let
| Yes | number
| 10
| Specify the number of items to display in a page |
+| page | No | let
| Yes | number
| 1
| Specify the current page index |
+| totalItems | No | let
| No | number
| 0
| Specify the total number of items |
+| pageWindow | No | let
| No | number
| 1000
| If `totalItems` is a large number, it can affect thelet
| No | boolean
| false
| Set to `true` to disable the pagination |
+| forwardText | No | let
| No | string
| "Next page"
| Specify the forward button text |
+| backwardText | No | let
| No | string
| "Previous page"
| Specify the backward button text |
+| itemsPerPageText | No | let
| No | string
| "Items per page:"
| Specify the items per page text |
+| itemText | No | let
| No | (min: number, max: number) => string
| (min, max) => \`${min.toLocaleString()}–${max.toLocaleString()} item${max === 1 ? "" : "s"}\`
| Override the item text |
+| itemRangeText | No | let
| No | (min: number, max: number, total: number) => string
| (min, max, total) => \`${min.toLocaleString()}–${max.toLocaleString()} of ${total.toLocaleString()} item${max === 1 ? "" : "s"}\`
| Override the item range text |
+| pageInputDisabled | No | let
| No | boolean
| false
| Set to `true` to disable the page input |
+| pageSizeInputDisabled | No | let
| No | boolean
| false
| Set to `true` to disable the page size input |
+| pageSizes | No | let
| No | ReadonlyArray
| [10]
| Specify the available page sizes |
+| pagesUnknown | No | let
| No | boolean
| false
| Set to `true` if the number of pages is unknown |
+| pageText | No | let
| No | (page: number) => string
| (page) => \`page ${page.toLocaleString()}\`
| Override the page text |
+| pageRangeText | No | let
| No | (current: number, total: number) => string
| (current, total) => \`of ${total.toLocaleString()} page${total === 1 ? "" : "s"}\`
| Override the page range text |
+| id | No | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the top-level element |
### Slots
@@ -2966,6 +2969,8 @@ None.
| Event name | Type | Detail |
| :--------- | :-------- | :----- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
| change | forwarded | -- |
## `RadioButtonGroup`
@@ -3218,14 +3223,14 @@ None.
### Props
-| Prop name | Required | Kind | Reactive | Type | Default value | Description |
-| :-------- | :------- | :--------------- | :------- | --------------------------------- | ---------------------- | ----------------------------------------- |
-| value | No | let
| No | string | number
| ""
| Specify the option value |
-| text | No | let
| No | string
| ""
| Specify the option text |
-| hidden | No | let
| No | boolean
| false
| Set to `true` to hide the option |
-| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the option |
-| class | No | let
| No | string
| undefined
| Specify the class of the `option` element |
-| style | No | let
| No | string
| undefined
| Specify the style of the `option` element |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :-------- | :------- | :--------------- | :------- | --------------------------------- | ---------------------- | ---------------------------------------------------------------------------------- |
+| value | No | let
| No | string | number
| ""
| Specify the option value |
+| text | No | let
| No | string
| undefined
| Specify the option textlet
| No | boolean
| false
| Set to `true` to hide the option |
+| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the option |
+| class | No | let
| No | string
| undefined
| Specify the class of the `option` element |
+| style | No | let
| No | string
| undefined
| Specify the style of the `option` element |
### Slots
diff --git a/README.md b/README.md
index d79f656e..9433ba03 100644
--- a/README.md
+++ b/README.md
@@ -13,8 +13,8 @@ Design systems facilitate design and development through reuse, consistency, and
The Carbon Svelte portfolio also includes:
-- **[Carbon Icons Svelte](https://github.com/carbon-design-system/carbon-icons-svelte)**: 2,400+ Carbon icons as Svelte components
-- **[Carbon Pictograms Svelte](https://github.com/carbon-design-system/carbon-pictograms-svelte)**: 1,200+ Carbon pictograms as Svelte components
+- **[Carbon Icons Svelte](https://github.com/carbon-design-system/carbon-icons-svelte)**: 2,500+ Carbon icons as Svelte components
+- **[Carbon Pictograms Svelte](https://github.com/carbon-design-system/carbon-pictograms-svelte)**: 1,300+ Carbon pictograms as Svelte components
- **[Carbon Charts Svelte](https://github.com/carbon-design-system/carbon-charts/tree/master/packages/svelte)**: 25+ charts, powered by d3
- **[Carbon Preprocess Svelte](https://github.com/carbon-design-system/carbon-preprocess-svelte)**: Collection of Svelte preprocessors for Carbon
diff --git a/bun.lockb b/bun.lockb
deleted file mode 100755
index 1f96ec1f..00000000
Binary files a/bun.lockb and /dev/null differ
diff --git a/docs/package-lock.json b/docs/package-lock.json
index b418ab97..343f034b 100644
--- a/docs/package-lock.json
+++ b/docs/package-lock.json
@@ -17,14 +17,15 @@
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"prism-svelte": "^0.5.0",
- "prismjs": "^1.29.0",
+ "prismjs": "^1.30.0",
"remark-slug": "^6.1.0",
"svelte": "^4.2.19",
- "vite": "^5.4.14"
+ "vite": "^5.4.19"
}
},
"..": {
- "version": "0.87.7",
+ "name": "carbon-components-svelte",
+ "version": "0.89.4",
"dev": true,
"hasInstallScript": true,
"license": "Apache-2.0",
@@ -35,25 +36,25 @@
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@testing-library/jest-dom": "^6.6.3",
- "@testing-library/svelte": "^5.2.7",
+ "@testing-library/svelte": "^5.2.8",
"@testing-library/user-event": "^14.6.1",
- "autoprefixer": "^10.4.8",
+ "autoprefixer": "^10.4.21",
"carbon-components": "10.58.12",
- "carbon-icons-svelte": "^13.3.0",
+ "carbon-icons-svelte": "^13.4.0",
"carbon-preprocess-svelte": "^0.11.11",
"culls": "^0.1.1",
- "jsdom": "^26.0.0",
- "postcss": "^8.5.3",
+ "jsdom": "^26.1.0",
+ "postcss": "^8.5.5",
"prettier": "^3.5.3",
- "prettier-plugin-svelte": "^3.3.3",
+ "prettier-plugin-svelte": "^3.4.0",
"sass": "^1.49.11",
"standard-version": "^9.5.0",
"sveld": "^0.22.1",
- "svelte": "^4.2.19",
- "svelte-check": "^4.1.5",
- "tinyglobby": "^0.2.12",
- "typescript": "^5.8.2",
- "vitest": "^3.0.8"
+ "svelte": "^4.2.20",
+ "svelte-check": "^4.2.1",
+ "tinyglobby": "^0.2.14",
+ "typescript": "^5.8.3",
+ "vitest": "^3.2.3"
}
},
"node_modules/@ampproject/remapping": {
@@ -1034,6 +1035,20 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/carbon-components-svelte": {
"resolved": "..",
"link": true
@@ -1396,6 +1411,21 @@
"node": ">=10"
}
},
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
@@ -1466,13 +1496,11 @@
}
},
"node_modules/es-define-property": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
- "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
"dev": true,
- "dependencies": {
- "get-intrinsic": "^1.2.4"
- },
+ "license": "MIT",
"engines": {
"node": ">= 0.4"
}
@@ -1487,10 +1515,11 @@
}
},
"node_modules/es-object-atoms": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz",
- "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"es-errors": "^1.3.0"
},
@@ -1499,14 +1528,16 @@
}
},
"node_modules/es-set-tostringtag": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz",
- "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
"dev": true,
+ "license": "MIT",
"dependencies": {
- "get-intrinsic": "^1.2.4",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.6",
"has-tostringtag": "^1.0.2",
- "hasown": "^2.0.1"
+ "hasown": "^2.0.2"
},
"engines": {
"node": ">= 0.4"
@@ -1653,14 +1684,17 @@
}
},
"node_modules/form-data": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.2.tgz",
- "integrity": "sha512-sJe+TQb2vIaIyO783qN6BlMYWMw3WBOHA1Ay2qxsnjuafEOQFJ2JakedOQirT6D5XPRxDvS7AHYyem9fTpb4LQ==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.4.tgz",
+ "integrity": "sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
- "mime-types": "^2.1.12"
+ "es-set-tostringtag": "^2.1.0",
+ "hasown": "^2.0.2",
+ "mime-types": "^2.1.35"
},
"engines": {
"node": ">= 6"
@@ -1732,16 +1766,22 @@
}
},
"node_modules/get-intrinsic": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
- "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
"dev": true,
+ "license": "MIT",
"dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
"es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
"function-bind": "^1.1.2",
- "has-proto": "^1.0.1",
- "has-symbols": "^1.0.3",
- "hasown": "^2.0.0"
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
},
"engines": {
"node": ">= 0.4"
@@ -1750,6 +1790,20 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/get-symbol-description": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz",
@@ -1790,12 +1844,13 @@
}
},
"node_modules/gopd": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
- "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
"dev": true,
- "dependencies": {
- "get-intrinsic": "^1.1.3"
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -1850,10 +1905,11 @@
}
},
"node_modules/has-symbols": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
- "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">= 0.4"
},
@@ -2416,6 +2472,16 @@
"@jridgewell/sourcemap-codec": "^1.5.0"
}
},
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/mdast-util-to-string": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-1.1.0.tgz",
@@ -2960,10 +3026,11 @@
"dev": true
},
"node_modules/prismjs": {
- "version": "1.29.0",
- "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz",
- "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==",
+ "version": "1.30.0",
+ "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz",
+ "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==",
"dev": true,
+ "license": "MIT",
"engines": {
"node": ">=6"
}
@@ -3707,9 +3774,9 @@
}
},
"node_modules/vite": {
- "version": "5.4.14",
- "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz",
- "integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==",
+ "version": "5.4.19",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.19.tgz",
+ "integrity": "sha512-qO3aKv3HoQC8QKiNSTuUM1l9o/XX3+c+VTgLHbJWHZGeTPVAg2XwazI9UWzoxjIJCGCV2zU60uqMzjeLZuULqA==",
"dev": true,
"license": "MIT",
"dependencies": {
diff --git a/docs/package.json b/docs/package.json
index 75298254..4f543e57 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -22,10 +22,10 @@
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"prism-svelte": "^0.5.0",
- "prismjs": "^1.29.0",
+ "prismjs": "^1.30.0",
"remark-slug": "^6.1.0",
"svelte": "^4.2.19",
- "vite": "^5.4.14"
+ "vite": "^5.4.19"
},
"routify": {
"routifyDir": ".routify",
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index d1115787..a31f311f 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -1851,6 +1851,18 @@
"constant": false,
"reactive": false
},
+ {
+ "name": "hideLabel",
+ "kind": "let",
+ "description": "Set to `true` to visually hide the label text",
+ "type": "boolean",
+ "value": "false",
+ "isFunction": false,
+ "isFunctionDeclaration": false,
+ "isRequired": false,
+ "constant": false,
+ "reactive": false
+ },
{
"name": "placeholder",
"kind": "let",
@@ -8931,6 +8943,11 @@
"name": "keydown",
"element": "input"
},
+ {
+ "type": "forwarded",
+ "name": "input",
+ "element": "input"
+ },
{
"type": "forwarded",
"name": "keyup",
@@ -10036,6 +10053,18 @@
"constant": false,
"reactive": false
},
+ {
+ "name": "pageWindow",
+ "kind": "let",
+ "description": "If `totalItems` is a large number, it can affect the\nrendering performance of this component since its value\nis used to calculate the number of pages in the native\nselect dropdown. This value creates a small window of\npages rendered around the current page. By default,\na maximum of 1000 select items are rendered.",
+ "type": "number",
+ "value": "1000",
+ "isFunction": false,
+ "isFunctionDeclaration": false,
+ "isRequired": false,
+ "constant": false,
+ "reactive": false
+ },
{
"name": "disabled",
"kind": "let",
@@ -10089,7 +10118,7 @@
"kind": "let",
"description": "Override the item text",
"type": "(min: number, max: number) => string",
- "value": "(min, max) =>\n `${min}–${max} item${max === 1 ? \"\" : \"s\"}`",
+ "value": "(min, max) =>\n `${min.toLocaleString()}–${max.toLocaleString()} item${max === 1 ? \"\" : \"s\"}`",
"isFunction": true,
"isFunctionDeclaration": false,
"isRequired": false,
@@ -10101,7 +10130,7 @@
"kind": "let",
"description": "Override the item range text",
"type": "(min: number, max: number, total: number) => string",
- "value": "(\n min,\n max,\n total,\n) =>\n `${min}–${max} of ${total} item${max === 1 ? \"\" : \"s\"}`",
+ "value": "(\n min,\n max,\n total,\n) =>\n `${min.toLocaleString()}–${max.toLocaleString()} of ${total.toLocaleString()} item${max === 1 ? \"\" : \"s\"}`",
"isFunction": true,
"isFunctionDeclaration": false,
"isRequired": false,
@@ -10173,7 +10202,7 @@
"kind": "let",
"description": "Override the page text",
"type": "(page: number) => string",
- "value": "(page) => `page ${page}`",
+ "value": "(page) => `page ${page.toLocaleString()}`",
"isFunction": true,
"isFunctionDeclaration": false,
"isRequired": false,
@@ -10185,7 +10214,7 @@
"kind": "let",
"description": "Override the page range text",
"type": "(current: number, total: number) => string",
- "value": "(\n current,\n total,\n) =>\n `of ${total} page${total === 1 ? \"\" : \"s\"}`",
+ "value": "(\n current,\n total,\n) =>\n `of ${total.toLocaleString()} page${total === 1 ? \"\" : \"s\"}`",
"isFunction": true,
"isFunctionDeclaration": false,
"isRequired": false,
@@ -11389,6 +11418,16 @@
}
],
"events": [
+ {
+ "type": "forwarded",
+ "name": "focus",
+ "element": "input"
+ },
+ {
+ "type": "forwarded",
+ "name": "blur",
+ "element": "input"
+ },
{
"type": "forwarded",
"name": "change",
@@ -12509,9 +12548,8 @@
{
"name": "text",
"kind": "let",
- "description": "Specify the option text",
+ "description": "Specify the option text\nIf not specified, the value will be used as the text.",
"type": "string",
- "value": "\"\"",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
diff --git a/docs/src/global.css b/docs/src/global.css
index 889d6229..165b2855 100644
--- a/docs/src/global.css
+++ b/docs/src/global.css
@@ -2,12 +2,19 @@ html[theme="g90"] .code-override {
border: 1px solid var(--cds-ui-03);
}
+.prose > pre,
.code-override .bx--snippet {
/** Docs code snippet is always dark mode */
color-scheme: dark;
max-width: none;
}
+.prose > pre {
+ padding: 1rem;
+ margin-bottom: 1rem;
+}
+
+.prose > pre,
.code-override .bx--copy-btn,
.code-override .bx--snippet,
.code-override button.bx--btn.bx--snippet-btn--expand {
@@ -24,6 +31,7 @@ html[theme="g90"] .code-override {
fill: #f4f4f4;
}
+.prose > pre,
.code-override .bx--snippet-container pre {
font-size: var(--cds-code-02-font-size);
line-height: var(--cds-code-02-line-height);
diff --git a/docs/src/pages/components/Accordion.svx b/docs/src/pages/components/Accordion.svx
index 183b4cbb..a42735db 100644
--- a/docs/src/pages/components/Accordion.svx
+++ b/docs/src/pages/components/Accordion.svx
@@ -10,8 +10,15 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
import Preview from "../../components/Preview.svelte";
+`Accordion` creates a vertically stacked list of expandable sections that show or hide content. It supports custom titles, different sizes, and various states including disabled and skeleton loading.
+
## Default
+Use the `Accordion` and `AccordionItem` components to compose a collapsible list of
+items.
+
+By default, the chevron icon is on the right side of the accordion item.
+
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.
@@ -27,6 +34,10 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
## Left-aligned chevron
+The chevron icon can be aligned to the left side of the accordion item by setting
+the `align` prop to "start". This provides an alternative visual style while
+maintaining the same functionality.
+
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.
@@ -42,6 +53,9 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
## Custom title slot
+Customize the title content by using the `title` slot instead of the `title` prop.
+This allows for more complex title layouts with multiple elements.
+
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.
@@ -84,12 +101,18 @@ components: ["Accordion", "AccordionItem", "AccordionSkeleton"]
## Programmatic example
-This example demonstrates how a list of items can be programmatically expanded and collapsed.
+This example demonstrates how to programmatically control the accordion items using
+the `bind:open` directive. Expand and collapse items based on user
+interactions or application state.
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.
@@ -105,6 +128,10 @@ This example demonstrates how a list of items can be programmatically expanded a
## Small size
+For more compact layouts, set the `size` prop to "sm" to display the accordion in a
+smaller size. This is useful when space is limited or when the accordion is used as
+a secondary UI element.
+
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.
@@ -120,6 +147,9 @@ This example demonstrates how a list of items can be programmatically expanded a
## Disabled
+Set the `disabled` prop on the `Accordion` component to disable all items at once.
+This prevents users from expanding or collapsing any items in the accordion.
+
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.
@@ -135,6 +165,10 @@ This example demonstrates how a list of items can be programmatically expanded a
## Disabled (item)
+Individual accordion items can be disabled by setting the `disabled` prop on
+specific `AccordionItem` components. This allows for more granular control over
+which items are interactive.
+
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.
@@ -150,25 +184,45 @@ This example demonstrates how a list of items can be programmatically expanded a
## Skeleton
+The skeleton state provides a loading placeholder for the accordion. It displays a
+simplified version of the component while content is being loaded.
+