import React from 'react'; import { FocusableTarget } from '../utils/createFocusTrap'; export declare type LockProps = { children: (React.ReactElement & { ref?: React.Ref; }) | ((ref: React.RefObject) => React.ReactNode); /** * Whether the Lock is currently active * (defaut: false) */ isActive?: boolean; /** * A function called when the Lock is deactivated from the inside (escape / outslide click) */ onDeactivate?: () => void; /** * A ref to an element to focus on inside the Lock after it is activated. * (default: first focusable element inside the Lock) * (fallback: first focusable element inside the Lock, then the container itself) */ refToFocusOnActivation?: React.RefObject; /** * A ref to an element to focus on outside the Lock after it is deactivated. * (default: last focused element before the Lock was activated) * (fallback: none) */ refToFocusOnDeactivation?: React.RefObject; /** Whether pressing the escape key should deactivate the Lock */ shouldDeactivateOnEscape: boolean; /** Whether clicking outside the locked container should deactivate the Lock */ shouldDeactivateOnOutsideClick: boolean | ((event: MouseEvent | TouchEvent) => boolean); /** Whether pointer events happening outside the locked container should be blocked */ shouldBlockOutsideClick: boolean; /** Whether scrolling should be locked */ shouldLockScroll: boolean; }; export declare function Lock({ children, isActive, onDeactivate, refToFocusOnActivation, refToFocusOnDeactivation, shouldDeactivateOnEscape, shouldDeactivateOnOutsideClick, shouldBlockOutsideClick, shouldLockScroll, }: LockProps): JSX.Element;