@nok-integration/storefront-react 0.20.12 → 0.20.13

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
@@ -4386,16 +4386,6 @@ export declare interface OrderSummaryProps {
4386
4386
  discount?: Money;
4387
4387
  }
4388
4388
 
4389
- /**
4390
- * The order progress timeline (Figma `mobile/order/timeline-row`, 3879:13868).
4391
- *
4392
- * The steps come from the engine rather than being enumerated here, so the screen renders
4393
- * what the order can actually evidence — three rows for a normal delivery, four when a
4394
- * carrier reports the parcel out for delivery, and a cancelled tail when it applies.
4395
- *
4396
- * An ordered list, because it is one: the rows have a sequence and a screen reader should
4397
- * announce it as such.
4398
- */
4399
4389
  export declare function OrderTimeline({ progress, estimatedDelivery, locale: localeProp, }: OrderTimelineProps): JSX.Element;
4400
4390
 
4401
4391
  export declare interface OrderTimelineProps {
package/dist/index.mjs CHANGED
@@ -6110,7 +6110,20 @@ const ES = {
6110
6110
  "You’ll receive a shipping label PDF to your email as well.": "Recibirá un PDF de la etiqueta de envío en su correo electrónico.",
6111
6111
  "{0} photographs": "{0} fotografías",
6112
6112
  "{0}, opens in a new tab": "{0}, se abre en una pestaña nueva",
6113
- "Zip Ups": "Sudaderas con cremalleras"
6113
+ "Zip Ups": "Sudaderas con cremalleras",
6114
+ "Added to cart": "Añadido a la cesta",
6115
+ "Order placed": "Pedido realizado",
6116
+ "On its way": "En camino",
6117
+ "Out for delivery": "En reparto",
6118
+ "Estimated delivery": "Entrega estimada",
6119
+ "Nothing matches these filters.": "Nada coincide con estos filtros.",
6120
+ "Your items will show up here once you've added to your cart.": "Sus artículos aparecerán aquí cuando los añada a la cesta.",
6121
+ "Complete your DAZN sign-up to check out. Your cart is saved.": "Complete su registro en DAZN para finalizar la compra. Su cesta está guardada.",
6122
+ "Your orders will show up here once you've shopped.": "Sus pedidos aparecerán aquí cuando haya comprado.",
6123
+ "We'll let you know": "Le avisaremos",
6124
+ "{0} — as soon as it is back": "{0} — en cuanto vuelva a estar disponible",
6125
+ "Size {0}": "Talla {0}",
6126
+ "On the way": "En camino"
6114
6127
  };
6115
6128
  const CATALOGUES = {
6116
6129
  es: ES
@@ -6710,8 +6723,23 @@ const styles$H = {
6710
6723
  future,
6711
6724
  date: date$1
6712
6725
  };
6726
+ const STEP_LABELS = {
6727
+ packing: "Order placed",
6728
+ on_its_way: "On its way",
6729
+ out_for_delivery: "Out for delivery",
6730
+ delivered: "Delivered",
6731
+ cancelled: "Order cancelled"
6732
+ };
6733
+ const PENDING_LABELS = {
6734
+ delivered: "Estimated delivery"
6735
+ };
6736
+ function labelFor(entry) {
6737
+ if (entry.label) return entry.label;
6738
+ return (entry.at ? void 0 : PENDING_LABELS[entry.step]) ?? STEP_LABELS[entry.step] ?? "";
6739
+ }
6713
6740
  function OrderTimeline({ progress: progress2, estimatedDelivery, locale: localeProp }) {
6714
6741
  const locale = useLocale(localeProp);
6742
+ const t = useT();
6715
6743
  const currentIndex = progress2.findIndex((e) => e.current);
6716
6744
  return jsx("ol", {
6717
6745
  className: styles$H.timeline,
@@ -6735,7 +6763,7 @@ function OrderTimeline({ progress: progress2, estimatedDelivery, locale: localeP
6735
6763
  className: styles$H.text,
6736
6764
  children: [jsx("span", {
6737
6765
  className: [styles$H.label, styles$H[state]].join(" "),
6738
- children: entry.label
6766
+ children: t(labelFor(entry))
6739
6767
  }), entry.at ? jsx("time", {
6740
6768
  className: styles$H.date,
6741
6769
  dateTime: entry.at,
@@ -7100,7 +7128,7 @@ function OrderItemsCard({ order }) {
7100
7128
  className: styles$F.itemsHeader,
7101
7129
  children: [jsx("h2", {
7102
7130
  className: styles$F.itemsTitle,
7103
- children: "Items"
7131
+ children: t("Items")
7104
7132
  }), jsx("span", {
7105
7133
  className: styles$F.itemsCount,
7106
7134
  children: itemCount
@@ -7120,7 +7148,7 @@ function ShippingAddressCard({ order }) {
7120
7148
  "aria-label": t("Shipping address"),
7121
7149
  children: [jsx("h2", {
7122
7150
  className: styles$F.cardTitle,
7123
- children: "Shipping address"
7151
+ children: t("Shipping address")
7124
7152
  }), jsx("p", {
7125
7153
  className: styles$F.cardBody,
7126
7154
  children: formatAddress(order.ship_to)
@@ -8620,13 +8648,13 @@ function OrderListContent({ onOpenOrder, onOpenReturn, onStartShopping, locale:
8620
8648
  className: styles$v.empty,
8621
8649
  children: jsx(EmptyState, {
8622
8650
  title: t("Nothing here yet"),
8623
- body: "Your orders will show up here once you've shopped.",
8651
+ body: t("Your orders will show up here once you've shopped."),
8624
8652
  ...onStartShopping ? {
8625
8653
  action: jsx("button", {
8626
8654
  type: "button",
8627
8655
  className: styles$v.cta,
8628
8656
  onClick: onStartShopping,
8629
- children: "Continue shopping"
8657
+ children: t("Continue shopping")
8630
8658
  })
8631
8659
  } : {}
8632
8660
  })
@@ -8891,6 +8919,7 @@ function ProductTile({ product, priority, size = "default" }) {
8891
8919
  const anyInStock = product.variants.length === 0 ? true : product.variants.some((v) => v.in_stock);
8892
8920
  const topBadge2 = product.badges?.[0];
8893
8921
  const pct = discountPct(product.price, product.compare_at);
8922
+ const t = useT();
8894
8923
  return jsxs(ShopLink, {
8895
8924
  to: `/product/${encodeURIComponent(product.sku)}`,
8896
8925
  className: [styles$t.tile, size === "large" ? styles$t.large : ""].join(" "),
@@ -8916,7 +8945,7 @@ function ProductTile({ product, priority, size = "default" }) {
8916
8945
  })
8917
8946
  }), !anyInStock && jsx("span", {
8918
8947
  className: styles$t.oos,
8919
- children: "Out of stock"
8948
+ children: t("Out of stock")
8920
8949
  })]
8921
8950
  }), jsxs("div", {
8922
8951
  className: styles$t.bottom,
@@ -9011,7 +9040,7 @@ function ProductGallery({ title: title2, product }) {
9011
9040
  })
9012
9041
  }), i === 0 && !inStock && jsx("span", {
9013
9042
  className: styles$s.oos,
9014
- children: "Out of stock"
9043
+ children: t("Out of stock")
9015
9044
  })]
9016
9045
  }, src ?? i))
9017
9046
  }), jsxs("div", {
@@ -9077,7 +9106,7 @@ function FilterBar({ options: options2, active, onToggle, onClear }) {
9077
9106
  type: "button",
9078
9107
  className: styles$r.clear,
9079
9108
  onClick: onClear,
9080
- children: "Clear"
9109
+ children: t("Clear")
9081
9110
  })]
9082
9111
  });
9083
9112
  }
@@ -9137,11 +9166,11 @@ function ProductGrid({ category, initialProducts, initialCursor, filters = [] })
9137
9166
  onClear: () => setActive([])
9138
9167
  }), visible.length === 0 ? jsx(EmptyState, {
9139
9168
  title: t("No products"),
9140
- body: "Nothing matches these filters.",
9169
+ body: t("Nothing matches these filters."),
9141
9170
  action: active.length > 0 ? jsx(Button, {
9142
9171
  variant: "secondary",
9143
9172
  onClick: () => setActive([]),
9144
- children: "Clear filters"
9173
+ children: t("Clear filters")
9145
9174
  }) : void 0
9146
9175
  }) : jsx("ul", {
9147
9176
  className: styles$q.grid,
@@ -9181,6 +9210,7 @@ const styles$p = {
9181
9210
  inset
9182
9211
  };
9183
9212
  function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
9213
+ const t = useT();
9184
9214
  if (products.length === 0) return null;
9185
9215
  return jsxs("section", {
9186
9216
  className: [styles$p.rail, inset2 ? styles$p.inset : ""].join(" "),
@@ -9193,7 +9223,7 @@ function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
9193
9223
  }), seeAllTo && jsx(ShopLink, {
9194
9224
  className: styles$p.seeAll,
9195
9225
  to: seeAllTo,
9196
- children: "See all"
9226
+ children: t("See all")
9197
9227
  })]
9198
9228
  }), jsx("ul", {
9199
9229
  className: styles$p.track,
@@ -9515,7 +9545,7 @@ function CartLineItem({ item: item2, title: title2, image: image2, compareAt: co
9515
9545
  }), soldOut ? jsx("span", {
9516
9546
  className: styles$m.oos,
9517
9547
  id: noticeId,
9518
- children: "Out of stock"
9548
+ children: t("Out of stock")
9519
9549
  }) : pct !== void 0 && jsx("span", {
9520
9550
  className: styles$m.saleBadge,
9521
9551
  children: jsx(SaleBadge, {
@@ -9614,7 +9644,7 @@ function ShippingInfo() {
9614
9644
  })]
9615
9645
  }), jsx("p", {
9616
9646
  className: styles$l.label,
9617
- children: "Standard or express delivery"
9647
+ children: t("Standard or express delivery")
9618
9648
  })]
9619
9649
  }), jsx("div", {
9620
9650
  className: styles$l.divider,
@@ -9643,7 +9673,7 @@ function ShippingInfo() {
9643
9673
  })]
9644
9674
  }), jsx("p", {
9645
9675
  className: styles$l.label,
9646
- children: "14 days returns"
9676
+ children: t("14 days returns")
9647
9677
  })]
9648
9678
  })]
9649
9679
  });
@@ -9826,16 +9856,16 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
9826
9856
  if (state === "empty" || !cart2) {
9827
9857
  return jsx(EmptyState, {
9828
9858
  title: t("Nothing here yet"),
9829
- body: "Your items will show up here once you've added to your cart.",
9859
+ body: t("Your items will show up here once you've added to your cart."),
9830
9860
  action: onContinueShopping ? jsx(Button, {
9831
9861
  variant: "primary",
9832
9862
  onClick: onContinueShopping,
9833
- children: "Continue shopping"
9863
+ children: t("Continue shopping")
9834
9864
  }) : jsx(ShopLink, {
9835
9865
  to: "/",
9836
9866
  children: jsx(Button, {
9837
9867
  variant: "primary",
9838
- children: "Continue shopping"
9868
+ children: t("Continue shopping")
9839
9869
  })
9840
9870
  })
9841
9871
  });
@@ -10254,14 +10284,14 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
10254
10284
  children: [jsx("h2", {
10255
10285
  id: "size-heading",
10256
10286
  className: styles$g.title,
10257
- children: "Size"
10287
+ children: t("Size")
10258
10288
  }), showGuide && jsxs("button", {
10259
10289
  type: "button",
10260
10290
  className: styles$g.sizeGuide,
10261
10291
  onClick: () => setGuideOpen(true),
10262
10292
  "aria-haspopup": "dialog",
10263
10293
  "aria-expanded": guideOpen,
10264
- children: ["Size guide", jsxs("svg", {
10294
+ children: [t("Size guide"), jsxs("svg", {
10265
10295
  className: styles$g.info,
10266
10296
  width: "12",
10267
10297
  height: "12",
@@ -10312,7 +10342,7 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
10312
10342
  }), error2 && jsx("p", {
10313
10343
  className: styles$g.error,
10314
10344
  role: "alert",
10315
- children: "Please select a size"
10345
+ children: t("Please select a size")
10316
10346
  }), lowStock2 && !error2 && jsx("p", {
10317
10347
  className: styles$g.lowStock,
10318
10348
  role: "status",
@@ -10394,7 +10424,7 @@ function ColorSelector({ colours, selected: selected2, onSelect }) {
10394
10424
  }), soldOut && jsx("span", {
10395
10425
  className: styles$f.scrim,
10396
10426
  "aria-hidden": "true",
10397
- children: "Out of stock"
10427
+ children: t("Out of stock")
10398
10428
  })]
10399
10429
  }), lowStock2 && jsx("span", {
10400
10430
  className: styles$f.stockBadge,
@@ -10422,7 +10452,7 @@ const styles$e = {
10422
10452
  };
10423
10453
  function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10424
10454
  const t = useT();
10425
- function labelFor(variant) {
10455
+ function labelFor2(variant) {
10426
10456
  if (labelAttribute && variant.attributes[labelAttribute]) {
10427
10457
  return variant.attributes[labelAttribute];
10428
10458
  }
@@ -10433,7 +10463,7 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10433
10463
  className: styles$e.fieldset,
10434
10464
  children: [jsx("legend", {
10435
10465
  className: styles$e.legend,
10436
- children: "Select an option"
10466
+ children: t("Select an option")
10437
10467
  }), jsx("div", {
10438
10468
  className: styles$e.options,
10439
10469
  role: "radiogroup",
@@ -10449,7 +10479,7 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10449
10479
  disabled: disabled2,
10450
10480
  className: [styles$e.option, selected2 ? styles$e.selected : "", disabled2 ? styles$e.disabled : ""].filter(Boolean).join(" "),
10451
10481
  onClick: () => !disabled2 && onSelect(variant.sku),
10452
- children: [labelFor(variant), disabled2 && jsx("span", {
10482
+ children: [labelFor2(variant), disabled2 && jsx("span", {
10453
10483
  className: "visually-hidden",
10454
10484
  children: " (out of stock)"
10455
10485
  })]
@@ -10500,6 +10530,7 @@ function ProductDetails({ description: description2 }) {
10500
10530
  observer?.disconnect();
10501
10531
  };
10502
10532
  }, [expanded, description2]);
10533
+ const t = useT();
10503
10534
  if (paragraphs.length === 0) return null;
10504
10535
  return jsxs("section", {
10505
10536
  className: styles$d.root,
@@ -10509,7 +10540,7 @@ function ProductDetails({ description: description2 }) {
10509
10540
  children: [jsx("h2", {
10510
10541
  id: "details-heading",
10511
10542
  className: styles$d.title,
10512
- children: "Product details"
10543
+ children: t("Product details")
10513
10544
  }), jsx("div", {
10514
10545
  ref: bodyRef,
10515
10546
  className: [styles$d.body, expanded ? "" : styles$d.clamped].join(" "),
@@ -10758,8 +10789,8 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
10758
10789
  type: "stock_alert_requested",
10759
10790
  sku: alertSku
10760
10791
  });
10761
- toast2.show("We'll let you know", {
10762
- description: `${product.title} — as soon as it is back`,
10792
+ toast2.show(t("We'll let you know"), {
10793
+ description: t("{0} — as soon as it is back", product.title),
10763
10794
  image: product.media[0]
10764
10795
  });
10765
10796
  } catch (err) {
@@ -10812,8 +10843,8 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
10812
10843
  const variant = variants.find((v) => v.sku === sku);
10813
10844
  const size = variant?.attributes.size ?? selectedSize;
10814
10845
  setAdded((current2) => current2.includes(sku) ? current2 : [...current2, sku]);
10815
- toast2.show("Added to cart", {
10816
- description: [product.title, size && `Size ${size}`].filter(Boolean).join(" · "),
10846
+ toast2.show(t("Added to cart"), {
10847
+ description: [product.title, size && t("Size {0}", size)].filter(Boolean).join(" · "),
10817
10848
  image: variant?.image ?? product.media[0],
10818
10849
  action: cartSheet || navigate ? {
10819
10850
  label: t("View cart"),
@@ -10940,6 +10971,7 @@ const styles$9 = {
10940
10971
  function PcpHero({ hero: hero2 }) {
10941
10972
  const heroRef = useRef(null);
10942
10973
  useTopOffset(heroRef, "--hero-top");
10974
+ const t = useT();
10943
10975
  return jsxs("section", {
10944
10976
  ref: heroRef,
10945
10977
  className: [styles$9.hero, hero2.image ? "" : styles$9.noImage].join(" "),
@@ -10964,10 +10996,10 @@ function PcpHero({ hero: hero2 }) {
10964
10996
  className: styles$9.text,
10965
10997
  children: [jsx("h1", {
10966
10998
  className: styles$9.title,
10967
- children: hero2.title
10999
+ children: t(hero2.title)
10968
11000
  }), hero2.subtitle && jsx("p", {
10969
11001
  className: styles$9.subtitle,
10970
- children: hero2.subtitle
11002
+ children: t(hero2.subtitle)
10971
11003
  })]
10972
11004
  })]
10973
11005
  });
@@ -11147,6 +11179,7 @@ const styles$4 = {
11147
11179
  row: row$1
11148
11180
  };
11149
11181
  function ExploreList({ title: title2, links }) {
11182
+ const t = useT();
11150
11183
  return jsxs("section", {
11151
11184
  className: styles$4.section,
11152
11185
  "aria-label": title2,
@@ -11160,7 +11193,7 @@ function ExploreList({ title: title2, links }) {
11160
11193
  to: `/category/${encodeURIComponent(l.code)}`,
11161
11194
  className: styles$4.row,
11162
11195
  children: [jsx("span", {
11163
- children: l.label
11196
+ children: t(l.label)
11164
11197
  }), jsx("svg", {
11165
11198
  width: "16",
11166
11199
  height: "16",
@@ -11195,10 +11228,11 @@ const styles$3 = {
11195
11228
  grid
11196
11229
  };
11197
11230
  function Block({ block }) {
11231
+ const t = useT();
11198
11232
  switch (block.kind) {
11199
11233
  case "rail":
11200
11234
  return jsx(RailCarousel, {
11201
- title: block.title,
11235
+ title: t(block.title),
11202
11236
  products: block.products
11203
11237
  });
11204
11238
  case "lifestyle_text":
@@ -11211,7 +11245,7 @@ function Block({ block }) {
11211
11245
  className: styles$3.featured,
11212
11246
  children: [block.title && jsx("h2", {
11213
11247
  className: styles$3.blockTitle,
11214
- children: block.title
11248
+ children: t(block.title)
11215
11249
  }), jsx(ProductTile, {
11216
11250
  product: block.product,
11217
11251
  priority: true,
@@ -11220,7 +11254,7 @@ function Block({ block }) {
11220
11254
  });
11221
11255
  case "product_gallery":
11222
11256
  return jsx(ProductGallery, {
11223
- title: block.title,
11257
+ title: t(block.title),
11224
11258
  product: block.product
11225
11259
  });
11226
11260
  case "lifestyle_image":
@@ -11233,7 +11267,7 @@ function Block({ block }) {
11233
11267
  className: styles$3.gridBlock,
11234
11268
  children: [block.title && jsx("h2", {
11235
11269
  className: styles$3.blockTitle,
11236
- children: block.title
11270
+ children: t(block.title)
11237
11271
  }), jsx("ul", {
11238
11272
  className: styles$3.grid,
11239
11273
  children: block.products.map((p) => jsx("li", {
@@ -11253,7 +11287,7 @@ function Block({ block }) {
11253
11287
  });
11254
11288
  case "explore":
11255
11289
  return jsx(ExploreList, {
11256
- title: block.title,
11290
+ title: t(block.title),
11257
11291
  links: block.links
11258
11292
  });
11259
11293
  default:
@@ -11583,9 +11617,10 @@ const FALLBACK_PANELS = [{
11583
11617
  image: "/figma/home/tshirts-poster.jpg"
11584
11618
  }];
11585
11619
  function CategoryPanel({ panel: panel2 }) {
11620
+ const t = useT();
11586
11621
  return jsxs("section", {
11587
11622
  className: styles$2.panel,
11588
- "aria-label": panel2.title,
11623
+ "aria-label": t(panel2.title),
11589
11624
  ...panel2.focalY === void 0 ? {} : {
11590
11625
  style: {
11591
11626
  "--slide-focal-y": `${panel2.focalY}%`
@@ -11608,16 +11643,16 @@ function CategoryPanel({ panel: panel2 }) {
11608
11643
  className: styles$2.copy,
11609
11644
  children: [jsx("h2", {
11610
11645
  className: styles$2.title,
11611
- children: panel2.title
11646
+ children: t(panel2.title)
11612
11647
  }), jsx("p", {
11613
11648
  className: styles$2.subtitle,
11614
- children: panel2.subtitle
11649
+ children: t(panel2.subtitle)
11615
11650
  })]
11616
11651
  }), jsx(ShopLink, {
11617
11652
  to: panel2.to,
11618
11653
  className: styles$2.cta,
11619
- "aria-label": `${panel2.title} — ${panel2.cta}`,
11620
- children: panel2.cta
11654
+ "aria-label": `${t(panel2.title)} — ${t(panel2.cta)}`,
11655
+ children: t(panel2.cta)
11621
11656
  })]
11622
11657
  })]
11623
11658
  });
@@ -11713,16 +11748,16 @@ function HomeShowcase() {
11713
11748
  className: styles$2.logo
11714
11749
  }), jsx("h1", {
11715
11750
  className: styles$2.heroTitle,
11716
- children: "DAZN SHOP"
11751
+ children: t("DAZN SHOP")
11717
11752
  }), jsx("p", {
11718
11753
  className: styles$2.heroSub,
11719
- children: "Fresh drops inspired by sport, culture, and everyday movement"
11754
+ children: t("Fresh drops inspired by sport, culture, and everyday movement")
11720
11755
  })]
11721
11756
  }), jsxs("div", {
11722
11757
  className: styles$2.swipe,
11723
11758
  children: [jsx("p", {
11724
11759
  className: styles$2.swipeLabel,
11725
- children: "Swipe down for more"
11760
+ children: t("Swipe down for more")
11726
11761
  }), jsx("svg", {
11727
11762
  className: styles$2.chevron,
11728
11763
  viewBox: "0 0 24 24",
@@ -11771,13 +11806,13 @@ function IdentityGate({ returnTo }) {
11771
11806
  const emit = useShopEvent();
11772
11807
  return jsx(EmptyState, {
11773
11808
  title: t("Finish signing up"),
11774
- body: "Complete your DAZN sign-up to check out. Your cart is saved.",
11809
+ body: t("Complete your DAZN sign-up to check out. Your cart is saved."),
11775
11810
  action: jsx(Button, {
11776
11811
  onClick: () => emit({
11777
11812
  type: "session_required",
11778
11813
  action: `sign_in:${returnTo}`
11779
11814
  }),
11780
- children: "Finish signing up"
11815
+ children: t("Finish signing up")
11781
11816
  })
11782
11817
  });
11783
11818
  }
@@ -6110,7 +6110,20 @@ const ES = {
6110
6110
  "You’ll receive a shipping label PDF to your email as well.": "Recibirá un PDF de la etiqueta de envío en su correo electrónico.",
6111
6111
  "{0} photographs": "{0} fotografías",
6112
6112
  "{0}, opens in a new tab": "{0}, se abre en una pestaña nueva",
6113
- "Zip Ups": "Sudaderas con cremalleras"
6113
+ "Zip Ups": "Sudaderas con cremalleras",
6114
+ "Added to cart": "Añadido a la cesta",
6115
+ "Order placed": "Pedido realizado",
6116
+ "On its way": "En camino",
6117
+ "Out for delivery": "En reparto",
6118
+ "Estimated delivery": "Entrega estimada",
6119
+ "Nothing matches these filters.": "Nada coincide con estos filtros.",
6120
+ "Your items will show up here once you've added to your cart.": "Sus artículos aparecerán aquí cuando los añada a la cesta.",
6121
+ "Complete your DAZN sign-up to check out. Your cart is saved.": "Complete su registro en DAZN para finalizar la compra. Su cesta está guardada.",
6122
+ "Your orders will show up here once you've shopped.": "Sus pedidos aparecerán aquí cuando haya comprado.",
6123
+ "We'll let you know": "Le avisaremos",
6124
+ "{0} — as soon as it is back": "{0} — en cuanto vuelva a estar disponible",
6125
+ "Size {0}": "Talla {0}",
6126
+ "On the way": "En camino"
6114
6127
  };
6115
6128
  const CATALOGUES = {
6116
6129
  es: ES
@@ -6710,8 +6723,23 @@ const styles$H = {
6710
6723
  future,
6711
6724
  date: date$1
6712
6725
  };
6726
+ const STEP_LABELS = {
6727
+ packing: "Order placed",
6728
+ on_its_way: "On its way",
6729
+ out_for_delivery: "Out for delivery",
6730
+ delivered: "Delivered",
6731
+ cancelled: "Order cancelled"
6732
+ };
6733
+ const PENDING_LABELS = {
6734
+ delivered: "Estimated delivery"
6735
+ };
6736
+ function labelFor(entry) {
6737
+ if (entry.label) return entry.label;
6738
+ return (entry.at ? void 0 : PENDING_LABELS[entry.step]) ?? STEP_LABELS[entry.step] ?? "";
6739
+ }
6713
6740
  function OrderTimeline({ progress: progress2, estimatedDelivery, locale: localeProp }) {
6714
6741
  const locale = useLocale(localeProp);
6742
+ const t = useT();
6715
6743
  const currentIndex = progress2.findIndex((e) => e.current);
6716
6744
  return jsx("ol", {
6717
6745
  className: styles$H.timeline,
@@ -6735,7 +6763,7 @@ function OrderTimeline({ progress: progress2, estimatedDelivery, locale: localeP
6735
6763
  className: styles$H.text,
6736
6764
  children: [jsx("span", {
6737
6765
  className: [styles$H.label, styles$H[state]].join(" "),
6738
- children: entry.label
6766
+ children: t(labelFor(entry))
6739
6767
  }), entry.at ? jsx("time", {
6740
6768
  className: styles$H.date,
6741
6769
  dateTime: entry.at,
@@ -7100,7 +7128,7 @@ function OrderItemsCard({ order }) {
7100
7128
  className: styles$F.itemsHeader,
7101
7129
  children: [jsx("h2", {
7102
7130
  className: styles$F.itemsTitle,
7103
- children: "Items"
7131
+ children: t("Items")
7104
7132
  }), jsx("span", {
7105
7133
  className: styles$F.itemsCount,
7106
7134
  children: itemCount
@@ -7120,7 +7148,7 @@ function ShippingAddressCard({ order }) {
7120
7148
  "aria-label": t("Shipping address"),
7121
7149
  children: [jsx("h2", {
7122
7150
  className: styles$F.cardTitle,
7123
- children: "Shipping address"
7151
+ children: t("Shipping address")
7124
7152
  }), jsx("p", {
7125
7153
  className: styles$F.cardBody,
7126
7154
  children: formatAddress(order.ship_to)
@@ -8620,13 +8648,13 @@ function OrderListContent({ onOpenOrder, onOpenReturn, onStartShopping, locale:
8620
8648
  className: styles$v.empty,
8621
8649
  children: jsx(EmptyState, {
8622
8650
  title: t("Nothing here yet"),
8623
- body: "Your orders will show up here once you've shopped.",
8651
+ body: t("Your orders will show up here once you've shopped."),
8624
8652
  ...onStartShopping ? {
8625
8653
  action: jsx("button", {
8626
8654
  type: "button",
8627
8655
  className: styles$v.cta,
8628
8656
  onClick: onStartShopping,
8629
- children: "Continue shopping"
8657
+ children: t("Continue shopping")
8630
8658
  })
8631
8659
  } : {}
8632
8660
  })
@@ -8891,6 +8919,7 @@ function ProductTile({ product, priority, size = "default" }) {
8891
8919
  const anyInStock = product.variants.length === 0 ? true : product.variants.some((v) => v.in_stock);
8892
8920
  const topBadge2 = product.badges?.[0];
8893
8921
  const pct = discountPct(product.price, product.compare_at);
8922
+ const t = useT();
8894
8923
  return jsxs(ShopLink, {
8895
8924
  to: `/product/${encodeURIComponent(product.sku)}`,
8896
8925
  className: [styles$t.tile, size === "large" ? styles$t.large : ""].join(" "),
@@ -8916,7 +8945,7 @@ function ProductTile({ product, priority, size = "default" }) {
8916
8945
  })
8917
8946
  }), !anyInStock && jsx("span", {
8918
8947
  className: styles$t.oos,
8919
- children: "Out of stock"
8948
+ children: t("Out of stock")
8920
8949
  })]
8921
8950
  }), jsxs("div", {
8922
8951
  className: styles$t.bottom,
@@ -9011,7 +9040,7 @@ function ProductGallery({ title: title2, product }) {
9011
9040
  })
9012
9041
  }), i === 0 && !inStock && jsx("span", {
9013
9042
  className: styles$s.oos,
9014
- children: "Out of stock"
9043
+ children: t("Out of stock")
9015
9044
  })]
9016
9045
  }, src ?? i))
9017
9046
  }), jsxs("div", {
@@ -9077,7 +9106,7 @@ function FilterBar({ options: options2, active, onToggle, onClear }) {
9077
9106
  type: "button",
9078
9107
  className: styles$r.clear,
9079
9108
  onClick: onClear,
9080
- children: "Clear"
9109
+ children: t("Clear")
9081
9110
  })]
9082
9111
  });
9083
9112
  }
@@ -9137,11 +9166,11 @@ function ProductGrid({ category, initialProducts, initialCursor, filters = [] })
9137
9166
  onClear: () => setActive([])
9138
9167
  }), visible.length === 0 ? jsx(EmptyState, {
9139
9168
  title: t("No products"),
9140
- body: "Nothing matches these filters.",
9169
+ body: t("Nothing matches these filters."),
9141
9170
  action: active.length > 0 ? jsx(Button, {
9142
9171
  variant: "secondary",
9143
9172
  onClick: () => setActive([]),
9144
- children: "Clear filters"
9173
+ children: t("Clear filters")
9145
9174
  }) : void 0
9146
9175
  }) : jsx("ul", {
9147
9176
  className: styles$q.grid,
@@ -9181,6 +9210,7 @@ const styles$p = {
9181
9210
  inset
9182
9211
  };
9183
9212
  function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
9213
+ const t = useT();
9184
9214
  if (products.length === 0) return null;
9185
9215
  return jsxs("section", {
9186
9216
  className: [styles$p.rail, inset2 ? styles$p.inset : ""].join(" "),
@@ -9193,7 +9223,7 @@ function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
9193
9223
  }), seeAllTo && jsx(ShopLink, {
9194
9224
  className: styles$p.seeAll,
9195
9225
  to: seeAllTo,
9196
- children: "See all"
9226
+ children: t("See all")
9197
9227
  })]
9198
9228
  }), jsx("ul", {
9199
9229
  className: styles$p.track,
@@ -9515,7 +9545,7 @@ function CartLineItem({ item: item2, title: title2, image: image2, compareAt: co
9515
9545
  }), soldOut ? jsx("span", {
9516
9546
  className: styles$m.oos,
9517
9547
  id: noticeId,
9518
- children: "Out of stock"
9548
+ children: t("Out of stock")
9519
9549
  }) : pct !== void 0 && jsx("span", {
9520
9550
  className: styles$m.saleBadge,
9521
9551
  children: jsx(SaleBadge, {
@@ -9614,7 +9644,7 @@ function ShippingInfo() {
9614
9644
  })]
9615
9645
  }), jsx("p", {
9616
9646
  className: styles$l.label,
9617
- children: "Standard or express delivery"
9647
+ children: t("Standard or express delivery")
9618
9648
  })]
9619
9649
  }), jsx("div", {
9620
9650
  className: styles$l.divider,
@@ -9643,7 +9673,7 @@ function ShippingInfo() {
9643
9673
  })]
9644
9674
  }), jsx("p", {
9645
9675
  className: styles$l.label,
9646
- children: "14 days returns"
9676
+ children: t("14 days returns")
9647
9677
  })]
9648
9678
  })]
9649
9679
  });
@@ -9826,16 +9856,16 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
9826
9856
  if (state === "empty" || !cart2) {
9827
9857
  return jsx(EmptyState, {
9828
9858
  title: t("Nothing here yet"),
9829
- body: "Your items will show up here once you've added to your cart.",
9859
+ body: t("Your items will show up here once you've added to your cart."),
9830
9860
  action: onContinueShopping ? jsx(Button, {
9831
9861
  variant: "primary",
9832
9862
  onClick: onContinueShopping,
9833
- children: "Continue shopping"
9863
+ children: t("Continue shopping")
9834
9864
  }) : jsx(ShopLink, {
9835
9865
  to: "/",
9836
9866
  children: jsx(Button, {
9837
9867
  variant: "primary",
9838
- children: "Continue shopping"
9868
+ children: t("Continue shopping")
9839
9869
  })
9840
9870
  })
9841
9871
  });
@@ -10254,14 +10284,14 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
10254
10284
  children: [jsx("h2", {
10255
10285
  id: "size-heading",
10256
10286
  className: styles$g.title,
10257
- children: "Size"
10287
+ children: t("Size")
10258
10288
  }), showGuide && jsxs("button", {
10259
10289
  type: "button",
10260
10290
  className: styles$g.sizeGuide,
10261
10291
  onClick: () => setGuideOpen(true),
10262
10292
  "aria-haspopup": "dialog",
10263
10293
  "aria-expanded": guideOpen,
10264
- children: ["Size guide", jsxs("svg", {
10294
+ children: [t("Size guide"), jsxs("svg", {
10265
10295
  className: styles$g.info,
10266
10296
  width: "12",
10267
10297
  height: "12",
@@ -10312,7 +10342,7 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
10312
10342
  }), error2 && jsx("p", {
10313
10343
  className: styles$g.error,
10314
10344
  role: "alert",
10315
- children: "Please select a size"
10345
+ children: t("Please select a size")
10316
10346
  }), lowStock2 && !error2 && jsx("p", {
10317
10347
  className: styles$g.lowStock,
10318
10348
  role: "status",
@@ -10394,7 +10424,7 @@ function ColorSelector({ colours, selected: selected2, onSelect }) {
10394
10424
  }), soldOut && jsx("span", {
10395
10425
  className: styles$f.scrim,
10396
10426
  "aria-hidden": "true",
10397
- children: "Out of stock"
10427
+ children: t("Out of stock")
10398
10428
  })]
10399
10429
  }), lowStock2 && jsx("span", {
10400
10430
  className: styles$f.stockBadge,
@@ -10422,7 +10452,7 @@ const styles$e = {
10422
10452
  };
10423
10453
  function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10424
10454
  const t = useT();
10425
- function labelFor(variant) {
10455
+ function labelFor2(variant) {
10426
10456
  if (labelAttribute && variant.attributes[labelAttribute]) {
10427
10457
  return variant.attributes[labelAttribute];
10428
10458
  }
@@ -10433,7 +10463,7 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10433
10463
  className: styles$e.fieldset,
10434
10464
  children: [jsx("legend", {
10435
10465
  className: styles$e.legend,
10436
- children: "Select an option"
10466
+ children: t("Select an option")
10437
10467
  }), jsx("div", {
10438
10468
  className: styles$e.options,
10439
10469
  role: "radiogroup",
@@ -10449,7 +10479,7 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10449
10479
  disabled: disabled2,
10450
10480
  className: [styles$e.option, selected2 ? styles$e.selected : "", disabled2 ? styles$e.disabled : ""].filter(Boolean).join(" "),
10451
10481
  onClick: () => !disabled2 && onSelect(variant.sku),
10452
- children: [labelFor(variant), disabled2 && jsx("span", {
10482
+ children: [labelFor2(variant), disabled2 && jsx("span", {
10453
10483
  className: "visually-hidden",
10454
10484
  children: " (out of stock)"
10455
10485
  })]
@@ -10500,6 +10530,7 @@ function ProductDetails({ description: description2 }) {
10500
10530
  observer?.disconnect();
10501
10531
  };
10502
10532
  }, [expanded, description2]);
10533
+ const t = useT();
10503
10534
  if (paragraphs.length === 0) return null;
10504
10535
  return jsxs("section", {
10505
10536
  className: styles$d.root,
@@ -10509,7 +10540,7 @@ function ProductDetails({ description: description2 }) {
10509
10540
  children: [jsx("h2", {
10510
10541
  id: "details-heading",
10511
10542
  className: styles$d.title,
10512
- children: "Product details"
10543
+ children: t("Product details")
10513
10544
  }), jsx("div", {
10514
10545
  ref: bodyRef,
10515
10546
  className: [styles$d.body, expanded ? "" : styles$d.clamped].join(" "),
@@ -10758,8 +10789,8 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
10758
10789
  type: "stock_alert_requested",
10759
10790
  sku: alertSku
10760
10791
  });
10761
- toast2.show("We'll let you know", {
10762
- description: `${product.title} — as soon as it is back`,
10792
+ toast2.show(t("We'll let you know"), {
10793
+ description: t("{0} — as soon as it is back", product.title),
10763
10794
  image: product.media[0]
10764
10795
  });
10765
10796
  } catch (err) {
@@ -10812,8 +10843,8 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
10812
10843
  const variant = variants.find((v) => v.sku === sku);
10813
10844
  const size = variant?.attributes.size ?? selectedSize;
10814
10845
  setAdded((current2) => current2.includes(sku) ? current2 : [...current2, sku]);
10815
- toast2.show("Added to cart", {
10816
- description: [product.title, size && `Size ${size}`].filter(Boolean).join(" · "),
10846
+ toast2.show(t("Added to cart"), {
10847
+ description: [product.title, size && t("Size {0}", size)].filter(Boolean).join(" · "),
10817
10848
  image: variant?.image ?? product.media[0],
10818
10849
  action: cartSheet || navigate ? {
10819
10850
  label: t("View cart"),
@@ -10940,6 +10971,7 @@ const styles$9 = {
10940
10971
  function PcpHero({ hero: hero2 }) {
10941
10972
  const heroRef = useRef(null);
10942
10973
  useTopOffset(heroRef, "--hero-top");
10974
+ const t = useT();
10943
10975
  return jsxs("section", {
10944
10976
  ref: heroRef,
10945
10977
  className: [styles$9.hero, hero2.image ? "" : styles$9.noImage].join(" "),
@@ -10964,10 +10996,10 @@ function PcpHero({ hero: hero2 }) {
10964
10996
  className: styles$9.text,
10965
10997
  children: [jsx("h1", {
10966
10998
  className: styles$9.title,
10967
- children: hero2.title
10999
+ children: t(hero2.title)
10968
11000
  }), hero2.subtitle && jsx("p", {
10969
11001
  className: styles$9.subtitle,
10970
- children: hero2.subtitle
11002
+ children: t(hero2.subtitle)
10971
11003
  })]
10972
11004
  })]
10973
11005
  });
@@ -11147,6 +11179,7 @@ const styles$4 = {
11147
11179
  row: row$1
11148
11180
  };
11149
11181
  function ExploreList({ title: title2, links }) {
11182
+ const t = useT();
11150
11183
  return jsxs("section", {
11151
11184
  className: styles$4.section,
11152
11185
  "aria-label": title2,
@@ -11160,7 +11193,7 @@ function ExploreList({ title: title2, links }) {
11160
11193
  to: `/category/${encodeURIComponent(l.code)}`,
11161
11194
  className: styles$4.row,
11162
11195
  children: [jsx("span", {
11163
- children: l.label
11196
+ children: t(l.label)
11164
11197
  }), jsx("svg", {
11165
11198
  width: "16",
11166
11199
  height: "16",
@@ -11195,10 +11228,11 @@ const styles$3 = {
11195
11228
  grid
11196
11229
  };
11197
11230
  function Block({ block }) {
11231
+ const t = useT();
11198
11232
  switch (block.kind) {
11199
11233
  case "rail":
11200
11234
  return jsx(RailCarousel, {
11201
- title: block.title,
11235
+ title: t(block.title),
11202
11236
  products: block.products
11203
11237
  });
11204
11238
  case "lifestyle_text":
@@ -11211,7 +11245,7 @@ function Block({ block }) {
11211
11245
  className: styles$3.featured,
11212
11246
  children: [block.title && jsx("h2", {
11213
11247
  className: styles$3.blockTitle,
11214
- children: block.title
11248
+ children: t(block.title)
11215
11249
  }), jsx(ProductTile, {
11216
11250
  product: block.product,
11217
11251
  priority: true,
@@ -11220,7 +11254,7 @@ function Block({ block }) {
11220
11254
  });
11221
11255
  case "product_gallery":
11222
11256
  return jsx(ProductGallery, {
11223
- title: block.title,
11257
+ title: t(block.title),
11224
11258
  product: block.product
11225
11259
  });
11226
11260
  case "lifestyle_image":
@@ -11233,7 +11267,7 @@ function Block({ block }) {
11233
11267
  className: styles$3.gridBlock,
11234
11268
  children: [block.title && jsx("h2", {
11235
11269
  className: styles$3.blockTitle,
11236
- children: block.title
11270
+ children: t(block.title)
11237
11271
  }), jsx("ul", {
11238
11272
  className: styles$3.grid,
11239
11273
  children: block.products.map((p) => jsx("li", {
@@ -11253,7 +11287,7 @@ function Block({ block }) {
11253
11287
  });
11254
11288
  case "explore":
11255
11289
  return jsx(ExploreList, {
11256
- title: block.title,
11290
+ title: t(block.title),
11257
11291
  links: block.links
11258
11292
  });
11259
11293
  default:
@@ -11583,9 +11617,10 @@ const FALLBACK_PANELS = [{
11583
11617
  image: "/figma/home/tshirts-poster.jpg"
11584
11618
  }];
11585
11619
  function CategoryPanel({ panel: panel2 }) {
11620
+ const t = useT();
11586
11621
  return jsxs("section", {
11587
11622
  className: styles$2.panel,
11588
- "aria-label": panel2.title,
11623
+ "aria-label": t(panel2.title),
11589
11624
  ...panel2.focalY === void 0 ? {} : {
11590
11625
  style: {
11591
11626
  "--slide-focal-y": `${panel2.focalY}%`
@@ -11608,16 +11643,16 @@ function CategoryPanel({ panel: panel2 }) {
11608
11643
  className: styles$2.copy,
11609
11644
  children: [jsx("h2", {
11610
11645
  className: styles$2.title,
11611
- children: panel2.title
11646
+ children: t(panel2.title)
11612
11647
  }), jsx("p", {
11613
11648
  className: styles$2.subtitle,
11614
- children: panel2.subtitle
11649
+ children: t(panel2.subtitle)
11615
11650
  })]
11616
11651
  }), jsx(ShopLink, {
11617
11652
  to: panel2.to,
11618
11653
  className: styles$2.cta,
11619
- "aria-label": `${panel2.title} — ${panel2.cta}`,
11620
- children: panel2.cta
11654
+ "aria-label": `${t(panel2.title)} — ${t(panel2.cta)}`,
11655
+ children: t(panel2.cta)
11621
11656
  })]
11622
11657
  })]
11623
11658
  });
@@ -11713,16 +11748,16 @@ function HomeShowcase() {
11713
11748
  className: styles$2.logo
11714
11749
  }), jsx("h1", {
11715
11750
  className: styles$2.heroTitle,
11716
- children: "DAZN SHOP"
11751
+ children: t("DAZN SHOP")
11717
11752
  }), jsx("p", {
11718
11753
  className: styles$2.heroSub,
11719
- children: "Fresh drops inspired by sport, culture, and everyday movement"
11754
+ children: t("Fresh drops inspired by sport, culture, and everyday movement")
11720
11755
  })]
11721
11756
  }), jsxs("div", {
11722
11757
  className: styles$2.swipe,
11723
11758
  children: [jsx("p", {
11724
11759
  className: styles$2.swipeLabel,
11725
- children: "Swipe down for more"
11760
+ children: t("Swipe down for more")
11726
11761
  }), jsx("svg", {
11727
11762
  className: styles$2.chevron,
11728
11763
  viewBox: "0 0 24 24",
@@ -11771,13 +11806,13 @@ function IdentityGate({ returnTo }) {
11771
11806
  const emit = useShopEvent();
11772
11807
  return jsx(EmptyState, {
11773
11808
  title: t("Finish signing up"),
11774
- body: "Complete your DAZN sign-up to check out. Your cart is saved.",
11809
+ body: t("Complete your DAZN sign-up to check out. Your cart is saved."),
11775
11810
  action: jsx(Button, {
11776
11811
  onClick: () => emit({
11777
11812
  type: "session_required",
11778
11813
  action: `sign_in:${returnTo}`
11779
11814
  }),
11780
- children: "Finish signing up"
11815
+ children: t("Finish signing up")
11781
11816
  })
11782
11817
  });
11783
11818
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nok-integration/storefront-react",
3
- "version": "0.20.12",
3
+ "version": "0.20.13",
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
  "type": "module",