skcr-design-tokens 3.1.1 → 3.2.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/README.md CHANGED
@@ -62,6 +62,17 @@ Angular applications then use `skcr-autechre`'s `ThemeService` for toggling and
62
62
  cross-tab synchronization. It does not do the initialization: the script above
63
63
  has already done it.
64
64
 
65
+ ## Upgrading to 3.2.0
66
+
67
+ Nothing to change: two new tokens, `--color-skeleton` and `--color-skeleton-highlight` (Tailwind
68
+ `bg-skeleton`), the surface of a loading skeleton and the band that sweeps across it — slate-200 /
69
+ slate-50 in light, slate-700 / slate-600 in dark. A skeleton needs its own pair because `muted`
70
+ equals `background` in both themes: a `bg-muted` skeleton vanished on the page. Read by
71
+ `skcr-skeleton` and the first-load rows of `skcr-table` (skcr-autechre 7.7.0, which requires 3.2.0).
72
+ `display.css`'s `.skeleton` takes the same rendering: the pair, and a band fixed to the window that
73
+ sweeps the skeletons rendered together in one wave — still under `prefers-reduced-motion`. A
74
+ `.skeleton` added later runs its own wave; `skcr-skeleton` keeps every skeleton in phase.
75
+
65
76
  ## Upgrading to 3.1.1
66
77
 
67
78
  Nothing to write. **The calendar of the two pickers takes the typeface of the design system.** The
@@ -200,8 +211,9 @@ name for name, the page would have turned white.
200
211
  `tokens.css` (statuses as text on dark surfaces, `neutral`, `destructive-foreground`, the
201
212
  `data-*` on some chart colors, `input` and `elevated` as boundaries).
202
213
 
203
- `skcr-autechre` accepts `^1.6.0 || ^2.0.0` since 5.2.0: an application can take the library first and
204
- move to 2.0.0 once its text on data colors is migrated.
214
+ `skcr-autechre` accepted `^1.6.0 || ^2.0.0` from 5.2.0 on (widened to `^3.0.0` in 5.4.1, narrowed to
215
+ `^3.1.1` after 7.4.0): an application could take the library first and move to 2.0.0 once its text
216
+ on data colors was migrated.
205
217
 
206
218
  ## Contents
207
219
 
package/display.css CHANGED
@@ -480,8 +480,29 @@
480
480
  @apply size-3;
481
481
  }
482
482
 
483
+ /* Same rendering as `skcr-skeleton` (3.2.0): the skeleton pair of tokens and one light band
484
+ sweeping across the window, fixed to the viewport so the skeletons rendered together show the
485
+ same wave; one added later runs its own, the class has no timeline to meet on. Still under
486
+ reduced motion. Angular projects prefer `skcr-skeleton`, which keeps every skeleton in phase. */
483
487
  .skeleton {
484
- @apply block h-3 rounded bg-muted animate-pulse motion-reduce:animate-none;
488
+ @apply block h-3 rounded bg-skeleton;
489
+ background-image: linear-gradient(
490
+ 100deg,
491
+ transparent 35%,
492
+ var(--color-skeleton-highlight) 50%,
493
+ transparent 65%
494
+ );
495
+ background-attachment: fixed;
496
+ background-repeat: no-repeat;
497
+ background-size: 200vw 100vh;
498
+ animation: skcr-skeleton-sweep 1.6s ease-in-out infinite;
499
+ }
500
+
501
+ @media (prefers-reduced-motion: reduce) {
502
+ .skeleton {
503
+ background-image: none;
504
+ animation: none;
505
+ }
485
506
  }
486
507
 
487
508
  /* Shell of a toast — positioning, stacking and the timer stay with the JS.
@@ -562,3 +583,13 @@
562
583
  transition-duration: 1ms;
563
584
  }
564
585
  }
586
+
587
+ @keyframes skcr-skeleton-sweep {
588
+ from {
589
+ background-position: -120vw 0;
590
+ }
591
+
592
+ to {
593
+ background-position: 20vw 0;
594
+ }
595
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skcr-design-tokens",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "Design system SkillCorner : tokens de couleur, utilitaires typographiques et classes de composants. CSS pur, sans dépendance.",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": [
package/tokens.css CHANGED
@@ -156,6 +156,14 @@
156
156
  token can do that: `muted` was worth exactly `popover` in dark, so
157
157
  `hover:bg-muted` was strictly invisible there. */
158
158
  --color-hover: theme(colors.slate.100);
159
+ /* 3.2.0: the loading skeleton (skcr-skeleton, the first-load rows of skcr-table, display.css's
160
+ `.skeleton`). Its own pair because no zone token can carry it: `muted` equals `background` in
161
+ both themes, so a `bg-muted` skeleton vanished on the page. One notch above the page in light
162
+ and above the raised surfaces in dark; the highlight is the band that sweeps across it. */
163
+ /* Measured on 3.2.0 (e2e/skeleton.spec.ts): 1.13 against the light page, 1.23 against a card or
164
+ a table; slate-300 would give 1.36 / 1.49. */
165
+ --color-skeleton: theme(colors.slate.200);
166
+ --color-skeleton-highlight: theme(colors.slate.50);
159
167
  /* Modal scrim. The only token that does not invert: slate-500 in both themes, applied at
160
168
  15 % opacity and blurred by `skcr-dialog` — the weight of the design's screens (a 15 %
161
169
  veil), where 75 % darkened the page far more. */
@@ -260,6 +268,9 @@
260
268
  /* One notch above the popover: the hover lifts. On the slate-800 popover the
261
269
  ratio goes from 1.00 — invisible — to 1.41. */
262
270
  --color-hover: #334155; /* slate-700 */
271
+ /* Above `control` and `popover` (slate-800), the highest surfaces a skeleton sits on. */
272
+ --color-skeleton: #334155; /* slate-700 */
273
+ --color-skeleton-highlight: #475569; /* slate-600 */
263
274
  --color-scrim: #64748b; /* slate-500: same value as in light */
264
275
 
265
276
  --color-primary: #32fe6b; /* primary-400: #008a26 fails contrast on a dark background */