@nok-integration/storefront-react 0.19.20 → 0.19.21

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.
@@ -5313,9 +5313,9 @@ function ShopLink({ to, children, ...rest }) {
5313
5313
  }
5314
5314
  function anchorToTop() {
5315
5315
  if (typeof window === "undefined") return;
5316
- const top = () => window.scrollTo(0, 0);
5317
- top();
5318
- if (typeof window.requestAnimationFrame === "function") window.requestAnimationFrame(top);
5316
+ const top2 = () => window.scrollTo(0, 0);
5317
+ top2();
5318
+ if (typeof window.requestAnimationFrame === "function") window.requestAnimationFrame(top2);
5319
5319
  }
5320
5320
  function ShopImage({ src, alt, fill: fill2 = false, width, height, sizes, className, style, priority = false }) {
5321
5321
  const assetUrl = useAssetUrl();
@@ -5404,7 +5404,7 @@ const neutral$1 = "_neutral_1bagf_12";
5404
5404
  const success$1 = "_success_1bagf_17";
5405
5405
  const critical$1 = "_critical_1bagf_22";
5406
5406
  const promo = "_promo_1bagf_27";
5407
- const styles$Q = {
5407
+ const styles$R = {
5408
5408
  badge: badge$5,
5409
5409
  neutral: neutral$1,
5410
5410
  success: success$1,
@@ -5413,7 +5413,7 @@ const styles$Q = {
5413
5413
  };
5414
5414
  function Badge({ tone = "neutral", children }) {
5415
5415
  return jsx("span", {
5416
- className: [styles$Q.badge, styles$Q[tone]].join(" "),
5416
+ className: [styles$R.badge, styles$R[tone]].join(" "),
5417
5417
  children
5418
5418
  });
5419
5419
  }
@@ -5424,7 +5424,7 @@ const secondary = "_secondary_1u2uh_34";
5424
5424
  const ghost = "_ghost_1u2uh_40";
5425
5425
  const spinner = "_spinner_1u2uh_83";
5426
5426
  const spin = "_spin_1u2uh_83";
5427
- const styles$P = {
5427
+ const styles$Q = {
5428
5428
  button: button$1,
5429
5429
  fullWidth,
5430
5430
  primary,
@@ -5438,12 +5438,12 @@ const Button = forwardRef(function Button2({ variant = "primary", loading = fals
5438
5438
  return jsxs("button", {
5439
5439
  ref,
5440
5440
  type,
5441
- className: [styles$P.button, styles$P[variant], fullWidth2 ? styles$P.fullWidth : "", className ?? ""].filter(Boolean).join(" "),
5441
+ className: [styles$Q.button, styles$Q[variant], fullWidth2 ? styles$Q.fullWidth : "", className ?? ""].filter(Boolean).join(" "),
5442
5442
  disabled: isDisabled,
5443
5443
  "aria-busy": loading || void 0,
5444
5444
  ...rest,
5445
5445
  children: [loading && jsx("span", {
5446
- className: styles$P.spinner,
5446
+ className: styles$Q.spinner,
5447
5447
  "aria-hidden": "true"
5448
5448
  }), jsx("span", {
5449
5449
  children
@@ -5451,7 +5451,7 @@ const Button = forwardRef(function Button2({ variant = "primary", loading = fals
5451
5451
  });
5452
5452
  });
5453
5453
  const skeleton = "_skeleton_1nxz7_1";
5454
- const styles$O = {
5454
+ const styles$P = {
5455
5455
  skeleton
5456
5456
  };
5457
5457
  function Skeleton({ width, height, radius, className, circle }) {
@@ -5462,24 +5462,24 @@ function Skeleton({ width, height, radius, className, circle }) {
5462
5462
  };
5463
5463
  return jsx("span", {
5464
5464
  "aria-hidden": "true",
5465
- className: [styles$O.skeleton, className ?? ""].filter(Boolean).join(" "),
5465
+ className: [styles$P.skeleton, className ?? ""].filter(Boolean).join(" "),
5466
5466
  style
5467
5467
  });
5468
5468
  }
5469
5469
  const surface$1 = "_surface_cfqo9_10";
5470
5470
  const fill = "_fill_cfqo9_35";
5471
- const styles$N = {
5471
+ const styles$O = {
5472
5472
  surface: surface$1,
5473
5473
  fill
5474
5474
  };
5475
5475
  const SETTLE_MS$1 = 150;
5476
5476
  function offsetFromViewportTop(el) {
5477
- let top = el.getBoundingClientRect().top;
5477
+ let top2 = el.getBoundingClientRect().top;
5478
5478
  for (let node = el.parentElement; node; node = node.parentElement) {
5479
- top += node.scrollTop;
5479
+ top2 += node.scrollTop;
5480
5480
  if (getComputedStyle(node).position === "fixed") break;
5481
5481
  }
5482
- const offset = Math.max(0, Math.round(top));
5482
+ const offset = Math.max(0, Math.round(top2));
5483
5483
  return offset >= window.innerHeight ? 0 : offset;
5484
5484
  }
5485
5485
  function useTopOffset(ref, property, enabled = true) {
@@ -5530,7 +5530,7 @@ const ShopSurface = forwardRef(function ShopSurface2({ tone, fill: fill2 = false
5530
5530
  ...rest,
5531
5531
  ref: attach,
5532
5532
  "data-shop-theme": tone,
5533
- className: [styles$N.surface, fill2 ? styles$N.fill : "", className ?? ""].filter(Boolean).join(" "),
5533
+ className: [styles$O.surface, fill2 ? styles$O.fill : "", className ?? ""].filter(Boolean).join(" "),
5534
5534
  children
5535
5535
  });
5536
5536
  });
@@ -5543,7 +5543,7 @@ const lineMid = "_lineMid_ney0g_45";
5543
5543
  const lineNarrow = "_lineNarrow_ney0g_49";
5544
5544
  const row$9 = "_row_ney0g_53";
5545
5545
  const action$2 = "_action_ney0g_57";
5546
- const styles$M = {
5546
+ const styles$N = {
5547
5547
  root: root$6,
5548
5548
  inner,
5549
5549
  media: media$3,
@@ -5755,36 +5755,36 @@ function ScreenSkeleton({ tone, shape = "media" }) {
5755
5755
  return jsx(ShopSurface, {
5756
5756
  tone,
5757
5757
  fill: true,
5758
- className: styles$M.root,
5758
+ className: styles$N.root,
5759
5759
  children: jsx("div", {
5760
- className: styles$M.inner,
5760
+ className: styles$N.inner,
5761
5761
  role: "status",
5762
5762
  "aria-label": t("Loading"),
5763
5763
  children: shape === "media" ? jsxs(Fragment, {
5764
5764
  children: [jsx(Skeleton, {
5765
- className: styles$M.media
5765
+ className: styles$N.media
5766
5766
  }), jsxs("div", {
5767
- className: styles$M.lines,
5767
+ className: styles$N.lines,
5768
5768
  children: [jsx(Skeleton, {
5769
5769
  height: 22,
5770
- className: styles$M.lineWide
5770
+ className: styles$N.lineWide
5771
5771
  }), jsx(Skeleton, {
5772
5772
  height: 16,
5773
- className: styles$M.lineMid
5773
+ className: styles$N.lineMid
5774
5774
  }), jsx(Skeleton, {
5775
5775
  height: 16,
5776
- className: styles$M.lineNarrow
5776
+ className: styles$N.lineNarrow
5777
5777
  })]
5778
5778
  }), jsx(Skeleton, {
5779
5779
  height: 48,
5780
5780
  radius: 8,
5781
- className: styles$M.action
5781
+ className: styles$N.action
5782
5782
  })]
5783
5783
  }) : jsx("div", {
5784
- className: styles$M.lines,
5784
+ className: styles$N.lines,
5785
5785
  children: [0, 1, 2, 3].map((i) => jsx(Skeleton, {
5786
5786
  height: 72,
5787
- className: styles$M.row
5787
+ className: styles$N.row
5788
5788
  }, i))
5789
5789
  })
5790
5790
  })
@@ -5796,7 +5796,7 @@ const text$5 = "_text_ryf3q_21";
5796
5796
  const title$n = "_title_ryf3q_35";
5797
5797
  const body$8 = "_body_ryf3q_40";
5798
5798
  const action$1 = "_action_ryf3q_48";
5799
- const styles$L = {
5799
+ const styles$M = {
5800
5800
  root: root$5,
5801
5801
  icon: icon$4,
5802
5802
  text: text$5,
@@ -5806,22 +5806,22 @@ const styles$L = {
5806
5806
  };
5807
5807
  function EmptyState({ title: title2, body: body3, action: action2, icon: icon2 }) {
5808
5808
  return jsxs("div", {
5809
- className: styles$L.root,
5809
+ className: styles$M.root,
5810
5810
  role: "status",
5811
5811
  children: [icon2 && jsx("div", {
5812
- className: styles$L.icon,
5812
+ className: styles$M.icon,
5813
5813
  children: icon2
5814
5814
  }), jsxs("div", {
5815
- className: styles$L.text,
5815
+ className: styles$M.text,
5816
5816
  children: [jsx("h2", {
5817
- className: styles$L.title,
5817
+ className: styles$M.title,
5818
5818
  children: title2
5819
5819
  }), body3 && jsx("p", {
5820
- className: styles$L.body,
5820
+ className: styles$M.body,
5821
5821
  children: body3
5822
5822
  })]
5823
5823
  }), action2 && jsx("div", {
5824
- className: styles$L.action,
5824
+ className: styles$M.action,
5825
5825
  children: action2
5826
5826
  })]
5827
5827
  });
@@ -5943,7 +5943,7 @@ function isDuplicateOrder(err) {
5943
5943
  const root$4 = "_root_1lbpx_1";
5944
5944
  const title$m = "_title_1lbpx_10";
5945
5945
  const body$7 = "_body_1lbpx_15";
5946
- const styles$K = {
5946
+ const styles$L = {
5947
5947
  root: root$4,
5948
5948
  title: title$m,
5949
5949
  body: body$7
@@ -5953,13 +5953,13 @@ function ErrorState({ code, title: title2, body: body3, onRetry, retryLabel }) {
5953
5953
  const treatment = treatmentFor(code);
5954
5954
  const showRetry = Boolean(onRetry) && treatment.retriable;
5955
5955
  return jsxs("div", {
5956
- className: styles$K.root,
5956
+ className: styles$L.root,
5957
5957
  role: "alert",
5958
5958
  children: [jsx("h2", {
5959
- className: styles$K.title,
5959
+ className: styles$L.title,
5960
5960
  children: title2 ?? t(treatment.title)
5961
5961
  }), jsx("p", {
5962
- className: styles$K.body,
5962
+ className: styles$L.body,
5963
5963
  children: body3 ?? t(treatment.body)
5964
5964
  }), showRetry && jsx(Button, {
5965
5965
  variant: "secondary",
@@ -6007,7 +6007,7 @@ const rich = "_rich_5aafz_183";
6007
6007
  const description = "_description_5aafz_198";
6008
6008
  const thumb$3 = "_thumb_5aafz_216";
6009
6009
  const thumbImage = "_thumbImage_5aafz_227";
6010
- const styles$J = {
6010
+ const styles$K = {
6011
6011
  viewport,
6012
6012
  anchor,
6013
6013
  caret,
@@ -6130,41 +6130,41 @@ function ToastProvider({ children }) {
6130
6130
  return jsxs(ToastContext.Provider, {
6131
6131
  value: api,
6132
6132
  children: [children, jsx("div", {
6133
- className: styles$J.viewport,
6133
+ className: styles$K.viewport,
6134
6134
  ref: viewportRef,
6135
6135
  "aria-live": "polite",
6136
6136
  "aria-atomic": "false",
6137
6137
  children: toasts.map((t) => {
6138
6138
  const rich2 = Boolean(t.description || t.image);
6139
6139
  return jsxs("div", {
6140
- className: styles$J.anchor,
6140
+ className: styles$K.anchor,
6141
6141
  children: [t.anchor === "cart" && jsx("span", {
6142
- className: styles$J.caret,
6142
+ className: styles$K.caret,
6143
6143
  children: jsx(Caret, {})
6144
6144
  }), jsxs("div", {
6145
- className: [styles$J.toast, rich2 ? styles$J.rich : styles$J[t.tone]].join(" "),
6145
+ className: [styles$K.toast, rich2 ? styles$K.rich : styles$K[t.tone]].join(" "),
6146
6146
  role: "status",
6147
6147
  children: [t.image && jsx("span", {
6148
- className: styles$J.thumb,
6148
+ className: styles$K.thumb,
6149
6149
  children: jsx(ShopImage, {
6150
6150
  src: t.image,
6151
6151
  alt: "",
6152
6152
  fill: true,
6153
6153
  sizes: "40px",
6154
- className: styles$J.thumbImage
6154
+ className: styles$K.thumbImage
6155
6155
  })
6156
6156
  }), jsxs("span", {
6157
- className: styles$J.text,
6157
+ className: styles$K.text,
6158
6158
  children: [jsx("span", {
6159
- className: styles$J.message,
6159
+ className: styles$K.message,
6160
6160
  children: t.message
6161
6161
  }), t.description && jsx("span", {
6162
- className: styles$J.description,
6162
+ className: styles$K.description,
6163
6163
  children: t.description
6164
6164
  })]
6165
6165
  }), t.action && jsx("button", {
6166
6166
  type: "button",
6167
- className: styles$J.action,
6167
+ className: styles$K.action,
6168
6168
  onClick: () => {
6169
6169
  t.action?.onAction();
6170
6170
  dismiss(t.id);
@@ -6179,15 +6179,15 @@ function ToastProvider({ children }) {
6179
6179
  }
6180
6180
  const badge$4 = "_badge_156ya_2";
6181
6181
  const icon$3 = "_icon_156ya_18";
6182
- const styles$I = {
6182
+ const styles$J = {
6183
6183
  badge: badge$4,
6184
6184
  icon: icon$3
6185
6185
  };
6186
6186
  function SaleBadge({ pct }) {
6187
6187
  return jsxs("span", {
6188
- className: styles$I.badge,
6188
+ className: styles$J.badge,
6189
6189
  children: [jsxs("svg", {
6190
- className: styles$I.icon,
6190
+ className: styles$J.icon,
6191
6191
  width: "12",
6192
6192
  height: "12",
6193
6193
  viewBox: "0 0 24 24",
@@ -6217,7 +6217,7 @@ const badge$3 = "_badge_rvfx9_48";
6217
6217
  const price$4 = "_price_rvfx9_52";
6218
6218
  const compareAt = "_compareAt_rvfx9_57";
6219
6219
  const strikethrough = "_strikethrough_rvfx9_65";
6220
- const styles$H = {
6220
+ const styles$I = {
6221
6221
  root: root$3,
6222
6222
  center: center$1,
6223
6223
  end,
@@ -6234,12 +6234,12 @@ function PriceBlock({ price: price2, compareAt: compareAt2, discountPct: discoun
6234
6234
  const pct = discountPct$1 ?? discountPct(price2, compareAt2);
6235
6235
  const hasCompare = compareAt2 && compareAt2.amount > price2.amount;
6236
6236
  return jsxs("div", {
6237
- className: [styles$H.root, styles$H[size], styles$H[align], styles$H[variant]].join(" "),
6237
+ className: [styles$I.root, styles$I[size], styles$I[align], styles$I[variant]].join(" "),
6238
6238
  children: [jsx("span", {
6239
- className: styles$H.price,
6239
+ className: styles$I.price,
6240
6240
  children: format(price2)
6241
6241
  }), hasCompare && jsxs("span", {
6242
- className: styles$H.compareAt,
6242
+ className: styles$I.compareAt,
6243
6243
  children: [jsx("span", {
6244
6244
  className: "visually-hidden",
6245
6245
  children: `Was ${format(compareAt2)}`
@@ -6265,7 +6265,7 @@ const past = "_past_1cum7_113";
6265
6265
  const current = "_current_1cum7_118";
6266
6266
  const future = "_future_1cum7_133";
6267
6267
  const date$1 = "_date_1cum7_138";
6268
- const styles$G = {
6268
+ const styles$H = {
6269
6269
  timeline,
6270
6270
  row: row$8,
6271
6271
  line: line$3,
@@ -6284,39 +6284,39 @@ function OrderTimeline({ progress: progress2, estimatedDelivery, locale: localeP
6284
6284
  const locale = useLocale(localeProp);
6285
6285
  const currentIndex = progress2.findIndex((e) => e.current);
6286
6286
  return jsx("ol", {
6287
- className: styles$G.timeline,
6287
+ className: styles$H.timeline,
6288
6288
  children: progress2.map((entry, i) => {
6289
6289
  const state = stateOf(entry, i, currentIndex);
6290
6290
  const estimate = !entry.at && i === progress2.length - 1 && estimatedDelivery ? formatWindow(estimatedDelivery, locale) : void 0;
6291
6291
  return jsxs("li", {
6292
- className: styles$G.row,
6292
+ className: styles$H.row,
6293
6293
  "aria-current": entry.current ? "step" : void 0,
6294
6294
  children: [jsxs("div", {
6295
- className: styles$G.line,
6295
+ className: styles$H.line,
6296
6296
  children: [jsx("span", {
6297
- className: styles$G.marker,
6297
+ className: styles$H.marker,
6298
6298
  children: state === "future" ? jsx("span", {
6299
- className: styles$G.pending,
6299
+ className: styles$H.pending,
6300
6300
  "aria-hidden": "true"
6301
6301
  }) : jsx(StepTick, {
6302
6302
  tone: state
6303
6303
  })
6304
6304
  }), jsxs("span", {
6305
- className: styles$G.text,
6305
+ className: styles$H.text,
6306
6306
  children: [jsx("span", {
6307
- className: [styles$G.label, styles$G[state]].join(" "),
6307
+ className: [styles$H.label, styles$H[state]].join(" "),
6308
6308
  children: entry.label
6309
6309
  }), entry.at ? jsx("time", {
6310
- className: styles$G.date,
6310
+ className: styles$H.date,
6311
6311
  dateTime: entry.at,
6312
6312
  children: formatStepDate(entry.at, locale)
6313
6313
  }) : estimate && jsx("span", {
6314
- className: styles$G.date,
6314
+ className: styles$H.date,
6315
6315
  children: estimate
6316
6316
  })]
6317
6317
  })]
6318
6318
  }), i < progress2.length - 1 && jsx("span", {
6319
- className: styles$G.connector,
6319
+ className: styles$H.connector,
6320
6320
  "aria-hidden": "true"
6321
6321
  })]
6322
6322
  }, entry.step);
@@ -6330,7 +6330,7 @@ function stateOf(entry, index, currentIndex) {
6330
6330
  }
6331
6331
  function StepTick({ tone }) {
6332
6332
  return jsxs("svg", {
6333
- className: styles$G.tick,
6333
+ className: styles$H.tick,
6334
6334
  width: "28",
6335
6335
  height: "28",
6336
6336
  viewBox: "0 0 28 28",
@@ -6475,7 +6475,7 @@ const row$7 = "_row_1hsxt_16";
6475
6475
  const free = "_free_1hsxt_53";
6476
6476
  const pending$1 = "_pending_1hsxt_59";
6477
6477
  const discount = "_discount_1hsxt_69";
6478
- const styles$F = {
6478
+ const styles$G = {
6479
6479
  summary,
6480
6480
  row: row$7,
6481
6481
  free,
@@ -6504,11 +6504,11 @@ function OrderSummary({ pricing, deferred = [], hidden = [], rows = CART_ROWS, d
6504
6504
  const isDeferred = (key) => deferred.includes(key);
6505
6505
  const visible = rows.filter((row2) => !hidden.includes(row2.key)).filter((row2) => row2.key !== "discount" || discount2 !== void 0);
6506
6506
  return jsx("dl", {
6507
- className: styles$F.summary,
6507
+ className: styles$G.summary,
6508
6508
  children: visible.map(({ label: label2, key }) => {
6509
6509
  if (key === "discount" && discount2) {
6510
6510
  return jsxs("div", {
6511
- className: [styles$F.row, styles$F.discount].join(" "),
6511
+ className: [styles$G.row, styles$G.discount].join(" "),
6512
6512
  children: [jsx("dt", {
6513
6513
  children: t(label2)
6514
6514
  }), jsx("dd", {
@@ -6518,11 +6518,11 @@ function OrderSummary({ pricing, deferred = [], hidden = [], rows = CART_ROWS, d
6518
6518
  }
6519
6519
  const pending2 = key !== "total" && isDeferred(key);
6520
6520
  return jsxs("div", {
6521
- className: styles$F.row,
6521
+ className: styles$G.row,
6522
6522
  children: [jsx("dt", {
6523
6523
  children: t(label2)
6524
6524
  }), jsx("dd", {
6525
- className: pending2 ? styles$F.pending : void 0,
6525
+ className: pending2 ? styles$G.pending : void 0,
6526
6526
  children: pending2 ? t("Calculated at checkout") : renderValue(key, pricing, format, t)
6527
6527
  })]
6528
6528
  }, key);
@@ -6532,7 +6532,7 @@ function OrderSummary({ pricing, deferred = [], hidden = [], rows = CART_ROWS, d
6532
6532
  function renderValue(key, pricing, format, t) {
6533
6533
  if (key === "shipping" && pricing.shipping.amount === 0) {
6534
6534
  return jsx("span", {
6535
- className: styles$F.free,
6535
+ className: styles$G.free,
6536
6536
  children: t("Free")
6537
6537
  });
6538
6538
  }
@@ -6555,7 +6555,7 @@ const card$4 = "_card_1vmnm_173";
6555
6555
  const cardTitle = "_cardTitle_1vmnm_181";
6556
6556
  const cardBody = "_cardBody_1vmnm_193";
6557
6557
  const summaryCard = "_summaryCard_1vmnm_165";
6558
- const styles$E = {
6558
+ const styles$F = {
6559
6559
  lines: lines$1,
6560
6560
  line: line$2,
6561
6561
  thumb: thumb$2,
@@ -6594,42 +6594,42 @@ function OrderLine({ item: item2 }) {
6594
6594
  const pct = compareAt2 ? discountPct(item2.unit_price, compareAt2) : void 0;
6595
6595
  const details2 = detailsOf(item2, t);
6596
6596
  return jsxs("li", {
6597
- className: styles$E.line,
6597
+ className: styles$F.line,
6598
6598
  children: [jsx("div", {
6599
- className: styles$E.thumb,
6599
+ className: styles$F.thumb,
6600
6600
  children: item2.image ? jsx(ShopImage, {
6601
6601
  src: item2.image,
6602
6602
  alt: "",
6603
6603
  fill: true,
6604
6604
  sizes: "48px",
6605
- className: styles$E.image
6605
+ className: styles$F.image
6606
6606
  }) : jsx("div", {
6607
- className: styles$E.placeholder,
6607
+ className: styles$F.placeholder,
6608
6608
  "aria-hidden": "true"
6609
6609
  })
6610
6610
  }), jsxs("div", {
6611
- className: styles$E.lineBody,
6611
+ className: styles$F.lineBody,
6612
6612
  children: [jsxs("div", {
6613
- className: styles$E.lineText,
6613
+ className: styles$F.lineText,
6614
6614
  children: [jsx("span", {
6615
- className: styles$E.lineTitle,
6615
+ className: styles$F.lineTitle,
6616
6616
  children: item2.title ?? item2.sku
6617
6617
  }), jsxs("span", {
6618
- className: styles$E.lineMeta,
6618
+ className: styles$F.lineMeta,
6619
6619
  children: [details2.map((detail2) => jsx("span", {
6620
- className: styles$E.detail,
6620
+ className: styles$F.detail,
6621
6621
  children: detail2
6622
6622
  }, detail2)), pct !== void 0 && jsx(SaleBadge, {
6623
6623
  pct
6624
6624
  })]
6625
6625
  })]
6626
6626
  }), jsxs("span", {
6627
- className: styles$E.linePrice,
6627
+ className: styles$F.linePrice,
6628
6628
  children: [jsx("span", {
6629
- className: styles$E.paid,
6629
+ className: styles$F.paid,
6630
6630
  children: format(item2.line_total)
6631
6631
  }), compareAt2 && jsxs("span", {
6632
- className: styles$E.was,
6632
+ className: styles$F.was,
6633
6633
  children: [jsx("span", {
6634
6634
  className: "visually-hidden",
6635
6635
  children: `Was ${format(compareAt2)}`
@@ -6645,7 +6645,7 @@ function OrderLine({ item: item2 }) {
6645
6645
  function OrderLines({ order }) {
6646
6646
  const t = useT();
6647
6647
  return jsx("ul", {
6648
- className: styles$E.lines,
6648
+ className: styles$F.lines,
6649
6649
  "aria-label": t("Items"),
6650
6650
  children: order.items.map((item2) => jsx(OrderLine, {
6651
6651
  item: item2
@@ -6655,13 +6655,13 @@ function OrderLines({ order }) {
6655
6655
  function ShippingAddressCard({ order }) {
6656
6656
  const t = useT();
6657
6657
  return jsxs("section", {
6658
- className: styles$E.card,
6658
+ className: styles$F.card,
6659
6659
  "aria-label": t("Shipping address"),
6660
6660
  children: [jsx("h2", {
6661
- className: styles$E.cardTitle,
6661
+ className: styles$F.cardTitle,
6662
6662
  children: "Shipping address"
6663
6663
  }), jsx("p", {
6664
- className: styles$E.cardBody,
6664
+ className: styles$F.cardBody,
6665
6665
  children: formatAddress(order.ship_to)
6666
6666
  })]
6667
6667
  });
@@ -6669,10 +6669,10 @@ function ShippingAddressCard({ order }) {
6669
6669
  function OrderSummaryCard({ order }) {
6670
6670
  const t = useT();
6671
6671
  return jsxs("section", {
6672
- className: [styles$E.card, styles$E.summaryCard].join(" "),
6672
+ className: [styles$F.card, styles$F.summaryCard].join(" "),
6673
6673
  "aria-label": t("Order summary"),
6674
6674
  children: [jsx("h2", {
6675
- className: styles$E.cardTitle,
6675
+ className: styles$F.cardTitle,
6676
6676
  children: "Order summary"
6677
6677
  }), jsx(OrderSummary, {
6678
6678
  pricing: toPricing(order),
@@ -6709,7 +6709,7 @@ const handleSlot = "_handleSlot_1f3nh_23";
6709
6709
  const handle = "_handle_1f3nh_23";
6710
6710
  const closeSlot$1 = "_closeSlot_1f3nh_35";
6711
6711
  const close$2 = "_close_1f3nh_35";
6712
- const styles$D = {
6712
+ const styles$E = {
6713
6713
  header: header$6,
6714
6714
  slot,
6715
6715
  handleSlot,
@@ -6737,23 +6737,23 @@ function CloseIcon$1() {
6737
6737
  }
6738
6738
  function SheetHeader({ onClose, closeLabel }) {
6739
6739
  return jsxs("div", {
6740
- className: styles$D.header,
6740
+ className: styles$E.header,
6741
6741
  children: [jsx("div", {
6742
- className: styles$D.slot,
6742
+ className: styles$E.slot,
6743
6743
  "aria-hidden": "true"
6744
6744
  }), jsx("div", {
6745
- className: styles$D.handleSlot,
6745
+ className: styles$E.handleSlot,
6746
6746
  "aria-hidden": "true",
6747
6747
  children: jsx("div", {
6748
- className: styles$D.handle
6748
+ className: styles$E.handle
6749
6749
  })
6750
6750
  }), jsx("button", {
6751
6751
  type: "button",
6752
- className: styles$D.closeSlot,
6752
+ className: styles$E.closeSlot,
6753
6753
  onClick: onClose,
6754
6754
  "aria-label": closeLabel,
6755
6755
  children: jsx("span", {
6756
- className: styles$D.close,
6756
+ className: styles$E.close,
6757
6757
  children: jsx(CloseIcon$1, {})
6758
6758
  })
6759
6759
  })]
@@ -6809,7 +6809,7 @@ const radio = "_radio_7on4q_88";
6809
6809
  const label$1 = "_label_7on4q_118";
6810
6810
  const footer$1 = "_footer_7on4q_127";
6811
6811
  const error$1 = "_error_7on4q_135";
6812
- const styles$C = {
6812
+ const styles$D = {
6813
6813
  scrim: scrim$5,
6814
6814
  sheet: sheet$3,
6815
6815
  body: body$6,
@@ -6826,12 +6826,12 @@ function ReasonSheet({ title: title2, options: options2, ctaLabel, selected: sel
6826
6826
  const [choice, setChoice] = useState(selected2);
6827
6827
  useModalDialog(true, onClose, sheetRef);
6828
6828
  return jsx("div", {
6829
- className: styles$C.scrim,
6829
+ className: styles$D.scrim,
6830
6830
  onClick: onClose,
6831
6831
  children: jsxs(ShopSurface, {
6832
6832
  tone: "light",
6833
6833
  ref: sheetRef,
6834
- className: styles$C.sheet,
6834
+ className: styles$D.sheet,
6835
6835
  role: "dialog",
6836
6836
  "aria-modal": "true",
6837
6837
  "aria-labelledby": "reason-sheet-title",
@@ -6840,23 +6840,23 @@ function ReasonSheet({ title: title2, options: options2, ctaLabel, selected: sel
6840
6840
  onClose,
6841
6841
  closeLabel
6842
6842
  }), jsxs("div", {
6843
- className: styles$C.body,
6843
+ className: styles$D.body,
6844
6844
  children: [jsx("h2", {
6845
6845
  id: "reason-sheet-title",
6846
- className: styles$C.title,
6846
+ className: styles$D.title,
6847
6847
  children: title2
6848
6848
  }), jsx("div", {
6849
- className: styles$C.options,
6849
+ className: styles$D.options,
6850
6850
  role: "radiogroup",
6851
6851
  "aria-labelledby": "reason-sheet-title",
6852
6852
  children: options2.map((o) => jsxs("button", {
6853
6853
  type: "button",
6854
6854
  role: "radio",
6855
6855
  "aria-checked": o.value === choice,
6856
- className: styles$C.option,
6856
+ className: styles$D.option,
6857
6857
  onClick: () => setChoice(o.value),
6858
6858
  children: [jsx("span", {
6859
- className: styles$C.radio,
6859
+ className: styles$D.radio,
6860
6860
  "aria-hidden": "true",
6861
6861
  children: o.value === choice && jsxs("svg", {
6862
6862
  width: "20",
@@ -6877,15 +6877,15 @@ function ReasonSheet({ title: title2, options: options2, ctaLabel, selected: sel
6877
6877
  })]
6878
6878
  })
6879
6879
  }), jsx("span", {
6880
- className: styles$C.label,
6880
+ className: styles$D.label,
6881
6881
  children: o.label
6882
6882
  })]
6883
6883
  }, o.value))
6884
6884
  })]
6885
6885
  }), jsxs("div", {
6886
- className: styles$C.footer,
6886
+ className: styles$D.footer,
6887
6887
  children: [error2 && jsx("p", {
6888
- className: styles$C.error,
6888
+ className: styles$D.error,
6889
6889
  role: "alert",
6890
6890
  children: error2
6891
6891
  }), jsx(Button, {
@@ -6900,27 +6900,82 @@ function ReasonSheet({ title: title2, options: options2, ctaLabel, selected: sel
6900
6900
  })
6901
6901
  });
6902
6902
  }
6903
- const page$6 = "_page_1c7ro_7";
6904
- const titles$2 = "_titles_1c7ro_15";
6905
- const title$k = "_title_1c7ro_15";
6906
- const subtitle$7 = "_subtitle_1c7ro_30";
6907
- const list$2 = "_list_1c7ro_38";
6908
- const card$3 = "_card_1c7ro_48";
6909
- const checkSlot = "_checkSlot_1c7ro_61";
6910
- const check = "_check_1c7ro_61";
6911
- const row$6 = "_row_1c7ro_105";
6912
- const line$1 = "_line_1c7ro_113";
6913
- const thumb$1 = "_thumb_1c7ro_119";
6914
- const img$1 = "_img_1c7ro_129";
6915
- const placeholder$7 = "_placeholder_1c7ro_133";
6916
- const meta$2 = "_meta_1c7ro_138";
6917
- const name$2 = "_name_1c7ro_147";
6918
- const attrs$1 = "_attrs_1c7ro_159";
6919
- const price$3 = "_price_1c7ro_167";
6920
- const paid$2 = "_paid_1c7ro_176";
6921
- const was$3 = "_was_1c7ro_184";
6922
- const reason = "_reason_1c7ro_199";
6923
- const reasonSet = "_reasonSet_1c7ro_217";
6903
+ const line$1 = "_line_1v0et_6";
6904
+ const thumb$1 = "_thumb_1v0et_12";
6905
+ const img$1 = "_img_1v0et_22";
6906
+ const placeholder$7 = "_placeholder_1v0et_26";
6907
+ const meta$2 = "_meta_1v0et_31";
6908
+ const name$2 = "_name_1v0et_40";
6909
+ const attrs$1 = "_attrs_1v0et_52";
6910
+ const price$3 = "_price_1v0et_60";
6911
+ const paid$2 = "_paid_1v0et_69";
6912
+ const was$3 = "_was_1v0et_77";
6913
+ const styles$C = {
6914
+ line: line$1,
6915
+ thumb: thumb$1,
6916
+ img: img$1,
6917
+ placeholder: placeholder$7,
6918
+ meta: meta$2,
6919
+ name: name$2,
6920
+ attrs: attrs$1,
6921
+ price: price$3,
6922
+ paid: paid$2,
6923
+ was: was$3
6924
+ };
6925
+ function ReturnItemRow({ item: item2, className }) {
6926
+ const { format } = useMoney();
6927
+ return jsxs("div", {
6928
+ className: [styles$C.line, className ?? ""].join(" ").trim(),
6929
+ children: [jsx("div", {
6930
+ className: styles$C.thumb,
6931
+ children: item2.image ? jsx(ShopImage, {
6932
+ src: item2.image,
6933
+ alt: "",
6934
+ fill: true,
6935
+ sizes: "48px",
6936
+ className: styles$C.img
6937
+ }) : jsx("div", {
6938
+ className: styles$C.placeholder,
6939
+ "aria-hidden": "true"
6940
+ })
6941
+ }), jsxs("div", {
6942
+ className: styles$C.meta,
6943
+ children: [jsx("p", {
6944
+ className: styles$C.name,
6945
+ children: item2.title ?? item2.sku
6946
+ }), item2.attributes?.size && jsx("p", {
6947
+ className: styles$C.attrs,
6948
+ children: `Size: ${item2.attributes.size}`
6949
+ })]
6950
+ }), jsxs("div", {
6951
+ className: styles$C.price,
6952
+ children: [jsx("span", {
6953
+ className: styles$C.paid,
6954
+ children: format(item2.unit_price)
6955
+ }), item2.compare_at_unit_price && jsxs("span", {
6956
+ className: styles$C.was,
6957
+ children: [jsx("span", {
6958
+ className: "visually-hidden",
6959
+ children: `Was ${format(item2.compare_at_unit_price)}`
6960
+ }), jsx("span", {
6961
+ "aria-hidden": "true",
6962
+ children: format(item2.compare_at_unit_price)
6963
+ })]
6964
+ })]
6965
+ })]
6966
+ });
6967
+ }
6968
+ const page$6 = "_page_6yt5y_7";
6969
+ const titles$2 = "_titles_6yt5y_15";
6970
+ const title$k = "_title_6yt5y_15";
6971
+ const subtitle$7 = "_subtitle_6yt5y_30";
6972
+ const list$2 = "_list_6yt5y_38";
6973
+ const card$3 = "_card_6yt5y_48";
6974
+ const checkSlot = "_checkSlot_6yt5y_61";
6975
+ const check = "_check_6yt5y_61";
6976
+ const row$6 = "_row_6yt5y_105";
6977
+ const reason = "_reason_6yt5y_119";
6978
+ const reasonSet = "_reasonSet_6yt5y_137";
6924
6979
  const styles$B = {
6925
6980
  page: page$6,
6926
6981
  titles: titles$2,
@@ -6931,16 +6986,6 @@ const styles$B = {
6931
6986
  checkSlot,
6932
6987
  check,
6933
6988
  row: row$6,
6934
- line: line$1,
6935
- thumb: thumb$1,
6936
- img: img$1,
6937
- placeholder: placeholder$7,
6938
- meta: meta$2,
6939
- name: name$2,
6940
- attrs: attrs$1,
6941
- price: price$3,
6942
- paid: paid$2,
6943
- was: was$3,
6944
6989
  reason,
6945
6990
  reasonSet
6946
6991
  };
@@ -7005,7 +7050,6 @@ function unitsLeft(item2) {
7005
7050
  return item2.qty - item2.cancelled_qty - item2.refunded_qty - (item2.returned_qty ?? 0);
7006
7051
  }
7007
7052
  function ReturnItemsView({ order, onSubmit, busy = false }) {
7008
- const { format } = useMoney();
7009
7053
  const [chosen, setChosen] = useState({});
7010
7054
  const [reasonFor, setReasonFor] = useState(null);
7011
7055
  const returnable = useMemo(() => order.items.filter((i) => unitsLeft(i) > 0), [order.items]);
@@ -7070,39 +7114,8 @@ function ReturnItemsView({ order, onSubmit, busy = false }) {
7070
7114
  })
7071
7115
  }), jsxs("div", {
7072
7116
  className: styles$B.row,
7073
- children: [jsxs("div", {
7074
- className: styles$B.line,
7075
- children: [jsx("div", {
7076
- className: styles$B.thumb,
7077
- children: item2.image ? jsx(ShopImage, {
7078
- src: item2.image,
7079
- alt: "",
7080
- fill: true,
7081
- sizes: "48px",
7082
- className: styles$B.img
7083
- }) : jsx("div", {
7084
- className: styles$B.placeholder,
7085
- "aria-hidden": "true"
7086
- })
7087
- }), jsxs("div", {
7088
- className: styles$B.meta,
7089
- children: [jsx("p", {
7090
- className: styles$B.name,
7091
- children: item2.title ?? item2.sku
7092
- }), item2.attributes?.size && jsx("p", {
7093
- className: styles$B.attrs,
7094
- children: `Size: ${item2.attributes.size}`
7095
- })]
7096
- }), jsxs("div", {
7097
- className: styles$B.price,
7098
- children: [jsx("span", {
7099
- className: styles$B.paid,
7100
- children: format(item2.unit_price)
7101
- }), item2.compare_at_unit_price && jsx("span", {
7102
- className: styles$B.was,
7103
- children: format(item2.compare_at_unit_price)
7104
- })]
7105
- })]
7117
+ children: [jsx(ReturnItemRow, {
7118
+ item: item2
7106
7119
  }), jsxs("button", {
7107
7120
  type: "button",
7108
7121
  className: `${styles$B.reason} ${reason2 ? styles$B.reasonSet : ""}`,
@@ -7141,22 +7154,26 @@ function ReturnItemsView({ order, onSubmit, busy = false }) {
7141
7154
  })]
7142
7155
  });
7143
7156
  }
7144
- const page$5 = "_page_1r0ea_7";
7145
- const intro$1 = "_intro_1r0ea_15";
7146
- const title$j = "_title_1r0ea_22";
7147
- const subtitle$6 = "_subtitle_1r0ea_31";
7148
- const card$2 = "_card_1r0ea_39";
7149
- const step = "_step_1r0ea_49";
7150
- const step2 = "_step2_1r0ea_56";
7151
- const stepHead = "_stepHead_1r0ea_62";
7152
- const number = "_number_1r0ea_69";
7153
- const stepTitle = "_stepTitle_1r0ea_84";
7154
- const body$5 = "_body_1r0ea_95";
7155
- const body2 = "_body2_1r0ea_103";
7156
- const download = "_download_1r0ea_121";
7157
- const note$1 = "_note_1r0ea_143";
7157
+ const page$5 = "_page_51f4e_7";
7158
+ const top = "_top_51f4e_20";
7159
+ const items$2 = "_items_51f4e_27";
7160
+ const intro$1 = "_intro_51f4e_33";
7161
+ const title$j = "_title_51f4e_40";
7162
+ const subtitle$6 = "_subtitle_51f4e_49";
7163
+ const card$2 = "_card_51f4e_57";
7164
+ const step = "_step_51f4e_67";
7165
+ const step2 = "_step2_51f4e_74";
7166
+ const stepHead = "_stepHead_51f4e_80";
7167
+ const number = "_number_51f4e_87";
7168
+ const stepTitle = "_stepTitle_51f4e_102";
7169
+ const body$5 = "_body_51f4e_113";
7170
+ const body2 = "_body2_51f4e_121";
7171
+ const download = "_download_51f4e_139";
7172
+ const note$1 = "_note_51f4e_161";
7158
7173
  const styles$A = {
7159
7174
  page: page$5,
7175
+ top,
7176
+ items: items$2,
7160
7177
  intro: intro$1,
7161
7178
  title: title$j,
7162
7179
  subtitle: subtitle$6,
@@ -7175,59 +7192,67 @@ function ReturnLabelView({ ret, onDone }) {
7175
7192
  return jsxs("div", {
7176
7193
  className: styles$A.page,
7177
7194
  children: [jsxs("div", {
7178
- className: styles$A.intro,
7179
- children: [jsx("h1", {
7180
- className: styles$A.title,
7181
- children: "We’ve generated your return label"
7182
- }), jsx("p", {
7183
- className: styles$A.subtitle,
7184
- children: "Follow the instructions below to complete your return"
7185
- })]
7186
- }), jsxs("div", {
7187
- className: styles$A.card,
7188
- children: [jsxs("section", {
7189
- className: styles$A.step,
7190
- children: [jsxs("div", {
7191
- className: styles$A.stepHead,
7192
- children: [jsx("span", {
7193
- className: styles$A.number,
7194
- "aria-hidden": "true",
7195
- children: "1"
7196
- }), jsx("h2", {
7197
- className: styles$A.stepTitle,
7198
- children: "Download your return label"
7199
- })]
7195
+ className: styles$A.top,
7196
+ children: [jsx("div", {
7197
+ className: styles$A.items,
7198
+ children: ret.items.map((item2) => jsx(ReturnItemRow, {
7199
+ item: item2
7200
+ }, item2.line_ref))
7201
+ }), jsxs("div", {
7202
+ className: styles$A.intro,
7203
+ children: [jsx("h1", {
7204
+ className: styles$A.title,
7205
+ children: "We’ve generated your return label"
7200
7206
  }), jsx("p", {
7201
- className: styles$A.body,
7202
- children: "Tap the button below to download your pre-paid return label"
7203
- }), ret.label_url && jsxs("a", {
7204
- className: styles$A.download,
7205
- href: ret.label_url,
7206
- target: "_blank",
7207
- rel: "noopener noreferrer",
7208
- children: ["Download return label", jsx("span", {
7209
- className: "visually-hidden",
7210
- children: " (opens in a new tab)"
7211
- })]
7212
- }), ret.label_email && jsxs("p", {
7213
- className: styles$A.note,
7214
- children: ["You’ll receive a shipping label PDF to your email as well.", jsx("br", {}), ret.label_email]
7207
+ className: styles$A.subtitle,
7208
+ children: "Follow the instructions below to complete your return"
7215
7209
  })]
7216
- }), jsxs("section", {
7217
- className: styles$A.step2,
7218
- children: [jsxs("div", {
7219
- className: styles$A.stepHead,
7220
- children: [jsx("span", {
7221
- className: styles$A.number,
7222
- "aria-hidden": "true",
7223
- children: "2"
7224
- }), jsx("h2", {
7225
- className: styles$A.stepTitle,
7226
- children: "Pack and ship the item"
7210
+ }), jsxs("div", {
7211
+ className: styles$A.card,
7212
+ children: [jsxs("section", {
7213
+ className: styles$A.step,
7214
+ children: [jsxs("div", {
7215
+ className: styles$A.stepHead,
7216
+ children: [jsx("span", {
7217
+ className: styles$A.number,
7218
+ "aria-hidden": "true",
7219
+ children: "1"
7220
+ }), jsx("h2", {
7221
+ className: styles$A.stepTitle,
7222
+ children: "Download your return label"
7223
+ })]
7224
+ }), jsx("p", {
7225
+ className: styles$A.body,
7226
+ children: "Tap the button below to download your pre-paid return label"
7227
+ }), ret.label_url && jsxs("a", {
7228
+ className: styles$A.download,
7229
+ href: ret.label_url,
7230
+ target: "_blank",
7231
+ rel: "noopener noreferrer",
7232
+ children: ["Download return label", jsx("span", {
7233
+ className: "visually-hidden",
7234
+ children: " (opens in a new tab)"
7235
+ })]
7236
+ }), ret.label_email && jsxs("p", {
7237
+ className: styles$A.note,
7238
+ children: ["You’ll receive a shipping label PDF to your email as well.", jsx("br", {}), ret.label_email]
7239
+ })]
7240
+ }), jsxs("section", {
7241
+ className: styles$A.step2,
7242
+ children: [jsxs("div", {
7243
+ className: styles$A.stepHead,
7244
+ children: [jsx("span", {
7245
+ className: styles$A.number,
7246
+ "aria-hidden": "true",
7247
+ children: "2"
7248
+ }), jsx("h2", {
7249
+ className: styles$A.stepTitle,
7250
+ children: "Pack and ship the item"
7251
+ })]
7252
+ }), jsxs("p", {
7253
+ className: styles$A.body2,
7254
+ children: ["Repackage the item securely and attach the return label to the outside of the package.", jsx("br", {}), "Drop it off at your local carrier or post office."]
7227
7255
  })]
7228
- }), jsxs("p", {
7229
- className: styles$A.body2,
7230
- children: ["Repackage the item securely and attach the return label to the outside of the package.", jsx("br", {}), "Drop it off at your local carrier or post office."]
7231
7256
  })]
7232
7257
  })]
7233
7258
  }), onDone && jsx(Button, {
@@ -10741,8 +10766,8 @@ function useDocumentSnap(ref, enabled = true) {
10741
10766
  const previousPadding = root2.style.scrollPaddingTop;
10742
10767
  let timer2;
10743
10768
  const syncPadding = () => {
10744
- const top = getComputedStyle(el).getPropertyValue("--showcase-top").trim();
10745
- root2.style.scrollPaddingTop = top === "" ? "0px" : top;
10769
+ const top2 = getComputedStyle(el).getPropertyValue("--showcase-top").trim();
10770
+ root2.style.scrollPaddingTop = top2 === "" ? "0px" : top2;
10746
10771
  };
10747
10772
  const schedule = () => {
10748
10773
  if (timer2) clearTimeout(timer2);
@@ -11100,8 +11125,8 @@ function useScrolledUnder(enabled) {
11100
11125
  if (!enabled) return;
11101
11126
  const read = (event) => {
11102
11127
  const target = event?.target;
11103
- const top = target && target !== document && target instanceof HTMLElement ? target.scrollTop : window.scrollY || document.documentElement.scrollTop;
11104
- setScrolled(top > 0);
11128
+ const top2 = target && target !== document && target instanceof HTMLElement ? target.scrollTop : window.scrollY || document.documentElement.scrollTop;
11129
+ setScrolled(top2 > 0);
11105
11130
  };
11106
11131
  read();
11107
11132
  document.addEventListener("scroll", read, {