@inchurch/matcha-theme 21.3.3 → 22.0.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.
- package/abstracts/_colors.scss +236 -229
- package/abstracts/_elevation.scss +108 -108
- package/abstracts/_functions.scss +321 -321
- package/abstracts/_media-breakpoint.scss +26 -26
- package/abstracts/_theme-api.scss +219 -219
- package/abstracts/_typography.scss +128 -128
- package/base/_reset.scss +445 -432
- package/components/app-page-header.scss +260 -260
- package/components/matcha-accordion.scss +293 -293
- package/components/matcha-audio-player.scss +31 -31
- package/components/matcha-autocomplete.scss +145 -145
- package/components/matcha-avatar.scss +440 -301
- package/components/matcha-badge.scss +120 -120
- package/components/matcha-breadcrumb.scss +231 -231
- package/components/matcha-button-toggle.scss +384 -384
- package/components/matcha-buttons.scss +913 -913
- package/components/matcha-calendar.scss +218 -218
- package/components/matcha-cards.scss +230 -230
- package/components/matcha-chart-card.scss +53 -53
- package/components/matcha-checkbox.scss +255 -255
- package/components/matcha-chip.scss +292 -292
- package/components/matcha-color-pick.scss +34 -34
- package/components/matcha-command-palette.scss +316 -316
- package/components/matcha-crop.scss +406 -406
- package/components/matcha-date.scss +81 -81
- package/components/matcha-divider.scss +100 -100
- package/components/matcha-draggable.scss +23 -23
- package/components/matcha-drawer.scss +376 -376
- package/components/matcha-drop-image.scss +14 -14
- package/components/matcha-drop-list.scss +430 -430
- package/components/matcha-emoji.scss +69 -69
- package/components/matcha-empty-state.scss +230 -230
- package/components/matcha-file-uploader.scss +471 -471
- package/components/matcha-flag.scss +103 -103
- package/components/matcha-footer.scss +91 -91
- package/components/matcha-form-field.scss +606 -606
- package/components/matcha-form-section.scss +100 -100
- package/components/matcha-header.scss +135 -135
- package/components/matcha-highlight.scss +164 -164
- package/components/matcha-hint-text.scss +90 -90
- package/components/matcha-horizontal-tree.scss +316 -316
- package/components/matcha-icon.scss +98 -98
- package/components/matcha-image.scss +61 -61
- package/components/matcha-list.scss +211 -211
- package/components/matcha-menu.scss +99 -99
- package/components/matcha-modal.scss +210 -210
- package/components/matcha-nav.scss +581 -581
- package/components/matcha-notification.scss +413 -413
- package/components/matcha-option.scss +170 -170
- package/components/matcha-page-builder.scss +4196 -4196
- package/components/matcha-paginator.scss +689 -689
- package/components/matcha-panel.scss +194 -194
- package/components/matcha-profile-card.scss +50 -50
- package/components/matcha-progress-bar.scss +313 -313
- package/components/matcha-radio.scss +320 -320
- package/components/matcha-ripple.scss +7 -7
- package/components/matcha-scrollbar.scss +33 -33
- package/components/matcha-scrollbox-shadow.scss +120 -120
- package/components/matcha-section.scss +102 -102
- package/components/matcha-select-multiple.scss +56 -56
- package/components/matcha-select.scss +667 -667
- package/components/matcha-skeleton.scss +155 -155
- package/components/matcha-slide-toggle.scss +369 -369
- package/components/matcha-slider.scss +285 -285
- package/components/matcha-snack-bar.scss +259 -259
- package/components/matcha-spin.scss +164 -164
- package/components/matcha-spinner.scss +97 -97
- package/components/matcha-status-pill.scss +38 -18
- package/components/matcha-stepper.scss +376 -376
- package/components/matcha-table-cell.scss +74 -41
- package/components/matcha-table.scss +579 -578
- package/components/matcha-tabs.scss +600 -600
- package/components/matcha-text-editor.scss +105 -105
- package/components/matcha-time.scss +33 -33
- package/components/matcha-timepicker.scss +13 -13
- package/components/matcha-toolbar.scss +359 -359
- package/components/matcha-tooltip.scss +224 -224
- package/components/matcha-tree-view.scss +257 -212
- package/layout/matcha-page-layout.scss +778 -778
- package/main.scss +329 -329
- package/package.json +1 -1
- package/tokens/_animations-tokens.scss +37 -37
- package/tokens/_breakpoints-tokens.scss +35 -35
- package/tokens/_color-tokens.scss +274 -261
- package/tokens/_elevation-tokens.scss +33 -33
- package/tokens/_emit-tokens.scss +324 -324
- package/tokens/_material-palette.scss +1149 -1149
- package/tokens/_primitives.scss +98 -98
- package/tokens/_semantic-aliases.scss +120 -120
- package/tokens/_spacing-tokens.scss +94 -94
- package/tokens/_static-tokens.scss +137 -137
- package/tokens/_typography-tokens.scss +65 -65
- package/vendors/charts.scss +90 -90
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
// =============================================================================
|
|
2
|
-
// matcha-option.scss — Item selecionável (dropdowns, menus, drawer)
|
|
3
|
-
// Aligned with Figma DSV3 matcha/option (7 estados, tokenized accent)
|
|
4
|
-
// Node: 14237:113
|
|
5
|
-
// =============================================================================
|
|
6
|
-
|
|
7
|
-
// ── Structural (outside mixin) ──────────────────────────────────────────────
|
|
8
|
-
|
|
9
|
-
.matcha-option {
|
|
10
|
-
// Figma matcha/option: pad 12/16, gap 16, min-height 48
|
|
11
|
-
position: relative;
|
|
12
|
-
display: flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
gap: var(--matcha-space-200, 16px);
|
|
15
|
-
padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
16
|
-
min-height: var(--matcha-option-height, 48px);
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
border-radius: var(--matcha-radius-md, 4px);
|
|
20
|
-
margin: var(--matcha-space-025, 2px) var(--matcha-space-050, 4px);
|
|
21
|
-
transition:
|
|
22
|
-
background-color var(--matcha-duration-instant, 80ms) ease,
|
|
23
|
-
box-shadow var(--matcha-duration-instant, 80ms) ease;
|
|
24
|
-
|
|
25
|
-
// Touch: força click imediato (sem aguardar 300ms de double-tap) e impede
|
|
26
|
-
// o browser de interpretar tap leve como scroll dentro de containers com
|
|
27
|
-
// overflow-y: auto (dropdowns, command-palette, autocomplete results).
|
|
28
|
-
// Sem isso, click em touchscreen e DevTools touch-emulation às vezes não
|
|
29
|
-
// chega no @HostListener('click') da matcha-option.
|
|
30
|
-
touch-action: manipulation;
|
|
31
|
-
|
|
32
|
-
// Disabled — pointer/cursor only
|
|
33
|
-
&[aria-disabled="true"],
|
|
34
|
-
&[disabled],
|
|
35
|
-
&.matcha-option-disabled {
|
|
36
|
-
pointer-events: none;
|
|
37
|
-
cursor: default;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@media (prefers-reduced-motion: reduce) {
|
|
41
|
-
transition: none;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// ── Theme mixin ─────────────────────────────────────────────────────────────
|
|
46
|
-
|
|
47
|
-
@mixin matcha-option-theme($theme) {
|
|
48
|
-
.matcha-option {
|
|
49
|
-
color: var(--matcha-color-text-primary);
|
|
50
|
-
background: transparent;
|
|
51
|
-
|
|
52
|
-
// ── Hover (não selected) — state-layer/hover 8% ──
|
|
53
|
-
&:hover:not([aria-disabled="true"]):not([disabled]):not(.matcha-option-disabled):not([aria-selected="true"]) {
|
|
54
|
-
background: color-mix(
|
|
55
|
-
in srgb,
|
|
56
|
-
var(--matcha-color-state-layer-fg) calc(var(--matcha-state-layer-hover, 0.08) * 100%),
|
|
57
|
-
transparent
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// ── Selected — accent/alpha ──
|
|
62
|
-
&[aria-selected="true"] {
|
|
63
|
-
background: var(--matcha-color-accent-alpha);
|
|
64
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
65
|
-
|
|
66
|
-
// Hover sobre selected — accent/surface-hover (mais opaco)
|
|
67
|
-
&:hover:not([aria-disabled="true"]) {
|
|
68
|
-
background: var(--matcha-color-accent-surface-hover);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// ── Danger ──
|
|
73
|
-
&.matcha-option--danger {
|
|
74
|
-
color: var(--matcha-color-danger);
|
|
75
|
-
|
|
76
|
-
&:hover:not([aria-disabled="true"]) {
|
|
77
|
-
background: var(--matcha-color-danger-surface-hover);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// ── Disabled — Figma DSV3 matcha/option: opacity 0.5 (não 0.38 do token global) ──
|
|
82
|
-
// O componente Figma especifica 0.5 explicitamente — visualmente mais leve do que
|
|
83
|
-
// 0.38 do --matcha-opacity-disabled (Material 3 default). Mantemos fidelidade ao Figma.
|
|
84
|
-
&[aria-disabled="true"],
|
|
85
|
-
&[disabled],
|
|
86
|
-
&.matcha-option-disabled {
|
|
87
|
-
color: var(--matcha-color-interaction-disabled-fg);
|
|
88
|
-
opacity: var(--matcha-opacity-option-disabled, 0.5);
|
|
89
|
-
background: transparent;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// ── Focused — border 2px primary/default (Figma DSV3) sem deslocar layout ──
|
|
93
|
-
// outline-offset negativo simula border interno sem afetar box-sizing.
|
|
94
|
-
&:focus-visible:not([aria-disabled="true"]):not([disabled]):not(.matcha-option-disabled) {
|
|
95
|
-
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-primary);
|
|
96
|
-
outline-offset: calc(-1 * var(--matcha-state-focus-ring-width, 2px));
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// ── Keyboard highlight (cursor de navegação, orthogonal a selected) ──
|
|
100
|
-
// Aplicado pelo matcha-select ao navegar com ArrowUp/Down.
|
|
101
|
-
&.matcha-option-highlighted:not([aria-disabled="true"]):not([disabled]) {
|
|
102
|
-
background: color-mix(
|
|
103
|
-
in srgb,
|
|
104
|
-
var(--matcha-color-state-layer-fg) calc(var(--matcha-state-layer-hover, 0.08) * 100%),
|
|
105
|
-
transparent
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
// Combinado com selected: mantém tint accent + leve intensificação
|
|
109
|
-
&[aria-selected="true"] {
|
|
110
|
-
background: var(--matcha-color-accent-surface-hover);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// ── Modo múltiplo (matcha-select-multiple) — checkbox à esquerda ──
|
|
115
|
-
// O realce do item marcado é o próprio checkbox; por isso o fundo
|
|
116
|
-
// accent/alpha do single-select é neutralizado quando não há hover/cursor.
|
|
117
|
-
&.matcha-option-multiple {
|
|
118
|
-
gap: var(--matcha-space-100, 8px);
|
|
119
|
-
|
|
120
|
-
&[aria-selected="true"]:not(:hover):not(.matcha-option-highlighted) {
|
|
121
|
-
background: transparent;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.matcha-option-checkbox {
|
|
125
|
-
display: inline-flex;
|
|
126
|
-
align-items: center;
|
|
127
|
-
// Checkbox é puramente visual: o clique cai no host matcha-option,
|
|
128
|
-
// que faz o toggle (tanto na opção quanto sobre o checkbox).
|
|
129
|
-
pointer-events: none;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// ── Forced colors ──
|
|
136
|
-
@media (forced-colors: active) {
|
|
137
|
-
matcha-option {
|
|
138
|
-
color: CanvasText !important;
|
|
139
|
-
|
|
140
|
-
&:hover:not(.is-disabled):not([disabled]) {
|
|
141
|
-
background: SelectedItem !important;
|
|
142
|
-
color: SelectedItemText !important;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
&.is-active,
|
|
146
|
-
&[active],
|
|
147
|
-
&[aria-selected="true"] {
|
|
148
|
-
background: Highlight !important;
|
|
149
|
-
color: HighlightText !important;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
&:focus-visible {
|
|
153
|
-
outline: 2px solid CanvasText !important;
|
|
154
|
-
outline-offset: -2px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&.is-disabled,
|
|
158
|
-
&[disabled] {
|
|
159
|
-
color: GrayText !important;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// ── Print ──
|
|
165
|
-
// Options são parte de UI interativa — não renderizam em papel.
|
|
166
|
-
@media print {
|
|
167
|
-
matcha-option {
|
|
168
|
-
display: none !important;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// matcha-option.scss — Item selecionável (dropdowns, menus, drawer)
|
|
3
|
+
// Aligned with Figma DSV3 matcha/option (7 estados, tokenized accent)
|
|
4
|
+
// Node: 14237:113
|
|
5
|
+
// =============================================================================
|
|
6
|
+
|
|
7
|
+
// ── Structural (outside mixin) ──────────────────────────────────────────────
|
|
8
|
+
|
|
9
|
+
.matcha-option {
|
|
10
|
+
// Figma matcha/option: pad 12/16, gap 16, min-height 48
|
|
11
|
+
position: relative;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--matcha-space-200, 16px);
|
|
15
|
+
padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
16
|
+
min-height: var(--matcha-option-height, 48px);
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
border-radius: var(--matcha-radius-md, 4px);
|
|
20
|
+
margin: var(--matcha-space-025, 2px) var(--matcha-space-050, 4px);
|
|
21
|
+
transition:
|
|
22
|
+
background-color var(--matcha-duration-instant, 80ms) ease,
|
|
23
|
+
box-shadow var(--matcha-duration-instant, 80ms) ease;
|
|
24
|
+
|
|
25
|
+
// Touch: força click imediato (sem aguardar 300ms de double-tap) e impede
|
|
26
|
+
// o browser de interpretar tap leve como scroll dentro de containers com
|
|
27
|
+
// overflow-y: auto (dropdowns, command-palette, autocomplete results).
|
|
28
|
+
// Sem isso, click em touchscreen e DevTools touch-emulation às vezes não
|
|
29
|
+
// chega no @HostListener('click') da matcha-option.
|
|
30
|
+
touch-action: manipulation;
|
|
31
|
+
|
|
32
|
+
// Disabled — pointer/cursor only
|
|
33
|
+
&[aria-disabled="true"],
|
|
34
|
+
&[disabled],
|
|
35
|
+
&.matcha-option-disabled {
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
cursor: default;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (prefers-reduced-motion: reduce) {
|
|
41
|
+
transition: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ── Theme mixin ─────────────────────────────────────────────────────────────
|
|
46
|
+
|
|
47
|
+
@mixin matcha-option-theme($theme) {
|
|
48
|
+
.matcha-option {
|
|
49
|
+
color: var(--matcha-color-text-primary);
|
|
50
|
+
background: transparent;
|
|
51
|
+
|
|
52
|
+
// ── Hover (não selected) — state-layer/hover 8% ──
|
|
53
|
+
&:hover:not([aria-disabled="true"]):not([disabled]):not(.matcha-option-disabled):not([aria-selected="true"]) {
|
|
54
|
+
background: color-mix(
|
|
55
|
+
in srgb,
|
|
56
|
+
var(--matcha-color-state-layer-fg) calc(var(--matcha-state-layer-hover, 0.08) * 100%),
|
|
57
|
+
transparent
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ── Selected — accent/alpha ──
|
|
62
|
+
&[aria-selected="true"] {
|
|
63
|
+
background: var(--matcha-color-accent-alpha);
|
|
64
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
65
|
+
|
|
66
|
+
// Hover sobre selected — accent/surface-hover (mais opaco)
|
|
67
|
+
&:hover:not([aria-disabled="true"]) {
|
|
68
|
+
background: var(--matcha-color-accent-surface-hover);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// ── Danger ──
|
|
73
|
+
&.matcha-option--danger {
|
|
74
|
+
color: var(--matcha-color-danger);
|
|
75
|
+
|
|
76
|
+
&:hover:not([aria-disabled="true"]) {
|
|
77
|
+
background: var(--matcha-color-danger-surface-hover);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// ── Disabled — Figma DSV3 matcha/option: opacity 0.5 (não 0.38 do token global) ──
|
|
82
|
+
// O componente Figma especifica 0.5 explicitamente — visualmente mais leve do que
|
|
83
|
+
// 0.38 do --matcha-opacity-disabled (Material 3 default). Mantemos fidelidade ao Figma.
|
|
84
|
+
&[aria-disabled="true"],
|
|
85
|
+
&[disabled],
|
|
86
|
+
&.matcha-option-disabled {
|
|
87
|
+
color: var(--matcha-color-interaction-disabled-fg);
|
|
88
|
+
opacity: var(--matcha-opacity-option-disabled, 0.5);
|
|
89
|
+
background: transparent;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ── Focused — border 2px primary/default (Figma DSV3) sem deslocar layout ──
|
|
93
|
+
// outline-offset negativo simula border interno sem afetar box-sizing.
|
|
94
|
+
&:focus-visible:not([aria-disabled="true"]):not([disabled]):not(.matcha-option-disabled) {
|
|
95
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-primary);
|
|
96
|
+
outline-offset: calc(-1 * var(--matcha-state-focus-ring-width, 2px));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ── Keyboard highlight (cursor de navegação, orthogonal a selected) ──
|
|
100
|
+
// Aplicado pelo matcha-select ao navegar com ArrowUp/Down.
|
|
101
|
+
&.matcha-option-highlighted:not([aria-disabled="true"]):not([disabled]) {
|
|
102
|
+
background: color-mix(
|
|
103
|
+
in srgb,
|
|
104
|
+
var(--matcha-color-state-layer-fg) calc(var(--matcha-state-layer-hover, 0.08) * 100%),
|
|
105
|
+
transparent
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
// Combinado com selected: mantém tint accent + leve intensificação
|
|
109
|
+
&[aria-selected="true"] {
|
|
110
|
+
background: var(--matcha-color-accent-surface-hover);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// ── Modo múltiplo (matcha-select-multiple) — checkbox à esquerda ──
|
|
115
|
+
// O realce do item marcado é o próprio checkbox; por isso o fundo
|
|
116
|
+
// accent/alpha do single-select é neutralizado quando não há hover/cursor.
|
|
117
|
+
&.matcha-option-multiple {
|
|
118
|
+
gap: var(--matcha-space-100, 8px);
|
|
119
|
+
|
|
120
|
+
&[aria-selected="true"]:not(:hover):not(.matcha-option-highlighted) {
|
|
121
|
+
background: transparent;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.matcha-option-checkbox {
|
|
125
|
+
display: inline-flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
// Checkbox é puramente visual: o clique cai no host matcha-option,
|
|
128
|
+
// que faz o toggle (tanto na opção quanto sobre o checkbox).
|
|
129
|
+
pointer-events: none;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// ── Forced colors ──
|
|
136
|
+
@media (forced-colors: active) {
|
|
137
|
+
matcha-option {
|
|
138
|
+
color: CanvasText !important;
|
|
139
|
+
|
|
140
|
+
&:hover:not(.is-disabled):not([disabled]) {
|
|
141
|
+
background: SelectedItem !important;
|
|
142
|
+
color: SelectedItemText !important;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&.is-active,
|
|
146
|
+
&[active],
|
|
147
|
+
&[aria-selected="true"] {
|
|
148
|
+
background: Highlight !important;
|
|
149
|
+
color: HighlightText !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:focus-visible {
|
|
153
|
+
outline: 2px solid CanvasText !important;
|
|
154
|
+
outline-offset: -2px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.is-disabled,
|
|
158
|
+
&[disabled] {
|
|
159
|
+
color: GrayText !important;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// ── Print ──
|
|
165
|
+
// Options são parte de UI interativa — não renderizam em papel.
|
|
166
|
+
@media print {
|
|
167
|
+
matcha-option {
|
|
168
|
+
display: none !important;
|
|
169
|
+
}
|
|
170
|
+
}
|