@j3m-quantum/ui 0.7.0 → 0.7.2

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.
@@ -548,9 +548,29 @@ textarea,
548
548
  }
549
549
 
550
550
  /* ========================================
551
- ANIMATIONS
551
+ ANIMATIONS (tw-animate-css compatible)
552
+ Composable animation system using CSS variables
552
553
  ======================================== */
553
554
 
555
+ /* Keyframes */
556
+ @keyframes enter {
557
+ from {
558
+ opacity: var(--tw-enter-opacity, 1);
559
+ transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0)
560
+ scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1))
561
+ rotate(var(--tw-enter-rotate, 0));
562
+ }
563
+ }
564
+
565
+ @keyframes exit {
566
+ to {
567
+ opacity: var(--tw-exit-opacity, 1);
568
+ transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0)
569
+ scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1))
570
+ rotate(var(--tw-exit-rotate, 0));
571
+ }
572
+ }
573
+
554
574
  @keyframes accordion-down {
555
575
  from { height: 0; }
556
576
  to { height: var(--radix-accordion-content-height); }
@@ -561,24 +581,14 @@ textarea,
561
581
  to { height: 0; }
562
582
  }
563
583
 
564
- @keyframes fade-in {
565
- from { opacity: 0; }
566
- to { opacity: 1; }
567
- }
568
-
569
- @keyframes fade-out {
570
- from { opacity: 1; }
571
- to { opacity: 0; }
572
- }
573
-
574
- @keyframes zoom-in {
575
- from { opacity: 0; transform: scale(0.95); }
576
- to { opacity: 1; transform: scale(1); }
584
+ @keyframes collapsible-down {
585
+ from { height: 0; }
586
+ to { height: var(--radix-collapsible-content-height); }
577
587
  }
578
588
 
579
- @keyframes zoom-out {
580
- from { opacity: 1; transform: scale(1); }
581
- to { opacity: 0; transform: scale(0.95); }
589
+ @keyframes collapsible-up {
590
+ from { height: var(--radix-collapsible-content-height); }
591
+ to { height: 0; }
582
592
  }
583
593
 
584
594
  @keyframes spin {
@@ -586,6 +596,211 @@ textarea,
586
596
  to { transform: rotate(360deg); }
587
597
  }
588
598
 
599
+ /* Base animation classes */
600
+ .animate-in {
601
+ animation-name: enter;
602
+ animation-duration: 150ms;
603
+ animation-timing-function: ease-out;
604
+ --tw-enter-opacity: initial;
605
+ --tw-enter-scale: initial;
606
+ --tw-enter-rotate: initial;
607
+ --tw-enter-translate-x: initial;
608
+ --tw-enter-translate-y: initial;
609
+ }
610
+
611
+ .animate-out {
612
+ animation-name: exit;
613
+ animation-duration: 150ms;
614
+ animation-timing-function: ease-in;
615
+ --tw-exit-opacity: initial;
616
+ --tw-exit-scale: initial;
617
+ --tw-exit-rotate: initial;
618
+ --tw-exit-translate-x: initial;
619
+ --tw-exit-translate-y: initial;
620
+ }
621
+
622
+ /* Fade utilities */
623
+ .fade-in { --tw-enter-opacity: 0; }
624
+ .fade-in-0 { --tw-enter-opacity: 0; }
625
+ .fade-in-5 { --tw-enter-opacity: 0.05; }
626
+ .fade-in-10 { --tw-enter-opacity: 0.1; }
627
+ .fade-in-20 { --tw-enter-opacity: 0.2; }
628
+ .fade-in-25 { --tw-enter-opacity: 0.25; }
629
+ .fade-in-30 { --tw-enter-opacity: 0.3; }
630
+ .fade-in-40 { --tw-enter-opacity: 0.4; }
631
+ .fade-in-50 { --tw-enter-opacity: 0.5; }
632
+ .fade-in-60 { --tw-enter-opacity: 0.6; }
633
+ .fade-in-70 { --tw-enter-opacity: 0.7; }
634
+ .fade-in-75 { --tw-enter-opacity: 0.75; }
635
+ .fade-in-80 { --tw-enter-opacity: 0.8; }
636
+ .fade-in-90 { --tw-enter-opacity: 0.9; }
637
+ .fade-in-95 { --tw-enter-opacity: 0.95; }
638
+ .fade-in-100 { --tw-enter-opacity: 1; }
639
+
640
+ .fade-out { --tw-exit-opacity: 0; }
641
+ .fade-out-0 { --tw-exit-opacity: 0; }
642
+ .fade-out-5 { --tw-exit-opacity: 0.05; }
643
+ .fade-out-10 { --tw-exit-opacity: 0.1; }
644
+ .fade-out-20 { --tw-exit-opacity: 0.2; }
645
+ .fade-out-25 { --tw-exit-opacity: 0.25; }
646
+ .fade-out-30 { --tw-exit-opacity: 0.3; }
647
+ .fade-out-40 { --tw-exit-opacity: 0.4; }
648
+ .fade-out-50 { --tw-exit-opacity: 0.5; }
649
+ .fade-out-60 { --tw-exit-opacity: 0.6; }
650
+ .fade-out-70 { --tw-exit-opacity: 0.7; }
651
+ .fade-out-75 { --tw-exit-opacity: 0.75; }
652
+ .fade-out-80 { --tw-exit-opacity: 0.8; }
653
+ .fade-out-90 { --tw-exit-opacity: 0.9; }
654
+ .fade-out-95 { --tw-exit-opacity: 0.95; }
655
+ .fade-out-100 { --tw-exit-opacity: 1; }
656
+
657
+ /* Zoom/Scale utilities */
658
+ .zoom-in { --tw-enter-scale: 0; }
659
+ .zoom-in-0 { --tw-enter-scale: 0; }
660
+ .zoom-in-50 { --tw-enter-scale: 0.5; }
661
+ .zoom-in-75 { --tw-enter-scale: 0.75; }
662
+ .zoom-in-90 { --tw-enter-scale: 0.9; }
663
+ .zoom-in-95 { --tw-enter-scale: 0.95; }
664
+ .zoom-in-100 { --tw-enter-scale: 1; }
665
+ .zoom-in-105 { --tw-enter-scale: 1.05; }
666
+ .zoom-in-110 { --tw-enter-scale: 1.1; }
667
+ .zoom-in-125 { --tw-enter-scale: 1.25; }
668
+ .zoom-in-150 { --tw-enter-scale: 1.5; }
669
+
670
+ .zoom-out { --tw-exit-scale: 0; }
671
+ .zoom-out-0 { --tw-exit-scale: 0; }
672
+ .zoom-out-50 { --tw-exit-scale: 0.5; }
673
+ .zoom-out-75 { --tw-exit-scale: 0.75; }
674
+ .zoom-out-90 { --tw-exit-scale: 0.9; }
675
+ .zoom-out-95 { --tw-exit-scale: 0.95; }
676
+ .zoom-out-100 { --tw-exit-scale: 1; }
677
+ .zoom-out-105 { --tw-exit-scale: 1.05; }
678
+ .zoom-out-110 { --tw-exit-scale: 1.1; }
679
+ .zoom-out-125 { --tw-exit-scale: 1.25; }
680
+ .zoom-out-150 { --tw-exit-scale: 1.5; }
681
+
682
+ /* Slide utilities */
683
+ .slide-in-from-top { --tw-enter-translate-y: -100%; }
684
+ .slide-in-from-top-0 { --tw-enter-translate-y: 0px; }
685
+ .slide-in-from-top-1 { --tw-enter-translate-y: -0.25rem; }
686
+ .slide-in-from-top-2 { --tw-enter-translate-y: -0.5rem; }
687
+ .slide-in-from-top-3 { --tw-enter-translate-y: -0.75rem; }
688
+ .slide-in-from-top-4 { --tw-enter-translate-y: -1rem; }
689
+ .slide-in-from-top-5 { --tw-enter-translate-y: -1.25rem; }
690
+ .slide-in-from-top-6 { --tw-enter-translate-y: -1.5rem; }
691
+ .slide-in-from-top-8 { --tw-enter-translate-y: -2rem; }
692
+ .slide-in-from-top-10 { --tw-enter-translate-y: -2.5rem; }
693
+ .slide-in-from-top-12 { --tw-enter-translate-y: -3rem; }
694
+ .slide-in-from-top-16 { --tw-enter-translate-y: -4rem; }
695
+ .slide-in-from-top-20 { --tw-enter-translate-y: -5rem; }
696
+ .slide-in-from-top-24 { --tw-enter-translate-y: -6rem; }
697
+ .slide-in-from-top-full { --tw-enter-translate-y: -100%; }
698
+
699
+ .slide-in-from-bottom { --tw-enter-translate-y: 100%; }
700
+ .slide-in-from-bottom-0 { --tw-enter-translate-y: 0px; }
701
+ .slide-in-from-bottom-1 { --tw-enter-translate-y: 0.25rem; }
702
+ .slide-in-from-bottom-2 { --tw-enter-translate-y: 0.5rem; }
703
+ .slide-in-from-bottom-3 { --tw-enter-translate-y: 0.75rem; }
704
+ .slide-in-from-bottom-4 { --tw-enter-translate-y: 1rem; }
705
+ .slide-in-from-bottom-5 { --tw-enter-translate-y: 1.25rem; }
706
+ .slide-in-from-bottom-6 { --tw-enter-translate-y: 1.5rem; }
707
+ .slide-in-from-bottom-8 { --tw-enter-translate-y: 2rem; }
708
+ .slide-in-from-bottom-10 { --tw-enter-translate-y: 2.5rem; }
709
+ .slide-in-from-bottom-12 { --tw-enter-translate-y: 3rem; }
710
+ .slide-in-from-bottom-16 { --tw-enter-translate-y: 4rem; }
711
+ .slide-in-from-bottom-20 { --tw-enter-translate-y: 5rem; }
712
+ .slide-in-from-bottom-24 { --tw-enter-translate-y: 6rem; }
713
+ .slide-in-from-bottom-full { --tw-enter-translate-y: 100%; }
714
+
715
+ .slide-in-from-left { --tw-enter-translate-x: -100%; }
716
+ .slide-in-from-left-0 { --tw-enter-translate-x: 0px; }
717
+ .slide-in-from-left-1 { --tw-enter-translate-x: -0.25rem; }
718
+ .slide-in-from-left-2 { --tw-enter-translate-x: -0.5rem; }
719
+ .slide-in-from-left-3 { --tw-enter-translate-x: -0.75rem; }
720
+ .slide-in-from-left-4 { --tw-enter-translate-x: -1rem; }
721
+ .slide-in-from-left-5 { --tw-enter-translate-x: -1.25rem; }
722
+ .slide-in-from-left-6 { --tw-enter-translate-x: -1.5rem; }
723
+ .slide-in-from-left-8 { --tw-enter-translate-x: -2rem; }
724
+ .slide-in-from-left-10 { --tw-enter-translate-x: -2.5rem; }
725
+ .slide-in-from-left-12 { --tw-enter-translate-x: -3rem; }
726
+ .slide-in-from-left-16 { --tw-enter-translate-x: -4rem; }
727
+ .slide-in-from-left-20 { --tw-enter-translate-x: -5rem; }
728
+ .slide-in-from-left-24 { --tw-enter-translate-x: -6rem; }
729
+ .slide-in-from-left-52 { --tw-enter-translate-x: -13rem; }
730
+ .slide-in-from-left-full { --tw-enter-translate-x: -100%; }
731
+
732
+ .slide-in-from-right { --tw-enter-translate-x: 100%; }
733
+ .slide-in-from-right-0 { --tw-enter-translate-x: 0px; }
734
+ .slide-in-from-right-1 { --tw-enter-translate-x: 0.25rem; }
735
+ .slide-in-from-right-2 { --tw-enter-translate-x: 0.5rem; }
736
+ .slide-in-from-right-3 { --tw-enter-translate-x: 0.75rem; }
737
+ .slide-in-from-right-4 { --tw-enter-translate-x: 1rem; }
738
+ .slide-in-from-right-5 { --tw-enter-translate-x: 1.25rem; }
739
+ .slide-in-from-right-6 { --tw-enter-translate-x: 1.5rem; }
740
+ .slide-in-from-right-8 { --tw-enter-translate-x: 2rem; }
741
+ .slide-in-from-right-10 { --tw-enter-translate-x: 2.5rem; }
742
+ .slide-in-from-right-12 { --tw-enter-translate-x: 3rem; }
743
+ .slide-in-from-right-16 { --tw-enter-translate-x: 4rem; }
744
+ .slide-in-from-right-20 { --tw-enter-translate-x: 5rem; }
745
+ .slide-in-from-right-24 { --tw-enter-translate-x: 6rem; }
746
+ .slide-in-from-right-52 { --tw-enter-translate-x: 13rem; }
747
+ .slide-in-from-right-full { --tw-enter-translate-x: 100%; }
748
+
749
+ .slide-out-to-top { --tw-exit-translate-y: -100%; }
750
+ .slide-out-to-top-0 { --tw-exit-translate-y: 0px; }
751
+ .slide-out-to-top-1 { --tw-exit-translate-y: -0.25rem; }
752
+ .slide-out-to-top-2 { --tw-exit-translate-y: -0.5rem; }
753
+ .slide-out-to-top-3 { --tw-exit-translate-y: -0.75rem; }
754
+ .slide-out-to-top-4 { --tw-exit-translate-y: -1rem; }
755
+ .slide-out-to-top-5 { --tw-exit-translate-y: -1.25rem; }
756
+ .slide-out-to-top-6 { --tw-exit-translate-y: -1.5rem; }
757
+ .slide-out-to-top-8 { --tw-exit-translate-y: -2rem; }
758
+ .slide-out-to-top-full { --tw-exit-translate-y: -100%; }
759
+
760
+ .slide-out-to-bottom { --tw-exit-translate-y: 100%; }
761
+ .slide-out-to-bottom-0 { --tw-exit-translate-y: 0px; }
762
+ .slide-out-to-bottom-1 { --tw-exit-translate-y: 0.25rem; }
763
+ .slide-out-to-bottom-2 { --tw-exit-translate-y: 0.5rem; }
764
+ .slide-out-to-bottom-3 { --tw-exit-translate-y: 0.75rem; }
765
+ .slide-out-to-bottom-4 { --tw-exit-translate-y: 1rem; }
766
+ .slide-out-to-bottom-5 { --tw-exit-translate-y: 1.25rem; }
767
+ .slide-out-to-bottom-6 { --tw-exit-translate-y: 1.5rem; }
768
+ .slide-out-to-bottom-8 { --tw-exit-translate-y: 2rem; }
769
+ .slide-out-to-bottom-full { --tw-exit-translate-y: 100%; }
770
+
771
+ .slide-out-to-left { --tw-exit-translate-x: -100%; }
772
+ .slide-out-to-left-0 { --tw-exit-translate-x: 0px; }
773
+ .slide-out-to-left-1 { --tw-exit-translate-x: -0.25rem; }
774
+ .slide-out-to-left-2 { --tw-exit-translate-x: -0.5rem; }
775
+ .slide-out-to-left-3 { --tw-exit-translate-x: -0.75rem; }
776
+ .slide-out-to-left-4 { --tw-exit-translate-x: -1rem; }
777
+ .slide-out-to-left-5 { --tw-exit-translate-x: -1.25rem; }
778
+ .slide-out-to-left-6 { --tw-exit-translate-x: -1.5rem; }
779
+ .slide-out-to-left-8 { --tw-exit-translate-x: -2rem; }
780
+ .slide-out-to-left-52 { --tw-exit-translate-x: -13rem; }
781
+ .slide-out-to-left-full { --tw-exit-translate-x: -100%; }
782
+
783
+ .slide-out-to-right { --tw-exit-translate-x: 100%; }
784
+ .slide-out-to-right-0 { --tw-exit-translate-x: 0px; }
785
+ .slide-out-to-right-1 { --tw-exit-translate-x: 0.25rem; }
786
+ .slide-out-to-right-2 { --tw-exit-translate-x: 0.5rem; }
787
+ .slide-out-to-right-3 { --tw-exit-translate-x: 0.75rem; }
788
+ .slide-out-to-right-4 { --tw-exit-translate-x: 1rem; }
789
+ .slide-out-to-right-5 { --tw-exit-translate-x: 1.25rem; }
790
+ .slide-out-to-right-6 { --tw-exit-translate-x: 1.5rem; }
791
+ .slide-out-to-right-8 { --tw-exit-translate-x: 2rem; }
792
+ .slide-out-to-right-52 { --tw-exit-translate-x: 13rem; }
793
+ .slide-out-to-right-full { --tw-exit-translate-x: 100%; }
794
+
795
+ /* Duration utilities */
796
+ .duration-150 { animation-duration: 150ms; }
797
+ .duration-200 { animation-duration: 200ms; }
798
+ .duration-300 { animation-duration: 300ms; }
799
+ .duration-500 { animation-duration: 500ms; }
800
+ .duration-700 { animation-duration: 700ms; }
801
+ .duration-1000 { animation-duration: 1000ms; }
802
+
803
+ /* Accordion animations */
589
804
  .animate-accordion-down {
590
805
  animation: accordion-down 0.2s ease-out;
591
806
  }
@@ -594,14 +809,138 @@ textarea,
594
809
  animation: accordion-up 0.2s ease-out;
595
810
  }
596
811
 
597
- .animate-in {
598
- animation: fade-in 0.2s ease-out, zoom-in 0.2s ease-out;
812
+ /* Collapsible animations */
813
+ .animate-collapsible-down {
814
+ animation: collapsible-down 0.2s ease-out;
599
815
  }
600
816
 
601
- .animate-out {
602
- animation: fade-out 0.2s ease-in, zoom-out 0.2s ease-in;
817
+ .animate-collapsible-up {
818
+ animation: collapsible-up 0.2s ease-out;
603
819
  }
604
820
 
821
+ /* Spin animation */
605
822
  .animate-spin {
606
823
  animation: spin 1s linear infinite;
607
824
  }
825
+
826
+ /* ========================================
827
+ DATA-STATE ANIMATION VARIANTS
828
+ For Radix UI components (Dialog, Select, Popover, etc.)
829
+ These match Tailwind's data-[state=*] variants
830
+ ======================================== */
831
+
832
+ /* Open state - apply enter animation */
833
+ [data-state="open"].animate-in,
834
+ [data-state="open"] .animate-in {
835
+ animation-name: enter;
836
+ animation-duration: 150ms;
837
+ animation-timing-function: ease-out;
838
+ animation-fill-mode: forwards;
839
+ }
840
+
841
+ /* Closed state - apply exit animation */
842
+ [data-state="closed"].animate-out,
843
+ [data-state="closed"] .animate-out {
844
+ animation-name: exit;
845
+ animation-duration: 150ms;
846
+ animation-timing-function: ease-in;
847
+ animation-fill-mode: forwards;
848
+ }
849
+
850
+ /* Fade in/out with data-state */
851
+ [data-state="open"].fade-in-0,
852
+ [data-state="open"] .fade-in-0 { --tw-enter-opacity: 0; }
853
+
854
+ [data-state="closed"].fade-out-0,
855
+ [data-state="closed"] .fade-out-0 { --tw-exit-opacity: 0; }
856
+
857
+ /* Zoom in/out with data-state */
858
+ [data-state="open"].zoom-in-95,
859
+ [data-state="open"] .zoom-in-95 { --tw-enter-scale: 0.95; }
860
+
861
+ [data-state="open"].zoom-in-90,
862
+ [data-state="open"] .zoom-in-90 { --tw-enter-scale: 0.90; }
863
+
864
+ [data-state="closed"].zoom-out-95,
865
+ [data-state="closed"] .zoom-out-95 { --tw-exit-scale: 0.95; }
866
+
867
+ [data-state="closed"].zoom-out-90,
868
+ [data-state="closed"] .zoom-out-90 { --tw-exit-scale: 0.90; }
869
+
870
+ /* Slide in from directions with data-state */
871
+ [data-state="open"].slide-in-from-top-2,
872
+ [data-state="open"] .slide-in-from-top-2,
873
+ [data-side="bottom"].slide-in-from-top-2 { --tw-enter-translate-y: -0.5rem; }
874
+
875
+ [data-state="open"].slide-in-from-bottom-2,
876
+ [data-state="open"] .slide-in-from-bottom-2,
877
+ [data-side="top"].slide-in-from-bottom-2 { --tw-enter-translate-y: 0.5rem; }
878
+
879
+ [data-state="open"].slide-in-from-left-2,
880
+ [data-state="open"] .slide-in-from-left-2,
881
+ [data-side="right"].slide-in-from-left-2 { --tw-enter-translate-x: -0.5rem; }
882
+
883
+ [data-state="open"].slide-in-from-right-2,
884
+ [data-state="open"] .slide-in-from-right-2,
885
+ [data-side="left"].slide-in-from-right-2 { --tw-enter-translate-x: 0.5rem; }
886
+
887
+ /* Sheet/Drawer slide animations */
888
+ [data-state="open"].slide-in-from-right,
889
+ [data-state="open"] .slide-in-from-right { --tw-enter-translate-x: 100%; }
890
+
891
+ [data-state="open"].slide-in-from-left,
892
+ [data-state="open"] .slide-in-from-left { --tw-enter-translate-x: -100%; }
893
+
894
+ [data-state="open"].slide-in-from-top,
895
+ [data-state="open"] .slide-in-from-top { --tw-enter-translate-y: -100%; }
896
+
897
+ [data-state="open"].slide-in-from-bottom,
898
+ [data-state="open"] .slide-in-from-bottom { --tw-enter-translate-y: 100%; }
899
+
900
+ [data-state="closed"].slide-out-to-right,
901
+ [data-state="closed"] .slide-out-to-right { --tw-exit-translate-x: 100%; }
902
+
903
+ [data-state="closed"].slide-out-to-left,
904
+ [data-state="closed"] .slide-out-to-left { --tw-exit-translate-x: -100%; }
905
+
906
+ [data-state="closed"].slide-out-to-top,
907
+ [data-state="closed"] .slide-out-to-top { --tw-exit-translate-y: -100%; }
908
+
909
+ [data-state="closed"].slide-out-to-bottom,
910
+ [data-state="closed"] .slide-out-to-bottom { --tw-exit-translate-y: 100%; }
911
+
912
+ /* Navigation menu motion variants */
913
+ [data-motion^="from-"].animate-in,
914
+ [data-motion="from-start"].slide-in-from-left-52 { --tw-enter-translate-x: -13rem; }
915
+ [data-motion="from-end"].slide-in-from-right-52 { --tw-enter-translate-x: 13rem; }
916
+
917
+ [data-motion^="to-"].animate-out,
918
+ [data-motion="to-start"].slide-out-to-left-52 { --tw-exit-translate-x: -13rem; }
919
+ [data-motion="to-end"].slide-out-to-right-52 { --tw-exit-translate-x: 13rem; }
920
+
921
+ /* Data-side variants (for popovers, dropdowns, tooltips) */
922
+ [data-side="bottom"] {
923
+ --tw-enter-translate-y: -0.5rem;
924
+ }
925
+ [data-side="top"] {
926
+ --tw-enter-translate-y: 0.5rem;
927
+ }
928
+ [data-side="left"] {
929
+ --tw-enter-translate-x: 0.5rem;
930
+ }
931
+ [data-side="right"] {
932
+ --tw-enter-translate-x: -0.5rem;
933
+ }
934
+
935
+ /* Visible/hidden states (for NavigationMenu indicator) */
936
+ [data-state="visible"].animate-in,
937
+ [data-state="visible"] .animate-in {
938
+ animation-name: enter;
939
+ animation-duration: 150ms;
940
+ }
941
+
942
+ [data-state="hidden"].animate-out,
943
+ [data-state="hidden"] .animate-out {
944
+ animation-name: exit;
945
+ animation-duration: 150ms;
946
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@j3m-quantum/ui",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "J3M UI Component Library - themed shadcn/ui components with design tokens",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",