@nok-integration/storefront-react 0.16.0 → 0.16.2
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.mjs +2 -2
- package/dist/standalone/storefront.mjs +2 -2
- package/dist/standalone/styles.css +45 -14
- package/dist/styles.css +45 -14
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5476,8 +5476,8 @@ function Skeleton({ width, height, radius, className, circle }) {
|
|
|
5476
5476
|
}
|
|
5477
5477
|
);
|
|
5478
5478
|
}
|
|
5479
|
-
const surface$1 = "
|
|
5480
|
-
const fill = "
|
|
5479
|
+
const surface$1 = "_surface_cfqo9_10";
|
|
5480
|
+
const fill = "_fill_cfqo9_35";
|
|
5481
5481
|
const styles$E = {
|
|
5482
5482
|
surface: surface$1,
|
|
5483
5483
|
fill
|
|
@@ -5476,8 +5476,8 @@ function Skeleton({ width, height, radius, className, circle }) {
|
|
|
5476
5476
|
}
|
|
5477
5477
|
);
|
|
5478
5478
|
}
|
|
5479
|
-
const surface$1 = "
|
|
5480
|
-
const fill = "
|
|
5479
|
+
const surface$1 = "_surface_cfqo9_10";
|
|
5480
|
+
const fill = "_fill_cfqo9_35";
|
|
5481
5481
|
const styles$E = {
|
|
5482
5482
|
surface: surface$1,
|
|
5483
5483
|
fill
|
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
* as CSS custom properties. Mobile-first, 375pt base width, embedded in the DAZN app.
|
|
4
4
|
* Values are display tokens only; money is always server-authoritative.
|
|
5
5
|
*/
|
|
6
|
+
/*
|
|
7
|
+
* THE HOST PROVIDES THE TYPEFACE. There is deliberately no `@font-face` here.
|
|
8
|
+
*
|
|
9
|
+
* The name below is the one inside DAZN's own font files (`name` ID 1 = "DAZN Oscine"),
|
|
10
|
+
* so a host that already serves the face — as DAZN do on their pages — is matched exactly
|
|
11
|
+
* and the mounted components inherit it. Nothing to configure.
|
|
12
|
+
*
|
|
13
|
+
* Two reasons not to ship it in the package. A `url()` here resolves against the
|
|
14
|
+
* CONSUMER's origin, so any path we picked would 404 in every host but the one we guessed;
|
|
15
|
+
* and inlining the two faces as data URIs adds ~120 kB to a bundle that is 67 kB gzipped,
|
|
16
|
+
* which is most of a tripling to deliver something the host almost certainly already has.
|
|
17
|
+
*
|
|
18
|
+
* A host WITHOUT the face falls through to the system stack and renders correctly but not
|
|
19
|
+
* on-brand. If that is ever the situation, the fix belongs in the host, not here.
|
|
20
|
+
*
|
|
21
|
+
* Our own storefront is such a host and serves them from `app/theme.css`.
|
|
22
|
+
*/
|
|
6
23
|
:root {
|
|
7
24
|
/* ── Typeface ─────────────────────────────────────────────────────────── */
|
|
8
25
|
--font-family-base:
|
|
@@ -288,7 +305,7 @@
|
|
|
288
305
|
* (serif, in a page that never set one) and its own background.
|
|
289
306
|
*/
|
|
290
307
|
|
|
291
|
-
.
|
|
308
|
+
._surface_cfqo9_10 {
|
|
292
309
|
font-family: var(--font-family-base);
|
|
293
310
|
font-weight: var(--font-weight-regular);
|
|
294
311
|
font-size: var(--type-paragraph-size);
|
|
@@ -299,9 +316,9 @@
|
|
|
299
316
|
text-rendering: optimizeLegibility;
|
|
300
317
|
}
|
|
301
318
|
|
|
302
|
-
.
|
|
303
|
-
.
|
|
304
|
-
.
|
|
319
|
+
._surface_cfqo9_10 *,
|
|
320
|
+
._surface_cfqo9_10 *::before,
|
|
321
|
+
._surface_cfqo9_10 *::after {
|
|
305
322
|
box-sizing: border-box;
|
|
306
323
|
}
|
|
307
324
|
|
|
@@ -313,7 +330,7 @@
|
|
|
313
330
|
* through a screen of the opposite palette) is invisible in our own app, where the body
|
|
314
331
|
* already matches, and so goes unnoticed until a partner reports it.
|
|
315
332
|
*/
|
|
316
|
-
.
|
|
333
|
+
._fill_cfqo9_35 {
|
|
317
334
|
/* Declared twice on purpose, and the order matters.
|
|
318
335
|
`dvh` landed in Chrome 108 / iOS 15.4, and this package supports React 16.14 because
|
|
319
336
|
that is what DAZN's app runs — an app that old can be paired with a WebView that old.
|
|
@@ -331,17 +348,31 @@
|
|
|
331
348
|
min-height: calc(100dvh - var(--surface-top, 0px));
|
|
332
349
|
}
|
|
333
350
|
|
|
334
|
-
|
|
351
|
+
/*
|
|
352
|
+
* Base heading typography — a DEFAULT, which is why every part is wrapped in `:where()`.
|
|
353
|
+
*
|
|
354
|
+
* This is the same trap the link rule below documents, and it was still live here.
|
|
355
|
+
* `.surface h1` is specificity (0,1,1) and a CSS-module class is (0,1,0), so these rules
|
|
356
|
+
* beat every component that set its own heading size. The category hero asked for 40px in
|
|
357
|
+
* `PcpHero.module.css` and rendered at 24px — the `--type-heading-lg-size` below — which
|
|
358
|
+
* read as "the design is wrong" rather than "a base style is winning", and sent us
|
|
359
|
+
* measuring Figma twice before checking what the browser actually computed.
|
|
360
|
+
*
|
|
361
|
+
* `:where()` drops the whole selector to specificity (0,0,0), so ANY component class wins
|
|
362
|
+
* deterministically rather than by source order, while a heading that sets nothing still
|
|
363
|
+
* gets the scale. That is what a base style should be.
|
|
364
|
+
*/
|
|
365
|
+
:where(._surface_cfqo9_10) :where(h1, h2, h3) {
|
|
335
366
|
margin: 0;
|
|
336
367
|
font-weight: var(--font-weight-bold);
|
|
337
368
|
}
|
|
338
369
|
|
|
339
|
-
.
|
|
370
|
+
:where(._surface_cfqo9_10) :where(h1) {
|
|
340
371
|
font-size: var(--type-heading-lg-size);
|
|
341
372
|
line-height: var(--type-heading-lg-line);
|
|
342
373
|
}
|
|
343
374
|
|
|
344
|
-
.
|
|
375
|
+
:where(._surface_cfqo9_10) :where(h2) {
|
|
345
376
|
font-size: var(--type-heading-md-size);
|
|
346
377
|
line-height: var(--type-heading-md-line);
|
|
347
378
|
}
|
|
@@ -360,27 +391,27 @@
|
|
|
360
391
|
* Restricting the rule to unclassed anchors keeps what it is for — a bare `<a>` must never
|
|
361
392
|
* render browser-blue — while leaving any anchor that carries a class in charge of itself.
|
|
362
393
|
*/
|
|
363
|
-
.
|
|
394
|
+
._surface_cfqo9_10 a:not([class]) {
|
|
364
395
|
color: inherit;
|
|
365
396
|
}
|
|
366
397
|
|
|
367
|
-
.
|
|
398
|
+
._surface_cfqo9_10 img {
|
|
368
399
|
max-width: 100%;
|
|
369
400
|
height: auto;
|
|
370
401
|
}
|
|
371
402
|
|
|
372
403
|
/* Visible focus for keyboard users — a WCAG 2.1 AA launch gate, so it cannot be left
|
|
373
404
|
to the host to remember. */
|
|
374
|
-
.
|
|
405
|
+
._surface_cfqo9_10 :focus-visible {
|
|
375
406
|
outline: 2px solid var(--color-surface-max);
|
|
376
407
|
outline-offset: 2px;
|
|
377
408
|
border-radius: var(--radius-4);
|
|
378
409
|
}
|
|
379
410
|
|
|
380
411
|
@media (prefers-reduced-motion: reduce) {
|
|
381
|
-
.
|
|
382
|
-
.
|
|
383
|
-
.
|
|
412
|
+
._surface_cfqo9_10 *,
|
|
413
|
+
._surface_cfqo9_10 *::before,
|
|
414
|
+
._surface_cfqo9_10 *::after {
|
|
384
415
|
animation-duration: 0.001ms !important;
|
|
385
416
|
animation-iteration-count: 1 !important;
|
|
386
417
|
transition-duration: 0.001ms !important;
|
package/dist/styles.css
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
* as CSS custom properties. Mobile-first, 375pt base width, embedded in the DAZN app.
|
|
4
4
|
* Values are display tokens only; money is always server-authoritative.
|
|
5
5
|
*/
|
|
6
|
+
/*
|
|
7
|
+
* THE HOST PROVIDES THE TYPEFACE. There is deliberately no `@font-face` here.
|
|
8
|
+
*
|
|
9
|
+
* The name below is the one inside DAZN's own font files (`name` ID 1 = "DAZN Oscine"),
|
|
10
|
+
* so a host that already serves the face — as DAZN do on their pages — is matched exactly
|
|
11
|
+
* and the mounted components inherit it. Nothing to configure.
|
|
12
|
+
*
|
|
13
|
+
* Two reasons not to ship it in the package. A `url()` here resolves against the
|
|
14
|
+
* CONSUMER's origin, so any path we picked would 404 in every host but the one we guessed;
|
|
15
|
+
* and inlining the two faces as data URIs adds ~120 kB to a bundle that is 67 kB gzipped,
|
|
16
|
+
* which is most of a tripling to deliver something the host almost certainly already has.
|
|
17
|
+
*
|
|
18
|
+
* A host WITHOUT the face falls through to the system stack and renders correctly but not
|
|
19
|
+
* on-brand. If that is ever the situation, the fix belongs in the host, not here.
|
|
20
|
+
*
|
|
21
|
+
* Our own storefront is such a host and serves them from `app/theme.css`.
|
|
22
|
+
*/
|
|
6
23
|
:root {
|
|
7
24
|
/* ── Typeface ─────────────────────────────────────────────────────────── */
|
|
8
25
|
--font-family-base:
|
|
@@ -288,7 +305,7 @@
|
|
|
288
305
|
* (serif, in a page that never set one) and its own background.
|
|
289
306
|
*/
|
|
290
307
|
|
|
291
|
-
.
|
|
308
|
+
._surface_cfqo9_10 {
|
|
292
309
|
font-family: var(--font-family-base);
|
|
293
310
|
font-weight: var(--font-weight-regular);
|
|
294
311
|
font-size: var(--type-paragraph-size);
|
|
@@ -299,9 +316,9 @@
|
|
|
299
316
|
text-rendering: optimizeLegibility;
|
|
300
317
|
}
|
|
301
318
|
|
|
302
|
-
.
|
|
303
|
-
.
|
|
304
|
-
.
|
|
319
|
+
._surface_cfqo9_10 *,
|
|
320
|
+
._surface_cfqo9_10 *::before,
|
|
321
|
+
._surface_cfqo9_10 *::after {
|
|
305
322
|
box-sizing: border-box;
|
|
306
323
|
}
|
|
307
324
|
|
|
@@ -313,7 +330,7 @@
|
|
|
313
330
|
* through a screen of the opposite palette) is invisible in our own app, where the body
|
|
314
331
|
* already matches, and so goes unnoticed until a partner reports it.
|
|
315
332
|
*/
|
|
316
|
-
.
|
|
333
|
+
._fill_cfqo9_35 {
|
|
317
334
|
/* Declared twice on purpose, and the order matters.
|
|
318
335
|
`dvh` landed in Chrome 108 / iOS 15.4, and this package supports React 16.14 because
|
|
319
336
|
that is what DAZN's app runs — an app that old can be paired with a WebView that old.
|
|
@@ -331,17 +348,31 @@
|
|
|
331
348
|
min-height: calc(100dvh - var(--surface-top, 0px));
|
|
332
349
|
}
|
|
333
350
|
|
|
334
|
-
|
|
351
|
+
/*
|
|
352
|
+
* Base heading typography — a DEFAULT, which is why every part is wrapped in `:where()`.
|
|
353
|
+
*
|
|
354
|
+
* This is the same trap the link rule below documents, and it was still live here.
|
|
355
|
+
* `.surface h1` is specificity (0,1,1) and a CSS-module class is (0,1,0), so these rules
|
|
356
|
+
* beat every component that set its own heading size. The category hero asked for 40px in
|
|
357
|
+
* `PcpHero.module.css` and rendered at 24px — the `--type-heading-lg-size` below — which
|
|
358
|
+
* read as "the design is wrong" rather than "a base style is winning", and sent us
|
|
359
|
+
* measuring Figma twice before checking what the browser actually computed.
|
|
360
|
+
*
|
|
361
|
+
* `:where()` drops the whole selector to specificity (0,0,0), so ANY component class wins
|
|
362
|
+
* deterministically rather than by source order, while a heading that sets nothing still
|
|
363
|
+
* gets the scale. That is what a base style should be.
|
|
364
|
+
*/
|
|
365
|
+
:where(._surface_cfqo9_10) :where(h1, h2, h3) {
|
|
335
366
|
margin: 0;
|
|
336
367
|
font-weight: var(--font-weight-bold);
|
|
337
368
|
}
|
|
338
369
|
|
|
339
|
-
.
|
|
370
|
+
:where(._surface_cfqo9_10) :where(h1) {
|
|
340
371
|
font-size: var(--type-heading-lg-size);
|
|
341
372
|
line-height: var(--type-heading-lg-line);
|
|
342
373
|
}
|
|
343
374
|
|
|
344
|
-
.
|
|
375
|
+
:where(._surface_cfqo9_10) :where(h2) {
|
|
345
376
|
font-size: var(--type-heading-md-size);
|
|
346
377
|
line-height: var(--type-heading-md-line);
|
|
347
378
|
}
|
|
@@ -360,27 +391,27 @@
|
|
|
360
391
|
* Restricting the rule to unclassed anchors keeps what it is for — a bare `<a>` must never
|
|
361
392
|
* render browser-blue — while leaving any anchor that carries a class in charge of itself.
|
|
362
393
|
*/
|
|
363
|
-
.
|
|
394
|
+
._surface_cfqo9_10 a:not([class]) {
|
|
364
395
|
color: inherit;
|
|
365
396
|
}
|
|
366
397
|
|
|
367
|
-
.
|
|
398
|
+
._surface_cfqo9_10 img {
|
|
368
399
|
max-width: 100%;
|
|
369
400
|
height: auto;
|
|
370
401
|
}
|
|
371
402
|
|
|
372
403
|
/* Visible focus for keyboard users — a WCAG 2.1 AA launch gate, so it cannot be left
|
|
373
404
|
to the host to remember. */
|
|
374
|
-
.
|
|
405
|
+
._surface_cfqo9_10 :focus-visible {
|
|
375
406
|
outline: 2px solid var(--color-surface-max);
|
|
376
407
|
outline-offset: 2px;
|
|
377
408
|
border-radius: var(--radius-4);
|
|
378
409
|
}
|
|
379
410
|
|
|
380
411
|
@media (prefers-reduced-motion: reduce) {
|
|
381
|
-
.
|
|
382
|
-
.
|
|
383
|
-
.
|
|
412
|
+
._surface_cfqo9_10 *,
|
|
413
|
+
._surface_cfqo9_10 *::before,
|
|
414
|
+
._surface_cfqo9_10 *::after {
|
|
384
415
|
animation-duration: 0.001ms !important;
|
|
385
416
|
animation-iteration-count: 1 !important;
|
|
386
417
|
transition-duration: 0.001ms !important;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nok-integration/storefront-react",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
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
|
"publishConfig": {
|