@eduardoalvarez/arrecife 0.5.1 → 0.6.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 (66) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +706 -470
  3. package/dist/brand/index.cjs +112 -95
  4. package/dist/brand/index.d.cts +40 -39
  5. package/dist/brand/index.d.ts +40 -39
  6. package/dist/brand/index.js +5 -4
  7. package/dist/catalog-D13txprv.d.cts +78 -0
  8. package/dist/catalog-D13txprv.d.ts +78 -0
  9. package/dist/chart/index.cjs +100 -83
  10. package/dist/chart/index.d.cts +66 -66
  11. package/dist/chart/index.d.ts +66 -66
  12. package/dist/chart/index.js +14 -12
  13. package/dist/chunk-25YNFCIF.js +141 -0
  14. package/dist/{chunk-YZ2SDOVZ.js → chunk-6O3KWB6P.js} +30 -30
  15. package/dist/chunk-CKRSQPTX.js +36 -0
  16. package/dist/{chunk-ZEOQKRQ7.js → chunk-DKCN7BAL.js} +1 -1
  17. package/dist/chunk-GCRII2KQ.js +86 -0
  18. package/dist/chunk-JMOOFZ3B.js +42 -0
  19. package/dist/chunk-O4TAH7YJ.js +276 -0
  20. package/dist/chunk-ODBFN44D.js +45 -0
  21. package/dist/{chunk-VPT32GPG.js → chunk-PMN7NR3G.js} +2 -2
  22. package/dist/chunk-XKYHTOUJ.js +27 -0
  23. package/dist/form/index.cjs +109 -92
  24. package/dist/form/index.d.cts +43 -42
  25. package/dist/form/index.d.ts +43 -42
  26. package/dist/form/index.js +25 -23
  27. package/dist/index.cjs +1047 -914
  28. package/dist/index.d.cts +769 -777
  29. package/dist/index.d.ts +769 -777
  30. package/dist/index.js +608 -660
  31. package/dist/{label-DuTvJGxD.d.ts → label-MgHFKnFy.d.cts} +3 -3
  32. package/dist/{label-DuTvJGxD.d.cts → label-MgHFKnFy.d.ts} +3 -3
  33. package/dist/og/index.cjs +130 -130
  34. package/dist/og/index.d.cts +93 -89
  35. package/dist/og/index.d.ts +93 -89
  36. package/dist/og/index.js +106 -106
  37. package/dist/shiki/index.cjs +28 -30
  38. package/dist/shiki/index.d.cts +4 -4
  39. package/dist/shiki/index.d.ts +4 -4
  40. package/dist/shiki/index.js +12 -12
  41. package/dist/theme/index.cjs +97 -0
  42. package/dist/theme/index.d.cts +144 -0
  43. package/dist/theme/index.d.ts +144 -0
  44. package/dist/theme/index.js +2 -0
  45. package/dist/tokens/index.cjs +133 -86
  46. package/dist/tokens/index.d.cts +246 -161
  47. package/dist/tokens/index.d.ts +246 -161
  48. package/dist/tokens/index.js +2 -2
  49. package/dist/tokens/theme.css +133 -98
  50. package/dist/variants/index.cjs +192 -0
  51. package/dist/variants/index.d.cts +192 -0
  52. package/dist/variants/index.d.ts +192 -0
  53. package/dist/variants/index.js +3 -0
  54. package/llms.txt +810 -744
  55. package/package.json +20 -11
  56. package/dist/catalogo-Du5ID-Hi.d.cts +0 -77
  57. package/dist/catalogo-Du5ID-Hi.d.ts +0 -77
  58. package/dist/chunk-E3OMP2DL.js +0 -36
  59. package/dist/chunk-KPZNNMV5.js +0 -83
  60. package/dist/chunk-NHS7ETKJ.js +0 -27
  61. package/dist/chunk-TSPJOM6K.js +0 -229
  62. package/dist/chunk-UOWIDFCB.js +0 -81
  63. package/dist/tema/index.cjs +0 -94
  64. package/dist/tema/index.d.cts +0 -110
  65. package/dist/tema/index.d.ts +0 -110
  66. package/dist/tema/index.js +0 -2
@@ -1,3 +1,3 @@
1
- export { tokens } from '../chunk-VPT32GPG.js';
2
- export { brand, colors, control, dark, fonts, gradient, light, limits, motion, naming, radius, series, shadow, sintaxis, size, spacing, tagline, typeScale } from '../chunk-TSPJOM6K.js';
1
+ export { tokens } from '../chunk-PMN7NR3G.js';
2
+ export { brand, colors, control, dark, fonts, gradient, light, limits, motion, naming, radius, series, shadow, size, spacing, syntax, tagline, typeScale } from '../chunk-O4TAH7YJ.js';
3
3
  import '../chunk-MLKGABMK.js';
@@ -1,25 +1,25 @@
1
1
  /*
2
- * GENERADO por scripts/build-tokens.mjs desde src/tokens/tokens.ts.
3
- * No lo edites a mano: se regenera en cada build.
2
+ * GENERATED by scripts/build-tokens.mjs from src/tokens/tokens.ts.
3
+ * Do not edit by hand: it is regenerated on every build.
4
4
  *
5
- * Uso en un proyecto Tailwind v4:
5
+ * Usage in a Tailwind v4 project:
6
6
  * @import "tailwindcss";
7
7
  * @import "@eduardoalvarez/arrecife/tokens/theme.css";
8
8
  *
9
- * El modo oscuro es el primario y es el default. Un proyecto en modo claro
10
- * declara data-theme="light" en <html>.
9
+ * Dark is the primary mode and the default. A project in light mode
10
+ * declares data-theme="light" on <html>.
11
11
  *
12
- * Las familias tipográficas se declaran por nombre: el proyecto carga
13
- * Bricolage Grotesque, Geist y JetBrains Mono como prefiera.
12
+ * Font families are declared by name: the project loads Bricolage
13
+ * Grotesque, Geist and JetBrains Mono however it prefers.
14
14
  */
15
15
 
16
- /* El modo se elige con data-theme. El oscuro es el primario, así que es el
17
- default: un proyecto claro declara data-theme="light" en <html>. */
16
+ /* The mode is chosen with data-theme. Dark is primary, so it is the default:
17
+ a light project declares data-theme="light" on <html>. */
18
18
  @custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
19
19
  @custom-variant light (&:where([data-theme="light"], [data-theme="light"] *));
20
20
 
21
21
  @theme {
22
- /* --- color · modo oscuro (default) ------------------------------------ */
22
+ /* --- color · dark mode (default) ------------------------------------- */
23
23
  --color-background: #091319;
24
24
  --color-surface: #10202B;
25
25
  --color-surface-raised: #17303E;
@@ -38,19 +38,22 @@
38
38
  --color-success: #4FB477;
39
39
  --color-warning: #E8A33D;
40
40
  --color-error: #E15757;
41
+ --color-danger: #F4736B;
42
+ --color-danger-hover: #F78D86;
43
+ --color-danger-on: #2B0A08;
41
44
 
42
- /* --- marca · iguales en los dos modos ---------------------------------- */
45
+ /* --- brand · identical in both modes ----------------------------------- */
43
46
  --color-brand-body: #3E7CB1;
44
47
  --color-brand-spots: #C2D7E7;
45
48
  --color-brand-hull: #0B1524;
46
49
 
47
- /* --- series de gráfica · modo oscuro (default) --------------------------- */
48
- --color-serie-1: #35D6C0;
49
- --color-serie-2: #F2A65A;
50
- --color-serie-3: #3E7CB1;
51
- --color-serie-4: #71919C;
50
+ /* --- chart series · dark mode (default) -------------------------------- */
51
+ --color-series-1: #35D6C0;
52
+ --color-series-2: #F2A65A;
53
+ --color-series-3: #3E7CB1;
54
+ --color-series-4: #71919C;
52
55
 
53
- /* --- tipografía --------------------------------------------------------- */
56
+ /* --- typography --------------------------------------------------------- */
54
57
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
55
58
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
56
59
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
@@ -99,7 +102,7 @@
99
102
  --text-eyebrow: 12px;
100
103
  --text-eyebrow--letter-spacing: 0.12em;
101
104
 
102
- /* --- forma y ritmo ------------------------------------------------------ */
105
+ /* --- shape and rhythm --------------------------------------------------- */
103
106
  --radius-chip: 6px;
104
107
  --radius-control: 10px;
105
108
  --radius-card: 14px;
@@ -117,6 +120,7 @@
117
120
  --spacing-control-md: 22px;
118
121
  --spacing-control-lg: 30px;
119
122
  --spacing-control-icon: 42px;
123
+ --spacing-control-icon-sm: 32px;
120
124
 
121
125
  --spacing-nav: 64px;
122
126
  --container-content: 760px;
@@ -128,17 +132,17 @@
128
132
  --duration-standard: 150ms;
129
133
  --ease-standard: ease-out;
130
134
 
131
- /* --- degradados · modo oscuro (default) --------------------------------- */
135
+ /* --- gradients · dark mode (default) ----------------------------------- */
132
136
  --gradient-hero: linear-gradient(160deg, #091319 60%, #0D2129 100%);
133
- --gradient-seccion: linear-gradient(150deg, #10202B 0%, #0D2129 100%);
137
+ --gradient-section: linear-gradient(150deg, #10202B 0%, #0D2129 100%);
134
138
  --gradient-og: linear-gradient(145deg, #091319 55%, #0D2129 100%);
135
139
  }
136
140
 
137
- /* --- color por modo, anidable ---------------------------------------------
138
- Los dos modos se emiten como bloques propios, no solo el claro. Así un
139
- subárbol puede declarar el modo contrario al de la página y todo lo de dentro
140
- lo respeta: es lo que necesita un bloque de código, que va sobre casco en los
141
- dos temas y por tanto siempre lleva tinta clara encima. */
141
+ /* --- color per mode, nestable ----------------------------------------------
142
+ Both modes are emitted as their own blocks, not just light. That way a subtree
143
+ can declare the opposite mode to the page and everything inside honours it:
144
+ which is what a code block needs, since it sits on hull in both themes and
145
+ therefore always carries light ink on top. */
142
146
  [data-theme='dark'] {
143
147
  --color-background: #091319;
144
148
  --color-surface: #10202B;
@@ -158,14 +162,17 @@
158
162
  --color-success: #4FB477;
159
163
  --color-warning: #E8A33D;
160
164
  --color-error: #E15757;
165
+ --color-danger: #F4736B;
166
+ --color-danger-hover: #F78D86;
167
+ --color-danger-on: #2B0A08;
161
168
 
162
- --color-serie-1: #35D6C0;
163
- --color-serie-2: #F2A65A;
164
- --color-serie-3: #3E7CB1;
165
- --color-serie-4: #71919C;
169
+ --color-series-1: #35D6C0;
170
+ --color-series-2: #F2A65A;
171
+ --color-series-3: #3E7CB1;
172
+ --color-series-4: #71919C;
166
173
 
167
174
  --gradient-hero: linear-gradient(160deg, #091319 60%, #0D2129 100%);
168
- --gradient-seccion: linear-gradient(150deg, #10202B 0%, #0D2129 100%);
175
+ --gradient-section: linear-gradient(150deg, #10202B 0%, #0D2129 100%);
169
176
  --gradient-og: linear-gradient(145deg, #091319 55%, #0D2129 100%);
170
177
  }
171
178
 
@@ -188,34 +195,39 @@
188
195
  --color-success: #0F6B52;
189
196
  --color-warning: #8D6111;
190
197
  --color-error: #C0392B;
198
+ --color-danger: #C0392B;
199
+ --color-danger-hover: #A32F22;
200
+ --color-danger-on: #FFF6F4;
191
201
 
192
- --color-serie-1: #0D7C6F;
193
- --color-serie-2: #A65B27;
194
- --color-serie-3: #3E7CB1;
195
- --color-serie-4: #626A75;
202
+ --color-series-1: #0D7C6F;
203
+ --color-series-2: #A65B27;
204
+ --color-series-3: #3E7CB1;
205
+ --color-series-4: #626A75;
196
206
 
197
207
  --gradient-hero: linear-gradient(160deg, #F6F2EA 60%, #EFE9DE 100%);
198
- --gradient-seccion: linear-gradient(150deg, #FFFFFF 0%, #EFE9DE 100%);
208
+ --gradient-section: linear-gradient(150deg, #FFFFFF 0%, #EFE9DE 100%);
199
209
  --gradient-og: linear-gradient(145deg, #F6F2EA 55%, #EFE9DE 100%);
200
210
  }
201
211
 
202
- /* --- los dos degradados del sistema, como utilidad --------------------------
203
- Son los dos únicos bloques con degradado: el hero y el panel de sección. Que
204
- sean utilidades y no clases arbitrarias es lo que impide que cada proyecto
205
- escriba su propio ángulo. Siguen el modo porque leen la custom property. */
206
- @utility degradado-hero {
212
+ /* --- the system's two gradients, as utilities -------------------------------
213
+ They are the only two blocks with a gradient: the hero and the section panel.
214
+ Making them utilities rather than arbitrary classes is what stops each project
215
+ from writing its own angle. They follow the mode because they read the custom
216
+ property. */
217
+ @utility gradient-hero {
207
218
  background-image: var(--gradient-hero);
208
219
  }
209
- @utility degradado-seccion {
210
- background-image: var(--gradient-seccion);
220
+ @utility gradient-section {
221
+ background-image: var(--gradient-section);
211
222
  }
212
223
 
213
- /* --- la tercera excepción de movimiento: el shimmer del skeleton ------------
214
- El sistema no anima, y esta es la tercera y última salvedad, junto al spinner
215
- del botón y el panel lateral. Todas son realimentación de PROGRESO, no de
216
- estado: un bloque quieto y un bloque que nunca va a cargar se ven igual.
224
+ /* --- the third motion exception: the skeleton shimmer -----------------------
225
+ The system does not animate, and this is the third exception, alongside the
226
+ button spinner and the side panel. All of them are feedback about PROGRESS,
227
+ not about state: a block that is still and a block that will never load look
228
+ identical.
217
229
 
218
- 1.4s lineal, del documento. Va detrás de motion-safe en el componente. */
230
+ 1.4s linear, from the document. It sits behind motion-safe in the component. */
219
231
  @keyframes arrecife-shimmer {
220
232
  from { background-position: 200% 0; }
221
233
  to { background-position: -200% 0; }
@@ -232,76 +244,99 @@
232
244
  animation: arrecife-shimmer 1.4s linear infinite;
233
245
  }
234
246
 
235
- /* --- la excepción del plegable ----------------------------------------------
236
- La cuarta y, como las otras tres, no es «queda mejor»: un plegable que revela
237
- contenido sin transición hace SALTAR todo lo que tiene debajo, y quien acaba
238
- de pulsar pierde el sitio en la página. Es la misma categoría que el panel
239
- lateral —un panel que entra desde un borde se desliza por definición— y no la
240
- de una animación de entrada, que es lo que el sistema no admite: aquí no
241
- aparece nada nuevo en pantalla, se abre un hueco.
242
-
243
- La altura la publica Radix en --radix-accordion-content-height. Dura lo que
244
- dura todo lo demás y usa la misma curva, así que no estrena un tiempo. En el
245
- componente va detrás de motion-safe. */
246
- @keyframes arrecife-despliega {
247
+ /* --- the fifth exception: the caret of the CLI signature --------------------
248
+ A terminal prompt with a caret that does not blink is a terminal that has
249
+ hung. The caret is the one piece of the footer that says the signature is a
250
+ prompt and not a decorative string, and a still block reads as a typo.
251
+
252
+ step-end and not a fade: a real caret is on or off, and easing it turns a
253
+ terminal into a pulsing dot. 1.06s is the cadence of a VT100 and of the site
254
+ this comes from.
255
+
256
+ It is the only exception that is not feedback about progress, and it earns its
257
+ place on the other half of the criterion the other four share: it is not
258
+ decoration, it is what makes the piece legible as what it is. Behind
259
+ motion-safe, where the caret stays solid — which is a caret at rest, not a
260
+ missing one. See docs/decisions.md § 23. */
261
+ @keyframes arrecife-caret {
262
+ 0%, 50% { opacity: 1; }
263
+ 50.01%, 100% { opacity: 0; }
264
+ }
265
+
266
+ @utility caret {
267
+ animation: arrecife-caret 1.06s step-end infinite;
268
+ }
269
+
270
+ /* --- the accordion exception -----------------------------------------------
271
+ The fourth one and, like the other three, it is not «it looks better»: a
272
+ disclosure that reveals content with no transition makes everything below it
273
+ JUMP, and whoever just clicked loses their place on the page. It is the same
274
+ category as the side panel — a panel entering from an edge slides by
275
+ definition — and not an entrance animation, which is what the system rejects:
276
+ nothing new appears on screen here, a gap opens.
277
+
278
+ Radix publishes the height as --radix-accordion-content-height. It lasts as
279
+ long as everything else and uses the same curve, so it introduces no new
280
+ timing. In the component it sits behind motion-safe. */
281
+ @keyframes arrecife-expand {
247
282
  from { height: 0; }
248
283
  to { height: var(--radix-accordion-content-height); }
249
284
  }
250
- @keyframes arrecife-repliega {
285
+ @keyframes arrecife-collapse {
251
286
  from { height: var(--radix-accordion-content-height); }
252
287
  to { height: 0; }
253
288
  }
254
289
 
255
- @utility desplegar {
256
- animation: arrecife-despliega var(--duration-standard) var(--ease-standard);
290
+ @utility expand {
291
+ animation: arrecife-expand var(--duration-standard) var(--ease-standard);
257
292
  }
258
- @utility replegar {
259
- animation: arrecife-repliega var(--duration-standard) var(--ease-standard);
293
+ @utility collapse {
294
+ animation: arrecife-collapse var(--duration-standard) var(--ease-standard);
260
295
  }
261
296
 
262
- /* --- la excepción del panel lateral -----------------------------------------
263
- Un panel que entra desde un borde se desliza por definición: quieto sería un
264
- modal descentrado. Es la segunda y última excepción a "nada de
265
- desplazamiento", y se aprobó a sabiendas.
266
-
267
- Dura lo que dura todo lo demás y usa la misma curva, así que no introduce un
268
- tiempo nuevo. En el componente va detrás de motion-safe. */
269
- @keyframes arrecife-entra-derecha { from { translate: 100% 0; } }
270
- @keyframes arrecife-sale-derecha { to { translate: 100% 0; } }
271
- @keyframes arrecife-entra-izquierda { from { translate: -100% 0; } }
272
- @keyframes arrecife-sale-izquierda { to { translate: -100% 0; } }
273
- @keyframes arrecife-entra-arriba { from { translate: 0 -100%; } }
274
- @keyframes arrecife-sale-arriba { to { translate: 0 -100%; } }
275
- @keyframes arrecife-entra-abajo { from { translate: 0 100%; } }
276
- @keyframes arrecife-sale-abajo { to { translate: 0 100%; } }
277
-
278
- @utility deslizar-entra-derecha {
279
- animation: arrecife-entra-derecha var(--duration-standard) var(--ease-standard);
297
+ /* --- the side panel exception ----------------------------------------------
298
+ A panel entering from an edge slides by definition: held still it would be an
299
+ off-centre modal. It is the second exception to "no displacement", and it was
300
+ approved knowingly.
301
+
302
+ It lasts as long as everything else and uses the same curve, so it introduces
303
+ no new timing. In the component it sits behind motion-safe. */
304
+ @keyframes arrecife-slide-in-right { from { translate: 100% 0; } }
305
+ @keyframes arrecife-slide-out-right { to { translate: 100% 0; } }
306
+ @keyframes arrecife-slide-in-left { from { translate: -100% 0; } }
307
+ @keyframes arrecife-slide-out-left { to { translate: -100% 0; } }
308
+ @keyframes arrecife-slide-in-top { from { translate: 0 -100%; } }
309
+ @keyframes arrecife-slide-out-top { to { translate: 0 -100%; } }
310
+ @keyframes arrecife-slide-in-bottom { from { translate: 0 100%; } }
311
+ @keyframes arrecife-slide-out-bottom { to { translate: 0 100%; } }
312
+
313
+ @utility slide-in-right {
314
+ animation: arrecife-slide-in-right var(--duration-standard) var(--ease-standard);
280
315
  }
281
- @utility deslizar-sale-derecha {
282
- animation: arrecife-sale-derecha var(--duration-standard) var(--ease-standard);
316
+ @utility slide-out-right {
317
+ animation: arrecife-slide-out-right var(--duration-standard) var(--ease-standard);
283
318
  }
284
- @utility deslizar-entra-izquierda {
285
- animation: arrecife-entra-izquierda var(--duration-standard) var(--ease-standard);
319
+ @utility slide-in-left {
320
+ animation: arrecife-slide-in-left var(--duration-standard) var(--ease-standard);
286
321
  }
287
- @utility deslizar-sale-izquierda {
288
- animation: arrecife-sale-izquierda var(--duration-standard) var(--ease-standard);
322
+ @utility slide-out-left {
323
+ animation: arrecife-slide-out-left var(--duration-standard) var(--ease-standard);
289
324
  }
290
- @utility deslizar-entra-arriba {
291
- animation: arrecife-entra-arriba var(--duration-standard) var(--ease-standard);
325
+ @utility slide-in-top {
326
+ animation: arrecife-slide-in-top var(--duration-standard) var(--ease-standard);
292
327
  }
293
- @utility deslizar-sale-arriba {
294
- animation: arrecife-sale-arriba var(--duration-standard) var(--ease-standard);
328
+ @utility slide-out-top {
329
+ animation: arrecife-slide-out-top var(--duration-standard) var(--ease-standard);
295
330
  }
296
- @utility deslizar-entra-abajo {
297
- animation: arrecife-entra-abajo var(--duration-standard) var(--ease-standard);
331
+ @utility slide-in-bottom {
332
+ animation: arrecife-slide-in-bottom var(--duration-standard) var(--ease-standard);
298
333
  }
299
- @utility deslizar-sale-abajo {
300
- animation: arrecife-sale-abajo var(--duration-standard) var(--ease-standard);
334
+ @utility slide-out-bottom {
335
+ animation: arrecife-slide-out-bottom var(--duration-standard) var(--ease-standard);
301
336
  }
302
337
 
303
- /* La única transición del sistema, como utilidad. Los estados se comunican con
304
- borde y color, no con movimiento: esta clase no puede animar otra cosa. */
338
+ /* The system's only transition, as a utility. States are communicated with
339
+ border and color, not with movement: this class cannot animate anything else. */
305
340
  @utility transition-standard {
306
341
  transition-property: color, background-color, border-color, fill, stroke;
307
342
  transition-duration: var(--duration-standard);
@@ -0,0 +1,192 @@
1
+ 'use strict';
2
+
3
+ var classVarianceAuthority = require('class-variance-authority');
4
+
5
+ // src/variants/button.ts
6
+ var button = classVarianceAuthority.cva(
7
+ [
8
+ "inline-flex cursor-pointer items-center justify-center gap-step-xs whitespace-nowrap select-none",
9
+ "rounded-control font-sans font-medium",
10
+ "transition-standard",
11
+ "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",
12
+ "disabled:pointer-events-none disabled:opacity-50",
13
+ "[&_svg]:shrink-0"
14
+ ],
15
+ {
16
+ variants: {
17
+ variant: {
18
+ primary: [
19
+ "bg-accent text-accent-on hover:bg-accent-hover",
20
+ "light:bg-brand-hull light:text-accent-on light:hover:bg-text-secondary"
21
+ ],
22
+ conversion: "bg-warm text-warm-on hover:bg-warm-hover",
23
+ secondary: [
24
+ "border-hairline-hover border bg-transparent text-text-primary",
25
+ "hover:border-accent hover:text-accent"
26
+ ],
27
+ tertiary: [
28
+ "bg-transparent font-mono font-normal text-text-secondary",
29
+ "hover:text-accent hover:underline hover:underline-offset-4"
30
+ ],
31
+ /** Irreversible only. Never for «cancel» on a form. */
32
+ destructive: "bg-danger text-danger-on hover:bg-danger-hover",
33
+ destructiveOutline: [
34
+ "border-danger text-danger border bg-transparent",
35
+ "hover:bg-danger hover:text-danger-on"
36
+ ]
37
+ },
38
+ size: {
39
+ sm: "h-8 px-control-sm text-label",
40
+ md: "h-10 px-control-md text-ui",
41
+ lg: "h-12 px-control-lg text-lead",
42
+ /** A 42×42 square, no text. `aria-label` is mandatory on it. */
43
+ icon: "size-control-icon p-0",
44
+ /** 32×32, for a table row. Same height as `sm`, and same mandatory `aria-label`. */
45
+ "icon-sm": "size-control-icon-sm p-0"
46
+ }
47
+ },
48
+ compoundVariants: [
49
+ /**
50
+ * The tertiary has no box: neither horizontal padding nor control height.
51
+ * It goes here rather than as `px-0` on the variant so it beats the size's
52
+ * `px-*` without depending on the order cva concatenates classes in.
53
+ */
54
+ { variant: "tertiary", size: ["sm", "md", "lg"], class: "h-auto px-0" }
55
+ ],
56
+ defaultVariants: { variant: "primary", size: "md" }
57
+ }
58
+ );
59
+ var badge = classVarianceAuthority.cva(
60
+ ["inline-flex items-center gap-step-xs", "rounded-chip px-step-xs py-0.5", "font-sans text-tag", "transition-standard"],
61
+ {
62
+ variants: {
63
+ variant: {
64
+ neutral: "bg-surface-raised text-text-secondary",
65
+ accent: "bg-accent/8 text-text-primary",
66
+ warm: "bg-warm/8 text-text-primary",
67
+ success: "bg-success/8 text-text-primary",
68
+ warning: "bg-warning/8 text-text-primary",
69
+ error: "bg-error/8 text-text-primary"
70
+ }
71
+ },
72
+ defaultVariants: { variant: "neutral" }
73
+ }
74
+ );
75
+ var category = classVarianceAuthority.cva(
76
+ [
77
+ "inline-flex items-center gap-step-xs",
78
+ "rounded-pill px-step-sm py-0.5",
79
+ "font-mono text-chip",
80
+ "border transition-standard"
81
+ ],
82
+ {
83
+ variants: {
84
+ active: {
85
+ false: "border-warm/28 bg-transparent text-warm",
86
+ true: "border-warm bg-warm text-warm-on"
87
+ }
88
+ },
89
+ defaultVariants: { active: false }
90
+ }
91
+ );
92
+ var metric = ["inline-flex items-center gap-step-xs", "rounded-pill", "font-mono text-chip text-text-muted"];
93
+ var text = classVarianceAuthority.cva("", {
94
+ variants: {
95
+ variant: {
96
+ display: "text-display font-display",
97
+ // Large metrics: 46px of display. It is the only scale designed for a
98
+ // number, which is why its line height is 1.
99
+ stat: "text-stat font-display",
100
+ h1: "text-h1 font-display",
101
+ h2: "text-h2 font-display",
102
+ h3: "text-h3 font-display",
103
+ body: "text-body font-sans",
104
+ // 17px: the deck on interior pages and the large button.
105
+ lead: "text-lead font-sans",
106
+ ui: "text-ui font-sans",
107
+ label: "text-label font-sans",
108
+ // The two badge scales. `tag` is status (sans 12.5/500) and `chip` is
109
+ // category and metric (mono 11.5). Neither transforms the text.
110
+ tag: "text-tag font-sans",
111
+ chip: "text-chip font-mono",
112
+ // Mono with NO transform: dates, paths, versions, file names and the
113
+ // footer signature. It is the step that was missing, and the reason every
114
+ // call site ended up writing `variant="eyebrow" className="normal-case"`.
115
+ meta: "text-meta font-mono",
116
+ // `uppercase` does not fit in a size token: text-transform is not a
117
+ // modifier of --text-*. Which is why the variant sets it, not theme.css.
118
+ eyebrow: "text-eyebrow font-mono uppercase"
119
+ },
120
+ tone: {
121
+ primary: "text-text-primary",
122
+ secondary: "text-text-secondary",
123
+ muted: "text-text-muted",
124
+ accent: "text-accent",
125
+ warm: "text-warm",
126
+ success: "text-success",
127
+ warning: "text-warning",
128
+ error: "text-error"
129
+ }
130
+ },
131
+ defaultVariants: { variant: "body", tone: "primary" }
132
+ });
133
+ var alert = classVarianceAuthority.cva("w-full rounded-card border p-step-md font-sans text-ui", {
134
+ variants: {
135
+ variant: {
136
+ accent: "text-text-secondary",
137
+ success: "text-text-secondary",
138
+ warning: "text-text-secondary",
139
+ error: "text-text-secondary"
140
+ },
141
+ emphasis: {
142
+ subtle: "",
143
+ strong: ""
144
+ }
145
+ },
146
+ compoundVariants: [
147
+ { variant: "accent", emphasis: "subtle", class: "border-accent/22 bg-accent/8" },
148
+ { variant: "success", emphasis: "subtle", class: "border-success/22 bg-success/8" },
149
+ { variant: "warning", emphasis: "subtle", class: "border-warning/22 bg-warning/8" },
150
+ { variant: "error", emphasis: "subtle", class: "border-error/22 bg-error/8" },
151
+ { variant: "accent", emphasis: "strong", class: "border-accent bg-accent/10" },
152
+ { variant: "success", emphasis: "strong", class: "border-success bg-success/10" },
153
+ { variant: "warning", emphasis: "strong", class: "border-warning bg-warning/10" },
154
+ { variant: "error", emphasis: "strong", class: "border-error bg-error/10" }
155
+ ],
156
+ defaultVariants: { variant: "accent", emphasis: "subtle" }
157
+ });
158
+ var avatar = classVarianceAuthority.cva(
159
+ "relative flex shrink-0 overflow-hidden rounded-pill bg-surface-raised border border-hairline",
160
+ {
161
+ variants: {
162
+ size: {
163
+ sm: "size-8",
164
+ md: "size-10",
165
+ lg: "size-14",
166
+ xl: "size-24"
167
+ }
168
+ },
169
+ defaultVariants: { size: "md" }
170
+ }
171
+ );
172
+
173
+ // src/variants/card.ts
174
+ var CARD_SURFACE = "rounded-card border-hairline bg-surface border";
175
+ var CARD_HOVER = "transition-standard hover:border-hairline-hover";
176
+ var CARD = [
177
+ "group block cursor-pointer",
178
+ CARD_SURFACE,
179
+ CARD_HOVER,
180
+ "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent"
181
+ ];
182
+
183
+ exports.CARD = CARD;
184
+ exports.CARD_HOVER = CARD_HOVER;
185
+ exports.CARD_SURFACE = CARD_SURFACE;
186
+ exports.alertVariants = alert;
187
+ exports.avatarVariants = avatar;
188
+ exports.badgeVariants = badge;
189
+ exports.buttonVariants = button;
190
+ exports.categoryBadgeVariants = category;
191
+ exports.metricBadgeVariants = metric;
192
+ exports.textVariants = text;