import { type RefObject } from "react"; import { type View } from "react-native"; /** Move focus into an attached modal panel, trap Tab, and restore on close. * Attach the returned object ref to a View with tabIndex={-1}. Native and SSR * do not touch DOM globals; native modal accessibility remains the caller's. */ export declare function useDialogFocus(open: boolean): RefObject; /** Move focus into an attached nonmodal panel and restore on close. Tab remains * free to leave the panel. Pass false for an always-visible inline popover. */ export declare function usePopoverFocus(open: boolean): RefObject; /** What useAnchoredCardFocus reads. */ export interface AnchoredCardFocusOptions { /** The card is revealed and its controls can take focus. */ shown: boolean; /** The card's root. */ cardRef: RefObject; /** The control the card opened from: its stops come right before the card's. */ triggerRef: RefObject; /** Where focus goes back when the card closes, if what had focus at the opening is gone. */ returnRef: RefObject; /** * Runs after a Tab takes focus out of the card, or off its trigger anywhere but into * the card (a menu or option list closes then: the WAI-ARIA menu and listbox patterns). */ onLeave?: () => void; /** Give orphaned focus back on close (false for a combobox's popup, whose field kept it). */ restore: boolean; /** * Keep keyboard focus inside the card while it is shown (a modal sheet): Tab and * Shift+Tab wrap at the ends of its controls (and of the cards opened from inside it), * and a Tab from the page behind it enters it. */ trap?: boolean; } /** * An anchored card's keyboard focus on the web (AnchoredOverlay): while it is shown, its * controls keep their place in the tab order right after its trigger, inside the modal * the trigger sits in, if any, or with `trap` they are the whole order; when it unmounts, * the focus it held and its closing orphaned goes back to what had focus when it opened, * or else to the first stop in `returnRef`. Focus the user already moved to another live * control stays where it is. DOM focus only; natively and during SSR it does nothing. */ export declare function useAnchoredCardFocus({ shown, cardRef, triggerRef, returnRef, onLeave, restore, trap }: AnchoredCardFocusOptions): void; //# sourceMappingURL=use-dialog-focus.d.ts.map