import { MouseEvent, KeyboardEvent, ReactNode } from 'react'; export interface ModalProps { /** Renders modal content. */ children?: ReactNode; /** Applied as data-hook HTML attribute that can be used to create driver in testing. */ dataHook?: string; /** Controls if modal is open or closed. */ isOpen: boolean; /** Border radius of modal. * @default 0 */ borderRadius?: number; /** Sets the `aria-label` of the modal element. It helps assistive technology, like screen readers, to label an element that would otherwise be anonymous. */ contentLabel?: string; /** Controls z-index of the modal overlay. */ zIndex?: number; /** Enables to close modal when mouse clicked on overlay area. * @default false */ shouldCloseOnOverlayClick?: boolean; /** Displays a close button on the top right corner of the overlay. * @default false */ shouldDisplayCloseButton?: boolean; /** Callback that is executed when the modal is requested to be closed, prior to actually closing. */ onRequestClose?: (event?: MouseEvent | KeyboardEvent) => void; /** Callback that is executed after the modal has been opened. */ onAfterOpen?: () => void; /** Callback that is executed after the modal has been closed. */ onAfterClose?: () => void; /** Horizontal position of the modal. * @default 'center' */ horizontalPosition?: ModalHorizontalPosition; /** Vertical position of the modal. * @default 'center' */ verticalPosition?: ModalVerticalPosition; /** Number indicating the milliseconds to wait before closing the modal. * @default 500 */ closeTimeoutMS?: number; /** Specifies if modal portal supports scroll. * @default true */ scrollable?: boolean; /** Specifies if modal content should become scrollable when the modal is sized to fit the window. * @default false */ scrollableContent?: boolean; /** Sets the maximum height for a scrollable content. * @default 'auto' */ maxHeight?: string; /** Sets the height for modal's content container. * @default '100%' */ height?: string; /** Controls the CSS `position` of the modal overlay. * @default 'fixed' */ overlayPosition?: ModalOverlayPosition; /** A function that returns a DOM element on which the modal should be appended to. */ parentSelector?: () => HTMLElement; /** Selector specifying where to apply the aria-hidden attribute. */ appElement?: string; onOk?: () => void; /** Specifies minimum spacing between full viewport and modal content. * @default 'desktop' */ screen?: ModalScreen; /** Enable navigation previous buttons to the side of the content and listen on clicks by using onNavigationClickPrevious. */ showNavigationPreviousButton?: boolean; /** Enable navigation next button to the side of the content and listen on clicks by using onNavigationClickNext. */ showNavigationNextButton?: boolean; /** Callback that is executed when the navigation control previous is clicked. */ onNavigationClickPrevious?: () => void; /** Callback that is executed when the navigation control next is clicked. */ onNavigationClickNext?: () => void; /** Label used for navigation control previous button tooltip. */ navigationPreviousLabel?: string; /** Label used for navigation control next button tooltip. */ navigationNextLabel?: string; /** * Transition animation type. Note that moveHorizontal/moveVertical transitions work best with FullScreenModalLayout. * @default scale */ transition?: ModalTransition; } export type ModalHorizontalPosition = 'start' | 'center' | 'end'; export type ModalTransition = 'scale' | 'moveHorizontal' | 'moveVertical'; export type ModalVerticalPosition = 'start' | 'center' | 'end'; export type ModalOverlayPosition = 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky'; export type ModalScreen = 'full' | 'desktop' | 'mobile'; //# sourceMappingURL=Modal.types.d.ts.map