@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,554 @@
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
20
+ // =============================================================================
21
+
22
+ @mixin matcha-checkbox($theme) {
23
+ 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
+ }
336
+ }
337
+
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
+ }
349
+ }
350
+
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
+ }
362
+ }
363
+
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
+ }
375
+ }
376
+
377
+ // ── Semântica: danger ──────────────────────────────────────────────
378
+ &[color="danger"] {
379
+ .matcha-checkbox-container { color: getDanger($theme); } // [3.1-A]
380
+
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
+ }
389
+
390
+ // ── Semântica: info ────────────────────────────────────────────────
391
+ &[color="info"] {
392
+ .matcha-checkbox-container { color: getInfo($theme); } // [3.1-A]
393
+
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) ──────────────────
404
+ &.matcha-checkbox-error,
405
+ &[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
+ }
414
+ }
415
+
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
+ }
439
+
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
+ }
446
+
447
+ // Label padrão (preservado do original)
448
+ .matcha-checkbox-label {
449
+ color: getGrey($theme);
450
+ }
451
+ }
452
+ }
453
+
454
+
455
+ // =============================================================================
456
+ // Bloco estrutural — fora do mixin de tema
457
+ // =============================================================================
458
+
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
464
+
465
+ &::before {
466
+ content: '';
467
+ position: absolute;
468
+ inset: 0;
469
+ background: currentColor;
470
+ opacity: 0;
471
+ border-radius: inherit;
472
+ pointer-events: none;
473
+ transition: opacity var(--matcha-duration-instant, 80ms) linear;
474
+ }
475
+ }
476
+
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); }
480
+
481
+ matcha-checkbox {
482
+ display: inline-flex;
483
+ align-items: center;
484
+ gap: var(--matcha-space-100, 8px);
485
+ cursor: pointer;
486
+
487
+ 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
+ }
518
+
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
+ }
527
+ }
528
+
529
+ // Figma matcha/checkbox label: 12px Regular line 16 (matcha/color/text/primary)
530
+ .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);
534
+ user-select: none;
535
+ cursor: pointer;
536
+ }
537
+
538
+ // [3.1-E] Disabled — sem opacity no host, sem cursor: not-allowed
539
+ &[disabled] {
540
+ pointer-events: none;
541
+ cursor: default;
542
+
543
+ .matcha-checkbox-label {
544
+ cursor: default;
545
+ }
546
+ }
547
+
548
+ // [3.1-G] Movimento reduzido — obrigatório (WCAG 2.3.3)
549
+ @media (prefers-reduced-motion: reduce) {
550
+ input[type="checkbox"] { transition: none; }
551
+
552
+ .matcha-checkbox-container::before { transition: none; }
553
+ }
554
+ }