/** * FileTree — collapsible tree renderer over `FileItem` rows. * * Lightweight tree over the `FileItem` primitive. Directories render a * chevron that toggles expansion; files act as leaves. Supports either * uncontrolled expansion (internal state) or controlled via `expandedIds` * + `onToggle` (useful for lazy-loading children). * * Keyboard: rows are reachable via Tab (inherited from `FileItem`). Enter/ * Space on a file fires `onSelect`; Enter/Space on a dir toggles expansion. * ArrowRight expands a dir, ArrowLeft collapses it. * * @module @mks2508/mks-ui/react/ui/FileTree */ import type { IFileTreeProps } from './FileTree.types'; /** * FileTree — tree of `FileItem` rows with expand/collapse. * * @example * ```tsx * console.log('selected', n.path)} * onToggle={(n, exp) => console.log('toggled', n.path, exp)} * /> * ``` * * @example * ```tsx * // Controlled expansion for lazy loading * const [expanded, setExpanded] = useState>(new Set()); * { * setExpanded((prev) => { * const next = new Set(prev); * if (exp) next.add(n.id); else next.delete(n.id); * return next; * }); * if (exp && !n.children) loadChildren(n); * }} * /> * ``` */ export declare const FileTree: import("react").MemoExoticComponent<({ nodes, onSelect, onToggle, expandedIds, selectedId, density, iconBasePath, iconResolve, indentPx, emptyLabel, className, slots, }: IFileTreeProps) => import("react/jsx-runtime").JSX.Element>; export { FileTreeStyles, fileTreeVariants } from './FileTree.styles'; export type { FileTreeSlot } from './FileTree.styles'; export type { IFileTreeProps, IFileTreeNode, FileTreeNodeKind, FileTreeDensity, } from './FileTree.types'; //# sourceMappingURL=index.d.ts.map