import * as React from "react"; import { FontWeight, Scale } from "../../foundations/foundation-types"; import { ViewProps } from "../View"; interface SelectOptionItem { value?: string; label: string; labelSelected?: string; optgroup?: boolean; values?: Array<{ value: string; label: string; }>; } export interface SelectProps extends ViewProps { label?: string; options?: SelectOptionItem[]; disabled?: boolean; placeholder?: string; defaultValue?: any; value?: any; name?: string; size?: Scale; fontWeight?: FontWeight; clearable?: boolean; popperModifiers?: any; widthOptionContainer?: number; onClear?: () => void; onChange?: ({ target }: { target: any; }) => void; } interface State { selectElement: HTMLElement; isFocused: boolean; } /** * A Select lets the user choose from 4 or more options from a list. The selected item will then be shown. */ declare class Select extends React.PureComponent { static defaultProps: { size: string; options: any[]; }; static displayName: string; state: { selectElement: any; isFocused: boolean; }; OptionToString(Option: any): any; renderSelectRow({ options, getItemProps, highlightedIndex, selectedItem, colors, }: { options: any; getItemProps: any; highlightedIndex: any; selectedItem: any; colors: any; }): ({ key, index, style: virtualisedStyles }: { key: any; index: any; style: any; }) => JSX.Element; handleFocus(evt: React.FocusEvent): void; handleBlur(evt: React.FocusEvent): void; getBorderColor(isOpen: boolean): string | string[]; render(): JSX.Element; private setSelectElementRef; private handleOnChange; private handleSelectionClear; private stateReducer; private flattenOptions; private filterOptions; private calculateDropDownHeight; private calculateOptionHeight; } export default Select;