@inchurch/matcha-theme 22.32.1 → 22.34.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.
|
@@ -46,16 +46,26 @@ matcha-chip {
|
|
|
46
46
|
&[interactive]:not([disabled]):not(.matcha-chip-disabled) {
|
|
47
47
|
cursor: pointer;
|
|
48
48
|
|
|
49
|
-
// Off interactive — Hover
|
|
49
|
+
// Off interactive — Hover: OVERLAY, nao troca de fundo ──
|
|
50
|
+
// `background-image` em vez de `background`: o chip pode ter fundo proprio
|
|
51
|
+
// (variant filled/filled-alpha, ou uma cor semantica), e trocar o `background`
|
|
52
|
+
// apagava esse fundo. Como esta regra tem especificidade MAIOR que a do mixin de
|
|
53
|
+
// cor (elemento + 2 atributos + pseudo-classe contra elemento + 2 atributos), um
|
|
54
|
+
// chip azul preenchido virava fundo verde-claro mantendo o texto branco do
|
|
55
|
+
// *-contrast — ilegivel. O overlay escurece o que estiver embaixo, seja qual for.
|
|
50
56
|
&:not([selected]):hover {
|
|
51
|
-
background:
|
|
57
|
+
background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08));
|
|
52
58
|
box-shadow: var(--matcha-shadow-1);
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
// Off interactive — Focus
|
|
61
|
+
// Off interactive — Focus: anel, nao recolorir a borda ──
|
|
62
|
+
// A borda do chip carrega a COR dele; pintar de primary no foco apagava essa
|
|
63
|
+
// informacao e ficava errado em qualquer cor que nao fosse primary. O outline
|
|
64
|
+
// desenha por fora, sem disputar.
|
|
56
65
|
&:not([selected]):focus-visible,
|
|
57
66
|
&:not([selected]):has(:focus-visible) {
|
|
58
|
-
border-
|
|
67
|
+
outline: var(--matcha-border-thin, 2px) solid var(--matcha-color-primary, #64B5F6);
|
|
68
|
+
outline-offset: var(--matcha-space-025, 2px);
|
|
59
69
|
}
|
|
60
70
|
}
|
|
61
71
|
|
|
@@ -75,10 +85,11 @@ matcha-chip {
|
|
|
75
85
|
box-shadow: var(--matcha-shadow-1);
|
|
76
86
|
}
|
|
77
87
|
|
|
78
|
-
// On interactive — Focus
|
|
88
|
+
// On interactive — Focus: anel por fora, bg e borda permanecem accent ──
|
|
79
89
|
&[interactive]:not([disabled]):not(.matcha-chip-disabled):focus-visible,
|
|
80
90
|
&[interactive]:not([disabled]):not(.matcha-chip-disabled):has(:focus-visible) {
|
|
81
|
-
border-
|
|
91
|
+
outline: var(--matcha-border-thin, 2px) solid var(--matcha-color-primary, #64B5F6);
|
|
92
|
+
outline-offset: var(--matcha-space-025, 2px);
|
|
82
93
|
}
|
|
83
94
|
}
|
|
84
95
|
|
|
@@ -209,7 +220,11 @@ matcha-chip .matcha-chip-remove [class*=" i-matcha-"] {
|
|
|
209
220
|
|
|
210
221
|
@mixin matcha-chip-theme($theme) {
|
|
211
222
|
// Cores semânticas além de accent — var(--matcha-color-*), sem getters/$theme.
|
|
212
|
-
|
|
223
|
+
// `accent` entra na lista como qualquer outra cor. Isso só é seguro porque o default do
|
|
224
|
+
// input `color` virou 'basic': quem não pede cor nenhuma continua no estilo base (outline
|
|
225
|
+
// text-hint), e o bloco de accent só alcança quem escreveu `color="accent"`. Enquanto o
|
|
226
|
+
// default era accent, esta mesma linha pintaria TODO chip do painel de verde.
|
|
227
|
+
$chip-colors: accent, primary, success, warn, danger, info;
|
|
213
228
|
|
|
214
229
|
matcha-chip {
|
|
215
230
|
@each $name in $chip-colors {
|
|
@@ -228,10 +243,14 @@ matcha-chip .matcha-chip-remove [class*=" i-matcha-"] {
|
|
|
228
243
|
&[variant="filled"] {
|
|
229
244
|
background-color: var(--matcha-color-#{$name});
|
|
230
245
|
border-color: var(--matcha-color-#{$name});
|
|
231
|
-
|
|
246
|
+
// `-text-on` antes de `-contrast`: em accent o contrast é LEGADO e sempre
|
|
247
|
+
// preto, o que no tema claro (accent = verde escuro) fica ilegível. O
|
|
248
|
+
// `-text-on` é theme-aware e é o que o ramo [selected] da base já usa.
|
|
249
|
+
// As outras cores não têm `-text-on` e caem no fallback, como antes.
|
|
250
|
+
color: var(--matcha-color-#{$name}-text-on, var(--matcha-color-#{$name}-contrast));
|
|
232
251
|
|
|
233
252
|
.matcha-chip-leading {
|
|
234
|
-
color: var(--matcha-color-#{$name}-contrast);
|
|
253
|
+
color: var(--matcha-color-#{$name}-text-on, var(--matcha-color-#{$name}-contrast));
|
|
235
254
|
}
|
|
236
255
|
}
|
|
237
256
|
|
|
@@ -233,96 +233,21 @@
|
|
|
233
233
|
// Multi-select — chips dentro do trigger
|
|
234
234
|
// ═══════════════════════════════════════════════════════════════════════
|
|
235
235
|
|
|
236
|
-
//
|
|
237
|
-
.
|
|
238
|
-
|
|
236
|
+
// Lista de chips FORA da caixa. O chip em si é o matcha-chip (atômico) — aqui só o
|
|
237
|
+
// empilhamento. As ~95 linhas que desenhavam um chip de 22px próprio saíram: existiam
|
|
238
|
+
// porque o atômico (36px) não cabia DENTRO da caixa, e os chips deixaram de ficar lá.
|
|
239
|
+
.matcha-select-chip-list {
|
|
239
240
|
display: flex;
|
|
240
241
|
flex-wrap: wrap;
|
|
241
242
|
align-items: center;
|
|
242
|
-
gap: var(--matcha-space-
|
|
243
|
-
|
|
244
|
-
overflow: hidden;
|
|
243
|
+
gap: var(--matcha-space-075, 6px);
|
|
244
|
+
margin-top: var(--matcha-space-100, 8px);
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
// Trigger em modo multi precisa de padding vertical leve pras chips respirarem
|
|
248
|
-
// e altura automática (cresce com número de chips).
|
|
249
|
-
.matcha-select-trigger.matcha-select-multiple {
|
|
250
|
-
padding-top: var(--matcha-space-025, 2px);
|
|
251
|
-
padding-bottom: var(--matcha-space-025, 2px);
|
|
252
|
-
min-height: inherit;
|
|
253
|
-
flex-wrap: nowrap;
|
|
254
|
-
}
|
|
255
247
|
|
|
256
|
-
// Chip individual — pill pequeno com label + × remove
|
|
257
|
-
.matcha-select-chip {
|
|
258
|
-
display: inline-flex;
|
|
259
|
-
align-items: center;
|
|
260
|
-
gap: var(--matcha-space-050, 4px);
|
|
261
|
-
max-width: 100%;
|
|
262
|
-
height: 22px;
|
|
263
|
-
padding: 0 var(--matcha-space-075, 6px);
|
|
264
|
-
background: var(--matcha-color-accent-2-surface, rgba(0,0,0,0.08));
|
|
265
|
-
color: var(--matcha-color-text-primary);
|
|
266
|
-
border-radius: var(--matcha-radius-pill, 12px);
|
|
267
|
-
font-family: var(--matcha-font-family);
|
|
268
|
-
font-size: 12px;
|
|
269
|
-
font-weight: 500;
|
|
270
|
-
line-height: 1;
|
|
271
|
-
letter-spacing: 0.1px;
|
|
272
|
-
white-space: nowrap;
|
|
273
|
-
user-select: none;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
// Label do chip (trunca com ellipsis em chips longos)
|
|
277
|
-
.matcha-select-chip-label {
|
|
278
|
-
overflow: hidden;
|
|
279
|
-
text-overflow: ellipsis;
|
|
280
|
-
white-space: nowrap;
|
|
281
|
-
max-width: 160px;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// Botão × individual de cada chip
|
|
285
|
-
.matcha-select-chip-remove {
|
|
286
|
-
display: inline-flex;
|
|
287
|
-
align-items: center;
|
|
288
|
-
justify-content: center;
|
|
289
|
-
width: 14px;
|
|
290
|
-
height: 14px;
|
|
291
|
-
padding: 0;
|
|
292
|
-
margin: 0;
|
|
293
|
-
background: transparent;
|
|
294
|
-
border: 0;
|
|
295
|
-
border-radius: 50%;
|
|
296
|
-
color: var(--matcha-color-text-placeholder);
|
|
297
|
-
cursor: pointer;
|
|
298
|
-
font-size: 14px;
|
|
299
|
-
line-height: 14px;
|
|
300
|
-
transition: background-color var(--matcha-duration-instant, 80ms) ease,
|
|
301
|
-
color var(--matcha-duration-instant, 80ms) ease;
|
|
302
248
|
|
|
303
|
-
&:hover {
|
|
304
|
-
background: var(--matcha-color-surface-hover, rgba(0,0,0,0.12));
|
|
305
|
-
color: var(--matcha-color-text-primary);
|
|
306
|
-
}
|
|
307
249
|
|
|
308
|
-
&:focus { outline: none; }
|
|
309
|
-
&:focus-visible {
|
|
310
|
-
outline: var(--matcha-border-thin, 2px) solid var(--matcha-color-primary);
|
|
311
|
-
outline-offset: 1px;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
250
|
|
|
315
|
-
// Chip sizes acompanham o size do form-field (opcional — mantém SM como default)
|
|
316
|
-
matcha-form-field[size="md"] matcha-select .matcha-select-chip,
|
|
317
|
-
matcha-form-field[size="medium"] matcha-select .matcha-select-chip {
|
|
318
|
-
height: 24px;
|
|
319
|
-
font-size: 13px;
|
|
320
|
-
}
|
|
321
|
-
matcha-form-field[size="lg"] matcha-select .matcha-select-chip,
|
|
322
|
-
matcha-form-field[size="large"] matcha-select .matcha-select-chip {
|
|
323
|
-
height: 28px;
|
|
324
|
-
font-size: 14px;
|
|
325
|
-
}
|
|
326
251
|
|
|
327
252
|
// ═══════════════════════════════════════════════════════════════════════
|
|
328
253
|
// Multi-select panel — checkmark + bulk actions header
|