let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the list HTML element |
-| ref | No | let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
-| open | No | let
| Yes | boolean
| false
| Set to `true` to open the combobox menu dropdown |
-| value | No | let
| Yes | string
| ""
| Specify the selected combobox value |
-| selectedId | No | let
| Yes | ComboBoxItemId
| undefined
| Set the selected item by value id |
-| items | No | let
| No | ReadonlyArray
| []
| Set the combobox items |
-| itemToString | No | let
| No | (item: ComboBoxItem) => string
| (item) => item.text || item.id
| Override the display of a combobox item |
-| direction | No | let
| No | "bottom" | "top"
| "bottom"
| Specify the direction of the combobox dropdown menu |
-| size | No | let
| No | "sm" | "xl"
| undefined
| Set the size of the combobox |
-| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the combobox |
-| titleText | No | let
| No | string
| ""
| Specify the title text of the combobox |
-| placeholder | No | let
| No | string
| ""
| Specify the placeholder text |
-| helperText | No | let
| No | string
| ""
| Specify the helper text |
-| invalidText | No | let
| No | string
| ""
| Specify the invalid state text |
-| invalid | No | let
| No | boolean
| false
| Set to `true` to indicate an invalid state |
-| warn | No | let
| No | boolean
| false
| Set to `true` to indicate an warning state |
-| warnText | No | let
| No | string
| ""
| Specify the warning state text |
-| light | No | let
| No | boolean
| false
| Set to `true` to enable the light variant |
-| shouldFilterItem | No | let
| No | (item: ComboBoxItem, value: string) => boolean
| () => true
| Determine if an item should be filtered given the current combobox value |
-| translateWithId | No | let
| No | (id: import("../ListBox/ListBoxMenuIcon.svelte").ListBoxMenuIconTranslationId) => string
| undefined
| Override the chevron icon label based on the open state.let
| No | (id: "clearSelection") => string
| undefined
| Override the label of the clear button when the input has a selection.let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the list box component |
-| name | No | let
| No | string
| undefined
| Specify a name attribute for the input |
-| clear | No | function
| No | (options?: { focus?: boolean; }) => void
| () => { prevSelectedId = null; highlightedIndex = -1; highlightedId = undefined; selectedId = undefined; selectedItem = undefined; open = false; inputValue = ""; if (options?.focus !== false) ref?.focus(); }
| Clear the combo box programmatically |
+| Prop name | Required | Kind | Reactive | Type | Default value | Description |
+| :----------------------- | :------- | :-------------------- | :------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| listRef | No | let
| Yes | null | HTMLDivElement
| null
| Obtain a reference to the list HTML element |
+| ref | No | let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
+| open | No | let
| Yes | boolean
| false
| Set to `true` to open the combobox menu dropdown |
+| value | No | let
| Yes | string
| ""
| Specify the selected combobox value |
+| selectedId | No | let
| Yes | ComboBoxItemId
| undefined
| Set the selected item by value id |
+| items | No | let
| No | ReadonlyArray
| []
| Set the combobox items |
+| itemToString | No | let
| No | (item: ComboBoxItem) => string
| (item) => item.text || item.id
| Override the display of a combobox item |
+| direction | No | let
| No | "bottom" | "top"
| "bottom"
| Specify the direction of the combobox dropdown menu |
+| size | No | let
| No | "sm" | "xl"
| undefined
| Set the size of the combobox |
+| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the combobox |
+| titleText | No | let
| No | string
| ""
| Specify the title text of the combobox |
+| placeholder | No | let
| No | string
| ""
| Specify the placeholder text |
+| helperText | No | let
| No | string
| ""
| Specify the helper text |
+| invalidText | No | let
| No | string
| ""
| Specify the invalid state text |
+| invalid | No | let
| No | boolean
| false
| Set to `true` to indicate an invalid state |
+| warn | No | let
| No | boolean
| false
| Set to `true` to indicate an warning state |
+| warnText | No | let
| No | string
| ""
| Specify the warning state text |
+| light | No | let
| No | boolean
| false
| Set to `true` to enable the light variant |
+| shouldFilterItem | No | let
| No | (item: ComboBoxItem, value: string) => boolean
| () => true
| Determine if an item should be filtered given the current combobox value |
+| translateWithId | No | let
| No | (id: import("../ListBox/ListBoxMenuIcon.svelte").ListBoxMenuIconTranslationId) => string
| undefined
| Override the chevron icon label based on the open state.let
| No | (id: "clearSelection") => string
| undefined
| Override the label of the clear button when the input has a selection.let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the list box component |
+| name | No | let
| No | string
| undefined
| Specify a name attribute for the input |
+| clear | No | function
| No | (options?: { focus?: boolean; }) => void
| () => { prevSelectedId = null; highlightedIndex = -1; highlightedId = undefined; selectedId = undefined; selectedItem = undefined; open = false; value = ""; if (options?.focus !== false) ref?.focus(); }
| Clear the combo box programmatically |
### Slots
@@ -4234,7 +4234,6 @@ export type CarbonTheme = "white" | "g10" | "g80" | "g90" | "g100";
| ref | No | let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
| value | No | let
| Yes | string
| ""
| Specify the input value |
| size | No | let
| No | "sm" | "xl"
| undefined
| Specify the size of the input |
-| type | No | let
| No | string
| "text"
| Specify the input type |
| placeholder | No | let
| No | string
| "hh:mm"
| Specify the input placeholder text |
| pattern | No | let
| No | string
| "(1[012]|[1-9]):[0-5][0-9](\\s)?"
| Specify the `pattern` attribute for the input element |
| maxlength | No | let
| No | number
| 5
| Specify the `maxlength` input attribute |
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index 56d29bac..975ca64b 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -1732,7 +1732,7 @@
"kind": "function",
"description": "Clear the combo box programmatically",
"type": "(options?: { focus?: boolean; }) => void",
- "value": "() => { prevSelectedId = null; highlightedIndex = -1; highlightedId = undefined; selectedId = undefined; selectedItem = undefined; open = false; inputValue = \"\"; if (options?.focus !== false) ref?.focus(); }",
+ "value": "() => { prevSelectedId = null; highlightedIndex = -1; highlightedId = undefined; selectedId = undefined; selectedItem = undefined; open = false; value = \"\"; if (options?.focus !== false) ref?.focus(); }",
"isFunction": true,
"isFunctionDeclaration": true,
"isRequired": false,
@@ -12984,18 +12984,6 @@
"constant": false,
"reactive": true
},
- {
- "name": "type",
- "kind": "let",
- "description": "Specify the input type",
- "type": "string",
- "value": "\"text\"",
- "isFunction": false,
- "isFunctionDeclaration": false,
- "isRequired": false,
- "constant": false,
- "reactive": false
- },
{
"name": "placeholder",
"kind": "let",
diff --git a/src/TimePicker/TimePicker.svelte b/src/TimePicker/TimePicker.svelte
index c2a0b4e3..dfd824cc 100644
--- a/src/TimePicker/TimePicker.svelte
+++ b/src/TimePicker/TimePicker.svelte
@@ -11,12 +11,6 @@
*/
export let value = "";
- /**
- * Specify the input type
- * @type {string}
- */
- export let type = "text";
-
/** Specify the input placeholder text */
export let placeholder = "hh:mm";
@@ -88,14 +82,14 @@
{/if}