/** * @file Tree Select * @author chenqiang(chenqiang03@baidu.com) */ import * as React from 'react'; import type { TreeSelectProps as RcTreeSelectProps } from './src'; import { TreeNode, SHOW_ALL, SHOW_PARENT, SHOW_CHILD } from './src'; import type { BaseOptionType, DefaultOptionType } from './src/TreeSelect'; import type { BaseSelectRef } from 'rc-select'; import type { TreeProps } from '../tree/tree'; import type { SizeType } from '../config-provider/SizeContext'; import type { SelectCommonPlacement } from '../_util/motion'; import type { InputStatus } from '../_util/statusUtils'; export type SwitcherIcon = React.ReactNode | ((props: { expanded: boolean; }) => React.ReactNode); type RawValue = string | number; export interface LabeledValue { key?: string; value: RawValue; label: React.ReactNode; } export type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[]; export interface TreeSelectProps extends Omit, 'showTreeIcon' | 'treeMotion' | 'inputIcon' | 'mode' | 'getInputElement' | 'backfill' | 'treeLine'> { suffixIcon?: React.ReactNode; size?: SizeType; disabled?: boolean; placement?: SelectCommonPlacement; bordered?: boolean; treeLine?: TreeProps['showLine']; status?: InputStatus; showArrow?: boolean; switcherIcon?: SwitcherIcon; } declare const TreeSelectRef: (props: TreeSelectProps & { children?: React.ReactNode; } & { ref?: React.Ref; }) => React.ReactElement; type InternalTreeSelectType = typeof TreeSelectRef; interface TreeSelectInterface extends InternalTreeSelectType { TreeNode: typeof TreeNode; SHOW_ALL: typeof SHOW_ALL; SHOW_PARENT: typeof SHOW_PARENT; SHOW_CHILD: typeof SHOW_CHILD; } declare const TreeSelect: TreeSelectInterface; export { TreeNode }; export default TreeSelect;