@inchurch/matcha-theme 21.3.3 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstracts/_colors.scss +236 -229
- package/abstracts/_elevation.scss +108 -108
- package/abstracts/_functions.scss +321 -321
- package/abstracts/_media-breakpoint.scss +26 -26
- package/abstracts/_theme-api.scss +219 -219
- package/abstracts/_typography.scss +128 -128
- package/base/_reset.scss +445 -432
- package/components/app-page-header.scss +260 -260
- package/components/matcha-accordion.scss +293 -293
- package/components/matcha-audio-player.scss +31 -31
- package/components/matcha-autocomplete.scss +145 -145
- package/components/matcha-avatar.scss +440 -301
- package/components/matcha-badge.scss +120 -120
- package/components/matcha-breadcrumb.scss +231 -231
- package/components/matcha-button-toggle.scss +384 -384
- package/components/matcha-buttons.scss +913 -913
- package/components/matcha-calendar.scss +218 -218
- package/components/matcha-cards.scss +230 -230
- package/components/matcha-chart-card.scss +53 -53
- package/components/matcha-checkbox.scss +255 -255
- package/components/matcha-chip.scss +292 -292
- package/components/matcha-color-pick.scss +34 -34
- package/components/matcha-command-palette.scss +316 -316
- package/components/matcha-crop.scss +406 -406
- 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 +471 -471
- package/components/matcha-flag.scss +103 -103
- package/components/matcha-footer.scss +91 -91
- package/components/matcha-form-field.scss +606 -606
- 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 +316 -316
- package/components/matcha-icon.scss +98 -98
- package/components/matcha-image.scss +61 -61
- 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 +581 -581
- package/components/matcha-notification.scss +413 -413
- package/components/matcha-option.scss +170 -170
- package/components/matcha-page-builder.scss +4196 -4196
- package/components/matcha-paginator.scss +689 -689
- package/components/matcha-panel.scss +194 -194
- package/components/matcha-profile-card.scss +50 -50
- package/components/matcha-progress-bar.scss +313 -313
- package/components/matcha-radio.scss +320 -320
- 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 +667 -667
- package/components/matcha-skeleton.scss +155 -155
- 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-status-pill.scss +38 -18
- package/components/matcha-stepper.scss +376 -376
- package/components/matcha-table-cell.scss +74 -41
- package/components/matcha-table.scss +579 -578
- package/components/matcha-tabs.scss +600 -600
- package/components/matcha-text-editor.scss +105 -105
- package/components/matcha-time.scss +33 -33
- package/components/matcha-timepicker.scss +13 -13
- package/components/matcha-toolbar.scss +359 -359
- package/components/matcha-tooltip.scss +224 -224
- package/components/matcha-tree-view.scss +257 -212
- package/layout/matcha-page-layout.scss +778 -778
- package/main.scss +329 -329
- package/package.json +1 -1
- package/tokens/_animations-tokens.scss +37 -37
- package/tokens/_breakpoints-tokens.scss +35 -35
- package/tokens/_color-tokens.scss +274 -261
- package/tokens/_elevation-tokens.scss +33 -33
- package/tokens/_emit-tokens.scss +324 -324
- 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
|
@@ -1,292 +1,292 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
// =============================================================================
|
|
4
|
-
// matcha-chip.scss — Figma DSV3 matcha/chip (14567:467)
|
|
5
|
-
// 1:1 com spec: 36×* pill, 2px border, gap 8, padding 8/12.
|
|
6
|
-
// 8 variants visuais (Selected × State) implementados via attr/pseudo.
|
|
7
|
-
// =============================================================================
|
|
8
|
-
|
|
9
|
-
// ── Structural + canônico Figma (fora do mixin de tema) ────────────────────
|
|
10
|
-
|
|
11
|
-
matcha-chip {
|
|
12
|
-
// Layout
|
|
13
|
-
box-sizing: border-box;
|
|
14
|
-
display: inline-flex;
|
|
15
|
-
flex-direction: row;
|
|
16
|
-
align-items: center;
|
|
17
|
-
gap: var(--matcha-space-100, 8px);
|
|
18
|
-
padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
|
|
19
|
-
|
|
20
|
-
// Tipografia — Figma matcha/text/label-md (14/500/20)
|
|
21
|
-
font-family: var(--matcha-font-family, 'Manrope', sans-serif);
|
|
22
|
-
font-size: var(--matcha-text-label-md, 14px);
|
|
23
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
24
|
-
line-height: var(--matcha-leading-label-md, 20px);
|
|
25
|
-
|
|
26
|
-
// Box — Off Default
|
|
27
|
-
// Slots: --matcha-chip-border, --matcha-chip-bg, --matcha-chip-text
|
|
28
|
-
// permitem consumer override (cascade-friendly) sem specificity battle.
|
|
29
|
-
border: var(--matcha-border-thin, 2px) solid var(--matcha-chip-border, var(--matcha-color-text-hint, #9AA0A6));
|
|
30
|
-
border-radius: var(--matcha-radius-pill, 9999px);
|
|
31
|
-
background: var(--matcha-chip-bg, transparent);
|
|
32
|
-
color: var(--matcha-chip-text, var(--matcha-color-text-primary, #E8EAED));
|
|
33
|
-
|
|
34
|
-
// Comportamento (decorativo por padrão — sem cursor pointer, sem hover)
|
|
35
|
-
white-space: nowrap;
|
|
36
|
-
user-select: none;
|
|
37
|
-
cursor: default;
|
|
38
|
-
outline: none;
|
|
39
|
-
position: relative;
|
|
40
|
-
transition:
|
|
41
|
-
border-color var(--matcha-duration-instant, 80ms) var(--matcha-easing-standard, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
42
|
-
background var(--matcha-duration-instant, 80ms) var(--matcha-easing-standard, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
43
|
-
box-shadow var(--matcha-duration-instant, 80ms) var(--matcha-easing-standard, cubic-bezier(0.4, 0, 0.2, 1));
|
|
44
|
-
|
|
45
|
-
// ── Interactive (clicável) — cursor pointer + hover/focus effects ──
|
|
46
|
-
&[interactive]:not([disabled]):not(.matcha-chip-disabled) {
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
|
|
49
|
-
// Off interactive — Hover (bg accent-alpha 10% + shadow-1) ──
|
|
50
|
-
&:not([selected]):hover {
|
|
51
|
-
background: var(--matcha-color-accent-alpha, rgba(168, 217, 78, 0.1));
|
|
52
|
-
box-shadow: var(--matcha-shadow-1);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Off interactive — Focus (border vira primary) ──
|
|
56
|
-
&:not([selected]):focus-visible,
|
|
57
|
-
&:not([selected]):has(:focus-visible) {
|
|
58
|
-
border-color: var(--matcha-color-primary, #64B5F6);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// ── Selected (On) — bg + border accent, texto contrastante ──
|
|
63
|
-
// accent-text-on é theme-aware (branco no light onde accent=#009400 escuro;
|
|
64
|
-
// preto no dark onde accent=#A8D94E claro) — mesmo token de button/stepper/tabs.
|
|
65
|
-
// accent-contrast (legado, sempre preto) fica só de fallback.
|
|
66
|
-
&[selected] {
|
|
67
|
-
background: var(--matcha-color-accent, #A8D94E);
|
|
68
|
-
border-color: var(--matcha-color-accent, #A8D94E);
|
|
69
|
-
color: var(--matcha-color-accent-text-on, var(--matcha-color-accent-contrast, rgba(0, 0, 0, 0.87)));
|
|
70
|
-
|
|
71
|
-
// On interactive — Hover (overlay rgba(0,0,0,0.2) sobre accent) ──
|
|
72
|
-
&[interactive]:not([disabled]):not(.matcha-chip-disabled):hover {
|
|
73
|
-
background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
|
|
74
|
-
var(--matcha-color-accent, #A8D94E);
|
|
75
|
-
box-shadow: var(--matcha-shadow-1);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// On interactive — Focus (border vira primary, bg permanece accent) ──
|
|
79
|
-
&[interactive]:not([disabled]):not(.matcha-chip-disabled):focus-visible,
|
|
80
|
-
&[interactive]:not([disabled]):not(.matcha-chip-disabled):has(:focus-visible) {
|
|
81
|
-
border-color: var(--matcha-color-primary, #64B5F6);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// ── Disabled (Off) — opacity 0.4 (token) + border disabled-bg + texto disabled-fg ──
|
|
86
|
-
&[disabled],
|
|
87
|
-
&.matcha-chip-disabled {
|
|
88
|
-
pointer-events: none;
|
|
89
|
-
cursor: default;
|
|
90
|
-
opacity: var(--matcha-opacity-disabled, 0.4);
|
|
91
|
-
border-color: var(--matcha-color-interaction-disabled-bg, #282C34);
|
|
92
|
-
color: var(--matcha-color-interaction-disabled-fg, rgba(232, 234, 237, 0.38));
|
|
93
|
-
|
|
94
|
-
// Disabled + Selected — mantém bg accent, opacity faz o resto
|
|
95
|
-
&[selected] {
|
|
96
|
-
background: var(--matcha-color-accent, #A8D94E);
|
|
97
|
-
border-color: var(--matcha-color-accent, #A8D94E);
|
|
98
|
-
color: var(--matcha-color-interaction-disabled-fg, rgba(232, 234, 237, 0.38));
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@media (prefers-reduced-motion: reduce) {
|
|
103
|
-
transition: none;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// ── Leading icon — 18×18 cinza Off / preto On / disabled-fg Disabled ────────
|
|
108
|
-
.matcha-chip-leading {
|
|
109
|
-
display: inline-flex;
|
|
110
|
-
align-items: center;
|
|
111
|
-
justify-content: center;
|
|
112
|
-
flex-shrink: 0;
|
|
113
|
-
width: 18px;
|
|
114
|
-
height: 18px;
|
|
115
|
-
color: var(--matcha-color-text-hint, #9AA0A6); // Off Default
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
matcha-chip[selected] .matcha-chip-leading {
|
|
119
|
-
color: var(--matcha-color-accent-text-on, var(--matcha-color-accent-contrast, rgba(0, 0, 0, 0.87)));
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
matcha-chip[disabled] .matcha-chip-leading,
|
|
123
|
-
matcha-chip.matcha-chip-disabled .matcha-chip-leading {
|
|
124
|
-
color: var(--matcha-color-interaction-disabled-fg, rgba(232, 234, 237, 0.38));
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// ── Force matcha-icon dentro do chip a herdar a cor do parent ───────────
|
|
128
|
-
// O theme global do matcha-icon aplica color: var(--matcha-color-icon-default)
|
|
129
|
-
// que sobrescreve inherit. Aqui aumentamos especificidade pra herdar.
|
|
130
|
-
matcha-chip .matcha-chip-leading matcha-icon,
|
|
131
|
-
matcha-chip .matcha-chip-leading [class*=" i-matcha-"],
|
|
132
|
-
matcha-chip .matcha-chip-remove matcha-icon,
|
|
133
|
-
matcha-chip .matcha-chip-remove [class*=" i-matcha-"] {
|
|
134
|
-
color: inherit;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// ── Content (label) — herda color do parent matcha-chip ─────────────────────
|
|
138
|
-
.matcha-chip-content {
|
|
139
|
-
display: inline-flex;
|
|
140
|
-
align-items: center;
|
|
141
|
-
overflow: hidden;
|
|
142
|
-
text-overflow: ellipsis;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// ── Divider 1×18 — usa currentColor com opacity baixa pra seguir o contraste
|
|
146
|
-
// do chip em qualquer estado (Off=text-primary 24%, On=accent-contrast 24%).
|
|
147
|
-
// Figma spec textual diz "surface/border" mas isso fica invisível no
|
|
148
|
-
// selected (fundo claro). currentColor opaco resolve sem divergir do intent.
|
|
149
|
-
.matcha-chip-divider {
|
|
150
|
-
display: inline-block;
|
|
151
|
-
flex-shrink: 0;
|
|
152
|
-
width: 1px;
|
|
153
|
-
height: 18px;
|
|
154
|
-
background: currentColor;
|
|
155
|
-
opacity: 0.24;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// ── Remove button 18×18 — herda color do chip parent ───────────────────────
|
|
159
|
-
// State-layer 12% on hover via background-color (sem ::before pra consistência
|
|
160
|
-
// com chip principal que usa bg específico por estado).
|
|
161
|
-
.matcha-chip-remove {
|
|
162
|
-
display: inline-flex;
|
|
163
|
-
align-items: center;
|
|
164
|
-
justify-content: center;
|
|
165
|
-
flex-shrink: 0;
|
|
166
|
-
width: 18px;
|
|
167
|
-
height: 18px;
|
|
168
|
-
padding: 0;
|
|
169
|
-
border: none;
|
|
170
|
-
background: transparent;
|
|
171
|
-
border-radius: 50%;
|
|
172
|
-
color: inherit;
|
|
173
|
-
cursor: pointer;
|
|
174
|
-
outline: none;
|
|
175
|
-
transition: background-color var(--matcha-duration-instant, 80ms) linear;
|
|
176
|
-
|
|
177
|
-
&:hover:not([disabled]),
|
|
178
|
-
&:focus-visible:not([disabled]) {
|
|
179
|
-
background: color-mix(in srgb, currentColor 12%, transparent);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
&[disabled] {
|
|
183
|
-
cursor: default;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
@media (prefers-reduced-motion: reduce) {
|
|
187
|
-
transition: none;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// ── Chip list wrapper ──────────────────────────────────────────────────────
|
|
192
|
-
.matcha-chip-list-wrapper {
|
|
193
|
-
display: flex;
|
|
194
|
-
flex-wrap: wrap;
|
|
195
|
-
gap: var(--matcha-space-100, 8px);
|
|
196
|
-
align-items: center;
|
|
197
|
-
|
|
198
|
-
&.matcha-chip-list-vertical {
|
|
199
|
-
flex-direction: column;
|
|
200
|
-
align-items: flex-start;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// ============================================================================
|
|
205
|
-
// Theme mixin — extensão Angular (cores semânticas além de accent)
|
|
206
|
-
// Figma DSV3 só especifica accent — primary/success/warn/danger/info são
|
|
207
|
-
// extensão de produto (mesmo pattern do matcha-button).
|
|
208
|
-
// ============================================================================
|
|
209
|
-
|
|
210
|
-
@mixin matcha-chip-theme($theme) {
|
|
211
|
-
// Cores semânticas além de accent — var(--matcha-color-*), sem getters/$theme.
|
|
212
|
-
$chip-colors: primary, success, warn, danger, info;
|
|
213
|
-
|
|
214
|
-
matcha-chip {
|
|
215
|
-
@each $name in $chip-colors {
|
|
216
|
-
&[color="#{$name}"] {
|
|
217
|
-
// Off na cor: outline + texto na cor (visualmente quente)
|
|
218
|
-
border-color: var(--matcha-color-#{$name});
|
|
219
|
-
color: var(--matcha-color-#{$name});
|
|
220
|
-
|
|
221
|
-
.matcha-chip-leading {
|
|
222
|
-
color: var(--matcha-color-#{$name});
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Selected na cor: filled
|
|
226
|
-
&[selected],
|
|
227
|
-
// Explicit variant=filled — sem precisar [selected] (status estático)
|
|
228
|
-
&[variant="filled"] {
|
|
229
|
-
background-color: var(--matcha-color-#{$name});
|
|
230
|
-
border-color: var(--matcha-color-#{$name});
|
|
231
|
-
color: var(--matcha-color-#{$name}-contrast);
|
|
232
|
-
|
|
233
|
-
.matcha-chip-leading {
|
|
234
|
-
color: var(--matcha-color-#{$name}-contrast);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// ── Variant filled-alpha (canon status pill DSV3) ──
|
|
239
|
-
// bg alpha 10% da cor + border transparente + texto cor sólida.
|
|
240
|
-
// Sem precisar [selected]. Usado pra status: Publicado/Rascunho/Arquivado/etc.
|
|
241
|
-
&[variant="filled-alpha"] {
|
|
242
|
-
background-color: var(--matcha-color-feedback-#{$name}-alpha, var(--matcha-color-#{$name}-alpha));
|
|
243
|
-
border-color: transparent;
|
|
244
|
-
color: var(--matcha-color-#{$name});
|
|
245
|
-
|
|
246
|
-
.matcha-chip-leading {
|
|
247
|
-
color: var(--matcha-color-#{$name});
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
// Chip list disabled (propaga visual)
|
|
255
|
-
.matcha-chip-list-disabled,
|
|
256
|
-
[matcha-chip-list][disabled] {
|
|
257
|
-
pointer-events: none;
|
|
258
|
-
matcha-chip {
|
|
259
|
-
opacity: 0.4;
|
|
260
|
-
border-color: var(--matcha-color-interaction-disabled-bg);
|
|
261
|
-
color: var(--matcha-color-interaction-disabled-fg);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
// ── Forced colors ──
|
|
267
|
-
@media (forced-colors: active) {
|
|
268
|
-
matcha-chip {
|
|
269
|
-
border: 1px solid CanvasText !important;
|
|
270
|
-
background: Canvas !important;
|
|
271
|
-
color: CanvasText !important;
|
|
272
|
-
|
|
273
|
-
&:focus-visible {
|
|
274
|
-
outline: 2px solid CanvasText !important;
|
|
275
|
-
outline-offset: 2px;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
&[disabled],
|
|
279
|
-
&.is-disabled {
|
|
280
|
-
color: GrayText !important;
|
|
281
|
-
border-color: GrayText !important;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
// ── Print ──
|
|
287
|
-
@media print {
|
|
288
|
-
matcha-chip {
|
|
289
|
-
border: 1px solid currentColor !important;
|
|
290
|
-
background: transparent !important;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-chip.scss — Figma DSV3 matcha/chip (14567:467)
|
|
5
|
+
// 1:1 com spec: 36×* pill, 2px border, gap 8, padding 8/12.
|
|
6
|
+
// 8 variants visuais (Selected × State) implementados via attr/pseudo.
|
|
7
|
+
// =============================================================================
|
|
8
|
+
|
|
9
|
+
// ── Structural + canônico Figma (fora do mixin de tema) ────────────────────
|
|
10
|
+
|
|
11
|
+
matcha-chip {
|
|
12
|
+
// Layout
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: var(--matcha-space-100, 8px);
|
|
18
|
+
padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
|
|
19
|
+
|
|
20
|
+
// Tipografia — Figma matcha/text/label-md (14/500/20)
|
|
21
|
+
font-family: var(--matcha-font-family, 'Manrope', sans-serif);
|
|
22
|
+
font-size: var(--matcha-text-label-md, 14px);
|
|
23
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
24
|
+
line-height: var(--matcha-leading-label-md, 20px);
|
|
25
|
+
|
|
26
|
+
// Box — Off Default
|
|
27
|
+
// Slots: --matcha-chip-border, --matcha-chip-bg, --matcha-chip-text
|
|
28
|
+
// permitem consumer override (cascade-friendly) sem specificity battle.
|
|
29
|
+
border: var(--matcha-border-thin, 2px) solid var(--matcha-chip-border, var(--matcha-color-text-hint, #9AA0A6));
|
|
30
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
31
|
+
background: var(--matcha-chip-bg, transparent);
|
|
32
|
+
color: var(--matcha-chip-text, var(--matcha-color-text-primary, #E8EAED));
|
|
33
|
+
|
|
34
|
+
// Comportamento (decorativo por padrão — sem cursor pointer, sem hover)
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
user-select: none;
|
|
37
|
+
cursor: default;
|
|
38
|
+
outline: none;
|
|
39
|
+
position: relative;
|
|
40
|
+
transition:
|
|
41
|
+
border-color var(--matcha-duration-instant, 80ms) var(--matcha-easing-standard, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
42
|
+
background var(--matcha-duration-instant, 80ms) var(--matcha-easing-standard, cubic-bezier(0.4, 0, 0.2, 1)),
|
|
43
|
+
box-shadow var(--matcha-duration-instant, 80ms) var(--matcha-easing-standard, cubic-bezier(0.4, 0, 0.2, 1));
|
|
44
|
+
|
|
45
|
+
// ── Interactive (clicável) — cursor pointer + hover/focus effects ──
|
|
46
|
+
&[interactive]:not([disabled]):not(.matcha-chip-disabled) {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
|
|
49
|
+
// Off interactive — Hover (bg accent-alpha 10% + shadow-1) ──
|
|
50
|
+
&:not([selected]):hover {
|
|
51
|
+
background: var(--matcha-color-accent-alpha, rgba(168, 217, 78, 0.1));
|
|
52
|
+
box-shadow: var(--matcha-shadow-1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Off interactive — Focus (border vira primary) ──
|
|
56
|
+
&:not([selected]):focus-visible,
|
|
57
|
+
&:not([selected]):has(:focus-visible) {
|
|
58
|
+
border-color: var(--matcha-color-primary, #64B5F6);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// ── Selected (On) — bg + border accent, texto contrastante ──
|
|
63
|
+
// accent-text-on é theme-aware (branco no light onde accent=#009400 escuro;
|
|
64
|
+
// preto no dark onde accent=#A8D94E claro) — mesmo token de button/stepper/tabs.
|
|
65
|
+
// accent-contrast (legado, sempre preto) fica só de fallback.
|
|
66
|
+
&[selected] {
|
|
67
|
+
background: var(--matcha-color-accent, #A8D94E);
|
|
68
|
+
border-color: var(--matcha-color-accent, #A8D94E);
|
|
69
|
+
color: var(--matcha-color-accent-text-on, var(--matcha-color-accent-contrast, rgba(0, 0, 0, 0.87)));
|
|
70
|
+
|
|
71
|
+
// On interactive — Hover (overlay rgba(0,0,0,0.2) sobre accent) ──
|
|
72
|
+
&[interactive]:not([disabled]):not(.matcha-chip-disabled):hover {
|
|
73
|
+
background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
|
|
74
|
+
var(--matcha-color-accent, #A8D94E);
|
|
75
|
+
box-shadow: var(--matcha-shadow-1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// On interactive — Focus (border vira primary, bg permanece accent) ──
|
|
79
|
+
&[interactive]:not([disabled]):not(.matcha-chip-disabled):focus-visible,
|
|
80
|
+
&[interactive]:not([disabled]):not(.matcha-chip-disabled):has(:focus-visible) {
|
|
81
|
+
border-color: var(--matcha-color-primary, #64B5F6);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ── Disabled (Off) — opacity 0.4 (token) + border disabled-bg + texto disabled-fg ──
|
|
86
|
+
&[disabled],
|
|
87
|
+
&.matcha-chip-disabled {
|
|
88
|
+
pointer-events: none;
|
|
89
|
+
cursor: default;
|
|
90
|
+
opacity: var(--matcha-opacity-disabled, 0.4);
|
|
91
|
+
border-color: var(--matcha-color-interaction-disabled-bg, #282C34);
|
|
92
|
+
color: var(--matcha-color-interaction-disabled-fg, rgba(232, 234, 237, 0.38));
|
|
93
|
+
|
|
94
|
+
// Disabled + Selected — mantém bg accent, opacity faz o resto
|
|
95
|
+
&[selected] {
|
|
96
|
+
background: var(--matcha-color-accent, #A8D94E);
|
|
97
|
+
border-color: var(--matcha-color-accent, #A8D94E);
|
|
98
|
+
color: var(--matcha-color-interaction-disabled-fg, rgba(232, 234, 237, 0.38));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media (prefers-reduced-motion: reduce) {
|
|
103
|
+
transition: none;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// ── Leading icon — 18×18 cinza Off / preto On / disabled-fg Disabled ────────
|
|
108
|
+
.matcha-chip-leading {
|
|
109
|
+
display: inline-flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
flex-shrink: 0;
|
|
113
|
+
width: 18px;
|
|
114
|
+
height: 18px;
|
|
115
|
+
color: var(--matcha-color-text-hint, #9AA0A6); // Off Default
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
matcha-chip[selected] .matcha-chip-leading {
|
|
119
|
+
color: var(--matcha-color-accent-text-on, var(--matcha-color-accent-contrast, rgba(0, 0, 0, 0.87)));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
matcha-chip[disabled] .matcha-chip-leading,
|
|
123
|
+
matcha-chip.matcha-chip-disabled .matcha-chip-leading {
|
|
124
|
+
color: var(--matcha-color-interaction-disabled-fg, rgba(232, 234, 237, 0.38));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// ── Force matcha-icon dentro do chip a herdar a cor do parent ───────────
|
|
128
|
+
// O theme global do matcha-icon aplica color: var(--matcha-color-icon-default)
|
|
129
|
+
// que sobrescreve inherit. Aqui aumentamos especificidade pra herdar.
|
|
130
|
+
matcha-chip .matcha-chip-leading matcha-icon,
|
|
131
|
+
matcha-chip .matcha-chip-leading [class*=" i-matcha-"],
|
|
132
|
+
matcha-chip .matcha-chip-remove matcha-icon,
|
|
133
|
+
matcha-chip .matcha-chip-remove [class*=" i-matcha-"] {
|
|
134
|
+
color: inherit;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ── Content (label) — herda color do parent matcha-chip ─────────────────────
|
|
138
|
+
.matcha-chip-content {
|
|
139
|
+
display: inline-flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
overflow: hidden;
|
|
142
|
+
text-overflow: ellipsis;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// ── Divider 1×18 — usa currentColor com opacity baixa pra seguir o contraste
|
|
146
|
+
// do chip em qualquer estado (Off=text-primary 24%, On=accent-contrast 24%).
|
|
147
|
+
// Figma spec textual diz "surface/border" mas isso fica invisível no
|
|
148
|
+
// selected (fundo claro). currentColor opaco resolve sem divergir do intent.
|
|
149
|
+
.matcha-chip-divider {
|
|
150
|
+
display: inline-block;
|
|
151
|
+
flex-shrink: 0;
|
|
152
|
+
width: 1px;
|
|
153
|
+
height: 18px;
|
|
154
|
+
background: currentColor;
|
|
155
|
+
opacity: 0.24;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// ── Remove button 18×18 — herda color do chip parent ───────────────────────
|
|
159
|
+
// State-layer 12% on hover via background-color (sem ::before pra consistência
|
|
160
|
+
// com chip principal que usa bg específico por estado).
|
|
161
|
+
.matcha-chip-remove {
|
|
162
|
+
display: inline-flex;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
flex-shrink: 0;
|
|
166
|
+
width: 18px;
|
|
167
|
+
height: 18px;
|
|
168
|
+
padding: 0;
|
|
169
|
+
border: none;
|
|
170
|
+
background: transparent;
|
|
171
|
+
border-radius: 50%;
|
|
172
|
+
color: inherit;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
outline: none;
|
|
175
|
+
transition: background-color var(--matcha-duration-instant, 80ms) linear;
|
|
176
|
+
|
|
177
|
+
&:hover:not([disabled]),
|
|
178
|
+
&:focus-visible:not([disabled]) {
|
|
179
|
+
background: color-mix(in srgb, currentColor 12%, transparent);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&[disabled] {
|
|
183
|
+
cursor: default;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@media (prefers-reduced-motion: reduce) {
|
|
187
|
+
transition: none;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// ── Chip list wrapper ──────────────────────────────────────────────────────
|
|
192
|
+
.matcha-chip-list-wrapper {
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-wrap: wrap;
|
|
195
|
+
gap: var(--matcha-space-100, 8px);
|
|
196
|
+
align-items: center;
|
|
197
|
+
|
|
198
|
+
&.matcha-chip-list-vertical {
|
|
199
|
+
flex-direction: column;
|
|
200
|
+
align-items: flex-start;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// ============================================================================
|
|
205
|
+
// Theme mixin — extensão Angular (cores semânticas além de accent)
|
|
206
|
+
// Figma DSV3 só especifica accent — primary/success/warn/danger/info são
|
|
207
|
+
// extensão de produto (mesmo pattern do matcha-button).
|
|
208
|
+
// ============================================================================
|
|
209
|
+
|
|
210
|
+
@mixin matcha-chip-theme($theme) {
|
|
211
|
+
// Cores semânticas além de accent — var(--matcha-color-*), sem getters/$theme.
|
|
212
|
+
$chip-colors: primary, success, warn, danger, info;
|
|
213
|
+
|
|
214
|
+
matcha-chip {
|
|
215
|
+
@each $name in $chip-colors {
|
|
216
|
+
&[color="#{$name}"] {
|
|
217
|
+
// Off na cor: outline + texto na cor (visualmente quente)
|
|
218
|
+
border-color: var(--matcha-color-#{$name});
|
|
219
|
+
color: var(--matcha-color-#{$name});
|
|
220
|
+
|
|
221
|
+
.matcha-chip-leading {
|
|
222
|
+
color: var(--matcha-color-#{$name});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Selected na cor: filled
|
|
226
|
+
&[selected],
|
|
227
|
+
// Explicit variant=filled — sem precisar [selected] (status estático)
|
|
228
|
+
&[variant="filled"] {
|
|
229
|
+
background-color: var(--matcha-color-#{$name});
|
|
230
|
+
border-color: var(--matcha-color-#{$name});
|
|
231
|
+
color: var(--matcha-color-#{$name}-contrast);
|
|
232
|
+
|
|
233
|
+
.matcha-chip-leading {
|
|
234
|
+
color: var(--matcha-color-#{$name}-contrast);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// ── Variant filled-alpha (canon status pill DSV3) ──
|
|
239
|
+
// bg alpha 10% da cor + border transparente + texto cor sólida.
|
|
240
|
+
// Sem precisar [selected]. Usado pra status: Publicado/Rascunho/Arquivado/etc.
|
|
241
|
+
&[variant="filled-alpha"] {
|
|
242
|
+
background-color: var(--matcha-color-feedback-#{$name}-alpha, var(--matcha-color-#{$name}-alpha));
|
|
243
|
+
border-color: transparent;
|
|
244
|
+
color: var(--matcha-color-#{$name});
|
|
245
|
+
|
|
246
|
+
.matcha-chip-leading {
|
|
247
|
+
color: var(--matcha-color-#{$name});
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Chip list disabled (propaga visual)
|
|
255
|
+
.matcha-chip-list-disabled,
|
|
256
|
+
[matcha-chip-list][disabled] {
|
|
257
|
+
pointer-events: none;
|
|
258
|
+
matcha-chip {
|
|
259
|
+
opacity: 0.4;
|
|
260
|
+
border-color: var(--matcha-color-interaction-disabled-bg);
|
|
261
|
+
color: var(--matcha-color-interaction-disabled-fg);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// ── Forced colors ──
|
|
267
|
+
@media (forced-colors: active) {
|
|
268
|
+
matcha-chip {
|
|
269
|
+
border: 1px solid CanvasText !important;
|
|
270
|
+
background: Canvas !important;
|
|
271
|
+
color: CanvasText !important;
|
|
272
|
+
|
|
273
|
+
&:focus-visible {
|
|
274
|
+
outline: 2px solid CanvasText !important;
|
|
275
|
+
outline-offset: 2px;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&[disabled],
|
|
279
|
+
&.is-disabled {
|
|
280
|
+
color: GrayText !important;
|
|
281
|
+
border-color: GrayText !important;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// ── Print ──
|
|
287
|
+
@media print {
|
|
288
|
+
matcha-chip {
|
|
289
|
+
border: 1px solid currentColor !important;
|
|
290
|
+
background: transparent !important;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
// =============================================================================
|
|
4
|
-
// matcha-color-pick.scss — Color picker with radio selection
|
|
5
|
-
// Aligned with Figma matcha/color-pick
|
|
6
|
-
// Angular: matcha-color-pick
|
|
7
|
-
// =============================================================================
|
|
8
|
-
|
|
9
|
-
@mixin matcha-color-pick-theme($theme) {
|
|
10
|
-
|
|
11
|
-
.matcha-color-pick {
|
|
12
|
-
.is-selected {
|
|
13
|
-
box-shadow: inset 0 0 0 var(--matcha-border-thin, 2px) var(--matcha-color-surface);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
19
|
-
|
|
20
|
-
.matcha-color-pick {
|
|
21
|
-
.mat-radio-group {
|
|
22
|
-
.mat-radio-button {
|
|
23
|
-
.mat-radio-label {
|
|
24
|
-
.mat-radio-label-content {
|
|
25
|
-
width: 100%;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.is-selected {
|
|
32
|
-
border-radius: var(--matcha-radius-lg, 8px);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-color-pick.scss — Color picker with radio selection
|
|
5
|
+
// Aligned with Figma matcha/color-pick
|
|
6
|
+
// Angular: matcha-color-pick
|
|
7
|
+
// =============================================================================
|
|
8
|
+
|
|
9
|
+
@mixin matcha-color-pick-theme($theme) {
|
|
10
|
+
|
|
11
|
+
.matcha-color-pick {
|
|
12
|
+
.is-selected {
|
|
13
|
+
box-shadow: inset 0 0 0 var(--matcha-border-thin, 2px) var(--matcha-color-surface);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
19
|
+
|
|
20
|
+
.matcha-color-pick {
|
|
21
|
+
.mat-radio-group {
|
|
22
|
+
.mat-radio-button {
|
|
23
|
+
.mat-radio-label {
|
|
24
|
+
.mat-radio-label-content {
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.is-selected {
|
|
32
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
33
|
+
}
|
|
34
|
+
}
|