@@ -38,7 +38,9 @@ type Props<
3838} & {
3939 traits ?:
4040 | Array < keyof TTraits extends string ? keyof TTraits : never >
41- | Partial < Record < keyof TTraits extends string ? keyof TTraits : never , boolean > > ;
41+ | Partial <
42+ Record < keyof TTraits extends string ? keyof TTraits : never , boolean >
43+ > ;
4244} & {
4345 [ K in keyof TDynamic ] ?: Parameters < TDynamic [ K ] > [ 0 ] ;
4446} ;
@@ -48,15 +50,13 @@ type Result = {
4850 style ?: CSSProperties ;
4951} ;
5052
51- function mergeStyles (
52- ...styles : ( CSSProperties | undefined ) [ ]
53- ) : CSSProperties {
53+ function mergeStyles ( ...styles : ( CSSProperties | undefined ) [ ] ) : CSSProperties {
5454 return Object . assign ( { } , ...styles . filter ( Boolean ) ) ;
5555}
5656
5757function processTraits < TTraits extends Record < string , ClassValue > > (
5858 traits : TTraits ,
59- propsTraits ?: Props < { } , TTraits > [ "traits" ]
59+ propsTraits ?: Props < { } , TTraits > [ "traits" ] ,
6060) : ClassValue [ ] {
6161 if ( ! propsTraits ) return [ ] ;
6262
@@ -77,7 +77,7 @@ function processTraits<TTraits extends Record<string, ClassValue>>(
7777
7878function processDynamic < TDynamic extends Record < string , DynamicResolver > > (
7979 dynamic : TDynamic ,
80- props : Props < { } , { } , TDynamic >
80+ props : Props < { } , { } , TDynamic > ,
8181) : { className : ClassValue [ ] ; style : CSSProperties } {
8282 const classNameParts : ClassValue [ ] = [ ] ;
8383 const styles : CSSProperties [ ] = [ ] ;
@@ -106,13 +106,12 @@ function processDynamic<TDynamic extends Record<string, DynamicResolver>>(
106106}
107107
108108function processScopes < TScopes extends Record < string , ClassValue > > (
109- scopes : TScopes
109+ scopes : TScopes ,
110110) : ClassValue [ ] {
111111 return Object . entries ( scopes ) . map ( ( [ scopeName , scopeClasses ] ) => {
112- const classesStr = typeof scopeClasses === "string"
113- ? scopeClasses
114- : clsx ( scopeClasses ) ;
115-
112+ const classesStr =
113+ typeof scopeClasses === "string" ? scopeClasses : clsx ( scopeClasses ) ;
114+
116115 return classesStr
117116 . split ( / \s + / )
118117 . filter ( Boolean )
@@ -127,7 +126,7 @@ export function windCtrl<
127126 TDynamic extends Record < string , DynamicResolver > = { } ,
128127 TScopes extends Record < string , ClassValue > = { } ,
129128> (
130- config : Config < TVariants , TTraits , TDynamic , TScopes >
129+ config : Config < TVariants , TTraits , TDynamic , TScopes > ,
131130) : ( props ?: Props < TVariants , TTraits , TDynamic > ) => Result {
132131 const {
133132 base,
@@ -184,11 +183,10 @@ export function windCtrl<
184183 const finalClassName = twMerge ( clsx ( classNameParts ) ) ;
185184
186185 const hasStyle = Object . keys ( mergedStyle ) . length > 0 ;
187-
186+
188187 return {
189188 className : finalClassName ,
190189 ...( hasStyle && { style : mergedStyle } ) ,
191190 } ;
192191 } ;
193192}
194-
0 commit comments