@nok-integration/storefront-react 0.24.0 → 0.26.0
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 +249 -37
- package/dist/index.mjs +4504 -1862
- package/dist/standalone/storefront.mjs +4504 -1862
- package/dist/standalone/styles.css +1733 -591
- package/dist/styles.css +1733 -591
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare interface BadgeProps {
|
|
|
63
63
|
|
|
64
64
|
export declare type BadgeTone = 'neutral' | 'success' | 'critical' | 'promo';
|
|
65
65
|
|
|
66
|
-
export declare function BottomSheet({ open, onClose, title, children, footer }: BottomSheetProps): JSX.Element | null;
|
|
66
|
+
export declare function BottomSheet({ open, onClose, title, children, footer, wide }: BottomSheetProps): JSX.Element | null;
|
|
67
67
|
|
|
68
68
|
export declare interface BottomSheetProps {
|
|
69
69
|
open: boolean;
|
|
@@ -72,6 +72,7 @@ export declare interface BottomSheetProps {
|
|
|
72
72
|
children: ReactNode;
|
|
73
73
|
/** Optional sticky footer (e.g. a StickyCtaBar). */
|
|
74
74
|
footer?: ReactNode;
|
|
75
|
+
wide?: 'sheet' | 'panel';
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
/**
|
|
@@ -318,6 +319,151 @@ declare function CartSheetProvider({ children }: {
|
|
|
318
319
|
export { CartSheetProvider as CartSheet }
|
|
319
320
|
export { CartSheetProvider }
|
|
320
321
|
|
|
322
|
+
/**
|
|
323
|
+
* Cart totals: the standard pricing breakdown, plus what came off.
|
|
324
|
+
*
|
|
325
|
+
* `discount` is **additive** — `Pricing` itself is untouched, because it is shared with
|
|
326
|
+
* surfaces that have no concept of one and must not grow a field they cannot populate.
|
|
327
|
+
*/
|
|
328
|
+
declare const CartTotals: z.ZodObject<{
|
|
329
|
+
subtotal: z.ZodObject<{
|
|
330
|
+
amount: z.ZodNumber;
|
|
331
|
+
currency: z.ZodString;
|
|
332
|
+
}, "strict", z.ZodTypeAny, {
|
|
333
|
+
amount: number;
|
|
334
|
+
currency: string;
|
|
335
|
+
}, {
|
|
336
|
+
amount: number;
|
|
337
|
+
currency: string;
|
|
338
|
+
}>;
|
|
339
|
+
shipping: z.ZodObject<{
|
|
340
|
+
amount: z.ZodNumber;
|
|
341
|
+
currency: z.ZodString;
|
|
342
|
+
}, "strict", z.ZodTypeAny, {
|
|
343
|
+
amount: number;
|
|
344
|
+
currency: string;
|
|
345
|
+
}, {
|
|
346
|
+
amount: number;
|
|
347
|
+
currency: string;
|
|
348
|
+
}>;
|
|
349
|
+
tax: z.ZodObject<{
|
|
350
|
+
amount: z.ZodNumber;
|
|
351
|
+
currency: z.ZodString;
|
|
352
|
+
}, "strict", z.ZodTypeAny, {
|
|
353
|
+
amount: number;
|
|
354
|
+
currency: string;
|
|
355
|
+
}, {
|
|
356
|
+
amount: number;
|
|
357
|
+
currency: string;
|
|
358
|
+
}>;
|
|
359
|
+
total: z.ZodObject<{
|
|
360
|
+
amount: z.ZodNumber;
|
|
361
|
+
currency: z.ZodString;
|
|
362
|
+
}, "strict", z.ZodTypeAny, {
|
|
363
|
+
amount: number;
|
|
364
|
+
currency: string;
|
|
365
|
+
}, {
|
|
366
|
+
amount: number;
|
|
367
|
+
currency: string;
|
|
368
|
+
}>;
|
|
369
|
+
} & {
|
|
370
|
+
/**
|
|
371
|
+
* What came off across the whole basket, as a **positive** amount. Absent means nothing
|
|
372
|
+
* did; a zero is never sent.
|
|
373
|
+
*
|
|
374
|
+
* Positive rather than signed, and the surface that draws it owns the minus sign —
|
|
375
|
+
* exactly as `OrderTotals.discount` does. A signed field invites a reader to add it to a
|
|
376
|
+
* running total, and nothing here is a running total: every figure is server-computed
|
|
377
|
+
* and `total` is never derived by a consumer from the parts.
|
|
378
|
+
*
|
|
379
|
+
* Kept out of `subtotal` deliberately. The design lists a subtotal and a discount as two
|
|
380
|
+
* rows because the fan is owed both figures, and folding the saving into the subtotal
|
|
381
|
+
* loses the one they came for.
|
|
382
|
+
*/
|
|
383
|
+
discount: z.ZodOptional<z.ZodObject<{
|
|
384
|
+
amount: z.ZodNumber;
|
|
385
|
+
currency: z.ZodString;
|
|
386
|
+
}, "strict", z.ZodTypeAny, {
|
|
387
|
+
amount: number;
|
|
388
|
+
currency: string;
|
|
389
|
+
}, {
|
|
390
|
+
amount: number;
|
|
391
|
+
currency: string;
|
|
392
|
+
}>>;
|
|
393
|
+
/**
|
|
394
|
+
* The lines at their undiscounted prices: each line's `compare_at_unit_price` where it
|
|
395
|
+
* has one, otherwise its `unit_price`, times its quantity. Present exactly when
|
|
396
|
+
* `discount` is, and absent means it equals `subtotal`.
|
|
397
|
+
*
|
|
398
|
+
* This is the figure the summary's Subtotal row draws above the Discount row, so the
|
|
399
|
+
* rows read top to bottom: `subtotal_before_discount` − `discount` = `subtotal`, and
|
|
400
|
+
* `total` is `subtotal` plus shipping and tax. `subtotal` itself keeps its meaning — what
|
|
401
|
+
* the lines cost now — because the hand-off and analytics read it as the basket's value.
|
|
402
|
+
*/
|
|
403
|
+
subtotal_before_discount: z.ZodOptional<z.ZodObject<{
|
|
404
|
+
amount: z.ZodNumber;
|
|
405
|
+
currency: z.ZodString;
|
|
406
|
+
}, "strict", z.ZodTypeAny, {
|
|
407
|
+
amount: number;
|
|
408
|
+
currency: string;
|
|
409
|
+
}, {
|
|
410
|
+
amount: number;
|
|
411
|
+
currency: string;
|
|
412
|
+
}>>;
|
|
413
|
+
}, "strip", z.ZodTypeAny, {
|
|
414
|
+
subtotal: {
|
|
415
|
+
amount: number;
|
|
416
|
+
currency: string;
|
|
417
|
+
};
|
|
418
|
+
shipping: {
|
|
419
|
+
amount: number;
|
|
420
|
+
currency: string;
|
|
421
|
+
};
|
|
422
|
+
tax: {
|
|
423
|
+
amount: number;
|
|
424
|
+
currency: string;
|
|
425
|
+
};
|
|
426
|
+
total: {
|
|
427
|
+
amount: number;
|
|
428
|
+
currency: string;
|
|
429
|
+
};
|
|
430
|
+
discount?: {
|
|
431
|
+
amount: number;
|
|
432
|
+
currency: string;
|
|
433
|
+
} | undefined;
|
|
434
|
+
subtotal_before_discount?: {
|
|
435
|
+
amount: number;
|
|
436
|
+
currency: string;
|
|
437
|
+
} | undefined;
|
|
438
|
+
}, {
|
|
439
|
+
subtotal: {
|
|
440
|
+
amount: number;
|
|
441
|
+
currency: string;
|
|
442
|
+
};
|
|
443
|
+
shipping: {
|
|
444
|
+
amount: number;
|
|
445
|
+
currency: string;
|
|
446
|
+
};
|
|
447
|
+
tax: {
|
|
448
|
+
amount: number;
|
|
449
|
+
currency: string;
|
|
450
|
+
};
|
|
451
|
+
total: {
|
|
452
|
+
amount: number;
|
|
453
|
+
currency: string;
|
|
454
|
+
};
|
|
455
|
+
discount?: {
|
|
456
|
+
amount: number;
|
|
457
|
+
currency: string;
|
|
458
|
+
} | undefined;
|
|
459
|
+
subtotal_before_discount?: {
|
|
460
|
+
amount: number;
|
|
461
|
+
currency: string;
|
|
462
|
+
} | undefined;
|
|
463
|
+
}>;
|
|
464
|
+
|
|
465
|
+
declare type CartTotals = z.infer<typeof CartTotals>;
|
|
466
|
+
|
|
321
467
|
/**
|
|
322
468
|
* Opens the cart as a bottom sheet.
|
|
323
469
|
*
|
|
@@ -419,13 +565,19 @@ declare const CategoryHero: z.ZodObject<{
|
|
|
419
565
|
title: z.ZodString;
|
|
420
566
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
421
567
|
image: z.ZodOptional<z.ZodString>;
|
|
568
|
+
/**
|
|
569
|
+
* The hero at desktop width (1200px and up). Absent = `image` is used at every width.
|
|
570
|
+
*/
|
|
571
|
+
desktop_image: z.ZodOptional<z.ZodString>;
|
|
422
572
|
}, "strip", z.ZodTypeAny, {
|
|
423
573
|
title: string;
|
|
424
574
|
image?: string | undefined;
|
|
575
|
+
desktop_image?: string | undefined;
|
|
425
576
|
subtitle?: string | undefined;
|
|
426
577
|
}, {
|
|
427
578
|
title: string;
|
|
428
579
|
image?: string | undefined;
|
|
580
|
+
desktop_image?: string | undefined;
|
|
429
581
|
subtitle?: string | undefined;
|
|
430
582
|
}>;
|
|
431
583
|
|
|
@@ -437,13 +589,19 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
437
589
|
title: z.ZodString;
|
|
438
590
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
439
591
|
image: z.ZodOptional<z.ZodString>;
|
|
592
|
+
/**
|
|
593
|
+
* The hero at desktop width (1200px and up). Absent = `image` is used at every width.
|
|
594
|
+
*/
|
|
595
|
+
desktop_image: z.ZodOptional<z.ZodString>;
|
|
440
596
|
}, "strip", z.ZodTypeAny, {
|
|
441
597
|
title: string;
|
|
442
598
|
image?: string | undefined;
|
|
599
|
+
desktop_image?: string | undefined;
|
|
443
600
|
subtitle?: string | undefined;
|
|
444
601
|
}, {
|
|
445
602
|
title: string;
|
|
446
603
|
image?: string | undefined;
|
|
604
|
+
desktop_image?: string | undefined;
|
|
447
605
|
subtitle?: string | undefined;
|
|
448
606
|
}>;
|
|
449
607
|
blocks: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
@@ -1299,14 +1457,22 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1299
1457
|
kind: z.ZodLiteral<"lifestyle_image">;
|
|
1300
1458
|
images: z.ZodArray<z.ZodString, "many">;
|
|
1301
1459
|
videos: z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodString>, "many">>;
|
|
1460
|
+
/**
|
|
1461
|
+
* Parallel to `images`: the still drawn for slide `i` at desktop width (1200px and up),
|
|
1462
|
+
* in place of `images[i]` and of `videos[i]`. `null`, or an index past the end, keeps
|
|
1463
|
+
* that slide as it is at every width. Like `videos`, it never adds a slide.
|
|
1464
|
+
*/
|
|
1465
|
+
desktop_images: z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodString>, "many">>;
|
|
1302
1466
|
}, "strip", z.ZodTypeAny, {
|
|
1303
1467
|
kind: "lifestyle_image";
|
|
1304
1468
|
images: string[];
|
|
1305
1469
|
videos?: (string | null)[] | undefined;
|
|
1470
|
+
desktop_images?: (string | null)[] | undefined;
|
|
1306
1471
|
}, {
|
|
1307
1472
|
kind: "lifestyle_image";
|
|
1308
1473
|
images: string[];
|
|
1309
1474
|
videos?: (string | null)[] | undefined;
|
|
1475
|
+
desktop_images?: (string | null)[] | undefined;
|
|
1310
1476
|
}>, z.ZodObject<{
|
|
1311
1477
|
kind: z.ZodLiteral<"grid">;
|
|
1312
1478
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -1676,6 +1842,7 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1676
1842
|
hero: {
|
|
1677
1843
|
title: string;
|
|
1678
1844
|
image?: string | undefined;
|
|
1845
|
+
desktop_image?: string | undefined;
|
|
1679
1846
|
subtitle?: string | undefined;
|
|
1680
1847
|
};
|
|
1681
1848
|
blocks: ({
|
|
@@ -1776,6 +1943,7 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1776
1943
|
kind: "lifestyle_image";
|
|
1777
1944
|
images: string[];
|
|
1778
1945
|
videos?: (string | null)[] | undefined;
|
|
1946
|
+
desktop_images?: (string | null)[] | undefined;
|
|
1779
1947
|
} | {
|
|
1780
1948
|
kind: "grid";
|
|
1781
1949
|
products: {
|
|
@@ -1893,6 +2061,7 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1893
2061
|
hero: {
|
|
1894
2062
|
title: string;
|
|
1895
2063
|
image?: string | undefined;
|
|
2064
|
+
desktop_image?: string | undefined;
|
|
1896
2065
|
subtitle?: string | undefined;
|
|
1897
2066
|
};
|
|
1898
2067
|
blocks: ({
|
|
@@ -1993,6 +2162,7 @@ declare const CategoryPage: z.ZodObject<{
|
|
|
1993
2162
|
kind: "lifestyle_image";
|
|
1994
2163
|
images: string[];
|
|
1995
2164
|
videos?: (string | null)[] | undefined;
|
|
2165
|
+
desktop_images?: (string | null)[] | undefined;
|
|
1996
2166
|
} | {
|
|
1997
2167
|
kind: "grid";
|
|
1998
2168
|
products: {
|
|
@@ -2371,6 +2541,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2371
2541
|
title: string;
|
|
2372
2542
|
image?: string | undefined;
|
|
2373
2543
|
subtitle?: string | undefined;
|
|
2544
|
+
desktop_image?: string | undefined;
|
|
2374
2545
|
};
|
|
2375
2546
|
blocks: ({
|
|
2376
2547
|
title: string;
|
|
@@ -2470,6 +2641,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2470
2641
|
kind: "lifestyle_image";
|
|
2471
2642
|
images: string[];
|
|
2472
2643
|
videos?: (string | null)[] | undefined;
|
|
2644
|
+
desktop_images?: (string | null)[] | undefined;
|
|
2473
2645
|
} | {
|
|
2474
2646
|
kind: "grid";
|
|
2475
2647
|
products: {
|
|
@@ -2593,6 +2765,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2593
2765
|
key: string;
|
|
2594
2766
|
cta: string;
|
|
2595
2767
|
image?: string | undefined;
|
|
2768
|
+
desktop_image?: string | undefined;
|
|
2596
2769
|
target?: string | undefined;
|
|
2597
2770
|
video?: string | undefined;
|
|
2598
2771
|
focal_y?: number | undefined;
|
|
@@ -2682,6 +2855,10 @@ declare function createClient(options: ClientOptions): {
|
|
|
2682
2855
|
amount: number;
|
|
2683
2856
|
currency: string;
|
|
2684
2857
|
} | undefined;
|
|
2858
|
+
subtotal_before_discount?: {
|
|
2859
|
+
amount: number;
|
|
2860
|
+
currency: string;
|
|
2861
|
+
} | undefined;
|
|
2685
2862
|
};
|
|
2686
2863
|
locked?: {
|
|
2687
2864
|
reason: "checkout_handoff";
|
|
@@ -2741,6 +2918,10 @@ declare function createClient(options: ClientOptions): {
|
|
|
2741
2918
|
amount: number;
|
|
2742
2919
|
currency: string;
|
|
2743
2920
|
} | undefined;
|
|
2921
|
+
subtotal_before_discount?: {
|
|
2922
|
+
amount: number;
|
|
2923
|
+
currency: string;
|
|
2924
|
+
} | undefined;
|
|
2744
2925
|
};
|
|
2745
2926
|
locked?: {
|
|
2746
2927
|
reason: "checkout_handoff";
|
|
@@ -2800,6 +2981,10 @@ declare function createClient(options: ClientOptions): {
|
|
|
2800
2981
|
amount: number;
|
|
2801
2982
|
currency: string;
|
|
2802
2983
|
} | undefined;
|
|
2984
|
+
subtotal_before_discount?: {
|
|
2985
|
+
amount: number;
|
|
2986
|
+
currency: string;
|
|
2987
|
+
} | undefined;
|
|
2803
2988
|
};
|
|
2804
2989
|
locked?: {
|
|
2805
2990
|
reason: "checkout_handoff";
|
|
@@ -2859,6 +3044,10 @@ declare function createClient(options: ClientOptions): {
|
|
|
2859
3044
|
amount: number;
|
|
2860
3045
|
currency: string;
|
|
2861
3046
|
} | undefined;
|
|
3047
|
+
subtotal_before_discount?: {
|
|
3048
|
+
amount: number;
|
|
3049
|
+
currency: string;
|
|
3050
|
+
} | undefined;
|
|
2862
3051
|
};
|
|
2863
3052
|
locked?: {
|
|
2864
3053
|
reason: "checkout_handoff";
|
|
@@ -2918,6 +3107,10 @@ declare function createClient(options: ClientOptions): {
|
|
|
2918
3107
|
amount: number;
|
|
2919
3108
|
currency: string;
|
|
2920
3109
|
} | undefined;
|
|
3110
|
+
subtotal_before_discount?: {
|
|
3111
|
+
amount: number;
|
|
3112
|
+
currency: string;
|
|
3113
|
+
} | undefined;
|
|
2921
3114
|
};
|
|
2922
3115
|
locked?: {
|
|
2923
3116
|
reason: "checkout_handoff";
|
|
@@ -2949,7 +3142,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2949
3142
|
*/
|
|
2950
3143
|
stockAlerts: {
|
|
2951
3144
|
/** "Remind me when available" — idempotent per SKU for the session's principal. */
|
|
2952
|
-
create: (body: StockAlertRequest) => Promise<{
|
|
3145
|
+
create: (body: StockAlertRequest, query?: CartMarketQuery) => Promise<{
|
|
2953
3146
|
sku: string;
|
|
2954
3147
|
created_at: string;
|
|
2955
3148
|
notified_at?: string | undefined;
|
|
@@ -3340,6 +3533,10 @@ declare function createClient(options: ClientOptions): {
|
|
|
3340
3533
|
amount: number;
|
|
3341
3534
|
currency: string;
|
|
3342
3535
|
} | undefined;
|
|
3536
|
+
subtotal_before_discount?: {
|
|
3537
|
+
amount: number;
|
|
3538
|
+
currency: string;
|
|
3539
|
+
} | undefined;
|
|
3343
3540
|
};
|
|
3344
3541
|
locked?: {
|
|
3345
3542
|
reason: "checkout_handoff";
|
|
@@ -3761,7 +3958,7 @@ export declare function isUnauthorized(err: unknown): boolean;
|
|
|
3761
3958
|
* down the page has no business fetching a megabyte before it is anywhere near the screen,
|
|
3762
3959
|
* and `ShopVideo` starts its own download when the slide comes into view.
|
|
3763
3960
|
*/
|
|
3764
|
-
export declare function LifestyleImage({ images, videos }: LifestyleImageProps): JSX.Element | null;
|
|
3961
|
+
export declare function LifestyleImage({ images, videos, desktopImages }: LifestyleImageProps): JSX.Element | null;
|
|
3765
3962
|
|
|
3766
3963
|
declare interface LifestyleImageProps {
|
|
3767
3964
|
images: string[];
|
|
@@ -3771,6 +3968,8 @@ declare interface LifestyleImageProps {
|
|
|
3771
3968
|
* contracts 2.51.0.
|
|
3772
3969
|
*/
|
|
3773
3970
|
videos?: (string | null)[];
|
|
3971
|
+
/** Parallel to `images`: the still drawn for that slide from 1200px wide, `null` for none. */
|
|
3972
|
+
desktopImages?: (string | null)[];
|
|
3774
3973
|
}
|
|
3775
3974
|
|
|
3776
3975
|
/** Editorial text band between PCP sections. */
|
|
@@ -4466,7 +4665,7 @@ declare type OrderDetail = z.infer<typeof OrderDetail>;
|
|
|
4466
4665
|
export declare function OrderListView(props: OrderListViewProps): JSX.Element;
|
|
4467
4666
|
|
|
4468
4667
|
export declare interface OrderListViewProps {
|
|
4469
|
-
/** Opens one order. Without it the
|
|
4668
|
+
/** Opens one order on a route of your own. Without it the order opens in place of the list. */
|
|
4470
4669
|
onOpenOrder?: (orderRef: string) => void;
|
|
4471
4670
|
/**
|
|
4472
4671
|
* Open one return on a route of your own.
|
|
@@ -4478,7 +4677,7 @@ export declare interface OrderListViewProps {
|
|
|
4478
4677
|
* landing them on the order is a different answer to the question they asked.
|
|
4479
4678
|
*/
|
|
4480
4679
|
onOpenReturn?: (returnRef: string) => void;
|
|
4481
|
-
/** The empty state's
|
|
4680
|
+
/** The empty state's "Continue shopping". Without it the button navigates to the shop home. */
|
|
4482
4681
|
onStartShopping?: () => void;
|
|
4483
4682
|
/** Overrides the provider's locale for dates. */
|
|
4484
4683
|
locale?: string;
|
|
@@ -4518,10 +4717,15 @@ export declare interface OrderStatusBadgeProps {
|
|
|
4518
4717
|
* The pricing breakdown. DISPLAY ONLY — every value is server-authoritative; the UI
|
|
4519
4718
|
* never sums or computes anything here.
|
|
4520
4719
|
*/
|
|
4521
|
-
export declare function OrderSummary({ pricing, deferred, hidden, rows, discount, }: OrderSummaryProps): JSX.Element;
|
|
4720
|
+
export declare function OrderSummary({ pricing, deferred, hidden, rows, discount, collapsible, }: OrderSummaryProps): JSX.Element;
|
|
4522
4721
|
|
|
4523
4722
|
export declare interface OrderSummaryProps {
|
|
4524
|
-
|
|
4723
|
+
/**
|
|
4724
|
+
* The figures to draw. A cart's `totals` also carries `subtotal_before_discount`, which
|
|
4725
|
+
* the Subtotal row shows whenever the Discount row is drawn, so the rows read
|
|
4726
|
+
* Subtotal − Discount = Total exactly as the engine sent them.
|
|
4727
|
+
*/
|
|
4728
|
+
pricing: Pricing & Partial<Pick<CartTotals, 'subtotal_before_discount'>>;
|
|
4525
4729
|
/**
|
|
4526
4730
|
* Row order and wording, where a surface's design differs from the cart's.
|
|
4527
4731
|
*
|
|
@@ -4569,6 +4773,7 @@ export declare interface OrderSummaryProps {
|
|
|
4569
4773
|
* the grand total is DAZN's, never the sum of the rows above it.
|
|
4570
4774
|
*/
|
|
4571
4775
|
discount?: Money;
|
|
4776
|
+
collapsible?: boolean;
|
|
4572
4777
|
}
|
|
4573
4778
|
|
|
4574
4779
|
export declare function OrderTimeline({ progress, estimatedDelivery, locale: localeProp, }: OrderTimelineProps): JSX.Element;
|
|
@@ -5180,7 +5385,7 @@ declare type ProductPromo = z.infer<typeof ProductPromo>;
|
|
|
5180
5385
|
* 165:220 image (radius-6) with a TOP PICK flag top-left and a green sale badge
|
|
5181
5386
|
* bottom-left; below sit the title (2-line clamp) and price with a struck was-price.
|
|
5182
5387
|
*/
|
|
5183
|
-
export declare function ProductTile({ product, priority, size }: ProductTileProps): JSX.Element;
|
|
5388
|
+
export declare function ProductTile({ product, priority, size, flag }: ProductTileProps): JSX.Element;
|
|
5184
5389
|
|
|
5185
5390
|
export declare interface ProductTileProps {
|
|
5186
5391
|
product: Product;
|
|
@@ -5191,6 +5396,8 @@ export declare interface ProductTileProps {
|
|
|
5191
5396
|
* a taller 343:457 image and an 18px title (Figma `size=large`).
|
|
5192
5397
|
*/
|
|
5193
5398
|
size?: 'default' | 'large';
|
|
5399
|
+
/** The flag over the image, in place of the product's first badge. */
|
|
5400
|
+
flag?: string;
|
|
5194
5401
|
}
|
|
5195
5402
|
|
|
5196
5403
|
/** `GET /v1/catalog/products` — a single purchasable variant of a product. */
|
|
@@ -5734,14 +5941,6 @@ declare interface Review {
|
|
|
5734
5941
|
author: string;
|
|
5735
5942
|
}
|
|
5736
5943
|
|
|
5737
|
-
/**
|
|
5738
|
-
* Tester-quote carousel — swipeable cards with dot pagination.
|
|
5739
|
-
*
|
|
5740
|
-
* These are tester quotes, not customer reviews: no stars and no ratings, and the `author`
|
|
5741
|
-
* under each quote is what says whose words they are — a team and a city, never a person.
|
|
5742
|
-
* A quote must therefore never arrive without one. The block draws no disclaimer line, in
|
|
5743
|
-
* line with the frame.
|
|
5744
|
-
*/
|
|
5745
5944
|
export declare function ReviewCarousel({ quotes }: ReviewCarouselProps): JSX.Element;
|
|
5746
5945
|
|
|
5747
5946
|
declare interface ReviewCarouselProps {
|
|
@@ -5760,6 +5959,18 @@ export declare interface SaleBadgeProps {
|
|
|
5760
5959
|
pct: number;
|
|
5761
5960
|
}
|
|
5762
5961
|
|
|
5962
|
+
export declare interface ScreenCrumb {
|
|
5963
|
+
label: string;
|
|
5964
|
+
to?: ShopRoute;
|
|
5965
|
+
}
|
|
5966
|
+
|
|
5967
|
+
export declare interface ScreenNav {
|
|
5968
|
+
crumbs: ScreenCrumb[];
|
|
5969
|
+
tone: ScreenNavTone;
|
|
5970
|
+
}
|
|
5971
|
+
|
|
5972
|
+
export declare type ScreenNavTone = 'media' | 'light';
|
|
5973
|
+
|
|
5763
5974
|
/**
|
|
5764
5975
|
* What a whole screen looks like while its data is in flight.
|
|
5765
5976
|
*
|
|
@@ -6064,28 +6275,15 @@ export declare interface ShopHeaderProps {
|
|
|
6064
6275
|
className?: string;
|
|
6065
6276
|
}
|
|
6066
6277
|
|
|
6067
|
-
|
|
6068
|
-
* The replacement for `next/image` inside the SDK.
|
|
6069
|
-
*
|
|
6070
|
-
* `next/image` cannot come with us: it needs the Next runtime and its optimiser
|
|
6071
|
-
* endpoint, and the SDK runs in DAZN's bundle where neither exists. So this is a plain
|
|
6072
|
-
* `<img>` with the platform features that actually carry the weight — native lazy
|
|
6073
|
-
* loading, `decoding="async"`, `sizes`, and `fetchpriority` for the LCP image.
|
|
6074
|
-
*
|
|
6075
|
-
* **What is genuinely lost is on-the-fly resizing and format negotiation** (AVIF/WebP
|
|
6076
|
-
* per browser). That is not something a component can polyfill — it is a serving
|
|
6077
|
-
* concern. Whoever serves the catalogue media should emit `srcset`-ready derivatives
|
|
6078
|
-
* and modern formats; until then, this renders the source as given rather than
|
|
6079
|
-
* pretending to optimise it.
|
|
6080
|
-
*
|
|
6081
|
-
* The one rewrite it does perform is rebasing **root-relative** paths onto the host's
|
|
6082
|
-
* `assetBaseUrl` — see {@link resolveAssetUrl}. Without it the SDK's own design imagery
|
|
6083
|
-
* is requested from the host's origin, which does not serve it.
|
|
6084
|
-
*/
|
|
6085
|
-
export declare function ShopImage({ src, alt, fill, width, height, sizes, className, style, priority, }: ShopImageProps): JSX.Element;
|
|
6278
|
+
export declare function ShopImage({ src, desktopSrc, alt, fill, width, height, sizes, className, style, priority, }: ShopImageProps): JSX.Element;
|
|
6086
6279
|
|
|
6087
6280
|
export declare interface ShopImageProps {
|
|
6088
6281
|
src: string;
|
|
6282
|
+
/**
|
|
6283
|
+
* Drawn instead of `src` from 1200px wide. The browser picks one before fetching, so only
|
|
6284
|
+
* the one shown is downloaded and nothing moves when it is chosen.
|
|
6285
|
+
*/
|
|
6286
|
+
desktopSrc?: string;
|
|
6089
6287
|
alt: string;
|
|
6090
6288
|
/**
|
|
6091
6289
|
* Fill the positioned ancestor, as `next/image`'s `fill` does. The parent must be
|
|
@@ -6146,7 +6344,7 @@ export declare interface ShopLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnc
|
|
|
6146
6344
|
* that has one passes `onHelp`. An inert row is marked `aria-disabled`, so a screen reader
|
|
6147
6345
|
* is told what a sighted fan discovers by tapping.
|
|
6148
6346
|
*/
|
|
6149
|
-
export declare function ShopMenuSheet({ open, onClose, onManageOrders, onHelp, closeLabel, label, }: ShopMenuSheetProps): JSX.Element | null;
|
|
6347
|
+
export declare function ShopMenuSheet({ open, onClose, onManageOrders, onHelp, closeLabel, label, placement, }: ShopMenuSheetProps): JSX.Element | null;
|
|
6150
6348
|
|
|
6151
6349
|
export declare interface ShopMenuSheetProps {
|
|
6152
6350
|
open: boolean;
|
|
@@ -6160,6 +6358,16 @@ export declare interface ShopMenuSheetProps {
|
|
|
6160
6358
|
closeLabel?: string;
|
|
6161
6359
|
/** Accessible name for the dialog itself; it has no visible title in the design. */
|
|
6162
6360
|
label?: string;
|
|
6361
|
+
placement?: 'sheet' | 'dropdown';
|
|
6362
|
+
}
|
|
6363
|
+
|
|
6364
|
+
export declare function ShopNav({ onManageOrders, onHelp, menuLabel, className }: ShopNavProps): JSX.Element | null;
|
|
6365
|
+
|
|
6366
|
+
export declare interface ShopNavProps {
|
|
6367
|
+
onManageOrders?: () => void;
|
|
6368
|
+
onHelp?: () => void;
|
|
6369
|
+
menuLabel?: string;
|
|
6370
|
+
className?: string;
|
|
6163
6371
|
}
|
|
6164
6372
|
|
|
6165
6373
|
/**
|
|
@@ -6167,7 +6375,7 @@ export declare interface ShopMenuSheetProps {
|
|
|
6167
6375
|
* implementation detail — see the versioning policy in the component SDK specification.
|
|
6168
6376
|
*/
|
|
6169
6377
|
/** A storefront-relative identifier. NOT a URL expected to resolve on the host. */
|
|
6170
|
-
export declare type ShopRoute = '/' | `/category/${string}` | `/product/${string}` | '/cart' | `/vip/${string}`;
|
|
6378
|
+
export declare type ShopRoute = '/' | `/category/${string}` | `/product/${string}` | '/cart' | '/orders' | `/vip/${string}`;
|
|
6171
6379
|
|
|
6172
6380
|
/**
|
|
6173
6381
|
* Request: the shopping session id and the one-time code, exactly as they arrive on the
|
|
@@ -6762,6 +6970,10 @@ export declare interface UseProductResult {
|
|
|
6762
6970
|
error: ReturnType<typeof codeOf> | undefined;
|
|
6763
6971
|
}
|
|
6764
6972
|
|
|
6973
|
+
export declare function useScreenNav(): ScreenNav | undefined;
|
|
6974
|
+
|
|
6975
|
+
export declare function useSetScreenNav(crumbs: ScreenCrumb[] | undefined, tone: ScreenNavTone): void;
|
|
6976
|
+
|
|
6765
6977
|
/** The typed, schema-validating commerce client. Requires a provider. */
|
|
6766
6978
|
export declare function useShopApi(): DaznClient;
|
|
6767
6979
|
|