/** * Autocomplete - a free-text input with a suggestions dropdown. Unlike * {@link Combobox} (where the value must be one of the listed options), the * value here is *whatever the user types*; suggestions are optional completions * that fill the input when chosen. It reuses the zero-dependency `combobox` * adapter for its mechanics (filtering, `aria-activedescendant` keyboard nav, * open/dismiss, token-scope portalling) - swap it via `UIAdapterProvider` like * any other primitive. * * @example * ```tsx * import { Autocomplete, AutocompleteContent, AutocompleteInput, AutocompleteItem } from "veryfront/ui"; * * * * * {suggestions.map((s) => )} * * ; * ``` * * @module react/components/ui/autocomplete */ import * as React from "react"; /** Props accepted by `` (the root; owns the input text + open state). */ export interface AutocompleteProps { /** `AutocompleteInput` + `AutocompleteContent` parts to compose. */ children: React.ReactNode; /** Initial input text when uncontrolled. */ defaultValue?: string; /** Fires with the current text on every change - typing OR choosing a suggestion. */ onValueChange?: (value: string) => void; /** Controlled open state of the suggestions list (pair with `onOpenChange`). */ open?: boolean; /** Initial open state when uncontrolled. */ defaultOpen?: boolean; /** Fires when the suggestions list opens or closes. */ onOpenChange?: (open: boolean) => void; } /** Autocomplete root - renders no node of its own (state + context only). */ export declare function Autocomplete({ children, defaultValue, onValueChange, open, defaultOpen, onOpenChange, }: AutocompleteProps): React.ReactElement; /** Props accepted by ``. */ export interface AutocompleteInputProps extends React.InputHTMLAttributes { /** React 19: ref is a regular prop. */ ref?: React.Ref; } /** The free-text input that drives the suggestions. */ export declare function AutocompleteInput({ className, ...props }: AutocompleteInputProps): React.ReactElement; /** Props accepted by ``. */ export interface AutocompleteContentProps extends React.HTMLAttributes { /** React 19: ref is a regular prop. */ ref?: React.Ref; } /** The floating `role="listbox"` of suggestions, shown while typing. */ export declare function AutocompleteContent({ className, children, ...props }: AutocompleteContentProps): React.ReactElement | null; /** Props accepted by ``. */ export interface AutocompleteItemProps extends Omit, "onSelect"> { /** The suggestion text - filled into the input when chosen, and used for filtering. */ value: string; /** Disable this suggestion and dim it. */ disabled?: boolean; /** React 19: ref is a regular prop. */ ref?: React.Ref; } /** A single suggestion. Fills the input when chosen; hides when it doesn't match. */ export declare function AutocompleteItem({ value, disabled, className, children, onClick, ref, ...props }: AutocompleteItemProps): React.ReactElement | null; //# sourceMappingURL=autocomplete.d.ts.map