react-snackbar-glass 1.1.0 → 1.3.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;
@@ -612,4 +612,280 @@
612
612
  opacity: 0.55;
613
613
  }
614
614
  }
615
+ .prs-item[data-compact=true] {
616
+ --prs-item-width: auto;
617
+ max-width: var(--prs-width);
618
+ }
619
+ .prs-item[data-compact=true] .prs-item__surface {
620
+ align-items: center;
621
+ column-gap: 8px;
622
+ padding: 7px 8px 7px 10px;
623
+ border-radius: 999px;
624
+ }
625
+ .prs-item[data-compact=true] .prs-item__icon {
626
+ --prs-icon-size: 20px;
627
+ --prs-glyph-size: 12px;
628
+ --prs-icon-radius: 999px;
629
+ margin-top: 0;
630
+ }
631
+ .prs-item[data-compact=true] .prs-item__content {
632
+ display: flex;
633
+ align-items: center;
634
+ gap: 8px;
635
+ min-width: 0;
636
+ padding-top: 0;
637
+ }
638
+ .prs-item[data-compact=true] .prs-item__title {
639
+ display: none;
640
+ }
641
+ .prs-item[data-compact=true] .prs-item__message,
642
+ .prs-item[data-compact=true] .prs-item__content[data-has-title=false] .prs-item__message {
643
+ max-width: 46ch;
644
+ overflow: hidden;
645
+ font-size: 12.5px;
646
+ font-weight: 500;
647
+ line-height: 1.35;
648
+ white-space: nowrap;
649
+ text-overflow: ellipsis;
650
+ }
651
+ .prs-item[data-compact=true] .prs-item__actions {
652
+ flex-shrink: 0;
653
+ margin-top: 0;
654
+ }
655
+ .prs-item[data-compact=true] .prs-action {
656
+ padding: 3px 9px;
657
+ font-size: 11.5px;
658
+ }
659
+ .prs-item[data-compact=true] .prs-close {
660
+ --prs-close-size: 22px;
661
+ --prs-close-icon: 11px;
662
+ margin: 0;
663
+ }
664
+ .prs-item[data-layout=inline] {
665
+ --prs-item-width: auto;
666
+ max-width: min(420px, 100%);
667
+ }
668
+ .prs-item[data-layout=inline] .prs-item__surface {
669
+ align-items: center;
670
+ column-gap: 9px;
671
+ padding: 8px 13px 8px 9px;
672
+ border-radius: var(--prs-radius-inline, 12px);
673
+ }
674
+ .prs-item[data-layout=inline] .prs-item__icon {
675
+ --prs-icon-size: 22px;
676
+ --prs-glyph-size: 13px;
677
+ --prs-icon-radius: 999px;
678
+ flex: none;
679
+ margin-top: 0;
680
+ }
681
+ .prs-item[data-layout=inline] .prs-item__content {
682
+ min-width: 0;
683
+ padding-top: 0;
684
+ }
685
+ .prs-item[data-layout=inline] .prs-item__title {
686
+ display: none;
687
+ }
688
+ .prs-item[data-layout=inline] .prs-item__message {
689
+ overflow: hidden;
690
+ font-size: 13px;
691
+ font-weight: 500;
692
+ line-height: 1.4;
693
+ white-space: nowrap;
694
+ text-overflow: ellipsis;
695
+ }
696
+ .prs-item[data-layout=inline] .prs-item__actions {
697
+ margin-top: 0;
698
+ }
699
+ .prs-item[data-layout=inline] .prs-action {
700
+ padding: 2px 8px;
701
+ font-size: 11.5px;
702
+ }
703
+ .prs-item[data-layout=inline] .prs-close {
704
+ --prs-close-size: 22px;
705
+ --prs-close-icon: 11px;
706
+ margin: 0;
707
+ }
708
+ .prs-region--minimized {
709
+ width: auto;
710
+ padding: var(--prs-offset);
711
+ }
712
+ .prs-minimized {
713
+ display: inline-flex;
714
+ align-items: center;
715
+ gap: 8px;
716
+ appearance: none;
717
+ margin: 0;
718
+ padding: 8px 15px 8px 12px;
719
+ border: 1px solid var(--prs-border);
720
+ border-radius: 999px;
721
+ background: var(--prs-surface);
722
+ color: var(--prs-fg);
723
+ font-family: inherit;
724
+ font-size: 12.5px;
725
+ font-weight: 560;
726
+ letter-spacing: -0.005em;
727
+ cursor: pointer;
728
+ pointer-events: auto;
729
+ box-shadow: var(--prs-shadow), inset 0 1px 0 var(--prs-inner);
730
+ -webkit-backdrop-filter: var(--prs-blur);
731
+ backdrop-filter: var(--prs-blur);
732
+ animation: prs-minimized-in 220ms var(--prs-ease-out);
733
+ transition:
734
+ border-color 160ms ease,
735
+ box-shadow 160ms ease,
736
+ transform 160ms ease;
737
+ }
738
+ .prs-minimized:hover {
739
+ border-color: var(--prs-accent-ring);
740
+ box-shadow: var(--prs-shadow), 0 0 0 3px var(--prs-accent-soft);
741
+ }
742
+ .prs-minimized:active {
743
+ transform: scale(0.97);
744
+ }
745
+ .prs-minimized:focus-visible {
746
+ outline: 2px solid var(--prs-accent);
747
+ outline-offset: 2px;
748
+ }
749
+ .prs-minimized__dot {
750
+ width: 7px;
751
+ height: 7px;
752
+ border-radius: 999px;
753
+ background: var(--prs-accent);
754
+ box-shadow: 0 0 0 3px var(--prs-accent-soft);
755
+ }
756
+ @keyframes prs-minimized-in {
757
+ from {
758
+ opacity: 0;
759
+ transform: translate3d(0, 6px, 0) scale(0.96);
760
+ }
761
+ to {
762
+ opacity: 1;
763
+ transform: translate3d(0, 0, 0) scale(1);
764
+ }
765
+ }
766
+ @media (prefers-reduced-motion: reduce) {
767
+ .prs-minimized {
768
+ animation: none;
769
+ }
770
+ }
771
+ .prs-item[data-state=visible][data-enter=fade] {
772
+ animation: prs-fade-in var(--prs-enter-duration, 260ms) ease both;
773
+ }
774
+ .prs-item[data-state=exiting][data-exit=fade] {
775
+ animation: prs-fade-out var(--prs-exit-duration, 180ms) ease both;
776
+ }
777
+ .prs-item[data-state=visible][data-enter=scale] {
778
+ animation: prs-scale-in var(--prs-enter-duration, 300ms) var(--prs-ease-out) both;
779
+ }
780
+ .prs-item[data-state=exiting][data-exit=scale] {
781
+ animation: prs-scale-out var(--prs-exit-duration, 170ms) ease both;
782
+ }
783
+ .prs-item[data-state=visible][data-enter=pop] {
784
+ animation: prs-pop-in var(--prs-enter-duration, 460ms) var(--prs-ease-spring) both;
785
+ }
786
+ .prs-item[data-state=exiting][data-exit=pop] {
787
+ animation: prs-pop-out var(--prs-exit-duration, 210ms) ease both;
788
+ }
789
+ .prs-item[data-state=visible][data-enter=flip] {
790
+ animation: prs-flip-in var(--prs-enter-duration, 420ms) var(--prs-ease-out) both;
791
+ }
792
+ .prs-item[data-state=exiting][data-exit=flip] {
793
+ animation: prs-flip-out var(--prs-exit-duration, 220ms) ease both;
794
+ }
795
+ .prs-item[data-state=visible][data-enter=none] {
796
+ animation: none;
797
+ }
798
+ .prs-item[data-state=exiting][data-exit=none] {
799
+ animation: none;
800
+ }
801
+ .prs-item[data-enter=none] .prs-item__icon {
802
+ animation: none;
803
+ }
804
+ @keyframes prs-fade-in {
805
+ from {
806
+ opacity: 0;
807
+ }
808
+ to {
809
+ opacity: 1;
810
+ }
811
+ }
812
+ @keyframes prs-fade-out {
813
+ from {
814
+ opacity: 1;
815
+ }
816
+ to {
817
+ opacity: 0;
818
+ }
819
+ }
820
+ @keyframes prs-scale-in {
821
+ from {
822
+ opacity: 0;
823
+ transform: scale(0.86);
824
+ }
825
+ to {
826
+ opacity: 1;
827
+ transform: scale(1);
828
+ }
829
+ }
830
+ @keyframes prs-scale-out {
831
+ from {
832
+ opacity: 1;
833
+ transform: scale(1);
834
+ }
835
+ to {
836
+ opacity: 0;
837
+ transform: scale(0.9);
838
+ }
839
+ }
840
+ @keyframes prs-pop-in {
841
+ 0% {
842
+ opacity: 0;
843
+ transform: scale(0.72);
844
+ }
845
+ 55% {
846
+ opacity: 1;
847
+ transform: scale(1.06);
848
+ }
849
+ 78% {
850
+ transform: scale(0.985);
851
+ }
852
+ 100% {
853
+ opacity: 1;
854
+ transform: scale(1);
855
+ }
856
+ }
857
+ @keyframes prs-pop-out {
858
+ 0% {
859
+ opacity: 1;
860
+ transform: scale(1);
861
+ }
862
+ 35% {
863
+ opacity: 1;
864
+ transform: scale(1.04);
865
+ }
866
+ 100% {
867
+ opacity: 0;
868
+ transform: scale(0.85);
869
+ }
870
+ }
871
+ @keyframes prs-flip-in {
872
+ from {
873
+ opacity: 0;
874
+ transform: perspective(900px) rotateX(-70deg);
875
+ }
876
+ to {
877
+ opacity: 1;
878
+ transform: perspective(900px) rotateX(0deg);
879
+ }
880
+ }
881
+ @keyframes prs-flip-out {
882
+ from {
883
+ opacity: 1;
884
+ transform: perspective(900px) rotateX(0deg);
885
+ }
886
+ to {
887
+ opacity: 0;
888
+ transform: perspective(900px) rotateX(70deg);
889
+ }
890
+ }
615
891
  /*# sourceMappingURL=index.css.map */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-snackbar-glass",
3
- "version": "1.1.0",
3
+ "version": "1.3.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",