@momentum-design/components 0.98.0 → 0.99.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 +436 -276
- package/dist/browser/index.js.map +4 -4
- package/dist/components/card/card.component.d.ts +14 -6
- package/dist/components/card/card.component.js +20 -19
- package/dist/components/card/card.styles.js +23 -4
- package/dist/components/cardbutton/cardbutton.component.d.ts +18 -4
- package/dist/components/cardbutton/cardbutton.component.js +18 -4
- package/dist/components/cardcheckbox/cardcheckbox.component.d.ts +18 -0
- package/dist/components/cardcheckbox/cardcheckbox.component.js +18 -0
- package/dist/components/cardradio/cardradio.component.d.ts +18 -0
- package/dist/components/cardradio/cardradio.component.js +18 -0
- package/dist/components/toast/index.d.ts +11 -0
- package/dist/components/toast/index.js +8 -0
- package/dist/components/toast/toast.component.d.ts +101 -0
- package/dist/components/toast/toast.component.js +242 -0
- package/dist/components/toast/toast.constants.d.ts +26 -0
- package/dist/components/toast/toast.constants.js +28 -0
- package/dist/components/toast/toast.styles.d.ts +2 -0
- package/dist/components/toast/toast.styles.js +88 -0
- package/dist/components/toast/toast.types.d.ts +7 -0
- package/dist/components/toast/toast.types.js +1 -0
- package/dist/components/toast/toast.utils.d.ts +3 -0
- package/dist/components/toast/toast.utils.js +14 -0
- package/dist/custom-elements.json +702 -16
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/card/index.d.ts +14 -6
- package/dist/react/card/index.js +14 -6
- package/dist/react/cardbutton/index.d.ts +18 -4
- package/dist/react/cardbutton/index.js +18 -4
- package/dist/react/cardcheckbox/index.d.ts +18 -0
- package/dist/react/cardcheckbox/index.js +18 -0
- package/dist/react/cardradio/index.d.ts +18 -0
- package/dist/react/cardradio/index.js +18 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/react/toast/index.d.ts +45 -0
- package/dist/react/toast/index.js +53 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -55,6 +55,7 @@ import Spinner from './components/spinner';
|
|
55
55
|
import StaticCheckbox from './components/staticcheckbox';
|
56
56
|
import StaticRadio from './components/staticradio';
|
57
57
|
import StaticToggle from './components/statictoggle';
|
58
|
+
import Toast from './components/toast';
|
58
59
|
import Tab from './components/tab';
|
59
60
|
import TabList from './components/tablist';
|
60
61
|
import Text from './components/text';
|
@@ -81,6 +82,6 @@ import type { MenuSectionChangeEvent } from './components/menusection/menusectio
|
|
81
82
|
import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
|
82
83
|
import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
|
83
84
|
import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
|
84
|
-
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, Stepper, };
|
85
|
+
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, Toast, Toggle, ToggleTip, Tooltip, VirtualizedList, Listheader, SelectListbox, StepperConnector, Stepper, };
|
85
86
|
export type { BadgeType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, TextType, };
|
86
87
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIIconsCache, };
|
package/dist/index.js
CHANGED
@@ -57,6 +57,7 @@ import Spinner from './components/spinner';
|
|
57
57
|
import StaticCheckbox from './components/staticcheckbox';
|
58
58
|
import StaticRadio from './components/staticradio';
|
59
59
|
import StaticToggle from './components/statictoggle';
|
60
|
+
import Toast from './components/toast';
|
60
61
|
import Tab from './components/tab';
|
61
62
|
import TabList from './components/tablist';
|
62
63
|
import Text from './components/text';
|
@@ -76,6 +77,6 @@ import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, }
|
|
76
77
|
import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
|
77
78
|
import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
|
78
79
|
// Components Exports
|
79
|
-
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, Stepper, };
|
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, 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, Toast, Toggle, ToggleTip, Tooltip, VirtualizedList, Listheader, SelectListbox, StepperConnector, Stepper, };
|
80
81
|
// Constants / Utils Exports
|
81
82
|
export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIIconsCache, };
|
@@ -10,15 +10,14 @@ import Component from '../../components/card';
|
|
10
10
|
* - Subtitle
|
11
11
|
* - Body
|
12
12
|
*
|
13
|
-
* The card can either be vertically or horizontally oriented.
|
13
|
+
* The card can either be vertically or horizontally oriented. The vertical card has a min-width of 20rem and the horizontal card has a min-width of 40rem.
|
14
14
|
*
|
15
15
|
* There are 2 variants for the card that represent the border styling - 'border' and 'ghost'.
|
16
16
|
*
|
17
17
|
* To make this card interactive, use the following slots:
|
18
18
|
* - `icon-button`: This slot supports action icon buttons in the header section (maximum of 3 buttons).
|
19
19
|
* - `footer-link`: This slot is for passing `mdc-link` component within the footer section.
|
20
|
-
* - `footer-button-primary`: This slot is for passing primary variant of
|
21
|
-
* `mdc-button` component within the footer section.
|
20
|
+
* - `footer-button-primary`: This slot is for passing primary variant of `mdc-button` component within the footer section.
|
22
21
|
* - `footer-button-secondary`: This slot is for passing secondary variant of `mdc-button` component
|
23
22
|
* within the footer section.
|
24
23
|
*
|
@@ -35,14 +34,23 @@ import Component from '../../components/card';
|
|
35
34
|
* @slot footer - This slot is for passing custom footer content. Only use this if really needed,
|
36
35
|
* using the footer-link and footer-button slots is preferred.
|
37
36
|
*
|
37
|
+
* @csspart header - The header part of the card
|
38
|
+
* @csspart icon - The icon part of the card header
|
39
|
+
* @csspart body - The body part of the card
|
40
|
+
* @csspart image - The image part of the card
|
41
|
+
* @csspart footer - The footer part of the card
|
42
|
+
* @csspart footer-link - The link part of the card footer
|
43
|
+
* @csspart footer-button-primary - The primary button part of the card footer
|
44
|
+
* @csspart footer-button-secondary - The secondary button part of the card footer
|
45
|
+
* @csspart icon-button - The icon button part of the card header
|
46
|
+
* @csspart text - The text part of the card
|
47
|
+
*
|
38
48
|
* @tagname mdc-card
|
39
49
|
*
|
40
50
|
* @dependency mdc-icon
|
41
51
|
* @dependency mdc-text
|
42
52
|
*
|
43
|
-
* @
|
44
|
-
* @slot body - This slot is for passing the text content for the card
|
45
|
-
* @slot after-body - This slot is for passing the content after the body
|
53
|
+
* @cssproperty --mdc-card-width - The width of the card
|
46
54
|
*
|
47
55
|
*/
|
48
56
|
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
package/dist/react/card/index.js
CHANGED
@@ -13,15 +13,14 @@ import { TAG_NAME } from '../../components/card/card.constants';
|
|
13
13
|
* - Subtitle
|
14
14
|
* - Body
|
15
15
|
*
|
16
|
-
* The card can either be vertically or horizontally oriented.
|
16
|
+
* The card can either be vertically or horizontally oriented. The vertical card has a min-width of 20rem and the horizontal card has a min-width of 40rem.
|
17
17
|
*
|
18
18
|
* There are 2 variants for the card that represent the border styling - 'border' and 'ghost'.
|
19
19
|
*
|
20
20
|
* To make this card interactive, use the following slots:
|
21
21
|
* - `icon-button`: This slot supports action icon buttons in the header section (maximum of 3 buttons).
|
22
22
|
* - `footer-link`: This slot is for passing `mdc-link` component within the footer section.
|
23
|
-
* - `footer-button-primary`: This slot is for passing primary variant of
|
24
|
-
* `mdc-button` component within the footer section.
|
23
|
+
* - `footer-button-primary`: This slot is for passing primary variant of `mdc-button` component within the footer section.
|
25
24
|
* - `footer-button-secondary`: This slot is for passing secondary variant of `mdc-button` component
|
26
25
|
* within the footer section.
|
27
26
|
*
|
@@ -38,14 +37,23 @@ import { TAG_NAME } from '../../components/card/card.constants';
|
|
38
37
|
* @slot footer - This slot is for passing custom footer content. Only use this if really needed,
|
39
38
|
* using the footer-link and footer-button slots is preferred.
|
40
39
|
*
|
40
|
+
* @csspart header - The header part of the card
|
41
|
+
* @csspart icon - The icon part of the card header
|
42
|
+
* @csspart body - The body part of the card
|
43
|
+
* @csspart image - The image part of the card
|
44
|
+
* @csspart footer - The footer part of the card
|
45
|
+
* @csspart footer-link - The link part of the card footer
|
46
|
+
* @csspart footer-button-primary - The primary button part of the card footer
|
47
|
+
* @csspart footer-button-secondary - The secondary button part of the card footer
|
48
|
+
* @csspart icon-button - The icon button part of the card header
|
49
|
+
* @csspart text - The text part of the card
|
50
|
+
*
|
41
51
|
* @tagname mdc-card
|
42
52
|
*
|
43
53
|
* @dependency mdc-icon
|
44
54
|
* @dependency mdc-text
|
45
55
|
*
|
46
|
-
* @
|
47
|
-
* @slot body - This slot is for passing the text content for the card
|
48
|
-
* @slot after-body - This slot is for passing the content after the body
|
56
|
+
* @cssproperty --mdc-card-width - The width of the card
|
49
57
|
*
|
50
58
|
*/
|
51
59
|
const reactWrapper = createComponent({
|
@@ -11,10 +11,6 @@ import Component from '../../components/cardbutton';
|
|
11
11
|
* @dependency mdc-icon
|
12
12
|
* @dependency mdc-text
|
13
13
|
*
|
14
|
-
* @slot before-body - This slot is for passing the content before the body
|
15
|
-
* @slot body - This slot is for passing the text content for the card
|
16
|
-
* @slot after-body - This slot is for passing the content after the body
|
17
|
-
*
|
18
14
|
* @event click - (React: onClick) Event that gets dispatched when the card is clicked.
|
19
15
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the card.
|
20
16
|
* It fires the click event when enter key is used.
|
@@ -22,6 +18,24 @@ import Component from '../../components/cardbutton';
|
|
22
18
|
* It fires the click event when space key is used.
|
23
19
|
* @event focus - (React: onFocus) Event that gets dispatched when the card receives focus.
|
24
20
|
*
|
21
|
+
* @slot before-body - This slot is for passing the content before the body
|
22
|
+
* @slot body - This slot is for passing the text content for the card
|
23
|
+
* @slot after-body - This slot is for passing the content after the body
|
24
|
+
* @slot footer-link - This slot is for passing `mdc-link` component within the footer section.
|
25
|
+
* @slot footer-button-primary - This slot is for passing primary variant of `mdc-button` component within the footer section.
|
26
|
+
*
|
27
|
+
* @csspart header - The header part of the card
|
28
|
+
* @csspart icon - The icon part of the card header
|
29
|
+
* @csspart body - The body part of the card
|
30
|
+
* @csspart image - The image part of the card
|
31
|
+
* @csspart footer - The footer part of the card
|
32
|
+
* @csspart footer-link - The link part of the card footer
|
33
|
+
* @csspart footer-button-primary - The primary button part of the card footer
|
34
|
+
* @csspart footer-button-secondary - The secondary button part of the card footer
|
35
|
+
* @csspart icon-button - The icon button part of the card header
|
36
|
+
* @csspart text - The text part of the card
|
37
|
+
*
|
38
|
+
* @cssproperty --mdc-card-width - The width of the card
|
25
39
|
*/
|
26
40
|
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
27
41
|
onClick: EventName<MouseEvent>;
|
@@ -13,10 +13,6 @@ import { TAG_NAME } from '../../components/cardbutton/cardbutton.constants';
|
|
13
13
|
* @dependency mdc-icon
|
14
14
|
* @dependency mdc-text
|
15
15
|
*
|
16
|
-
* @slot before-body - This slot is for passing the content before the body
|
17
|
-
* @slot body - This slot is for passing the text content for the card
|
18
|
-
* @slot after-body - This slot is for passing the content after the body
|
19
|
-
*
|
20
16
|
* @event click - (React: onClick) Event that gets dispatched when the card is clicked.
|
21
17
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the card.
|
22
18
|
* It fires the click event when enter key is used.
|
@@ -24,6 +20,24 @@ import { TAG_NAME } from '../../components/cardbutton/cardbutton.constants';
|
|
24
20
|
* It fires the click event when space key is used.
|
25
21
|
* @event focus - (React: onFocus) Event that gets dispatched when the card receives focus.
|
26
22
|
*
|
23
|
+
* @slot before-body - This slot is for passing the content before the body
|
24
|
+
* @slot body - This slot is for passing the text content for the card
|
25
|
+
* @slot after-body - This slot is for passing the content after the body
|
26
|
+
* @slot footer-link - This slot is for passing `mdc-link` component within the footer section.
|
27
|
+
* @slot footer-button-primary - This slot is for passing primary variant of `mdc-button` component within the footer section.
|
28
|
+
*
|
29
|
+
* @csspart header - The header part of the card
|
30
|
+
* @csspart icon - The icon part of the card header
|
31
|
+
* @csspart body - The body part of the card
|
32
|
+
* @csspart image - The image part of the card
|
33
|
+
* @csspart footer - The footer part of the card
|
34
|
+
* @csspart footer-link - The link part of the card footer
|
35
|
+
* @csspart footer-button-primary - The primary button part of the card footer
|
36
|
+
* @csspart footer-button-secondary - The secondary button part of the card footer
|
37
|
+
* @csspart icon-button - The icon button part of the card header
|
38
|
+
* @csspart text - The text part of the card
|
39
|
+
*
|
40
|
+
* @cssproperty --mdc-card-width - The width of the card
|
27
41
|
*/
|
28
42
|
const reactWrapper = createComponent({
|
29
43
|
tagName: TAG_NAME,
|
@@ -20,6 +20,24 @@ import Component from '../../components/cardcheckbox';
|
|
20
20
|
* @slot before-body - This slot is for passing the content before the body
|
21
21
|
* @slot body - This slot is for passing the text content for the card
|
22
22
|
* @slot after-body - This slot is for passing the content after the body
|
23
|
+
* @slot footer-link - This slot is for passing `mdc-link` component within the footer section.
|
24
|
+
* @slot footer-button-primary - This slot is for passing primary variant of `mdc-button` component within the footer section.
|
25
|
+
*
|
26
|
+
* @csspart header - The header part of the card
|
27
|
+
* @csspart icon - The icon part of the card header
|
28
|
+
* @csspart body - The body part of the card
|
29
|
+
* @csspart image - The image part of the card
|
30
|
+
* @csspart footer - The footer part of the card
|
31
|
+
* @csspart footer-link - The link part of the card footer
|
32
|
+
* @csspart footer-button-primary - The primary button part of the card footer
|
33
|
+
* @csspart footer-button-secondary - The secondary button part of the card footer
|
34
|
+
* @csspart icon-button - The icon button part of the card header
|
35
|
+
* @csspart text - The text part of the card
|
36
|
+
* @csspart check - The check part of the card
|
37
|
+
* @csspart check-icon - The check icon part of the card
|
38
|
+
* @csspart check-icon-button - The check icon button part of the card
|
39
|
+
*
|
40
|
+
* @cssproperty --mdc-card-width - The width of the card
|
23
41
|
*
|
24
42
|
* @event click - (React: onClick) Event that gets dispatched when the card is clicked. It toggles the checked state.
|
25
43
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the card.
|
@@ -22,6 +22,24 @@ import { TAG_NAME } from '../../components/cardcheckbox/cardcheckbox.constants';
|
|
22
22
|
* @slot before-body - This slot is for passing the content before the body
|
23
23
|
* @slot body - This slot is for passing the text content for the card
|
24
24
|
* @slot after-body - This slot is for passing the content after the body
|
25
|
+
* @slot footer-link - This slot is for passing `mdc-link` component within the footer section.
|
26
|
+
* @slot footer-button-primary - This slot is for passing primary variant of `mdc-button` component within the footer section.
|
27
|
+
*
|
28
|
+
* @csspart header - The header part of the card
|
29
|
+
* @csspart icon - The icon part of the card header
|
30
|
+
* @csspart body - The body part of the card
|
31
|
+
* @csspart image - The image part of the card
|
32
|
+
* @csspart footer - The footer part of the card
|
33
|
+
* @csspart footer-link - The link part of the card footer
|
34
|
+
* @csspart footer-button-primary - The primary button part of the card footer
|
35
|
+
* @csspart footer-button-secondary - The secondary button part of the card footer
|
36
|
+
* @csspart icon-button - The icon button part of the card header
|
37
|
+
* @csspart text - The text part of the card
|
38
|
+
* @csspart check - The check part of the card
|
39
|
+
* @csspart check-icon - The check icon part of the card
|
40
|
+
* @csspart check-icon-button - The check icon button part of the card
|
41
|
+
*
|
42
|
+
* @cssproperty --mdc-card-width - The width of the card
|
25
43
|
*
|
26
44
|
* @event click - (React: onClick) Event that gets dispatched when the card is clicked. It toggles the checked state.
|
27
45
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the card.
|
@@ -20,6 +20,24 @@ import Component from '../../components/cardradio';
|
|
20
20
|
* @slot before-body - This slot is for passing the content before the body
|
21
21
|
* @slot body - This slot is for passing the text content for the card
|
22
22
|
* @slot after-body - This slot is for passing the content after the body
|
23
|
+
* @slot footer-link - This slot is for passing `mdc-link` component within the footer section.
|
24
|
+
* @slot footer-button-primary - This slot is for passing primary variant of `mdc-button` component within the footer section.
|
25
|
+
*
|
26
|
+
* @csspart header - The header part of the card
|
27
|
+
* @csspart icon - The icon part of the card header
|
28
|
+
* @csspart body - The body part of the card
|
29
|
+
* @csspart image - The image part of the card
|
30
|
+
* @csspart footer - The footer part of the card
|
31
|
+
* @csspart footer-link - The link part of the card footer
|
32
|
+
* @csspart footer-button-primary - The primary button part of the card footer
|
33
|
+
* @csspart footer-button-secondary - The secondary button part of the card footer
|
34
|
+
* @csspart icon-button - The icon button part of the card header
|
35
|
+
* @csspart text - The text part of the card
|
36
|
+
* @csspart check - The check part of the card
|
37
|
+
* @csspart check-icon - The check icon part of the card
|
38
|
+
* @csspart check-icon-button - The check icon button part of the card
|
39
|
+
*
|
40
|
+
* @cssproperty --mdc-card-width - The width of the card
|
23
41
|
*
|
24
42
|
* @event click - (React: onClick) Event that gets dispatched when the card is clicked. It toggles the checked state.
|
25
43
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the card.
|
@@ -22,6 +22,24 @@ import { TAG_NAME } from '../../components/cardradio/cardradio.constants';
|
|
22
22
|
* @slot before-body - This slot is for passing the content before the body
|
23
23
|
* @slot body - This slot is for passing the text content for the card
|
24
24
|
* @slot after-body - This slot is for passing the content after the body
|
25
|
+
* @slot footer-link - This slot is for passing `mdc-link` component within the footer section.
|
26
|
+
* @slot footer-button-primary - This slot is for passing primary variant of `mdc-button` component within the footer section.
|
27
|
+
*
|
28
|
+
* @csspart header - The header part of the card
|
29
|
+
* @csspart icon - The icon part of the card header
|
30
|
+
* @csspart body - The body part of the card
|
31
|
+
* @csspart image - The image part of the card
|
32
|
+
* @csspart footer - The footer part of the card
|
33
|
+
* @csspart footer-link - The link part of the card footer
|
34
|
+
* @csspart footer-button-primary - The primary button part of the card footer
|
35
|
+
* @csspart footer-button-secondary - The secondary button part of the card footer
|
36
|
+
* @csspart icon-button - The icon button part of the card header
|
37
|
+
* @csspart text - The text part of the card
|
38
|
+
* @csspart check - The check part of the card
|
39
|
+
* @csspart check-icon - The check icon part of the card
|
40
|
+
* @csspart check-icon-button - The check icon button part of the card
|
41
|
+
*
|
42
|
+
* @cssproperty --mdc-card-width - The width of the card
|
25
43
|
*
|
26
44
|
* @event click - (React: onClick) Event that gets dispatched when the card is clicked. It toggles the checked state.
|
27
45
|
* @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the card.
|
package/dist/react/index.d.ts
CHANGED
@@ -67,6 +67,7 @@ export { default as TabList } from './tablist';
|
|
67
67
|
export { default as Text } from './text';
|
68
68
|
export { default as Textarea } from './textarea';
|
69
69
|
export { default as ThemeProvider } from './themeprovider';
|
70
|
+
export { default as Toast } from './toast';
|
70
71
|
export { default as Toggle } from './toggle';
|
71
72
|
export { default as ToggleTip } from './toggletip';
|
72
73
|
export { default as Tooltip } from './tooltip';
|
package/dist/react/index.js
CHANGED
@@ -67,6 +67,7 @@ export { default as TabList } from './tablist';
|
|
67
67
|
export { default as Text } from './text';
|
68
68
|
export { default as Textarea } from './textarea';
|
69
69
|
export { default as ThemeProvider } from './themeprovider';
|
70
|
+
export { default as Toast } from './toast';
|
70
71
|
export { default as Toggle } from './toggle';
|
71
72
|
export { default as ToggleTip } from './toggletip';
|
72
73
|
export { default as Tooltip } from './tooltip';
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { type EventName } from '@lit/react';
|
2
|
+
import Component from '../../components/toast';
|
3
|
+
/**
|
4
|
+
* `mdc-toast` is a lightweight, non-blocking alert used to inform users about application processes.
|
5
|
+
* It supports success, warning, error, and custom messages, and is designed to be controlled externally.
|
6
|
+
*
|
7
|
+
* **Note**: When using `slot="toast-body-normal"` and `slot="toast-body-detailed"`, it's strongly recommended to wrap the content with `<mdc-text tagname="span">`.
|
8
|
+
* If not used, ensure your custom content is styled appropriately to match the design and alignment expectations of the toast component.
|
9
|
+
*
|
10
|
+
* @dependency mdc-icon
|
11
|
+
* @dependency mdc-text
|
12
|
+
* @dependency mdc-button
|
13
|
+
* @dependency mdc-linkbutton
|
14
|
+
*
|
15
|
+
* @slot content-prefix - Slot for custom content before the icon (only for custom variant).
|
16
|
+
* @slot toast-body-normal - Slot for the main body content of the toast.
|
17
|
+
* @slot toast-body-detailed - Slot for additional detailed content, shown when expanded.
|
18
|
+
* @slot footer - Slot for custom footer content. Prefer using footer-button-primary and footer-button-secondary slots.
|
19
|
+
* @slot footer-button-primary - Slot for passing the primary variant of `mdc-button` in the footer.
|
20
|
+
* @slot footer-button-secondary - Slot for passing the secondary variant of `mdc-button` in the footer.
|
21
|
+
*
|
22
|
+
* @tagname mdc-toast
|
23
|
+
*
|
24
|
+
* @event close - (React: onClose) Dispatched when the Close Button is clicked using mouse or keyboard.
|
25
|
+
*
|
26
|
+
* @csspart content-container - The container for the toast's main content, including icon, text, and close button.
|
27
|
+
* @csspart toast-prefix-icon - The icon shown at the start of the toast, styled by variant.
|
28
|
+
* @csspart toast-content - The container for the header and body content of the toast.
|
29
|
+
* @csspart toast-header - The header text of the toast.
|
30
|
+
* @csspart footer - The container for the toast's footer, including toggle and action buttons.
|
31
|
+
* @csspart footer-button-toggle - The toggle button for showing/hiding detailed content.
|
32
|
+
* @csspart toast-close-btn - The close button for the toast.
|
33
|
+
*
|
34
|
+
* @cssproperty --mdc-toast-background-color - Background color of the toast.
|
35
|
+
* @cssproperty --mdc-toast-border-color - Border color of the toast.
|
36
|
+
* @cssproperty --mdc-toast-header-text-color - Color of the header text in the toast.
|
37
|
+
* @cssproperty --mdc-toast-icon-color - Color of the icon in the toast.
|
38
|
+
* @cssproperty --mdc-toast-elevation-3 - Elevation effect applied to the toast.
|
39
|
+
* @cssproperty --mdc-toast-width - Width of the toast.
|
40
|
+
* @cssproperty --mdc-toast-padding - Padding inside the toast.
|
41
|
+
*/
|
42
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
|
43
|
+
onClose: EventName<Event>;
|
44
|
+
}>;
|
45
|
+
export default reactWrapper;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/toast';
|
4
|
+
import { TAG_NAME } from '../../components/toast/toast.constants';
|
5
|
+
/**
|
6
|
+
* `mdc-toast` is a lightweight, non-blocking alert used to inform users about application processes.
|
7
|
+
* It supports success, warning, error, and custom messages, and is designed to be controlled externally.
|
8
|
+
*
|
9
|
+
* **Note**: When using `slot="toast-body-normal"` and `slot="toast-body-detailed"`, it's strongly recommended to wrap the content with `<mdc-text tagname="span">`.
|
10
|
+
* If not used, ensure your custom content is styled appropriately to match the design and alignment expectations of the toast component.
|
11
|
+
*
|
12
|
+
* @dependency mdc-icon
|
13
|
+
* @dependency mdc-text
|
14
|
+
* @dependency mdc-button
|
15
|
+
* @dependency mdc-linkbutton
|
16
|
+
*
|
17
|
+
* @slot content-prefix - Slot for custom content before the icon (only for custom variant).
|
18
|
+
* @slot toast-body-normal - Slot for the main body content of the toast.
|
19
|
+
* @slot toast-body-detailed - Slot for additional detailed content, shown when expanded.
|
20
|
+
* @slot footer - Slot for custom footer content. Prefer using footer-button-primary and footer-button-secondary slots.
|
21
|
+
* @slot footer-button-primary - Slot for passing the primary variant of `mdc-button` in the footer.
|
22
|
+
* @slot footer-button-secondary - Slot for passing the secondary variant of `mdc-button` in the footer.
|
23
|
+
*
|
24
|
+
* @tagname mdc-toast
|
25
|
+
*
|
26
|
+
* @event close - (React: onClose) Dispatched when the Close Button is clicked using mouse or keyboard.
|
27
|
+
*
|
28
|
+
* @csspart content-container - The container for the toast's main content, including icon, text, and close button.
|
29
|
+
* @csspart toast-prefix-icon - The icon shown at the start of the toast, styled by variant.
|
30
|
+
* @csspart toast-content - The container for the header and body content of the toast.
|
31
|
+
* @csspart toast-header - The header text of the toast.
|
32
|
+
* @csspart footer - The container for the toast's footer, including toggle and action buttons.
|
33
|
+
* @csspart footer-button-toggle - The toggle button for showing/hiding detailed content.
|
34
|
+
* @csspart toast-close-btn - The close button for the toast.
|
35
|
+
*
|
36
|
+
* @cssproperty --mdc-toast-background-color - Background color of the toast.
|
37
|
+
* @cssproperty --mdc-toast-border-color - Border color of the toast.
|
38
|
+
* @cssproperty --mdc-toast-header-text-color - Color of the header text in the toast.
|
39
|
+
* @cssproperty --mdc-toast-icon-color - Color of the icon in the toast.
|
40
|
+
* @cssproperty --mdc-toast-elevation-3 - Elevation effect applied to the toast.
|
41
|
+
* @cssproperty --mdc-toast-width - Width of the toast.
|
42
|
+
* @cssproperty --mdc-toast-padding - Padding inside the toast.
|
43
|
+
*/
|
44
|
+
const reactWrapper = createComponent({
|
45
|
+
tagName: TAG_NAME,
|
46
|
+
elementClass: Component,
|
47
|
+
react: React,
|
48
|
+
events: {
|
49
|
+
onClose: 'close',
|
50
|
+
},
|
51
|
+
displayName: 'Toast',
|
52
|
+
});
|
53
|
+
export default reactWrapper;
|