import React, { ReactNode } from 'react'; import { WrappedComponentProps } from 'react-intl'; import { Sentiment, SizeMedium, SizeLarge } from '../common'; import { InlinePromptProps } from '../prompt'; export type TypeaheadOption = { label: string; note?: string; secondary?: string; value?: T; clearQueryOnSelect?: boolean; keepFocusOnSelect?: boolean; }; export interface TypeaheadProps extends Partial { id: string; name: string; addon?: ReactNode; /** * @deprecated Use [`Field`](?path=/docs/forms-field--docs) component and its `message` and `sentiment` props instead. * @deprecated `error`, `info` and `success` are deprecated as alert types and will be soon removed. */ alert?: { message: InlinePromptProps['children']; type?: InlinePromptProps['sentiment'] | `${Sentiment.ERROR}` | `${Sentiment.INFO}` | `${Sentiment.SUCCESS}`; }; /** @default false */ allowNew?: boolean; /** @default true */ autoFillOnBlur?: boolean; /** @default false */ autoFocus?: boolean; /** @default [] */ chipSeparators?: readonly string[]; /** @default true */ clearable?: boolean; footer?: ReactNode; /** @default [] */ initialValue?: readonly TypeaheadOption[]; /** @default 'new-password' */ inputAutoComplete?: string; maxHeight?: number; /** @default 3 */ minQueryLength?: number; placeholder?: string; /** @default false */ multiple?: boolean; options: readonly TypeaheadOption[]; /** @default 200 */ searchDelay?: number; /** @default true */ showSuggestions?: boolean; /** @default true */ showNewEntry?: boolean; /** @default 'md' */ size?: SizeMedium | SizeLarge; onBlur?: () => void; onChange: (options: TypeaheadOption[]) => void; onFocus?: () => void; onInputChange?: (query: string) => void; onSearch?: (query: string) => void; validateChip?: (chip: TypeaheadOption) => boolean; } declare const _default: (props: TypeaheadProps) => React.ReactElement; export default _default; //# sourceMappingURL=Typeahead.d.ts.map