skcr-design-tokens 3.1.0 → 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 +30 -3
- package/components.css +29 -1
- package/display.css +32 -1
- package/package.json +1 -1
- package/tokens.css +11 -0
package/README.md
CHANGED
|
@@ -62,6 +62,32 @@ 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
|
+
|
|
76
|
+
## Upgrading to 3.1.1
|
|
77
|
+
|
|
78
|
+
Nothing to write. **The calendar of the two pickers takes the typeface of the design system.** The
|
|
79
|
+
prebuilt Material theme the skcr-autechre README asks for (`azure-blue.css`) writes `Roboto`, with
|
|
80
|
+
no fallback, in its fifteen `--mat-sys-*-font` typescale tokens: an application that does not load
|
|
81
|
+
Roboto drew the calendar in the browser's default serif. `components.css` now points them at
|
|
82
|
+
`--font-sans`, next to the colour redirection. And the background of
|
|
83
|
+
`.mat-datepicker-content-container` takes the radius of its panel: its square corners covered the
|
|
84
|
+
panel's own, so the calendar looked square.
|
|
85
|
+
|
|
86
|
+
**The neutral badge (`.badge` alone) sits on slate-200**, one notch above the Figma's
|
|
87
|
+
`neutral-foreground` (slate-100), a departure decided without the design. slate-100 is also the
|
|
88
|
+
page background of the light theme: there the badge had no ground at all and read as plain text,
|
|
89
|
+
and on a card it barely showed. The text stays slate-700 (8.6:1). Every other badge is unchanged.
|
|
90
|
+
|
|
65
91
|
## Upgrading to 3.1.0
|
|
66
92
|
|
|
67
93
|
Additive, nothing changes for existing screens but the fold of `.collapsible` (`display.css`), now
|
|
@@ -92,7 +118,7 @@ node 620:965). Every badge changes look, and the palette classes are removed.
|
|
|
92
118
|
every borderless badge stood 22 px high where the design draws 20. **`.badge-lg`** gives the
|
|
93
119
|
32 px badge (`px-3 py-1.5`, 14/20).
|
|
94
120
|
- **Eleven variants under the Figma's names**, each light (`badge-<variant>`) and strong
|
|
95
|
-
(`badge-strong-<variant>`): `primary`, `secondary` (`.badge` alone is secondary light), `outline`,
|
|
121
|
+
(`badge-strong-<variant>`): `primary`, `secondary` (`.badge` alone is secondary light, on slate-200 since 3.1.1), `outline`,
|
|
96
122
|
`info`, `warning`, `destructive`, and the data colours `chart-1`, `chart-3`, `chart-4`,
|
|
97
123
|
`chart-5`, `chart-6` for a category rather than a status (there is no chart-2 in the Figma).
|
|
98
124
|
- **Removed, with their replacement** — a search and replace in the templates:
|
|
@@ -185,8 +211,9 @@ name for name, the page would have turned white.
|
|
|
185
211
|
`tokens.css` (statuses as text on dark surfaces, `neutral`, `destructive-foreground`, the
|
|
186
212
|
`data-*` on some chart colors, `input` and `elevated` as boundaries).
|
|
187
213
|
|
|
188
|
-
`skcr-autechre`
|
|
189
|
-
move to 2.0.0 once its text
|
|
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.
|
|
190
217
|
|
|
191
218
|
## Contents
|
|
192
219
|
|
package/components.css
CHANGED
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
@layer components {
|
|
43
43
|
.mat-datepicker-content-container {
|
|
44
44
|
background-color: var(--color-popover);
|
|
45
|
+
/* 3.1.1: the background is painted here, one level inside the rounded panel, and its square
|
|
46
|
+
corners covered the panel's own — the calendar looked square, as a popup and as the touch
|
|
47
|
+
dialog. */
|
|
48
|
+
border-radius: inherit;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
.btn {
|
|
@@ -102,8 +106,13 @@
|
|
|
102
106
|
absent from the design. They are gone; the README maps each one to its replacement.
|
|
103
107
|
The hover state of the Figma (80 % opacity) belongs to a clickable badge: none exists, so
|
|
104
108
|
none is emitted. */
|
|
109
|
+
/* 3.1.1: the neutral badge on slate-200, one notch above the Figma's `neutral-foreground`
|
|
110
|
+
(slate-100) — a deliberate departure, decided without the design. slate-100 is also the page
|
|
111
|
+
background of the light theme: there the badge had no ground at all and read as plain text,
|
|
112
|
+
and on a card it barely showed. Text unchanged (slate-700, 8.6:1). A palette value, like the
|
|
113
|
+
strong secondary below, so it keeps one look in both themes. */
|
|
105
114
|
.badge {
|
|
106
|
-
@apply inline-flex items-center justify-center gap-0.5 rounded-lg bg-
|
|
115
|
+
@apply inline-flex items-center justify-center gap-0.5 rounded-lg bg-slate-200 px-2 py-0.5 text-xs leading-4 font-medium text-neutral;
|
|
107
116
|
|
|
108
117
|
/* The badge does NOT follow the theme: its colors are the same in both. What it
|
|
109
118
|
contains has to keep the badge's text color. Without this rule, the reset of an
|
|
@@ -331,4 +340,23 @@
|
|
|
331
340
|
--mat-sys-outline: var(--color-border-color);
|
|
332
341
|
--mat-sys-outline-variant: var(--color-border-color);
|
|
333
342
|
--mat-sys-corner-large: 0.5rem;
|
|
343
|
+
|
|
344
|
+
/* 3.1.1: the typeface. The prebuilt theme the README asks for writes `Roboto` with no fallback
|
|
345
|
+
in all fifteen typescale fonts, so an application that does not load Roboto drew the calendar
|
|
346
|
+
in the browser's default face — a serif — next to an Inter interface. */
|
|
347
|
+
--mat-sys-body-large-font: var(--font-sans);
|
|
348
|
+
--mat-sys-body-medium-font: var(--font-sans);
|
|
349
|
+
--mat-sys-body-small-font: var(--font-sans);
|
|
350
|
+
--mat-sys-display-large-font: var(--font-sans);
|
|
351
|
+
--mat-sys-display-medium-font: var(--font-sans);
|
|
352
|
+
--mat-sys-display-small-font: var(--font-sans);
|
|
353
|
+
--mat-sys-headline-large-font: var(--font-sans);
|
|
354
|
+
--mat-sys-headline-medium-font: var(--font-sans);
|
|
355
|
+
--mat-sys-headline-small-font: var(--font-sans);
|
|
356
|
+
--mat-sys-label-large-font: var(--font-sans);
|
|
357
|
+
--mat-sys-label-medium-font: var(--font-sans);
|
|
358
|
+
--mat-sys-label-small-font: var(--font-sans);
|
|
359
|
+
--mat-sys-title-large-font: var(--font-sans);
|
|
360
|
+
--mat-sys-title-medium-font: var(--font-sans);
|
|
361
|
+
--mat-sys-title-small-font: var(--font-sans);
|
|
334
362
|
}
|
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-
|
|
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.
|
|
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 */
|