/** @packageDocumentation * @module Select */ import "./themed-select.scss"; import * as React from "react"; import Component from "react-select"; import { formatGroupLabel, getOptionLabel, getOptionValue } from "react-select/src/builtins"; import { SelectComponentsConfig } from "react-select/src/components/index"; import { ActionMeta, FocusEventHandler, InputActionMeta, KeyboardEventHandler, ValueType } from "react-select/src/types"; declare type FormatOptionLabelContext = "menu" | "value"; declare type FormatOptionLabelMeta = { context: FormatOptionLabelContext; inputValue: string; selectValue: ValueType; }; /** OptionType for react-select 2.0 and above. which only accepts pairs of value & label strings * @beta */ export interface OptionType { value: any; label: string; } /** OptionsType to match label/value pair OptionType * @beta */ export declare type OptionsType = Array; /** ThemedSelectProps to control specific features of ThemedSelect * @beta */ export declare type ThemedSelectProps = { "aria-label"?: string; "aria-labelledby"?: string; autoFocus?: boolean; backspaceRemovesValue?: boolean; blurInputOnSelect?: boolean; captureMenuScroll?: boolean; className?: string; closeMenuOnSelect?: boolean; closeMenuOnScroll?: boolean | EventListener; components?: SelectComponentsConfig; controlShouldRenderValue?: boolean; defaultMenuIsOpen?: boolean; defaultValue?: ValueType; /** Provides ability to return reference to the outer HTMLDivElement */ divRef?: React.Ref; escapeClearsValue?: boolean; filterOption?: ((option: OptionType, rawInput: string) => boolean) | null; formatGroupLabel?: typeof formatGroupLabel; formatOptionLabel?: (optionType: OptionType, formatLabelMeta: FormatOptionLabelMeta) => React.ReactNode; getOptionLabel?: typeof getOptionLabel; getOptionValue?: typeof getOptionValue; hideSelectedOptions?: boolean; id?: string; inputValue?: string; inputId?: string; instanceId?: number | string; isClearable?: boolean; isDisabled?: boolean; isLoading?: boolean; isOptionDisabled?: (option: OptionType, options: OptionsType) => boolean | false; isMulti?: boolean; isMenuFixed?: boolean; isRtl?: boolean; isSearchable?: boolean; minMenuHeight?: number; maxMenuHeight?: number; menuIsOpen?: boolean; menuShouldBlockScroll?: boolean; menuShouldScrollIntoView?: boolean; name?: string; noOptionsMessage?: (obj: { inputValue: string; }) => string | null; onBlur?: FocusEventHandler; onChange?: (value: ValueType, action: ActionMeta) => void; onFocus?: FocusEventHandler; onInputChange?: (newValue: string, actionMeta?: InputActionMeta) => void; onKeyDown?: KeyboardEventHandler; onMenuOpen?: () => void; onMenuClose?: () => void; onMenuScrollToTop?: (e: React.SyntheticEvent) => void; onMenuScrollToBottom?: (e: React.SyntheticEvent) => void; openMenuOnFocus?: boolean; openMenuOnClick?: boolean; options: OptionsType; pageSize?: number; placeholder?: string; /** Provides ability to return reference to the ThemedSelect */ ref?: React.Ref; styles?: React.CSSProperties; tabIndex?: string; tabSelectsValue?: boolean; value?: ValueType; }; /** ThemedSelect is a wrapper for react-select with iModel.js UI theming applied * @beta */ export declare function ThemedSelect(props: ThemedSelectProps): JSX.Element; export {}; //# sourceMappingURL=ThemedSelect.d.ts.map