@inchurch/matcha-theme 20.0.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/README.md +303 -0
- package/abstracts/_colors.scss +405 -0
- package/abstracts/_elevation.scss +102 -0
- package/abstracts/_functions.scss +1213 -0
- package/abstracts/_media-breakpoint.scss +23 -0
- package/abstracts/_typography.scss +127 -0
- package/base/_reset.scss +438 -0
- package/components/matcha-accordion.scss +157 -0
- package/components/matcha-audio-player.scss +32 -0
- package/components/matcha-autocomplete.scss +134 -0
- package/components/matcha-avatar.scss +161 -0
- package/components/matcha-badge.scss +120 -0
- package/components/matcha-breadcrumb.scss +126 -0
- package/components/matcha-button-toggle.scss +363 -0
- package/components/matcha-buttons.scss +784 -0
- package/components/matcha-calendar.scss +154 -0
- package/components/matcha-cards.scss +205 -0
- package/components/matcha-chart-card.scss +60 -0
- package/components/matcha-checkbox.scss +554 -0
- package/components/matcha-chip.scss +212 -0
- package/components/matcha-color-pick.scss +35 -0
- package/components/matcha-command-palette.scss +89 -0
- package/components/matcha-crop.scss +172 -0
- package/components/matcha-date.scss +81 -0
- package/components/matcha-divider.scss +45 -0
- package/components/matcha-draggable.scss +24 -0
- package/components/matcha-drawer.scss +235 -0
- package/components/matcha-drop-list.scss +390 -0
- package/components/matcha-emoji.scss +69 -0
- package/components/matcha-empty-state.scss +118 -0
- package/components/matcha-flag.scss +62 -0
- package/components/matcha-footer.scss +187 -0
- package/components/matcha-form-field.scss +552 -0
- package/components/matcha-form-section.scss +101 -0
- package/components/matcha-header.scss +325 -0
- package/components/matcha-highlight.scss +296 -0
- package/components/matcha-hint-text.scss +66 -0
- package/components/matcha-horizontal-tree.scss +317 -0
- package/components/matcha-icon.scss +106 -0
- package/components/matcha-image.scss +62 -0
- package/components/matcha-list.scss +212 -0
- package/components/matcha-menu.scss +86 -0
- package/components/matcha-modal.scss +234 -0
- package/components/matcha-nav.scss +450 -0
- package/components/matcha-notification.scss +197 -0
- package/components/matcha-option.scss +95 -0
- package/components/matcha-page-builder.scss +4186 -0
- package/components/matcha-paginator.scss +235 -0
- package/components/matcha-panel.scss +167 -0
- package/components/matcha-profile-card.scss +50 -0
- package/components/matcha-progress-bar.scss +209 -0
- package/components/matcha-radio.scss +528 -0
- package/components/matcha-ripple.scss +7 -0
- package/components/matcha-scrollbar.scss +35 -0
- package/components/matcha-scrollbox-shadow.scss +123 -0
- package/components/matcha-section.scss +105 -0
- package/components/matcha-select.scss +661 -0
- package/components/matcha-skeleton.scss +138 -0
- package/components/matcha-slide-toggle.scss +590 -0
- package/components/matcha-slider.scss +188 -0
- package/components/matcha-snack-bar.scss +266 -0
- package/components/matcha-spin.scss +252 -0
- package/components/matcha-spinner.scss +78 -0
- package/components/matcha-stepper.scss +177 -0
- package/components/matcha-table-cell.scss +41 -0
- package/components/matcha-table.scss +785 -0
- package/components/matcha-tabs.scss +469 -0
- package/components/matcha-text-editor.scss +151 -0
- package/components/matcha-time.scss +33 -0
- package/components/matcha-timepicker.scss +13 -0
- package/components/matcha-toolbar.scss +206 -0
- package/components/matcha-tooltip.scss +128 -0
- package/components/matcha-uploader.scss +215 -0
- package/css/matcha-style.css +76772 -0
- package/fonts/CircularStd-Black.eot +0 -0
- package/fonts/CircularStd-Black.svg +3426 -0
- package/fonts/CircularStd-Black.ttf +0 -0
- package/fonts/CircularStd-Black.woff +0 -0
- package/fonts/CircularStd-Black.woff2 +0 -0
- package/fonts/CircularStd-Bold.eot +0 -0
- package/fonts/CircularStd-Bold.otf +0 -0
- package/fonts/CircularStd-Bold.svg +13532 -0
- package/fonts/CircularStd-Bold.ttf +0 -0
- package/fonts/CircularStd-Bold.woff +0 -0
- package/fonts/CircularStd-Bold.woff2 +0 -0
- package/fonts/CircularStd-Medium.eot +0 -0
- package/fonts/CircularStd-Medium.otf +0 -0
- package/fonts/CircularStd-Medium.svg +13511 -0
- package/fonts/CircularStd-Medium.ttf +0 -0
- package/fonts/CircularStd-Medium.woff +0 -0
- package/fonts/CircularStd-Medium.woff2 +0 -0
- package/fonts/CircularStd-Regular.eot +0 -0
- package/fonts/CircularStd-Regular.otf +0 -0
- package/fonts/CircularStd-Regular.svg +2378 -0
- package/fonts/CircularStd-Regular.ttf +0 -0
- package/fonts/CircularStd-Regular.woff +0 -0
- package/fonts/CircularStd-Regular.woff2 +0 -0
- package/main.scss +262 -0
- package/package.json +11 -0
- package/tokens/_animations-tokens.scss +37 -0
- package/tokens/_breakpoints-tokens.scss +26 -0
- package/tokens/_color-tokens.scss +1153 -0
- package/tokens/_css-custom-properties.scss +568 -0
- package/tokens/_elevation-tokens.scss +33 -0
- package/tokens/_spacing-tokens.scss +94 -0
- package/tokens/_typography-tokens.scss +65 -0
- package/vendors/angular-editor.scss +56 -0
- package/vendors/angular-material-fixes.scss +297 -0
- package/vendors/calendar.scss +2880 -0
- package/vendors/charts.scss +92 -0
- package/vendors/ng5-slider.scss +56 -0
- package/vendors/ngx-material-timepicker.scss +50 -0
|
@@ -0,0 +1,661 @@
|
|
|
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, #{getAccent($theme)});
|
|
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, #{getForeground($theme)});
|
|
83
|
+
|
|
84
|
+
&.matcha-select-placeholder {
|
|
85
|
+
color: var(--matcha-color-text-placeholder, #{getGrey($theme)});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Combobox input (searchable + single): plano, herda tipografia do trigger,
|
|
90
|
+
// sem border/background próprios — parece o próprio campo.
|
|
91
|
+
.matcha-select-combobox-input {
|
|
92
|
+
flex: 1;
|
|
93
|
+
min-width: 0;
|
|
94
|
+
padding: 0;
|
|
95
|
+
margin: 0;
|
|
96
|
+
border: 0;
|
|
97
|
+
background: transparent;
|
|
98
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
99
|
+
font: inherit;
|
|
100
|
+
font-family: var(--matcha-font-family);
|
|
101
|
+
outline: none;
|
|
102
|
+
text-overflow: ellipsis;
|
|
103
|
+
cursor: text;
|
|
104
|
+
|
|
105
|
+
&::placeholder {
|
|
106
|
+
color: var(--matcha-color-text-placeholder, #{getGrey($theme)});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:disabled {
|
|
110
|
+
color: var(--matcha-color-disabled-fg, #{getDisabledContrast($theme)});
|
|
111
|
+
cursor: not-allowed;
|
|
112
|
+
background: transparent;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Modo combobox: trigger não tem cursor pointer (quem manda é o input).
|
|
117
|
+
.matcha-select-trigger.matcha-select-combobox {
|
|
118
|
+
cursor: text;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.matcha-select-arrow {
|
|
122
|
+
display: inline-flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
margin-left: var(--matcha-space-100, 8px);
|
|
126
|
+
transition: transform var(--matcha-duration-fast, 200ms) ease;
|
|
127
|
+
color: var(--matcha-color-text-placeholder); // Figma #9AA0A6 dark / placeholder light
|
|
128
|
+
font-size: 16px; // default SM
|
|
129
|
+
width: 16px;
|
|
130
|
+
height: 16px;
|
|
131
|
+
line-height: 16px;
|
|
132
|
+
flex: none;
|
|
133
|
+
|
|
134
|
+
&.matcha-select-arrow-open {
|
|
135
|
+
transform: rotate(180deg);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Seta por size (Figma matcha/field/select): SM 16 · MD 20 · LG 24
|
|
140
|
+
matcha-form-field[size="md"] matcha-select .matcha-select-arrow,
|
|
141
|
+
matcha-form-field[size="medium"] matcha-select .matcha-select-arrow {
|
|
142
|
+
font-size: 20px;
|
|
143
|
+
width: 20px;
|
|
144
|
+
height: 20px;
|
|
145
|
+
line-height: 20px;
|
|
146
|
+
}
|
|
147
|
+
matcha-form-field[size="lg"] matcha-select .matcha-select-arrow,
|
|
148
|
+
matcha-form-field[size="large"] matcha-select .matcha-select-arrow,
|
|
149
|
+
matcha-form-field[size="huge"] matcha-select .matcha-select-arrow {
|
|
150
|
+
font-size: 24px;
|
|
151
|
+
width: 24px;
|
|
152
|
+
height: 24px;
|
|
153
|
+
line-height: 24px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Tipografia do value por size (Figma): SM/MD body-md 14/20 · LG body-lg 16/24
|
|
157
|
+
matcha-form-field[size="lg"] .matcha-select-value,
|
|
158
|
+
matcha-form-field[size="lg"] .matcha-select-combobox-input,
|
|
159
|
+
matcha-form-field[size="large"] .matcha-select-value,
|
|
160
|
+
matcha-form-field[size="large"] .matcha-select-combobox-input,
|
|
161
|
+
matcha-form-field[size="huge"] .matcha-select-value,
|
|
162
|
+
matcha-form-field[size="huge"] .matcha-select-combobox-input {
|
|
163
|
+
font-size: 16px;
|
|
164
|
+
line-height: 24px;
|
|
165
|
+
}
|
|
166
|
+
matcha-form-field[size="sm"] .matcha-select-value,
|
|
167
|
+
matcha-form-field[size="sm"] .matcha-select-combobox-input,
|
|
168
|
+
matcha-form-field[size="md"] .matcha-select-value,
|
|
169
|
+
matcha-form-field[size="md"] .matcha-select-combobox-input,
|
|
170
|
+
matcha-form-field[size="tiny"] .matcha-select-value,
|
|
171
|
+
matcha-form-field[size="tiny"] .matcha-select-combobox-input,
|
|
172
|
+
matcha-form-field[size="small"] .matcha-select-value,
|
|
173
|
+
matcha-form-field[size="small"] .matcha-select-combobox-input,
|
|
174
|
+
matcha-form-field[size="medium"] .matcha-select-value,
|
|
175
|
+
matcha-form-field[size="medium"] .matcha-select-combobox-input {
|
|
176
|
+
font-size: 14px;
|
|
177
|
+
line-height: 20px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Disabled: seta cinza 38%
|
|
181
|
+
matcha-form-field[disabled] .matcha-select-arrow,
|
|
182
|
+
matcha-form-field[disabled="true"] .matcha-select-arrow,
|
|
183
|
+
matcha-select[disabled] .matcha-select-arrow,
|
|
184
|
+
.matcha-select-disabled .matcha-select-arrow {
|
|
185
|
+
color: var(--matcha-color-interaction-disabled-fg);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// ── Clear button (× quando clearable + tem valor) ──
|
|
189
|
+
// Size-responsive igual a seta (SM 16, MD 20, LG 24). Sem círculo no hover.
|
|
190
|
+
// NOTA: box dimensions + line-height CASAM exatamente com .matcha-select-arrow
|
|
191
|
+
// pra compensar os baselines diferentes dos icon fonts (close vs arrow_down).
|
|
192
|
+
.matcha-select-clear {
|
|
193
|
+
display: inline-flex;
|
|
194
|
+
align-items: center;
|
|
195
|
+
justify-content: center;
|
|
196
|
+
width: 16px; // default SM (matches .matcha-select-arrow)
|
|
197
|
+
height: 16px;
|
|
198
|
+
margin: 0 var(--matcha-space-050, 4px) 0 0; // gap antes da seta
|
|
199
|
+
padding: 0;
|
|
200
|
+
background: transparent;
|
|
201
|
+
border: 0;
|
|
202
|
+
border-radius: 0;
|
|
203
|
+
color: var(--matcha-color-text-placeholder);
|
|
204
|
+
cursor: pointer;
|
|
205
|
+
font-size: 16px;
|
|
206
|
+
line-height: 16px; // absoluto (match arrow) — essencial pro baseline
|
|
207
|
+
flex: none;
|
|
208
|
+
transition: color var(--matcha-duration-fast, 200ms) ease;
|
|
209
|
+
|
|
210
|
+
// Ícone interno: força display block + centralização via line-height
|
|
211
|
+
// pra neutralizar baseline gap dos glyphs
|
|
212
|
+
> [class^="i-matcha-"],
|
|
213
|
+
> [class*=" i-matcha-"] {
|
|
214
|
+
display: inline-block;
|
|
215
|
+
font-size: inherit;
|
|
216
|
+
width: 1em;
|
|
217
|
+
height: 1em;
|
|
218
|
+
line-height: 1em;
|
|
219
|
+
vertical-align: middle;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&:hover {
|
|
223
|
+
background: transparent;
|
|
224
|
+
color: var(--matcha-color-text-primary);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&:focus { outline: none; }
|
|
228
|
+
&:focus-visible {
|
|
229
|
+
outline: var(--matcha-border-thin, 2px) solid var(--matcha-color-primary);
|
|
230
|
+
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
231
|
+
border-radius: var(--matcha-radius-md, 4px);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Clear × por size do form-field — casa 1:1 com a seta (Figma SM 16 · MD 20 · LG 24)
|
|
236
|
+
matcha-form-field[size="md"] matcha-select .matcha-select-clear,
|
|
237
|
+
matcha-form-field[size="medium"] matcha-select .matcha-select-clear {
|
|
238
|
+
width: 20px;
|
|
239
|
+
height: 20px;
|
|
240
|
+
font-size: 20px;
|
|
241
|
+
}
|
|
242
|
+
matcha-form-field[size="lg"] matcha-select .matcha-select-clear,
|
|
243
|
+
matcha-form-field[size="large"] matcha-select .matcha-select-clear,
|
|
244
|
+
matcha-form-field[size="huge"] matcha-select .matcha-select-clear {
|
|
245
|
+
width: 24px;
|
|
246
|
+
height: 24px;
|
|
247
|
+
font-size: 24px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// ── Disabled ──
|
|
251
|
+
.matcha-select-disabled {
|
|
252
|
+
.matcha-select-trigger {
|
|
253
|
+
pointer-events: none;
|
|
254
|
+
cursor: default;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.matcha-select-value {
|
|
258
|
+
color: var(--matcha-color-disabled-fg, #{getDisabledContrast($theme)});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.matcha-select-arrow {
|
|
262
|
+
opacity: var(--matcha-opacity-disabled, 0.38);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
267
|
+
// Multi-select — chips dentro do trigger
|
|
268
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
269
|
+
|
|
270
|
+
// Container dos chips (substitui .matcha-select-value quando multiple=true)
|
|
271
|
+
.matcha-select-chips {
|
|
272
|
+
flex: 1;
|
|
273
|
+
display: flex;
|
|
274
|
+
flex-wrap: wrap;
|
|
275
|
+
align-items: center;
|
|
276
|
+
gap: var(--matcha-space-050, 4px);
|
|
277
|
+
min-width: 0;
|
|
278
|
+
overflow: hidden;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Trigger em modo multi precisa de padding vertical leve pras chips respirarem
|
|
282
|
+
// e altura automática (cresce com número de chips).
|
|
283
|
+
.matcha-select-trigger.matcha-select-multiple {
|
|
284
|
+
padding-top: var(--matcha-space-025, 2px);
|
|
285
|
+
padding-bottom: var(--matcha-space-025, 2px);
|
|
286
|
+
min-height: inherit;
|
|
287
|
+
flex-wrap: nowrap;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Chip individual — pill pequeno com label + × remove
|
|
291
|
+
.matcha-select-chip {
|
|
292
|
+
display: inline-flex;
|
|
293
|
+
align-items: center;
|
|
294
|
+
gap: var(--matcha-space-050, 4px);
|
|
295
|
+
max-width: 100%;
|
|
296
|
+
height: 22px;
|
|
297
|
+
padding: 0 var(--matcha-space-075, 6px);
|
|
298
|
+
background: var(--matcha-color-accent-2-surface, rgba(0,0,0,0.08));
|
|
299
|
+
color: var(--matcha-color-text-primary);
|
|
300
|
+
border-radius: var(--matcha-radius-pill, 12px);
|
|
301
|
+
font-family: var(--matcha-font-family);
|
|
302
|
+
font-size: 12px;
|
|
303
|
+
font-weight: 500;
|
|
304
|
+
line-height: 1;
|
|
305
|
+
letter-spacing: 0.1px;
|
|
306
|
+
white-space: nowrap;
|
|
307
|
+
user-select: none;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Label do chip (trunca com ellipsis em chips longos)
|
|
311
|
+
.matcha-select-chip-label {
|
|
312
|
+
overflow: hidden;
|
|
313
|
+
text-overflow: ellipsis;
|
|
314
|
+
white-space: nowrap;
|
|
315
|
+
max-width: 160px;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Botão × individual de cada chip
|
|
319
|
+
.matcha-select-chip-remove {
|
|
320
|
+
display: inline-flex;
|
|
321
|
+
align-items: center;
|
|
322
|
+
justify-content: center;
|
|
323
|
+
width: 14px;
|
|
324
|
+
height: 14px;
|
|
325
|
+
padding: 0;
|
|
326
|
+
margin: 0;
|
|
327
|
+
background: transparent;
|
|
328
|
+
border: 0;
|
|
329
|
+
border-radius: 50%;
|
|
330
|
+
color: var(--matcha-color-text-placeholder);
|
|
331
|
+
cursor: pointer;
|
|
332
|
+
font-size: 14px;
|
|
333
|
+
line-height: 14px;
|
|
334
|
+
transition: background-color var(--matcha-duration-instant, 80ms) ease,
|
|
335
|
+
color var(--matcha-duration-instant, 80ms) ease;
|
|
336
|
+
|
|
337
|
+
&:hover {
|
|
338
|
+
background: var(--matcha-color-surface-hover, rgba(0,0,0,0.12));
|
|
339
|
+
color: var(--matcha-color-text-primary);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
&:focus { outline: none; }
|
|
343
|
+
&:focus-visible {
|
|
344
|
+
outline: var(--matcha-border-thin, 2px) solid var(--matcha-color-primary);
|
|
345
|
+
outline-offset: 1px;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// Chip sizes acompanham o size do form-field (opcional — mantém SM como default)
|
|
350
|
+
matcha-form-field[size="md"] matcha-select .matcha-select-chip,
|
|
351
|
+
matcha-form-field[size="medium"] matcha-select .matcha-select-chip {
|
|
352
|
+
height: 24px;
|
|
353
|
+
font-size: 13px;
|
|
354
|
+
}
|
|
355
|
+
matcha-form-field[size="lg"] matcha-select .matcha-select-chip,
|
|
356
|
+
matcha-form-field[size="large"] matcha-select .matcha-select-chip {
|
|
357
|
+
height: 28px;
|
|
358
|
+
font-size: 14px;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
362
|
+
// Multi-select panel — checkmark + bulk actions header
|
|
363
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
364
|
+
|
|
365
|
+
// Wrapper dentro do panel. .matcha-select-options-multi modifica options filhas.
|
|
366
|
+
.matcha-select-options-multi {
|
|
367
|
+
// Checkmark nas options selecionadas — aparece ANTES do label.
|
|
368
|
+
// Usa pseudo-element pra não precisar mexer no template de matcha-option.
|
|
369
|
+
matcha-option[aria-selected="true"] {
|
|
370
|
+
padding-left: var(--matcha-space-400, 32px);
|
|
371
|
+
position: relative;
|
|
372
|
+
|
|
373
|
+
&::before {
|
|
374
|
+
content: '';
|
|
375
|
+
position: absolute;
|
|
376
|
+
left: var(--matcha-space-150, 12px);
|
|
377
|
+
top: 50%;
|
|
378
|
+
width: 16px;
|
|
379
|
+
height: 16px;
|
|
380
|
+
margin-top: -8px;
|
|
381
|
+
background-color: var(--matcha-color-primary);
|
|
382
|
+
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>");
|
|
383
|
+
-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>");
|
|
384
|
+
mask-size: contain;
|
|
385
|
+
-webkit-mask-size: contain;
|
|
386
|
+
mask-repeat: no-repeat;
|
|
387
|
+
-webkit-mask-repeat: no-repeat;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// Reserva espaço pro checkmark mesmo nas não-selecionadas (alinhamento do texto)
|
|
392
|
+
matcha-option {
|
|
393
|
+
padding-left: var(--matcha-space-400, 32px);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// Bulk actions header (Selecionar todos / Limpar / contagem)
|
|
398
|
+
.matcha-select-bulk-actions {
|
|
399
|
+
display: flex;
|
|
400
|
+
align-items: center;
|
|
401
|
+
gap: var(--matcha-space-100, 8px);
|
|
402
|
+
padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
|
|
403
|
+
border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border-subtle, rgba(0,0,0,0.08));
|
|
404
|
+
margin-bottom: var(--matcha-space-050, 4px);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.matcha-select-bulk-btn {
|
|
408
|
+
appearance: none;
|
|
409
|
+
border: 0;
|
|
410
|
+
background: transparent;
|
|
411
|
+
color: var(--matcha-color-primary);
|
|
412
|
+
cursor: pointer;
|
|
413
|
+
font: inherit;
|
|
414
|
+
font-size: 13px;
|
|
415
|
+
font-weight: 500;
|
|
416
|
+
padding: var(--matcha-space-050, 4px) var(--matcha-space-100, 8px);
|
|
417
|
+
border-radius: var(--matcha-radius-sm, 4px);
|
|
418
|
+
transition: background-color var(--matcha-duration-instant, 80ms) ease;
|
|
419
|
+
|
|
420
|
+
&:hover:not(:disabled) { background: var(--matcha-color-primary-surface-hover); }
|
|
421
|
+
&:disabled { pointer-events: none; opacity: var(--matcha-opacity-disabled, 0.38); }
|
|
422
|
+
&:focus-visible {
|
|
423
|
+
outline: 2px solid var(--matcha-color-primary);
|
|
424
|
+
outline-offset: 1px;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.matcha-select-bulk-btn-ghost {
|
|
429
|
+
color: var(--matcha-color-text-secondary);
|
|
430
|
+
font-weight: 400;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.matcha-select-bulk-count {
|
|
434
|
+
margin-left: auto;
|
|
435
|
+
font-size: 12px;
|
|
436
|
+
color: var(--matcha-color-text-placeholder);
|
|
437
|
+
font-weight: 400;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
441
|
+
// Searchable — input de busca no topo do panel + empty state
|
|
442
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
443
|
+
|
|
444
|
+
// Zera padding-top do panel quando o search é a 1ª coisa dentro. O search
|
|
445
|
+
// já tem padding próprio; o padding do panel (8px) somava e gerava gap
|
|
446
|
+
// visual entre trigger e o campo de busca.
|
|
447
|
+
.matcha-panel:has(> .matcha-select-options > .matcha-select-search:first-child) {
|
|
448
|
+
padding-top: 0;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.matcha-select-search {
|
|
452
|
+
position: relative;
|
|
453
|
+
padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
|
|
454
|
+
border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border-subtle, rgba(0,0,0,0.08));
|
|
455
|
+
transition: border-color var(--matcha-duration-instant, 80ms) ease;
|
|
456
|
+
|
|
457
|
+
&:focus-within {
|
|
458
|
+
border-bottom-color: var(--matcha-color-primary);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// Input plano: sem border/background próprios. O container `.matcha-select-search`
|
|
463
|
+
// faz o papel de "campo" via padding + divider bottom, e focus-within muda a cor
|
|
464
|
+
// do divider. Evita efeito "card dentro de card" dentro do panel.
|
|
465
|
+
.matcha-select-search-input {
|
|
466
|
+
width: 100%;
|
|
467
|
+
height: 24px;
|
|
468
|
+
padding: 0 var(--matcha-space-400, 32px) 0 0;
|
|
469
|
+
border: 0;
|
|
470
|
+
border-radius: 0;
|
|
471
|
+
background: transparent;
|
|
472
|
+
color: var(--matcha-color-text-primary);
|
|
473
|
+
font: inherit;
|
|
474
|
+
font-size: 13px;
|
|
475
|
+
outline: none;
|
|
476
|
+
|
|
477
|
+
&::placeholder { color: var(--matcha-color-text-placeholder); }
|
|
478
|
+
&:focus { outline: none; }
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.matcha-select-search-clear {
|
|
482
|
+
position: absolute;
|
|
483
|
+
right: calc(var(--matcha-space-150, 12px) + var(--matcha-space-100, 8px));
|
|
484
|
+
top: 50%;
|
|
485
|
+
transform: translateY(-50%);
|
|
486
|
+
width: 18px;
|
|
487
|
+
height: 18px;
|
|
488
|
+
padding: 0;
|
|
489
|
+
background: transparent;
|
|
490
|
+
border: 0;
|
|
491
|
+
border-radius: 50%;
|
|
492
|
+
color: var(--matcha-color-text-placeholder);
|
|
493
|
+
cursor: pointer;
|
|
494
|
+
font-size: 16px;
|
|
495
|
+
line-height: 1;
|
|
496
|
+
display: inline-flex;
|
|
497
|
+
align-items: center;
|
|
498
|
+
justify-content: center;
|
|
499
|
+
|
|
500
|
+
&:hover {
|
|
501
|
+
background: var(--matcha-color-surface-hover, rgba(0,0,0,0.12));
|
|
502
|
+
color: var(--matcha-color-text-primary);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
.matcha-select-empty {
|
|
507
|
+
padding: var(--matcha-space-200, 16px) var(--matcha-space-200, 16px);
|
|
508
|
+
text-align: center;
|
|
509
|
+
color: var(--matcha-color-text-placeholder);
|
|
510
|
+
font-size: 13px;
|
|
511
|
+
font-style: italic;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
515
|
+
// Bottom-sheet (mobile) — aligned com Figma matcha/field/select/mobile-sheet
|
|
516
|
+
// Ativa automaticamente em <=768px (ou via [mode]="'sheet'"). Full-width bottom-anchored.
|
|
517
|
+
// ═══════════════════════════════════════════════════════════════════════
|
|
518
|
+
.matcha-select-sheet-overlay {
|
|
519
|
+
position: fixed;
|
|
520
|
+
inset: 0;
|
|
521
|
+
z-index: 10002;
|
|
522
|
+
// Scrim 40% — cor do token com alpha aplicado via rgba (token resolve pra cor sólida)
|
|
523
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
524
|
+
opacity: 0;
|
|
525
|
+
pointer-events: none;
|
|
526
|
+
transition: opacity var(--matcha-duration-fast, 200ms) ease;
|
|
527
|
+
|
|
528
|
+
display: flex;
|
|
529
|
+
flex-direction: column;
|
|
530
|
+
justify-content: flex-end;
|
|
531
|
+
|
|
532
|
+
&.matcha-select-sheet-open {
|
|
533
|
+
opacity: 1;
|
|
534
|
+
pointer-events: auto;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.matcha-select-sheet {
|
|
539
|
+
position: relative;
|
|
540
|
+
width: 100%;
|
|
541
|
+
max-height: 90vh;
|
|
542
|
+
min-height: 50vh;
|
|
543
|
+
background: var(--matcha-color-surface-card);
|
|
544
|
+
border-top-left-radius: var(--matcha-radius-xl, 16px);
|
|
545
|
+
border-top-right-radius: var(--matcha-radius-xl, 16px);
|
|
546
|
+
box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
|
|
547
|
+
|
|
548
|
+
display: flex;
|
|
549
|
+
flex-direction: column;
|
|
550
|
+
overflow: hidden;
|
|
551
|
+
|
|
552
|
+
// Slide-up animation — inicia off-screen e anima em.
|
|
553
|
+
// Classe `.matcha-select-sheet-open` aplicada diretamente (não via parent)
|
|
554
|
+
// pra evitar problemas de specificity com containers aninhados.
|
|
555
|
+
transform: translateY(100%);
|
|
556
|
+
transition: transform var(--matcha-duration-fast, 200ms) cubic-bezier(0.2, 0, 0, 1);
|
|
557
|
+
|
|
558
|
+
&.matcha-select-sheet-open {
|
|
559
|
+
transform: translateY(0);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
@media (prefers-reduced-motion: reduce) {
|
|
563
|
+
transition: none;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.matcha-select-sheet-handle {
|
|
568
|
+
flex: 0 0 auto;
|
|
569
|
+
width: 40px;
|
|
570
|
+
height: 4px;
|
|
571
|
+
margin: var(--matcha-space-150, 12px) auto var(--matcha-space-100, 8px);
|
|
572
|
+
background: var(--matcha-color-surface-border);
|
|
573
|
+
opacity: 0.6;
|
|
574
|
+
border-radius: 2px;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.matcha-select-sheet-header {
|
|
578
|
+
flex: 0 0 auto;
|
|
579
|
+
display: flex;
|
|
580
|
+
align-items: center;
|
|
581
|
+
gap: var(--matcha-space-100, 8px);
|
|
582
|
+
padding: var(--matcha-space-100, 8px) var(--matcha-space-100, 8px) var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
583
|
+
border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.matcha-select-sheet-title {
|
|
587
|
+
flex: 1 1 auto;
|
|
588
|
+
margin: 0;
|
|
589
|
+
font-family: var(--matcha-font-family);
|
|
590
|
+
font-size: 17px;
|
|
591
|
+
font-weight: 600;
|
|
592
|
+
line-height: 1.3;
|
|
593
|
+
color: var(--matcha-color-text-primary);
|
|
594
|
+
overflow: hidden;
|
|
595
|
+
text-overflow: ellipsis;
|
|
596
|
+
white-space: nowrap;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.matcha-select-sheet-close {
|
|
600
|
+
flex: 0 0 auto;
|
|
601
|
+
appearance: none;
|
|
602
|
+
width: 40px;
|
|
603
|
+
height: 40px;
|
|
604
|
+
padding: 0;
|
|
605
|
+
background: transparent;
|
|
606
|
+
border: 0;
|
|
607
|
+
border-radius: 50%;
|
|
608
|
+
color: var(--matcha-color-text-secondary);
|
|
609
|
+
cursor: pointer;
|
|
610
|
+
font-size: 24px;
|
|
611
|
+
line-height: 1;
|
|
612
|
+
display: inline-flex;
|
|
613
|
+
align-items: center;
|
|
614
|
+
justify-content: center;
|
|
615
|
+
transition: background-color var(--matcha-duration-instant, 80ms) ease;
|
|
616
|
+
|
|
617
|
+
&:hover { background: var(--matcha-color-surface-hover, rgba(0, 0, 0, 0.08)); }
|
|
618
|
+
&:focus-visible {
|
|
619
|
+
outline: 2px solid var(--matcha-color-primary);
|
|
620
|
+
outline-offset: -2px;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
// Sheet-mode ajusta o scroll da lista pra caber dentro da sheet
|
|
625
|
+
.matcha-select-options-sheet {
|
|
626
|
+
flex: 1 1 auto;
|
|
627
|
+
overflow-y: auto;
|
|
628
|
+
-webkit-overflow-scrolling: touch;
|
|
629
|
+
display: flex;
|
|
630
|
+
flex-direction: column;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.matcha-select-sheet-list {
|
|
634
|
+
flex: 1 1 auto;
|
|
635
|
+
overflow-y: auto;
|
|
636
|
+
padding: var(--matcha-space-050, 4px) 0;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
// Sheet-mode options são full-width com padding mais generoso pra toque
|
|
640
|
+
.matcha-select-options-sheet matcha-option {
|
|
641
|
+
padding-left: var(--matcha-space-200, 16px);
|
|
642
|
+
padding-right: var(--matcha-space-200, 16px);
|
|
643
|
+
min-height: 48px; // Alvo tátil iOS (44px mínimo + folga)
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
// Safe-area bottom — respeita env() do iOS + fallback 12px
|
|
647
|
+
.matcha-select-sheet-safe-area {
|
|
648
|
+
flex: 0 0 auto;
|
|
649
|
+
height: calc(env(safe-area-inset-bottom, 0px) + var(--matcha-space-150, 12px));
|
|
650
|
+
background: var(--matcha-color-surface-card);
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
// Quando sheet-mode tá ativo, esconder a arrow do trigger faz menos sentido —
|
|
654
|
+
// mas mantemos porque ainda comunica "expandable". Tap target expandido.
|
|
655
|
+
@media (max-width: 768px) {
|
|
656
|
+
.matcha-select-trigger {
|
|
657
|
+
min-height: 48px;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
}
|