import { RefObject } from 'react'; /** Tabbable descendants of `root`, in DOM order. */ export declare function tabbablesIn(root: ParentNode | null): HTMLElement[]; export interface UseFocusBoundaryArgs { /** The trigger element focus returns to on Escape / Shift+Tab out of the content's top. */ triggerRef: RefObject; /** The portaled content root — tabbables inside it define the Tab boundary. */ contentRef: RefObject; } /** * Focus helpers for content portaled to the end of the DOM (e.g. via BodyEnd), where Tab can't * reach it in visual document order on its own. Used by Popover and by Menu, which both need to * hand focus back to the trigger on Escape / Shift+Tab out of the top, and continue focus * naturally past the trigger when Tab exits the bottom. */ export declare function useFocusBoundary({ triggerRef, contentRef }: UseFocusBoundaryArgs): { firstTriggerFocusable: () => HTMLElement | null; restoreFocusToTrigger: () => void; focusAfterTrigger: () => void; };