@krizaka/tailwind 2.4.0 → 2.5.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.
Files changed (3) hide show
  1. package/README.md +12 -3
  2. package/index.css +71 -0
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -46,10 +46,19 @@ The first two lines are enough to get the whole vocabulary. `@krizaka/ui/tailwin
46
46
  | Accent | `accent` · `accent-hover` · `accent-soft` · `accent-2` (gradients) · `on-accent` · `ring` | `--kz-accent*`, `--kz-on-accent`, `--kz-ring` |
47
47
  | Status | `success` · `warning` · `danger` · `info` (fills, borders, dots, icons — ≥ 3:1) | `--kz-success` … |
48
48
  | Status text | `fg-success` · `fg-warning` · `fg-danger` · `fg-info` → `text-fg-danger` (small text, ≥ 4.5:1 on every surface, both themes) | `--kz-*-text` |
49
- | Radius | `rounded-sm` · `rounded-md` · `rounded-lg` · `rounded-xl` · `rounded-full` | `--kz-radius-*` |
50
- | Shadow | `shadow-sm` · `shadow-md` · `shadow-lg` | `--kz-shadow-*` |
49
+ | Status tints | `success-soft` · `warning-soft` · `danger-soft` → `bg-danger-soft` (the primary and the status text ≥ 4.5:1 on them) | `--kz-*-soft` |
50
+ | Radius | `rounded-sm` · `rounded-md` · `rounded-lg` · `rounded-xl` · `rounded-full`; `rounded-(--kz-radius-xs)`, `rounded-(--kz-radius-2xl)` (not mapped: Tailwind's own `xs` / `2xl` keep their sizes in the products) | `--kz-radius-*` |
51
+ | Shadow | `shadow-sm` · `shadow-md` · `shadow-lg`; the signature: `shadow-raised` · `shadow-floating` · `shadow-overlay` (ink-tinted, multi-layer) · `shadow-glow` · `shadow-glow-lg` (the brand's light under what acts) | `--kz-shadow-*`, `--kz-accent` |
52
+ | Edges | `inset-shadow-edge` (the top edge catches the light) · `inset-shadow-edge-fill` (on an accent fill) · `inset-shadow-well` (a field, a track) | `--kz-edge-*` |
53
+ | Material | `bg-sheen` (the top of a raised surface) · `bg-fill-shade` (the bottom of a fill) · `bg-halo` (the brand from the top) · `glass` (+ `bg-glass`, `border-glass-border`) | `--kz-surface-sheen`, `--kz-fill-shade`, `--kz-glass-*` |
54
+ | Focus | `focus-visible:focus-ring` (a crisp ring off the element, in a halo) · `focus-ring-inset` (on the border) | `--kz-ring*` |
55
+ | Node | `node` · `node-lit` — the core of the marks as a state mark | `--kz-accent` |
51
56
  | Font | `font-sans` · `font-display` · `font-mono` | `--kz-font-*` |
52
- | Motion | `ease-kz`; every `transition*` defaults to 200 ms on `--kz-ease` | `--kz-ease` |
57
+ | Motion | `ease-kz`, `ease-spring`; every `transition*` defaults to 200 ms on `--kz-ease`; `duration-(--kz-duration-fast)` for the micro-interactions (0 under reduced motion) | `--kz-ease*`, `--kz-duration-*` |
58
+
59
+ The material is BRAND.md §6 of `@krizaka/tokens`. Merge these classes with `twMergeConfig` (`@krizaka/ui/cn`) in your own
60
+ `twMerge`, or `bg-sheen` will be taken for a background colour. The griffe (the 45° cut corner) is `[corner-shape:var(--kz-cut-shape)]`
61
+ with `rounded-(--kz-cut-size)`; `--kz-cut-shape: round` turns it off for an app.
53
62
 
54
63
  Opacity modifiers work on every colour: `bg-surface-1/70`, `shadow-accent/20`.
55
64
 
package/index.css CHANGED
@@ -42,6 +42,13 @@
42
42
  --color-fg-warning: var(--kz-warning-text);
43
43
  --color-fg-danger: var(--kz-danger-text);
44
44
  --color-fg-info: var(--kz-info-text);
45
+ /* statuts en fond teinté : le texte primaire et le texte du statut y restent ≥ 4.5:1 */
46
+ --color-success-soft: var(--kz-success-soft);
47
+ --color-warning-soft: var(--kz-warning-soft);
48
+ --color-danger-soft: var(--kz-danger-soft);
49
+ /* le verre (BRAND.md §6) : bg-glass + border-glass-border, ou l'utilitaire glass qui ajoute le flou */
50
+ --color-glass: var(--kz-glass-bg);
51
+ --color-glass-border: var(--kz-glass-border);
45
52
 
46
53
  --radius-sm: var(--kz-radius-sm);
47
54
  --radius-md: var(--kz-radius-md);
@@ -52,6 +59,17 @@
52
59
  --shadow-sm: var(--kz-shadow-sm);
53
60
  --shadow-md: var(--kz-shadow-md);
54
61
  --shadow-lg: var(--kz-shadow-lg);
62
+ /* la signature (BRAND.md §6) : ombres d'encre multi-couches, et la lueur de la marque sous ce qui agit — composée ici
63
+ pour que var(--kz-accent) se lise sur l'élément (une section .brand-<id> a sa propre lueur) */
64
+ --shadow-raised: var(--kz-shadow-raised);
65
+ --shadow-floating: var(--kz-shadow-floating);
66
+ --shadow-overlay: var(--kz-shadow-overlay);
67
+ --shadow-glow: 0 1px 2px color-mix(in oklab, var(--kz-accent) 28%, transparent), 0 6px 16px -6px color-mix(in oklab, var(--kz-accent) 55%, transparent);
68
+ --shadow-glow-lg: 0 2px 4px color-mix(in oklab, var(--kz-accent) 30%, transparent), 0 12px 28px -8px color-mix(in oklab, var(--kz-accent) 60%, transparent);
69
+ /* les arêtes : le haut d'une surface surélevée capte la lumière, un puits (champ, piste) se creuse */
70
+ --inset-shadow-edge: inset 0 1px 0 0 var(--kz-edge-light);
71
+ --inset-shadow-edge-fill: inset 0 1px 0 0 var(--kz-edge-on-fill);
72
+ --inset-shadow-well: inset 0 1px 2px 0 var(--kz-edge-well);
55
73
 
56
74
  --font-sans: var(--kz-font-sans);
57
75
  --font-text: var(--kz-font-text);
@@ -76,10 +94,63 @@
76
94
  --text-mono-sm: var(--kz-type-mono-sm-size); --text-mono-sm--line-height: var(--kz-type-mono-sm-line-height); --text-mono-sm--font-weight: var(--kz-type-mono-sm-weight); --text-mono-sm--letter-spacing: var(--kz-type-mono-sm-tracking);
77
95
 
78
96
  --ease-kz: var(--kz-ease);
97
+ --ease-spring: var(--kz-ease-spring);
79
98
  --default-transition-duration: 200ms;
80
99
  --default-transition-timing-function: var(--kz-ease);
81
100
  }
82
101
 
102
+ /* ─── Surfaces & matières (BRAND.md §6) : des utilitaires qui lisent les tokens, rien d'autre ─── */
103
+
104
+ /* Le reflet : le haut d'une surface surélevée, sur sa couleur (bg-surface-2 bg-sheen). */
105
+ @utility bg-sheen {
106
+ background-image: linear-gradient(to bottom, var(--kz-surface-sheen), transparent 70%);
107
+ }
108
+ /* Le bas d'un aplat (accent, statut) s'assombrit à peine : de la matière, on-accent reste ≥ 4.5:1 (testé). */
109
+ @utility bg-fill-shade {
110
+ background-image: linear-gradient(to bottom, transparent 35%, var(--kz-fill-shade));
111
+ }
112
+ /* Un halo de la marque qui descend du haut d'une surface (la carte « spotlight ») : 16 %, texte secondaire ≥ 4.5:1. */
113
+ @utility bg-halo {
114
+ background-image: radial-gradient(120% 90% at 50% -30%, color-mix(in oklab, var(--kz-accent) 16%, transparent), transparent 70%);
115
+ }
116
+ /* Le verre dépoli de ce qui flotte : fond, contour, flou. */
117
+ @utility glass {
118
+ background-color: var(--kz-glass-bg);
119
+ border-color: var(--kz-glass-border);
120
+ -webkit-backdrop-filter: blur(var(--kz-glass-blur)) saturate(1.6);
121
+ backdrop-filter: blur(var(--kz-glass-blur)) saturate(1.6);
122
+ }
123
+ /* L'anneau de focus signature : net (--kz-ring), décollé de l'élément, dans un halo de la même couleur. L'outline suit
124
+ les coins (y compris les coins coupés), le halo s'ajoute aux ombres de l'élément sans les effacer. */
125
+ @utility focus-ring {
126
+ outline: var(--kz-ring-width) solid var(--kz-ring);
127
+ outline-offset: var(--kz-ring-offset);
128
+ --tw-ring-shadow: 0 0 0 calc(var(--kz-ring-offset) + var(--kz-ring-width) + var(--kz-ring-halo)) color-mix(in oklab, var(--kz-ring) 22%, transparent);
129
+ box-shadow: var(--tw-inset-shadow, 0 0 #0000), var(--tw-inset-ring-shadow, 0 0 #0000), var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
130
+ }
131
+ /* …posé sur le contour (un champ, une cellule, un élément dans un conteneur qui rogne). */
132
+ @utility focus-ring-inset {
133
+ outline: var(--kz-ring-width) solid var(--kz-ring);
134
+ outline-offset: calc(var(--kz-ring-width) * -1);
135
+ --tw-ring-shadow: 0 0 0 var(--kz-ring-halo) color-mix(in oklab, var(--kz-ring) 22%, transparent);
136
+ box-shadow: var(--tw-inset-shadow, 0 0 #0000), var(--tw-inset-ring-shadow, 0 0 #0000), var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
137
+ }
138
+ /* Le nœud : le cœur des marques, un losange qui marque un état. Éteint, il se tait ; node-lit l'allume dans l'accent. */
139
+ @utility node {
140
+ display: inline-block;
141
+ flex-shrink: 0;
142
+ width: 6px;
143
+ height: 6px;
144
+ rotate: 45deg;
145
+ border-radius: 1.5px;
146
+ background-color: var(--kz-border-strong);
147
+ transition: background-color var(--kz-duration-fast) var(--kz-ease), box-shadow var(--kz-duration-base) var(--kz-ease);
148
+ }
149
+ @utility node-lit {
150
+ background-color: var(--kz-accent);
151
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--kz-accent) 22%, transparent), 0 0 10px color-mix(in oklab, var(--kz-accent) 70%, transparent);
152
+ }
153
+
83
154
  /* Variantes de thème : réservées aux illustrations et aux images. Interdites par lint dans les produits
84
155
  (les tokens font le travail). `.theme-dark` reste un îlot sombre dans les deux thèmes. */
85
156
  @custom-variant light {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krizaka/tailwind",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "The Krizaka Tailwind CSS v4 preset: the semantic --kz-* tokens as utilities (bg-surface-1, text-fg-secondary, border-border-default, text-accent, rounded-xl…), illustration-only light/dark variants and the Krizaka easing.",
5
5
  "keywords": [
6
6
  "krizaka",
@@ -37,8 +37,8 @@
37
37
  "sideEffects": true,
38
38
  "peerDependencies": {
39
39
  "tailwindcss": "^4.1",
40
- "@krizaka/tokens": "^2.4.0",
41
- "@krizaka/ui": "^2.4.0"
40
+ "@krizaka/tokens": "^2.5.0",
41
+ "@krizaka/ui": "^2.5.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@size-limit/file": "^14.2.0",
@@ -51,9 +51,9 @@
51
51
  "tailwindcss": "^4.3.3",
52
52
  "typescript": "^5.9.0",
53
53
  "vitest": "^4.1.11",
54
- "@krizaka/config": "0.1.0",
55
- "@krizaka/tokens": "^2.4.0",
56
- "@krizaka/ui": "^2.4.0"
54
+ "@krizaka/tokens": "^2.5.0",
55
+ "@krizaka/ui": "^2.5.0",
56
+ "@krizaka/config": "0.1.0"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=20"
@@ -65,7 +65,7 @@
65
65
  {
66
66
  "name": ".",
67
67
  "path": "index.css",
68
- "limit": "1.7 kB",
68
+ "limit": "3.1 kB",
69
69
  "gzip": true
70
70
  }
71
71
  ],