@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
85 lines • 2.08 kB
text/typescript
import { ControlSize } from "../controlSize.mjs";
import { CSSProperties, MouseEvent, ReactNode } from "react";
//#region src/base-ui/Tree/type.d.ts
interface TreeDataNode {
checkable?: boolean;
children?: TreeDataNode[];
disabled?: boolean;
icon?: ReactNode;
isLeaf?: boolean;
key: string;
selectable?: boolean;
title: ReactNode;
}
interface TreeFlatRow {
depth: number;
hasChildren: boolean;
index: number;
isLast: boolean;
node: TreeDataNode;
parentKey: string | null;
trail: boolean[];
}
interface TreeClassNames {
guide?: string;
node?: string;
root?: string;
switcher?: string;
title?: string;
}
interface TreeStyles {
guide?: CSSProperties;
node?: CSSProperties;
root?: CSSProperties;
switcher?: CSSProperties;
title?: CSSProperties;
}
interface TreeProps {
blockNode?: boolean;
checkable?: boolean;
checkedKeys?: string[];
checkStrictly?: boolean;
className?: string;
classNames?: TreeClassNames;
defaultCheckedKeys?: string[];
defaultExpandAll?: boolean;
defaultExpandedKeys?: string[];
defaultSelectedKeys?: string[];
disabled?: boolean;
expandedKeys?: string[];
indent?: number;
multiple?: boolean;
onCheck?: (keys: string[], info: {
checked: boolean;
node: TreeDataNode;
}) => void;
onExpand?: (keys: string[], info: {
expanded: boolean;
node: TreeDataNode;
}) => void;
onRightClick?: (info: {
event: MouseEvent<HTMLDivElement>;
node: TreeDataNode;
}) => void;
onSelect?: (keys: string[], info: {
node: TreeDataNode;
selected: boolean;
}) => void;
scopeId?: string;
selectedKeys?: string[];
showIcon?: boolean;
showLine?: boolean;
size?: ControlSize;
style?: CSSProperties;
styles?: TreeStyles;
switcherIcon?: ReactNode | ((info: {
expanded: boolean;
node: TreeDataNode;
}) => ReactNode);
titleRender?: (node: TreeDataNode) => ReactNode;
treeData: TreeDataNode[];
vimKeys?: boolean;
}
//#endregion
export { TreeClassNames, TreeDataNode, TreeFlatRow, TreeProps, TreeStyles };
//# sourceMappingURL=type.d.mts.map