diff --git a/src/Accordion/AccordionItem.svelte b/src/Accordion/AccordionItem.svelte index ce1dbc0c..14577f8e 100644 --- a/src/Accordion/AccordionItem.svelte +++ b/src/Accordion/AccordionItem.svelte @@ -13,7 +13,7 @@ export let open = false; /** - * Define the ARIA label for the accordion item chevron icon + * Specify the ARIA label for the accordion item chevron icon * @type {string} [iconDescription="Expand/Collapse"] */ export let iconDescription = "Expand/Collapse"; diff --git a/src/Breadcrumb/Breadcrumb.Skeleton.svelte b/src/Breadcrumb/Breadcrumb.Skeleton.svelte index ba7c2d72..a4ec13d7 100644 --- a/src/Breadcrumb/Breadcrumb.Skeleton.svelte +++ b/src/Breadcrumb/Breadcrumb.Skeleton.svelte @@ -1,12 +1,12 @@
+ /** + * @typedef {{ id: string; text: string; }} ComboBoxItem + */ + + /** + * Set the combobox items + * @type {ComboBoxItem[]} [items=[]] + */ + export let items = []; + + /** + * Override the display of a combobox item + * @type {(item: ComboBoxItem) => string;} [itemToString = (item: ComboBoxItem) => string;] + */ + export let itemToString = (item) => item.text || item.id; + + /** + * Set the selected item by value index + * @type {number} [selectedIndex=-1] + */ + export let selectedIndex = -1; + + /** + * Specify the selected combobox value + * @type {string} [value=""] + */ + export let value = ""; + + /** + * Set the size of the combobox + * @type {"sm" | "xl"} [size] + */ + export let size = undefined; + + /** + * Set to `true` to disable the combobox + * @type {boolean} [disabled=false] + */ export let disabled = false; + + /** + * Specify the title text of the combobox + * @type {string} [titleText=""] + */ + export let titleText = ""; + + /** + * Specify the placeholder text + * @type {string} [placeholder=""] + */ + export let placeholder = ""; + + /** + * Specify the helper text + * @type {string} [helperText=""] + */ export let helperText = ""; /** - * Set an id for the list box component - * @type {string} [id] + * Specify the invalid state text + * @type {string} [invalidText=""] */ - export let id = "ccs-" + Math.random().toString(36); + export let invalidText = ""; /** * Set to `true` to indicate an invalid state @@ -15,23 +70,45 @@ export let invalid = false; /** - * Specify the invalid state text - * @type {string} [invalidText=""] + * Set to `true` to enable the light variant + * @type {boolean} [light=false] */ - export let invalidText = ""; - - export let items = []; - export let itemToString = (item) => item.text || item.id; export let light = false; + + /** + * Set to `true` to open the combobox menu dropdown + * @type {boolean} [open=false] + */ export let open = false; - export let placeholder = ""; - export let selectedIndex = -1; + + /** + * Determine if an item should be filtered given the current combobox value + * @type {(item: ComboBoxItem, value: string) => boolean} [shouldFilterItem=() => true] + */ export let shouldFilterItem = () => true; - export let size = undefined; - export let titleText = ""; + + /** + * Override the default translation ids + * @type {(id: any) => string;} [translateWithId] + */ export let translateWithId = undefined; - export let value = ""; + + /** + * Set an id for the list box component + * @type {string} [id] + */ + export let id = "ccs-" + Math.random().toString(36); + + /** + * Specify a name attribute for the input + * @type {string} [name] + */ export let name = undefined; + + /** + * Obtain a reference to the input HTML element + * @type {null | HTMLInputElement} [ref=null] + */ export let ref = null; import { afterUpdate } from "svelte"; diff --git a/src/ComposedModal/ComposedModal.svelte b/src/ComposedModal/ComposedModal.svelte index 58c813f5..cb168262 100644 --- a/src/ComposedModal/ComposedModal.svelte +++ b/src/ComposedModal/ComposedModal.svelte @@ -18,13 +18,13 @@ export let danger = false; /** - * Define a class for the inner modal + * Specify a class for the inner modal * @type {string} [containerClass=""] */ export let containerClass = ""; /** - * Define a selector to be focused when opening the modal + * Specify a selector to be focused when opening the modal * @type {string} [selectorPrimaryFocus="[data-modal-primary-focus]"] */ export let selectorPrimaryFocus = "[data-modal-primary-focus]"; diff --git a/src/ComposedModal/ModalBody.svelte b/src/ComposedModal/ModalBody.svelte index d47c3eb9..76af8328 100644 --- a/src/ComposedModal/ModalBody.svelte +++ b/src/ComposedModal/ModalBody.svelte @@ -1,5 +1,14 @@ diff --git a/src/ComposedModal/ModalFooter.svelte b/src/ComposedModal/ModalFooter.svelte index f4a4ea95..d59b74ac 100644 --- a/src/ComposedModal/ModalFooter.svelte +++ b/src/ComposedModal/ModalFooter.svelte @@ -1,9 +1,38 @@ diff --git a/src/DataTable/TableContainer.svelte b/src/DataTable/TableContainer.svelte index 60b6d6af..0eb474ec 100644 --- a/src/DataTable/TableContainer.svelte +++ b/src/DataTable/TableContainer.svelte @@ -1,7 +1,21 @@
+ /** + * Specify the `scope` attribute + * @type {string} [scope="col"] + */ export let scope = "col"; + + /** + * Override the default id translations + * @type {() => string;} [translateWithId = () => "";] + */ export let translateWithId = () => ""; /** diff --git a/src/DataTable/TableRow.svelte b/src/DataTable/TableRow.svelte index 7a43dd1a..bad9aebd 100644 --- a/src/DataTable/TableRow.svelte +++ b/src/DataTable/TableRow.svelte @@ -1,4 +1,8 @@ diff --git a/src/FileUploader/FileUploaderDropContainer.svelte b/src/FileUploader/FileUploaderDropContainer.svelte index 21573cb5..9a21738b 100644 --- a/src/FileUploader/FileUploaderDropContainer.svelte +++ b/src/FileUploader/FileUploaderDropContainer.svelte @@ -1,10 +1,49 @@ diff --git a/src/ListBox/ListBox.svelte b/src/ListBox/ListBox.svelte index a90b32a9..abeef665 100644 --- a/src/ListBox/ListBox.svelte +++ b/src/ListBox/ListBox.svelte @@ -1,12 +1,12 @@ diff --git a/src/ListBox/ListBoxSelection.svelte b/src/ListBox/ListBoxSelection.svelte index 27e1a9a9..05961442 100644 --- a/src/ListBox/ListBoxSelection.svelte +++ b/src/ListBox/ListBoxSelection.svelte @@ -1,10 +1,34 @@