import { MouseEvent, ReactNode } from 'react'; /** Spread on the trigger element. The ref is handed over separately — `StyledButton` takes `refLink`. */ export interface PopoverTriggerProps { onClick: (event: MouseEvent) => void; 'aria-expanded': boolean; 'aria-controls': string | undefined; 'aria-haspopup': 'dialog' | undefined; 'aria-describedby': string | undefined; } export interface PopoverTrigger { /** Pass to `ref` on a native element, or to `refLink` on `StyledButton`. */ ref: (node: HTMLElement | null) => void; triggerProps: PopoverTriggerProps; isOpen: boolean; } /** Content API handed to every slot that can be a render-prop. */ export interface PopoverContentApi { close: () => void; } /** A slot that may need to close the surface — e.g. "View results (3)" or an Actions button. */ export type PopoverSlot = ReactNode | ((api: PopoverContentApi) => ReactNode); /** @figmaNode wXrXt5uKNNzV2DnQCgyYZH#44531-233781 (Design-System · "_Popover") */ export interface PopoverSheetProps { /** @figmaProp none — test hook */ dataTest: string; /** @figmaProp none — behavioral: the consumer owns the trigger element, this wires its aria + click */ renderTrigger: (trigger: PopoverTrigger) => ReactNode; /** * Chosen by content, not by breakpoint. * @figmaProp none — `info` is a read-only container referenced by `aria-describedby`; * `action` is a `role="dialog"` with a focus trap. */ variant?: 'info' | 'action'; /** @figmaProp Title = ReactNode→true | undefined→false */ title?: ReactNode; /** @figmaProp Slot — the body. The render-prop form receives `close()` for the Actions pattern. */ children: PopoverSlot; /** * Left slot of the Figma "Reset filter" row — the "View results (3)" affordance, which reports * the live match count and closes the surface (the filter itself already applied). * @figmaProp Reset filter = ReactNode→true | undefined→false — the 4px footer row, left slot */ viewResultsAction?: PopoverSlot; /** @figmaProp Reset filter = ReactNode→true | undefined→false — the 4px footer row, right slot */ resetAction?: PopoverSlot; /** @figmaProp Actions = ReactNode→true | undefined→false — the 12px footer row, right-aligned */ footerActions?: PopoverSlot; /** * Result total for the standard "Vis resultater (N)" control, rendered when no `viewResultsAction` * is given (see `formatResultsLabel`). On mobile the sheet also announces it from its own live * region, because the list behind is inert. `null` = total unavailable. * @figmaProp none — behavioral */ resultCount?: number | null; /** @figmaProp none — a11y: accessible name of the close control */ closeLabel?: string; /** @figmaProp none — a11y: required when `variant='action'` and no `title` is given, so the dialog has a name */ ariaLabel?: string; /** @figmaProp none — behavioral */ onOpenChange?: (isOpen: boolean) => void; /** @figmaProp none — style escape hatch, applied to the surface */ className?: string; } /** * ASMA Design System **Popover** (ASMA-8183) — an anchored overlay with the DS surface, an optional * title, a required close control and two optional footer rows. * * Two variants, chosen by content: * - **info** — read-only. Plain container referenced by `aria-describedby`, focus moves to the * container on open, `Tab` leaves and closes. * - **action** — interactive. `role="dialog"`, focus trapped, focus moves to the first control. * Covers both the Filter pattern (changes apply immediately, `Nullstill` clears) and the Actions * pattern (a list of buttons; activation closes via the `close()` render-prop argument). * * There is deliberately **no `role="menu"` and no arrow-key navigation** — everything inside is * navigated with `Tab`, and menu semantics cannot coexist with the dialog model used by Filter. * There is also **no arrow/anchor pointer**: the surface is edge-aligned at an 8px offset and * proximity carries the relationship. * * Below 744px `action` renders as a {@link StyledBottomSheet} (ASMA-8184) — same props, same content; * `info` stays anchored at every size, because for an explanation the link to its term is the point. * * Separate from {@link StyledPopover}, which stays as the MUI-parity positioning primitive its eight * internal consumers still depend on; those migrate here gradually. */ export declare const PopoverSheet: ({ dataTest, renderTrigger, variant, title, children, viewResultsAction, resetAction, footerActions, resultCount, closeLabel, ariaLabel, onOpenChange, className, }: PopoverSheetProps) => JSX.Element;