@inchurch/matcha-theme 22.38.2 → 22.38.3
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/abstracts/_colors.scss +291 -291
- package/abstracts/_elevation.scss +108 -108
- package/abstracts/_functions.scss +321 -321
- package/abstracts/_media-breakpoint.scss +26 -26
- package/abstracts/_theme-api.scss +224 -224
- package/abstracts/_typography.scss +128 -128
- package/base/_reset.scss +487 -487
- package/components/app-page-header.scss +260 -260
- package/components/matcha-accordion.scss +297 -297
- package/components/matcha-audio-player.scss +31 -31
- package/components/matcha-autocomplete.scss +145 -145
- package/components/matcha-avatar.scss +426 -426
- package/components/matcha-badge.scss +120 -120
- package/components/matcha-breadcrumb.scss +231 -231
- package/components/matcha-button-toggle.scss +484 -484
- package/components/matcha-buttons.scss +973 -973
- package/components/matcha-calendar.scss +253 -253
- package/components/matcha-cards.scss +212 -212
- package/components/matcha-chart-card.scss +53 -53
- package/components/matcha-checkbox.scss +266 -266
- package/components/matcha-chip.scss +311 -311
- package/components/matcha-color-pick.scss +34 -34
- package/components/matcha-command-palette.scss +316 -316
- package/components/matcha-crop.scss +419 -419
- package/components/matcha-date.scss +81 -81
- package/components/matcha-divider.scss +100 -100
- package/components/matcha-draggable.scss +23 -23
- package/components/matcha-drawer.scss +376 -376
- package/components/matcha-drop-image.scss +14 -14
- package/components/matcha-drop-list.scss +430 -430
- package/components/matcha-emoji.scss +69 -69
- package/components/matcha-empty-state.scss +230 -230
- package/components/matcha-file-uploader.scss +650 -637
- package/components/matcha-flag.scss +103 -103
- package/components/matcha-footer.scss +91 -91
- package/components/matcha-form-field.scss +883 -883
- package/components/matcha-form-section.scss +100 -100
- package/components/matcha-header.scss +135 -135
- package/components/matcha-highlight.scss +164 -164
- package/components/matcha-hint-text.scss +90 -90
- package/components/matcha-horizontal-tree.scss +247 -247
- package/components/matcha-icon.scss +111 -111
- package/components/matcha-image.scss +60 -60
- package/components/matcha-list.scss +211 -211
- package/components/matcha-menu.scss +99 -99
- package/components/matcha-modal.scss +210 -210
- package/components/matcha-nav.scss +770 -770
- package/components/matcha-notification.scss +417 -417
- package/components/matcha-option.scss +170 -170
- package/components/matcha-page-builder.scss +4196 -4196
- package/components/matcha-paginator.scss +699 -699
- package/components/matcha-panel.scss +216 -216
- package/components/matcha-period.scss +174 -174
- package/components/matcha-profile-card.scss +50 -50
- package/components/matcha-progress-bar.scss +355 -355
- package/components/matcha-radio.scss +325 -325
- package/components/matcha-ripple.scss +7 -7
- package/components/matcha-scrollbar.scss +33 -33
- package/components/matcha-scrollbox-shadow.scss +120 -120
- package/components/matcha-section.scss +102 -102
- package/components/matcha-select-multiple.scss +56 -56
- package/components/matcha-select.scss +629 -629
- package/components/matcha-skeleton.scss +182 -182
- package/components/matcha-slide-toggle.scss +369 -369
- package/components/matcha-slider.scss +285 -285
- package/components/matcha-snack-bar.scss +259 -259
- package/components/matcha-spin.scss +164 -164
- package/components/matcha-spinner.scss +97 -97
- package/components/matcha-stepper.scss +376 -376
- package/components/matcha-table-cell.scss +107 -107
- package/components/matcha-table.scss +722 -722
- package/components/matcha-tabs.scss +642 -642
- package/components/matcha-text-editor.scss +111 -111
- package/components/matcha-time.scss +33 -33
- package/components/matcha-timepicker.scss +13 -13
- package/components/matcha-toolbar.scss +366 -366
- package/components/matcha-tooltip.scss +235 -235
- package/components/matcha-tree-view.scss +636 -636
- package/layout/matcha-page-layout.scss +778 -778
- package/main.scss +334 -334
- package/package.json +1 -1
- package/tokens/_animations-tokens.scss +37 -37
- package/tokens/_breakpoints-tokens.scss +35 -35
- package/tokens/_color-tokens.scss +288 -288
- package/tokens/_elevation-tokens.scss +33 -33
- package/tokens/_emit-tokens.scss +329 -329
- package/tokens/_material-palette.scss +1149 -1149
- package/tokens/_primitives.scss +98 -98
- package/tokens/_semantic-aliases.scss +120 -120
- package/tokens/_spacing-tokens.scss +94 -94
- package/tokens/_static-tokens.scss +137 -137
- package/tokens/_typography-tokens.scss +65 -65
- package/vendors/charts.scss +90 -90
package/abstracts/_colors.scss
CHANGED
|
@@ -1,292 +1,292 @@
|
|
|
1
|
-
@use "functions" as *;
|
|
2
|
-
@use "../tokens/primitives" as *;
|
|
3
|
-
@use "sass:list";
|
|
4
|
-
|
|
5
|
-
// Shade-classes SÓ das primitivas do Figma ($matcha-primitives — gerado de
|
|
6
|
-
// tokens/matcha/primitives/colors.json pelo gen-primitives). Cada classe consome
|
|
7
|
-
// var(--matcha-prim-{família}-{shade}); o contraste é computado em build a partir
|
|
8
|
-
// do hex da primitiva (mode-independent — primitiva é valor fixo). Famílias não-paleta
|
|
9
|
-
// (common/brand/neutral) ficam de fora. Substitui a antiga matriz Material 21×14
|
|
10
|
-
// (getAllPalettes/$theme), que gerava "todas as cores" — agora só o que existe no Figma.
|
|
11
|
-
@mixin colors-classes-static($theme: ()) {
|
|
12
|
-
// theme-agnóstico: classes consomem var(--matcha-prim-*). $theme vestigial (default ()).
|
|
13
|
-
$-skip: ("common", "brand", "neutral");
|
|
14
|
-
|
|
15
|
-
@each $family, $shades in $matcha-primitives {
|
|
16
|
-
@if not list.index($-skip, $family) {
|
|
17
|
-
@each $shade, $hex in $shades {
|
|
18
|
-
.#{$family}-#{$shade} {
|
|
19
|
-
background-color: var(--matcha-prim-#{$family}-#{$shade}) !important;
|
|
20
|
-
color: matcha-contrast-on($hex) !important;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.#{$family}-#{$shade}-bg {
|
|
24
|
-
background-color: var(--matcha-prim-#{$family}-#{$shade}) !important;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.#{$family}-#{$shade}-fg {
|
|
28
|
-
color: var(--matcha-prim-#{$family}-#{$shade}) !important;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// -------------------------------------------------------------------------------------------------------------------
|
|
36
|
-
// @ Dynamic color classes generator
|
|
37
|
-
// -------------------------------------------------------------------------------------------------------------------
|
|
38
|
-
@mixin colors-classes-dynamic($theme: ()) {
|
|
39
|
-
// theme-agnóstico: classes consomem var(--matcha-color-*). $theme vestigial (default ()).
|
|
40
|
-
// Inclui colors-classes-static (linha abaixo) — app.theme chama SÓ este (sem dup).
|
|
41
|
-
|
|
42
|
-
// Nomes de cor que viram utility classes. TODOS (semânticas + paleta) consomem
|
|
43
|
-
// var(--matcha-color-*). As cores de paleta agora têm tokens emitidos no tema
|
|
44
|
-
// (ver _emit-tokens — base/alpha/contrast mode-flipped), então o caminho
|
|
45
|
-
// compile-time getRed($theme)/Material foi eliminado aqui. Value-preserving.
|
|
46
|
-
$color-names: "red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue", "cyan", "teal",
|
|
47
|
-
"green", "light-green", "lime", "yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey",
|
|
48
|
-
"primary", "accent", "danger", "warn", "success", "info", "disabled";
|
|
49
|
-
|
|
50
|
-
@include colors-classes-static($theme);
|
|
51
|
-
|
|
52
|
-
@each $colorName in $color-names {
|
|
53
|
-
.background-#{$colorName}-alpha {
|
|
54
|
-
background: var(--matcha-color-#{$colorName}-alpha);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.#{$colorName} .ripple {
|
|
58
|
-
background: var(--matcha-color-#{$colorName}-alpha);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.background-#{$colorName} {
|
|
62
|
-
background: var(--matcha-color-#{$colorName});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.border-color-#{$colorName} {
|
|
66
|
-
border-color: var(--matcha-color-#{$colorName});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// O loop gerava `-alpha` para background e color, mas não para border-color — então
|
|
70
|
-
// `border-color-green-alpha` era classe morta, sem aviso nenhum. O token existe.
|
|
71
|
-
.border-color-#{$colorName}-alpha {
|
|
72
|
-
border-color: var(--matcha-color-#{$colorName}-alpha);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.color-#{$colorName} {
|
|
76
|
-
color: var(--matcha-color-#{$colorName}) !important;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.fill-#{$colorName} {
|
|
80
|
-
fill: var(--matcha-color-#{$colorName});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.stroke-#{$colorName} {
|
|
84
|
-
stroke: var(--matcha-color-#{$colorName});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.color-#{$colorName}-alpha {
|
|
88
|
-
color: var(--matcha-color-#{$colorName}-alpha) !important;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.#{$colorName}-alpha {
|
|
92
|
-
background: var(--matcha-color-#{$colorName}-alpha);
|
|
93
|
-
color: var(--matcha-color-#{$colorName});
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.#{$colorName} {
|
|
97
|
-
background: var(--matcha-color-#{$colorName});
|
|
98
|
-
color: var(--matcha-color-#{$colorName}-contrast);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.background-basic-alpha {
|
|
103
|
-
background: var(--matcha-color-fg-alpha);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.basic .ripple {
|
|
107
|
-
background: var(--matcha-color-fg-alpha);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.background-basic {
|
|
111
|
-
background: var(--matcha-color-surface);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.border-color-basic {
|
|
115
|
-
border-color: var(--matcha-color-fg);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.border-color-surface-border {
|
|
119
|
-
border-color: var(--matcha-color-surface-border);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.color-basic {
|
|
123
|
-
color: var(--matcha-color-fg) !important;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.fill-basic {
|
|
127
|
-
fill: var(--matcha-color-surface);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.stroke-basic {
|
|
131
|
-
stroke: var(--matcha-color-fg);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.color-basic-alpha {
|
|
135
|
-
color: var(--matcha-color-fg-alpha) !important;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.basic-alpha {
|
|
139
|
-
background: var(--matcha-color-fg-alpha);
|
|
140
|
-
color: var(--matcha-color-fg);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.basic {
|
|
144
|
-
background: var(--matcha-color-surface);
|
|
145
|
-
color: var(--matcha-color-fg);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// Semantic surface & foreground aliases (used throughout templates)
|
|
149
|
-
.background-fg { background: var(--matcha-color-fg); }
|
|
150
|
-
.background-bg { background: var(--matcha-color-surface-bg); }
|
|
151
|
-
.background-bg-alpha { background: var(--matcha-color-surface-bg-alpha); }
|
|
152
|
-
.background-surface { background: var(--matcha-color-surface); }
|
|
153
|
-
.background-surface-alpha { background: var(--matcha-color-surface-card-alpha); }
|
|
154
|
-
.background-hint { background: var(--matcha-color-hint); }
|
|
155
|
-
.color-fg { color: var(--matcha-color-fg) !important; }
|
|
156
|
-
.color-hint { color: var(--matcha-color-hint) !important; }
|
|
157
|
-
.color-label { color: var(--matcha-color-text-label) !important; }
|
|
158
|
-
.color-placeholder { color: var(--matcha-color-text-placeholder) !important; }
|
|
159
|
-
|
|
160
|
-
// Papéis de TEXTO semânticos (o gerador acima cobre fg/hint/label/placeholder,
|
|
161
|
-
// mas NÃO os text-*). Consumidos amplamente nos templates do painel.
|
|
162
|
-
.color-text-primary { color: var(--matcha-color-text-primary) !important; }
|
|
163
|
-
.color-text-secondary { color: var(--matcha-color-text-secondary) !important; }
|
|
164
|
-
.color-text-muted { color: var(--matcha-color-text-muted) !important; }
|
|
165
|
-
.color-text-hint { color: var(--matcha-color-text-hint) !important; }
|
|
166
|
-
|
|
167
|
-
// -------------------------------------------------------------------------------------------------------------------
|
|
168
|
-
// @ Namespaces documentados no Figma que NÃO tinham classe utilitária
|
|
169
|
-
// -------------------------------------------------------------------------------------------------------------------
|
|
170
|
-
// Estes tokens sempre foram emitidos por matcha-css-custom-properties, mas nenhuma classe os
|
|
171
|
-
// alcançava: o consumidor só chegava neles por `var(--matcha-color-*)` dentro de SCSS de
|
|
172
|
-
// componente — exatamente o que a regra do painel proíbe ("nenhum estilo mora só na aplicação").
|
|
173
|
-
// Na prática isso empurrava o consumidor de volta pra paleta Material legada ou pra hex cravado.
|
|
174
|
-
//
|
|
175
|
-
// A lista é fechada de propósito, e cada nome existe em tokens/_color-tokens.scss. Ao acrescentar
|
|
176
|
-
// um token novo por lá, acrescente aqui também — ou ele nasce inalcançável por classe.
|
|
177
|
-
$-namespaced-tokens:
|
|
178
|
-
// Palette — cor de IDENTIDADE (categoria, marca, série). Não confundir com semântica de estado.
|
|
179
|
-
"palette-teal", "palette-teal-light", "palette-teal-alpha",
|
|
180
|
-
"palette-light-blue", "palette-light-blue-light", "palette-light-blue-alpha",
|
|
181
|
-
"palette-purple", "palette-purple-light", "palette-purple-alpha", "palette-purple-contrast",
|
|
182
|
-
"palette-pink", "palette-pink-light", "palette-pink-alpha",
|
|
183
|
-
"palette-orange", "palette-orange-light", "palette-orange-alpha",
|
|
184
|
-
"palette-yellow", "palette-yellow-light", "palette-yellow-alpha",
|
|
185
|
-
// Chart — séries de gráfico, com contrast e alpha
|
|
186
|
-
"chart-series-1", "chart-series-2", "chart-series-3", "chart-series-4", "chart-series-5",
|
|
187
|
-
"chart-series-1-contrast", "chart-series-2-contrast", "chart-series-3-contrast",
|
|
188
|
-
"chart-series-4-contrast", "chart-series-5-contrast",
|
|
189
|
-
"chart-series-1-alpha", "chart-series-2-alpha", "chart-series-3-alpha",
|
|
190
|
-
"chart-series-4-alpha", "chart-series-5-alpha",
|
|
191
|
-
// Icon
|
|
192
|
-
"icon-default", "icon-active",
|
|
193
|
-
// Interaction
|
|
194
|
-
"interaction-disabled-bg", "interaction-disabled-bg-alpha", "interaction-disabled-fg",
|
|
195
|
-
"interaction-disabled-border",
|
|
196
|
-
// Surface — as variantes que o bloco estático acima não cobria
|
|
197
|
-
"surface-bg-inverse", "surface-bg-inverse-alpha", "surface-card", "surface-card-strong",
|
|
198
|
-
"surface-inner", "surface-card-inverse", "surface-sidebar", "surface-sidebar-hover",
|
|
199
|
-
"surface-table-row-hover", "surface-border-strong", "surface-hover";
|
|
200
|
-
|
|
201
|
-
// Os cinco atributos, uniformemente — mesma convenção do loop de $color-names acima. Gerar só o
|
|
202
|
-
// "atributo que faz sentido" para cada token exigiria julgamento por nome, e a experiência do
|
|
203
|
-
// painel mostra que a lacuna é pior que o excesso: classe faltando vira hex cravado.
|
|
204
|
-
@each $-token in $-namespaced-tokens {
|
|
205
|
-
.background-#{$-token} { background: var(--matcha-color-#{$-token}); }
|
|
206
|
-
.border-color-#{$-token} { border-color: var(--matcha-color-#{$-token}); }
|
|
207
|
-
.color-#{$-token} { color: var(--matcha-color-#{$-token}) !important; }
|
|
208
|
-
.fill-#{$-token} { fill: var(--matcha-color-#{$-token}); }
|
|
209
|
-
.stroke-#{$-token} { stroke: var(--matcha-color-#{$-token}); }
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.color-unset {
|
|
213
|
-
color: unset;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.background-transparent {
|
|
217
|
-
background: transparent;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
$attributes: (
|
|
221
|
-
color,
|
|
222
|
-
border-color,
|
|
223
|
-
background,
|
|
224
|
-
fill,
|
|
225
|
-
stroke
|
|
226
|
-
);
|
|
227
|
-
|
|
228
|
-
@each $attribute in $attributes {
|
|
229
|
-
@if ($attribute !="color") {
|
|
230
|
-
.#{$attribute}-bg {
|
|
231
|
-
#{$attribute}: var(--matcha-color-surface-bg) !important;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.#{$attribute}-bg-alpha {
|
|
235
|
-
#{$attribute}: var(--matcha-color-surface-bg-alpha) !important;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.#{$attribute}-bg-inverse {
|
|
239
|
-
#{$attribute}: var(--matcha-color-surface-bg-inverse) !important;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.#{$attribute}-bg-alpha-inverse {
|
|
243
|
-
#{$attribute}: var(--matcha-color-surface-bg-inverse-alpha) !important;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.#{$attribute}-surface-inverse {
|
|
247
|
-
#{$attribute}: var(--matcha-color-surface-card-inverse) !important;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.#{$attribute}-fg,
|
|
252
|
-
.#{$attribute}-base,
|
|
253
|
-
.#{$attribute}-text {
|
|
254
|
-
#{$attribute}: var(--matcha-color-fg) !important;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.#{$attribute}-fg-inverse,
|
|
258
|
-
.#{$attribute}-base-inverse,
|
|
259
|
-
.#{$attribute}-text-inverse {
|
|
260
|
-
#{$attribute}: var(--matcha-color-fg-inverse) !important;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.#{$attribute}-surface {
|
|
264
|
-
#{$attribute}: var(--matcha-color-surface) !important;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.#{$attribute}-surface-alpha {
|
|
268
|
-
#{$attribute}: var(--matcha-color-surface-card-alpha) !important;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.#{$attribute}-placeholder {
|
|
272
|
-
#{$attribute}: var(--matcha-color-text-placeholder) !important;
|
|
273
|
-
|
|
274
|
-
&-alpha {
|
|
275
|
-
// placeholder-alpha (raro/legado) — usa o token grey-alpha runtime.
|
|
276
|
-
background: var(--matcha-color-grey-alpha) !important;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.#{$attribute}-label {
|
|
281
|
-
#{$attribute}: var(--matcha-color-text-label) !important;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.#{$attribute}-disabled {
|
|
285
|
-
#{$attribute}: var(--matcha-color-disabled) !important;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.#{$attribute}-disabled-icon {
|
|
289
|
-
#{$attribute}: var(--matcha-color-interaction-disabled-fg) !important;
|
|
290
|
-
}
|
|
291
|
-
}
|
|
1
|
+
@use "functions" as *;
|
|
2
|
+
@use "../tokens/primitives" as *;
|
|
3
|
+
@use "sass:list";
|
|
4
|
+
|
|
5
|
+
// Shade-classes SÓ das primitivas do Figma ($matcha-primitives — gerado de
|
|
6
|
+
// tokens/matcha/primitives/colors.json pelo gen-primitives). Cada classe consome
|
|
7
|
+
// var(--matcha-prim-{família}-{shade}); o contraste é computado em build a partir
|
|
8
|
+
// do hex da primitiva (mode-independent — primitiva é valor fixo). Famílias não-paleta
|
|
9
|
+
// (common/brand/neutral) ficam de fora. Substitui a antiga matriz Material 21×14
|
|
10
|
+
// (getAllPalettes/$theme), que gerava "todas as cores" — agora só o que existe no Figma.
|
|
11
|
+
@mixin colors-classes-static($theme: ()) {
|
|
12
|
+
// theme-agnóstico: classes consomem var(--matcha-prim-*). $theme vestigial (default ()).
|
|
13
|
+
$-skip: ("common", "brand", "neutral");
|
|
14
|
+
|
|
15
|
+
@each $family, $shades in $matcha-primitives {
|
|
16
|
+
@if not list.index($-skip, $family) {
|
|
17
|
+
@each $shade, $hex in $shades {
|
|
18
|
+
.#{$family}-#{$shade} {
|
|
19
|
+
background-color: var(--matcha-prim-#{$family}-#{$shade}) !important;
|
|
20
|
+
color: matcha-contrast-on($hex) !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.#{$family}-#{$shade}-bg {
|
|
24
|
+
background-color: var(--matcha-prim-#{$family}-#{$shade}) !important;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.#{$family}-#{$shade}-fg {
|
|
28
|
+
color: var(--matcha-prim-#{$family}-#{$shade}) !important;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// -------------------------------------------------------------------------------------------------------------------
|
|
36
|
+
// @ Dynamic color classes generator
|
|
37
|
+
// -------------------------------------------------------------------------------------------------------------------
|
|
38
|
+
@mixin colors-classes-dynamic($theme: ()) {
|
|
39
|
+
// theme-agnóstico: classes consomem var(--matcha-color-*). $theme vestigial (default ()).
|
|
40
|
+
// Inclui colors-classes-static (linha abaixo) — app.theme chama SÓ este (sem dup).
|
|
41
|
+
|
|
42
|
+
// Nomes de cor que viram utility classes. TODOS (semânticas + paleta) consomem
|
|
43
|
+
// var(--matcha-color-*). As cores de paleta agora têm tokens emitidos no tema
|
|
44
|
+
// (ver _emit-tokens — base/alpha/contrast mode-flipped), então o caminho
|
|
45
|
+
// compile-time getRed($theme)/Material foi eliminado aqui. Value-preserving.
|
|
46
|
+
$color-names: "red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue", "cyan", "teal",
|
|
47
|
+
"green", "light-green", "lime", "yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey",
|
|
48
|
+
"primary", "accent", "danger", "warn", "success", "info", "disabled";
|
|
49
|
+
|
|
50
|
+
@include colors-classes-static($theme);
|
|
51
|
+
|
|
52
|
+
@each $colorName in $color-names {
|
|
53
|
+
.background-#{$colorName}-alpha {
|
|
54
|
+
background: var(--matcha-color-#{$colorName}-alpha);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.#{$colorName} .ripple {
|
|
58
|
+
background: var(--matcha-color-#{$colorName}-alpha);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.background-#{$colorName} {
|
|
62
|
+
background: var(--matcha-color-#{$colorName});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.border-color-#{$colorName} {
|
|
66
|
+
border-color: var(--matcha-color-#{$colorName});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// O loop gerava `-alpha` para background e color, mas não para border-color — então
|
|
70
|
+
// `border-color-green-alpha` era classe morta, sem aviso nenhum. O token existe.
|
|
71
|
+
.border-color-#{$colorName}-alpha {
|
|
72
|
+
border-color: var(--matcha-color-#{$colorName}-alpha);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.color-#{$colorName} {
|
|
76
|
+
color: var(--matcha-color-#{$colorName}) !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.fill-#{$colorName} {
|
|
80
|
+
fill: var(--matcha-color-#{$colorName});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.stroke-#{$colorName} {
|
|
84
|
+
stroke: var(--matcha-color-#{$colorName});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.color-#{$colorName}-alpha {
|
|
88
|
+
color: var(--matcha-color-#{$colorName}-alpha) !important;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.#{$colorName}-alpha {
|
|
92
|
+
background: var(--matcha-color-#{$colorName}-alpha);
|
|
93
|
+
color: var(--matcha-color-#{$colorName});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.#{$colorName} {
|
|
97
|
+
background: var(--matcha-color-#{$colorName});
|
|
98
|
+
color: var(--matcha-color-#{$colorName}-contrast);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.background-basic-alpha {
|
|
103
|
+
background: var(--matcha-color-fg-alpha);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.basic .ripple {
|
|
107
|
+
background: var(--matcha-color-fg-alpha);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.background-basic {
|
|
111
|
+
background: var(--matcha-color-surface);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.border-color-basic {
|
|
115
|
+
border-color: var(--matcha-color-fg);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.border-color-surface-border {
|
|
119
|
+
border-color: var(--matcha-color-surface-border);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.color-basic {
|
|
123
|
+
color: var(--matcha-color-fg) !important;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.fill-basic {
|
|
127
|
+
fill: var(--matcha-color-surface);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.stroke-basic {
|
|
131
|
+
stroke: var(--matcha-color-fg);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.color-basic-alpha {
|
|
135
|
+
color: var(--matcha-color-fg-alpha) !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.basic-alpha {
|
|
139
|
+
background: var(--matcha-color-fg-alpha);
|
|
140
|
+
color: var(--matcha-color-fg);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.basic {
|
|
144
|
+
background: var(--matcha-color-surface);
|
|
145
|
+
color: var(--matcha-color-fg);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Semantic surface & foreground aliases (used throughout templates)
|
|
149
|
+
.background-fg { background: var(--matcha-color-fg); }
|
|
150
|
+
.background-bg { background: var(--matcha-color-surface-bg); }
|
|
151
|
+
.background-bg-alpha { background: var(--matcha-color-surface-bg-alpha); }
|
|
152
|
+
.background-surface { background: var(--matcha-color-surface); }
|
|
153
|
+
.background-surface-alpha { background: var(--matcha-color-surface-card-alpha); }
|
|
154
|
+
.background-hint { background: var(--matcha-color-hint); }
|
|
155
|
+
.color-fg { color: var(--matcha-color-fg) !important; }
|
|
156
|
+
.color-hint { color: var(--matcha-color-hint) !important; }
|
|
157
|
+
.color-label { color: var(--matcha-color-text-label) !important; }
|
|
158
|
+
.color-placeholder { color: var(--matcha-color-text-placeholder) !important; }
|
|
159
|
+
|
|
160
|
+
// Papéis de TEXTO semânticos (o gerador acima cobre fg/hint/label/placeholder,
|
|
161
|
+
// mas NÃO os text-*). Consumidos amplamente nos templates do painel.
|
|
162
|
+
.color-text-primary { color: var(--matcha-color-text-primary) !important; }
|
|
163
|
+
.color-text-secondary { color: var(--matcha-color-text-secondary) !important; }
|
|
164
|
+
.color-text-muted { color: var(--matcha-color-text-muted) !important; }
|
|
165
|
+
.color-text-hint { color: var(--matcha-color-text-hint) !important; }
|
|
166
|
+
|
|
167
|
+
// -------------------------------------------------------------------------------------------------------------------
|
|
168
|
+
// @ Namespaces documentados no Figma que NÃO tinham classe utilitária
|
|
169
|
+
// -------------------------------------------------------------------------------------------------------------------
|
|
170
|
+
// Estes tokens sempre foram emitidos por matcha-css-custom-properties, mas nenhuma classe os
|
|
171
|
+
// alcançava: o consumidor só chegava neles por `var(--matcha-color-*)` dentro de SCSS de
|
|
172
|
+
// componente — exatamente o que a regra do painel proíbe ("nenhum estilo mora só na aplicação").
|
|
173
|
+
// Na prática isso empurrava o consumidor de volta pra paleta Material legada ou pra hex cravado.
|
|
174
|
+
//
|
|
175
|
+
// A lista é fechada de propósito, e cada nome existe em tokens/_color-tokens.scss. Ao acrescentar
|
|
176
|
+
// um token novo por lá, acrescente aqui também — ou ele nasce inalcançável por classe.
|
|
177
|
+
$-namespaced-tokens:
|
|
178
|
+
// Palette — cor de IDENTIDADE (categoria, marca, série). Não confundir com semântica de estado.
|
|
179
|
+
"palette-teal", "palette-teal-light", "palette-teal-alpha",
|
|
180
|
+
"palette-light-blue", "palette-light-blue-light", "palette-light-blue-alpha",
|
|
181
|
+
"palette-purple", "palette-purple-light", "palette-purple-alpha", "palette-purple-contrast",
|
|
182
|
+
"palette-pink", "palette-pink-light", "palette-pink-alpha",
|
|
183
|
+
"palette-orange", "palette-orange-light", "palette-orange-alpha",
|
|
184
|
+
"palette-yellow", "palette-yellow-light", "palette-yellow-alpha",
|
|
185
|
+
// Chart — séries de gráfico, com contrast e alpha
|
|
186
|
+
"chart-series-1", "chart-series-2", "chart-series-3", "chart-series-4", "chart-series-5",
|
|
187
|
+
"chart-series-1-contrast", "chart-series-2-contrast", "chart-series-3-contrast",
|
|
188
|
+
"chart-series-4-contrast", "chart-series-5-contrast",
|
|
189
|
+
"chart-series-1-alpha", "chart-series-2-alpha", "chart-series-3-alpha",
|
|
190
|
+
"chart-series-4-alpha", "chart-series-5-alpha",
|
|
191
|
+
// Icon
|
|
192
|
+
"icon-default", "icon-active",
|
|
193
|
+
// Interaction
|
|
194
|
+
"interaction-disabled-bg", "interaction-disabled-bg-alpha", "interaction-disabled-fg",
|
|
195
|
+
"interaction-disabled-border",
|
|
196
|
+
// Surface — as variantes que o bloco estático acima não cobria
|
|
197
|
+
"surface-bg-inverse", "surface-bg-inverse-alpha", "surface-card", "surface-card-strong",
|
|
198
|
+
"surface-inner", "surface-card-inverse", "surface-sidebar", "surface-sidebar-hover",
|
|
199
|
+
"surface-table-row-hover", "surface-border-strong", "surface-hover";
|
|
200
|
+
|
|
201
|
+
// Os cinco atributos, uniformemente — mesma convenção do loop de $color-names acima. Gerar só o
|
|
202
|
+
// "atributo que faz sentido" para cada token exigiria julgamento por nome, e a experiência do
|
|
203
|
+
// painel mostra que a lacuna é pior que o excesso: classe faltando vira hex cravado.
|
|
204
|
+
@each $-token in $-namespaced-tokens {
|
|
205
|
+
.background-#{$-token} { background: var(--matcha-color-#{$-token}); }
|
|
206
|
+
.border-color-#{$-token} { border-color: var(--matcha-color-#{$-token}); }
|
|
207
|
+
.color-#{$-token} { color: var(--matcha-color-#{$-token}) !important; }
|
|
208
|
+
.fill-#{$-token} { fill: var(--matcha-color-#{$-token}); }
|
|
209
|
+
.stroke-#{$-token} { stroke: var(--matcha-color-#{$-token}); }
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.color-unset {
|
|
213
|
+
color: unset;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.background-transparent {
|
|
217
|
+
background: transparent;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
$attributes: (
|
|
221
|
+
color,
|
|
222
|
+
border-color,
|
|
223
|
+
background,
|
|
224
|
+
fill,
|
|
225
|
+
stroke
|
|
226
|
+
);
|
|
227
|
+
|
|
228
|
+
@each $attribute in $attributes {
|
|
229
|
+
@if ($attribute !="color") {
|
|
230
|
+
.#{$attribute}-bg {
|
|
231
|
+
#{$attribute}: var(--matcha-color-surface-bg) !important;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.#{$attribute}-bg-alpha {
|
|
235
|
+
#{$attribute}: var(--matcha-color-surface-bg-alpha) !important;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.#{$attribute}-bg-inverse {
|
|
239
|
+
#{$attribute}: var(--matcha-color-surface-bg-inverse) !important;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.#{$attribute}-bg-alpha-inverse {
|
|
243
|
+
#{$attribute}: var(--matcha-color-surface-bg-inverse-alpha) !important;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.#{$attribute}-surface-inverse {
|
|
247
|
+
#{$attribute}: var(--matcha-color-surface-card-inverse) !important;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.#{$attribute}-fg,
|
|
252
|
+
.#{$attribute}-base,
|
|
253
|
+
.#{$attribute}-text {
|
|
254
|
+
#{$attribute}: var(--matcha-color-fg) !important;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.#{$attribute}-fg-inverse,
|
|
258
|
+
.#{$attribute}-base-inverse,
|
|
259
|
+
.#{$attribute}-text-inverse {
|
|
260
|
+
#{$attribute}: var(--matcha-color-fg-inverse) !important;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.#{$attribute}-surface {
|
|
264
|
+
#{$attribute}: var(--matcha-color-surface) !important;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.#{$attribute}-surface-alpha {
|
|
268
|
+
#{$attribute}: var(--matcha-color-surface-card-alpha) !important;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.#{$attribute}-placeholder {
|
|
272
|
+
#{$attribute}: var(--matcha-color-text-placeholder) !important;
|
|
273
|
+
|
|
274
|
+
&-alpha {
|
|
275
|
+
// placeholder-alpha (raro/legado) — usa o token grey-alpha runtime.
|
|
276
|
+
background: var(--matcha-color-grey-alpha) !important;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.#{$attribute}-label {
|
|
281
|
+
#{$attribute}: var(--matcha-color-text-label) !important;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.#{$attribute}-disabled {
|
|
285
|
+
#{$attribute}: var(--matcha-color-disabled) !important;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.#{$attribute}-disabled-icon {
|
|
289
|
+
#{$attribute}: var(--matcha-color-interaction-disabled-fg) !important;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
292
|
}
|