@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,293 +1,293 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
// =============================================================================
|
|
4
|
-
// matcha-accordion.scss — Collapsible card sections (Figma 15808:51)
|
|
5
|
-
// Estado(3): Fechado, Aberto, Disabled.
|
|
6
|
-
// CSS-only animation via grid-template-rows: 0fr → 1fr (modern, perf-friendly,
|
|
7
|
-
// dispensa Angular Animations e medição JS de altura).
|
|
8
|
-
// =============================================================================
|
|
9
|
-
|
|
10
|
-
@mixin matcha-accordion-theme($theme) {
|
|
11
|
-
|
|
12
|
-
matcha-accordion-item {
|
|
13
|
-
.accordion-item {
|
|
14
|
-
// Figma DSV3 (15808:51): bg = matcha/color/surface/card (canônico)
|
|
15
|
-
background: var(--matcha-color-surface-card);
|
|
16
|
-
border-radius: var(--matcha-radius-lg, 8px);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// ── Native button reset + state layer ──
|
|
20
|
-
// Slot --matcha-accordion-header-color pra consumer override.
|
|
21
|
-
.accordion-header-button {
|
|
22
|
-
color: var(--matcha-accordion-header-color, var(--matcha-color-fg));
|
|
23
|
-
|
|
24
|
-
// Hover/active/focus só aplicam ao <button>; modificador --static (div, modo
|
|
25
|
-
// clickableHeader=false) não tem state-layer e não recebe focus-ring direto.
|
|
26
|
-
&:not(.accordion-header-button--static) {
|
|
27
|
-
&:hover:not(:disabled) {
|
|
28
|
-
.accordion-header-state {
|
|
29
|
-
opacity: var(--matcha-state-hover, 0.08);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&:active:not(:disabled) {
|
|
34
|
-
.accordion-header-state {
|
|
35
|
-
opacity: var(--matcha-state-active, 0.12);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&:focus-visible {
|
|
40
|
-
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
|
|
41
|
-
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
42
|
-
border-radius: var(--matcha-radius-lg, 8px);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// ── Content text ──
|
|
48
|
-
.accordion-content {
|
|
49
|
-
color: var(--matcha-color-text-label);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// ── Chevron ──
|
|
53
|
-
.accordion-chevron {
|
|
54
|
-
color: var(--matcha-color-icon-default);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// ── Disabled ──
|
|
58
|
-
&.disabled {
|
|
59
|
-
opacity: 0.5;
|
|
60
|
-
pointer-events: none;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
66
|
-
|
|
67
|
-
matcha-accordion {
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
gap: var(--matcha-space-200, 16px);
|
|
71
|
-
width: 100%;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
matcha-accordion-item {
|
|
75
|
-
display: block;
|
|
76
|
-
|
|
77
|
-
.accordion-item {
|
|
78
|
-
display: flex;
|
|
79
|
-
flex-direction: column;
|
|
80
|
-
// Figma DSV3 atualizado (15808:51): padding compactado pra 16 (space-200).
|
|
81
|
-
padding: var(--matcha-space-200, 16px);
|
|
82
|
-
overflow: hidden;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// ── Heading wrapper (role="heading") ──
|
|
86
|
-
.accordion-heading {
|
|
87
|
-
margin: 0;
|
|
88
|
-
font: inherit; // não herda H3 default do user-agent
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// ── Header layout — aplica ao <button> (clickable) E ao <div> (--static).
|
|
92
|
-
// cursor:pointer só no <button> via type-selector pra div estática herdar default.
|
|
93
|
-
.accordion-header-button {
|
|
94
|
-
display: flex;
|
|
95
|
-
align-items: center;
|
|
96
|
-
justify-content: space-between;
|
|
97
|
-
gap: var(--matcha-space-200, 16px);
|
|
98
|
-
width: 100%;
|
|
99
|
-
padding: 0;
|
|
100
|
-
margin: 0;
|
|
101
|
-
border: none;
|
|
102
|
-
background: none;
|
|
103
|
-
color: inherit;
|
|
104
|
-
font: inherit;
|
|
105
|
-
text-align: left;
|
|
106
|
-
position: relative;
|
|
107
|
-
|
|
108
|
-
// Figma DSV3 atualizado (15808:51): título 18/24 SemiBold no accordion compact.
|
|
109
|
-
// Não bate nenhum size canônico do matcha-title (3=16/18, 4=20/28) — override
|
|
110
|
-
// contextual aqui no accordion. Canônico (15808:51): sempre 1 linha + ellipsis.
|
|
111
|
-
//
|
|
112
|
-
// DOM real após projeção:
|
|
113
|
-
// .accordion-header-slot
|
|
114
|
-
// └── matcha-accordion-header (slot wrapper do consumer — display: inline default)
|
|
115
|
-
// └── matcha-title (host inline-flex: sign + text)
|
|
116
|
-
// └── .matcha-title__text (display: inline-block)
|
|
117
|
-
//
|
|
118
|
-
// Pra constraint de largura propagar até o text element, cada nível precisa
|
|
119
|
-
// ser flex + max-width: 100% + min-width: 0. Sem isso, o inline-flex/inline-block
|
|
120
|
-
// calcula largura pelo conteúdo (sem shrink) e o texto wrappa.
|
|
121
|
-
.accordion-header-slot {
|
|
122
|
-
flex: 1 1 auto;
|
|
123
|
-
min-width: 0;
|
|
124
|
-
overflow: hidden;
|
|
125
|
-
font-size: 18px;
|
|
126
|
-
font-weight: var(--matcha-weight-semibold, 600);
|
|
127
|
-
line-height: 24px;
|
|
128
|
-
|
|
129
|
-
matcha-accordion-header {
|
|
130
|
-
display: flex;
|
|
131
|
-
align-items: center;
|
|
132
|
-
max-width: 100%;
|
|
133
|
-
min-width: 0;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
matcha-title {
|
|
137
|
-
display: flex;
|
|
138
|
-
align-items: center;
|
|
139
|
-
gap: var(--matcha-space-100, 8px);
|
|
140
|
-
flex: 1 1 auto;
|
|
141
|
-
max-width: 100%;
|
|
142
|
-
min-width: 0;
|
|
143
|
-
|
|
144
|
-
> .matcha-title__text {
|
|
145
|
-
flex: 1 1 auto;
|
|
146
|
-
min-width: 0;
|
|
147
|
-
overflow: hidden;
|
|
148
|
-
text-overflow: ellipsis;
|
|
149
|
-
white-space: nowrap;
|
|
150
|
-
// Override do matcha-title size 4 (20/28 ExtraBold) → 18/24 SemiBold (Figma DSV3 accordion compact)
|
|
151
|
-
font-size: 18px;
|
|
152
|
-
font-weight: var(--matcha-weight-semibold, 600);
|
|
153
|
-
line-height: 24px;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Cursor pointer + disabled cursor só no <button>; <div>--static herda default.
|
|
160
|
-
button.accordion-header-button {
|
|
161
|
-
cursor: pointer;
|
|
162
|
-
|
|
163
|
-
&:disabled {
|
|
164
|
-
cursor: default;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// ── State layer on header (hover/active overlay) ──
|
|
169
|
-
// mask-image faz fade-out na parte de baixo pra não terminar abruptamente
|
|
170
|
-
// no divider (visível quando aberto). Gradiente: opaco até 60%, transparente em 100%.
|
|
171
|
-
.accordion-header-state {
|
|
172
|
-
position: absolute;
|
|
173
|
-
// Inset negativo cobre o padding 16 da card (estende state-layer até as bordas).
|
|
174
|
-
inset: calc(var(--matcha-space-200, 16px) * -1);
|
|
175
|
-
background: currentColor;
|
|
176
|
-
opacity: 0;
|
|
177
|
-
pointer-events: none;
|
|
178
|
-
border-radius: var(--matcha-radius-lg, 8px);
|
|
179
|
-
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
180
|
-
|
|
181
|
-
-webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
|
|
182
|
-
mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// ── Trailing slot (chevron default ou conteúdo custom) ──
|
|
186
|
-
.accordion-trailing {
|
|
187
|
-
display: inline-flex;
|
|
188
|
-
align-items: center;
|
|
189
|
-
flex-shrink: 0;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// ── Chevron ──
|
|
193
|
-
// Figma DSV3 atualizado: chevron 16×16 (sm), reduzido de 24 (md).
|
|
194
|
-
.accordion-chevron {
|
|
195
|
-
width: var(--matcha-icon-size-sm, 16px);
|
|
196
|
-
height: var(--matcha-icon-size-sm, 16px);
|
|
197
|
-
transition: transform var(--matcha-duration-moderate, 300ms) cubic-bezier(0.4, 0, 0.2, 1);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
&.is-open .accordion-chevron {
|
|
201
|
-
transform: rotate(180deg);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// ── Content (CSS grid-template-rows trick para altura animada) ──
|
|
205
|
-
// Closed: grid-template-rows: 0fr → inner colapsa (overflow:hidden).
|
|
206
|
-
// Open: grid-template-rows: 1fr → inner expande até altura natural.
|
|
207
|
-
// Browser support: Chrome 117+, Safari 17.2+, Firefox 134+ (Jan 2025).
|
|
208
|
-
.accordion-content {
|
|
209
|
-
display: grid;
|
|
210
|
-
grid-template-rows: 0fr;
|
|
211
|
-
margin-top: 0;
|
|
212
|
-
opacity: 0;
|
|
213
|
-
font-family: var(--matcha-font-family);
|
|
214
|
-
font-size: var(--matcha-text-body-lg, 16px);
|
|
215
|
-
line-height: var(--matcha-leading-body-lg, 24px);
|
|
216
|
-
transition:
|
|
217
|
-
grid-template-rows var(--matcha-duration-moderate, 260ms) cubic-bezier(0.4, 0, 0.2, 1),
|
|
218
|
-
margin-top var(--matcha-duration-moderate, 260ms) cubic-bezier(0.4, 0, 0.2, 1),
|
|
219
|
-
opacity var(--matcha-duration-moderate, 260ms) cubic-bezier(0.4, 0, 0.2, 1);
|
|
220
|
-
|
|
221
|
-
// Override do `[hidden]` HTML — precisamos animar pra/de hidden, então
|
|
222
|
-
// mantemos grid display + animação. SR ainda anuncia oculto via aria.
|
|
223
|
-
&[hidden] {
|
|
224
|
-
display: grid;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
&.is-open .accordion-content {
|
|
229
|
-
grid-template-rows: 1fr;
|
|
230
|
-
// Figma DSV3 atualizado: gap header→divider 16 (space-200), reduzido de 24.
|
|
231
|
-
margin-top: var(--matcha-space-200, 16px);
|
|
232
|
-
opacity: 1;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// Wrapper interno: overflow hidden é o que faz o grid trick funcionar
|
|
236
|
-
.accordion-content-inner {
|
|
237
|
-
overflow: hidden;
|
|
238
|
-
min-height: 0;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// Divider canônico — 1px text-hint @ 30% opacity, padding 16px até o conteúdo.
|
|
242
|
-
// Usa border-top no body em vez de elemento <matcha-divider> separado pra
|
|
243
|
-
// evitar "flutuar" durante o collapse.
|
|
244
|
-
// Figma DSV3 atualizado: gap divider→content 16 (space-200), reduzido de 24.
|
|
245
|
-
.accordion-content-body {
|
|
246
|
-
padding-top: var(--matcha-space-200, 16px);
|
|
247
|
-
border-top: 1px solid color-mix(in srgb, var(--matcha-color-text-hint, #9aa0a6) 30%, transparent);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
252
|
-
@media (prefers-reduced-motion: reduce) {
|
|
253
|
-
matcha-accordion-item {
|
|
254
|
-
.accordion-chevron,
|
|
255
|
-
.accordion-header-state,
|
|
256
|
-
.accordion-content {
|
|
257
|
-
transition: none;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// ── Forced colors (Windows High Contrast) ──
|
|
263
|
-
@media (forced-colors: active) {
|
|
264
|
-
matcha-accordion-item {
|
|
265
|
-
border: 1px solid CanvasText;
|
|
266
|
-
|
|
267
|
-
.accordion-header:focus-visible {
|
|
268
|
-
outline: 2px solid CanvasText !important;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.accordion-chevron {
|
|
272
|
-
color: CanvasText;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
// ── Print ──
|
|
278
|
-
// Accordion EXPANDE todos os items pra não esconder conteúdo do leitor.
|
|
279
|
-
// Chevron some (sem semântica de "click" em papel).
|
|
280
|
-
@media print {
|
|
281
|
-
matcha-accordion-item {
|
|
282
|
-
.accordion-content {
|
|
283
|
-
display: block !important;
|
|
284
|
-
height: auto !important;
|
|
285
|
-
visibility: visible !important;
|
|
286
|
-
overflow: visible !important;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.accordion-chevron {
|
|
290
|
-
display: none !important;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-accordion.scss — Collapsible card sections (Figma 15808:51)
|
|
5
|
+
// Estado(3): Fechado, Aberto, Disabled.
|
|
6
|
+
// CSS-only animation via grid-template-rows: 0fr → 1fr (modern, perf-friendly,
|
|
7
|
+
// dispensa Angular Animations e medição JS de altura).
|
|
8
|
+
// =============================================================================
|
|
9
|
+
|
|
10
|
+
@mixin matcha-accordion-theme($theme) {
|
|
11
|
+
|
|
12
|
+
matcha-accordion-item {
|
|
13
|
+
.accordion-item {
|
|
14
|
+
// Figma DSV3 (15808:51): bg = matcha/color/surface/card (canônico)
|
|
15
|
+
background: var(--matcha-color-surface-card);
|
|
16
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// ── Native button reset + state layer ──
|
|
20
|
+
// Slot --matcha-accordion-header-color pra consumer override.
|
|
21
|
+
.accordion-header-button {
|
|
22
|
+
color: var(--matcha-accordion-header-color, var(--matcha-color-fg));
|
|
23
|
+
|
|
24
|
+
// Hover/active/focus só aplicam ao <button>; modificador --static (div, modo
|
|
25
|
+
// clickableHeader=false) não tem state-layer e não recebe focus-ring direto.
|
|
26
|
+
&:not(.accordion-header-button--static) {
|
|
27
|
+
&:hover:not(:disabled) {
|
|
28
|
+
.accordion-header-state {
|
|
29
|
+
opacity: var(--matcha-state-hover, 0.08);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:active:not(:disabled) {
|
|
34
|
+
.accordion-header-state {
|
|
35
|
+
opacity: var(--matcha-state-active, 0.12);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:focus-visible {
|
|
40
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
|
|
41
|
+
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
42
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ── Content text ──
|
|
48
|
+
.accordion-content {
|
|
49
|
+
color: var(--matcha-color-text-label);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ── Chevron ──
|
|
53
|
+
.accordion-chevron {
|
|
54
|
+
color: var(--matcha-color-icon-default);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ── Disabled ──
|
|
58
|
+
&.disabled {
|
|
59
|
+
opacity: 0.5;
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
66
|
+
|
|
67
|
+
matcha-accordion {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
gap: var(--matcha-space-200, 16px);
|
|
71
|
+
width: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
matcha-accordion-item {
|
|
75
|
+
display: block;
|
|
76
|
+
|
|
77
|
+
.accordion-item {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
// Figma DSV3 atualizado (15808:51): padding compactado pra 16 (space-200).
|
|
81
|
+
padding: var(--matcha-space-200, 16px);
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ── Heading wrapper (role="heading") ──
|
|
86
|
+
.accordion-heading {
|
|
87
|
+
margin: 0;
|
|
88
|
+
font: inherit; // não herda H3 default do user-agent
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// ── Header layout — aplica ao <button> (clickable) E ao <div> (--static).
|
|
92
|
+
// cursor:pointer só no <button> via type-selector pra div estática herdar default.
|
|
93
|
+
.accordion-header-button {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: space-between;
|
|
97
|
+
gap: var(--matcha-space-200, 16px);
|
|
98
|
+
width: 100%;
|
|
99
|
+
padding: 0;
|
|
100
|
+
margin: 0;
|
|
101
|
+
border: none;
|
|
102
|
+
background: none;
|
|
103
|
+
color: inherit;
|
|
104
|
+
font: inherit;
|
|
105
|
+
text-align: left;
|
|
106
|
+
position: relative;
|
|
107
|
+
|
|
108
|
+
// Figma DSV3 atualizado (15808:51): título 18/24 SemiBold no accordion compact.
|
|
109
|
+
// Não bate nenhum size canônico do matcha-title (3=16/18, 4=20/28) — override
|
|
110
|
+
// contextual aqui no accordion. Canônico (15808:51): sempre 1 linha + ellipsis.
|
|
111
|
+
//
|
|
112
|
+
// DOM real após projeção:
|
|
113
|
+
// .accordion-header-slot
|
|
114
|
+
// └── matcha-accordion-header (slot wrapper do consumer — display: inline default)
|
|
115
|
+
// └── matcha-title (host inline-flex: sign + text)
|
|
116
|
+
// └── .matcha-title__text (display: inline-block)
|
|
117
|
+
//
|
|
118
|
+
// Pra constraint de largura propagar até o text element, cada nível precisa
|
|
119
|
+
// ser flex + max-width: 100% + min-width: 0. Sem isso, o inline-flex/inline-block
|
|
120
|
+
// calcula largura pelo conteúdo (sem shrink) e o texto wrappa.
|
|
121
|
+
.accordion-header-slot {
|
|
122
|
+
flex: 1 1 auto;
|
|
123
|
+
min-width: 0;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
font-size: 18px;
|
|
126
|
+
font-weight: var(--matcha-weight-semibold, 600);
|
|
127
|
+
line-height: 24px;
|
|
128
|
+
|
|
129
|
+
matcha-accordion-header {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
max-width: 100%;
|
|
133
|
+
min-width: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
matcha-title {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: var(--matcha-space-100, 8px);
|
|
140
|
+
flex: 1 1 auto;
|
|
141
|
+
max-width: 100%;
|
|
142
|
+
min-width: 0;
|
|
143
|
+
|
|
144
|
+
> .matcha-title__text {
|
|
145
|
+
flex: 1 1 auto;
|
|
146
|
+
min-width: 0;
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
text-overflow: ellipsis;
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
// Override do matcha-title size 4 (20/28 ExtraBold) → 18/24 SemiBold (Figma DSV3 accordion compact)
|
|
151
|
+
font-size: 18px;
|
|
152
|
+
font-weight: var(--matcha-weight-semibold, 600);
|
|
153
|
+
line-height: 24px;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Cursor pointer + disabled cursor só no <button>; <div>--static herda default.
|
|
160
|
+
button.accordion-header-button {
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
|
|
163
|
+
&:disabled {
|
|
164
|
+
cursor: default;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// ── State layer on header (hover/active overlay) ──
|
|
169
|
+
// mask-image faz fade-out na parte de baixo pra não terminar abruptamente
|
|
170
|
+
// no divider (visível quando aberto). Gradiente: opaco até 60%, transparente em 100%.
|
|
171
|
+
.accordion-header-state {
|
|
172
|
+
position: absolute;
|
|
173
|
+
// Inset negativo cobre o padding 16 da card (estende state-layer até as bordas).
|
|
174
|
+
inset: calc(var(--matcha-space-200, 16px) * -1);
|
|
175
|
+
background: currentColor;
|
|
176
|
+
opacity: 0;
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
179
|
+
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
180
|
+
|
|
181
|
+
-webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
|
|
182
|
+
mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// ── Trailing slot (chevron default ou conteúdo custom) ──
|
|
186
|
+
.accordion-trailing {
|
|
187
|
+
display: inline-flex;
|
|
188
|
+
align-items: center;
|
|
189
|
+
flex-shrink: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// ── Chevron ──
|
|
193
|
+
// Figma DSV3 atualizado: chevron 16×16 (sm), reduzido de 24 (md).
|
|
194
|
+
.accordion-chevron {
|
|
195
|
+
width: var(--matcha-icon-size-sm, 16px);
|
|
196
|
+
height: var(--matcha-icon-size-sm, 16px);
|
|
197
|
+
transition: transform var(--matcha-duration-moderate, 300ms) cubic-bezier(0.4, 0, 0.2, 1);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&.is-open .accordion-chevron {
|
|
201
|
+
transform: rotate(180deg);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// ── Content (CSS grid-template-rows trick para altura animada) ──
|
|
205
|
+
// Closed: grid-template-rows: 0fr → inner colapsa (overflow:hidden).
|
|
206
|
+
// Open: grid-template-rows: 1fr → inner expande até altura natural.
|
|
207
|
+
// Browser support: Chrome 117+, Safari 17.2+, Firefox 134+ (Jan 2025).
|
|
208
|
+
.accordion-content {
|
|
209
|
+
display: grid;
|
|
210
|
+
grid-template-rows: 0fr;
|
|
211
|
+
margin-top: 0;
|
|
212
|
+
opacity: 0;
|
|
213
|
+
font-family: var(--matcha-font-family);
|
|
214
|
+
font-size: var(--matcha-text-body-lg, 16px);
|
|
215
|
+
line-height: var(--matcha-leading-body-lg, 24px);
|
|
216
|
+
transition:
|
|
217
|
+
grid-template-rows var(--matcha-duration-moderate, 260ms) cubic-bezier(0.4, 0, 0.2, 1),
|
|
218
|
+
margin-top var(--matcha-duration-moderate, 260ms) cubic-bezier(0.4, 0, 0.2, 1),
|
|
219
|
+
opacity var(--matcha-duration-moderate, 260ms) cubic-bezier(0.4, 0, 0.2, 1);
|
|
220
|
+
|
|
221
|
+
// Override do `[hidden]` HTML — precisamos animar pra/de hidden, então
|
|
222
|
+
// mantemos grid display + animação. SR ainda anuncia oculto via aria.
|
|
223
|
+
&[hidden] {
|
|
224
|
+
display: grid;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&.is-open .accordion-content {
|
|
229
|
+
grid-template-rows: 1fr;
|
|
230
|
+
// Figma DSV3 atualizado: gap header→divider 16 (space-200), reduzido de 24.
|
|
231
|
+
margin-top: var(--matcha-space-200, 16px);
|
|
232
|
+
opacity: 1;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Wrapper interno: overflow hidden é o que faz o grid trick funcionar
|
|
236
|
+
.accordion-content-inner {
|
|
237
|
+
overflow: hidden;
|
|
238
|
+
min-height: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Divider canônico — 1px text-hint @ 30% opacity, padding 16px até o conteúdo.
|
|
242
|
+
// Usa border-top no body em vez de elemento <matcha-divider> separado pra
|
|
243
|
+
// evitar "flutuar" durante o collapse.
|
|
244
|
+
// Figma DSV3 atualizado: gap divider→content 16 (space-200), reduzido de 24.
|
|
245
|
+
.accordion-content-body {
|
|
246
|
+
padding-top: var(--matcha-space-200, 16px);
|
|
247
|
+
border-top: 1px solid color-mix(in srgb, var(--matcha-color-text-hint, #9aa0a6) 30%, transparent);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
252
|
+
@media (prefers-reduced-motion: reduce) {
|
|
253
|
+
matcha-accordion-item {
|
|
254
|
+
.accordion-chevron,
|
|
255
|
+
.accordion-header-state,
|
|
256
|
+
.accordion-content {
|
|
257
|
+
transition: none;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// ── Forced colors (Windows High Contrast) ──
|
|
263
|
+
@media (forced-colors: active) {
|
|
264
|
+
matcha-accordion-item {
|
|
265
|
+
border: 1px solid CanvasText;
|
|
266
|
+
|
|
267
|
+
.accordion-header:focus-visible {
|
|
268
|
+
outline: 2px solid CanvasText !important;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.accordion-chevron {
|
|
272
|
+
color: CanvasText;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// ── Print ──
|
|
278
|
+
// Accordion EXPANDE todos os items pra não esconder conteúdo do leitor.
|
|
279
|
+
// Chevron some (sem semântica de "click" em papel).
|
|
280
|
+
@media print {
|
|
281
|
+
matcha-accordion-item {
|
|
282
|
+
.accordion-content {
|
|
283
|
+
display: block !important;
|
|
284
|
+
height: auto !important;
|
|
285
|
+
visibility: visible !important;
|
|
286
|
+
overflow: visible !important;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.accordion-chevron {
|
|
290
|
+
display: none !important;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
// =============================================================================
|
|
4
|
-
// matcha-audio-player.scss — Audio player component
|
|
5
|
-
// Aligned with Figma matcha/audio-player
|
|
6
|
-
// Angular: matcha-audio-player
|
|
7
|
-
// =============================================================================
|
|
8
|
-
|
|
9
|
-
@mixin matcha-audio-player-theme($theme) {
|
|
10
|
-
|
|
11
|
-
.matcha-audio-player {
|
|
12
|
-
.is-selected {
|
|
13
|
-
box-shadow: inset 0 0 0 var(--matcha-border-thin, 2px) var(--matcha-color-accent);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
19
|
-
|
|
20
|
-
.matcha-audio-player {
|
|
21
|
-
.audio-player {
|
|
22
|
-
audio {
|
|
23
|
-
// display: none
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.audio & {
|
|
27
|
-
a { display: none; }
|
|
28
|
-
audio { display: inline-block; }
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-audio-player.scss — Audio player component
|
|
5
|
+
// Aligned with Figma matcha/audio-player
|
|
6
|
+
// Angular: matcha-audio-player
|
|
7
|
+
// =============================================================================
|
|
8
|
+
|
|
9
|
+
@mixin matcha-audio-player-theme($theme) {
|
|
10
|
+
|
|
11
|
+
.matcha-audio-player {
|
|
12
|
+
.is-selected {
|
|
13
|
+
box-shadow: inset 0 0 0 var(--matcha-border-thin, 2px) var(--matcha-color-accent);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
19
|
+
|
|
20
|
+
.matcha-audio-player {
|
|
21
|
+
.audio-player {
|
|
22
|
+
audio {
|
|
23
|
+
// display: none
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.audio & {
|
|
27
|
+
a { display: none; }
|
|
28
|
+
audio { display: inline-block; }
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|