@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,581 +1,581 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
// =============================================================================
|
|
4
|
-
// matcha-nav.scss — Navigation system (nav-item, nav-rail, nav-panel, command-palette)
|
|
5
|
-
// =============================================================================
|
|
6
|
-
|
|
7
|
-
// ── Nav Item ─────────────────────────────────────────────────────────────────
|
|
8
|
-
|
|
9
|
-
// Host: wrapper estrutural. Não tem padding/bg — só layout column pra empilhar
|
|
10
|
-
// row + children. Permite que o consumer aninhe nav-items sem quebrar o layout.
|
|
11
|
-
.matcha-nav-item {
|
|
12
|
-
position: relative;
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
align-items: stretch;
|
|
16
|
-
width: 100%;
|
|
17
|
-
text-decoration: none;
|
|
18
|
-
color: inherit;
|
|
19
|
-
user-select: none;
|
|
20
|
-
// Reset pra <button>/<a> caso o host venha como esses elementos.
|
|
21
|
-
appearance: none;
|
|
22
|
-
border: 0;
|
|
23
|
-
background: transparent;
|
|
24
|
-
font: inherit;
|
|
25
|
-
text-align: start;
|
|
26
|
-
outline: none;
|
|
27
|
-
|
|
28
|
-
&.matcha-nav-item--disabled {
|
|
29
|
-
pointer-events: none;
|
|
30
|
-
cursor: default;
|
|
31
|
-
|
|
32
|
-
.matcha-nav-item__row {
|
|
33
|
-
cursor: default;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Focus-visible no host (keyboard) → repassa pro __row (visual).
|
|
38
|
-
&:focus-visible .matcha-nav-item__row {
|
|
39
|
-
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
|
|
40
|
-
outline-offset: calc(-1 * var(--matcha-state-focus-ring-width, 2px));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Row: o "botão" visível do nav-item — Figma DSV3 1:1.
|
|
45
|
-
// Expansível: pad 8/12, gap 8, radius md (4px), body-md (14/20 regular)
|
|
46
|
-
// Indentado: pad 6/8/24, gap 8, radius sm (2px), body-sm (12/16 regular)
|
|
47
|
-
// Ativo: bg accent/alpha + border-inline-start 3px accent + label medium 500
|
|
48
|
-
// Hover: bg accent/surface-hover
|
|
49
|
-
// Expandido: bg accent/surface-pressed
|
|
50
|
-
//
|
|
51
|
-
// box-sizing: border-box + border-inline-start: 3px solid accent (no Ativo)
|
|
52
|
-
// gera shift de 3px no content (Padrão @12 → Ativo @15) — literal Figma.
|
|
53
|
-
.matcha-nav-item__row {
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: row;
|
|
56
|
-
align-items: center;
|
|
57
|
-
gap: var(--matcha-space-100, 8px);
|
|
58
|
-
padding-block: var(--matcha-space-100, 8px);
|
|
59
|
-
padding-inline: var(--matcha-space-150, 12px);
|
|
60
|
-
border-radius: var(--matcha-radius-md, 4px);
|
|
61
|
-
border: 0;
|
|
62
|
-
background: transparent;
|
|
63
|
-
cursor: pointer;
|
|
64
|
-
width: 100%;
|
|
65
|
-
box-sizing: border-box;
|
|
66
|
-
transition: background-color var(--matcha-duration-instant, 80ms) ease,
|
|
67
|
-
border-color var(--matcha-duration-instant, 80ms) ease;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.matcha-nav-item__icon {
|
|
71
|
-
flex-shrink: 0;
|
|
72
|
-
width: 20px;
|
|
73
|
-
height: 20px;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.matcha-nav-item__label {
|
|
77
|
-
flex: 1;
|
|
78
|
-
font-size: var(--matcha-text-body-md, 14px);
|
|
79
|
-
font-weight: 400;
|
|
80
|
-
line-height: 20px;
|
|
81
|
-
overflow: hidden;
|
|
82
|
-
text-overflow: ellipsis;
|
|
83
|
-
white-space: nowrap;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Badge — Figma DSV3 spec (matcha/badge variant Label/Danger):
|
|
87
|
-
// padding 2/8, gap 4, radius pill (9999), bg feedback/danger, caption (11/14, letter 0.3).
|
|
88
|
-
// Em Ativo, font-weight medium 500 (Figma).
|
|
89
|
-
.matcha-nav-item__badge {
|
|
90
|
-
flex-shrink: 0;
|
|
91
|
-
display: inline-flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
justify-content: center;
|
|
94
|
-
padding: var(--matcha-space-025, 2px) var(--matcha-space-100, 8px);
|
|
95
|
-
gap: var(--matcha-space-050, 4px);
|
|
96
|
-
border-radius: var(--matcha-radius-pill, 9999px);
|
|
97
|
-
font-family: var(--matcha-font-family);
|
|
98
|
-
font-size: var(--matcha-text-p-tiny, 11px);
|
|
99
|
-
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
100
|
-
letter-spacing: var(--matcha-letter-spacing-caption, 0.3px);
|
|
101
|
-
font-weight: 400;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// Contador de itens da seção (drawer header) — número discreto à direita do label.
|
|
105
|
-
.matcha-nav-item__count {
|
|
106
|
-
flex-shrink: 0;
|
|
107
|
-
font-family: var(--matcha-font-family);
|
|
108
|
-
font-size: 11px;
|
|
109
|
-
font-weight: 600;
|
|
110
|
-
line-height: 16px;
|
|
111
|
-
letter-spacing: 0.4px;
|
|
112
|
-
color: var(--matcha-color-text-secondary);
|
|
113
|
-
opacity: 0.7;
|
|
114
|
-
margin-left: auto;
|
|
115
|
-
margin-right: 4px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Chevron — SVG matcha-icon variant=right (fixo). Rotaciona 90° via CSS quando
|
|
119
|
-
// item está expandido. Easing-emphasized (Material 3 spring) pra rotação smooth.
|
|
120
|
-
.matcha-nav-item__chevron {
|
|
121
|
-
flex-shrink: 0;
|
|
122
|
-
width: 16px;
|
|
123
|
-
height: 16px;
|
|
124
|
-
opacity: 0.5;
|
|
125
|
-
transition: transform var(--matcha-duration-fast, 200ms) var(--matcha-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
|
|
126
|
-
transform: rotate(0deg);
|
|
127
|
-
|
|
128
|
-
.matcha-nav-item--expanded & {
|
|
129
|
-
transform: rotate(90deg);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Indented variant (subitem) — Figma DSV3: só label, padding 6/8/24, radius sm.
|
|
134
|
-
.matcha-nav-item--indented .matcha-nav-item__row {
|
|
135
|
-
padding-block: var(--matcha-space-075, 6px);
|
|
136
|
-
padding-inline: var(--matcha-space-300, 24px) var(--matcha-space-100, 8px);
|
|
137
|
-
border-radius: var(--matcha-radius-sm, 2px);
|
|
138
|
-
|
|
139
|
-
.matcha-nav-item__label {
|
|
140
|
-
font-size: var(--matcha-text-body-sm, 12px);
|
|
141
|
-
line-height: 16px;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// Esconde slots não-canônicos do indentado (Figma só permite label).
|
|
145
|
-
.matcha-nav-item__icon,
|
|
146
|
-
.matcha-nav-item__badge,
|
|
147
|
-
.matcha-nav-item__chevron {
|
|
148
|
-
display: none;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// Children container (nav-items aninhados quando pai está expandido).
|
|
153
|
-
// Flex column garante que filhos empilhem verticalmente, NÃO inline com o row.
|
|
154
|
-
// Gap 4px igual ao items slot do panel — mantém rítmo visual consistente.
|
|
155
|
-
// Margin-top 4px separa o primeiro filho do row do pai.
|
|
156
|
-
//
|
|
157
|
-
// Animation: fade + slight slide-down ao montar (cada vez que *ngIf entra).
|
|
158
|
-
// Duration fast 200ms easing-emphasized — entra suave, não abrupto.
|
|
159
|
-
.matcha-nav-item__children {
|
|
160
|
-
display: flex;
|
|
161
|
-
flex-direction: column;
|
|
162
|
-
align-items: stretch;
|
|
163
|
-
gap: var(--matcha-space-050, 4px);
|
|
164
|
-
margin-top: var(--matcha-space-050, 4px);
|
|
165
|
-
width: 100%;
|
|
166
|
-
animation: matcha-nav-item-children-in
|
|
167
|
-
var(--matcha-duration-fast, 200ms)
|
|
168
|
-
var(--matcha-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
@keyframes matcha-nav-item-children-in {
|
|
172
|
-
from { opacity: 0; transform: translateY(-4px); }
|
|
173
|
-
to { opacity: 1; transform: translateY(0); }
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// ── Nav Rail (72px sidebar — Figma DSV3 1:1 com matcha/nav-rail) ────────────
|
|
177
|
-
|
|
178
|
-
.matcha-nav-rail {
|
|
179
|
-
// Wrapper externo: 72px wide, full height.
|
|
180
|
-
// Bg surface/bg (1 nível abaixo do panel) — cria depth tonal sutil sem
|
|
181
|
-
// precisar de border ou shadow. Pattern canônico de DS modernos (Slack,
|
|
182
|
-
// VS Code, Linear): rail "recuado" + panel "elevado". Hierarquia Z via tom.
|
|
183
|
-
display: flex;
|
|
184
|
-
flex-direction: column;
|
|
185
|
-
align-items: center;
|
|
186
|
-
width: 72px;
|
|
187
|
-
height: 100%;
|
|
188
|
-
flex-shrink: 0;
|
|
189
|
-
box-sizing: border-box;
|
|
190
|
-
overflow: hidden;
|
|
191
|
-
padding: 0;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.matcha-nav-rail__header {
|
|
195
|
-
// Figma: 72×56, padding 4/0, flex row center.
|
|
196
|
-
display: flex;
|
|
197
|
-
flex-direction: row;
|
|
198
|
-
align-items: center;
|
|
199
|
-
justify-content: center;
|
|
200
|
-
width: 100%;
|
|
201
|
-
height: var(--matcha-grid-header-height, 56px);
|
|
202
|
-
padding: var(--matcha-space-050, 4px) 0;
|
|
203
|
-
flex-shrink: 0;
|
|
204
|
-
box-sizing: border-box;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.matcha-nav-rail__modules {
|
|
208
|
-
// Figma: padding 12/0, gap 4, flex column center.
|
|
209
|
-
display: flex;
|
|
210
|
-
flex-direction: column;
|
|
211
|
-
align-items: center;
|
|
212
|
-
gap: var(--matcha-space-050, 4px);
|
|
213
|
-
padding: var(--matcha-space-150, 12px) 0;
|
|
214
|
-
flex: 1;
|
|
215
|
-
width: 100%;
|
|
216
|
-
box-sizing: border-box;
|
|
217
|
-
overflow-y: auto;
|
|
218
|
-
overflow-x: hidden;
|
|
219
|
-
|
|
220
|
-
// Hide scrollbar but keep scroll
|
|
221
|
-
scrollbar-width: none;
|
|
222
|
-
&::-webkit-scrollbar { display: none; }
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Module button — Figma: 44×44 (touch target), radius 12, sem padding.
|
|
226
|
-
// Suporta tanto o atributo de slot (consumer projeta com `matcha-nav-rail-module`)
|
|
227
|
-
// quanto a classe BEM (caso consumer use `.matcha-nav-rail__module` diretamente).
|
|
228
|
-
[matcha-nav-rail-module],
|
|
229
|
-
.matcha-nav-rail__module {
|
|
230
|
-
display: flex;
|
|
231
|
-
align-items: center;
|
|
232
|
-
justify-content: center;
|
|
233
|
-
width: 44px;
|
|
234
|
-
height: 44px;
|
|
235
|
-
padding: 0;
|
|
236
|
-
border: 0;
|
|
237
|
-
background: transparent;
|
|
238
|
-
border-radius: var(--matcha-radius-xl, 12px);
|
|
239
|
-
cursor: pointer;
|
|
240
|
-
flex-shrink: 0;
|
|
241
|
-
position: relative;
|
|
242
|
-
// Reset pra <button>
|
|
243
|
-
appearance: none;
|
|
244
|
-
font: inherit;
|
|
245
|
-
color: inherit;
|
|
246
|
-
transition: background-color var(--matcha-duration-instant, 80ms) ease,
|
|
247
|
-
color var(--matcha-duration-instant, 80ms) ease;
|
|
248
|
-
|
|
249
|
-
// Focus-visible — keyboard nav.
|
|
250
|
-
&:focus-visible {
|
|
251
|
-
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
|
|
252
|
-
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.matcha-nav-rail__footer {
|
|
257
|
-
// Figma: padding 8/0, flex column center.
|
|
258
|
-
display: flex;
|
|
259
|
-
flex-direction: column;
|
|
260
|
-
align-items: center;
|
|
261
|
-
width: 100%;
|
|
262
|
-
padding: var(--matcha-space-100, 8px) 0;
|
|
263
|
-
flex-shrink: 0;
|
|
264
|
-
box-sizing: border-box;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
.matcha-nav-rail__divider {
|
|
268
|
-
// Figma: 28×1, bg surface/border (rgba(255,255,255,0.12) dark).
|
|
269
|
-
// Sem opacity extra — token já tem 12% built-in.
|
|
270
|
-
flex-shrink: 0;
|
|
271
|
-
width: 28px;
|
|
272
|
-
height: 1px;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
// ── Nav Panel (216px sub-panel — Figma DSV3 1:1 com matcha/nav-panel) ───────
|
|
276
|
-
// Estrutura: header (title-row) → divider 192×1 → items slot.
|
|
277
|
-
// Bg surface/card · só border-right (não border completa) · width 216 fixa.
|
|
278
|
-
|
|
279
|
-
.matcha-nav-panel {
|
|
280
|
-
display: flex;
|
|
281
|
-
flex-direction: column;
|
|
282
|
-
align-items: stretch;
|
|
283
|
-
width: 216px;
|
|
284
|
-
height: 100%;
|
|
285
|
-
box-sizing: border-box;
|
|
286
|
-
padding: 0;
|
|
287
|
-
overflow: hidden;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
// Header — Figma: padding 20/20/16/20, gap 16.
|
|
291
|
-
// Logical properties pra suporte RTL automático.
|
|
292
|
-
// Aceita slot custom via [matcha-nav-panel-header] OU default title-row.
|
|
293
|
-
.matcha-nav-panel__header {
|
|
294
|
-
display: flex;
|
|
295
|
-
flex-direction: column;
|
|
296
|
-
align-items: flex-start;
|
|
297
|
-
gap: var(--matcha-space-200, 16px);
|
|
298
|
-
padding-block-start: var(--matcha-space-250, 20px);
|
|
299
|
-
padding-block-end: var(--matcha-space-200, 16px);
|
|
300
|
-
padding-inline: var(--matcha-space-250, 20px);
|
|
301
|
-
width: 100%;
|
|
302
|
-
box-sizing: border-box;
|
|
303
|
-
flex-shrink: 0;
|
|
304
|
-
|
|
305
|
-
// Default title-row some quando consumer projeta slot custom
|
|
306
|
-
// (priority pro custom, sem precisar de boolean prop).
|
|
307
|
-
&:has([matcha-nav-panel-header]) .matcha-nav-panel__title-row--default {
|
|
308
|
-
display: none;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
// Title row — Figma: padding 0, gap 8, body-md regular 14/20.
|
|
313
|
-
.matcha-nav-panel__title-row {
|
|
314
|
-
display: flex;
|
|
315
|
-
flex-direction: row;
|
|
316
|
-
align-items: center;
|
|
317
|
-
gap: var(--matcha-space-100, 8px);
|
|
318
|
-
width: 100%;
|
|
319
|
-
height: 20px;
|
|
320
|
-
min-width: 0;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
.matcha-nav-panel__title-icon {
|
|
324
|
-
flex-shrink: 0;
|
|
325
|
-
width: 16px;
|
|
326
|
-
height: 16px;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.matcha-nav-panel__title {
|
|
330
|
-
flex: 1;
|
|
331
|
-
font-family: var(--matcha-font-family);
|
|
332
|
-
font-size: var(--matcha-text-body-md, 14px);
|
|
333
|
-
font-weight: 400;
|
|
334
|
-
line-height: 20px;
|
|
335
|
-
overflow: hidden;
|
|
336
|
-
text-overflow: ellipsis;
|
|
337
|
-
white-space: nowrap;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
// Divider — Figma: 192×1 (= 216 - 12 - 12 padding sides), sibling do header.
|
|
341
|
-
// Centrado via margin auto.
|
|
342
|
-
.matcha-nav-panel__divider {
|
|
343
|
-
flex-shrink: 0;
|
|
344
|
-
width: 192px;
|
|
345
|
-
height: 1px;
|
|
346
|
-
margin: 0 auto;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
// Items slot — Figma: padding 12 (todos lados), gap 4, scroll vertical.
|
|
350
|
-
.matcha-nav-panel__items {
|
|
351
|
-
display: flex;
|
|
352
|
-
flex-direction: column;
|
|
353
|
-
align-items: stretch;
|
|
354
|
-
gap: var(--matcha-space-050, 4px);
|
|
355
|
-
padding: var(--matcha-space-150, 12px);
|
|
356
|
-
flex: 1;
|
|
357
|
-
width: 100%;
|
|
358
|
-
box-sizing: border-box;
|
|
359
|
-
overflow-y: auto;
|
|
360
|
-
overflow-x: hidden;
|
|
361
|
-
|
|
362
|
-
// Hide scrollbar mas mantém scroll funcional.
|
|
363
|
-
scrollbar-width: thin;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
// ── Command Palette ──────────────────────────────────────────────────────────
|
|
367
|
-
// Estilos do command-palette movidos pra matcha-command-palette.scss (canônico).
|
|
368
|
-
// Mantido aqui só o reduced-motion das outras nav classes.
|
|
369
|
-
|
|
370
|
-
@media (prefers-reduced-motion: reduce) {
|
|
371
|
-
.matcha-nav-item,
|
|
372
|
-
.matcha-nav-rail__module {
|
|
373
|
-
animation: none;
|
|
374
|
-
transition: none;
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
// ── Forced colors (Windows High Contrast) ──────────────────────────────────
|
|
379
|
-
// Bgs translúcidos (accent-surface-hover, accent-alpha) somem em high-contrast.
|
|
380
|
-
// Usa system colors (Highlight, SelectedItem, CanvasText) sempre visíveis.
|
|
381
|
-
@media (forced-colors: active) {
|
|
382
|
-
// ── Nav Item ──
|
|
383
|
-
.matcha-nav-item {
|
|
384
|
-
forced-color-adjust: none;
|
|
385
|
-
|
|
386
|
-
&.matcha-nav-item--active > .matcha-nav-item__row {
|
|
387
|
-
background: Highlight;
|
|
388
|
-
color: HighlightText;
|
|
389
|
-
border-inline-start: 3px solid Highlight;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
&:not(.matcha-nav-item--disabled):not(.matcha-nav-item--active) > .matcha-nav-item__row:hover,
|
|
393
|
-
&.matcha-nav-item--expanded:not(.matcha-nav-item--active) > .matcha-nav-item__row {
|
|
394
|
-
background: SelectedItem;
|
|
395
|
-
color: SelectedItemText;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
&:focus-visible .matcha-nav-item__row {
|
|
399
|
-
outline-color: CanvasText;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
// ── Nav Rail ──
|
|
404
|
-
.matcha-nav-rail {
|
|
405
|
-
border-inline-end-color: CanvasText;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
[matcha-nav-rail-module]:hover:not([aria-current]):not(.matcha-nav-rail__module--active),
|
|
409
|
-
.matcha-nav-rail__module:hover:not([aria-current]):not(.matcha-nav-rail__module--active) {
|
|
410
|
-
background: SelectedItem;
|
|
411
|
-
color: SelectedItemText;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
[matcha-nav-rail-module][aria-current],
|
|
415
|
-
[matcha-nav-rail-module].matcha-nav-rail__module--active,
|
|
416
|
-
.matcha-nav-rail__module--active {
|
|
417
|
-
background: Highlight;
|
|
418
|
-
color: HighlightText;
|
|
419
|
-
|
|
420
|
-
matcha-icon { color: HighlightText; }
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.matcha-nav-rail__divider {
|
|
424
|
-
background-color: CanvasText;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
// ── Nav Panel ──
|
|
428
|
-
.matcha-nav-panel {
|
|
429
|
-
border-color: CanvasText;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
.matcha-nav-panel__divider {
|
|
433
|
-
background-color: CanvasText;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
// ── Command Palette: high-contrast em matcha-command-palette.scss ──
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
// ── Print ──────────────────────────────────────────────────────────────────
|
|
440
|
-
// Convenção DS: chrome de navegação some em impressão — conteúdo full-page.
|
|
441
|
-
@media print {
|
|
442
|
-
.matcha-nav-rail,
|
|
443
|
-
.matcha-nav-panel {
|
|
444
|
-
display: none !important;
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
// =============================================================================
|
|
449
|
-
// Theme mixin
|
|
450
|
-
// =============================================================================
|
|
451
|
-
|
|
452
|
-
@mixin matcha-nav-theme($theme) {
|
|
453
|
-
// ── Nav Item ── Figma DSV3 (node 14998:10045) — tokens accent diretos
|
|
454
|
-
// Bg/border/etc aplicados no .matcha-nav-item__row (não no host) — assim
|
|
455
|
-
// os filhos aninhados não herdam o bg do pai expandido/ativo.
|
|
456
|
-
.matcha-nav-item {
|
|
457
|
-
color: var(--matcha-color-text-primary);
|
|
458
|
-
|
|
459
|
-
.matcha-nav-item__label {
|
|
460
|
-
color: var(--matcha-color-text-primary);
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
.matcha-nav-item__icon,
|
|
464
|
-
.matcha-nav-item__chevron {
|
|
465
|
-
color: var(--matcha-color-text-secondary);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
// Hover — bg accent/surface-hover direto (Figma usa este token, não state-layer).
|
|
469
|
-
&:not(.matcha-nav-item--disabled):not(.matcha-nav-item--active) > .matcha-nav-item__row:hover {
|
|
470
|
-
background-color: var(--matcha-color-accent-surface-hover);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
// Ativo — bg accent/alpha + border-inline-start 3px accent + label medium.
|
|
474
|
-
// 1:1 literal Figma. Aplicado no __row (não host) pra não vazar pros filhos.
|
|
475
|
-
&.matcha-nav-item--active > .matcha-nav-item__row {
|
|
476
|
-
background-color: var(--matcha-color-accent-alpha);
|
|
477
|
-
border-inline-start: 3px solid var(--matcha-color-accent);
|
|
478
|
-
|
|
479
|
-
.matcha-nav-item__label {
|
|
480
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.matcha-nav-item__badge {
|
|
484
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
485
|
-
color: var(--matcha-color-text-inverse, #1a1d21);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
// Expandido — pai com filhos abertos: bg accent/surface-pressed.
|
|
490
|
-
&.matcha-nav-item--expanded:not(.matcha-nav-item--active) > .matcha-nav-item__row {
|
|
491
|
-
background-color: var(--matcha-color-accent-surface-pressed);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
// Badge — Figma DSV3 feedback/danger bg + danger-contrast fg (Padrão).
|
|
495
|
-
.matcha-nav-item__badge {
|
|
496
|
-
background: var(--matcha-color-feedback-danger);
|
|
497
|
-
color: var(--matcha-color-feedback-danger-contrast, rgba(0, 0, 0, 0.87));
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
// Disabled — texto/ícone caem pra disabled-fg.
|
|
501
|
-
&.matcha-nav-item--disabled {
|
|
502
|
-
.matcha-nav-item__label,
|
|
503
|
-
.matcha-nav-item__icon,
|
|
504
|
-
.matcha-nav-item__chevron {
|
|
505
|
-
color: var(--matcha-color-interaction-disabled-fg);
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
// Indented — placeholder pra futuras diferenças de tema (border já no base).
|
|
511
|
-
|
|
512
|
-
// ── Nav Rail (depth sutil — light/dark adaptativo) ──
|
|
513
|
-
// Bg = surface-bg (page layer) + 4% foreground overlay via color-mix.
|
|
514
|
-
// Cria tonal step VISIBLE em ambos modes:
|
|
515
|
-
// - Light: surface-bg #f1f4f1 + 4% fg #2a2d33 → ~#e8ebe7 (recesso vs page brighter)
|
|
516
|
-
// - Dark: surface-bg #111318 + 4% fg #e8eaed → ~#1a1c20 (peak vs page darker)
|
|
517
|
-
// Antes usava surface-card 85% transparente, que em light ficava imperceptível
|
|
518
|
-
// (surface-card ≈ surface-bg no zona do branco — humano não distingue ~7 units).
|
|
519
|
-
.matcha-nav-rail {
|
|
520
|
-
background-color: color-mix(
|
|
521
|
-
in srgb,
|
|
522
|
-
var(--matcha-color-surface-bg) 96%,
|
|
523
|
-
var(--matcha-color-fg) 4%
|
|
524
|
-
);
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
[matcha-nav-rail-module],
|
|
528
|
-
.matcha-nav-rail__module {
|
|
529
|
-
// Inactive: text-secondary no button + override no matcha-icon filho
|
|
530
|
-
// (matcha-icon tem regra global no theme com mesma especificidade,
|
|
531
|
-
// então precisa target explícito pra vencer no cascade).
|
|
532
|
-
color: var(--matcha-color-text-secondary);
|
|
533
|
-
|
|
534
|
-
matcha-icon {
|
|
535
|
-
color: var(--matcha-color-text-secondary);
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
// Hover (inactive): bg accent/surface-hover (state-layer canon Figma).
|
|
539
|
-
&:hover:not(.matcha-nav-rail__module--active):not([aria-current]) {
|
|
540
|
-
background-color: var(--matcha-color-accent-surface-hover);
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
// Active: bg accent/surface-hover + icon accent.
|
|
544
|
-
// Figma usa #161E12 (accent/surface-hover token), não accent/alpha.
|
|
545
|
-
// Aceita .--active class OU aria-current (pattern ARIA canônico).
|
|
546
|
-
&.matcha-nav-rail__module--active,
|
|
547
|
-
&[aria-current] {
|
|
548
|
-
background-color: var(--matcha-color-accent-surface-hover);
|
|
549
|
-
color: var(--matcha-color-accent);
|
|
550
|
-
|
|
551
|
-
matcha-icon {
|
|
552
|
-
color: var(--matcha-color-accent);
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
.matcha-nav-rail__divider {
|
|
558
|
-
background-color: var(--matcha-color-surface-border);
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
// ── Nav Panel (Figma DSV3 1:1) ──
|
|
562
|
-
// bg surface/card (1 step acima do rail). Sem shadow — só tonal hierarchy.
|
|
563
|
-
.matcha-nav-panel {
|
|
564
|
-
background-color: var(--matcha-color-surface-card);
|
|
565
|
-
border-right: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
.matcha-nav-panel__divider {
|
|
569
|
-
background-color: var(--matcha-color-surface-border);
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
.matcha-nav-panel__title {
|
|
573
|
-
color: var(--matcha-color-text-primary);
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.matcha-nav-panel__title-icon {
|
|
577
|
-
color: var(--matcha-color-text-secondary);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
// ── Command Palette theme em matcha-command-palette.scss (canônico) ──
|
|
581
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-nav.scss — Navigation system (nav-item, nav-rail, nav-panel, command-palette)
|
|
5
|
+
// =============================================================================
|
|
6
|
+
|
|
7
|
+
// ── Nav Item ─────────────────────────────────────────────────────────────────
|
|
8
|
+
|
|
9
|
+
// Host: wrapper estrutural. Não tem padding/bg — só layout column pra empilhar
|
|
10
|
+
// row + children. Permite que o consumer aninhe nav-items sem quebrar o layout.
|
|
11
|
+
.matcha-nav-item {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: stretch;
|
|
16
|
+
width: 100%;
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
color: inherit;
|
|
19
|
+
user-select: none;
|
|
20
|
+
// Reset pra <button>/<a> caso o host venha como esses elementos.
|
|
21
|
+
appearance: none;
|
|
22
|
+
border: 0;
|
|
23
|
+
background: transparent;
|
|
24
|
+
font: inherit;
|
|
25
|
+
text-align: start;
|
|
26
|
+
outline: none;
|
|
27
|
+
|
|
28
|
+
&.matcha-nav-item--disabled {
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
cursor: default;
|
|
31
|
+
|
|
32
|
+
.matcha-nav-item__row {
|
|
33
|
+
cursor: default;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Focus-visible no host (keyboard) → repassa pro __row (visual).
|
|
38
|
+
&:focus-visible .matcha-nav-item__row {
|
|
39
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
|
|
40
|
+
outline-offset: calc(-1 * var(--matcha-state-focus-ring-width, 2px));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Row: o "botão" visível do nav-item — Figma DSV3 1:1.
|
|
45
|
+
// Expansível: pad 8/12, gap 8, radius md (4px), body-md (14/20 regular)
|
|
46
|
+
// Indentado: pad 6/8/24, gap 8, radius sm (2px), body-sm (12/16 regular)
|
|
47
|
+
// Ativo: bg accent/alpha + border-inline-start 3px accent + label medium 500
|
|
48
|
+
// Hover: bg accent/surface-hover
|
|
49
|
+
// Expandido: bg accent/surface-pressed
|
|
50
|
+
//
|
|
51
|
+
// box-sizing: border-box + border-inline-start: 3px solid accent (no Ativo)
|
|
52
|
+
// gera shift de 3px no content (Padrão @12 → Ativo @15) — literal Figma.
|
|
53
|
+
.matcha-nav-item__row {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: row;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: var(--matcha-space-100, 8px);
|
|
58
|
+
padding-block: var(--matcha-space-100, 8px);
|
|
59
|
+
padding-inline: var(--matcha-space-150, 12px);
|
|
60
|
+
border-radius: var(--matcha-radius-md, 4px);
|
|
61
|
+
border: 0;
|
|
62
|
+
background: transparent;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
width: 100%;
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
transition: background-color var(--matcha-duration-instant, 80ms) ease,
|
|
67
|
+
border-color var(--matcha-duration-instant, 80ms) ease;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.matcha-nav-item__icon {
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
width: 20px;
|
|
73
|
+
height: 20px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.matcha-nav-item__label {
|
|
77
|
+
flex: 1;
|
|
78
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
79
|
+
font-weight: 400;
|
|
80
|
+
line-height: 20px;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Badge — Figma DSV3 spec (matcha/badge variant Label/Danger):
|
|
87
|
+
// padding 2/8, gap 4, radius pill (9999), bg feedback/danger, caption (11/14, letter 0.3).
|
|
88
|
+
// Em Ativo, font-weight medium 500 (Figma).
|
|
89
|
+
.matcha-nav-item__badge {
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
display: inline-flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
padding: var(--matcha-space-025, 2px) var(--matcha-space-100, 8px);
|
|
95
|
+
gap: var(--matcha-space-050, 4px);
|
|
96
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
97
|
+
font-family: var(--matcha-font-family);
|
|
98
|
+
font-size: var(--matcha-text-p-tiny, 11px);
|
|
99
|
+
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
100
|
+
letter-spacing: var(--matcha-letter-spacing-caption, 0.3px);
|
|
101
|
+
font-weight: 400;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Contador de itens da seção (drawer header) — número discreto à direita do label.
|
|
105
|
+
.matcha-nav-item__count {
|
|
106
|
+
flex-shrink: 0;
|
|
107
|
+
font-family: var(--matcha-font-family);
|
|
108
|
+
font-size: 11px;
|
|
109
|
+
font-weight: 600;
|
|
110
|
+
line-height: 16px;
|
|
111
|
+
letter-spacing: 0.4px;
|
|
112
|
+
color: var(--matcha-color-text-secondary);
|
|
113
|
+
opacity: 0.7;
|
|
114
|
+
margin-left: auto;
|
|
115
|
+
margin-right: 4px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Chevron — SVG matcha-icon variant=right (fixo). Rotaciona 90° via CSS quando
|
|
119
|
+
// item está expandido. Easing-emphasized (Material 3 spring) pra rotação smooth.
|
|
120
|
+
.matcha-nav-item__chevron {
|
|
121
|
+
flex-shrink: 0;
|
|
122
|
+
width: 16px;
|
|
123
|
+
height: 16px;
|
|
124
|
+
opacity: 0.5;
|
|
125
|
+
transition: transform var(--matcha-duration-fast, 200ms) var(--matcha-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
|
|
126
|
+
transform: rotate(0deg);
|
|
127
|
+
|
|
128
|
+
.matcha-nav-item--expanded & {
|
|
129
|
+
transform: rotate(90deg);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Indented variant (subitem) — Figma DSV3: só label, padding 6/8/24, radius sm.
|
|
134
|
+
.matcha-nav-item--indented .matcha-nav-item__row {
|
|
135
|
+
padding-block: var(--matcha-space-075, 6px);
|
|
136
|
+
padding-inline: var(--matcha-space-300, 24px) var(--matcha-space-100, 8px);
|
|
137
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
138
|
+
|
|
139
|
+
.matcha-nav-item__label {
|
|
140
|
+
font-size: var(--matcha-text-body-sm, 12px);
|
|
141
|
+
line-height: 16px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Esconde slots não-canônicos do indentado (Figma só permite label).
|
|
145
|
+
.matcha-nav-item__icon,
|
|
146
|
+
.matcha-nav-item__badge,
|
|
147
|
+
.matcha-nav-item__chevron {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Children container (nav-items aninhados quando pai está expandido).
|
|
153
|
+
// Flex column garante que filhos empilhem verticalmente, NÃO inline com o row.
|
|
154
|
+
// Gap 4px igual ao items slot do panel — mantém rítmo visual consistente.
|
|
155
|
+
// Margin-top 4px separa o primeiro filho do row do pai.
|
|
156
|
+
//
|
|
157
|
+
// Animation: fade + slight slide-down ao montar (cada vez que *ngIf entra).
|
|
158
|
+
// Duration fast 200ms easing-emphasized — entra suave, não abrupto.
|
|
159
|
+
.matcha-nav-item__children {
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
align-items: stretch;
|
|
163
|
+
gap: var(--matcha-space-050, 4px);
|
|
164
|
+
margin-top: var(--matcha-space-050, 4px);
|
|
165
|
+
width: 100%;
|
|
166
|
+
animation: matcha-nav-item-children-in
|
|
167
|
+
var(--matcha-duration-fast, 200ms)
|
|
168
|
+
var(--matcha-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@keyframes matcha-nav-item-children-in {
|
|
172
|
+
from { opacity: 0; transform: translateY(-4px); }
|
|
173
|
+
to { opacity: 1; transform: translateY(0); }
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// ── Nav Rail (72px sidebar — Figma DSV3 1:1 com matcha/nav-rail) ────────────
|
|
177
|
+
|
|
178
|
+
.matcha-nav-rail {
|
|
179
|
+
// Wrapper externo: 72px wide, full height.
|
|
180
|
+
// Bg surface/bg (1 nível abaixo do panel) — cria depth tonal sutil sem
|
|
181
|
+
// precisar de border ou shadow. Pattern canônico de DS modernos (Slack,
|
|
182
|
+
// VS Code, Linear): rail "recuado" + panel "elevado". Hierarquia Z via tom.
|
|
183
|
+
display: flex;
|
|
184
|
+
flex-direction: column;
|
|
185
|
+
align-items: center;
|
|
186
|
+
width: 72px;
|
|
187
|
+
height: 100%;
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
box-sizing: border-box;
|
|
190
|
+
overflow: hidden;
|
|
191
|
+
padding: 0;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.matcha-nav-rail__header {
|
|
195
|
+
// Figma: 72×56, padding 4/0, flex row center.
|
|
196
|
+
display: flex;
|
|
197
|
+
flex-direction: row;
|
|
198
|
+
align-items: center;
|
|
199
|
+
justify-content: center;
|
|
200
|
+
width: 100%;
|
|
201
|
+
height: var(--matcha-grid-header-height, 56px);
|
|
202
|
+
padding: var(--matcha-space-050, 4px) 0;
|
|
203
|
+
flex-shrink: 0;
|
|
204
|
+
box-sizing: border-box;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.matcha-nav-rail__modules {
|
|
208
|
+
// Figma: padding 12/0, gap 4, flex column center.
|
|
209
|
+
display: flex;
|
|
210
|
+
flex-direction: column;
|
|
211
|
+
align-items: center;
|
|
212
|
+
gap: var(--matcha-space-050, 4px);
|
|
213
|
+
padding: var(--matcha-space-150, 12px) 0;
|
|
214
|
+
flex: 1;
|
|
215
|
+
width: 100%;
|
|
216
|
+
box-sizing: border-box;
|
|
217
|
+
overflow-y: auto;
|
|
218
|
+
overflow-x: hidden;
|
|
219
|
+
|
|
220
|
+
// Hide scrollbar but keep scroll
|
|
221
|
+
scrollbar-width: none;
|
|
222
|
+
&::-webkit-scrollbar { display: none; }
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// Module button — Figma: 44×44 (touch target), radius 12, sem padding.
|
|
226
|
+
// Suporta tanto o atributo de slot (consumer projeta com `matcha-nav-rail-module`)
|
|
227
|
+
// quanto a classe BEM (caso consumer use `.matcha-nav-rail__module` diretamente).
|
|
228
|
+
[matcha-nav-rail-module],
|
|
229
|
+
.matcha-nav-rail__module {
|
|
230
|
+
display: flex;
|
|
231
|
+
align-items: center;
|
|
232
|
+
justify-content: center;
|
|
233
|
+
width: 44px;
|
|
234
|
+
height: 44px;
|
|
235
|
+
padding: 0;
|
|
236
|
+
border: 0;
|
|
237
|
+
background: transparent;
|
|
238
|
+
border-radius: var(--matcha-radius-xl, 12px);
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
flex-shrink: 0;
|
|
241
|
+
position: relative;
|
|
242
|
+
// Reset pra <button>
|
|
243
|
+
appearance: none;
|
|
244
|
+
font: inherit;
|
|
245
|
+
color: inherit;
|
|
246
|
+
transition: background-color var(--matcha-duration-instant, 80ms) ease,
|
|
247
|
+
color var(--matcha-duration-instant, 80ms) ease;
|
|
248
|
+
|
|
249
|
+
// Focus-visible — keyboard nav.
|
|
250
|
+
&:focus-visible {
|
|
251
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
|
|
252
|
+
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.matcha-nav-rail__footer {
|
|
257
|
+
// Figma: padding 8/0, flex column center.
|
|
258
|
+
display: flex;
|
|
259
|
+
flex-direction: column;
|
|
260
|
+
align-items: center;
|
|
261
|
+
width: 100%;
|
|
262
|
+
padding: var(--matcha-space-100, 8px) 0;
|
|
263
|
+
flex-shrink: 0;
|
|
264
|
+
box-sizing: border-box;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.matcha-nav-rail__divider {
|
|
268
|
+
// Figma: 28×1, bg surface/border (rgba(255,255,255,0.12) dark).
|
|
269
|
+
// Sem opacity extra — token já tem 12% built-in.
|
|
270
|
+
flex-shrink: 0;
|
|
271
|
+
width: 28px;
|
|
272
|
+
height: 1px;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// ── Nav Panel (216px sub-panel — Figma DSV3 1:1 com matcha/nav-panel) ───────
|
|
276
|
+
// Estrutura: header (title-row) → divider 192×1 → items slot.
|
|
277
|
+
// Bg surface/card · só border-right (não border completa) · width 216 fixa.
|
|
278
|
+
|
|
279
|
+
.matcha-nav-panel {
|
|
280
|
+
display: flex;
|
|
281
|
+
flex-direction: column;
|
|
282
|
+
align-items: stretch;
|
|
283
|
+
width: 216px;
|
|
284
|
+
height: 100%;
|
|
285
|
+
box-sizing: border-box;
|
|
286
|
+
padding: 0;
|
|
287
|
+
overflow: hidden;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Header — Figma: padding 20/20/16/20, gap 16.
|
|
291
|
+
// Logical properties pra suporte RTL automático.
|
|
292
|
+
// Aceita slot custom via [matcha-nav-panel-header] OU default title-row.
|
|
293
|
+
.matcha-nav-panel__header {
|
|
294
|
+
display: flex;
|
|
295
|
+
flex-direction: column;
|
|
296
|
+
align-items: flex-start;
|
|
297
|
+
gap: var(--matcha-space-200, 16px);
|
|
298
|
+
padding-block-start: var(--matcha-space-250, 20px);
|
|
299
|
+
padding-block-end: var(--matcha-space-200, 16px);
|
|
300
|
+
padding-inline: var(--matcha-space-250, 20px);
|
|
301
|
+
width: 100%;
|
|
302
|
+
box-sizing: border-box;
|
|
303
|
+
flex-shrink: 0;
|
|
304
|
+
|
|
305
|
+
// Default title-row some quando consumer projeta slot custom
|
|
306
|
+
// (priority pro custom, sem precisar de boolean prop).
|
|
307
|
+
&:has([matcha-nav-panel-header]) .matcha-nav-panel__title-row--default {
|
|
308
|
+
display: none;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Title row — Figma: padding 0, gap 8, body-md regular 14/20.
|
|
313
|
+
.matcha-nav-panel__title-row {
|
|
314
|
+
display: flex;
|
|
315
|
+
flex-direction: row;
|
|
316
|
+
align-items: center;
|
|
317
|
+
gap: var(--matcha-space-100, 8px);
|
|
318
|
+
width: 100%;
|
|
319
|
+
height: 20px;
|
|
320
|
+
min-width: 0;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.matcha-nav-panel__title-icon {
|
|
324
|
+
flex-shrink: 0;
|
|
325
|
+
width: 16px;
|
|
326
|
+
height: 16px;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.matcha-nav-panel__title {
|
|
330
|
+
flex: 1;
|
|
331
|
+
font-family: var(--matcha-font-family);
|
|
332
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
333
|
+
font-weight: 400;
|
|
334
|
+
line-height: 20px;
|
|
335
|
+
overflow: hidden;
|
|
336
|
+
text-overflow: ellipsis;
|
|
337
|
+
white-space: nowrap;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Divider — Figma: 192×1 (= 216 - 12 - 12 padding sides), sibling do header.
|
|
341
|
+
// Centrado via margin auto.
|
|
342
|
+
.matcha-nav-panel__divider {
|
|
343
|
+
flex-shrink: 0;
|
|
344
|
+
width: 192px;
|
|
345
|
+
height: 1px;
|
|
346
|
+
margin: 0 auto;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// Items slot — Figma: padding 12 (todos lados), gap 4, scroll vertical.
|
|
350
|
+
.matcha-nav-panel__items {
|
|
351
|
+
display: flex;
|
|
352
|
+
flex-direction: column;
|
|
353
|
+
align-items: stretch;
|
|
354
|
+
gap: var(--matcha-space-050, 4px);
|
|
355
|
+
padding: var(--matcha-space-150, 12px);
|
|
356
|
+
flex: 1;
|
|
357
|
+
width: 100%;
|
|
358
|
+
box-sizing: border-box;
|
|
359
|
+
overflow-y: auto;
|
|
360
|
+
overflow-x: hidden;
|
|
361
|
+
|
|
362
|
+
// Hide scrollbar mas mantém scroll funcional.
|
|
363
|
+
scrollbar-width: thin;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// ── Command Palette ──────────────────────────────────────────────────────────
|
|
367
|
+
// Estilos do command-palette movidos pra matcha-command-palette.scss (canônico).
|
|
368
|
+
// Mantido aqui só o reduced-motion das outras nav classes.
|
|
369
|
+
|
|
370
|
+
@media (prefers-reduced-motion: reduce) {
|
|
371
|
+
.matcha-nav-item,
|
|
372
|
+
.matcha-nav-rail__module {
|
|
373
|
+
animation: none;
|
|
374
|
+
transition: none;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
// ── Forced colors (Windows High Contrast) ──────────────────────────────────
|
|
379
|
+
// Bgs translúcidos (accent-surface-hover, accent-alpha) somem em high-contrast.
|
|
380
|
+
// Usa system colors (Highlight, SelectedItem, CanvasText) sempre visíveis.
|
|
381
|
+
@media (forced-colors: active) {
|
|
382
|
+
// ── Nav Item ──
|
|
383
|
+
.matcha-nav-item {
|
|
384
|
+
forced-color-adjust: none;
|
|
385
|
+
|
|
386
|
+
&.matcha-nav-item--active > .matcha-nav-item__row {
|
|
387
|
+
background: Highlight;
|
|
388
|
+
color: HighlightText;
|
|
389
|
+
border-inline-start: 3px solid Highlight;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
&:not(.matcha-nav-item--disabled):not(.matcha-nav-item--active) > .matcha-nav-item__row:hover,
|
|
393
|
+
&.matcha-nav-item--expanded:not(.matcha-nav-item--active) > .matcha-nav-item__row {
|
|
394
|
+
background: SelectedItem;
|
|
395
|
+
color: SelectedItemText;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
&:focus-visible .matcha-nav-item__row {
|
|
399
|
+
outline-color: CanvasText;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// ── Nav Rail ──
|
|
404
|
+
.matcha-nav-rail {
|
|
405
|
+
border-inline-end-color: CanvasText;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
[matcha-nav-rail-module]:hover:not([aria-current]):not(.matcha-nav-rail__module--active),
|
|
409
|
+
.matcha-nav-rail__module:hover:not([aria-current]):not(.matcha-nav-rail__module--active) {
|
|
410
|
+
background: SelectedItem;
|
|
411
|
+
color: SelectedItemText;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
[matcha-nav-rail-module][aria-current],
|
|
415
|
+
[matcha-nav-rail-module].matcha-nav-rail__module--active,
|
|
416
|
+
.matcha-nav-rail__module--active {
|
|
417
|
+
background: Highlight;
|
|
418
|
+
color: HighlightText;
|
|
419
|
+
|
|
420
|
+
matcha-icon { color: HighlightText; }
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.matcha-nav-rail__divider {
|
|
424
|
+
background-color: CanvasText;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// ── Nav Panel ──
|
|
428
|
+
.matcha-nav-panel {
|
|
429
|
+
border-color: CanvasText;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.matcha-nav-panel__divider {
|
|
433
|
+
background-color: CanvasText;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
// ── Command Palette: high-contrast em matcha-command-palette.scss ──
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// ── Print ──────────────────────────────────────────────────────────────────
|
|
440
|
+
// Convenção DS: chrome de navegação some em impressão — conteúdo full-page.
|
|
441
|
+
@media print {
|
|
442
|
+
.matcha-nav-rail,
|
|
443
|
+
.matcha-nav-panel {
|
|
444
|
+
display: none !important;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// =============================================================================
|
|
449
|
+
// Theme mixin
|
|
450
|
+
// =============================================================================
|
|
451
|
+
|
|
452
|
+
@mixin matcha-nav-theme($theme) {
|
|
453
|
+
// ── Nav Item ── Figma DSV3 (node 14998:10045) — tokens accent diretos
|
|
454
|
+
// Bg/border/etc aplicados no .matcha-nav-item__row (não no host) — assim
|
|
455
|
+
// os filhos aninhados não herdam o bg do pai expandido/ativo.
|
|
456
|
+
.matcha-nav-item {
|
|
457
|
+
color: var(--matcha-color-text-primary);
|
|
458
|
+
|
|
459
|
+
.matcha-nav-item__label {
|
|
460
|
+
color: var(--matcha-color-text-primary);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.matcha-nav-item__icon,
|
|
464
|
+
.matcha-nav-item__chevron {
|
|
465
|
+
color: var(--matcha-color-text-secondary);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
// Hover — bg accent/surface-hover direto (Figma usa este token, não state-layer).
|
|
469
|
+
&:not(.matcha-nav-item--disabled):not(.matcha-nav-item--active) > .matcha-nav-item__row:hover {
|
|
470
|
+
background-color: var(--matcha-color-accent-surface-hover);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// Ativo — bg accent/alpha + border-inline-start 3px accent + label medium.
|
|
474
|
+
// 1:1 literal Figma. Aplicado no __row (não host) pra não vazar pros filhos.
|
|
475
|
+
&.matcha-nav-item--active > .matcha-nav-item__row {
|
|
476
|
+
background-color: var(--matcha-color-accent-alpha);
|
|
477
|
+
border-inline-start: 3px solid var(--matcha-color-accent);
|
|
478
|
+
|
|
479
|
+
.matcha-nav-item__label {
|
|
480
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.matcha-nav-item__badge {
|
|
484
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
485
|
+
color: var(--matcha-color-text-inverse, #1a1d21);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
// Expandido — pai com filhos abertos: bg accent/surface-pressed.
|
|
490
|
+
&.matcha-nav-item--expanded:not(.matcha-nav-item--active) > .matcha-nav-item__row {
|
|
491
|
+
background-color: var(--matcha-color-accent-surface-pressed);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// Badge — Figma DSV3 feedback/danger bg + danger-contrast fg (Padrão).
|
|
495
|
+
.matcha-nav-item__badge {
|
|
496
|
+
background: var(--matcha-color-feedback-danger);
|
|
497
|
+
color: var(--matcha-color-feedback-danger-contrast, rgba(0, 0, 0, 0.87));
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// Disabled — texto/ícone caem pra disabled-fg.
|
|
501
|
+
&.matcha-nav-item--disabled {
|
|
502
|
+
.matcha-nav-item__label,
|
|
503
|
+
.matcha-nav-item__icon,
|
|
504
|
+
.matcha-nav-item__chevron {
|
|
505
|
+
color: var(--matcha-color-interaction-disabled-fg);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// Indented — placeholder pra futuras diferenças de tema (border já no base).
|
|
511
|
+
|
|
512
|
+
// ── Nav Rail (depth sutil — light/dark adaptativo) ──
|
|
513
|
+
// Bg = surface-bg (page layer) + 4% foreground overlay via color-mix.
|
|
514
|
+
// Cria tonal step VISIBLE em ambos modes:
|
|
515
|
+
// - Light: surface-bg #f1f4f1 + 4% fg #2a2d33 → ~#e8ebe7 (recesso vs page brighter)
|
|
516
|
+
// - Dark: surface-bg #111318 + 4% fg #e8eaed → ~#1a1c20 (peak vs page darker)
|
|
517
|
+
// Antes usava surface-card 85% transparente, que em light ficava imperceptível
|
|
518
|
+
// (surface-card ≈ surface-bg no zona do branco — humano não distingue ~7 units).
|
|
519
|
+
.matcha-nav-rail {
|
|
520
|
+
background-color: color-mix(
|
|
521
|
+
in srgb,
|
|
522
|
+
var(--matcha-color-surface-bg) 96%,
|
|
523
|
+
var(--matcha-color-fg) 4%
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
[matcha-nav-rail-module],
|
|
528
|
+
.matcha-nav-rail__module {
|
|
529
|
+
// Inactive: text-secondary no button + override no matcha-icon filho
|
|
530
|
+
// (matcha-icon tem regra global no theme com mesma especificidade,
|
|
531
|
+
// então precisa target explícito pra vencer no cascade).
|
|
532
|
+
color: var(--matcha-color-text-secondary);
|
|
533
|
+
|
|
534
|
+
matcha-icon {
|
|
535
|
+
color: var(--matcha-color-text-secondary);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// Hover (inactive): bg accent/surface-hover (state-layer canon Figma).
|
|
539
|
+
&:hover:not(.matcha-nav-rail__module--active):not([aria-current]) {
|
|
540
|
+
background-color: var(--matcha-color-accent-surface-hover);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// Active: bg accent/surface-hover + icon accent.
|
|
544
|
+
// Figma usa #161E12 (accent/surface-hover token), não accent/alpha.
|
|
545
|
+
// Aceita .--active class OU aria-current (pattern ARIA canônico).
|
|
546
|
+
&.matcha-nav-rail__module--active,
|
|
547
|
+
&[aria-current] {
|
|
548
|
+
background-color: var(--matcha-color-accent-surface-hover);
|
|
549
|
+
color: var(--matcha-color-accent);
|
|
550
|
+
|
|
551
|
+
matcha-icon {
|
|
552
|
+
color: var(--matcha-color-accent);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.matcha-nav-rail__divider {
|
|
558
|
+
background-color: var(--matcha-color-surface-border);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// ── Nav Panel (Figma DSV3 1:1) ──
|
|
562
|
+
// bg surface/card (1 step acima do rail). Sem shadow — só tonal hierarchy.
|
|
563
|
+
.matcha-nav-panel {
|
|
564
|
+
background-color: var(--matcha-color-surface-card);
|
|
565
|
+
border-right: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.matcha-nav-panel__divider {
|
|
569
|
+
background-color: var(--matcha-color-surface-border);
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.matcha-nav-panel__title {
|
|
573
|
+
color: var(--matcha-color-text-primary);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.matcha-nav-panel__title-icon {
|
|
577
|
+
color: var(--matcha-color-text-secondary);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
// ── Command Palette theme em matcha-command-palette.scss (canônico) ──
|
|
581
|
+
}
|