@satellatickets/tokens 0.0.0-stage → 0.0.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/LICENSE +21 -0
- package/README.md +76 -3
- package/dist/index.d.ts +373 -0
- package/dist/index.js +746 -0
- package/dist/native/themes.ts +731 -0
- package/dist/types.ts +485 -0
- package/dist/web/tokens.css +239 -0
- package/package.json +45 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Roberto Rodriguez Carbonell
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,4 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @satellatickets/tokens
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Design tokens de satella-ui en formato [DTCG 2025.10](https://www.designtokens.org/tr/2025.10/format/), con salidas para web (variables CSS) y React Native (objetos de tema tipados). Es la base de `@satellatickets/ui` y puede usarse solo (emails, documentación, otros proyectos).
|
|
4
|
+
|
|
5
|
+
## Uso
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
// Web: variables CSS, una vez por app
|
|
9
|
+
import '@satellatickets/tokens/tokens.css';
|
|
10
|
+
// Temas por atributo: <html data-theme="dark" data-brand="acme">
|
|
11
|
+
|
|
12
|
+
// Web o React Native: temas resueltos y tipos
|
|
13
|
+
import { themes, brands, type Theme, type TokenName } from '@satellatickets/tokens';
|
|
14
|
+
const t: Theme = themes.light;
|
|
15
|
+
t.color.action.primary; // "#6c4cf5"
|
|
16
|
+
t.space[4]; // 16
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
En las apps, `UIProvider` de `@satellatickets/ui` se encarga de aplicar tema y marca (ADR-010).
|
|
20
|
+
|
|
21
|
+
## Estructura
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
src/
|
|
25
|
+
├── primitives/ paleta (`palette.*`, nunca se emite) y escalas: space, radius, font, shadow, duration, zIndex
|
|
26
|
+
├── semantic/ light.tokens.json y dark.tokens.json: `color.*` con significado de uso
|
|
27
|
+
├── brands/ overrides por marca (ver brands/README.md)
|
|
28
|
+
├── contrast-pairs.json parejas texto/fondo que deben cumplir WCAG AA
|
|
29
|
+
└── pipeline/ build: Style Dictionary v5 + conversores propios
|
|
30
|
+
build.ts genera dist/ (ver abajo)
|
|
31
|
+
schemas/dtcg/2025.10 JSON Schema oficial, para validar los ficheros en los tests
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Tres niveles (ADR-005): los componentes consumen **solo** tokens emitidos (`color.bg.surface`, `space.4`, `radius.md`…), nunca `palette.*` ni valores literales.
|
|
35
|
+
|
|
36
|
+
La paleta y la capa semántica oscura reproducen el producto real (`staging.satellatickets.com`): acento violeta `#6c4cf5`, grises "ink", feedback mint/ámbar/coral/cian, fuentes Unbounded (titulares), Hanken Grotesk (texto) e IBM Plex Mono (etiquetas). El producto no tiene tema claro: el tema `light` es una propuesta con los mismos matices, verificada con las mismas parejas de contraste. Cada token de `palette.*` indica en su `$description` de qué variable de Satella procede o cómo se ha derivado. Las marcas `admin` y `organizer` viven en `src/brands/` (ver su README).
|
|
37
|
+
|
|
38
|
+
Además de color, tipografía, espaciado, radios y sombras, hay dos escalas pensadas para los controles: `size.control.{sm,md,lg}` (altura de botones y campos: 36, 44 y 52 px) y `borderWidth.{thin,thick}` (1 y 2 px; `thick` es el anillo de foco). Los componentes las usan en lugar de valores literales (ADR-005).
|
|
39
|
+
|
|
40
|
+
## Salidas (`pnpm build`)
|
|
41
|
+
|
|
42
|
+
| Fichero | Contenido |
|
|
43
|
+
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| `dist/web/tokens.css` | `:root, [data-theme="light"]` con todos los tokens; `[data-theme="dark"]` solo con lo que cambia; un bloque `[data-brand="…"]` por marca |
|
|
45
|
+
| `dist/native/themes.ts` | `themes.light`, `themes.dark`, `brands` (overrides por marca y tema), `themeNames`, `brandNames`, `tokenNames`, `cssVariables` |
|
|
46
|
+
| `dist/types.ts` | `Theme`, `ThemeOverrides`, `ThemeName`, `BrandName`, `TokenName`, `CssVariableName`, `BoxShadow`, `FontWeight` |
|
|
47
|
+
| `dist/index.js` | Compilación de `src/index.ts`, que reexporta los dos anteriores |
|
|
48
|
+
|
|
49
|
+
`pnpm dev` deja `build.ts` en modo watch sobre `src/`.
|
|
50
|
+
|
|
51
|
+
## Reglas de conversión
|
|
52
|
+
|
|
53
|
+
| Tipo DTCG | CSS | React Native |
|
|
54
|
+
| ------------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
55
|
+
| `color` | `#rrggbb`, o `#rrggbbaa` si tiene alpha | igual |
|
|
56
|
+
| `dimension` | px → rem (÷16); `$extensions["com.satellatickets.tokens"].css.unit = "px"` mantiene px | número en puntos (rem × 16) |
|
|
57
|
+
| `fontFamily` | pila completa, con comillas donde hace falta | primera familia; `undefined` (fuente del sistema) si la pila empieza por una genérica; la extensión `native.fontFamily` la fija |
|
|
58
|
+
| `fontWeight` | número | cadena (`"600"`) |
|
|
59
|
+
| `duration` | con su unidad (`200ms`) | milisegundos |
|
|
60
|
+
| `number` | tal cual | tal cual |
|
|
61
|
+
| `shadow` | `box-shadow`, en px | array `boxShadow` de la Nueva Arquitectura |
|
|
62
|
+
|
|
63
|
+
Solo se soporta el espacio de color `srgb`; cada color lleva `hex` de respaldo y el test comprueba que coincide con los componentes.
|
|
64
|
+
|
|
65
|
+
## Añadir o cambiar tokens
|
|
66
|
+
|
|
67
|
+
1. Edita el `*.tokens.json` correspondiente. Un token semántico de color nuevo se añade a **los dos** temas; si falta en uno, el build falla.
|
|
68
|
+
2. Si es un color de texto o de interfaz, añade su pareja a `contrast-pairs.json`.
|
|
69
|
+
3. `pnpm test` (esquema DTCG, completitud, contraste, salidas) y `pnpm build`.
|
|
70
|
+
4. Changeset: renombrar o eliminar un token semántico es breaking (ADR-025); un token nuevo es `minor`.
|
|
71
|
+
|
|
72
|
+
## Tests
|
|
73
|
+
|
|
74
|
+
- **DTCG**: cada fichero valida contra el JSON Schema oficial de la 2025.10.
|
|
75
|
+
- **Completitud**: todos los temas definen los mismos tokens; cada marca cubre todos los tokens de cada tema sin inventar ninguno.
|
|
76
|
+
- **Contraste**: cada pareja de `contrast-pairs.json` cumple AA (4.5:1 texto, 3:1 interfaz) en todos los temas y marcas.
|
|
77
|
+
- **Salidas**: la forma de los tres ficheros generados, con una marca de ejemplo que vive solo en los fixtures de test.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
//#region dist/types.d.ts
|
|
2
|
+
type ThemeName = "light" | "dark";
|
|
3
|
+
type BrandName = "admin" | "organizer";
|
|
4
|
+
/** Nombre de cada token emitido, con la ruta separada por puntos. */
|
|
5
|
+
type TokenName = "color.bg.canvas" | "color.bg.surface" | "color.bg.elevated" | "color.bg.subtle" | "color.bg.muted" | "color.bg.overlay" | "color.bg.inverse" | "color.text.primary" | "color.text.secondary" | "color.text.muted" | "color.text.disabled" | "color.text.inverse" | "color.text.onPrimary" | "color.text.onDanger" | "color.text.link" | "color.border.default" | "color.border.strong" | "color.border.focus" | "color.action.primary" | "color.action.primaryHover" | "color.action.primaryActive" | "color.action.secondary" | "color.action.secondaryHover" | "color.action.secondaryActive" | "color.action.danger" | "color.action.dangerHover" | "color.action.dangerActive" | "color.action.disabled" | "color.accent.bg" | "color.accent.text" | "color.feedback.success.bg" | "color.feedback.success.border" | "color.feedback.success.text" | "color.feedback.success.icon" | "color.feedback.warning.bg" | "color.feedback.warning.border" | "color.feedback.warning.text" | "color.feedback.warning.icon" | "color.feedback.danger.bg" | "color.feedback.danger.border" | "color.feedback.danger.text" | "color.feedback.danger.icon" | "color.feedback.info.bg" | "color.feedback.info.border" | "color.feedback.info.text" | "color.feedback.info.icon" | "space.0" | "space.1" | "space.2" | "space.3" | "space.4" | "space.5" | "space.6" | "space.8" | "space.10" | "space.12" | "space.16" | "space.20" | "space.24" | "size.control.sm" | "size.control.md" | "size.control.lg" | "radius.none" | "radius.xs" | "radius.sm" | "radius.md" | "radius.lg" | "radius.xl" | "radius.full" | "borderWidth.thin" | "borderWidth.thick" | "font.family.display" | "font.family.sans" | "font.family.mono" | "font.size.xs" | "font.size.sm" | "font.size.md" | "font.size.lg" | "font.size.xl" | "font.size.xxl" | "font.size.xxxl" | "font.size.display" | "font.size.hero" | "font.lineHeight.xs" | "font.lineHeight.sm" | "font.lineHeight.md" | "font.lineHeight.lg" | "font.lineHeight.xl" | "font.lineHeight.xxl" | "font.lineHeight.xxxl" | "font.lineHeight.display" | "font.lineHeight.hero" | "font.weight.regular" | "font.weight.medium" | "font.weight.semibold" | "font.weight.bold" | "font.weight.extrabold" | "shadow.sm" | "shadow.md" | "shadow.lg" | "shadow.glow" | "duration.instant" | "duration.fast" | "duration.normal" | "duration.slow" | "zIndex.base" | "zIndex.raised" | "zIndex.dropdown" | "zIndex.sticky" | "zIndex.overlay" | "zIndex.modal" | "zIndex.popover" | "zIndex.toast";
|
|
6
|
+
/** Variable CSS de cada token en `tokens.css`. */
|
|
7
|
+
type CssVariableName = "--color-bg-canvas" | "--color-bg-surface" | "--color-bg-elevated" | "--color-bg-subtle" | "--color-bg-muted" | "--color-bg-overlay" | "--color-bg-inverse" | "--color-text-primary" | "--color-text-secondary" | "--color-text-muted" | "--color-text-disabled" | "--color-text-inverse" | "--color-text-on-primary" | "--color-text-on-danger" | "--color-text-link" | "--color-border-default" | "--color-border-strong" | "--color-border-focus" | "--color-action-primary" | "--color-action-primary-hover" | "--color-action-primary-active" | "--color-action-secondary" | "--color-action-secondary-hover" | "--color-action-secondary-active" | "--color-action-danger" | "--color-action-danger-hover" | "--color-action-danger-active" | "--color-action-disabled" | "--color-accent-bg" | "--color-accent-text" | "--color-feedback-success-bg" | "--color-feedback-success-border" | "--color-feedback-success-text" | "--color-feedback-success-icon" | "--color-feedback-warning-bg" | "--color-feedback-warning-border" | "--color-feedback-warning-text" | "--color-feedback-warning-icon" | "--color-feedback-danger-bg" | "--color-feedback-danger-border" | "--color-feedback-danger-text" | "--color-feedback-danger-icon" | "--color-feedback-info-bg" | "--color-feedback-info-border" | "--color-feedback-info-text" | "--color-feedback-info-icon" | "--space-0" | "--space-1" | "--space-2" | "--space-3" | "--space-4" | "--space-5" | "--space-6" | "--space-8" | "--space-10" | "--space-12" | "--space-16" | "--space-20" | "--space-24" | "--size-control-sm" | "--size-control-md" | "--size-control-lg" | "--radius-none" | "--radius-xs" | "--radius-sm" | "--radius-md" | "--radius-lg" | "--radius-xl" | "--radius-full" | "--border-width-thin" | "--border-width-thick" | "--font-family-display" | "--font-family-sans" | "--font-family-mono" | "--font-size-xs" | "--font-size-sm" | "--font-size-md" | "--font-size-lg" | "--font-size-xl" | "--font-size-xxl" | "--font-size-xxxl" | "--font-size-display" | "--font-size-hero" | "--font-line-height-xs" | "--font-line-height-sm" | "--font-line-height-md" | "--font-line-height-lg" | "--font-line-height-xl" | "--font-line-height-xxl" | "--font-line-height-xxxl" | "--font-line-height-display" | "--font-line-height-hero" | "--font-weight-regular" | "--font-weight-medium" | "--font-weight-semibold" | "--font-weight-bold" | "--font-weight-extrabold" | "--shadow-sm" | "--shadow-md" | "--shadow-lg" | "--shadow-glow" | "--duration-instant" | "--duration-fast" | "--duration-normal" | "--duration-slow" | "--z-index-base" | "--z-index-raised" | "--z-index-dropdown" | "--z-index-sticky" | "--z-index-overlay" | "--z-index-modal" | "--z-index-popover" | "--z-index-toast";
|
|
8
|
+
type FontWeight = '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
9
|
+
/** Sombra en la forma del `boxShadow` de React Native (Nueva Arquitectura). */
|
|
10
|
+
interface BoxShadow {
|
|
11
|
+
offsetX: number;
|
|
12
|
+
offsetY: number;
|
|
13
|
+
blurRadius: number;
|
|
14
|
+
spreadDistance: number;
|
|
15
|
+
color: string;
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Tema resuelto: valores nativos de todos los tokens emitidos. */
|
|
19
|
+
interface Theme {
|
|
20
|
+
color: {
|
|
21
|
+
bg: {
|
|
22
|
+
/** Fondo de página. */
|
|
23
|
+
canvas: string;
|
|
24
|
+
/** Tarjetas, paneles y campos de formulario. */
|
|
25
|
+
surface: string;
|
|
26
|
+
/** Modales, menús y popovers. */
|
|
27
|
+
elevated: string;
|
|
28
|
+
/** Fondos de hover y filas alternas. */
|
|
29
|
+
subtle: string;
|
|
30
|
+
/** Fondos pulsados, seleccionados o de controles deshabilitados. */
|
|
31
|
+
muted: string;
|
|
32
|
+
/** Velo bajo modales y hojas. */
|
|
33
|
+
overlay: string;
|
|
34
|
+
/** Fondos invertidos: tooltips y toasts. */
|
|
35
|
+
inverse: string;
|
|
36
|
+
};
|
|
37
|
+
text: {
|
|
38
|
+
/** Texto principal. */
|
|
39
|
+
primary: string;
|
|
40
|
+
/** Texto de apoyo. */
|
|
41
|
+
secondary: string;
|
|
42
|
+
/** Placeholders y notas; cumple AA sobre cualquier fondo. */
|
|
43
|
+
muted: string;
|
|
44
|
+
/** Texto de controles deshabilitados (sin exigencia de contraste). */
|
|
45
|
+
disabled: string;
|
|
46
|
+
/** Texto sobre `bg.inverse`. */
|
|
47
|
+
inverse: string;
|
|
48
|
+
/** Texto sobre `action.primary` en todos sus estados. */
|
|
49
|
+
onPrimary: string;
|
|
50
|
+
/** Texto sobre `action.danger` en todos sus estados. */
|
|
51
|
+
onDanger: string;
|
|
52
|
+
/** Enlaces. */
|
|
53
|
+
link: string;
|
|
54
|
+
};
|
|
55
|
+
border: {
|
|
56
|
+
/** Separadores y bordes decorativos. */
|
|
57
|
+
default: string;
|
|
58
|
+
/** Bordes de controles; contraste 3:1 con el fondo. */
|
|
59
|
+
strong: string;
|
|
60
|
+
/** Anillo de foco visible. */
|
|
61
|
+
focus: string;
|
|
62
|
+
};
|
|
63
|
+
action: {
|
|
64
|
+
/** Acción principal. */
|
|
65
|
+
primary: string;
|
|
66
|
+
/** Acción principal, hover. */
|
|
67
|
+
primaryHover: string;
|
|
68
|
+
/** Acción principal, pulsada. */
|
|
69
|
+
primaryActive: string;
|
|
70
|
+
/** Acción secundaria; el texto es `text.primary`. */
|
|
71
|
+
secondary: string;
|
|
72
|
+
/** Acción secundaria, hover. */
|
|
73
|
+
secondaryHover: string;
|
|
74
|
+
/** Acción secundaria, pulsada. */
|
|
75
|
+
secondaryActive: string;
|
|
76
|
+
/** Acción destructiva. */
|
|
77
|
+
danger: string;
|
|
78
|
+
/** Acción destructiva, hover. */
|
|
79
|
+
dangerHover: string;
|
|
80
|
+
/** Acción destructiva, pulsada. */
|
|
81
|
+
dangerActive: string;
|
|
82
|
+
/** Fondo de acciones deshabilitadas; el texto es `text.disabled`. */
|
|
83
|
+
disabled: string;
|
|
84
|
+
};
|
|
85
|
+
accent: {
|
|
86
|
+
/** Fondo teñido con el color de marca: chips seleccionados, destacados. */
|
|
87
|
+
bg: string;
|
|
88
|
+
/** Texto e iconos sobre `accent.bg`. */
|
|
89
|
+
text: string;
|
|
90
|
+
};
|
|
91
|
+
feedback: {
|
|
92
|
+
success: {
|
|
93
|
+
/** Fondo de mensajes de éxito. */
|
|
94
|
+
bg: string;
|
|
95
|
+
/** Borde de mensajes de éxito (mint.400 al 40 %). */
|
|
96
|
+
border: string;
|
|
97
|
+
/** Texto sobre `feedback.success.bg`. */
|
|
98
|
+
text: string;
|
|
99
|
+
/** Icono de éxito; 3:1 sobre `bg.surface` y `feedback.success.bg`. */
|
|
100
|
+
icon: string;
|
|
101
|
+
};
|
|
102
|
+
warning: {
|
|
103
|
+
/** Fondo de avisos. */
|
|
104
|
+
bg: string;
|
|
105
|
+
/** Borde de avisos (amber.400 al 40 %). */
|
|
106
|
+
border: string;
|
|
107
|
+
/** Texto sobre `feedback.warning.bg`. */
|
|
108
|
+
text: string;
|
|
109
|
+
/** Icono de aviso. */
|
|
110
|
+
icon: string;
|
|
111
|
+
};
|
|
112
|
+
danger: {
|
|
113
|
+
/** Fondo de errores. */
|
|
114
|
+
bg: string;
|
|
115
|
+
/** Borde de errores (coral.400 al 40 %). */
|
|
116
|
+
border: string;
|
|
117
|
+
/** Texto sobre `feedback.danger.bg`. */
|
|
118
|
+
text: string;
|
|
119
|
+
/** Icono de error. */
|
|
120
|
+
icon: string;
|
|
121
|
+
};
|
|
122
|
+
info: {
|
|
123
|
+
/** Fondo informativo. */
|
|
124
|
+
bg: string;
|
|
125
|
+
/** Borde informativo (sky.400 al 40 %). */
|
|
126
|
+
border: string;
|
|
127
|
+
/** Texto sobre `feedback.info.bg`. */
|
|
128
|
+
text: string;
|
|
129
|
+
/** Icono informativo. */
|
|
130
|
+
icon: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
space: {
|
|
135
|
+
0: number;
|
|
136
|
+
1: number;
|
|
137
|
+
2: number;
|
|
138
|
+
3: number;
|
|
139
|
+
4: number;
|
|
140
|
+
5: number;
|
|
141
|
+
6: number;
|
|
142
|
+
8: number;
|
|
143
|
+
10: number;
|
|
144
|
+
12: number;
|
|
145
|
+
16: number;
|
|
146
|
+
20: number;
|
|
147
|
+
24: number;
|
|
148
|
+
};
|
|
149
|
+
size: {
|
|
150
|
+
control: {
|
|
151
|
+
/** Control compacto: barras de herramientas y tablas. */
|
|
152
|
+
sm: number;
|
|
153
|
+
/** Control por defecto y área táctil mínima en móvil. */
|
|
154
|
+
md: number;
|
|
155
|
+
/** Control destacado: llamadas a la acción principales. */
|
|
156
|
+
lg: number;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
radius: {
|
|
160
|
+
none: number;
|
|
161
|
+
xs: number;
|
|
162
|
+
sm: number;
|
|
163
|
+
md: number;
|
|
164
|
+
lg: number;
|
|
165
|
+
xl: number;
|
|
166
|
+
full: number;
|
|
167
|
+
};
|
|
168
|
+
borderWidth: {
|
|
169
|
+
/** Bordes de controles, tarjetas y separadores. */
|
|
170
|
+
thin: number;
|
|
171
|
+
/** Anillo de foco y bordes enfatizados. */
|
|
172
|
+
thick: number;
|
|
173
|
+
};
|
|
174
|
+
font: {
|
|
175
|
+
family: {
|
|
176
|
+
/** Titulares y cifras destacadas. */
|
|
177
|
+
display: string | undefined;
|
|
178
|
+
/** Texto de interfaz. */
|
|
179
|
+
sans: string | undefined;
|
|
180
|
+
/** Etiquetas en mayúsculas, fechas, precios y código. */
|
|
181
|
+
mono: string | undefined;
|
|
182
|
+
};
|
|
183
|
+
size: {
|
|
184
|
+
xs: number;
|
|
185
|
+
sm: number;
|
|
186
|
+
md: number;
|
|
187
|
+
lg: number;
|
|
188
|
+
xl: number;
|
|
189
|
+
xxl: number;
|
|
190
|
+
xxxl: number;
|
|
191
|
+
/** Titular de página (h1). */
|
|
192
|
+
display: number;
|
|
193
|
+
/** Titular de portada y tarjetas destacadas. */
|
|
194
|
+
hero: number;
|
|
195
|
+
};
|
|
196
|
+
lineHeight: {
|
|
197
|
+
xs: number;
|
|
198
|
+
sm: number;
|
|
199
|
+
md: number;
|
|
200
|
+
lg: number;
|
|
201
|
+
xl: number;
|
|
202
|
+
xxl: number;
|
|
203
|
+
xxxl: number;
|
|
204
|
+
display: number;
|
|
205
|
+
hero: number;
|
|
206
|
+
};
|
|
207
|
+
weight: {
|
|
208
|
+
regular: FontWeight;
|
|
209
|
+
medium: FontWeight;
|
|
210
|
+
semibold: FontWeight;
|
|
211
|
+
bold: FontWeight;
|
|
212
|
+
extrabold: FontWeight;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
shadow: {
|
|
216
|
+
/** Tarjetas (--shadow-card). */
|
|
217
|
+
sm: BoxShadow[];
|
|
218
|
+
/** Popovers y menús (--shadow-popover). */
|
|
219
|
+
md: BoxShadow[];
|
|
220
|
+
/** Modales y hojas (--shadow-modal). */
|
|
221
|
+
lg: BoxShadow[];
|
|
222
|
+
/** Resplandor con el color de marca para elementos destacados (--shadow-glow). Cada marca lo sobrescribe con su acento. */
|
|
223
|
+
glow: BoxShadow[];
|
|
224
|
+
};
|
|
225
|
+
duration: {
|
|
226
|
+
instant: number;
|
|
227
|
+
fast: number;
|
|
228
|
+
normal: number;
|
|
229
|
+
slow: number;
|
|
230
|
+
};
|
|
231
|
+
zIndex: {
|
|
232
|
+
base: number;
|
|
233
|
+
raised: number;
|
|
234
|
+
dropdown: number;
|
|
235
|
+
sticky: number;
|
|
236
|
+
overlay: number;
|
|
237
|
+
modal: number;
|
|
238
|
+
popover: number;
|
|
239
|
+
toast: number;
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
type DeepPartial<T> = { [K in keyof T]?: T[K] extends readonly unknown[] ? T[K] : T[K] extends object ? DeepPartial<T[K]> : T[K]; };
|
|
243
|
+
/** Subconjunto de tokens que una marca sobrescribe sobre un tema. */
|
|
244
|
+
type ThemeOverrides = DeepPartial<Theme>;
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region dist/native/themes.d.ts
|
|
247
|
+
export declare const themeNames: readonly ["light", "dark"];
|
|
248
|
+
export declare const brandNames: readonly ["admin", "organizer"];
|
|
249
|
+
/** Nombres de todos los tokens emitidos, en el orden de las salidas. */
|
|
250
|
+
export declare const tokenNames: readonly ["color.bg.canvas", "color.bg.surface", "color.bg.elevated", "color.bg.subtle", "color.bg.muted", "color.bg.overlay", "color.bg.inverse", "color.text.primary", "color.text.secondary", "color.text.muted", "color.text.disabled", "color.text.inverse", "color.text.onPrimary", "color.text.onDanger", "color.text.link", "color.border.default", "color.border.strong", "color.border.focus", "color.action.primary", "color.action.primaryHover", "color.action.primaryActive", "color.action.secondary", "color.action.secondaryHover", "color.action.secondaryActive", "color.action.danger", "color.action.dangerHover", "color.action.dangerActive", "color.action.disabled", "color.accent.bg", "color.accent.text", "color.feedback.success.bg", "color.feedback.success.border", "color.feedback.success.text", "color.feedback.success.icon", "color.feedback.warning.bg", "color.feedback.warning.border", "color.feedback.warning.text", "color.feedback.warning.icon", "color.feedback.danger.bg", "color.feedback.danger.border", "color.feedback.danger.text", "color.feedback.danger.icon", "color.feedback.info.bg", "color.feedback.info.border", "color.feedback.info.text", "color.feedback.info.icon", "space.0", "space.1", "space.2", "space.3", "space.4", "space.5", "space.6", "space.8", "space.10", "space.12", "space.16", "space.20", "space.24", "size.control.sm", "size.control.md", "size.control.lg", "radius.none", "radius.xs", "radius.sm", "radius.md", "radius.lg", "radius.xl", "radius.full", "borderWidth.thin", "borderWidth.thick", "font.family.display", "font.family.sans", "font.family.mono", "font.size.xs", "font.size.sm", "font.size.md", "font.size.lg", "font.size.xl", "font.size.xxl", "font.size.xxxl", "font.size.display", "font.size.hero", "font.lineHeight.xs", "font.lineHeight.sm", "font.lineHeight.md", "font.lineHeight.lg", "font.lineHeight.xl", "font.lineHeight.xxl", "font.lineHeight.xxxl", "font.lineHeight.display", "font.lineHeight.hero", "font.weight.regular", "font.weight.medium", "font.weight.semibold", "font.weight.bold", "font.weight.extrabold", "shadow.sm", "shadow.md", "shadow.lg", "shadow.glow", "duration.instant", "duration.fast", "duration.normal", "duration.slow", "zIndex.base", "zIndex.raised", "zIndex.dropdown", "zIndex.sticky", "zIndex.overlay", "zIndex.modal", "zIndex.popover", "zIndex.toast"];
|
|
251
|
+
/** Variable CSS que corresponde a cada token en `tokens.css`. */
|
|
252
|
+
export declare const cssVariables: {
|
|
253
|
+
readonly "color.bg.canvas": "--color-bg-canvas";
|
|
254
|
+
readonly "color.bg.surface": "--color-bg-surface";
|
|
255
|
+
readonly "color.bg.elevated": "--color-bg-elevated";
|
|
256
|
+
readonly "color.bg.subtle": "--color-bg-subtle";
|
|
257
|
+
readonly "color.bg.muted": "--color-bg-muted";
|
|
258
|
+
readonly "color.bg.overlay": "--color-bg-overlay";
|
|
259
|
+
readonly "color.bg.inverse": "--color-bg-inverse";
|
|
260
|
+
readonly "color.text.primary": "--color-text-primary";
|
|
261
|
+
readonly "color.text.secondary": "--color-text-secondary";
|
|
262
|
+
readonly "color.text.muted": "--color-text-muted";
|
|
263
|
+
readonly "color.text.disabled": "--color-text-disabled";
|
|
264
|
+
readonly "color.text.inverse": "--color-text-inverse";
|
|
265
|
+
readonly "color.text.onPrimary": "--color-text-on-primary";
|
|
266
|
+
readonly "color.text.onDanger": "--color-text-on-danger";
|
|
267
|
+
readonly "color.text.link": "--color-text-link";
|
|
268
|
+
readonly "color.border.default": "--color-border-default";
|
|
269
|
+
readonly "color.border.strong": "--color-border-strong";
|
|
270
|
+
readonly "color.border.focus": "--color-border-focus";
|
|
271
|
+
readonly "color.action.primary": "--color-action-primary";
|
|
272
|
+
readonly "color.action.primaryHover": "--color-action-primary-hover";
|
|
273
|
+
readonly "color.action.primaryActive": "--color-action-primary-active";
|
|
274
|
+
readonly "color.action.secondary": "--color-action-secondary";
|
|
275
|
+
readonly "color.action.secondaryHover": "--color-action-secondary-hover";
|
|
276
|
+
readonly "color.action.secondaryActive": "--color-action-secondary-active";
|
|
277
|
+
readonly "color.action.danger": "--color-action-danger";
|
|
278
|
+
readonly "color.action.dangerHover": "--color-action-danger-hover";
|
|
279
|
+
readonly "color.action.dangerActive": "--color-action-danger-active";
|
|
280
|
+
readonly "color.action.disabled": "--color-action-disabled";
|
|
281
|
+
readonly "color.accent.bg": "--color-accent-bg";
|
|
282
|
+
readonly "color.accent.text": "--color-accent-text";
|
|
283
|
+
readonly "color.feedback.success.bg": "--color-feedback-success-bg";
|
|
284
|
+
readonly "color.feedback.success.border": "--color-feedback-success-border";
|
|
285
|
+
readonly "color.feedback.success.text": "--color-feedback-success-text";
|
|
286
|
+
readonly "color.feedback.success.icon": "--color-feedback-success-icon";
|
|
287
|
+
readonly "color.feedback.warning.bg": "--color-feedback-warning-bg";
|
|
288
|
+
readonly "color.feedback.warning.border": "--color-feedback-warning-border";
|
|
289
|
+
readonly "color.feedback.warning.text": "--color-feedback-warning-text";
|
|
290
|
+
readonly "color.feedback.warning.icon": "--color-feedback-warning-icon";
|
|
291
|
+
readonly "color.feedback.danger.bg": "--color-feedback-danger-bg";
|
|
292
|
+
readonly "color.feedback.danger.border": "--color-feedback-danger-border";
|
|
293
|
+
readonly "color.feedback.danger.text": "--color-feedback-danger-text";
|
|
294
|
+
readonly "color.feedback.danger.icon": "--color-feedback-danger-icon";
|
|
295
|
+
readonly "color.feedback.info.bg": "--color-feedback-info-bg";
|
|
296
|
+
readonly "color.feedback.info.border": "--color-feedback-info-border";
|
|
297
|
+
readonly "color.feedback.info.text": "--color-feedback-info-text";
|
|
298
|
+
readonly "color.feedback.info.icon": "--color-feedback-info-icon";
|
|
299
|
+
readonly "space.0": "--space-0";
|
|
300
|
+
readonly "space.1": "--space-1";
|
|
301
|
+
readonly "space.2": "--space-2";
|
|
302
|
+
readonly "space.3": "--space-3";
|
|
303
|
+
readonly "space.4": "--space-4";
|
|
304
|
+
readonly "space.5": "--space-5";
|
|
305
|
+
readonly "space.6": "--space-6";
|
|
306
|
+
readonly "space.8": "--space-8";
|
|
307
|
+
readonly "space.10": "--space-10";
|
|
308
|
+
readonly "space.12": "--space-12";
|
|
309
|
+
readonly "space.16": "--space-16";
|
|
310
|
+
readonly "space.20": "--space-20";
|
|
311
|
+
readonly "space.24": "--space-24";
|
|
312
|
+
readonly "size.control.sm": "--size-control-sm";
|
|
313
|
+
readonly "size.control.md": "--size-control-md";
|
|
314
|
+
readonly "size.control.lg": "--size-control-lg";
|
|
315
|
+
readonly "radius.none": "--radius-none";
|
|
316
|
+
readonly "radius.xs": "--radius-xs";
|
|
317
|
+
readonly "radius.sm": "--radius-sm";
|
|
318
|
+
readonly "radius.md": "--radius-md";
|
|
319
|
+
readonly "radius.lg": "--radius-lg";
|
|
320
|
+
readonly "radius.xl": "--radius-xl";
|
|
321
|
+
readonly "radius.full": "--radius-full";
|
|
322
|
+
readonly "borderWidth.thin": "--border-width-thin";
|
|
323
|
+
readonly "borderWidth.thick": "--border-width-thick";
|
|
324
|
+
readonly "font.family.display": "--font-family-display";
|
|
325
|
+
readonly "font.family.sans": "--font-family-sans";
|
|
326
|
+
readonly "font.family.mono": "--font-family-mono";
|
|
327
|
+
readonly "font.size.xs": "--font-size-xs";
|
|
328
|
+
readonly "font.size.sm": "--font-size-sm";
|
|
329
|
+
readonly "font.size.md": "--font-size-md";
|
|
330
|
+
readonly "font.size.lg": "--font-size-lg";
|
|
331
|
+
readonly "font.size.xl": "--font-size-xl";
|
|
332
|
+
readonly "font.size.xxl": "--font-size-xxl";
|
|
333
|
+
readonly "font.size.xxxl": "--font-size-xxxl";
|
|
334
|
+
readonly "font.size.display": "--font-size-display";
|
|
335
|
+
readonly "font.size.hero": "--font-size-hero";
|
|
336
|
+
readonly "font.lineHeight.xs": "--font-line-height-xs";
|
|
337
|
+
readonly "font.lineHeight.sm": "--font-line-height-sm";
|
|
338
|
+
readonly "font.lineHeight.md": "--font-line-height-md";
|
|
339
|
+
readonly "font.lineHeight.lg": "--font-line-height-lg";
|
|
340
|
+
readonly "font.lineHeight.xl": "--font-line-height-xl";
|
|
341
|
+
readonly "font.lineHeight.xxl": "--font-line-height-xxl";
|
|
342
|
+
readonly "font.lineHeight.xxxl": "--font-line-height-xxxl";
|
|
343
|
+
readonly "font.lineHeight.display": "--font-line-height-display";
|
|
344
|
+
readonly "font.lineHeight.hero": "--font-line-height-hero";
|
|
345
|
+
readonly "font.weight.regular": "--font-weight-regular";
|
|
346
|
+
readonly "font.weight.medium": "--font-weight-medium";
|
|
347
|
+
readonly "font.weight.semibold": "--font-weight-semibold";
|
|
348
|
+
readonly "font.weight.bold": "--font-weight-bold";
|
|
349
|
+
readonly "font.weight.extrabold": "--font-weight-extrabold";
|
|
350
|
+
readonly "shadow.sm": "--shadow-sm";
|
|
351
|
+
readonly "shadow.md": "--shadow-md";
|
|
352
|
+
readonly "shadow.lg": "--shadow-lg";
|
|
353
|
+
readonly "shadow.glow": "--shadow-glow";
|
|
354
|
+
readonly "duration.instant": "--duration-instant";
|
|
355
|
+
readonly "duration.fast": "--duration-fast";
|
|
356
|
+
readonly "duration.normal": "--duration-normal";
|
|
357
|
+
readonly "duration.slow": "--duration-slow";
|
|
358
|
+
readonly "zIndex.base": "--z-index-base";
|
|
359
|
+
readonly "zIndex.raised": "--z-index-raised";
|
|
360
|
+
readonly "zIndex.dropdown": "--z-index-dropdown";
|
|
361
|
+
readonly "zIndex.sticky": "--z-index-sticky";
|
|
362
|
+
readonly "zIndex.overlay": "--z-index-overlay";
|
|
363
|
+
readonly "zIndex.modal": "--z-index-modal";
|
|
364
|
+
readonly "zIndex.popover": "--z-index-popover";
|
|
365
|
+
readonly "zIndex.toast": "--z-index-toast";
|
|
366
|
+
};
|
|
367
|
+
export declare const light: Theme;
|
|
368
|
+
export declare const dark: Theme;
|
|
369
|
+
export declare const themes: Readonly<Record<ThemeName, Theme>>;
|
|
370
|
+
/** Overrides de cada marca sobre cada tema; `UIProvider` los combina con el tema activo (ADR-010). */
|
|
371
|
+
export declare const brands: Readonly<Record<BrandName, Readonly<Record<ThemeName, ThemeOverrides>>>>;
|
|
372
|
+
//#endregion
|
|
373
|
+
export type { BoxShadow, BrandName, CssVariableName, FontWeight, Theme, ThemeName, ThemeOverrides, TokenName };
|