1 | import * as React from 'react';
|
2 | import { AriaAttributes, Component, FocusEventHandler, FormEventHandler, KeyboardEventHandler, MouseEventHandler, ReactNode, RefCallback, TouchEventHandler } from 'react';
|
3 | import { FilterOptionOption } from './filters';
|
4 | import { AriaLiveMessages, AriaSelection } from './accessibility/index';
|
5 | import { SelectComponentsConfig } from './components/index';
|
6 | import { ClassNamesConfig, StylesConfig, StylesProps } from './styles';
|
7 | import { ThemeConfig } from './theme';
|
8 | import { ActionMeta, FocusDirection, GetOptionLabel, GetOptionValue, GroupBase, InputActionMeta, MenuPlacement, MenuPosition, OnChangeValue, Options, OptionsOrGroups, PropsValue, SetValueAction } from './types';
|
9 | export declare type FormatOptionLabelContext = 'menu' | 'value';
|
10 | export interface FormatOptionLabelMeta<Option> {
|
11 | context: FormatOptionLabelContext;
|
12 | inputValue: string;
|
13 | selectValue: Options<Option>;
|
14 | }
|
15 | export interface Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
16 |
|
17 | 'aria-errormessage'?: AriaAttributes['aria-errormessage'];
|
18 |
|
19 | 'aria-invalid'?: AriaAttributes['aria-invalid'];
|
20 |
|
21 | 'aria-label'?: AriaAttributes['aria-label'];
|
22 |
|
23 | 'aria-labelledby'?: AriaAttributes['aria-labelledby'];
|
24 |
|
25 | 'aria-live'?: AriaAttributes['aria-live'];
|
26 |
|
27 | ariaLiveMessages?: AriaLiveMessages<Option, IsMulti, Group>;
|
28 |
|
29 | autoFocus?: boolean;
|
30 |
|
31 | backspaceRemovesValue: boolean;
|
32 |
|
33 | blurInputOnSelect: boolean;
|
34 |
|
35 | captureMenuScroll: boolean;
|
36 |
|
37 | className?: string;
|
38 | |
39 |
|
40 |
|
41 |
|
42 |
|
43 | classNamePrefix?: string | null;
|
44 | |
45 |
|
46 |
|
47 | classNames: ClassNamesConfig<Option, IsMulti, Group>;
|
48 |
|
49 | closeMenuOnSelect: boolean;
|
50 | |
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
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 |
|
88 | formatOptionLabel?: (data: Option, formatOptionLabelMeta: FormatOptionLabelMeta<Option>) => ReactNode;
|
89 | |
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 | getOptionLabel: GetOptionLabel<Option>;
|
96 |
|
97 | getOptionValue: GetOptionValue<Option>;
|
98 |
|
99 | hideSelectedOptions?: boolean;
|
100 |
|
101 | id?: string;
|
102 |
|
103 | inputValue: string;
|
104 |
|
105 | inputId?: string;
|
106 |
|
107 | instanceId?: number | string;
|
108 |
|
109 | isClearable?: boolean;
|
110 |
|
111 | isDisabled: boolean;
|
112 |
|
113 | isLoading: boolean;
|
114 | |
115 |
|
116 |
|
117 |
|
118 |
|
119 | isOptionDisabled: (option: Option, selectValue: Options<Option>) => boolean;
|
120 |
|
121 | isOptionSelected?: (option: Option, selectValue: Options<Option>) => boolean;
|
122 |
|
123 | isMulti: IsMulti;
|
124 |
|
125 | isRtl: boolean;
|
126 |
|
127 | isSearchable: boolean;
|
128 |
|
129 | loadingMessage: (obj: {
|
130 | inputValue: string;
|
131 | }) => ReactNode;
|
132 |
|
133 | minMenuHeight: number;
|
134 |
|
135 | maxMenuHeight: number;
|
136 |
|
137 | menuIsOpen: boolean;
|
138 | |
139 |
|
140 |
|
141 |
|
142 | menuPlacement: MenuPlacement;
|
143 |
|
144 | menuPosition: MenuPosition;
|
145 | |
146 |
|
147 |
|
148 |
|
149 |
|
150 | menuPortalTarget?: HTMLElement | null;
|
151 |
|
152 | menuShouldBlockScroll: boolean;
|
153 |
|
154 | menuShouldScrollIntoView: boolean;
|
155 |
|
156 | name?: string;
|
157 |
|
158 | noOptionsMessage: (obj: {
|
159 | inputValue: string;
|
160 | }) => ReactNode;
|
161 |
|
162 | onBlur?: FocusEventHandler<HTMLInputElement>;
|
163 |
|
164 | onChange: (newValue: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void;
|
165 |
|
166 | onFocus?: FocusEventHandler<HTMLInputElement>;
|
167 |
|
168 | onInputChange: (newValue: string, actionMeta: InputActionMeta) => void;
|
169 |
|
170 | onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
|
171 |
|
172 | onMenuOpen: () => void;
|
173 |
|
174 | onMenuClose: () => void;
|
175 |
|
176 | onMenuScrollToTop?: (event: WheelEvent | TouchEvent) => void;
|
177 |
|
178 | onMenuScrollToBottom?: (event: WheelEvent | TouchEvent) => void;
|
179 |
|
180 | openMenuOnFocus: boolean;
|
181 |
|
182 | openMenuOnClick: boolean;
|
183 |
|
184 | options: OptionsOrGroups<Option, Group>;
|
185 |
|
186 | pageSize: number;
|
187 |
|
188 | placeholder: ReactNode;
|
189 |
|
190 | screenReaderStatus: (obj: {
|
191 | count: number;
|
192 | }) => string;
|
193 | |
194 |
|
195 |
|
196 |
|
197 |
|
198 | styles: StylesConfig<Option, IsMulti, Group>;
|
199 |
|
200 | theme?: ThemeConfig;
|
201 |
|
202 | tabIndex: number;
|
203 |
|
204 | tabSelectsValue: boolean;
|
205 |
|
206 | unstyled: boolean;
|
207 |
|
208 | value: PropsValue<Option>;
|
209 |
|
210 | form?: string;
|
211 |
|
212 | required?: boolean;
|
213 | }
|
214 | export 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 | };
|
257 | interface 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 | }
|
272 | interface CategorizedOption<Option> {
|
273 | type: 'option';
|
274 | data: Option;
|
275 | isDisabled: boolean;
|
276 | isSelected: boolean;
|
277 | label: string;
|
278 | value: string;
|
279 | index: number;
|
280 | }
|
281 | interface FocusableOptionWithId<Option> {
|
282 | data: Option;
|
283 | id: string;
|
284 | }
|
285 | interface CategorizedGroup<Option, Group extends GroupBase<Option>> {
|
286 | type: 'group';
|
287 | data: Group;
|
288 | options: readonly CategorizedOption<Option>[];
|
289 | index: number;
|
290 | }
|
291 | declare type CategorizedGroupOrOption<Option, Group extends GroupBase<Option>> = CategorizedGroup<Option, Group> | CategorizedOption<Option>;
|
292 | export 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 | }
|
490 | export declare type PublicBaseSelectProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = JSX.LibraryManagedAttributes<typeof Select, Props<Option, IsMulti, Group>>;
|
491 | export {};
|