import React from 'react' ; import { FocusOn } from 'react-focus-on' ; import type * as Polymorphic from '@radix-ui/react-polymorphic' ; type FocusOnProps = React . ComponentProps < typeof FocusOn > ; interface Props { children : React . ReactNode ; /**
     * The main switch
     */ enabled ? : FocusOnProps [ 'enabled' ] ; /**
     * Controls scroll lock behavior
     */ scrollLock ? : FocusOnProps [ 'scrollLock' ] ; /**
     * Controls focus lock behavior
     */ focusLock ? : FocusOnProps [ 'focusLock' ] ; default autoFocus ? : FocusOnProps [ 'autoFocus' ] ; default returnFocus ? : FocusOnProps [ 'returnFocus' ] ; see https shouldIgnore ? : FocusOnProps [ 'shouldIgnore' ] ; /**
     * Action to perform on Esc key press
     */ onEscapeKey ? : FocusOnProps [ 'onEscapeKey' ] ; /**
     * Action to perform on click outside
     */ onClickOutside ? : FocusOnProps [ 'onClickOutside' ] ; param node onActivation ? : FocusOnProps [ 'onActivation' ] ; /**
     * Callback on lock deactivation
     */ onDeactivation ? : FocusOnProps [ 'onDeactivation' ] ; see https noIsolation ? : FocusOnProps [ 'noIsolation' ] ; default see https inert ? : FocusOnProps [ 'inert' ] ; default see https allowPinchZoom ? : FocusOnProps [ 'allowPinchZoom' ] ; } type PolymorphicFocusLock = Polymorphic . ForwardRefComponent < 'div' , Props > ; export type FocusLockProps = Polymorphic . OwnProps < PolymorphicFocusLock > ; export const FocusLock = React . forwardRef ( ( props , ref ) => { return < FocusOn ref = { ref } { ... props } />; } ) as PolymorphicFocusLock ;