@momentum-design/components 0.95.7 → 0.96.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.
- package/dist/browser/index.js +597 -327
- package/dist/browser/index.js.map +4 -4
- package/dist/components/buttonsimple/buttonsimple.component.js +5 -4
- package/dist/components/buttonsimple/buttonsimple.constants.d.ts +3 -0
- package/dist/components/buttonsimple/buttonsimple.constants.js +3 -0
- package/dist/components/cardcheckbox/cardcheckbox.component.js +3 -2
- package/dist/components/cardradio/cardradio.component.js +3 -2
- package/dist/components/checkbox/checkbox.component.js +2 -1
- package/dist/components/input/input.component.js +2 -1
- package/dist/components/linkbutton/index.d.ts +8 -0
- package/dist/components/linkbutton/index.js +5 -0
- package/dist/components/linkbutton/linkbutton.component.d.ts +65 -0
- package/dist/components/linkbutton/linkbutton.component.js +111 -0
- package/dist/components/linkbutton/linkbutton.constants.d.ts +13 -0
- package/dist/components/linkbutton/linkbutton.constants.js +16 -0
- package/dist/components/linkbutton/linkbutton.styles.d.ts +2 -0
- package/dist/components/linkbutton/linkbutton.styles.js +66 -0
- package/dist/components/linkbutton/linkbutton.types.d.ts +10 -0
- package/dist/components/linkbutton/linkbutton.types.js +1 -0
- package/dist/components/linkbutton/linkbutton.utils.d.ts +3 -0
- package/dist/components/linkbutton/linkbutton.utils.js +12 -0
- package/dist/components/radio/radio.component.js +3 -2
- package/dist/components/searchfield/searchfield.component.js +3 -2
- package/dist/components/stepperconnector/index.d.ts +7 -0
- package/dist/components/stepperconnector/index.js +4 -0
- package/dist/components/stepperconnector/stepperconnector.component.d.ts +31 -0
- package/dist/components/stepperconnector/stepperconnector.component.js +60 -0
- package/dist/components/stepperconnector/stepperconnector.constants.d.ts +14 -0
- package/dist/components/stepperconnector/stepperconnector.constants.js +15 -0
- package/dist/components/stepperconnector/stepperconnector.styles.d.ts +2 -0
- package/dist/components/stepperconnector/stepperconnector.styles.js +38 -0
- package/dist/components/stepperconnector/stepperconnector.types.d.ts +5 -0
- package/dist/components/stepperconnector/stepperconnector.types.js +1 -0
- package/dist/components/stepperitem/index.d.ts +9 -0
- package/dist/components/stepperitem/index.js +6 -0
- package/dist/components/stepperitem/stepperitem.component.d.ts +107 -0
- package/dist/components/stepperitem/stepperitem.component.js +199 -0
- package/dist/components/stepperitem/stepperitem.constants.d.ts +22 -0
- package/dist/components/stepperitem/stepperitem.constants.js +23 -0
- package/dist/components/stepperitem/stepperitem.styles.d.ts +2 -0
- package/dist/components/stepperitem/stepperitem.styles.js +157 -0
- package/dist/components/stepperitem/stepperitem.types.d.ts +11 -0
- package/dist/components/stepperitem/stepperitem.types.js +1 -0
- package/dist/components/toggle/toggle.component.js +2 -1
- package/dist/custom-elements.json +4582 -3605
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- package/dist/react/index.d.ts +6 -3
- package/dist/react/index.js +6 -3
- package/dist/react/linkbutton/index.d.ts +38 -0
- package/dist/react/linkbutton/index.js +46 -0
- package/dist/react/stepperconnector/index.d.ts +15 -0
- package/dist/react/stepperconnector/index.js +24 -0
- package/dist/react/stepperitem/index.d.ts +40 -0
- package/dist/react/stepperitem/index.js +48 -0
- package/dist/utils/keys.d.ts +12 -12
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -25,6 +25,7 @@ import IconProvider from './components/iconprovider';
|
|
25
25
|
import Input from './components/input';
|
26
26
|
import InputChip from './components/inputchip';
|
27
27
|
import Link from './components/link';
|
28
|
+
import LinkButton from './components/linkbutton';
|
28
29
|
import Linksimple from './components/linksimple';
|
29
30
|
import List from './components/list';
|
30
31
|
import ListItem from './components/listitem';
|
@@ -65,6 +66,8 @@ import Tooltip from './components/tooltip';
|
|
65
66
|
import VirtualizedList from './components/virtualizedlist';
|
66
67
|
import Listheader from './components/listheader';
|
67
68
|
import SelectListbox from './components/selectlistbox';
|
69
|
+
import Stepperitem from './components/stepperitem';
|
70
|
+
import StepperConnector from './components/stepperconnector';
|
68
71
|
import type { BadgeType } from './components/badge/badge.types';
|
69
72
|
import type { ButtonColor, ButtonVariant, IconButtonSize, PillButtonSize } from './components/button/button.types';
|
70
73
|
import type { PopoverPlacement } from './components/popover/popover.types';
|
@@ -77,6 +80,6 @@ import type { MenuSectionChangeEvent } from './components/menusection/menusectio
|
|
77
80
|
import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
|
78
81
|
import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
|
79
82
|
import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
|
80
|
-
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, NavMenuItem, 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, Listheader, SelectListbox, };
|
83
|
+
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, LinkButton, Linksimple, List, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SideNavigation, Skeleton, Spinner, StaticCheckbox, StaticRadio, StaticToggle, Stepperitem, Tab, TabList, Text, Textarea, ThemeProvider, Toggle, ToggleTip, Tooltip, VirtualizedList, Listheader, SelectListbox, StepperConnector, };
|
81
84
|
export type { BadgeType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, TextType, };
|
82
85
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIIconsCache, };
|
package/dist/index.js
CHANGED
@@ -27,6 +27,7 @@ import IconProvider from './components/iconprovider';
|
|
27
27
|
import Input from './components/input';
|
28
28
|
import InputChip from './components/inputchip';
|
29
29
|
import Link from './components/link';
|
30
|
+
import LinkButton from './components/linkbutton';
|
30
31
|
import Linksimple from './components/linksimple';
|
31
32
|
import List from './components/list';
|
32
33
|
import ListItem from './components/listitem';
|
@@ -67,11 +68,13 @@ import Tooltip from './components/tooltip';
|
|
67
68
|
import VirtualizedList from './components/virtualizedlist';
|
68
69
|
import Listheader from './components/listheader';
|
69
70
|
import SelectListbox from './components/selectlistbox';
|
71
|
+
import Stepperitem from './components/stepperitem';
|
72
|
+
import StepperConnector from './components/stepperconnector';
|
70
73
|
// Constants / Utils Imports
|
71
74
|
import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, } from './components/button/button.constants';
|
72
75
|
import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
|
73
76
|
import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
|
74
77
|
// Components Exports
|
75
|
-
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, NavMenuItem, 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, Listheader, SelectListbox, };
|
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, LinkButton, Linksimple, List, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SideNavigation, Skeleton, Spinner, StaticCheckbox, StaticRadio, StaticToggle, Stepperitem, Tab, TabList, Text, Textarea, ThemeProvider, Toggle, ToggleTip, Tooltip, VirtualizedList, Listheader, SelectListbox, StepperConnector, };
|
76
79
|
// Constants / Utils Exports
|
77
80
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIIconsCache, };
|
package/dist/react/index.d.ts
CHANGED
@@ -12,21 +12,22 @@ export { default as ButtonLink } from './buttonlink';
|
|
12
12
|
export { default as Buttonsimple } from './buttonsimple';
|
13
13
|
export { default as Card } from './card';
|
14
14
|
export { default as CardButton } from './cardbutton';
|
15
|
+
export { default as CardCheckbox } from './cardcheckbox';
|
15
16
|
export { default as CardRadio } from './cardradio';
|
16
17
|
export { default as Checkbox } from './checkbox';
|
17
|
-
export { default as CardCheckbox } from './cardcheckbox';
|
18
18
|
export { default as Chip } from './chip';
|
19
|
-
export { default as Coachmark } from './coachmark';
|
20
19
|
export { default as Dialog } from './dialog';
|
21
20
|
export { default as Divider } from './divider';
|
21
|
+
export { default as Coachmark } from './coachmark';
|
22
22
|
export { default as FilterChip } from './filterchip';
|
23
23
|
export { default as FormfieldGroup } from './formfieldgroup';
|
24
|
+
export { default as FormfieldWrapper } from './formfieldwrapper';
|
24
25
|
export { default as Icon } from './icon';
|
25
26
|
export { default as IconProvider } from './iconprovider';
|
26
27
|
export { default as Input } from './input';
|
27
|
-
export { default as FormfieldWrapper } from './formfieldwrapper';
|
28
28
|
export { default as InputChip } from './inputchip';
|
29
29
|
export { default as Link } from './link';
|
30
|
+
export { default as LinkButton } from './linkbutton';
|
30
31
|
export { default as Linksimple } from './linksimple';
|
31
32
|
export { default as List } from './list';
|
32
33
|
export { default as Listheader } from './listheader';
|
@@ -58,6 +59,8 @@ export { default as Spinner } from './spinner';
|
|
58
59
|
export { default as StaticCheckbox } from './staticcheckbox';
|
59
60
|
export { default as StaticRadio } from './staticradio';
|
60
61
|
export { default as StaticToggle } from './statictoggle';
|
62
|
+
export { default as StepperConnector } from './stepperconnector';
|
63
|
+
export { default as StepperItem } from './stepperitem';
|
61
64
|
export { default as Tab } from './tab';
|
62
65
|
export { default as TabList } from './tablist';
|
63
66
|
export { default as Text } from './text';
|
package/dist/react/index.js
CHANGED
@@ -12,21 +12,22 @@ export { default as ButtonLink } from './buttonlink';
|
|
12
12
|
export { default as Buttonsimple } from './buttonsimple';
|
13
13
|
export { default as Card } from './card';
|
14
14
|
export { default as CardButton } from './cardbutton';
|
15
|
+
export { default as CardCheckbox } from './cardcheckbox';
|
15
16
|
export { default as CardRadio } from './cardradio';
|
16
17
|
export { default as Checkbox } from './checkbox';
|
17
|
-
export { default as CardCheckbox } from './cardcheckbox';
|
18
18
|
export { default as Chip } from './chip';
|
19
|
-
export { default as Coachmark } from './coachmark';
|
20
19
|
export { default as Dialog } from './dialog';
|
21
20
|
export { default as Divider } from './divider';
|
21
|
+
export { default as Coachmark } from './coachmark';
|
22
22
|
export { default as FilterChip } from './filterchip';
|
23
23
|
export { default as FormfieldGroup } from './formfieldgroup';
|
24
|
+
export { default as FormfieldWrapper } from './formfieldwrapper';
|
24
25
|
export { default as Icon } from './icon';
|
25
26
|
export { default as IconProvider } from './iconprovider';
|
26
27
|
export { default as Input } from './input';
|
27
|
-
export { default as FormfieldWrapper } from './formfieldwrapper';
|
28
28
|
export { default as InputChip } from './inputchip';
|
29
29
|
export { default as Link } from './link';
|
30
|
+
export { default as LinkButton } from './linkbutton';
|
30
31
|
export { default as Linksimple } from './linksimple';
|
31
32
|
export { default as List } from './list';
|
32
33
|
export { default as Listheader } from './listheader';
|
@@ -58,6 +59,8 @@ export { default as Spinner } from './spinner';
|
|
58
59
|
export { default as StaticCheckbox } from './staticcheckbox';
|
59
60
|
export { default as StaticRadio } from './staticradio';
|
60
61
|
export { default as StaticToggle } from './statictoggle';
|
62
|
+
export { default as StepperConnector } from './stepperconnector';
|
63
|
+
export { default as StepperItem } from './stepperitem';
|
61
64
|
export { default as Tab } from './tab';
|
62
65
|
export { default as TabList } from './tablist';
|
63
66
|
export { default as Text } from './text';
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { type EventName } from '@lit/react';
|
2
|
+
import Component from '../../components/linkbutton';
|
3
|
+
/**
|
4
|
+
* `mdc-linkbutton` visually mimics a hyperlink while functioning as a button. It blends the appearance of `mdc-link` with the accessibility and interaction capabilities of `mdc-button`.
|
5
|
+
*
|
6
|
+
* ### Features:
|
7
|
+
* - Looks like a link, behaves like a button.
|
8
|
+
* - Supports slots for a text label and an optional trailing icon.
|
9
|
+
* - Inherits accessibility and keyboard interaction behavior from `mdc-buttonsimple`.
|
10
|
+
*
|
11
|
+
* @dependency mdc-icon
|
12
|
+
*
|
13
|
+
* @tagname mdc-linkbutton
|
14
|
+
*
|
15
|
+
* @slot - Text label of the linkbutton.
|
16
|
+
*
|
17
|
+
* @event click - (React: onClick) This event is dispatched when the linkbutton is clicked.
|
18
|
+
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the linkbutton.
|
19
|
+
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the linkbutton.
|
20
|
+
* @event focus - (React: onFocus) This event is dispatched when the linkbutton receives focus.
|
21
|
+
*
|
22
|
+
* @cssproperty --mdc-link-border-radius - Border radius of the linkbutton.
|
23
|
+
* @cssproperty --mdc-link-color-active - Color of the linkbutton’s child content in the active state.
|
24
|
+
* @cssproperty --mdc-link-color-disabled - Color of the linkbutton’s child content in the disabled state.
|
25
|
+
* @cssproperty --mdc-link-color-hover - Color of the linkbutton’s child content in the hover state.
|
26
|
+
* @cssproperty --mdc-link-color-normal - Color of the linkbutton’s child content in the normal state.
|
27
|
+
* @cssproperty --mdc-link-inverted-color-active - Color of the inverted linkbutton’s child content in the active state.
|
28
|
+
* @cssproperty --mdc-link-inverted-color-disabled - Color of the inverted linkbutton’s child content in the disabled state.
|
29
|
+
* @cssproperty --mdc-link-inverted-color-hover - Color of the inverted linkbutton’s child content in the hover state.
|
30
|
+
* @cssproperty --mdc-link-inverted-color-normal - Color of the inverted linkbutton’s child content in the normal state.
|
31
|
+
*/
|
32
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
33
|
+
onClick: EventName<MouseEvent>;
|
34
|
+
onKeyDown: EventName<KeyboardEvent>;
|
35
|
+
onKeyUp: EventName<KeyboardEvent>;
|
36
|
+
onFocus: EventName<FocusEvent>;
|
37
|
+
}>;
|
38
|
+
export default reactWrapper;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/linkbutton';
|
4
|
+
import { TAG_NAME } from '../../components/linkbutton/linkbutton.constants';
|
5
|
+
/**
|
6
|
+
* `mdc-linkbutton` visually mimics a hyperlink while functioning as a button. It blends the appearance of `mdc-link` with the accessibility and interaction capabilities of `mdc-button`.
|
7
|
+
*
|
8
|
+
* ### Features:
|
9
|
+
* - Looks like a link, behaves like a button.
|
10
|
+
* - Supports slots for a text label and an optional trailing icon.
|
11
|
+
* - Inherits accessibility and keyboard interaction behavior from `mdc-buttonsimple`.
|
12
|
+
*
|
13
|
+
* @dependency mdc-icon
|
14
|
+
*
|
15
|
+
* @tagname mdc-linkbutton
|
16
|
+
*
|
17
|
+
* @slot - Text label of the linkbutton.
|
18
|
+
*
|
19
|
+
* @event click - (React: onClick) This event is dispatched when the linkbutton is clicked.
|
20
|
+
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the linkbutton.
|
21
|
+
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the linkbutton.
|
22
|
+
* @event focus - (React: onFocus) This event is dispatched when the linkbutton receives focus.
|
23
|
+
*
|
24
|
+
* @cssproperty --mdc-link-border-radius - Border radius of the linkbutton.
|
25
|
+
* @cssproperty --mdc-link-color-active - Color of the linkbutton’s child content in the active state.
|
26
|
+
* @cssproperty --mdc-link-color-disabled - Color of the linkbutton’s child content in the disabled state.
|
27
|
+
* @cssproperty --mdc-link-color-hover - Color of the linkbutton’s child content in the hover state.
|
28
|
+
* @cssproperty --mdc-link-color-normal - Color of the linkbutton’s child content in the normal state.
|
29
|
+
* @cssproperty --mdc-link-inverted-color-active - Color of the inverted linkbutton’s child content in the active state.
|
30
|
+
* @cssproperty --mdc-link-inverted-color-disabled - Color of the inverted linkbutton’s child content in the disabled state.
|
31
|
+
* @cssproperty --mdc-link-inverted-color-hover - Color of the inverted linkbutton’s child content in the hover state.
|
32
|
+
* @cssproperty --mdc-link-inverted-color-normal - Color of the inverted linkbutton’s child content in the normal state.
|
33
|
+
*/
|
34
|
+
const reactWrapper = createComponent({
|
35
|
+
tagName: TAG_NAME,
|
36
|
+
elementClass: Component,
|
37
|
+
react: React,
|
38
|
+
events: {
|
39
|
+
onClick: 'click',
|
40
|
+
onKeyDown: 'keydown',
|
41
|
+
onKeyUp: 'keyup',
|
42
|
+
onFocus: 'focus',
|
43
|
+
},
|
44
|
+
displayName: 'LinkButton',
|
45
|
+
});
|
46
|
+
export default reactWrapper;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import Component from '../../components/stepperconnector';
|
2
|
+
/**
|
3
|
+
* StepperConnector component visually represents the connection between two stepper items.
|
4
|
+
* Indicates whether the connection is complete or incomplete, and supports vertical or horizontal orientation.
|
5
|
+
* They are used between 2 `mdc-stepperitem` components to visually connect them and wrapped in a `mdc-stepper` component.
|
6
|
+
*
|
7
|
+
* @tagname mdc-stepperconnector
|
8
|
+
*
|
9
|
+
* @csspart connector - The main connector line between steps
|
10
|
+
*
|
11
|
+
* @cssproperty --mdc-stepperconnector-complete-background - Background color for the complete connector
|
12
|
+
* @cssproperty --mdc-stepperconnector-incomplete-background - Background color for the incomplete connector
|
13
|
+
*/
|
14
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
15
|
+
export default reactWrapper;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/stepperconnector';
|
4
|
+
import { TAG_NAME } from '../../components/stepperconnector/stepperconnector.constants';
|
5
|
+
/**
|
6
|
+
* StepperConnector component visually represents the connection between two stepper items.
|
7
|
+
* Indicates whether the connection is complete or incomplete, and supports vertical or horizontal orientation.
|
8
|
+
* They are used between 2 `mdc-stepperitem` components to visually connect them and wrapped in a `mdc-stepper` component.
|
9
|
+
*
|
10
|
+
* @tagname mdc-stepperconnector
|
11
|
+
*
|
12
|
+
* @csspart connector - The main connector line between steps
|
13
|
+
*
|
14
|
+
* @cssproperty --mdc-stepperconnector-complete-background - Background color for the complete connector
|
15
|
+
* @cssproperty --mdc-stepperconnector-incomplete-background - Background color for the incomplete connector
|
16
|
+
*/
|
17
|
+
const reactWrapper = createComponent({
|
18
|
+
tagName: TAG_NAME,
|
19
|
+
elementClass: Component,
|
20
|
+
react: React,
|
21
|
+
events: {},
|
22
|
+
displayName: 'StepperConnector',
|
23
|
+
});
|
24
|
+
export default reactWrapper;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { type EventName } from '@lit/react';
|
2
|
+
import Component from '../../components/stepperitem';
|
3
|
+
/**
|
4
|
+
* stepperitem component is used to represent a single step in a stepper component. It is used within a `mdc-stepper` component to indicate the current step in a process.
|
5
|
+
* It can have different statuses such as `completed`, `current`, `incomplete`, `error-current`, and `error-incomplete`.
|
6
|
+
* The component supports various visual styles and can be customized with labels, help text, and step numbers.
|
7
|
+
*
|
8
|
+
* This is an uncontrolled component, meaning it does not manage its own state. Instead, it relies on the consumer's to manage the state of each step.
|
9
|
+
* Make sure to set `aria-current="step"` on the current stepper item. It is applicable only when status is `current` or `error-current`. This ensures accessibility for the stepper component. Only one stepper item should have this attribute at a time.
|
10
|
+
*
|
11
|
+
* @dependency mdc-icon
|
12
|
+
* @dependency mdc-text
|
13
|
+
*
|
14
|
+
* @tagname mdc-stepperitem
|
15
|
+
*
|
16
|
+
* @event click - (React: onClick) This event is dispatched when the stepperitem is clicked.
|
17
|
+
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the stepperitem.
|
18
|
+
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the stepperitem.
|
19
|
+
*
|
20
|
+
* @csspart status-container - The container for the status icon or step number.
|
21
|
+
* @csspart label-container - The container for the label and help text.
|
22
|
+
* @csspart help-text-container - The container for the help text and error icon when applicable.
|
23
|
+
* @csspart status-icon - The icon representing the status of the stepper item.
|
24
|
+
* @csspart step-number - The text representing the step number.
|
25
|
+
* @csspart label - The text representing the label of the stepper item.
|
26
|
+
* @csspart help-text - The text providing additional information about the stepper item.
|
27
|
+
* @csspart help-icon - The icon representing an error in the stepper item.
|
28
|
+
*
|
29
|
+
* @cssproperty --mdc-stepperitem-status-container-background - The background color of the status container.
|
30
|
+
* @cssproperty --mdc-stepperitem-status-container-border-color - The border color of the status container.
|
31
|
+
* @cssproperty --mdc-stepperitem-label-color - The color of the label text.
|
32
|
+
* @cssproperty --mdc-stepperitem-help-text-color - The color of the optional label text.
|
33
|
+
* @cssproperty --mdc-stepperitem-label-container-background - The background color of the label container.
|
34
|
+
*/
|
35
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
36
|
+
onClick: EventName<MouseEvent>;
|
37
|
+
onKeyDown: EventName<KeyboardEvent>;
|
38
|
+
onKeyUp: EventName<KeyboardEvent>;
|
39
|
+
}>;
|
40
|
+
export default reactWrapper;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/stepperitem';
|
4
|
+
import { TAG_NAME } from '../../components/stepperitem/stepperitem.constants';
|
5
|
+
/**
|
6
|
+
* stepperitem component is used to represent a single step in a stepper component. It is used within a `mdc-stepper` component to indicate the current step in a process.
|
7
|
+
* It can have different statuses such as `completed`, `current`, `incomplete`, `error-current`, and `error-incomplete`.
|
8
|
+
* The component supports various visual styles and can be customized with labels, help text, and step numbers.
|
9
|
+
*
|
10
|
+
* This is an uncontrolled component, meaning it does not manage its own state. Instead, it relies on the consumer's to manage the state of each step.
|
11
|
+
* Make sure to set `aria-current="step"` on the current stepper item. It is applicable only when status is `current` or `error-current`. This ensures accessibility for the stepper component. Only one stepper item should have this attribute at a time.
|
12
|
+
*
|
13
|
+
* @dependency mdc-icon
|
14
|
+
* @dependency mdc-text
|
15
|
+
*
|
16
|
+
* @tagname mdc-stepperitem
|
17
|
+
*
|
18
|
+
* @event click - (React: onClick) This event is dispatched when the stepperitem is clicked.
|
19
|
+
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the stepperitem.
|
20
|
+
* @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the stepperitem.
|
21
|
+
*
|
22
|
+
* @csspart status-container - The container for the status icon or step number.
|
23
|
+
* @csspart label-container - The container for the label and help text.
|
24
|
+
* @csspart help-text-container - The container for the help text and error icon when applicable.
|
25
|
+
* @csspart status-icon - The icon representing the status of the stepper item.
|
26
|
+
* @csspart step-number - The text representing the step number.
|
27
|
+
* @csspart label - The text representing the label of the stepper item.
|
28
|
+
* @csspart help-text - The text providing additional information about the stepper item.
|
29
|
+
* @csspart help-icon - The icon representing an error in the stepper item.
|
30
|
+
*
|
31
|
+
* @cssproperty --mdc-stepperitem-status-container-background - The background color of the status container.
|
32
|
+
* @cssproperty --mdc-stepperitem-status-container-border-color - The border color of the status container.
|
33
|
+
* @cssproperty --mdc-stepperitem-label-color - The color of the label text.
|
34
|
+
* @cssproperty --mdc-stepperitem-help-text-color - The color of the optional label text.
|
35
|
+
* @cssproperty --mdc-stepperitem-label-container-background - The background color of the label container.
|
36
|
+
*/
|
37
|
+
const reactWrapper = createComponent({
|
38
|
+
tagName: TAG_NAME,
|
39
|
+
elementClass: Component,
|
40
|
+
react: React,
|
41
|
+
events: {
|
42
|
+
onClick: 'click',
|
43
|
+
onKeyDown: 'keydown',
|
44
|
+
onKeyUp: 'keyup',
|
45
|
+
},
|
46
|
+
displayName: 'StepperItem',
|
47
|
+
});
|
48
|
+
export default reactWrapper;
|
package/dist/utils/keys.d.ts
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
declare const KEYS: {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
2
|
+
ARROW_DOWN: string;
|
3
|
+
ARROW_LEFT: string;
|
4
|
+
ARROW_RIGHT: string;
|
5
|
+
ARROW_UP: string;
|
6
|
+
END: string;
|
7
|
+
ENTER: string;
|
8
|
+
ESCAPE: string;
|
9
|
+
HOME: string;
|
10
|
+
PAGE_DOWN: string;
|
11
|
+
PAGE_UP: string;
|
12
|
+
SPACE: string;
|
13
|
+
TAB: string;
|
14
14
|
};
|
15
15
|
export { KEYS };
|