@inchurch/matcha-theme 22.40.0 → 22.40.1

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.
Files changed (93) hide show
  1. package/abstracts/_colors.scss +291 -291
  2. package/abstracts/_elevation.scss +108 -108
  3. package/abstracts/_functions.scss +321 -321
  4. package/abstracts/_media-breakpoint.scss +26 -26
  5. package/abstracts/_theme-api.scss +224 -224
  6. package/abstracts/_typography.scss +128 -128
  7. package/base/_reset.scss +487 -487
  8. package/components/app-page-header.scss +260 -260
  9. package/components/matcha-accordion.scss +297 -297
  10. package/components/matcha-audio-player.scss +31 -31
  11. package/components/matcha-autocomplete.scss +145 -145
  12. package/components/matcha-avatar.scss +426 -426
  13. package/components/matcha-badge.scss +120 -120
  14. package/components/matcha-breadcrumb.scss +231 -231
  15. package/components/matcha-button-toggle.scss +484 -484
  16. package/components/matcha-buttons.scss +973 -973
  17. package/components/matcha-calendar.scss +253 -253
  18. package/components/matcha-cards.scss +212 -212
  19. package/components/matcha-chart-card.scss +53 -53
  20. package/components/matcha-checkbox.scss +266 -266
  21. package/components/matcha-chip.scss +311 -311
  22. package/components/matcha-color-pick.scss +34 -34
  23. package/components/matcha-command-palette.scss +316 -316
  24. package/components/matcha-crop.scss +419 -419
  25. package/components/matcha-date.scss +81 -81
  26. package/components/matcha-divider.scss +100 -100
  27. package/components/matcha-draggable.scss +23 -23
  28. package/components/matcha-drawer.scss +376 -376
  29. package/components/matcha-drop-image.scss +14 -14
  30. package/components/matcha-drop-list.scss +430 -430
  31. package/components/matcha-emoji.scss +69 -69
  32. package/components/matcha-empty-state.scss +230 -230
  33. package/components/matcha-file-uploader.scss +650 -650
  34. package/components/matcha-flag.scss +103 -103
  35. package/components/matcha-footer.scss +91 -91
  36. package/components/matcha-form-field.scss +883 -883
  37. package/components/matcha-form-section.scss +100 -100
  38. package/components/matcha-header.scss +135 -135
  39. package/components/matcha-highlight.scss +164 -164
  40. package/components/matcha-hint-text.scss +90 -90
  41. package/components/matcha-horizontal-tree.scss +247 -247
  42. package/components/matcha-icon.scss +111 -111
  43. package/components/matcha-image.scss +60 -60
  44. package/components/matcha-list.scss +211 -211
  45. package/components/matcha-menu.scss +99 -99
  46. package/components/matcha-modal.scss +210 -210
  47. package/components/matcha-nav.scss +770 -770
  48. package/components/matcha-notification.scss +417 -417
  49. package/components/matcha-option.scss +170 -170
  50. package/components/matcha-page-builder.scss +4196 -4196
  51. package/components/matcha-paginator.scss +699 -699
  52. package/components/matcha-panel.scss +216 -216
  53. package/components/matcha-period.scss +174 -174
  54. package/components/matcha-profile-card.scss +50 -50
  55. package/components/matcha-progress-bar.scss +355 -355
  56. package/components/matcha-radio.scss +325 -325
  57. package/components/matcha-ripple.scss +7 -7
  58. package/components/matcha-scrollbar.scss +33 -33
  59. package/components/matcha-scrollbox-shadow.scss +120 -120
  60. package/components/matcha-section.scss +102 -102
  61. package/components/matcha-select-multiple.scss +56 -56
  62. package/components/matcha-select.scss +643 -629
  63. package/components/matcha-skeleton.scss +182 -182
  64. package/components/matcha-slide-toggle.scss +369 -369
  65. package/components/matcha-slider.scss +285 -285
  66. package/components/matcha-snack-bar.scss +259 -259
  67. package/components/matcha-spin.scss +164 -164
  68. package/components/matcha-spinner.scss +97 -97
  69. package/components/matcha-stepper.scss +376 -376
  70. package/components/matcha-table-cell.scss +107 -107
  71. package/components/matcha-table.scss +722 -722
  72. package/components/matcha-tabs.scss +642 -642
  73. package/components/matcha-text-editor.scss +111 -111
  74. package/components/matcha-time.scss +33 -33
  75. package/components/matcha-timepicker.scss +13 -13
  76. package/components/matcha-toolbar.scss +366 -366
  77. package/components/matcha-tooltip.scss +235 -235
  78. package/components/matcha-tree-view.scss +658 -658
  79. package/layout/matcha-page-layout.scss +778 -778
  80. package/main.scss +334 -334
  81. package/package.json +1 -1
  82. package/tokens/_animations-tokens.scss +37 -37
  83. package/tokens/_breakpoints-tokens.scss +35 -35
  84. package/tokens/_color-tokens.scss +288 -288
  85. package/tokens/_elevation-tokens.scss +33 -33
  86. package/tokens/_emit-tokens.scss +329 -329
  87. package/tokens/_material-palette.scss +1149 -1149
  88. package/tokens/_primitives.scss +98 -98
  89. package/tokens/_semantic-aliases.scss +120 -120
  90. package/tokens/_spacing-tokens.scss +94 -94
  91. package/tokens/_static-tokens.scss +137 -137
  92. package/tokens/_typography-tokens.scss +65 -65
  93. package/vendors/charts.scss +90 -90
@@ -1,417 +1,417 @@
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. Checa `:not(:empty)`
214
- // (não `> *`) porque description é o slot default sem `select` — texto puro
215
- // interpolado é o uso documentado (ver page-matcha-notification), sem elemento
216
- // wrapper. `> *` só capturava conteúdo em elemento, escondendo o body inteiro
217
- // quando a description era só texto (ex.: `<matcha-notification>{{ msg }}</matcha-notification>`).
218
- &:not(:has(.matcha-notification__title:not(:empty), .matcha-notification__description:not(:empty))) {
219
- display: none;
220
- }
221
- }
222
-
223
- // Title — slot semibold (distinção tipográfica do description).
224
- .matcha-notification__title {
225
- font-family: var(--matcha-font-family);
226
- font-size: var(--matcha-text-body-md, 14px);
227
- font-weight: var(--matcha-weight-semibold, 600);
228
- line-height: var(--matcha-leading-body-md, 20px);
229
- color: var(--matcha-notification-title-color, var(--matcha-color-text-primary));
230
-
231
- &:not(:has(*)) { display: none; }
232
- }
233
-
234
- .matcha-notification__description {
235
- font-family: var(--matcha-font-family);
236
- font-size: var(--matcha-text-body-md, 14px);
237
- font-weight: var(--matcha-weight-regular, 400);
238
- line-height: var(--matcha-leading-body-md, 20px);
239
- color: var(--matcha-notification-description-color, var(--matcha-color-text-secondary));
240
-
241
- &:not(:has(*)):empty { display: none; }
242
- }
243
-
244
- // ── Actions slot (CTAs) ──
245
- .matcha-notification__actions {
246
- display: flex;
247
- align-items: center;
248
- gap: var(--matcha-space-100, 8px);
249
- flex-shrink: 0;
250
-
251
- &:not(:has(*)) { display: none; }
252
- }
253
-
254
- // ── Countdown bar (autoDismiss > 0) ──
255
- // Bar 2px na base, scaleX(progress) — visual de "tempo esgotando".
256
- .matcha-notification__countdown {
257
- position: absolute;
258
- inset-inline: 0;
259
- inset-block-end: 0;
260
- height: var(--matcha-border-thin, 2px);
261
- background: currentColor;
262
- color: var(--matcha-color-info); // sobrescrito pelo status modifier (abaixo)
263
- transform-origin: left center;
264
- transition: transform var(--matcha-duration-instant, 80ms) linear;
265
- pointer-events: none;
266
- opacity: 0.6;
267
- }
268
-
269
- .matcha-notification--error .matcha-notification__countdown { color: var(--matcha-color-danger); }
270
- .matcha-notification--warning .matcha-notification__countdown { color: var(--matcha-color-warn); }
271
- .matcha-notification--success .matcha-notification__countdown { color: var(--matcha-color-success); }
272
- .matcha-notification--info .matcha-notification__countdown { color: var(--matcha-color-info); }
273
- .matcha-notification--neutral .matcha-notification__countdown { color: var(--matcha-color-text-secondary); }
274
-
275
- .matcha-notification__close {
276
- flex-shrink: 0;
277
- display: flex;
278
- align-items: center;
279
- justify-content: center;
280
- width: 32px;
281
- height: 32px;
282
- background: none;
283
- border: none;
284
- cursor: pointer;
285
- padding: 0;
286
- border-radius: var(--matcha-radius-pill, 9999px);
287
- position: relative;
288
- overflow: hidden;
289
- transition: color var(--matcha-duration-instant, 80ms) linear;
290
-
291
- // State layer
292
- &::before {
293
- content: '';
294
- position: absolute;
295
- inset: 0;
296
- background: currentColor;
297
- opacity: 0;
298
- border-radius: inherit;
299
- pointer-events: none;
300
- transition: opacity var(--matcha-duration-instant, 80ms) linear;
301
- }
302
- &:hover:not([disabled])::before { opacity: var(--matcha-state-hover, 0.08); }
303
- &:active:not([disabled])::before { opacity: var(--matcha-state-active, 0.12); }
304
- }
305
-
306
- // ── Mobile (xs, ≤479px) ─────────────────────────────────────────────────
307
- // Stack vertical (mesmo padrão do matcha-banner mobile):
308
- // [icon na 1ª linha (align-self start)]
309
- // → [body (title + description)]
310
- // → [CTA action alinhado à esquerda, natural width]
311
- // close vira absolute top-right (não compete por espaço no flow).
312
- //
313
- // `.is-mobile-preview` aplica os mesmos rules em qualquer viewport — útil pra
314
- // demonstrar o layout mobile em pages de documentação sem redimensionar.
315
- @mixin matcha-notification-mobile {
316
- flex-direction: column;
317
- align-items: stretch;
318
- gap: var(--matcha-space-150, 12px);
319
- padding-block: var(--matcha-space-150, 12px);
320
- padding-inline: var(--matcha-space-200, 16px);
321
- padding-right: var(--matcha-space-500, 40px); // reserva espaço pro close absolute
322
- // position: relative já no host (containment do countdown bar)
323
-
324
- // Media na sua própria linha, alinhado à esquerda (não centralizado).
325
- .matcha-notification__media {
326
- align-self: flex-start;
327
- }
328
-
329
- // Body ocupa largura total da coluna.
330
- .matcha-notification__body {
331
- width: 100%;
332
- min-width: 0;
333
- }
334
-
335
- // Actions wrapper full-width pra acomodar CTAs.
336
- .matcha-notification__actions {
337
- width: 100%;
338
- }
339
-
340
- // CTA actions alinhados à esquerda no natural width.
341
- button[matcha-notification-action],
342
- a[matcha-notification-action] {
343
- align-self: flex-start;
344
- }
345
-
346
- // Close: top-right absolute, fora do flow vertical.
347
- .matcha-notification__close {
348
- position: absolute;
349
- top: var(--matcha-space-100, 8px);
350
- right: var(--matcha-space-100, 8px);
351
- z-index: 2;
352
- }
353
- }
354
-
355
- @include media-breakpoint('xs') {
356
- .matcha-notification { @include matcha-notification-mobile; }
357
- }
358
-
359
- .matcha-notification.is-mobile-preview {
360
- @include matcha-notification-mobile;
361
- }
362
-
363
- // ── Reduced motion ──────────────────────────────────────────────────────────
364
-
365
- @media (prefers-reduced-motion: reduce) {
366
- .matcha-notification__close,
367
- .matcha-notification__close::before {
368
- transition: none;
369
- }
370
-
371
- // Countdown bar visual some — auto-dismiss continua, só sem ticking visual.
372
- .matcha-notification__countdown {
373
- transition: none;
374
- display: none;
375
- }
376
- }
377
-
378
- // ── Forced colors (Windows High Contrast) ──
379
- // Bg alpha + shadow ficam invisíveis. Border-left vira solid CanvasText
380
- // e ganha border full pra delimitar visualmente.
381
- @media (forced-colors: active) {
382
- .matcha-notification {
383
- background: Canvas;
384
- border: 1px solid CanvasText;
385
- border-left-width: 4px;
386
- box-shadow: none;
387
- color: CanvasText;
388
- }
389
-
390
- .matcha-notification__icon { color: CanvasText; }
391
- .matcha-notification__title { color: CanvasText; }
392
- .matcha-notification__description { color: CanvasText; }
393
-
394
- .matcha-notification__close {
395
- color: CanvasText;
396
-
397
- &:focus-visible {
398
- outline: 2px solid CanvasText;
399
- }
400
- }
401
- }
402
-
403
- // ── Print ──
404
- // Notification é informacional — mantém visível, sem bg/shadow.
405
- @media print {
406
- .matcha-notification {
407
- background: transparent;
408
- box-shadow: none;
409
- border: 1px solid currentColor;
410
- border-left-width: 4px;
411
- break-inside: avoid;
412
- }
413
-
414
- .matcha-notification__close {
415
- display: none;
416
- }
417
- }
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. Checa `:not(:empty)`
214
+ // (não `> *`) porque description é o slot default sem `select` — texto puro
215
+ // interpolado é o uso documentado (ver page-matcha-notification), sem elemento
216
+ // wrapper. `> *` só capturava conteúdo em elemento, escondendo o body inteiro
217
+ // quando a description era só texto (ex.: `<matcha-notification>{{ msg }}</matcha-notification>`).
218
+ &:not(:has(.matcha-notification__title:not(:empty), .matcha-notification__description:not(:empty))) {
219
+ display: none;
220
+ }
221
+ }
222
+
223
+ // Title — slot semibold (distinção tipográfica do description).
224
+ .matcha-notification__title {
225
+ font-family: var(--matcha-font-family);
226
+ font-size: var(--matcha-text-body-md, 14px);
227
+ font-weight: var(--matcha-weight-semibold, 600);
228
+ line-height: var(--matcha-leading-body-md, 20px);
229
+ color: var(--matcha-notification-title-color, var(--matcha-color-text-primary));
230
+
231
+ &:not(:has(*)) { display: none; }
232
+ }
233
+
234
+ .matcha-notification__description {
235
+ font-family: var(--matcha-font-family);
236
+ font-size: var(--matcha-text-body-md, 14px);
237
+ font-weight: var(--matcha-weight-regular, 400);
238
+ line-height: var(--matcha-leading-body-md, 20px);
239
+ color: var(--matcha-notification-description-color, var(--matcha-color-text-secondary));
240
+
241
+ &:not(:has(*)):empty { display: none; }
242
+ }
243
+
244
+ // ── Actions slot (CTAs) ──
245
+ .matcha-notification__actions {
246
+ display: flex;
247
+ align-items: center;
248
+ gap: var(--matcha-space-100, 8px);
249
+ flex-shrink: 0;
250
+
251
+ &:not(:has(*)) { display: none; }
252
+ }
253
+
254
+ // ── Countdown bar (autoDismiss > 0) ──
255
+ // Bar 2px na base, scaleX(progress) — visual de "tempo esgotando".
256
+ .matcha-notification__countdown {
257
+ position: absolute;
258
+ inset-inline: 0;
259
+ inset-block-end: 0;
260
+ height: var(--matcha-border-thin, 2px);
261
+ background: currentColor;
262
+ color: var(--matcha-color-info); // sobrescrito pelo status modifier (abaixo)
263
+ transform-origin: left center;
264
+ transition: transform var(--matcha-duration-instant, 80ms) linear;
265
+ pointer-events: none;
266
+ opacity: 0.6;
267
+ }
268
+
269
+ .matcha-notification--error .matcha-notification__countdown { color: var(--matcha-color-danger); }
270
+ .matcha-notification--warning .matcha-notification__countdown { color: var(--matcha-color-warn); }
271
+ .matcha-notification--success .matcha-notification__countdown { color: var(--matcha-color-success); }
272
+ .matcha-notification--info .matcha-notification__countdown { color: var(--matcha-color-info); }
273
+ .matcha-notification--neutral .matcha-notification__countdown { color: var(--matcha-color-text-secondary); }
274
+
275
+ .matcha-notification__close {
276
+ flex-shrink: 0;
277
+ display: flex;
278
+ align-items: center;
279
+ justify-content: center;
280
+ width: 32px;
281
+ height: 32px;
282
+ background: none;
283
+ border: none;
284
+ cursor: pointer;
285
+ padding: 0;
286
+ border-radius: var(--matcha-radius-pill, 9999px);
287
+ position: relative;
288
+ overflow: hidden;
289
+ transition: color var(--matcha-duration-instant, 80ms) linear;
290
+
291
+ // State layer
292
+ &::before {
293
+ content: '';
294
+ position: absolute;
295
+ inset: 0;
296
+ background: currentColor;
297
+ opacity: 0;
298
+ border-radius: inherit;
299
+ pointer-events: none;
300
+ transition: opacity var(--matcha-duration-instant, 80ms) linear;
301
+ }
302
+ &:hover:not([disabled])::before { opacity: var(--matcha-state-hover, 0.08); }
303
+ &:active:not([disabled])::before { opacity: var(--matcha-state-active, 0.12); }
304
+ }
305
+
306
+ // ── Mobile (xs, ≤479px) ─────────────────────────────────────────────────
307
+ // Stack vertical (mesmo padrão do matcha-banner mobile):
308
+ // [icon na 1ª linha (align-self start)]
309
+ // → [body (title + description)]
310
+ // → [CTA action alinhado à esquerda, natural width]
311
+ // close vira absolute top-right (não compete por espaço no flow).
312
+ //
313
+ // `.is-mobile-preview` aplica os mesmos rules em qualquer viewport — útil pra
314
+ // demonstrar o layout mobile em pages de documentação sem redimensionar.
315
+ @mixin matcha-notification-mobile {
316
+ flex-direction: column;
317
+ align-items: stretch;
318
+ gap: var(--matcha-space-150, 12px);
319
+ padding-block: var(--matcha-space-150, 12px);
320
+ padding-inline: var(--matcha-space-200, 16px);
321
+ padding-right: var(--matcha-space-500, 40px); // reserva espaço pro close absolute
322
+ // position: relative já no host (containment do countdown bar)
323
+
324
+ // Media na sua própria linha, alinhado à esquerda (não centralizado).
325
+ .matcha-notification__media {
326
+ align-self: flex-start;
327
+ }
328
+
329
+ // Body ocupa largura total da coluna.
330
+ .matcha-notification__body {
331
+ width: 100%;
332
+ min-width: 0;
333
+ }
334
+
335
+ // Actions wrapper full-width pra acomodar CTAs.
336
+ .matcha-notification__actions {
337
+ width: 100%;
338
+ }
339
+
340
+ // CTA actions alinhados à esquerda no natural width.
341
+ button[matcha-notification-action],
342
+ a[matcha-notification-action] {
343
+ align-self: flex-start;
344
+ }
345
+
346
+ // Close: top-right absolute, fora do flow vertical.
347
+ .matcha-notification__close {
348
+ position: absolute;
349
+ top: var(--matcha-space-100, 8px);
350
+ right: var(--matcha-space-100, 8px);
351
+ z-index: 2;
352
+ }
353
+ }
354
+
355
+ @include media-breakpoint('xs') {
356
+ .matcha-notification { @include matcha-notification-mobile; }
357
+ }
358
+
359
+ .matcha-notification.is-mobile-preview {
360
+ @include matcha-notification-mobile;
361
+ }
362
+
363
+ // ── Reduced motion ──────────────────────────────────────────────────────────
364
+
365
+ @media (prefers-reduced-motion: reduce) {
366
+ .matcha-notification__close,
367
+ .matcha-notification__close::before {
368
+ transition: none;
369
+ }
370
+
371
+ // Countdown bar visual some — auto-dismiss continua, só sem ticking visual.
372
+ .matcha-notification__countdown {
373
+ transition: none;
374
+ display: none;
375
+ }
376
+ }
377
+
378
+ // ── Forced colors (Windows High Contrast) ──
379
+ // Bg alpha + shadow ficam invisíveis. Border-left vira solid CanvasText
380
+ // e ganha border full pra delimitar visualmente.
381
+ @media (forced-colors: active) {
382
+ .matcha-notification {
383
+ background: Canvas;
384
+ border: 1px solid CanvasText;
385
+ border-left-width: 4px;
386
+ box-shadow: none;
387
+ color: CanvasText;
388
+ }
389
+
390
+ .matcha-notification__icon { color: CanvasText; }
391
+ .matcha-notification__title { color: CanvasText; }
392
+ .matcha-notification__description { color: CanvasText; }
393
+
394
+ .matcha-notification__close {
395
+ color: CanvasText;
396
+
397
+ &:focus-visible {
398
+ outline: 2px solid CanvasText;
399
+ }
400
+ }
401
+ }
402
+
403
+ // ── Print ──
404
+ // Notification é informacional — mantém visível, sem bg/shadow.
405
+ @media print {
406
+ .matcha-notification {
407
+ background: transparent;
408
+ box-shadow: none;
409
+ border: 1px solid currentColor;
410
+ border-left-width: 4px;
411
+ break-inside: avoid;
412
+ }
413
+
414
+ .matcha-notification__close {
415
+ display: none;
416
+ }
417
+ }