1 line
9.5 KiB
JSON
1 line
9.5 KiB
JSON
{"ast":null,"code":"import { NotificationPlacements } from '../interface';\nconst placementAlignProperty = {\n topLeft: 'left',\n topRight: 'right',\n bottomLeft: 'left',\n bottomRight: 'right',\n top: 'left',\n bottom: 'left'\n};\nconst genPlacementStackStyle = (token, placement) => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-${placement}`]: {\n [`&${componentCls}-stack > ${componentCls}-notice-wrapper`]: {\n [placement.startsWith('top') ? 'top' : 'bottom']: 0,\n [placementAlignProperty[placement]]: {\n value: 0,\n _skip_check_: true\n }\n }\n }\n };\n};\nconst genStackChildrenStyle = token => {\n const childrenStyle = {};\n for (let i = 1; i < token.notificationStackLayer; i++) {\n childrenStyle[`&:nth-last-child(${i + 1})`] = {\n overflow: 'hidden',\n [`& > ${token.componentCls}-notice`]: {\n opacity: 0,\n transition: `opacity ${token.motionDurationMid}`\n }\n };\n }\n return Object.assign({\n [`&:not(:nth-last-child(-n+${token.notificationStackLayer}))`]: {\n opacity: 0,\n overflow: 'hidden',\n color: 'transparent',\n pointerEvents: 'none'\n }\n }, childrenStyle);\n};\nconst genStackedNoticeStyle = token => {\n const childrenStyle = {};\n for (let i = 1; i < token.notificationStackLayer; i++) {\n childrenStyle[`&:nth-last-child(${i + 1})`] = {\n background: token.colorBgBlur,\n backdropFilter: 'blur(10px)',\n '-webkit-backdrop-filter': 'blur(10px)'\n };\n }\n return Object.assign({}, childrenStyle);\n};\nconst genStackStyle = token => {\n const {\n componentCls\n } = token;\n return Object.assign({\n [`${componentCls}-stack`]: {\n [`& > ${componentCls}-notice-wrapper`]: Object.assign({\n transition: `all ${token.motionDurationSlow}, backdrop-filter 0s`,\n position: 'absolute'\n }, genStackChildrenStyle(token))\n },\n [`${componentCls}-stack:not(${componentCls}-stack-expanded)`]: {\n [`& > ${componentCls}-notice-wrapper`]: Object.assign({}, genStackedNoticeStyle(token))\n },\n [`${componentCls}-stack${componentCls}-stack-expanded`]: {\n [`& > ${componentCls}-notice-wrapper`]: {\n '&:not(:nth-last-child(-n + 1))': {\n opacity: 1,\n overflow: 'unset',\n color: 'inherit',\n pointerEvents: 'auto',\n [`& > ${token.componentCls}-notice`]: {\n opacity: 1\n }\n },\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n height: token.margin,\n width: '100%',\n insetInline: 0,\n bottom: token.calc(token.margin).mul(-1).equal(),\n background: 'transparent',\n pointerEvents: 'auto'\n }\n }\n }\n }, NotificationPlacements.map(placement => genPlacementStackStyle(token, placement)).reduce((acc, cur) => Object.assign(Object.assign({}, acc), cur), {}));\n};\nexport default genStackStyle;","map":{"version":3,"names":["NotificationPlacements","placementAlignProperty","topLeft","topRight","bottomLeft","bottomRight","top","bottom","genPlacementStackStyle","token","placement","componentCls","startsWith","value","_skip_check_","genStackChildrenStyle","childrenStyle","i","notificationStackLayer","overflow","opacity","transition","motionDurationMid","Object","assign","color","pointerEvents","genStackedNoticeStyle","background","colorBgBlur","backdropFilter","genStackStyle","motionDurationSlow","position","content","height","margin","width","insetInline","calc","mul","equal","map","reduce","acc","cur"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/notification/style/stack.js"],"sourcesContent":["import { NotificationPlacements } from '../interface';\nconst placementAlignProperty = {\n topLeft: 'left',\n topRight: 'right',\n bottomLeft: 'left',\n bottomRight: 'right',\n top: 'left',\n bottom: 'left'\n};\nconst genPlacementStackStyle = (token, placement) => {\n const {\n componentCls\n } = token;\n return {\n [`${componentCls}-${placement}`]: {\n [`&${componentCls}-stack > ${componentCls}-notice-wrapper`]: {\n [placement.startsWith('top') ? 'top' : 'bottom']: 0,\n [placementAlignProperty[placement]]: {\n value: 0,\n _skip_check_: true\n }\n }\n }\n };\n};\nconst genStackChildrenStyle = token => {\n const childrenStyle = {};\n for (let i = 1; i < token.notificationStackLayer; i++) {\n childrenStyle[`&:nth-last-child(${i + 1})`] = {\n overflow: 'hidden',\n [`& > ${token.componentCls}-notice`]: {\n opacity: 0,\n transition: `opacity ${token.motionDurationMid}`\n }\n };\n }\n return Object.assign({\n [`&:not(:nth-last-child(-n+${token.notificationStackLayer}))`]: {\n opacity: 0,\n overflow: 'hidden',\n color: 'transparent',\n pointerEvents: 'none'\n }\n }, childrenStyle);\n};\nconst genStackedNoticeStyle = token => {\n const childrenStyle = {};\n for (let i = 1; i < token.notificationStackLayer; i++) {\n childrenStyle[`&:nth-last-child(${i + 1})`] = {\n background: token.colorBgBlur,\n backdropFilter: 'blur(10px)',\n '-webkit-backdrop-filter': 'blur(10px)'\n };\n }\n return Object.assign({}, childrenStyle);\n};\nconst genStackStyle = token => {\n const {\n componentCls\n } = token;\n return Object.assign({\n [`${componentCls}-stack`]: {\n [`& > ${componentCls}-notice-wrapper`]: Object.assign({\n transition: `all ${token.motionDurationSlow}, backdrop-filter 0s`,\n position: 'absolute'\n }, genStackChildrenStyle(token))\n },\n [`${componentCls}-stack:not(${componentCls}-stack-expanded)`]: {\n [`& > ${componentCls}-notice-wrapper`]: Object.assign({}, genStackedNoticeStyle(token))\n },\n [`${componentCls}-stack${componentCls}-stack-expanded`]: {\n [`& > ${componentCls}-notice-wrapper`]: {\n '&:not(:nth-last-child(-n + 1))': {\n opacity: 1,\n overflow: 'unset',\n color: 'inherit',\n pointerEvents: 'auto',\n [`& > ${token.componentCls}-notice`]: {\n opacity: 1\n }\n },\n '&:after': {\n content: '\"\"',\n position: 'absolute',\n height: token.margin,\n width: '100%',\n insetInline: 0,\n bottom: token.calc(token.margin).mul(-1).equal(),\n background: 'transparent',\n pointerEvents: 'auto'\n }\n }\n }\n }, NotificationPlacements.map(placement => genPlacementStackStyle(token, placement)).reduce((acc, cur) => Object.assign(Object.assign({}, acc), cur), {}));\n};\nexport default genStackStyle;"],"mappings":"AAAA,SAASA,sBAAsB,QAAQ,cAAc;AACrD,MAAMC,sBAAsB,GAAG;EAC7BC,OAAO,EAAE,MAAM;EACfC,QAAQ,EAAE,OAAO;EACjBC,UAAU,EAAE,MAAM;EAClBC,WAAW,EA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