@nok-integration/storefront-react 0.19.2 → 0.19.4

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 CHANGED
@@ -3576,12 +3576,25 @@ export declare interface OrderConfirmationViewProps {
3576
3576
  /**
3577
3577
  * The frame's "Done". Omit it and no button renders.
3578
3578
  *
3579
- * **It leaves the shop entirely.** "Done" goes to the app's own home; the header's
3580
- * close control goes to the shop home. They are different destinations, and wiring both
3581
- * to the shop home removes the only way out of the shop at the end of a purchase.
3579
+ * **However you navigate, replace the current history entry rather than pushing a new
3580
+ * one.** A confirmation is a thing that happened once. Push it and the receipt stays in
3581
+ * the browser's history, where Back returns the customer to a confirmation for an order
3582
+ * they have already placed — or, read the wrong way, to an invitation to place it again.
3583
+ * `router.replace(to)`, or `location.replace(url)` for a full page load, takes this
3584
+ * screen out of the history on the way out.
3582
3585
  *
3583
- * It is a host callback because the app's home is not reachable from the `/v1` surface
3584
- * and not somewhere `navigate('/')` can go.
3586
+ * Replacement swaps the current entry; it does not delete one. Back therefore lands on
3587
+ * whatever preceded this screen, so where checkout is a page of its own, navigate INTO
3588
+ * the confirmation by replacement too. Otherwise leaving by the front door returns the
3589
+ * customer to the payment step by the back one.
3590
+ *
3591
+ * Neither call can remove an entry already behind you, so both have to happen at the
3592
+ * moment of the navigation. Nothing later can undo a push.
3593
+ *
3594
+ * The destination is yours to choose, and the header's close control is the same exit:
3595
+ * wire the two together unless they genuinely lead to different places. This is a host
3596
+ * callback because it leaves the shop, which is not reachable from the `/v1` surface and
3597
+ * not somewhere `navigate` can go.
3585
3598
  */
3586
3599
  onDone?: () => void;
3587
3600
  }
@@ -5545,7 +5558,14 @@ export declare interface ShopHeaderProps {
5545
5558
  * fetch for a badge that is not drawn.
5546
5559
  */
5547
5560
  context?: 'shop' | 'checkout';
5548
- /** The close control, in `checkout` context. Omit it and the slot stays reserved. */
5561
+ /**
5562
+ * The close control, in `checkout` context. Omit it and the slot stays reserved.
5563
+ *
5564
+ * On a confirmation this is the same exit as that screen's own "Done" button, and it
5565
+ * carries the same requirement: **replace the current history entry, do not push a new
5566
+ * one.** A pushed receipt stays in the browser's history and Back brings it back. See
5567
+ * `OrderConfirmationViewProps.onDone`.
5568
+ */
5549
5569
  onClose?: () => void;
5550
5570
  /** Accessible name for the back control, for a host that is not in English. */
5551
5571
  backLabel?: string;
package/dist/index.mjs CHANGED
@@ -8853,14 +8853,14 @@ function StickyCtaBar({ children, info: info2, variant = "floating" }) {
8853
8853
  })]
8854
8854
  });
8855
8855
  }
8856
- const surface = "_surface_1wfue_15";
8857
- const screen = "_screen_1wfue_20";
8858
- const body$3 = "_body_1wfue_12";
8859
- const items = "_items_1wfue_34";
8860
- const sectionHeader = "_sectionHeader_1wfue_40";
8861
- const sectionTitle = "_sectionTitle_1wfue_46";
8862
- const count = "_count_1wfue_53";
8863
- const lines = "_lines_1wfue_73";
8856
+ const surface = "_surface_nkc99_15";
8857
+ const screen = "_screen_nkc99_20";
8858
+ const body$3 = "_body_nkc99_12";
8859
+ const items = "_items_nkc99_34";
8860
+ const sectionHeader = "_sectionHeader_nkc99_40";
8861
+ const sectionTitle = "_sectionTitle_nkc99_46";
8862
+ const count = "_count_nkc99_67";
8863
+ const lines = "_lines_nkc99_91";
8864
8864
  const styles$j = {
8865
8865
  surface,
8866
8866
  screen,
@@ -10545,24 +10545,24 @@ function ProductView({ sku, initialData, showRecommendations = true, onNotFound
10545
10545
  }
10546
10546
  return unavailable;
10547
10547
  }
10548
- const showcase = "_showcase_1sarz_31";
10549
- const panel = "_panel_1sarz_50";
10550
- const image = "_image_1sarz_60";
10551
- const heroImageBox = "_heroImageBox_1sarz_108";
10552
- const hero = "_hero_1sarz_108";
10553
- const heroContent = "_heroContent_1sarz_179";
10554
- const heroText = "_heroText_1sarz_196";
10555
- const logo = "_logo_1sarz_205";
10556
- const heroTitle = "_heroTitle_1sarz_225";
10557
- const heroSub = "_heroSub_1sarz_249";
10558
- const swipe = "_swipe_1sarz_262";
10559
- const swipeLabel = "_swipeLabel_1sarz_270";
10560
- const chevron$1 = "_chevron_1sarz_276";
10561
- const overlay$1 = "_overlay_1sarz_293";
10562
- const copy = "_copy_1sarz_304";
10563
- const title$2 = "_title_1sarz_309";
10564
- const subtitle$1 = "_subtitle_1sarz_316";
10565
- const cta = "_cta_1sarz_322";
10548
+ const showcase = "_showcase_12z2a_40";
10549
+ const panel = "_panel_12z2a_59";
10550
+ const image = "_image_12z2a_69";
10551
+ const heroImageBox = "_heroImageBox_12z2a_117";
10552
+ const hero = "_hero_12z2a_117";
10553
+ const heroContent = "_heroContent_12z2a_188";
10554
+ const heroText = "_heroText_12z2a_205";
10555
+ const logo = "_logo_12z2a_214";
10556
+ const heroTitle = "_heroTitle_12z2a_234";
10557
+ const heroSub = "_heroSub_12z2a_258";
10558
+ const swipe = "_swipe_12z2a_271";
10559
+ const swipeLabel = "_swipeLabel_12z2a_279";
10560
+ const chevron$1 = "_chevron_12z2a_285";
10561
+ const overlay$1 = "_overlay_12z2a_302";
10562
+ const copy = "_copy_12z2a_313";
10563
+ const title$2 = "_title_12z2a_318";
10564
+ const subtitle$1 = "_subtitle_12z2a_325";
10565
+ const cta = "_cta_12z2a_331";
10566
10566
  const styles$2 = {
10567
10567
  showcase,
10568
10568
  panel,
@@ -10583,6 +10583,42 @@ const styles$2 = {
10583
10583
  subtitle: subtitle$1,
10584
10584
  cta
10585
10585
  };
10586
+ const SETTLE_MS = 250;
10587
+ function useViewportHeight(ref, property, enabled = true) {
10588
+ useEffect(() => {
10589
+ const el = ref.current;
10590
+ if (!el || !enabled) return;
10591
+ let timer2;
10592
+ const read = () => Math.round(window.visualViewport?.height ?? window.innerHeight);
10593
+ const apply = () => {
10594
+ const height = read();
10595
+ if (height > 0) el.style.setProperty(property, `${height}px`);
10596
+ };
10597
+ const applySettled = () => {
10598
+ const previous = el.clientHeight;
10599
+ const index = previous > 0 ? Math.round(el.scrollTop / previous) : 0;
10600
+ apply();
10601
+ if (el.clientHeight > 0) el.scrollTo({
10602
+ top: index * el.clientHeight,
10603
+ behavior: "auto"
10604
+ });
10605
+ };
10606
+ const schedule = () => {
10607
+ if (timer2) clearTimeout(timer2);
10608
+ timer2 = setTimeout(applySettled, SETTLE_MS);
10609
+ };
10610
+ apply();
10611
+ window.addEventListener("resize", schedule);
10612
+ window.addEventListener("orientationchange", schedule);
10613
+ window.visualViewport?.addEventListener("resize", schedule);
10614
+ return () => {
10615
+ if (timer2) clearTimeout(timer2);
10616
+ window.removeEventListener("resize", schedule);
10617
+ window.removeEventListener("orientationchange", schedule);
10618
+ window.visualViewport?.removeEventListener("resize", schedule);
10619
+ };
10620
+ }, [ref, property, enabled]);
10621
+ }
10586
10622
  const FALLBACK_PANELS = [{
10587
10623
  key: "all-items",
10588
10624
  title: "All items",
@@ -10687,6 +10723,7 @@ function HomeShowcase() {
10687
10723
  const panels = useSlides();
10688
10724
  const showcaseRef = useRef(null);
10689
10725
  useTopOffset(showcaseRef, "--showcase-top");
10726
+ useViewportHeight(showcaseRef, "--showcase-vh");
10690
10727
  return jsx(ShopSurface, {
10691
10728
  tone: "dark",
10692
10729
  children: jsxs("div", {
@@ -8853,14 +8853,14 @@ function StickyCtaBar({ children, info: info2, variant = "floating" }) {
8853
8853
  })]
8854
8854
  });
8855
8855
  }
8856
- const surface = "_surface_1wfue_15";
8857
- const screen = "_screen_1wfue_20";
8858
- const body$3 = "_body_1wfue_12";
8859
- const items = "_items_1wfue_34";
8860
- const sectionHeader = "_sectionHeader_1wfue_40";
8861
- const sectionTitle = "_sectionTitle_1wfue_46";
8862
- const count = "_count_1wfue_53";
8863
- const lines = "_lines_1wfue_73";
8856
+ const surface = "_surface_nkc99_15";
8857
+ const screen = "_screen_nkc99_20";
8858
+ const body$3 = "_body_nkc99_12";
8859
+ const items = "_items_nkc99_34";
8860
+ const sectionHeader = "_sectionHeader_nkc99_40";
8861
+ const sectionTitle = "_sectionTitle_nkc99_46";
8862
+ const count = "_count_nkc99_67";
8863
+ const lines = "_lines_nkc99_91";
8864
8864
  const styles$j = {
8865
8865
  surface,
8866
8866
  screen,
@@ -10545,24 +10545,24 @@ function ProductView({ sku, initialData, showRecommendations = true, onNotFound
10545
10545
  }
10546
10546
  return unavailable;
10547
10547
  }
10548
- const showcase = "_showcase_1sarz_31";
10549
- const panel = "_panel_1sarz_50";
10550
- const image = "_image_1sarz_60";
10551
- const heroImageBox = "_heroImageBox_1sarz_108";
10552
- const hero = "_hero_1sarz_108";
10553
- const heroContent = "_heroContent_1sarz_179";
10554
- const heroText = "_heroText_1sarz_196";
10555
- const logo = "_logo_1sarz_205";
10556
- const heroTitle = "_heroTitle_1sarz_225";
10557
- const heroSub = "_heroSub_1sarz_249";
10558
- const swipe = "_swipe_1sarz_262";
10559
- const swipeLabel = "_swipeLabel_1sarz_270";
10560
- const chevron$1 = "_chevron_1sarz_276";
10561
- const overlay$1 = "_overlay_1sarz_293";
10562
- const copy = "_copy_1sarz_304";
10563
- const title$2 = "_title_1sarz_309";
10564
- const subtitle$1 = "_subtitle_1sarz_316";
10565
- const cta = "_cta_1sarz_322";
10548
+ const showcase = "_showcase_12z2a_40";
10549
+ const panel = "_panel_12z2a_59";
10550
+ const image = "_image_12z2a_69";
10551
+ const heroImageBox = "_heroImageBox_12z2a_117";
10552
+ const hero = "_hero_12z2a_117";
10553
+ const heroContent = "_heroContent_12z2a_188";
10554
+ const heroText = "_heroText_12z2a_205";
10555
+ const logo = "_logo_12z2a_214";
10556
+ const heroTitle = "_heroTitle_12z2a_234";
10557
+ const heroSub = "_heroSub_12z2a_258";
10558
+ const swipe = "_swipe_12z2a_271";
10559
+ const swipeLabel = "_swipeLabel_12z2a_279";
10560
+ const chevron$1 = "_chevron_12z2a_285";
10561
+ const overlay$1 = "_overlay_12z2a_302";
10562
+ const copy = "_copy_12z2a_313";
10563
+ const title$2 = "_title_12z2a_318";
10564
+ const subtitle$1 = "_subtitle_12z2a_325";
10565
+ const cta = "_cta_12z2a_331";
10566
10566
  const styles$2 = {
10567
10567
  showcase,
10568
10568
  panel,
@@ -10583,6 +10583,42 @@ const styles$2 = {
10583
10583
  subtitle: subtitle$1,
10584
10584
  cta
10585
10585
  };
10586
+ const SETTLE_MS = 250;
10587
+ function useViewportHeight(ref, property, enabled = true) {
10588
+ useEffect(() => {
10589
+ const el = ref.current;
10590
+ if (!el || !enabled) return;
10591
+ let timer2;
10592
+ const read = () => Math.round(window.visualViewport?.height ?? window.innerHeight);
10593
+ const apply = () => {
10594
+ const height = read();
10595
+ if (height > 0) el.style.setProperty(property, `${height}px`);
10596
+ };
10597
+ const applySettled = () => {
10598
+ const previous = el.clientHeight;
10599
+ const index = previous > 0 ? Math.round(el.scrollTop / previous) : 0;
10600
+ apply();
10601
+ if (el.clientHeight > 0) el.scrollTo({
10602
+ top: index * el.clientHeight,
10603
+ behavior: "auto"
10604
+ });
10605
+ };
10606
+ const schedule = () => {
10607
+ if (timer2) clearTimeout(timer2);
10608
+ timer2 = setTimeout(applySettled, SETTLE_MS);
10609
+ };
10610
+ apply();
10611
+ window.addEventListener("resize", schedule);
10612
+ window.addEventListener("orientationchange", schedule);
10613
+ window.visualViewport?.addEventListener("resize", schedule);
10614
+ return () => {
10615
+ if (timer2) clearTimeout(timer2);
10616
+ window.removeEventListener("resize", schedule);
10617
+ window.removeEventListener("orientationchange", schedule);
10618
+ window.visualViewport?.removeEventListener("resize", schedule);
10619
+ };
10620
+ }, [ref, property, enabled]);
10621
+ }
10586
10622
  const FALLBACK_PANELS = [{
10587
10623
  key: "all-items",
10588
10624
  title: "All items",
@@ -10687,6 +10723,7 @@ function HomeShowcase() {
10687
10723
  const panels = useSlides();
10688
10724
  const showcaseRef = useRef(null);
10689
10725
  useTopOffset(showcaseRef, "--showcase-top");
10726
+ useViewportHeight(showcaseRef, "--showcase-vh");
10690
10727
  return jsx(ShopSurface, {
10691
10728
  tone: "dark",
10692
10729
  children: jsxs("div", {
@@ -2344,39 +2344,41 @@
2344
2344
  ._actions_xqpxa_49 > * {
2345
2345
  flex: 1 1 0;
2346
2346
  }
2347
- ._surface_1wfue_15 {
2347
+ ._surface_nkc99_15 {
2348
2348
  display: flex;
2349
2349
  flex-direction: column;
2350
2350
  }
2351
- ._screen_1wfue_20 {
2351
+ ._screen_nkc99_20 {
2352
2352
  display: flex;
2353
2353
  flex-direction: column;
2354
2354
  flex: 1 1 auto;
2355
2355
  }
2356
- ._body_1wfue_12 {
2356
+ ._body_nkc99_12 {
2357
2357
  display: flex;
2358
2358
  flex-direction: column;
2359
2359
  gap: var(--space-20);
2360
2360
  padding: 0 var(--space-16);
2361
2361
  flex: 1 1 auto;
2362
2362
  }
2363
- ._items_1wfue_34 {
2363
+ ._items_nkc99_34 {
2364
2364
  display: flex;
2365
2365
  flex-direction: column;
2366
2366
  gap: var(--space-20);
2367
2367
  }
2368
- ._sectionHeader_1wfue_40 {
2368
+ ._sectionHeader_nkc99_40 {
2369
2369
  display: flex;
2370
2370
  align-items: center;
2371
2371
  gap: var(--space-12);
2372
2372
  }
2373
- ._sectionTitle_1wfue_46 {
2373
+ ._sectionTitle_nkc99_46 {
2374
2374
  margin: 0;
2375
2375
  font-size: var(--type-heading-md-size);
2376
2376
  line-height: 1.38;
2377
2377
  font-weight: var(--font-weight-bold);
2378
+ flex: 1 0 0;
2379
+ min-width: 0;
2378
2380
  }
2379
- ._count_1wfue_53 {
2381
+ ._count_nkc99_67 {
2380
2382
  display: inline-flex;
2381
2383
  align-items: center;
2382
2384
  justify-content: center;
@@ -2389,8 +2391,9 @@
2389
2391
  font-weight: var(--font-weight-bold);
2390
2392
  letter-spacing: 0.12px;
2391
2393
  font-variant-numeric: tabular-nums;
2394
+ flex-shrink: 0;
2392
2395
  }
2393
- ._lines_1wfue_73 {
2396
+ ._lines_nkc99_91 {
2394
2397
  list-style: none;
2395
2398
  margin: 0;
2396
2399
  padding: 0;
@@ -3381,8 +3384,8 @@
3381
3384
  column-gap: var(--space-12);
3382
3385
  row-gap: var(--space-24);
3383
3386
  }
3384
- ._showcase_1sarz_31 {
3385
- height: calc(100svh - var(--showcase-top, 0px));
3387
+ ._showcase_12z2a_40 {
3388
+ height: calc(var(--showcase-vh, 100svh) - var(--showcase-top, 0px));
3386
3389
  overflow-y: auto;
3387
3390
  scroll-snap-type: y mandatory;
3388
3391
  overscroll-behavior-y: contain;
@@ -3390,22 +3393,22 @@
3390
3393
  background: #080e12;
3391
3394
  scrollbar-width: none;
3392
3395
  }
3393
- ._showcase_1sarz_31::-webkit-scrollbar {
3396
+ ._showcase_12z2a_40::-webkit-scrollbar {
3394
3397
  display: none;
3395
3398
  }
3396
- ._panel_1sarz_50 {
3399
+ ._panel_12z2a_59 {
3397
3400
  position: relative;
3398
- height: calc(100svh - var(--showcase-top, 0px));
3401
+ height: calc(var(--showcase-vh, 100svh) - var(--showcase-top, 0px));
3399
3402
  scroll-snap-align: start;
3400
3403
  scroll-snap-stop: always;
3401
3404
  overflow: hidden;
3402
3405
  background: #080e12;
3403
3406
  }
3404
- ._image_1sarz_60 {
3407
+ ._image_12z2a_69 {
3405
3408
  object-fit: cover;
3406
3409
  object-position: center;
3407
3410
  }
3408
- ._heroImageBox_1sarz_108 {
3411
+ ._heroImageBox_12z2a_117 {
3409
3412
  position: absolute;
3410
3413
  top: 31px;
3411
3414
  left: 0;
@@ -3413,7 +3416,7 @@
3413
3416
  aspect-ratio: 750 / 1348;
3414
3417
  overflow: hidden;
3415
3418
  }
3416
- ._hero_1sarz_108::after {
3419
+ ._hero_12z2a_117::after {
3417
3420
  content: "";
3418
3421
  position: absolute;
3419
3422
  inset: 0;
@@ -3428,10 +3431,10 @@
3428
3431
  rgba(8, 14, 18, 1) 90%);
3429
3432
  pointer-events: none;
3430
3433
  }
3431
- ._hero_1sarz_108 ._image_1sarz_60 {
3434
+ ._hero_12z2a_117 ._image_12z2a_69 {
3432
3435
  object-position: top;
3433
3436
  }
3434
- ._hero_1sarz_108 ._heroContent_1sarz_179 {
3437
+ ._hero_12z2a_117 ._heroContent_12z2a_188 {
3435
3438
  position: absolute;
3436
3439
  bottom: 0;
3437
3440
  left: 0;
@@ -3442,7 +3445,7 @@
3442
3445
  gap: 24px;
3443
3446
  align-items: stretch;
3444
3447
  }
3445
- ._heroText_1sarz_196 {
3448
+ ._heroText_12z2a_205 {
3446
3449
  display: flex;
3447
3450
  flex-direction: column;
3448
3451
  gap: 8px;
@@ -3450,11 +3453,11 @@
3450
3453
  padding: 0 24px;
3451
3454
  text-align: center;
3452
3455
  }
3453
- ._heroText_1sarz_196 ._logo_1sarz_205 {
3456
+ ._heroText_12z2a_205 ._logo_12z2a_214 {
3454
3457
  width: 48px;
3455
3458
  height: 48px;
3456
3459
  }
3457
- ._heroTitle_1sarz_225 {
3460
+ ._heroTitle_12z2a_234 {
3458
3461
  width: 100%;
3459
3462
  margin: 0;
3460
3463
  font-family:
@@ -3469,14 +3472,14 @@
3469
3472
  letter-spacing: -1.12px;
3470
3473
  color: #f9fafa;
3471
3474
  }
3472
- ._heroSub_1sarz_249 {
3475
+ ._heroSub_12z2a_258 {
3473
3476
  margin: 0;
3474
3477
  font-size: 16px;
3475
3478
  line-height: 1.55;
3476
3479
  color: #f9fafa;
3477
3480
  max-width: 327px;
3478
3481
  }
3479
- ._swipe_1sarz_262 {
3482
+ ._swipe_12z2a_271 {
3480
3483
  display: flex;
3481
3484
  flex-direction: column;
3482
3485
  align-items: center;
@@ -3484,19 +3487,19 @@
3484
3487
  padding: 8px 0;
3485
3488
  background: #080e12;
3486
3489
  }
3487
- ._swipeLabel_1sarz_270 {
3490
+ ._swipeLabel_12z2a_279 {
3488
3491
  margin: 0;
3489
3492
  font-size: 14px;
3490
3493
  line-height: 1;
3491
3494
  color: rgba(255, 255, 255, 0.54);
3492
3495
  }
3493
- ._chevron_1sarz_276 {
3496
+ ._chevron_12z2a_285 {
3494
3497
  width: 24px;
3495
3498
  height: 24px;
3496
3499
  color: rgba(255, 255, 255, 0.54);
3497
- animation: _bob_1sarz_1 1.8s ease-in-out infinite;
3500
+ animation: _bob_12z2a_1 1.8s ease-in-out infinite;
3498
3501
  }
3499
- @keyframes _bob_1sarz_1 {
3502
+ @keyframes _bob_12z2a_1 {
3500
3503
  0%, 100% {
3501
3504
  transform: translateY(0);
3502
3505
  }
@@ -3504,7 +3507,7 @@
3504
3507
  transform: translateY(4px);
3505
3508
  }
3506
3509
  }
3507
- ._overlay_1sarz_293 {
3510
+ ._overlay_12z2a_302 {
3508
3511
  position: absolute;
3509
3512
  inset: 0;
3510
3513
  z-index: 1;
@@ -3515,25 +3518,25 @@
3515
3518
  align-items: flex-start;
3516
3519
  padding: 0 24px 24px;
3517
3520
  }
3518
- ._copy_1sarz_304 {
3521
+ ._copy_12z2a_313 {
3519
3522
  display: flex;
3520
3523
  flex-direction: column;
3521
3524
  gap: 8px;
3522
3525
  }
3523
- ._title_1sarz_309 {
3526
+ ._title_12z2a_318 {
3524
3527
  margin: 0;
3525
3528
  font-size: 32px;
3526
3529
  line-height: 1.2;
3527
3530
  font-weight: 700;
3528
3531
  color: #f9fafa;
3529
3532
  }
3530
- ._subtitle_1sarz_316 {
3533
+ ._subtitle_12z2a_325 {
3531
3534
  margin: 0;
3532
3535
  font-size: 16px;
3533
3536
  line-height: 1.55;
3534
3537
  color: #f9fafa;
3535
3538
  }
3536
- ._cta_1sarz_322 {
3539
+ ._cta_12z2a_331 {
3537
3540
  display: inline-flex;
3538
3541
  align-items: center;
3539
3542
  justify-content: center;
@@ -3547,15 +3550,15 @@
3547
3550
  font-weight: 700;
3548
3551
  text-decoration: none;
3549
3552
  }
3550
- ._cta_1sarz_322::after {
3553
+ ._cta_12z2a_331::after {
3551
3554
  content: "";
3552
3555
  position: absolute;
3553
3556
  inset: 0;
3554
3557
  }
3555
- ._cta_1sarz_322:active {
3558
+ ._cta_12z2a_331:active {
3556
3559
  background: rgba(249, 250, 250, 0.12);
3557
3560
  }
3558
- ._cta_1sarz_322:focus-visible {
3561
+ ._cta_12z2a_331:focus-visible {
3559
3562
  outline: none;
3560
3563
  box-shadow: var(--focus-ring);
3561
3564
  }
package/dist/styles.css CHANGED
@@ -2344,39 +2344,41 @@
2344
2344
  ._actions_xqpxa_49 > * {
2345
2345
  flex: 1 1 0;
2346
2346
  }
2347
- ._surface_1wfue_15 {
2347
+ ._surface_nkc99_15 {
2348
2348
  display: flex;
2349
2349
  flex-direction: column;
2350
2350
  }
2351
- ._screen_1wfue_20 {
2351
+ ._screen_nkc99_20 {
2352
2352
  display: flex;
2353
2353
  flex-direction: column;
2354
2354
  flex: 1 1 auto;
2355
2355
  }
2356
- ._body_1wfue_12 {
2356
+ ._body_nkc99_12 {
2357
2357
  display: flex;
2358
2358
  flex-direction: column;
2359
2359
  gap: var(--space-20);
2360
2360
  padding: 0 var(--space-16);
2361
2361
  flex: 1 1 auto;
2362
2362
  }
2363
- ._items_1wfue_34 {
2363
+ ._items_nkc99_34 {
2364
2364
  display: flex;
2365
2365
  flex-direction: column;
2366
2366
  gap: var(--space-20);
2367
2367
  }
2368
- ._sectionHeader_1wfue_40 {
2368
+ ._sectionHeader_nkc99_40 {
2369
2369
  display: flex;
2370
2370
  align-items: center;
2371
2371
  gap: var(--space-12);
2372
2372
  }
2373
- ._sectionTitle_1wfue_46 {
2373
+ ._sectionTitle_nkc99_46 {
2374
2374
  margin: 0;
2375
2375
  font-size: var(--type-heading-md-size);
2376
2376
  line-height: 1.38;
2377
2377
  font-weight: var(--font-weight-bold);
2378
+ flex: 1 0 0;
2379
+ min-width: 0;
2378
2380
  }
2379
- ._count_1wfue_53 {
2381
+ ._count_nkc99_67 {
2380
2382
  display: inline-flex;
2381
2383
  align-items: center;
2382
2384
  justify-content: center;
@@ -2389,8 +2391,9 @@
2389
2391
  font-weight: var(--font-weight-bold);
2390
2392
  letter-spacing: 0.12px;
2391
2393
  font-variant-numeric: tabular-nums;
2394
+ flex-shrink: 0;
2392
2395
  }
2393
- ._lines_1wfue_73 {
2396
+ ._lines_nkc99_91 {
2394
2397
  list-style: none;
2395
2398
  margin: 0;
2396
2399
  padding: 0;
@@ -3381,8 +3384,8 @@
3381
3384
  column-gap: var(--space-12);
3382
3385
  row-gap: var(--space-24);
3383
3386
  }
3384
- ._showcase_1sarz_31 {
3385
- height: calc(100svh - var(--showcase-top, 0px));
3387
+ ._showcase_12z2a_40 {
3388
+ height: calc(var(--showcase-vh, 100svh) - var(--showcase-top, 0px));
3386
3389
  overflow-y: auto;
3387
3390
  scroll-snap-type: y mandatory;
3388
3391
  overscroll-behavior-y: contain;
@@ -3390,22 +3393,22 @@
3390
3393
  background: #080e12;
3391
3394
  scrollbar-width: none;
3392
3395
  }
3393
- ._showcase_1sarz_31::-webkit-scrollbar {
3396
+ ._showcase_12z2a_40::-webkit-scrollbar {
3394
3397
  display: none;
3395
3398
  }
3396
- ._panel_1sarz_50 {
3399
+ ._panel_12z2a_59 {
3397
3400
  position: relative;
3398
- height: calc(100svh - var(--showcase-top, 0px));
3401
+ height: calc(var(--showcase-vh, 100svh) - var(--showcase-top, 0px));
3399
3402
  scroll-snap-align: start;
3400
3403
  scroll-snap-stop: always;
3401
3404
  overflow: hidden;
3402
3405
  background: #080e12;
3403
3406
  }
3404
- ._image_1sarz_60 {
3407
+ ._image_12z2a_69 {
3405
3408
  object-fit: cover;
3406
3409
  object-position: center;
3407
3410
  }
3408
- ._heroImageBox_1sarz_108 {
3411
+ ._heroImageBox_12z2a_117 {
3409
3412
  position: absolute;
3410
3413
  top: 31px;
3411
3414
  left: 0;
@@ -3413,7 +3416,7 @@
3413
3416
  aspect-ratio: 750 / 1348;
3414
3417
  overflow: hidden;
3415
3418
  }
3416
- ._hero_1sarz_108::after {
3419
+ ._hero_12z2a_117::after {
3417
3420
  content: "";
3418
3421
  position: absolute;
3419
3422
  inset: 0;
@@ -3428,10 +3431,10 @@
3428
3431
  rgba(8, 14, 18, 1) 90%);
3429
3432
  pointer-events: none;
3430
3433
  }
3431
- ._hero_1sarz_108 ._image_1sarz_60 {
3434
+ ._hero_12z2a_117 ._image_12z2a_69 {
3432
3435
  object-position: top;
3433
3436
  }
3434
- ._hero_1sarz_108 ._heroContent_1sarz_179 {
3437
+ ._hero_12z2a_117 ._heroContent_12z2a_188 {
3435
3438
  position: absolute;
3436
3439
  bottom: 0;
3437
3440
  left: 0;
@@ -3442,7 +3445,7 @@
3442
3445
  gap: 24px;
3443
3446
  align-items: stretch;
3444
3447
  }
3445
- ._heroText_1sarz_196 {
3448
+ ._heroText_12z2a_205 {
3446
3449
  display: flex;
3447
3450
  flex-direction: column;
3448
3451
  gap: 8px;
@@ -3450,11 +3453,11 @@
3450
3453
  padding: 0 24px;
3451
3454
  text-align: center;
3452
3455
  }
3453
- ._heroText_1sarz_196 ._logo_1sarz_205 {
3456
+ ._heroText_12z2a_205 ._logo_12z2a_214 {
3454
3457
  width: 48px;
3455
3458
  height: 48px;
3456
3459
  }
3457
- ._heroTitle_1sarz_225 {
3460
+ ._heroTitle_12z2a_234 {
3458
3461
  width: 100%;
3459
3462
  margin: 0;
3460
3463
  font-family:
@@ -3469,14 +3472,14 @@
3469
3472
  letter-spacing: -1.12px;
3470
3473
  color: #f9fafa;
3471
3474
  }
3472
- ._heroSub_1sarz_249 {
3475
+ ._heroSub_12z2a_258 {
3473
3476
  margin: 0;
3474
3477
  font-size: 16px;
3475
3478
  line-height: 1.55;
3476
3479
  color: #f9fafa;
3477
3480
  max-width: 327px;
3478
3481
  }
3479
- ._swipe_1sarz_262 {
3482
+ ._swipe_12z2a_271 {
3480
3483
  display: flex;
3481
3484
  flex-direction: column;
3482
3485
  align-items: center;
@@ -3484,19 +3487,19 @@
3484
3487
  padding: 8px 0;
3485
3488
  background: #080e12;
3486
3489
  }
3487
- ._swipeLabel_1sarz_270 {
3490
+ ._swipeLabel_12z2a_279 {
3488
3491
  margin: 0;
3489
3492
  font-size: 14px;
3490
3493
  line-height: 1;
3491
3494
  color: rgba(255, 255, 255, 0.54);
3492
3495
  }
3493
- ._chevron_1sarz_276 {
3496
+ ._chevron_12z2a_285 {
3494
3497
  width: 24px;
3495
3498
  height: 24px;
3496
3499
  color: rgba(255, 255, 255, 0.54);
3497
- animation: _bob_1sarz_1 1.8s ease-in-out infinite;
3500
+ animation: _bob_12z2a_1 1.8s ease-in-out infinite;
3498
3501
  }
3499
- @keyframes _bob_1sarz_1 {
3502
+ @keyframes _bob_12z2a_1 {
3500
3503
  0%, 100% {
3501
3504
  transform: translateY(0);
3502
3505
  }
@@ -3504,7 +3507,7 @@
3504
3507
  transform: translateY(4px);
3505
3508
  }
3506
3509
  }
3507
- ._overlay_1sarz_293 {
3510
+ ._overlay_12z2a_302 {
3508
3511
  position: absolute;
3509
3512
  inset: 0;
3510
3513
  z-index: 1;
@@ -3515,25 +3518,25 @@
3515
3518
  align-items: flex-start;
3516
3519
  padding: 0 24px 24px;
3517
3520
  }
3518
- ._copy_1sarz_304 {
3521
+ ._copy_12z2a_313 {
3519
3522
  display: flex;
3520
3523
  flex-direction: column;
3521
3524
  gap: 8px;
3522
3525
  }
3523
- ._title_1sarz_309 {
3526
+ ._title_12z2a_318 {
3524
3527
  margin: 0;
3525
3528
  font-size: 32px;
3526
3529
  line-height: 1.2;
3527
3530
  font-weight: 700;
3528
3531
  color: #f9fafa;
3529
3532
  }
3530
- ._subtitle_1sarz_316 {
3533
+ ._subtitle_12z2a_325 {
3531
3534
  margin: 0;
3532
3535
  font-size: 16px;
3533
3536
  line-height: 1.55;
3534
3537
  color: #f9fafa;
3535
3538
  }
3536
- ._cta_1sarz_322 {
3539
+ ._cta_12z2a_331 {
3537
3540
  display: inline-flex;
3538
3541
  align-items: center;
3539
3542
  justify-content: center;
@@ -3547,15 +3550,15 @@
3547
3550
  font-weight: 700;
3548
3551
  text-decoration: none;
3549
3552
  }
3550
- ._cta_1sarz_322::after {
3553
+ ._cta_12z2a_331::after {
3551
3554
  content: "";
3552
3555
  position: absolute;
3553
3556
  inset: 0;
3554
3557
  }
3555
- ._cta_1sarz_322:active {
3558
+ ._cta_12z2a_331:active {
3556
3559
  background: rgba(249, 250, 250, 0.12);
3557
3560
  }
3558
- ._cta_1sarz_322:focus-visible {
3561
+ ._cta_12z2a_331:focus-visible {
3559
3562
  outline: none;
3560
3563
  box-shadow: var(--focus-ring);
3561
3564
  }
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@nok-integration/storefront-react",
3
- "version": "0.19.2",
3
+ "version": "0.19.4",
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
- "sideEffects": [
24
- "*.css"
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
  }