@nok-integration/storefront-react 0.12.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 +879 -493
- package/dist/standalone/storefront.mjs +879 -493
- package/dist/standalone/styles.css +357 -17
- package/dist/styles.css +357 -17
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -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 = {
|
|
@@ -5564,10 +5575,9 @@ const TREATMENTS = {
|
|
|
5564
5575
|
},
|
|
5565
5576
|
cart_locked: {
|
|
5566
5577
|
title: "Checkout in progress",
|
|
5567
|
-
//
|
|
5568
|
-
// the fan
|
|
5569
|
-
|
|
5570
|
-
body: "Your basket is locked while checkout completes. Return to checkout to finish or cancel it.",
|
|
5578
|
+
// Says what to do, not what we have done to their basket. "Locked" is our word for
|
|
5579
|
+
// our mechanism; the fan only needs the next step, which is the CTA on this screen.
|
|
5580
|
+
body: "Your checkout is still open. Return to it to finish or cancel your order.",
|
|
5571
5581
|
// Not retriable: repeating the same edit fails identically until the lock clears,
|
|
5572
5582
|
// and a "try again" affordance here would teach the fan to hammer a button that
|
|
5573
5583
|
// cannot work. The lock lifts on its own or on DAZN's signal, not on a retry.
|
|
@@ -5665,19 +5675,19 @@ function isDuplicateOrder(err) {
|
|
|
5665
5675
|
return codeOf(err) === "duplicate_order";
|
|
5666
5676
|
}
|
|
5667
5677
|
const root$4 = "_root_1lbpx_1";
|
|
5668
|
-
const title$
|
|
5678
|
+
const title$g = "_title_1lbpx_10";
|
|
5669
5679
|
const body$4 = "_body_1lbpx_15";
|
|
5670
|
-
const styles$
|
|
5680
|
+
const styles$B = {
|
|
5671
5681
|
root: root$4,
|
|
5672
|
-
title: title$
|
|
5682
|
+
title: title$g,
|
|
5673
5683
|
body: body$4
|
|
5674
5684
|
};
|
|
5675
5685
|
function ErrorState({ code, title: title2, body: body2, onRetry, retryLabel }) {
|
|
5676
5686
|
const treatment = treatmentFor(code);
|
|
5677
5687
|
const showRetry = Boolean(onRetry) && treatment.retriable;
|
|
5678
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
5679
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
5680
|
-
/* @__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 }),
|
|
5681
5691
|
showRetry && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onRetry, children: retryLabel ?? "Try again" })
|
|
5682
5692
|
] });
|
|
5683
5693
|
}
|
|
@@ -5704,7 +5714,7 @@ function StatusBadge({ status: status2 }) {
|
|
|
5704
5714
|
}
|
|
5705
5715
|
const viewport = "_viewport_1lt9i_1";
|
|
5706
5716
|
const toast = "_toast_1lt9i_15";
|
|
5707
|
-
const text$
|
|
5717
|
+
const text$4 = "_text_1lt9i_32";
|
|
5708
5718
|
const message$1 = "_message_1lt9i_39";
|
|
5709
5719
|
const action = "_action_1lt9i_44";
|
|
5710
5720
|
const neutral = "_neutral_1lt9i_63";
|
|
@@ -5714,10 +5724,10 @@ const rich = "_rich_1lt9i_81";
|
|
|
5714
5724
|
const description = "_description_1lt9i_96";
|
|
5715
5725
|
const thumb$1 = "_thumb_1lt9i_113";
|
|
5716
5726
|
const thumbImage = "_thumbImage_1lt9i_124";
|
|
5717
|
-
const styles$
|
|
5727
|
+
const styles$A = {
|
|
5718
5728
|
viewport,
|
|
5719
5729
|
toast,
|
|
5720
|
-
text: text$
|
|
5730
|
+
text: text$4,
|
|
5721
5731
|
message: message$1,
|
|
5722
5732
|
action,
|
|
5723
5733
|
neutral,
|
|
@@ -5778,24 +5788,24 @@ function ToastProvider({ children }) {
|
|
|
5778
5788
|
const api = useMemo(() => ({ show }), [show]);
|
|
5779
5789
|
return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: api, children: [
|
|
5780
5790
|
children,
|
|
5781
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
5791
|
+
/* @__PURE__ */ jsx("div", { className: styles$A.viewport, "aria-live": "polite", "aria-atomic": "false", children: toasts.map((t) => {
|
|
5782
5792
|
const rich2 = Boolean(t.description || t.image);
|
|
5783
5793
|
return /* @__PURE__ */ jsxs(
|
|
5784
5794
|
"div",
|
|
5785
5795
|
{
|
|
5786
|
-
className: [styles$
|
|
5796
|
+
className: [styles$A.toast, rich2 ? styles$A.rich : styles$A[t.tone]].join(" "),
|
|
5787
5797
|
role: "status",
|
|
5788
5798
|
children: [
|
|
5789
|
-
t.image && /* @__PURE__ */ jsx("span", { className: styles$
|
|
5790
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
5791
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
5792
|
-
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 })
|
|
5793
5803
|
] }),
|
|
5794
5804
|
t.action && /* @__PURE__ */ jsx(
|
|
5795
5805
|
"button",
|
|
5796
5806
|
{
|
|
5797
5807
|
type: "button",
|
|
5798
|
-
className: styles$
|
|
5808
|
+
className: styles$A.action,
|
|
5799
5809
|
onClick: () => {
|
|
5800
5810
|
t.action?.onAction();
|
|
5801
5811
|
dismiss(t.id);
|
|
@@ -5856,15 +5866,15 @@ function useLocale(override) {
|
|
|
5856
5866
|
const shop = useShopOptional();
|
|
5857
5867
|
return override ?? shop?.locale ?? shop?.market?.lang ?? (typeof navigator !== "undefined" ? navigator.language : void 0);
|
|
5858
5868
|
}
|
|
5859
|
-
const badge$
|
|
5860
|
-
const icon$
|
|
5861
|
-
const styles$
|
|
5862
|
-
badge: badge$
|
|
5863
|
-
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
|
|
5864
5874
|
};
|
|
5865
5875
|
function SaleBadge({ pct }) {
|
|
5866
|
-
return /* @__PURE__ */ jsxs("span", { className: styles$
|
|
5867
|
-
/* @__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: [
|
|
5868
5878
|
/* @__PURE__ */ jsx(
|
|
5869
5879
|
"path",
|
|
5870
5880
|
{
|
|
@@ -5890,7 +5900,7 @@ const lg = "_lg_n3nm5_27";
|
|
|
5890
5900
|
const price$1 = "_price_n3nm5_31";
|
|
5891
5901
|
const compareAt = "_compareAt_n3nm5_36";
|
|
5892
5902
|
const strikethrough = "_strikethrough_n3nm5_44";
|
|
5893
|
-
const styles$
|
|
5903
|
+
const styles$y = {
|
|
5894
5904
|
root: root$3,
|
|
5895
5905
|
center: center$1,
|
|
5896
5906
|
end,
|
|
@@ -5912,9 +5922,9 @@ function PriceBlock({
|
|
|
5912
5922
|
const { format } = useMoney();
|
|
5913
5923
|
const pct = discountPct$1 ?? discountPct(price2, compareAt2);
|
|
5914
5924
|
const hasCompare = compareAt2 && compareAt2.amount > price2.amount;
|
|
5915
|
-
return /* @__PURE__ */ jsxs("div", { className: [styles$
|
|
5916
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
5917
|
-
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: [
|
|
5918
5928
|
/* @__PURE__ */ jsx("span", { className: "visually-hidden", children: "Was " }),
|
|
5919
5929
|
format(compareAt2)
|
|
5920
5930
|
] }),
|
|
@@ -6010,52 +6020,52 @@ function swatchColour(name) {
|
|
|
6010
6020
|
return SWATCH_HEX[name.toLowerCase().trim()] ?? "#c9cdd0";
|
|
6011
6021
|
}
|
|
6012
6022
|
const timeline = "_timeline_1j37h_7";
|
|
6013
|
-
const row$
|
|
6023
|
+
const row$7 = "_row_1j37h_15";
|
|
6014
6024
|
const line$1 = "_line_1j37h_20";
|
|
6015
6025
|
const marker = "_marker_1j37h_27";
|
|
6016
6026
|
const tick = "_tick_1j37h_35";
|
|
6017
6027
|
const pending$2 = "_pending_1j37h_44";
|
|
6018
6028
|
const connector = "_connector_1j37h_68";
|
|
6019
|
-
const text$
|
|
6029
|
+
const text$3 = "_text_1j37h_84";
|
|
6020
6030
|
const label$1 = "_label_1j37h_101";
|
|
6021
6031
|
const past = "_past_1j37h_113";
|
|
6022
6032
|
const current = "_current_1j37h_118";
|
|
6023
6033
|
const future = "_future_1j37h_123";
|
|
6024
|
-
const date = "_date_1j37h_128";
|
|
6025
|
-
const styles$
|
|
6034
|
+
const date$1 = "_date_1j37h_128";
|
|
6035
|
+
const styles$x = {
|
|
6026
6036
|
timeline,
|
|
6027
|
-
row: row$
|
|
6037
|
+
row: row$7,
|
|
6028
6038
|
line: line$1,
|
|
6029
6039
|
marker,
|
|
6030
6040
|
tick,
|
|
6031
6041
|
pending: pending$2,
|
|
6032
6042
|
connector,
|
|
6033
|
-
text: text$
|
|
6043
|
+
text: text$3,
|
|
6034
6044
|
label: label$1,
|
|
6035
6045
|
past,
|
|
6036
6046
|
current,
|
|
6037
6047
|
future,
|
|
6038
|
-
date
|
|
6048
|
+
date: date$1
|
|
6039
6049
|
};
|
|
6040
|
-
function OrderTimeline({ progress, locale: localeProp }) {
|
|
6050
|
+
function OrderTimeline({ progress: progress2, locale: localeProp }) {
|
|
6041
6051
|
const locale = useLocale(localeProp);
|
|
6042
|
-
const currentIndex =
|
|
6043
|
-
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) => {
|
|
6044
6054
|
const state = stateOf(entry, i, currentIndex);
|
|
6045
6055
|
return /* @__PURE__ */ jsxs(
|
|
6046
6056
|
"li",
|
|
6047
6057
|
{
|
|
6048
|
-
className: styles$
|
|
6058
|
+
className: styles$x.row,
|
|
6049
6059
|
"aria-current": entry.current ? "step" : void 0,
|
|
6050
6060
|
children: [
|
|
6051
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6052
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6053
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
6054
|
-
/* @__PURE__ */ jsx("span", { className: [styles$
|
|
6055
|
-
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) })
|
|
6056
6066
|
] })
|
|
6057
6067
|
] }),
|
|
6058
|
-
i <
|
|
6068
|
+
i < progress2.length - 1 && /* @__PURE__ */ jsx("span", { className: styles$x.connector, "aria-hidden": "true" })
|
|
6059
6069
|
]
|
|
6060
6070
|
},
|
|
6061
6071
|
entry.step
|
|
@@ -6071,7 +6081,7 @@ function StepTick({ tone }) {
|
|
|
6071
6081
|
return /* @__PURE__ */ jsxs(
|
|
6072
6082
|
"svg",
|
|
6073
6083
|
{
|
|
6074
|
-
className: styles$
|
|
6084
|
+
className: styles$x.tick,
|
|
6075
6085
|
width: "28",
|
|
6076
6086
|
height: "28",
|
|
6077
6087
|
viewBox: "0 0 28 28",
|
|
@@ -6105,12 +6115,12 @@ function formatStepDate(iso, locale) {
|
|
|
6105
6115
|
return `${weekday}, ${dayMonth}`;
|
|
6106
6116
|
}
|
|
6107
6117
|
const summary = "_summary_1h18y_2";
|
|
6108
|
-
const row$
|
|
6118
|
+
const row$6 = "_row_1h18y_8";
|
|
6109
6119
|
const free = "_free_1h18y_36";
|
|
6110
6120
|
const pending$1 = "_pending_1h18y_42";
|
|
6111
|
-
const styles$
|
|
6121
|
+
const styles$w = {
|
|
6112
6122
|
summary,
|
|
6113
|
-
row: row$
|
|
6123
|
+
row: row$6,
|
|
6114
6124
|
free,
|
|
6115
6125
|
pending: pending$1
|
|
6116
6126
|
};
|
|
@@ -6125,26 +6135,26 @@ function OrderSummary({ pricing, deferred = [], rows = CART_ROWS }) {
|
|
|
6125
6135
|
const isDeferred = (key) => deferred.includes(key);
|
|
6126
6136
|
const anyDeferred = deferred.length > 0;
|
|
6127
6137
|
const visible = rows.filter((row2) => row2.key !== "total" || !anyDeferred);
|
|
6128
|
-
return /* @__PURE__ */ jsx("dl", { className: styles$
|
|
6138
|
+
return /* @__PURE__ */ jsx("dl", { className: styles$w.summary, children: visible.map(({ label: label2, key }) => {
|
|
6129
6139
|
const pending2 = key !== "total" && isDeferred(key);
|
|
6130
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6140
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$w.row, children: [
|
|
6131
6141
|
/* @__PURE__ */ jsx("dt", { children: label2 }),
|
|
6132
|
-
/* @__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) })
|
|
6133
6143
|
] }, key);
|
|
6134
6144
|
}) });
|
|
6135
6145
|
}
|
|
6136
6146
|
function renderValue(key, pricing, format) {
|
|
6137
6147
|
if (key === "shipping" && pricing.shipping.amount === 0) {
|
|
6138
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
6148
|
+
return /* @__PURE__ */ jsx("span", { className: styles$w.free, children: "Free" });
|
|
6139
6149
|
}
|
|
6140
6150
|
return format(pricing[key]);
|
|
6141
6151
|
}
|
|
6142
|
-
const page$
|
|
6152
|
+
const page$2 = "_page_1eqkm_1";
|
|
6143
6153
|
const status = "_status_1eqkm_10";
|
|
6144
6154
|
const widget = "_widget_1eqkm_18";
|
|
6145
|
-
const title$
|
|
6155
|
+
const title$f = "_title_1eqkm_24";
|
|
6146
6156
|
const headline = "_headline_1eqkm_30";
|
|
6147
|
-
const subtitle$
|
|
6157
|
+
const subtitle$3 = "_subtitle_1eqkm_37";
|
|
6148
6158
|
const dot$3 = "_dot_1eqkm_48";
|
|
6149
6159
|
const trackButton = "_trackButton_1eqkm_58";
|
|
6150
6160
|
const srOnly = "_srOnly_1eqkm_78";
|
|
@@ -6155,8 +6165,8 @@ const count$1 = "_count_1eqkm_115";
|
|
|
6155
6165
|
const lines$1 = "_lines_1eqkm_130";
|
|
6156
6166
|
const line = "_line_1eqkm_130";
|
|
6157
6167
|
const thumb = "_thumb_1eqkm_152";
|
|
6158
|
-
const image$
|
|
6159
|
-
const placeholder$
|
|
6168
|
+
const image$8 = "_image_1eqkm_162";
|
|
6169
|
+
const placeholder$5 = "_placeholder_1eqkm_166";
|
|
6160
6170
|
const lineBody = "_lineBody_1eqkm_172";
|
|
6161
6171
|
const lineText = "_lineText_1eqkm_180";
|
|
6162
6172
|
const lineTitle = "_lineTitle_1eqkm_189";
|
|
@@ -6171,13 +6181,13 @@ const last4 = "_last4_1eqkm_256";
|
|
|
6171
6181
|
const brand = "_brand_1eqkm_262";
|
|
6172
6182
|
const divider$2 = "_divider_1eqkm_268";
|
|
6173
6183
|
const summaryCard = "_summaryCard_1eqkm_275";
|
|
6174
|
-
const styles$
|
|
6175
|
-
page: page$
|
|
6184
|
+
const styles$v = {
|
|
6185
|
+
page: page$2,
|
|
6176
6186
|
status,
|
|
6177
6187
|
widget,
|
|
6178
|
-
title: title$
|
|
6188
|
+
title: title$f,
|
|
6179
6189
|
headline,
|
|
6180
|
-
subtitle: subtitle$
|
|
6190
|
+
subtitle: subtitle$3,
|
|
6181
6191
|
dot: dot$3,
|
|
6182
6192
|
trackButton,
|
|
6183
6193
|
srOnly,
|
|
@@ -6188,8 +6198,8 @@ const styles$s = {
|
|
|
6188
6198
|
lines: lines$1,
|
|
6189
6199
|
line,
|
|
6190
6200
|
thumb,
|
|
6191
|
-
image: image$
|
|
6192
|
-
placeholder: placeholder$
|
|
6201
|
+
image: image$8,
|
|
6202
|
+
placeholder: placeholder$5,
|
|
6193
6203
|
lineBody,
|
|
6194
6204
|
lineText,
|
|
6195
6205
|
lineTitle,
|
|
@@ -6234,7 +6244,7 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6234
6244
|
void load();
|
|
6235
6245
|
}, [load]);
|
|
6236
6246
|
if (state === "loading") {
|
|
6237
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6247
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$v.page, children: [
|
|
6238
6248
|
/* @__PURE__ */ jsx(Skeleton, { height: 120, radius: 8 }),
|
|
6239
6249
|
/* @__PURE__ */ jsx(Skeleton, { height: 220, radius: 18 }),
|
|
6240
6250
|
/* @__PURE__ */ jsx(Skeleton, { height: 140, radius: 18 })
|
|
@@ -6243,34 +6253,34 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6243
6253
|
if (state === "error" || !order) {
|
|
6244
6254
|
return /* @__PURE__ */ jsx(ErrorState, { code: errorCode, onRetry: () => void load() });
|
|
6245
6255
|
}
|
|
6246
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6247
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6248
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6249
|
-
/* @__PURE__ */ jsx("h1", { className: styles$
|
|
6250
|
-
/* @__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: [
|
|
6251
6261
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
6252
6262
|
"Order #",
|
|
6253
|
-
shortRef(order.order_ref)
|
|
6263
|
+
shortRef$1(order.order_ref)
|
|
6254
6264
|
] }),
|
|
6255
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6265
|
+
/* @__PURE__ */ jsx("span", { className: styles$v.dot, "aria-hidden": "true" }),
|
|
6256
6266
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
6257
6267
|
"Placed ",
|
|
6258
|
-
formatPlaced(order.placed_at, locale)
|
|
6268
|
+
formatPlaced$1(order.placed_at, locale)
|
|
6259
6269
|
] })
|
|
6260
6270
|
] })
|
|
6261
6271
|
] }),
|
|
6262
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6272
|
+
/* @__PURE__ */ jsxs("div", { className: styles$v.widget, children: [
|
|
6263
6273
|
/* @__PURE__ */ jsx(OrderTimeline, { progress: order.progress, locale }),
|
|
6264
6274
|
order.tracking?.url && /* @__PURE__ */ jsxs(
|
|
6265
6275
|
"a",
|
|
6266
6276
|
{
|
|
6267
|
-
className: styles$
|
|
6277
|
+
className: styles$v.trackButton,
|
|
6268
6278
|
href: order.tracking.url,
|
|
6269
6279
|
target: "_blank",
|
|
6270
6280
|
rel: "noopener noreferrer",
|
|
6271
6281
|
children: [
|
|
6272
6282
|
"Track order",
|
|
6273
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
6283
|
+
/* @__PURE__ */ jsxs("span", { className: styles$v.srOnly, children: [
|
|
6274
6284
|
" (opens ",
|
|
6275
6285
|
order.tracking.carrier,
|
|
6276
6286
|
" in a new tab)"
|
|
@@ -6281,18 +6291,18 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6281
6291
|
] })
|
|
6282
6292
|
] }),
|
|
6283
6293
|
/* @__PURE__ */ jsx(ItemsCard, { order }),
|
|
6284
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6285
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6286
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6287
|
-
/* @__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) })
|
|
6288
6298
|
] }),
|
|
6289
6299
|
order.payment && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6290
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6291
|
-
/* @__PURE__ */ jsxs("div", { className: [styles$
|
|
6292
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6293
|
-
/* @__PURE__ */ jsxs("p", { className: styles$
|
|
6294
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6295
|
-
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: [
|
|
6296
6306
|
"•••• ",
|
|
6297
6307
|
order.payment.last4
|
|
6298
6308
|
] })
|
|
@@ -6300,27 +6310,27 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6300
6310
|
] })
|
|
6301
6311
|
] })
|
|
6302
6312
|
] }),
|
|
6303
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6304
|
-
/* @__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" }),
|
|
6305
6315
|
/* @__PURE__ */ jsx(OrderSummary, { pricing: toPricing(order), rows: SUMMARY_ROWS })
|
|
6306
6316
|
] })
|
|
6307
6317
|
] });
|
|
6308
6318
|
}
|
|
6309
6319
|
function ItemsCard({ order }) {
|
|
6310
6320
|
const { format } = useMoney();
|
|
6311
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
6312
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6313
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6314
|
-
/* @__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) })
|
|
6315
6325
|
] }),
|
|
6316
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
6317
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6318
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6319
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6320
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6321
|
-
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)) })
|
|
6322
6332
|
] }),
|
|
6323
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6333
|
+
/* @__PURE__ */ jsx("span", { className: styles$v.linePrice, children: format(item2.line_total) })
|
|
6324
6334
|
] })
|
|
6325
6335
|
] }, item2.line_ref)) })
|
|
6326
6336
|
] });
|
|
@@ -6337,10 +6347,10 @@ function toPricing(order) {
|
|
|
6337
6347
|
total: order.totals.grand_total
|
|
6338
6348
|
};
|
|
6339
6349
|
}
|
|
6340
|
-
function shortRef(orderRef) {
|
|
6350
|
+
function shortRef$1(orderRef) {
|
|
6341
6351
|
return orderRef.replace(/^ord_/, "");
|
|
6342
6352
|
}
|
|
6343
|
-
function formatPlaced(iso, locale) {
|
|
6353
|
+
function formatPlaced$1(iso, locale) {
|
|
6344
6354
|
return new Date(iso).toLocaleDateString(locale, {
|
|
6345
6355
|
day: "numeric",
|
|
6346
6356
|
month: "short",
|
|
@@ -6350,6 +6360,202 @@ function formatPlaced(iso, locale) {
|
|
|
6350
6360
|
function formatAddress(address) {
|
|
6351
6361
|
return [address.line1, address.line2, address.postcode, address.city, address.country].filter(Boolean).join(", ");
|
|
6352
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
|
+
}
|
|
6353
6559
|
const tile$1 = "_tile_1u9l8_3";
|
|
6354
6560
|
const media$2 = "_media_1u9l8_11";
|
|
6355
6561
|
const image$6 = "_image_1u9l8_21";
|
|
@@ -6359,13 +6565,13 @@ const saleBadge$1 = "_saleBadge_1u9l8_56";
|
|
|
6359
6565
|
const oos$2 = "_oos_1u9l8_63";
|
|
6360
6566
|
const bottom = "_bottom_1u9l8_88";
|
|
6361
6567
|
const titlePrice$1 = "_titlePrice_1u9l8_1";
|
|
6362
|
-
const title$
|
|
6568
|
+
const title$d = "_title_1u9l8_1";
|
|
6363
6569
|
const swatches = "_swatches_1u9l8_119";
|
|
6364
6570
|
const swatch = "_swatch_1u9l8_119";
|
|
6365
6571
|
const swatchActive = "_swatchActive_1u9l8_132";
|
|
6366
6572
|
const swatchDot = "_swatchDot_1u9l8_136";
|
|
6367
6573
|
const large = "_large_1u9l8_147";
|
|
6368
|
-
const styles$
|
|
6574
|
+
const styles$s = {
|
|
6369
6575
|
tile: tile$1,
|
|
6370
6576
|
media: media$2,
|
|
6371
6577
|
image: image$6,
|
|
@@ -6375,7 +6581,7 @@ const styles$r = {
|
|
|
6375
6581
|
oos: oos$2,
|
|
6376
6582
|
bottom,
|
|
6377
6583
|
titlePrice: titlePrice$1,
|
|
6378
|
-
title: title$
|
|
6584
|
+
title: title$d,
|
|
6379
6585
|
swatches,
|
|
6380
6586
|
swatch,
|
|
6381
6587
|
swatchActive,
|
|
@@ -6392,9 +6598,9 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
6392
6598
|
ShopLink,
|
|
6393
6599
|
{
|
|
6394
6600
|
to: `/product/${encodeURIComponent(product.sku)}`,
|
|
6395
|
-
className: [styles$
|
|
6601
|
+
className: [styles$s.tile, size === "large" ? styles$s.large : ""].join(" "),
|
|
6396
6602
|
children: [
|
|
6397
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6603
|
+
/* @__PURE__ */ jsxs("div", { className: styles$s.media, children: [
|
|
6398
6604
|
image2 ? /* @__PURE__ */ jsx(
|
|
6399
6605
|
ShopImage,
|
|
6400
6606
|
{
|
|
@@ -6402,17 +6608,17 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
6402
6608
|
alt: product.title,
|
|
6403
6609
|
fill: true,
|
|
6404
6610
|
sizes: size === "large" ? "(max-width: 480px) 100vw, 480px" : "(max-width: 480px) 45vw, 200px",
|
|
6405
|
-
className: styles$
|
|
6611
|
+
className: styles$s.image,
|
|
6406
6612
|
priority
|
|
6407
6613
|
}
|
|
6408
|
-
) : /* @__PURE__ */ jsx("div", { className: styles$
|
|
6409
|
-
anyInStock && topBadge2 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6410
|
-
anyInStock && pct !== void 0 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6411
|
-
!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" })
|
|
6412
6618
|
] }),
|
|
6413
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6414
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6415
|
-
/* @__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 }),
|
|
6416
6622
|
/* @__PURE__ */ jsx(
|
|
6417
6623
|
PriceBlock,
|
|
6418
6624
|
{
|
|
@@ -6424,11 +6630,11 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
6424
6630
|
}
|
|
6425
6631
|
)
|
|
6426
6632
|
] }),
|
|
6427
|
-
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(
|
|
6428
6634
|
"span",
|
|
6429
6635
|
{
|
|
6430
|
-
className: [styles$
|
|
6431
|
-
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) } })
|
|
6432
6638
|
},
|
|
6433
6639
|
c.value
|
|
6434
6640
|
)) })
|
|
@@ -6442,7 +6648,7 @@ const chips$1 = "_chips_fn0g9_8";
|
|
|
6442
6648
|
const chip$1 = "_chip_fn0g9_8";
|
|
6443
6649
|
const on = "_on_fn0g9_29";
|
|
6444
6650
|
const clear = "_clear_fn0g9_35";
|
|
6445
|
-
const styles$
|
|
6651
|
+
const styles$r = {
|
|
6446
6652
|
bar: bar$1,
|
|
6447
6653
|
chips: chips$1,
|
|
6448
6654
|
chip: chip$1,
|
|
@@ -6451,27 +6657,27 @@ const styles$q = {
|
|
|
6451
6657
|
};
|
|
6452
6658
|
function FilterBar({ options: options2, active, onToggle, onClear }) {
|
|
6453
6659
|
const hasActive = active.length > 0;
|
|
6454
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6455
|
-
/* @__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) => {
|
|
6456
6662
|
const on2 = active.includes(opt.value);
|
|
6457
6663
|
return /* @__PURE__ */ jsx(
|
|
6458
6664
|
"button",
|
|
6459
6665
|
{
|
|
6460
6666
|
type: "button",
|
|
6461
6667
|
"aria-pressed": on2,
|
|
6462
|
-
className: [styles$
|
|
6668
|
+
className: [styles$r.chip, on2 ? styles$r.on : ""].join(" "),
|
|
6463
6669
|
onClick: () => onToggle(opt.value),
|
|
6464
6670
|
children: opt.label
|
|
6465
6671
|
},
|
|
6466
6672
|
opt.value
|
|
6467
6673
|
);
|
|
6468
6674
|
}) }),
|
|
6469
|
-
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" })
|
|
6470
6676
|
] });
|
|
6471
6677
|
}
|
|
6472
6678
|
const wrap$2 = "_wrap_15ntf_1";
|
|
6473
6679
|
const grid$1 = "_grid_15ntf_7";
|
|
6474
|
-
const styles$
|
|
6680
|
+
const styles$q = {
|
|
6475
6681
|
wrap: wrap$2,
|
|
6476
6682
|
grid: grid$1
|
|
6477
6683
|
};
|
|
@@ -6516,7 +6722,7 @@ function ProductGrid({
|
|
|
6516
6722
|
return () => observer.disconnect();
|
|
6517
6723
|
}, [loadMore]);
|
|
6518
6724
|
const visible = active.length === 0 ? products : products.filter((p) => active.includes(p.category));
|
|
6519
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6725
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$q.wrap, children: [
|
|
6520
6726
|
filters.length > 0 && /* @__PURE__ */ jsx(
|
|
6521
6727
|
FilterBar,
|
|
6522
6728
|
{
|
|
@@ -6533,22 +6739,22 @@ function ProductGrid({
|
|
|
6533
6739
|
body: "Nothing matches these filters.",
|
|
6534
6740
|
action: active.length > 0 ? /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: () => setActive([]), children: "Clear filters" }) : void 0
|
|
6535
6741
|
}
|
|
6536
|
-
) : /* @__PURE__ */ jsx("ul", { className: styles$
|
|
6537
|
-
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)) }),
|
|
6538
6744
|
/* @__PURE__ */ jsx("div", { ref: sentinelRef, "aria-hidden": "true" })
|
|
6539
6745
|
] });
|
|
6540
6746
|
}
|
|
6541
6747
|
const rail = "_rail_5z5e9_2";
|
|
6542
|
-
const header$
|
|
6543
|
-
const title$
|
|
6748
|
+
const header$6 = "_header_5z5e9_9";
|
|
6749
|
+
const title$c = "_title_5z5e9_16";
|
|
6544
6750
|
const seeAll = "_seeAll_5z5e9_22";
|
|
6545
6751
|
const track$3 = "_track_5z5e9_28";
|
|
6546
6752
|
const item = "_item_5z5e9_45";
|
|
6547
6753
|
const inset = "_inset_5z5e9_57";
|
|
6548
|
-
const styles$
|
|
6754
|
+
const styles$p = {
|
|
6549
6755
|
rail,
|
|
6550
|
-
header: header$
|
|
6551
|
-
title: title$
|
|
6756
|
+
header: header$6,
|
|
6757
|
+
title: title$c,
|
|
6552
6758
|
seeAll,
|
|
6553
6759
|
track: track$3,
|
|
6554
6760
|
item,
|
|
@@ -6556,62 +6762,16 @@ const styles$o = {
|
|
|
6556
6762
|
};
|
|
6557
6763
|
function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
|
|
6558
6764
|
if (products.length === 0) return null;
|
|
6559
|
-
return /* @__PURE__ */ jsxs("section", { className: [styles$
|
|
6560
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6561
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
6562
|
-
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" })
|
|
6563
6769
|
] }),
|
|
6564
|
-
/* @__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)) })
|
|
6565
6771
|
] });
|
|
6566
6772
|
}
|
|
6567
|
-
const overlay$1 = "_overlay_s4eai_1";
|
|
6568
|
-
const scrim$3 = "_scrim_s4eai_10";
|
|
6569
|
-
const sheet$1 = "_sheet_s4eai_16";
|
|
6570
|
-
const grabArea = "_grabArea_s4eai_41";
|
|
6571
|
-
const grabber$1 = "_grabber_s4eai_51";
|
|
6572
|
-
const header$4 = "_header_s4eai_59";
|
|
6573
|
-
const title$a = "_title_s4eai_67";
|
|
6574
|
-
const close$1 = "_close_s4eai_71";
|
|
6575
|
-
const body$3 = "_body_s4eai_84";
|
|
6576
|
-
const footer = "_footer_s4eai_90";
|
|
6577
|
-
const styles$n = {
|
|
6578
|
-
overlay: overlay$1,
|
|
6579
|
-
scrim: scrim$3,
|
|
6580
|
-
sheet: sheet$1,
|
|
6581
|
-
grabArea,
|
|
6582
|
-
grabber: grabber$1,
|
|
6583
|
-
header: header$4,
|
|
6584
|
-
title: title$a,
|
|
6585
|
-
close: close$1,
|
|
6586
|
-
body: body$3,
|
|
6587
|
-
footer
|
|
6588
|
-
};
|
|
6589
6773
|
const FOCUSABLE = 'a[href], button:not([disabled]), textarea, input, select, [tabindex]:not([tabindex="-1"])';
|
|
6590
|
-
|
|
6591
|
-
function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }) {
|
|
6592
|
-
const sheetRef = useRef(null);
|
|
6593
|
-
const previouslyFocused = useRef(null);
|
|
6594
|
-
const dragStartY = useRef(null);
|
|
6595
|
-
const dragDistance = useRef(0);
|
|
6596
|
-
const [dragY, setDragY] = useState(0);
|
|
6597
|
-
const titleId = "bottomsheet-title";
|
|
6598
|
-
const onDragStart = useCallback((clientY) => {
|
|
6599
|
-
dragStartY.current = clientY;
|
|
6600
|
-
}, []);
|
|
6601
|
-
const onDragMove = useCallback((clientY) => {
|
|
6602
|
-
if (dragStartY.current === null) return;
|
|
6603
|
-
const distance = Math.max(0, clientY - dragStartY.current);
|
|
6604
|
-
dragDistance.current = distance;
|
|
6605
|
-
setDragY(distance);
|
|
6606
|
-
}, []);
|
|
6607
|
-
const onDragEnd = useCallback(() => {
|
|
6608
|
-
if (dragStartY.current === null) return;
|
|
6609
|
-
dragStartY.current = null;
|
|
6610
|
-
const dismissed = dragDistance.current > DISMISS_THRESHOLD_PX;
|
|
6611
|
-
dragDistance.current = 0;
|
|
6612
|
-
setDragY(0);
|
|
6613
|
-
if (dismissed) onClose();
|
|
6614
|
-
}, [onClose]);
|
|
6774
|
+
function useModalDialog(open, onClose, ref) {
|
|
6615
6775
|
const handleKeyDown = useCallback(
|
|
6616
6776
|
(e) => {
|
|
6617
6777
|
if (e.key === "Escape") {
|
|
@@ -6620,9 +6780,9 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
6620
6780
|
return;
|
|
6621
6781
|
}
|
|
6622
6782
|
if (e.key !== "Tab") return;
|
|
6623
|
-
const
|
|
6624
|
-
if (!
|
|
6625
|
-
const focusables = Array.from(
|
|
6783
|
+
const dialog = ref.current;
|
|
6784
|
+
if (!dialog) return;
|
|
6785
|
+
const focusables = Array.from(dialog.querySelectorAll(FOCUSABLE)).filter(
|
|
6626
6786
|
(el) => el.offsetParent !== null || el === document.activeElement
|
|
6627
6787
|
);
|
|
6628
6788
|
if (focusables.length === 0) {
|
|
@@ -6639,31 +6799,77 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
6639
6799
|
first.focus();
|
|
6640
6800
|
}
|
|
6641
6801
|
},
|
|
6642
|
-
[onClose]
|
|
6802
|
+
[onClose, ref]
|
|
6643
6803
|
);
|
|
6644
6804
|
useEffect(() => {
|
|
6645
6805
|
if (!open) return;
|
|
6646
|
-
previouslyFocused
|
|
6806
|
+
const previouslyFocused = document.activeElement;
|
|
6647
6807
|
document.addEventListener("keydown", handleKeyDown);
|
|
6648
|
-
|
|
6649
|
-
const first = sheet2?.querySelector(FOCUSABLE);
|
|
6650
|
-
first?.focus();
|
|
6808
|
+
ref.current?.querySelector(FOCUSABLE)?.focus();
|
|
6651
6809
|
const { overflow } = document.body.style;
|
|
6652
6810
|
document.body.style.overflow = "hidden";
|
|
6653
6811
|
return () => {
|
|
6654
6812
|
document.removeEventListener("keydown", handleKeyDown);
|
|
6655
6813
|
document.body.style.overflow = overflow;
|
|
6656
|
-
previouslyFocused
|
|
6814
|
+
previouslyFocused?.focus?.();
|
|
6657
6815
|
};
|
|
6658
|
-
}, [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);
|
|
6659
6865
|
if (!open) return null;
|
|
6660
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6661
|
-
/* @__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" }),
|
|
6662
6868
|
/* @__PURE__ */ jsxs(
|
|
6663
6869
|
ShopSurface,
|
|
6664
6870
|
{
|
|
6665
6871
|
tone: "light",
|
|
6666
|
-
className: styles$
|
|
6872
|
+
className: styles$o.sheet,
|
|
6667
6873
|
role: "dialog",
|
|
6668
6874
|
"aria-modal": "true",
|
|
6669
6875
|
"aria-labelledby": titleId,
|
|
@@ -6673,7 +6879,7 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
6673
6879
|
/* @__PURE__ */ jsx(
|
|
6674
6880
|
"div",
|
|
6675
6881
|
{
|
|
6676
|
-
className: styles$
|
|
6882
|
+
className: styles$o.grabArea,
|
|
6677
6883
|
onPointerDown: (e) => {
|
|
6678
6884
|
e.currentTarget.setPointerCapture(e.pointerId);
|
|
6679
6885
|
onDragStart(e.clientY);
|
|
@@ -6681,12 +6887,12 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
6681
6887
|
onPointerMove: (e) => onDragMove(e.clientY),
|
|
6682
6888
|
onPointerUp: onDragEnd,
|
|
6683
6889
|
onPointerCancel: onDragEnd,
|
|
6684
|
-
children: /* @__PURE__ */ jsx("div", { className: styles$
|
|
6890
|
+
children: /* @__PURE__ */ jsx("div", { className: styles$o.grabber, "aria-hidden": "true" })
|
|
6685
6891
|
}
|
|
6686
6892
|
),
|
|
6687
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6688
|
-
/* @__PURE__ */ jsx("h2", { id: titleId, className: styles$
|
|
6689
|
-
/* @__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(
|
|
6690
6896
|
"path",
|
|
6691
6897
|
{
|
|
6692
6898
|
d: "M6 6l12 12M18 6L6 18",
|
|
@@ -6696,8 +6902,8 @@ function BottomSheet({ open, onClose, title: title2, children, footer: footer2 }
|
|
|
6696
6902
|
}
|
|
6697
6903
|
) }) })
|
|
6698
6904
|
] }),
|
|
6699
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6700
|
-
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 })
|
|
6701
6907
|
]
|
|
6702
6908
|
}
|
|
6703
6909
|
)
|
|
@@ -6708,7 +6914,7 @@ const stepper = "_stepper_1rmip_10";
|
|
|
6708
6914
|
const cap = "_cap_1rmip_23";
|
|
6709
6915
|
const button = "_button_1rmip_31";
|
|
6710
6916
|
const value$1 = "_value_1rmip_50";
|
|
6711
|
-
const styles$
|
|
6917
|
+
const styles$n = {
|
|
6712
6918
|
wrap: wrap$1,
|
|
6713
6919
|
stepper,
|
|
6714
6920
|
cap,
|
|
@@ -6766,25 +6972,25 @@ function QtyStepper({ qty, max, onChange, onRemove, disabled: disabled2 }) {
|
|
|
6766
6972
|
function increment() {
|
|
6767
6973
|
if (!atMax) onChange(qty + 1);
|
|
6768
6974
|
}
|
|
6769
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6770
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6975
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$n.wrap, children: [
|
|
6976
|
+
/* @__PURE__ */ jsxs("div", { className: styles$n.stepper, children: [
|
|
6771
6977
|
/* @__PURE__ */ jsx(
|
|
6772
6978
|
"button",
|
|
6773
6979
|
{
|
|
6774
6980
|
type: "button",
|
|
6775
|
-
className: styles$
|
|
6981
|
+
className: styles$n.button,
|
|
6776
6982
|
onClick: decrement,
|
|
6777
6983
|
disabled: disabled2,
|
|
6778
6984
|
"aria-label": willDelete ? "Remove item" : "Decrease quantity",
|
|
6779
6985
|
children: willDelete ? /* @__PURE__ */ jsx(TrashIcon, {}) : /* @__PURE__ */ jsx(MinusIcon, {})
|
|
6780
6986
|
}
|
|
6781
6987
|
),
|
|
6782
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6988
|
+
/* @__PURE__ */ jsx("span", { className: styles$n.value, "aria-live": "polite", "aria-label": `Quantity ${qty}`, children: qty }),
|
|
6783
6989
|
/* @__PURE__ */ jsx(
|
|
6784
6990
|
"button",
|
|
6785
6991
|
{
|
|
6786
6992
|
type: "button",
|
|
6787
|
-
className: styles$
|
|
6993
|
+
className: styles$n.button,
|
|
6788
6994
|
onClick: increment,
|
|
6789
6995
|
disabled: disabled2 || atMax,
|
|
6790
6996
|
"aria-label": "Increase quantity",
|
|
@@ -6793,10 +6999,10 @@ function QtyStepper({ qty, max, onChange, onRemove, disabled: disabled2 }) {
|
|
|
6793
6999
|
}
|
|
6794
7000
|
)
|
|
6795
7001
|
] }),
|
|
6796
|
-
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` })
|
|
6797
7003
|
] });
|
|
6798
7004
|
}
|
|
6799
|
-
const row$
|
|
7005
|
+
const row$5 = "_row_1xbbn_1";
|
|
6800
7006
|
const pending = "_pending_1xbbn_7";
|
|
6801
7007
|
const media$1 = "_media_1xbbn_11";
|
|
6802
7008
|
const image$5 = "_image_1xbbn_21";
|
|
@@ -6806,14 +7012,14 @@ const oos$1 = "_oos_1xbbn_45";
|
|
|
6806
7012
|
const info$1 = "_info_1xbbn_58";
|
|
6807
7013
|
const head = "_head_1xbbn_66";
|
|
6808
7014
|
const meta = "_meta_1xbbn_73";
|
|
6809
|
-
const title$
|
|
7015
|
+
const title$a = "_title_1xbbn_80";
|
|
6810
7016
|
const details = "_details_1xbbn_92";
|
|
6811
7017
|
const detail = "_detail_1xbbn_92";
|
|
6812
7018
|
const price = "_price_1xbbn_106";
|
|
6813
7019
|
const amount = "_amount_1xbbn_114";
|
|
6814
7020
|
const was = "_was_1xbbn_120";
|
|
6815
|
-
const styles$
|
|
6816
|
-
row: row$
|
|
7021
|
+
const styles$m = {
|
|
7022
|
+
row: row$5,
|
|
6817
7023
|
pending,
|
|
6818
7024
|
media: media$1,
|
|
6819
7025
|
image: image$5,
|
|
@@ -6823,7 +7029,7 @@ const styles$l = {
|
|
|
6823
7029
|
info: info$1,
|
|
6824
7030
|
head,
|
|
6825
7031
|
meta,
|
|
6826
|
-
title: title$
|
|
7032
|
+
title: title$a,
|
|
6827
7033
|
details,
|
|
6828
7034
|
detail,
|
|
6829
7035
|
price,
|
|
@@ -6846,24 +7052,24 @@ function CartLineItem({
|
|
|
6846
7052
|
const displayImage = image2 ?? item2.image;
|
|
6847
7053
|
const pairs = variantPairs(item2.attributes);
|
|
6848
7054
|
const soldOut = item2.available === 0;
|
|
6849
|
-
return /* @__PURE__ */ jsxs("div", { className: [styles$
|
|
6850
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6851
|
-
displayImage ? /* @__PURE__ */ jsx(ShopImage, { src: displayImage, alt: "", fill: true, sizes: "100px", className: styles$
|
|
6852
|
-
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 }) })
|
|
6853
7059
|
] }),
|
|
6854
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6855
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6856
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6857
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6858
|
-
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: [
|
|
6859
7065
|
label2,
|
|
6860
7066
|
": ",
|
|
6861
7067
|
value2
|
|
6862
7068
|
] }, key)) })
|
|
6863
7069
|
] }),
|
|
6864
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6865
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6866
|
-
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) })
|
|
6867
7073
|
] })
|
|
6868
7074
|
] }),
|
|
6869
7075
|
/* @__PURE__ */ jsx(
|
|
@@ -6880,21 +7086,21 @@ function CartLineItem({
|
|
|
6880
7086
|
] });
|
|
6881
7087
|
}
|
|
6882
7088
|
const box$1 = "_box_1cf1a_1";
|
|
6883
|
-
const row$
|
|
6884
|
-
const icon$
|
|
7089
|
+
const row$4 = "_row_1cf1a_10";
|
|
7090
|
+
const icon$2 = "_icon_1cf1a_16";
|
|
6885
7091
|
const label = "_label_1cf1a_22";
|
|
6886
7092
|
const divider$1 = "_divider_1cf1a_29";
|
|
6887
|
-
const styles$
|
|
7093
|
+
const styles$l = {
|
|
6888
7094
|
box: box$1,
|
|
6889
|
-
row: row$
|
|
6890
|
-
icon: icon$
|
|
7095
|
+
row: row$4,
|
|
7096
|
+
icon: icon$2,
|
|
6891
7097
|
label,
|
|
6892
7098
|
divider: divider$1
|
|
6893
7099
|
};
|
|
6894
7100
|
function ShippingInfo() {
|
|
6895
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
6896
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6897
|
-
/* @__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: [
|
|
6898
7104
|
/* @__PURE__ */ jsx(
|
|
6899
7105
|
"path",
|
|
6900
7106
|
{
|
|
@@ -6907,11 +7113,11 @@ function ShippingInfo() {
|
|
|
6907
7113
|
/* @__PURE__ */ jsx("circle", { cx: "7", cy: "17", r: "1.6", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
6908
7114
|
/* @__PURE__ */ jsx("circle", { cx: "17.5", cy: "17", r: "1.6", stroke: "currentColor", strokeWidth: "1.5" })
|
|
6909
7115
|
] }),
|
|
6910
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
7116
|
+
/* @__PURE__ */ jsx("p", { className: styles$l.label, children: "Standard or express delivery" })
|
|
6911
7117
|
] }),
|
|
6912
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6913
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6914
|
-
/* @__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: [
|
|
6915
7121
|
/* @__PURE__ */ jsx(
|
|
6916
7122
|
"path",
|
|
6917
7123
|
{
|
|
@@ -6933,7 +7139,7 @@ function ShippingInfo() {
|
|
|
6933
7139
|
}
|
|
6934
7140
|
)
|
|
6935
7141
|
] }),
|
|
6936
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
7142
|
+
/* @__PURE__ */ jsx("p", { className: styles$l.label, children: "30 days returns" })
|
|
6937
7143
|
] })
|
|
6938
7144
|
] });
|
|
6939
7145
|
}
|
|
@@ -6942,7 +7148,7 @@ const floating$1 = "_floating_1aly7_16";
|
|
|
6942
7148
|
const divider = "_divider_1aly7_22";
|
|
6943
7149
|
const info = "_info_1aly7_26";
|
|
6944
7150
|
const actions = "_actions_1aly7_33";
|
|
6945
|
-
const styles$
|
|
7151
|
+
const styles$k = {
|
|
6946
7152
|
bar,
|
|
6947
7153
|
floating: floating$1,
|
|
6948
7154
|
divider,
|
|
@@ -6950,21 +7156,20 @@ const styles$j = {
|
|
|
6950
7156
|
actions
|
|
6951
7157
|
};
|
|
6952
7158
|
function StickyCtaBar({ children, info: info2, variant = "floating" }) {
|
|
6953
|
-
return /* @__PURE__ */ jsxs("div", { className: [styles$
|
|
6954
|
-
info2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
6955
|
-
/* @__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 })
|
|
6956
7162
|
] });
|
|
6957
7163
|
}
|
|
6958
|
-
const surface = "
|
|
6959
|
-
const screen = "
|
|
6960
|
-
const body$2 = "
|
|
6961
|
-
const items = "
|
|
6962
|
-
const sectionHeader = "
|
|
6963
|
-
const sectionTitle = "
|
|
6964
|
-
const count = "
|
|
6965
|
-
const lines = "
|
|
6966
|
-
const
|
|
6967
|
-
const styles$i = {
|
|
7164
|
+
const surface = "_surface_1wfue_15";
|
|
7165
|
+
const screen = "_screen_1wfue_20";
|
|
7166
|
+
const body$2 = "_body_1wfue_12";
|
|
7167
|
+
const items = "_items_1wfue_34";
|
|
7168
|
+
const sectionHeader = "_sectionHeader_1wfue_40";
|
|
7169
|
+
const sectionTitle = "_sectionTitle_1wfue_46";
|
|
7170
|
+
const count = "_count_1wfue_53";
|
|
7171
|
+
const lines = "_lines_1wfue_73";
|
|
7172
|
+
const styles$j = {
|
|
6968
7173
|
surface,
|
|
6969
7174
|
screen,
|
|
6970
7175
|
body: body$2,
|
|
@@ -6972,11 +7177,10 @@ const styles$i = {
|
|
|
6972
7177
|
sectionHeader,
|
|
6973
7178
|
sectionTitle,
|
|
6974
7179
|
count,
|
|
6975
|
-
lines
|
|
6976
|
-
lockNotice
|
|
7180
|
+
lines
|
|
6977
7181
|
};
|
|
6978
7182
|
function CartView(props = {}) {
|
|
6979
|
-
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 }) });
|
|
6980
7184
|
}
|
|
6981
7185
|
function CartViewContent({
|
|
6982
7186
|
onContinueShopping,
|
|
@@ -7115,15 +7319,14 @@ function CartViewContent({
|
|
|
7115
7319
|
}
|
|
7116
7320
|
const locked = cart2.locked !== void 0;
|
|
7117
7321
|
const itemCount = cart2.items.reduce((n, i) => n + i.qty, 0);
|
|
7118
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
/* @__PURE__ */ jsx("
|
|
7124
|
-
/* @__PURE__ */ jsx("span", { className: styles$i.count, children: itemCount })
|
|
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 })
|
|
7125
7328
|
] }),
|
|
7126
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
7329
|
+
/* @__PURE__ */ jsx("ul", { className: styles$j.lines, children: cart2.items.map((item2) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
7127
7330
|
CartLineItem,
|
|
7128
7331
|
{
|
|
7129
7332
|
item: item2,
|
|
@@ -7171,7 +7374,7 @@ const share = "_share_h8m00_37";
|
|
|
7171
7374
|
const dots$2 = "_dots_h8m00_54";
|
|
7172
7375
|
const dot$2 = "_dot_h8m00_54";
|
|
7173
7376
|
const dotActive$2 = "_dotActive_h8m00_78";
|
|
7174
|
-
const styles$
|
|
7377
|
+
const styles$i = {
|
|
7175
7378
|
gallery,
|
|
7176
7379
|
track: track$2,
|
|
7177
7380
|
slide: slide$1,
|
|
@@ -7209,7 +7412,7 @@ function MediaGallery({ media: media2, alt }) {
|
|
|
7209
7412
|
setActive(index);
|
|
7210
7413
|
}
|
|
7211
7414
|
if (media2.length === 0) {
|
|
7212
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
7415
|
+
return /* @__PURE__ */ jsx("div", { className: styles$i.placeholder, "aria-hidden": "true" });
|
|
7213
7416
|
}
|
|
7214
7417
|
function share2() {
|
|
7215
7418
|
if (typeof navigator !== "undefined" && navigator.share) {
|
|
@@ -7217,8 +7420,8 @@ function MediaGallery({ media: media2, alt }) {
|
|
|
7217
7420
|
});
|
|
7218
7421
|
}
|
|
7219
7422
|
}
|
|
7220
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
7221
|
-
/* @__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(
|
|
7222
7425
|
"path",
|
|
7223
7426
|
{
|
|
7224
7427
|
d: "M12 3v12M12 3 8 7m4-4 4 4M5 12v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6",
|
|
@@ -7228,47 +7431,47 @@ function MediaGallery({ media: media2, alt }) {
|
|
|
7228
7431
|
strokeLinejoin: "round"
|
|
7229
7432
|
}
|
|
7230
7433
|
) }) }),
|
|
7231
|
-
/* @__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(
|
|
7232
7435
|
ShopImage,
|
|
7233
7436
|
{
|
|
7234
7437
|
src,
|
|
7235
7438
|
alt: `${alt} — image ${i + 1} of ${media2.length}`,
|
|
7236
7439
|
fill: true,
|
|
7237
7440
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
7238
|
-
className: styles$
|
|
7441
|
+
className: styles$i.image,
|
|
7239
7442
|
priority: i === 0
|
|
7240
7443
|
}
|
|
7241
7444
|
) }, src)) }),
|
|
7242
|
-
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(
|
|
7243
7446
|
"button",
|
|
7244
7447
|
{
|
|
7245
7448
|
type: "button",
|
|
7246
7449
|
role: "tab",
|
|
7247
7450
|
"aria-selected": i === active,
|
|
7248
7451
|
"aria-label": `Go to image ${i + 1}`,
|
|
7249
|
-
className: [styles$
|
|
7452
|
+
className: [styles$i.dot, i === active ? styles$i.dotActive : ""].join(" "),
|
|
7250
7453
|
onClick: () => goTo(i)
|
|
7251
7454
|
},
|
|
7252
7455
|
src
|
|
7253
7456
|
)) })
|
|
7254
7457
|
] });
|
|
7255
7458
|
}
|
|
7256
|
-
const scrim$
|
|
7257
|
-
const sheet = "_sheet_8wz6r_17";
|
|
7459
|
+
const scrim$3 = "_scrim_8wz6r_6";
|
|
7460
|
+
const sheet$1 = "_sheet_8wz6r_17";
|
|
7258
7461
|
const grabber = "_grabber_8wz6r_29";
|
|
7259
|
-
const header$
|
|
7260
|
-
const title$
|
|
7261
|
-
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";
|
|
7262
7465
|
const tableWrap = "_tableWrap_8wz6r_71";
|
|
7263
7466
|
const table = "_table_8wz6r_71";
|
|
7264
7467
|
const notes = "_notes_8wz6r_95";
|
|
7265
|
-
const styles$
|
|
7266
|
-
scrim: scrim$
|
|
7267
|
-
sheet,
|
|
7468
|
+
const styles$h = {
|
|
7469
|
+
scrim: scrim$3,
|
|
7470
|
+
sheet: sheet$1,
|
|
7268
7471
|
grabber,
|
|
7269
|
-
header: header$
|
|
7270
|
-
title: title$
|
|
7271
|
-
close,
|
|
7472
|
+
header: header$4,
|
|
7473
|
+
title: title$9,
|
|
7474
|
+
close: close$1,
|
|
7272
7475
|
tableWrap,
|
|
7273
7476
|
table,
|
|
7274
7477
|
notes
|
|
@@ -7287,24 +7490,24 @@ function SizeGuideSheet({ guide, onClose }) {
|
|
|
7287
7490
|
const rows = guide.rows ?? [];
|
|
7288
7491
|
const notes2 = guide.notes ?? [];
|
|
7289
7492
|
const hasTable = columns.length > 0 && rows.length > 0;
|
|
7290
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
7493
|
+
return /* @__PURE__ */ jsx("div", { className: styles$h.scrim, onClick: onClose, children: /* @__PURE__ */ jsxs(
|
|
7291
7494
|
"div",
|
|
7292
7495
|
{
|
|
7293
|
-
className: styles$
|
|
7496
|
+
className: styles$h.sheet,
|
|
7294
7497
|
role: "dialog",
|
|
7295
7498
|
"aria-modal": "true",
|
|
7296
7499
|
"aria-labelledby": "size-guide-title",
|
|
7297
7500
|
onClick: (e) => e.stopPropagation(),
|
|
7298
7501
|
children: [
|
|
7299
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
7300
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7301
|
-
/* @__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 }),
|
|
7302
7505
|
/* @__PURE__ */ jsx(
|
|
7303
7506
|
"button",
|
|
7304
7507
|
{
|
|
7305
7508
|
ref: closeRef,
|
|
7306
7509
|
type: "button",
|
|
7307
|
-
className: styles$
|
|
7510
|
+
className: styles$h.close,
|
|
7308
7511
|
onClick: onClose,
|
|
7309
7512
|
"aria-label": "Close size guide",
|
|
7310
7513
|
children: /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
@@ -7319,38 +7522,38 @@ function SizeGuideSheet({ guide, onClose }) {
|
|
|
7319
7522
|
}
|
|
7320
7523
|
)
|
|
7321
7524
|
] }),
|
|
7322
|
-
hasTable && /* @__PURE__ */ jsx("div", { className: styles$
|
|
7525
|
+
hasTable && /* @__PURE__ */ jsx("div", { className: styles$h.tableWrap, children: /* @__PURE__ */ jsxs("table", { className: styles$h.table, children: [
|
|
7323
7526
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((c) => /* @__PURE__ */ jsx("th", { scope: "col", children: c }, c)) }) }),
|
|
7324
7527
|
/* @__PURE__ */ jsx("tbody", { children: rows.map((row2) => /* @__PURE__ */ jsx("tr", { children: row2.map(
|
|
7325
7528
|
(cell, i) => i === 0 ? /* @__PURE__ */ jsx("th", { scope: "row", children: cell }, cell) : /* @__PURE__ */ jsx("td", { children: cell }, `${cell}-${i}`)
|
|
7326
7529
|
) }, row2.join("|"))) })
|
|
7327
7530
|
] }) }),
|
|
7328
|
-
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)) })
|
|
7329
7532
|
]
|
|
7330
7533
|
}
|
|
7331
7534
|
) });
|
|
7332
7535
|
}
|
|
7333
7536
|
const root$2 = "_root_9zj90_1";
|
|
7334
|
-
const header$
|
|
7335
|
-
const title$
|
|
7537
|
+
const header$3 = "_header_9zj90_7";
|
|
7538
|
+
const title$8 = "_title_9zj90_12";
|
|
7336
7539
|
const chips = "_chips_9zj90_20";
|
|
7337
7540
|
const chip = "_chip_9zj90_20";
|
|
7338
7541
|
const selected$2 = "_selected_9zj90_44";
|
|
7339
7542
|
const disabled$1 = "_disabled_9zj90_56";
|
|
7340
7543
|
const error = "_error_9zj90_64";
|
|
7341
7544
|
const sizeGuide = "_sizeGuide_9zj90_71";
|
|
7342
|
-
const chevron$
|
|
7343
|
-
const styles$
|
|
7545
|
+
const chevron$2 = "_chevron_9zj90_85";
|
|
7546
|
+
const styles$g = {
|
|
7344
7547
|
root: root$2,
|
|
7345
|
-
header: header$
|
|
7346
|
-
title: title$
|
|
7548
|
+
header: header$3,
|
|
7549
|
+
title: title$8,
|
|
7347
7550
|
chips,
|
|
7348
7551
|
chip,
|
|
7349
7552
|
selected: selected$2,
|
|
7350
7553
|
disabled: disabled$1,
|
|
7351
7554
|
error,
|
|
7352
7555
|
sizeGuide,
|
|
7353
|
-
chevron: chevron$
|
|
7556
|
+
chevron: chevron$2
|
|
7354
7557
|
};
|
|
7355
7558
|
function SizeSelector({
|
|
7356
7559
|
sizes,
|
|
@@ -7360,9 +7563,9 @@ function SizeSelector({
|
|
|
7360
7563
|
guide
|
|
7361
7564
|
}) {
|
|
7362
7565
|
const [guideOpen, setGuideOpen] = useState(false);
|
|
7363
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
7364
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
7365
|
-
/* @__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) => {
|
|
7366
7569
|
const isSelected = size.value === selected2;
|
|
7367
7570
|
const disabled2 = !size.available;
|
|
7368
7571
|
return /* @__PURE__ */ jsxs(
|
|
@@ -7373,7 +7576,7 @@ function SizeSelector({
|
|
|
7373
7576
|
"aria-checked": isSelected,
|
|
7374
7577
|
"aria-disabled": disabled2 || void 0,
|
|
7375
7578
|
disabled: disabled2,
|
|
7376
|
-
className: [styles$
|
|
7579
|
+
className: [styles$g.chip, isSelected ? styles$g.selected : "", disabled2 ? styles$g.disabled : ""].filter(Boolean).join(" "),
|
|
7377
7580
|
onClick: () => !disabled2 && onSelect(size.value),
|
|
7378
7581
|
children: [
|
|
7379
7582
|
size.value,
|
|
@@ -7383,12 +7586,12 @@ function SizeSelector({
|
|
|
7383
7586
|
size.value
|
|
7384
7587
|
);
|
|
7385
7588
|
}) }),
|
|
7386
|
-
error2 && /* @__PURE__ */ jsx("p", { className: styles$
|
|
7589
|
+
error2 && /* @__PURE__ */ jsx("p", { className: styles$g.error, role: "alert", children: "Please select a size" }),
|
|
7387
7590
|
guide && /* @__PURE__ */ jsxs(
|
|
7388
7591
|
"button",
|
|
7389
7592
|
{
|
|
7390
7593
|
type: "button",
|
|
7391
|
-
className: styles$
|
|
7594
|
+
className: styles$g.sizeGuide,
|
|
7392
7595
|
onClick: () => setGuideOpen(true),
|
|
7393
7596
|
"aria-haspopup": "dialog",
|
|
7394
7597
|
"aria-expanded": guideOpen,
|
|
@@ -7397,7 +7600,7 @@ function SizeSelector({
|
|
|
7397
7600
|
/* @__PURE__ */ jsx(
|
|
7398
7601
|
"svg",
|
|
7399
7602
|
{
|
|
7400
|
-
className: styles$
|
|
7603
|
+
className: styles$g.chevron,
|
|
7401
7604
|
width: "12",
|
|
7402
7605
|
height: "12",
|
|
7403
7606
|
viewBox: "0 0 12 12",
|
|
@@ -7422,8 +7625,8 @@ function SizeSelector({
|
|
|
7422
7625
|
] });
|
|
7423
7626
|
}
|
|
7424
7627
|
const root$1 = "_root_1j4n8_1";
|
|
7425
|
-
const header$
|
|
7426
|
-
const title$
|
|
7628
|
+
const header$2 = "_header_1j4n8_7";
|
|
7629
|
+
const title$7 = "_title_1j4n8_14";
|
|
7427
7630
|
const value = "_value_1j4n8_19";
|
|
7428
7631
|
const tiles = "_tiles_1j4n8_24";
|
|
7429
7632
|
const tile = "_tile_1j4n8_24";
|
|
@@ -7431,12 +7634,12 @@ const selected$1 = "_selected_1j4n8_48";
|
|
|
7431
7634
|
const media = "_media_1j4n8_32";
|
|
7432
7635
|
const image$3 = "_image_1j4n8_60";
|
|
7433
7636
|
const placeholder = "_placeholder_1j4n8_64";
|
|
7434
|
-
const scrim$
|
|
7637
|
+
const scrim$2 = "_scrim_1j4n8_72";
|
|
7435
7638
|
const stockBadge = "_stockBadge_1j4n8_91";
|
|
7436
|
-
const styles$
|
|
7639
|
+
const styles$f = {
|
|
7437
7640
|
root: root$1,
|
|
7438
|
-
header: header$
|
|
7439
|
-
title: title$
|
|
7641
|
+
header: header$2,
|
|
7642
|
+
title: title$7,
|
|
7440
7643
|
value,
|
|
7441
7644
|
tiles,
|
|
7442
7645
|
tile,
|
|
@@ -7444,17 +7647,17 @@ const styles$e = {
|
|
|
7444
7647
|
media,
|
|
7445
7648
|
image: image$3,
|
|
7446
7649
|
placeholder,
|
|
7447
|
-
scrim: scrim$
|
|
7650
|
+
scrim: scrim$2,
|
|
7448
7651
|
stockBadge
|
|
7449
7652
|
};
|
|
7450
7653
|
function ColorSelector({ colours, selected: selected2, onSelect }) {
|
|
7451
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
7452
|
-
/* @__PURE__ */ jsxs("p", { className: styles$
|
|
7453
|
-
/* @__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:" }),
|
|
7454
7657
|
" ",
|
|
7455
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
7658
|
+
/* @__PURE__ */ jsx("span", { className: styles$f.value, children: selected2 ?? "Select" })
|
|
7456
7659
|
] }),
|
|
7457
|
-
/* @__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) => {
|
|
7458
7661
|
const isSelected = c.value === selected2;
|
|
7459
7662
|
const soldOut = !c.available;
|
|
7460
7663
|
const lowStock = !soldOut && c.remaining !== void 0 && c.remaining > 0 && c.remaining <= 5;
|
|
@@ -7465,14 +7668,14 @@ function ColorSelector({ colours, selected: selected2, onSelect }) {
|
|
|
7465
7668
|
role: "radio",
|
|
7466
7669
|
"aria-checked": isSelected,
|
|
7467
7670
|
"aria-label": `${c.value}${soldOut ? " (out of stock)" : ""}`,
|
|
7468
|
-
className: [styles$
|
|
7671
|
+
className: [styles$f.tile, isSelected ? styles$f.selected : ""].filter(Boolean).join(" "),
|
|
7469
7672
|
onClick: () => onSelect(c.value),
|
|
7470
7673
|
children: [
|
|
7471
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
7472
|
-
c.image ? /* @__PURE__ */ jsx(ShopImage, { src: c.image, alt: "", fill: true, sizes: "79px", className: styles$
|
|
7473
|
-
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" })
|
|
7474
7677
|
] }),
|
|
7475
|
-
lowStock && /* @__PURE__ */ jsxs("span", { className: styles$
|
|
7678
|
+
lowStock && /* @__PURE__ */ jsxs("span", { className: styles$f.stockBadge, "aria-hidden": "true", children: [
|
|
7476
7679
|
c.remaining,
|
|
7477
7680
|
" left"
|
|
7478
7681
|
] })
|
|
@@ -7489,7 +7692,7 @@ const options = "_options_1mnz1_16";
|
|
|
7489
7692
|
const option = "_option_1mnz1_16";
|
|
7490
7693
|
const selected = "_selected_1mnz1_36";
|
|
7491
7694
|
const disabled = "_disabled_1mnz1_42";
|
|
7492
|
-
const styles$
|
|
7695
|
+
const styles$e = {
|
|
7493
7696
|
fieldset,
|
|
7494
7697
|
legend,
|
|
7495
7698
|
options,
|
|
@@ -7510,9 +7713,9 @@ function VariantSelector({
|
|
|
7510
7713
|
const values = Object.values(variant.attributes);
|
|
7511
7714
|
return values.length > 0 ? values.join(" · ") : variant.sku;
|
|
7512
7715
|
}
|
|
7513
|
-
return /* @__PURE__ */ jsxs("fieldset", { className: styles$
|
|
7514
|
-
/* @__PURE__ */ jsx("legend", { className: styles$
|
|
7515
|
-
/* @__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) => {
|
|
7516
7719
|
const selected2 = variant.sku === selectedSku;
|
|
7517
7720
|
const disabled2 = !variant.in_stock;
|
|
7518
7721
|
return /* @__PURE__ */ jsxs(
|
|
@@ -7524,9 +7727,9 @@ function VariantSelector({
|
|
|
7524
7727
|
"aria-disabled": disabled2 || void 0,
|
|
7525
7728
|
disabled: disabled2,
|
|
7526
7729
|
className: [
|
|
7527
|
-
styles$
|
|
7528
|
-
selected2 ? styles$
|
|
7529
|
-
disabled2 ? styles$
|
|
7730
|
+
styles$e.option,
|
|
7731
|
+
selected2 ? styles$e.selected : "",
|
|
7732
|
+
disabled2 ? styles$e.disabled : ""
|
|
7530
7733
|
].filter(Boolean).join(" "),
|
|
7531
7734
|
onClick: () => !disabled2 && onSelect(variant.sku),
|
|
7532
7735
|
children: [
|
|
@@ -7541,15 +7744,15 @@ function VariantSelector({
|
|
|
7541
7744
|
}
|
|
7542
7745
|
const root = "_root_t4qba_2";
|
|
7543
7746
|
const group = "_group_t4qba_8";
|
|
7544
|
-
const title$
|
|
7747
|
+
const title$6 = "_title_t4qba_14";
|
|
7545
7748
|
const body$1 = "_body_t4qba_22";
|
|
7546
7749
|
const paragraph = "_paragraph_t4qba_26";
|
|
7547
7750
|
const clamped = "_clamped_t4qba_46";
|
|
7548
7751
|
const toggle = "_toggle_t4qba_51";
|
|
7549
|
-
const styles$
|
|
7752
|
+
const styles$d = {
|
|
7550
7753
|
root,
|
|
7551
7754
|
group,
|
|
7552
|
-
title: title$
|
|
7755
|
+
title: title$6,
|
|
7553
7756
|
body: body$1,
|
|
7554
7757
|
paragraph,
|
|
7555
7758
|
clamped,
|
|
@@ -7562,16 +7765,16 @@ function ProductDetails({ description: description2 }) {
|
|
|
7562
7765
|
const [expanded, setExpanded] = useState(false);
|
|
7563
7766
|
const paragraphs = paragraphsOf(description2);
|
|
7564
7767
|
if (paragraphs.length === 0) return null;
|
|
7565
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
7566
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7567
|
-
/* @__PURE__ */ jsx("h2", { id: "details-heading", className: styles$
|
|
7568
|
-
/* @__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)) })
|
|
7569
7772
|
] }),
|
|
7570
7773
|
/* @__PURE__ */ jsx(
|
|
7571
7774
|
"button",
|
|
7572
7775
|
{
|
|
7573
7776
|
type: "button",
|
|
7574
|
-
className: styles$
|
|
7777
|
+
className: styles$d.toggle,
|
|
7575
7778
|
"aria-expanded": expanded,
|
|
7576
7779
|
onClick: () => setExpanded((v) => !v),
|
|
7577
7780
|
children: expanded ? "Less" : "more"
|
|
@@ -7579,25 +7782,25 @@ function ProductDetails({ description: description2 }) {
|
|
|
7579
7782
|
)
|
|
7580
7783
|
] });
|
|
7581
7784
|
}
|
|
7582
|
-
const row$
|
|
7785
|
+
const row$3 = "_row_l4edh_1";
|
|
7583
7786
|
const badge$1 = "_badge_l4edh_11";
|
|
7584
|
-
const styles$
|
|
7585
|
-
row: row$
|
|
7787
|
+
const styles$c = {
|
|
7788
|
+
row: row$3,
|
|
7586
7789
|
badge: badge$1
|
|
7587
7790
|
};
|
|
7588
7791
|
function PdpBadges({ badges }) {
|
|
7589
7792
|
const flags = badges.filter((b) => b.trim().length > 0);
|
|
7590
7793
|
if (flags.length === 0) return null;
|
|
7591
|
-
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)) });
|
|
7592
7795
|
}
|
|
7593
7796
|
const banner = "_banner_1xvw4_2";
|
|
7594
7797
|
const message = "_message_1xvw4_14";
|
|
7595
|
-
const icon = "_icon_1xvw4_22";
|
|
7798
|
+
const icon$1 = "_icon_1xvw4_22";
|
|
7596
7799
|
const timer = "_timer_1xvw4_27";
|
|
7597
|
-
const styles$
|
|
7800
|
+
const styles$b = {
|
|
7598
7801
|
banner,
|
|
7599
7802
|
message,
|
|
7600
|
-
icon,
|
|
7803
|
+
icon: icon$1,
|
|
7601
7804
|
timer
|
|
7602
7805
|
};
|
|
7603
7806
|
function formatRemaining(ms) {
|
|
@@ -7617,15 +7820,15 @@ function PromoBanner({ promo: promo2 }) {
|
|
|
7617
7820
|
}, [promo2.ends_at]);
|
|
7618
7821
|
const remaining = promo2.ends_at && now !== null ? new Date(promo2.ends_at).getTime() - now : null;
|
|
7619
7822
|
const showTimer = remaining !== null && remaining > 0;
|
|
7620
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
7621
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
7622
|
-
/* @__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: [
|
|
7623
7826
|
/* @__PURE__ */ jsx("rect", { x: "3", y: "8", width: "18", height: "12", rx: "1.5", stroke: "currentColor", strokeWidth: "1.6" }),
|
|
7624
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" })
|
|
7625
7828
|
] }),
|
|
7626
7829
|
promo2.message
|
|
7627
7830
|
] }),
|
|
7628
|
-
showTimer && /* @__PURE__ */ jsxs("span", { className: styles$
|
|
7831
|
+
showTimer && /* @__PURE__ */ jsxs("span", { className: styles$b.timer, children: [
|
|
7629
7832
|
/* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
7630
7833
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9", stroke: "currentColor", strokeWidth: "1.6" }),
|
|
7631
7834
|
/* @__PURE__ */ jsx("path", { d: "M12 7v5l3 2", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
@@ -7639,17 +7842,17 @@ const content = "_content_1hv16_14";
|
|
|
7639
7842
|
const intro = "_intro_1hv16_21";
|
|
7640
7843
|
const productInfo = "_productInfo_1hv16_28";
|
|
7641
7844
|
const titlePrice = "_titlePrice_1hv16_34";
|
|
7642
|
-
const title$
|
|
7845
|
+
const title$5 = "_title_1hv16_34";
|
|
7643
7846
|
const availability = "_availability_1hv16_55";
|
|
7644
7847
|
const low = "_low_1hv16_62";
|
|
7645
7848
|
const oos = "_oos_1hv16_66";
|
|
7646
|
-
const styles$
|
|
7849
|
+
const styles$a = {
|
|
7647
7850
|
page,
|
|
7648
7851
|
content,
|
|
7649
7852
|
intro,
|
|
7650
7853
|
productInfo,
|
|
7651
7854
|
titlePrice,
|
|
7652
|
-
title: title$
|
|
7855
|
+
title: title$5,
|
|
7653
7856
|
availability,
|
|
7654
7857
|
low,
|
|
7655
7858
|
oos
|
|
@@ -7792,14 +7995,14 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
7792
7995
|
const lowStock = available > 0 && available <= 5;
|
|
7793
7996
|
const stockNotice = !purchasable || lowStock;
|
|
7794
7997
|
const availabilityLabel = !purchasable ? "Out of stock" : lowStock ? `Only ${available} left` : "";
|
|
7795
|
-
return /* @__PURE__ */ jsxs(ShopSurface, { tone: "light", fill: true, className: styles$
|
|
7998
|
+
return /* @__PURE__ */ jsxs(ShopSurface, { tone: "light", fill: true, className: styles$a.page, children: [
|
|
7796
7999
|
/* @__PURE__ */ jsx(MediaGallery, { media: media2, alt: product.title }),
|
|
7797
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7798
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8000
|
+
/* @__PURE__ */ jsxs("div", { className: styles$a.content, children: [
|
|
8001
|
+
/* @__PURE__ */ jsxs("div", { className: styles$a.intro, children: [
|
|
7799
8002
|
/* @__PURE__ */ jsx(PdpBadges, { badges: product.badges ?? [] }),
|
|
7800
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7801
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7802
|
-
/* @__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 }),
|
|
7803
8006
|
/* @__PURE__ */ jsx(
|
|
7804
8007
|
PriceBlock,
|
|
7805
8008
|
{
|
|
@@ -7817,7 +8020,7 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
7817
8020
|
stockNotice && /* @__PURE__ */ jsx(
|
|
7818
8021
|
"p",
|
|
7819
8022
|
{
|
|
7820
|
-
className: [styles$
|
|
8023
|
+
className: [styles$a.availability, anyInStock ? styles$a.low : styles$a.oos].join(" "),
|
|
7821
8024
|
role: "status",
|
|
7822
8025
|
children: availabilityLabel
|
|
7823
8026
|
}
|
|
@@ -7875,24 +8078,24 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
|
|
|
7875
8078
|
}
|
|
7876
8079
|
const hero$1 = "_hero_2mcnp_10";
|
|
7877
8080
|
const image$2 = "_image_2mcnp_37";
|
|
7878
|
-
const scrim = "_scrim_2mcnp_51";
|
|
7879
|
-
const text$
|
|
7880
|
-
const title$
|
|
7881
|
-
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";
|
|
7882
8085
|
const noImage = "_noImage_2mcnp_94";
|
|
7883
|
-
const styles$
|
|
8086
|
+
const styles$9 = {
|
|
7884
8087
|
hero: hero$1,
|
|
7885
8088
|
image: image$2,
|
|
7886
|
-
scrim,
|
|
7887
|
-
text: text$
|
|
7888
|
-
title: title$
|
|
7889
|
-
subtitle: subtitle$
|
|
8089
|
+
scrim: scrim$1,
|
|
8090
|
+
text: text$2,
|
|
8091
|
+
title: title$4,
|
|
8092
|
+
subtitle: subtitle$2,
|
|
7890
8093
|
noImage
|
|
7891
8094
|
};
|
|
7892
8095
|
function PcpHero({ hero: hero2 }) {
|
|
7893
|
-
return /* @__PURE__ */ jsxs("section", { className: [styles$
|
|
8096
|
+
return /* @__PURE__ */ jsxs("section", { className: [styles$9.hero, hero2.image ? "" : styles$9.noImage].join(" "), children: [
|
|
7894
8097
|
hero2.image && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7895
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
8098
|
+
/* @__PURE__ */ jsx("div", { className: styles$9.image, children: /* @__PURE__ */ jsx(
|
|
7896
8099
|
ShopImage,
|
|
7897
8100
|
{
|
|
7898
8101
|
src: hero2.image,
|
|
@@ -7902,24 +8105,24 @@ function PcpHero({ hero: hero2 }) {
|
|
|
7902
8105
|
priority: true
|
|
7903
8106
|
}
|
|
7904
8107
|
) }),
|
|
7905
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
8108
|
+
/* @__PURE__ */ jsx("div", { className: styles$9.scrim, "aria-hidden": "true" })
|
|
7906
8109
|
] }),
|
|
7907
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7908
|
-
/* @__PURE__ */ jsx("h1", { className: styles$
|
|
7909
|
-
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 })
|
|
7910
8113
|
] })
|
|
7911
8114
|
] });
|
|
7912
8115
|
}
|
|
7913
|
-
const text = "_text_1saw4_6";
|
|
8116
|
+
const text$1 = "_text_1saw4_6";
|
|
7914
8117
|
const center = "_center_1saw4_18";
|
|
7915
8118
|
const left = "_left_1saw4_23";
|
|
7916
|
-
const styles$
|
|
7917
|
-
text,
|
|
8119
|
+
const styles$8 = {
|
|
8120
|
+
text: text$1,
|
|
7918
8121
|
center,
|
|
7919
8122
|
left
|
|
7920
8123
|
};
|
|
7921
8124
|
function LifestyleText({ text: text2, align = "center" }) {
|
|
7922
|
-
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 });
|
|
7923
8126
|
}
|
|
7924
8127
|
const wrap = "_wrap_9mquf_1";
|
|
7925
8128
|
const box = "_box_9mquf_5";
|
|
@@ -7929,7 +8132,7 @@ const image$1 = "_image_9mquf_38";
|
|
|
7929
8132
|
const dots$1 = "_dots_9mquf_43";
|
|
7930
8133
|
const dot$1 = "_dot_9mquf_43";
|
|
7931
8134
|
const dotActive$1 = "_dotActive_9mquf_63";
|
|
7932
|
-
const styles$
|
|
8135
|
+
const styles$7 = {
|
|
7933
8136
|
wrap,
|
|
7934
8137
|
box,
|
|
7935
8138
|
track: track$1,
|
|
@@ -7950,22 +8153,22 @@ function LifestyleImage({ images }) {
|
|
|
7950
8153
|
return () => track2.removeEventListener("scroll", onScroll);
|
|
7951
8154
|
}, []);
|
|
7952
8155
|
if (images.length === 0) return null;
|
|
7953
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
7954
|
-
/* @__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(
|
|
7955
8158
|
ShopImage,
|
|
7956
8159
|
{
|
|
7957
8160
|
src,
|
|
7958
8161
|
alt: "",
|
|
7959
8162
|
fill: true,
|
|
7960
8163
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
7961
|
-
className: styles$
|
|
8164
|
+
className: styles$7.image,
|
|
7962
8165
|
priority: i === 0
|
|
7963
8166
|
}
|
|
7964
8167
|
) }, src)) }),
|
|
7965
|
-
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(
|
|
7966
8169
|
"span",
|
|
7967
8170
|
{
|
|
7968
|
-
className: [styles$
|
|
8171
|
+
className: [styles$7.dot, i === active ? styles$7.dotActive : ""].join(" ")
|
|
7969
8172
|
},
|
|
7970
8173
|
src
|
|
7971
8174
|
)) })
|
|
@@ -7980,7 +8183,7 @@ const dots = "_dots_iy175_57";
|
|
|
7980
8183
|
const dot = "_dot_iy175_57";
|
|
7981
8184
|
const dotActive = "_dotActive_iy175_70";
|
|
7982
8185
|
const disclaimer = "_disclaimer_iy175_76";
|
|
7983
|
-
const styles$
|
|
8186
|
+
const styles$6 = {
|
|
7984
8187
|
section: section$2,
|
|
7985
8188
|
track,
|
|
7986
8189
|
card,
|
|
@@ -8001,49 +8204,49 @@ function ReviewCarousel({ quotes, disclaimer: disclaimer2 }) {
|
|
|
8001
8204
|
track2.addEventListener("scroll", onScroll, { passive: true });
|
|
8002
8205
|
return () => track2.removeEventListener("scroll", onScroll);
|
|
8003
8206
|
}, []);
|
|
8004
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
8005
|
-
/* @__PURE__ */ jsx("ul", { className: styles$
|
|
8006
|
-
/* @__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: [
|
|
8007
8210
|
"“",
|
|
8008
8211
|
q.quote,
|
|
8009
8212
|
"”"
|
|
8010
8213
|
] }),
|
|
8011
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
8214
|
+
/* @__PURE__ */ jsx("p", { className: styles$6.author, children: q.author })
|
|
8012
8215
|
] }, i)) }),
|
|
8013
|
-
quotes.length > 1 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
8014
|
-
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 })
|
|
8015
8218
|
] });
|
|
8016
8219
|
}
|
|
8017
8220
|
const section$1 = "_section_145t0_1";
|
|
8018
|
-
const row$
|
|
8019
|
-
const title$
|
|
8221
|
+
const row$2 = "_row_145t0_9";
|
|
8222
|
+
const title$3 = "_title_145t0_21";
|
|
8020
8223
|
const body = "_body_145t0_29";
|
|
8021
|
-
const styles$
|
|
8224
|
+
const styles$5 = {
|
|
8022
8225
|
section: section$1,
|
|
8023
|
-
row: row$
|
|
8024
|
-
title: title$
|
|
8226
|
+
row: row$2,
|
|
8227
|
+
title: title$3,
|
|
8025
8228
|
body
|
|
8026
8229
|
};
|
|
8027
8230
|
function WhyUs({ items: items2 }) {
|
|
8028
|
-
return /* @__PURE__ */ jsx("section", { className: styles$
|
|
8029
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
8030
|
-
/* @__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 })
|
|
8031
8234
|
] }, i)) });
|
|
8032
8235
|
}
|
|
8033
8236
|
const section = "_section_opjfc_1";
|
|
8034
|
-
const title$
|
|
8035
|
-
const list = "_list_opjfc_15";
|
|
8036
|
-
const row = "_row_opjfc_26";
|
|
8037
|
-
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 = {
|
|
8038
8241
|
section,
|
|
8039
|
-
title: title$
|
|
8040
|
-
list,
|
|
8041
|
-
row
|
|
8242
|
+
title: title$2,
|
|
8243
|
+
list: list$1,
|
|
8244
|
+
row: row$1
|
|
8042
8245
|
};
|
|
8043
8246
|
function ExploreList({ title: title2, links }) {
|
|
8044
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
8045
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
8046
|
-
/* @__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: [
|
|
8047
8250
|
/* @__PURE__ */ jsx("span", { children: l.label }),
|
|
8048
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" }) })
|
|
8049
8252
|
] }) }, l.code)) })
|
|
@@ -8055,7 +8258,7 @@ const featured = "_featured_6gy3c_38";
|
|
|
8055
8258
|
const gridBlock = "_gridBlock_6gy3c_39";
|
|
8056
8259
|
const blockTitle = "_blockTitle_6gy3c_46";
|
|
8057
8260
|
const grid = "_grid_6gy3c_39";
|
|
8058
|
-
const styles$
|
|
8261
|
+
const styles$3 = {
|
|
8059
8262
|
pcp,
|
|
8060
8263
|
blocks,
|
|
8061
8264
|
featured,
|
|
@@ -8070,16 +8273,16 @@ function Block({ block }) {
|
|
|
8070
8273
|
case "lifestyle_text":
|
|
8071
8274
|
return /* @__PURE__ */ jsx(LifestyleText, { text: block.text, align: block.align });
|
|
8072
8275
|
case "featured":
|
|
8073
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
8074
|
-
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 }),
|
|
8075
8278
|
/* @__PURE__ */ jsx(ProductTile, { product: block.product, priority: true, size: "large" })
|
|
8076
8279
|
] });
|
|
8077
8280
|
case "lifestyle_image":
|
|
8078
8281
|
return /* @__PURE__ */ jsx(LifestyleImage, { images: block.images });
|
|
8079
8282
|
case "grid":
|
|
8080
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
8081
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
8082
|
-
/* @__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)) })
|
|
8083
8286
|
] });
|
|
8084
8287
|
case "review":
|
|
8085
8288
|
return /* @__PURE__ */ jsx(ReviewCarousel, { quotes: block.quotes, disclaimer: block.disclaimer });
|
|
@@ -8092,9 +8295,9 @@ function Block({ block }) {
|
|
|
8092
8295
|
}
|
|
8093
8296
|
}
|
|
8094
8297
|
function CategoryContent({ page: page2 }) {
|
|
8095
|
-
return /* @__PURE__ */ jsxs(ShopSurface, { tone: "dark", fill: true, className: styles$
|
|
8298
|
+
return /* @__PURE__ */ jsxs(ShopSurface, { tone: "dark", fill: true, className: styles$3.pcp, children: [
|
|
8096
8299
|
/* @__PURE__ */ jsx(PcpHero, { hero: page2.hero }),
|
|
8097
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
8300
|
+
/* @__PURE__ */ jsx("div", { className: styles$3.blocks, children: page2.blocks.map((block, i) => /* @__PURE__ */ jsx(Block, { block }, i)) })
|
|
8098
8301
|
] });
|
|
8099
8302
|
}
|
|
8100
8303
|
function CategoryView({ code, initialData, onNotFound }) {
|
|
@@ -8190,13 +8393,13 @@ const heroTitle = "_heroTitle_ems17_107";
|
|
|
8190
8393
|
const heroSub = "_heroSub_ems17_115";
|
|
8191
8394
|
const swipe = "_swipe_ems17_122";
|
|
8192
8395
|
const swipeLabel = "_swipeLabel_ems17_131";
|
|
8193
|
-
const chevron = "_chevron_ems17_137";
|
|
8194
|
-
const overlay = "_overlay_ems17_154";
|
|
8396
|
+
const chevron$1 = "_chevron_ems17_137";
|
|
8397
|
+
const overlay$1 = "_overlay_ems17_154";
|
|
8195
8398
|
const copy = "_copy_ems17_165";
|
|
8196
|
-
const title = "_title_ems17_170";
|
|
8197
|
-
const subtitle = "_subtitle_ems17_177";
|
|
8399
|
+
const title$1 = "_title_ems17_170";
|
|
8400
|
+
const subtitle$1 = "_subtitle_ems17_177";
|
|
8198
8401
|
const cta = "_cta_ems17_183";
|
|
8199
|
-
const styles$
|
|
8402
|
+
const styles$2 = {
|
|
8200
8403
|
showcase,
|
|
8201
8404
|
panel,
|
|
8202
8405
|
image,
|
|
@@ -8209,11 +8412,11 @@ const styles$1 = {
|
|
|
8209
8412
|
heroSub,
|
|
8210
8413
|
swipe,
|
|
8211
8414
|
swipeLabel,
|
|
8212
|
-
chevron,
|
|
8213
|
-
overlay,
|
|
8415
|
+
chevron: chevron$1,
|
|
8416
|
+
overlay: overlay$1,
|
|
8214
8417
|
copy,
|
|
8215
|
-
title,
|
|
8216
|
-
subtitle,
|
|
8418
|
+
title: title$1,
|
|
8419
|
+
subtitle: subtitle$1,
|
|
8217
8420
|
cta
|
|
8218
8421
|
};
|
|
8219
8422
|
const FALLBACK_PANELS = [
|
|
@@ -8262,7 +8465,7 @@ const FALLBACK_PANELS = [
|
|
|
8262
8465
|
}
|
|
8263
8466
|
];
|
|
8264
8467
|
function CategoryPanel({ panel: panel2 }) {
|
|
8265
|
-
return /* @__PURE__ */ jsxs("section", { className: styles$
|
|
8468
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$2.panel, "aria-label": panel2.title, children: [
|
|
8266
8469
|
/* @__PURE__ */ jsx(
|
|
8267
8470
|
ShopImage,
|
|
8268
8471
|
{
|
|
@@ -8270,15 +8473,15 @@ function CategoryPanel({ panel: panel2 }) {
|
|
|
8270
8473
|
alt: "",
|
|
8271
8474
|
fill: true,
|
|
8272
8475
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
8273
|
-
className: styles$
|
|
8476
|
+
className: styles$2.image
|
|
8274
8477
|
}
|
|
8275
8478
|
),
|
|
8276
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8277
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8278
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
8279
|
-
/* @__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 })
|
|
8280
8483
|
] }),
|
|
8281
|
-
/* @__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 })
|
|
8282
8485
|
] })
|
|
8283
8486
|
] });
|
|
8284
8487
|
}
|
|
@@ -8321,9 +8524,9 @@ function HomeShowcase() {
|
|
|
8321
8524
|
* showcase paints its own dark ground and now owns its own height, so there is nothing
|
|
8322
8525
|
* for the surface to fill.
|
|
8323
8526
|
*/
|
|
8324
|
-
/* @__PURE__ */ jsx(ShopSurface, { tone: "dark", children: /* @__PURE__ */ jsxs("div", { className: styles$
|
|
8325
|
-
/* @__PURE__ */ jsxs("section", { className: `${styles$
|
|
8326
|
-
/* @__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(
|
|
8327
8530
|
ShopImage,
|
|
8328
8531
|
{
|
|
8329
8532
|
src: "/figma/home/hero.jpg",
|
|
@@ -8331,25 +8534,25 @@ function HomeShowcase() {
|
|
|
8331
8534
|
fill: true,
|
|
8332
8535
|
priority: true,
|
|
8333
8536
|
sizes: "(max-width: 480px) 100vw, 480px",
|
|
8334
|
-
className: styles$
|
|
8537
|
+
className: styles$2.image
|
|
8335
8538
|
}
|
|
8336
8539
|
) }),
|
|
8337
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8338
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8540
|
+
/* @__PURE__ */ jsxs("div", { className: styles$2.heroContent, children: [
|
|
8541
|
+
/* @__PURE__ */ jsxs("div", { className: styles$2.heroText, children: [
|
|
8339
8542
|
/* @__PURE__ */ jsx(
|
|
8340
8543
|
"img",
|
|
8341
8544
|
{
|
|
8342
8545
|
src: assetUrl("/figma/home/dazn-logo.svg"),
|
|
8343
8546
|
alt: "DAZN",
|
|
8344
|
-
className: styles$
|
|
8547
|
+
className: styles$2.logo
|
|
8345
8548
|
}
|
|
8346
8549
|
),
|
|
8347
|
-
/* @__PURE__ */ jsx("h1", { className: styles$
|
|
8348
|
-
/* @__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" })
|
|
8349
8552
|
] }),
|
|
8350
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
8351
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
8352
|
-
/* @__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(
|
|
8353
8556
|
"path",
|
|
8354
8557
|
{
|
|
8355
8558
|
d: "M6 9l6 6 6-6",
|
|
@@ -8409,15 +8612,15 @@ function useCartCount() {
|
|
|
8409
8612
|
}, [subscribe]);
|
|
8410
8613
|
return count2;
|
|
8411
8614
|
}
|
|
8412
|
-
const header = "_header_7rinq_6";
|
|
8615
|
+
const header$1 = "_header_7rinq_6";
|
|
8413
8616
|
const floating = "_floating_7rinq_26";
|
|
8414
8617
|
const right = "_right_7rinq_35";
|
|
8415
8618
|
const spacer = "_spacer_7rinq_48";
|
|
8416
8619
|
const iconBtn = "_iconBtn_7rinq_53";
|
|
8417
8620
|
const menuBtn = "_menuBtn_7rinq_80";
|
|
8418
8621
|
const badge = "_badge_7rinq_104";
|
|
8419
|
-
const styles = {
|
|
8420
|
-
header,
|
|
8622
|
+
const styles$1 = {
|
|
8623
|
+
header: header$1,
|
|
8421
8624
|
floating,
|
|
8422
8625
|
right,
|
|
8423
8626
|
spacer,
|
|
@@ -8470,19 +8673,19 @@ function ShopHeader({
|
|
|
8470
8673
|
}) {
|
|
8471
8674
|
const cartCount = useCartCount();
|
|
8472
8675
|
const cartLabel = cartCount === null ? "Cart" : cartCount === 0 ? "Cart, empty" : `Cart, ${cartCount} item${cartCount === 1 ? "" : "s"}`;
|
|
8473
|
-
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(" ");
|
|
8474
8677
|
return /* @__PURE__ */ jsxs("header", { className: classes, children: [
|
|
8475
|
-
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" }),
|
|
8476
|
-
/* @__PURE__ */ jsxs("div", { className: styles.right, children: [
|
|
8477
|
-
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: [
|
|
8478
8681
|
/* @__PURE__ */ jsx(CartIcon, {}),
|
|
8479
|
-
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 })
|
|
8480
8683
|
] }) : null,
|
|
8481
8684
|
onMenu ? /* @__PURE__ */ jsx(
|
|
8482
8685
|
"button",
|
|
8483
8686
|
{
|
|
8484
8687
|
type: "button",
|
|
8485
|
-
className: `${styles.iconBtn} ${styles.menuBtn}`,
|
|
8688
|
+
className: `${styles$1.iconBtn} ${styles$1.menuBtn}`,
|
|
8486
8689
|
"aria-label": menuLabel,
|
|
8487
8690
|
onClick: onMenu,
|
|
8488
8691
|
children: /* @__PURE__ */ jsx(MenuIcon, {})
|
|
@@ -8491,6 +8694,186 @@ function ShopHeader({
|
|
|
8491
8694
|
] })
|
|
8492
8695
|
] });
|
|
8493
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
|
+
}
|
|
8494
8877
|
export {
|
|
8495
8878
|
Badge,
|
|
8496
8879
|
BottomSheet,
|
|
@@ -8513,6 +8896,8 @@ export {
|
|
|
8513
8896
|
LifestyleImage,
|
|
8514
8897
|
LifestyleText,
|
|
8515
8898
|
MediaGallery,
|
|
8899
|
+
OrderListView,
|
|
8900
|
+
OrderStatusBadge,
|
|
8516
8901
|
OrderSummary,
|
|
8517
8902
|
OrderTimeline,
|
|
8518
8903
|
OrderTrackingView,
|
|
@@ -8535,6 +8920,7 @@ export {
|
|
|
8535
8920
|
HomeShowcase as ShopHome,
|
|
8536
8921
|
ShopImage,
|
|
8537
8922
|
ShopLink,
|
|
8923
|
+
ShopMenuSheet,
|
|
8538
8924
|
ShopSurface,
|
|
8539
8925
|
SizeGuideSheet,
|
|
8540
8926
|
SizeSelector,
|