@momentum-design/components 0.139.8 → 0.140.0

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 (30) hide show
  1. package/dist/browser/index.js +483 -444
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/input/input.component.d.ts +30 -10
  4. package/dist/components/input/input.component.js +5 -0
  5. package/dist/components/input/input.constants.d.ts +12 -1
  6. package/dist/components/input/input.constants.js +12 -1
  7. package/dist/components/input/input.types.d.ts +3 -2
  8. package/dist/components/numberinput/index.d.ts +7 -0
  9. package/dist/components/numberinput/index.js +4 -0
  10. package/dist/components/numberinput/numberinput.component.d.ts +193 -0
  11. package/dist/components/numberinput/numberinput.component.js +330 -0
  12. package/dist/components/numberinput/numberinput.constants.d.ts +15 -0
  13. package/dist/components/numberinput/numberinput.constants.js +17 -0
  14. package/dist/components/numberinput/numberinput.styles.d.ts +2 -0
  15. package/dist/components/numberinput/numberinput.styles.js +27 -0
  16. package/dist/components/numberinput/numberinput.types.d.ts +17 -0
  17. package/dist/components/numberinput/numberinput.types.js +1 -0
  18. package/dist/components/popover/popover.component.js +11 -9
  19. package/dist/custom-elements.json +2189 -250
  20. package/dist/index.d.ts +2 -1
  21. package/dist/index.js +2 -1
  22. package/dist/react/index.d.ts +1 -0
  23. package/dist/react/index.js +1 -0
  24. package/dist/react/input/index.d.ts +24 -8
  25. package/dist/react/numberinput/index.d.ts +90 -0
  26. package/dist/react/numberinput/index.js +65 -0
  27. package/dist/utils/dom.js +3 -0
  28. package/dist/utils/number.d.ts +1 -0
  29. package/dist/utils/number.js +10 -0
  30. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -47,6 +47,7 @@ import MenuItemRadio from './components/menuitemradio';
47
47
  import MenuPopover from './components/menupopover';
48
48
  import MenuSection from './components/menusection';
49
49
  import NavMenuItem from './components/navmenuitem';
50
+ import NumberInput from './components/numberinput';
50
51
  import OptGroup from './components/optgroup';
51
52
  import Option from './components/option';
52
53
  import Password from './components/password';
@@ -123,6 +124,6 @@ import type { TimePickerChangeEvent, TimePickerInputEvent } from './components/t
123
124
  import type { DatePickerChangeEvent, DatePickerInputEvent } from './components/datepicker/datepicker.types';
124
125
  import type { CalendarDateSelectedEvent, CalendarMonthChangedEvent } from './components/calendar/calendar.types';
125
126
  import type { ListBoxChangeEvent } from './components/listbox/listbox.types';
126
- export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, StatusMessage, FocusTrap, CheckboxTree, };
127
+ export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, NumberInput, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, StatusMessage, FocusTrap, CheckboxTree, };
127
128
  export type { AvatarSize, BadgeType, ChipColorType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, PresenceType, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, SliderChangeEvent, StatusMessageSeverity, TextType, TypewriterType, InputInputEvent, InputChangeEvent, InputFocusEvent, InputBlurEvent, InputClearEvent, VirtualizedListScrollEvent, TablistChangeEvent, TextareaInputEvent, TextareaChangeEvent, TextareaFocusEvent, TextareaBlurEvent, TextareaLimitExceededEvent, ToggleOnChangeEvent, CheckboxOnChangeEvent, LinkButtonSize, TimePickerChangeEvent, TimePickerInputEvent, DatePickerChangeEvent, DatePickerInputEvent, CalendarDateSelectedEvent, CalendarMonthChangedEvent, VerticaltablistChangeEvent, ListBoxChangeEvent, };
128
129
  export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
package/dist/index.js CHANGED
@@ -49,6 +49,7 @@ import MenuItemRadio from './components/menuitemradio';
49
49
  import MenuPopover from './components/menupopover';
50
50
  import MenuSection from './components/menusection';
51
51
  import NavMenuItem from './components/navmenuitem';
52
+ import NumberInput from './components/numberinput';
52
53
  import OptGroup from './components/optgroup';
53
54
  import Option from './components/option';
54
55
  import Password from './components/password';
@@ -100,6 +101,6 @@ import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, }
100
101
  import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
101
102
  import { inMemoryCache, webAPIAssetsCache } from './utils/assets-cache';
102
103
  // Components Exports
103
- export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, StatusMessage, FocusTrap, CheckboxTree, };
104
+ export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, NumberInput, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, StatusMessage, FocusTrap, CheckboxTree, };
104
105
  // Constants / Utils Exports
105
106
  export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
@@ -54,6 +54,7 @@ export { default as MenuItemRadio } from './menuitemradio';
54
54
  export { default as MenuPopover } from './menupopover';
55
55
  export { default as MenuSection } from './menusection';
56
56
  export { default as NavMenuItem } from './navmenuitem';
57
+ export { default as NumberInput } from './numberinput';
57
58
  export { default as OptGroup } from './optgroup';
58
59
  export { default as Option } from './option';
59
60
  export { default as Password } from './password';
@@ -54,6 +54,7 @@ export { default as MenuItemRadio } from './menuitemradio';
54
54
  export { default as MenuPopover } from './menupopover';
55
55
  export { default as MenuSection } from './menusection';
56
56
  export { default as NavMenuItem } from './navmenuitem';
57
+ export { default as NumberInput } from './numberinput';
57
58
  export { default as OptGroup } from './optgroup';
58
59
  export { default as Option } from './option';
59
60
  export { default as Password } from './password';
@@ -3,21 +3,37 @@ import Component from '../../components/input';
3
3
  import type { Events } from '../../components/input/input.types';
4
4
  import type { Events as EventsInherited } from '../../utils/mixins/CharacterLimitMixin.ts';
5
5
  /**
6
- * The input is a single-line text field with a label, optional helper or validation text, and an optional trailing clear button. It supports a leading icon, a static prefix text, character counting, and full HTML form integration (the host is form-associated and submits its `value` under `name`).
6
+ * The input is a single-line text field with a label, optional helper or
7
+ * validation text, and an optional trailing clear button. It supports a leading
8
+ * icon, a static prefix text, character counting, and full HTML form integration
9
+ * (the host is form-associated and submits its `value` under `name`).
7
10
  *
8
- * The label, required indicator, and helper text rendering follow the standard form-field layout; an optional info-icon toggletip can be attached next to the label for additional context.
11
+ * The label, required indicator, and helper text rendering follow the standard
12
+ * form-field layout; an optional info-icon toggletip can be attached next to the
13
+ * label for additional context.
9
14
  *
10
15
  * **When to use**
11
16
  *
12
- * - Use `mdc-input` for any short, free-form text entry: names, search terms, single-line addresses, codes, or any value that fits on one line.
13
- * - Use `mdc-input` when the field needs a label, helper/validation text, and form integration without wiring it by hand.
17
+ * - Use `mdc-input` for any short, free-form text entry: names, search terms,
18
+ * single-line addresses, codes, or any value that fits on one line.
19
+ * - Use `mdc-input` when the field needs a label, helper/validation text, and form
20
+ * integration without wiring it by hand.
14
21
  *
15
22
  * **When not to use**
16
23
  *
17
- * - Do not use `mdc-input` for multi-line entry such as messages or comments. Use `mdc-textarea` instead.
18
- * - Do not use `mdc-input` for masked credentials that need a show/hide toggle. Use `mdc-password` instead.
19
- * - Do not use `mdc-input` for search that filters page content. Use `mdc-searchfield` instead.
20
- * - Do not use `mdc-input` when the value must be chosen from a fixed set. Use `mdc-select` or `mdc-combobox` instead.
24
+ * - Do not use `mdc-input` for bounded numeric entry that benefits from stepwise
25
+ * adjustment, such as quantities, counts, or prices. Use `mdc-numberinput`
26
+ * instead. `mdc-input` remains the right choice for numeric-looking values that
27
+ * are really strings — phone numbers, PINs, or account codes — where formatting
28
+ * must be preserved and arithmetic stepping is meaningless.
29
+ * - Do not use `mdc-input` for multi-line entry such as messages or comments. Use
30
+ * `mdc-textarea` instead.
31
+ * - Do not use `mdc-input` for masked credentials that need a show/hide toggle.
32
+ * Use `mdc-password` instead.
33
+ * - Do not use `mdc-input` for search that filters page content. Use
34
+ * `mdc-searchfield` instead.
35
+ * - Do not use `mdc-input` when the value must be chosen from a fixed set. Use
36
+ * `mdc-select` or `mdc-combobox` instead.
21
37
  *
22
38
  * @tagname mdc-input
23
39
  *
@@ -0,0 +1,90 @@
1
+ import { type EventName } from '@lit/react';
2
+ import Component from '../../components/numberinput';
3
+ import type { Events as EventsInherited0 } from '../../components/input/input.types';
4
+ import type { Events as EventsInherited1 } from '../../utils/mixins/CharacterLimitMixin.ts';
5
+ /**
6
+ * The `mdc-numberinput` lets users enter and adjust a single numeric value,
7
+ * pairing a numeric text field with increment and decrement spinner buttons and
8
+ * native range and step validation. It exists for bounded or precise numeric entry
9
+ * — quantities, prices, durations — where users benefit from both direct typing
10
+ * and small stepwise adjustments.
11
+ *
12
+ * **When to use**
13
+ *
14
+ * - Use `mdc-numberinput` to collect a single numeric value that users may want to
15
+ * fine-tune in small increments, such as a quantity, count, or price.
16
+ * - Use `mdc-numberinput` with `min` and `max` to constrain input to a valid
17
+ * range, and `step` to set the amount each spinner button click or arrow-key
18
+ * press changes the value.
19
+ * - Use `mdc-numberinput` `step="any"` to accept decimal values without
20
+ * step-mismatch validation. For values that must follow a fixed increment, such
21
+ * as currency, set a numeric step like `step="0.01"` instead.
22
+ * - Use `mdc-numberinput` `hide-spinner-buttons` when the field should behave as a
23
+ * plain numeric input without visible spinner controls.
24
+ *
25
+ * **When not to use**
26
+ *
27
+ * - Do not use `mdc-numberinput` for identifiers or formatted values such as phone
28
+ * numbers, PINs, or account codes. Use `mdc-input` — these values are strings
29
+ * rather than quantities, and number-field operations can alter their
30
+ * formatting.
31
+ * - Do not use `mdc-numberinput` to choose from a small fixed set of numeric
32
+ * options. Use `mdc-select` or a group of `mdc-radio` controls.
33
+ * - Do not use `mdc-numberinput` for coarse selection across a large range where
34
+ * an exact value is not important. Use `mdc-slider`.
35
+ * - Do not use `mdc-numberinput` for time entry. Use `mdc-timepicker`.
36
+ *
37
+ * @tagname mdc-numberinput
38
+ *
39
+ * @event input - (React: onInput) This event is dispatched when the value of the number field changes (every press).
40
+ * @event change - (React: onChange) This event is dispatched when the value of the number field changes (on blur).
41
+ * @event focus - (React: onFocus) This event is dispatched when the number field receives focus.
42
+ * @event blur - (React: onBlur) This event is dispatched when the number field loses focus.
43
+ * @event clear - (React: onClear) This event is dispatched when the number field is cleared.
44
+ *
45
+ * @dependency mdc-icon
46
+ * @dependency mdc-text
47
+ * @dependency mdc-button
48
+ * @dependency mdc-toggletip
49
+ *
50
+ * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
51
+ * @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.
52
+ * @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
53
+ * @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
54
+ * @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.
55
+ * @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.
56
+ * @slot trailing-button - Slot for the trailing content. If not provided, the increment/decrement spinner buttons are rendered by default; set `hideSpinnerButtons` to true to render the clear button instead (when `trailingButton` is set to true).
57
+ *
58
+ * @csspart input-container - The container that wraps the input field, leading icon, prefix text, and trailing content.
59
+ * @csspart input-section - The container that wraps the input field and prefix text.
60
+ * @csspart input-text - The input field element.
61
+ * @csspart spinner-buttons - The container that wraps the increment and decrement spinner buttons.
62
+ * @csspart spinner-button - Each of the increment/decrement spinner button elements.
63
+ * @csspart label - The label element.
64
+ * @csspart helper-text - The helper/validation text element.
65
+ * @csspart helper-icon - The helper/validation icon element.
66
+ *
67
+ * @cssproperty --mdc-label-font-size - Font size for the label text.
68
+ * @cssproperty --mdc-label-font-weight - Font weight for the label text.
69
+ * @cssproperty --mdc-label-line-height - Line height for the label text.
70
+ * @cssproperty --mdc-label-color - Color for the label text.
71
+ * @cssproperty --mdc-help-text-font-size - Font size for the help text.
72
+ * @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
73
+ * @cssproperty --mdc-help-text-line-height - Line height for the help text.
74
+ * @cssproperty --mdc-help-text-color - Color for the help text.
75
+ * @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
76
+ * @cssproperty --mdc-input-text-color - Text color for the input field
77
+ * @cssproperty --mdc-input-border-color - Border color for the input container
78
+ * @cssproperty --mdc-input-background-color - Background color for the input field
79
+ * @cssproperty --mdc-input-selection-text-color - Text color for the selected text
80
+ * @cssproperty --mdc-input-selection-background-color - Background color for the selected text
81
+ */
82
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
83
+ onInput: EventName<EventsInherited0["onInputEvent"]>;
84
+ onChange: EventName<EventsInherited0["onChangeEvent"]>;
85
+ onFocus: EventName<EventsInherited0["onFocusEvent"]>;
86
+ onBlur: EventName<EventsInherited0["onBlurEvent"]>;
87
+ onClear: EventName<EventsInherited0["onClearEvent"]>;
88
+ onLimitExceeded: EventName<EventsInherited1["onLimitExceededEvent"]>;
89
+ }>;
90
+ export default reactWrapper;
@@ -0,0 +1,65 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/numberinput';
4
+ import { TAG_NAME } from '../../components/numberinput/numberinput.constants';
5
+ /**
6
+ * @tagname mdc-numberinput
7
+ *
8
+ * @event input - (React: onInput) This event is dispatched when the value of the number field changes (every press).
9
+ * @event change - (React: onChange) This event is dispatched when the value of the number field changes (on blur).
10
+ * @event focus - (React: onFocus) This event is dispatched when the number field receives focus.
11
+ * @event blur - (React: onBlur) This event is dispatched when the number field loses focus.
12
+ * @event clear - (React: onClear) This event is dispatched when the number field is cleared.
13
+ *
14
+ * @dependency mdc-icon
15
+ * @dependency mdc-text
16
+ * @dependency mdc-button
17
+ * @dependency mdc-toggletip
18
+ *
19
+ * @slot label - Slot for the label element. If not provided, the `label` property will be used to render the label.
20
+ * @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.
21
+ * @slot help-icon - Slot for the helper/validation icon. If not provided, the icon will be rendered based on the `helpTextType` property.
22
+ * @slot help-text - Slot for the helper/validation text. If not provided, the `helpText` property will be used to render the helper/validation text.
23
+ * @slot input-leading-icon - Slot for the leading icon before the input field. If not provided, the `leadingIcon` property will be used to render the leading icon.
24
+ * @slot input-prefix-text - Slot for the prefix text before the input field. If not provided, the `prefixText` property will be used to render the prefix text.
25
+ * @slot trailing-button - Slot for the trailing content. If not provided, the increment/decrement spinner buttons are rendered by default; set `hideSpinnerButtons` to true to render the clear button instead (when `trailingButton` is set to true).
26
+ *
27
+ * @csspart input-container - The container that wraps the input field, leading icon, prefix text, and trailing content.
28
+ * @csspart input-section - The container that wraps the input field and prefix text.
29
+ * @csspart input-text - The input field element.
30
+ * @csspart spinner-buttons - The container that wraps the increment and decrement spinner buttons.
31
+ * @csspart spinner-button - Each of the increment/decrement spinner button elements.
32
+ * @csspart label - The label element.
33
+ * @csspart helper-text - The helper/validation text element.
34
+ * @csspart helper-icon - The helper/validation icon element.
35
+ *
36
+ * @cssproperty --mdc-label-font-size - Font size for the label text.
37
+ * @cssproperty --mdc-label-font-weight - Font weight for the label text.
38
+ * @cssproperty --mdc-label-line-height - Line height for the label text.
39
+ * @cssproperty --mdc-label-color - Color for the label text.
40
+ * @cssproperty --mdc-help-text-font-size - Font size for the help text.
41
+ * @cssproperty --mdc-help-text-font-weight - Font weight for the help text.
42
+ * @cssproperty --mdc-help-text-line-height - Line height for the help text.
43
+ * @cssproperty --mdc-help-text-color - Color for the help text.
44
+ * @cssproperty --mdc-required-indicator-color - Color for the required indicator text.
45
+ * @cssproperty --mdc-input-text-color - Text color for the input field
46
+ * @cssproperty --mdc-input-border-color - Border color for the input container
47
+ * @cssproperty --mdc-input-background-color - Background color for the input field
48
+ * @cssproperty --mdc-input-selection-text-color - Text color for the selected text
49
+ * @cssproperty --mdc-input-selection-background-color - Background color for the selected text
50
+ */
51
+ const reactWrapper = createComponent({
52
+ tagName: TAG_NAME,
53
+ elementClass: Component,
54
+ react: React,
55
+ events: {
56
+ onInput: 'input',
57
+ onChange: 'change',
58
+ onFocus: 'focus',
59
+ onBlur: 'blur',
60
+ onClear: 'clear',
61
+ onLimitExceeded: 'limitexceeded',
62
+ },
63
+ displayName: 'NumberInput',
64
+ });
65
+ export default reactWrapper;
package/dist/utils/dom.js CHANGED
@@ -183,6 +183,7 @@ export const findFocusable = (root, options = {}) => {
183
183
  const stopAtNonTabbable = (_d = options === null || options === void 0 ? void 0 : options.stopAtNonTabbable) !== null && _d !== void 0 ? _d : false;
184
184
  const matches = new Set([]);
185
185
  const internalFocusableCheck = (element) => {
186
+ var _a;
186
187
  // Excluded
187
188
  if (excludesSet.has(root) || isMatchAny(element, excludeSelectors))
188
189
  return 'stop';
@@ -198,6 +199,8 @@ export const findFocusable = (root, options = {}) => {
198
199
  return 'stop';
199
200
  }
200
201
  }
202
+ if ((_a = element.shadowRoot) === null || _a === void 0 ? void 0 : _a.delegatesFocus)
203
+ return 'continue';
201
204
  return isMatchAny(element, includeSelectors) || (isTabbable(element) && isInteractiveElement(element))
202
205
  ? 'focusable'
203
206
  : 'continue';
@@ -0,0 +1 @@
1
+ export declare function clamp(num: number, min: number | undefined, max: number | undefined): number;
@@ -0,0 +1,10 @@
1
+ export function clamp(num, min, max) {
2
+ let result = num;
3
+ if (min !== undefined) {
4
+ result = Math.max(result, min);
5
+ }
6
+ if (max !== undefined) {
7
+ result = Math.min(result, max);
8
+ }
9
+ return result;
10
+ }
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.139.8",
4
+ "version": "0.140.0",
5
5
  "engines": {
6
6
  "node": ">=24.0.0",
7
7
  "npm": ">=8.0.0"