import * as React from "react"; import LockStack, { LockListener } from "./LockStack"; export declare const LOCK_STACK: LockStack; /** * Creates a subscription to the lock stack that is bound to the lifetime * of the caller, based on `useEffect`. */ export declare function useLockSubscription(callback: LockListener): void; /** * Set up a return of focus to the target element specified by `returnTo` to * occur at the end of the lifetime of the caller component. In other words, * return focus to where it was before the caller component was mounted. */ export declare function useFocusReturn(returnRef?: React.RefObject, disabledRef?: React.RefObject): void; /** * Create and push a new lock onto the global LOCK_STACK, tied to the lifetime * of the caller. Returns a ref containing the current enabled state of the * layer, to be used for enabling/disabling the caller's lock logic. */ export declare function useLockLayer(controlledUID?: string): React.MutableRefObject; export declare type FocusLockOptions = { returnRef?: React.RefObject; disableReturnRef?: React.RefObject; attachToRef?: React.RefObject; disable?: boolean; }; export declare function useFocusLock(containerRef: React.RefObject, options?: FocusLockOptions): void; export default useFocusLock; /** * A convenience component for rendering "guard elements" that ensure there is * always a tabbable element either before or after (or both) an active lock. * These are most easily rendered right at the edges of the React rendering root * so that all locks can utilize the same guards. * * When no lock is active, `FocusGuard` is completely invisible, both visually * and in the focus order. When active, it gets a tabindex, but always remains * visually hidden. */ export declare const FocusGuard: React.MemoExoticComponent<() => JSX.Element>;