import { VueNode } from "../_util/type.js"; import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js"; import "../_util/hooks/index.js"; import { SizeType } from "../config-provider/SizeContext.js"; import { InputStatus } from "../_util/statusUtils.js"; import { SelectCommonPlacement } from "../_util/motion.js"; import { SwitcherIcon, TreeProps } from "../tree/Tree.js"; import "../tree/index.js"; import { Variant } from "../config-provider/context.js"; import { App, CSSProperties, PublicProps } from "vue"; import { DataNode, SHOW_ALL, SHOW_CHILD, SHOW_PARENT, TreeNode, TreeSelectProps as TreeSelectProps$1 } from "@v-c/tree-select"; //#region src/tree-select/index.d.ts type RawValue = string | number; interface LabeledValue { key?: string; value: RawValue; label: VueNode; } type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[]; type TreeSelectSemanticName = keyof TreeSelectSemanticClassNames & keyof TreeSelectSemanticStyles; interface TreeSelectSemanticClassNames { root?: string; prefix?: string; input?: string; suffix?: string; content?: string; placeholder?: string; item?: string; itemContent?: string; itemRemove?: string; } interface TreeSelectSemanticStyles { root?: CSSProperties; prefix?: CSSProperties; input?: CSSProperties; suffix?: CSSProperties; content?: CSSProperties; placeholder?: CSSProperties; item?: CSSProperties; itemContent?: CSSProperties; itemRemove?: CSSProperties; } type TreeSelectPopupSemanticName = keyof TreeSelectPopupSemanticClassNames & keyof TreeSelectPopupSemanticStyles; interface TreeSelectPopupSemanticClassNames { root?: string; item?: string; itemTitle?: string; itemSwitcher?: string; } interface TreeSelectPopupSemanticStyles { root?: CSSProperties; item?: CSSProperties; itemTitle?: CSSProperties; itemSwitcher?: CSSProperties; } type TreeSelectClassNamesType = SemanticClassNamesType & { popup?: TreeSelectPopupSemanticClassNames; }; type TreeSelectStylesType = SemanticStylesType & { popup?: TreeSelectPopupSemanticStyles; }; interface BaseTreeSelectProps extends Omit, 'showTreeIcon' | 'treeMotion' | 'mode' | 'getInputElement' | 'backfill' | 'treeLine' | 'switcherIcon' | 'classNames' | 'styles' | 'style' | 'onSelect' | 'onTreeExpand' | 'onTreeLoad' | 'onChange' | 'onDeselect' | 'onPopupScroll' | 'onPopupVisibleChange' | 'onSearch'> { size?: SizeType; disabled?: boolean; status?: InputStatus; variant?: Variant; } interface TreeSelectProps extends BaseTreeSelectProps, TreeSelectEmitsProps { styles?: TreeSelectStylesType; classes?: TreeSelectClassNamesType; suffixIcon?: VueNode; size?: SizeType; disabled?: boolean; placement?: SelectCommonPlacement; /** @deprecated Please use `classNames.popup.root` instead */ popupClassName?: string; /** @deprecated Please use `classNames.popup.root` instead */ dropdownClassName?: string; /** @deprecated Please use `popupRender` instead */ dropdownRender?: (menu: any) => any; popupRender?: (menu: any) => any; /** @deprecated Please use `styles.popup.root` instead */ dropdownStyle?: CSSProperties; /** @deprecated Use `variant` instead. */ bordered?: boolean; treeLine?: TreeProps['showLine']; status?: InputStatus; switcherIcon?: SwitcherIcon | TreeSelectProps$1['switcherIcon']; rootClass?: string; /** @deprecated Please use `popupMatchSelectWidth` instead */ dropdownMatchSelectWidth?: boolean | number; popupMatchSelectWidth?: boolean | number; /** * @deprecated `showArrow` is deprecated which will be removed in next major version. It will be a * default behavior, you can hide it by setting `suffixIcon` to null. */ showArrow?: boolean; /** * @since 5.13.0 * @default "outlined" */ variant?: Variant; } interface TreeSelectEmits { 'focus': (e: FocusEvent) => void; 'blur': (e: FocusEvent) => void; 'openChange': (open: boolean) => void; 'dropdownVisibleChange': (open: boolean) => void; 'select': NonNullable['onSelect']>; 'treeExpand': NonNullable['onTreeExpand']>; 'treeLoad': NonNullable['onTreeLoad']>; 'change': NonNullable['onChange']>; 'update:value': (value: any) => void; 'deselect': NonNullable['onDeselect']>; 'popupScroll': NonNullable['onPopupScroll']>; 'search': NonNullable['onSearch']>; } interface TreeSelectEmitsProps { onFocus?: TreeSelectEmits['focus']; onBlur?: TreeSelectEmits['blur']; onOpenChange?: TreeSelectEmits['openChange']; onDropdownVisibleChange?: TreeSelectEmits['dropdownVisibleChange']; onSelect?: TreeSelectEmits['select']; onTreeExpand?: TreeSelectEmits['treeExpand']; onTreeLoad?: TreeSelectEmits['treeLoad']; onChange?: TreeSelectEmits['change']; 'onUpdate:value'?: TreeSelectEmits['update:value']; onDeselect?: TreeSelectEmits['deselect']; onPopupScroll?: TreeSelectEmits['popupScroll']; onSearch?: TreeSelectEmits['search']; } interface TreeSelectSlots { suffixIcon?: () => any; tagRender?: (props: any) => any; notFoundContent?: () => any; switcherIcon?: () => any; treeTitleRender?: (nodeData: OptionType) => any; } interface TreeSelectInstance { $props: TreeSelectProps & PublicProps; $emit: { (event: 'focus', ...args: Parameters): void; (event: 'blur', ...args: Parameters): void; (event: 'openChange', ...args: Parameters): void; (event: 'dropdownVisibleChange', ...args: Parameters): void; (event: 'select', ...args: Parameters['select']>): void; (event: 'treeExpand', ...args: Parameters['treeExpand']>): void; (event: 'treeLoad', ...args: Parameters['treeLoad']>): void; (event: 'change', ...args: Parameters['change']>): void; (event: 'update:value', ...args: Parameters): void; (event: 'deselect', ...args: Parameters['deselect']>): void; (event: 'popupScroll', ...args: Parameters['popupScroll']>): void; (event: 'search', ...args: Parameters['search']>): void; }; $slots: TreeSelectSlots; focus: () => void; blur: () => void; scrollTo: (arg: any) => void; } interface TreeSelectConstructor { new (props: TreeSelectProps): TreeSelectInstance; /** * Non-generic fallback signature. TypeScript infers from the last overload, * so this keeps render-function usage like `h(TreeSelect, props)` resolvable * against Vue's `Constructor

` overload of `h` (see #634), while the * generic signature above still drives template/Volar inference. */ new (props: TreeSelectProps): TreeSelectInstance; install: (app: App) => void; TreeNode: typeof TreeNode; SHOW_ALL: typeof SHOW_ALL; SHOW_PARENT: typeof SHOW_PARENT; SHOW_CHILD: typeof SHOW_CHILD; _InternalPanelDoNotUseOrYouWillBeFired: any; } declare const TreeSelect: TreeSelectConstructor; declare const TreeSelectNode: import("vue").DefineSetupFnComponent, {}, {}, Record, PublicProps>; //#endregion export { LabeledValue, SelectValue, TreeSelectClassNamesType, TreeSelectConstructor, TreeSelectEmits, TreeSelectEmitsProps, TreeSelectNode, TreeSelectPopupSemanticClassNames, TreeSelectPopupSemanticName, TreeSelectPopupSemanticStyles, TreeSelectProps, TreeSelectSemanticClassNames, TreeSelectSemanticName, TreeSelectSemanticStyles, TreeSelectSlots, TreeSelectStylesType, TreeSelect as default };