import * as React from 'react'; import { type UseRenderElementComponentProps } from "../../internals/useRenderElement.mjs"; import type { BaseUIComponentProps } from "../../internals/types.mjs"; type FocusManagerState = null | { modal: boolean; open: boolean; onOpenChange(open: boolean, data?: { reason?: string | undefined; event?: Event | undefined; }): 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 | undefined; container?: HTMLElement | ShadowRoot | null | React.RefObject | undefined; componentProps?: UseRenderElementComponentProps | undefined; elementProps?: React.HTMLAttributes | undefined; } export interface UseFloatingPortalNodeResult { node: HTMLElement | null; /** * The `id` attribute of the portal node. On React 17 it is `undefined` until the `useId` * polyfill assigns it in an effect after the node has been created. */ nodeId: string | undefined; subtree: React.ReactPortal | null; } export declare function useFloatingPortalNode(props?: UseFloatingPortalNodeProps): UseFloatingPortalNodeResult; export interface FloatingPortalState {} export declare namespace FloatingPortal { type State = FloatingPortalState; interface Props extends BaseUIComponentProps<'div', TState> { /** * A parent element to render the portal element into. */ container?: UseFloatingPortalNodeProps['container'] | undefined; /** * @ignore * The role for the hidden `aria-owns` owner element. */ portalOwnerRole?: React.AriaRole | undefined; } } export {};