@enigmax/primitives 0.20.0 → 0.22.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.
@@ -0,0 +1,738 @@
1
+ /**
2
+ * The toast stylesheet, VERBATIM.
3
+ *
4
+ * It is a string rather than a `.css` file because the component injects it: a toast renders
5
+ * at the edge of the screen, stacked and animated, so a consumer who forgets an import does
6
+ * not get an unstyled toast - they get a pile of text in a corner. `<Toaster styles={false} />`
7
+ * turns the injection off, and `@enigmax/primitives/toast.css` is this same sheet for anyone
8
+ * who would rather import it.
9
+ *
10
+ * Do not edit this by hand: `scripts/sync-recipes.mjs` writes `recipes/toast/styles.css`
11
+ * from it, so the injected sheet and the imported one cannot drift apart.
12
+ */
13
+ export const TOAST_STYLES = `:where(html[dir="ltr"]),
14
+ :where([data-toastcmp-toaster][dir="ltr"]) {
15
+ --toast-icon-margin-start: -3px;
16
+ --toast-icon-margin-end: 4px;
17
+ --toast-svg-margin-start: -1px;
18
+ --toast-svg-margin-end: 0px;
19
+ --toast-button-margin-start: auto;
20
+ --toast-button-margin-end: 0;
21
+ --toast-close-button-start: 0;
22
+ --toast-close-button-end: unset;
23
+ --toast-close-button-transform: translate(-35%, -35%);
24
+ }
25
+
26
+ :where(html[dir="rtl"]),
27
+ :where([data-toastcmp-toaster][dir="rtl"]) {
28
+ --toast-icon-margin-start: 4px;
29
+ --toast-icon-margin-end: -3px;
30
+ --toast-svg-margin-start: 0px;
31
+ --toast-svg-margin-end: -1px;
32
+ --toast-button-margin-start: 0;
33
+ --toast-button-margin-end: auto;
34
+ --toast-close-button-start: unset;
35
+ --toast-close-button-end: 0;
36
+ --toast-close-button-transform: translate(35%, -35%);
37
+ }
38
+
39
+ :where([data-toastcmp-toaster]) {
40
+ position: fixed;
41
+ width: var(--width);
42
+ font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial,
43
+ Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
44
+ --gray1: hsl(0, 0%, 99%);
45
+ --gray2: hsl(0, 0%, 97.3%);
46
+ --gray3: hsl(0, 0%, 95.1%);
47
+ --gray4: hsl(0, 0%, 93%);
48
+ --gray5: hsl(0, 0%, 90.9%);
49
+ --gray6: hsl(0, 0%, 88.7%);
50
+ --gray7: hsl(0, 0%, 85.8%);
51
+ --gray8: hsl(0, 0%, 78%);
52
+ --gray9: hsl(0, 0%, 56.1%);
53
+ --gray10: hsl(0, 0%, 52.3%);
54
+ --gray11: hsl(0, 0%, 43.5%);
55
+ --gray12: hsl(0, 0%, 9%);
56
+ --border-radius: 8px;
57
+ box-sizing: border-box;
58
+ padding: 0;
59
+ margin: 0;
60
+ list-style: none;
61
+ outline: none;
62
+ z-index: 999999999;
63
+ transition: transform 400ms ease;
64
+ }
65
+
66
+ :where([data-toastcmp-toaster][data-lifted="true"]) {
67
+ transform: translateY(-10px);
68
+ }
69
+
70
+ @media (hover: none) and (pointer: coarse) {
71
+ :where([data-toastcmp-toaster][data-lifted="true"]) {
72
+ transform: none;
73
+ }
74
+ }
75
+
76
+ :where([data-toastcmp-toaster][data-x-position="right"]) {
77
+ right: var(--offset-right);
78
+ }
79
+
80
+ :where([data-toastcmp-toaster][data-x-position="left"]) {
81
+ left: var(--offset-left);
82
+ }
83
+
84
+ :where([data-toastcmp-toaster][data-x-position="center"]) {
85
+ left: 50%;
86
+ transform: translateX(-50%);
87
+ }
88
+
89
+ :where([data-toastcmp-toaster][data-y-position="top"]) {
90
+ top: var(--offset-top);
91
+ }
92
+
93
+ :where([data-toastcmp-toaster][data-y-position="bottom"]) {
94
+ bottom: var(--offset-bottom);
95
+ }
96
+
97
+ :where([data-toastcmp-toast]) {
98
+ --y: translateY(100%);
99
+ --lift-amount: calc(var(--lift) * var(--gap));
100
+ z-index: var(--z-index);
101
+ position: absolute;
102
+ opacity: 0;
103
+ transform: var(--y);
104
+ filter: blur(0);
105
+ /* https://stackoverflow.com/questions/48124372/pointermove-event-not-working-with-touch-why-not */
106
+ touch-action: none;
107
+ transition: transform 400ms, opacity 400ms, height 400ms, box-shadow 200ms;
108
+ box-sizing: border-box;
109
+ outline: none;
110
+ overflow-wrap: anywhere;
111
+ }
112
+
113
+ :where([data-toastcmp-toast][data-styled="true"]) {
114
+ padding: 16px;
115
+ background: var(--normal-bg);
116
+ border: 1px solid var(--normal-border);
117
+ color: var(--normal-text);
118
+ border-radius: var(--border-radius);
119
+ box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
120
+ width: var(--width);
121
+ font-size: 13px;
122
+ display: flex;
123
+ align-items: center;
124
+ gap: 6px;
125
+ }
126
+
127
+ :where([data-toastcmp-toast]:focus-visible) {
128
+ box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.2);
129
+ }
130
+
131
+ :where([data-toastcmp-toast][data-y-position="top"]) {
132
+ top: 0;
133
+ --y: translateY(-100%);
134
+ --lift: 1;
135
+ --lift-amount: calc(1 * var(--gap));
136
+ }
137
+
138
+ :where([data-toastcmp-toast][data-y-position="bottom"]) {
139
+ bottom: 0;
140
+ --y: translateY(100%);
141
+ --lift: -1;
142
+ --lift-amount: calc(var(--lift) * var(--gap));
143
+ }
144
+
145
+ :where([data-toastcmp-toast]) :where([data-description]) {
146
+ font-weight: 400;
147
+ line-height: 1.4;
148
+ color: inherit;
149
+ }
150
+
151
+ :where([data-toastcmp-toast]) :where([data-title]) {
152
+ font-weight: 500;
153
+ line-height: 1.5;
154
+ color: inherit;
155
+ }
156
+
157
+ :where([data-toastcmp-toast]) :where([data-icon]) {
158
+ display: flex;
159
+ height: 16px;
160
+ width: 16px;
161
+ position: relative;
162
+ justify-content: flex-start;
163
+ align-items: center;
164
+ flex-shrink: 0;
165
+ margin-left: var(--toast-icon-margin-start);
166
+ margin-right: var(--toast-icon-margin-end);
167
+ }
168
+
169
+ :where([data-toastcmp-toast][data-promise="true"]) :where([data-icon])>svg {
170
+ opacity: 0;
171
+ transform: scale(0.8);
172
+ transform-origin: center;
173
+ animation: toastcmp-fade-in 300ms ease forwards;
174
+ }
175
+
176
+ :where([data-toastcmp-toast]) :where([data-icon])>* {
177
+ flex-shrink: 0;
178
+ }
179
+
180
+ :where([data-toastcmp-toast]) :where([data-icon]) svg {
181
+ margin-left: var(--toast-svg-margin-start);
182
+ margin-right: var(--toast-svg-margin-end);
183
+ }
184
+
185
+ :where([data-toastcmp-toast]) :where([data-content]) {
186
+ display: flex;
187
+ flex-direction: column;
188
+ gap: 2px;
189
+ }
190
+
191
+ [data-toastcmp-toast][data-styled="true"] [data-button] {
192
+ border-radius: 4px;
193
+ padding-left: 8px;
194
+ padding-right: 8px;
195
+ height: 24px;
196
+ font-size: 12px;
197
+ color: var(--normal-bg);
198
+ background: var(--normal-text);
199
+ margin-left: var(--toast-button-margin-start);
200
+ margin-right: var(--toast-button-margin-end);
201
+ border: none;
202
+ cursor: pointer;
203
+ outline: none;
204
+ display: flex;
205
+ align-items: center;
206
+ flex-shrink: 0;
207
+ transition: opacity 400ms, box-shadow 200ms;
208
+ }
209
+
210
+ :where([data-toastcmp-toast]) :where([data-button]):focus-visible {
211
+ box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4);
212
+ }
213
+
214
+ :where([data-toastcmp-toast]) :where([data-button]):first-of-type {
215
+ margin-left: var(--toast-button-margin-start);
216
+ margin-right: var(--toast-button-margin-end);
217
+ }
218
+
219
+ :where([data-toastcmp-toast]) :where([data-cancel]) {
220
+ color: var(--normal-text);
221
+ background: rgba(0, 0, 0, 0.08);
222
+ }
223
+
224
+ :where([data-toastcmp-toast][data-theme="dark"]) :where([data-cancel]) {
225
+ background: rgba(255, 255, 255, 0.3);
226
+ }
227
+
228
+ :where([data-toastcmp-toast]) :where([data-close-button]) {
229
+ position: absolute;
230
+ left: var(--toast-close-button-start);
231
+ right: var(--toast-close-button-end);
232
+ top: 0;
233
+ height: 20px;
234
+ width: 20px;
235
+ display: flex;
236
+ justify-content: center;
237
+ align-items: center;
238
+ padding: 0;
239
+ color: var(--gray12);
240
+ border: 1px solid var(--gray4);
241
+ transform: var(--toast-close-button-transform);
242
+ border-radius: 50%;
243
+ cursor: pointer;
244
+ z-index: 1;
245
+ transition: opacity 100ms, background 200ms, border-color 200ms;
246
+ }
247
+
248
+ [data-toastcmp-toast] [data-close-button] {
249
+ background: var(--gray1);
250
+ }
251
+
252
+ :where([data-toastcmp-toast]) :where([data-close-button]):focus-visible {
253
+ box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 2px rgba(0, 0, 0, 0.2);
254
+ }
255
+
256
+ :where([data-toastcmp-toast]) :where([data-disabled="true"]) {
257
+ cursor: not-allowed;
258
+ }
259
+
260
+ :where([data-toastcmp-toast]):hover :where([data-close-button]):hover {
261
+ background: var(--gray2);
262
+ border-color: var(--gray5);
263
+ }
264
+
265
+ /* Leave a ghost div to avoid setting hover to false when swiping out */
266
+ :where([data-toastcmp-toast][data-swiping="true"])::before {
267
+ content: "";
268
+ position: absolute;
269
+ left: -50%;
270
+ right: -50%;
271
+ height: 100%;
272
+ z-index: -1;
273
+ }
274
+
275
+ :where([data-toastcmp-toast][data-y-position="top"][data-swiping="true"])::before {
276
+ /* y 50% needed to distribute height additional height evenly */
277
+ bottom: 50%;
278
+ transform: scaleY(3) translateY(50%);
279
+ }
280
+
281
+ :where([data-toastcmp-toast][data-y-position="bottom"][data-swiping="true"])::before {
282
+ /* y -50% needed to distribute height additional height evenly */
283
+ top: 50%;
284
+ transform: scaleY(3) translateY(-50%);
285
+ }
286
+
287
+ /* Leave a ghost div to avoid setting hover to false when transitioning out */
288
+ :where([data-toastcmp-toast][data-swiping="false"][data-removed="true"])::before {
289
+ content: "";
290
+ position: absolute;
291
+ inset: 0;
292
+ transform: scaleY(2);
293
+ }
294
+
295
+ /* Needed to avoid setting hover to false when inbetween toasts */
296
+ :where([data-toastcmp-toast])::after {
297
+ content: "";
298
+ position: absolute;
299
+ left: 0;
300
+ height: calc(var(--gap) + 1px);
301
+ bottom: 100%;
302
+ width: 100%;
303
+ }
304
+
305
+ :where([data-toastcmp-toast][data-mounted="true"]) {
306
+ --y: translateY(0);
307
+ opacity: 1;
308
+ }
309
+
310
+ :where([data-toastcmp-toast][data-expanded="false"][data-front="false"]) {
311
+ --scale: var(--toasts-before) * 0.05 + 1;
312
+ --y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));
313
+ height: var(--front-toast-height);
314
+ }
315
+
316
+ :where([data-toastcmp-toast])>* {
317
+ transition: opacity 400ms;
318
+ }
319
+
320
+ :where([data-toastcmp-toast][data-expanded="false"][data-front="false"][data-styled="true"])>* {
321
+ opacity: 0;
322
+ }
323
+
324
+ :where([data-toastcmp-toast][data-visible="false"]) {
325
+ opacity: 0;
326
+ pointer-events: none;
327
+ }
328
+
329
+ :where([data-toastcmp-toast][data-mounted="true"][data-expanded="true"]) {
330
+ --y: translateY(calc(var(--lift) * var(--offset)));
331
+ height: var(--initial-height);
332
+ }
333
+
334
+ :where([data-toastcmp-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]) {
335
+ --y: translateY(calc(var(--lift) * -100%));
336
+ opacity: 0;
337
+ }
338
+
339
+ :where([data-toastcmp-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]) {
340
+ --y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));
341
+ opacity: 0;
342
+ }
343
+
344
+ :where([data-toastcmp-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]) {
345
+ --y: translateY(40%);
346
+ opacity: 0;
347
+ transition: transform 500ms, opacity 200ms;
348
+ }
349
+
350
+ /* Bump up the height to make sure hover state doesn"t get set to false */
351
+ :where([data-toastcmp-toast][data-removed="true"][data-front="false"])::before {
352
+ height: calc(var(--initial-height) + 20%);
353
+ }
354
+
355
+ [data-toastcmp-toast][data-swiping="true"] {
356
+ transform: var(--y) translateY(var(--swipe-amount-y, 0px)) translateX(var(--swipe-amount-x, 0px));
357
+ transition: none;
358
+ }
359
+
360
+ [data-toastcmp-toast][data-swiped="true"] {
361
+ user-select: none;
362
+ }
363
+
364
+ [data-toastcmp-toast][data-swipe-out="true"][data-y-position="bottom"],
365
+ [data-toastcmp-toast][data-swipe-out="true"][data-y-position="top"] {
366
+ animation-duration: 200ms;
367
+ animation-timing-function: ease-out;
368
+ animation-fill-mode: forwards;
369
+ }
370
+
371
+ [data-toastcmp-toast][data-swipe-out="true"][data-swipe-direction="left"] {
372
+ animation-name: swipe-out-left;
373
+ }
374
+
375
+ [data-toastcmp-toast][data-swipe-out="true"][data-swipe-direction="right"] {
376
+ animation-name: swipe-out-right;
377
+ }
378
+
379
+ [data-toastcmp-toast][data-swipe-out="true"][data-swipe-direction="up"] {
380
+ animation-name: swipe-out-up;
381
+ }
382
+
383
+ [data-toastcmp-toast][data-swipe-out="true"][data-swipe-direction="down"] {
384
+ animation-name: swipe-out-down;
385
+ }
386
+
387
+ @keyframes swipe-out-left {
388
+ from {
389
+ transform: var(--y) translateX(var(--swipe-amount-x));
390
+ opacity: 1;
391
+ }
392
+
393
+ to {
394
+ transform: var(--y) translateX(calc(var(--swipe-amount-x) - 100%));
395
+ opacity: 0;
396
+ }
397
+ }
398
+
399
+ @keyframes swipe-out-right {
400
+ from {
401
+ transform: var(--y) translateX(var(--swipe-amount-x));
402
+ opacity: 1;
403
+ }
404
+
405
+ to {
406
+ transform: var(--y) translateX(calc(var(--swipe-amount-x) + 100%));
407
+ opacity: 0;
408
+ }
409
+ }
410
+
411
+ @keyframes swipe-out-up {
412
+ from {
413
+ transform: var(--y) translateY(var(--swipe-amount-y));
414
+ opacity: 1;
415
+ }
416
+
417
+ to {
418
+ transform: var(--y) translateY(calc(var(--swipe-amount-y) - 100%));
419
+ opacity: 0;
420
+ }
421
+ }
422
+
423
+ @keyframes swipe-out-down {
424
+ from {
425
+ transform: var(--y) translateY(var(--swipe-amount-y));
426
+ opacity: 1;
427
+ }
428
+
429
+ to {
430
+ transform: var(--y) translateY(calc(var(--swipe-amount-y) + 100%));
431
+ opacity: 0;
432
+ }
433
+ }
434
+
435
+ @media (max-width: 600px) {
436
+ [data-toastcmp-toaster] {
437
+ position: fixed;
438
+ right: var(--mobile-offset-right);
439
+ left: var(--mobile-offset-left);
440
+ width: 100%;
441
+ }
442
+
443
+ [data-toastcmp-toaster][dir="rtl"] {
444
+ left: calc(var(--mobile-offset-left) * -1);
445
+ }
446
+
447
+ [data-toastcmp-toaster] [data-toastcmp-toast] {
448
+ left: 0;
449
+ right: 0;
450
+ width: calc(100% - var(--mobile-offset-left) * 2);
451
+ }
452
+
453
+ [data-toastcmp-toaster][data-x-position="left"] {
454
+ left: var(--mobile-offset-left);
455
+ }
456
+
457
+ [data-toastcmp-toaster][data-y-position="bottom"] {
458
+ bottom: var(--mobile-offset-bottom);
459
+ }
460
+
461
+ [data-toastcmp-toaster][data-y-position="top"] {
462
+ top: var(--mobile-offset-top);
463
+ }
464
+
465
+ [data-toastcmp-toaster][data-x-position="center"] {
466
+ left: var(--mobile-offset-left);
467
+ right: var(--mobile-offset-right);
468
+ transform: none;
469
+ }
470
+ }
471
+
472
+ [data-toastcmp-toaster][data-theme="light"] {
473
+ --normal-bg: #fff;
474
+ --normal-border: var(--gray4);
475
+ --normal-text: var(--gray12);
476
+
477
+ --success-bg: hsl(143, 85%, 96%);
478
+ --success-border: hsl(145, 92%, 91%);
479
+ --success-text: hsl(140, 100%, 27%);
480
+
481
+ --info-bg: hsl(208, 100%, 97%);
482
+ --info-border: hsl(221, 91%, 91%);
483
+ --info-text: hsl(210, 92%, 45%);
484
+
485
+ --warning-bg: hsl(49, 100%, 97%);
486
+ --warning-border: hsl(49, 91%, 91%);
487
+ --warning-text: hsl(31, 92%, 45%);
488
+
489
+ --error-bg: hsl(359, 100%, 97%);
490
+ --error-border: hsl(359, 100%, 94%);
491
+ --error-text: hsl(360, 100%, 45%);
492
+ }
493
+
494
+ [data-toastcmp-toaster][data-theme="light"] [data-toastcmp-toast][data-invert="true"] {
495
+ --normal-bg: #000;
496
+ --normal-border: hsl(0, 0%, 20%);
497
+ --normal-text: var(--gray1);
498
+ }
499
+
500
+ [data-toastcmp-toaster][data-theme="dark"] [data-toastcmp-toast][data-invert="true"] {
501
+ --normal-bg: #fff;
502
+ --normal-border: var(--gray3);
503
+ --normal-text: var(--gray12);
504
+ }
505
+
506
+ [data-toastcmp-toaster][data-theme="dark"] {
507
+ --normal-bg: #000;
508
+ --normal-bg-hover: hsl(0, 0%, 12%);
509
+ --normal-border: hsl(0, 0%, 20%);
510
+ --normal-border-hover: hsl(0, 0%, 25%);
511
+ --normal-text: var(--gray1);
512
+
513
+ --success-bg: hsl(150, 100%, 6%);
514
+ --success-border: hsl(147, 100%, 12%);
515
+ --success-text: hsl(150, 86%, 65%);
516
+
517
+ --info-bg: hsl(215, 100%, 6%);
518
+ --info-border: hsl(223, 100%, 12%);
519
+ --info-text: hsl(216, 87%, 65%);
520
+
521
+ --warning-bg: hsl(64, 100%, 6%);
522
+ --warning-border: hsl(60, 100%, 12%);
523
+ --warning-text: hsl(46, 87%, 65%);
524
+
525
+ --error-bg: hsl(358, 76%, 10%);
526
+ --error-border: hsl(357, 89%, 16%);
527
+ --error-text: hsl(358, 100%, 81%);
528
+ }
529
+
530
+ [data-toastcmp-toaster][data-theme="dark"] [data-toastcmp-toast] [data-close-button] {
531
+ background: var(--normal-bg);
532
+ border-color: var(--normal-border);
533
+ color: var(--normal-text);
534
+ }
535
+
536
+ [data-toastcmp-toaster][data-theme="dark"] [data-toastcmp-toast] [data-close-button]:hover {
537
+ background: var(--normal-bg-hover);
538
+ border-color: var(--normal-border-hover);
539
+ }
540
+
541
+ [data-rich-colors="true"][data-toastcmp-toast][data-type="success"] {
542
+ background: var(--success-bg);
543
+ border-color: var(--success-border);
544
+ color: var(--success-text);
545
+ }
546
+
547
+ [data-rich-colors="true"][data-toastcmp-toast][data-type="success"] [data-close-button] {
548
+ background: var(--success-bg);
549
+ border-color: var(--success-border);
550
+ color: var(--success-text);
551
+ }
552
+
553
+ [data-rich-colors="true"][data-toastcmp-toast][data-type="info"] {
554
+ background: var(--info-bg);
555
+ border-color: var(--info-border);
556
+ color: var(--info-text);
557
+ }
558
+
559
+ [data-rich-colors="true"][data-toastcmp-toast][data-type="info"] [data-close-button] {
560
+ background: var(--info-bg);
561
+ border-color: var(--info-border);
562
+ color: var(--info-text);
563
+ }
564
+
565
+ [data-rich-colors="true"][data-toastcmp-toast][data-type="warning"] {
566
+ background: var(--warning-bg);
567
+ border-color: var(--warning-border);
568
+ color: var(--warning-text);
569
+ }
570
+
571
+ [data-rich-colors="true"][data-toastcmp-toast][data-type="warning"] [data-close-button] {
572
+ background: var(--warning-bg);
573
+ border-color: var(--warning-border);
574
+ color: var(--warning-text);
575
+ }
576
+
577
+ [data-rich-colors="true"][data-toastcmp-toast][data-type="error"] {
578
+ background: var(--error-bg);
579
+ border-color: var(--error-border);
580
+ color: var(--error-text);
581
+ }
582
+
583
+ [data-rich-colors="true"][data-toastcmp-toast][data-type="error"] [data-close-button] {
584
+ background: var(--error-bg);
585
+ border-color: var(--error-border);
586
+ color: var(--error-text);
587
+ }
588
+
589
+ .toastcmp-loading-wrapper {
590
+ --size: 16px;
591
+ height: var(--size);
592
+ width: var(--size);
593
+ position: absolute;
594
+ inset: 0;
595
+ z-index: 10;
596
+ }
597
+
598
+ .toastcmp-loading-wrapper[data-visible="false"] {
599
+ transform-origin: center;
600
+ animation: toastcmp-fade-out 0.2s ease forwards;
601
+ }
602
+
603
+ .toastcmp-spinner {
604
+ position: relative;
605
+ top: 50%;
606
+ left: 50%;
607
+ height: var(--size);
608
+ width: var(--size);
609
+ }
610
+
611
+ .toastcmp-loading-bar {
612
+ animation: toastcmp-spin 1.2s linear infinite;
613
+ background: var(--gray11);
614
+ border-radius: 6px;
615
+ height: 8%;
616
+ left: -10%;
617
+ position: absolute;
618
+ top: -3.9%;
619
+ width: 24%;
620
+ }
621
+
622
+ .toastcmp-loading-bar:nth-child(1) {
623
+ animation-delay: -1.2s;
624
+ transform: rotate(0.0001deg) translate(146%);
625
+ }
626
+
627
+ .toastcmp-loading-bar:nth-child(2) {
628
+ animation-delay: -1.1s;
629
+ transform: rotate(30deg) translate(146%);
630
+ }
631
+
632
+ .toastcmp-loading-bar:nth-child(3) {
633
+ animation-delay: -1s;
634
+ transform: rotate(60deg) translate(146%);
635
+ }
636
+
637
+ .toastcmp-loading-bar:nth-child(4) {
638
+ animation-delay: -0.9s;
639
+ transform: rotate(90deg) translate(146%);
640
+ }
641
+
642
+ .toastcmp-loading-bar:nth-child(5) {
643
+ animation-delay: -0.8s;
644
+ transform: rotate(120deg) translate(146%);
645
+ }
646
+
647
+ .toastcmp-loading-bar:nth-child(6) {
648
+ animation-delay: -0.7s;
649
+ transform: rotate(150deg) translate(146%);
650
+ }
651
+
652
+ .toastcmp-loading-bar:nth-child(7) {
653
+ animation-delay: -0.6s;
654
+ transform: rotate(180deg) translate(146%);
655
+ }
656
+
657
+ .toastcmp-loading-bar:nth-child(8) {
658
+ animation-delay: -0.5s;
659
+ transform: rotate(210deg) translate(146%);
660
+ }
661
+
662
+ .toastcmp-loading-bar:nth-child(9) {
663
+ animation-delay: -0.4s;
664
+ transform: rotate(240deg) translate(146%);
665
+ }
666
+
667
+ .toastcmp-loading-bar:nth-child(10) {
668
+ animation-delay: -0.3s;
669
+ transform: rotate(270deg) translate(146%);
670
+ }
671
+
672
+ .toastcmp-loading-bar:nth-child(11) {
673
+ animation-delay: -0.2s;
674
+ transform: rotate(300deg) translate(146%);
675
+ }
676
+
677
+ .toastcmp-loading-bar:nth-child(12) {
678
+ animation-delay: -0.1s;
679
+ transform: rotate(330deg) translate(146%);
680
+ }
681
+
682
+ @keyframes toastcmp-fade-in {
683
+ 0% {
684
+ opacity: 0;
685
+ transform: scale(0.8);
686
+ }
687
+
688
+ 100% {
689
+ opacity: 1;
690
+ transform: scale(1);
691
+ }
692
+ }
693
+
694
+ @keyframes toastcmp-fade-out {
695
+ 0% {
696
+ opacity: 1;
697
+ transform: scale(1);
698
+ }
699
+
700
+ 100% {
701
+ opacity: 0;
702
+ transform: scale(0.8);
703
+ }
704
+ }
705
+
706
+ @keyframes toastcmp-spin {
707
+ 0% {
708
+ opacity: 1;
709
+ }
710
+
711
+ 100% {
712
+ opacity: 0.15;
713
+ }
714
+ }
715
+
716
+ @media (prefers-reduced-motion) {
717
+
718
+ [data-toastcmp-toast],
719
+ [data-toastcmp-toast]>*,
720
+ .toastcmp-loading-bar {
721
+ transition: none !important;
722
+ animation: none !important;
723
+ }
724
+ }
725
+
726
+ .toastcmp-loader {
727
+ position: absolute;
728
+ top: 50%;
729
+ left: 50%;
730
+ transform: translate(-50%, -50%);
731
+ transform-origin: center;
732
+ transition: opacity 200ms, transform 200ms;
733
+ }
734
+
735
+ .toastcmp-loader[data-visible="false"] {
736
+ opacity: 0;
737
+ transform: scale(0.8) translate(-50%, -50%);
738
+ }`;