@momentum-design/components 0.116.2 → 0.117.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 (50) hide show
  1. package/dist/browser/index.js +319 -310
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/components/icon/icon.utils.d.ts +1 -1
  4. package/dist/components/icon/icon.utils.js +2 -2
  5. package/dist/components/iconprovider/iconprovider.component.d.ts +3 -1
  6. package/dist/components/iconprovider/iconprovider.component.js +1 -1
  7. package/dist/components/iconprovider/iconprovider.constants.d.ts +0 -1
  8. package/dist/components/iconprovider/iconprovider.constants.js +0 -1
  9. package/dist/components/illustration/illustration.component.d.ts +91 -0
  10. package/dist/components/illustration/illustration.component.js +220 -0
  11. package/dist/components/illustration/illustration.constants.d.ts +5 -0
  12. package/dist/components/illustration/illustration.constants.js +6 -0
  13. package/dist/components/illustration/illustration.styles.d.ts +2 -0
  14. package/dist/components/illustration/illustration.styles.js +15 -0
  15. package/dist/components/illustration/illustration.types.d.ts +2 -0
  16. package/dist/components/illustration/illustration.types.js +1 -0
  17. package/dist/components/illustration/illustration.utils.d.ts +32 -0
  18. package/dist/components/illustration/illustration.utils.js +79 -0
  19. package/dist/components/illustration/index.d.ts +7 -0
  20. package/dist/components/illustration/index.js +4 -0
  21. package/dist/components/illustrationprovider/illustrationprovider.component.d.ts +97 -0
  22. package/dist/components/illustrationprovider/illustrationprovider.component.js +123 -0
  23. package/dist/components/illustrationprovider/illustrationprovider.constants.d.ts +7 -0
  24. package/dist/components/illustrationprovider/illustrationprovider.constants.js +8 -0
  25. package/dist/components/illustrationprovider/illustrationprovider.context.d.ts +12 -0
  26. package/dist/components/illustrationprovider/illustrationprovider.context.js +7 -0
  27. package/dist/components/illustrationprovider/illustrationprovider.types.d.ts +3 -0
  28. package/dist/components/illustrationprovider/illustrationprovider.types.js +1 -0
  29. package/dist/components/illustrationprovider/index.d.ts +7 -0
  30. package/dist/components/illustrationprovider/index.js +4 -0
  31. package/dist/components/toast/index.d.ts +0 -1
  32. package/dist/components/toast/index.js +0 -1
  33. package/dist/components/toast/toast.component.d.ts +2 -1
  34. package/dist/components/toast/toast.component.js +6 -4
  35. package/dist/custom-elements.json +1394 -1060
  36. package/dist/index.d.ts +5 -3
  37. package/dist/index.js +5 -3
  38. package/dist/react/iconprovider/index.d.ts +1 -1
  39. package/dist/react/iconprovider/index.js +1 -1
  40. package/dist/react/illustration/index.d.ts +40 -0
  41. package/dist/react/illustration/index.js +49 -0
  42. package/dist/react/illustrationprovider/index.d.ts +31 -0
  43. package/dist/react/illustrationprovider/index.js +40 -0
  44. package/dist/react/index.d.ts +3 -1
  45. package/dist/react/index.js +3 -1
  46. package/dist/react/toast/index.d.ts +0 -1
  47. package/dist/react/toast/index.js +0 -1
  48. package/dist/utils/{icon-cache → assets-cache}/index.d.ts +2 -2
  49. package/dist/utils/{icon-cache → assets-cache}/index.js +3 -3
  50. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -25,6 +25,8 @@ import FilterChip from './components/filterchip';
25
25
  import FormfieldGroup from './components/formfieldgroup';
26
26
  import Icon from './components/icon';
27
27
  import IconProvider from './components/iconprovider';
28
+ import Illustration from './components/illustration';
29
+ import IllustrationProvider from './components/illustrationprovider';
28
30
  import Input from './components/input';
29
31
  import InputChip from './components/inputchip';
30
32
  import Link from './components/link';
@@ -93,7 +95,7 @@ import type { InputInputEvent, InputChangeEvent, InputFocusEvent, InputBlurEvent
93
95
  import type { VirtualizedListScrollEvent } from './components/virtualizedlist/virtualizedlist.types';
94
96
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES } from './components/button/button.constants';
95
97
  import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
96
- import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
97
- 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, 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 };
98
+ 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, };
98
100
  export type { BadgeType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, TextType, TypewriterType, InputInputEvent, InputChangeEvent, InputFocusEvent, InputBlurEvent, InputClearEvent, VirtualizedListScrollEvent, };
99
- export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIIconsCache, };
101
+ export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
package/dist/index.js CHANGED
@@ -27,6 +27,8 @@ import FilterChip from './components/filterchip';
27
27
  import FormfieldGroup from './components/formfieldgroup';
28
28
  import Icon from './components/icon';
29
29
  import IconProvider from './components/iconprovider';
30
+ import Illustration from './components/illustration';
31
+ import IllustrationProvider from './components/illustrationprovider';
30
32
  import Input from './components/input';
31
33
  import InputChip from './components/inputchip';
32
34
  import Link from './components/link';
@@ -84,8 +86,8 @@ import Banner from './components/banner';
84
86
  // Constants / Utils Imports
85
87
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, } from './components/button/button.constants';
86
88
  import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
87
- import { inMemoryCache, webAPIIconsCache } from './utils/icon-cache';
89
+ import { inMemoryCache, webAPIAssetsCache } from './utils/assets-cache';
88
90
  // Components Exports
89
- 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, 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 };
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, };
90
92
  // Constants / Utils Exports
91
- export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIIconsCache, };
93
+ export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
@@ -6,7 +6,7 @@ import Component from '../../components/iconprovider';
6
6
  * Attribute `iconSet` can be set to either `momentum-icons` or `custom-icons`.
7
7
  * If `momentum-icons` is selected, the icons will be fetched from the
8
8
  * Momentum Design System icon set per a dynamic JS Import (no need to provide a URL).
9
- * This requires the consumer to have the `@momentum-designs` package installed and the
9
+ * This requires the consumer to have the `@momentum-design/icons` package installed and the
10
10
  * build tooling needs to support dynamic imports.
11
11
  *
12
12
  * If `custom-icons` is selected, the icons will be fetched from the provided URL.
@@ -9,7 +9,7 @@ import { TAG_NAME } from '../../components/iconprovider/iconprovider.constants';
9
9
  * Attribute `iconSet` can be set to either `momentum-icons` or `custom-icons`.
10
10
  * If `momentum-icons` is selected, the icons will be fetched from the
11
11
  * Momentum Design System icon set per a dynamic JS Import (no need to provide a URL).
12
- * This requires the consumer to have the `@momentum-designs` package installed and the
12
+ * This requires the consumer to have the `@momentum-design/icons` package installed and the
13
13
  * build tooling needs to support dynamic imports.
14
14
  *
15
15
  * If `custom-icons` is selected, the icons will be fetched from the provided URL.
@@ -0,0 +1,40 @@
1
+ import Component from '../../components/illustration';
2
+ /**
3
+ * Illustration component that dynamically displays SVG illustrations based on a valid name.
4
+ *
5
+ * This component must be mounted within an `IllustrationProvider` component.
6
+ *
7
+ * The `IllustrationProvider` defines the source URL from which illustrations are consumed.
8
+ * The `Illustration` component accepts a `name` attribute, which corresponds to
9
+ * the file name of the illustration to be loaded from the specified URL.
10
+ *
11
+ * Once fetched, the illustration will be rendered. If the fetching process is unsuccessful,
12
+ * no illustration will be displayed.
13
+ *
14
+ * Default sizing of the illustration is controlled by choosing a different illustration name, can be overridden with the `--mdc-illustration-size` CSS property.
15
+ * Coloring of the illustration is currently baked into the svg, meaning that the illustration name determines
16
+ * the coloring.
17
+ *
18
+ * Regarding accessibility, there are two types of illustrations: decorative and informative.
19
+ *
20
+ * ### Decorative Illustrations
21
+ * - Decorative illustrations do not convey any essential information to the content of a page.
22
+ * - They should be hidden from screen readers (SR) to prevent confusion for users.
23
+ * - For decorative illustrations, an `aria-label` is not required, and the `role` will be set to null.
24
+ *
25
+ * ### Informative Illustrations
26
+ * - Informative illustrations convey important information that is not adequately represented
27
+ * by surrounding text or components.
28
+ * - They provide valuable context and must be announced by assistive technologies.
29
+ * - For informative illustrations, an `aria-label` is required, and the `role` will be set to "img" automatically.
30
+ * - If an `aria-label` is provided, the role will be set to 'img'; if it is absent,
31
+ * the role will be unset.
32
+ *
33
+ * @tagname mdc-illustration
34
+ *
35
+ * @cssproperty --mdc-illustration-size - Allows customization of the illustration size.
36
+ *
37
+ * @csspart illustration - The svg inside the illustration element.
38
+ */
39
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
40
+ export default reactWrapper;
@@ -0,0 +1,49 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/illustration';
4
+ import { TAG_NAME } from '../../components/illustration/illustration.constants';
5
+ /**
6
+ * Illustration component that dynamically displays SVG illustrations based on a valid name.
7
+ *
8
+ * This component must be mounted within an `IllustrationProvider` component.
9
+ *
10
+ * The `IllustrationProvider` defines the source URL from which illustrations are consumed.
11
+ * The `Illustration` component accepts a `name` attribute, which corresponds to
12
+ * the file name of the illustration to be loaded from the specified URL.
13
+ *
14
+ * Once fetched, the illustration will be rendered. If the fetching process is unsuccessful,
15
+ * no illustration will be displayed.
16
+ *
17
+ * Default sizing of the illustration is controlled by choosing a different illustration name, can be overridden with the `--mdc-illustration-size` CSS property.
18
+ * Coloring of the illustration is currently baked into the svg, meaning that the illustration name determines
19
+ * the coloring.
20
+ *
21
+ * Regarding accessibility, there are two types of illustrations: decorative and informative.
22
+ *
23
+ * ### Decorative Illustrations
24
+ * - Decorative illustrations do not convey any essential information to the content of a page.
25
+ * - They should be hidden from screen readers (SR) to prevent confusion for users.
26
+ * - For decorative illustrations, an `aria-label` is not required, and the `role` will be set to null.
27
+ *
28
+ * ### Informative Illustrations
29
+ * - Informative illustrations convey important information that is not adequately represented
30
+ * by surrounding text or components.
31
+ * - They provide valuable context and must be announced by assistive technologies.
32
+ * - For informative illustrations, an `aria-label` is required, and the `role` will be set to "img" automatically.
33
+ * - If an `aria-label` is provided, the role will be set to 'img'; if it is absent,
34
+ * the role will be unset.
35
+ *
36
+ * @tagname mdc-illustration
37
+ *
38
+ * @cssproperty --mdc-illustration-size - Allows customization of the illustration size.
39
+ *
40
+ * @csspart illustration - The svg inside the illustration element.
41
+ */
42
+ const reactWrapper = createComponent({
43
+ tagName: TAG_NAME,
44
+ elementClass: Component,
45
+ react: React,
46
+ events: {},
47
+ displayName: 'Illustration',
48
+ });
49
+ export default reactWrapper;
@@ -0,0 +1,31 @@
1
+ import Component from '../../components/illustrationprovider';
2
+ /**
3
+ * IllustrationProvider component, which allows to be consumed from sub components
4
+ * (see `providerUtils.consume` for how to consume)
5
+ *
6
+ * Attribute `illustrationSet` can be set to either `momentum-illustrations` or `custom-illustrations`.
7
+ * If `momentum-illustrations` is selected, the illustrations will be fetched from the
8
+ * Momentum Design System illustration set per a dynamic JS Import (no need to provide a URL).
9
+ * This requires the consumer to have the `@momentum-design/illustrations` package installed and the
10
+ * build tooling needs to support dynamic imports.
11
+ *
12
+ * If `custom-illustrations` is selected, the illustrations will be fetched from the provided URL.
13
+ * This requires the consumer to provide a URL from which the illustrations will be fetched and
14
+ * the consumer needs to make sure to bundle the illustrations in the application.
15
+ *
16
+ * If `cacheStrategy` is provided (only works with illustrationSet = `custom-illustrations`), the
17
+ * IllustrationProvider will cache the illustrations in the selected cache (either web-api-cache or in-memory-cache),
18
+ * to avoid fetching the same illustration multiple times over the network.
19
+ * This is useful when the same illustration is used multiple times in the application.
20
+ * To consider:
21
+ * - The `in-memory-cache` is not persisted and will be lost when the
22
+ * IllustrationProvider is removed from the DOM.
23
+ * - The `web-api-cache` is persisted, but only works in https environments
24
+ * (https://developer.mozilla.org/en-US/docs/Web/API/Cache).
25
+ *
26
+ * @tagname mdc-illustrationprovider
27
+ *
28
+ * @slot - children
29
+ */
30
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
31
+ export default reactWrapper;
@@ -0,0 +1,40 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/illustrationprovider';
4
+ import { TAG_NAME } from '../../components/illustrationprovider/illustrationprovider.constants';
5
+ /**
6
+ * IllustrationProvider component, which allows to be consumed from sub components
7
+ * (see `providerUtils.consume` for how to consume)
8
+ *
9
+ * Attribute `illustrationSet` can be set to either `momentum-illustrations` or `custom-illustrations`.
10
+ * If `momentum-illustrations` is selected, the illustrations will be fetched from the
11
+ * Momentum Design System illustration set per a dynamic JS Import (no need to provide a URL).
12
+ * This requires the consumer to have the `@momentum-design/illustrations` package installed and the
13
+ * build tooling needs to support dynamic imports.
14
+ *
15
+ * If `custom-illustrations` is selected, the illustrations will be fetched from the provided URL.
16
+ * This requires the consumer to provide a URL from which the illustrations will be fetched and
17
+ * the consumer needs to make sure to bundle the illustrations in the application.
18
+ *
19
+ * If `cacheStrategy` is provided (only works with illustrationSet = `custom-illustrations`), the
20
+ * IllustrationProvider will cache the illustrations in the selected cache (either web-api-cache or in-memory-cache),
21
+ * to avoid fetching the same illustration multiple times over the network.
22
+ * This is useful when the same illustration is used multiple times in the application.
23
+ * To consider:
24
+ * - The `in-memory-cache` is not persisted and will be lost when the
25
+ * IllustrationProvider is removed from the DOM.
26
+ * - The `web-api-cache` is persisted, but only works in https environments
27
+ * (https://developer.mozilla.org/en-US/docs/Web/API/Cache).
28
+ *
29
+ * @tagname mdc-illustrationprovider
30
+ *
31
+ * @slot - children
32
+ */
33
+ const reactWrapper = createComponent({
34
+ tagName: TAG_NAME,
35
+ elementClass: Component,
36
+ react: React,
37
+ events: {},
38
+ displayName: 'IllustrationProvider',
39
+ });
40
+ export default reactWrapper;
@@ -12,9 +12,9 @@ export { default as Brandvisual } from './brandvisual';
12
12
  export { default as Bullet } from './bullet';
13
13
  export { default as Button } from './button';
14
14
  export { default as ButtonGroup } from './buttongroup';
15
+ export { default as ButtonLink } from './buttonlink';
15
16
  export { default as Buttonsimple } from './buttonsimple';
16
17
  export { default as Card } from './card';
17
- export { default as ButtonLink } from './buttonlink';
18
18
  export { default as CardButton } from './cardbutton';
19
19
  export { default as CardCheckbox } from './cardcheckbox';
20
20
  export { default as CardRadio } from './cardradio';
@@ -29,6 +29,8 @@ export { default as FormfieldGroup } from './formfieldgroup';
29
29
  export { default as FormfieldWrapper } from './formfieldwrapper';
30
30
  export { default as Icon } from './icon';
31
31
  export { default as IconProvider } from './iconprovider';
32
+ export { default as Illustration } from './illustration';
33
+ export { default as IllustrationProvider } from './illustrationprovider';
32
34
  export { default as Input } from './input';
33
35
  export { default as InputChip } from './inputchip';
34
36
  export { default as Link } from './link';
@@ -12,9 +12,9 @@ export { default as Brandvisual } from './brandvisual';
12
12
  export { default as Bullet } from './bullet';
13
13
  export { default as Button } from './button';
14
14
  export { default as ButtonGroup } from './buttongroup';
15
+ export { default as ButtonLink } from './buttonlink';
15
16
  export { default as Buttonsimple } from './buttonsimple';
16
17
  export { default as Card } from './card';
17
- export { default as ButtonLink } from './buttonlink';
18
18
  export { default as CardButton } from './cardbutton';
19
19
  export { default as CardCheckbox } from './cardcheckbox';
20
20
  export { default as CardRadio } from './cardradio';
@@ -29,6 +29,8 @@ export { default as FormfieldGroup } from './formfieldgroup';
29
29
  export { default as FormfieldWrapper } from './formfieldwrapper';
30
30
  export { default as Icon } from './icon';
31
31
  export { default as IconProvider } from './iconprovider';
32
+ export { default as Illustration } from './illustration';
33
+ export { default as IllustrationProvider } from './illustrationprovider';
32
34
  export { default as Input } from './input';
33
35
  export { default as InputChip } from './inputchip';
34
36
  export { default as Link } from './link';
@@ -10,7 +10,6 @@ import Component from '../../components/toast';
10
10
  * @dependency mdc-icon
11
11
  * @dependency mdc-text
12
12
  * @dependency mdc-button
13
- * @dependency mdc-linkbutton
14
13
  *
15
14
  * @slot content-prefix - Slot for custom content before the icon (only for custom variant).
16
15
  * @slot toast-body-normal - Slot for the main body content of the toast.
@@ -12,7 +12,6 @@ import { TAG_NAME } from '../../components/toast/toast.constants';
12
12
  * @dependency mdc-icon
13
13
  * @dependency mdc-text
14
14
  * @dependency mdc-button
15
- * @dependency mdc-linkbutton
16
15
  *
17
16
  * @slot content-prefix - Slot for custom content before the icon (only for custom variant).
18
17
  * @slot toast-body-normal - Slot for the main body content of the toast.
@@ -14,7 +14,7 @@ export declare const inMemoryCache: (name: string) => Promise<{
14
14
  * @param name - name of the cache (used as an identifier)
15
15
  * @returns Object with set, get and delete methods
16
16
  */
17
- export declare const webAPIIconsCache: (name: string) => Promise<{
17
+ export declare const webAPIAssetsCache: (name: string) => Promise<{
18
18
  set: (request: Request, response: Response) => Promise<void>;
19
19
  get: (request: Request) => Promise<string | undefined>;
20
20
  delete: (request: Request) => Promise<void>;
@@ -25,7 +25,7 @@ export declare const webAPIIconsCache: (name: string) => Promise<{
25
25
  * @param cacheStrategy - strategy to be used for caching
26
26
  * @returns the cache based on the strategy
27
27
  */
28
- export declare const iconsCache: (cacheName: string, cacheStrategy: CacheStrategy) => Promise<{
28
+ export declare const assetsCache: (cacheName: string, cacheStrategy: CacheStrategy) => Promise<{
29
29
  set(request: Request, response: Response): Promise<void>;
30
30
  get(request: Request): Promise<string | undefined>;
31
31
  delete(request: Request): Promise<void>;
@@ -25,7 +25,7 @@ export const inMemoryCache = async (name) => {
25
25
  * @param name - name of the cache (used as an identifier)
26
26
  * @returns Object with set, get and delete methods
27
27
  */
28
- export const webAPIIconsCache = async (name) => {
28
+ export const webAPIAssetsCache = async (name) => {
29
29
  const cache = await caches.open(name);
30
30
  return {
31
31
  set: async (request, response) => {
@@ -46,9 +46,9 @@ export const webAPIIconsCache = async (name) => {
46
46
  * @param cacheStrategy - strategy to be used for caching
47
47
  * @returns the cache based on the strategy
48
48
  */
49
- export const iconsCache = async (cacheName, cacheStrategy) => {
49
+ export const assetsCache = async (cacheName, cacheStrategy) => {
50
50
  if (cacheStrategy === 'in-memory-cache') {
51
51
  return inMemoryCache(cacheName);
52
52
  }
53
- return webAPIIconsCache(cacheName);
53
+ return webAPIAssetsCache(cacheName);
54
54
  };
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.116.2",
4
+ "version": "0.117.1",
5
5
  "engines": {
6
6
  "node": ">=20.0.0",
7
7
  "npm": ">=8.0.0"