@inchurch/matcha-theme 20.0.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 (112) hide show
  1. package/README.md +303 -0
  2. package/abstracts/_colors.scss +405 -0
  3. package/abstracts/_elevation.scss +102 -0
  4. package/abstracts/_functions.scss +1213 -0
  5. package/abstracts/_media-breakpoint.scss +23 -0
  6. package/abstracts/_typography.scss +127 -0
  7. package/base/_reset.scss +438 -0
  8. package/components/matcha-accordion.scss +157 -0
  9. package/components/matcha-audio-player.scss +32 -0
  10. package/components/matcha-autocomplete.scss +134 -0
  11. package/components/matcha-avatar.scss +161 -0
  12. package/components/matcha-badge.scss +120 -0
  13. package/components/matcha-breadcrumb.scss +126 -0
  14. package/components/matcha-button-toggle.scss +363 -0
  15. package/components/matcha-buttons.scss +784 -0
  16. package/components/matcha-calendar.scss +154 -0
  17. package/components/matcha-cards.scss +205 -0
  18. package/components/matcha-chart-card.scss +60 -0
  19. package/components/matcha-checkbox.scss +554 -0
  20. package/components/matcha-chip.scss +212 -0
  21. package/components/matcha-color-pick.scss +35 -0
  22. package/components/matcha-command-palette.scss +89 -0
  23. package/components/matcha-crop.scss +172 -0
  24. package/components/matcha-date.scss +81 -0
  25. package/components/matcha-divider.scss +45 -0
  26. package/components/matcha-draggable.scss +24 -0
  27. package/components/matcha-drawer.scss +235 -0
  28. package/components/matcha-drop-list.scss +390 -0
  29. package/components/matcha-emoji.scss +69 -0
  30. package/components/matcha-empty-state.scss +118 -0
  31. package/components/matcha-flag.scss +62 -0
  32. package/components/matcha-footer.scss +187 -0
  33. package/components/matcha-form-field.scss +552 -0
  34. package/components/matcha-form-section.scss +101 -0
  35. package/components/matcha-header.scss +325 -0
  36. package/components/matcha-highlight.scss +296 -0
  37. package/components/matcha-hint-text.scss +66 -0
  38. package/components/matcha-horizontal-tree.scss +317 -0
  39. package/components/matcha-icon.scss +106 -0
  40. package/components/matcha-image.scss +62 -0
  41. package/components/matcha-list.scss +212 -0
  42. package/components/matcha-menu.scss +86 -0
  43. package/components/matcha-modal.scss +234 -0
  44. package/components/matcha-nav.scss +450 -0
  45. package/components/matcha-notification.scss +197 -0
  46. package/components/matcha-option.scss +95 -0
  47. package/components/matcha-page-builder.scss +4186 -0
  48. package/components/matcha-paginator.scss +235 -0
  49. package/components/matcha-panel.scss +167 -0
  50. package/components/matcha-profile-card.scss +50 -0
  51. package/components/matcha-progress-bar.scss +209 -0
  52. package/components/matcha-radio.scss +528 -0
  53. package/components/matcha-ripple.scss +7 -0
  54. package/components/matcha-scrollbar.scss +35 -0
  55. package/components/matcha-scrollbox-shadow.scss +123 -0
  56. package/components/matcha-section.scss +105 -0
  57. package/components/matcha-select.scss +661 -0
  58. package/components/matcha-skeleton.scss +138 -0
  59. package/components/matcha-slide-toggle.scss +590 -0
  60. package/components/matcha-slider.scss +188 -0
  61. package/components/matcha-snack-bar.scss +266 -0
  62. package/components/matcha-spin.scss +252 -0
  63. package/components/matcha-spinner.scss +78 -0
  64. package/components/matcha-stepper.scss +177 -0
  65. package/components/matcha-table-cell.scss +41 -0
  66. package/components/matcha-table.scss +785 -0
  67. package/components/matcha-tabs.scss +469 -0
  68. package/components/matcha-text-editor.scss +151 -0
  69. package/components/matcha-time.scss +33 -0
  70. package/components/matcha-timepicker.scss +13 -0
  71. package/components/matcha-toolbar.scss +206 -0
  72. package/components/matcha-tooltip.scss +128 -0
  73. package/components/matcha-uploader.scss +215 -0
  74. package/css/matcha-style.css +76772 -0
  75. package/fonts/CircularStd-Black.eot +0 -0
  76. package/fonts/CircularStd-Black.svg +3426 -0
  77. package/fonts/CircularStd-Black.ttf +0 -0
  78. package/fonts/CircularStd-Black.woff +0 -0
  79. package/fonts/CircularStd-Black.woff2 +0 -0
  80. package/fonts/CircularStd-Bold.eot +0 -0
  81. package/fonts/CircularStd-Bold.otf +0 -0
  82. package/fonts/CircularStd-Bold.svg +13532 -0
  83. package/fonts/CircularStd-Bold.ttf +0 -0
  84. package/fonts/CircularStd-Bold.woff +0 -0
  85. package/fonts/CircularStd-Bold.woff2 +0 -0
  86. package/fonts/CircularStd-Medium.eot +0 -0
  87. package/fonts/CircularStd-Medium.otf +0 -0
  88. package/fonts/CircularStd-Medium.svg +13511 -0
  89. package/fonts/CircularStd-Medium.ttf +0 -0
  90. package/fonts/CircularStd-Medium.woff +0 -0
  91. package/fonts/CircularStd-Medium.woff2 +0 -0
  92. package/fonts/CircularStd-Regular.eot +0 -0
  93. package/fonts/CircularStd-Regular.otf +0 -0
  94. package/fonts/CircularStd-Regular.svg +2378 -0
  95. package/fonts/CircularStd-Regular.ttf +0 -0
  96. package/fonts/CircularStd-Regular.woff +0 -0
  97. package/fonts/CircularStd-Regular.woff2 +0 -0
  98. package/main.scss +262 -0
  99. package/package.json +11 -0
  100. package/tokens/_animations-tokens.scss +37 -0
  101. package/tokens/_breakpoints-tokens.scss +26 -0
  102. package/tokens/_color-tokens.scss +1153 -0
  103. package/tokens/_css-custom-properties.scss +568 -0
  104. package/tokens/_elevation-tokens.scss +33 -0
  105. package/tokens/_spacing-tokens.scss +94 -0
  106. package/tokens/_typography-tokens.scss +65 -0
  107. package/vendors/angular-editor.scss +56 -0
  108. package/vendors/angular-material-fixes.scss +297 -0
  109. package/vendors/calendar.scss +2880 -0
  110. package/vendors/charts.scss +92 -0
  111. package/vendors/ng5-slider.scss +56 -0
  112. package/vendors/ngx-material-timepicker.scss +50 -0
@@ -0,0 +1,235 @@
1
+ @use "sass:map";
2
+
3
+ // =============================================================================
4
+ // matcha-paginator.scss — Pagination for tables and lists
5
+ // Aligned with Figma matcha/paginator:
6
+ // Tipo(3: Completo, Simples, Mobile)
7
+ // Active page = accent pill, nav = icon-button Ghost MD (44×44 touch target)
8
+ // HTML: <nav aria-label="Paginação" class="matcha-paginator">
9
+ // Active page: aria-current="page"
10
+ // =============================================================================
11
+
12
+ @mixin matcha-paginator-theme($theme) {
13
+ $is-dark: map.get($theme, is-dark);
14
+
15
+ .matcha-paginator {
16
+ // ── Active page — accent only (consistência, não over-engineering) ──
17
+ .page-button.active {
18
+ background-color: var(--matcha-color-accent, #{getAccent($theme)});
19
+ color: var(--matcha-color-accent-contrast, #{getAccentContrast($theme)});
20
+ }
21
+
22
+ // ── Total info ──
23
+ .paginator-total-info {
24
+ .total-range {
25
+ color: var(--matcha-color-text-label, #{getBlueGrey($theme)});
26
+ }
27
+ .total-filtered {
28
+ color: var(--matcha-color-text-secondary, #{getForegroundAlpha($theme)});
29
+ }
30
+ }
31
+
32
+ // ── Page buttons (inactive) ──
33
+ .page-button:not(.active) {
34
+ color: var(--matcha-color-text-label, #{getBlueGrey($theme)});
35
+
36
+ &:hover {
37
+ background-color: var(--matcha-color-surface-hover, #{getBackgroundAlpha($theme)});
38
+ }
39
+ }
40
+
41
+ // ── Nav buttons ──
42
+ .nav-button {
43
+ color: var(--matcha-color-icon-default, #{getBlueGrey($theme)});
44
+ }
45
+ }
46
+ }
47
+
48
+ // ── Layout ──────────────────────────────────────────────────────────────────
49
+
50
+ .matcha-paginator {
51
+ // Figma matcha/paginator: pad 8/16, gap 8 (Mobile/Tipo=Simple)
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: space-between;
55
+ padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
56
+ font-family: var(--matcha-font-family);
57
+ gap: var(--matcha-space-100, 8px);
58
+
59
+ // ── Total info ──
60
+ .paginator-total-info {
61
+ display: flex;
62
+ flex-direction: column;
63
+ gap: var(--matcha-space-050, 4px);
64
+
65
+ .total-range {
66
+ font-size: var(--matcha-text-body-md, 14px);
67
+ font-weight: var(--matcha-weight-medium, 500);
68
+ line-height: 1.4;
69
+ }
70
+
71
+ .total-filtered {
72
+ font-size: var(--matcha-text-body-sm, 12px);
73
+ line-height: 1.3;
74
+ }
75
+ }
76
+
77
+ // ── Controls wrapper ──
78
+ .paginator-controls {
79
+ display: flex;
80
+ align-items: center;
81
+ gap: var(--matcha-space-200, 16px);
82
+ }
83
+
84
+ // ── Page size selector ──
85
+ .page-size-selector {
86
+ display: flex;
87
+ align-items: center;
88
+ gap: var(--matcha-space-100, 8px);
89
+
90
+ label {
91
+ font-size: var(--matcha-text-body-sm, 12px);
92
+ white-space: nowrap;
93
+ }
94
+ }
95
+
96
+ // ── Page numbers row ──
97
+ .paginator-pages {
98
+ display: flex;
99
+ align-items: center;
100
+ gap: var(--matcha-space-050, 4px);
101
+ }
102
+
103
+ // ── Nav buttons (prev/next) — 40×40 matching icon-button Ghost MD ──
104
+ .nav-button {
105
+ display: flex;
106
+ align-items: center;
107
+ justify-content: center;
108
+ width: var(--matcha-space-500, 40px);
109
+ height: var(--matcha-space-500, 40px);
110
+ border: none;
111
+ background: none;
112
+ cursor: pointer;
113
+ border-radius: var(--matcha-radius-pill, 9999px);
114
+ position: relative;
115
+ overflow: hidden;
116
+ transition: opacity var(--matcha-duration-instant, 80ms) linear;
117
+
118
+ // State layer
119
+ &::before {
120
+ content: '';
121
+ position: absolute;
122
+ inset: 0;
123
+ background: currentColor;
124
+ opacity: 0;
125
+ border-radius: inherit;
126
+ pointer-events: none;
127
+ transition: opacity var(--matcha-duration-instant, 80ms) linear;
128
+ }
129
+ &:hover:not(:disabled)::before { opacity: var(--matcha-state-hover, 0.08); }
130
+ &:active:not(:disabled)::before { opacity: var(--matcha-state-active, 0.12); }
131
+
132
+ &:disabled {
133
+ opacity: var(--matcha-opacity-secondary, 0.54);
134
+ pointer-events: none; cursor: default;
135
+ }
136
+
137
+ &:focus-visible {
138
+ outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent, #6200ee);
139
+ outline-offset: var(--matcha-state-focus-ring-offset, 2px);
140
+ }
141
+ }
142
+
143
+ // ── Page buttons — 44×44 pill touch target (WCAG 2.5.8) ──
144
+ .page-button {
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: center;
148
+ min-width: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)); // 44
149
+ height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px));
150
+ padding: 0;
151
+ border: none;
152
+ background: none;
153
+ cursor: pointer;
154
+ border-radius: var(--matcha-radius-pill, 9999px);
155
+ font-size: var(--matcha-text-label-md, 14px);
156
+ font-weight: var(--matcha-weight-medium, 500);
157
+ position: relative;
158
+ overflow: hidden;
159
+
160
+ // State layer for non-active
161
+ &:not(.active)::before {
162
+ content: '';
163
+ position: absolute;
164
+ inset: 0;
165
+ background: currentColor;
166
+ opacity: 0;
167
+ border-radius: inherit;
168
+ pointer-events: none;
169
+ transition: opacity var(--matcha-duration-instant, 80ms) linear;
170
+ }
171
+ &:not(.active):not([disabled]):hover::before { opacity: var(--matcha-state-hover, 0.08); }
172
+ &:not(.active):not([disabled]):active::before { opacity: var(--matcha-state-active, 0.12); }
173
+
174
+ &:focus-visible {
175
+ outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent, #6200ee);
176
+ outline-offset: var(--matcha-state-focus-ring-offset, 2px);
177
+ }
178
+ }
179
+
180
+ // ── Ellipsis ──
181
+ .ellipsis {
182
+ display: flex;
183
+ align-items: center;
184
+ justify-content: center;
185
+ min-width: 32px;
186
+ height: calc(var(--matcha-space-500, 40px) + var(--matcha-space-050, 4px)); // 44
187
+ font-size: var(--matcha-text-label-sm, 12px);
188
+ user-select: none;
189
+ }
190
+ }
191
+
192
+ // ── Mobile layout (≤599px) — hides page numbers, shows "Página X de Y" ──
193
+ @include media-breakpoint('xs') {
194
+ .matcha-paginator {
195
+ flex-wrap: wrap;
196
+ justify-content: center;
197
+ padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
198
+ gap: var(--matcha-space-100, 8px);
199
+
200
+ // Hide page numbers on mobile
201
+ .paginator-pages .page-button,
202
+ .paginator-pages .ellipsis {
203
+ display: none;
204
+ }
205
+
206
+ // Show "Página X de Y" label (hidden on desktop via .mobile-only)
207
+ .paginator-page-label {
208
+ display: block;
209
+ }
210
+
211
+ // Total info centered below
212
+ .paginator-total-info {
213
+ width: 100%;
214
+ text-align: center;
215
+ align-items: center;
216
+ }
217
+ }
218
+ }
219
+
220
+ // Hide mobile-only elements on desktop
221
+ @include media-breakpoint('gt-xs') {
222
+ .matcha-paginator .paginator-page-label {
223
+ display: none;
224
+ }
225
+ }
226
+
227
+ // ── Reduced motion ──
228
+ @media (prefers-reduced-motion: reduce) {
229
+ .matcha-paginator {
230
+ .nav-button::before,
231
+ .page-button::before {
232
+ transition: none;
233
+ }
234
+ }
235
+ }
@@ -0,0 +1,167 @@
1
+ @use "sass:map";
2
+
3
+ // Estrutura Overlay Local
4
+ .matcha-panel-overlay {
5
+ position: fixed;
6
+ inset: 0;
7
+ width: 100%;
8
+ height: 100%;
9
+ z-index: 10001;
10
+ pointer-events: none !important; // Permite clicar "através" do overlay (interação com inputs, scroll da página)
11
+ display: block;
12
+ }
13
+
14
+ .matcha-panel-pane {
15
+ position: absolute;
16
+ display: block;
17
+ max-height: 100%;
18
+ pointer-events: auto; // Reativa cliques para o painel em si
19
+ box-sizing: border-box;
20
+ }
21
+
22
+ .matcha-panel {
23
+ // Figma matcha/panel: radius 16 (xl), pad 8/0
24
+ border-radius: var(--matcha-radius-xl, 16px);
25
+ overflow-y: auto;
26
+ display: flex;
27
+ flex-direction: column;
28
+ max-height: 280px;
29
+ width: 100%;
30
+ padding: var(--matcha-space-100, 8px) 0;
31
+
32
+ // Animações (fade + scale leve, curva Material standard)
33
+ opacity: 0;
34
+ transform: scale(0.96) translateY(-4px);
35
+ transition: opacity var(--matcha-duration-fast, 200ms) cubic-bezier(0.4, 0, 0.2, 1),
36
+ transform var(--matcha-duration-fast, 200ms) cubic-bezier(0.4, 0, 0.2, 1);
37
+
38
+ // Position relative (agora contido no pane)
39
+ position: relative;
40
+ z-index: auto;
41
+
42
+ // Estados de abertura
43
+ &.matcha-panel-open {
44
+ opacity: 1;
45
+ transform: scale(1) translateY(0);
46
+ }
47
+
48
+ // Posicionamento vertical
49
+ &.matcha-panel-top {
50
+ transform-origin: bottom center;
51
+ }
52
+
53
+ &.matcha-panel-bottom {
54
+ transform-origin: top center;
55
+ }
56
+ }
57
+
58
+ @media (prefers-reduced-motion: reduce) {
59
+ .matcha-panel {
60
+ transition: none;
61
+ }
62
+ }
63
+
64
+ // Conteúdo do painel
65
+ .matcha-panel-content {
66
+ overflow-y: auto;
67
+ flex: 1;
68
+ }
69
+
70
+ // Quando o painel envolve um componente que já carrega surface + shadow + radius próprios
71
+ // (ex: matcha-calendar, matcha-time-panel), o panel deve ser transparente e servir
72
+ // apenas de container de posicionamento — evita "duplicar" visual do cartão.
73
+ // IMPORTANTE: !important porque o mixin matcha-panel-theme pode ser aplicado com
74
+ // wrapper de tema (ex: body.theme-dark .matcha-panel), elevando especificidade pra
75
+ // 0-2-0, empatando com :has() e vencendo por ordem no cascade.
76
+ .matcha-panel:has(.matcha-calendar),
77
+ .matcha-panel:has(matcha-time-panel),
78
+ .matcha-panel:has(.matcha-time-panel) {
79
+ background: transparent !important;
80
+ box-shadow: none !important;
81
+ border: none !important;
82
+ border-radius: 0 !important;
83
+ padding: 0 !important;
84
+ max-height: none !important;
85
+ overflow: visible !important;
86
+ }
87
+
88
+ // ── Bottom-sheet em mobile (≤ 600px) ────────────────────────
89
+ // O panel com calendar vira um painel full-width grudado no rodapé da tela,
90
+ // com backdrop translúcido e slide-up. Sobrescreve o transform inline do JS.
91
+ @media (max-width: 600px) {
92
+ .matcha-panel-overlay:has(.matcha-calendar) {
93
+ pointer-events: auto !important; // precisa capturar o backdrop
94
+ background: rgba(0, 0, 0, 0.4); // backdrop
95
+ backdrop-filter: blur(2px);
96
+ animation: matcha-panel-backdrop-fade 180ms cubic-bezier(0.4, 0, 0.2, 1);
97
+ }
98
+
99
+ .matcha-panel-pane:has(.matcha-calendar) {
100
+ position: fixed !important;
101
+ inset: auto 0 0 0 !important;
102
+ top: auto !important;
103
+ left: 0 !important;
104
+ right: 0 !important;
105
+ bottom: 0 !important;
106
+ width: 100% !important;
107
+ min-width: 0 !important;
108
+ transform: none !important;
109
+ max-height: 90vh;
110
+ animation: matcha-panel-sheet-up 220ms cubic-bezier(0.4, 0, 0.2, 1);
111
+ }
112
+
113
+ // Cartão do calendar ocupa a largura toda, com radius só em cima
114
+ .matcha-panel:has(.matcha-calendar) .matcha-calendar {
115
+ width: 100%;
116
+ min-width: 0;
117
+ border-radius: var(--matcha-radius-xl, 16px) var(--matcha-radius-xl, 16px) 0 0;
118
+ padding: var(--matcha-space-250, 20px);
119
+ }
120
+
121
+ // Dual-month cai pra empilhado em mobile
122
+ .matcha-panel:has(.matcha-calendar) .matcha-calendar.is-dual {
123
+ min-width: 0;
124
+ }
125
+ .matcha-panel:has(.matcha-calendar) .matcha-calendar.is-dual .matcha-calendar-months {
126
+ flex-direction: column;
127
+ }
128
+ }
129
+
130
+ @keyframes matcha-panel-sheet-up {
131
+ from { transform: translateY(100%); }
132
+ to { transform: translateY(0); }
133
+ }
134
+
135
+ @keyframes matcha-panel-backdrop-fade {
136
+ from { opacity: 0; }
137
+ to { opacity: 1; }
138
+ }
139
+
140
+ @mixin matcha-panel-theme($theme) {
141
+ $is-dark: map.get($theme, is-dark);
142
+
143
+ .matcha-panel {
144
+ background: var(--matcha-color-surface, #{getSurface($theme)});
145
+ color: var(--matcha-color-fg, #{getForeground($theme)});
146
+
147
+ // Shadow level 2 (menus, floating)
148
+ box-shadow: var(--matcha-shadow-2, #{if($is-dark, $shadow-2-dark, $shadow-2-light)});
149
+
150
+ @if $is-dark {
151
+ border: var(--matcha-border-hairline, 1px) solid rgba(255, 255, 255, 0.1);
152
+ }
153
+
154
+ &:focus-within {
155
+ box-shadow: var(--matcha-shadow-3, #{if($is-dark, $shadow-3-dark, $shadow-3-light)});
156
+ }
157
+ }
158
+
159
+ // Responsividade (mantida aqui ou movida para global dependendo da necessidade de tokens)
160
+ @media (max-width: 768px) {
161
+ .matcha-panel {
162
+ max-height: 200px;
163
+ min-width: 120px;
164
+ border-radius: var(--matcha-radius-md, 4px);
165
+ }
166
+ }
167
+ }
@@ -0,0 +1,50 @@
1
+ @use "sass:map";
2
+
3
+ // =============================================================================
4
+ // matcha-profile-card.scss — Compact profile card (avatar + name + role)
5
+ // Aligned with Figma matcha/profile-card:
6
+ // Layout: avatar (40px) + text (name + role) — horizontal, pill radius
7
+ // Used in: headers, sidebars, user menus
8
+ // Angular: matcha-profile-card
9
+ // =============================================================================
10
+
11
+ @mixin matcha-profile-card-theme($theme) {
12
+ .matcha-profile-card {
13
+ color: var(--matcha-color-fg, #{getForeground($theme)});
14
+ }
15
+
16
+ .matcha-profile-card__name {
17
+ color: var(--matcha-color-fg, #{getForeground($theme)});
18
+ }
19
+
20
+ .matcha-profile-card__role {
21
+ color: var(--matcha-color-text-hint, #{getBlueGrey($theme)});
22
+ }
23
+ }
24
+
25
+ // ── Layout ──────────────────────────────────────────────────────────────────
26
+
27
+ .matcha-profile-card {
28
+ display: flex;
29
+ align-items: center;
30
+ gap: var(--matcha-space-200, 16px);
31
+ padding: var(--matcha-space-100, 8px) var(--matcha-space-300, 24px) var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
32
+ border-radius: var(--matcha-radius-pill, 9999px);
33
+ }
34
+
35
+ .matcha-profile-card__name {
36
+ font-family: var(--matcha-font-family);
37
+ font-size: var(--matcha-text-body-md, 14px);
38
+ font-weight: var(--matcha-weight-medium, 500);
39
+ line-height: var(--matcha-leading-body-md, 20px);
40
+ white-space: nowrap;
41
+ overflow: hidden;
42
+ text-overflow: ellipsis;
43
+ }
44
+
45
+ .matcha-profile-card__role {
46
+ font-family: var(--matcha-font-family);
47
+ font-size: var(--matcha-text-caption, 11px);
48
+ line-height: var(--matcha-leading-caption, 14px);
49
+ white-space: nowrap;
50
+ }
@@ -0,0 +1,209 @@
1
+ // =============================================================================
2
+ // matcha-progress-bar.scss — Progress bar (determinate, indeterminate, informative)
3
+ // Aligned with Figma matcha/progress-bar: Type(3) × Size(4) = 7 variants
4
+ // =============================================================================
5
+
6
+ @mixin generate-matcha-progress-bar-size-classes($helper-breakpoints) {
7
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
8
+ @include media-breakpoint($materialBreakpoint) {
9
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
10
+
11
+ &[size#{$infix}="xs"],
12
+ &[size#{$infix}="tiny"] {
13
+ .progress { height: px-to-rem(8px); }
14
+ }
15
+
16
+ &[size#{$infix}="sm"],
17
+ &[size#{$infix}="small"] {
18
+ .progress { height: px-to-rem(16px); }
19
+ }
20
+
21
+ &[size#{$infix}="md"],
22
+ &[size#{$infix}="medium"] {
23
+ .progress { height: px-to-rem(32px); }
24
+ }
25
+ }
26
+ }
27
+
28
+ &:not([size]) {
29
+ .progress { height: px-to-rem(4px); }
30
+ }
31
+ }
32
+
33
+ @mixin matcha-progress-bar-theme($theme) {
34
+ matcha-progress-bar:not([color]) {
35
+ .determinate,
36
+ .indeterminate {
37
+ background-color: var(--matcha-color-accent, #{getAccent($theme)});
38
+ }
39
+ }
40
+
41
+ matcha-progress-bar {
42
+ .matcha-progress-bar {
43
+ overflow: hidden;
44
+ border-radius: var(--matcha-radius-lg, 8px);
45
+ }
46
+
47
+ .progress {
48
+ position: relative;
49
+ display: block;
50
+ width: 100%;
51
+ background-color: var(--matcha-color-disabled-bg, #{getDisabled($theme)});
52
+ border-radius: var(--matcha-radius-sm, 2px);
53
+ background-clip: padding-box;
54
+ overflow: hidden;
55
+
56
+ .progress-text {
57
+ position: absolute;
58
+ inset: 0;
59
+ display: flex;
60
+ align-items: center;
61
+ justify-content: center;
62
+ font-size: var(--matcha-text-sm, 12px);
63
+ font-weight: var(--matcha-weight-semibold, 600);
64
+ pointer-events: none;
65
+ white-space: nowrap;
66
+ }
67
+
68
+ .progress-text-bg {
69
+ color: var(--matcha-color-fg, #{getForeground($theme)});
70
+ z-index: 1;
71
+ }
72
+
73
+ .progress-text-fg {
74
+ color: var(--matcha-color-disabled-bg, #{getDisabled($theme)});
75
+ z-index: 3;
76
+ transition: clip-path 300ms linear;
77
+ }
78
+
79
+ .determinate {
80
+ position: absolute;
81
+ top: 0;
82
+ bottom: 0;
83
+ left: 0;
84
+ transition: width 300ms linear;
85
+ z-index: 2;
86
+ }
87
+
88
+ .indeterminate {
89
+ &:before {
90
+ content: '';
91
+ position: absolute;
92
+ background-color: inherit;
93
+ top: 0; left: 0; bottom: 0;
94
+ will-change: left, right;
95
+ animation: matcha-progress-indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
96
+ }
97
+
98
+ &:after {
99
+ content: '';
100
+ position: absolute;
101
+ background-color: inherit;
102
+ top: 0; left: 0; bottom: 0;
103
+ will-change: left, right;
104
+ animation: matcha-progress-indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
105
+ animation-delay: 1.15s;
106
+ }
107
+ }
108
+ }
109
+
110
+ .progress-info-card {
111
+ border-radius: var(--matcha-radius-lg, 8px);
112
+ width: 100%;
113
+ display: block;
114
+ }
115
+
116
+ @include generate-matcha-progress-bar-size-classes($helper-breakpoints);
117
+ }
118
+
119
+ @keyframes matcha-progress-indeterminate {
120
+ 0% { left: -35%; right: 100%; }
121
+ 60% { left: 100%; right: -90%; }
122
+ 100% { left: 100%; right: -90%; }
123
+ }
124
+
125
+ @keyframes matcha-progress-indeterminate-short {
126
+ 0% { left: -200%; right: 100%; }
127
+ 60% { left: 107%; right: -8%; }
128
+ 100% { left: 107%; right: -8%; }
129
+ }
130
+
131
+ @media (prefers-reduced-motion: reduce) {
132
+ matcha-progress-bar .progress {
133
+ .determinate { transition: none; }
134
+ .indeterminate:before,
135
+ .indeterminate:after { animation: none; }
136
+ .progress-text-fg { transition: none; }
137
+ }
138
+ }
139
+ }
140
+
141
+ // ── Structural ──────────────────────────────────────────────────────────────
142
+
143
+ matcha-progress-bar {
144
+ display: flex;
145
+ width: 100%;
146
+ border-radius: var(--matcha-radius-lg, 8px);
147
+
148
+ .matcha-progress-bar {
149
+ display: flex;
150
+ flex-direction: column;
151
+ position: relative;
152
+ width: 100%;
153
+ }
154
+ }
155
+
156
+ .progress {
157
+ overflow: hidden;
158
+ }
159
+
160
+ // =============================================================================
161
+ // Segmented Progress Bar — Step progress indicator (Type=Segmented)
162
+ // Aligned with Figma matcha/progress-bar: Type=Segmented, Size=SM|MD
163
+ // =============================================================================
164
+
165
+ matcha-progress-bar[type="segmented"] {
166
+ .matcha-progress-bar {
167
+ flex-direction: row;
168
+ gap: var(--matcha-space-050, 4px);
169
+ }
170
+
171
+ .progress-segment {
172
+ flex: 1;
173
+ border-radius: var(--matcha-radius-sm, 2px);
174
+ }
175
+
176
+ // ── Sizes ──
177
+ &[size="sm"] .progress-segment,
178
+ &[size="small"] .progress-segment {
179
+ height: var(--matcha-space-200, 16px);
180
+ border-radius: var(--matcha-radius-sm, 2px);
181
+ }
182
+
183
+ &[size="md"] .progress-segment,
184
+ &[size="medium"] .progress-segment {
185
+ height: var(--matcha-space-400, 32px);
186
+ border-radius: var(--matcha-radius-md, 4px);
187
+ }
188
+
189
+ &:not([size]) .progress-segment {
190
+ height: var(--matcha-space-100, 8px);
191
+ border-radius: var(--matcha-radius-sm, 2px);
192
+ }
193
+
194
+ // Hide standard progress bar elements
195
+ .progress { display: none; }
196
+ .progress-info-card { display: none; }
197
+ }
198
+
199
+ @mixin matcha-progress-bar-segmented-theme($theme) {
200
+ matcha-progress-bar[type="segmented"] {
201
+ .progress-segment {
202
+ background: var(--matcha-color-disabled-bg, #{getDisabled($theme)});
203
+
204
+ &.segment-filled {
205
+ background: var(--matcha-color-accent, #{getAccent($theme)});
206
+ }
207
+ }
208
+ }
209
+ }