import type { ForwardRefComponent } from '@fluentui/react-utilities'; import type { JSXElement } from '@fluentui/react-utilities'; import type * as React_2 from 'react'; import { SubtreeContextValue } from '@fluentui/react-tree'; import type { TreeBaseState } from '@fluentui/react-tree'; import { TreeCheckedChangeData } from '@fluentui/react-tree'; import { TreeCheckedChangeEvent } from '@fluentui/react-tree'; import { TreeContextValue } from '@fluentui/react-tree'; import { TreeContextValues } from '@fluentui/react-tree'; import { TreeItemContextValues } from '@fluentui/react-tree'; import { TreeItemLayoutActionSlotProps } from '@fluentui/react-tree'; import { TreeItemLayoutActionVisibilityChangeData } from '@fluentui/react-tree'; import { TreeItemLayoutBaseProps as TreeItemLayoutProps } from '@fluentui/react-tree'; import { TreeItemLayoutBaseSlots as TreeItemLayoutSlots } from '@fluentui/react-tree'; import { TreeItemLayoutBaseState as TreeItemLayoutState } from '@fluentui/react-tree'; import { TreeItemOpenChangeData } from '@fluentui/react-tree'; import { TreeItemOpenChangeEvent } from '@fluentui/react-tree'; import { TreeItemProps } from '@fluentui/react-tree'; import { TreeItemSlots } from '@fluentui/react-tree'; import type { TreeItemState as TreeItemState_2 } from '@fluentui/react-tree'; import { TreeItemType } from '@fluentui/react-tree'; import { TreeItemValue } from '@fluentui/react-tree'; import { TreeNavigationData_unstable as TreeNavigationData } from '@fluentui/react-tree'; import { TreeNavigationDataParam } from '@fluentui/react-tree'; import { TreeNavigationEvent_unstable as TreeNavigationEvent } from '@fluentui/react-tree'; import { TreeNavigationMode } from '@fluentui/react-tree'; import { TreeOpenChangeData } from '@fluentui/react-tree'; import { TreeOpenChangeEvent } from '@fluentui/react-tree'; import { TreeBaseProps as TreeProps } from '@fluentui/react-tree'; import { TreeSelectionValue } from '@fluentui/react-tree'; import { TreeBaseSlots as TreeSlots } from '@fluentui/react-tree'; import { useSubtreeContext_unstable as useSubtreeContext } from '@fluentui/react-tree'; import { useTreeContext_unstable as useTreeContext } from '@fluentui/react-tree'; import { useTreeItemContext_unstable as useTreeItemContext } from '@fluentui/react-tree'; /** * Renders the final JSX of the Tree component, given the state and context values. * * A closed subtree is not rendered. */ export declare const renderTree: (state: TreeState, contextValues: TreeContextValues) => JSXElement; /** * Renders the final JSX of the TreeItem component, given the state and context values. */ export declare const renderTreeItem: (state: TreeItemState, contextValues: TreeItemContextValues) => JSXElement; /** * Renders the final JSX of the TreeItemLayout component, given the state. */ export declare const renderTreeItemLayout: (state: TreeItemLayoutState) => JSXElement; export { SubtreeContextValue } /** * Renders nested `TreeItem` children in a hierarchical structure. * * The root tree owns the `tree` role, the open and checked items, and keyboard navigation. A `Tree` * rendered inside a branch `TreeItem` becomes its `group` subtree. The root tree must be labelled with * `aria-label` or `aria-labelledby`. */ export declare const Tree: ForwardRefComponent; export { TreeCheckedChangeData } export { TreeCheckedChangeEvent } export { TreeContextValue } export { TreeContextValues } /** * Represents a single `treeitem` within a `Tree`. * * Must be rendered inside a `Tree`. A `branch` item renders its subtree as a nested `Tree`, and its * content is usually rendered with a `TreeItemLayout`. */ export declare const TreeItem: ForwardRefComponent; export { TreeItemContextValues } /** * Lays out the content of a `TreeItem`: an expand icon, a selector, icons, the main content, and * aside content or actions. * * Must be rendered inside a `TreeItem`. When the tree is selectable the `selector` slot renders a native * `input[type="checkbox"]` or `input[type="radio"]`, labelled by the main content. The `expandIcon` slot * has no default content. */ export declare const TreeItemLayout: ForwardRefComponent; export { TreeItemLayoutActionSlotProps } export { TreeItemLayoutActionVisibilityChangeData } export { TreeItemLayoutProps } export { TreeItemLayoutSlots } export { TreeItemLayoutState } export { TreeItemOpenChangeData } export { TreeItemOpenChangeEvent } export { TreeItemProps } export { TreeItemSlots } export declare type TreeItemState = TreeItemState_2 & { root: { /** * Data attribute reflecting the item type, `leaf` or `branch`. */ 'data-item-type'?: TreeItemType; /** * Data attribute set when a branch item is open. */ 'data-open'?: string; /** * Data attribute set when the item is checked. Value is an empty string when checked and `mixed` * when partially checked, and the attribute is absent when unchecked. */ 'data-checked'?: string; }; }; export { TreeItemType } export { TreeItemValue } export { TreeNavigationData } export { TreeNavigationDataParam } export { TreeNavigationEvent } export { TreeNavigationMode } export { TreeOpenChangeData } export { TreeOpenChangeEvent } export { TreeProps } export { TreeSelectionValue } export { TreeSlots } export declare type TreeState = TreeBaseState & { root: { /** * Data attribute reflecting the navigation mode of the root tree, `tree` or `treegrid`. * The attribute is absent on subtrees. */ 'data-navigation-mode'?: TreeNavigationMode; /** * Data attribute reflecting the selection mode of the root tree, `single` or `multiselect`. * The attribute is absent on subtrees and when selection is disabled. */ 'data-selection-mode'?: 'single' | 'multiselect'; }; }; export { useSubtreeContext } /** * Returns the state for a Tree component, given its props and ref. * The returned state can be modified with hooks before being passed to `renderTree`. * * Arrow key navigation, type ahead and the roving tab index are managed by the root tree. */ export declare const useTree: (props: TreeProps, ref: React_2.Ref) => TreeState; export { useTreeContext } /** * Maps the state of the tree to the values that are passed through context to its items. */ export declare const useTreeContextValues: (state: TreeState) => TreeContextValues; /** * Returns the state for a TreeItem component, given its props and ref. * The returned state can be modified with hooks before being passed to `renderTreeItem`. */ export declare const useTreeItem: (props: TreeItemProps, ref: React_2.Ref) => TreeItemState; export { useTreeItemContext } /** * Maps the state of the tree item to the values that are passed through context to its layout and subtree. */ export declare const useTreeItemContextValues: (state: TreeItemState) => TreeItemContextValues; /** * Returns the state for a TreeItemLayout component, given its props and ref. * The returned state can be modified with hooks before being passed to `renderTreeItemLayout`. */ export declare const useTreeItemLayout: (props: TreeItemLayoutProps, ref: React_2.Ref) => TreeItemLayoutState; export { }