@@ -81,7 +81,10 @@ const UIButton = createButton({
8181 Text,
8282 Group : View ,
8383 Spinner : ActivityIndicator ,
84- Icon : Platform . OS === 'web' ? PrimitiveIcon : withStates ( PrimitiveIcon ) ,
84+ Icon :
85+ Platform . OS === 'web'
86+ ? withStates ( PrimitiveIcon )
87+ : withStates ( PrimitiveIcon ) ,
8588} ) ;
8689
8790cssInterop ( UIButton , { className : 'style' } ) ;
@@ -90,7 +93,7 @@ cssInterop(UIButton.Group, { className: 'style' });
9093cssInterop ( UIButton . Spinner , {
9194 className : { target : 'style' , nativeStyleToProp : { color : true } } ,
9295} ) ;
93- cssInterop ( UIButton . Icon , {
96+ cssInterop ( PrimitiveIcon , {
9497 className : {
9598 target : 'style' ,
9699 nativeStyleToProp : {
@@ -109,19 +112,20 @@ const buttonStyle = tva({
109112 variants : {
110113 action : {
111114 primary :
112- 'bg-primary-500 hover:bg-primary-600 active:bg-primary-700 border-primary-300 hover:border-primary-400 active:border-primary-500 data-[focus-visible=true]:web:ring-indicator-info' ,
115+ 'bg-primary-500 data-[ hover=true] :bg-primary-600 data-[ active=true] :bg-primary-700 border-primary-300 data-[ hover=true] :border-primary-400 data-[ active=true] :border-primary-500 data-[focus-visible=true]:web:ring-indicator-info' ,
113116 secondary :
114- 'bg-secondary-500 border-secondary-300 hover:bg-secondary-600 hover:border-secondary-400 active:bg-secondary-700 active:border-secondary-500 data-[focus-visible=true]:web:ring-indicator-info' ,
117+ 'bg-secondary-500 border-secondary-300 data-[ hover=true] :bg-secondary-600 data-[ hover=true] :border-secondary-400 data-[ active=true] :bg-secondary-700 data-[ active=true] :border-secondary-500 data-[focus-visible=true]:web:ring-indicator-info' ,
115118 positive :
116- 'bg-success-500 border-success-300 hover:bg-success-600 hover:border-success-400 active:bg-success-700 active:border-success-500 data-[focus-visible=true]:web:ring-indicator-info' ,
119+ 'bg-success-500 border-success-300 data-[ hover=true] :bg-success-600 data-[ hover=true] :border-success-400 data-[ active=true] :bg-success-700 data-[ active=true] :border-success-500 data-[focus-visible=true]:web:ring-indicator-info' ,
117120 negative :
118- 'bg-error-500 border-error-300 hover:bg-error-600 hover:border-error-400 active:bg-error-700 active:border-error-500 data-[focus-visible=true]:web:ring-indicator-info' ,
119- default : 'bg-transparent hover:bg-background-50 active:bg-transparent' ,
121+ 'bg-error-500 border-error-300 data-[hover=true]:bg-error-600 data-[hover=true]:border-error-400 data-[active=true]:bg-error-700 data-[active=true]:border-error-500 data-[focus-visible=true]:web:ring-indicator-info' ,
122+ default :
123+ 'bg-transparent data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent' ,
120124 } ,
121125 variant : {
122126 link : 'px-0' ,
123127 outline :
124- 'bg-transparent border hover:bg-background-50 active:bg-transparent' ,
128+ 'bg-transparent border data-[ hover=true] :bg-background-50 data-[ active=true] :bg-transparent' ,
125129 solid : '' ,
126130 } ,
127131
@@ -137,42 +141,50 @@ const buttonStyle = tva({
137141 {
138142 action : 'primary' ,
139143 variant : 'link' ,
140- class : 'px-0 bg-transparent hover:bg-transparent active:bg-transparent' ,
144+ class :
145+ 'px-0 bg-transparent data-[hover=true]:bg-transparent data-[active=true]:bg-transparent' ,
141146 } ,
142147 {
143148 action : 'secondary' ,
144149 variant : 'link' ,
145- class : 'px-0 bg-transparent hover:bg-transparent active:bg-transparent' ,
150+ class :
151+ 'px-0 bg-transparent data-[hover=true]:bg-transparent data-[active=true]:bg-transparent' ,
146152 } ,
147153 {
148154 action : 'positive' ,
149155 variant : 'link' ,
150- class : 'px-0 bg-transparent hover:bg-transparent active:bg-transparent' ,
156+ class :
157+ 'px-0 bg-transparent data-[hover=true]:bg-transparent data-[active=true]:bg-transparent' ,
151158 } ,
152159 {
153160 action : 'negative' ,
154161 variant : 'link' ,
155- class : 'px-0 bg-transparent hover:bg-transparent active:bg-transparent' ,
162+ class :
163+ 'px-0 bg-transparent data-[hover=true]:bg-transparent data-[active=true]:bg-transparent' ,
156164 } ,
157165 {
158166 action : 'primary' ,
159167 variant : 'outline' ,
160- class : 'bg-transparent hover:bg-background-50 active:bg-transparent' ,
168+ class :
169+ 'bg-transparent data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent' ,
161170 } ,
162171 {
163172 action : 'secondary' ,
164173 variant : 'outline' ,
165- class : 'bg-transparent hover:bg-background-50 active:bg-transparent' ,
174+ class :
175+ 'bg-transparent data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent' ,
166176 } ,
167177 {
168178 action : 'positive' ,
169179 variant : 'outline' ,
170- class : 'bg-transparent hover:bg-background-50 active:bg-transparent' ,
180+ class :
181+ 'bg-transparent data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent' ,
171182 } ,
172183 {
173184 action : 'negative' ,
174185 variant : 'outline' ,
175- class : 'bg-transparent hover:bg-background-50 active:bg-transparent' ,
186+ class :
187+ 'bg-transparent data-[hover=true]:bg-background-50 data-[active=true]:bg-transparent' ,
176188 } ,
177189 ] ,
178190} ) ;
@@ -182,19 +194,19 @@ const buttonTextStyle = tva({
182194 parentVariants : {
183195 action : {
184196 primary :
185- 'text-primary-600 group- hover/button :text-primary-600 group- active/button :text-primary-700' ,
197+ 'text-primary-600 data-[ hover=true] :text-primary-600 data-[ active=true] :text-primary-700' ,
186198 secondary :
187- 'text-secondary-600 group- hover/button :text-secondary-600 group- active/button :text-secondary-700' ,
199+ 'text-secondary-600 data-[ hover=true] :text-secondary-600 data-[ active=true] :text-secondary-700' ,
188200 positive :
189- 'text-success-600 group- hover/button :text-success-600 group- active/button :text-success-700' ,
201+ 'text-success-600 data-[ hover=true] :text-success-600 data-[ active=true] :text-success-700' ,
190202 negative :
191- 'text-error-600 group- hover/button :text-error-600 group- active/button :text-error-700' ,
203+ 'text-error-600 data-[ hover=true] :text-error-600 data-[ active=true] :text-error-700' ,
192204 } ,
193205 variant : {
194- link : 'group- hover/button :underline group- active/button :underline' ,
206+ link : 'data-[ hover=true] :underline data-[ active=true] :underline' ,
195207 outline : '' ,
196208 solid :
197- 'text-typography-0 group- hover/button :text-typography-0 group- active/button :text-typography-0' ,
209+ 'text-typography-0 data-[ hover=true] :text-typography-0 data-[ active=true] :text-typography-0' ,
198210 } ,
199211 size : {
200212 xs : 'text-xs' ,
@@ -209,49 +221,49 @@ const buttonTextStyle = tva({
209221 variant : 'solid' ,
210222 action : 'primary' ,
211223 class :
212- 'text-typography-0 group- hover/button :text-typography-0 group- active/button :text-typography-0' ,
224+ 'text-typography-0 data-[ hover=true] :text-typography-0 data-[ active=true] :text-typography-0' ,
213225 } ,
214226 {
215227 variant : 'solid' ,
216228 action : 'secondary' ,
217229 class :
218- 'text-typography-0 group- hover/button :text-typography-0 group- active/button :text-typography-0' ,
230+ 'text-typography-0 data-[ hover=true] :text-typography-0 data-[ active=true] :text-typography-0' ,
219231 } ,
220232 {
221233 variant : 'solid' ,
222234 action : 'positive' ,
223235 class :
224- 'text-typography-0 group- hover/button :text-typography-0 group- active/button :text-typography-0' ,
236+ 'text-typography-0 data-[ hover=true] :text-typography-0 data-[ active=true] :text-typography-0' ,
225237 } ,
226238 {
227239 variant : 'solid' ,
228240 action : 'negative' ,
229241 class :
230- 'text-typography-0 group- hover/button :text-typography-0 group- active/button :text-typography-0' ,
242+ 'text-typography-0 data-[ hover=true] :text-typography-0 data-[ active=true] :text-typography-0' ,
231243 } ,
232244 {
233245 variant : 'outline' ,
234246 action : 'primary' ,
235247 class :
236- 'text-primary-500 group- hover/button :text-primary-500 group- active/button :text-primary-500' ,
248+ 'text-primary-500 data-[ hover=true] :text-primary-500 data-[ active=true] :text-primary-500' ,
237249 } ,
238250 {
239251 variant : 'outline' ,
240252 action : 'secondary' ,
241253 class :
242- 'text-primary-500 group- hover/button :text-primary-500 group- active/button :text-primary-500' ,
254+ 'text-primary-500 data-[ hover=true] :text-primary-500 data-[ active=true] :text-primary-500' ,
243255 } ,
244256 {
245257 variant : 'outline' ,
246258 action : 'positive' ,
247259 class :
248- 'text-primary-500 group- hover/button :text-primary-500 group- active/button :text-primary-500' ,
260+ 'text-primary-500 data-[ hover=true] :text-primary-500 data-[ active=true] :text-primary-500' ,
249261 } ,
250262 {
251263 variant : 'outline' ,
252264 action : 'negative' ,
253265 class :
254- 'text-primary-500 group- hover/button :text-primary-500 group- active/button :text-primary-500' ,
266+ 'text-primary-500 data-[ hover=true] :text-primary-500 data-[ active=true] :text-primary-500' ,
255267 } ,
256268 ] ,
257269} ) ;
@@ -260,10 +272,10 @@ const buttonIconStyle = tva({
260272 base : 'fill-none' ,
261273 parentVariants : {
262274 variant : {
263- link : 'group- hover/button :underline group- active/button :underline' ,
275+ link : 'data-[ hover=true] :underline data-[ active=true] :underline' ,
264276 outline : '' ,
265277 solid :
266- 'text-typography-0 group- hover/button :text-typography-0 group- active/button :text-typography-0' ,
278+ 'text-typography-0 data-[ hover=true] :text-typography-0 data-[ active=true] :text-typography-0' ,
267279 } ,
268280 size : {
269281 xs : 'h-3.5 w-3.5' ,
@@ -274,40 +286,40 @@ const buttonIconStyle = tva({
274286 } ,
275287 action : {
276288 primary :
277- 'text-primary-600 group- hover/button :text-primary-600 group- active/button :text-primary-700' ,
289+ 'text-primary-600 data-[ hover=true] :text-primary-600 data-[ active=true] :text-primary-700' ,
278290 secondary :
279- 'text-secondary-600 group- hover/button :text-secondary-600 group- active/button :text-secondary-700' ,
291+ 'text-secondary-600 data-[ hover=true] :text-secondary-600 data-[ active=true] :text-secondary-700' ,
280292 positive :
281- 'text-success-600 group- hover/button :text-success-600 group- active/button :text-success-700' ,
293+ 'text-success-600 data-[ hover=true] :text-success-600 data-[ active=true] :text-success-700' ,
282294
283295 negative :
284- 'text-error-600 group- hover/button :text-error-600 group- active/button :text-error-700' ,
296+ 'text-error-600 data-[ hover=true] :text-error-600 data-[ active=true] :text-error-700' ,
285297 } ,
286298 } ,
287299 parentCompoundVariants : [
288300 {
289301 variant : 'solid' ,
290302 action : 'primary' ,
291303 class :
292- 'text-typography-0 group- hover/button :text-typography-0 group- active/button :text-typography-0' ,
304+ 'text-typography-0 data-[ hover=true] :text-typography-0 data-[ active=true] :text-typography-0' ,
293305 } ,
294306 {
295307 variant : 'solid' ,
296308 action : 'secondary' ,
297309 class :
298- 'text-typography-0 group- hover/button :text-typography-0 group- active/button :text-typography-0' ,
310+ 'text-typography-0 data-[ hover=true] :text-typography-0 data-[ active=true] :text-typography-0' ,
299311 } ,
300312 {
301313 variant : 'solid' ,
302314 action : 'positive' ,
303315 class :
304- 'text-typography-0 group- hover/button :text-typography-0 group- active/button :text-typography-0' ,
316+ 'text-typography-0 data-[ hover=true] :text-typography-0 data-[ active=true] :text-typography-0' ,
305317 } ,
306318 {
307319 variant : 'solid' ,
308320 action : 'negative' ,
309321 class :
310- 'text-typography-0 group- hover/button :text-typography-0 group- active/button :text-typography-0' ,
322+ 'text-typography-0 data-[ hover=true] :text-typography-0 data-[ active=true] :text-typography-0' ,
311323 } ,
312324 ] ,
313325} ) ;
0 commit comments