@inchurch/matcha-theme 22.38.2 → 22.38.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 (93) hide show
  1. package/abstracts/_colors.scss +291 -291
  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 +224 -224
  6. package/abstracts/_typography.scss +128 -128
  7. package/base/_reset.scss +487 -487
  8. package/components/app-page-header.scss +260 -260
  9. package/components/matcha-accordion.scss +297 -297
  10. package/components/matcha-audio-player.scss +31 -31
  11. package/components/matcha-autocomplete.scss +145 -145
  12. package/components/matcha-avatar.scss +426 -426
  13. package/components/matcha-badge.scss +120 -120
  14. package/components/matcha-breadcrumb.scss +231 -231
  15. package/components/matcha-button-toggle.scss +484 -484
  16. package/components/matcha-buttons.scss +973 -973
  17. package/components/matcha-calendar.scss +253 -253
  18. package/components/matcha-cards.scss +212 -212
  19. package/components/matcha-chart-card.scss +53 -53
  20. package/components/matcha-checkbox.scss +266 -266
  21. package/components/matcha-chip.scss +311 -311
  22. package/components/matcha-color-pick.scss +34 -34
  23. package/components/matcha-command-palette.scss +316 -316
  24. package/components/matcha-crop.scss +419 -419
  25. package/components/matcha-date.scss +81 -81
  26. package/components/matcha-divider.scss +100 -100
  27. package/components/matcha-draggable.scss +23 -23
  28. package/components/matcha-drawer.scss +376 -376
  29. package/components/matcha-drop-image.scss +14 -14
  30. package/components/matcha-drop-list.scss +430 -430
  31. package/components/matcha-emoji.scss +69 -69
  32. package/components/matcha-empty-state.scss +230 -230
  33. package/components/matcha-file-uploader.scss +650 -637
  34. package/components/matcha-flag.scss +103 -103
  35. package/components/matcha-footer.scss +91 -91
  36. package/components/matcha-form-field.scss +883 -883
  37. package/components/matcha-form-section.scss +100 -100
  38. package/components/matcha-header.scss +135 -135
  39. package/components/matcha-highlight.scss +164 -164
  40. package/components/matcha-hint-text.scss +90 -90
  41. package/components/matcha-horizontal-tree.scss +247 -247
  42. package/components/matcha-icon.scss +111 -111
  43. package/components/matcha-image.scss +60 -60
  44. package/components/matcha-list.scss +211 -211
  45. package/components/matcha-menu.scss +99 -99
  46. package/components/matcha-modal.scss +210 -210
  47. package/components/matcha-nav.scss +770 -770
  48. package/components/matcha-notification.scss +417 -417
  49. package/components/matcha-option.scss +170 -170
  50. package/components/matcha-page-builder.scss +4196 -4196
  51. package/components/matcha-paginator.scss +699 -699
  52. package/components/matcha-panel.scss +216 -216
  53. package/components/matcha-period.scss +174 -174
  54. package/components/matcha-profile-card.scss +50 -50
  55. package/components/matcha-progress-bar.scss +355 -355
  56. package/components/matcha-radio.scss +325 -325
  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 +629 -629
  63. package/components/matcha-skeleton.scss +182 -182
  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-stepper.scss +376 -376
  70. package/components/matcha-table-cell.scss +107 -107
  71. package/components/matcha-table.scss +722 -722
  72. package/components/matcha-tabs.scss +642 -642
  73. package/components/matcha-text-editor.scss +111 -111
  74. package/components/matcha-time.scss +33 -33
  75. package/components/matcha-timepicker.scss +13 -13
  76. package/components/matcha-toolbar.scss +366 -366
  77. package/components/matcha-tooltip.scss +235 -235
  78. package/components/matcha-tree-view.scss +636 -636
  79. package/layout/matcha-page-layout.scss +778 -778
  80. package/main.scss +334 -334
  81. package/package.json +1 -1
  82. package/tokens/_animations-tokens.scss +37 -37
  83. package/tokens/_breakpoints-tokens.scss +35 -35
  84. package/tokens/_color-tokens.scss +288 -288
  85. package/tokens/_elevation-tokens.scss +33 -33
  86. package/tokens/_emit-tokens.scss +329 -329
  87. package/tokens/_material-palette.scss +1149 -1149
  88. package/tokens/_primitives.scss +98 -98
  89. package/tokens/_semantic-aliases.scss +120 -120
  90. package/tokens/_spacing-tokens.scss +94 -94
  91. package/tokens/_static-tokens.scss +137 -137
  92. package/tokens/_typography-tokens.scss +65 -65
  93. package/vendors/charts.scss +90 -90
@@ -1,266 +1,266 @@
1
- // =============================================================================
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.
5
- // =============================================================================
6
-
7
- @mixin matcha-checkbox($theme) {
8
- matcha-checkbox {
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);
13
- }
14
-
15
- // ── Hover (off) — bg sutil surface alpha (Figma matcha/state-layer) ─
16
- // `[readonly]` entra nas guardas de hover/active junto de `[disabled]`: nao vai
17
- // acontecer nada no clique, entao prometer interacao e mentir. Mas NAO entra nas regras
18
- // de COR abaixo — e justamente por isso que readonly existe: o estado continua legivel.
19
- &:not([disabled]):not([readonly]):hover .matcha-checkbox-container {
20
- background: var(--matcha-color-surface-hover, rgba(0, 0, 0, 0.04));
21
- box-shadow: var(--matcha-shadow-1);
22
- }
23
-
24
- // ── Hover/Focus quando checked/indeterminate — accent-alpha bg ─────
25
- &:not([disabled]):not([readonly]):hover :is([checked], [indeterminate]) ~ .matcha-checkbox-container,
26
- // fallback global (estado checked/indeterminate sem condicional)
27
- &:not([disabled]):not([readonly]):hover .matcha-checkbox-container:has(.matcha-checkbox-icon--checked),
28
- &:not([disabled]):not([readonly]):hover .matcha-checkbox-container:has(.matcha-checkbox-icon--indeterminate) {
29
- background: var(--matcha-color-accent-alpha, rgba(0, 148, 0, 0.1));
30
- }
31
-
32
- // ── Focus visible — border 2px info (Figma) ────────────────────────
33
- .matcha-checkbox-container:has(input:focus-visible) {
34
- box-shadow: inset 0 0 0 var(--matcha-border-thin, 2px) var(--matcha-color-info);
35
- }
36
-
37
- // ── Cores per-color: checked + indeterminate fill = a cor escolhida
38
- // O .matcha-checkbox-icon--outline ignora color (sempre cinza).
39
-
40
- // Sem [color]: accent
41
- &:not([color]) .matcha-checkbox-icon--checked,
42
- &:not([color]) .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-accent); }
43
-
44
- // Semântica
45
- &[color="accent"] .matcha-checkbox-icon--checked,
46
- &[color="accent"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-accent); }
47
- &[color="primary"] .matcha-checkbox-icon--checked,
48
- &[color="primary"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-primary); }
49
- &[color="success"] .matcha-checkbox-icon--checked,
50
- &[color="success"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-success); }
51
- &[color="warn"] .matcha-checkbox-icon--checked,
52
- &[color="warn"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-warn); }
53
- &[color="danger"] .matcha-checkbox-icon--checked,
54
- &[color="danger"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-danger); }
55
- &[color="info"] .matcha-checkbox-icon--checked,
56
- &[color="info"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-info); }
57
-
58
- // ── Error state — glyph fica danger (override em outline, checked, indeterminate)
59
- &.matcha-checkbox-error,
60
- &[error] {
61
- .matcha-checkbox-icon { color: var(--matcha-color-danger); }
62
- }
63
-
64
- // ── Disabled — opacity reduzida (host) ─────────────────────────────
65
- &[disabled] .matcha-checkbox-icon { color: var(--matcha-color-icon-default); }
66
-
67
- // Label colors
68
- .matcha-checkbox-label { color: var(--matcha-checkbox-label-color, var(--matcha-color-text-primary)); }
69
-
70
- &[disabled] .matcha-checkbox-label {
71
- color: var(--matcha-color-disabled-fg);
72
- }
73
-
74
- // ── Readonly — cursor de leitura, e NENHUMA troca de cor ───────────
75
- // O ponteiro deixa de ser `pointer` porque nao ha o que acionar; o glyph e o label
76
- // ficam com a cor normal, que e o ponto de usar readonly em vez de disabled.
77
- &[readonly] .matcha-checkbox,
78
- &[readonly] .matcha-checkbox-container {
79
- cursor: default;
80
- }
81
- }
82
- }
83
-
84
- // =============================================================================
85
- // Bloco estrutural — fora do mixin de tema
86
- // Spec Figma matcha/checkbox: touch target 36×36 pill, SVG glyph 24×24 inset.
87
- // =============================================================================
88
-
89
- // Touch target pill 36×36 — Figma spec, sem token genérico equivalente
90
- $matcha-checkbox-touch: 36px;
91
-
92
- // Touch target — pill com state layer (hover halo + active overlay)
93
- .matcha-checkbox-container {
94
- position: relative;
95
- display: inline-flex;
96
- align-items: center;
97
- justify-content: center;
98
- width: $matcha-checkbox-touch;
99
- height: $matcha-checkbox-touch;
100
- flex-shrink: 0;
101
- border-radius: var(--matcha-radius-pill);
102
- overflow: hidden;
103
- transition:
104
- background-color var(--matcha-duration-instant) var(--matcha-easing-standard),
105
- box-shadow var(--matcha-duration-instant) var(--matcha-easing-standard);
106
-
107
- // State layer ::before — halo translúcido pra hover/active
108
- &::before {
109
- content: '';
110
- position: absolute;
111
- inset: 0;
112
- background: currentColor;
113
- opacity: 0;
114
- border-radius: inherit;
115
- pointer-events: none;
116
- transition: opacity var(--matcha-duration-instant) linear;
117
- }
118
- }
119
-
120
- // Active overlay — só quando não disabled
121
- matcha-checkbox:not([disabled]):not([readonly]) .matcha-checkbox-container:active::before {
122
- opacity: var(--matcha-state-active);
123
- }
124
-
125
- matcha-checkbox {
126
- display: inline-block; // host wrapper — sem flex próprio (label faz layout)
127
- cursor: pointer;
128
-
129
- // Label interno controla o layout horizontal (touch target + texto).
130
- // align-items: center centraliza visualmente o LABEL com o glyph 24×24
131
- // do touch target. Description/hint fluem abaixo via column do .matcha-checkbox-text.
132
- > .matcha-checkbox {
133
- display: inline-flex;
134
- align-items: center;
135
- gap: var(--matcha-space-100);
136
- cursor: pointer;
137
- }
138
-
139
- // Input nativo — sr-only (semântica + sincroniza estado, sem visual próprio)
140
- input[type="checkbox"] {
141
- position: absolute;
142
- width: var(--matcha-border-hairline);
143
- height: var(--matcha-border-hairline);
144
- padding: 0;
145
- margin: calc(-1 * var(--matcha-border-hairline));
146
- overflow: hidden;
147
- clip: rect(0, 0, 0, 0);
148
- white-space: nowrap;
149
- border: 0;
150
- }
151
-
152
- // SVG glyph — 24×24 dentro do touch target 36×36 (centralizado por flex)
153
- .matcha-checkbox-icon {
154
- width: 24px; // Figma matcha/icon size canonical
155
- height: 24px;
156
- flex-shrink: 0;
157
- pointer-events: none;
158
- transition: color var(--matcha-duration-fast) var(--matcha-easing-standard);
159
- }
160
-
161
- // Label column — gap 2 entre label/description/hint. Sem padding-top
162
- // (centralização vem do align-items:center do flex pai).
163
- .matcha-checkbox-text {
164
- display: flex;
165
- flex-direction: column;
166
- gap: var(--matcha-space-025);
167
- min-width: 0;
168
- }
169
-
170
- // Label — Figma matcha/text/body-sm (12/16 Regular)
171
- .matcha-checkbox-label {
172
- font-family: var(--matcha-font-family);
173
- font-size: var(--matcha-text-body-sm);
174
- font-weight: var(--matcha-weight-regular);
175
- line-height: var(--matcha-leading-body-sm);
176
- user-select: none;
177
- cursor: pointer;
178
- }
179
-
180
- // Asterisco de required — danger color, espaçamento sutil
181
- .matcha-checkbox-required {
182
- color: var(--matcha-color-danger);
183
- margin-left: var(--matcha-space-025);
184
- user-select: none;
185
- }
186
-
187
- // Description — Figma matcha/text/caption (11/14 Regular text-secondary)
188
- .matcha-checkbox-description {
189
- font-family: var(--matcha-font-family);
190
- font-size: var(--matcha-text-p-tiny);
191
- font-weight: var(--matcha-weight-regular);
192
- line-height: var(--matcha-leading-p-tiny);
193
- letter-spacing: var(--matcha-letter-spacing-caption);
194
- color: var(--matcha-color-text-secondary);
195
- user-select: none;
196
- }
197
-
198
- // Hint text — Figma matcha/text/caption (11/14). Cor secondary por default,
199
- // vira danger quando o host tem error (.matcha-checkbox-error).
200
- .matcha-checkbox-hint {
201
- font-family: var(--matcha-font-family);
202
- font-size: var(--matcha-text-p-tiny);
203
- font-weight: var(--matcha-weight-regular);
204
- line-height: var(--matcha-leading-p-tiny);
205
- letter-spacing: var(--matcha-letter-spacing-caption);
206
- color: var(--matcha-color-text-secondary);
207
- user-select: none;
208
- }
209
- // Error state: hint danger + glyph danger (override em todos os 3 SVGs)
210
- .matcha-checkbox-error {
211
- .matcha-checkbox-hint { color: var(--matcha-color-danger); }
212
- .matcha-checkbox-icon { color: var(--matcha-color-danger); }
213
- }
214
-
215
- // Disabled — opacity 0.5 (Figma) + bloqueio de pointer events
216
- &[disabled] {
217
- pointer-events: none;
218
- cursor: default;
219
- opacity: var(--matcha-opacity-secondary); // 0.54 ≈ Figma 0.5
220
-
221
- .matcha-checkbox-label { cursor: default; }
222
- }
223
-
224
- // Reduced motion (WCAG 2.3.3)
225
- @media (prefers-reduced-motion: reduce) {
226
- .matcha-checkbox-container,
227
- .matcha-checkbox-container::before,
228
- .matcha-checkbox-icon { transition: none; }
229
- }
230
- }
231
-
232
- // ── Forced colors (Windows High Contrast) ──
233
- @media (forced-colors: active) {
234
- matcha-checkbox {
235
- .matcha-checkbox-box {
236
- border: 1px solid CanvasText !important;
237
- background: Canvas !important;
238
- }
239
-
240
- &.is-checked .matcha-checkbox-box,
241
- &[checked] .matcha-checkbox-box {
242
- background: Highlight !important;
243
- border-color: Highlight !important;
244
- }
245
-
246
- &:focus-visible .matcha-checkbox-box {
247
- outline: 2px solid CanvasText !important;
248
- outline-offset: 2px;
249
- }
250
-
251
- &.is-disabled,
252
- &[disabled] {
253
- opacity: 0.5;
254
-
255
- .matcha-checkbox-box { border-color: GrayText !important; }
256
- }
257
- }
258
- }
259
-
260
- // ── Print ──
261
- // Checkbox preserva estado (form value matter em papel).
262
- @media print {
263
- matcha-checkbox .matcha-checkbox-box {
264
- border: 1px solid currentColor !important;
265
- }
266
- }
1
+ // =============================================================================
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.
5
+ // =============================================================================
6
+
7
+ @mixin matcha-checkbox($theme) {
8
+ matcha-checkbox {
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);
13
+ }
14
+
15
+ // ── Hover (off) — bg sutil surface alpha (Figma matcha/state-layer) ─
16
+ // `[readonly]` entra nas guardas de hover/active junto de `[disabled]`: nao vai
17
+ // acontecer nada no clique, entao prometer interacao e mentir. Mas NAO entra nas regras
18
+ // de COR abaixo — e justamente por isso que readonly existe: o estado continua legivel.
19
+ &:not([disabled]):not([readonly]):hover .matcha-checkbox-container {
20
+ background: var(--matcha-color-surface-hover, rgba(0, 0, 0, 0.04));
21
+ box-shadow: var(--matcha-shadow-1);
22
+ }
23
+
24
+ // ── Hover/Focus quando checked/indeterminate — accent-alpha bg ─────
25
+ &:not([disabled]):not([readonly]):hover :is([checked], [indeterminate]) ~ .matcha-checkbox-container,
26
+ // fallback global (estado checked/indeterminate sem condicional)
27
+ &:not([disabled]):not([readonly]):hover .matcha-checkbox-container:has(.matcha-checkbox-icon--checked),
28
+ &:not([disabled]):not([readonly]):hover .matcha-checkbox-container:has(.matcha-checkbox-icon--indeterminate) {
29
+ background: var(--matcha-color-accent-alpha, rgba(0, 148, 0, 0.1));
30
+ }
31
+
32
+ // ── Focus visible — border 2px info (Figma) ────────────────────────
33
+ .matcha-checkbox-container:has(input:focus-visible) {
34
+ box-shadow: inset 0 0 0 var(--matcha-border-thin, 2px) var(--matcha-color-info);
35
+ }
36
+
37
+ // ── Cores per-color: checked + indeterminate fill = a cor escolhida
38
+ // O .matcha-checkbox-icon--outline ignora color (sempre cinza).
39
+
40
+ // Sem [color]: accent
41
+ &:not([color]) .matcha-checkbox-icon--checked,
42
+ &:not([color]) .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-accent); }
43
+
44
+ // Semântica
45
+ &[color="accent"] .matcha-checkbox-icon--checked,
46
+ &[color="accent"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-accent); }
47
+ &[color="primary"] .matcha-checkbox-icon--checked,
48
+ &[color="primary"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-primary); }
49
+ &[color="success"] .matcha-checkbox-icon--checked,
50
+ &[color="success"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-success); }
51
+ &[color="warn"] .matcha-checkbox-icon--checked,
52
+ &[color="warn"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-warn); }
53
+ &[color="danger"] .matcha-checkbox-icon--checked,
54
+ &[color="danger"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-danger); }
55
+ &[color="info"] .matcha-checkbox-icon--checked,
56
+ &[color="info"] .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-info); }
57
+
58
+ // ── Error state — glyph fica danger (override em outline, checked, indeterminate)
59
+ &.matcha-checkbox-error,
60
+ &[error] {
61
+ .matcha-checkbox-icon { color: var(--matcha-color-danger); }
62
+ }
63
+
64
+ // ── Disabled — opacity reduzida (host) ─────────────────────────────
65
+ &[disabled] .matcha-checkbox-icon { color: var(--matcha-color-icon-default); }
66
+
67
+ // Label colors
68
+ .matcha-checkbox-label { color: var(--matcha-checkbox-label-color, var(--matcha-color-text-primary)); }
69
+
70
+ &[disabled] .matcha-checkbox-label {
71
+ color: var(--matcha-color-disabled-fg);
72
+ }
73
+
74
+ // ── Readonly — cursor de leitura, e NENHUMA troca de cor ───────────
75
+ // O ponteiro deixa de ser `pointer` porque nao ha o que acionar; o glyph e o label
76
+ // ficam com a cor normal, que e o ponto de usar readonly em vez de disabled.
77
+ &[readonly] .matcha-checkbox,
78
+ &[readonly] .matcha-checkbox-container {
79
+ cursor: default;
80
+ }
81
+ }
82
+ }
83
+
84
+ // =============================================================================
85
+ // Bloco estrutural — fora do mixin de tema
86
+ // Spec Figma matcha/checkbox: touch target 36×36 pill, SVG glyph 24×24 inset.
87
+ // =============================================================================
88
+
89
+ // Touch target pill 36×36 — Figma spec, sem token genérico equivalente
90
+ $matcha-checkbox-touch: 36px;
91
+
92
+ // Touch target — pill com state layer (hover halo + active overlay)
93
+ .matcha-checkbox-container {
94
+ position: relative;
95
+ display: inline-flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ width: $matcha-checkbox-touch;
99
+ height: $matcha-checkbox-touch;
100
+ flex-shrink: 0;
101
+ border-radius: var(--matcha-radius-pill);
102
+ overflow: hidden;
103
+ transition:
104
+ background-color var(--matcha-duration-instant) var(--matcha-easing-standard),
105
+ box-shadow var(--matcha-duration-instant) var(--matcha-easing-standard);
106
+
107
+ // State layer ::before — halo translúcido pra hover/active
108
+ &::before {
109
+ content: '';
110
+ position: absolute;
111
+ inset: 0;
112
+ background: currentColor;
113
+ opacity: 0;
114
+ border-radius: inherit;
115
+ pointer-events: none;
116
+ transition: opacity var(--matcha-duration-instant) linear;
117
+ }
118
+ }
119
+
120
+ // Active overlay — só quando não disabled
121
+ matcha-checkbox:not([disabled]):not([readonly]) .matcha-checkbox-container:active::before {
122
+ opacity: var(--matcha-state-active);
123
+ }
124
+
125
+ matcha-checkbox {
126
+ display: inline-block; // host wrapper — sem flex próprio (label faz layout)
127
+ cursor: pointer;
128
+
129
+ // Label interno controla o layout horizontal (touch target + texto).
130
+ // align-items: center centraliza visualmente o LABEL com o glyph 24×24
131
+ // do touch target. Description/hint fluem abaixo via column do .matcha-checkbox-text.
132
+ > .matcha-checkbox {
133
+ display: inline-flex;
134
+ align-items: center;
135
+ gap: var(--matcha-space-100);
136
+ cursor: pointer;
137
+ }
138
+
139
+ // Input nativo — sr-only (semântica + sincroniza estado, sem visual próprio)
140
+ input[type="checkbox"] {
141
+ position: absolute;
142
+ width: var(--matcha-border-hairline);
143
+ height: var(--matcha-border-hairline);
144
+ padding: 0;
145
+ margin: calc(-1 * var(--matcha-border-hairline));
146
+ overflow: hidden;
147
+ clip: rect(0, 0, 0, 0);
148
+ white-space: nowrap;
149
+ border: 0;
150
+ }
151
+
152
+ // SVG glyph — 24×24 dentro do touch target 36×36 (centralizado por flex)
153
+ .matcha-checkbox-icon {
154
+ width: 24px; // Figma matcha/icon size canonical
155
+ height: 24px;
156
+ flex-shrink: 0;
157
+ pointer-events: none;
158
+ transition: color var(--matcha-duration-fast) var(--matcha-easing-standard);
159
+ }
160
+
161
+ // Label column — gap 2 entre label/description/hint. Sem padding-top
162
+ // (centralização vem do align-items:center do flex pai).
163
+ .matcha-checkbox-text {
164
+ display: flex;
165
+ flex-direction: column;
166
+ gap: var(--matcha-space-025);
167
+ min-width: 0;
168
+ }
169
+
170
+ // Label — Figma matcha/text/body-sm (12/16 Regular)
171
+ .matcha-checkbox-label {
172
+ font-family: var(--matcha-font-family);
173
+ font-size: var(--matcha-text-body-sm);
174
+ font-weight: var(--matcha-weight-regular);
175
+ line-height: var(--matcha-leading-body-sm);
176
+ user-select: none;
177
+ cursor: pointer;
178
+ }
179
+
180
+ // Asterisco de required — danger color, espaçamento sutil
181
+ .matcha-checkbox-required {
182
+ color: var(--matcha-color-danger);
183
+ margin-left: var(--matcha-space-025);
184
+ user-select: none;
185
+ }
186
+
187
+ // Description — Figma matcha/text/caption (11/14 Regular text-secondary)
188
+ .matcha-checkbox-description {
189
+ font-family: var(--matcha-font-family);
190
+ font-size: var(--matcha-text-p-tiny);
191
+ font-weight: var(--matcha-weight-regular);
192
+ line-height: var(--matcha-leading-p-tiny);
193
+ letter-spacing: var(--matcha-letter-spacing-caption);
194
+ color: var(--matcha-color-text-secondary);
195
+ user-select: none;
196
+ }
197
+
198
+ // Hint text — Figma matcha/text/caption (11/14). Cor secondary por default,
199
+ // vira danger quando o host tem error (.matcha-checkbox-error).
200
+ .matcha-checkbox-hint {
201
+ font-family: var(--matcha-font-family);
202
+ font-size: var(--matcha-text-p-tiny);
203
+ font-weight: var(--matcha-weight-regular);
204
+ line-height: var(--matcha-leading-p-tiny);
205
+ letter-spacing: var(--matcha-letter-spacing-caption);
206
+ color: var(--matcha-color-text-secondary);
207
+ user-select: none;
208
+ }
209
+ // Error state: hint danger + glyph danger (override em todos os 3 SVGs)
210
+ .matcha-checkbox-error {
211
+ .matcha-checkbox-hint { color: var(--matcha-color-danger); }
212
+ .matcha-checkbox-icon { color: var(--matcha-color-danger); }
213
+ }
214
+
215
+ // Disabled — opacity 0.5 (Figma) + bloqueio de pointer events
216
+ &[disabled] {
217
+ pointer-events: none;
218
+ cursor: default;
219
+ opacity: var(--matcha-opacity-secondary); // 0.54 ≈ Figma 0.5
220
+
221
+ .matcha-checkbox-label { cursor: default; }
222
+ }
223
+
224
+ // Reduced motion (WCAG 2.3.3)
225
+ @media (prefers-reduced-motion: reduce) {
226
+ .matcha-checkbox-container,
227
+ .matcha-checkbox-container::before,
228
+ .matcha-checkbox-icon { transition: none; }
229
+ }
230
+ }
231
+
232
+ // ── Forced colors (Windows High Contrast) ──
233
+ @media (forced-colors: active) {
234
+ matcha-checkbox {
235
+ .matcha-checkbox-box {
236
+ border: 1px solid CanvasText !important;
237
+ background: Canvas !important;
238
+ }
239
+
240
+ &.is-checked .matcha-checkbox-box,
241
+ &[checked] .matcha-checkbox-box {
242
+ background: Highlight !important;
243
+ border-color: Highlight !important;
244
+ }
245
+
246
+ &:focus-visible .matcha-checkbox-box {
247
+ outline: 2px solid CanvasText !important;
248
+ outline-offset: 2px;
249
+ }
250
+
251
+ &.is-disabled,
252
+ &[disabled] {
253
+ opacity: 0.5;
254
+
255
+ .matcha-checkbox-box { border-color: GrayText !important; }
256
+ }
257
+ }
258
+ }
259
+
260
+ // ── Print ──
261
+ // Checkbox preserva estado (form value matter em papel).
262
+ @media print {
263
+ matcha-checkbox .matcha-checkbox-box {
264
+ border: 1px solid currentColor !important;
265
+ }
266
+ }