@nok-integration/storefront-react 0.29.0 → 0.29.2
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 +205 -122
- package/dist/standalone/storefront.mjs +205 -122
- package/dist/standalone/styles.css +215 -181
- package/dist/styles.css +215 -181
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -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,
|
|
@@ -10937,11 +10952,11 @@ function CartLineItem({ item: item2, title: title2, image: image2, compareAt: co
|
|
|
10937
10952
|
})]
|
|
10938
10953
|
});
|
|
10939
10954
|
}
|
|
10940
|
-
const box$1 = "
|
|
10941
|
-
const row$4 = "
|
|
10942
|
-
const icon$2 = "
|
|
10943
|
-
const label$1 = "
|
|
10944
|
-
const divider$1 = "
|
|
10955
|
+
const box$1 = "_box_tuawd_1";
|
|
10956
|
+
const row$4 = "_row_tuawd_10";
|
|
10957
|
+
const icon$2 = "_icon_tuawd_16";
|
|
10958
|
+
const label$1 = "_label_tuawd_22";
|
|
10959
|
+
const divider$1 = "_divider_tuawd_29";
|
|
10945
10960
|
const styles$q = {
|
|
10946
10961
|
box: box$1,
|
|
10947
10962
|
row: row$4,
|
|
@@ -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_ws4so_15";
|
|
11037
|
+
const screen = "_screen_ws4so_20";
|
|
11038
|
+
const body$4 = "_body_ws4so_12";
|
|
11039
|
+
const items = "_items_ws4so_34";
|
|
11040
|
+
const sectionHeader = "_sectionHeader_ws4so_40";
|
|
11041
|
+
const sectionTitle = "_sectionTitle_ws4so_46";
|
|
11042
|
+
const count = "_count_ws4so_67";
|
|
11043
|
+
const lines = "_lines_ws4so_91";
|
|
11044
|
+
const footer = "_footer_ws4so_101";
|
|
11045
|
+
const empty = "_empty_ws4so_105";
|
|
11046
|
+
const cta$4 = "_cta_ws4so_145";
|
|
11047
|
+
const ctaError = "_ctaError_ws4so_153";
|
|
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,
|
|
@@ -15126,6 +15146,12 @@ function useDocumentSnap(ref, enabled = true) {
|
|
|
15126
15146
|
const previousType = root2.style.scrollSnapType;
|
|
15127
15147
|
const previousPadding = root2.style.scrollPaddingTop;
|
|
15128
15148
|
root2.style.scrollPaddingTop = "0px";
|
|
15149
|
+
const desktop = typeof window.matchMedia === "function" ? window.matchMedia("(min-width: 1200px)") : null;
|
|
15150
|
+
const pad = () => {
|
|
15151
|
+
root2.style.scrollPaddingTop = desktop?.matches ? "calc(var(--shop-chrome-top, 0px) + var(--shop-nav-height, 64px))" : "0px";
|
|
15152
|
+
};
|
|
15153
|
+
pad();
|
|
15154
|
+
desktop?.addEventListener?.("change", pad);
|
|
15129
15155
|
let snapping = false;
|
|
15130
15156
|
let awaitingTouch = false;
|
|
15131
15157
|
const layoutOf = () => {
|
|
@@ -15239,6 +15265,7 @@ function useDocumentSnap(ref, enabled = true) {
|
|
|
15239
15265
|
passive: true
|
|
15240
15266
|
});
|
|
15241
15267
|
return () => {
|
|
15268
|
+
desktop?.removeEventListener?.("change", pad);
|
|
15242
15269
|
document.removeEventListener("scroll", note2, {
|
|
15243
15270
|
capture: true
|
|
15244
15271
|
});
|
|
@@ -15888,19 +15915,19 @@ function ShopBar({ onBack, onMenu, title: title2, showCart, floating: floating2
|
|
|
15888
15915
|
})]
|
|
15889
15916
|
});
|
|
15890
15917
|
}
|
|
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 = "
|
|
15918
|
+
const overlay = "_overlay_1aeep_5";
|
|
15919
|
+
const scrim = "_scrim_1aeep_21";
|
|
15920
|
+
const sheet = "_sheet_1aeep_31";
|
|
15921
|
+
const header = "_header_1aeep_80";
|
|
15922
|
+
const close = "_close_1aeep_86";
|
|
15923
|
+
const list$1 = "_list_1aeep_105";
|
|
15924
|
+
const row = "_row_1aeep_120";
|
|
15925
|
+
const icon = "_icon_1aeep_149";
|
|
15926
|
+
const text = "_text_1aeep_157";
|
|
15927
|
+
const title = "_title_1aeep_165";
|
|
15928
|
+
const subtitle = "_subtitle_1aeep_172";
|
|
15929
|
+
const chevron = "_chevron_1aeep_178";
|
|
15930
|
+
const dropdown = "_dropdown_1aeep_187";
|
|
15904
15931
|
const styles$1 = {
|
|
15905
15932
|
overlay,
|
|
15906
15933
|
scrim,
|
|
@@ -16008,16 +16035,72 @@ function CloseIcon() {
|
|
|
16008
16035
|
})
|
|
16009
16036
|
});
|
|
16010
16037
|
}
|
|
16038
|
+
const FALLBACK_CATEGORIES = [{
|
|
16039
|
+
code: "hoodies",
|
|
16040
|
+
title: "Hoodies"
|
|
16041
|
+
}, {
|
|
16042
|
+
code: "zip-ups",
|
|
16043
|
+
title: "Zip Ups"
|
|
16044
|
+
}, {
|
|
16045
|
+
code: "t-shirts",
|
|
16046
|
+
title: "T-Shirts"
|
|
16047
|
+
}];
|
|
16048
|
+
function useMenuCategories(enabled) {
|
|
16049
|
+
const shop2 = useShopOptional();
|
|
16050
|
+
const [fetched, setFetched] = useState(null);
|
|
16051
|
+
useEffect(() => {
|
|
16052
|
+
const api = shop2?.api;
|
|
16053
|
+
if (!enabled || !api) return;
|
|
16054
|
+
let live = true;
|
|
16055
|
+
void api.content.home().then((home2) => {
|
|
16056
|
+
const seen = /* @__PURE__ */ new Set();
|
|
16057
|
+
const list2 = [];
|
|
16058
|
+
for (const slide2 of home2.slides) {
|
|
16059
|
+
if (!slide2.target || seen.has(slide2.target)) continue;
|
|
16060
|
+
seen.add(slide2.target);
|
|
16061
|
+
list2.push({
|
|
16062
|
+
code: slide2.target,
|
|
16063
|
+
title: slide2.title
|
|
16064
|
+
});
|
|
16065
|
+
}
|
|
16066
|
+
if (live && list2.length > 0) setFetched(list2);
|
|
16067
|
+
}).catch(() => {
|
|
16068
|
+
});
|
|
16069
|
+
return () => {
|
|
16070
|
+
live = false;
|
|
16071
|
+
};
|
|
16072
|
+
}, [shop2, enabled]);
|
|
16073
|
+
return fetched;
|
|
16074
|
+
}
|
|
16011
16075
|
function ShopMenuSheet({ open, onClose, onManageOrders, onHelp, closeLabel, label: label2, placement = "sheet" }) {
|
|
16012
16076
|
const sheetRef = useRef(null);
|
|
16013
16077
|
const t = useT();
|
|
16014
16078
|
useModalDialog(open, onClose, sheetRef);
|
|
16079
|
+
const navigate = useNavigate();
|
|
16080
|
+
const desktop = useDesktopLayout() && placement === "dropdown";
|
|
16081
|
+
const fetchedCategories = useMenuCategories(open && desktop);
|
|
16015
16082
|
if (!open) return null;
|
|
16016
|
-
const
|
|
16083
|
+
const categoryRows = desktop ? (fetchedCategories ?? FALLBACK_CATEGORIES.map((c) => ({
|
|
16084
|
+
code: c.code,
|
|
16085
|
+
title: t(c.title)
|
|
16086
|
+
}))).map((c) => ({
|
|
16087
|
+
key: `category-${c.code}`,
|
|
16088
|
+
icon: null,
|
|
16089
|
+
title: c.title,
|
|
16090
|
+
...navigate ? {
|
|
16091
|
+
onSelect: () => {
|
|
16092
|
+
onClose();
|
|
16093
|
+
navigate(`/category/${c.code}`);
|
|
16094
|
+
}
|
|
16095
|
+
} : {}
|
|
16096
|
+
})) : [];
|
|
16097
|
+
const rows = [...categoryRows, {
|
|
16017
16098
|
key: "orders",
|
|
16018
16099
|
icon: jsx(OrderIcon, {}),
|
|
16019
16100
|
title: t("Manage orders"),
|
|
16020
|
-
|
|
16101
|
+
...desktop ? {} : {
|
|
16102
|
+
subtitle: t("View your order history and track shipments")
|
|
16103
|
+
},
|
|
16021
16104
|
...onManageOrders ? {
|
|
16022
16105
|
onSelect: onManageOrders
|
|
16023
16106
|
} : {}
|
|
@@ -16060,7 +16143,7 @@ function ShopMenuSheet({ open, onClose, onManageOrders, onHelp, closeLabel, labe
|
|
|
16060
16143
|
onClick: row2.onSelect,
|
|
16061
16144
|
disabled: !row2.onSelect,
|
|
16062
16145
|
"aria-disabled": row2.onSelect ? void 0 : true,
|
|
16063
|
-
children: [jsx("span", {
|
|
16146
|
+
children: [row2.icon && jsx("span", {
|
|
16064
16147
|
className: styles$1.icon,
|
|
16065
16148
|
children: row2.icon
|
|
16066
16149
|
}), jsxs("span", {
|
|
@@ -16082,19 +16165,19 @@ function ShopMenuSheet({ open, onClose, onManageOrders, onHelp, closeLabel, labe
|
|
|
16082
16165
|
})]
|
|
16083
16166
|
});
|
|
16084
16167
|
}
|
|
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 = "
|
|
16168
|
+
const bar = "_bar_10bv8_1";
|
|
16169
|
+
const media = "_media_10bv8_22";
|
|
16170
|
+
const light = "_light_10bv8_30";
|
|
16171
|
+
const crumbs = "_crumbs_10bv8_41";
|
|
16172
|
+
const list = "_list_10bv8_46";
|
|
16173
|
+
const item = "_item_10bv8_56";
|
|
16174
|
+
const root = "_root_10bv8_63";
|
|
16175
|
+
const trail = "_trail_10bv8_64";
|
|
16176
|
+
const current = "_current_10bv8_65";
|
|
16177
|
+
const separator = "_separator_10bv8_85";
|
|
16178
|
+
const actions = "_actions_10bv8_90";
|
|
16179
|
+
const iconBtn = "_iconBtn_10bv8_97";
|
|
16180
|
+
const badge = "_badge_10bv8_126";
|
|
16098
16181
|
const styles = {
|
|
16099
16182
|
bar,
|
|
16100
16183
|
media,
|