@inchurch/matcha-theme 20.277.0 → 21.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.
@@ -1,704 +0,0 @@
1
- // =============================================================================
2
- // MATCHA DESIGN SYSTEM — Token Source (CSS Custom Properties)
3
- // =============================================================================
4
- //
5
- // Emite as CSS custom properties (--matcha-*) de um tema. A classe de tema
6
- // (ex.: .theme-default-light) recebe as vars via matcha-components($theme) →
7
- // matcha-css-custom-properties($theme), habilitando override em runtime sem
8
- // recompilação Sass (base do whitelabel e de temas adicionais — ver
9
- // abstracts/_theme-api.scss e docs/theming-guide.md).
10
- //
11
- // 1:1 PARIDADE com Figma variables em DS-PAINEL (fileKey K673r19KQE8lm2S74nQ5ob):
12
- // - matcha/primitives (99 vars) → primitives section below
13
- // - matcha/colors (117 vars) → $matcha-color-tokens below
14
- // - matcha/interaction (4 vars) → via matcha/color/interaction/* aliases
15
- // - matcha/text/* (30 styles) → text-* + leading-* + tracking-* props
16
- // - matcha/elevation (4 styles) → shadow-1..4
17
- // - matcha/grid (6 styles) → grid-col-* + grid-offset-*
18
- //
19
- // CONVENÇÃO:
20
- // - Nome token Figma: `matcha/category/subcategory/variant` (slash)
21
- // - Nome CSS var: `--matcha-category-subcategory-variant` (hyphen)
22
- // ex.: `matcha/color/surface/card` ↔ `--matcha-color-surface-card`
23
- // - Chave do mapa $matcha-color-tokens = sufixo da var sem `--matcha-color-`
24
- // ex.: `surface-card` ↔ `--matcha-color-surface-card`
25
- //
26
- // ESTRUTURA DESTE ARQUIVO:
27
- // 1. $matcha-color-tokens — fonte única dos valores de cor por modo
28
- // (light/dark), na ordem de emissão. Todo token aqui é sobrescrevível
29
- // por tema via matcha-emit-color-properties() (abstracts/_theme-api.scss).
30
- // 2. matcha-default-colors($mode) + $matcha-colors-light/dark — mapas flat
31
- // derivados (token → valor), consumidos pelo emissor e pela theme API.
32
- // 3. matcha-emit-color-properties($colors) — emissor genérico.
33
- // 4. matcha-css-custom-properties($theme) — mixin canônico (assinatura
34
- // preservada): cores via emissor + tokens estáticos (spacing, radius,
35
- // tipografia, motion, grid, …) + aliases.
36
- //
37
- // =============================================================================
38
- @use "sass:map";
39
-
40
- // ═══════════════════════════════════════════════════════════════════════════
41
- // 1. COLOR TOKENS — fonte única (light/dark) na ordem de emissão
42
- // LIGHT = Figma oficial (matcha/color/* JSON export hierárquico)
43
- // DARK = tokens confirmados pelo usuário (flat JSON)
44
- // ═══════════════════════════════════════════════════════════════════════════
45
- $matcha-color-tokens: (
46
- // ── Surface (9) — matcha/color/surface/* ─────────────────────────────────
47
- // 1:1 Figma DSV3 (Light + Dark JSON export 2026-05-29).
48
- // Light mode: sage-tinted neutrals (2–4% green hue da marca) + hierarquia perceptível.
49
- surface-bg: (light: #f1f4f1, dark: #111318),
50
- // bg-alpha light usa cor BASE distinta (#f0f2f5) — não é #f1f4f1 com alpha.
51
- // Decisão Figma intencional pra sutil shift de tint no estado transparente.
52
- surface-bg-alpha: (light: rgba(#f0f2f5, .5), dark: rgba(#111318, .5)),
53
- surface-bg-inverse: (light: #111318, dark: #f0f2f5),
54
- surface-bg-inverse-alpha: (light: rgba(#111318, .5), dark: rgba(#f0f2f5, .5)),
55
-
56
- // Card soft default — light #f7fcf7 (off-white com tint sage muito sutil).
57
- // Reduz glare contra surface-bg #f1f4f1 (Δ ~5 luminance). Pure white só pra
58
- // floating overlays via surface-card-strong (modal, command-palette).
59
- // Pattern Linear / Vercel / Notion: soft cards default + bright float.
60
- surface: (light: #f7fcf7, dark: #1c1f26),
61
- surface-card: (light: #f7fcf7, dark: #1c1f26),
62
- // Card strong — pure white (light) / lifted dark, pra floating overlays
63
- // que precisam máximo destaque sobre scrim. Modal, popover, dropdown,
64
- // command-palette. NÃO usar pra cards inline — vira agressivo.
65
- surface-card-strong: (light: #ffffff, dark: #262a32),
66
- // Canvas aninhada dentro de card (preview stage, code body, inset panels)
67
- // Light: sage (= bg da page, cria recorte sutil sobre card off-white)
68
- // Dark: mais clara que card (inverte lógica, dá profundidade em vez de buraco)
69
- surface-inner: (light: #f1f4f1, dark: #262a32),
70
- // card-alpha light usa #ffffff base (não #f7fcf7) — overlay/zebra com white puro
71
- surface-card-alpha: (light: rgba(#ffffff, .85), dark: rgba(#1c1f26, .5)),
72
- surface-card-inverse: (light: #1c1f26, dark: #ffffff),
73
-
74
- surface-sidebar: (light: #e4ebe5, dark: #0d0f14),
75
- surface-sidebar-hover: (light: #d8e1da, dark: #161920),
76
- // table-row-hover light: neutral #f4f4f4 (Figma — não tinted sage)
77
- surface-table-row-hover: (light: #f4f4f4, dark: #151a22),
78
-
79
- // Border sólido e visível (era rgba(0,0,0,.08) = invisível sobre sage bg)
80
- surface-border: (light: #e1e7e2, dark: rgba(255, 255, 255, .12)),
81
- // Border mais forte pra cards elevados (hero, playground — com shadow)
82
- surface-border-strong: (light: #c8d2ca, dark: rgba(255, 255, 255, .24)),
83
- surface-hover: (light: rgba(#e4ebe5, .5), dark: rgba(#111318, .5)),
84
-
85
- // Aliases (flat) — usados massivamente
86
- // Light mode softening 2026-05-18: fg de #1a1d21 (17:1, "tinta preta") → #2a2d33 (12:1 AAA, "tinta carvão").
87
- // Inspiração: tom entre Linear (#1a1d21, mais pesado) e GitHub (#1f2328) — reduz fatiga em sessions longas.
88
- bg: (light: #f1f4f1, dark: #111318),
89
- fg: (light: #2a2d33, dark: #e8eaed),
90
- fg-alpha: (light: rgba(#2a2d33, .5), dark: rgba(#e8eaed, .5)),
91
- fg-inverse: (light: #e8eaed, dark: #2a2d33),
92
- fg-inverse-alpha: (light: rgba(#e8eaed, .5), dark: rgba(#2a2d33, .5)),
93
- border: (light: #e1e7e2, dark: rgba(255, 255, 255, .12)),
94
-
95
- // ── Text (9) — matcha/color/text/* ───────────────────────────────────────
96
- // Light mode softening 2026-05-18 — todos os tons recuados ~1 step pra reduzir
97
- // peso visual sem perder hierarquia. Contrastes recalculados sobre card #f7fcf7:
98
- // primary #2a2d33 → 12.0:1 (AAA, antes era #1a1d21 17:1 = exagero)
99
- // secondary #5a6066 → 6.8:1 (AAA Large + AA Normal, antes #4a5056 8.5:1)
100
- // muted #6e7681 → 5.2:1 (AA, antes #5a6a5e 7.4:1)
101
- // label #7a818a → 4.6:1 (AA, antes #6b7177 5.9:1)
102
- text-primary: (light: #2a2d33, dark: #e8eaed),
103
- text-inverse: (light: #e8eaed, dark: #2a2d33),
104
- text-secondary: (light: #5a6066, dark: rgba(255, 255, 255, .7)),
105
- // Muted: GitHub-ish neutral (antes era sage-tinted #5a6a5e — verde demais em form helper text)
106
- text-muted: (light: #6e7681, dark: #a8b5a0),
107
- text-label: (light: #7a818a, dark: #bdc1c6),
108
- // Placeholder: #7a818a (4.5:1 sobre card — passa AA mantendo low-emphasis)
109
- text-placeholder: (light: #7a818a, dark: #6e747a),
110
- text-hint: (light: #7a818a, dark: #9aa0a6),
111
- text-static-light: (light: #ffffff, dark: #ffffff),
112
- text-static-dark: (light: #1a1d21, dark: #1a1d21),
113
-
114
- // ── Icon (2) — matcha/color/icon/* ───────────────────────────────────────
115
- // Light mode softening 2026-05-18:
116
- // default #5f656b → #75767a — recua ícones decorativos (sort, leading) pra não competir com texto
117
- // active #1a1d21 → #3d4248 — ainda firme mas menos "tinta china" em toggles/sortable headers
118
- icon-default: (light: #9aa0a6, dark: #9aa0a6),
119
- icon-active: (light: #3d4248, dark: #e8eaed),
120
-
121
- // ── Interaction (4) — matcha/color/interaction/* ─────────────────────────
122
- // Light mode: disabled sólido com sage tint (antes alpha sobre bg = inconsistente)
123
- interaction-disabled-bg: (light: #cfd6d1, dark: #282c34),
124
- interaction-disabled-bg-alpha: (light: rgba(#cfd6d1, .5), dark: rgba(#282c34, .5)),
125
- interaction-disabled-fg: (light: #8a9090, dark: rgba(#e8eaed, .38)),
126
- interaction-disabled-border: (light: #c8d2ca, dark: rgba(#e8eaed, .38)),
127
- focus-ring: (light: #43a047, dark: #a8d94e),
128
- // Aliases legados
129
- disabled: (light: #cfd6d1, dark: #282c34),
130
- disabled-fg: (light: #8a9090, dark: rgba(#e8eaed, .38)),
131
- disabled-border: (light: #c8d2ca, dark: rgba(#e8eaed, .38)),
132
- disabled-bg: (light: #cfd6d1, dark: #282c34),
133
-
134
- // ── Neutral (4 tokens Figma matcha/color/neutral/*) ───────────────────────
135
- // Cor base pra botões e controles sem ênfase semântica (basic, ghost default).
136
- // Light: sage-tinted grey | Dark: grey neutro escuro.
137
- neutral: (light: #e4ebe5, dark: #282c34),
138
- neutral-contrast: (light: #1a1d21, dark: #e8eaed),
139
- neutral-alpha: (light: rgba(#1a1d21, .08), dark: rgba(#e8eaed, .1)),
140
- neutral-hover: (light: #d8e1da, dark: #333842),
141
-
142
- // ── Elevation (6) — matcha/color/elevation/* ─────────────────────────────
143
- elevation-surface-1: (light: #f8faf8, dark: #1c1f26), // cards, dropdowns (sage)
144
- elevation-surface-2: (light: #ffffff, dark: #262a32), // menus, floating
145
- elevation-surface-3: (light: #ffffff, dark: #2e333c), // modals, drawers
146
- // Shadow base: Figma light usa tinta accent #1A2C1E (não preto puro), dark usa #000000
147
- elevation-shadow: (light: #1a2c1e, dark: #000000),
148
- elevation-shadow-tint: (light: #1a2c1e, dark: #000000), // tint da marca pra shadows light
149
- elevation-scrim: (light: #000000, dark: #000000),
150
- // Figma matcha/color/state-layer/fg (camada sobre interações)
151
- state-layer-fg: (light: #000000, dark: #ffffff),
152
-
153
- // ── Accent (10) — matcha/color/accent/* ──────────────────────────────────
154
- // Brand inChurch: lime/chartreuse #86BD00 (hue 78°, "matcha tea").
155
- // Brand bright #86BD00 com white dá 2.25:1 (fail UI). Light mode escurece pra
156
- // #6E9A00 (3.31:1 — passa WCAG UI/large text mínimo 3:1) mantendo a MESMA hue
157
- // 78° pra preservar identidade lime. Tradeoff aceito 2026-05-18: accent é usado
158
- // praticamente só em buttons (CTA filled c/ label branco) onde 3:1 UI é OK.
159
- // Dark mode: lima bright #a8d94e + label preto (~11:1 AAA).
160
- // accent-contrast 1:1 Figma DSV3: rgba(0,0,0,.87) em AMBOS os modos (Light + Dark).
161
- // É label-on-accent ripple/text token, semantica é "preto sobre amarelo-lima". Pra label
162
- // branco em Filled buttons use accent/text-on (branco no Light / quase-preto no Dark).
163
- accent: (light: #54a71d, dark: #a8d94e),
164
- accent-contrast: (light: rgba(0, 0, 0, .87), dark: rgba(0, 0, 0, .87)),
165
- accent-contrast-alpha: (light: rgba(0, 0, 0, .1), dark: rgba(0, 0, 0, .1)),
166
- // Figma matcha/color/accent/text-on — branco puro Light / quase preto Dark.
167
- // Dedicado pra foreground sobre accent/default em Filled buttons, icon buttons.
168
- // Garante contraste ≥ 3:1 em ambos modos (supera accent/contrast que é preto fixo).
169
- accent-text-on: (light: #ffffff, dark: #1a1d21),
170
- accent-alpha: (light: rgba(#54a71d, .1), dark: rgba(#a8d94e, .1)),
171
- // Light/dark auxiliares: spring green tint (hue 143° matching accent base)
172
- accent-light: (light: #b9e3a3, dark: #b9f6ca),
173
- accent-dark: (light: #3a7515, dark: #c5e1a5),
174
- // Hover/pressed: step ~10% darker mesma hue (3.0:1 → 3.75:1 → 4.7:1)
175
- accent-hover: (light: #4b9519, dark: #bee57a),
176
- accent-pressed: (light: #428316, dark: #d4eea0),
177
- // Surface tints — light spring green
178
- accent-surface-hover: (light: #e8f3dc, dark: #161e12),
179
- accent-surface-pressed: (light: #cbe4ab, dark: #1f2d18),
180
-
181
- // ── Accent Secondary (teal — 4 tokens Figma matcha/color/accent-2/*) ─────
182
- // Light #00796b (teal-700) | Dark #4fb7ad (teal-light)
183
- accent-2: (light: #00796b, dark: #4fb7ad),
184
- accent-2-contrast: (light: #ffffff, dark: #ffffff),
185
- accent-2-alpha: (light: rgba(#00796b, .10), dark: rgba(#4fb7ad, .12)),
186
- accent-2-surface: (light: #e0f0ee, dark: #1d332e),
187
-
188
- // ── Primary (10) — matcha/color/primary/* ────────────────────────────────
189
- // Light #1664c2 (blue-700) | Dark #64b5f6 (blue-300)
190
- primary: (light: #1664c2, dark: #64b5f6),
191
- primary-contrast: (light: #ffffff, dark: rgba(0, 0, 0, .87)),
192
- primary-contrast-alpha: (light: rgba(255, 255, 255, .1), dark: rgba(0, 0, 0, .1)),
193
- primary-alpha: (light: rgba(#1664c2, .1), dark: rgba(#64b5f6, .1)),
194
- primary-light: (light: #b3d7fd, dark: #bbdefb),
195
- primary-dark: (light: #0d3c8c, dark: #90caf9),
196
- primary-hover: (light: #2576d2, dark: #90caf9),
197
- primary-pressed: (light: #378ce1, dark: #bbdefb),
198
- primary-surface-hover: (light: #e4eefa, dark: #141922),
199
- primary-surface-pressed: (light: #cddef5, dark: #1a2436),
200
-
201
- // ── Feedback — Success (9) ───────────────────────────────────────────────
202
- success: (light: #2e7d32, dark: #69f0ae),
203
- success-contrast: (light: #ffffff, dark: rgba(0, 0, 0, .87)),
204
- success-contrast-alpha: (light: rgba(255, 255, 255, .1), dark: rgba(0, 0, 0, .1)),
205
- success-alpha: (light: rgba(#2e7d32, .1), dark: rgba(#69f0ae, .1)),
206
- success-hover: (light: #388e3c, dark: #4cd992),
207
- success-pressed: (light: #43a047, dark: #33c078),
208
- success-fill: (light: #2e7d32, dark: #43a047),
209
- success-surface-hover: (light: #e8f5e9, dark: #121d17),
210
- success-surface-pressed: (light: #c8e6c9, dark: #192f24),
211
-
212
- // ── Feedback — Danger (9) ────────────────────────────────────────────────
213
- danger: (light: #c81010, dark: #ef9a9a),
214
- danger-contrast: (light: #ffffff, dark: rgba(0, 0, 0, .87)),
215
- danger-contrast-alpha: (light: rgba(255, 255, 255, .1), dark: rgba(0, 0, 0, .1)),
216
- danger-alpha: (light: rgba(#c81010, .1), dark: rgba(#ef9a9a, .1)),
217
- danger-hover: (light: #da2c2c, dark: #f4b8b8),
218
- danger-pressed: (light: #e64848, dark: #f7d0d0),
219
- danger-fill: (light: #c81010, dark: #e53935),
220
- danger-surface-hover: (light: #fae8e8, dark: #1d1616),
221
- danger-surface-pressed: (light: #f5d2d2, dark: #2f2121),
222
-
223
- // ── Feedback — Warn (9) ──────────────────────────────────────────────────
224
- // Light #a64e00 (âmbar escuro) | Dark #ffb74d (orange-300)
225
- warn: (light: #a64e00, dark: #ffb74d),
226
- warn-contrast: (light: #ffffff, dark: rgba(0, 0, 0, .87)),
227
- warn-contrast-alpha: (light: rgba(255, 255, 255, .1), dark: rgba(0, 0, 0, .1)),
228
- warn-alpha: (light: rgba(#a64e00, .1), dark: rgba(#ffb74d, .1)),
229
- warn-hover: (light: #924200, dark: #e69f33),
230
- warn-pressed: (light: #7e3600, dark: #cc881a),
231
- warn-fill: (light: #a64e00, dark: #fb8c00),
232
- warn-surface-hover: (light: #fcf0e1, dark: #1e1910),
233
- warn-surface-pressed: (light: #f8e1c3, dark: #2f2616),
234
-
235
- // ── Feedback — Info (8) ──────────────────────────────────────────────────
236
- info: (light: #0a2fc2, dark: #4090d8),
237
- info-contrast: (light: #ffffff, dark: #ffffff),
238
- info-contrast-alpha: (light: rgba(255, 255, 255, .1), dark: rgba(255, 255, 255, .1)),
239
- info-alpha: (light: rgba(#0a2fc2, .1), dark: rgba(#4090d8, .1)),
240
- info-hover: (light: #294cd4, dark: #5aa0e0),
241
- info-pressed: (light: #4265e0, dark: #74b0e8),
242
- info-surface-hover: (light: #ebeefa, dark: #0f141e),
243
- info-surface-pressed: (light: #d8def5, dark: #131f31),
244
-
245
- // ── Palette (18) — matcha/color/palette/* ────────────────────────────────
246
- palette-teal: (light: #00796b, dark: #4fb7ad),
247
- palette-teal-light: (light: #4fb7ad, dark: #009688),
248
- palette-teal-alpha: (light: rgba(#00796b, .1), dark: rgba(#4fb7ad, .1)),
249
- palette-light-blue: (light: #0288d1, dark: #54c5f7),
250
- palette-light-blue-light: (light: #54c5f7, dark: #03a9f4),
251
- palette-light-blue-alpha: (light: rgba(#0288d1, .1), dark: rgba(#54c5f7, .1)),
252
- palette-purple: (light: #9c27b0, dark: #bb6ac8),
253
- palette-purple-light: (light: #bb6ac8, dark: #9c27b0),
254
- palette-purple-alpha: (light: rgba(#9c27b0, .1), dark: rgba(#bb6ac8, .1)),
255
- palette-pink: (light: #d81b60, dark: #e46291),
256
- palette-pink-light: (light: #e46291, dark: #d81b60),
257
- palette-pink-alpha: (light: rgba(#d81b60, .1), dark: rgba(#e46291, .1)),
258
- palette-orange: (light: #e65100, dark: #f9a25d),
259
- palette-orange-light: (light: #f9a25d, dark: #f77814),
260
- palette-orange-alpha: (light: rgba(#e65100, .1), dark: rgba(#f9a25d, .1)),
261
- palette-yellow: (light: #ffa000, dark: #efd64f),
262
- palette-yellow-light: (light: #efd64f, dark: #e8c300),
263
- palette-yellow-alpha: (light: rgba(#ffa000, .1), dark: rgba(#efd64f, .1)),
264
-
265
- // ── Chart (5) — matcha/color/chart/* ─────────────────────────────────────
266
- chart-series-1: (light: #615ce5, dark: #8782f2),
267
- chart-series-2: (light: #42a147, dark: #66ba6b),
268
- chart-series-3: (light: #ed6645, dark: #f5876b),
269
- chart-series-4: (light: #c28700, dark: #ffc93d),
270
- chart-series-5: (light: #008094, dark: #26c2d9),
271
- );
272
-
273
- // ═══════════════════════════════════════════════════════════════════════════
274
- // 2. MAPAS FLAT POR MODO — token → valor (derivados de $matcha-color-tokens).
275
- // Consumidos pelo emissor abaixo e pela theme API
276
- // (matcha-build-color-map() em abstracts/_theme-api.scss).
277
- // ═══════════════════════════════════════════════════════════════════════════
278
- @function matcha-default-colors($mode) {
279
- $out: ();
280
- @each $token, $modes in $matcha-color-tokens {
281
- $out: map.set($out, $token, map.get($modes, $mode));
282
- }
283
- @return $out;
284
- }
285
-
286
- $matcha-colors-light: matcha-default-colors(light);
287
- $matcha-colors-dark: matcha-default-colors(dark);
288
-
289
- // ═══════════════════════════════════════════════════════════════════════════
290
- // 3. EMISSOR GENÉRICO — mapa flat (token → valor) vira --matcha-color-<token>.
291
- // Usado pelo mixin canônico abaixo e por matcha-define-theme() (theme API).
292
- // ═══════════════════════════════════════════════════════════════════════════
293
- // $aliases (opcional): token → "--matcha-prim-*". Quando presente p/ um token, emite
294
- // `var(--matcha-prim-*)` (Camada 2 referencia a primitiva) em vez do hex literal.
295
- // A rota clássica (matcha-css-custom-properties) passa $matcha-prim-aliases-{light,dark};
296
- // matcha-define-theme() não passa (mantém hex computado dos seeds — whitelabel intacto).
297
- @mixin matcha-emit-color-properties($colors, $aliases: ()) {
298
- @each $token, $value in $colors {
299
- $alias: map.get($aliases, $token);
300
- @if $alias {
301
- --matcha-color-#{$token}: var(#{$alias});
302
- } @else {
303
- --matcha-color-#{$token}: #{$value};
304
- }
305
- }
306
- }
307
-
308
- // ═══════════════════════════════════════════════════════════════════════════
309
- // 4. MIXIN CANÔNICO — assinatura preservada (retrocompat).
310
- // ═══════════════════════════════════════════════════════════════════════════
311
- @mixin matcha-css-custom-properties($theme) {
312
- $is-dark: map.get($theme, is-dark);
313
-
314
- // ── Cores semânticas (ver $matcha-color-tokens acima) ────────────────────
315
- // Aliases sólidos → var(--matcha-prim-*); derivados/alphas/cross-semantic → hex literal.
316
- @include matcha-emit-color-properties(
317
- if($is-dark, $matcha-colors-dark, $matcha-colors-light),
318
- if($is-dark, $matcha-prim-aliases-dark, $matcha-prim-aliases-light)
319
- );
320
-
321
- // ── Feedback namespace (matcha/color/feedback/* canon DSV3) ───────────────
322
- // Aliases semânticos pros tokens base — namespace dedicado pra status/banners/
323
- // table row variants. Naming match Figma DSV3 (flat: feedback/info, sem suffix).
324
- --matcha-color-feedback-info: var(--matcha-color-info);
325
- --matcha-color-feedback-success: var(--matcha-color-success);
326
- --matcha-color-feedback-warn: var(--matcha-color-warn);
327
- --matcha-color-feedback-danger: var(--matcha-color-danger);
328
-
329
- // Variantes alpha pra row backgrounds, badges filled-alpha, etc.
330
- --matcha-color-feedback-info-alpha: var(--matcha-color-info-alpha);
331
- --matcha-color-feedback-success-alpha: var(--matcha-color-success-alpha);
332
- --matcha-color-feedback-warn-alpha: var(--matcha-color-warn-alpha);
333
- --matcha-color-feedback-danger-alpha: var(--matcha-color-danger-alpha);
334
-
335
- // Surface hover (bg tinted pra hover em row de table)
336
- --matcha-color-feedback-info-surface-hover: var(--matcha-color-info-surface-hover);
337
- --matcha-color-feedback-success-surface-hover: var(--matcha-color-success-surface-hover);
338
- --matcha-color-feedback-warn-surface-hover: var(--matcha-color-warn-surface-hover);
339
- --matcha-color-feedback-danger-surface-hover: var(--matcha-color-danger-surface-hover);
340
-
341
- // ── Spacing (14 tokens — matches matcha/space/* exato) ────────────────────
342
- --matcha-space-025: 2px;
343
- --matcha-space-050: 4px;
344
- --matcha-space-075: 6px;
345
- --matcha-space-100: 8px;
346
- --matcha-space-150: 12px;
347
- --matcha-space-200: 16px;
348
- --matcha-space-250: 20px;
349
- --matcha-space-300: 24px;
350
- --matcha-space-400: 32px;
351
- --matcha-space-500: 40px;
352
- --matcha-space-600: 48px;
353
- --matcha-space-800: 64px;
354
- --matcha-space-1000: 80px;
355
- --matcha-space-1200: 96px;
356
-
357
- // ── Border radius (8 tokens — matches matcha/radius/* exato) ─────────────
358
- --matcha-radius-none: 0;
359
- --matcha-radius-sm: 2px;
360
- --matcha-radius-md: 4px;
361
- --matcha-radius-3xs: 6px; // Figma matcha/radius/3xs
362
- --matcha-radius-lg: 8px;
363
- --matcha-radius-2xl: 12px; // Figma: 12px (antes code tinha 24, divergia)
364
- --matcha-radius-xl: 16px;
365
- --matcha-radius-3xl: 24px; // Figma: matcha/radius/3xl (criado 2026-05-06 pra cobrir uso do utility .radius-24)
366
- --matcha-radius-pill: 9999px;
367
- // Alias legado pra usos em páginas de doc (refatorar depois pra usar radius-2xl)
368
- --matcha-radius-card: var(--matcha-radius-2xl);
369
-
370
- // ── Border width (4 tokens — matches matcha/border/* exato) ──────────────
371
- --matcha-border-hairline: 1px; // Subtle borders (card outlines, internal separators)
372
- --matcha-border-thin: 2px; // Primary borders (button outlines, form fields, active states)
373
- --matcha-border-medium: 4px; // Emphasis borders (status indicators, nav-item indicators, focus rings on large)
374
- --matcha-border-thick: 8px; // Heavy borders (section dividers, decoration)
375
-
376
- // ── Font family (1 token) ────────────────────────────────────────────────
377
- --matcha-font-family: 'Manrope', sans-serif;
378
-
379
- // ── Font size (13 tokens — matches matcha/font/size/* from Figma) ─────────
380
- --matcha-font-size-3xs: 8px;
381
- --matcha-font-size-2xs: 10px;
382
- --matcha-font-size-xs: 12px;
383
- --matcha-font-size-sm: 14px;
384
- --matcha-font-size-md: 16px;
385
- --matcha-font-size-lg: 18px;
386
- --matcha-font-size-xl: 20px;
387
- --matcha-font-size-2xl: 24px;
388
- --matcha-font-size-3xl: 32px;
389
- --matcha-font-size-4xl: 36px;
390
- --matcha-font-size-5xl: 48px;
391
- --matcha-font-size-6xl: 60px;
392
- --matcha-font-size-7xl: 72px;
393
-
394
- // ── Font weight (8 tokens — matches matcha/font/weight/* exato) ──────────
395
- // Canônico Figma: extralight (200), light (300), normal (400), medium (500),
396
- // semi-bold (600), bold (700), extrabold (800), black (900)
397
- // Código mantém regular/semibold por retrocompat + aliases Figma-exatos
398
- --matcha-weight-extralight: 200; // Figma canonical
399
- --matcha-weight-light: 300; // Figma canonical
400
- --matcha-weight-regular: 400;
401
- --matcha-weight-normal: 400; // Figma canonical alias
402
- --matcha-weight-medium: 500;
403
- --matcha-weight-semibold: 600;
404
- --matcha-weight-semi-bold: 600; // Figma canonical alias
405
- --matcha-weight-bold: 700;
406
- --matcha-weight-extrabold: 800; // Figma VariableID:17195:11 (criado oficialmente)
407
- --matcha-weight-black: 900;
408
-
409
- // ── Typography — 15 canonical text styles (1:1 com matcha/text/* Figma) ──
410
- // 13 styles publicados + `display` e `p-tiny` (recriados no Figma 2026-06-03).
411
- --matcha-text-display-hero: 36px; // matcha/text/Stat Card (EB 36/40/-1.2)
412
- --matcha-text-display: 32px; // matcha/text/display (Bold 32/40/-0.3)
413
- --matcha-text-headline: 24px; // matcha/text/headline (Bold 24/32/-0.3)
414
- --matcha-text-title-lg: 20px; // matcha/text/title-large (SemiBold 20/28)
415
- --matcha-text-title-md: 18px; // matcha/text/title-medium (SemiBold 18/24)
416
- --matcha-text-title-sm: 16px; // matcha/text/title-small (SemiBold 16/22)
417
- --matcha-text-title-xs: 14px; // matcha/text/title-tiny (ExtraBold 14/20)
418
- --matcha-text-body-lg: 16px; // matcha/text/p-large (Regular 16/24)
419
- --matcha-text-body-md: 14px; // matcha/text/p-medium (Regular 14/20)
420
- --matcha-text-body-sm: 12px; // matcha/text/p-small (Regular 12/16)
421
- --matcha-text-p-tiny: 11px; // matcha/text/p-tiny (Regular 11/14/0.3)
422
- --matcha-text-label-lg: 16px; // matcha/text/label-large (Medium 16/22)
423
- --matcha-text-label-md: 14px; // matcha/text/label-medium (Medium 14/20)
424
- --matcha-text-label-sm: 12px; // matcha/text/label-small (Medium 12/16)
425
- --matcha-text-overline: 10px; // matcha/text/Uppercase (SemiBold 10/14/1)
426
-
427
- // Shorthand aliases (usados massivamente em components/*.scss)
428
- --matcha-text-xs: var(--matcha-text-p-tiny); // 11px — legendas, metadados
429
- --matcha-text-sm: var(--matcha-text-body-sm); // 12px — texto auxiliar
430
- --matcha-text-md: var(--matcha-text-body-md); // 14px — corpo padrão
431
- --matcha-text-lg: var(--matcha-text-body-lg); // 16px — texto de destaque
432
- --matcha-text-xl: var(--matcha-text-title-md); // 18px — títulos de grupo
433
-
434
- // ── Line heights — canônico (matches Figma text styles) ──────────────────
435
- --matcha-leading-display-hero: 40px; // Stat Card
436
- --matcha-leading-display: 40px;
437
- --matcha-leading-headline: 32px;
438
- --matcha-leading-title-lg: 28px;
439
- --matcha-leading-title-md: 24px;
440
- --matcha-leading-title-sm: 22px;
441
- --matcha-leading-title-xs: 20px; // title-tiny
442
- --matcha-leading-body-lg: 24px;
443
- --matcha-leading-body-md: 20px;
444
- --matcha-leading-body-sm: 16px;
445
- --matcha-leading-p-tiny: 14px;
446
- --matcha-leading-label-lg: 22px;
447
- --matcha-leading-label-md: 20px;
448
- --matcha-leading-label-sm: 16px;
449
- --matcha-leading-overline: 14px; // Uppercase
450
-
451
- // ── Tracking (letter-spacing) — só styles com valor não-zero ─────────────
452
- --matcha-tracking-display-hero: -1.2px; // Stat Card
453
- --matcha-tracking-display: -0.3px;
454
- --matcha-tracking-headline: -0.3px;
455
- --matcha-tracking-overline: 1px; // Uppercase
456
- --matcha-tracking-p-tiny: 0.3px;
457
-
458
- // Shorthand aliases para line-heights (acompanham --matcha-text-*)
459
- --matcha-leading-xs: var(--matcha-leading-p-tiny); // 14px
460
- --matcha-leading-sm: var(--matcha-leading-body-sm); // 16px
461
- --matcha-leading-md: var(--matcha-leading-body-md); // 20px
462
- --matcha-leading-lg: var(--matcha-leading-body-lg); // 24px
463
- --matcha-leading-xl: var(--matcha-leading-title-md); // 24px
464
-
465
- // ── Line height primitives (4 tokens — matches matcha/line-height/*) ─────
466
- --matcha-line-height-none: 1;
467
- --matcha-line-height-tight: 1.2;
468
- --matcha-line-height-normal: 1.5;
469
- --matcha-line-height-relaxed: 1.75;
470
-
471
- // ── Letter spacing (primitives + semantic aliases) ───────────────────────
472
- --matcha-letter-spacing-tight: -0.5px;
473
- --matcha-letter-spacing-normal: 0px;
474
- --matcha-letter-spacing-wide: 0.5px;
475
- --matcha-letter-spacing-wider: 1px;
476
- // Semantic aliases alinhados com Figma text styles
477
- --matcha-letter-spacing-button: 0.2px; // matcha/text/button-*
478
- --matcha-letter-spacing-caption: 0.3px; // matcha/text/caption + link-sm
479
-
480
- // ── Elevation (4 shadow tokens) ──────────────────────────────────────────
481
- --matcha-shadow-1: #{if($is-dark, $shadow-1-dark, $shadow-1-light)};
482
- --matcha-shadow-2: #{if($is-dark, $shadow-2-dark, $shadow-2-light)};
483
- --matcha-shadow-3: #{if($is-dark, $shadow-3-dark, $shadow-3-light)};
484
- --matcha-shadow-4: #{if($is-dark, $shadow-4-dark, $shadow-4-light)};
485
-
486
- // ── Vars estruturais de componente (mode-dependentes, ex-@if $is-dark) ───
487
- // Bordas que só existiam no dark + shimmer do skeleton. No light viram no-op
488
- // (0/transparent) pra não alterar layout. O $is-dark aqui é o seletor de modo
489
- // legítimo da emissão (mesmo papel dos shadows acima) — não é o $is-dark
490
- // espalhado nos componentes, que foi eliminado na migração runtime-theming.
491
- --matcha-skeleton-shimmer: #{if($is-dark, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.5))};
492
- --matcha-chart-card-border: #{if($is-dark, 1px solid rgba(#212121, 0.06), 0 solid transparent)};
493
- --matcha-section-border: #{if($is-dark, 1px solid rgba(#212121, 0.06), 0 solid transparent)};
494
- --matcha-calendar-border: #{if($is-dark, 1px solid var(--matcha-color-surface-border), 0 solid transparent)};
495
- --matcha-drawer-border: #{if($is-dark, 1px solid var(--matcha-color-surface-border), 0 solid transparent)};
496
-
497
- // ── Animation (4 tokens — matches matcha/duration/* from Figma) ──────────
498
- --matcha-duration-instant: 80ms;
499
- --matcha-duration-fast: 200ms;
500
- --matcha-duration-normal: 400ms;
501
- --matcha-duration-slow: 600ms;
502
-
503
- // ── Easing (4 tokens — matches matcha/easing/* from Figma) ───────────────
504
- --matcha-easing-standard: cubic-bezier(0.4, 0, 0.2, 1);
505
- --matcha-easing-accelerated: cubic-bezier(0.4, 0, 1, 1);
506
- --matcha-easing-decelerated: cubic-bezier(0, 0, 0.2, 1);
507
- --matcha-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
508
-
509
- // ── Opacity (7 tokens — matches matcha/opacity/* from Figma) ─────────────
510
- --matcha-opacity-hover: 0.04;
511
- --matcha-opacity-subtle: 0.10;
512
- --matcha-opacity-medium: 0.20;
513
- --matcha-opacity-strong: 0.30;
514
- --matcha-opacity-disabled: 0.38;
515
- --matcha-opacity-overlay-soft: 0.40;
516
- // Específico do matcha/option (Figma DSV3 14237:113) — diferente do disabled global (0.38)
517
- --matcha-opacity-option-disabled: 0.5;
518
- --matcha-opacity-secondary: 0.54;
519
- --matcha-opacity-high: 0.87;
520
-
521
- // ── State layers (matches matcha/state-layer/* from Figma) ────────────────
522
- --matcha-state-layer-subtle: 0.04; // Figma matcha/state-layer/subtle
523
- --matcha-state-layer-hover: 0.08; // Figma matcha/state-layer/hover
524
- --matcha-state-layer-pressed: 0.12; // Figma matcha/state-layer/pressed
525
- --matcha-state-layer-active: 0.16; // Figma matcha/state-layer/active
526
- // Aliases legados (usados nos componentes atuais)
527
- --matcha-state-hover: var(--matcha-state-layer-hover);
528
- --matcha-state-active: var(--matcha-state-layer-pressed);
529
- --matcha-state-focus-ring-width: 2px;
530
- --matcha-state-focus-ring-offset: 2px;
531
-
532
- // ── Scrim / Overlay (Figma matcha/overlay Type=Modal / Type=Drawer) ──────
533
- --matcha-scrim-modal: rgba(0, 0, 0, 0.5);
534
- --matcha-scrim-modal-blur: 6px;
535
- --matcha-scrim-drawer: rgba(0, 0, 0, 0.3);
536
- --matcha-scrim-drawer-blur: 4px;
537
-
538
- // ── Icon sizes (4 tokens — matches matcha/icon/size/* exato) ─────────────
539
- --matcha-icon-size-sm: 16px;
540
- --matcha-icon-size-md: 24px;
541
- --matcha-icon-size-lg: 32px;
542
- --matcha-icon-size-xl: 48px;
543
-
544
- // ── Avatar sizes (1:1 com Figma matcha/avatar — Type=Photo, Size variants)
545
- --matcha-avatar-xs: 24px;
546
- --matcha-avatar-sm: 32px;
547
- --matcha-avatar-md: 40px;
548
- --matcha-avatar-lg: 56px;
549
- --matcha-avatar-xl: 80px;
550
- --matcha-avatar-2xl: 96px;
551
- // Status indicator — 1:1 com Figma (Status ellipse em cada Size variant)
552
- --matcha-avatar-status-xs: 6px;
553
- --matcha-avatar-status-sm: 8px;
554
- --matcha-avatar-status-md: 10px;
555
- --matcha-avatar-status-lg: 12px;
556
- --matcha-avatar-status-xl: 14px;
557
- --matcha-avatar-status-2xl: 16px;
558
-
559
- // ── Z-index (8 tokens — matches matcha/z-index/* from Figma) ─────────────
560
- --matcha-z-base: 1;
561
- --matcha-z-dropdown: 100;
562
- --matcha-z-sticky: 200;
563
- --matcha-z-popover: 300;
564
- --matcha-z-tooltip: 400;
565
- --matcha-z-modal-bg: 998;
566
- --matcha-z-modal: 999;
567
- --matcha-z-overlay: 1000;
568
- // Panel flutuante (matcha-panel) — acima de modal pra suportar select/menu
569
- // dentro de modal. Renderizado via portal-to-body fora de stacking contexts.
570
- --matcha-z-popover-floating: 10001;
571
-
572
- // ── Grid (22 tokens — 1:1 com matcha/grid/* do Figma) ────────────────────
573
- // Frames (breakpoints)
574
- --matcha-grid-frame-mobile: 375px;
575
- --matcha-grid-frame-tablet: 768px;
576
- --matcha-grid-frame-notebook: 1360px;
577
- --matcha-grid-frame-wide: 1920px;
578
- // Chrome
579
- --matcha-grid-header-height: 56px;
580
- --matcha-grid-header-height-mobile: 48px;
581
- --matcha-grid-sidebar-rail: 72px;
582
- --matcha-grid-sidebar-submenu: 216px;
583
- --matcha-grid-sidebar-total: 304px;
584
- --matcha-grid-sidebar-gap: 16px;
585
- // Gutters (espaço entre colunas)
586
- --matcha-grid-gutter-compact: 8px;
587
- --matcha-grid-gutter-default: 16px;
588
- --matcha-grid-gutter-wide: 16px;
589
- --matcha-grid-max-content-width: 1600px;
590
- // Column widths (largura INDIVIDUAL de coluna) — Figma verdadeiro
591
- --matcha-grid-col-painel-full: 72px;
592
- --matcha-grid-col-painel-rail: 88px;
593
- --matcha-grid-col-painel-compact: 96px;
594
- --matcha-grid-col-wide-full: 120px;
595
- --matcha-grid-col-wide-rail: 112px;
596
- // Content widths (área útil total) — Figma verdadeiro
597
- --matcha-grid-content-painel-full: 1040px;
598
- --matcha-grid-content-painel-rail: 1232px;
599
- --matcha-grid-content-wide-full: 1616px;
600
- --matcha-grid-content-wide-rail: 1520px;
601
-
602
- // Public-facing column widths (site institucional/landing — breakpoint-aware)
603
- --matcha-grid-col-public-desktop: 80px;
604
- --matcha-grid-col-public-mobile: 80px;
605
- --matcha-grid-col-public-tablet: 64px;
606
-
607
- // Horizontal offsets (distância da borda do frame ao primeiro col da grid)
608
- --matcha-grid-offset-painel-compact: 24px;
609
- --matcha-grid-offset-painel-full: 304px;
610
- --matcha-grid-offset-painel-rail: 96px;
611
- --matcha-grid-offset-wide-full: 304px;
612
- --matcha-grid-offset-wide-rail: 248px;
613
-
614
- // ── Breakpoints (6 tokens — Tailwind-aligned, expostos como CSS vars) ────
615
- // Pra container queries, JS-side responsive logic (`matchMedia`) e media
616
- // queries inline (`@media (min-width: var(...))` em CSS moderno). Valores
617
- // alinhados ao padrão Tailwind/Chakra — familiares e cobrem todos os tiers
618
- // (mobile pequeno até desktop wide). 1:1 com Figma `matcha/bp/*`.
619
- //
620
- // NOTA: SCSS `@mixin breakpoint(...)` em `_breakpoints-tokens.scss` usa
621
- // valores Angular Material legacy (600/1024/1440/1920) — DESALINHADO destes.
622
- // Em refactors novos, prefira CSS custom prop `var(--matcha-bp-md)` em vez
623
- // do mixin SCSS.
624
- --matcha-bp-xs: 480px; // mobile pequeno
625
- --matcha-bp-sm: 640px; // mobile grande / tablet portrait
626
- --matcha-bp-md: 768px; // tablet
627
- --matcha-bp-lg: 1024px; // desktop pequeno
628
- --matcha-bp-xl: 1280px; // desktop padrão
629
- --matcha-bp-2xl: 1536px; // desktop grande / wide
630
-
631
- // ═════════════════════════════════════════════════════════════════════════
632
- // 16. NAMING-PARITY ALIASES
633
- // Aliases que espelham o nome exato das variables do Figma, garantindo que
634
- // dev possa referenciar o token pelo nome que vê no Figma.
635
- // ═════════════════════════════════════════════════════════════════════════
636
-
637
- // Figma: matcha/color/surface/background → ↔ --matcha-color-surface-bg
638
- --matcha-color-surface-background: var(--matcha-color-surface-bg);
639
- --matcha-color-surface-background-alpha: var(--matcha-color-surface-bg-alpha);
640
- --matcha-color-surface-background-inverse: var(--matcha-color-surface-bg-inverse);
641
-
642
- // Figma: matcha/color/neutral/default → ↔ --matcha-color-neutral
643
- --matcha-color-neutral-default: var(--matcha-color-neutral);
644
-
645
- // Figma: matcha/color/interaction/focus-ring → ↔ --matcha-color-focus-ring
646
- --matcha-color-interaction-focus-ring: var(--matcha-color-focus-ring);
647
-
648
- // Figma: matcha/z-index/{base,dropdown,…} → ↔ --matcha-z-{base,dropdown,…}
649
- --matcha-z-index-base: var(--matcha-z-base);
650
- --matcha-z-index-dropdown: var(--matcha-z-dropdown);
651
- --matcha-z-index-sticky: var(--matcha-z-sticky);
652
- --matcha-z-index-popover: var(--matcha-z-popover);
653
- --matcha-z-index-tooltip: var(--matcha-z-tooltip);
654
- --matcha-z-index-modal-bg: var(--matcha-z-modal-bg);
655
- --matcha-z-index-modal: var(--matcha-z-modal);
656
- --matcha-z-index-overlay: var(--matcha-z-overlay);
657
- --matcha-z-index-popover-floating: var(--matcha-z-popover-floating);
658
-
659
- // Figma: matcha/font/weight/semi-bold → ↔ --matcha-weight-semibold
660
- --matcha-font-weight-extralight: var(--matcha-weight-extralight);
661
- --matcha-font-weight-light: var(--matcha-weight-light);
662
- --matcha-font-weight-semi-bold: var(--matcha-weight-semibold);
663
- --matcha-font-weight-regular: var(--matcha-weight-regular);
664
- --matcha-font-weight-medium: var(--matcha-weight-medium);
665
- --matcha-font-weight-bold: var(--matcha-weight-bold);
666
- --matcha-font-weight-extrabold: var(--matcha-weight-extrabold);
667
- --matcha-font-weight-black: var(--matcha-weight-black);
668
-
669
- // ═════════════════════════════════════════════════════════════════════════
670
- // 17. GRADIENTS
671
- // Gradients tonais semânticos. Compostos por 2 stops (alpha → surface-card)
672
- // pra dar fade lateral em banners. Mantém compat com Figma — lá cada stop
673
- // é uma variable separada (gradients não são tipo nativo de variable).
674
- // Centralizar aqui evita repetir o linear-gradient em cada componente.
675
- // ═════════════════════════════════════════════════════════════════════════
676
-
677
- // Figma DSV3 (matcha/banner 19080:308): tone="info" mapeia pra primary-alpha
678
- // (#64b5f6 azul), não info-alpha (cyan/turquesa) — alinhamento visual com border + eyebrow.
679
- --matcha-gradient-banner-info: linear-gradient(
680
- 90deg,
681
- var(--matcha-color-primary-alpha) 0%,
682
- var(--matcha-color-surface-card) 100%
683
- );
684
- --matcha-gradient-banner-success: linear-gradient(
685
- 90deg,
686
- var(--matcha-color-success-alpha) 0%,
687
- var(--matcha-color-surface-card) 100%
688
- );
689
- --matcha-gradient-banner-warning: linear-gradient(
690
- 90deg,
691
- var(--matcha-color-warn-alpha) 0%,
692
- var(--matcha-color-surface-card) 100%
693
- );
694
- --matcha-gradient-banner-accent: linear-gradient(
695
- 90deg,
696
- var(--matcha-color-accent-alpha) 0%,
697
- var(--matcha-color-surface-card) 100%
698
- );
699
- --matcha-gradient-banner-danger: linear-gradient(
700
- 90deg,
701
- var(--matcha-color-danger-alpha) 0%,
702
- var(--matcha-color-surface-card) 100%
703
- );
704
- }