@momentum-design/components 0.112.6 → 0.112.7

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.
Files changed (29) hide show
  1. package/dist/browser/index.js +619 -388
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/combobox/combobox.component.d.ts +261 -7
  4. package/dist/components/combobox/combobox.component.js +737 -9
  5. package/dist/components/combobox/combobox.constants.d.ts +8 -1
  6. package/dist/components/combobox/combobox.constants.js +8 -1
  7. package/dist/components/combobox/combobox.events.d.ts +27 -0
  8. package/dist/components/combobox/combobox.events.js +35 -0
  9. package/dist/components/combobox/combobox.styles.js +122 -1
  10. package/dist/components/combobox/combobox.types.d.ts +22 -1
  11. package/dist/components/combobox/combobox.types.js +0 -1
  12. package/dist/components/combobox/index.d.ts +5 -0
  13. package/dist/components/combobox/index.js +5 -0
  14. package/dist/components/divider/divider.styles.js +4 -0
  15. package/dist/components/input/input.styles.js +10 -10
  16. package/dist/components/optgroup/optgroup.styles.js +3 -0
  17. package/dist/components/option/option.styles.d.ts +2 -2
  18. package/dist/components/option/option.styles.js +36 -23
  19. package/dist/components/popover/popover.component.d.ts +2 -2
  20. package/dist/components/popover/popover.component.js +1 -1
  21. package/dist/components/popover/popover.constants.d.ts +5 -1
  22. package/dist/components/popover/popover.constants.js +7 -2
  23. package/dist/components/popover/popover.types.d.ts +3 -2
  24. package/dist/custom-elements.json +8370 -7219
  25. package/dist/react/combobox/index.d.ts +71 -4
  26. package/dist/react/combobox/index.js +60 -4
  27. package/dist/react/index.d.ts +6 -6
  28. package/dist/react/index.js +6 -6
  29. package/package.json +1 -1
@@ -1,12 +1,79 @@
1
+ import { type EventName } from '@lit/react';
1
2
  import Component from '../../components/combobox';
2
3
  /**
3
- * combobox component, which ...
4
+ * The Combobox component is a text-based dropdown control that allows users to select an option from a predefined list.
5
+ * Users can type text to filter the options and select their desired choice.
6
+ *
7
+ * When the user starts typing, the filter uses a "starts with" search and displays options based on the text entered by the user.
8
+ * 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.
9
+ *
10
+ * If there is no text in the `no-result-text` attribute then nothing will be shown.
11
+ *
12
+ * Combobox is designed to work with `mdc-option` for individual options and `mdc-optgroup` for grouping related options.
13
+ * The component ensures accessibility and usability while handling various use cases, including long text truncation with tooltip support.
14
+ *
15
+ * Every mdc-option should have a `value` attribute set to ensure proper form submission.
16
+ *
17
+ * To set a default option, use the `selected` attribute on the `mdc-option` element.
18
+ *
19
+ * **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.
20
+ *
21
+ * 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.
22
+ *
23
+ * 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/).
24
+ *
25
+ * @dependency mdc-buttonsimple
26
+ * @dependency mdc-icon
27
+ * @dependency mdc-input
28
+ * @dependency mdc-listitem
29
+ * @dependency mdc-popover
4
30
  *
5
31
  * @tagname mdc-combobox
6
32
  *
7
- * @slot default - This is a default/unnamed slot
33
+ * @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
34
+ *
35
+ * @event click - (React: onClick) This event is dispatched when the combobox is clicked.
36
+ * @event change - (React: onChange) This event is dispatched when the combobox is changed.
37
+ * @event input - (React: onInput) This event is dispatched when the combobox is changed.
38
+ * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the combobox.
39
+ * @event focus - (React: onFocus) This event is dispatched when the combobox receives focus.
40
+ *
41
+ * @cssproperty --mdc-combobox-border-color - The border color of the combobox
42
+ * @cssproperty --mdc-combobox-icon-color - The icon color of the combobox
43
+ * @cssproperty --mdc-combobox-listbox-height - The height of the listbox inside the combobox
44
+ * @cssproperty --mdc-combobox-listbox-width - The width of the listbox inside the combobox
45
+ * @cssproperty --mdc-combobox-width - The width of the combobox
46
+ * @cssproperty --mdc-combobox-hover-background-color - The background color of the combobox when hovered
47
+ * @cssproperty --mdc-combobox-focused-background-color - The background color of the combobox when focused
48
+ * @cssproperty --mdc-combobox-error-border-color - The border color of the combobox when in error state
49
+ * @cssproperty --mdc-combobox-warning-border-color - The border color of the combobox when in warning state
50
+ * @cssproperty --mdc-combobox-success-border-color - The border color of the combobox when in success state
51
+ * @cssproperty --mdc-combobox-primary-border-color - The border color of the combobox when in primary state
52
+ * @cssproperty --mdc-combobox-text-color-disabled - The text color of the combobox when disabled
53
+ * @cssproperty --mdc-combobox-focused-border-color - The border color of the combobox when focused
8
54
  *
9
- * @cssproperty --custom-property-name - Description of the CSS custom property
55
+ * @csspart internal-native-input - The internal native input element of the combobox.
56
+ * @csspart mdc-input - The input element of the combobox.
57
+ * @csspart no-result-text - The no result text element of the combobox.
58
+ * @csspart combobox__base - The base container element of the combobox.
59
+ * @csspart combobox__button - The button element of the combobox.
60
+ * @csspart combobox__button-icon - The icon element of the button of the combobox.
10
61
  */
11
- declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
62
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
63
+ onClick: EventName<import("../../utils/types").OverrideEventTarget<MouseEvent, Component>>;
64
+ onChange: EventName<CustomEvent<{
65
+ value: string;
66
+ label?: string | undefined;
67
+ }> & {
68
+ target: Component;
69
+ }>;
70
+ onInput: EventName<CustomEvent<{
71
+ value: string;
72
+ label?: string | undefined;
73
+ }> & {
74
+ target: Component;
75
+ }>;
76
+ onKeyDown: EventName<import("../../utils/types").OverrideEventTarget<KeyboardEvent, Component>>;
77
+ onFocus: EventName<import("../../utils/types").OverrideEventTarget<FocusEvent, Component>>;
78
+ }>;
12
79
  export default reactWrapper;
@@ -3,19 +3,75 @@ import { createComponent } from '@lit/react';
3
3
  import Component from '../../components/combobox';
4
4
  import { TAG_NAME } from '../../components/combobox/combobox.constants';
5
5
  /**
6
- * combobox component, which ...
6
+ * The Combobox component is a text-based dropdown control that allows users to select an option from a predefined list.
7
+ * Users can type text to filter the options and select their desired choice.
8
+ *
9
+ * When the user starts typing, the filter uses a "starts with" search and displays options based on the text entered by the user.
10
+ * 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.
11
+ *
12
+ * If there is no text in the `no-result-text` attribute then nothing will be shown.
13
+ *
14
+ * Combobox is designed to work with `mdc-option` for individual options and `mdc-optgroup` for grouping related options.
15
+ * The component ensures accessibility and usability while handling various use cases, including long text truncation with tooltip support.
16
+ *
17
+ * Every mdc-option should have a `value` attribute set to ensure proper form submission.
18
+ *
19
+ * To set a default option, use the `selected` attribute on the `mdc-option` element.
20
+ *
21
+ * **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
+ *
23
+ * 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.
24
+ *
25
+ * 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/).
26
+ *
27
+ * @dependency mdc-buttonsimple
28
+ * @dependency mdc-icon
29
+ * @dependency mdc-input
30
+ * @dependency mdc-listitem
31
+ * @dependency mdc-popover
7
32
  *
8
33
  * @tagname mdc-combobox
9
34
  *
10
- * @slot default - This is a default/unnamed slot
35
+ * @slot default - This is a default/unnamed slot for Selectlistbox including options and/or option group.
36
+ *
37
+ * @event click - (React: onClick) This event is dispatched when the combobox is clicked.
38
+ * @event change - (React: onChange) This event is dispatched when the combobox is changed.
39
+ * @event input - (React: onInput) This event is dispatched when the combobox is changed.
40
+ * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the combobox.
41
+ * @event focus - (React: onFocus) This event is dispatched when the combobox receives focus.
42
+ *
43
+ * @cssproperty --mdc-combobox-border-color - The border color of the combobox
44
+ * @cssproperty --mdc-combobox-icon-color - The icon color of the combobox
45
+ * @cssproperty --mdc-combobox-listbox-height - The height of the listbox inside the combobox
46
+ * @cssproperty --mdc-combobox-listbox-width - The width of the listbox inside the combobox
47
+ * @cssproperty --mdc-combobox-width - The width of the combobox
48
+ * @cssproperty --mdc-combobox-hover-background-color - The background color of the combobox when hovered
49
+ * @cssproperty --mdc-combobox-focused-background-color - The background color of the combobox when focused
50
+ * @cssproperty --mdc-combobox-error-border-color - The border color of the combobox when in error state
51
+ * @cssproperty --mdc-combobox-warning-border-color - The border color of the combobox when in warning state
52
+ * @cssproperty --mdc-combobox-success-border-color - The border color of the combobox when in success state
53
+ * @cssproperty --mdc-combobox-primary-border-color - The border color of the combobox when in primary state
54
+ * @cssproperty --mdc-combobox-text-color-disabled - The text color of the combobox when disabled
55
+ * @cssproperty --mdc-combobox-focused-border-color - The border color of the combobox when focused
11
56
  *
12
- * @cssproperty --custom-property-name - Description of the CSS custom property
57
+ * @csspart internal-native-input - The internal native input element of the combobox.
58
+ * @csspart mdc-input - The input element of the combobox.
59
+ * @csspart no-result-text - The no result text element of the combobox.
60
+ * @csspart combobox__base - The base container element of the combobox.
61
+ * @csspart combobox__button - The button element of the combobox.
62
+ * @csspart combobox__button-icon - The icon element of the button of the combobox.
13
63
  */
14
64
  const reactWrapper = createComponent({
15
65
  tagName: TAG_NAME,
16
66
  elementClass: Component,
17
67
  react: React,
18
- events: {},
68
+ events: {
69
+ onClick: 'click',
70
+ onChange: 'change',
71
+ onInput: 'input',
72
+ onKeyDown: 'keydown',
73
+ onFocus: 'focus',
74
+ },
19
75
  displayName: 'Combobox',
20
76
  });
21
77
  export default reactWrapper;
@@ -1,13 +1,13 @@
1
- export { default as AccordionButton } from './accordionbutton';
2
1
  export { default as Accordion } from './accordion';
2
+ export { default as AccordionButton } from './accordionbutton';
3
3
  export { default as AccordionGroup } from './accordiongroup';
4
4
  export { default as AlertChip } from './alertchip';
5
5
  export { default as Animation } from './animation';
6
6
  export { default as Appheader } from './appheader';
7
+ export { default as Avatar } from './avatar';
7
8
  export { default as AvatarButton } from './avatarbutton';
8
9
  export { default as Badge } from './badge';
9
10
  export { default as Brandvisual } from './brandvisual';
10
- export { default as Avatar } from './avatar';
11
11
  export { default as Bullet } from './bullet';
12
12
  export { default as Button } from './button';
13
13
  export { default as ButtonGroup } from './buttongroup';
@@ -47,19 +47,19 @@ export { default as MenuSection } from './menusection';
47
47
  export { default as NavMenuItem } from './navmenuitem';
48
48
  export { default as OptGroup } from './optgroup';
49
49
  export { default as Option } from './option';
50
- export { default as Password } from './password';
51
- export { default as Popover } from './popover';
52
50
  export { default as Presence } from './presence';
53
51
  export { default as Progressbar } from './progressbar';
52
+ export { default as Popover } from './popover';
53
+ export { default as Password } from './password';
54
54
  export { default as Progressspinner } from './progressspinner';
55
55
  export { default as Radio } from './radio';
56
56
  export { default as RadioGroup } from './radiogroup';
57
57
  export { default as ScreenreaderAnnouncer } from './screenreaderannouncer';
58
58
  export { default as Searchfield } from './searchfield';
59
59
  export { default as Select } from './select';
60
- export { default as Selectlistbox } from './selectlistbox';
61
60
  export { default as SideNavigation } from './sidenavigation';
62
61
  export { default as Skeleton } from './skeleton';
62
+ export { default as Selectlistbox } from './selectlistbox';
63
63
  export { default as Slider } from './slider';
64
64
  export { default as Spinner } from './spinner';
65
65
  export { default as StaticCheckbox } from './staticcheckbox';
@@ -75,8 +75,8 @@ export { default as Text } from './text';
75
75
  export { default as Textarea } from './textarea';
76
76
  export { default as ThemeProvider } from './themeprovider';
77
77
  export { default as Toast } from './toast';
78
- export { default as Toggle } from './toggle';
79
78
  export { default as ToggleTip } from './toggletip';
80
79
  export { default as Tooltip } from './tooltip';
81
80
  export { default as Typewriter } from './typewriter';
81
+ export { default as Toggle } from './toggle';
82
82
  export { default as VirtualizedList } from './virtualizedlist';
@@ -1,13 +1,13 @@
1
- export { default as AccordionButton } from './accordionbutton';
2
1
  export { default as Accordion } from './accordion';
2
+ export { default as AccordionButton } from './accordionbutton';
3
3
  export { default as AccordionGroup } from './accordiongroup';
4
4
  export { default as AlertChip } from './alertchip';
5
5
  export { default as Animation } from './animation';
6
6
  export { default as Appheader } from './appheader';
7
+ export { default as Avatar } from './avatar';
7
8
  export { default as AvatarButton } from './avatarbutton';
8
9
  export { default as Badge } from './badge';
9
10
  export { default as Brandvisual } from './brandvisual';
10
- export { default as Avatar } from './avatar';
11
11
  export { default as Bullet } from './bullet';
12
12
  export { default as Button } from './button';
13
13
  export { default as ButtonGroup } from './buttongroup';
@@ -47,19 +47,19 @@ export { default as MenuSection } from './menusection';
47
47
  export { default as NavMenuItem } from './navmenuitem';
48
48
  export { default as OptGroup } from './optgroup';
49
49
  export { default as Option } from './option';
50
- export { default as Password } from './password';
51
- export { default as Popover } from './popover';
52
50
  export { default as Presence } from './presence';
53
51
  export { default as Progressbar } from './progressbar';
52
+ export { default as Popover } from './popover';
53
+ export { default as Password } from './password';
54
54
  export { default as Progressspinner } from './progressspinner';
55
55
  export { default as Radio } from './radio';
56
56
  export { default as RadioGroup } from './radiogroup';
57
57
  export { default as ScreenreaderAnnouncer } from './screenreaderannouncer';
58
58
  export { default as Searchfield } from './searchfield';
59
59
  export { default as Select } from './select';
60
- export { default as Selectlistbox } from './selectlistbox';
61
60
  export { default as SideNavigation } from './sidenavigation';
62
61
  export { default as Skeleton } from './skeleton';
62
+ export { default as Selectlistbox } from './selectlistbox';
63
63
  export { default as Slider } from './slider';
64
64
  export { default as Spinner } from './spinner';
65
65
  export { default as StaticCheckbox } from './staticcheckbox';
@@ -75,8 +75,8 @@ export { default as Text } from './text';
75
75
  export { default as Textarea } from './textarea';
76
76
  export { default as ThemeProvider } from './themeprovider';
77
77
  export { default as Toast } from './toast';
78
- export { default as Toggle } from './toggle';
79
78
  export { default as ToggleTip } from './toggletip';
80
79
  export { default as Tooltip } from './tooltip';
81
80
  export { default as Typewriter } from './typewriter';
81
+ export { default as Toggle } from './toggle';
82
82
  export { default as VirtualizedList } from './virtualizedlist';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.112.6",
4
+ "version": "0.112.7",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"