1 line
18 KiB
JSON
1 line
18 KiB
JSON
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { genFocusStyle } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport genMotionStyle from './motion';\n// =============================== Base ===============================\nconst genDrawerStyle = token => {\n const {\n borderRadiusSM,\n componentCls,\n zIndexPopup,\n colorBgMask,\n colorBgElevated,\n motionDurationSlow,\n motionDurationMid,\n paddingXS,\n padding,\n paddingLG,\n fontSizeLG,\n lineHeightLG,\n lineWidth,\n lineType,\n colorSplit,\n marginXS,\n colorIcon,\n colorIconHover,\n colorBgTextHover,\n colorBgTextActive,\n colorText,\n fontWeightStrong,\n footerPaddingBlock,\n footerPaddingInline,\n calc\n } = token;\n const wrapperCls = `${componentCls}-content-wrapper`;\n return {\n [componentCls]: {\n position: 'fixed',\n inset: 0,\n zIndex: zIndexPopup,\n pointerEvents: 'none',\n color: colorText,\n '&-pure': {\n position: 'relative',\n background: colorBgElevated,\n display: 'flex',\n flexDirection: 'column',\n [`&${componentCls}-left`]: {\n boxShadow: token.boxShadowDrawerLeft\n },\n [`&${componentCls}-right`]: {\n boxShadow: token.boxShadowDrawerRight\n },\n [`&${componentCls}-top`]: {\n boxShadow: token.boxShadowDrawerUp\n },\n [`&${componentCls}-bottom`]: {\n boxShadow: token.boxShadowDrawerDown\n }\n },\n '&-inline': {\n position: 'absolute'\n },\n // ====================== Mask ======================\n [`${componentCls}-mask`]: {\n position: 'absolute',\n inset: 0,\n zIndex: zIndexPopup,\n background: colorBgMask,\n pointerEvents: 'auto'\n },\n // ==================== Content =====================\n [wrapperCls]: {\n position: 'absolute',\n zIndex: zIndexPopup,\n maxWidth: '100vw',\n transition: `all ${motionDurationSlow}`,\n '&-hidden': {\n display: 'none'\n }\n },\n // Placement\n [`&-left > ${wrapperCls}`]: {\n top: 0,\n bottom: 0,\n left: {\n _skip_check_: true,\n value: 0\n },\n boxShadow: token.boxShadowDrawerLeft\n },\n [`&-right > ${wrapperCls}`]: {\n top: 0,\n right: {\n _skip_check_: true,\n value: 0\n },\n bottom: 0,\n boxShadow: token.boxShadowDrawerRight\n },\n [`&-top > ${wrapperCls}`]: {\n top: 0,\n insetInline: 0,\n boxShadow: token.boxShadowDrawerUp\n },\n [`&-bottom > ${wrapperCls}`]: {\n bottom: 0,\n insetInline: 0,\n boxShadow: token.boxShadowDrawerDown\n },\n [`${componentCls}-content`]: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n overflow: 'auto',\n background: colorBgElevated,\n pointerEvents: 'auto'\n },\n // Header\n [`${componentCls}-header`]: {\n display: 'flex',\n flex: 0,\n alignItems: 'center',\n padding: `${unit(padding)} ${unit(paddingLG)}`,\n fontSize: fontSizeLG,\n lineHeight: lineHeightLG,\n borderBottom: `${unit(lineWidth)} ${lineType} ${colorSplit}`,\n '&-title': {\n display: 'flex',\n flex: 1,\n alignItems: 'center',\n minWidth: 0,\n minHeight: 0\n }\n },\n [`${componentCls}-extra`]: {\n flex: 'none'\n },\n [`${componentCls}-close`]: Object.assign({\n display: 'inline-flex',\n width: calc(fontSizeLG).add(paddingXS).equal(),\n height: calc(fontSizeLG).add(paddingXS).equal(),\n borderRadius: borderRadiusSM,\n justifyContent: 'center',\n alignItems: 'center',\n marginInlineEnd: marginXS,\n color: colorIcon,\n fontWeight: fontWeightStrong,\n fontSize: fontSizeLG,\n fontStyle: 'normal',\n lineHeight: 1,\n textAlign: 'center',\n textTransform: 'none',\n textDecoration: 'none',\n background: 'transparent',\n border: 0,\n cursor: 'pointer',\n transition: `all ${motionDurationMid}`,\n textRendering: 'auto',\n '&:hover': {\n color: colorIconHover,\n backgroundColor: colorBgTextHover,\n textDecoration: 'none'\n },\n '&:active': {\n backgroundColor: colorBgTextActive\n }\n }, genFocusStyle(token)),\n [`${componentCls}-title`]: {\n flex: 1,\n margin: 0,\n fontWeight: token.fontWeightStrong,\n fontSize: fontSizeLG,\n lineHeight: lineHeightLG\n },\n // Body\n [`${componentCls}-body`]: {\n flex: 1,\n minWidth: 0,\n minHeight: 0,\n padding: paddingLG,\n overflow: 'auto',\n [`${componentCls}-body-skeleton`]: {\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center'\n }\n },\n // Footer\n [`${componentCls}-footer`]: {\n flexShrink: 0,\n padding: `${unit(footerPaddingBlock)} ${unit(footerPaddingInline)}`,\n borderTop: `${unit(lineWidth)} ${lineType} ${colorSplit}`\n },\n // ====================== RTL =======================\n '&-rtl': {\n direction: 'rtl'\n }\n }\n };\n};\nexport const prepareComponentToken = token => ({\n zIndexPopup: token.zIndexPopupBase,\n footerPaddingBlock: token.paddingXS,\n footerPaddingInline: token.padding\n});\n// ============================== Export ==============================\nexport default genStyleHooks('Drawer', token => {\n const drawerToken = mergeToken(token, {});\n return [genDrawerStyle(drawerToken), genMotionStyle(drawerToken)];\n}, prepareComponentToken);","map":{"version":3,"names":["unit","genFocusStyle","genStyleHooks","mergeToken","genMotionStyle","genDrawerStyle","token","borderRadiusSM","componentCls","zIndexPopup","colorBgMask","colorBgElevated","motionDurationSlow","motionDurationMid","paddingXS","padding","paddingLG","fontSizeLG","lineHeightLG","lineWidth","lineType","colorSplit","marginXS","colorIcon","colorIconHover","colorBgTextHover","colorBgTextActive","colorText","fontWeightStrong","footerPaddingBlock","footerPaddingInline","calc","wrapperCls","position","inset","zIndex","pointerEvents","color","background","display","flexDirection","boxShadow","boxShadowDrawerLeft","boxShadowDrawerRight","boxShadowDrawerUp","boxShadowDrawerDown","maxWidth","transition","top","bottom","left","_skip_check_","value","right","insetInline","width","height","overflow","flex","alignItems","fontSize","lineHeight","borderBottom","minWidth","minHeight","Object","assign","add","equal","borderRadius","justifyContent","marginInlineEnd","fontWeight","fontStyle","textAlign","textTransform","textDecoration","border","cursor","textRendering","backgroundColor","margin","flexShrink","borderTop","direction","prepareComponentToken","zIndexPopupBase","drawerToken"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/drawer/style/index.js"],"sourcesContent":["import { unit } from '@ant-design/cssinjs';\nimport { genFocusStyle } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport genMotionStyle from './motion';\n// =============================== Base ===============================\nconst genDrawerStyle = token => {\n const {\n borderRadiusSM,\n componentCls,\n zIndexPopup,\n colorBgMask,\n colorBgElevated,\n motionDurationSlow,\n motionDurationMid,\n paddingXS,\n padding,\n paddingLG,\n fontSizeLG,\n lineHeightLG,\n lineWidth,\n lineType,\n colorSplit,\n marginXS,\n colorIcon,\n colorIconHover,\n colorBgTextHover,\n colorBgTextActive,\n colorText,\n fontWeightStrong,\n footerPaddingBlock,\n footerPaddingInline,\n calc\n } = token;\n const wrapperCls = `${componentCls}-content-wrapper`;\n return {\n [componentCls]: {\n position: 'fixed',\n inset: 0,\n zIndex: zIndexPopup,\n pointerEvents: 'none',\n color: colorText,\n '&-pure': {\n position: 'relative',\n background: colorBgElevated,\n display: 'flex',\n flexDirection: 'column',\n [`&${componentCls}-left`]: {\n boxShadow: token.boxShadowDrawerLeft\n },\n [`&${componentCls}-right`]: {\n boxShadow: token.boxShadowDrawerRight\n },\n [`&${componentCls}-top`]: {\n boxShadow: token.boxShadowDrawerUp\n },\n [`&${componentCls}-bottom`]: {\n boxShadow: token.boxShadowDrawerDown\n }\n },\n '&-inline': {\n position: 'absolute'\n },\n // ====================== Mask ======================\n [`${componentCls}-mask`]: {\n position: 'absolute',\n inset: 0,\n zIndex: zIndexPopup,\n background: colorBgMask,\n pointerEvents: 'auto'\n },\n // ==================== Content =====================\n [wrapperCls]: {\n position: 'absolute',\n zIndex: zIndexPopup,\n maxWidth: '100vw',\n transition: `all ${motionDurationSlow}`,\n '&-hidden': {\n display: 'none'\n }\n },\n // Placement\n [`&-left > ${wrapperCls}`]: {\n top: 0,\n bottom: 0,\n left: {\n _skip_check_: true,\n value: 0\n },\n boxShadow: token.boxShadowDrawerLeft\n },\n [`&-right > ${wrapperCls}`]: {\n top: 0,\n right: {\n _skip_check_: true,\n value: 0\n },\n bottom: 0,\n boxShadow: token.boxShadowDrawerRight\n },\n [`&-top > ${wrapperCls}`]: {\n top: 0,\n insetInline: 0,\n boxShadow: token.boxShadowDrawerUp\n },\n [`&-bottom > ${wrapperCls}`]: {\n bottom: 0,\n insetInline: 0,\n boxShadow: token.boxShadowDrawerDown\n },\n [`${componentCls}-content`]: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n overflow: 'auto',\n background: colorBgElevated,\n pointerEvents: 'auto'\n },\n // Header\n [`${componentCls}-header`]: {\n display: 'flex',\n flex: 0,\n alignItems: 'center',\n padding: `${unit(padding)} ${unit(paddingLG)}`,\n fontSize: fontSizeLG,\n lineHeight: lineHeightLG,\n borderBottom: `${unit(lineWidth)} ${lineType} ${colorSplit}`,\n '&-title': {\n display: 'flex',\n flex: 1,\n alignItems: 'center',\n minWidth: 0,\n minHeight: 0\n }\n },\n [`${componentCls}-extra`]: {\n flex: 'none'\n },\n [`${componentCls}-close`]: Object.assign({\n display: 'inline-flex',\n width: calc(fontSizeLG).add(paddingXS).equal(),\n height: calc(fontSizeLG).add(paddingXS).equal(),\n borderRadius: borderRadiusSM,\n justifyContent: 'center',\n alignItems: 'center',\n marginInlineEnd: marginXS,\n color: colorIcon,\n fontWeight: fontWeightStrong,\n fontSize: fontSizeLG,\n fontStyle: 'normal',\n lineHeight: 1,\n textAlign: 'center',\n textTransform: 'none',\n textDecoration: 'none',\n background: 'transparent',\n border: 0,\n cursor: 'pointer',\n transition: `all ${motionDurationMid}`,\n textRendering: 'auto',\n '&:hover': {\n color: colorIconHover,\n backgroundColor: colorBgTextHover,\n textDecoration: 'none'\n },\n '&:active': {\n backgroundColor: colorBgTextActive\n }\n }, genFocusStyle(token)),\n [`${componentCls}-title`]: {\n flex: 1,\n margin: 0,\n fontWeight: token.fontWeightStrong,\n fontSize: fontSizeLG,\n lineHeight: lineHeightLG\n },\n // Body\n [`${componentCls}-body`]: {\n flex: 1,\n minWidth: 0,\n minHeight: 0,\n padding: paddingLG,\n overflow: 'auto',\n [`${componentCls}-body-skeleton`]: {\n width: '100%',\n height: '100%',\n display: 'flex',\n justifyContent: 'center'\n }\n },\n // Footer\n [`${componentCls}-footer`]: {\n flexShrink: 0,\n padding: `${unit(footerPaddingBlock)} ${unit(footerPaddingInline)}`,\n borderTop: `${unit(lineWidth)} ${lineType} ${colorSplit}`\n },\n // ====================== RTL =======================\n '&-rtl': {\n direction: 'rtl'\n }\n }\n };\n};\nexport const prepareComponentToken = token => ({\n zIndexPopup: token.zIndexPopupBase,\n footerPaddingBlock: token.paddingXS,\n footerPaddingInline: token.padding\n});\n// ============================== Export ==============================\nexport default genStyleHooks('Drawer', token => {\n const drawerToken = mergeToken(token, {});\n return [genDrawerStyle(drawerToken), genMotionStyle(drawerToken)];\n}, prepareComponentToken);"],"mappings":"AAAA,SAASA,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,aAAa,QAAQ,aAAa;AAC3C,SAASC,aAAa,EAAEC,UAAU,QAAQ,sBAAsB;AAChE,OAAOC,cAAc,MAAM,UAAU;AACrC;AACA,MAAMC,cAAc,GAAGC,KAAK,IAAI;EAC9B,MAAM;IACJC,cAAc;IACdC,YAAY;IACZC,WAAW;IACXC,WAAW;IACXC,eAAe;IACfC,kBAAkB;IAClBC,iBAAiB;IACjBC,SAAS;IACTC,OAAO;IACPC,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,SAAS;IACTC,QAAQ;IACRC,UAAU;IACVC,QAAQ;IACRC,SAAS;IACTC,cAAc;IACdC,gBAAgB;IAChBC,iBAAiB;IACjBC,SAAS;IACTC,gBAAgB;IAChBC,kBAAkB;IAClBC,mBAAmB;IACnBC;EACF,CAAC,GAAGzB,KAAK;EACT,MAAM0B,UAAU,GAAG,GAAGxB,YAAY,kBAAkB;EACpD,OAAO;IACL,CAACA,YAAY,GAAG;MACdyB,QAAQ,EAAE,OAAO;MACjBC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE1B,WAAW;MACnB2B,aAA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