import { Accessibility } from '../../types'; /** * @description * Adds role 'treeitem' to a non-leaf item and 'none' to a leaf item. * Adds 'aria-expanded' with a value based on the 'open' prop if item is not a leaf. * Adds 'tabIndex' as '-1' if the item is not a leaf. * * @specification * Triggers 'performClick' action with 'Enter' or 'Spacebar' on 'root'. * Triggers 'focusParent' action with 'ArrowLeft' on 'root', when has a closed subtree. * Triggers 'collapse' action with 'ArrowLeft' on 'root', when has an opened subtree. * Triggers 'expand' action with 'ArrowRight' on 'root', when has a closed subtree. * Triggers 'focusFirstChild' action with 'ArrowRight' on 'root', when has an opened subtree. */ declare const treeItemBehavior: Accessibility; export declare type TreeItemBehaviorProps = { /** If item is a subtree, it indicates if it's open. */ open?: boolean; level?: number; index?: number; hasSubtree?: boolean; treeSize?: number; }; export default treeItemBehavior;