1 | import * as React from 'react';
|
2 | import type { BaseSelectRef, SelectProps as RcSelectProps } from 'rc-select';
|
3 | import { OptGroup, Option } from 'rc-select';
|
4 | import type { OptionProps } from 'rc-select/lib/Option';
|
5 | import type { BaseOptionType, DefaultOptionType } from 'rc-select/lib/Select';
|
6 | import type { SelectCommonPlacement } from '../_util/motion';
|
7 | import type { InputStatus } from '../_util/statusUtils';
|
8 | import type { SizeType } from '../config-provider/SizeContext';
|
9 | import type { Variant } from '../config-provider';
|
10 | type RawValue = string | number;
|
11 | export type { BaseOptionType, DefaultOptionType, OptionProps, BaseSelectRef as RefSelectProps };
|
12 | export interface LabeledValue {
|
13 | key?: string;
|
14 | value: RawValue;
|
15 | label: React.ReactNode;
|
16 | }
|
17 | export type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined;
|
18 | export interface InternalSelectProps<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType> extends Omit<RcSelectProps<ValueType, OptionType>, 'mode'> {
|
19 | rootClassName?: string;
|
20 | suffixIcon?: React.ReactNode;
|
21 | size?: SizeType;
|
22 | disabled?: boolean;
|
23 | mode?: 'multiple' | 'tags' | 'SECRET_COMBOBOX_MODE_DO_NOT_USE' | 'combobox';
|
24 |
|
25 | bordered?: boolean;
|
26 | |
27 |
|
28 |
|
29 |
|
30 | showArrow?: boolean;
|
31 | |
32 |
|
33 |
|
34 |
|
35 | variant?: Variant;
|
36 | }
|
37 | export interface SelectProps<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType> extends Omit<InternalSelectProps<ValueType, OptionType>, 'mode' | 'getInputElement' | 'getRawInputElement' | 'backfill' | 'placement'> {
|
38 | placement?: SelectCommonPlacement;
|
39 | mode?: 'multiple' | 'tags';
|
40 | status?: InputStatus;
|
41 | popupClassName?: string;
|
42 |
|
43 | dropdownClassName?: string;
|
44 |
|
45 | dropdownMatchSelectWidth?: boolean | number;
|
46 | popupMatchSelectWidth?: boolean | number;
|
47 | }
|
48 | declare const Select: (<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>(props: React.PropsWithChildren<SelectProps<ValueType, OptionType>> & React.RefAttributes<BaseSelectRef>) => React.ReactElement) & {
|
49 | displayName?: string;
|
50 | SECRET_COMBOBOX_MODE_DO_NOT_USE: string;
|
51 | Option: typeof Option;
|
52 | OptGroup: typeof OptGroup;
|
53 | _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
|
54 | };
|
55 | declare const PurePanel: (props: import("../_util/type").AnyObject) => React.JSX.Element;
|
56 | export default Select;
|