1 | import * as React from 'react';
|
2 | import { Option, OptGroup, SelectProps as RcSelectProps } from 'rc-select';
|
3 | import { OptionProps } from 'rc-select/lib/Option';
|
4 | import { SizeType } from '../config-provider/SizeContext';
|
5 | declare type RawValue = string | number;
|
6 | export { OptionProps };
|
7 | export declare type OptionType = typeof Option;
|
8 | export interface LabeledValue {
|
9 | key?: string;
|
10 | value: RawValue;
|
11 | label: React.ReactNode;
|
12 | }
|
13 | export declare type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined;
|
14 | export interface InternalSelectProps<VT> extends Omit<RcSelectProps<VT>, 'mode'> {
|
15 | suffixIcon?: React.ReactNode;
|
16 | size?: SizeType;
|
17 | mode?: 'multiple' | 'tags' | 'SECRET_COMBOBOX_MODE_DO_NOT_USE';
|
18 | bordered?: boolean;
|
19 | }
|
20 | export interface SelectProps<VT> extends Omit<InternalSelectProps<VT>, 'inputIcon' | 'mode' | 'getInputElement' | 'backfill'> {
|
21 | mode?: 'multiple' | 'tags';
|
22 | }
|
23 | export interface RefSelectProps {
|
24 | focus: () => void;
|
25 | blur: () => void;
|
26 | }
|
27 | declare const SelectRef: <VT extends SelectValue = SelectValue>(props: SelectProps<VT> & {
|
28 | ref?: React.Ref<RefSelectProps> | undefined;
|
29 | }) => React.ReactElement;
|
30 | declare type InternalSelectType = typeof SelectRef;
|
31 | interface SelectInterface extends InternalSelectType {
|
32 | SECRET_COMBOBOX_MODE_DO_NOT_USE: string;
|
33 | Option: typeof Option;
|
34 | OptGroup: typeof OptGroup;
|
35 | }
|
36 | declare const Select: SelectInterface;
|
37 | export default Select;
|