@nok-integration/storefront-react 0.20.12 → 0.20.14

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
@@ -8,7 +8,6 @@ import { ReactNode } from 'react';
8
8
  import { RefAttributes } from 'react';
9
9
  import { z } from 'zod';
10
10
 
11
- /** `POST /v1/cart/items` — add an item. */
12
11
  declare const AddCartItemRequest: z.ZodObject<{
13
12
  sku: z.ZodString;
14
13
  qty: z.ZodNumber;
@@ -268,6 +267,37 @@ export declare interface CartLineItemProps {
268
267
  pending?: boolean;
269
268
  }
270
269
 
270
+ /**
271
+ * Market context for a cart call. Extends {@link MarketQuery}, so `country` and `lang`
272
+ * mean exactly what they mean on a catalogue read.
273
+ *
274
+ * A cart is priced for one market, and it has to be the same market the fan browsed in.
275
+ * Without this the engine can only price a basket for the deployment's default market,
276
+ * so an instance serving more than one prices every basket in the default's currency
277
+ * while the product pages beside it render another — the fan reads euros on the product
278
+ * and sterling at the till.
279
+ *
280
+ * Both fields stay optional, so this is additive: a caller that sends neither gets the
281
+ * configured default exactly as before. A caller that sends `country` on catalogue reads
282
+ * should send it here too — the pair is what keeps the two surfaces agreeing.
283
+ *
284
+ * The market belongs on the validated shopping session rather than on the query string,
285
+ * and moves there when that contract exists. This is the interim source,
286
+ * not the intended one.
287
+ */
288
+ declare const CartMarketQuery: z.ZodObject<{
289
+ country: z.ZodOptional<z.ZodString>;
290
+ lang: z.ZodOptional<z.ZodString>;
291
+ }, "strip", z.ZodTypeAny, {
292
+ country?: string | undefined;
293
+ lang?: string | undefined;
294
+ }, {
295
+ country?: string | undefined;
296
+ lang?: string | undefined;
297
+ }>;
298
+
299
+ declare type CartMarketQuery = z.infer<typeof CartMarketQuery>;
300
+
271
301
  declare interface CartSheetApi {
272
302
  open: () => void;
273
303
  close: () => void;
@@ -2130,6 +2160,17 @@ declare interface ClientOptions {
2130
2160
  defaultHeaders?: Record<string, string>;
2131
2161
  /** Credentials mode (browser); defaults to `include` so the session cookie is sent. */
2132
2162
  credentials?: RequestCredentials;
2163
+ /**
2164
+ * The market every cart call is made for, when the call does not name one itself.
2165
+ *
2166
+ * Set it to whatever is sent on catalogue reads. A cart is priced for one market, and a
2167
+ * client that prices its catalogue for Spain while its basket resolves the engine's
2168
+ * default market shows euros on the product and sterling at the till.
2169
+ *
2170
+ * Catalogue reads are unaffected — they already take the market per call, because a
2171
+ * consumer may legitimately read one market's catalogue while shopping in another.
2172
+ */
2173
+ market?: CartMarketQuery;
2133
2174
  }
2134
2175
 
2135
2176
  /** Extract the API error `code` from a thrown value, if present. */
@@ -2591,8 +2632,13 @@ declare function createClient(options: ClientOptions): {
2591
2632
  available: number;
2592
2633
  }>;
2593
2634
  };
2635
+ /**
2636
+ * The session cart. Every call takes the same optional market context as a catalogue
2637
+ * read — send the country you are browsing in, or the basket is priced for the
2638
+ * deployment's default market while the product pages render another.
2639
+ */
2594
2640
  cart: {
2595
- create: () => Promise<{
2641
+ create: (query?: CartMarketQuery) => Promise<{
2596
2642
  currency: string;
2597
2643
  items: {
2598
2644
  sku: string;
@@ -2648,7 +2694,7 @@ declare function createClient(options: ClientOptions): {
2648
2694
  } | undefined;
2649
2695
  hidden_lines?: ("shipping" | "tax")[] | undefined;
2650
2696
  }>;
2651
- get: () => Promise<{
2697
+ get: (query?: CartMarketQuery) => Promise<{
2652
2698
  currency: string;
2653
2699
  items: {
2654
2700
  sku: string;
@@ -2704,7 +2750,7 @@ declare function createClient(options: ClientOptions): {
2704
2750
  } | undefined;
2705
2751
  hidden_lines?: ("shipping" | "tax")[] | undefined;
2706
2752
  }>;
2707
- addItem: (body: AddCartItemRequest) => Promise<{
2753
+ addItem: (body: AddCartItemRequest, query?: CartMarketQuery) => Promise<{
2708
2754
  currency: string;
2709
2755
  items: {
2710
2756
  sku: string;
@@ -2760,7 +2806,7 @@ declare function createClient(options: ClientOptions): {
2760
2806
  } | undefined;
2761
2807
  hidden_lines?: ("shipping" | "tax")[] | undefined;
2762
2808
  }>;
2763
- updateItem: (sku: string, body: UpdateCartItemRequest) => Promise<{
2809
+ updateItem: (sku: string, body: UpdateCartItemRequest, query?: CartMarketQuery) => Promise<{
2764
2810
  currency: string;
2765
2811
  items: {
2766
2812
  sku: string;
@@ -2816,7 +2862,7 @@ declare function createClient(options: ClientOptions): {
2816
2862
  } | undefined;
2817
2863
  hidden_lines?: ("shipping" | "tax")[] | undefined;
2818
2864
  }>;
2819
- removeItem: (sku: string) => Promise<{
2865
+ removeItem: (sku: string, query?: CartMarketQuery) => Promise<{
2820
2866
  currency: string;
2821
2867
  items: {
2822
2868
  sku: string;
@@ -2878,7 +2924,7 @@ declare function createClient(options: ClientOptions): {
2878
2924
  * The URL is opaque — redirect to it, never parse it. This is the last call in our
2879
2925
  * journey; payment, order and confirmation all happen on DAZN.
2880
2926
  */
2881
- handoff: () => Promise<{
2927
+ handoff: (query?: CartMarketQuery) => Promise<{
2882
2928
  checkout_url: string;
2883
2929
  }>;
2884
2930
  };
@@ -4386,16 +4432,6 @@ export declare interface OrderSummaryProps {
4386
4432
  discount?: Money;
4387
4433
  }
4388
4434
 
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
4435
  export declare function OrderTimeline({ progress, estimatedDelivery, locale: localeProp, }: OrderTimelineProps): JSX.Element;
4400
4436
 
4401
4437
  export declare interface OrderTimelineProps {
package/dist/index.mjs CHANGED
@@ -4499,7 +4499,7 @@ function requireCart() {
4499
4499
  Object.defineProperty(exports, "__esModule", {
4500
4500
  value: true
4501
4501
  });
4502
- exports.PartnerCart = exports.PartnerCartItem = exports.CartHandoffResponse = exports.UpdateCartItemRequest = exports.AddCartItemRequest = exports.Cart = exports.HiddenSummaryLine = exports.CartHold = exports.CartLock = exports.CartLockReason = exports.CartTotals = exports.CartItem = void 0;
4502
+ exports.PartnerCart = exports.PartnerCartItem = exports.CartHandoffResponse = exports.UpdateCartItemRequest = exports.AddCartItemRequest = exports.CartMarketQuery = exports.Cart = exports.HiddenSummaryLine = exports.CartHold = exports.CartLock = exports.CartLockReason = exports.CartTotals = exports.CartItem = void 0;
4503
4503
  const zod_1 = requireZod();
4504
4504
  const money_1 = requireMoney();
4505
4505
  const ids_1 = requireIds();
@@ -4539,6 +4539,7 @@ function requireCart() {
4539
4539
  hold: exports.CartHold.optional(),
4540
4540
  hidden_lines: zod_1.z.array(exports.HiddenSummaryLine).optional()
4541
4541
  });
4542
+ exports.CartMarketQuery = common_1.MarketQuery;
4542
4543
  exports.AddCartItemRequest = zod_1.z.object({
4543
4544
  sku: common_1.Sku,
4544
4545
  qty: zod_1.z.number().int().positive()
@@ -4970,6 +4971,12 @@ function requireClient() {
4970
4971
  throw new Error("No fetch implementation available; pass options.fetch");
4971
4972
  }
4972
4973
  const base = options2.baseUrl.replace(/\/$/, "");
4974
+ function market(query) {
4975
+ return {
4976
+ ...options2.market,
4977
+ ...query
4978
+ };
4979
+ }
4973
4980
  async function request(config) {
4974
4981
  const token = await options2.getToken?.();
4975
4982
  const headers = {
@@ -5075,34 +5082,40 @@ function requireClient() {
5075
5082
  })
5076
5083
  },
5077
5084
  cart: {
5078
- create: () => request({
5085
+ create: (query = {}) => request({
5079
5086
  method: "POST",
5080
5087
  path: "/cart",
5088
+ query: market(query),
5081
5089
  schema: cart_1.Cart
5082
5090
  }),
5083
- get: () => request({
5091
+ get: (query = {}) => request({
5084
5092
  method: "GET",
5085
5093
  path: "/cart",
5094
+ query: market(query),
5086
5095
  schema: cart_1.Cart
5087
5096
  }),
5088
- addItem: (body3) => request({
5097
+ addItem: (body3, query = {}) => request({
5089
5098
  method: "POST",
5090
5099
  path: "/cart/items",
5091
5100
  body: body3,
5101
+ query: market(query),
5092
5102
  schema: cart_1.Cart
5093
5103
  }),
5094
- updateItem: (sku, body3) => request({
5104
+ updateItem: (sku, body3, query = {}) => request({
5095
5105
  method: "PATCH",
5096
5106
  path: `/cart/items/${encodeURIComponent(sku)}`,
5097
5107
  body: body3,
5108
+ query: market(query),
5098
5109
  schema: cart_1.Cart
5099
5110
  }),
5100
- removeItem: (sku) => request({
5111
+ removeItem: (sku, query = {}) => request({
5101
5112
  method: "DELETE",
5102
5113
  path: `/cart/items/${encodeURIComponent(sku)}`,
5114
+ query: market(query),
5103
5115
  schema: cart_1.Cart
5104
5116
  }),
5105
- handoff: () => request({
5117
+ handoff: (query = {}) => request({
5118
+ query: market(query),
5106
5119
  method: "POST",
5107
5120
  path: "/cart/handoff",
5108
5121
  schema: cart_1.CartHandoffResponse
@@ -5211,14 +5224,17 @@ function movesThePage(event) {
5211
5224
  if (event.type === "pointerdown") return event.pointerType !== "touch";
5212
5225
  return true;
5213
5226
  }
5227
+ const TOUCH_DOWN = ["touchstart", "pointerdown"];
5228
+ const TOUCH_UP = ["touchend", "touchcancel", "pointerup", "pointercancel"];
5214
5229
  const holds = /* @__PURE__ */ new Set();
5215
5230
  function releaseHolds() {
5216
5231
  for (const end2 of Array.from(holds)) end2();
5217
5232
  }
5218
5233
  function anchorTop(onMoved = () => true, onEnd, box2 = null) {
5219
5234
  let released = false;
5235
+ let touching = false;
5220
5236
  const top2 = () => {
5221
- if (released) return;
5237
+ if (released || touching) return;
5222
5238
  const document_ = window.scrollY || document.documentElement.scrollTop || 0;
5223
5239
  const pane = box2 ? box2.scrollTop : 0;
5224
5240
  if (document_ <= 0 && pane <= 0) return;
@@ -5226,6 +5242,15 @@ function anchorTop(onMoved = () => true, onEnd, box2 = null) {
5226
5242
  if (document_ > 0) scrollToTop();
5227
5243
  if (box2 && pane > 0) scrollToTop(box2);
5228
5244
  };
5245
+ const down = (event) => {
5246
+ if (event.type !== "pointerdown" || event.pointerType === "touch") {
5247
+ touching = true;
5248
+ }
5249
+ };
5250
+ const up = () => {
5251
+ touching = false;
5252
+ top2();
5253
+ };
5229
5254
  const end2 = (how2) => {
5230
5255
  if (released) return;
5231
5256
  released = true;
@@ -5235,6 +5260,8 @@ function anchorTop(onMoved = () => true, onEnd, box2 = null) {
5235
5260
  window.removeEventListener("scroll", top2);
5236
5261
  box2?.removeEventListener("scroll", top2);
5237
5262
  for (const type of RELEASES) window.removeEventListener(type, release);
5263
+ for (const type of TOUCH_DOWN) window.removeEventListener(type, down);
5264
+ for (const type of TOUCH_UP) window.removeEventListener(type, up);
5238
5265
  onEnd?.(how2);
5239
5266
  };
5240
5267
  const release = (event) => {
@@ -5243,7 +5270,13 @@ function anchorTop(onMoved = () => true, onEnd, box2 = null) {
5243
5270
  const moved = () => end2("moved");
5244
5271
  top2();
5245
5272
  const frame2 = typeof requestAnimationFrame === "function" ? requestAnimationFrame(top2) : null;
5246
- const timer2 = setTimeout(() => end2("lapsed"), HOLD_MS);
5273
+ let timer2 = setTimeout(function lapse() {
5274
+ if (touching) {
5275
+ timer2 = setTimeout(lapse, 100);
5276
+ return;
5277
+ }
5278
+ end2("lapsed");
5279
+ }, HOLD_MS);
5247
5280
  window.addEventListener("scroll", top2, {
5248
5281
  passive: true
5249
5282
  });
@@ -5253,6 +5286,12 @@ function anchorTop(onMoved = () => true, onEnd, box2 = null) {
5253
5286
  for (const type of RELEASES) window.addEventListener(type, release, {
5254
5287
  passive: true
5255
5288
  });
5289
+ for (const type of TOUCH_DOWN) window.addEventListener(type, down, {
5290
+ passive: true
5291
+ });
5292
+ for (const type of TOUCH_UP) window.addEventListener(type, up, {
5293
+ passive: true
5294
+ });
5256
5295
  holds.add(moved);
5257
5296
  return () => end2("released");
5258
5297
  }
@@ -5470,8 +5509,9 @@ function DaznShopProvider({ children, ...config }) {
5470
5509
  onEvent: emit,
5471
5510
  sessionTransport
5472
5511
  }),
5473
- credentials: sessionTransport === "cookie" ? "include" : "omit"
5474
- }), [apiBaseUrl, stableGetToken, emit, sessionTransport]);
5512
+ credentials: sessionTransport === "cookie" ? "include" : "omit",
5513
+ market
5514
+ }), [apiBaseUrl, stableGetToken, emit, sessionTransport, market]);
5475
5515
  const navigate = useCallback((to) => {
5476
5516
  emit({
5477
5517
  type: "navigate",
@@ -6110,7 +6150,20 @@ const ES = {
6110
6150
  "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
6151
  "{0} photographs": "{0} fotografías",
6112
6152
  "{0}, opens in a new tab": "{0}, se abre en una pestaña nueva",
6113
- "Zip Ups": "Sudaderas con cremalleras"
6153
+ "Zip Ups": "Sudaderas con cremalleras",
6154
+ "Added to cart": "Añadido a la cesta",
6155
+ "Order placed": "Pedido realizado",
6156
+ "On its way": "En camino",
6157
+ "Out for delivery": "En reparto",
6158
+ "Estimated delivery": "Entrega estimada",
6159
+ "Nothing matches these filters.": "Nada coincide con estos filtros.",
6160
+ "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.",
6161
+ "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.",
6162
+ "Your orders will show up here once you've shopped.": "Sus pedidos aparecerán aquí cuando haya comprado.",
6163
+ "We'll let you know": "Le avisaremos",
6164
+ "{0} — as soon as it is back": "{0} — en cuanto vuelva a estar disponible",
6165
+ "Size {0}": "Talla {0}",
6166
+ "On the way": "En camino"
6114
6167
  };
6115
6168
  const CATALOGUES = {
6116
6169
  es: ES
@@ -6710,8 +6763,23 @@ const styles$H = {
6710
6763
  future,
6711
6764
  date: date$1
6712
6765
  };
6766
+ const STEP_LABELS = {
6767
+ packing: "Order placed",
6768
+ on_its_way: "On its way",
6769
+ out_for_delivery: "Out for delivery",
6770
+ delivered: "Delivered",
6771
+ cancelled: "Order cancelled"
6772
+ };
6773
+ const PENDING_LABELS = {
6774
+ delivered: "Estimated delivery"
6775
+ };
6776
+ function labelFor(entry) {
6777
+ if (entry.label) return entry.label;
6778
+ return (entry.at ? void 0 : PENDING_LABELS[entry.step]) ?? STEP_LABELS[entry.step] ?? "";
6779
+ }
6713
6780
  function OrderTimeline({ progress: progress2, estimatedDelivery, locale: localeProp }) {
6714
6781
  const locale = useLocale(localeProp);
6782
+ const t = useT();
6715
6783
  const currentIndex = progress2.findIndex((e) => e.current);
6716
6784
  return jsx("ol", {
6717
6785
  className: styles$H.timeline,
@@ -6735,7 +6803,7 @@ function OrderTimeline({ progress: progress2, estimatedDelivery, locale: localeP
6735
6803
  className: styles$H.text,
6736
6804
  children: [jsx("span", {
6737
6805
  className: [styles$H.label, styles$H[state]].join(" "),
6738
- children: entry.label
6806
+ children: t(labelFor(entry))
6739
6807
  }), entry.at ? jsx("time", {
6740
6808
  className: styles$H.date,
6741
6809
  dateTime: entry.at,
@@ -7100,7 +7168,7 @@ function OrderItemsCard({ order }) {
7100
7168
  className: styles$F.itemsHeader,
7101
7169
  children: [jsx("h2", {
7102
7170
  className: styles$F.itemsTitle,
7103
- children: "Items"
7171
+ children: t("Items")
7104
7172
  }), jsx("span", {
7105
7173
  className: styles$F.itemsCount,
7106
7174
  children: itemCount
@@ -7120,7 +7188,7 @@ function ShippingAddressCard({ order }) {
7120
7188
  "aria-label": t("Shipping address"),
7121
7189
  children: [jsx("h2", {
7122
7190
  className: styles$F.cardTitle,
7123
- children: "Shipping address"
7191
+ children: t("Shipping address")
7124
7192
  }), jsx("p", {
7125
7193
  className: styles$F.cardBody,
7126
7194
  children: formatAddress(order.ship_to)
@@ -8620,13 +8688,13 @@ function OrderListContent({ onOpenOrder, onOpenReturn, onStartShopping, locale:
8620
8688
  className: styles$v.empty,
8621
8689
  children: jsx(EmptyState, {
8622
8690
  title: t("Nothing here yet"),
8623
- body: "Your orders will show up here once you've shopped.",
8691
+ body: t("Your orders will show up here once you've shopped."),
8624
8692
  ...onStartShopping ? {
8625
8693
  action: jsx("button", {
8626
8694
  type: "button",
8627
8695
  className: styles$v.cta,
8628
8696
  onClick: onStartShopping,
8629
- children: "Continue shopping"
8697
+ children: t("Continue shopping")
8630
8698
  })
8631
8699
  } : {}
8632
8700
  })
@@ -8891,6 +8959,7 @@ function ProductTile({ product, priority, size = "default" }) {
8891
8959
  const anyInStock = product.variants.length === 0 ? true : product.variants.some((v) => v.in_stock);
8892
8960
  const topBadge2 = product.badges?.[0];
8893
8961
  const pct = discountPct(product.price, product.compare_at);
8962
+ const t = useT();
8894
8963
  return jsxs(ShopLink, {
8895
8964
  to: `/product/${encodeURIComponent(product.sku)}`,
8896
8965
  className: [styles$t.tile, size === "large" ? styles$t.large : ""].join(" "),
@@ -8916,7 +8985,7 @@ function ProductTile({ product, priority, size = "default" }) {
8916
8985
  })
8917
8986
  }), !anyInStock && jsx("span", {
8918
8987
  className: styles$t.oos,
8919
- children: "Out of stock"
8988
+ children: t("Out of stock")
8920
8989
  })]
8921
8990
  }), jsxs("div", {
8922
8991
  className: styles$t.bottom,
@@ -9011,7 +9080,7 @@ function ProductGallery({ title: title2, product }) {
9011
9080
  })
9012
9081
  }), i === 0 && !inStock && jsx("span", {
9013
9082
  className: styles$s.oos,
9014
- children: "Out of stock"
9083
+ children: t("Out of stock")
9015
9084
  })]
9016
9085
  }, src ?? i))
9017
9086
  }), jsxs("div", {
@@ -9077,7 +9146,7 @@ function FilterBar({ options: options2, active, onToggle, onClear }) {
9077
9146
  type: "button",
9078
9147
  className: styles$r.clear,
9079
9148
  onClick: onClear,
9080
- children: "Clear"
9149
+ children: t("Clear")
9081
9150
  })]
9082
9151
  });
9083
9152
  }
@@ -9137,11 +9206,11 @@ function ProductGrid({ category, initialProducts, initialCursor, filters = [] })
9137
9206
  onClear: () => setActive([])
9138
9207
  }), visible.length === 0 ? jsx(EmptyState, {
9139
9208
  title: t("No products"),
9140
- body: "Nothing matches these filters.",
9209
+ body: t("Nothing matches these filters."),
9141
9210
  action: active.length > 0 ? jsx(Button, {
9142
9211
  variant: "secondary",
9143
9212
  onClick: () => setActive([]),
9144
- children: "Clear filters"
9213
+ children: t("Clear filters")
9145
9214
  }) : void 0
9146
9215
  }) : jsx("ul", {
9147
9216
  className: styles$q.grid,
@@ -9181,6 +9250,7 @@ const styles$p = {
9181
9250
  inset
9182
9251
  };
9183
9252
  function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
9253
+ const t = useT();
9184
9254
  if (products.length === 0) return null;
9185
9255
  return jsxs("section", {
9186
9256
  className: [styles$p.rail, inset2 ? styles$p.inset : ""].join(" "),
@@ -9193,7 +9263,7 @@ function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
9193
9263
  }), seeAllTo && jsx(ShopLink, {
9194
9264
  className: styles$p.seeAll,
9195
9265
  to: seeAllTo,
9196
- children: "See all"
9266
+ children: t("See all")
9197
9267
  })]
9198
9268
  }), jsx("ul", {
9199
9269
  className: styles$p.track,
@@ -9515,7 +9585,7 @@ function CartLineItem({ item: item2, title: title2, image: image2, compareAt: co
9515
9585
  }), soldOut ? jsx("span", {
9516
9586
  className: styles$m.oos,
9517
9587
  id: noticeId,
9518
- children: "Out of stock"
9588
+ children: t("Out of stock")
9519
9589
  }) : pct !== void 0 && jsx("span", {
9520
9590
  className: styles$m.saleBadge,
9521
9591
  children: jsx(SaleBadge, {
@@ -9614,7 +9684,7 @@ function ShippingInfo() {
9614
9684
  })]
9615
9685
  }), jsx("p", {
9616
9686
  className: styles$l.label,
9617
- children: "Standard or express delivery"
9687
+ children: t("Standard or express delivery")
9618
9688
  })]
9619
9689
  }), jsx("div", {
9620
9690
  className: styles$l.divider,
@@ -9643,7 +9713,7 @@ function ShippingInfo() {
9643
9713
  })]
9644
9714
  }), jsx("p", {
9645
9715
  className: styles$l.label,
9646
- children: "14 days returns"
9716
+ children: t("14 days returns")
9647
9717
  })]
9648
9718
  })]
9649
9719
  });
@@ -9826,16 +9896,16 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
9826
9896
  if (state === "empty" || !cart2) {
9827
9897
  return jsx(EmptyState, {
9828
9898
  title: t("Nothing here yet"),
9829
- body: "Your items will show up here once you've added to your cart.",
9899
+ body: t("Your items will show up here once you've added to your cart."),
9830
9900
  action: onContinueShopping ? jsx(Button, {
9831
9901
  variant: "primary",
9832
9902
  onClick: onContinueShopping,
9833
- children: "Continue shopping"
9903
+ children: t("Continue shopping")
9834
9904
  }) : jsx(ShopLink, {
9835
9905
  to: "/",
9836
9906
  children: jsx(Button, {
9837
9907
  variant: "primary",
9838
- children: "Continue shopping"
9908
+ children: t("Continue shopping")
9839
9909
  })
9840
9910
  })
9841
9911
  });
@@ -10254,14 +10324,14 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
10254
10324
  children: [jsx("h2", {
10255
10325
  id: "size-heading",
10256
10326
  className: styles$g.title,
10257
- children: "Size"
10327
+ children: t("Size")
10258
10328
  }), showGuide && jsxs("button", {
10259
10329
  type: "button",
10260
10330
  className: styles$g.sizeGuide,
10261
10331
  onClick: () => setGuideOpen(true),
10262
10332
  "aria-haspopup": "dialog",
10263
10333
  "aria-expanded": guideOpen,
10264
- children: ["Size guide", jsxs("svg", {
10334
+ children: [t("Size guide"), jsxs("svg", {
10265
10335
  className: styles$g.info,
10266
10336
  width: "12",
10267
10337
  height: "12",
@@ -10312,7 +10382,7 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
10312
10382
  }), error2 && jsx("p", {
10313
10383
  className: styles$g.error,
10314
10384
  role: "alert",
10315
- children: "Please select a size"
10385
+ children: t("Please select a size")
10316
10386
  }), lowStock2 && !error2 && jsx("p", {
10317
10387
  className: styles$g.lowStock,
10318
10388
  role: "status",
@@ -10394,7 +10464,7 @@ function ColorSelector({ colours, selected: selected2, onSelect }) {
10394
10464
  }), soldOut && jsx("span", {
10395
10465
  className: styles$f.scrim,
10396
10466
  "aria-hidden": "true",
10397
- children: "Out of stock"
10467
+ children: t("Out of stock")
10398
10468
  })]
10399
10469
  }), lowStock2 && jsx("span", {
10400
10470
  className: styles$f.stockBadge,
@@ -10422,7 +10492,7 @@ const styles$e = {
10422
10492
  };
10423
10493
  function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10424
10494
  const t = useT();
10425
- function labelFor(variant) {
10495
+ function labelFor2(variant) {
10426
10496
  if (labelAttribute && variant.attributes[labelAttribute]) {
10427
10497
  return variant.attributes[labelAttribute];
10428
10498
  }
@@ -10433,7 +10503,7 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10433
10503
  className: styles$e.fieldset,
10434
10504
  children: [jsx("legend", {
10435
10505
  className: styles$e.legend,
10436
- children: "Select an option"
10506
+ children: t("Select an option")
10437
10507
  }), jsx("div", {
10438
10508
  className: styles$e.options,
10439
10509
  role: "radiogroup",
@@ -10449,7 +10519,7 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10449
10519
  disabled: disabled2,
10450
10520
  className: [styles$e.option, selected2 ? styles$e.selected : "", disabled2 ? styles$e.disabled : ""].filter(Boolean).join(" "),
10451
10521
  onClick: () => !disabled2 && onSelect(variant.sku),
10452
- children: [labelFor(variant), disabled2 && jsx("span", {
10522
+ children: [labelFor2(variant), disabled2 && jsx("span", {
10453
10523
  className: "visually-hidden",
10454
10524
  children: " (out of stock)"
10455
10525
  })]
@@ -10500,6 +10570,7 @@ function ProductDetails({ description: description2 }) {
10500
10570
  observer?.disconnect();
10501
10571
  };
10502
10572
  }, [expanded, description2]);
10573
+ const t = useT();
10503
10574
  if (paragraphs.length === 0) return null;
10504
10575
  return jsxs("section", {
10505
10576
  className: styles$d.root,
@@ -10509,7 +10580,7 @@ function ProductDetails({ description: description2 }) {
10509
10580
  children: [jsx("h2", {
10510
10581
  id: "details-heading",
10511
10582
  className: styles$d.title,
10512
- children: "Product details"
10583
+ children: t("Product details")
10513
10584
  }), jsx("div", {
10514
10585
  ref: bodyRef,
10515
10586
  className: [styles$d.body, expanded ? "" : styles$d.clamped].join(" "),
@@ -10758,8 +10829,8 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
10758
10829
  type: "stock_alert_requested",
10759
10830
  sku: alertSku
10760
10831
  });
10761
- toast2.show("We'll let you know", {
10762
- description: `${product.title} — as soon as it is back`,
10832
+ toast2.show(t("We'll let you know"), {
10833
+ description: t("{0} — as soon as it is back", product.title),
10763
10834
  image: product.media[0]
10764
10835
  });
10765
10836
  } catch (err) {
@@ -10812,8 +10883,8 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
10812
10883
  const variant = variants.find((v) => v.sku === sku);
10813
10884
  const size = variant?.attributes.size ?? selectedSize;
10814
10885
  setAdded((current2) => current2.includes(sku) ? current2 : [...current2, sku]);
10815
- toast2.show("Added to cart", {
10816
- description: [product.title, size && `Size ${size}`].filter(Boolean).join(" · "),
10886
+ toast2.show(t("Added to cart"), {
10887
+ description: [product.title, size && t("Size {0}", size)].filter(Boolean).join(" · "),
10817
10888
  image: variant?.image ?? product.media[0],
10818
10889
  action: cartSheet || navigate ? {
10819
10890
  label: t("View cart"),
@@ -10940,6 +11011,7 @@ const styles$9 = {
10940
11011
  function PcpHero({ hero: hero2 }) {
10941
11012
  const heroRef = useRef(null);
10942
11013
  useTopOffset(heroRef, "--hero-top");
11014
+ const t = useT();
10943
11015
  return jsxs("section", {
10944
11016
  ref: heroRef,
10945
11017
  className: [styles$9.hero, hero2.image ? "" : styles$9.noImage].join(" "),
@@ -10964,10 +11036,10 @@ function PcpHero({ hero: hero2 }) {
10964
11036
  className: styles$9.text,
10965
11037
  children: [jsx("h1", {
10966
11038
  className: styles$9.title,
10967
- children: hero2.title
11039
+ children: t(hero2.title)
10968
11040
  }), hero2.subtitle && jsx("p", {
10969
11041
  className: styles$9.subtitle,
10970
- children: hero2.subtitle
11042
+ children: t(hero2.subtitle)
10971
11043
  })]
10972
11044
  })]
10973
11045
  });
@@ -11147,6 +11219,7 @@ const styles$4 = {
11147
11219
  row: row$1
11148
11220
  };
11149
11221
  function ExploreList({ title: title2, links }) {
11222
+ const t = useT();
11150
11223
  return jsxs("section", {
11151
11224
  className: styles$4.section,
11152
11225
  "aria-label": title2,
@@ -11160,7 +11233,7 @@ function ExploreList({ title: title2, links }) {
11160
11233
  to: `/category/${encodeURIComponent(l.code)}`,
11161
11234
  className: styles$4.row,
11162
11235
  children: [jsx("span", {
11163
- children: l.label
11236
+ children: t(l.label)
11164
11237
  }), jsx("svg", {
11165
11238
  width: "16",
11166
11239
  height: "16",
@@ -11195,10 +11268,11 @@ const styles$3 = {
11195
11268
  grid
11196
11269
  };
11197
11270
  function Block({ block }) {
11271
+ const t = useT();
11198
11272
  switch (block.kind) {
11199
11273
  case "rail":
11200
11274
  return jsx(RailCarousel, {
11201
- title: block.title,
11275
+ title: t(block.title),
11202
11276
  products: block.products
11203
11277
  });
11204
11278
  case "lifestyle_text":
@@ -11211,7 +11285,7 @@ function Block({ block }) {
11211
11285
  className: styles$3.featured,
11212
11286
  children: [block.title && jsx("h2", {
11213
11287
  className: styles$3.blockTitle,
11214
- children: block.title
11288
+ children: t(block.title)
11215
11289
  }), jsx(ProductTile, {
11216
11290
  product: block.product,
11217
11291
  priority: true,
@@ -11220,7 +11294,7 @@ function Block({ block }) {
11220
11294
  });
11221
11295
  case "product_gallery":
11222
11296
  return jsx(ProductGallery, {
11223
- title: block.title,
11297
+ title: t(block.title),
11224
11298
  product: block.product
11225
11299
  });
11226
11300
  case "lifestyle_image":
@@ -11233,7 +11307,7 @@ function Block({ block }) {
11233
11307
  className: styles$3.gridBlock,
11234
11308
  children: [block.title && jsx("h2", {
11235
11309
  className: styles$3.blockTitle,
11236
- children: block.title
11310
+ children: t(block.title)
11237
11311
  }), jsx("ul", {
11238
11312
  className: styles$3.grid,
11239
11313
  children: block.products.map((p) => jsx("li", {
@@ -11253,7 +11327,7 @@ function Block({ block }) {
11253
11327
  });
11254
11328
  case "explore":
11255
11329
  return jsx(ExploreList, {
11256
- title: block.title,
11330
+ title: t(block.title),
11257
11331
  links: block.links
11258
11332
  });
11259
11333
  default:
@@ -11583,9 +11657,10 @@ const FALLBACK_PANELS = [{
11583
11657
  image: "/figma/home/tshirts-poster.jpg"
11584
11658
  }];
11585
11659
  function CategoryPanel({ panel: panel2 }) {
11660
+ const t = useT();
11586
11661
  return jsxs("section", {
11587
11662
  className: styles$2.panel,
11588
- "aria-label": panel2.title,
11663
+ "aria-label": t(panel2.title),
11589
11664
  ...panel2.focalY === void 0 ? {} : {
11590
11665
  style: {
11591
11666
  "--slide-focal-y": `${panel2.focalY}%`
@@ -11608,16 +11683,16 @@ function CategoryPanel({ panel: panel2 }) {
11608
11683
  className: styles$2.copy,
11609
11684
  children: [jsx("h2", {
11610
11685
  className: styles$2.title,
11611
- children: panel2.title
11686
+ children: t(panel2.title)
11612
11687
  }), jsx("p", {
11613
11688
  className: styles$2.subtitle,
11614
- children: panel2.subtitle
11689
+ children: t(panel2.subtitle)
11615
11690
  })]
11616
11691
  }), jsx(ShopLink, {
11617
11692
  to: panel2.to,
11618
11693
  className: styles$2.cta,
11619
- "aria-label": `${panel2.title} — ${panel2.cta}`,
11620
- children: panel2.cta
11694
+ "aria-label": `${t(panel2.title)} — ${t(panel2.cta)}`,
11695
+ children: t(panel2.cta)
11621
11696
  })]
11622
11697
  })]
11623
11698
  });
@@ -11713,16 +11788,16 @@ function HomeShowcase() {
11713
11788
  className: styles$2.logo
11714
11789
  }), jsx("h1", {
11715
11790
  className: styles$2.heroTitle,
11716
- children: "DAZN SHOP"
11791
+ children: t("DAZN SHOP")
11717
11792
  }), jsx("p", {
11718
11793
  className: styles$2.heroSub,
11719
- children: "Fresh drops inspired by sport, culture, and everyday movement"
11794
+ children: t("Fresh drops inspired by sport, culture, and everyday movement")
11720
11795
  })]
11721
11796
  }), jsxs("div", {
11722
11797
  className: styles$2.swipe,
11723
11798
  children: [jsx("p", {
11724
11799
  className: styles$2.swipeLabel,
11725
- children: "Swipe down for more"
11800
+ children: t("Swipe down for more")
11726
11801
  }), jsx("svg", {
11727
11802
  className: styles$2.chevron,
11728
11803
  viewBox: "0 0 24 24",
@@ -11771,13 +11846,13 @@ function IdentityGate({ returnTo }) {
11771
11846
  const emit = useShopEvent();
11772
11847
  return jsx(EmptyState, {
11773
11848
  title: t("Finish signing up"),
11774
- body: "Complete your DAZN sign-up to check out. Your cart is saved.",
11849
+ body: t("Complete your DAZN sign-up to check out. Your cart is saved."),
11775
11850
  action: jsx(Button, {
11776
11851
  onClick: () => emit({
11777
11852
  type: "session_required",
11778
11853
  action: `sign_in:${returnTo}`
11779
11854
  }),
11780
- children: "Finish signing up"
11855
+ children: t("Finish signing up")
11781
11856
  })
11782
11857
  });
11783
11858
  }
@@ -4499,7 +4499,7 @@ function requireCart() {
4499
4499
  Object.defineProperty(exports, "__esModule", {
4500
4500
  value: true
4501
4501
  });
4502
- exports.PartnerCart = exports.PartnerCartItem = exports.CartHandoffResponse = exports.UpdateCartItemRequest = exports.AddCartItemRequest = exports.Cart = exports.HiddenSummaryLine = exports.CartHold = exports.CartLock = exports.CartLockReason = exports.CartTotals = exports.CartItem = void 0;
4502
+ exports.PartnerCart = exports.PartnerCartItem = exports.CartHandoffResponse = exports.UpdateCartItemRequest = exports.AddCartItemRequest = exports.CartMarketQuery = exports.Cart = exports.HiddenSummaryLine = exports.CartHold = exports.CartLock = exports.CartLockReason = exports.CartTotals = exports.CartItem = void 0;
4503
4503
  const zod_1 = requireZod();
4504
4504
  const money_1 = requireMoney();
4505
4505
  const ids_1 = requireIds();
@@ -4539,6 +4539,7 @@ function requireCart() {
4539
4539
  hold: exports.CartHold.optional(),
4540
4540
  hidden_lines: zod_1.z.array(exports.HiddenSummaryLine).optional()
4541
4541
  });
4542
+ exports.CartMarketQuery = common_1.MarketQuery;
4542
4543
  exports.AddCartItemRequest = zod_1.z.object({
4543
4544
  sku: common_1.Sku,
4544
4545
  qty: zod_1.z.number().int().positive()
@@ -4970,6 +4971,12 @@ function requireClient() {
4970
4971
  throw new Error("No fetch implementation available; pass options.fetch");
4971
4972
  }
4972
4973
  const base = options2.baseUrl.replace(/\/$/, "");
4974
+ function market(query) {
4975
+ return {
4976
+ ...options2.market,
4977
+ ...query
4978
+ };
4979
+ }
4973
4980
  async function request(config) {
4974
4981
  const token = await options2.getToken?.();
4975
4982
  const headers = {
@@ -5075,34 +5082,40 @@ function requireClient() {
5075
5082
  })
5076
5083
  },
5077
5084
  cart: {
5078
- create: () => request({
5085
+ create: (query = {}) => request({
5079
5086
  method: "POST",
5080
5087
  path: "/cart",
5088
+ query: market(query),
5081
5089
  schema: cart_1.Cart
5082
5090
  }),
5083
- get: () => request({
5091
+ get: (query = {}) => request({
5084
5092
  method: "GET",
5085
5093
  path: "/cart",
5094
+ query: market(query),
5086
5095
  schema: cart_1.Cart
5087
5096
  }),
5088
- addItem: (body3) => request({
5097
+ addItem: (body3, query = {}) => request({
5089
5098
  method: "POST",
5090
5099
  path: "/cart/items",
5091
5100
  body: body3,
5101
+ query: market(query),
5092
5102
  schema: cart_1.Cart
5093
5103
  }),
5094
- updateItem: (sku, body3) => request({
5104
+ updateItem: (sku, body3, query = {}) => request({
5095
5105
  method: "PATCH",
5096
5106
  path: `/cart/items/${encodeURIComponent(sku)}`,
5097
5107
  body: body3,
5108
+ query: market(query),
5098
5109
  schema: cart_1.Cart
5099
5110
  }),
5100
- removeItem: (sku) => request({
5111
+ removeItem: (sku, query = {}) => request({
5101
5112
  method: "DELETE",
5102
5113
  path: `/cart/items/${encodeURIComponent(sku)}`,
5114
+ query: market(query),
5103
5115
  schema: cart_1.Cart
5104
5116
  }),
5105
- handoff: () => request({
5117
+ handoff: (query = {}) => request({
5118
+ query: market(query),
5106
5119
  method: "POST",
5107
5120
  path: "/cart/handoff",
5108
5121
  schema: cart_1.CartHandoffResponse
@@ -5211,14 +5224,17 @@ function movesThePage(event) {
5211
5224
  if (event.type === "pointerdown") return event.pointerType !== "touch";
5212
5225
  return true;
5213
5226
  }
5227
+ const TOUCH_DOWN = ["touchstart", "pointerdown"];
5228
+ const TOUCH_UP = ["touchend", "touchcancel", "pointerup", "pointercancel"];
5214
5229
  const holds = /* @__PURE__ */ new Set();
5215
5230
  function releaseHolds() {
5216
5231
  for (const end2 of Array.from(holds)) end2();
5217
5232
  }
5218
5233
  function anchorTop(onMoved = () => true, onEnd, box2 = null) {
5219
5234
  let released = false;
5235
+ let touching = false;
5220
5236
  const top2 = () => {
5221
- if (released) return;
5237
+ if (released || touching) return;
5222
5238
  const document_ = window.scrollY || document.documentElement.scrollTop || 0;
5223
5239
  const pane = box2 ? box2.scrollTop : 0;
5224
5240
  if (document_ <= 0 && pane <= 0) return;
@@ -5226,6 +5242,15 @@ function anchorTop(onMoved = () => true, onEnd, box2 = null) {
5226
5242
  if (document_ > 0) scrollToTop();
5227
5243
  if (box2 && pane > 0) scrollToTop(box2);
5228
5244
  };
5245
+ const down = (event) => {
5246
+ if (event.type !== "pointerdown" || event.pointerType === "touch") {
5247
+ touching = true;
5248
+ }
5249
+ };
5250
+ const up = () => {
5251
+ touching = false;
5252
+ top2();
5253
+ };
5229
5254
  const end2 = (how2) => {
5230
5255
  if (released) return;
5231
5256
  released = true;
@@ -5235,6 +5260,8 @@ function anchorTop(onMoved = () => true, onEnd, box2 = null) {
5235
5260
  window.removeEventListener("scroll", top2);
5236
5261
  box2?.removeEventListener("scroll", top2);
5237
5262
  for (const type of RELEASES) window.removeEventListener(type, release);
5263
+ for (const type of TOUCH_DOWN) window.removeEventListener(type, down);
5264
+ for (const type of TOUCH_UP) window.removeEventListener(type, up);
5238
5265
  onEnd?.(how2);
5239
5266
  };
5240
5267
  const release = (event) => {
@@ -5243,7 +5270,13 @@ function anchorTop(onMoved = () => true, onEnd, box2 = null) {
5243
5270
  const moved = () => end2("moved");
5244
5271
  top2();
5245
5272
  const frame2 = typeof requestAnimationFrame === "function" ? requestAnimationFrame(top2) : null;
5246
- const timer2 = setTimeout(() => end2("lapsed"), HOLD_MS);
5273
+ let timer2 = setTimeout(function lapse() {
5274
+ if (touching) {
5275
+ timer2 = setTimeout(lapse, 100);
5276
+ return;
5277
+ }
5278
+ end2("lapsed");
5279
+ }, HOLD_MS);
5247
5280
  window.addEventListener("scroll", top2, {
5248
5281
  passive: true
5249
5282
  });
@@ -5253,6 +5286,12 @@ function anchorTop(onMoved = () => true, onEnd, box2 = null) {
5253
5286
  for (const type of RELEASES) window.addEventListener(type, release, {
5254
5287
  passive: true
5255
5288
  });
5289
+ for (const type of TOUCH_DOWN) window.addEventListener(type, down, {
5290
+ passive: true
5291
+ });
5292
+ for (const type of TOUCH_UP) window.addEventListener(type, up, {
5293
+ passive: true
5294
+ });
5256
5295
  holds.add(moved);
5257
5296
  return () => end2("released");
5258
5297
  }
@@ -5470,8 +5509,9 @@ function DaznShopProvider({ children, ...config }) {
5470
5509
  onEvent: emit,
5471
5510
  sessionTransport
5472
5511
  }),
5473
- credentials: sessionTransport === "cookie" ? "include" : "omit"
5474
- }), [apiBaseUrl, stableGetToken, emit, sessionTransport]);
5512
+ credentials: sessionTransport === "cookie" ? "include" : "omit",
5513
+ market
5514
+ }), [apiBaseUrl, stableGetToken, emit, sessionTransport, market]);
5475
5515
  const navigate = useCallback((to) => {
5476
5516
  emit({
5477
5517
  type: "navigate",
@@ -6110,7 +6150,20 @@ const ES = {
6110
6150
  "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
6151
  "{0} photographs": "{0} fotografías",
6112
6152
  "{0}, opens in a new tab": "{0}, se abre en una pestaña nueva",
6113
- "Zip Ups": "Sudaderas con cremalleras"
6153
+ "Zip Ups": "Sudaderas con cremalleras",
6154
+ "Added to cart": "Añadido a la cesta",
6155
+ "Order placed": "Pedido realizado",
6156
+ "On its way": "En camino",
6157
+ "Out for delivery": "En reparto",
6158
+ "Estimated delivery": "Entrega estimada",
6159
+ "Nothing matches these filters.": "Nada coincide con estos filtros.",
6160
+ "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.",
6161
+ "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.",
6162
+ "Your orders will show up here once you've shopped.": "Sus pedidos aparecerán aquí cuando haya comprado.",
6163
+ "We'll let you know": "Le avisaremos",
6164
+ "{0} — as soon as it is back": "{0} — en cuanto vuelva a estar disponible",
6165
+ "Size {0}": "Talla {0}",
6166
+ "On the way": "En camino"
6114
6167
  };
6115
6168
  const CATALOGUES = {
6116
6169
  es: ES
@@ -6710,8 +6763,23 @@ const styles$H = {
6710
6763
  future,
6711
6764
  date: date$1
6712
6765
  };
6766
+ const STEP_LABELS = {
6767
+ packing: "Order placed",
6768
+ on_its_way: "On its way",
6769
+ out_for_delivery: "Out for delivery",
6770
+ delivered: "Delivered",
6771
+ cancelled: "Order cancelled"
6772
+ };
6773
+ const PENDING_LABELS = {
6774
+ delivered: "Estimated delivery"
6775
+ };
6776
+ function labelFor(entry) {
6777
+ if (entry.label) return entry.label;
6778
+ return (entry.at ? void 0 : PENDING_LABELS[entry.step]) ?? STEP_LABELS[entry.step] ?? "";
6779
+ }
6713
6780
  function OrderTimeline({ progress: progress2, estimatedDelivery, locale: localeProp }) {
6714
6781
  const locale = useLocale(localeProp);
6782
+ const t = useT();
6715
6783
  const currentIndex = progress2.findIndex((e) => e.current);
6716
6784
  return jsx("ol", {
6717
6785
  className: styles$H.timeline,
@@ -6735,7 +6803,7 @@ function OrderTimeline({ progress: progress2, estimatedDelivery, locale: localeP
6735
6803
  className: styles$H.text,
6736
6804
  children: [jsx("span", {
6737
6805
  className: [styles$H.label, styles$H[state]].join(" "),
6738
- children: entry.label
6806
+ children: t(labelFor(entry))
6739
6807
  }), entry.at ? jsx("time", {
6740
6808
  className: styles$H.date,
6741
6809
  dateTime: entry.at,
@@ -7100,7 +7168,7 @@ function OrderItemsCard({ order }) {
7100
7168
  className: styles$F.itemsHeader,
7101
7169
  children: [jsx("h2", {
7102
7170
  className: styles$F.itemsTitle,
7103
- children: "Items"
7171
+ children: t("Items")
7104
7172
  }), jsx("span", {
7105
7173
  className: styles$F.itemsCount,
7106
7174
  children: itemCount
@@ -7120,7 +7188,7 @@ function ShippingAddressCard({ order }) {
7120
7188
  "aria-label": t("Shipping address"),
7121
7189
  children: [jsx("h2", {
7122
7190
  className: styles$F.cardTitle,
7123
- children: "Shipping address"
7191
+ children: t("Shipping address")
7124
7192
  }), jsx("p", {
7125
7193
  className: styles$F.cardBody,
7126
7194
  children: formatAddress(order.ship_to)
@@ -8620,13 +8688,13 @@ function OrderListContent({ onOpenOrder, onOpenReturn, onStartShopping, locale:
8620
8688
  className: styles$v.empty,
8621
8689
  children: jsx(EmptyState, {
8622
8690
  title: t("Nothing here yet"),
8623
- body: "Your orders will show up here once you've shopped.",
8691
+ body: t("Your orders will show up here once you've shopped."),
8624
8692
  ...onStartShopping ? {
8625
8693
  action: jsx("button", {
8626
8694
  type: "button",
8627
8695
  className: styles$v.cta,
8628
8696
  onClick: onStartShopping,
8629
- children: "Continue shopping"
8697
+ children: t("Continue shopping")
8630
8698
  })
8631
8699
  } : {}
8632
8700
  })
@@ -8891,6 +8959,7 @@ function ProductTile({ product, priority, size = "default" }) {
8891
8959
  const anyInStock = product.variants.length === 0 ? true : product.variants.some((v) => v.in_stock);
8892
8960
  const topBadge2 = product.badges?.[0];
8893
8961
  const pct = discountPct(product.price, product.compare_at);
8962
+ const t = useT();
8894
8963
  return jsxs(ShopLink, {
8895
8964
  to: `/product/${encodeURIComponent(product.sku)}`,
8896
8965
  className: [styles$t.tile, size === "large" ? styles$t.large : ""].join(" "),
@@ -8916,7 +8985,7 @@ function ProductTile({ product, priority, size = "default" }) {
8916
8985
  })
8917
8986
  }), !anyInStock && jsx("span", {
8918
8987
  className: styles$t.oos,
8919
- children: "Out of stock"
8988
+ children: t("Out of stock")
8920
8989
  })]
8921
8990
  }), jsxs("div", {
8922
8991
  className: styles$t.bottom,
@@ -9011,7 +9080,7 @@ function ProductGallery({ title: title2, product }) {
9011
9080
  })
9012
9081
  }), i === 0 && !inStock && jsx("span", {
9013
9082
  className: styles$s.oos,
9014
- children: "Out of stock"
9083
+ children: t("Out of stock")
9015
9084
  })]
9016
9085
  }, src ?? i))
9017
9086
  }), jsxs("div", {
@@ -9077,7 +9146,7 @@ function FilterBar({ options: options2, active, onToggle, onClear }) {
9077
9146
  type: "button",
9078
9147
  className: styles$r.clear,
9079
9148
  onClick: onClear,
9080
- children: "Clear"
9149
+ children: t("Clear")
9081
9150
  })]
9082
9151
  });
9083
9152
  }
@@ -9137,11 +9206,11 @@ function ProductGrid({ category, initialProducts, initialCursor, filters = [] })
9137
9206
  onClear: () => setActive([])
9138
9207
  }), visible.length === 0 ? jsx(EmptyState, {
9139
9208
  title: t("No products"),
9140
- body: "Nothing matches these filters.",
9209
+ body: t("Nothing matches these filters."),
9141
9210
  action: active.length > 0 ? jsx(Button, {
9142
9211
  variant: "secondary",
9143
9212
  onClick: () => setActive([]),
9144
- children: "Clear filters"
9213
+ children: t("Clear filters")
9145
9214
  }) : void 0
9146
9215
  }) : jsx("ul", {
9147
9216
  className: styles$q.grid,
@@ -9181,6 +9250,7 @@ const styles$p = {
9181
9250
  inset
9182
9251
  };
9183
9252
  function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
9253
+ const t = useT();
9184
9254
  if (products.length === 0) return null;
9185
9255
  return jsxs("section", {
9186
9256
  className: [styles$p.rail, inset2 ? styles$p.inset : ""].join(" "),
@@ -9193,7 +9263,7 @@ function RailCarousel({ title: title2, products, seeAllTo, inset: inset2 }) {
9193
9263
  }), seeAllTo && jsx(ShopLink, {
9194
9264
  className: styles$p.seeAll,
9195
9265
  to: seeAllTo,
9196
- children: "See all"
9266
+ children: t("See all")
9197
9267
  })]
9198
9268
  }), jsx("ul", {
9199
9269
  className: styles$p.track,
@@ -9515,7 +9585,7 @@ function CartLineItem({ item: item2, title: title2, image: image2, compareAt: co
9515
9585
  }), soldOut ? jsx("span", {
9516
9586
  className: styles$m.oos,
9517
9587
  id: noticeId,
9518
- children: "Out of stock"
9588
+ children: t("Out of stock")
9519
9589
  }) : pct !== void 0 && jsx("span", {
9520
9590
  className: styles$m.saleBadge,
9521
9591
  children: jsx(SaleBadge, {
@@ -9614,7 +9684,7 @@ function ShippingInfo() {
9614
9684
  })]
9615
9685
  }), jsx("p", {
9616
9686
  className: styles$l.label,
9617
- children: "Standard or express delivery"
9687
+ children: t("Standard or express delivery")
9618
9688
  })]
9619
9689
  }), jsx("div", {
9620
9690
  className: styles$l.divider,
@@ -9643,7 +9713,7 @@ function ShippingInfo() {
9643
9713
  })]
9644
9714
  }), jsx("p", {
9645
9715
  className: styles$l.label,
9646
- children: "14 days returns"
9716
+ children: t("14 days returns")
9647
9717
  })]
9648
9718
  })]
9649
9719
  });
@@ -9826,16 +9896,16 @@ function CartViewContent({ onContinueShopping, checkoutLabel } = {}) {
9826
9896
  if (state === "empty" || !cart2) {
9827
9897
  return jsx(EmptyState, {
9828
9898
  title: t("Nothing here yet"),
9829
- body: "Your items will show up here once you've added to your cart.",
9899
+ body: t("Your items will show up here once you've added to your cart."),
9830
9900
  action: onContinueShopping ? jsx(Button, {
9831
9901
  variant: "primary",
9832
9902
  onClick: onContinueShopping,
9833
- children: "Continue shopping"
9903
+ children: t("Continue shopping")
9834
9904
  }) : jsx(ShopLink, {
9835
9905
  to: "/",
9836
9906
  children: jsx(Button, {
9837
9907
  variant: "primary",
9838
- children: "Continue shopping"
9908
+ children: t("Continue shopping")
9839
9909
  })
9840
9910
  })
9841
9911
  });
@@ -10254,14 +10324,14 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
10254
10324
  children: [jsx("h2", {
10255
10325
  id: "size-heading",
10256
10326
  className: styles$g.title,
10257
- children: "Size"
10327
+ children: t("Size")
10258
10328
  }), showGuide && jsxs("button", {
10259
10329
  type: "button",
10260
10330
  className: styles$g.sizeGuide,
10261
10331
  onClick: () => setGuideOpen(true),
10262
10332
  "aria-haspopup": "dialog",
10263
10333
  "aria-expanded": guideOpen,
10264
- children: ["Size guide", jsxs("svg", {
10334
+ children: [t("Size guide"), jsxs("svg", {
10265
10335
  className: styles$g.info,
10266
10336
  width: "12",
10267
10337
  height: "12",
@@ -10312,7 +10382,7 @@ function SizeSelector({ sizes, selected: selected2, onSelect, error: error2 = fa
10312
10382
  }), error2 && jsx("p", {
10313
10383
  className: styles$g.error,
10314
10384
  role: "alert",
10315
- children: "Please select a size"
10385
+ children: t("Please select a size")
10316
10386
  }), lowStock2 && !error2 && jsx("p", {
10317
10387
  className: styles$g.lowStock,
10318
10388
  role: "status",
@@ -10394,7 +10464,7 @@ function ColorSelector({ colours, selected: selected2, onSelect }) {
10394
10464
  }), soldOut && jsx("span", {
10395
10465
  className: styles$f.scrim,
10396
10466
  "aria-hidden": "true",
10397
- children: "Out of stock"
10467
+ children: t("Out of stock")
10398
10468
  })]
10399
10469
  }), lowStock2 && jsx("span", {
10400
10470
  className: styles$f.stockBadge,
@@ -10422,7 +10492,7 @@ const styles$e = {
10422
10492
  };
10423
10493
  function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10424
10494
  const t = useT();
10425
- function labelFor(variant) {
10495
+ function labelFor2(variant) {
10426
10496
  if (labelAttribute && variant.attributes[labelAttribute]) {
10427
10497
  return variant.attributes[labelAttribute];
10428
10498
  }
@@ -10433,7 +10503,7 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10433
10503
  className: styles$e.fieldset,
10434
10504
  children: [jsx("legend", {
10435
10505
  className: styles$e.legend,
10436
- children: "Select an option"
10506
+ children: t("Select an option")
10437
10507
  }), jsx("div", {
10438
10508
  className: styles$e.options,
10439
10509
  role: "radiogroup",
@@ -10449,7 +10519,7 @@ function VariantSelector({ variants, selectedSku, onSelect, labelAttribute }) {
10449
10519
  disabled: disabled2,
10450
10520
  className: [styles$e.option, selected2 ? styles$e.selected : "", disabled2 ? styles$e.disabled : ""].filter(Boolean).join(" "),
10451
10521
  onClick: () => !disabled2 && onSelect(variant.sku),
10452
- children: [labelFor(variant), disabled2 && jsx("span", {
10522
+ children: [labelFor2(variant), disabled2 && jsx("span", {
10453
10523
  className: "visually-hidden",
10454
10524
  children: " (out of stock)"
10455
10525
  })]
@@ -10500,6 +10570,7 @@ function ProductDetails({ description: description2 }) {
10500
10570
  observer?.disconnect();
10501
10571
  };
10502
10572
  }, [expanded, description2]);
10573
+ const t = useT();
10503
10574
  if (paragraphs.length === 0) return null;
10504
10575
  return jsxs("section", {
10505
10576
  className: styles$d.root,
@@ -10509,7 +10580,7 @@ function ProductDetails({ description: description2 }) {
10509
10580
  children: [jsx("h2", {
10510
10581
  id: "details-heading",
10511
10582
  className: styles$d.title,
10512
- children: "Product details"
10583
+ children: t("Product details")
10513
10584
  }), jsx("div", {
10514
10585
  ref: bodyRef,
10515
10586
  className: [styles$d.body, expanded ? "" : styles$d.clamped].join(" "),
@@ -10758,8 +10829,8 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
10758
10829
  type: "stock_alert_requested",
10759
10830
  sku: alertSku
10760
10831
  });
10761
- toast2.show("We'll let you know", {
10762
- description: `${product.title} — as soon as it is back`,
10832
+ toast2.show(t("We'll let you know"), {
10833
+ description: t("{0} — as soon as it is back", product.title),
10763
10834
  image: product.media[0]
10764
10835
  });
10765
10836
  } catch (err) {
@@ -10812,8 +10883,8 @@ function ProductDetail({ product, inventory: inventory2, recommendations = [] })
10812
10883
  const variant = variants.find((v) => v.sku === sku);
10813
10884
  const size = variant?.attributes.size ?? selectedSize;
10814
10885
  setAdded((current2) => current2.includes(sku) ? current2 : [...current2, sku]);
10815
- toast2.show("Added to cart", {
10816
- description: [product.title, size && `Size ${size}`].filter(Boolean).join(" · "),
10886
+ toast2.show(t("Added to cart"), {
10887
+ description: [product.title, size && t("Size {0}", size)].filter(Boolean).join(" · "),
10817
10888
  image: variant?.image ?? product.media[0],
10818
10889
  action: cartSheet || navigate ? {
10819
10890
  label: t("View cart"),
@@ -10940,6 +11011,7 @@ const styles$9 = {
10940
11011
  function PcpHero({ hero: hero2 }) {
10941
11012
  const heroRef = useRef(null);
10942
11013
  useTopOffset(heroRef, "--hero-top");
11014
+ const t = useT();
10943
11015
  return jsxs("section", {
10944
11016
  ref: heroRef,
10945
11017
  className: [styles$9.hero, hero2.image ? "" : styles$9.noImage].join(" "),
@@ -10964,10 +11036,10 @@ function PcpHero({ hero: hero2 }) {
10964
11036
  className: styles$9.text,
10965
11037
  children: [jsx("h1", {
10966
11038
  className: styles$9.title,
10967
- children: hero2.title
11039
+ children: t(hero2.title)
10968
11040
  }), hero2.subtitle && jsx("p", {
10969
11041
  className: styles$9.subtitle,
10970
- children: hero2.subtitle
11042
+ children: t(hero2.subtitle)
10971
11043
  })]
10972
11044
  })]
10973
11045
  });
@@ -11147,6 +11219,7 @@ const styles$4 = {
11147
11219
  row: row$1
11148
11220
  };
11149
11221
  function ExploreList({ title: title2, links }) {
11222
+ const t = useT();
11150
11223
  return jsxs("section", {
11151
11224
  className: styles$4.section,
11152
11225
  "aria-label": title2,
@@ -11160,7 +11233,7 @@ function ExploreList({ title: title2, links }) {
11160
11233
  to: `/category/${encodeURIComponent(l.code)}`,
11161
11234
  className: styles$4.row,
11162
11235
  children: [jsx("span", {
11163
- children: l.label
11236
+ children: t(l.label)
11164
11237
  }), jsx("svg", {
11165
11238
  width: "16",
11166
11239
  height: "16",
@@ -11195,10 +11268,11 @@ const styles$3 = {
11195
11268
  grid
11196
11269
  };
11197
11270
  function Block({ block }) {
11271
+ const t = useT();
11198
11272
  switch (block.kind) {
11199
11273
  case "rail":
11200
11274
  return jsx(RailCarousel, {
11201
- title: block.title,
11275
+ title: t(block.title),
11202
11276
  products: block.products
11203
11277
  });
11204
11278
  case "lifestyle_text":
@@ -11211,7 +11285,7 @@ function Block({ block }) {
11211
11285
  className: styles$3.featured,
11212
11286
  children: [block.title && jsx("h2", {
11213
11287
  className: styles$3.blockTitle,
11214
- children: block.title
11288
+ children: t(block.title)
11215
11289
  }), jsx(ProductTile, {
11216
11290
  product: block.product,
11217
11291
  priority: true,
@@ -11220,7 +11294,7 @@ function Block({ block }) {
11220
11294
  });
11221
11295
  case "product_gallery":
11222
11296
  return jsx(ProductGallery, {
11223
- title: block.title,
11297
+ title: t(block.title),
11224
11298
  product: block.product
11225
11299
  });
11226
11300
  case "lifestyle_image":
@@ -11233,7 +11307,7 @@ function Block({ block }) {
11233
11307
  className: styles$3.gridBlock,
11234
11308
  children: [block.title && jsx("h2", {
11235
11309
  className: styles$3.blockTitle,
11236
- children: block.title
11310
+ children: t(block.title)
11237
11311
  }), jsx("ul", {
11238
11312
  className: styles$3.grid,
11239
11313
  children: block.products.map((p) => jsx("li", {
@@ -11253,7 +11327,7 @@ function Block({ block }) {
11253
11327
  });
11254
11328
  case "explore":
11255
11329
  return jsx(ExploreList, {
11256
- title: block.title,
11330
+ title: t(block.title),
11257
11331
  links: block.links
11258
11332
  });
11259
11333
  default:
@@ -11583,9 +11657,10 @@ const FALLBACK_PANELS = [{
11583
11657
  image: "/figma/home/tshirts-poster.jpg"
11584
11658
  }];
11585
11659
  function CategoryPanel({ panel: panel2 }) {
11660
+ const t = useT();
11586
11661
  return jsxs("section", {
11587
11662
  className: styles$2.panel,
11588
- "aria-label": panel2.title,
11663
+ "aria-label": t(panel2.title),
11589
11664
  ...panel2.focalY === void 0 ? {} : {
11590
11665
  style: {
11591
11666
  "--slide-focal-y": `${panel2.focalY}%`
@@ -11608,16 +11683,16 @@ function CategoryPanel({ panel: panel2 }) {
11608
11683
  className: styles$2.copy,
11609
11684
  children: [jsx("h2", {
11610
11685
  className: styles$2.title,
11611
- children: panel2.title
11686
+ children: t(panel2.title)
11612
11687
  }), jsx("p", {
11613
11688
  className: styles$2.subtitle,
11614
- children: panel2.subtitle
11689
+ children: t(panel2.subtitle)
11615
11690
  })]
11616
11691
  }), jsx(ShopLink, {
11617
11692
  to: panel2.to,
11618
11693
  className: styles$2.cta,
11619
- "aria-label": `${panel2.title} — ${panel2.cta}`,
11620
- children: panel2.cta
11694
+ "aria-label": `${t(panel2.title)} — ${t(panel2.cta)}`,
11695
+ children: t(panel2.cta)
11621
11696
  })]
11622
11697
  })]
11623
11698
  });
@@ -11713,16 +11788,16 @@ function HomeShowcase() {
11713
11788
  className: styles$2.logo
11714
11789
  }), jsx("h1", {
11715
11790
  className: styles$2.heroTitle,
11716
- children: "DAZN SHOP"
11791
+ children: t("DAZN SHOP")
11717
11792
  }), jsx("p", {
11718
11793
  className: styles$2.heroSub,
11719
- children: "Fresh drops inspired by sport, culture, and everyday movement"
11794
+ children: t("Fresh drops inspired by sport, culture, and everyday movement")
11720
11795
  })]
11721
11796
  }), jsxs("div", {
11722
11797
  className: styles$2.swipe,
11723
11798
  children: [jsx("p", {
11724
11799
  className: styles$2.swipeLabel,
11725
- children: "Swipe down for more"
11800
+ children: t("Swipe down for more")
11726
11801
  }), jsx("svg", {
11727
11802
  className: styles$2.chevron,
11728
11803
  viewBox: "0 0 24 24",
@@ -11771,13 +11846,13 @@ function IdentityGate({ returnTo }) {
11771
11846
  const emit = useShopEvent();
11772
11847
  return jsx(EmptyState, {
11773
11848
  title: t("Finish signing up"),
11774
- body: "Complete your DAZN sign-up to check out. Your cart is saved.",
11849
+ body: t("Complete your DAZN sign-up to check out. Your cart is saved."),
11775
11850
  action: jsx(Button, {
11776
11851
  onClick: () => emit({
11777
11852
  type: "session_required",
11778
11853
  action: `sign_in:${returnTo}`
11779
11854
  }),
11780
- children: "Finish signing up"
11855
+ children: t("Finish signing up")
11781
11856
  })
11782
11857
  });
11783
11858
  }
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.14",
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",