@inchurch/matcha-theme 20.0.8 → 20.276.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstracts/_colors.scss +404 -404
- package/abstracts/_elevation.scss +102 -102
- package/abstracts/_functions.scss +1212 -1212
- package/abstracts/_media-breakpoint.scss +23 -23
- package/abstracts/_typography.scss +127 -127
- package/base/_reset.scss +438 -438
- package/components/app-page-header.scss +260 -0
- package/components/matcha-accordion.scss +294 -157
- package/components/matcha-avatar.scss +171 -31
- package/components/matcha-badge.scss +4 -4
- package/components/matcha-breadcrumb.scss +232 -126
- package/components/matcha-button-toggle.scss +44 -0
- package/components/matcha-buttons.scss +908 -784
- package/components/matcha-calendar.scss +70 -2
- package/components/matcha-cards.scss +28 -2
- package/components/matcha-checkbox.scss +191 -490
- package/components/matcha-chip.scss +297 -212
- package/components/matcha-command-palette.scss +291 -63
- package/components/matcha-crop.scss +407 -172
- package/components/matcha-date.scss +81 -81
- package/components/matcha-divider.scss +86 -31
- package/components/matcha-drawer.scss +201 -50
- package/components/matcha-drop-image.scss +14 -0
- package/components/matcha-drop-list.scss +42 -1
- package/components/matcha-empty-state.scss +195 -83
- package/components/matcha-flag.scss +93 -52
- package/components/matcha-footer.scss +68 -164
- package/components/matcha-form-field.scss +52 -0
- package/components/matcha-form-section.scss +101 -101
- package/components/matcha-header.scss +135 -325
- package/components/matcha-highlight.scss +65 -197
- package/components/matcha-hint-text.scss +21 -0
- package/components/matcha-horizontal-tree.scss +317 -317
- package/components/matcha-icon.scss +17 -25
- package/components/matcha-list.scss +5 -5
- package/components/matcha-menu.scss +13 -0
- package/components/matcha-modal.scss +58 -84
- package/components/matcha-nav.scss +361 -230
- package/components/matcha-notification.scss +413 -197
- package/components/matcha-option.scss +79 -23
- package/components/matcha-paginator.scss +689 -235
- package/components/matcha-panel.scss +42 -26
- package/components/matcha-profile-card.scss +50 -50
- package/components/matcha-progress-bar.scss +257 -153
- package/components/matcha-radio.scss +244 -452
- package/components/matcha-scrollbox-shadow.scss +122 -122
- package/components/matcha-select.scss +3 -3
- package/components/matcha-skeleton.scss +18 -0
- package/components/matcha-slide-toggle.scss +47 -2
- package/components/matcha-slider.scss +172 -75
- package/components/matcha-snack-bar.scss +114 -121
- package/components/matcha-spinner.scss +76 -57
- package/components/matcha-status-pill.scss +82 -0
- package/components/matcha-stepper.scss +377 -177
- package/components/matcha-table.scss +569 -785
- package/components/matcha-tabs.scss +624 -469
- package/components/matcha-text-editor.scss +98 -144
- package/components/matcha-toolbar.scss +359 -206
- package/components/matcha-tooltip.scss +156 -62
- package/components/matcha-tree-view.scss +189 -0
- package/components/matcha-uploader.scss +240 -62
- package/fonts/manrope/manrope-latin-ext.woff2 +0 -0
- package/fonts/manrope/manrope-latin.woff2 +0 -0
- package/layout/matcha-page-layout.scss +776 -0
- package/main.scss +232 -261
- package/package.json +1 -1
- package/tokens/_animations-tokens.scss +37 -37
- package/tokens/_breakpoints-tokens.scss +35 -26
- package/tokens/_color-tokens.scss +1152 -1152
- package/tokens/_css-custom-properties.scss +650 -568
- package/tokens/_spacing-tokens.scss +94 -94
- package/vendors/angular-editor.scss +56 -56
- package/vendors/angular-material-fixes.scss +297 -297
- package/vendors/charts.scss +92 -92
- package/vendors/ng5-slider.scss +56 -56
- package/vendors/ngx-material-timepicker.scss +50 -50
- package/fonts/CircularStd-Black.eot +0 -0
- package/fonts/CircularStd-Black.svg +0 -3426
- package/fonts/CircularStd-Black.ttf +0 -0
- package/fonts/CircularStd-Black.woff +0 -0
- package/fonts/CircularStd-Black.woff2 +0 -0
- package/fonts/CircularStd-Bold.eot +0 -0
- package/fonts/CircularStd-Bold.otf +0 -0
- package/fonts/CircularStd-Bold.svg +0 -13532
- package/fonts/CircularStd-Bold.ttf +0 -0
- package/fonts/CircularStd-Bold.woff +0 -0
- package/fonts/CircularStd-Bold.woff2 +0 -0
- package/fonts/CircularStd-Medium.eot +0 -0
- package/fonts/CircularStd-Medium.otf +0 -0
- package/fonts/CircularStd-Medium.svg +0 -13511
- package/fonts/CircularStd-Medium.ttf +0 -0
- package/fonts/CircularStd-Medium.woff +0 -0
- package/fonts/CircularStd-Medium.woff2 +0 -0
- package/fonts/CircularStd-Regular.eot +0 -0
- package/fonts/CircularStd-Regular.otf +0 -0
- package/fonts/CircularStd-Regular.svg +0 -2378
- package/fonts/CircularStd-Regular.ttf +0 -0
- package/fonts/CircularStd-Regular.woff +0 -0
- package/fonts/CircularStd-Regular.woff2 +0 -0
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
// =========================================================
|
|
2
|
-
// * Matcha Date Styles
|
|
3
|
-
// =========================================================
|
|
4
|
-
|
|
5
|
-
@mixin matcha-date-theme($theme) {
|
|
6
|
-
.matcha-date-input {
|
|
7
|
-
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
8
|
-
|
|
9
|
-
&::placeholder {
|
|
10
|
-
color: var(--matcha-color-text-placeholder, #{getBlueGrey($theme)});
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
&:disabled {
|
|
14
|
-
opacity: var(--matcha-opacity-disabled, 0.38);
|
|
15
|
-
color: var(--matcha-color-disabled, #{getDisabled($theme)});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.matcha-date-input {
|
|
21
|
-
width: 100%;
|
|
22
|
-
font-size: var(--matcha-text-body-md, 14px);
|
|
23
|
-
font-family: inherit;
|
|
24
|
-
line-height: 1.5;
|
|
25
|
-
color: var(--matcha-text-primary, #333);
|
|
26
|
-
background-color: transparent;
|
|
27
|
-
border: none;
|
|
28
|
-
outline: none;
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
|
|
31
|
-
&::placeholder {
|
|
32
|
-
color: var(--matcha-text-placeholder, #999);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&:disabled {
|
|
36
|
-
pointer-events: none; cursor: default;
|
|
37
|
-
opacity: 0.6;
|
|
38
|
-
color: var(--matcha-text-disabled, #999);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Customização do ícone do calendário
|
|
42
|
-
&::-webkit-calendar-picker-indicator {
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
filter: opacity(0.6);
|
|
45
|
-
transition: filter 0.2s ease;
|
|
46
|
-
|
|
47
|
-
&:hover {
|
|
48
|
-
filter: opacity(1);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&:disabled::-webkit-calendar-picker-indicator {
|
|
53
|
-
pointer-events: none; cursor: default;
|
|
54
|
-
opacity: 0.3;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Firefox
|
|
58
|
-
&::-moz-calendar-picker-indicator {
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
opacity: 0.6;
|
|
61
|
-
transition: opacity 0.2s ease;
|
|
62
|
-
|
|
63
|
-
&:hover {
|
|
64
|
-
opacity: 1;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&:disabled::-moz-calendar-picker-indicator {
|
|
69
|
-
pointer-events: none; cursor: default;
|
|
70
|
-
opacity: 0.3;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Integração com matcha-form-field
|
|
75
|
-
matcha-form-field {
|
|
76
|
-
matcha-date {
|
|
77
|
-
width: 100%;
|
|
78
|
-
display: block;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
1
|
+
// =========================================================
|
|
2
|
+
// * Matcha Date Styles
|
|
3
|
+
// =========================================================
|
|
4
|
+
|
|
5
|
+
@mixin matcha-date-theme($theme) {
|
|
6
|
+
.matcha-date-input {
|
|
7
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
8
|
+
|
|
9
|
+
&::placeholder {
|
|
10
|
+
color: var(--matcha-color-text-placeholder, #{getBlueGrey($theme)});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&:disabled {
|
|
14
|
+
opacity: var(--matcha-opacity-disabled, 0.38);
|
|
15
|
+
color: var(--matcha-color-disabled, #{getDisabled($theme)});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.matcha-date-input {
|
|
21
|
+
width: 100%;
|
|
22
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
23
|
+
font-family: inherit;
|
|
24
|
+
line-height: 1.5;
|
|
25
|
+
color: var(--matcha-text-primary, #333);
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
border: none;
|
|
28
|
+
outline: none;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
|
|
31
|
+
&::placeholder {
|
|
32
|
+
color: var(--matcha-text-placeholder, #999);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:disabled {
|
|
36
|
+
pointer-events: none; cursor: default;
|
|
37
|
+
opacity: 0.6;
|
|
38
|
+
color: var(--matcha-text-disabled, #999);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Customização do ícone do calendário
|
|
42
|
+
&::-webkit-calendar-picker-indicator {
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
filter: opacity(0.6);
|
|
45
|
+
transition: filter 0.2s ease;
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
filter: opacity(1);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:disabled::-webkit-calendar-picker-indicator {
|
|
53
|
+
pointer-events: none; cursor: default;
|
|
54
|
+
opacity: 0.3;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Firefox
|
|
58
|
+
&::-moz-calendar-picker-indicator {
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
opacity: 0.6;
|
|
61
|
+
transition: opacity 0.2s ease;
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
opacity: 1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:disabled::-moz-calendar-picker-indicator {
|
|
69
|
+
pointer-events: none; cursor: default;
|
|
70
|
+
opacity: 0.3;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Integração com matcha-form-field
|
|
75
|
+
matcha-form-field {
|
|
76
|
+
matcha-date {
|
|
77
|
+
width: 100%;
|
|
78
|
+
display: block;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -1,45 +1,100 @@
|
|
|
1
1
|
// =============================================================================
|
|
2
|
-
// matcha-divider.scss —
|
|
3
|
-
//
|
|
2
|
+
// matcha-divider.scss — Figma DSV3 matcha/divider (14905:34)
|
|
3
|
+
// 2 variants visuais: Direção=Horizontal (280×1px) / Vertical (1×80px+)
|
|
4
|
+
// Cor: matcha/color/text/hint @ matcha/opacity/strong (0.3)
|
|
5
|
+
// Tipografia label: matcha/text/caption (11/14)
|
|
6
|
+
// + extensão M3: slot label opcional ("OU", "Nova seção") + inset variant
|
|
4
7
|
// =============================================================================
|
|
5
8
|
|
|
6
9
|
// ── Structural ──────────────────────────────────────────────────────────────
|
|
10
|
+
// Note: divider não tem animação por design — não precisa de prefers-reduced-motion.
|
|
7
11
|
|
|
8
12
|
matcha-divider {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
flex-shrink: 0;
|
|
12
|
-
|
|
13
|
-
&[direction="horizontal"],
|
|
14
|
-
&:not([direction]) {
|
|
15
|
-
flex-direction: row;
|
|
16
|
-
width: 100%;
|
|
17
|
-
|
|
18
|
-
.matcha-divider-line {
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 0;
|
|
21
|
-
border-top: var(--matcha-border-hairline, 1px) solid;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
flex-shrink: 0;
|
|
24
15
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
// ── Horizontal default (sem direction ou direction="horizontal") ──
|
|
17
|
+
&[direction="horizontal"],
|
|
18
|
+
&:not([direction]) {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
align-items: center;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
// ── Vertical ──
|
|
26
|
+
&[direction="vertical"] {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
align-items: center;
|
|
30
|
+
align-self: stretch;
|
|
33
31
|
}
|
|
34
|
-
}
|
|
35
32
|
}
|
|
36
33
|
|
|
37
|
-
// ──
|
|
34
|
+
// ── Linha — 1px hairline com text/hint @ opacity-strong (canônico Figma) ────
|
|
35
|
+
.matcha-divider-line {
|
|
36
|
+
flex: 1 1 auto;
|
|
37
|
+
background-color: var(--matcha-color-text-hint, #9AA0A6);
|
|
38
|
+
opacity: var(--matcha-opacity-strong, 0.3);
|
|
39
|
+
pointer-events: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
matcha-divider[direction="horizontal"] .matcha-divider-line,
|
|
43
|
+
matcha-divider:not([direction]) .matcha-divider-line {
|
|
44
|
+
height: var(--matcha-border-hairline, 1px);
|
|
45
|
+
min-width: var(--matcha-border-hairline, 1px);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
matcha-divider[direction="vertical"] .matcha-divider-line {
|
|
49
|
+
width: var(--matcha-border-hairline, 1px);
|
|
50
|
+
min-height: var(--matcha-border-hairline, 1px);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ── Inset variants — linha não-completa (M3 List Divider) ──────────────────
|
|
54
|
+
// Útil em listas com avatar (linha começa depois do avatar)
|
|
55
|
+
matcha-divider[direction="horizontal"][inset="start"] .matcha-divider-line:first-of-type,
|
|
56
|
+
matcha-divider:not([direction])[inset="start"] .matcha-divider-line:first-of-type {
|
|
57
|
+
margin-left: var(--matcha-space-700, 56px);
|
|
58
|
+
}
|
|
59
|
+
matcha-divider[direction="horizontal"][inset="end"] .matcha-divider-line:last-of-type,
|
|
60
|
+
matcha-divider:not([direction])[inset="end"] .matcha-divider-line:last-of-type {
|
|
61
|
+
margin-right: var(--matcha-space-300, 24px);
|
|
62
|
+
}
|
|
63
|
+
matcha-divider[direction="horizontal"][inset="both"] .matcha-divider-line,
|
|
64
|
+
matcha-divider:not([direction])[inset="both"] .matcha-divider-line {
|
|
65
|
+
margin-left: var(--matcha-space-300, 24px);
|
|
66
|
+
margin-right: var(--matcha-space-300, 24px);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// ── Label slot ──────────────────────────────────────────────────────────────
|
|
70
|
+
// Tipografia: matcha/text/caption (11/14 Regular) text-secondary.
|
|
71
|
+
// Quando vazio (:empty), CSS :has esconde slot + segunda linha.
|
|
72
|
+
.matcha-divider-label {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
flex: 0 0 auto;
|
|
77
|
+
padding: 0 var(--matcha-space-100, 8px);
|
|
78
|
+
font-family: var(--matcha-font-family);
|
|
79
|
+
font-size: var(--matcha-text-p-tiny, 11px);
|
|
80
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
81
|
+
line-height: var(--matcha-leading-p-tiny, 14px);
|
|
82
|
+
color: var(--matcha-color-text-secondary);
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
user-select: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Vertical: padding em volta vertical (não horizontal)
|
|
88
|
+
matcha-divider[direction="vertical"] .matcha-divider-label {
|
|
89
|
+
padding: var(--matcha-space-100, 8px) 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ============================================================================
|
|
93
|
+
// Theme mixin — vazia. Todas as cores/tokens via CSS custom properties globais
|
|
94
|
+
// (já reagem a tema light/dark via _css-custom-properties.scss).
|
|
95
|
+
// Mantida só por compat com main.scss que faz @include matcha-divider-theme($theme).
|
|
96
|
+
// ============================================================================
|
|
38
97
|
|
|
39
98
|
@mixin matcha-divider-theme($theme) {
|
|
40
|
-
|
|
41
|
-
.matcha-divider-line {
|
|
42
|
-
border-color: var(--matcha-color-border, #{getGrey($theme)});
|
|
43
|
-
}
|
|
44
|
-
}
|
|
99
|
+
// Sem overrides — tokens globais bastam.
|
|
45
100
|
}
|
|
@@ -16,6 +16,17 @@
|
|
|
16
16
|
to { opacity: 0; }
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
// Shake feedback — disparado quando ESC/backdrop click são bloqueados por
|
|
20
|
+
// disableClose=true. Sinaliza visualmente que a ação foi capturada mas
|
|
21
|
+
// bloqueada (em vez de silent fail).
|
|
22
|
+
@keyframes matcha-drawer-shake {
|
|
23
|
+
0%, 100% { transform: translate3d(0, 0, 0); }
|
|
24
|
+
20% { transform: translate3d(-8px, 0, 0); }
|
|
25
|
+
40% { transform: translate3d(8px, 0, 0); }
|
|
26
|
+
60% { transform: translate3d(-4px, 0, 0); }
|
|
27
|
+
80% { transform: translate3d(4px, 0, 0); }
|
|
28
|
+
}
|
|
29
|
+
|
|
19
30
|
@media (prefers-reduced-motion: reduce) {
|
|
20
31
|
matcha-drawer,
|
|
21
32
|
.matcha-drawer-backdrop,
|
|
@@ -25,6 +36,47 @@
|
|
|
25
36
|
}
|
|
26
37
|
}
|
|
27
38
|
|
|
39
|
+
// ── Forced colors (Windows High Contrast) ──
|
|
40
|
+
// rgba/blur/shadow somem; usar Canvas/CanvasText/SelectedItem.
|
|
41
|
+
@media (forced-colors: active) {
|
|
42
|
+
matcha-drawer {
|
|
43
|
+
border: 1px solid CanvasText !important;
|
|
44
|
+
background: Canvas !important;
|
|
45
|
+
box-shadow: none !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.matcha-drawer-backdrop {
|
|
49
|
+
background: rgba(0, 0, 0, 0.7) !important;
|
|
50
|
+
backdrop-filter: none !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
matcha-drawer:focus-visible {
|
|
54
|
+
outline: 2px solid CanvasText !important;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ── Reduced transparency ──
|
|
59
|
+
// Backdrop blur 4px → solid 85% pra usuários com dificuldade de ler sobre blur.
|
|
60
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
61
|
+
.matcha-drawer-backdrop {
|
|
62
|
+
background: rgba(0, 0, 0, 0.85) !important;
|
|
63
|
+
backdrop-filter: none !important;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ── Print ──
|
|
68
|
+
// Drawer + chrome flutuante somem em impressão.
|
|
69
|
+
@media print {
|
|
70
|
+
matcha-drawer,
|
|
71
|
+
.matcha-drawer-backdrop {
|
|
72
|
+
display: none !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
matcha-drawer-content {
|
|
76
|
+
margin: 0 !important;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
28
80
|
// =============================================================================
|
|
29
81
|
// Theme mixin
|
|
30
82
|
// =============================================================================
|
|
@@ -77,38 +129,55 @@
|
|
|
77
129
|
|
|
78
130
|
// ── Drawer ──
|
|
79
131
|
matcha-drawer {
|
|
80
|
-
display:
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
81
134
|
position: absolute;
|
|
82
135
|
top: 0;
|
|
83
136
|
bottom: 0;
|
|
137
|
+
// Default position=start ancora à esquerda. End/bottom override via .matcha-drawer-end/.matcha-drawer-bottom.
|
|
138
|
+
// Sem o explícito, layouts que usam o drawer dentro de containers flexíveis renderizam fora da posição esperada.
|
|
139
|
+
left: 0;
|
|
84
140
|
z-index: 10;
|
|
85
141
|
outline: 0;
|
|
86
142
|
box-sizing: border-box;
|
|
87
|
-
overflow-y:
|
|
88
|
-
|
|
143
|
+
// Drawer raiz não scrolla — só o body slot scrolla (overflow-y:auto).
|
|
144
|
+
// Header/footer são flex-shrink:0 e ficam fixos.
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
// Defensivo: drawer nunca extrapola viewport mesmo com [width] absurdo.
|
|
147
|
+
max-width: 100vw;
|
|
89
148
|
transform: translate3d(-100%, 0, 0);
|
|
90
149
|
visibility: hidden;
|
|
150
|
+
// Width inclusa pra animar resize dinâmico (responsive token, [width] bound).
|
|
91
151
|
transition: transform var(--matcha-duration-normal, 200ms) cubic-bezier(0.16, 1, 0.3, 1),
|
|
92
|
-
visibility var(--matcha-duration-normal, 200ms) ease
|
|
152
|
+
visibility var(--matcha-duration-normal, 200ms) ease,
|
|
153
|
+
width var(--matcha-duration-normal, 200ms) cubic-bezier(0.16, 1, 0.3, 1);
|
|
93
154
|
background-color: var(--matcha-color-surface, #{getSurface($theme)});
|
|
94
155
|
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
95
156
|
pointer-events: auto;
|
|
96
157
|
|
|
97
|
-
// Shadow
|
|
98
|
-
|
|
158
|
+
// Shadow inline (3 stacked) — Figma DSV3 spec exato pro drawer.
|
|
159
|
+
// Não usa --matcha-shadow-3 token porque o Figma drawer também usa inline
|
|
160
|
+
// (não bound a um effect style). Side/push modes removem via override.
|
|
161
|
+
box-shadow:
|
|
162
|
+
0 0 1px rgba(0, 0, 0, 0.08),
|
|
163
|
+
0 4px 16px rgba(0, 0, 0, 0.12),
|
|
164
|
+
0 16px 48px rgba(0, 0, 0, 0.16);
|
|
99
165
|
|
|
100
166
|
@if $is-dark {
|
|
101
|
-
|
|
167
|
+
// surface-border é o token canônico DSV3 (rgba 255,255,255,0.12 dark).
|
|
168
|
+
// Era rgba(255,255,255,0.06) hardcoded — quase invisível e fora do token system.
|
|
169
|
+
border-right: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border, rgba(255, 255, 255, 0.12));
|
|
102
170
|
}
|
|
103
171
|
|
|
104
|
-
// Position end (right)
|
|
172
|
+
// Position end (right) — overrides left:0 default
|
|
105
173
|
&.matcha-drawer-end {
|
|
174
|
+
left: auto;
|
|
106
175
|
right: 0;
|
|
107
176
|
transform: translate3d(100%, 0, 0);
|
|
108
177
|
|
|
109
178
|
@if $is-dark {
|
|
110
179
|
border-right: none;
|
|
111
|
-
border-left: var(--matcha-border-hairline, 1px) solid rgba(255, 255, 255, 0.
|
|
180
|
+
border-left: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border, rgba(255, 255, 255, 0.12));
|
|
112
181
|
}
|
|
113
182
|
}
|
|
114
183
|
|
|
@@ -119,28 +188,65 @@
|
|
|
119
188
|
right: 0;
|
|
120
189
|
bottom: 0;
|
|
121
190
|
width: 100%;
|
|
122
|
-
|
|
191
|
+
// 90% do container (relative ao matcha-drawer-container parent).
|
|
192
|
+
// Em produção (container = viewport via 100vh), == 90vh efetivo.
|
|
193
|
+
// Em playground/embed (container 360px), == 324px e respeita o frame.
|
|
194
|
+
// min() com fallback 90vh garante comportamento se parent for auto.
|
|
195
|
+
max-height: min(90vh, 90%);
|
|
123
196
|
border-radius: var(--matcha-radius-xl, 16px) var(--matcha-radius-xl, 16px) 0 0;
|
|
124
197
|
transform: translate3d(0, 100%, 0);
|
|
125
198
|
|
|
126
199
|
@if $is-dark {
|
|
127
200
|
border-right: none;
|
|
128
|
-
border-top: var(--matcha-border-hairline, 1px) solid rgba(255, 255, 255, 0.
|
|
201
|
+
border-top: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border, rgba(255, 255, 255, 0.12));
|
|
129
202
|
} @else {
|
|
130
203
|
border-right: none;
|
|
131
204
|
}
|
|
132
205
|
|
|
133
|
-
//
|
|
206
|
+
// safe-area-inset-bottom — iPhone X+ home indicator não cobre footer.
|
|
207
|
+
// Aplicado no slot footer porque é onde botões/CTAs ficam.
|
|
208
|
+
.matcha-drawer__slot--footer {
|
|
209
|
+
padding-block-end: max(var(--drawer-pad-y), env(safe-area-inset-bottom, var(--drawer-pad-y)));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// ── Drag handle (bottom sheet drag-to-dismiss) ──
|
|
214
|
+
// Real elemento (não pseudo) pra capturar pointer events. Renderiza só
|
|
215
|
+
// em position=bottom. 32×4 visual + 32×24 hit area via pad pra touch.
|
|
216
|
+
.matcha-drawer__handle {
|
|
217
|
+
display: none;
|
|
218
|
+
flex-shrink: 0;
|
|
219
|
+
width: 100%;
|
|
220
|
+
padding: var(--matcha-space-100, 8px) 0;
|
|
221
|
+
cursor: grab;
|
|
222
|
+
touch-action: none; // bloqueia scroll-pan vertical default no handle
|
|
223
|
+
user-select: none;
|
|
224
|
+
|
|
134
225
|
&::before {
|
|
135
226
|
content: '';
|
|
136
227
|
display: block;
|
|
137
228
|
width: 32px;
|
|
138
229
|
height: 4px;
|
|
139
|
-
margin:
|
|
230
|
+
margin: 0 auto;
|
|
140
231
|
border-radius: var(--matcha-radius-sm, 2px);
|
|
141
232
|
background: var(--matcha-color-hint, #{getGrey($theme)});
|
|
142
233
|
opacity: 0.3;
|
|
143
234
|
}
|
|
235
|
+
|
|
236
|
+
&:active {
|
|
237
|
+
cursor: grabbing;
|
|
238
|
+
|
|
239
|
+
&::before { opacity: 0.5; }
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&.matcha-drawer-bottom .matcha-drawer__handle {
|
|
244
|
+
display: block;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Drag em andamento — desabilita transition pra seguir o dedo 1:1.
|
|
248
|
+
&.matcha-drawer--dragging {
|
|
249
|
+
transition: none !important;
|
|
144
250
|
}
|
|
145
251
|
|
|
146
252
|
// Opened state
|
|
@@ -154,68 +260,113 @@
|
|
|
154
260
|
z-index: 15;
|
|
155
261
|
}
|
|
156
262
|
|
|
157
|
-
// Mode: side — fixed, no shadow, border
|
|
263
|
+
// Mode: side — fixed, no shadow, border via surface-border token (DSV3 canônico).
|
|
158
264
|
&.matcha-drawer-side {
|
|
159
265
|
z-index: 10;
|
|
160
|
-
border-right: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border, #{getGrey($theme)});
|
|
266
|
+
border-right: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border, var(--matcha-color-border, #{getGrey($theme)}));
|
|
161
267
|
box-shadow: none;
|
|
162
268
|
|
|
163
269
|
&.matcha-drawer-end {
|
|
164
270
|
border-right: none;
|
|
165
|
-
border-left: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border, #{getGrey($theme)});
|
|
271
|
+
border-left: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border, var(--matcha-color-border, #{getGrey($theme)}));
|
|
166
272
|
}
|
|
167
273
|
}
|
|
168
274
|
|
|
169
|
-
// Mode: push — pushes content, border only
|
|
275
|
+
// Mode: push — pushes content, border only.
|
|
170
276
|
&.matcha-drawer-push {
|
|
171
|
-
border-right: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border, #{getGrey($theme)});
|
|
277
|
+
border-right: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border, var(--matcha-color-border, #{getGrey($theme)}));
|
|
172
278
|
box-shadow: none;
|
|
173
279
|
|
|
174
280
|
&.matcha-drawer-end {
|
|
175
281
|
border-right: none;
|
|
176
|
-
border-left: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border, #{getGrey($theme)});
|
|
282
|
+
border-left: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border, var(--matcha-color-border, #{getGrey($theme)}));
|
|
177
283
|
}
|
|
178
284
|
}
|
|
179
285
|
|
|
180
|
-
//
|
|
181
|
-
.matcha-drawer-
|
|
182
|
-
|
|
183
|
-
|
|
286
|
+
// Shake state — feedback visual quando ESC/backdrop bloqueados por disableClose.
|
|
287
|
+
// Animation roda 400ms, sobrepondo o transform: translate3d(0,0,0) do .matcha-drawer-opened.
|
|
288
|
+
// Após terminar, transform volta pro estado .matcha-drawer-opened normal.
|
|
289
|
+
&.matcha-drawer-shake {
|
|
290
|
+
animation: matcha-drawer-shake 400ms ease-in-out;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// ── Slot architecture (header / body / footer) ──
|
|
294
|
+
//
|
|
295
|
+
// CSS vars (consumer override sem !important):
|
|
296
|
+
// --drawer-pad-x / --drawer-pad-y → padding uniforme de cada slot
|
|
297
|
+
// --drawer-divider → border entre slots (default mostra)
|
|
298
|
+
//
|
|
299
|
+
// Cada slot tem padding UNIFORME (não asymmetric). Header e footer
|
|
300
|
+
// ganham border-bottom/top respectivamente — separação visual clara
|
|
301
|
+
// sem depender de gaps assimétricos. Pattern canônico Material/Antd.
|
|
302
|
+
//
|
|
303
|
+
// Defaults simétricos 20/20 (calibração 2026-05-08): alinha com card md
|
|
304
|
+
// e segue padrão DS moderno (Material 16, shadcn 24, Notion 16 — 20 é o
|
|
305
|
+
// sweet spot). Antes era 24/20 assimétrico — quirky e sem motivo claro.
|
|
306
|
+
--drawer-pad-x: var(--matcha-space-250, 20px);
|
|
307
|
+
--drawer-pad-y: var(--matcha-space-250, 20px);
|
|
308
|
+
--drawer-divider: var(--matcha-border-hairline, 1px) solid var(--matcha-color-surface-border, rgba(255, 255, 255, 0.12));
|
|
309
|
+
|
|
310
|
+
.matcha-drawer__slot {
|
|
184
311
|
display: flex;
|
|
185
312
|
flex-direction: column;
|
|
313
|
+
min-width: 0;
|
|
314
|
+
|
|
315
|
+
// Hide vazio (Chrome 105+/Safari 15.4+/FF 121+).
|
|
316
|
+
&:not(:has(*)) {
|
|
317
|
+
display: none;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// Header — fixo no topo (não scrolla com body). Border-bottom separa do body.
|
|
322
|
+
// Elemento projetado pelo consumer recebe flex row via `> *`.
|
|
323
|
+
.matcha-drawer__slot--header {
|
|
324
|
+
flex: 0 0 auto;
|
|
325
|
+
padding: var(--drawer-pad-y) var(--drawer-pad-x);
|
|
326
|
+
border-bottom: var(--drawer-divider);
|
|
327
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
328
|
+
|
|
329
|
+
> * {
|
|
330
|
+
display: flex;
|
|
331
|
+
flex-direction: row;
|
|
332
|
+
align-items: center;
|
|
333
|
+
justify-content: space-between;
|
|
334
|
+
gap: var(--matcha-space-150, 12px);
|
|
335
|
+
width: 100%;
|
|
336
|
+
min-width: 0;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Body — cresce e scrolla quando overflow.
|
|
341
|
+
.matcha-drawer__slot--body {
|
|
342
|
+
flex: 1 1 auto;
|
|
343
|
+
overflow-y: auto;
|
|
344
|
+
overflow-x: hidden;
|
|
345
|
+
padding: var(--drawer-pad-y) var(--drawer-pad-x);
|
|
346
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
186
347
|
-webkit-overflow-scrolling: touch;
|
|
348
|
+
gap: var(--matcha-space-150, 12px);
|
|
187
349
|
}
|
|
188
|
-
}
|
|
189
350
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
gap: var(--matcha-space-150, 12px);
|
|
196
|
-
padding: var(--matcha-space-200, 16px) var(--matcha-space-300, 24px);
|
|
197
|
-
flex-shrink: 0;
|
|
198
|
-
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
199
|
-
}
|
|
351
|
+
// Footer — fixo no bottom. Border-top separa do body.
|
|
352
|
+
.matcha-drawer__slot--footer {
|
|
353
|
+
flex: 0 0 auto;
|
|
354
|
+
padding: var(--drawer-pad-y) var(--drawer-pad-x);
|
|
355
|
+
border-top: var(--drawer-divider);
|
|
200
356
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
357
|
+
> * {
|
|
358
|
+
display: flex;
|
|
359
|
+
flex-direction: row;
|
|
360
|
+
align-items: center;
|
|
361
|
+
justify-content: flex-end;
|
|
362
|
+
gap: var(--matcha-space-150, 12px);
|
|
363
|
+
width: 100%;
|
|
364
|
+
min-width: 0;
|
|
365
|
+
flex-wrap: wrap;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
208
368
|
}
|
|
209
369
|
|
|
210
|
-
// ── Drawer footer ──
|
|
211
|
-
.matcha-drawer-footer {
|
|
212
|
-
display: flex;
|
|
213
|
-
align-items: center;
|
|
214
|
-
justify-content: flex-end;
|
|
215
|
-
gap: var(--matcha-space-150, 12px);
|
|
216
|
-
padding: var(--matcha-space-200, 16px) var(--matcha-space-300, 24px);
|
|
217
|
-
flex-shrink: 0;
|
|
218
|
-
}
|
|
219
370
|
|
|
220
371
|
// ── Drawer content (main page) ──
|
|
221
372
|
matcha-drawer-content {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-drop-image — Estilos completos vivem no próprio componente
|
|
5
|
+
// (drop-image.component.scss com ViewEncapsulation.None).
|
|
6
|
+
//
|
|
7
|
+
// Esse arquivo mantém apenas o mixin no-op pra preservar a chamada @include
|
|
8
|
+
// no main.scss sem quebrar. Quando o componente DSV3 amadurecer e precisar de
|
|
9
|
+
// theme-specific styling (light/dark sass-side), retornar aqui.
|
|
10
|
+
// =============================================================================
|
|
11
|
+
|
|
12
|
+
@mixin matcha-drop-image-theme($theme) {
|
|
13
|
+
// No-op — estilos no componente.
|
|
14
|
+
}
|