import { InputTextProps } from '../../common/components/input-text/InputText'; import { BaseInputFieldProps } from '../../common/types/input'; import { ChangeEvent, HTMLInputTypeAttribute } from 'react'; type ComboboxTypes = Extract; export interface ComboboxItem { selected?: boolean; value: string; } export interface ComboboxLocalization { addButtonLabel: string; selectedItemsLabel: string; } export interface ComboboxValue { itemAdded?: string; itemsSelected?: ComboboxItem[]; itemsUpdated?: ComboboxItem[]; value?: string; } export type ComboboxOnChangeEvent = ChangeEvent | undefined; export type ComboboxOnChange = (event: ComboboxOnChangeEvent, value: ComboboxValue) => void; export interface ComboboxProps extends BaseInputFieldProps, Omit { /** Limit the max height of the list and let it scroll */ feMaxHeight?: number; /** Item array that populate the suggestion list. * Array contains objects with value and optional selected keys. */ items?: ComboboxItem[]; /** The intended type of text. Affects autocomplete and native interface controls. */ localization?: ComboboxLocalization; /** if true, Multiselect */ multiselect?: boolean; /** Callback that will fire anytime the value of the input changes as well as when items are added and selected. */ onChange?: ComboboxOnChange; /** The intended type of text. Affects autocomplete and native interface controls. */ type?: ComboboxTypes; } /** * controlled * uncontrolled * * The `` component is a custom "combobox" that retains the accessible functionality of its native html `` and '' element.
* It makes use of the Ferris Input component under the hood and as such it accepts the same attributes plus those needed for the datalist to be populated. * Most notably the item attribute. The onChange emits an object with a component state snapshot after each user interction. * * See [InVision DSM about the Input component in general](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/folder/5ea69e1060bb932b88de53b9?version=63452bff323a732f447a11e6&mode=preview) for design principles. */ declare const Combobox: import("react").ForwardRefExoticComponent>; export default Combobox;