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.6 KiB

8 months ago
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{32708:function(Pe,G,a){a.r(G),a.d(G,{default:function(){return Ie}});var ee=a(15009),I=a.n(ee),ne=a(99289),H=a.n(ne),re=a(5574),F=a.n(re),x=a(8232),d=a(67294),ae=a(62208),te=a(93967),Q=a.n(te),U=a(98787),oe=a(69760),le=a(45353),J=a(53124),K=a(54548),se=a(10274),ce=a(14747),ie=a(45503),M=a(91945);const de=e=>{const{paddingXXS:t,lineWidth:l,tagPaddingHorizontal:n,componentCls:r,calc:h}=e,f=h(n).sub(l).equal(),b=h(t).sub(l).equal();return{[r]:Object.assign(Object.assign({},(0,ce.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,K.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${r}-close-icon`]:{marginInlineStart:b,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-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(${r}-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}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},R=e=>{const{lineWidth:t,fontSizeIcon:l,calc:n}=e,r=e.fontSizeSM;return(0,ie.TS)(e,{tagFontSize:r,tagLineHeight:(0,K.bf)(n(e.lineHeightSM).mul(r).equal()),tagIconSize:n(l).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},V=e=>({defaultBg:new se.C(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var Y=(0,M.I$)("Tag",e=>{const t=R(e);return de(t)},V),ue=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 r=0,n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(l[n[r]]=e[n[r]]);return l},fe=d.forwardRef((e,t)=>{const{prefixCls:l,style:n,className:r,checked:h,onChange:f,onClick:b}=e,g=ue(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:$,tag:p}=d.useContext(J.E_),y=A=>{f==null||f(!h),b==null||b(A)},S=$("tag",l),[C,O,Z]=Y(S),v=Q()(S,`${S}-checkable`,{[`${S}-checkable-checked`]:h},p==null?void 0:p.className,r,O,Z);return C(d.createElement("span",Object.assign({},g,{ref:t,style:Object.assign(Object.assign({},n),p==null?void 0:p.style),className:v,onClick:y})))}),ge=a(98719);const ve=e=>(0,ge.Z)(e,(t,l)=>{let{textColor:n,lightBorderColor:r,lightColor:h,darkColor:f}=l;return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:h,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:f,borderColor:f},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}});var me=(0,M.bk)(["Tag","preset"],e=>{const t=R(e);return ve(t)},V);function he(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const N=(e,t,l)=>{const n=he(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 pe=(0,M.bk)(["Tag","status"],e=>{const t=R(e);return[N(t,"success","Success"),N(t,"processing","Info"),N(t,"error","Error"),N(t,"warning","Warning")]},V),Ce=function(e,t){var l={};for(var n in e)Object