PromoCursed/node_modules/.cache/babel-loader/2eabd74d10cdeefab7762f7df6499090b1c44968cbd22b5e4ae34b0591e0b06e.json

1 line
22 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { blue } from '@ant-design/colors';\nimport { unit } from '@ant-design/cssinjs';\nimport { clearFix, textEllipsis } from '../../style';\nconst genPictureStyle = token => {\n const {\n componentCls,\n iconCls,\n uploadThumbnailSize,\n uploadProgressOffset,\n calc\n } = token;\n const listCls = `${componentCls}-list`;\n const itemCls = `${listCls}-item`;\n return {\n [`${componentCls}-wrapper`]: {\n // ${listCls} 增加优先级\n [`\n ${listCls}${listCls}-picture,\n ${listCls}${listCls}-picture-card,\n ${listCls}${listCls}-picture-circle\n `]: {\n [itemCls]: {\n position: 'relative',\n height: calc(uploadThumbnailSize).add(calc(token.lineWidth).mul(2)).add(calc(token.paddingXS).mul(2)).equal(),\n padding: token.paddingXS,\n border: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,\n borderRadius: token.borderRadiusLG,\n '&:hover': {\n background: 'transparent'\n },\n [`${itemCls}-thumbnail`]: Object.assign(Object.assign({}, textEllipsis), {\n width: uploadThumbnailSize,\n height: uploadThumbnailSize,\n lineHeight: unit(calc(uploadThumbnailSize).add(token.paddingSM).equal()),\n textAlign: 'center',\n flex: 'none',\n [iconCls]: {\n fontSize: token.fontSizeHeading2,\n color: token.colorPrimary\n },\n img: {\n display: 'block',\n width: '100%',\n height: '100%',\n overflow: 'hidden'\n }\n }),\n [`${itemCls}-progress`]: {\n bottom: uploadProgressOffset,\n width: `calc(100% - ${unit(calc(token.paddingSM).mul(2).equal())})`,\n marginTop: 0,\n paddingInlineStart: calc(uploadThumbnailSize).add(token.paddingXS).equal()\n }\n },\n [`${itemCls}-error`]: {\n borderColor: token.colorError,\n // Adjust the color of the error icon : https://github.com/ant-design/ant-design/pull/24160\n [`${itemCls}-thumbnail ${iconCls}`]: {\n [`svg path[fill='${blue[0]}']`]: {\n fill: token.colorErrorBg\n },\n [`svg path[fill='${blue.primary}']`]: {\n fill: token.colorError\n }\n }\n },\n [`${itemCls}-uploading`]: {\n borderStyle: 'dashed',\n [`${itemCls}-name`]: {\n marginBottom: uploadProgressOffset\n }\n }\n },\n [`${listCls}${listCls}-picture-circle ${itemCls}`]: {\n [`&, &::before, ${itemCls}-thumbnail`]: {\n borderRadius: '50%'\n }\n }\n }\n };\n};\nconst genPictureCardStyle = token => {\n const {\n componentCls,\n iconCls,\n fontSizeLG,\n colorTextLightSolid,\n calc\n } = token;\n const listCls = `${componentCls}-list`;\n const itemCls = `${listCls}-item`;\n const uploadPictureCardSize = token.uploadPicCardSize;\n return {\n [`\n ${componentCls}-wrapper${componentCls}-picture-card-wrapper,\n ${componentCls}-wrapper${componentCls}-picture-circle-wrapper\n `]: Object.assign(Object.assign({}, clearFix()), {\n display: 'block',\n [`${componentCls}${componentCls}-select`]: {\n width: uploadPictureCardSize,\n height: uploadPictureCardSize,\n textAlign: 'center',\n verticalAlign: 'top',\n backgroundColor: token.colorFillAlter,\n border: `${unit(token.lineWidth)} dashed ${token.colorBorder}`,\n borderRadius: token.borderRadiusLG,\n cursor: 'pointer',\n transition: `border-color ${token.motionDurationSlow}`,\n [`> ${componentCls}`]: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n textAlign: 'center'\n },\n [`&:not(${componentCls}-disabled):hover`]: {\n borderColor: token.colorPrim