PromoCursed/node_modules/.cache/babel-loader/93927a7bfede66ccee1918d25a53aee1e290bc4ce5379babc931bc46c53ed2ad.json

1 line
16 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { genStyleHooks } from '../../theme/internal';\nconst genAlertTypeStyle = (bgColor, borderColor, iconColor, token, alertCls) => ({\n background: bgColor,\n border: `${unit(token.lineWidth)} ${token.lineType} ${borderColor}`,\n [`${alertCls}-icon`]: {\n color: iconColor\n }\n});\nexport const genBaseStyle = token => {\n const {\n componentCls,\n motionDurationSlow: duration,\n marginXS,\n marginSM,\n fontSize,\n fontSizeLG,\n lineHeight,\n borderRadiusLG: borderRadius,\n motionEaseInOutCirc,\n withDescriptionIconSize,\n colorText,\n colorTextHeading,\n withDescriptionPadding,\n defaultPadding\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n padding: defaultPadding,\n wordWrap: 'break-word',\n borderRadius,\n [`&${componentCls}-rtl`]: {\n direction: 'rtl'\n },\n [`${componentCls}-content`]: {\n flex: 1,\n minWidth: 0\n },\n [`${componentCls}-icon`]: {\n marginInlineEnd: marginXS,\n lineHeight: 0\n },\n '&-description': {\n display: 'none',\n fontSize,\n lineHeight\n },\n '&-message': {\n color: colorTextHeading\n },\n [`&${componentCls}-motion-leave`]: {\n overflow: 'hidden',\n opacity: 1,\n transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},\n padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},\n margin-bottom ${duration} ${motionEaseInOutCirc}`\n },\n [`&${componentCls}-motion-leave-active`]: {\n maxHeight: 0,\n marginBottom: '0 !important',\n paddingTop: 0,\n paddingBottom: 0,\n opacity: 0\n }\n }),\n [`${componentCls}-with-description`]: {\n alignItems: 'flex-start',\n padding: withDescriptionPadding,\n [`${componentCls}-icon`]: {\n marginInlineEnd: marginSM,\n fontSize: withDescriptionIconSize,\n lineHeight: 0\n },\n [`${componentCls}-message`]: {\n display: 'block',\n marginBottom: marginXS,\n color: colorTextHeading,\n fontSize: fontSizeLG\n },\n [`${componentCls}-description`]: {\n display: 'block',\n color: colorText\n }\n },\n [`${componentCls}-banner`]: {\n marginBottom: 0,\n border: '0 !important',\n borderRadius: 0\n }\n };\n};\nexport const genTypeStyle = token => {\n const {\n componentCls,\n colorSuccess,\n colorSuccessBorder,\n colorSuccessBg,\n colorWarning,\n colorWarningBorder,\n colorWarningBg,\n colorError,\n colorErrorBorder,\n colorErrorBg,\n colorInfo,\n colorInfoBorder,\n colorInfoBg\n } = token;\n return {\n [componentCls]: {\n '&-success': genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token, componentCls),\n '&-info': genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token, componentCls),\n '&-warning': genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token, componentCls),\n '&-error': Object.assign(Object.assign({}, genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token, componentCls)), {\n [`${componentCls}-description > pre`]: {\n margin: 0,\n padding: 0\n }\n })\n }\n };\n};\nexport const genActionStyle = token => {\n const {\n componentCls,\n iconCls,\n motionDurationMid,\n marginXS,\n fontSizeIcon,\n colorIcon,\n colorIconHover\n } = token;\n return {\n [componentCls]: {\n '&-action': {\n marginInlineStart: marginXS\n },\n [`${componentCls}-close-icon`]: {\n marginInlineStart: marginXS,\n padding: 0,\n overfl