UNPKG

26.7 kBTypeScriptView Raw
1import * as React from 'react';
2import { AriaAttributes, Component, FocusEventHandler, FormEventHandler, KeyboardEventHandler, MouseEventHandler, ReactNode, RefCallback, TouchEventHandler } from 'react';
3import { FilterOptionOption } from './filters';
4import { AriaLiveMessages, AriaSelection } from './accessibility/index';
5import { SelectComponentsConfig } from './components/index';
6import { ClassNamesConfig, StylesConfig, StylesProps } from './styles';
7import { ThemeConfig } from './theme';
8import { ActionMeta, FocusDirection, GetOptionLabel, GetOptionValue, GroupBase, InputActionMeta, MenuPlacement, MenuPosition, OnChangeValue, Options, OptionsOrGroups, PropsValue, SetValueAction } from './types';
9export declare type FormatOptionLabelContext = 'menu' | 'value';
10export interface FormatOptionLabelMeta<Option> {
11 context: FormatOptionLabelContext;
12 inputValue: string;
13 selectValue: Options<Option>;
14}
15export interface Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
16 /** HTML ID of an element containing an error message related to the input**/
17 'aria-errormessage'?: AriaAttributes['aria-errormessage'];
18 /** Indicate if the value entered in the field is invalid **/
19 'aria-invalid'?: AriaAttributes['aria-invalid'];
20 /** Aria label (for assistive tech) */
21 'aria-label'?: AriaAttributes['aria-label'];
22 /** HTML ID of an element that should be used as the label (for assistive tech) */
23 'aria-labelledby'?: AriaAttributes['aria-labelledby'];
24 /** Used to set the priority with which screen reader should treat updates to live regions. The possible settings are: off, polite (default) or assertive */
25 'aria-live'?: AriaAttributes['aria-live'];
26 /** Customise the messages used by the aria-live component */
27 ariaLiveMessages?: AriaLiveMessages<Option, IsMulti, Group>;
28 /** Focus the control when it is mounted */
29 autoFocus?: boolean;
30 /** Remove the currently focused option when the user presses backspace when Select isClearable or isMulti */
31 backspaceRemovesValue: boolean;
32 /** Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices) */
33 blurInputOnSelect: boolean;
34 /** When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent */
35 captureMenuScroll: boolean;
36 /** Sets a className attribute on the outer component */
37 className?: string;
38 /**
39 * If provided, all inner components will be given a prefixed className attribute.
40 *
41 * This is useful when styling via CSS classes instead of the Styles API approach.
42 */
43 classNamePrefix?: string | null;
44 /**
45 * Provide classNames based on state for each inner component
46 */
47 classNames: ClassNamesConfig<Option, IsMulti, Group>;
48 /** Close the select menu when the user selects an option */
49 closeMenuOnSelect: boolean;
50 /**
51 * If `true`, close the select menu when the user scrolls the document/body.
52 *
53 * If a function, takes a standard javascript `ScrollEvent` you return a boolean:
54 *
55 * `true` => The menu closes
56 *
57 * `false` => The menu stays open
58 *
59 * This is useful when you have a scrollable modal and want to portal the menu out,
60 * but want to avoid graphical issues.
61 */
62 closeMenuOnScroll: boolean | ((event: Event) => boolean);
63 /**
64 * This complex object includes all the compositional components that are used
65 * in `react-select`. If you wish to overwrite a component, pass in an object
66 * with the appropriate namespace.
67 *
68 * If you only wish to restyle a component, we recommend using the `styles` prop
69 * instead. For a list of the components that can be passed in, and the shape
70 * that will be passed to them, see [the components docs](/components)
71 */
72 components: SelectComponentsConfig<Option, IsMulti, Group>;
73 /** Whether the value of the select, e.g. SingleValue, should be displayed in the control. */
74 controlShouldRenderValue: boolean;
75 /** Delimiter used to join multiple values into a single HTML Input value */
76 delimiter?: string;
77 /** Clear all values when the user presses escape AND the menu is closed */
78 escapeClearsValue: boolean;
79 /** Custom method to filter whether an option should be displayed in the menu */
80 filterOption: ((option: FilterOptionOption<Option>, inputValue: string) => boolean) | null;
81 /**
82 * Formats group labels in the menu as React components
83 *
84 * An example can be found in the [Replacing builtins](/advanced#replacing-builtins) documentation.
85 */
86 formatGroupLabel: (group: Group) => ReactNode;
87 /** Formats option labels in the menu and control as React components */
88 formatOptionLabel?: (data: Option, formatOptionLabelMeta: FormatOptionLabelMeta<Option>) => ReactNode;
89 /**
90 * Resolves option data to a string to be displayed as the label by components
91 *
92 * Note: Failure to resolve to a string type can interfere with filtering and
93 * screen reader support.
94 */
95 getOptionLabel: GetOptionLabel<Option>;
96 /** Resolves option data to a string to compare options and specify value attributes */
97 getOptionValue: GetOptionValue<Option>;
98 /** Hide the selected option from the menu */
99 hideSelectedOptions?: boolean;
100 /** The id to set on the SelectContainer component. */
101 id?: string;
102 /** The value of the search input */
103 inputValue: string;
104 /** The id of the search input */
105 inputId?: string;
106 /** Define an id prefix for the select components e.g. {your-id}-value */
107 instanceId?: number | string;
108 /** Is the select value clearable */
109 isClearable?: boolean;
110 /** Is the select disabled */
111 isDisabled: boolean;
112 /** Is the select in a state of loading (async) */
113 isLoading: boolean;
114 /**
115 * Override the built-in logic to detect whether an option is disabled
116 *
117 * An example can be found in the [Replacing builtins](/advanced#replacing-builtins) documentation.
118 */
119 isOptionDisabled: (option: Option, selectValue: Options<Option>) => boolean;
120 /** Override the built-in logic to detect whether an option is selected */
121 isOptionSelected?: (option: Option, selectValue: Options<Option>) => boolean;
122 /** Support multiple selected options */
123 isMulti: IsMulti;
124 /** Is the select direction right-to-left */
125 isRtl: boolean;
126 /** Whether to enable search functionality */
127 isSearchable: boolean;
128 /** Async: Text to display when loading options */
129 loadingMessage: (obj: {
130 inputValue: string;
131 }) => ReactNode;
132 /** Minimum height of the menu before flipping */
133 minMenuHeight: number;
134 /** Maximum height of the menu before scrolling */
135 maxMenuHeight: number;
136 /** Whether the menu is open */
137 menuIsOpen: boolean;
138 /**
139 * Default placement of the menu in relation to the control. 'auto' will flip
140 * when there isn't enough space below the control.
141 */
142 menuPlacement: MenuPlacement;
143 /** The CSS position value of the menu, when "fixed" extra layout management is required */
144 menuPosition: MenuPosition;
145 /**
146 * Whether the menu should use a portal, and where it should attach
147 *
148 * An example can be found in the [Portaling](/advanced#portaling) documentation
149 */
150 menuPortalTarget?: HTMLElement | null;
151 /** Whether to block scroll events when the menu is open */
152 menuShouldBlockScroll: boolean;
153 /** Whether the menu should be scrolled into view when it opens */
154 menuShouldScrollIntoView: boolean;
155 /** Name of the HTML Input (optional - without this, no input will be rendered) */
156 name?: string;
157 /** Text to display when there are no options */
158 noOptionsMessage: (obj: {
159 inputValue: string;
160 }) => ReactNode;
161 /** Handle blur events on the control */
162 onBlur?: FocusEventHandler<HTMLInputElement>;
163 /** Handle change events on the select */
164 onChange: (newValue: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void;
165 /** Handle focus events on the control */
166 onFocus?: FocusEventHandler<HTMLInputElement>;
167 /** Handle change events on the input */
168 onInputChange: (newValue: string, actionMeta: InputActionMeta) => void;
169 /** Handle key down events on the select */
170 onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
171 /** Handle the menu opening */
172 onMenuOpen: () => void;
173 /** Handle the menu closing */
174 onMenuClose: () => void;
175 /** Fired when the user scrolls to the top of the menu */
176 onMenuScrollToTop?: (event: WheelEvent | TouchEvent) => void;
177 /** Fired when the user scrolls to the bottom of the menu */
178 onMenuScrollToBottom?: (event: WheelEvent | TouchEvent) => void;
179 /** Allows control of whether the menu is opened when the Select is focused */
180 openMenuOnFocus: boolean;
181 /** Allows control of whether the menu is opened when the Select is clicked */
182 openMenuOnClick: boolean;
183 /** Array of options that populate the select menu */
184 options: OptionsOrGroups<Option, Group>;
185 /** Number of options to jump in menu when page{up|down} keys are used */
186 pageSize: number;
187 /** Placeholder for the select value */
188 placeholder: ReactNode;
189 /** Status to relay to screen readers */
190 screenReaderStatus: (obj: {
191 count: number;
192 }) => string;
193 /**
194 * Style modifier methods
195 *
196 * A basic example can be found at the bottom of the [Replacing builtins](/advanced#replacing-builtins) documentation.
197 */
198 styles: StylesConfig<Option, IsMulti, Group>;
199 /** Theme modifier method */
200 theme?: ThemeConfig;
201 /** Sets the tabIndex attribute on the input */
202 tabIndex: number;
203 /** Select the currently focused option when the user presses tab */
204 tabSelectsValue: boolean;
205 /** Remove all non-essential styles */
206 unstyled: boolean;
207 /** The value of the select; reflected by the selected option */
208 value: PropsValue<Option>;
209 /** Sets the form attribute on the input */
210 form?: string;
211 /** Marks the value-holding input as required for form validation */
212 required?: boolean;
213}
214export declare const defaultProps: {
215 'aria-live': string;
216 backspaceRemovesValue: boolean;
217 blurInputOnSelect: boolean;
218 captureMenuScroll: boolean;
219 classNames: {};
220 closeMenuOnSelect: boolean;
221 closeMenuOnScroll: boolean;
222 components: {};
223 controlShouldRenderValue: boolean;
224 escapeClearsValue: boolean;
225 filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
226 formatGroupLabel: <Option, Group extends GroupBase<Option>>(group: Group) => string;
227 getOptionLabel: <Option_1>(option: Option_1) => string;
228 getOptionValue: <Option_2>(option: Option_2) => string;
229 isDisabled: boolean;
230 isLoading: boolean;
231 isMulti: boolean;
232 isRtl: boolean;
233 isSearchable: boolean;
234 isOptionDisabled: <Option_3>(option: Option_3) => boolean;
235 loadingMessage: () => string;
236 maxMenuHeight: number;
237 minMenuHeight: number;
238 menuIsOpen: boolean;
239 menuPlacement: string;
240 menuPosition: string;
241 menuShouldBlockScroll: boolean;
242 menuShouldScrollIntoView: boolean;
243 noOptionsMessage: () => string;
244 openMenuOnFocus: boolean;
245 openMenuOnClick: boolean;
246 options: never[];
247 pageSize: number;
248 placeholder: string;
249 screenReaderStatus: ({ count }: {
250 count: number;
251 }) => string;
252 styles: {};
253 tabIndex: number;
254 tabSelectsValue: boolean;
255 unstyled: boolean;
256};
257interface State<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
258 ariaSelection: AriaSelection<Option, IsMulti> | null;
259 inputIsHidden: boolean;
260 isFocused: boolean;
261 focusedOption: Option | null;
262 focusedOptionId: string | null;
263 focusableOptionsWithIds: FocusableOptionWithId<Option>[];
264 focusedValue: Option | null;
265 selectValue: Options<Option>;
266 clearFocusValueOnUpdate: boolean;
267 prevWasFocused: boolean;
268 inputIsHiddenAfterUpdate: boolean | null | undefined;
269 prevProps: Props<Option, IsMulti, Group> | void;
270 instancePrefix: string;
271}
272interface CategorizedOption<Option> {
273 type: 'option';
274 data: Option;
275 isDisabled: boolean;
276 isSelected: boolean;
277 label: string;
278 value: string;
279 index: number;
280}
281interface FocusableOptionWithId<Option> {
282 data: Option;
283 id: string;
284}
285interface CategorizedGroup<Option, Group extends GroupBase<Option>> {
286 type: 'group';
287 data: Group;
288 options: readonly CategorizedOption<Option>[];
289 index: number;
290}
291declare type CategorizedGroupOrOption<Option, Group extends GroupBase<Option>> = CategorizedGroup<Option, Group> | CategorizedOption<Option>;
292export default class Select<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Component<Props<Option, IsMulti, Group>, State<Option, IsMulti, Group>> {
293 static defaultProps: {
294 'aria-live': string;
295 backspaceRemovesValue: boolean;
296 blurInputOnSelect: boolean;
297 captureMenuScroll: boolean;
298 classNames: {};
299 closeMenuOnSelect: boolean;
300 closeMenuOnScroll: boolean;
301 components: {};
302 controlShouldRenderValue: boolean;
303 escapeClearsValue: boolean;
304 filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
305 formatGroupLabel: <Option_1, Group_1 extends GroupBase<Option_1>>(group: Group_1) => string;
306 getOptionLabel: <Option_2>(option: Option_2) => string;
307 getOptionValue: <Option_3>(option: Option_3) => string;
308 isDisabled: boolean;
309 isLoading: boolean;
310 isMulti: boolean;
311 isRtl: boolean;
312 isSearchable: boolean;
313 isOptionDisabled: <Option_4>(option: Option_4) => boolean;
314 loadingMessage: () => string;
315 maxMenuHeight: number;
316 minMenuHeight: number;
317 menuIsOpen: boolean;
318 menuPlacement: string;
319 menuPosition: string;
320 menuShouldBlockScroll: boolean;
321 menuShouldScrollIntoView: boolean;
322 noOptionsMessage: () => string;
323 openMenuOnFocus: boolean;
324 openMenuOnClick: boolean;
325 options: never[];
326 pageSize: number;
327 placeholder: string;
328 screenReaderStatus: ({ count }: {
329 count: number;
330 }) => string;
331 styles: {};
332 tabIndex: number;
333 tabSelectsValue: boolean;
334 unstyled: boolean;
335 };
336 state: State<Option, IsMulti, Group>;
337 blockOptionHover: boolean;
338 isComposing: boolean;
339 commonProps: any;
340 initialTouchX: number;
341 initialTouchY: number;
342 openAfterFocus: boolean;
343 scrollToFocusedOptionOnUpdate: boolean;
344 userIsDragging?: boolean;
345 isAppleDevice: boolean;
346 controlRef: HTMLDivElement | null;
347 getControlRef: RefCallback<HTMLDivElement>;
348 focusedOptionRef: HTMLDivElement | null;
349 getFocusedOptionRef: RefCallback<HTMLDivElement>;
350 menuListRef: HTMLDivElement | null;
351 getMenuListRef: RefCallback<HTMLDivElement>;
352 inputRef: HTMLInputElement | null;
353 getInputRef: RefCallback<HTMLInputElement>;
354 constructor(props: Props<Option, IsMulti, Group>);
355 static getDerivedStateFromProps(props: Props<unknown, boolean, GroupBase<unknown>>, state: State<unknown, boolean, GroupBase<unknown>>): {
356 prevProps: Props<unknown, boolean, GroupBase<unknown>>;
357 ariaSelection: AriaSelection<unknown, boolean> | null;
358 prevWasFocused: boolean;
359 inputIsHidden: boolean;
360 inputIsHiddenAfterUpdate: undefined;
361 } | {
362 prevProps: Props<unknown, boolean, GroupBase<unknown>>;
363 ariaSelection: AriaSelection<unknown, boolean> | null;
364 prevWasFocused: boolean;
365 inputIsHidden?: undefined;
366 inputIsHiddenAfterUpdate?: undefined;
367 };
368 componentDidMount(): void;
369 componentDidUpdate(prevProps: Props<Option, IsMulti, Group>): void;
370 componentWillUnmount(): void;
371 onMenuOpen(): void;
372 onMenuClose(): void;
373 onInputChange(newValue: string, actionMeta: InputActionMeta): void;
374 focusInput(): void;
375 blurInput(): void;
376 focus: () => void;
377 blur: () => void;
378 openMenu(focusOption: 'first' | 'last'): void;
379 focusValue(direction: 'previous' | 'next'): void;
380 focusOption(direction?: FocusDirection): void;
381 onChange: (newValue: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void;
382 setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option | undefined) => void;
383 selectOption: (newValue: Option) => void;
384 removeValue: (removedValue: Option) => void;
385 clearValue: () => void;
386 popValue: () => void;
387 getTheme(): import("./types").Theme;
388 getFocusedOptionId: (focusedOption: Option) => string | null;
389 getFocusableOptionsWithIds: () => FocusableOptionWithId<Option>[];
390 getValue: () => Options<Option>;
391 cx: (...args: any) => string;
392 getCommonProps(): {
393 clearValue: () => void;
394 cx: (...args: any) => string;
395 getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => import("./types").CSSObjectWithLabel;
396 getClassNames: <Key_1 extends keyof StylesProps<Option, IsMulti, Group>>(key: Key_1, props: StylesProps<Option, IsMulti, Group>[Key_1]) => string | undefined;
397 getValue: () => Options<Option>;
398 hasValue: boolean;
399 isMulti: IsMulti;
400 isRtl: boolean;
401 options: OptionsOrGroups<Option, Group>;
402 selectOption: (newValue: Option) => void;
403 selectProps: Readonly<Props<Option, IsMulti, Group>> & Readonly<{
404 children?: React.ReactNode;
405 }>;
406 setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option | undefined) => void;
407 theme: import("./types").Theme;
408 };
409 getOptionLabel: (data: Option) => string;
410 getOptionValue: (data: Option) => string;
411 getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => import("./types").CSSObjectWithLabel;
412 getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
413 getElementId: (element: 'group' | 'input' | 'listbox' | 'option' | 'placeholder' | 'live-region') => string;
414 getComponents: () => {
415 ClearIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ClearIndicatorProps<Option_1, IsMulti_1, Group_1>) => import("@emotion/react").jsx.JSX.Element;
416 Control: <Option_2, IsMulti_2 extends boolean, Group_2 extends GroupBase<Option_2>>(props: import(".").ControlProps<Option_2, IsMulti_2, Group_2>) => import("@emotion/react").jsx.JSX.Element;
417 DropdownIndicator: <Option_3, IsMulti_3 extends boolean, Group_3 extends GroupBase<Option_3>>(props: import(".").DropdownIndicatorProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react").jsx.JSX.Element;
418 DownChevron: (props: import("./components/indicators").DownChevronProps) => import("@emotion/react").jsx.JSX.Element;
419 CrossIcon: (props: import("./components/indicators").CrossIconProps) => import("@emotion/react").jsx.JSX.Element;
420 Group: <Option_4, IsMulti_4 extends boolean, Group_4 extends GroupBase<Option_4>>(props: import(".").GroupProps<Option_4, IsMulti_4, Group_4>) => import("@emotion/react").jsx.JSX.Element;
421 GroupHeading: <Option_5, IsMulti_5 extends boolean, Group_5 extends GroupBase<Option_5>>(props: import(".").GroupHeadingProps<Option_5, IsMulti_5, Group_5>) => import("@emotion/react").jsx.JSX.Element;
422 IndicatorsContainer: <Option_6, IsMulti_6 extends boolean, Group_6 extends GroupBase<Option_6>>(props: import(".").IndicatorsContainerProps<Option_6, IsMulti_6, Group_6>) => import("@emotion/react").jsx.JSX.Element;
423 IndicatorSeparator: <Option_7, IsMulti_7 extends boolean, Group_7 extends GroupBase<Option_7>>(props: import(".").IndicatorSeparatorProps<Option_7, IsMulti_7, Group_7>) => import("@emotion/react").jsx.JSX.Element;
424 Input: <Option_8, IsMulti_8 extends boolean, Group_8 extends GroupBase<Option_8>>(props: import(".").InputProps<Option_8, IsMulti_8, Group_8>) => import("@emotion/react").jsx.JSX.Element;
425 LoadingIndicator: <Option_9, IsMulti_9 extends boolean, Group_9 extends GroupBase<Option_9>>({ innerProps, isRtl, size, ...restProps }: import(".").LoadingIndicatorProps<Option_9, IsMulti_9, Group_9>) => import("@emotion/react").jsx.JSX.Element;
426 Menu: <Option_10, IsMulti_10 extends boolean, Group_10 extends GroupBase<Option_10>>(props: import("./components/Menu").MenuProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
427 MenuList: <Option_11, IsMulti_11 extends boolean, Group_11 extends GroupBase<Option_11>>(props: import("./components/Menu").MenuListProps<Option_11, IsMulti_11, Group_11>) => import("@emotion/react").jsx.JSX.Element;
428 MenuPortal: <Option_12, IsMulti_12 extends boolean, Group_12 extends GroupBase<Option_12>>(props: import("./components/Menu").MenuPortalProps<Option_12, IsMulti_12, Group_12>) => import("@emotion/react").jsx.JSX.Element | null;
429 LoadingMessage: <Option_13, IsMulti_13 extends boolean, Group_13 extends GroupBase<Option_13>>({ children, innerProps, ...restProps }: import("./components/Menu").NoticeProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
430 NoOptionsMessage: <Option_14, IsMulti_14 extends boolean, Group_14 extends GroupBase<Option_14>>({ children, innerProps, ...restProps }: import("./components/Menu").NoticeProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
431 MultiValue: <Option_15, IsMulti_15 extends boolean, Group_15 extends GroupBase<Option_15>>(props: import(".").MultiValueProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
432 MultiValueContainer: <Option_16, IsMulti_16 extends boolean, Group_16 extends GroupBase<Option_16>>({ children, innerProps, }: import(".").MultiValueGenericProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
433 MultiValueLabel: <Option_16, IsMulti_16 extends boolean, Group_16 extends GroupBase<Option_16>>({ children, innerProps, }: import(".").MultiValueGenericProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
434 MultiValueRemove: typeof import("./components/MultiValue").MultiValueRemove;
435 Option: <Option_17, IsMulti_17 extends boolean, Group_17 extends GroupBase<Option_17>>(props: import(".").OptionProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react").jsx.JSX.Element;
436 Placeholder: <Option_18, IsMulti_18 extends boolean, Group_18 extends GroupBase<Option_18>>(props: import(".").PlaceholderProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
437 SelectContainer: <Option_19, IsMulti_19 extends boolean, Group_19 extends GroupBase<Option_19>>(props: import(".").ContainerProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
438 SingleValue: <Option_20, IsMulti_20 extends boolean, Group_20 extends GroupBase<Option_20>>(props: import(".").SingleValueProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
439 ValueContainer: <Option_21, IsMulti_21 extends boolean, Group_21 extends GroupBase<Option_21>>(props: import(".").ValueContainerProps<Option_21, IsMulti_21, Group_21>) => import("@emotion/react").jsx.JSX.Element;
440 };
441 buildCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
442 getCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
443 buildFocusableOptions: () => Option[];
444 getFocusableOptions: () => Option[];
445 ariaOnChange: (value: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void;
446 hasValue(): boolean;
447 hasOptions(): boolean;
448 isClearable(): boolean;
449 isOptionDisabled(option: Option, selectValue: Options<Option>): boolean;
450 isOptionSelected(option: Option, selectValue: Options<Option>): boolean;
451 filterOption(option: FilterOptionOption<Option>, inputValue: string): boolean;
452 formatOptionLabel(data: Option, context: FormatOptionLabelContext): ReactNode;
453 formatGroupLabel(data: Group): React.ReactNode;
454 onMenuMouseDown: MouseEventHandler<HTMLDivElement>;
455 onMenuMouseMove: MouseEventHandler<HTMLDivElement>;
456 onControlMouseDown: (event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => void;
457 onDropdownIndicatorMouseDown: (event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => void;
458 onClearIndicatorMouseDown: (event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => void;
459 onScroll: (event: Event) => void;
460 startListeningComposition(): void;
461 stopListeningComposition(): void;
462 onCompositionStart: () => void;
463 onCompositionEnd: () => void;
464 startListeningToTouch(): void;
465 stopListeningToTouch(): void;
466 onTouchStart: ({ touches }: TouchEvent) => void;
467 onTouchMove: ({ touches }: TouchEvent) => void;
468 onTouchEnd: (event: TouchEvent) => void;
469 onControlTouchEnd: TouchEventHandler<HTMLDivElement>;
470 onClearIndicatorTouchEnd: TouchEventHandler<HTMLDivElement>;
471 onDropdownIndicatorTouchEnd: TouchEventHandler<HTMLDivElement>;
472 handleInputChange: FormEventHandler<HTMLInputElement>;
473 onInputFocus: FocusEventHandler<HTMLInputElement>;
474 onInputBlur: FocusEventHandler<HTMLInputElement>;
475 onOptionHover: (focusedOption: Option) => void;
476 shouldHideSelectedOptions: () => boolean | IsMulti;
477 onValueInputFocus: FocusEventHandler;
478 onKeyDown: KeyboardEventHandler<HTMLDivElement>;
479 renderInput(): JSX.Element;
480 renderPlaceholderOrValue(): JSX.Element | JSX.Element[] | null;
481 renderClearIndicator(): JSX.Element | null;
482 renderLoadingIndicator(): JSX.Element | null;
483 renderIndicatorSeparator(): JSX.Element | null;
484 renderDropdownIndicator(): JSX.Element | null;
485 renderMenu(): JSX.Element | null;
486 renderFormField(): JSX.Element | undefined;
487 renderLiveRegion(): JSX.Element;
488 render(): JSX.Element;
489}
490export declare type PublicBaseSelectProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = JSX.LibraryManagedAttributes<typeof Select, Props<Option, IsMulti, Group>>;
491export {};