@lindaui/tokens 0.2.2 → 0.3.1

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 (4) hide show
  1. package/dist/index.css +1513 -1405
  2. package/llms.txt +3 -0
  3. package/package.json +22 -5
  4. package/src/theme.css +214 -0
package/llms.txt CHANGED
@@ -79,6 +79,9 @@ Toggle with `document.documentElement.dataset.theme = "ocean"` + the `.dark` cla
79
79
  ## Exports & notes for agents
80
80
 
81
81
  - `@lindaui/tokens/css` → the compiled stylesheet (the only thing you import for runtime).
82
+ - `@lindaui/tokens/theme.css` → the raw theme source (tokens + `@theme inline`). Only for
83
+ apps that run their own Tailwind pass and need the custom utilities to resolve there too;
84
+ normal consumers never import this.
82
85
  - `@lindaui/tokens/theme-template.css` → commented theme template to copy (not imported).
83
86
  - No JS entry point. `@lindaui/ui` and `@lindaui/blocks` declare this as a peer.
84
87
  - If a layout looks unstyled ("just text"), the consumer usually forgot the `/css` import.
package/package.json CHANGED
@@ -1,9 +1,20 @@
1
1
  {
2
2
  "name": "@lindaui/tokens",
3
- "version": "0.2.2",
3
+ "version": "0.3.1",
4
4
  "description": "Brand design tokens (OKLCH light/dark) + HeroUI v3 + Tailwind v4 compiled into a single CSS bundle.",
5
5
  "author": "Franco Carballar <francocarballar@gmail.com>",
6
6
  "license": "MIT",
7
+ "homepage": "https://github.com/francocarballar/lindaui#readme",
8
+ "bugs": {
9
+ "url": "https://github.com/francocarballar/lindaui/issues"
10
+ },
11
+ "keywords": [
12
+ "design-tokens",
13
+ "css",
14
+ "tailwindcss",
15
+ "oklch",
16
+ "theme"
17
+ ],
7
18
  "repository": {
8
19
  "type": "git",
9
20
  "url": "git+https://github.com/francocarballar/lindaui.git",
@@ -15,19 +26,25 @@
15
26
  "type": "module",
16
27
  "exports": {
17
28
  "./css": "./dist/index.css",
18
- "./theme-template.css": "./theme-template.css"
29
+ "./theme.css": "./src/theme.css",
30
+ "./theme-template.css": "./theme-template.css",
31
+ "./package.json": "./package.json"
19
32
  },
20
33
  "files": [
21
34
  "dist",
35
+ "src/theme.css",
22
36
  "LICENSE",
23
37
  "README.md",
24
38
  "llms.txt",
25
39
  "theme-template.css"
26
40
  ],
41
+ "sideEffects": [
42
+ "*.css"
43
+ ],
27
44
  "devDependencies": {
28
- "tailwindcss": "^4.0.0",
29
- "@tailwindcss/cli": "^4.0.0",
30
- "@heroui/react": "^3.2.1"
45
+ "@heroui/react": "^3.2.6",
46
+ "@tailwindcss/cli": "^4.3.3",
47
+ "tailwindcss": "^4.3.3"
31
48
  },
32
49
  "scripts": {
33
50
  "build": "node scripts/build-css.mjs",
package/src/theme.css ADDED
@@ -0,0 +1,214 @@
1
+ /* ============================================================
2
+ Design system — tema ThinkInformes (clínico/médico, teal).
3
+ Valores: poc_generator DESIGN.md (OKLCH; light en :root, dark en .dark).
4
+
5
+ ── TRES SISTEMAS DE NOMBRES (no mezclarlos) ──
6
+ A) CANÓNICOS (shadcn-style): única fuente de verdad de color. SOLO estos
7
+ cambian en dark. Ej: --background, --foreground, --primary, --card.
8
+ B) HeroUI v3 (CONTRATO — no renombrar): nombres que @heroui/styles LEE para
9
+ pintar sus componentes. Acá son refs a (A). Ej: --accent, --surface,
10
+ --default, --muted, --danger, --focus.
11
+ C) Utilities Tailwind (CONTRATO — no renombrar): los --color-* del bloque
12
+ @theme inline definen las clases bg-* / text-* / border-* que usan los
13
+ blocks. Ej: --color-primary → bg-primary; --color-muted-foreground →
14
+ text-muted-foreground.
15
+
16
+ ── COLISIONES DE NOMBRE (la fuente de confusión — leer) ──
17
+ --accent = MARCA primaria teal (semántica HeroUI), NO el "accent" neutro
18
+ de shadcn.
19
+ --default = superficie/botón NEUTRO (== --secondary), NO el primario.
20
+ --muted = TEXTO atenuado (== --muted-foreground), NO una superficie.
21
+ La utility text-muted pinta ese gris (CardDescription, etc).
22
+ --secondary = superficie NEUTRA clara (utility bg-secondary). Su texto va
23
+ con text-muted / text-muted-foreground.
24
+ --surface = --card · --overlay = --popover (superficies, nombres HeroUI).
25
+ ============================================================ */
26
+
27
+ :root {
28
+ /* ════════ A) CANÓNICOS (light) — fuente de verdad ════════ */
29
+
30
+ /* Superficies + texto base */
31
+ --background: oklch(1 0 0);
32
+ --foreground: oklch(0.145 0 0);
33
+ --card: oklch(1 0 0);
34
+ --card-foreground: oklch(0.145 0 0);
35
+ --popover: oklch(1 0 0);
36
+ --popover-foreground: oklch(0.145 0 0);
37
+ --secondary: oklch(0.97 0 0); /* superficie neutra */
38
+ --secondary-foreground: oklch(0.205 0 0);
39
+ --muted-foreground: oklch(0.556 0 0); /* texto atenuado */
40
+
41
+ /* Marca */
42
+ --primary: oklch(0.47 0.097 183); /* teal-700 #0F766E */
43
+ --primary-foreground: oklch(0.985 0 0);
44
+
45
+ /* Estado */
46
+ --destructive: oklch(0.577 0.245 27.325);
47
+ --success: oklch(0.59 0.163 148); /* green-600 */
48
+ --success-foreground: oklch(1 0 0);
49
+ --warning: oklch(0.56 0.14 58); /* amber-700 */
50
+ --warning-foreground: oklch(1 0 0);
51
+
52
+ /* Bordes / input / foco / radio */
53
+ --border: oklch(0.922 0 0);
54
+ --input: oklch(0.922 0 0);
55
+ --ring: oklch(0.47 0.097 183);
56
+ --radius: 0.625rem;
57
+
58
+ /* Visor PACS — oscuro SIEMPRE (también en light) */
59
+ --viewer-bg: oklch(0.22 0.027 214);
60
+ --viewer-foreground: oklch(0.88 0.012 220);
61
+ --viewer-border: oklch(0.3 0.025 214);
62
+
63
+ /* Paleta categórica de charts (anclada en la marca teal) */
64
+ --chart-1: oklch(0.55 0.12 183); /* teal (marca) */
65
+ --chart-2: oklch(0.6 0.12 220); /* azul */
66
+ --chart-3: oklch(0.65 0.14 150); /* verde */
67
+ --chart-4: oklch(0.72 0.15 80); /* ámbar */
68
+ --chart-5: oklch(0.62 0.19 25); /* coral */
69
+
70
+ /* ════════ B) HeroUI v3 (refs a A — CONTRATO, no renombrar) ════════
71
+ --background/--foreground/--border/--success/--warning/--radius comparten
72
+ nombre y significado con (A): HeroUI los lee directo, no se repiten acá. */
73
+ --surface: var(--card);
74
+ --surface-foreground: var(--card-foreground);
75
+ --overlay: var(--popover);
76
+ --overlay-foreground: var(--popover-foreground);
77
+ --accent: var(--primary); /* acción primaria = marca teal */
78
+ --accent-foreground: var(--primary-foreground);
79
+ --default: var(--secondary); /* superficie/botón neutro */
80
+ --default-foreground: var(--secondary-foreground);
81
+ --muted: var(--muted-foreground); /* texto atenuado / placeholder */
82
+ --danger: var(--destructive);
83
+ --danger-foreground: var(--primary-foreground);
84
+ --separator: var(--border);
85
+ --focus: var(--ring);
86
+
87
+ /* Campos de formulario (input/textarea/number/search/select/date...) — HeroUI
88
+ los LEE de estos --field-*. Son el ÚNICO punto de override de la superficie
89
+ de un field: los wrappers ergonómicos rechazan `className` a propósito
90
+ (caería en el wrapper RAC, no en el <input> → miss silencioso). Refs a los
91
+ canónicos → siguen la marca y el dark sale gratis. Un consumidor re-skina
92
+ todos los fields pisando estas vars (o los canónicos que referencian). */
93
+ --field-background: var(--background);
94
+ --field-foreground: var(--foreground);
95
+ --field-placeholder: var(--muted-foreground);
96
+ --field-border: var(--input);
97
+ --field-border-hover: var(--input);
98
+ --field-border-focus: var(--ring);
99
+ --field-focus: var(--ring);
100
+ --field-radius: var(--radius);
101
+
102
+ /* Variantes soft on-brand (HeroUI *-soft, ej. Button danger-soft) */
103
+ --accent-soft: color-mix(in oklch, var(--primary) 14%, var(--surface));
104
+ --accent-soft-foreground: var(--primary);
105
+ --danger-soft: color-mix(in oklch, var(--destructive) 14%, var(--surface));
106
+ --danger-soft-foreground: var(--destructive);
107
+ --success-soft: color-mix(in oklch, var(--success) 14%, var(--surface));
108
+ --success-soft-foreground: var(--success);
109
+ --warning-soft: color-mix(in oklch, var(--warning) 16%, var(--surface));
110
+ --warning-soft-foreground: var(--warning);
111
+ }
112
+
113
+ /* ════════ Dark: SOLO redefine los canónicos (A). Las refs HeroUI (B) siguen. ════════ */
114
+ .dark {
115
+ --background: oklch(0.145 0 0);
116
+ --foreground: oklch(0.985 0 0);
117
+ --card: oklch(0.205 0 0);
118
+ --card-foreground: oklch(0.985 0 0);
119
+ --popover: oklch(0.205 0 0);
120
+ --popover-foreground: oklch(0.985 0 0);
121
+ --secondary: oklch(0.269 0 0);
122
+ --secondary-foreground: oklch(0.985 0 0);
123
+ --muted-foreground: oklch(0.708 0 0);
124
+ --primary: oklch(0.79 0.12 181); /* teal-400, más brillante en dark */
125
+ --primary-foreground: oklch(0.205 0 0);
126
+ --destructive: oklch(0.704 0.191 22.216);
127
+ --success: oklch(0.7 0.16 150);
128
+ --success-foreground: oklch(0.205 0 0);
129
+ --warning: oklch(0.75 0.14 70);
130
+ --warning-foreground: oklch(0.205 0 0);
131
+ --border: oklch(1 0 0 / 10%);
132
+ --input: oklch(1 0 0 / 15%);
133
+ --ring: oklch(0.79 0.12 181);
134
+ /* viewer-* sin cambios: el visor queda oscuro en ambos modos */
135
+ /* charts: más brillantes para contraste sobre fondo oscuro */
136
+ --chart-1: oklch(0.7 0.13 183);
137
+ --chart-2: oklch(0.7 0.13 220);
138
+ --chart-3: oklch(0.72 0.15 150);
139
+ --chart-4: oklch(0.78 0.15 80);
140
+ --chart-5: oklch(0.7 0.18 25);
141
+ }
142
+
143
+ /* ════════ C) Utilities Tailwind (@theme inline — CONTRATO de clases) ════════
144
+ Cada --color-X habilita bg-X / text-X / border-X. HeroUI ya mapea las suyas
145
+ (background/foreground/surface/accent/default/muted/...) vía @heroui/styles;
146
+ acá agregamos las shadcn que el consumidor usa y HeroUI no expone igual. */
147
+ @theme inline {
148
+ /* Marca / superficies / estado */
149
+ --color-primary: var(--primary);
150
+ --color-primary-foreground: var(--primary-foreground);
151
+ --color-secondary: var(--secondary);
152
+ --color-secondary-foreground: var(--secondary-foreground);
153
+ --color-card: var(--card);
154
+ --color-card-foreground: var(--card-foreground);
155
+ --color-popover: var(--popover);
156
+ --color-popover-foreground: var(--popover-foreground);
157
+ --color-destructive: var(--destructive);
158
+ --color-input: var(--input);
159
+ --color-ring: var(--ring);
160
+
161
+ /* Texto atenuado → text-muted-foreground.
162
+ NO declarar --color-muted: HeroUI ya lo usa para `text-muted` (= var(--muted)
163
+ = gris legible). Pisarlo con una superficie deja el texto invisible. Para
164
+ superficie neutra usar bg-secondary; texto secundario = text-muted/-foreground. */
165
+ --color-muted-foreground: var(--muted-foreground);
166
+
167
+ /* Visor: bg-viewer-bg / text-viewer-foreground / border-viewer-border
168
+ (mismos nombres que el source del poc → migra verbatim). */
169
+ --color-viewer-bg: var(--viewer-bg);
170
+ --color-viewer-foreground: var(--viewer-foreground);
171
+ --color-viewer-border: var(--viewer-border);
172
+
173
+ /* Charts: fill-chart-1 / stroke-chart-1 / bg-chart-1 ... (paleta categórica) */
174
+ --color-chart-1: var(--chart-1);
175
+ --color-chart-2: var(--chart-2);
176
+ --color-chart-3: var(--chart-3);
177
+ --color-chart-4: var(--chart-4);
178
+ --color-chart-5: var(--chart-5);
179
+
180
+ /* Radius (escala DESIGN.md) */
181
+ --radius-sm: calc(var(--radius) * 0.6);
182
+ --radius-md: calc(var(--radius) * 0.8);
183
+ --radius-lg: var(--radius);
184
+ --radius-xl: calc(var(--radius) * 1.4);
185
+ --radius-2xl: calc(var(--radius) * 1.8);
186
+ --radius-3xl: calc(var(--radius) * 2.2);
187
+ --radius-4xl: calc(var(--radius) * 2.6);
188
+
189
+ /* Tipografía (el consumidor inyecta --font-* vía next/font; fallbacks acá) */
190
+ --font-sans: var(--font-atkinson, var(--font-lato, ui-sans-serif, system-ui, sans-serif));
191
+ --font-mono: var(--font-geist-mono, ui-monospace, monospace);
192
+ --font-heading: var(--font-sans);
193
+ }
194
+
195
+ /* Base raíz 18px (público médico 60+); todo el escalado rem sube proporcional. */
196
+ @layer base {
197
+ html {
198
+ font-size: 18px;
199
+ }
200
+ }
201
+
202
+ /* ════════ Animaciones de recording-overlay (idénticas al source poc_generator) ════════
203
+ El block @lindaui/blocks/recording-overlay consume estas animaciones POR NOMBRE:
204
+ ti-rec-pulse / ti-rec-blink como clases, ti-wf inline en el waveform (usa --wfmax),
205
+ ti-fade en el root. Sin estos @keyframes el overlay se renderiza estático (las
206
+ clases existen pero no hay animación). Van unlayered para no depender del escaneo
207
+ Tailwind (son CSS literal, no utilities). */
208
+ @keyframes ti-rec-pulse { 0% { transform: scale(0.62); opacity: 0.7; } 100% { transform: scale(1.25); opacity: 0; } }
209
+ @keyframes ti-rec-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
210
+ @keyframes ti-wf { 0%, 100% { height: 4px; } 50% { height: var(--wfmax); } }
211
+ @keyframes ti-fade { from { opacity: 0; } }
212
+ .ti-rec-pulse { animation: ti-rec-pulse 1.8s ease-out infinite; }
213
+ .ti-rec-blink { animation: ti-rec-blink 1.2s ease-in-out infinite; }
214
+ .ti-fade { animation: ti-fade 0.25s ease both; }