import React from 'react'; export type SelectSize = 'sm' | 'md' | 'lg'; export interface SelectOption { value: string; label: string; isDisabled?: boolean; } export interface SelectProps extends Omit, 'size' | 'disabled'> { /** Matches the Figma `Size` variant: Small, Medium, Large. */ size?: SelectSize; /** * The options to render. Omit and pass `children` for grouped options. * * `readonly` because an options list is almost always a module-level constant, * and `as const` on one produces a readonly array that a mutable parameter * rejects. The component only ever maps over it, so demanding a mutable array * bought nothing and cost callers a spread or a cast. */ options?: readonly SelectOption[]; /** * Text shown when nothing is selected. Renders as a disabled option so the * field can start empty without that being a valid choice. */ placeholder?: string; /** Field label. Renders the Figma `Form Field` wrapper around the control. */ label?: React.ReactNode; /** Helper text below the field. */ description?: React.ReactNode; /** Replaces the helper text when `isInvalid` is set. */ errorMessage?: React.ReactNode; isInvalid?: boolean; isDisabled?: boolean; /** * @deprecated Use `isDisabled`. Accepted as an alias for one minor version. */ disabled?: boolean; /** * Class names for the control box (`.ion-select`). Always lands here — * never on the form-field wrapper. Use `wrapperClassName` for that. */ className?: string; /** Class names for the `.ion-field` wrapper when a label or helper is shown. */ wrapperClassName?: string; } /** * Select wraps a native `