You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
8.8 KiB

6 months ago
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{32708:function(Ee,J,r){r.r(J),r.d(J,{default:function(){return Pe}});var re=r(15009),T=r.n(re),ae=r(99289),H=r.n(ae),te=r(5574),N=r.n(te),R=r(48357),oe=r(35312),x=r(8232),d=r(67294),le=r(62208),se=r(93967),K=r.n(se),Y=r(98787),ie=r(69760),ce=r(45353),k=r(53124),q=r(54548),de=r(10274),ue=r(14747),fe=r(45503),V=r(91945);const ve=e=>{const{paddingXXS:t,lineWidth:l,tagPaddingHorizontal:n,componentCls:a,calc:h}=e,f=h(n).sub(l).equal(),b=h(t).sub(l).equal();return{[a]:Object.assign(Object.assign({},(0,ue.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:f,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,q.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:b,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:f}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},W=e=>{const{lineWidth:t,fontSizeIcon:l,calc:n}=e,a=e.fontSizeSM;return(0,fe.TS)(e,{tagFontSize:a,tagLineHeight:(0,q.bf)(n(e.lineHeightSM).mul(a).equal()),tagIconSize:n(l).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},L=e=>({defaultBg:new de.C(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var _=(0,V.I$)("Tag",e=>{const t=W(e);return ve(t)},L),ge=function(e,t){var l={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(l[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(l[n[a]]=e[n[a]]);return l},me=d.forwardRef((e,t)=>{const{prefixCls:l,style:n,className:a,checked:h,onChange:f,onClick:b}=e,v=ge(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:$,tag:p}=d.useContext(k.E_),y=j=>{f==null||f(!h),b==null||b(j)},S=$("tag",l),[C,P,A]=_(S),g=K()(S,`${S}-checkable`,{[`${S}-checkable-checked`]:h},p==null?void 0:p.className,a,P,A);return C(d.createElement("span",Object.assign({},v,{ref:t,style:Object.assign(Object.assign({},n),p==null?void 0:p.style),className:g,onClick:y})))}),he=r(98719);const pe=e=>(0,he.Z)(e,(t,l)=>{let{textColor:n,lightBorderColor:a,lightColor:h,darkColor:f}=l;return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:h,borderColor:a,"&-inverse":{color:e.colorTextLightSolid,background:f,borderColor:f},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Ce=(0,V.bk)(["Tag","preset"],e=>{const t=W(e);return pe(t)},L);function be(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const B=(e,t,l)=>{const n=be(l);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${l}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var ye=(0,V.bk)(["Tag","status"],e=>{const t=W(e);return[B(t,"success","Success"),B(t,"processing","Info"),B(t,"error","Error"),B(t,"warning","Warning")]},L),Se=function(e,t){var l={