@inchurch/matcha-theme 20.0.11 → 20.276.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 +404 -404
- package/abstracts/_elevation.scss +102 -102
- package/abstracts/_functions.scss +1212 -1212
- package/abstracts/_media-breakpoint.scss +23 -23
- package/abstracts/_typography.scss +127 -127
- package/base/_reset.scss +438 -438
- package/components/app-page-header.scss +260 -0
- package/components/matcha-accordion.scss +294 -157
- package/components/matcha-avatar.scss +171 -31
- package/components/matcha-badge.scss +4 -4
- package/components/matcha-breadcrumb.scss +232 -126
- package/components/matcha-button-toggle.scss +44 -0
- package/components/matcha-buttons.scss +908 -784
- package/components/matcha-calendar.scss +70 -2
- package/components/matcha-cards.scss +28 -2
- package/components/matcha-checkbox.scss +191 -490
- package/components/matcha-chip.scss +297 -212
- package/components/matcha-command-palette.scss +291 -63
- package/components/matcha-crop.scss +407 -172
- package/components/matcha-date.scss +81 -81
- package/components/matcha-divider.scss +86 -31
- package/components/matcha-drawer.scss +201 -50
- package/components/matcha-drop-image.scss +14 -0
- package/components/matcha-drop-list.scss +42 -1
- package/components/matcha-empty-state.scss +195 -83
- package/components/matcha-flag.scss +93 -52
- package/components/matcha-footer.scss +68 -164
- package/components/matcha-form-field.scss +52 -0
- package/components/matcha-form-section.scss +101 -101
- package/components/matcha-header.scss +135 -325
- package/components/matcha-highlight.scss +65 -197
- package/components/matcha-hint-text.scss +21 -0
- package/components/matcha-horizontal-tree.scss +317 -317
- package/components/matcha-icon.scss +17 -25
- package/components/matcha-list.scss +5 -5
- package/components/matcha-menu.scss +13 -0
- package/components/matcha-modal.scss +58 -84
- package/components/matcha-nav.scss +361 -230
- package/components/matcha-notification.scss +413 -197
- package/components/matcha-option.scss +79 -23
- package/components/matcha-paginator.scss +689 -235
- package/components/matcha-panel.scss +42 -26
- package/components/matcha-profile-card.scss +50 -50
- package/components/matcha-progress-bar.scss +257 -153
- package/components/matcha-radio.scss +244 -452
- package/components/matcha-scrollbox-shadow.scss +122 -122
- package/components/matcha-select.scss +3 -3
- package/components/matcha-skeleton.scss +18 -0
- package/components/matcha-slide-toggle.scss +47 -2
- package/components/matcha-slider.scss +172 -75
- package/components/matcha-snack-bar.scss +114 -121
- package/components/matcha-spinner.scss +76 -57
- package/components/matcha-status-pill.scss +82 -0
- package/components/matcha-stepper.scss +377 -177
- package/components/matcha-table.scss +569 -785
- package/components/matcha-tabs.scss +624 -469
- package/components/matcha-toolbar.scss +359 -206
- package/components/matcha-tooltip.scss +156 -62
- package/components/matcha-tree-view.scss +189 -0
- package/components/matcha-uploader.scss +240 -62
- package/fonts/manrope/manrope-latin-ext.woff2 +0 -0
- package/fonts/manrope/manrope-latin.woff2 +0 -0
- package/layout/matcha-page-layout.scss +4 -4
- package/main.scss +232 -265
- package/package.json +1 -1
- package/tokens/_animations-tokens.scss +37 -37
- package/tokens/_breakpoints-tokens.scss +35 -26
- package/tokens/_color-tokens.scss +1152 -1152
- package/tokens/_css-custom-properties.scss +650 -568
- package/tokens/_spacing-tokens.scss +94 -94
- package/vendors/angular-editor.scss +56 -56
- package/vendors/angular-material-fixes.scss +297 -297
- package/vendors/charts.scss +92 -92
- package/vendors/ng5-slider.scss +56 -56
- package/vendors/ngx-material-timepicker.scss +50 -50
- package/fonts/CircularStd-Black.eot +0 -0
- package/fonts/CircularStd-Black.svg +0 -3426
- package/fonts/CircularStd-Black.ttf +0 -0
- package/fonts/CircularStd-Black.woff +0 -0
- package/fonts/CircularStd-Black.woff2 +0 -0
- package/fonts/CircularStd-Bold.eot +0 -0
- package/fonts/CircularStd-Bold.otf +0 -0
- package/fonts/CircularStd-Bold.svg +0 -13532
- package/fonts/CircularStd-Bold.ttf +0 -0
- package/fonts/CircularStd-Bold.woff +0 -0
- package/fonts/CircularStd-Bold.woff2 +0 -0
- package/fonts/CircularStd-Medium.eot +0 -0
- package/fonts/CircularStd-Medium.otf +0 -0
- package/fonts/CircularStd-Medium.svg +0 -13511
- package/fonts/CircularStd-Medium.ttf +0 -0
- package/fonts/CircularStd-Medium.woff +0 -0
- package/fonts/CircularStd-Medium.woff2 +0 -0
- package/fonts/CircularStd-Regular.eot +0 -0
- package/fonts/CircularStd-Regular.otf +0 -0
- package/fonts/CircularStd-Regular.svg +0 -2378
- package/fonts/CircularStd-Regular.ttf +0 -0
- package/fonts/CircularStd-Regular.woff +0 -0
- package/fonts/CircularStd-Regular.woff2 +0 -0
|
@@ -1,128 +1,222 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
|
-
// matcha-tooltip.scss — Tooltip with arrow (4 positions + close
|
|
3
|
-
// Aligned with Figma matcha/tooltip
|
|
2
|
+
// matcha-tooltip.scss — Tooltip with arrow (4 positions + close variant)
|
|
3
|
+
// Aligned with Figma DSV3 matcha/tooltip (14846:89): 5 variants
|
|
4
|
+
//
|
|
5
|
+
// Figma canonical:
|
|
6
|
+
// bg = var(--matcha-color-text-primary, #e8eaed) (light em dark theme)
|
|
7
|
+
// text = var(--matcha-color-surface-card, #1c1f26) (dark sobre bg light)
|
|
8
|
+
// pad = 8 16 (variante close: 8 12 8 16, gap 8)
|
|
9
|
+
// radius = 8 (var(--matcha-radius-lg))
|
|
10
|
+
// font = Manrope Medium 14/20, letter-spacing 0.2
|
|
11
|
+
// arrow = 13.856 × 6 (triângulo, mesma cor do bg)
|
|
4
12
|
// =============================================================================
|
|
5
13
|
|
|
6
14
|
.matcha-tooltip-content {
|
|
7
|
-
// Figma matcha/tooltip: pad 8/16, radius 8, text 14/500/20 (Medium)
|
|
8
15
|
position: absolute;
|
|
9
16
|
z-index: var(--matcha-z-tooltip, 400);
|
|
17
|
+
|
|
10
18
|
padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
|
|
11
19
|
border-radius: var(--matcha-radius-lg, 8px);
|
|
12
|
-
|
|
20
|
+
|
|
21
|
+
font-family: var(--matcha-font-family, 'Manrope', sans-serif);
|
|
22
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
13
23
|
font-weight: var(--matcha-weight-medium, 500);
|
|
14
24
|
line-height: var(--matcha-leading-body-md, 20px);
|
|
25
|
+
letter-spacing: 0.2px;
|
|
26
|
+
|
|
15
27
|
width: auto;
|
|
16
28
|
max-width: 500px;
|
|
17
29
|
text-overflow: ellipsis;
|
|
30
|
+
|
|
18
31
|
display: inline-flex;
|
|
19
|
-
gap: var(--matcha-space-100, 8px);
|
|
20
32
|
align-items: center;
|
|
21
33
|
justify-content: center;
|
|
34
|
+
gap: var(--matcha-space-100, 8px);
|
|
22
35
|
text-align: center;
|
|
36
|
+
// pointer-events: auto pra cursor poder entrar no overlay e cancelar o hideDelay
|
|
37
|
+
// (permite seleção/cópia do texto sem perder o tooltip). Margin de 8px com host
|
|
38
|
+
// garante que não há sobreposição do clique.
|
|
39
|
+
pointer-events: auto;
|
|
23
40
|
|
|
24
|
-
//
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
position: absolute;
|
|
28
|
-
width: 0;
|
|
29
|
-
height: 0;
|
|
30
|
-
border-style: solid;
|
|
31
|
-
border-width: 6px 8px 0 8px;
|
|
32
|
-
bottom: -4px;
|
|
33
|
-
left: 50%;
|
|
34
|
-
border-radius: var(--matcha-radius-none, 0);
|
|
35
|
-
transform: translateX(-50%);
|
|
41
|
+
// Variante com close — gap 8, pr-12 (espaço pro X)
|
|
42
|
+
&.matcha-tooltip-content--with-close {
|
|
43
|
+
padding-right: var(--matcha-space-150, 12px);
|
|
36
44
|
}
|
|
37
45
|
}
|
|
38
46
|
|
|
39
|
-
//
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
// ── Arrow (mesma cor do bg) — 13.856×6 — ::after triangular ────────────────
|
|
48
|
+
// Tamanho via border-style: solid trick. base 13.856 ≈ 2×7px borders → border-width
|
|
49
|
+
// horizontal ~7, vertical 6. Mantemos arredondado pelo Figma (13.856 × 6).
|
|
50
|
+
//
|
|
51
|
+
// Posicionamento: arrow normalmente centrada no box (left: 50% ou top: 50%), mas
|
|
52
|
+
// quando o tooltip é clamped pela viewport, o directive computa um shift em px
|
|
53
|
+
// (--matcha-tooltip-arrow-shift-x / -y) pra arrow re-alinhar com o trigger.
|
|
54
|
+
// Default 0px (fallback puro 50% — comportamento padrão sem clamp).
|
|
55
|
+
.matcha-tooltip-content_above::after {
|
|
56
|
+
content: '';
|
|
57
|
+
position: absolute;
|
|
58
|
+
width: 0;
|
|
59
|
+
height: 0;
|
|
60
|
+
border-style: solid;
|
|
61
|
+
border-width: 6px 7px 0 7px;
|
|
62
|
+
bottom: -6px;
|
|
63
|
+
left: calc(50% + var(--matcha-tooltip-arrow-shift-x, 0px));
|
|
64
|
+
transform: translateX(-50%);
|
|
56
65
|
}
|
|
57
66
|
|
|
58
|
-
|
|
59
|
-
.matcha-tooltip-content_below::before {
|
|
67
|
+
.matcha-tooltip-content_below::after {
|
|
60
68
|
content: '';
|
|
61
69
|
position: absolute;
|
|
62
70
|
width: 0;
|
|
63
71
|
height: 0;
|
|
64
72
|
border-style: solid;
|
|
65
|
-
border-width:
|
|
66
|
-
top: -
|
|
67
|
-
left: 50
|
|
73
|
+
border-width: 0 7px 6px 7px;
|
|
74
|
+
top: -6px;
|
|
75
|
+
left: calc(50% + var(--matcha-tooltip-arrow-shift-x, 0px));
|
|
68
76
|
transform: translateX(-50%);
|
|
69
77
|
}
|
|
70
78
|
|
|
71
|
-
// Arrow — left (arrow points right)
|
|
72
79
|
.matcha-tooltip-content_left::after {
|
|
73
80
|
content: '';
|
|
74
81
|
position: absolute;
|
|
75
82
|
width: 0;
|
|
76
83
|
height: 0;
|
|
77
84
|
border-style: solid;
|
|
78
|
-
border-width:
|
|
79
|
-
top: 50
|
|
80
|
-
right: -
|
|
85
|
+
border-width: 7px 0 7px 6px;
|
|
86
|
+
top: calc(50% + var(--matcha-tooltip-arrow-shift-y, 0px));
|
|
87
|
+
right: -6px;
|
|
81
88
|
transform: translateY(-50%);
|
|
82
89
|
}
|
|
83
90
|
|
|
84
|
-
// Arrow — right (arrow points left)
|
|
85
91
|
.matcha-tooltip-content_right::after {
|
|
86
92
|
content: '';
|
|
87
93
|
position: absolute;
|
|
88
94
|
width: 0;
|
|
89
95
|
height: 0;
|
|
90
96
|
border-style: solid;
|
|
91
|
-
border-width:
|
|
92
|
-
top: 50
|
|
93
|
-
left: -
|
|
97
|
+
border-width: 7px 6px 7px 0;
|
|
98
|
+
top: calc(50% + var(--matcha-tooltip-arrow-shift-y, 0px));
|
|
99
|
+
left: -6px;
|
|
94
100
|
transform: translateY(-50%);
|
|
95
101
|
}
|
|
96
102
|
|
|
97
|
-
// ──
|
|
103
|
+
// ── Close button (16×16 com X via Matcha icon font) ────────────────────────
|
|
104
|
+
.matcha-tooltip-close {
|
|
105
|
+
appearance: none;
|
|
106
|
+
background: transparent;
|
|
107
|
+
border: 0;
|
|
108
|
+
padding: 0;
|
|
109
|
+
margin: 0;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
width: 16px;
|
|
115
|
+
height: 16px;
|
|
116
|
+
flex-shrink: 0;
|
|
117
|
+
pointer-events: auto;
|
|
118
|
+
transition: opacity var(--matcha-duration-instant, 80ms) ease;
|
|
119
|
+
|
|
120
|
+
&::before {
|
|
121
|
+
content: "\e92a";
|
|
122
|
+
font-family: 'MatchaIcons';
|
|
123
|
+
font-size: var(--matcha-icon-size-sm, 16px);
|
|
124
|
+
line-height: 16px;
|
|
125
|
+
width: 16px;
|
|
126
|
+
height: 16px;
|
|
127
|
+
display: inline-flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&:focus-visible {
|
|
133
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-primary);
|
|
134
|
+
outline-offset: 2px;
|
|
135
|
+
border-radius: var(--matcha-radius-sm, 4px);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
98
138
|
|
|
139
|
+
// =============================================================================
|
|
140
|
+
// Theme mixin — cores do bg/text/arrow vinculadas ao tema
|
|
141
|
+
// =============================================================================
|
|
99
142
|
@mixin matcha-tooltip-theme($theme) {
|
|
100
143
|
.matcha-tooltip-content {
|
|
101
|
-
|
|
102
|
-
color: var(--matcha-color-text-
|
|
144
|
+
// Figma: bg = text-primary (light em dark theme), text = surface-card (dark)
|
|
145
|
+
background-color: var(--matcha-color-text-primary, #{getForeground($theme)});
|
|
146
|
+
color: var(--matcha-color-surface-card, #{getForegroundInverse($theme)});
|
|
147
|
+
box-shadow: var(--matcha-shadow-2, 0 4px 12px rgba(0, 0, 0, 0.18));
|
|
148
|
+
}
|
|
103
149
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
150
|
+
// Arrow: mesma cor do bg, lado oposto à direção do tooltip
|
|
151
|
+
.matcha-tooltip-content_above::after {
|
|
152
|
+
border-color: var(--matcha-color-text-primary, #{getForeground($theme)})
|
|
153
|
+
transparent transparent transparent;
|
|
154
|
+
}
|
|
155
|
+
.matcha-tooltip-content_below::after {
|
|
156
|
+
border-color: transparent transparent
|
|
157
|
+
var(--matcha-color-text-primary, #{getForeground($theme)}) transparent;
|
|
158
|
+
}
|
|
159
|
+
.matcha-tooltip-content_left::after {
|
|
160
|
+
border-color: transparent transparent transparent
|
|
161
|
+
var(--matcha-color-text-primary, #{getForeground($theme)});
|
|
162
|
+
}
|
|
163
|
+
.matcha-tooltip-content_right::after {
|
|
164
|
+
border-color: transparent
|
|
165
|
+
var(--matcha-color-text-primary, #{getForeground($theme)})
|
|
166
|
+
transparent transparent;
|
|
108
167
|
}
|
|
109
168
|
|
|
110
|
-
.matcha-tooltip-
|
|
111
|
-
|
|
169
|
+
.matcha-tooltip-close {
|
|
170
|
+
color: var(--matcha-color-surface-card, #{getForegroundInverse($theme)});
|
|
171
|
+
opacity: 0.7;
|
|
172
|
+
|
|
173
|
+
&:hover { opacity: 1; }
|
|
174
|
+
&:active { opacity: 0.9; }
|
|
112
175
|
}
|
|
176
|
+
}
|
|
113
177
|
|
|
114
|
-
|
|
115
|
-
|
|
178
|
+
// =============================================================================
|
|
179
|
+
// A11y / modernity media queries
|
|
180
|
+
// =============================================================================
|
|
181
|
+
|
|
182
|
+
// Forced colors (Windows High Contrast) — usa system colors visíveis.
|
|
183
|
+
@media (forced-colors: active) {
|
|
184
|
+
.matcha-tooltip-content {
|
|
185
|
+
background: Canvas !important;
|
|
186
|
+
color: CanvasText !important;
|
|
187
|
+
border: 1px solid CanvasText;
|
|
188
|
+
box-shadow: none !important;
|
|
116
189
|
}
|
|
117
190
|
|
|
191
|
+
.matcha-tooltip-content_above::after,
|
|
192
|
+
.matcha-tooltip-content_below::after,
|
|
193
|
+
.matcha-tooltip-content_left::after,
|
|
118
194
|
.matcha-tooltip-content_right::after {
|
|
119
|
-
|
|
195
|
+
// Arrow vira invisível em high-contrast (sem solução elegante com border-color),
|
|
196
|
+
// a borda do tooltip cobre a função de delimitação visual.
|
|
197
|
+
display: none;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.matcha-tooltip-close:focus-visible {
|
|
201
|
+
outline: 2px solid CanvasText !important;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// Reduced motion — entra/sai sem animação.
|
|
206
|
+
@media (prefers-reduced-motion: reduce) {
|
|
207
|
+
.matcha-tooltip-content {
|
|
208
|
+
transition: none !important;
|
|
209
|
+
animation: none !important;
|
|
120
210
|
}
|
|
121
211
|
|
|
122
212
|
.matcha-tooltip-close {
|
|
123
|
-
|
|
124
|
-
|
|
213
|
+
transition: none !important;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
125
216
|
|
|
126
|
-
|
|
217
|
+
// Print — chrome flutuante some.
|
|
218
|
+
@media print {
|
|
219
|
+
.matcha-tooltip-content {
|
|
220
|
+
display: none !important;
|
|
127
221
|
}
|
|
128
222
|
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// matcha-tree-view.scss — Slot row indentado por nível hierárquico
|
|
3
|
+
// Componente é um FRAME minimal (indent + estados). Consumer compõe o conteúdo
|
|
4
|
+
// livre via ng-content. Responsivo via container queries.
|
|
5
|
+
// =============================================================================
|
|
6
|
+
|
|
7
|
+
// ── Container opcional (qualquer wrapper .matcha-tree-view) ─────────────────
|
|
8
|
+
// Provê: bg "tray" Figma + gap entre rows + propagação de gap dentro de drop-list.
|
|
9
|
+
.matcha-tree-view {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: var(--matcha-space-050, 4px);
|
|
13
|
+
padding: var(--matcha-space-200, 16px);
|
|
14
|
+
background: var(--matcha-color-surface-background);
|
|
15
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
16
|
+
|
|
17
|
+
// Container queries — base pra responsivo dos filhos
|
|
18
|
+
container-type: inline-size;
|
|
19
|
+
container-name: matcha-tree-view;
|
|
20
|
+
|
|
21
|
+
.matcha-drop-list-container {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
gap: var(--matcha-space-050, 4px);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// ── Item host — flex row com indent dinâmico ────────────────────────────────
|
|
29
|
+
matcha-tree-view-item {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
align-items: stretch;
|
|
33
|
+
width: 100%;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
outline: none;
|
|
36
|
+
|
|
37
|
+
// Disabled
|
|
38
|
+
&[disabled] {
|
|
39
|
+
opacity: 0.5;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Clickable
|
|
44
|
+
&[clickable]:not([disabled]) {
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
|
|
47
|
+
&:focus-visible .matcha-tree-view-item__row {
|
|
48
|
+
outline: 2px solid var(--matcha-color-accent);
|
|
49
|
+
outline-offset: -2px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// ── Indent (Nível 2+) — width vem inline do componente ──────────────────────
|
|
55
|
+
.matcha-tree-view-item__indent {
|
|
56
|
+
flex: none;
|
|
57
|
+
// height auto — se ajusta ao row
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ── Row — bg transparente por default; container .matcha-tree-view dá bg card
|
|
61
|
+
.matcha-tree-view-item__row {
|
|
62
|
+
flex: 1;
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: row;
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: var(--matcha-space-100, 8px);
|
|
67
|
+
min-height: 48px;
|
|
68
|
+
padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
|
|
69
|
+
background: transparent;
|
|
70
|
+
border-bottom: 1px solid var(--matcha-color-surface-border);
|
|
71
|
+
border-radius: var(--matcha-radius-md, 4px);
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
min-width: 0;
|
|
74
|
+
transition: background-color var(--matcha-duration-instant, 80ms) ease;
|
|
75
|
+
|
|
76
|
+
// Permitir conteúdo wrap se consumer quiser
|
|
77
|
+
flex-wrap: var(--matcha-tree-view-item-wrap, nowrap);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Hover sutil na row
|
|
81
|
+
matcha-tree-view-item:not([disabled]):hover .matcha-tree-view-item__row {
|
|
82
|
+
background: var(--matcha-color-surface-hover);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ── Estilos comuns dos slots opcionais (CSS classes utilitárias do DS) ─────
|
|
86
|
+
// Consumer aplica esses classes nos elementos projetados; o componente NÃO impõe.
|
|
87
|
+
// .matcha-tree-view-item__grip — aplicado automaticamente pela diretiva matchaTreeViewGrip.
|
|
88
|
+
.matcha-tree-view-item__grip {
|
|
89
|
+
flex: none;
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
width: 24px;
|
|
94
|
+
height: 24px;
|
|
95
|
+
--matcha-icon-color: var(--matcha-color-text-muted);
|
|
96
|
+
cursor: grab;
|
|
97
|
+
transition: --matcha-icon-color var(--matcha-duration-instant, 80ms) ease;
|
|
98
|
+
|
|
99
|
+
&:hover { --matcha-icon-color: var(--matcha-color-text-primary); }
|
|
100
|
+
&:active { cursor: grabbing; }
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Dentro do container canon (.matcha-tree-view), row ganha bg "card on tray" (Figma)
|
|
104
|
+
.matcha-tree-view matcha-tree-view-item:not([disabled]) .matcha-tree-view-item__row {
|
|
105
|
+
background: var(--matcha-color-surface-card);
|
|
106
|
+
}
|
|
107
|
+
.matcha-tree-view matcha-tree-view-item:not([disabled]):hover .matcha-tree-view-item__row {
|
|
108
|
+
background: var(--matcha-color-surface-card-strong, var(--matcha-color-surface-card));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// ── DnD states (compõe com matcha-drop-list) ────────────────────────────────
|
|
112
|
+
.matcha-drag-item.matcha-drag-dragging {
|
|
113
|
+
opacity: 0.35;
|
|
114
|
+
|
|
115
|
+
.matcha-tree-view-item__row { background: var(--matcha-color-surface-hover); }
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.matcha-tree-view .matcha-drop-list-placeholder {
|
|
119
|
+
height: 4px;
|
|
120
|
+
margin: var(--matcha-space-050, 4px) 0;
|
|
121
|
+
background: var(--matcha-color-accent);
|
|
122
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
123
|
+
opacity: 0.85;
|
|
124
|
+
box-shadow: 0 0 0 2px var(--matcha-color-accent-alpha, rgba(168, 217, 78, 0.2));
|
|
125
|
+
animation: matcha-tree-view-pulse 800ms ease-in-out infinite alternate;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@keyframes matcha-tree-view-pulse {
|
|
129
|
+
from { opacity: 0.7; }
|
|
130
|
+
to { opacity: 1; }
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.matcha-tree-view .matcha-drop-list-empty-placeholder {
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
padding: var(--matcha-space-400, 32px);
|
|
138
|
+
font-size: var(--matcha-text-body-sm, 12px);
|
|
139
|
+
color: var(--matcha-color-text-muted);
|
|
140
|
+
border: 2px dashed var(--matcha-color-surface-border);
|
|
141
|
+
border-radius: var(--matcha-radius-md, 4px);
|
|
142
|
+
background: transparent;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.matcha-drag-item.matcha-drag-dragging .matcha-tree-view-item__grip { cursor: grabbing; }
|
|
146
|
+
|
|
147
|
+
// ── Entrance animation ──────────────────────────────────────────────────────
|
|
148
|
+
matcha-tree-view-item:not(.matcha-drag-dragging) {
|
|
149
|
+
animation: matcha-tree-view-item-in 220ms cubic-bezier(0.4, 0, 0.2, 1) both;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@keyframes matcha-tree-view-item-in {
|
|
153
|
+
from { opacity: 0; transform: translateY(-4px); }
|
|
154
|
+
to { opacity: 1; transform: translateY(0); }
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// ── Responsividade — container query baseada no .matcha-tree-view container
|
|
158
|
+
// Em containers estreitos (< 480px), reduz indent visual pra preservar espaço útil.
|
|
159
|
+
// Indent visual = padding-left implícito via --matcha-tree-view-item-indent setado
|
|
160
|
+
// inline pelo componente. Container query NÃO consegue overridar inline style
|
|
161
|
+
// diretamente, então usamos uma estratégia diferente: scale do indent div.
|
|
162
|
+
@container matcha-tree-view (max-width: 480px) {
|
|
163
|
+
.matcha-tree-view-item__indent {
|
|
164
|
+
// Reduz 50% do width inline — preserva indent visual sem perder hierarquia
|
|
165
|
+
transform: scaleX(0.6);
|
|
166
|
+
transform-origin: left center;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.matcha-tree-view-item__row {
|
|
170
|
+
gap: var(--matcha-space-050, 4px);
|
|
171
|
+
padding: var(--matcha-space-100, 8px);
|
|
172
|
+
min-height: 44px; // touch target WCAG 2.5.5 em mobile
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Respeita preferência de redução de movimento
|
|
177
|
+
@media (prefers-reduced-motion: reduce) {
|
|
178
|
+
matcha-tree-view-item,
|
|
179
|
+
matcha-tree-view-item:not(.matcha-drag-dragging),
|
|
180
|
+
.matcha-tree-view .matcha-drop-list-placeholder {
|
|
181
|
+
animation: none !important;
|
|
182
|
+
transition: none !important;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ── Theme mixin ─────────────────────────────────────────────────────────────
|
|
187
|
+
@mixin matcha-tree-view-theme($theme) {
|
|
188
|
+
// Tudo via CSS vars — sem theme-specific overrides.
|
|
189
|
+
}
|