@momentum-design/components 0.131.3 → 0.131.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.js +240 -239
- package/dist/browser/index.js.map +3 -3
- package/dist/components/combobox/combobox.component.d.ts +26 -9
- package/dist/components/combobox/combobox.component.js +174 -75
- package/dist/components/combobox/combobox.events.d.ts +2 -2
- package/dist/components/input/input.component.d.ts +8 -0
- package/dist/components/input/input.component.js +1 -0
- package/dist/custom-elements.json +50 -2
- package/dist/react/combobox/index.d.ts +4 -0
- package/dist/react/combobox/index.js +4 -0
- package/dist/utils/keys.d.ts +1 -0
- package/dist/utils/keys.js +1 -0
- package/package.json +1 -1
|
@@ -12836,7 +12836,7 @@
|
|
|
12836
12836
|
"declarations": [
|
|
12837
12837
|
{
|
|
12838
12838
|
"kind": "class",
|
|
12839
|
-
"description": "The Combobox component is a text-based dropdown control that allows users to select an option from a predefined list.\nUsers can type text to filter the options and select their desired choice.\n\nWhen the user starts typing, the filter uses a \"starts with\" search and displays options based on the text entered by the user.\nIf the user entered text that doesn't match with any of the options, then the text in the `no-result-text` attribute will be displayed.\n\nIf there is no text in the `no-result-text` attribute then nothing will be shown.\n\nCombobox is designed to work with `mdc-option` for individual options and `mdc-optgroup` for grouping related options.\nThe component ensures accessibility and usability while handling various use cases, including long text truncation with tooltip support.\n\nEvery mdc-option should have a `value` attribute set to ensure proper form submission.\n\nTo set a default option, use the `selected` attribute on the `mdc-option` element.\n\n**Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-combobox` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.\n\nIf you need to use `mdc-tooltip` with any options, make sure to place the tooltip component outside the `mdc-selectlistbox` element. Read more about it in Options documentation.\n\nTo understand more about combobox and its patterns, refer to this [WCAG example](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-list/).",
|
|
12839
|
+
"description": "The Combobox component is a text-based dropdown control that allows users to select an option from a predefined list.\nUsers can type text to filter the options and select their desired choice.\n\nWhen the user starts typing, the filter uses a \"starts with\" search and displays options based on the text entered by the user.\nIf the user entered text that doesn't match with any of the options, then the text in the `no-result-text` attribute will be displayed.\n\nIf there is no text in the `no-result-text` attribute then nothing will be shown.\n\nCombobox is designed to work with `mdc-option` for individual options and `mdc-optgroup` for grouping related options.\nThe component ensures accessibility and usability while handling various use cases, including long text truncation with tooltip support.\n\nEvery mdc-option should have a `value` attribute set to ensure proper form submission.\n\nTo set a default option, use the `selected` attribute on the `mdc-option` element.\n\nWhen the combobox `control-type` attribute is \"controlled\", then the value should be set by the parent only, and the combobox will emit `change` and `input` events\nwith the selected option details when the user makes a selection or types in the input, but it won't update the selected value internally.\nThe parent component is expected to listen to these events and update the `value` property of the combobox accordingly to reflect the changes in the UI.\n\n**Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-combobox` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.\n\nIf you need to use `mdc-tooltip` with any options, make sure to place the tooltip component outside the `mdc-selectlistbox` element. Read more about it in Options documentation.\n\nTo understand more about combobox and its patterns, refer to this [WCAG example](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-list/).",
|
|
12840
12840
|
"name": "Combobox",
|
|
12841
12841
|
"cssProperties": [
|
|
12842
12842
|
{
|
|
@@ -13900,7 +13900,7 @@
|
|
|
13900
13900
|
"module": "/src/components/formfieldwrapper/formfieldwrapper.component"
|
|
13901
13901
|
},
|
|
13902
13902
|
"tagName": "mdc-combobox",
|
|
13903
|
-
"jsDoc": "/**\n * The Combobox component is a text-based dropdown control that allows users to select an option from a predefined list.\n * Users can type text to filter the options and select their desired choice.\n *\n * When the user starts typing, the filter uses a \"starts with\" search and displays options based on the text entered by the user.\n * If the user entered text that doesn't match with any of the options, then the text in the `no-result-text` attribute will be displayed.\n *\n * If there is no text in the `no-result-text` attribute then nothing will be shown.\n *\n * Combobox is designed to work with `mdc-option` for individual options and `mdc-optgroup` for grouping related options.\n * The component ensures accessibility and usability while handling various use cases, including long text truncation with tooltip support.\n *\n * Every mdc-option should have a `value` attribute set to ensure proper form submission.\n *\n * To set a default option, use the `selected` attribute on the `mdc-option` element.\n *\n * **Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-combobox` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.\n *\n * If you need to use `mdc-tooltip` with any options, make sure to place the tooltip component outside the `mdc-selectlistbox` element. Read more about it in Options documentation.\n *\n * To understand more about combobox and its patterns, refer to this [WCAG example](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-list/).\n *\n * @dependency mdc-buttonsimple\n * @dependency mdc-icon\n * @dependency mdc-input\n * @dependency mdc-listitem\n * @dependency mdc-popover\n *\n * @tagname mdc-combobox\n *\n * @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.\n * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.\n * @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.\n * @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.\n * @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.\n *\n * @event click - (React: onClick) This event is dispatched when the combobox is clicked.\n * @event change - (React: onChange) This event is dispatched when the combobox is changed.\n * @event input - (React: onInput) This event is dispatched when the combobox is changed.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the combobox.\n * @event focus - (React: onFocus) This event is dispatched when the combobox receives focus.\n *\n * @cssproperty --mdc-combobox-border-color - The border color of the combobox\n * @cssproperty --mdc-combobox-icon-color - The icon color of the combobox\n * @cssproperty --mdc-combobox-listbox-height - The height of the listbox inside the combobox\n * @cssproperty --mdc-combobox-listbox-width - The width of the listbox inside the combobox\n * @cssproperty --mdc-combobox-width - The width of the combobox\n * @cssproperty --mdc-combobox-hover-background-color - The background color of the combobox when hovered\n * @cssproperty --mdc-label-font-size - Font size for the label text.\n * @cssproperty --mdc-label-font-weight - Font weight for the label text.\n * @cssproperty --mdc-label-line-height - Line height for the label text.\n * @cssproperty --mdc-label-color - Color for the label text.\n * @cssproperty --mdc-help-text-font-size - Font size for the help text.\n * @cssproperty --mdc-help-text-font-weight - Font weight for the help text.\n * @cssproperty --mdc-help-text-line-height - Line height for the help text.\n * @cssproperty --mdc-help-text-color - Color for the help text.\n * @cssproperty --mdc-required-indicator-color - Color for the required indicator text.\n *\n * @csspart label - The label element.\n * @csspart label-text - The container for the label and required indicator elements.\n * @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.\n * @csspart info-icon-btn - The info icon button element that is displayed next to the label when the `toggletip-text` property is set.\n * @csspart label-toggletip - The toggletip element that is displayed when the info icon button is clicked.\n * @csspart help-text - The helper/validation text element.\n * @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.\n * @csspart help-text-container - The container for the helper/validation icon and text elements.\n * @csspart internal-native-input - The internal native input element of the combobox.\n * @csspart input-text - The input element of the combobox.\n * @csspart no-result-text - The no result text element of the combobox.\n * @csspart combobox-base - The base container element of the combobox.\n * @csspart combobox-button - The button element of the combobox.\n * @csspart combobox-button-icon - The icon element of the button of the combobox.\n */",
|
|
13903
|
+
"jsDoc": "/**\n * The Combobox component is a text-based dropdown control that allows users to select an option from a predefined list.\n * Users can type text to filter the options and select their desired choice.\n *\n * When the user starts typing, the filter uses a \"starts with\" search and displays options based on the text entered by the user.\n * If the user entered text that doesn't match with any of the options, then the text in the `no-result-text` attribute will be displayed.\n *\n * If there is no text in the `no-result-text` attribute then nothing will be shown.\n *\n * Combobox is designed to work with `mdc-option` for individual options and `mdc-optgroup` for grouping related options.\n * The component ensures accessibility and usability while handling various use cases, including long text truncation with tooltip support.\n *\n * Every mdc-option should have a `value` attribute set to ensure proper form submission.\n *\n * To set a default option, use the `selected` attribute on the `mdc-option` element.\n *\n * When the combobox `control-type` attribute is \"controlled\", then the value should be set by the parent only, and the combobox will emit `change` and `input` events\n * with the selected option details when the user makes a selection or types in the input, but it won't update the selected value internally.\n * The parent component is expected to listen to these events and update the `value` property of the combobox accordingly to reflect the changes in the UI.\n *\n * **Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-combobox` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.\n *\n * If you need to use `mdc-tooltip` with any options, make sure to place the tooltip component outside the `mdc-selectlistbox` element. Read more about it in Options documentation.\n *\n * To understand more about combobox and its patterns, refer to this [WCAG example](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-list/).\n *\n * @dependency mdc-buttonsimple\n * @dependency mdc-icon\n * @dependency mdc-input\n * @dependency mdc-listitem\n * @dependency mdc-popover\n *\n * @tagname mdc-combobox\n *\n * @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.\n * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.\n * @slot toggletip - Slot for the toggletip info icon button. If not provided, the `toggletip-text` property will be used to render the info icon button and toggletip.\n * @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.\n * @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.\n *\n * @event click - (React: onClick) This event is dispatched when the combobox is clicked.\n * @event change - (React: onChange) This event is dispatched when the combobox is changed.\n * @event input - (React: onInput) This event is dispatched when the combobox is changed.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the combobox.\n * @event focus - (React: onFocus) This event is dispatched when the combobox receives focus.\n *\n * @cssproperty --mdc-combobox-border-color - The border color of the combobox\n * @cssproperty --mdc-combobox-icon-color - The icon color of the combobox\n * @cssproperty --mdc-combobox-listbox-height - The height of the listbox inside the combobox\n * @cssproperty --mdc-combobox-listbox-width - The width of the listbox inside the combobox\n * @cssproperty --mdc-combobox-width - The width of the combobox\n * @cssproperty --mdc-combobox-hover-background-color - The background color of the combobox when hovered\n * @cssproperty --mdc-label-font-size - Font size for the label text.\n * @cssproperty --mdc-label-font-weight - Font weight for the label text.\n * @cssproperty --mdc-label-line-height - Line height for the label text.\n * @cssproperty --mdc-label-color - Color for the label text.\n * @cssproperty --mdc-help-text-font-size - Font size for the help text.\n * @cssproperty --mdc-help-text-font-weight - Font weight for the help text.\n * @cssproperty --mdc-help-text-line-height - Line height for the help text.\n * @cssproperty --mdc-help-text-color - Color for the help text.\n * @cssproperty --mdc-required-indicator-color - Color for the required indicator text.\n *\n * @csspart label - The label element.\n * @csspart label-text - The container for the label and required indicator elements.\n * @csspart required-indicator - The required indicator element that is displayed next to the label when the `required` property is set to true.\n * @csspart info-icon-btn - The info icon button element that is displayed next to the label when the `toggletip-text` property is set.\n * @csspart label-toggletip - The toggletip element that is displayed when the info icon button is clicked.\n * @csspart help-text - The helper/validation text element.\n * @csspart helper-icon - The helper/validation icon element that is displayed next to the helper/validation text.\n * @csspart help-text-container - The container for the helper/validation icon and text elements.\n * @csspart internal-native-input - The internal native input element of the combobox.\n * @csspart input-text - The input element of the combobox.\n * @csspart no-result-text - The no result text element of the combobox.\n * @csspart combobox-base - The base container element of the combobox.\n * @csspart combobox-button - The button element of the combobox.\n * @csspart combobox-button-icon - The icon element of the button of the combobox.\n */",
|
|
13904
13904
|
"customElement": true
|
|
13905
13905
|
}
|
|
13906
13906
|
],
|
|
@@ -18089,6 +18089,15 @@
|
|
|
18089
18089
|
"module": "utils/mixins/FormInternalsMixin.js"
|
|
18090
18090
|
}
|
|
18091
18091
|
},
|
|
18092
|
+
{
|
|
18093
|
+
"kind": "field",
|
|
18094
|
+
"name": "shadowRootOptions",
|
|
18095
|
+
"type": {
|
|
18096
|
+
"text": "object"
|
|
18097
|
+
},
|
|
18098
|
+
"static": true,
|
|
18099
|
+
"default": "{ ...FormfieldWrapper.shadowRootOptions, delegatesFocus: true }"
|
|
18100
|
+
},
|
|
18092
18101
|
{
|
|
18093
18102
|
"kind": "field",
|
|
18094
18103
|
"name": "size",
|
|
@@ -30551,6 +30560,19 @@
|
|
|
30551
30560
|
"module": "utils/mixins/FormInternalsMixin.js"
|
|
30552
30561
|
}
|
|
30553
30562
|
},
|
|
30563
|
+
{
|
|
30564
|
+
"kind": "field",
|
|
30565
|
+
"name": "shadowRootOptions",
|
|
30566
|
+
"type": {
|
|
30567
|
+
"text": "object"
|
|
30568
|
+
},
|
|
30569
|
+
"static": true,
|
|
30570
|
+
"default": "{ ...FormfieldWrapper.shadowRootOptions, delegatesFocus: true }",
|
|
30571
|
+
"inheritedFrom": {
|
|
30572
|
+
"name": "Input",
|
|
30573
|
+
"module": "components/input/input.component.js"
|
|
30574
|
+
}
|
|
30575
|
+
},
|
|
30554
30576
|
{
|
|
30555
30577
|
"kind": "field",
|
|
30556
30578
|
"name": "showButtonAriaLabel",
|
|
@@ -36629,6 +36651,19 @@
|
|
|
36629
36651
|
"module": "utils/mixins/FormInternalsMixin.js"
|
|
36630
36652
|
}
|
|
36631
36653
|
},
|
|
36654
|
+
{
|
|
36655
|
+
"kind": "field",
|
|
36656
|
+
"name": "shadowRootOptions",
|
|
36657
|
+
"type": {
|
|
36658
|
+
"text": "object"
|
|
36659
|
+
},
|
|
36660
|
+
"static": true,
|
|
36661
|
+
"default": "{ ...FormfieldWrapper.shadowRootOptions, delegatesFocus: true }",
|
|
36662
|
+
"inheritedFrom": {
|
|
36663
|
+
"name": "Input",
|
|
36664
|
+
"module": "components/input/input.component.js"
|
|
36665
|
+
}
|
|
36666
|
+
},
|
|
36632
36667
|
{
|
|
36633
36668
|
"kind": "field",
|
|
36634
36669
|
"name": "size",
|
|
@@ -38195,6 +38230,19 @@
|
|
|
38195
38230
|
"module": "utils/mixins/FormInternalsMixin.js"
|
|
38196
38231
|
}
|
|
38197
38232
|
},
|
|
38233
|
+
{
|
|
38234
|
+
"kind": "field",
|
|
38235
|
+
"name": "shadowRootOptions",
|
|
38236
|
+
"type": {
|
|
38237
|
+
"text": "object"
|
|
38238
|
+
},
|
|
38239
|
+
"static": true,
|
|
38240
|
+
"default": "{ ...FormfieldWrapper.shadowRootOptions, delegatesFocus: true }",
|
|
38241
|
+
"inheritedFrom": {
|
|
38242
|
+
"name": "Input",
|
|
38243
|
+
"module": "components/input/input.component.js"
|
|
38244
|
+
}
|
|
38245
|
+
},
|
|
38198
38246
|
{
|
|
38199
38247
|
"kind": "field",
|
|
38200
38248
|
"name": "size",
|
|
@@ -17,6 +17,10 @@ import type { Events } from '../../components/combobox/combobox.types';
|
|
|
17
17
|
*
|
|
18
18
|
* To set a default option, use the `selected` attribute on the `mdc-option` element.
|
|
19
19
|
*
|
|
20
|
+
* When the combobox `control-type` attribute is "controlled", then the value should be set by the parent only, and the combobox will emit `change` and `input` events
|
|
21
|
+
* with the selected option details when the user makes a selection or types in the input, but it won't update the selected value internally.
|
|
22
|
+
* The parent component is expected to listen to these events and update the `value` property of the combobox accordingly to reflect the changes in the UI.
|
|
23
|
+
*
|
|
20
24
|
* **Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-combobox` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.
|
|
21
25
|
*
|
|
22
26
|
* If you need to use `mdc-tooltip` with any options, make sure to place the tooltip component outside the `mdc-selectlistbox` element. Read more about it in Options documentation.
|
|
@@ -18,6 +18,10 @@ import { TAG_NAME } from '../../components/combobox/combobox.constants';
|
|
|
18
18
|
*
|
|
19
19
|
* To set a default option, use the `selected` attribute on the `mdc-option` element.
|
|
20
20
|
*
|
|
21
|
+
* When the combobox `control-type` attribute is "controlled", then the value should be set by the parent only, and the combobox will emit `change` and `input` events
|
|
22
|
+
* with the selected option details when the user makes a selection or types in the input, but it won't update the selected value internally.
|
|
23
|
+
* The parent component is expected to listen to these events and update the `value` property of the combobox accordingly to reflect the changes in the UI.
|
|
24
|
+
*
|
|
21
25
|
* **Note:** Make sure to add `mdc-selectlistbox` as a child of `mdc-combobox` and wrap options/optgroup in it to ensure proper accessibility functionality. Read more about it in SelectListBox documentation.
|
|
22
26
|
*
|
|
23
27
|
* If you need to use `mdc-tooltip` with any options, make sure to place the tooltip component outside the `mdc-selectlistbox` element. Read more about it in Options documentation.
|
package/dist/utils/keys.d.ts
CHANGED
package/dist/utils/keys.js
CHANGED