diff --git a/packages/react/src/styled.tsx b/packages/react/src/styled.tsx index aa287248..af357c97 100644 --- a/packages/react/src/styled.tsx +++ b/packages/react/src/styled.tsx @@ -5,7 +5,6 @@ import type { OrderedSXResolved, StyleIds, ComponentProps, - UtilityProps, IVerbosedTheme, ITheme, ExtendedConfigType, @@ -996,12 +995,7 @@ export function verboseStyled( // sxHash: BUILD_TIME_sxHash = '', ...componentProps }: Omit< - Omit & - Partial> & - Partial> & { - as?: any; - children?: any; - }, + ComponentProps, 'animationComponentGluestack' >, ref: React.ForwardedRef

diff --git a/packages/react/src/types.ts b/packages/react/src/types.ts index 5b80e98f..ededf14b 100644 --- a/packages/react/src/types.ts +++ b/packages/react/src/types.ts @@ -735,61 +735,71 @@ interface GenericComponents { /********************* COMPONENT PROPS TYPE *****************************************/ export type ComponentProps = - SxStyleProps< - GenericComponentStyles, - Variants, - P, - 'animationComponentGluestack' extends keyof P - ? P['animationComponentGluestack'] extends true - ? Plugins - : [] - : [] - > & { - states?: { - [K in IState]?: boolean; - }; - } & (GSConfig['globalStyle'] extends object - ? { - [Key in keyof MergeNestedThree< - GlobalVariants, - Variants, - // @ts-ignore - Components[`${ComCon}`]['theme']['variants'] - >]?: keyof MergeNestedThree< - GlobalVariants, - Variants, - // @ts-ignore - Components[`${ComCon}`]['theme']['variants'] - >[Key] extends 'true' | 'false' - ? boolean - : keyof MergeNestedThree< - GlobalVariants, - Variants, - // @ts-ignore - Components[`${ComCon}`]['theme']['variants'] - >[Key]; - } & Omit - : { - [Key in keyof MergeNested< - Variants, - // @ts-ignore - Components[`${ComCon}`]['theme']['variants'] - >]?: keyof MergeNested< - Variants, // @ts-ignore - Components[`${ComCon}`]['theme']['variants'] - >[Key] extends 'true' | 'false' - ? boolean - : keyof MergeNested< - Variants, - // @ts-ignore - Components[`${ComCon}`]['theme']['variants'] - >[Key]; - }); + Partial< + Omit & + SxStyleProps< + GenericComponentStyles, + Variants, + P, + 'animationComponentGluestack' extends keyof P + ? P['animationComponentGluestack'] extends true + ? Plugins + : [] + : [] + > & { + as?: any; + children?: any; + } & UtilityProps & { + states?: { + [K in IState]?: boolean; + }; + } & (GSConfig['globalStyle'] extends object + ? { + [Key in keyof MergeNestedThree< + GlobalVariants, + Variants, + // @ts-ignore + Components[`${ComCon}`]['theme']['variants'] + >]?: keyof MergeNestedThree< + GlobalVariants, + Variants, + // @ts-ignore + Components[`${ComCon}`]['theme']['variants'] + >[Key] extends 'true' | 'false' + ? boolean + : keyof MergeNestedThree< + GlobalVariants, + Variants, + // @ts-ignore + Components[`${ComCon}`]['theme']['variants'] + >[Key]; + } & Omit + : { + [Key in keyof MergeNested< + Variants, + // @ts-ignore + Components[`${ComCon}`]['theme']['variants'] + >]?: keyof MergeNested< + Variants, // @ts-ignore + Components[`${ComCon}`]['theme']['variants'] + >[Key] extends 'true' | 'false' + ? boolean + : keyof MergeNested< + Variants, + // @ts-ignore + Components[`${ComCon}`]['theme']['variants'] + >[Key]; + }) + >; -export type UtilityProps = TokenizedRNStyleProps< - GetRNStyles +export type UtilityProps = Omit< + TokenizedRNStyleProps>, + keyof GenericComponentProps > & - AliasesProps>; + Omit< + AliasesProps>, + keyof GenericComponentProps + >; /********************* UTILITY TYPE *****************************************/