UNPKG

ll-package

Version:

2 lines (1 loc) 3.81 kB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../@babel/runtime/helpers/esm/extends.js"),n=require("../../_util/cssinjs/Keyframes.js");require("../../theme/internal.js");const e=require("../../style/index.js"),a=require("../../theme/util/genComponentStyleHook.js"),s=require("../../theme/util/statistic.js"),l=new n.default("antSpinMove",{to:{opacity:1}}),r=new n.default("antRotate",{to:{transform:"rotate(405deg)"}}),p=i=>({[`${i.componentCls}`]:t.default(t.default({},e.resetComponent(i)),{position:"absolute",display:"none",color:i.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${i.motionDurationSlow} ${i.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${i.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:i.contentHeight,[`${i.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-i.spinDotSize/2},[`${i.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(i.spinDotSize-i.fontSize)/2+2,textShadow:`0 1px 2px ${i.colorBgContainer}`},[`&${i.componentCls}-show-text ${i.componentCls}-dot`]:{marginTop:-(i.spinDotSize/2)-10},"&-sm":{[`${i.componentCls}-dot`]:{margin:-i.spinDotSizeSM/2},[`${i.componentCls}-text`]:{paddingTop:(i.spinDotSizeSM-i.fontSize)/2+2},[`&${i.componentCls}-show-text ${i.componentCls}-dot`]:{marginTop:-(i.spinDotSizeSM/2)-10}},"&-lg":{[`${i.componentCls}-dot`]:{margin:-(i.spinDotSizeLG/2)},[`${i.componentCls}-text`]:{paddingTop:(i.spinDotSizeLG-i.fontSize)/2+2},[`&${i.componentCls}-show-text ${i.componentCls}-dot`]:{marginTop:-(i.spinDotSizeLG/2)-10}}},[`${i.componentCls}-container`]:{position:"relative",transition:`opacity ${i.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:i.colorBgContainer,opacity:0,transition:`all ${i.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${i.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:i.spinDotDefault},[`${i.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:i.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(i.spinDotSize-i.marginXXS/2)/2,height:(i.spinDotSize-i.marginXXS/2)/2,backgroundColor:i.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:l,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:r,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${i.componentCls}-dot`]:{fontSize:i.spinDotSizeSM,i:{width:(i.spinDotSizeSM-i.marginXXS/2)/2,height:(i.spinDotSizeSM-i.marginXXS/2)/2}},[`&-lg ${i.componentCls}-dot`]:{fontSize:i.spinDotSizeLG,i:{width:(i.spinDotSizeLG-i.marginXXS)/2,height:(i.spinDotSizeLG-i.marginXXS)/2}},[`&${i.componentCls}-show-text ${i.componentCls}-text`]:{display:"block"}})}),c=a.default("Spin",i=>{const o=s.merge(i,{spinDotDefault:i.colorTextDescription,spinDotSize:i.controlHeightLG/2,spinDotSizeSM:i.controlHeightLG*.35,spinDotSizeLG:i.controlHeight});return[p(o)]},{contentHeight:400});exports.default=c;