@momentum-design/components 0.117.4 → 0.118.1

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.
Files changed (31) hide show
  1. package/dist/browser/index.js +575 -505
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/announcementdialog/announcementdialog.component.d.ts +87 -0
  4. package/dist/components/announcementdialog/announcementdialog.component.js +131 -0
  5. package/dist/components/announcementdialog/announcementdialog.constants.d.ts +6 -0
  6. package/dist/components/announcementdialog/announcementdialog.constants.js +7 -0
  7. package/dist/components/announcementdialog/announcementdialog.styles.d.ts +2 -0
  8. package/dist/components/announcementdialog/announcementdialog.styles.js +52 -0
  9. package/dist/components/announcementdialog/announcementdialog.types.d.ts +6 -0
  10. package/dist/components/announcementdialog/announcementdialog.types.js +1 -0
  11. package/dist/components/announcementdialog/index.d.ts +9 -0
  12. package/dist/components/announcementdialog/index.js +6 -0
  13. package/dist/components/dialog/dialog.component.d.ts +14 -1
  14. package/dist/components/dialog/dialog.component.js +43 -27
  15. package/dist/components/dialog/dialog.styles.js +2 -0
  16. package/dist/components/dialog/dialog.types.d.ts +1 -1
  17. package/dist/components/list/list.component.d.ts +2 -0
  18. package/dist/components/list/list.component.js +15 -0
  19. package/dist/components/listitem/listitem.component.js +1 -2
  20. package/dist/components/select/select.component.js +8 -0
  21. package/dist/custom-elements.json +2625 -1329
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.js +2 -1
  24. package/dist/react/announcementdialog/index.d.ts +75 -0
  25. package/dist/react/announcementdialog/index.js +82 -0
  26. package/dist/react/dialog/index.d.ts +1 -0
  27. package/dist/react/dialog/index.js +1 -0
  28. package/dist/react/index.d.ts +5 -4
  29. package/dist/react/index.js +5 -4
  30. package/dist/utils/mixins/lifecycle/lifecycle.contants.d.ts +3 -3
  31. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import AccordionGroup from './components/accordiongroup';
3
3
  import AccordionButton from './components/accordionbutton';
4
4
  import AlertChip from './components/alertchip';
5
5
  import Animation from './components/animation';
6
+ import AnnouncementDialog from './components/announcementdialog';
6
7
  import Appheader from './components/appheader';
7
8
  import Avatar from './components/avatar';
8
9
  import AvatarButton from './components/avatarbutton';
@@ -96,6 +97,6 @@ import type { VirtualizedListScrollEvent } from './components/virtualizedlist/vi
96
97
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
97
98
  import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
98
99
  import { inMemoryCache, webAPIAssetsCache } from './utils/assets-cache';
99
- export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, };
100
+ export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, };
100
101
  export type { BadgeType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, TextType, TypewriterType, InputInputEvent, InputChangeEvent, InputFocusEvent, InputBlurEvent, InputClearEvent, VirtualizedListScrollEvent, };
101
102
  export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ import AccordionGroup from './components/accordiongroup';
5
5
  import AccordionButton from './components/accordionbutton';
6
6
  import AlertChip from './components/alertchip';
7
7
  import Animation from './components/animation';
8
+ import AnnouncementDialog from './components/announcementdialog';
8
9
  import Appheader from './components/appheader';
9
10
  import Avatar from './components/avatar';
10
11
  import AvatarButton from './components/avatarbutton';
@@ -88,6 +89,6 @@ import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, }
88
89
  import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
89
90
  import { inMemoryCache, webAPIAssetsCache } from './utils/assets-cache';
90
91
  // Components Exports
91
- export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, };
92
+ export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, Bullet, Button, ButtonGroup, ButtonLink, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ScreenreaderAnnouncer, Searchfield, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, };
92
93
  // Constants / Utils Exports
93
94
  export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
@@ -0,0 +1,75 @@
1
+ import { type EventName } from '@lit/react';
2
+ import Component from '../../components/announcementdialog';
3
+ import type { Events as EventsInherited } from '../../components/dialog/dialog.types';
4
+ /**
5
+ * AnnouncementDialog component is a modal dialog that can be used to display announcements, extending the existing Dialog component.
6
+ * It can be used to create custom dialogs where a illustration, content and footer actions are provided by the consumer.
7
+ * The dialog is available in 4 sizes: medium, large, xlarge and fullscreen. It may also receive custom styling/sizing.
8
+ * The dialog interrupts the user and will block interaction with the rest of the application until it is closed.
9
+ *
10
+ * The dialog can be controlled solely through the `visible` property, no trigger element is required.
11
+ * If a `triggerId` is provided, the dialog will manage focus with that element, otherwise it will
12
+ * remember the previously focused element before the dialog was opened.
13
+ *
14
+ * The dialog is a controlled component, meaning it does not have its own state management for visibility.
15
+ * Use the `visible` property to control the visibility of the dialog.
16
+ * Use the `onClose` event to handle the close action of the dialog (fired when Close button is clicked
17
+ * or Escape is pressed).
18
+ *
19
+ * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**
20
+ *
21
+ * - The dialog should have an aria-label or aria-labelledby attribute to provide a label for screen readers.
22
+ * - Use aria-labelledby to reference the ID of the element that labels the dialog when there is no visible title.
23
+ *
24
+ * **Note: Programmatic show/hide requires the ? prefix on the visible attribute**
25
+ * - Use `?visible=true/false` as an attribute instead of `visible=true/false`
26
+ * - Reference docs for more info: https://lit.dev/docs/templates/expressions/#boolean-attribute-expressions
27
+ *
28
+ * @dependency mdc-button
29
+ * @dependency mdc-illustration
30
+ * @dependency mdc-text
31
+ *
32
+ * @tagname mdc-announcementdialog
33
+ *
34
+ * @event shown - (React: onShown) Dispatched when the dialog is shown
35
+ * @event hidden - (React: onHidden) Dispatched when the dialog is hidden
36
+ * @event created - (React: onCreated) Dispatched when the dialog is created (added to the DOM)
37
+ * @event destroyed - (React: onDestroyed) Dispatched when the dialog is destroyed (removed from the DOM)
38
+ * @event close - (React: onClose) Dispatched when the Close Button is clicked or Escape key is pressed
39
+ * (this does not hide the dialog)
40
+ *
41
+ * @cssproperty --mdc-announcementdialog-illustration-background-color - background color of the illustration section
42
+ * @cssproperty --mdc-dialog-primary-background-color - primary background color of the dialog
43
+ * @cssproperty --mdc-dialog-border-color - border color of the dialog
44
+ * @cssproperty --mdc-dialog-header-text-color - text color of the header/title of the dialog
45
+ * @cssproperty --mdc-dialog-description-text-color - text color of the below header description of the dialog
46
+ * @cssproperty --mdc-dialog-elevation-3 - elevation of the dialog
47
+ * @cssproperty --mdc-dialog-width - width of the dialog
48
+ * @cssproperty --mdc-dialog-height - height of the dialog
49
+ *
50
+ * @csspart body - The main body container that holds the illustration and content sections
51
+ * @csspart illustration-container - The container for the illustration section
52
+ * @csspart content-container - The container for the content section
53
+ * @csspart header-text - The header text
54
+ *
55
+ * @slot header-prefix - Slot for the dialog header content. This can be used to pass custom header content.
56
+ * @slot dialog-body - Slot for the dialog body content
57
+ * @slot illustration-container - Slot for the illustration container section
58
+ * @slot content-container - Slot for the content (header, description, etc) section
59
+ * @slot description-container - Slot for the description in the content (below header) - pass in Text, Links etc as needed.
60
+ * @slot footer-link - This slot is for passing `mdc-link` component within the footer section.
61
+ * @slot footer-button-secondary - This slot is for passing secondary variant of `mdc-button` component
62
+ * within the footer section.
63
+ * @slot footer-button-primary - This slot is for passing primary variant of
64
+ * `mdc-button` component within the footer section.
65
+ * @slot footer - This slot is for passing custom footer content. Only use this if really needed,
66
+ * using the footer-link and footer-button slots is preferred
67
+ */
68
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
69
+ onShown: EventName<EventsInherited["onShownEvent"]>;
70
+ onHidden: EventName<EventsInherited["onHiddenEvent"]>;
71
+ onCreated: EventName<EventsInherited["onCreatedEvent"]>;
72
+ onDestroyed: EventName<EventsInherited["onDestroyedEvent"]>;
73
+ onClose: EventName<EventsInherited["onCloseEvent"]>;
74
+ }>;
75
+ export default reactWrapper;
@@ -0,0 +1,82 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/announcementdialog';
4
+ import { TAG_NAME } from '../../components/announcementdialog/announcementdialog.constants';
5
+ /**
6
+ * AnnouncementDialog component is a modal dialog that can be used to display announcements, extending the existing Dialog component.
7
+ * It can be used to create custom dialogs where a illustration, content and footer actions are provided by the consumer.
8
+ * The dialog is available in 4 sizes: medium, large, xlarge and fullscreen. It may also receive custom styling/sizing.
9
+ * The dialog interrupts the user and will block interaction with the rest of the application until it is closed.
10
+ *
11
+ * The dialog can be controlled solely through the `visible` property, no trigger element is required.
12
+ * If a `triggerId` is provided, the dialog will manage focus with that element, otherwise it will
13
+ * remember the previously focused element before the dialog was opened.
14
+ *
15
+ * The dialog is a controlled component, meaning it does not have its own state management for visibility.
16
+ * Use the `visible` property to control the visibility of the dialog.
17
+ * Use the `onClose` event to handle the close action of the dialog (fired when Close button is clicked
18
+ * or Escape is pressed).
19
+ *
20
+ * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**
21
+ *
22
+ * - The dialog should have an aria-label or aria-labelledby attribute to provide a label for screen readers.
23
+ * - Use aria-labelledby to reference the ID of the element that labels the dialog when there is no visible title.
24
+ *
25
+ * **Note: Programmatic show/hide requires the ? prefix on the visible attribute**
26
+ * - Use `?visible=true/false` as an attribute instead of `visible=true/false`
27
+ * - Reference docs for more info: https://lit.dev/docs/templates/expressions/#boolean-attribute-expressions
28
+ *
29
+ * @dependency mdc-button
30
+ * @dependency mdc-illustration
31
+ * @dependency mdc-text
32
+ *
33
+ * @tagname mdc-announcementdialog
34
+ *
35
+ * @event shown - (React: onShown) Dispatched when the dialog is shown
36
+ * @event hidden - (React: onHidden) Dispatched when the dialog is hidden
37
+ * @event created - (React: onCreated) Dispatched when the dialog is created (added to the DOM)
38
+ * @event destroyed - (React: onDestroyed) Dispatched when the dialog is destroyed (removed from the DOM)
39
+ * @event close - (React: onClose) Dispatched when the Close Button is clicked or Escape key is pressed
40
+ * (this does not hide the dialog)
41
+ *
42
+ * @cssproperty --mdc-announcementdialog-illustration-background-color - background color of the illustration section
43
+ * @cssproperty --mdc-dialog-primary-background-color - primary background color of the dialog
44
+ * @cssproperty --mdc-dialog-border-color - border color of the dialog
45
+ * @cssproperty --mdc-dialog-header-text-color - text color of the header/title of the dialog
46
+ * @cssproperty --mdc-dialog-description-text-color - text color of the below header description of the dialog
47
+ * @cssproperty --mdc-dialog-elevation-3 - elevation of the dialog
48
+ * @cssproperty --mdc-dialog-width - width of the dialog
49
+ * @cssproperty --mdc-dialog-height - height of the dialog
50
+ *
51
+ * @csspart body - The main body container that holds the illustration and content sections
52
+ * @csspart illustration-container - The container for the illustration section
53
+ * @csspart content-container - The container for the content section
54
+ * @csspart header-text - The header text
55
+ *
56
+ * @slot header-prefix - Slot for the dialog header content. This can be used to pass custom header content.
57
+ * @slot dialog-body - Slot for the dialog body content
58
+ * @slot illustration-container - Slot for the illustration container section
59
+ * @slot content-container - Slot for the content (header, description, etc) section
60
+ * @slot description-container - Slot for the description in the content (below header) - pass in Text, Links etc as needed.
61
+ * @slot footer-link - This slot is for passing `mdc-link` component within the footer section.
62
+ * @slot footer-button-secondary - This slot is for passing secondary variant of `mdc-button` component
63
+ * within the footer section.
64
+ * @slot footer-button-primary - This slot is for passing primary variant of
65
+ * `mdc-button` component within the footer section.
66
+ * @slot footer - This slot is for passing custom footer content. Only use this if really needed,
67
+ * using the footer-link and footer-button slots is preferred
68
+ */
69
+ const reactWrapper = createComponent({
70
+ tagName: TAG_NAME,
71
+ elementClass: Component,
72
+ react: React,
73
+ events: {
74
+ onShown: 'shown',
75
+ onHidden: 'hidden',
76
+ onCreated: 'created',
77
+ onDestroyed: 'destroyed',
78
+ onClose: 'close',
79
+ },
80
+ displayName: 'AnnouncementDialog',
81
+ });
82
+ export default reactWrapper;
@@ -45,6 +45,7 @@ import type { Events } from '../../components/dialog/dialog.types';
45
45
  * @cssproperty --mdc-dialog-description-text-color - text color of the below header description of the dialog
46
46
  * @cssproperty --mdc-dialog-elevation-3 - elevation of the dialog
47
47
  * @cssproperty --mdc-dialog-width - width of the dialog
48
+ * @cssproperty --mdc-dialog-height - height of the dialog
48
49
  *
49
50
  * @slot header-prefix - Slot for the dialog header content. This can be used to pass custom header content.
50
51
  * @slot dialog-body - Slot for the dialog body content
@@ -46,6 +46,7 @@ import { TAG_NAME } from '../../components/dialog/dialog.constants';
46
46
  * @cssproperty --mdc-dialog-description-text-color - text color of the below header description of the dialog
47
47
  * @cssproperty --mdc-dialog-elevation-3 - elevation of the dialog
48
48
  * @cssproperty --mdc-dialog-width - width of the dialog
49
+ * @cssproperty --mdc-dialog-height - height of the dialog
49
50
  *
50
51
  * @slot header-prefix - Slot for the dialog header content. This can be used to pass custom header content.
51
52
  * @slot dialog-body - Slot for the dialog body content
@@ -1,11 +1,12 @@
1
- export { default as AccordionButton } from './accordionbutton';
2
- export { default as AccordionGroup } from './accordiongroup';
3
1
  export { default as Accordion } from './accordion';
2
+ export { default as AccordionGroup } from './accordiongroup';
3
+ export { default as AccordionButton } from './accordionbutton';
4
4
  export { default as AlertChip } from './alertchip';
5
5
  export { default as Animation } from './animation';
6
- export { default as Appheader } from './appheader';
7
6
  export { default as Avatar } from './avatar';
8
7
  export { default as AvatarButton } from './avatarbutton';
8
+ export { default as Appheader } from './appheader';
9
+ export { default as AnnouncementDialog } from './announcementdialog';
9
10
  export { default as Badge } from './badge';
10
11
  export { default as Banner } from './banner';
11
12
  export { default as Brandvisual } from './brandvisual';
@@ -14,8 +15,8 @@ export { default as Button } from './button';
14
15
  export { default as ButtonGroup } from './buttongroup';
15
16
  export { default as ButtonLink } from './buttonlink';
16
17
  export { default as Buttonsimple } from './buttonsimple';
17
- export { default as CardButton } from './cardbutton';
18
18
  export { default as Card } from './card';
19
+ export { default as CardButton } from './cardbutton';
19
20
  export { default as CardCheckbox } from './cardcheckbox';
20
21
  export { default as CardRadio } from './cardradio';
21
22
  export { default as Checkbox } from './checkbox';
@@ -1,11 +1,12 @@
1
- export { default as AccordionButton } from './accordionbutton';
2
- export { default as AccordionGroup } from './accordiongroup';
3
1
  export { default as Accordion } from './accordion';
2
+ export { default as AccordionGroup } from './accordiongroup';
3
+ export { default as AccordionButton } from './accordionbutton';
4
4
  export { default as AlertChip } from './alertchip';
5
5
  export { default as Animation } from './animation';
6
- export { default as Appheader } from './appheader';
7
6
  export { default as Avatar } from './avatar';
8
7
  export { default as AvatarButton } from './avatarbutton';
8
+ export { default as Appheader } from './appheader';
9
+ export { default as AnnouncementDialog } from './announcementdialog';
9
10
  export { default as Badge } from './badge';
10
11
  export { default as Banner } from './banner';
11
12
  export { default as Brandvisual } from './brandvisual';
@@ -14,8 +15,8 @@ export { default as Button } from './button';
14
15
  export { default as ButtonGroup } from './buttongroup';
15
16
  export { default as ButtonLink } from './buttonlink';
16
17
  export { default as Buttonsimple } from './buttonsimple';
17
- export { default as CardButton } from './cardbutton';
18
18
  export { default as Card } from './card';
19
+ export { default as CardButton } from './cardbutton';
19
20
  export { default as CardCheckbox } from './cardcheckbox';
20
21
  export { default as CardRadio } from './cardradio';
21
22
  export { default as Checkbox } from './checkbox';
@@ -1,5 +1,5 @@
1
1
  export declare const LIFE_CYCLE_EVENTS: {
2
- CREATED: string;
3
- DESTROYED: string;
4
- MODIFIED: string;
2
+ readonly CREATED: "created";
3
+ readonly DESTROYED: "destroyed";
4
+ readonly MODIFIED: "modified";
5
5
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.117.4",
4
+ "version": "0.118.1",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"