@acontplus/ng-notifications 2.0.3 → 2.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acontplus/ng-notifications",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Comprehensive Angular notification system with toast notifications (ngx-toastr), alerts (SweetAlert2), snackbars, theme detection, notification providers, and configurable styling. Supports multiple notification types with Angular Material integration.",
5
5
  "peerDependencies": {
6
6
  "@acontplus/ui-kit": "^1.0.2",
@@ -0,0 +1,2 @@
1
+ // Export all notification styles
2
+ @import './snackbar-themes.scss';
@@ -0,0 +1,299 @@
1
+ .cdk-overlay-container .cdk-overlay-pane .mat-mdc-snack-bar-container.acontplus-snackbar {
2
+ border-radius: 8px !important;
3
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
4
+ font-family: inherit !important;
5
+ min-width: 300px !important;
6
+ position: relative !important;
7
+ overflow: hidden !important;
8
+
9
+ .mdc-snackbar__surface {
10
+ border-radius: 8px !important;
11
+ min-width: 300px !important;
12
+ position: relative !important;
13
+ overflow: hidden !important;
14
+ }
15
+ }
16
+
17
+ .cdk-overlay-container .mat-mdc-snack-bar-container.acontplus-snackbar {
18
+ border-radius: 8px !important;
19
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
20
+ font-family: inherit !important;
21
+ min-width: 300px !important;
22
+ position: relative !important;
23
+ overflow: hidden !important;
24
+ }
25
+
26
+ .cdk-overlay-container .acontplus-snackbar .mat-mdc-snack-bar-container {
27
+ border-radius: 8px !important;
28
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
29
+ font-family: inherit !important;
30
+ min-width: 300px !important;
31
+ position: relative !important;
32
+ overflow: hidden !important;
33
+ }
34
+
35
+ /* Success Snackbar - Maximum specificity */
36
+ .cdk-overlay-container
37
+ .cdk-overlay-pane
38
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-success {
39
+ background-color: #4caf50 !important;
40
+ color: white !important;
41
+
42
+ .mdc-snackbar__surface {
43
+ background-color: #4caf50 !important;
44
+ color: white !important;
45
+ }
46
+
47
+ .mdc-snackbar__label,
48
+ .mat-mdc-snack-bar-label {
49
+ color: white !important;
50
+ }
51
+
52
+ .snackbar-action,
53
+ .mat-mdc-snack-bar-action,
54
+ .mat-mdc-button {
55
+ color: rgba(255, 255, 255, 0.9) !important;
56
+
57
+ &:hover {
58
+ background-color: rgba(255, 255, 255, 0.1) !important;
59
+ }
60
+ }
61
+ }
62
+
63
+ /* Error Snackbar - Maximum specificity */
64
+ .cdk-overlay-container
65
+ .cdk-overlay-pane
66
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-error {
67
+ background-color: #f44336 !important;
68
+ color: white !important;
69
+
70
+ .mdc-snackbar__surface {
71
+ background-color: #f44336 !important;
72
+ color: white !important;
73
+ }
74
+
75
+ .mdc-snackbar__label,
76
+ .mat-mdc-snack-bar-label {
77
+ color: white !important;
78
+ }
79
+
80
+ .snackbar-action,
81
+ .mat-mdc-snack-bar-action,
82
+ .mat-mdc-button {
83
+ color: rgba(255, 255, 255, 0.9) !important;
84
+
85
+ &:hover {
86
+ background-color: rgba(255, 255, 255, 0.1) !important;
87
+ }
88
+ }
89
+ }
90
+
91
+ /* Warning Snackbar - Maximum specificity */
92
+ .cdk-overlay-container
93
+ .cdk-overlay-pane
94
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-warning {
95
+ background-color: #ff9800 !important;
96
+ color: white !important;
97
+
98
+ .mdc-snackbar__surface {
99
+ background-color: #ff9800 !important;
100
+ color: white !important;
101
+ }
102
+
103
+ .mdc-snackbar__label,
104
+ .mat-mdc-snack-bar-label {
105
+ color: white !important;
106
+ }
107
+
108
+ .snackbar-action,
109
+ .mat-mdc-snack-bar-action,
110
+ .mat-mdc-button {
111
+ color: rgba(255, 255, 255, 0.9) !important;
112
+
113
+ &:hover {
114
+ background-color: rgba(255, 255, 255, 0.1) !important;
115
+ }
116
+ }
117
+ }
118
+
119
+ /* Info Snackbar - Maximum specificity */
120
+ .cdk-overlay-container
121
+ .cdk-overlay-pane
122
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-info {
123
+ background-color: #2196f3 !important;
124
+ color: white !important;
125
+
126
+ .mdc-snackbar__surface {
127
+ background-color: #2196f3 !important;
128
+ color: white !important;
129
+ }
130
+
131
+ .mdc-snackbar__label,
132
+ .mat-mdc-snack-bar-label {
133
+ color: white !important;
134
+ }
135
+
136
+ .snackbar-action,
137
+ .mat-mdc-snack-bar-action,
138
+ .mat-mdc-button {
139
+ color: rgba(255, 255, 255, 0.9) !important;
140
+
141
+ &:hover {
142
+ background-color: rgba(255, 255, 255, 0.1) !important;
143
+ }
144
+ }
145
+ }
146
+
147
+ /* Ensure icon colors are visible with maximum specificity */
148
+ .cdk-overlay-container
149
+ .cdk-overlay-pane
150
+ .mat-mdc-snack-bar-container.acontplus-snackbar-success
151
+ .snackbar-icon
152
+ mat-icon {
153
+ color: rgba(255, 255, 255, 0.9) !important;
154
+ }
155
+
156
+ .cdk-overlay-container
157
+ .cdk-overlay-pane
158
+ .mat-mdc-snack-bar-container.acontplus-snackbar-error
159
+ .snackbar-icon
160
+ mat-icon {
161
+ color: rgba(255, 255, 255, 0.9) !important;
162
+ }
163
+
164
+ .cdk-overlay-container
165
+ .cdk-overlay-pane
166
+ .mat-mdc-snack-bar-container.acontplus-snackbar-warning
167
+ .snackbar-icon
168
+ mat-icon {
169
+ color: rgba(255, 255, 255, 0.9) !important;
170
+ }
171
+
172
+ .cdk-overlay-container
173
+ .cdk-overlay-pane
174
+ .mat-mdc-snack-bar-container.acontplus-snackbar-info
175
+ .snackbar-icon
176
+ mat-icon {
177
+ color: rgba(255, 255, 255, 0.9) !important;
178
+ }
179
+
180
+ /* Dark theme support with maximum specificity */
181
+ @media (prefers-color-scheme: dark) {
182
+ .cdk-overlay-container
183
+ .cdk-overlay-pane
184
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-success {
185
+ background-color: #388e3c !important;
186
+
187
+ .mdc-snackbar__surface {
188
+ background-color: #388e3c !important;
189
+ }
190
+ }
191
+
192
+ .cdk-overlay-container
193
+ .cdk-overlay-pane
194
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-error {
195
+ background-color: #d32f2f !important;
196
+
197
+ .mdc-snackbar__surface {
198
+ background-color: #d32f2f !important;
199
+ }
200
+ }
201
+
202
+ .cdk-overlay-container
203
+ .cdk-overlay-pane
204
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-warning {
205
+ background-color: #f57c00 !important;
206
+
207
+ .mdc-snackbar__surface {
208
+ background-color: #f57c00 !important;
209
+ }
210
+ }
211
+
212
+ .cdk-overlay-container
213
+ .cdk-overlay-pane
214
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-info {
215
+ background-color: #1976d2 !important;
216
+
217
+ .mdc-snackbar__surface {
218
+ background-color: #1976d2 !important;
219
+ }
220
+ }
221
+ }
222
+
223
+ /* High contrast mode support */
224
+ @media (prefers-contrast: high) {
225
+ .cdk-overlay-container .cdk-overlay-pane .mat-mdc-snack-bar-container.acontplus-snackbar {
226
+ border: 2px solid currentColor !important;
227
+ }
228
+ }
229
+
230
+ /* Reduced motion support */
231
+ @media (prefers-reduced-motion: reduce) {
232
+ .cdk-overlay-container .cdk-overlay-pane .mat-mdc-snack-bar-container.acontplus-snackbar {
233
+ transition: none !important;
234
+ }
235
+ }
236
+
237
+ /* Additional fallback rules for broader compatibility */
238
+
239
+ /* Success - Additional selectors */
240
+ .cdk-overlay-container .mat-mdc-snack-bar-container.acontplus-snackbar-success {
241
+ background-color: #4caf50 !important;
242
+ color: white !important;
243
+ }
244
+
245
+ .cdk-overlay-container .acontplus-snackbar-success .mat-mdc-snack-bar-container {
246
+ background-color: #4caf50 !important;
247
+ color: white !important;
248
+ }
249
+
250
+ /* Error - Additional selectors */
251
+ .cdk-overlay-container .mat-mdc-snack-bar-container.acontplus-snackbar-error {
252
+ background-color: #f44336 !important;
253
+ color: white !important;
254
+ }
255
+
256
+ .cdk-overlay-container .acontplus-snackbar-error .mat-mdc-snack-bar-container {
257
+ background-color: #f44336 !important;
258
+ color: white !important;
259
+ }
260
+
261
+ /* Warning - Additional selectors */
262
+ .cdk-overlay-container .mat-mdc-snack-bar-container.acontplus-snackbar-warning {
263
+ background-color: #ff9800 !important;
264
+ color: white !important;
265
+ }
266
+
267
+ .cdk-overlay-container .acontplus-snackbar-warning .mat-mdc-snack-bar-container {
268
+ background-color: #ff9800 !important;
269
+ color: white !important;
270
+ }
271
+
272
+ /* Info - Additional selectors */
273
+ .cdk-overlay-container .mat-mdc-snack-bar-container.acontplus-snackbar-info {
274
+ background-color: #2196f3 !important;
275
+ color: white !important;
276
+ }
277
+
278
+ .cdk-overlay-container .acontplus-snackbar-info .mat-mdc-snack-bar-container {
279
+ background-color: #2196f3 !important;
280
+ color: white !important;
281
+ }
282
+
283
+ /* Force override any Material theme colors */
284
+ .cdk-overlay-container [class*='acontplus-snackbar-'] {
285
+ .mat-mdc-snack-bar-container {
286
+ background: inherit !important;
287
+ color: inherit !important;
288
+ }
289
+
290
+ .mdc-snackbar__surface {
291
+ background: inherit !important;
292
+ color: inherit !important;
293
+ }
294
+
295
+ .mdc-snackbar__label,
296
+ .mat-mdc-snack-bar-label {
297
+ color: inherit !important;
298
+ }
299
+ }