@sonic-equipment/ui 185.0.0 → 187.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.
- package/dist/address-info-display/address-info-display.d.ts +2 -2
- package/dist/address-info-display/address-info-display.js +1 -1
- package/dist/algolia/algolia-multi-select-filter-section.js +1 -1
- package/dist/algolia/algolia-sort-by.js +1 -1
- package/dist/buttons/add-to-cart-button/add-to-cart-button.js +1 -1
- package/dist/collapsables/accordion/accordion-item.js +2 -1
- package/dist/collapsables/accordion/accordion.module.css.js +1 -1
- package/dist/country-select/country-select.js +1 -1
- package/dist/country-select/hooks/use-countries.js +1 -0
- package/dist/country-selector/country-selector-dialog/country-selector-dialog.js +1 -1
- package/dist/exports.d.ts +24 -22
- package/dist/filters/pagination/pagination.js +1 -1
- package/dist/footer/connected-footer.d.ts +2 -1
- package/dist/footer/connected-footer.js +2 -2
- package/dist/footer/footer.d.ts +2 -1
- package/dist/footer/footer.js +6 -5
- package/dist/footer/footer.module.css.js +1 -1
- package/dist/forms/elements/checkbox/checkbox.module.css.js +3 -0
- package/dist/forms/{field-error → elements/field-error}/field-error.js +1 -1
- package/dist/forms/elements/field-error/field-error.module.css.js +3 -0
- package/dist/forms/elements/input/input.module.css.js +3 -0
- package/dist/forms/elements/label/label.module.css.js +3 -0
- package/dist/forms/{select → elements/select}/select.js +3 -3
- package/dist/forms/elements/select/select.module.css.js +3 -0
- package/dist/forms/elements/switch/switch.module.css.js +3 -0
- package/dist/forms/elements/textarea/textarea.module.css.js +3 -0
- package/dist/forms/{checkbox-field → fields/checkbox-field}/checkbox-field.d.ts +2 -2
- package/dist/forms/{checkbox-field → fields/checkbox-field}/checkbox-field.js +4 -4
- package/dist/forms/fields/checkbox-field/checkbox-field.module.css.js +3 -0
- package/dist/forms/{number-field → fields/number-field}/number-field.d.ts +1 -1
- package/dist/forms/{number-field → fields/number-field}/number-field.js +8 -8
- package/dist/forms/fields/number-field/number-field.module.css.js +3 -0
- package/dist/forms/{search-field → fields/search-field}/search-field.js +3 -3
- package/dist/forms/{select-field → fields/select-field}/select-field.d.ts +1 -1
- package/dist/forms/{select-field → fields/select-field}/select-field.js +7 -7
- package/dist/forms/fields/select-field/select-field.module.css.js +3 -0
- package/dist/forms/{switch-field → fields/switch-field}/switch-field.d.ts +2 -2
- package/dist/forms/{switch-field → fields/switch-field}/switch-field.js +4 -4
- package/dist/forms/fields/switch-field/switch-field.module.css.js +3 -0
- package/dist/forms/{text-field → fields/text-field}/password-reveal-toggle/password-reveal-toggle.js +3 -3
- package/dist/forms/{text-field → fields/text-field}/password-reveal-toggle/password-reveal-toggle.module.css.js +1 -1
- package/dist/forms/{text-field → fields/text-field}/text-field.d.ts +1 -1
- package/dist/forms/{text-field → fields/text-field}/text-field.js +6 -6
- package/dist/forms/fields/text-field/text-field.module.css.js +3 -0
- package/dist/forms/layout/form/form-field-layout.module.css.js +3 -0
- package/dist/forms/layout/form/form-segment-group.module.css.js +3 -0
- package/dist/forms/layout/form/form-segment.module.css.js +3 -0
- package/dist/forms/{form → layout/form}/form.js +3 -3
- package/dist/forms/layout/form/form.module.css.js +3 -0
- package/dist/forms/partials/edit-address-form/edit-address-form.d.ts +8 -0
- package/dist/forms/partials/edit-address-form/edit-address-form.js +35 -0
- package/dist/forms/partials/edit-address-form/edit-address-form.module.css.js +3 -0
- package/dist/forms/{password-validation → partials/password-validation}/password-validation.js +4 -4
- package/dist/index.js +24 -22
- package/dist/intl/formatted-message.js +5 -1
- package/dist/intl/translation-id.d.ts +1 -1
- package/dist/intl/types.d.ts +6 -1
- package/dist/modals/dialog/dialog.d.ts +1 -1
- package/dist/modals/dialog/dialog.js +1 -1
- package/dist/modals/favorite/add-to-favorite-dialog.js +2 -2
- package/dist/modals/recover-password/recover-password-dialog.js +1 -1
- package/dist/pages/account/components/create-account-form/create-account-form.js +7 -7
- package/dist/pages/account/components/sign-in-form/sign-in-form.js +6 -6
- package/dist/pages/checkout/components/billing-and-invoice-information.d.ts +3 -3
- package/dist/pages/checkout/components/billing-and-invoice-information.js +1 -1
- package/dist/pages/checkout/order-confirmation-page/order-confirmation-page-content.js +26 -20
- package/dist/pages/checkout/payment-page/components/adyen-payment.js +8 -2
- package/dist/pages/checkout/payment-page/components/payment.d.ts +1 -2
- package/dist/pages/checkout/payment-page/components/payment.js +31 -98
- package/dist/pages/checkout/payment-page/payment-page-content.d.ts +1 -3
- package/dist/pages/checkout/payment-page/payment-page-content.js +3 -3
- package/dist/pages/checkout/payment-page/payment-page.js +1 -2
- package/dist/pages/checkout/shipping-page/components/{edit-address-form.d.ts → edit-checkout-bill-to-address-form.d.ts} +3 -17
- package/dist/pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.js +49 -0
- package/dist/pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form.module.css.js +3 -0
- package/dist/pages/checkout/shipping-page/components/readonly-address.js +7 -5
- package/dist/pages/checkout/shipping-page/shipping-page-content.js +2 -2
- package/dist/pages/checkout/shipping-page/shipping-page.js +2 -2
- package/dist/pages/my-sonic/actions/change-customer/change-customer.js +2 -2
- package/dist/pages/my-sonic/actions/change-password/change-password-dialog.js +1 -1
- package/dist/pages/my-sonic/actions/change-password/change-password.js +3 -3
- package/dist/pages/my-sonic/actions/edit-bill-to-address/edit-bill-to-address.d.ts +1 -0
- package/dist/pages/my-sonic/actions/edit-bill-to-address/edit-bill-to-address.js +8 -0
- package/dist/pages/my-sonic/actions/edit-user-info/edit-user-info-dialog.d.ts +1 -1
- package/dist/pages/my-sonic/actions/edit-user-info/edit-user-info.js +1 -1
- package/dist/pages/my-sonic/navigation/my-sonic-mobile-navigation.js +1 -1
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.js +1 -1
- package/dist/pages/product/product-details-page/components/product-details-panel/product-details-panel.module.css.js +1 -1
- package/dist/shared/data/countries-languages.data.js +4 -0
- package/dist/shared/model/address.d.ts +27 -12
- package/dist/shared/model/countries-languages.d.ts +1 -0
- package/dist/shared/utils/price.d.ts +1 -1
- package/dist/styles.css +1409 -1330
- package/package.json +1 -1
- package/dist/forms/checkbox/checkbox.module.css.js +0 -3
- package/dist/forms/checkbox-field/checkbox-field.module.css.js +0 -3
- package/dist/forms/field-error/field-error.module.css.js +0 -3
- package/dist/forms/form/form-field-layout.module.css.js +0 -3
- package/dist/forms/form/form-segment-group.module.css.js +0 -3
- package/dist/forms/form/form-segment.module.css.js +0 -3
- package/dist/forms/form/form.module.css.js +0 -3
- package/dist/forms/input/input.module.css.js +0 -3
- package/dist/forms/label/label.module.css.js +0 -3
- package/dist/forms/number-field/number-field.module.css.js +0 -3
- package/dist/forms/select/select.module.css.js +0 -3
- package/dist/forms/select-field/select-field.module.css.js +0 -3
- package/dist/forms/switch/switch.module.css.js +0 -3
- package/dist/forms/switch-field/switch-field.module.css.js +0 -3
- package/dist/forms/text-field/text-field.module.css.js +0 -3
- package/dist/forms/textarea/textarea.module.css.js +0 -3
- package/dist/pages/checkout/shipping-page/components/edit-address-form.js +0 -68
- package/dist/pages/checkout/shipping-page/components/edit-address-form.module.css.js +0 -3
- /package/dist/forms/{checkbox → elements/checkbox}/checkbox.d.ts +0 -0
- /package/dist/forms/{checkbox → elements/checkbox}/checkbox.js +0 -0
- /package/dist/forms/{color-checkbox → elements/color-checkbox}/color-checkbox.d.ts +0 -0
- /package/dist/forms/{color-checkbox → elements/color-checkbox}/color-checkbox.js +0 -0
- /package/dist/forms/{field-error → elements/field-error}/field-error.d.ts +0 -0
- /package/dist/forms/{input → elements/input}/input.d.ts +0 -0
- /package/dist/forms/{input → elements/input}/input.js +0 -0
- /package/dist/forms/{label → elements/label}/label.d.ts +0 -0
- /package/dist/forms/{label → elements/label}/label.js +0 -0
- /package/dist/forms/{select → elements/select}/select.d.ts +0 -0
- /package/dist/forms/{switch → elements/switch}/switch.d.ts +0 -0
- /package/dist/forms/{switch → elements/switch}/switch.js +0 -0
- /package/dist/forms/{textarea → elements/textarea}/textarea.d.ts +0 -0
- /package/dist/forms/{textarea → elements/textarea}/textarea.js +0 -0
- /package/dist/forms/{password-field → fields/password-field}/password-field.d.ts +0 -0
- /package/dist/forms/{password-field → fields/password-field}/password-field.js +0 -0
- /package/dist/forms/{search-field → fields/search-field}/search-field.d.ts +0 -0
- /package/dist/forms/{text-field → fields/text-field}/password-reveal-toggle/password-reveal-toggle.d.ts +0 -0
- /package/dist/forms/{form → layout/form}/form-field-layout.d.ts +0 -0
- /package/dist/forms/{form → layout/form}/form-field-layout.js +0 -0
- /package/dist/forms/{form → layout/form}/form-segment-group.d.ts +0 -0
- /package/dist/forms/{form → layout/form}/form-segment-group.js +0 -0
- /package/dist/forms/{form → layout/form}/form-segment.d.ts +0 -0
- /package/dist/forms/{form → layout/form}/form-segment.js +0 -0
- /package/dist/forms/{form → layout/form}/form.d.ts +0 -0
- /package/dist/forms/{password-validation → partials/password-validation}/password-validation.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Address } from '../shared/model/address';
|
|
2
2
|
export interface AddressProps {
|
|
3
|
-
address:
|
|
3
|
+
address: Address;
|
|
4
4
|
'data-test-selector'?: string;
|
|
5
5
|
}
|
|
6
6
|
export declare function AddressInfoDisplay({ address, 'data-test-selector': dataTestSelector, }: AddressProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ import styles from './address-info-display.module.css.js';
|
|
|
3
3
|
|
|
4
4
|
function AddressInfoDisplay({ address, 'data-test-selector': dataTestSelector, }) {
|
|
5
5
|
const { address1, address2, address3, city, companyName, country, email, firstName, lastName, phone, postalCode, } = address;
|
|
6
|
-
return (jsxs("address", { className: styles.address, "data-test-selector": dataTestSelector, children: [(firstName || lastName) && (jsxs("p", { "data-test-selector": "addressInfoDisplay_name", children: [jsx("span", { "data-test-selector": "addressInfoDisplay_name_firstName", children: firstName }), ` `, jsx("span", { "data-test-selector": "addressInfoDisplay_name_lastName", children: lastName })] })), companyName && (jsx("p", { "data-test-selector": "addressInfoDisplay_companyName", children: companyName })), address1 && (jsx("p", { "data-test-selector": "addressInfoDisplay_address1", children: address1 })), address2 && (jsx("p", { "data-test-selector": "addressInfoDisplay_address2", children: address2 })), address3 && (jsx("p", { "data-test-selector": "addressInfoDisplay_address3", children: address3 })), (postalCode || city) && (jsxs("p", { children: [postalCode && (jsxs(Fragment, { children: [jsx("span", { "data-test-selector": "addressInfoDisplay_postalCode", children: postalCode }), ' '] })), city && (jsx("span", { "data-test-selector": "addressInfoDisplay_city", children: city }))] })), country && (jsx("p", { "data-test-selector": "addressInfoDisplay_country", children: country })), phone && jsx("p", { "data-test-selector": "addressInfoDisplay_phone", children: phone }), email && jsx("p", { "data-test-selector": "addressInfoDisplay_email", children: email })] }));
|
|
6
|
+
return (jsxs("address", { className: styles.address, "data-test-selector": dataTestSelector, children: [(firstName || lastName) && (jsxs("p", { "data-test-selector": "addressInfoDisplay_name", children: [jsx("span", { "data-test-selector": "addressInfoDisplay_name_firstName", children: firstName }), ` `, jsx("span", { "data-test-selector": "addressInfoDisplay_name_lastName", children: lastName })] })), companyName && (jsx("p", { "data-test-selector": "addressInfoDisplay_companyName", children: companyName })), address1 && (jsx("p", { "data-test-selector": "addressInfoDisplay_address1", children: address1 })), address2 && (jsx("p", { "data-test-selector": "addressInfoDisplay_address2", children: address2 })), address3 && (jsx("p", { "data-test-selector": "addressInfoDisplay_address3", children: address3 })), (postalCode || city) && (jsxs("p", { children: [postalCode && (jsxs(Fragment, { children: [jsx("span", { "data-test-selector": "addressInfoDisplay_postalCode", children: postalCode }), ' '] })), city && (jsx("span", { "data-test-selector": "addressInfoDisplay_city", children: city }))] })), country && (jsx("p", { "data-test-selector": "addressInfoDisplay_country", children: country.name })), phone && jsx("p", { "data-test-selector": "addressInfoDisplay_phone", children: phone }), email && jsx("p", { "data-test-selector": "addressInfoDisplay_email", children: email })] }));
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export { AddressInfoDisplay };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRefinementList } from 'react-instantsearch';
|
|
4
4
|
import { MultiSelect } from '../filters/multi-select/multi-select.js';
|
|
5
|
-
import { Checkbox } from '../forms/checkbox/checkbox.js';
|
|
5
|
+
import { Checkbox } from '../forms/elements/checkbox/checkbox.js';
|
|
6
6
|
import { FilterSection } from './filter-section.js';
|
|
7
7
|
|
|
8
8
|
function AlgoliaMultiSelectFilterSection({ attribute, }) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useSortBy } from 'react-instantsearch';
|
|
4
|
-
import { Select } from '../forms/select/select.js';
|
|
4
|
+
import { Select } from '../forms/elements/select/select.js';
|
|
5
5
|
import { useFormattedMessage } from '../intl/use-formatted-message.js';
|
|
6
6
|
import { useLanguageCode } from '../intl/use-language-code.js';
|
|
7
7
|
import { environment } from '../shared/utils/environment.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useCallback, useRef, useEffect } from 'react';
|
|
4
|
-
import { NumberField } from '../../forms/number-field/number-field.js';
|
|
4
|
+
import { NumberField } from '../../forms/fields/number-field/number-field.js';
|
|
5
5
|
import { SolidCartIcon } from '../../icons/solid/solid-cart-icon.js';
|
|
6
6
|
import { useFormattedMessage } from '../../intl/use-formatted-message.js';
|
|
7
7
|
import { useDebouncedCallback } from '../../shared/hooks/use-debounced-callback.js';
|
|
@@ -6,6 +6,7 @@ import { GlyphsChevronsBoldDownIcon } from '../../icons/glyph/glyphs-chevrons-bo
|
|
|
6
6
|
import { GlyphsChevronsSlimDownIcon } from '../../icons/glyph/glyphs-chevrons-slim-down-icon.js';
|
|
7
7
|
import { useDisclosure } from '../../shared/hooks/use-disclosure.js';
|
|
8
8
|
import { ensureArray } from '../../shared/utils/array.js';
|
|
9
|
+
import { Heading } from '../../typography/heading/heading.js';
|
|
9
10
|
import styles from './accordion.module.css.js';
|
|
10
11
|
|
|
11
12
|
function AccordionItem({ _pseudo = 'none', allowCollapse = true, allowToggle = true, borderType = 'bottom', children, className, 'data-test-selector': dataTestSelector, id, initialIsOpen = false, isDisabled = false, size, title, }) {
|
|
@@ -23,7 +24,7 @@ function AccordionItem({ _pseudo = 'none', allowCollapse = true, allowToggle = t
|
|
|
23
24
|
[styles['is-open']]: isOpen,
|
|
24
25
|
[styles['allow-collapse']]: allowCollapse,
|
|
25
26
|
[styles['allow-toggle']]: allowCollapse && allowToggle,
|
|
26
|
-
}), "data-test-selector": dataTestSelector, children: [jsx("h3",
|
|
27
|
+
}), "data-test-selector": dataTestSelector, children: [jsx(Heading, { className: styles.heading, tag: "h3", children: allowCollapse ? (jsxs("button", { "aria-controls": panelId, "aria-expanded": isOpen, className: clsx(styles.button, styles[_pseudo]), disabled: isDisabled, id: id, onClick: () => {
|
|
27
28
|
if (allowToggle)
|
|
28
29
|
toggle();
|
|
29
30
|
}, tabIndex: allowToggle ? 0 : -1, type: "button", children: [title, jsx("span", { className: styles.icon, children: size === 'lg' ? (jsx(GlyphsChevronsBoldDownIcon, {})) : (jsx(GlyphsChevronsSlimDownIcon, {})) })] })) : (jsx("span", { className: styles.button, children: title })) }), jsx("div", { "aria-labelledby": id, className: styles.panel, id: panelId, role: "region", children: jsx("div", { className: styles.content, children: children }) })] }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"accordion":"accordion-module-9WvAH","indented":"accordion-module-6CcEH","white":"accordion-module-CaVdG","accordion-item":"accordion-module-lf9d-","lg":"accordion-module-0qnae","with-seperators":"accordion-module-yOLrW","button":"accordion-module--Rwpb","icon":"accordion-module-Y50uq","focus":"accordion-module-M4BZs","allow-toggle":"accordion-module-QEO2d","panel":"accordion-module-KZjMo","content":"accordion-module-ejMH3","border-type-bottom":"accordion-module-oTdZK","border-type-top":"accordion-module-0mrLq","border-type-middle":"accordion-module-aAr-R","is-open":"accordion-module-W0F1z","border-type-middle-accentuated":"accordion-module-OB98a","select":"accordion-module-SAbiG","disabled":"accordion-module-ogvYX"};
|
|
1
|
+
var styles = {"accordion":"accordion-module-9WvAH","indented":"accordion-module-6CcEH","white":"accordion-module-CaVdG","accordion-item":"accordion-module-lf9d-","lg":"accordion-module-0qnae","with-seperators":"accordion-module-yOLrW","heading":"accordion-module-d-B4T","button":"accordion-module--Rwpb","icon":"accordion-module-Y50uq","focus":"accordion-module-M4BZs","allow-toggle":"accordion-module-QEO2d","panel":"accordion-module-KZjMo","content":"accordion-module-ejMH3","border-type-bottom":"accordion-module-oTdZK","border-type-top":"accordion-module-0mrLq","border-type-middle":"accordion-module-aAr-R","is-open":"accordion-module-W0F1z","border-type-middle-accentuated":"accordion-module-OB98a","select":"accordion-module-SAbiG","disabled":"accordion-module-ogvYX"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
-
import { SelectField } from '../forms/select-field/select-field.js';
|
|
4
|
+
import { SelectField } from '../forms/fields/select-field/select-field.js';
|
|
5
5
|
import { useFormattedMessage } from '../intl/use-formatted-message.js';
|
|
6
6
|
|
|
7
7
|
function CountrySelect({ countries, countryNameInLanguageOfCountry = false, 'data-test-selector': dataTestSelector, defaultSelectedCountry, isDisabled, isLoading, isRequired, name, onCountryChange, selectedCountry, showLabel = true, }) {
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useState, useMemo, useCallback } from 'react';
|
|
4
4
|
import { Button } from '../../buttons/button/button.js';
|
|
5
5
|
import { CountrySelect } from '../../country-select/country-select.js';
|
|
6
|
-
import { Select } from '../../forms/select/select.js';
|
|
6
|
+
import { Select } from '../../forms/elements/select/select.js';
|
|
7
7
|
import { FormattedMessage } from '../../intl/formatted-message.js';
|
|
8
8
|
import { useFormattedMessage } from '../../intl/use-formatted-message.js';
|
|
9
9
|
import { Dialog } from '../../modals/dialog/dialog.js';
|
package/dist/exports.d.ts
CHANGED
|
@@ -89,27 +89,28 @@ export * from './filters/multi-select/multi-select';
|
|
|
89
89
|
export * from './filters/pagination/pagination';
|
|
90
90
|
export * from './footer/connected-footer';
|
|
91
91
|
export * from './footer/footer';
|
|
92
|
-
export * from './forms/checkbox
|
|
93
|
-
export * from './forms/checkbox/checkbox';
|
|
94
|
-
export * from './forms/
|
|
95
|
-
export * from './forms/
|
|
96
|
-
export * from './forms/
|
|
97
|
-
export * from './forms/
|
|
98
|
-
export * from './forms/
|
|
99
|
-
export * from './forms/
|
|
100
|
-
export * from './forms/
|
|
101
|
-
export * from './forms/
|
|
102
|
-
export * from './forms/
|
|
103
|
-
export * from './forms/
|
|
104
|
-
export * from './forms/
|
|
105
|
-
export * from './forms/
|
|
106
|
-
export * from './forms/
|
|
107
|
-
export * from './forms/
|
|
108
|
-
export * from './forms/
|
|
109
|
-
export * from './forms/
|
|
110
|
-
export * from './forms/
|
|
111
|
-
export * from './forms/
|
|
112
|
-
export * from './forms/
|
|
92
|
+
export * from './forms/elements/checkbox/checkbox';
|
|
93
|
+
export * from './forms/elements/color-checkbox/color-checkbox';
|
|
94
|
+
export * from './forms/elements/field-error/field-error';
|
|
95
|
+
export * from './forms/elements/input/input';
|
|
96
|
+
export * from './forms/elements/label/label';
|
|
97
|
+
export * from './forms/elements/select/select';
|
|
98
|
+
export * from './forms/elements/switch/switch';
|
|
99
|
+
export * from './forms/elements/textarea/textarea';
|
|
100
|
+
export * from './forms/fields/checkbox-field/checkbox-field';
|
|
101
|
+
export * from './forms/fields/number-field/number-field';
|
|
102
|
+
export * from './forms/fields/password-field/password-field';
|
|
103
|
+
export * from './forms/fields/search-field/search-field';
|
|
104
|
+
export * from './forms/fields/select-field/select-field';
|
|
105
|
+
export * from './forms/fields/switch-field/switch-field';
|
|
106
|
+
export * from './forms/fields/text-field/password-reveal-toggle/password-reveal-toggle';
|
|
107
|
+
export * from './forms/fields/text-field/text-field';
|
|
108
|
+
export * from './forms/layout/form/form';
|
|
109
|
+
export * from './forms/layout/form/form-field-layout';
|
|
110
|
+
export * from './forms/layout/form/form-segment';
|
|
111
|
+
export * from './forms/layout/form/form-segment-group';
|
|
112
|
+
export * from './forms/partials/edit-address-form/edit-address-form';
|
|
113
|
+
export * from './forms/partials/password-validation/password-validation';
|
|
113
114
|
export * from './global-search/categories-grid/categories-grid';
|
|
114
115
|
export * from './global-search/global-search';
|
|
115
116
|
export * from './global-search/global-search-provider/global-search-provider';
|
|
@@ -223,7 +224,7 @@ export * from './pages/checkout/payment-page/payment-page';
|
|
|
223
224
|
export * from './pages/checkout/payment-page/payment-page-content';
|
|
224
225
|
export * from './pages/checkout/payment-page/utils/parse-amount';
|
|
225
226
|
export * from './pages/checkout/shipping-page/components/currency-change-dialog';
|
|
226
|
-
export * from './pages/checkout/shipping-page/components/edit-address-form';
|
|
227
|
+
export * from './pages/checkout/shipping-page/components/edit-checkout-bill-to-address-form';
|
|
227
228
|
export * from './pages/checkout/shipping-page/components/readonly-address';
|
|
228
229
|
export * from './pages/checkout/shipping-page/components/sonic-address';
|
|
229
230
|
export * from './pages/checkout/shipping-page/hooks/use-patch-shipping-details';
|
|
@@ -240,6 +241,7 @@ export * from './pages/my-sonic/actions/change-customer/connected-change-custome
|
|
|
240
241
|
export * from './pages/my-sonic/actions/change-password/change-password';
|
|
241
242
|
export * from './pages/my-sonic/actions/change-password/change-password-dialog';
|
|
242
243
|
export * from './pages/my-sonic/actions/change-password/connected-change-password-dialog';
|
|
244
|
+
export * from './pages/my-sonic/actions/edit-bill-to-address/edit-bill-to-address';
|
|
243
245
|
export * from './pages/my-sonic/actions/edit-user-info/connected-edit-user-info-dialog';
|
|
244
246
|
export * from './pages/my-sonic/actions/edit-user-info/edit-user-info';
|
|
245
247
|
export * from './pages/my-sonic/actions/edit-user-info/edit-user-info-dialog';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { IconButton } from '../../buttons/icon-button/icon-button.js';
|
|
4
|
-
import { NumberField } from '../../forms/number-field/number-field.js';
|
|
4
|
+
import { NumberField } from '../../forms/fields/number-field/number-field.js';
|
|
5
5
|
import { GlyphsChevronsSlimLeftIcon } from '../../icons/glyph/glyphs-chevrons-slim-left-icon.js';
|
|
6
6
|
import { GlyphsChevronsSlimRightIcon } from '../../icons/glyph/glyphs-chevrons-slim-right-icon.js';
|
|
7
7
|
import { FormattedMessage } from '../../intl/formatted-message.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OnCountryLanguageChangeHandler } from '../country-selector/connected-country-selector';
|
|
2
2
|
import { NavigationLinkSource } from '../shared/api/bff/services/bff-service';
|
|
3
|
-
export declare function ConnectedFooter({ onCountryLanguageChange, source, }: {
|
|
3
|
+
export declare function ConnectedFooter({ className, onCountryLanguageChange, source, }: {
|
|
4
|
+
className?: string;
|
|
4
5
|
onCountryLanguageChange: OnCountryLanguageChangeHandler;
|
|
5
6
|
source: NavigationLinkSource;
|
|
6
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,10 +5,10 @@ import { useCultureCode } from '../intl/use-culture-code.js';
|
|
|
5
5
|
import { useFetchNavigationLinks } from '../shared/api/bff/hooks/use-fetch-navigation-links.js';
|
|
6
6
|
import { Footer } from './footer.js';
|
|
7
7
|
|
|
8
|
-
function ConnectedFooter({ onCountryLanguageChange, source, }) {
|
|
8
|
+
function ConnectedFooter({ className, onCountryLanguageChange, source, }) {
|
|
9
9
|
const cultureCode = useCultureCode();
|
|
10
10
|
const { data } = useFetchNavigationLinks({ cultureCode, source });
|
|
11
|
-
return (jsx(Footer, { bottomLinks: data?.footer.bottomLinks || [], copyright: data?.footer.copyright || '', countrySelector: jsx(ConnectedCountrySelector, { defaultCountryCode: "NL", defaultLanguageCode: "EN", onChange: onCountryLanguageChange }), linkBlocks: data?.footer.linkBlocks || [] }));
|
|
11
|
+
return (jsx(Footer, { bottomLinks: data?.footer.bottomLinks || [], className: className, copyright: data?.footer.copyright || '', countrySelector: jsx(ConnectedCountrySelector, { defaultCountryCode: "NL", defaultLanguageCode: "EN", onChange: onCountryLanguageChange }), linkBlocks: data?.footer.linkBlocks || [] }));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export { ConnectedFooter };
|
package/dist/footer/footer.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { NavigationLink } from '../shared/api/bff/model/bff.model';
|
|
3
3
|
export interface FooterBottomSectionProps {
|
|
4
4
|
bottomLinks: NavigationLink[];
|
|
5
|
+
className?: string;
|
|
5
6
|
copyright: string;
|
|
6
7
|
countrySelector: ReactNode;
|
|
7
8
|
}
|
|
@@ -10,4 +11,4 @@ export interface FooterLinkBlockProps {
|
|
|
10
11
|
}
|
|
11
12
|
export interface FooterProps extends FooterBottomSectionProps, FooterLinkBlockProps {
|
|
12
13
|
}
|
|
13
|
-
export declare function Footer({ bottomLinks, copyright, countrySelector, linkBlocks, }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Footer({ bottomLinks, className, copyright, countrySelector, linkBlocks, }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/footer/footer.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
import { Link } from '../buttons/link/link.js';
|
|
4
5
|
import { Accordion } from '../collapsables/accordion/accordion.js';
|
|
5
6
|
import { AccordionItem } from '../collapsables/accordion/accordion-item.js';
|
|
@@ -8,11 +9,11 @@ import { useIsBreakpoint } from '../shared/hooks/use-is-breakpoint.js';
|
|
|
8
9
|
import styles from './footer.module.css.js';
|
|
9
10
|
|
|
10
11
|
function BottomSection({ bottomLinks, copyright, countrySelector, }) {
|
|
11
|
-
return (jsxs("
|
|
12
|
+
return (jsxs("section", { className: styles['bottom-section'], children: [copyright && jsx("p", { className: styles.copyright, children: copyright }), bottomLinks.length > 0 && (jsx("ul", { className: styles['bottom-links'], role: "navigation", children: bottomLinks.map(link => (jsx("li", { children: jsx(Link, { href: link.url, target: link.openInNewTab ? '_blank' : undefined, children: link.title }) }, link.key))) })), countrySelector && (jsx("div", { className: styles['country-selector'], children: countrySelector }))] }));
|
|
12
13
|
}
|
|
13
14
|
function LinkSection({ link }) {
|
|
14
15
|
const isXl = useIsBreakpoint('xl');
|
|
15
|
-
return (jsx("
|
|
16
|
+
return (jsx("section", { className: styles['link-block'], children: jsx(Accordion, { color: "white", hasLineSeparator: false, size: "lg", children: jsx(AccordionItem, { allowCollapse: !isXl, id: `link-block-${link.key}`, initialIsOpen: isXl, title: link.title, children: jsx("ul", { className: styles['list'], children: link.links?.map(link => (jsx("li", { children: jsx(FooterLink, { link: link }) }, link.key))) }) }) }) }, link.key));
|
|
16
17
|
}
|
|
17
18
|
function FooterLink({ link }) {
|
|
18
19
|
const type = link.type;
|
|
@@ -26,10 +27,10 @@ function FooterLink({ link }) {
|
|
|
26
27
|
return null;
|
|
27
28
|
}
|
|
28
29
|
function FooterLinkBlock({ linkBlocks }) {
|
|
29
|
-
return (jsx("
|
|
30
|
+
return (jsx("nav", { className: styles['main-links'], children: linkBlocks.map(link => (jsx(FooterLink, { link: link }, link.key))) }));
|
|
30
31
|
}
|
|
31
|
-
function Footer({ bottomLinks, copyright, countrySelector, linkBlocks, }) {
|
|
32
|
-
return (jsxs("footer", { className: styles.footer, children: [jsx(FooterLinkBlock, { linkBlocks: linkBlocks }), jsx(BottomSection, { bottomLinks: bottomLinks, copyright: copyright, countrySelector: countrySelector })] }));
|
|
32
|
+
function Footer({ bottomLinks, className, copyright, countrySelector, linkBlocks, }) {
|
|
33
|
+
return (jsxs("footer", { className: clsx(styles.footer, className), children: [jsx(FooterLinkBlock, { linkBlocks: linkBlocks }), jsx(BottomSection, { bottomLinks: bottomLinks, copyright: copyright, countrySelector: countrySelector })] }));
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export { Footer };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var styles = {"footer":"footer-module-YzJ68","main-links":"footer-module-rFBXC","link-block":"footer-module-P5FXP","list":"footer-module-FM4hU","bottom-section":"footer-module-TZq-4","copyright":"footer-module-qlHSS","bottom-links":"footer-module-5eyFH","
|
|
1
|
+
var styles = {"footer":"footer-module-YzJ68","main-links":"footer-module-rFBXC","link-block":"footer-module-P5FXP","list":"footer-module-FM4hU","bottom-section":"footer-module-TZq-4","copyright":"footer-module-qlHSS","bottom-links":"footer-module-5eyFH","country-selector":"footer-module-rc0bC"};
|
|
2
2
|
|
|
3
3
|
export { styles as default };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { FieldError as FieldError$1 } from 'react-aria-components';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { useFormattedMessage } from '
|
|
5
|
+
import { useFormattedMessage } from '../../../intl/use-formatted-message.js';
|
|
6
6
|
import styles from './field-error.module.css.js';
|
|
7
7
|
|
|
8
8
|
function FieldError({ children, className }) {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"input-container":"input-module-uAOUY","solid":"input-module-7IaPE","outline":"input-module-axHOD","shadow-input":"input-module-2u4Pp","lg":"input-module-HFhUu","md":"input-module-DRosR","focus":"input-module-7iPV5","growing-input":"input-module-peOqs","inline-element":"input-module-Ai2f7","input":"input-module-JdwaH"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -3,9 +3,9 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useRef, useEffect } from 'react';
|
|
4
4
|
import { Select as Select$1, Button, SelectValue, Popover, ListBox, ListBoxSection, Header, ListBoxItem } from 'react-aria-components';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import { GlyphsChevronsSlimDownIcon } from '
|
|
7
|
-
import { StrokeCheckmarkIcon } from '
|
|
8
|
-
import { ProgressCircle } from '
|
|
6
|
+
import { GlyphsChevronsSlimDownIcon } from '../../../icons/glyph/glyphs-chevrons-slim-down-icon.js';
|
|
7
|
+
import { StrokeCheckmarkIcon } from '../../../icons/stroke/stroke-checkmark-icon.js';
|
|
8
|
+
import { ProgressCircle } from '../../../loading/progress-circle.js';
|
|
9
9
|
import { FieldError } from '../field-error/field-error.js';
|
|
10
10
|
import { Label } from '../label/label.js';
|
|
11
11
|
import styles from './select.module.css.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"select":"select-module-IPU-m","sm":"select-module-ysEmc","md":"select-module-E62kG","button":"select-module-0kwVJ","icon-wrapper":"select-module-ptK6Z","focus":"select-module-cnFLz","solid":"select-module-Qq411","loading":"select-module-KuyIv","popover":"select-module-XFHrL","listbox":"select-module-K6TjK","header":"select-module-AUXLg","item":"select-module-MkKKi","check":"select-module-N7nUk"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CheckboxProps, CheckboxPropsBase } from '
|
|
2
|
-
import { ValidateFunction } from '
|
|
1
|
+
import { CheckboxProps, CheckboxPropsBase } from '../../elements/checkbox/checkbox';
|
|
2
|
+
import { ValidateFunction } from '../../elements/field-error/field-error';
|
|
3
3
|
export interface CheckboxFieldPropsBase extends CheckboxPropsBase {
|
|
4
4
|
errorMessage?: string;
|
|
5
5
|
info?: string;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { CheckboxGroup } from 'react-aria-components';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { InfoIconTooltip } from '
|
|
6
|
-
import { Checkbox } from '
|
|
7
|
-
import { FieldError } from '
|
|
8
|
-
import { FormFieldLayout } from '
|
|
5
|
+
import { InfoIconTooltip } from '../../../info-icon-tooltip/info-icon-tooltip.js';
|
|
6
|
+
import { Checkbox } from '../../elements/checkbox/checkbox.js';
|
|
7
|
+
import { FieldError } from '../../elements/field-error/field-error.js';
|
|
8
|
+
import { FormFieldLayout } from '../../layout/form/form-field-layout.js';
|
|
9
9
|
import styles from './checkbox-field.module.css.js';
|
|
10
10
|
|
|
11
11
|
function CheckboxField(props) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FocusEvent, FormEventHandler } from 'react';
|
|
2
|
-
import { ValidateFunction } from '
|
|
2
|
+
import { ValidateFunction } from '../../elements/field-error/field-error';
|
|
3
3
|
interface NumberFieldProps {
|
|
4
4
|
autoFocus?: boolean;
|
|
5
5
|
autoGrow?: boolean;
|
|
@@ -3,14 +3,14 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
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
|
-
import { StrokeMinusIcon } from '
|
|
7
|
-
import { StrokePlusIcon } from '
|
|
8
|
-
import { StrokeTrashIcon } from '
|
|
9
|
-
import { InfoIconTooltip } from '
|
|
10
|
-
import { FieldError } from '
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
6
|
+
import { StrokeMinusIcon } from '../../../icons/stroke/stroke-minus-icon.js';
|
|
7
|
+
import { StrokePlusIcon } from '../../../icons/stroke/stroke-plus-icon.js';
|
|
8
|
+
import { StrokeTrashIcon } from '../../../icons/stroke/stroke-trash-icon.js';
|
|
9
|
+
import { InfoIconTooltip } from '../../../info-icon-tooltip/info-icon-tooltip.js';
|
|
10
|
+
import { FieldError } from '../../elements/field-error/field-error.js';
|
|
11
|
+
import { Input } from '../../elements/input/input.js';
|
|
12
|
+
import { Label } from '../../elements/label/label.js';
|
|
13
|
+
import { FormFieldLayout } from '../../layout/form/form-field-layout.js';
|
|
14
14
|
import styles from './number-field.module.css.js';
|
|
15
15
|
|
|
16
16
|
const defaultFormatOptions = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState } from 'react';
|
|
4
|
-
import { StrokeSearchIcon } from '
|
|
5
|
-
import { ProgressCircle } from '
|
|
6
|
-
import { useDebouncedCallback } from '
|
|
4
|
+
import { StrokeSearchIcon } from '../../../icons/stroke/stroke-search-icon.js';
|
|
5
|
+
import { ProgressCircle } from '../../../loading/progress-circle.js';
|
|
6
|
+
import { useDebouncedCallback } from '../../../shared/hooks/use-debounced-callback.js';
|
|
7
7
|
import { TextField } from '../text-field/text-field.js';
|
|
8
8
|
|
|
9
9
|
function SearchField({ isDebounced = false, isLoading = false, onChange, value: _value, ...props }) {
|
|
@@ -3,13 +3,13 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { Select, Button, SelectValue, Popover, ListBox, ListBoxSection, Header, ListBoxItem } from 'react-aria-components';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import { GlyphsChevronsSlimDownIcon } from '
|
|
7
|
-
import { StrokeCheckmarkIcon } from '
|
|
8
|
-
import { InfoIconTooltip } from '
|
|
9
|
-
import { ProgressCircle } from '
|
|
10
|
-
import { FieldError } from '
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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 '../../elements/field-error/field-error.js';
|
|
11
|
+
import { Label } from '../../elements/label/label.js';
|
|
12
|
+
import { FormFieldLayout } from '../../layout/form/form-field-layout.js';
|
|
13
13
|
import styles from './select-field.module.css.js';
|
|
14
14
|
|
|
15
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', }) {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var styles = {"select-field":"select-field-module-T07fb","md":"select-field-module-x-dtL","solid":"select-field-module-jfk-G","loading":"select-field-module-NyDa0","button":"select-field-module-uGX30","value":"select-field-module-z-6Ym","icon":"select-field-module-Njvvb","popover":"select-field-module-tbhPg","listbox":"select-field-module-Rwf0R","header":"select-field-module-KDZmc","item":"select-field-module-u3hoe"};
|
|
2
|
+
|
|
3
|
+
export { styles as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ValidateFunction } from '
|
|
2
|
-
import { SwitchProps, SwitchPropsBase } from '
|
|
1
|
+
import { ValidateFunction } from '../../elements/field-error/field-error';
|
|
2
|
+
import { SwitchProps, SwitchPropsBase } from '../../elements/switch/switch';
|
|
3
3
|
export interface SwitchFieldPropsBase extends SwitchPropsBase {
|
|
4
4
|
errorMessage?: string;
|
|
5
5
|
info?: string;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { CheckboxGroup } from 'react-aria-components';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { InfoIconTooltip } from '
|
|
6
|
-
import { FieldError } from '
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { InfoIconTooltip } from '../../../info-icon-tooltip/info-icon-tooltip.js';
|
|
6
|
+
import { FieldError } from '../../elements/field-error/field-error.js';
|
|
7
|
+
import { Switch } from '../../elements/switch/switch.js';
|
|
8
|
+
import { FormFieldLayout } from '../../layout/form/form-field-layout.js';
|
|
9
9
|
import styles from './switch-field.module.css.js';
|
|
10
10
|
|
|
11
11
|
function SwitchField(props) {
|
package/dist/forms/{text-field → fields/text-field}/password-reveal-toggle/password-reveal-toggle.js
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { Checkbox } from 'react-aria-components';
|
|
4
|
-
import { StrokeDehashedIcon } from '
|
|
5
|
-
import { StrokeHashedIcon } from '
|
|
6
|
-
import { useFormattedMessage } from '
|
|
4
|
+
import { StrokeDehashedIcon } from '../../../../icons/stroke/stroke-dehashed-icon.js';
|
|
5
|
+
import { StrokeHashedIcon } from '../../../../icons/stroke/stroke-hashed-icon.js';
|
|
6
|
+
import { useFormattedMessage } from '../../../../intl/use-formatted-message.js';
|
|
7
7
|
import styles from './password-reveal-toggle.module.css.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FocusEvent, FormEventHandler } from 'react';
|
|
2
|
-
import { ValidateFunction } from '
|
|
2
|
+
import { ValidateFunction } from '../../elements/field-error/field-error';
|
|
3
3
|
interface TextFieldPropsBase {
|
|
4
4
|
autoComplete?: string;
|
|
5
5
|
autoFocus?: boolean;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { TextField as TextField$1 } from 'react-aria-components';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { InfoIconTooltip } from '
|
|
6
|
-
import { FieldError } from '
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { InfoIconTooltip } from '../../../info-icon-tooltip/info-icon-tooltip.js';
|
|
6
|
+
import { FieldError } from '../../elements/field-error/field-error.js';
|
|
7
|
+
import { Input } from '../../elements/input/input.js';
|
|
8
|
+
import { Label } from '../../elements/label/label.js';
|
|
9
|
+
import { TextArea } from '../../elements/textarea/textarea.js';
|
|
10
|
+
import { FormFieldLayout } from '../../layout/form/form-field-layout.js';
|
|
11
11
|
import styles from './text-field.module.css.js';
|
|
12
12
|
|
|
13
13
|
function SingleLineInput({ autoGrow, 'data-test-selector': dataTestSelector, inlineElement, inputMode, label, onBlur, pattern, placeholder, role, size, type = 'text', value, variant, }) {
|
|
@@ -3,8 +3,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
4
|
import { Form as Form$1 } from 'react-aria-components';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import { Message } from '
|
|
7
|
-
import { scrollToTop } from '
|
|
6
|
+
import { Message } from '../../../message/message.js';
|
|
7
|
+
import { scrollToTop } from '../../../shared/hooks/use-scroll-to.js';
|
|
8
8
|
import styles from './form.module.css.js';
|
|
9
9
|
|
|
10
10
|
function Form({ autoComplete = false, children, className, errorMessage, footer, header, onSubmit, title, validationErrors, }) {
|
|
@@ -22,7 +22,7 @@ function Form({ autoComplete = false, children, className, errorMessage, footer,
|
|
|
22
22
|
scrollToTop();
|
|
23
23
|
}
|
|
24
24
|
}, [errorMessage]);
|
|
25
|
-
return (jsxs(Form$1, { "aria-label": title, autoComplete: autoComplete ? 'on' : 'off', className: clsx(styles['form'], className), onSubmit: handleSubmit, validationBehavior: "native", validationErrors: validationErrors, children: [jsx("header", { className: styles['form-header'], children: header }), errorMessage && (jsx("section", { className: styles['error-messages'], children: jsx(Message, { type: "danger", children: errorMessage }) })), children, jsx("footer", { className: styles['form-footer'], children: footer })] }));
|
|
25
|
+
return (jsxs(Form$1, { "aria-label": title, autoComplete: autoComplete ? 'on' : 'off', className: clsx(styles['form'], className), onSubmit: handleSubmit, validationBehavior: "native", validationErrors: validationErrors, children: [header && jsx("header", { className: styles['form-header'], children: header }), errorMessage && (jsx("section", { className: styles['error-messages'], children: jsx(Message, { type: "danger", children: errorMessage }) })), children, jsx("footer", { className: styles['form-footer'], children: footer })] }));
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export { Form };
|