@inchurch/matcha-theme 22.38.1 → 22.38.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/abstracts/_colors.scss +291 -291
  2. package/abstracts/_elevation.scss +108 -108
  3. package/abstracts/_functions.scss +321 -321
  4. package/abstracts/_media-breakpoint.scss +26 -26
  5. package/abstracts/_theme-api.scss +224 -224
  6. package/abstracts/_typography.scss +128 -128
  7. package/base/_reset.scss +487 -487
  8. package/components/app-page-header.scss +260 -260
  9. package/components/matcha-accordion.scss +297 -297
  10. package/components/matcha-audio-player.scss +31 -31
  11. package/components/matcha-autocomplete.scss +145 -145
  12. package/components/matcha-avatar.scss +426 -426
  13. package/components/matcha-badge.scss +120 -120
  14. package/components/matcha-breadcrumb.scss +231 -231
  15. package/components/matcha-button-toggle.scss +484 -484
  16. package/components/matcha-buttons.scss +973 -973
  17. package/components/matcha-calendar.scss +253 -253
  18. package/components/matcha-cards.scss +212 -212
  19. package/components/matcha-chart-card.scss +53 -53
  20. package/components/matcha-checkbox.scss +266 -266
  21. package/components/matcha-chip.scss +311 -311
  22. package/components/matcha-color-pick.scss +34 -34
  23. package/components/matcha-command-palette.scss +316 -316
  24. package/components/matcha-crop.scss +419 -406
  25. package/components/matcha-date.scss +81 -81
  26. package/components/matcha-divider.scss +100 -100
  27. package/components/matcha-draggable.scss +23 -23
  28. package/components/matcha-drawer.scss +376 -376
  29. package/components/matcha-drop-image.scss +14 -14
  30. package/components/matcha-drop-list.scss +430 -430
  31. package/components/matcha-emoji.scss +69 -69
  32. package/components/matcha-empty-state.scss +230 -230
  33. package/components/matcha-file-uploader.scss +650 -637
  34. package/components/matcha-flag.scss +103 -103
  35. package/components/matcha-footer.scss +91 -91
  36. package/components/matcha-form-field.scss +883 -883
  37. package/components/matcha-form-section.scss +100 -100
  38. package/components/matcha-header.scss +135 -135
  39. package/components/matcha-highlight.scss +164 -164
  40. package/components/matcha-hint-text.scss +90 -90
  41. package/components/matcha-horizontal-tree.scss +247 -247
  42. package/components/matcha-icon.scss +111 -111
  43. package/components/matcha-image.scss +60 -60
  44. package/components/matcha-list.scss +211 -211
  45. package/components/matcha-menu.scss +99 -99
  46. package/components/matcha-modal.scss +210 -210
  47. package/components/matcha-nav.scss +770 -770
  48. package/components/matcha-notification.scss +417 -417
  49. package/components/matcha-option.scss +170 -170
  50. package/components/matcha-page-builder.scss +4196 -4196
  51. package/components/matcha-paginator.scss +699 -699
  52. package/components/matcha-panel.scss +216 -216
  53. package/components/matcha-period.scss +174 -174
  54. package/components/matcha-profile-card.scss +50 -50
  55. package/components/matcha-progress-bar.scss +355 -355
  56. package/components/matcha-radio.scss +325 -325
  57. package/components/matcha-ripple.scss +7 -7
  58. package/components/matcha-scrollbar.scss +33 -33
  59. package/components/matcha-scrollbox-shadow.scss +120 -120
  60. package/components/matcha-section.scss +102 -102
  61. package/components/matcha-select-multiple.scss +56 -56
  62. package/components/matcha-select.scss +629 -629
  63. package/components/matcha-skeleton.scss +182 -182
  64. package/components/matcha-slide-toggle.scss +369 -369
  65. package/components/matcha-slider.scss +285 -285
  66. package/components/matcha-snack-bar.scss +259 -259
  67. package/components/matcha-spin.scss +164 -164
  68. package/components/matcha-spinner.scss +97 -97
  69. package/components/matcha-stepper.scss +376 -376
  70. package/components/matcha-table-cell.scss +107 -107
  71. package/components/matcha-table.scss +722 -722
  72. package/components/matcha-tabs.scss +642 -642
  73. package/components/matcha-text-editor.scss +111 -111
  74. package/components/matcha-time.scss +33 -33
  75. package/components/matcha-timepicker.scss +13 -13
  76. package/components/matcha-toolbar.scss +366 -366
  77. package/components/matcha-tooltip.scss +235 -235
  78. package/components/matcha-tree-view.scss +636 -636
  79. package/layout/matcha-page-layout.scss +778 -778
  80. package/main.scss +334 -334
  81. package/package.json +1 -1
  82. package/tokens/_animations-tokens.scss +37 -37
  83. package/tokens/_breakpoints-tokens.scss +35 -35
  84. package/tokens/_color-tokens.scss +288 -288
  85. package/tokens/_elevation-tokens.scss +33 -33
  86. package/tokens/_emit-tokens.scss +329 -329
  87. package/tokens/_material-palette.scss +1149 -1149
  88. package/tokens/_primitives.scss +98 -98
  89. package/tokens/_semantic-aliases.scss +120 -120
  90. package/tokens/_spacing-tokens.scss +94 -94
  91. package/tokens/_static-tokens.scss +137 -137
  92. package/tokens/_typography-tokens.scss +65 -65
  93. package/vendors/charts.scss +90 -90
@@ -1,355 +1,355 @@
1
- // =============================================================================
2
- // matcha-progress-bar.scss — Progress bar (1:1 com Figma DSV3)
3
- // =============================================================================
4
- // 4 types canônicos × 4 sizes:
5
- // • standard — bar contínua (default 4 / xs 8 / sm 16 / md 32)
6
- // • multi-level — N segmentos coloridos lado a lado (sm 16 / md 32)
7
- // • informative — card 60px com %, descrição, ETA + bar 4px embaixo
8
- // • segmented — N steps discretos com gap (sm 16 / md 32)
9
- //
10
- // Cores: 6 semânticas DSV3 (Material 1 legacy removida)
11
- // Track (rail): #282C34 dark = matcha/color/disabled-bg
12
- // =============================================================================
13
-
14
- @mixin matcha-progress-bar-theme($theme) {
15
- $semantic-colors: (
16
- accent: getAccent,
17
- primary: getPrimary,
18
- success: getSuccess,
19
- warn: getWarn,
20
- danger: getDanger,
21
- info: getInfo,
22
- );
23
-
24
- matcha-progress-bar {
25
- // Default fill = accent
26
- --matcha-progress-fill: var(--matcha-color-accent);
27
-
28
- // Foreground do label inline, em duas alturas:
29
- // • on-fill → sobre a barra preenchida. Cada semântica já tem o seu par
30
- // `<nome>-contrast` ("o foreground correto sobre esta cor"),
31
- // então não há contraste calculado à mão em lugar nenhum.
32
- // • on-track → sobre o rail não preenchido (disabled-bg).
33
- // O default accent-contrast resolve pra rgba(0,0,0,.87) nos dois modos — o
34
- // mesmo valor que estava cravado antes, então o caso default não muda de cor.
35
- --matcha-progress-label-on-fill: var(--matcha-color-accent-contrast);
36
- --matcha-progress-label-on-track: var(--matcha-color-fg);
37
-
38
- // Bind por color attr → CSS var (mesma estratégia do slider/spinner)
39
- @each $name, $fn in $semantic-colors {
40
- &[color="#{$name}"] {
41
- --matcha-progress-fill: var(--matcha-color-#{$name});
42
- --matcha-progress-label-on-fill: var(--matcha-color-#{$name}-contrast);
43
- }
44
- }
45
- }
46
-
47
- // Multi-level: cada segment tem sua própria cor via [data-segment-color]
48
- matcha-progress-bar[type="multi-level"] {
49
- @each $name, $fn in $semantic-colors {
50
- .progress-segment-color[data-segment-color="#{$name}"] {
51
- background-color: var(--matcha-color-#{$name});
52
- }
53
- }
54
- }
55
- }
56
-
57
- // =============================================================================
58
- // Structural — independente de cor
59
- // =============================================================================
60
-
61
- matcha-progress-bar {
62
- display: block;
63
- width: 100%;
64
-
65
- // ── Track base (compartilhado por standard e multi-level) ──────────────
66
- .progress {
67
- position: relative;
68
- display: block;
69
- width: 100%;
70
- height: var(--matcha-space-050, 4px); // default size
71
- background-color: var(--matcha-color-disabled-bg, #282C34);
72
- border-radius: var(--matcha-radius-sm, 2px);
73
- overflow: hidden;
74
- }
75
-
76
- // Fill determinate (standard + informative).
77
- // position/z-index colocam o fill ENTRE os dois labels (bg z-1 · fill z-2 · fg z-3),
78
- // que é o que faz o fill opaco mascarar o label de trás no trecho preenchido.
79
- .progress-fill {
80
- position: relative;
81
- z-index: 2;
82
- height: 100%;
83
- background-color: var(--matcha-progress-fill);
84
- border-radius: var(--matcha-radius-sm, 2px);
85
- transition: width var(--matcha-duration-fast, 200ms) ease;
86
- }
87
-
88
- // ── Inline label (standard sm/md) ──────────────────────────────────────
89
- // Base comum aos dois labels. Ambos cobrem o track inteiro (inset: 0), então
90
- // ficam alinhados pixel a pixel e a única diferença entre eles é cor + clip.
91
- // Se a tipografia divergir entre os dois, o recorte desalinha e aparece degrau
92
- // na borda do fill — por isso size/weight moram num seletor só (blocos de size
93
- // abaixo miram .progress-text, nunca um dos dois isolado).
94
- .progress-text {
95
- position: absolute;
96
- inset: 0;
97
- display: flex;
98
- align-items: center;
99
- padding-left: var(--matcha-space-100, 8px);
100
- font-family: var(--matcha-font-family);
101
- white-space: nowrap;
102
- pointer-events: none;
103
- }
104
-
105
- // Trecho NÃO preenchido: atrás do fill, cor que contrasta com o track.
106
- .progress-text-bg {
107
- z-index: 1;
108
- color: var(--matcha-progress-label-on-track);
109
- }
110
-
111
- // Trecho preenchido: na frente do fill, cor que contrasta com o fill.
112
- // clip-path recorta na largura exata do progresso; a transition acompanha
113
- // a mesma duração da width do fill pra recorte e barra andarem juntos.
114
- .progress-text-fg {
115
- z-index: 3;
116
- color: var(--matcha-progress-label-on-fill);
117
- transition: clip-path var(--matcha-duration-fast, 200ms) ease;
118
- }
119
-
120
- // Indeterminate animation (standard, sem progress) — Material-style dual-scan.
121
- // O .progress-indeterminate é wrapper transparente com overflow hidden.
122
- // ::before e ::after são as 2 barras animadas que cruzam o track.
123
- // Animar left/right (em vez de transform) é o approach que funciona em
124
- // todos browsers e dá o ratio de "scan" característico do Material.
125
- .progress-indeterminate {
126
- position: absolute;
127
- inset: 0;
128
- overflow: hidden;
129
- background-color: transparent;
130
-
131
- &::before,
132
- &::after {
133
- content: '';
134
- position: absolute;
135
- top: 0;
136
- bottom: 0;
137
- background-color: var(--matcha-progress-fill);
138
- will-change: left, right;
139
- }
140
-
141
- &::before {
142
- animation: matcha-progress-indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
143
- }
144
- &::after {
145
- animation: matcha-progress-indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
146
- animation-delay: 1.15s;
147
- }
148
- }
149
- }
150
-
151
- // ── Sizes ──────────────────────────────────────────────────────────────────
152
- // Escala monotônica: tiny 4 → small 16 → medium 32. `tiny` valia 8px, o DOBRO do
153
- // default de 4px, então a ordem da escala não fechava e quem pedia o menor size
154
- // recebia uma barra mais grossa do que não passar size nenhum. Agora tiny é o piso
155
- // e `default` é sinônimo dele (mantido como alias @deprecated no componente).
156
- matcha-progress-bar {
157
- // Default: 4px (já é o default do .progress) — mesmo valor de `tiny`.
158
-
159
- &[size="xs"], &[size="tiny"] {
160
- .progress { height: var(--matcha-space-050, 4px); }
161
- }
162
- &[size="sm"], &[size="small"] {
163
- .progress { height: var(--matcha-space-200, 16px); border-radius: var(--matcha-radius-md, 4px); }
164
- .progress-fill { border-radius: var(--matcha-radius-md, 4px); }
165
- .progress-text {
166
- font-size: var(--matcha-text-p-tiny, 11px);
167
- font-weight: var(--matcha-weight-regular, 400);
168
- line-height: var(--matcha-leading-p-tiny, 14px);
169
- letter-spacing: 0.3px;
170
- }
171
- }
172
- &[size="md"], &[size="medium"] {
173
- .progress { height: var(--matcha-space-400, 32px); border-radius: var(--matcha-radius-md, 4px); }
174
- .progress-fill { border-radius: var(--matcha-radius-md, 4px); }
175
- .progress-text {
176
- font-size: var(--matcha-text-label-md, 14px);
177
- font-weight: var(--matcha-weight-medium, 500);
178
- line-height: var(--matcha-leading-label-md, 20px);
179
- }
180
- }
181
- }
182
-
183
- // =============================================================================
184
- // Multi-level (3+ segmentos coloridos lado a lado)
185
- // =============================================================================
186
- matcha-progress-bar[type="multi-level"] {
187
- .progress--multi {
188
- display: flex;
189
- flex-direction: row;
190
- align-items: stretch;
191
- // Track de fundo já vem do .progress (disabled-bg). Os segments coloridos
192
- // sobrepõem por width%, deixando o resto exposto como track.
193
- }
194
-
195
- .progress-segment-color {
196
- // Cor vem do data-segment-color → tema. Width vem do [style.width.%].
197
- height: 100%;
198
- // Sem border-radius interno — só as pontas do conjunto seguem o radius do track.
199
- }
200
-
201
- // Sizes específicos do multi-level
202
- &[size="sm"], &[size="small"] {
203
- .progress { height: var(--matcha-space-200, 16px); border-radius: var(--matcha-radius-sm, 2px); }
204
- }
205
- &[size="md"], &[size="medium"] {
206
- .progress { height: var(--matcha-space-400, 32px); border-radius: var(--matcha-radius-md, 4px); }
207
- }
208
- }
209
-
210
- // =============================================================================
211
- // Informative (card 60px com %, descrição, ETA + bar 4px)
212
- // Layout: padding 16, gap 8, bg surface-card, shadow 1, radius lg
213
- // =============================================================================
214
- matcha-progress-bar[type="informative"] {
215
- .progress-info {
216
- display: flex;
217
- flex-direction: column;
218
- align-items: stretch;
219
- gap: var(--matcha-space-100, 8px);
220
- padding: var(--matcha-space-200, 16px);
221
- background: var(--matcha-color-surface-card, #1c1f26);
222
- box-shadow: var(--matcha-shadow-1, 0px 2px 8px rgba(0, 0, 0, 0.08));
223
- border-radius: var(--matcha-radius-lg, 8px);
224
- }
225
-
226
- .progress-info__row {
227
- display: flex;
228
- flex-direction: row;
229
- align-items: center;
230
- gap: var(--matcha-space-100, 8px);
231
- }
232
-
233
- // Percentage — label-sm 12/500/16 · text-primary
234
- .progress-info__percentage {
235
- font-family: var(--matcha-font-family);
236
- font-size: var(--matcha-text-label-sm, 12px);
237
- font-weight: var(--matcha-weight-medium, 500);
238
- line-height: var(--matcha-leading-label-sm, 16px);
239
- color: var(--matcha-color-text-primary, #e8eaed);
240
- flex: none;
241
- }
242
-
243
- // Description — body-sm 12/400/16 · text-primary · flex-grow
244
- .progress-info__description {
245
- font-family: var(--matcha-font-family);
246
- font-size: var(--matcha-text-body-sm, 12px);
247
- font-weight: var(--matcha-weight-regular, 400);
248
- line-height: var(--matcha-leading-body-sm, 16px);
249
- color: var(--matcha-color-text-primary, #e8eaed);
250
- flex: 1 1 auto;
251
- min-width: 0;
252
- overflow: hidden;
253
- text-overflow: ellipsis;
254
- white-space: nowrap;
255
- }
256
-
257
- // ETA — caption 11/400/14 · text-secondary · letter 0.3
258
- .progress-info__eta {
259
- font-family: var(--matcha-font-family);
260
- font-size: var(--matcha-text-p-tiny, 11px);
261
- font-weight: var(--matcha-weight-regular, 400);
262
- line-height: var(--matcha-leading-p-tiny, 14px);
263
- letter-spacing: 0.3px;
264
- color: var(--matcha-color-text-secondary, rgba(255, 255, 255, 0.7));
265
- flex: none;
266
- }
267
-
268
- // Bar 4px (sempre size default — Figma não varia)
269
- .progress--info-track {
270
- height: var(--matcha-space-050, 4px);
271
- border-radius: var(--matcha-radius-sm, 2px);
272
- }
273
- }
274
-
275
- // =============================================================================
276
- // Segmented (N steps discretos com gap pill)
277
- // =============================================================================
278
- matcha-progress-bar[type="segmented"] {
279
- .progress-segmented {
280
- display: flex;
281
- flex-direction: row;
282
- align-items: stretch;
283
- gap: var(--matcha-space-050, 4px);
284
- width: 100%;
285
- }
286
-
287
- .progress-segment {
288
- flex: 1 1 0;
289
- height: var(--matcha-space-100, 8px); // default
290
- background: var(--matcha-color-disabled-bg, #282C34);
291
- border-radius: var(--matcha-radius-pill, 9999px);
292
- transition: background var(--matcha-duration-fast, 200ms) ease;
293
-
294
- &.is-filled {
295
- background: var(--matcha-progress-fill);
296
- }
297
- }
298
-
299
- &[size="sm"], &[size="small"] {
300
- .progress-segment { height: var(--matcha-space-200, 16px); }
301
- }
302
- &[size="md"], &[size="medium"] {
303
- .progress-segment { height: var(--matcha-space-400, 32px); }
304
- }
305
- }
306
-
307
- // =============================================================================
308
- // Animations + a11y
309
- // =============================================================================
310
- // Material-style dual-scan keyframes — animam left/right pra criar o efeito
311
- // de barra que "cruza" o track. ::before é a barra principal (mais larga),
312
- // ::after é a complementar (mais fina, com delay) que dá o ritmo de scan.
313
- @keyframes matcha-progress-indeterminate {
314
- 0% { left: -35%; right: 100%; }
315
- 60% { left: 100%; right: -90%; }
316
- 100% { left: 100%; right: -90%; }
317
- }
318
-
319
- @keyframes matcha-progress-indeterminate-short {
320
- 0% { left: -200%; right: 100%; }
321
- 60% { left: 107%; right: -8%; }
322
- 100% { left: 107%; right: -8%; }
323
- }
324
-
325
- @media (prefers-reduced-motion: reduce) {
326
- matcha-progress-bar {
327
- .progress-fill { transition: none; }
328
- .progress-text-fg { transition: none; }
329
- .progress-indeterminate,
330
- .progress-indeterminate::before,
331
- .progress-indeterminate::after { animation: none; }
332
- .progress-segment { transition: none; }
333
- }
334
- }
335
-
336
- // ── Forced colors ──
337
- @media (forced-colors: active) {
338
- matcha-progress-bar {
339
- .progress {
340
- background: Canvas !important;
341
- border: 1px solid CanvasText !important;
342
- }
343
- .progress-fill,
344
- .progress-segment.is-filled { background: Highlight !important; }
345
- .progress-segment:not(.is-filled) {
346
- background: Canvas !important;
347
- border: 1px solid CanvasText !important;
348
- }
349
- }
350
- }
351
-
352
- // ── Print ──
353
- @media print {
354
- matcha-progress-bar .progress-indeterminate { display: none !important; }
355
- }
1
+ // =============================================================================
2
+ // matcha-progress-bar.scss — Progress bar (1:1 com Figma DSV3)
3
+ // =============================================================================
4
+ // 4 types canônicos × 4 sizes:
5
+ // • standard — bar contínua (default 4 / xs 8 / sm 16 / md 32)
6
+ // • multi-level — N segmentos coloridos lado a lado (sm 16 / md 32)
7
+ // • informative — card 60px com %, descrição, ETA + bar 4px embaixo
8
+ // • segmented — N steps discretos com gap (sm 16 / md 32)
9
+ //
10
+ // Cores: 6 semânticas DSV3 (Material 1 legacy removida)
11
+ // Track (rail): #282C34 dark = matcha/color/disabled-bg
12
+ // =============================================================================
13
+
14
+ @mixin matcha-progress-bar-theme($theme) {
15
+ $semantic-colors: (
16
+ accent: getAccent,
17
+ primary: getPrimary,
18
+ success: getSuccess,
19
+ warn: getWarn,
20
+ danger: getDanger,
21
+ info: getInfo,
22
+ );
23
+
24
+ matcha-progress-bar {
25
+ // Default fill = accent
26
+ --matcha-progress-fill: var(--matcha-color-accent);
27
+
28
+ // Foreground do label inline, em duas alturas:
29
+ // • on-fill → sobre a barra preenchida. Cada semântica já tem o seu par
30
+ // `<nome>-contrast` ("o foreground correto sobre esta cor"),
31
+ // então não há contraste calculado à mão em lugar nenhum.
32
+ // • on-track → sobre o rail não preenchido (disabled-bg).
33
+ // O default accent-contrast resolve pra rgba(0,0,0,.87) nos dois modos — o
34
+ // mesmo valor que estava cravado antes, então o caso default não muda de cor.
35
+ --matcha-progress-label-on-fill: var(--matcha-color-accent-contrast);
36
+ --matcha-progress-label-on-track: var(--matcha-color-fg);
37
+
38
+ // Bind por color attr → CSS var (mesma estratégia do slider/spinner)
39
+ @each $name, $fn in $semantic-colors {
40
+ &[color="#{$name}"] {
41
+ --matcha-progress-fill: var(--matcha-color-#{$name});
42
+ --matcha-progress-label-on-fill: var(--matcha-color-#{$name}-contrast);
43
+ }
44
+ }
45
+ }
46
+
47
+ // Multi-level: cada segment tem sua própria cor via [data-segment-color]
48
+ matcha-progress-bar[type="multi-level"] {
49
+ @each $name, $fn in $semantic-colors {
50
+ .progress-segment-color[data-segment-color="#{$name}"] {
51
+ background-color: var(--matcha-color-#{$name});
52
+ }
53
+ }
54
+ }
55
+ }
56
+
57
+ // =============================================================================
58
+ // Structural — independente de cor
59
+ // =============================================================================
60
+
61
+ matcha-progress-bar {
62
+ display: block;
63
+ width: 100%;
64
+
65
+ // ── Track base (compartilhado por standard e multi-level) ──────────────
66
+ .progress {
67
+ position: relative;
68
+ display: block;
69
+ width: 100%;
70
+ height: var(--matcha-space-050, 4px); // default size
71
+ background-color: var(--matcha-color-disabled-bg, #282C34);
72
+ border-radius: var(--matcha-radius-sm, 2px);
73
+ overflow: hidden;
74
+ }
75
+
76
+ // Fill determinate (standard + informative).
77
+ // position/z-index colocam o fill ENTRE os dois labels (bg z-1 · fill z-2 · fg z-3),
78
+ // que é o que faz o fill opaco mascarar o label de trás no trecho preenchido.
79
+ .progress-fill {
80
+ position: relative;
81
+ z-index: 2;
82
+ height: 100%;
83
+ background-color: var(--matcha-progress-fill);
84
+ border-radius: var(--matcha-radius-sm, 2px);
85
+ transition: width var(--matcha-duration-fast, 200ms) ease;
86
+ }
87
+
88
+ // ── Inline label (standard sm/md) ──────────────────────────────────────
89
+ // Base comum aos dois labels. Ambos cobrem o track inteiro (inset: 0), então
90
+ // ficam alinhados pixel a pixel e a única diferença entre eles é cor + clip.
91
+ // Se a tipografia divergir entre os dois, o recorte desalinha e aparece degrau
92
+ // na borda do fill — por isso size/weight moram num seletor só (blocos de size
93
+ // abaixo miram .progress-text, nunca um dos dois isolado).
94
+ .progress-text {
95
+ position: absolute;
96
+ inset: 0;
97
+ display: flex;
98
+ align-items: center;
99
+ padding-left: var(--matcha-space-100, 8px);
100
+ font-family: var(--matcha-font-family);
101
+ white-space: nowrap;
102
+ pointer-events: none;
103
+ }
104
+
105
+ // Trecho NÃO preenchido: atrás do fill, cor que contrasta com o track.
106
+ .progress-text-bg {
107
+ z-index: 1;
108
+ color: var(--matcha-progress-label-on-track);
109
+ }
110
+
111
+ // Trecho preenchido: na frente do fill, cor que contrasta com o fill.
112
+ // clip-path recorta na largura exata do progresso; a transition acompanha
113
+ // a mesma duração da width do fill pra recorte e barra andarem juntos.
114
+ .progress-text-fg {
115
+ z-index: 3;
116
+ color: var(--matcha-progress-label-on-fill);
117
+ transition: clip-path var(--matcha-duration-fast, 200ms) ease;
118
+ }
119
+
120
+ // Indeterminate animation (standard, sem progress) — Material-style dual-scan.
121
+ // O .progress-indeterminate é wrapper transparente com overflow hidden.
122
+ // ::before e ::after são as 2 barras animadas que cruzam o track.
123
+ // Animar left/right (em vez de transform) é o approach que funciona em
124
+ // todos browsers e dá o ratio de "scan" característico do Material.
125
+ .progress-indeterminate {
126
+ position: absolute;
127
+ inset: 0;
128
+ overflow: hidden;
129
+ background-color: transparent;
130
+
131
+ &::before,
132
+ &::after {
133
+ content: '';
134
+ position: absolute;
135
+ top: 0;
136
+ bottom: 0;
137
+ background-color: var(--matcha-progress-fill);
138
+ will-change: left, right;
139
+ }
140
+
141
+ &::before {
142
+ animation: matcha-progress-indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
143
+ }
144
+ &::after {
145
+ animation: matcha-progress-indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
146
+ animation-delay: 1.15s;
147
+ }
148
+ }
149
+ }
150
+
151
+ // ── Sizes ──────────────────────────────────────────────────────────────────
152
+ // Escala monotônica: tiny 4 → small 16 → medium 32. `tiny` valia 8px, o DOBRO do
153
+ // default de 4px, então a ordem da escala não fechava e quem pedia o menor size
154
+ // recebia uma barra mais grossa do que não passar size nenhum. Agora tiny é o piso
155
+ // e `default` é sinônimo dele (mantido como alias @deprecated no componente).
156
+ matcha-progress-bar {
157
+ // Default: 4px (já é o default do .progress) — mesmo valor de `tiny`.
158
+
159
+ &[size="xs"], &[size="tiny"] {
160
+ .progress { height: var(--matcha-space-050, 4px); }
161
+ }
162
+ &[size="sm"], &[size="small"] {
163
+ .progress { height: var(--matcha-space-200, 16px); border-radius: var(--matcha-radius-md, 4px); }
164
+ .progress-fill { border-radius: var(--matcha-radius-md, 4px); }
165
+ .progress-text {
166
+ font-size: var(--matcha-text-p-tiny, 11px);
167
+ font-weight: var(--matcha-weight-regular, 400);
168
+ line-height: var(--matcha-leading-p-tiny, 14px);
169
+ letter-spacing: 0.3px;
170
+ }
171
+ }
172
+ &[size="md"], &[size="medium"] {
173
+ .progress { height: var(--matcha-space-400, 32px); border-radius: var(--matcha-radius-md, 4px); }
174
+ .progress-fill { border-radius: var(--matcha-radius-md, 4px); }
175
+ .progress-text {
176
+ font-size: var(--matcha-text-label-md, 14px);
177
+ font-weight: var(--matcha-weight-medium, 500);
178
+ line-height: var(--matcha-leading-label-md, 20px);
179
+ }
180
+ }
181
+ }
182
+
183
+ // =============================================================================
184
+ // Multi-level (3+ segmentos coloridos lado a lado)
185
+ // =============================================================================
186
+ matcha-progress-bar[type="multi-level"] {
187
+ .progress--multi {
188
+ display: flex;
189
+ flex-direction: row;
190
+ align-items: stretch;
191
+ // Track de fundo já vem do .progress (disabled-bg). Os segments coloridos
192
+ // sobrepõem por width%, deixando o resto exposto como track.
193
+ }
194
+
195
+ .progress-segment-color {
196
+ // Cor vem do data-segment-color → tema. Width vem do [style.width.%].
197
+ height: 100%;
198
+ // Sem border-radius interno — só as pontas do conjunto seguem o radius do track.
199
+ }
200
+
201
+ // Sizes específicos do multi-level
202
+ &[size="sm"], &[size="small"] {
203
+ .progress { height: var(--matcha-space-200, 16px); border-radius: var(--matcha-radius-sm, 2px); }
204
+ }
205
+ &[size="md"], &[size="medium"] {
206
+ .progress { height: var(--matcha-space-400, 32px); border-radius: var(--matcha-radius-md, 4px); }
207
+ }
208
+ }
209
+
210
+ // =============================================================================
211
+ // Informative (card 60px com %, descrição, ETA + bar 4px)
212
+ // Layout: padding 16, gap 8, bg surface-card, shadow 1, radius lg
213
+ // =============================================================================
214
+ matcha-progress-bar[type="informative"] {
215
+ .progress-info {
216
+ display: flex;
217
+ flex-direction: column;
218
+ align-items: stretch;
219
+ gap: var(--matcha-space-100, 8px);
220
+ padding: var(--matcha-space-200, 16px);
221
+ background: var(--matcha-color-surface-card, #1c1f26);
222
+ box-shadow: var(--matcha-shadow-1, 0px 2px 8px rgba(0, 0, 0, 0.08));
223
+ border-radius: var(--matcha-radius-lg, 8px);
224
+ }
225
+
226
+ .progress-info__row {
227
+ display: flex;
228
+ flex-direction: row;
229
+ align-items: center;
230
+ gap: var(--matcha-space-100, 8px);
231
+ }
232
+
233
+ // Percentage — label-sm 12/500/16 · text-primary
234
+ .progress-info__percentage {
235
+ font-family: var(--matcha-font-family);
236
+ font-size: var(--matcha-text-label-sm, 12px);
237
+ font-weight: var(--matcha-weight-medium, 500);
238
+ line-height: var(--matcha-leading-label-sm, 16px);
239
+ color: var(--matcha-color-text-primary, #e8eaed);
240
+ flex: none;
241
+ }
242
+
243
+ // Description — body-sm 12/400/16 · text-primary · flex-grow
244
+ .progress-info__description {
245
+ font-family: var(--matcha-font-family);
246
+ font-size: var(--matcha-text-body-sm, 12px);
247
+ font-weight: var(--matcha-weight-regular, 400);
248
+ line-height: var(--matcha-leading-body-sm, 16px);
249
+ color: var(--matcha-color-text-primary, #e8eaed);
250
+ flex: 1 1 auto;
251
+ min-width: 0;
252
+ overflow: hidden;
253
+ text-overflow: ellipsis;
254
+ white-space: nowrap;
255
+ }
256
+
257
+ // ETA — caption 11/400/14 · text-secondary · letter 0.3
258
+ .progress-info__eta {
259
+ font-family: var(--matcha-font-family);
260
+ font-size: var(--matcha-text-p-tiny, 11px);
261
+ font-weight: var(--matcha-weight-regular, 400);
262
+ line-height: var(--matcha-leading-p-tiny, 14px);
263
+ letter-spacing: 0.3px;
264
+ color: var(--matcha-color-text-secondary, rgba(255, 255, 255, 0.7));
265
+ flex: none;
266
+ }
267
+
268
+ // Bar 4px (sempre size default — Figma não varia)
269
+ .progress--info-track {
270
+ height: var(--matcha-space-050, 4px);
271
+ border-radius: var(--matcha-radius-sm, 2px);
272
+ }
273
+ }
274
+
275
+ // =============================================================================
276
+ // Segmented (N steps discretos com gap pill)
277
+ // =============================================================================
278
+ matcha-progress-bar[type="segmented"] {
279
+ .progress-segmented {
280
+ display: flex;
281
+ flex-direction: row;
282
+ align-items: stretch;
283
+ gap: var(--matcha-space-050, 4px);
284
+ width: 100%;
285
+ }
286
+
287
+ .progress-segment {
288
+ flex: 1 1 0;
289
+ height: var(--matcha-space-100, 8px); // default
290
+ background: var(--matcha-color-disabled-bg, #282C34);
291
+ border-radius: var(--matcha-radius-pill, 9999px);
292
+ transition: background var(--matcha-duration-fast, 200ms) ease;
293
+
294
+ &.is-filled {
295
+ background: var(--matcha-progress-fill);
296
+ }
297
+ }
298
+
299
+ &[size="sm"], &[size="small"] {
300
+ .progress-segment { height: var(--matcha-space-200, 16px); }
301
+ }
302
+ &[size="md"], &[size="medium"] {
303
+ .progress-segment { height: var(--matcha-space-400, 32px); }
304
+ }
305
+ }
306
+
307
+ // =============================================================================
308
+ // Animations + a11y
309
+ // =============================================================================
310
+ // Material-style dual-scan keyframes — animam left/right pra criar o efeito
311
+ // de barra que "cruza" o track. ::before é a barra principal (mais larga),
312
+ // ::after é a complementar (mais fina, com delay) que dá o ritmo de scan.
313
+ @keyframes matcha-progress-indeterminate {
314
+ 0% { left: -35%; right: 100%; }
315
+ 60% { left: 100%; right: -90%; }
316
+ 100% { left: 100%; right: -90%; }
317
+ }
318
+
319
+ @keyframes matcha-progress-indeterminate-short {
320
+ 0% { left: -200%; right: 100%; }
321
+ 60% { left: 107%; right: -8%; }
322
+ 100% { left: 107%; right: -8%; }
323
+ }
324
+
325
+ @media (prefers-reduced-motion: reduce) {
326
+ matcha-progress-bar {
327
+ .progress-fill { transition: none; }
328
+ .progress-text-fg { transition: none; }
329
+ .progress-indeterminate,
330
+ .progress-indeterminate::before,
331
+ .progress-indeterminate::after { animation: none; }
332
+ .progress-segment { transition: none; }
333
+ }
334
+ }
335
+
336
+ // ── Forced colors ──
337
+ @media (forced-colors: active) {
338
+ matcha-progress-bar {
339
+ .progress {
340
+ background: Canvas !important;
341
+ border: 1px solid CanvasText !important;
342
+ }
343
+ .progress-fill,
344
+ .progress-segment.is-filled { background: Highlight !important; }
345
+ .progress-segment:not(.is-filled) {
346
+ background: Canvas !important;
347
+ border: 1px solid CanvasText !important;
348
+ }
349
+ }
350
+ }
351
+
352
+ // ── Print ──
353
+ @media print {
354
+ matcha-progress-bar .progress-indeterminate { display: none !important; }
355
+ }