@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,384 +1,383 @@
1
- @use "matcha-buttons" as *;
2
- @mixin _colorize-inactive-type-solid-button-toggle-item($theme, $color-functions) {
3
-
4
- &:not([inactivetype]),
5
- &[inactivetype="solid"] {
6
- @each $colorName in $color-functions {
7
- &[inactivecolor="#{'' + $colorName}"] {
8
- .button-group {
9
-
10
- button[matcha-button],
11
- a[matcha-button] {
12
- &:not([active]) {
13
- background: var(--matcha-color-#{$colorName});
14
- color: var(--matcha-color-#{$colorName}-contrast);
15
- box-shadow: 0 0 0 0px inset;
16
-
17
- .ripple {
18
- background: var(--matcha-color-#{$colorName}-contrast-alpha); // ok: legacy ripple color token
19
- }
20
- }
21
- }
22
- }
23
- }
24
- }
25
-
26
- &[disabled],
27
- &[disabled]:not([disabled="false"]),
28
- &[disabled="true"] {
29
- .button-group {
30
-
31
- button[matcha-button],
32
- a[matcha-button] {
33
- &:not([active]) {
34
- @include disabled-solid-button($theme);
35
- }
36
- }
37
- }
38
- }
39
- }
40
- }
41
-
42
- @mixin _colorize-inactive-type-basic-button-toggle-item($theme, $color-functions) {
43
- &[inactivetype="basic"] {
44
- @each $colorName in $color-functions {
45
- &[inactivecolor="#{'' + $colorName}"] {
46
- .button-group {
47
-
48
- button[matcha-button],
49
- a[matcha-button] {
50
- &:not([active]) {
51
- background: var(--matcha-color-surface);
52
- color: var(--matcha-color-#{$colorName});
53
- box-shadow: 0 0 0 0px inset;
54
-
55
- .ripple {
56
- background: var(--matcha-color-#{$colorName}-alpha); // ok: legacy ripple color token
57
- }
58
- }
59
- }
60
- }
61
- }
62
- }
63
-
64
- &[disabled],
65
- &[disabled]:not([disabled="false"]),
66
- &[disabled="true"] {
67
- .button-group {
68
-
69
- button[matcha-button],
70
- a[matcha-button] {
71
- &:not([active]) {
72
- @include disabled-basic-button($theme);
73
- }
74
- }
75
- }
76
- }
77
- }
78
- }
79
-
80
- @mixin _colorize-inactive-type-outline-button-toggle-item($theme, $color-functions) {
81
- &[inactivetype="outline"] {
82
-
83
- //disabled false
84
- &:not([disabled="true"]) {
85
- @each $colorName in $color-functions {
86
- &[inactivecolor="#{'' + $colorName}"] {
87
- .button-group {
88
-
89
- button[matcha-button],
90
- a[matcha-button] {
91
-
92
- //botão não ativo
93
- &:not([active]) {
94
- color: var(--matcha-color-#{$colorName});
95
- background: transparent;
96
- box-shadow: 0 0 0 2px var(--matcha-color-#{$colorName}) inset;
97
-
98
- .ripple {
99
- background: var(--matcha-color-#{$colorName}-alpha); // ok: legacy ripple color token
100
- }
101
- }
102
- }
103
- }
104
- }
105
- }
106
- }
107
-
108
- //disabled true
109
- &[disabled],
110
- &[disabled]:not([disabled="false"]),
111
- &[disabled="true"] {
112
- .button-group {
113
-
114
- button[matcha-button],
115
- a[matcha-button] {
116
-
117
- //botão não ativo
118
- &:not([active]) {
119
- @include disabled-outline-button($theme);
120
- }
121
- }
122
- }
123
- }
124
- }
125
- }
126
-
127
- @mixin _colorize-inactive-type-alpha-button-toggle-item($theme, $color-functions) {
128
- &[inactivetype="alpha"] {
129
- @each $colorName in $color-functions {
130
- &[inactivecolor="#{'' + $colorName}"] {
131
- .button-group {
132
-
133
- button[matcha-button],
134
- a[matcha-button] {
135
- &:not([active]) {
136
- color: var(--matcha-color-#{$colorName});
137
- background: var(--matcha-color-#{$colorName}-alpha);
138
- box-shadow: 0 0 0 0px;
139
-
140
- .ripple {
141
- background: var(--matcha-color-#{$colorName}-contrast-alpha) // ok: legacy ripple color token
142
- }
143
- }
144
- }
145
- }
146
- }
147
- }
148
-
149
- &[disabled],
150
- &[disabled]:not([disabled="false"]),
151
- &[disabled="true"] {
152
- .button-group {
153
-
154
- button[matcha-button],
155
- a[matcha-button] {
156
-
157
- //botão não ativo
158
- &:not([active]) {
159
- @include disabled-alpha-button($theme);
160
- }
161
- }
162
- }
163
- }
164
- }
165
- }
166
-
167
- @mixin _colorize-inactive-type-link-button-toggle-item($theme, $color-functions) {
168
-
169
- &[inactivetype="link"] {
170
- @each $colorName in $color-functions {
171
- &[inactivecolor="#{'' + $colorName}"] {
172
- .button-group {
173
-
174
- button[matcha-button],
175
- a[matcha-button] {
176
- &:not([active]) {
177
-
178
- background: transparent;
179
- color: var(--matcha-color-#{$colorName});
180
- box-shadow: 0 0 0 0px;
181
-
182
- .ripple {
183
- background: var(--matcha-color-#{$colorName}-alpha); // ok: legacy ripple color token
184
- }
185
-
186
- }
187
- }
188
- }
189
- }
190
- }
191
-
192
- &[disabled],
193
- &[disabled]:not([disabled="false"]),
194
- &[disabled="true"] {
195
- .button-group {
196
-
197
- button[matcha-button],
198
- a[matcha-button] {
199
-
200
- //botão não ativo
201
- &:not([active]) {
202
- @include disabled-link-button($theme);
203
- }
204
- }
205
- }
206
- }
207
- }
208
- }
209
-
210
-
211
-
212
-
213
- @mixin matcha-button-toggle($theme) {
214
- // Nomes de cor (semânticas + paleta). Cores vêm de var(--matcha-color-*) — sem getRed/$theme.
215
- $color-functions: "red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue", "cyan", "teal",
216
- "green", "light-green", "lime", "yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey",
217
- "primary", "accent", "success", "warn", "danger", "info", "disabled";
218
-
219
- matcha-button-toggle {
220
- display: flex;
221
- @include _colorize-inactive-type-solid-button-toggle-item($theme, $color-functions);
222
- @include _colorize-inactive-type-basic-button-toggle-item($theme, $color-functions);
223
- @include _colorize-inactive-type-outline-button-toggle-item($theme, $color-functions);
224
- @include _colorize-inactive-type-alpha-button-toggle-item($theme, $color-functions);
225
- @include _colorize-inactive-type-link-button-toggle-item($theme, $color-functions);
226
-
227
- .button-group {
228
- button[matcha-button],
229
- a[matcha-button] {
230
- &:focus-visible:not([disabled]):not([disabled="true"]) {
231
- outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
232
- outline-offset: var(--matcha-state-focus-ring-offset, 2px);
233
- }
234
- }
235
- }
236
-
237
- &[disabled],
238
- &[disabled]:not([disabled="false"]),
239
- &[disabled="true"] {
240
- .button-group {
241
-
242
- button[matcha-button],
243
- a[matcha-button] {
244
- &[active] {
245
-
246
- &[outline],
247
- &[outline]:not([outline="false"]),
248
- &[outline="true"] {
249
- @include disabled-outline-button($theme);
250
- }
251
-
252
- &[basic],
253
- &[basic]:not([basic="false"]),
254
- &[basic="true"] {
255
- @include disabled-basic-button($theme);
256
- }
257
-
258
- &[alpha],
259
- &[alpha]:not([alpha="false"]),
260
- &[alpha="true"] {
261
- @include disabled-alpha-button($theme);
262
- }
263
-
264
- &[link],
265
- &[link]:not([link="false"]),
266
- &[link="true"] {
267
- @include disabled-link-button($theme);
268
- }
269
-
270
- @include disabled-solid-button($theme);
271
- }
272
- }
273
- }
274
-
275
- }
276
- }
277
- }
278
-
279
- // =============================================================================
280
- // A11y / modernity media queries
281
- // =============================================================================
282
-
283
- // Forced colors (Windows High Contrast) — borders/bg podem sumir,
284
- // SelectedItem/CanvasText são tokens system sempre visíveis.
285
- @media (forced-colors: active) {
286
- matcha-button-toggle .button-group {
287
- button[matcha-button],
288
- a[matcha-button] {
289
- border: 1px solid CanvasText;
290
-
291
- &[active] {
292
- background: SelectedItem !important;
293
- color: SelectedItemText !important;
294
- border-color: SelectedItem;
295
- }
296
-
297
- &:focus-visible {
298
- outline: 2px solid CanvasText !important;
299
- outline-offset: 2px;
300
- }
301
- }
302
- }
303
- }
304
-
305
- // Reduced motion mata transitions de hover/active state.
306
- @media (prefers-reduced-motion: reduce) {
307
- matcha-button-toggle .button-group {
308
- button[matcha-button],
309
- a[matcha-button] {
310
- transition: none !important;
311
- animation: none !important;
312
- }
313
- }
314
- }
315
-
316
- // Print — controles de UI somem em impressão.
317
- @media print {
318
- matcha-button-toggle {
319
- display: none !important;
320
- }
321
- }
322
-
323
- // =============================================================================
324
- // Structural rules aligned with Figma matcha/button-toggle:
325
- // Gap=Segmented: buttons share borders (1px hairline between, 2px thin outside)
326
- // Gap=Separated: buttons stand apart with gap=space/200 and full radius-lg each
327
- // =============================================================================
328
- matcha-button-toggle {
329
- display: block;
330
- width: 100%;
331
-
332
- .button-group {
333
- display: flex;
334
- width: 100%;
335
- align-items: stretch;
336
-
337
- // Children flex-share — each button takes equal width across the row
338
- > button[matcha-button],
339
- > a[matcha-button] {
340
- flex: 1 1 0;
341
- min-width: 0;
342
- }
343
-
344
- // ── Separated (default: gap = space/200) ──────────────────────────
345
- // Each button keeps its own full radius and border-thin (2px).
346
- // gap already handled by flex gap via [gap] binding in TS.
347
-
348
- // ── Segmented (gap = 0): box-shadows dos outline overlappam ───────
349
- // matcha-button usa box-shadow inset (não border), então usamos
350
- // margin-left negativo pra sobrepor a borda do vizinho.
351
- &.gap-0 {
352
- gap: 0 !important;
353
-
354
- button[matcha-button],
355
- a[matcha-button] {
356
- position: relative;
357
- border-radius: 0;
358
-
359
- // First: radius só no lado esquerdo
360
- &:first-child {
361
- border-top-left-radius: var(--matcha-radius-lg, 8px);
362
- border-bottom-left-radius: var(--matcha-radius-lg, 8px);
363
- }
364
-
365
- // Last: radius só no lado direito
366
- &:last-child {
367
- border-top-right-radius: var(--matcha-radius-lg, 8px);
368
- border-bottom-right-radius: var(--matcha-radius-lg, 8px);
369
- }
370
-
371
- // Overlap de 2px com vizinho anterior pra fundir bordas
372
- &:not(:first-child) {
373
- margin-left: calc(-1 * var(--matcha-border-thin, 2px));
374
- }
375
-
376
- // Active (filled) fica no topo pra borda não ser recortada
377
- &[active]:not([active="false"]),
378
- &:not([outline]):not([basic]):not([ghost])[color] {
379
- z-index: 1;
380
- }
381
- }
382
- }
383
- }
384
- }
1
+ @use "matcha-buttons" as *;
2
+ @mixin _colorize-inactive-type-solid-button-toggle-item($theme, $color-functions) {
3
+
4
+ &:not([inactivetype]),
5
+ &[inactivetype="solid"] {
6
+ @each $colorName in $color-functions {
7
+ &[inactivecolor="#{'' + $colorName}"] {
8
+ .button-group {
9
+
10
+ button[matcha-button],
11
+ a[matcha-button] {
12
+ &:not([active]) {
13
+ background: var(--matcha-color-#{$colorName});
14
+ color: var(--matcha-color-#{$colorName}-contrast);
15
+ box-shadow: 0 0 0 0px inset;
16
+
17
+ .ripple {
18
+ background: var(--matcha-color-#{$colorName}-contrast-alpha); // ok: legacy ripple color token
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ &[disabled],
27
+ &[disabled]:not([disabled="false"]),
28
+ &[disabled="true"] {
29
+ .button-group {
30
+
31
+ button[matcha-button],
32
+ a[matcha-button] {
33
+ &:not([active]) {
34
+ @include disabled-solid-button($theme);
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+
42
+ @mixin _colorize-inactive-type-basic-button-toggle-item($theme, $color-functions) {
43
+ &[inactivetype="basic"] {
44
+ @each $colorName in $color-functions {
45
+ &[inactivecolor="#{'' + $colorName}"] {
46
+ .button-group {
47
+
48
+ button[matcha-button],
49
+ a[matcha-button] {
50
+ &:not([active]) {
51
+ background: var(--matcha-color-surface);
52
+ color: var(--matcha-color-#{$colorName});
53
+ box-shadow: 0 0 0 0px inset;
54
+
55
+ .ripple {
56
+ background: var(--matcha-color-#{$colorName}-alpha); // ok: legacy ripple color token
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ &[disabled],
65
+ &[disabled]:not([disabled="false"]),
66
+ &[disabled="true"] {
67
+ .button-group {
68
+
69
+ button[matcha-button],
70
+ a[matcha-button] {
71
+ &:not([active]) {
72
+ @include disabled-basic-button($theme);
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+
80
+ @mixin _colorize-inactive-type-outline-button-toggle-item($theme, $color-functions) {
81
+ &[inactivetype="outline"] {
82
+
83
+ //disabled false
84
+ &:not([disabled="true"]) {
85
+ @each $colorName in $color-functions {
86
+ &[inactivecolor="#{'' + $colorName}"] {
87
+ .button-group {
88
+
89
+ button[matcha-button],
90
+ a[matcha-button] {
91
+
92
+ //botão não ativo
93
+ &:not([active]) {
94
+ color: var(--matcha-color-#{$colorName});
95
+ background: transparent;
96
+ box-shadow: 0 0 0 2px var(--matcha-color-#{$colorName}) inset;
97
+
98
+ .ripple {
99
+ background: var(--matcha-color-#{$colorName}-alpha); // ok: legacy ripple color token
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+
108
+ //disabled true
109
+ &[disabled],
110
+ &[disabled]:not([disabled="false"]),
111
+ &[disabled="true"] {
112
+ .button-group {
113
+
114
+ button[matcha-button],
115
+ a[matcha-button] {
116
+
117
+ //botão não ativo
118
+ &:not([active]) {
119
+ @include disabled-outline-button($theme);
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+
127
+ @mixin _colorize-inactive-type-alpha-button-toggle-item($theme, $color-functions) {
128
+ &[inactivetype="alpha"] {
129
+ @each $colorName in $color-functions {
130
+ &[inactivecolor="#{'' + $colorName}"] {
131
+ .button-group {
132
+
133
+ button[matcha-button],
134
+ a[matcha-button] {
135
+ &:not([active]) {
136
+ color: var(--matcha-color-#{$colorName});
137
+ background: var(--matcha-color-#{$colorName}-alpha);
138
+ box-shadow: 0 0 0 0px;
139
+
140
+ .ripple {
141
+ background: var(--matcha-color-#{$colorName}-contrast-alpha) // ok: legacy ripple color token
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+
149
+ &[disabled],
150
+ &[disabled]:not([disabled="false"]),
151
+ &[disabled="true"] {
152
+ .button-group {
153
+
154
+ button[matcha-button],
155
+ a[matcha-button] {
156
+
157
+ //botão não ativo
158
+ &:not([active]) {
159
+ @include disabled-alpha-button($theme);
160
+ }
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
166
+
167
+ @mixin _colorize-inactive-type-link-button-toggle-item($theme, $color-functions) {
168
+
169
+ &[inactivetype="link"] {
170
+ @each $colorName in $color-functions {
171
+ &[inactivecolor="#{'' + $colorName}"] {
172
+ .button-group {
173
+
174
+ button[matcha-button],
175
+ a[matcha-button] {
176
+ &:not([active]) {
177
+
178
+ background: transparent;
179
+ color: var(--matcha-color-#{$colorName});
180
+ box-shadow: 0 0 0 0px;
181
+
182
+ .ripple {
183
+ background: var(--matcha-color-#{$colorName}-alpha); // ok: legacy ripple color token
184
+ }
185
+
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+
192
+ &[disabled],
193
+ &[disabled]:not([disabled="false"]),
194
+ &[disabled="true"] {
195
+ .button-group {
196
+
197
+ button[matcha-button],
198
+ a[matcha-button] {
199
+
200
+ //botão não ativo
201
+ &:not([active]) {
202
+ @include disabled-link-button($theme);
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }
209
+
210
+
211
+
212
+
213
+ @mixin matcha-button-toggle($theme) {
214
+ // Nomes de cor (semânticas + paleta). Cores vêm de var(--matcha-color-*) — sem getRed/$theme.
215
+ $color-functions: "red", "pink", "purple", "deep-purple", "indigo", "blue", "light-blue", "cyan", "teal",
216
+ "green", "light-green", "lime", "yellow", "amber", "orange", "deep-orange", "brown", "grey", "blue-grey",
217
+ "primary", "accent", "success", "warn", "danger", "info", "disabled";
218
+
219
+ matcha-button-toggle {
220
+ display: flex;
221
+ @include _colorize-inactive-type-solid-button-toggle-item($theme, $color-functions);
222
+ @include _colorize-inactive-type-basic-button-toggle-item($theme, $color-functions);
223
+ @include _colorize-inactive-type-outline-button-toggle-item($theme, $color-functions);
224
+ @include _colorize-inactive-type-alpha-button-toggle-item($theme, $color-functions);
225
+ @include _colorize-inactive-type-link-button-toggle-item($theme, $color-functions);
226
+
227
+ .button-group {
228
+ button[matcha-button],
229
+ a[matcha-button] {
230
+ &:focus-visible:not([disabled]):not([disabled="true"]) {
231
+ outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
232
+ outline-offset: var(--matcha-state-focus-ring-offset, 2px);
233
+ }
234
+ }
235
+ }
236
+
237
+ &[disabled],
238
+ &[disabled]:not([disabled="false"]),
239
+ &[disabled="true"] {
240
+ .button-group {
241
+
242
+ button[matcha-button],
243
+ a[matcha-button] {
244
+ &[active] {
245
+ @include disabled-solid-button($theme);
246
+
247
+ &[outline],
248
+ &[outline]:not([outline="false"]),
249
+ &[outline="true"] {
250
+ @include disabled-outline-button($theme);
251
+ }
252
+
253
+ &[basic],
254
+ &[basic]:not([basic="false"]),
255
+ &[basic="true"] {
256
+ @include disabled-basic-button($theme);
257
+ }
258
+
259
+ &[alpha],
260
+ &[alpha]:not([alpha="false"]),
261
+ &[alpha="true"] {
262
+ @include disabled-alpha-button($theme);
263
+ }
264
+
265
+ &[link],
266
+ &[link]:not([link="false"]),
267
+ &[link="true"] {
268
+ @include disabled-link-button($theme);
269
+ }
270
+ }
271
+ }
272
+ }
273
+
274
+ }
275
+ }
276
+ }
277
+
278
+ // =============================================================================
279
+ // A11y / modernity media queries
280
+ // =============================================================================
281
+
282
+ // Forced colors (Windows High Contrast) — borders/bg podem sumir,
283
+ // SelectedItem/CanvasText são tokens system sempre visíveis.
284
+ @media (forced-colors: active) {
285
+ matcha-button-toggle .button-group {
286
+ button[matcha-button],
287
+ a[matcha-button] {
288
+ border: 1px solid CanvasText;
289
+
290
+ &[active] {
291
+ background: SelectedItem !important;
292
+ color: SelectedItemText !important;
293
+ border-color: SelectedItem;
294
+ }
295
+
296
+ &:focus-visible {
297
+ outline: 2px solid CanvasText !important;
298
+ outline-offset: 2px;
299
+ }
300
+ }
301
+ }
302
+ }
303
+
304
+ // Reduced motion — mata transitions de hover/active state.
305
+ @media (prefers-reduced-motion: reduce) {
306
+ matcha-button-toggle .button-group {
307
+ button[matcha-button],
308
+ a[matcha-button] {
309
+ transition: none !important;
310
+ animation: none !important;
311
+ }
312
+ }
313
+ }
314
+
315
+ // Print — controles de UI somem em impressão.
316
+ @media print {
317
+ matcha-button-toggle {
318
+ display: none !important;
319
+ }
320
+ }
321
+
322
+ // =============================================================================
323
+ // Structural rules — aligned with Figma matcha/button-toggle:
324
+ // Gap=Segmented: buttons share borders (1px hairline between, 2px thin outside)
325
+ // Gap=Separated: buttons stand apart with gap=space/200 and full radius-lg each
326
+ // =============================================================================
327
+ matcha-button-toggle {
328
+ display: block;
329
+ width: 100%;
330
+
331
+ .button-group {
332
+ display: flex;
333
+ width: 100%;
334
+ align-items: stretch;
335
+
336
+ // Children flex-share — each button takes equal width across the row
337
+ > button[matcha-button],
338
+ > a[matcha-button] {
339
+ flex: 1 1 0;
340
+ min-width: 0;
341
+ }
342
+
343
+ // ── Separated (default: gap = space/200) ──────────────────────────
344
+ // Each button keeps its own full radius and border-thin (2px).
345
+ // gap already handled by flex gap via [gap] binding in TS.
346
+
347
+ // ── Segmented (gap = 0): box-shadows dos outline overlappam ───────
348
+ // matcha-button usa box-shadow inset (não border), então usamos
349
+ // margin-left negativo pra sobrepor a borda do vizinho.
350
+ &.gap-0 {
351
+ gap: 0 !important;
352
+
353
+ button[matcha-button],
354
+ a[matcha-button] {
355
+ position: relative;
356
+ border-radius: 0;
357
+
358
+ // First: radius só no lado esquerdo
359
+ &:first-child {
360
+ border-top-left-radius: var(--matcha-radius-lg, 8px);
361
+ border-bottom-left-radius: var(--matcha-radius-lg, 8px);
362
+ }
363
+
364
+ // Last: radius só no lado direito
365
+ &:last-child {
366
+ border-top-right-radius: var(--matcha-radius-lg, 8px);
367
+ border-bottom-right-radius: var(--matcha-radius-lg, 8px);
368
+ }
369
+
370
+ // Overlap de 2px com vizinho anterior pra fundir bordas
371
+ &:not(:first-child) {
372
+ margin-left: calc(-1 * var(--matcha-border-thin, 2px));
373
+ }
374
+
375
+ // Active (filled) fica no topo pra borda não ser recortada
376
+ &[active]:not([active="false"]),
377
+ &:not([outline]):not([basic]):not([ghost])[color] {
378
+ z-index: 1;
379
+ }
380
+ }
381
+ }
382
+ }
383
+ }