@sonic-equipment/ui 0.0.91 → 0.0.93
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/index.d.ts +21 -1
- package/dist/index.js +259 -211
- package/dist/src/index.d.ts +2 -0
- package/dist/src/shared/feature-flags/use-feature-flags.d.ts +1 -0
- package/dist/src/shared/utils/uuid.d.ts +7 -0
- package/dist/src/toast/toast-provider.d.ts +3 -0
- package/dist/src/toast/toast-provider.stories.d.ts +10 -0
- package/dist/src/toast/toast.d.ts +8 -0
- package/dist/src/toast/toast.stories.d.ts +16 -0
- package/dist/src/toast/types.d.ts +12 -0
- package/dist/src/toast/use-toast.d.ts +5 -0
- package/dist/styles.css +866 -0
- package/package.json +6 -2
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import { simple } from 'instantsearch.js/es/lib/stateMappings/index.js';
|
|
|
14
14
|
import algoliasearch from 'algoliasearch';
|
|
15
15
|
import aa from 'search-insights';
|
|
16
16
|
import ReactDOM from 'react-dom';
|
|
17
|
+
import { ToastContainer, Slide, toast } from 'react-toastify';
|
|
17
18
|
import { createAutocomplete } from '@algolia/autocomplete-core';
|
|
18
19
|
import { getAlgoliaResults, parseAlgoliaHitHighlight } from '@algolia/autocomplete-preset-algolia';
|
|
19
20
|
import { createQuerySuggestionsPlugin } from '@algolia/autocomplete-plugin-query-suggestions';
|
|
@@ -368,6 +369,7 @@ const request = (function createRequestFunction() {
|
|
|
368
369
|
})();
|
|
369
370
|
|
|
370
371
|
const features = {
|
|
372
|
+
language: 'language',
|
|
371
373
|
pdp: 'pdpV2',
|
|
372
374
|
pdpv1: 'pdpV1',
|
|
373
375
|
plpv1: 'plpV1',
|
|
@@ -1196,10 +1198,10 @@ function useNavigate() {
|
|
|
1196
1198
|
};
|
|
1197
1199
|
}
|
|
1198
1200
|
|
|
1199
|
-
var styles$
|
|
1201
|
+
var styles$17 = {"link":"link-module-xLqBn","has-underline":"link-module-UuCEp","secondary":"link-module-v31wH","primary":"link-module-bGD6u"};
|
|
1200
1202
|
|
|
1201
1203
|
function Link({ children, className, color = 'primary', hasUnderline, isDisabled, onClick, ...props }) {
|
|
1202
|
-
return (jsx("a", { className: clsx({ [styles$
|
|
1204
|
+
return (jsx("a", { className: clsx({ [styles$17['has-underline']]: hasUnderline }, styles$17['link'], styles$17[color], className), "data-disabled": isDisabled ? true : undefined, onClick: onClick, ...props, children: children }));
|
|
1203
1205
|
}
|
|
1204
1206
|
|
|
1205
1207
|
function RouteLink({ children, ...props }) {
|
|
@@ -1312,24 +1314,24 @@ function SolidHomeIcon(props) {
|
|
|
1312
1314
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M15.039782,22 C14.6690193,22 14.3684378,21.6994185 14.3684378,21.3286559 L14.3684378,15.6029043 L9.34495251,15.6029043 L9.34495251,21.3286559 C9.34495251,21.6994185 9.04437101,22 8.67345678,22 L3.67134415,22 C3.3005815,22 3,21.6994185 3,21.3286559 L3,9.79560307 C3,9.60127857 3.08412644,9.41665514 3.23055192,9.28917706 L11.4158271,2.16495603 C11.6686612,1.94501466 12.0447291,1.94501466 12.2975632,2.16495603 L20.4828384,9.28917706 C20.6292639,9.41665514 20.7133903,9.60127857 20.7133903,9.79560307 L20.7133903,21.3286559 C20.7133903,21.6994185 20.4128088,22 20.0418946,22 L15.039782,22 Z", fillRule: "evenodd" }) }));
|
|
1313
1315
|
}
|
|
1314
1316
|
|
|
1315
|
-
var styles$
|
|
1317
|
+
var styles$16 = {"breadcrumbs":"breadcrumb-module-CQGse","breadcrumb":"breadcrumb-module-hxhDY","link":"breadcrumb-module-fp2Q6","icon":"breadcrumb-module-uIn3w","previous-icon":"breadcrumb-module-K-wMJ"};
|
|
1316
1318
|
|
|
1317
1319
|
function BreadcrumbShort({ links }) {
|
|
1318
1320
|
const homeLink = links[0];
|
|
1319
1321
|
const previousLink = links[links.length - 2];
|
|
1320
1322
|
const isHomeLink = previousLink === undefined || previousLink === homeLink;
|
|
1321
1323
|
const href = previousLink?.href || homeLink?.href;
|
|
1322
|
-
return (jsx(Breadcrumbs, { className: styles$
|
|
1324
|
+
return (jsx(Breadcrumbs, { className: styles$16.breadcrumbs, children: jsx(Breadcrumb$1, { className: styles$16.breadcrumb, children: jsxs(RouteLink, { className: styles$16.link, href: href, isDisabled: false, children: [jsx(GlyphsChevronsSlimLeftIcon, { className: styles$16.icon }), isHomeLink ? (jsx(SolidHomeIcon, { className: styles$16.icon })) : (jsx("span", { children: previousLink.label }))] }) }) }));
|
|
1323
1325
|
}
|
|
1324
1326
|
function BreadcrumbLongItem({ index, isDisabled, link, }) {
|
|
1325
|
-
return (jsx(Breadcrumb$1, { className: styles$
|
|
1327
|
+
return (jsx(Breadcrumb$1, { className: styles$16.breadcrumb, children: jsxs(RouteLink, { className: styles$16.link, color: "secondary", href: link.href, isDisabled: isDisabled, children: [jsx(GlyphsChevronsSlimLeftIcon, { className: clsx(styles$16['previous-icon'], styles$16.icon) }), link.label] }) }, index));
|
|
1326
1328
|
}
|
|
1327
1329
|
function BreadcrumbLong({ links }) {
|
|
1328
1330
|
const linksWithoutFirst = links.slice(1);
|
|
1329
1331
|
const homeLink = links[0];
|
|
1330
1332
|
if (!homeLink)
|
|
1331
1333
|
return null;
|
|
1332
|
-
return (jsxs(Breadcrumbs, { className: styles$
|
|
1334
|
+
return (jsxs(Breadcrumbs, { className: styles$16.breadcrumbs, children: [jsx(Breadcrumb$1, { className: styles$16.breadcrumb, children: jsx(RouteLink, { className: styles$16.link, href: homeLink.href, children: jsx(SolidHomeIcon, { className: clsx(styles$16['home-icon'], styles$16.icon) }) }) }), linksWithoutFirst.map((link, index) => (jsx(BreadcrumbLongItem, { index: index, isDisabled: linksWithoutFirst.length - 1 === index, link: link }, index)))] }));
|
|
1333
1335
|
}
|
|
1334
1336
|
function Breadcrumb({ links }) {
|
|
1335
1337
|
const { lg } = useBreakpoint();
|
|
@@ -1338,10 +1340,10 @@ function Breadcrumb({ links }) {
|
|
|
1338
1340
|
return lg ? BreadcrumbLong({ links }) : BreadcrumbShort({ links });
|
|
1339
1341
|
}
|
|
1340
1342
|
|
|
1341
|
-
var styles$
|
|
1343
|
+
var styles$15 = {"icon-button":"icon-button-module-4PDK-","md":"icon-button-module-k3s9J","lg":"icon-button-module-agk6Y","primary":"icon-button-module-fTeP4","secondary":"icon-button-module-dM0eo","current-color":"icon-button-module-71HRy"};
|
|
1342
1344
|
|
|
1343
1345
|
function IconButton({ children, className, color = 'primary', isDisabled, onClick, size = 'md', type = 'button', }) {
|
|
1344
|
-
return (jsx("button", { className: clsx(styles$
|
|
1346
|
+
return (jsx("button", { className: clsx(styles$15['icon-button'], styles$15[size], styles$15[color], className), "data-disabled": isDisabled ? true : undefined, disabled: isDisabled, onClick: e => {
|
|
1345
1347
|
onClick?.(e);
|
|
1346
1348
|
e.preventDefault();
|
|
1347
1349
|
e.stopPropagation();
|
|
@@ -1356,21 +1358,21 @@ function StrokeFavoriteIcon(props) {
|
|
|
1356
1358
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M7.33319295,3.33090958 C5.12714802,3.33090958 3.33232058,5.12348359 3.33232058,7.32679321 C3.33232058,8.18447047 3.64878056,9.03643889 4.29989998,9.93107334 L11.9997744,20.2227497 L19.7053643,9.92401241 C20.351069,9.03643889 20.6673786,8.1846207 20.6673786,7.32679321 C20.6673786,5.12348359 18.8727016,3.33090958 16.6666566,3.33090958 C14.8537801,3.33090958 13.1222748,4.56251549 12.6388611,6.19569283 C12.5552338,6.47843037 12.2951771,6.67253074 11.9999248,6.67253074 C11.7046724,6.67253074 11.4447662,6.47843037 11.3609885,6.19569283 C10.8775748,4.56251549 9.14606944,3.33090958 7.33319295,3.33090958 M11.9997744,22 L11.9997744,22 C11.7898038,22 11.5918659,21.9008466 11.4662746,21.7327364 L3.22718487,10.720545 C2.41106707,9.59905954 2,8.45954615 2,7.32679321 C2,4.3895979 4.39240135,2 7.33319295,2 C9.22488362,2 11.0018124,2.98206975 11.9999248,4.46786903 C12.9978868,2.98206975 14.774966,2 16.6666566,2 C19.6072978,2 22,4.3895979 22,7.32679321 C22,8.45969638 21.5887825,9.59920978 20.777929,10.7136343 L12.5334246,21.7327364 C12.4076829,21.9008466 12.2098954,22 11.9997744,22", fillRule: "evenodd" }) }));
|
|
1357
1359
|
}
|
|
1358
1360
|
|
|
1359
|
-
var styles$
|
|
1361
|
+
var styles$14 = {"favorite-button":"favorite-button-module-tXSS3","is-favorite":"favorite-button-module-l557q","favorite-on":"favorite-button-module-6Tsmy","favorite-off":"favorite-button-module-LQauU"};
|
|
1360
1362
|
|
|
1361
1363
|
function FavoriteButton({ isDisabled, isFavorite, onPress, }) {
|
|
1362
|
-
return (jsx(IconButton, { className: clsx(styles$
|
|
1363
|
-
[styles$
|
|
1364
|
+
return (jsx(IconButton, { className: clsx(styles$14['favorite-button'], {
|
|
1365
|
+
[styles$14['is-favorite']]: isFavorite,
|
|
1364
1366
|
}), color: "secondary", isDisabled: isDisabled, onClick: onPress, children: isFavorite ? jsx(SolidFavoriteIcon, {}) : jsx(StrokeFavoriteIcon, {}) }));
|
|
1365
1367
|
}
|
|
1366
1368
|
|
|
1367
|
-
var styles$
|
|
1369
|
+
var styles$13 = {"field-error":"field-error-module-FXnIg"};
|
|
1368
1370
|
|
|
1369
1371
|
function FieldError({ children }) {
|
|
1370
|
-
return (jsx(FieldError$1, { className: styles$
|
|
1372
|
+
return (jsx(FieldError$1, { className: styles$13['field-error'], children: children }));
|
|
1371
1373
|
}
|
|
1372
1374
|
|
|
1373
|
-
var styles$
|
|
1375
|
+
var styles$12 = {"input-container":"input-module-2woJR","shadow-input":"input-module-pNKEt","lg":"input-module-Dx2qC","md":"input-module-sH6e7","focus":"input-module-hEEuy","growing-input":"input-module-6HwY4"};
|
|
1374
1376
|
|
|
1375
1377
|
/**
|
|
1376
1378
|
* This component is used to create an input that grows as the user types.
|
|
@@ -1386,20 +1388,20 @@ const Input = forwardRef(({ _pseudo = 'none', autoGrow, size = 'lg', ...inputPro
|
|
|
1386
1388
|
? onChange?.(event)
|
|
1387
1389
|
: setUncontrolledValue(event.target.value);
|
|
1388
1390
|
const { pressProps } = usePress({});
|
|
1389
|
-
return (jsx("div", { className: clsx(styles$
|
|
1391
|
+
return (jsx("div", { className: clsx(styles$12['input-container'], styles$12[size], styles$12[_pseudo]), children: jsxs("div", { className: clsx({ [styles$12['growing-input']]: autoGrow }), children: [jsx(Input$1, { size: autoGrow ? 1 : undefined, ...props, ...pressProps, ref: ref, onChange: handleChange, onClick: e => {
|
|
1390
1392
|
e.preventDefault();
|
|
1391
1393
|
e.stopPropagation();
|
|
1392
1394
|
e.target.focus();
|
|
1393
|
-
} }), autoGrow && jsx("span", { className: styles$
|
|
1395
|
+
} }), autoGrow && jsx("span", { className: styles$12['shadow-input'], children: value })] }) }));
|
|
1394
1396
|
});
|
|
1395
1397
|
Input.displayName = 'Input';
|
|
1396
1398
|
|
|
1397
|
-
var styles
|
|
1399
|
+
var styles$11 = {"label":"label-module-LGfJt","required":"label-module-oTWaS"};
|
|
1398
1400
|
|
|
1399
1401
|
function Label({ children, isRequired }) {
|
|
1400
1402
|
if (!children)
|
|
1401
1403
|
return null;
|
|
1402
|
-
return (jsxs(Label$1, { className: styles
|
|
1404
|
+
return (jsxs(Label$1, { className: styles$11.label, children: [children, isRequired && jsx("span", { className: styles$11.required, children: "*" })] }));
|
|
1403
1405
|
}
|
|
1404
1406
|
|
|
1405
1407
|
function StrokeCollapseIcon(props) {
|
|
@@ -1414,7 +1416,7 @@ function StrokeTrashIcon(props) {
|
|
|
1414
1416
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M7.77273912,6.04398453 L9.07201126,6.04398453 L9.07201126,4.11757519 C9.07201126,3.84748949 9.15880324,3.63104347 9.33238719,3.46823712 C9.50597114,3.30543077 9.73570292,3.22402759 10.0215825,3.22402759 L13.3263825,3.22402759 C13.6186194,3.22402759 13.850313,3.30543077 14.0214633,3.46823712 C14.1926136,3.63104347 14.2781888,3.84748949 14.2781888,4.11757519 L14.2781888,6.04398453 L15.5846129,6.04398453 L15.5846129,4.04352264 C15.5846129,3.40769382 15.3900697,2.90814951 15.0009834,2.5448897 C14.6118971,2.1816299 14.0799703,2 13.405203,2 L9.942762,2 C9.26869007,2 8.73850162,2.1816299 8.35219662,2.5448897 C7.96589162,2.90814951 7.77273912,3.40769382 7.77273912,4.04352264 L7.77273912,6.04398453 Z M3.60955531,6.6940676 L19.7561406,6.6940676 C19.9248076,6.6940676 20.0683931,6.6332263 20.186897,6.51154371 C20.305401,6.38986111 20.3646529,6.242352 20.3646529,6.06901638 C20.3646529,5.9003494 20.3052023,5.75537328 20.186301,5.63408801 C20.0673997,5.51280275 19.9240129,5.45216011 19.7561406,5.45216011 L3.60955531,5.45216011 C3.44734496,5.45216011 3.30519982,5.51300141 3.18311989,5.63468401 C3.06103996,5.75636661 3,5.90114406 3,6.06901638 C3,6.24314666 3.06103996,6.39085444 3.18311989,6.5121397 C3.30519982,6.63342497 3.44734496,6.6940676 3.60955531,6.6940676 Z M7.56920636,22 L15.8049825,22 C16.4210441,22 16.9252074,21.8108208 17.3174724,21.4324624 C17.7097373,21.0541041 17.9209684,20.5545101 17.9511655,19.9336805 L18.6066126,6.5283806 L17.2870766,6.5283806 L16.6578534,19.8059883 C16.6444435,20.0808419 16.5455825,20.3084381 16.3612707,20.4887766 C16.1769588,20.6691152 15.9469787,20.7592845 15.6713303,20.7592845 L7.68497866,20.7592845 C7.41479362,20.7592845 7.18757,20.6677246 7.00330778,20.4846047 C6.81904556,20.3014848 6.72015983,20.0752793 6.70665057,19.8059883 L6.05358753,6.5295726 L4.76996029,6.5295726 L5.41587138,19.9420245 C5.4468632,20.562854 5.65806942,21.0610573 6.04949005,21.4366344 C6.44091068,21.8122115 6.94748278,22 7.56920636,22 Z M9.00213069,19.1375783 C9.15957307,19.1375783 9.2862223,19.0920591 9.38207839,19.0010206 C9.47793448,18.9099822 9.5230812,18.7917017 9.51751857,18.6461793 L9.2314403,8.86811345 C9.22587767,8.72338566 9.17618647,8.60729053 9.0823667,8.51982806 C8.98854694,8.43236558 8.86649184,8.38863435 8.71620142,8.38863435 C8.55945437,8.38863435 8.43436962,8.43395491 8.34094719,8.52459603 C8.24752475,8.61523714 8.20081354,8.73371626 8.20081354,8.88003338 L8.48555081,18.6485633 C8.49121278,18.7988537 8.54055631,18.9179288 8.63358142,19.0057886 C8.72660652,19.0936484 8.84945628,19.1375783 9.00213069,19.1375783 Z M11.6876904,19.1375783 C11.8451328,19.1375783 11.9717821,19.0922578 12.0676381,19.0016166 C12.1634942,18.9109755 12.2114223,18.7924964 12.2114223,18.6461793 L12.2114223,8.88003338 C12.2114223,8.73451092 12.1634942,8.61623047 12.0676381,8.52519202 C11.9717821,8.43415357 11.8451328,8.38863435 11.6876904,8.38863435 C11.5310427,8.38863435 11.4032015,8.43415357 11.3041668,8.52519202 C11.205132,8.61623047 11.1556147,8.73451092 11.1556147,8.88003338 L11.1556147,18.6461793 C11.1556147,18.7924964 11.205132,18.9109755 11.3041668,19.0016166 C11.4032015,19.0922578 11.5310427,19.1375783 11.6876904,19.1375783 Z M14.3635653,19.1387703 C14.516339,19.1387703 14.6392384,19.0948404 14.7322635,19.0069806 C14.8252886,18.9191208 14.8745825,18.802827 14.8801451,18.6580992 L15.1662234,8.88122537 C15.1662234,8.73490825 15.1194873,8.6166278 15.0260152,8.52638402 C14.9325431,8.43614023 14.8070859,8.39101833 14.6496435,8.39101833 C14.4993531,8.39101833 14.3772732,8.4345509 14.2834037,8.52161604 C14.1895343,8.60868118 14.1398183,8.7277563 14.1342556,8.87884138 L13.8483264,18.6485633 C13.8483264,18.7932911 13.8948389,18.9111742 13.987864,19.0022126 C14.0808891,19.0932511 14.2061229,19.1387703 14.3635653,19.1387703 Z" }) }));
|
|
1415
1417
|
}
|
|
1416
1418
|
|
|
1417
|
-
var styles$
|
|
1419
|
+
var styles$10 = {"field":"number-field-module-gmnog","button-input-container":"number-field-module-8Lvgh","zoom-in-text":"number-field-module-OlEoa"};
|
|
1418
1420
|
|
|
1419
1421
|
/**
|
|
1420
1422
|
* This component is used to create a number field.
|
|
@@ -1422,7 +1424,7 @@ var styles$_ = {"field":"number-field-module-gmnog","button-input-container":"nu
|
|
|
1422
1424
|
*/
|
|
1423
1425
|
function NumberField({ autoFocus, autoGrow, defaultValue, formatOptions = { style: 'decimal', useGrouping: false }, isDisabled, isInvalid, isReadOnly, isRequired, label, maxLength, maxValue, minValue, name, onChange, onInput, onKeyUp, placeholder, showLabel = false, size = 'lg', value, withButtons, }) {
|
|
1424
1426
|
const inputRef = useRef(null);
|
|
1425
|
-
return (jsxs(NumberField$1, { "aria-label": label, autoFocus: autoFocus, className: clsx(styles$
|
|
1427
|
+
return (jsxs(NumberField$1, { "aria-label": label, autoFocus: autoFocus, className: clsx(styles$10.field, styles$10[size]), defaultValue: defaultValue, formatOptions: formatOptions, isDisabled: isDisabled, isInvalid: isInvalid, isReadOnly: isReadOnly, isRequired: isRequired, maxValue: maxValue, minValue: minValue, name: name, onChange: onChange, onInput: onInput, value: value, children: [showLabel && jsx(Label, { isRequired: isRequired, children: label }), jsxs("div", { className: styles$10['button-input-container'], children: [withButtons && (jsx(Button$1, { isDisabled: isDisabled,
|
|
1426
1428
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1427
1429
|
// @ts-expect-error
|
|
1428
1430
|
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, maxLength: maxLength, onFocus: e => (e.target.selectionStart = e.target.value.length || 0), onKeyUp: e => onKeyUp?.(e), placeholder: placeholder, size: size }), withButtons && (jsx(Button$1, { isDisabled: isDisabled,
|
|
@@ -1435,7 +1437,7 @@ function SolidCartIcon(props) {
|
|
|
1435
1437
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M7.89619008,16.6656848 C9.33405626,16.6656848 10.4996925,17.831321 10.4996925,19.2690253 C10.4996925,20.7068915 9.33405626,21.8725278 7.89619008,21.8725278 C6.45832389,21.8725278 5.29268766,20.7068915 5.29268766,19.2690253 C5.29268766,17.831321 6.45832389,16.6656848 7.89619008,16.6656848 Z M16.8207199,16.6656848 C18.2585861,16.6656848 19.4242223,17.831321 19.4242223,19.2690253 C19.4242223,20.7068915 18.2585861,21.8725278 16.8207199,21.8725278 C15.3828537,21.8725278 14.2172175,20.7068915 14.2172175,19.2690253 C14.2172175,17.831321 15.3828537,16.6656848 16.8207199,16.6656848 Z M7.89619008,18.0995047 C7.25122196,18.0995047 6.72650762,18.6242191 6.72650762,19.2690253 C6.72650762,19.9139935 7.25122196,20.4387078 7.89619008,20.4387078 C8.54115819,20.4387078 9.06587253,19.9139935 9.06587253,19.2690253 C9.06587253,18.6242191 8.54115819,18.0995047 7.89619008,18.0995047 Z M16.8207199,18.0995047 C16.1757518,18.0995047 15.6510375,18.6242191 15.6510375,19.2690253 C15.6510375,19.9139935 16.1757518,20.4387078 16.8207199,20.4387078 C17.465688,20.4387078 17.9904024,19.9139935 17.9904024,19.2690253 C17.9904024,18.6242191 17.465688,18.0995047 16.8207199,18.0995047 Z M4.58909785,3 C4.6054446,3 4.6206584,3.00372253 4.63668145,3.00485547 C4.65869291,3.00631211 4.68038067,3.0079306 4.70174473,3.01132943 C4.72958275,3.0158612 4.75628783,3.02233516 4.78299291,3.02994206 C4.8001489,3.03479753 4.81698119,3.03949115 4.83365164,3.04564141 C4.8622989,3.05616159 4.88948953,3.06862396 4.91619461,3.08254297 L4.956495,3.10439258 C4.98287638,3.12025378 5.00763927,3.13789532 5.03175477,3.15699349 L5.06736154,3.18645 C5.08921115,3.20603373 5.10911857,3.22707409 5.1283786,3.2492474 C5.13986987,3.26251902 5.1511993,3.27562878 5.16171948,3.28970964 C5.17806623,3.31155925 5.19230894,3.33421811 5.2060661,3.35768621 C5.21626258,3.37500405 5.22597352,3.39216004 5.23455152,3.41028712 C5.24555725,3.43326967 5.25462079,3.45706147 5.26319878,3.48150066 C5.27032014,3.50205548 5.27711779,3.52244845 5.28245881,3.54381251 C5.28860907,3.56825171 5.29249345,3.59317645 5.29605412,3.61858673 C5.29799631,3.63299129 5.30252808,3.64642476 5.30382287,3.66115301 L5.510504,6.30738355 L21.2869744,6.30772748 C21.3139222,6.30835464 21.3370666,6.31256272 21.3603729,6.3151523 C21.3861069,6.31790373 21.4120027,6.31936037 21.4369275,6.32486324 C21.4591008,6.32923316 21.4726961,6.33603082 21.4875862,6.34056259 C21.5163953,6.34914058 21.5452044,6.35723303 21.5722332,6.36920985 C21.5918169,6.37778785 21.6092966,6.38911728 21.6275855,6.39931376 C21.6497588,6.41145243 21.6722559,6.42278186 21.6928107,6.43718642 C21.711747,6.45029618 21.7280937,6.46583368 21.7455734,6.48072379 C21.763215,6.49577574 21.7815039,6.51001845 21.7976888,6.52668889 C21.8132263,6.54287379 21.8261742,6.56067718 21.8400932,6.57815686 C21.8551452,6.59676949 21.8706827,6.61473473 21.8836306,6.634804 C21.8954456,6.65293108 21.9043473,6.67251481 21.9145437,6.69161299 C21.9258732,6.71330075 21.9381737,6.73434111 21.9473991,6.75716182 C21.9559771,6.77868773 21.9614799,6.80134658 21.9679539,6.82368174 C21.9744279,6.8456932 21.9820348,6.86705726 21.9864047,6.89003981 C21.9915839,6.91658304 21.9925549,6.94393552 21.994659,6.97128799 C21.9959538,6.98909138 22,7.00608552 22,7.0242126 C21.9988671,7.05496391 21.994659,7.07794646 21.9922312,7.10109086 C21.9894798,7.1269867 21.9880232,7.15320623 21.9825203,7.17813097 L20.5915903,13.2322533 L20.587706,13.2487619 C20.5797754,13.2835594 20.5681222,13.3164147 20.555498,13.3486227 C20.5524229,13.3567151 20.5499951,13.3651313 20.5465963,13.3730619 C20.5299259,13.4117438 20.5096948,13.4483216 20.4870359,13.4827955 C20.4797527,13.4938012 20.4710129,13.5031884 20.4632441,13.5137086 C20.445117,13.5381478 20.4265044,13.5619396 20.4056259,13.5836274 C20.3944583,13.5952805 20.3823196,13.605477 20.3705046,13.6163208 C20.3505972,13.6344479 20.3302043,13.6517658 20.3083546,13.6674651 C20.2941119,13.6778235 20.2795455,13.6872107 20.2646554,13.6964361 C20.2424821,13.7101932 20.2198233,13.7223319 20.1963552,13.7334995 L20.148286,13.7550254 C20.1214191,13.7655456 20.0935811,13.7734762 20.0654194,13.7807594 C20.0513385,13.7843201 20.037905,13.7888518 20.0235005,13.7916033 C19.9798012,13.8000194 19.9351309,13.8053604 19.8898132,13.8053604 L6.09623539,13.8051986 L6.20774933,15.2317353 L19.411064,15.2317353 C19.8069466,15.2317353 20.1278931,15.5528437 20.1278931,15.9487262 C20.1278931,16.3446088 19.8069466,16.6657172 19.411064,16.6657172 L5.54384488,16.6657172 C5.49593759,16.6657172 5.44932509,16.660538 5.40384553,16.6514744 C5.38863173,16.6483993 5.37471272,16.6425728 5.35998446,16.6386884 C5.33052795,16.6307578 5.30090959,16.6231509 5.27290972,16.6116596 C5.25543003,16.6043764 5.23940699,16.5945036 5.22257469,16.5859256 C5.19910659,16.5741106 5.17547665,16.5627812 5.15362704,16.5485385 C5.13711844,16.5376946 5.12255203,16.5249086 5.10701453,16.5127699 C5.08694526,16.4972324 5.06687599,16.4821804 5.04874891,16.4647007 C5.03434435,16.4509436 5.02204383,16.4357298 5.00893406,16.4208397 C4.99226362,16.4019033 4.97575503,16.3834526 4.96118862,16.3628977 C4.94937364,16.3463891 4.93966271,16.3285858 4.92930437,16.3111061 C4.91668015,16.2899039 4.90437963,16.2688635 4.8940213,16.2462046 C4.88511961,16.2267828 4.87832195,16.2065516 4.87103875,16.1861587 C4.86310815,16.163338 4.8553394,16.1406791 4.84967468,16.1168873 C4.84433367,16.0950377 4.84109669,16.0728644 4.83785971,16.0502055 L4.82992911,16.0045641 L3.92600265,4.43381996 L2.7169909,4.43381996 C2.32110834,4.43381996 2,4.11287347 2,3.7169909 C2,3.32094649 2.32110834,3 2.7169909,3 Z", fillRule: "evenodd" }) }));
|
|
1436
1438
|
}
|
|
1437
1439
|
|
|
1438
|
-
var styles
|
|
1440
|
+
var styles$$ = {"manual-input-container":"add-to-cart-button-module-AWFvQ","left-button-spacer":"add-to-cart-button-module-SS7WM"};
|
|
1439
1441
|
|
|
1440
1442
|
function AddToCartButton({ initialState = 'initial', isDisabled = false, onChange, quantity, }) {
|
|
1441
1443
|
const [currentState, setState] = useState(initialState);
|
|
@@ -1527,7 +1529,7 @@ function ManualInputState({ isDisabled, onCancel, onConfirm, quantity, }) {
|
|
|
1527
1529
|
e.key === 'Enter' && onConfirm(ensureNumber(updatedQuantity));
|
|
1528
1530
|
e.key === 'Escape' && onCancel();
|
|
1529
1531
|
};
|
|
1530
|
-
return (jsxs("div", { className: styles
|
|
1532
|
+
return (jsxs("div", { className: styles$$['manual-input-container'], children: [jsx("div", { className: styles$$['left-button-spacer'] }), jsx(NumberField, { autoFocus: true, autoGrow: true, defaultValue: quantity ? ensureNumber(quantity) : undefined, formatOptions: {
|
|
1531
1533
|
maximumFractionDigits: 0,
|
|
1532
1534
|
style: 'decimal',
|
|
1533
1535
|
useGrouping: false,
|
|
@@ -1581,12 +1583,12 @@ const ConnectedAddToCartButton = ({ onAddToCart, productId }) => {
|
|
|
1581
1583
|
return (jsx(AddToCartButton, { isDisabled: isPendingDeleteCartLine || isLoadingCartLines || isPendingAddToCart, onChange: handleChange, quantity: quantity }));
|
|
1582
1584
|
};
|
|
1583
1585
|
|
|
1584
|
-
var styles$
|
|
1586
|
+
var styles$_ = {"tag":"tag-module-B7r15","body":"tag-module-4cfCf","shape":"tag-module-c7CRb"};
|
|
1585
1587
|
|
|
1586
1588
|
function Tag({ children }) {
|
|
1587
1589
|
if (!children)
|
|
1588
1590
|
return null;
|
|
1589
|
-
return (jsxs("div", { className: styles$
|
|
1591
|
+
return (jsxs("div", { className: styles$_.tag, children: [jsx("div", { className: styles$_.body, children: children }), jsx("svg", { className: styles$_.shape, height: "16", viewBox: "0 0 9 16", width: "9", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { d: "M1.92461763,0 L0,0 L0,16 L1.92461763,16 L6.4117887,16 L8.87489381,7.57121588 C9.23711515,6.3325062 8.79482383,4.99454094 7.78060408,4.2560794 L1.92461763,0 Z", fill: "currentColor" }) })] }));
|
|
1590
1592
|
}
|
|
1591
1593
|
|
|
1592
1594
|
const IntlContext = createContext({
|
|
@@ -1622,7 +1624,7 @@ function useFormattedMessage() {
|
|
|
1622
1624
|
|
|
1623
1625
|
const FormattedMessage = ({ fallbackValue, id, optional, replacementValues, }) => useFormattedMessage()(id, { fallbackValue, optional, replacementValues });
|
|
1624
1626
|
|
|
1625
|
-
var styles$
|
|
1627
|
+
var styles$Z = {"product-price":"product-price-module-oIU1K","original-price":"product-price-module-til0s","is-hidden":"product-price-module-V1NCf","current-price-wrapper":"product-price-module-FfVhl","current-price":"product-price-module-pvy2w","wholes":"product-price-module-GCw07","dot":"product-price-module-N56iV","decimals":"product-price-module-eWOOF","vat":"product-price-module-96DoG"};
|
|
1626
1628
|
|
|
1627
1629
|
const formatPrice = (price) => new Intl.NumberFormat('en-US', {
|
|
1628
1630
|
maximumFractionDigits: 2,
|
|
@@ -1635,22 +1637,22 @@ function ProductPrice({ className, isVatIncluded, originalPrice, price, }) {
|
|
|
1635
1637
|
const priceWithCurrency = formatPrice(price);
|
|
1636
1638
|
const [wholes, decimals] = priceWithCurrency.split('.');
|
|
1637
1639
|
const showOriginalPrice = priceWithCurrency !== originalPriceWithCurrency;
|
|
1638
|
-
return (jsxs("div", { className: clsx(className, styles$
|
|
1639
|
-
[styles$
|
|
1640
|
-
}), children: originalPriceWithCurrency }), jsxs("div", { className: styles$
|
|
1640
|
+
return (jsxs("div", { className: clsx(className, styles$Z['product-price']), children: [jsx("span", { className: clsx(styles$Z['original-price'], {
|
|
1641
|
+
[styles$Z['is-hidden']]: !showOriginalPrice,
|
|
1642
|
+
}), children: originalPriceWithCurrency }), jsxs("div", { className: styles$Z['current-price-wrapper'], children: [jsxs("div", { className: styles$Z['current-price'], children: [jsx("span", { className: styles$Z.wholes, children: wholes }), jsx("span", { className: styles$Z.dot, children: "." }), jsx("span", { className: styles$Z.decimals, children: decimals })] }), jsx("span", { className: styles$Z.vat, children: isVatIncluded ? (jsx(FormattedMessage, { id: "Incl. VAT" })) : (jsx(FormattedMessage, { id: "Excl. VAT" })) })] })] }));
|
|
1641
1643
|
}
|
|
1642
1644
|
|
|
1643
|
-
var styles$
|
|
1645
|
+
var styles$Y = {"product-sku":"product-sku-module-ITb8x"};
|
|
1644
1646
|
|
|
1645
1647
|
function ProductSku({ sku }) {
|
|
1646
|
-
return (jsx("p", { className: styles$
|
|
1648
|
+
return (jsx("p", { className: styles$Y['product-sku'], "data-test-selector": "productNumber", children: sku }));
|
|
1647
1649
|
}
|
|
1648
1650
|
|
|
1649
1651
|
function isResponsiveImage(image) {
|
|
1650
1652
|
return Boolean(image?.lg);
|
|
1651
1653
|
}
|
|
1652
1654
|
|
|
1653
|
-
var styles$
|
|
1655
|
+
var styles$X = {"image":"image-module-lg7Kj","contain":"image-module-KFEgG","cover":"image-module-tVKFe","has-error":"image-module-LM93B","picture":"image-module-pNYjR"};
|
|
1654
1656
|
|
|
1655
1657
|
function Image({ className, fallbackSrc = 'https://res.cloudinary.com/dkz9eknwh/image/upload/v1716545808/images/product-card/fallback_p6ngjz.svg', fit = 'cover', height, image, loading = 'eager', title, width, }) {
|
|
1656
1658
|
const [hasError, setHasError] = useState(false);
|
|
@@ -1674,26 +1676,26 @@ function Image({ className, fallbackSrc = 'https://res.cloudinary.com/dkz9eknwh/
|
|
|
1674
1676
|
}
|
|
1675
1677
|
function ImageComponent({ className, fallbackSrc, fit = 'cover', hasError, image, ...rest }) {
|
|
1676
1678
|
if (!image)
|
|
1677
|
-
return (jsx("img", { className: clsx(styles$
|
|
1679
|
+
return (jsx("img", { className: clsx(styles$X.image, className, styles$X[fit], styles$X['has-error']), src: fallbackSrc, ...rest }));
|
|
1678
1680
|
const srcSet = !hasError
|
|
1679
1681
|
? `${image[1]} 1x, ${image[2]} 2x, ${image[3]} 3x`
|
|
1680
1682
|
: undefined;
|
|
1681
|
-
return (jsx("img", { alt: image.altText, className: clsx(styles$
|
|
1682
|
-
[styles$
|
|
1683
|
+
return (jsx("img", { alt: image.altText, className: clsx(styles$X.image, className, styles$X[fit], {
|
|
1684
|
+
[styles$X['has-error']]: hasError,
|
|
1683
1685
|
}), src: !hasError ? image[3] : fallbackSrc, srcSet: srcSet, ...rest }));
|
|
1684
1686
|
}
|
|
1685
1687
|
function PictureComponent({ className, fallbackSrc, fit = 'cover', hasError, image, ...rest }) {
|
|
1686
1688
|
if (!image)
|
|
1687
|
-
return (jsx("picture", { className: clsx(styles$
|
|
1688
|
-
return (jsxs("picture", { className: clsx(styles$
|
|
1689
|
-
[styles$
|
|
1689
|
+
return (jsx("picture", { className: clsx(styles$X.picture, className), children: jsx("img", { className: clsx(styles$X.image, styles$X[fit], styles$X['has-error']), src: fallbackSrc, ...rest }) }));
|
|
1690
|
+
return (jsxs("picture", { className: clsx(styles$X.picture, className), children: [jsx("source", { media: "(max-width: 768px)", srcSet: `${image.sm[1]} 1x, ${image.sm[2]} 2x, ${image.sm[3]} 3x` }), jsx("source", { media: "(max-width: 1439px)", srcSet: `${image.md[1]} 1x, ${image.md[2]} 2x, ${image.md[3]} 3x` }), jsx("source", { media: "(min-width: 1440px)", srcSet: `${image.lg[1]} 1x, ${image.lg[2]} 2x, ${image.lg[3]} 3x` }), jsx("img", { className: clsx(styles$X.image, styles$X[fit], {
|
|
1691
|
+
[styles$X['has-error']]: hasError,
|
|
1690
1692
|
}), src: !hasError ? image.lg[3] : fallbackSrc, ...rest })] }));
|
|
1691
1693
|
}
|
|
1692
1694
|
|
|
1693
|
-
var styles$
|
|
1695
|
+
var styles$W = {"product-card-container":"product-card-module-LepTy","product-card":"product-card-module-pLaiB","favorite-button":"product-card-module-tvEdz","content":"product-card-module-e0kMu","top":"product-card-module-Q0VvF","tag":"product-card-module-HkWBE","title":"product-card-module-CStNi","bottom":"product-card-module-kD2tU","image":"product-card-module-p-zoi","price":"product-card-module-irW0D","add-to-cart-button":"product-card-module-SnCvX"};
|
|
1694
1696
|
|
|
1695
1697
|
function ProductCard({ addToCartButton: AddToCartButton, favoriteButton: FavoriteButton, href, id, image, onClick, price, sku, tags, title, }) {
|
|
1696
|
-
return (jsx("div", { className: styles$
|
|
1698
|
+
return (jsx("div", { className: styles$W['product-card-container'], children: jsxs(RouteLink, { className: styles$W['product-card'], "data-product-id": sku, href: href, id: id, onClick: onClick, children: [jsx("div", { className: styles$W.image, children: jsx(Image, { ...image }) }), jsx("div", { className: styles$W['favorite-button'], children: FavoriteButton && FavoriteButton }), jsxs("div", { className: styles$W.content, children: [jsxs("div", { className: styles$W.top, children: [jsx("div", { className: styles$W.tag, children: tags?.map(tag => (jsx(Tag, { children: jsx(FormattedMessage, { optional: true, fallbackValue: tag, id: `tag.${tag.toLowerCase()}` }) }, tag))) }), jsx("h2", { className: styles$W.title, children: title }), jsx(ProductSku, { sku: sku })] }), jsxs("div", { className: styles$W.bottom, children: [jsx("div", { className: styles$W.price, children: jsx(ProductPrice, { isVatIncluded: price.isVatIncluded, originalPrice: price.originalPrice, price: price.price }) }), jsx("div", { className: styles$W['add-to-cart-button'], children: AddToCartButton })] })] })] }) }));
|
|
1697
1699
|
}
|
|
1698
1700
|
|
|
1699
1701
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -7472,13 +7474,13 @@ function GlyphsArrowBoldCapsLeftIcon(props) {
|
|
|
7472
7474
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "11", viewBox: "0 0 11 11", width: "11", children: jsx("path", { d: "M2.31124163,11 C2.06716529,11 1.91839241,10.7730596 2.04771379,10.5980857 L6.08820761,5.13116556 C6.42092595,4.68081431 6.37243043,4.10595375 5.96732409,3.70073526 L2.70240329,0.432177991 C2.53178078,0.261409485 2.67540212,0 2.93972934,0 L5.48361239,0 C5.57518542,0 5.6619622,0.0340936243 5.72102726,0.0931942463 L8.14882304,2.52367916 C9.1607451,3.53657521 9.28198389,4.9729381 8.45036569,6.09787751 L4.91836426,10.876542 C4.86160851,10.9533653 4.7620417,11 4.65492523,11 L2.31124163,11 Z", fillRule: "evenodd", transform: "matrix(-1 0 0 1 11 0)" }) }));
|
|
7473
7475
|
}
|
|
7474
7476
|
|
|
7475
|
-
var styles$
|
|
7477
|
+
var styles$V = {"carousel-navigation-button":"carousel-navigation-button-module-a1-I4"};
|
|
7476
7478
|
|
|
7477
7479
|
const CarouselNavigationButton = forwardRef(function NavigationButton({ className, direction, onClick }, ref) {
|
|
7478
|
-
return (jsx("button", { ref: ref, className: clsx(styles$
|
|
7480
|
+
return (jsx("button", { ref: ref, className: clsx(styles$V['carousel-navigation-button'], className), onClick: () => onClick?.(direction), children: direction === 'previous' ? (jsx(GlyphsArrowBoldCapsLeftIcon, {})) : (jsx(GlyphsArrowBoldCapsRightIcon, {})) }));
|
|
7479
7481
|
});
|
|
7480
7482
|
|
|
7481
|
-
var styles$
|
|
7483
|
+
var styles$U = {"carousel":"carousel-module-ealh-","swiper":"carousel-module-IftbN","is-ready":"carousel-module-RCpfc","has-overflow":"carousel-module-tPg7k","slide":"carousel-module-bUMlb","navigation-button-next":"carousel-module-T7bTr","is-dragging":"carousel-module-34OWD","navigation-button-prev":"carousel-module-984Rr","navigation-buttons":"carousel-module-k7Z4S","navigation-button":"carousel-module-kcqEE","top":"carousel-module-nL-O8","center":"carousel-module-5SGYn"};
|
|
7482
7484
|
|
|
7483
7485
|
function generateSlidesPerViewBreakpoints(slidesPerView) {
|
|
7484
7486
|
return Object.keys(slidesPerView).reduce((result, breakpoint) => ({
|
|
@@ -7517,12 +7519,12 @@ function Carousel({ breakpoints: _breakpoints, className, hasNavigation = true,
|
|
|
7517
7519
|
}
|
|
7518
7520
|
if (slides.length === 0)
|
|
7519
7521
|
return null;
|
|
7520
|
-
return (jsxs("div", { className: clsx(styles$
|
|
7522
|
+
return (jsxs("div", { className: clsx(styles$U.carousel, className), style: spaceBetween !== undefined
|
|
7521
7523
|
? { '--column-gap': `${spaceBetween}px` }
|
|
7522
|
-
: undefined, children: [jsx(Swiper, { breakpoints: _breakpoints, className: clsx(styles$
|
|
7523
|
-
[styles$
|
|
7524
|
-
[styles$
|
|
7525
|
-
[styles$
|
|
7524
|
+
: undefined, children: [jsx(Swiper, { breakpoints: _breakpoints, className: clsx(styles$U.swiper, {
|
|
7525
|
+
[styles$U['is-dragging']]: isDragging,
|
|
7526
|
+
[styles$U['has-overflow']]: hasOverflow,
|
|
7527
|
+
[styles$U['is-ready']]: isReady,
|
|
7526
7528
|
}), freeMode: {
|
|
7527
7529
|
enabled: false,
|
|
7528
7530
|
sticky: true,
|
|
@@ -7533,19 +7535,19 @@ function Carousel({ breakpoints: _breakpoints, className, hasNavigation = true,
|
|
|
7533
7535
|
}, onBeforeInit: swiper => (swiperRef.current = swiper), onSliderMove: () => setIsDragging(true), onSlidesUpdated: () => {
|
|
7534
7536
|
if (!isReady)
|
|
7535
7537
|
setIsReady(true);
|
|
7536
|
-
}, onTouchEnd: () => setIsDragging(false), slidesPerGroupAuto: slidesPerView === 'auto', slidesPerView: slidesPerView, spaceBetween: spaceBetween, children: slides.map((slide, index) => (jsx(SwiperSlide, { className: clsx(styles$
|
|
7538
|
+
}, onTouchEnd: () => setIsDragging(false), slidesPerGroupAuto: slidesPerView === 'auto', slidesPerView: slidesPerView, spaceBetween: spaceBetween, children: slides.map((slide, index) => (jsx(SwiperSlide, { className: clsx(styles$U.slide, slideClasses), children: slide }, index))) }), hasNavigation && (jsxs("div", { className: clsx(styles$U['navigation-buttons'], styles$U[navigationButtonsPosition]), children: [jsx(CarouselNavigationButton, { ref: prevEl, className: clsx(styles$U['navigation-button'], styles$U['navigation-button-prev']), direction: "previous", onClick: direction => handleNavigationButtonClick(direction) }), jsx(CarouselNavigationButton, { ref: nextEl, className: clsx(styles$U['navigation-button'], styles$U['navigation-button-next']), direction: "next", onClick: direction => handleNavigationButtonClick(direction) })] }))] }));
|
|
7537
7539
|
}
|
|
7538
7540
|
|
|
7539
|
-
var styles$
|
|
7541
|
+
var styles$T = {"slide":"category-carousel-module-muLq-"};
|
|
7540
7542
|
|
|
7541
7543
|
function CategoryCarousel({ categoryCards }) {
|
|
7542
|
-
return jsx(Carousel, { slideClasses: styles$
|
|
7544
|
+
return jsx(Carousel, { slideClasses: styles$T.slide, slides: categoryCards });
|
|
7543
7545
|
}
|
|
7544
7546
|
|
|
7545
|
-
var styles$
|
|
7547
|
+
var styles$S = {"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","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"};
|
|
7546
7548
|
|
|
7547
7549
|
function Accordion({ borderType = 'bottom', children, color = 'black', hasLineSeparator = true, indented, size = 'md', }) {
|
|
7548
|
-
return (jsx("div", { className: clsx({ [styles$
|
|
7550
|
+
return (jsx("div", { className: clsx({ [styles$S.indented]: indented }, styles$S.accordion, styles$S[color], styles$S[size], hasLineSeparator && styles$S['with-seperators']), children: Boolean(children) &&
|
|
7549
7551
|
Children.map(children, child => {
|
|
7550
7552
|
if (!child)
|
|
7551
7553
|
return null;
|
|
@@ -7582,7 +7584,7 @@ function useResizeObserver(resizeCallback) {
|
|
|
7582
7584
|
};
|
|
7583
7585
|
}
|
|
7584
7586
|
|
|
7585
|
-
var styles$
|
|
7587
|
+
var styles$R = {"show-all":"show-all-module-BDp21","panel":"show-all-module-bEdda","content":"show-all-module-RF--F","has-transparency":"show-all-module-30y7l","button":"show-all-module-58e7Q","icon":"show-all-module-fqncI","is-open":"show-all-module-hQeGI","content-fits":"show-all-module-OhPfm"};
|
|
7586
7588
|
|
|
7587
7589
|
function ShowAll({ children, hasTransparency = true, initialHeight = 0, initialIsOpen = false, isOpen: isControlledOpen, onToggle, }) {
|
|
7588
7590
|
const isControlled = isControlledOpen !== undefined && onToggle !== undefined;
|
|
@@ -7593,23 +7595,23 @@ function ShowAll({ children, hasTransparency = true, initialHeight = 0, initialI
|
|
|
7593
7595
|
const { ref } = useResizeObserver((_target, size) => {
|
|
7594
7596
|
setContentFits((size.height || 0) <= initialHeight);
|
|
7595
7597
|
});
|
|
7596
|
-
return (jsxs("div", { ref: showAllRef, className: clsx(styles$
|
|
7597
|
-
[styles$
|
|
7598
|
-
[styles$
|
|
7599
|
-
}), style: contentFits ? undefined : { '--initital-height': `${initialHeight}px` }, children: [jsx("div", { className: styles$
|
|
7600
|
-
[styles$
|
|
7601
|
-
}), children: jsx("div", { ref: ref, children: children }) }) }), !contentFits && (jsxs(RouteLink, { className: styles$
|
|
7598
|
+
return (jsxs("div", { ref: showAllRef, className: clsx(styles$R['show-all'], {
|
|
7599
|
+
[styles$R['content-fits']]: contentFits,
|
|
7600
|
+
[styles$R['is-open']]: isReallyOpen,
|
|
7601
|
+
}), style: contentFits ? undefined : { '--initital-height': `${initialHeight}px` }, children: [jsx("div", { className: styles$R.panel, children: jsx("div", { className: clsx(styles$R.content, {
|
|
7602
|
+
[styles$R['has-transparency']]: !contentFits && hasTransparency,
|
|
7603
|
+
}), children: jsx("div", { ref: ref, children: children }) }) }), !contentFits && (jsxs(RouteLink, { className: styles$R.button, color: "secondary", onClick: () => {
|
|
7602
7604
|
if (isControlled)
|
|
7603
7605
|
return onToggle(!isControlled);
|
|
7604
7606
|
toggle();
|
|
7605
|
-
}, children: [jsx(GlyphsChevronsSlimDownIcon, { className: styles$
|
|
7607
|
+
}, children: [jsx(GlyphsChevronsSlimDownIcon, { className: styles$R.icon }), isReallyOpen ? (jsx(FormattedMessage, { id: "Show less" })) : (jsx(FormattedMessage, { id: "Show all" }))] }))] }));
|
|
7606
7608
|
}
|
|
7607
7609
|
|
|
7608
7610
|
function StrokeCheckmarkIcon(props) {
|
|
7609
7611
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M10.8641425,17 C10.6636971,17 10.4855234,16.9548533 10.3296214,16.8645598 C10.1737194,16.7742664 10.0252413,16.6388262 9.88418708,16.4582393 L6.27839644,12.2189616 C6.09279881,11.9857035 6,11.744921 6,11.496614 C6,11.2332581 6.08723088,11.0094056 6.26169265,10.8250564 C6.43615442,10.6407073 6.65330364,10.5485327 6.91314031,10.5485327 C7.06904232,10.5485327 7.21195249,10.5823928 7.34187082,10.6501129 C7.47178916,10.717833 7.59985152,10.8382242 7.72605791,11.0112867 L10.8195991,14.7200903 L16.2405345,6.53047404 C16.4558278,6.17682468 16.7230883,6 17.0423163,6 C17.2873051,6 17.5081663,6.08088789 17.7048998,6.24266366 C17.9016333,6.40443943 18,6.61700527 18,6.88036117 C18,7.00075245 17.9721604,7.12302483 17.9164811,7.24717833 C17.8608018,7.37133183 17.7958426,7.48984199 17.7216036,7.6027088 L11.7884187,16.4469526 C11.5582777,16.8156509 11.2501856,17 10.8641425,17 Z", fillRule: "evenodd" }) }));
|
|
7610
7612
|
}
|
|
7611
7613
|
|
|
7612
|
-
var styles$
|
|
7614
|
+
var styles$Q = {"select":"select-module-ui-Wc","sm":"select-module-44a1l","md":"select-module-QUm-8","button":"select-module-aMQIQ","chevron":"select-module-00uRU","focus":"select-module-XMc0P","solid":"select-module-IRd4F","popover":"select-module-z8cWq","listbox":"select-module-S21ba","header":"select-module-4Bm2j","item":"select-module-LgEJO","check":"select-module-lQFw3"};
|
|
7613
7615
|
|
|
7614
7616
|
function Select({ isDisabled = false, label, onChange, options, placeholder, selectedOption, showLabel = true, showPlaceholder = true, size = 'md', variant = 'outline', }) {
|
|
7615
7617
|
const selectRef = useRef(null);
|
|
@@ -7626,24 +7628,24 @@ function Select({ isDisabled = false, label, onChange, options, placeholder, sel
|
|
|
7626
7628
|
window.addEventListener('resize', updateWidth);
|
|
7627
7629
|
return () => window.removeEventListener('resize', updateWidth);
|
|
7628
7630
|
}, []);
|
|
7629
|
-
return (jsxs(Select$1, { ref: selectRef, "aria-label": label, className: clsx(styles$
|
|
7631
|
+
return (jsxs(Select$1, { ref: selectRef, "aria-label": label, className: clsx(styles$Q.select, styles$Q[size], styles$Q[variant]), isDisabled: isDisabled, onSelectionChange: selected => onChange(selected), placeholder: placeholder || label, selectedKey: String(selectedOption), children: [showLabel && jsx(Label, { children: label }), jsxs(Button$1, { className: styles$Q.button, children: [jsx(SelectValue, {}), jsx(GlyphsChevronsSlimDownIcon, { "aria-hidden": "true", className: styles$Q.chevron })] }), jsx(Popover, { ref: ref =>
|
|
7630
7632
|
// Workaround for react/react-aria #1513
|
|
7631
|
-
ref?.addEventListener('touchend', e => e.preventDefault()), className: clsx(styles$
|
|
7633
|
+
ref?.addEventListener('touchend', e => e.preventDefault()), className: clsx(styles$Q.popover, styles$Q[variant]), placement: "bottom left", triggerRef: selectRef, children: jsx(ListBox, { className: styles$Q.listbox, children: jsxs(Section, { children: [showPlaceholder && (jsx(Header, { className: styles$Q.header, children: placeholder || label })), Object.entries(options).map(([key, value]) => (jsxs(ListBoxItem, { "aria-label": value, className: styles$Q.item, id: key, textValue: value, children: [selectedOption === key && (jsx("span", { slot: "description", children: jsx(StrokeCheckmarkIcon, { className: styles$Q.check }) })), jsx("span", { slot: "label", children: value })] }, key)))] }) }) })] }));
|
|
7632
7634
|
}
|
|
7633
7635
|
|
|
7634
7636
|
function StrokeCloseboxIcon(props) {
|
|
7635
7637
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M8,8 L16,16 M16,8 L8,16", fill: "currentColor", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.4" }) }));
|
|
7636
7638
|
}
|
|
7637
7639
|
|
|
7638
|
-
var styles$
|
|
7640
|
+
var styles$P = {"modal-overlay":"modal-module-rVFJc","modal-fade":"modal-module-63Uyl","is-full-screen":"modal-module-uwets","modal":"modal-module-6vlFt","content":"modal-module-FJxzx","modal-slide":"modal-module-jkAe7","modal-delayed-fade":"modal-module-WOZ01","close":"modal-module-7zIZE","modal-zoom":"modal-module-aPJ7X"};
|
|
7639
7641
|
|
|
7640
7642
|
function Modal({ children, className, isDismissable, isFullScreen, isKeyboardDismissDisabled, isOpen, onOpenChange, }) {
|
|
7641
|
-
return (jsx(ModalOverlay, { className: clsx(styles$
|
|
7642
|
-
[styles$
|
|
7643
|
-
}), children: jsx("div", { className: styles$
|
|
7643
|
+
return (jsx(ModalOverlay, { className: clsx(styles$P['modal-overlay'], className), isDismissable: isDismissable, isKeyboardDismissDisabled: isKeyboardDismissDisabled, isOpen: isOpen, onOpenChange: onOpenChange, children: jsx(Modal$1, { className: clsx(styles$P.modal, {
|
|
7644
|
+
[styles$P['is-full-screen']]: isFullScreen,
|
|
7645
|
+
}), children: jsx("div", { className: styles$P.content, children: children }) }) }));
|
|
7644
7646
|
}
|
|
7645
7647
|
|
|
7646
|
-
var styles$
|
|
7648
|
+
var styles$O = {"heading":"heading-module-pMC65","uppercase":"heading-module-6spgX","italic":"heading-module-XXMDM","bold":"heading-module-xvrxo","xxl":"heading-module-Kn3ZN","xl":"heading-module--hZs-","l":"heading-module-WrJRY","m":"heading-module-hTexc","s":"heading-module-7W29m","xs":"heading-module-SgaLB","xxs":"heading-module-33en7"};
|
|
7647
7649
|
|
|
7648
7650
|
const sizeToTag = {
|
|
7649
7651
|
l: 'h3',
|
|
@@ -7656,30 +7658,35 @@ const sizeToTag = {
|
|
|
7656
7658
|
};
|
|
7657
7659
|
function Heading({ bold = true, children, className, italic, size = 'xxl', tag, uppercase, }) {
|
|
7658
7660
|
return createElement$1(tag || sizeToTag[size], {
|
|
7659
|
-
className: clsx(className, styles$
|
|
7660
|
-
[styles$
|
|
7661
|
-
[styles$
|
|
7662
|
-
[styles$
|
|
7661
|
+
className: clsx(className, styles$O.heading, styles$O[size], {
|
|
7662
|
+
[styles$O.uppercase]: uppercase,
|
|
7663
|
+
[styles$O.italic]: italic,
|
|
7664
|
+
[styles$O.bold]: bold,
|
|
7663
7665
|
}),
|
|
7664
7666
|
}, children);
|
|
7665
7667
|
}
|
|
7666
7668
|
|
|
7667
|
-
var styles$
|
|
7669
|
+
var styles$N = {"dialog":"dialog-module-qKzgy","header":"dialog-module-ZnsAe","close":"dialog-module-Y7Tqg","footer":"dialog-module-y7Axm"};
|
|
7668
7670
|
|
|
7669
7671
|
function Footer({ close }) {
|
|
7670
7672
|
return (jsxs(Fragment, { children: [jsx(Button, { withArrow: true, color: "primary", size: "md", type: "submit", children: "Submit" }), jsx(Button, { color: "secondary", onClick: close, size: "md", variant: "outline", children: "Close" })] }));
|
|
7671
7673
|
}
|
|
7672
7674
|
function Dialog({ allowClose = true, children, className, dialogClassName, footer = Footer, hasCloseButton = true, hideTitle, isDismissable, isFullScreen, isKeyboardDismissDisabled, isOpen, onOpenChange, onSubmit, title, validationErrors, }) {
|
|
7673
|
-
return (jsx(Modal, { className: clsx(styles$
|
|
7675
|
+
return (jsx(Modal, { className: clsx(styles$N['modal-overlay'], className), isDismissable: isDismissable, isFullScreen: isFullScreen, isKeyboardDismissDisabled: isKeyboardDismissDisabled, isOpen: isOpen, onOpenChange: onOpenChange, children: jsx(Dialog$1, { "aria-label": title, className: clsx(styles$N.dialog, dialogClassName), children: ({ close }) => (jsxs(Form, { className: styles$N.form, onSubmit: onSubmit || (e => e.preventDefault), validationErrors: validationErrors, children: [jsxs("header", { className: styles$N.header, children: [!hideTitle && (jsx(Heading, { className: styles$N.heading, size: "xs", children: title })), hasCloseButton && (jsx("div", { className: styles$N.close, children: jsx(IconButton, { color: "secondary", isDisabled: !allowClose, onClick: close, children: jsx(StrokeCloseboxIcon, {}) }) }))] }), jsx("div", { className: styles$N.content, children: children instanceof Function ? children({ close }) : children }), jsx("footer", { className: styles$N.footer, children: footer instanceof Function ? footer({ close }) : footer })] })) }) }));
|
|
7674
7676
|
}
|
|
7675
7677
|
|
|
7676
|
-
var styles$
|
|
7678
|
+
var styles$M = {"country-selector-dialog":"country-selector-dialog-module-mMJS0","content":"country-selector-dialog-module-z-ZqY","logo":"country-selector-dialog-module-7VjsF","intro":"country-selector-dialog-module-IdVDt","selects":"country-selector-dialog-module-Nvikf"};
|
|
7677
7679
|
|
|
7678
7680
|
function CountrySelectorDialog({ countries, isOpen, onSubmit, selectedCountry, selectedLanguage, showCountry = true, }) {
|
|
7679
7681
|
const t = useFormattedMessage();
|
|
7680
7682
|
const [currentCountry, setCurrentCountry] = useState(selectedCountry);
|
|
7681
7683
|
const [currentLanguage, setCurrentLanguage] = useState(selectedLanguage);
|
|
7682
|
-
const countryOptions = useMemo(() => countries.reduce((acc, country) => ({
|
|
7684
|
+
const countryOptions = useMemo(() => countries.reduce((acc, country) => ({
|
|
7685
|
+
...acc,
|
|
7686
|
+
[country.id]: t(`clSelector.${country.name}`),
|
|
7687
|
+
}), {}),
|
|
7688
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7689
|
+
[countries]);
|
|
7683
7690
|
const languageOptions = useMemo(() => currentCountry.languages.reduce((acc, language) => ({ ...acc, [language.id]: language.description }), {}), [currentCountry]);
|
|
7684
7691
|
useEffect(() => {
|
|
7685
7692
|
if (currentCountry.languages.some(language => language.id === currentLanguage.id))
|
|
@@ -7690,22 +7697,23 @@ function CountrySelectorDialog({ countries, isOpen, onSubmit, selectedCountry, s
|
|
|
7690
7697
|
setCurrentLanguage(fallbackLanguage);
|
|
7691
7698
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7692
7699
|
}, [currentCountry]);
|
|
7693
|
-
return (jsx(Dialog, { hideTitle: true, allowClose: true, className: styles$
|
|
7700
|
+
return (jsx(Dialog, { hideTitle: true, allowClose: true, className: styles$M.modal, dialogClassName: styles$M['country-selector-dialog'], footer: jsx(Button, { withArrow: true, type: "submit", children: jsx(FormattedMessage, { id: "Save" }) }), hasCloseButton: false, isOpen: isOpen, onOpenChange: () => { }, onSubmit: e => {
|
|
7694
7701
|
onSubmit({ country: currentCountry, language: currentLanguage });
|
|
7695
7702
|
e.preventDefault();
|
|
7696
7703
|
e.stopPropagation();
|
|
7697
|
-
}, title: "Country Selector", children: jsxs("div", { className: styles$
|
|
7704
|
+
}, title: "Country Selector", children: jsxs("div", { className: styles$M.content, children: [jsx("svg", { className: styles$M.logo, height: "32", viewBox: "0 0 134 32", width: "134", xmlns: "http://www.w3.org/2000/svg", children: jsxs("g", { fill: "none", fillRule: "evenodd", children: [jsx("path", { d: "M15.83 11.533c2.42 0 4.382 1.977 4.382 4.415 0 8.794-7.1 15.95-15.83 15.95C1.963 31.897 0 29.92 0 27.481c0-2.354 1.83-4.278 4.134-4.408l.249-.007c3.797 0 6.905-3.036 7.058-6.826l.006-.293c0-2.438 1.963-4.415 4.383-4.415zM15.83 0c2.42 0 4.383 1.977 4.383 4.415 0 2.355-1.83 4.279-4.134 4.409l-.249.007c-3.8 0-6.906 3.035-7.059 6.824l-.006.293c0 2.438-1.962 4.415-4.382 4.415S0 18.386 0 15.948C0 7.154 7.101 0 15.83 0zm8.208 16.022c0 8.794 7.101 15.95 15.83 15.95s15.83-7.156 15.83-15.95S48.597.074 39.868.074s-15.83 7.154-15.83 15.948zm8.765 0c0-3.924 3.169-7.118 7.065-7.118 3.895 0 7.065 3.194 7.065 7.118 0 3.926-3.17 7.119-7.065 7.119-3.896 0-7.065-3.193-7.065-7.12zm76.888-11.276c-6.173 6.217-6.173 16.335-.002 22.553 6.173 6.217 16.215 6.217 22.388 0a4.44 4.44 0 0 0 .001-6.244 4.359 4.359 0 0 0-6.003-.184l-.194.184a7.04 7.04 0 0 1-9.994 0c-2.753-2.775-2.753-7.29.002-10.065a7.036 7.036 0 0 1 9.751-.233l.24.231a4.36 4.36 0 0 0 6.198 0 4.44 4.44 0 0 0-.001-6.245c-6.173-6.217-16.215-6.216-22.386.003zm-17.162-.174v22.863c0 2.439 1.961 4.416 4.381 4.416 2.422 0 4.384-1.977 4.384-4.416V4.572c0-2.439-1.962-4.416-4.384-4.416-2.42 0-4.38 1.977-4.38 4.416zM64.1.1c-2.42 0-4.383 1.977-4.383 4.415v23.07c0 2.438 1.962 4.415 4.382 4.415s4.383-1.977 4.383-4.415V8.93h3.933c3.895 0 7.065 3.192 7.065 7.118v11.537c0 2.438 1.962 4.415 4.382 4.415s4.383-1.977 4.383-4.415V16.048C88.244 7.254 81.143.1 72.414.1h-8.316z", fill: "#000" }), jsx("path", { d: "M47.036 16.022c0 3.99-3.209 7.222-7.168 7.222-3.96 0-7.169-3.233-7.169-7.222 0-3.989 3.21-7.222 7.169-7.222 3.96 0 7.168 3.233 7.168 7.222", fill: "#E30613" })] }) }), jsx("p", { className: styles$M.intro, children: jsx(FormattedMessage, { id: "Welcome to Sonic Equipment. Please choose your country and language below." }) }), jsxs("div", { className: styles$M.selects, children: [showCountry && (jsx(Select, { label: t('Country'), onChange: value => setCurrentCountry(countries.find(country => country.id === value) ||
|
|
7698
7705
|
currentCountry), options: countryOptions, selectedOption: currentCountry.id, showPlaceholder: false, variant: "solid" })), jsx(Select, { label: t('Language'), onChange: value => setCurrentLanguage(currentCountry.languages.find(language => language.id === value) || currentLanguage), options: languageOptions, selectedOption: currentLanguage.id, showPlaceholder: false, variant: "solid" })] })] }) }));
|
|
7699
7706
|
}
|
|
7700
7707
|
|
|
7701
|
-
var styles$
|
|
7708
|
+
var styles$L = {"country-selector-trigger":"country-selector-trigger-module-aioDu","flag":"country-selector-trigger-module-zOSJK","text":"country-selector-trigger-module-TE8tl","divider":"country-selector-trigger-module-GNRDD"};
|
|
7702
7709
|
|
|
7703
7710
|
function CountrySelectorTrigger({ onClick, selectedCountry, selectedLanguage, showCountry = true, }) {
|
|
7711
|
+
const t = useFormattedMessage();
|
|
7704
7712
|
if (!selectedCountry || !selectedLanguage)
|
|
7705
7713
|
return;
|
|
7706
7714
|
const abbreviation = selectedCountry.abbreviation.toLowerCase();
|
|
7707
7715
|
const flagSrc = `https://res.cloudinary.com/dkz9eknwh/image/upload/v1729678637/images/flags/${abbreviation}.svg`;
|
|
7708
|
-
return (jsxs("button", { "aria-label": "Open country selector dialog", className: styles$
|
|
7716
|
+
return (jsxs("button", { "aria-label": "Open country selector dialog", className: styles$L['country-selector-trigger'], onClick: onClick, type: "button", children: [jsx(Image, { className: styles$L.flag, height: 24, image: { 1: flagSrc, 2: flagSrc, 3: flagSrc, altText: abbreviation }, title: abbreviation, width: 24 }), jsxs("div", { className: styles$L.text, children: [showCountry && (jsxs(Fragment, { children: [jsx("span", { children: t(`clSelector.${selectedCountry.name}`) }), jsx("span", { className: styles$L.divider, children: "-" })] })), jsx("span", { children: selectedLanguage.description })] })] }));
|
|
7709
7717
|
}
|
|
7710
7718
|
|
|
7711
7719
|
async function fetchCountriesLanguages() {
|
|
@@ -7903,7 +7911,7 @@ function CountrySelector({ defaultCountryCode, defaultLanguageCode, onChange, sh
|
|
|
7903
7911
|
}, selectedCountry: selectedCountry || defaultCountry, selectedLanguage: selectedLanguage || defaultLanguage, showCountry: showCountry })] }));
|
|
7904
7912
|
}
|
|
7905
7913
|
|
|
7906
|
-
var styles$
|
|
7914
|
+
var styles$K = {"multi-select":"multi-select-module-DC7Ix","filter-item":"multi-select-module-OW-NK"};
|
|
7907
7915
|
|
|
7908
7916
|
function MultiSelect({ amountShown = 3, onChange, options, render, }) {
|
|
7909
7917
|
const shownOptions = options.slice(0, amountShown);
|
|
@@ -7914,24 +7922,24 @@ function MultiSelect({ amountShown = 3, onChange, options, render, }) {
|
|
|
7914
7922
|
options.filter(option => option.isSelected).length === 0) {
|
|
7915
7923
|
return null;
|
|
7916
7924
|
}
|
|
7917
|
-
return (jsxs("div", { className: styles$
|
|
7925
|
+
return (jsxs("div", { className: styles$K['multi-select'], children: [jsx("div", { className: styles$K['filter-items'], children: shownOptions
|
|
7918
7926
|
.concat(isOpen ? [] : hiddenSelectedOptions)
|
|
7919
|
-
.map(option => (jsxs("div", { className: styles$
|
|
7927
|
+
.map(option => (jsxs("div", { className: styles$K['filter-item'], children: [render({ onChange: () => onChange(option), option }), jsxs("span", { children: ["(", option.amount, ")"] })] }, option.value))) }), hiddenOptions.length > 0 && (jsx(ShowAll, { hasTransparency: false, isOpen: isOpen, onToggle: toggle, children: jsx("div", { className: clsx(styles$K['filter-items'], styles$K['hidden']), children: hiddenOptions.map(option => (jsxs("div", { className: styles$K['filter-item'], children: [render({ onChange: () => onChange(option), option }), jsxs("span", { children: ["(", option.amount, ")"] })] }, option.value))) }) }))] }));
|
|
7920
7928
|
}
|
|
7921
7929
|
|
|
7922
|
-
var styles$
|
|
7930
|
+
var styles$J = {"checkbox":"checkbox-module-YNVdd","box":"checkbox-module-UKoyf","checkmark":"checkbox-module-pHIwh","focus":"checkbox-module-v23jy","active":"checkbox-module-7UG-b","color-checkbox":"checkbox-module-nEhvW"};
|
|
7923
7931
|
|
|
7924
7932
|
function Checkbox({ _pseudo = 'none', children, className, isDisabled, isSelected, onChange, value, }) {
|
|
7925
|
-
return (jsxs(Checkbox$1, { className: clsx(className, styles$
|
|
7933
|
+
return (jsxs(Checkbox$1, { className: clsx(className, styles$J.checkbox, styles$J[_pseudo]), isDisabled: isDisabled, isSelected: isSelected, onChange: onChange, value: value, children: [jsx("div", { className: styles$J.box, children: jsx("svg", { "aria-hidden": "true", className: styles$J.checkmark, viewBox: "0 0 18 18", children: jsx("polyline", { points: "1 9 7 14 15 4" }) }) }), children] }));
|
|
7926
7934
|
}
|
|
7927
7935
|
|
|
7928
7936
|
function ColorCheckbox({ _pseudo = 'none', children, className, color, isDisabled, isSelected, onChange, value, }) {
|
|
7929
|
-
return (jsxs(Checkbox$1, { className: clsx(className, styles$
|
|
7937
|
+
return (jsxs(Checkbox$1, { className: clsx(className, styles$J.checkbox, styles$J['color-checkbox'], styles$J[_pseudo]), isDisabled: isDisabled, isSelected: isSelected, onChange: onChange, style: {
|
|
7930
7938
|
'--selected-color': color,
|
|
7931
|
-
}, value: value, children: [jsx("div", { className: styles$
|
|
7939
|
+
}, value: value, children: [jsx("div", { className: styles$J.box }), children] }));
|
|
7932
7940
|
}
|
|
7933
7941
|
|
|
7934
|
-
var styles$
|
|
7942
|
+
var styles$I = {"input-container":"textarea-module-C6Xr1","lg":"textarea-module-vksG-","md":"textarea-module-6JrQJ"};
|
|
7935
7943
|
|
|
7936
7944
|
/**
|
|
7937
7945
|
* This component is used to create a textarea that can grow as the user types.
|
|
@@ -7966,7 +7974,7 @@ const TextArea = forwardRef(({ autoGrow, size, ...textAreaProps }, _ref) => {
|
|
|
7966
7974
|
}
|
|
7967
7975
|
updateHeight();
|
|
7968
7976
|
}, [ref, autoGrow, updateHeight, size]);
|
|
7969
|
-
return (jsx("div", { className: styles$
|
|
7977
|
+
return (jsx("div", { className: styles$I['input-container'], children: jsx(TextArea$1, { ...textAreaProps, ref: node => {
|
|
7970
7978
|
ref.current =
|
|
7971
7979
|
node;
|
|
7972
7980
|
textAreaRef.current = node;
|
|
@@ -7977,7 +7985,7 @@ const TextArea = forwardRef(({ autoGrow, size, ...textAreaProps }, _ref) => {
|
|
|
7977
7985
|
});
|
|
7978
7986
|
TextArea.displayName = 'TextArea';
|
|
7979
7987
|
|
|
7980
|
-
var styles$
|
|
7988
|
+
var styles$H = {"field":"text-field-module-JeaK0"};
|
|
7981
7989
|
|
|
7982
7990
|
/**
|
|
7983
7991
|
* This component is used to create a text field.
|
|
@@ -7985,7 +7993,7 @@ var styles$F = {"field":"text-field-module-JeaK0"};
|
|
|
7985
7993
|
* This field can also grow when a user types in text.
|
|
7986
7994
|
*/
|
|
7987
7995
|
function TextField({ autoFocus, autoGrow, defaultValue, isDisabled, isInvalid, isMultiline, isReadOnly, isRequired, label, maxLength, name, onChange, onInput, onKeyUp, placeholder, rows, showLabel = false, size = 'lg', value, }) {
|
|
7988
|
-
return (jsxs(TextField$1, { "aria-label": label, autoFocus: autoFocus, className: clsx(styles$
|
|
7996
|
+
return (jsxs(TextField$1, { "aria-label": label, autoFocus: autoFocus, className: clsx(styles$H.field, styles$H[size]), defaultValue: defaultValue, isDisabled: isDisabled, isInvalid: isInvalid, isReadOnly: isReadOnly, isRequired: isRequired, maxLength: maxLength, name: name, onChange: value => {
|
|
7989
7997
|
onChange?.(value);
|
|
7990
7998
|
}, onInput: onInput, onKeyUp: e => onKeyUp?.(e), value: value, children: [showLabel && jsx(Label, { isRequired: isRequired, children: label }), isMultiline ? (jsx(TextArea, { autoGrow: autoGrow, placeholder: placeholder, rows: rows, size: size })) : (jsx(Input, { autoGrow: autoGrow, placeholder: placeholder, size: size })), jsx(FieldError, {})] }));
|
|
7991
7999
|
}
|
|
@@ -7995,22 +8003,22 @@ function IntlProvider({ children, formatMessage, languageCode: _languageCode, })
|
|
|
7995
8003
|
return (jsx(IntlContext.Provider, { value: { formatMessage, languageCode, updateLanguageCode }, children: children }));
|
|
7996
8004
|
}
|
|
7997
8005
|
|
|
7998
|
-
var styles$
|
|
8006
|
+
var styles$G = {"progress-circle":"progress-circle-module-4nweP","spin":"progress-circle-module-kCf7K"};
|
|
7999
8007
|
|
|
8000
8008
|
function ProgressCircle({ className }) {
|
|
8001
|
-
return (jsxs("svg", { className: clsx(styles$
|
|
8009
|
+
return (jsxs("svg", { className: clsx(styles$G['progress-circle'], className), viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", children: [jsx("title", { children: "Spinner" }), jsxs("defs", { children: [jsx("pattern", { height: "100%", id: "pattern-1", patternUnits: "objectBoundingBox", width: "100%", children: jsx("use", { xlinkHref: "#image-2" }) }), jsx("image", { height: "24", id: "image-2", width: "24", xlinkHref: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAAB7UlEQVRIDZ2VSaoCQQyG01rOoBtBr+YZXXsFL+BGEHcqDuCE89SPL480hdpiGYil3an/S1KDUavViq/Xq1wul8RPp5Ocz2dhPB6PiR8OB42RAHO5XE7D4zgW/PF4CM/u97tks1n1TCYjURSpB2hraALglw8BQGXOuQQSKk68y+fzL9lRBQAqAUIlVkUoxBUKBZ3sC1irbrdbUoX/PgTyAqDXmFVBBVRCFfYuGMBk67UvRCUA2FFAfgKUSiWhFTgQA9ESjLVgC7NWwEPNFYtFFUEICJnigAxCFbvd7jcAFVi/gbDoCALmOzCMAzebzUILEFculxVgOwcIDqRSqaiTBDadToMhziYDwBgNRmW0rdFoSLPZ1PeDwUDHbz+iTqejyv5VYHuekbVggavVqkLq9fq32hqnLTJxdgmijPQeYSqs1Woa3G63g8QJ1haZKMJkjDgLjLi/Nbvd7m8ARCxry9x2jyn2ej2ZTCb28+tRK/Azpy3vrN/vy2azeffq4zM9aLTFP1jPM4bDoWbPH06o6WXn9/lZgDMxGo1kuVwG/5uhlfkkTsB4PJb5fC7b7VYPH89C7P9GS5nBLYr4er2W/X6vhy4lNPXxR8BisdDWkD13Ee0KtVQAgqvVSncO2XNlc3WEWirAxLmmgf0K+ANZ6DTlvO5jwwAAAABJRU5ErkJggg==" })] }), jsx("g", { fill: "none", fillRule: "evenodd", id: "Page-1", stroke: "none", strokeWidth: "1", children: jsx("path", { d: "M12,0 C18.627417,0 24,5.372583 24,12 C24,14.7277828 23.0855773,17.3196292 21.4324752,19.4188392 C19.1717866,22.2895997 15.7255176,24 12,24 C11.2636203,24 10.6666667,23.4030463 10.6666667,22.6666667 C10.6666667,21.930287 11.2636203,21.3333333 12,21.3333333 C14.8994206,21.3333333 17.5771113,20.0043823 19.3374325,17.7690188 C20.6234737,16.1359252 21.3333333,14.1238938 21.3333333,12 C21.3333333,6.84534234 17.1546577,2.66666667 12,2.66666667 C6.84534234,2.66666667 2.66666667,6.84534234 2.66666667,12 C2.66666667,14.4546154 3.61656005,16.756214 5.28844833,18.485859 C5.80023235,19.015323 5.78589988,19.8594213 5.25643588,20.3712053 C4.72697187,20.8829893 3.88287357,20.8686569 3.37108955,20.3391928 C1.22326178,18.1171666 0,15.1531945 0,12 C0,5.372583 5.372583,0 12,0 Z", fill: "url(#pattern-1)", fillRule: "nonzero", id: "Spinner" }) })] }));
|
|
8002
8010
|
}
|
|
8003
8011
|
|
|
8004
|
-
var styles$
|
|
8012
|
+
var styles$F = {"product-grid":"product-overview-grid-module-bzys-","loading-panel":"product-overview-grid-module-XikkF","fade-in":"product-overview-grid-module-A6CS7","progress-circle":"product-overview-grid-module-DWnnI","fade-in-spinner":"product-overview-grid-module-r-wvY","grid-item":"product-overview-grid-module-MlUVA"};
|
|
8005
8013
|
|
|
8006
8014
|
function ProductOverviewGrid({ children, isLoading, }) {
|
|
8007
|
-
return (jsxs("div", { className: styles$
|
|
8015
|
+
return (jsxs("div", { className: styles$F['product-grid'], children: [Children.map(children, (child, index) => (jsx("div", { className: styles$F['grid-item'], children: child }, index))), isLoading && (jsx("div", { className: styles$F['loading-panel'], children: jsx(ProgressCircle, { className: styles$F['progress-circle'] }) }))] }));
|
|
8008
8016
|
}
|
|
8009
8017
|
|
|
8010
|
-
var styles$
|
|
8018
|
+
var styles$E = {"loading-overlay":"loading-overlay-module-L67Gy"};
|
|
8011
8019
|
|
|
8012
8020
|
function LoadingOverlay() {
|
|
8013
|
-
return (jsx("div", { className: styles$
|
|
8021
|
+
return (jsx("div", { className: styles$E['loading-overlay'], children: jsx(ProgressCircle, {}) }));
|
|
8014
8022
|
}
|
|
8015
8023
|
|
|
8016
8024
|
function useLanguageCode() {
|
|
@@ -8086,7 +8094,7 @@ function SolidNoticeIcon(props) {
|
|
|
8086
8094
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M4.65060241,21.1425703 L19.3493976,21.1425703 C19.8982597,21.1425703 20.3701473,21.0254351 20.7650602,20.7911647 C21.1599732,20.5568942 21.4645248,20.2406292 21.6787149,19.8423695 C21.892905,19.4441098 22,18.9973226 22,18.502008 C22,18.2811245 21.9682062,18.0568942 21.9046185,17.8293173 C21.8410308,17.6017403 21.748996,17.37751 21.6285141,17.1566265 L14.2690763,4.3253012 C14.0147256,3.89022758 13.6834003,3.56057564 13.2751004,3.33634538 C12.8668005,3.11211513 12.4417671,3 12,3 C11.5515395,3 11.1231593,3.11211513 10.7148594,3.33634538 C10.3065596,3.56057564 9.97858099,3.89022758 9.73092369,4.3253012 L2.37148594,17.1566265 C2.12382865,17.5850067 2,18.0334672 2,18.502008 C2,18.9973226 2.10709505,19.4441098 2.32128514,19.8423695 C2.53547523,20.2406292 2.84002677,20.5568942 3.23493976,20.7911647 C3.62985274,21.0254351 4.10174029,21.1425703 4.65060241,21.1425703 Z M12.0100402,14.7068273 C11.461178,14.7068273 11.1800535,14.4290495 11.1666667,13.873494 L11.0361446,8.91365462 C11.0294511,8.645917 11.1147925,8.42336011 11.2921687,8.24598394 C11.4695448,8.06860776 11.7021419,7.97991968 11.9899598,7.97991968 C12.2777778,7.97991968 12.5120482,8.07028112 12.6927711,8.25100402 C12.873494,8.43172691 12.9638554,8.65595716 12.9638554,8.92369478 L12.8232932,13.873494 C12.8099063,14.4290495 12.538822,14.7068273 12.0100402,14.7068273 Z M12.0100402,17.939759 C11.7021419,17.939759 11.437751,17.8393574 11.2168675,17.6385542 C10.9959839,17.437751 10.8855422,17.186747 10.8855422,16.8855422 C10.8855422,16.5910308 10.9959839,16.3417001 11.2168675,16.1375502 C11.437751,15.9334003 11.7021419,15.8313253 12.0100402,15.8313253 C12.311245,15.8313253 12.5722892,15.9317269 12.7931727,16.1325301 C13.0140562,16.3333333 13.124498,16.5843373 13.124498,16.8855422 C13.124498,17.1934404 13.0123829,17.4461178 12.7881526,17.6435743 C12.5639224,17.8410308 12.3045515,17.939759 12.0100402,17.939759 Z" }) }));
|
|
8087
8095
|
}
|
|
8088
8096
|
|
|
8089
|
-
var styles$
|
|
8097
|
+
var styles$D = {"announcement":"announcement-module-Xi0L5","wrapper":"announcement-module-4XVjD","icon":"announcement-module-lxmA2","content":"announcement-module-1Jn7y","title":"announcement-module-8k2rK","text":"announcement-module-yXGsN","close":"announcement-module-gZ9ae","informative":"announcement-module-0LTWL","notice":"announcement-module-Ga3lN","critical":"announcement-module-S3nSW","promo":"announcement-module-E6DqW"};
|
|
8090
8098
|
|
|
8091
8099
|
const iconMap = {
|
|
8092
8100
|
critical: jsx(SolidAttentionIcon, {}),
|
|
@@ -8095,7 +8103,7 @@ const iconMap = {
|
|
|
8095
8103
|
promo: jsx(SolidInformationIcon, {}),
|
|
8096
8104
|
};
|
|
8097
8105
|
function Announcement({ announcement: { href, id, text, title, type }, onDismiss, }) {
|
|
8098
|
-
return (jsxs(RouteLink, { className: clsx(styles$
|
|
8106
|
+
return (jsxs(RouteLink, { className: clsx(styles$D.announcement, styles$D[type]), href: href, children: [jsxs("div", { className: styles$D.wrapper, children: [jsx("div", { className: styles$D.icon, children: iconMap[type] }), jsxs("div", { className: styles$D.content, children: [jsx("h2", { className: styles$D.title, children: title }), jsxs("p", { className: styles$D.text, children: [text, jsx(GlyphsArrowSemiBoldRightIcon, {})] })] })] }), jsx("div", { className: styles$D.close, children: jsx(IconButton, { color: "current-color", onClick: () => onDismiss?.(id), children: jsx(StrokeCloseboxIcon, {}) }) })] }));
|
|
8099
8107
|
}
|
|
8100
8108
|
|
|
8101
8109
|
function ConnectedAnnouncement({ announcement: { endDate, startDate, ...announcement }, onDismiss, }) {
|
|
@@ -8112,7 +8120,7 @@ function ConnectedAnnouncement({ announcement: { endDate, startDate, ...announce
|
|
|
8112
8120
|
return jsx(Announcement, { announcement: announcement, onDismiss: onDismiss });
|
|
8113
8121
|
}
|
|
8114
8122
|
|
|
8115
|
-
var styles$
|
|
8123
|
+
var styles$C = {"announcement-enter":"announcement-provider-module-ksjgO","announcement-enter-active":"announcement-provider-module-k0zd-","announcement-exit":"announcement-provider-module-w2N0B","announcement-exit-active":"announcement-provider-module-4lfx2"};
|
|
8116
8124
|
|
|
8117
8125
|
function AnnouncementProvider() {
|
|
8118
8126
|
const languageCode = useLanguageCode();
|
|
@@ -8122,10 +8130,10 @@ function AnnouncementProvider() {
|
|
|
8122
8130
|
const [dismissedIds, setDismissedIds] = useLocalStorage('dismissedAnnouncementIds', []);
|
|
8123
8131
|
const filteredAnnouncements = announcements?.filter(({ id }) => !dismissedIds.includes(id));
|
|
8124
8132
|
return (jsx(TransitionGroup, { children: filteredAnnouncements?.map(({ href, id, text, title, type }) => (jsx(CSSTransition, { classNames: {
|
|
8125
|
-
enter: styles$
|
|
8126
|
-
enterActive: styles$
|
|
8127
|
-
exit: styles$
|
|
8128
|
-
exitActive: styles$
|
|
8133
|
+
enter: styles$C['announcement-enter'],
|
|
8134
|
+
enterActive: styles$C['announcement-enter-active'],
|
|
8135
|
+
exit: styles$C['announcement-exit'],
|
|
8136
|
+
exitActive: styles$C['announcement-exit-active'],
|
|
8129
8137
|
}, timeout: 300, children: jsx(ConnectedAnnouncement, { announcement: {
|
|
8130
8138
|
href,
|
|
8131
8139
|
id,
|
|
@@ -8135,41 +8143,41 @@ function AnnouncementProvider() {
|
|
|
8135
8143
|
}, onDismiss: id => setDismissedIds(dismissedIds => [...dismissedIds, id]) }) }, id))) }));
|
|
8136
8144
|
}
|
|
8137
8145
|
|
|
8138
|
-
var styles$
|
|
8146
|
+
var styles$B = {"page-container":"page-container-module-PYmbC","inner-page-container":"page-container-module-uD8GF"};
|
|
8139
8147
|
|
|
8140
8148
|
function PageContainer({ children, className, }) {
|
|
8141
|
-
return (jsx("div", { className: styles$
|
|
8149
|
+
return (jsx("div", { className: styles$B['page-container'], children: jsx("div", { className: clsx(styles$B['inner-page-container'], className), children: children }) }));
|
|
8142
8150
|
}
|
|
8143
8151
|
|
|
8144
|
-
var styles$
|
|
8152
|
+
var styles$A = {"page":"page-module-XtZ9Y","breadcrumb":"page-module-ohh9z","title":"page-module-TEmve"};
|
|
8145
8153
|
|
|
8146
8154
|
function PageTitle({ children }) {
|
|
8147
8155
|
const { lg, xxl } = useBreakpoint();
|
|
8148
|
-
return (jsx(Heading, { italic: true, uppercase: true, className: styles$
|
|
8156
|
+
return (jsx(Heading, { italic: true, uppercase: true, className: styles$A.title, size: xxl ? 'xl' : lg ? 'm' : 's', tag: "h1", children: children }));
|
|
8149
8157
|
}
|
|
8150
8158
|
function Page({ breadCrumb, children, className, title }) {
|
|
8151
|
-
return (jsxs(PageContainer, { className: clsx(styles$
|
|
8159
|
+
return (jsxs(PageContainer, { className: clsx(styles$A.page, className), children: [jsx("div", { className: styles$A.breadcrumb, children: jsx(Breadcrumb, { links: breadCrumb }) }), title && jsx(PageTitle, { children: title }), children] }));
|
|
8152
8160
|
}
|
|
8153
8161
|
|
|
8154
8162
|
function SolidOkayIcon(props) {
|
|
8155
8163
|
return (jsx("svg", { fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...props, height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M12.0051467,22 C13.3707325,22 14.6574026,21.7375193 15.865157,21.2125579 C17.0729113,20.6875965 18.1365586,19.9653457 19.0560988,19.0458055 C19.975639,18.1262652 20.6961743,17.0643335 21.2177046,15.8600103 C21.7392349,14.6556871 22,13.3673014 22,11.9948533 C22,10.6292675 21.7375193,9.34259736 21.2125579,8.13484303 C20.6875965,6.92708869 19.9653457,5.86172585 19.0458055,4.9387545 C18.1262652,4.01578315 17.0626179,3.2952479 15.8548636,2.77714874 C14.6471093,2.25904958 13.3604392,2 11.9948533,2 C10.6292675,2 9.34431292,2.25904958 8.13998971,2.77714874 C6.9356665,3.2952479 5.87201921,4.01578315 4.94904786,4.9387545 C4.02607651,5.86172585 3.3038257,6.92708869 2.78229542,8.13484303 C2.26076514,9.34259736 2,10.6292675 2,11.9948533 C2,13.3673014 2.2624807,14.6556871 2.7874421,15.8600103 C3.3124035,17.0643335 4.03465431,18.1262652 4.95419454,19.0458055 C5.87373477,19.9653457 6.9356665,20.6875965 8.13998971,21.2125579 C9.34431292,21.7375193 10.6326986,22 12.0051467,22 Z M10.9243438,16.7812661 C10.7390633,16.7812661 10.5743695,16.7400926 10.4302625,16.6577458 C10.2861554,16.5753989 10.1489106,16.4518785 10.018528,16.2871848 L7.60988163,13.3329902 C7.43832561,13.1202608 7.35254761,12.9006691 7.35254761,12.6742151 C7.35254761,12.4340367 7.43317893,12.2298851 7.59444159,12.0617602 C7.75570424,11.8936353 7.95642477,11.8095728 8.19660319,11.8095728 C8.34071024,11.8095728 8.47280837,11.8404529 8.59289758,11.9022131 C8.71298679,11.9639732 8.83136044,12.0737691 8.94801853,12.2316006 L10.8831704,14.7020072 L14.9696346,8.14513639 C15.1686396,7.82261108 15.4156802,7.66134843 15.7107566,7.66134843 C15.9372105,7.66134843 16.1413622,7.73511752 16.3232115,7.88265569 C16.5050609,8.03019386 16.5959856,8.22405215 16.5959856,8.46423057 C16.5959856,8.57402642 16.5702522,8.68553783 16.5187854,8.7987648 C16.4673186,8.91199177 16.407274,9.02007205 16.3386516,9.12300566 L11.7786927,16.2768914 C11.5659633,16.6131412 11.2811803,16.7812661 10.9243438,16.7812661 Z" }) }));
|
|
8156
8164
|
}
|
|
8157
8165
|
|
|
8158
|
-
var styles$
|
|
8166
|
+
var styles$z = {"list":"list-module-7-DFP","list-item":"list-module-YMLVY","icon":"list-module-wTIOA"};
|
|
8159
8167
|
|
|
8160
8168
|
function List({ children }) {
|
|
8161
|
-
return jsx("ul", { className: styles$
|
|
8169
|
+
return jsx("ul", { className: styles$z.list, children: children });
|
|
8162
8170
|
}
|
|
8163
8171
|
function ListItem({ icon, text }) {
|
|
8164
|
-
return (jsxs("li", { className: styles$
|
|
8172
|
+
return (jsxs("li", { className: styles$z['list-item'], children: [icon && jsx("span", { className: styles$z.icon, children: icon }), text] }));
|
|
8165
8173
|
}
|
|
8166
8174
|
|
|
8167
|
-
var styles$
|
|
8175
|
+
var styles$y = {"sign-in-dialog":"sign-in-dialog-module-P-AHV"};
|
|
8168
8176
|
|
|
8169
8177
|
function SignInDialog({ isOpen, onOpenChange }) {
|
|
8170
8178
|
const { signInUrl } = useFavorite();
|
|
8171
8179
|
const t = useFormattedMessage();
|
|
8172
|
-
return (jsx(Dialog, { isDismissable: true, dialogClassName: styles$
|
|
8180
|
+
return (jsx(Dialog, { isDismissable: true, dialogClassName: styles$y['sign-in-dialog'], footer: jsxs(Fragment, { children: [jsx(RouteButton, { color: "primary", href: `${signInUrl}?returnUrl=${encodeURIComponent(window.location.pathname + window.location.search)}`, onClick: () => onOpenChange(false), variant: "solid", children: jsx(FormattedMessage, { id: "sign in" }) }), jsx(RouteButton, { color: "secondary", href: `${signInUrl}?returnUrl=${encodeURIComponent(window.location.pathname + window.location.search)}`, onClick: () => onOpenChange(false), variant: "outline", children: jsx(FormattedMessage, { id: "create account" }) })] }), isOpen: isOpen, onOpenChange: onOpenChange, title: t('Shop more efficiently and quicker with a favorites list'), children: jsxs(List, { children: [jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Easily add your favorite products') }), jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Your favorites are available on multiple devices') }), jsx(ListItem, { icon: jsx(SolidOkayIcon, { fill: "var(--color-status-available)" }), text: t('Share your favorite list with others') })] }) }));
|
|
8173
8181
|
}
|
|
8174
8182
|
|
|
8175
8183
|
function ConnectedFavoriteButton({ onFavorited: _onFavorited, onFavoriting: _onFavoriting, productId, }) {
|
|
@@ -8227,7 +8235,7 @@ function ConnectedProductCard({ id, onAddToCart, onFavorited, onFavoriting, ...p
|
|
|
8227
8235
|
return (jsx(ProductCard, { id: id, ...props, addToCartButton: jsx(ConnectedAddToCartButton, { onAddToCart: onAddToCart, productId: id }), favoriteButton: jsx(ConnectedFavoriteButton, { onFavorited: onFavorited, onFavoriting: onFavoriting, productId: id }) }));
|
|
8228
8236
|
}
|
|
8229
8237
|
|
|
8230
|
-
var styles$
|
|
8238
|
+
var styles$x = {"carousel-container":"card-carousel-module-JXQmk","button":"card-carousel-module-XQ2pX","slide":"card-carousel-module-DxKOG","width-auto":"card-carousel-module-RQ8gl","width-narrow":"card-carousel-module-8uKSt","width-normal":"card-carousel-module-l-ylK"};
|
|
8231
8239
|
|
|
8232
8240
|
function CardCarousel({ allowExpandToGrid = false, cards, cardsPerView = {
|
|
8233
8241
|
md: 2,
|
|
@@ -8236,9 +8244,9 @@ function CardCarousel({ allowExpandToGrid = false, cards, cardsPerView = {
|
|
|
8236
8244
|
}, cardWidth = 'auto', hasOverflow = false, }) {
|
|
8237
8245
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
8238
8246
|
if (!isExpanded) {
|
|
8239
|
-
return (jsxs("div", { className: styles$
|
|
8247
|
+
return (jsxs("div", { className: styles$x['carousel-container'], children: [jsx(Carousel, { hasOverflow: hasOverflow, navigationButtonsPosition: "center", slideClasses: clsx(styles$x.slide, styles$x[`width-${cardWidth}`]), slides: cards, slidesPerView: cardsPerView, spaceBetween: 16 }), allowExpandToGrid && (jsx(Button, { withArrow: true, className: styles$x.button, color: "secondary", onClick: () => setIsExpanded(true), variant: "outline", children: jsx(FormattedMessage, { id: "Show all" }) }))] }));
|
|
8240
8248
|
}
|
|
8241
|
-
return (jsxs("div", { className: styles$
|
|
8249
|
+
return (jsxs("div", { className: styles$x['carousel-container'], children: [jsxs(ProductOverviewGrid, { children: [...cards] }), jsx(Button, { withArrow: true, className: styles$x.button, color: "secondary", onClick: () => setIsExpanded(false), variant: "outline", children: jsx(FormattedMessage, { id: "Show less" }) })] }));
|
|
8242
8250
|
}
|
|
8243
8251
|
|
|
8244
8252
|
class Animation {
|
|
@@ -8382,7 +8390,7 @@ class Animation {
|
|
|
8382
8390
|
}
|
|
8383
8391
|
}
|
|
8384
8392
|
|
|
8385
|
-
var styles$
|
|
8393
|
+
var styles$w = {"pagination-panel":"pagination-module-pQ-Pu","content-container":"pagination-module-EnswA","contained":"pagination-module-4U0M3","page-button":"pagination-module-E-D6l","active-page-button":"pagination-module-rNIvD","circle":"pagination-module-4--ee"};
|
|
8386
8394
|
|
|
8387
8395
|
function between(min, value, max) {
|
|
8388
8396
|
return Math.min(max, Math.max(min, value));
|
|
@@ -8395,8 +8403,8 @@ function Pagination$1({ contained, currentPage = 1, numberOfPages, onChange, })
|
|
|
8395
8403
|
if (numberOfPages <= 1)
|
|
8396
8404
|
return;
|
|
8397
8405
|
return (jsx("div", { className: clsx({
|
|
8398
|
-
[styles$
|
|
8399
|
-
}, styles$
|
|
8406
|
+
[styles$w['contained']]: contained,
|
|
8407
|
+
}, styles$w['pagination-panel']), children: jsxs("div", { className: styles$w['content-container'], children: [jsx("div", { ref: animation.current.refButton, className: clsx(styles$w['active-page-button'], styles$w['page-button']), children: jsx("div", { ref: animation.current.refCircle, className: styles$w['circle'] }) }), Array.from({ length: numberOfPages }, (_, index) => (jsx("div", { ref: animation.current.refPaginationButton(index), className: clsx(styles$w['page-button']), onClick: () => {
|
|
8400
8408
|
onChange?.(index + 1);
|
|
8401
8409
|
}, onKeyPress: e => {
|
|
8402
8410
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
@@ -8405,7 +8413,7 @@ function Pagination$1({ contained, currentPage = 1, numberOfPages, onChange, })
|
|
|
8405
8413
|
}, role: "button", tabIndex: 0 }, index)))] }) }));
|
|
8406
8414
|
}
|
|
8407
8415
|
|
|
8408
|
-
var styles$
|
|
8416
|
+
var styles$v = {"usp-carousel":"usp-carousel-module-UCbpX","pagination":"usp-carousel-module-msaeJ","product-usp":"usp-carousel-module-rtIrb","left":"usp-carousel-module--Vdc3","image":"usp-carousel-module-F-WAS","right":"usp-carousel-module-2fygw","content":"usp-carousel-module-AOJJg","icon":"usp-carousel-module-Diy2d","title":"usp-carousel-module--xcF2","text":"usp-carousel-module-tq8R8","navigation":"usp-carousel-module-L5Kmv"};
|
|
8409
8417
|
|
|
8410
8418
|
const DURATION_IN_MS = 800;
|
|
8411
8419
|
const CONTENT_TRANSLATE_PX = 40;
|
|
@@ -8438,13 +8446,13 @@ const USPCarousel = ({ slides }) => {
|
|
|
8438
8446
|
}
|
|
8439
8447
|
});
|
|
8440
8448
|
}
|
|
8441
|
-
return (jsxs(Swiper, { ref: swiperElementRef, className: styles$
|
|
8449
|
+
return (jsxs(Swiper, { ref: swiperElementRef, className: styles$v['usp-carousel'], longSwipes: false, onActiveIndexChange: swiper => setCurrentIndex(swiper.activeIndex), onSetTransition: (_swiper, transitions) => {
|
|
8442
8450
|
currentTransitionSpeed = transitions;
|
|
8443
|
-
}, onSetTranslate: setTranslate, onSwiper: swiper => (swiperRef.current = swiper), speed: DURATION_IN_MS, virtualTranslate: true, watchSlidesProgress: true, children: [slides.map((slide, index) => (jsx(SwiperSlide, { children: slide }, index))), jsx("div", { className: styles$
|
|
8451
|
+
}, onSetTranslate: setTranslate, onSwiper: swiper => (swiperRef.current = swiper), speed: DURATION_IN_MS, virtualTranslate: true, watchSlidesProgress: true, children: [slides.map((slide, index) => (jsx(SwiperSlide, { children: slide }, index))), jsx("div", { className: styles$v.pagination, id: "pagination" }), jsx("div", { className: styles$v.pagination, children: jsx(Pagination$1, { currentPage: currentIndex + 1, numberOfPages: slides.length, onChange: pageNumber => swiperRef.current?.slideTo(pageNumber - 1) }) })] }));
|
|
8444
8452
|
};
|
|
8445
8453
|
|
|
8446
8454
|
function ProductUsp({ usp }) {
|
|
8447
|
-
return (jsxs("div", { className: styles$
|
|
8455
|
+
return (jsxs("div", { className: styles$v['product-usp'], children: [jsx("div", { className: styles$v.left, children: jsx(Image, { className: styles$v.image, fit: "cover", image: usp.image, title: usp.image.altText }) }), jsx("div", { className: styles$v.right, children: jsxs("div", { "data-content": true, className: styles$v.content, children: [jsx(Image, { className: styles$v.icon, image: usp.icon, title: usp.icon.altText }), jsx(Heading, { italic: true, uppercase: true, className: styles$v.title, size: "xs", children: usp.heading }), jsx("p", { className: styles$v.text, children: usp.text })] }) })] }));
|
|
8448
8456
|
}
|
|
8449
8457
|
|
|
8450
8458
|
function ProductUSPCarousel({ usps }) {
|
|
@@ -8464,16 +8472,16 @@ function ErrorPage({ error }) {
|
|
|
8464
8472
|
], title: "Something went wrong", children: environment !== 'production' && (jsxs(Fragment, { children: [jsx(Heading, { size: "l", children: isRequestError(error) ? (jsxs(Fragment, { children: [error.status, " - ", error.statusText || 'Unknown error'] })) : (jsx(Fragment, { children: error.message })) }), isRequestError(error) && (jsxs(Fragment, { children: [jsx(Heading, { size: "xs", children: "Error details" }), jsx(Heading, { size: "xxs", children: "Body" }), jsx("pre", { children: JSON.stringify(error.body, null, 2) }), jsx(Heading, { size: "xxs", children: "Options" }), jsx("pre", { children: JSON.stringify(error.options, null, 2) })] }))] })) }));
|
|
8465
8473
|
}
|
|
8466
8474
|
|
|
8467
|
-
var styles$
|
|
8475
|
+
var styles$u = {"product-details-page-layout":"product-details-page-layout-module-IQFIn","top":"product-details-page-layout-module--7oUp","image-gallery":"product-details-page-layout-module-Efavu","product-information":"product-details-page-layout-module-Y2490","recently-viewed":"product-details-page-layout-module-EDW8t","included":"product-details-page-layout-module-GSMls","usp":"product-details-page-layout-module-duq6v"};
|
|
8468
8476
|
|
|
8469
8477
|
function ProductDetailsPageLayout({ imageGallery, included, productInformation, recentlyViewed, usp, }) {
|
|
8470
|
-
return (jsxs("div", { className: styles$
|
|
8478
|
+
return (jsxs("div", { className: styles$u['product-details-page-layout'], children: [jsxs("section", { className: styles$u.top, children: [jsx("div", { className: styles$u['image-gallery'], children: imageGallery }), jsx("div", { className: styles$u['product-information'], children: productInformation })] }), jsx("section", { className: styles$u.usp, children: usp }), jsx("section", { className: styles$u.included, children: included }), jsx("section", { className: styles$u['recently-viewed'], children: recentlyViewed })] }));
|
|
8471
8479
|
}
|
|
8472
8480
|
|
|
8473
|
-
var styles$
|
|
8481
|
+
var styles$t = {"blank-page-spacer":"blank-page-spacer-module-lXxle","loading-overlay":"blank-page-spacer-module-hbxDP"};
|
|
8474
8482
|
|
|
8475
8483
|
function BlankPageSpacer({ children }) {
|
|
8476
|
-
return jsx("div", { className: styles$
|
|
8484
|
+
return jsx("div", { className: styles$t['blank-page-spacer'], children: children });
|
|
8477
8485
|
}
|
|
8478
8486
|
|
|
8479
8487
|
function LoadingPage() {
|
|
@@ -8558,7 +8566,7 @@ function useFetchProductDetailsPageData({ languageCode, pageUrl, }) {
|
|
|
8558
8566
|
});
|
|
8559
8567
|
}
|
|
8560
8568
|
|
|
8561
|
-
var styles$
|
|
8569
|
+
var styles$s = {"images-grid":"images-grid-module-i5868","grid-item":"images-grid-module-nY9-n","image":"images-grid-module-TahRy","clickable":"images-grid-module-Ruktz"};
|
|
8562
8570
|
|
|
8563
8571
|
const mainImagePosition = {
|
|
8564
8572
|
1: 0,
|
|
@@ -8580,12 +8588,12 @@ function ImagesGrid({ images, onSelectImage }) {
|
|
|
8580
8588
|
onSelectImage?.(image, images.indexOf(image));
|
|
8581
8589
|
}
|
|
8582
8590
|
}
|
|
8583
|
-
return (jsx("div", { className: styles$
|
|
8584
|
-
[styles$
|
|
8585
|
-
}), onClick: () => onSelectImage?.(image, index), onKeyDown: event => handleKeydown(event, image), role: "button", tabIndex: 0, children: jsx(Image, { className: styles$
|
|
8591
|
+
return (jsx("div", { className: styles$s['images-grid'], "data-count": images.length, children: imageList.map((image, index) => image && (jsx("div", { "aria-label": `Open image ${index}`, className: clsx(styles$s['grid-item'], {
|
|
8592
|
+
[styles$s.clickable]: Boolean(onSelectImage),
|
|
8593
|
+
}), onClick: () => onSelectImage?.(image, index), onKeyDown: event => handleKeydown(event, image), role: "button", tabIndex: 0, children: jsx(Image, { className: styles$s.image, fit: "contain", image: image, title: image.altText }) }, index))) }));
|
|
8586
8594
|
}
|
|
8587
8595
|
|
|
8588
|
-
var styles$
|
|
8596
|
+
var styles$r = {"image-lightbox":"image-lightbox-module-9k3oJ","slide":"image-lightbox-module-K5Gd0","active-image":"image-lightbox-module-UNPOi","thumb":"image-lightbox-module-PUOMT","image":"image-lightbox-module-4RKLg","main-swiper":"image-lightbox-module-hAy3O","pagination":"image-lightbox-module-nN1Kr","sm":"image-lightbox-module-1idAN","thumbs-swiper":"image-lightbox-module-Xbxcn","lg":"image-lightbox-module--V8Xo","navigation-button":"image-lightbox-module-RP7KS","navigation-button-prev":"image-lightbox-module-wOPYF","navigation-button-next":"image-lightbox-module-knizp"};
|
|
8589
8597
|
|
|
8590
8598
|
function ImageLightbox({ images, initialSelectedIndex = 0, variant = 'sm', }) {
|
|
8591
8599
|
const [thumbsSwiper, setThumbsSwiper] = useState();
|
|
@@ -8593,13 +8601,13 @@ function ImageLightbox({ images, initialSelectedIndex = 0, variant = 'sm', }) {
|
|
|
8593
8601
|
const nextEl = useRef(null);
|
|
8594
8602
|
const prevEl = useRef(null);
|
|
8595
8603
|
const mainSwiperRef = useRef(null);
|
|
8596
|
-
return (jsxs("div", { className: clsx(styles$
|
|
8604
|
+
return (jsxs("div", { className: clsx(styles$r['image-lightbox'], styles$r[variant]), children: [jsx(Swiper, { watchSlidesProgress: true, className: styles$r['thumbs-swiper'], direction: variant === 'sm' ? 'horizontal' : 'vertical', modules: [Thumb], onSwiper: swiper => setThumbsSwiper(swiper), slidesPerView: "auto", spaceBetween: 8, children: images.map((image, index) => (jsx(SwiperSlide, { className: styles$r.slide, children: jsx("div", { className: styles$r.thumb, children: jsx(Image, { className: styles$r.image, fit: "contain", height: 80, image: image, title: "Image", width: 80 }) }) }, index))) }), jsxs("div", { className: styles$r['main-swiper'], children: [jsx(Swiper, { initialSlide: initialSelectedIndex, modules: [Thumb, Navigation], navigation: {
|
|
8597
8605
|
nextEl: nextEl.current,
|
|
8598
8606
|
prevEl: prevEl.current,
|
|
8599
|
-
}, onActiveIndexChange: swiper => setCurrentIndex(swiper.activeIndex), onBeforeInit: swiper => (mainSwiperRef.current = swiper), slidesPerView: 1, thumbs: { swiper: thumbsSwiper }, children: images.map((image, index) => (jsx(SwiperSlide, { className: styles$
|
|
8607
|
+
}, onActiveIndexChange: swiper => setCurrentIndex(swiper.activeIndex), onBeforeInit: swiper => (mainSwiperRef.current = swiper), slidesPerView: 1, thumbs: { swiper: thumbsSwiper }, children: images.map((image, index) => (jsx(SwiperSlide, { className: styles$r.slide, children: jsx("div", { className: styles$r['active-image'], children: jsx(Image, { className: styles$r.image, fit: "contain", image: image, title: "Image" }) }) }, index))) }), jsx("div", { className: styles$r.pagination, children: jsx(Pagination$1, { contained: true, currentPage: currentIndex + 1, numberOfPages: images.length, onChange: pageNumber => mainSwiperRef.current?.slideTo(pageNumber - 1) }) }), variant === 'lg' && (jsxs(Fragment, { children: [jsx(CarouselNavigationButton, { ref: prevEl, className: clsx(styles$r['navigation-button'], styles$r['navigation-button-prev']), direction: "previous" }), jsx(CarouselNavigationButton, { ref: nextEl, className: clsx(styles$r['navigation-button'], styles$r['navigation-button-next']), direction: "next" })] }))] })] }));
|
|
8600
8608
|
}
|
|
8601
8609
|
|
|
8602
|
-
var styles$
|
|
8610
|
+
var styles$q = {"image-lightbox-modal":"product-detail-images-module-N3Ms-"};
|
|
8603
8611
|
|
|
8604
8612
|
const MAX_IMAGES = 5;
|
|
8605
8613
|
function ProductDetailImages({ images }) {
|
|
@@ -8616,7 +8624,7 @@ function ProductDetailImages({ images }) {
|
|
|
8616
8624
|
if (!isXl) {
|
|
8617
8625
|
return jsx(ImageLightbox, { images: images });
|
|
8618
8626
|
}
|
|
8619
|
-
return (jsxs(Fragment, { children: [jsx(ImagesGrid, { images: images, onSelectImage: (image, _index) => handleOpenImage(image) }), jsx(Dialog, { hasCloseButton: true, hideTitle: true, isDismissable: true, isFullScreen: true, isKeyboardDismissDisabled: false, isOpen: isOpen, onOpenChange: toggle, title: "Product images", children: jsx("div", { className: styles$
|
|
8627
|
+
return (jsxs(Fragment, { children: [jsx(ImagesGrid, { images: images, onSelectImage: (image, _index) => handleOpenImage(image) }), jsx(Dialog, { hasCloseButton: true, hideTitle: true, isDismissable: true, isFullScreen: true, isKeyboardDismissDisabled: false, isOpen: isOpen, onOpenChange: toggle, title: "Product images", children: jsx("div", { className: styles$q['image-lightbox-modal'], children: jsx(ImageLightbox, { images: images, initialSelectedIndex: selectedImageIndex, variant: "lg" }) }) })] }));
|
|
8620
8628
|
}
|
|
8621
8629
|
|
|
8622
8630
|
function GlyphsChevronsBoldDownIcon(props) {
|
|
@@ -8628,9 +8636,9 @@ function AccordionItem({ _pseudo = 'none', borderType = 'bottom', children, clas
|
|
|
8628
8636
|
const panelId = `panel-${id}`;
|
|
8629
8637
|
return (jsxs("div", { className: clsx(className, ...[]
|
|
8630
8638
|
.concat(borderType)
|
|
8631
|
-
.map(type => styles$
|
|
8632
|
-
[styles$
|
|
8633
|
-
}), children: [jsx("h3", { children: jsxs("button", { "aria-controls": panelId, "aria-expanded": isOpen, className: clsx(styles$
|
|
8639
|
+
.map(type => styles$S[`border-type-${type}`]), styles$S['accordion-item'], {
|
|
8640
|
+
[styles$S['is-open']]: isOpen,
|
|
8641
|
+
}), children: [jsx("h3", { children: jsxs("button", { "aria-controls": panelId, "aria-expanded": isOpen, className: clsx(styles$S.button, styles$S[_pseudo]), disabled: isDisabled, id: id, onClick: toggle, type: "button", children: [title, jsx("span", { className: styles$S.icon, children: size === 'lg' ? (jsx(GlyphsChevronsBoldDownIcon, {})) : (jsx(GlyphsChevronsSlimDownIcon, {})) })] }) }), jsx("div", { "aria-labelledby": id, className: styles$S.panel, id: panelId, role: "region", children: jsx("div", { className: styles$S.content, children: children }) })] }));
|
|
8634
8642
|
}
|
|
8635
8643
|
|
|
8636
8644
|
function StrokeDownloadIcon(props) {
|
|
@@ -8641,7 +8649,7 @@ function SolidCloseIcon(props) {
|
|
|
8641
8649
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "24", viewBox: "0 0 24 24", width: "24", children: jsx("path", { d: "M11.9997748,2 C17.5138784,2 22,6.48597148 22,11.9997748 C22,17.5138784 17.5138784,22 11.9997748,22 C6.48597148,22 2,17.5138784 2,11.9997748 C2,6.48597148 6.48597148,2 11.9997748,2 Z M16.4949747,7.50502525 C16.2216077,7.23165825 15.7783923,7.23165825 15.5050253,7.50502525 L12,11.011 L8.49497475,7.50502525 C8.22160774,7.23165825 7.77839226,7.23165825 7.50502525,7.50502525 L7.43121616,7.59179111 C7.23439192,7.86533687 7.25899495,8.24894444 7.50502525,8.49497475 L11.011,12 L7.50502525,15.5050253 C7.23165825,15.7783923 7.23165825,16.2216077 7.50502525,16.4949747 L7.59179111,16.5687838 C7.86533687,16.7656081 8.24894444,16.7410051 8.49497475,16.4949747 L12,12.988 L15.5050253,16.4949747 C15.7783923,16.7683418 16.2216077,16.7683418 16.4949747,16.4949747 L16.5687838,16.4082089 C16.7656081,16.1346631 16.7410051,15.7510556 16.4949747,15.5050253 L12.988,12 L16.4949747,8.49497475 C16.7683418,8.22160774 16.7683418,7.77839226 16.4949747,7.50502525 Z", fillRule: "evenodd" }) }));
|
|
8642
8650
|
}
|
|
8643
8651
|
|
|
8644
|
-
var styles$
|
|
8652
|
+
var styles$p = {"feature-list":"feature-list-module-cxc8U","row":"feature-list-module-tTJ2r","column":"feature-list-module-Tw0KD","column-label":"feature-list-module-J6Xfj","alignment-right":"feature-list-module-deI1-","column-value":"feature-list-module-CqSj1","icon-true":"feature-list-module-ojZvf","icon-false":"feature-list-module-4IjrA"};
|
|
8645
8653
|
|
|
8646
8654
|
function FeatureKey({ label }) {
|
|
8647
8655
|
return label;
|
|
@@ -8650,15 +8658,15 @@ function FeatureValue({ value }) {
|
|
|
8650
8658
|
if (typeof value === 'boolean' ||
|
|
8651
8659
|
(typeof value === 'string' &&
|
|
8652
8660
|
(value.toLowerCase() === 'true' || value.toLowerCase() === 'false'))) {
|
|
8653
|
-
return (jsx(Fragment, { children: String(value).toLowerCase() === 'true' ? (jsx(SolidOkayIcon, { className: styles$
|
|
8661
|
+
return (jsx(Fragment, { children: String(value).toLowerCase() === 'true' ? (jsx(SolidOkayIcon, { className: styles$p['icon-true'] })) : (jsx(SolidCloseIcon, { className: styles$p['icon-false'] })) }));
|
|
8654
8662
|
}
|
|
8655
|
-
return jsx("div", { className: styles$
|
|
8663
|
+
return jsx("div", { className: styles$p.value, children: value });
|
|
8656
8664
|
}
|
|
8657
8665
|
function FeatureList({ className, features, style }) {
|
|
8658
|
-
return (jsx("div", { className: clsx(styles$
|
|
8666
|
+
return (jsx("div", { className: clsx(styles$p['feature-list'], className), children: features.map(({ id, key, value }) => (jsxs("div", { className: styles$p.row, children: [jsx("div", { className: clsx(styles$p.column, styles$p['column-label'], styles$p[`alignment-${style?.keyAlignment || 'left'}`]), children: key && jsx(FeatureKey, { ...key }) }), jsx("div", { className: clsx(styles$p.column, styles$p['column-value'], styles$p[`alignment-${style?.valueAlignment || 'right'}`]), children: Array.isArray(value) ? (value.map((value, index) => (jsx(FeatureValue, { value: value }, `${id}-${index}`)))) : (jsx(FeatureValue, { value: value })) })] }, id))) }));
|
|
8659
8667
|
}
|
|
8660
8668
|
|
|
8661
|
-
var styles$
|
|
8669
|
+
var styles$o = {"download-list-item":"download-document-list-module-Z023h"};
|
|
8662
8670
|
|
|
8663
8671
|
function DownloadDocumentList({ className, documents, }) {
|
|
8664
8672
|
return (jsx(FeatureList, { className: className, features: documents.map(document => ({
|
|
@@ -8667,23 +8675,23 @@ function DownloadDocumentList({ className, documents, }) {
|
|
|
8667
8675
|
})), style: { valueAlignment: 'left' } }));
|
|
8668
8676
|
}
|
|
8669
8677
|
function DownloadListItem({ document: { href, name }, }) {
|
|
8670
|
-
return (jsxs("div", { className: styles$
|
|
8678
|
+
return (jsxs("div", { className: styles$o['download-list-item'], children: [jsx(StrokeDownloadIcon, {}), jsx("a", { href: href, rel: "noreferrer", target: "_blank", children: name })] }));
|
|
8671
8679
|
}
|
|
8672
8680
|
|
|
8673
|
-
var styles$
|
|
8681
|
+
var styles$n = {"product-details-panel":"product-details-panel-module-kfhpL","heading":"product-details-panel-module--1ODE","price-action-container":"product-details-panel-module-CCcmA","action-container":"product-details-panel-module-1vyDM","description":"product-details-panel-module-GfTab","feature-list":"product-details-panel-module-ze0my"};
|
|
8674
8682
|
|
|
8675
8683
|
function ProductDetailsPanel({ product }) {
|
|
8676
|
-
return (jsxs("div", { className: styles$
|
|
8684
|
+
return (jsxs("div", { className: styles$n['product-details-panel'], children: [jsxs("div", { className: styles$n.heading, children: [jsx(Heading, { italic: true, size: "xs", children: product.productTitle }), jsx(ProductSku, { sku: product.productNumber })] }), jsxs("div", { className: styles$n['price-action-container'], children: [jsx(ProductPrice, { isVatIncluded: false, originalPrice: product.unitListPrice, price: product.unitListPrice }), jsxs("div", { className: styles$n['action-container'], children: [product.canAddToCart && (jsx(ConnectedAddToCartButton, { productId: product.storefrontId })), product.canAddToWishlist && (jsx(ConnectedFavoriteButton, { productId: product.storefrontId }))] })] }), jsxs("div", { children: [jsx(Heading, { italic: true, className: styles$n['product-features-heading'], size: "xxs", children: jsx(FormattedMessage, { id: "Product Features" }) }), product.content.htmlContent && (jsx(ShowAll, { initialHeight: 216, children: jsx("div", { className: styles$n.description, dangerouslySetInnerHTML: {
|
|
8677
8685
|
__html: product.content.htmlContent,
|
|
8678
|
-
} }) }))] }), jsx("div", { children: jsxs(Accordion, { indented: true, borderType: ['top', 'middle-accentuated'], children: [Boolean(product.attributeTypes.length) && (jsx(AccordionItem, { id: "specification", title: jsx(FormattedMessage, { id: "Specifications" }), children: jsx(FeatureList, { className: styles$
|
|
8686
|
+
} }) }))] }), jsx("div", { children: jsxs(Accordion, { indented: true, borderType: ['top', 'middle-accentuated'], children: [Boolean(product.attributeTypes.length) && (jsx(AccordionItem, { id: "specification", title: jsx(FormattedMessage, { id: "Specifications" }), children: jsx(FeatureList, { className: styles$n['feature-list'], features: product.attributeTypes.map(attribute => ({
|
|
8679
8687
|
id: `${attribute.id}`,
|
|
8680
8688
|
key: { label: attribute.label },
|
|
8681
8689
|
value: attribute.attributeValues.map(attributeValue => attributeValue.value),
|
|
8682
|
-
})) }) })), Boolean(product.specifications.length) && (jsx(AccordionItem, { id: "features", title: jsx(FormattedMessage, { id: "Features" }), children: jsx(FeatureList, { className: styles$
|
|
8690
|
+
})) }) })), Boolean(product.specifications.length) && (jsx(AccordionItem, { id: "features", title: jsx(FormattedMessage, { id: "Features" }), children: jsx(FeatureList, { className: styles$n['feature-list'], features: product.specifications.map(specification => ({
|
|
8683
8691
|
id: `${specification.id}`,
|
|
8684
8692
|
key: { label: specification.nameDisplay },
|
|
8685
8693
|
value: specification.value,
|
|
8686
|
-
})) }) })), Boolean(product.documents.length) && (jsx(AccordionItem, { id: "downloads", title: jsx(FormattedMessage, { id: "Downloads" }), children: jsx(DownloadDocumentList, { className: styles$
|
|
8694
|
+
})) }) })), Boolean(product.documents.length) && (jsx(AccordionItem, { id: "downloads", title: jsx(FormattedMessage, { id: "Downloads" }), children: jsx(DownloadDocumentList, { className: styles$n['feature-list'], documents: product.documents
|
|
8687
8695
|
.map(document => ({
|
|
8688
8696
|
href: document.filePath,
|
|
8689
8697
|
id: document.id,
|
|
@@ -8779,7 +8787,7 @@ function DefaultFilterSection({ children, gap = 'md', title, variant, }) {
|
|
|
8779
8787
|
return (jsxs("section", { className: clsx(filterSectionStyles['filter-section'], filterSectionStyles[variant], filterSectionStyles[gap]), children: [jsx("h3", { className: filterSectionStyles.title, children: title }), jsx("div", { className: filterSectionStyles.content, children: children })] }));
|
|
8780
8788
|
}
|
|
8781
8789
|
|
|
8782
|
-
var styles$
|
|
8790
|
+
var styles$m = {"filter-panel":"algolia-filter-panel-module-GfhOO","scroll-container":"algolia-filter-panel-module-4ubB1","category":"algolia-filter-panel-module-LKet3","is-active":"algolia-filter-panel-module-yf8kI","value":"algolia-filter-panel-module-gQzED","count":"algolia-filter-panel-module-uAHPx","button":"algolia-filter-panel-module-ABOYv"};
|
|
8783
8791
|
|
|
8784
8792
|
function AlgoliaActiveCategories() {
|
|
8785
8793
|
const { items: categories } = useHierarchicalMenu({
|
|
@@ -8801,19 +8809,19 @@ function Categories({ categories, path: _path, }) {
|
|
|
8801
8809
|
const categorySlug = category.label.toLowerCase().replace(/ /g, '-');
|
|
8802
8810
|
const path = `${_path}/${categorySlug}`;
|
|
8803
8811
|
const isActive = !category.data || !category.data.some(c => c.isRefined);
|
|
8804
|
-
return (jsxs(Fragment, { children: [jsx("div", { className: filterSectionStyles['filter-section-item'], children: jsxs(RouteLink, { hasUnderline: true, className: clsx(styles$
|
|
8805
|
-
[styles$
|
|
8812
|
+
return (jsxs(Fragment, { children: [jsx("div", { className: filterSectionStyles['filter-section-item'], children: jsxs(RouteLink, { hasUnderline: true, className: clsx(styles$m.category, {
|
|
8813
|
+
[styles$m['is-active']]: isActive,
|
|
8806
8814
|
}), href: path, isDisabled: isActive, children: [jsx(StrokeCategoriesIcon, { height: 24, width: 24 }), jsx("span", { children: category.label })] }) }), category.data && (jsx(Categories, { categories: category.data, path: path }))] }, category.value));
|
|
8807
8815
|
});
|
|
8808
8816
|
}
|
|
8809
8817
|
|
|
8810
|
-
var styles$
|
|
8818
|
+
var styles$l = {"active-filter-item":"active-filters-module-Rrmhy","active-filter-value":"active-filters-module-CIuPU","clear-filter-button":"active-filters-module-Ud9kZ"};
|
|
8811
8819
|
|
|
8812
8820
|
const ActiveFilters = ({ onClearAllFilters, onClearFilter, selectedFilterCategories, }) => {
|
|
8813
8821
|
const t = useFormattedMessage();
|
|
8814
8822
|
if (selectedFilterCategories.length === 0)
|
|
8815
8823
|
return null;
|
|
8816
|
-
return (jsx(FilterSection, { button: jsx(RouteLink, { onClick: onClearAllFilters, children: jsx(FormattedMessage, { id: "Clear filters" }) }), title: t('Chosen filters'), variant: "with-action", children: selectedFilterCategories.map(category => category.filters.map(filter => (jsxs("div", { className: clsx(filterSectionStyles['filter-section-item'], styles$
|
|
8824
|
+
return (jsx(FilterSection, { button: jsx(RouteLink, { onClick: onClearAllFilters, children: jsx(FormattedMessage, { id: "Clear filters" }) }), title: t('Chosen filters'), variant: "with-action", children: selectedFilterCategories.map(category => category.filters.map(filter => (jsxs("div", { className: clsx(filterSectionStyles['filter-section-item'], styles$l['active-filter-item']), children: [jsxs("span", { children: [jsxs("span", { children: [jsx(FormattedMessage, { id: `facet.${category.label.toLowerCase()}` }), jsx("span", { children: ": " })] }), jsx("span", { className: styles$l['active-filter-value'], children: filter.label })] }), jsx(IconButton, { className: styles$l['clear-filter-button'], color: "secondary", onClick: () => onClearFilter(category.label, filter), children: jsx(StrokeCloseboxIcon, {}) })] }, `${category.label}-${filter.value}`)))) }));
|
|
8817
8825
|
};
|
|
8818
8826
|
|
|
8819
8827
|
function AlgoliaActiveFilters() {
|
|
@@ -8854,9 +8862,9 @@ function AlgoliaCategoriesFilters() {
|
|
|
8854
8862
|
const t = useFormattedMessage();
|
|
8855
8863
|
if (categories.length <= 0)
|
|
8856
8864
|
return null;
|
|
8857
|
-
return (jsx(FilterSection, { title: t('facet.categories'), variant: "default", children: categories.map(category => (jsx(Fragment$1, { children: jsx("div", { className: filterSectionStyles['filter-section-item'], children: jsxs(Link, { hasUnderline: true, className: clsx(styles$
|
|
8858
|
-
[styles$
|
|
8859
|
-
}), onClick: () => refine(category.value), children: [jsx(StrokeCategoriesIcon, { height: 24, width: 24 }), jsx("span", { children: category.label }), jsxs("span", { className: styles$
|
|
8865
|
+
return (jsx(FilterSection, { title: t('facet.categories'), variant: "default", children: categories.map(category => (jsx(Fragment$1, { children: jsx("div", { className: filterSectionStyles['filter-section-item'], children: jsxs(Link, { hasUnderline: true, className: clsx(styles$m.category, {
|
|
8866
|
+
[styles$m['is-active']]: category.isRefined,
|
|
8867
|
+
}), onClick: () => refine(category.value), children: [jsx(StrokeCategoriesIcon, { height: 24, width: 24 }), jsx("span", { children: category.label }), jsxs("span", { className: styles$m.count, children: ["(", category.count, ")"] })] }) }) }, category.value))) }));
|
|
8860
8868
|
}
|
|
8861
8869
|
|
|
8862
8870
|
function AlgoliaDummyRefinementListConsumer() {
|
|
@@ -8908,7 +8916,7 @@ const MULTISELECT_ATTRIBUTE_IGNORE_LIST = [
|
|
|
8908
8916
|
];
|
|
8909
8917
|
function PanelCloseButton() {
|
|
8910
8918
|
const { close } = useSidebarActions();
|
|
8911
|
-
return (jsx("div", { className: styles$
|
|
8919
|
+
return (jsx("div", { className: styles$m.button, children: jsxs(Button, { withArrow: true, onClick: close, size: "md", children: [jsx(FormattedMessage, { id: "Show" }), " ", jsx(AlgoliaResultsCount, {})] }) }));
|
|
8912
8920
|
}
|
|
8913
8921
|
function AlgoliaFilterPanel({ showActiveCategories = false, showCategoriesFilters = false, }) {
|
|
8914
8922
|
/*
|
|
@@ -8923,7 +8931,7 @@ function AlgoliaFilterPanel({ showActiveCategories = false, showCategoriesFilter
|
|
|
8923
8931
|
facets: ['*'],
|
|
8924
8932
|
maxValuesPerFacet: 100,
|
|
8925
8933
|
});
|
|
8926
|
-
return (jsx("div", { className: styles$
|
|
8934
|
+
return (jsx("div", { className: styles$m['filter-panel'], children: jsxs("div", { className: styles$m['scroll-container'], children: [showActiveCategories && jsx(AlgoliaActiveCategories, {}), showCategoriesFilters && jsx(AlgoliaCategoriesFilters, {}), jsx(AlgoliaActiveFilters, {}), attributesToRender.length === 0 ? (jsx(AlgoliaDummyRefinementListConsumer, {})) : (jsx("section", { children: attributesToRender
|
|
8927
8935
|
.filter(attribute => !MULTISELECT_ATTRIBUTE_IGNORE_LIST.includes(attribute))
|
|
8928
8936
|
.map((attribute, index) => {
|
|
8929
8937
|
return (jsx(AlgoliaMultiSelectFilterSection, { attribute: attribute }, `attribute-${index}`));
|
|
@@ -8934,10 +8942,10 @@ function GlyphsChevronsSlimRightIcon(props) {
|
|
|
8934
8942
|
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", ...props, fill: "currentColor", height: "12", viewBox: "0 0 12 12", width: "12", children: jsx("path", { d: "M9,6 L4.06645029,1 C3.87890406,1.08169007 3.69487412,1.19817561 3.51436046,1.34945663 C3.3338468,1.50073764 3.16239331,1.68216803 3,1.89374779 L7.08347812,5.98800959 L3,9.9960307 C3.16649238,10.2121071 3.33794587,10.4031847 3.51436046,10.5692635 C3.69077505,10.7353424 3.87480499,10.8789212 4.06645029,11 L9,6 Z", fillRule: "evenodd" }) }));
|
|
8935
8943
|
}
|
|
8936
8944
|
|
|
8937
|
-
var styles$
|
|
8945
|
+
var styles$k = {"pagination":"pagination-module-k4OgY","page-number-container":"pagination-module-oq89A"};
|
|
8938
8946
|
|
|
8939
8947
|
function Pagination({ currentPage, onChange, totalPages, }) {
|
|
8940
|
-
return (jsxs("div", { className: styles$
|
|
8948
|
+
return (jsxs("div", { className: styles$k.pagination, children: [jsx(IconButton, { isDisabled: currentPage === 1, onClick: () => onChange(currentPage - 1), children: jsx(GlyphsChevronsSlimLeftIcon, {}) }), jsxs("div", { className: styles$k['page-number-container'], children: [jsx(NumberField, { autoGrow: true, label: "current-page", maxValue: totalPages, minValue: 1, onChange: onChange, value: currentPage }), jsx(FormattedMessage, { id: "of" }), jsx("div", { children: totalPages })] }), jsx(IconButton, { isDisabled: currentPage >= totalPages, onClick: () => onChange(currentPage + 1), children: jsx(GlyphsChevronsSlimRightIcon, {}) })] }));
|
|
8941
8949
|
}
|
|
8942
8950
|
|
|
8943
8951
|
function AlgoliaPagination({ onChange }) {
|
|
@@ -9318,20 +9326,20 @@ function AlgoliaSortBy() {
|
|
|
9318
9326
|
return (jsx(Select, { label: t('Sort by'), onChange: value => refine(String(value)), options: options, selectedOption: currentRefinement, showLabel: false, size: "sm" }));
|
|
9319
9327
|
}
|
|
9320
9328
|
|
|
9321
|
-
var styles$
|
|
9329
|
+
var styles$j = {"promo-banner":"promo-banner-module-yuVEO","sm":"promo-banner-module-ut8Kd","lg":"promo-banner-module-CSkIw"};
|
|
9322
9330
|
|
|
9323
9331
|
function PromoBanner({ href, image, variant }) {
|
|
9324
|
-
return (jsx(RouteLink, { className: clsx(styles$
|
|
9332
|
+
return (jsx(RouteLink, { className: clsx(styles$j['promo-banner'], styles$j[variant]), href: href, tabIndex: 0, children: jsx(Image, { fit: "cover", image: image, title: image.altText }) }));
|
|
9325
9333
|
}
|
|
9326
9334
|
|
|
9327
|
-
var styles$
|
|
9335
|
+
var styles$i = {"promos":"promo-banners-module-uVyxh"};
|
|
9328
9336
|
|
|
9329
9337
|
function PromoBanners({ promoBannersData = [] }) {
|
|
9330
9338
|
const { lg } = useBreakpoint();
|
|
9331
9339
|
const promoBanners = promoBannersData.map((promoBanner, index) => (jsx(PromoBanner, { href: promoBanner.href, image: promoBanner.image, variant: index % 2 === 0 ? 'lg' : 'sm' }, `promo-banner-${index}`)));
|
|
9332
9340
|
if (promoBannersData.length === 0)
|
|
9333
9341
|
return null;
|
|
9334
|
-
return (jsx("div", { className: styles$
|
|
9342
|
+
return (jsx("div", { className: styles$i.promos, children: lg ? (jsx(Fragment, { children: promoBanners })) : (jsx(Carousel, { hasNavigation: false, hasOverflow: false, slides: promoBanners, spaceBetween: 16 })) }));
|
|
9335
9343
|
}
|
|
9336
9344
|
|
|
9337
9345
|
function useFetchProductListingPageData({ languageCode, pageUrl, }) {
|
|
@@ -9389,17 +9397,17 @@ const scrollToTop = (scrollOptions) => {
|
|
|
9389
9397
|
});
|
|
9390
9398
|
};
|
|
9391
9399
|
|
|
9392
|
-
var styles$
|
|
9400
|
+
var styles$h = {"sidebar":"sidebar-module-fSa9Q","is-docked":"sidebar-module-AIq0M","transition":"sidebar-module-LEZgg","is-open":"sidebar-module-lV7wp","is-closed":"sidebar-module-dGDrr","close":"sidebar-module-2puGC","is-not-docked":"sidebar-module-Scw7D"};
|
|
9393
9401
|
|
|
9394
9402
|
function InnerSidebar({ children }) {
|
|
9395
9403
|
const { isDocked, isOpen, toggle, transition } = useSidebar();
|
|
9396
|
-
return (jsxs("aside", { className: clsx(styles$
|
|
9397
|
-
[styles$
|
|
9398
|
-
[styles$
|
|
9399
|
-
[styles$
|
|
9400
|
-
[styles$
|
|
9401
|
-
[styles$
|
|
9402
|
-
}), children: [jsx("div", { className: styles$
|
|
9404
|
+
return (jsxs("aside", { className: clsx(styles$h.sidebar, {
|
|
9405
|
+
[styles$h['transition']]: transition,
|
|
9406
|
+
[styles$h['is-open']]: isOpen,
|
|
9407
|
+
[styles$h['is-closed']]: !isOpen,
|
|
9408
|
+
[styles$h['is-docked']]: isDocked,
|
|
9409
|
+
[styles$h['is-not-docked']]: !isDocked,
|
|
9410
|
+
}), children: [jsx("div", { className: styles$h.close, children: jsx(IconButton, { color: "secondary", onClick: toggle, children: jsx(StrokeCloseboxIcon, {}) }) }), children] }));
|
|
9403
9411
|
}
|
|
9404
9412
|
function Sidebar({ children }) {
|
|
9405
9413
|
return jsx(InnerSidebar, { children: children });
|
|
@@ -9414,19 +9422,19 @@ const ToggleSidebarButton = () => {
|
|
|
9414
9422
|
return (jsx(Button, { color: "secondary", icon: jsx(StrokeFilterIcon, {}), onClick: toggle, size: "sm", variant: "outline", children: isOpen ? (jsx(FormattedMessage, { id: "Hide filters" })) : (jsx(FormattedMessage, { id: "Show filters" })) }));
|
|
9415
9423
|
};
|
|
9416
9424
|
|
|
9417
|
-
var styles$
|
|
9425
|
+
var styles$g = {"no-results":"no-results-module-T1cti","title":"no-results-module-mZ8TQ","body":"no-results-module-FQGhC","buttons":"no-results-module-QGZsD"};
|
|
9418
9426
|
|
|
9419
9427
|
function NoResults$1({ content, title }) {
|
|
9420
9428
|
const { lg } = useBreakpoint();
|
|
9421
|
-
return (jsxs("div", { className: styles$
|
|
9429
|
+
return (jsxs("div", { className: styles$g['no-results'], children: [jsx(Heading, { bold: false, className: styles$g.title, size: lg ? 's' : 'xs', tag: "h2", children: title }), jsx("p", { className: styles$g.body, children: content }), jsx("div", { className: styles$g.buttons, children: jsx(RouteButton, { withArrow: true, href: `${config.SHOP_API_URL}`, size: "md", children: jsx(FormattedMessage, { id: "Continue shopping" }) }) })] }));
|
|
9422
9430
|
}
|
|
9423
9431
|
|
|
9424
|
-
var styles$
|
|
9432
|
+
var styles$f = {"category-card":"category-card-module-4NUjH","title":"category-card-module-LEhh3","arrow":"category-card-module-hL4-A","image":"category-card-module-RxWMW","is-selected":"category-card-module-vJ7vB","image-container":"category-card-module-oNTrK"};
|
|
9425
9433
|
|
|
9426
9434
|
function CategoryCard({ className, href, image, isSelected = false, onClick, title, withArrow = false, }) {
|
|
9427
9435
|
return (jsxs(RouteLink, { className: clsx({
|
|
9428
|
-
[styles$
|
|
9429
|
-
}, styles$
|
|
9436
|
+
[styles$f['is-selected']]: isSelected,
|
|
9437
|
+
}, styles$f['category-card'], className), href: href, onClick: onClick, children: [jsx("div", { className: styles$f['image-container'], children: jsx(Image, { className: styles$f.image, ...image, fit: "contain" }) }), jsxs("p", { className: styles$f.title, children: [jsx("span", { children: title }), withArrow && jsx(GlyphsArrowBoldCapsRightIcon, { className: styles$f.arrow })] })] }));
|
|
9430
9438
|
}
|
|
9431
9439
|
|
|
9432
9440
|
function transformAlgoliaCategoryData(categories) {
|
|
@@ -9473,6 +9481,20 @@ function ProductListingPageProvider({ children, data, error, isError, isLoading,
|
|
|
9473
9481
|
return (jsx(ProductListingPageContext.Provider, { value: { data, error, isError, isLoading }, children: children }));
|
|
9474
9482
|
}
|
|
9475
9483
|
|
|
9484
|
+
/**
|
|
9485
|
+
* Create UUID according to
|
|
9486
|
+
* https://www.ietf.org/rfc/rfc4122.txt.
|
|
9487
|
+
*
|
|
9488
|
+
* @returns Generated UUID.
|
|
9489
|
+
*/
|
|
9490
|
+
function createUUID() {
|
|
9491
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|
|
9492
|
+
const r = (Math.random() * 16) | 0;
|
|
9493
|
+
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
9494
|
+
return v.toString(16);
|
|
9495
|
+
});
|
|
9496
|
+
}
|
|
9497
|
+
|
|
9476
9498
|
let userToken = generateUserToken();
|
|
9477
9499
|
aa('init', {
|
|
9478
9500
|
apiKey: config.ALGOLIA_API_KEY,
|
|
@@ -9488,19 +9510,6 @@ aa('getUserToken', {}, (err, value) => {
|
|
|
9488
9510
|
aa('onUserTokenChange', value => {
|
|
9489
9511
|
userToken = value !== undefined ? String(value) : generateUserToken();
|
|
9490
9512
|
});
|
|
9491
|
-
/**
|
|
9492
|
-
* Create UUID according to
|
|
9493
|
-
* https://www.ietf.org/rfc/rfc4122.txt.
|
|
9494
|
-
*
|
|
9495
|
-
* @returns Generated UUID.
|
|
9496
|
-
*/
|
|
9497
|
-
function createUUID() {
|
|
9498
|
-
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
|
|
9499
|
-
const r = (Math.random() * 16) | 0;
|
|
9500
|
-
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
9501
|
-
return v.toString(16);
|
|
9502
|
-
});
|
|
9503
|
-
}
|
|
9504
9513
|
function generateUserToken() {
|
|
9505
9514
|
return `anonymous-${createUUID()}`;
|
|
9506
9515
|
}
|
|
@@ -9672,10 +9681,10 @@ function useAlgoliaInsights() {
|
|
|
9672
9681
|
sendEvents: Parameters<ReturnType<typeof makeSendEvents>>;
|
|
9673
9682
|
*/
|
|
9674
9683
|
|
|
9675
|
-
var styles$
|
|
9684
|
+
var styles$e = {"promo-card-container":"promo-card-module-idY1g","promo-card":"promo-card-module-e2oii","image":"promo-card-module-jr9sn"};
|
|
9676
9685
|
|
|
9677
9686
|
function PromoCard({ href, image, onClick }) {
|
|
9678
|
-
return (jsx("div", { className: styles$
|
|
9687
|
+
return (jsx("div", { className: styles$e['promo-card-container'], children: jsx(RouteLink, { className: styles$e['promo-card'], href: href, onClick: onClick, children: jsx(Image, { className: styles$e.image, fit: "cover", image: image, title: image.altText }) }) }));
|
|
9679
9688
|
}
|
|
9680
9689
|
|
|
9681
9690
|
function ProductHitCard$2({ hit }) {
|
|
@@ -9703,7 +9712,7 @@ function ProductListingProductOverview() {
|
|
|
9703
9712
|
return (jsx(ProductOverviewGrid, { isLoading: isLoading, children: hits.map(hit => isProductHit(hit) ? (jsx(ProductHitCard$2, { hit: hit }, hit.id)) : (jsx(PromoCard, { href: hit.href, image: hit.image }, hit.id))) }));
|
|
9704
9713
|
}
|
|
9705
9714
|
|
|
9706
|
-
var styles$
|
|
9715
|
+
var styles$d = {"product-listing":"product-listing-page-module-dmIHF","header":"product-listing-page-module-Oz76Z","promos":"product-listing-page-module-iY1yj","action-bar":"product-listing-page-module-XxGrr","sidebar-toggle":"product-listing-page-module-F7bxy","sort":"product-listing-page-module-aQzHr","count":"product-listing-page-module-zx79v","categories":"product-listing-page-module-R4aOl","product-grid-container":"product-listing-page-module-ICkKg","product-grid":"product-listing-page-module-LHE7z","pagination":"product-listing-page-module-xsRaj"};
|
|
9707
9716
|
|
|
9708
9717
|
const defaultSearchClient = createSonicSearchClient({
|
|
9709
9718
|
apiKey: config.ALGOLIA_API_KEY,
|
|
@@ -9721,7 +9730,7 @@ function ProductListingPage({ pageUrl, searchClient = defaultSearchClient, }) {
|
|
|
9721
9730
|
if (!data || isFetching)
|
|
9722
9731
|
return jsx(LoadingPage, {});
|
|
9723
9732
|
const category = data.breadCrumb.slice(1).map(breadCrumb => breadCrumb.label);
|
|
9724
|
-
return (jsx(ProductListingPageProvider, { data: data, error: error, isError: isError, isLoading: isFetching, children: jsx(AlgoliaProvider, { categoryPages: data.categoryPages, hierarchicalCategories: data.hierarchicalCategories, languageCode: languageCode, offlineSearchClient: offlineSearchClient, searchClient: searchClient, children: jsx(Page, { breadCrumb: data.breadCrumb, className: styles$
|
|
9733
|
+
return (jsx(ProductListingPageProvider, { data: data, error: error, isError: isError, isLoading: isFetching, children: jsx(AlgoliaProvider, { categoryPages: data.categoryPages, hierarchicalCategories: data.hierarchicalCategories, languageCode: languageCode, offlineSearchClient: offlineSearchClient, searchClient: searchClient, children: jsx(Page, { breadCrumb: data.breadCrumb, className: styles$d['product-listing'], title: category.slice().pop(), children: jsx(ProductListingPageContent, { currentCategoryPath: data.hierarchicalCategories, promoBanners: data.promoBanners?.top }) }) }, data.categoryPages) }));
|
|
9725
9734
|
}
|
|
9726
9735
|
function ProductListingPageContent({ currentCategoryPath, promoBanners, }) {
|
|
9727
9736
|
const { hits, isLoading } = useAlgoliaHits();
|
|
@@ -9729,7 +9738,7 @@ function ProductListingPageContent({ currentCategoryPath, promoBanners, }) {
|
|
|
9729
9738
|
const t = useFormattedMessage();
|
|
9730
9739
|
return (jsxs(Fragment, { children: [isLoading !== false && !hasHits && jsx(LoadingPage, {}), isLoading === false && !hasHits && (jsx(NoResults$1, { content: jsxs("p", { children: [jsx(FormattedMessage, { id: "You could try exploring our products by category" }), ' ', jsx("br", {}), jsx(FormattedMessage, { id: "Try 'Search' and try to find the product you're looking for" })] }), title: t('Sorry, there are no products found') })), jsxs("div", { style: {
|
|
9731
9740
|
display: !hasHits ? 'none' : undefined,
|
|
9732
|
-
}, children: [promoBanners?.length && (jsx("section", { className: styles$
|
|
9741
|
+
}, children: [promoBanners?.length && (jsx("section", { className: styles$d.promos, children: jsx(PromoBanners, { promoBannersData: promoBanners }) })), jsx("section", { className: styles$d.categories, children: jsx(ProductListingPageCategoryCarousel, { currentCategoryPath: currentCategoryPath }) }), jsxs("section", { className: styles$d['action-bar'], children: [jsx("div", { className: styles$d['sidebar-toggle'], children: jsx(ToggleSidebarButton, {}) }), jsx("span", { className: styles$d.count, children: jsx(AlgoliaResultsCount, {}) }), jsx("div", { className: styles$d.sort, children: jsx(AlgoliaSortBy, {}) })] }), jsx("section", { children: jsxs("div", { className: styles$d['product-grid-container'], children: [jsx(Sidebar, { children: jsx(AlgoliaFilterPanel, { showActiveCategories: true }) }), jsxs("div", { className: styles$d['product-grid'], children: [jsx(ProductListingProductOverview, {}), jsx("div", { className: styles$d.pagination, children: jsx(AlgoliaPagination, { onChange: () => {
|
|
9733
9742
|
setTimeout(() => {
|
|
9734
9743
|
scrollToTop();
|
|
9735
9744
|
}, 100);
|
|
@@ -9777,7 +9786,7 @@ function SearchResultsPageCategoryCarousel() {
|
|
|
9777
9786
|
}, title: category.name }, index))) }));
|
|
9778
9787
|
}
|
|
9779
9788
|
|
|
9780
|
-
var styles$
|
|
9789
|
+
var styles$c = {"search-results":"search-results-page-module-M7SIu","header":"search-results-page-module-DpNT-","action-bar":"search-results-page-module-RJoMk","sidebar-toggle":"search-results-page-module-SzLQb","sort":"search-results-page-module-cgonp","count":"search-results-page-module-hunZp","categories":"search-results-page-module-n2lSj","product-grid-container":"search-results-page-module-TK-iE","product-grid":"search-results-page-module-HWUnk","pagination":"search-results-page-module-SZYiA"};
|
|
9781
9790
|
|
|
9782
9791
|
function SearchResultsPage({ location, searchClient, }) {
|
|
9783
9792
|
const languageCode = useLanguageCode();
|
|
@@ -9786,7 +9795,7 @@ function SearchResultsPage({ location, searchClient, }) {
|
|
|
9786
9795
|
const keyword = Array.isArray(keywords) ? keywords.join(' ') : keywords;
|
|
9787
9796
|
if (!keyword)
|
|
9788
9797
|
return jsx("h1", { children: "No search results...." });
|
|
9789
|
-
return (jsx(AlgoliaProvider, { languageCode: languageCode, query: keyword, searchClient: searchClient, children: jsx(Page, { breadCrumb: [], className: styles$
|
|
9798
|
+
return (jsx(AlgoliaProvider, { languageCode: languageCode, query: keyword, searchClient: searchClient, children: jsx(Page, { breadCrumb: [], className: styles$c['search-results'], title: t("'{0}' in all products", {
|
|
9790
9799
|
replacementValues: { 0: keyword },
|
|
9791
9800
|
}), children: jsx(SearchResultsPageContent, { keyword: keyword }) }) }));
|
|
9792
9801
|
}
|
|
@@ -9798,14 +9807,14 @@ function SearchResultsPageContent({ keyword }) {
|
|
|
9798
9807
|
replacementValues: { 0: keyword },
|
|
9799
9808
|
}) })), jsxs("div", { style: {
|
|
9800
9809
|
display: !hasHits ? 'none' : undefined,
|
|
9801
|
-
}, children: [jsx("section", { className: styles$
|
|
9810
|
+
}, children: [jsx("section", { className: styles$c.categories, children: jsx(SearchResultsPageCategoryCarousel, {}) }), jsxs("section", { className: styles$c['action-bar'], children: [jsx("div", { className: styles$c['sidebar-toggle'], children: jsx(ToggleSidebarButton, {}) }), jsx("span", { className: styles$c.count, children: jsx(AlgoliaResultsCount, {}) }), jsx("div", { className: styles$c.sort, children: jsx(AlgoliaSortBy, {}) })] }), jsx("section", { children: jsxs("div", { className: styles$c['product-grid-container'], children: [jsx(Sidebar, { children: jsx(AlgoliaFilterPanel, { showCategoriesFilters: true }) }), jsxs("div", { className: styles$c['product-grid'], children: [jsx(SearchResultProductOverview, {}), jsx("div", { className: styles$c.pagination, children: jsx(AlgoliaPagination, { onChange: () => {
|
|
9802
9811
|
setTimeout(() => {
|
|
9803
9812
|
scrollToTop();
|
|
9804
9813
|
}, 100);
|
|
9805
9814
|
} }) })] })] }) })] })] }));
|
|
9806
9815
|
}
|
|
9807
9816
|
|
|
9808
|
-
var styles$
|
|
9817
|
+
var styles$b = {"background-overlay":"background-overlay-module-mGiNQ","open":"background-overlay-module-5Uxcl","close":"background-overlay-module-GRInQ"};
|
|
9809
9818
|
|
|
9810
9819
|
function BackgroundOverlay({ className, isOpen, onClick, }) {
|
|
9811
9820
|
const [, setRender] = useState(isOpen);
|
|
@@ -9826,13 +9835,13 @@ function BackgroundOverlay({ className, isOpen, onClick, }) {
|
|
|
9826
9835
|
}, [isOpen]);
|
|
9827
9836
|
if (typeof window === 'undefined')
|
|
9828
9837
|
return null;
|
|
9829
|
-
return ReactDOM.createPortal(jsx("div", { ref: nodeRef, className: clsx(styles$
|
|
9830
|
-
[styles$
|
|
9831
|
-
[styles$
|
|
9838
|
+
return ReactDOM.createPortal(jsx("div", { ref: nodeRef, className: clsx(styles$b['background-overlay'], {
|
|
9839
|
+
[styles$b['open']]: isOpen,
|
|
9840
|
+
[styles$b['close']]: !isOpen,
|
|
9832
9841
|
}, className), onClick: onClick }), document.body);
|
|
9833
9842
|
}
|
|
9834
9843
|
|
|
9835
|
-
var styles$
|
|
9844
|
+
var styles$a = {"sidebar-container":"sidebar-provider-module-rjeCL","transition":"sidebar-provider-module-C0cKR"};
|
|
9836
9845
|
|
|
9837
9846
|
function SidebarDetectBreakpoint() {
|
|
9838
9847
|
const xxl = useIsBreakpoint('xxl');
|
|
@@ -9862,13 +9871,52 @@ function SidebarDetectBreakpoint() {
|
|
|
9862
9871
|
function SidebarProvider({ children }) {
|
|
9863
9872
|
const state = useSidebar();
|
|
9864
9873
|
const { close, isDocked, isOpen, transition } = state;
|
|
9865
|
-
return (jsxs("div", { className: clsx(styles$
|
|
9866
|
-
[styles$
|
|
9867
|
-
[styles$
|
|
9868
|
-
[styles$
|
|
9874
|
+
return (jsxs("div", { className: clsx(styles$a['sidebar-container'], {
|
|
9875
|
+
[styles$a['transition']]: transition,
|
|
9876
|
+
[styles$a['docked']]: isDocked,
|
|
9877
|
+
[styles$a['open']]: isOpen,
|
|
9869
9878
|
}), children: [jsx(SidebarDetectBreakpoint, {}), children, isDocked && isOpen && (jsx(BackgroundOverlay, { isOpen: isOpen, onClick: close }))] }));
|
|
9870
9879
|
}
|
|
9871
9880
|
|
|
9881
|
+
var styles$9 = {"container":"toast-provider-module-EoPKW","toast":"toast-provider-module-SeZ02","body":"toast-provider-module-BdbPL"};
|
|
9882
|
+
|
|
9883
|
+
function ToastProvider(props) {
|
|
9884
|
+
return (jsx(ToastContainer, { autoClose: 3000, bodyClassName: styles$9.body, className: styles$9.container, closeButton: false, hideProgressBar: true, newestOnTop: true, toastClassName: styles$9.toast, transition: Slide, ...props }));
|
|
9885
|
+
}
|
|
9886
|
+
|
|
9887
|
+
var styles$8 = {"toast":"toast-module-VzLw4","close":"toast-module-mAwpu","icon":"toast-module-JqNiT","success":"toast-module-cuSIT","info":"toast-module-ABLCP","warning":"toast-module-jGWiH","danger":"toast-module-t33Ra"};
|
|
9888
|
+
|
|
9889
|
+
const icons = {
|
|
9890
|
+
danger: jsx(SolidAttentionIcon, {}),
|
|
9891
|
+
info: jsx(SolidInformationIcon, {}),
|
|
9892
|
+
success: jsx(SolidOkayIcon, {}),
|
|
9893
|
+
warning: jsx(SolidNoticeIcon, {}),
|
|
9894
|
+
};
|
|
9895
|
+
const Toast = forwardRef(({ className, id, onClose, toastMessage: { body, isUserDismissable, messageType = 'info' }, }, ref) => {
|
|
9896
|
+
return (jsxs("div", { ref: ref, className: clsx(styles$8.toast, styles$8[messageType], className), children: [jsx("span", { className: styles$8.icon, children: icons[messageType] }), body, isUserDismissable && (jsx(IconButton, { className: styles$8.close, color: "secondary", onClick: () => onClose?.(id), children: jsx(StrokeCloseboxIcon, {}) }))] }));
|
|
9897
|
+
});
|
|
9898
|
+
Toast.displayName = 'Toast';
|
|
9899
|
+
|
|
9900
|
+
function useToast() {
|
|
9901
|
+
const [toastCount, setToastCount] = useState(0);
|
|
9902
|
+
const targetRef = useRef(null);
|
|
9903
|
+
useEffect(() => {
|
|
9904
|
+
if (targetRef.current) {
|
|
9905
|
+
targetRef.current.style.zIndex = toastCount.toString();
|
|
9906
|
+
}
|
|
9907
|
+
}, [toastCount]);
|
|
9908
|
+
return {
|
|
9909
|
+
addToast(toastMessage, toastOptions) {
|
|
9910
|
+
setToastCount(toastCount => toastCount + 1);
|
|
9911
|
+
const id = createUUID();
|
|
9912
|
+
toast(jsx(Toast, { ref: targetRef, id: id, onClose: id => toast.dismiss(id), toastMessage: toastMessage }), {
|
|
9913
|
+
toastId: id,
|
|
9914
|
+
...toastOptions,
|
|
9915
|
+
});
|
|
9916
|
+
},
|
|
9917
|
+
};
|
|
9918
|
+
}
|
|
9919
|
+
|
|
9872
9920
|
const categoriesPlugin = ({ productsIndexName, searchClient, }) => {
|
|
9873
9921
|
return {
|
|
9874
9922
|
getSources() {
|
|
@@ -10464,4 +10512,4 @@ console.log(`@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
|
10464
10512
|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
10465
10513
|
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@`);
|
|
10466
10514
|
|
|
10467
|
-
export { Accordion, AddToCartButton, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, AnnouncementProvider, AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, BadgeStyleValues, BadgeTypeValues, Breadcrumb, Button, CartProvider, CategoryCarousel, Checkbox, ColorCheckbox, ConnectedAddToCartButton, CountrySelector, CurrencyPositioningType, FavoriteButton, FavoriteProvider, FilterSection, ForbiddenRequestError, FormattedMessage, GlobalSearch, GlobalSearchDisclosureContext, GlobalSearchProvider, GlobalStateProvider, GlobalStateProviderContext, IconButton, Image, InternalServerErrorRequest, IntlProvider, Link, LoadingOverlay, MultiSelect, NotFoundRequestError, NumberField, Page, PageContainer, ProductCard, ProductDetailsPage, ProductListingPage, ProductOverviewGrid, ProductPrice, ProductSku, ProgressCircle, ReactQueryContainer, RequestError, RouteButton, RouteLink, RouteProvider, SearchResultsPage, SearchRoot, Select, ShowAll, Sidebar, SidebarDetectBreakpoint, SidebarProvider, TextField, TimeoutRequestError, UnauthorizedRequestError, UnprocessableContentRequestError, VariantDisplayTypeValues, WishListNameAlreadyExistsError, addProductToCurrentCart, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isProductHit, isRequestError, request, signIn, signOut, transformAlgoliaProductHitToProductHit, transformAlgoliaPromoHitToPromoHit, updateCartLineById, useAddProductToCurrentCart, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useOnNavigate, useScrollLock, useSession, useSignIn, useSignOut, useUpdateCartLineById, userToken };
|
|
10515
|
+
export { Accordion, AddToCartButton, AlgoliaActiveCategories, AlgoliaCategoriesFilters, AlgoliaFilterPanel, AlgoliaInsightsProvider, AlgoliaInsightsProviderContext, AlgoliaMultiSelectFilterSection, AlgoliaPagination, AlgoliaProvider, AlgoliaResultsCount, AlgoliaSortBy, AnnouncementProvider, AvailabilityMessageType, BadRequestError, BadgeImagePlacementValues, BadgeStyleValues, BadgeTypeValues, Breadcrumb, Button, CartProvider, CategoryCarousel, Checkbox, ColorCheckbox, ConnectedAddToCartButton, CountrySelector, CurrencyPositioningType, FavoriteButton, FavoriteProvider, FilterSection, ForbiddenRequestError, FormattedMessage, GlobalSearch, GlobalSearchDisclosureContext, GlobalSearchProvider, GlobalStateProvider, GlobalStateProviderContext, IconButton, Image, InternalServerErrorRequest, IntlProvider, Link, LoadingOverlay, MultiSelect, NotFoundRequestError, NumberField, Page, PageContainer, ProductCard, ProductDetailsPage, ProductListingPage, ProductOverviewGrid, ProductPrice, ProductSku, ProgressCircle, ReactQueryContainer, RequestError, RouteButton, RouteLink, RouteProvider, SearchResultsPage, SearchRoot, Select, ShowAll, Sidebar, SidebarDetectBreakpoint, SidebarProvider, TextField, TimeoutRequestError, ToastProvider, UnauthorizedRequestError, UnprocessableContentRequestError, VariantDisplayTypeValues, WishListNameAlreadyExistsError, addProductToCurrentCart, addWishListItemToWishList, config, configPerEnvironment, createSession, createSonicSearchClient, createWishList, deleteCartLineById, deleteWishList, deleteWishListItemFromWishList, environment, environments, fetchCurrentCartLines, fetchTranslations, getSession, getWishList, getWishListItemsByWishListId, getWishLists, isProductHit, isRequestError, request, signIn, signOut, transformAlgoliaProductHitToProductHit, transformAlgoliaPromoHitToPromoHit, updateCartLineById, useAddProductToCurrentCart, useAddWishListItemToCurrentWishList, useAddWishListItemToWishList, useAlgolia, useAlgoliaInsights, useAlgoliaSearch, useBreakpoint, useCartEvents, useCreateWishList, useDebouncedCallback, useDeleteCartLineById, useDeleteWishListItemFromWishList, useDisclosure, useFavorite, useFavoriteProduct, useFeatureFlags, useFetchAllWishListsItems, useFetchCurrentCartLines, useFetchTranslations, useFetchWishLists, useFormattedMessage, useGlobalSearchDisclosure, useGlobalState, useIsAuthenticated, useIsBreakpoint, useNavigate, useOnNavigate, useScrollLock, useSession, useSignIn, useSignOut, useToast, useUpdateCartLineById, userToken };
|