/** * @usevyre/react — Modal / Dialog * * AI CONTEXT: * ┌─────────────────────────────────────────────────────────┐ * │ Components: Modal + ModalHeader + ModalBody + ModalFooter│ * │ Import: import { Modal, ModalHeader, ModalBody, │ * │ ModalFooter } from "@usevyre/react" │ * │ │ * │ Modal props: │ * │ open = boolean (controlled) │ * │ onClose = () => void │ * │ size = "sm"|"md"(default)|"lg"|"full" │ * │ closeOnBackdrop = boolean (default: true) │ * │ closeOnEsc = boolean (default: true) │ * │ initialFocus = RefObject │ * └─────────────────────────────────────────────────────────┘ * * @example * // Confirmation dialog * setIsOpen(false)} size="sm"> * *

Confirm deletion

*
* *

This action cannot be undone.

*
* * * * *
*/ import React from "react"; import type { BaseProps } from "../../types"; export type ModalSize = "sm" | "md" | "lg" | "full"; export interface ModalProps extends BaseProps { open: boolean; onClose: () => void; size?: ModalSize; /** Close modal when clicking the backdrop. Default: true */ closeOnBackdrop?: boolean; /** Close modal when pressing Escape. Default: true */ closeOnEsc?: boolean; /** Element to focus on open. Defaults to the modal container. */ initialFocus?: React.RefObject; children?: React.ReactNode; /** Accessible label for the dialog (if no visible title) */ "aria-label"?: string; /** ID of the element that labels the dialog */ "aria-labelledby"?: string; } export declare const Modal: React.ForwardRefExoticComponent>; export interface ModalSectionProps extends BaseProps { children?: React.ReactNode; } export declare const ModalHeader: React.ForwardRefExoticComponent>; export declare const ModalBody: React.ForwardRefExoticComponent>; export declare const ModalFooter: React.ForwardRefExoticComponent>;