1 | import * as React from 'react';
|
2 | import { TreeNode, SHOW_ALL, SHOW_PARENT, SHOW_CHILD, TreeSelectProps as RcTreeSelectProps } from 'rc-tree-select';
|
3 | import { DefaultValueType } from 'rc-tree-select/lib/interface';
|
4 | import { SizeType } from '../config-provider/SizeContext';
|
5 | declare type RawValue = string | number;
|
6 | export interface LabeledValue {
|
7 | key?: string;
|
8 | value: RawValue;
|
9 | label: React.ReactNode;
|
10 | }
|
11 | export declare type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[];
|
12 | export interface TreeSelectProps<T> extends Omit<RcTreeSelectProps<T>, 'showTreeIcon' | 'treeMotion' | 'inputIcon' | 'mode' | 'getInputElement' | 'backfill'> {
|
13 | suffixIcon?: React.ReactNode;
|
14 | size?: SizeType;
|
15 | bordered?: boolean;
|
16 | }
|
17 | export interface RefTreeSelectProps {
|
18 | focus: () => void;
|
19 | blur: () => void;
|
20 | }
|
21 | declare const TreeSelectRef: <T extends DefaultValueType>(props: TreeSelectProps<T> & {
|
22 | ref?: React.Ref<RefTreeSelectProps> | undefined;
|
23 | }) => React.ReactElement;
|
24 | declare type InternalTreeSelectType = typeof TreeSelectRef;
|
25 | interface TreeSelectInterface extends InternalTreeSelectType {
|
26 | TreeNode: typeof TreeNode;
|
27 | SHOW_ALL: typeof SHOW_ALL;
|
28 | SHOW_PARENT: typeof SHOW_PARENT;
|
29 | SHOW_CHILD: typeof SHOW_CHILD;
|
30 | }
|
31 | declare const TreeSelect: TreeSelectInterface;
|
32 | export { TreeNode };
|
33 | export default TreeSelect;
|