@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,316 +1,316 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
// =============================================================================
|
|
4
|
-
// matcha-command-palette.scss — Command Palette (⌘K) — 100% tokens DSV3
|
|
5
|
-
//
|
|
6
|
-
// Estrutura (portada pra document.body em runtime via Renderer2):
|
|
7
|
-
// overlay (fixed, inset:0, blur backdrop, flex center)
|
|
8
|
-
// └── container (relative, 520px, radius-xl, shadow-4)
|
|
9
|
-
// ├── search (input + ESC kbd)
|
|
10
|
-
// ├── divider (hairline)
|
|
11
|
-
// ├── results listbox (overflow-y, scroll-snap)
|
|
12
|
-
// │ ├── section header (caption uppercase)
|
|
13
|
-
// │ ├── result button[role=option]
|
|
14
|
-
// │ └── matcha-empty-state (compact, slot quando vazio)
|
|
15
|
-
// └── footer (kbd tips)
|
|
16
|
-
//
|
|
17
|
-
// A11y: combobox + listbox + aria-activedescendant. Focus permanece no input.
|
|
18
|
-
// =============================================================================
|
|
19
|
-
|
|
20
|
-
// ── Theme (color tokens via mixin pra dark/light) ──────────────────────────
|
|
21
|
-
@mixin matcha-command-palette-theme($theme) {
|
|
22
|
-
|
|
23
|
-
.matcha-command-palette {
|
|
24
|
-
background: var(--matcha-color-surface-card);
|
|
25
|
-
border: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
|
|
26
|
-
box-shadow: var(--matcha-shadow-4);
|
|
27
|
-
color: var(--matcha-color-text-primary);
|
|
28
|
-
|
|
29
|
-
&__search-icon {
|
|
30
|
-
color: var(--matcha-color-text-secondary);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&__input {
|
|
34
|
-
color: var(--matcha-color-text-primary);
|
|
35
|
-
&::placeholder { color: var(--matcha-color-text-placeholder); }
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// __divider: cor/bg gerenciados pelo matcha-divider canônico.
|
|
39
|
-
|
|
40
|
-
&__section {
|
|
41
|
-
color: var(--matcha-color-text-secondary);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&__result {
|
|
45
|
-
color: var(--matcha-color-text-primary);
|
|
46
|
-
|
|
47
|
-
&-icon { color: var(--matcha-color-text-secondary); }
|
|
48
|
-
|
|
49
|
-
&:hover:not(:disabled) {
|
|
50
|
-
background: var(--matcha-color-surface-hover);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&--selected {
|
|
54
|
-
background: var(--matcha-color-accent-alpha);
|
|
55
|
-
|
|
56
|
-
.matcha-command-palette__result-icon { color: var(--matcha-color-accent); }
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&:disabled { color: var(--matcha-color-text-disabled, var(--matcha-color-text-muted)); }
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&__shortcut,
|
|
63
|
-
&__esc-hint,
|
|
64
|
-
&__footer kbd {
|
|
65
|
-
background: var(--matcha-color-surface-inner);
|
|
66
|
-
border-color: var(--matcha-color-surface-border);
|
|
67
|
-
color: var(--matcha-color-text-secondary);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&__footer {
|
|
71
|
-
background: var(--matcha-color-surface-inner);
|
|
72
|
-
color: var(--matcha-color-text-secondary);
|
|
73
|
-
border-top: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// ── Host (não usa display:contents pra não interferir com Renderer2) ───────
|
|
79
|
-
.matcha-command-palette-host {
|
|
80
|
-
display: contents;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// ── Overlay (full-viewport, único position:fixed) ──────────────────────────
|
|
84
|
-
// Portado pra document.body em runtime — sem risco de containing-block trap.
|
|
85
|
-
// Flexbox CENTRA container vertical + horizontalmente no viewport (canon Spotlight/Linear).
|
|
86
|
-
.matcha-command-palette-overlay {
|
|
87
|
-
position: fixed;
|
|
88
|
-
inset: 0;
|
|
89
|
-
z-index: var(--matcha-z-overlay, 1000);
|
|
90
|
-
background: var(--matcha-color-scrim, rgba(0, 0, 0, 0.5));
|
|
91
|
-
backdrop-filter: blur(var(--matcha-scrim-modal-blur, 4px));
|
|
92
|
-
-webkit-backdrop-filter: blur(var(--matcha-scrim-modal-blur, 4px));
|
|
93
|
-
|
|
94
|
-
display: flex;
|
|
95
|
-
align-items: center; // centra verticalmente no viewport
|
|
96
|
-
justify-content: center; // centra horizontalmente no viewport
|
|
97
|
-
padding: var(--matcha-space-200, 16px);
|
|
98
|
-
box-sizing: border-box;
|
|
99
|
-
|
|
100
|
-
animation: matcha-cmd-overlay-in var(--matcha-duration-fast, 200ms) ease-out;
|
|
101
|
-
|
|
102
|
-
&.is-closing {
|
|
103
|
-
animation: matcha-cmd-overlay-out var(--matcha-duration-fast, 180ms) ease-in forwards;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// ── Container (520px, radius-xl, shadow-4) — relative dentro do overlay ───
|
|
108
|
-
// Dimensões via CSS custom properties (escopo do componente) — permitem override
|
|
109
|
-
// em theme dark/light ou via [style.--matcha-command-palette-width].
|
|
110
|
-
.matcha-command-palette {
|
|
111
|
-
--matcha-command-palette-width: 520px;
|
|
112
|
-
--matcha-command-palette-max-height: 480px;
|
|
113
|
-
|
|
114
|
-
position: relative;
|
|
115
|
-
display: flex;
|
|
116
|
-
flex-direction: column;
|
|
117
|
-
width: min(var(--matcha-command-palette-width), 100%);
|
|
118
|
-
max-height: min(70vh, var(--matcha-command-palette-max-height));
|
|
119
|
-
border-radius: var(--matcha-radius-xl, 16px);
|
|
120
|
-
overflow: hidden;
|
|
121
|
-
font-family: var(--matcha-font-family);
|
|
122
|
-
|
|
123
|
-
animation: matcha-cmd-in var(--matcha-duration-fast, 200ms) var(--matcha-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
|
|
124
|
-
|
|
125
|
-
&.is-closing {
|
|
126
|
-
animation: matcha-cmd-out var(--matcha-duration-fast, 180ms) var(--matcha-easing-accelerated, cubic-bezier(0.4, 0, 1, 1)) forwards;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// ── Search ────────────────────────────────────────────────────────────
|
|
130
|
-
&__search {
|
|
131
|
-
display: flex;
|
|
132
|
-
align-items: center;
|
|
133
|
-
gap: var(--matcha-space-150, 12px);
|
|
134
|
-
padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
135
|
-
min-height: var(--matcha-control-size-md, 52px);
|
|
136
|
-
flex-shrink: 0;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
&__search-icon {
|
|
140
|
-
flex-shrink: 0;
|
|
141
|
-
font-size: var(--matcha-icon-size-sm, 16px);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
&__input {
|
|
145
|
-
flex: 1;
|
|
146
|
-
min-width: 0;
|
|
147
|
-
border: 0;
|
|
148
|
-
background: transparent;
|
|
149
|
-
outline: 0;
|
|
150
|
-
font-family: var(--matcha-font-family);
|
|
151
|
-
font-size: var(--matcha-text-body-md, 14px);
|
|
152
|
-
line-height: var(--matcha-leading-body-md, 20px);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
&__esc-hint {
|
|
156
|
-
flex-shrink: 0;
|
|
157
|
-
display: inline-flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
justify-content: center;
|
|
160
|
-
padding: var(--matcha-space-025, 2px) var(--matcha-space-075, 6px);
|
|
161
|
-
font-family: var(--matcha-font-family);
|
|
162
|
-
font-size: var(--matcha-text-p-tiny, 11px);
|
|
163
|
-
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
164
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
165
|
-
letter-spacing: var(--matcha-letter-spacing-wider, 1px);
|
|
166
|
-
border: var(--matcha-border-hairline, 1px) solid;
|
|
167
|
-
border-radius: var(--matcha-radius-md, 4px);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// ── Divider (matcha-divider canônico — só ajuste de flex-shrink no parent flex) ──
|
|
171
|
-
&__divider {
|
|
172
|
-
flex-shrink: 0;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// ── Results ────────────────────────────────────────────────────────────
|
|
176
|
-
&__results {
|
|
177
|
-
flex: 1 1 auto;
|
|
178
|
-
overflow-y: auto;
|
|
179
|
-
padding: var(--matcha-space-100, 8px);
|
|
180
|
-
scroll-behavior: smooth;
|
|
181
|
-
scrollbar-width: thin;
|
|
182
|
-
|
|
183
|
-
// Quando há matcha-empty-state, centra ele no espaço disponível.
|
|
184
|
-
&:has(.matcha-command-palette__empty) {
|
|
185
|
-
display: flex;
|
|
186
|
-
align-items: center;
|
|
187
|
-
justify-content: center;
|
|
188
|
-
padding: var(--matcha-space-300, 24px);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
&__section {
|
|
193
|
-
padding: var(--matcha-space-150, 12px) var(--matcha-space-150, 12px) var(--matcha-space-050, 4px);
|
|
194
|
-
font-size: var(--matcha-text-p-tiny, 11px);
|
|
195
|
-
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
196
|
-
font-weight: var(--matcha-weight-semibold, 600);
|
|
197
|
-
text-transform: uppercase;
|
|
198
|
-
letter-spacing: var(--matcha-letter-spacing-wider, 1px);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// ── Result (button[role=option]) ──────────────────────────────────────
|
|
202
|
-
&__result {
|
|
203
|
-
display: flex;
|
|
204
|
-
align-items: center;
|
|
205
|
-
gap: var(--matcha-space-150, 12px);
|
|
206
|
-
width: 100%;
|
|
207
|
-
padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
|
|
208
|
-
min-height: var(--matcha-control-size-sm, 36px);
|
|
209
|
-
border: 0;
|
|
210
|
-
background: transparent;
|
|
211
|
-
border-radius: var(--matcha-radius-md, 4px);
|
|
212
|
-
cursor: pointer;
|
|
213
|
-
text-align: start;
|
|
214
|
-
font-family: var(--matcha-font-family);
|
|
215
|
-
font-size: var(--matcha-text-body-md, 14px);
|
|
216
|
-
line-height: var(--matcha-leading-body-md, 20px);
|
|
217
|
-
transition: background var(--matcha-duration-instant, 80ms) ease;
|
|
218
|
-
|
|
219
|
-
&:disabled { cursor: not-allowed; }
|
|
220
|
-
|
|
221
|
-
&--selected { font-weight: var(--matcha-weight-medium, 500); }
|
|
222
|
-
|
|
223
|
-
&-icon {
|
|
224
|
-
flex-shrink: 0;
|
|
225
|
-
font-size: var(--matcha-icon-size-sm, 16px);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
&-label {
|
|
229
|
-
flex: 1;
|
|
230
|
-
min-width: 0;
|
|
231
|
-
overflow: hidden;
|
|
232
|
-
white-space: nowrap;
|
|
233
|
-
text-overflow: ellipsis;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
// ── Shortcut + kbd (compartilham token base) ──────────────────────────
|
|
238
|
-
&__shortcut,
|
|
239
|
-
&__footer kbd {
|
|
240
|
-
flex-shrink: 0;
|
|
241
|
-
display: inline-flex;
|
|
242
|
-
align-items: center;
|
|
243
|
-
justify-content: center;
|
|
244
|
-
min-width: var(--matcha-space-300, 24px);
|
|
245
|
-
height: var(--matcha-space-250, 20px);
|
|
246
|
-
padding: 0 var(--matcha-space-075, 6px);
|
|
247
|
-
font-family: var(--matcha-font-family);
|
|
248
|
-
font-size: var(--matcha-text-p-tiny, 11px);
|
|
249
|
-
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
250
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
251
|
-
border: var(--matcha-border-hairline, 1px) solid;
|
|
252
|
-
border-radius: var(--matcha-radius-sm, 2px);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
// ── Empty (matcha-empty-state slot) ───────────────────────────────────
|
|
256
|
-
&__empty {
|
|
257
|
-
width: 100%;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
// ── Footer (kbd tips) ─────────────────────────────────────────────────
|
|
261
|
-
&__footer {
|
|
262
|
-
display: flex;
|
|
263
|
-
align-items: center;
|
|
264
|
-
gap: var(--matcha-space-200, 16px);
|
|
265
|
-
padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
|
|
266
|
-
min-height: var(--matcha-space-450, 38px);
|
|
267
|
-
flex-shrink: 0;
|
|
268
|
-
font-size: var(--matcha-text-p-tiny, 11px);
|
|
269
|
-
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
&__footer-tip {
|
|
273
|
-
display: inline-flex;
|
|
274
|
-
align-items: center;
|
|
275
|
-
gap: var(--matcha-space-075, 6px);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
// ── Animations ──────────────────────────────────────────────────────────────
|
|
280
|
-
@keyframes matcha-cmd-overlay-in {
|
|
281
|
-
from { opacity: 0; }
|
|
282
|
-
to { opacity: 1; }
|
|
283
|
-
}
|
|
284
|
-
@keyframes matcha-cmd-overlay-out {
|
|
285
|
-
from { opacity: 1; }
|
|
286
|
-
to { opacity: 0; }
|
|
287
|
-
}
|
|
288
|
-
@keyframes matcha-cmd-in {
|
|
289
|
-
from { opacity: 0; transform: translateY(-8px) scale(0.96); }
|
|
290
|
-
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
291
|
-
}
|
|
292
|
-
@keyframes matcha-cmd-out {
|
|
293
|
-
from { opacity: 1; transform: translateY(0) scale(1); }
|
|
294
|
-
to { opacity: 0; transform: translateY(-8px) scale(0.96); }
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
298
|
-
@media (prefers-reduced-motion: reduce) {
|
|
299
|
-
.matcha-command-palette,
|
|
300
|
-
.matcha-command-palette-overlay {
|
|
301
|
-
animation: none !important;
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
// ── Forced colors (Windows High Contrast) ──────────────────────────────────
|
|
306
|
-
@media (forced-colors: active) {
|
|
307
|
-
.matcha-command-palette {
|
|
308
|
-
border: var(--matcha-border-thin, 1px) solid CanvasText;
|
|
309
|
-
|
|
310
|
-
&__result--selected {
|
|
311
|
-
background: Highlight;
|
|
312
|
-
color: HighlightText;
|
|
313
|
-
forced-color-adjust: none;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-command-palette.scss — Command Palette (⌘K) — 100% tokens DSV3
|
|
5
|
+
//
|
|
6
|
+
// Estrutura (portada pra document.body em runtime via Renderer2):
|
|
7
|
+
// overlay (fixed, inset:0, blur backdrop, flex center)
|
|
8
|
+
// └── container (relative, 520px, radius-xl, shadow-4)
|
|
9
|
+
// ├── search (input + ESC kbd)
|
|
10
|
+
// ├── divider (hairline)
|
|
11
|
+
// ├── results listbox (overflow-y, scroll-snap)
|
|
12
|
+
// │ ├── section header (caption uppercase)
|
|
13
|
+
// │ ├── result button[role=option]
|
|
14
|
+
// │ └── matcha-empty-state (compact, slot quando vazio)
|
|
15
|
+
// └── footer (kbd tips)
|
|
16
|
+
//
|
|
17
|
+
// A11y: combobox + listbox + aria-activedescendant. Focus permanece no input.
|
|
18
|
+
// =============================================================================
|
|
19
|
+
|
|
20
|
+
// ── Theme (color tokens via mixin pra dark/light) ──────────────────────────
|
|
21
|
+
@mixin matcha-command-palette-theme($theme) {
|
|
22
|
+
|
|
23
|
+
.matcha-command-palette {
|
|
24
|
+
background: var(--matcha-color-surface-card);
|
|
25
|
+
border: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
|
|
26
|
+
box-shadow: var(--matcha-shadow-4);
|
|
27
|
+
color: var(--matcha-color-text-primary);
|
|
28
|
+
|
|
29
|
+
&__search-icon {
|
|
30
|
+
color: var(--matcha-color-text-secondary);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__input {
|
|
34
|
+
color: var(--matcha-color-text-primary);
|
|
35
|
+
&::placeholder { color: var(--matcha-color-text-placeholder); }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// __divider: cor/bg gerenciados pelo matcha-divider canônico.
|
|
39
|
+
|
|
40
|
+
&__section {
|
|
41
|
+
color: var(--matcha-color-text-secondary);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__result {
|
|
45
|
+
color: var(--matcha-color-text-primary);
|
|
46
|
+
|
|
47
|
+
&-icon { color: var(--matcha-color-text-secondary); }
|
|
48
|
+
|
|
49
|
+
&:hover:not(:disabled) {
|
|
50
|
+
background: var(--matcha-color-surface-hover);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&--selected {
|
|
54
|
+
background: var(--matcha-color-accent-alpha);
|
|
55
|
+
|
|
56
|
+
.matcha-command-palette__result-icon { color: var(--matcha-color-accent); }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:disabled { color: var(--matcha-color-text-disabled, var(--matcha-color-text-muted)); }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&__shortcut,
|
|
63
|
+
&__esc-hint,
|
|
64
|
+
&__footer kbd {
|
|
65
|
+
background: var(--matcha-color-surface-inner);
|
|
66
|
+
border-color: var(--matcha-color-surface-border);
|
|
67
|
+
color: var(--matcha-color-text-secondary);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__footer {
|
|
71
|
+
background: var(--matcha-color-surface-inner);
|
|
72
|
+
color: var(--matcha-color-text-secondary);
|
|
73
|
+
border-top: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ── Host (não usa display:contents pra não interferir com Renderer2) ───────
|
|
79
|
+
.matcha-command-palette-host {
|
|
80
|
+
display: contents;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// ── Overlay (full-viewport, único position:fixed) ──────────────────────────
|
|
84
|
+
// Portado pra document.body em runtime — sem risco de containing-block trap.
|
|
85
|
+
// Flexbox CENTRA container vertical + horizontalmente no viewport (canon Spotlight/Linear).
|
|
86
|
+
.matcha-command-palette-overlay {
|
|
87
|
+
position: fixed;
|
|
88
|
+
inset: 0;
|
|
89
|
+
z-index: var(--matcha-z-overlay, 1000);
|
|
90
|
+
background: var(--matcha-color-scrim, rgba(0, 0, 0, 0.5));
|
|
91
|
+
backdrop-filter: blur(var(--matcha-scrim-modal-blur, 4px));
|
|
92
|
+
-webkit-backdrop-filter: blur(var(--matcha-scrim-modal-blur, 4px));
|
|
93
|
+
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center; // centra verticalmente no viewport
|
|
96
|
+
justify-content: center; // centra horizontalmente no viewport
|
|
97
|
+
padding: var(--matcha-space-200, 16px);
|
|
98
|
+
box-sizing: border-box;
|
|
99
|
+
|
|
100
|
+
animation: matcha-cmd-overlay-in var(--matcha-duration-fast, 200ms) ease-out;
|
|
101
|
+
|
|
102
|
+
&.is-closing {
|
|
103
|
+
animation: matcha-cmd-overlay-out var(--matcha-duration-fast, 180ms) ease-in forwards;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// ── Container (520px, radius-xl, shadow-4) — relative dentro do overlay ───
|
|
108
|
+
// Dimensões via CSS custom properties (escopo do componente) — permitem override
|
|
109
|
+
// em theme dark/light ou via [style.--matcha-command-palette-width].
|
|
110
|
+
.matcha-command-palette {
|
|
111
|
+
--matcha-command-palette-width: 520px;
|
|
112
|
+
--matcha-command-palette-max-height: 480px;
|
|
113
|
+
|
|
114
|
+
position: relative;
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
width: min(var(--matcha-command-palette-width), 100%);
|
|
118
|
+
max-height: min(70vh, var(--matcha-command-palette-max-height));
|
|
119
|
+
border-radius: var(--matcha-radius-xl, 16px);
|
|
120
|
+
overflow: hidden;
|
|
121
|
+
font-family: var(--matcha-font-family);
|
|
122
|
+
|
|
123
|
+
animation: matcha-cmd-in var(--matcha-duration-fast, 200ms) var(--matcha-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
|
|
124
|
+
|
|
125
|
+
&.is-closing {
|
|
126
|
+
animation: matcha-cmd-out var(--matcha-duration-fast, 180ms) var(--matcha-easing-accelerated, cubic-bezier(0.4, 0, 1, 1)) forwards;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// ── Search ────────────────────────────────────────────────────────────
|
|
130
|
+
&__search {
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
gap: var(--matcha-space-150, 12px);
|
|
134
|
+
padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
135
|
+
min-height: var(--matcha-control-size-md, 52px);
|
|
136
|
+
flex-shrink: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&__search-icon {
|
|
140
|
+
flex-shrink: 0;
|
|
141
|
+
font-size: var(--matcha-icon-size-sm, 16px);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&__input {
|
|
145
|
+
flex: 1;
|
|
146
|
+
min-width: 0;
|
|
147
|
+
border: 0;
|
|
148
|
+
background: transparent;
|
|
149
|
+
outline: 0;
|
|
150
|
+
font-family: var(--matcha-font-family);
|
|
151
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
152
|
+
line-height: var(--matcha-leading-body-md, 20px);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&__esc-hint {
|
|
156
|
+
flex-shrink: 0;
|
|
157
|
+
display: inline-flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
padding: var(--matcha-space-025, 2px) var(--matcha-space-075, 6px);
|
|
161
|
+
font-family: var(--matcha-font-family);
|
|
162
|
+
font-size: var(--matcha-text-p-tiny, 11px);
|
|
163
|
+
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
164
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
165
|
+
letter-spacing: var(--matcha-letter-spacing-wider, 1px);
|
|
166
|
+
border: var(--matcha-border-hairline, 1px) solid;
|
|
167
|
+
border-radius: var(--matcha-radius-md, 4px);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// ── Divider (matcha-divider canônico — só ajuste de flex-shrink no parent flex) ──
|
|
171
|
+
&__divider {
|
|
172
|
+
flex-shrink: 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// ── Results ────────────────────────────────────────────────────────────
|
|
176
|
+
&__results {
|
|
177
|
+
flex: 1 1 auto;
|
|
178
|
+
overflow-y: auto;
|
|
179
|
+
padding: var(--matcha-space-100, 8px);
|
|
180
|
+
scroll-behavior: smooth;
|
|
181
|
+
scrollbar-width: thin;
|
|
182
|
+
|
|
183
|
+
// Quando há matcha-empty-state, centra ele no espaço disponível.
|
|
184
|
+
&:has(.matcha-command-palette__empty) {
|
|
185
|
+
display: flex;
|
|
186
|
+
align-items: center;
|
|
187
|
+
justify-content: center;
|
|
188
|
+
padding: var(--matcha-space-300, 24px);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&__section {
|
|
193
|
+
padding: var(--matcha-space-150, 12px) var(--matcha-space-150, 12px) var(--matcha-space-050, 4px);
|
|
194
|
+
font-size: var(--matcha-text-p-tiny, 11px);
|
|
195
|
+
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
196
|
+
font-weight: var(--matcha-weight-semibold, 600);
|
|
197
|
+
text-transform: uppercase;
|
|
198
|
+
letter-spacing: var(--matcha-letter-spacing-wider, 1px);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// ── Result (button[role=option]) ──────────────────────────────────────
|
|
202
|
+
&__result {
|
|
203
|
+
display: flex;
|
|
204
|
+
align-items: center;
|
|
205
|
+
gap: var(--matcha-space-150, 12px);
|
|
206
|
+
width: 100%;
|
|
207
|
+
padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
|
|
208
|
+
min-height: var(--matcha-control-size-sm, 36px);
|
|
209
|
+
border: 0;
|
|
210
|
+
background: transparent;
|
|
211
|
+
border-radius: var(--matcha-radius-md, 4px);
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
text-align: start;
|
|
214
|
+
font-family: var(--matcha-font-family);
|
|
215
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
216
|
+
line-height: var(--matcha-leading-body-md, 20px);
|
|
217
|
+
transition: background var(--matcha-duration-instant, 80ms) ease;
|
|
218
|
+
|
|
219
|
+
&:disabled { cursor: not-allowed; }
|
|
220
|
+
|
|
221
|
+
&--selected { font-weight: var(--matcha-weight-medium, 500); }
|
|
222
|
+
|
|
223
|
+
&-icon {
|
|
224
|
+
flex-shrink: 0;
|
|
225
|
+
font-size: var(--matcha-icon-size-sm, 16px);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&-label {
|
|
229
|
+
flex: 1;
|
|
230
|
+
min-width: 0;
|
|
231
|
+
overflow: hidden;
|
|
232
|
+
white-space: nowrap;
|
|
233
|
+
text-overflow: ellipsis;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// ── Shortcut + kbd (compartilham token base) ──────────────────────────
|
|
238
|
+
&__shortcut,
|
|
239
|
+
&__footer kbd {
|
|
240
|
+
flex-shrink: 0;
|
|
241
|
+
display: inline-flex;
|
|
242
|
+
align-items: center;
|
|
243
|
+
justify-content: center;
|
|
244
|
+
min-width: var(--matcha-space-300, 24px);
|
|
245
|
+
height: var(--matcha-space-250, 20px);
|
|
246
|
+
padding: 0 var(--matcha-space-075, 6px);
|
|
247
|
+
font-family: var(--matcha-font-family);
|
|
248
|
+
font-size: var(--matcha-text-p-tiny, 11px);
|
|
249
|
+
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
250
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
251
|
+
border: var(--matcha-border-hairline, 1px) solid;
|
|
252
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// ── Empty (matcha-empty-state slot) ───────────────────────────────────
|
|
256
|
+
&__empty {
|
|
257
|
+
width: 100%;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// ── Footer (kbd tips) ─────────────────────────────────────────────────
|
|
261
|
+
&__footer {
|
|
262
|
+
display: flex;
|
|
263
|
+
align-items: center;
|
|
264
|
+
gap: var(--matcha-space-200, 16px);
|
|
265
|
+
padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
|
|
266
|
+
min-height: var(--matcha-space-450, 38px);
|
|
267
|
+
flex-shrink: 0;
|
|
268
|
+
font-size: var(--matcha-text-p-tiny, 11px);
|
|
269
|
+
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
&__footer-tip {
|
|
273
|
+
display: inline-flex;
|
|
274
|
+
align-items: center;
|
|
275
|
+
gap: var(--matcha-space-075, 6px);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// ── Animations ──────────────────────────────────────────────────────────────
|
|
280
|
+
@keyframes matcha-cmd-overlay-in {
|
|
281
|
+
from { opacity: 0; }
|
|
282
|
+
to { opacity: 1; }
|
|
283
|
+
}
|
|
284
|
+
@keyframes matcha-cmd-overlay-out {
|
|
285
|
+
from { opacity: 1; }
|
|
286
|
+
to { opacity: 0; }
|
|
287
|
+
}
|
|
288
|
+
@keyframes matcha-cmd-in {
|
|
289
|
+
from { opacity: 0; transform: translateY(-8px) scale(0.96); }
|
|
290
|
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
|
291
|
+
}
|
|
292
|
+
@keyframes matcha-cmd-out {
|
|
293
|
+
from { opacity: 1; transform: translateY(0) scale(1); }
|
|
294
|
+
to { opacity: 0; transform: translateY(-8px) scale(0.96); }
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
298
|
+
@media (prefers-reduced-motion: reduce) {
|
|
299
|
+
.matcha-command-palette,
|
|
300
|
+
.matcha-command-palette-overlay {
|
|
301
|
+
animation: none !important;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// ── Forced colors (Windows High Contrast) ──────────────────────────────────
|
|
306
|
+
@media (forced-colors: active) {
|
|
307
|
+
.matcha-command-palette {
|
|
308
|
+
border: var(--matcha-border-thin, 1px) solid CanvasText;
|
|
309
|
+
|
|
310
|
+
&__result--selected {
|
|
311
|
+
background: Highlight;
|
|
312
|
+
color: HighlightText;
|
|
313
|
+
forced-color-adjust: none;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|