import { type TextInput as RNTextInput } from "react-native"; import { type LayoutStyle, type MeasureProps } from "../../style/index.js"; import { type AutocompleteSkin, type Size } from "./autocomplete.styles.js"; /** An Autocomplete option with a short trailing detail (a version, a platform, a count). */ export interface AutocompleteOption { /** The option's text: what the field shows once it is chosen and what the query matches. */ label: string; /** A short muted detail at the row's end, in the mono face ("0.86", "web"). Content, not styling. */ detail?: string; } export interface AutocompleteProps extends MeasureProps { /** * The text typed into the field (controlled). Filters the option list. Omit * and use `defaultQuery` for uncontrolled use: a bare Autocomplete is typeable * out of the box. */ query?: string; /** Initial query for uncontrolled use. */ defaultQuery?: string; /** * Fired with the new query on each keystroke, and with "" when a select * resets the filter (both modes). */ onQueryChange?: (query: string) => void; /** * The full list of selectable options: bare labels, or `{ label, detail }` objects whose * `detail` sits muted at the row's end (a version, a platform). The label is what the * query matches and what `value` holds. */ options?: Array; /** The selected option label (CONTROLLED), or "" for no selection. Omit for uncontrolled use. */ value?: string; /** Initial selected option for uncontrolled use (selecting a row updates it). */ defaultValue?: string; /** Fired on selection and with "" when the field is cleared, in both controlled and uncontrolled modes. */ onValueChange?: (value: string) => void; /** Prompt shown in the field when there is no query or value. */ placeholder?: string; /** * Whether the option list is open (CONTROLLED). Uncontrolled and closed by * default; focusing or typing in the field opens it, the chevron toggles it. * Pass `open` to pin it open, or `defaultOpen` to render it open initially * while staying interactive. A disabled control stays closed regardless. */ open?: boolean; /** Render the list open initially for uncontrolled use (selecting or the chevron closes it). */ defaultOpen?: boolean; /** Fired when the open state changes (focus, typing, chevron, select). */ onOpenChange?: (open: boolean) => void; /** * The field's persistent label. Its placement is platform-adaptive: * * iOS and web * render it ABOVE the field; Android renders the Material 3 in-container FLOATING * label (centered like a placeholder at rest, floating to the top once the list * opens or a value fills the field). * * * iOS renders it ABOVE the field. * * * Android renders the Material 3 in-container FLOATING label (centered like a * placeholder at rest, floating to the top once the list opens or a value fills the field). * * The label names the field for assistive tech. */ label?: string; /** * Marks the field as required: appends a destructive "*" to the label (decorative, * never in the accessible name) and announces the field as required, * * through * aria-required on the web and with the word in its name ("Assigned to, required") * on iOS and Android. * * * with the word in its name ("Assigned to, required"). * * The star and the spoken word take effect only alongside `label`. */ required?: boolean; /** Optional muted helper line rendered below the option list. */ helperText?: string; /** Dims the control and blocks interaction. */ disabled?: boolean; /** Called when an option is chosen by touch, pointer, or keyboard. Clearing only fires onValueChange. */ onSelect?: (option: string) => void; /** E2E hook forwarded to the text field. */ testID?: string; small?: boolean; large?: boolean; /** Composition within a parent only, never a restyle hook and never a width: the parent layout container provides the bounds. */ style?: LayoutStyle; } export declare function sizeOf(p: AutocompleteProps): Size; /** Build an Autocomplete component from a platform skin. */ export declare function createAutocomplete(skin: AutocompleteSkin): import("react").ForwardRefExoticComponent>; //# sourceMappingURL=autocomplete.shared.d.ts.map