import { HTMLAttributes, ReactNode } from 'react'; import { AnimationState } from './modal-utils'; import { ModalWidth } from './modal.types'; /** Props accepted by {@link ModalTransition}. */ export interface ModalTransitionProps extends HTMLAttributes { /** Content to render inside the animated wrapper. */ children: ReactNode; /** Whether the modal is in the open (entered) state. */ in: boolean; /** Called once when the enter transition starts. */ onEnter?: () => void; /** Called once when the exit transition has fully completed. */ onExited?: () => void; /** Called each time the animation phase changes. */ onStateChange?: (state: AnimationState) => void; /** Width variant forwarded as a BEM modifier class on the wrapper element. */ width: ModalWidth; } /** * Internal wrapper that drives the CSS enter/exit animation for the modal. * * Applies `data-entering` / `data-entered` / `data-exiting` / `data-exited` * attributes and matching BEM modifier classes so that SCSS can target each * animation phase independently. * * The exit transition is also guarded by a fallback `setTimeout` so that * `onExited` fires reliably even when the CSS `transitionend` event is * suppressed — for example under `prefers-reduced-motion` or in jsdom tests. * * @internal */ declare const ModalTransition: import('react').ForwardRefExoticComponent>; export default ModalTransition;