import { BoxProps } from "../../box"; import { ComponentProps, ReactElement, ReactNode, SyntheticEvent } from "react"; import { OmitInternalProps } from "../../shared"; import { OverlayProps, PopupProps } from "../../overlay"; import { ResponsiveProp } from "../../styling"; import { AbstractInputProps } from "../../input"; declare const DefaultElement = "input"; export interface InnerAutocompleteProps extends PopupProps, Omit, "zIndex"> { /** * React children. */ children: ReactNode; /** * Whether or not the query should be cleared when a result is selected. */ clearOnSelect?: boolean; /** * The default value of `value` when uncontrolled. */ defaultValue?: string; /** * Whether or not the autocomplete take up the width of its container. */ fluid?: ResponsiveProp; /** * A trigger icon. */ icon?: ReactElement; /** * Whether or not the autocomplete should display a loading state. */ loading?: boolean; /** * Minimum characters to query for results. */ minCharacters?: number; /** * Message to display when there are no results matching the query. */ noResultsMessage?: string; /** * Called when the input query change and new search results are expected. * @param {SyntheticEvent} event - React's original event. * @param {string} query - The search query. * @returns {void} */ onSearch?: (event: SyntheticEvent, query: string) => void; /** * Called when the autocomplete value change. * @param {SyntheticEvent} event - React's original event. * @param {Object} selection - The new selection. * @param {string} selection.key - The selected key. * @param {string} selection.value - The selected value. * @returns {void} */ onSelectionChange?: (event: SyntheticEvent, selection: { key: string; value: string; }) => void; /** * Additional props to render on the menu of options. */ overlayProps?: Partial; /** * A controlled autocomplete value. */ value?: string | null; /** * Additional props to render on the wrapper element. */ wrapperProps?: Partial; } export declare function InnerAutocomplete(props: InnerAutocompleteProps): JSX.Element; export declare namespace InnerAutocomplete { var defaultElement: string; } /** * An autocomplete is a normal text input enhanced by a panel of suggested options. * * [Documentation](https://orbit.sharegate.design/?path=/docs/autocomplete--default-story) */ export declare const Autocomplete: import("react").ForwardRefExoticComponent, "ref"> & import("react").RefAttributes>; export declare type AutocompleteProps = ComponentProps; export {};