From 0c343acc8dcdadab74c3174d9fd55298c542bcf6 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Mon, 17 Jan 2022 20:26:26 -0800 Subject: [PATCH 1/4] fix(ts-definitions): specify if `@default` is undefined --- src/writer/writer-ts-definitions.ts | 17 +++++++++++++---- tests/writer-ts-definitions.test.ts | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/writer/writer-ts-definitions.ts b/src/writer/writer-ts-definitions.ts index cac502a..0574e96 100644 --- a/src/writer/writer-ts-definitions.ts +++ b/src/writer/writer-ts-definitions.ts @@ -34,17 +34,26 @@ function genPropDef(def: Pick !prop.isFunctionDeclaration && prop.kind !== "const") .map((prop) => { + let defaultValue = prop.value; + + if (typeof prop.value === "string") { + defaultValue = prop.value.replace(/\s+/g, " "); + } + + if (prop.value === undefined) { + defaultValue = "undefined"; + } + const prop_comments = [ addCommentLine(prop.description?.replace(/\n/g, "\n* ")), addCommentLine(prop.constant, "@constant"), - addCommentLine( - prop.value, - `@default ${typeof prop.value === "string" ? prop.value.replace(/\s+/g, " ") : prop.value}` - ), + `* @default ${defaultValue}\n`, ] .filter(Boolean) .join(""); + console.log(prop_comments); + let prop_value = prop.constant && !prop.isFunction ? prop.value : prop.type; return ` diff --git a/tests/writer-ts-definitions.test.ts b/tests/writer-ts-definitions.test.ts index b62fc63..6cbf00b 100644 --- a/tests/writer-ts-definitions.test.ts +++ b/tests/writer-ts-definitions.test.ts @@ -104,7 +104,7 @@ test("writeTsDefinition", (t) => { t.equal( writeTsDefinition(component_api), - '\n /// \n import { SvelteComponentTyped } from "svelte";\n \n \n \n export interface ModuleNameProps {\n \n /**\n* @default true\n*/\n propBool?: boolean;\n\n /**\n* @default ""\n*/\n propString?: string;\n\n \n name?: string;\n\n /**\n* @default "" + Math.random().toString(36)\n*/\n id?: string;\n\n /**\n* @default () => { localBool = !localBool; }\n*/\n fn?: () => { localBool = !localBool; };\n }\n \n \n export default class ModuleName extends SvelteComponentTyped<\n ModuleNameProps,\n {},\n {default: {}\n;}\n > {\n \n \n propConst: { [key: string]: boolean; };\n }' + '\n /// \n import { SvelteComponentTyped } from "svelte";\n \n \n \n export interface ModuleNameProps {\n \n /**\n* @default true\n*/\n propBool?: boolean;\n\n /**\n* @default ""\n*/\n propString?: string;\n\n /**\n* @default undefined\n*/\n name?: string;\n\n /**\n* @default "" + Math.random().toString(36)\n*/\n id?: string;\n\n /**\n* @default () => { localBool = !localBool; }\n*/\n fn?: () => { localBool = !localBool; };\n }\n \n \n export default class ModuleName extends SvelteComponentTyped<\n ModuleNameProps,\n {},\n {default: {}\n;}\n > {\n \n \n propConst: { [key: string]: boolean; };\n }' ); t.end(); }); From 61d56603ea3b68244a69a12083d671b18ff55550 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Mon, 17 Jan 2022 20:30:54 -0800 Subject: [PATCH 2/4] fix(markdown): update undefined default value to "undefined" --- src/writer/writer-markdown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/writer/writer-markdown.ts b/src/writer/writer-markdown.ts index 400cf1c..be93b40 100644 --- a/src/writer/writer-markdown.ts +++ b/src/writer/writer-markdown.ts @@ -18,7 +18,7 @@ function escapeHtml(text: string) { } function formatPropValue(value: any) { - if (value === undefined) return MD_TYPE_UNDEFINED; + if (value === undefined) return `${value}`; return `${value.replace(/`/g, "\\`").replace(/\|/g, "|")}`; } From 61d43d9d84d6622687f1819b833602231c7c4a64 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Mon, 17 Jan 2022 20:31:21 -0800 Subject: [PATCH 3/4] yarn test:integration --- integration/carbon/COMPONENT_INDEX.md | 450 +++++++++--------- .../types/Accordion/Accordion.svelte.d.ts | 1 + .../Accordion/AccordionSkeleton.svelte.d.ts | 1 + .../Breadcrumb/BreadcrumbItem.svelte.d.ts | 1 + .../carbon/types/Button/Button.svelte.d.ts | 3 + .../types/Button/ButtonSkeleton.svelte.d.ts | 1 + .../types/Checkbox/Checkbox.svelte.d.ts | 1 + .../types/CodeSnippet/CodeSnippet.svelte.d.ts | 3 + .../types/ComboBox/ComboBox.svelte.d.ts | 3 + .../ComposedModal/ComposedModal.svelte.d.ts | 1 + .../ComposedModal/ModalFooter.svelte.d.ts | 2 + .../ContentSwitcher.svelte.d.ts | 1 + .../types/DataTable/DataTable.svelte.d.ts | 1 + .../DataTable/DataTableSkeleton.svelte.d.ts | 1 + .../carbon/types/DataTable/Table.svelte.d.ts | 1 + .../types/DatePicker/DatePicker.svelte.d.ts | 1 + .../DatePicker/DatePickerInput.svelte.d.ts | 2 + .../types/Dropdown/Dropdown.svelte.d.ts | 4 + .../carbon/types/Grid/Column.svelte.d.ts | 6 + .../carbon/types/Icon/Icon.svelte.d.ts | 1 + .../InlineLoading/InlineLoading.svelte.d.ts | 2 + .../carbon/types/Link/Link.svelte.d.ts | 2 + .../carbon/types/ListBox/ListBox.svelte.d.ts | 1 + .../ListBox/ListBoxSelection.svelte.d.ts | 1 + .../carbon/types/Modal/Modal.svelte.d.ts | 4 + .../types/MultiSelect/MultiSelect.svelte.d.ts | 3 + .../NotificationButton.svelte.d.ts | 2 + .../types/NumberInput/NumberInput.svelte.d.ts | 4 + .../OverflowMenu/OverflowMenu.svelte.d.ts | 4 + .../RadioButtonGroup.svelte.d.ts | 2 + .../carbon/types/Select/Select.svelte.d.ts | 3 + .../StructuredList/StructuredList.svelte.d.ts | 1 + integration/carbon/types/Tag/Tag.svelte.d.ts | 2 + .../types/TextArea/TextArea.svelte.d.ts | 1 + .../types/TextInput/PasswordInput.svelte.d.ts | 2 + .../types/TextInput/TextInput.svelte.d.ts | 2 + .../types/Tile/ClickableTile.svelte.d.ts | 1 + .../carbon/types/Tile/TileGroup.svelte.d.ts | 1 + .../types/TimePicker/TimePicker.svelte.d.ts | 2 + .../TimePicker/TimePickerSelect.svelte.d.ts | 1 + .../carbon/types/Toggle/Toggle.svelte.d.ts | 1 + .../types/ToggleSmall/ToggleSmall.svelte.d.ts | 1 + .../carbon/types/Tooltip/Tooltip.svelte.d.ts | 1 + .../UIShell/GlobalHeader/Header.svelte.d.ts | 3 + .../GlobalHeader/HeaderAction.svelte.d.ts | 2 + .../GlobalHeader/HeaderActionLink.svelte.d.ts | 2 + .../GlobalHeader/HeaderNav.svelte.d.ts | 1 + .../GlobalHeader/HeaderNavItem.svelte.d.ts | 2 + .../GlobalHeader/HeaderNavMenu.svelte.d.ts | 1 + .../GlobalHeader/HeaderPanelLink.svelte.d.ts | 1 + .../UIShell/HeaderGlobalAction.svelte.d.ts | 1 + .../types/UIShell/SideNav/SideNav.svelte.d.ts | 1 + .../UIShell/SideNav/SideNavLink.svelte.d.ts | 3 + .../UIShell/SideNav/SideNavMenu.svelte.d.ts | 2 + .../SideNav/SideNavMenuItem.svelte.d.ts | 3 + .../snapshots/bind-this-multiple/output.d.ts | 6 + tests/snapshots/bind-this/output.d.ts | 3 + tests/snapshots/infer-basic/output.d.ts | 3 + tests/snapshots/infer-with-types/output.d.ts | 3 + tests/snapshots/typed-props/output.d.ts | 1 + 60 files changed, 342 insertions(+), 225 deletions(-) diff --git a/integration/carbon/COMPONENT_INDEX.md b/integration/carbon/COMPONENT_INDEX.md index 734b8b0..0e6f2cf 100644 --- a/integration/carbon/COMPONENT_INDEX.md +++ b/integration/carbon/COMPONENT_INDEX.md @@ -167,12 +167,12 @@ ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :-------------------------------- | ------------------ | ------------------------------------------------ | -| align | let | No | "start" | "end" | "end" | Specify alignment of accordion item chevron icon | -| size | let | No | "sm" | "xl" | -- | Specify the size of the accordion | -| disabled | let | No | boolean | false | Set to `true` to disable the accordion | -| skeleton | let | No | boolean | false | Set to `true` to display the skeleton state | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :-------------------------------- | ---------------------- | ------------------------------------------------ | +| align | let | No | "start" | "end" | "end" | Specify alignment of accordion item chevron icon | +| size | let | No | "sm" | "xl" | undefined | Specify the size of the accordion | +| disabled | let | No | boolean | false | Set to `true` to disable the accordion | +| skeleton | let | No | boolean | false | Set to `true` to display the skeleton state | ### Slots @@ -222,12 +222,12 @@ ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :-------------------------------- | ------------------ | ------------------------------------------------ | -| count | let | No | number | 4 | Specify the number of accordion items to render | -| align | let | No | "start" | "end" | "end" | Specify alignment of accordion item chevron icon | -| size | let | No | "sm" | "xl" | -- | Specify the size of the accordion | -| open | let | No | boolean | true | Set to `false` to close the first accordion item | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :-------------------------------- | ---------------------- | ------------------------------------------------ | +| count | let | No | number | 4 | Specify the number of accordion items to render | +| align | let | No | "start" | "end" | "end" | Specify alignment of accordion item chevron icon | +| size | let | No | "sm" | "xl" | undefined | Specify the size of the accordion | +| open | let | No | boolean | true | Set to `false` to close the first accordion item | ### Slots @@ -288,10 +288,10 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :------------ | :--------------- | :------- | :------------------- | ------------------ | ---------------------------------------------------------------- | -| href | let | No | string | -- | Set the `href` to use an anchor link | -| isCurrentPage | let | No | boolean | false | Set to `true` if the breadcrumb item represents the current page | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :------------ | :--------------- | :------- | :------------------- | ---------------------- | ---------------------------------------------------------------- | +| href | let | No | string | undefined | Set the `href` to use an anchor link | +| isCurrentPage | let | No | boolean | false | Set to `true` if the breadcrumb item represents the current page | ### Slots @@ -340,14 +340,14 @@ 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 | -| 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 | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | Specify the icon from `carbon-icons-svelte` to render | +| iconDescription | let | No | string | undefined | 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` | | tooltipPosition | let | No | "top" | "right" | "bottom" | "left" | "bottom" | Set the position of the tooltip relative to the icon | | as | let | No | boolean | false | Set to `true` to render a custom HTML element
Props are destructured as `props` in the default slot (e.g., <Button let:props><div {...props}>...</div></Button>) | | skeleton | let | No | boolean | false | Set to `true` to display the skeleton state | | disabled | let | No | boolean | false | Set to `true` to disable the button | -| href | let | No | string | -- | Set the `href` to use an anchor link | +| href | let | No | string | undefined | Set the `href` to use an anchor link | | tabindex | let | No | string | "0" | Specify the tabindex | | type | let | No | string | "button" | Specify the `type` attribute for the button element | @@ -390,7 +390,7 @@ None. | Prop name | Kind | Reactive | Type | Default value | Description | | :-------- | :--------------- | :------- | :--------------------------------------------------- | ---------------------- | ------------------------------------ | -| href | let | No | string | -- | Set the `href` to use an anchor link | +| href | let | No | string | undefined | Set the `href` to use an anchor link | | size | let | No | "default" | "field" | "small" | "default" | Specify the size of button skeleton | | small | let | No | boolean | false | -- | @@ -422,7 +422,7 @@ None. | labelText | let | No | string | "" | Specify the label text | | hideLabel | let | No | boolean | false | Set to `true` to visually hide the label text | | name | let | No | string | "" | Set a name for the input element | -| title | let | No | string | -- | Specify the title attribute for the label element | +| title | let | No | string | undefined | Specify the title attribute for the label element | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input label | ### Slots @@ -463,11 +463,11 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :------------------- | ------------------ | ----------------------------------------- | -| clicked | let | Yes | boolean | false | Set to `true` to click the tile | -| light | let | No | boolean | false | Set to `true` to enable the light variant | -| href | let | No | string | -- | Set the `href` | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :------------------- | ---------------------- | ----------------------------------------- | +| clicked | let | Yes | boolean | false | Set to `true` to click the tile | +| light | let | No | boolean | false | Set to `true` to enable the light variant | +| href | let | No | string | undefined | Set the `href` | ### Slots @@ -495,14 +495,14 @@ None. | showMoreLess | let | Yes | boolean | false | Set to `true` to enable the show more/less button | | expanded | let | Yes | boolean | false | Set to `true` to expand a multi-line code snippet (type="multi") | | type | let | No | "single" | "inline" | "multi" | "single" | Set the type of code snippet | -| code | let | No | string | -- | Set the code snippet text
Alternatively, use the default slot (e.g., <CodeSnippet>{`code`}</CodeSnippet>) | +| code | let | No | string | undefined | Set the code snippet text
Alternatively, use the default slot (e.g., <CodeSnippet>{`code`}</CodeSnippet>) | | hideCopyButton | let | No | boolean | false | Set to `true` to hide the copy button | | disabled | let | No | boolean | false | Set to `true` for the disabled variant
Only applies to the "single", "multi" types | | wrapText | let | No | boolean | false | Set to `true` to wrap the text
Note that `type` must be "multi" | | light | let | No | boolean | false | Set to `true` to enable the light variant | | skeleton | let | No | boolean | false | Set to `true` to display the skeleton state | -| copyButtonDescription | let | No | string | -- | Specify the ARIA label for the copy button icon | -| copyLabel | let | No | string | -- | Specify the ARIA label of the copy button | +| copyButtonDescription | let | No | string | undefined | Specify the ARIA label for the copy button icon | +| copyLabel | let | No | string | undefined | Specify the ARIA label of the copy button | | feedback | let | No | string | "Copied!" | Specify the feedback text displayed when clicking the snippet | | feedbackTimeout | let | No | number | 2000 | Set the timeout duration (ms) to display feedback text | | showLessText | let | No | string | "Show less" | Specify the show less text
`type` must be "multi" | @@ -563,19 +563,19 @@ export type ColumnBreakpoint = ColumnSize | ColumnSizeDescriptor; ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :------------ | :--------------- | :------- | :------------------------------------------------------------------------------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| as | let | No | boolean | false | Set to `true` to render a custom HTML element
Props are destructured as `props` in the default slot (e.g., <Column let:props><article {...props}>...</article></Column>) | -| noGutter | let | No | boolean | false | Set to `true` to remove the gutter | -| noGutterLeft | let | No | boolean | false | Set to `true` to remove the left gutter | -| noGutterRight | let | No | boolean | false | Set to `true` to remove the right gutter | -| padding | let | No | boolean | false | Set to `true` to add top and bottom padding to the column | -| aspectRatio | let | No | "2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1" | -- | Specify the aspect ratio of the column | -| sm | let | No | ColumnBreakpoint | -- | Set the small breakpoint | -| md | let | No | ColumnBreakpoint | -- | Set the medium breakpoint | -| lg | let | No | ColumnBreakpoint | -- | Set the large breakpoint | -| xlg | let | No | ColumnBreakpoint | -- | Set the extra large breakpoint | -| max | let | No | ColumnBreakpoint | -- | Set the maximum breakpoint | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :------------ | :--------------- | :------- | :------------------------------------------------------------------------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| as | let | No | boolean | false | Set to `true` to render a custom HTML element
Props are destructured as `props` in the default slot (e.g., <Column let:props><article {...props}>...</article></Column>) | +| noGutter | let | No | boolean | false | Set to `true` to remove the gutter | +| noGutterLeft | let | No | boolean | false | Set to `true` to remove the left gutter | +| noGutterRight | let | No | boolean | false | Set to `true` to remove the right gutter | +| padding | let | No | boolean | false | Set to `true` to add top and bottom padding to the column | +| aspectRatio | let | No | "2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1" | undefined | Specify the aspect ratio of the column | +| sm | let | No | ColumnBreakpoint | undefined | Set the small breakpoint | +| md | let | No | ColumnBreakpoint | undefined | Set the medium breakpoint | +| lg | let | No | ColumnBreakpoint | undefined | Set the large breakpoint | +| xlg | let | No | ColumnBreakpoint | undefined | Set the extra large breakpoint | +| max | let | No | ColumnBreakpoint | undefined | Set the maximum breakpoint | ### Slots @@ -609,7 +609,7 @@ export interface ComboBoxItem { | selectedIndex | let | Yes | number | -1 | Set the selected item by value index | | items | let | No | ComboBoxItem[] | [] | Set the combobox items | | itemToString | let | No | (item: ComboBoxItem) => string | (item) => item.text || item.id | Override the display of a combobox item | -| size | let | No | "sm" | "xl" | -- | Set the size of the combobox | +| size | let | No | "sm" | "xl" | undefined | Set the size of the combobox | | disabled | let | No | boolean | false | Set to `true` to disable the combobox | | titleText | let | No | string | "" | Specify the title text of the combobox | | placeholder | let | No | string | "" | Specify the placeholder text | @@ -618,9 +618,9 @@ export interface ComboBoxItem { | invalid | let | No | boolean | false | Set to `true` to indicate an invalid state | | light | let | No | boolean | false | Set to `true` to enable the light variant | | shouldFilterItem | let | No | (item: ComboBoxItem, value: string) => boolean | () => true | Determine if an item should be filtered given the current combobox value | -| translateWithId | let | No | (id: any) => string | -- | Override the default translation ids | +| translateWithId | let | No | (id: any) => string | undefined | Override the default translation ids | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the list box component | -| name | let | No | string | -- | Specify a name attribute for the input | +| name | let | No | string | undefined | Specify a name attribute for the input | ### Slots @@ -645,7 +645,7 @@ None. | :------------------------- | :--------------- | :------- | :---------------------------------------- | ----------------------------------------- | --------------------------------------------------------------------- | | ref | let | Yes | null | HTMLDivElement | null | Obtain a reference to the top-level HTML element | | open | let | Yes | boolean | false | Set to `true` to open the modal | -| size | let | No | "xs" | "sm" | "lg" | -- | Set the size of the composed modal | +| size | let | No | "xs" | "sm" | "lg" | undefined | Set the size of the composed modal | | danger | let | No | boolean | false | Set to `true` to use the danger variant | | preventCloseOnClickOutside | let | No | boolean | false | Set to `true` to prevent the modal from closing when clicking outside | | containerClass | let | No | string | "" | Specify a class for the inner modal | @@ -692,11 +692,11 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :------------ | :--------------- | :------- | :---------------------------- | ------------------ | ----------------------------------------- | -| selectedIndex | let | Yes | number | 0 | Set the selected index of the switch item | -| light | let | No | boolean | false | Set to `true` to enable the light variant | -| size | let | No | "sm" | "xl" | -- | Specify the size of the content switcher | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :------------ | :--------------- | :------- | :---------------------------- | ---------------------- | ----------------------------------------- | +| selectedIndex | let | Yes | number | 0 | Set the selected index of the switch item | +| light | let | No | boolean | false | Set to `true` to enable the light variant | +| size | let | No | "sm" | "xl" | undefined | Specify the size of the content switcher | ### Slots @@ -798,23 +798,23 @@ export interface DataTableCell { ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :------------- | :--------------- | :------- | :-------------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------- | -| selectedRowIds | let | Yes | DataTableRowId[] | [] | Specify the row ids to be selected | -| selectable | let | Yes | boolean | false | Set to `true` for the selectable variant
Automatically set to `true` if `radio` or `batchSelection` are `true` | -| expandedRowIds | let | Yes | DataTableRowId[] | [] | Specify the row ids to be expanded | -| expandable | let | Yes | boolean | false | Set to `true` for the expandable variant
Automatically set to `true` if `batchExpansion` is `true` | -| rows | let | Yes | DataTableRow[] | [] | Specify the rows the data table should render
keys defined in `headers` are used for the row ids | -| headers | let | No | DataTableHeader[] | [] | Specify the data table headers | -| size | let | No | "compact" | "short" | "tall" | -- | Set the size of the data table | -| title | let | No | string | "" | Specify the title of the data table | -| description | let | No | string | "" | Specify the description of the data table | -| zebra | let | No | boolean | false | Set to `true` to use zebra styles | -| sortable | let | No | boolean | false | Set to `true` for the sortable variant | -| batchExpansion | let | No | boolean | false | Set to `true` to enable batch expansion | -| radio | let | No | boolean | false | Set to `true` for the radio selection variant | -| batchSelection | let | No | boolean | false | Set to `true` to enable batch selection | -| stickyHeader | let | No | boolean | false | Set to `true` to enable a sticky header | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :------------- | :--------------- | :------- | :-------------------------------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------- | +| selectedRowIds | let | Yes | DataTableRowId[] | [] | Specify the row ids to be selected | +| selectable | let | Yes | boolean | false | Set to `true` for the selectable variant
Automatically set to `true` if `radio` or `batchSelection` are `true` | +| expandedRowIds | let | Yes | DataTableRowId[] | [] | Specify the row ids to be expanded | +| expandable | let | Yes | boolean | false | Set to `true` for the expandable variant
Automatically set to `true` if `batchExpansion` is `true` | +| rows | let | Yes | DataTableRow[] | [] | Specify the rows the data table should render
keys defined in `headers` are used for the row ids | +| headers | let | No | DataTableHeader[] | [] | Specify the data table headers | +| size | let | No | "compact" | "short" | "tall" | undefined | Set the size of the data table | +| title | let | No | string | "" | Specify the title of the data table | +| description | let | No | string | "" | Specify the description of the data table | +| zebra | let | No | boolean | false | Set to `true` to use zebra styles | +| sortable | let | No | boolean | false | Set to `true` for the sortable variant | +| batchExpansion | let | No | boolean | false | Set to `true` to enable batch expansion | +| radio | let | No | boolean | false | Set to `true` for the radio selection variant | +| batchSelection | let | No | boolean | false | Set to `true` to enable batch selection | +| stickyHeader | let | No | boolean | false | Set to `true` to enable a sticky header | ### Slots @@ -842,15 +842,15 @@ export interface DataTableCell { ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :---------- | :--------------- | :------- | :------------------------------------------------------ | ------------------ | -------------------------------------------------------------------------------------------- | -| columns | let | No | number | 5 | Specify the number of columns
Superseded by `headers` if `headers` is a non-empty array | -| rows | let | No | number | 5 | Specify the number of rows | -| size | let | No | "compact" | "short" | "tall" | -- | Set the size of the data table | -| zebra | let | No | boolean | false | Set to `true` to apply zebra styles to the datatable rows | -| showHeader | let | No | boolean | true | Set to `false` to hide the header | -| headers | let | No | string[] | Partial[] | [] | Set the column headers
Supersedes `columns` if value is a non-empty array | -| showToolbar | let | No | boolean | true | Set to `false` to hide the toolbar | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :---------- | :--------------- | :------- | :------------------------------------------------------ | ---------------------- | -------------------------------------------------------------------------------------------- | +| columns | let | No | number | 5 | Specify the number of columns
Superseded by `headers` if `headers` is a non-empty array | +| rows | let | No | number | 5 | Specify the number of rows | +| size | let | No | "compact" | "short" | "tall" | undefined | Set the size of the data table | +| zebra | let | No | boolean | false | Set to `true` to apply zebra styles to the datatable rows | +| showHeader | let | No | boolean | true | Set to `false` to hide the header | +| headers | let | No | string[] | Partial[] | [] | Set the column headers
Supersedes `columns` if value is a non-empty array | +| showToolbar | let | No | boolean | true | Set to `false` to hide the toolbar | ### Slots @@ -873,7 +873,7 @@ None. | :------------- | :--------------- | :------- | :--------------------------------------------------- | ------------------------------------------------ | --------------------------------------------- | | value | let | Yes | number | string | "" | Specify the date picker input value | | datePickerType | let | No | "simple" | "single" | "range" | "simple" | Specify the date picker type | -| appendTo | let | No | HTMLElement | -- | Specify the element to append the calendar to | +| appendTo | let | No | HTMLElement | undefined | Specify the element to append the calendar to | | dateFormat | let | No | string | "m/d/Y" | Specify the date format | | maxDate | let | No | null | string | Date | null | Specify the maximum date | | minDate | let | No | null | string | Date | null | Specify the minimum date | @@ -905,7 +905,7 @@ None. | Prop name | Kind | Reactive | Type | Default value | Description | | :-------------- | :--------------- | :------- | :---------------------------------------- | ------------------------------------------------ | -------------------------------------------------- | | ref | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element | -| size | let | No | "sm" | "xl" | -- | Set the size of the input | +| size | let | No | "sm" | "xl" | undefined | Set the size of the input | | type | let | No | string | "text" | Specify the input type | | placeholder | let | No | string | "" | Specify the input placeholder text | | pattern | let | No | string | "\\d{1,2}\\/\\d{1,2}\\/\\d{4}" | Specify the Regular Expression for the input value | @@ -916,7 +916,7 @@ None. | hideLabel | let | No | boolean | false | Set to `true` to visually hide the label text | | invalid | let | No | boolean | false | Set to `true` to indicate an invalid state | | invalidText | let | No | string | "" | Specify the invalid state text | -| name | let | No | string | -- | Set a name for the input element | +| name | let | No | string | undefined | Set a name for the input element | ### Slots @@ -978,7 +978,7 @@ export interface DropdownItem { | items | let | No | DropdownItem[] | [] | Set the dropdown items | | itemToString | let | No | (item: DropdownItem) => string | (item) => item.text || item.id | Override the display of a dropdown item | | type | let | No | "default" | "inline" | "default" | Specify the type of dropdown | -| size | let | No | "sm" | "lg" | "xl" | -- | Specify the size of the dropdown field | +| size | let | No | "sm" | "lg" | "xl" | undefined | Specify the size of the dropdown field | | light | let | No | boolean | false | Set to `true` to enable the light variant | | disabled | let | No | boolean | false | Set to `true` to disable the dropdown | | titleText | let | No | string | "" | Specify the title text | @@ -987,10 +987,10 @@ export interface DropdownItem { | warn | let | No | boolean | false | Set to `true` to indicate an warning state | | warnText | let | No | string | "" | Specify the warning state text | | helperText | let | No | string | "" | Specify the helper text | -| label | let | No | string | -- | Specify the list box label | -| translateWithId | let | No | (id: any) => string | -- | Override the default translation ids | +| label | let | No | string | undefined | Specify the list box label | +| translateWithId | let | No | (id: any) => string | undefined | Override the default translation ids | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the list box component | -| name | let | No | string | -- | Specify a name attribute for the list box | +| name | let | No | string | undefined | Specify a name attribute for the list box | ### Slots @@ -1362,16 +1362,16 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :---------------------- | :--------------- | :------- | :----------------------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- | -| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | -| isSideNavOpen | let | Yes | boolean | false | Set to `true` to open the side nav | -| expandedByDefault | let | No | boolean | true | Set to `false` to hide the side nav by default | -| uiShellAriaLabel | let | No | string | -- | Specify the ARIA label for the header | -| href | let | No | string | -- | Specify the `href` attribute | -| company | let | No | string | -- | Specify the company name | -| platformName | let | No | string | "" | Specify the platform name
Alternatively, use the named slot "platform" (e.g., <span slot="platform">...</span>) | -| persistentHamburgerMenu | let | No | boolean | false | Set to `true` to persist the hamburger menu | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :---------------------- | :--------------- | :------- | :----------------------------------------- | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | +| isSideNavOpen | let | Yes | boolean | false | Set to `true` to open the side nav | +| expandedByDefault | let | No | boolean | true | Set to `false` to hide the side nav by default | +| uiShellAriaLabel | let | No | string | undefined | Specify the ARIA label for the header | +| href | let | No | string | undefined | Specify the `href` attribute | +| company | let | No | string | undefined | Specify the company name | +| platformName | let | No | string | "" | Specify the platform name
Alternatively, use the named slot "platform" (e.g., <span slot="platform">...</span>) | +| persistentHamburgerMenu | let | No | boolean | false | Set to `true` to persist the hamburger menu | ### Slots @@ -1405,8 +1405,8 @@ export interface HeaderActionSlideTransition { | :--------- | :--------------- | :------- | :----------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------- | | ref | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the button HTML element | | isOpen | let | Yes | boolean | false | Set to `true` to open the panel | -| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | -| text | let | No | string | -- | Specify the text
Alternatively, use the named slot "text" (e.g., <div slot="text">...</div>) | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | Specify the icon from `carbon-icons-svelte` to render | +| text | let | No | string | undefined | Specify the text
Alternatively, use the named slot "text" (e.g., <div slot="text">...</div>) | | transition | let | No | false | HeaderActionSlideTransition | { duration: 200 } | Customize the panel transition (i.e., `transition:slide`)
Set to `false` to disable the transition | ### Slots @@ -1427,12 +1427,12 @@ export interface HeaderActionSlideTransition { ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :----------- | :--------------- | :------- | :----------------------------------------------------------- | ------------------ | ----------------------------------------------------- | -| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | -| linkIsActive | let | No | boolean | false | Set to `true` to use the active state | -| href | let | No | string | -- | Specify the `href` attribute | -| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :----------- | :--------------- | :------- | :----------------------------------------------------------- | ---------------------- | ----------------------------------------------------- | +| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | +| linkIsActive | let | No | boolean | false | Set to `true` to use the active state | +| href | let | No | string | undefined | Specify the `href` attribute | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | Specify the icon from `carbon-icons-svelte` to render | ### Slots @@ -1466,11 +1466,11 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :----------------------------------------------------------- | ------------------ | --------------------------------------------- | -| ref | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the HTML button element | -| isActive | let | No | boolean | false | Set to `true` to use the active variant | -| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon to render | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :----------------------------------------------------------- | ---------------------- | --------------------------------------------- | +| ref | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the HTML button element | +| isActive | let | No | boolean | false | Set to `true` to use the active variant | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | Specify the icon to render | ### Slots @@ -1488,9 +1488,9 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :------------------ | ------------- | ---------------------------------- | -| ariaLabel | let | No | string | -- | Specify the ARIA label for the nav | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :------------------ | ---------------------- | ---------------------------------- | +| ariaLabel | let | No | string | undefined | Specify the ARIA label for the nav | ### Slots @@ -1506,11 +1506,11 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :----------------------------------------- | ----------------- | --------------------------------------------- | -| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | -| href | let | No | string | -- | Specify the `href` attribute | -| text | let | No | string | -- | Specify the text | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :----------------------------------------- | ---------------------- | --------------------------------------------- | +| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | +| href | let | No | string | undefined | Specify the `href` attribute | +| text | let | No | string | undefined | Specify the text | ### Slots @@ -1538,7 +1538,7 @@ None. | ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | | expanded | let | Yes | boolean | false | Set to `true` to toggle the expanded state | | href | let | No | string | "/" | Specify the `href` attribute | -| text | let | No | string | -- | Specify the text | +| text | let | No | string | undefined | Specify the text | | iconDescription | let | No | string | "Expand/Collapse" | Specify the ARIA label for the chevron icon | ### Slots @@ -1580,10 +1580,10 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :----------------------------------------- | ----------------- | --------------------------------------------- | -| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | -| href | let | No | string | -- | Specify the `href` attribute | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :----------------------------------------- | ---------------------- | --------------------------------------------- | +| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | +| href | let | No | string | undefined | Specify the `href` attribute | ### Slots @@ -1675,10 +1675,10 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :----------------------------------------------------------- | ------------------ | ----------------------------------------------------- | -| render | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | -| skeleton | let | No | boolean | false | Set to `true` to display the skeleton state | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :----------------------------------------------------------- | ---------------------- | ----------------------------------------------------- | +| render | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | Specify the icon from `carbon-icons-svelte` to render | +| skeleton | let | No | boolean | false | Set to `true` to display the skeleton state | ### Slots @@ -1718,12 +1718,12 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------------- | :--------------- | :------- | :----------------------------------------------------------------------- | --------------------- | ----------------------------------------------------------------- | -| status | let | No | "active" | "inactive" | "finished" | "error" | "active" | Set the loading status | -| description | let | No | string | -- | Set the loading description | -| iconDescription | let | No | string | -- | Specify the ARIA label for the loading icon | -| successDelay | let | No | number | 1500 | Specify the timeout delay (ms) after `status` is set to "success" | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------------- | :--------------- | :------- | :----------------------------------------------------------------------- | ---------------------- | ----------------------------------------------------------------- | +| status | let | No | "active" | "inactive" | "finished" | "error" | "active" | Set the loading status | +| description | let | No | string | undefined | Set the loading description | +| iconDescription | let | No | string | undefined | Specify the ARIA label for the loading icon | +| successDelay | let | No | number | 1500 | Specify the timeout delay (ms) after `status` is set to "success" | ### Slots @@ -1775,14 +1775,14 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :--------------------------------------------------------------------- | ------------------ | ------------------------------------------------ | -| ref | let | Yes | null | HTMLAnchorElement | HTMLParagraphElement | null | Obtain a reference to the top-level HTML element | -| size | let | No | "sm" | "lg" | -- | Specify the size of the link | -| href | let | No | string | -- | Specify the href value | -| inline | let | No | boolean | false | Set to `true` to use the inline variant | -| disabled | let | No | boolean | false | Set to `true` to disable the checkbox | -| visited | let | No | boolean | false | Set to `true` to allow visited styles | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :--------------------------------------------------------------------- | ---------------------- | ------------------------------------------------ | +| ref | let | Yes | null | HTMLAnchorElement | HTMLParagraphElement | null | Obtain a reference to the top-level HTML element | +| size | let | No | "sm" | "lg" | undefined | Specify the size of the link | +| href | let | No | string | undefined | Specify the href value | +| inline | let | No | boolean | false | Set to `true` to use the inline variant | +| disabled | let | No | boolean | false | Set to `true` to disable the checkbox | +| visited | let | No | boolean | false | Set to `true` to allow visited styles | ### Slots @@ -1805,7 +1805,7 @@ None. | Prop name | Kind | Reactive | Type | Default value | Description | | :---------- | :--------------- | :------- | :------------------------------------- | ---------------------- | ------------------------------------------ | -| size | let | No | "sm" | "xl" | -- | Set the size of the list box | +| size | let | No | "sm" | "xl" | undefined | Set the size of the list box | | type | let | No | "default" | "inline" | "default" | Set the type of the list box | | open | let | No | boolean | false | Set to `true` to open the list box | | light | let | No | boolean | false | Set to `true` to enable the light variant | @@ -1948,7 +1948,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 | any | undefined | 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 | @@ -2012,13 +2012,13 @@ None. | :------------------------- | :--------------- | :------- | :---------------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------- | | ref | let | Yes | null | HTMLDivElement | null | Obtain a reference to the top-level HTML element | | open | let | Yes | boolean | false | Set to `true` to open the modal | -| size | let | No | "xs" | "sm" | "lg" | -- | Set the size of the modal | +| size | let | No | "xs" | "sm" | "lg" | undefined | Set the size of the modal | | danger | let | No | boolean | false | Set to `true` to use the danger variant | | alert | let | No | boolean | false | Set to `true` to enable alert mode | | passiveModal | let | No | boolean | false | Set to `true` to use the passive variant | -| modalHeading | let | No | string | -- | Specify the modal heading | -| modalLabel | let | No | string | -- | Specify the modal label | -| modalAriaLabel | let | No | string | -- | Specify the ARIA label for the modal | +| modalHeading | let | No | string | undefined | Specify the modal heading | +| modalLabel | let | No | string | undefined | Specify the modal label | +| modalAriaLabel | let | No | string | undefined | Specify the ARIA label for the modal | | iconDescription | let | No | string | "Close the modal" | Specify the ARIA label for the close icon | | hasForm | let | No | boolean | false | Set to `true` if the modal contains form elements | | hasScrollingContent | let | No | boolean | false | Set to `true` if the modal contains scrolling content | @@ -2075,14 +2075,14 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------------------- | :--------------- | :------- | :------------------- | ------------------ | ------------------------------------------- | -| primaryButtonText | let | No | string | "" | Specify the primary button text | -| primaryButtonDisabled | let | No | boolean | false | Set to `true` to disable the primary button | -| primaryClass | let | No | string | -- | Specify a class for the primary button | -| secondaryButtonText | let | No | string | "" | Specify the secondary button text | -| secondaryClass | let | No | string | -- | Specify a class for the secondary button | -| danger | let | No | boolean | false | Set to `true` to use the danger variant | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------------------- | :--------------- | :------- | :------------------- | ---------------------- | ------------------------------------------- | +| primaryButtonText | let | No | string | "" | Specify the primary button text | +| primaryButtonDisabled | let | No | boolean | false | Set to `true` to disable the primary button | +| primaryClass | let | No | string | undefined | Specify a class for the primary button | +| secondaryButtonText | let | No | string | "" | Specify the secondary button text | +| secondaryClass | let | No | string | undefined | Specify a class for the secondary button | +| danger | let | No | boolean | false | Set to `true` to use the danger variant | ### Slots @@ -2144,7 +2144,7 @@ export interface MultiSelectItem { | selectedIds | let | Yes | MultiSelectItemId[] | [] | Set the selected ids | | items | let | Yes | MultiSelectItem[] | [] | Set the multiselect items | | itemToString | let | No | (item: MultiSelectItem) => string | (item) => item.text || item.id | Override the display of a multiselect item | -| size | let | No | "sm" | "lg" | "xl" | -- | Set the size of the combobox | +| size | let | No | "sm" | "lg" | "xl" | undefined | Set the size of the combobox | | type | let | No | "default" | "inline" | "default" | Specify the type of multiselect | | selectionFeedback | let | No | "top" | "fixed" | "top-after-reopen" | "top-after-reopen" | Specify the selection feedback after selecting items | | disabled | let | No | boolean | false | Set to `true` to disable the dropdown | @@ -2154,7 +2154,7 @@ export interface MultiSelectItem { | locale | let | No | string | "en" | Specify the locale | | placeholder | let | No | string | "" | Specify the placeholder text | | sortItem | let | No | ((a: MultiSelectItem, b: MultiSelectItem) => MultiSelectItem) | (() => void) | (a, b) => a.text.localeCompare(b.text, locale, { numeric: true }) | Override the sorting logic
The default sorting compare the item text value | -| translateWithId | let | No | (id: any) => string | -- | Override the default translation ids | +| translateWithId | let | No | (id: any) => string | undefined | Override the default translation ids | | titleText | let | No | string | "" | Specify the title text | | useTitleInItem | let | No | boolean | false | Set to `true` to pass the item to `itemToString` in the checkbox | | invalid | let | No | boolean | false | Set to `true` to indicate an invalid state | @@ -2164,7 +2164,7 @@ export interface MultiSelectItem { | helperText | let | No | string | "" | Specify the helper text | | label | let | No | string | "" | Specify the list box label | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the list box component | -| name | let | No | string | -- | Specify a name attribute for the select | +| name | let | No | string | undefined | Specify a name attribute for the select | ### Slots @@ -2208,8 +2208,8 @@ None. | Prop name | Kind | Reactive | Type | Default value | Description | | :--------------- | :--------------- | :------- | :----------------------------------------------------------- | ------------------------- | ----------------------------------------------------- | | notificationType | let | No | "toast" | "inline" | "toast" | Set the type of notification | -| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | -| title | let | No | string | -- | Specify the title of the icon | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | Specify the icon from `carbon-icons-svelte` to render | +| title | let | No | string | undefined | Specify the title of the icon | | iconDescription | let | No | string | "Close icon" | Specify the ARIA label for the icon | ### Slots @@ -2278,10 +2278,10 @@ export type NumberInputTranslationId = "increment" | "decrement"; | :-------------- | :----------------- | :------- | :-------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------- | | ref | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element | | value | let | Yes | number | string | "" | Specify the input value | -| size | let | No | "sm" | "xl" | -- | Set the size of the input | +| size | let | No | "sm" | "xl" | undefined | Set the size of the input | | step | let | No | number | 1 | Specify the step increment | -| max | let | No | number | -- | Specify the maximum value | -| min | let | No | number | -- | Specify the minimum value | +| max | let | No | number | undefined | Specify the maximum value | +| min | let | No | number | undefined | Specify the minimum value | | light | let | No | boolean | false | Set to `true` to enable the light variant | | readonly | let | No | boolean | false | Set to `true` for the input to be read-only | | mobile | let | No | boolean | false | Set to `true` to enable the mobile variant | @@ -2298,7 +2298,7 @@ export type NumberInputTranslationId = "increment" | "decrement"; | translateWithId | let | No | (id: NumberInputTranslationId) => string | (id) => defaultTranslations[id] | Override the default translation ids | | translationIds | const | No | { increment: "increment"; decrement: "decrement" } | { increment: "increment", decrement: "decrement", } | Default translation ids | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element | -| name | let | No | string | -- | Specify a name attribute for the input | +| name | let | No | string | undefined | Specify a name attribute for the input | ### Slots @@ -2392,13 +2392,13 @@ None. | menuRef | let | Yes | null | HTMLUListElement | null | Obtain a reference to the overflow menu element | | buttonRef | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the trigger button element | | open | let | Yes | boolean | false | Set to `true` to open the menu | -| size | let | No | "sm" | "xl" | -- | Specify the size of the overflow menu | +| size | let | No | "sm" | "xl" | undefined | Specify the size of the overflow menu | | direction | let | No | "top" | "bottom" | "bottom" | Specify the direction of the overflow menu relative to the button | | light | let | No | boolean | false | Set to `true` to enable the light variant | | flipped | let | No | boolean | false | Set to `true` to flip the menu relative to the button | -| menuOptionsClass | let | No | string | -- | Specify the menu options class | -| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | -| iconClass | let | No | string | -- | Specify the icon class | +| menuOptionsClass | let | No | string | undefined | Specify the menu options class | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | Specify the icon from `carbon-icons-svelte` to render | +| iconClass | let | No | string | undefined | Specify the icon class | | iconDescription | let | No | string | "Open and close list of options" | Specify the ARIA label for the icon | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the button element | @@ -2535,7 +2535,7 @@ None. | ref | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element | | type | let | Yes | "text" | "password" | "password" | Set to `"text"` to toggle the password visibility | | value | let | Yes | number | string | "" | Specify the input value | -| size | let | No | "sm" | "xl" | -- | Set the size of the input | +| size | let | No | "sm" | "xl" | undefined | Set the size of the input | | placeholder | let | No | string | "" | Specify the placeholder text | | hidePasswordLabel | let | No | string | "Hide password" | Specify the hide password label text | | showPasswordLabel | let | No | string | "Show password" | Specify the show password label text | @@ -2549,7 +2549,7 @@ None. | invalid | let | No | boolean | false | Set to `true` to indicate an invalid state | | invalidText | let | No | string | "" | Specify the text for the invalid state | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element | -| name | let | No | string | -- | Specify a name attribute for the input | +| name | let | No | string | undefined | Specify a name attribute for the input | ### Slots @@ -2681,11 +2681,11 @@ None. | Prop name | Kind | Reactive | Type | Default value | Description | | :------------ | :--------------- | :------- | :------------------------------------------ | ------------------------- | -------------------------------------------- | -| selected | let | Yes | string | -- | Set the selected radio button value | +| selected | let | Yes | string | undefined | Set the selected radio button value | | disabled | let | No | boolean | false | Set to `true` to disable the radio buttons | | 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 | +| id | let | No | string | undefined | Set an id for the container div element | ### Slots @@ -2846,13 +2846,13 @@ None. | Prop name | Kind | Reactive | Type | Default value | Description | | :---------- | :--------------- | :------- | :----------------------------------------- | ------------------------------------------------ | ----------------------------------------------- | | ref | let | Yes | null | HTMLSelectElement | null | Obtain a reference to the select HTML element | -| selected | let | Yes | string | -- | Specify the selected item value | -| size | let | No | "sm" | "xl" | -- | Set the size of the select input | +| selected | let | Yes | string | undefined | Specify the selected item value | +| size | let | No | "sm" | "xl" | undefined | Set the size of the select input | | inline | let | No | boolean | false | Set to `true` to use the inline variant | | light | let | No | boolean | false | Set to `true` to enable the light variant | | disabled | let | No | boolean | false | Set to `true` to disable the select element | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the select element | -| name | let | No | string | -- | Specify a name attribute for the select element | +| name | let | No | string | undefined | Specify a name attribute for the select element | | invalid | let | No | boolean | false | Set to `true` to indicate an invalid state | | invalidText | let | No | string | "" | Specify the invalid state text | | helperText | let | No | string | "" | Specify the helper text | @@ -2968,11 +2968,11 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :------------------- | ------------------ | ------------------------------------------ | -| isOpen | let | Yes | boolean | false | Set to `true` to toggle the expanded state | -| fixed | let | No | boolean | false | Set to `true` to use the fixed variant | -| ariaLabel | let | No | string | -- | Specify the ARIA label for the nav | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :------------------- | ---------------------- | ------------------------------------------ | +| isOpen | let | Yes | boolean | false | Set to `true` to toggle the expanded state | +| fixed | let | No | boolean | false | Set to `true` to use the fixed variant | +| ariaLabel | let | No | string | undefined | Specify the ARIA label for the nav | ### Slots @@ -3004,13 +3004,13 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :--------- | :--------------- | :------- | :----------------------------------------------------------- | ------------------ | ----------------------------------------------------- | -| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | -| isSelected | let | No | boolean | false | Set to `true` to select the current link | -| href | let | No | string | -- | Specify the `href` attribute | -| text | let | No | string | -- | Specify the text | -| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :--------- | :--------------- | :------- | :----------------------------------------------------------- | ---------------------- | ----------------------------------------------------- | +| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | +| isSelected | let | No | boolean | false | Set to `true` to select the current link | +| href | let | No | string | undefined | Specify the `href` attribute | +| text | let | No | string | undefined | Specify the text | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | Specify the icon from `carbon-icons-svelte` to render | ### Slots @@ -3026,12 +3026,12 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :----------------------------------------------------------- | ------------------ | ----------------------------------------------------- | -| ref | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the HTML button element | -| expanded | let | Yes | boolean | false | Set to `true` to toggle the expanded state | -| text | let | No | string | -- | Specify the text | -| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :----------------------------------------------------------- | ---------------------- | ----------------------------------------------------- | +| ref | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the HTML button element | +| expanded | let | Yes | boolean | false | Set to `true` to toggle the expanded state | +| text | let | No | string | undefined | Specify the text | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | Specify the icon from `carbon-icons-svelte` to render | ### Slots @@ -3049,12 +3049,12 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :--------- | :--------------- | :------- | :----------------------------------------- | ----------------- | --------------------------------------------- | -| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | -| isSelected | let | No | boolean | -- | Set to `true` to select the item | -| href | let | No | string | -- | Specify the `href` attribute | -| text | let | No | string | -- | Specify the item text | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :--------- | :--------------- | :------- | :----------------------------------------- | ---------------------- | --------------------------------------------- | +| ref | let | Yes | null | HTMLAnchorElement | null | Obtain a reference to the HTML anchor element | +| isSelected | let | No | boolean | undefined | Set to `true` to select the item | +| href | let | No | string | undefined | Specify the `href` attribute | +| text | let | No | string | undefined | Specify the item text | ### Slots @@ -3193,11 +3193,11 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :------------------- | ------------------ | ---------------------------------------------- | -| selected | let | Yes | string | -- | Specify the selected structured list row value | -| border | let | No | boolean | false | Set to `true` to use the bordered variant | -| selection | let | No | boolean | false | Set to `true` to use the selection variant | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :------------------- | ---------------------- | ---------------------------------------------- | +| selected | let | Yes | string | undefined | Specify the selected structured list row value | +| border | let | No | boolean | false | Set to `true` to use the bordered variant | +| selection | let | No | boolean | false | Set to `true` to use the selection variant | ### Slots @@ -3428,14 +3428,14 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :--------------- | :--------------- | :------- | :-------------------------------------------------- | ------------------ | --------------------------------------- | -| size | let | No | "compact" | "short" | "tall" | -- | Set the size of the table | -| zebra | let | No | boolean | false | Set to `true` to use zebra styles | -| useStaticWidth | let | No | boolean | false | Set to `true` to use static width | -| shouldShowBorder | let | No | boolean | false | Set to `true` for the bordered variant | -| sortable | let | No | boolean | false | Set to `true` for the sortable variant | -| stickyHeader | let | No | boolean | false | Set to `true` to enable a sticky header | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :--------------- | :--------------- | :------- | :-------------------------------------------------- | ---------------------- | --------------------------------------- | +| size | let | No | "compact" | "short" | "tall" | undefined | Set the size of the table | +| zebra | let | No | boolean | false | Set to `true` to use zebra styles | +| useStaticWidth | let | No | boolean | false | Set to `true` to use static width | +| shouldShowBorder | let | No | boolean | false | Set to `true` for the bordered variant | +| sortable | let | No | boolean | false | Set to `true` for the sortable variant | +| stickyHeader | let | No | boolean | false | Set to `true` to enable a sticky header | ### Slots @@ -3624,12 +3624,12 @@ None. | 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 | +| type | let | No | "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast" | undefined | Specify the type of tag | | 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 | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | 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 @@ -3686,7 +3686,7 @@ None. | invalid | let | No | boolean | false | Set to `true` to indicate an invalid state | | invalidText | let | No | string | "" | Specify the text for the invalid state | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the textarea element | -| name | let | No | string | -- | Specify a name attribute for the input | +| name | let | No | string | undefined | Specify a name attribute for the input | ### Slots @@ -3734,14 +3734,14 @@ None. | :---------- | :--------------- | :------- | :---------------------------------------- | ------------------------------------------------ | --------------------------------------------- | | ref | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element | | value | let | Yes | number | string | "" | Specify the input value | -| size | let | No | "sm" | "xl" | -- | Set the size of the input | +| size | let | No | "sm" | "xl" | undefined | Set the size of the input | | type | let | No | string | "" | Specify the input type | | placeholder | let | No | string | "" | Specify the placeholder text | | light | let | No | boolean | false | Set to `true` to enable the light variant | | disabled | let | No | boolean | false | Set to `true` to disable the input | | helperText | let | No | string | "" | Specify the helper text | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element | -| name | let | No | string | -- | Specify a name attribute for the input | +| name | let | No | string | undefined | Specify a name attribute for the input | | labelText | let | No | string | "" | Specify the label text | | hideLabel | let | No | boolean | false | Set to `true` to visually hide the label text | | invalid | let | No | boolean | false | Set to `true` to indicate an invalid state | @@ -3817,11 +3817,11 @@ None. ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :-------- | :--------------- | :------- | :------------------- | ------------------ | --------------------------------------- | -| selected | let | Yes | string | -- | Specify the selected tile value | -| disabled | let | No | boolean | false | Set to `true` to disable the tile group | -| legend | let | No | string | "" | Specify the legend text | +| Prop name | Kind | Reactive | Type | Default value | Description | +| :-------- | :--------------- | :------- | :------------------- | ---------------------- | --------------------------------------- | +| selected | let | Yes | string | undefined | Specify the selected tile value | +| disabled | let | No | boolean | false | Set to `true` to disable the tile group | +| legend | let | No | string | "" | Specify the legend text | ### Slots @@ -3843,7 +3843,7 @@ None. | :---------- | :--------------- | :------- | :---------------------------------------- | --------------------------------------------------- | ----------------------------------------------------- | | ref | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element | | value | let | Yes | string | "" | Specify the input value | -| size | let | No | "sm" | "xl" | -- | Specify the size of the input | +| size | let | No | "sm" | "xl" | undefined | Specify the size of the input | | type | let | No | string | "text" | Specify the input type | | placeholder | let | No | string | "hh=mm" | Specify the input placeholder text | | pattern | let | No | string | "(1[012]|[1-9]):[0-5][0-9](\\s)?" | Specify the `pattern` attribute for the input element | @@ -3855,7 +3855,7 @@ None. | invalid | let | No | boolean | false | Set to `true` to indicate an invalid state | | invalidText | let | No | string | "" | Specify the invalid state text | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element | -| name | let | No | string | -- | Specify a name attribute for the input | +| name | let | No | string | undefined | Specify a name attribute for the input | ### Slots @@ -3889,7 +3889,7 @@ None. | labelText | let | No | string | "" | Specify the label text | | hideLabel | let | No | boolean | true | -- | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the select element | -| name | let | No | string | -- | Specify a name attribute for the select element | +| name | let | No | string | undefined | Specify a name attribute for the select element | ### Slots @@ -3951,7 +3951,7 @@ None. | labelB | let | No | string | "On" | Specify the label for the toggled state | | labelText | let | No | string | "" | Specify the label text | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element | -| name | let | No | string | -- | Specify a name attribute for the checkbox input | +| name | let | No | string | undefined | Specify a name attribute for the checkbox input | ### Slots @@ -4006,7 +4006,7 @@ None. | labelB | let | No | string | "On" | Specify the label for the toggled state | | labelText | let | No | string | "" | Specify the label text | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element | -| name | let | No | string | -- | Specify a name attribute for the checkbox input | +| name | let | No | string | undefined | Specify a name attribute for the checkbox input | ### Slots @@ -4172,7 +4172,7 @@ None. | align | let | No | "start" | "center" | "end" | "center" | Set the alignment of the tooltip relative to the icon | | direction | let | No | "top" | "right" | "bottom" | "left" | "bottom" | Set the direction of the tooltip relative to the button | | hideIcon | let | No | boolean | false | Set to `true` to hide the tooltip icon | -| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render for the tooltip button
Icon size must be 16px (e.g., `Add16`, `Task16`) | +| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | undefined | Specify the icon from `carbon-icons-svelte` to render for the tooltip button
Icon size must be 16px (e.g., `Add16`, `Task16`) | | iconDescription | let | No | string | "" | Specify the ARIA label for the tooltip button | | iconName | let | No | string | "" | Specify the icon name attribute | | tabindex | let | No | string | "0" | Set the button tabindex | diff --git a/integration/carbon/types/Accordion/Accordion.svelte.d.ts b/integration/carbon/types/Accordion/Accordion.svelte.d.ts index 5365738..7d5ef57 100644 --- a/integration/carbon/types/Accordion/Accordion.svelte.d.ts +++ b/integration/carbon/types/Accordion/Accordion.svelte.d.ts @@ -11,6 +11,7 @@ export interface AccordionProps extends AccordionSkeletonProps { /** * Specify the size of the accordion + * @default undefined */ size?: "sm" | "xl"; diff --git a/integration/carbon/types/Accordion/AccordionSkeleton.svelte.d.ts b/integration/carbon/types/Accordion/AccordionSkeleton.svelte.d.ts index c761f38..6a5fa19 100644 --- a/integration/carbon/types/Accordion/AccordionSkeleton.svelte.d.ts +++ b/integration/carbon/types/Accordion/AccordionSkeleton.svelte.d.ts @@ -17,6 +17,7 @@ export interface AccordionSkeletonProps /** * Specify the size of the accordion + * @default undefined */ size?: "sm" | "xl"; diff --git a/integration/carbon/types/Breadcrumb/BreadcrumbItem.svelte.d.ts b/integration/carbon/types/Breadcrumb/BreadcrumbItem.svelte.d.ts index 7b68f56..866f279 100644 --- a/integration/carbon/types/Breadcrumb/BreadcrumbItem.svelte.d.ts +++ b/integration/carbon/types/Breadcrumb/BreadcrumbItem.svelte.d.ts @@ -5,6 +5,7 @@ export interface BreadcrumbItemProps extends svelte.JSX.HTMLAttributes { /** * Set the `href` to use an anchor link + * @default undefined */ href?: string; diff --git a/integration/carbon/types/Button/Button.svelte.d.ts b/integration/carbon/types/Button/Button.svelte.d.ts index 66da27a..935e5df 100644 --- a/integration/carbon/types/Button/Button.svelte.d.ts +++ b/integration/carbon/types/Button/Button.svelte.d.ts @@ -34,11 +34,13 @@ export interface ButtonProps /** * Specify the icon from `carbon-icons-svelte` to render + * @default undefined */ icon?: typeof import("carbon-icons-svelte").CarbonIcon; /** * Specify the ARIA label for the button icon + * @default undefined */ iconDescription?: string; @@ -76,6 +78,7 @@ export interface ButtonProps /** * Set the `href` to use an anchor link + * @default undefined */ href?: string; diff --git a/integration/carbon/types/Button/ButtonSkeleton.svelte.d.ts b/integration/carbon/types/Button/ButtonSkeleton.svelte.d.ts index ac57f89..595dec2 100644 --- a/integration/carbon/types/Button/ButtonSkeleton.svelte.d.ts +++ b/integration/carbon/types/Button/ButtonSkeleton.svelte.d.ts @@ -5,6 +5,7 @@ export interface ButtonSkeletonProps extends svelte.JSX.HTMLAttributes { /** * Set the `href` to use an anchor link + * @default undefined */ href?: string; diff --git a/integration/carbon/types/Checkbox/Checkbox.svelte.d.ts b/integration/carbon/types/Checkbox/Checkbox.svelte.d.ts index cdd7a52..49d67b5 100644 --- a/integration/carbon/types/Checkbox/Checkbox.svelte.d.ts +++ b/integration/carbon/types/Checkbox/Checkbox.svelte.d.ts @@ -52,6 +52,7 @@ export interface CheckboxProps { /** * Specify the title attribute for the label element + * @default undefined */ title?: string; diff --git a/integration/carbon/types/CodeSnippet/CodeSnippet.svelte.d.ts b/integration/carbon/types/CodeSnippet/CodeSnippet.svelte.d.ts index 2a8c00a..710584d 100644 --- a/integration/carbon/types/CodeSnippet/CodeSnippet.svelte.d.ts +++ b/integration/carbon/types/CodeSnippet/CodeSnippet.svelte.d.ts @@ -11,6 +11,7 @@ export interface CodeSnippetProps { /** * Set the code snippet text * Alternatively, use the default slot (e.g., {`code`}) + * @default undefined */ code?: string; @@ -54,11 +55,13 @@ export interface CodeSnippetProps { /** * Specify the ARIA label for the copy button icon + * @default undefined */ copyButtonDescription?: string; /** * Specify the ARIA label of the copy button + * @default undefined */ copyLabel?: string; diff --git a/integration/carbon/types/ComboBox/ComboBox.svelte.d.ts b/integration/carbon/types/ComboBox/ComboBox.svelte.d.ts index cf86750..503abc7 100644 --- a/integration/carbon/types/ComboBox/ComboBox.svelte.d.ts +++ b/integration/carbon/types/ComboBox/ComboBox.svelte.d.ts @@ -34,6 +34,7 @@ export interface ComboBoxProps /** * Set the size of the combobox + * @default undefined */ size?: "sm" | "xl"; @@ -93,6 +94,7 @@ export interface ComboBoxProps /** * Override the default translation ids + * @default undefined */ translateWithId?: (id: any) => string; @@ -104,6 +106,7 @@ export interface ComboBoxProps /** * Specify a name attribute for the input + * @default undefined */ name?: string; diff --git a/integration/carbon/types/ComposedModal/ComposedModal.svelte.d.ts b/integration/carbon/types/ComposedModal/ComposedModal.svelte.d.ts index f1f5507..8744f23 100644 --- a/integration/carbon/types/ComposedModal/ComposedModal.svelte.d.ts +++ b/integration/carbon/types/ComposedModal/ComposedModal.svelte.d.ts @@ -5,6 +5,7 @@ export interface ComposedModalProps extends svelte.JSX.HTMLAttributes { /** * Set the size of the composed modal + * @default undefined */ size?: "xs" | "sm" | "lg"; diff --git a/integration/carbon/types/ComposedModal/ModalFooter.svelte.d.ts b/integration/carbon/types/ComposedModal/ModalFooter.svelte.d.ts index 8eb5a2c..3febb3c 100644 --- a/integration/carbon/types/ComposedModal/ModalFooter.svelte.d.ts +++ b/integration/carbon/types/ComposedModal/ModalFooter.svelte.d.ts @@ -17,6 +17,7 @@ export interface ModalFooterProps /** * Specify a class for the primary button + * @default undefined */ primaryClass?: string; @@ -28,6 +29,7 @@ export interface ModalFooterProps /** * Specify a class for the secondary button + * @default undefined */ secondaryClass?: string; diff --git a/integration/carbon/types/ContentSwitcher/ContentSwitcher.svelte.d.ts b/integration/carbon/types/ContentSwitcher/ContentSwitcher.svelte.d.ts index 21ffc6a..5115c34 100644 --- a/integration/carbon/types/ContentSwitcher/ContentSwitcher.svelte.d.ts +++ b/integration/carbon/types/ContentSwitcher/ContentSwitcher.svelte.d.ts @@ -17,6 +17,7 @@ export interface ContentSwitcherProps /** * Specify the size of the content switcher + * @default undefined */ size?: "sm" | "xl"; } diff --git a/integration/carbon/types/DataTable/DataTable.svelte.d.ts b/integration/carbon/types/DataTable/DataTable.svelte.d.ts index 93ec9fc..4f7f69d 100644 --- a/integration/carbon/types/DataTable/DataTable.svelte.d.ts +++ b/integration/carbon/types/DataTable/DataTable.svelte.d.ts @@ -51,6 +51,7 @@ export interface DataTableProps { /** * Set the size of the data table + * @default undefined */ size?: "compact" | "short" | "tall"; diff --git a/integration/carbon/types/DataTable/DataTableSkeleton.svelte.d.ts b/integration/carbon/types/DataTable/DataTableSkeleton.svelte.d.ts index 86786ca..5282af6 100644 --- a/integration/carbon/types/DataTable/DataTableSkeleton.svelte.d.ts +++ b/integration/carbon/types/DataTable/DataTableSkeleton.svelte.d.ts @@ -20,6 +20,7 @@ export interface DataTableSkeletonProps /** * Set the size of the data table + * @default undefined */ size?: "compact" | "short" | "tall"; diff --git a/integration/carbon/types/DataTable/Table.svelte.d.ts b/integration/carbon/types/DataTable/Table.svelte.d.ts index 6e9cf0d..8cf82d0 100644 --- a/integration/carbon/types/DataTable/Table.svelte.d.ts +++ b/integration/carbon/types/DataTable/Table.svelte.d.ts @@ -5,6 +5,7 @@ export interface TableProps extends svelte.JSX.HTMLAttributes { /** * Set the size of the table + * @default undefined */ size?: "compact" | "short" | "tall"; diff --git a/integration/carbon/types/DatePicker/DatePicker.svelte.d.ts b/integration/carbon/types/DatePicker/DatePicker.svelte.d.ts index 1ea5941..58a528f 100644 --- a/integration/carbon/types/DatePicker/DatePicker.svelte.d.ts +++ b/integration/carbon/types/DatePicker/DatePicker.svelte.d.ts @@ -17,6 +17,7 @@ export interface DatePickerProps /** * Specify the element to append the calendar to + * @default undefined */ appendTo?: HTMLElement; diff --git a/integration/carbon/types/DatePicker/DatePickerInput.svelte.d.ts b/integration/carbon/types/DatePicker/DatePickerInput.svelte.d.ts index d17c519..86766a3 100644 --- a/integration/carbon/types/DatePicker/DatePickerInput.svelte.d.ts +++ b/integration/carbon/types/DatePicker/DatePickerInput.svelte.d.ts @@ -5,6 +5,7 @@ export interface DatePickerInputProps extends svelte.JSX.HTMLAttributes { /** * Set the size of the input + * @default undefined */ size?: "sm" | "xl"; @@ -70,6 +71,7 @@ export interface DatePickerInputProps /** * Set a name for the input element + * @default undefined */ name?: string; diff --git a/integration/carbon/types/Dropdown/Dropdown.svelte.d.ts b/integration/carbon/types/Dropdown/Dropdown.svelte.d.ts index 189ff98..1201c3b 100644 --- a/integration/carbon/types/Dropdown/Dropdown.svelte.d.ts +++ b/integration/carbon/types/Dropdown/Dropdown.svelte.d.ts @@ -38,6 +38,7 @@ export interface DropdownProps /** * Specify the size of the dropdown field + * @default undefined */ size?: "sm" | "lg" | "xl"; @@ -103,11 +104,13 @@ export interface DropdownProps /** * Specify the list box label + * @default undefined */ label?: string; /** * Override the default translation ids + * @default undefined */ translateWithId?: (id: any) => string; @@ -119,6 +122,7 @@ export interface DropdownProps /** * Specify a name attribute for the list box + * @default undefined */ name?: string; diff --git a/integration/carbon/types/Grid/Column.svelte.d.ts b/integration/carbon/types/Grid/Column.svelte.d.ts index eda8ac8..1fc48b2 100644 --- a/integration/carbon/types/Grid/Column.svelte.d.ts +++ b/integration/carbon/types/Grid/Column.svelte.d.ts @@ -45,31 +45,37 @@ export interface ColumnProps /** * Specify the aspect ratio of the column + * @default undefined */ aspectRatio?: "2x1" | "16x9" | "9x16" | "1x2" | "4x3" | "3x4" | "1x1"; /** * Set the small breakpoint + * @default undefined */ sm?: ColumnBreakpoint; /** * Set the medium breakpoint + * @default undefined */ md?: ColumnBreakpoint; /** * Set the large breakpoint + * @default undefined */ lg?: ColumnBreakpoint; /** * Set the extra large breakpoint + * @default undefined */ xlg?: ColumnBreakpoint; /** * Set the maximum breakpoint + * @default undefined */ max?: ColumnBreakpoint; } diff --git a/integration/carbon/types/Icon/Icon.svelte.d.ts b/integration/carbon/types/Icon/Icon.svelte.d.ts index 56e237b..c046b7c 100644 --- a/integration/carbon/types/Icon/Icon.svelte.d.ts +++ b/integration/carbon/types/Icon/Icon.svelte.d.ts @@ -7,6 +7,7 @@ export interface IconProps svelte.JSX.HTMLAttributes { /** * Specify the icon from `carbon-icons-svelte` to render + * @default undefined */ render?: typeof import("carbon-icons-svelte").CarbonIcon; diff --git a/integration/carbon/types/InlineLoading/InlineLoading.svelte.d.ts b/integration/carbon/types/InlineLoading/InlineLoading.svelte.d.ts index a9821f7..61bd829 100644 --- a/integration/carbon/types/InlineLoading/InlineLoading.svelte.d.ts +++ b/integration/carbon/types/InlineLoading/InlineLoading.svelte.d.ts @@ -11,11 +11,13 @@ export interface InlineLoadingProps /** * Set the loading description + * @default undefined */ description?: string; /** * Specify the ARIA label for the loading icon + * @default undefined */ iconDescription?: string; diff --git a/integration/carbon/types/Link/Link.svelte.d.ts b/integration/carbon/types/Link/Link.svelte.d.ts index d8dd099..2698a2f 100644 --- a/integration/carbon/types/Link/Link.svelte.d.ts +++ b/integration/carbon/types/Link/Link.svelte.d.ts @@ -5,11 +5,13 @@ export interface LinkProps extends svelte.JSX.HTMLAttributes { /** * Specify the size of the link + * @default undefined */ size?: "sm" | "lg"; /** * Specify the href value + * @default undefined */ href?: string; diff --git a/integration/carbon/types/ListBox/ListBox.svelte.d.ts b/integration/carbon/types/ListBox/ListBox.svelte.d.ts index 5dc8c89..2a08ecc 100644 --- a/integration/carbon/types/ListBox/ListBox.svelte.d.ts +++ b/integration/carbon/types/ListBox/ListBox.svelte.d.ts @@ -5,6 +5,7 @@ export interface ListBoxProps extends svelte.JSX.HTMLAttributes { /** * Set the size of the list box + * @default undefined */ size?: "sm" | "xl"; diff --git a/integration/carbon/types/ListBox/ListBoxSelection.svelte.d.ts b/integration/carbon/types/ListBox/ListBoxSelection.svelte.d.ts index 2abf9eb..76773ee 100644 --- a/integration/carbon/types/ListBox/ListBoxSelection.svelte.d.ts +++ b/integration/carbon/types/ListBox/ListBoxSelection.svelte.d.ts @@ -7,6 +7,7 @@ export interface ListBoxSelectionProps extends svelte.JSX.HTMLAttributes { /** * Specify the number of selected items + * @default undefined */ selectionCount?: any; diff --git a/integration/carbon/types/Modal/Modal.svelte.d.ts b/integration/carbon/types/Modal/Modal.svelte.d.ts index 32abce2..86759f9 100644 --- a/integration/carbon/types/Modal/Modal.svelte.d.ts +++ b/integration/carbon/types/Modal/Modal.svelte.d.ts @@ -5,6 +5,7 @@ export interface ModalProps extends svelte.JSX.HTMLAttributes { /** * Set the size of the modal + * @default undefined */ size?: "xs" | "sm" | "lg"; @@ -34,16 +35,19 @@ export interface ModalProps /** * Specify the modal heading + * @default undefined */ modalHeading?: string; /** * Specify the modal label + * @default undefined */ modalLabel?: string; /** * Specify the ARIA label for the modal + * @default undefined */ modalAriaLabel?: string; diff --git a/integration/carbon/types/MultiSelect/MultiSelect.svelte.d.ts b/integration/carbon/types/MultiSelect/MultiSelect.svelte.d.ts index 60b31af..fbac648 100644 --- a/integration/carbon/types/MultiSelect/MultiSelect.svelte.d.ts +++ b/integration/carbon/types/MultiSelect/MultiSelect.svelte.d.ts @@ -38,6 +38,7 @@ export interface MultiSelectProps /** * Set the size of the combobox + * @default undefined */ size?: "sm" | "lg" | "xl"; @@ -107,6 +108,7 @@ export interface MultiSelectProps /** * Override the default translation ids + * @default undefined */ translateWithId?: (id: any) => string; @@ -166,6 +168,7 @@ export interface MultiSelectProps /** * Specify a name attribute for the select + * @default undefined */ name?: string; } diff --git a/integration/carbon/types/Notification/NotificationButton.svelte.d.ts b/integration/carbon/types/Notification/NotificationButton.svelte.d.ts index 8596893..0ba269f 100644 --- a/integration/carbon/types/Notification/NotificationButton.svelte.d.ts +++ b/integration/carbon/types/Notification/NotificationButton.svelte.d.ts @@ -11,11 +11,13 @@ export interface NotificationButtonProps /** * Specify the icon from `carbon-icons-svelte` to render + * @default undefined */ icon?: typeof import("carbon-icons-svelte").CarbonIcon; /** * Specify the title of the icon + * @default undefined */ title?: string; diff --git a/integration/carbon/types/NumberInput/NumberInput.svelte.d.ts b/integration/carbon/types/NumberInput/NumberInput.svelte.d.ts index d364c81..f661e3f 100644 --- a/integration/carbon/types/NumberInput/NumberInput.svelte.d.ts +++ b/integration/carbon/types/NumberInput/NumberInput.svelte.d.ts @@ -7,6 +7,7 @@ export interface NumberInputProps extends svelte.JSX.HTMLAttributes { /** * Set the size of the input + * @default undefined */ size?: "sm" | "xl"; @@ -24,11 +25,13 @@ export interface NumberInputProps /** * Specify the maximum value + * @default undefined */ max?: number; /** * Specify the minimum value + * @default undefined */ min?: number; @@ -124,6 +127,7 @@ export interface NumberInputProps /** * Specify a name attribute for the input + * @default undefined */ name?: string; diff --git a/integration/carbon/types/OverflowMenu/OverflowMenu.svelte.d.ts b/integration/carbon/types/OverflowMenu/OverflowMenu.svelte.d.ts index cf16c37..ed23645 100644 --- a/integration/carbon/types/OverflowMenu/OverflowMenu.svelte.d.ts +++ b/integration/carbon/types/OverflowMenu/OverflowMenu.svelte.d.ts @@ -5,6 +5,7 @@ export interface OverflowMenuProps extends svelte.JSX.HTMLAttributes { /** * Specify the size of the overflow menu + * @default undefined */ size?: "sm" | "xl"; @@ -34,16 +35,19 @@ export interface OverflowMenuProps /** * Specify the menu options class + * @default undefined */ menuOptionsClass?: string; /** * Specify the icon from `carbon-icons-svelte` to render + * @default undefined */ icon?: typeof import("carbon-icons-svelte").CarbonIcon; /** * Specify the icon class + * @default undefined */ iconClass?: string; diff --git a/integration/carbon/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts b/integration/carbon/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts index 6505e2a..73b92fc 100644 --- a/integration/carbon/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts +++ b/integration/carbon/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts @@ -5,6 +5,7 @@ export interface RadioButtonGroupProps extends svelte.JSX.HTMLAttributes { /** * Set the selected radio button value + * @default undefined */ selected?: string; @@ -28,6 +29,7 @@ export interface RadioButtonGroupProps /** * Set an id for the container div element + * @default undefined */ id?: string; } diff --git a/integration/carbon/types/Select/Select.svelte.d.ts b/integration/carbon/types/Select/Select.svelte.d.ts index 914b462..9a1bf33 100644 --- a/integration/carbon/types/Select/Select.svelte.d.ts +++ b/integration/carbon/types/Select/Select.svelte.d.ts @@ -5,11 +5,13 @@ export interface SelectProps extends svelte.JSX.HTMLAttributes { /** * Specify the selected item value + * @default undefined */ selected?: string; /** * Set the size of the select input + * @default undefined */ size?: "sm" | "xl"; @@ -39,6 +41,7 @@ export interface SelectProps /** * Specify a name attribute for the select element + * @default undefined */ name?: string; diff --git a/integration/carbon/types/StructuredList/StructuredList.svelte.d.ts b/integration/carbon/types/StructuredList/StructuredList.svelte.d.ts index e405578..45698df 100644 --- a/integration/carbon/types/StructuredList/StructuredList.svelte.d.ts +++ b/integration/carbon/types/StructuredList/StructuredList.svelte.d.ts @@ -5,6 +5,7 @@ export interface StructuredListProps extends svelte.JSX.HTMLAttributes { /** * Specify the selected structured list row value + * @default undefined */ selected?: string; diff --git a/integration/carbon/types/Tag/Tag.svelte.d.ts b/integration/carbon/types/Tag/Tag.svelte.d.ts index 7be494d..dfae080 100644 --- a/integration/carbon/types/Tag/Tag.svelte.d.ts +++ b/integration/carbon/types/Tag/Tag.svelte.d.ts @@ -6,6 +6,7 @@ export interface TagProps svelte.JSX.HTMLAttributes { /** * Specify the type of tag + * @default undefined */ type?: | "red" @@ -46,6 +47,7 @@ export interface TagProps /** * Specify the icon from `carbon-icons-svelte` to render + * @default undefined */ icon?: typeof import("carbon-icons-svelte").CarbonIcon; diff --git a/integration/carbon/types/TextArea/TextArea.svelte.d.ts b/integration/carbon/types/TextArea/TextArea.svelte.d.ts index ee686e8..fd9d38c 100644 --- a/integration/carbon/types/TextArea/TextArea.svelte.d.ts +++ b/integration/carbon/types/TextArea/TextArea.svelte.d.ts @@ -77,6 +77,7 @@ export interface TextAreaProps /** * Specify a name attribute for the input + * @default undefined */ name?: string; diff --git a/integration/carbon/types/TextInput/PasswordInput.svelte.d.ts b/integration/carbon/types/TextInput/PasswordInput.svelte.d.ts index 55ab9b1..b75bd40 100644 --- a/integration/carbon/types/TextInput/PasswordInput.svelte.d.ts +++ b/integration/carbon/types/TextInput/PasswordInput.svelte.d.ts @@ -5,6 +5,7 @@ export interface PasswordInputProps extends svelte.JSX.HTMLAttributes { /** * Set the size of the input + * @default undefined */ size?: "sm" | "xl"; @@ -100,6 +101,7 @@ export interface PasswordInputProps /** * Specify a name attribute for the input + * @default undefined */ name?: string; diff --git a/integration/carbon/types/TextInput/TextInput.svelte.d.ts b/integration/carbon/types/TextInput/TextInput.svelte.d.ts index 848a075..3bd136a 100644 --- a/integration/carbon/types/TextInput/TextInput.svelte.d.ts +++ b/integration/carbon/types/TextInput/TextInput.svelte.d.ts @@ -5,6 +5,7 @@ export interface TextInputProps extends svelte.JSX.HTMLAttributes { /** * Set the size of the input + * @default undefined */ size?: "sm" | "xl"; @@ -52,6 +53,7 @@ export interface TextInputProps /** * Specify a name attribute for the input + * @default undefined */ name?: string; diff --git a/integration/carbon/types/Tile/ClickableTile.svelte.d.ts b/integration/carbon/types/Tile/ClickableTile.svelte.d.ts index 53fbd07..25529ea 100644 --- a/integration/carbon/types/Tile/ClickableTile.svelte.d.ts +++ b/integration/carbon/types/Tile/ClickableTile.svelte.d.ts @@ -17,6 +17,7 @@ export interface ClickableTileProps /** * Set the `href` + * @default undefined */ href?: string; } diff --git a/integration/carbon/types/Tile/TileGroup.svelte.d.ts b/integration/carbon/types/Tile/TileGroup.svelte.d.ts index c9ee388..fdd0124 100644 --- a/integration/carbon/types/Tile/TileGroup.svelte.d.ts +++ b/integration/carbon/types/Tile/TileGroup.svelte.d.ts @@ -5,6 +5,7 @@ export interface TileGroupProps extends svelte.JSX.HTMLAttributes { /** * Specify the selected tile value + * @default undefined */ selected?: string; diff --git a/integration/carbon/types/TimePicker/TimePicker.svelte.d.ts b/integration/carbon/types/TimePicker/TimePicker.svelte.d.ts index 96363f0..81b01e4 100644 --- a/integration/carbon/types/TimePicker/TimePicker.svelte.d.ts +++ b/integration/carbon/types/TimePicker/TimePicker.svelte.d.ts @@ -5,6 +5,7 @@ export interface TimePickerProps extends svelte.JSX.HTMLAttributes { /** * Specify the size of the input + * @default undefined */ size?: "sm" | "xl"; @@ -82,6 +83,7 @@ export interface TimePickerProps /** * Specify a name attribute for the input + * @default undefined */ name?: string; diff --git a/integration/carbon/types/TimePicker/TimePickerSelect.svelte.d.ts b/integration/carbon/types/TimePicker/TimePickerSelect.svelte.d.ts index c39d43e..0945079 100644 --- a/integration/carbon/types/TimePicker/TimePickerSelect.svelte.d.ts +++ b/integration/carbon/types/TimePicker/TimePickerSelect.svelte.d.ts @@ -40,6 +40,7 @@ export interface TimePickerSelectProps /** * Specify a name attribute for the select element + * @default undefined */ name?: string; diff --git a/integration/carbon/types/Toggle/Toggle.svelte.d.ts b/integration/carbon/types/Toggle/Toggle.svelte.d.ts index ac60725..8469356 100644 --- a/integration/carbon/types/Toggle/Toggle.svelte.d.ts +++ b/integration/carbon/types/Toggle/Toggle.svelte.d.ts @@ -47,6 +47,7 @@ export interface ToggleProps /** * Specify a name attribute for the checkbox input + * @default undefined */ name?: string; } diff --git a/integration/carbon/types/ToggleSmall/ToggleSmall.svelte.d.ts b/integration/carbon/types/ToggleSmall/ToggleSmall.svelte.d.ts index c3a37f6..00de1e1 100644 --- a/integration/carbon/types/ToggleSmall/ToggleSmall.svelte.d.ts +++ b/integration/carbon/types/ToggleSmall/ToggleSmall.svelte.d.ts @@ -41,6 +41,7 @@ export interface ToggleSmallProps /** * Specify a name attribute for the checkbox input + * @default undefined */ name?: string; } diff --git a/integration/carbon/types/Tooltip/Tooltip.svelte.d.ts b/integration/carbon/types/Tooltip/Tooltip.svelte.d.ts index 2b0d83f..67e9a18 100644 --- a/integration/carbon/types/Tooltip/Tooltip.svelte.d.ts +++ b/integration/carbon/types/Tooltip/Tooltip.svelte.d.ts @@ -30,6 +30,7 @@ export interface TooltipProps /** * Specify the icon from `carbon-icons-svelte` to render for the tooltip button * Icon size must be 16px (e.g., `Add16`, `Task16`) + * @default undefined */ icon?: typeof import("carbon-icons-svelte").CarbonIcon; diff --git a/integration/carbon/types/UIShell/GlobalHeader/Header.svelte.d.ts b/integration/carbon/types/UIShell/GlobalHeader/Header.svelte.d.ts index 676f328..2820acf 100644 --- a/integration/carbon/types/UIShell/GlobalHeader/Header.svelte.d.ts +++ b/integration/carbon/types/UIShell/GlobalHeader/Header.svelte.d.ts @@ -17,16 +17,19 @@ export interface HeaderProps /** * Specify the ARIA label for the header + * @default undefined */ uiShellAriaLabel?: string; /** * Specify the `href` attribute + * @default undefined */ href?: string; /** * Specify the company name + * @default undefined */ company?: string; diff --git a/integration/carbon/types/UIShell/GlobalHeader/HeaderAction.svelte.d.ts b/integration/carbon/types/UIShell/GlobalHeader/HeaderAction.svelte.d.ts index cf1f732..f557d77 100644 --- a/integration/carbon/types/UIShell/GlobalHeader/HeaderAction.svelte.d.ts +++ b/integration/carbon/types/UIShell/GlobalHeader/HeaderAction.svelte.d.ts @@ -17,12 +17,14 @@ export interface HeaderActionProps /** * Specify the icon from `carbon-icons-svelte` to render + * @default undefined */ icon?: typeof import("carbon-icons-svelte").CarbonIcon; /** * Specify the text * Alternatively, use the named slot "text" (e.g.,
...
) + * @default undefined */ text?: string; diff --git a/integration/carbon/types/UIShell/GlobalHeader/HeaderActionLink.svelte.d.ts b/integration/carbon/types/UIShell/GlobalHeader/HeaderActionLink.svelte.d.ts index 12804ee..8d84330 100644 --- a/integration/carbon/types/UIShell/GlobalHeader/HeaderActionLink.svelte.d.ts +++ b/integration/carbon/types/UIShell/GlobalHeader/HeaderActionLink.svelte.d.ts @@ -11,11 +11,13 @@ export interface HeaderActionLinkProps /** * Specify the `href` attribute + * @default undefined */ href?: string; /** * Specify the icon from `carbon-icons-svelte` to render + * @default undefined */ icon?: typeof import("carbon-icons-svelte").CarbonIcon; diff --git a/integration/carbon/types/UIShell/GlobalHeader/HeaderNav.svelte.d.ts b/integration/carbon/types/UIShell/GlobalHeader/HeaderNav.svelte.d.ts index 7b6cf9b..20bbd3d 100644 --- a/integration/carbon/types/UIShell/GlobalHeader/HeaderNav.svelte.d.ts +++ b/integration/carbon/types/UIShell/GlobalHeader/HeaderNav.svelte.d.ts @@ -5,6 +5,7 @@ export interface HeaderNavProps extends svelte.JSX.HTMLAttributes { /** * Specify the ARIA label for the nav + * @default undefined */ ariaLabel?: string; } diff --git a/integration/carbon/types/UIShell/GlobalHeader/HeaderNavItem.svelte.d.ts b/integration/carbon/types/UIShell/GlobalHeader/HeaderNavItem.svelte.d.ts index 6309cc4..3e73c01 100644 --- a/integration/carbon/types/UIShell/GlobalHeader/HeaderNavItem.svelte.d.ts +++ b/integration/carbon/types/UIShell/GlobalHeader/HeaderNavItem.svelte.d.ts @@ -5,11 +5,13 @@ export interface HeaderNavItemProps extends svelte.JSX.HTMLAttributes { /** * Specify the `href` attribute + * @default undefined */ href?: string; /** * Specify the text + * @default undefined */ text?: string; diff --git a/integration/carbon/types/UIShell/GlobalHeader/HeaderNavMenu.svelte.d.ts b/integration/carbon/types/UIShell/GlobalHeader/HeaderNavMenu.svelte.d.ts index bf68f4c..62eadc4 100644 --- a/integration/carbon/types/UIShell/GlobalHeader/HeaderNavMenu.svelte.d.ts +++ b/integration/carbon/types/UIShell/GlobalHeader/HeaderNavMenu.svelte.d.ts @@ -17,6 +17,7 @@ export interface HeaderNavMenuProps /** * Specify the text + * @default undefined */ text?: string; diff --git a/integration/carbon/types/UIShell/GlobalHeader/HeaderPanelLink.svelte.d.ts b/integration/carbon/types/UIShell/GlobalHeader/HeaderPanelLink.svelte.d.ts index 05b0e0d..13e9e3a 100644 --- a/integration/carbon/types/UIShell/GlobalHeader/HeaderPanelLink.svelte.d.ts +++ b/integration/carbon/types/UIShell/GlobalHeader/HeaderPanelLink.svelte.d.ts @@ -5,6 +5,7 @@ export interface HeaderPanelLinkProps extends svelte.JSX.HTMLAttributes { /** * Specify the `href` attribute + * @default undefined */ href?: string; diff --git a/integration/carbon/types/UIShell/HeaderGlobalAction.svelte.d.ts b/integration/carbon/types/UIShell/HeaderGlobalAction.svelte.d.ts index 95a584c..b2cd43a 100644 --- a/integration/carbon/types/UIShell/HeaderGlobalAction.svelte.d.ts +++ b/integration/carbon/types/UIShell/HeaderGlobalAction.svelte.d.ts @@ -11,6 +11,7 @@ export interface HeaderGlobalActionProps /** * Specify the icon to render + * @default undefined */ icon?: typeof import("carbon-icons-svelte").CarbonIcon; diff --git a/integration/carbon/types/UIShell/SideNav/SideNav.svelte.d.ts b/integration/carbon/types/UIShell/SideNav/SideNav.svelte.d.ts index ecec993..6b2c02f 100644 --- a/integration/carbon/types/UIShell/SideNav/SideNav.svelte.d.ts +++ b/integration/carbon/types/UIShell/SideNav/SideNav.svelte.d.ts @@ -11,6 +11,7 @@ export interface SideNavProps /** * Specify the ARIA label for the nav + * @default undefined */ ariaLabel?: string; diff --git a/integration/carbon/types/UIShell/SideNav/SideNavLink.svelte.d.ts b/integration/carbon/types/UIShell/SideNav/SideNavLink.svelte.d.ts index 50829d2..f6d9746 100644 --- a/integration/carbon/types/UIShell/SideNav/SideNavLink.svelte.d.ts +++ b/integration/carbon/types/UIShell/SideNav/SideNavLink.svelte.d.ts @@ -11,16 +11,19 @@ export interface SideNavLinkProps /** * Specify the `href` attribute + * @default undefined */ href?: string; /** * Specify the text + * @default undefined */ text?: string; /** * Specify the icon from `carbon-icons-svelte` to render + * @default undefined */ icon?: typeof import("carbon-icons-svelte").CarbonIcon; diff --git a/integration/carbon/types/UIShell/SideNav/SideNavMenu.svelte.d.ts b/integration/carbon/types/UIShell/SideNav/SideNavMenu.svelte.d.ts index 4f1405f..08b5b17 100644 --- a/integration/carbon/types/UIShell/SideNav/SideNavMenu.svelte.d.ts +++ b/integration/carbon/types/UIShell/SideNav/SideNavMenu.svelte.d.ts @@ -11,11 +11,13 @@ export interface SideNavMenuProps /** * Specify the text + * @default undefined */ text?: string; /** * Specify the icon from `carbon-icons-svelte` to render + * @default undefined */ icon?: typeof import("carbon-icons-svelte").CarbonIcon; diff --git a/integration/carbon/types/UIShell/SideNav/SideNavMenuItem.svelte.d.ts b/integration/carbon/types/UIShell/SideNav/SideNavMenuItem.svelte.d.ts index 1ef512c..63ad700 100644 --- a/integration/carbon/types/UIShell/SideNav/SideNavMenuItem.svelte.d.ts +++ b/integration/carbon/types/UIShell/SideNav/SideNavMenuItem.svelte.d.ts @@ -5,16 +5,19 @@ export interface SideNavMenuItemProps extends svelte.JSX.HTMLAttributes { /** * Set to `true` to select the item + * @default undefined */ isSelected?: boolean; /** * Specify the `href` attribute + * @default undefined */ href?: string; /** * Specify the item text + * @default undefined */ text?: string; diff --git a/tests/snapshots/bind-this-multiple/output.d.ts b/tests/snapshots/bind-this-multiple/output.d.ts index e315bff..1dcaf95 100644 --- a/tests/snapshots/bind-this-multiple/output.d.ts +++ b/tests/snapshots/bind-this-multiple/output.d.ts @@ -2,8 +2,14 @@ import { SvelteComponentTyped } from "svelte"; export interface InputProps { + /** + * @default undefined + */ ref?: null | HTMLButtonElement | HTMLHeadingElement; + /** + * @default undefined + */ ref2?: null | HTMLDivElement; /** diff --git a/tests/snapshots/bind-this/output.d.ts b/tests/snapshots/bind-this/output.d.ts index e6061e7..e5bc802 100644 --- a/tests/snapshots/bind-this/output.d.ts +++ b/tests/snapshots/bind-this/output.d.ts @@ -2,6 +2,9 @@ import { SvelteComponentTyped } from "svelte"; export interface InputProps { + /** + * @default undefined + */ ref?: null | HTMLButtonElement; } diff --git a/tests/snapshots/infer-basic/output.d.ts b/tests/snapshots/infer-basic/output.d.ts index 87890c1..98d4e8b 100644 --- a/tests/snapshots/infer-basic/output.d.ts +++ b/tests/snapshots/infer-basic/output.d.ts @@ -17,6 +17,9 @@ export interface InputProps { */ propString?: string; + /** + * @default undefined + */ name?: undefined; /** diff --git a/tests/snapshots/infer-with-types/output.d.ts b/tests/snapshots/infer-with-types/output.d.ts index 58a9def..af6c6e9 100644 --- a/tests/snapshots/infer-with-types/output.d.ts +++ b/tests/snapshots/infer-with-types/output.d.ts @@ -12,6 +12,9 @@ export interface InputProps { */ propString?: string; + /** + * @default undefined + */ name?: string; /** diff --git a/tests/snapshots/typed-props/output.d.ts b/tests/snapshots/typed-props/output.d.ts index 1bb5185..f08ab81 100644 --- a/tests/snapshots/typed-props/output.d.ts +++ b/tests/snapshots/typed-props/output.d.ts @@ -5,6 +5,7 @@ export interface InputProps { /** * prop1 description 1 * prop1 description 2 + * @default undefined */ prop1?: string; From 532d0f9db7f97425be332758939673f0fd4173e5 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Tue, 18 Jan 2022 20:12:37 -0800 Subject: [PATCH 4/4] chore(ts-definitions): remove console.log [ci skip] --- src/writer/writer-ts-definitions.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/writer/writer-ts-definitions.ts b/src/writer/writer-ts-definitions.ts index 0574e96..90ca711 100644 --- a/src/writer/writer-ts-definitions.ts +++ b/src/writer/writer-ts-definitions.ts @@ -52,8 +52,6 @@ function genPropDef(def: Pick