react-snackbar-glass 1.2.0 → 1.4.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.
package/dist/styles.css CHANGED
@@ -121,7 +121,7 @@
121
121
  max-width: 100%;
122
122
  pointer-events: auto;
123
123
  transform-origin: bottom center;
124
- animation: prs-in 440ms var(--prs-ease-spring) both;
124
+ animation: prs-in var(--prs-enter-duration, 440ms) var(--prs-ease-spring) both;
125
125
  will-change: transform, opacity;
126
126
  }
127
127
  .prs-item[data-size=xs] {
@@ -189,7 +189,7 @@
189
189
  }
190
190
  .prs-item[data-state=exiting] {
191
191
  pointer-events: none;
192
- animation: prs-out 190ms cubic-bezier(0.4, 0, 1, 1) both;
192
+ animation: prs-out var(--prs-exit-duration, 190ms) cubic-bezier(0.4, 0, 1, 1) both;
193
193
  }
194
194
  .prs-item[data-dragging=true] {
195
195
  user-select: none;
@@ -334,6 +334,10 @@
334
334
  min-width: 0;
335
335
  padding-top: 1px;
336
336
  }
337
+ .prs-item[data-layout=card] .prs-item__content[data-has-title=false] {
338
+ align-self: center;
339
+ padding-top: 0;
340
+ }
337
341
  .prs-item__title {
338
342
  color: var(--prs-fg);
339
343
  font-size: var(--prs-title-size);
@@ -541,6 +545,102 @@
541
545
  .prs-item[data-tone=solid] .prs-item__message a {
542
546
  color: #fff;
543
547
  }
548
+ .prs-item[data-tone=paper] .prs-item__surface {
549
+ --prs-blur: none;
550
+ --prs-inner: rgba(255, 255, 255, 0.9);
551
+ border-color: rgba(15, 23, 42, 0.09);
552
+ background: #ffffff;
553
+ box-shadow:
554
+ inset 0 1px 0 var(--prs-inner),
555
+ 0 1px 2px rgba(15, 23, 42, 0.06),
556
+ 0 14px 28px -22px rgba(15, 23, 42, 0.45);
557
+ }
558
+ @supports (color: light-dark(#000, #fff)) {
559
+ .prs-item[data-tone=paper] .prs-item__surface {
560
+ --prs-inner: light-dark( rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.05) );
561
+ border-color: light-dark(rgba(15, 23, 42, 0.09), rgba(255, 255, 255, 0.09));
562
+ background: light-dark(#ffffff, #191b23);
563
+ box-shadow:
564
+ inset 0 1px 0 var(--prs-inner),
565
+ 0 1px 2px light-dark(rgba(15, 23, 42, 0.05), rgba(0, 0, 0, 0.5)),
566
+ 0 14px 28px -22px light-dark(rgba(15, 23, 42, 0.4), rgba(0, 0, 0, 0.8));
567
+ }
568
+ }
569
+ .prs-item[data-tone=paper] .prs-item__surface::before {
570
+ opacity: 0.015;
571
+ }
572
+ .prs-item[data-tone=graphite] {
573
+ --prs-accent: var(--prs-accent-dark);
574
+ }
575
+ .prs-item[data-tone=graphite] .prs-item__surface {
576
+ --prs-fg: #f3f5fa;
577
+ --prs-muted: rgba(243, 245, 250, 0.74);
578
+ --prs-track: rgba(255, 255, 255, 0.12);
579
+ --prs-inner: rgba(255, 255, 255, 0.07);
580
+ --prs-blur: none;
581
+ border-color: rgba(255, 255, 255, 0.11);
582
+ background: #1f232c;
583
+ background:
584
+ radial-gradient(
585
+ 120% 150% at 0% 0%,
586
+ rgba(255, 255, 255, 0.06),
587
+ transparent 55%),
588
+ linear-gradient(
589
+ 180deg,
590
+ #2b303b,
591
+ #1b1f27);
592
+ box-shadow:
593
+ inset 0 1px 0 var(--prs-inner),
594
+ 0 1px 2px rgba(0, 0, 0, 0.45),
595
+ 0 18px 40px -26px rgba(0, 0, 0, 0.85);
596
+ }
597
+ .prs-item[data-tone=neon] {
598
+ --prs-accent: var(--prs-accent-dark);
599
+ }
600
+ .prs-item[data-tone=neon] .prs-item__surface {
601
+ --prs-fg: #f8fafc;
602
+ --prs-muted: rgba(248, 250, 252, 0.7);
603
+ --prs-track: rgba(255, 255, 255, 0.14);
604
+ --prs-inner: rgba(255, 255, 255, 0.05);
605
+ --prs-blur: none;
606
+ border-color: rgba(255, 255, 255, 0.14);
607
+ background: #080a11;
608
+ box-shadow:
609
+ inset 0 1px 0 var(--prs-inner),
610
+ 0 18px 40px -28px rgba(0, 0, 0, 0.9),
611
+ 0 0 30px -14px var(--prs-accent);
612
+ }
613
+ @supports (color: color-mix(in srgb, red, blue)) {
614
+ .prs-item[data-tone=neon] .prs-item__surface {
615
+ border-color: color-mix(in srgb, var(--prs-accent) 55%, transparent);
616
+ background:
617
+ radial-gradient(
618
+ 120% 160% at 0% 0%,
619
+ color-mix(in srgb, var(--prs-accent) 26%, transparent),
620
+ transparent 58%),
621
+ radial-gradient(
622
+ 120% 160% at 100% 100%,
623
+ color-mix(in srgb, var(--prs-accent) 12%, transparent),
624
+ transparent 62%),
625
+ #080a11;
626
+ box-shadow:
627
+ inset 0 1px 0 var(--prs-inner),
628
+ 0 0 0 1px color-mix(in srgb, var(--prs-accent) 22%, transparent),
629
+ 0 18px 40px -28px color-mix(in srgb, var(--prs-accent) 45%, transparent),
630
+ 0 0 32px -12px color-mix(in srgb, var(--prs-accent) 70%, transparent);
631
+ }
632
+ }
633
+ .prs-item[data-tone=graphite] .prs-item__surface::before,
634
+ .prs-item[data-tone=neon] .prs-item__surface::before {
635
+ opacity: 0.07;
636
+ }
637
+ @supports (color: color-mix(in srgb, red, blue)) {
638
+ .prs-item[data-tone=graphite],
639
+ .prs-item[data-tone=neon] {
640
+ --prs-accent-soft: color-mix(in srgb, var(--prs-accent) 26%, transparent);
641
+ --prs-accent-ring: color-mix(in srgb, var(--prs-accent) 42%, transparent);
642
+ }
643
+ }
544
644
  @keyframes prs-in {
545
645
  0% {
546
646
  opacity: 0;
@@ -661,6 +761,50 @@
661
761
  --prs-close-icon: 11px;
662
762
  margin: 0;
663
763
  }
764
+ .prs-item[data-layout=inline] {
765
+ --prs-item-width: auto;
766
+ max-width: min(420px, 100%);
767
+ }
768
+ .prs-item[data-layout=inline] .prs-item__surface {
769
+ align-items: center;
770
+ column-gap: 9px;
771
+ padding: 8px 13px 8px 9px;
772
+ border-radius: var(--prs-radius-inline, 12px);
773
+ }
774
+ .prs-item[data-layout=inline] .prs-item__icon {
775
+ --prs-icon-size: 22px;
776
+ --prs-glyph-size: 13px;
777
+ --prs-icon-radius: 999px;
778
+ flex: none;
779
+ margin-top: 0;
780
+ }
781
+ .prs-item[data-layout=inline] .prs-item__content {
782
+ min-width: 0;
783
+ padding-top: 0;
784
+ }
785
+ .prs-item[data-layout=inline] .prs-item__title {
786
+ display: none;
787
+ }
788
+ .prs-item[data-layout=inline] .prs-item__message {
789
+ overflow: hidden;
790
+ font-size: 13px;
791
+ font-weight: 500;
792
+ line-height: 1.4;
793
+ white-space: nowrap;
794
+ text-overflow: ellipsis;
795
+ }
796
+ .prs-item[data-layout=inline] .prs-item__actions {
797
+ margin-top: 0;
798
+ }
799
+ .prs-item[data-layout=inline] .prs-action {
800
+ padding: 2px 8px;
801
+ font-size: 11.5px;
802
+ }
803
+ .prs-item[data-layout=inline] .prs-close {
804
+ --prs-close-size: 22px;
805
+ --prs-close-icon: 11px;
806
+ margin: 0;
807
+ }
664
808
  .prs-region--minimized {
665
809
  width: auto;
666
810
  padding: var(--prs-offset);
@@ -724,4 +868,124 @@
724
868
  animation: none;
725
869
  }
726
870
  }
871
+ .prs-item[data-state=visible][data-enter=fade] {
872
+ animation: prs-fade-in var(--prs-enter-duration, 260ms) ease both;
873
+ }
874
+ .prs-item[data-state=exiting][data-exit=fade] {
875
+ animation: prs-fade-out var(--prs-exit-duration, 180ms) ease both;
876
+ }
877
+ .prs-item[data-state=visible][data-enter=scale] {
878
+ animation: prs-scale-in var(--prs-enter-duration, 300ms) var(--prs-ease-out) both;
879
+ }
880
+ .prs-item[data-state=exiting][data-exit=scale] {
881
+ animation: prs-scale-out var(--prs-exit-duration, 170ms) ease both;
882
+ }
883
+ .prs-item[data-state=visible][data-enter=pop] {
884
+ animation: prs-pop-in var(--prs-enter-duration, 460ms) var(--prs-ease-spring) both;
885
+ }
886
+ .prs-item[data-state=exiting][data-exit=pop] {
887
+ animation: prs-pop-out var(--prs-exit-duration, 210ms) ease both;
888
+ }
889
+ .prs-item[data-state=visible][data-enter=flip] {
890
+ animation: prs-flip-in var(--prs-enter-duration, 420ms) var(--prs-ease-out) both;
891
+ }
892
+ .prs-item[data-state=exiting][data-exit=flip] {
893
+ animation: prs-flip-out var(--prs-exit-duration, 220ms) ease both;
894
+ }
895
+ .prs-item[data-state=visible][data-enter=none] {
896
+ animation: none;
897
+ }
898
+ .prs-item[data-state=exiting][data-exit=none] {
899
+ animation: none;
900
+ }
901
+ .prs-item[data-enter=none] .prs-item__icon {
902
+ animation: none;
903
+ }
904
+ @keyframes prs-fade-in {
905
+ from {
906
+ opacity: 0;
907
+ }
908
+ to {
909
+ opacity: 1;
910
+ }
911
+ }
912
+ @keyframes prs-fade-out {
913
+ from {
914
+ opacity: 1;
915
+ }
916
+ to {
917
+ opacity: 0;
918
+ }
919
+ }
920
+ @keyframes prs-scale-in {
921
+ from {
922
+ opacity: 0;
923
+ transform: scale(0.86);
924
+ }
925
+ to {
926
+ opacity: 1;
927
+ transform: scale(1);
928
+ }
929
+ }
930
+ @keyframes prs-scale-out {
931
+ from {
932
+ opacity: 1;
933
+ transform: scale(1);
934
+ }
935
+ to {
936
+ opacity: 0;
937
+ transform: scale(0.9);
938
+ }
939
+ }
940
+ @keyframes prs-pop-in {
941
+ 0% {
942
+ opacity: 0;
943
+ transform: scale(0.72);
944
+ }
945
+ 55% {
946
+ opacity: 1;
947
+ transform: scale(1.06);
948
+ }
949
+ 78% {
950
+ transform: scale(0.985);
951
+ }
952
+ 100% {
953
+ opacity: 1;
954
+ transform: scale(1);
955
+ }
956
+ }
957
+ @keyframes prs-pop-out {
958
+ 0% {
959
+ opacity: 1;
960
+ transform: scale(1);
961
+ }
962
+ 35% {
963
+ opacity: 1;
964
+ transform: scale(1.04);
965
+ }
966
+ 100% {
967
+ opacity: 0;
968
+ transform: scale(0.85);
969
+ }
970
+ }
971
+ @keyframes prs-flip-in {
972
+ from {
973
+ opacity: 0;
974
+ transform: perspective(900px) rotateX(-70deg);
975
+ }
976
+ to {
977
+ opacity: 1;
978
+ transform: perspective(900px) rotateX(0deg);
979
+ }
980
+ }
981
+ @keyframes prs-flip-out {
982
+ from {
983
+ opacity: 1;
984
+ transform: perspective(900px) rotateX(0deg);
985
+ }
986
+ to {
987
+ opacity: 0;
988
+ transform: perspective(900px) rotateX(70deg);
989
+ }
990
+ }
727
991
  /*# sourceMappingURL=index.css.map */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-snackbar-glass",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "A glassmorphic snackbar system for React — queueing, promises, swipe-to-dismiss and first-class theming with zero runtime dependencies.",
5
5
  "keywords": [
6
6
  "react",