import * as react from 'react'; import { ReactNode, ReactElement, SyntheticEvent, ComponentProps } from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { BoxProps } from '../../box/src/Box.js'; import { OmitInternalProps } from '../../shared/src/types.js'; import { OverlayProps } from '../../overlay/src/Overlay.js'; import { ResponsiveProp } from '../../styling/src/useResponsiveValue.js'; import { PopupProps } from '../../overlay/src/usePopup.js'; import { AbstractInputProps } from '../../input/src/types.js'; import '../../styling/src/styled-system/props-handler.js'; import 'csstype'; import '../../shared/src/type-fest.js'; import '../../styling/src/styled-system/StylingContext.js'; import '../../styling/src/BreakpointProvider.js'; import '../../shared/src/useMergedRefs.js'; import '../../shared/src/useFocusScope.js'; import '../../shared/src/useFocusManager.js'; import '../../overlay/src/useOverlayPosition.js'; import '@popperjs/core'; import '../../overlay/src/usePopupAriaProps.js'; import '../../group/src/Group.js'; import '../../layout/src/Flex.js'; declare const DefaultElement = "input"; interface InnerAutocompleteProps extends PopupProps, Omit, "zIndex"> { /** * This describes the area that the element will be checked for overflow relative to. */ boundaryElement?: HTMLElement; /** * 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; /** * An autocomplete trigger can vary in size. */ size?: ResponsiveProp<"sm" | "md">; /** * A controlled autocomplete value. */ value?: string | null; /** * Additional props to render on the wrapper element. */ wrapperProps?: Partial; } declare function InnerAutocomplete(props: InnerAutocompleteProps): react_jsx_runtime.JSX.Element; declare namespace InnerAutocomplete { var defaultElement: string; } /** * An autocomplete is a normal text input enhanced by a panel of suggested options. * * [Documentation](https://wl-orbiter-website.netlify.app/?path=/docs/autocomplete--default-story) */ declare const Autocomplete: react.ForwardRefExoticComponent, "ref"> & react.RefAttributes>; type AutocompleteProps = ComponentProps; export { Autocomplete, type AutocompleteProps, InnerAutocomplete, type InnerAutocompleteProps };