@nok-integration/storefront-react 0.16.3 → 0.16.4
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 +14 -3
- package/dist/index.mjs +1 -1
- package/dist/standalone/storefront.mjs +1 -1
- package/package.json +9 -26
package/dist/index.d.ts
CHANGED
|
@@ -3386,9 +3386,20 @@ export declare type ShopEvent = {
|
|
|
3386
3386
|
* if the design is ours, and a mismatch if only half of it is.
|
|
3387
3387
|
*
|
|
3388
3388
|
* The cart count is real, never fabricated: `useCartCount` returns `null` until it knows,
|
|
3389
|
-
* and the badge stays hidden until then
|
|
3390
|
-
*
|
|
3391
|
-
*
|
|
3389
|
+
* and the badge stays hidden until then — a "0" that appears while the cart is still
|
|
3390
|
+
* loading and then jumps to "3" is a guess wearing a number.
|
|
3391
|
+
*
|
|
3392
|
+
* **The badge is also hidden at zero**, which is a deliberate departure from the frame:
|
|
3393
|
+
* `.cart.icon` draws an explicit empty state carrying "0". DAZN asked for it removed on
|
|
3394
|
+
* 17 Aug 2026 and they are right — a filled pill is an attention mark, and one that says
|
|
3395
|
+
* there is nothing to look at spends the fan's attention to tell them so. The empty state
|
|
3396
|
+
* is the icon on its own.
|
|
3397
|
+
*
|
|
3398
|
+
* `useCartCount` had said as much since it was written ("a badge must render nothing for
|
|
3399
|
+
* `null` and nothing for `0`"); the component followed the frame instead, and the two
|
|
3400
|
+
* disagreed in the codebase for as long as the badge existed. The count still
|
|
3401
|
+
* distinguishes the two states, because the accessible name needs to: unknown reads
|
|
3402
|
+
* "Cart", empty reads "Cart, empty".
|
|
3392
3403
|
*
|
|
3393
3404
|
* Mount it inside `DaznShopProvider`, and inside `CartSheet` if `showCart` is on, since
|
|
3394
3405
|
* the trigger opens that sheet.
|
package/dist/index.mjs
CHANGED
|
@@ -8717,7 +8717,7 @@ function ShopHeader({
|
|
|
8717
8717
|
/* @__PURE__ */ jsxs("div", { className: styles$1.right, children: [
|
|
8718
8718
|
showCart ? /* @__PURE__ */ jsxs(CartTrigger, { className: styles$1.iconBtn, "aria-label": cartLabel, children: [
|
|
8719
8719
|
/* @__PURE__ */ jsx(CartIcon, {}),
|
|
8720
|
-
cartCount
|
|
8720
|
+
cartCount !== null && cartCount > 0 ? /* @__PURE__ */ jsx("span", { className: styles$1.badge, "aria-hidden": "true", children: cartCount > 99 ? "99+" : cartCount }) : null
|
|
8721
8721
|
] }) : null,
|
|
8722
8722
|
onMenu ? /* @__PURE__ */ jsx(
|
|
8723
8723
|
"button",
|
|
@@ -8717,7 +8717,7 @@ function ShopHeader({
|
|
|
8717
8717
|
/* @__PURE__ */ jsxs("div", { className: styles$1.right, children: [
|
|
8718
8718
|
showCart ? /* @__PURE__ */ jsxs(CartTrigger, { className: styles$1.iconBtn, "aria-label": cartLabel, children: [
|
|
8719
8719
|
/* @__PURE__ */ jsx(CartIcon, {}),
|
|
8720
|
-
cartCount
|
|
8720
|
+
cartCount !== null && cartCount > 0 ? /* @__PURE__ */ jsx("span", { className: styles$1.badge, "aria-hidden": "true", children: cartCount > 99 ? "99+" : cartCount }) : null
|
|
8721
8721
|
] }) : null,
|
|
8722
8722
|
onMenu ? /* @__PURE__ */ jsx(
|
|
8723
8723
|
"button",
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nok-integration/storefront-react",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.4",
|
|
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
|
-
"publishConfig": {
|
|
7
|
-
"access": "public",
|
|
8
|
-
"registry": "https://registry.npmjs.org/"
|
|
9
|
-
},
|
|
10
6
|
"type": "module",
|
|
11
7
|
"main": "./dist/index.mjs",
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
12
9
|
"types": "./dist/index.d.ts",
|
|
13
10
|
"exports": {
|
|
14
11
|
".": {
|
|
@@ -23,32 +20,18 @@
|
|
|
23
20
|
"dist",
|
|
24
21
|
"!dist/**/*.map"
|
|
25
22
|
],
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
"build:standalone": "BUILD_TARGET=standalone vite build",
|
|
30
|
-
"typecheck": "tsc --noEmit",
|
|
31
|
-
"build:partner": "PARTNER_DROP=1 pnpm build && pnpm pack"
|
|
32
|
-
},
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"*.css"
|
|
25
|
+
],
|
|
33
26
|
"peerDependencies": {
|
|
34
27
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
35
28
|
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
36
29
|
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@dazn/contracts": "^2.0.0",
|
|
39
|
-
"@microsoft/api-extractor": "^7.58.12",
|
|
40
|
-
"@types/react": "^19.1.0",
|
|
41
|
-
"@types/react-dom": "^19.1.0",
|
|
42
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
43
|
-
"typescript": "^5.7.3",
|
|
44
|
-
"vite": "^7.0.0",
|
|
45
|
-
"vite-plugin-dts": "^5.0.3"
|
|
46
|
-
},
|
|
47
|
-
"module": "./dist/index.mjs",
|
|
48
|
-
"sideEffects": [
|
|
49
|
-
"*.css"
|
|
50
|
-
],
|
|
51
30
|
"dependencies": {
|
|
52
31
|
"zod": "^3.24.1"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public",
|
|
35
|
+
"registry": "https://registry.npmjs.org/"
|
|
53
36
|
}
|
|
54
37
|
}
|