export declare const IS_VISIBLE_ATTRIBUTE = "data-is-visible"; export declare const FOCUSZONE_ID_ATTRIBUTE = "data-focuszone-id"; export declare const FOCUSZONE_SUB_ATTRIBUTE = "data-is-sub-focuszone"; export declare const HIDDEN_FROM_ACC_TREE = "data-is-hidden-from-acc-tree"; export { getDocument, getParent, getWindow } from '@uifabric/utilities'; /** * Gets the first focusable element. * * @public */ export declare function getFirstFocusable(rootElement: HTMLElement, currentElement: HTMLElement, includeElementsInFocusZones?: boolean): HTMLElement | null; /** * Gets the last focusable element. * * @public */ export declare function getLastFocusable(rootElement: HTMLElement, currentElement: HTMLElement, includeElementsInFocusZones?: boolean): HTMLElement | null; /** * Gets the first tabbable element. * The difference between focusable and tabbable is that tabbable elements are focusable elements that also have tabIndex != -1. * @param rootElement - The parent element to search beneath. * @param currentElement - The descendant of rootElement to start the search at. This element is the first one checked, * and iteration continues forward. Typical use passes rootElement.firstChild. * @param includeElementsInFocusZones - true if traversal should go into FocusZone descendants. * @public */ export declare function getFirstTabbable(rootElement: HTMLElement, currentElement: HTMLElement, includeElementsInFocusZones?: boolean, checkNode?: boolean): HTMLElement | null; /** * Gets the last tabbable element. * The difference between focusable and tabbable is that tabbable elements are focusable elements that also have tabIndex != -1. * @param rootElement - The parent element to search beneath. * @param currentElement - The descendant of rootElement to start the search at. This element is the first one checked, * and iteration continues in reverse. Typical use passes rootElement.lastChild. * @param includeElementsInFocusZones - true if traversal should go into FocusZone descendants. * @public */ export declare function getLastTabbable(rootElement: HTMLElement, currentElement: HTMLElement, includeElementsInFocusZones?: boolean, checkNode?: boolean): HTMLElement | null; /** * Traverse to find the previous element. * If tabbable is true, the element must have tabIndex != -1. * * @public */ export declare function getPreviousElement(rootElement: HTMLElement, currentElement: HTMLElement | null, checkNode?: boolean, suppressParentTraversal?: boolean, traverseChildren?: boolean, includeElementsInFocusZones?: boolean, tabbable?: boolean): HTMLElement | null; /** * Traverse to find the next focusable element. * If tabbable is true, the element must have tabIndex != -1. * * @public */ export declare function getNextElement(rootElement: HTMLElement, currentElement: HTMLElement | null, checkNode?: boolean, suppressParentTraversal?: boolean, suppressChildTraversal?: boolean, includeElementsInFocusZones?: boolean, tabbable?: boolean): HTMLElement | null; /** * Determines if an element is visible. * * @public */ export declare function isElementVisible(element: HTMLElement | undefined | null): boolean; /** * Determines if an element can receive focus programmatically or via a mouse click. * If checkTabIndex is true, additionally checks to ensure the element can be focused with the tab key, meaning tabIndex != -1. * * @public */ export declare function isElementTabbable(element: HTMLElement, checkTabIndex?: boolean): boolean; /** * Determines if a given element is a focus zone. * * @public */ export declare function isElementFocusZone(element?: HTMLElement): boolean; /** * Determines if a given element is a focus sub zone. * * @public */ export declare function isElementFocusSubZone(element?: HTMLElement): boolean; /** * Sets focus to an element asynchronously. The focus will be set at the next browser repaint, * meaning it won't cause any extra recalculations. If more than one focusAsync is called during one frame, * only the latest called focusAsync element will actually be focused * @param element - The element to focus */ export declare function focusAsync(element: HTMLElement | { focus: () => void; } | undefined | null): void; /** * Finds the closest focusable element via an index path from a parent. See * `getElementIndexPath` for getting an index path from an element to a child. */ export declare function getFocusableByIndexPath(parent: HTMLElement, path: number[]): HTMLElement | undefined; /** * Finds the element index path from a parent element to a child element. * * If you had this node structure: "A has children [B, C] and C has child D", * the index path from A to D would be [1, 0], or `parent.chidren[1].children[0]`. */ export declare function getElementIndexPath(fromElement: HTMLElement, toElement: HTMLElement): number[];