@inchurch/matcha-theme 20.0.11 → 20.277.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 (116) hide show
  1. package/abstracts/_colors.scss +404 -404
  2. package/abstracts/_elevation.scss +102 -102
  3. package/abstracts/_functions.scss +1186 -1212
  4. package/abstracts/_media-breakpoint.scss +23 -23
  5. package/abstracts/_theme-api.scss +230 -0
  6. package/abstracts/_typography.scss +127 -127
  7. package/base/_reset.scss +438 -438
  8. package/components/app-page-header.scss +259 -0
  9. package/components/matcha-accordion.scss +293 -157
  10. package/components/matcha-audio-player.scss +1 -2
  11. package/components/matcha-autocomplete.scss +10 -11
  12. package/components/matcha-avatar.scss +173 -33
  13. package/components/matcha-badge.scss +15 -15
  14. package/components/matcha-breadcrumb.scss +231 -126
  15. package/components/matcha-button-toggle.scss +46 -2
  16. package/components/matcha-buttons.scss +908 -784
  17. package/components/matcha-calendar.scss +99 -35
  18. package/components/matcha-cards.scss +58 -33
  19. package/components/matcha-chart-card.scss +5 -12
  20. package/components/matcha-checkbox.scss +191 -490
  21. package/components/matcha-chip.scss +297 -212
  22. package/components/matcha-color-pick.scss +1 -2
  23. package/components/matcha-command-palette.scss +290 -63
  24. package/components/matcha-crop.scss +406 -172
  25. package/components/matcha-date.scss +81 -81
  26. package/components/matcha-divider.scss +86 -31
  27. package/components/matcha-draggable.scss +4 -5
  28. package/components/matcha-drawer.scss +207 -66
  29. package/components/matcha-drop-image.scss +14 -0
  30. package/components/matcha-drop-list.scss +87 -47
  31. package/components/matcha-emoji.scss +2 -2
  32. package/components/matcha-empty-state.scss +195 -83
  33. package/components/matcha-file-uploader.scss +462 -0
  34. package/components/matcha-flag.scss +93 -52
  35. package/components/matcha-footer.scss +67 -164
  36. package/components/matcha-form-field.scss +55 -3
  37. package/components/matcha-form-section.scss +100 -101
  38. package/components/matcha-header.scss +134 -325
  39. package/components/matcha-highlight.scss +65 -197
  40. package/components/matcha-hint-text.scss +25 -4
  41. package/components/matcha-horizontal-tree.scss +316 -317
  42. package/components/matcha-icon.scss +37 -45
  43. package/components/matcha-image.scss +2 -3
  44. package/components/matcha-list.scss +14 -15
  45. package/components/matcha-menu.scss +15 -2
  46. package/components/matcha-modal.scss +59 -86
  47. package/components/matcha-nav.scss +362 -231
  48. package/components/matcha-notification.scss +412 -197
  49. package/components/matcha-option.scss +98 -23
  50. package/components/matcha-page-builder.scss +16 -16
  51. package/components/matcha-paginator.scss +688 -235
  52. package/components/matcha-panel.scss +42 -27
  53. package/components/matcha-profile-card.scss +50 -50
  54. package/components/matcha-progress-bar.scss +257 -153
  55. package/components/matcha-radio.scss +244 -452
  56. package/components/matcha-scrollbar.scss +1 -2
  57. package/components/matcha-scrollbox-shadow.scss +120 -122
  58. package/components/matcha-section.scss +5 -9
  59. package/components/matcha-select-multiple.scss +56 -0
  60. package/components/matcha-select.scss +10 -10
  61. package/components/matcha-skeleton.scss +24 -7
  62. package/components/matcha-slide-toggle.scss +80 -301
  63. package/components/matcha-slider.scss +174 -77
  64. package/components/matcha-snack-bar.scss +123 -131
  65. package/components/matcha-spin.scss +12 -103
  66. package/components/matcha-spinner.scss +76 -57
  67. package/components/matcha-status-pill.scss +82 -0
  68. package/components/matcha-stepper.scss +376 -177
  69. package/components/matcha-table.scss +568 -785
  70. package/components/matcha-tabs.scss +622 -469
  71. package/components/matcha-text-editor.scss +78 -78
  72. package/components/matcha-time.scss +2 -2
  73. package/components/matcha-toolbar.scss +359 -206
  74. package/components/matcha-tooltip.scss +158 -62
  75. package/components/matcha-tree-view.scss +189 -0
  76. package/fonts/manrope/manrope-latin-ext.woff2 +0 -0
  77. package/fonts/manrope/manrope-latin.woff2 +0 -0
  78. package/layout/matcha-page-layout.scss +4 -4
  79. package/main.scss +237 -265
  80. package/package.json +1 -1
  81. package/tokens/_animations-tokens.scss +37 -37
  82. package/tokens/_breakpoints-tokens.scss +35 -26
  83. package/tokens/_color-tokens.scss +1149 -1152
  84. package/tokens/_css-custom-properties.scss +704 -568
  85. package/tokens/_primitives.scss +82 -0
  86. package/tokens/_semantic-aliases.scss +120 -0
  87. package/tokens/_spacing-tokens.scss +94 -94
  88. package/vendors/angular-editor.scss +56 -56
  89. package/vendors/angular-material-fixes.scss +297 -297
  90. package/vendors/charts.scss +92 -92
  91. package/vendors/ng5-slider.scss +56 -56
  92. package/vendors/ngx-material-timepicker.scss +50 -50
  93. package/components/matcha-uploader.scss +0 -215
  94. package/fonts/CircularStd-Black.eot +0 -0
  95. package/fonts/CircularStd-Black.svg +0 -3426
  96. package/fonts/CircularStd-Black.ttf +0 -0
  97. package/fonts/CircularStd-Black.woff +0 -0
  98. package/fonts/CircularStd-Black.woff2 +0 -0
  99. package/fonts/CircularStd-Bold.eot +0 -0
  100. package/fonts/CircularStd-Bold.otf +0 -0
  101. package/fonts/CircularStd-Bold.svg +0 -13532
  102. package/fonts/CircularStd-Bold.ttf +0 -0
  103. package/fonts/CircularStd-Bold.woff +0 -0
  104. package/fonts/CircularStd-Bold.woff2 +0 -0
  105. package/fonts/CircularStd-Medium.eot +0 -0
  106. package/fonts/CircularStd-Medium.otf +0 -0
  107. package/fonts/CircularStd-Medium.svg +0 -13511
  108. package/fonts/CircularStd-Medium.ttf +0 -0
  109. package/fonts/CircularStd-Medium.woff +0 -0
  110. package/fonts/CircularStd-Medium.woff2 +0 -0
  111. package/fonts/CircularStd-Regular.eot +0 -0
  112. package/fonts/CircularStd-Regular.otf +0 -0
  113. package/fonts/CircularStd-Regular.svg +0 -2378
  114. package/fonts/CircularStd-Regular.ttf +0 -0
  115. package/fonts/CircularStd-Regular.woff +0 -0
  116. package/fonts/CircularStd-Regular.woff2 +0 -0
@@ -1,467 +1,99 @@
1
1
  // =============================================================================
2
- // matcha-checkbox.scss — Migração Fase 3.1
3
- //
4
- // Segue o mesmo padrão do matcha-radio.scss migrado.
5
- // Diferenças em relação ao radio:
6
- // - input:checked preenche background (não apenas border)
7
- // - estado :indeterminate adicional
8
- // - ::after no input é checkmark (borda rotacionada), não círculo
9
- // - .matcha-checkbox-container (análogo a .matcha-radio-container)
10
- //
11
- // Mudanças:
12
- // [3.1-A] State layer em .matcha-checkbox-container (replaced element pattern)
13
- // [3.1-B] background-color: rgba() removido; color: getXxx($theme) no container
14
- // [3.1-C] Ripple de paleta: // ok: ripple palette. Semântico (accent/primary/…): CSS var com fallback
15
- // [3.1-D] :focus-visible no mixin; :focus vazio removido
16
- // [3.1-E] Disabled: opacity:0.6 + cursor:not-allowed removidos; tokens semânticos
17
- // [3.1-F] transition: all → border-color específico
18
- // [3.1-G] @media (prefers-reduced-motion: reduce) adicionado
19
- // [3.1-H] :not([disabled]) via seletor de contexto do pai
2
+ // matcha-checkbox.scss — Figma DSV3 matcha/checkbox (628fe66922)
3
+ // Touch target 36×36 pill + SVG glyph 24×24 (off / checked / indeterminate).
4
+ // Input nativo sr-only mantém a11y; visual via SVG inline no template.
20
5
  // =============================================================================
21
6
 
22
7
  @mixin matcha-checkbox($theme) {
23
8
  matcha-checkbox {
24
-
25
- // ── Sem cor: usa accent ────────────────────────────────────────────
26
- &:not([color]) {
27
- .matcha-checkbox-container {
28
- color: var(--matcha-color-accent, #{getAccent($theme)}); // [3.1-A]
29
- }
30
-
31
- input[type="checkbox"] {
32
- border-color: var(--matcha-color-text-label, #{getBlueGrey($theme)});
33
-
34
- &:active {
35
- border-color: var(--matcha-color-accent, #{getAccent($theme)});
36
- }
37
-
38
- &:checked {
39
- background-color: var(--matcha-color-accent, #{getAccent($theme)});
40
- border-color: var(--matcha-color-accent, #{getAccent($theme)});
41
-
42
- &::after {
43
- border-color: getAccentContrast($theme);
44
- }
45
- }
46
-
47
- &:indeterminate {
48
- background-color: getGrey($theme);
49
- border-color: getGrey($theme);
50
-
51
- &::after {
52
- background-color: getGreyContrast($theme);
53
- }
54
- }
55
- }
56
-
57
- .matcha-checkbox-container .ripple {
58
- background: var(--matcha-color-accent-contrast-alpha, #{getAccentContrastAlpha($theme)}) !important;
59
- }
60
- }
61
-
62
- // ── Com cor customizada ────────────────────────────────────────────
63
- &[color] {
64
- input[type="checkbox"] {
65
- border-color: var(--matcha-color-text-label, #{getBlueGrey($theme)});
66
-
67
- &:indeterminate {
68
- background-color: getGrey($theme);
69
- border-color: getGrey($theme);
70
-
71
- &::after {
72
- background-color: getGreyContrast($theme);
73
- }
74
- }
75
- }
76
- }
77
-
78
- // ── Paleta: red ────────────────────────────────────────────────────
79
- &[color="red"] {
80
- .matcha-checkbox-container { color: getRed($theme); } // [3.1-A]
81
-
82
- input[type="checkbox"]:active { border-color: getRed($theme); }
83
- input[type="checkbox"]:checked { background-color: getRed($theme); border-color: getRed($theme); }
84
- input[type="checkbox"]:checked::after { border-color: getRedContrast($theme); }
85
-
86
- .matcha-checkbox-container .ripple {
87
- background: rgba(getRedContrast($theme), 0.1) !important; // ok: ripple palette
88
- }
89
- }
90
-
91
- // ── Paleta: pink ───────────────────────────────────────────────────
92
- &[color="pink"] {
93
- .matcha-checkbox-container { color: getPink($theme); } // [3.1-A]
94
-
95
- input[type="checkbox"]:active { border-color: getPink($theme); }
96
- input[type="checkbox"]:checked { background-color: getPink($theme); border-color: getPink($theme); }
97
- input[type="checkbox"]:checked::after { border-color: getPinkContrast($theme); }
98
-
99
- .matcha-checkbox-container .ripple {
100
- background: rgba(getPinkContrast($theme), 0.1) !important; // ok: ripple palette
101
- }
102
- }
103
-
104
- // ── Paleta: purple ─────────────────────────────────────────────────
105
- &[color="purple"] {
106
- .matcha-checkbox-container { color: getPurple($theme); } // [3.1-A]
107
-
108
- input[type="checkbox"]:active { border-color: getPurple($theme); }
109
- input[type="checkbox"]:checked { background-color: getPurple($theme); border-color: getPurple($theme); }
110
- input[type="checkbox"]:checked::after { border-color: getPurpleContrast($theme); }
111
-
112
- .matcha-checkbox-container .ripple {
113
- background: rgba(getPurpleContrast($theme), 0.1) !important; // ok: ripple palette
114
- }
115
- }
116
-
117
- // ── Paleta: deep-purple ────────────────────────────────────────────
118
- &[color="deep-purple"] {
119
- .matcha-checkbox-container { color: getDeepPurple($theme); } // [3.1-A]
120
-
121
- input[type="checkbox"]:active { border-color: getDeepPurple($theme); }
122
- input[type="checkbox"]:checked { background-color: getDeepPurple($theme); border-color: getDeepPurple($theme); }
123
- input[type="checkbox"]:checked::after { border-color: getDeepPurpleContrast($theme); }
124
-
125
- .matcha-checkbox-container .ripple {
126
- background: rgba(getDeepPurpleContrast($theme), 0.1) !important; // ok: ripple palette
127
- }
128
- }
129
-
130
- // ── Paleta: indigo ─────────────────────────────────────────────────
131
- &[color="indigo"] {
132
- .matcha-checkbox-container { color: getIndigo($theme); } // [3.1-A]
133
-
134
- input[type="checkbox"]:active { border-color: getIndigo($theme); }
135
- input[type="checkbox"]:checked { background-color: getIndigo($theme); border-color: getIndigo($theme); }
136
- input[type="checkbox"]:checked::after { border-color: getIndigoContrast($theme); }
137
-
138
- .matcha-checkbox-container .ripple {
139
- background: rgba(getIndigoContrast($theme), 0.1) !important; // ok: ripple palette
140
- }
141
- }
142
-
143
- // ── Paleta: blue ───────────────────────────────────────────────────
144
- &[color="blue"] {
145
- .matcha-checkbox-container { color: getBlue($theme); } // [3.1-A]
146
-
147
- input[type="checkbox"]:active { border-color: getBlue($theme); }
148
- input[type="checkbox"]:checked { background-color: getBlue($theme); border-color: getBlue($theme); }
149
- input[type="checkbox"]:checked::after { border-color: getBlueContrast($theme); }
150
-
151
- .matcha-checkbox-container .ripple {
152
- background: rgba(getBlueContrast($theme), 0.1) !important; // ok: ripple palette
153
- }
154
- }
155
-
156
- // ── Paleta: light-blue ─────────────────────────────────────────────
157
- &[color="light-blue"] {
158
- .matcha-checkbox-container { color: getLightBlue($theme); } // [3.1-A]
159
-
160
- input[type="checkbox"]:active { border-color: getLightBlue($theme); }
161
- input[type="checkbox"]:checked { background-color: getLightBlue($theme); border-color: getLightBlue($theme); }
162
- input[type="checkbox"]:checked::after { border-color: getLightBlueContrast($theme); }
163
-
164
- .matcha-checkbox-container .ripple {
165
- background: rgba(getLightBlueContrast($theme), 0.1) !important; // ok: ripple palette
166
- }
167
- }
168
-
169
- // ── Paleta: cyan ───────────────────────────────────────────────────
170
- &[color="cyan"] {
171
- .matcha-checkbox-container { color: getCyan($theme); } // [3.1-A]
172
-
173
- input[type="checkbox"]:active { border-color: getCyan($theme); }
174
- input[type="checkbox"]:checked { background-color: getCyan($theme); border-color: getCyan($theme); }
175
- input[type="checkbox"]:checked::after { border-color: getCyanContrast($theme); }
176
-
177
- .matcha-checkbox-container .ripple {
178
- background: rgba(getCyanContrast($theme), 0.1) !important; // ok: ripple palette
179
- }
180
- }
181
-
182
- // ── Paleta: teal ───────────────────────────────────────────────────
183
- &[color="teal"] {
184
- .matcha-checkbox-container { color: getTeal($theme); } // [3.1-A]
185
-
186
- input[type="checkbox"]:active { border-color: getTeal($theme); }
187
- input[type="checkbox"]:checked { background-color: getTeal($theme); border-color: getTeal($theme); }
188
- input[type="checkbox"]:checked::after { border-color: getTealContrast($theme); }
189
-
190
- .matcha-checkbox-container .ripple {
191
- background: rgba(getTealContrast($theme), 0.1) !important; // ok: ripple palette
192
- }
193
- }
194
-
195
- // ── Paleta: green ──────────────────────────────────────────────────
196
- &[color="green"] {
197
- .matcha-checkbox-container { color: getGreen($theme); } // [3.1-A]
198
-
199
- input[type="checkbox"]:active { border-color: getGreen($theme); }
200
- input[type="checkbox"]:checked { background-color: getGreen($theme); border-color: getGreen($theme); }
201
- input[type="checkbox"]:checked::after { border-color: getGreenContrast($theme); }
202
-
203
- .matcha-checkbox-container .ripple {
204
- background: rgba(getGreenContrast($theme), 0.1) !important; // ok: ripple palette
205
- }
206
- }
207
-
208
- // ── Paleta: light-green ────────────────────────────────────────────
209
- &[color="light-green"] {
210
- .matcha-checkbox-container { color: getLightGreen($theme); } // [3.1-A]
211
-
212
- input[type="checkbox"]:active { border-color: getLightGreen($theme); }
213
- input[type="checkbox"]:checked { background-color: getLightGreen($theme); border-color: getLightGreen($theme); }
214
- input[type="checkbox"]:checked::after { border-color: getLightGreenContrast($theme); }
215
-
216
- .matcha-checkbox-container .ripple {
217
- background: rgba(getLightGreenContrast($theme), 0.1) !important; // ok: ripple palette
218
- }
219
- }
220
-
221
- // ── Paleta: lime ───────────────────────────────────────────────────
222
- &[color="lime"] {
223
- .matcha-checkbox-container { color: getLime($theme); } // [3.1-A]
224
-
225
- input[type="checkbox"]:active { border-color: getLime($theme); }
226
- input[type="checkbox"]:checked { background-color: getLime($theme); border-color: getLime($theme); }
227
- input[type="checkbox"]:checked::after { border-color: getLimeContrast($theme); }
228
-
229
- .matcha-checkbox-container .ripple {
230
- background: rgba(getLimeContrast($theme), 0.1) !important; // ok: ripple palette
231
- }
232
- }
233
-
234
- // ── Paleta: yellow ─────────────────────────────────────────────────
235
- &[color="yellow"] {
236
- .matcha-checkbox-container { color: getYellow($theme); } // [3.1-A]
237
-
238
- input[type="checkbox"]:active { border-color: getYellow($theme); }
239
- input[type="checkbox"]:checked { background-color: getYellow($theme); border-color: getYellow($theme); }
240
- input[type="checkbox"]:checked::after { border-color: getYellowContrast($theme); }
241
-
242
- .matcha-checkbox-container .ripple {
243
- background: rgba(getYellowContrast($theme), 0.1) !important; // ok: ripple palette
244
- }
245
- }
246
-
247
- // ── Paleta: amber ──────────────────────────────────────────────────
248
- &[color="amber"] {
249
- .matcha-checkbox-container { color: getAmber($theme); } // [3.1-A]
250
-
251
- input[type="checkbox"]:active { border-color: getAmber($theme); }
252
- input[type="checkbox"]:checked { background-color: getAmber($theme); border-color: getAmber($theme); }
253
- input[type="checkbox"]:checked::after { border-color: getAmberContrast($theme); }
254
-
255
- .matcha-checkbox-container .ripple {
256
- background: rgba(getAmberContrast($theme), 0.1) !important; // ok: ripple palette
257
- }
258
- }
259
-
260
- // ── Paleta: orange ─────────────────────────────────────────────────
261
- &[color="orange"] {
262
- .matcha-checkbox-container { color: getOrange($theme); } // [3.1-A]
263
-
264
- input[type="checkbox"]:active { border-color: getOrange($theme); }
265
- input[type="checkbox"]:checked { background-color: getOrange($theme); border-color: getOrange($theme); }
266
- input[type="checkbox"]:checked::after { border-color: getOrangeContrast($theme); }
267
-
268
- .matcha-checkbox-container .ripple {
269
- background: rgba(getOrangeContrast($theme), 0.1) !important; // ok: ripple palette
270
- }
271
- }
272
-
273
- // ── Paleta: deep-orange ────────────────────────────────────────────
274
- &[color="deep-orange"] {
275
- .matcha-checkbox-container { color: getDeepOrange($theme); } // [3.1-A]
276
-
277
- input[type="checkbox"]:active { border-color: getDeepOrange($theme); }
278
- input[type="checkbox"]:checked { background-color: getDeepOrange($theme); border-color: getDeepOrange($theme); }
279
- input[type="checkbox"]:checked::after { border-color: getDeepOrangeContrast($theme); }
280
-
281
- .matcha-checkbox-container .ripple {
282
- background: rgba(getDeepOrangeContrast($theme), 0.1) !important; // ok: ripple palette
283
- }
284
- }
285
-
286
- // ── Paleta: brown ──────────────────────────────────────────────────
287
- &[color="brown"] {
288
- .matcha-checkbox-container { color: getBrown($theme); } // [3.1-A]
289
-
290
- input[type="checkbox"]:active { border-color: getBrown($theme); }
291
- input[type="checkbox"]:checked { background-color: getBrown($theme); border-color: getBrown($theme); }
292
- input[type="checkbox"]:checked::after { border-color: getBrownContrast($theme); }
293
-
294
- .matcha-checkbox-container .ripple {
295
- background: rgba(getBrownContrast($theme), 0.1) !important; // ok: ripple palette
296
- }
297
- }
298
-
299
- // ── Paleta: grey ───────────────────────────────────────────────────
300
- &[color="grey"] {
301
- .matcha-checkbox-container { color: getGrey($theme); } // [3.1-A]
302
-
303
- input[type="checkbox"]:active { border-color: getGrey($theme); }
304
- input[type="checkbox"]:checked { background-color: getGrey($theme); border-color: getGrey($theme); }
305
- input[type="checkbox"]:checked::after { border-color: getGreyContrast($theme); }
306
-
307
- .matcha-checkbox-container .ripple {
308
- background: rgba(getGreyContrast($theme), 0.1) !important; // ok: ripple palette
309
- }
310
- }
311
-
312
- // ── Paleta: blue-grey ──────────────────────────────────────────────
313
- &[color="blue-grey"] {
314
- .matcha-checkbox-container { color: getBlueGrey($theme); } // [3.1-A]
315
-
316
- input[type="checkbox"]:active { border-color: getBlueGrey($theme); }
317
- input[type="checkbox"]:checked { background-color: getBlueGrey($theme); border-color: getBlueGrey($theme); }
318
- input[type="checkbox"]:checked::after { border-color: getBlueGreyContrast($theme); }
319
-
320
- .matcha-checkbox-container .ripple {
321
- background: rgba(getBlueGreyContrast($theme), 0.1) !important; // ok: ripple palette
322
- }
323
- }
324
-
325
- // ── Semântica: primary ─────────────────────────────────────────────
326
- &[color="primary"] {
327
- .matcha-checkbox-container { color: var(--matcha-color-primary, #{getPrimary($theme)}); } // [3.1-A]
328
-
329
- input[type="checkbox"]:active { border-color: var(--matcha-color-primary, #{getPrimary($theme)}); }
330
- input[type="checkbox"]:checked { background-color: var(--matcha-color-primary, #{getPrimary($theme)}); border-color: var(--matcha-color-primary, #{getPrimary($theme)}); }
331
- input[type="checkbox"]:checked::after { border-color: getPrimaryContrast($theme); }
332
-
333
- .matcha-checkbox-container .ripple {
334
- background: var(--matcha-color-primary-contrast-alpha, #{getPrimaryContrastAlpha($theme)}) !important;
335
- }
9
+ // ── Off state — glyph cinza (icon-default) ─────────────────────────
10
+ // Default applies to all colors (vector unchecked é sempre cinza).
11
+ .matcha-checkbox-icon--outline {
12
+ color: var(--matcha-color-icon-default);
336
13
  }
337
14
 
338
- // ── Semântica: accent ──────────────────────────────────────────────
339
- &[color="accent"] {
340
- .matcha-checkbox-container { color: var(--matcha-color-accent, #{getAccent($theme)}); } // [3.1-A]
341
-
342
- input[type="checkbox"]:active { border-color: var(--matcha-color-accent, #{getAccent($theme)}); }
343
- input[type="checkbox"]:checked { background-color: var(--matcha-color-accent, #{getAccent($theme)}); border-color: var(--matcha-color-accent, #{getAccent($theme)}); }
344
- input[type="checkbox"]:checked::after { border-color: getAccentContrast($theme); }
345
-
346
- .matcha-checkbox-container .ripple {
347
- background: var(--matcha-color-accent-contrast-alpha, #{getAccentContrastAlpha($theme)}) !important;
348
- }
15
+ // ── Hover (off) — bg sutil surface alpha (Figma matcha/state-layer) ─
16
+ &:not([disabled]):hover .matcha-checkbox-container {
17
+ background: var(--matcha-color-surface-hover, rgba(0, 0, 0, 0.04));
18
+ box-shadow: var(--matcha-shadow-1);
349
19
  }
350
20
 
351
- // ── Semântica: success ─────────────────────────────────────────────
352
- &[color="success"] {
353
- .matcha-checkbox-container { color: getSuccess($theme); } // [3.1-A]
354
-
355
- input[type="checkbox"]:active { border-color: getSuccess($theme); }
356
- input[type="checkbox"]:checked { background-color: getSuccess($theme); border-color: getSuccess($theme); }
357
- input[type="checkbox"]:checked::after { border-color: getSuccessContrast($theme); }
358
-
359
- .matcha-checkbox-container .ripple {
360
- background: var(--matcha-color-success-contrast-alpha, #{getSuccessContrastAlpha($theme)}) !important;
361
- }
21
+ // ── Hover/Focus quando checked/indeterminate — accent-alpha bg ─────
22
+ &:not([disabled]):hover :is([checked], [indeterminate]) ~ .matcha-checkbox-container,
23
+ // fallback global (estado checked/indeterminate sem condicional)
24
+ &:not([disabled]):hover .matcha-checkbox-container:has(.matcha-checkbox-icon--checked),
25
+ &:not([disabled]):hover .matcha-checkbox-container:has(.matcha-checkbox-icon--indeterminate) {
26
+ background: var(--matcha-color-accent-alpha, rgba(0, 148, 0, 0.1));
362
27
  }
363
28
 
364
- // ── Semântica: warn ────────────────────────────────────────────────
365
- &[color="warn"] {
366
- .matcha-checkbox-container { color: getWarn($theme); } // [3.1-A]
367
-
368
- input[type="checkbox"]:active { border-color: getWarn($theme); }
369
- input[type="checkbox"]:checked { background-color: getWarn($theme); border-color: getWarn($theme); }
370
- input[type="checkbox"]:checked::after { border-color: getWarnContrast($theme); }
371
-
372
- .matcha-checkbox-container .ripple {
373
- background: var(--matcha-color-warn-contrast-alpha, #{getWarnContrastAlpha($theme)}) !important;
374
- }
29
+ // ── Focus visible — border 2px info (Figma) ────────────────────────
30
+ .matcha-checkbox-container:has(input:focus-visible) {
31
+ box-shadow: inset 0 0 0 var(--matcha-border-thin, 2px) var(--matcha-color-info);
375
32
  }
376
33
 
377
- // ── Semântica: danger ──────────────────────────────────────────────
378
- &[color="danger"] {
379
- .matcha-checkbox-container { color: getDanger($theme); } // [3.1-A]
34
+ // ── Cores per-color: checked + indeterminate fill = a cor escolhida
35
+ // O .matcha-checkbox-icon--outline ignora color (sempre cinza).
380
36
 
381
- input[type="checkbox"]:active { border-color: getDanger($theme); }
382
- input[type="checkbox"]:checked { background-color: getDanger($theme); border-color: getDanger($theme); }
383
- input[type="checkbox"]:checked::after { border-color: getDangerContrast($theme); }
384
-
385
- .matcha-checkbox-container .ripple {
386
- background: var(--matcha-color-danger-contrast-alpha, #{getDangerContrastAlpha($theme)}) !important;
387
- }
388
- }
37
+ // Sem [color]: accent
38
+ &:not([color]) .matcha-checkbox-icon--checked,
39
+ &:not([color]) .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-accent); }
389
40
 
390
- // ── Semântica: info ────────────────────────────────────────────────
391
- &[color="info"] {
392
- .matcha-checkbox-container { color: getInfo($theme); } // [3.1-A]
41
+ // Semântica
42
+ &[color="accent"] .matcha-checkbox-icon--checked,
43
+ &[color="accent"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-accent); }
44
+ &[color="primary"] .matcha-checkbox-icon--checked,
45
+ &[color="primary"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-primary); }
46
+ &[color="success"] .matcha-checkbox-icon--checked,
47
+ &[color="success"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-success); }
48
+ &[color="warn"] .matcha-checkbox-icon--checked,
49
+ &[color="warn"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-warn); }
50
+ &[color="danger"] .matcha-checkbox-icon--checked,
51
+ &[color="danger"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-danger); }
52
+ &[color="info"] .matcha-checkbox-icon--checked,
53
+ &[color="info"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-info); }
393
54
 
394
- input[type="checkbox"]:active { border-color: getInfo($theme); }
395
- input[type="checkbox"]:checked { background-color: getInfo($theme); border-color: getInfo($theme); }
396
- input[type="checkbox"]:checked::after { border-color: getInfoContrast($theme); }
397
-
398
- .matcha-checkbox-container .ripple {
399
- background: var(--matcha-color-info-contrast-alpha, #{getInfoContrastAlpha($theme)}) !important;
400
- }
401
- }
402
-
403
- // ── Error state (aligned with Figma State=Error) ──────────────────
55
+ // ── Error state — glyph fica danger (override em outline, checked, indeterminate)
404
56
  &.matcha-checkbox-error,
405
57
  &[error] {
406
- input[type="checkbox"] {
407
- border-color: var(--matcha-color-danger, #{getDanger($theme)});
408
-
409
- &:checked {
410
- background-color: var(--matcha-color-danger, #{getDanger($theme)});
411
- border-color: var(--matcha-color-danger, #{getDanger($theme)});
412
- }
413
- }
58
+ .matcha-checkbox-icon { color: var(--matcha-color-danger); }
414
59
  }
415
60
 
416
- // ── [3.1-E] Disabled — tokens semânticos ──────────────────────────
417
- &[disabled] {
418
- input[type="checkbox"] {
419
- border-color: var(--matcha-color-disabled-bg, #{getDisabled($theme)});
420
-
421
- &:checked {
422
- background-color: var(--matcha-color-disabled-bg, #{getDisabled($theme)});
423
- border-color: var(--matcha-color-disabled-bg, #{getDisabled($theme)});
424
-
425
- &::after {
426
- border-color: var(--matcha-color-disabled-fg, #{getDisabledBgContrast($theme)});
427
- }
428
- }
429
- }
430
-
431
- .matcha-checkbox-container {
432
- color: var(--matcha-color-disabled-fg, #{getDisabledBgContrast($theme)});
433
- }
434
-
435
- .matcha-checkbox-label {
436
- color: var(--matcha-color-disabled-fg, #{getDisabledBgContrast($theme)});
437
- }
438
- }
61
+ // ── Disabled — opacity reduzida (host) ─────────────────────────────
62
+ &[disabled] .matcha-checkbox-icon { color: var(--matcha-color-icon-default); }
439
63
 
440
- // ── [3.1-D] :focus-visible — DEVE ficar no mixin ──────────────────
441
- .matcha-checkbox-container:focus-within {
442
- outline: var(--matcha-state-focus-ring-width, 2px) solid
443
- var(--matcha-color-primary, #{getPrimary($theme)});
444
- outline-offset: var(--matcha-state-focus-ring-offset, 2px);
445
- }
64
+ // Label colors
65
+ .matcha-checkbox-label { color: var(--matcha-checkbox-label-color, var(--matcha-color-text-primary)); }
446
66
 
447
- // Label padrão (preservado do original)
448
- .matcha-checkbox-label {
449
- color: getGrey($theme);
67
+ &[disabled] .matcha-checkbox-label {
68
+ color: var(--matcha-color-disabled-fg);
450
69
  }
451
70
  }
452
71
  }
453
72
 
454
-
455
73
  // =============================================================================
456
74
  // Bloco estrutural — fora do mixin de tema
75
+ // Spec Figma matcha/checkbox: touch target 36×36 pill, SVG glyph 24×24 inset.
457
76
  // =============================================================================
458
77
 
459
- // [3.1-A] Container recebe o state layer (mesmo pattern do radio)
460
- .matcha-checkbox-container {
461
- position: relative;
462
- overflow: hidden;
463
- border-radius: 50%; // área de hover circular
78
+ // Touch target pill 36×36 Figma spec, sem token genérico equivalente
79
+ $matcha-checkbox-touch: 36px;
464
80
 
81
+ // Touch target — pill com state layer (hover halo + active overlay)
82
+ .matcha-checkbox-container {
83
+ position: relative;
84
+ display: inline-flex;
85
+ align-items: center;
86
+ justify-content: center;
87
+ width: $matcha-checkbox-touch;
88
+ height: $matcha-checkbox-touch;
89
+ flex-shrink: 0;
90
+ border-radius: var(--matcha-radius-pill);
91
+ overflow: hidden;
92
+ transition:
93
+ background-color var(--matcha-duration-instant) var(--matcha-easing-standard),
94
+ box-shadow var(--matcha-duration-instant) var(--matcha-easing-standard);
95
+
96
+ // State layer ::before — halo translúcido pra hover/active
465
97
  &::before {
466
98
  content: '';
467
99
  position: absolute;
@@ -470,85 +102,154 @@
470
102
  opacity: 0;
471
103
  border-radius: inherit;
472
104
  pointer-events: none;
473
- transition: opacity var(--matcha-duration-instant, 80ms) linear;
105
+ transition: opacity var(--matcha-duration-instant) linear;
474
106
  }
475
107
  }
476
108
 
477
- // [3.1-H] Seletor de contexto do pai [disabled] está em matcha-checkbox, não no container
478
- matcha-checkbox:not([disabled]) .matcha-checkbox-container:hover::before { opacity: var(--matcha-state-hover, 0.08); }
479
- matcha-checkbox:not([disabled]) .matcha-checkbox-container:active::before { opacity: var(--matcha-state-active, 0.12); }
109
+ // Active overlay quando não disabled
110
+ matcha-checkbox:not([disabled]) .matcha-checkbox-container:active::before {
111
+ opacity: var(--matcha-state-active);
112
+ }
480
113
 
481
114
  matcha-checkbox {
482
- display: inline-flex;
483
- align-items: center;
484
- gap: var(--matcha-space-100, 8px);
485
- cursor: pointer;
115
+ display: inline-block; // host wrapper — sem flex próprio (label faz layout)
116
+ cursor: pointer;
117
+
118
+ // Label interno controla o layout horizontal (touch target + texto).
119
+ // align-items: center centraliza visualmente o LABEL com o glyph 24×24
120
+ // do touch target. Description/hint fluem abaixo via column do .matcha-checkbox-text.
121
+ > .matcha-checkbox {
122
+ display: inline-flex;
123
+ align-items: center;
124
+ gap: var(--matcha-space-100);
125
+ cursor: pointer;
126
+ }
486
127
 
128
+ // Input nativo — sr-only (semântica + sincroniza estado, sem visual próprio)
487
129
  input[type="checkbox"] {
488
- appearance: none;
489
- -webkit-appearance: none;
490
- width: var(--matcha-checkbox-size, 18px);
491
- height: var(--matcha-checkbox-size, 18px);
492
- padding: 0;
493
- border-radius: var(--matcha-radius-md, 4px);
494
- border-width: var(--matcha-border-thin, 2px);
495
- border-style: solid;
496
- cursor: pointer;
497
- position: relative;
498
-
499
- // [3.1-F] transition específico (não 'all')
500
- transition: border-color 0.2s ease, background-color 0.2s ease;
501
-
502
- // outline: none REMOVIDO — :focus-visible no mixin garante acessibilidade
503
- // &:focus {} REMOVIDO — estava vazio (WCAG 2.4.7)
504
-
505
- // Checkmark glyph: valores pixel-level s\u00e3o geometria do desenho
506
- // dentro da caixa 16px (n\u00e3o tokens sem\u00e2nticos por natureza)
507
- &:checked::after {
508
- content: '';
509
- position: absolute;
510
- left: var(--matcha-space-050, 4px);
511
- top: 0;
512
- width: 5px; // glyph
513
- height: 10px; // glyph
514
- border-style: solid;
515
- border-width: 0 var(--matcha-border-thin, 2px) var(--matcha-border-thin, 2px) 0;
516
- transform: rotate(45deg);
517
- }
130
+ position: absolute;
131
+ width: var(--matcha-border-hairline);
132
+ height: var(--matcha-border-hairline);
133
+ padding: 0;
134
+ margin: calc(-1 * var(--matcha-border-hairline));
135
+ overflow: hidden;
136
+ clip: rect(0, 0, 0, 0);
137
+ white-space: nowrap;
138
+ border: 0;
139
+ }
518
140
 
519
- &:indeterminate::after {
520
- content: '';
521
- position: absolute;
522
- left: 3px; // glyph
523
- top: 7px; // glyph
524
- width: var(--matcha-space-100, 8px);
525
- height: var(--matcha-border-thin, 2px);
526
- }
141
+ // SVG glyph — 24×24 dentro do touch target 36×36 (centralizado por flex)
142
+ .matcha-checkbox-icon {
143
+ width: 24px; // Figma matcha/icon size canonical
144
+ height: 24px;
145
+ flex-shrink: 0;
146
+ pointer-events: none;
147
+ transition: color var(--matcha-duration-fast) var(--matcha-easing-standard);
527
148
  }
528
149
 
529
- // Figma matcha/checkbox label: 12px Regular line 16 (matcha/color/text/primary)
150
+ // Label column gap 2 entre label/description/hint. Sem padding-top
151
+ // (centralização vem do align-items:center do flex pai).
152
+ .matcha-checkbox-text {
153
+ display: flex;
154
+ flex-direction: column;
155
+ gap: var(--matcha-space-025);
156
+ min-width: 0;
157
+ }
158
+
159
+ // Label — Figma matcha/text/body-sm (12/16 Regular)
530
160
  .matcha-checkbox-label {
531
- font-size: var(--matcha-text-body-sm, 12px);
532
- font-weight: var(--matcha-weight-regular, 400);
533
- line-height: var(--matcha-leading-body-sm, 16px);
161
+ font-family: var(--matcha-font-family);
162
+ font-size: var(--matcha-text-body-sm);
163
+ font-weight: var(--matcha-weight-regular);
164
+ line-height: var(--matcha-leading-body-sm);
534
165
  user-select: none;
535
166
  cursor: pointer;
536
167
  }
537
168
 
538
- // [3.1-E] Disabledsem opacity no host, sem cursor: not-allowed
169
+ // Asterisco de required danger color, espaçamento sutil
170
+ .matcha-checkbox-required {
171
+ color: var(--matcha-color-danger);
172
+ margin-left: var(--matcha-space-025);
173
+ user-select: none;
174
+ }
175
+
176
+ // Description — Figma matcha/text/caption (11/14 Regular text-secondary)
177
+ .matcha-checkbox-description {
178
+ font-family: var(--matcha-font-family);
179
+ font-size: var(--matcha-text-p-tiny);
180
+ font-weight: var(--matcha-weight-regular);
181
+ line-height: var(--matcha-leading-p-tiny);
182
+ letter-spacing: var(--matcha-letter-spacing-caption);
183
+ color: var(--matcha-color-text-secondary);
184
+ user-select: none;
185
+ }
186
+
187
+ // Hint text — Figma matcha/text/caption (11/14). Cor secondary por default,
188
+ // vira danger quando o host tem error (.matcha-checkbox-error).
189
+ .matcha-checkbox-hint {
190
+ font-family: var(--matcha-font-family);
191
+ font-size: var(--matcha-text-p-tiny);
192
+ font-weight: var(--matcha-weight-regular);
193
+ line-height: var(--matcha-leading-p-tiny);
194
+ letter-spacing: var(--matcha-letter-spacing-caption);
195
+ color: var(--matcha-color-text-secondary);
196
+ user-select: none;
197
+ }
198
+ // Error state: hint danger + glyph danger (override em todos os 3 SVGs)
199
+ .matcha-checkbox-error {
200
+ .matcha-checkbox-hint { color: var(--matcha-color-danger); }
201
+ .matcha-checkbox-icon { color: var(--matcha-color-danger); }
202
+ }
203
+
204
+ // Disabled — opacity 0.5 (Figma) + bloqueio de pointer events
539
205
  &[disabled] {
540
206
  pointer-events: none;
541
207
  cursor: default;
208
+ opacity: var(--matcha-opacity-secondary); // 0.54 ≈ Figma 0.5
542
209
 
543
- .matcha-checkbox-label {
544
- cursor: default;
545
- }
210
+ .matcha-checkbox-label { cursor: default; }
546
211
  }
547
212
 
548
- // [3.1-G] Movimento reduzido — obrigatório (WCAG 2.3.3)
213
+ // Reduced motion (WCAG 2.3.3)
549
214
  @media (prefers-reduced-motion: reduce) {
550
- input[type="checkbox"] { transition: none; }
215
+ .matcha-checkbox-container,
216
+ .matcha-checkbox-container::before,
217
+ .matcha-checkbox-icon { transition: none; }
218
+ }
219
+ }
220
+
221
+ // ── Forced colors (Windows High Contrast) ──
222
+ @media (forced-colors: active) {
223
+ matcha-checkbox {
224
+ .matcha-checkbox-box {
225
+ border: 1px solid CanvasText !important;
226
+ background: Canvas !important;
227
+ }
228
+
229
+ &.is-checked .matcha-checkbox-box,
230
+ &[checked] .matcha-checkbox-box {
231
+ background: Highlight !important;
232
+ border-color: Highlight !important;
233
+ }
234
+
235
+ &:focus-visible .matcha-checkbox-box {
236
+ outline: 2px solid CanvasText !important;
237
+ outline-offset: 2px;
238
+ }
239
+
240
+ &.is-disabled,
241
+ &[disabled] {
242
+ opacity: 0.5;
243
+
244
+ .matcha-checkbox-box { border-color: GrayText !important; }
245
+ }
246
+ }
247
+ }
551
248
 
552
- .matcha-checkbox-container::before { transition: none; }
249
+ // ── Print ──
250
+ // Checkbox preserva estado (form value matter em papel).
251
+ @media print {
252
+ matcha-checkbox .matcha-checkbox-box {
253
+ border: 1px solid currentColor !important;
553
254
  }
554
255
  }