1 line
27 KiB
JSON
1 line
27 KiB
JSON
|
{"ast":null,"code":"import { Keyframes } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nconst antSpinMove = new Keyframes('antSpinMove', {\n to: {\n opacity: 1\n }\n});\nconst antRotate = new Keyframes('antRotate', {\n to: {\n transform: 'rotate(405deg)'\n }\n});\nconst genSpinStyle = token => {\n const {\n componentCls,\n calc\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n position: 'absolute',\n display: 'none',\n color: token.colorPrimary,\n fontSize: 0,\n textAlign: 'center',\n verticalAlign: 'middle',\n opacity: 0,\n transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOutCirc}`,\n '&-spinning': {\n position: 'relative',\n display: 'inline-block',\n opacity: 1\n },\n [`${componentCls}-text`]: {\n fontSize: token.fontSize,\n paddingTop: calc(calc(token.dotSize).sub(token.fontSize)).div(2).add(2).equal()\n },\n '&-fullscreen': {\n position: 'fixed',\n width: '100vw',\n height: '100vh',\n backgroundColor: token.colorBgMask,\n zIndex: token.zIndexPopupBase,\n inset: 0,\n display: 'flex',\n alignItems: 'center',\n flexDirection: 'column',\n justifyContent: 'center',\n opacity: 0,\n visibility: 'hidden',\n transition: `all ${token.motionDurationMid}`,\n '&-show': {\n opacity: 1,\n visibility: 'visible'\n },\n [componentCls]: {\n [`${componentCls}-dot-holder`]: {\n color: token.colorWhite\n },\n [`${componentCls}-text`]: {\n color: token.colorTextLightSolid\n }\n }\n },\n '&-nested-loading': {\n position: 'relative',\n [`> div > ${componentCls}`]: {\n position: 'absolute',\n top: 0,\n insetInlineStart: 0,\n zIndex: 4,\n display: 'block',\n width: '100%',\n height: '100%',\n maxHeight: token.contentHeight,\n [`${componentCls}-dot`]: {\n position: 'absolute',\n top: '50%',\n insetInlineStart: '50%',\n margin: calc(token.dotSize).mul(-1).div(2).equal()\n },\n [`${componentCls}-text`]: {\n position: 'absolute',\n top: '50%',\n width: '100%',\n textShadow: `0 1px 2px ${token.colorBgContainer}` // FIXME: shadow\n },\n [`&${componentCls}-show-text ${componentCls}-dot`]: {\n marginTop: calc(token.dotSize).div(2).mul(-1).sub(10).equal()\n },\n '&-sm': {\n [`${componentCls}-dot`]: {\n margin: calc(token.dotSizeSM).mul(-1).div(2).equal()\n },\n [`${componentCls}-text`]: {\n paddingTop: calc(calc(token.dotSizeSM).sub(token.fontSize)).div(2).add(2).equal()\n },\n [`&${componentCls}-show-text ${componentCls}-dot`]: {\n marginTop: calc(token.dotSizeSM).div(2).mul(-1).sub(10).equal()\n }\n },\n '&-lg': {\n [`${componentCls}-dot`]: {\n margin: calc(token.dotSizeLG).mul(-1).div(2).equal()\n },\n [`${componentCls}-text`]: {\n paddingTop: calc(calc(token.dotSizeLG).sub(token.fontSize)).div(2).add(2).equal()\n },\n [`&${componentCls}-show-text ${componentCls}-dot`]: {\n marginTop: calc(token.dotSizeLG).div(2).mul(-1).sub(10).equal()\n }\n }\n },\n [`${componentCls}-container`]: {\n position: 'relative',\n transition: `opacity ${token.motionDurationSlow}`,\n '&::after': {\n position: 'absolute',\n top: 0,\n insetInlineEnd: 0,\n bottom: 0,\n insetInlineStart: 0,\n zIndex: 10,\n
|