import { ChangeEvent, CSSProperties, FocusEvent, HTMLAttributes, InputHTMLAttributes, ReactNode, Ref } from 'react'; import { FieldSize } from '../field-styles'; interface InputSlot { startAdornment?: ReactNode; endAdornment?: ReactNode; className?: string; style?: CSSProperties; ref?: Ref; [key: string]: unknown; } type HtmlInputSlot = InputHTMLAttributes & { ref?: Ref; }; /** * @figmaNode wXrXt5uKNNzV2DnQCgyYZH#15561-37391 * Figma "Input field" component. The Figma **State** property (Enabled/Hovered/Active-Focused/ * Error/Disabled/Read only) is driven by native focus/hover + the `error`/`disabled`/`readOnly` * props; **Filled** (on/off) is derived from `value`/`defaultValue`. **Unify** and **Mixed state** * are Figma-authoring properties with no React counterpart. Non-annotated props are behavioral / */ export interface StyledInputFieldProps { /** @figmaProp none — test hook */ dataTest: string; /** @figmaProp Label element (floating) */ label?: ReactNode; /** @figmaProp Filled = (value != '')→"on" | else→"off" */ value?: string | number; /** @figmaProp Filled = (defaultValue != '')→"on" | else→"off" */ defaultValue?: string | number; onChange?: (event: ChangeEvent) => void; onBlur?: (event: FocusEvent) => void; onFocus?: (event: FocusEvent) => void; /** @figmaProp State = true→"Error" */ error?: boolean; /** @figmaProp Helper text element */ helperText?: ReactNode; reserveHelperText?: boolean; expandHelperText?: boolean; /** @figmaProp State = true→"Disabled" */ disabled?: boolean; /** @figmaProp State = true→"Read only" */ readOnly?: boolean; required?: boolean; allowClear?: boolean; onClear?: () => void; type?: string; placeholder?: string; name?: string; id?: string; /** * Standard HTML `autocomplete`. Left unset the browser decides, which is what a plain text field * wants; a component that owns its own suggestion list (a combobox) must pass `'off'` so the * browser's dropdown doesn't cover it. Also readable from `slotProps.htmlInput.autoComplete`. */ autoComplete?: string; autoFocus?: boolean; multiline?: boolean; rows?: number; minRows?: number; maxRows?: number; size?: FieldSize; /** Accepted for API parity; the design always renders outlined. */ variant?: string; fullWidth?: boolean; className?: string; style?: CSSProperties; sx?: unknown; inputRef?: Ref; slotProps?: { input?: InputSlot; htmlInput?: HtmlInputSlot; inputLabel?: HTMLAttributes & Record; formHelperText?: { sx?: unknown; className?: string; hideErrorIcon?: boolean; }; }; /** Legacy MUI adornment slot (still used by ~22 call sites). */ InputProps?: InputSlot; onKeyDown?: (event: React.KeyboardEvent) => void; /** Forwarded to the field root (MUI `TextField` parity); e.g. to stop clicks bubbling to a sortable header. */ onClick?: (event: React.MouseEvent) => void; } /** * Outlined text field with a floating label (replaces MUI `TextField`). Self-contained: manages its * own focus/value state to drive the shared field styling ([[field-styles]]); supports multiline, * start/end adornments, an optional clear button, and error/helper text. Public props preserved * * ponytail: `variant` is accepted but always renders outlined, and multiline uses fixed `rows` * (no auto-grow to `maxRows`) — known ceilings; Chromatic in CI is the visual gate. */ export declare const StyledInputField: ({ dataTest, label, value, defaultValue, onChange, onBlur, onFocus, error, helperText, reserveHelperText, expandHelperText, disabled, readOnly, required, allowClear, onClear, type, placeholder, name, id, autoComplete, autoFocus, multiline, rows, minRows, maxRows, size, fullWidth, className, style, sx, inputRef, slotProps, InputProps, onKeyDown, onClick, variant: _variant, }: StyledInputFieldProps) => JSX.Element; export {};