11 lines
15 KiB
JavaScript
11 lines
15 KiB
JavaScript
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[193],{23885:function($e,U,c){c.d(U,{Z:function(){return i}});var l=c(50959),J=c(82187),H=c.n(J),G=c(8146),B=c(76144),Y=c(15676),q=c(39910),R=c(70939),D=function(e,o){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&o.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)o.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r},F=e=>{var{prefixCls:o,className:r,hoverable:a=!0}=e,n=D(e,["prefixCls","className","hoverable"]);const{getPrefixCls:b}=l.useContext(B.E_),f=b("card",o),v=H()(`${f}-grid`,r,{[`${f}-grid-hoverable`]:a});return l.createElement("div",Object.assign({},n,{className:v}))},s=c(601),$=c(54531),k=c(79349),M=c(56352);const w=e=>{const{antCls:o,componentCls:r,headerHeight:a,cardPaddingBase:n,tabsMarginBottom:b}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:`0 ${(0,s.bf)(n)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,s.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,s.bf)(e.borderRadiusLG)} ${(0,s.bf)(e.borderRadiusLG)} 0 0`},(0,$.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},$.vS),{[`
|
|
> ${r}-typography,
|
|
> ${r}-typography-edit-content
|
|
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${o}-tabs-top`]:{clear:"both",marginBottom:b,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,s.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},A=e=>{const{cardPaddingBase:o,colorBorderSecondary:r,cardShadow:a,lineWidth:n}=e;return{width:"33.33%",padding:o,border:0,borderRadius:0,boxShadow:`
|
|
${(0,s.bf)(n)} 0 0 0 ${r},
|
|
0 ${(0,s.bf)(n)} 0 0 ${r},
|
|
${(0,s.bf)(n)} ${(0,s.bf)(n)} 0 0 ${r},
|
|
${(0,s.bf)(n)} 0 0 0 ${r} inset,
|
|
0 ${(0,s.bf)(n)} 0 0 ${r} inset;
|
|
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:a}}},_=e=>{const{componentCls:o,iconCls:r,actionsLiMargin:a,cardActionsIconSize:n,colorBorderSecondary:b,actionsBg:f}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:f,borderTop:`${(0,s.bf)(e.lineWidth)} ${e.lineType} ${b}`,display:"flex",borderRadius:`0 0 ${(0,s.bf)(e.borderRadiusLG)} ${(0,s.bf)(e.borderRadiusLG)}`},(0,$.dF)()),{"& > li":{margin:a,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${o}-btn), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:(0,s.bf)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:n,lineHeight:(0,s.bf)(e.calc(n).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,s.bf)(e.lineWidth)} ${e.lineType} ${b}`}}})},ue=e=>Object.assign(Object.assign({margin:`${(0,s.bf)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,$.dF)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},$.vS),"&-description":{color:e.colorTextDescription}}),ee=e=>{const{componentCls:o,cardPaddingBase:r,colorFillAlter:a}=e;return{[`${o}-head`]:{padding:`0 ${(0,s.bf)(r)}`,background:a,"&-title":{fontSize:e.fontSize}},[`${o}-body`]:{padding:`${(0,s.bf)(e.padding)} ${(0,s.bf)(r)}`}}},te=e=>{const{componentCls:o}=e;return{overflow:"hidden",[`${o}-body`]:{userSelect:"none"}}},re=e=>{const{antCls:o,componentCls:r,cardShadow:a,cardHeadPadding:n,colorBorderSecondary:b,boxShadowTertiary:f,cardPaddingBase:v,extraColor:m}=e;return{[r]:Object.assign(Object.assign({},(0,$.Wf)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${r}-bordered)`]:{boxShadow:f},[`${r}-head`]:w(e),[`${r}-extra`]:{marginInlineStart:"auto",color:m,fontWeight:"normal",fontSize:e.fontSize},[`${r}-body`]:Object.assign({padding:v,borderRadius:` 0 0 ${(0,s.bf)(e.borderRadiusLG)} ${(0,s.bf)(e.borderRadiusLG)}`},(0,$.dF)()),[`${r}-grid`]:A(e),[`${r}-cover`]:{"> *":{display:"block",width:"100%"},[`img, img + ${o}-image-mask`]:{borderRadius:`${(0,s.bf)(e.borderRadiusLG)} ${(0,s.bf)(e.borderRadiusLG)} 0 0`}},[`${r}-actions`]:_(e),[`${r}-meta`]:ue(e)}),[`${r}-bordered`]:{border:`${(0,s.bf)(e.lineWidth)} ${e.lineType} ${b}`,[`${r}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${r}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:a}},[`${r}-contain-grid`]:{borderRadius:`${(0,s.bf)(e.borderRadiusLG)} ${(0,s.bf)(e.borderRadiusLG)} 0 0 `,[`${r}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${r}-loading) ${r}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${r}-contain-tabs`]:{[`> ${r}-head`]:{minHeight:0,[`${r}-head-title, ${r}-extra`]:{paddingTop:n}}},[`${r}-type-inner`]:ee(e),[`${r}-loading`]:te(e),[`${r}-rtl`]:{direction:"rtl"}}},ae=e=>{const{componentCls:o,cardPaddingSM:r,headerHeightSM:a,headerFontSizeSM:n}=e;return{[`${o}-small`]:{[`> ${o}-head`]:{minHeight:a,padding:`0 ${(0,s.bf)(r)}`,fontSize:n,[`> ${o}-head-wrapper`]:{[`> ${o}-extra`]:{fontSize:e.fontSize}}},[`> ${o}-body`]:{padding:r}},[`${o}-small${o}-contain-tabs`]:{[`> ${o}-head`]:{[`${o}-head-title, ${o}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},oe=e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText});var N=(0,k.I$)("Card",e=>{const o=(0,M.TS)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[re(o),ae(o)]},oe),Z=function(e,o){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&o.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)o.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r};const ne=e=>{const{prefixCls:o,actions:r=[]}=e;return l.createElement("ul",{className:`${o}-actions`},r.map((a,n)=>{const b=`action-${n}`;return l.createElement("li",{style:{width:`${100/r.length}%`},key:b},l.createElement("span",null,a))}))};var K=l.forwardRef((e,o)=>{const{prefixCls:r,className:a,rootClassName:n,style:b,extra:f,headStyle:v={},bodyStyle:m={},title:p,loading:S,bordered:x=!0,size:h,type:O,cover:L,actions:I,tabList:P,children:T,activeTabKey:V,defaultActiveTabKey:y,tabBarExtraContent:ie,hoverable:se,tabProps:ce={}}=e,de=Z(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),{getPrefixCls:X,direction:ge,card:z}=l.useContext(B.E_),Q=E=>{var C;(C=e.onTabChange)===null||C===void 0||C.call(e,E)},be=l.useMemo(()=>{let E=!1;return l.Children.forEach(T,C=>{C&&C.type&&C.type===F&&(E=!0)}),E},[T]),u=X("card",r),[j,ve,Ce]=N(u),Se=l.createElement(q.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},T),pe=V!==void 0,xe=Object.assign(Object.assign({},ce),{[pe?"activeKey":"defaultActiveKey"]:pe?V:y,tabBarExtraContent:ie});let he;const W=(0,Y.Z)(h),Oe=!W||W==="default"?"large":W,ye=P?l.createElement(R.Z,Object.assign({size:Oe},xe,{className:`${u}-head-tabs`,onChange:Q,items:P.map(E=>{var{tab:C}=E,Ne=Z(E,["tab"]);return Object.assign({label:C},Ne)})})):null;(p||f||ye)&&(he=l.createElement("div",{className:`${u}-head`,style:v},l.createElement("div",{className:`${u}-head-wrapper`},p&&l.createElement("div",{className:`${u}-head-title`},p),f&&l.createElement("div",{className:`${u}-extra`},f)),ye));const Te=L?l.createElement("div",{className:`${u}-cover`},L):null,ze=l.createElement("div",{className:`${u}-body`,style:m},S?Se:T),je=I&&I.length?l.createElement(ne,{prefixCls:u,actions:I}):null,Pe=(0,G.Z)(de,["onTabChange"]),Ee=H()(u,z==null?void 0:z.className,{[`${u}-loading`]:S,[`${u}-bordered`]:x,[`${u}-hoverable`]:se,[`${u}-contain-grid`]:be,[`${u}-contain-tabs`]:P&&P.length,[`${u}-${W}`]:W,[`${u}-type-${O}`]:!!O,[`${u}-rtl`]:ge==="rtl"},a,n,ve,Ce),Be=Object.assign(Object.assign({},z==null?void 0:z.style),b);return j(l.createElement("div",Object.assign({ref:o},Pe,{className:Ee,style:Be}),he,Te,ze,je))}),le=function(e,o){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&o.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)o.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]]);return r},d=e=>{const{prefixCls:o,className:r,avatar:a,title:n,description:b}=e,f=le(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:v}=l.useContext(B.E_),m=v("card",o),p=H()(`${m}-meta`,r),S=a?l.createElement("div",{className:`${m}-meta-avatar`},a):null,x=n?l.createElement("div",{className:`${m}-meta-title`},n):null,h=b?l.createElement("div",{className:`${m}-meta-description`},b):null,O=x||h?l.createElement("div",{className:`${m}-meta-detail`},x,h):null;return l.createElement("div",Object.assign({},f,{className:p}),S,O)};const g=K;g.Grid=F,g.Meta=d;var i=g},12400:function($e,U,c){c.d(U,{Z:function(){return le}});var l=c(50959),J=c(20819),H=c(82187),G=c.n(H),B=c(67806),Y=c(80599),q=c(72585),R=c(76144),D=c(601),fe=c(99978),F=c(54531),s=c(56352),$=c(79349);const k=t=>{const{paddingXXS:d,lineWidth:g,tagPaddingHorizontal:i,componentCls:e,calc:o}=t,r=o(i).sub(g).equal(),a=o(d).sub(g).equal();return{[e]:Object.assign(Object.assign({},(0,F.Wf)(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:r,fontSize:t.tagFontSize,lineHeight:t.tagLineHeight,whiteSpace:"nowrap",background:t.defaultBg,border:`${(0,D.bf)(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",position:"relative",[`&${e}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.defaultColor},[`${e}-close-icon`]:{marginInlineStart:a,fontSize:t.tagIconSize,color:t.colorTextDescription,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${e}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${e}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:r}}),[`${e}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}},M=t=>{const{lineWidth:d,fontSizeIcon:g,calc:i}=t,e=t.fontSizeSM;return(0,s.TS)(t,{tagFontSize:e,tagLineHeight:(0,D.bf)(i(t.lineHeightSM).mul(e).equal()),tagIconSize:i(g).sub(i(d).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:t.colorFillTertiary})},w=t=>({defaultBg:new fe.C(t.colorFillQuaternary).onBackground(t.colorBgContainer).toHexString(),defaultColor:t.colorText});var A=(0,$.I$)("Tag",t=>{const d=M(t);return k(d)},w),_=function(t,d){var g={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&d.indexOf(i)<0&&(g[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,i=Object.getOwnPropertySymbols(t);e<i.length;e++)d.indexOf(i[e])<0&&Object.prototype.propertyIsEnumerable.call(t,i[e])&&(g[i[e]]=t[i[e]]);return g},ee=l.forwardRef((t,d)=>{const{prefixCls:g,style:i,className:e,checked:o,onChange:r,onClick:a}=t,n=_(t,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:b,tag:f}=l.useContext(R.E_),v=O=>{r==null||r(!o),a==null||a(O)},m=b("tag",g),[p,S,x]=A(m),h=G()(m,`${m}-checkable`,{[`${m}-checkable-checked`]:o},f==null?void 0:f.className,e,S,x);return p(l.createElement("span",Object.assign({},n,{ref:d,style:Object.assign(Object.assign({},i),f==null?void 0:f.style),className:h,onClick:v})))}),te=c(33653);const re=t=>(0,te.Z)(t,(d,g)=>{let{textColor:i,lightBorderColor:e,lightColor:o,darkColor:r}=g;return{[`${t.componentCls}${t.componentCls}-${d}`]:{color:i,background:o,borderColor:e,"&-inverse":{color:t.colorTextLightSolid,background:r,borderColor:r},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}});var ae=(0,$.bk)(["Tag","preset"],t=>{const d=M(t);return re(d)},w);function oe(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)}const N=(t,d,g)=>{const i=oe(g);return{[`${t.componentCls}${t.componentCls}-${d}`]:{color:t[`color${g}`],background:t[`color${i}Bg`],borderColor:t[`color${i}Border`],[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}};var Z=(0,$.bk)(["Tag","status"],t=>{const d=M(t);return[N(d,"success","Success"),N(d,"processing","Info"),N(d,"error","Error"),N(d,"warning","Warning")]},w),ne=function(t,d){var g={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&d.indexOf(i)<0&&(g[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,i=Object.getOwnPropertySymbols(t);e<i.length;e++)d.indexOf(i[e])<0&&Object.prototype.propertyIsEnumerable.call(t,i[e])&&(g[i[e]]=t[i[e]]);return g};const me=(t,d)=>{const{prefixCls:g,className:i,rootClassName:e,style:o,children:r,icon:a,color:n,onClose:b,closeIcon:f,closable:v,bordered:m=!0}=t,p=ne(t,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:S,direction:x,tag:h}=l.useContext(R.E_),[O,L]=l.useState(!0);l.useEffect(()=>{"visible"in p&&L(p.visible)},[p.visible]);const I=(0,B.o2)(n),P=(0,B.yT)(n),T=I||P,V=Object.assign(Object.assign({backgroundColor:n&&!T?n:void 0},h==null?void 0:h.style),o),y=S("tag",g),[ie,se,ce]=A(y),de=G()(y,h==null?void 0:h.className,{[`${y}-${n}`]:T,[`${y}-has-color`]:n&&!T,[`${y}-hidden`]:!O,[`${y}-rtl`]:x==="rtl",[`${y}-borderless`]:!m},i,e,se,ce),X=j=>{j.stopPropagation(),b==null||b(j),!j.defaultPrevented&&L(!1)},[,ge]=(0,Y.Z)(v,f,j=>j===null?l.createElement(J.Z,{className:`${y}-close-icon`,onClick:X}):l.createElement("span",{className:`${y}-close-icon`,onClick:X},j),null,!1),z=typeof p.onClick=="function"||r&&r.type==="a",Q=a||null,be=Q?l.createElement(l.Fragment,null,Q,r&&l.createElement("span",null,r)):r,u=l.createElement("span",Object.assign({},p,{ref:d,className:de,style:V}),be,ge,I&&l.createElement(ae,{key:"preset",prefixCls:y}),P&&l.createElement(Z,{key:"status",prefixCls:y}));return ie(z?l.createElement(q.Z,{component:"Tag"},u):u)},K=l.forwardRef(me);K.CheckableTag=ee;var le=K}}]);
|