@momentum-design/components 0.66.0 → 0.66.2

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 (34) hide show
  1. package/dist/browser/index.js +203 -196
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/formfieldgroup/formfieldgroup.component.js +1 -1
  4. package/dist/components/formfieldgroup/formfieldgroup.constants.d.ts +1 -5
  5. package/dist/components/formfieldgroup/formfieldgroup.constants.js +1 -5
  6. package/dist/components/list/list.component.d.ts +3 -0
  7. package/dist/components/list/list.component.js +5 -2
  8. package/dist/components/listitem/index.d.ts +1 -0
  9. package/dist/components/listitem/index.js +1 -0
  10. package/dist/components/listitem/listitem.component.d.ts +30 -1
  11. package/dist/components/listitem/listitem.component.js +65 -3
  12. package/dist/components/listitem/listitem.constants.d.ts +4 -1
  13. package/dist/components/listitem/listitem.constants.js +5 -1
  14. package/dist/components/listitem/listitem.styles.js +20 -8
  15. package/dist/components/menuitem/index.d.ts +1 -0
  16. package/dist/components/menuitem/index.js +1 -0
  17. package/dist/components/menuitem/menuitem.component.js +2 -1
  18. package/dist/components/option/option.component.d.ts +3 -14
  19. package/dist/components/option/option.component.js +3 -54
  20. package/dist/components/option/option.constants.d.ts +1 -2
  21. package/dist/components/option/option.constants.js +1 -2
  22. package/dist/components/option/option.styles.js +0 -5
  23. package/dist/components/tooltip/tooltip.component.d.ts +1 -1
  24. package/dist/components/tooltip/tooltip.component.js +7 -6
  25. package/dist/custom-elements.json +749 -504
  26. package/dist/react/index.d.ts +2 -2
  27. package/dist/react/index.js +2 -2
  28. package/dist/react/listitem/index.d.ts +6 -0
  29. package/dist/react/listitem/index.js +6 -0
  30. package/dist/react/option/index.d.ts +2 -0
  31. package/dist/react/option/index.js +2 -0
  32. package/dist/utils/roles.d.ts +17 -0
  33. package/dist/utils/roles.js +16 -0
  34. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  export { default as Appheader } from './appheader';
2
2
  export { default as Avatar } from './avatar';
3
- export { default as AvatarButton } from './avatarbutton';
4
3
  export { default as AlertChip } from './alertchip';
4
+ export { default as AvatarButton } from './avatarbutton';
5
5
  export { default as Badge } from './badge';
6
6
  export { default as Brandvisual } from './brandvisual';
7
7
  export { default as Bullet } from './bullet';
@@ -45,8 +45,8 @@ export { default as StaticCheckbox } from './staticcheckbox';
45
45
  export { default as StaticRadio } from './staticradio';
46
46
  export { default as StaticToggle } from './statictoggle';
47
47
  export { default as Tab } from './tab';
48
- export { default as TabList } from './tablist';
49
48
  export { default as Text } from './text';
49
+ export { default as TabList } from './tablist';
50
50
  export { default as Textarea } from './textarea';
51
51
  export { default as ThemeProvider } from './themeprovider';
52
52
  export { default as Toggle } from './toggle';
@@ -1,7 +1,7 @@
1
1
  export { default as Appheader } from './appheader';
2
2
  export { default as Avatar } from './avatar';
3
- export { default as AvatarButton } from './avatarbutton';
4
3
  export { default as AlertChip } from './alertchip';
4
+ export { default as AvatarButton } from './avatarbutton';
5
5
  export { default as Badge } from './badge';
6
6
  export { default as Brandvisual } from './brandvisual';
7
7
  export { default as Bullet } from './bullet';
@@ -45,8 +45,8 @@ export { default as StaticCheckbox } from './staticcheckbox';
45
45
  export { default as StaticRadio } from './staticradio';
46
46
  export { default as StaticToggle } from './statictoggle';
47
47
  export { default as Tab } from './tab';
48
- export { default as TabList } from './tablist';
49
48
  export { default as Text } from './text';
49
+ export { default as TabList } from './tablist';
50
50
  export { default as Textarea } from './textarea';
51
51
  export { default as ThemeProvider } from './themeprovider';
52
52
  export { default as Toggle } from './toggle';
@@ -11,6 +11,11 @@ import Component from '../../components/listitem';
11
11
  * Based on the leading/trailing slot, the position of the controls and text can be adjusted. <br/>
12
12
  * Please use mdc-list as a parent element even when there is only listitem for a11y purpose.
13
13
  *
14
+ * By providing the tooltip-text attribute, a tooltip will be displayed on hover of the listitem.
15
+ * The placement of the tooltip can be adjusted using the tooltip-placement attribute.
16
+ * This will be helpful when the listitem text is truncated or
17
+ * when you want to display additional information about the listitem.
18
+ *
14
19
  * @tagname mdc-listitem
15
20
  *
16
21
  * @dependency mdc-text
@@ -32,6 +37,7 @@ import Component from '../../components/listitem';
32
37
  * - Allows customization of the secondary and tertiary label text slot color.
33
38
  * @cssproperty --mdc-listitem-disabled-color - Allows customization of the disabled color.
34
39
  * @cssproperty --mdc-listitem-column-gap - Allows customization of column gap.
40
+ * @cssproperty --mdc-listitem-padding-left-and-right - Allows customization of padding left and right.
35
41
  *
36
42
  * @event click - (React: onClick) This event is dispatched when the listitem is clicked.
37
43
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the listitem.
@@ -13,6 +13,11 @@ import { TAG_NAME } from '../../components/listitem/listitem.constants';
13
13
  * Based on the leading/trailing slot, the position of the controls and text can be adjusted. <br/>
14
14
  * Please use mdc-list as a parent element even when there is only listitem for a11y purpose.
15
15
  *
16
+ * By providing the tooltip-text attribute, a tooltip will be displayed on hover of the listitem.
17
+ * The placement of the tooltip can be adjusted using the tooltip-placement attribute.
18
+ * This will be helpful when the listitem text is truncated or
19
+ * when you want to display additional information about the listitem.
20
+ *
16
21
  * @tagname mdc-listitem
17
22
  *
18
23
  * @dependency mdc-text
@@ -34,6 +39,7 @@ import { TAG_NAME } from '../../components/listitem/listitem.constants';
34
39
  * - Allows customization of the secondary and tertiary label text slot color.
35
40
  * @cssproperty --mdc-listitem-disabled-color - Allows customization of the disabled color.
36
41
  * @cssproperty --mdc-listitem-column-gap - Allows customization of column gap.
42
+ * @cssproperty --mdc-listitem-padding-left-and-right - Allows customization of padding left and right.
37
43
  *
38
44
  * @event click - (React: onClick) This event is dispatched when the listitem is clicked.
39
45
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the listitem.
@@ -3,6 +3,8 @@ import Component from '../../components/option';
3
3
  /**
4
4
  * option component, which is used as a list item in a select component.<br/>
5
5
  * We can pass an icon which will be displayed in leading position of the option label text.
6
+ * We can pass a tooltip which will be displayed on hover of the option label text.
7
+ * The tooltip will be helpful for a long label text which is truncated with ellipsis.
6
8
  *
7
9
  * @dependency mdc-icon
8
10
  * @dependency mdc-text
@@ -5,6 +5,8 @@ import { TAG_NAME } from '../../components/option/option.constants';
5
5
  /**
6
6
  * option component, which is used as a list item in a select component.<br/>
7
7
  * We can pass an icon which will be displayed in leading position of the option label text.
8
+ * We can pass a tooltip which will be displayed on hover of the option label text.
9
+ * The tooltip will be helpful for a long label text which is truncated with ellipsis.
8
10
  *
9
11
  * @dependency mdc-icon
10
12
  * @dependency mdc-text
@@ -0,0 +1,17 @@
1
+ import type { ValueOf } from './types';
2
+ declare const ROLE: {
3
+ readonly BUTTON: "button";
4
+ readonly CHECKBOX: "checkbox";
5
+ readonly GROUP: "group";
6
+ readonly LIST: "list";
7
+ readonly LISTITEM: "listitem";
8
+ readonly MENU: "menu";
9
+ readonly MENUBAR: "menubar";
10
+ readonly MENUITEM: "menuitem";
11
+ readonly MENUITEMCHECKBOX: "menuitemcheckbox";
12
+ readonly MENUITEMRADIO: "menuitemradio";
13
+ readonly RADIOGROUP: "radiogroup";
14
+ readonly TOOLTIP: "tooltip";
15
+ };
16
+ type RoleType = ValueOf<typeof ROLE>;
17
+ export { ROLE, RoleType };
@@ -0,0 +1,16 @@
1
+ // When adding a new role in this list, please sort this list.
2
+ const ROLE = {
3
+ BUTTON: 'button',
4
+ CHECKBOX: 'checkbox',
5
+ GROUP: 'group',
6
+ LIST: 'list',
7
+ LISTITEM: 'listitem',
8
+ MENU: 'menu',
9
+ MENUBAR: 'menubar',
10
+ MENUITEM: 'menuitem',
11
+ MENUITEMCHECKBOX: 'menuitemcheckbox',
12
+ MENUITEMRADIO: 'menuitemradio',
13
+ RADIOGROUP: 'radiogroup',
14
+ TOOLTIP: 'tooltip',
15
+ };
16
+ export { ROLE };
package/package.json CHANGED
@@ -39,5 +39,5 @@
39
39
  "lit": "^3.2.0",
40
40
  "uuid": "^11.0.5"
41
41
  },
42
- "version": "0.66.0"
42
+ "version": "0.66.2"
43
43
  }