1 line
5.2 KiB
JSON
1 line
5.2 KiB
JSON
|
{"ast":null,"code":"const getMoveTranslate = direction => {\n const value = '100%';\n return {\n left: `translateX(-${value})`,\n right: `translateX(${value})`,\n top: `translateY(-${value})`,\n bottom: `translateY(${value})`\n }[direction];\n};\nconst getEnterLeaveStyle = (startStyle, endStyle) => ({\n '&-enter, &-appear': Object.assign(Object.assign({}, startStyle), {\n '&-active': endStyle\n }),\n '&-leave': Object.assign(Object.assign({}, endStyle), {\n '&-active': startStyle\n })\n});\nconst getFadeStyle = (from, duration) => Object.assign({\n '&-enter, &-appear, &-leave': {\n '&-start': {\n transition: 'none'\n },\n '&-active': {\n transition: `all ${duration}`\n }\n }\n}, getEnterLeaveStyle({\n opacity: from\n}, {\n opacity: 1\n}));\nconst getPanelMotionStyles = (direction, duration) => [getFadeStyle(0.7, duration), getEnterLeaveStyle({\n transform: getMoveTranslate(direction)\n}, {\n transform: 'none'\n})];\nconst genMotionStyle = token => {\n const {\n componentCls,\n motionDurationSlow\n } = token;\n return {\n [componentCls]: {\n // ======================== Mask ========================\n [`${componentCls}-mask-motion`]: getFadeStyle(0, motionDurationSlow),\n // ======================= Panel ========================\n [`${componentCls}-panel-motion`]: ['left', 'right', 'top', 'bottom'].reduce((obj, direction) => Object.assign(Object.assign({}, obj), {\n [`&-${direction}`]: getPanelMotionStyles(direction, motionDurationSlow)\n }), {})\n }\n };\n};\nexport default genMotionStyle;","map":{"version":3,"names":["getMoveTranslate","direction","value","left","right","top","bottom","getEnterLeaveStyle","startStyle","endStyle","Object","assign","getFadeStyle","from","duration","transition","opacity","getPanelMotionStyles","transform","genMotionStyle","token","componentCls","motionDurationSlow","reduce","obj"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/drawer/style/motion.js"],"sourcesContent":["const getMoveTranslate = direction => {\n const value = '100%';\n return {\n left: `translateX(-${value})`,\n right: `translateX(${value})`,\n top: `translateY(-${value})`,\n bottom: `translateY(${value})`\n }[direction];\n};\nconst getEnterLeaveStyle = (startStyle, endStyle) => ({\n '&-enter, &-appear': Object.assign(Object.assign({}, startStyle), {\n '&-active': endStyle\n }),\n '&-leave': Object.assign(Object.assign({}, endStyle), {\n '&-active': startStyle\n })\n});\nconst getFadeStyle = (from, duration) => Object.assign({\n '&-enter, &-appear, &-leave': {\n '&-start': {\n transition: 'none'\n },\n '&-active': {\n transition: `all ${duration}`\n }\n }\n}, getEnterLeaveStyle({\n opacity: from\n}, {\n opacity: 1\n}));\nconst getPanelMotionStyles = (direction, duration) => [getFadeStyle(0.7, duration), getEnterLeaveStyle({\n transform: getMoveTranslate(direction)\n}, {\n transform: 'none'\n})];\nconst genMotionStyle = token => {\n const {\n componentCls,\n motionDurationSlow\n } = token;\n return {\n [componentCls]: {\n // ======================== Mask ========================\n [`${componentCls}-mask-motion`]: getFadeStyle(0, motionDurationSlow),\n // ======================= Panel ========================\n [`${componentCls}-panel-motion`]: ['left', 'right', 'top', 'bottom'].reduce((obj, direction) => Object.assign(Object.assign({}, obj), {\n [`&-${direction}`]: getPanelMotionStyles(direction, motionDurationSlow)\n }), {})\n }\n };\n};\nexport default genMotionStyle;"],"mappings":"AAAA,MAAMA,gBAAgB,GAAGC,SAAS,IAAI;EACpC,MAAMC,KAAK,GAAG,MAAM;EACpB,OAAO;IACLC,IAAI,EAAE,eAAeD,KAAK,GAAG;IAC7BE,KAAK,EAAE,cAAcF,KAAK,GAAG;IAC7BG,GAAG,EAAE,eAAeH,KAAK,GAAG;IAC5BI,MAAM,EAAE,cAAcJ,KAAK;EAC7B,CAAC,CAACD,SAAS,CAAC;AACd,CAAC;AACD,MAAMM,kBAAkB,GAAGA,CAACC,UAAU,EAAEC,QAAQ,MAAM;EACpD,mBAAmB,EAAEC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEH,UAAU,CAAC,EAAE;IAChE,UAAU,EAAEC;EACd,CAAC,CAAC;EACF,SAAS,EAAEC
|