import { PropsWithChildren, Dispatch, SetStateAction } from 'react'; import { CSSValueWithLength } from '../../styles'; import { BorderRadiusSize } from '../../foundation'; export type ModalBaseCancelReason = 'cancelClick' | 'escapeKeyPress' | 'overlayClick'; export type ModalCloseEventCallback = Omit; export declare const SAFE_TOP_BOTTOM_AREA = 120; export declare const SAFE_LEFT_RIGHT_AREA = 32; export interface ModalOverlayBaseProps { /** @default false */ fill?: boolean; /** * Modal 너비를 지정할 수 있습니다. * @default 480 */ width?: CSSValueWithLength; className?: string; opened?: boolean; /** @default getZIndex('modal') */ zIndex?: number; /** * outside 영역 클릭시 닫힘 사용 여부 * @default true */ canClickOutside?: boolean; /** * escapeKey 키이벤트 닫힘 사용 여부 * @default true */ canCloseEscapeKey?: boolean; /** * reference 요소로 포커스 반환 여부 * @default true */ returnFocus?: boolean; /** * Modal destroy시 전달합니다. */ onExited?: () => void; onClose?: () => void; } export interface ModalOverlayProps extends ModalOverlayBaseProps { /** * FloatingPortal node id, render 함수로 Floating 노드를 생성하는 경우가 아닌 경우에는 디폴트 아이디값으로 처리합니다. * @default FLOATING_ROOT_ID */ floatingPortalId?: string; /** @default false */ fullScreen?: boolean; /** @default 'large' */ borderRadiusSize?: BorderRadiusSize; setOpened?: Dispatch>; onCancelEventCallback?: (event: ModalCloseEventCallback, floatingContainerId?: string) => void; /** * @desc esc, overlay 클릭으로 인한 모달 닫힘 상태 외부 제어 여부 * @default false */ controlledOpen?: boolean; /** * autofocus 지정 콘텐츠 요소 여부, true일 경우 FloatingFocusManager initialFocus는 자체 포커스 관리 충돌 방지를 위해 -1, false일 경우 기본값 0으로 처리됩니다. * @default false */ autoFocus?: boolean; } export declare const ModalOverlay: ({ floatingPortalId, width, borderRadiusSize, fill, fullScreen, className, children, opened: openProp, zIndex, canClickOutside, canCloseEscapeKey, controlledOpen, autoFocus, returnFocus, onExited, onClose, onCancelEventCallback, setOpened, }: PropsWithChildren) => import("@emotion/react/jsx-runtime").JSX.Element;