This commit is contained in:
2026-10-27 22:40:37 +07:00
parent 8c1e3e0e16
commit 13bcb22dcd
109 changed files with 1863 additions and 1863 deletions
+1
View File
@@ -0,0 +1 @@
import{Pt as e,W as t,_ as n,ct as r,ht as i,jt as a,m as o,xt as s}from"./client-Be0b5AZU.js";import{a as c,o as l}from"./ui-DePKLhY8.js";import{a as u}from"./Button-B0cBJTB7.js";import{t as d}from"./flatten-CetjII2I.js";import{t as f}from"./get-slot-6kXJmSMP.js";import{v as p}from"./index-DpxjEbFc.js";function m(){return p}var h={name:`Space`,self:m},g;function _(){if(!u)return!0;if(g===void 0){let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.rowGap=`1px`,e.appendChild(document.createElement(`div`)),e.appendChild(document.createElement(`div`)),document.body.appendChild(e);let t=e.scrollHeight===1;return document.body.removeChild(e),g=t}return g}var v=a({name:`Space`,props:Object.assign(Object.assign({},o.props),{align:String,justify:{type:String,default:`start`},inline:Boolean,vertical:Boolean,reverse:Boolean,size:[String,Number,Array],wrapItem:{type:Boolean,default:!0},itemClass:String,itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),setup(e){let{mergedClsPrefixRef:i,mergedRtlRef:a,mergedComponentPropsRef:u}=t(e),d=s(()=>e.size||u?.value?.Space?.size||`medium`),f=o(`Space`,`-space`,void 0,h,e,i),p=n(`Space`,a,i);return{useGap:_(),rtlEnabled:p,mergedClsPrefix:i,margin:s(()=>{let e=d.value;if(Array.isArray(e))return{horizontal:e[0],vertical:e[1]};if(typeof e==`number`)return{horizontal:e,vertical:e};let{self:{[r(`gap`,e)]:t}}=f.value,{row:n,col:i}=l(t);return{horizontal:c(i),vertical:c(n)}})}},render(){let{vertical:t,reverse:n,align:r,inline:a,justify:o,itemClass:s,itemStyle:c,margin:l,wrap:u,mergedClsPrefix:p,rtlEnabled:m,useGap:h,wrapItem:g,internalUseGap:_}=this,v=d(f(this),!1);if(!v.length)return null;let y=`${l.horizontal}px`,b=`${l.horizontal/2}px`,x=`${l.vertical}px`,S=`${l.vertical/2}px`,C=v.length-1,w=o.startsWith(`space-`);return e(`div`,{role:`none`,class:[`${p}-space`,m&&`${p}-space--rtl`],style:{display:a?`inline-flex`:`flex`,flexDirection:t&&!n?`column`:t&&n?`column-reverse`:!t&&n?`row-reverse`:`row`,justifyContent:[`start`,`end`].includes(o)?`flex-${o}`:o,flexWrap:!u||t?`nowrap`:`wrap`,marginTop:h||t?``:`-${S}`,marginBottom:h||t?``:`-${S}`,alignItems:r,gap:h?`${l.vertical}px ${l.horizontal}px`:``}},!g&&(h||_)?v:v.map((n,r)=>n.type===i?n:e(`div`,{role:`none`,class:s,style:[c,{maxWidth:`100%`},h?``:t?{marginBottom:r===C?``:x}:m?{marginLeft:w?o===`space-between`&&r===C?``:b:r===C?``:y,marginRight:w?o===`space-between`&&r===0?``:b:``,paddingTop:S,paddingBottom:S}:{marginRight:w?o===`space-between`&&r===C?``:b:r===C?``:y,marginLeft:w?o===`space-between`&&r===0?``:b:``,paddingTop:S,paddingBottom:S}]},n)))}});export{v as t};