Files
xin-procurement/public/assets/space-JYtHxLjg.js
T
2026-10-30 10:51:09 +08:00

1 line
6.9 KiB
JavaScript

import{o as e}from"./request-xrnk7ZJV.js";import{Bn as t,Ct as n,E as r,Hn as i,Kt as a,Ln as o,Ot as s,Pr as c,Wn as l,Y as u,Z as d,Zn as f,en as p,qt as m,rr as h,tt as g,wn as _,wt as v}from"./jsx-runtime-OfKoVykY.js";import{p as y}from"./tooltip-DI_m69zk.js";var b=e(c()),x=(0,b.createContext)(void 0),S=e=>{let{componentCls:t}=e;return{[t]:{display:`flex`,flexFlow:`row wrap`,minWidth:0,"&::before, &::after":{display:`flex`},"&-no-wrap":{flexWrap:`nowrap`},"&-start":{justifyContent:`flex-start`},"&-center":{justifyContent:`center`},"&-end":{justifyContent:`flex-end`},"&-space-between":{justifyContent:`space-between`},"&-space-around":{justifyContent:`space-around`},"&-space-evenly":{justifyContent:`space-evenly`},"&-top":{alignItems:`flex-start`},"&-middle":{alignItems:`center`},"&-bottom":{alignItems:`flex-end`}}}},C=e=>{let{componentCls:t}=e;return{[t]:{position:`relative`,maxWidth:`100%`,minHeight:1}}},w=(e,t)=>{let{componentCls:n,gridColumns:r,antCls:i}=e,[o,s]=a(i,`grid`),[,c]=a(i,`col`),l={};for(let e=r;e>=0;e--)e===0?(l[`${n}${t}-${e}`]={display:`none`},l[`${n}-push-${e}`]={insetInlineStart:`auto`},l[`${n}-pull-${e}`]={insetInlineEnd:`auto`},l[`${n}${t}-push-${e}`]={insetInlineStart:`auto`},l[`${n}${t}-pull-${e}`]={insetInlineEnd:`auto`},l[`${n}${t}-offset-${e}`]={marginInlineStart:0},l[`${n}${t}-order-${e}`]={order:0}):(l[`${n}${t}-${e}`]=[{[o(`display`)]:`block`,display:`block`},{display:s(`display`),flex:`0 0 ${e/r*100}%`,maxWidth:`${e/r*100}%`}],l[`${n}${t}-push-${e}`]={insetInlineStart:`${e/r*100}%`},l[`${n}${t}-pull-${e}`]={insetInlineEnd:`${e/r*100}%`},l[`${n}${t}-offset-${e}`]={marginInlineStart:`${e/r*100}%`},l[`${n}${t}-order-${e}`]={order:e});return l[`${n}${t}-flex`]={flex:c(`${t.replace(/-/,``)}-flex`)},l},T=(e,t)=>w(e,t),E=(e,t,n)=>({[`@media (min-width: ${o(t)})`]:{...T(e,n)}}),D=()=>({}),O=()=>({}),k=m(`Grid`,S,D),A=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin,xxxl:e.screenXXXLMin}),j=m(`Grid`,e=>{let t=_(e,{gridColumns:24}),n=A(t);return delete n.xs,[C(t),T(t,``),T(t,`-xs`),Object.keys(n).map(e=>E(t,n[e],`-${e}`)).reduce((e,t)=>({...e,...t}),{})]},O),M=e=>{let{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:i,paddingXS:o,fontSizeLG:s,fontSizeSM:c,borderRadiusLG:l,borderRadiusSM:u,colorBgContainerDisabled:d,lineWidth:f,lineType:m,antCls:h}=e,[g,_]=a(h,`space-addon`);return{[t]:[{...p(e),display:`inline-flex`,alignItems:`center`,gap:0,whiteSpace:`nowrap`,paddingInline:r,margin:0,borderWidth:f,borderStyle:m,borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:s,borderRadius:l},"&-small":{paddingInline:o,borderRadius:u,fontSize:c},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[g(`addon-border-color`)]:i,[g(`addon-background`)]:d,[g(`addon-border-color-outlined`)]:i,[g(`addon-background-filled`)]:d,borderColor:_(`addon-border-color`),background:_(`addon-background`),"&-variant-outlined":{[g(`addon-border-color`)]:_(`addon-border-color-outlined`)},"&-variant-filled":{[g(`addon-border-color`)]:`transparent`,[g(`addon-background`)]:_(`addon-background-filled`),[`&${t}-disabled`]:{[g(`addon-border-color`)]:i,[g(`addon-background`)]:d}},"&-variant-borderless":{border:`none`,background:`transparent`},"&-variant-underlined":{border:`none`,background:`transparent`}},{"&-status-error":{[g(`addon-border-color-outlined`)]:e.colorError,[g(`addon-background-filled`)]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[g(`addon-border-color-outlined`)]:e.colorWarning,[g(`addon-background-filled`)]:e.colorWarningBg,color:e.colorWarning}}]}},N=m(`Addon`,e=>[M(e),r(e,{focus:!1})]),P=b.forwardRef((e,n)=>{let{className:r,children:i,style:a,prefixCls:o,variant:s=`outlined`,disabled:c,status:u,...f}=e,{getPrefixCls:p,direction:m}=b.useContext(t),h=p(`space-addon`,o),[g,_]=N(h),{compactItemClassnames:v,compactSize:x}=d(h,m),S=y(h,u),C=l(h,g,v,_,`${h}-variant-${s}`,S,{[`${h}-${x}`]:x,[`${h}-disabled`]:c},r);return b.createElement(`div`,{ref:n,className:C,style:a,...f},i)});function F(e){return[`small`,`middle`,`medium`,`large`].includes(e)}function I(e){return e?s(e):!1}var L=b.createContext({latestIndex:0}),ee=L.Provider,te=e=>{let{className:t,prefix:n,index:r,children:i,separator:a,style:o,classNames:s,styles:c}=e,{latestIndex:u}=b.useContext(L);return h(i)?b.createElement(b.Fragment,null,b.createElement(`div`,{className:t,style:o},i),r<u&&a&&b.createElement(`span`,{className:l(`${n}-item-separator`,s?.separator),style:c?.separator},a)):null},R=e=>{let{componentCls:t,antCls:n}=e;return{[t]:{display:`inline-flex`,"&-rtl":{direction:`rtl`},"&-vertical":{flexDirection:`column`},"&-align":{flexDirection:`column`,"&-center":{alignItems:`center`},"&-start":{alignItems:`flex-start`},"&-end":{alignItems:`flex-end`},"&-baseline":{alignItems:`baseline`}},[`${t}-item:empty`]:{display:`none`},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:`block`}}}},z=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},ne=m(`Space`,e=>{let t=_(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[R(t),z(t)]},()=>({}),{resetStyle:!1}),B=b.forwardRef((e,t)=>{let{getPrefixCls:r,direction:a,size:o,className:s,style:c,classNames:u,styles:d}=i(`space`),{size:p=o??`small`,align:m,className:_,rootClassName:y,children:x,direction:S,orientation:C,prefixCls:w,split:T,separator:E,style:D,vertical:O,wrap:k=!1,classNames:A,styles:j,...M}=e,[N,P]=Array.isArray(p)?p:[p,p],L=F(P),R=F(N),z=I(P),B=I(N),V=f(x,{keepEmpty:!0}),[H,re]=g(C,O,S),U=m===void 0&&!re?`center`:m,ie=E??T,W=r(`space`,w),[G,K]=ne(W),q={...e,size:p,orientation:H,align:U},J=v(c),Y=v(D),[X,Z]=n([u,A],[d,J,j,Y],{props:q}),ae=l(W,s,G,`${W}-${H}`,{[`${W}-rtl`]:a===`rtl`,[`${W}-align-${U}`]:U,[`${W}-gap-row-${P}`]:L,[`${W}-gap-col-${N}`]:R},_,y,K,X.root),Q=l(`${W}-item`,X.item),oe=V.map((e,t)=>{let n=e?.key||`${Q}-${t}`;return b.createElement(te,{prefix:W,classNames:X,styles:Z,className:Q,key:n,index:t,separator:ie,style:Z.item},e)}),se=b.useMemo(()=>({latestIndex:V.reduce((e,t,n)=>h(t)?n:e,0)}),[V]);if(V.length===0)return null;let $={};return k&&($.flexWrap=`wrap`),!R&&B&&($.columnGap=N),!L&&z&&($.rowGap=P),b.createElement(`div`,{ref:t,className:ae,style:{...$,...Z.root},...M},b.createElement(ee,{value:se},oe))});B.Compact=u,B.Addon=P;export{j as a,A as i,F as n,k as o,P as r,x as s,B as t};