import type { VariantProps } from 'class-variance-authority'; import type { SlotOverrides } from '../../../core/types'; import type { buttonVariants, ButtonSlot } from './Button.styles'; /** Button interaction state. */ interface IButtonState { /** Whether the button is disabled. */ disabled: boolean; /** Whether the button is being pressed. */ pressed: boolean; } /** * Props for the Button component. * * Supports state-based className/style functions, asChild composition, * and custom render elements via Base UI. * * @example * ```tsx * * * * ``` */ interface IButtonProps extends Omit, 'className' | 'style'>, VariantProps { /** Keep button focusable when disabled. */ focusableWhenDisabled?: boolean; /** Whether the rendered element is a native button. */ nativeButton?: boolean; /** Render as child element (Slot pattern). */ asChild?: boolean; /** Custom render element or function. */ render?: React.ReactElement | ((props: React.HTMLProps, state: IButtonState) => React.ReactElement); /** CSS class or function returning class based on button state. */ className?: string | ((state: IButtonState) => string | undefined); /** CSS styles or function returning styles based on button state. */ style?: React.CSSProperties | ((state: IButtonState) => React.CSSProperties | undefined); /** Override classes for button visual regions. */ slots?: SlotOverrides; } /** Available button variants. */ type ButtonVariant = 'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link' | 'success' | 'warning' | 'bare'; /** Available button sizes. */ type ButtonSize = 'default' | 'sm' | 'lg' | 'icon' | 'bare'; export type { IButtonProps, IButtonState, ButtonVariant, ButtonSize }; //# sourceMappingURL=Button.types.d.ts.map