import React from 'react'; import { type ComposableProps } from '../../../lib/slot'; import type { TreeNodeData } from './TreeTypes'; import { type GlassVariant } from '../../../lib/glass'; import type { IconName } from '../../atoms/Icons'; export interface TreeProps extends Omit, 'onSelect'> { /** * Expanded keys (controlled) */ expandedKeys?: string[]; /** * Default expanded keys */ defaultExpandedKeys?: string[]; /** * Selected keys (controlled) */ selectedKeys?: string[]; /** * Default selected keys */ defaultSelectedKeys?: string[]; /** * Checked keys (controlled) */ checkedKeys?: string[]; /** * Default checked keys */ defaultCheckedKeys?: string[]; /** * Whether to show checkboxes * @default false */ checkable?: boolean; /** * Whether nodes are selectable * @default true */ selectable?: boolean; /** * Whether to allow multiple selection * @default false */ multiple?: boolean; /** * Whether to show connecting lines * @default false */ showLine?: boolean; /** * Whether to show icons * @default false */ showIcon?: boolean; /** * Default expand all nodes * @default false */ defaultExpandAll?: boolean; /** * Callback when node is expanded/collapsed */ onExpand?: (expandedKeys: string[], info: { node: TreeNodeData; expanded: boolean; }) => void; /** * Callback when node is selected */ onSelect?: (selectedKeys: string[], info: { node: TreeNodeData; selected: boolean; }) => void; /** * Callback when node is checked */ onCheck?: (checkedKeys: string[], info: { node: TreeNodeData; checked: boolean; }) => void; /** * Custom expand/collapse icon */ switcherIcon?: React.ReactNode | ((props: { expanded: boolean; }) => React.ReactNode); /** * Custom node icon */ icon?: IconName | ((props: { expanded: boolean; isLeaf: boolean; }) => React.ReactNode); /** * Disabled entire tree * @default false */ disabled?: boolean; /** * Block node (full width clickable) * @default false */ blockNode?: boolean; /** * Enable glassmorphism effect on tree background * - `true`: Standard glass effect * - `'subtle'`: Subtle glass effect * - `'prominent'`: Prominent glass effect */ glass?: GlassVariant; /** * Tree content (composable TreeNode children) */ children?: React.ReactNode; } /** * Tree Component * * A tree component for displaying hierarchical data. * Uses composable TreeNode sub-components for maximum flexibility. * * @public * * @example * ```tsx * * * * * * ``` * * @remarks * - Composable API provides maximum flexibility and control * - All sub-components (TreeNode, TreeNodeSwitcher, etc.) support `asChild` * - Supports selection, checking, and expansion */ export declare const Tree: React.ForwardRefExoticComponent>; export default Tree; //# sourceMappingURL=Tree.d.ts.map