@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.
- package/abstracts/_colors.scss +236 -236
- 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 +446 -445
- 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 +383 -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-contact.scss +35 -0
- 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 +49 -41
- package/components/matcha-table.scss +579 -579
- 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 -257
- package/layout/matcha-page-layout.scss +778 -778
- package/main.scss +331 -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 -274
- 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,471 +1,471 @@
|
|
|
1
|
-
@use "../abstracts/media-breakpoint" as *;
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
|
|
4
|
-
// =============================================================================
|
|
5
|
-
// matcha-file-uploader.scss — File upload component (matcha/file-uploader no Figma DSV3)
|
|
6
|
-
//
|
|
7
|
-
// 3 estados canon (16152:254):
|
|
8
|
-
// Estado=Dropzone (16152:209) — área vazia com icon pill + title + hint + 2 botões
|
|
9
|
-
// Estado=Enviando (16152:227) — thumb 64×36 + nome + progress + % + cancel
|
|
10
|
-
// Estado=Completo (16152:242) — thumb 64×36 + nome + size + delete (trash)
|
|
11
|
-
//
|
|
12
|
-
// Width canon: 480px (component se adapta via max-width: 480px + width: 100%)
|
|
13
|
-
// =============================================================================
|
|
14
|
-
|
|
15
|
-
@mixin matcha-file-uploader-theme($theme) {
|
|
16
|
-
|
|
17
|
-
// ── Dropzone ──
|
|
18
|
-
.matcha-file-uploader-dropzone {
|
|
19
|
-
background: var(--matcha-color-surface-background, var(--matcha-color-surface-bg));
|
|
20
|
-
border-color: var(--matcha-color-surface-border);
|
|
21
|
-
|
|
22
|
-
&.matcha-file-uploader-dragover {
|
|
23
|
-
background: var(--matcha-color-accent-alpha);
|
|
24
|
-
border-color: var(--matcha-color-accent);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&.matcha-file-uploader-disabled {
|
|
28
|
-
opacity: 0.5;
|
|
29
|
-
cursor: not-allowed;
|
|
30
|
-
pointer-events: none;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.matcha-file-uploader-dropzone__icon-pill {
|
|
35
|
-
background: var(--matcha-color-interaction-disabled-bg, #282c34);
|
|
36
|
-
color: var(--matcha-color-text-secondary);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.matcha-file-uploader-dropzone__title {
|
|
40
|
-
color: var(--matcha-color-text-primary);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.matcha-file-uploader-dropzone__optional {
|
|
44
|
-
color: var(--matcha-color-interaction-disabled-fg, rgba(232, 234, 237, 0.38));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.matcha-file-uploader-dropzone__hint {
|
|
48
|
-
color: var(--matcha-color-text-secondary);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// ── File item ──
|
|
52
|
-
.matcha-file-uploader-file {
|
|
53
|
-
background: var(--matcha-color-surface-card);
|
|
54
|
-
border-color: var(--matcha-color-surface-border);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.matcha-file-uploader-file__thumb {
|
|
58
|
-
background: var(--matcha-color-elevation-surface-3, var(--matcha-color-surface-card));
|
|
59
|
-
color: var(--matcha-color-text-muted);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.matcha-file-uploader-file__name {
|
|
63
|
-
color: var(--matcha-color-text-primary);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.matcha-file-uploader-file__size {
|
|
67
|
-
color: var(--matcha-color-text-secondary);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.matcha-file-uploader-file__progress {
|
|
71
|
-
background: var(--matcha-color-surface-border);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.matcha-file-uploader-file__progress-fill {
|
|
75
|
-
background: var(--matcha-color-accent);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.matcha-file-uploader-file__percent {
|
|
79
|
-
color: var(--matcha-color-text-secondary);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.matcha-file-uploader-file__error-text {
|
|
83
|
-
color: var(--matcha-color-danger);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.matcha-file-uploader-file__action {
|
|
87
|
-
color: var(--matcha-color-text-secondary);
|
|
88
|
-
|
|
89
|
-
&:hover {
|
|
90
|
-
background: var(--matcha-color-surface-hover, transparent);
|
|
91
|
-
color: var(--matcha-color-text-primary);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&.matcha-file-uploader-file__action--delete:hover {
|
|
95
|
-
color: var(--matcha-color-danger);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// ── Card layout (preview preenchido) ──
|
|
100
|
-
.matcha-file-uploader-card {
|
|
101
|
-
border-color: var(--matcha-color-surface-border);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// contain (logo/transparência): fundo neutro atrás da imagem inteira
|
|
105
|
-
.matcha-file-uploader-card--contain {
|
|
106
|
-
background: var(--matcha-color-surface-card);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.matcha-file-uploader-card__action {
|
|
110
|
-
background: var(--matcha-color-surface-card-alpha, var(--matcha-color-surface-card));
|
|
111
|
-
color: var(--matcha-color-text-primary);
|
|
112
|
-
|
|
113
|
-
&:hover {
|
|
114
|
-
background: var(--matcha-color-surface-card);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// ──────────────────────────────────────────────────────────────────────────────
|
|
120
|
-
// LAYOUT — independente de tema
|
|
121
|
-
// ──────────────────────────────────────────────────────────────────────────────
|
|
122
|
-
|
|
123
|
-
// Host — full-width; consumer aplica max-width externamente se quiser cap
|
|
124
|
-
.matcha-file-uploader {
|
|
125
|
-
display: block;
|
|
126
|
-
width: 100%;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// ── Empty state wrapper (dropzone + ação secundária FORA do drop) ──────────
|
|
130
|
-
.matcha-file-uploader-empty {
|
|
131
|
-
display: flex;
|
|
132
|
-
flex-direction: column;
|
|
133
|
-
gap: var(--matcha-space-150, 12px);
|
|
134
|
-
width: 100%;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// ── Dropzone box (Estado=Dropzone — Figma 16152:209) — a zona INTEIRA é o alvo
|
|
138
|
-
.matcha-file-uploader-dropzone {
|
|
139
|
-
display: flex;
|
|
140
|
-
flex-direction: column;
|
|
141
|
-
align-items: center;
|
|
142
|
-
justify-content: center;
|
|
143
|
-
gap: var(--matcha-space-200, 16px);
|
|
144
|
-
padding: var(--matcha-space-400, 32px) var(--matcha-space-300, 24px);
|
|
145
|
-
border: var(--matcha-border-thin, 2px) dashed transparent;
|
|
146
|
-
border-radius: var(--matcha-radius-lg, 8px);
|
|
147
|
-
cursor: pointer;
|
|
148
|
-
transition: background-color var(--matcha-duration-instant, 80ms) linear,
|
|
149
|
-
border-color var(--matcha-duration-instant, 80ms) linear;
|
|
150
|
-
|
|
151
|
-
&:focus-visible {
|
|
152
|
-
outline: var(--matcha-border-thin, 2px) solid var(--matcha-color-accent, #009400);
|
|
153
|
-
outline-offset: 2px;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// layout="card": dropzone vazio compartilha a proporção do card preenchido
|
|
158
|
-
// (aspect-ratio aplicado inline via previewRatio) pra empty e filled terem a
|
|
159
|
-
// MESMA altura lado a lado. Sem isso, vazio é dimensionado por padding/conteúdo
|
|
160
|
-
// e preenchido por aspect-ratio → alturas divergentes.
|
|
161
|
-
.matcha-file-uploader-dropzone--card {
|
|
162
|
-
width: 100%;
|
|
163
|
-
overflow: hidden;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
// Icon pill (bg interaction/disabled-bg + padding 40h/16v · icon 24×24)
|
|
167
|
-
.matcha-file-uploader-dropzone__icon-pill {
|
|
168
|
-
display: inline-flex;
|
|
169
|
-
align-items: center;
|
|
170
|
-
justify-content: center;
|
|
171
|
-
padding: var(--matcha-space-200, 16px) var(--matcha-space-500, 40px);
|
|
172
|
-
border-radius: var(--matcha-radius-pill, 9999px);
|
|
173
|
-
flex-shrink: 0;
|
|
174
|
-
|
|
175
|
-
matcha-icon {
|
|
176
|
-
--matcha-icon-size: 24px;
|
|
177
|
-
width: 24px;
|
|
178
|
-
height: 24px;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// Text block — column gap 4px, center
|
|
183
|
-
.matcha-file-uploader-dropzone__text {
|
|
184
|
-
display: flex;
|
|
185
|
-
flex-direction: column;
|
|
186
|
-
align-items: center;
|
|
187
|
-
gap: var(--matcha-space-050, 4px);
|
|
188
|
-
text-align: center;
|
|
189
|
-
width: 100%;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// Title row (inline: title + optional)
|
|
193
|
-
.matcha-file-uploader-dropzone__title-row {
|
|
194
|
-
display: inline-flex;
|
|
195
|
-
align-items: center;
|
|
196
|
-
justify-content: center;
|
|
197
|
-
gap: var(--matcha-space-050, 4px);
|
|
198
|
-
white-space: nowrap;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.matcha-file-uploader-dropzone__title {
|
|
202
|
-
font-family: var(--matcha-font-family);
|
|
203
|
-
font-size: var(--matcha-text-label-md, 14px);
|
|
204
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
205
|
-
line-height: var(--matcha-leading-label-md, 20px);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.matcha-file-uploader-dropzone__optional {
|
|
209
|
-
font-family: var(--matcha-font-family);
|
|
210
|
-
font-size: var(--matcha-text-label-md, 14px);
|
|
211
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
212
|
-
line-height: var(--matcha-leading-label-md, 20px);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.matcha-file-uploader-dropzone__hint {
|
|
216
|
-
margin: 0;
|
|
217
|
-
font-family: var(--matcha-font-family);
|
|
218
|
-
font-size: var(--matcha-text-body-sm, 12px);
|
|
219
|
-
font-weight: var(--matcha-weight-regular, 400);
|
|
220
|
-
line-height: var(--matcha-leading-body-sm, 16px);
|
|
221
|
-
white-space: pre-line; // suporta \n pra hint multi-linha (1280×720 px... \n Clique pra selecionar...)
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// Actions row (slot secondary + select arquivo)
|
|
225
|
-
// Hidden input
|
|
226
|
-
.matcha-file-uploader-input {
|
|
227
|
-
display: none;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// ── File Item — Estados Enviando (16152:227) e Completo (16152:242) ──────────
|
|
231
|
-
.matcha-file-uploader-file {
|
|
232
|
-
display: flex;
|
|
233
|
-
align-items: center;
|
|
234
|
-
gap: var(--matcha-space-200, 16px);
|
|
235
|
-
border: var(--matcha-border-hairline, 1px) solid transparent;
|
|
236
|
-
border-radius: var(--matcha-radius-lg, 8px);
|
|
237
|
-
margin-top: var(--matcha-space-100, 8px);
|
|
238
|
-
width: 100%;
|
|
239
|
-
|
|
240
|
-
// Enviando: padding 20/24 (mais respiro vs. Figma original 16)
|
|
241
|
-
&.matcha-file-uploader-file--uploading {
|
|
242
|
-
padding: var(--matcha-space-250, 20px) var(--matcha-space-300, 24px);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// Completo/Erro: padding 20/24 (mais respiro vs. Figma original 12/16)
|
|
246
|
-
&.matcha-file-uploader-file--completed,
|
|
247
|
-
&.matcha-file-uploader-file--error {
|
|
248
|
-
padding: var(--matcha-space-250, 20px) var(--matcha-space-300, 24px);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
// Thumbnail 64×36 (16:9 · radius lg)
|
|
253
|
-
.matcha-file-uploader-file__thumb {
|
|
254
|
-
display: flex;
|
|
255
|
-
align-items: center;
|
|
256
|
-
justify-content: center;
|
|
257
|
-
width: 64px;
|
|
258
|
-
height: 36px;
|
|
259
|
-
border-radius: var(--matcha-radius-lg, 8px);
|
|
260
|
-
flex-shrink: 0;
|
|
261
|
-
overflow: hidden;
|
|
262
|
-
|
|
263
|
-
img {
|
|
264
|
-
width: 100%;
|
|
265
|
-
height: 100%;
|
|
266
|
-
object-fit: cover;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
matcha-icon {
|
|
270
|
-
--matcha-icon-size: 20px;
|
|
271
|
-
width: 20px;
|
|
272
|
-
height: 20px;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
// Info column (flex-1)
|
|
277
|
-
.matcha-file-uploader-file__info {
|
|
278
|
-
display: flex;
|
|
279
|
-
flex-direction: column;
|
|
280
|
-
flex: 1 1 0;
|
|
281
|
-
min-width: 0;
|
|
282
|
-
overflow: hidden;
|
|
283
|
-
|
|
284
|
-
// Enviando: gap 6 (entre nome e progress bar)
|
|
285
|
-
.matcha-file-uploader-file--uploading & {
|
|
286
|
-
gap: var(--matcha-space-075, 6px);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
// Completo: gap 4 (entre nome e size)
|
|
290
|
-
.matcha-file-uploader-file--completed &,
|
|
291
|
-
.matcha-file-uploader-file--error & {
|
|
292
|
-
gap: var(--matcha-space-050, 4px);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
// File name — Manrope Medium 13/19 letter 0.2 (text/button-sm)
|
|
297
|
-
.matcha-file-uploader-file__name {
|
|
298
|
-
font-family: var(--matcha-font-family);
|
|
299
|
-
font-size: var(--matcha-text-label-sm, 12px);
|
|
300
|
-
font-weight: var(--matcha-weight-medium, 500);
|
|
301
|
-
line-height: var(--matcha-leading-label-sm, 16px);
|
|
302
|
-
letter-spacing: 0.2px;
|
|
303
|
-
white-space: nowrap;
|
|
304
|
-
overflow: hidden;
|
|
305
|
-
text-overflow: ellipsis;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// File size — Manrope Regular 11/14 letter 0.3 (text/caption)
|
|
309
|
-
.matcha-file-uploader-file__size {
|
|
310
|
-
font-family: var(--matcha-font-family);
|
|
311
|
-
font-size: var(--matcha-text-p-tiny, 11px);
|
|
312
|
-
font-weight: var(--matcha-weight-regular, 400);
|
|
313
|
-
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
314
|
-
letter-spacing: 0.3px;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// Error text — body-sm danger
|
|
318
|
-
.matcha-file-uploader-file__error-text {
|
|
319
|
-
font-family: var(--matcha-font-family);
|
|
320
|
-
font-size: var(--matcha-text-body-sm, 12px);
|
|
321
|
-
font-weight: var(--matcha-weight-regular, 400);
|
|
322
|
-
line-height: var(--matcha-leading-body-sm, 16px);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// ── Progress bar (height 4px · radius sm) ─────────────────────────────────────
|
|
326
|
-
.matcha-file-uploader-file__progress {
|
|
327
|
-
width: 100%;
|
|
328
|
-
height: 4px;
|
|
329
|
-
border-radius: var(--matcha-radius-sm, 2px);
|
|
330
|
-
overflow: hidden;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
.matcha-file-uploader-file__progress-fill {
|
|
334
|
-
height: 100%;
|
|
335
|
-
border-radius: var(--matcha-radius-sm, 2px);
|
|
336
|
-
transition: width var(--matcha-duration-moderate, 300ms) ease;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
// Percent label — body-sm text-secondary
|
|
340
|
-
.matcha-file-uploader-file__percent {
|
|
341
|
-
font-family: var(--matcha-font-family);
|
|
342
|
-
font-size: var(--matcha-text-body-sm, 12px);
|
|
343
|
-
font-weight: var(--matcha-weight-regular, 400);
|
|
344
|
-
line-height: var(--matcha-leading-body-sm, 16px);
|
|
345
|
-
flex-shrink: 0;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
// Cancel/Delete action button — 20×20 (icon size + bg transparent + hover)
|
|
349
|
-
.matcha-file-uploader-file__action {
|
|
350
|
-
display: inline-flex;
|
|
351
|
-
align-items: center;
|
|
352
|
-
justify-content: center;
|
|
353
|
-
width: 20px;
|
|
354
|
-
height: 20px;
|
|
355
|
-
padding: 0;
|
|
356
|
-
background: transparent;
|
|
357
|
-
border: none;
|
|
358
|
-
border-radius: var(--matcha-radius-sm, 2px);
|
|
359
|
-
cursor: pointer;
|
|
360
|
-
flex-shrink: 0;
|
|
361
|
-
transition: background-color var(--matcha-duration-instant, 80ms) linear,
|
|
362
|
-
color var(--matcha-duration-instant, 80ms) linear;
|
|
363
|
-
|
|
364
|
-
matcha-icon {
|
|
365
|
-
--matcha-icon-size: 20px;
|
|
366
|
-
width: 20px;
|
|
367
|
-
height: 20px;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// ── Card layout — preview preenchido 16:9 + ações no hover (Estado=Drop filled) ──
|
|
372
|
-
.matcha-file-uploader-card {
|
|
373
|
-
position: relative;
|
|
374
|
-
width: 100%;
|
|
375
|
-
// SEM margin-top: o card preenchido tem que alinhar o topo com o dropzone
|
|
376
|
-
// vazio quando lado a lado (layout card). margin-top desalinhava em 8px.
|
|
377
|
-
border: var(--matcha-border-hairline, 1px) solid transparent;
|
|
378
|
-
border-radius: var(--matcha-radius-lg, 8px);
|
|
379
|
-
overflow: hidden;
|
|
380
|
-
aspect-ratio: 16 / 9; // fallback; sobrescrito por [style.aspect-ratio]="previewRatio"
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
.matcha-file-uploader-card__img {
|
|
384
|
-
display: block;
|
|
385
|
-
width: 100%;
|
|
386
|
-
height: 100%;
|
|
387
|
-
object-fit: cover; // sobrescrito por [style.object-fit]="previewFit"
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
.matcha-file-uploader-card__actions {
|
|
391
|
-
position: absolute;
|
|
392
|
-
top: var(--matcha-space-100, 8px);
|
|
393
|
-
right: var(--matcha-space-100, 8px);
|
|
394
|
-
display: flex;
|
|
395
|
-
gap: var(--matcha-space-100, 8px);
|
|
396
|
-
opacity: 1; // persistente — descobrÃvel e operável em touch (canon 20252:2253)
|
|
397
|
-
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
// Em dispositivos com hover, atenua no resting e destaca no hover/foco — mantém
|
|
401
|
-
// a tela limpa sem esconder a affordance onde não há hover (touch/totem).
|
|
402
|
-
@media (hover: hover) {
|
|
403
|
-
.matcha-file-uploader-card__actions { opacity: 0.72; }
|
|
404
|
-
|
|
405
|
-
.matcha-file-uploader-card:hover .matcha-file-uploader-card__actions,
|
|
406
|
-
.matcha-file-uploader-card:focus-within .matcha-file-uploader-card__actions {
|
|
407
|
-
opacity: 1;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.matcha-file-uploader-card__action {
|
|
412
|
-
display: inline-flex;
|
|
413
|
-
align-items: center;
|
|
414
|
-
justify-content: center;
|
|
415
|
-
width: 32px;
|
|
416
|
-
height: 32px;
|
|
417
|
-
padding: 0;
|
|
418
|
-
border: none;
|
|
419
|
-
border-radius: var(--matcha-radius-pill, 9999px);
|
|
420
|
-
cursor: pointer;
|
|
421
|
-
backdrop-filter: blur(8px);
|
|
422
|
-
transition: background-color var(--matcha-duration-instant, 80ms) linear;
|
|
423
|
-
|
|
424
|
-
matcha-icon {
|
|
425
|
-
--matcha-icon-size: 18px;
|
|
426
|
-
width: 18px;
|
|
427
|
-
height: 18px;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
// ── Cropper inline (modo crop: imagem única) ──────────────────────────────
|
|
432
|
-
.matcha-file-uploader-cropper {
|
|
433
|
-
display: flex;
|
|
434
|
-
flex-direction: column;
|
|
435
|
-
gap: var(--matcha-space-150, 12px);
|
|
436
|
-
margin-top: var(--matcha-space-100, 8px);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
.matcha-file-uploader-cropper matcha-crop {
|
|
440
|
-
display: block;
|
|
441
|
-
width: 100%;
|
|
442
|
-
min-height: 280px;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.matcha-file-uploader-cropper__actions {
|
|
446
|
-
display: flex;
|
|
447
|
-
justify-content: flex-end;
|
|
448
|
-
gap: var(--matcha-space-100, 8px);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
// ── Responsive ───────────────────────────────────────────────────────────────
|
|
452
|
-
@include media-breakpoint('xs') {
|
|
453
|
-
.matcha-file-uploader-dropzone {
|
|
454
|
-
padding: var(--matcha-space-300, 24px) var(--matcha-space-200, 16px);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.matcha-file-uploader-dropzone__icon-pill {
|
|
458
|
-
padding: var(--matcha-space-150, 12px) var(--matcha-space-400, 32px);
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
// ── Reduced motion ───────────────────────────────────────────────────────────
|
|
463
|
-
@media (prefers-reduced-motion: reduce) {
|
|
464
|
-
.matcha-file-uploader-dropzone,
|
|
465
|
-
.matcha-file-uploader-file__progress-fill,
|
|
466
|
-
.matcha-file-uploader-file__action,
|
|
467
|
-
.matcha-file-uploader-card__actions,
|
|
468
|
-
.matcha-file-uploader-card__action {
|
|
469
|
-
transition: none;
|
|
470
|
-
}
|
|
471
|
-
}
|
|
1
|
+
@use "../abstracts/media-breakpoint" as *;
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
// =============================================================================
|
|
5
|
+
// matcha-file-uploader.scss — File upload component (matcha/file-uploader no Figma DSV3)
|
|
6
|
+
//
|
|
7
|
+
// 3 estados canon (16152:254):
|
|
8
|
+
// Estado=Dropzone (16152:209) — área vazia com icon pill + title + hint + 2 botões
|
|
9
|
+
// Estado=Enviando (16152:227) — thumb 64×36 + nome + progress + % + cancel
|
|
10
|
+
// Estado=Completo (16152:242) — thumb 64×36 + nome + size + delete (trash)
|
|
11
|
+
//
|
|
12
|
+
// Width canon: 480px (component se adapta via max-width: 480px + width: 100%)
|
|
13
|
+
// =============================================================================
|
|
14
|
+
|
|
15
|
+
@mixin matcha-file-uploader-theme($theme) {
|
|
16
|
+
|
|
17
|
+
// ── Dropzone ──
|
|
18
|
+
.matcha-file-uploader-dropzone {
|
|
19
|
+
background: var(--matcha-color-surface-background, var(--matcha-color-surface-bg));
|
|
20
|
+
border-color: var(--matcha-color-surface-border);
|
|
21
|
+
|
|
22
|
+
&.matcha-file-uploader-dragover {
|
|
23
|
+
background: var(--matcha-color-accent-alpha);
|
|
24
|
+
border-color: var(--matcha-color-accent);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.matcha-file-uploader-disabled {
|
|
28
|
+
opacity: 0.5;
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.matcha-file-uploader-dropzone__icon-pill {
|
|
35
|
+
background: var(--matcha-color-interaction-disabled-bg, #282c34);
|
|
36
|
+
color: var(--matcha-color-text-secondary);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.matcha-file-uploader-dropzone__title {
|
|
40
|
+
color: var(--matcha-color-text-primary);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.matcha-file-uploader-dropzone__optional {
|
|
44
|
+
color: var(--matcha-color-interaction-disabled-fg, rgba(232, 234, 237, 0.38));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.matcha-file-uploader-dropzone__hint {
|
|
48
|
+
color: var(--matcha-color-text-secondary);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// ── File item ──
|
|
52
|
+
.matcha-file-uploader-file {
|
|
53
|
+
background: var(--matcha-color-surface-card);
|
|
54
|
+
border-color: var(--matcha-color-surface-border);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.matcha-file-uploader-file__thumb {
|
|
58
|
+
background: var(--matcha-color-elevation-surface-3, var(--matcha-color-surface-card));
|
|
59
|
+
color: var(--matcha-color-text-muted);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.matcha-file-uploader-file__name {
|
|
63
|
+
color: var(--matcha-color-text-primary);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.matcha-file-uploader-file__size {
|
|
67
|
+
color: var(--matcha-color-text-secondary);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.matcha-file-uploader-file__progress {
|
|
71
|
+
background: var(--matcha-color-surface-border);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.matcha-file-uploader-file__progress-fill {
|
|
75
|
+
background: var(--matcha-color-accent);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.matcha-file-uploader-file__percent {
|
|
79
|
+
color: var(--matcha-color-text-secondary);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.matcha-file-uploader-file__error-text {
|
|
83
|
+
color: var(--matcha-color-danger);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.matcha-file-uploader-file__action {
|
|
87
|
+
color: var(--matcha-color-text-secondary);
|
|
88
|
+
|
|
89
|
+
&:hover {
|
|
90
|
+
background: var(--matcha-color-surface-hover, transparent);
|
|
91
|
+
color: var(--matcha-color-text-primary);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&.matcha-file-uploader-file__action--delete:hover {
|
|
95
|
+
color: var(--matcha-color-danger);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ── Card layout (preview preenchido) ──
|
|
100
|
+
.matcha-file-uploader-card {
|
|
101
|
+
border-color: var(--matcha-color-surface-border);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// contain (logo/transparência): fundo neutro atrás da imagem inteira
|
|
105
|
+
.matcha-file-uploader-card--contain {
|
|
106
|
+
background: var(--matcha-color-surface-card);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.matcha-file-uploader-card__action {
|
|
110
|
+
background: var(--matcha-color-surface-card-alpha, var(--matcha-color-surface-card));
|
|
111
|
+
color: var(--matcha-color-text-primary);
|
|
112
|
+
|
|
113
|
+
&:hover {
|
|
114
|
+
background: var(--matcha-color-surface-card);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
120
|
+
// LAYOUT — independente de tema
|
|
121
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
122
|
+
|
|
123
|
+
// Host — full-width; consumer aplica max-width externamente se quiser cap
|
|
124
|
+
.matcha-file-uploader {
|
|
125
|
+
display: block;
|
|
126
|
+
width: 100%;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// ── Empty state wrapper (dropzone + ação secundária FORA do drop) ──────────
|
|
130
|
+
.matcha-file-uploader-empty {
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
gap: var(--matcha-space-150, 12px);
|
|
134
|
+
width: 100%;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ── Dropzone box (Estado=Dropzone — Figma 16152:209) — a zona INTEIRA é o alvo
|
|
138
|
+
.matcha-file-uploader-dropzone {
|
|
139
|
+
display: flex;
|
|
140
|
+
flex-direction: column;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
gap: var(--matcha-space-200, 16px);
|
|
144
|
+
padding: var(--matcha-space-400, 32px) var(--matcha-space-300, 24px);
|
|
145
|
+
border: var(--matcha-border-thin, 2px) dashed transparent;
|
|
146
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
transition: background-color var(--matcha-duration-instant, 80ms) linear,
|
|
149
|
+
border-color var(--matcha-duration-instant, 80ms) linear;
|
|
150
|
+
|
|
151
|
+
&:focus-visible {
|
|
152
|
+
outline: var(--matcha-border-thin, 2px) solid var(--matcha-color-accent, #009400);
|
|
153
|
+
outline-offset: 2px;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// layout="card": dropzone vazio compartilha a proporção do card preenchido
|
|
158
|
+
// (aspect-ratio aplicado inline via previewRatio) pra empty e filled terem a
|
|
159
|
+
// MESMA altura lado a lado. Sem isso, vazio é dimensionado por padding/conteúdo
|
|
160
|
+
// e preenchido por aspect-ratio → alturas divergentes.
|
|
161
|
+
.matcha-file-uploader-dropzone--card {
|
|
162
|
+
width: 100%;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Icon pill (bg interaction/disabled-bg + padding 40h/16v · icon 24×24)
|
|
167
|
+
.matcha-file-uploader-dropzone__icon-pill {
|
|
168
|
+
display: inline-flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
padding: var(--matcha-space-200, 16px) var(--matcha-space-500, 40px);
|
|
172
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
173
|
+
flex-shrink: 0;
|
|
174
|
+
|
|
175
|
+
matcha-icon {
|
|
176
|
+
--matcha-icon-size: 24px;
|
|
177
|
+
width: 24px;
|
|
178
|
+
height: 24px;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Text block — column gap 4px, center
|
|
183
|
+
.matcha-file-uploader-dropzone__text {
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
align-items: center;
|
|
187
|
+
gap: var(--matcha-space-050, 4px);
|
|
188
|
+
text-align: center;
|
|
189
|
+
width: 100%;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Title row (inline: title + optional)
|
|
193
|
+
.matcha-file-uploader-dropzone__title-row {
|
|
194
|
+
display: inline-flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
justify-content: center;
|
|
197
|
+
gap: var(--matcha-space-050, 4px);
|
|
198
|
+
white-space: nowrap;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.matcha-file-uploader-dropzone__title {
|
|
202
|
+
font-family: var(--matcha-font-family);
|
|
203
|
+
font-size: var(--matcha-text-label-md, 14px);
|
|
204
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
205
|
+
line-height: var(--matcha-leading-label-md, 20px);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.matcha-file-uploader-dropzone__optional {
|
|
209
|
+
font-family: var(--matcha-font-family);
|
|
210
|
+
font-size: var(--matcha-text-label-md, 14px);
|
|
211
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
212
|
+
line-height: var(--matcha-leading-label-md, 20px);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.matcha-file-uploader-dropzone__hint {
|
|
216
|
+
margin: 0;
|
|
217
|
+
font-family: var(--matcha-font-family);
|
|
218
|
+
font-size: var(--matcha-text-body-sm, 12px);
|
|
219
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
220
|
+
line-height: var(--matcha-leading-body-sm, 16px);
|
|
221
|
+
white-space: pre-line; // suporta \n pra hint multi-linha (1280×720 px... \n Clique pra selecionar...)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// Actions row (slot secondary + select arquivo)
|
|
225
|
+
// Hidden input
|
|
226
|
+
.matcha-file-uploader-input {
|
|
227
|
+
display: none;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// ── File Item — Estados Enviando (16152:227) e Completo (16152:242) ──────────
|
|
231
|
+
.matcha-file-uploader-file {
|
|
232
|
+
display: flex;
|
|
233
|
+
align-items: center;
|
|
234
|
+
gap: var(--matcha-space-200, 16px);
|
|
235
|
+
border: var(--matcha-border-hairline, 1px) solid transparent;
|
|
236
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
237
|
+
margin-top: var(--matcha-space-100, 8px);
|
|
238
|
+
width: 100%;
|
|
239
|
+
|
|
240
|
+
// Enviando: padding 20/24 (mais respiro vs. Figma original 16)
|
|
241
|
+
&.matcha-file-uploader-file--uploading {
|
|
242
|
+
padding: var(--matcha-space-250, 20px) var(--matcha-space-300, 24px);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Completo/Erro: padding 20/24 (mais respiro vs. Figma original 12/16)
|
|
246
|
+
&.matcha-file-uploader-file--completed,
|
|
247
|
+
&.matcha-file-uploader-file--error {
|
|
248
|
+
padding: var(--matcha-space-250, 20px) var(--matcha-space-300, 24px);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// Thumbnail 64×36 (16:9 · radius lg)
|
|
253
|
+
.matcha-file-uploader-file__thumb {
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
justify-content: center;
|
|
257
|
+
width: 64px;
|
|
258
|
+
height: 36px;
|
|
259
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
260
|
+
flex-shrink: 0;
|
|
261
|
+
overflow: hidden;
|
|
262
|
+
|
|
263
|
+
img {
|
|
264
|
+
width: 100%;
|
|
265
|
+
height: 100%;
|
|
266
|
+
object-fit: cover;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
matcha-icon {
|
|
270
|
+
--matcha-icon-size: 20px;
|
|
271
|
+
width: 20px;
|
|
272
|
+
height: 20px;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// Info column (flex-1)
|
|
277
|
+
.matcha-file-uploader-file__info {
|
|
278
|
+
display: flex;
|
|
279
|
+
flex-direction: column;
|
|
280
|
+
flex: 1 1 0;
|
|
281
|
+
min-width: 0;
|
|
282
|
+
overflow: hidden;
|
|
283
|
+
|
|
284
|
+
// Enviando: gap 6 (entre nome e progress bar)
|
|
285
|
+
.matcha-file-uploader-file--uploading & {
|
|
286
|
+
gap: var(--matcha-space-075, 6px);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// Completo: gap 4 (entre nome e size)
|
|
290
|
+
.matcha-file-uploader-file--completed &,
|
|
291
|
+
.matcha-file-uploader-file--error & {
|
|
292
|
+
gap: var(--matcha-space-050, 4px);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
// File name — Manrope Medium 13/19 letter 0.2 (text/button-sm)
|
|
297
|
+
.matcha-file-uploader-file__name {
|
|
298
|
+
font-family: var(--matcha-font-family);
|
|
299
|
+
font-size: var(--matcha-text-label-sm, 12px);
|
|
300
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
301
|
+
line-height: var(--matcha-leading-label-sm, 16px);
|
|
302
|
+
letter-spacing: 0.2px;
|
|
303
|
+
white-space: nowrap;
|
|
304
|
+
overflow: hidden;
|
|
305
|
+
text-overflow: ellipsis;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
// File size — Manrope Regular 11/14 letter 0.3 (text/caption)
|
|
309
|
+
.matcha-file-uploader-file__size {
|
|
310
|
+
font-family: var(--matcha-font-family);
|
|
311
|
+
font-size: var(--matcha-text-p-tiny, 11px);
|
|
312
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
313
|
+
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
314
|
+
letter-spacing: 0.3px;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// Error text — body-sm danger
|
|
318
|
+
.matcha-file-uploader-file__error-text {
|
|
319
|
+
font-family: var(--matcha-font-family);
|
|
320
|
+
font-size: var(--matcha-text-body-sm, 12px);
|
|
321
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
322
|
+
line-height: var(--matcha-leading-body-sm, 16px);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// ── Progress bar (height 4px · radius sm) ─────────────────────────────────────
|
|
326
|
+
.matcha-file-uploader-file__progress {
|
|
327
|
+
width: 100%;
|
|
328
|
+
height: 4px;
|
|
329
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
330
|
+
overflow: hidden;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.matcha-file-uploader-file__progress-fill {
|
|
334
|
+
height: 100%;
|
|
335
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
336
|
+
transition: width var(--matcha-duration-moderate, 300ms) ease;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// Percent label — body-sm text-secondary
|
|
340
|
+
.matcha-file-uploader-file__percent {
|
|
341
|
+
font-family: var(--matcha-font-family);
|
|
342
|
+
font-size: var(--matcha-text-body-sm, 12px);
|
|
343
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
344
|
+
line-height: var(--matcha-leading-body-sm, 16px);
|
|
345
|
+
flex-shrink: 0;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// Cancel/Delete action button — 20×20 (icon size + bg transparent + hover)
|
|
349
|
+
.matcha-file-uploader-file__action {
|
|
350
|
+
display: inline-flex;
|
|
351
|
+
align-items: center;
|
|
352
|
+
justify-content: center;
|
|
353
|
+
width: 20px;
|
|
354
|
+
height: 20px;
|
|
355
|
+
padding: 0;
|
|
356
|
+
background: transparent;
|
|
357
|
+
border: none;
|
|
358
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
359
|
+
cursor: pointer;
|
|
360
|
+
flex-shrink: 0;
|
|
361
|
+
transition: background-color var(--matcha-duration-instant, 80ms) linear,
|
|
362
|
+
color var(--matcha-duration-instant, 80ms) linear;
|
|
363
|
+
|
|
364
|
+
matcha-icon {
|
|
365
|
+
--matcha-icon-size: 20px;
|
|
366
|
+
width: 20px;
|
|
367
|
+
height: 20px;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// ── Card layout — preview preenchido 16:9 + ações no hover (Estado=Drop filled) ──
|
|
372
|
+
.matcha-file-uploader-card {
|
|
373
|
+
position: relative;
|
|
374
|
+
width: 100%;
|
|
375
|
+
// SEM margin-top: o card preenchido tem que alinhar o topo com o dropzone
|
|
376
|
+
// vazio quando lado a lado (layout card). margin-top desalinhava em 8px.
|
|
377
|
+
border: var(--matcha-border-hairline, 1px) solid transparent;
|
|
378
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
379
|
+
overflow: hidden;
|
|
380
|
+
aspect-ratio: 16 / 9; // fallback; sobrescrito por [style.aspect-ratio]="previewRatio"
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.matcha-file-uploader-card__img {
|
|
384
|
+
display: block;
|
|
385
|
+
width: 100%;
|
|
386
|
+
height: 100%;
|
|
387
|
+
object-fit: cover; // sobrescrito por [style.object-fit]="previewFit"
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.matcha-file-uploader-card__actions {
|
|
391
|
+
position: absolute;
|
|
392
|
+
top: var(--matcha-space-100, 8px);
|
|
393
|
+
right: var(--matcha-space-100, 8px);
|
|
394
|
+
display: flex;
|
|
395
|
+
gap: var(--matcha-space-100, 8px);
|
|
396
|
+
opacity: 1; // persistente — descobrÃvel e operável em touch (canon 20252:2253)
|
|
397
|
+
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// Em dispositivos com hover, atenua no resting e destaca no hover/foco — mantém
|
|
401
|
+
// a tela limpa sem esconder a affordance onde não há hover (touch/totem).
|
|
402
|
+
@media (hover: hover) {
|
|
403
|
+
.matcha-file-uploader-card__actions { opacity: 0.72; }
|
|
404
|
+
|
|
405
|
+
.matcha-file-uploader-card:hover .matcha-file-uploader-card__actions,
|
|
406
|
+
.matcha-file-uploader-card:focus-within .matcha-file-uploader-card__actions {
|
|
407
|
+
opacity: 1;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.matcha-file-uploader-card__action {
|
|
412
|
+
display: inline-flex;
|
|
413
|
+
align-items: center;
|
|
414
|
+
justify-content: center;
|
|
415
|
+
width: 32px;
|
|
416
|
+
height: 32px;
|
|
417
|
+
padding: 0;
|
|
418
|
+
border: none;
|
|
419
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
420
|
+
cursor: pointer;
|
|
421
|
+
backdrop-filter: blur(8px);
|
|
422
|
+
transition: background-color var(--matcha-duration-instant, 80ms) linear;
|
|
423
|
+
|
|
424
|
+
matcha-icon {
|
|
425
|
+
--matcha-icon-size: 18px;
|
|
426
|
+
width: 18px;
|
|
427
|
+
height: 18px;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// ── Cropper inline (modo crop: imagem única) ──────────────────────────────
|
|
432
|
+
.matcha-file-uploader-cropper {
|
|
433
|
+
display: flex;
|
|
434
|
+
flex-direction: column;
|
|
435
|
+
gap: var(--matcha-space-150, 12px);
|
|
436
|
+
margin-top: var(--matcha-space-100, 8px);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.matcha-file-uploader-cropper matcha-crop {
|
|
440
|
+
display: block;
|
|
441
|
+
width: 100%;
|
|
442
|
+
min-height: 280px;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.matcha-file-uploader-cropper__actions {
|
|
446
|
+
display: flex;
|
|
447
|
+
justify-content: flex-end;
|
|
448
|
+
gap: var(--matcha-space-100, 8px);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// ── Responsive ───────────────────────────────────────────────────────────────
|
|
452
|
+
@include media-breakpoint('xs') {
|
|
453
|
+
.matcha-file-uploader-dropzone {
|
|
454
|
+
padding: var(--matcha-space-300, 24px) var(--matcha-space-200, 16px);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.matcha-file-uploader-dropzone__icon-pill {
|
|
458
|
+
padding: var(--matcha-space-150, 12px) var(--matcha-space-400, 32px);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// ── Reduced motion ───────────────────────────────────────────────────────────
|
|
463
|
+
@media (prefers-reduced-motion: reduce) {
|
|
464
|
+
.matcha-file-uploader-dropzone,
|
|
465
|
+
.matcha-file-uploader-file__progress-fill,
|
|
466
|
+
.matcha-file-uploader-file__action,
|
|
467
|
+
.matcha-file-uploader-card__actions,
|
|
468
|
+
.matcha-file-uploader-card__action {
|
|
469
|
+
transition: none;
|
|
470
|
+
}
|
|
471
|
+
}
|