import * as React from 'react'; import { magma, ThemeInterface } from '../../theme/magma'; import { TransitionProps } from '../Transition'; export declare enum ModalSize { large = "large", medium = "medium", small = "small" } export interface ModalProps extends React.HTMLAttributes { /** * @children required */ children: React.ReactNode; /** * Custom aria label ONLY for modals that do not have a header */ ariaLabel?: string; /** * The text read by screen readers for the close button * @default "Close dialog" */ closeAriaLabel?: string; /** * Style for the modal container */ closeButtonSize?: keyof typeof magma.iconSizes; /** * Style for the modal container */ containerStyle?: React.CSSProperties; /** * The content of the modal header */ header?: React.ReactNode; /** * Function that returns reference for the header */ headerRef?: (headerRef: React.Ref) => void; /** * If true, closing the modal handled on the consumer side * @default false */ isModalClosingControlledManually?: boolean; /** * If true, clicking the backdrop will not dismiss the modal * @default false */ isBackgroundClickDisabled?: boolean; /** * If true, the close button the modal will be suppressed * @default false */ isCloseButtonHidden?: boolean; /** * If true, pressing the Escape key will not dismiss the modal * @false */ isEscKeyDownDisabled?: boolean; /** * If true, the modal will be visible * @default false */ isOpen?: boolean; isInverse?: boolean; /** * If true, the modal will removed from the DOM when closed * @default true */ unmountOnExit?: boolean; /** * DOM element to portal the modal into. Defaults to `document.body`. * Useful when the modal must render inside a specific subtree, such as * when the parent element has been put into the browser's fullscreen mode * (only DOM within the fullscreen element is rendered by the browser). */ portalContainer?: HTMLElement | null; /** * @internal */ containerTransition?: Omit; /** * Action that fires when the close button is clicked */ onClose?: () => void; /** * Action that fires when the Escape key is pressed */ onEscKeyDown?: (event: KeyboardEvent) => void; /** * The relative size of the modal * @default ModalSize.medium */ size?: ModalSize; /** * @internal * @default true */ showBackgroundOverlay?: boolean; /** * @internal */ testId?: string; /** * @internal */ theme?: ThemeInterface; /** * Shows the drawer transition animation * @internal */ hasDrawerAnimation?: boolean; /** * Number to indicate which level heading will render (e.g. h1, h2 etc.) */ headerLevel?: 1 | 2 | 3 | 4 | 5 | 6; } export declare const Modal: React.ForwardRefExoticComponent>;