/** * ComboboxOptionText renders the value of a `ComboboxOption` as text but with * 's wrapping the matching and non-matching segments of text. * We don't `React.forwardRef` or spread props because we render multiple spans or * null here. */ export function ComboboxOptionText(): React.JSX.Element; /** * escapeRegexp escapes regexp special characters in `str`. * @param {string} str */ export function escapeRegexp(str: string): string; /** * @typedef {Object} ComboboxContextValue * @prop {string | undefined} id * @prop {boolean} isExpanded * @prop {string | null} navigationValue * @prop {State} state */ /** * useComboboxContext exposes data for a given `Combobox` component to its * descendants. * @returns {ComboboxContextValue} */ export function useComboboxContext(): ComboboxContextValue; /** * @typedef {Object} ComboboxOptionContextValue * @prop {string} value * @prop {number} index */ /** * useComboboxOptionContext exposes data for a given `ComboboxOption` component * to its descendants. * @returns {ComboboxOptionContextValue} */ export function useComboboxOptionContext(): ComboboxOptionContextValue; /** * Combobox renders all context providers and a wrapper HTML element around * our comboxbox solution. */ export const Combobox: React.ForwardRefExoticComponent>; /** * ComboboxInput wraps an `` with a couple extra props that work with * the combobox. */ export const ComboboxInput: React.ForwardRefExoticComponent>; /** * ComboboxPopover contains the popup that renders the list. Because some user * interfaces require to render more than the list itself in the popup, we * need to render this component around the list. */ export const ComboboxPopover: React.ForwardRefExoticComponent>; /** * ComboboxList contains the `ComboboxOption` elements and sets up the proper * aria attributes for the list. */ export const ComboboxList: React.ForwardRefExoticComponent>; /** * ComboboxOption renders an option that is suggested to the user as they * interact with the combobox. */ export const ComboboxOption: React.ForwardRefExoticComponent>; /** * ComboboxButton renders a button that can open/close the list of options. */ export const ComboboxButton: React.ForwardRefExoticComponent>; export type Reducer = (data: StateData, event: MachineEvent) => StateData; export type Transition = (event: MachineEventType, payload?: any) => any; export type ComboboxContextValue = { id: string | undefined; isExpanded: boolean; navigationValue: string | null; state: State; }; export type ComboboxOptionContextValue = { value: string; index: number; }; export type StateData = { lastEventType: Event; navigationValue: string | null; value: string | null; }; export type MachineEvent = { type: Event; value?: string; persistSelection?: boolean; }; import * as React from 'react'; type State = string; declare namespace State { let IDLE: string; let SUGGESTING: string; let NAVIGATING: string; let INTERACTING: string; } type Event = string; declare namespace Event { let CLEAR: string; let CHANGE: string; let INITIAL_CHANGE: string; let NAVIGATE: string; let SELECT_WITH_KEYBOARD: string; let SELECT_WITH_CLICK: string; let ESCAPE: string; let BLUR: string; let INTERACT: string; let FOCUS: string; let OPEN_WITH_BUTTON: string; let OPEN_WITH_INPUT_CLICK: string; let CLOSE_WITH_BUTTON: string; } export {};