import { Component } from 'react'; import { DropdownOption } from './dropdownOptionsList'; import { IconName } from './icon'; export interface SelectProps { /** * If `true`, the search input will automatically be focused. */ autoFocus?: boolean; /** * If `true`, the input is disabled. */ disabled?: boolean; /** * Method to serialize an option to be rendered. */ optionSerializer: (option: T) => DropdownOption; /** * Name of the icon to display on the left of the input. */ iconLeft?: IconName; /** * Name of the icon to display on the right of the input. */ iconRight?: IconName; /** * List of options to select from. */ options?: ReadonlyArray; /** * Called when the input looses focus. */ onBlur?: () => void; /** * Called when the input is focused. */ onFocus?: () => void; /** * Called when an option is pressed. */ onOptionPress: (value: T) => void; /** * Called when the value of the search input changes. * If left undefined, the options will be filtered based on their title. */ onSearchChange?: (searchText: string) => void; /** * Display a loading message. */ loading?: boolean; /** * If `true`, support the selection of multiple values. */ multi?: boolean; /** * Rendered when the Dropdown has no value. */ placeholder?: string; /** * If `true`, the user will be able to search through the options. */ searchable?: boolean; /** * Value of the selected option(s). */ value?: T | ReadonlyArray; } interface SelectState { focused: boolean; searchText: string; width?: number; } export declare class Select extends Component, SelectState> { constructor(props: SelectProps); private get inputStyle(); private get isMenuOpen(); private get dropdownOptions(); private get placeholderColor(); private get selection(); private get shortcutHandlers(); private readonly inputContainerRef; private readonly optionsListRef; private readonly shortcutHandlerRef; private readonly memoizedDropdownOptions; private readonly memoizedSelection; private blur; private focus; private serializeOption; componentDidMount(): void; componentDidUpdate(prevProps: SelectProps, prevState: SelectState): void; private readonly onInputPress; private readonly onOptionPress; private readonly onMenuRequestClose; private readonly onSearchChange; private readonly onSearchInputBlur; render(): JSX.Element; private renderInput; private renderOptions; private renderPlaceholder; private renderSelection; private renderShortcutHandler; } export {};