import "./popover.css"; import type * as React from "react"; import { Popover as Base } from "@base-ui/react/popover"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; export type PopoverSide = "top" | "right" | "bottom" | "left"; export type PopoverAlign = "start" | "center" | "end"; /** `unknown` because `RefObject` is invariant in its element; {@link anchorElement} checks instead. */ export type PopoverTriggerRef = React.RefObject; export interface PopoverProps { open?: boolean; onOpenChange?: (open: boolean) => void; defaultOpen?: boolean; children: React.ReactNode; side?: PopoverSide; align?: PopoverAlign; offset?: number; inheritTriggerWidth?: boolean; /** Anchor to an element outside the popover — a grid cell being edited, a row whose ⋯ unmounted. */ triggerRef?: PopoverTriggerRef; } export declare function Popover(props: PopoverProps): React.JSX.Element; export interface PopoverTriggerProps { /** Rendered as the trigger, so it adds no box and must forward its `ref` and props; an anchor-only * element uses `Popover`'s `triggerRef`. */ children: React.ReactElement; /** Default true, as kit controls are; `false` makes Base UI supply the role and keyboard, since the * child is cloned. */ nativeButton?: boolean; } /** Base UI's trigger rendered as the child, so it holds the element it positions against and returns focus * to. **The press arrives as `onPress`**; passing both toggles twice. */ export declare function PopoverTrigger({ children, nativeButton }: PopoverTriggerProps): React.JSX.Element; export interface PopoverHeaderProps extends StyleProps { children: React.ReactNode; ref?: React.Ref; render?: useRender.RenderProp; } /** The fixed top band outside the scroller, rendered through Base UI's `Popover.Title` so the popup gets * `aria-labelledby` (a dialog needs a name). */ export declare function PopoverHeader({ children, ref, render, ...props }: PopoverHeaderProps): React.ReactElement>; export interface PopoverFooterProps extends StyleProps { children: React.ReactNode; showDivider?: boolean; /** Action Layout: commit right (`end`, default); utility-left + commit-right → `space-between`; * informational → `start`. */ align?: "start" | "end" | "space-between"; ref?: React.Ref; render?: useRender.RenderProp; } export declare function PopoverFooter({ children, showDivider, align, ref, render, ...props }: PopoverFooterProps): React.ReactElement>; export interface PopoverContentProps extends StyleProps { testID?: string; children: React.ReactNode; disableBodyScroll?: boolean; /** Covers all three bands: the panel is `max-content`, so a body-only width lets a long title stretch * it. */ width?: number; /** The scrolling band's cap; the header keeps its height so a wrapped name never scrolls away. */ maxHeight?: number; /** Defaults to the locale's `overlay.close`. */ closeLabel?: string; /** Default true; false for an anchored panel whose trigger keeps focus (a combobox using * `aria-activedescendant`). Focus return on close is independent. */ manageFocus?: boolean; /** The panel's name where no `PopoverHeader` states one and the trigger's words are not it — a value * whose panel edits a named field. */ accessibilityLabel?: string; ref?: React.Ref; render?: Base.Popup.Props["render"]; } export declare function PopoverContent(props: PopoverContentProps): React.JSX.Element;