import { CSSProperties, FocusEventHandler, ReactNode } from 'react'; import { FieldSize } from '../field-styles'; export interface SelectChangeEvent { target: { value: T; name?: string; }; } /** * @figmaNode wXrXt5uKNNzV2DnQCgyYZH#15561-37391 * The trigger is the outlined **Input field** (shared `field-styles`: 40px, focus gama-400, hover * gama-300); the dropdown is **Menus** (node 16073-19226). Figma field **State** (Enabled/Hovered/ * Focused/Error/Disabled/Read-only) ← open/focus + `error`/`disabled`/`readOnly`; **Filled** ← `value`. */ export interface StyledSelectProps { /** @figmaProp none — test hook */ dataTest: string; /** @figmaProp Filled + trigger display value */ value?: unknown; /** @figmaProp Filled (initial, uncontrolled) */ defaultValue?: unknown; onChange?: (event: SelectChangeEvent, child: ReactNode) => void; /** * rendering**: the trigger value is Body Base 16px and the field is 40px at every size (a smaller * size only changed text before; Figma field text is 16/lh24 regardless). Kept so `size="small"` * call sites still compile. Ignored on purpose (not destructured). */ size?: FieldSize; /** @figmaProp State = true→"Error" */ error?: boolean; errorText?: string; helperText?: ReactNode; reserveHelperText?: boolean; expandHelperText?: boolean; /** @figmaProp Clear (trigger clear button) */ allowClear?: boolean; /** @figmaProp State = true→"Disabled" */ disabled?: boolean; /** @figmaProp State = true→"Read-only" */ readOnly?: boolean; name?: string; /** @figmaProp Placeholder text (resting) */ placeholder?: string; displayEmpty?: boolean; multiple?: boolean; renderValue?: (value: unknown) => ReactNode; fullWidth?: boolean; className?: string; style?: CSSProperties; /** Accepted for API parity; `standard` renders borderless (calendar month/year dropdowns). * `string & {}` keeps 'outlined'/'standard' as autocomplete hints without TS treating them as * redundant against the `string` fallback (other MUI variant values are accepted and ignored). */ variant?: 'outlined' | 'standard' | (string & {}); sx?: unknown; /** Sets `aria-labelledby` on the trigger — the field's real accessible-name source when a * visible label sits outside the control (MUI `Select` parity; genuinely wired, unlike `size` * above). Without it (and no `name`/placeholder/value text), the trigger has no accessible name * at all — a common gap when a floating/external label isn't referenced. */ labelId?: string; children?: ReactNode; MenuProps?: { className?: string; }; /** Forwarded to the trigger button, merged with the internal focus tracking (e.g. validate on blur). */ onFocus?: FocusEventHandler; onBlur?: FocusEventHandler; } /** * Single-select dropdown (replaces MUI `Select`) — a trigger styled as the outlined field plus a * portalled `role="listbox"`. Reports open/filled into a surrounding `StyledFormControl` so its * TASK-402. */ export declare const StyledSelect: ({ dataTest, value, defaultValue, onChange, error, errorText, helperText, reserveHelperText, expandHelperText, allowClear, disabled, readOnly, name, placeholder, displayEmpty, multiple, renderValue, fullWidth, className, style, sx, variant, children, MenuProps, onFocus, onBlur, labelId, }: StyledSelectProps) => JSX.Element;