sweetalert2 11.3.8 → 11.4.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.
@@ -10,9 +10,9 @@
10
10
  left: 0;
11
11
  box-sizing: border-box;
12
12
  grid-template-areas:
13
- "top-start top top-end"
14
- "center-start center center-end"
15
- "bottom-start bottom-center bottom-end";
13
+ 'top-start top top-end'
14
+ 'center-start center center-end'
15
+ 'bottom-start bottom-center bottom-end';
16
16
  grid-template-rows: minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);
17
17
  height: 100%; // Safari
18
18
  padding: $swal2-container-padding;
@@ -177,7 +177,7 @@
177
177
  &:not(.swal2-loading) {
178
178
  .swal2-styled {
179
179
  &[disabled] {
180
- opacity: .4;
180
+ opacity: 0.4;
181
181
  }
182
182
 
183
183
  &:hover {
@@ -288,7 +288,6 @@
288
288
  bottom: 0;
289
289
  left: 0;
290
290
  grid-column: auto !important;
291
- height: $swal2-timer-progress-bar-height;
292
291
  overflow: hidden;
293
292
  border-bottom-right-radius: $swal2-border-radius;
294
293
  border-bottom-left-radius: $swal2-border-radius;
@@ -443,7 +442,7 @@
443
442
  .swal2-select {
444
443
  min-width: 50%;
445
444
  max-width: 100%;
446
- padding: .375em .625em;
445
+ padding: 0.375em 0.625em;
447
446
  background: $swal2-input-background;
448
447
  color: $swal2-input-color;
449
448
  font-size: $swal2-input-font-size;
@@ -457,13 +456,13 @@
457
456
  color: $swal2-input-color;
458
457
 
459
458
  label {
460
- margin: 0 .6em;
459
+ margin: 0 0.6em;
461
460
  font-size: $swal2-input-font-size;
462
461
  }
463
462
 
464
463
  input {
465
464
  flex-shrink: 0;
466
- margin: 0 .4em;
465
+ margin: 0 0.4em;
467
466
  }
468
467
  }
469
468
 
@@ -490,7 +489,7 @@
490
489
  width: 1.5em;
491
490
  min-width: 1.5em;
492
491
  height: 1.5em;
493
- margin: 0 .625em;
492
+ margin: 0 0.625em;
494
493
  zoom: $swal2-validation-message-icon-zoom;
495
494
  border-radius: 50%;
496
495
  background-color: $swal2-validation-message-icon-background;
@@ -515,7 +514,7 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
515
514
  height: $swal2-icon-size;
516
515
  margin: $swal2-icon-margin;
517
516
  zoom: $swal2-icon-zoom;
518
- border: #{.25em * $icon-zoom} solid transparent;
517
+ border: #{0.25em * $icon-zoom} solid transparent;
519
518
  border-radius: 50%;
520
519
  border-color: $swal2-icon-border-color;
521
520
  font-family: $swal2-icon-font-family;
@@ -547,8 +546,8 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
547
546
  position: absolute;
548
547
  top: 2.3125em;
549
548
  width: 2.9375em;
550
- height: .3125em;
551
- border-radius: .125em;
549
+ height: 0.3125em;
550
+ border-radius: 0.125em;
552
551
  background-color: $swal2-error;
553
552
 
554
553
  &[class$='left'] {
@@ -565,10 +564,10 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
565
564
  // Error icon animation
566
565
  &.swal2-icon-show {
567
566
  @if $swal2-icon-animations {
568
- animation: swal2-animate-error-icon .5s;
567
+ animation: swal2-animate-error-icon 0.5s;
569
568
 
570
569
  .swal2-x-mark {
571
- animation: swal2-animate-error-x-mark .5s;
570
+ animation: swal2-animate-error-x-mark 0.5s;
572
571
  }
573
572
  }
574
573
  }
@@ -581,10 +580,10 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
581
580
  // Warning icon animation
582
581
  &.swal2-icon-show {
583
582
  @if $swal2-icon-animations {
584
- animation: swal2-animate-error-icon .5s;
583
+ animation: swal2-animate-error-icon 0.5s;
585
584
 
586
585
  .swal2-icon-content {
587
- animation: swal2-animate-i-mark .5s;
586
+ animation: swal2-animate-i-mark 0.5s;
588
587
  }
589
588
  }
590
589
  }
@@ -597,10 +596,10 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
597
596
  // Info icon animation
598
597
  &.swal2-icon-show {
599
598
  @if $swal2-icon-animations {
600
- animation: swal2-animate-error-icon .5s;
599
+ animation: swal2-animate-error-icon 0.5s;
601
600
 
602
601
  .swal2-icon-content {
603
- animation: swal2-animate-i-mark .8s;
602
+ animation: swal2-animate-i-mark 0.8s;
604
603
  }
605
604
  }
606
605
  }
@@ -613,10 +612,10 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
613
612
  // Question icon animation
614
613
  &.swal2-icon-show {
615
614
  @if $swal2-icon-animations {
616
- animation: swal2-animate-error-icon .5s;
615
+ animation: swal2-animate-error-icon 0.5s;
617
616
 
618
617
  .swal2-icon-content {
619
- animation: swal2-animate-question-mark .8s;
618
+ animation: swal2-animate-question-mark 0.8s;
620
619
  }
621
620
  }
622
621
  }
@@ -635,7 +634,7 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
635
634
  border-radius: 50%;
636
635
 
637
636
  &[class$='left'] {
638
- top: -.4375em;
637
+ top: -0.4375em;
639
638
  left: -2.0635em;
640
639
  transform: rotate(-45deg);
641
640
  transform-origin: 3.75em 3.75em;
@@ -647,7 +646,7 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
647
646
  }
648
647
 
649
648
  &[class$='right'] {
650
- top: -.6875em;
649
+ top: -0.6875em;
651
650
  left: 1.875em;
652
651
  transform: rotate(-45deg);
653
652
  transform-origin: 0 3.75em;
@@ -663,12 +662,12 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
663
662
  // Ring
664
663
  position: absolute;
665
664
  z-index: 2;
666
- top: -.25em;
667
- left: -.25em;
665
+ top: -0.25em;
666
+ left: -0.25em;
668
667
  box-sizing: content-box;
669
668
  width: 100%;
670
669
  height: 100%;
671
- border: .25em solid $swal2-success-border;
670
+ border: 0.25em solid $swal2-success-border;
672
671
  border-radius: 50%;
673
672
 
674
673
  @if $icon-zoom != 1 {
@@ -680,9 +679,9 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
680
679
  // Hide corners left from animation
681
680
  position: absolute;
682
681
  z-index: 1;
683
- top: .5em;
682
+ top: 0.5em;
684
683
  left: 1.625em;
685
- width: .4375em;
684
+ width: 0.4375em;
686
685
  height: 5.625em;
687
686
  transform: rotate(-45deg);
688
687
 
@@ -695,20 +694,20 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
695
694
  display: block;
696
695
  position: absolute;
697
696
  z-index: 2;
698
- height: .3125em;
699
- border-radius: .125em;
697
+ height: 0.3125em;
698
+ border-radius: 0.125em;
700
699
  background-color: $swal2-success;
701
700
 
702
701
  &[class$='tip'] {
703
702
  top: 2.875em;
704
- left: .8125em;
703
+ left: 0.8125em;
705
704
  width: 1.5625em;
706
705
  transform: rotate(45deg);
707
706
  }
708
707
 
709
708
  &[class$='long'] {
710
709
  top: 2.375em;
711
- right: .5em;
710
+ right: 0.5em;
712
711
  width: 2.9375em;
713
712
  transform: rotate(-45deg);
714
713
  }
@@ -722,11 +721,11 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
722
721
  &.swal2-icon-show {
723
722
  @if $swal2-icon-animations {
724
723
  .swal2-success-line-tip {
725
- animation: swal2-animate-success-line-tip .75s;
724
+ animation: swal2-animate-success-line-tip 0.75s;
726
725
  }
727
726
 
728
727
  .swal2-success-line-long {
729
- animation: swal2-animate-success-line-long .75s;
728
+ animation: swal2-animate-success-line-long 0.75s;
730
729
  }
731
730
 
732
731
  .swal2-success-circular-line-right {
@@ -780,7 +779,7 @@ $icon-zoom: math.div(strip-units($swal2-icon-size), 5);
780
779
  z-index: 10;
781
780
  flex-shrink: 0;
782
781
  width: $swal2-progress-steps-distance;
783
- height: .4em;
782
+ height: 0.4em;
784
783
  margin: 0 -1px;
785
784
  background: $swal2-active-step-background;
786
785
  }
@@ -92,7 +92,11 @@ export const getFocusableElements = () => {
92
92
  }
93
93
 
94
94
  export const isModal = () => {
95
- return !hasClass(document.body, swalClasses['toast-shown']) && !hasClass(document.body, swalClasses['no-backdrop'])
95
+ return (
96
+ hasClass(document.body, swalClasses.shown) &&
97
+ !hasClass(document.body, swalClasses['toast-shown']) &&
98
+ !hasClass(document.body, swalClasses['no-backdrop'])
99
+ )
96
100
  }
97
101
 
98
102
  export const isToast = () => {