d9-toast 2.5.40 → 2.5.41

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/dist/Toast.js CHANGED
@@ -76,8 +76,8 @@ var Toast = function Toast(_ref) {
76
76
  // exit animation [reverse direction]
77
77
  var baseExit = isTop ? EXIT_ANIMATIONS.top : isBottom ? EXIT_ANIMATIONS.bottom : EXIT_ANIMATIONS.center;
78
78
  return {
79
- enterAnim: "".concat(baseEnter, " 750ms cubic-bezier(0.165, 0.84, 0.44, 1)"),
80
- exitAnim: "".concat(baseExit, " 750ms cubic-bezier(0.165, 0.84, 0.44, 1)")
79
+ enterAnim: "".concat(baseEnter, " 450ms cubic-bezier(0.165, 0.84, 0.44, 1)"),
80
+ exitAnim: "".concat(baseExit, " 300ms cubic-bezier(0.165, 0.84, 0.44, 1)")
81
81
  };
82
82
  }, [position]),
83
83
  enterAnim = _useMemo.enterAnim,
@@ -218,7 +218,8 @@ var Toast = function Toast(_ref) {
218
218
  className: "progress-container ".concat(type),
219
219
  style: {
220
220
  opacity: progress ? 1 : 0,
221
- height: progress ? "4px" : "0px"
221
+ height: progress ? "4px" : "0px",
222
+ transition: "opacity 0.2s ease"
222
223
  },
223
224
  children: /*#__PURE__*/_jsx("div", {
224
225
  className: "toast-progress ".concat(type),
package/dist/toast.css CHANGED
@@ -26,7 +26,6 @@
26
26
 
27
27
  --line-height-base: 1.5;
28
28
  --font-size-base: 14px;
29
-
30
29
  }
31
30
 
32
31
  /* Theme colors */
@@ -50,7 +49,6 @@
50
49
  --loading-bg: rgba(106, 31, 176, 0.1);
51
50
 
52
51
  --border-color: lch(91.6% 2.18 271.57);
53
-
54
52
  }
55
53
 
56
54
  .d9-toast.dark {
@@ -73,7 +71,6 @@
73
71
  --loading-bg: #ab4fff25;
74
72
 
75
73
  --border-color: #ffffff15;
76
-
77
74
  }
78
75
 
79
76
  /* Defaults */
@@ -149,14 +146,15 @@
149
146
  }
150
147
  .toastWrapper {
151
148
  width: 100%;
152
- transition: all 0.2s ease;
149
+ transition: transform 400ms cubic-bezier(0.165, 0.84, 0.44, 1),
150
+ margin 400ms cubic-bezier(0.165, 0.84, 0.44, 1);
153
151
  pointer-events: none;
154
152
  }
155
153
 
156
154
  /* Expanded mode */
157
155
  .toastWrapper.expanded {
158
156
  position: relative;
159
- margin-bottom: 4px;
157
+ margin-bottom: 8px;
160
158
  }
161
159
 
162
160
  /* Stacked mode */
@@ -183,13 +181,24 @@
183
181
  font-size: var(--font-size-base);
184
182
  line-height: var(--line-height-base);
185
183
  text-align: start;
186
- font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
187
- Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
184
+ font-family:
185
+ system-ui,
186
+ -apple-system,
187
+ BlinkMacSystemFont,
188
+ "Segoe UI",
189
+ Roboto,
190
+ Oxygen,
191
+ Ubuntu,
192
+ Cantarell,
193
+ "Open Sans",
194
+ "Helvetica Neue",
195
+ sans-serif;
188
196
  will-change: transform, opacity;
189
197
  background-color: var(--primary-bg);
190
198
  color: var(--primary-color);
191
199
  border: 1px solid var(--border-color);
192
- transition: transform 650ms cubic-bezier(0.165, 0.84, 0.44, 1),
200
+ transition:
201
+ transform 650ms cubic-bezier(0.165, 0.84, 0.44, 1),
193
202
  opacity 300ms ease;
194
203
  pointer-events: auto;
195
204
  }
@@ -396,11 +405,12 @@
396
405
  }
397
406
 
398
407
  .toast-progress {
399
- height: 0.25rem;
400
- background-color: transparent;
408
+ height: 100%;
409
+ width: 100%;
401
410
  animation-name: shrinkProgress;
402
411
  animation-timing-function: linear;
403
412
  animation-fill-mode: forwards;
413
+ will-change: transform;
404
414
  }
405
415
 
406
416
  .toast-progress.default {
@@ -426,8 +436,8 @@
426
436
  /* Animate keyframes */
427
437
  @keyframes upToDown {
428
438
  from {
429
- opacity: 0.6;
430
- transform: translateY(-60px);
439
+ opacity: 0;
440
+ transform: translateY(-28px);
431
441
  }
432
442
  to {
433
443
  opacity: 1;
@@ -437,8 +447,8 @@
437
447
 
438
448
  @keyframes downToUp {
439
449
  from {
440
- opacity: 0.6;
441
- transform: translateY(60px);
450
+ opacity: 0;
451
+ transform: translateY(28px);
442
452
  }
443
453
  to {
444
454
  opacity: 1;
@@ -461,22 +471,22 @@
461
471
  @keyframes upToDownExit {
462
472
  from {
463
473
  opacity: 1;
464
- transform: translateY(0);
474
+ transform: translateY(0) scale(1);
465
475
  }
466
476
  to {
467
- opacity: 0.8;
468
- transform: translateY(60px);
477
+ opacity: 0.85;
478
+ transform: translateY(28px) scale(0.9);
469
479
  }
470
480
  }
471
481
 
472
482
  @keyframes downToUpExit {
473
483
  from {
474
484
  opacity: 1;
475
- transform: translateY(0);
485
+ transform: translateY(0) scale(1);
476
486
  }
477
487
  to {
478
- opacity: 0.8;
479
- transform: translateY(-60px);
488
+ opacity: 0.85;
489
+ transform: translateY(-28px) scale(0.9);
480
490
  }
481
491
  }
482
492
 
@@ -486,24 +496,24 @@
486
496
  transform: scale(1);
487
497
  }
488
498
  to {
489
- opacity: 0.8;
490
- transform: scale(0.6);
499
+ opacity: 0.85;
500
+ transform: scale(0.7);
491
501
  }
492
502
  }
493
503
 
494
504
  @keyframes shrinkProgress {
495
505
  from {
496
- width: 100%;
506
+ transform: scaleX(1);
497
507
  }
498
508
  to {
499
- width: 0%;
509
+ transform: scaleX(0);
500
510
  }
501
511
  }
502
512
 
503
513
  @media (prefers-reduced-motion: reduce) {
504
514
  .toast {
505
- animation: none !important;
506
- transition: none !important;
515
+ animation-duration: 1ms;
516
+ transition-duration: 1ms;
507
517
  }
508
518
  }
509
519
 
@@ -516,4 +526,4 @@
516
526
  .toastViewport.bottom-left {
517
527
  left: 0px;
518
528
  }
519
- }
529
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "d9-toast",
3
- "version": "2.5.40",
3
+ "version": "2.5.41",
4
4
  "description": "Customizable toast notifications for React",
5
5
  "homepage": "https://psathul073.github.io/d9-toast-docs/",
6
6
  "repository": {