@momentum-design/components 0.66.3 → 0.66.4
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/browser/index.js +264 -204
- package/dist/browser/index.js.map +4 -4
- package/dist/components/menuitemcheckbox/index.d.ts +12 -0
- package/dist/components/menuitemcheckbox/index.js +9 -0
- package/dist/components/menuitemcheckbox/menuitemcheckbox.component.d.ts +54 -0
- package/dist/components/menuitemcheckbox/menuitemcheckbox.component.js +137 -0
- package/dist/components/menuitemcheckbox/menuitemcheckbox.constants.d.ts +15 -0
- package/dist/components/menuitemcheckbox/menuitemcheckbox.constants.js +16 -0
- package/dist/components/menuitemcheckbox/menuitemcheckbox.styles.d.ts +2 -0
- package/dist/components/menuitemcheckbox/menuitemcheckbox.styles.js +13 -0
- package/dist/components/menuitemcheckbox/menuitemcheckbox.types.d.ts +10 -0
- package/dist/components/menuitemcheckbox/menuitemcheckbox.types.js +1 -0
- package/dist/components/menuitemradio/index.d.ts +10 -0
- package/dist/components/menuitemradio/index.js +7 -0
- package/dist/components/menuitemradio/menuitemradio.component.d.ts +34 -0
- package/dist/components/menuitemradio/menuitemradio.component.js +70 -0
- package/dist/components/menuitemradio/menuitemradio.constants.d.ts +6 -0
- package/dist/components/menuitemradio/menuitemradio.constants.js +7 -0
- package/dist/components/menuitemradio/menuitemradio.types.d.ts +9 -0
- package/dist/components/menuitemradio/menuitemradio.types.js +1 -0
- package/dist/custom-elements.json +1242 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +2 -0
- package/dist/react/menuitemcheckbox/index.d.ts +42 -0
- package/dist/react/menuitemcheckbox/index.js +50 -0
- package/dist/react/menuitemradio/index.d.ts +30 -0
- package/dist/react/menuitemradio/index.js +38 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -51,6 +51,8 @@ import Tooltip from './components/tooltip';
|
|
51
51
|
import ToggleTip from './components/toggletip';
|
52
52
|
import VirtualizedList from './components/virtualizedlist';
|
53
53
|
import MenuItem from './components/menuitem';
|
54
|
+
import MenuItemRadio from './components/menuitemradio';
|
55
|
+
import MenuItemCheckbox from './components/menuitemcheckbox';
|
54
56
|
import type { BadgeType } from './components/badge/badge.types';
|
55
57
|
import type { ButtonColor, ButtonVariant, IconButtonSize, PillButtonSize } from './components/button/button.types';
|
56
58
|
import type { PopoverPlacement } from './components/popover/popover.types';
|
@@ -58,6 +60,6 @@ import type { SpinnerSize, SpinnerVariant } from './components/spinner/spinner.t
|
|
58
60
|
import type { TextType } from './components/text/text.types';
|
59
61
|
import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
|
60
62
|
import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
|
61
|
-
export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Card, CardButton, CardCheckbox, CardRadio, 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, };
|
63
|
+
export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Card, CardButton, CardCheckbox, CardRadio, 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, MenuItemRadio, MenuItemCheckbox, };
|
62
64
|
export type { TextType, SpinnerSize, SpinnerVariant, PopoverPlacement, BadgeType, IconButtonSize, PillButtonSize, ButtonVariant, ButtonColor, };
|
63
65
|
export { inMemoryCache, webAPIIconsCache, BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES };
|
package/dist/index.js
CHANGED
@@ -52,10 +52,12 @@ import Tooltip from './components/tooltip';
|
|
52
52
|
import ToggleTip from './components/toggletip';
|
53
53
|
import VirtualizedList from './components/virtualizedlist';
|
54
54
|
import MenuItem from './components/menuitem';
|
55
|
+
import MenuItemRadio from './components/menuitemradio';
|
56
|
+
import MenuItemCheckbox from './components/menuitemcheckbox';
|
55
57
|
import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
|
56
58
|
// Constants / Utils Imports
|
57
59
|
import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, } from './components/button/button.constants';
|
58
60
|
// Components Exports
|
59
|
-
export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Card, CardButton, CardCheckbox, CardRadio, 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, };
|
61
|
+
export { AlertChip, Avatar, AvatarButton, Badge, Bullet, Button, Card, CardButton, CardCheckbox, CardRadio, 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, MenuItemRadio, MenuItemCheckbox, };
|
60
62
|
// Constants / Utils Exports
|
61
63
|
export { inMemoryCache, webAPIIconsCache, BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES };
|
package/dist/react/index.d.ts
CHANGED
@@ -29,6 +29,8 @@ export { default as List } from './list';
|
|
29
29
|
export { default as ListItem } from './listitem';
|
30
30
|
export { default as Marker } from './marker';
|
31
31
|
export { default as MenuItem } from './menuitem';
|
32
|
+
export { default as MenuItemCheckbox } from './menuitemcheckbox';
|
33
|
+
export { default as MenuItemRadio } from './menuitemradio';
|
32
34
|
export { default as OptGroup } from './optgroup';
|
33
35
|
export { default as Option } from './option';
|
34
36
|
export { default as Popover } from './popover';
|
package/dist/react/index.js
CHANGED
@@ -29,6 +29,8 @@ export { default as List } from './list';
|
|
29
29
|
export { default as ListItem } from './listitem';
|
30
30
|
export { default as Marker } from './marker';
|
31
31
|
export { default as MenuItem } from './menuitem';
|
32
|
+
export { default as MenuItemCheckbox } from './menuitemcheckbox';
|
33
|
+
export { default as MenuItemRadio } from './menuitemradio';
|
32
34
|
export { default as OptGroup } from './optgroup';
|
33
35
|
export { default as Option } from './option';
|
34
36
|
export { default as Popover } from './popover';
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { type EventName } from '@lit/react';
|
2
|
+
import Component from '../../components/menuitemcheckbox';
|
3
|
+
/**
|
4
|
+
* A menuitemcheckbox component is a checkable menuitem.
|
5
|
+
* There should be no focusable descendants inside this menuitemcheckbox component.
|
6
|
+
*
|
7
|
+
* The `aria-checked` attribute indicates whether the menuitemcheckbox is checked or not.
|
8
|
+
*
|
9
|
+
* The `indicator` attribute is used to differentiate between <b>checkbox</b>, <b>checkmark</b> and <b>toggle</b>.
|
10
|
+
* By default the `indicator` is set to <b>checkbox</b>.<br/>
|
11
|
+
*
|
12
|
+
* The checkbox will always be positioned on the leading side of the menuitem label and
|
13
|
+
* the toggle and checkmark will always be positioned on the trailing side.
|
14
|
+
*
|
15
|
+
* The checkbox will have the possible states of `true` or `false`.
|
16
|
+
* If the indicator is set to <b>checkmark</b> and if the `aria-checked` attribute is set to `true`,
|
17
|
+
* then the checkmark will be displayed. if not, then no indicator will be displayed.
|
18
|
+
*
|
19
|
+
* If you want only one item in a group to be checked, consider using menuitemradio component.
|
20
|
+
*
|
21
|
+
* If a menuitemcheckbox is disabled, then the `aria-disabled` attribute is set to `true`.
|
22
|
+
*
|
23
|
+
* @dependency mdc-staticcheckbox
|
24
|
+
* @dependency mdc-statictoggle
|
25
|
+
* @dependency mdc-icon
|
26
|
+
*
|
27
|
+
* @tagname mdc-menuitemcheckbox
|
28
|
+
*
|
29
|
+
* @cssproperty --mdc-checkmark-indicator-color - Allows customization of the checkmark indicator color
|
30
|
+
*
|
31
|
+
* @event change - (React: onChange) This event is dispatched when the menuitemcheckbox changes.
|
32
|
+
* @event click - (React: onClick) This event is dispatched when the menuitemcheckbox is clicked.
|
33
|
+
* @event focus - (React: onFocus) This event is dispatched when the menuitemcheckbox receives focus.
|
34
|
+
*/
|
35
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
36
|
+
onChange: EventName<Event>;
|
37
|
+
onClick: EventName<MouseEvent>;
|
38
|
+
onFocus: EventName<FocusEvent>;
|
39
|
+
onKeyDown: EventName<KeyboardEvent>;
|
40
|
+
onKeyUp: EventName<KeyboardEvent>;
|
41
|
+
}>;
|
42
|
+
export default reactWrapper;
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/menuitemcheckbox';
|
4
|
+
import { TAG_NAME } from '../../components/menuitemcheckbox/menuitemcheckbox.constants';
|
5
|
+
/**
|
6
|
+
* A menuitemcheckbox component is a checkable menuitem.
|
7
|
+
* There should be no focusable descendants inside this menuitemcheckbox component.
|
8
|
+
*
|
9
|
+
* The `aria-checked` attribute indicates whether the menuitemcheckbox is checked or not.
|
10
|
+
*
|
11
|
+
* The `indicator` attribute is used to differentiate between <b>checkbox</b>, <b>checkmark</b> and <b>toggle</b>.
|
12
|
+
* By default the `indicator` is set to <b>checkbox</b>.<br/>
|
13
|
+
*
|
14
|
+
* The checkbox will always be positioned on the leading side of the menuitem label and
|
15
|
+
* the toggle and checkmark will always be positioned on the trailing side.
|
16
|
+
*
|
17
|
+
* The checkbox will have the possible states of `true` or `false`.
|
18
|
+
* If the indicator is set to <b>checkmark</b> and if the `aria-checked` attribute is set to `true`,
|
19
|
+
* then the checkmark will be displayed. if not, then no indicator will be displayed.
|
20
|
+
*
|
21
|
+
* If you want only one item in a group to be checked, consider using menuitemradio component.
|
22
|
+
*
|
23
|
+
* If a menuitemcheckbox is disabled, then the `aria-disabled` attribute is set to `true`.
|
24
|
+
*
|
25
|
+
* @dependency mdc-staticcheckbox
|
26
|
+
* @dependency mdc-statictoggle
|
27
|
+
* @dependency mdc-icon
|
28
|
+
*
|
29
|
+
* @tagname mdc-menuitemcheckbox
|
30
|
+
*
|
31
|
+
* @cssproperty --mdc-checkmark-indicator-color - Allows customization of the checkmark indicator color
|
32
|
+
*
|
33
|
+
* @event change - (React: onChange) This event is dispatched when the menuitemcheckbox changes.
|
34
|
+
* @event click - (React: onClick) This event is dispatched when the menuitemcheckbox is clicked.
|
35
|
+
* @event focus - (React: onFocus) This event is dispatched when the menuitemcheckbox receives focus.
|
36
|
+
*/
|
37
|
+
const reactWrapper = createComponent({
|
38
|
+
tagName: TAG_NAME,
|
39
|
+
elementClass: Component,
|
40
|
+
react: React,
|
41
|
+
events: {
|
42
|
+
onChange: 'change',
|
43
|
+
onClick: 'click',
|
44
|
+
onFocus: 'focus',
|
45
|
+
onKeyDown: 'keydown',
|
46
|
+
onKeyUp: 'keyup',
|
47
|
+
},
|
48
|
+
displayName: 'MenuItemCheckbox',
|
49
|
+
});
|
50
|
+
export default reactWrapper;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { type EventName } from '@lit/react';
|
2
|
+
import Component from '../../components/menuitemradio';
|
3
|
+
/**
|
4
|
+
* A menuitemradio component is a checkable menuitem that is used in a menu.
|
5
|
+
* A menuitemradio should be checked only one at a time. <br/>
|
6
|
+
* There should be no focusable descendants inside this menuitemradio component.
|
7
|
+
*
|
8
|
+
* The `aria-checked` menuitemradio attribute is used to indicate that the menuitemradio is checked or not.
|
9
|
+
*
|
10
|
+
* If you want more than one item in a group to be checked, consider using menuitemcheckbox component.
|
11
|
+
*
|
12
|
+
* If a menuitemradio is disabled, then the `aria-disabled` attribute is set to `true`.
|
13
|
+
*
|
14
|
+
* @dependency mdc-staticradio
|
15
|
+
* @dependency mdc-text
|
16
|
+
*
|
17
|
+
* @tagname mdc-menuitemradio
|
18
|
+
*
|
19
|
+
* @event change - (React: onChange) This event is dispatched when the menuitemradio changes.
|
20
|
+
* @event click - (React: onClick) This event is dispatched when the menuitemradio is clicked.
|
21
|
+
* @event focus - (React: onFocus) This event is dispatched when the menuitemradio receives focus.
|
22
|
+
*/
|
23
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
24
|
+
onChange: EventName<Event>;
|
25
|
+
onClick: EventName<MouseEvent>;
|
26
|
+
onFocus: EventName<FocusEvent>;
|
27
|
+
onKeyDown: EventName<KeyboardEvent>;
|
28
|
+
onKeyUp: EventName<KeyboardEvent>;
|
29
|
+
}>;
|
30
|
+
export default reactWrapper;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/menuitemradio';
|
4
|
+
import { TAG_NAME } from '../../components/menuitemradio/menuitemradio.constants';
|
5
|
+
/**
|
6
|
+
* A menuitemradio component is a checkable menuitem that is used in a menu.
|
7
|
+
* A menuitemradio should be checked only one at a time. <br/>
|
8
|
+
* There should be no focusable descendants inside this menuitemradio component.
|
9
|
+
*
|
10
|
+
* The `aria-checked` menuitemradio attribute is used to indicate that the menuitemradio is checked or not.
|
11
|
+
*
|
12
|
+
* If you want more than one item in a group to be checked, consider using menuitemcheckbox component.
|
13
|
+
*
|
14
|
+
* If a menuitemradio is disabled, then the `aria-disabled` attribute is set to `true`.
|
15
|
+
*
|
16
|
+
* @dependency mdc-staticradio
|
17
|
+
* @dependency mdc-text
|
18
|
+
*
|
19
|
+
* @tagname mdc-menuitemradio
|
20
|
+
*
|
21
|
+
* @event change - (React: onChange) This event is dispatched when the menuitemradio changes.
|
22
|
+
* @event click - (React: onClick) This event is dispatched when the menuitemradio is clicked.
|
23
|
+
* @event focus - (React: onFocus) This event is dispatched when the menuitemradio receives focus.
|
24
|
+
*/
|
25
|
+
const reactWrapper = createComponent({
|
26
|
+
tagName: TAG_NAME,
|
27
|
+
elementClass: Component,
|
28
|
+
react: React,
|
29
|
+
events: {
|
30
|
+
onChange: 'change',
|
31
|
+
onClick: 'click',
|
32
|
+
onFocus: 'focus',
|
33
|
+
onKeyDown: 'keydown',
|
34
|
+
onKeyUp: 'keyup',
|
35
|
+
},
|
36
|
+
displayName: 'MenuItemRadio',
|
37
|
+
});
|
38
|
+
export default reactWrapper;
|
package/package.json
CHANGED