import type { InputHTMLAttributes, ReactNode } from 'react'; import type { SxProp } from '../Layout/sx.js'; export type InputColor = 'primary' | 'danger' | 'warning' | 'success'; export type InputSize = 'sm' | 'md' | 'lg'; export interface InputProps extends Omit, 'size' | 'prefix'> { color?: InputColor; /** Size modifier. `'md'` is the default (no class). */ size?: InputSize; /** Icon / content placed inside the input, left of the text. */ prefix?: ReactNode; /** Icon / content placed inside the input, right of the text. */ suffix?: ReactNode; /** Show a clear button when the input has a value and is not disabled. */ clearable?: boolean; /** Called when the clear button is clicked. */ onClear?: () => void; /** Show a password-visibility toggle. Forces `type="password"` when hidden. */ showPasswordToggle?: boolean; /** Show a live character counter below the input (`n/max` when `maxLength` is set). */ showCount?: boolean; /** * Drop the resting border and sit the field on a tinted surface. For * search-style inputs that need to read as a target against a plain * background (an app header, a toolbar) rather than as a form control. */ filled?: boolean; /** * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx * merges into inline style; responsive sx injects a scoped class. * Applied to the outer affix wrapper, or the input itself when no affixes. */ sx?: SxProp; }