PromoCursed/node_modules/.cache/babel-loader/5e965d976c45ed391f2bef4816c620caad5d1ba288e4d961e14af3980883ecf1.json

1 line
24 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { Keyframes, unit } from '@ant-design/cssinjs';\nimport { CONTAINER_MAX_OFFSET } from '../../_util/hooks/useZIndex';\nimport { genFocusStyle, resetComponent } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport genNotificationPlacementStyle from './placement';\nimport genStackStyle from './stack';\nexport const genNoticeStyle = token => {\n const {\n iconCls,\n componentCls,\n // .ant-notification\n boxShadow,\n fontSizeLG,\n notificationMarginBottom,\n borderRadiusLG,\n colorSuccess,\n colorInfo,\n colorWarning,\n colorError,\n colorTextHeading,\n notificationBg,\n notificationPadding,\n notificationMarginEdge,\n notificationProgressBg,\n notificationProgressHeight,\n fontSize,\n lineHeight,\n width,\n notificationIconSize,\n colorText\n } = token;\n const noticeCls = `${componentCls}-notice`;\n return {\n position: 'relative',\n marginBottom: notificationMarginBottom,\n marginInlineStart: 'auto',\n background: notificationBg,\n borderRadius: borderRadiusLG,\n boxShadow,\n [noticeCls]: {\n padding: notificationPadding,\n width,\n maxWidth: `calc(100vw - ${unit(token.calc(notificationMarginEdge).mul(2).equal())})`,\n overflow: 'hidden',\n lineHeight,\n wordWrap: 'break-word'\n },\n [`${noticeCls}-message`]: {\n marginBottom: token.marginXS,\n color: colorTextHeading,\n fontSize: fontSizeLG,\n lineHeight: token.lineHeightLG\n },\n [`${noticeCls}-description`]: {\n fontSize,\n color: colorText\n },\n [`${noticeCls}-closable ${noticeCls}-message`]: {\n paddingInlineEnd: token.paddingLG\n },\n [`${noticeCls}-with-icon ${noticeCls}-message`]: {\n marginBottom: token.marginXS,\n marginInlineStart: token.calc(token.marginSM).add(notificationIconSize).equal(),\n fontSize: fontSizeLG\n },\n [`${noticeCls}-with-icon ${noticeCls}-description`]: {\n marginInlineStart: token.calc(token.marginSM).add(notificationIconSize).equal(),\n fontSize\n },\n // Icon & color style in different selector level\n // https://github.com/ant-design/ant-design/issues/16503\n // https://github.com/ant-design/ant-design/issues/15512\n [`${noticeCls}-icon`]: {\n position: 'absolute',\n fontSize: notificationIconSize,\n lineHeight: 1,\n // icon-font\n [`&-success${iconCls}`]: {\n color: colorSuccess\n },\n [`&-info${iconCls}`]: {\n color: colorInfo\n },\n [`&-warning${iconCls}`]: {\n color: colorWarning\n },\n [`&-error${iconCls}`]: {\n color: colorError\n }\n },\n [`${noticeCls}-close`]: Object.assign({\n position: 'absolute',\n top: token.notificationPaddingVertical,\n insetInlineEnd: token.notificationPaddingHorizontal,\n color: token.colorIcon,\n outline: 'none',\n width: token.notificationCloseButtonSize,\n height: token.notificationCloseButtonSize,\n borderRadius: token.borderRadiusSM,\n transition: `background-color ${token.motionDurationMid}, color ${token.motionDurationMid}`,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n '&:hover': {\n color: token.colorIconHover,\n backgroundColor: token.colorBgTextHover\n },\n '&:active': {\n backgroundColor: token.colorBgTextActive\n }\n }, genFocusStyle(token)),\n [`${noticeCls}-progress`]: {\n position: 'absolute',\n display: 'block',\n appearance: 'none',\n WebkitAppearance: 'none',\n inlineSize: `calc(100% - ${unit(borderRadiusLG)} * 2)`,\n left: {\n _skip_check_: true,\n value: borderRadiusLG\n },\n right: {\n _skip_check_: true,\n value: borderRadiusLG\n },\n bottom: 0,\n blockSize: notificationProgressHeight,\n border: 0,\n '&, &::-webkit-progress-bar': {\n borderRadius: borderRadiusLG,\n