File tree Expand file tree Collapse file tree 4 files changed +112
-94
lines changed
test/components/__snapshots__ Expand file tree Collapse file tree 4 files changed +112
-94
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,15 @@ export default (options: Required<ModuleOptions>) => {
8
8
input : 'border-b border-default' ,
9
9
focusScope : 'flex flex-col min-h-0' ,
10
10
content : ( content : string ) => [ content , 'origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)' ]
11
- }
11
+ } ,
12
+ compoundVariants : ( prev : Record < string , any > [ ] ) => prev . map ( item => ( {
13
+ ...item ,
14
+ class : typeof item . class === 'string' ? replaceFocus ( item . class ) : item . class
15
+ } ) )
12
16
} , select ( options ) )
13
17
}
18
+
19
+ function replaceFocus ( str : string ) : string {
20
+ return str
21
+ . replace ( / f o c u s : / g, 'focus-visible:' )
22
+ }
Original file line number Diff line number Diff line change @@ -81,6 +81,15 @@ export default (options: Required<ModuleOptions>) => {
81
81
empty : 'p-2 text-base'
82
82
}
83
83
}
84
- }
84
+ } ,
85
+ compoundVariants : ( prev : Record < string , any > [ ] ) => prev . map ( item => ( {
86
+ ...item ,
87
+ class : typeof item . class === 'string' ? replaceFocus ( item . class ) : item . class
88
+ } ) )
85
89
} , input ( options ) )
86
90
}
91
+
92
+ function replaceFocus ( str : string ) : string {
93
+ return str
94
+ . replace ( / f o c u s - v i s i b l e : / g, 'focus:' )
95
+ }
You can’t perform that action at this time.
0 commit comments