// Type definitions for tailwind-to-style/react import { ComponentType, ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react'; // ============================================================================ // styled() // ============================================================================ type IntrinsicElement = keyof JSX.IntrinsicElements; interface StyledConfig> = {}> { name?: string; base?: string; variants?: V; defaultVariants?: { [K in keyof V]?: keyof V[K] }; compoundVariants?: Array<{ class?: string; className?: string; [key: string]: any }>; slots?: Record; } type VariantProps>> = { [K in keyof V]?: keyof V[K]; }; type StyledComponent< T extends IntrinsicElement | ComponentType, V extends Record> > = ForwardRefExoticComponent< PropsWithoutRef< (T extends IntrinsicElement ? JSX.IntrinsicElements[T] : T extends ComponentType ? P : never) & VariantProps & { className?: string } > & RefAttributes > & { variants: any; raw: StyledConfig; }; export declare function styled< T extends IntrinsicElement | ComponentType, V extends Record> = {} >( element: T, config?: StyledConfig ): StyledComponent; // ============================================================================ // ThemeProvider & useTheme // ============================================================================ interface ThemeProviderProps { theme: Record; name?: string; children: React.ReactNode; } interface ThemeContextValue { theme: Record; setTheme: (newTheme: Record) => void; tokens: Record; } export declare function ThemeProvider(props: ThemeProviderProps): JSX.Element; export declare function useTheme(): ThemeContextValue; // ============================================================================ // useTws // ============================================================================ export declare function useTws(classes: string): Record;