@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,188 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// matcha-slider.scss — Slider (single + range)
|
|
3
|
+
// Aligned with Figma matcha/slider: Type(Single/Range) × State(5) = 10 variants
|
|
4
|
+
// =============================================================================
|
|
5
|
+
|
|
6
|
+
@mixin matcha-slider-theme($theme) {
|
|
7
|
+
$color-functions: (
|
|
8
|
+
red: getRed, pink: getPink, purple: getPurple, deep-purple: getDeepPurple,
|
|
9
|
+
indigo: getIndigo, blue: getBlue, light-blue: getLightBlue, cyan: getCyan,
|
|
10
|
+
teal: getTeal, green: getGreen, light-green: getLightGreen, lime: getLime,
|
|
11
|
+
yellow: getYellow, amber: getAmber, orange: getOrange, deep-orange: getDeepOrange,
|
|
12
|
+
brown: getBrown, grey: getGrey, blue-grey: getBlueGrey,
|
|
13
|
+
primary: getPrimary, accent: getAccent, success: getSuccess,
|
|
14
|
+
warn: getWarn, danger: getDanger, info: getInfo, disabled: getDisabled,
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
.matcha-slider {
|
|
18
|
+
// Default accent
|
|
19
|
+
&[data-color="accent"] {
|
|
20
|
+
.selection-bar { background-color: var(--matcha-color-accent, #{getAccent($theme)}); }
|
|
21
|
+
|
|
22
|
+
.pointer {
|
|
23
|
+
background-color: var(--matcha-color-accent, #{getAccent($theme)});
|
|
24
|
+
|
|
25
|
+
&.focused { box-shadow: 0 0 0 4px var(--matcha-color-accent, #{getAccent($theme)}); }
|
|
26
|
+
&:hover { box-shadow: var(--matcha-shadow-1, #{$shadow-1-light}), 0 0 0 4px rgba(getAccent($theme), 0.24); } // ok: structural
|
|
27
|
+
&:active { box-shadow: var(--matcha-shadow-1, #{$shadow-1-light}), 0 0 0 4px rgba(getAccent($theme), 0.24); } // ok: structural
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.slider-track {
|
|
32
|
+
background-color: var(--matcha-color-disabled-bg, #{getDisabled($theme)});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Dynamic colors
|
|
36
|
+
@each $colorName, $colorFn in $color-functions {
|
|
37
|
+
&[data-color="#{'' + $colorName}"] {
|
|
38
|
+
.selection-bar { background-color: call(#{$colorFn}, $theme); }
|
|
39
|
+
|
|
40
|
+
.pointer {
|
|
41
|
+
background-color: call(#{$colorFn}, $theme);
|
|
42
|
+
&.focused { box-shadow: 0 0 0 4px call(#{$colorFn}, $theme); }
|
|
43
|
+
&:hover { box-shadow: var(--matcha-shadow-1, #{$shadow-1-light}), 0 0 0 4px rgba(call(#{$colorFn}, $theme), 0.24); } // ok: structural
|
|
44
|
+
&:active { box-shadow: var(--matcha-shadow-1, #{$shadow-1-light}), 0 0 0 4px rgba(call(#{$colorFn}, $theme), 0.24); } // ok: structural
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Disabled
|
|
50
|
+
&.disabled {
|
|
51
|
+
.selection-bar { background-color: var(--matcha-color-disabled-bg, #{getDisabled($theme)}); }
|
|
52
|
+
.pointer { background-color: var(--matcha-color-disabled-bg, #{getDisabled($theme)}); }
|
|
53
|
+
|
|
54
|
+
.tick-value,
|
|
55
|
+
.pointer-label,
|
|
56
|
+
.floor-label,
|
|
57
|
+
.ceil-label {
|
|
58
|
+
color: var(--matcha-color-disabled-fg, #{getDisabledContrast($theme)});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// ── Structural ──────────────────────────────────────────────────────────────
|
|
65
|
+
|
|
66
|
+
.matcha-slider {
|
|
67
|
+
position: relative;
|
|
68
|
+
width: 100%;
|
|
69
|
+
padding: var(--matcha-space-250, 20px) 0;
|
|
70
|
+
user-select: none;
|
|
71
|
+
background-color: transparent;
|
|
72
|
+
|
|
73
|
+
.slider-track {
|
|
74
|
+
position: relative;
|
|
75
|
+
height: var(--matcha-slider-track-height, 4px);
|
|
76
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
margin: 0 10px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.selection-bar {
|
|
82
|
+
position: absolute;
|
|
83
|
+
height: 100%;
|
|
84
|
+
border-radius: var(--matcha-radius-sm, 2px);
|
|
85
|
+
transition: width 200ms ease;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Figma matcha/slider thumb: 24×24 ellipse
|
|
89
|
+
.pointer {
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: 50%;
|
|
92
|
+
transform: translate(-50%, -50%);
|
|
93
|
+
width: var(--matcha-slider-pointer-size, 24px);
|
|
94
|
+
height: var(--matcha-slider-pointer-size, 24px);
|
|
95
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
96
|
+
cursor: grab;
|
|
97
|
+
border: 2px solid var(--matcha-color-surface, white);
|
|
98
|
+
box-shadow: var(--matcha-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.1));
|
|
99
|
+
transition: box-shadow var(--matcha-duration-instant, 80ms) linear,
|
|
100
|
+
transform var(--matcha-duration-instant, 80ms) ease;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Figma value bubble: pad 2/6, radius 4, text 11/400/14 (caption)
|
|
104
|
+
.pointer-label {
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: -24px;
|
|
107
|
+
left: 50%;
|
|
108
|
+
transform: translateX(-50%);
|
|
109
|
+
padding: var(--matcha-space-025, 2px) var(--matcha-space-075, 6px);
|
|
110
|
+
border-radius: var(--matcha-radius-md, 4px);
|
|
111
|
+
font-size: var(--matcha-text-caption, 11px);
|
|
112
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
113
|
+
line-height: var(--matcha-leading-caption, 14px);
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Figma ticks + floor/ceil labels: 11/400/14
|
|
118
|
+
.tick .tick-value {
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: 15px;
|
|
121
|
+
left: 50%;
|
|
122
|
+
transform: translateX(-50%);
|
|
123
|
+
font-size: var(--matcha-text-caption, 11px);
|
|
124
|
+
line-height: var(--matcha-leading-caption, 14px);
|
|
125
|
+
white-space: nowrap;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.limit-labels {
|
|
129
|
+
display: flex;
|
|
130
|
+
justify-content: space-between;
|
|
131
|
+
margin: var(--matcha-space-100, 8px) 10px 0;
|
|
132
|
+
top: -18px;
|
|
133
|
+
position: relative;
|
|
134
|
+
font-size: var(--matcha-text-caption, 11px);
|
|
135
|
+
line-height: var(--matcha-leading-caption, 14px);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// ── Disabled ──
|
|
139
|
+
&.disabled {
|
|
140
|
+
opacity: var(--matcha-opacity-disabled, 0.38);
|
|
141
|
+
pointer-events: none;
|
|
142
|
+
cursor: default;
|
|
143
|
+
|
|
144
|
+
.slider-track { cursor: default; }
|
|
145
|
+
.pointer { cursor: default; }
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// ── Range ──
|
|
149
|
+
&.range {
|
|
150
|
+
.pointer {
|
|
151
|
+
&.low-pointer { z-index: 2; }
|
|
152
|
+
&.high-pointer { z-index: 1; }
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// ── Dragging ──
|
|
157
|
+
&.dragging {
|
|
158
|
+
.pointer {
|
|
159
|
+
cursor: grabbing !important;
|
|
160
|
+
transform: translate(-50%, -50%) scale(1.1);
|
|
161
|
+
box-shadow: var(--matcha-shadow-2, 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.selection-bar {
|
|
165
|
+
transition: none;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// ── Focus ring ──
|
|
170
|
+
.pointer:focus-visible {
|
|
171
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent, #6200ee);
|
|
172
|
+
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// ── High contrast ──
|
|
176
|
+
@media (prefers-contrast: high) {
|
|
177
|
+
.pointer { border-width: 3px; }
|
|
178
|
+
.selection-bar { border: var(--matcha-border-hairline, 1px) solid currentColor; }
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// ── Reduced motion ──
|
|
182
|
+
@media (prefers-reduced-motion: reduce) {
|
|
183
|
+
.pointer,
|
|
184
|
+
.selection-bar {
|
|
185
|
+
transition: none;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-snack-bar.scss — Snack Bar / Toast (floating feedback)
|
|
5
|
+
// Aligned with Figma matcha/snack-bar:
|
|
6
|
+
// Status(5: Erro, Alerta, Sucesso, Ideia, Neutro)
|
|
7
|
+
// Structure: Icon + Body(Title + Description) + CTA Button + Close
|
|
8
|
+
// Bg: surface/card solid + border-left status color + shadow level-3
|
|
9
|
+
//
|
|
10
|
+
// Diferença do Notification:
|
|
11
|
+
// Notification = in-page (bg alpha 10%, sem shadow)
|
|
12
|
+
// Snackbar = floating (bg sólido, shadow, position fixed)
|
|
13
|
+
// =============================================================================
|
|
14
|
+
|
|
15
|
+
// ── Structural ──────────────────────────────────────────────────────────────
|
|
16
|
+
|
|
17
|
+
matcha-snack-bar {
|
|
18
|
+
position: fixed;
|
|
19
|
+
z-index: var(--matcha-z-snackbar, 9999);
|
|
20
|
+
right: var(--matcha-space-300, 24px);
|
|
21
|
+
top: var(--matcha-space-300, 24px);
|
|
22
|
+
transform: translateX(calc(100% + 40px));
|
|
23
|
+
opacity: 0;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
transition:
|
|
26
|
+
opacity var(--matcha-duration-moderate, 300ms) ease,
|
|
27
|
+
transform var(--matcha-duration-moderate, 300ms) ease;
|
|
28
|
+
min-width: var(--matcha-snackbar-min-width, 360px);
|
|
29
|
+
max-width: var(--matcha-snackbar-max-width, 520px);
|
|
30
|
+
|
|
31
|
+
// ── Position variants ──
|
|
32
|
+
&[position="bottom"] {
|
|
33
|
+
top: auto;
|
|
34
|
+
bottom: var(--matcha-space-300, 24px);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&[position="center"] {
|
|
38
|
+
right: auto;
|
|
39
|
+
left: 50%;
|
|
40
|
+
transform: translateX(-50%) translateY(-20px);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ── Visible state ──
|
|
44
|
+
&.matcha-snack-bar-visible {
|
|
45
|
+
opacity: 1;
|
|
46
|
+
pointer-events: auto;
|
|
47
|
+
transform: translateX(0);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&[position="center"].matcha-snack-bar-visible {
|
|
51
|
+
transform: translateX(-50%) translateY(0);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// ── Content container ───────────────────────────────────────────────────────
|
|
56
|
+
|
|
57
|
+
.matcha-snack-bar-content {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: var(--matcha-space-150, 12px);
|
|
61
|
+
padding: var(--matcha-space-150, 12px) var(--matcha-space-200, 16px);
|
|
62
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
63
|
+
border: var(--matcha-border-hairline, 1px) solid transparent;
|
|
64
|
+
border-left: var(--matcha-border-medium, 4px) solid transparent;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ── Icon ────────────────────────────────────────────────────────────────────
|
|
68
|
+
|
|
69
|
+
.matcha-snack-bar-icon {
|
|
70
|
+
flex-shrink: 0;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
width: var(--matcha-icon-size-md, 24px);
|
|
75
|
+
height: var(--matcha-icon-size-md, 24px);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// ── Body (Title + Description) ──────────────────────────────────────────────
|
|
79
|
+
|
|
80
|
+
.matcha-snack-bar-body {
|
|
81
|
+
flex: 1;
|
|
82
|
+
min-width: 0;
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
gap: var(--matcha-space-050, 4px);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.matcha-snack-bar-title {
|
|
89
|
+
font-family: var(--matcha-font-family);
|
|
90
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
91
|
+
font-weight: var(--matcha-weight-semibold, 600);
|
|
92
|
+
line-height: var(--matcha-leading-body-md, 20px);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.matcha-snack-bar-description {
|
|
96
|
+
font-family: var(--matcha-font-family);
|
|
97
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
98
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
99
|
+
line-height: var(--matcha-leading-body-md, 20px);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// ── CTA Button ──────────────────────────────────────────────────────────────
|
|
103
|
+
|
|
104
|
+
.matcha-snack-bar-action {
|
|
105
|
+
flex-shrink: 0;
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
height: 32px;
|
|
110
|
+
padding: 0 var(--matcha-space-100, 8px);
|
|
111
|
+
border: var(--matcha-border-thin, 2px) solid currentColor;
|
|
112
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
113
|
+
background: transparent;
|
|
114
|
+
font-family: var(--matcha-font-family);
|
|
115
|
+
font-size: var(--matcha-text-button-sm, 13px);
|
|
116
|
+
font-weight: var(--matcha-weight-medium, 500);
|
|
117
|
+
letter-spacing: 0.2px;
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
color: inherit;
|
|
120
|
+
position: relative;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
|
|
123
|
+
// State layer
|
|
124
|
+
&::before {
|
|
125
|
+
content: '';
|
|
126
|
+
position: absolute;
|
|
127
|
+
inset: 0;
|
|
128
|
+
background: currentColor;
|
|
129
|
+
opacity: 0;
|
|
130
|
+
border-radius: inherit;
|
|
131
|
+
pointer-events: none;
|
|
132
|
+
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
133
|
+
}
|
|
134
|
+
&:hover:not([disabled])::before { opacity: var(--matcha-state-hover, 0.08); }
|
|
135
|
+
&:active:not([disabled])::before { opacity: var(--matcha-state-active, 0.12); }
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// ── Close button ────────────────────────────────────────────────────────────
|
|
139
|
+
|
|
140
|
+
.matcha-snack-bar-close {
|
|
141
|
+
flex-shrink: 0;
|
|
142
|
+
display: flex;
|
|
143
|
+
align-items: center;
|
|
144
|
+
justify-content: center;
|
|
145
|
+
width: 32px;
|
|
146
|
+
height: 32px;
|
|
147
|
+
background: none;
|
|
148
|
+
border: none;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
padding: 0;
|
|
151
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
152
|
+
color: inherit;
|
|
153
|
+
opacity: 0.7;
|
|
154
|
+
position: relative;
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
157
|
+
|
|
158
|
+
// State layer
|
|
159
|
+
&::before {
|
|
160
|
+
content: '';
|
|
161
|
+
position: absolute;
|
|
162
|
+
inset: 0;
|
|
163
|
+
background: currentColor;
|
|
164
|
+
opacity: 0;
|
|
165
|
+
border-radius: inherit;
|
|
166
|
+
pointer-events: none;
|
|
167
|
+
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
168
|
+
}
|
|
169
|
+
&:hover:not([disabled])::before { opacity: var(--matcha-state-hover, 0.08); }
|
|
170
|
+
&:active:not([disabled])::before { opacity: var(--matcha-state-active, 0.12); }
|
|
171
|
+
&:hover { opacity: 1; }
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// ── Responsive ──────────────────────────────────────────────────────────────
|
|
175
|
+
|
|
176
|
+
@include media-breakpoint('xs') {
|
|
177
|
+
matcha-snack-bar {
|
|
178
|
+
left: var(--matcha-space-200, 16px);
|
|
179
|
+
right: var(--matcha-space-200, 16px);
|
|
180
|
+
min-width: auto;
|
|
181
|
+
max-width: none;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
186
|
+
|
|
187
|
+
@media (prefers-reduced-motion: reduce) {
|
|
188
|
+
matcha-snack-bar,
|
|
189
|
+
.matcha-snack-bar-close::before,
|
|
190
|
+
.matcha-snack-bar-action::before {
|
|
191
|
+
transition: none;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// =============================================================================
|
|
196
|
+
// Theme mixin
|
|
197
|
+
// =============================================================================
|
|
198
|
+
|
|
199
|
+
@mixin matcha-snack-bar-theme($theme) {
|
|
200
|
+
$is-dark: map.get($theme, is-dark);
|
|
201
|
+
|
|
202
|
+
matcha-snack-bar {
|
|
203
|
+
|
|
204
|
+
// ── Focus rings ──
|
|
205
|
+
.matcha-snack-bar-close:focus-visible,
|
|
206
|
+
.matcha-snack-bar-action:focus-visible {
|
|
207
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent, #{getAccent($theme)});
|
|
208
|
+
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// ── Base (no status) ──
|
|
212
|
+
.matcha-snack-bar-content {
|
|
213
|
+
background: var(--matcha-color-surface, #{getSurface($theme)});
|
|
214
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
215
|
+
border-color: var(--matcha-color-border, #{getGrey($theme)});
|
|
216
|
+
box-shadow: var(--matcha-shadow-3, #{if($is-dark, $shadow-3-dark, $shadow-3-light)});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.matcha-snack-bar-title {
|
|
220
|
+
color: var(--matcha-color-fg, #{getForeground($theme)});
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.matcha-snack-bar-description {
|
|
224
|
+
color: var(--matcha-color-text-label, #{getBlueGrey($theme)});
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// ── Status variants: border-left + icon/action color ──
|
|
228
|
+
|
|
229
|
+
&[color="error"] .matcha-snack-bar-content,
|
|
230
|
+
&[color="danger"] .matcha-snack-bar-content {
|
|
231
|
+
border-left-color: var(--matcha-color-danger, #{getDanger($theme)});
|
|
232
|
+
|
|
233
|
+
.matcha-snack-bar-icon,
|
|
234
|
+
.matcha-snack-bar-action { color: var(--matcha-color-danger, #{getDanger($theme)}); }
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
&[color="warning"] .matcha-snack-bar-content,
|
|
238
|
+
&[color="warn"] .matcha-snack-bar-content {
|
|
239
|
+
border-left-color: var(--matcha-color-warn, #{getWarn($theme)});
|
|
240
|
+
|
|
241
|
+
.matcha-snack-bar-icon,
|
|
242
|
+
.matcha-snack-bar-action { color: var(--matcha-color-warn, #{getWarn($theme)}); }
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&[color="success"] .matcha-snack-bar-content {
|
|
246
|
+
border-left-color: var(--matcha-color-success, #{getSuccess($theme)});
|
|
247
|
+
|
|
248
|
+
.matcha-snack-bar-icon,
|
|
249
|
+
.matcha-snack-bar-action { color: var(--matcha-color-success, #{getSuccess($theme)}); }
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
&[color="info"] .matcha-snack-bar-content {
|
|
253
|
+
border-left-color: var(--matcha-color-info, #{getInfo($theme)});
|
|
254
|
+
|
|
255
|
+
.matcha-snack-bar-icon,
|
|
256
|
+
.matcha-snack-bar-action { color: var(--matcha-color-info, #{getInfo($theme)}); }
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&[color="neutral"] .matcha-snack-bar-content {
|
|
260
|
+
border-left-color: var(--matcha-color-border, #{getGrey($theme)});
|
|
261
|
+
|
|
262
|
+
.matcha-snack-bar-icon { color: var(--matcha-color-text-hint, #{getBlueGrey($theme)}); }
|
|
263
|
+
.matcha-snack-bar-action { color: var(--matcha-color-text-label, #{getBlueGrey($theme)}); }
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// matcha-spin.scss — Circular progress/spinner (determinate + indeterminate)
|
|
5
|
+
// Angular: matcha-spin
|
|
6
|
+
// =============================================================================
|
|
7
|
+
|
|
8
|
+
@mixin generate-matcha-spin-size-classes($helper-breakpoints) {
|
|
9
|
+
@each $breakpoint, $materialBreakpoint in $helper-breakpoints {
|
|
10
|
+
@include media-breakpoint($materialBreakpoint) {
|
|
11
|
+
$infix: if($materialBreakpoint ==null, "", "-#{$breakpoint}");
|
|
12
|
+
|
|
13
|
+
&[size#{$infix}="tiny"] {
|
|
14
|
+
width: px-to-rem(24px);
|
|
15
|
+
height: px-to-rem(24px);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&[size#{$infix}="small"] {
|
|
19
|
+
width: px-to-rem(32px);
|
|
20
|
+
height: px-to-rem(32px);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&[size#{$infix}="medium"] {
|
|
24
|
+
width: px-to-rem(40px);
|
|
25
|
+
height: px-to-rem(40px);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&[size#{$infix}="large"] {
|
|
29
|
+
width: px-to-rem(48px);
|
|
30
|
+
height: px-to-rem(48px);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&[size#{$infix}="huge"] {
|
|
34
|
+
width: px-to-rem(56px);
|
|
35
|
+
height: px-to-rem(56px);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@mixin matcha-spin($theme) {
|
|
42
|
+
$is-dark: map.get($theme, is-dark);
|
|
43
|
+
|
|
44
|
+
matcha-spin:not([color]) .spin-progress {
|
|
45
|
+
stroke: var(--matcha-color-accent, #{getAccent($theme)});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
matcha-spin {
|
|
49
|
+
|
|
50
|
+
// Red
|
|
51
|
+
&[color="red"] .spin-progress {
|
|
52
|
+
stroke: getRed($theme);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Pink
|
|
56
|
+
&[color="pink"] .spin-progress {
|
|
57
|
+
stroke: getPink($theme);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Purple
|
|
61
|
+
&[color="purple"] .spin-progress {
|
|
62
|
+
stroke: getPurple($theme);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Deep Purple
|
|
66
|
+
&[color="deep-purple"] .spin-progress {
|
|
67
|
+
stroke: getDeepPurple($theme);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Indigo
|
|
71
|
+
&[color="indigo"] .spin-progress {
|
|
72
|
+
stroke: getIndigo($theme);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Blue
|
|
76
|
+
&[color="blue"] .spin-progress {
|
|
77
|
+
stroke: getBlue($theme);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Light Blue
|
|
81
|
+
&[color="light-blue"] .spin-progress {
|
|
82
|
+
stroke: getLightBlue($theme);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Cyan
|
|
86
|
+
&[color="cyan"] .spin-progress {
|
|
87
|
+
stroke: getCyan($theme);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Teal
|
|
91
|
+
&[color="teal"] .spin-progress {
|
|
92
|
+
stroke: getTeal($theme);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Green
|
|
96
|
+
&[color="green"] .spin-progress {
|
|
97
|
+
stroke: getGreen($theme);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Light Green
|
|
101
|
+
&[color="light-green"] .spin-progress {
|
|
102
|
+
stroke: getLightGreen($theme);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Lime
|
|
106
|
+
&[color="lime"] .spin-progress {
|
|
107
|
+
stroke: getLime($theme);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Yellow
|
|
111
|
+
&[color="yellow"] .spin-progress {
|
|
112
|
+
stroke: getYellow($theme);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Amber
|
|
116
|
+
&[color="amber"] .spin-progress {
|
|
117
|
+
stroke: getAmber($theme);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Orange
|
|
121
|
+
&[color="orange"] .spin-progress {
|
|
122
|
+
stroke: getOrange($theme);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Deep Orange
|
|
126
|
+
&[color="deep-orange"] .spin-progress {
|
|
127
|
+
stroke: getDeepOrange($theme);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Brown
|
|
131
|
+
&[color="brown"] .spin-progress {
|
|
132
|
+
stroke: getBrown($theme);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Grey
|
|
136
|
+
&[color="grey"] .spin-progress {
|
|
137
|
+
stroke: getGrey($theme);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Blue Grey
|
|
141
|
+
&[color="blue-grey"] .spin-progress {
|
|
142
|
+
stroke: getBlueGrey($theme);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Accent
|
|
146
|
+
&[color="accent"] .spin-progress {
|
|
147
|
+
stroke: var(--matcha-color-accent, #{getAccent($theme)});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Primary
|
|
151
|
+
&[color="primary"] .spin-progress {
|
|
152
|
+
stroke: var(--matcha-color-primary, #{getPrimary($theme)});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Success
|
|
156
|
+
&[color="success"] .spin-progress {
|
|
157
|
+
stroke: var(--matcha-color-success, #{getSuccess($theme)});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Warn
|
|
161
|
+
&[color="warn"] .spin-progress {
|
|
162
|
+
stroke: var(--matcha-color-warn, #{getWarn($theme)});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Danger
|
|
166
|
+
&[color="danger"] .spin-progress {
|
|
167
|
+
stroke: var(--matcha-color-danger, #{getDanger($theme)});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Info
|
|
171
|
+
&[color="info"] .spin-progress {
|
|
172
|
+
stroke: var(--matcha-color-info, #{getInfo($theme)});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.spin-placeholder {
|
|
176
|
+
stroke: var(--matcha-color-disabled, #{getDisabled($theme)});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&:not([size]) {
|
|
180
|
+
width: px-to-rem(40px);
|
|
181
|
+
height: px-to-rem(40px);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@include generate-matcha-spin-size-classes($helper-breakpoints);
|
|
185
|
+
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
190
|
+
|
|
191
|
+
matcha-spin:not([progress]) .spin-progress {
|
|
192
|
+
animation:
|
|
193
|
+
matcha-spin-rotate 1.5s linear infinite,
|
|
194
|
+
matcha-spin-dash 1.5s ease-in-out infinite;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.matcha-spin {
|
|
198
|
+
display: inline-block;
|
|
199
|
+
position: relative;
|
|
200
|
+
|
|
201
|
+
svg {
|
|
202
|
+
transform: rotate(-90deg);
|
|
203
|
+
width: 100%;
|
|
204
|
+
height: 100%;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.spin-placeholder {
|
|
208
|
+
fill: none;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.spin-progress {
|
|
212
|
+
fill: none;
|
|
213
|
+
stroke-linecap: round;
|
|
214
|
+
transform-origin: center;
|
|
215
|
+
transition: stroke-dashoffset var(--matcha-duration-moderate, 300ms) linear;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@keyframes matcha-spin-rotate {
|
|
219
|
+
100% {
|
|
220
|
+
transform: rotate(360deg);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@keyframes matcha-spin-dash {
|
|
225
|
+
0% {
|
|
226
|
+
stroke-dasharray: 1, 200;
|
|
227
|
+
stroke-dashoffset: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
50% {
|
|
231
|
+
stroke-dasharray: 100, 200;
|
|
232
|
+
stroke-dashoffset: -15;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
100% {
|
|
236
|
+
stroke-dasharray: 100, 200;
|
|
237
|
+
stroke-dashoffset: -200;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
243
|
+
|
|
244
|
+
@media (prefers-reduced-motion: reduce) {
|
|
245
|
+
matcha-spin:not([progress]) .spin-progress {
|
|
246
|
+
animation: none;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.matcha-spin .spin-progress {
|
|
250
|
+
transition: none;
|
|
251
|
+
}
|
|
252
|
+
}
|