PromoCursed/node_modules/.cache/babel-loader/c570bd7f5970fc35470fa76c837ac1f292766d6fbca418437e9ce28d0353b034.json

1 line
30 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { genFocusStyle, resetComponent } from '../../style';\nimport { initFadeMotion, initZoomMotion } from '../../style/motion';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nfunction box(position) {\n return {\n position,\n inset: 0\n };\n}\nexport const genModalMaskStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n return [{\n [`${componentCls}-root`]: {\n [`${componentCls}${antCls}-zoom-enter, ${componentCls}${antCls}-zoom-appear`]: {\n // reset scale avoid mousePosition bug\n transform: 'none',\n opacity: 0,\n animationDuration: token.motionDurationSlow,\n // https://github.com/ant-design/ant-design/issues/11777\n userSelect: 'none'\n },\n // https://github.com/ant-design/ant-design/issues/37329\n // https://github.com/ant-design/ant-design/issues/40272\n [`${componentCls}${antCls}-zoom-leave ${componentCls}-content`]: {\n pointerEvents: 'none'\n },\n [`${componentCls}-mask`]: Object.assign(Object.assign({}, box('fixed')), {\n zIndex: token.zIndexPopupBase,\n height: '100%',\n backgroundColor: token.colorBgMask,\n pointerEvents: 'none',\n [`${componentCls}-hidden`]: {\n display: 'none'\n }\n }),\n [`${componentCls}-wrap`]: Object.assign(Object.assign({}, box('fixed')), {\n zIndex: token.zIndexPopupBase,\n overflow: 'auto',\n outline: 0,\n WebkitOverflowScrolling: 'touch'\n })\n }\n }, {\n [`${componentCls}-root`]: initFadeMotion(token)\n }];\n};\nconst genModalStyle = token => {\n const {\n componentCls\n } = token;\n return [\n // ======================== Root =========================\n {\n [`${componentCls}-root`]: {\n [`${componentCls}-wrap-rtl`]: {\n direction: 'rtl'\n },\n [`${componentCls}-centered`]: {\n textAlign: 'center',\n '&::before': {\n display: 'inline-block',\n width: 0,\n height: '100%',\n verticalAlign: 'middle',\n content: '\"\"'\n },\n [componentCls]: {\n top: 0,\n display: 'inline-block',\n paddingBottom: 0,\n textAlign: 'start',\n verticalAlign: 'middle'\n }\n },\n [`@media (max-width: ${token.screenSMMax}px)`]: {\n [componentCls]: {\n maxWidth: 'calc(100vw - 16px)',\n margin: `${unit(token.marginXS)} auto`\n },\n [`${componentCls}-centered`]: {\n [componentCls]: {\n flex: 1\n }\n }\n }\n }\n },\n // ======================== Modal ========================\n {\n [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n pointerEvents: 'none',\n position: 'relative',\n top: 100,\n width: 'auto',\n maxWidth: `calc(100vw - ${unit(token.calc(token.margin).mul(2).equal())})`,\n margin: '0 auto',\n paddingBottom: token.paddingLG,\n [`${componentCls}-title`]: {\n margin: 0,\n color: token.titleColor,\n fontWeight: token.fontWeightStrong,\n fontSize: token.titleFontSize,\n lineHeight: token.titleLineHeight,\n wordWrap: 'break-word'\n },\n [`${componentCls}-content`]: {\n position: 'relative',\n backgroundColor: token.contentBg,\n backgroundClip: 'padding-box',\n border: 0,\n borderRadius: token.borderRadiusLG,\n boxShadow: token.boxShadow,\n pointerEvents: 'auto',\n padding: token.contentPadding\n },\n [`${componentCls}-close`]: Object.assign({\n position: 'absolute',\n top: token.calc(token.modalHeaderHeight).sub(token.modalCloseBtnSize).div(2).equal(),\n insetInlineEnd: token.calc(token.modalHeaderHeight).sub(token.modalCloseBtnSize).div(2).equal(),\n zIndex: token.calc(token.zIndexPopupBase).add(10).equal(),\n padding: 0,\n col