@@ -18,15 +18,26 @@ export const accordionVariants = cva(
1818 glass :
1919 "bg-background/30 backdrop-blur-xl border border-white/10 shadow-2xl hover:border-white/20 before:absolute before:inset-0 before:bg-gradient-to-br before:from-white/5 before:to-transparent before:opacity-0 hover:before:opacity-100 before:transition-opacity before:duration-500" ,
2020 } ,
21+ size : {
22+ sm : "rounded-xl" ,
23+ md : "rounded-2xl" ,
24+ lg : "rounded-3xl" ,
25+ } ,
26+ orientation : {
27+ vertical : "flex flex-col" ,
28+ horizontal : "flex flex-row" ,
29+ } ,
2130 } ,
2231 defaultVariants : {
2332 variant : "default" ,
33+ size : "md" ,
34+ orientation : "vertical" ,
2435 } ,
2536 }
2637) ;
2738
2839export const accordionItemVariants = cva (
29- "group relative w-full overflow-hidden transition-all duration-300 ease-out border-b border-border/30 last:border-b-0 backdrop-blur-sm shadow-sm hover:shadow-lg transition-shadow isolate before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-primary/5 before:to-transparent before:opacity-0 hover:before:opacity-100 before:transition-opacity before:duration-300" ,
40+ "group relative w-full overflow-hidden transition-all duration-300 ease-out backdrop-blur-sm shadow-sm hover:shadow-lg transition-shadow isolate before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-primary/5 before:to-transparent before:opacity-0 hover:before:opacity-100 before:transition-opacity before:duration-300" ,
3041 {
3142 variants : {
3243 isOpen : {
@@ -37,41 +48,105 @@ export const accordionItemVariants = cva(
3748 true : "opacity-50 cursor-not-allowed pointer-events-none" ,
3849 false : "" ,
3950 } ,
51+ orientation : {
52+ vertical : "border-b border-border/30 last:border-b-0" ,
53+ horizontal : "border-r border-border/30 last:border-r-0 flex-1" ,
54+ } ,
4055 } ,
4156 defaultVariants : {
4257 isOpen : false ,
4358 disabled : false ,
59+ orientation : "vertical" ,
4460 } ,
4561 }
4662) ;
4763
4864export const accordionHeaderVariants = cva (
49- "w-full flex justify-between items-center cursor-pointer transition-all duration-300 px-6 py-4 gap-4 relative isolate hover:scale-[1.01] active:scale-[0.99]" ,
65+ "w-full flex justify-between items-center cursor-pointer transition-all duration-300 gap-4 relative isolate hover:scale-[1.01] active:scale-[0.99] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background " ,
5066 {
5167 variants : {
5268 isOpen : {
5369 true : "bg-gradient-to-r from-primary/5 via-secondary/5 to-accent/5 border-b border-border/50 shadow-sm before:absolute before:inset-0 before:bg-gradient-to-r before:from-primary/10 before:via-transparent before:to-accent/10 before:opacity-50" ,
5470 false :
5571 "hover:bg-muted/30 after:absolute after:inset-0 after:bg-gradient-to-r after:from-transparent after:via-muted/20 after:to-transparent after:opacity-0 hover:after:opacity-100 after:transition-opacity after:duration-300" ,
5672 } ,
73+ size : {
74+ sm : "px-4 py-2 text-sm" ,
75+ md : "px-6 py-4 text-base" ,
76+ lg : "px-8 py-6 text-lg" ,
77+ } ,
78+ iconPosition : {
79+ left : "flex-row-reverse" ,
80+ right : "flex-row" ,
81+ } ,
82+ disabled : {
83+ true : "cursor-not-allowed opacity-50" ,
84+ false : "" ,
85+ } ,
5786 } ,
5887 defaultVariants : {
5988 isOpen : false ,
89+ size : "md" ,
90+ iconPosition : "right" ,
91+ disabled : false ,
6092 } ,
6193 }
6294) ;
6395
6496export const accordionContentVariants = cva (
65- "w-full px-6 overflow-hidden transition-all duration-500 ease-in-out bg-card/20" ,
97+ "w-full overflow-hidden bg-card/20" ,
98+ {
99+ variants : {
100+ size : {
101+ sm : "text-sm" ,
102+ md : "text-base" ,
103+ lg : "text-lg" ,
104+ } ,
105+ } ,
106+ defaultVariants : {
107+ size : "md" ,
108+ } ,
109+ }
110+ ) ;
111+
112+ export const accordionContentInnerVariants = cva (
113+ "text-muted-foreground leading-relaxed transition-all duration-300" ,
114+ {
115+ variants : {
116+ isOpen : {
117+ true : "translate-y-0 opacity-100" ,
118+ false : "translate-y-2 opacity-0" ,
119+ } ,
120+ size : {
121+ sm : "px-4 py-2" ,
122+ md : "px-6 py-4" ,
123+ lg : "px-8 py-6" ,
124+ } ,
125+ } ,
126+ defaultVariants : {
127+ isOpen : false ,
128+ size : "md" ,
129+ } ,
130+ }
131+ ) ;
132+
133+ export const accordionIconVariants = cva (
134+ "relative shrink-0 transition-all duration-500 ease-out" ,
66135 {
67136 variants : {
68137 isOpen : {
69- true : "max-h-[500px] opacity-100 py-4" ,
70- false : "max-h-0 opacity-0 py-0" ,
138+ true : "rotate-180 text-primary" ,
139+ false : "rotate-0 text-muted-foreground group-hover:text-foreground" ,
140+ } ,
141+ size : {
142+ sm : "h-4 w-4" ,
143+ md : "h-5 w-5" ,
144+ lg : "h-6 w-6" ,
71145 } ,
72146 } ,
73147 defaultVariants : {
74148 isOpen : false ,
149+ size : "md" ,
75150 } ,
76151 }
77- ) ;
152+ ) ;
0 commit comments