@momentum-design/components 0.62.1 → 0.62.3

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
@@ -46,6 +46,7 @@ import VirtualizedList from './components/virtualizedlist';
46
46
  import TabList from './components/tablist';
47
47
  import ButtonLink from './components/buttonlink';
48
48
  import Linksimple from './components/linksimple';
49
+ import MenuItem from './components/menuitem';
49
50
  import type { BadgeType } from './components/badge/badge.types';
50
51
  import type { ButtonColor, ButtonVariant, IconButtonSize, PillButtonSize } from './components/button/button.types';
51
52
  import type { PopoverPlacement } from './components/popover/popover.types';
@@ -53,6 +54,6 @@ import type { SpinnerSize, SpinnerVariant } from './components/spinner/spinner.t
53
54
  import type { TextType } from './components/text/text.types';
54
55
  import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
55
56
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
56
- export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Chip, Coachmark, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Progressbar, ScreenreaderAnnouncer, StaticCheckbox, StaticRadio, StaticToggle, Textarea, ToggleTip, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, ButtonLink, Linksimple, };
57
+ export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Chip, Coachmark, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Progressbar, ScreenreaderAnnouncer, StaticCheckbox, StaticRadio, StaticToggle, Textarea, ToggleTip, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, ButtonLink, Linksimple, MenuItem, };
57
58
  export type { TextType, SpinnerSize, SpinnerVariant, PopoverPlacement, BadgeType, IconButtonSize, PillButtonSize, ButtonVariant, ButtonColor, };
58
59
  export { inMemoryCache, webAPIIconsCache, BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES };
package/dist/index.js CHANGED
@@ -47,10 +47,11 @@ import VirtualizedList from './components/virtualizedlist';
47
47
  import TabList from './components/tablist';
48
48
  import ButtonLink from './components/buttonlink';
49
49
  import Linksimple from './components/linksimple';
50
+ import MenuItem from './components/menuitem';
50
51
  import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
51
52
  // Constants / Utils Imports
52
53
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, } from './components/button/button.constants';
53
54
  // Components Exports
54
- export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Chip, Coachmark, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Progressbar, ScreenreaderAnnouncer, StaticCheckbox, StaticRadio, StaticToggle, Textarea, ToggleTip, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, ButtonLink, Linksimple, };
55
+ export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Checkbox, Chip, Coachmark, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Input, InputChip, Link, List, ListItem, Marker, Popover, Presence, Radio, RadioGroup, Spinner, Tab, Text, ThemeProvider, Toggle, VirtualizedList, Option, OptGroup, Progressbar, ScreenreaderAnnouncer, StaticCheckbox, StaticRadio, StaticToggle, Textarea, ToggleTip, Tooltip, Searchfield, Brandvisual, Appheader, Select, TabList, Progressspinner, ButtonLink, Linksimple, MenuItem, };
55
56
  // Constants / Utils Exports
56
57
  export { inMemoryCache, webAPIIconsCache, BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES };
@@ -1,6 +1,6 @@
1
1
  export { default as AlertChip } from './alertchip';
2
- export { default as Avatar } from './avatar';
3
2
  export { default as Appheader } from './appheader';
3
+ export { default as Avatar } from './avatar';
4
4
  export { default as AvatarButton } from './avatarbutton';
5
5
  export { default as Badge } from './badge';
6
6
  export { default as Brandvisual } from './brandvisual';
@@ -16,14 +16,15 @@ export { default as FilterChip } from './filterchip';
16
16
  export { default as FormfieldGroup } from './formfieldgroup';
17
17
  export { default as FormfieldWrapper } from './formfieldwrapper';
18
18
  export { default as Icon } from './icon';
19
- export { default as Input } from './input';
20
19
  export { default as IconProvider } from './iconprovider';
21
- export { default as InputChip } from './inputchip';
20
+ export { default as Input } from './input';
22
21
  export { default as Link } from './link';
22
+ export { default as InputChip } from './inputchip';
23
23
  export { default as Linksimple } from './linksimple';
24
24
  export { default as List } from './list';
25
25
  export { default as ListItem } from './listitem';
26
26
  export { default as Marker } from './marker';
27
+ export { default as MenuItem } from './menuitem';
27
28
  export { default as OptGroup } from './optgroup';
28
29
  export { default as Option } from './option';
29
30
  export { default as Popover } from './popover';
@@ -1,6 +1,6 @@
1
1
  export { default as AlertChip } from './alertchip';
2
- export { default as Avatar } from './avatar';
3
2
  export { default as Appheader } from './appheader';
3
+ export { default as Avatar } from './avatar';
4
4
  export { default as AvatarButton } from './avatarbutton';
5
5
  export { default as Badge } from './badge';
6
6
  export { default as Brandvisual } from './brandvisual';
@@ -16,14 +16,15 @@ export { default as FilterChip } from './filterchip';
16
16
  export { default as FormfieldGroup } from './formfieldgroup';
17
17
  export { default as FormfieldWrapper } from './formfieldwrapper';
18
18
  export { default as Icon } from './icon';
19
- export { default as Input } from './input';
20
19
  export { default as IconProvider } from './iconprovider';
21
- export { default as InputChip } from './inputchip';
20
+ export { default as Input } from './input';
22
21
  export { default as Link } from './link';
22
+ export { default as InputChip } from './inputchip';
23
23
  export { default as Linksimple } from './linksimple';
24
24
  export { default as List } from './list';
25
25
  export { default as ListItem } from './listitem';
26
26
  export { default as Marker } from './marker';
27
+ export { default as MenuItem } from './menuitem';
27
28
  export { default as OptGroup } from './optgroup';
28
29
  export { default as Option } from './option';
29
30
  export { default as Popover } from './popover';
@@ -0,0 +1,27 @@
1
+ import { type EventName } from '@lit/react';
2
+ import Component from '../../components/menuitem';
3
+ /**
4
+ * menuitem component is inherited by listitem component with the role set `menuitem`.<br/>
5
+ * A menu item can contain an icon on the leading or trailing side.
6
+ *
7
+ * The leading and trailing slots can be used to display controls and text.<br/>
8
+ * Based on the leading/trailing slot, the position of the controls and text can be adjusted.
9
+ *
10
+ * Please use mdc-menu as a parent element even when there is only menuitem for a11y purpose.
11
+ *
12
+ * @dependency mdc-text
13
+ *
14
+ * @tagname mdc-menuitem
15
+ *
16
+ * @event click - (React: onClick) This event is dispatched when the menuitem is clicked.
17
+ * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the menuitem.
18
+ * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the menuitem.
19
+ * @event focus - (React: onFocus) This event is dispatched when the menuitem receives focus.
20
+ */
21
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
22
+ onClick: EventName<MouseEvent>;
23
+ onKeyDown: EventName<KeyboardEvent>;
24
+ onKeyUp: EventName<KeyboardEvent>;
25
+ onFocus: EventName<FocusEvent>;
26
+ }>;
27
+ export default reactWrapper;
@@ -0,0 +1,35 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/menuitem';
4
+ import { TAG_NAME } from '../../components/menuitem/menuitem.constants';
5
+ /**
6
+ * menuitem component is inherited by listitem component with the role set `menuitem`.<br/>
7
+ * A menu item can contain an icon on the leading or trailing side.
8
+ *
9
+ * The leading and trailing slots can be used to display controls and text.<br/>
10
+ * Based on the leading/trailing slot, the position of the controls and text can be adjusted.
11
+ *
12
+ * Please use mdc-menu as a parent element even when there is only menuitem for a11y purpose.
13
+ *
14
+ * @dependency mdc-text
15
+ *
16
+ * @tagname mdc-menuitem
17
+ *
18
+ * @event click - (React: onClick) This event is dispatched when the menuitem is clicked.
19
+ * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the menuitem.
20
+ * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the menuitem.
21
+ * @event focus - (React: onFocus) This event is dispatched when the menuitem receives focus.
22
+ */
23
+ const reactWrapper = createComponent({
24
+ tagName: TAG_NAME,
25
+ elementClass: Component,
26
+ react: React,
27
+ events: {
28
+ onClick: 'click',
29
+ onKeyDown: 'keydown',
30
+ onKeyUp: 'keyup',
31
+ onFocus: 'focus',
32
+ },
33
+ displayName: 'MenuItem',
34
+ });
35
+ export default reactWrapper;
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.62.1"
42
+ "version": "0.62.3"
43
43
  }