@inchurch/matcha-theme 20.0.8 → 20.276.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.
Files changed (99) hide show
  1. package/abstracts/_colors.scss +404 -404
  2. package/abstracts/_elevation.scss +102 -102
  3. package/abstracts/_functions.scss +1212 -1212
  4. package/abstracts/_media-breakpoint.scss +23 -23
  5. package/abstracts/_typography.scss +127 -127
  6. package/base/_reset.scss +438 -438
  7. package/components/app-page-header.scss +260 -0
  8. package/components/matcha-accordion.scss +294 -157
  9. package/components/matcha-avatar.scss +171 -31
  10. package/components/matcha-badge.scss +4 -4
  11. package/components/matcha-breadcrumb.scss +232 -126
  12. package/components/matcha-button-toggle.scss +44 -0
  13. package/components/matcha-buttons.scss +908 -784
  14. package/components/matcha-calendar.scss +70 -2
  15. package/components/matcha-cards.scss +28 -2
  16. package/components/matcha-checkbox.scss +191 -490
  17. package/components/matcha-chip.scss +297 -212
  18. package/components/matcha-command-palette.scss +291 -63
  19. package/components/matcha-crop.scss +407 -172
  20. package/components/matcha-date.scss +81 -81
  21. package/components/matcha-divider.scss +86 -31
  22. package/components/matcha-drawer.scss +201 -50
  23. package/components/matcha-drop-image.scss +14 -0
  24. package/components/matcha-drop-list.scss +42 -1
  25. package/components/matcha-empty-state.scss +195 -83
  26. package/components/matcha-flag.scss +93 -52
  27. package/components/matcha-footer.scss +68 -164
  28. package/components/matcha-form-field.scss +52 -0
  29. package/components/matcha-form-section.scss +101 -101
  30. package/components/matcha-header.scss +135 -325
  31. package/components/matcha-highlight.scss +65 -197
  32. package/components/matcha-hint-text.scss +21 -0
  33. package/components/matcha-horizontal-tree.scss +317 -317
  34. package/components/matcha-icon.scss +17 -25
  35. package/components/matcha-list.scss +5 -5
  36. package/components/matcha-menu.scss +13 -0
  37. package/components/matcha-modal.scss +58 -84
  38. package/components/matcha-nav.scss +361 -230
  39. package/components/matcha-notification.scss +413 -197
  40. package/components/matcha-option.scss +79 -23
  41. package/components/matcha-paginator.scss +689 -235
  42. package/components/matcha-panel.scss +42 -26
  43. package/components/matcha-profile-card.scss +50 -50
  44. package/components/matcha-progress-bar.scss +257 -153
  45. package/components/matcha-radio.scss +244 -452
  46. package/components/matcha-scrollbox-shadow.scss +122 -122
  47. package/components/matcha-select.scss +3 -3
  48. package/components/matcha-skeleton.scss +18 -0
  49. package/components/matcha-slide-toggle.scss +47 -2
  50. package/components/matcha-slider.scss +172 -75
  51. package/components/matcha-snack-bar.scss +114 -121
  52. package/components/matcha-spinner.scss +76 -57
  53. package/components/matcha-status-pill.scss +82 -0
  54. package/components/matcha-stepper.scss +377 -177
  55. package/components/matcha-table.scss +569 -785
  56. package/components/matcha-tabs.scss +624 -469
  57. package/components/matcha-text-editor.scss +98 -144
  58. package/components/matcha-toolbar.scss +359 -206
  59. package/components/matcha-tooltip.scss +156 -62
  60. package/components/matcha-tree-view.scss +189 -0
  61. package/components/matcha-uploader.scss +240 -62
  62. package/fonts/manrope/manrope-latin-ext.woff2 +0 -0
  63. package/fonts/manrope/manrope-latin.woff2 +0 -0
  64. package/layout/matcha-page-layout.scss +776 -0
  65. package/main.scss +232 -261
  66. package/package.json +1 -1
  67. package/tokens/_animations-tokens.scss +37 -37
  68. package/tokens/_breakpoints-tokens.scss +35 -26
  69. package/tokens/_color-tokens.scss +1152 -1152
  70. package/tokens/_css-custom-properties.scss +650 -568
  71. package/tokens/_spacing-tokens.scss +94 -94
  72. package/vendors/angular-editor.scss +56 -56
  73. package/vendors/angular-material-fixes.scss +297 -297
  74. package/vendors/charts.scss +92 -92
  75. package/vendors/ng5-slider.scss +56 -56
  76. package/vendors/ngx-material-timepicker.scss +50 -50
  77. package/fonts/CircularStd-Black.eot +0 -0
  78. package/fonts/CircularStd-Black.svg +0 -3426
  79. package/fonts/CircularStd-Black.ttf +0 -0
  80. package/fonts/CircularStd-Black.woff +0 -0
  81. package/fonts/CircularStd-Black.woff2 +0 -0
  82. package/fonts/CircularStd-Bold.eot +0 -0
  83. package/fonts/CircularStd-Bold.otf +0 -0
  84. package/fonts/CircularStd-Bold.svg +0 -13532
  85. package/fonts/CircularStd-Bold.ttf +0 -0
  86. package/fonts/CircularStd-Bold.woff +0 -0
  87. package/fonts/CircularStd-Bold.woff2 +0 -0
  88. package/fonts/CircularStd-Medium.eot +0 -0
  89. package/fonts/CircularStd-Medium.otf +0 -0
  90. package/fonts/CircularStd-Medium.svg +0 -13511
  91. package/fonts/CircularStd-Medium.ttf +0 -0
  92. package/fonts/CircularStd-Medium.woff +0 -0
  93. package/fonts/CircularStd-Medium.woff2 +0 -0
  94. package/fonts/CircularStd-Regular.eot +0 -0
  95. package/fonts/CircularStd-Regular.otf +0 -0
  96. package/fonts/CircularStd-Regular.svg +0 -2378
  97. package/fonts/CircularStd-Regular.ttf +0 -0
  98. package/fonts/CircularStd-Regular.woff +0 -0
  99. package/fonts/CircularStd-Regular.woff2 +0 -0
@@ -6,42 +6,67 @@
6
6
 
7
7
  // ── Nav Item ─────────────────────────────────────────────────────────────────
8
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.
9
11
  .matcha-nav-item {
10
- position: relative; // enables ::before state layer positioning
12
+ position: relative;
11
13
  display: flex;
12
- align-items: center;
13
- gap: var(--matcha-space-100, 8px);
14
- padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
15
- border-radius: var(--matcha-radius-md, 4px);
16
- cursor: pointer;
17
- transition: background-color 150ms;
14
+ flex-direction: column;
15
+ align-items: stretch;
18
16
  width: 100%;
19
- box-sizing: border-box;
20
17
  text-decoration: none;
21
18
  color: inherit;
22
19
  user-select: none;
23
-
24
- // State layer
25
- &::before {
26
- content: '';
27
- position: absolute;
28
- inset: 0;
29
- background: currentColor;
30
- opacity: 0;
31
- border-radius: inherit;
32
- pointer-events: none;
33
- transition: opacity var(--matcha-duration-instant, 80ms) linear;
34
- }
35
-
36
- &:hover:not(.matcha-nav-item--disabled)::before { opacity: var(--matcha-state-hover, 0.08); }
37
- &:active:not(.matcha-nav-item--disabled)::before { opacity: var(--matcha-state-active, 0.12); }
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;
38
27
 
39
28
  &.matcha-nav-item--disabled {
40
29
  pointer-events: none;
41
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));
42
41
  }
43
42
  }
44
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
+
45
70
  .matcha-nav-item__icon {
46
71
  flex-shrink: 0;
47
72
  width: 20px;
@@ -58,57 +83,137 @@
58
83
  white-space: nowrap;
59
84
  }
60
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).
61
89
  .matcha-nav-item__badge {
62
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;
63
102
  }
64
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.
65
120
  .matcha-nav-item__chevron {
66
121
  flex-shrink: 0;
67
122
  width: 16px;
68
123
  height: 16px;
69
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
+ }
70
131
  }
71
132
 
72
- // Indented variant (accordion children, Notion-style border)
73
- .matcha-nav-item--indented {
74
- padding: var(--matcha-space-075, 6px) var(--matcha-space-100, 8px);
75
- padding-left: var(--matcha-space-300, 24px);
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);
76
137
  border-radius: var(--matcha-radius-sm, 2px);
77
- border-left: var(--matcha-border-thin, 2px) solid transparent;
78
138
 
79
139
  .matcha-nav-item__label {
80
140
  font-size: var(--matcha-text-body-sm, 12px);
81
141
  line-height: 16px;
82
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
+ }
83
150
  }
84
151
 
85
- // ── Nav Rail (72px sidebar) ──────────────────────────────────────────────────
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) ────────────
86
177
 
87
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.
88
183
  display: flex;
89
184
  flex-direction: column;
90
- width: 64px;
185
+ align-items: center;
186
+ width: 72px;
91
187
  height: 100%;
92
188
  flex-shrink: 0;
93
189
  box-sizing: border-box;
94
190
  overflow: hidden;
191
+ padding: 0;
95
192
  }
96
193
 
97
194
  .matcha-nav-rail__header {
195
+ // Figma: 72×56, padding 4/0, flex row center.
98
196
  display: flex;
197
+ flex-direction: row;
99
198
  align-items: center;
100
199
  justify-content: center;
200
+ width: 100%;
101
201
  height: var(--matcha-grid-header-height, 56px);
202
+ padding: var(--matcha-space-050, 4px) 0;
102
203
  flex-shrink: 0;
204
+ box-sizing: border-box;
103
205
  }
104
206
 
105
207
  .matcha-nav-rail__modules {
208
+ // Figma: padding 12/0, gap 4, flex column center.
106
209
  display: flex;
107
210
  flex-direction: column;
108
211
  align-items: center;
109
- gap: var(--matcha-space-025, 2px);
110
- padding: var(--matcha-space-050, 4px) 0;
212
+ gap: var(--matcha-space-050, 4px);
213
+ padding: var(--matcha-space-150, 12px) 0;
111
214
  flex: 1;
215
+ width: 100%;
216
+ box-sizing: border-box;
112
217
  overflow-y: auto;
113
218
  overflow-x: hidden;
114
219
 
@@ -117,176 +222,226 @@
117
222
  &::-webkit-scrollbar { display: none; }
118
223
  }
119
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],
120
229
  .matcha-nav-rail__module {
121
230
  display: flex;
122
231
  align-items: center;
123
232
  justify-content: center;
124
233
  width: 44px;
125
234
  height: 44px;
126
- border-radius: var(--matcha-radius-lg, 8px);
235
+ padding: 0;
236
+ border: 0;
237
+ background: transparent;
238
+ border-radius: var(--matcha-radius-xl, 12px);
127
239
  cursor: pointer;
128
240
  flex-shrink: 0;
129
241
  position: relative;
130
- transition: background-color 150ms;
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;
131
248
 
132
- &:hover { opacity: 0.85; }
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
+ }
133
254
  }
134
255
 
135
256
  .matcha-nav-rail__footer {
257
+ // Figma: padding 8/0, flex column center.
136
258
  display: flex;
137
259
  flex-direction: column;
138
260
  align-items: center;
139
- gap: var(--matcha-space-025, 2px);
140
- padding: var(--matcha-space-100, 8px) 0 var(--matcha-space-150, 12px);
261
+ width: 100%;
262
+ padding: var(--matcha-space-100, 8px) 0;
141
263
  flex-shrink: 0;
264
+ box-sizing: border-box;
142
265
  }
143
266
 
144
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;
145
271
  width: 28px;
146
272
  height: 1px;
147
- opacity: 0.15;
148
- margin: var(--matcha-space-050, 4px) 0;
149
273
  }
150
274
 
151
- // ── Nav Panel (216px sub-panel) ──────────────────────────────────────────────
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.
152
278
 
153
279
  .matcha-nav-panel {
154
280
  display: flex;
155
281
  flex-direction: column;
156
- width: 256px;
282
+ align-items: stretch;
283
+ width: 216px;
157
284
  height: 100%;
158
285
  box-sizing: border-box;
286
+ padding: 0;
159
287
  overflow: hidden;
160
288
  }
161
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.
162
293
  .matcha-nav-panel__header {
163
294
  display: flex;
164
295
  flex-direction: column;
296
+ align-items: flex-start;
165
297
  gap: var(--matcha-space-200, 16px);
166
- padding: var(--matcha-space-250, 20px) var(--matcha-space-250, 20px) 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;
167
303
  flex-shrink: 0;
168
- }
169
304
 
170
- .matcha-nav-panel__brand {
171
- height: 16px;
172
- }
173
-
174
- .matcha-nav-panel__divider {
175
- width: 28px;
176
- height: 1px;
177
- opacity: 0.4;
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
+ }
178
310
  }
179
311
 
180
- .matcha-nav-panel__module {
312
+ // Title row — Figma: padding 0, gap 8, body-md regular 14/20.
313
+ .matcha-nav-panel__title-row {
181
314
  display: flex;
315
+ flex-direction: row;
182
316
  align-items: center;
183
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);
184
332
  font-size: var(--matcha-text-body-md, 14px);
185
333
  font-weight: 400;
186
334
  line-height: 20px;
335
+ overflow: hidden;
336
+ text-overflow: ellipsis;
337
+ white-space: nowrap;
187
338
  }
188
339
 
189
- .matcha-nav-panel__module-icon {
190
- width: 16px;
191
- height: 16px;
340
+ // Divider — Figma: 192×1 (= 216 - 12 - 12 padding sides), sibling do header.
341
+ // Centrado via margin auto.
342
+ .matcha-nav-panel__divider {
192
343
  flex-shrink: 0;
344
+ width: 192px;
345
+ height: 1px;
346
+ margin: 0 auto;
193
347
  }
194
348
 
349
+ // Items slot — Figma: padding 12 (todos lados), gap 4, scroll vertical.
195
350
  .matcha-nav-panel__items {
196
351
  display: flex;
197
352
  flex-direction: column;
353
+ align-items: stretch;
198
354
  gap: var(--matcha-space-050, 4px);
199
355
  padding: var(--matcha-space-150, 12px);
200
356
  flex: 1;
357
+ width: 100%;
358
+ box-sizing: border-box;
201
359
  overflow-y: auto;
202
360
  overflow-x: hidden;
361
+
362
+ // Hide scrollbar mas mantém scroll funcional.
363
+ scrollbar-width: thin;
203
364
  }
204
365
 
205
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.
206
369
 
207
- .matcha-command-palette-overlay {
208
- position: fixed;
209
- inset: 0;
210
- z-index: 9998;
211
- display: flex;
212
- align-items: flex-start;
213
- justify-content: center;
214
- padding-top: 20vh;
215
- animation: matcha-cmd-overlay-in 150ms ease-out;
370
+ @media (prefers-reduced-motion: reduce) {
371
+ .matcha-nav-item,
372
+ .matcha-nav-rail__module {
373
+ animation: none;
374
+ transition: none;
375
+ }
216
376
  }
217
377
 
218
- .matcha-command-palette {
219
- display: flex;
220
- flex-direction: column;
221
- width: 520px;
222
- max-width: calc(100vw - 32px);
223
- max-height: 60vh;
224
- border-radius: var(--matcha-radius-2xl, 24px);
225
- overflow: hidden;
226
- z-index: 9999;
227
- animation: matcha-cmd-in 150ms ease-out;
228
- }
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;
229
385
 
230
- .matcha-command-palette__search {
231
- display: flex;
232
- align-items: center;
233
- gap: var(--matcha-space-150, 12px);
234
- padding: var(--matcha-space-200, 16px) var(--matcha-space-250, 20px);
235
- flex-shrink: 0;
236
- }
386
+ &.matcha-nav-item--active > .matcha-nav-item__row {
387
+ background: Highlight;
388
+ color: HighlightText;
389
+ border-inline-start: 3px solid Highlight;
390
+ }
237
391
 
238
- .matcha-command-palette__input {
239
- flex: 1;
240
- border: none;
241
- background: transparent;
242
- font-size: var(--matcha-text-title-sm, 16px);
243
- outline: none;
244
- }
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
+ }
245
397
 
246
- .matcha-command-palette__results {
247
- display: flex;
248
- flex-direction: column;
249
- gap: var(--matcha-space-025, 2px);
250
- padding: var(--matcha-space-100, 8px);
251
- flex: 1;
252
- overflow-y: auto;
253
- }
398
+ &:focus-visible .matcha-nav-item__row {
399
+ outline-color: CanvasText;
400
+ }
401
+ }
254
402
 
255
- .matcha-command-palette__result {
256
- display: flex;
257
- align-items: center;
258
- gap: var(--matcha-space-150, 12px);
259
- padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
260
- border-radius: var(--matcha-radius-sm, 2px);
261
- cursor: pointer;
262
- transition: background-color 100ms;
263
- }
403
+ // ── Nav Rail ──
404
+ .matcha-nav-rail {
405
+ border-inline-end-color: CanvasText;
406
+ }
264
407
 
265
- .matcha-command-palette__footer {
266
- display: flex;
267
- align-items: center;
268
- padding: var(--matcha-space-100, 8px) var(--matcha-space-250, 20px);
269
- font-size: var(--matcha-text-caption, 11px);
270
- flex-shrink: 0;
271
- }
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
+ }
272
413
 
273
- @keyframes matcha-cmd-in {
274
- from { opacity: 0; transform: scale(0.95) translateY(-8px); }
275
- to { opacity: 1; transform: scale(1) translateY(0); }
276
- }
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
+ }
277
422
 
278
- @keyframes matcha-cmd-overlay-in {
279
- from { opacity: 0; }
280
- to { opacity: 1; }
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 ──
281
437
  }
282
438
 
283
- @media (prefers-reduced-motion: reduce) {
284
- .matcha-command-palette,
285
- .matcha-command-palette-overlay,
286
- .matcha-nav-item,
287
- .matcha-nav-rail__module {
288
- animation: none;
289
- transition: none;
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;
290
445
  }
291
446
  }
292
447
 
@@ -295,156 +450,132 @@
295
450
  // =============================================================================
296
451
 
297
452
  @mixin matcha-nav-theme($theme) {
298
- // ── Nav Item ──
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.
299
456
  .matcha-nav-item {
300
- color: var(--matcha-color-fg, #{getForeground($theme)});
457
+ color: var(--matcha-color-text-primary, #{getForeground($theme)});
301
458
 
302
459
  .matcha-nav-item__label {
303
- color: var(--matcha-color-fg, #{getForeground($theme)});
304
- }
305
-
306
- .matcha-nav-item__icon {
307
- color: var(--matcha-color-hint, #{getGrey($theme)});
460
+ color: var(--matcha-color-text-primary, #{getForeground($theme)});
308
461
  }
309
462
 
463
+ .matcha-nav-item__icon,
310
464
  .matcha-nav-item__chevron {
311
- color: var(--matcha-color-hint, #{getGrey($theme)});
465
+ color: var(--matcha-color-text-secondary, #{getGrey($theme)});
312
466
  }
313
467
 
314
- &:hover {
315
- background-color: rgba(var(--matcha-state-layer, 255,255,255), 0.08);
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);
316
471
  }
317
472
 
318
- // Active state (current selected item)
319
- &.matcha-nav-item--active {
320
- background-color: var(--matcha-color-accent-surface-hover, #{getAccentAlpha($theme)});
321
- border-left: 3px solid var(--matcha-color-accent, #{getAccent($theme)});
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);
322
478
 
323
479
  .matcha-nav-item__label {
324
- color: var(--matcha-color-accent, #{getAccent($theme)});
325
- font-weight: 500;
480
+ font-weight: var(--matcha-weight-medium, 500);
326
481
  }
327
482
 
328
- .matcha-nav-item__icon {
329
- color: var(--matcha-color-accent, #{getAccent($theme)});
483
+ .matcha-nav-item__badge {
484
+ font-weight: var(--matcha-weight-medium, 500);
485
+ color: var(--matcha-color-text-inverse, #1a1d21);
330
486
  }
331
487
  }
332
488
 
333
- // Expanded (parent with open children subtle bg highlight)
334
- &.matcha-nav-item--expanded {
335
- background-color: rgba(var(--matcha-state-layer, 255,255,255), 0.04);
336
-
337
- .matcha-nav-item__label {
338
- color: var(--matcha-color-accent, #{getAccent($theme)});
339
- font-weight: 400;
340
- }
341
-
342
- .matcha-nav-item__icon {
343
- color: var(--matcha-color-accent, #{getAccent($theme)});
344
- }
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
+ }
345
493
 
346
- .matcha-nav-item__chevron {
347
- color: var(--matcha-color-accent, #{getAccent($theme)});
348
- opacity: 0.7;
349
- }
494
+ // Badge — Figma DSV3 feedback/danger bg + danger-contrast fg (Padrão).
495
+ .matcha-nav-item__badge {
496
+ background: var(--matcha-color-feedback-danger, #{getDanger($theme)});
497
+ color: var(--matcha-color-feedback-danger-contrast, rgba(0, 0, 0, 0.87));
350
498
  }
351
499
 
352
- // Disabled
500
+ // Disabled — texto/ícone caem pra disabled-fg.
353
501
  &.matcha-nav-item--disabled {
354
502
  .matcha-nav-item__label,
355
- .matcha-nav-item__icon {
356
- color: var(--matcha-color-disabled-fg, #{getDisabledContrast($theme)});
503
+ .matcha-nav-item__icon,
504
+ .matcha-nav-item__chevron {
505
+ color: var(--matcha-color-interaction-disabled-fg);
357
506
  }
358
507
  }
359
508
  }
360
509
 
361
- // Indented (Notion-style border)
362
- .matcha-nav-item--indented {
363
- border-left-color: var(--matcha-color-accent, #{getAccent($theme)});
364
-
365
- &.matcha-nav-item--active {
366
- background-color: var(--matcha-color-accent-surface-hover, #{getAccentAlpha($theme)});
367
- border-left: 3px solid var(--matcha-color-accent, #{getAccent($theme)});
368
-
369
- .matcha-nav-item__label {
370
- color: var(--matcha-color-accent, #{getAccent($theme)});
371
- font-weight: 500;
372
- }
373
- }
374
- }
510
+ // Indented — placeholder pra futuras diferenças de tema (border já no base).
375
511
 
376
- // ── Nav Rail ──
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).
377
519
  .matcha-nav-rail {
378
- background-color: var(--matcha-color-surface, #{getSurface($theme)});
379
- border-right: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border, #{getGrey($theme)});
520
+ background-color: color-mix(
521
+ in srgb,
522
+ var(--matcha-color-surface-bg, #{getBackground($theme)}) 96%,
523
+ var(--matcha-color-fg, #{getForeground($theme)}) 4%
524
+ );
380
525
  }
381
526
 
527
+ [matcha-nav-rail-module],
382
528
  .matcha-nav-rail__module {
383
- color: var(--matcha-color-hint, #{getGrey($theme)});
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, #{getGrey($theme)});
533
+
534
+ matcha-icon {
535
+ color: var(--matcha-color-text-secondary, #{getGrey($theme)});
536
+ }
384
537
 
385
- &.matcha-nav-rail__module--active {
386
- background-color: var(--matcha-color-accent-surface, #{getAccentAlpha($theme)});
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);
387
549
  color: var(--matcha-color-accent, #{getAccent($theme)});
550
+
551
+ matcha-icon {
552
+ color: var(--matcha-color-accent, #{getAccent($theme)});
553
+ }
388
554
  }
389
555
  }
390
556
 
391
557
  .matcha-nav-rail__divider {
392
- background-color: var(--matcha-color-border, #{getGrey($theme)});
558
+ background-color: var(--matcha-color-surface-border, #{getGrey($theme)});
393
559
  }
394
560
 
395
- // ── Nav Panel ──
561
+ // ── Nav Panel (Figma DSV3 1:1) ──
562
+ // bg surface/card (1 step acima do rail). Sem shadow — só tonal hierarchy.
396
563
  .matcha-nav-panel {
397
- background-color: var(--matcha-color-surface, #{getSurface($theme)});
398
- border: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border, #{getForegroundAlpha($theme)});
564
+ background-color: var(--matcha-color-surface-card, #{getSurface($theme)});
565
+ border-right: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border, #{getGrey($theme)});
399
566
  }
400
567
 
401
568
  .matcha-nav-panel__divider {
402
- background-color: var(--matcha-color-border, #{getForegroundAlpha($theme)});
569
+ background-color: var(--matcha-color-surface-border, #{getGrey($theme)});
403
570
  }
404
571
 
405
- .matcha-nav-panel__module {
406
- color: var(--matcha-color-fg, #{getForeground($theme)});
572
+ .matcha-nav-panel__title {
573
+ color: var(--matcha-color-text-primary, #{getForeground($theme)});
407
574
  }
408
575
 
409
- .matcha-nav-panel__module-icon {
410
- color: var(--matcha-color-hint, #{getGrey($theme)});
576
+ .matcha-nav-panel__title-icon {
577
+ color: var(--matcha-color-text-secondary, #{getGrey($theme)});
411
578
  }
412
579
 
413
- // ── Command Palette ──
414
- .matcha-command-palette-overlay {
415
- background: var(--matcha-scrim-modal, rgba(0, 0, 0, 0.5));
416
- }
417
-
418
- .matcha-command-palette {
419
- $is-dark: map.get($theme, is-dark);
420
- background-color: var(--matcha-color-surface, #{getSurface($theme)});
421
- box-shadow: var(--matcha-shadow-4, #{if($is-dark, $shadow-4-dark, $shadow-4-light)});
422
-
423
- @if $is-dark {
424
- border: var(--matcha-border-hairline, 1px) solid rgba(255, 255, 255, 0.06);
425
- }
426
- }
427
-
428
- .matcha-command-palette__input {
429
- color: var(--matcha-color-fg, #{getForeground($theme)});
430
-
431
- &::placeholder {
432
- color: var(--matcha-color-hint, #{getGrey($theme)});
433
- }
434
- }
435
-
436
- .matcha-command-palette__result {
437
- color: var(--matcha-color-fg-secondary, #{getGrey($theme)});
438
-
439
- &:hover,
440
- &.matcha-command-palette__result--selected {
441
- background-color: var(--matcha-color-surface-hover, #{getBackgroundAlpha($theme)});
442
- color: var(--matcha-color-fg, #{getForeground($theme)});
443
- }
444
- }
445
-
446
- .matcha-command-palette__footer {
447
- background-color: var(--matcha-color-surface-bg, #{getBackground($theme)});
448
- color: var(--matcha-color-hint, #{getGrey($theme)});
449
- }
580
+ // ── Command Palette theme em matcha-command-palette.scss (canônico) ──
450
581
  }