@momentum-design/components 0.117.2 → 0.117.4

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 (111) hide show
  1. package/dist/browser/index.js +208 -192
  2. package/dist/browser/index.js.map +3 -3
  3. package/dist/components/accordionbutton/accordionbutton.constants.d.ts +3 -2
  4. package/dist/components/animation/animation.component.js +1 -1
  5. package/dist/components/badge/badge.component.d.ts +1 -1
  6. package/dist/components/cardcheckbox/cardcheckbox.constants.d.ts +3 -2
  7. package/dist/components/checkbox/checkbox.component.d.ts +6 -1
  8. package/dist/components/checkbox/checkbox.component.js +5 -0
  9. package/dist/components/checkbox/checkbox.constants.d.ts +3 -2
  10. package/dist/components/checkbox/checkbox.styles.js +5 -0
  11. package/dist/components/combobox/combobox.component.d.ts +5 -1
  12. package/dist/components/combobox/combobox.component.js +4 -0
  13. package/dist/components/combobox/combobox.constants.d.ts +3 -2
  14. package/dist/components/dialog/dialog.constants.d.ts +2 -1
  15. package/dist/components/filterchip/filterchip.constants.d.ts +4 -2
  16. package/dist/components/formfieldgroup/formfieldgroup.component.d.ts +4 -0
  17. package/dist/components/formfieldgroup/formfieldgroup.component.js +4 -0
  18. package/dist/components/formfieldwrapper/formfieldwrapper.component.d.ts +10 -6
  19. package/dist/components/formfieldwrapper/formfieldwrapper.component.js +37 -22
  20. package/dist/components/formfieldwrapper/formfieldwrapper.constants.d.ts +3 -1
  21. package/dist/components/formfieldwrapper/formfieldwrapper.constants.js +1 -0
  22. package/dist/components/formfieldwrapper/formfieldwrapper.styles.js +4 -0
  23. package/dist/components/formfieldwrapper/formfieldwrapper.utils.d.ts +1 -1
  24. package/dist/components/input/input.component.d.ts +10 -1
  25. package/dist/components/input/input.component.js +9 -0
  26. package/dist/components/input/input.constants.d.ts +2 -1
  27. package/dist/components/inputchip/inputchip.constants.d.ts +2 -1
  28. package/dist/components/menuitem/menuitem.constants.d.ts +3 -2
  29. package/dist/components/navmenuitem/navmenuitem.constants.d.ts +2 -1
  30. package/dist/components/password/password.constants.d.ts +3 -2
  31. package/dist/components/popover/popover.constants.d.ts +1 -1
  32. package/dist/components/popover/popover.constants.js +1 -1
  33. package/dist/components/presence/presence.utils.d.ts +1 -1
  34. package/dist/components/progressspinner/progressspinner.constants.d.ts +3 -2
  35. package/dist/components/progressspinner/progressspinner.constants.js +2 -2
  36. package/dist/components/radio/radio.component.d.ts +1 -1
  37. package/dist/components/radio/radio.styles.js +3 -0
  38. package/dist/components/searchfield/searchfield.constants.d.ts +2 -1
  39. package/dist/components/select/select.component.d.ts +1 -1
  40. package/dist/components/select/select.constants.d.ts +3 -2
  41. package/dist/components/statictoggle/statictoggle.constants.d.ts +3 -2
  42. package/dist/components/stepperitem/stepperitem.constants.d.ts +4 -3
  43. package/dist/components/textarea/textarea.component.d.ts +1 -1
  44. package/dist/components/textarea/textarea.styles.js +1 -0
  45. package/dist/components/toast/toast.component.js +16 -21
  46. package/dist/components/toast/toast.constants.d.ts +7 -6
  47. package/dist/components/toggle/toggle.component.d.ts +1 -1
  48. package/dist/components/toggle/toggle.constants.d.ts +3 -2
  49. package/dist/components/toggle/toggle.styles.js +5 -0
  50. package/dist/custom-elements.json +4343 -3485
  51. package/dist/react/accordion/index.d.ts +2 -3
  52. package/dist/react/accordionbutton/index.d.ts +2 -3
  53. package/dist/react/alertchip/index.d.ts +5 -4
  54. package/dist/react/animation/index.d.ts +4 -9
  55. package/dist/react/avatarbutton/index.d.ts +5 -4
  56. package/dist/react/brandvisual/index.d.ts +3 -6
  57. package/dist/react/button/index.d.ts +5 -4
  58. package/dist/react/buttonlink/index.d.ts +5 -4
  59. package/dist/react/buttonsimple/index.d.ts +5 -4
  60. package/dist/react/cardbutton/index.d.ts +5 -4
  61. package/dist/react/cardcheckbox/index.d.ts +6 -7
  62. package/dist/react/cardradio/index.d.ts +6 -7
  63. package/dist/react/checkbox/index.d.ts +8 -2
  64. package/dist/react/checkbox/index.js +5 -0
  65. package/dist/react/chip/index.d.ts +5 -4
  66. package/dist/react/coachmark/index.d.ts +5 -12
  67. package/dist/react/combobox/index.d.ts +10 -15
  68. package/dist/react/combobox/index.js +4 -0
  69. package/dist/react/dialog/index.d.ts +6 -15
  70. package/dist/react/filterchip/index.d.ts +5 -4
  71. package/dist/react/formfieldgroup/index.d.ts +4 -0
  72. package/dist/react/formfieldgroup/index.js +4 -0
  73. package/dist/react/formfieldwrapper/index.d.ts +4 -1
  74. package/dist/react/formfieldwrapper/index.js +4 -1
  75. package/dist/react/index.d.ts +4 -4
  76. package/dist/react/index.js +4 -4
  77. package/dist/react/input/index.d.ts +15 -5
  78. package/dist/react/input/index.js +9 -0
  79. package/dist/react/inputchip/index.d.ts +2 -1
  80. package/dist/react/link/index.d.ts +5 -4
  81. package/dist/react/linkbutton/index.d.ts +5 -4
  82. package/dist/react/linksimple/index.d.ts +5 -4
  83. package/dist/react/listbox/index.d.ts +2 -1
  84. package/dist/react/listitem/index.d.ts +9 -8
  85. package/dist/react/menuitem/index.d.ts +9 -8
  86. package/dist/react/menuitemcheckbox/index.d.ts +11 -9
  87. package/dist/react/menuitemradio/index.d.ts +11 -9
  88. package/dist/react/menupopover/index.d.ts +8 -14
  89. package/dist/react/menusection/index.d.ts +3 -2
  90. package/dist/react/navmenuitem/index.d.ts +11 -12
  91. package/dist/react/option/index.d.ts +9 -8
  92. package/dist/react/password/index.d.ts +6 -5
  93. package/dist/react/popover/index.d.ts +5 -12
  94. package/dist/react/radio/index.d.ts +3 -2
  95. package/dist/react/searchfield/index.d.ts +6 -5
  96. package/dist/react/select/index.d.ts +6 -5
  97. package/dist/react/sidenavigation/index.d.ts +3 -11
  98. package/dist/react/slider/index.d.ts +3 -4
  99. package/dist/react/stepperitem/index.d.ts +4 -3
  100. package/dist/react/tab/index.d.ts +7 -8
  101. package/dist/react/tablist/index.d.ts +2 -3
  102. package/dist/react/textarea/index.d.ts +6 -5
  103. package/dist/react/toast/index.d.ts +2 -1
  104. package/dist/react/toggle/index.d.ts +3 -2
  105. package/dist/react/toggletip/index.d.ts +5 -12
  106. package/dist/react/tooltip/index.d.ts +5 -12
  107. package/dist/react/typewriter/index.d.ts +3 -2
  108. package/dist/react/virtualizedlist/index.d.ts +2 -1
  109. package/dist/utils/provider/index.d.ts +2 -4
  110. package/dist/utils/tag-name/index.d.ts +3 -1
  111. package/package.json +1 -1
@@ -5,7 +5,7 @@ import FormfieldWrapper from '../formfieldwrapper/formfieldwrapper.component';
5
5
  import type Option from '../option/option.component';
6
6
  import type { PopoverStrategy } from '../popover/popover.types';
7
7
  import type { Placement } from './select.types';
8
- declare const Select_base: import("../../utils/mixins/index.types").Constructor<import("../../models/component/component.component").default & import("../../utils/mixins/ListNavigationMixin").ListNavigationMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/lifecycle/CaptureDestroyEventForChildElement").CaptureDestroyEventForChildElementInterface> & import("../../utils/mixins/index.types").Constructor<import("../../models/component/component.component").default & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
8
+ declare const Select_base: import("../../utils/mixins/index.types").Constructor<import("../../models").Component & import("../../utils/mixins/ListNavigationMixin").ListNavigationMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/lifecycle/CaptureDestroyEventForChildElement").CaptureDestroyEventForChildElementInterface> & import("../../utils/mixins/index.types").Constructor<import("../../models").Component & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
9
9
  /**
10
10
  * The mdc-select component is a dropdown selection control that allows users to pick an option from a predefined list.
11
11
  * It is designed to work with `mdc-option` for individual options and `mdc-optgroup` for grouping related options.
@@ -1,7 +1,8 @@
1
+ import type { IconNames } from '../icon/icon.types';
1
2
  declare const TAG_NAME: "mdc-select";
2
3
  declare const ARROW_ICON: {
3
- readonly ARROW_UP: "arrow-up-bold";
4
- readonly ARROW_DOWN: "arrow-down-bold";
4
+ readonly ARROW_UP: Extract<IconNames, "arrow-up-bold">;
5
+ readonly ARROW_DOWN: Extract<IconNames, "arrow-down-bold">;
5
6
  };
6
7
  declare const TRIGGER_ID = "select-base-triggerid";
7
8
  declare const LISTBOX_ID = "select-listbox";
@@ -1,11 +1,12 @@
1
+ import type { IconNames } from '../icon/icon.types';
1
2
  declare const TAG_NAME: "mdc-statictoggle";
2
3
  declare const TOGGLE_SIZE: {
3
4
  readonly DEFAULT: "default";
4
5
  readonly COMPACT: "compact";
5
6
  };
6
7
  declare const ICON_NAME: {
7
- readonly CHECKED: "check-bold";
8
- readonly UNCHECKED: "cancel-bold";
8
+ readonly CHECKED: Extract<IconNames, "check-bold">;
9
+ readonly UNCHECKED: Extract<IconNames, "cancel-bold">;
9
10
  };
10
11
  declare const ICON_SIZE_IN_REM: {
11
12
  readonly compact: 0.75;
@@ -1,3 +1,4 @@
1
+ import type { IconNames } from '../icon/icon.types';
1
2
  declare const TAG_NAME: "mdc-stepperitem";
2
3
  declare const VARIANT: {
3
4
  readonly INLINE: "inline";
@@ -11,9 +12,9 @@ declare const STATUS: {
11
12
  readonly NOT_STARTED: "not-started";
12
13
  };
13
14
  declare const STATUS_ICON: {
14
- readonly COMPLETED: "check-bold";
15
- readonly ERROR: "error-legacy-badge-filled";
16
- readonly PENCIL: "edit-bold";
15
+ readonly COMPLETED: Extract<IconNames, "check-bold">;
16
+ readonly ERROR: Extract<IconNames, "error-legacy-badge-filled">;
17
+ readonly PENCIL: Extract<IconNames, "edit-bold">;
17
18
  };
18
19
  declare const DEFAULT: {
19
20
  VARIANT: "inline";
@@ -2,7 +2,7 @@ import { CSSResult, nothing, PropertyValueMap } from 'lit';
2
2
  import FormfieldWrapper from '../formfieldwrapper';
3
3
  import type { AutoCapitalizeType } from '../input/input.types';
4
4
  import type { WrapType, AutoCompleteType } from './textarea.types';
5
- declare const Textarea_base: import("../../utils/mixins/index.types").Constructor<import("../../models/component/component.component").default & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
5
+ declare const Textarea_base: import("../../utils/mixins/index.types").Constructor<import("../../models").Component & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
6
6
  /**
7
7
  * mdc-textarea component, which is used to get the multi-line text input from the user.
8
8
  * It contains:
@@ -51,6 +51,7 @@ const styles = [
51
51
  border: none;
52
52
  outline: none;
53
53
  box-sizing: border-box;
54
+ width: 100%;
54
55
  }
55
56
 
56
57
  :host::part(textarea-container) {
@@ -96,13 +96,16 @@ class Toast extends FooterMixin(Component) {
96
96
  }
97
97
  updateDetailedSlotPresence() {
98
98
  var _a, _b;
99
- this.hasDetailedSlot = (_b = (_a = this.detailedElements) === null || _a === void 0 ? void 0 : _a.some((el) => { var _a; return (_a = el.textContent) === null || _a === void 0 ? void 0 : _a.trim(); })) !== null && _b !== void 0 ? _b : false;
99
+ this.hasDetailedSlot = (_b = (_a = this.detailedElements) === null || _a === void 0 ? void 0 : _a.some(el => { var _a; return (_a = el.textContent) === null || _a === void 0 ? void 0 : _a.trim(); })) !== null && _b !== void 0 ? _b : false;
100
100
  }
101
101
  updateFooterButtonsPresence() {
102
102
  var _a, _b, _c, _d;
103
- this.hasFooterButtons = ((_b = (_a = this.footerButtonPrimary) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0 ||
104
- ((_d = (_c = this.footerButtonSecondary) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0 ||
105
- this.shouldRenderToggleButton() ? 'has-footer-buttons' : '';
103
+ this.hasFooterButtons =
104
+ ((_b = (_a = this.footerButtonPrimary) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0 ||
105
+ ((_d = (_c = this.footerButtonSecondary) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0 ||
106
+ this.shouldRenderToggleButton()
107
+ ? 'has-footer-buttons'
108
+ : '';
106
109
  }
107
110
  firstUpdated(changedProperties) {
108
111
  super.firstUpdated(changedProperties);
@@ -112,11 +115,7 @@ class Toast extends FooterMixin(Component) {
112
115
  if (!iconName)
113
116
  return nothing;
114
117
  return html `
115
- <mdc-icon
116
- name="${iconName}"
117
- size="${DEFAULTS.PREFIX_ICON_SIZE}"
118
- part="toast-prefix-icon"
119
- ></mdc-icon>
118
+ <mdc-icon name="${iconName}" size="${DEFAULTS.PREFIX_ICON_SIZE}" part="toast-prefix-icon"></mdc-icon>
120
119
  `;
121
120
  }
122
121
  shouldRenderToggleButton() {
@@ -139,11 +138,7 @@ class Toast extends FooterMixin(Component) {
139
138
  renderHeader() {
140
139
  return this.headerText
141
140
  ? html `
142
- <mdc-text
143
- part="toast-header"
144
- tagname="${this.headerTagName}"
145
- type="${TYPE.BODY_LARGE_BOLD}"
146
- >
141
+ <mdc-text part="toast-header" tagname="${this.headerTagName}" type="${TYPE.BODY_LARGE_BOLD}">
147
142
  ${this.headerText}
148
143
  </mdc-text>
149
144
  `
@@ -184,13 +179,13 @@ class Toast extends FooterMixin(Component) {
184
179
  </div>
185
180
  </div>
186
181
  <mdc-button
187
- part="toast-close-btn"
188
- prefix-icon="${DEFAULTS.CANCEL_ICON}"
189
- variant="${DEFAULTS.TERTIARY_BUTTON}"
190
- size="${DEFAULTS.CLOSE_ICON_SIZE}"
191
- aria-label="${ifDefined(this.closeButtonAriaLabel)}"
192
- @click="${this.closeToast}"
193
- ></mdc-button>
182
+ part="toast-close-btn"
183
+ prefix-icon="${DEFAULTS.CANCEL_ICON}"
184
+ variant="${DEFAULTS.TERTIARY_BUTTON}"
185
+ size="${DEFAULTS.CLOSE_ICON_SIZE}"
186
+ aria-label="${ifDefined(this.closeButtonAriaLabel)}"
187
+ @click="${this.closeToast}"
188
+ ></mdc-button>
194
189
  </div>
195
190
  ${this.renderFooter()}
196
191
  `;
@@ -1,3 +1,4 @@
1
+ import type { IconNames } from '../icon/icon.types';
1
2
  declare const TAG_NAME: "mdc-toast";
2
3
  declare const TOAST_VARIANT: {
3
4
  readonly CUSTOM: "custom";
@@ -6,15 +7,15 @@ declare const TOAST_VARIANT: {
6
7
  readonly ERROR: "error";
7
8
  };
8
9
  declare const VARIANT_ICON_NAMES: {
9
- readonly SUCCESS_ICON_NAME: "check-circle-bold";
10
- readonly WARNING_ICON_NAME: "warning-bold";
11
- readonly ERROR_ICON_NAME: "error-legacy-bold";
10
+ readonly SUCCESS_ICON_NAME: Extract<IconNames, "check-circle-bold">;
11
+ readonly WARNING_ICON_NAME: Extract<IconNames, "warning-bold">;
12
+ readonly ERROR_ICON_NAME: Extract<IconNames, "error-legacy-bold">;
12
13
  };
13
14
  declare const DEFAULTS: {
14
15
  readonly HEADER_TAG_NAME: "h2";
15
- readonly CANCEL_ICON: "cancel-bold";
16
- readonly ARROW_UP_BOLD: "arrow-up-bold";
17
- readonly ARROW_DOWN_BOLD: "arrow-down-bold";
16
+ readonly CANCEL_ICON: Extract<IconNames, "cancel-bold">;
17
+ readonly ARROW_UP_BOLD: Extract<IconNames, "arrow-up-bold">;
18
+ readonly ARROW_DOWN_BOLD: Extract<IconNames, "arrow-down-bold">;
18
19
  readonly PREFIX_ICON_SIZE: 1.5;
19
20
  readonly CLOSE_ICON_SIZE: 20;
20
21
  readonly BUTTON: "mdc-button";
@@ -2,7 +2,7 @@ import { CSSResult, PropertyValueMap } from 'lit';
2
2
  import { AssociatedFormControl } from '../../utils/mixins/FormInternalsMixin';
3
3
  import FormfieldWrapper from '../formfieldwrapper';
4
4
  import type { ToggleSize } from './toggle.types';
5
- declare const Toggle_base: import("../../utils/mixins/index.types").Constructor<import("../../models/component/component.component").default & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
5
+ declare const Toggle_base: import("../../utils/mixins/index.types").Constructor<import("../../models").Component & import("../../utils/mixins/AutoFocusOnMountMixin").AutoFocusOnMountMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/FormInternalsMixin").FormInternalsMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DataAriaLabelMixin").DataAriaLabelMixinInterface> & typeof FormfieldWrapper;
6
6
  /**
7
7
  * Toggle Component is an interactive control used to switch between two mutually exclusive options,
8
8
  * such as On/Off, Active/Inactive. These are commonly used in settings panels, forms, and preference selections
@@ -1,11 +1,12 @@
1
+ import type { IconNames } from '../icon/icon.types';
1
2
  declare const TAG_NAME: "mdc-toggle";
2
3
  declare const TOGGLE_SIZE: {
3
4
  readonly DEFAULT: "default";
4
5
  readonly COMPACT: "compact";
5
6
  };
6
7
  declare const ICON_NAME: {
7
- readonly CHECKED: "check-bold";
8
- readonly UNCHECKED: "cancel-bold";
8
+ readonly CHECKED: Extract<IconNames, "check-bold">;
9
+ readonly UNCHECKED: Extract<IconNames, "cancel-bold">;
9
10
  };
10
11
  declare const ICON_SIZE_IN_REM: {
11
12
  compact: number;
@@ -59,6 +59,11 @@ const styles = [
59
59
  cursor: pointer;
60
60
  }
61
61
 
62
+ .mdc-label {
63
+ word-break: break-word;
64
+ white-space: normal;
65
+ }
66
+
62
67
  :host([disabled]) .mdc-label,
63
68
  :host([disabled])::part(toggle-input) {
64
69
  cursor: default;