@nok-integration/storefront-react 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +79 -0
- package/dist/index.mjs +867 -477
- package/dist/standalone/storefront.mjs +867 -477
- package/dist/standalone/styles.css +349 -0
- package/dist/styles.css +349 -0
- package/package.json +1 -1
|
@@ -4830,7 +4830,18 @@ function requireOrderTracking() {
|
|
|
4830
4830
|
total: money_1.Money,
|
|
4831
4831
|
item_count: zod_1.z.number().int().nonnegative(),
|
|
4832
4832
|
/** First line's thumbnail, for the list row. Absent = render the placeholder. */
|
|
4833
|
-
image: common_1.Url.optional()
|
|
4833
|
+
image: common_1.Url.optional(),
|
|
4834
|
+
/**
|
|
4835
|
+
* Up to three line thumbnails, in line order, for the row's image strip.
|
|
4836
|
+
*
|
|
4837
|
+
* `image` is the first of these and stays for consumers already reading it. Capped at
|
|
4838
|
+
* three because that is what the row draws: an order of twenty lines must not put twenty
|
|
4839
|
+
* URLs on a list response, and the count the fan needs is already in `item_count`.
|
|
4840
|
+
*
|
|
4841
|
+
* Fewer than three entries is normal — an order can have one line, and a de-listed SKU
|
|
4842
|
+
* resolves to no image at all. A consumer renders what it is given and never pads.
|
|
4843
|
+
*/
|
|
4844
|
+
images: zod_1.z.array(common_1.Url).max(3).optional()
|
|
4834
4845
|
});
|
|
4835
4846
|
exports.OrderList = zod_1.z.object({
|
|
4836
4847
|
orders: zod_1.z.array(exports.OrderSummaryItem)
|
|
@@ -5355,20 +5366,20 @@ function ShopImage({
|
|
|
5355
5366
|
}
|
|
5356
5367
|
);
|
|
5357
5368
|
}
|
|
5358
|
-
const badge$
|
|
5369
|
+
const badge$4 = "_badge_1bagf_1";
|
|
5359
5370
|
const neutral$1 = "_neutral_1bagf_12";
|
|
5360
5371
|
const success$1 = "_success_1bagf_17";
|
|
5361
5372
|
const critical$1 = "_critical_1bagf_22";
|
|
5362
5373
|
const promo = "_promo_1bagf_27";
|
|
5363
|
-
const styles$
|
|
5364
|
-
badge: badge$
|
|
5374
|
+
const styles$H = {
|
|
5375
|
+
badge: badge$4,
|
|
5365
5376
|
neutral: neutral$1,
|
|
5366
5377
|
success: success$1,
|
|
5367
5378
|
critical: critical$1,
|
|
5368
5379
|
promo
|
|
5369
5380
|
};
|
|
5370
5381
|
function Badge({ tone = "neutral", children }) {
|
|
5371
|
-
return /* @__PURE__ */ jsx("span", { className: [styles$
|
|
5382
|
+
return /* @__PURE__ */ jsx("span", { className: [styles$H.badge, styles$H[tone]].join(" "), children });
|
|
5372
5383
|
}
|
|
5373
5384
|
const button$1 = "_button_vvcmd_1";
|
|
5374
5385
|
const fullWidth = "_fullWidth_vvcmd_23";
|
|
@@ -5378,7 +5389,7 @@ const ghost = "_ghost_vvcmd_38";
|
|
|
5378
5389
|
const spinner = "_spinner_vvcmd_54";
|
|
5379
5390
|
const spin = "_spin_vvcmd_54";
|
|
5380
5391
|
const labelLoading = "_labelLoading_vvcmd_63";
|
|
5381
|
-
const styles$
|
|
5392
|
+
const styles$G = {
|
|
5382
5393
|
button: button$1,
|
|
5383
5394
|
fullWidth,
|
|
5384
5395
|
primary,
|
|
@@ -5405,23 +5416,23 @@ const Button = forwardRef(function Button2({
|
|
|
5405
5416
|
ref,
|
|
5406
5417
|
type,
|
|
5407
5418
|
className: [
|
|
5408
|
-
styles$
|
|
5409
|
-
styles$
|
|
5410
|
-
fullWidth2 ? styles$
|
|
5419
|
+
styles$G.button,
|
|
5420
|
+
styles$G[variant],
|
|
5421
|
+
fullWidth2 ? styles$G.fullWidth : "",
|
|
5411
5422
|
className ?? ""
|
|
5412
5423
|
].filter(Boolean).join(" "),
|
|
5413
5424
|
disabled: isDisabled,
|
|
5414
5425
|
"aria-busy": loading || void 0,
|
|
5415
5426
|
...rest,
|
|
5416
5427
|
children: [
|
|
5417
|
-
loading && /* @__PURE__ */ jsx("span", { className: styles$
|
|
5418
|
-
/* @__PURE__ */ jsx("span", { className: loading ? styles$
|
|
5428
|
+
loading && /* @__PURE__ */ jsx("span", { className: styles$G.spinner, "aria-hidden": "true" }),
|
|
5429
|
+
/* @__PURE__ */ jsx("span", { className: loading ? styles$G.labelLoading : void 0, children })
|
|
5419
5430
|
]
|
|
5420
5431
|
}
|
|
5421
5432
|
);
|
|
5422
5433
|
});
|
|
5423
5434
|
const skeleton = "_skeleton_1nxz7_1";
|
|
5424
|
-
const styles$
|
|
5435
|
+
const styles$F = {
|
|
5425
5436
|
skeleton
|
|
5426
5437
|
};
|
|
5427
5438
|
function Skeleton({ width, height, radius, className, circle }) {
|
|
@@ -5434,14 +5445,14 @@ function Skeleton({ width, height, radius, className, circle }) {
|
|
|
5434
5445
|
"span",
|
|
5435
5446
|
{
|
|
5436
5447
|
"aria-hidden": "true",
|
|
5437
|
-
className: [styles$
|
|
5448
|
+
className: [styles$F.skeleton, className ?? ""].filter(Boolean).join(" "),
|
|
5438
5449
|
style
|
|
5439
5450
|
}
|
|
5440
5451
|
);
|
|
5441
5452
|
}
|
|
5442
5453
|
const surface$1 = "_surface_nj74o_10";
|
|
5443
5454
|
const fill = "_fill_nj74o_35";
|
|
5444
|
-
const styles$
|
|
5455
|
+
const styles$E = {
|
|
5445
5456
|
surface: surface$1,
|
|
5446
5457
|
fill
|
|
5447
5458
|
};
|
|
@@ -5482,7 +5493,7 @@ const ShopSurface = forwardRef(function ShopSurface2({ tone, fill: fill2 = false
|
|
|
5482
5493
|
...rest,
|
|
5483
5494
|
ref: attach,
|
|
5484
5495
|
"data-shop-theme": tone,
|
|
5485
|
-
className: [styles$
|
|
5496
|
+
className: [styles$E.surface, fill2 ? styles$E.fill : "", className ?? ""].filter(Boolean).join(" "),
|
|
5486
5497
|
children
|
|
5487
5498
|
}
|
|
5488
5499
|
);
|
|
@@ -5494,9 +5505,9 @@ const lines$2 = "_lines_ney0g_32";
|
|
|
5494
5505
|
const lineWide = "_lineWide_ney0g_41";
|
|
5495
5506
|
const lineMid = "_lineMid_ney0g_45";
|
|
5496
5507
|
const lineNarrow = "_lineNarrow_ney0g_49";
|
|
5497
|
-
const row$
|
|
5508
|
+
const row$8 = "_row_ney0g_53";
|
|
5498
5509
|
const action$2 = "_action_ney0g_57";
|
|
5499
|
-
const styles$
|
|
5510
|
+
const styles$D = {
|
|
5500
5511
|
root: root$6,
|
|
5501
5512
|
inner,
|
|
5502
5513
|
media: media$3,
|
|
@@ -5504,38 +5515,38 @@ const styles$A = {
|
|
|
5504
5515
|
lineWide,
|
|
5505
5516
|
lineMid,
|
|
5506
5517
|
lineNarrow,
|
|
5507
|
-
row: row$
|
|
5518
|
+
row: row$8,
|
|
5508
5519
|
action: action$2
|
|
5509
5520
|
};
|
|
5510
5521
|
function ScreenSkeleton({ tone, shape = "media" }) {
|
|
5511
|
-
return /* @__PURE__ */ jsx(ShopSurface, { tone, fill: true, className: styles$
|
|
5512
|
-
/* @__PURE__ */ jsx(Skeleton, { className: styles$
|
|
5513
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
5514
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 22, className: styles$
|
|
5515
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$
|
|
5516
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$
|
|
5522
|
+
return /* @__PURE__ */ jsx(ShopSurface, { tone, fill: true, className: styles$D.root, children: /* @__PURE__ */ jsx("div", { className: styles$D.inner, role: "status", "aria-label": "Loading", children: shape === "media" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5523
|
+
/* @__PURE__ */ jsx(Skeleton, { className: styles$D.media }),
|
|
5524
|
+
/* @__PURE__ */ jsxs("div", { className: styles$D.lines, children: [
|
|
5525
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 22, className: styles$D.lineWide }),
|
|
5526
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$D.lineMid }),
|
|
5527
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$D.lineNarrow })
|
|
5517
5528
|
] }),
|
|
5518
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 48, radius: 8, className: styles$
|
|
5519
|
-
] }) : /* @__PURE__ */ jsx("div", { className: styles$
|
|
5529
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 48, radius: 8, className: styles$D.action })
|
|
5530
|
+
] }) : /* @__PURE__ */ jsx("div", { className: styles$D.lines, children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsx(Skeleton, { height: 72, className: styles$D.row }, i)) }) }) });
|
|
5520
5531
|
}
|
|
5521
5532
|
const root$5 = "_root_1u83t_1";
|
|
5522
|
-
const icon$
|
|
5523
|
-
const title$
|
|
5533
|
+
const icon$4 = "_icon_1u83t_10";
|
|
5534
|
+
const title$h = "_title_1u83t_15";
|
|
5524
5535
|
const body$5 = "_body_1u83t_20";
|
|
5525
5536
|
const action$1 = "_action_1u83t_33";
|
|
5526
|
-
const styles$
|
|
5537
|
+
const styles$C = {
|
|
5527
5538
|
root: root$5,
|
|
5528
|
-
icon: icon$
|
|
5529
|
-
title: title$
|
|
5539
|
+
icon: icon$4,
|
|
5540
|
+
title: title$h,
|
|
5530
5541
|
body: body$5,
|
|
5531
5542
|
action: action$1
|
|
5532
5543
|
};
|
|
5533
5544
|
function EmptyState({ title: title2, body: body2, action: action2, icon: icon2 }) {
|
|
5534
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
5535
|
-
icon2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
5536
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
5537
|
-
body2 && /* @__PURE__ */ jsx("p", { className: styles$
|
|
5538
|
-
action2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
5545
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$C.root, role: "status", children: [
|
|
5546
|
+
icon2 && /* @__PURE__ */ jsx("div", { className: styles$C.icon, children: icon2 }),
|
|
5547
|
+
/* @__PURE__ */ jsx("h2", { className: styles$C.title, children: title2 }),
|
|
5548
|
+
body2 && /* @__PURE__ */ jsx("p", { className: styles$C.body, children: body2 }),
|
|
5549
|
+
action2 && /* @__PURE__ */ jsx("div", { className: styles$C.action, children: action2 })
|
|
5539
5550
|
] });
|
|
5540
5551
|
}
|
|
5541
5552
|
const TREATMENTS = {
|
|
@@ -5664,19 +5675,19 @@ function isDuplicateOrder(err) {
|
|
|
5664
5675
|
return codeOf(err) === "duplicate_order";
|
|
5665
5676
|
}
|
|
5666
5677
|
const root$4 = "_root_1lbpx_1";
|
|
5667
|
-
const title$
|
|
5678
|
+
const title$g = "_title_1lbpx_10";
|
|
5668
5679
|
const body$4 = "_body_1lbpx_15";
|
|
5669
|
-
const styles$
|
|
5680
|
+
const styles$B = {
|
|
5670
5681
|
root: root$4,
|
|
5671
|
-
title: title$
|
|
5682
|
+
title: title$g,
|
|
5672
5683
|
body: body$4
|
|
5673
5684
|
};
|
|
5674
5685
|
function ErrorState({ code, title: title2, body: body2, onRetry, retryLabel }) {
|
|
5675
5686
|
const treatment = treatmentFor(code);
|
|
5676
5687
|
const showRetry = Boolean(onRetry) && treatment.retriable;
|
|
5677
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
5678
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
5679
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
5688
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$B.root, role: "alert", children: [
|
|
5689
|
+
/* @__PURE__ */ jsx("h2", { className: styles$B.title, children: title2 ?? treatment.title }),
|
|
5690
|
+
/* @__PURE__ */ jsx("p", { className: styles$B.body, children: body2 ?? treatment.body }),
|
|
5680
5691
|
showRetry && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onRetry, children: retryLabel ?? "Try again" })
|
|
5681
5692
|
] });
|
|
5682
5693
|
}
|
|
@@ -5703,7 +5714,7 @@ function StatusBadge({ status: status2 }) {
|
|
|
5703
5714
|
}
|
|
5704
5715
|
const viewport = "_viewport_1lt9i_1";
|
|
5705
5716
|
const toast = "_toast_1lt9i_15";
|
|
5706
|
-
const text$
|
|
5717
|
+
const text$4 = "_text_1lt9i_32";
|
|
5707
5718
|
const message$1 = "_message_1lt9i_39";
|
|
5708
5719
|
const action = "_action_1lt9i_44";
|
|
5709
5720
|
const neutral = "_neutral_1lt9i_63";
|
|
@@ -5713,10 +5724,10 @@ const rich = "_rich_1lt9i_81";
|
|
|
5713
5724
|
const description = "_description_1lt9i_96";
|
|
5714
5725
|
const thumb$1 = "_thumb_1lt9i_113";
|
|
5715
5726
|
const thumbImage = "_thumbImage_1lt9i_124";
|
|
5716
|
-
const styles$
|
|
5727
|
+
const styles$A = {
|
|
5717
5728
|
viewport,
|
|
5718
5729
|
toast,
|
|
5719
|
-
text: text$
|
|
5730
|
+
text: text$4,
|
|
5720
5731
|
message: message$1,
|
|
5721
5732
|
action,
|
|
5722
5733
|
neutral,
|
|
@@ -5777,24 +5788,24 @@ function ToastProvider({ children }) {
|
|
|
5777
5788
|
const api = useMemo(() => ({ show }), [show]);
|
|
5778
5789
|
return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: api, children: [
|
|
5779
5790
|
children,
|
|
5780
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
5791
|
+
/* @__PURE__ */ jsx("div", { className: styles$A.viewport, "aria-live": "polite", "aria-atomic": "false", children: toasts.map((t) => {
|
|
5781
5792
|
const rich2 = Boolean(t.description || t.image);
|
|
5782
5793
|
return /* @__PURE__ */ jsxs(
|
|
5783
5794
|
"div",
|
|
5784
5795
|
{
|
|
5785
|
-
className: [styles$
|
|
5796
|
+
className: [styles$A.toast, rich2 ? styles$A.rich : styles$A[t.tone]].join(" "),
|
|
5786
5797
|
role: "status",
|
|
5787
5798
|
children: [
|
|
5788
|
-
t.image && /* @__PURE__ */ jsx("span", { className: styles$
|
|
5789
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
5790
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
5791
|
-
t.description && /* @__PURE__ */ jsx("span", { className: styles$
|
|
5799
|
+
t.image && /* @__PURE__ */ jsx("span", { className: styles$A.thumb, children: /* @__PURE__ */ jsx(ShopImage, { src: t.image, alt: "", fill: true, sizes: "40px", className: styles$A.thumbImage }) }),
|
|
5800
|
+
/* @__PURE__ */ jsxs("span", { className: styles$A.text, children: [
|
|
5801
|
+
/* @__PURE__ */ jsx("span", { className: styles$A.message, children: t.message }),
|
|
5802
|
+
t.description && /* @__PURE__ */ jsx("span", { className: styles$A.description, children: t.description })
|
|
5792
5803
|
] }),
|
|
5793
5804
|
t.action && /* @__PURE__ */ jsx(
|
|
5794
5805
|
"button",
|
|
5795
5806
|
{
|
|
5796
5807
|
type: "button",
|
|
5797
|
-
className: styles$
|
|
5808
|
+
className: styles$A.action,
|
|
5798
5809
|
onClick: () => {
|
|
5799
5810
|
t.action?.onAction();
|
|
5800
5811
|
dismiss(t.id);
|
|
@@ -5855,15 +5866,15 @@ function useLocale(override) {
|
|
|
5855
5866
|
const shop = useShopOptional();
|
|
5856
5867
|
return override ?? shop?.locale ?? shop?.market?.lang ?? (typeof navigator !== "undefined" ? navigator.language : void 0);
|
|
5857
5868
|
}
|
|
5858
|
-
const badge$
|
|
5859
|
-
const icon$
|
|
5860
|
-
const styles$
|
|
5861
|
-
badge: badge$
|
|
5862
|
-
icon: icon$
|
|
5869
|
+
const badge$3 = "_badge_156ya_2";
|
|
5870
|
+
const icon$3 = "_icon_156ya_18";
|
|
5871
|
+
const styles$z = {
|
|
5872
|
+
badge: badge$3,
|
|
5873
|
+
icon: icon$3
|
|
5863
5874
|
};
|
|
5864
5875
|
function SaleBadge({ pct }) {
|
|
5865
|
-
return /* @__PURE__ */ jsxs("span", { className: styles$
|
|
5866
|
-
/* @__PURE__ */ jsxs("svg", { className: styles$
|
|
5876
|
+
return /* @__PURE__ */ jsxs("span", { className: styles$z.badge, children: [
|
|
5877
|
+
/* @__PURE__ */ jsxs("svg", { className: styles$z.icon, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
5867
5878
|
/* @__PURE__ */ jsx(
|
|
5868
5879
|
"path",
|
|
5869
5880
|
{
|
|
@@ -5889,7 +5900,7 @@ const lg = "_lg_n3nm5_27";
|
|
|
5889
5900
|
const price$1 = "_price_n3nm5_31";
|
|
5890
5901
|
const compareAt = "_compareAt_n3nm5_36";
|
|
5891
5902
|
const strikethrough = "_strikethrough_n3nm5_44";
|
|
5892
|
-
const styles$
|
|
5903
|
+
const styles$y = {
|
|
5893
5904
|
root: root$3,
|
|
5894
5905
|
center: center$1,
|
|
5895
5906
|
end,
|
|
@@ -5911,9 +5922,9 @@ function PriceBlock({
|
|
|
5911
5922
|
const { format } = useMoney();
|
|
5912
5923
|
const pct = discountPct$1 ?? discountPct(price2, compareAt2);
|
|
5913
5924
|
const hasCompare = compareAt2 && compareAt2.amount > price2.amount;
|
|
5914
|
-
return /* @__PURE__ */ jsxs("div", { className: [styles$
|
|
5915
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
5916
|
-
hasCompare && /* @__PURE__ */ jsxs("span", { className: styles$
|
|
5925
|
+
return /* @__PURE__ */ jsxs("div", { className: [styles$y.root, styles$y[size], styles$y[align], styles$y[variant]].join(" "), children: [
|
|
5926
|
+
/* @__PURE__ */ jsx("span", { className: styles$y.price, children: format(price2) }),
|
|
5927
|
+
hasCompare && /* @__PURE__ */ jsxs("span", { className: styles$y.compareAt, children: [
|
|
5917
5928
|
/* @__PURE__ */ jsx("span", { className: "visually-hidden", children: "Was " }),
|
|
5918
5929
|
format(compareAt2)
|
|
5919
5930
|
] }),
|
|
@@ -6009,52 +6020,52 @@ function swatchColour(name) {
|
|
|
6009
6020
|
return SWATCH_HEX[name.toLowerCase().trim()] ?? "#c9cdd0";
|
|
6010
6021
|
}
|
|
6011
6022
|
const timeline = "_timeline_1j37h_7";
|
|
6012
|
-
const row$
|
|
6023
|
+
const row$7 = "_row_1j37h_15";
|
|
6013
6024
|
const line$1 = "_line_1j37h_20";
|
|
6014
6025
|
const marker = "_marker_1j37h_27";
|
|
6015
6026
|
const tick = "_tick_1j37h_35";
|
|
6016
6027
|
const pending$2 = "_pending_1j37h_44";
|
|
6017
6028
|
const connector = "_connector_1j37h_68";
|
|
6018
|
-
const text$
|
|
6029
|
+
const text$3 = "_text_1j37h_84";
|
|
6019
6030
|
const label$1 = "_label_1j37h_101";
|
|
6020
6031
|
const past = "_past_1j37h_113";
|
|
6021
6032
|
const current = "_current_1j37h_118";
|
|
6022
6033
|
const future = "_future_1j37h_123";
|
|
6023
|
-
const date = "_date_1j37h_128";
|
|
6024
|
-
const styles$
|
|
6034
|
+
const date$1 = "_date_1j37h_128";
|
|
6035
|
+
const styles$x = {
|
|
6025
6036
|
timeline,
|
|
6026
|
-
row: row$
|
|
6037
|
+
row: row$7,
|
|
6027
6038
|
line: line$1,
|
|
6028
6039
|
marker,
|
|
6029
6040
|
tick,
|
|
6030
6041
|
pending: pending$2,
|
|
6031
6042
|
connector,
|
|
6032
|
-
text: text$
|
|
6043
|
+
text: text$3,
|
|
6033
6044
|
label: label$1,
|
|
6034
6045
|
past,
|
|
6035
6046
|
current,
|
|
6036
6047
|
future,
|
|
6037
|
-
date
|
|
6048
|
+
date: date$1
|
|
6038
6049
|
};
|
|
6039
|
-
function OrderTimeline({ progress, locale: localeProp }) {
|
|
6050
|
+
function OrderTimeline({ progress: progress2, locale: localeProp }) {
|
|
6040
6051
|
const locale = useLocale(localeProp);
|
|
6041
|
-
const currentIndex =
|
|
6042
|
-
return /* @__PURE__ */ jsx("ol", { className: styles$
|
|
6052
|
+
const currentIndex = progress2.findIndex((e) => e.current);
|
|
6053
|
+
return /* @__PURE__ */ jsx("ol", { className: styles$x.timeline, children: progress2.map((entry, i) => {
|
|
6043
6054
|
const state = stateOf(entry, i, currentIndex);
|
|
6044
6055
|
return /* @__PURE__ */ jsxs(
|
|
6045
6056
|
"li",
|
|
6046
6057
|
{
|
|
6047
|
-
className: styles$
|
|
6058
|
+
className: styles$x.row,
|
|
6048
6059
|
"aria-current": entry.current ? "step" : void 0,
|
|
6049
6060
|
children: [
|
|
6050
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6051
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6052
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
6053
|
-
/* @__PURE__ */ jsx("span", { className: [styles$
|
|
6054
|
-
entry.at && /* @__PURE__ */ jsx("time", { className: styles$
|
|
6061
|
+
/* @__PURE__ */ jsxs("div", { className: styles$x.line, children: [
|
|
6062
|
+
/* @__PURE__ */ jsx("span", { className: styles$x.marker, children: state === "future" ? /* @__PURE__ */ jsx("span", { className: styles$x.pending, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(StepTick, { tone: state }) }),
|
|
6063
|
+
/* @__PURE__ */ jsxs("span", { className: styles$x.text, children: [
|
|
6064
|
+
/* @__PURE__ */ jsx("span", { className: [styles$x.label, styles$x[state]].join(" "), children: entry.label }),
|
|
6065
|
+
entry.at && /* @__PURE__ */ jsx("time", { className: styles$x.date, dateTime: entry.at, children: formatStepDate(entry.at, locale) })
|
|
6055
6066
|
] })
|
|
6056
6067
|
] }),
|
|
6057
|
-
i <
|
|
6068
|
+
i < progress2.length - 1 && /* @__PURE__ */ jsx("span", { className: styles$x.connector, "aria-hidden": "true" })
|
|
6058
6069
|
]
|
|
6059
6070
|
},
|
|
6060
6071
|
entry.step
|
|
@@ -6070,7 +6081,7 @@ function StepTick({ tone }) {
|
|
|
6070
6081
|
return /* @__PURE__ */ jsxs(
|
|
6071
6082
|
"svg",
|
|
6072
6083
|
{
|
|
6073
|
-
className: styles$
|
|
6084
|
+
className: styles$x.tick,
|
|
6074
6085
|
width: "28",
|
|
6075
6086
|
height: "28",
|
|
6076
6087
|
viewBox: "0 0 28 28",
|
|
@@ -6104,12 +6115,12 @@ function formatStepDate(iso, locale) {
|
|
|
6104
6115
|
return `${weekday}, ${dayMonth}`;
|
|
6105
6116
|
}
|
|
6106
6117
|
const summary = "_summary_1h18y_2";
|
|
6107
|
-
const row$
|
|
6118
|
+
const row$6 = "_row_1h18y_8";
|
|
6108
6119
|
const free = "_free_1h18y_36";
|
|
6109
6120
|
const pending$1 = "_pending_1h18y_42";
|
|
6110
|
-
const styles$
|
|
6121
|
+
const styles$w = {
|
|
6111
6122
|
summary,
|
|
6112
|
-
row: row$
|
|
6123
|
+
row: row$6,
|
|
6113
6124
|
free,
|
|
6114
6125
|
pending: pending$1
|
|
6115
6126
|
};
|
|
@@ -6124,26 +6135,26 @@ function OrderSummary({ pricing, deferred = [], rows = CART_ROWS }) {
|
|
|
6124
6135
|
const isDeferred = (key) => deferred.includes(key);
|
|
6125
6136
|
const anyDeferred = deferred.length > 0;
|
|
6126
6137
|
const visible = rows.filter((row2) => row2.key !== "total" || !anyDeferred);
|
|
6127
|
-
return /* @__PURE__ */ jsx("dl", { className: styles$
|
|
6138
|
+
return /* @__PURE__ */ jsx("dl", { className: styles$w.summary, children: visible.map(({ label: label2, key }) => {
|
|
6128
6139
|
const pending2 = key !== "total" && isDeferred(key);
|
|
6129
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6140
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$w.row, children: [
|
|
6130
6141
|
/* @__PURE__ */ jsx("dt", { children: label2 }),
|
|
6131
|
-
/* @__PURE__ */ jsx("dd", { className: pending2 ? styles$
|
|
6142
|
+
/* @__PURE__ */ jsx("dd", { className: pending2 ? styles$w.pending : void 0, children: pending2 ? "Calculated at checkout" : renderValue(key, pricing, format) })
|
|
6132
6143
|
] }, key);
|
|
6133
6144
|
}) });
|
|
6134
6145
|
}
|
|
6135
6146
|
function renderValue(key, pricing, format) {
|
|
6136
6147
|
if (key === "shipping" && pricing.shipping.amount === 0) {
|
|
6137
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
6148
|
+
return /* @__PURE__ */ jsx("span", { className: styles$w.free, children: "Free" });
|
|
6138
6149
|
}
|
|
6139
6150
|
return format(pricing[key]);
|
|
6140
6151
|
}
|
|
6141
|
-
const page$
|
|
6152
|
+
const page$2 = "_page_1eqkm_1";
|
|
6142
6153
|
const status = "_status_1eqkm_10";
|
|
6143
6154
|
const widget = "_widget_1eqkm_18";
|
|
6144
|
-
const title$
|
|
6155
|
+
const title$f = "_title_1eqkm_24";
|
|
6145
6156
|
const headline = "_headline_1eqkm_30";
|
|
6146
|
-
const subtitle$
|
|
6157
|
+
const subtitle$3 = "_subtitle_1eqkm_37";
|
|
6147
6158
|
const dot$3 = "_dot_1eqkm_48";
|
|
6148
6159
|
const trackButton = "_trackButton_1eqkm_58";
|
|
6149
6160
|
const srOnly = "_srOnly_1eqkm_78";
|
|
@@ -6154,8 +6165,8 @@ const count$1 = "_count_1eqkm_115";
|
|
|
6154
6165
|
const lines$1 = "_lines_1eqkm_130";
|
|
6155
6166
|
const line = "_line_1eqkm_130";
|
|
6156
6167
|
const thumb = "_thumb_1eqkm_152";
|
|
6157
|
-
const image$
|
|
6158
|
-
const placeholder$
|
|
6168
|
+
const image$8 = "_image_1eqkm_162";
|
|
6169
|
+
const placeholder$5 = "_placeholder_1eqkm_166";
|
|
6159
6170
|
const lineBody = "_lineBody_1eqkm_172";
|
|
6160
6171
|
const lineText = "_lineText_1eqkm_180";
|
|
6161
6172
|
const lineTitle = "_lineTitle_1eqkm_189";
|
|
@@ -6170,13 +6181,13 @@ const last4 = "_last4_1eqkm_256";
|
|
|
6170
6181
|
const brand = "_brand_1eqkm_262";
|
|
6171
6182
|
const divider$2 = "_divider_1eqkm_268";
|
|
6172
6183
|
const summaryCard = "_summaryCard_1eqkm_275";
|
|
6173
|
-
const styles$
|
|
6174
|
-
page: page$
|
|
6184
|
+
const styles$v = {
|
|
6185
|
+
page: page$2,
|
|
6175
6186
|
status,
|
|
6176
6187
|
widget,
|
|
6177
|
-
title: title$
|
|
6188
|
+
title: title$f,
|
|
6178
6189
|
headline,
|
|
6179
|
-
subtitle: subtitle$
|
|
6190
|
+
subtitle: subtitle$3,
|
|
6180
6191
|
dot: dot$3,
|
|
6181
6192
|
trackButton,
|
|
6182
6193
|
srOnly,
|
|
@@ -6187,8 +6198,8 @@ const styles$s = {
|
|
|
6187
6198
|
lines: lines$1,
|
|
6188
6199
|
line,
|
|
6189
6200
|
thumb,
|
|
6190
|
-
image: image$
|
|
6191
|
-
placeholder: placeholder$
|
|
6201
|
+
image: image$8,
|
|
6202
|
+
placeholder: placeholder$5,
|
|
6192
6203
|
lineBody,
|
|
6193
6204
|
lineText,
|
|
6194
6205
|
lineTitle,
|
|
@@ -6233,7 +6244,7 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6233
6244
|
void load();
|
|
6234
6245
|
}, [load]);
|
|
6235
6246
|
if (state === "loading") {
|
|
6236
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6247
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$v.page, children: [
|
|
6237
6248
|
/* @__PURE__ */ jsx(Skeleton, { height: 120, radius: 8 }),
|
|
6238
6249
|
/* @__PURE__ */ jsx(Skeleton, { height: 220, radius: 18 }),
|
|
6239
6250
|
/* @__PURE__ */ jsx(Skeleton, { height: 140, radius: 18 })
|
|
@@ -6242,34 +6253,34 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6242
6253
|
if (state === "error" || !order) {
|
|
6243
6254
|
return /* @__PURE__ */ jsx(ErrorState, { code: errorCode, onRetry: () => void load() });
|
|
6244
6255
|
}
|
|
6245
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6246
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6247
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6248
|
-
/* @__PURE__ */ jsx("h1", { className: styles$
|
|
6249
|
-
/* @__PURE__ */ jsxs("p", { className: styles$
|
|
6256
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$v.page, children: [
|
|
6257
|
+
/* @__PURE__ */ jsxs("section", { className: styles$v.status, "aria-label": "Delivery status", children: [
|
|
6258
|
+
/* @__PURE__ */ jsxs("div", { className: styles$v.title, children: [
|
|
6259
|
+
/* @__PURE__ */ jsx("h1", { className: styles$v.headline, children: order.headline }),
|
|
6260
|
+
/* @__PURE__ */ jsxs("p", { className: styles$v.subtitle, children: [
|
|
6250
6261
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
6251
6262
|
"Order #",
|
|
6252
|
-
shortRef(order.order_ref)
|
|
6263
|
+
shortRef$1(order.order_ref)
|
|
6253
6264
|
] }),
|
|
6254
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6265
|
+
/* @__PURE__ */ jsx("span", { className: styles$v.dot, "aria-hidden": "true" }),
|
|
6255
6266
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
6256
6267
|
"Placed ",
|
|
6257
|
-
formatPlaced(order.placed_at, locale)
|
|
6268
|
+
formatPlaced$1(order.placed_at, locale)
|
|
6258
6269
|
] })
|
|
6259
6270
|
] })
|
|
6260
6271
|
] }),
|
|
6261
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6272
|
+
/* @__PURE__ */ jsxs("div", { className: styles$v.widget, children: [
|
|
6262
6273
|
/* @__PURE__ */ jsx(OrderTimeline, { progress: order.progress, locale }),
|
|
6263
6274
|
order.tracking?.url && /* @__PURE__ */ jsxs(
|
|
6264
6275
|
"a",
|
|
6265
6276
|
{
|
|
6266
|
-
className: styles$
|
|
6277
|
+
className: styles$v.trackButton,
|
|
6267
6278
|
href: order.tracking.url,
|
|
6268
6279
|
target: "_blank",
|
|
6269
6280
|
rel: "noopener noreferrer",
|
|
6270
6281
|
children: [
|
|
6271
6282
|
"Track order",
|
|
6272
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
6283
|
+
/* @__PURE__ */ jsxs("span", { className: styles$v.srOnly, children: [
|
|
6273
6284
|
" (opens ",
|
|
6274
6285
|
order.tracking.carrier,
|
|
6275
6286
|
" in a new tab)"
|
|
@@ -6280,18 +6291,18 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6280
6291
|
] })
|
|
6281
6292
|
] }),
|
|
6282
6293
|
/* @__PURE__ */ jsx(ItemsCard, { order }),
|
|
6283
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6284
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6285
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6286
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
6294
|
+
/* @__PURE__ */ jsxs("section", { className: styles$v.details, "aria-label": "Delivery and payment", children: [
|
|
6295
|
+
/* @__PURE__ */ jsxs("div", { className: styles$v.detailBlock, children: [
|
|
6296
|
+
/* @__PURE__ */ jsx("h2", { className: styles$v.detailLabel, children: "Shipping address" }),
|
|
6297
|
+
/* @__PURE__ */ jsx("p", { className: styles$v.detailValue, children: formatAddress(order.ship_to) })
|
|
6287
6298
|
] }),
|
|
6288
6299
|
order.payment && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6289
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6290
|
-
/* @__PURE__ */ jsxs("div", { className: [styles$
|
|
6291
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6292
|
-
/* @__PURE__ */ jsxs("p", { className: styles$
|
|
6293
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6294
|
-
order.payment.last4 && /* @__PURE__ */ jsxs("span", { className: styles$
|
|
6300
|
+
/* @__PURE__ */ jsx("div", { className: styles$v.divider, role: "presentation" }),
|
|
6301
|
+
/* @__PURE__ */ jsxs("div", { className: [styles$v.detailBlock, styles$v.payment].join(" "), children: [
|
|
6302
|
+
/* @__PURE__ */ jsx("h2", { className: styles$v.detailLabel, children: "Payment" }),
|
|
6303
|
+
/* @__PURE__ */ jsxs("p", { className: styles$v.detailValue, children: [
|
|
6304
|
+
/* @__PURE__ */ jsx("span", { className: styles$v.brand, children: order.payment.brand }),
|
|
6305
|
+
order.payment.last4 && /* @__PURE__ */ jsxs("span", { className: styles$v.last4, children: [
|
|
6295
6306
|
"•••• ",
|
|
6296
6307
|
order.payment.last4
|
|
6297
6308
|
] })
|
|
@@ -6299,27 +6310,27 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6299
6310
|
] })
|
|
6300
6311
|
] })
|
|
6301
6312
|
] }),
|
|
6302
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6303
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6313
|
+
/* @__PURE__ */ jsxs("section", { className: styles$v.summaryCard, "aria-label": "Order summary", children: [
|
|
6314
|
+
/* @__PURE__ */ jsx("h2", { className: styles$v.cardTitle, children: "Order summary" }),
|
|
6304
6315
|
/* @__PURE__ */ jsx(OrderSummary, { pricing: toPricing(order), rows: SUMMARY_ROWS })
|
|
6305
6316
|
] })
|
|
6306
6317
|
] });
|
|
6307
6318
|
}
|
|
6308
6319
|
function ItemsCard({ order }) {
|
|
6309
6320
|
const { format } = useMoney();
|
|
6310
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
6311
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6312
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6313
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6321
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$v.itemsCard, "aria-label": "Items", children: [
|
|
6322
|
+
/* @__PURE__ */ jsxs("div", { className: styles$v.cardHeader, children: [
|
|
6323
|
+
/* @__PURE__ */ jsx("h2", { className: styles$v.cardTitle, children: "Items" }),
|
|
6324
|
+
/* @__PURE__ */ jsx("span", { className: styles$v.count, children: order.items.reduce((n, i) => n + i.qty, 0) })
|
|
6314
6325
|
] }),
|
|
6315
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
6316
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6317
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6318
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6319
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6320
|
-
detailsOf(item2).length > 0 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6326
|
+
/* @__PURE__ */ jsx("ul", { className: styles$v.lines, children: order.items.map((item2) => /* @__PURE__ */ jsxs("li", { className: styles$v.line, children: [
|
|
6327
|
+
/* @__PURE__ */ jsx("div", { className: styles$v.thumb, children: item2.image ? /* @__PURE__ */ jsx(ShopImage, { src: item2.image, alt: "", fill: true, sizes: "48px", className: styles$v.image }) : /* @__PURE__ */ jsx("div", { className: styles$v.placeholder, "aria-hidden": "true" }) }),
|
|
6328
|
+
/* @__PURE__ */ jsxs("div", { className: styles$v.lineBody, children: [
|
|
6329
|
+
/* @__PURE__ */ jsxs("div", { className: styles$v.lineText, children: [
|
|
6330
|
+
/* @__PURE__ */ jsx("span", { className: styles$v.lineTitle, children: item2.title ?? item2.sku }),
|
|
6331
|
+
detailsOf(item2).length > 0 && /* @__PURE__ */ jsx("span", { className: styles$v.lineDetails, children: detailsOf(item2).map((detail2) => /* @__PURE__ */ jsx("span", { children: detail2 }, detail2)) })
|
|
6321
6332
|
] }),
|
|
6322
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6333
|
+
/* @__PURE__ */ jsx("span", { className: styles$v.linePrice, children: format(item2.line_total) })
|
|
6323
6334
|
] })
|
|
6324
6335
|
] }, item2.line_ref)) })
|
|
6325
6336
|
] });
|
|
@@ -6336,10 +6347,10 @@ function toPricing(order) {
|
|
|
6336
6347
|
total: order.totals.grand_total
|
|
6337
6348
|
};
|
|
6338
6349
|
}
|
|
6339
|
-
function shortRef(orderRef) {
|
|
6350
|
+
function shortRef$1(orderRef) {
|
|
6340
6351
|
return orderRef.replace(/^ord_/, "");
|
|
6341
6352
|
}
|
|
6342
|
-
function formatPlaced(iso, locale) {
|
|
6353
|
+
function formatPlaced$1(iso, locale) {
|
|
6343
6354
|
return new Date(iso).toLocaleDateString(locale, {
|
|
6344
6355
|
day: "numeric",
|
|
6345
6356
|
month: "short",
|
|
@@ -6349,6 +6360,202 @@ function formatPlaced(iso, locale) {
|
|
|
6349
6360
|
function formatAddress(address) {
|
|
6350
6361
|
return [address.line1, address.line2, address.postcode, address.city, address.country].filter(Boolean).join(", ");
|
|
6351
6362
|
}
|
|
6363
|
+
const badge$2 = "_badge_ghd02_6";
|
|
6364
|
+
const progress = "_progress_ghd02_22";
|
|
6365
|
+
const delivered = "_delivered_ghd02_27";
|
|
6366
|
+
const cancelled = "_cancelled_ghd02_32";
|
|
6367
|
+
const styles$u = {
|
|
6368
|
+
badge: badge$2,
|
|
6369
|
+
progress,
|
|
6370
|
+
delivered,
|
|
6371
|
+
cancelled
|
|
6372
|
+
};
|
|
6373
|
+
const LABEL = {
|
|
6374
|
+
packing: "In progress",
|
|
6375
|
+
on_its_way: "In progress",
|
|
6376
|
+
out_for_delivery: "In progress",
|
|
6377
|
+
delivered: "Delivered",
|
|
6378
|
+
cancelled: "Cancelled"
|
|
6379
|
+
};
|
|
6380
|
+
const TONE = {
|
|
6381
|
+
packing: "progress",
|
|
6382
|
+
on_its_way: "progress",
|
|
6383
|
+
out_for_delivery: "progress",
|
|
6384
|
+
delivered: "delivered",
|
|
6385
|
+
cancelled: "cancelled"
|
|
6386
|
+
};
|
|
6387
|
+
function OrderStatusBadge({ status: status2 }) {
|
|
6388
|
+
const label2 = LABEL[status2] ?? status2.replace(/_/g, " ");
|
|
6389
|
+
const tone = TONE[status2] ?? "progress";
|
|
6390
|
+
return /* @__PURE__ */ jsx("span", { className: [styles$u.badge, styles$u[tone]].join(" "), children: label2 });
|
|
6391
|
+
}
|
|
6392
|
+
const page$1 = "_page_y686q_2";
|
|
6393
|
+
const empty = "_empty_y686q_11";
|
|
6394
|
+
const cta$1 = "_cta_y686q_22";
|
|
6395
|
+
const card$1 = "_card_y686q_45";
|
|
6396
|
+
const tappable = "_tappable_y686q_60";
|
|
6397
|
+
const head$1 = "_head_y686q_69";
|
|
6398
|
+
const heading = "_heading_y686q_77";
|
|
6399
|
+
const title$e = "_title_y686q_86";
|
|
6400
|
+
const date = "_date_y686q_97";
|
|
6401
|
+
const bottom$1 = "_bottom_y686q_102";
|
|
6402
|
+
const strip = "_strip_y686q_110";
|
|
6403
|
+
const tile$2 = "_tile_y686q_115";
|
|
6404
|
+
const image$7 = "_image_y686q_125";
|
|
6405
|
+
const placeholder$4 = "_placeholder_y686q_129";
|
|
6406
|
+
const more = "_more_y686q_136";
|
|
6407
|
+
const chevron$3 = "_chevron_y686q_149";
|
|
6408
|
+
const styles$t = {
|
|
6409
|
+
page: page$1,
|
|
6410
|
+
empty,
|
|
6411
|
+
cta: cta$1,
|
|
6412
|
+
card: card$1,
|
|
6413
|
+
tappable,
|
|
6414
|
+
head: head$1,
|
|
6415
|
+
heading,
|
|
6416
|
+
title: title$e,
|
|
6417
|
+
date,
|
|
6418
|
+
bottom: bottom$1,
|
|
6419
|
+
strip,
|
|
6420
|
+
tile: tile$2,
|
|
6421
|
+
image: image$7,
|
|
6422
|
+
placeholder: placeholder$4,
|
|
6423
|
+
more,
|
|
6424
|
+
chevron: chevron$3
|
|
6425
|
+
};
|
|
6426
|
+
const TILES = 3;
|
|
6427
|
+
function Chevron() {
|
|
6428
|
+
return /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
6429
|
+
"path",
|
|
6430
|
+
{
|
|
6431
|
+
d: "M9 5.5l6.5 6.5L9 18.5",
|
|
6432
|
+
stroke: "currentColor",
|
|
6433
|
+
strokeWidth: "1.8",
|
|
6434
|
+
strokeLinecap: "round",
|
|
6435
|
+
strokeLinejoin: "round"
|
|
6436
|
+
}
|
|
6437
|
+
) });
|
|
6438
|
+
}
|
|
6439
|
+
function OrderListView(props) {
|
|
6440
|
+
return /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, children: /* @__PURE__ */ jsx(OrderListContent, { ...props }) });
|
|
6441
|
+
}
|
|
6442
|
+
function OrderListContent({ onOpenOrder, onStartShopping, locale: localeProp }) {
|
|
6443
|
+
const { api } = useShop();
|
|
6444
|
+
const locale = useLocale(localeProp);
|
|
6445
|
+
const [orders2, setOrders] = useState([]);
|
|
6446
|
+
const [state, setState] = useState("loading");
|
|
6447
|
+
const [errorCode, setErrorCode] = useState(void 0);
|
|
6448
|
+
const load = useCallback(async () => {
|
|
6449
|
+
setState("loading");
|
|
6450
|
+
try {
|
|
6451
|
+
const { orders: rows } = await api.orders.list();
|
|
6452
|
+
setOrders(rows);
|
|
6453
|
+
setState("ready");
|
|
6454
|
+
} catch (err) {
|
|
6455
|
+
setErrorCode(codeOf(err));
|
|
6456
|
+
setState("error");
|
|
6457
|
+
}
|
|
6458
|
+
}, [api]);
|
|
6459
|
+
useEffect(() => {
|
|
6460
|
+
void load();
|
|
6461
|
+
}, [load]);
|
|
6462
|
+
if (state === "loading") {
|
|
6463
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$t.page, children: [
|
|
6464
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 148, radius: 12 }),
|
|
6465
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 148, radius: 12 }),
|
|
6466
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 148, radius: 12 })
|
|
6467
|
+
] });
|
|
6468
|
+
}
|
|
6469
|
+
if (state === "error") {
|
|
6470
|
+
return /* @__PURE__ */ jsx(ErrorState, { code: errorCode, onRetry: () => void load() });
|
|
6471
|
+
}
|
|
6472
|
+
if (orders2.length === 0) {
|
|
6473
|
+
return /* @__PURE__ */ jsx("div", { className: styles$t.empty, children: /* @__PURE__ */ jsx(
|
|
6474
|
+
EmptyState,
|
|
6475
|
+
{
|
|
6476
|
+
title: "Nothing here yet",
|
|
6477
|
+
body: "Your orders will show up here once you've shopped.",
|
|
6478
|
+
...onStartShopping ? {
|
|
6479
|
+
action: /* @__PURE__ */ jsx("button", { type: "button", className: styles$t.cta, onClick: onStartShopping, children: "Find my fit" })
|
|
6480
|
+
} : {}
|
|
6481
|
+
}
|
|
6482
|
+
) });
|
|
6483
|
+
}
|
|
6484
|
+
return /* @__PURE__ */ jsx("ul", { className: styles$t.page, children: orders2.map((order) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
6485
|
+
OrderCard,
|
|
6486
|
+
{
|
|
6487
|
+
order,
|
|
6488
|
+
locale,
|
|
6489
|
+
...onOpenOrder ? { onOpen: () => onOpenOrder(order.order_ref) } : {}
|
|
6490
|
+
}
|
|
6491
|
+
) }, order.order_ref)) });
|
|
6492
|
+
}
|
|
6493
|
+
function OrderCard({
|
|
6494
|
+
order,
|
|
6495
|
+
locale,
|
|
6496
|
+
onOpen
|
|
6497
|
+
}) {
|
|
6498
|
+
const body2 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6499
|
+
/* @__PURE__ */ jsxs("div", { className: styles$t.head, children: [
|
|
6500
|
+
/* @__PURE__ */ jsxs("div", { className: styles$t.heading, children: [
|
|
6501
|
+
/* @__PURE__ */ jsxs("span", { className: styles$t.title, children: [
|
|
6502
|
+
"Order #",
|
|
6503
|
+
shortRef(order.order_ref)
|
|
6504
|
+
] }),
|
|
6505
|
+
/* @__PURE__ */ jsx("span", { className: styles$t.date, children: formatPlaced(order.placed_at, locale) })
|
|
6506
|
+
] }),
|
|
6507
|
+
/* @__PURE__ */ jsx(OrderStatusBadge, { status: order.status })
|
|
6508
|
+
] }),
|
|
6509
|
+
/* @__PURE__ */ jsxs("div", { className: styles$t.bottom, children: [
|
|
6510
|
+
/* @__PURE__ */ jsx(Thumbnails, { order }),
|
|
6511
|
+
onOpen && /* @__PURE__ */ jsx("span", { className: styles$t.chevron, children: /* @__PURE__ */ jsx(Chevron, {}) })
|
|
6512
|
+
] })
|
|
6513
|
+
] });
|
|
6514
|
+
if (!onOpen) return /* @__PURE__ */ jsx("div", { className: styles$t.card, children: body2 });
|
|
6515
|
+
return /* @__PURE__ */ jsx(
|
|
6516
|
+
"button",
|
|
6517
|
+
{
|
|
6518
|
+
type: "button",
|
|
6519
|
+
className: [styles$t.card, styles$t.tappable].join(" "),
|
|
6520
|
+
onClick: onOpen,
|
|
6521
|
+
"aria-label": `Order ${shortRef(order.order_ref)}, ${order.headline}`,
|
|
6522
|
+
children: body2
|
|
6523
|
+
}
|
|
6524
|
+
);
|
|
6525
|
+
}
|
|
6526
|
+
function Thumbnails({ order }) {
|
|
6527
|
+
const images = order.images ?? (order.image ? [order.image] : []);
|
|
6528
|
+
const hidden = order.item_count - TILES + 1;
|
|
6529
|
+
const overflow = images.length >= TILES && hidden > 1 ? hidden : 0;
|
|
6530
|
+
if (images.length === 0) {
|
|
6531
|
+
return /* @__PURE__ */ jsx("div", { className: styles$t.strip, children: /* @__PURE__ */ jsx("div", { className: [styles$t.tile, styles$t.placeholder].join(" "), "aria-hidden": "true" }) });
|
|
6532
|
+
}
|
|
6533
|
+
return /* @__PURE__ */ jsx("div", { className: styles$t.strip, children: images.map((src, i) => {
|
|
6534
|
+
const last = i === images.length - 1;
|
|
6535
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$t.tile, children: [
|
|
6536
|
+
/* @__PURE__ */ jsx(ShopImage, { src, alt: "", fill: true, sizes: "56px", className: styles$t.image }),
|
|
6537
|
+
overflow > 0 && last && /* @__PURE__ */ jsxs("span", { className: styles$t.more, children: [
|
|
6538
|
+
/* @__PURE__ */ jsxs("span", { "aria-hidden": "true", children: [
|
|
6539
|
+
"+",
|
|
6540
|
+
overflow
|
|
6541
|
+
] }),
|
|
6542
|
+
/* @__PURE__ */ jsxs("span", { className: "visually-hidden", children: [
|
|
6543
|
+
"and ",
|
|
6544
|
+
overflow,
|
|
6545
|
+
" more items"
|
|
6546
|
+
] })
|
|
6547
|
+
] })
|
|
6548
|
+
] }, `${src}-${i}`);
|
|
6549
|
+
}) });
|
|
6550
|
+
}
|
|
6551
|
+
function shortRef(orderRef) {
|
|
6552
|
+
return orderRef.replace(/^ord_/, "");
|
|
6553
|
+
}
|
|
6554
|
+
function formatPlaced(iso, locale) {
|
|
6555
|
+
const date2 = new Date(iso);
|
|
6556
|
+
const day = date2.toLocaleDateString(locale, { day: "numeric", month: "short" });
|
|
6557
|
+
return `${day}, ${date2.toLocaleDateString(locale, { year: "numeric" })}`;
|
|
6558
|
+
}
|
|
6352
6559
|
const tile$1 = "_tile_1u9l8_3";
|
|
6353
6560
|
const media$2 = "_media_1u9l8_11";
|
|
6354
6561
|
const image$6 = "_image_1u9l8_21";
|
|
@@ -6358,13 +6565,13 @@ const saleBadge$1 = "_saleBadge_1u9l8_56";
|
|
|
6358
6565
|
const oos$2 = "_oos_1u9l8_63";
|
|
6359
6566
|
const bottom = "_bottom_1u9l8_88";
|
|
6360
6567
|
const titlePrice$1 = "_titlePrice_1u9l8_1";
|
|
6361
|
-
const title$
|
|
6568
|
+
const title$d = "_title_1u9l8_1";
|
|
6362
6569
|
const swatches = "_swatches_1u9l8_119";
|
|
6363
6570
|
const swatch = "_swatch_1u9l8_119";
|
|
6364
6571
|
const swatchActive = "_swatchActive_1u9l8_132";
|
|
6365
6572
|
const swatchDot = "_swatchDot_1u9l8_136";
|
|
6366
6573
|
const large = "_large_1u9l8_147";
|
|
6367
|
-
const styles$
|
|
6574
|
+
const styles$s = {
|
|
6368
6575
|
tile: tile$1,
|
|
6369
6576
|
media: media$2,
|
|
6370
6577
|
image: image$6,
|
|
@@ -6374,7 +6581,7 @@ const styles$r = {
|
|
|
6374
6581
|
oos: oos$2,
|
|
6375
6582
|
bottom,
|
|
6376
6583
|
titlePrice: titlePrice$1,
|
|
6377
|
-
title: title$
|
|
6584
|
+
title: title$d,
|
|
6378
6585
|
swatches,
|
|
6379
6586
|
swatch,
|
|
6380
6587
|
swatchActive,
|
|
@@ -6391,9 +6598,9 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
6391
6598
|
ShopLink,
|
|
6392
6599
|
{
|
|
6393
6600
|
to: `/product/${encodeURIComponent(product.sku)}`,
|
|
6394
|
-
className: [styles$
|
|
6601
|
+
className: [styles$s.tile, size === "large" ? styles$s.large : ""].join(" "),
|
|
6395
6602
|
children: [
|
|
6396
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6603
|
+
/* @__PURE__ */ jsxs("div", { className: styles$s.media, children: [
|
|
6397
6604
|
image2 ? /* @__PURE__ */ jsx(
|
|
6398
6605
|
ShopImage,
|
|
6399
6606
|
{
|
|
@@ -6401,17 +6608,17 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
6401
6608
|
alt: product.title,
|
|
6402
6609
|
fill: true,
|
|
6403
6610
|
sizes: size === "large" ? "(max-width: 480px) 100vw, 480px" : "(max-width: 480px) 45vw, 200px",
|
|
6404
|
-
className: styles$
|
|
6611
|
+
className: styles$s.image,
|
|
6405
6612
|
priority
|
|
6406
6613
|
}
|
|
6407
|
-
) : /* @__PURE__ */ jsx("div", { className: styles$
|
|
6408
|
-
anyInStock && topBadge2 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6409
|
-
anyInStock && pct !== void 0 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6410
|
-
!anyInStock && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6614
|
+
) : /* @__PURE__ */ jsx("div", { className: styles$s.placeholder, "aria-hidden": "true" }),
|
|
6615
|
+
anyInStock && topBadge2 && /* @__PURE__ */ jsx("span", { className: styles$s.topBadge, children: topBadge2 }),
|
|
6616
|
+
anyInStock && pct !== void 0 && /* @__PURE__ */ jsx("span", { className: styles$s.saleBadge, children: /* @__PURE__ */ jsx(SaleBadge, { pct }) }),
|
|
6617
|
+
!anyInStock && /* @__PURE__ */ jsx("span", { className: styles$s.oos, children: "Out of stock" })
|
|
6411
6618
|
] }),
|
|
6412
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6413
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6414
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6619
|
+
/* @__PURE__ */ jsxs("div", { className: styles$s.bottom, children: [
|
|
6620
|
+
/* @__PURE__ */ jsxs("div", { className: styles$s.titlePrice, children: [
|
|
6621
|
+
/* @__PURE__ */ jsx("span", { className: styles$s.title, children: product.title }),
|
|
6415
6622
|
/* @__PURE__ */ jsx(
|
|
6416
6623
|
PriceBlock,
|
|
6417
6624
|
{
|
|
@@ -6423,11 +6630,11 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
6423
6630
|
}
|
|
6424
6631
|
)
|
|
6425
6632
|
] }),
|
|
6426
|
-
swatches2.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
6633
|
+
swatches2.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$s.swatches, "aria-hidden": "true", children: swatches2.map((c, i) => /* @__PURE__ */ jsx(
|
|
6427
6634
|
"span",
|
|
6428
6635
|
{
|
|
6429
|
-
className: [styles$
|
|
6430
|
-
children: /* @__PURE__ */ jsx("span", { className: styles$
|
|
6636
|
+
className: [styles$s.swatch, i === 0 ? styles$s.swatchActive : ""].join(" "),
|
|
6637
|
+
children: /* @__PURE__ */ jsx("span", { className: styles$s.swatchDot, style: { background: swatchColour(c.value) } })
|
|
6431
6638
|
},
|
|
6432
6639
|
c.value
|
|
6433
6640
|
)) })
|
|
@@ -6441,7 +6648,7 @@ const chips$1 = "_chips_fn0g9_8";
|
|
|
6441
6648
|
const chip$1 = "_chip_fn0g9_8";
|
|
6442
6649
|
const on = "_on_fn0g9_29";
|
|
6443
6650
|
const clear = "_clear_fn0g9_35";
|
|
6444
|
-
const styles$
|
|
6651
|
+
const styles$r = {
|
|
6445
6652
|
bar: bar$1,
|
|
6446
6653
|
chips: chips$1,
|
|
6447
6654
|
chip: chip$1,
|
|
@@ -6450,27 +6657,27 @@ const styles$q = {
|
|
|
6450
6657
|
};
|
|
6451
6658
|
function FilterBar({ options: options2, active, onToggle, onClear }) {
|
|
6452
6659
|
const hasActive = active.length > 0;
|
|
6453
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6454
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6660
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$r.bar, role: "group", "aria-label": "Filters", children: [
|
|
6661
|
+
/* @__PURE__ */ jsx("div", { className: styles$r.chips, children: options2.map((opt) => {
|
|
6455
6662
|
const on2 = active.includes(opt.value);
|
|
6456
6663
|
return /* @__PURE__ */ jsx(
|
|
6457
6664
|
"button",
|
|
6458
6665
|
{
|
|
6459
6666
|
type: "button",
|
|
6460
6667
|
"aria-pressed": on2,
|
|
6461
|
-
className: [styles$
|
|
6668
|
+
className: [styles$r.chip, on2 ? styles$r.on : ""].join(" "),
|
|
6462
6669
|
onClick: () => onToggle(opt.value),
|
|
6463
6670
|
children: opt.label
|
|
6464
6671
|
},
|
|
6465
6672
|
opt.value
|
|
6466
6673
|
);
|
|
6467
6674
|
}) }),
|
|
6468
|
-
hasActive && onClear && /* @__PURE__ */ jsx("button", { type: "button", className: styles$
|
|
6675
|
+
hasActive && onClear && /* @__PURE__ */ jsx("button", { type: "button", className: styles$r.clear, onClick: onClear, children: "Clear" })
|
|
6469
6676
|
] });
|
|
6470
6677
|
}
|
|
6471
6678
|
const wrap$2 = "_wrap_15ntf_1";
|
|
6472
6679
|
const grid$1 = "_grid_15ntf_7";
|
|
6473
|
-
const styles$
|
|
6680
|
+
const styles$q = {
|
|
6474
6681
|
wrap: wrap$2,
|
|
6475
6682
|
grid: grid$1
|
|
6476
6683
|
};
|
|
@@ -6515,7 +6722,7 @@ function ProductGrid({
|
|
|
6515
6722
|
return () => observer.disconnect();
|
|
6516
6723
|
}, [loadMore]);
|
|
6517
6724
|
const visible = active.length === 0 ? products : products.filter((p) => active.includes(p.category));
|
|
6518
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6725
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$q.wrap, children: [
|
|
6519
6726
|
filters.length > 0 && /* @__PURE__ */ jsx(
|
|
6520
6727
|
FilterBar,
|
|
6521
6728
|
{
|
|
@@ -6532,22 +6739,22 @@ function ProductGrid({
|
|
|
6532
6739
|
body: "Nothing matches these filters.",
|
|
6533
6740
|
action: active.length > 0 ? /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: () => setActive([]), children: "Clear filters" }) : void 0
|
|
6534
6741
|
}
|
|
6535
|
-
) : /* @__PURE__ */ jsx("ul", { className: styles$
|
|
6536
|
-
loading && /* @__PURE__ */ jsx("div", { className: styles$
|
|
6742
|
+
) : /* @__PURE__ */ jsx("ul", { className: styles$q.grid, children: visible.map((product, i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(ProductTile, { product, priority: i < 4 }) }, product.sku)) }),
|
|
6743
|
+
loading && /* @__PURE__ */ jsx("div", { className: styles$q.grid, "aria-hidden": "true", children: [0, 1].map((i) => /* @__PURE__ */ jsx(Skeleton, { height: 200, radius: 12 }, i)) }),
|
|
6537
6744
|
/* @__PURE__ */ jsx("div", { ref: sentinelRef, "aria-hidden": "true" })
|
|
6538
6745
|
] });
|
|
6539
6746
|
}
|
|
6540
6747
|
const rail = "_rail_5z5e9_2";
|
|
6541
|
-
const header$
|
|
6542
|
-
const title$
|
|
6748
|
+
const header$6 = "_header_5z5e9_9";
|
|
6749
|
+
const title$c = "_title_5z5e9_16";
|
|
6543
6750
|
const seeAll = "_seeAll_5z5e9_22";
|
|
6544
6751
|
const track$3 = "_track_5z5e9_28";
|
|
6545
6752
|
const item = "_item_5z5e9_45";
|
|
6546
6753
|
const inset = "_inset_5z5e9_57";
|
|
6547
|
-
const styles$
|
|
6754
|
+
const styles$p = {
|
|
6548
6755
|
rail,
|
|
6549
|
-
header: header$
|
|
6550
|
-
title: title$
|
|
6756
|
+
header: header$6,
|
|
6757
|
+
title: title$c,
|
|
6551
6758
|
seeAll,
|
|
6552
6759
|
track: track$3,
|
|
6553
6760
|
item,
|
|
@@ -6555,62 +6762,16 @@ const styles$o = {
|
|
|
6555
6762
|
};
|
|
6556
6763
|
function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
|
|
6557
6764
|
if (products.length === 0) return null;
|
|
6558
|
-
return /* @__PURE__ */ jsxs("section", { className: [styles$
|
|
6559
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6560
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6561
|
-
seeAllTo && /* @__PURE__ */ jsx(ShopLink, { className: styles$
|
|
6765
|
+
return /* @__PURE__ */ jsxs("section", { className: [styles$p.rail, inset2 ? styles$p.inset : ""].join(" "), "aria-label": title2, children: [
|
|
6766
|
+
/* @__PURE__ */ jsxs("div", { className: styles$p.header, children: [
|
|
6767
|
+
/* @__PURE__ */ jsx("h2", { className: styles$p.title, children: title2 }),
|
|
6768
|
+
seeAllTo && /* @__PURE__ */ jsx(ShopLink, { className: styles$p.seeAll, to: seeAllTo, children: "See all" })
|
|
6562
6769
|
] }),
|
|
6563
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
6770
|
+
/* @__PURE__ */ jsx("ul", { className: styles$p.track, children: products.map((product, i) => /* @__PURE__ */ jsx("li", { className: styles$p.item, children: /* @__PURE__ */ jsx(ProductTile, { product, priority: i < 2 }) }, product.sku)) })
|
|
6564
6771
|
] });
|
|
6565
6772
|
}
|
|
6566
|
-
const overlay$1 = "_overlay_s4eai_1";
|
|
6567
|
-
const scrim$3 = "_scrim_s4eai_10";
|
|
6568
|
-
const sheet$1 = "_sheet_s4eai_16";
|
|
6569
|
-
const grabArea = "_grabArea_s4eai_41";
|
|
6570
|
-
const grabber$1 = "_grabber_s4eai_51";
|
|
6571
|
-
const header$4 = "_header_s4eai_59";
|
|
6572
|
-
const title$a = "_title_s4eai_67";
|
|
6573
|
-
const close$1 = "_close_s4eai_71";
|
|
6574
|
-
const body$3 = "_body_s4eai_84";
|
|
6575
|
-
const footer = "_footer_s4eai_90";
|
|
6576
|
-
const styles$n = {
|
|
6577
|
-
overlay: overlay$1,
|
|
6578
|
-
scrim: scrim$3,
|
|
6579
|
-
sheet: sheet$1,
|
|
6580
|
-
grabArea,
|
|
6581
|
-
grabber: grabber$1,
|
|
6582
|
-
header: header$4,
|
|
6583
|
-
title: title$a,
|
|
6584
|
-
close: close$1,
|
|
6585
|
-
body: body$3,
|
|
6586
|
-
footer
|
|
6587
|
-
};
|
|
6588
6773
|
const FOCUSABLE = 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])';
|
|
6589
|
-
|
|
6590
|
-
function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }) {
|
|
6591
|
-
const sheetRef = useRef(null);
|
|
6592
|
-
const previouslyFocused = useRef(null);
|
|
6593
|
-
const dragStartY = useRef(null);
|
|
6594
|
-
const dragDistance = useRef(0);
|
|
6595
|
-
const [dragY, setDragY] = useState(0);
|
|
6596
|
-
const titleId = "bottomsheet-title";
|
|
6597
|
-
const onDragStart = useCallback((clientY) => {
|
|
6598
|
-
dragStartY.current = clientY;
|
|
6599
|
-
}, []);
|
|
6600
|
-
const onDragMove = useCallback((clientY) => {
|
|
6601
|
-
if (dragStartY.current === null) return;
|
|
6602
|
-
const distance = Math.max(0, clientY - dragStartY.current);
|
|
6603
|
-
dragDistance.current = distance;
|
|
6604
|
-
setDragY(distance);
|
|
6605
|
-
}, []);
|
|
6606
|
-
const onDragEnd = useCallback(() => {
|
|
6607
|
-
if (dragStartY.current === null) return;
|
|
6608
|
-
dragStartY.current = null;
|
|
6609
|
-
const dismissed = dragDistance.current > DISMISS_THRESHOLD_PX;
|
|
6610
|
-
dragDistance.current = 0;
|
|
6611
|
-
setDragY(0);
|
|
6612
|
-
if (dismissed) onClose();
|
|
6613
|
-
}, [onClose]);
|
|
6774
|
+
function useModalDialog(open, onClose, ref) {
|
|
6614
6775
|
const handleKeyDown = useCallback(
|
|
6615
6776
|
(e) => {
|
|
6616
6777
|
if (e.key === "Escape") {
|
|
@@ -6619,9 +6780,9 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
6619
6780
|
return;
|
|
6620
6781
|
}
|
|
6621
6782
|
if (e.key !== "Tab") return;
|
|
6622
|
-
const
|
|
6623
|
-
if (!
|
|
6624
|
-
const focusables = Array.from(
|
|
6783
|
+
const dialog = ref.current;
|
|
6784
|
+
if (!dialog) return;
|
|
6785
|
+
const focusables = Array.from(dialog.querySelectorAll(FOCUSABLE)).filter(
|
|
6625
6786
|
(el) => el.offsetParent !== null || el === document.activeElement
|
|
6626
6787
|
);
|
|
6627
6788
|
if (focusables.length === 0) {
|
|
@@ -6638,31 +6799,77 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
6638
6799
|
first.focus();
|
|
6639
6800
|
}
|
|
6640
6801
|
},
|
|
6641
|
-
[onClose]
|
|
6802
|
+
[onClose, ref]
|
|
6642
6803
|
);
|
|
6643
6804
|
useEffect(() => {
|
|
6644
6805
|
if (!open) return;
|
|
6645
|
-
previouslyFocused
|
|
6806
|
+
const previouslyFocused = document.activeElement;
|
|
6646
6807
|
document.addEventListener("keydown", handleKeyDown);
|
|
6647
|
-
|
|
6648
|
-
const first = sheet2?.querySelector(FOCUSABLE);
|
|
6649
|
-
first?.focus();
|
|
6808
|
+
ref.current?.querySelector(FOCUSABLE)?.focus();
|
|
6650
6809
|
const { overflow } = document.body.style;
|
|
6651
6810
|
document.body.style.overflow = "hidden";
|
|
6652
6811
|
return () => {
|
|
6653
6812
|
document.removeEventListener("keydown", handleKeyDown);
|
|
6654
6813
|
document.body.style.overflow = overflow;
|
|
6655
|
-
previouslyFocused
|
|
6814
|
+
previouslyFocused?.focus?.();
|
|
6656
6815
|
};
|
|
6657
|
-
}, [open, handleKeyDown]);
|
|
6816
|
+
}, [open, handleKeyDown, ref]);
|
|
6817
|
+
}
|
|
6818
|
+
const overlay$2 = "_overlay_s4eai_1";
|
|
6819
|
+
const scrim$4 = "_scrim_s4eai_10";
|
|
6820
|
+
const sheet$2 = "_sheet_s4eai_16";
|
|
6821
|
+
const grabArea = "_grabArea_s4eai_41";
|
|
6822
|
+
const grabber$1 = "_grabber_s4eai_51";
|
|
6823
|
+
const header$5 = "_header_s4eai_59";
|
|
6824
|
+
const title$b = "_title_s4eai_67";
|
|
6825
|
+
const close$2 = "_close_s4eai_71";
|
|
6826
|
+
const body$3 = "_body_s4eai_84";
|
|
6827
|
+
const footer = "_footer_s4eai_90";
|
|
6828
|
+
const styles$o = {
|
|
6829
|
+
overlay: overlay$2,
|
|
6830
|
+
scrim: scrim$4,
|
|
6831
|
+
sheet: sheet$2,
|
|
6832
|
+
grabArea,
|
|
6833
|
+
grabber: grabber$1,
|
|
6834
|
+
header: header$5,
|
|
6835
|
+
title: title$b,
|
|
6836
|
+
close: close$2,
|
|
6837
|
+
body: body$3,
|
|
6838
|
+
footer
|
|
6839
|
+
};
|
|
6840
|
+
const DISMISS_THRESHOLD_PX = 96;
|
|
6841
|
+
function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }) {
|
|
6842
|
+
const sheetRef = useRef(null);
|
|
6843
|
+
const dragStartY = useRef(null);
|
|
6844
|
+
const dragDistance = useRef(0);
|
|
6845
|
+
const [dragY, setDragY] = useState(0);
|
|
6846
|
+
const titleId = "bottomsheet-title";
|
|
6847
|
+
const onDragStart = useCallback((clientY) => {
|
|
6848
|
+
dragStartY.current = clientY;
|
|
6849
|
+
}, []);
|
|
6850
|
+
const onDragMove = useCallback((clientY) => {
|
|
6851
|
+
if (dragStartY.current === null) return;
|
|
6852
|
+
const distance = Math.max(0, clientY - dragStartY.current);
|
|
6853
|
+
dragDistance.current = distance;
|
|
6854
|
+
setDragY(distance);
|
|
6855
|
+
}, []);
|
|
6856
|
+
const onDragEnd = useCallback(() => {
|
|
6857
|
+
if (dragStartY.current === null) return;
|
|
6858
|
+
dragStartY.current = null;
|
|
6859
|
+
const dismissed = dragDistance.current > DISMISS_THRESHOLD_PX;
|
|
6860
|
+
dragDistance.current = 0;
|
|
6861
|
+
setDragY(0);
|
|
6862
|
+
if (dismissed) onClose();
|
|
6863
|
+
}, [onClose]);
|
|
6864
|
+
useModalDialog(open, onClose, sheetRef);
|
|
6658
6865
|
if (!open) return null;
|
|
6659
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6660
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6866
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$o.overlay, children: [
|
|
6867
|
+
/* @__PURE__ */ jsx("div", { className: styles$o.scrim, onClick: onClose, "aria-hidden": "true" }),
|
|
6661
6868
|
/* @__PURE__ */ jsxs(
|
|
6662
6869
|
ShopSurface,
|
|
6663
6870
|
{
|
|
6664
6871
|
tone: "light",
|
|
6665
|
-
className: styles$
|
|
6872
|
+
className: styles$o.sheet,
|
|
6666
6873
|
role: "dialog",
|
|
6667
6874
|
"aria-modal": "true",
|
|
6668
6875
|
"aria-labelledby": titleId,
|
|
@@ -6672,7 +6879,7 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
6672
6879
|
/* @__PURE__ */ jsx(
|
|
6673
6880
|
"div",
|
|
6674
6881
|
{
|
|
6675
|
-
className: styles$
|
|
6882
|
+
className: styles$o.grabArea,
|
|
6676
6883
|
onPointerDown: (e) => {
|
|
6677
6884
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
6678
6885
|
onDragStart(e.clientY);
|
|
@@ -6680,12 +6887,12 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
6680
6887
|
onPointerMove: (e) => onDragMove(e.clientY),
|
|
6681
6888
|
onPointerUp: onDragEnd,
|
|
6682
6889
|
onPointerCancel: onDragEnd,
|
|
6683
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
6890
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$o.grabber, "aria-hidden": "true" })
|
|
6684
6891
|
}
|
|
6685
6892
|
),
|
|
6686
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6687
|
-
/* @__PURE__ */ jsx("h2", { id: titleId, className: styles$
|
|
6688
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: styles$
|
|
6893
|
+
/* @__PURE__ */ jsxs("div", { className: styles$o.header, children: [
|
|
6894
|
+
/* @__PURE__ */ jsx("h2", { id: titleId, className: styles$o.title, children: title2 }),
|
|
6895
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: styles$o.close, onClick: onClose, "aria-label": "Close", children: /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
6689
6896
|
"path",
|
|
6690
6897
|
{
|
|
6691
6898
|
d: "M6 6l12 12M18 6L6 18",
|
|
@@ -6695,8 +6902,8 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
6695
6902
|
}
|
|
6696
6903
|
) }) })
|
|
6697
6904
|
] }),
|
|
6698
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6699
|
-
footer2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
6905
|
+
/* @__PURE__ */ jsx("div", { className: styles$o.body, children }),
|
|
6906
|
+
footer2 && /* @__PURE__ */ jsx("div", { className: styles$o.footer, children: footer2 })
|
|
6700
6907
|
]
|
|
6701
6908
|
}
|
|
6702
6909
|
)
|
|
@@ -6707,7 +6914,7 @@ const stepper = "_stepper_1rmip_10";
|
|
|
6707
6914
|
const cap = "_cap_1rmip_23";
|
|
6708
6915
|
const button = "_button_1rmip_31";
|
|
6709
6916
|
const value$1 = "_value_1rmip_50";
|
|
6710
|
-
const styles$
|
|
6917
|
+
const styles$n = {
|
|
6711
6918
|
wrap: wrap$1,
|
|
6712
6919
|
stepper,
|
|
6713
6920
|
cap,
|
|
@@ -6765,25 +6972,25 @@ function QtyStepper({ qty, max, onChange, onRemove, disabled: disabled2 }) {
|
|
|
6765
6972
|
function increment() {
|
|
6766
6973
|
if (!atMax) onChange(qty + 1);
|
|
6767
6974
|
}
|
|
6768
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6769
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6975
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$n.wrap, children: [
|
|
6976
|
+
/* @__PURE__ */ jsxs("div", { className: styles$n.stepper, children: [
|
|
6770
6977
|
/* @__PURE__ */ jsx(
|
|
6771
6978
|
"button",
|
|
6772
6979
|
{
|
|
6773
6980
|
type: "button",
|
|
6774
|
-
className: styles$
|
|
6981
|
+
className: styles$n.button,
|
|
6775
6982
|
onClick: decrement,
|
|
6776
6983
|
disabled: disabled2,
|
|
6777
6984
|
"aria-label": willDelete ? "Remove item" : "Decrease quantity",
|
|
6778
6985
|
children: willDelete ? /* @__PURE__ */ jsx(TrashIcon, {}) : /* @__PURE__ */ jsx(MinusIcon, {})
|
|
6779
6986
|
}
|
|
6780
6987
|
),
|
|
6781
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6988
|
+
/* @__PURE__ */ jsx("span", { className: styles$n.value, "aria-live": "polite", "aria-label": `Quantity ${qty}`, children: qty }),
|
|
6782
6989
|
/* @__PURE__ */ jsx(
|
|
6783
6990
|
"button",
|
|
6784
6991
|
{
|
|
6785
6992
|
type: "button",
|
|
6786
|
-
className: styles$
|
|
6993
|
+
className: styles$n.button,
|
|
6787
6994
|
onClick: increment,
|
|
6788
6995
|
disabled: disabled2 || atMax,
|
|
6789
6996
|
"aria-label": "Increase quantity",
|
|
@@ -6792,10 +6999,10 @@ function QtyStepper({ qty, max, onChange, onRemove, disabled: disabled2 }) {
|
|
|
6792
6999
|
}
|
|
6793
7000
|
)
|
|
6794
7001
|
] }),
|
|
6795
|
-
atMax && /* @__PURE__ */ jsx("span", { id: capId, className: styles$
|
|
7002
|
+
atMax && /* @__PURE__ */ jsx("span", { id: capId, className: styles$n.cap, role: "status", children: max === 0 ? "Out of stock" : `Only ${max} left` })
|
|
6796
7003
|
] });
|
|
6797
7004
|
}
|
|
6798
|
-
const row$
|
|
7005
|
+
const row$5 = "_row_1xbbn_1";
|
|
6799
7006
|
const pending = "_pending_1xbbn_7";
|
|
6800
7007
|
const media$1 = "_media_1xbbn_11";
|
|
6801
7008
|
const image$5 = "_image_1xbbn_21";
|
|
@@ -6805,14 +7012,14 @@ const oos$1 = "_oos_1xbbn_45";
|
|
|
6805
7012
|
const info$1 = "_info_1xbbn_58";
|
|
6806
7013
|
const head = "_head_1xbbn_66";
|
|
6807
7014
|
const meta = "_meta_1xbbn_73";
|
|
6808
|
-
const title$
|
|
7015
|
+
const title$a = "_title_1xbbn_80";
|
|
6809
7016
|
const details = "_details_1xbbn_92";
|
|
6810
7017
|
const detail = "_detail_1xbbn_92";
|
|
6811
7018
|
const price = "_price_1xbbn_106";
|
|
6812
7019
|
const amount = "_amount_1xbbn_114";
|
|
6813
7020
|
const was = "_was_1xbbn_120";
|
|
6814
|
-
const styles$
|
|
6815
|
-
row: row$
|
|
7021
|
+
const styles$m = {
|
|
7022
|
+
row: row$5,
|
|
6816
7023
|
pending,
|
|
6817
7024
|
media: media$1,
|
|
6818
7025
|
image: image$5,
|
|
@@ -6822,7 +7029,7 @@ const styles$l = {
|
|
|
6822
7029
|
info: info$1,
|
|
6823
7030
|
head,
|
|
6824
7031
|
meta,
|
|
6825
|
-
title: title$
|
|
7032
|
+
title: title$a,
|
|
6826
7033
|
details,
|
|
6827
7034
|
detail,
|
|
6828
7035
|
price,
|
|
@@ -6845,24 +7052,24 @@ function CartLineItem({
|
|
|
6845
7052
|
const displayImage = image2 ?? item2.image;
|
|
6846
7053
|
const pairs = variantPairs(item2.attributes);
|
|
6847
7054
|
const soldOut = item2.available === 0;
|
|
6848
|
-
return /* @__PURE__ */ jsxs("div", { className: [styles$
|
|
6849
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6850
|
-
displayImage ? /* @__PURE__ */ jsx(ShopImage, { src: displayImage, alt: "", fill: true, sizes: "100px", className: styles$
|
|
6851
|
-
soldOut ? /* @__PURE__ */ jsx("span", { className: styles$
|
|
7055
|
+
return /* @__PURE__ */ jsxs("div", { className: [styles$m.row, pending2 ? styles$m.pending : ""].join(" "), children: [
|
|
7056
|
+
/* @__PURE__ */ jsxs("div", { className: styles$m.media, children: [
|
|
7057
|
+
displayImage ? /* @__PURE__ */ jsx(ShopImage, { src: displayImage, alt: "", fill: true, sizes: "100px", className: styles$m.image }) : /* @__PURE__ */ jsx("div", { className: styles$m.placeholder, "aria-hidden": "true" }),
|
|
7058
|
+
soldOut ? /* @__PURE__ */ jsx("span", { className: styles$m.oos, children: "Out of stock" }) : discountPct2 !== void 0 && /* @__PURE__ */ jsx("span", { className: styles$m.saleBadge, children: /* @__PURE__ */ jsx(SaleBadge, { pct: discountPct2 }) })
|
|
6852
7059
|
] }),
|
|
6853
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6854
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6855
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6856
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6857
|
-
pairs.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
7060
|
+
/* @__PURE__ */ jsxs("div", { className: styles$m.info, children: [
|
|
7061
|
+
/* @__PURE__ */ jsxs("div", { className: styles$m.head, children: [
|
|
7062
|
+
/* @__PURE__ */ jsxs("div", { className: styles$m.meta, children: [
|
|
7063
|
+
/* @__PURE__ */ jsx("span", { className: styles$m.title, children: displayTitle }),
|
|
7064
|
+
pairs.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$m.details, children: pairs.map(({ key, label: label2, value: value2 }) => /* @__PURE__ */ jsxs("span", { className: styles$m.detail, children: [
|
|
6858
7065
|
label2,
|
|
6859
7066
|
": ",
|
|
6860
7067
|
value2
|
|
6861
7068
|
] }, key)) })
|
|
6862
7069
|
] }),
|
|
6863
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6864
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6865
|
-
compareAt2 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
7070
|
+
/* @__PURE__ */ jsxs("div", { className: styles$m.price, children: [
|
|
7071
|
+
/* @__PURE__ */ jsx("span", { className: styles$m.amount, children: format(item2.line_total) }),
|
|
7072
|
+
compareAt2 && /* @__PURE__ */ jsx("span", { className: styles$m.was, children: format(compareAt2) })
|
|
6866
7073
|
] })
|
|
6867
7074
|
] }),
|
|
6868
7075
|
/* @__PURE__ */ jsx(
|
|
@@ -6879,21 +7086,21 @@ function CartLineItem({
|
|
|
6879
7086
|
] });
|
|
6880
7087
|
}
|
|
6881
7088
|
const box$1 = "_box_1cf1a_1";
|
|
6882
|
-
const row$
|
|
6883
|
-
const icon$
|
|
7089
|
+
const row$4 = "_row_1cf1a_10";
|
|
7090
|
+
const icon$2 = "_icon_1cf1a_16";
|
|
6884
7091
|
const label = "_label_1cf1a_22";
|
|
6885
7092
|
const divider$1 = "_divider_1cf1a_29";
|
|
6886
|
-
const styles$
|
|
7093
|
+
const styles$l = {
|
|
6887
7094
|
box: box$1,
|
|
6888
|
-
row: row$
|
|
6889
|
-
icon: icon$
|
|
7095
|
+
row: row$4,
|
|
7096
|
+
icon: icon$2,
|
|
6890
7097
|
label,
|
|
6891
7098
|
divider: divider$1
|
|
6892
7099
|
};
|
|
6893
7100
|
function ShippingInfo() {
|
|
6894
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
6895
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6896
|
-
/* @__PURE__ */ jsxs("svg", { className: styles$
|
|
7101
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$l.box, "aria-label": "Shipping and returns", children: [
|
|
7102
|
+
/* @__PURE__ */ jsxs("div", { className: styles$l.row, children: [
|
|
7103
|
+
/* @__PURE__ */ jsxs("svg", { className: styles$l.icon, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
6897
7104
|
/* @__PURE__ */ jsx(
|
|
6898
7105
|
"path",
|
|
6899
7106
|
{
|
|
@@ -6906,11 +7113,11 @@ function ShippingInfo() {
|
|
|
6906
7113
|
/* @__PURE__ */ jsx("circle", { cx: "7", cy: "17", r: "1.6", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
6907
7114
|
/* @__PURE__ */ jsx("circle", { cx: "17.5", cy: "17", r: "1.6", stroke: "currentColor", strokeWidth: "1.5" })
|
|
6908
7115
|
] }),
|
|
6909
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
7116
|
+
/* @__PURE__ */ jsx("p", { className: styles$l.label, children: "Standard or express delivery" })
|
|
6910
7117
|
] }),
|
|
6911
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6912
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6913
|
-
/* @__PURE__ */ jsxs("svg", { className: styles$
|
|
7118
|
+
/* @__PURE__ */ jsx("div", { className: styles$l.divider, role: "presentation" }),
|
|
7119
|
+
/* @__PURE__ */ jsxs("div", { className: styles$l.row, children: [
|
|
7120
|
+
/* @__PURE__ */ jsxs("svg", { className: styles$l.icon, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
6914
7121
|
/* @__PURE__ */ jsx(
|
|
6915
7122
|
"path",
|
|
6916
7123
|
{
|
|
@@ -6932,7 +7139,7 @@ function ShippingInfo() {
|
|
|
6932
7139
|
}
|
|
6933
7140
|
)
|
|
6934
7141
|
] }),
|
|
6935
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
7142
|
+
/* @__PURE__ */ jsx("p", { className: styles$l.label, children: "30 days returns" })
|
|
6936
7143
|
] })
|
|
6937
7144
|
] });
|
|
6938
7145
|
}
|
|
@@ -6941,7 +7148,7 @@ const floating$1 = "_floating_1aly7_16";
|
|
|
6941
7148
|
const divider = "_divider_1aly7_22";
|
|
6942
7149
|
const info = "_info_1aly7_26";
|
|
6943
7150
|
const actions = "_actions_1aly7_33";
|
|
6944
|
-
const styles$
|
|
7151
|
+
const styles$k = {
|
|
6945
7152
|
bar,
|
|
6946
7153
|
floating: floating$1,
|
|
6947
7154
|
divider,
|
|
@@ -6949,9 +7156,9 @@ const styles$j = {
|
|
|
6949
7156
|
actions
|
|
6950
7157
|
};
|
|
6951
7158
|
function StickyCtaBar({ children, info: info2, variant = "floating" }) {
|
|
6952
|
-
return /* @__PURE__ */ jsxs("div", { className: [styles$
|
|
6953
|
-
info2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
6954
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
7159
|
+
return /* @__PURE__ */ jsxs("div", { className: [styles$k.bar, styles$k[variant]].join(" "), children: [
|
|
7160
|
+
info2 && /* @__PURE__ */ jsx("div", { className: styles$k.info, children: info2 }),
|
|
7161
|
+
/* @__PURE__ */ jsx("div", { className: styles$k.actions, children })
|
|
6955
7162
|
] });
|
|
6956
7163
|
}
|
|
6957
7164
|
const surface = "_surface_1wfue_15";
|
|
@@ -6962,7 +7169,7 @@ const sectionHeader = "_sectionHeader_1wfue_40";
|
|
|
6962
7169
|
const sectionTitle = "_sectionTitle_1wfue_46";
|
|
6963
7170
|
const count = "_count_1wfue_53";
|
|
6964
7171
|
const lines = "_lines_1wfue_73";
|
|
6965
|
-
const styles$
|
|
7172
|
+
const styles$j = {
|
|
6966
7173
|
surface,
|
|
6967
7174
|
screen,
|
|
6968
7175
|
body: body$2,
|
|
@@ -6973,7 +7180,7 @@ const styles$i = {
|
|
|
6973
7180
|
lines
|
|
6974
7181
|
};
|
|
6975
7182
|
function CartView(props = {}) {
|
|
6976
|
-
return /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, className: styles$
|
|
7183
|
+
return /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, className: styles$j.surface, children: /* @__PURE__ */ jsx(CartViewContent, { ...props }) });
|
|
6977
7184
|
}
|
|
6978
7185
|
function CartViewContent({
|
|
6979
7186
|
onContinueShopping,
|
|
@@ -7112,14 +7319,14 @@ function CartViewContent({
|
|
|
7112
7319
|
}
|
|
7113
7320
|
const locked = cart2.locked !== void 0;
|
|
7114
7321
|
const itemCount = cart2.items.reduce((n, i) => n + i.qty, 0);
|
|
7115
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
7116
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7117
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
7118
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7119
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
7120
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
7322
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$j.screen, children: [
|
|
7323
|
+
/* @__PURE__ */ jsxs("div", { className: styles$j.body, children: [
|
|
7324
|
+
/* @__PURE__ */ jsxs("section", { className: styles$j.items, children: [
|
|
7325
|
+
/* @__PURE__ */ jsxs("div", { className: styles$j.sectionHeader, children: [
|
|
7326
|
+
/* @__PURE__ */ jsx("h2", { className: styles$j.sectionTitle, children: "Items" }),
|
|
7327
|
+
/* @__PURE__ */ jsx("span", { className: styles$j.count, children: itemCount })
|
|
7121
7328
|
] }),
|
|
7122
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
7329
|
+
/* @__PURE__ */ jsx("ul", { className: styles$j.lines, children: cart2.items.map((item2) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
7123
7330
|
CartLineItem,
|
|
7124
7331
|
{
|
|
7125
7332
|
item: item2,
|
|
@@ -7167,7 +7374,7 @@ const share = "_share_h8m00_37";
|
|
|
7167
7374
|
const dots$2 = "_dots_h8m00_54";
|
|
7168
7375
|
const dot$2 = "_dot_h8m00_54";
|
|
7169
7376
|
const dotActive$2 = "_dotActive_h8m00_78";
|
|
7170
|
-
const styles$
|
|
7377
|
+
const styles$i = {
|
|
7171
7378
|
gallery,
|
|
7172
7379
|
track: track$2,
|
|
7173
7380
|
slide: slide$1,
|
|
@@ -7205,7 +7412,7 @@ function MediaGallery({ media: media2, alt }) {
|
|
|
7205
7412
|
setActive(index);
|
|
7206
7413
|
}
|
|
7207
7414
|
if (media2.length === 0) {
|
|
7208
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
7415
|
+
return /* @__PURE__ */ jsx("div", { className: styles$i.placeholder, "aria-hidden": "true" });
|
|
7209
7416
|
}
|
|
7210
7417
|
function share2() {
|
|
7211
7418
|
if (typeof navigator !== "undefined" && navigator.share) {
|
|
@@ -7213,8 +7420,8 @@ function MediaGallery({ media: media2, alt }) {
|
|
|
7213
7420
|
});
|
|
7214
7421
|
}
|
|
7215
7422
|
}
|
|
7216
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
7217
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: styles$
|
|
7423
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$i.gallery, children: [
|
|
7424
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: styles$i.share, onClick: share2, "aria-label": "Share", children: /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
7218
7425
|
"path",
|
|
7219
7426
|
{
|
|
7220
7427
|
d: "M12 3v12M12 3 8 7m4-4 4 4M5 12v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6",
|
|
@@ -7224,47 +7431,47 @@ function MediaGallery({ media: media2, alt }) {
|
|
|
7224
7431
|
strokeLinejoin: "round"
|
|
7225
7432
|
}
|
|
7226
7433
|
) }) }),
|
|
7227
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
7434
|
+
/* @__PURE__ */ jsx("div", { className: styles$i.track, ref: trackRef, role: "group", "aria-label": `${alt} images`, children: media2.map((src, i) => /* @__PURE__ */ jsx("div", { className: styles$i.slide, children: /* @__PURE__ */ jsx(
|
|
7228
7435
|
ShopImage,
|
|
7229
7436
|
{
|
|
7230
7437
|
src,
|
|
7231
7438
|
alt: `${alt} — image ${i + 1} of ${media2.length}`,
|
|
7232
7439
|
fill: true,
|
|
7233
7440
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
7234
|
-
className: styles$
|
|
7441
|
+
className: styles$i.image,
|
|
7235
7442
|
priority: i === 0
|
|
7236
7443
|
}
|
|
7237
7444
|
) }, src)) }),
|
|
7238
|
-
media2.length > 1 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
7445
|
+
media2.length > 1 && /* @__PURE__ */ jsx("div", { className: styles$i.dots, role: "tablist", "aria-label": "Gallery pagination", children: media2.map((src, i) => /* @__PURE__ */ jsx(
|
|
7239
7446
|
"button",
|
|
7240
7447
|
{
|
|
7241
7448
|
type: "button",
|
|
7242
7449
|
role: "tab",
|
|
7243
7450
|
"aria-selected": i === active,
|
|
7244
7451
|
"aria-label": `Go to image ${i + 1}`,
|
|
7245
|
-
className: [styles$
|
|
7452
|
+
className: [styles$i.dot, i === active ? styles$i.dotActive : ""].join(" "),
|
|
7246
7453
|
onClick: () => goTo(i)
|
|
7247
7454
|
},
|
|
7248
7455
|
src
|
|
7249
7456
|
)) })
|
|
7250
7457
|
] });
|
|
7251
7458
|
}
|
|
7252
|
-
const scrim$
|
|
7253
|
-
const sheet = "_sheet_8wz6r_17";
|
|
7459
|
+
const scrim$3 = "_scrim_8wz6r_6";
|
|
7460
|
+
const sheet$1 = "_sheet_8wz6r_17";
|
|
7254
7461
|
const grabber = "_grabber_8wz6r_29";
|
|
7255
|
-
const header$
|
|
7256
|
-
const title$
|
|
7257
|
-
const close = "_close_8wz6r_51";
|
|
7462
|
+
const header$4 = "_header_8wz6r_37";
|
|
7463
|
+
const title$9 = "_title_8wz6r_45";
|
|
7464
|
+
const close$1 = "_close_8wz6r_51";
|
|
7258
7465
|
const tableWrap = "_tableWrap_8wz6r_71";
|
|
7259
7466
|
const table = "_table_8wz6r_71";
|
|
7260
7467
|
const notes = "_notes_8wz6r_95";
|
|
7261
|
-
const styles$
|
|
7262
|
-
scrim: scrim$
|
|
7263
|
-
sheet,
|
|
7468
|
+
const styles$h = {
|
|
7469
|
+
scrim: scrim$3,
|
|
7470
|
+
sheet: sheet$1,
|
|
7264
7471
|
grabber,
|
|
7265
|
-
header: header$
|
|
7266
|
-
title: title$
|
|
7267
|
-
close,
|
|
7472
|
+
header: header$4,
|
|
7473
|
+
title: title$9,
|
|
7474
|
+
close: close$1,
|
|
7268
7475
|
tableWrap,
|
|
7269
7476
|
table,
|
|
7270
7477
|
notes
|
|
@@ -7283,24 +7490,24 @@ function SizeGuideSheet({ guide, onClose }) {
|
|
|
7283
7490
|
const rows = guide.rows ?? [];
|
|
7284
7491
|
const notes2 = guide.notes ?? [];
|
|
7285
7492
|
const hasTable = columns.length > 0 && rows.length > 0;
|
|
7286
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
7493
|
+
return /* @__PURE__ */ jsx("div", { className: styles$h.scrim, onClick: onClose, children: /* @__PURE__ */ jsxs(
|
|
7287
7494
|
"div",
|
|
7288
7495
|
{
|
|
7289
|
-
className: styles$
|
|
7496
|
+
className: styles$h.sheet,
|
|
7290
7497
|
role: "dialog",
|
|
7291
7498
|
"aria-modal": "true",
|
|
7292
7499
|
"aria-labelledby": "size-guide-title",
|
|
7293
7500
|
onClick: (e) => e.stopPropagation(),
|
|
7294
7501
|
children: [
|
|
7295
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
7296
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7297
|
-
/* @__PURE__ */ jsx("h2", { id: "size-guide-title", className: styles$
|
|
7502
|
+
/* @__PURE__ */ jsx("div", { className: styles$h.grabber, "aria-hidden": "true" }),
|
|
7503
|
+
/* @__PURE__ */ jsxs("div", { className: styles$h.header, children: [
|
|
7504
|
+
/* @__PURE__ */ jsx("h2", { id: "size-guide-title", className: styles$h.title, children: guide.title }),
|
|
7298
7505
|
/* @__PURE__ */ jsx(
|
|
7299
7506
|
"button",
|
|
7300
7507
|
{
|
|
7301
7508
|
ref: closeRef,
|
|
7302
7509
|
type: "button",
|
|
7303
|
-
className: styles$
|
|
7510
|
+
className: styles$h.close,
|
|
7304
7511
|
onClick: onClose,
|
|
7305
7512
|
"aria-label": "Close size guide",
|
|
7306
7513
|
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
@@ -7315,38 +7522,38 @@ function SizeGuideSheet({ guide, onClose }) {
|
|
|
7315
7522
|
}
|
|
7316
7523
|
)
|
|
7317
7524
|
] }),
|
|
7318
|
-
hasTable && /* @__PURE__ */ jsx("div", { className: styles$
|
|
7525
|
+
hasTable && /* @__PURE__ */ jsx("div", { className: styles$h.tableWrap, children: /* @__PURE__ */ jsxs("table", { className: styles$h.table, children: [
|
|
7319
7526
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((c) => /* @__PURE__ */ jsx("th", { scope: "col", children: c }, c)) }) }),
|
|
7320
7527
|
/* @__PURE__ */ jsx("tbody", { children: rows.map((row2) => /* @__PURE__ */ jsx("tr", { children: row2.map(
|
|
7321
7528
|
(cell, i) => i === 0 ? /* @__PURE__ */ jsx("th", { scope: "row", children: cell }, cell) : /* @__PURE__ */ jsx("td", { children: cell }, `${cell}-${i}`)
|
|
7322
7529
|
) }, row2.join("|"))) })
|
|
7323
7530
|
] }) }),
|
|
7324
|
-
notes2.length > 0 && /* @__PURE__ */ jsx("ul", { className: styles$
|
|
7531
|
+
notes2.length > 0 && /* @__PURE__ */ jsx("ul", { className: styles$h.notes, children: notes2.map((n) => /* @__PURE__ */ jsx("li", { children: n }, n)) })
|
|
7325
7532
|
]
|
|
7326
7533
|
}
|
|
7327
7534
|
) });
|
|
7328
7535
|
}
|
|
7329
7536
|
const root$2 = "_root_9zj90_1";
|
|
7330
|
-
const header$
|
|
7331
|
-
const title$
|
|
7537
|
+
const header$3 = "_header_9zj90_7";
|
|
7538
|
+
const title$8 = "_title_9zj90_12";
|
|
7332
7539
|
const chips = "_chips_9zj90_20";
|
|
7333
7540
|
const chip = "_chip_9zj90_20";
|
|
7334
7541
|
const selected$2 = "_selected_9zj90_44";
|
|
7335
7542
|
const disabled$1 = "_disabled_9zj90_56";
|
|
7336
7543
|
const error = "_error_9zj90_64";
|
|
7337
7544
|
const sizeGuide = "_sizeGuide_9zj90_71";
|
|
7338
|
-
const chevron$
|
|
7339
|
-
const styles$
|
|
7545
|
+
const chevron$2 = "_chevron_9zj90_85";
|
|
7546
|
+
const styles$g = {
|
|
7340
7547
|
root: root$2,
|
|
7341
|
-
header: header$
|
|
7342
|
-
title: title$
|
|
7548
|
+
header: header$3,
|
|
7549
|
+
title: title$8,
|
|
7343
7550
|
chips,
|
|
7344
7551
|
chip,
|
|
7345
7552
|
selected: selected$2,
|
|
7346
7553
|
disabled: disabled$1,
|
|
7347
7554
|
error,
|
|
7348
7555
|
sizeGuide,
|
|
7349
|
-
chevron: chevron$
|
|
7556
|
+
chevron: chevron$2
|
|
7350
7557
|
};
|
|
7351
7558
|
function SizeSelector({
|
|
7352
7559
|
sizes,
|
|
@@ -7356,9 +7563,9 @@ function SizeSelector({
|
|
|
7356
7563
|
guide
|
|
7357
7564
|
}) {
|
|
7358
7565
|
const [guideOpen, setGuideOpen] = useState(false);
|
|
7359
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
7360
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
7361
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
7566
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$g.root, "aria-labelledby": "size-heading", children: [
|
|
7567
|
+
/* @__PURE__ */ jsx("div", { className: styles$g.header, children: /* @__PURE__ */ jsx("h2", { id: "size-heading", className: styles$g.title, children: "Size" }) }),
|
|
7568
|
+
/* @__PURE__ */ jsx("div", { className: styles$g.chips, role: "radiogroup", "aria-label": "Size", "aria-required": "true", children: sizes.map((size) => {
|
|
7362
7569
|
const isSelected = size.value === selected2;
|
|
7363
7570
|
const disabled2 = !size.available;
|
|
7364
7571
|
return /* @__PURE__ */ jsxs(
|
|
@@ -7369,7 +7576,7 @@ function SizeSelector({
|
|
|
7369
7576
|
"aria-checked": isSelected,
|
|
7370
7577
|
"aria-disabled": disabled2 || void 0,
|
|
7371
7578
|
disabled: disabled2,
|
|
7372
|
-
className: [styles$
|
|
7579
|
+
className: [styles$g.chip, isSelected ? styles$g.selected : "", disabled2 ? styles$g.disabled : ""].filter(Boolean).join(" "),
|
|
7373
7580
|
onClick: () => !disabled2 && onSelect(size.value),
|
|
7374
7581
|
children: [
|
|
7375
7582
|
size.value,
|
|
@@ -7379,12 +7586,12 @@ function SizeSelector({
|
|
|
7379
7586
|
size.value
|
|
7380
7587
|
);
|
|
7381
7588
|
}) }),
|
|
7382
|
-
error2 && /* @__PURE__ */ jsx("p", { className: styles$
|
|
7589
|
+
error2 && /* @__PURE__ */ jsx("p", { className: styles$g.error, role: "alert", children: "Please select a size" }),
|
|
7383
7590
|
guide && /* @__PURE__ */ jsxs(
|
|
7384
7591
|
"button",
|
|
7385
7592
|
{
|
|
7386
7593
|
type: "button",
|
|
7387
|
-
className: styles$
|
|
7594
|
+
className: styles$g.sizeGuide,
|
|
7388
7595
|
onClick: () => setGuideOpen(true),
|
|
7389
7596
|
"aria-haspopup": "dialog",
|
|
7390
7597
|
"aria-expanded": guideOpen,
|
|
@@ -7393,7 +7600,7 @@ function SizeSelector({
|
|
|
7393
7600
|
/* @__PURE__ */ jsx(
|
|
7394
7601
|
"svg",
|
|
7395
7602
|
{
|
|
7396
|
-
className: styles$
|
|
7603
|
+
className: styles$g.chevron,
|
|
7397
7604
|
width: "12",
|
|
7398
7605
|
height: "12",
|
|
7399
7606
|
viewBox: "0 0 12 12",
|
|
@@ -7418,8 +7625,8 @@ function SizeSelector({
|
|
|
7418
7625
|
] });
|
|
7419
7626
|
}
|
|
7420
7627
|
const root$1 = "_root_1j4n8_1";
|
|
7421
|
-
const header$
|
|
7422
|
-
const title$
|
|
7628
|
+
const header$2 = "_header_1j4n8_7";
|
|
7629
|
+
const title$7 = "_title_1j4n8_14";
|
|
7423
7630
|
const value = "_value_1j4n8_19";
|
|
7424
7631
|
const tiles = "_tiles_1j4n8_24";
|
|
7425
7632
|
const tile = "_tile_1j4n8_24";
|
|
@@ -7427,12 +7634,12 @@ const selected$1 = "_selected_1j4n8_48";
|
|
|
7427
7634
|
const media = "_media_1j4n8_32";
|
|
7428
7635
|
const image$3 = "_image_1j4n8_60";
|
|
7429
7636
|
const placeholder = "_placeholder_1j4n8_64";
|
|
7430
|
-
const scrim$
|
|
7637
|
+
const scrim$2 = "_scrim_1j4n8_72";
|
|
7431
7638
|
const stockBadge = "_stockBadge_1j4n8_91";
|
|
7432
|
-
const styles$
|
|
7639
|
+
const styles$f = {
|
|
7433
7640
|
root: root$1,
|
|
7434
|
-
header: header$
|
|
7435
|
-
title: title$
|
|
7641
|
+
header: header$2,
|
|
7642
|
+
title: title$7,
|
|
7436
7643
|
value,
|
|
7437
7644
|
tiles,
|
|
7438
7645
|
tile,
|
|
@@ -7440,17 +7647,17 @@ const styles$e = {
|
|
|
7440
7647
|
media,
|
|
7441
7648
|
image: image$3,
|
|
7442
7649
|
placeholder,
|
|
7443
|
-
scrim: scrim$
|
|
7650
|
+
scrim: scrim$2,
|
|
7444
7651
|
stockBadge
|
|
7445
7652
|
};
|
|
7446
7653
|
function ColorSelector({ colours, selected: selected2, onSelect }) {
|
|
7447
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
7448
|
-
/* @__PURE__ */ jsxs("p", { className: styles$
|
|
7449
|
-
/* @__PURE__ */ jsx("span", { id: "colour-heading", className: styles$
|
|
7654
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$f.root, "aria-labelledby": "colour-heading", children: [
|
|
7655
|
+
/* @__PURE__ */ jsxs("p", { className: styles$f.header, children: [
|
|
7656
|
+
/* @__PURE__ */ jsx("span", { id: "colour-heading", className: styles$f.title, children: "Color:" }),
|
|
7450
7657
|
" ",
|
|
7451
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
7658
|
+
/* @__PURE__ */ jsx("span", { className: styles$f.value, children: selected2 ?? "Select" })
|
|
7452
7659
|
] }),
|
|
7453
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
7660
|
+
/* @__PURE__ */ jsx("div", { className: styles$f.tiles, role: "radiogroup", "aria-label": "Color", "aria-required": "true", children: colours.map((c) => {
|
|
7454
7661
|
const isSelected = c.value === selected2;
|
|
7455
7662
|
const soldOut = !c.available;
|
|
7456
7663
|
const lowStock = !soldOut && c.remaining !== void 0 && c.remaining > 0 && c.remaining <= 5;
|
|
@@ -7461,14 +7668,14 @@ function ColorSelector({ colours, selected: selected2, onSelect }) {
|
|
|
7461
7668
|
role: "radio",
|
|
7462
7669
|
"aria-checked": isSelected,
|
|
7463
7670
|
"aria-label": `${c.value}${soldOut ? " (out of stock)" : ""}`,
|
|
7464
|
-
className: [styles$
|
|
7671
|
+
className: [styles$f.tile, isSelected ? styles$f.selected : ""].filter(Boolean).join(" "),
|
|
7465
7672
|
onClick: () => onSelect(c.value),
|
|
7466
7673
|
children: [
|
|
7467
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
7468
|
-
c.image ? /* @__PURE__ */ jsx(ShopImage, { src: c.image, alt: "", fill: true, sizes: "79px", className: styles$
|
|
7469
|
-
soldOut && /* @__PURE__ */ jsx("span", { className: styles$
|
|
7674
|
+
/* @__PURE__ */ jsxs("span", { className: styles$f.media, children: [
|
|
7675
|
+
c.image ? /* @__PURE__ */ jsx(ShopImage, { src: c.image, alt: "", fill: true, sizes: "79px", className: styles$f.image }) : /* @__PURE__ */ jsx("span", { className: styles$f.placeholder, "aria-hidden": "true" }),
|
|
7676
|
+
soldOut && /* @__PURE__ */ jsx("span", { className: styles$f.scrim, "aria-hidden": "true", children: "Out of stock" })
|
|
7470
7677
|
] }),
|
|
7471
|
-
lowStock && /* @__PURE__ */ jsxs("span", { className: styles$
|
|
7678
|
+
lowStock && /* @__PURE__ */ jsxs("span", { className: styles$f.stockBadge, "aria-hidden": "true", children: [
|
|
7472
7679
|
c.remaining,
|
|
7473
7680
|
" left"
|
|
7474
7681
|
] })
|
|
@@ -7485,7 +7692,7 @@ const options = "_options_1mnz1_16";
|
|
|
7485
7692
|
const option = "_option_1mnz1_16";
|
|
7486
7693
|
const selected = "_selected_1mnz1_36";
|
|
7487
7694
|
const disabled = "_disabled_1mnz1_42";
|
|
7488
|
-
const styles$
|
|
7695
|
+
const styles$e = {
|
|
7489
7696
|
fieldset,
|
|
7490
7697
|
legend,
|
|
7491
7698
|
options,
|
|
@@ -7506,9 +7713,9 @@ function VariantSelector({
|
|
|
7506
7713
|
const values = Object.values(variant.attributes);
|
|
7507
7714
|
return values.length > 0 ? values.join(" · ") : variant.sku;
|
|
7508
7715
|
}
|
|
7509
|
-
return /* @__PURE__ */ jsxs("fieldset", { className: styles$
|
|
7510
|
-
/* @__PURE__ */ jsx("legend", { className: styles$
|
|
7511
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
7716
|
+
return /* @__PURE__ */ jsxs("fieldset", { className: styles$e.fieldset, children: [
|
|
7717
|
+
/* @__PURE__ */ jsx("legend", { className: styles$e.legend, children: "Select an option" }),
|
|
7718
|
+
/* @__PURE__ */ jsx("div", { className: styles$e.options, role: "radiogroup", "aria-label": "Variant", children: variants.map((variant) => {
|
|
7512
7719
|
const selected2 = variant.sku === selectedSku;
|
|
7513
7720
|
const disabled2 = !variant.in_stock;
|
|
7514
7721
|
return /* @__PURE__ */ jsxs(
|
|
@@ -7520,9 +7727,9 @@ function VariantSelector({
|
|
|
7520
7727
|
"aria-disabled": disabled2 || void 0,
|
|
7521
7728
|
disabled: disabled2,
|
|
7522
7729
|
className: [
|
|
7523
|
-
styles$
|
|
7524
|
-
selected2 ? styles$
|
|
7525
|
-
disabled2 ? styles$
|
|
7730
|
+
styles$e.option,
|
|
7731
|
+
selected2 ? styles$e.selected : "",
|
|
7732
|
+
disabled2 ? styles$e.disabled : ""
|
|
7526
7733
|
].filter(Boolean).join(" "),
|
|
7527
7734
|
onClick: () => !disabled2 && onSelect(variant.sku),
|
|
7528
7735
|
children: [
|
|
@@ -7537,15 +7744,15 @@ function VariantSelector({
|
|
|
7537
7744
|
}
|
|
7538
7745
|
const root = "_root_t4qba_2";
|
|
7539
7746
|
const group = "_group_t4qba_8";
|
|
7540
|
-
const title$
|
|
7747
|
+
const title$6 = "_title_t4qba_14";
|
|
7541
7748
|
const body$1 = "_body_t4qba_22";
|
|
7542
7749
|
const paragraph = "_paragraph_t4qba_26";
|
|
7543
7750
|
const clamped = "_clamped_t4qba_46";
|
|
7544
7751
|
const toggle = "_toggle_t4qba_51";
|
|
7545
|
-
const styles$
|
|
7752
|
+
const styles$d = {
|
|
7546
7753
|
root,
|
|
7547
7754
|
group,
|
|
7548
|
-
title: title$
|
|
7755
|
+
title: title$6,
|
|
7549
7756
|
body: body$1,
|
|
7550
7757
|
paragraph,
|
|
7551
7758
|
clamped,
|
|
@@ -7558,16 +7765,16 @@ function ProductDetails({ description: description2 }) {
|
|
|
7558
7765
|
const [expanded, setExpanded] = useState(false);
|
|
7559
7766
|
const paragraphs = paragraphsOf(description2);
|
|
7560
7767
|
if (paragraphs.length === 0) return null;
|
|
7561
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
7562
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7563
|
-
/* @__PURE__ */ jsx("h2", { id: "details-heading", className: styles$
|
|
7564
|
-
/* @__PURE__ */ jsx("div", { className: [styles$
|
|
7768
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$d.root, "aria-labelledby": "details-heading", children: [
|
|
7769
|
+
/* @__PURE__ */ jsxs("div", { className: styles$d.group, children: [
|
|
7770
|
+
/* @__PURE__ */ jsx("h2", { id: "details-heading", className: styles$d.title, children: "Product details" }),
|
|
7771
|
+
/* @__PURE__ */ jsx("div", { className: [styles$d.body, expanded ? "" : styles$d.clamped].join(" "), children: paragraphs.map((p) => /* @__PURE__ */ jsx("p", { className: styles$d.paragraph, children: p }, p)) })
|
|
7565
7772
|
] }),
|
|
7566
7773
|
/* @__PURE__ */ jsx(
|
|
7567
7774
|
"button",
|
|
7568
7775
|
{
|
|
7569
7776
|
type: "button",
|
|
7570
|
-
className: styles$
|
|
7777
|
+
className: styles$d.toggle,
|
|
7571
7778
|
"aria-expanded": expanded,
|
|
7572
7779
|
onClick: () => setExpanded((v) => !v),
|
|
7573
7780
|
children: expanded ? "Less" : "more"
|
|
@@ -7575,25 +7782,25 @@ function ProductDetails({ description: description2 }) {
|
|
|
7575
7782
|
)
|
|
7576
7783
|
] });
|
|
7577
7784
|
}
|
|
7578
|
-
const row$
|
|
7785
|
+
const row$3 = "_row_l4edh_1";
|
|
7579
7786
|
const badge$1 = "_badge_l4edh_11";
|
|
7580
|
-
const styles$
|
|
7581
|
-
row: row$
|
|
7787
|
+
const styles$c = {
|
|
7788
|
+
row: row$3,
|
|
7582
7789
|
badge: badge$1
|
|
7583
7790
|
};
|
|
7584
7791
|
function PdpBadges({ badges }) {
|
|
7585
7792
|
const flags = badges.filter((b) => b.trim().length > 0);
|
|
7586
7793
|
if (flags.length === 0) return null;
|
|
7587
|
-
return /* @__PURE__ */ jsx("ul", { className: styles$
|
|
7794
|
+
return /* @__PURE__ */ jsx("ul", { className: styles$c.row, children: flags.map((flag) => /* @__PURE__ */ jsx("li", { className: styles$c.badge, children: flag }, flag)) });
|
|
7588
7795
|
}
|
|
7589
7796
|
const banner = "_banner_1xvw4_2";
|
|
7590
7797
|
const message = "_message_1xvw4_14";
|
|
7591
|
-
const icon = "_icon_1xvw4_22";
|
|
7798
|
+
const icon$1 = "_icon_1xvw4_22";
|
|
7592
7799
|
const timer = "_timer_1xvw4_27";
|
|
7593
|
-
const styles$
|
|
7800
|
+
const styles$b = {
|
|
7594
7801
|
banner,
|
|
7595
7802
|
message,
|
|
7596
|
-
icon,
|
|
7803
|
+
icon: icon$1,
|
|
7597
7804
|
timer
|
|
7598
7805
|
};
|
|
7599
7806
|
function formatRemaining(ms) {
|
|
@@ -7613,15 +7820,15 @@ function PromoBanner({ promo: promo2 }) {
|
|
|
7613
7820
|
}, [promo2.ends_at]);
|
|
7614
7821
|
const remaining = promo2.ends_at && now !== null ? new Date(promo2.ends_at).getTime() - now : null;
|
|
7615
7822
|
const showTimer = remaining !== null && remaining > 0;
|
|
7616
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
7617
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
7618
|
-
/* @__PURE__ */ jsxs("svg", { className: styles$
|
|
7823
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$b.banner, children: [
|
|
7824
|
+
/* @__PURE__ */ jsxs("span", { className: styles$b.message, children: [
|
|
7825
|
+
/* @__PURE__ */ jsxs("svg", { className: styles$b.icon, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
7619
7826
|
/* @__PURE__ */ jsx("rect", { x: "3", y: "8", width: "18", height: "12", rx: "1.5", stroke: "currentColor", strokeWidth: "1.6" }),
|
|
7620
7827
|
/* @__PURE__ */ jsx("path", { d: "M3 12h18M12 8v12M12 8S10.5 4 8.5 4 6 6 8 6.5 12 8 12 8Zm0 0s1.5-4 3.5-4 2.5 2 .5 2.5S12 8 12 8Z", stroke: "currentColor", strokeWidth: "1.6", strokeLinejoin: "round" })
|
|
7621
7828
|
] }),
|
|
7622
7829
|
promo2.message
|
|
7623
7830
|
] }),
|
|
7624
|
-
showTimer && /* @__PURE__ */ jsxs("span", { className: styles$
|
|
7831
|
+
showTimer && /* @__PURE__ */ jsxs("span", { className: styles$b.timer, children: [
|
|
7625
7832
|
/* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
7626
7833
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "1.6" }),
|
|
7627
7834
|
/* @__PURE__ */ jsx("path", { d: "M12 7v5l3 2", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
@@ -7635,17 +7842,17 @@ const content = "_content_1hv16_14";
|
|
|
7635
7842
|
const intro = "_intro_1hv16_21";
|
|
7636
7843
|
const productInfo = "_productInfo_1hv16_28";
|
|
7637
7844
|
const titlePrice = "_titlePrice_1hv16_34";
|
|
7638
|
-
const title$
|
|
7845
|
+
const title$5 = "_title_1hv16_34";
|
|
7639
7846
|
const availability = "_availability_1hv16_55";
|
|
7640
7847
|
const low = "_low_1hv16_62";
|
|
7641
7848
|
const oos = "_oos_1hv16_66";
|
|
7642
|
-
const styles$
|
|
7849
|
+
const styles$a = {
|
|
7643
7850
|
page,
|
|
7644
7851
|
content,
|
|
7645
7852
|
intro,
|
|
7646
7853
|
productInfo,
|
|
7647
7854
|
titlePrice,
|
|
7648
|
-
title: title$
|
|
7855
|
+
title: title$5,
|
|
7649
7856
|
availability,
|
|
7650
7857
|
low,
|
|
7651
7858
|
oos
|
|
@@ -7788,14 +7995,14 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
7788
7995
|
const lowStock = available > 0 && available <= 5;
|
|
7789
7996
|
const stockNotice = !purchasable || lowStock;
|
|
7790
7997
|
const availabilityLabel = !purchasable ? "Out of stock" : lowStock ? `Only ${available} left` : "";
|
|
7791
|
-
return /* @__PURE__ */ jsxs(ShopSurface, { tone: "light", fill: true, className: styles$
|
|
7998
|
+
return /* @__PURE__ */ jsxs(ShopSurface, { tone: "light", fill: true, className: styles$a.page, children: [
|
|
7792
7999
|
/* @__PURE__ */ jsx(MediaGallery, { media: media2, alt: product.title }),
|
|
7793
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7794
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8000
|
+
/* @__PURE__ */ jsxs("div", { className: styles$a.content, children: [
|
|
8001
|
+
/* @__PURE__ */ jsxs("div", { className: styles$a.intro, children: [
|
|
7795
8002
|
/* @__PURE__ */ jsx(PdpBadges, { badges: product.badges ?? [] }),
|
|
7796
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7797
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7798
|
-
/* @__PURE__ */ jsx("h1", { className: styles$
|
|
8003
|
+
/* @__PURE__ */ jsxs("div", { className: styles$a.productInfo, children: [
|
|
8004
|
+
/* @__PURE__ */ jsxs("div", { className: styles$a.titlePrice, children: [
|
|
8005
|
+
/* @__PURE__ */ jsx("h1", { className: styles$a.title, children: product.title }),
|
|
7799
8006
|
/* @__PURE__ */ jsx(
|
|
7800
8007
|
PriceBlock,
|
|
7801
8008
|
{
|
|
@@ -7813,7 +8020,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
7813
8020
|
stockNotice && /* @__PURE__ */ jsx(
|
|
7814
8021
|
"p",
|
|
7815
8022
|
{
|
|
7816
|
-
className: [styles$
|
|
8023
|
+
className: [styles$a.availability, anyInStock ? styles$a.low : styles$a.oos].join(" "),
|
|
7817
8024
|
role: "status",
|
|
7818
8025
|
children: availabilityLabel
|
|
7819
8026
|
}
|
|
@@ -7871,24 +8078,24 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
7871
8078
|
}
|
|
7872
8079
|
const hero$1 = "_hero_2mcnp_10";
|
|
7873
8080
|
const image$2 = "_image_2mcnp_37";
|
|
7874
|
-
const scrim = "_scrim_2mcnp_51";
|
|
7875
|
-
const text$
|
|
7876
|
-
const title$
|
|
7877
|
-
const subtitle$
|
|
8081
|
+
const scrim$1 = "_scrim_2mcnp_51";
|
|
8082
|
+
const text$2 = "_text_2mcnp_57";
|
|
8083
|
+
const title$4 = "_title_2mcnp_72";
|
|
8084
|
+
const subtitle$2 = "_subtitle_2mcnp_81";
|
|
7878
8085
|
const noImage = "_noImage_2mcnp_94";
|
|
7879
|
-
const styles$
|
|
8086
|
+
const styles$9 = {
|
|
7880
8087
|
hero: hero$1,
|
|
7881
8088
|
image: image$2,
|
|
7882
|
-
scrim,
|
|
7883
|
-
text: text$
|
|
7884
|
-
title: title$
|
|
7885
|
-
subtitle: subtitle$
|
|
8089
|
+
scrim: scrim$1,
|
|
8090
|
+
text: text$2,
|
|
8091
|
+
title: title$4,
|
|
8092
|
+
subtitle: subtitle$2,
|
|
7886
8093
|
noImage
|
|
7887
8094
|
};
|
|
7888
8095
|
function PcpHero({ hero: hero2 }) {
|
|
7889
|
-
return /* @__PURE__ */ jsxs("section", { className: [styles$
|
|
8096
|
+
return /* @__PURE__ */ jsxs("section", { className: [styles$9.hero, hero2.image ? "" : styles$9.noImage].join(" "), children: [
|
|
7890
8097
|
hero2.image && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7891
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
8098
|
+
/* @__PURE__ */ jsx("div", { className: styles$9.image, children: /* @__PURE__ */ jsx(
|
|
7892
8099
|
ShopImage,
|
|
7893
8100
|
{
|
|
7894
8101
|
src: hero2.image,
|
|
@@ -7898,24 +8105,24 @@ function PcpHero({ hero: hero2 }) {
|
|
|
7898
8105
|
priority: true
|
|
7899
8106
|
}
|
|
7900
8107
|
) }),
|
|
7901
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
8108
|
+
/* @__PURE__ */ jsx("div", { className: styles$9.scrim, "aria-hidden": "true" })
|
|
7902
8109
|
] }),
|
|
7903
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7904
|
-
/* @__PURE__ */ jsx("h1", { className: styles$
|
|
7905
|
-
hero2.subtitle && /* @__PURE__ */ jsx("p", { className: styles$
|
|
8110
|
+
/* @__PURE__ */ jsxs("div", { className: styles$9.text, children: [
|
|
8111
|
+
/* @__PURE__ */ jsx("h1", { className: styles$9.title, children: hero2.title }),
|
|
8112
|
+
hero2.subtitle && /* @__PURE__ */ jsx("p", { className: styles$9.subtitle, children: hero2.subtitle })
|
|
7906
8113
|
] })
|
|
7907
8114
|
] });
|
|
7908
8115
|
}
|
|
7909
|
-
const text = "_text_1saw4_6";
|
|
8116
|
+
const text$1 = "_text_1saw4_6";
|
|
7910
8117
|
const center = "_center_1saw4_18";
|
|
7911
8118
|
const left = "_left_1saw4_23";
|
|
7912
|
-
const styles$
|
|
7913
|
-
text,
|
|
8119
|
+
const styles$8 = {
|
|
8120
|
+
text: text$1,
|
|
7914
8121
|
center,
|
|
7915
8122
|
left
|
|
7916
8123
|
};
|
|
7917
8124
|
function LifestyleText({ text: text2, align = "center" }) {
|
|
7918
|
-
return /* @__PURE__ */ jsx("p", { className: [styles$
|
|
8125
|
+
return /* @__PURE__ */ jsx("p", { className: [styles$8.text, align === "left" ? styles$8.left : styles$8.center].join(" "), children: text2 });
|
|
7919
8126
|
}
|
|
7920
8127
|
const wrap = "_wrap_9mquf_1";
|
|
7921
8128
|
const box = "_box_9mquf_5";
|
|
@@ -7925,7 +8132,7 @@ const image$1 = "_image_9mquf_38";
|
|
|
7925
8132
|
const dots$1 = "_dots_9mquf_43";
|
|
7926
8133
|
const dot$1 = "_dot_9mquf_43";
|
|
7927
8134
|
const dotActive$1 = "_dotActive_9mquf_63";
|
|
7928
|
-
const styles$
|
|
8135
|
+
const styles$7 = {
|
|
7929
8136
|
wrap,
|
|
7930
8137
|
box,
|
|
7931
8138
|
track: track$1,
|
|
@@ -7946,22 +8153,22 @@ function LifestyleImage({ images }) {
|
|
|
7946
8153
|
return () => track2.removeEventListener("scroll", onScroll);
|
|
7947
8154
|
}, []);
|
|
7948
8155
|
if (images.length === 0) return null;
|
|
7949
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
7950
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
8156
|
+
return /* @__PURE__ */ jsx("div", { className: styles$7.wrap, children: /* @__PURE__ */ jsxs("div", { className: styles$7.box, children: [
|
|
8157
|
+
/* @__PURE__ */ jsx("ul", { className: styles$7.track, ref: trackRef, children: images.map((src, i) => /* @__PURE__ */ jsx("li", { className: styles$7.slide, children: /* @__PURE__ */ jsx(
|
|
7951
8158
|
ShopImage,
|
|
7952
8159
|
{
|
|
7953
8160
|
src,
|
|
7954
8161
|
alt: "",
|
|
7955
8162
|
fill: true,
|
|
7956
8163
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
7957
|
-
className: styles$
|
|
8164
|
+
className: styles$7.image,
|
|
7958
8165
|
priority: i === 0
|
|
7959
8166
|
}
|
|
7960
8167
|
) }, src)) }),
|
|
7961
|
-
images.length > 1 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
8168
|
+
images.length > 1 && /* @__PURE__ */ jsx("div", { className: styles$7.dots, "aria-hidden": "true", children: images.map((src, i) => /* @__PURE__ */ jsx(
|
|
7962
8169
|
"span",
|
|
7963
8170
|
{
|
|
7964
|
-
className: [styles$
|
|
8171
|
+
className: [styles$7.dot, i === active ? styles$7.dotActive : ""].join(" ")
|
|
7965
8172
|
},
|
|
7966
8173
|
src
|
|
7967
8174
|
)) })
|
|
@@ -7976,7 +8183,7 @@ const dots = "_dots_iy175_57";
|
|
|
7976
8183
|
const dot = "_dot_iy175_57";
|
|
7977
8184
|
const dotActive = "_dotActive_iy175_70";
|
|
7978
8185
|
const disclaimer = "_disclaimer_iy175_76";
|
|
7979
|
-
const styles$
|
|
8186
|
+
const styles$6 = {
|
|
7980
8187
|
section: section$2,
|
|
7981
8188
|
track,
|
|
7982
8189
|
card,
|
|
@@ -7997,49 +8204,49 @@ function ReviewCarousel({ quotes, disclaimer: disclaimer2 }) {
|
|
|
7997
8204
|
track2.addEventListener("scroll", onScroll, { passive: true });
|
|
7998
8205
|
return () => track2.removeEventListener("scroll", onScroll);
|
|
7999
8206
|
}, []);
|
|
8000
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
8001
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
8002
|
-
/* @__PURE__ */ jsxs("blockquote", { className: styles$
|
|
8207
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$6.section, "aria-label": "Reviews", children: [
|
|
8208
|
+
/* @__PURE__ */ jsx("ul", { className: styles$6.track, ref: trackRef, children: quotes.map((q, i) => /* @__PURE__ */ jsxs("li", { className: styles$6.card, children: [
|
|
8209
|
+
/* @__PURE__ */ jsxs("blockquote", { className: styles$6.quote, children: [
|
|
8003
8210
|
"“",
|
|
8004
8211
|
q.quote,
|
|
8005
8212
|
"”"
|
|
8006
8213
|
] }),
|
|
8007
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
8214
|
+
/* @__PURE__ */ jsx("p", { className: styles$6.author, children: q.author })
|
|
8008
8215
|
] }, i)) }),
|
|
8009
|
-
quotes.length > 1 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
8010
|
-
disclaimer2 && /* @__PURE__ */ jsx("p", { className: styles$
|
|
8216
|
+
quotes.length > 1 && /* @__PURE__ */ jsx("div", { className: styles$6.dots, "aria-hidden": "true", children: quotes.map((_, i) => /* @__PURE__ */ jsx("span", { className: [styles$6.dot, i === active ? styles$6.dotActive : ""].join(" ") }, i)) }),
|
|
8217
|
+
disclaimer2 && /* @__PURE__ */ jsx("p", { className: styles$6.disclaimer, children: disclaimer2 })
|
|
8011
8218
|
] });
|
|
8012
8219
|
}
|
|
8013
8220
|
const section$1 = "_section_145t0_1";
|
|
8014
|
-
const row$
|
|
8015
|
-
const title$
|
|
8221
|
+
const row$2 = "_row_145t0_9";
|
|
8222
|
+
const title$3 = "_title_145t0_21";
|
|
8016
8223
|
const body = "_body_145t0_29";
|
|
8017
|
-
const styles$
|
|
8224
|
+
const styles$5 = {
|
|
8018
8225
|
section: section$1,
|
|
8019
|
-
row: row$
|
|
8020
|
-
title: title$
|
|
8226
|
+
row: row$2,
|
|
8227
|
+
title: title$3,
|
|
8021
8228
|
body
|
|
8022
8229
|
};
|
|
8023
8230
|
function WhyUs({ items: items2 }) {
|
|
8024
|
-
return /* @__PURE__ */ jsx("section", { className: styles$
|
|
8025
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
8026
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
8231
|
+
return /* @__PURE__ */ jsx("section", { className: styles$5.section, "aria-label": "Why shop with us", children: items2.map((it, i) => /* @__PURE__ */ jsxs("div", { className: styles$5.row, children: [
|
|
8232
|
+
/* @__PURE__ */ jsx("p", { className: styles$5.title, children: it.title }),
|
|
8233
|
+
/* @__PURE__ */ jsx("p", { className: styles$5.body, children: it.body })
|
|
8027
8234
|
] }, i)) });
|
|
8028
8235
|
}
|
|
8029
8236
|
const section = "_section_opjfc_1";
|
|
8030
|
-
const title$
|
|
8031
|
-
const list = "_list_opjfc_15";
|
|
8032
|
-
const row = "_row_opjfc_26";
|
|
8033
|
-
const styles$
|
|
8237
|
+
const title$2 = "_title_opjfc_8";
|
|
8238
|
+
const list$1 = "_list_opjfc_15";
|
|
8239
|
+
const row$1 = "_row_opjfc_26";
|
|
8240
|
+
const styles$4 = {
|
|
8034
8241
|
section,
|
|
8035
|
-
title: title$
|
|
8036
|
-
list,
|
|
8037
|
-
row
|
|
8242
|
+
title: title$2,
|
|
8243
|
+
list: list$1,
|
|
8244
|
+
row: row$1
|
|
8038
8245
|
};
|
|
8039
8246
|
function ExploreList({ title: title2, links }) {
|
|
8040
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
8041
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
8042
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
8247
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$4.section, "aria-label": title2, children: [
|
|
8248
|
+
/* @__PURE__ */ jsx("h2", { className: styles$4.title, children: title2 }),
|
|
8249
|
+
/* @__PURE__ */ jsx("ul", { className: styles$4.list, children: links.map((l) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(ShopLink, { to: `/category/${encodeURIComponent(l.code)}`, className: styles$4.row, children: [
|
|
8043
8250
|
/* @__PURE__ */ jsx("span", { children: l.label }),
|
|
8044
8251
|
/* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M9 6l6 6-6 6", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
8045
8252
|
] }) }, l.code)) })
|
|
@@ -8051,7 +8258,7 @@ const featured = "_featured_6gy3c_38";
|
|
|
8051
8258
|
const gridBlock = "_gridBlock_6gy3c_39";
|
|
8052
8259
|
const blockTitle = "_blockTitle_6gy3c_46";
|
|
8053
8260
|
const grid = "_grid_6gy3c_39";
|
|
8054
|
-
const styles$
|
|
8261
|
+
const styles$3 = {
|
|
8055
8262
|
pcp,
|
|
8056
8263
|
blocks,
|
|
8057
8264
|
featured,
|
|
@@ -8066,16 +8273,16 @@ function Block({ block }) {
|
|
|
8066
8273
|
case "lifestyle_text":
|
|
8067
8274
|
return /* @__PURE__ */ jsx(LifestyleText, { text: block.text, align: block.align });
|
|
8068
8275
|
case "featured":
|
|
8069
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
8070
|
-
block.title && /* @__PURE__ */ jsx("h2", { className: styles$
|
|
8276
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$3.featured, children: [
|
|
8277
|
+
block.title && /* @__PURE__ */ jsx("h2", { className: styles$3.blockTitle, children: block.title }),
|
|
8071
8278
|
/* @__PURE__ */ jsx(ProductTile, { product: block.product, priority: true, size: "large" })
|
|
8072
8279
|
] });
|
|
8073
8280
|
case "lifestyle_image":
|
|
8074
8281
|
return /* @__PURE__ */ jsx(LifestyleImage, { images: block.images });
|
|
8075
8282
|
case "grid":
|
|
8076
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
8077
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
8078
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
8283
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$3.gridBlock, children: [
|
|
8284
|
+
/* @__PURE__ */ jsx("h2", { className: styles$3.blockTitle, children: block.title }),
|
|
8285
|
+
/* @__PURE__ */ jsx("ul", { className: styles$3.grid, children: block.products.map((p) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(ProductTile, { product: p }) }, p.sku)) })
|
|
8079
8286
|
] });
|
|
8080
8287
|
case "review":
|
|
8081
8288
|
return /* @__PURE__ */ jsx(ReviewCarousel, { quotes: block.quotes, disclaimer: block.disclaimer });
|
|
@@ -8088,9 +8295,9 @@ function Block({ block }) {
|
|
|
8088
8295
|
}
|
|
8089
8296
|
}
|
|
8090
8297
|
function CategoryContent({ page: page2 }) {
|
|
8091
|
-
return /* @__PURE__ */ jsxs(ShopSurface, { tone: "dark", fill: true, className: styles$
|
|
8298
|
+
return /* @__PURE__ */ jsxs(ShopSurface, { tone: "dark", fill: true, className: styles$3.pcp, children: [
|
|
8092
8299
|
/* @__PURE__ */ jsx(PcpHero, { hero: page2.hero }),
|
|
8093
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
8300
|
+
/* @__PURE__ */ jsx("div", { className: styles$3.blocks, children: page2.blocks.map((block, i) => /* @__PURE__ */ jsx(Block, { block }, i)) })
|
|
8094
8301
|
] });
|
|
8095
8302
|
}
|
|
8096
8303
|
function CategoryView({ code, initialData, onNotFound }) {
|
|
@@ -8186,13 +8393,13 @@ const heroTitle = "_heroTitle_ems17_107";
|
|
|
8186
8393
|
const heroSub = "_heroSub_ems17_115";
|
|
8187
8394
|
const swipe = "_swipe_ems17_122";
|
|
8188
8395
|
const swipeLabel = "_swipeLabel_ems17_131";
|
|
8189
|
-
const chevron = "_chevron_ems17_137";
|
|
8190
|
-
const overlay = "_overlay_ems17_154";
|
|
8396
|
+
const chevron$1 = "_chevron_ems17_137";
|
|
8397
|
+
const overlay$1 = "_overlay_ems17_154";
|
|
8191
8398
|
const copy = "_copy_ems17_165";
|
|
8192
|
-
const title = "_title_ems17_170";
|
|
8193
|
-
const subtitle = "_subtitle_ems17_177";
|
|
8399
|
+
const title$1 = "_title_ems17_170";
|
|
8400
|
+
const subtitle$1 = "_subtitle_ems17_177";
|
|
8194
8401
|
const cta = "_cta_ems17_183";
|
|
8195
|
-
const styles$
|
|
8402
|
+
const styles$2 = {
|
|
8196
8403
|
showcase,
|
|
8197
8404
|
panel,
|
|
8198
8405
|
image,
|
|
@@ -8205,11 +8412,11 @@ const styles$1 = {
|
|
|
8205
8412
|
heroSub,
|
|
8206
8413
|
swipe,
|
|
8207
8414
|
swipeLabel,
|
|
8208
|
-
chevron,
|
|
8209
|
-
overlay,
|
|
8415
|
+
chevron: chevron$1,
|
|
8416
|
+
overlay: overlay$1,
|
|
8210
8417
|
copy,
|
|
8211
|
-
title,
|
|
8212
|
-
subtitle,
|
|
8418
|
+
title: title$1,
|
|
8419
|
+
subtitle: subtitle$1,
|
|
8213
8420
|
cta
|
|
8214
8421
|
};
|
|
8215
8422
|
const FALLBACK_PANELS = [
|
|
@@ -8258,7 +8465,7 @@ const FALLBACK_PANELS = [
|
|
|
8258
8465
|
}
|
|
8259
8466
|
];
|
|
8260
8467
|
function CategoryPanel({ panel: panel2 }) {
|
|
8261
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
8468
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$2.panel, "aria-label": panel2.title, children: [
|
|
8262
8469
|
/* @__PURE__ */ jsx(
|
|
8263
8470
|
ShopImage,
|
|
8264
8471
|
{
|
|
@@ -8266,15 +8473,15 @@ function CategoryPanel({ panel: panel2 }) {
|
|
|
8266
8473
|
alt: "",
|
|
8267
8474
|
fill: true,
|
|
8268
8475
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
8269
|
-
className: styles$
|
|
8476
|
+
className: styles$2.image
|
|
8270
8477
|
}
|
|
8271
8478
|
),
|
|
8272
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8273
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8274
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
8275
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
8479
|
+
/* @__PURE__ */ jsxs("div", { className: styles$2.overlay, children: [
|
|
8480
|
+
/* @__PURE__ */ jsxs("div", { className: styles$2.copy, children: [
|
|
8481
|
+
/* @__PURE__ */ jsx("h2", { className: styles$2.title, children: panel2.title }),
|
|
8482
|
+
/* @__PURE__ */ jsx("p", { className: styles$2.subtitle, children: panel2.subtitle })
|
|
8276
8483
|
] }),
|
|
8277
|
-
/* @__PURE__ */ jsx(ShopLink, { to: panel2.to, className: styles$
|
|
8484
|
+
/* @__PURE__ */ jsx(ShopLink, { to: panel2.to, className: styles$2.cta, "aria-label": `${panel2.title} — ${panel2.cta}`, children: panel2.cta })
|
|
8278
8485
|
] })
|
|
8279
8486
|
] });
|
|
8280
8487
|
}
|
|
@@ -8317,9 +8524,9 @@ function HomeShowcase() {
|
|
|
8317
8524
|
* showcase paints its own dark ground and now owns its own height, so there is nothing
|
|
8318
8525
|
* for the surface to fill.
|
|
8319
8526
|
*/
|
|
8320
|
-
/* @__PURE__ */ jsx(ShopSurface, { tone: "dark", children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
8321
|
-
/* @__PURE__ */ jsxs("section", { className: `${styles$
|
|
8322
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
8527
|
+
/* @__PURE__ */ jsx(ShopSurface, { tone: "dark", children: /* @__PURE__ */ jsxs("div", { className: styles$2.showcase, ref: showcaseRef, children: [
|
|
8528
|
+
/* @__PURE__ */ jsxs("section", { className: `${styles$2.panel} ${styles$2.hero}`, "aria-label": "DAZN Shop", children: [
|
|
8529
|
+
/* @__PURE__ */ jsx("div", { className: styles$2.heroImageBox, children: /* @__PURE__ */ jsx(
|
|
8323
8530
|
ShopImage,
|
|
8324
8531
|
{
|
|
8325
8532
|
src: "/figma/home/hero.jpg",
|
|
@@ -8327,25 +8534,25 @@ function HomeShowcase() {
|
|
|
8327
8534
|
fill: true,
|
|
8328
8535
|
priority: true,
|
|
8329
8536
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
8330
|
-
className: styles$
|
|
8537
|
+
className: styles$2.image
|
|
8331
8538
|
}
|
|
8332
8539
|
) }),
|
|
8333
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8334
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8540
|
+
/* @__PURE__ */ jsxs("div", { className: styles$2.heroContent, children: [
|
|
8541
|
+
/* @__PURE__ */ jsxs("div", { className: styles$2.heroText, children: [
|
|
8335
8542
|
/* @__PURE__ */ jsx(
|
|
8336
8543
|
"img",
|
|
8337
8544
|
{
|
|
8338
8545
|
src: assetUrl("/figma/home/dazn-logo.svg"),
|
|
8339
8546
|
alt: "DAZN",
|
|
8340
|
-
className: styles$
|
|
8547
|
+
className: styles$2.logo
|
|
8341
8548
|
}
|
|
8342
8549
|
),
|
|
8343
|
-
/* @__PURE__ */ jsx("h1", { className: styles$
|
|
8344
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
8550
|
+
/* @__PURE__ */ jsx("h1", { className: styles$2.heroTitle, children: "DAZN SHOP" }),
|
|
8551
|
+
/* @__PURE__ */ jsx("p", { className: styles$2.heroSub, children: "Fresh drops inspired by sport, culture, and everyday movement" })
|
|
8345
8552
|
] }),
|
|
8346
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8347
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
8348
|
-
/* @__PURE__ */ jsx("svg", { className: styles$
|
|
8553
|
+
/* @__PURE__ */ jsxs("div", { className: styles$2.swipe, children: [
|
|
8554
|
+
/* @__PURE__ */ jsx("p", { className: styles$2.swipeLabel, children: "Swipe down for more" }),
|
|
8555
|
+
/* @__PURE__ */ jsx("svg", { className: styles$2.chevron, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
8349
8556
|
"path",
|
|
8350
8557
|
{
|
|
8351
8558
|
d: "M6 9l6 6 6-6",
|
|
@@ -8405,15 +8612,15 @@ function useCartCount() {
|
|
|
8405
8612
|
}, [subscribe]);
|
|
8406
8613
|
return count2;
|
|
8407
8614
|
}
|
|
8408
|
-
const header = "_header_7rinq_6";
|
|
8615
|
+
const header$1 = "_header_7rinq_6";
|
|
8409
8616
|
const floating = "_floating_7rinq_26";
|
|
8410
8617
|
const right = "_right_7rinq_35";
|
|
8411
8618
|
const spacer = "_spacer_7rinq_48";
|
|
8412
8619
|
const iconBtn = "_iconBtn_7rinq_53";
|
|
8413
8620
|
const menuBtn = "_menuBtn_7rinq_80";
|
|
8414
8621
|
const badge = "_badge_7rinq_104";
|
|
8415
|
-
const styles = {
|
|
8416
|
-
header,
|
|
8622
|
+
const styles$1 = {
|
|
8623
|
+
header: header$1,
|
|
8417
8624
|
floating,
|
|
8418
8625
|
right,
|
|
8419
8626
|
spacer,
|
|
@@ -8466,19 +8673,19 @@ function ShopHeader({
|
|
|
8466
8673
|
}) {
|
|
8467
8674
|
const cartCount = useCartCount();
|
|
8468
8675
|
const cartLabel = cartCount === null ? "Cart" : cartCount === 0 ? "Cart, empty" : `Cart, ${cartCount} item${cartCount === 1 ? "" : "s"}`;
|
|
8469
|
-
const classes = [styles.header, floating2 ? styles.floating : "", className ?? ""].filter(Boolean).join(" ");
|
|
8676
|
+
const classes = [styles$1.header, floating2 ? styles$1.floating : "", className ?? ""].filter(Boolean).join(" ");
|
|
8470
8677
|
return /* @__PURE__ */ jsxs("header", { className: classes, children: [
|
|
8471
|
-
onBack ? /* @__PURE__ */ jsx("button", { type: "button", className: styles.iconBtn, "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ jsx(ChevronLeft, {}) }) : /* @__PURE__ */ jsx("span", { className: styles.spacer, "aria-hidden": "true" }),
|
|
8472
|
-
/* @__PURE__ */ jsxs("div", { className: styles.right, children: [
|
|
8473
|
-
showCart ? /* @__PURE__ */ jsxs(CartTrigger, { className: styles.iconBtn, "aria-label": cartLabel, children: [
|
|
8678
|
+
onBack ? /* @__PURE__ */ jsx("button", { type: "button", className: styles$1.iconBtn, "aria-label": backLabel, onClick: onBack, children: /* @__PURE__ */ jsx(ChevronLeft, {}) }) : /* @__PURE__ */ jsx("span", { className: styles$1.spacer, "aria-hidden": "true" }),
|
|
8679
|
+
/* @__PURE__ */ jsxs("div", { className: styles$1.right, children: [
|
|
8680
|
+
showCart ? /* @__PURE__ */ jsxs(CartTrigger, { className: styles$1.iconBtn, "aria-label": cartLabel, children: [
|
|
8474
8681
|
/* @__PURE__ */ jsx(CartIcon, {}),
|
|
8475
|
-
cartCount === null ? null : /* @__PURE__ */ jsx("span", { className: styles.badge, "aria-hidden": "true", children: cartCount > 99 ? "99+" : cartCount })
|
|
8682
|
+
cartCount === null ? null : /* @__PURE__ */ jsx("span", { className: styles$1.badge, "aria-hidden": "true", children: cartCount > 99 ? "99+" : cartCount })
|
|
8476
8683
|
] }) : null,
|
|
8477
8684
|
onMenu ? /* @__PURE__ */ jsx(
|
|
8478
8685
|
"button",
|
|
8479
8686
|
{
|
|
8480
8687
|
type: "button",
|
|
8481
|
-
className: `${styles.iconBtn} ${styles.menuBtn}`,
|
|
8688
|
+
className: `${styles$1.iconBtn} ${styles$1.menuBtn}`,
|
|
8482
8689
|
"aria-label": menuLabel,
|
|
8483
8690
|
onClick: onMenu,
|
|
8484
8691
|
children: /* @__PURE__ */ jsx(MenuIcon, {})
|
|
@@ -8487,6 +8694,186 @@ function ShopHeader({
|
|
|
8487
8694
|
] })
|
|
8488
8695
|
] });
|
|
8489
8696
|
}
|
|
8697
|
+
const overlay = "_overlay_lm5qk_5";
|
|
8698
|
+
const scrim = "_scrim_lm5qk_17";
|
|
8699
|
+
const sheet = "_sheet_lm5qk_23";
|
|
8700
|
+
const header = "_header_lm5qk_56";
|
|
8701
|
+
const close = "_close_lm5qk_62";
|
|
8702
|
+
const list = "_list_lm5qk_81";
|
|
8703
|
+
const row = "_row_lm5qk_89";
|
|
8704
|
+
const icon = "_icon_lm5qk_119";
|
|
8705
|
+
const text = "_text_lm5qk_127";
|
|
8706
|
+
const title = "_title_lm5qk_135";
|
|
8707
|
+
const subtitle = "_subtitle_lm5qk_142";
|
|
8708
|
+
const chevron = "_chevron_lm5qk_148";
|
|
8709
|
+
const styles = {
|
|
8710
|
+
overlay,
|
|
8711
|
+
scrim,
|
|
8712
|
+
sheet,
|
|
8713
|
+
header,
|
|
8714
|
+
close,
|
|
8715
|
+
list,
|
|
8716
|
+
row,
|
|
8717
|
+
icon,
|
|
8718
|
+
text,
|
|
8719
|
+
title,
|
|
8720
|
+
subtitle,
|
|
8721
|
+
chevron
|
|
8722
|
+
};
|
|
8723
|
+
function OrderIcon() {
|
|
8724
|
+
return /* @__PURE__ */ jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
8725
|
+
/* @__PURE__ */ jsx("g", { transform: "translate(2.987 2.498)", children: /* @__PURE__ */ jsx(
|
|
8726
|
+
"path",
|
|
8727
|
+
{
|
|
8728
|
+
d: "M1.4 4.467C1.14036 4.81319 1 5.23426 1 5.667L1.01416 15.9991C1.01416 16.5295 1.22487 17.0382 1.59995 17.4133C1.97502 17.7884 2.48373 17.9991 3.01416 17.9991L15.0267 18.0043C15.5571 18.0043 16.0658 17.7935 16.4409 17.4185C16.816 17.0434 17.0267 16.5347 17.0267 16.0043L17.0125 5.67219C17.0125 5.23945 16.8722 4.81838 16.6125 4.47219L14.6125 1.80519C14.4262 1.5568 14.1847 1.35519 13.907 1.21634C13.6292 1.07748 13.323 1.00519 13.0125 1.00519L5 1C4.68951 1 4.38328 1.07229 4.10557 1.21115C3.82786 1.35 3.5863 1.55161 3.4 1.8L1.4 4.467Z",
|
|
8729
|
+
stroke: "currentColor",
|
|
8730
|
+
strokeWidth: "2",
|
|
8731
|
+
strokeLinecap: "round",
|
|
8732
|
+
strokeLinejoin: "round"
|
|
8733
|
+
}
|
|
8734
|
+
) }),
|
|
8735
|
+
/* @__PURE__ */ jsx("g", { transform: "translate(4.1 6.267)", children: /* @__PURE__ */ jsx(
|
|
8736
|
+
"path",
|
|
8737
|
+
{
|
|
8738
|
+
d: "M0.9 0.9H14.9001",
|
|
8739
|
+
stroke: "currentColor",
|
|
8740
|
+
strokeWidth: "1.8",
|
|
8741
|
+
strokeLinecap: "round",
|
|
8742
|
+
strokeLinejoin: "round"
|
|
8743
|
+
}
|
|
8744
|
+
) }),
|
|
8745
|
+
/* @__PURE__ */ jsx("g", { transform: "translate(7.36 10.09)", children: /* @__PURE__ */ jsx(
|
|
8746
|
+
"path",
|
|
8747
|
+
{
|
|
8748
|
+
d: "M8.37949 0.9C8.37949 1.89184 7.98548 2.84306 7.28415 3.5444C6.58281 4.24574 5.63159 4.63975 4.63975 4.63975C3.6479 4.63975 2.69668 4.24574 1.99535 3.5444C1.29401 2.84306 0.9 1.89184 0.9 0.9",
|
|
8749
|
+
stroke: "currentColor",
|
|
8750
|
+
strokeWidth: "1.8",
|
|
8751
|
+
strokeLinecap: "round",
|
|
8752
|
+
strokeLinejoin: "round"
|
|
8753
|
+
}
|
|
8754
|
+
) })
|
|
8755
|
+
] });
|
|
8756
|
+
}
|
|
8757
|
+
function GiftIcon() {
|
|
8758
|
+
return /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { transform: "translate(1.94 2.995)", children: /* @__PURE__ */ jsx(
|
|
8759
|
+
"path",
|
|
8760
|
+
{
|
|
8761
|
+
fillRule: "evenodd",
|
|
8762
|
+
clipRule: "evenodd",
|
|
8763
|
+
d: "M13.751 0.00124025C14.5259 0.00509296 15.2681 0.313462 15.8164 0.861592C16.368 1.41322 16.6786 2.16162 16.6787 2.94167C16.6787 3.33886 16.5962 3.72712 16.4443 4.0862L18.21 4.08425C19.2573 4.08425 20.1182 4.92951 20.1182 5.98464V7.98464C20.118 8.77361 19.6366 9.44353 18.9561 9.73171V15.011C18.9561 15.8024 18.6451 16.5636 18.0889 17.1272C17.6018 17.6207 16.9612 17.9275 16.2773 17.9964L15.9814 18.011L4.14355 18.0051C3.35071 18.005 2.59271 17.6863 2.03613 17.1223C1.47995 16.5588 1.16992 15.7965 1.16992 15.0051V9.76198C0.48514 9.4754 0.000197787 8.80207 0 8.01003V6.01003C3.22233e-05 4.95527 0.859419 4.11117 1.90625 4.11062L3.68457 4.10671C3.52717 3.74203 3.44242 3.34633 3.44238 2.94167C3.4425 2.16158 3.7531 1.41323 4.30469 0.861592C4.85271 0.313663 5.59461 0.00439982 6.36914 0.000263685C6.37301 0.000209284 6.377 0.00129387 6.38086 0.00124025C6.38214 0.00120826 6.38348 0.00124029 6.38477 0.00124025C7.48869 -0.0127605 8.48921 0.527887 9.26953 1.39479C9.56436 1.7224 9.82868 2.09657 10.0605 2.50612C10.2924 2.09651 10.5567 1.72244 10.8516 1.39479C11.6319 0.527865 12.6324 -0.0136996 13.7363 0.000263685L13.7393 0.00124025C13.7435 0.0012842 13.7477 0.000190595 13.752 0.000263685L13.751 0.00124025ZM3.16992 9.90749V15.0051C3.16992 15.2745 3.2759 15.5305 3.45996 15.7171C3.64354 15.9031 3.88967 16.005 4.14355 16.0051L15.9814 16.01C16.2355 16.01 16.4823 15.909 16.666 15.7229C16.8271 15.5597 16.9284 15.3435 16.9512 15.1116L16.9561 15.011V9.88601L3.16992 9.90749ZM1.9082 5.91042C1.84343 5.91045 1.80082 5.96063 1.80078 6.01003V8.01003C1.80105 8.05904 1.84222 8.10813 1.90625 8.10866L18.21 8.08425C18.2746 8.08425 18.3181 8.03392 18.3184 7.98464V5.98464C18.3184 5.9352 18.2758 5.88503 18.2109 5.88503L1.9082 5.91042ZM6.38477 1.80007C6.0819 1.8001 5.79131 1.92087 5.57715 2.13503C5.36332 2.34907 5.24329 2.63912 5.24316 2.94167C5.24323 3.24435 5.3632 3.53519 5.57715 3.74929C5.79129 3.96335 6.08197 4.08422 6.38477 4.08425C6.44761 4.08425 6.50914 4.08955 6.56836 4.10183L8.83203 4.09792C8.58292 3.48766 8.27452 2.97992 7.93164 2.5989C7.4044 2.01319 6.86607 1.79198 6.40039 1.80007C6.39524 1.80016 6.38992 1.80007 6.38477 1.80007ZM13.7207 1.80007C13.255 1.79196 12.7167 2.0131 12.1895 2.5989C11.847 2.9794 11.538 3.48583 11.2891 4.09499L13.6289 4.09108C13.6641 4.08689 13.7 4.08425 13.7363 4.08425C14.0392 4.08423 14.3298 3.9634 14.5439 3.74929C14.758 3.53518 14.8788 3.2444 14.8789 2.94167C14.8788 2.63911 14.7578 2.34907 14.5439 2.13503C14.3298 1.92086 14.0392 1.80009 13.7363 1.80007C13.7312 1.80007 13.7259 1.80016 13.7207 1.80007Z",
|
|
8764
|
+
fill: "currentColor"
|
|
8765
|
+
}
|
|
8766
|
+
) }) });
|
|
8767
|
+
}
|
|
8768
|
+
function HelpIcon() {
|
|
8769
|
+
return /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxs("g", { transform: "translate(1.93 1.93)", children: [
|
|
8770
|
+
/* @__PURE__ */ jsx(
|
|
8771
|
+
"path",
|
|
8772
|
+
{
|
|
8773
|
+
d: "M10.0781 14.1543C10.52 14.1543 10.8779 14.5123 10.8779 14.9541C10.8778 15.3958 10.5199 15.7539 10.0781 15.7539H10.0693C9.62757 15.7539 9.26963 15.3958 9.26953 14.9541C9.26953 14.5123 9.62751 14.1543 10.0693 14.1543H10.0781Z",
|
|
8774
|
+
fill: "currentColor"
|
|
8775
|
+
}
|
|
8776
|
+
),
|
|
8777
|
+
/* @__PURE__ */ jsx(
|
|
8778
|
+
"path",
|
|
8779
|
+
{
|
|
8780
|
+
d: "M8.21777 4.7168C8.93457 4.29562 9.77726 4.14167 10.5967 4.28223C11.4161 4.42286 12.1599 4.84835 12.6953 5.48438C13.2303 6.12005 13.5233 6.92505 13.5225 7.75586L13.5107 8.00098C13.3992 9.19732 12.4886 10.0076 11.8057 10.4629C11.4401 10.7066 11.0785 10.8882 10.8018 11.0137V11.8223C10.8014 12.2637 10.4425 12.622 10.001 12.6221C9.55954 12.6219 9.20156 12.2637 9.20117 11.8223V10.4775C9.20117 10.1332 9.42146 9.82671 9.74805 9.71777C9.75073 9.71685 9.75671 9.71536 9.76367 9.71289C9.77824 9.70771 9.80199 9.69931 9.83301 9.6875C9.89571 9.66361 9.98896 9.62621 10.1016 9.57617C10.3291 9.47505 10.6264 9.32523 10.918 9.13086C11.5496 8.70973 11.9217 8.23795 11.9219 7.75586C11.9225 7.30239 11.7627 6.86161 11.4707 6.51465C11.1787 6.16788 10.773 5.93611 10.3262 5.85938C9.87921 5.78271 9.41933 5.86603 9.02832 6.0957C8.63742 6.32547 8.34003 6.68657 8.18945 7.11426C8.04274 7.53077 7.58557 7.74995 7.16895 7.60352C6.75252 7.45687 6.53351 7.00053 6.67969 6.58398C6.9556 5.79964 7.50096 5.1381 8.21777 4.7168Z",
|
|
8781
|
+
fill: "currentColor"
|
|
8782
|
+
}
|
|
8783
|
+
),
|
|
8784
|
+
/* @__PURE__ */ jsx(
|
|
8785
|
+
"path",
|
|
8786
|
+
{
|
|
8787
|
+
fillRule: "evenodd",
|
|
8788
|
+
clipRule: "evenodd",
|
|
8789
|
+
d: "M10.0693 0C15.6304 0.000197913 20.1395 4.50828 20.1396 10.0693C20.1395 15.6304 15.6304 20.1395 10.0693 20.1396C4.50828 20.1395 0.000197917 15.6304 0 10.0693C0.00019791 4.50828 4.50828 0.000197906 10.0693 0ZM10.0693 2C5.61285 2.0002 2.0002 5.61285 2 10.0693C2.0002 14.5258 5.61285 18.1395 10.0693 18.1396C14.5258 18.1395 18.1395 14.5258 18.1396 10.0693C18.1395 5.61285 14.5258 2.0002 10.0693 2Z",
|
|
8790
|
+
fill: "currentColor"
|
|
8791
|
+
}
|
|
8792
|
+
)
|
|
8793
|
+
] }) });
|
|
8794
|
+
}
|
|
8795
|
+
function ChevronRight() {
|
|
8796
|
+
return /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { transform: "translate(4.28 1.957)", children: /* @__PURE__ */ jsx(
|
|
8797
|
+
"path",
|
|
8798
|
+
{
|
|
8799
|
+
d: "M7.42763 6.03763C7.42763 5.83763 7.33763 5.64763 7.18763 5.51763L1.15763 0.177629C0.867628 -0.0823714 0.427629 -0.0523713 0.177629 0.237629C-0.0823713 0.527629 -0.0523714 0.967629 0.237629 1.22763L5.67763 6.04763L0.237629 10.8576C-0.0523709 11.1176 -0.0823709 11.5576 0.177629 11.8476C0.437629 12.1376 0.877629 12.1676 1.16763 11.9076L7.19763 6.56763C7.34763 6.43763 7.43763 6.24763 7.43763 6.04763L7.42763 6.03763Z",
|
|
8800
|
+
fill: "currentColor"
|
|
8801
|
+
}
|
|
8802
|
+
) }) });
|
|
8803
|
+
}
|
|
8804
|
+
function CloseIcon() {
|
|
8805
|
+
return /* @__PURE__ */ jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M6 6l12 12M18 6L6 18", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" }) });
|
|
8806
|
+
}
|
|
8807
|
+
function ShopMenuSheet({
|
|
8808
|
+
open,
|
|
8809
|
+
onClose,
|
|
8810
|
+
onManageOrders,
|
|
8811
|
+
onRedeemCode,
|
|
8812
|
+
onHelp,
|
|
8813
|
+
closeLabel = "Close",
|
|
8814
|
+
label: label2 = "Shop menu"
|
|
8815
|
+
}) {
|
|
8816
|
+
const sheetRef = useRef(null);
|
|
8817
|
+
useModalDialog(open, onClose, sheetRef);
|
|
8818
|
+
if (!open) return null;
|
|
8819
|
+
const rows = [
|
|
8820
|
+
{
|
|
8821
|
+
key: "orders",
|
|
8822
|
+
icon: /* @__PURE__ */ jsx(OrderIcon, {}),
|
|
8823
|
+
title: "Manage orders",
|
|
8824
|
+
subtitle: "View your order history and track shipments",
|
|
8825
|
+
...onManageOrders ? { onSelect: onManageOrders } : {}
|
|
8826
|
+
},
|
|
8827
|
+
{
|
|
8828
|
+
key: "redeem",
|
|
8829
|
+
icon: /* @__PURE__ */ jsx(GiftIcon, {}),
|
|
8830
|
+
title: "Redeem a code",
|
|
8831
|
+
subtitle: "Got a code for DAZN shop? Claim it here",
|
|
8832
|
+
...onRedeemCode ? { onSelect: onRedeemCode } : {}
|
|
8833
|
+
},
|
|
8834
|
+
{
|
|
8835
|
+
key: "help",
|
|
8836
|
+
icon: /* @__PURE__ */ jsx(HelpIcon, {}),
|
|
8837
|
+
title: "Help & Support",
|
|
8838
|
+
...onHelp ? { onSelect: onHelp } : {}
|
|
8839
|
+
}
|
|
8840
|
+
];
|
|
8841
|
+
return /* @__PURE__ */ jsxs("div", { className: styles.overlay, children: [
|
|
8842
|
+
/* @__PURE__ */ jsx("div", { className: styles.scrim, onClick: onClose, "aria-hidden": "true" }),
|
|
8843
|
+
/* @__PURE__ */ jsxs(
|
|
8844
|
+
ShopSurface,
|
|
8845
|
+
{
|
|
8846
|
+
tone: "light",
|
|
8847
|
+
className: styles.sheet,
|
|
8848
|
+
role: "dialog",
|
|
8849
|
+
"aria-modal": "true",
|
|
8850
|
+
"aria-label": label2,
|
|
8851
|
+
ref: sheetRef,
|
|
8852
|
+
children: [
|
|
8853
|
+
/* @__PURE__ */ jsx("div", { className: styles.header, children: /* @__PURE__ */ jsx("button", { type: "button", className: styles.close, onClick: onClose, "aria-label": closeLabel, children: /* @__PURE__ */ jsx(CloseIcon, {}) }) }),
|
|
8854
|
+
/* @__PURE__ */ jsx("ul", { className: styles.list, children: rows.map((row2) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
8855
|
+
"button",
|
|
8856
|
+
{
|
|
8857
|
+
type: "button",
|
|
8858
|
+
className: styles.row,
|
|
8859
|
+
onClick: row2.onSelect,
|
|
8860
|
+
disabled: !row2.onSelect,
|
|
8861
|
+
"aria-disabled": row2.onSelect ? void 0 : true,
|
|
8862
|
+
children: [
|
|
8863
|
+
/* @__PURE__ */ jsx("span", { className: styles.icon, children: row2.icon }),
|
|
8864
|
+
/* @__PURE__ */ jsxs("span", { className: styles.text, children: [
|
|
8865
|
+
/* @__PURE__ */ jsx("span", { className: styles.title, children: row2.title }),
|
|
8866
|
+
row2.subtitle && /* @__PURE__ */ jsx("span", { className: styles.subtitle, children: row2.subtitle })
|
|
8867
|
+
] }),
|
|
8868
|
+
/* @__PURE__ */ jsx("span", { className: styles.chevron, children: /* @__PURE__ */ jsx(ChevronRight, {}) })
|
|
8869
|
+
]
|
|
8870
|
+
}
|
|
8871
|
+
) }, row2.key)) })
|
|
8872
|
+
]
|
|
8873
|
+
}
|
|
8874
|
+
)
|
|
8875
|
+
] });
|
|
8876
|
+
}
|
|
8490
8877
|
export {
|
|
8491
8878
|
Badge,
|
|
8492
8879
|
BottomSheet,
|
|
@@ -8509,6 +8896,8 @@ export {
|
|
|
8509
8896
|
LifestyleImage,
|
|
8510
8897
|
LifestyleText,
|
|
8511
8898
|
MediaGallery,
|
|
8899
|
+
OrderListView,
|
|
8900
|
+
OrderStatusBadge,
|
|
8512
8901
|
OrderSummary,
|
|
8513
8902
|
OrderTimeline,
|
|
8514
8903
|
OrderTrackingView,
|
|
@@ -8531,6 +8920,7 @@ export {
|
|
|
8531
8920
|
HomeShowcase as ShopHome,
|
|
8532
8921
|
ShopImage,
|
|
8533
8922
|
ShopLink,
|
|
8923
|
+
ShopMenuSheet,
|
|
8534
8924
|
ShopSurface,
|
|
8535
8925
|
SizeGuideSheet,
|
|
8536
8926
|
SizeSelector,
|