import { O as ObjectKeyArrayPicker, a as ObjectKeyPicker } from './types-BXKyjXhG.js'; import cx, { ClassValue } from './cx.js'; import 'csstype'; type ClassVariantRecord = Record>; type ClassVariantExtendProps = { className: ClassValue; }; interface ClassVariantDefinition { base?: ClassValue; variants?: T; compoundVariants?: (ObjectKeyArrayPicker & ClassVariantExtendProps)[]; defaultVariants?: ObjectKeyPicker; classNameResolver?: typeof cx; } type ClassVariantFnProps = T extends undefined ? Partial : ObjectKeyPicker & Partial; type ClassVariantFn = (props?: ClassVariantFnProps) => string; type ClassVariantCreatorFn = (config: ClassVariantDefinition) => ClassVariantFn; /** * Creates a class variant function that combines base classes, variants, compound variants, and default variants. * * @template T - Type of the variant record * @param config - Configuration object for creating class variants * @returns A function that accepts variant props and returns a combined class string * * @example * ```typescript * const button = cv({ * base: 'px-4 py-2 rounded', * variants: { * color: { * primary: 'bg-blue-500 text-white', * secondary: 'bg-gray-500 text-white' * }, * size: { * sm: 'text-sm', * lg: 'text-lg' * } * }, * defaultVariants: { * color: 'primary', * size: 'sm' * } * }); * * button(); // => 'px-4 py-2 rounded bg-blue-500 text-white text-sm' * button({ color: 'secondary' }); // => 'px-4 py-2 rounded bg-gray-500 text-white text-sm' * ``` */ declare const cv: ClassVariantCreatorFn; export { type ClassVariantCreatorFn, type ClassVariantDefinition, type ClassVariantExtendProps, type ClassVariantFn, type ClassVariantFnProps, type ClassVariantRecord, cv, cv as default };