import * as React from 'react'; import { useRenderElement } from "../../utils/useRenderElement.js"; import type { BaseUIComponentProps } from "../../utils/types.js"; type FocusManagerState = null | { modal: boolean; open: boolean; onOpenChange(open: boolean, data?: { reason?: string; event?: Event; }): void; domReference: Element | null; closeOnFocusOut: boolean; }; export declare const usePortalContext: () => { portalNode: HTMLElement | null; setFocusManagerState: React.Dispatch>; beforeInsideRef: React.RefObject; afterInsideRef: React.RefObject; beforeOutsideRef: React.RefObject; afterOutsideRef: React.RefObject; } | null; export interface UseFloatingPortalNodeProps { ref?: React.Ref; container?: HTMLElement | ShadowRoot | null | React.RefObject; componentProps?: useRenderElement.ComponentProps; elementProps?: React.HTMLAttributes; elementState?: Record; } export interface UseFloatingPortalNodeResult { portalNode: HTMLElement | null; portalSubtree: React.ReactPortal | null; } export declare function useFloatingPortalNode(props?: UseFloatingPortalNodeProps): UseFloatingPortalNodeResult; /** * Portals the floating element into a given container element — by default, * outside of the app root and into the body. * This is necessary to ensure the floating element can appear outside any * potential parent containers that cause clipping (such as `overflow: hidden`), * while retaining its location in the React tree. * @see https://floating-ui.com/docs/FloatingPortal * @internal */ export declare const FloatingPortal: React.ForwardRefExoticComponent & { renderGuards?: boolean; } & React.RefAttributes>; export declare namespace FloatingPortal { interface Props extends BaseUIComponentProps<'div', State> { /** * A parent element to render the portal element into. */ container?: UseFloatingPortalNodeProps['container']; } } export {};