@nok-integration/storefront-react 0.29.1 → 0.29.3
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.mjs +228 -151
- package/dist/standalone/storefront.mjs +228 -151
- package/dist/standalone/styles.css +286 -253
- package/dist/styles.css +286 -253
- package/package.json +1 -1
|
@@ -6559,7 +6559,17 @@ const ES = {
|
|
|
6559
6559
|
"Return reported": "Devolución notificada",
|
|
6560
6560
|
"Return received": "Devolución recibida",
|
|
6561
6561
|
"Return completed": "Devolución completada",
|
|
6562
|
-
"Your session has timed out. Please try again.": "Tu sesión ha caducado. Inténtalo de nuevo."
|
|
6562
|
+
"Your session has timed out. Please try again.": "Tu sesión ha caducado. Inténtalo de nuevo.",
|
|
6563
|
+
Black: "Negro",
|
|
6564
|
+
White: "Blanco",
|
|
6565
|
+
Grey: "Gris",
|
|
6566
|
+
Gray: "Gris",
|
|
6567
|
+
Navy: "Azul marino",
|
|
6568
|
+
Blue: "Azul",
|
|
6569
|
+
Red: "Rojo",
|
|
6570
|
+
Green: "Verde",
|
|
6571
|
+
Cream: "Crema",
|
|
6572
|
+
Beige: "Beis"
|
|
6563
6573
|
};
|
|
6564
6574
|
const CATALOGUES = {
|
|
6565
6575
|
es: ES
|
|
@@ -7337,6 +7347,11 @@ function distinctValues(variants, key) {
|
|
|
7337
7347
|
}
|
|
7338
7348
|
return out;
|
|
7339
7349
|
}
|
|
7350
|
+
const COLOUR_NAMES = ["Black", "White", "Grey", "Gray", "Navy", "Blue", "Red", "Green", "Cream", "Beige"];
|
|
7351
|
+
function colourLabel(t, value2) {
|
|
7352
|
+
const name2 = COLOUR_NAMES.find((n) => n.toLowerCase() === value2.trim().toLowerCase());
|
|
7353
|
+
return name2 ? t(name2) : value2;
|
|
7354
|
+
}
|
|
7340
7355
|
function sizeOptions(variants, colour) {
|
|
7341
7356
|
const key = colourKeyOf(variants);
|
|
7342
7357
|
return distinctValues(variants, "size").map((value2) => ({
|
|
@@ -9569,7 +9584,7 @@ function OrderReturnBadge({ status }) {
|
|
|
9569
9584
|
});
|
|
9570
9585
|
}
|
|
9571
9586
|
const page$1 = "_page_cm0rd_2";
|
|
9572
|
-
const empty = "_empty_cm0rd_22";
|
|
9587
|
+
const empty$1 = "_empty_cm0rd_22";
|
|
9573
9588
|
const cta$5 = "_cta_cm0rd_32";
|
|
9574
9589
|
const card$1 = "_card_cm0rd_55";
|
|
9575
9590
|
const tappable = "_tappable_cm0rd_70";
|
|
@@ -9609,7 +9624,7 @@ const wideEmptyTitle = "_wideEmptyTitle_cm0rd_365";
|
|
|
9609
9624
|
const wideEmptyBody = "_wideEmptyBody_cm0rd_373";
|
|
9610
9625
|
const styles$A = {
|
|
9611
9626
|
page: page$1,
|
|
9612
|
-
empty,
|
|
9627
|
+
empty: empty$1,
|
|
9613
9628
|
cta: cta$5,
|
|
9614
9629
|
card: card$1,
|
|
9615
9630
|
tappable,
|
|
@@ -10510,13 +10525,13 @@ function ProductGrid({ category, initialProducts, initialCursor, filters = [] })
|
|
|
10510
10525
|
})]
|
|
10511
10526
|
});
|
|
10512
10527
|
}
|
|
10513
|
-
const rail$1 = "
|
|
10514
|
-
const header$5 = "
|
|
10515
|
-
const title$e = "
|
|
10516
|
-
const seeAll = "
|
|
10517
|
-
const track$3 = "
|
|
10518
|
-
const item$2 = "
|
|
10519
|
-
const inset = "
|
|
10528
|
+
const rail$1 = "_rail_st5m2_7";
|
|
10529
|
+
const header$5 = "_header_st5m2_14";
|
|
10530
|
+
const title$e = "_title_st5m2_21";
|
|
10531
|
+
const seeAll = "_seeAll_st5m2_27";
|
|
10532
|
+
const track$3 = "_track_st5m2_33";
|
|
10533
|
+
const item$2 = "_item_st5m2_67";
|
|
10534
|
+
const inset = "_inset_st5m2_79";
|
|
10520
10535
|
const styles$u = {
|
|
10521
10536
|
rail: rail$1,
|
|
10522
10537
|
header: header$5,
|
|
@@ -11018,17 +11033,18 @@ function StickyCtaBar({ children, info: info2, variant = "floating", className }
|
|
|
11018
11033
|
})]
|
|
11019
11034
|
});
|
|
11020
11035
|
}
|
|
11021
|
-
const surface = "
|
|
11022
|
-
const screen = "
|
|
11023
|
-
const body$4 = "
|
|
11024
|
-
const items = "
|
|
11025
|
-
const sectionHeader = "
|
|
11026
|
-
const sectionTitle = "
|
|
11027
|
-
const count = "
|
|
11028
|
-
const lines = "
|
|
11029
|
-
const footer = "
|
|
11030
|
-
const
|
|
11031
|
-
const
|
|
11036
|
+
const surface = "_surface_o6bcy_15";
|
|
11037
|
+
const screen = "_screen_o6bcy_20";
|
|
11038
|
+
const body$4 = "_body_o6bcy_12";
|
|
11039
|
+
const items = "_items_o6bcy_34";
|
|
11040
|
+
const sectionHeader = "_sectionHeader_o6bcy_40";
|
|
11041
|
+
const sectionTitle = "_sectionTitle_o6bcy_46";
|
|
11042
|
+
const count = "_count_o6bcy_67";
|
|
11043
|
+
const lines = "_lines_o6bcy_91";
|
|
11044
|
+
const footer = "_footer_o6bcy_101";
|
|
11045
|
+
const empty = "_empty_o6bcy_105";
|
|
11046
|
+
const cta$4 = "_cta_o6bcy_146";
|
|
11047
|
+
const ctaError = "_ctaError_o6bcy_154";
|
|
11032
11048
|
const styles$o = {
|
|
11033
11049
|
surface,
|
|
11034
11050
|
screen,
|
|
@@ -11039,6 +11055,7 @@ const styles$o = {
|
|
|
11039
11055
|
count,
|
|
11040
11056
|
lines,
|
|
11041
11057
|
footer,
|
|
11058
|
+
empty,
|
|
11042
11059
|
cta: cta$4,
|
|
11043
11060
|
ctaError
|
|
11044
11061
|
};
|
|
@@ -11185,18 +11202,21 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
|
|
|
11185
11202
|
});
|
|
11186
11203
|
}
|
|
11187
11204
|
if (state === "empty" || !cart2) {
|
|
11188
|
-
return jsx(
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
children: t("Continue shopping")
|
|
11195
|
-
}) : jsx(ShopLink, {
|
|
11196
|
-
to: "/",
|
|
11197
|
-
children: jsx(Button, {
|
|
11205
|
+
return jsx("div", {
|
|
11206
|
+
className: styles$o.empty,
|
|
11207
|
+
children: jsx(EmptyState, {
|
|
11208
|
+
title: t("Nothing here yet"),
|
|
11209
|
+
body: t("Your items will show up here once you've added to your cart."),
|
|
11210
|
+
action: onContinueShopping ? jsx(Button, {
|
|
11198
11211
|
variant: "primary",
|
|
11212
|
+
onClick: onContinueShopping,
|
|
11199
11213
|
children: t("Continue shopping")
|
|
11214
|
+
}) : jsx(ShopLink, {
|
|
11215
|
+
to: "/",
|
|
11216
|
+
children: jsx(Button, {
|
|
11217
|
+
variant: "primary",
|
|
11218
|
+
children: t("Continue shopping")
|
|
11219
|
+
})
|
|
11200
11220
|
})
|
|
11201
11221
|
})
|
|
11202
11222
|
});
|
|
@@ -11502,31 +11522,31 @@ function DesktopGallery({ media: media2, alt, badges: badges2, focus }) {
|
|
|
11502
11522
|
})]
|
|
11503
11523
|
});
|
|
11504
11524
|
}
|
|
11505
|
-
const scrim$3 = "
|
|
11506
|
-
const sheet$1 = "
|
|
11507
|
-
const body$3 = "
|
|
11508
|
-
const titles = "
|
|
11509
|
-
const title$b = "
|
|
11510
|
-
const subtitle$4 = "
|
|
11511
|
-
const units = "
|
|
11512
|
-
const unit = "
|
|
11513
|
-
const unitOn = "
|
|
11514
|
-
const unitOff = "
|
|
11515
|
-
const tableWrap = "
|
|
11516
|
-
const table = "
|
|
11517
|
-
const col = "
|
|
11518
|
-
const colEdge = "
|
|
11519
|
-
const note = "
|
|
11520
|
-
const how = "
|
|
11521
|
-
const howTitle = "
|
|
11522
|
-
const howList = "
|
|
11523
|
-
const howItem = "
|
|
11524
|
-
const howLabel = "
|
|
11525
|
-
const howText = "
|
|
11526
|
-
const fabric = "
|
|
11527
|
-
const fabricLabel = "
|
|
11528
|
-
const fabricText = "
|
|
11529
|
-
const notes = "
|
|
11525
|
+
const scrim$3 = "_scrim_mvuuv_8";
|
|
11526
|
+
const sheet$1 = "_sheet_mvuuv_2";
|
|
11527
|
+
const body$3 = "_body_mvuuv_40";
|
|
11528
|
+
const titles = "_titles_mvuuv_67";
|
|
11529
|
+
const title$b = "_title_mvuuv_67";
|
|
11530
|
+
const subtitle$4 = "_subtitle_mvuuv_83";
|
|
11531
|
+
const units = "_units_mvuuv_96";
|
|
11532
|
+
const unit = "_unit_mvuuv_96";
|
|
11533
|
+
const unitOn = "_unitOn_mvuuv_130";
|
|
11534
|
+
const unitOff = "_unitOff_mvuuv_138";
|
|
11535
|
+
const tableWrap = "_tableWrap_mvuuv_147";
|
|
11536
|
+
const table = "_table_mvuuv_147";
|
|
11537
|
+
const col = "_col_mvuuv_179";
|
|
11538
|
+
const colEdge = "_colEdge_mvuuv_183";
|
|
11539
|
+
const note = "_note_mvuuv_251";
|
|
11540
|
+
const how = "_how_mvuuv_263";
|
|
11541
|
+
const howTitle = "_howTitle_mvuuv_269";
|
|
11542
|
+
const howList = "_howList_mvuuv_277";
|
|
11543
|
+
const howItem = "_howItem_mvuuv_284";
|
|
11544
|
+
const howLabel = "_howLabel_mvuuv_309";
|
|
11545
|
+
const howText = "_howText_mvuuv_319";
|
|
11546
|
+
const fabric = "_fabric_mvuuv_328";
|
|
11547
|
+
const fabricLabel = "_fabricLabel_mvuuv_336";
|
|
11548
|
+
const fabricText = "_fabricText_mvuuv_344";
|
|
11549
|
+
const notes = "_notes_mvuuv_355";
|
|
11530
11550
|
const styles$k = {
|
|
11531
11551
|
scrim: scrim$3,
|
|
11532
11552
|
sheet: sheet$1,
|
|
@@ -11791,18 +11811,18 @@ function SizeSelector({ sizes: sizes2, selected: selected2, onSelect, error: err
|
|
|
11791
11811
|
})]
|
|
11792
11812
|
});
|
|
11793
11813
|
}
|
|
11794
|
-
const root$2 = "
|
|
11795
|
-
const header$2 = "
|
|
11796
|
-
const title$9 = "
|
|
11797
|
-
const value = "
|
|
11798
|
-
const tiles$1 = "
|
|
11799
|
-
const tile$2 = "
|
|
11800
|
-
const selected$1 = "
|
|
11801
|
-
const media$2 = "
|
|
11802
|
-
const image$5 = "
|
|
11803
|
-
const placeholder = "
|
|
11804
|
-
const scrim$2 = "
|
|
11805
|
-
const stockBadge = "
|
|
11814
|
+
const root$2 = "_root_1jst2_1";
|
|
11815
|
+
const header$2 = "_header_1jst2_9";
|
|
11816
|
+
const title$9 = "_title_1jst2_18";
|
|
11817
|
+
const value = "_value_1jst2_23";
|
|
11818
|
+
const tiles$1 = "_tiles_1jst2_28";
|
|
11819
|
+
const tile$2 = "_tile_1jst2_28";
|
|
11820
|
+
const selected$1 = "_selected_1jst2_52";
|
|
11821
|
+
const media$2 = "_media_1jst2_36";
|
|
11822
|
+
const image$5 = "_image_1jst2_64";
|
|
11823
|
+
const placeholder = "_placeholder_1jst2_68";
|
|
11824
|
+
const scrim$2 = "_scrim_1jst2_76";
|
|
11825
|
+
const stockBadge = "_stockBadge_1jst2_95";
|
|
11806
11826
|
const styles$i = {
|
|
11807
11827
|
root: root$2,
|
|
11808
11828
|
header: header$2,
|
|
@@ -11830,7 +11850,7 @@ function ColorSelector({ colours, selected: selected2, onSelect }) {
|
|
|
11830
11850
|
children: "Color:"
|
|
11831
11851
|
}), " ", jsx("span", {
|
|
11832
11852
|
className: styles$i.value,
|
|
11833
|
-
children: selected2
|
|
11853
|
+
children: selected2 === null ? t("Select") : colourLabel(t, selected2)
|
|
11834
11854
|
})]
|
|
11835
11855
|
}), jsx("div", {
|
|
11836
11856
|
className: styles$i.tiles,
|
|
@@ -11845,7 +11865,7 @@ function ColorSelector({ colours, selected: selected2, onSelect }) {
|
|
|
11845
11865
|
type: "button",
|
|
11846
11866
|
role: "radio",
|
|
11847
11867
|
"aria-checked": isSelected,
|
|
11848
|
-
"aria-label": `${c.value}${soldOut ?
|
|
11868
|
+
"aria-label": `${colourLabel(t, c.value)}${soldOut ? ` ${t("(out of stock)")}` : ""}`,
|
|
11849
11869
|
className: [styles$i.tile, isSelected ? styles$i.selected : ""].filter(Boolean).join(" "),
|
|
11850
11870
|
onClick: () => onSelect(c.value),
|
|
11851
11871
|
children: [jsxs("span", {
|
|
@@ -12455,14 +12475,14 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [], c
|
|
|
12455
12475
|
})]
|
|
12456
12476
|
});
|
|
12457
12477
|
}
|
|
12458
|
-
const hero$3 = "
|
|
12459
|
-
const image$4 = "
|
|
12460
|
-
const scrim$1 = "
|
|
12461
|
-
const fade = "
|
|
12462
|
-
const text$3 = "
|
|
12463
|
-
const title$6 = "
|
|
12464
|
-
const subtitle$3 = "
|
|
12465
|
-
const noImage = "
|
|
12478
|
+
const hero$3 = "_hero_ht1e0_10";
|
|
12479
|
+
const image$4 = "_image_ht1e0_42";
|
|
12480
|
+
const scrim$1 = "_scrim_ht1e0_70";
|
|
12481
|
+
const fade = "_fade_ht1e0_94";
|
|
12482
|
+
const text$3 = "_text_ht1e0_108";
|
|
12483
|
+
const title$6 = "_title_ht1e0_157";
|
|
12484
|
+
const subtitle$3 = "_subtitle_ht1e0_168";
|
|
12485
|
+
const noImage = "_noImage_ht1e0_183";
|
|
12466
12486
|
const styles$d = {
|
|
12467
12487
|
hero: hero$3,
|
|
12468
12488
|
image: image$4,
|
|
@@ -12526,16 +12546,16 @@ function LifestyleText({ text: text2, align = "center" }) {
|
|
|
12526
12546
|
children: text2
|
|
12527
12547
|
});
|
|
12528
12548
|
}
|
|
12529
|
-
const wrap = "
|
|
12530
|
-
const box = "
|
|
12531
|
-
const track$1 = "
|
|
12532
|
-
const slide = "
|
|
12533
|
-
const image$3 = "
|
|
12534
|
-
const desktopArt$1 = "
|
|
12535
|
-
const dots$1 = "
|
|
12536
|
-
const dot$1 = "
|
|
12537
|
-
const dotActive$1 = "
|
|
12538
|
-
const phoneArt$1 = "
|
|
12549
|
+
const wrap = "_wrap_1p70i_10";
|
|
12550
|
+
const box = "_box_1p70i_14";
|
|
12551
|
+
const track$1 = "_track_1p70i_23";
|
|
12552
|
+
const slide = "_slide_1p70i_39";
|
|
12553
|
+
const image$3 = "_image_1p70i_46";
|
|
12554
|
+
const desktopArt$1 = "_desktopArt_1p70i_50";
|
|
12555
|
+
const dots$1 = "_dots_1p70i_55";
|
|
12556
|
+
const dot$1 = "_dot_1p70i_55";
|
|
12557
|
+
const dotActive$1 = "_dotActive_1p70i_80";
|
|
12558
|
+
const phoneArt$1 = "_phoneArt_1p70i_85";
|
|
12539
12559
|
const styles$b = {
|
|
12540
12560
|
wrap,
|
|
12541
12561
|
box,
|
|
@@ -15046,40 +15066,40 @@ function ActiveLanding({ token, invite }) {
|
|
|
15046
15066
|
})
|
|
15047
15067
|
});
|
|
15048
15068
|
}
|
|
15049
|
-
const showcase = "
|
|
15050
|
-
const panel = "
|
|
15051
|
-
const image = "
|
|
15052
|
-
const desktopArt = "
|
|
15053
|
-
const hero = "
|
|
15054
|
-
const heroContent = "
|
|
15055
|
-
const heroText = "
|
|
15056
|
-
const logo = "
|
|
15057
|
-
const heroTitle = "
|
|
15058
|
-
const heroSub = "
|
|
15059
|
-
const swipe = "
|
|
15060
|
-
const swipeLabel = "
|
|
15061
|
-
const chevron$1 = "
|
|
15062
|
-
const overlay$1 = "
|
|
15063
|
-
const copy = "
|
|
15064
|
-
const title$2 = "
|
|
15065
|
-
const subtitle$1 = "
|
|
15066
|
-
const cta = "
|
|
15067
|
-
const mosaic = "
|
|
15068
|
-
const info = "
|
|
15069
|
-
const art = "
|
|
15070
|
-
const band = "
|
|
15071
|
-
const bandTitle = "
|
|
15072
|
-
const products = "
|
|
15073
|
-
const wideOnly = "
|
|
15074
|
-
const phoneOnly = "
|
|
15075
|
-
const phoneArt = "
|
|
15076
|
-
const desktopFocal = "
|
|
15077
|
-
const diptych = "
|
|
15078
|
-
const tile = "
|
|
15079
|
-
const tileCopy = "
|
|
15080
|
-
const tileText = "
|
|
15081
|
-
const tileTitle = "
|
|
15082
|
-
const tileSubtitle = "
|
|
15069
|
+
const showcase = "_showcase_px8r_14";
|
|
15070
|
+
const panel = "_panel_px8r_40";
|
|
15071
|
+
const image = "_image_px8r_93";
|
|
15072
|
+
const desktopArt = "_desktopArt_px8r_98";
|
|
15073
|
+
const hero = "_hero_px8r_137";
|
|
15074
|
+
const heroContent = "_heroContent_px8r_228";
|
|
15075
|
+
const heroText = "_heroText_px8r_252";
|
|
15076
|
+
const logo = "_logo_px8r_261";
|
|
15077
|
+
const heroTitle = "_heroTitle_px8r_281";
|
|
15078
|
+
const heroSub = "_heroSub_px8r_305";
|
|
15079
|
+
const swipe = "_swipe_px8r_324";
|
|
15080
|
+
const swipeLabel = "_swipeLabel_px8r_331";
|
|
15081
|
+
const chevron$1 = "_chevron_px8r_337";
|
|
15082
|
+
const overlay$1 = "_overlay_px8r_11";
|
|
15083
|
+
const copy = "_copy_px8r_374";
|
|
15084
|
+
const title$2 = "_title_px8r_386";
|
|
15085
|
+
const subtitle$1 = "_subtitle_px8r_395";
|
|
15086
|
+
const cta = "_cta_px8r_403";
|
|
15087
|
+
const mosaic = "_mosaic_px8r_447";
|
|
15088
|
+
const info = "_info_px8r_459";
|
|
15089
|
+
const art = "_art_px8r_463";
|
|
15090
|
+
const band = "_band_px8r_468";
|
|
15091
|
+
const bandTitle = "_bandTitle_px8r_477";
|
|
15092
|
+
const products = "_products_px8r_489";
|
|
15093
|
+
const wideOnly = "_wideOnly_px8r_509";
|
|
15094
|
+
const phoneOnly = "_phoneOnly_px8r_535";
|
|
15095
|
+
const phoneArt = "_phoneArt_px8r_536";
|
|
15096
|
+
const desktopFocal = "_desktopFocal_px8r_545";
|
|
15097
|
+
const diptych = "_diptych_px8r_740";
|
|
15098
|
+
const tile = "_tile_px8r_745";
|
|
15099
|
+
const tileCopy = "_tileCopy_px8r_759";
|
|
15100
|
+
const tileText = "_tileText_px8r_772";
|
|
15101
|
+
const tileTitle = "_tileTitle_px8r_779";
|
|
15102
|
+
const tileSubtitle = "_tileSubtitle_px8r_786";
|
|
15083
15103
|
const styles$3 = {
|
|
15084
15104
|
showcase,
|
|
15085
15105
|
panel,
|
|
@@ -15888,19 +15908,19 @@ function ShopBar({ onBack, onMenu, title: title2, showCart, floating: floating2
|
|
|
15888
15908
|
})]
|
|
15889
15909
|
});
|
|
15890
15910
|
}
|
|
15891
|
-
const overlay = "
|
|
15892
|
-
const scrim = "
|
|
15893
|
-
const sheet = "
|
|
15894
|
-
const header = "
|
|
15895
|
-
const close = "
|
|
15896
|
-
const list$1 = "
|
|
15897
|
-
const row = "
|
|
15898
|
-
const icon = "
|
|
15899
|
-
const text = "
|
|
15900
|
-
const title = "
|
|
15901
|
-
const subtitle = "
|
|
15902
|
-
const chevron = "
|
|
15903
|
-
const dropdown = "
|
|
15911
|
+
const overlay = "_overlay_y4mxb_5";
|
|
15912
|
+
const scrim = "_scrim_y4mxb_21";
|
|
15913
|
+
const sheet = "_sheet_y4mxb_31";
|
|
15914
|
+
const header = "_header_y4mxb_80";
|
|
15915
|
+
const close = "_close_y4mxb_86";
|
|
15916
|
+
const list$1 = "_list_y4mxb_105";
|
|
15917
|
+
const row = "_row_y4mxb_120";
|
|
15918
|
+
const icon = "_icon_y4mxb_149";
|
|
15919
|
+
const text = "_text_y4mxb_157";
|
|
15920
|
+
const title = "_title_y4mxb_165";
|
|
15921
|
+
const subtitle = "_subtitle_y4mxb_172";
|
|
15922
|
+
const chevron = "_chevron_y4mxb_178";
|
|
15923
|
+
const dropdown = "_dropdown_y4mxb_187";
|
|
15904
15924
|
const styles$1 = {
|
|
15905
15925
|
overlay,
|
|
15906
15926
|
scrim,
|
|
@@ -16008,16 +16028,72 @@ function CloseIcon() {
|
|
|
16008
16028
|
})
|
|
16009
16029
|
});
|
|
16010
16030
|
}
|
|
16031
|
+
const FALLBACK_CATEGORIES = [{
|
|
16032
|
+
code: "hoodies",
|
|
16033
|
+
title: "Hoodies"
|
|
16034
|
+
}, {
|
|
16035
|
+
code: "zip-ups",
|
|
16036
|
+
title: "Zip Ups"
|
|
16037
|
+
}, {
|
|
16038
|
+
code: "t-shirts",
|
|
16039
|
+
title: "T-Shirts"
|
|
16040
|
+
}];
|
|
16041
|
+
function useMenuCategories(enabled) {
|
|
16042
|
+
const shop2 = useShopOptional();
|
|
16043
|
+
const [fetched, setFetched] = useState(null);
|
|
16044
|
+
useEffect(() => {
|
|
16045
|
+
const api = shop2?.api;
|
|
16046
|
+
if (!enabled || !api) return;
|
|
16047
|
+
let live = true;
|
|
16048
|
+
void api.content.home().then((home2) => {
|
|
16049
|
+
const seen = /* @__PURE__ */ new Set();
|
|
16050
|
+
const list2 = [];
|
|
16051
|
+
for (const slide2 of home2.slides) {
|
|
16052
|
+
if (!slide2.target || seen.has(slide2.target)) continue;
|
|
16053
|
+
seen.add(slide2.target);
|
|
16054
|
+
list2.push({
|
|
16055
|
+
code: slide2.target,
|
|
16056
|
+
title: slide2.title
|
|
16057
|
+
});
|
|
16058
|
+
}
|
|
16059
|
+
if (live && list2.length > 0) setFetched(list2);
|
|
16060
|
+
}).catch(() => {
|
|
16061
|
+
});
|
|
16062
|
+
return () => {
|
|
16063
|
+
live = false;
|
|
16064
|
+
};
|
|
16065
|
+
}, [shop2, enabled]);
|
|
16066
|
+
return fetched;
|
|
16067
|
+
}
|
|
16011
16068
|
function ShopMenuSheet({ open, onClose, onManageOrders, onHelp, closeLabel, label: label2, placement = "sheet" }) {
|
|
16012
16069
|
const sheetRef = useRef(null);
|
|
16013
16070
|
const t = useT();
|
|
16014
16071
|
useModalDialog(open, onClose, sheetRef);
|
|
16072
|
+
const navigate = useNavigate();
|
|
16073
|
+
const desktop = useDesktopLayout() && placement === "dropdown";
|
|
16074
|
+
const fetchedCategories = useMenuCategories(open && desktop);
|
|
16015
16075
|
if (!open) return null;
|
|
16016
|
-
const
|
|
16076
|
+
const categoryRows = desktop ? (fetchedCategories ?? FALLBACK_CATEGORIES.map((c) => ({
|
|
16077
|
+
code: c.code,
|
|
16078
|
+
title: t(c.title)
|
|
16079
|
+
}))).map((c) => ({
|
|
16080
|
+
key: `category-${c.code}`,
|
|
16081
|
+
icon: null,
|
|
16082
|
+
title: c.title,
|
|
16083
|
+
...navigate ? {
|
|
16084
|
+
onSelect: () => {
|
|
16085
|
+
onClose();
|
|
16086
|
+
navigate(`/category/${c.code}`);
|
|
16087
|
+
}
|
|
16088
|
+
} : {}
|
|
16089
|
+
})) : [];
|
|
16090
|
+
const rows = [...categoryRows, {
|
|
16017
16091
|
key: "orders",
|
|
16018
16092
|
icon: jsx(OrderIcon, {}),
|
|
16019
16093
|
title: t("Manage orders"),
|
|
16020
|
-
|
|
16094
|
+
...desktop ? {} : {
|
|
16095
|
+
subtitle: t("View your order history and track shipments")
|
|
16096
|
+
},
|
|
16021
16097
|
...onManageOrders ? {
|
|
16022
16098
|
onSelect: onManageOrders
|
|
16023
16099
|
} : {}
|
|
@@ -16054,13 +16130,14 @@ function ShopMenuSheet({ open, onClose, onManageOrders, onHelp, closeLabel, labe
|
|
|
16054
16130
|
}), jsx("ul", {
|
|
16055
16131
|
className: styles$1.list,
|
|
16056
16132
|
children: rows.map((row2) => jsx("li", {
|
|
16133
|
+
"data-row": row2.key,
|
|
16057
16134
|
children: jsxs("button", {
|
|
16058
16135
|
type: "button",
|
|
16059
16136
|
className: styles$1.row,
|
|
16060
16137
|
onClick: row2.onSelect,
|
|
16061
16138
|
disabled: !row2.onSelect,
|
|
16062
16139
|
"aria-disabled": row2.onSelect ? void 0 : true,
|
|
16063
|
-
children: [jsx("span", {
|
|
16140
|
+
children: [row2.icon && jsx("span", {
|
|
16064
16141
|
className: styles$1.icon,
|
|
16065
16142
|
children: row2.icon
|
|
16066
16143
|
}), jsxs("span", {
|
|
@@ -16082,19 +16159,19 @@ function ShopMenuSheet({ open, onClose, onManageOrders, onHelp, closeLabel, labe
|
|
|
16082
16159
|
})]
|
|
16083
16160
|
});
|
|
16084
16161
|
}
|
|
16085
|
-
const bar = "
|
|
16086
|
-
const media = "
|
|
16087
|
-
const light = "
|
|
16088
|
-
const crumbs = "
|
|
16089
|
-
const list = "
|
|
16090
|
-
const item = "
|
|
16091
|
-
const root = "
|
|
16092
|
-
const trail = "
|
|
16093
|
-
const current = "
|
|
16094
|
-
const separator = "
|
|
16095
|
-
const actions = "
|
|
16096
|
-
const iconBtn = "
|
|
16097
|
-
const badge = "
|
|
16162
|
+
const bar = "_bar_10bv8_1";
|
|
16163
|
+
const media = "_media_10bv8_22";
|
|
16164
|
+
const light = "_light_10bv8_30";
|
|
16165
|
+
const crumbs = "_crumbs_10bv8_41";
|
|
16166
|
+
const list = "_list_10bv8_46";
|
|
16167
|
+
const item = "_item_10bv8_56";
|
|
16168
|
+
const root = "_root_10bv8_63";
|
|
16169
|
+
const trail = "_trail_10bv8_64";
|
|
16170
|
+
const current = "_current_10bv8_65";
|
|
16171
|
+
const separator = "_separator_10bv8_85";
|
|
16172
|
+
const actions = "_actions_10bv8_90";
|
|
16173
|
+
const iconBtn = "_iconBtn_10bv8_97";
|
|
16174
|
+
const badge = "_badge_10bv8_126";
|
|
16098
16175
|
const styles = {
|
|
16099
16176
|
bar,
|
|
16100
16177
|
media,
|