@momentum-design/components 0.86.0 → 0.87.1

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/index.d.ts CHANGED
@@ -39,6 +39,7 @@ import NavItem from './components/navitem';
39
39
  import NavItemList from './components/navitemlist';
40
40
  import OptGroup from './components/optgroup';
41
41
  import Option from './components/option';
42
+ import Password from './components/password';
42
43
  import Popover from './components/popover';
43
44
  import Presence from './components/presence';
44
45
  import Progressbar from './components/progressbar';
@@ -74,6 +75,6 @@ import type { MenuSectionChangeEvent } from './components/menusection/menusectio
74
75
  import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
75
76
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
76
77
  import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
77
- export { AlertChip, Animation, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, Linksimple, List, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavItem, NavItemList, OptGroup, Option, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SideNavigation, Skeleton, Spinner, StaticCheckbox, StaticRadio, StaticToggle, Tab, TabList, Text, Textarea, ThemeProvider, Toggle, ToggleTip, Tooltip, VirtualizedList, };
78
+ export { AlertChip, Animation, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, Linksimple, List, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavItem, NavItemList, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SideNavigation, Skeleton, Spinner, StaticCheckbox, StaticRadio, StaticToggle, Tab, TabList, Text, Textarea, ThemeProvider, Toggle, ToggleTip, Tooltip, VirtualizedList, };
78
79
  export type { BadgeType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, SkeletonVariant, SpinnerSize, SpinnerVariant, TextType, };
79
- export { inMemoryCache, webAPIIconsCache, BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, SKELETON_VARIANTS, };
80
+ export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIIconsCache, };
package/dist/index.js CHANGED
@@ -41,6 +41,7 @@ import NavItem from './components/navitem';
41
41
  import NavItemList from './components/navitemlist';
42
42
  import OptGroup from './components/optgroup';
43
43
  import Option from './components/option';
44
+ import Password from './components/password';
44
45
  import Popover from './components/popover';
45
46
  import Presence from './components/presence';
46
47
  import Progressbar from './components/progressbar';
@@ -70,6 +71,6 @@ import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
70
71
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, } from './components/button/button.constants';
71
72
  import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
72
73
  // Components Exports
73
- export { AlertChip, Animation, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, Linksimple, List, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavItem, NavItemList, OptGroup, Option, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SideNavigation, Skeleton, Spinner, StaticCheckbox, StaticRadio, StaticToggle, Tab, TabList, Text, Textarea, ThemeProvider, Toggle, ToggleTip, Tooltip, VirtualizedList, };
74
+ export { AlertChip, Animation, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, Linksimple, List, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavItem, NavItemList, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SideNavigation, Skeleton, Spinner, StaticCheckbox, StaticRadio, StaticToggle, Tab, TabList, Text, Textarea, ThemeProvider, Toggle, ToggleTip, Tooltip, VirtualizedList, };
74
75
  // Constants / Utils Exports
75
- export { inMemoryCache, webAPIIconsCache, BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, SKELETON_VARIANTS, };
76
+ export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIIconsCache, };
@@ -17,8 +17,8 @@ export { default as CardRadio } from './cardradio';
17
17
  export { default as Checkbox } from './checkbox';
18
18
  export { default as Chip } from './chip';
19
19
  export { default as Coachmark } from './coachmark';
20
- export { default as Dialog } from './dialog';
21
20
  export { default as Divider } from './divider';
21
+ export { default as Dialog } from './dialog';
22
22
  export { default as FilterChip } from './filterchip';
23
23
  export { default as FormfieldGroup } from './formfieldgroup';
24
24
  export { default as FormfieldWrapper } from './formfieldwrapper';
@@ -32,15 +32,16 @@ export { default as List } from './list';
32
32
  export { default as ListItem } from './listitem';
33
33
  export { default as Marker } from './marker';
34
34
  export { default as MenuBar } from './menubar';
35
+ export { default as MenuItem } from './menuitem';
35
36
  export { default as MenuItemCheckbox } from './menuitemcheckbox';
36
37
  export { default as MenuItemRadio } from './menuitemradio';
37
- export { default as MenuItem } from './menuitem';
38
38
  export { default as MenuPopover } from './menupopover';
39
39
  export { default as MenuSection } from './menusection';
40
40
  export { default as NavItem } from './navitem';
41
41
  export { default as NavItemList } from './navitemlist';
42
42
  export { default as OptGroup } from './optgroup';
43
43
  export { default as Option } from './option';
44
+ export { default as Password } from './password';
44
45
  export { default as Popover } from './popover';
45
46
  export { default as Presence } from './presence';
46
47
  export { default as Progressbar } from './progressbar';
@@ -17,8 +17,8 @@ export { default as CardRadio } from './cardradio';
17
17
  export { default as Checkbox } from './checkbox';
18
18
  export { default as Chip } from './chip';
19
19
  export { default as Coachmark } from './coachmark';
20
- export { default as Dialog } from './dialog';
21
20
  export { default as Divider } from './divider';
21
+ export { default as Dialog } from './dialog';
22
22
  export { default as FilterChip } from './filterchip';
23
23
  export { default as FormfieldGroup } from './formfieldgroup';
24
24
  export { default as FormfieldWrapper } from './formfieldwrapper';
@@ -32,15 +32,16 @@ export { default as List } from './list';
32
32
  export { default as ListItem } from './listitem';
33
33
  export { default as Marker } from './marker';
34
34
  export { default as MenuBar } from './menubar';
35
+ export { default as MenuItem } from './menuitem';
35
36
  export { default as MenuItemCheckbox } from './menuitemcheckbox';
36
37
  export { default as MenuItemRadio } from './menuitemradio';
37
- export { default as MenuItem } from './menuitem';
38
38
  export { default as MenuPopover } from './menupopover';
39
39
  export { default as MenuSection } from './menusection';
40
40
  export { default as NavItem } from './navitem';
41
41
  export { default as NavItemList } from './navitemlist';
42
42
  export { default as OptGroup } from './optgroup';
43
43
  export { default as Option } from './option';
44
+ export { default as Password } from './password';
44
45
  export { default as Popover } from './popover';
45
46
  export { default as Presence } from './presence';
46
47
  export { default as Progressbar } from './progressbar';
@@ -0,0 +1,50 @@
1
+ import { type EventName } from '@lit/react';
2
+ import Component from '../../components/password';
3
+ /**
4
+ * `mdc-password` is a component that allows users to input their password.
5
+ * It extends the `mdc-input` component and provides additional features specific to password fields.
6
+ * It contains:
7
+ * - `label` field - describe the password field.
8
+ * - `password` field - contains the value
9
+ * - `help-text` or `validation-message` - displayed below the password field.
10
+ * - `help-text-type` - type of the help text, can be 'default', 'error', 'warning', 'success', 'priority'.
11
+ * - `show-hide-button-aria-label` - aria label for the trailing show/hide button.
12
+ * - all the attributes of the native password field.
13
+ *
14
+ * @tagname mdc-password
15
+ *
16
+ * @event input - (React: onInput) This event is dispatched when the value of the password field changes (every press).
17
+ * @event change - (React: onChange) This event is dispatched when the value of the password field changes (on blur).
18
+ * @event focus - (React: onFocus) This event is dispatched when the password receives focus.
19
+ * @event blur - (React: onBlur) This event is dispatched when the password loses focus.
20
+ *
21
+ * @dependency mdc-icon
22
+ * @dependency mdc-text
23
+ * @dependency mdc-button
24
+ * @dependency mdc-toggletip
25
+ *
26
+ * @cssproperty --mdc-input-disabled-border-color - Border color for the password container when disabled
27
+ * @cssproperty --mdc-input-disabled-text-color - Text color for the password field when disabled
28
+ * @cssproperty --mdc-input-disabled-background-color - Background color for the password field when disabled
29
+ * @cssproperty --mdc-input-border-color - Border color for the password container
30
+ * @cssproperty --mdc-input-text-color - Text color for the password field
31
+ * @cssproperty --mdc-input-background-color - Background color for the password field
32
+ * @cssproperty --mdc-input-selection-background-color - Background color for the selected text
33
+ * @cssproperty --mdc-input-selection-text-color - Text color for the selected text
34
+ * @cssproperty --mdc-input-support-text-color - Text color for the help text
35
+ * @cssproperty --mdc-input-hover-background-color - Background color for the password field when hovered
36
+ * @cssproperty --mdc-input-focused-background-color - Background color for the password field when focused
37
+ * @cssproperty --mdc-input-focused-border-color - Border color for the password container when focused
38
+ * @cssproperty --mdc-input-error-border-color - Border color for the password container when error
39
+ * @cssproperty --mdc-input-warning-border-color - Border color for the password container when warning
40
+ * @cssproperty --mdc-input-success-border-color - Border color for the password container when success
41
+ * @cssproperty --mdc-input-primary-border-color - Border color for the password container when primary
42
+ *
43
+ */
44
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
45
+ onInput: EventName<InputEvent>;
46
+ onChange: EventName<Event>;
47
+ onFocus: EventName<FocusEvent>;
48
+ onBlur: EventName<FocusEvent>;
49
+ }>;
50
+ export default reactWrapper;
@@ -0,0 +1,58 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/password';
4
+ import { TAG_NAME } from '../../components/password/password.constants';
5
+ /**
6
+ * `mdc-password` is a component that allows users to input their password.
7
+ * It extends the `mdc-input` component and provides additional features specific to password fields.
8
+ * It contains:
9
+ * - `label` field - describe the password field.
10
+ * - `password` field - contains the value
11
+ * - `help-text` or `validation-message` - displayed below the password field.
12
+ * - `help-text-type` - type of the help text, can be 'default', 'error', 'warning', 'success', 'priority'.
13
+ * - `show-hide-button-aria-label` - aria label for the trailing show/hide button.
14
+ * - all the attributes of the native password field.
15
+ *
16
+ * @tagname mdc-password
17
+ *
18
+ * @event input - (React: onInput) This event is dispatched when the value of the password field changes (every press).
19
+ * @event change - (React: onChange) This event is dispatched when the value of the password field changes (on blur).
20
+ * @event focus - (React: onFocus) This event is dispatched when the password receives focus.
21
+ * @event blur - (React: onBlur) This event is dispatched when the password loses focus.
22
+ *
23
+ * @dependency mdc-icon
24
+ * @dependency mdc-text
25
+ * @dependency mdc-button
26
+ * @dependency mdc-toggletip
27
+ *
28
+ * @cssproperty --mdc-input-disabled-border-color - Border color for the password container when disabled
29
+ * @cssproperty --mdc-input-disabled-text-color - Text color for the password field when disabled
30
+ * @cssproperty --mdc-input-disabled-background-color - Background color for the password field when disabled
31
+ * @cssproperty --mdc-input-border-color - Border color for the password container
32
+ * @cssproperty --mdc-input-text-color - Text color for the password field
33
+ * @cssproperty --mdc-input-background-color - Background color for the password field
34
+ * @cssproperty --mdc-input-selection-background-color - Background color for the selected text
35
+ * @cssproperty --mdc-input-selection-text-color - Text color for the selected text
36
+ * @cssproperty --mdc-input-support-text-color - Text color for the help text
37
+ * @cssproperty --mdc-input-hover-background-color - Background color for the password field when hovered
38
+ * @cssproperty --mdc-input-focused-background-color - Background color for the password field when focused
39
+ * @cssproperty --mdc-input-focused-border-color - Border color for the password container when focused
40
+ * @cssproperty --mdc-input-error-border-color - Border color for the password container when error
41
+ * @cssproperty --mdc-input-warning-border-color - Border color for the password container when warning
42
+ * @cssproperty --mdc-input-success-border-color - Border color for the password container when success
43
+ * @cssproperty --mdc-input-primary-border-color - Border color for the password container when primary
44
+ *
45
+ */
46
+ const reactWrapper = createComponent({
47
+ tagName: TAG_NAME,
48
+ elementClass: Component,
49
+ react: React,
50
+ events: {
51
+ onInput: 'input',
52
+ onChange: 'change',
53
+ onFocus: 'focus',
54
+ onBlur: 'blur',
55
+ },
56
+ displayName: 'Password',
57
+ });
58
+ export default reactWrapper;
@@ -6,6 +6,8 @@ import Component from '../../components/select';
6
6
  * The component ensures accessibility and usability while handling various use cases,
7
7
  * including long text truncation with tooltip support.
8
8
  *
9
+ * To set a default option, use the `selected` attribute on the `mdc-option` element.
10
+ *
9
11
  * @dependency mdc-button
10
12
  * @dependency mdc-icon
11
13
  * @dependency mdc-popover
@@ -18,11 +20,13 @@ import Component from '../../components/select';
18
20
  *
19
21
  * @event click - (React: onClick) This event is dispatched when the select is clicked.
20
22
  * @event change - (React: onChange) This event is dispatched when the select is changed.
23
+ * @event input - (React: onInput) This event is dispatched when the select is changed.
21
24
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the select.
22
25
  * @event focus - (React: onFocus) This event is dispatched when the select receives focus.
23
26
  */
24
27
  declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
25
28
  onChange: EventName<Event>;
29
+ onInput: EventName<Event>;
26
30
  onClick: EventName<MouseEvent>;
27
31
  onKeyDown: EventName<KeyboardEvent>;
28
32
  onFocus: EventName<FocusEvent>;
@@ -8,6 +8,8 @@ import { TAG_NAME } from '../../components/select/select.constants';
8
8
  * The component ensures accessibility and usability while handling various use cases,
9
9
  * including long text truncation with tooltip support.
10
10
  *
11
+ * To set a default option, use the `selected` attribute on the `mdc-option` element.
12
+ *
11
13
  * @dependency mdc-button
12
14
  * @dependency mdc-icon
13
15
  * @dependency mdc-popover
@@ -20,6 +22,7 @@ import { TAG_NAME } from '../../components/select/select.constants';
20
22
  *
21
23
  * @event click - (React: onClick) This event is dispatched when the select is clicked.
22
24
  * @event change - (React: onChange) This event is dispatched when the select is changed.
25
+ * @event input - (React: onInput) This event is dispatched when the select is changed.
23
26
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the select.
24
27
  * @event focus - (React: onFocus) This event is dispatched when the select receives focus.
25
28
  */
@@ -29,6 +32,7 @@ const reactWrapper = createComponent({
29
32
  react: React,
30
33
  events: {
31
34
  onChange: 'change',
35
+ onInput: 'input',
32
36
  onClick: 'click',
33
37
  onKeyDown: 'keydown',
34
38
  onFocus: 'focus',
package/package.json CHANGED
@@ -41,5 +41,5 @@
41
41
  "lottie-web": "^5.12.2",
42
42
  "uuid": "^11.0.5"
43
43
  },
44
- "version": "0.86.0"
44
+ "version": "0.87.1"
45
45
  }