import { type ReactNode } from "react"; /** * Parent scroll behavior applied to every {@link Overlay} rendered in the subtree of * {@link OverlayAlignOnParentScrollProvider}. * * @internal */ export interface IOverlayParentScrollBehavior { /** * Re-align overlays to their anchor when any scrollable ancestor of the anchor is scrolled. */ alignOnParentScroll: boolean; /** * Close overlays once their anchor gets fully hidden, e.g. scrolled out of view of a scrollable ancestor. */ closeOnAnchorHidden: boolean; } /** * Context with the parent scroll behavior of the overlays rendered in its subtree. * * @internal */ export declare const OverlayAlignOnParentScrollContext: import("react").Context; /** * Properties for {@link OverlayAlignOnParentScrollProvider} component. * * @internal */ export interface IOverlayAlignOnParentScrollProviderProps { /** * Whether the overlays in the subtree should be re-aligned on parent scroll. Defaults to true. */ enabled?: boolean; /** * Whether the overlays in the subtree should be closed once their anchor gets fully hidden, * e.g. scrolled out of view of a scrollable ancestor. Defaults to false. */ closeOnAnchorHidden?: boolean; /** * React children */ children?: ReactNode; } /** * Makes overlays rendered in its subtree stay attached to their anchor while a scrollable parent * of the anchor scrolls. Useful for overlays opened from a scrollable container, which would * otherwise stay at their original position until re-rendered. * * @internal */ export declare function OverlayAlignOnParentScrollProvider({ enabled, closeOnAnchorHidden, children, }: IOverlayAlignOnParentScrollProviderProps): import("react/jsx-runtime").JSX.Element; interface IOverlayParentScrollAlignerProps { alignOnParentScroll?: boolean; closeOnAnchorHidden?: boolean; /** * Changes whenever the anchor may change, so the anchor is resolved again. */ anchorKey: unknown; getAnchor: () => Element | null; onParentScroll: () => void; onAnchorHidden: () => void; } /** * Hook-based part of the class {@link Overlay}, so it can read the context next to the overlay controller one. * * @internal */ export declare function OverlayParentScrollAligner({ alignOnParentScroll, closeOnAnchorHidden, anchorKey, getAnchor, onParentScroll, onAnchorHidden, }: IOverlayParentScrollAlignerProps): null; export {}; //# sourceMappingURL=OverlayAlignOnParentScroll.d.ts.map