@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,313 +1,313 @@
|
|
|
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
|
-
// Bind por color attr → CSS var (mesma estratégia do slider/spinner)
|
|
29
|
-
@each $name, $fn in $semantic-colors {
|
|
30
|
-
&[color="#{$name}"] {
|
|
31
|
-
--matcha-progress-fill: var(--matcha-color-#{$name});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Multi-level: cada segment tem sua própria cor via [data-segment-color]
|
|
37
|
-
matcha-progress-bar[type="multi-level"] {
|
|
38
|
-
@each $name, $fn in $semantic-colors {
|
|
39
|
-
.progress-segment-color[data-segment-color="#{$name}"] {
|
|
40
|
-
background-color: var(--matcha-color-#{$name});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// =============================================================================
|
|
47
|
-
// Structural — independente de cor
|
|
48
|
-
// =============================================================================
|
|
49
|
-
|
|
50
|
-
matcha-progress-bar {
|
|
51
|
-
display: block;
|
|
52
|
-
width: 100%;
|
|
53
|
-
|
|
54
|
-
// ── Track base (compartilhado por standard e multi-level) ──────────────
|
|
55
|
-
.progress {
|
|
56
|
-
position: relative;
|
|
57
|
-
display: block;
|
|
58
|
-
width: 100%;
|
|
59
|
-
height: var(--matcha-space-050, 4px); // default size
|
|
60
|
-
background-color: var(--matcha-color-disabled-bg, #282C34);
|
|
61
|
-
border-radius: var(--matcha-radius-sm, 2px);
|
|
62
|
-
overflow: hidden;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Fill determinate (standard + informative)
|
|
66
|
-
.progress-fill {
|
|
67
|
-
display: flex;
|
|
68
|
-
align-items: center;
|
|
69
|
-
height: 100%;
|
|
70
|
-
background-color: var(--matcha-progress-fill);
|
|
71
|
-
border-radius: var(--matcha-radius-sm, 2px);
|
|
72
|
-
transition: width var(--matcha-duration-fast, 200ms) ease;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Inline label (standard sm/md)
|
|
76
|
-
.progress-fill__label {
|
|
77
|
-
padding-left: var(--matcha-space-100, 8px);
|
|
78
|
-
font-family: var(--matcha-font-family);
|
|
79
|
-
// Figma: text inverse/escuro sobre fill claro (accent é claro em dark mode)
|
|
80
|
-
color: rgba(0, 0, 0, 0.87);
|
|
81
|
-
white-space: nowrap;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
// Indeterminate animation (standard, sem progress) — Material-style dual-scan.
|
|
85
|
-
// O .progress-indeterminate é wrapper transparente com overflow hidden.
|
|
86
|
-
// ::before e ::after são as 2 barras animadas que cruzam o track.
|
|
87
|
-
// Animar left/right (em vez de transform) é o approach que funciona em
|
|
88
|
-
// todos browsers e dá o ratio de "scan" característico do Material.
|
|
89
|
-
.progress-indeterminate {
|
|
90
|
-
position: absolute;
|
|
91
|
-
inset: 0;
|
|
92
|
-
overflow: hidden;
|
|
93
|
-
background-color: transparent;
|
|
94
|
-
|
|
95
|
-
&::before,
|
|
96
|
-
&::after {
|
|
97
|
-
content: '';
|
|
98
|
-
position: absolute;
|
|
99
|
-
top: 0;
|
|
100
|
-
bottom: 0;
|
|
101
|
-
background-color: var(--matcha-progress-fill);
|
|
102
|
-
will-change: left, right;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
&::before {
|
|
106
|
-
animation: matcha-progress-indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
107
|
-
}
|
|
108
|
-
&::after {
|
|
109
|
-
animation: matcha-progress-indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
|
|
110
|
-
animation-delay: 1.15s;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// ── Sizes ──────────────────────────────────────────────────────────────────
|
|
116
|
-
matcha-progress-bar {
|
|
117
|
-
// Default: 4px (já é o default do .progress)
|
|
118
|
-
|
|
119
|
-
&[size="xs"], &[size="tiny"] {
|
|
120
|
-
.progress { height: var(--matcha-space-100, 8px); }
|
|
121
|
-
}
|
|
122
|
-
&[size="sm"], &[size="small"] {
|
|
123
|
-
.progress { height: var(--matcha-space-200, 16px); border-radius: var(--matcha-radius-md, 4px); }
|
|
124
|
-
.progress-fill { border-radius: var(--matcha-radius-md, 4px); }
|
|
125
|
-
.progress-fill__label {
|
|
126
|
-
font-size: var(--matcha-text-p-tiny, 11px);
|
|
127
|
-
font-weight: var(--matcha-weight-regular, 400);
|
|
128
|
-
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
129
|
-
letter-spacing: 0.3px;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
&[size="md"], &[size="medium"] {
|
|
133
|
-
.progress { height: var(--matcha-space-400, 32px); border-radius: var(--matcha-radius-md, 4px); }
|
|
134
|
-
.progress-fill { border-radius: var(--matcha-radius-md, 4px); }
|
|
135
|
-
.progress-fill__label {
|
|
136
|
-
font-size: var(--matcha-text-label-md, 14px);
|
|
137
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
138
|
-
line-height: var(--matcha-leading-label-md, 20px);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// =============================================================================
|
|
144
|
-
// Multi-level (3+ segmentos coloridos lado a lado)
|
|
145
|
-
// =============================================================================
|
|
146
|
-
matcha-progress-bar[type="multi-level"] {
|
|
147
|
-
.progress--multi {
|
|
148
|
-
display: flex;
|
|
149
|
-
flex-direction: row;
|
|
150
|
-
align-items: stretch;
|
|
151
|
-
// Track de fundo já vem do .progress (disabled-bg). Os segments coloridos
|
|
152
|
-
// sobrepõem por width%, deixando o resto exposto como track.
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.progress-segment-color {
|
|
156
|
-
// Cor vem do data-segment-color → tema. Width vem do [style.width.%].
|
|
157
|
-
height: 100%;
|
|
158
|
-
// Sem border-radius interno — só as pontas do conjunto seguem o radius do track.
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// Sizes específicos do multi-level
|
|
162
|
-
&[size="sm"], &[size="small"] {
|
|
163
|
-
.progress { height: var(--matcha-space-200, 16px); border-radius: var(--matcha-radius-sm, 2px); }
|
|
164
|
-
}
|
|
165
|
-
&[size="md"], &[size="medium"] {
|
|
166
|
-
.progress { height: var(--matcha-space-400, 32px); border-radius: var(--matcha-radius-md, 4px); }
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// =============================================================================
|
|
171
|
-
// Informative (card 60px com %, descrição, ETA + bar 4px)
|
|
172
|
-
// Layout: padding 16, gap 8, bg surface-card, shadow 1, radius lg
|
|
173
|
-
// =============================================================================
|
|
174
|
-
matcha-progress-bar[type="informative"] {
|
|
175
|
-
.progress-info {
|
|
176
|
-
display: flex;
|
|
177
|
-
flex-direction: column;
|
|
178
|
-
align-items: stretch;
|
|
179
|
-
gap: var(--matcha-space-100, 8px);
|
|
180
|
-
padding: var(--matcha-space-200, 16px);
|
|
181
|
-
background: var(--matcha-color-surface-card, #1c1f26);
|
|
182
|
-
box-shadow: var(--matcha-shadow-1, 0px 2px 8px rgba(0, 0, 0, 0.08));
|
|
183
|
-
border-radius: var(--matcha-radius-lg, 8px);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.progress-info__row {
|
|
187
|
-
display: flex;
|
|
188
|
-
flex-direction: row;
|
|
189
|
-
align-items: center;
|
|
190
|
-
gap: var(--matcha-space-100, 8px);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// Percentage — label-sm 12/500/16 · text-primary
|
|
194
|
-
.progress-info__percentage {
|
|
195
|
-
font-family: var(--matcha-font-family);
|
|
196
|
-
font-size: var(--matcha-text-label-sm, 12px);
|
|
197
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
198
|
-
line-height: var(--matcha-leading-label-sm, 16px);
|
|
199
|
-
color: var(--matcha-color-text-primary, #e8eaed);
|
|
200
|
-
flex: none;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Description — body-sm 12/400/16 · text-primary · flex-grow
|
|
204
|
-
.progress-info__description {
|
|
205
|
-
font-family: var(--matcha-font-family);
|
|
206
|
-
font-size: var(--matcha-text-body-sm, 12px);
|
|
207
|
-
font-weight: var(--matcha-weight-regular, 400);
|
|
208
|
-
line-height: var(--matcha-leading-body-sm, 16px);
|
|
209
|
-
color: var(--matcha-color-text-primary, #e8eaed);
|
|
210
|
-
flex: 1 1 auto;
|
|
211
|
-
min-width: 0;
|
|
212
|
-
overflow: hidden;
|
|
213
|
-
text-overflow: ellipsis;
|
|
214
|
-
white-space: nowrap;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// ETA — caption 11/400/14 · text-secondary · letter 0.3
|
|
218
|
-
.progress-info__eta {
|
|
219
|
-
font-family: var(--matcha-font-family);
|
|
220
|
-
font-size: var(--matcha-text-p-tiny, 11px);
|
|
221
|
-
font-weight: var(--matcha-weight-regular, 400);
|
|
222
|
-
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
223
|
-
letter-spacing: 0.3px;
|
|
224
|
-
color: var(--matcha-color-text-secondary, rgba(255, 255, 255, 0.7));
|
|
225
|
-
flex: none;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// Bar 4px (sempre size default — Figma não varia)
|
|
229
|
-
.progress--info-track {
|
|
230
|
-
height: var(--matcha-space-050, 4px);
|
|
231
|
-
border-radius: var(--matcha-radius-sm, 2px);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// =============================================================================
|
|
236
|
-
// Segmented (N steps discretos com gap pill)
|
|
237
|
-
// =============================================================================
|
|
238
|
-
matcha-progress-bar[type="segmented"] {
|
|
239
|
-
.progress-segmented {
|
|
240
|
-
display: flex;
|
|
241
|
-
flex-direction: row;
|
|
242
|
-
align-items: stretch;
|
|
243
|
-
gap: var(--matcha-space-050, 4px);
|
|
244
|
-
width: 100%;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.progress-segment {
|
|
248
|
-
flex: 1 1 0;
|
|
249
|
-
height: var(--matcha-space-100, 8px); // default
|
|
250
|
-
background: var(--matcha-color-disabled-bg, #282C34);
|
|
251
|
-
border-radius: var(--matcha-radius-pill, 9999px);
|
|
252
|
-
transition: background var(--matcha-duration-fast, 200ms) ease;
|
|
253
|
-
|
|
254
|
-
&.is-filled {
|
|
255
|
-
background: var(--matcha-progress-fill);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
&[size="sm"], &[size="small"] {
|
|
260
|
-
.progress-segment { height: var(--matcha-space-200, 16px); }
|
|
261
|
-
}
|
|
262
|
-
&[size="md"], &[size="medium"] {
|
|
263
|
-
.progress-segment { height: var(--matcha-space-400, 32px); }
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// =============================================================================
|
|
268
|
-
// Animations + a11y
|
|
269
|
-
// =============================================================================
|
|
270
|
-
// Material-style dual-scan keyframes — animam left/right pra criar o efeito
|
|
271
|
-
// de barra que "cruza" o track. ::before é a barra principal (mais larga),
|
|
272
|
-
// ::after é a complementar (mais fina, com delay) que dá o ritmo de scan.
|
|
273
|
-
@keyframes matcha-progress-indeterminate {
|
|
274
|
-
0% { left: -35%; right: 100%; }
|
|
275
|
-
60% { left: 100%; right: -90%; }
|
|
276
|
-
100% { left: 100%; right: -90%; }
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
@keyframes matcha-progress-indeterminate-short {
|
|
280
|
-
0% { left: -200%; right: 100%; }
|
|
281
|
-
60% { left: 107%; right: -8%; }
|
|
282
|
-
100% { left: 107%; right: -8%; }
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
@media (prefers-reduced-motion: reduce) {
|
|
286
|
-
matcha-progress-bar {
|
|
287
|
-
.progress-fill { transition: none; }
|
|
288
|
-
.progress-indeterminate,
|
|
289
|
-
.progress-indeterminate::before { animation: none; }
|
|
290
|
-
.progress-segment { transition: none; }
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// ── Forced colors ──
|
|
295
|
-
@media (forced-colors: active) {
|
|
296
|
-
matcha-progress-bar {
|
|
297
|
-
.progress-track {
|
|
298
|
-
background: Canvas !important;
|
|
299
|
-
border: 1px solid CanvasText !important;
|
|
300
|
-
}
|
|
301
|
-
.progress-fill,
|
|
302
|
-
.progress-segment.is-filled { background: Highlight !important; }
|
|
303
|
-
.progress-segment:not(.is-filled) {
|
|
304
|
-
background: Canvas !important;
|
|
305
|
-
border: 1px solid CanvasText !important;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
// ── Print ──
|
|
311
|
-
@media print {
|
|
312
|
-
matcha-progress-bar .progress-indeterminate { display: none !important; }
|
|
313
|
-
}
|
|
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
|
+
// Bind por color attr → CSS var (mesma estratégia do slider/spinner)
|
|
29
|
+
@each $name, $fn in $semantic-colors {
|
|
30
|
+
&[color="#{$name}"] {
|
|
31
|
+
--matcha-progress-fill: var(--matcha-color-#{$name});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Multi-level: cada segment tem sua própria cor via [data-segment-color]
|
|
37
|
+
matcha-progress-bar[type="multi-level"] {
|
|
38
|
+
@each $name, $fn in $semantic-colors {
|
|
39
|
+
.progress-segment-color[data-segment-color="#{$name}"] {
|
|
40
|
+
background-color: var(--matcha-color-#{$name});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// =============================================================================
|
|
47
|
+
// Structural — independente de cor
|
|
48
|
+
// =============================================================================
|
|
49
|
+
|
|
50
|
+
matcha-progress-bar {
|
|
51
|
+
display: block;
|
|
52
|
+
width: 100%;
|
|
53
|
+
|
|
54
|
+
// ── Track base (compartilhado por standard e multi-level) ──────────────
|
|
55
|
+
.progress {
|
|
56
|
+
position: relative;
|
|
57
|
+
display: block;
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: var(--matcha-space-050, 4px); // default size
|
|
60
|
+
background-color: var(--matcha-color-disabled-bg, #282C34);
|
|
61
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Fill determinate (standard + informative)
|
|
66
|
+
.progress-fill {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
height: 100%;
|
|
70
|
+
background-color: var(--matcha-progress-fill);
|
|
71
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
72
|
+
transition: width var(--matcha-duration-fast, 200ms) ease;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Inline label (standard sm/md)
|
|
76
|
+
.progress-fill__label {
|
|
77
|
+
padding-left: var(--matcha-space-100, 8px);
|
|
78
|
+
font-family: var(--matcha-font-family);
|
|
79
|
+
// Figma: text inverse/escuro sobre fill claro (accent é claro em dark mode)
|
|
80
|
+
color: rgba(0, 0, 0, 0.87);
|
|
81
|
+
white-space: nowrap;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Indeterminate animation (standard, sem progress) — Material-style dual-scan.
|
|
85
|
+
// O .progress-indeterminate é wrapper transparente com overflow hidden.
|
|
86
|
+
// ::before e ::after são as 2 barras animadas que cruzam o track.
|
|
87
|
+
// Animar left/right (em vez de transform) é o approach que funciona em
|
|
88
|
+
// todos browsers e dá o ratio de "scan" característico do Material.
|
|
89
|
+
.progress-indeterminate {
|
|
90
|
+
position: absolute;
|
|
91
|
+
inset: 0;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
background-color: transparent;
|
|
94
|
+
|
|
95
|
+
&::before,
|
|
96
|
+
&::after {
|
|
97
|
+
content: '';
|
|
98
|
+
position: absolute;
|
|
99
|
+
top: 0;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
background-color: var(--matcha-progress-fill);
|
|
102
|
+
will-change: left, right;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&::before {
|
|
106
|
+
animation: matcha-progress-indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
107
|
+
}
|
|
108
|
+
&::after {
|
|
109
|
+
animation: matcha-progress-indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
|
|
110
|
+
animation-delay: 1.15s;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ── Sizes ──────────────────────────────────────────────────────────────────
|
|
116
|
+
matcha-progress-bar {
|
|
117
|
+
// Default: 4px (já é o default do .progress)
|
|
118
|
+
|
|
119
|
+
&[size="xs"], &[size="tiny"] {
|
|
120
|
+
.progress { height: var(--matcha-space-100, 8px); }
|
|
121
|
+
}
|
|
122
|
+
&[size="sm"], &[size="small"] {
|
|
123
|
+
.progress { height: var(--matcha-space-200, 16px); border-radius: var(--matcha-radius-md, 4px); }
|
|
124
|
+
.progress-fill { border-radius: var(--matcha-radius-md, 4px); }
|
|
125
|
+
.progress-fill__label {
|
|
126
|
+
font-size: var(--matcha-text-p-tiny, 11px);
|
|
127
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
128
|
+
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
129
|
+
letter-spacing: 0.3px;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
&[size="md"], &[size="medium"] {
|
|
133
|
+
.progress { height: var(--matcha-space-400, 32px); border-radius: var(--matcha-radius-md, 4px); }
|
|
134
|
+
.progress-fill { border-radius: var(--matcha-radius-md, 4px); }
|
|
135
|
+
.progress-fill__label {
|
|
136
|
+
font-size: var(--matcha-text-label-md, 14px);
|
|
137
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
138
|
+
line-height: var(--matcha-leading-label-md, 20px);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// =============================================================================
|
|
144
|
+
// Multi-level (3+ segmentos coloridos lado a lado)
|
|
145
|
+
// =============================================================================
|
|
146
|
+
matcha-progress-bar[type="multi-level"] {
|
|
147
|
+
.progress--multi {
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: row;
|
|
150
|
+
align-items: stretch;
|
|
151
|
+
// Track de fundo já vem do .progress (disabled-bg). Os segments coloridos
|
|
152
|
+
// sobrepõem por width%, deixando o resto exposto como track.
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.progress-segment-color {
|
|
156
|
+
// Cor vem do data-segment-color → tema. Width vem do [style.width.%].
|
|
157
|
+
height: 100%;
|
|
158
|
+
// Sem border-radius interno — só as pontas do conjunto seguem o radius do track.
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Sizes específicos do multi-level
|
|
162
|
+
&[size="sm"], &[size="small"] {
|
|
163
|
+
.progress { height: var(--matcha-space-200, 16px); border-radius: var(--matcha-radius-sm, 2px); }
|
|
164
|
+
}
|
|
165
|
+
&[size="md"], &[size="medium"] {
|
|
166
|
+
.progress { height: var(--matcha-space-400, 32px); border-radius: var(--matcha-radius-md, 4px); }
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// =============================================================================
|
|
171
|
+
// Informative (card 60px com %, descrição, ETA + bar 4px)
|
|
172
|
+
// Layout: padding 16, gap 8, bg surface-card, shadow 1, radius lg
|
|
173
|
+
// =============================================================================
|
|
174
|
+
matcha-progress-bar[type="informative"] {
|
|
175
|
+
.progress-info {
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
align-items: stretch;
|
|
179
|
+
gap: var(--matcha-space-100, 8px);
|
|
180
|
+
padding: var(--matcha-space-200, 16px);
|
|
181
|
+
background: var(--matcha-color-surface-card, #1c1f26);
|
|
182
|
+
box-shadow: var(--matcha-shadow-1, 0px 2px 8px rgba(0, 0, 0, 0.08));
|
|
183
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.progress-info__row {
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-direction: row;
|
|
189
|
+
align-items: center;
|
|
190
|
+
gap: var(--matcha-space-100, 8px);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// Percentage — label-sm 12/500/16 · text-primary
|
|
194
|
+
.progress-info__percentage {
|
|
195
|
+
font-family: var(--matcha-font-family);
|
|
196
|
+
font-size: var(--matcha-text-label-sm, 12px);
|
|
197
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
198
|
+
line-height: var(--matcha-leading-label-sm, 16px);
|
|
199
|
+
color: var(--matcha-color-text-primary, #e8eaed);
|
|
200
|
+
flex: none;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Description — body-sm 12/400/16 · text-primary · flex-grow
|
|
204
|
+
.progress-info__description {
|
|
205
|
+
font-family: var(--matcha-font-family);
|
|
206
|
+
font-size: var(--matcha-text-body-sm, 12px);
|
|
207
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
208
|
+
line-height: var(--matcha-leading-body-sm, 16px);
|
|
209
|
+
color: var(--matcha-color-text-primary, #e8eaed);
|
|
210
|
+
flex: 1 1 auto;
|
|
211
|
+
min-width: 0;
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
text-overflow: ellipsis;
|
|
214
|
+
white-space: nowrap;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// ETA — caption 11/400/14 · text-secondary · letter 0.3
|
|
218
|
+
.progress-info__eta {
|
|
219
|
+
font-family: var(--matcha-font-family);
|
|
220
|
+
font-size: var(--matcha-text-p-tiny, 11px);
|
|
221
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
222
|
+
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
223
|
+
letter-spacing: 0.3px;
|
|
224
|
+
color: var(--matcha-color-text-secondary, rgba(255, 255, 255, 0.7));
|
|
225
|
+
flex: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Bar 4px (sempre size default — Figma não varia)
|
|
229
|
+
.progress--info-track {
|
|
230
|
+
height: var(--matcha-space-050, 4px);
|
|
231
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// =============================================================================
|
|
236
|
+
// Segmented (N steps discretos com gap pill)
|
|
237
|
+
// =============================================================================
|
|
238
|
+
matcha-progress-bar[type="segmented"] {
|
|
239
|
+
.progress-segmented {
|
|
240
|
+
display: flex;
|
|
241
|
+
flex-direction: row;
|
|
242
|
+
align-items: stretch;
|
|
243
|
+
gap: var(--matcha-space-050, 4px);
|
|
244
|
+
width: 100%;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.progress-segment {
|
|
248
|
+
flex: 1 1 0;
|
|
249
|
+
height: var(--matcha-space-100, 8px); // default
|
|
250
|
+
background: var(--matcha-color-disabled-bg, #282C34);
|
|
251
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
252
|
+
transition: background var(--matcha-duration-fast, 200ms) ease;
|
|
253
|
+
|
|
254
|
+
&.is-filled {
|
|
255
|
+
background: var(--matcha-progress-fill);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&[size="sm"], &[size="small"] {
|
|
260
|
+
.progress-segment { height: var(--matcha-space-200, 16px); }
|
|
261
|
+
}
|
|
262
|
+
&[size="md"], &[size="medium"] {
|
|
263
|
+
.progress-segment { height: var(--matcha-space-400, 32px); }
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// =============================================================================
|
|
268
|
+
// Animations + a11y
|
|
269
|
+
// =============================================================================
|
|
270
|
+
// Material-style dual-scan keyframes — animam left/right pra criar o efeito
|
|
271
|
+
// de barra que "cruza" o track. ::before é a barra principal (mais larga),
|
|
272
|
+
// ::after é a complementar (mais fina, com delay) que dá o ritmo de scan.
|
|
273
|
+
@keyframes matcha-progress-indeterminate {
|
|
274
|
+
0% { left: -35%; right: 100%; }
|
|
275
|
+
60% { left: 100%; right: -90%; }
|
|
276
|
+
100% { left: 100%; right: -90%; }
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@keyframes matcha-progress-indeterminate-short {
|
|
280
|
+
0% { left: -200%; right: 100%; }
|
|
281
|
+
60% { left: 107%; right: -8%; }
|
|
282
|
+
100% { left: 107%; right: -8%; }
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@media (prefers-reduced-motion: reduce) {
|
|
286
|
+
matcha-progress-bar {
|
|
287
|
+
.progress-fill { transition: none; }
|
|
288
|
+
.progress-indeterminate,
|
|
289
|
+
.progress-indeterminate::before { animation: none; }
|
|
290
|
+
.progress-segment { transition: none; }
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// ── Forced colors ──
|
|
295
|
+
@media (forced-colors: active) {
|
|
296
|
+
matcha-progress-bar {
|
|
297
|
+
.progress-track {
|
|
298
|
+
background: Canvas !important;
|
|
299
|
+
border: 1px solid CanvasText !important;
|
|
300
|
+
}
|
|
301
|
+
.progress-fill,
|
|
302
|
+
.progress-segment.is-filled { background: Highlight !important; }
|
|
303
|
+
.progress-segment:not(.is-filled) {
|
|
304
|
+
background: Canvas !important;
|
|
305
|
+
border: 1px solid CanvasText !important;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// ── Print ──
|
|
311
|
+
@media print {
|
|
312
|
+
matcha-progress-bar .progress-indeterminate { display: none !important; }
|
|
313
|
+
}
|