export declare const mapPropsVariants: , K extends keyof T>(props: T, variantKeys?: K[], removeVariantProps?: boolean) => readonly [Omit | T, Pick | {}]; /** * Utility for creating BEM-style class names with variants */ export type VariantConfig> = { base: string; variants?: T; modifiers?: Record; }; /** * Creates a class name builder for components with variants * @param config - The variant configuration * @returns A function that builds the class name string * * @example * const getButtonClasses = createVariantBuilder({ * base: 'button', * variants: { * size: 'md', * variant: 'primary' * }, * modifiers: { * 'icon-only': isIconOnly * } * }); * // Returns: "button button--md button--primary button--icon-only" */ export declare function createVariantBuilder>(baseClass: string): (config?: { variants?: Partial; modifiers?: Record; }) => string; /** * Alternative API using a more declarative approach */ export interface VariantDefinition> { base: string; variants: V; defaults?: Partial<{ [K in keyof V]: V[K][number]; }>; } /** * Creates a typed variant class builder * @param definition - The variant definition * @returns A function that builds class names based on variant props * * @example * const buttonVariants = createVariants({ * base: 'button', * variants: { * size: ['sm', 'md', 'lg'] as const, * variant: ['primary', 'secondary', 'tertiary', 'ghost', 'danger'] as const, * }, * defaults: { * size: 'md', * variant: 'primary' * } * }); * * const className = buttonVariants({ * size: 'lg', * variant: 'danger', * modifiers: { 'icon-only': true } * }); * // Returns: "button button--lg button--danger button--icon-only" */ export declare function createVariants>(definition: VariantDefinition): (props?: { [K in keyof V]?: V[K][number] | undefined; } & { modifiers?: Record; }) => string; /** * Type helpers for extracting variant props from a variant definition */ export type VariantPropsOf> = T extends (props: infer P) => string ? P : never;