@momentum-design/components 0.98.1 → 0.100.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 +410 -271
- package/dist/browser/index.js.map +4 -4
- package/dist/components/card/card.styles.js +2 -2
- 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 +4440 -4054
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/index.d.ts +5 -4
- package/dist/react/index.js +5 -4
- 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, };
|
package/dist/react/index.d.ts
CHANGED
@@ -6,25 +6,25 @@ export { default as AvatarButton } from './avatarbutton';
|
|
6
6
|
export { default as Badge } from './badge';
|
7
7
|
export { default as Brandvisual } from './brandvisual';
|
8
8
|
export { default as Bullet } from './bullet';
|
9
|
-
export { default as Button } from './button';
|
10
9
|
export { default as ButtonGroup } from './buttongroup';
|
11
10
|
export { default as ButtonLink } from './buttonlink';
|
12
11
|
export { default as Buttonsimple } from './buttonsimple';
|
13
|
-
export { default as
|
12
|
+
export { default as Button } from './button';
|
14
13
|
export { default as CardButton } from './cardbutton';
|
14
|
+
export { default as Card } from './card';
|
15
15
|
export { default as CardCheckbox } from './cardcheckbox';
|
16
16
|
export { default as CardRadio } from './cardradio';
|
17
17
|
export { default as Checkbox } from './checkbox';
|
18
18
|
export { default as Chip } from './chip';
|
19
|
-
export { default as Coachmark } from './coachmark';
|
20
19
|
export { default as Dialog } from './dialog';
|
20
|
+
export { default as Coachmark } from './coachmark';
|
21
21
|
export { default as Divider } from './divider';
|
22
22
|
export { default as FilterChip } from './filterchip';
|
23
23
|
export { default as FormfieldGroup } from './formfieldgroup';
|
24
24
|
export { default as FormfieldWrapper } from './formfieldwrapper';
|
25
25
|
export { default as Icon } from './icon';
|
26
|
-
export { default as IconProvider } from './iconprovider';
|
27
26
|
export { default as Input } from './input';
|
27
|
+
export { default as IconProvider } from './iconprovider';
|
28
28
|
export { default as InputChip } from './inputchip';
|
29
29
|
export { default as Link } from './link';
|
30
30
|
export { default as LinkButton } from './linkbutton';
|
@@ -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
@@ -6,25 +6,25 @@ export { default as AvatarButton } from './avatarbutton';
|
|
6
6
|
export { default as Badge } from './badge';
|
7
7
|
export { default as Brandvisual } from './brandvisual';
|
8
8
|
export { default as Bullet } from './bullet';
|
9
|
-
export { default as Button } from './button';
|
10
9
|
export { default as ButtonGroup } from './buttongroup';
|
11
10
|
export { default as ButtonLink } from './buttonlink';
|
12
11
|
export { default as Buttonsimple } from './buttonsimple';
|
13
|
-
export { default as
|
12
|
+
export { default as Button } from './button';
|
14
13
|
export { default as CardButton } from './cardbutton';
|
14
|
+
export { default as Card } from './card';
|
15
15
|
export { default as CardCheckbox } from './cardcheckbox';
|
16
16
|
export { default as CardRadio } from './cardradio';
|
17
17
|
export { default as Checkbox } from './checkbox';
|
18
18
|
export { default as Chip } from './chip';
|
19
|
-
export { default as Coachmark } from './coachmark';
|
20
19
|
export { default as Dialog } from './dialog';
|
20
|
+
export { default as Coachmark } from './coachmark';
|
21
21
|
export { default as Divider } from './divider';
|
22
22
|
export { default as FilterChip } from './filterchip';
|
23
23
|
export { default as FormfieldGroup } from './formfieldgroup';
|
24
24
|
export { default as FormfieldWrapper } from './formfieldwrapper';
|
25
25
|
export { default as Icon } from './icon';
|
26
|
-
export { default as IconProvider } from './iconprovider';
|
27
26
|
export { default as Input } from './input';
|
27
|
+
export { default as IconProvider } from './iconprovider';
|
28
28
|
export { default as InputChip } from './inputchip';
|
29
29
|
export { default as Link } from './link';
|
30
30
|
export { default as LinkButton } from './linkbutton';
|
@@ -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;
|