@inchurch/matcha-theme 22.38.0 β 22.38.2
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 +291 -291
- package/abstracts/_elevation.scss +108 -108
- package/abstracts/_functions.scss +321 -321
- package/abstracts/_media-breakpoint.scss +26 -26
- package/abstracts/_theme-api.scss +224 -224
- package/abstracts/_typography.scss +128 -128
- package/base/_reset.scss +487 -487
- package/components/app-page-header.scss +260 -260
- package/components/matcha-accordion.scss +297 -297
- package/components/matcha-audio-player.scss +31 -31
- package/components/matcha-autocomplete.scss +145 -145
- package/components/matcha-avatar.scss +426 -426
- package/components/matcha-badge.scss +120 -120
- package/components/matcha-breadcrumb.scss +231 -231
- package/components/matcha-button-toggle.scss +484 -484
- package/components/matcha-buttons.scss +973 -973
- package/components/matcha-calendar.scss +253 -253
- package/components/matcha-cards.scss +212 -212
- package/components/matcha-chart-card.scss +53 -53
- package/components/matcha-checkbox.scss +266 -266
- package/components/matcha-chip.scss +311 -311
- package/components/matcha-color-pick.scss +34 -34
- package/components/matcha-command-palette.scss +316 -316
- package/components/matcha-crop.scss +419 -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 +637 -637
- package/components/matcha-flag.scss +103 -103
- package/components/matcha-footer.scss +91 -91
- package/components/matcha-form-field.scss +883 -883
- 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 +247 -247
- package/components/matcha-icon.scss +111 -111
- package/components/matcha-image.scss +60 -60
- 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 +770 -770
- package/components/matcha-notification.scss +417 -417
- package/components/matcha-option.scss +170 -170
- package/components/matcha-page-builder.scss +4196 -4196
- package/components/matcha-paginator.scss +699 -699
- package/components/matcha-panel.scss +216 -216
- package/components/matcha-period.scss +174 -174
- package/components/matcha-profile-card.scss +50 -50
- package/components/matcha-progress-bar.scss +355 -355
- package/components/matcha-radio.scss +325 -325
- 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 +629 -629
- package/components/matcha-skeleton.scss +182 -182
- 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-stepper.scss +376 -376
- package/components/matcha-table-cell.scss +107 -107
- package/components/matcha-table.scss +722 -722
- package/components/matcha-tabs.scss +642 -642
- package/components/matcha-text-editor.scss +111 -111
- package/components/matcha-time.scss +33 -33
- package/components/matcha-timepicker.scss +13 -13
- package/components/matcha-toolbar.scss +366 -366
- package/components/matcha-tooltip.scss +235 -235
- package/components/matcha-tree-view.scss +636 -617
- package/layout/matcha-page-layout.scss +778 -778
- package/main.scss +334 -334
- package/package.json +1 -1
- package/tokens/_animations-tokens.scss +37 -37
- package/tokens/_breakpoints-tokens.scss +35 -35
- package/tokens/_color-tokens.scss +288 -288
- package/tokens/_elevation-tokens.scss +33 -33
- package/tokens/_emit-tokens.scss +329 -329
- 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,406 +1,419 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
// =============================================================================
|
|
4
|
-
// matcha-crop.scss β Image cropper (Tier 1 + Tier 2 gold)
|
|
5
|
-
//
|
|
6
|
-
// Estrutura:
|
|
7
|
-
// .matcha-crop β host flex column (data-state, data-shape, data-ratio)
|
|
8
|
-
// .matcha-crop__header β title + toolbar (reset, lock)
|
|
9
|
-
// .matcha-crop__canvas β image stage + interaction surface
|
|
10
|
-
// .matcha-crop__image β source img (transforma via translate/scale)
|
|
11
|
-
// .matcha-crop__overlay β punch-out mask via clip-path
|
|
12
|
-
// .matcha-crop__area β crop frame draggable + 8 handles
|
|
13
|
-
// .matcha-crop__handle--{nw|n|ne|...} β resize handles (44Γ44 touch target)
|
|
14
|
-
// .matcha-crop__zoom-bar β slider de zoom
|
|
15
|
-
// .matcha-crop__state β empty / loading / error visuals
|
|
16
|
-
// .matcha-crop__footer β ng-content de actions
|
|
17
|
-
// =============================================================================
|
|
18
|
-
|
|
19
|
-
@mixin matcha-crop-theme($theme) {
|
|
20
|
-
|
|
21
|
-
.matcha-crop {
|
|
22
|
-
color: var(--matcha-color-text-primary);
|
|
23
|
-
|
|
24
|
-
.matcha-crop__header {
|
|
25
|
-
color: var(--matcha-color-text-primary);
|
|
26
|
-
border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.matcha-crop__canvas {
|
|
30
|
-
background: var(--matcha-color-surface-inverse, #121212);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
.matcha-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
//
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
//
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
//
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
font-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-crop.scss β Image cropper (Tier 1 + Tier 2 gold)
|
|
5
|
+
//
|
|
6
|
+
// Estrutura:
|
|
7
|
+
// .matcha-crop β host flex column (data-state, data-shape, data-ratio, data-stage)
|
|
8
|
+
// .matcha-crop__header β title + toolbar (reset, lock)
|
|
9
|
+
// .matcha-crop__canvas β image stage + interaction surface
|
|
10
|
+
// .matcha-crop__image β source img (transforma via translate/scale)
|
|
11
|
+
// .matcha-crop__overlay β punch-out mask via clip-path
|
|
12
|
+
// .matcha-crop__area β crop frame draggable + 8 handles
|
|
13
|
+
// .matcha-crop__handle--{nw|n|ne|...} β resize handles (44Γ44 touch target)
|
|
14
|
+
// .matcha-crop__zoom-bar β slider de zoom
|
|
15
|
+
// .matcha-crop__state β empty / loading / error visuals
|
|
16
|
+
// .matcha-crop__footer β ng-content de actions
|
|
17
|
+
// =============================================================================
|
|
18
|
+
|
|
19
|
+
@mixin matcha-crop-theme($theme) {
|
|
20
|
+
|
|
21
|
+
.matcha-crop {
|
|
22
|
+
color: var(--matcha-color-text-primary);
|
|
23
|
+
|
|
24
|
+
.matcha-crop__header {
|
|
25
|
+
color: var(--matcha-color-text-primary);
|
|
26
|
+
border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.matcha-crop__canvas {
|
|
30
|
+
background: var(--matcha-color-surface-inverse, #121212);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Stage claro (data-stage="light", vindo do componente: stage='light' ou 'auto' com
|
|
34
|
+
// imagem com alfa). O surface-inverse Γ© pra foto opaca; uma assinatura PNG de traΓ§o
|
|
35
|
+
// escuro sobre transparente sumia nele (IN-42580). Xadrez sutil sobre surface-card:
|
|
36
|
+
// evidencia a transparΓͺncia sem competir com a imagem. O scrim fora do frame segue igual.
|
|
37
|
+
&[data-stage="light"] .matcha-crop__canvas {
|
|
38
|
+
background-color: var(--matcha-color-surface-card, #ffffff);
|
|
39
|
+
background-image: repeating-conic-gradient(
|
|
40
|
+
var(--matcha-color-surface-hover, rgba(0, 0, 0, 0.06)) 0 25%,
|
|
41
|
+
transparent 0 50%
|
|
42
|
+
);
|
|
43
|
+
background-size: 16px 16px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.matcha-crop__overlay {
|
|
47
|
+
background: var(--matcha-color-scrim, rgba(0, 0, 0, 0.55));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.matcha-crop__area {
|
|
51
|
+
border: var(--matcha-border-thin, 2px) solid var(--matcha-color-accent);
|
|
52
|
+
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
|
|
53
|
+
|
|
54
|
+
&:focus-visible {
|
|
55
|
+
outline: 3px solid var(--matcha-color-focus-ring);
|
|
56
|
+
outline-offset: 4px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.matcha-crop__grid-line {
|
|
61
|
+
background: var(--matcha-color-on-overlay, rgba(255, 255, 255, 0.3));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.matcha-crop__handle {
|
|
65
|
+
background: var(--matcha-color-surface);
|
|
66
|
+
border-color: var(--matcha-color-accent);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.matcha-crop__zoom-bar {
|
|
70
|
+
background: var(--matcha-color-surface-card);
|
|
71
|
+
border: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border);
|
|
72
|
+
color: var(--matcha-color-text-secondary);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.matcha-crop__icon-btn {
|
|
76
|
+
color: var(--matcha-color-text-secondary);
|
|
77
|
+
|
|
78
|
+
&:hover { background: var(--matcha-color-surface-hover); color: var(--matcha-color-text-primary); }
|
|
79
|
+
&:focus-visible { outline: 2px solid var(--matcha-color-focus-ring); outline-offset: 2px; }
|
|
80
|
+
&.is-active { color: var(--matcha-color-accent); background: var(--matcha-color-accent-surface-hover); }
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.matcha-crop__state-icon { color: var(--matcha-color-text-muted); }
|
|
84
|
+
.matcha-crop__state-title { color: var(--matcha-color-text-primary); }
|
|
85
|
+
.matcha-crop__state-desc { color: var(--matcha-color-text-secondary); }
|
|
86
|
+
|
|
87
|
+
.matcha-crop__state--error .matcha-crop__state-icon { color: var(--matcha-color-danger); }
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// ββ Layout ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
92
|
+
|
|
93
|
+
.matcha-crop {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
width: 100%;
|
|
97
|
+
height: 100%;
|
|
98
|
+
min-height: 320px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// ββ Header ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
102
|
+
|
|
103
|
+
.matcha-crop__header {
|
|
104
|
+
display: flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
gap: var(--matcha-space-100, 8px);
|
|
107
|
+
padding: var(--matcha-space-200, 16px) var(--matcha-space-300, 24px);
|
|
108
|
+
font-family: var(--matcha-font-family);
|
|
109
|
+
font-size: var(--matcha-text-title-sm, 16px);
|
|
110
|
+
font-weight: var(--matcha-weight-semibold, 600);
|
|
111
|
+
line-height: var(--matcha-leading-title-sm, 22px);
|
|
112
|
+
flex-shrink: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.matcha-crop__title {
|
|
116
|
+
flex: 1;
|
|
117
|
+
min-width: 0;
|
|
118
|
+
overflow: hidden;
|
|
119
|
+
text-overflow: ellipsis;
|
|
120
|
+
white-space: nowrap;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.matcha-crop__toolbar {
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
gap: var(--matcha-space-050, 4px);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.matcha-crop__icon-btn {
|
|
130
|
+
display: inline-flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
width: 32px;
|
|
134
|
+
height: 32px;
|
|
135
|
+
padding: 0;
|
|
136
|
+
background: transparent;
|
|
137
|
+
border: 0;
|
|
138
|
+
border-radius: var(--matcha-radius-md, 4px);
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
transition: background 150ms ease, color 150ms ease;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// ββ Canvas (interaction area) ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
144
|
+
|
|
145
|
+
.matcha-crop__canvas {
|
|
146
|
+
position: relative;
|
|
147
|
+
flex: 1;
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: center;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
min-height: 320px;
|
|
153
|
+
cursor: grab;
|
|
154
|
+
user-select: none;
|
|
155
|
+
|
|
156
|
+
&.is-interacting { cursor: grabbing; }
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// `width/height: 100%` + `object-fit: contain` Γ© o pareamento correto: forΓ§a o
|
|
160
|
+
// IMG box a ocupar o canvas inteiro (mesmo pra natural < container), com o
|
|
161
|
+
// conteΓΊdo escalado preservando aspect ratio. `max-width/height` causava bug
|
|
162
|
+
// em fotos menores que o canvas (ex: thumbnail 80Γ80 num modal 432Γ320): o
|
|
163
|
+
// browser nΓ£o upscala via max-*, mas o JS calculava displayRatio = container/
|
|
164
|
+
// natural > 1 assumindo upscale, fazendo o mapeamento displayβsource ficar
|
|
165
|
+
// deslocado e o crop sair errado.
|
|
166
|
+
.matcha-crop__image {
|
|
167
|
+
width: 100%;
|
|
168
|
+
height: 100%;
|
|
169
|
+
object-fit: contain;
|
|
170
|
+
user-select: none;
|
|
171
|
+
-webkit-user-drag: none;
|
|
172
|
+
pointer-events: none;
|
|
173
|
+
transform-origin: center center;
|
|
174
|
+
will-change: transform;
|
|
175
|
+
transition: transform 80ms ease-out;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// ββ Overlay (punch-out via clip-path) βββββββββββββββββββββββββββββββββββββββ
|
|
179
|
+
|
|
180
|
+
.matcha-crop__overlay {
|
|
181
|
+
position: absolute;
|
|
182
|
+
inset: 0;
|
|
183
|
+
pointer-events: none;
|
|
184
|
+
transition: clip-path 80ms ease-out;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// ββ Crop area βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
188
|
+
|
|
189
|
+
.matcha-crop__area {
|
|
190
|
+
position: absolute;
|
|
191
|
+
box-sizing: border-box;
|
|
192
|
+
cursor: move;
|
|
193
|
+
touch-action: none;
|
|
194
|
+
|
|
195
|
+
&--circle {
|
|
196
|
+
border-radius: 50%;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Posicionado ACIMA da Γ‘rea de crop em vez do centro. Quando shape=circle,
|
|
201
|
+
// o texto do centro era cruzado pelo border (visualmente parecia cortado).
|
|
202
|
+
// Acima fica em zona de overlay escurecido, sempre legΓvel.
|
|
203
|
+
.matcha-crop__hint {
|
|
204
|
+
position: absolute;
|
|
205
|
+
bottom: calc(100% + var(--matcha-space-100, 8px));
|
|
206
|
+
left: 50%;
|
|
207
|
+
transform: translateX(-50%);
|
|
208
|
+
padding: var(--matcha-space-050, 4px) var(--matcha-space-100, 8px);
|
|
209
|
+
font-size: 11px;
|
|
210
|
+
color: rgba(255, 255, 255, 0.85);
|
|
211
|
+
background: rgba(0, 0, 0, 0.7);
|
|
212
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
213
|
+
pointer-events: none;
|
|
214
|
+
white-space: nowrap;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// ββ Rule of thirds grid (mostra sΓ³ durante interaΓ§Γ£o) ββββββββββββββββββββββ
|
|
218
|
+
|
|
219
|
+
.matcha-crop__grid {
|
|
220
|
+
position: absolute;
|
|
221
|
+
inset: 0;
|
|
222
|
+
display: grid;
|
|
223
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
224
|
+
grid-template-rows: 1fr 1fr 1fr;
|
|
225
|
+
pointer-events: none;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.matcha-crop__grid-line {
|
|
229
|
+
&:nth-child(1) { grid-column: 2; grid-row: 1 / 4; width: 1px; justify-self: start; }
|
|
230
|
+
&:nth-child(2) { grid-column: 3; grid-row: 1 / 4; width: 1px; justify-self: start; }
|
|
231
|
+
&:nth-child(3) { grid-column: 1 / 4; grid-row: 2; height: 1px; align-self: start; }
|
|
232
|
+
&:nth-child(4) { grid-column: 1 / 4; grid-row: 3; height: 1px; align-self: start; }
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// ββ Resize handles (8 directions, 44Γ44 touch target) ββββββββββββββββββββββ
|
|
236
|
+
|
|
237
|
+
.matcha-crop__handle {
|
|
238
|
+
position: absolute;
|
|
239
|
+
width: var(--matcha-crop-handle-size, 16px);
|
|
240
|
+
height: var(--matcha-crop-handle-size, 16px);
|
|
241
|
+
margin: calc(-1 * var(--matcha-crop-handle-size, 16px) / 2);
|
|
242
|
+
padding: 0;
|
|
243
|
+
background: transparent;
|
|
244
|
+
border: var(--matcha-border-thin, 2px) solid transparent;
|
|
245
|
+
border-radius: 50%;
|
|
246
|
+
pointer-events: auto;
|
|
247
|
+
z-index: 2;
|
|
248
|
+
touch-action: none;
|
|
249
|
+
|
|
250
|
+
// Expand touch target via ::after (visual = 16px, hit = 44px)
|
|
251
|
+
&::after {
|
|
252
|
+
content: '';
|
|
253
|
+
position: absolute;
|
|
254
|
+
inset: -14px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&:focus-visible {
|
|
258
|
+
outline: 2px solid var(--matcha-color-focus-ring);
|
|
259
|
+
outline-offset: 2px;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// ββ Zoom bar ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
264
|
+
|
|
265
|
+
.matcha-crop__zoom-bar {
|
|
266
|
+
position: absolute;
|
|
267
|
+
bottom: var(--matcha-space-200, 16px);
|
|
268
|
+
left: 50%;
|
|
269
|
+
transform: translateX(-50%);
|
|
270
|
+
display: flex;
|
|
271
|
+
align-items: center;
|
|
272
|
+
gap: var(--matcha-space-100, 8px);
|
|
273
|
+
padding: var(--matcha-space-075, 6px) var(--matcha-space-150, 12px);
|
|
274
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
275
|
+
backdrop-filter: blur(8px);
|
|
276
|
+
font-size: var(--matcha-text-body-sm, 12px);
|
|
277
|
+
z-index: 3;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.matcha-crop__zoom-slider {
|
|
281
|
+
-webkit-appearance: none;
|
|
282
|
+
appearance: none;
|
|
283
|
+
width: 160px;
|
|
284
|
+
height: 4px;
|
|
285
|
+
background: var(--matcha-color-surface-border);
|
|
286
|
+
border-radius: 2px;
|
|
287
|
+
cursor: pointer;
|
|
288
|
+
outline: none;
|
|
289
|
+
|
|
290
|
+
&::-webkit-slider-thumb {
|
|
291
|
+
-webkit-appearance: none;
|
|
292
|
+
width: 16px;
|
|
293
|
+
height: 16px;
|
|
294
|
+
background: var(--matcha-color-accent);
|
|
295
|
+
border: 2px solid var(--matcha-color-surface);
|
|
296
|
+
border-radius: 50%;
|
|
297
|
+
cursor: grab;
|
|
298
|
+
}
|
|
299
|
+
&::-moz-range-thumb {
|
|
300
|
+
width: 16px;
|
|
301
|
+
height: 16px;
|
|
302
|
+
background: var(--matcha-color-accent);
|
|
303
|
+
border: 2px solid var(--matcha-color-surface);
|
|
304
|
+
border-radius: 50%;
|
|
305
|
+
cursor: grab;
|
|
306
|
+
}
|
|
307
|
+
&:focus-visible::-webkit-slider-thumb {
|
|
308
|
+
box-shadow: 0 0 0 3px var(--matcha-color-focus-ring);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.matcha-crop__zoom-value {
|
|
313
|
+
min-width: 40px;
|
|
314
|
+
font-family: 'Fira Code', Consolas, monospace;
|
|
315
|
+
font-variant-numeric: tabular-nums;
|
|
316
|
+
text-align: right;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// ββ States (empty / loading / error) ββββββββββββββββββββββββββββββββββββββββ
|
|
320
|
+
|
|
321
|
+
.matcha-crop__state {
|
|
322
|
+
display: flex;
|
|
323
|
+
flex-direction: column;
|
|
324
|
+
align-items: center;
|
|
325
|
+
justify-content: center;
|
|
326
|
+
gap: var(--matcha-space-100, 8px);
|
|
327
|
+
padding: var(--matcha-space-300, 24px);
|
|
328
|
+
text-align: center;
|
|
329
|
+
max-width: 360px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.matcha-crop__state-icon {
|
|
333
|
+
font-size: 48px;
|
|
334
|
+
width: 48px;
|
|
335
|
+
height: 48px;
|
|
336
|
+
--matcha-icon-color: currentColor;
|
|
337
|
+
|
|
338
|
+
&--spin {
|
|
339
|
+
animation: matcha-crop-spin 1.2s linear infinite;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.matcha-crop__state-title {
|
|
344
|
+
margin: 0;
|
|
345
|
+
font-size: var(--matcha-text-title-sm, 16px);
|
|
346
|
+
font-weight: var(--matcha-weight-semibold, 600);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.matcha-crop__state-desc {
|
|
350
|
+
margin: 0;
|
|
351
|
+
font-size: var(--matcha-text-body-sm, 12px);
|
|
352
|
+
line-height: 1.4;
|
|
353
|
+
|
|
354
|
+
code {
|
|
355
|
+
padding: 2px 6px;
|
|
356
|
+
background: var(--matcha-color-surface-card);
|
|
357
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
358
|
+
font-family: 'Fira Code', Consolas, monospace;
|
|
359
|
+
font-size: 11px;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
@keyframes matcha-crop-spin {
|
|
364
|
+
to { transform: rotate(360deg); }
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// ββ SR-only live region ββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
368
|
+
|
|
369
|
+
.matcha-crop__sr-live {
|
|
370
|
+
position: absolute;
|
|
371
|
+
width: 1px;
|
|
372
|
+
height: 1px;
|
|
373
|
+
padding: 0;
|
|
374
|
+
margin: -1px;
|
|
375
|
+
overflow: hidden;
|
|
376
|
+
clip: rect(0, 0, 0, 0);
|
|
377
|
+
white-space: nowrap;
|
|
378
|
+
border: 0;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// ββ Footer ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
382
|
+
// Footer sΓ³ ocupa espaΓ§o quando ng-content tem children projetados.
|
|
383
|
+
// Truque CSS: empty footer fica height 0 via :has() β quando vazio, esconde.
|
|
384
|
+
|
|
385
|
+
.matcha-crop__footer {
|
|
386
|
+
display: flex;
|
|
387
|
+
align-items: center;
|
|
388
|
+
justify-content: flex-end;
|
|
389
|
+
gap: var(--matcha-space-100, 8px);
|
|
390
|
+
padding: var(--matcha-space-200, 16px) var(--matcha-space-300, 24px);
|
|
391
|
+
flex-shrink: 0;
|
|
392
|
+
|
|
393
|
+
&:empty {
|
|
394
|
+
padding: 0;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// ββ Responsive ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
399
|
+
|
|
400
|
+
@media (max-width: 640px) {
|
|
401
|
+
.matcha-crop__header,
|
|
402
|
+
.matcha-crop__footer {
|
|
403
|
+
padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
404
|
+
}
|
|
405
|
+
.matcha-crop__canvas { min-height: 280px; }
|
|
406
|
+
.matcha-crop__zoom-slider { width: 120px; }
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// ββ Reduced motion ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
410
|
+
|
|
411
|
+
@media (prefers-reduced-motion: reduce) {
|
|
412
|
+
.matcha-crop__image,
|
|
413
|
+
.matcha-crop__overlay {
|
|
414
|
+
transition: none;
|
|
415
|
+
}
|
|
416
|
+
.matcha-crop__state-icon--spin {
|
|
417
|
+
animation: none;
|
|
418
|
+
}
|
|
419
|
+
}
|