11import { describe , it , expect } from 'vitest' ;
22import { styles , defineTokens } from './' ;
33
4- describe ( 'styles ' , ( ) => {
4+ describe ( 'sva ' , ( ) => {
55 it ( 'should return base styles when no variants are provided' , ( ) => {
66 const baseStyles = styles ( {
77 base : { display : 'flex' } ,
@@ -123,7 +123,7 @@ describe('styles', () => {
123123
124124describe ( 'defineTokens' , ( ) => {
125125 it ( 'should create styles function' , ( ) => {
126- const { styles } = defineTokens ( {
126+ const { sva } = defineTokens ( {
127127 colors : {
128128 primary : '#000000' ,
129129 secondary : '#ffffff' ,
@@ -134,11 +134,11 @@ describe('defineTokens', () => {
134134 } ,
135135 } ) ;
136136
137- expect ( typeof styles ) . toBe ( 'function' ) ;
137+ expect ( typeof sva ) . toBe ( 'function' ) ;
138138 } ) ;
139139
140140 it ( 'should resolve token references in styles' , ( ) => {
141- const { styles } = defineTokens ( {
141+ const { sva } = defineTokens ( {
142142 colors : {
143143 primary : '#000000' ,
144144 } ,
@@ -147,7 +147,7 @@ describe('defineTokens', () => {
147147 } ,
148148 } ) ;
149149
150- const result = styles ( {
150+ const result = sva ( {
151151 base : {
152152 backgroundColor : '$colors.primary' ,
153153 padding : '$space.sm' ,
@@ -162,13 +162,13 @@ describe('defineTokens', () => {
162162 } ) ;
163163
164164 it ( 'should resolve token references in variants' , ( ) => {
165- const { styles } = defineTokens ( {
165+ const { sva } = defineTokens ( {
166166 colors : {
167167 primary : '#000000' ,
168168 } ,
169169 } ) ;
170170
171- const result = styles ( {
171+ const result = sva ( {
172172 base : { } ,
173173 variants : {
174174 type : {
@@ -185,7 +185,7 @@ describe('defineTokens', () => {
185185 } ) ;
186186
187187 it ( 'should handle compound variants' , ( ) => {
188- const { styles } = defineTokens ( {
188+ const { sva } = defineTokens ( {
189189 colors : {
190190 primary : '#000000' ,
191191 } ,
@@ -194,7 +194,7 @@ describe('defineTokens', () => {
194194 } ,
195195 } ) ;
196196
197- const result = styles ( {
197+ const result = sva ( {
198198 base : { } ,
199199 variants : {
200200 size : { small : { } } ,
@@ -218,13 +218,13 @@ describe('defineTokens', () => {
218218 } ) ;
219219
220220 it ( 'should ignore missing token references' , ( ) => {
221- const { styles } = defineTokens ( {
221+ const { sva } = defineTokens ( {
222222 colors : {
223223 primary : '#000000' ,
224224 } ,
225225 } ) ;
226226
227- const result = styles ( {
227+ const result = sva ( {
228228 base : {
229229 backgroundColor : '$colors.nonexistent' ,
230230 color : '$colors.primary' ,
@@ -238,15 +238,15 @@ describe('defineTokens', () => {
238238 } ) ;
239239
240240 it ( 'should support all allowed token categories' , ( ) => {
241- const { styles } = defineTokens ( {
241+ const { sva } = defineTokens ( {
242242 colors : { primary : '#000000' } ,
243243 space : { sm : 8 } ,
244244 fontSizes : { base : 16 } ,
245245 fonts : { body : 'Arial' } ,
246246 lineHeight : { normal : 1.5 } ,
247247 } ) ;
248248
249- const result = styles ( {
249+ const result = sva ( {
250250 base : {
251251 color : '$colors.primary' ,
252252 padding : '$space.sm' ,
0 commit comments