import { ChildrenOrFunction, ClassNameOrFunction, ContextValue, StyleRenderProps } from './utils'; import React, { ReactNode } from 'react'; import { TreeHeaderProps, TreeItemProps, TreeItemRenderProps, TreeProps, TreeRenderProps, TreeSectionProps } from './Tree'; export declare const NavigationTreeContext: React.Context, HTMLDivElement>>; export declare const NavigationTreeItemStateContext: React.Context<{ isCurrentAncestor: boolean; }>; export interface NavigationTreeRenderProps extends Pick { } export interface NavigationTreeProps extends Omit, 'selectionMode' | 'selectionBehavior' | 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange' | 'disallowEmptySelection' | 'disabledBehavior' | 'keyboardNavigationBehavior' | 'escapeKeyBehavior' | 'shouldSelectOnPressUp' | 'dragAndDropHooks' | 'renderEmptyState' | 'onAction' | 'className' | 'style' | 'render'>, StyleRenderProps { /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the * element. A function may be provided to compute the class based on component state. * * @default 'react-aria-NavigationTree' */ className?: ClassNameOrFunction; /** The route that is currently selected, matched against each item's `href`. */ selectedRoute?: string | null; } /** * A NavigationTree provides users with a way to navigate a nested, hierarchical set of links. */ export declare const NavigationTree: (props: NavigationTreeProps & React.RefAttributes) => React.ReactElement | null; export interface NavigationTreeItemRenderProps extends TreeItemRenderProps { /** * Whether this item is the current route (its `href` matches the NavigationTree's * `selectedRoute`). * * @selector [data-current] */ isCurrent: boolean; /** * Whether this item is an ancestor of the current-route item (at any level, regardless of whether * it is expanded or collapsed). * * @selector [data-current-ancestor] */ isCurrentAncestor: boolean; } export interface NavigationTreeItemProps extends Omit, 'className' | 'style' | 'render' | 'onAction' | 'allowsArrowNavigation' | 'focusMode' | 'value'>, StyleRenderProps { /** * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the * element. A function may be provided to compute the class based on component state. * * @default 'react-aria-NavigationTreeItem' */ className?: ClassNameOrFunction; /** * The content of the side nav item along with any nested children. Supports static nested side * nav items or use of a Collection to dynamically render nested side nav items. */ children: ReactNode; } /** * A NavigationTreeItem represents an individual item in a NavigationTree. */ export declare const NavigationTreeItem: (props: NavigationTreeItemProps & React.RefAttributes) => React.ReactElement | null; export interface NavigationTreeItemContentRenderProps extends NavigationTreeItemRenderProps { } export interface NavigationTreeItemContentProps { /** * The children of the component. A function may be provided to alter the children based on * component state. */ children: ChildrenOrFunction; } export declare function NavigationTreeItemContent(props: NavigationTreeItemContentProps): ReactNode; export interface NavigationTreeSectionProps extends Omit, 'value'> { } /** * A NavigationTreeSection represents a section within a NavigationTree. */ export declare function NavigationTreeSection(props: NavigationTreeSectionProps): ReactNode; export interface NavigationTreeHeaderProps extends TreeHeaderProps { } /** * A NavigationTreeHeader renders the header of a NavigationTreeSection. */ export declare function NavigationTreeHeader(props: NavigationTreeHeaderProps): ReactNode;