/** * @fileoverview Saasflare Dialog — modal overlay with spring entry animation. * @module packages/ui/components/ui/dialog * @layer core * * Self-contained implementation using Radix Dialog primitive directly. * Entry animation (Motion spring) respects reduced-motion preference and the * `animated` axis; exit is handled by Radix CSS state classes because Radix * unmounts Content on close (no AnimatePresence wrapper keeps the node mounted). * * @example * import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle } from "@saasflare/ui"; * * * * Edit Profile * * */ import * as React from "react"; import * as DialogPrimitive from "@radix-ui/react-dialog"; import { type SaasflareComponentProps } from "../../providers"; /** * Dialog root. Controls open/close state for the modal. * * @component * @layer core */ declare function Dialog({ ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Element that toggles the dialog open. Use `asChild` to compose with a Button. * * @component * @layer core */ declare function DialogTrigger({ ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Portals dialog content into the document body, escaping overflow/stacking contexts. * * @component * @layer core */ declare function DialogPortal({ ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Element that closes the dialog when activated. Use `asChild` to compose. * * @component * @layer core */ declare function DialogClose({ ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Backdrop scrim rendered behind the dialog content. * * @component * @layer core */ declare function DialogOverlay({ className, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Props for {@link DialogContent}. * * Extends the Radix Dialog Content props with {@link SaasflareComponentProps}, * so `surface`, `radius`, `animated`, and `iconWeight` can be supplied * per-instance or inherited from . */ interface DialogContentProps extends Omit, keyof SaasflareComponentProps>, SaasflareComponentProps { /** * Render the built-in top-right close button (X). * @default true — preserves current behavior; set `false` to supply your own * DialogClose (e.g. command palettes, full-bleed media dialogs). * Esc-to-close and overlay-click-to-close remain active, so the * dialog stays escapable even when the button is hidden. */ showCloseButton?: boolean; } /** * Dialog content panel with spring entry animation. * * @component * @layer core */ declare function DialogContent({ className, children, showCloseButton, surface, radius, animated, iconWeight, ...props }: DialogContentProps): import("react/jsx-runtime").JSX.Element; /** * Header region for the dialog title and description. * * @component * @layer core */ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element; /** * Footer region for dialog actions (e.g. confirm/cancel buttons). * * @component * @layer core */ declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element; /** * Accessible title for the dialog, announced to screen readers. * * @component * @layer core */ declare function DialogTitle({ className, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; /** * Accessible supporting description for the dialog. * * @component * @layer core */ declare function DialogDescription({ className, ...props }: React.ComponentProps): import("react/jsx-runtime").JSX.Element; export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, type DialogContentProps, };