@inchurch/matcha-theme 20.0.3
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/README.md +303 -0
- package/abstracts/_colors.scss +405 -0
- package/abstracts/_elevation.scss +102 -0
- package/abstracts/_functions.scss +1213 -0
- package/abstracts/_media-breakpoint.scss +23 -0
- package/abstracts/_typography.scss +127 -0
- package/base/_reset.scss +438 -0
- package/components/matcha-accordion.scss +157 -0
- package/components/matcha-audio-player.scss +32 -0
- package/components/matcha-autocomplete.scss +134 -0
- package/components/matcha-avatar.scss +161 -0
- package/components/matcha-badge.scss +120 -0
- package/components/matcha-breadcrumb.scss +126 -0
- package/components/matcha-button-toggle.scss +363 -0
- package/components/matcha-buttons.scss +784 -0
- package/components/matcha-calendar.scss +154 -0
- package/components/matcha-cards.scss +205 -0
- package/components/matcha-chart-card.scss +60 -0
- package/components/matcha-checkbox.scss +554 -0
- package/components/matcha-chip.scss +212 -0
- package/components/matcha-color-pick.scss +35 -0
- package/components/matcha-command-palette.scss +89 -0
- package/components/matcha-crop.scss +172 -0
- package/components/matcha-date.scss +81 -0
- package/components/matcha-divider.scss +45 -0
- package/components/matcha-draggable.scss +24 -0
- package/components/matcha-drawer.scss +235 -0
- package/components/matcha-drop-list.scss +390 -0
- package/components/matcha-emoji.scss +69 -0
- package/components/matcha-empty-state.scss +118 -0
- package/components/matcha-flag.scss +62 -0
- package/components/matcha-footer.scss +187 -0
- package/components/matcha-form-field.scss +552 -0
- package/components/matcha-form-section.scss +101 -0
- package/components/matcha-header.scss +325 -0
- package/components/matcha-highlight.scss +296 -0
- package/components/matcha-hint-text.scss +66 -0
- package/components/matcha-horizontal-tree.scss +317 -0
- package/components/matcha-icon.scss +106 -0
- package/components/matcha-image.scss +62 -0
- package/components/matcha-list.scss +212 -0
- package/components/matcha-menu.scss +86 -0
- package/components/matcha-modal.scss +234 -0
- package/components/matcha-nav.scss +450 -0
- package/components/matcha-notification.scss +197 -0
- package/components/matcha-option.scss +95 -0
- package/components/matcha-page-builder.scss +4186 -0
- package/components/matcha-paginator.scss +235 -0
- package/components/matcha-panel.scss +167 -0
- package/components/matcha-profile-card.scss +50 -0
- package/components/matcha-progress-bar.scss +209 -0
- package/components/matcha-radio.scss +528 -0
- package/components/matcha-ripple.scss +7 -0
- package/components/matcha-scrollbar.scss +35 -0
- package/components/matcha-scrollbox-shadow.scss +123 -0
- package/components/matcha-section.scss +105 -0
- package/components/matcha-select.scss +661 -0
- package/components/matcha-skeleton.scss +138 -0
- package/components/matcha-slide-toggle.scss +590 -0
- package/components/matcha-slider.scss +188 -0
- package/components/matcha-snack-bar.scss +266 -0
- package/components/matcha-spin.scss +252 -0
- package/components/matcha-spinner.scss +78 -0
- package/components/matcha-stepper.scss +177 -0
- package/components/matcha-table-cell.scss +41 -0
- package/components/matcha-table.scss +785 -0
- package/components/matcha-tabs.scss +469 -0
- package/components/matcha-text-editor.scss +151 -0
- package/components/matcha-time.scss +33 -0
- package/components/matcha-timepicker.scss +13 -0
- package/components/matcha-toolbar.scss +206 -0
- package/components/matcha-tooltip.scss +128 -0
- package/components/matcha-uploader.scss +215 -0
- package/css/matcha-style.css +76772 -0
- package/fonts/CircularStd-Black.eot +0 -0
- package/fonts/CircularStd-Black.svg +3426 -0
- 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 +13532 -0
- 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 +13511 -0
- 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 +2378 -0
- package/fonts/CircularStd-Regular.ttf +0 -0
- package/fonts/CircularStd-Regular.woff +0 -0
- package/fonts/CircularStd-Regular.woff2 +0 -0
- package/main.scss +262 -0
- package/package.json +11 -0
- package/tokens/_animations-tokens.scss +37 -0
- package/tokens/_breakpoints-tokens.scss +26 -0
- package/tokens/_color-tokens.scss +1153 -0
- package/tokens/_css-custom-properties.scss +568 -0
- package/tokens/_elevation-tokens.scss +33 -0
- package/tokens/_spacing-tokens.scss +94 -0
- package/tokens/_typography-tokens.scss +65 -0
- package/vendors/angular-editor.scss +56 -0
- package/vendors/angular-material-fixes.scss +297 -0
- package/vendors/calendar.scss +2880 -0
- package/vendors/charts.scss +92 -0
- package/vendors/ng5-slider.scss +56 -0
- package/vendors/ngx-material-timepicker.scss +50 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-chip.scss — Theme mixin + structural styles
|
|
5
|
+
// =============================================================================
|
|
6
|
+
|
|
7
|
+
// ── Structural (outside mixin — no theme dependency) ─────────────────────────
|
|
8
|
+
|
|
9
|
+
matcha-chip {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
padding: var(--matcha-space-100, 8px) var(--matcha-space-150, 12px);
|
|
13
|
+
// Figma matcha/chip: 36 height (8+20+8), label 14/500/20
|
|
14
|
+
font-size: var(--matcha-text-md, 14px);
|
|
15
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
16
|
+
line-height: var(--matcha-leading-body-md, 20px);
|
|
17
|
+
cursor: default;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
user-select: none;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
border: var(--matcha-border-thin, 2px) solid transparent;
|
|
22
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
23
|
+
position: relative;
|
|
24
|
+
transition: border-color 200ms ease, box-shadow 200ms ease;
|
|
25
|
+
|
|
26
|
+
// State layer
|
|
27
|
+
&::before {
|
|
28
|
+
content: '';
|
|
29
|
+
position: absolute;
|
|
30
|
+
inset: 0;
|
|
31
|
+
background: currentColor;
|
|
32
|
+
opacity: 0;
|
|
33
|
+
border-radius: inherit;
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Figma: shadow-1 + subtle darken on hover — darken is achieved via state layer opacity (not filter)
|
|
39
|
+
&:hover:not([disabled]):not(.matcha-chip-disabled) {
|
|
40
|
+
box-shadow: var(--matcha-shadow-1, 0 1px 3px rgba(0,0,0,0.12));
|
|
41
|
+
}
|
|
42
|
+
&:hover:not([disabled]):not(.matcha-chip-disabled)::before { opacity: var(--matcha-state-hover, 0.12); }
|
|
43
|
+
&:active:not([disabled]):not(.matcha-chip-disabled)::before { opacity: var(--matcha-state-active, 0.16); }
|
|
44
|
+
|
|
45
|
+
&[disabled],
|
|
46
|
+
&.matcha-chip-disabled {
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
cursor: default;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:not([disabled]):not(.matcha-chip-disabled) {
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (prefers-reduced-motion: reduce) {
|
|
56
|
+
transition: none;
|
|
57
|
+
&::before { transition: none; }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.matcha-chip-content {
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
text-overflow: ellipsis;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.matcha-chip-remove {
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
width: var(--matcha-icon-size-sm, 16px);
|
|
73
|
+
height: var(--matcha-icon-size-sm, 16px);
|
|
74
|
+
margin-left: var(--matcha-space-100, 8px);
|
|
75
|
+
margin-right: -4px;
|
|
76
|
+
padding: 0;
|
|
77
|
+
border: none;
|
|
78
|
+
background: transparent;
|
|
79
|
+
border-radius: 50%;
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
outline: none;
|
|
82
|
+
transition: opacity 0.2s;
|
|
83
|
+
|
|
84
|
+
// State-layer 12% on hover (Figma spec)
|
|
85
|
+
position: relative;
|
|
86
|
+
&::before {
|
|
87
|
+
content: '';
|
|
88
|
+
position: absolute;
|
|
89
|
+
inset: 0;
|
|
90
|
+
background: currentColor;
|
|
91
|
+
opacity: 0;
|
|
92
|
+
border-radius: inherit;
|
|
93
|
+
pointer-events: none;
|
|
94
|
+
transition: opacity 80ms linear;
|
|
95
|
+
}
|
|
96
|
+
&:hover:not([disabled])::before { opacity: 0.12; }
|
|
97
|
+
&:focus-visible:not([disabled])::before { opacity: 0.12; }
|
|
98
|
+
|
|
99
|
+
&[disabled] {
|
|
100
|
+
cursor: default;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@media (prefers-reduced-motion: reduce) {
|
|
104
|
+
transition: none;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.matcha-chip-remove-icon {
|
|
109
|
+
font-size: var(--matcha-text-title-md, 18px);
|
|
110
|
+
line-height: 1; // 18/18 ratio — matches font-size
|
|
111
|
+
color: inherit;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.matcha-chip-list-wrapper {
|
|
115
|
+
display: flex;
|
|
116
|
+
flex-wrap: wrap;
|
|
117
|
+
gap: var(--matcha-space-100, 8px);
|
|
118
|
+
align-items: center;
|
|
119
|
+
|
|
120
|
+
&.matcha-chip-list-vertical {
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
align-items: flex-start;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// ── Theme mixin ──────────────────────────────────────────────────────────────
|
|
127
|
+
|
|
128
|
+
@mixin matcha-chip-theme($theme) {
|
|
129
|
+
// Mapa de cores sem\u00e2nticas \u2014 mesmo pattern do matcha-button
|
|
130
|
+
$chip-colors: (
|
|
131
|
+
primary: (getPrimary, getPrimaryContrast),
|
|
132
|
+
accent: (getAccent, getAccentContrast),
|
|
133
|
+
success: (getSuccess, getSuccessContrast),
|
|
134
|
+
warn: (getWarn, getWarnContrast),
|
|
135
|
+
danger: (getDanger, getDangerContrast),
|
|
136
|
+
info: (getInfo, getInfoContrast),
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
matcha-chip {
|
|
140
|
+
border-color: var(--matcha-color-hint, #{getGrey($theme)});
|
|
141
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
142
|
+
|
|
143
|
+
// Per-color rules (outline default: border + text = cor, fundo transparente)
|
|
144
|
+
@each $name, $fns in $chip-colors {
|
|
145
|
+
$fn: nth($fns, 1);
|
|
146
|
+
$fnContrast: nth($fns, 2);
|
|
147
|
+
|
|
148
|
+
&[color="#{$name}"] {
|
|
149
|
+
border-color: call(get-function(#{$fn}), $theme);
|
|
150
|
+
color: call(get-function(#{$fn}), $theme);
|
|
151
|
+
|
|
152
|
+
// Selected na cor: filled com contraste
|
|
153
|
+
&.matcha-chip-selected,
|
|
154
|
+
&[selected] {
|
|
155
|
+
background-color: call(get-function(#{$fn}), $theme);
|
|
156
|
+
color: call(get-function(#{$fnContrast}), $theme);
|
|
157
|
+
|
|
158
|
+
.matcha-chip-remove-icon {
|
|
159
|
+
color: call(get-function(#{$fnContrast}), $theme);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Selected state (fallback — quando n\u00e3o tem color, usa accent)
|
|
166
|
+
&.matcha-chip-selected,
|
|
167
|
+
&[selected] {
|
|
168
|
+
&:not([color]) {
|
|
169
|
+
background-color: var(--matcha-color-accent, #{getAccent($theme)});
|
|
170
|
+
border-color: var(--matcha-color-accent, #{getAccent($theme)});
|
|
171
|
+
color: var(--matcha-color-accent-contrast, #{getAccentContrast($theme)});
|
|
172
|
+
|
|
173
|
+
.matcha-chip-remove-icon {
|
|
174
|
+
color: var(--matcha-color-accent-contrast, #{getAccentContrast($theme)});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Disabled
|
|
180
|
+
&[disabled],
|
|
181
|
+
&.matcha-chip-disabled {
|
|
182
|
+
border-color: var(--matcha-color-disabled-bg, #{getDisabled($theme)});
|
|
183
|
+
color: var(--matcha-color-disabled-fg, #{getDisabledContrast($theme)});
|
|
184
|
+
|
|
185
|
+
.matcha-chip-remove-icon {
|
|
186
|
+
color: var(--matcha-color-disabled-fg, #{getDisabledContrast($theme)});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Focus ring
|
|
191
|
+
&:focus-within {
|
|
192
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid
|
|
193
|
+
var(--matcha-color-primary, #{getPrimary($theme)});
|
|
194
|
+
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.matcha-chip-remove {
|
|
199
|
+
color: var(--matcha-color-hint, #{getGrey($theme)});
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Chip list disabled
|
|
203
|
+
.matcha-chip-list-disabled,
|
|
204
|
+
[matcha-chip-list][disabled] {
|
|
205
|
+
pointer-events: none;
|
|
206
|
+
|
|
207
|
+
matcha-chip {
|
|
208
|
+
border-color: var(--matcha-color-disabled-bg, #{getDisabled($theme)});
|
|
209
|
+
color: var(--matcha-color-disabled-fg, #{getDisabledContrast($theme)});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-color-pick.scss — Color picker with radio selection
|
|
5
|
+
// Aligned with Figma matcha/color-pick
|
|
6
|
+
// Angular: matcha-color-pick
|
|
7
|
+
// =============================================================================
|
|
8
|
+
|
|
9
|
+
@mixin matcha-color-pick-theme($theme) {
|
|
10
|
+
$is-dark: map.get($theme, is-dark);
|
|
11
|
+
|
|
12
|
+
.matcha-color-pick {
|
|
13
|
+
.is-selected {
|
|
14
|
+
box-shadow: inset 0 0 0 var(--matcha-border-thin, 2px) var(--matcha-color-surface, #{getSurface($theme)});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
20
|
+
|
|
21
|
+
.matcha-color-pick {
|
|
22
|
+
.mat-radio-group {
|
|
23
|
+
.mat-radio-button {
|
|
24
|
+
.mat-radio-label {
|
|
25
|
+
.mat-radio-label-content {
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.is-selected {
|
|
33
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-command-palette.scss — Command Palette (⌘K)
|
|
5
|
+
// Aligned with Figma matcha/command-palette:
|
|
6
|
+
// Container with 3 slots: search, results, footer-tips
|
|
7
|
+
// Overlay global, radius 16px
|
|
8
|
+
// Angular: matcha-command-palette
|
|
9
|
+
// =============================================================================
|
|
10
|
+
|
|
11
|
+
@mixin matcha-command-palette-theme($theme) {
|
|
12
|
+
$is-dark: map.get($theme, is-dark);
|
|
13
|
+
|
|
14
|
+
.matcha-command-palette {
|
|
15
|
+
background: var(--matcha-color-surface, #{getSurface($theme)});
|
|
16
|
+
border: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border, #{getGrey($theme)});
|
|
17
|
+
box-shadow: var(--matcha-shadow-4, #{if($is-dark, $shadow-4-dark, $shadow-4-light)});
|
|
18
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.matcha-command-palette-search {
|
|
22
|
+
border-bottom: var(--matcha-border-hairline, 1px) solid var(--matcha-color-border, #{getGrey($theme)});
|
|
23
|
+
|
|
24
|
+
input {
|
|
25
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
26
|
+
|
|
27
|
+
&::placeholder {
|
|
28
|
+
color: var(--matcha-color-text-placeholder, #{getGrey($theme)});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.matcha-command-palette-footer {
|
|
34
|
+
background: var(--matcha-color-surface-hover, #{getBackgroundAlpha($theme)});
|
|
35
|
+
color: var(--matcha-color-text-hint, #{getBlueGrey($theme)});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
40
|
+
|
|
41
|
+
.matcha-command-palette {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
width: 520px;
|
|
45
|
+
max-height: 400px;
|
|
46
|
+
border-radius: var(--matcha-radius-xl, 16px);
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.matcha-command-palette-search {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: var(--matcha-space-150, 12px);
|
|
54
|
+
padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
55
|
+
min-height: 52px;
|
|
56
|
+
|
|
57
|
+
input {
|
|
58
|
+
flex: 1;
|
|
59
|
+
border: none;
|
|
60
|
+
background: transparent;
|
|
61
|
+
font-family: var(--matcha-font-family);
|
|
62
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
63
|
+
line-height: var(--matcha-leading-body-md, 20px);
|
|
64
|
+
outline: none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.matcha-command-palette-results {
|
|
69
|
+
flex: 1;
|
|
70
|
+
overflow-y: auto;
|
|
71
|
+
padding: var(--matcha-space-100, 8px);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.matcha-command-palette-footer {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
gap: var(--matcha-space-200, 16px);
|
|
78
|
+
padding: var(--matcha-space-100, 8px) var(--matcha-space-200, 16px);
|
|
79
|
+
font-size: var(--matcha-text-caption, 11px);
|
|
80
|
+
min-height: 38px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
84
|
+
|
|
85
|
+
@media (prefers-reduced-motion: reduce) {
|
|
86
|
+
.matcha-command-palette {
|
|
87
|
+
transition: none;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-crop.scss — Image cropper modal
|
|
5
|
+
// Aligned with Figma matcha/crop:
|
|
6
|
+
// Ratio(2: 16:9, 1:1) — Crop area with overlay mask
|
|
7
|
+
// Angular: matcha-crop (wraps cropper logic inside matcha-modal)
|
|
8
|
+
// =============================================================================
|
|
9
|
+
|
|
10
|
+
@mixin matcha-crop-theme($theme) {
|
|
11
|
+
$is-dark: map.get($theme, is-dark);
|
|
12
|
+
|
|
13
|
+
.matcha-crop {
|
|
14
|
+
.matcha-crop__header {
|
|
15
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.matcha-crop__overlay {
|
|
19
|
+
background: rgba(#212121, 0.6); // ok: structural
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.matcha-crop__area {
|
|
23
|
+
border: var(--matcha-border-thin, 2px) solid var(--matcha-color-accent, #{getAccent($theme)});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.matcha-crop__grid-line {
|
|
27
|
+
background: rgba(#ffffff, 0.3); // ok: structural
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.matcha-crop__canvas {
|
|
31
|
+
background: var(--matcha-color-surface-inverse, #{if($is-dark, getSurface($theme), #121212)});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.matcha-crop__handle {
|
|
35
|
+
background: var(--matcha-color-surface, #{getSurface($theme)});
|
|
36
|
+
border-color: var(--matcha-color-accent, #{getAccent($theme)});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
42
|
+
|
|
43
|
+
.matcha-crop {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.matcha-crop__header {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: var(--matcha-space-100, 8px);
|
|
54
|
+
padding: var(--matcha-space-200, 16px) var(--matcha-space-300, 24px);
|
|
55
|
+
font-family: var(--matcha-font-family);
|
|
56
|
+
font-size: var(--matcha-text-title-sm, 16px);
|
|
57
|
+
font-weight: var(--matcha-weight-semibold, 600);
|
|
58
|
+
line-height: var(--matcha-leading-title-sm, 22px);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.matcha-crop__canvas {
|
|
62
|
+
position: relative;
|
|
63
|
+
flex: 1;
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
min-height: 300px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.matcha-crop__image {
|
|
72
|
+
max-width: 100%;
|
|
73
|
+
max-height: 100%;
|
|
74
|
+
object-fit: contain;
|
|
75
|
+
user-select: none;
|
|
76
|
+
-webkit-user-drag: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.matcha-crop__overlay {
|
|
80
|
+
position: absolute;
|
|
81
|
+
inset: 0;
|
|
82
|
+
pointer-events: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.matcha-crop__area {
|
|
86
|
+
position: absolute;
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
cursor: move;
|
|
89
|
+
touch-action: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ── Aspect ratios ──
|
|
93
|
+
.matcha-crop__area--16x9 {
|
|
94
|
+
aspect-ratio: 16 / 9;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.matcha-crop__area--1x1 {
|
|
98
|
+
aspect-ratio: 1 / 1;
|
|
99
|
+
border-radius: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.matcha-crop__area--1x1-circle {
|
|
103
|
+
aspect-ratio: 1 / 1;
|
|
104
|
+
border-radius: 50%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// ── Rule of thirds grid ──
|
|
108
|
+
.matcha-crop__grid {
|
|
109
|
+
position: absolute;
|
|
110
|
+
inset: 0;
|
|
111
|
+
display: grid;
|
|
112
|
+
grid-template-columns: 1fr 1fr 1fr;
|
|
113
|
+
grid-template-rows: 1fr 1fr 1fr;
|
|
114
|
+
pointer-events: none;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.matcha-crop__grid-line {
|
|
118
|
+
&:nth-child(1) { grid-column: 2; grid-row: 1 / 4; width: var(--matcha-border-hairline, 1px); }
|
|
119
|
+
&:nth-child(2) { grid-column: 3; grid-row: 1 / 4; width: var(--matcha-border-hairline, 1px); }
|
|
120
|
+
&:nth-child(3) { grid-column: 1 / 4; grid-row: 2; height: var(--matcha-border-hairline, 1px); }
|
|
121
|
+
&:nth-child(4) { grid-column: 1 / 4; grid-row: 3; height: var(--matcha-border-hairline, 1px); }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// ── Resize handles ──
|
|
125
|
+
.matcha-crop__handle {
|
|
126
|
+
position: absolute;
|
|
127
|
+
width: var(--matcha-space-150, 12px);
|
|
128
|
+
height: var(--matcha-space-150, 12px);
|
|
129
|
+
border: var(--matcha-border-thin, 2px) solid transparent;
|
|
130
|
+
border-radius: 50%;
|
|
131
|
+
pointer-events: auto;
|
|
132
|
+
|
|
133
|
+
// Offset negativo = -6px = -(handle/2) pra centralizar no canto
|
|
134
|
+
&--nw { top: calc(-1 * var(--matcha-space-075, 6px)); left: calc(-1 * var(--matcha-space-075, 6px)); cursor: nw-resize; }
|
|
135
|
+
&--ne { top: calc(-1 * var(--matcha-space-075, 6px)); right: calc(-1 * var(--matcha-space-075, 6px)); cursor: ne-resize; }
|
|
136
|
+
&--sw { bottom: calc(-1 * var(--matcha-space-075, 6px)); left: calc(-1 * var(--matcha-space-075, 6px)); cursor: sw-resize; }
|
|
137
|
+
&--se { bottom: calc(-1 * var(--matcha-space-075, 6px)); right: calc(-1 * var(--matcha-space-075, 6px)); cursor: se-resize; }
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// ── Footer ──
|
|
141
|
+
.matcha-crop__footer {
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
justify-content: flex-end;
|
|
145
|
+
gap: var(--matcha-space-100, 8px);
|
|
146
|
+
padding: var(--matcha-space-200, 16px) var(--matcha-space-300, 24px);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// ── Responsive ──────────────────────────────────────────────────────────────
|
|
150
|
+
|
|
151
|
+
@include media-breakpoint('xs') {
|
|
152
|
+
.matcha-crop__header {
|
|
153
|
+
padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.matcha-crop__footer {
|
|
157
|
+
padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.matcha-crop__canvas {
|
|
161
|
+
min-height: 240px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
166
|
+
|
|
167
|
+
@media (prefers-reduced-motion: reduce) {
|
|
168
|
+
.matcha-crop__area,
|
|
169
|
+
.matcha-crop__image {
|
|
170
|
+
transition: none;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +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
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// matcha-divider.scss — Divider line (horizontal/vertical)
|
|
3
|
+
// Aligned with Figma matcha/divider: Direção(Horizontal/Vertical) = 2 variants
|
|
4
|
+
// =============================================================================
|
|
5
|
+
|
|
6
|
+
// ── Structural ──────────────────────────────────────────────────────────────
|
|
7
|
+
|
|
8
|
+
matcha-divider {
|
|
9
|
+
display: flex;
|
|
10
|
+
box-sizing: border-box;
|
|
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
|
+
}
|
|
24
|
+
|
|
25
|
+
&[direction="vertical"] {
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-self: stretch;
|
|
28
|
+
|
|
29
|
+
.matcha-divider-line {
|
|
30
|
+
width: 0;
|
|
31
|
+
height: 100%;
|
|
32
|
+
border-left: var(--matcha-border-hairline, 1px) solid;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// ── Theme mixin ─────────────────────────────────────────────────────────────
|
|
38
|
+
|
|
39
|
+
@mixin matcha-divider-theme($theme) {
|
|
40
|
+
matcha-divider {
|
|
41
|
+
.matcha-divider-line {
|
|
42
|
+
border-color: var(--matcha-color-border, #{getGrey($theme)});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-draggable.scss — Draggable item with selection state
|
|
5
|
+
// Angular: matcha-draggable
|
|
6
|
+
// =============================================================================
|
|
7
|
+
|
|
8
|
+
@mixin matcha-draggable-theme($theme) {
|
|
9
|
+
$is-dark: map.get($theme, is-dark);
|
|
10
|
+
|
|
11
|
+
.matcha-draggable {
|
|
12
|
+
.check-with-label:checked + .label-for-check {
|
|
13
|
+
box-shadow:
|
|
14
|
+
0 0 0 var(--matcha-border-thick, 8px) var(--matcha-color-surface, #{getSurface($theme)}),
|
|
15
|
+
0 0 0 10px var(--matcha-color-text-placeholder, #{getBlueGrey($theme)});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.is-selected {
|
|
19
|
+
box-shadow:
|
|
20
|
+
0 0 0 var(--matcha-border-thick, 8px) var(--matcha-color-surface, #{getSurface($theme)}),
|
|
21
|
+
0 0 0 10px var(--matcha-color-text-placeholder, #{getBlueGrey($theme)});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|