1 | import * as React from 'react';
|
2 | import type { BaseSelectRef } from 'rc-select';
|
3 | import type { TreeSelectProps as RcTreeSelectProps } from 'rc-tree-select';
|
4 | import { SHOW_ALL, SHOW_CHILD, SHOW_PARENT, TreeNode } from 'rc-tree-select';
|
5 | import type { BaseOptionType, DefaultOptionType } from 'rc-tree-select/lib/TreeSelect';
|
6 | import type { SelectCommonPlacement } from '../_util/motion';
|
7 | import type { InputStatus } from '../_util/statusUtils';
|
8 | import type { Variant } from '../config-provider';
|
9 | import type { SizeType } from '../config-provider/SizeContext';
|
10 | import type { TreeProps } from '../tree';
|
11 | import type { SwitcherIcon } from '../tree/Tree';
|
12 | type RawValue = string | number;
|
13 | export interface LabeledValue {
|
14 | key?: string;
|
15 | value: RawValue;
|
16 | label: React.ReactNode;
|
17 | }
|
18 | export type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[];
|
19 | export interface TreeSelectProps<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType> extends Omit<RcTreeSelectProps<ValueType, OptionType>, 'showTreeIcon' | 'treeMotion' | 'mode' | 'getInputElement' | 'backfill' | 'treeLine' | 'switcherIcon'> {
|
20 | suffixIcon?: React.ReactNode;
|
21 | size?: SizeType;
|
22 | disabled?: boolean;
|
23 | placement?: SelectCommonPlacement;
|
24 | popupClassName?: string;
|
25 |
|
26 | dropdownClassName?: string;
|
27 |
|
28 | bordered?: boolean;
|
29 | treeLine?: TreeProps['showLine'];
|
30 | status?: InputStatus;
|
31 | switcherIcon?: SwitcherIcon | RcTreeSelectProps<ValueType, OptionType>['switcherIcon'];
|
32 | rootClassName?: string;
|
33 | [key: `aria-${string}`]: React.AriaAttributes[keyof React.AriaAttributes];
|
34 |
|
35 | dropdownMatchSelectWidth?: boolean | number;
|
36 | popupMatchSelectWidth?: boolean | number;
|
37 | |
38 |
|
39 |
|
40 |
|
41 | showArrow?: boolean;
|
42 | |
43 |
|
44 |
|
45 |
|
46 | variant?: Variant;
|
47 | }
|
48 | declare const TreeSelectRef: <ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType>(props: React.PropsWithChildren<TreeSelectProps<ValueType, OptionType>> & React.RefAttributes<BaseSelectRef>) => React.ReactElement;
|
49 | type InternalTreeSelectType = typeof TreeSelectRef;
|
50 | type CompoundedComponent = InternalTreeSelectType & {
|
51 | displayName?: string;
|
52 | TreeNode: typeof TreeNode;
|
53 | SHOW_ALL: typeof SHOW_ALL;
|
54 | SHOW_PARENT: typeof SHOW_PARENT;
|
55 | SHOW_CHILD: typeof SHOW_CHILD;
|
56 | _InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
|
57 | };
|
58 | declare const TreeSelect: CompoundedComponent;
|
59 | declare const PurePanel: (props: import("../_util/type").AnyObject) => React.JSX.Element;
|
60 | export { TreeNode };
|
61 | export default TreeSelect;
|