@inchurch/matcha-theme 21.4.0 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstracts/_colors.scss +236 -236
- package/abstracts/_elevation.scss +108 -108
- package/abstracts/_functions.scss +321 -321
- package/abstracts/_media-breakpoint.scss +26 -26
- package/abstracts/_theme-api.scss +219 -219
- package/abstracts/_typography.scss +128 -128
- package/base/_reset.scss +446 -445
- package/components/app-page-header.scss +260 -260
- package/components/matcha-accordion.scss +293 -293
- package/components/matcha-audio-player.scss +31 -31
- package/components/matcha-autocomplete.scss +145 -145
- package/components/matcha-avatar.scss +440 -301
- package/components/matcha-badge.scss +120 -120
- package/components/matcha-breadcrumb.scss +231 -231
- package/components/matcha-button-toggle.scss +383 -384
- package/components/matcha-buttons.scss +913 -913
- package/components/matcha-calendar.scss +218 -218
- package/components/matcha-cards.scss +230 -230
- package/components/matcha-chart-card.scss +53 -53
- package/components/matcha-checkbox.scss +255 -255
- package/components/matcha-chip.scss +292 -292
- package/components/matcha-color-pick.scss +34 -34
- package/components/matcha-command-palette.scss +316 -316
- package/components/matcha-contact.scss +35 -0
- package/components/matcha-crop.scss +406 -406
- package/components/matcha-date.scss +81 -81
- package/components/matcha-divider.scss +100 -100
- package/components/matcha-draggable.scss +23 -23
- package/components/matcha-drawer.scss +376 -376
- package/components/matcha-drop-image.scss +14 -14
- package/components/matcha-drop-list.scss +430 -430
- package/components/matcha-emoji.scss +69 -69
- package/components/matcha-empty-state.scss +230 -230
- package/components/matcha-file-uploader.scss +471 -471
- package/components/matcha-flag.scss +103 -103
- package/components/matcha-footer.scss +91 -91
- package/components/matcha-form-field.scss +606 -606
- package/components/matcha-form-section.scss +100 -100
- package/components/matcha-header.scss +135 -135
- package/components/matcha-highlight.scss +164 -164
- package/components/matcha-hint-text.scss +90 -90
- package/components/matcha-horizontal-tree.scss +316 -316
- package/components/matcha-icon.scss +98 -98
- package/components/matcha-image.scss +61 -61
- package/components/matcha-list.scss +211 -211
- package/components/matcha-menu.scss +99 -99
- package/components/matcha-modal.scss +210 -210
- package/components/matcha-nav.scss +581 -581
- package/components/matcha-notification.scss +413 -413
- package/components/matcha-option.scss +170 -170
- package/components/matcha-page-builder.scss +4196 -4196
- package/components/matcha-paginator.scss +689 -689
- package/components/matcha-panel.scss +194 -194
- package/components/matcha-profile-card.scss +50 -50
- package/components/matcha-progress-bar.scss +313 -313
- package/components/matcha-radio.scss +320 -320
- package/components/matcha-ripple.scss +7 -7
- package/components/matcha-scrollbar.scss +33 -33
- package/components/matcha-scrollbox-shadow.scss +120 -120
- package/components/matcha-section.scss +102 -102
- package/components/matcha-select-multiple.scss +56 -56
- package/components/matcha-select.scss +667 -667
- package/components/matcha-skeleton.scss +155 -155
- package/components/matcha-slide-toggle.scss +369 -369
- package/components/matcha-slider.scss +285 -285
- package/components/matcha-snack-bar.scss +259 -259
- package/components/matcha-spin.scss +164 -164
- package/components/matcha-spinner.scss +97 -97
- package/components/matcha-status-pill.scss +38 -18
- package/components/matcha-stepper.scss +376 -376
- package/components/matcha-table-cell.scss +49 -41
- package/components/matcha-table.scss +579 -579
- package/components/matcha-tabs.scss +600 -600
- package/components/matcha-text-editor.scss +105 -105
- package/components/matcha-time.scss +33 -33
- package/components/matcha-timepicker.scss +13 -13
- package/components/matcha-toolbar.scss +359 -359
- package/components/matcha-tooltip.scss +224 -224
- package/components/matcha-tree-view.scss +257 -257
- package/layout/matcha-page-layout.scss +778 -778
- package/main.scss +331 -329
- package/package.json +1 -1
- package/tokens/_animations-tokens.scss +37 -37
- package/tokens/_breakpoints-tokens.scss +35 -35
- package/tokens/_color-tokens.scss +274 -274
- package/tokens/_elevation-tokens.scss +33 -33
- package/tokens/_emit-tokens.scss +324 -324
- package/tokens/_material-palette.scss +1149 -1149
- package/tokens/_primitives.scss +98 -98
- package/tokens/_semantic-aliases.scss +120 -120
- package/tokens/_spacing-tokens.scss +94 -94
- package/tokens/_static-tokens.scss +137 -137
- package/tokens/_typography-tokens.scss +65 -65
- package/vendors/charts.scss +90 -90
|
@@ -1,413 +1,413 @@
|
|
|
1
|
-
@use "../abstracts/media-breakpoint" as *;
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
|
|
4
|
-
// =============================================================================
|
|
5
|
-
// matcha-notification.scss — In-page notification banner / alert
|
|
6
|
-
// Aligned with Figma matcha/notification:
|
|
7
|
-
// Status(5: Erro, Alerta, Sucesso, Ideia, Neutro)
|
|
8
|
-
// × Slots: icon, title, description, CTA button, close
|
|
9
|
-
// Angular: matcha-notification
|
|
10
|
-
// =============================================================================
|
|
11
|
-
|
|
12
|
-
@mixin matcha-notification-theme($theme) {
|
|
13
|
-
|
|
14
|
-
// Title sempre text-primary, description sempre text-secondary (Figma DSV3).
|
|
15
|
-
// Texto fica legível porque bg é alpha 10% — usuário lê o texto sobre o
|
|
16
|
-
// surface real, não sobre a tinta.
|
|
17
|
-
.matcha-notification__title {
|
|
18
|
-
color: var(--matcha-color-text-primary);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.matcha-notification__description {
|
|
22
|
-
color: var(--matcha-color-text-secondary);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Close icon — color icon/default (token DSV3 #5f656b light / #9aa0a6 dark).
|
|
26
|
-
.matcha-notification__close {
|
|
27
|
-
color: var(--matcha-color-icon-default, var(--matcha-color-text-secondary));
|
|
28
|
-
|
|
29
|
-
&:focus-visible {
|
|
30
|
-
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
|
|
31
|
-
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// ── Status × cores (Figma 1:1) ──
|
|
36
|
-
// Tokens canon: --matcha-color-{danger|warn|success|info} (sem prefix "feedback-").
|
|
37
|
-
// --matcha-icon-color cascateia pros matcha-icon (filhos do banner).
|
|
38
|
-
// --matcha-button-color* setado em button[matcha-notification-action] — selector
|
|
39
|
-
// mais específico que o default do button[matcha-button] (vence cascade).
|
|
40
|
-
.matcha-notification--error {
|
|
41
|
-
background: var(--matcha-color-danger-alpha);
|
|
42
|
-
border-left-color: var(--matcha-color-danger);
|
|
43
|
-
--matcha-icon-color: var(--matcha-color-danger);
|
|
44
|
-
|
|
45
|
-
button[matcha-notification-action],
|
|
46
|
-
a[matcha-notification-action] {
|
|
47
|
-
--matcha-button-color: var(--matcha-color-danger);
|
|
48
|
-
--matcha-button-color-hover: var(--matcha-color-danger-hover);
|
|
49
|
-
--matcha-button-color-pressed: var(--matcha-color-danger-pressed);
|
|
50
|
-
--matcha-button-color-text-on: var(--matcha-color-danger-contrast);
|
|
51
|
-
--matcha-button-color-alpha: var(--matcha-color-danger-alpha);
|
|
52
|
-
--matcha-button-color-edge: var(--matcha-color-danger);
|
|
53
|
-
color: var(--matcha-color-danger);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.matcha-notification--warning {
|
|
58
|
-
background: var(--matcha-color-warn-alpha);
|
|
59
|
-
border-left-color: var(--matcha-color-warn);
|
|
60
|
-
--matcha-icon-color: var(--matcha-color-warn);
|
|
61
|
-
|
|
62
|
-
button[matcha-notification-action],
|
|
63
|
-
a[matcha-notification-action] {
|
|
64
|
-
--matcha-button-color: var(--matcha-color-warn);
|
|
65
|
-
--matcha-button-color-hover: var(--matcha-color-warn-hover);
|
|
66
|
-
--matcha-button-color-pressed: var(--matcha-color-warn-pressed);
|
|
67
|
-
--matcha-button-color-text-on: var(--matcha-color-warn-contrast);
|
|
68
|
-
--matcha-button-color-alpha: var(--matcha-color-warn-alpha);
|
|
69
|
-
--matcha-button-color-edge: var(--matcha-color-warn);
|
|
70
|
-
color: var(--matcha-color-warn);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.matcha-notification--success {
|
|
75
|
-
background: var(--matcha-color-success-alpha);
|
|
76
|
-
border-left-color: var(--matcha-color-success);
|
|
77
|
-
--matcha-icon-color: var(--matcha-color-success);
|
|
78
|
-
|
|
79
|
-
button[matcha-notification-action],
|
|
80
|
-
a[matcha-notification-action] {
|
|
81
|
-
--matcha-button-color: var(--matcha-color-success);
|
|
82
|
-
--matcha-button-color-hover: var(--matcha-color-success-hover);
|
|
83
|
-
--matcha-button-color-pressed: var(--matcha-color-success-pressed);
|
|
84
|
-
--matcha-button-color-text-on: var(--matcha-color-success-contrast);
|
|
85
|
-
--matcha-button-color-alpha: var(--matcha-color-success-alpha);
|
|
86
|
-
--matcha-button-color-edge: var(--matcha-color-success);
|
|
87
|
-
color: var(--matcha-color-success);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.matcha-notification--info {
|
|
92
|
-
background: var(--matcha-color-info-alpha);
|
|
93
|
-
border-left-color: var(--matcha-color-info);
|
|
94
|
-
--matcha-icon-color: var(--matcha-color-info);
|
|
95
|
-
|
|
96
|
-
button[matcha-notification-action],
|
|
97
|
-
a[matcha-notification-action] {
|
|
98
|
-
--matcha-button-color: var(--matcha-color-info);
|
|
99
|
-
--matcha-button-color-hover: var(--matcha-color-info-hover);
|
|
100
|
-
--matcha-button-color-pressed: var(--matcha-color-info-pressed);
|
|
101
|
-
--matcha-button-color-text-on: var(--matcha-color-info-contrast);
|
|
102
|
-
--matcha-button-color-alpha: var(--matcha-color-info-alpha);
|
|
103
|
-
--matcha-button-color-edge: var(--matcha-color-info);
|
|
104
|
-
color: var(--matcha-color-info);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Neutro — bg surface/bg-alpha (50%) + border surface/border + icon/CTA neutros.
|
|
109
|
-
.matcha-notification--neutral {
|
|
110
|
-
background: var(--matcha-color-surface-bg-alpha);
|
|
111
|
-
border-left-color: var(--matcha-color-surface-border);
|
|
112
|
-
--matcha-icon-color: var(--matcha-color-icon-default);
|
|
113
|
-
|
|
114
|
-
button[matcha-notification-action],
|
|
115
|
-
a[matcha-notification-action] {
|
|
116
|
-
--matcha-button-color-edge: var(--matcha-color-text-secondary);
|
|
117
|
-
color: var(--matcha-color-text-secondary);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
123
|
-
|
|
124
|
-
// Notification — Figma DSV3 1:1 (matcha/notification 15955:692):
|
|
125
|
-
// Layout HORIZONTAL · pad/gap por size variant · radius 8.
|
|
126
|
-
// Bg ALPHA 10% (subtle tint) + border-left 4px (status color) + elevation level-2.
|
|
127
|
-
// Texto fica legível sobre surface real (bg apenas tinta sutil).
|
|
128
|
-
//
|
|
129
|
-
// Sizes (canon DSV3):
|
|
130
|
-
// sm — pad 6/12, gap 8, font body-sm 12/16 (forms compactos, drawer)
|
|
131
|
-
// md — pad 12/16, gap 12, font body-md 14/20 (default)
|
|
132
|
-
// lg — pad 20/24, gap 20, font body-lg 16/24 (hero, dashboard top)
|
|
133
|
-
.matcha-notification {
|
|
134
|
-
display: flex;
|
|
135
|
-
align-items: center;
|
|
136
|
-
gap: var(--matcha-space-150, 12px);
|
|
137
|
-
padding-block: var(--matcha-space-150, 12px);
|
|
138
|
-
padding-inline: var(--matcha-space-200, 16px);
|
|
139
|
-
border-radius: var(--matcha-radius-lg, 8px);
|
|
140
|
-
border-left: var(--matcha-border-medium, 4px) solid transparent;
|
|
141
|
-
box-shadow: var(--matcha-shadow-2, 0 4px 16px -2px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04));
|
|
142
|
-
width: 100%;
|
|
143
|
-
box-sizing: border-box;
|
|
144
|
-
position: relative;
|
|
145
|
-
overflow: hidden; // contém o countdown bar absolute
|
|
146
|
-
|
|
147
|
-
// sm — compact pra forms densos / drawer
|
|
148
|
-
&[size="sm"] {
|
|
149
|
-
gap: var(--matcha-space-100, 8px);
|
|
150
|
-
padding-block: var(--matcha-space-075, 6px);
|
|
151
|
-
padding-inline: var(--matcha-space-150, 12px);
|
|
152
|
-
|
|
153
|
-
.matcha-notification__title,
|
|
154
|
-
.matcha-notification__description {
|
|
155
|
-
font-size: var(--matcha-text-body-sm, 12px);
|
|
156
|
-
line-height: var(--matcha-leading-body-sm, 16px);
|
|
157
|
-
}
|
|
158
|
-
.matcha-notification__media-default {
|
|
159
|
-
width: var(--matcha-icon-size-sm, 20px);
|
|
160
|
-
height: var(--matcha-icon-size-sm, 20px);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// lg — hero / dashboard top
|
|
165
|
-
&[size="lg"] {
|
|
166
|
-
gap: var(--matcha-space-250, 20px);
|
|
167
|
-
padding-block: var(--matcha-space-250, 20px);
|
|
168
|
-
padding-inline: var(--matcha-space-300, 24px);
|
|
169
|
-
|
|
170
|
-
.matcha-notification__title,
|
|
171
|
-
.matcha-notification__description {
|
|
172
|
-
font-size: var(--matcha-text-body-lg, 16px);
|
|
173
|
-
line-height: var(--matcha-leading-body-lg, 24px);
|
|
174
|
-
}
|
|
175
|
-
.matcha-notification__media-default {
|
|
176
|
-
width: var(--matcha-icon-size-lg, 28px);
|
|
177
|
-
height: var(--matcha-icon-size-lg, 28px);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// ── Media slot ──
|
|
183
|
-
// Slot wrapper. Tem 2 children possíveis:
|
|
184
|
-
// 1. consumer projetado via [matcha-notification-media] (matcha-icon-badge, etc)
|
|
185
|
-
// 2. fallback __media-default (matcha-icon do status)
|
|
186
|
-
// CSS esconde o fallback quando há projected content.
|
|
187
|
-
.matcha-notification__media {
|
|
188
|
-
flex-shrink: 0;
|
|
189
|
-
display: flex;
|
|
190
|
-
align-items: center;
|
|
191
|
-
justify-content: center;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.matcha-notification__media-default {
|
|
195
|
-
width: var(--matcha-icon-size-md, 24px);
|
|
196
|
-
height: var(--matcha-icon-size-md, 24px);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// Hide fallback default icon when consumer projeta media slot.
|
|
200
|
-
// `:has` é resolved no parent — checa se há filho com attr [matcha-notification-media].
|
|
201
|
-
.matcha-notification__media:has([matcha-notification-media]) .matcha-notification__media-default {
|
|
202
|
-
display: none;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// ── Body ──
|
|
206
|
-
.matcha-notification__body {
|
|
207
|
-
display: flex;
|
|
208
|
-
flex-direction: column;
|
|
209
|
-
gap: var(--matcha-space-050, 4px);
|
|
210
|
-
flex: 1;
|
|
211
|
-
min-width: 0;
|
|
212
|
-
|
|
213
|
-
// Body inteiro some se nenhum slot interno tem conteúdo.
|
|
214
|
-
&:not(:has(.matcha-notification__title > *, .matcha-notification__description > *)) {
|
|
215
|
-
display: none;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// Title — slot semibold (distinção tipográfica do description).
|
|
220
|
-
.matcha-notification__title {
|
|
221
|
-
font-family: var(--matcha-font-family);
|
|
222
|
-
font-size: var(--matcha-text-body-md, 14px);
|
|
223
|
-
font-weight: var(--matcha-weight-semibold, 600);
|
|
224
|
-
line-height: var(--matcha-leading-body-md, 20px);
|
|
225
|
-
color: var(--matcha-notification-title-color, var(--matcha-color-text-primary));
|
|
226
|
-
|
|
227
|
-
&:not(:has(*)) { display: none; }
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.matcha-notification__description {
|
|
231
|
-
font-family: var(--matcha-font-family);
|
|
232
|
-
font-size: var(--matcha-text-body-md, 14px);
|
|
233
|
-
font-weight: var(--matcha-weight-regular, 400);
|
|
234
|
-
line-height: var(--matcha-leading-body-md, 20px);
|
|
235
|
-
color: var(--matcha-notification-description-color, var(--matcha-color-text-secondary));
|
|
236
|
-
|
|
237
|
-
&:not(:has(*)):empty { display: none; }
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// ── Actions slot (CTAs) ──
|
|
241
|
-
.matcha-notification__actions {
|
|
242
|
-
display: flex;
|
|
243
|
-
align-items: center;
|
|
244
|
-
gap: var(--matcha-space-100, 8px);
|
|
245
|
-
flex-shrink: 0;
|
|
246
|
-
|
|
247
|
-
&:not(:has(*)) { display: none; }
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// ── Countdown bar (autoDismiss > 0) ──
|
|
251
|
-
// Bar 2px na base, scaleX(progress) — visual de "tempo esgotando".
|
|
252
|
-
.matcha-notification__countdown {
|
|
253
|
-
position: absolute;
|
|
254
|
-
inset-inline: 0;
|
|
255
|
-
inset-block-end: 0;
|
|
256
|
-
height: var(--matcha-border-thin, 2px);
|
|
257
|
-
background: currentColor;
|
|
258
|
-
color: var(--matcha-color-info); // sobrescrito pelo status modifier (abaixo)
|
|
259
|
-
transform-origin: left center;
|
|
260
|
-
transition: transform var(--matcha-duration-instant, 80ms) linear;
|
|
261
|
-
pointer-events: none;
|
|
262
|
-
opacity: 0.6;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.matcha-notification--error .matcha-notification__countdown { color: var(--matcha-color-danger); }
|
|
266
|
-
.matcha-notification--warning .matcha-notification__countdown { color: var(--matcha-color-warn); }
|
|
267
|
-
.matcha-notification--success .matcha-notification__countdown { color: var(--matcha-color-success); }
|
|
268
|
-
.matcha-notification--info .matcha-notification__countdown { color: var(--matcha-color-info); }
|
|
269
|
-
.matcha-notification--neutral .matcha-notification__countdown { color: var(--matcha-color-text-secondary); }
|
|
270
|
-
|
|
271
|
-
.matcha-notification__close {
|
|
272
|
-
flex-shrink: 0;
|
|
273
|
-
display: flex;
|
|
274
|
-
align-items: center;
|
|
275
|
-
justify-content: center;
|
|
276
|
-
width: 32px;
|
|
277
|
-
height: 32px;
|
|
278
|
-
background: none;
|
|
279
|
-
border: none;
|
|
280
|
-
cursor: pointer;
|
|
281
|
-
padding: 0;
|
|
282
|
-
border-radius: var(--matcha-radius-pill, 9999px);
|
|
283
|
-
position: relative;
|
|
284
|
-
overflow: hidden;
|
|
285
|
-
transition: color var(--matcha-duration-instant, 80ms) linear;
|
|
286
|
-
|
|
287
|
-
// State layer
|
|
288
|
-
&::before {
|
|
289
|
-
content: '';
|
|
290
|
-
position: absolute;
|
|
291
|
-
inset: 0;
|
|
292
|
-
background: currentColor;
|
|
293
|
-
opacity: 0;
|
|
294
|
-
border-radius: inherit;
|
|
295
|
-
pointer-events: none;
|
|
296
|
-
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
297
|
-
}
|
|
298
|
-
&:hover:not([disabled])::before { opacity: var(--matcha-state-hover, 0.08); }
|
|
299
|
-
&:active:not([disabled])::before { opacity: var(--matcha-state-active, 0.12); }
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// ── Mobile (≤599px) ─────────────────────────────────────────────────────
|
|
303
|
-
// Stack vertical (mesmo padrão do matcha-banner mobile):
|
|
304
|
-
// [icon na 1ª linha (align-self start)]
|
|
305
|
-
// → [body (title + description)]
|
|
306
|
-
// → [CTA action alinhado à esquerda, natural width]
|
|
307
|
-
// close vira absolute top-right (não compete por espaço no flow).
|
|
308
|
-
//
|
|
309
|
-
// `.is-mobile-preview` aplica os mesmos rules em qualquer viewport — útil pra
|
|
310
|
-
// demonstrar o layout mobile em pages de documentação sem redimensionar.
|
|
311
|
-
@mixin matcha-notification-mobile {
|
|
312
|
-
flex-direction: column;
|
|
313
|
-
align-items: stretch;
|
|
314
|
-
gap: var(--matcha-space-150, 12px);
|
|
315
|
-
padding-block: var(--matcha-space-150, 12px);
|
|
316
|
-
padding-inline: var(--matcha-space-200, 16px);
|
|
317
|
-
padding-right: var(--matcha-space-500, 40px); // reserva espaço pro close absolute
|
|
318
|
-
// position: relative já no host (containment do countdown bar)
|
|
319
|
-
|
|
320
|
-
// Media na sua própria linha, alinhado à esquerda (não centralizado).
|
|
321
|
-
.matcha-notification__media {
|
|
322
|
-
align-self: flex-start;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// Body ocupa largura total da coluna.
|
|
326
|
-
.matcha-notification__body {
|
|
327
|
-
width: 100%;
|
|
328
|
-
min-width: 0;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// Actions wrapper full-width pra acomodar CTAs.
|
|
332
|
-
.matcha-notification__actions {
|
|
333
|
-
width: 100%;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
// CTA actions alinhados à esquerda no natural width.
|
|
337
|
-
button[matcha-notification-action],
|
|
338
|
-
a[matcha-notification-action] {
|
|
339
|
-
align-self: flex-start;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// Close: top-right absolute, fora do flow vertical.
|
|
343
|
-
.matcha-notification__close {
|
|
344
|
-
position: absolute;
|
|
345
|
-
top: var(--matcha-space-100, 8px);
|
|
346
|
-
right: var(--matcha-space-100, 8px);
|
|
347
|
-
z-index: 2;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
@include media-breakpoint('xs') {
|
|
352
|
-
.matcha-notification { @include matcha-notification-mobile; }
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.matcha-notification.is-mobile-preview {
|
|
356
|
-
@include matcha-notification-mobile;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
360
|
-
|
|
361
|
-
@media (prefers-reduced-motion: reduce) {
|
|
362
|
-
.matcha-notification__close,
|
|
363
|
-
.matcha-notification__close::before {
|
|
364
|
-
transition: none;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
// Countdown bar visual some — auto-dismiss continua, só sem ticking visual.
|
|
368
|
-
.matcha-notification__countdown {
|
|
369
|
-
transition: none;
|
|
370
|
-
display: none;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// ── Forced colors (Windows High Contrast) ──
|
|
375
|
-
// Bg alpha + shadow ficam invisíveis. Border-left vira solid CanvasText
|
|
376
|
-
// e ganha border full pra delimitar visualmente.
|
|
377
|
-
@media (forced-colors: active) {
|
|
378
|
-
.matcha-notification {
|
|
379
|
-
background: Canvas;
|
|
380
|
-
border: 1px solid CanvasText;
|
|
381
|
-
border-left-width: 4px;
|
|
382
|
-
box-shadow: none;
|
|
383
|
-
color: CanvasText;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.matcha-notification__icon { color: CanvasText; }
|
|
387
|
-
.matcha-notification__title { color: CanvasText; }
|
|
388
|
-
.matcha-notification__description { color: CanvasText; }
|
|
389
|
-
|
|
390
|
-
.matcha-notification__close {
|
|
391
|
-
color: CanvasText;
|
|
392
|
-
|
|
393
|
-
&:focus-visible {
|
|
394
|
-
outline: 2px solid CanvasText;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
// ── Print ──
|
|
400
|
-
// Notification é informacional — mantém visível, sem bg/shadow.
|
|
401
|
-
@media print {
|
|
402
|
-
.matcha-notification {
|
|
403
|
-
background: transparent;
|
|
404
|
-
box-shadow: none;
|
|
405
|
-
border: 1px solid currentColor;
|
|
406
|
-
border-left-width: 4px;
|
|
407
|
-
break-inside: avoid;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
.matcha-notification__close {
|
|
411
|
-
display: none;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
1
|
+
@use "../abstracts/media-breakpoint" as *;
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
// =============================================================================
|
|
5
|
+
// matcha-notification.scss — In-page notification banner / alert
|
|
6
|
+
// Aligned with Figma matcha/notification:
|
|
7
|
+
// Status(5: Erro, Alerta, Sucesso, Ideia, Neutro)
|
|
8
|
+
// × Slots: icon, title, description, CTA button, close
|
|
9
|
+
// Angular: matcha-notification
|
|
10
|
+
// =============================================================================
|
|
11
|
+
|
|
12
|
+
@mixin matcha-notification-theme($theme) {
|
|
13
|
+
|
|
14
|
+
// Title sempre text-primary, description sempre text-secondary (Figma DSV3).
|
|
15
|
+
// Texto fica legível porque bg é alpha 10% — usuário lê o texto sobre o
|
|
16
|
+
// surface real, não sobre a tinta.
|
|
17
|
+
.matcha-notification__title {
|
|
18
|
+
color: var(--matcha-color-text-primary);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.matcha-notification__description {
|
|
22
|
+
color: var(--matcha-color-text-secondary);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Close icon — color icon/default (token DSV3 #5f656b light / #9aa0a6 dark).
|
|
26
|
+
.matcha-notification__close {
|
|
27
|
+
color: var(--matcha-color-icon-default, var(--matcha-color-text-secondary));
|
|
28
|
+
|
|
29
|
+
&:focus-visible {
|
|
30
|
+
outline: var(--matcha-state-focus-ring-width, 2px) solid var(--matcha-color-accent);
|
|
31
|
+
outline-offset: var(--matcha-state-focus-ring-offset, 2px);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// ── Status × cores (Figma 1:1) ──
|
|
36
|
+
// Tokens canon: --matcha-color-{danger|warn|success|info} (sem prefix "feedback-").
|
|
37
|
+
// --matcha-icon-color cascateia pros matcha-icon (filhos do banner).
|
|
38
|
+
// --matcha-button-color* setado em button[matcha-notification-action] — selector
|
|
39
|
+
// mais específico que o default do button[matcha-button] (vence cascade).
|
|
40
|
+
.matcha-notification--error {
|
|
41
|
+
background: var(--matcha-color-danger-alpha);
|
|
42
|
+
border-left-color: var(--matcha-color-danger);
|
|
43
|
+
--matcha-icon-color: var(--matcha-color-danger);
|
|
44
|
+
|
|
45
|
+
button[matcha-notification-action],
|
|
46
|
+
a[matcha-notification-action] {
|
|
47
|
+
--matcha-button-color: var(--matcha-color-danger);
|
|
48
|
+
--matcha-button-color-hover: var(--matcha-color-danger-hover);
|
|
49
|
+
--matcha-button-color-pressed: var(--matcha-color-danger-pressed);
|
|
50
|
+
--matcha-button-color-text-on: var(--matcha-color-danger-contrast);
|
|
51
|
+
--matcha-button-color-alpha: var(--matcha-color-danger-alpha);
|
|
52
|
+
--matcha-button-color-edge: var(--matcha-color-danger);
|
|
53
|
+
color: var(--matcha-color-danger);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.matcha-notification--warning {
|
|
58
|
+
background: var(--matcha-color-warn-alpha);
|
|
59
|
+
border-left-color: var(--matcha-color-warn);
|
|
60
|
+
--matcha-icon-color: var(--matcha-color-warn);
|
|
61
|
+
|
|
62
|
+
button[matcha-notification-action],
|
|
63
|
+
a[matcha-notification-action] {
|
|
64
|
+
--matcha-button-color: var(--matcha-color-warn);
|
|
65
|
+
--matcha-button-color-hover: var(--matcha-color-warn-hover);
|
|
66
|
+
--matcha-button-color-pressed: var(--matcha-color-warn-pressed);
|
|
67
|
+
--matcha-button-color-text-on: var(--matcha-color-warn-contrast);
|
|
68
|
+
--matcha-button-color-alpha: var(--matcha-color-warn-alpha);
|
|
69
|
+
--matcha-button-color-edge: var(--matcha-color-warn);
|
|
70
|
+
color: var(--matcha-color-warn);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.matcha-notification--success {
|
|
75
|
+
background: var(--matcha-color-success-alpha);
|
|
76
|
+
border-left-color: var(--matcha-color-success);
|
|
77
|
+
--matcha-icon-color: var(--matcha-color-success);
|
|
78
|
+
|
|
79
|
+
button[matcha-notification-action],
|
|
80
|
+
a[matcha-notification-action] {
|
|
81
|
+
--matcha-button-color: var(--matcha-color-success);
|
|
82
|
+
--matcha-button-color-hover: var(--matcha-color-success-hover);
|
|
83
|
+
--matcha-button-color-pressed: var(--matcha-color-success-pressed);
|
|
84
|
+
--matcha-button-color-text-on: var(--matcha-color-success-contrast);
|
|
85
|
+
--matcha-button-color-alpha: var(--matcha-color-success-alpha);
|
|
86
|
+
--matcha-button-color-edge: var(--matcha-color-success);
|
|
87
|
+
color: var(--matcha-color-success);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.matcha-notification--info {
|
|
92
|
+
background: var(--matcha-color-info-alpha);
|
|
93
|
+
border-left-color: var(--matcha-color-info);
|
|
94
|
+
--matcha-icon-color: var(--matcha-color-info);
|
|
95
|
+
|
|
96
|
+
button[matcha-notification-action],
|
|
97
|
+
a[matcha-notification-action] {
|
|
98
|
+
--matcha-button-color: var(--matcha-color-info);
|
|
99
|
+
--matcha-button-color-hover: var(--matcha-color-info-hover);
|
|
100
|
+
--matcha-button-color-pressed: var(--matcha-color-info-pressed);
|
|
101
|
+
--matcha-button-color-text-on: var(--matcha-color-info-contrast);
|
|
102
|
+
--matcha-button-color-alpha: var(--matcha-color-info-alpha);
|
|
103
|
+
--matcha-button-color-edge: var(--matcha-color-info);
|
|
104
|
+
color: var(--matcha-color-info);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Neutro — bg surface/bg-alpha (50%) + border surface/border + icon/CTA neutros.
|
|
109
|
+
.matcha-notification--neutral {
|
|
110
|
+
background: var(--matcha-color-surface-bg-alpha);
|
|
111
|
+
border-left-color: var(--matcha-color-surface-border);
|
|
112
|
+
--matcha-icon-color: var(--matcha-color-icon-default);
|
|
113
|
+
|
|
114
|
+
button[matcha-notification-action],
|
|
115
|
+
a[matcha-notification-action] {
|
|
116
|
+
--matcha-button-color-edge: var(--matcha-color-text-secondary);
|
|
117
|
+
color: var(--matcha-color-text-secondary);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// ── Layout ──────────────────────────────────────────────────────────────────
|
|
123
|
+
|
|
124
|
+
// Notification — Figma DSV3 1:1 (matcha/notification 15955:692):
|
|
125
|
+
// Layout HORIZONTAL · pad/gap por size variant · radius 8.
|
|
126
|
+
// Bg ALPHA 10% (subtle tint) + border-left 4px (status color) + elevation level-2.
|
|
127
|
+
// Texto fica legível sobre surface real (bg apenas tinta sutil).
|
|
128
|
+
//
|
|
129
|
+
// Sizes (canon DSV3):
|
|
130
|
+
// sm — pad 6/12, gap 8, font body-sm 12/16 (forms compactos, drawer)
|
|
131
|
+
// md — pad 12/16, gap 12, font body-md 14/20 (default)
|
|
132
|
+
// lg — pad 20/24, gap 20, font body-lg 16/24 (hero, dashboard top)
|
|
133
|
+
.matcha-notification {
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
gap: var(--matcha-space-150, 12px);
|
|
137
|
+
padding-block: var(--matcha-space-150, 12px);
|
|
138
|
+
padding-inline: var(--matcha-space-200, 16px);
|
|
139
|
+
border-radius: var(--matcha-radius-lg, 8px);
|
|
140
|
+
border-left: var(--matcha-border-medium, 4px) solid transparent;
|
|
141
|
+
box-shadow: var(--matcha-shadow-2, 0 4px 16px -2px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04));
|
|
142
|
+
width: 100%;
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
position: relative;
|
|
145
|
+
overflow: hidden; // contém o countdown bar absolute
|
|
146
|
+
|
|
147
|
+
// sm — compact pra forms densos / drawer
|
|
148
|
+
&[size="sm"] {
|
|
149
|
+
gap: var(--matcha-space-100, 8px);
|
|
150
|
+
padding-block: var(--matcha-space-075, 6px);
|
|
151
|
+
padding-inline: var(--matcha-space-150, 12px);
|
|
152
|
+
|
|
153
|
+
.matcha-notification__title,
|
|
154
|
+
.matcha-notification__description {
|
|
155
|
+
font-size: var(--matcha-text-body-sm, 12px);
|
|
156
|
+
line-height: var(--matcha-leading-body-sm, 16px);
|
|
157
|
+
}
|
|
158
|
+
.matcha-notification__media-default {
|
|
159
|
+
width: var(--matcha-icon-size-sm, 20px);
|
|
160
|
+
height: var(--matcha-icon-size-sm, 20px);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// lg — hero / dashboard top
|
|
165
|
+
&[size="lg"] {
|
|
166
|
+
gap: var(--matcha-space-250, 20px);
|
|
167
|
+
padding-block: var(--matcha-space-250, 20px);
|
|
168
|
+
padding-inline: var(--matcha-space-300, 24px);
|
|
169
|
+
|
|
170
|
+
.matcha-notification__title,
|
|
171
|
+
.matcha-notification__description {
|
|
172
|
+
font-size: var(--matcha-text-body-lg, 16px);
|
|
173
|
+
line-height: var(--matcha-leading-body-lg, 24px);
|
|
174
|
+
}
|
|
175
|
+
.matcha-notification__media-default {
|
|
176
|
+
width: var(--matcha-icon-size-lg, 28px);
|
|
177
|
+
height: var(--matcha-icon-size-lg, 28px);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// ── Media slot ──
|
|
183
|
+
// Slot wrapper. Tem 2 children possíveis:
|
|
184
|
+
// 1. consumer projetado via [matcha-notification-media] (matcha-icon-badge, etc)
|
|
185
|
+
// 2. fallback __media-default (matcha-icon do status)
|
|
186
|
+
// CSS esconde o fallback quando há projected content.
|
|
187
|
+
.matcha-notification__media {
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
justify-content: center;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.matcha-notification__media-default {
|
|
195
|
+
width: var(--matcha-icon-size-md, 24px);
|
|
196
|
+
height: var(--matcha-icon-size-md, 24px);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Hide fallback default icon when consumer projeta media slot.
|
|
200
|
+
// `:has` é resolved no parent — checa se há filho com attr [matcha-notification-media].
|
|
201
|
+
.matcha-notification__media:has([matcha-notification-media]) .matcha-notification__media-default {
|
|
202
|
+
display: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// ── Body ──
|
|
206
|
+
.matcha-notification__body {
|
|
207
|
+
display: flex;
|
|
208
|
+
flex-direction: column;
|
|
209
|
+
gap: var(--matcha-space-050, 4px);
|
|
210
|
+
flex: 1;
|
|
211
|
+
min-width: 0;
|
|
212
|
+
|
|
213
|
+
// Body inteiro some se nenhum slot interno tem conteúdo.
|
|
214
|
+
&:not(:has(.matcha-notification__title > *, .matcha-notification__description > *)) {
|
|
215
|
+
display: none;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Title — slot semibold (distinção tipográfica do description).
|
|
220
|
+
.matcha-notification__title {
|
|
221
|
+
font-family: var(--matcha-font-family);
|
|
222
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
223
|
+
font-weight: var(--matcha-weight-semibold, 600);
|
|
224
|
+
line-height: var(--matcha-leading-body-md, 20px);
|
|
225
|
+
color: var(--matcha-notification-title-color, var(--matcha-color-text-primary));
|
|
226
|
+
|
|
227
|
+
&:not(:has(*)) { display: none; }
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.matcha-notification__description {
|
|
231
|
+
font-family: var(--matcha-font-family);
|
|
232
|
+
font-size: var(--matcha-text-body-md, 14px);
|
|
233
|
+
font-weight: var(--matcha-weight-regular, 400);
|
|
234
|
+
line-height: var(--matcha-leading-body-md, 20px);
|
|
235
|
+
color: var(--matcha-notification-description-color, var(--matcha-color-text-secondary));
|
|
236
|
+
|
|
237
|
+
&:not(:has(*)):empty { display: none; }
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// ── Actions slot (CTAs) ──
|
|
241
|
+
.matcha-notification__actions {
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
gap: var(--matcha-space-100, 8px);
|
|
245
|
+
flex-shrink: 0;
|
|
246
|
+
|
|
247
|
+
&:not(:has(*)) { display: none; }
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// ── Countdown bar (autoDismiss > 0) ──
|
|
251
|
+
// Bar 2px na base, scaleX(progress) — visual de "tempo esgotando".
|
|
252
|
+
.matcha-notification__countdown {
|
|
253
|
+
position: absolute;
|
|
254
|
+
inset-inline: 0;
|
|
255
|
+
inset-block-end: 0;
|
|
256
|
+
height: var(--matcha-border-thin, 2px);
|
|
257
|
+
background: currentColor;
|
|
258
|
+
color: var(--matcha-color-info); // sobrescrito pelo status modifier (abaixo)
|
|
259
|
+
transform-origin: left center;
|
|
260
|
+
transition: transform var(--matcha-duration-instant, 80ms) linear;
|
|
261
|
+
pointer-events: none;
|
|
262
|
+
opacity: 0.6;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.matcha-notification--error .matcha-notification__countdown { color: var(--matcha-color-danger); }
|
|
266
|
+
.matcha-notification--warning .matcha-notification__countdown { color: var(--matcha-color-warn); }
|
|
267
|
+
.matcha-notification--success .matcha-notification__countdown { color: var(--matcha-color-success); }
|
|
268
|
+
.matcha-notification--info .matcha-notification__countdown { color: var(--matcha-color-info); }
|
|
269
|
+
.matcha-notification--neutral .matcha-notification__countdown { color: var(--matcha-color-text-secondary); }
|
|
270
|
+
|
|
271
|
+
.matcha-notification__close {
|
|
272
|
+
flex-shrink: 0;
|
|
273
|
+
display: flex;
|
|
274
|
+
align-items: center;
|
|
275
|
+
justify-content: center;
|
|
276
|
+
width: 32px;
|
|
277
|
+
height: 32px;
|
|
278
|
+
background: none;
|
|
279
|
+
border: none;
|
|
280
|
+
cursor: pointer;
|
|
281
|
+
padding: 0;
|
|
282
|
+
border-radius: var(--matcha-radius-pill, 9999px);
|
|
283
|
+
position: relative;
|
|
284
|
+
overflow: hidden;
|
|
285
|
+
transition: color var(--matcha-duration-instant, 80ms) linear;
|
|
286
|
+
|
|
287
|
+
// State layer
|
|
288
|
+
&::before {
|
|
289
|
+
content: '';
|
|
290
|
+
position: absolute;
|
|
291
|
+
inset: 0;
|
|
292
|
+
background: currentColor;
|
|
293
|
+
opacity: 0;
|
|
294
|
+
border-radius: inherit;
|
|
295
|
+
pointer-events: none;
|
|
296
|
+
transition: opacity var(--matcha-duration-instant, 80ms) linear;
|
|
297
|
+
}
|
|
298
|
+
&:hover:not([disabled])::before { opacity: var(--matcha-state-hover, 0.08); }
|
|
299
|
+
&:active:not([disabled])::before { opacity: var(--matcha-state-active, 0.12); }
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// ── Mobile (≤599px) ─────────────────────────────────────────────────────
|
|
303
|
+
// Stack vertical (mesmo padrão do matcha-banner mobile):
|
|
304
|
+
// [icon na 1ª linha (align-self start)]
|
|
305
|
+
// → [body (title + description)]
|
|
306
|
+
// → [CTA action alinhado à esquerda, natural width]
|
|
307
|
+
// close vira absolute top-right (não compete por espaço no flow).
|
|
308
|
+
//
|
|
309
|
+
// `.is-mobile-preview` aplica os mesmos rules em qualquer viewport — útil pra
|
|
310
|
+
// demonstrar o layout mobile em pages de documentação sem redimensionar.
|
|
311
|
+
@mixin matcha-notification-mobile {
|
|
312
|
+
flex-direction: column;
|
|
313
|
+
align-items: stretch;
|
|
314
|
+
gap: var(--matcha-space-150, 12px);
|
|
315
|
+
padding-block: var(--matcha-space-150, 12px);
|
|
316
|
+
padding-inline: var(--matcha-space-200, 16px);
|
|
317
|
+
padding-right: var(--matcha-space-500, 40px); // reserva espaço pro close absolute
|
|
318
|
+
// position: relative já no host (containment do countdown bar)
|
|
319
|
+
|
|
320
|
+
// Media na sua própria linha, alinhado à esquerda (não centralizado).
|
|
321
|
+
.matcha-notification__media {
|
|
322
|
+
align-self: flex-start;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Body ocupa largura total da coluna.
|
|
326
|
+
.matcha-notification__body {
|
|
327
|
+
width: 100%;
|
|
328
|
+
min-width: 0;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// Actions wrapper full-width pra acomodar CTAs.
|
|
332
|
+
.matcha-notification__actions {
|
|
333
|
+
width: 100%;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// CTA actions alinhados à esquerda no natural width.
|
|
337
|
+
button[matcha-notification-action],
|
|
338
|
+
a[matcha-notification-action] {
|
|
339
|
+
align-self: flex-start;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// Close: top-right absolute, fora do flow vertical.
|
|
343
|
+
.matcha-notification__close {
|
|
344
|
+
position: absolute;
|
|
345
|
+
top: var(--matcha-space-100, 8px);
|
|
346
|
+
right: var(--matcha-space-100, 8px);
|
|
347
|
+
z-index: 2;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
@include media-breakpoint('xs') {
|
|
352
|
+
.matcha-notification { @include matcha-notification-mobile; }
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.matcha-notification.is-mobile-preview {
|
|
356
|
+
@include matcha-notification-mobile;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// ── Reduced motion ──────────────────────────────────────────────────────────
|
|
360
|
+
|
|
361
|
+
@media (prefers-reduced-motion: reduce) {
|
|
362
|
+
.matcha-notification__close,
|
|
363
|
+
.matcha-notification__close::before {
|
|
364
|
+
transition: none;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// Countdown bar visual some — auto-dismiss continua, só sem ticking visual.
|
|
368
|
+
.matcha-notification__countdown {
|
|
369
|
+
transition: none;
|
|
370
|
+
display: none;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// ── Forced colors (Windows High Contrast) ──
|
|
375
|
+
// Bg alpha + shadow ficam invisíveis. Border-left vira solid CanvasText
|
|
376
|
+
// e ganha border full pra delimitar visualmente.
|
|
377
|
+
@media (forced-colors: active) {
|
|
378
|
+
.matcha-notification {
|
|
379
|
+
background: Canvas;
|
|
380
|
+
border: 1px solid CanvasText;
|
|
381
|
+
border-left-width: 4px;
|
|
382
|
+
box-shadow: none;
|
|
383
|
+
color: CanvasText;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.matcha-notification__icon { color: CanvasText; }
|
|
387
|
+
.matcha-notification__title { color: CanvasText; }
|
|
388
|
+
.matcha-notification__description { color: CanvasText; }
|
|
389
|
+
|
|
390
|
+
.matcha-notification__close {
|
|
391
|
+
color: CanvasText;
|
|
392
|
+
|
|
393
|
+
&:focus-visible {
|
|
394
|
+
outline: 2px solid CanvasText;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
// ── Print ──
|
|
400
|
+
// Notification é informacional — mantém visível, sem bg/shadow.
|
|
401
|
+
@media print {
|
|
402
|
+
.matcha-notification {
|
|
403
|
+
background: transparent;
|
|
404
|
+
box-shadow: none;
|
|
405
|
+
border: 1px solid currentColor;
|
|
406
|
+
border-left-width: 4px;
|
|
407
|
+
break-inside: avoid;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.matcha-notification__close {
|
|
411
|
+
display: none;
|
|
412
|
+
}
|
|
413
|
+
}
|