import { PopupPosition } from '@dojo/widgets/popup'; import { RenderResult } from '@dojo/framework/core/interfaces'; import { ItemRendererProperties, ListOption, ListItemProperties, MenuItemProperties, ListProperties } from '../list'; export interface TypeaheadProperties { /** Callback called when user selects a value */ onValue(value: ListOption): void; /** The initial selected value */ initialValue?: string; /** Property to determine how many items to render. Defaults to 6 */ itemsInView?: number; /** Placement of the select menu; 'above' or 'below' */ position?: PopupPosition; /** Property to determine if the input is disabled */ disabled?: boolean; /** Sets the helper text of the input */ helperText?: string; /** Boolean to indicate if field is required */ required?: boolean; /** Callback when valid state has changed */ onValidate?(valid?: boolean): void; /** The name property of the input */ name?: string; /** Optional controlled value of the typeahead */ value?: string; /** Callback fired when the input is blurred */ onBlur?(): void; /** Callback fired when the input is focused */ onFocus?(): void; /** Callback to determine if an individual item is disabled */ itemDisabled?: ListProperties['disabled']; /** Flag to indicate if values other than those in the resource can be entered, defaults to true */ strict?: boolean; /** Flag to indicate if drop down arrow should be shown in trailing section of text input, defaults to false */ hasDownArrow?: boolean; /** The kind of typeahead input */ kind?: 'outlined' | 'filled'; } export interface TypeaheadICache { value: string; labelValue: string; lastValue: string | undefined; activeIndex: number; dirty: boolean; expanded: boolean; focused: boolean; focusNode: string; initial: string; valid: boolean | undefined; selectedOption?: ListOption; } export interface TypeaheadChildren { /** The label to show */ label?: RenderResult; /** Custom renderer for item contents */ items?: (item: ItemRendererProperties, props: ListItemProperties & MenuItemProperties) => RenderResult; leading?: RenderResult; } export declare const Typeahead: import("@dojo/framework/core/interfaces").OptionalWNodeFactory<{ properties: TypeaheadProperties & import("@dojo/framework/core/interfaces").WidgetProperties & { variant?: "default" | "inherit" | undefined; } & import("@dojo/framework/core/middleware/theme").ThemeProperties & import("@dojo/framework/core/middleware/resources").ResourceProperties & import("@dojo/framework/core/interfaces").FocusProperties & import("@dojo/framework/core/interfaces").I18nProperties; children: TypeaheadChildren; }>; export default Typeahead;