import { IconComponent } from '../../Icons/types'; import { CardBackgroundProps } from '../CardBackground/CardBackground'; export type InputState = "default" | "error" | "success" | "warning"; export type InputSize = "small" | "medium" | "large"; export interface RenderValueProps { value: string | undefined; state: InputState; disabled: boolean; size: InputSize; } export interface SlotActionsProps { state: InputState; disabled: boolean; size: InputSize; onClear: () => void; } export interface InputProps extends Omit, "size" | "onChange"> { value?: string; onChange?: (event: React.ChangeEvent) => void; placeholder?: string; name?: string; type?: "text" | "email" | "password" | "number" | "tel" | "url"; size?: InputSize; className?: string; style?: React.CSSProperties; state?: InputState; disabled?: boolean; readOnly?: boolean; required?: boolean; label?: string; supportingText?: React.ReactNode | (() => React.ReactNode); showSupportingText?: boolean; leadingIcon?: IconComponent; renderValue?: React.ReactNode | ((props: RenderValueProps) => React.ReactNode); slotActions?: React.ReactNode | ((props: SlotActionsProps) => React.ReactNode); hideClearButton?: boolean; onClear?: () => void; /** * When true, the container uses min-height instead of fixed height, * allowing it to grow when renderValue content wraps. * Only meaningful when renderValue is provided. */ flexibleHeight?: boolean; cardBackground?: Omit; onFocus?: (event: React.FocusEvent) => void; onBlur?: (event: React.FocusEvent) => void; onKeyDown?: (event: React.KeyboardEvent) => void; onKeyUp?: (event: React.KeyboardEvent) => void; } /** @deprecated Use InputState instead */ export type InputVariant = InputState; /** @deprecated No longer used — label is always static */ export type LabelVariant = "default" | "static"; export interface LegacyInputProps { variant?: "default" | "error" | "success"; /** @deprecated No longer used — label is always static */ labelVariant?: "default" | "static"; /** @deprecated Deprecated use supportingText instead */ errorComponent?: React.ReactNode | string; /** @deprecated Deprecated use supportingText instead */ helperComponent?: React.ReactNode | string; /** @deprecated Deprecated use leadingIcon/slotActions for icons */ icon?: React.ReactNode; /** @deprecated Deprecated in favor of leadingIcon, for right icons use actions slot*/ iconPosition?: "left" | "right"; isFetching?: boolean; onClickIcon?: (event: React.MouseEvent) => void; } /** @internal — allows legacy props during migration period */ export type InputPropsWithLegacy = InputProps & Partial;