@inchurch/matcha-theme 22.38.2 → 22.38.4

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.
Files changed (93) hide show
  1. package/abstracts/_colors.scss +291 -291
  2. package/abstracts/_elevation.scss +108 -108
  3. package/abstracts/_functions.scss +321 -321
  4. package/abstracts/_media-breakpoint.scss +26 -26
  5. package/abstracts/_theme-api.scss +224 -224
  6. package/abstracts/_typography.scss +128 -128
  7. package/base/_reset.scss +487 -487
  8. package/components/app-page-header.scss +260 -260
  9. package/components/matcha-accordion.scss +297 -297
  10. package/components/matcha-audio-player.scss +31 -31
  11. package/components/matcha-autocomplete.scss +145 -145
  12. package/components/matcha-avatar.scss +426 -426
  13. package/components/matcha-badge.scss +120 -120
  14. package/components/matcha-breadcrumb.scss +231 -231
  15. package/components/matcha-button-toggle.scss +484 -484
  16. package/components/matcha-buttons.scss +973 -973
  17. package/components/matcha-calendar.scss +253 -253
  18. package/components/matcha-cards.scss +212 -212
  19. package/components/matcha-chart-card.scss +53 -53
  20. package/components/matcha-checkbox.scss +266 -266
  21. package/components/matcha-chip.scss +311 -311
  22. package/components/matcha-color-pick.scss +34 -34
  23. package/components/matcha-command-palette.scss +316 -316
  24. package/components/matcha-crop.scss +419 -419
  25. package/components/matcha-date.scss +81 -81
  26. package/components/matcha-divider.scss +100 -100
  27. package/components/matcha-draggable.scss +23 -23
  28. package/components/matcha-drawer.scss +376 -376
  29. package/components/matcha-drop-image.scss +14 -14
  30. package/components/matcha-drop-list.scss +430 -430
  31. package/components/matcha-emoji.scss +69 -69
  32. package/components/matcha-empty-state.scss +230 -230
  33. package/components/matcha-file-uploader.scss +650 -637
  34. package/components/matcha-flag.scss +103 -103
  35. package/components/matcha-footer.scss +91 -91
  36. package/components/matcha-form-field.scss +883 -883
  37. package/components/matcha-form-section.scss +100 -100
  38. package/components/matcha-header.scss +135 -135
  39. package/components/matcha-highlight.scss +164 -164
  40. package/components/matcha-hint-text.scss +90 -90
  41. package/components/matcha-horizontal-tree.scss +247 -247
  42. package/components/matcha-icon.scss +111 -111
  43. package/components/matcha-image.scss +60 -60
  44. package/components/matcha-list.scss +211 -211
  45. package/components/matcha-menu.scss +99 -99
  46. package/components/matcha-modal.scss +210 -210
  47. package/components/matcha-nav.scss +770 -770
  48. package/components/matcha-notification.scss +417 -417
  49. package/components/matcha-option.scss +170 -170
  50. package/components/matcha-page-builder.scss +4196 -4196
  51. package/components/matcha-paginator.scss +699 -699
  52. package/components/matcha-panel.scss +216 -216
  53. package/components/matcha-period.scss +174 -174
  54. package/components/matcha-profile-card.scss +50 -50
  55. package/components/matcha-progress-bar.scss +355 -355
  56. package/components/matcha-radio.scss +325 -325
  57. package/components/matcha-ripple.scss +7 -7
  58. package/components/matcha-scrollbar.scss +33 -33
  59. package/components/matcha-scrollbox-shadow.scss +120 -120
  60. package/components/matcha-section.scss +102 -102
  61. package/components/matcha-select-multiple.scss +56 -56
  62. package/components/matcha-select.scss +629 -629
  63. package/components/matcha-skeleton.scss +182 -182
  64. package/components/matcha-slide-toggle.scss +369 -369
  65. package/components/matcha-slider.scss +285 -285
  66. package/components/matcha-snack-bar.scss +259 -259
  67. package/components/matcha-spin.scss +164 -164
  68. package/components/matcha-spinner.scss +97 -97
  69. package/components/matcha-stepper.scss +376 -376
  70. package/components/matcha-table-cell.scss +107 -107
  71. package/components/matcha-table.scss +722 -722
  72. package/components/matcha-tabs.scss +642 -642
  73. package/components/matcha-text-editor.scss +111 -111
  74. package/components/matcha-time.scss +33 -33
  75. package/components/matcha-timepicker.scss +13 -13
  76. package/components/matcha-toolbar.scss +366 -366
  77. package/components/matcha-tooltip.scss +235 -235
  78. package/components/matcha-tree-view.scss +636 -636
  79. package/layout/matcha-page-layout.scss +778 -778
  80. package/main.scss +334 -334
  81. package/package.json +1 -1
  82. package/tokens/_animations-tokens.scss +37 -37
  83. package/tokens/_breakpoints-tokens.scss +35 -35
  84. package/tokens/_color-tokens.scss +288 -288
  85. package/tokens/_elevation-tokens.scss +33 -33
  86. package/tokens/_emit-tokens.scss +329 -329
  87. package/tokens/_material-palette.scss +1149 -1149
  88. package/tokens/_primitives.scss +98 -98
  89. package/tokens/_semantic-aliases.scss +120 -120
  90. package/tokens/_spacing-tokens.scss +94 -94
  91. package/tokens/_static-tokens.scss +137 -137
  92. package/tokens/_typography-tokens.scss +65 -65
  93. package/vendors/charts.scss +90 -90
@@ -1,629 +1,629 @@
1
- // =============================================================================
2
- // matcha-select.scss — Select dropdown trigger
3
- // Aligned with Figma matcha/field/select (tokenized)
4
- // =============================================================================
5
-
6
- // ── Structural (outside mixin) ──────────────────────────────────────────────
7
-
8
- .matcha-select-trigger {
9
- position: relative;
10
- overflow: hidden;
11
-
12
- // State layer (MD3 style) — usado apenas em selects STANDALONE.
13
- // Dentro de matcha-form-field a gente desliga: o hover do field (border) cuida.
14
- &::before {
15
- content: '';
16
- position: absolute;
17
- inset: 0;
18
- background: currentColor;
19
- opacity: 0;
20
- border-radius: inherit;
21
- pointer-events: none;
22
- transition: opacity var(--matcha-duration-instant, 80ms) linear;
23
- }
24
-
25
- &:hover:not([disabled])::before { opacity: var(--matcha-state-hover, 0.08); }
26
- &:active:not([disabled])::before { opacity: var(--matcha-state-active, 0.12); }
27
-
28
- &[disabled] { pointer-events: none; cursor: default; }
29
-
30
- @media (prefers-reduced-motion: reduce) {
31
- &::before { transition: none; }
32
- }
33
- }
34
-
35
- // Dentro de matcha-form-field: hover fica a cargo do form-field (border-color).
36
- // Remove o tint do state layer pra não duplicar feedback visual.
37
- .matcha-form-field .matcha-select-trigger::before {
38
- display: none;
39
- }
40
-
41
- // ── Theme mixin ─────────────────────────────────────────────────────────────
42
-
43
- @mixin matcha-select-theme($theme) {
44
- matcha-select {
45
- width: 100%;
46
- display: flex;
47
- align-items: center;
48
- justify-content: space-between;
49
- }
50
-
51
- .matcha-select-container {
52
- position: relative;
53
- display: inline-block;
54
- width: 100%;
55
- }
56
-
57
- .matcha-select-trigger {
58
- display: flex;
59
- align-items: center;
60
- justify-content: space-between;
61
- padding: 0;
62
- border: none;
63
- border-radius: 0;
64
- background-color: transparent;
65
- cursor: pointer;
66
- transition: border-color var(--matcha-duration-fast, 200ms) ease,
67
- box-shadow var(--matcha-duration-fast, 200ms) ease;
68
- box-sizing: border-box;
69
-
70
- &:focus-visible:not([disabled]) {
71
- outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
72
- outline-offset: var(--matcha-state-focus-ring-offset, 2px);
73
- }
74
- }
75
-
76
- .matcha-select-value {
77
- flex: 1;
78
- text-align: left;
79
- overflow: hidden;
80
- text-overflow: ellipsis;
81
- white-space: nowrap;
82
- color: var(--matcha-color-fg);
83
-
84
- &.matcha-select-placeholder {
85
- color: var(--matcha-color-text-placeholder);
86
- }
87
- }
88
-
89
- .matcha-select-arrow {
90
- display: inline-flex;
91
- align-items: center;
92
- justify-content: center;
93
- margin-left: var(--matcha-space-100, 8px);
94
- transition: transform var(--matcha-duration-fast, 200ms) ease;
95
- color: var(--matcha-color-text-placeholder); // Figma #9AA0A6 dark / placeholder light
96
- font-size: 16px; // default SM
97
- width: 16px;
98
- height: 16px;
99
- line-height: 16px;
100
- flex: none;
101
-
102
- &.matcha-select-arrow-open {
103
- transform: rotate(180deg);
104
- }
105
- }
106
-
107
- // Seta por size (Figma matcha/field/select): SM 16 · MD 20 · LG 24
108
- matcha-form-field[size="md"] matcha-select .matcha-select-arrow,
109
- matcha-form-field[size="medium"] matcha-select .matcha-select-arrow {
110
- font-size: 20px;
111
- width: 20px;
112
- height: 20px;
113
- line-height: 20px;
114
- }
115
- matcha-form-field[size="lg"] matcha-select .matcha-select-arrow,
116
- matcha-form-field[size="large"] matcha-select .matcha-select-arrow,
117
- matcha-form-field[size="huge"] matcha-select .matcha-select-arrow {
118
- font-size: 24px;
119
- width: 24px;
120
- height: 24px;
121
- line-height: 24px;
122
- }
123
-
124
- // Tipografia do value por size: SM/tiny body-sm 12/16 · MD body-md 14/20 · LG body-lg 16/24.
125
- // O tier SM usa a MESMA escala do input nativo (matcha-form-field.scss aplica
126
- // --matcha-text-body-sm nesse tier). Antes o select herdava 14/20 junto do MD e ficava
127
- // 2px maior que input/date dentro do MESMO matcha-field size="small".
128
- matcha-form-field[size="lg"] .matcha-select-value,
129
- matcha-form-field[size="large"] .matcha-select-value,
130
- matcha-form-field[size="huge"] .matcha-select-value {
131
- font-size: 16px;
132
- line-height: 24px;
133
- }
134
- matcha-form-field[size="sm"] .matcha-select-value,
135
- matcha-form-field[size="tiny"] .matcha-select-value,
136
- matcha-form-field[size="small"] .matcha-select-value {
137
- font-size: var(--matcha-text-body-sm, 12px);
138
- line-height: var(--matcha-leading-body-sm, 16px);
139
- }
140
- matcha-form-field[size="md"] .matcha-select-value,
141
- matcha-form-field[size="medium"] .matcha-select-value {
142
- font-size: 14px;
143
- line-height: 20px;
144
- }
145
-
146
- // Disabled: seta cinza 38%
147
- matcha-form-field[disabled] .matcha-select-arrow,
148
- matcha-form-field[disabled="true"] .matcha-select-arrow,
149
- matcha-select[disabled] .matcha-select-arrow,
150
- .matcha-select-disabled .matcha-select-arrow {
151
- color: var(--matcha-color-interaction-disabled-fg);
152
- }
153
-
154
- // ── Clear button (× quando clearable + tem valor) ──
155
- // Size-responsive igual a seta (SM 16, MD 20, LG 24). Sem círculo no hover.
156
- // NOTA: box dimensions + line-height CASAM exatamente com .matcha-select-arrow
157
- // pra compensar os baselines diferentes dos icon fonts (close vs arrow_down).
158
- .matcha-select-clear {
159
- display: inline-flex;
160
- align-items: center;
161
- justify-content: center;
162
- width: 16px; // default SM (matches .matcha-select-arrow)
163
- height: 16px;
164
- margin: 0 var(--matcha-space-050, 4px) 0 0; // gap antes da seta
165
- padding: 0;
166
- background: transparent;
167
- border: 0;
168
- border-radius: 0;
169
- color: var(--matcha-color-text-placeholder);
170
- cursor: pointer;
171
- font-size: 16px;
172
- line-height: 16px; // absoluto (match arrow) — essencial pro baseline
173
- flex: none;
174
- transition: color var(--matcha-duration-fast, 200ms) ease;
175
-
176
- // Ícone interno: força display block + centralização via line-height
177
- // pra neutralizar baseline gap dos glyphs
178
- > [class^="i-matcha-"],
179
- > [class*=" i-matcha-"] {
180
- display: inline-block;
181
- font-size: inherit;
182
- width: 1em;
183
- height: 1em;
184
- line-height: 1em;
185
- vertical-align: middle;
186
- }
187
-
188
- &:hover {
189
- background: transparent;
190
- color: var(--matcha-color-text-primary);
191
- }
192
-
193
- &:focus { outline: none; }
194
- &:focus-visible {
195
- outline: var(--matcha-border-thin, 2px) solid var(--matcha-color-primary);
196
- outline-offset: var(--matcha-state-focus-ring-offset, 2px);
197
- border-radius: var(--matcha-radius-md, 4px);
198
- }
199
- }
200
-
201
- // Clear × por size do form-field — casa 1:1 com a seta (Figma SM 16 · MD 20 · LG 24)
202
- matcha-form-field[size="md"] matcha-select .matcha-select-clear,
203
- matcha-form-field[size="medium"] matcha-select .matcha-select-clear {
204
- width: 20px;
205
- height: 20px;
206
- font-size: 20px;
207
- }
208
- matcha-form-field[size="lg"] matcha-select .matcha-select-clear,
209
- matcha-form-field[size="large"] matcha-select .matcha-select-clear,
210
- matcha-form-field[size="huge"] matcha-select .matcha-select-clear {
211
- width: 24px;
212
- height: 24px;
213
- font-size: 24px;
214
- }
215
-
216
- // ── Disabled ──
217
- .matcha-select-disabled {
218
- .matcha-select-trigger {
219
- pointer-events: none;
220
- cursor: default;
221
- }
222
-
223
- .matcha-select-value {
224
- color: var(--matcha-color-disabled-fg);
225
- }
226
-
227
- .matcha-select-arrow {
228
- opacity: var(--matcha-opacity-disabled, 0.38);
229
- }
230
- }
231
-
232
- // ═══════════════════════════════════════════════════════════════════════
233
- // Multi-select — chips dentro do trigger
234
- // ═══════════════════════════════════════════════════════════════════════
235
-
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 {
240
- display: flex;
241
- flex-wrap: wrap;
242
- align-items: center;
243
- gap: var(--matcha-space-075, 6px);
244
- margin-top: var(--matcha-space-100, 8px);
245
- }
246
-
247
-
248
-
249
-
250
-
251
-
252
- // ═══════════════════════════════════════════════════════════════════════
253
- // Multi-select panel — checkmark + bulk actions header
254
- // ═══════════════════════════════════════════════════════════════════════
255
-
256
- // Wrapper dentro do panel. .matcha-select-options-multi modifica options filhas.
257
- .matcha-select-options-multi {
258
- // Checkmark nas options selecionadas — aparece ANTES do label.
259
- // Usa pseudo-element pra não precisar mexer no template de matcha-option.
260
- matcha-option[aria-selected="true"] {
261
- padding-left: var(--matcha-space-400, 32px);
262
- position: relative;
263
-
264
- &::before {
265
- content: '';
266
- position: absolute;
267
- left: var(--matcha-space-150, 12px);
268
- top: 50%;
269
- width: 16px;
270
- height: 16px;
271
- margin-top: -8px;
272
- background-color: var(--matcha-color-accent);
273
- mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
274
- -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
275
- mask-size: contain;
276
- -webkit-mask-size: contain;
277
- mask-repeat: no-repeat;
278
- -webkit-mask-repeat: no-repeat;
279
- }
280
- }
281
-
282
- // Reserva espaço pro checkmark mesmo nas não-selecionadas (alinhamento do texto)
283
- matcha-option {
284
- padding-left: var(--matcha-space-400, 32px);
285
- }
286
- }
287
-
288
- // ═══════════════════════════════════════════════════════════════════════
289
- // Selecionadas fixadas no topo ([pinSelected]) — companheiro do modo sem chips
290
- // ═══════════════════════════════════════════════════════════════════════
291
- // Sem a lista de chips abaixo do campo, o que já foi escolhido só existe DENTRO do
292
- // painel — e numa lista longa some no primeiro scroll. A fixação sobe o bloco
293
- // selecionado pro topo com `order`: as options são content-projected (quase sempre
294
- // por um `@for` do consumidor), então mover os nós quebraria o próximo update da
295
- // lista. `order` reordena só a pintura; o DOM fica intacto.
296
- //
297
- // Quem congela a ordem é o TS (snapshot na abertura do painel) — sem isso a option
298
- // pularia de lugar debaixo do cursor a cada clique.
299
- .matcha-select-options-pinned {
300
- display: flex;
301
- flex-direction: column;
302
-
303
- // Ordens explícitas: com `order` no jogo, quem não declara cai em 0. A busca e o
304
- // header de ações em lote precisam continuar ACIMA do bloco fixado; carregando e
305
- // vazio, ABAIXO de tudo.
306
- > .matcha-select-search { order: -3; }
307
- > .matcha-select-bulk-actions { order: -2; }
308
- > .matcha-select-option-pinned { order: -1; }
309
- > .matcha-select-loading,
310
- > .matcha-select-empty { order: 1; }
311
- }
312
-
313
- // Divisória do bloco fixado — ancorada na ÚLTIMA fixada VISÍVEL, e só quando existe
314
- // opção não fixada embaixo (senão seria uma linha solta no fim da lista).
315
- // Pseudo-elemento, não `border-bottom`: a option tem margem lateral própria (4px) e a
316
- // borda pararia antes da parede do painel, ao contrário da divisória do header de
317
- // ações em lote — o negativo sangra até lá sem deslocar o item.
318
- .matcha-select-option-pinned-last::after {
319
- content: '';
320
- position: absolute;
321
- left: calc(var(--matcha-space-050, 4px) * -1);
322
- right: calc(var(--matcha-space-050, 4px) * -1);
323
- // Meio do respiro entre duas options (margem vertical de 2px em cada uma).
324
- bottom: calc((var(--matcha-space-025, 2px) + 1px) * -1);
325
- border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border-subtle, rgba(0, 0, 0, 0.08));
326
- }
327
-
328
- // Bulk actions header (Selecionar todos / Limpar / contagem)
329
- .matcha-select-bulk-actions {
330
- display: flex;
331
- align-items: center;
332
- gap: var(--matcha-space-100, 8px);
333
- padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
334
- border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border-subtle, rgba(0,0,0,0.08));
335
- margin-bottom: var(--matcha-space-050, 4px);
336
- }
337
-
338
- .matcha-select-bulk-btn {
339
- appearance: none;
340
- border: 0;
341
- background: transparent;
342
- color: var(--matcha-color-primary);
343
- cursor: pointer;
344
- font: inherit;
345
- font-size: 13px;
346
- font-weight: 500;
347
- padding: var(--matcha-space-050, 4px) var(--matcha-space-100, 8px);
348
- border-radius: var(--matcha-radius-sm, 4px);
349
- transition: background-color var(--matcha-duration-instant, 80ms) ease;
350
-
351
- &:hover:not(:disabled) { background: var(--matcha-color-primary-surface-hover); }
352
- &:disabled { pointer-events: none; opacity: var(--matcha-opacity-disabled, 0.38); }
353
- &:focus-visible {
354
- outline: 2px solid var(--matcha-color-primary);
355
- outline-offset: 1px;
356
- }
357
- }
358
-
359
- .matcha-select-bulk-btn-ghost {
360
- color: var(--matcha-color-text-secondary);
361
- font-weight: 400;
362
- }
363
-
364
- .matcha-select-bulk-count {
365
- margin-left: auto;
366
- font-size: 12px;
367
- color: var(--matcha-color-text-placeholder);
368
- font-weight: 400;
369
- }
370
-
371
- // ═══════════════════════════════════════════════════════════════════════
372
- // Searchable — input de busca no topo do panel + empty state
373
- // ═══════════════════════════════════════════════════════════════════════
374
-
375
- // Zera padding-top do panel quando o search é a 1ª coisa dentro. O search
376
- // já tem padding próprio; o padding do panel (8px) somava e gerava gap
377
- // visual entre trigger e o campo de busca.
378
- .matcha-panel:has(> .matcha-select-options > .matcha-select-search:first-child) {
379
- padding-top: 0;
380
- }
381
-
382
- .matcha-select-search {
383
- position: relative;
384
- display: flex;
385
- align-items: center;
386
- gap: var(--matcha-space-100, 8px);
387
- padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
388
- border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border-subtle, rgba(0,0,0,0.08));
389
- transition: border-color var(--matcha-duration-instant, 80ms) ease;
390
-
391
- &:focus-within {
392
- border-bottom-color: var(--matcha-color-primary);
393
- }
394
- }
395
-
396
- // Lupa no lugar do placeholder textual "Buscar..." — ícone não precisa de i18n.
397
- .matcha-select-search-icon {
398
- flex-shrink: 0;
399
- color: var(--matcha-color-text-placeholder);
400
- pointer-events: none;
401
- }
402
-
403
- // Input plano: sem border/background próprios. O container `.matcha-select-search`
404
- // faz o papel de "campo" via padding + divider bottom, e focus-within muda a cor
405
- // do divider. Evita efeito "card dentro de card" dentro do panel.
406
- .matcha-select-search-input {
407
- width: 100%;
408
- height: 24px;
409
- padding: 0 var(--matcha-space-400, 32px) 0 0;
410
- border: 0;
411
- border-radius: 0;
412
- background: transparent;
413
- color: var(--matcha-color-text-primary);
414
- font: inherit;
415
- font-size: 13px;
416
- outline: none;
417
-
418
- &::placeholder { color: var(--matcha-color-text-placeholder); }
419
- &:focus { outline: none; }
420
- }
421
-
422
- .matcha-select-search-clear {
423
- position: absolute;
424
- right: calc(var(--matcha-space-150, 12px) + var(--matcha-space-100, 8px));
425
- top: 50%;
426
- transform: translateY(-50%);
427
- width: 18px;
428
- height: 18px;
429
- padding: 0;
430
- background: transparent;
431
- border: 0;
432
- border-radius: 50%;
433
- color: var(--matcha-color-text-placeholder);
434
- cursor: pointer;
435
- font-size: 16px;
436
- line-height: 1;
437
- display: inline-flex;
438
- align-items: center;
439
- justify-content: center;
440
-
441
- &:hover {
442
- background: var(--matcha-color-surface-hover, rgba(0,0,0,0.12));
443
- color: var(--matcha-color-text-primary);
444
- }
445
- }
446
-
447
- .matcha-select-empty {
448
- padding: var(--matcha-space-200, 16px) var(--matcha-space-200, 16px);
449
- text-align: center;
450
- color: var(--matcha-color-text-placeholder);
451
- font-size: 13px;
452
- font-style: italic;
453
- }
454
-
455
- // Loading do painel (backend search mode) — mesmo tom do empty state, com spinner.
456
- .matcha-select-loading {
457
- display: flex;
458
- align-items: center;
459
- justify-content: center;
460
- gap: var(--matcha-space-100, 8px);
461
- padding: var(--matcha-space-200, 16px);
462
- color: var(--matcha-color-text-placeholder);
463
- font-size: 13px;
464
- }
465
-
466
- .matcha-select-loading-spinner {
467
- width: 14px;
468
- height: 14px;
469
- flex-shrink: 0;
470
- // Mesma cor do spinner do trigger (.matcha-form-field-spinner) — um estado de
471
- // loading, uma cor. Antes era accent e o campo mostrava azul + verde ao mesmo tempo.
472
- border: 2px solid var(--matcha-color-surface-border);
473
- border-top-color: var(--matcha-color-primary);
474
- border-radius: 50%;
475
- animation: matcha-select-loading-spin 0.7s linear infinite;
476
- }
477
-
478
- @keyframes matcha-select-loading-spin {
479
- to { transform: rotate(360deg); }
480
- }
481
-
482
- // ═══════════════════════════════════════════════════════════════════════
483
- // Bottom-sheet (mobile) — aligned com Figma matcha/field/select/mobile-sheet
484
- // Ativa automaticamente em <=768px (ou via [mode]="'sheet'"). Full-width bottom-anchored.
485
- // ═══════════════════════════════════════════════════════════════════════
486
- .matcha-select-sheet-overlay {
487
- position: fixed;
488
- inset: 0;
489
- z-index: 10002;
490
- // Scrim 40% — cor do token com alpha aplicado via rgba (token resolve pra cor sólida)
491
- background-color: rgba(0, 0, 0, 0.4);
492
- opacity: 0;
493
- pointer-events: none;
494
- transition: opacity var(--matcha-duration-fast, 200ms) ease;
495
-
496
- display: flex;
497
- flex-direction: column;
498
- justify-content: flex-end;
499
-
500
- &.matcha-select-sheet-open {
501
- opacity: 1;
502
- pointer-events: auto;
503
- }
504
- }
505
-
506
- .matcha-select-sheet {
507
- position: relative;
508
- width: 100%;
509
- max-height: 90vh;
510
- min-height: 50vh;
511
- background: var(--matcha-color-surface-card-strong, var(--matcha-color-surface-card));
512
- border-top-left-radius: var(--matcha-radius-xl, 16px);
513
- border-top-right-radius: var(--matcha-radius-xl, 16px);
514
- box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
515
-
516
- display: flex;
517
- flex-direction: column;
518
- overflow: hidden;
519
-
520
- // Slide-up animation — inicia off-screen e anima em.
521
- // Classe `.matcha-select-sheet-open` aplicada diretamente (não via parent)
522
- // pra evitar problemas de specificity com containers aninhados.
523
- transform: translateY(100%);
524
- transition: transform var(--matcha-duration-fast, 200ms) cubic-bezier(0.2, 0, 0, 1);
525
-
526
- &.matcha-select-sheet-open {
527
- transform: translateY(0);
528
- }
529
-
530
- @media (prefers-reduced-motion: reduce) {
531
- transition: none;
532
- }
533
- }
534
-
535
- .matcha-select-sheet-handle {
536
- flex: 0 0 auto;
537
- width: 40px;
538
- height: 4px;
539
- margin: var(--matcha-space-150, 12px) auto var(--matcha-space-100, 8px);
540
- background: var(--matcha-color-surface-border);
541
- opacity: 0.6;
542
- border-radius: 2px;
543
- }
544
-
545
- .matcha-select-sheet-header {
546
- flex: 0 0 auto;
547
- display: flex;
548
- align-items: center;
549
- gap: var(--matcha-space-100, 8px);
550
- padding: var(--matcha-space-100, 8px) var(--matcha-space-100, 8px) var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
551
- border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
552
- }
553
-
554
- .matcha-select-sheet-title {
555
- flex: 1 1 auto;
556
- margin: 0;
557
- font-family: var(--matcha-font-family);
558
- font-size: 17px;
559
- font-weight: 600;
560
- line-height: 1.3;
561
- color: var(--matcha-color-text-primary);
562
- overflow: hidden;
563
- text-overflow: ellipsis;
564
- white-space: nowrap;
565
- }
566
-
567
- .matcha-select-sheet-close {
568
- flex: 0 0 auto;
569
- appearance: none;
570
- width: 40px;
571
- height: 40px;
572
- padding: 0;
573
- background: transparent;
574
- border: 0;
575
- border-radius: 50%;
576
- color: var(--matcha-color-text-secondary);
577
- cursor: pointer;
578
- font-size: 24px;
579
- line-height: 1;
580
- display: inline-flex;
581
- align-items: center;
582
- justify-content: center;
583
- transition: background-color var(--matcha-duration-instant, 80ms) ease;
584
-
585
- &:hover { background: var(--matcha-color-surface-hover, rgba(0, 0, 0, 0.08)); }
586
- &:focus-visible {
587
- outline: 2px solid var(--matcha-color-primary);
588
- outline-offset: -2px;
589
- }
590
- }
591
-
592
- // Sheet-mode ajusta o scroll da lista pra caber dentro da sheet
593
- .matcha-select-options-sheet {
594
- flex: 1 1 auto;
595
- overflow-y: auto;
596
- -webkit-overflow-scrolling: touch;
597
- display: flex;
598
- flex-direction: column;
599
- }
600
-
601
- .matcha-select-sheet-list {
602
- flex: 1 1 auto;
603
- overflow-y: auto;
604
- padding: var(--matcha-space-050, 4px) 0;
605
- }
606
-
607
- // Sheet-mode options são full-width com padding mais generoso pra toque
608
- .matcha-select-options-sheet matcha-option {
609
- padding-left: var(--matcha-space-200, 16px);
610
- padding-right: var(--matcha-space-200, 16px);
611
- min-height: 48px; // Alvo tátil iOS (44px mínimo + folga)
612
- }
613
-
614
- // Safe-area bottom — respeita env() do iOS + fallback 12px
615
- .matcha-select-sheet-safe-area {
616
- flex: 0 0 auto;
617
- height: calc(env(safe-area-inset-bottom, 0px) + var(--matcha-space-150, 12px));
618
- background: var(--matcha-color-surface-card-strong, var(--matcha-color-surface-card));
619
- }
620
-
621
- // Quando sheet-mode tá ativo, esconder a arrow do trigger faz menos sentido —
622
- // mas mantemos porque ainda comunica "expandable". Tap target expandido.
623
- @media (max-width: 768px) {
624
- .matcha-select-trigger {
625
- min-height: 48px;
626
- }
627
- }
628
-
629
- }
1
+ // =============================================================================
2
+ // matcha-select.scss — Select dropdown trigger
3
+ // Aligned with Figma matcha/field/select (tokenized)
4
+ // =============================================================================
5
+
6
+ // ── Structural (outside mixin) ──────────────────────────────────────────────
7
+
8
+ .matcha-select-trigger {
9
+ position: relative;
10
+ overflow: hidden;
11
+
12
+ // State layer (MD3 style) — usado apenas em selects STANDALONE.
13
+ // Dentro de matcha-form-field a gente desliga: o hover do field (border) cuida.
14
+ &::before {
15
+ content: '';
16
+ position: absolute;
17
+ inset: 0;
18
+ background: currentColor;
19
+ opacity: 0;
20
+ border-radius: inherit;
21
+ pointer-events: none;
22
+ transition: opacity var(--matcha-duration-instant, 80ms) linear;
23
+ }
24
+
25
+ &:hover:not([disabled])::before { opacity: var(--matcha-state-hover, 0.08); }
26
+ &:active:not([disabled])::before { opacity: var(--matcha-state-active, 0.12); }
27
+
28
+ &[disabled] { pointer-events: none; cursor: default; }
29
+
30
+ @media (prefers-reduced-motion: reduce) {
31
+ &::before { transition: none; }
32
+ }
33
+ }
34
+
35
+ // Dentro de matcha-form-field: hover fica a cargo do form-field (border-color).
36
+ // Remove o tint do state layer pra não duplicar feedback visual.
37
+ .matcha-form-field .matcha-select-trigger::before {
38
+ display: none;
39
+ }
40
+
41
+ // ── Theme mixin ─────────────────────────────────────────────────────────────
42
+
43
+ @mixin matcha-select-theme($theme) {
44
+ matcha-select {
45
+ width: 100%;
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: space-between;
49
+ }
50
+
51
+ .matcha-select-container {
52
+ position: relative;
53
+ display: inline-block;
54
+ width: 100%;
55
+ }
56
+
57
+ .matcha-select-trigger {
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: space-between;
61
+ padding: 0;
62
+ border: none;
63
+ border-radius: 0;
64
+ background-color: transparent;
65
+ cursor: pointer;
66
+ transition: border-color var(--matcha-duration-fast, 200ms) ease,
67
+ box-shadow var(--matcha-duration-fast, 200ms) ease;
68
+ box-sizing: border-box;
69
+
70
+ &:focus-visible:not([disabled]) {
71
+ outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
72
+ outline-offset: var(--matcha-state-focus-ring-offset, 2px);
73
+ }
74
+ }
75
+
76
+ .matcha-select-value {
77
+ flex: 1;
78
+ text-align: left;
79
+ overflow: hidden;
80
+ text-overflow: ellipsis;
81
+ white-space: nowrap;
82
+ color: var(--matcha-color-fg);
83
+
84
+ &.matcha-select-placeholder {
85
+ color: var(--matcha-color-text-placeholder);
86
+ }
87
+ }
88
+
89
+ .matcha-select-arrow {
90
+ display: inline-flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ margin-left: var(--matcha-space-100, 8px);
94
+ transition: transform var(--matcha-duration-fast, 200ms) ease;
95
+ color: var(--matcha-color-text-placeholder); // Figma #9AA0A6 dark / placeholder light
96
+ font-size: 16px; // default SM
97
+ width: 16px;
98
+ height: 16px;
99
+ line-height: 16px;
100
+ flex: none;
101
+
102
+ &.matcha-select-arrow-open {
103
+ transform: rotate(180deg);
104
+ }
105
+ }
106
+
107
+ // Seta por size (Figma matcha/field/select): SM 16 · MD 20 · LG 24
108
+ matcha-form-field[size="md"] matcha-select .matcha-select-arrow,
109
+ matcha-form-field[size="medium"] matcha-select .matcha-select-arrow {
110
+ font-size: 20px;
111
+ width: 20px;
112
+ height: 20px;
113
+ line-height: 20px;
114
+ }
115
+ matcha-form-field[size="lg"] matcha-select .matcha-select-arrow,
116
+ matcha-form-field[size="large"] matcha-select .matcha-select-arrow,
117
+ matcha-form-field[size="huge"] matcha-select .matcha-select-arrow {
118
+ font-size: 24px;
119
+ width: 24px;
120
+ height: 24px;
121
+ line-height: 24px;
122
+ }
123
+
124
+ // Tipografia do value por size: SM/tiny body-sm 12/16 · MD body-md 14/20 · LG body-lg 16/24.
125
+ // O tier SM usa a MESMA escala do input nativo (matcha-form-field.scss aplica
126
+ // --matcha-text-body-sm nesse tier). Antes o select herdava 14/20 junto do MD e ficava
127
+ // 2px maior que input/date dentro do MESMO matcha-field size="small".
128
+ matcha-form-field[size="lg"] .matcha-select-value,
129
+ matcha-form-field[size="large"] .matcha-select-value,
130
+ matcha-form-field[size="huge"] .matcha-select-value {
131
+ font-size: 16px;
132
+ line-height: 24px;
133
+ }
134
+ matcha-form-field[size="sm"] .matcha-select-value,
135
+ matcha-form-field[size="tiny"] .matcha-select-value,
136
+ matcha-form-field[size="small"] .matcha-select-value {
137
+ font-size: var(--matcha-text-body-sm, 12px);
138
+ line-height: var(--matcha-leading-body-sm, 16px);
139
+ }
140
+ matcha-form-field[size="md"] .matcha-select-value,
141
+ matcha-form-field[size="medium"] .matcha-select-value {
142
+ font-size: 14px;
143
+ line-height: 20px;
144
+ }
145
+
146
+ // Disabled: seta cinza 38%
147
+ matcha-form-field[disabled] .matcha-select-arrow,
148
+ matcha-form-field[disabled="true"] .matcha-select-arrow,
149
+ matcha-select[disabled] .matcha-select-arrow,
150
+ .matcha-select-disabled .matcha-select-arrow {
151
+ color: var(--matcha-color-interaction-disabled-fg);
152
+ }
153
+
154
+ // ── Clear button (× quando clearable + tem valor) ──
155
+ // Size-responsive igual a seta (SM 16, MD 20, LG 24). Sem círculo no hover.
156
+ // NOTA: box dimensions + line-height CASAM exatamente com .matcha-select-arrow
157
+ // pra compensar os baselines diferentes dos icon fonts (close vs arrow_down).
158
+ .matcha-select-clear {
159
+ display: inline-flex;
160
+ align-items: center;
161
+ justify-content: center;
162
+ width: 16px; // default SM (matches .matcha-select-arrow)
163
+ height: 16px;
164
+ margin: 0 var(--matcha-space-050, 4px) 0 0; // gap antes da seta
165
+ padding: 0;
166
+ background: transparent;
167
+ border: 0;
168
+ border-radius: 0;
169
+ color: var(--matcha-color-text-placeholder);
170
+ cursor: pointer;
171
+ font-size: 16px;
172
+ line-height: 16px; // absoluto (match arrow) — essencial pro baseline
173
+ flex: none;
174
+ transition: color var(--matcha-duration-fast, 200ms) ease;
175
+
176
+ // Ícone interno: força display block + centralização via line-height
177
+ // pra neutralizar baseline gap dos glyphs
178
+ > [class^="i-matcha-"],
179
+ > [class*=" i-matcha-"] {
180
+ display: inline-block;
181
+ font-size: inherit;
182
+ width: 1em;
183
+ height: 1em;
184
+ line-height: 1em;
185
+ vertical-align: middle;
186
+ }
187
+
188
+ &:hover {
189
+ background: transparent;
190
+ color: var(--matcha-color-text-primary);
191
+ }
192
+
193
+ &:focus { outline: none; }
194
+ &:focus-visible {
195
+ outline: var(--matcha-border-thin, 2px) solid var(--matcha-color-primary);
196
+ outline-offset: var(--matcha-state-focus-ring-offset, 2px);
197
+ border-radius: var(--matcha-radius-md, 4px);
198
+ }
199
+ }
200
+
201
+ // Clear × por size do form-field — casa 1:1 com a seta (Figma SM 16 · MD 20 · LG 24)
202
+ matcha-form-field[size="md"] matcha-select .matcha-select-clear,
203
+ matcha-form-field[size="medium"] matcha-select .matcha-select-clear {
204
+ width: 20px;
205
+ height: 20px;
206
+ font-size: 20px;
207
+ }
208
+ matcha-form-field[size="lg"] matcha-select .matcha-select-clear,
209
+ matcha-form-field[size="large"] matcha-select .matcha-select-clear,
210
+ matcha-form-field[size="huge"] matcha-select .matcha-select-clear {
211
+ width: 24px;
212
+ height: 24px;
213
+ font-size: 24px;
214
+ }
215
+
216
+ // ── Disabled ──
217
+ .matcha-select-disabled {
218
+ .matcha-select-trigger {
219
+ pointer-events: none;
220
+ cursor: default;
221
+ }
222
+
223
+ .matcha-select-value {
224
+ color: var(--matcha-color-disabled-fg);
225
+ }
226
+
227
+ .matcha-select-arrow {
228
+ opacity: var(--matcha-opacity-disabled, 0.38);
229
+ }
230
+ }
231
+
232
+ // ═══════════════════════════════════════════════════════════════════════
233
+ // Multi-select — chips dentro do trigger
234
+ // ═══════════════════════════════════════════════════════════════════════
235
+
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 {
240
+ display: flex;
241
+ flex-wrap: wrap;
242
+ align-items: center;
243
+ gap: var(--matcha-space-075, 6px);
244
+ margin-top: var(--matcha-space-100, 8px);
245
+ }
246
+
247
+
248
+
249
+
250
+
251
+
252
+ // ═══════════════════════════════════════════════════════════════════════
253
+ // Multi-select panel — checkmark + bulk actions header
254
+ // ═══════════════════════════════════════════════════════════════════════
255
+
256
+ // Wrapper dentro do panel. .matcha-select-options-multi modifica options filhas.
257
+ .matcha-select-options-multi {
258
+ // Checkmark nas options selecionadas — aparece ANTES do label.
259
+ // Usa pseudo-element pra não precisar mexer no template de matcha-option.
260
+ matcha-option[aria-selected="true"] {
261
+ padding-left: var(--matcha-space-400, 32px);
262
+ position: relative;
263
+
264
+ &::before {
265
+ content: '';
266
+ position: absolute;
267
+ left: var(--matcha-space-150, 12px);
268
+ top: 50%;
269
+ width: 16px;
270
+ height: 16px;
271
+ margin-top: -8px;
272
+ background-color: var(--matcha-color-accent);
273
+ mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
274
+ -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>");
275
+ mask-size: contain;
276
+ -webkit-mask-size: contain;
277
+ mask-repeat: no-repeat;
278
+ -webkit-mask-repeat: no-repeat;
279
+ }
280
+ }
281
+
282
+ // Reserva espaço pro checkmark mesmo nas não-selecionadas (alinhamento do texto)
283
+ matcha-option {
284
+ padding-left: var(--matcha-space-400, 32px);
285
+ }
286
+ }
287
+
288
+ // ═══════════════════════════════════════════════════════════════════════
289
+ // Selecionadas fixadas no topo ([pinSelected]) — companheiro do modo sem chips
290
+ // ═══════════════════════════════════════════════════════════════════════
291
+ // Sem a lista de chips abaixo do campo, o que já foi escolhido só existe DENTRO do
292
+ // painel — e numa lista longa some no primeiro scroll. A fixação sobe o bloco
293
+ // selecionado pro topo com `order`: as options são content-projected (quase sempre
294
+ // por um `@for` do consumidor), então mover os nós quebraria o próximo update da
295
+ // lista. `order` reordena só a pintura; o DOM fica intacto.
296
+ //
297
+ // Quem congela a ordem é o TS (snapshot na abertura do painel) — sem isso a option
298
+ // pularia de lugar debaixo do cursor a cada clique.
299
+ .matcha-select-options-pinned {
300
+ display: flex;
301
+ flex-direction: column;
302
+
303
+ // Ordens explícitas: com `order` no jogo, quem não declara cai em 0. A busca e o
304
+ // header de ações em lote precisam continuar ACIMA do bloco fixado; carregando e
305
+ // vazio, ABAIXO de tudo.
306
+ > .matcha-select-search { order: -3; }
307
+ > .matcha-select-bulk-actions { order: -2; }
308
+ > .matcha-select-option-pinned { order: -1; }
309
+ > .matcha-select-loading,
310
+ > .matcha-select-empty { order: 1; }
311
+ }
312
+
313
+ // Divisória do bloco fixado — ancorada na ÚLTIMA fixada VISÍVEL, e só quando existe
314
+ // opção não fixada embaixo (senão seria uma linha solta no fim da lista).
315
+ // Pseudo-elemento, não `border-bottom`: a option tem margem lateral própria (4px) e a
316
+ // borda pararia antes da parede do painel, ao contrário da divisória do header de
317
+ // ações em lote — o negativo sangra até lá sem deslocar o item.
318
+ .matcha-select-option-pinned-last::after {
319
+ content: '';
320
+ position: absolute;
321
+ left: calc(var(--matcha-space-050, 4px) * -1);
322
+ right: calc(var(--matcha-space-050, 4px) * -1);
323
+ // Meio do respiro entre duas options (margem vertical de 2px em cada uma).
324
+ bottom: calc((var(--matcha-space-025, 2px) + 1px) * -1);
325
+ border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border-subtle, rgba(0, 0, 0, 0.08));
326
+ }
327
+
328
+ // Bulk actions header (Selecionar todos / Limpar / contagem)
329
+ .matcha-select-bulk-actions {
330
+ display: flex;
331
+ align-items: center;
332
+ gap: var(--matcha-space-100, 8px);
333
+ padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
334
+ border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border-subtle, rgba(0,0,0,0.08));
335
+ margin-bottom: var(--matcha-space-050, 4px);
336
+ }
337
+
338
+ .matcha-select-bulk-btn {
339
+ appearance: none;
340
+ border: 0;
341
+ background: transparent;
342
+ color: var(--matcha-color-primary);
343
+ cursor: pointer;
344
+ font: inherit;
345
+ font-size: 13px;
346
+ font-weight: 500;
347
+ padding: var(--matcha-space-050, 4px) var(--matcha-space-100, 8px);
348
+ border-radius: var(--matcha-radius-sm, 4px);
349
+ transition: background-color var(--matcha-duration-instant, 80ms) ease;
350
+
351
+ &:hover:not(:disabled) { background: var(--matcha-color-primary-surface-hover); }
352
+ &:disabled { pointer-events: none; opacity: var(--matcha-opacity-disabled, 0.38); }
353
+ &:focus-visible {
354
+ outline: 2px solid var(--matcha-color-primary);
355
+ outline-offset: 1px;
356
+ }
357
+ }
358
+
359
+ .matcha-select-bulk-btn-ghost {
360
+ color: var(--matcha-color-text-secondary);
361
+ font-weight: 400;
362
+ }
363
+
364
+ .matcha-select-bulk-count {
365
+ margin-left: auto;
366
+ font-size: 12px;
367
+ color: var(--matcha-color-text-placeholder);
368
+ font-weight: 400;
369
+ }
370
+
371
+ // ═══════════════════════════════════════════════════════════════════════
372
+ // Searchable — input de busca no topo do panel + empty state
373
+ // ═══════════════════════════════════════════════════════════════════════
374
+
375
+ // Zera padding-top do panel quando o search é a 1ª coisa dentro. O search
376
+ // já tem padding próprio; o padding do panel (8px) somava e gerava gap
377
+ // visual entre trigger e o campo de busca.
378
+ .matcha-panel:has(> .matcha-select-options > .matcha-select-search:first-child) {
379
+ padding-top: 0;
380
+ }
381
+
382
+ .matcha-select-search {
383
+ position: relative;
384
+ display: flex;
385
+ align-items: center;
386
+ gap: var(--matcha-space-100, 8px);
387
+ padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
388
+ border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border-subtle, rgba(0,0,0,0.08));
389
+ transition: border-color var(--matcha-duration-instant, 80ms) ease;
390
+
391
+ &:focus-within {
392
+ border-bottom-color: var(--matcha-color-primary);
393
+ }
394
+ }
395
+
396
+ // Lupa no lugar do placeholder textual "Buscar..." — ícone não precisa de i18n.
397
+ .matcha-select-search-icon {
398
+ flex-shrink: 0;
399
+ color: var(--matcha-color-text-placeholder);
400
+ pointer-events: none;
401
+ }
402
+
403
+ // Input plano: sem border/background próprios. O container `.matcha-select-search`
404
+ // faz o papel de "campo" via padding + divider bottom, e focus-within muda a cor
405
+ // do divider. Evita efeito "card dentro de card" dentro do panel.
406
+ .matcha-select-search-input {
407
+ width: 100%;
408
+ height: 24px;
409
+ padding: 0 var(--matcha-space-400, 32px) 0 0;
410
+ border: 0;
411
+ border-radius: 0;
412
+ background: transparent;
413
+ color: var(--matcha-color-text-primary);
414
+ font: inherit;
415
+ font-size: 13px;
416
+ outline: none;
417
+
418
+ &::placeholder { color: var(--matcha-color-text-placeholder); }
419
+ &:focus { outline: none; }
420
+ }
421
+
422
+ .matcha-select-search-clear {
423
+ position: absolute;
424
+ right: calc(var(--matcha-space-150, 12px) + var(--matcha-space-100, 8px));
425
+ top: 50%;
426
+ transform: translateY(-50%);
427
+ width: 18px;
428
+ height: 18px;
429
+ padding: 0;
430
+ background: transparent;
431
+ border: 0;
432
+ border-radius: 50%;
433
+ color: var(--matcha-color-text-placeholder);
434
+ cursor: pointer;
435
+ font-size: 16px;
436
+ line-height: 1;
437
+ display: inline-flex;
438
+ align-items: center;
439
+ justify-content: center;
440
+
441
+ &:hover {
442
+ background: var(--matcha-color-surface-hover, rgba(0,0,0,0.12));
443
+ color: var(--matcha-color-text-primary);
444
+ }
445
+ }
446
+
447
+ .matcha-select-empty {
448
+ padding: var(--matcha-space-200, 16px) var(--matcha-space-200, 16px);
449
+ text-align: center;
450
+ color: var(--matcha-color-text-placeholder);
451
+ font-size: 13px;
452
+ font-style: italic;
453
+ }
454
+
455
+ // Loading do painel (backend search mode) — mesmo tom do empty state, com spinner.
456
+ .matcha-select-loading {
457
+ display: flex;
458
+ align-items: center;
459
+ justify-content: center;
460
+ gap: var(--matcha-space-100, 8px);
461
+ padding: var(--matcha-space-200, 16px);
462
+ color: var(--matcha-color-text-placeholder);
463
+ font-size: 13px;
464
+ }
465
+
466
+ .matcha-select-loading-spinner {
467
+ width: 14px;
468
+ height: 14px;
469
+ flex-shrink: 0;
470
+ // Mesma cor do spinner do trigger (.matcha-form-field-spinner) — um estado de
471
+ // loading, uma cor. Antes era accent e o campo mostrava azul + verde ao mesmo tempo.
472
+ border: 2px solid var(--matcha-color-surface-border);
473
+ border-top-color: var(--matcha-color-primary);
474
+ border-radius: 50%;
475
+ animation: matcha-select-loading-spin 0.7s linear infinite;
476
+ }
477
+
478
+ @keyframes matcha-select-loading-spin {
479
+ to { transform: rotate(360deg); }
480
+ }
481
+
482
+ // ═══════════════════════════════════════════════════════════════════════
483
+ // Bottom-sheet (mobile) — aligned com Figma matcha/field/select/mobile-sheet
484
+ // Ativa automaticamente em <=768px (ou via [mode]="'sheet'"). Full-width bottom-anchored.
485
+ // ═══════════════════════════════════════════════════════════════════════
486
+ .matcha-select-sheet-overlay {
487
+ position: fixed;
488
+ inset: 0;
489
+ z-index: 10002;
490
+ // Scrim 40% — cor do token com alpha aplicado via rgba (token resolve pra cor sólida)
491
+ background-color: rgba(0, 0, 0, 0.4);
492
+ opacity: 0;
493
+ pointer-events: none;
494
+ transition: opacity var(--matcha-duration-fast, 200ms) ease;
495
+
496
+ display: flex;
497
+ flex-direction: column;
498
+ justify-content: flex-end;
499
+
500
+ &.matcha-select-sheet-open {
501
+ opacity: 1;
502
+ pointer-events: auto;
503
+ }
504
+ }
505
+
506
+ .matcha-select-sheet {
507
+ position: relative;
508
+ width: 100%;
509
+ max-height: 90vh;
510
+ min-height: 50vh;
511
+ background: var(--matcha-color-surface-card-strong, var(--matcha-color-surface-card));
512
+ border-top-left-radius: var(--matcha-radius-xl, 16px);
513
+ border-top-right-radius: var(--matcha-radius-xl, 16px);
514
+ box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
515
+
516
+ display: flex;
517
+ flex-direction: column;
518
+ overflow: hidden;
519
+
520
+ // Slide-up animation — inicia off-screen e anima em.
521
+ // Classe `.matcha-select-sheet-open` aplicada diretamente (não via parent)
522
+ // pra evitar problemas de specificity com containers aninhados.
523
+ transform: translateY(100%);
524
+ transition: transform var(--matcha-duration-fast, 200ms) cubic-bezier(0.2, 0, 0, 1);
525
+
526
+ &.matcha-select-sheet-open {
527
+ transform: translateY(0);
528
+ }
529
+
530
+ @media (prefers-reduced-motion: reduce) {
531
+ transition: none;
532
+ }
533
+ }
534
+
535
+ .matcha-select-sheet-handle {
536
+ flex: 0 0 auto;
537
+ width: 40px;
538
+ height: 4px;
539
+ margin: var(--matcha-space-150, 12px) auto var(--matcha-space-100, 8px);
540
+ background: var(--matcha-color-surface-border);
541
+ opacity: 0.6;
542
+ border-radius: 2px;
543
+ }
544
+
545
+ .matcha-select-sheet-header {
546
+ flex: 0 0 auto;
547
+ display: flex;
548
+ align-items: center;
549
+ gap: var(--matcha-space-100, 8px);
550
+ padding: var(--matcha-space-100, 8px) var(--matcha-space-100, 8px) var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
551
+ border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
552
+ }
553
+
554
+ .matcha-select-sheet-title {
555
+ flex: 1 1 auto;
556
+ margin: 0;
557
+ font-family: var(--matcha-font-family);
558
+ font-size: 17px;
559
+ font-weight: 600;
560
+ line-height: 1.3;
561
+ color: var(--matcha-color-text-primary);
562
+ overflow: hidden;
563
+ text-overflow: ellipsis;
564
+ white-space: nowrap;
565
+ }
566
+
567
+ .matcha-select-sheet-close {
568
+ flex: 0 0 auto;
569
+ appearance: none;
570
+ width: 40px;
571
+ height: 40px;
572
+ padding: 0;
573
+ background: transparent;
574
+ border: 0;
575
+ border-radius: 50%;
576
+ color: var(--matcha-color-text-secondary);
577
+ cursor: pointer;
578
+ font-size: 24px;
579
+ line-height: 1;
580
+ display: inline-flex;
581
+ align-items: center;
582
+ justify-content: center;
583
+ transition: background-color var(--matcha-duration-instant, 80ms) ease;
584
+
585
+ &:hover { background: var(--matcha-color-surface-hover, rgba(0, 0, 0, 0.08)); }
586
+ &:focus-visible {
587
+ outline: 2px solid var(--matcha-color-primary);
588
+ outline-offset: -2px;
589
+ }
590
+ }
591
+
592
+ // Sheet-mode ajusta o scroll da lista pra caber dentro da sheet
593
+ .matcha-select-options-sheet {
594
+ flex: 1 1 auto;
595
+ overflow-y: auto;
596
+ -webkit-overflow-scrolling: touch;
597
+ display: flex;
598
+ flex-direction: column;
599
+ }
600
+
601
+ .matcha-select-sheet-list {
602
+ flex: 1 1 auto;
603
+ overflow-y: auto;
604
+ padding: var(--matcha-space-050, 4px) 0;
605
+ }
606
+
607
+ // Sheet-mode options são full-width com padding mais generoso pra toque
608
+ .matcha-select-options-sheet matcha-option {
609
+ padding-left: var(--matcha-space-200, 16px);
610
+ padding-right: var(--matcha-space-200, 16px);
611
+ min-height: 48px; // Alvo tátil iOS (44px mínimo + folga)
612
+ }
613
+
614
+ // Safe-area bottom — respeita env() do iOS + fallback 12px
615
+ .matcha-select-sheet-safe-area {
616
+ flex: 0 0 auto;
617
+ height: calc(env(safe-area-inset-bottom, 0px) + var(--matcha-space-150, 12px));
618
+ background: var(--matcha-color-surface-card-strong, var(--matcha-color-surface-card));
619
+ }
620
+
621
+ // Quando sheet-mode tá ativo, esconder a arrow do trigger faz menos sentido —
622
+ // mas mantemos porque ainda comunica "expandable". Tap target expandido.
623
+ @media (max-width: 768px) {
624
+ .matcha-select-trigger {
625
+ min-height: 48px;
626
+ }
627
+ }
628
+
629
+ }