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