@nok-integration/storefront-react 0.19.21 → 0.19.23
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 +26 -5
- package/dist/index.mjs +99 -52
- package/dist/standalone/storefront.mjs +99 -52
- package/dist/standalone/styles.css +32 -29
- package/dist/styles.css +32 -29
- package/package.json +28 -9
package/dist/index.d.ts
CHANGED
|
@@ -4336,10 +4336,19 @@ export declare interface OrderTrackingViewProps {
|
|
|
4336
4336
|
*/
|
|
4337
4337
|
onCancelled?: (order: OrderDetail) => void;
|
|
4338
4338
|
/**
|
|
4339
|
-
*
|
|
4339
|
+
* Take over the cancelled screen's "Reorder".
|
|
4340
4340
|
*
|
|
4341
|
-
*
|
|
4342
|
-
*
|
|
4341
|
+
* Optional. Pass it and you own the trip. Omit it and the button puts the order's lines
|
|
4342
|
+
* back in the cart itself and navigates to `/cart`, so the frame's one useful next step
|
|
4343
|
+
* is there for a fan whether the host routes it or not.
|
|
4344
|
+
*
|
|
4345
|
+
* **It used to gate whether the button was drawn at all**, which is why a cancelled
|
|
4346
|
+
* order on a host that passes no handler offered nothing at all — the control existed
|
|
4347
|
+
* everywhere we looked and nowhere a fan was. Same rule as `onStartReturn` and the
|
|
4348
|
+
* return flow's "Done": a host handler customises a control, it never decides whether
|
|
4349
|
+
* the design has one.
|
|
4350
|
+
*
|
|
4351
|
+
* `reorder_requested` is raised either way.
|
|
4343
4352
|
*/
|
|
4344
4353
|
onReorder?: () => void;
|
|
4345
4354
|
/**
|
|
@@ -5586,7 +5595,13 @@ export declare interface ShopHeaderProps {
|
|
|
5586
5595
|
* navigation already provides a back affordance should not get a second one.
|
|
5587
5596
|
*/
|
|
5588
5597
|
onBack?: () => void;
|
|
5589
|
-
/**
|
|
5598
|
+
/**
|
|
5599
|
+
* Overflow menu. Omitted by default: a control that opens nothing is worse than none.
|
|
5600
|
+
*
|
|
5601
|
+
* A handler passed here is still not drawn on a screen that has declared it carries no
|
|
5602
|
+
* trailing controls — the cart. A host with one bar over every route passes this once,
|
|
5603
|
+
* and cannot know which screen it is over.
|
|
5604
|
+
*/
|
|
5590
5605
|
onMenu?: () => void;
|
|
5591
5606
|
/**
|
|
5592
5607
|
* The screen name, drawn between the back control and the icons (Figma `mobile/header`
|
|
@@ -5596,7 +5611,13 @@ export declare interface ShopHeaderProps {
|
|
|
5596
5611
|
* frames leave it empty, so a bar with nothing in the middle is a state the design has.
|
|
5597
5612
|
*/
|
|
5598
5613
|
title?: string;
|
|
5599
|
-
/**
|
|
5614
|
+
/**
|
|
5615
|
+
* The cart icon and its live count. On unless the screen below says otherwise.
|
|
5616
|
+
*
|
|
5617
|
+
* Left unset, this follows the screen: the cart's own bar carries nothing on the right,
|
|
5618
|
+
* and it declares that itself because a host mounting this bar as a sibling cannot see
|
|
5619
|
+
* which view is under it. Set it explicitly and you get exactly what you asked for.
|
|
5620
|
+
*/
|
|
5600
5621
|
showCart?: boolean;
|
|
5601
5622
|
/**
|
|
5602
5623
|
* Lay the bar over the content instead of above it, with no background of its own.
|
package/dist/index.mjs
CHANGED
|
@@ -5159,26 +5159,31 @@ function withAuthorization(init, token) {
|
|
|
5159
5159
|
}
|
|
5160
5160
|
const ScreenTitleContext = createContext({
|
|
5161
5161
|
title: void 0,
|
|
5162
|
+
trailing: "default",
|
|
5162
5163
|
claim: () => () => {
|
|
5163
5164
|
}
|
|
5164
5165
|
});
|
|
5165
5166
|
const SuppressedContext = createContext(false);
|
|
5166
5167
|
function ScreenTitleProvider({ children }) {
|
|
5167
5168
|
const [title2, setTitle] = useState(void 0);
|
|
5169
|
+
const [trailing, setTrailing] = useState("default");
|
|
5168
5170
|
const held = useRef(void 0);
|
|
5169
|
-
const claim = useCallback((next) => {
|
|
5171
|
+
const claim = useCallback((next, nextTrailing) => {
|
|
5170
5172
|
held.current = next;
|
|
5171
5173
|
setTitle(next);
|
|
5174
|
+
setTrailing(nextTrailing);
|
|
5172
5175
|
return () => {
|
|
5173
5176
|
if (held.current !== next) return;
|
|
5174
5177
|
held.current = void 0;
|
|
5175
5178
|
setTitle(void 0);
|
|
5179
|
+
setTrailing("default");
|
|
5176
5180
|
};
|
|
5177
5181
|
}, []);
|
|
5178
5182
|
const value2 = useMemo(() => ({
|
|
5179
5183
|
title: title2,
|
|
5184
|
+
trailing,
|
|
5180
5185
|
claim
|
|
5181
|
-
}), [title2, claim]);
|
|
5186
|
+
}), [title2, trailing, claim]);
|
|
5182
5187
|
return jsx(ScreenTitleContext.Provider, {
|
|
5183
5188
|
value: value2,
|
|
5184
5189
|
children
|
|
@@ -5187,13 +5192,16 @@ function ScreenTitleProvider({ children }) {
|
|
|
5187
5192
|
function useScreenTitle() {
|
|
5188
5193
|
return useContext(ScreenTitleContext).title;
|
|
5189
5194
|
}
|
|
5190
|
-
function
|
|
5195
|
+
function useScreenTrailing() {
|
|
5196
|
+
return useContext(ScreenTitleContext).trailing;
|
|
5197
|
+
}
|
|
5198
|
+
function useSetScreenTitle(title2, trailing = "default") {
|
|
5191
5199
|
const { claim } = useContext(ScreenTitleContext);
|
|
5192
5200
|
const suppressed = useContext(SuppressedContext);
|
|
5193
5201
|
useEffect(() => {
|
|
5194
5202
|
if (suppressed || title2 === void 0) return;
|
|
5195
|
-
return claim(title2);
|
|
5196
|
-
}, [claim, title2, suppressed]);
|
|
5203
|
+
return claim(title2, trailing);
|
|
5204
|
+
}, [claim, title2, trailing, suppressed]);
|
|
5197
5205
|
}
|
|
5198
5206
|
function NoScreenTitle({ children }) {
|
|
5199
5207
|
return jsx(SuppressedContext.Provider, {
|
|
@@ -5473,13 +5481,16 @@ const styles$O = {
|
|
|
5473
5481
|
fill
|
|
5474
5482
|
};
|
|
5475
5483
|
const SETTLE_MS$1 = 150;
|
|
5476
|
-
function
|
|
5477
|
-
let top2 = el.getBoundingClientRect().top;
|
|
5484
|
+
function scrolledOffOrigin(el) {
|
|
5478
5485
|
for (let node = el.parentElement; node; node = node.parentElement) {
|
|
5479
|
-
|
|
5486
|
+
if (node.scrollTop > 0) return true;
|
|
5480
5487
|
if (getComputedStyle(node).position === "fixed") break;
|
|
5481
5488
|
}
|
|
5482
|
-
|
|
5489
|
+
return false;
|
|
5490
|
+
}
|
|
5491
|
+
function offsetFromViewportTop(el) {
|
|
5492
|
+
if (scrolledOffOrigin(el)) return null;
|
|
5493
|
+
const offset = Math.max(0, Math.round(el.getBoundingClientRect().top));
|
|
5483
5494
|
return offset >= window.innerHeight ? 0 : offset;
|
|
5484
5495
|
}
|
|
5485
5496
|
function useTopOffset(ref, property, enabled = true) {
|
|
@@ -5488,7 +5499,8 @@ function useTopOffset(ref, property, enabled = true) {
|
|
|
5488
5499
|
if (!el || !enabled) return;
|
|
5489
5500
|
let timer2;
|
|
5490
5501
|
const measure = () => {
|
|
5491
|
-
|
|
5502
|
+
const offset = offsetFromViewportTop(el);
|
|
5503
|
+
if (offset !== null) el.style.setProperty(property, `${offset}px`);
|
|
5492
5504
|
};
|
|
5493
5505
|
const settle = () => {
|
|
5494
5506
|
if (timer2) clearTimeout(timer2);
|
|
@@ -7383,6 +7395,7 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
|
|
|
7383
7395
|
const [order, setOrder] = useState(null);
|
|
7384
7396
|
const [ret, setRet] = useState(null);
|
|
7385
7397
|
const [state, setState] = useState("loading");
|
|
7398
|
+
const [justFiled, setJustFiled] = useState(false);
|
|
7386
7399
|
const [errorCode, setErrorCode] = useState(void 0);
|
|
7387
7400
|
const [busy, setBusy] = useState(false);
|
|
7388
7401
|
const load = useCallback(async () => {
|
|
@@ -7410,6 +7423,7 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
|
|
|
7410
7423
|
items: items2
|
|
7411
7424
|
});
|
|
7412
7425
|
setRet(created);
|
|
7426
|
+
setJustFiled(true);
|
|
7413
7427
|
emit({
|
|
7414
7428
|
type: "return_requested",
|
|
7415
7429
|
orderRef,
|
|
@@ -7442,11 +7456,12 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
|
|
|
7442
7456
|
});
|
|
7443
7457
|
}
|
|
7444
7458
|
if (ret) {
|
|
7445
|
-
return ret.status === "reported" ? jsx(ReturnLabelView, {
|
|
7459
|
+
return justFiled && ret.status === "reported" ? jsx(ReturnLabelView, {
|
|
7446
7460
|
ret,
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7461
|
+
onDone: () => {
|
|
7462
|
+
setJustFiled(false);
|
|
7463
|
+
onDone?.();
|
|
7464
|
+
}
|
|
7450
7465
|
}) : jsx(ReturnTrackingView, {
|
|
7451
7466
|
ret,
|
|
7452
7467
|
...locale ? {
|
|
@@ -7561,7 +7576,10 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onC
|
|
|
7561
7576
|
const [cancelOpen, setCancelOpen] = useState(false);
|
|
7562
7577
|
const [cancelling, setCancelling] = useState(false);
|
|
7563
7578
|
const [cancelError, setCancelError] = useState(null);
|
|
7579
|
+
const [reordering, setReordering] = useState(false);
|
|
7564
7580
|
const emit = useShopEvent();
|
|
7581
|
+
const navigate = useNavigate();
|
|
7582
|
+
const toast2 = useToast();
|
|
7565
7583
|
const load = useCallback(async () => {
|
|
7566
7584
|
setState("loading");
|
|
7567
7585
|
try {
|
|
@@ -7622,6 +7640,37 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onC
|
|
|
7622
7640
|
setCancelling(false);
|
|
7623
7641
|
}
|
|
7624
7642
|
}
|
|
7643
|
+
async function reorder(current2) {
|
|
7644
|
+
emit({
|
|
7645
|
+
type: "reorder_requested",
|
|
7646
|
+
orderRef: current2.order_ref
|
|
7647
|
+
});
|
|
7648
|
+
if (onReorder) {
|
|
7649
|
+
onReorder();
|
|
7650
|
+
return;
|
|
7651
|
+
}
|
|
7652
|
+
setReordering(true);
|
|
7653
|
+
try {
|
|
7654
|
+
let added = 0;
|
|
7655
|
+
for (const line2 of current2.items) {
|
|
7656
|
+
try {
|
|
7657
|
+
await api.cart.addItem({
|
|
7658
|
+
sku: line2.sku,
|
|
7659
|
+
qty: line2.qty
|
|
7660
|
+
});
|
|
7661
|
+
added += 1;
|
|
7662
|
+
} catch {
|
|
7663
|
+
}
|
|
7664
|
+
}
|
|
7665
|
+
if (added === 0) {
|
|
7666
|
+
toast2.show("These items are no longer available", "critical");
|
|
7667
|
+
return;
|
|
7668
|
+
}
|
|
7669
|
+
navigate?.("/cart");
|
|
7670
|
+
} finally {
|
|
7671
|
+
setReordering(false);
|
|
7672
|
+
}
|
|
7673
|
+
}
|
|
7625
7674
|
if (order.status === "cancelled") {
|
|
7626
7675
|
return jsxs("div", {
|
|
7627
7676
|
className: styles$y.page,
|
|
@@ -7634,16 +7683,11 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onC
|
|
|
7634
7683
|
className: styles$y.cancelledMeta,
|
|
7635
7684
|
children: `Order #${shortRef$1(order.order_ref)} · Placed ${placedOn(order.placed_at, locale)}`
|
|
7636
7685
|
})]
|
|
7637
|
-
}),
|
|
7686
|
+
}), jsx(Button, {
|
|
7638
7687
|
variant: "primary",
|
|
7639
7688
|
fullWidth: true,
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
type: "reorder_requested",
|
|
7643
|
-
orderRef: order.order_ref
|
|
7644
|
-
});
|
|
7645
|
-
onReorder();
|
|
7646
|
-
},
|
|
7689
|
+
loading: reordering,
|
|
7690
|
+
onClick: () => void reorder(order),
|
|
7647
7691
|
children: "Reorder"
|
|
7648
7692
|
}), jsx(OrderLines, {
|
|
7649
7693
|
order
|
|
@@ -8965,11 +9009,11 @@ function ShippingInfo() {
|
|
|
8965
9009
|
})]
|
|
8966
9010
|
});
|
|
8967
9011
|
}
|
|
8968
|
-
const bar = "
|
|
8969
|
-
const floating$1 = "
|
|
8970
|
-
const divider = "
|
|
8971
|
-
const info$1 = "
|
|
8972
|
-
const actions = "
|
|
9012
|
+
const bar = "_bar_v5jjj_1";
|
|
9013
|
+
const floating$1 = "_floating_v5jjj_52";
|
|
9014
|
+
const divider = "_divider_v5jjj_58";
|
|
9015
|
+
const info$1 = "_info_v5jjj_62";
|
|
9016
|
+
const actions = "_actions_v5jjj_70";
|
|
8973
9017
|
const styles$k = {
|
|
8974
9018
|
bar,
|
|
8975
9019
|
floating: floating$1,
|
|
@@ -9009,7 +9053,7 @@ const styles$j = {
|
|
|
9009
9053
|
};
|
|
9010
9054
|
function CartView(props = {}) {
|
|
9011
9055
|
const t = useT();
|
|
9012
|
-
useSetScreenTitle(t("Cart"));
|
|
9056
|
+
useSetScreenTitle(t("Cart"), "none");
|
|
9013
9057
|
return jsx(ShopSurface, {
|
|
9014
9058
|
tone: "light",
|
|
9015
9059
|
fill: true,
|
|
@@ -10718,24 +10762,24 @@ function ProductView({ sku, initialData, showRecommendations = true, onNotFound
|
|
|
10718
10762
|
}
|
|
10719
10763
|
return unavailable;
|
|
10720
10764
|
}
|
|
10721
|
-
const showcase = "
|
|
10722
|
-
const panel = "
|
|
10723
|
-
const image = "
|
|
10724
|
-
const hero = "
|
|
10725
|
-
const heroContent = "
|
|
10726
|
-
const heroText = "
|
|
10727
|
-
const logo = "
|
|
10728
|
-
const heroTitle = "
|
|
10729
|
-
const heroSub = "
|
|
10730
|
-
const swipe = "
|
|
10731
|
-
const swipeLabel = "
|
|
10732
|
-
const chevron$1 = "
|
|
10733
|
-
const overlay$1 = "
|
|
10734
|
-
const copy = "
|
|
10735
|
-
const title$2 = "
|
|
10736
|
-
const subtitle$1 = "
|
|
10737
|
-
const cta = "
|
|
10738
|
-
const mosaic = "
|
|
10765
|
+
const showcase = "_showcase_1qnt2_44";
|
|
10766
|
+
const panel = "_panel_1qnt2_48";
|
|
10767
|
+
const image = "_image_1qnt2_76";
|
|
10768
|
+
const hero = "_hero_1qnt2_116";
|
|
10769
|
+
const heroContent = "_heroContent_1qnt2_197";
|
|
10770
|
+
const heroText = "_heroText_1qnt2_221";
|
|
10771
|
+
const logo = "_logo_1qnt2_230";
|
|
10772
|
+
const heroTitle = "_heroTitle_1qnt2_250";
|
|
10773
|
+
const heroSub = "_heroSub_1qnt2_274";
|
|
10774
|
+
const swipe = "_swipe_1qnt2_293";
|
|
10775
|
+
const swipeLabel = "_swipeLabel_1qnt2_300";
|
|
10776
|
+
const chevron$1 = "_chevron_1qnt2_306";
|
|
10777
|
+
const overlay$1 = "_overlay_1qnt2_11";
|
|
10778
|
+
const copy = "_copy_1qnt2_341";
|
|
10779
|
+
const title$2 = "_title_1qnt2_346";
|
|
10780
|
+
const subtitle$1 = "_subtitle_1qnt2_353";
|
|
10781
|
+
const cta = "_cta_1qnt2_359";
|
|
10782
|
+
const mosaic = "_mosaic_1qnt2_403";
|
|
10739
10783
|
const styles$2 = {
|
|
10740
10784
|
showcase,
|
|
10741
10785
|
panel,
|
|
@@ -11185,12 +11229,15 @@ function CheckoutBar({ title: title2, onClose, closeLabel, className }) {
|
|
|
11185
11229
|
})]
|
|
11186
11230
|
});
|
|
11187
11231
|
}
|
|
11188
|
-
function ShopBar({ onBack, onMenu, title: title2, showCart
|
|
11232
|
+
function ShopBar({ onBack, onMenu, title: title2, showCart, floating: floating2 = false, scrolled: scrolled2, backLabel, menuLabel, className }) {
|
|
11189
11233
|
const t = useT();
|
|
11190
11234
|
const cartCount = useCartCount();
|
|
11191
11235
|
const screenTitle = useScreenTitle();
|
|
11192
11236
|
const shownTitle = title2 ?? screenTitle;
|
|
11193
|
-
const
|
|
11237
|
+
const bare = useScreenTrailing() === "none";
|
|
11238
|
+
const cartOn = showCart ?? !bare;
|
|
11239
|
+
const menu = bare ? void 0 : onMenu;
|
|
11240
|
+
const hasTrailing = cartOn || Boolean(menu);
|
|
11194
11241
|
const atTop = useScrolledUnder(floating2 && scrolled2 === void 0);
|
|
11195
11242
|
const isScrolled = scrolled2 ?? atTop;
|
|
11196
11243
|
const cartLabel = cartCount === null ? t("Cart") : cartCount === 0 ? t("Cart, empty") : t("Cart, {0} item{1}", cartCount, cartCount === 1 ? "" : "s");
|
|
@@ -11211,7 +11258,7 @@ function ShopBar({ onBack, onMenu, title: title2, showCart = true, floating: flo
|
|
|
11211
11258
|
children: shownTitle
|
|
11212
11259
|
}) : null, jsxs("div", {
|
|
11213
11260
|
className: styles$1.right,
|
|
11214
|
-
children: [
|
|
11261
|
+
children: [cartOn ? jsxs(CartTrigger, {
|
|
11215
11262
|
className: styles$1.iconBtn,
|
|
11216
11263
|
"aria-label": cartLabel,
|
|
11217
11264
|
children: [jsx(CartIcon, {}), cartCount !== null && cartCount > 0 ? jsx("span", {
|
|
@@ -11219,11 +11266,11 @@ function ShopBar({ onBack, onMenu, title: title2, showCart = true, floating: flo
|
|
|
11219
11266
|
"aria-hidden": "true",
|
|
11220
11267
|
children: cartCount > 99 ? "99+" : cartCount
|
|
11221
11268
|
}) : null]
|
|
11222
|
-
}) : null,
|
|
11269
|
+
}) : null, menu ? jsx("button", {
|
|
11223
11270
|
type: "button",
|
|
11224
11271
|
className: `${styles$1.iconBtn} ${styles$1.menuBtn}`,
|
|
11225
11272
|
"aria-label": menuLabel ?? t("More options"),
|
|
11226
|
-
onClick:
|
|
11273
|
+
onClick: menu,
|
|
11227
11274
|
children: jsx(MenuIcon, {})
|
|
11228
11275
|
}) : null]
|
|
11229
11276
|
})]
|
|
@@ -11514,4 +11561,4 @@ export {
|
|
|
11514
11561
|
useToast,
|
|
11515
11562
|
variantLabel
|
|
11516
11563
|
};
|
|
11517
|
-
|
|
11564
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -5159,26 +5159,31 @@ function withAuthorization(init, token) {
|
|
|
5159
5159
|
}
|
|
5160
5160
|
const ScreenTitleContext = createContext({
|
|
5161
5161
|
title: void 0,
|
|
5162
|
+
trailing: "default",
|
|
5162
5163
|
claim: () => () => {
|
|
5163
5164
|
}
|
|
5164
5165
|
});
|
|
5165
5166
|
const SuppressedContext = createContext(false);
|
|
5166
5167
|
function ScreenTitleProvider({ children }) {
|
|
5167
5168
|
const [title2, setTitle] = useState(void 0);
|
|
5169
|
+
const [trailing, setTrailing] = useState("default");
|
|
5168
5170
|
const held = useRef(void 0);
|
|
5169
|
-
const claim = useCallback((next) => {
|
|
5171
|
+
const claim = useCallback((next, nextTrailing) => {
|
|
5170
5172
|
held.current = next;
|
|
5171
5173
|
setTitle(next);
|
|
5174
|
+
setTrailing(nextTrailing);
|
|
5172
5175
|
return () => {
|
|
5173
5176
|
if (held.current !== next) return;
|
|
5174
5177
|
held.current = void 0;
|
|
5175
5178
|
setTitle(void 0);
|
|
5179
|
+
setTrailing("default");
|
|
5176
5180
|
};
|
|
5177
5181
|
}, []);
|
|
5178
5182
|
const value2 = useMemo(() => ({
|
|
5179
5183
|
title: title2,
|
|
5184
|
+
trailing,
|
|
5180
5185
|
claim
|
|
5181
|
-
}), [title2, claim]);
|
|
5186
|
+
}), [title2, trailing, claim]);
|
|
5182
5187
|
return jsx(ScreenTitleContext.Provider, {
|
|
5183
5188
|
value: value2,
|
|
5184
5189
|
children
|
|
@@ -5187,13 +5192,16 @@ function ScreenTitleProvider({ children }) {
|
|
|
5187
5192
|
function useScreenTitle() {
|
|
5188
5193
|
return useContext(ScreenTitleContext).title;
|
|
5189
5194
|
}
|
|
5190
|
-
function
|
|
5195
|
+
function useScreenTrailing() {
|
|
5196
|
+
return useContext(ScreenTitleContext).trailing;
|
|
5197
|
+
}
|
|
5198
|
+
function useSetScreenTitle(title2, trailing = "default") {
|
|
5191
5199
|
const { claim } = useContext(ScreenTitleContext);
|
|
5192
5200
|
const suppressed = useContext(SuppressedContext);
|
|
5193
5201
|
useEffect(() => {
|
|
5194
5202
|
if (suppressed || title2 === void 0) return;
|
|
5195
|
-
return claim(title2);
|
|
5196
|
-
}, [claim, title2, suppressed]);
|
|
5203
|
+
return claim(title2, trailing);
|
|
5204
|
+
}, [claim, title2, trailing, suppressed]);
|
|
5197
5205
|
}
|
|
5198
5206
|
function NoScreenTitle({ children }) {
|
|
5199
5207
|
return jsx(SuppressedContext.Provider, {
|
|
@@ -5473,13 +5481,16 @@ const styles$O = {
|
|
|
5473
5481
|
fill
|
|
5474
5482
|
};
|
|
5475
5483
|
const SETTLE_MS$1 = 150;
|
|
5476
|
-
function
|
|
5477
|
-
let top2 = el.getBoundingClientRect().top;
|
|
5484
|
+
function scrolledOffOrigin(el) {
|
|
5478
5485
|
for (let node = el.parentElement; node; node = node.parentElement) {
|
|
5479
|
-
|
|
5486
|
+
if (node.scrollTop > 0) return true;
|
|
5480
5487
|
if (getComputedStyle(node).position === "fixed") break;
|
|
5481
5488
|
}
|
|
5482
|
-
|
|
5489
|
+
return false;
|
|
5490
|
+
}
|
|
5491
|
+
function offsetFromViewportTop(el) {
|
|
5492
|
+
if (scrolledOffOrigin(el)) return null;
|
|
5493
|
+
const offset = Math.max(0, Math.round(el.getBoundingClientRect().top));
|
|
5483
5494
|
return offset >= window.innerHeight ? 0 : offset;
|
|
5484
5495
|
}
|
|
5485
5496
|
function useTopOffset(ref, property, enabled = true) {
|
|
@@ -5488,7 +5499,8 @@ function useTopOffset(ref, property, enabled = true) {
|
|
|
5488
5499
|
if (!el || !enabled) return;
|
|
5489
5500
|
let timer2;
|
|
5490
5501
|
const measure = () => {
|
|
5491
|
-
|
|
5502
|
+
const offset = offsetFromViewportTop(el);
|
|
5503
|
+
if (offset !== null) el.style.setProperty(property, `${offset}px`);
|
|
5492
5504
|
};
|
|
5493
5505
|
const settle = () => {
|
|
5494
5506
|
if (timer2) clearTimeout(timer2);
|
|
@@ -7383,6 +7395,7 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
|
|
|
7383
7395
|
const [order, setOrder] = useState(null);
|
|
7384
7396
|
const [ret, setRet] = useState(null);
|
|
7385
7397
|
const [state, setState] = useState("loading");
|
|
7398
|
+
const [justFiled, setJustFiled] = useState(false);
|
|
7386
7399
|
const [errorCode, setErrorCode] = useState(void 0);
|
|
7387
7400
|
const [busy, setBusy] = useState(false);
|
|
7388
7401
|
const load = useCallback(async () => {
|
|
@@ -7410,6 +7423,7 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
|
|
|
7410
7423
|
items: items2
|
|
7411
7424
|
});
|
|
7412
7425
|
setRet(created);
|
|
7426
|
+
setJustFiled(true);
|
|
7413
7427
|
emit({
|
|
7414
7428
|
type: "return_requested",
|
|
7415
7429
|
orderRef,
|
|
@@ -7442,11 +7456,12 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
|
|
|
7442
7456
|
});
|
|
7443
7457
|
}
|
|
7444
7458
|
if (ret) {
|
|
7445
|
-
return ret.status === "reported" ? jsx(ReturnLabelView, {
|
|
7459
|
+
return justFiled && ret.status === "reported" ? jsx(ReturnLabelView, {
|
|
7446
7460
|
ret,
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7461
|
+
onDone: () => {
|
|
7462
|
+
setJustFiled(false);
|
|
7463
|
+
onDone?.();
|
|
7464
|
+
}
|
|
7450
7465
|
}) : jsx(ReturnTrackingView, {
|
|
7451
7466
|
ret,
|
|
7452
7467
|
...locale ? {
|
|
@@ -7561,7 +7576,10 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onC
|
|
|
7561
7576
|
const [cancelOpen, setCancelOpen] = useState(false);
|
|
7562
7577
|
const [cancelling, setCancelling] = useState(false);
|
|
7563
7578
|
const [cancelError, setCancelError] = useState(null);
|
|
7579
|
+
const [reordering, setReordering] = useState(false);
|
|
7564
7580
|
const emit = useShopEvent();
|
|
7581
|
+
const navigate = useNavigate();
|
|
7582
|
+
const toast2 = useToast();
|
|
7565
7583
|
const load = useCallback(async () => {
|
|
7566
7584
|
setState("loading");
|
|
7567
7585
|
try {
|
|
@@ -7622,6 +7640,37 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onC
|
|
|
7622
7640
|
setCancelling(false);
|
|
7623
7641
|
}
|
|
7624
7642
|
}
|
|
7643
|
+
async function reorder(current2) {
|
|
7644
|
+
emit({
|
|
7645
|
+
type: "reorder_requested",
|
|
7646
|
+
orderRef: current2.order_ref
|
|
7647
|
+
});
|
|
7648
|
+
if (onReorder) {
|
|
7649
|
+
onReorder();
|
|
7650
|
+
return;
|
|
7651
|
+
}
|
|
7652
|
+
setReordering(true);
|
|
7653
|
+
try {
|
|
7654
|
+
let added = 0;
|
|
7655
|
+
for (const line2 of current2.items) {
|
|
7656
|
+
try {
|
|
7657
|
+
await api.cart.addItem({
|
|
7658
|
+
sku: line2.sku,
|
|
7659
|
+
qty: line2.qty
|
|
7660
|
+
});
|
|
7661
|
+
added += 1;
|
|
7662
|
+
} catch {
|
|
7663
|
+
}
|
|
7664
|
+
}
|
|
7665
|
+
if (added === 0) {
|
|
7666
|
+
toast2.show("These items are no longer available", "critical");
|
|
7667
|
+
return;
|
|
7668
|
+
}
|
|
7669
|
+
navigate?.("/cart");
|
|
7670
|
+
} finally {
|
|
7671
|
+
setReordering(false);
|
|
7672
|
+
}
|
|
7673
|
+
}
|
|
7625
7674
|
if (order.status === "cancelled") {
|
|
7626
7675
|
return jsxs("div", {
|
|
7627
7676
|
className: styles$y.page,
|
|
@@ -7634,16 +7683,11 @@ function OrderTrackingContent({ orderRef, locale: localeProp, onStartReturn, onC
|
|
|
7634
7683
|
className: styles$y.cancelledMeta,
|
|
7635
7684
|
children: `Order #${shortRef$1(order.order_ref)} · Placed ${placedOn(order.placed_at, locale)}`
|
|
7636
7685
|
})]
|
|
7637
|
-
}),
|
|
7686
|
+
}), jsx(Button, {
|
|
7638
7687
|
variant: "primary",
|
|
7639
7688
|
fullWidth: true,
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
type: "reorder_requested",
|
|
7643
|
-
orderRef: order.order_ref
|
|
7644
|
-
});
|
|
7645
|
-
onReorder();
|
|
7646
|
-
},
|
|
7689
|
+
loading: reordering,
|
|
7690
|
+
onClick: () => void reorder(order),
|
|
7647
7691
|
children: "Reorder"
|
|
7648
7692
|
}), jsx(OrderLines, {
|
|
7649
7693
|
order
|
|
@@ -8965,11 +9009,11 @@ function ShippingInfo() {
|
|
|
8965
9009
|
})]
|
|
8966
9010
|
});
|
|
8967
9011
|
}
|
|
8968
|
-
const bar = "
|
|
8969
|
-
const floating$1 = "
|
|
8970
|
-
const divider = "
|
|
8971
|
-
const info$1 = "
|
|
8972
|
-
const actions = "
|
|
9012
|
+
const bar = "_bar_v5jjj_1";
|
|
9013
|
+
const floating$1 = "_floating_v5jjj_52";
|
|
9014
|
+
const divider = "_divider_v5jjj_58";
|
|
9015
|
+
const info$1 = "_info_v5jjj_62";
|
|
9016
|
+
const actions = "_actions_v5jjj_70";
|
|
8973
9017
|
const styles$k = {
|
|
8974
9018
|
bar,
|
|
8975
9019
|
floating: floating$1,
|
|
@@ -9009,7 +9053,7 @@ const styles$j = {
|
|
|
9009
9053
|
};
|
|
9010
9054
|
function CartView(props = {}) {
|
|
9011
9055
|
const t = useT();
|
|
9012
|
-
useSetScreenTitle(t("Cart"));
|
|
9056
|
+
useSetScreenTitle(t("Cart"), "none");
|
|
9013
9057
|
return jsx(ShopSurface, {
|
|
9014
9058
|
tone: "light",
|
|
9015
9059
|
fill: true,
|
|
@@ -10718,24 +10762,24 @@ function ProductView({ sku, initialData, showRecommendations = true, onNotFound
|
|
|
10718
10762
|
}
|
|
10719
10763
|
return unavailable;
|
|
10720
10764
|
}
|
|
10721
|
-
const showcase = "
|
|
10722
|
-
const panel = "
|
|
10723
|
-
const image = "
|
|
10724
|
-
const hero = "
|
|
10725
|
-
const heroContent = "
|
|
10726
|
-
const heroText = "
|
|
10727
|
-
const logo = "
|
|
10728
|
-
const heroTitle = "
|
|
10729
|
-
const heroSub = "
|
|
10730
|
-
const swipe = "
|
|
10731
|
-
const swipeLabel = "
|
|
10732
|
-
const chevron$1 = "
|
|
10733
|
-
const overlay$1 = "
|
|
10734
|
-
const copy = "
|
|
10735
|
-
const title$2 = "
|
|
10736
|
-
const subtitle$1 = "
|
|
10737
|
-
const cta = "
|
|
10738
|
-
const mosaic = "
|
|
10765
|
+
const showcase = "_showcase_1qnt2_44";
|
|
10766
|
+
const panel = "_panel_1qnt2_48";
|
|
10767
|
+
const image = "_image_1qnt2_76";
|
|
10768
|
+
const hero = "_hero_1qnt2_116";
|
|
10769
|
+
const heroContent = "_heroContent_1qnt2_197";
|
|
10770
|
+
const heroText = "_heroText_1qnt2_221";
|
|
10771
|
+
const logo = "_logo_1qnt2_230";
|
|
10772
|
+
const heroTitle = "_heroTitle_1qnt2_250";
|
|
10773
|
+
const heroSub = "_heroSub_1qnt2_274";
|
|
10774
|
+
const swipe = "_swipe_1qnt2_293";
|
|
10775
|
+
const swipeLabel = "_swipeLabel_1qnt2_300";
|
|
10776
|
+
const chevron$1 = "_chevron_1qnt2_306";
|
|
10777
|
+
const overlay$1 = "_overlay_1qnt2_11";
|
|
10778
|
+
const copy = "_copy_1qnt2_341";
|
|
10779
|
+
const title$2 = "_title_1qnt2_346";
|
|
10780
|
+
const subtitle$1 = "_subtitle_1qnt2_353";
|
|
10781
|
+
const cta = "_cta_1qnt2_359";
|
|
10782
|
+
const mosaic = "_mosaic_1qnt2_403";
|
|
10739
10783
|
const styles$2 = {
|
|
10740
10784
|
showcase,
|
|
10741
10785
|
panel,
|
|
@@ -11185,12 +11229,15 @@ function CheckoutBar({ title: title2, onClose, closeLabel, className }) {
|
|
|
11185
11229
|
})]
|
|
11186
11230
|
});
|
|
11187
11231
|
}
|
|
11188
|
-
function ShopBar({ onBack, onMenu, title: title2, showCart
|
|
11232
|
+
function ShopBar({ onBack, onMenu, title: title2, showCart, floating: floating2 = false, scrolled: scrolled2, backLabel, menuLabel, className }) {
|
|
11189
11233
|
const t = useT();
|
|
11190
11234
|
const cartCount = useCartCount();
|
|
11191
11235
|
const screenTitle = useScreenTitle();
|
|
11192
11236
|
const shownTitle = title2 ?? screenTitle;
|
|
11193
|
-
const
|
|
11237
|
+
const bare = useScreenTrailing() === "none";
|
|
11238
|
+
const cartOn = showCart ?? !bare;
|
|
11239
|
+
const menu = bare ? void 0 : onMenu;
|
|
11240
|
+
const hasTrailing = cartOn || Boolean(menu);
|
|
11194
11241
|
const atTop = useScrolledUnder(floating2 && scrolled2 === void 0);
|
|
11195
11242
|
const isScrolled = scrolled2 ?? atTop;
|
|
11196
11243
|
const cartLabel = cartCount === null ? t("Cart") : cartCount === 0 ? t("Cart, empty") : t("Cart, {0} item{1}", cartCount, cartCount === 1 ? "" : "s");
|
|
@@ -11211,7 +11258,7 @@ function ShopBar({ onBack, onMenu, title: title2, showCart = true, floating: flo
|
|
|
11211
11258
|
children: shownTitle
|
|
11212
11259
|
}) : null, jsxs("div", {
|
|
11213
11260
|
className: styles$1.right,
|
|
11214
|
-
children: [
|
|
11261
|
+
children: [cartOn ? jsxs(CartTrigger, {
|
|
11215
11262
|
className: styles$1.iconBtn,
|
|
11216
11263
|
"aria-label": cartLabel,
|
|
11217
11264
|
children: [jsx(CartIcon, {}), cartCount !== null && cartCount > 0 ? jsx("span", {
|
|
@@ -11219,11 +11266,11 @@ function ShopBar({ onBack, onMenu, title: title2, showCart = true, floating: flo
|
|
|
11219
11266
|
"aria-hidden": "true",
|
|
11220
11267
|
children: cartCount > 99 ? "99+" : cartCount
|
|
11221
11268
|
}) : null]
|
|
11222
|
-
}) : null,
|
|
11269
|
+
}) : null, menu ? jsx("button", {
|
|
11223
11270
|
type: "button",
|
|
11224
11271
|
className: `${styles$1.iconBtn} ${styles$1.menuBtn}`,
|
|
11225
11272
|
"aria-label": menuLabel ?? t("More options"),
|
|
11226
|
-
onClick:
|
|
11273
|
+
onClick: menu,
|
|
11227
11274
|
children: jsx(MenuIcon, {})
|
|
11228
11275
|
}) : null]
|
|
11229
11276
|
})]
|
|
@@ -11514,4 +11561,4 @@ export {
|
|
|
11514
11561
|
useToast,
|
|
11515
11562
|
variantLabel
|
|
11516
11563
|
};
|
|
11517
|
-
|
|
11564
|
+
//# sourceMappingURL=storefront.mjs.map
|
|
@@ -2340,9 +2340,10 @@
|
|
|
2340
2340
|
height: 1px;
|
|
2341
2341
|
background: var(--color-border-default);
|
|
2342
2342
|
}
|
|
2343
|
-
.
|
|
2343
|
+
._bar_v5jjj_1 {
|
|
2344
2344
|
position: sticky;
|
|
2345
2345
|
bottom: 0;
|
|
2346
|
+
bottom: calc(100lvh - 100dvh);
|
|
2346
2347
|
left: 0;
|
|
2347
2348
|
right: 0;
|
|
2348
2349
|
display: flex;
|
|
@@ -2352,24 +2353,24 @@
|
|
|
2352
2353
|
background: var(--color-surface-default);
|
|
2353
2354
|
z-index: 50;
|
|
2354
2355
|
}
|
|
2355
|
-
.
|
|
2356
|
+
._floating_v5jjj_52 {
|
|
2356
2357
|
border-radius: var(--radius-12) var(--radius-12) 0 0;
|
|
2357
2358
|
filter: drop-shadow(0 -4px 12px rgba(206, 206, 206, 0.48));
|
|
2358
2359
|
}
|
|
2359
|
-
.
|
|
2360
|
+
._divider_v5jjj_58 {
|
|
2360
2361
|
border-top: 1px solid var(--color-border-default);
|
|
2361
2362
|
}
|
|
2362
|
-
.
|
|
2363
|
+
._info_v5jjj_62 {
|
|
2363
2364
|
display: flex;
|
|
2364
2365
|
align-items: center;
|
|
2365
2366
|
justify-content: space-between;
|
|
2366
2367
|
font-weight: var(--font-weight-bold);
|
|
2367
2368
|
}
|
|
2368
|
-
.
|
|
2369
|
+
._actions_v5jjj_70 {
|
|
2369
2370
|
display: flex;
|
|
2370
2371
|
gap: var(--space-8);
|
|
2371
2372
|
}
|
|
2372
|
-
.
|
|
2373
|
+
._actions_v5jjj_70 > * {
|
|
2373
2374
|
flex: 1 1 0;
|
|
2374
2375
|
}
|
|
2375
2376
|
._surface_nkc99_15 {
|
|
@@ -3435,10 +3436,10 @@
|
|
|
3435
3436
|
column-gap: var(--space-12);
|
|
3436
3437
|
row-gap: var(--space-24);
|
|
3437
3438
|
}
|
|
3438
|
-
.
|
|
3439
|
+
._showcase_1qnt2_44 {
|
|
3439
3440
|
background: #080e12;
|
|
3440
3441
|
}
|
|
3441
|
-
.
|
|
3442
|
+
._panel_1qnt2_48 {
|
|
3442
3443
|
position: relative;
|
|
3443
3444
|
height: calc(100lvh - var(--showcase-top, 0px));
|
|
3444
3445
|
scroll-snap-align: start;
|
|
@@ -3446,11 +3447,11 @@
|
|
|
3446
3447
|
overflow: hidden;
|
|
3447
3448
|
background: #080e12;
|
|
3448
3449
|
}
|
|
3449
|
-
.
|
|
3450
|
+
._image_1qnt2_76 {
|
|
3450
3451
|
object-fit: cover;
|
|
3451
3452
|
object-position: 50% var(--slide-focal-y, 50%);
|
|
3452
3453
|
}
|
|
3453
|
-
.
|
|
3454
|
+
._hero_1qnt2_116::after {
|
|
3454
3455
|
content: "";
|
|
3455
3456
|
position: absolute;
|
|
3456
3457
|
inset: 0;
|
|
@@ -3465,9 +3466,10 @@
|
|
|
3465
3466
|
rgba(8, 14, 18, 0) 520px);
|
|
3466
3467
|
pointer-events: none;
|
|
3467
3468
|
}
|
|
3468
|
-
.
|
|
3469
|
+
._hero_1qnt2_116 ._heroContent_1qnt2_197 {
|
|
3469
3470
|
position: absolute;
|
|
3470
3471
|
bottom: 32px;
|
|
3472
|
+
bottom: calc(32px + 100lvh - 100dvh);
|
|
3471
3473
|
left: 0;
|
|
3472
3474
|
right: 0;
|
|
3473
3475
|
z-index: 1;
|
|
@@ -3476,7 +3478,7 @@
|
|
|
3476
3478
|
gap: 24px;
|
|
3477
3479
|
align-items: stretch;
|
|
3478
3480
|
}
|
|
3479
|
-
.
|
|
3481
|
+
._heroText_1qnt2_221 {
|
|
3480
3482
|
display: flex;
|
|
3481
3483
|
flex-direction: column;
|
|
3482
3484
|
gap: 8px;
|
|
@@ -3484,11 +3486,11 @@
|
|
|
3484
3486
|
padding: 0 24px;
|
|
3485
3487
|
text-align: center;
|
|
3486
3488
|
}
|
|
3487
|
-
.
|
|
3489
|
+
._heroText_1qnt2_221 ._logo_1qnt2_230 {
|
|
3488
3490
|
width: 48px;
|
|
3489
3491
|
height: 48px;
|
|
3490
3492
|
}
|
|
3491
|
-
.
|
|
3493
|
+
._heroTitle_1qnt2_250 {
|
|
3492
3494
|
width: 100%;
|
|
3493
3495
|
margin: 0;
|
|
3494
3496
|
font-family:
|
|
@@ -3503,33 +3505,33 @@
|
|
|
3503
3505
|
letter-spacing: -1.12px;
|
|
3504
3506
|
color: #f9fafa;
|
|
3505
3507
|
}
|
|
3506
|
-
.
|
|
3508
|
+
._heroSub_1qnt2_274 {
|
|
3507
3509
|
margin: 0;
|
|
3508
3510
|
font-size: 16px;
|
|
3509
3511
|
line-height: 1.55;
|
|
3510
3512
|
color: #f9fafa;
|
|
3511
3513
|
max-width: 327px;
|
|
3512
3514
|
}
|
|
3513
|
-
.
|
|
3515
|
+
._swipe_1qnt2_293 {
|
|
3514
3516
|
display: flex;
|
|
3515
3517
|
flex-direction: column;
|
|
3516
3518
|
align-items: center;
|
|
3517
3519
|
gap: 6px;
|
|
3518
3520
|
padding: 8px 0;
|
|
3519
3521
|
}
|
|
3520
|
-
.
|
|
3522
|
+
._swipeLabel_1qnt2_300 {
|
|
3521
3523
|
margin: 0;
|
|
3522
3524
|
font-size: 14px;
|
|
3523
3525
|
line-height: 1;
|
|
3524
3526
|
color: rgba(255, 255, 255, 0.54);
|
|
3525
3527
|
}
|
|
3526
|
-
.
|
|
3528
|
+
._chevron_1qnt2_306 {
|
|
3527
3529
|
width: 24px;
|
|
3528
3530
|
height: 24px;
|
|
3529
3531
|
color: rgba(255, 255, 255, 0.54);
|
|
3530
|
-
animation:
|
|
3532
|
+
animation: _bob_1qnt2_1 1.8s ease-in-out infinite;
|
|
3531
3533
|
}
|
|
3532
|
-
@keyframes
|
|
3534
|
+
@keyframes _bob_1qnt2_1 {
|
|
3533
3535
|
0%, 100% {
|
|
3534
3536
|
transform: translateY(0);
|
|
3535
3537
|
}
|
|
@@ -3537,7 +3539,7 @@
|
|
|
3537
3539
|
transform: translateY(4px);
|
|
3538
3540
|
}
|
|
3539
3541
|
}
|
|
3540
|
-
.
|
|
3542
|
+
._overlay_1qnt2_11 {
|
|
3541
3543
|
position: absolute;
|
|
3542
3544
|
inset: 0;
|
|
3543
3545
|
z-index: 1;
|
|
@@ -3552,26 +3554,27 @@
|
|
|
3552
3554
|
gap: 16px;
|
|
3553
3555
|
align-items: flex-start;
|
|
3554
3556
|
padding: 0 24px 24px;
|
|
3557
|
+
padding-bottom: calc(24px + 100lvh - 100dvh);
|
|
3555
3558
|
}
|
|
3556
|
-
.
|
|
3559
|
+
._copy_1qnt2_341 {
|
|
3557
3560
|
display: flex;
|
|
3558
3561
|
flex-direction: column;
|
|
3559
3562
|
gap: 8px;
|
|
3560
3563
|
}
|
|
3561
|
-
.
|
|
3564
|
+
._title_1qnt2_346 {
|
|
3562
3565
|
margin: 0;
|
|
3563
3566
|
font-size: 32px;
|
|
3564
3567
|
line-height: 1.2;
|
|
3565
3568
|
font-weight: 700;
|
|
3566
3569
|
color: #f9fafa;
|
|
3567
3570
|
}
|
|
3568
|
-
.
|
|
3571
|
+
._subtitle_1qnt2_353 {
|
|
3569
3572
|
margin: 0;
|
|
3570
3573
|
font-size: 16px;
|
|
3571
3574
|
line-height: 1.55;
|
|
3572
3575
|
color: #f9fafa;
|
|
3573
3576
|
}
|
|
3574
|
-
.
|
|
3577
|
+
._cta_1qnt2_359 {
|
|
3575
3578
|
display: inline-flex;
|
|
3576
3579
|
align-items: center;
|
|
3577
3580
|
justify-content: center;
|
|
@@ -3585,19 +3588,19 @@
|
|
|
3585
3588
|
font-weight: 700;
|
|
3586
3589
|
text-decoration: none;
|
|
3587
3590
|
}
|
|
3588
|
-
.
|
|
3591
|
+
._cta_1qnt2_359::after {
|
|
3589
3592
|
content: "";
|
|
3590
3593
|
position: absolute;
|
|
3591
3594
|
inset: 0;
|
|
3592
3595
|
}
|
|
3593
|
-
.
|
|
3596
|
+
._cta_1qnt2_359:active {
|
|
3594
3597
|
background: rgba(249, 250, 250, 0.12);
|
|
3595
3598
|
}
|
|
3596
|
-
.
|
|
3599
|
+
._cta_1qnt2_359:focus-visible {
|
|
3597
3600
|
outline: none;
|
|
3598
3601
|
box-shadow: var(--focus-ring);
|
|
3599
3602
|
}
|
|
3600
|
-
.
|
|
3603
|
+
._mosaic_1qnt2_403 {
|
|
3601
3604
|
background: #080e12;
|
|
3602
3605
|
}
|
|
3603
3606
|
._header_8o3d7_25 {
|
package/dist/styles.css
CHANGED
|
@@ -2340,9 +2340,10 @@
|
|
|
2340
2340
|
height: 1px;
|
|
2341
2341
|
background: var(--color-border-default);
|
|
2342
2342
|
}
|
|
2343
|
-
.
|
|
2343
|
+
._bar_v5jjj_1 {
|
|
2344
2344
|
position: sticky;
|
|
2345
2345
|
bottom: 0;
|
|
2346
|
+
bottom: calc(100lvh - 100dvh);
|
|
2346
2347
|
left: 0;
|
|
2347
2348
|
right: 0;
|
|
2348
2349
|
display: flex;
|
|
@@ -2352,24 +2353,24 @@
|
|
|
2352
2353
|
background: var(--color-surface-default);
|
|
2353
2354
|
z-index: 50;
|
|
2354
2355
|
}
|
|
2355
|
-
.
|
|
2356
|
+
._floating_v5jjj_52 {
|
|
2356
2357
|
border-radius: var(--radius-12) var(--radius-12) 0 0;
|
|
2357
2358
|
filter: drop-shadow(0 -4px 12px rgba(206, 206, 206, 0.48));
|
|
2358
2359
|
}
|
|
2359
|
-
.
|
|
2360
|
+
._divider_v5jjj_58 {
|
|
2360
2361
|
border-top: 1px solid var(--color-border-default);
|
|
2361
2362
|
}
|
|
2362
|
-
.
|
|
2363
|
+
._info_v5jjj_62 {
|
|
2363
2364
|
display: flex;
|
|
2364
2365
|
align-items: center;
|
|
2365
2366
|
justify-content: space-between;
|
|
2366
2367
|
font-weight: var(--font-weight-bold);
|
|
2367
2368
|
}
|
|
2368
|
-
.
|
|
2369
|
+
._actions_v5jjj_70 {
|
|
2369
2370
|
display: flex;
|
|
2370
2371
|
gap: var(--space-8);
|
|
2371
2372
|
}
|
|
2372
|
-
.
|
|
2373
|
+
._actions_v5jjj_70 > * {
|
|
2373
2374
|
flex: 1 1 0;
|
|
2374
2375
|
}
|
|
2375
2376
|
._surface_nkc99_15 {
|
|
@@ -3435,10 +3436,10 @@
|
|
|
3435
3436
|
column-gap: var(--space-12);
|
|
3436
3437
|
row-gap: var(--space-24);
|
|
3437
3438
|
}
|
|
3438
|
-
.
|
|
3439
|
+
._showcase_1qnt2_44 {
|
|
3439
3440
|
background: #080e12;
|
|
3440
3441
|
}
|
|
3441
|
-
.
|
|
3442
|
+
._panel_1qnt2_48 {
|
|
3442
3443
|
position: relative;
|
|
3443
3444
|
height: calc(100lvh - var(--showcase-top, 0px));
|
|
3444
3445
|
scroll-snap-align: start;
|
|
@@ -3446,11 +3447,11 @@
|
|
|
3446
3447
|
overflow: hidden;
|
|
3447
3448
|
background: #080e12;
|
|
3448
3449
|
}
|
|
3449
|
-
.
|
|
3450
|
+
._image_1qnt2_76 {
|
|
3450
3451
|
object-fit: cover;
|
|
3451
3452
|
object-position: 50% var(--slide-focal-y, 50%);
|
|
3452
3453
|
}
|
|
3453
|
-
.
|
|
3454
|
+
._hero_1qnt2_116::after {
|
|
3454
3455
|
content: "";
|
|
3455
3456
|
position: absolute;
|
|
3456
3457
|
inset: 0;
|
|
@@ -3465,9 +3466,10 @@
|
|
|
3465
3466
|
rgba(8, 14, 18, 0) 520px);
|
|
3466
3467
|
pointer-events: none;
|
|
3467
3468
|
}
|
|
3468
|
-
.
|
|
3469
|
+
._hero_1qnt2_116 ._heroContent_1qnt2_197 {
|
|
3469
3470
|
position: absolute;
|
|
3470
3471
|
bottom: 32px;
|
|
3472
|
+
bottom: calc(32px + 100lvh - 100dvh);
|
|
3471
3473
|
left: 0;
|
|
3472
3474
|
right: 0;
|
|
3473
3475
|
z-index: 1;
|
|
@@ -3476,7 +3478,7 @@
|
|
|
3476
3478
|
gap: 24px;
|
|
3477
3479
|
align-items: stretch;
|
|
3478
3480
|
}
|
|
3479
|
-
.
|
|
3481
|
+
._heroText_1qnt2_221 {
|
|
3480
3482
|
display: flex;
|
|
3481
3483
|
flex-direction: column;
|
|
3482
3484
|
gap: 8px;
|
|
@@ -3484,11 +3486,11 @@
|
|
|
3484
3486
|
padding: 0 24px;
|
|
3485
3487
|
text-align: center;
|
|
3486
3488
|
}
|
|
3487
|
-
.
|
|
3489
|
+
._heroText_1qnt2_221 ._logo_1qnt2_230 {
|
|
3488
3490
|
width: 48px;
|
|
3489
3491
|
height: 48px;
|
|
3490
3492
|
}
|
|
3491
|
-
.
|
|
3493
|
+
._heroTitle_1qnt2_250 {
|
|
3492
3494
|
width: 100%;
|
|
3493
3495
|
margin: 0;
|
|
3494
3496
|
font-family:
|
|
@@ -3503,33 +3505,33 @@
|
|
|
3503
3505
|
letter-spacing: -1.12px;
|
|
3504
3506
|
color: #f9fafa;
|
|
3505
3507
|
}
|
|
3506
|
-
.
|
|
3508
|
+
._heroSub_1qnt2_274 {
|
|
3507
3509
|
margin: 0;
|
|
3508
3510
|
font-size: 16px;
|
|
3509
3511
|
line-height: 1.55;
|
|
3510
3512
|
color: #f9fafa;
|
|
3511
3513
|
max-width: 327px;
|
|
3512
3514
|
}
|
|
3513
|
-
.
|
|
3515
|
+
._swipe_1qnt2_293 {
|
|
3514
3516
|
display: flex;
|
|
3515
3517
|
flex-direction: column;
|
|
3516
3518
|
align-items: center;
|
|
3517
3519
|
gap: 6px;
|
|
3518
3520
|
padding: 8px 0;
|
|
3519
3521
|
}
|
|
3520
|
-
.
|
|
3522
|
+
._swipeLabel_1qnt2_300 {
|
|
3521
3523
|
margin: 0;
|
|
3522
3524
|
font-size: 14px;
|
|
3523
3525
|
line-height: 1;
|
|
3524
3526
|
color: rgba(255, 255, 255, 0.54);
|
|
3525
3527
|
}
|
|
3526
|
-
.
|
|
3528
|
+
._chevron_1qnt2_306 {
|
|
3527
3529
|
width: 24px;
|
|
3528
3530
|
height: 24px;
|
|
3529
3531
|
color: rgba(255, 255, 255, 0.54);
|
|
3530
|
-
animation:
|
|
3532
|
+
animation: _bob_1qnt2_1 1.8s ease-in-out infinite;
|
|
3531
3533
|
}
|
|
3532
|
-
@keyframes
|
|
3534
|
+
@keyframes _bob_1qnt2_1 {
|
|
3533
3535
|
0%, 100% {
|
|
3534
3536
|
transform: translateY(0);
|
|
3535
3537
|
}
|
|
@@ -3537,7 +3539,7 @@
|
|
|
3537
3539
|
transform: translateY(4px);
|
|
3538
3540
|
}
|
|
3539
3541
|
}
|
|
3540
|
-
.
|
|
3542
|
+
._overlay_1qnt2_11 {
|
|
3541
3543
|
position: absolute;
|
|
3542
3544
|
inset: 0;
|
|
3543
3545
|
z-index: 1;
|
|
@@ -3552,26 +3554,27 @@
|
|
|
3552
3554
|
gap: 16px;
|
|
3553
3555
|
align-items: flex-start;
|
|
3554
3556
|
padding: 0 24px 24px;
|
|
3557
|
+
padding-bottom: calc(24px + 100lvh - 100dvh);
|
|
3555
3558
|
}
|
|
3556
|
-
.
|
|
3559
|
+
._copy_1qnt2_341 {
|
|
3557
3560
|
display: flex;
|
|
3558
3561
|
flex-direction: column;
|
|
3559
3562
|
gap: 8px;
|
|
3560
3563
|
}
|
|
3561
|
-
.
|
|
3564
|
+
._title_1qnt2_346 {
|
|
3562
3565
|
margin: 0;
|
|
3563
3566
|
font-size: 32px;
|
|
3564
3567
|
line-height: 1.2;
|
|
3565
3568
|
font-weight: 700;
|
|
3566
3569
|
color: #f9fafa;
|
|
3567
3570
|
}
|
|
3568
|
-
.
|
|
3571
|
+
._subtitle_1qnt2_353 {
|
|
3569
3572
|
margin: 0;
|
|
3570
3573
|
font-size: 16px;
|
|
3571
3574
|
line-height: 1.55;
|
|
3572
3575
|
color: #f9fafa;
|
|
3573
3576
|
}
|
|
3574
|
-
.
|
|
3577
|
+
._cta_1qnt2_359 {
|
|
3575
3578
|
display: inline-flex;
|
|
3576
3579
|
align-items: center;
|
|
3577
3580
|
justify-content: center;
|
|
@@ -3585,19 +3588,19 @@
|
|
|
3585
3588
|
font-weight: 700;
|
|
3586
3589
|
text-decoration: none;
|
|
3587
3590
|
}
|
|
3588
|
-
.
|
|
3591
|
+
._cta_1qnt2_359::after {
|
|
3589
3592
|
content: "";
|
|
3590
3593
|
position: absolute;
|
|
3591
3594
|
inset: 0;
|
|
3592
3595
|
}
|
|
3593
|
-
.
|
|
3596
|
+
._cta_1qnt2_359:active {
|
|
3594
3597
|
background: rgba(249, 250, 250, 0.12);
|
|
3595
3598
|
}
|
|
3596
|
-
.
|
|
3599
|
+
._cta_1qnt2_359:focus-visible {
|
|
3597
3600
|
outline: none;
|
|
3598
3601
|
box-shadow: var(--focus-ring);
|
|
3599
3602
|
}
|
|
3600
|
-
.
|
|
3603
|
+
._mosaic_1qnt2_403 {
|
|
3601
3604
|
background: #080e12;
|
|
3602
3605
|
}
|
|
3603
3606
|
._header_8o3d7_25 {
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nok-integration/storefront-react",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.23",
|
|
4
4
|
"description": "Mountable React storefront components: catalogue, product detail and cart, mounted directly into a host DOM tree. No iframe.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public",
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
6
10
|
"type": "module",
|
|
7
11
|
"main": "./dist/index.mjs",
|
|
8
|
-
"module": "./dist/index.mjs",
|
|
9
12
|
"types": "./dist/index.d.ts",
|
|
10
13
|
"exports": {
|
|
11
14
|
".": {
|
|
@@ -20,18 +23,34 @@
|
|
|
20
23
|
"dist",
|
|
21
24
|
"!dist/**/*.map"
|
|
22
25
|
],
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "pnpm build:package && pnpm build:standalone",
|
|
28
|
+
"build:package": "vite build",
|
|
29
|
+
"build:standalone": "BUILD_TARGET=standalone vite build",
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"build:partner": "PARTNER_DROP=1 pnpm build && pnpm pack"
|
|
32
|
+
},
|
|
26
33
|
"peerDependencies": {
|
|
27
34
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
28
35
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
29
36
|
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@microsoft/api-extractor": "^7.58.12",
|
|
39
|
+
"@raqmix/contracts": "^2.0.0",
|
|
40
|
+
"@types/react": "^19.1.0",
|
|
41
|
+
"@types/react-dom": "^19.1.0",
|
|
42
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
43
|
+
"esbuild": "^0.28.1",
|
|
44
|
+
"terser": "^5.50.0",
|
|
45
|
+
"typescript": "^5.7.3",
|
|
46
|
+
"vite": "^7.0.0",
|
|
47
|
+
"vite-plugin-dts": "^5.0.3"
|
|
48
|
+
},
|
|
49
|
+
"module": "./dist/index.mjs",
|
|
50
|
+
"sideEffects": [
|
|
51
|
+
"*.css"
|
|
52
|
+
],
|
|
30
53
|
"dependencies": {
|
|
31
54
|
"zod": "^3.24.1"
|
|
32
|
-
},
|
|
33
|
-
"publishConfig": {
|
|
34
|
-
"access": "public",
|
|
35
|
-
"registry": "https://registry.npmjs.org/"
|
|
36
55
|
}
|
|
37
56
|
}
|