@momentum-design/components 0.85.10 → 0.87.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 (31) hide show
  1. package/dist/browser/index.js +244 -226
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/input/input.component.d.ts +2 -9
  4. package/dist/components/input/input.component.js +14 -36
  5. package/dist/components/input/input.constants.d.ts +1 -0
  6. package/dist/components/input/input.constants.js +1 -0
  7. package/dist/components/menuitemcheckbox/menuitemcheckbox.component.d.ts +1 -1
  8. package/dist/components/menuitemcheckbox/menuitemcheckbox.component.js +21 -21
  9. package/dist/components/menuitemradio/index.d.ts +1 -0
  10. package/dist/components/menuitemradio/index.js +1 -0
  11. package/dist/components/menuitemradio/menuitemradio.component.d.ts +3 -1
  12. package/dist/components/menuitemradio/menuitemradio.component.js +16 -14
  13. package/dist/components/menusection/menusection.component.js +1 -1
  14. package/dist/components/password/index.d.ts +11 -0
  15. package/dist/components/password/index.js +8 -0
  16. package/dist/components/password/password.component.d.ts +75 -0
  17. package/dist/components/password/password.component.js +128 -0
  18. package/dist/components/password/password.constants.d.ts +5 -0
  19. package/dist/components/password/password.constants.js +6 -0
  20. package/dist/components/password/password.types.d.ts +7 -0
  21. package/dist/components/password/password.types.js +1 -0
  22. package/dist/custom-elements.json +2677 -1426
  23. package/dist/index.d.ts +3 -2
  24. package/dist/index.js +3 -2
  25. package/dist/react/index.d.ts +2 -1
  26. package/dist/react/index.js +2 -1
  27. package/dist/react/menuitemradio/index.d.ts +2 -0
  28. package/dist/react/menuitemradio/index.js +2 -0
  29. package/dist/react/password/index.d.ts +50 -0
  30. package/dist/react/password/index.js +58 -0
  31. package/package.json +1 -1
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, };
@@ -11,9 +11,9 @@ export { default as ButtonGroup } from './buttongroup';
11
11
  export { default as ButtonLink } from './buttonlink';
12
12
  export { default as Buttonsimple } from './buttonsimple';
13
13
  export { default as Card } from './card';
14
- export { default as CardButton } from './cardbutton';
15
14
  export { default as CardCheckbox } from './cardcheckbox';
16
15
  export { default as CardRadio } from './cardradio';
16
+ export { default as CardButton } from './cardbutton';
17
17
  export { default as Checkbox } from './checkbox';
18
18
  export { default as Chip } from './chip';
19
19
  export { default as Coachmark } from './coachmark';
@@ -41,6 +41,7 @@ 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';
@@ -11,9 +11,9 @@ export { default as ButtonGroup } from './buttongroup';
11
11
  export { default as ButtonLink } from './buttonlink';
12
12
  export { default as Buttonsimple } from './buttonsimple';
13
13
  export { default as Card } from './card';
14
- export { default as CardButton } from './cardbutton';
15
14
  export { default as CardCheckbox } from './cardcheckbox';
16
15
  export { default as CardRadio } from './cardradio';
16
+ export { default as CardButton } from './cardbutton';
17
17
  export { default as Checkbox } from './checkbox';
18
18
  export { default as Chip } from './chip';
19
19
  export { default as Coachmark } from './coachmark';
@@ -41,6 +41,7 @@ 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';
@@ -26,8 +26,10 @@ import Component from '../../components/menuitemradio';
26
26
  * For example, you can use a custom icon or a different visual element to indicate the state of the menu item.
27
27
  * Make sure the new indicator is accessible.
28
28
  *
29
+ * @dependency mdc-icon
29
30
  * @dependency mdc-staticradio
30
31
  * @dependency mdc-text
32
+ * @dependency mdc-tooltip
31
33
  *
32
34
  * @tagname mdc-menuitemradio
33
35
  *
@@ -28,8 +28,10 @@ import { TAG_NAME } from '../../components/menuitemradio/menuitemradio.constants
28
28
  * For example, you can use a custom icon or a different visual element to indicate the state of the menu item.
29
29
  * Make sure the new indicator is accessible.
30
30
  *
31
+ * @dependency mdc-icon
31
32
  * @dependency mdc-staticradio
32
33
  * @dependency mdc-text
34
+ * @dependency mdc-tooltip
33
35
  *
34
36
  * @tagname mdc-menuitemradio
35
37
  *
@@ -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;
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.85.10"
44
+ "version": "0.87.0"
45
45
  }