@sonic-equipment/ui 156.0.0 → 158.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 (85) hide show
  1. package/dist/algolia/algolia-sort-by.js +1 -1
  2. package/dist/buttons/add-to-cart-button/add-to-cart-button.js +8 -11
  3. package/dist/buttons/add-to-cart-button/add-to-cart-button.module.css.js +1 -1
  4. package/dist/cards/orderline-card/orderline-card.js +1 -2
  5. package/dist/cards/product-card/connected-product-card.d.ts +2 -2
  6. package/dist/cards/product-card/product-card.js +1 -2
  7. package/dist/cards/product-card/product-card.module.css.js +1 -1
  8. package/dist/cart-totals/cart-totals.js +1 -1
  9. package/dist/country-select/country-select.d.ts +1 -0
  10. package/dist/country-select/country-select.js +3 -3
  11. package/dist/exports.d.ts +13 -1
  12. package/dist/filters/pagination/pagination.js +3 -1
  13. package/dist/forms/checkbox/checkbox.d.ts +13 -4
  14. package/dist/forms/checkbox/checkbox.js +6 -2
  15. package/dist/forms/checkbox/checkbox.module.css.js +1 -1
  16. package/dist/forms/checkbox-field/checkbox-field.d.ts +10 -0
  17. package/dist/forms/checkbox-field/checkbox-field.js +16 -0
  18. package/dist/forms/checkbox-field/checkbox-field.module.css.js +3 -0
  19. package/dist/forms/color-checkbox/color-checkbox.d.ts +5 -3
  20. package/dist/forms/color-checkbox/color-checkbox.js +7 -3
  21. package/dist/forms/form/form-field-layout.d.ts +10 -0
  22. package/dist/forms/form/form-field-layout.js +10 -0
  23. package/dist/forms/form/form-field-layout.module.css.js +3 -0
  24. package/dist/forms/form/form-segment-group.d.ts +6 -0
  25. package/dist/forms/form/form-segment-group.js +13 -0
  26. package/dist/forms/form/form-segment-group.module.css.js +3 -0
  27. package/dist/forms/form/form-segment.d.ts +6 -0
  28. package/dist/forms/form/form-segment.js +9 -0
  29. package/dist/forms/form/form-segment.module.css.js +3 -0
  30. package/dist/forms/form/form.d.ts +16 -0
  31. package/dist/forms/form/form.js +27 -0
  32. package/dist/forms/form/form.module.css.js +3 -0
  33. package/dist/forms/input/input.d.ts +2 -0
  34. package/dist/forms/input/input.js +2 -2
  35. package/dist/forms/label/label.js +1 -1
  36. package/dist/forms/number-field/number-field.d.ts +9 -9
  37. package/dist/forms/number-field/number-field.js +18 -14
  38. package/dist/forms/number-field/number-field.module.css.js +1 -1
  39. package/dist/forms/select/select.js +3 -3
  40. package/dist/forms/select-field/select-field.d.ts +27 -0
  41. package/dist/forms/select-field/select-field.js +31 -0
  42. package/dist/forms/select-field/select-field.module.css.js +3 -0
  43. package/dist/forms/switch/switch.d.ts +12 -4
  44. package/dist/forms/switch/switch.js +6 -2
  45. package/dist/forms/switch/switch.module.css.js +1 -1
  46. package/dist/forms/switch-field/switch-field.d.ts +10 -0
  47. package/dist/forms/switch-field/switch-field.js +18 -0
  48. package/dist/forms/switch-field/switch-field.module.css.js +3 -0
  49. package/dist/forms/text-field/password-reveal-toggle/password-reveal-toggle.js +1 -1
  50. package/dist/forms/text-field/password-reveal-toggle/password-reveal-toggle.module.css.js +1 -1
  51. package/dist/forms/text-field/text-field.d.ts +32 -20
  52. package/dist/forms/text-field/text-field.js +13 -10
  53. package/dist/forms/text-field/text-field.module.css.js +1 -1
  54. package/dist/forms/textarea/textarea.d.ts +1 -0
  55. package/dist/index.js +14 -2
  56. package/dist/intl/translation-id.d.ts +1 -1
  57. package/dist/pages/account/components/create-account-form/create-account-form.d.ts +11 -0
  58. package/dist/pages/account/components/create-account-form/create-account-form.js +89 -0
  59. package/dist/pages/account/components/create-account-form/create-account-form.module.css.js +3 -0
  60. package/dist/{sign-in-form → pages/account/components/sign-in-form}/sign-in-form.d.ts +3 -3
  61. package/dist/pages/account/components/sign-in-form/sign-in-form.js +71 -0
  62. package/dist/pages/account/components/sign-in-form/sign-in-form.module.css.js +3 -0
  63. package/dist/pages/account/create-account-page/create-account-page.d.ts +3 -0
  64. package/dist/pages/account/create-account-page/create-account-page.js +45 -0
  65. package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-background-image.d.ts +6 -0
  66. package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-background-image.js +9 -0
  67. package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-layout.d.ts +1 -1
  68. package/dist/pages/account/layouts/sign-in-page-layout/sign-in-page-layout.js +2 -1
  69. package/dist/pages/account/sign-in-page/sign-in-page.js +3 -10
  70. package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.js +1 -1
  71. package/dist/pages/checkout/payment-page/components/payment.js +6 -5
  72. package/dist/pages/checkout/shipping-page/shipping-page-content.js +1 -1
  73. package/dist/pages/checkout/shipping-page/shipping-page.js +1 -1
  74. package/dist/shared/api/storefront/hooks/authentication/use-create-account.d.ts +3 -0
  75. package/dist/shared/api/storefront/hooks/authentication/use-create-account.js +28 -0
  76. package/dist/shared/api/storefront/services/authentication-service.d.ts +23 -0
  77. package/dist/shared/api/storefront/services/authentication-service.js +40 -2
  78. package/dist/shared/hooks/use-script.d.ts +3 -3
  79. package/dist/shared/model/account.d.ts +19 -0
  80. package/dist/shared/model/account.js +4 -0
  81. package/dist/styles.css +844 -613
  82. package/dist/tooltip/tooltip.js +1 -1
  83. package/package.json +1 -1
  84. package/dist/sign-in-form/sign-in-form.js +0 -59
  85. package/dist/sign-in-form/sign-in-form.module.css.js +0 -3
@@ -1,12 +1,14 @@
1
- import { FormEventHandler, KeyboardEvent } from 'react';
1
+ import { FocusEvent, FormEventHandler } from 'react';
2
2
  import { ValidateFunction } from '../field-error/field-error';
3
- export type NumberFieldSize = 'md' | 'lg';
4
3
  interface NumberFieldProps {
5
4
  autoFocus?: boolean;
6
5
  autoGrow?: boolean;
6
+ className?: string;
7
7
  'data-test-selector'?: string;
8
8
  defaultValue?: number;
9
9
  formatOptions?: Intl.NumberFormatOptions;
10
+ info?: string;
11
+ inputMode?: 'numeric' | 'decimal';
10
12
  isDisabled?: boolean;
11
13
  isInvalid?: boolean;
12
14
  isReadOnly?: boolean;
@@ -16,19 +18,17 @@ interface NumberFieldProps {
16
18
  maxValue?: number;
17
19
  minValue?: number;
18
20
  name?: string;
21
+ onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
19
22
  onChange?: (value: number) => void;
20
23
  onInput?: FormEventHandler<HTMLInputElement>;
21
- onKeyUp?: (e: KeyboardEvent) => void;
24
+ onKeyUp?: (e: React.KeyboardEvent) => void;
22
25
  placeholder?: string;
23
26
  showLabel?: boolean;
24
- size?: NumberFieldSize;
27
+ size?: 'md' | 'lg';
28
+ step?: number;
25
29
  validate?: ValidateFunction<number>;
26
30
  value?: number;
27
31
  withButtons?: boolean;
28
32
  }
29
- /**
30
- * This component is used to create a number field.
31
- * This field can also grow when a user types in text.
32
- */
33
- export declare function NumberField({ autoFocus, autoGrow, 'data-test-selector': dataTestSelector, defaultValue, formatOptions, isDisabled, isInvalid, isReadOnly, isRequired, label, maxLength, maxValue, minValue, name, onChange, onInput, onKeyUp, placeholder, showLabel, size, validate, value, withButtons, }: NumberFieldProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function NumberField({ autoGrow, className, 'data-test-selector': dataTestSelector, defaultValue, formatOptions, info, inputMode, isDisabled, isInvalid, isReadOnly, isRequired, label, maxLength, maxValue, minValue, name, onBlur, onChange, onInput, onKeyUp, placeholder, showLabel, size, step, value, withButtons, }: NumberFieldProps): import("react/jsx-runtime").JSX.Element;
34
34
  export {};
@@ -1,12 +1,14 @@
1
1
  "use client";
2
- import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { useRef } from 'react';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { useRef, useState } from 'react';
4
4
  import { NumberField as NumberField$1, Button } from 'react-aria-components';
5
5
  import clsx from 'clsx';
6
6
  import { StrokeCollapseIcon } from '../../icons/stroke/stroke-collapse-icon.js';
7
7
  import { StrokeExpandIcon } from '../../icons/stroke/stroke-expand-icon.js';
8
8
  import { StrokeTrashIcon } from '../../icons/stroke/stroke-trash-icon.js';
9
+ import { InfoIconTooltip } from '../../info-icon-tooltip/info-icon-tooltip.js';
9
10
  import { FieldError } from '../field-error/field-error.js';
11
+ import { FormFieldLayout } from '../form/form-field-layout.js';
10
12
  import { Input } from '../input/input.js';
11
13
  import { Label } from '../label/label.js';
12
14
  import styles from './number-field.module.css.js';
@@ -14,20 +16,22 @@ import styles from './number-field.module.css.js';
14
16
  const defaultFormatOptions = {
15
17
  style: 'decimal',
16
18
  useGrouping: false,
19
+ // TODO: more needed here? Locale?
20
+ // TODO: this should be hard set options, not free to tweak
17
21
  };
18
- /**
19
- * This component is used to create a number field.
20
- * This field can also grow when a user types in text.
21
- */
22
- function NumberField({ autoFocus, autoGrow, 'data-test-selector': dataTestSelector, defaultValue, formatOptions = defaultFormatOptions, isDisabled, isInvalid, isReadOnly, isRequired, label, maxLength, maxValue, minValue, name, onChange, onInput, onKeyUp, placeholder, showLabel = false, size = 'lg', validate, value, withButtons, }) {
22
+ function NumberFieldControls({ active, children, isDisabled, showReset, }) {
23
+ if (active)
24
+ return (jsxs("div", { className: styles['controls'], children: [jsx(Button, { className: styles['control'], "data-test-selector": "decrement", isDisabled: isDisabled, slot: "decrement", children: showReset ? jsx(StrokeTrashIcon, {}) : jsx(StrokeCollapseIcon, {}) }), children, jsx(Button, { className: styles['control'], "data-test-selector": "increment", isDisabled: isDisabled, slot: "increment", children: jsx(StrokeExpandIcon, {}) })] }));
25
+ return children;
26
+ }
27
+ function 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, onInput, onKeyUp, placeholder, showLabel, size = 'lg', step = 1, value, withButtons, }) {
23
28
  const inputRef = useRef(null);
24
- return (jsxs(NumberField$1, { "aria-label": label, autoFocus: autoFocus, className: clsx(styles.field, styles[size]), "data-test-selector": dataTestSelector, defaultValue: defaultValue, formatOptions: formatOptions, isDisabled: isDisabled, isInvalid: isInvalid, isReadOnly: isReadOnly, isRequired: isRequired, maxValue: maxValue, minValue: minValue, name: name, onChange: onChange, onInput: onInput, validate: validate, value: value, children: [showLabel && jsx(Label, { isRequired: isRequired, children: label }), jsxs("div", { className: styles['button-input-container'], children: [withButtons && (jsx(Button, { "data-test-selector": "decrement", isDisabled: isDisabled,
25
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
26
- // @ts-expect-error
27
- onClick: e => e.preventDefault(), onPressStart: e => e.target.focus(), slot: "decrement", children: (value || 0) <= 1 ? jsx(StrokeTrashIcon, {}) : jsx(StrokeCollapseIcon, {}) })), jsx(Input, { ref: inputRef, autoGrow: autoGrow, "data-test-selector": "value", label: label, maxLength: maxLength, onFocus: e => (e.target.selectionStart = e.target.value.length || 0), onKeyUp: e => onKeyUp?.(e), placeholder: placeholder, size: size }), withButtons && (jsx(Button, { "data-test-selector": "increment", isDisabled: isDisabled,
28
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
29
- // @ts-expect-error
30
- onClick: e => e.preventDefault(), onPressStart: e => e.target.focus(), slot: "increment", children: jsx(StrokeExpandIcon, {}) }))] }), jsx(FieldError, {})] }));
29
+ const [showControlsReset, setShowControlsReset] = useState((defaultValue || value || 0) - step <= minValue);
30
+ const handleChange = (value) => {
31
+ setShowControlsReset(value - step <= minValue);
32
+ onChange?.(value);
33
+ };
34
+ return (jsx(NumberField$1, { "aria-label": label, className: clsx(styles['number-field'], styles[size], className), defaultValue: defaultValue, formatOptions: formatOptions, isDisabled: isDisabled, isInvalid: isInvalid, isReadOnly: isReadOnly, isRequired: isRequired, maxValue: maxValue, minValue: minValue, name: name, onChange: value => handleChange(value), onInput: onInput, onKeyUp: onKeyUp, 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: inputRef, autoGrow: autoGrow, "data-test-selector": dataTestSelector, inputMode: inputMode, label: label, maxLength: maxLength, onBlur: onBlur, placeholder: placeholder, size: size }) }) }) }));
31
35
  }
32
36
 
33
37
  export { NumberField };
@@ -1,3 +1,3 @@
1
- var styles = {"field":"number-field-module-gmnog","button-input-container":"number-field-module-8Lvgh","zoom-in-text":"number-field-module-OlEoa"};
1
+ var styles = {"number-field":"number-field-module-xawWc","controls":"number-field-module-A1nvE","zoom-in-text":"number-field-module-OlEoa","control":"number-field-module-lkZYQ"};
2
2
 
3
3
  export { styles as default };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { useRef, useEffect } from 'react';
4
- import { Select as Select$1, Button, SelectValue, Popover, ListBox, Section, Header, ListBoxItem } from 'react-aria-components';
4
+ import { Select as Select$1, Button, SelectValue, Popover, ListBox, ListBoxSection, Header, ListBoxItem } from 'react-aria-components';
5
5
  import clsx from 'clsx';
6
6
  import { GlyphsChevronsSlimDownIcon } from '../../icons/glyph/glyphs-chevrons-slim-down-icon.js';
7
7
  import { StrokeCheckmarkIcon } from '../../icons/stroke/stroke-checkmark-icon.js';
@@ -11,7 +11,7 @@ import { Label } from '../label/label.js';
11
11
  import styles from './select.module.css.js';
12
12
 
13
13
  const defaultIcon = (jsx(GlyphsChevronsSlimDownIcon, { "aria-hidden": "true", className: styles.chevron }));
14
- function Select({ 'data-test-selector': dataTestSelector, defaultSelectedOption, icon = defaultIcon, isDisabled = false, isLoading, isRequired = false, label, name, onChange, options, placeholder, selectedOption, showLabel = true, showPlaceholder = true, size = 'md', variant = 'outline', }) {
14
+ function Select({ 'data-test-selector': dataTestSelector, defaultSelectedOption, icon = defaultIcon, isDisabled = false, isLoading, isRequired = false, label, name, onChange, options, placeholder, selectedOption, showLabel = false, showPlaceholder = true, size = 'md', variant = 'outline', }) {
15
15
  const selectRef = useRef(null);
16
16
  useEffect(() => {
17
17
  const updateWidth = () => {
@@ -32,7 +32,7 @@ function Select({ 'data-test-selector': dataTestSelector, defaultSelectedOption,
32
32
  ? undefined
33
33
  : String(defaultSelectedOption), isDisabled: isDisabled, isRequired: isRequired, name: name, onSelectionChange: selected => onChange?.(selected), placeholder: placeholder || label, selectedKey: selectedOption === undefined ? undefined : String(selectedOption), children: [showLabel && jsx(Label, { isRequired: isRequired, children: label }), jsxs(Button, { className: styles.button, children: [jsx(SelectValue, { "data-test-selector": "value" }), jsx("div", { className: styles['icon-wrapper'], children: isLoading ? jsx(ProgressCircle, { variant: "gray" }) : icon })] }), jsx(FieldError, {}), jsx(Popover, { ref: ref =>
34
34
  // Workaround for react/react-aria #1513
35
- ref?.addEventListener('touchend', e => e.preventDefault()), className: clsx(styles.popover, styles[variant]), placement: "bottom left", children: jsx(ListBox, { className: styles.listbox, "data-test-selector": dataTestSelector ? `${dataTestSelector}_options` : undefined, children: jsxs(Section, { children: [showPlaceholder && (jsx(Header, { className: styles.header, children: placeholder || label })), Object.entries(options).map(([key, value]) => (jsxs(ListBoxItem, { "aria-label": value, className: styles.item, id: key, textValue: value, children: [selectedOption === key && (jsx("span", { slot: "description", children: jsx(StrokeCheckmarkIcon, { className: styles.check }) })), jsx("span", { slot: "label", children: value })] }, key)))] }) }) })] }));
35
+ ref?.addEventListener('touchend', e => e.preventDefault()), className: clsx(styles.popover, styles[variant]), placement: "bottom left", children: jsx(ListBox, { className: styles.listbox, "data-test-selector": dataTestSelector ? `${dataTestSelector}_options` : undefined, children: jsxs(ListBoxSection, { children: [showPlaceholder && (jsx(Header, { className: styles.header, children: placeholder || label })), Object.entries(options).map(([key, value]) => (jsxs(ListBoxItem, { "aria-label": value, className: styles.item, id: key, textValue: value, children: [selectedOption === key && (jsx("span", { slot: "description", children: jsx(StrokeCheckmarkIcon, { className: styles.check }) })), jsx("span", { slot: "label", children: value })] }, key)))] }) }) })] }));
36
36
  }
37
37
 
38
38
  export { Select };
@@ -0,0 +1,27 @@
1
+ import { ValidateFunction } from '../field-error/field-error';
2
+ interface SelectFieldPropsBase {
3
+ 'data-test-selector'?: string;
4
+ label: string;
5
+ placeholder?: string;
6
+ size?: 'md' | 'lg';
7
+ }
8
+ interface SelectFieldProps<T> extends SelectFieldPropsBase {
9
+ autoFocus?: boolean;
10
+ className?: string;
11
+ defaultSelectedOption?: keyof T;
12
+ info?: string;
13
+ isDisabled?: boolean;
14
+ isInvalid?: boolean;
15
+ isLoading?: boolean;
16
+ isRequired?: boolean;
17
+ name?: string;
18
+ onChange?: (value: keyof T) => void;
19
+ options: T;
20
+ selectedOption?: keyof T;
21
+ showLabel?: boolean;
22
+ showPlaceholder?: boolean;
23
+ validate?: ValidateFunction<string>;
24
+ variant?: 'outline' | 'solid';
25
+ }
26
+ export declare function SelectField<T extends Record<string, string>>({ className, 'data-test-selector': dataTestSelector, defaultSelectedOption, info, isDisabled, isInvalid, isLoading, isRequired, label, name, onChange, options, placeholder, selectedOption, showLabel, showPlaceholder, size, variant, }: SelectFieldProps<T>): import("react/jsx-runtime").JSX.Element;
27
+ export {};
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import { useState, useEffect } from 'react';
4
+ import { Select, Button, SelectValue, Popover, ListBox, ListBoxSection, Header, ListBoxItem } from 'react-aria-components';
5
+ import clsx from 'clsx';
6
+ import { GlyphsChevronsSlimDownIcon } from '../../icons/glyph/glyphs-chevrons-slim-down-icon.js';
7
+ import { StrokeCheckmarkIcon } from '../../icons/stroke/stroke-checkmark-icon.js';
8
+ import { InfoIconTooltip } from '../../info-icon-tooltip/info-icon-tooltip.js';
9
+ import { ProgressCircle } from '../../loading/progress-circle.js';
10
+ import { FieldError } from '../field-error/field-error.js';
11
+ import { FormFieldLayout } from '../form/form-field-layout.js';
12
+ import { Label } from '../label/label.js';
13
+ import styles from './select-field.module.css.js';
14
+
15
+ function SelectField({ className, 'data-test-selector': dataTestSelector, defaultSelectedOption, info, isDisabled, isInvalid, isLoading, isRequired, label, name, onChange, options, placeholder, selectedOption, showLabel = true, showPlaceholder, size = 'lg', variant = 'outline', }) {
16
+ const [selectedKey, setSelectedKey] = useState(defaultSelectedOption);
17
+ const handleChange = (key) => {
18
+ setSelectedKey(key);
19
+ onChange?.(key);
20
+ };
21
+ useEffect(() => {
22
+ setSelectedKey(selectedOption);
23
+ }, [selectedOption]);
24
+ return (jsx(Select, { "aria-label": label, className: clsx(styles['select-field'], styles[size], styles[variant], {
25
+ [styles['loading']]: isLoading,
26
+ }, className), "data-test-selector": dataTestSelector, defaultSelectedKey: defaultSelectedOption === undefined
27
+ ? undefined
28
+ : String(defaultSelectedOption), isDisabled: isDisabled, isInvalid: isInvalid, isRequired: isRequired, name: name, onSelectionChange: key => handleChange(key), placeholder: placeholder || label, selectedKey: selectedOption === undefined ? undefined : String(selectedOption), children: jsx(FormFieldLayout, { errorSlot: jsx(FieldError, {}), infoSlot: info && jsx(InfoIconTooltip, { children: info }), labelSlot: showLabel && jsx(Label, { isRequired: isRequired, children: label }), children: jsxs(Fragment, { children: [jsxs(Button, { className: styles.button, children: [jsx(SelectValue, { className: styles.value, "data-test-selector": "value" }), isLoading ? (jsx(ProgressCircle, { "aria-hidden": "true", className: styles.icon, variant: "gray" })) : (jsx(GlyphsChevronsSlimDownIcon, { "aria-hidden": "true", className: styles.icon }))] }), jsx(Popover, { className: clsx(styles.popover, styles[variant]), placement: "bottom left", children: jsx(ListBox, { className: styles.listbox, "data-test-selector": dataTestSelector ? `${dataTestSelector}_options` : undefined, children: jsxs(ListBoxSection, { children: [showPlaceholder && (jsx(Header, { className: styles.header, children: placeholder || label })), Object.entries(options).map(([key, value]) => (jsxs(ListBoxItem, { "aria-label": value, className: styles.item, id: key, textValue: value, children: [selectedKey === key && (jsx("span", { slot: "description", children: jsx(StrokeCheckmarkIcon, { className: styles.check }) })), jsx("span", { slot: "label", children: value })] }, key)))] }) }) })] }) }) }));
29
+ }
30
+
31
+ export { SelectField };
@@ -0,0 +1,3 @@
1
+ var styles = {"select-field":"select-field-module-6Mz-Y","md":"select-field-module-CSbmU","solid":"select-field-module--Ocnn","loading":"select-field-module-nT7fi","button":"select-field-module-GkFBV","value":"select-field-module-qQmvX","icon":"select-field-module-yhZMK","popover":"select-field-module--7nQi","listbox":"select-field-module-O2abK","header":"select-field-module-O7Ce-","item":"select-field-module-KFavE"};
2
+
3
+ export { styles as default };
@@ -1,14 +1,22 @@
1
1
  import { ReactNode } from 'react';
2
- export interface SwitchProps {
3
- _pseudo?: 'none' | 'focus' | 'hover' | 'active';
4
- children?: ReactNode;
2
+ export interface SwitchPropsBase {
3
+ autoFocus?: boolean;
5
4
  className?: string;
6
5
  'data-test-selector'?: string;
7
6
  defaultSelected?: boolean;
8
7
  isDisabled?: boolean;
8
+ isReadOnly?: boolean;
9
+ isRequired?: boolean;
9
10
  isSelected?: boolean;
10
11
  name?: string;
11
12
  onChange?: (isSelected: boolean) => void;
12
13
  value?: string;
13
14
  }
14
- export declare function Switch({ _pseudo, children, className, 'data-test-selector': dataTestSelector, defaultSelected, isDisabled, isSelected, name, onChange, value, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
15
+ export interface SwitchWithLabelProps extends SwitchPropsBase {
16
+ 'aria-label': string;
17
+ }
18
+ export interface SwitchWithChildrenProps extends SwitchPropsBase {
19
+ children: ReactNode;
20
+ }
21
+ export type SwitchProps = SwitchWithLabelProps | SwitchWithChildrenProps;
22
+ export declare function Switch(props: SwitchProps): import("react/jsx-runtime").JSX.Element;
@@ -2,10 +2,14 @@
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { Switch as Switch$1 } from 'react-aria-components';
4
4
  import clsx from 'clsx';
5
+ import { Label } from '../label/label.js';
5
6
  import styles from './switch.module.css.js';
6
7
 
7
- function Switch({ _pseudo = 'none', children, className, 'data-test-selector': dataTestSelector, defaultSelected, isDisabled, isSelected, name, onChange, value, }) {
8
- return (jsxs(Switch$1, { className: clsx(className, styles.switch, styles[_pseudo]), "data-test-selector": dataTestSelector, defaultSelected: defaultSelected, isDisabled: isDisabled, isSelected: isSelected, name: name, onChange: onChange, value: value, children: [jsx("div", { className: styles.indicator }), children] }));
8
+ function Switch(props) {
9
+ const { autoFocus, className, 'data-test-selector': dataTestSelector, defaultSelected, isDisabled, isReadOnly, isRequired, isSelected, name, onChange, value, } = props;
10
+ const ariaLabel = 'aria-label' in props ? props['aria-label'] : undefined;
11
+ const children = 'children' in props ? props.children : undefined;
12
+ return (jsxs(Switch$1, { "aria-label": ariaLabel, autoFocus: autoFocus, className: clsx(className, styles.switch), "data-test-selector": dataTestSelector, defaultSelected: defaultSelected, isDisabled: isDisabled, isReadOnly: isReadOnly, isSelected: isSelected, name: name, onChange: onChange, value: value, children: [jsx("div", { className: styles.indicator }), children && (jsx(Label, { className: styles.label, isRequired: isRequired, children: children }))] }));
9
13
  }
10
14
 
11
15
  export { Switch };
@@ -1,3 +1,3 @@
1
- var styles = {"switch":"switch-module-ywpXc","indicator":"switch-module-2e1rG","focus":"switch-module-rRUh4","active":"switch-module-hSbOs"};
1
+ var styles = {"switch":"switch-module-ywpXc","indicator":"switch-module-2e1rG","label":"switch-module-rZxF4"};
2
2
 
3
3
  export { styles as default };
@@ -0,0 +1,10 @@
1
+ import { ValidateFunction } from '../field-error/field-error';
2
+ import { SwitchProps, SwitchPropsBase } from '../switch/switch';
3
+ export interface SwitchFieldPropsBase extends SwitchPropsBase {
4
+ errorMessage?: string;
5
+ info?: string;
6
+ isInvalid?: boolean;
7
+ validate?: ValidateFunction<string[]>;
8
+ }
9
+ export type SwitchFieldProps = SwitchFieldPropsBase & SwitchProps;
10
+ export declare function SwitchField(props: SwitchFieldProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { CheckboxGroup } from 'react-aria-components';
4
+ import clsx from 'clsx';
5
+ import { InfoIconTooltip } from '../../info-icon-tooltip/info-icon-tooltip.js';
6
+ import { FieldError } from '../field-error/field-error.js';
7
+ import { FormFieldLayout } from '../form/form-field-layout.js';
8
+ import { Switch } from '../switch/switch.js';
9
+ import styles from './switch-field.module.css.js';
10
+
11
+ function SwitchField(props) {
12
+ const { autoFocus, className, 'data-test-selector': dataTestSelector, defaultSelected, errorMessage, info, isDisabled, isInvalid, isReadOnly, isRequired, isSelected, name, onChange, validate, value = 'true', } = props;
13
+ const children = 'children' in props ? props.children : undefined;
14
+ const ariaLabel = 'aria-label' in props ? props['aria-label'] : undefined;
15
+ return (jsx(CheckboxGroup, { "aria-label": ariaLabel, className: clsx(styles['switch-field'], className), defaultValue: defaultSelected ? [value] : undefined, isDisabled: isDisabled, isInvalid: isInvalid, isReadOnly: isReadOnly, isRequired: isRequired, validate: validate, value: isSelected ? [value] : undefined, children: jsx(FormFieldLayout, { errorSlot: errorMessage && jsx(FieldError, { children: errorMessage }), infoSlot: info && jsx(InfoIconTooltip, { children: info }), children: jsx(Switch, { "aria-label": ariaLabel, autoFocus: autoFocus, className: className, "data-test-selector": dataTestSelector, defaultSelected: defaultSelected, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, isSelected: isSelected, name: name, onChange: onChange, value: value, children: children }) }) }));
16
+ }
17
+
18
+ export { SwitchField };
@@ -0,0 +1,3 @@
1
+ var styles = {"switch-field":"switch-field-module-lBYuh"};
2
+
3
+ export { styles as default };
@@ -12,7 +12,7 @@ import styles from './password-reveal-toggle.module.css.js';
12
12
  function PasswordRevealToggle({ onChange, showPassword, }) {
13
13
  const t = useFormattedMessage();
14
14
  const helpText = showPassword ? t('Conceal value') : t('Reveal value');
15
- return (jsx(Checkbox, { "aria-label": helpText, className: styles.toggle, onChange: onChange, children: jsx("span", { title: helpText, children: showPassword ? jsx(StrokeHashedIcon, {}) : jsx(StrokeDehashedIcon, {}) }) }));
15
+ return (jsx(Checkbox, { "aria-label": helpText, className: styles['password-reveal-toggle'], onChange: onChange, children: jsx("span", { title: helpText, children: showPassword ? jsx(StrokeHashedIcon, {}) : jsx(StrokeDehashedIcon, {}) }) }));
16
16
  }
17
17
 
18
18
  export { PasswordRevealToggle };
@@ -1,3 +1,3 @@
1
- var styles = {"toggle":"password-reveal-toggle-module-uUQbW"};
1
+ var styles = {"password-reveal-toggle":"password-reveal-toggle-module-bGH6I"};
2
2
 
3
3
  export { styles as default };
@@ -1,36 +1,48 @@
1
- import { FocusEvent, type FormEventHandler, type KeyboardEvent } from 'react';
2
- import { type ValidateFunction } from '../field-error/field-error';
3
- interface TextFieldProps {
4
- autoFocus?: boolean;
1
+ import { FocusEvent, FormEventHandler } from 'react';
2
+ import { ValidateFunction } from '../field-error/field-error';
3
+ interface TextFieldPropsBase {
5
4
  autoGrow?: boolean;
6
5
  'data-test-selector'?: string;
6
+ inputMode?: 'text' | 'tel' | 'search' | 'email' | 'url';
7
+ label: string;
8
+ placeholder?: string;
9
+ size?: 'md' | 'lg';
10
+ value?: string;
11
+ }
12
+ interface SingleLineProps extends TextFieldPropsBase {
13
+ isMultiline?: false;
14
+ onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
15
+ pattern?: string;
16
+ rows?: never;
17
+ type?: 'text' | 'email' | 'password';
18
+ }
19
+ interface MultiLineProps extends TextFieldPropsBase {
20
+ isMultiline: true;
21
+ onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
22
+ pattern?: never;
23
+ rows?: number;
24
+ type?: never;
25
+ }
26
+ export type TextFieldProps = (SingleLineProps | MultiLineProps) & {
27
+ autoComplete?: string;
28
+ autoFocus?: boolean;
29
+ className?: string;
30
+ customErrorMessage?: string;
7
31
  defaultValue?: string;
8
- info?: string;
32
+ info?: string | React.ReactNode;
9
33
  isDisabled?: boolean;
10
34
  isInvalid?: boolean;
11
- isMultiline?: boolean;
12
35
  isReadOnly?: boolean;
13
36
  isRequired?: boolean;
14
- label: string;
15
37
  maxLength?: number;
16
38
  minLength?: number;
17
39
  name?: string;
18
- onBlur?: (e: FocusEvent<HTMLElement>) => void;
19
40
  onChange?: (value: string) => void;
20
41
  onInput?: FormEventHandler<HTMLInputElement>;
21
- onKeyUp?: (e: KeyboardEvent) => void;
22
- placeholder?: string;
23
- rows?: number;
42
+ onKeyUp?: (e: React.KeyboardEvent) => void;
24
43
  showLabel?: boolean;
25
- size?: 'md' | 'lg';
26
- type?: 'text' | 'email' | 'password';
27
44
  validate?: ValidateFunction<string>;
28
45
  value?: string;
29
- }
30
- /**
31
- * This component is used to create a text field.
32
- * It can be used as a single line input or as a textarea.
33
- * This field can also grow when a user types in text.
34
- */
35
- export declare function TextField({ autoFocus, autoGrow, 'data-test-selector': dataTestSelector, defaultValue, info, isDisabled, isInvalid, isMultiline, isReadOnly, isRequired, label, maxLength, minLength, name, onBlur, onChange, onInput, onKeyUp, placeholder, rows, showLabel, size, type: defaultType, validate, value, }: TextFieldProps): import("react/jsx-runtime").JSX.Element;
46
+ };
47
+ export declare function TextField(props: TextFieldProps): import("react/jsx-runtime").JSX.Element;
36
48
  export {};
@@ -1,30 +1,33 @@
1
1
  "use client";
2
- import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { jsx } from 'react/jsx-runtime';
3
3
  import { useState, useCallback } from 'react';
4
4
  import { TextField as TextField$1 } from 'react-aria-components';
5
5
  import clsx from 'clsx';
6
6
  import { InfoIconTooltip } from '../../info-icon-tooltip/info-icon-tooltip.js';
7
7
  import { FieldError } from '../field-error/field-error.js';
8
+ import { FormFieldLayout } from '../form/form-field-layout.js';
8
9
  import { Input } from '../input/input.js';
9
10
  import { Label } from '../label/label.js';
10
11
  import { TextArea } from '../textarea/textarea.js';
11
12
  import { PasswordRevealToggle } from './password-reveal-toggle/password-reveal-toggle.js';
12
13
  import styles from './text-field.module.css.js';
13
14
 
14
- /**
15
- * This component is used to create a text field.
16
- * It can be used as a single line input or as a textarea.
17
- * This field can also grow when a user types in text.
18
- */
19
- function TextField({ autoFocus, autoGrow, 'data-test-selector': dataTestSelector, defaultValue, info, isDisabled, isInvalid, isMultiline, isReadOnly, isRequired, label, maxLength, minLength, name, onBlur, onChange, onInput, onKeyUp, placeholder, rows, showLabel = false, size = 'lg', type: defaultType = 'text', validate, value, }) {
15
+ function SingleLineInput({ autoGrow, 'data-test-selector': dataTestSelector, inputMode, label, onBlur, pattern, placeholder, size, type: defaultType = 'text', value, }) {
20
16
  const [type, setType] = useState(defaultType);
21
17
  const isPasswordInput = type === 'password';
22
18
  const togglePasswordType = useCallback(() => {
23
19
  setType(isPasswordInput ? 'text' : 'password');
24
20
  }, [isPasswordInput]);
25
- return (jsxs(TextField$1, { "aria-label": label, autoFocus: autoFocus, className: clsx(styles.field, styles[size]), "data-info": info ? true : undefined, defaultValue: defaultValue, isDisabled: isDisabled, isInvalid: isInvalid, isReadOnly: isReadOnly, isRequired: isRequired, maxLength: maxLength, minLength: minLength, name: name, onChange: value => {
26
- onChange?.(value);
27
- }, onInput: onInput, onKeyUp: e => onKeyUp?.(e), validate: validate, value: value, children: [showLabel && (jsx(Label, { className: styles['label'], "data-test-selector": dataTestSelector ? `${dataTestSelector}-label` : undefined, isRequired: isRequired, children: label })), isMultiline ? (jsx(TextArea, { autoGrow: autoGrow, className: styles['input'], "data-test-selector": dataTestSelector, label: label, onBlur: onBlur, placeholder: placeholder, rows: rows, size: size })) : (jsx(Input, { autoGrow: autoGrow, className: styles['input'], "data-test-selector": dataTestSelector, inlineElement: defaultType === 'password' && (jsx(PasswordRevealToggle, { onChange: togglePasswordType, showPassword: !isPasswordInput })), label: label, onBlur: onBlur, placeholder: placeholder, size: size, type: type })), info && (jsx(InfoIconTooltip, { className: styles['info'], children: info })), jsx(FieldError, { className: styles['error'] }, Math.random())] }));
21
+ return (jsx(Input, { autoGrow: autoGrow, "data-test-selector": dataTestSelector, inlineElement: defaultType === 'password' && (jsx(PasswordRevealToggle, { onChange: togglePasswordType, showPassword: !isPasswordInput })), inputMode: inputMode, label: label, onBlur: onBlur, pattern: pattern, placeholder: placeholder, size: size, type: type, value: value }));
22
+ }
23
+ function MultiLineInput({ autoGrow, 'data-test-selector': dataTestSelector, inputMode, label, onBlur, placeholder, size, value, }) {
24
+ return (jsx(TextArea, { autoGrow: autoGrow, "data-test-selector": dataTestSelector, inputMode: inputMode, label: label, onBlur: onBlur, placeholder: placeholder, size: size, value: value }));
25
+ }
26
+ function TextField(props) {
27
+ const { autoComplete, autoFocus, autoGrow, className, customErrorMessage, 'data-test-selector': dataTestSelector, defaultValue, info, inputMode, isDisabled, isInvalid, isMultiline, isReadOnly, isRequired, label, maxLength, minLength, name, onBlur, onChange, onInput, onKeyUp, placeholder, showLabel = true, size = 'lg', validate, value, } = props;
28
+ return (jsx(TextField$1, { autoComplete: autoComplete, autoFocus: autoFocus, className: clsx(styles['text-field'], className), defaultValue: defaultValue, isDisabled: isDisabled, isInvalid: isInvalid, isReadOnly: isReadOnly, isRequired: isRequired, maxLength: maxLength, minLength: minLength, name: name, onChange: value => onChange?.(value), onInput: onInput, onKeyUp: onKeyUp, validate: validate, value: value, children: jsx(FormFieldLayout, { errorSlot: jsx(FieldError, { children: isInvalid && customErrorMessage }), infoSlot: info && jsx(InfoIconTooltip, { children: info }), labelSlot: showLabel && jsx(Label, { isRequired: isRequired, children: label }), children: isMultiline ? (jsx(MultiLineInput, { isMultiline: true, autoGrow: autoGrow, "data-test-selector": dataTestSelector, inputMode: inputMode, label: label, onBlur: onBlur, placeholder: placeholder, size: size })) : (jsx(SingleLineInput, { autoGrow: autoGrow, "data-test-selector": dataTestSelector, inputMode: inputMode, label: label, onBlur: onBlur,
29
+ // eslint-disable-next-line unicorn/consistent-destructuring
30
+ pattern: props.pattern, placeholder: placeholder, size: size, type: props.type })) }) }));
28
31
  }
29
32
 
30
33
  export { TextField };
@@ -1,3 +1,3 @@
1
- var styles = {"field":"text-field-module-JeaK0","label":"text-field-module-hFl0f","input":"text-field-module-nHYDe","info":"text-field-module-kHn5y","error":"text-field-module-8XbgH"};
1
+ var styles = {"text-field":"text-field-module-PBkCx"};
2
2
 
3
3
  export { styles as default };
@@ -3,6 +3,7 @@ import { TextArea as AriaTextArea } from 'react-aria-components';
3
3
  export interface TextAreaProps extends Omit<ComponentProps<typeof AriaTextArea>, 'size'> {
4
4
  autoGrow?: boolean;
5
5
  className?: string;
6
+ 'data-test-selector'?: string;
6
7
  label: string;
7
8
  size?: 'md' | 'lg';
8
9
  }
package/dist/index.js CHANGED
@@ -79,13 +79,20 @@ export { ActiveFilters } from './filters/active-filters/active-filters.js';
79
79
  export { MultiSelect } from './filters/multi-select/multi-select.js';
80
80
  export { Pagination } from './filters/pagination/pagination.js';
81
81
  export { Footer } from './footer/footer.js';
82
+ export { CheckboxField } from './forms/checkbox-field/checkbox-field.js';
82
83
  export { Checkbox } from './forms/checkbox/checkbox.js';
83
84
  export { ColorCheckbox } from './forms/color-checkbox/color-checkbox.js';
84
85
  export { FieldError } from './forms/field-error/field-error.js';
86
+ export { Form } from './forms/form/form.js';
87
+ export { FormFieldLayout } from './forms/form/form-field-layout.js';
88
+ export { FormSegment } from './forms/form/form-segment.js';
89
+ export { FormSegmentGroup } from './forms/form/form-segment-group.js';
85
90
  export { Input } from './forms/input/input.js';
86
91
  export { Label } from './forms/label/label.js';
87
92
  export { NumberField } from './forms/number-field/number-field.js';
93
+ export { SelectField } from './forms/select-field/select-field.js';
88
94
  export { Select } from './forms/select/select.js';
95
+ export { SwitchField } from './forms/switch-field/switch-field.js';
89
96
  export { Switch } from './forms/switch/switch.js';
90
97
  export { PasswordRevealToggle } from './forms/text-field/password-reveal-toggle/password-reveal-toggle.js';
91
98
  export { TextField } from './forms/text-field/text-field.js';
@@ -157,6 +164,10 @@ export { Announcement } from './notifications/announcements/announcement.js';
157
164
  export { AnnouncementProvider } from './notifications/announcements/announcement-provider.js';
158
165
  export { ConnectedAnnouncement, now } from './notifications/announcements/connected-announcement.js';
159
166
  export { IntersectionObserverComponent } from './observers/intersection-observer.js';
167
+ export { CreateAccountForm } from './pages/account/components/create-account-form/create-account-form.js';
168
+ export { SignInForm } from './pages/account/components/sign-in-form/sign-in-form.js';
169
+ export { CreateAccountPage } from './pages/account/create-account-page/create-account-page.js';
170
+ export { SIGN_IN_PAGE_BACKGROUND_IMAGE } from './pages/account/layouts/sign-in-page-layout/sign-in-page-background-image.js';
160
171
  export { SignInPageLayout } from './pages/account/layouts/sign-in-page-layout/sign-in-page-layout.js';
161
172
  export { SignInPage } from './pages/account/sign-in-page/sign-in-page.js';
162
173
  export { CartPage } from './pages/checkout/cart-page/cart-page.js';
@@ -214,6 +225,7 @@ export { useFetchProductDetailsPageData } from './shared/api/bff/hooks/use-fetch
214
225
  export { useFetchProductListingPageData } from './shared/api/bff/hooks/use-fetch-product-listing-page-data.js';
215
226
  export { fetchAnnouncements, fetchProductDetailsPageData, fetchProductListingPageData } from './shared/api/bff/services/bff-service.js';
216
227
  export { useAwaitableMutation } from './shared/api/shared/hooks/use-awaitable-mutation.js';
228
+ export { useCreateAccount } from './shared/api/storefront/hooks/authentication/use-create-account.js';
217
229
  export { useCreateGuestAccount } from './shared/api/storefront/hooks/authentication/use-create-guest-account.js';
218
230
  export { useFetchSession } from './shared/api/storefront/hooks/authentication/use-fetch-session.js';
219
231
  export { useInvalidateSession } from './shared/api/storefront/hooks/authentication/use-invalidate-session.js';
@@ -259,7 +271,7 @@ export { useCreateWishList } from './shared/api/storefront/hooks/wishlist/use-cr
259
271
  export { useDeleteWishListItemFromWishList } from './shared/api/storefront/hooks/wishlist/use-delete-wishlist-item-from-wishlist.js';
260
272
  export { useFetchAllWishListsItems } from './shared/api/storefront/hooks/wishlist/use-fetch-all-wishlists-items.js';
261
273
  export { useFetchWishLists } from './shared/api/storefront/hooks/wishlist/use-fetch-wishlists.js';
262
- export { createGuestAccount, createSession, fetchSession, patchSession, recoverPassword, signIn, signOut } from './shared/api/storefront/services/authentication-service.js';
274
+ export { ExistingAccountError, createAccount, createGuestAccount, createSession, fetchSession, patchSession, recoverPassword, signIn, signOut } from './shared/api/storefront/services/authentication-service.js';
263
275
  export { addProductToCurrentCart, convertToMinorUnits, deleteCartLineById, deleteCurrentCart, fetchCart, fetchCurrentCart, fetchCurrentCartLines, fetchCurrentCartProductAtp, fetchCurrentCartPromotions, fetchCurrentCheckoutAtp, getAdyenPaymentDetails, patchCart, patchCartLineById, placeOrder, postAdyenPayment, saveCartForLater } from './shared/api/storefront/services/cart-service.js';
264
276
  export { fetchBillToAddresses, fetchFulfillmentMethods, fetchShipToAddresses, patchBillToAddress } from './shared/api/storefront/services/customer-service.js';
265
277
  export { validateVATNumber } from './shared/api/storefront/services/finance-service.js';
@@ -290,6 +302,7 @@ export { useScrollLock } from './shared/hooks/use-scroll-lock.js';
290
302
  export { scrollTo, scrollToTop } from './shared/hooks/use-scroll-to.js';
291
303
  export { useSessionStorage } from './shared/hooks/use-session-storage.js';
292
304
  export { useWatchCssProperty } from './shared/hooks/use-watch-css-property.js';
305
+ export { validatePassword } from './shared/model/account.js';
293
306
  export { validateEmail, validatePhone } from './shared/model/address.js';
294
307
  export { announcementSubTypes, announcementTypes, isAnnouncementSubtype, isAnnouncementType } from './shared/model/announcement.js';
295
308
  export { transformAlgoliaCategoryData } from './shared/model/category.js';
@@ -329,7 +342,6 @@ export { Sidebar } from './sidebar/sidebar.js';
329
342
  export { SidebarDetectBreakpoint, SidebarProvider } from './sidebar/sidebar-provider.js';
330
343
  export { ToggleSidebarButton } from './sidebar/toggle-sidebar-button.js';
331
344
  export { useSidebar, useSidebarActions } from './sidebar/use-sidebar.js';
332
- export { SignInForm } from './sign-in-form/sign-in-form.js';
333
345
  export { Toast } from './toast/toast.js';
334
346
  export { ToastProvider } from './toast/toast-provider.js';
335
347
  export { useToast } from './toast/use-toast.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' | 'Continue shopping' | 'Continue' | 'Cost overview' | 'Country' | 'create account' | 'Create new list' | 'Currency Change' | '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' | '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' | 'Processing' | 'Product Features' | 'Product' | 'Products' | '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' | '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' | '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 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' | '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' | '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,11 @@
1
+ import { Account } from '../../../../shared/model/account';
2
+ export type CreateAccountErrorType = 'Unexpected error';
3
+ export interface CreateAccountFormProps {
4
+ errorType?: CreateAccountErrorType;
5
+ isDisabled?: boolean;
6
+ isPendingCreateAccount?: boolean;
7
+ onSubmit: (args: {
8
+ data: Account;
9
+ }) => void;
10
+ }
11
+ export declare function CreateAccountForm({ errorType, isDisabled: _isDisabled, isPendingCreateAccount, onSubmit, }: CreateAccountFormProps): import("react/jsx-runtime").JSX.Element;