@sonic-equipment/ui 1.0.0 → 1.1.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.
- package/dist/algolia/algolia-insights-provider.d.ts +1 -1
- package/dist/algolia/use-algolia-search.d.ts +3 -3
- package/dist/authentication/authenticated-container.d.ts +1 -1
- package/dist/buttons/button/button.d.ts +6 -1
- package/dist/buttons/button/button.js +3 -3
- package/dist/buttons/icon-button/icon-button.d.ts +1 -1
- package/dist/buttons/link/link.d.ts +6 -1
- package/dist/buttons/link/link.js +2 -3
- package/dist/cards/table-card/table-card.d.ts +1 -1
- package/dist/carousel/carousel-navigation-button.d.ts +1 -1
- package/dist/collapsables/cascading-component/cascading-component-container-context.d.ts +1 -1
- package/dist/collapsables/unmounter/unmounter.d.ts +1 -1
- package/dist/collapsables/unmounter/unmounter.js +1 -1
- package/dist/cookies/cookie-context.d.ts +1 -1
- package/dist/country-language-selector/country-language-selector.js +1 -1
- package/dist/forms/elements/textarea/textarea.js +5 -6
- package/dist/forms/fields/number-field/number-field.d.ts +8 -3
- package/dist/forms/fields/number-field/number-field.js +3 -3
- package/dist/forms/fields/text-field/text-field.d.ts +2 -2
- package/dist/global-search/search-input/search-input.d.ts +2 -2
- package/dist/global-search/types.d.ts +3 -3
- package/dist/intl/intl-context.d.ts +1 -1
- package/dist/intl/missing-translation-provider.d.ts +1 -1
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/lists/menu-list/menu-list-provider.d.ts +1 -1
- package/dist/navigation/panel-navigation/panel-navigation.js +6 -8
- package/dist/notifications/announcements/announcement.d.ts +1 -1
- package/dist/observers/intersection-observer.d.ts +1 -1
- package/dist/pages/account/sign-in-page/sign-in-page.d.ts +2 -1
- package/dist/pages/account/sign-in-page/sign-in-page.js +8 -5
- package/dist/pages/checkout/payment-page/components/adyen-payment.d.ts +2 -2
- package/dist/pages/checkout/payment-page/components/payment.js +32 -1
- package/dist/pages/checkout/shipping-page/shipping-page.js +1 -1
- package/dist/pages/product/product-listing-page/product-listing-page-provider/product-listing-page-context.d.ts +1 -1
- package/dist/shared/api/storefront/services/product-service.js +8 -3
- package/dist/shared/hooks/use-debounced-callback.js +1 -1
- package/dist/shared/hooks/use-inert.d.ts +1 -1
- package/dist/shared/hooks/use-intersection-observer.d.ts +1 -1
- package/dist/shared/local-storage/local-storage-context.d.ts +1 -1
- package/dist/shared/providers/global-state-provider.d.ts +3 -3
- package/dist/shared/routing/route-context.d.ts +1 -1
- package/dist/shared/routing/use-route-link-element.d.ts +1 -1
- package/dist/shared/routing/use-route-link.d.ts +1 -1
- package/dist/shared/routing/with-routing.d.ts +2 -2
- package/dist/shared/utils/refs.d.ts +2 -2
- package/dist/shared/utils/refs.js +4 -2
- package/dist/shared/utils/scrolling.d.ts +1 -1
- package/dist/table/elements/table-context.d.ts +1 -1
- package/dist/table/elements/table-row-context.d.ts +1 -1
- package/dist/toast/toast.d.ts +1 -1
- package/dist/toast/use-toast.js +4 -1
- package/dist/typography/heading/heading.d.ts +2 -2
- package/package.json +5 -5
|
@@ -4,7 +4,7 @@ export interface AlgoliaInsightsProviderState extends AlgoliaInsightsProviderGlo
|
|
|
4
4
|
objectId?: string | string[] | undefined;
|
|
5
5
|
position?: number | number[] | undefined;
|
|
6
6
|
}
|
|
7
|
-
export declare const AlgoliaInsightsProviderContext:
|
|
7
|
+
export declare const AlgoliaInsightsProviderContext: import("react").Context<AlgoliaInsightsProviderState>;
|
|
8
8
|
export declare function AlgoliaInsightsProvider({ children, value, }: {
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
value?: AlgoliaInsightsProviderState;
|
|
@@ -25,10 +25,10 @@ export declare function useAlgoliaSearch(): {
|
|
|
25
25
|
quickAccess: AutocompleteCollection<QuickAccessHit> | undefined;
|
|
26
26
|
recentSearches: ExtendedAutoCompleteCollection<RecentSearchHit> | undefined;
|
|
27
27
|
autocomplete: import("..").Autocomplete;
|
|
28
|
-
formRef: React.RefObject<HTMLFormElement>;
|
|
28
|
+
formRef: React.RefObject<HTMLFormElement | null>;
|
|
29
29
|
indexes: import("./algolia-index-config").Indexes;
|
|
30
|
-
inputRef: React.RefObject<HTMLInputElement>;
|
|
31
|
-
panelRef: React.RefObject<HTMLDivElement>;
|
|
30
|
+
inputRef: React.RefObject<HTMLInputElement | null>;
|
|
31
|
+
panelRef: React.RefObject<HTMLDivElement | null>;
|
|
32
32
|
productsIndexName: string;
|
|
33
33
|
productsQuerySuggestionsIndexName: string;
|
|
34
34
|
searchClient: import("algoliasearch").SearchClient;
|
|
@@ -6,4 +6,4 @@ export declare function AuthenticatedContainer({ children, onUnauthenticated, vi
|
|
|
6
6
|
unauthenticated?: ReactNode;
|
|
7
7
|
undetermined?: ReactNode;
|
|
8
8
|
};
|
|
9
|
-
}): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null;
|
|
9
|
+
}): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null;
|
|
@@ -26,4 +26,9 @@ export interface ButtonProps {
|
|
|
26
26
|
variant?: 'solid' | 'outline' | 'ghost';
|
|
27
27
|
withArrow?: boolean;
|
|
28
28
|
}
|
|
29
|
-
export declare const Button:
|
|
29
|
+
export declare const Button: {
|
|
30
|
+
({ _pseudo, "aria-label": ariaLabel, children: _children, className, color, condensed, "data-test-selector": dataTestSelector, download, form, href, icon, iconPosition, isDisabled, isLoading, isValidating, light, name, onClick, ref, route, size, type, value, variant, withArrow, }: ButtonProps & {
|
|
31
|
+
ref?: React.RefObject<HTMLButtonElement | null>;
|
|
32
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { isValidElement } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { Icon } from '../../icon/icon.js';
|
|
6
6
|
import { ProgressCircle } from '../../loading/progress-circle.js';
|
|
7
7
|
import { useRouteLink } from '../../shared/routing/use-route-link.js';
|
|
8
8
|
import buttonStyles from './button.module.css.js';
|
|
9
9
|
|
|
10
|
-
const Button =
|
|
10
|
+
const Button = ({ _pseudo = 'none', 'aria-label': ariaLabel, children: _children, className, color = 'primary', condensed, 'data-test-selector': dataTestSelector, download, form, href, icon, iconPosition = 'left', isDisabled, isLoading = false, isValidating = true, light = false, name, onClick, ref, route, size = 'lg', type = 'button', value, variant = 'solid', withArrow = false, }) => {
|
|
11
11
|
const { getRouteLinkProps, RouteLinkElement } = useRouteLink();
|
|
12
12
|
const handleButtonClick = (e) => {
|
|
13
13
|
if (onClick)
|
|
@@ -30,7 +30,7 @@ const Button = forwardRef(({ _pseudo = 'none', 'aria-label': ariaLabel, children
|
|
|
30
30
|
return (jsx(RouteLinkElement, { "aria-label": ariaLabel, className: classNames, "data-disabled": isDisabled ? true : undefined, "data-test-selector": dataTestSelector, download: download, onClick: onClick, type: type, ...getRouteLinkProps(href, route), children: children }));
|
|
31
31
|
}
|
|
32
32
|
return (jsx("button", { ref: ref, "aria-label": ariaLabel, className: classNames, "data-disabled": isDisabled ? true : undefined, "data-test-selector": dataTestSelector, disabled: isDisabled, form: form, formNoValidate: isValidating ? undefined : true, name: name, onClick: handleButtonClick, type: type, value: value, children: children }));
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
34
|
Button.displayName = 'Button';
|
|
35
35
|
|
|
36
36
|
export { Button };
|
|
@@ -22,4 +22,4 @@ export interface IconButtonProps {
|
|
|
22
22
|
theme?: 'default' | 'secondary' | 'light';
|
|
23
23
|
type?: 'button' | 'submit' | 'reset';
|
|
24
24
|
}
|
|
25
|
-
export declare const IconButton:
|
|
25
|
+
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -20,4 +20,9 @@ export interface LinkProps {
|
|
|
20
20
|
target?: string;
|
|
21
21
|
title?: string;
|
|
22
22
|
}
|
|
23
|
-
export declare const Link:
|
|
23
|
+
export declare const Link: {
|
|
24
|
+
({ children, className: _className, color, hasUnderline, href, hrefLang, id, ignoreLocalePrefix, isDisabled, lang, onClick, onKeyUp, ref, rel, role, route, tabIndex, target, title, ...rest }: LinkProps & {
|
|
25
|
+
ref?: React.RefObject<HTMLElement | null>;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { forwardRef } from 'react';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { useRouteLink } from '../../shared/routing/use-route-link.js';
|
|
6
5
|
import styles from './link.module.css.js';
|
|
7
6
|
|
|
8
|
-
const Link =
|
|
7
|
+
const Link = ({ children, className: _className, color, hasUnderline, href, hrefLang, id, ignoreLocalePrefix, isDisabled, lang, onClick, onKeyUp, ref, rel, role, route, tabIndex, target, title, ...rest }) => {
|
|
9
8
|
const { getRouteLinkProps, RouteLinkElement } = useRouteLink(ignoreLocalePrefix);
|
|
10
9
|
const className = clsx(styles['link'], hasUnderline && styles['has-underline'], color && styles[color], _className);
|
|
11
10
|
if (href) {
|
|
12
11
|
return (jsx(RouteLinkElement, { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, hrefLang: hrefLang, id: id, lang: lang, onClick: onClick, onKeyUp: onKeyUp, rel: rel, role: role, tabIndex: isDisabled ? -1 : tabIndex, target: target, title: title, ...getRouteLinkProps(href, route), ...rest, children: children }));
|
|
13
12
|
}
|
|
14
13
|
return (jsx("button", { ref: ref, className: className, "data-disabled": isDisabled ? true : undefined, disabled: isDisabled ? true : undefined, id: id, lang: lang, onClick: onClick, onKeyUp: onKeyUp, rel: rel, role: role, tabIndex: isDisabled ? -1 : tabIndex, title: title, type: "button", ...rest, children: children }));
|
|
15
|
-
}
|
|
14
|
+
};
|
|
16
15
|
Link.displayName = 'Link';
|
|
17
16
|
|
|
18
17
|
export { Link };
|
|
@@ -12,4 +12,4 @@ export interface TableCardProps {
|
|
|
12
12
|
stickyHeader?: boolean;
|
|
13
13
|
title?: TranslationId;
|
|
14
14
|
}
|
|
15
|
-
export declare const TableCard:
|
|
15
|
+
export declare const TableCard: import("react").ForwardRefExoticComponent<TableCardProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -4,5 +4,5 @@ interface CarouselNavigationButtonProps {
|
|
|
4
4
|
direction: SwipeDirection;
|
|
5
5
|
onClick?: (direction: SwipeDirection) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const CarouselNavigationButton:
|
|
7
|
+
export declare const CarouselNavigationButton: import("react").ForwardRefExoticComponent<CarouselNavigationButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
8
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CascadingComponentContainerContextType } from './types';
|
|
2
|
-
export declare const CascadingComponentContainerContext:
|
|
2
|
+
export declare const CascadingComponentContainerContext: import("react").Context<CascadingComponentContainerContextType | null>;
|
|
@@ -4,7 +4,7 @@ export interface UnmounterContextType {
|
|
|
4
4
|
unmount: boolean;
|
|
5
5
|
unregisterChild: () => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const UnmounterContext:
|
|
7
|
+
export declare const UnmounterContext: import("react").Context<UnmounterContextType | null>;
|
|
8
8
|
export declare function useUnmount(): UnmounterContextType | null;
|
|
9
9
|
export declare function Unmounter({ children: children, onUnmounted, onUnmountReady, unmount: _unmount, }: {
|
|
10
10
|
children: ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { createContext, useState, useEffect, useMemo
|
|
3
|
+
import { createContext, useContext, useState, useEffect, useMemo } from 'react';
|
|
4
4
|
|
|
5
5
|
const UnmounterContext = createContext(null);
|
|
6
6
|
function useUnmount() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CookieContextValue } from './types';
|
|
2
|
-
export declare const CookieContext:
|
|
2
|
+
export declare const CookieContext: import("react").Context<CookieContextValue | undefined>;
|
|
@@ -19,7 +19,7 @@ function CountryLanguageSelector({ className, defaultSelectedOption, isOpen, onC
|
|
|
19
19
|
const height = size.height;
|
|
20
20
|
document?.documentElement.style.setProperty('--clselector-height', `${height}px`);
|
|
21
21
|
});
|
|
22
|
-
const focusTimeoutRef = useRef();
|
|
22
|
+
const focusTimeoutRef = useRef(undefined);
|
|
23
23
|
useEffect(() => {
|
|
24
24
|
// eslint-disable-next-line @eslint-react/hooks-extra/no-direct-set-state-in-use-effect
|
|
25
25
|
setIsInitialized(true);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { useRef, useCallback, useEffect } from 'react';
|
|
4
4
|
import { useContextProps, TextAreaContext, TextArea as TextArea$1 } from 'react-aria-components';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import styles from './textarea.module.css.js';
|
|
@@ -11,7 +11,7 @@ import styles from './textarea.module.css.js';
|
|
|
11
11
|
* The initial height is calculated based on the style of the textarea.
|
|
12
12
|
* The height is updated everytime the user types.
|
|
13
13
|
*/
|
|
14
|
-
const TextArea =
|
|
14
|
+
const TextArea = ({ autoGrow, className, label, ref: _ref, size, variant = 'solid', ...textAreaProps }) => {
|
|
15
15
|
const textAreaRef = useRef(null);
|
|
16
16
|
const [props, ref] = useContextProps(textAreaProps, textAreaRef, TextAreaContext);
|
|
17
17
|
const initialHeight = useRef(null);
|
|
@@ -42,14 +42,13 @@ const TextArea = forwardRef(({ autoGrow, className, label, size, variant = 'soli
|
|
|
42
42
|
updateHeight();
|
|
43
43
|
}, [ref, autoGrow, updateHeight, size]);
|
|
44
44
|
return (jsx(Fragment, { children: jsx("div", { className: clsx(className, styles['input-container'], styles[variant]), children: jsx(TextArea$1, { "aria-label": label, ...textAreaProps, ref: node => {
|
|
45
|
-
ref.current =
|
|
46
|
-
|
|
47
|
-
return (textAreaRef.current = node);
|
|
45
|
+
ref.current = node;
|
|
46
|
+
textAreaRef.current = node;
|
|
48
47
|
}, onInput: e => {
|
|
49
48
|
updateHeight();
|
|
50
49
|
props.onInput?.(e);
|
|
51
50
|
} }) }) }));
|
|
52
|
-
}
|
|
51
|
+
};
|
|
53
52
|
TextArea.displayName = 'TextArea';
|
|
54
53
|
|
|
55
54
|
export { TextArea };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FocusEvent,
|
|
1
|
+
import { FocusEvent, SyntheticEvent } from 'react';
|
|
2
2
|
import { ValidateFunction } from '../../elements/field-error/field-error';
|
|
3
3
|
export interface NumberFieldProps {
|
|
4
4
|
autoFocus?: boolean;
|
|
@@ -21,7 +21,7 @@ export interface NumberFieldProps {
|
|
|
21
21
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
22
22
|
onChange?: (value: number) => void;
|
|
23
23
|
onFocus?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
24
|
-
onInput?:
|
|
24
|
+
onInput?: (e: SyntheticEvent<HTMLInputElement>) => void;
|
|
25
25
|
onKeyUp?: (e: React.KeyboardEvent) => void;
|
|
26
26
|
placeholder?: string;
|
|
27
27
|
showLabel?: boolean;
|
|
@@ -31,4 +31,9 @@ export interface NumberFieldProps {
|
|
|
31
31
|
value?: number;
|
|
32
32
|
withButtons?: boolean;
|
|
33
33
|
}
|
|
34
|
-
export declare const NumberField:
|
|
34
|
+
export declare const NumberField: {
|
|
35
|
+
({ autoGrow, className, "data-test-selector": dataTestSelector, defaultValue, formatOptions, info, inputMode, isDisabled, isInvalid, isReadOnly, isRequired, label, maxLength, maxValue, minValue, name, onBlur, onChange, onFocus, onInput, onKeyUp, placeholder, ref, showLabel, size, step, value, withButtons, }: NumberFieldProps & {
|
|
36
|
+
ref?: React.RefObject<HTMLInputElement | null>;
|
|
37
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { useRef, useState, useEffect } from 'react';
|
|
4
4
|
import { NumberField as NumberField$1, Button } from 'react-aria-components';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { Icon } from '../../../icon/icon.js';
|
|
@@ -24,7 +24,7 @@ function NumberFieldControls({ active, children, isDisabled, showReset, }) {
|
|
|
24
24
|
}
|
|
25
25
|
let debouncedChange;
|
|
26
26
|
let debouncedKeyup;
|
|
27
|
-
const NumberField =
|
|
27
|
+
const NumberField = ({ autoGrow, className, 'data-test-selector': dataTestSelector, defaultValue, formatOptions = defaultFormatOptions, info, inputMode = 'numeric', isDisabled, isInvalid, isReadOnly, isRequired, label, maxLength, maxValue, minValue = 0, name, onBlur, onChange, onFocus, onInput, onKeyUp, placeholder, ref, showLabel, size = 'lg', step = 1, value, withButtons, }) => {
|
|
28
28
|
const t = useFormattedMessage();
|
|
29
29
|
const inputRef = useRef(null);
|
|
30
30
|
const [showControlsReset, setShowControlsReset] = useState((defaultValue || value || 0) - step <= minValue);
|
|
@@ -49,7 +49,7 @@ const NumberField = forwardRef(({ autoGrow, className, 'data-test-selector': dat
|
|
|
49
49
|
return (jsx(NumberField$1, { "aria-label": label, className: clsx(styles['number-field'], styles[size], className), "data-test-selector": dataTestSelector, decrementAriaLabel: t('Decrease'), defaultValue: defaultValue, formatOptions: formatOptions, incrementAriaLabel: t('Increase'), isDisabled: isDisabled, isInvalid: isInvalid, isReadOnly: isReadOnly, isRequired: isRequired, maxValue: maxValue, minValue: minValue, name: name, onChange: value => {
|
|
50
50
|
handleChange(value);
|
|
51
51
|
}, onInput: onInput, onKeyUp: handleKeyUp, step: step, value: value, children: jsx(FormFieldLayout, { errorSlot: jsx(FieldError, {}), infoSlot: info && jsx(InfoIconTooltip, { children: info }), labelSlot: showLabel && jsx(Label, { isRequired: isRequired, children: label }), children: jsx(NumberFieldControls, { active: withButtons, isDisabled: isDisabled, showReset: showControlsReset, children: jsx(Input, { ref: multiRef(inputRef, ref), autoGrow: autoGrow, "data-test-selector": "value", inputMode: inputMode, label: label, maxLength: maxLength, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder, size: size }) }) }) }));
|
|
52
|
-
}
|
|
52
|
+
};
|
|
53
53
|
NumberField.displayName = 'NumberField';
|
|
54
54
|
|
|
55
55
|
export { NumberField };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FocusEvent,
|
|
1
|
+
import { FocusEvent, SyntheticEvent } from 'react';
|
|
2
2
|
import { ValidateFunction } from '../../elements/field-error/field-error';
|
|
3
3
|
interface TextFieldPropsBase {
|
|
4
4
|
autoComplete?: string;
|
|
@@ -19,7 +19,7 @@ interface TextFieldPropsBase {
|
|
|
19
19
|
minLength?: number;
|
|
20
20
|
name?: string;
|
|
21
21
|
onChange?: (value: string) => void;
|
|
22
|
-
onInput?:
|
|
22
|
+
onInput?: (e: SyntheticEvent<HTMLInputElement>) => void;
|
|
23
23
|
onKeyUp?: (e: React.KeyboardEvent) => void;
|
|
24
24
|
placeholder?: string;
|
|
25
25
|
role?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Autocomplete } from '../types';
|
|
2
2
|
export interface SearchInputProps {
|
|
3
3
|
autocomplete?: Autocomplete;
|
|
4
|
-
formRef: React.RefObject<HTMLFormElement>;
|
|
5
|
-
inputRef: React.RefObject<HTMLInputElement>;
|
|
4
|
+
formRef: React.RefObject<HTMLFormElement | null>;
|
|
5
|
+
inputRef: React.RefObject<HTMLInputElement | null>;
|
|
6
6
|
onCancel?: VoidFunction;
|
|
7
7
|
onSubmit?: VoidFunction;
|
|
8
8
|
placeholder?: string;
|
|
@@ -13,10 +13,10 @@ export type Autocomplete = AutocompleteApi<AutocompleteItem, React.BaseSynthetic
|
|
|
13
13
|
export type AutocompleteState = _AutocompleteState<AutocompleteItem>;
|
|
14
14
|
export type GlobalSearchContextValue = {
|
|
15
15
|
autocomplete: Autocomplete;
|
|
16
|
-
formRef: React.RefObject<HTMLFormElement>;
|
|
16
|
+
formRef: React.RefObject<HTMLFormElement | null>;
|
|
17
17
|
indexes: Indexes;
|
|
18
|
-
inputRef: React.RefObject<HTMLInputElement>;
|
|
19
|
-
panelRef: React.RefObject<HTMLDivElement>;
|
|
18
|
+
inputRef: React.RefObject<HTMLInputElement | null>;
|
|
19
|
+
panelRef: React.RefObject<HTMLDivElement | null>;
|
|
20
20
|
productsIndexName: string;
|
|
21
21
|
productsQuerySuggestionsIndexName: string;
|
|
22
22
|
searchClient: SearchClient;
|
|
@@ -13,4 +13,4 @@ export interface IntlContextType {
|
|
|
13
13
|
updateCultureCode?: UpdateCultureCode;
|
|
14
14
|
updateCurrencyCode?: UpdateCurrencyCode;
|
|
15
15
|
}
|
|
16
|
-
export declare const IntlContext:
|
|
16
|
+
export declare const IntlContext: import("react").Context<IntlContextType | undefined>;
|
|
@@ -2,5 +2,5 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
interface MissingTranslationProviderProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
}
|
|
5
|
-
export declare function MissingTranslationProvider({ children, }: MissingTranslationProviderProps): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
5
|
+
export declare function MissingTranslationProvider({ children, }: MissingTranslationProviderProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
6
6
|
export {};
|
|
@@ -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.' | 'Account' | 'Account was activated successfully.' | 'active' | 'Add address' | 'Add order notes' | 'Add to cart' | 'Add to favorites' | 'Add to list' | 'Address 1' | 'Address 2' | 'Address 3' | 'Address 4' | 'Address not found' | 'Address' | 'Address book' | 'addressProperty.Default' | 'addressProperty.Company Name' | 'addressProperty.Address Line' | 'addressProperty.Postal Code' | 'addressProperty.City' | 'addressProperty.Country' | 'All payment methods are unavailable at this time. Please contact customer support.' | 'Amount: {0}' | 'An error occurred while changing the customer.' | 'An error occurred while fetching customers. Please try again later.' | 'An error occurred while fetching addresses. Please try again later.' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'An unexpected error occured. Please try again.' | 'Announcements' | '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' | 'ASC' | 'Attention' | 'Availability unknown, please contact customer support for lead time or alternatives.' | 'Back' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Billing' | 'Cancel' | 'Cart' | 'Change customer' | 'Change password' | 'Changing password…' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Checkout order' | 'Choose another region if you want to see the content for your location and shop online.' | 'Choose your country or region…' | 'Chosen filters' | 'City' | 'Clear filters' | 'Create' | 'Clear' | 'Click the button below to continue shopping.' | 'Client cases' | 'Close' | 'Close and don’t show again' | 'CoC number' | 'Column 1: Item number or customer part number' | 'Column 2: Quantity (optional)' | 'Column 3: Unit of measure (optional)' | 'Company name' | 'Conceal value' | 'Confirm new password' | 'Continue shopping' | 'Continue to sign in' | 'Continue' | 'Copyright © Sonic Equipment B.V.' | 'Cost overview' | 'Country' | 'Create a row for each product. The allowed maximum is 500 rows' | 'Create account' | 'Create new list' | 'Create or modify a spreadsheet' | 'Currency Change' | 'Current page' | 'Current password' | 'Current Password is invalid' | 'Date' | 'Decrease' | 'Default shipping address' | 'Delivery date' | 'Delivery expected on {0}' | 'DESC' | 'Double check your spelling' | 'Download spreadsheet template' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Edit Sonic account' | 'Edit' | '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' | 'Favorites' | 'Features' | 'Filter order status' | 'Finalize order' | 'Finalize payment' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Good day' | 'Good morning' | 'Good afternoon' | 'Good evening' | 'Goodnight' | 'Guest' | '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.' | 'If you want to proceed, click the continue button. If you want to change your country, close this message and select a different country.' | 'Incl. VAT' | 'Includes' | 'Increase' | 'Industry' | 'industry.AG' | 'industry.AU' | 'industry.AV' | 'industry.BC' | 'industry.MA' | 'industry.MC' | 'industry.OT' | 'industry.PP' | 'industry.TR' | 'Information' | 'Instructions' | 'Language' | 'Last name' | 'List name already exists' | 'Log out' | 'Main menu' | 'Make sure the spreadsheet has 3 columns' | 'Make this the default customer' | 'Make this the default ship to address' | 'More than {0} articles' | 'My account' | 'My Sonic' | 'My Sonic menu' | 'Name' | 'Navigate to...' | 'Navigation' | 'New list name' | 'New Password is required and must be different than Current Password' | 'New password' | 'New user?' | 'Next' | 'No' | 'No countries available. Unable to change address.' | 'No orders found.' | 'No results found. Please refine your search.' | 'No search results' | 'Number of favorites' | 'Number of products' | 'of' | 'OK' | 'Or continue as guest' | 'Order confirmation' | 'Order date' | 'Order details' | 'Order history' | 'Order number' | 'Order#' | 'Order' | 'orderProperty.Date' | 'orderProperty.Number' | 'orderProperty.PO Number' | 'orderProperty.Price' | 'orderProperty.Shipping Address' | 'orderProperty.Status' | 'Orders' | 'orderStatus.Any' | 'orderStatus.Cancelled' | 'orderStatus.ForwardToReseller' | 'orderStatus.Fulfilled' | 'orderStatus.Partially fulfilled' | 'orderStatus.Processing' | 'orderStatus.Saved' | 'orderStatus.Waiting for customer service' | 'Our products' | 'Overview' | 'Page not found.' | 'Password changed. Please sign in again.' | 'Password does not meet requirements' | 'Password' | 'Passwords do not match' | 'Pay by invoice' | 'Payment method' | 'Payment' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please contact Customer Support if you need assistance.' | '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' | 'Previous' | 'Print' | 'Private account' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quantity' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Recover your password' | 'Reset' | 'Remember me' | 'Remove' | 'Remove all' | 'Remove from favorites' | 'Reorder' | 'Reordering...' | 'Requested delivery date' | 'Results' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Save the file in XLS, XLSX or CSV format' | 'Saved' | 'Saved cart for later.' | 'Saving' | 'Search for a customer' | 'Search' | 'Searching again using more general terms' | 'Search orders' | 'Search addresses' | 'See all results' | 'Select a country' | 'Select a desired delivery date' | 'Select a language' | 'Select a list' | 'Select a region and language' | 'Select an industry' | 'Select another country or language…' | 'Select other customer' | 'Select the file to upload in the form and click Upload order' | 'Selected customer' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Selecting this country will result in your cart to be converted to the currency {0}' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Shopping cart' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'Sign in or create account' | 'Sign in' | 'Sign me up for newsletters and product updates' | 'Signed in' | 'Signed out' | 'Signing in…' | 'Something went wrong' | 'Sonic account' | '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' | 'sort.ASC' | 'sort.DESC' | 'sort.NONE' | 'Specifications' | 'Start checkout' | 'Status' | 'Submenu' | 'Submit email address' | 'Submit' | 'Submitting…' | 'Subtotal' | 'Suggestions' | 'Support' | '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 link you used for resetting your password is invalid. Please, reset your password again, or contact Customer Support.' | 'The password could not be changed. Please, reset your password again, or contact Customer Support.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'The option to upload an Excel file with your order is temporarily unavailable.' | 'The order has been added to your cart.' | 'The user to change the password for could not be found. Please, reset your password again, or contact Customer Support.' | 'There are more customers, please refine your search if needed.' | 'There are more addresses, please refine your search if needed.' | 'There are no products in your shopping cart.' | 'There is no information to display' | 'This email is already in use' | 'Toggle navigation menu' | 'Total amount is' | 'Total' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to add the order 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' | 'Upload order' | 'Upload an Excel (XLS/XLSX) spreadsheet or CSV file to quickly add items to your cart.' | 'Use billing address' | 'Use default shipping address' | 'Use new address' | 'Use fewer keywords' | 'Username' | '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?' | 'Yes' | 'You are not authorized to access this information.' | 'You are not authorized to perform this action' | 'You are not authorized to view customers. Please log in or contact support.' | 'You are not authorized to view addresses. Please log in or contact support.' | 'You are required to change your password and then sign in again, using your new credentials.' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You have no favorite products yet.' | 'You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!' | 'You must ' | '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, ' | 'Your account is temporarily locked. Please try again later or contact Customer Support.' | 'Your cart has been emptied.' | 'Your email and password were not recognized.' | 'Your favorites are available on multiple devices' | '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.' | 'Your shopping cart is still empty';
|
|
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.' | 'Account' | 'Account was activated successfully.' | 'active' | 'Add address' | 'Add order notes' | 'Add to cart' | 'Add to favorites' | 'Add to list' | 'Address 1' | 'Address 2' | 'Address 3' | 'Address 4' | 'Address not found' | 'Address' | 'Address book' | 'addressProperty.Default' | 'addressProperty.Company Name' | 'addressProperty.Address Line' | 'addressProperty.Postal Code' | 'addressProperty.City' | 'addressProperty.Country' | 'All payment methods are unavailable at this time. Please contact customer support.' | 'Amount: {0}' | 'An error occurred while changing the customer.' | 'An error occurred while fetching customers. Please try again later.' | 'An error occurred while fetching addresses. Please try again later.' | 'An error occurred while processing your payment. Please try again.' | 'An unexpected error occured' | 'An unexpected error occured. Please try again.' | 'Announcements' | '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' | 'ASC' | 'Attention' | 'Availability unknown, please contact customer support for lead time or alternatives.' | 'Back' | 'Billing address' | 'Billing and shipping address' | 'Billing and shipping information' | 'Billing' | 'Cancel' | 'Cart' | 'Change customer' | 'Change password' | 'Changing password…' | 'Changing your address is currently not possible. Please contact customer support to change your address.' | 'Checkout order' | 'Choose another region if you want to see the content for your location and shop online.' | 'Choose your country or region…' | 'Chosen filters' | 'City' | 'Clear filters' | 'Create' | 'Clear' | 'Click the button below to continue shopping.' | 'Client cases' | 'Close' | 'Close and don’t show again' | 'CoC number' | 'Column 1: Item number or customer part number' | 'Column 2: Quantity (optional)' | 'Column 3: Unit of measure (optional)' | 'Company name' | 'Conceal value' | 'Confirm new password' | 'Continue shopping' | 'Continue to sign in' | 'Continue' | 'Copyright © Sonic Equipment B.V.' | 'Cost overview' | 'Country' | 'Create a row for each product. The allowed maximum is 500 rows' | 'Create account' | 'Create new list' | 'Create or modify a spreadsheet' | 'Currency Change' | 'Current page' | 'Current password' | 'Current Password is invalid' | 'Date' | 'Decrease' | 'Default shipping address' | 'Delivery date' | 'Delivery expected on {0}' | 'DESC' | 'Double check your spelling' | 'Download spreadsheet template' | 'Downloads' | 'Easily add your favorite products' | 'Edit billing address' | 'Edit shipping address' | 'Edit Sonic account' | 'Edit' | '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' | 'Favorites' | 'Features' | 'Filter order status' | 'Finalize order' | 'Finalize payment' | 'First name' | 'Forgot password?' | 'Fulfillment method' | 'General' | 'Good day' | 'Good morning' | 'Good afternoon' | 'Good evening' | 'Goodnight' | 'Guest' | '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.' | 'If you want to proceed, click the continue button. If you want to change your country, close this message and select a different country.' | 'Incl. VAT' | 'Includes' | 'Increase' | 'Industry' | 'industry.AG' | 'industry.AU' | 'industry.AV' | 'industry.BC' | 'industry.MA' | 'industry.MC' | 'industry.OT' | 'industry.PP' | 'industry.TR' | 'Information' | 'Instructions' | 'Language' | 'Last name' | 'List name already exists' | 'Log out' | 'Main menu' | 'Make sure the spreadsheet has 3 columns' | 'Make this the default customer' | 'Make this the default ship to address' | 'More than {0} articles' | 'My account' | 'My Sonic' | 'My Sonic menu' | 'Name' | 'Navigate to...' | 'Navigation' | 'New list name' | 'New Password is required and must be different than Current Password' | 'New password' | 'New user?' | 'Next' | 'No' | 'No countries available. Unable to change address.' | 'No orders found.' | 'No results found. Please refine your search.' | 'No search results' | 'Number of favorites' | 'Number of products' | 'of' | 'OK' | 'Or continue as guest' | 'Order confirmation' | 'Order date' | 'Order details' | 'Order history' | 'Order number' | 'Order#' | 'Order' | 'orderProperty.Date' | 'orderProperty.Number' | 'orderProperty.PO Number' | 'orderProperty.Price' | 'orderProperty.Shipping Address' | 'orderProperty.Status' | 'Orders' | 'orderStatus.Any' | 'orderStatus.Cancelled' | 'orderStatus.ForwardToReseller' | 'orderStatus.Fulfilled' | 'orderStatus.Partially fulfilled' | 'orderStatus.Processing' | 'orderStatus.Saved' | 'orderStatus.Waiting for customer service' | 'Our products' | 'Overview' | 'Page not found.' | 'Password changed. Please sign in again.' | 'Password does not meet requirements' | 'Password' | 'Passwords do not match' | 'Pay by invoice' | 'Payment method' | 'Payment' | 'pc' | 'Phone' | 'Pick up' | 'Pickup address' | 'Please contact Customer Support if you need assistance.' | 'Please enter a valid email address' | 'Please enter a valid phone number' | 'Please enter a valid VAT number, starting with your country code, e.g. NL123456789.' | 'please go back to your cart.' | 'Please Sign In' | 'PO Number' | 'Popular searches' | 'Postal Code' | 'Previous' | 'Print' | 'Private account' | 'Processing' | 'Product Features' | 'Product' | 'Products' | 'Quantity' | 'Quick access' | 'Recent searches' | 'Recently viewed' | 'Recover your password' | 'Reset' | 'Remember me' | 'Remove' | 'Remove all' | 'Remove from favorites' | 'Reorder' | 'Reordering...' | 'Requested delivery date' | 'Results' | 'Reveal value' | 'Review and payment' | 'Save order' | 'Save' | 'Save the file in XLS, XLSX or CSV format' | 'Saved' | 'Saved cart for later.' | 'Saving' | 'Search for a customer' | 'Search' | 'Searching again using more general terms' | 'Search orders' | 'Search addresses' | 'See all results' | 'Select a country' | 'Select a desired delivery date' | 'Select a language' | 'Select a list' | 'Select a region and language' | 'Select an industry' | 'Select another country or language…' | 'Select other customer' | 'Select the file to upload in the form and click Upload order' | 'Selected customer' | 'Selecting As Soon As Possible will enable us to send the products to you as they become available.' | 'Selecting this country will result in your cart to be converted to the currency {0}' | 'Share your favorite list with others' | 'Ship' | 'Shipping address' | 'Shipping and handling' | 'Shipping details' | 'Shop more efficiently and quicker with a favorites list' | 'Shopping cart' | 'Show all' | 'Show filters' | 'Show less' | 'Show' | 'Sign in or create account' | 'Sign in' | 'Sign me up for newsletters and product updates' | 'Signed in' | 'Signed out' | 'Signing in…' | 'Something went wrong' | 'Sonic account' | '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' | 'sort.ASC' | 'sort.DESC' | 'sort.NONE' | 'Specifications' | 'Start checkout' | 'Status' | 'Submenu' | 'Submit email address' | 'Submit' | 'Submitting…' | 'Subtotal' | 'Suggestions' | 'Support' | '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 link you used for resetting your password is invalid. Please, reset your password again, or contact Customer Support.' | 'The password could not be changed. Please, reset your password again, or contact Customer Support.' | 'The product has been added to your cart.' | 'The product has been removed from your cart.' | 'The product has been updated in your cart.' | 'The option to upload an Excel file with your order is temporarily unavailable.' | 'The order has been added to your cart.' | 'The user to change the password for could not be found. Please, reset your password again, or contact Customer Support.' | 'There are more customers, please refine your search if needed.' | 'There are more addresses, please refine your search if needed.' | 'There are no products in your shopping cart.' | 'There is no information to display' | 'This email is already in use' | 'Toggle navigation menu' | 'Total amount is' | 'Total' | 'Try another search' | 'Unable to add the product to your cart.' | 'Unable to add the order 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' | 'Upload order' | 'Upload an Excel (XLS/XLSX) spreadsheet or CSV file to quickly add items to your cart.' | 'Use billing address' | 'Use default shipping address' | 'Use new address' | 'Use fewer keywords' | 'Username' | '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?' | 'Yes' | 'You are not authorized to access this information.' | 'You are not authorized to perform this action' | 'You are not authorized to view customers. Please log in or contact support.' | 'You are not authorized to view addresses. Please log in or contact support.' | 'You are required to change your password and then sign in again, using your new credentials.' | 'You could try checking the spelling of your search query' | 'You could try exploring our products by category' | 'You could try' | 'You have no favorite products yet.' | 'You have reached the end of the results, but there may be more articles available. Adjust your filters or search to discover more!' | 'You must ' | '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, ' | 'Your account is temporarily locked. Please try again later or contact Customer Support.' | 'Your cart has been emptied.' | 'Your email and password were not recognized.' | 'Your favorites are available on multiple devices' | '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.' | 'Your shopping cart is still empty' | 'Your VAT number starts with your 2-letter country code, e.g. NL123456789. Leave this field empty if you do not have one.';
|
|
@@ -3,7 +3,7 @@ export interface MenuListContextValue {
|
|
|
3
3
|
canCollapse: boolean;
|
|
4
4
|
registerCanCollapse: (canCollapse: boolean) => () => void;
|
|
5
5
|
}
|
|
6
|
-
export declare const MenuListContext:
|
|
6
|
+
export declare const MenuListContext: import("react").Context<MenuListContextValue | undefined>;
|
|
7
7
|
export declare function MenuListProvider({ children, }: {
|
|
8
8
|
children: ReactNode | ((args: {
|
|
9
9
|
canCollapse: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs, Fragment
|
|
3
|
-
import {
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useRef, useState, useCallback, useEffect } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { CascadingComponent } from '../../collapsables/cascading-component/cascading-component.js';
|
|
6
6
|
import { CascadingComponentContainer } from '../../collapsables/cascading-component/cascading-component-container.js';
|
|
@@ -19,8 +19,8 @@ const focusableSelectors = [
|
|
|
19
19
|
'select:not([disabled])',
|
|
20
20
|
'[tabindex]:not([tabindex="-1"])',
|
|
21
21
|
].join(',');
|
|
22
|
-
const NavigationMenu =
|
|
23
|
-
const menuRef = useRef();
|
|
22
|
+
const NavigationMenu = ({ allowBack, back, children, className, header, id, isNarrow, linkItems, ref, scrollable, variant, }) => {
|
|
23
|
+
const menuRef = useRef(null);
|
|
24
24
|
const submenuRef = useRef(null);
|
|
25
25
|
const [selectedNavigationLink, setSelectedNavigationLink] = useState();
|
|
26
26
|
const [selectedNavigationVisible, setSelectedNavigationVisible] = useState(false);
|
|
@@ -35,9 +35,7 @@ const NavigationMenu = forwardRef(({ allowBack, back, children, className, heade
|
|
|
35
35
|
setSelectedNavigationVisible(Boolean(selectedNavigationLink));
|
|
36
36
|
}, [selectedNavigationLink]);
|
|
37
37
|
const t = useFormattedMessage();
|
|
38
|
-
return (jsxs(Fragment, { children: [jsxs("div", { ref: multiRef(ref, menuRef), className: clsx(styles['panel'], isNarrow && styles['narrow'], className), "data-test-selector": "panelNavigation", id: id, children: [jsx(MenuList, { back: back, header: header, scrollable: scrollable, variant: variant, children: linkItems?.map(link => link.type === 'link-group' && link.items.length > 0 ? (jsx(MenuListItem, { hasChildren: true, "aria-controls": `menu-${link.key}`, "data-test-selector": "panelNavigationItem", image: link.image, isSelected: selectedNavigationLink?.key === link.key, onClick: () => setSelectedNavigationLink(selectedNavigationLink?.key === link.key
|
|
39
|
-
? undefined
|
|
40
|
-
: link), children: link.label }, link.key)) : (jsx(MenuListItem, { "data-test-selector": "panelNavigationItem", href: link.href, image: link.image, openInNewTab: link.openInNewTab, children: link.label }, link.key))) }), children] }), jsx(CascadingComponent, { isVisible: selectedNavigationVisible, nodeRef: submenuRef, onEntered: onFocus(submenuRef), onExited: () => {
|
|
38
|
+
return (jsxs(Fragment, { children: [jsxs("div", { ref: multiRef(ref, menuRef), className: clsx(styles['panel'], isNarrow && styles['narrow'], className), "data-test-selector": "panelNavigation", id: id, children: [jsx(MenuList, { back: back, header: header, scrollable: scrollable, variant: variant, children: linkItems?.map(link => link.type === 'link-group' && link.items.length > 0 ? (jsx(MenuListItem, { hasChildren: true, "aria-controls": `menu-${link.key}`, "data-test-selector": "panelNavigationItem", image: link.image, isSelected: selectedNavigationLink?.key === link.key, onClick: () => setSelectedNavigationLink(selectedNavigationLink?.key === link.key ? undefined : link), children: link.label }, link.key)) : (jsx(MenuListItem, { "data-test-selector": "panelNavigationItem", href: link.href, image: link.image, openInNewTab: link.openInNewTab, children: link.label }, link.key))) }), children] }), jsx(CascadingComponent, { isVisible: selectedNavigationVisible, nodeRef: submenuRef, onEntered: onFocus(submenuRef), onExited: () => {
|
|
41
39
|
onFocus(menuRef);
|
|
42
40
|
setSelectedNavigationLink(undefined);
|
|
43
41
|
}, children: jsx(NavigationMenu, { ref: submenuRef, allowBack: allowBack, back: allowBack
|
|
@@ -57,7 +55,7 @@ const NavigationMenu = forwardRef(({ allowBack, back, children, className, heade
|
|
|
57
55
|
isNavigationLinkGroup(selectedNavigationLink)
|
|
58
56
|
? selectedNavigationLink.items
|
|
59
57
|
: [] }, selectedNavigationLink?.key) })] }));
|
|
60
|
-
}
|
|
58
|
+
};
|
|
61
59
|
NavigationMenu.displayName = 'NavigationMenu';
|
|
62
60
|
function PanelNavigation({ allowBack, children, className, 'data-test-selector': dataTestSelector, header, id, isNarrow, linkItems, variant, }) {
|
|
63
61
|
return (jsx("section", { className: clsx(styles['panel-navigation'], className), "data-test-selector": dataTestSelector, id: id, children: jsx(CascadingComponentContainer, { children: jsx("div", { className: clsx(styles['panels'], isNarrow && styles['narrow']), children: jsx(NavigationMenu, { allowBack: allowBack, className: children ? styles['top-panel'] : undefined, header: header, id: "panel-navigation-first-level", isNarrow: isNarrow, linkItems: linkItems, scrollable: children ? false : undefined, variant: variant, children: children }) }) }) }));
|
|
@@ -4,4 +4,4 @@ export interface AnnouncementProps {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
onDismiss?: (id: string) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const Announcement:
|
|
7
|
+
export declare const Announcement: import("react").ForwardRefExoticComponent<AnnouncementProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -12,5 +12,5 @@ interface IntersectionObserverProps {
|
|
|
12
12
|
/** Callback when the intersection state changes */
|
|
13
13
|
onIntersectingChange?: (isIntersecting: boolean) => void;
|
|
14
14
|
}
|
|
15
|
-
export declare function IntersectionObserverComponent({ children, intersectionObserverInit, isDisabled, isPlaceholder, onIntersectingChange, }: IntersectionObserverProps): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
15
|
+
export declare function IntersectionObserverComponent({ children, intersectionObserverInit, isDisabled, isPlaceholder, onIntersectingChange, }: IntersectionObserverProps): string | number | bigint | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
|
|
16
16
|
export {};
|
|
@@ -18,7 +18,7 @@ import { ChangePasswordDialog } from '../../my-sonic/actions/change-password/cha
|
|
|
18
18
|
import { SignInForm } from '../components/sign-in-form/sign-in-form.js';
|
|
19
19
|
import { SignInPageLayout } from '../layouts/sign-in-page-layout/sign-in-page-layout.js';
|
|
20
20
|
|
|
21
|
-
function SignInPage({ returnUrl } = {}) {
|
|
21
|
+
function SignInPage({ onSuccess, returnUrl, } = {}) {
|
|
22
22
|
const paths = usePaths();
|
|
23
23
|
const { navigate } = useNavigate();
|
|
24
24
|
const [userName, setUserName] = useState();
|
|
@@ -48,9 +48,10 @@ function SignInPage({ returnUrl } = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
return 'Unexpected error';
|
|
50
50
|
}, [errorCreateGuest, errorSignIn, setChangePasswordDialogOpen]);
|
|
51
|
-
const onSignInSuccess = () => {
|
|
51
|
+
const onSignInSuccess = async () => {
|
|
52
52
|
setIsSuccess(true);
|
|
53
|
-
|
|
53
|
+
const overrideUrl = await onSuccess?.();
|
|
54
|
+
navigate(overrideUrl ?? returnUrl ?? paths.HOME, { reload: true });
|
|
54
55
|
};
|
|
55
56
|
const decodedReturnUrl = returnUrl
|
|
56
57
|
? decodeURIComponent(returnUrl).toLowerCase()
|
|
@@ -61,8 +62,10 @@ function SignInPage({ returnUrl } = {}) {
|
|
|
61
62
|
resetSignIn();
|
|
62
63
|
resetCreateGuest();
|
|
63
64
|
if (data.guestSignIn) {
|
|
64
|
-
if (session?.isGuest && session.isAuthenticated)
|
|
65
|
-
|
|
65
|
+
if (session?.isGuest && session.isAuthenticated) {
|
|
66
|
+
void onSignInSuccess();
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
66
69
|
createGuest(void undefined, { onSuccess: onSignInSuccess });
|
|
67
70
|
}
|
|
68
71
|
else {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
2
|
import Dropin from '@adyen/adyen-web/dist/types/components/Dropin';
|
|
3
3
|
import { CountryCode, CurrencyCode } from '../../../../intl/types';
|
|
4
4
|
import { AdyenPaymentModel } from '../../../../shared/api/storefront/model/storefront.model';
|
|
@@ -9,7 +9,7 @@ interface AdyenPaymentProps {
|
|
|
9
9
|
countryCode: CountryCode;
|
|
10
10
|
currencyCode: CurrencyCode;
|
|
11
11
|
customerId: string;
|
|
12
|
-
dropinRef:
|
|
12
|
+
dropinRef: RefObject<Dropin | null>;
|
|
13
13
|
environment: 'test' | 'live' | 'live-us' | 'live-au' | 'live-apse' | 'live-in';
|
|
14
14
|
isDisabled?: boolean;
|
|
15
15
|
onComplete: (result: AdyenPaymentModel) => Promise<void>;
|
|
@@ -25,6 +25,7 @@ import { BillingAndInvoiceInformation } from '../../components/billing-and-invoi
|
|
|
25
25
|
import { removeAdyenQueryParamsFromUrl, AdyenPayment } from './adyen-payment.js';
|
|
26
26
|
import styles from './payment.module.css.js';
|
|
27
27
|
|
|
28
|
+
const VAT_NUMBER_PATTERN = /^(AT|BE|BG|CY|CZ|DE|DK|EE|ES|FI|FR|GR|HR|HU|IE|IT|LT|LU|LV|MT|NL|PL|PT|RO|SE|SI|SK)[\dA-Z]{4,20}$/;
|
|
28
29
|
function Payment({ atp, cart: _cart, form, isProcessing, onError: _onError, onPaymentComplete, onProcessing, }) {
|
|
29
30
|
const { createEcommerceEvent, dataLayer } = useDataLayer();
|
|
30
31
|
const { mutate: patchCart } = usePatchCart();
|
|
@@ -42,6 +43,7 @@ function Payment({ atp, cart: _cart, form, isProcessing, onError: _onError, onPa
|
|
|
42
43
|
const [asSoonAsPossible, setAsSoonAsPossible] = useState(!hasAtp || (!isProcessing && !cart.requestedDeliveryDate));
|
|
43
44
|
const [deliveryDate, setDeliveryDate] = useState(cart.requestedDeliveryDateDisplay?.toString() || '');
|
|
44
45
|
const [selectedPaymentMethod, setSelectedPaymentMethod] = useState(cart.paymentOptions?.paymentMethods?.[0]?.name || 'ADY');
|
|
46
|
+
const [vatNumber, setVatNumber] = useState(cart.customerVatNumber);
|
|
45
47
|
if (!isCountryCode(_cart.billTo?.country?.abbreviation))
|
|
46
48
|
throw new Error(`Country code not found for cart with country abbreviation: ${_cart.billTo?.country?.abbreviation}`);
|
|
47
49
|
const countryCode = _cart.billTo.country.abbreviation;
|
|
@@ -197,6 +199,33 @@ function Payment({ atp, cart: _cart, form, isProcessing, onError: _onError, onPa
|
|
|
197
199
|
}
|
|
198
200
|
}
|
|
199
201
|
}
|
|
202
|
+
async function onVatNumberBlur(e) {
|
|
203
|
+
const customerVatNumber = e.target.value
|
|
204
|
+
.replaceAll(/[\s,.]/g, '')
|
|
205
|
+
.toUpperCase();
|
|
206
|
+
if (isProcessing)
|
|
207
|
+
return;
|
|
208
|
+
setVatNumber(customerVatNumber);
|
|
209
|
+
if (customerVatNumber === cartRef.current.customerVatNumber)
|
|
210
|
+
return;
|
|
211
|
+
// Only send values the server could accept; format errors show on submit
|
|
212
|
+
if (customerVatNumber &&
|
|
213
|
+
!(customerVatNumber.length >= 8 &&
|
|
214
|
+
VAT_NUMBER_PATTERN.test(customerVatNumber)))
|
|
215
|
+
return;
|
|
216
|
+
try {
|
|
217
|
+
cartRef.current = await patchCart({
|
|
218
|
+
cart: { ...cartRef.current, customerVatNumber },
|
|
219
|
+
forceRecalculation: false,
|
|
220
|
+
});
|
|
221
|
+
setValidationErrors(({ customerVatNumber: _, ...rest }) => cartRef.current.properties.customerVatNumberStatus === 'invalid'
|
|
222
|
+
? { ...rest, customerVatNumber: t('validation.invalid') }
|
|
223
|
+
: rest);
|
|
224
|
+
}
|
|
225
|
+
catch (error) {
|
|
226
|
+
logger.error(error);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
200
229
|
const onComplete = useCallback(
|
|
201
230
|
/* Adyen payment continuation after submit */
|
|
202
231
|
async (result) => {
|
|
@@ -244,7 +273,9 @@ function Payment({ atp, cart: _cart, form, isProcessing, onError: _onError, onPa
|
|
|
244
273
|
setAsSoonAsPossible(checked);
|
|
245
274
|
if (checked)
|
|
246
275
|
setDeliveryDate('');
|
|
247
|
-
}, children: t('As soon as possible') }), jsx(InfoIconTooltip, { size: "sm", variant: "stroke", children: t('Selecting As Soon As Possible will enable us to send the products to you as they become available.') })] })] })), jsx(Select, { isRequired: true, showLabel: true, "data-test-selector": "industrySelect", defaultSelectedOption: cart.properties.industry || 'AU', isDisabled: isDisabled, label: t('Industry'), name: "industry", options: industryOptions, placeholder: t('Select an industry'), variant: "solid" }), jsx(TextField, { showLabel: true,
|
|
276
|
+
}, children: t('As soon as possible') }), jsx(InfoIconTooltip, { size: "sm", variant: "stroke", children: t('Selecting As Soon As Possible will enable us to send the products to you as they become available.') })] })] })), jsx(Select, { isRequired: true, showLabel: true, "data-test-selector": "industrySelect", defaultSelectedOption: cart.properties.industry || 'AU', isDisabled: isDisabled, label: t('Industry'), name: "industry", options: industryOptions, placeholder: t('Select an industry'), variant: "solid" }), jsx(TextField, { showLabel: true, info: t('Your VAT number starts with your 2-letter country code, e.g. NL123456789. Leave this field empty if you do not have one.'), isDisabled: isDisabled, label: t('VAT Number'), name: "customerVatNumber", onBlur: onVatNumberBlur, onChange: setVatNumber, validate: value => !value || (value.length >= 8 && VAT_NUMBER_PATTERN.test(value))
|
|
277
|
+
? true
|
|
278
|
+
: t('Please enter a valid VAT number, starting with your country code, e.g. NL123456789.'), value: vatNumber }, `vat${Boolean(validationErrors.customerVatNumber)}`), jsx(TextField, { showLabel: true, defaultValue: cart.poNumber, isDisabled: isDisabled, isRequired: cart.requiresPoNumber, label: t('PO Number'), name: "poNumber" }), paymentMethodOptions && Object.keys(paymentMethodOptions).length > 1 && (jsx(Select, { "data-test-selector": "paymentMethodSelect", defaultSelectedOption: cart.paymentOptions?.paymentMethods?.[0]?.name || 'ADY', isDisabled: isDisabled, label: t('Payment method'), name: "paymentMethod", onChange: setSelectedPaymentMethod, options: paymentMethodOptions, selectedOption: selectedPaymentMethod, variant: "solid" })), isAdyenPayment && cart.billTo && (jsx(AdyenPayment, { amount: cart.orderGrandTotal, cartId: cart.trackId, countryCode: countryCode, currencyCode: currencyCode, customerId: cart.billTo.id, dropinRef: dropinRef, environment: isProductionEnvironment ? 'live' : 'test', isDisabled: isDisabled, onComplete: onComplete, onError: onError, orderAmount: cart.orderGrandTotal, returnUrl:
|
|
248
279
|
/* eslint-disable ssr-friendly/no-dom-globals-in-react-fc */
|
|
249
280
|
typeof window === 'undefined'
|
|
250
281
|
? ''
|
|
@@ -34,7 +34,7 @@ function ShippingPage() {
|
|
|
34
34
|
? countries.find(country => country.id === cart.billTo?.country?.id)
|
|
35
35
|
: selectedCountry;
|
|
36
36
|
const { close: closeCurrencyWarningDialog, isOpen: currencyWarningDialogIsOpen, open: openCurrencyWarningDialog, toggle: toggleCurrencyWarningDialog, } = useDisclosure();
|
|
37
|
-
const formData = useRef();
|
|
37
|
+
const formData = useRef(undefined);
|
|
38
38
|
const { data: fulfillmentMethods, isLoading: isLoadingFulfillmentMethods } = useFetchFulfillmentMethodsForCurrentCart();
|
|
39
39
|
const { isLoading: isPatchingSession, mutate: patchSession } = usePatchSession();
|
|
40
40
|
const { error: errorPatchBillingAddress, isError, isLoading: isPatching, isSuccess, mutate: patchShippingDetails, } = usePatchShippingDetails();
|
|
@@ -5,4 +5,4 @@ export interface ProductListingPageContextType {
|
|
|
5
5
|
isError?: boolean;
|
|
6
6
|
isLoading?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare const ProductListingPageContext:
|
|
8
|
+
export declare const ProductListingPageContext: import("react").Context<ProductListingPageContextType>;
|
|
@@ -2,9 +2,14 @@ import { config } from '../../../../config.js';
|
|
|
2
2
|
import { request } from '../../../fetch/request.js';
|
|
3
3
|
|
|
4
4
|
async function markProductAsRecentlyViewed({ productId, }) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
try {
|
|
6
|
+
await request({
|
|
7
|
+
url: `${config.SHOP_API_URL}/api/v2/products/${productId}?addToRecentlyViewed=true`,
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
// fire-and-forget — network failures are intentionally swallowed
|
|
12
|
+
}
|
|
8
13
|
}
|
|
9
14
|
|
|
10
15
|
export { markProductAsRecentlyViewed };
|
|
@@ -3,7 +3,7 @@ import { useRef, useCallback } from 'react';
|
|
|
3
3
|
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
5
|
function useDebouncedCallback(func, delay) {
|
|
6
|
-
const timeoutId = useRef();
|
|
6
|
+
const timeoutId = useRef(undefined);
|
|
7
7
|
const debounced = (...args) => new Promise(resolve => {
|
|
8
8
|
if (typeof window === 'undefined')
|
|
9
9
|
return resolve(func(...args));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LocalStorageContextValue } from './types';
|
|
2
|
-
export declare const LocalStorageContext:
|
|
2
|
+
export declare const LocalStorageContext: import("react").Context<LocalStorageContextValue | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement, ReactNode, RefObject } from 'react';
|
|
2
2
|
import { EventEmitter } from '../utils/event-emitter';
|
|
3
3
|
declare class State<T> extends EventEmitter<T | undefined> {
|
|
4
4
|
private _state;
|
|
@@ -10,12 +10,12 @@ declare class State<T> extends EventEmitter<T | undefined> {
|
|
|
10
10
|
}
|
|
11
11
|
declare class GlobalState {
|
|
12
12
|
private states;
|
|
13
|
-
constructor(states:
|
|
13
|
+
constructor(states: RefObject<Record<string | symbol, State<any>>>);
|
|
14
14
|
get<T>(key: string | symbol): State<T>;
|
|
15
15
|
get<T>(key: string | symbol, initialState: T | undefined): State<T>;
|
|
16
16
|
set<T>(key: string | symbol, state: State<T>): void;
|
|
17
17
|
}
|
|
18
|
-
export declare const GlobalStateProviderContext:
|
|
18
|
+
export declare const GlobalStateProviderContext: import("react").Context<GlobalState>;
|
|
19
19
|
interface GlobalStateProviderProps {
|
|
20
20
|
children: ReactNode;
|
|
21
21
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { RouteContextValue } from './types';
|
|
2
|
-
export declare const RouteContext:
|
|
2
|
+
export declare const RouteContext: import("react").Context<RouteContextValue | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function useRouteLinkElement():
|
|
1
|
+
export declare function useRouteLinkElement(): import("react").ElementType<import("./types").RouteLinkElementProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NavigateOptions } from './types';
|
|
2
2
|
export declare function useRouteLink(ignoreLocalePrefix?: boolean): {
|
|
3
|
-
RouteLinkElement:
|
|
3
|
+
RouteLinkElement: import("react").ElementType<import("./types").RouteLinkElementProps>;
|
|
4
4
|
getRouteLinkProps: (href: string, route?: NavigateOptions) => {
|
|
5
5
|
href: string;
|
|
6
6
|
onNavigate: () => void;
|
|
@@ -4,5 +4,5 @@ export interface WithRoutingProps {
|
|
|
4
4
|
href?: string;
|
|
5
5
|
route?: NavigateOptions;
|
|
6
6
|
}
|
|
7
|
-
export declare function withRouting(component: ElementType<RouteLinkElementProps>):
|
|
8
|
-
export declare const FallbackRouteLink:
|
|
7
|
+
export declare function withRouting(component: ElementType<RouteLinkElementProps>): import("react").FunctionComponent<RouteLinkElementProps>;
|
|
8
|
+
export declare const FallbackRouteLink: import("react").FunctionComponent<RouteLinkElementProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ForwardedRef,
|
|
2
|
-
export declare function multiRef<T extends HTMLElement>(...refs: (ForwardedRef<T> |
|
|
1
|
+
import { ForwardedRef, Ref, RefObject } from 'react';
|
|
2
|
+
export declare function multiRef<T extends HTMLElement>(...refs: (ForwardedRef<T> | RefObject<T | null | undefined> | null | undefined)[]): Ref<T>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
function multiRef(...refs) {
|
|
2
2
|
return function (el) {
|
|
3
3
|
for (const ref of refs) {
|
|
4
|
-
if (ref
|
|
4
|
+
if (!ref)
|
|
5
|
+
continue;
|
|
6
|
+
if (ref instanceof Function) {
|
|
5
7
|
ref(el);
|
|
6
8
|
}
|
|
7
|
-
else
|
|
9
|
+
else {
|
|
8
10
|
ref.current = el;
|
|
9
11
|
}
|
|
10
12
|
}
|
|
@@ -4,5 +4,5 @@ interface ScrollOptions {
|
|
|
4
4
|
scrollPadding?: number;
|
|
5
5
|
}
|
|
6
6
|
export declare const scrollToTop: (scrollOptions?: ScrollToOptions) => void;
|
|
7
|
-
export declare const scrollIntoViewRef: (ref: RefObject<HTMLElement>, scrollOptions?: ScrollOptions) => void;
|
|
7
|
+
export declare const scrollIntoViewRef: (ref: RefObject<HTMLElement | null>, scrollOptions?: ScrollOptions) => void;
|
|
8
8
|
export {};
|
package/dist/toast/toast.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export interface ToastProps {
|
|
|
5
5
|
onClose?: (id: string) => void;
|
|
6
6
|
toastMessage: ToastMessage;
|
|
7
7
|
}
|
|
8
|
-
export declare const Toast:
|
|
8
|
+
export declare const Toast: import("react").ForwardRefExoticComponent<ToastProps & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/toast/use-toast.js
CHANGED
|
@@ -10,7 +10,10 @@ function useToast() {
|
|
|
10
10
|
return {
|
|
11
11
|
addToast(toastMessage, toastOptions) {
|
|
12
12
|
const id = createUUID();
|
|
13
|
-
toast(jsx(Toast, { ref: el =>
|
|
13
|
+
toast(jsx(Toast, { ref: el => {
|
|
14
|
+
if (el)
|
|
15
|
+
el.style.zIndex = (count.current++).toString();
|
|
16
|
+
}, id: id, onClose: id => toast.dismiss(id), toastMessage: toastMessage }), {
|
|
14
17
|
toastId: id,
|
|
15
18
|
...toastOptions,
|
|
16
19
|
});
|
|
@@ -15,9 +15,9 @@ export interface HeadingProps {
|
|
|
15
15
|
tag?: Tag;
|
|
16
16
|
uppercase?: boolean;
|
|
17
17
|
}
|
|
18
|
-
export declare function Heading({ bold, breakpoints, children, className, 'data-test-selector': dataTestSelector, id, italic, size, tag, uppercase, }: HeadingProps):
|
|
18
|
+
export declare function Heading({ bold, breakpoints, children, className, 'data-test-selector': dataTestSelector, id, italic, size, tag, uppercase, }: HeadingProps): import("react").ReactElement<{
|
|
19
19
|
className: string;
|
|
20
20
|
'data-test-selector': string;
|
|
21
21
|
id: string | undefined;
|
|
22
|
-
}, string |
|
|
22
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
23
23
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonic-equipment/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"@types/js-cookie": "3.0.6",
|
|
68
68
|
"@types/node": "24.3.0",
|
|
69
69
|
"@types/postcss-import": "14.0.3",
|
|
70
|
-
"@types/react": "
|
|
71
|
-
"@types/react-dom": "
|
|
70
|
+
"@types/react": "^19.0.0",
|
|
71
|
+
"@types/react-dom": "^19.0.0",
|
|
72
72
|
"@typescript-eslint/eslint-plugin": "8.41.0",
|
|
73
73
|
"@typescript-eslint/parser": "8.41.0",
|
|
74
74
|
"@typescript/lib-dom": "npm:typescript-partial-lib-dom@^1.1.0",
|
|
@@ -106,8 +106,8 @@
|
|
|
106
106
|
"postcss-import": "16.1.1",
|
|
107
107
|
"postcss-nested": "7.0.2",
|
|
108
108
|
"prettier": "3.6.2",
|
|
109
|
-
"react": "
|
|
110
|
-
"react-dom": "
|
|
109
|
+
"react": "^19.1.0",
|
|
110
|
+
"react-dom": "^19.1.0",
|
|
111
111
|
"react-json-view": "1.21.3",
|
|
112
112
|
"rimraf": "6.0.1",
|
|
113
113
|
"rollup": "4.49.0",
|