@inchurch/matcha-theme 21.4.0 → 22.1.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 (94) hide show
  1. package/abstracts/_colors.scss +236 -236
  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 +219 -219
  6. package/abstracts/_typography.scss +128 -128
  7. package/base/_reset.scss +446 -445
  8. package/components/app-page-header.scss +260 -260
  9. package/components/matcha-accordion.scss +293 -293
  10. package/components/matcha-audio-player.scss +31 -31
  11. package/components/matcha-autocomplete.scss +145 -145
  12. package/components/matcha-avatar.scss +440 -301
  13. package/components/matcha-badge.scss +120 -120
  14. package/components/matcha-breadcrumb.scss +231 -231
  15. package/components/matcha-button-toggle.scss +383 -384
  16. package/components/matcha-buttons.scss +913 -913
  17. package/components/matcha-calendar.scss +218 -218
  18. package/components/matcha-cards.scss +230 -230
  19. package/components/matcha-chart-card.scss +53 -53
  20. package/components/matcha-checkbox.scss +255 -255
  21. package/components/matcha-chip.scss +292 -292
  22. package/components/matcha-color-pick.scss +34 -34
  23. package/components/matcha-command-palette.scss +316 -316
  24. package/components/matcha-contact.scss +35 -0
  25. package/components/matcha-crop.scss +406 -406
  26. package/components/matcha-date.scss +81 -81
  27. package/components/matcha-divider.scss +100 -100
  28. package/components/matcha-draggable.scss +23 -23
  29. package/components/matcha-drawer.scss +376 -376
  30. package/components/matcha-drop-image.scss +14 -14
  31. package/components/matcha-drop-list.scss +430 -430
  32. package/components/matcha-emoji.scss +69 -69
  33. package/components/matcha-empty-state.scss +230 -230
  34. package/components/matcha-file-uploader.scss +471 -471
  35. package/components/matcha-flag.scss +103 -103
  36. package/components/matcha-footer.scss +91 -91
  37. package/components/matcha-form-field.scss +606 -606
  38. package/components/matcha-form-section.scss +100 -100
  39. package/components/matcha-header.scss +135 -135
  40. package/components/matcha-highlight.scss +164 -164
  41. package/components/matcha-hint-text.scss +90 -90
  42. package/components/matcha-horizontal-tree.scss +316 -316
  43. package/components/matcha-icon.scss +98 -98
  44. package/components/matcha-image.scss +61 -61
  45. package/components/matcha-list.scss +211 -211
  46. package/components/matcha-menu.scss +99 -99
  47. package/components/matcha-modal.scss +210 -210
  48. package/components/matcha-nav.scss +581 -581
  49. package/components/matcha-notification.scss +413 -413
  50. package/components/matcha-option.scss +170 -170
  51. package/components/matcha-page-builder.scss +4196 -4196
  52. package/components/matcha-paginator.scss +689 -689
  53. package/components/matcha-panel.scss +194 -194
  54. package/components/matcha-profile-card.scss +50 -50
  55. package/components/matcha-progress-bar.scss +313 -313
  56. package/components/matcha-radio.scss +320 -320
  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 +667 -667
  63. package/components/matcha-skeleton.scss +155 -155
  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-status-pill.scss +38 -18
  70. package/components/matcha-stepper.scss +376 -376
  71. package/components/matcha-table-cell.scss +49 -41
  72. package/components/matcha-table.scss +579 -579
  73. package/components/matcha-tabs.scss +600 -600
  74. package/components/matcha-text-editor.scss +105 -105
  75. package/components/matcha-time.scss +33 -33
  76. package/components/matcha-timepicker.scss +13 -13
  77. package/components/matcha-toolbar.scss +359 -359
  78. package/components/matcha-tooltip.scss +224 -224
  79. package/components/matcha-tree-view.scss +257 -257
  80. package/layout/matcha-page-layout.scss +778 -778
  81. package/main.scss +331 -329
  82. package/package.json +1 -1
  83. package/tokens/_animations-tokens.scss +37 -37
  84. package/tokens/_breakpoints-tokens.scss +35 -35
  85. package/tokens/_color-tokens.scss +274 -274
  86. package/tokens/_elevation-tokens.scss +33 -33
  87. package/tokens/_emit-tokens.scss +324 -324
  88. package/tokens/_material-palette.scss +1149 -1149
  89. package/tokens/_primitives.scss +98 -98
  90. package/tokens/_semantic-aliases.scss +120 -120
  91. package/tokens/_spacing-tokens.scss +94 -94
  92. package/tokens/_static-tokens.scss +137 -137
  93. package/tokens/_typography-tokens.scss +65 -65
  94. package/vendors/charts.scss +90 -90
@@ -1,285 +1,285 @@
1
- // =============================================================================
2
- // matcha-slider.scss — Slider (single + range) — 1:1 com Figma DSV3
3
- // =============================================================================
4
- // Spec canônica matcha/slider (DSV3):
5
- // • Track 4px · radius 2 · color disabled-bg (rail) / accent (selection)
6
- // • Thumb 24×24 · radius pill · border 3px surface-bg · shadow level-1
7
- // • State Layer halo 40×40 (::before) opacity 0 → 0.12 hover → 1 active
8
- // • Active grow: thumb 24 → 26 + shadow level-2 (heavier)
9
- // • Focus ring: outline 2px primary + offset 2px (geometry 32×32 vs thumb)
10
- // • Pointer label (pill): 26×18 padding 2/6 · radius md · bg surface-card · caption text
11
- // • Floor/Ceil labels: caption · color text/secondary · disabled-fg quando off
12
- // • 6 cores semânticas DSV3: accent · primary · success · warn · danger · info
13
- // =============================================================================
14
-
15
- @mixin matcha-slider-theme($theme) {
16
- // 6 cores semânticas DSV3 (sem Material 1 legacy).
17
- $semantic-colors: (
18
- accent: getAccent,
19
- primary: getPrimary,
20
- success: getSuccess,
21
- warn: getWarn,
22
- danger: getDanger,
23
- info: getInfo,
24
- );
25
-
26
- .matcha-slider {
27
- // Default (sem data-color) cai em accent
28
- --matcha-slider-fill: var(--matcha-color-accent);
29
-
30
- // Bind por data-color → CSS var pra cores serem trocáveis sem repetir regras
31
- @each $name, $fn in $semantic-colors {
32
- &[data-color="#{$name}"] {
33
- --matcha-slider-fill: var(--matcha-color-#{$name});
34
- }
35
- }
36
-
37
- .selection-bar {
38
- background-color: var(--matcha-slider-fill);
39
- }
40
-
41
- .pointer {
42
- background-color: var(--matcha-slider-fill);
43
- }
44
-
45
- // ── Disabled — sobrescreve fill, escurece labels ──
46
- &.disabled {
47
- .selection-bar { background-color: var(--matcha-color-disabled-bg); }
48
- .pointer { background-color: var(--matcha-color-disabled-bg); }
49
-
50
- .pointer-label,
51
- .floor-label,
52
- .ceil-label {
53
- color: var(--matcha-color-disabled-fg);
54
- }
55
-
56
- // Pill do label fica neutro no disabled (não destaca valor que não pode mudar)
57
- .pointer-label {
58
- background-color: var(--matcha-color-disabled-bg);
59
- }
60
- }
61
- }
62
- }
63
-
64
- // =============================================================================
65
- // Structural — geometria + estados (independente de cor)
66
- // =============================================================================
67
-
68
- .matcha-slider {
69
- position: relative;
70
- width: 100%;
71
- padding: var(--matcha-space-250, 20px) 0;
72
- user-select: none;
73
- background-color: transparent;
74
-
75
- // ── Track 4px ──
76
- .slider-track {
77
- position: relative;
78
- height: var(--matcha-slider-track-height, 4px);
79
- border-radius: var(--matcha-radius-sm, 2px);
80
- background-color: var(--matcha-color-surface-border, rgba(255, 255, 255, 0.12));
81
- cursor: pointer;
82
- margin: 0 10px;
83
- }
84
-
85
- // ── Selection (parte preenchida) ──
86
- // Height padrão = 4px (100% do track). Cresce pra 6px durante drag pra sinalizar
87
- // "estou mexendo nesta faixa" sem precisar destacar ambos os thumbs (ver dragging).
88
- .selection-bar {
89
- position: absolute;
90
- top: 0;
91
- height: 100%;
92
- border-radius: var(--matcha-radius-sm, 2px);
93
- transition:
94
- width var(--matcha-duration-instant, 80ms) ease,
95
- height var(--matcha-duration-fast, 200ms) ease,
96
- top var(--matcha-duration-fast, 200ms) ease;
97
- }
98
-
99
- // ── Thumb 24×24 (Figma matcha/slider) ──
100
- // border 3px solid surface-bg (Figma #111318 dark = surface-bg dark)
101
- // shadow nível 1 padrão; nível 2 quando dragging (active)
102
- .pointer {
103
- position: absolute;
104
- top: 50%;
105
- transform: translate(-50%, -50%);
106
- width: var(--matcha-slider-pointer-size, 24px);
107
- height: var(--matcha-slider-pointer-size, 24px);
108
- border-radius: var(--matcha-radius-pill, 9999px);
109
- border: 3px solid var(--matcha-color-surface-bg, #111318);
110
- box-shadow: var(--matcha-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.1));
111
- cursor: grab;
112
- transition:
113
- width var(--matcha-duration-instant, 80ms) ease,
114
- height var(--matcha-duration-instant, 80ms) ease,
115
- box-shadow var(--matcha-duration-instant, 80ms) linear;
116
-
117
- // ── State layer halo 40×40 (Figma "Thumb SL") ──
118
- // ::before evita mexer no HTML; centralizado no thumb via translate.
119
- // opacity 0 default → 0.12 hover → 1 active (drag)
120
- &::before {
121
- content: '';
122
- position: absolute;
123
- top: 50%;
124
- left: 50%;
125
- width: 40px;
126
- height: 40px;
127
- border-radius: 50%;
128
- background-color: var(--matcha-slider-fill, var(--matcha-color-accent));
129
- transform: translate(-50%, -50%);
130
- opacity: 0;
131
- pointer-events: none;
132
- transition: opacity var(--matcha-duration-instant, 80ms) ease;
133
- z-index: -1; // atrás do thumb pra não cobrir o ícone/cor sólida
134
- }
135
-
136
- &:hover::before {
137
- opacity: 0.12;
138
- }
139
- }
140
-
141
- // ── Pointer label (value pill — Figma 26×18, pad 2/6, radius 4) ──
142
- // Posição acima do thumb (top -24px), background surface-card pra contraste
143
- // sobre a linha do track. Anima junto com o thumb (slide horizontal).
144
- .pointer-label {
145
- position: absolute;
146
- top: -24px;
147
- left: 50%;
148
- transform: translateX(-50%);
149
- padding: var(--matcha-space-025, 2px) var(--matcha-space-075, 6px);
150
- background-color: var(--matcha-color-surface-card, #1c1f26);
151
- border-radius: var(--matcha-radius-md, 4px);
152
- font-family: var(--matcha-font-family);
153
- font-size: var(--matcha-text-p-tiny, 11px);
154
- font-weight: var(--matcha-weight-regular, 400);
155
- line-height: var(--matcha-leading-p-tiny, 14px);
156
- letter-spacing: 0.3px;
157
- color: var(--matcha-color-text-primary, #e8eaed);
158
- white-space: nowrap;
159
- pointer-events: none;
160
- }
161
-
162
- // ── Floor / Ceil labels (escala visível abaixo do track) ──
163
- // Figma: padding 0 16px, color text-secondary, caption typography
164
- .limit-labels {
165
- display: flex;
166
- justify-content: space-between;
167
- margin: var(--matcha-space-100, 8px) 10px 0;
168
- top: -18px;
169
- position: relative;
170
- font-family: var(--matcha-font-family);
171
- font-size: var(--matcha-text-p-tiny, 11px);
172
- font-weight: var(--matcha-weight-regular, 400);
173
- line-height: var(--matcha-leading-p-tiny, 14px);
174
- letter-spacing: 0.3px;
175
- color: var(--matcha-color-text-secondary, rgba(255, 255, 255, 0.7));
176
- }
177
-
178
- // ── Disabled — opacity Figma é 0.6, mas usamos token DSV3 (0.38) ──
179
- // que respeita melhor WCAG pra texto sobre fundo escuro.
180
- &.disabled {
181
- opacity: var(--matcha-opacity-disabled, 0.38);
182
- pointer-events: none;
183
- cursor: default;
184
-
185
- .slider-track,
186
- .pointer { cursor: default; }
187
- }
188
-
189
- // ── Range mode — z-index pra low ficar acima do high ──
190
- &.range {
191
- .pointer.low-pointer { z-index: 2; }
192
- .pointer.high-pointer { z-index: 1; }
193
- }
194
-
195
- // ── Active (dragging) — Figma "Type=Active" cresce thumb 24→26 ──
196
- // + state layer 100% sólido + shadow elevation-2 (mais pesada)
197
- // Selection bar cresce 4px → 6px (top: -1px pra manter centerline) sinalizando
198
- // "esta faixa está sendo modificada" — reforça o feedback do range sem
199
- // precisar destacar o thumb não-arrastado.
200
- &.dragging {
201
- .pointer {
202
- cursor: grabbing !important;
203
- width: 26px;
204
- height: 26px;
205
- box-shadow: var(--matcha-shadow-2, 0 4px 12px rgba(0, 0, 0, 0.2));
206
-
207
- &::before {
208
- opacity: 1;
209
- }
210
- }
211
-
212
- .selection-bar {
213
- // width muda em tempo real (segue o cursor); height/top animam suave
214
- transition:
215
- width 0s,
216
- height var(--matcha-duration-fast, 200ms) ease,
217
- top var(--matcha-duration-fast, 200ms) ease;
218
- height: 6px;
219
- top: -1px;
220
- }
221
- }
222
-
223
- // ── Focus ring — Figma usa primary blue (#64B5F6 dark) ──
224
- // outline + offset replica geometry 32×32 ring (24 thumb + 4*2 outline+offset)
225
- .pointer:focus-visible {
226
- outline: 2px solid var(--matcha-color-primary, #64b5f6);
227
- outline-offset: 2px;
228
- }
229
-
230
- // ── High contrast (a11y) ──
231
- @media (prefers-contrast: high) {
232
- .pointer { border-width: 4px; }
233
- .selection-bar { border: var(--matcha-border-hairline, 1px) solid currentColor; }
234
- }
235
-
236
- // ── Reduced motion ──
237
- @media (prefers-reduced-motion: reduce) {
238
- .pointer,
239
- .pointer::before,
240
- .selection-bar {
241
- transition: none;
242
- }
243
- }
244
- }
245
-
246
- // ── Forced colors ──
247
- @media (forced-colors: active) {
248
- matcha-slider {
249
- .slider-track,
250
- .full-bar {
251
- background: Canvas !important;
252
- border: 1px solid CanvasText !important;
253
- }
254
-
255
- .selection-bar {
256
- background: Highlight !important;
257
- }
258
-
259
- .pointer {
260
- background: ButtonFace !important;
261
- border: 2px solid CanvasText !important;
262
-
263
- &:focus-visible,
264
- &.is-active {
265
- outline: 2px solid CanvasText !important;
266
- outline-offset: 2px;
267
- }
268
- }
269
-
270
- &[disabled],
271
- &.is-disabled {
272
- opacity: 0.5;
273
- .pointer { border-color: GrayText !important; }
274
- }
275
- }
276
- }
277
-
278
- // ── Print ──
279
- // Slider mostra valor estático em papel.
280
- @media print {
281
- matcha-slider {
282
- .pointer { background: currentColor !important; }
283
- .selection-bar { background: currentColor !important; }
284
- }
285
- }
1
+ // =============================================================================
2
+ // matcha-slider.scss — Slider (single + range) — 1:1 com Figma DSV3
3
+ // =============================================================================
4
+ // Spec canônica matcha/slider (DSV3):
5
+ // • Track 4px · radius 2 · color disabled-bg (rail) / accent (selection)
6
+ // • Thumb 24×24 · radius pill · border 3px surface-bg · shadow level-1
7
+ // • State Layer halo 40×40 (::before) opacity 0 → 0.12 hover → 1 active
8
+ // • Active grow: thumb 24 → 26 + shadow level-2 (heavier)
9
+ // • Focus ring: outline 2px primary + offset 2px (geometry 32×32 vs thumb)
10
+ // • Pointer label (pill): 26×18 padding 2/6 · radius md · bg surface-card · caption text
11
+ // • Floor/Ceil labels: caption · color text/secondary · disabled-fg quando off
12
+ // • 6 cores semânticas DSV3: accent · primary · success · warn · danger · info
13
+ // =============================================================================
14
+
15
+ @mixin matcha-slider-theme($theme) {
16
+ // 6 cores semânticas DSV3 (sem Material 1 legacy).
17
+ $semantic-colors: (
18
+ accent: getAccent,
19
+ primary: getPrimary,
20
+ success: getSuccess,
21
+ warn: getWarn,
22
+ danger: getDanger,
23
+ info: getInfo,
24
+ );
25
+
26
+ .matcha-slider {
27
+ // Default (sem data-color) cai em accent
28
+ --matcha-slider-fill: var(--matcha-color-accent);
29
+
30
+ // Bind por data-color → CSS var pra cores serem trocáveis sem repetir regras
31
+ @each $name, $fn in $semantic-colors {
32
+ &[data-color="#{$name}"] {
33
+ --matcha-slider-fill: var(--matcha-color-#{$name});
34
+ }
35
+ }
36
+
37
+ .selection-bar {
38
+ background-color: var(--matcha-slider-fill);
39
+ }
40
+
41
+ .pointer {
42
+ background-color: var(--matcha-slider-fill);
43
+ }
44
+
45
+ // ── Disabled — sobrescreve fill, escurece labels ──
46
+ &.disabled {
47
+ .selection-bar { background-color: var(--matcha-color-disabled-bg); }
48
+ .pointer { background-color: var(--matcha-color-disabled-bg); }
49
+
50
+ .pointer-label,
51
+ .floor-label,
52
+ .ceil-label {
53
+ color: var(--matcha-color-disabled-fg);
54
+ }
55
+
56
+ // Pill do label fica neutro no disabled (não destaca valor que não pode mudar)
57
+ .pointer-label {
58
+ background-color: var(--matcha-color-disabled-bg);
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ // =============================================================================
65
+ // Structural — geometria + estados (independente de cor)
66
+ // =============================================================================
67
+
68
+ .matcha-slider {
69
+ position: relative;
70
+ width: 100%;
71
+ padding: var(--matcha-space-250, 20px) 0;
72
+ user-select: none;
73
+ background-color: transparent;
74
+
75
+ // ── Track 4px ──
76
+ .slider-track {
77
+ position: relative;
78
+ height: var(--matcha-slider-track-height, 4px);
79
+ border-radius: var(--matcha-radius-sm, 2px);
80
+ background-color: var(--matcha-color-surface-border, rgba(255, 255, 255, 0.12));
81
+ cursor: pointer;
82
+ margin: 0 10px;
83
+ }
84
+
85
+ // ── Selection (parte preenchida) ──
86
+ // Height padrão = 4px (100% do track). Cresce pra 6px durante drag pra sinalizar
87
+ // "estou mexendo nesta faixa" sem precisar destacar ambos os thumbs (ver dragging).
88
+ .selection-bar {
89
+ position: absolute;
90
+ top: 0;
91
+ height: 100%;
92
+ border-radius: var(--matcha-radius-sm, 2px);
93
+ transition:
94
+ width var(--matcha-duration-instant, 80ms) ease,
95
+ height var(--matcha-duration-fast, 200ms) ease,
96
+ top var(--matcha-duration-fast, 200ms) ease;
97
+ }
98
+
99
+ // ── Thumb 24×24 (Figma matcha/slider) ──
100
+ // border 3px solid surface-bg (Figma #111318 dark = surface-bg dark)
101
+ // shadow nível 1 padrão; nível 2 quando dragging (active)
102
+ .pointer {
103
+ position: absolute;
104
+ top: 50%;
105
+ transform: translate(-50%, -50%);
106
+ width: var(--matcha-slider-pointer-size, 24px);
107
+ height: var(--matcha-slider-pointer-size, 24px);
108
+ border-radius: var(--matcha-radius-pill, 9999px);
109
+ border: 3px solid var(--matcha-color-surface-bg, #111318);
110
+ box-shadow: var(--matcha-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.1));
111
+ cursor: grab;
112
+ transition:
113
+ width var(--matcha-duration-instant, 80ms) ease,
114
+ height var(--matcha-duration-instant, 80ms) ease,
115
+ box-shadow var(--matcha-duration-instant, 80ms) linear;
116
+
117
+ // ── State layer halo 40×40 (Figma "Thumb SL") ──
118
+ // ::before evita mexer no HTML; centralizado no thumb via translate.
119
+ // opacity 0 default → 0.12 hover → 1 active (drag)
120
+ &::before {
121
+ content: '';
122
+ position: absolute;
123
+ top: 50%;
124
+ left: 50%;
125
+ width: 40px;
126
+ height: 40px;
127
+ border-radius: 50%;
128
+ background-color: var(--matcha-slider-fill, var(--matcha-color-accent));
129
+ transform: translate(-50%, -50%);
130
+ opacity: 0;
131
+ pointer-events: none;
132
+ transition: opacity var(--matcha-duration-instant, 80ms) ease;
133
+ z-index: -1; // atrás do thumb pra não cobrir o ícone/cor sólida
134
+ }
135
+
136
+ &:hover::before {
137
+ opacity: 0.12;
138
+ }
139
+ }
140
+
141
+ // ── Pointer label (value pill — Figma 26×18, pad 2/6, radius 4) ──
142
+ // Posição acima do thumb (top -24px), background surface-card pra contraste
143
+ // sobre a linha do track. Anima junto com o thumb (slide horizontal).
144
+ .pointer-label {
145
+ position: absolute;
146
+ top: -24px;
147
+ left: 50%;
148
+ transform: translateX(-50%);
149
+ padding: var(--matcha-space-025, 2px) var(--matcha-space-075, 6px);
150
+ background-color: var(--matcha-color-surface-card, #1c1f26);
151
+ border-radius: var(--matcha-radius-md, 4px);
152
+ font-family: var(--matcha-font-family);
153
+ font-size: var(--matcha-text-p-tiny, 11px);
154
+ font-weight: var(--matcha-weight-regular, 400);
155
+ line-height: var(--matcha-leading-p-tiny, 14px);
156
+ letter-spacing: 0.3px;
157
+ color: var(--matcha-color-text-primary, #e8eaed);
158
+ white-space: nowrap;
159
+ pointer-events: none;
160
+ }
161
+
162
+ // ── Floor / Ceil labels (escala visível abaixo do track) ──
163
+ // Figma: padding 0 16px, color text-secondary, caption typography
164
+ .limit-labels {
165
+ display: flex;
166
+ justify-content: space-between;
167
+ margin: var(--matcha-space-100, 8px) 10px 0;
168
+ top: -18px;
169
+ position: relative;
170
+ font-family: var(--matcha-font-family);
171
+ font-size: var(--matcha-text-p-tiny, 11px);
172
+ font-weight: var(--matcha-weight-regular, 400);
173
+ line-height: var(--matcha-leading-p-tiny, 14px);
174
+ letter-spacing: 0.3px;
175
+ color: var(--matcha-color-text-secondary, rgba(255, 255, 255, 0.7));
176
+ }
177
+
178
+ // ── Disabled — opacity Figma é 0.6, mas usamos token DSV3 (0.38) ──
179
+ // que respeita melhor WCAG pra texto sobre fundo escuro.
180
+ &.disabled {
181
+ opacity: var(--matcha-opacity-disabled, 0.38);
182
+ pointer-events: none;
183
+ cursor: default;
184
+
185
+ .slider-track,
186
+ .pointer { cursor: default; }
187
+ }
188
+
189
+ // ── Range mode — z-index pra low ficar acima do high ──
190
+ &.range {
191
+ .pointer.low-pointer { z-index: 2; }
192
+ .pointer.high-pointer { z-index: 1; }
193
+ }
194
+
195
+ // ── Active (dragging) — Figma "Type=Active" cresce thumb 24→26 ──
196
+ // + state layer 100% sólido + shadow elevation-2 (mais pesada)
197
+ // Selection bar cresce 4px → 6px (top: -1px pra manter centerline) sinalizando
198
+ // "esta faixa está sendo modificada" — reforça o feedback do range sem
199
+ // precisar destacar o thumb não-arrastado.
200
+ &.dragging {
201
+ .pointer {
202
+ cursor: grabbing !important;
203
+ width: 26px;
204
+ height: 26px;
205
+ box-shadow: var(--matcha-shadow-2, 0 4px 12px rgba(0, 0, 0, 0.2));
206
+
207
+ &::before {
208
+ opacity: 1;
209
+ }
210
+ }
211
+
212
+ .selection-bar {
213
+ // width muda em tempo real (segue o cursor); height/top animam suave
214
+ transition:
215
+ width 0s,
216
+ height var(--matcha-duration-fast, 200ms) ease,
217
+ top var(--matcha-duration-fast, 200ms) ease;
218
+ height: 6px;
219
+ top: -1px;
220
+ }
221
+ }
222
+
223
+ // ── Focus ring — Figma usa primary blue (#64B5F6 dark) ──
224
+ // outline + offset replica geometry 32×32 ring (24 thumb + 4*2 outline+offset)
225
+ .pointer:focus-visible {
226
+ outline: 2px solid var(--matcha-color-primary, #64b5f6);
227
+ outline-offset: 2px;
228
+ }
229
+
230
+ // ── High contrast (a11y) ──
231
+ @media (prefers-contrast: high) {
232
+ .pointer { border-width: 4px; }
233
+ .selection-bar { border: var(--matcha-border-hairline, 1px) solid currentColor; }
234
+ }
235
+
236
+ // ── Reduced motion ──
237
+ @media (prefers-reduced-motion: reduce) {
238
+ .pointer,
239
+ .pointer::before,
240
+ .selection-bar {
241
+ transition: none;
242
+ }
243
+ }
244
+ }
245
+
246
+ // ── Forced colors ──
247
+ @media (forced-colors: active) {
248
+ matcha-slider {
249
+ .slider-track,
250
+ .full-bar {
251
+ background: Canvas !important;
252
+ border: 1px solid CanvasText !important;
253
+ }
254
+
255
+ .selection-bar {
256
+ background: Highlight !important;
257
+ }
258
+
259
+ .pointer {
260
+ background: ButtonFace !important;
261
+ border: 2px solid CanvasText !important;
262
+
263
+ &:focus-visible,
264
+ &.is-active {
265
+ outline: 2px solid CanvasText !important;
266
+ outline-offset: 2px;
267
+ }
268
+ }
269
+
270
+ &[disabled],
271
+ &.is-disabled {
272
+ opacity: 0.5;
273
+ .pointer { border-color: GrayText !important; }
274
+ }
275
+ }
276
+ }
277
+
278
+ // ── Print ──
279
+ // Slider mostra valor estático em papel.
280
+ @media print {
281
+ matcha-slider {
282
+ .pointer { background: currentColor !important; }
283
+ .selection-bar { background: currentColor !important; }
284
+ }
285
+ }