@inchurch/matcha-theme 21.4.0 → 22.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/abstracts/_colors.scss +236 -236
  2. package/abstracts/_elevation.scss +108 -108
  3. package/abstracts/_functions.scss +321 -321
  4. package/abstracts/_media-breakpoint.scss +26 -26
  5. package/abstracts/_theme-api.scss +219 -219
  6. package/abstracts/_typography.scss +128 -128
  7. package/base/_reset.scss +446 -445
  8. package/components/app-page-header.scss +260 -260
  9. package/components/matcha-accordion.scss +293 -293
  10. package/components/matcha-audio-player.scss +31 -31
  11. package/components/matcha-autocomplete.scss +145 -145
  12. package/components/matcha-avatar.scss +440 -301
  13. package/components/matcha-badge.scss +120 -120
  14. package/components/matcha-breadcrumb.scss +231 -231
  15. package/components/matcha-button-toggle.scss +383 -384
  16. package/components/matcha-buttons.scss +913 -913
  17. package/components/matcha-calendar.scss +218 -218
  18. package/components/matcha-cards.scss +230 -230
  19. package/components/matcha-chart-card.scss +53 -53
  20. package/components/matcha-checkbox.scss +255 -255
  21. package/components/matcha-chip.scss +292 -292
  22. package/components/matcha-color-pick.scss +34 -34
  23. package/components/matcha-command-palette.scss +316 -316
  24. package/components/matcha-contact.scss +35 -0
  25. package/components/matcha-crop.scss +406 -406
  26. package/components/matcha-date.scss +81 -81
  27. package/components/matcha-divider.scss +100 -100
  28. package/components/matcha-draggable.scss +23 -23
  29. package/components/matcha-drawer.scss +376 -376
  30. package/components/matcha-drop-image.scss +14 -14
  31. package/components/matcha-drop-list.scss +430 -430
  32. package/components/matcha-emoji.scss +69 -69
  33. package/components/matcha-empty-state.scss +230 -230
  34. package/components/matcha-file-uploader.scss +471 -471
  35. package/components/matcha-flag.scss +103 -103
  36. package/components/matcha-footer.scss +91 -91
  37. package/components/matcha-form-field.scss +606 -606
  38. package/components/matcha-form-section.scss +100 -100
  39. package/components/matcha-header.scss +135 -135
  40. package/components/matcha-highlight.scss +164 -164
  41. package/components/matcha-hint-text.scss +90 -90
  42. package/components/matcha-horizontal-tree.scss +316 -316
  43. package/components/matcha-icon.scss +98 -98
  44. package/components/matcha-image.scss +61 -61
  45. package/components/matcha-list.scss +211 -211
  46. package/components/matcha-menu.scss +99 -99
  47. package/components/matcha-modal.scss +210 -210
  48. package/components/matcha-nav.scss +581 -581
  49. package/components/matcha-notification.scss +413 -413
  50. package/components/matcha-option.scss +170 -170
  51. package/components/matcha-page-builder.scss +4196 -4196
  52. package/components/matcha-paginator.scss +689 -689
  53. package/components/matcha-panel.scss +194 -194
  54. package/components/matcha-profile-card.scss +50 -50
  55. package/components/matcha-progress-bar.scss +313 -313
  56. package/components/matcha-radio.scss +320 -320
  57. package/components/matcha-ripple.scss +7 -7
  58. package/components/matcha-scrollbar.scss +33 -33
  59. package/components/matcha-scrollbox-shadow.scss +120 -120
  60. package/components/matcha-section.scss +102 -102
  61. package/components/matcha-select-multiple.scss +56 -56
  62. package/components/matcha-select.scss +667 -667
  63. package/components/matcha-skeleton.scss +155 -155
  64. package/components/matcha-slide-toggle.scss +369 -369
  65. package/components/matcha-slider.scss +285 -285
  66. package/components/matcha-snack-bar.scss +259 -259
  67. package/components/matcha-spin.scss +164 -164
  68. package/components/matcha-spinner.scss +97 -97
  69. package/components/matcha-status-pill.scss +38 -18
  70. package/components/matcha-stepper.scss +376 -376
  71. package/components/matcha-table-cell.scss +49 -41
  72. package/components/matcha-table.scss +579 -579
  73. package/components/matcha-tabs.scss +600 -600
  74. package/components/matcha-text-editor.scss +105 -105
  75. package/components/matcha-time.scss +33 -33
  76. package/components/matcha-timepicker.scss +13 -13
  77. package/components/matcha-toolbar.scss +359 -359
  78. package/components/matcha-tooltip.scss +224 -224
  79. package/components/matcha-tree-view.scss +257 -257
  80. package/layout/matcha-page-layout.scss +778 -778
  81. package/main.scss +331 -329
  82. package/package.json +1 -1
  83. package/tokens/_animations-tokens.scss +37 -37
  84. package/tokens/_breakpoints-tokens.scss +35 -35
  85. package/tokens/_color-tokens.scss +274 -274
  86. package/tokens/_elevation-tokens.scss +33 -33
  87. package/tokens/_emit-tokens.scss +324 -324
  88. package/tokens/_material-palette.scss +1149 -1149
  89. package/tokens/_primitives.scss +98 -98
  90. package/tokens/_semantic-aliases.scss +120 -120
  91. package/tokens/_spacing-tokens.scss +94 -94
  92. package/tokens/_static-tokens.scss +137 -137
  93. package/tokens/_typography-tokens.scss +65 -65
  94. package/vendors/charts.scss +90 -90
@@ -1,255 +1,255 @@
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
- &: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);
19
- }
20
-
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));
27
- }
28
-
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);
32
- }
33
-
34
- // ── Cores per-color: checked + indeterminate fill = a cor escolhida
35
- // O .matcha-checkbox-icon--outline ignora color (sempre cinza).
36
-
37
- // Sem [color]: accent
38
- &:not([color]) .matcha-checkbox-icon--checked,
39
- &:not([color]) .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-accent); }
40
-
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); }
54
-
55
- // ── Error state — glyph fica danger (override em outline, checked, indeterminate)
56
- &.matcha-checkbox-error,
57
- &[error] {
58
- .matcha-checkbox-icon { color: var(--matcha-color-danger); }
59
- }
60
-
61
- // ── Disabled — opacity reduzida (host) ─────────────────────────────
62
- &[disabled] .matcha-checkbox-icon { color: var(--matcha-color-icon-default); }
63
-
64
- // Label colors
65
- .matcha-checkbox-label { color: var(--matcha-checkbox-label-color, var(--matcha-color-text-primary)); }
66
-
67
- &[disabled] .matcha-checkbox-label {
68
- color: var(--matcha-color-disabled-fg);
69
- }
70
- }
71
- }
72
-
73
- // =============================================================================
74
- // Bloco estrutural — fora do mixin de tema
75
- // Spec Figma matcha/checkbox: touch target 36×36 pill, SVG glyph 24×24 inset.
76
- // =============================================================================
77
-
78
- // Touch target pill 36×36 — Figma spec, sem token genérico equivalente
79
- $matcha-checkbox-touch: 36px;
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
97
- &::before {
98
- content: '';
99
- position: absolute;
100
- inset: 0;
101
- background: currentColor;
102
- opacity: 0;
103
- border-radius: inherit;
104
- pointer-events: none;
105
- transition: opacity var(--matcha-duration-instant) linear;
106
- }
107
- }
108
-
109
- // Active overlay — só quando não disabled
110
- matcha-checkbox:not([disabled]) .matcha-checkbox-container:active::before {
111
- opacity: var(--matcha-state-active);
112
- }
113
-
114
- matcha-checkbox {
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
- }
127
-
128
- // Input nativo — sr-only (semântica + sincroniza estado, sem visual próprio)
129
- input[type="checkbox"] {
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
- }
140
-
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);
148
- }
149
-
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)
160
- .matcha-checkbox-label {
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);
165
- user-select: none;
166
- cursor: pointer;
167
- }
168
-
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
205
- &[disabled] {
206
- pointer-events: none;
207
- cursor: default;
208
- opacity: var(--matcha-opacity-secondary); // 0.54 ≈ Figma 0.5
209
-
210
- .matcha-checkbox-label { cursor: default; }
211
- }
212
-
213
- // Reduced motion (WCAG 2.3.3)
214
- @media (prefers-reduced-motion: reduce) {
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
- }
248
-
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;
254
- }
255
- }
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
+ &: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);
19
+ }
20
+
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));
27
+ }
28
+
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);
32
+ }
33
+
34
+ // ── Cores per-color: checked + indeterminate fill = a cor escolhida
35
+ // O .matcha-checkbox-icon--outline ignora color (sempre cinza).
36
+
37
+ // Sem [color]: accent
38
+ &:not([color]) .matcha-checkbox-icon--checked,
39
+ &:not([color]) .matcha-checkbox-icon--indeterminate { color: var(--matcha-color-accent); }
40
+
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); }
54
+
55
+ // ── Error state — glyph fica danger (override em outline, checked, indeterminate)
56
+ &.matcha-checkbox-error,
57
+ &[error] {
58
+ .matcha-checkbox-icon { color: var(--matcha-color-danger); }
59
+ }
60
+
61
+ // ── Disabled — opacity reduzida (host) ─────────────────────────────
62
+ &[disabled] .matcha-checkbox-icon { color: var(--matcha-color-icon-default); }
63
+
64
+ // Label colors
65
+ .matcha-checkbox-label { color: var(--matcha-checkbox-label-color, var(--matcha-color-text-primary)); }
66
+
67
+ &[disabled] .matcha-checkbox-label {
68
+ color: var(--matcha-color-disabled-fg);
69
+ }
70
+ }
71
+ }
72
+
73
+ // =============================================================================
74
+ // Bloco estrutural — fora do mixin de tema
75
+ // Spec Figma matcha/checkbox: touch target 36×36 pill, SVG glyph 24×24 inset.
76
+ // =============================================================================
77
+
78
+ // Touch target pill 36×36 — Figma spec, sem token genérico equivalente
79
+ $matcha-checkbox-touch: 36px;
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
97
+ &::before {
98
+ content: '';
99
+ position: absolute;
100
+ inset: 0;
101
+ background: currentColor;
102
+ opacity: 0;
103
+ border-radius: inherit;
104
+ pointer-events: none;
105
+ transition: opacity var(--matcha-duration-instant) linear;
106
+ }
107
+ }
108
+
109
+ // Active overlay — só quando não disabled
110
+ matcha-checkbox:not([disabled]) .matcha-checkbox-container:active::before {
111
+ opacity: var(--matcha-state-active);
112
+ }
113
+
114
+ matcha-checkbox {
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
+ }
127
+
128
+ // Input nativo — sr-only (semântica + sincroniza estado, sem visual próprio)
129
+ input[type="checkbox"] {
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
+ }
140
+
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);
148
+ }
149
+
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)
160
+ .matcha-checkbox-label {
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);
165
+ user-select: none;
166
+ cursor: pointer;
167
+ }
168
+
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
205
+ &[disabled] {
206
+ pointer-events: none;
207
+ cursor: default;
208
+ opacity: var(--matcha-opacity-secondary); // 0.54 ≈ Figma 0.5
209
+
210
+ .matcha-checkbox-label { cursor: default; }
211
+ }
212
+
213
+ // Reduced motion (WCAG 2.3.3)
214
+ @media (prefers-reduced-motion: reduce) {
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
+ }
248
+
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;
254
+ }
255
+ }