@orangesys/tokens 0.0.0-stage → 0.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.
- package/LICENSE +21 -0
- package/README.md +46 -2
- package/css/tokens.css +565 -0
- package/dist/contrast.d.ts +8 -0
- package/dist/contrast.js +35 -0
- package/dist/dtcg.d.ts +96 -0
- package/dist/dtcg.js +217 -0
- package/dist/index.d.ts +600 -0
- package/dist/index.js +650 -0
- package/dist/tokens/$metadata.json +9 -0
- package/dist/tokens/$themes.json +46 -0
- package/dist/tokens/primitivas.json +1468 -0
- package/dist/tokens/tema/dark-hc.json +522 -0
- package/dist/tokens/tema/dark.json +531 -0
- package/dist/tokens/tema/light-hc.json +506 -0
- package/dist/tokens/tema/light.json +547 -0
- package/dist/tokens.dtcg.json +3631 -0
- package/package.json +65 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orange design tokens — fonte única da verdade.
|
|
3
|
+
*
|
|
4
|
+
* `primitives` são valores crus (paletas). `themeDefinitions` mapeiam essas
|
|
5
|
+
* primitivas (por nome) para tokens semânticos (`--or-color-*`) usados por
|
|
6
|
+
* todos os componentes; `themes` traz os mesmos tokens já resolvidos em cor.
|
|
7
|
+
* O script `scripts/build.ts` gera `css/tokens.css` e os arquivos DTCG
|
|
8
|
+
* (`dist/tokens.dtcg.json`) a partir deste arquivo.
|
|
9
|
+
*/
|
|
10
|
+
export declare const primitives: {
|
|
11
|
+
readonly carbon: {
|
|
12
|
+
readonly 0: "#0a0a0d";
|
|
13
|
+
readonly 50: "#0f0f12";
|
|
14
|
+
readonly 100: "#16161a";
|
|
15
|
+
readonly 150: "#1c1c21";
|
|
16
|
+
readonly 200: "#2a2a30";
|
|
17
|
+
readonly 300: "#3a3a42";
|
|
18
|
+
readonly 400: "#55555e";
|
|
19
|
+
readonly 500: "#75757f";
|
|
20
|
+
readonly 600: "#9c9588";
|
|
21
|
+
readonly 700: "#b8b0a0";
|
|
22
|
+
readonly 800: "#d4cdb5";
|
|
23
|
+
readonly 900: "#f0ebdb";
|
|
24
|
+
readonly 950: "#faf7ec";
|
|
25
|
+
};
|
|
26
|
+
readonly paper: {
|
|
27
|
+
readonly 0: "#fffdf6";
|
|
28
|
+
readonly 50: "#faf7ec";
|
|
29
|
+
readonly 100: "#f0ebdb";
|
|
30
|
+
readonly 200: "#ece7d7";
|
|
31
|
+
readonly 300: "#e2ddcd";
|
|
32
|
+
readonly 400: "#d9d3bf";
|
|
33
|
+
readonly 500: "#c9c4b5";
|
|
34
|
+
readonly 600: "#8a8478";
|
|
35
|
+
readonly 700: "#666057";
|
|
36
|
+
readonly 800: "#525252";
|
|
37
|
+
readonly 900: "#2a2a2a";
|
|
38
|
+
readonly 950: "#0f0f12";
|
|
39
|
+
};
|
|
40
|
+
readonly orange: {
|
|
41
|
+
readonly 50: "#fff3eb";
|
|
42
|
+
readonly 100: "#fde2cf";
|
|
43
|
+
readonly 200: "#fbc6a2";
|
|
44
|
+
readonly 300: "#f8a675";
|
|
45
|
+
readonly 400: "#f6945f";
|
|
46
|
+
readonly 500: "#f58549";
|
|
47
|
+
readonly 550: "#e06a2c";
|
|
48
|
+
readonly 600: "#d4622a";
|
|
49
|
+
readonly 700: "#b85a24";
|
|
50
|
+
readonly 800: "#9c4416";
|
|
51
|
+
/** Acento do tema claro de alto contraste: ≥ 7:1 com o papel dos dois lados. */
|
|
52
|
+
readonly 850: "#8a3a10";
|
|
53
|
+
readonly 900: "#6b2e0e";
|
|
54
|
+
};
|
|
55
|
+
readonly green: {
|
|
56
|
+
readonly 100: "#e4f1d1";
|
|
57
|
+
readonly 300: "#a6d16a";
|
|
58
|
+
readonly 500: "#7fb236";
|
|
59
|
+
/** Sucesso pleno no claro de alto contraste: ≥ 3:1 sobre o papel e ≥ 4.5:1 com texto carvão. */
|
|
60
|
+
readonly 600: "#5f8f22";
|
|
61
|
+
readonly 700: "#3d6614";
|
|
62
|
+
readonly 900: "#22390b";
|
|
63
|
+
};
|
|
64
|
+
readonly blue: {
|
|
65
|
+
readonly 100: "#dfe5f8";
|
|
66
|
+
readonly 300: "#8da2ea";
|
|
67
|
+
readonly 400: "#6b85e0";
|
|
68
|
+
readonly 500: "#4a66d4";
|
|
69
|
+
readonly 700: "#2a4494";
|
|
70
|
+
readonly 900: "#18275a";
|
|
71
|
+
};
|
|
72
|
+
readonly red: {
|
|
73
|
+
readonly 100: "#fde4e1";
|
|
74
|
+
readonly 300: "#f79a8f";
|
|
75
|
+
readonly 500: "#ef6a5a";
|
|
76
|
+
readonly 700: "#b42318";
|
|
77
|
+
/** Erro no claro de alto contraste: ≥ 7:1 sobre o papel e com texto claro por cima. */
|
|
78
|
+
readonly 800: "#961d13";
|
|
79
|
+
readonly 900: "#6e140d";
|
|
80
|
+
};
|
|
81
|
+
readonly amber: {
|
|
82
|
+
readonly 100: "#faefcd";
|
|
83
|
+
readonly 300: "#efd27f";
|
|
84
|
+
readonly 500: "#e8c15a";
|
|
85
|
+
/** Atenção plena no claro de alto contraste: ≥ 3:1 sobre o papel e ≥ 4.5:1 com texto carvão. */
|
|
86
|
+
readonly 600: "#a57c10";
|
|
87
|
+
readonly 700: "#8a5a00";
|
|
88
|
+
readonly 900: "#4d3200";
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
type Primitives = typeof primitives;
|
|
92
|
+
/** Nome de uma primitiva no formato `família-passo` (ex.: `green-500`), como em `--or-palette-*`. */
|
|
93
|
+
export type PrimitiveName = {
|
|
94
|
+
[F in keyof Primitives]: `${F}-${Extract<keyof Primitives[F], string | number>}`;
|
|
95
|
+
}[keyof Primitives];
|
|
96
|
+
/** `true` quando `name` é uma primitiva existente (`orange-500`, `carbon-0`…). */
|
|
97
|
+
export declare function isPrimitiveName(name: string): name is PrimitiveName;
|
|
98
|
+
/** Valor de uma primitiva pelo nome: `primitive('green-500')` → `#7fb236`. */
|
|
99
|
+
export declare function primitive(name: PrimitiveName): string;
|
|
100
|
+
/**
|
|
101
|
+
* Temas prontos, na ordem dos seletores. Cada um vira um bloco
|
|
102
|
+
* `[data-theme='<nome>']` em `tokens.css` e um modo no Figma.
|
|
103
|
+
*/
|
|
104
|
+
export declare const themeNames: readonly ["dark", "light", "dark-hc", "light-hc"];
|
|
105
|
+
export type ThemeName = (typeof themeNames)[number];
|
|
106
|
+
/** Esquema de cor de um tema (`color-scheme` de controles nativos e barras de rolagem). */
|
|
107
|
+
export type ColorScheme = 'dark' | 'light';
|
|
108
|
+
export interface ThemeMeta {
|
|
109
|
+
colorScheme: ColorScheme;
|
|
110
|
+
/**
|
|
111
|
+
* Tema de alto contraste (WCAG AAA): texto ≥ 7:1, bordas e foco ≥ 4.5:1.
|
|
112
|
+
* Em modo automático, `prefers-contrast: more` troca o tema padrão por ele.
|
|
113
|
+
*/
|
|
114
|
+
highContrast: boolean;
|
|
115
|
+
}
|
|
116
|
+
export declare const themeMeta: Record<ThemeName, ThemeMeta>;
|
|
117
|
+
/** Tokens semânticos de cor. As chaves viram `--or-color-<chave>`. */
|
|
118
|
+
export interface ColorTokens {
|
|
119
|
+
bg: string;
|
|
120
|
+
'bg-subtle': string;
|
|
121
|
+
surface: string;
|
|
122
|
+
'surface-raised': string;
|
|
123
|
+
'surface-hover': string;
|
|
124
|
+
'surface-active': string;
|
|
125
|
+
'surface-inverse': string;
|
|
126
|
+
overlay: string;
|
|
127
|
+
/** Sombra difusa das sobreposições (modais, menus, toasts). */
|
|
128
|
+
shadow: string;
|
|
129
|
+
text: string;
|
|
130
|
+
'text-muted': string;
|
|
131
|
+
'text-subtle': string;
|
|
132
|
+
'text-disabled': string;
|
|
133
|
+
'text-inverse': string;
|
|
134
|
+
'text-on-accent': string;
|
|
135
|
+
border: string;
|
|
136
|
+
'border-subtle': string;
|
|
137
|
+
'border-strong': string;
|
|
138
|
+
'border-control': string;
|
|
139
|
+
accent: string;
|
|
140
|
+
'accent-hover': string;
|
|
141
|
+
'accent-active': string;
|
|
142
|
+
'accent-subtle': string;
|
|
143
|
+
'accent-text': string;
|
|
144
|
+
'accent-border': string;
|
|
145
|
+
neutral: string;
|
|
146
|
+
'neutral-hover': string;
|
|
147
|
+
'text-on-neutral': string;
|
|
148
|
+
success: string;
|
|
149
|
+
'success-subtle': string;
|
|
150
|
+
'success-text': string;
|
|
151
|
+
warning: string;
|
|
152
|
+
'warning-subtle': string;
|
|
153
|
+
'warning-text': string;
|
|
154
|
+
danger: string;
|
|
155
|
+
'danger-hover': string;
|
|
156
|
+
'danger-subtle': string;
|
|
157
|
+
'danger-text': string;
|
|
158
|
+
'text-on-danger': string;
|
|
159
|
+
/** Texto sobre os preenchimentos de status (Badge). */
|
|
160
|
+
'text-on-success': string;
|
|
161
|
+
'text-on-warning': string;
|
|
162
|
+
'text-on-info': string;
|
|
163
|
+
info: string;
|
|
164
|
+
'info-subtle': string;
|
|
165
|
+
'info-text': string;
|
|
166
|
+
focus: string;
|
|
167
|
+
'grid-line': string;
|
|
168
|
+
'code-bg': string;
|
|
169
|
+
'code-text': string;
|
|
170
|
+
selection: string;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Valor de um token semântico na definição de um tema: o nome de uma primitiva
|
|
174
|
+
* (vira alias no DTCG e no Figma) ou uma cor crua quando nenhuma primitiva serve
|
|
175
|
+
* (transparências e alguns ajustes finos).
|
|
176
|
+
*/
|
|
177
|
+
export type ColorValue = PrimitiveName | `#${string}` | `rgba(${string})`;
|
|
178
|
+
export type ThemeDefinition = {
|
|
179
|
+
[K in keyof ColorTokens]: ColorValue;
|
|
180
|
+
};
|
|
181
|
+
export declare const themeDefinitions: Record<ThemeName, ThemeDefinition>;
|
|
182
|
+
/** Cor final de um valor de tema: primitivas viram hex; cores cruas passam direto. */
|
|
183
|
+
export declare function resolveColor(value: ColorValue): string;
|
|
184
|
+
/** Tokens semânticos de cada tema, já resolvidos em cor (hex ou rgba). */
|
|
185
|
+
export declare const themes: Record<ThemeName, ColorTokens>;
|
|
186
|
+
type Seven<T> = readonly [T, T, T, T, T, T, T];
|
|
187
|
+
export interface VizPalette {
|
|
188
|
+
/**
|
|
189
|
+
* Cinco matizes para identificar séries, em ordem fixa: verde, âmbar e vermelho ficam quase
|
|
190
|
+
* iguais com protanopia/deuteranopia, então nunca são vizinhos. ≥ 3:1 contra o fundo
|
|
191
|
+
* (≥ 4.5:1 nos temas de alto contraste).
|
|
192
|
+
*/
|
|
193
|
+
categorical: readonly [PrimitiveName, PrimitiveName, PrimitiveName, PrimitiveName, PrimitiveName];
|
|
194
|
+
/** Neutro para "Outros" (e para o resto quando uma marca está em destaque com o acento). */
|
|
195
|
+
other: PrimitiveName;
|
|
196
|
+
/** Quantidade: um só matiz (laranja), do valor baixo ao alto — o alto é o que mais se destaca do fundo. */
|
|
197
|
+
sequential: Seven<PrimitiveName>;
|
|
198
|
+
/** Dois lados de uma referência: azul abaixo, neutro no meio, laranja acima. */
|
|
199
|
+
diverging: Seven<PrimitiveName>;
|
|
200
|
+
}
|
|
201
|
+
export declare const vizPalettes: Record<ThemeName, VizPalette>;
|
|
202
|
+
type VizStep = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
203
|
+
/** Tokens semânticos de visualização de dados. As chaves viram `--or-color-<chave>`. */
|
|
204
|
+
export type VizColorTokens = Record<`viz-${1 | 2 | 3 | 4 | 5}` | 'viz-other' | `viz-seq-${VizStep}` | `viz-div-${VizStep}`, string>;
|
|
205
|
+
/** Primitiva de cada token `viz-*` de uma paleta, na ordem de `--or-color-viz-*`. */
|
|
206
|
+
export declare function vizDefinition(palette: VizPalette): Record<keyof VizColorTokens, PrimitiveName>;
|
|
207
|
+
/**
|
|
208
|
+
* Cores de gráficos por tema: `viz-1…5` (categórica, em ordem), `viz-other`,
|
|
209
|
+
* `viz-seq-1…7` (sequencial, do menor ao maior valor) e `viz-div-1…7`
|
|
210
|
+
* (divergente, de "abaixo" a "acima", com o neutro em `viz-div-4`).
|
|
211
|
+
*/
|
|
212
|
+
export declare const vizThemes: Record<ThemeName, VizColorTokens>;
|
|
213
|
+
export declare const typography: {
|
|
214
|
+
readonly fontFamily: {
|
|
215
|
+
readonly display: "\"Space Grotesk\", system-ui, -apple-system, \"Segoe UI\", sans-serif";
|
|
216
|
+
readonly body: "Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif";
|
|
217
|
+
readonly mono: "\"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
218
|
+
};
|
|
219
|
+
readonly fontSize: {
|
|
220
|
+
readonly '2xs': "0.6875rem";
|
|
221
|
+
readonly xs: "0.75rem";
|
|
222
|
+
readonly sm: "0.8125rem";
|
|
223
|
+
readonly md: "0.9375rem";
|
|
224
|
+
readonly lg: "1.0625rem";
|
|
225
|
+
readonly xl: "1.25rem";
|
|
226
|
+
readonly '2xl': "1.5rem";
|
|
227
|
+
readonly '3xl': "2rem";
|
|
228
|
+
readonly '4xl': "2.75rem";
|
|
229
|
+
readonly '5xl': "3.75rem";
|
|
230
|
+
readonly display: "5.375rem";
|
|
231
|
+
};
|
|
232
|
+
readonly fontWeight: {
|
|
233
|
+
readonly regular: "400";
|
|
234
|
+
readonly medium: "500";
|
|
235
|
+
readonly semibold: "600";
|
|
236
|
+
readonly bold: "700";
|
|
237
|
+
};
|
|
238
|
+
readonly lineHeight: {
|
|
239
|
+
readonly display: "1";
|
|
240
|
+
readonly heading: "1.1";
|
|
241
|
+
readonly tight: "1.35";
|
|
242
|
+
readonly body: "1.55";
|
|
243
|
+
readonly loose: "1.7";
|
|
244
|
+
};
|
|
245
|
+
readonly letterSpacing: {
|
|
246
|
+
readonly display: "-0.045em";
|
|
247
|
+
readonly heading: "-0.03em";
|
|
248
|
+
readonly body: "-0.005em";
|
|
249
|
+
readonly meta: "0.14em";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
export declare const space: {
|
|
253
|
+
readonly 0: "0";
|
|
254
|
+
readonly 1: "0.25rem";
|
|
255
|
+
readonly 2: "0.5rem";
|
|
256
|
+
readonly 3: "0.75rem";
|
|
257
|
+
readonly 4: "1rem";
|
|
258
|
+
readonly 5: "1.25rem";
|
|
259
|
+
readonly 6: "1.5rem";
|
|
260
|
+
readonly 7: "1.75rem";
|
|
261
|
+
readonly 8: "2rem";
|
|
262
|
+
readonly 10: "2.5rem";
|
|
263
|
+
readonly 12: "3rem";
|
|
264
|
+
readonly 14: "3.5rem";
|
|
265
|
+
readonly 16: "4rem";
|
|
266
|
+
readonly 20: "5rem";
|
|
267
|
+
readonly 24: "6rem";
|
|
268
|
+
};
|
|
269
|
+
export declare const radius: {
|
|
270
|
+
readonly none: "0";
|
|
271
|
+
readonly sm: "2px";
|
|
272
|
+
readonly md: "4px";
|
|
273
|
+
readonly full: "9999px";
|
|
274
|
+
};
|
|
275
|
+
export declare const borderWidth: {
|
|
276
|
+
readonly thin: "1px";
|
|
277
|
+
readonly thick: "2px";
|
|
278
|
+
readonly accent: "3px";
|
|
279
|
+
};
|
|
280
|
+
export declare const shadow: {
|
|
281
|
+
readonly none: "none";
|
|
282
|
+
/** Hover de cartões clicáveis (zop.dev): faixa sólida de 4px na base, na cor do texto. */
|
|
283
|
+
readonly lift: "0 8px 0 -4px var(--or-color-text)";
|
|
284
|
+
readonly 'hover-accent': "0 8px 0 -4px var(--or-color-accent)";
|
|
285
|
+
readonly 'hover-ink': "0 4px 0 -2px var(--or-color-text)";
|
|
286
|
+
readonly raised: "0 1px 0 0 var(--or-color-border-strong)";
|
|
287
|
+
readonly overlay: "0 24px 64px -16px var(--or-color-shadow), 0 0 0 1px var(--or-color-border-strong)";
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Movimento: rápido, funcional, sem bloquear. Saídas são mais curtas que
|
|
291
|
+
* entradas. Tudo é zerado em `prefers-reduced-motion: reduce`.
|
|
292
|
+
*/
|
|
293
|
+
export declare const motion: {
|
|
294
|
+
readonly duration: {
|
|
295
|
+
/** Clique/pressionar (feedback tátil). */
|
|
296
|
+
readonly press: "90ms";
|
|
297
|
+
readonly instant: "80ms";
|
|
298
|
+
/** Hover, foco, cor, borda — e saídas de sobreposições. */
|
|
299
|
+
readonly fast: "160ms";
|
|
300
|
+
/** Entradas de sobreposições, indicadores deslizando. */
|
|
301
|
+
readonly medium: "250ms";
|
|
302
|
+
/** Expandir/recolher, painéis, drawers. */
|
|
303
|
+
readonly slow: "400ms";
|
|
304
|
+
/** Revelação no scroll. */
|
|
305
|
+
readonly reveal: "600ms";
|
|
306
|
+
readonly slower: "640ms";
|
|
307
|
+
/** Ciclos decorativos (pulso de status). */
|
|
308
|
+
readonly loop: "2400ms";
|
|
309
|
+
};
|
|
310
|
+
readonly easing: {
|
|
311
|
+
/** Padrão de entradas e hovers: desacelera no fim. */
|
|
312
|
+
readonly out: "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
313
|
+
/** Movimentos de ida e volta, saídas e o cabeçalho que se esconde. */
|
|
314
|
+
readonly 'in-out': "cubic-bezier(0.65, 0, 0.35, 1)";
|
|
315
|
+
/** Indicadores (abas, segmentos, polegar do switch). */
|
|
316
|
+
readonly spring: "cubic-bezier(0.2, 0.9, 0.3, 1.05)";
|
|
317
|
+
readonly snap: "cubic-bezier(0.19, 1, 0.22, 1)";
|
|
318
|
+
/** Pequeno "pop" com overshoot (check, ponto do radio, badges). */
|
|
319
|
+
readonly bounce: "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
320
|
+
};
|
|
321
|
+
readonly distance: {
|
|
322
|
+
/** Popovers, menus, tooltips. */
|
|
323
|
+
readonly sm: "4px";
|
|
324
|
+
/** Diálogos, toasts, entrada de página. */
|
|
325
|
+
readonly md: "8px";
|
|
326
|
+
/** Revelação no scroll. */
|
|
327
|
+
readonly lg: "24px";
|
|
328
|
+
/** Elevação de cartões no hover. */
|
|
329
|
+
readonly lift: "-4px";
|
|
330
|
+
};
|
|
331
|
+
/** Atraso entre itens de uma revelação escalonada. */
|
|
332
|
+
readonly stagger: "80ms";
|
|
333
|
+
};
|
|
334
|
+
export declare const zIndex: {
|
|
335
|
+
readonly base: "0";
|
|
336
|
+
readonly raised: "10";
|
|
337
|
+
readonly sticky: "100";
|
|
338
|
+
readonly header: "200";
|
|
339
|
+
readonly dropdown: "1000";
|
|
340
|
+
readonly overlay: "1100";
|
|
341
|
+
readonly modal: "1200";
|
|
342
|
+
readonly popover: "1300";
|
|
343
|
+
readonly toast: "1400";
|
|
344
|
+
readonly tooltip: "1500";
|
|
345
|
+
};
|
|
346
|
+
export declare const breakpoints: {
|
|
347
|
+
readonly sm: "640px";
|
|
348
|
+
readonly md: "768px";
|
|
349
|
+
readonly lg: "1024px";
|
|
350
|
+
readonly xl: "1280px";
|
|
351
|
+
readonly '2xl': "1440px";
|
|
352
|
+
};
|
|
353
|
+
export declare const layout: {
|
|
354
|
+
readonly 'max-width': "1200px";
|
|
355
|
+
readonly gutter: "2rem";
|
|
356
|
+
readonly 'header-height': "4rem";
|
|
357
|
+
readonly 'sidebar-width': "17.5rem";
|
|
358
|
+
};
|
|
359
|
+
/** Tamanhos de controles interativos (altura). Todos ≥ 24px (WCAG 2.5.8). */
|
|
360
|
+
export declare const controlSize: {
|
|
361
|
+
readonly sm: "2rem";
|
|
362
|
+
readonly md: "2.5rem";
|
|
363
|
+
readonly lg: "3rem";
|
|
364
|
+
};
|
|
365
|
+
export declare const tokens: {
|
|
366
|
+
readonly primitives: {
|
|
367
|
+
readonly carbon: {
|
|
368
|
+
readonly 0: "#0a0a0d";
|
|
369
|
+
readonly 50: "#0f0f12";
|
|
370
|
+
readonly 100: "#16161a";
|
|
371
|
+
readonly 150: "#1c1c21";
|
|
372
|
+
readonly 200: "#2a2a30";
|
|
373
|
+
readonly 300: "#3a3a42";
|
|
374
|
+
readonly 400: "#55555e";
|
|
375
|
+
readonly 500: "#75757f";
|
|
376
|
+
readonly 600: "#9c9588";
|
|
377
|
+
readonly 700: "#b8b0a0";
|
|
378
|
+
readonly 800: "#d4cdb5";
|
|
379
|
+
readonly 900: "#f0ebdb";
|
|
380
|
+
readonly 950: "#faf7ec";
|
|
381
|
+
};
|
|
382
|
+
readonly paper: {
|
|
383
|
+
readonly 0: "#fffdf6";
|
|
384
|
+
readonly 50: "#faf7ec";
|
|
385
|
+
readonly 100: "#f0ebdb";
|
|
386
|
+
readonly 200: "#ece7d7";
|
|
387
|
+
readonly 300: "#e2ddcd";
|
|
388
|
+
readonly 400: "#d9d3bf";
|
|
389
|
+
readonly 500: "#c9c4b5";
|
|
390
|
+
readonly 600: "#8a8478";
|
|
391
|
+
readonly 700: "#666057";
|
|
392
|
+
readonly 800: "#525252";
|
|
393
|
+
readonly 900: "#2a2a2a";
|
|
394
|
+
readonly 950: "#0f0f12";
|
|
395
|
+
};
|
|
396
|
+
readonly orange: {
|
|
397
|
+
readonly 50: "#fff3eb";
|
|
398
|
+
readonly 100: "#fde2cf";
|
|
399
|
+
readonly 200: "#fbc6a2";
|
|
400
|
+
readonly 300: "#f8a675";
|
|
401
|
+
readonly 400: "#f6945f";
|
|
402
|
+
readonly 500: "#f58549";
|
|
403
|
+
readonly 550: "#e06a2c";
|
|
404
|
+
readonly 600: "#d4622a";
|
|
405
|
+
readonly 700: "#b85a24";
|
|
406
|
+
readonly 800: "#9c4416";
|
|
407
|
+
/** Acento do tema claro de alto contraste: ≥ 7:1 com o papel dos dois lados. */
|
|
408
|
+
readonly 850: "#8a3a10";
|
|
409
|
+
readonly 900: "#6b2e0e";
|
|
410
|
+
};
|
|
411
|
+
readonly green: {
|
|
412
|
+
readonly 100: "#e4f1d1";
|
|
413
|
+
readonly 300: "#a6d16a";
|
|
414
|
+
readonly 500: "#7fb236";
|
|
415
|
+
/** Sucesso pleno no claro de alto contraste: ≥ 3:1 sobre o papel e ≥ 4.5:1 com texto carvão. */
|
|
416
|
+
readonly 600: "#5f8f22";
|
|
417
|
+
readonly 700: "#3d6614";
|
|
418
|
+
readonly 900: "#22390b";
|
|
419
|
+
};
|
|
420
|
+
readonly blue: {
|
|
421
|
+
readonly 100: "#dfe5f8";
|
|
422
|
+
readonly 300: "#8da2ea";
|
|
423
|
+
readonly 400: "#6b85e0";
|
|
424
|
+
readonly 500: "#4a66d4";
|
|
425
|
+
readonly 700: "#2a4494";
|
|
426
|
+
readonly 900: "#18275a";
|
|
427
|
+
};
|
|
428
|
+
readonly red: {
|
|
429
|
+
readonly 100: "#fde4e1";
|
|
430
|
+
readonly 300: "#f79a8f";
|
|
431
|
+
readonly 500: "#ef6a5a";
|
|
432
|
+
readonly 700: "#b42318";
|
|
433
|
+
/** Erro no claro de alto contraste: ≥ 7:1 sobre o papel e com texto claro por cima. */
|
|
434
|
+
readonly 800: "#961d13";
|
|
435
|
+
readonly 900: "#6e140d";
|
|
436
|
+
};
|
|
437
|
+
readonly amber: {
|
|
438
|
+
readonly 100: "#faefcd";
|
|
439
|
+
readonly 300: "#efd27f";
|
|
440
|
+
readonly 500: "#e8c15a";
|
|
441
|
+
/** Atenção plena no claro de alto contraste: ≥ 3:1 sobre o papel e ≥ 4.5:1 com texto carvão. */
|
|
442
|
+
readonly 600: "#a57c10";
|
|
443
|
+
readonly 700: "#8a5a00";
|
|
444
|
+
readonly 900: "#4d3200";
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
readonly themes: Record<"dark" | "light" | "dark-hc" | "light-hc", ColorTokens>;
|
|
448
|
+
readonly viz: Record<"dark" | "light" | "dark-hc" | "light-hc", VizColorTokens>;
|
|
449
|
+
readonly typography: {
|
|
450
|
+
readonly fontFamily: {
|
|
451
|
+
readonly display: "\"Space Grotesk\", system-ui, -apple-system, \"Segoe UI\", sans-serif";
|
|
452
|
+
readonly body: "Inter, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif";
|
|
453
|
+
readonly mono: "\"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
|
|
454
|
+
};
|
|
455
|
+
readonly fontSize: {
|
|
456
|
+
readonly '2xs': "0.6875rem";
|
|
457
|
+
readonly xs: "0.75rem";
|
|
458
|
+
readonly sm: "0.8125rem";
|
|
459
|
+
readonly md: "0.9375rem";
|
|
460
|
+
readonly lg: "1.0625rem";
|
|
461
|
+
readonly xl: "1.25rem";
|
|
462
|
+
readonly '2xl': "1.5rem";
|
|
463
|
+
readonly '3xl': "2rem";
|
|
464
|
+
readonly '4xl': "2.75rem";
|
|
465
|
+
readonly '5xl': "3.75rem";
|
|
466
|
+
readonly display: "5.375rem";
|
|
467
|
+
};
|
|
468
|
+
readonly fontWeight: {
|
|
469
|
+
readonly regular: "400";
|
|
470
|
+
readonly medium: "500";
|
|
471
|
+
readonly semibold: "600";
|
|
472
|
+
readonly bold: "700";
|
|
473
|
+
};
|
|
474
|
+
readonly lineHeight: {
|
|
475
|
+
readonly display: "1";
|
|
476
|
+
readonly heading: "1.1";
|
|
477
|
+
readonly tight: "1.35";
|
|
478
|
+
readonly body: "1.55";
|
|
479
|
+
readonly loose: "1.7";
|
|
480
|
+
};
|
|
481
|
+
readonly letterSpacing: {
|
|
482
|
+
readonly display: "-0.045em";
|
|
483
|
+
readonly heading: "-0.03em";
|
|
484
|
+
readonly body: "-0.005em";
|
|
485
|
+
readonly meta: "0.14em";
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
readonly space: {
|
|
489
|
+
readonly 0: "0";
|
|
490
|
+
readonly 1: "0.25rem";
|
|
491
|
+
readonly 2: "0.5rem";
|
|
492
|
+
readonly 3: "0.75rem";
|
|
493
|
+
readonly 4: "1rem";
|
|
494
|
+
readonly 5: "1.25rem";
|
|
495
|
+
readonly 6: "1.5rem";
|
|
496
|
+
readonly 7: "1.75rem";
|
|
497
|
+
readonly 8: "2rem";
|
|
498
|
+
readonly 10: "2.5rem";
|
|
499
|
+
readonly 12: "3rem";
|
|
500
|
+
readonly 14: "3.5rem";
|
|
501
|
+
readonly 16: "4rem";
|
|
502
|
+
readonly 20: "5rem";
|
|
503
|
+
readonly 24: "6rem";
|
|
504
|
+
};
|
|
505
|
+
readonly radius: {
|
|
506
|
+
readonly none: "0";
|
|
507
|
+
readonly sm: "2px";
|
|
508
|
+
readonly md: "4px";
|
|
509
|
+
readonly full: "9999px";
|
|
510
|
+
};
|
|
511
|
+
readonly borderWidth: {
|
|
512
|
+
readonly thin: "1px";
|
|
513
|
+
readonly thick: "2px";
|
|
514
|
+
readonly accent: "3px";
|
|
515
|
+
};
|
|
516
|
+
readonly shadow: {
|
|
517
|
+
readonly none: "none";
|
|
518
|
+
/** Hover de cartões clicáveis (zop.dev): faixa sólida de 4px na base, na cor do texto. */
|
|
519
|
+
readonly lift: "0 8px 0 -4px var(--or-color-text)";
|
|
520
|
+
readonly 'hover-accent': "0 8px 0 -4px var(--or-color-accent)";
|
|
521
|
+
readonly 'hover-ink': "0 4px 0 -2px var(--or-color-text)";
|
|
522
|
+
readonly raised: "0 1px 0 0 var(--or-color-border-strong)";
|
|
523
|
+
readonly overlay: "0 24px 64px -16px var(--or-color-shadow), 0 0 0 1px var(--or-color-border-strong)";
|
|
524
|
+
};
|
|
525
|
+
readonly motion: {
|
|
526
|
+
readonly duration: {
|
|
527
|
+
/** Clique/pressionar (feedback tátil). */
|
|
528
|
+
readonly press: "90ms";
|
|
529
|
+
readonly instant: "80ms";
|
|
530
|
+
/** Hover, foco, cor, borda — e saídas de sobreposições. */
|
|
531
|
+
readonly fast: "160ms";
|
|
532
|
+
/** Entradas de sobreposições, indicadores deslizando. */
|
|
533
|
+
readonly medium: "250ms";
|
|
534
|
+
/** Expandir/recolher, painéis, drawers. */
|
|
535
|
+
readonly slow: "400ms";
|
|
536
|
+
/** Revelação no scroll. */
|
|
537
|
+
readonly reveal: "600ms";
|
|
538
|
+
readonly slower: "640ms";
|
|
539
|
+
/** Ciclos decorativos (pulso de status). */
|
|
540
|
+
readonly loop: "2400ms";
|
|
541
|
+
};
|
|
542
|
+
readonly easing: {
|
|
543
|
+
/** Padrão de entradas e hovers: desacelera no fim. */
|
|
544
|
+
readonly out: "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
545
|
+
/** Movimentos de ida e volta, saídas e o cabeçalho que se esconde. */
|
|
546
|
+
readonly 'in-out': "cubic-bezier(0.65, 0, 0.35, 1)";
|
|
547
|
+
/** Indicadores (abas, segmentos, polegar do switch). */
|
|
548
|
+
readonly spring: "cubic-bezier(0.2, 0.9, 0.3, 1.05)";
|
|
549
|
+
readonly snap: "cubic-bezier(0.19, 1, 0.22, 1)";
|
|
550
|
+
/** Pequeno "pop" com overshoot (check, ponto do radio, badges). */
|
|
551
|
+
readonly bounce: "cubic-bezier(0.34, 1.56, 0.64, 1)";
|
|
552
|
+
};
|
|
553
|
+
readonly distance: {
|
|
554
|
+
/** Popovers, menus, tooltips. */
|
|
555
|
+
readonly sm: "4px";
|
|
556
|
+
/** Diálogos, toasts, entrada de página. */
|
|
557
|
+
readonly md: "8px";
|
|
558
|
+
/** Revelação no scroll. */
|
|
559
|
+
readonly lg: "24px";
|
|
560
|
+
/** Elevação de cartões no hover. */
|
|
561
|
+
readonly lift: "-4px";
|
|
562
|
+
};
|
|
563
|
+
/** Atraso entre itens de uma revelação escalonada. */
|
|
564
|
+
readonly stagger: "80ms";
|
|
565
|
+
};
|
|
566
|
+
readonly zIndex: {
|
|
567
|
+
readonly base: "0";
|
|
568
|
+
readonly raised: "10";
|
|
569
|
+
readonly sticky: "100";
|
|
570
|
+
readonly header: "200";
|
|
571
|
+
readonly dropdown: "1000";
|
|
572
|
+
readonly overlay: "1100";
|
|
573
|
+
readonly modal: "1200";
|
|
574
|
+
readonly popover: "1300";
|
|
575
|
+
readonly toast: "1400";
|
|
576
|
+
readonly tooltip: "1500";
|
|
577
|
+
};
|
|
578
|
+
readonly breakpoints: {
|
|
579
|
+
readonly sm: "640px";
|
|
580
|
+
readonly md: "768px";
|
|
581
|
+
readonly lg: "1024px";
|
|
582
|
+
readonly xl: "1280px";
|
|
583
|
+
readonly '2xl': "1440px";
|
|
584
|
+
};
|
|
585
|
+
readonly layout: {
|
|
586
|
+
readonly 'max-width': "1200px";
|
|
587
|
+
readonly gutter: "2rem";
|
|
588
|
+
readonly 'header-height': "4rem";
|
|
589
|
+
readonly 'sidebar-width': "17.5rem";
|
|
590
|
+
};
|
|
591
|
+
readonly controlSize: {
|
|
592
|
+
readonly sm: "2rem";
|
|
593
|
+
readonly md: "2.5rem";
|
|
594
|
+
readonly lg: "3rem";
|
|
595
|
+
};
|
|
596
|
+
};
|
|
597
|
+
export type Tokens = typeof tokens;
|
|
598
|
+
/** Converte um caminho de token no nome da CSS custom property. */
|
|
599
|
+
export declare function cssVar(name: string): string;
|
|
600
|
+
export default tokens;
|