PromoCursed/node_modules/.cache/babel-loader/18fa9113efe91f218e83676fc3d76041ee3bc4feb1ed5d1ef64a130dd5fc4732.json

1 line
30 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 { genStyleHooks, mergeToken } from '../../theme/internal';\nconst skeletonClsLoading = new Keyframes(`ant-skeleton-loading`, {\n '0%': {\n backgroundPosition: '100% 50%'\n },\n '100%': {\n backgroundPosition: '0 50%'\n }\n});\nconst genSkeletonElementCommonSize = size => ({\n height: size,\n lineHeight: unit(size)\n});\nconst genSkeletonElementAvatarSize = size => Object.assign({\n width: size\n}, genSkeletonElementCommonSize(size));\nconst genSkeletonColor = token => ({\n background: token.skeletonLoadingBackground,\n backgroundSize: '400% 100%',\n animationName: skeletonClsLoading,\n animationDuration: token.skeletonLoadingMotionDuration,\n animationTimingFunction: 'ease',\n animationIterationCount: 'infinite'\n});\nconst genSkeletonElementInputSize = (size, calc) => Object.assign({\n width: calc(size).mul(5).equal(),\n minWidth: calc(size).mul(5).equal()\n}, genSkeletonElementCommonSize(size));\nconst genSkeletonElementAvatar = token => {\n const {\n skeletonAvatarCls,\n gradientFromColor,\n controlHeight,\n controlHeightLG,\n controlHeightSM\n } = token;\n return {\n [skeletonAvatarCls]: Object.assign({\n display: 'inline-block',\n verticalAlign: 'top',\n background: gradientFromColor\n }, genSkeletonElementAvatarSize(controlHeight)),\n [`${skeletonAvatarCls}${skeletonAvatarCls}-circle`]: {\n borderRadius: '50%'\n },\n [`${skeletonAvatarCls}${skeletonAvatarCls}-lg`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightLG)),\n [`${skeletonAvatarCls}${skeletonAvatarCls}-sm`]: Object.assign({}, genSkeletonElementAvatarSize(controlHeightSM))\n };\n};\nconst genSkeletonElementInput = token => {\n const {\n controlHeight,\n borderRadiusSM,\n skeletonInputCls,\n controlHeightLG,\n controlHeightSM,\n gradientFromColor,\n calc\n } = token;\n return {\n [skeletonInputCls]: Object.assign({\n display: 'inline-block',\n verticalAlign: 'top',\n background: gradientFromColor,\n borderRadius: borderRadiusSM\n }, genSkeletonElementInputSize(controlHeight, calc)),\n [`${skeletonInputCls}-lg`]: Object.assign({}, genSkeletonElementInputSize(controlHeightLG, calc)),\n [`${skeletonInputCls}-sm`]: Object.assign({}, genSkeletonElementInputSize(controlHeightSM, calc))\n };\n};\nconst genSkeletonElementImageSize = size => Object.assign({\n width: size\n}, genSkeletonElementCommonSize(size));\nconst genSkeletonElementImage = token => {\n const {\n skeletonImageCls,\n imageSizeBase,\n gradientFromColor,\n borderRadiusSM,\n calc\n } = token;\n return {\n [skeletonImageCls]: Object.assign(Object.assign({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'top',\n background: gradientFromColor,\n borderRadius: borderRadiusSM\n }, genSkeletonElementImageSize(calc(imageSizeBase).mul(2).equal())), {\n [`${skeletonImageCls}-path`]: {\n fill: '#bfbfbf'\n },\n [`${skeletonImageCls}-svg`]: Object.assign(Object.assign({}, genSkeletonElementImageSize(imageSizeBase)), {\n maxWidth: calc(imageSizeBase).mul(4).equal(),\n maxHeight: calc(imageSizeBase).mul(4).equal()\n }),\n [`${skeletonImageCls}-svg${skeletonImageCls}-svg-circle`]: {\n borderRadius: '50%'\n }\n }),\n [`${skeletonImageCls}${skeletonImageCls}-circle`]: {\n borderRadius: '50%'\n }\n };\n};\nconst genSkeletonElementButtonShape = (token, size, buttonCls) => {\n const {\n skeletonButtonCls\n } = token;\n return {\n [`${buttonCls}${skeletonButtonCls}-circle`]: {\n width: size,\n minWidth: size,\n borderRadius: '50%'\n },\n [`${buttonCls}${skeletonButtonCls}-round`]: {\n borderRadius: size\n }\n };\n};\nconst genSkeletonElementButtonSize = (size, calc) => Object.assign({\n width: calc(size).mul(2).equal(),\n minWidth: calc(size).mul(2).equal()\n}, genSkeletonElementCommonSize