import type { TVVariants, TVDefaultVariants, ClassValue, TVCompoundSlots, TVCompoundVariants, TVProps, TVReturnProps, VariantProps as TVVariantProps } from 'tailwind-variants'; import type { TVConfig } from 'tailwind-variants/dist/config'; type TVSlots = Record | undefined; export type TVA = { , CV extends TVCompoundVariants, DV extends TVDefaultVariants, C extends TVConfig, PV extends TVVariants, PCV extends TVCompoundVariants, B extends ClassValue = undefined, S extends TVSlots = undefined, E extends TVReturnType = TVReturnType, EV extends TVVariants = E['variants'], ES extends TVSlots = E['slots'] extends TVSlots ? E['slots'] : undefined>(options: { /** * Extend allows for easy composition of components. * @see https://www.tailwind-variants.org/docs/composing-components */ extend?: E; /** * Base allows you to set a base class for a component. */ base?: B; /** * Slots allow you to separate a component into multiple parts. * @see https://www.tailwind-variants.org/docs/slots */ slots?: S; /** * Variants allow you to create multiple versions of the same component. * @see https://www.tailwind-variants.org/docs/variants#adding-variants */ variants?: V; /** * Compound variants allow you to apply classes to multiple variants at once. * @see https://www.tailwind-variants.org/docs/variants#compound-variants */ compoundVariants?: CV; /** * Compound slots allow you to apply classes to multiple slots at once. */ compoundSlots?: TVCompoundSlots; /** * Default variants allow you to set default variants for a component. * @see https://www.tailwind-variants.org/docs/variants#default-variants */ defaultVariants?: DV; parentVariants?: PV; parentCompoundVariants?: PCV; }, /** * The config object allows you to modify the default configuration. * @see https://www.tailwind-variants.org/docs/api-reference#config-optional */ config?: C): TVReturnType, S, B, C, EV, ES, E>; }; type UNION = A & B; export type TVReturnType, S extends TVSlots, B extends ClassValue, C extends TVConfig, EV extends TVVariants, ES extends TVSlots, E extends TVReturnType = undefined> = { (props?: TVProps & { parentVariants?: Omit, 'class' | 'className'>; }): HasSlots extends true ? { [K in keyof (ES extends undefined ? {} : ES)]: (slotProps?: TVProps) => string; } & { [K in keyof (S extends undefined ? {} : S)]: (slotProps?: TVProps) => string; } & { [K in TVSlotsWithBase<{}, B>]: (slotProps?: TVProps) => string; } : string; } & TVReturnProps; type HasSlots = S extends undefined ? ES extends undefined ? false : true : true; type TVSlotsWithBase = B extends undefined ? keyof S : keyof S | TVBaseName; type TVBaseName = 'base'; export type VariantProps any> = Omit & { className?: string; }, 'parentVariants'>; export {};