{"version":3,"sources":["../src/modal-overlay.tsx"],"sourcesContent":["import { cx } from \"@chakra-ui/shared-utils\"\nimport {\n chakra,\n ChakraProps,\n SystemStyleObject,\n forwardRef,\n} from \"@chakra-ui/system\"\nimport { fadeConfig } from \"@chakra-ui/transition\"\nimport { motion, HTMLMotionProps } from \"framer-motion\"\n\nimport { useModalStyles, useModalContext } from \"./modal\"\n\nconst MotionDiv = chakra(motion.div)\n\nexport interface ModalOverlayProps\n extends Omit, \"color\" | \"transition\">,\n ChakraProps {\n children?: React.ReactNode\n motionProps?: HTMLMotionProps<\"div\">\n}\n\n/**\n * ModalOverlay renders a backdrop behind the modal. It is\n * also used as a wrapper for the modal content for better positioning.\n *\n * @see Docs https://chakra-ui.com/modal\n */\nexport const ModalOverlay = forwardRef(\n (props, ref) => {\n const { className, transition, motionProps: _motionProps, ...rest } = props\n const _className = cx(\"chakra-modal__overlay\", className)\n\n const styles = useModalStyles()\n const overlayStyle: SystemStyleObject = {\n pos: \"fixed\",\n left: \"0\",\n top: \"0\",\n w: \"100vw\",\n h: \"100vh\",\n ...styles.overlay,\n }\n\n const { motionPreset } = useModalContext()\n const defaultMotionProps: HTMLMotionProps<\"div\"> =\n motionPreset === \"none\" ? {} : fadeConfig\n\n const motionProps: any = _motionProps || defaultMotionProps\n\n return (\n \n )\n },\n)\n\nModalOverlay.displayName = \"ModalOverlay\"\n"],"mappings":";;;;;;;AAAA,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,EAGA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,cAA+B;AAyClC;AArCN,IAAM,YAAY,OAAO,OAAO,GAAG;AAe5B,IAAM,eAAe;AAAA,EAC1B,CAAC,OAAO,QAAQ;AACd,UAAM,EAAE,WAAW,YAAY,aAAa,cAAc,GAAG,KAAK,IAAI;AACtE,UAAM,aAAa,GAAG,yBAAyB,SAAS;AAExD,UAAM,SAAS,eAAe;AAC9B,UAAM,eAAkC;AAAA,MACtC,KAAK;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAG,OAAO;AAAA,IACZ;AAEA,UAAM,EAAE,aAAa,IAAI,gBAAgB;AACzC,UAAM,qBACJ,iBAAiB,SAAS,CAAC,IAAI;AAEjC,UAAM,cAAmB,gBAAgB;AAEzC,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,OAAO;AAAA,QACP;AAAA,QACA,WAAW;AAAA,QACV,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;","names":[]}