@nok-integration/storefront-react 0.19.4 → 0.19.6

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 CHANGED
@@ -5410,6 +5410,7 @@ const styles$M = {
5410
5410
  surface: surface$1,
5411
5411
  fill
5412
5412
  };
5413
+ const SETTLE_MS$1 = 150;
5413
5414
  function offsetFromViewportTop(el) {
5414
5415
  let top = el.getBoundingClientRect().top;
5415
5416
  for (let node = el.parentElement; node; node = node.parentElement) {
@@ -5423,17 +5424,30 @@ function useTopOffset(ref, property, enabled = true) {
5423
5424
  useEffect(() => {
5424
5425
  const el = ref.current;
5425
5426
  if (!el || !enabled) return;
5427
+ let timer2;
5426
5428
  const measure = () => {
5427
5429
  el.style.setProperty(property, `${offsetFromViewportTop(el)}px`);
5428
5430
  };
5431
+ const settle = () => {
5432
+ if (timer2) clearTimeout(timer2);
5433
+ timer2 = setTimeout(measure, SETTLE_MS$1);
5434
+ };
5429
5435
  measure();
5430
5436
  window.addEventListener("resize", measure);
5431
5437
  window.addEventListener("orientationchange", measure);
5438
+ document.addEventListener("scroll", settle, {
5439
+ capture: true,
5440
+ passive: true
5441
+ });
5432
5442
  const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
5433
5443
  if (observer && el.parentElement) observer.observe(el.parentElement);
5434
5444
  return () => {
5445
+ if (timer2) clearTimeout(timer2);
5435
5446
  window.removeEventListener("resize", measure);
5436
5447
  window.removeEventListener("orientationchange", measure);
5448
+ document.removeEventListener("scroll", settle, {
5449
+ capture: true
5450
+ });
5437
5451
  observer?.disconnect();
5438
5452
  };
5439
5453
  }, [ref, property, enabled]);
@@ -6822,7 +6836,7 @@ const widget = "_widget_1v9my_18";
6822
6836
  const titleRow = "_titleRow_1v9my_26";
6823
6837
  const headline$1 = "_headline_1v9my_42";
6824
6838
  const track$5 = "_track_1v9my_74";
6825
- const rule = "_rule_1v9my_99";
6839
+ const rule$1 = "_rule_1v9my_99";
6826
6840
  const help = "_help_1v9my_109";
6827
6841
  const helpTitle = "_helpTitle_1v9my_115";
6828
6842
  const helpRows = "_helpRows_1v9my_122";
@@ -6837,7 +6851,7 @@ const styles$A = {
6837
6851
  titleRow,
6838
6852
  headline: headline$1,
6839
6853
  track: track$5,
6840
- rule,
6854
+ rule: rule$1,
6841
6855
  help,
6842
6856
  helpTitle,
6843
6857
  helpRows,
@@ -7660,18 +7674,20 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
7660
7674
  busy
7661
7675
  });
7662
7676
  }
7663
- const page$2 = "_page_1s8l9_6";
7664
- const confirmed = "_confirmed_1s8l9_16";
7665
- const title$h = "_title_1s8l9_22";
7666
- const headline = "_headline_1s8l9_47";
7667
- const subtitle$4 = "_subtitle_1s8l9_65";
7668
- const done = "_done_1s8l9_87";
7677
+ const page$2 = "_page_2uqhz_6";
7678
+ const confirmed = "_confirmed_2uqhz_16";
7679
+ const title$h = "_title_2uqhz_22";
7680
+ const headline = "_headline_2uqhz_47";
7681
+ const subtitle$4 = "_subtitle_2uqhz_65";
7682
+ const rule = "_rule_2uqhz_90";
7683
+ const done = "_done_2uqhz_107";
7669
7684
  const styles$w = {
7670
7685
  page: page$2,
7671
7686
  confirmed,
7672
7687
  title: title$h,
7673
7688
  headline,
7674
7689
  subtitle: subtitle$4,
7690
+ rule,
7675
7691
  done
7676
7692
  };
7677
7693
  function OrderConfirmationView(props) {
@@ -7761,6 +7777,8 @@ function OrderConfirmationContent({ orderRef, locale: localeProp, onDone }) {
7761
7777
  } : {},
7762
7778
  locale
7763
7779
  })]
7780
+ }), jsx("hr", {
7781
+ className: styles$w.rule
7764
7782
  }), jsx(OrderLines, {
7765
7783
  order
7766
7784
  }), jsx(ShippingAddressCard, {
@@ -5410,6 +5410,7 @@ const styles$M = {
5410
5410
  surface: surface$1,
5411
5411
  fill
5412
5412
  };
5413
+ const SETTLE_MS$1 = 150;
5413
5414
  function offsetFromViewportTop(el) {
5414
5415
  let top = el.getBoundingClientRect().top;
5415
5416
  for (let node = el.parentElement; node; node = node.parentElement) {
@@ -5423,17 +5424,30 @@ function useTopOffset(ref, property, enabled = true) {
5423
5424
  useEffect(() => {
5424
5425
  const el = ref.current;
5425
5426
  if (!el || !enabled) return;
5427
+ let timer2;
5426
5428
  const measure = () => {
5427
5429
  el.style.setProperty(property, `${offsetFromViewportTop(el)}px`);
5428
5430
  };
5431
+ const settle = () => {
5432
+ if (timer2) clearTimeout(timer2);
5433
+ timer2 = setTimeout(measure, SETTLE_MS$1);
5434
+ };
5429
5435
  measure();
5430
5436
  window.addEventListener("resize", measure);
5431
5437
  window.addEventListener("orientationchange", measure);
5438
+ document.addEventListener("scroll", settle, {
5439
+ capture: true,
5440
+ passive: true
5441
+ });
5432
5442
  const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
5433
5443
  if (observer && el.parentElement) observer.observe(el.parentElement);
5434
5444
  return () => {
5445
+ if (timer2) clearTimeout(timer2);
5435
5446
  window.removeEventListener("resize", measure);
5436
5447
  window.removeEventListener("orientationchange", measure);
5448
+ document.removeEventListener("scroll", settle, {
5449
+ capture: true
5450
+ });
5437
5451
  observer?.disconnect();
5438
5452
  };
5439
5453
  }, [ref, property, enabled]);
@@ -6822,7 +6836,7 @@ const widget = "_widget_1v9my_18";
6822
6836
  const titleRow = "_titleRow_1v9my_26";
6823
6837
  const headline$1 = "_headline_1v9my_42";
6824
6838
  const track$5 = "_track_1v9my_74";
6825
- const rule = "_rule_1v9my_99";
6839
+ const rule$1 = "_rule_1v9my_99";
6826
6840
  const help = "_help_1v9my_109";
6827
6841
  const helpTitle = "_helpTitle_1v9my_115";
6828
6842
  const helpRows = "_helpRows_1v9my_122";
@@ -6837,7 +6851,7 @@ const styles$A = {
6837
6851
  titleRow,
6838
6852
  headline: headline$1,
6839
6853
  track: track$5,
6840
- rule,
6854
+ rule: rule$1,
6841
6855
  help,
6842
6856
  helpTitle,
6843
6857
  helpRows,
@@ -7660,18 +7674,20 @@ function ReturnFlowContent({ orderRef, returnRef, onDone, locale }) {
7660
7674
  busy
7661
7675
  });
7662
7676
  }
7663
- const page$2 = "_page_1s8l9_6";
7664
- const confirmed = "_confirmed_1s8l9_16";
7665
- const title$h = "_title_1s8l9_22";
7666
- const headline = "_headline_1s8l9_47";
7667
- const subtitle$4 = "_subtitle_1s8l9_65";
7668
- const done = "_done_1s8l9_87";
7677
+ const page$2 = "_page_2uqhz_6";
7678
+ const confirmed = "_confirmed_2uqhz_16";
7679
+ const title$h = "_title_2uqhz_22";
7680
+ const headline = "_headline_2uqhz_47";
7681
+ const subtitle$4 = "_subtitle_2uqhz_65";
7682
+ const rule = "_rule_2uqhz_90";
7683
+ const done = "_done_2uqhz_107";
7669
7684
  const styles$w = {
7670
7685
  page: page$2,
7671
7686
  confirmed,
7672
7687
  title: title$h,
7673
7688
  headline,
7674
7689
  subtitle: subtitle$4,
7690
+ rule,
7675
7691
  done
7676
7692
  };
7677
7693
  function OrderConfirmationView(props) {
@@ -7761,6 +7777,8 @@ function OrderConfirmationContent({ orderRef, locale: localeProp, onDone }) {
7761
7777
  } : {},
7762
7778
  locale
7763
7779
  })]
7780
+ }), jsx("hr", {
7781
+ className: styles$w.rule
7764
7782
  }), jsx(OrderLines, {
7765
7783
  order
7766
7784
  }), jsx(ShippingAddressCard, {
@@ -1500,30 +1500,30 @@
1500
1500
  text-decoration: line-through;
1501
1501
  font-variant-numeric: tabular-nums;
1502
1502
  }
1503
- ._page_1s8l9_6 {
1503
+ ._page_2uqhz_6 {
1504
1504
  display: flex;
1505
1505
  flex-direction: column;
1506
1506
  gap: var(--space-32);
1507
1507
  padding: var(--space-20) var(--space-16) var(--space-24);
1508
1508
  }
1509
- ._confirmed_1s8l9_16 {
1509
+ ._confirmed_2uqhz_16 {
1510
1510
  display: flex;
1511
1511
  flex-direction: column;
1512
1512
  gap: var(--space-24);
1513
1513
  }
1514
- ._title_1s8l9_22 {
1514
+ ._title_2uqhz_22 {
1515
1515
  display: flex;
1516
1516
  flex-direction: column;
1517
1517
  gap: var(--space-12);
1518
1518
  }
1519
- ._headline_1s8l9_47 {
1519
+ ._headline_2uqhz_47 {
1520
1520
  margin: 0;
1521
1521
  font-size: var(--type-heading-md-size);
1522
1522
  line-height: 14px;
1523
1523
  font-weight: var(--font-weight-bold);
1524
1524
  color: var(--color-state-text-success);
1525
1525
  }
1526
- ._subtitle_1s8l9_65 {
1526
+ ._subtitle_2uqhz_65 {
1527
1527
  margin: -6px 0;
1528
1528
  padding: 6px 0;
1529
1529
  font-size: var(--type-paragraph-size);
@@ -1534,7 +1534,13 @@
1534
1534
  text-overflow: ellipsis;
1535
1535
  white-space: nowrap;
1536
1536
  }
1537
- ._done_1s8l9_87 {
1537
+ ._rule_2uqhz_90 {
1538
+ height: 1px;
1539
+ margin: 0 0 -1px;
1540
+ border: 0;
1541
+ background: var(--color-border-default);
1542
+ }
1543
+ ._done_2uqhz_107 {
1538
1544
  border-color: var(--color-surface-max);
1539
1545
  }
1540
1546
  ._badge_ghd02_6 {
package/dist/styles.css CHANGED
@@ -1500,30 +1500,30 @@
1500
1500
  text-decoration: line-through;
1501
1501
  font-variant-numeric: tabular-nums;
1502
1502
  }
1503
- ._page_1s8l9_6 {
1503
+ ._page_2uqhz_6 {
1504
1504
  display: flex;
1505
1505
  flex-direction: column;
1506
1506
  gap: var(--space-32);
1507
1507
  padding: var(--space-20) var(--space-16) var(--space-24);
1508
1508
  }
1509
- ._confirmed_1s8l9_16 {
1509
+ ._confirmed_2uqhz_16 {
1510
1510
  display: flex;
1511
1511
  flex-direction: column;
1512
1512
  gap: var(--space-24);
1513
1513
  }
1514
- ._title_1s8l9_22 {
1514
+ ._title_2uqhz_22 {
1515
1515
  display: flex;
1516
1516
  flex-direction: column;
1517
1517
  gap: var(--space-12);
1518
1518
  }
1519
- ._headline_1s8l9_47 {
1519
+ ._headline_2uqhz_47 {
1520
1520
  margin: 0;
1521
1521
  font-size: var(--type-heading-md-size);
1522
1522
  line-height: 14px;
1523
1523
  font-weight: var(--font-weight-bold);
1524
1524
  color: var(--color-state-text-success);
1525
1525
  }
1526
- ._subtitle_1s8l9_65 {
1526
+ ._subtitle_2uqhz_65 {
1527
1527
  margin: -6px 0;
1528
1528
  padding: 6px 0;
1529
1529
  font-size: var(--type-paragraph-size);
@@ -1534,7 +1534,13 @@
1534
1534
  text-overflow: ellipsis;
1535
1535
  white-space: nowrap;
1536
1536
  }
1537
- ._done_1s8l9_87 {
1537
+ ._rule_2uqhz_90 {
1538
+ height: 1px;
1539
+ margin: 0 0 -1px;
1540
+ border: 0;
1541
+ background: var(--color-border-default);
1542
+ }
1543
+ ._done_2uqhz_107 {
1538
1544
  border-color: var(--color-surface-max);
1539
1545
  }
1540
1546
  ._badge_ghd02_6 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nok-integration/storefront-react",
3
- "version": "0.19.4",
3
+ "version": "0.19.6",
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
6
  "publishConfig": {