@sonic-equipment/ui 162.0.0 → 163.0.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.
Files changed (48) hide show
  1. package/dist/buttons/link/link.d.ts +2 -1
  2. package/dist/buttons/link/link.js +3 -3
  3. package/dist/collapsables/cascading-component/cascading-component-container-context.d.ts +2 -0
  4. package/dist/collapsables/cascading-component/cascading-component-container-context.js +5 -0
  5. package/dist/collapsables/cascading-component/cascading-component-container-provider.d.ts +7 -0
  6. package/dist/collapsables/cascading-component/cascading-component-container-provider.js +28 -0
  7. package/dist/collapsables/cascading-component/cascading-component-container.d.ts +8 -0
  8. package/dist/collapsables/cascading-component/cascading-component-container.js +8 -0
  9. package/dist/collapsables/cascading-component/cascading-component.d.ts +13 -0
  10. package/dist/collapsables/cascading-component/cascading-component.js +44 -0
  11. package/dist/collapsables/cascading-component/types.d.ts +11 -0
  12. package/dist/collapsables/cascading-component/use-cascading-component-container.d.ts +2 -0
  13. package/dist/collapsables/cascading-component/use-cascading-component-container.js +8 -0
  14. package/dist/collapsables/cascading-component/use-cascading-component.d.ts +2 -0
  15. package/dist/collapsables/cascading-component/use-cascading-component.js +14 -0
  16. package/dist/collapsables/cascading-component/use-has-cascading-component-container.d.ts +1 -0
  17. package/dist/collapsables/cascading-component/use-has-cascading-component-container.js +7 -0
  18. package/dist/collapsables/unmounter/unmounter.d.ts +14 -0
  19. package/dist/collapsables/unmounter/unmounter.js +43 -0
  20. package/dist/collapsables/unmounter/utils.d.ts +2 -0
  21. package/dist/collapsables/unmounter/utils.js +18 -0
  22. package/dist/exports.d.ts +15 -1
  23. package/dist/icons/glyph/glyphs-arrow-blackcaps-right-icon.js +7 -0
  24. package/dist/index.js +14 -1
  25. package/dist/intl/translation-id.d.ts +1 -1
  26. package/dist/lists/icon-list/icon-list.d.ts +10 -0
  27. package/dist/lists/icon-list/icon-list.js +11 -0
  28. package/dist/lists/icon-list/icon-list.module.css.js +3 -0
  29. package/dist/lists/menu-list/menu-list-back-button.d.ts +7 -0
  30. package/dist/lists/menu-list/menu-list-back-button.js +9 -0
  31. package/dist/lists/menu-list/menu-list-header.d.ts +7 -0
  32. package/dist/lists/menu-list/menu-list-header.js +10 -0
  33. package/dist/lists/menu-list/menu-list-item.d.ts +26 -0
  34. package/dist/lists/menu-list/menu-list-item.js +20 -0
  35. package/dist/lists/menu-list/menu-list.d.ts +14 -0
  36. package/dist/lists/menu-list/menu-list.js +13 -0
  37. package/dist/lists/menu-list/menu-list.module.css.js +3 -0
  38. package/dist/modals/signin/sign-in-dialog.js +2 -2
  39. package/dist/pages/checkout/cart-page/cart-page.js +1 -1
  40. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.js +1 -1
  41. package/dist/pages/checkout/payment-page/components/adyen-payment.js +1 -1
  42. package/dist/pages/checkout/payment-page/payment-page-content.js +1 -1
  43. package/dist/shared/utils/date.js +1 -1
  44. package/dist/styles.css +319 -4
  45. package/package.json +1 -1
  46. package/dist/lists/ul/list.d.ts +0 -10
  47. package/dist/lists/ul/list.js +0 -11
  48. package/dist/lists/ul/list.module.css.js +0 -3
@@ -9,8 +9,9 @@ export interface LinkProps {
9
9
  isDisabled?: boolean;
10
10
  onClick?: MouseEventHandler<HTMLElement>;
11
11
  onKeyUp?: (event: KeyboardEvent) => void;
12
+ role?: string;
12
13
  tabIndex?: number;
13
14
  target?: string;
14
15
  title?: string;
15
16
  }
16
- export declare function Link({ children, className, color, hasUnderline, href, id, isDisabled, onClick, onKeyUp, tabIndex, target, title, ...rest }: LinkProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function Link({ children, className, color, hasUnderline, href, id, isDisabled, onClick, onKeyUp, role, tabIndex, target, title, ...rest }: LinkProps): import("react/jsx-runtime").JSX.Element;
@@ -3,17 +3,17 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import clsx from 'clsx';
4
4
  import styles from './link.module.css.js';
5
5
 
6
- function Link({ children, className, color, hasUnderline, href, id, isDisabled, onClick, onKeyUp, tabIndex, target, title, ...rest }) {
6
+ function Link({ children, className, color, hasUnderline, href, id, isDisabled, onClick, onKeyUp, role, tabIndex, target, title, ...rest }) {
7
7
  if (href) {
8
8
  return (jsx("a", { className: clsx({
9
9
  [styles.hover]: Boolean(href || onClick),
10
10
  [styles['has-underline']]: hasUnderline,
11
- }, styles['link'], color && styles[color], className), "data-disabled": isDisabled ? true : undefined, href: href, id: id, onClick: onClick, onKeyUp: onKeyUp, tabIndex: isDisabled ? -1 : tabIndex, target: target, title: title, ...rest, children: children }));
11
+ }, styles['link'], color && styles[color], className), "data-disabled": isDisabled ? true : undefined, href: href, id: id, onClick: onClick, onKeyUp: onKeyUp, role: role, tabIndex: isDisabled ? -1 : tabIndex, target: target, title: title, ...rest, children: children }));
12
12
  }
13
13
  return (jsx("button", { className: clsx({
14
14
  [styles.hover]: Boolean(href || onClick),
15
15
  [styles['has-underline']]: hasUnderline,
16
- }, styles['link'], color && styles[color], className), "data-disabled": isDisabled ? true : undefined, disabled: isDisabled ? true : undefined, id: id, onClick: onClick, onKeyUp: onKeyUp, tabIndex: isDisabled ? -1 : tabIndex, title: title, type: "button", ...rest, children: children }));
16
+ }, styles['link'], color && styles[color], className), "data-disabled": isDisabled ? true : undefined, disabled: isDisabled ? true : undefined, id: id, onClick: onClick, onKeyUp: onKeyUp, role: role, tabIndex: isDisabled ? -1 : tabIndex, title: title, type: "button", ...rest, children: children }));
17
17
  }
18
18
 
19
19
  export { Link };
@@ -0,0 +1,2 @@
1
+ import { CascadingComponentContainerContextType } from './types';
2
+ export declare const CascadingComponentContainerContext: React.Context<CascadingComponentContainerContextType | null>;
@@ -0,0 +1,5 @@
1
+ import { createContext } from 'react';
2
+
3
+ const CascadingComponentContainerContext = createContext(null);
4
+
5
+ export { CascadingComponentContainerContext };
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export interface CascadingComponentContainerProps {
3
+ children: ReactNode;
4
+ onClose?: VoidFunction;
5
+ timeout?: number;
6
+ }
7
+ export declare function CascadingComponentContainerProvider({ children, onClose, timeout, }: CascadingComponentContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useState, useMemo, useEffect } from 'react';
3
+ import { voidFunction } from '../../shared/model/defaults.js';
4
+ import { CascadingComponentContainerContext } from './cascading-component-container-context.js';
5
+ import { useCascadingComponentContainer } from './use-cascading-component-container.js';
6
+
7
+ function CascadingComponentContainerProvider({ children, onClose, timeout, }) {
8
+ const parentContext = useCascadingComponentContainer();
9
+ const [closeChildrenFns, updateCloseChildrenFns] = useState([]);
10
+ const value = useMemo(() => ({
11
+ close: onClose || voidFunction,
12
+ closeChildCascadingComponents: () => closeChildrenFns.forEach(fn => fn()),
13
+ registerChild: onClose => updateCloseChildrenFns(fns => [...fns, onClose]),
14
+ timeout,
15
+ unregisterChild: onClose => updateCloseChildrenFns(fns => fns.filter(fn => fn !== onClose)),
16
+ }),
17
+ // eslint-disable-next-line react-hooks/exhaustive-deps
18
+ [onClose, timeout]);
19
+ useEffect(() => {
20
+ if (!parentContext || !onClose)
21
+ return;
22
+ parentContext.registerChild(onClose);
23
+ return () => parentContext.unregisterChild(onClose);
24
+ }, [onClose, parentContext]);
25
+ return (jsx(CascadingComponentContainerContext.Provider, { value: value, children: children }));
26
+ }
27
+
28
+ export { CascadingComponentContainerProvider };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface CascadingComponentProps {
3
+ children: React.ReactNode;
4
+ onClose?: VoidFunction;
5
+ timeout?: number;
6
+ }
7
+ export declare function CascadingComponentContainer({ children, onClose, timeout, }: CascadingComponentProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { CascadingComponentContainerProvider } from './cascading-component-container-provider.js';
3
+
4
+ function CascadingComponentContainer({ children, onClose, timeout, }) {
5
+ return (jsx(CascadingComponentContainerProvider, { onClose: onClose, timeout: timeout, children: children }));
6
+ }
7
+
8
+ export { CascadingComponentContainer };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { RefHTMLElement } from '../unmounter/utils';
3
+ import { CascadingComponentContainerProps } from './cascading-component-container-provider';
4
+ interface CascadingComponentProps<TElement extends HTMLElement = HTMLElement, RefElement extends RefHTMLElement<TElement> = undefined> {
5
+ children: React.ReactNode;
6
+ isVisible?: boolean;
7
+ nodeRef: React.Ref<RefElement>;
8
+ onUnmounted?: () => void;
9
+ timeout?: number;
10
+ }
11
+ export declare function CascadingComponent<TElement extends HTMLElement = HTMLElement, RefElement extends RefHTMLElement<TElement> = undefined>({ children, isVisible, nodeRef, onClose, onUnmounted, timeout, }: CascadingComponentProps<TElement, RefElement> & CascadingComponentContainerProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function InternalCascadingComponent<TElement extends HTMLElement = HTMLElement, RefElement extends RefHTMLElement<TElement> = undefined>({ children, isVisible: _isVisible, nodeRef, onUnmounted, timeout: timeout, }: CascadingComponentProps<TElement, RefElement>): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,44 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
+ import { useState, useEffect, useCallback } from 'react';
3
+ import { CSSTransition } from 'react-transition-group';
4
+ import { Unmounter } from '../unmounter/unmounter.js';
5
+ import { createAddEndListener } from '../unmounter/utils.js';
6
+ import { CascadingComponentContainerProvider } from './cascading-component-container-provider.js';
7
+ import { useCascadingComponentContainer } from './use-cascading-component-container.js';
8
+
9
+ function CascadingComponent({ children, isVisible = false, nodeRef, onClose, onUnmounted, timeout, }) {
10
+ const context = useCascadingComponentContainer();
11
+ if (!context) {
12
+ return (jsx(Fragment, { children: jsx(CascadingComponentContainerProvider, { onClose: onClose, timeout: timeout, children: jsx(InternalCascadingComponent, { isVisible: isVisible, nodeRef: nodeRef, onUnmounted: onUnmounted, timeout: timeout, children: children }) }) }));
13
+ }
14
+ return (jsx(InternalCascadingComponent, { isVisible: isVisible, nodeRef: nodeRef, onUnmounted: onUnmounted, timeout: timeout || context.timeout, children: children }));
15
+ }
16
+ function InternalCascadingComponent({ children, isVisible: _isVisible = false, nodeRef, onUnmounted, timeout: timeout, }) {
17
+ const [isVisible, setIsVisible] = useState(_isVisible);
18
+ const [unmount, setUnmount] = useState(false);
19
+ useEffect(() => {
20
+ if (_isVisible) {
21
+ setIsVisible(_isVisible);
22
+ setUnmount(false);
23
+ }
24
+ else {
25
+ setUnmount(true);
26
+ }
27
+ }, [_isVisible]);
28
+ useEffect(() => {
29
+ if (isVisible) {
30
+ setUnmount(false);
31
+ }
32
+ }, [isVisible]);
33
+ const onUnmountReady = useCallback(() => {
34
+ setIsVisible(false);
35
+ }, []);
36
+ const onClose = useCallback(() => {
37
+ setUnmount(true);
38
+ }, []);
39
+ return (jsx(CSSTransition, { mountOnEnter: true, unmountOnExit: true, ...(timeout === undefined
40
+ ? { addEndListener: createAddEndListener(nodeRef) }
41
+ : { timeout }), in: isVisible, nodeRef: nodeRef, children: jsx(Unmounter, { onUnmounted: onUnmounted, onUnmountReady: onUnmountReady, unmount: unmount, children: jsx(CascadingComponentContainerProvider, { onClose: onClose, timeout: timeout, children: children }) }) }));
42
+ }
43
+
44
+ export { CascadingComponent, InternalCascadingComponent };
@@ -0,0 +1,11 @@
1
+ export interface CascadingComponentContainerContextType {
2
+ close: VoidFunction;
3
+ closeChildCascadingComponents: VoidFunction;
4
+ registerChild: (closeFn: VoidFunction) => void;
5
+ timeout?: number;
6
+ unregisterChild: (closeFn: VoidFunction) => void;
7
+ }
8
+ export interface CascadingComponentContextType {
9
+ close: VoidFunction;
10
+ closeChildCascadingComponents: VoidFunction;
11
+ }
@@ -0,0 +1,2 @@
1
+ import { CascadingComponentContainerContextType } from './types';
2
+ export declare function useCascadingComponentContainer(): CascadingComponentContainerContextType | null;
@@ -0,0 +1,8 @@
1
+ import { useContext } from 'react';
2
+ import { CascadingComponentContainerContext } from './cascading-component-container-context.js';
3
+
4
+ function useCascadingComponentContainer() {
5
+ return useContext(CascadingComponentContainerContext);
6
+ }
7
+
8
+ export { useCascadingComponentContainer };
@@ -0,0 +1,2 @@
1
+ import { CascadingComponentContextType } from './types';
2
+ export declare function useCascadingComponent(): CascadingComponentContextType;
@@ -0,0 +1,14 @@
1
+ import { useCascadingComponentContainer } from './use-cascading-component-container.js';
2
+
3
+ function useCascadingComponent() {
4
+ const context = useCascadingComponentContainer();
5
+ if (!context) {
6
+ throw new Error('useCascadingComponent must be used within a CascadingComponentProvider');
7
+ }
8
+ return {
9
+ close: context.close,
10
+ closeChildCascadingComponents: context.closeChildCascadingComponents,
11
+ };
12
+ }
13
+
14
+ export { useCascadingComponent };
@@ -0,0 +1 @@
1
+ export declare function useHasCascadingComponentContainer(): boolean;
@@ -0,0 +1,7 @@
1
+ import { useCascadingComponentContainer } from './use-cascading-component-container.js';
2
+
3
+ function useHasCascadingComponentContainer() {
4
+ return Boolean(useCascadingComponentContainer());
5
+ }
6
+
7
+ export { useHasCascadingComponentContainer };
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ export interface UnmounterContextType {
3
+ registerChild: () => void;
4
+ unmount: boolean;
5
+ unregisterChild: () => void;
6
+ }
7
+ export declare const UnmounterContext: React.Context<UnmounterContextType | null>;
8
+ export declare function useUnmount(): UnmounterContextType | null;
9
+ export declare function Unmounter({ children: children, onUnmounted, onUnmountReady, unmount: _unmount, }: {
10
+ children: ReactNode;
11
+ onUnmountReady?: () => void;
12
+ onUnmounted?: () => void;
13
+ unmount?: boolean;
14
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,43 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { createContext, useContext, useState, useEffect, useMemo } from 'react';
3
+
4
+ const UnmounterContext = createContext(null);
5
+ function useUnmount() {
6
+ const context = useContext(UnmounterContext);
7
+ return context;
8
+ }
9
+ function Unmounter({ children: children, onUnmounted, onUnmountReady, unmount: _unmount = false, }) {
10
+ const parentContext = useUnmount();
11
+ const [hadChildren, setHadChildren] = useState(false);
12
+ const [childCount, updateChildCount] = useState(0);
13
+ const unmount = Boolean(_unmount || parentContext?.unmount);
14
+ useEffect(() => {
15
+ return () => onUnmounted?.();
16
+ }, [onUnmounted]);
17
+ useEffect(() => {
18
+ if (!parentContext)
19
+ return;
20
+ parentContext.registerChild();
21
+ return () => {
22
+ parentContext.unregisterChild();
23
+ };
24
+ }, [parentContext]);
25
+ useEffect(() => {
26
+ if (!unmount || (hadChildren && childCount > 0))
27
+ return;
28
+ onUnmountReady?.();
29
+ }, [unmount, childCount, hadChildren, onUnmountReady]);
30
+ const value = useMemo(() => {
31
+ return {
32
+ registerChild: () => {
33
+ setHadChildren(true);
34
+ updateChildCount(count => count + 1);
35
+ },
36
+ unmount,
37
+ unregisterChild: () => updateChildCount(count => count - 1),
38
+ };
39
+ }, [unmount]);
40
+ return (jsx(UnmounterContext.Provider, { value: value, children: children }));
41
+ }
42
+
43
+ export { Unmounter, UnmounterContext, useUnmount };
@@ -0,0 +1,2 @@
1
+ export type RefHTMLElement<TElement extends HTMLElement> = TElement | undefined;
2
+ export declare function createAddEndListener<TElement extends HTMLElement, RefElement extends RefHTMLElement<TElement> = undefined>(nodeRef: React.Ref<RefElement>): (doneOrNode: VoidFunction | HTMLElement, done?: VoidFunction) => void;
@@ -0,0 +1,18 @@
1
+ function createAddEndListener(nodeRef) {
2
+ return function addEndListener(doneOrNode, done) {
3
+ if (done === undefined) {
4
+ if (typeof doneOrNode === 'function') {
5
+ if (nodeRef && 'current' in nodeRef && nodeRef.current) {
6
+ return nodeRef.current.addEventListener('transitionend', doneOrNode, false);
7
+ }
8
+ throw new Error('Unsupported CSSTransition addEndListener function call');
9
+ }
10
+ }
11
+ else if (typeof doneOrNode !== 'function') {
12
+ return doneOrNode.addEventListener('transitionend', done, false);
13
+ }
14
+ throw new Error('Unsupported CSSTransition addEndListener function call');
15
+ };
16
+ }
17
+
18
+ export { createAddEndListener };
package/dist/exports.d.ts CHANGED
@@ -58,7 +58,17 @@ export * from './cart-totals/cart-totals';
58
58
  export * from './cart-totals/cart-totals-summary';
59
59
  export * from './collapsables/accordion/accordion';
60
60
  export * from './collapsables/accordion/accordion-item';
61
+ export * from './collapsables/cascading-component/cascading-component';
62
+ export * from './collapsables/cascading-component/cascading-component-container';
63
+ export * from './collapsables/cascading-component/cascading-component-container-context';
64
+ export * from './collapsables/cascading-component/cascading-component-container-provider';
65
+ export * from './collapsables/cascading-component/types';
66
+ export * from './collapsables/cascading-component/use-cascading-component';
67
+ export * from './collapsables/cascading-component/use-cascading-component-container';
68
+ export * from './collapsables/cascading-component/use-has-cascading-component-container';
61
69
  export * from './collapsables/show-all/show-all';
70
+ export * from './collapsables/unmounter/unmounter';
71
+ export * from './collapsables/unmounter/utils';
62
72
  export * from './config';
63
73
  export * from './country-select/country-select';
64
74
  export * from './country-select/hooks/use-countries';
@@ -138,9 +148,13 @@ export * from './intl/use-language-code';
138
148
  export * from './intl/utils';
139
149
  export * from './lists/download-document-list/download-document-list';
140
150
  export * from './lists/feature-list/feature-list';
151
+ export * from './lists/icon-list/icon-list';
152
+ export * from './lists/menu-list/menu-list';
153
+ export * from './lists/menu-list/menu-list-back-button';
154
+ export * from './lists/menu-list/menu-list-header';
155
+ export * from './lists/menu-list/menu-list-item';
141
156
  export * from './lists/orderline-list/orderline-list';
142
157
  export * from './lists/product-overview-grid/product-overview-grid';
143
- export * from './lists/ul/list';
144
158
  export * from './loading/blank-page-spacer';
145
159
  export * from './loading/loading-overlay';
146
160
  export * from './loading/progress-circle';
@@ -0,0 +1,7 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+
3
+ function GlyphsArrowBlackCapsRightIcon(props) {
4
+ return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "11", viewBox: "0 0 11 11", width: "11", children: jsx("path", { d: "M2.31976777,11 C2.06899066,11 1.91614593,10.7405883 2.04903704,10.5406252 L5.82841248,4.85263431 C5.99833751,4.59667547 5.97375465,4.27015906 5.76703514,4.04017141 L2.58259687,0.493978041 C2.40732426,0.298743748 2.55482143,0 2.82650993,0 L5.99283031,0.000300244973 C6.08685178,0.000300244973 6.17600455,0.0392570302 6.23666356,0.106812149 L8.10264638,2.18458242 C9.16944677,3.37250165 9.29722976,5.05702607 8.4207071,6.37630248 L5.44211038,10.8588849 C5.38376599,10.9466315 5.28144382,11 5.17137965,11 L2.31976777,11 Z", fillRule: "evenodd" }) }));
5
+ }
6
+
7
+ export { GlyphsArrowBlackCapsRightIcon };
package/dist/index.js CHANGED
@@ -63,7 +63,16 @@ export { CartTotals, formatDisplayPriceToSymbolSpaceValue } from './cart-totals/
63
63
  export { CartTotalsSummary } from './cart-totals/cart-totals-summary.js';
64
64
  export { Accordion } from './collapsables/accordion/accordion.js';
65
65
  export { AccordionItem } from './collapsables/accordion/accordion-item.js';
66
+ export { CascadingComponent, InternalCascadingComponent } from './collapsables/cascading-component/cascading-component.js';
67
+ export { CascadingComponentContainer } from './collapsables/cascading-component/cascading-component-container.js';
68
+ export { CascadingComponentContainerContext } from './collapsables/cascading-component/cascading-component-container-context.js';
69
+ export { CascadingComponentContainerProvider } from './collapsables/cascading-component/cascading-component-container-provider.js';
70
+ export { useCascadingComponent } from './collapsables/cascading-component/use-cascading-component.js';
71
+ export { useCascadingComponentContainer } from './collapsables/cascading-component/use-cascading-component-container.js';
72
+ export { useHasCascadingComponentContainer } from './collapsables/cascading-component/use-has-cascading-component-container.js';
66
73
  export { ShowAll } from './collapsables/show-all/show-all.js';
74
+ export { Unmounter, UnmounterContext, useUnmount } from './collapsables/unmounter/unmounter.js';
75
+ export { createAddEndListener } from './collapsables/unmounter/utils.js';
67
76
  export { config, configPerEnvironment } from './config.js';
68
77
  export { CountrySelect } from './country-select/country-select.js';
69
78
  export { useCountries } from './country-select/hooks/use-countries.js';
@@ -141,9 +150,13 @@ export { useLanguageCode } from './intl/use-language-code.js';
141
150
  export { getLanguageCodeFromCultureCode, spireTranslateAdapter } from './intl/utils.js';
142
151
  export { DownloadDocumentList } from './lists/download-document-list/download-document-list.js';
143
152
  export { FeatureList } from './lists/feature-list/feature-list.js';
153
+ export { IconList, IconListItem } from './lists/icon-list/icon-list.js';
154
+ export { MenuList } from './lists/menu-list/menu-list.js';
155
+ export { MenuListBackButton } from './lists/menu-list/menu-list-back-button.js';
156
+ export { MenuListHeader } from './lists/menu-list/menu-list-header.js';
157
+ export { MenuListItem } from './lists/menu-list/menu-list-item.js';
144
158
  export { OrderLineList } from './lists/orderline-list/orderline-list.js';
145
159
  export { ProductOverviewGrid } from './lists/product-overview-grid/product-overview-grid.js';
146
- export { List, ListItem } from './lists/ul/list.js';
147
160
  export { BlankPageSpacer } from './loading/blank-page-spacer.js';
148
161
  export { LoadingOverlay } from './loading/loading-overlay.js';
149
162
  export { ProgressCircle } from './loading/progress-circle.js';
@@ -1 +1 @@
1
- export type TranslationId = "'{0}' in all products" | "Try 'Search' and try to find the product you're looking for" | "Unfortnately, We found no articles for your search '{0}'" | ' to your account to manage your lists.' | 'Access denied.' | 'Your email and password were not recognized.' | 'Add order notes' | 'Add to list' | 'Address' | 'Amount: {0}' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'An unexpected error occured. Please try again.' | 'Are you looking for information about our service? Please visit our customer support page' | 'Are you sure you want to remove all items from your cart?' | 'Are you sure you want to remove this item from your cart?' | 'article' | 'articles' | 'As soon as possible' | 'Attention' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Cancel' | 'Cart' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Chosen filters' | 'City' | 'Clear filters' | 'Clear' | 'Click the button below to continue shopping.' | 'Close' | 'Company name' | 'Conceal value' | 'Confirm password' | 'Continue shopping' | 'Continue to sign in' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Currency Change' | 'Current page' | 'Delivery date' | 'Delivery expected in {0} {1}' | 'Double check your spelling' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Email' | 'Enter your email address and we will send you an email that will allow you to recover your password.' | 'Excl. VAT' | 'Explore by categories' | 'Exploring our products by category' | 'facet.categories' | 'facet.height' | 'facet.weight' | 'Features' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Hide filters' | 'Home' | 'If an account matches the email address you entered, instructions on how to recover the password will be sent to that email address shortly. If you do not receive this email, please contact Customer Support.' | 'Incl. VAT' | 'Includes' | 'Industry' | 'Information' | 'Language' | 'Last name' | 'List name already exists' | 'More than {0} articles' | 'New list name' | 'New user?' | 'of' | 'Or continue as guest' | 'Order number' | 'Order' | 'Order confirmation' | 'Order date' | 'Order number' | 'Order' | 'Pay by invoice' | 'Pay' | 'Payment method' | 'Payment' | 'Password' | 'Passwords do not match' | 'Password does not meet requirements' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please enter a valid email address' | 'Please enter a valid phone number' | 'please go back to your cart.' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Print' | 'Private account' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quantity' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Requested delivery date' | 'Remember me' | 'Remove all' | 'Requested delivery date' | 'Submitting…' | 'Submit email address' | 'Recover your password' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Saved cart for later.' | 'Search' | 'Searching again using more general terms' | 'See all results' | 'Select a desired delivery date' | 'Selecting this country will result in your cart to be converted to the currency {0}' | 'Select a list' | 'Select an industry' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'sign in' | 'Sign me up for newsletters and product updates' | 'Signing in…' | 'Sonic address' | 'Sonic Equipment' | 'Sorry, there are no products found' | 'Sorry, we could not find matches for' | 'Sort by' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc' | 'sort.relevance' | 'Specifications' | 'Submit' | 'Subtotal' | 'Suggestions' | 'tag.limited' | 'tag.new' | 'The email address you entered is already associated with an existing account. Please sign in to this account or contact Customer Support.' | 'The expected delivery is an indication based on the product availability and the shipping location.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'There are no products in your shopping cart.' | 'Toggle navigation menu' | 'Total amount is' | 'Total' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to empty your cart.' | 'Unable to remove the product from your cart.' | 'Unable to save cart for later.' | 'Unable to update the product in your cart.' | 'Unknown' | 'Updating address' | 'Use billing address' | 'Use fewer keywords' | 'Validating' | 'validation.badInput' | 'validation.customError' | 'validation.invalid' | 'validation.patternMismatch' | 'validation.rangeOverflow' | 'validation.rangeUnderflow' | 'validation.stepMismatch' | 'validation.tooLong' | 'validation.tooShort' | 'validation.typeMismatch' | 'validation.valid' | 'validation.valueMissing' | 'VAT Number' | 'VAT' | 'Welcome to Sonic Equipment. Please choose your country and language below.' | 'What are you searching for?' | 'You selected a country where we invoice in a different currency. This will result in your cart being converted to the new currency. If you would like to review your order, ' | 'If you want to proceed, click the continue button. If you want to change your country, close this message and select a different country.' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You must ' | 'Your cart has been emptied.' | 'Your favorites are available on multiple devices' | 'Your shopping cart is still empty' | 'Your new Sonic Equipment account was succesfully created. You should receive an email soon with further instructions on how to activate this account. If you do not receive this email, please contact Customer Support.' | 'You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!';
1
+ export type TranslationId = "'{0}' in all products" | "Try 'Search' and try to find the product you're looking for" | "Unfortnately, We found no articles for your search '{0}'" | ' to your account to manage your lists.' | 'Access denied.' | 'Your email and password were not recognized.' | 'Add order notes' | 'Add to list' | 'Address' | 'Amount: {0}' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'An unexpected error occured. Please try again.' | 'Are you looking for information about our service? Please visit our customer support page' | 'Are you sure you want to remove all items from your cart?' | 'Are you sure you want to remove this item from your cart?' | 'article' | 'articles' | 'As soon as possible' | 'Attention' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Cancel' | 'Cart' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Chosen filters' | 'City' | 'Clear filters' | 'Clear' | 'Click the button below to continue shopping.' | 'Close' | 'Company name' | 'Conceal value' | 'Confirm password' | 'Continue shopping' | 'Continue to sign in' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Currency Change' | 'Current page' | 'Delivery date' | 'Delivery expected in {0} {1}' | 'Double check your spelling' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Email' | 'Enter your email address and we will send you an email that will allow you to recover your password.' | 'Excl. VAT' | 'Explore by categories' | 'Exploring our products by category' | 'facet.categories' | 'facet.height' | 'facet.weight' | 'Features' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Hide filters' | 'Home' | 'If an account matches the email address you entered, instructions on how to recover the password will be sent to that email address shortly. If you do not receive this email, please contact Customer Support.' | 'Incl. VAT' | 'Includes' | 'Industry' | 'Information' | 'Language' | 'Last name' | 'List name already exists' | 'More than {0} articles' | 'New list name' | 'New user?' | 'of' | 'Or continue as guest' | 'Order number' | 'Order' | 'Order confirmation' | 'Order date' | 'Order number' | 'Order' | 'Pay by invoice' | 'Pay' | 'Payment method' | 'Payment' | 'Password' | 'Passwords do not match' | 'Password does not meet requirements' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please enter a valid email address' | 'Please enter a valid phone number' | 'please go back to your cart.' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Print' | 'Private account' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quantity' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Requested delivery date' | 'Remember me' | 'Remove all' | 'Requested delivery date' | 'Submenu' | 'Submitting…' | 'Submit email address' | 'Recover your password' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Saved cart for later.' | 'Search' | 'Searching again using more general terms' | 'See all results' | 'Select a desired delivery date' | 'Selecting this country will result in your cart to be converted to the currency {0}' | 'Select a list' | 'Select an industry' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'sign in' | 'Sign me up for newsletters and product updates' | 'Signing in…' | 'Sonic address' | 'Sonic Equipment' | 'Sorry, there are no products found' | 'Sorry, we could not find matches for' | 'Sort by' | 'sort.newest' | 'sort.price_asc' | 'sort.price_desc' | 'sort.relevance' | 'Specifications' | 'Submit' | 'Subtotal' | 'Suggestions' | 'tag.limited' | 'tag.new' | 'The email address you entered is already associated with an existing account. Please sign in to this account or contact Customer Support.' | 'The expected delivery is an indication based on the product availability and the shipping location.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'There are no products in your shopping cart.' | 'Toggle navigation menu' | 'Total amount is' | 'Total' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to empty your cart.' | 'Unable to remove the product from your cart.' | 'Unable to save cart for later.' | 'Unable to update the product in your cart.' | 'Unknown' | 'Updating address' | 'Use billing address' | 'Use fewer keywords' | 'Validating' | 'validation.badInput' | 'validation.customError' | 'validation.invalid' | 'validation.patternMismatch' | 'validation.rangeOverflow' | 'validation.rangeUnderflow' | 'validation.stepMismatch' | 'validation.tooLong' | 'validation.tooShort' | 'validation.typeMismatch' | 'validation.valid' | 'validation.valueMissing' | 'VAT Number' | 'VAT' | 'Welcome to Sonic Equipment. Please choose your country and language below.' | 'What are you searching for?' | 'You selected a country where we invoice in a different currency. This will result in your cart being converted to the new currency. If you would like to review your order, ' | 'If you want to proceed, click the continue button. If you want to change your country, close this message and select a different country.' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You must ' | 'Your cart has been emptied.' | 'Your favorites are available on multiple devices' | 'Your shopping cart is still empty' | 'Your new Sonic Equipment account was succesfully created. You should receive an email soon with further instructions on how to activate this account. If you do not receive this email, please contact Customer Support.' | 'You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!';
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export interface IconListProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare function IconList({ children }: IconListProps): import("react/jsx-runtime").JSX.Element;
6
+ export interface IconListItemProps {
7
+ icon?: ReactNode;
8
+ text: ReactNode;
9
+ }
10
+ export declare function IconListItem({ icon, text }: IconListItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import styles from './icon-list.module.css.js';
3
+
4
+ function IconList({ children }) {
5
+ return jsx("ul", { className: styles['icon-list'], children: children });
6
+ }
7
+ function IconListItem({ icon, text }) {
8
+ return (jsxs("li", { className: styles['icon-list-item'], children: [icon && jsx("span", { className: styles.icon, children: icon }), text] }));
9
+ }
10
+
11
+ export { IconList, IconListItem };
@@ -0,0 +1,3 @@
1
+ var styles = {"icon-list":"icon-list-module-tWkJY","icon-list-item":"icon-list-module-3BzE4","icon":"icon-list-module-9-620"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface MenuListBackButtonProps {
3
+ children: ReactNode;
4
+ onClick: VoidFunction;
5
+ }
6
+ export declare function MenuListBackButton({ children, onClick, }: MenuListBackButtonProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { GlyphsChevronsSlimLeftIcon } from '../../icons/glyph/glyphs-chevrons-slim-left-icon.js';
3
+ import styles from './menu-list.module.css.js';
4
+
5
+ function MenuListBackButton({ children, onClick, }) {
6
+ return (jsxs("button", { className: styles['menu-list-back-button'], onClick: onClick, type: "button", children: [jsx(GlyphsChevronsSlimLeftIcon, { className: styles['icon'], role: "presentation" }), children] }));
7
+ }
8
+
9
+ export { MenuListBackButton };
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface MenuListHeaderProps {
3
+ children: ReactNode;
4
+ href?: string;
5
+ }
6
+ export declare function MenuListHeader({ children, href }: MenuListHeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { GlyphsArrowBlackCapsRightIcon } from '../../icons/glyph/glyphs-arrow-blackcaps-right-icon.js';
3
+ import { RouteLink } from '../../shared/routing/route-link.js';
4
+ import styles from './menu-list.module.css.js';
5
+
6
+ function MenuListHeader({ children, href }) {
7
+ return (jsxs("h2", { className: styles['menu-list-header'], children: [href && (jsxs(RouteLink, { href: href, children: [children, jsx(GlyphsArrowBlackCapsRightIcon, { className: styles['icon'], role: "presentation" })] })), !href && children] }));
8
+ }
9
+
10
+ export { MenuListHeader };
@@ -0,0 +1,26 @@
1
+ import { ReactNode } from 'react';
2
+ import { ImageType } from '../../shared/model/image';
3
+ interface MenuListItemPropsBase {
4
+ children: ReactNode | string;
5
+ onClick?: VoidFunction;
6
+ }
7
+ interface MenuListItemNoChildrenProps {
8
+ hasChildren?: false;
9
+ href: string;
10
+ }
11
+ interface MenuListItemWithChildrenProps {
12
+ 'aria-controls'?: string;
13
+ hasChildren: true;
14
+ isSelected?: boolean;
15
+ }
16
+ interface MenuListItemWithImageProps {
17
+ badge?: never;
18
+ image?: ImageType;
19
+ }
20
+ interface MenuListItemWithBadgeProps {
21
+ badge?: ReactNode;
22
+ image?: never;
23
+ }
24
+ export type MenuListItemProps = MenuListItemPropsBase & (MenuListItemNoChildrenProps | MenuListItemWithChildrenProps) & (MenuListItemWithImageProps | MenuListItemWithBadgeProps);
25
+ export declare function MenuListItem(props: MenuListItemProps): import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -0,0 +1,20 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import clsx from 'clsx';
3
+ import { GlyphsChevronsSlimRightIcon } from '../../icons/glyph/glyphs-chevrons-slim-right-icon.js';
4
+ import { useFormattedMessage } from '../../intl/use-formatted-message.js';
5
+ import { Image } from '../../media/image/image.js';
6
+ import { RouteLink } from '../../shared/routing/route-link.js';
7
+ import styles from './menu-list.module.css.js';
8
+
9
+ function MenuListItem(props) {
10
+ const { children, hasChildren, onClick } = props;
11
+ const href = 'href' in props ? props.href : undefined;
12
+ const isSelected = 'isSelected' in props ? props.isSelected : false;
13
+ const badge = 'badge' in props ? props.badge : undefined;
14
+ const image = 'image' in props ? props.image : undefined;
15
+ const ariaControls = 'aria-controls' in props ? props['aria-controls'] : undefined;
16
+ const t = useFormattedMessage();
17
+ return (jsxs("li", { "aria-owns": ariaControls, className: clsx(styles['menu-list-item'], isSelected && styles['selected'], hasChildren && styles['has-children']), children: [image && (jsx("span", { className: styles['image'], role: "presentation", children: jsx(Image, { fit: "contain", image: image, title: "" }) })), badge && jsx("span", { className: styles['badge'], children: badge }), jsx(RouteLink, { "aria-controls": ariaControls, "aria-expanded": ariaControls && isSelected, "aria-haspopup": hasChildren ? 'true' : undefined, className: styles['label'], href: href, onClick: onClick, role: hasChildren ? 'menuitem' : undefined, children: children }), hasChildren && (jsx(GlyphsChevronsSlimRightIcon, { "aria-description": `(${t('Submenu')})`, className: styles['icon'] }))] }));
18
+ }
19
+
20
+ export { MenuListItem };
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ export interface MenuListProps {
3
+ back?: {
4
+ onClick: () => void;
5
+ title: string;
6
+ };
7
+ children: ReactNode;
8
+ header?: string | {
9
+ href: string;
10
+ title: string;
11
+ };
12
+ variant?: 'default' | 'primary';
13
+ }
14
+ export declare function MenuList({ back, children, header, variant, }: MenuListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import clsx from 'clsx';
3
+ import { MenuListBackButton } from './menu-list-back-button.js';
4
+ import { MenuListHeader } from './menu-list-header.js';
5
+ import styles from './menu-list.module.css.js';
6
+
7
+ function MenuList({ back, children, header, variant = 'default', }) {
8
+ const headerTitle = typeof header === 'string' ? header : header?.title;
9
+ const headerHref = typeof header === 'string' ? undefined : header?.href;
10
+ return (jsxs("section", { className: clsx(styles['menu-list'], styles[variant]), role: "menu", children: [back && (jsx(MenuListBackButton, { onClick: back.onClick, children: back.title })), jsxs("div", { className: styles['scroll-area'], children: [header && (jsx(MenuListHeader, { href: headerHref, children: headerTitle })), jsx("ul", { className: styles['list'], children: children })] })] }));
11
+ }
12
+
13
+ export { MenuList };
@@ -0,0 +1,3 @@
1
+ var styles = {"menu-list":"menu-list-module-TloB9","primary":"menu-list-module-xUg6i","scroll-area":"menu-list-module-x3D-V","list":"menu-list-module-m3rpo","menu-list-back-button":"menu-list-module-eKDL9","icon":"menu-list-module-syyw9","menu-list-header":"menu-list-module-S08LI","menu-list-item":"menu-list-module-4QhF4","label":"menu-list-module-xFYyo","image":"menu-list-module-ELekn","badge":"menu-list-module-4PbP-","selected":"menu-list-module-hiMca","has-children":"menu-list-module-61uJb"};
2
+
3
+ export { styles as default };
@@ -3,7 +3,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { SolidOkayIcon } from '../../icons/solid/solid-okay-icon.js';
4
4
  import { FormattedMessage } from '../../intl/formatted-message.js';
5
5
  import { useFormattedMessage } from '../../intl/use-formatted-message.js';
6
- import { List, ListItem } from '../../lists/ul/list.js';
6
+ import { IconList, IconListItem } from '../../lists/icon-list/icon-list.js';
7
7
  import { useFavorite } from '../../shared/providers/favorite-provider.js';
8
8
  import { RouteButton } from '../../shared/routing/route-button.js';
9
9
  import { Dialog } from '../dialog/dialog.js';
@@ -15,7 +15,7 @@ function SignInDialog({ isOpen, onOpenChange }) {
15
15
  const location = getLocation();
16
16
  if (!location)
17
17
  return null;
18
- return (jsx(Dialog, { isDismissable: true, footer: jsxs(Fragment, { children: [jsx(RouteButton, { withArrow: true, color: "primary", href: `${signInUrl}?returnUrl=${encodeURIComponent(location.pathname + location.search)}`, onClick: () => onOpenChange(false), variant: "solid", children: jsx(FormattedMessage, { id: "sign in" }) }), jsx(RouteButton, { color: "secondary", href: `${signInUrl}?returnUrl=${encodeURIComponent(location.pathname + location.search)}`, onClick: () => onOpenChange(false), variant: "outline", children: jsx(FormattedMessage, { id: "create account" }) })] }), isOpen: isOpen, onOpenChange: onOpenChange, title: t('Shop more efficiently and quicker with a favorites list'), children: jsxs(List, { children: [jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Easily add your favorite products') }), jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Your favorites are available on multiple devices') }), jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Share your favorite list with others') })] }) }));
18
+ return (jsx(Dialog, { isDismissable: true, footer: jsxs(Fragment, { children: [jsx(RouteButton, { withArrow: true, color: "primary", href: `${signInUrl}?returnUrl=${encodeURIComponent(location.pathname + location.search)}`, onClick: () => onOpenChange(false), variant: "solid", children: jsx(FormattedMessage, { id: "sign in" }) }), jsx(RouteButton, { color: "secondary", href: `${signInUrl}?returnUrl=${encodeURIComponent(location.pathname + location.search)}`, onClick: () => onOpenChange(false), variant: "outline", children: jsx(FormattedMessage, { id: "create account" }) })] }), isOpen: isOpen, onOpenChange: onOpenChange, title: t('Shop more efficiently and quicker with a favorites list'), children: jsxs(IconList, { children: [jsx(IconListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Easily add your favorite products') }), jsx(IconListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Your favorites are available on multiple devices') }), jsx(IconListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Share your favorite list with others') })] }) }));
19
19
  }
20
20
 
21
21
  export { SignInDialog };
@@ -100,7 +100,7 @@ function CartContent({ cartLines }) {
100
100
  originalTotalPrice: ensureNumber(cartLine.properties.totalListPrice),
101
101
  pricePerUnit: cartLine.pricing?.unitNetPrice || 0,
102
102
  totalPrice: cartLine.pricing?.extendedUnitNetPrice || 0,
103
- }, productId: cartLine.productId || '', sku: cartLine.erpNumber || '', tags: [], title: cartLine.productName }, cartLine.id))) }) }));
103
+ }, productId: cartLine.productId || '', sku: cartLine.erpNumber || '', tags: [], title: cartLine.shortDescription }, cartLine.id))) }) }));
104
104
  }
105
105
  function CartPage() {
106
106
  const t = useFormattedMessage();
@@ -89,7 +89,7 @@ function OrderConfirmationPageContent({ cart, }) {
89
89
  originalTotalPrice: ensureNumber(cartLine.properties.totalListPrice),
90
90
  pricePerUnit: cartLine.pricing?.unitNetPrice || 0,
91
91
  totalPrice: cartLine.pricing?.extendedUnitNetPrice || 0,
92
- }, productId: cartLine.productId || '', quantity: cartLine.qtyOrdered || 1, sku: cartLine.erpNumber || '', tags: [], title: cartLine.productName }, cartLine.id))) }) }) })] }) }) }));
92
+ }, productId: cartLine.productId || '', quantity: cartLine.qtyOrdered || 1, sku: cartLine.erpNumber || '', tags: [], title: cartLine.shortDescription }, cartLine.id))) }) }) })] }) }) }));
93
93
  }
94
94
 
95
95
  export { OrderConfirmationPageContent };
@@ -47,7 +47,7 @@ function AdyenPayment({ amount, cartId, countryCode, currencyCode, customerId, d
47
47
  redirectResult: state.details.redirectResult,
48
48
  });
49
49
  if (amount.toFixed(2).replaceAll(/[,.]/gi, '') !== adyenAmount)
50
- return onError(new Error('Invalid amount'), result);
50
+ return onError(new Error(`Invalid amount submitted '${amount.toFixed(2).replaceAll(/[,.]/gi, '')}' vs received '${adyenAmount}'`), result);
51
51
  if (customerId !== adyenCustomerId)
52
52
  return onError(new Error('Invalid customer'), result);
53
53
  return handlePaymentResponse(result, onComplete, onError);
@@ -43,7 +43,7 @@ function PaymentPageContent({ atp, cart, formId, hasAtp, isProcessing, isValidat
43
43
  originalTotalPrice: ensureNumber(cartLine.properties.totalListPrice),
44
44
  pricePerUnit: cartLine.pricing?.unitNetPrice || 0,
45
45
  totalPrice: cartLine.pricing?.extendedUnitNetPrice || 0,
46
- }, productId: cartLine.productId || '', quantity: cartLine.qtyOrdered || 1, sku: cartLine.erpNumber || '', tags: [], title: cartLine.productName }, cartLine.id))) }) }) })] }) }));
46
+ }, productId: cartLine.productId || '', quantity: cartLine.qtyOrdered || 1, sku: cartLine.erpNumber || '', tags: [], title: cartLine.shortDescription }, cartLine.id))) }) }) })] }) }));
47
47
  }
48
48
 
49
49
  export { PaymentPageContent };
@@ -33,7 +33,7 @@ const dateThresholds = [
33
33
  function getDateUnitObject(date) {
34
34
  const fallbackDateUnitObject = { number: 6, unit: 'month' };
35
35
  const days = getDaysDifference(date, new Date());
36
- if (days < 1)
36
+ if (days <= -1)
37
37
  return fallbackDateUnitObject;
38
38
  for (const threshold of dateThresholds) {
39
39
  if (days <= threshold.numberOfDays) {
package/dist/styles.css CHANGED
@@ -1464,6 +1464,9 @@
1464
1464
  opacity: 1;
1465
1465
  visibility: visible;
1466
1466
  }
1467
+ .input-module-2woJR .input-module-zjVxG input[type='password']::-ms-reveal {
1468
+ display: none;
1469
+ }
1467
1470
 
1468
1471
  .number-field-module-xawWc .number-field-module-A1nvE {
1469
1472
  display: flex;
@@ -1948,7 +1951,7 @@
1948
1951
  }
1949
1952
  }
1950
1953
 
1951
- .list-module-7-DFP {
1954
+ .icon-list-module-tWkJY {
1952
1955
  display: flex;
1953
1956
  flex-direction: column;
1954
1957
  padding: 0;
@@ -1957,13 +1960,13 @@
1957
1960
  list-style: none;
1958
1961
  }
1959
1962
 
1960
- .list-module-YMLVY .list-module-wTIOA {
1963
+ .icon-list-module-3BzE4 .icon-list-module-9-620 {
1961
1964
  display: block;
1962
1965
  width: 24px;
1963
1966
  height: 24px;
1964
1967
  }
1965
1968
 
1966
- .list-module-YMLVY {
1969
+ .icon-list-module-3BzE4 {
1967
1970
 
1968
1971
  display: flex;
1969
1972
  align-items: center;
@@ -2612,7 +2615,7 @@
2612
2615
  aspect-ratio: 1 / 1;
2613
2616
  background-color: var(--color-brand-light-gray);
2614
2617
  content: '';
2615
- inset: 0;
2618
+ inset: var(--space-2);
2616
2619
  }
2617
2620
 
2618
2621
  @media (width >= 768px) {
@@ -5715,6 +5718,318 @@ button.swiper-pagination-bullet {
5715
5718
  height: 20px;
5716
5719
  }
5717
5720
 
5721
+ .menu-list-module-TloB9 {
5722
+ --ml-font-size: var(--font-size-16);
5723
+ --ml-font-weight: var(--font-weight-normal);
5724
+ --ml-item-minimal-height: 48px;
5725
+ --ml-item-inner-spacing: var(--space-12);
5726
+ --ml-item-outer-spacing: var(--space-16);
5727
+ --ml-icon-size: 16px;
5728
+
5729
+ position: relative;
5730
+ display: grid;
5731
+ overflow: hidden;
5732
+ color: currentcolor;
5733
+ font-size: var(--ml-font-size);
5734
+ grid-template: auto 1fr / 1fr;
5735
+ grid-template-areas:
5736
+ 'back-button'
5737
+ 'scroll-area';
5738
+ }
5739
+
5740
+ /* TODO: scroll area row should stretch to avail height, but also enforce the scroll-area to scroll if overflowing */
5741
+
5742
+ .menu-list-module-TloB9.menu-list-module-xUg6i {
5743
+ --ml-font-size: var(--font-size-18);
5744
+ --ml-font-weight: var(--font-weight-bold);
5745
+ --ml-button-hover-color: var(--color-white);
5746
+ --ml-button-hover-bgcolor: var(--color-brand-red);
5747
+ --ml-link-hover-color: var(--color-white);
5748
+ --ml-link-hover-bgcolor: var(--color-brand-red);
5749
+ --ml-selected-color: var(--color-white);
5750
+ --ml-selected-bgcolor: var(--color-brand-red);
5751
+ }
5752
+
5753
+ /* scroll area */
5754
+
5755
+ .menu-list-module-TloB9 .menu-list-module-x3D-V {
5756
+ grid-area: scroll-area;
5757
+ overflow-y: auto;
5758
+ scrollbar-width: thin;
5759
+ }
5760
+
5761
+ /* list */
5762
+
5763
+ .menu-list-module-TloB9 .menu-list-module-m3rpo {
5764
+ display: grid;
5765
+ padding: 0 0 1px;
5766
+ margin: 0;
5767
+ grid-template-columns: 1fr;
5768
+ list-style: none;
5769
+ }
5770
+
5771
+ .menu-list-module-TloB9 .menu-list-module-m3rpo > * {
5772
+ margin-block: 0 -1px;
5773
+ }
5774
+
5775
+ /* menu list back button */
5776
+
5777
+ .menu-list-module-eKDL9 {
5778
+ all: unset;
5779
+ display: flex;
5780
+ align-items: center;
5781
+ padding: var(--space-4) var(--ml-item-outer-spacing, var(--space-8));
5782
+ background: var(--color-brand-light-gray);
5783
+ cursor: pointer;
5784
+ gap: var(--space-4);
5785
+ grid-area: back-button;
5786
+ inset-block-start: 0;
5787
+ min-block-size: var(--ml-item-minimal-height, 0);
5788
+ }
5789
+
5790
+ .menu-list-module-eKDL9:focus-visible {
5791
+ box-shadow: inset var(--shadow-focus-outline);
5792
+ }
5793
+
5794
+ .menu-list-module-eKDL9 .menu-list-module-syyw9 {
5795
+ block-size: var(--ml-icon-size);
5796
+ inline-size: var(--ml-icon-size);
5797
+ }
5798
+
5799
+ /* menu list title */
5800
+
5801
+ .menu-list-module-S08LI {
5802
+ position: relative;
5803
+ display: flex;
5804
+ align-items: center;
5805
+ padding: var(--space-8) var(--ml-item-outer-spacing, 0);
5806
+ margin: 0 0 -2px;
5807
+ background: var(--color-white);
5808
+ color: var(--color-brand-dark-gray);
5809
+ font-size: var(--text-heading-xxxs-size);
5810
+ font-style: italic;
5811
+ font-weight: var(--font-weight-black);
5812
+ line-height: 1;
5813
+ min-block-size: var(--ml-item-minimal-height, 0);
5814
+ text-wrap: pretty;
5815
+ }
5816
+
5817
+ .menu-list-module-S08LI [href] {
5818
+ position: static;
5819
+ display: flex;
5820
+ align-items: center;
5821
+ box-shadow: none;
5822
+ color: var(--color-brand-dark-gray);
5823
+ }
5824
+
5825
+ .menu-list-module-S08LI [href]:hover {
5826
+ color: var(--color-brand-red);
5827
+ }
5828
+
5829
+ .menu-list-module-S08LI [href] .menu-list-module-syyw9 {
5830
+ flex-shrink: 0;
5831
+ block-size: 1ex;
5832
+ inline-size: 1ex;
5833
+ margin-block-start: 0.1em;
5834
+ }
5835
+
5836
+ .menu-list-module-S08LI [href]::after {
5837
+ position: absolute;
5838
+ background: transparent;
5839
+ content: '';
5840
+ inset: 0;
5841
+ }
5842
+
5843
+ .menu-list-module-S08LI:has(:focus-visible) {
5844
+ z-index: 1;
5845
+ box-shadow: inset var(--shadow-focus-outline);
5846
+ }
5847
+
5848
+ /* menu list item */
5849
+
5850
+ .menu-list-module-4QhF4 {
5851
+ --mli-button-hover-color: var(--ml-button-hover-color, currentcolor);
5852
+ --mli-button-hover-bgcolor: var(
5853
+ --ml-button-hover-bgcolor,
5854
+ var(--color-brand-light-gray)
5855
+ );
5856
+ --mli-link-hover-color: var(--ml-link-hover-color, var(--color-brand-red));
5857
+ --mli-link-hover-bgcolor: var(--ml-link-hover-bgcolor, transparent);
5858
+ --mli-selected-color: var(--ml-selected-color, currentcolor);
5859
+ --mli-selected-bgcolor: var(
5860
+ --ml-selected-bgcolor,
5861
+ var(--color-brand-light-gray)
5862
+ );
5863
+ --mli-inner-spacing: var(--ml-item-inner-spacing, var(--space-12));
5864
+ --mli-outer-spacing: var(--ml-item-outer-spacing, var(--space-16));
5865
+ --mli-image-size: 48px;
5866
+ --mli-badge-size: 24px;
5867
+ --mli-icon-size: var(--ml-icon-size, 16px);
5868
+
5869
+ position: relative;
5870
+ z-index: 0;
5871
+ display: grid;
5872
+ align-items: center;
5873
+ padding: var(--space-8) 0;
5874
+ margin: 0;
5875
+ grid-template:
5876
+ minmax(var(--ml-item-minimal-height, 48px), min-content) / var(
5877
+ --mli-outer-spacing
5878
+ )
5879
+ minmax(0, min-content) 1fr var(--mli-outer-spacing);
5880
+ grid-template-areas: '. imagebadge label .';
5881
+
5882
+ /* children icon */
5883
+ }
5884
+
5885
+ /* separator lines */
5886
+
5887
+ .menu-list-module-4QhF4::before,
5888
+ .menu-list-module-4QhF4::after {
5889
+ position: absolute;
5890
+ z-index: -2;
5891
+ background: var(--color-brand-light-gray);
5892
+ block-size: 1px;
5893
+ content: '';
5894
+ inset-inline: var(--mli-outer-spacing);
5895
+ }
5896
+
5897
+ .menu-list-module-4QhF4::before {
5898
+ inset-block: 0 auto;
5899
+ }
5900
+
5901
+ .menu-list-module-4QhF4::after {
5902
+ inset-block: auto 0;
5903
+ }
5904
+
5905
+ /* text label */
5906
+
5907
+ .menu-list-module-4QhF4 .menu-list-module-xFYyo {
5908
+ position: static;
5909
+ padding: 0;
5910
+ border: 0;
5911
+ background: transparent;
5912
+ box-shadow: none;
5913
+ color: currentcolor;
5914
+ cursor: pointer;
5915
+ font: inherit;
5916
+ font-weight: var(--ml-font-weight, normal);
5917
+ grid-area: label;
5918
+ line-height: 1;
5919
+ text-align: left;
5920
+ }
5921
+
5922
+ .menu-list-module-4QhF4 .menu-list-module-xFYyo::before {
5923
+ position: absolute;
5924
+ z-index: -1;
5925
+ background: inherit;
5926
+ content: '';
5927
+ inset: 0;
5928
+ }
5929
+
5930
+ .menu-list-module-4QhF4 .menu-list-module-xFYyo::after {
5931
+ position: absolute;
5932
+ background: transparent;
5933
+ content: '';
5934
+ inset: 0;
5935
+ }
5936
+
5937
+ /* image */
5938
+
5939
+ .menu-list-module-4QhF4 .menu-list-module-ELekn {
5940
+ position: relative;
5941
+ z-index: 0;
5942
+ aspect-ratio: 1;
5943
+ grid-area: imagebadge;
5944
+ inline-size: var(--mli-image-size);
5945
+ margin-inline-end: var(--mli-inner-spacing);
5946
+ }
5947
+
5948
+ .menu-list-module-4QhF4 .menu-list-module-ELekn [class*='image'] {
5949
+ mix-blend-mode: multiply;
5950
+ }
5951
+
5952
+ .menu-list-module-4QhF4 .menu-list-module-ELekn::after {
5953
+ position: absolute;
5954
+ z-index: -1;
5955
+ border-radius: 100%;
5956
+ background-color: rgb(0 0 0 / 7%);
5957
+ content: '';
5958
+ inset: 2px;
5959
+ }
5960
+
5961
+ /* badge */
5962
+
5963
+ .menu-list-module-4QhF4 .menu-list-module-4PbP- {
5964
+ display: grid;
5965
+ grid-area: imagebadge;
5966
+ inline-size: var(--mli-badge-size);
5967
+ margin-inline-end: var(--mli-inner-spacing);
5968
+ }
5969
+
5970
+ /* stylelint-disable-next-line no-descending-specificity */
5971
+
5972
+ .menu-list-module-4QhF4 .menu-list-module-syyw9 {
5973
+ aspect-ratio: 1;
5974
+ block-size: var(--mli-icon-size);
5975
+ grid-area: icon;
5976
+ inline-size: var(--mli-icon-size);
5977
+ justify-self: center;
5978
+ }
5979
+
5980
+ /* focus */
5981
+
5982
+ .menu-list-module-4QhF4:has(:focus-visible) {
5983
+ z-index: 2;
5984
+ }
5985
+
5986
+ .menu-list-module-4QhF4:has(:focus-visible) .menu-list-module-xFYyo::before {
5987
+ box-shadow: inset var(--shadow-focus-outline);
5988
+ }
5989
+
5990
+ /* selected state */
5991
+
5992
+ .menu-list-module-4QhF4.menu-list-module-hiMca {
5993
+ z-index: 1;
5994
+ color: var(--mli-selected-color);
5995
+ }
5996
+
5997
+ .menu-list-module-4QhF4.menu-list-module-hiMca .menu-list-module-xFYyo::before {
5998
+ background: var(--mli-selected-bgcolor);
5999
+ }
6000
+
6001
+ /* no children */
6002
+
6003
+ .menu-list-module-4QhF4:not(.menu-list-module-61uJb, .menu-list-module-hiMca):has(.menu-list-module-xFYyo:hover) {
6004
+ z-index: 2;
6005
+ color: var(--mli-link-hover-color);
6006
+ }
6007
+
6008
+ .menu-list-module-4QhF4:not(.menu-list-module-61uJb, .menu-list-module-hiMca):has(.menu-list-module-xFYyo:hover) .menu-list-module-xFYyo::before {
6009
+ background: var(--mli-link-hover-bgcolor);
6010
+ }
6011
+
6012
+ /* has children */
6013
+
6014
+ .menu-list-module-4QhF4.menu-list-module-61uJb {
6015
+ grid-template-areas: '. imagebadge label icon';
6016
+ grid-template-columns:
6017
+ var(--mli-outer-spacing) minmax(0, min-content)
6018
+ 1fr calc(
6019
+ var(--mli-inner-spacing) + var(--mli-icon-size) +
6020
+ var(--mli-inner-spacing)
6021
+ );
6022
+ }
6023
+
6024
+ .menu-list-module-4QhF4.menu-list-module-61uJb:not(.menu-list-module-hiMca):has(.menu-list-module-xFYyo:hover) {
6025
+ z-index: 2;
6026
+ color: var(--mli-button-hover-color);
6027
+ }
6028
+
6029
+ .menu-list-module-4QhF4.menu-list-module-61uJb:not(.menu-list-module-hiMca):has(.menu-list-module-xFYyo:hover) .menu-list-module-xFYyo::before {
6030
+ background: var(--mli-button-hover-bgcolor);
6031
+ }
6032
+
5718
6033
  .orderline-list-module-v-FqO {
5719
6034
  container-type: inline-size;
5720
6035
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "162.0.0",
3
+ "version": "163.0.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -1,10 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export interface ListProps {
3
- children: ReactNode;
4
- }
5
- export declare function List({ children }: ListProps): import("react/jsx-runtime").JSX.Element;
6
- export interface ListItemProps {
7
- icon?: ReactNode;
8
- text: ReactNode;
9
- }
10
- export declare function ListItem({ icon, text }: ListItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import styles from './list.module.css.js';
3
-
4
- function List({ children }) {
5
- return jsx("ul", { className: styles.list, children: children });
6
- }
7
- function ListItem({ icon, text }) {
8
- return (jsxs("li", { className: styles['list-item'], children: [icon && jsx("span", { className: styles.icon, children: icon }), text] }));
9
- }
10
-
11
- export { List, ListItem };
@@ -1,3 +0,0 @@
1
- var styles = {"list":"list-module-7-DFP","list-item":"list-module-YMLVY","icon":"list-module-wTIOA"};
2
-
3
- export { styles as default };