amotify 0.2.26 → 0.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as s,c as Ae,d as ze}from"../chunk-C5N2D3ZX.js";import a from"@mingoo/jsmin";import{Config as Ne}from".";const t={toConcreteBorderRadius:d=>{let L=Ne.get().roundness|0;return d=="1.tone.primary"?d=[0,2,3,4,5,5][L]:d=="2.tone.secondary"?d=[0,1,2,3,4,5][L]:d=="3.tone.tertiary"&&(d=[0,"1/3","2/3",1,2,3][L]),d},ev:d=>a.is.nullish(d),ClassNames:(d,L)=>{var M,Be,Te,z,_e,we,Le;let e=[],{gap:l,display:x,position:y,overflow:H,fontColor:k,fontSize:F,fontWeight:n,backgroundColor:E,textAlign:P,textDecoration:D,boxShadow:G,margin:p,marginTop:o,marginRight:r,marginBottom:c,marginLeft:b,padding:i,paddingTop:S,paddingRight:v,paddingBottom:C,paddingLeft:R,top:J,right:Q,bottom:Y,left:Z,border:W,borderTop:h,borderRight:u,borderBottom:f,borderLeft:m,borderWidth:ee,borderColor:te,borderStyle:re,borderRadius:A,borderTopLeftRadius:B,borderTopRightRadius:T,borderBottomLeftRadius:_,borderBottomRightRadius:w,flexSizing:ie,flexWrap:oe,flexType:se,flexChilds:ae,flexGrid:de,horizontalAlign:ne,verticalAlign:le,transition:pe,gridCenter:ge,gridCols:he,maxHeight:ue,minHeight:fe,maxWidth:me,minWidth:be,width:Se,height:ce,unitHeight:xe,unitWidth:ye,opacity:ve}=L;{if(t.ev(x)||e.push("dsp"+x),H){let g=a.flatArray(H);e.push("ovfl-x-"+g[0]),e.push("ovfl-y-"+(g[1]||g[0]))}t.ev(y)||e.push("ps"+y),t.ev(P)||e.push("txtalg"+P),t.ev(P)||e.push("txtdeco"+D),t.ev(k)||e.push("ftcl"+((M=String(k))==null?void 0:M.replace(/\./g,"_"))),t.ev(F)||e.push("ftsz"+((Be=String(F))==null?void 0:Be.replace(/\..*/,""))),t.ev(n)||e.push("ftwt"+(n==null?void 0:n.replace(/\..*/,""))),t.ev(E)||e.push("bgc"+((Te=String(E))==null?void 0:Te.replace(/\./g,"_"))),t.ev(G)||e.push("bs"+G);let j,$,q,I;a.is.exist(p)&&(a.is.array(p)?p.length==2?[j,$,q,I]=[...p,...p]:p.length==4&&([j,$,q,I]=p):j=$=q=I=p,o=o!=null?o:j,r=r!=null?r:$,c=c!=null?c:q,b=b!=null?b:I),t.ev(o)||e.push("mrgt"+o),t.ev(r)||e.push("mrgr"+r),t.ev(c)||e.push("mrgb"+c),t.ev(b)||e.push("mrgl"+b);let O,U,K,V;a.is.exist(i)&&(a.is.array(i)?i.length==2?[O,U,K,V]=[...i,...i]:i.length==4&&([O,U,K,V]=i):O=U=K=V=i,S=S!=null?S:O,v=v!=null?v:U,C=C!=null?C:K,R=R!=null?R:V),t.ev(S)||e.push("pdt"+S),t.ev(v)||e.push("pdr"+v),t.ev(C)||e.push("pdb"+C),t.ev(R)||e.push("pdl"+R),t.ev(J)||e.push("pstt"+J),t.ev(Q)||e.push("pstr"+Q),t.ev(Y)||e.push("pstb"+Y),t.ev(Z)||e.push("pstl"+Z);{a.is.exist(W)&&(h=h!=null?h:W,u=u!=null?u:W,f=f!=null?f:W,m=m!=null?m:W),a.is.boolean(h)&&(h=["unset","2.normal"][Number(h)]),a.is.boolean(u)&&(u=["unset","2.normal"][Number(u)]),a.is.boolean(f)&&(f=["unset","2.normal"][Number(f)]),a.is.boolean(m)&&(m=["unset","2.normal"][Number(m)]),t.ev(h)||e.push("b_t_ss"+((z=String(h))==null?void 0:z.replace(/\..*/,""))),t.ev(u)||e.push("b_r_ss"+((_e=String(u))==null?void 0:_e.replace(/\..*/,""))),t.ev(f)||e.push("b_b_ss"+((we=String(f))==null?void 0:we.replace(/\..*/,""))),t.ev(m)||e.push("b_l_ss"+((Le=String(m))==null?void 0:Le.replace(/\..*/,""))),a.is.exist(ee)&&e.push("b_wth"+String(ee)),a.is.exist(te)&&e.push("b_cl"+String(te)),a.is.exist(re)&&e.push("b_st"+String(re));{let g,N,Ce,Pe;a.is.exist(A)&&(a.is.array(A)?A.length==4&&([g,N,Pe,Ce]=A):g=N=Ce=Pe=A,B=B!=null?B:g,T=T!=null?T:N,_=_!=null?_:Ce,w=w!=null?w:Pe)}t.ev(B)||e.push("br_tl"+t.toConcreteBorderRadius(B)),t.ev(T)||e.push("br_tr"+t.toConcreteBorderRadius(T)),t.ev(_)||e.push("br_bl"+t.toConcreteBorderRadius(_)),t.ev(w)||e.push("br_br"+t.toConcreteBorderRadius(w))}if(t.ev(ve)||e.push("op"+ve),a.is.exist(l)){let g,N;a.is.array(l)?(g=l[0],N=l[1]):g=N=l,e.push("gapRow"+g,"gapCol"+N)}t.ev(ie)||e.push("flsz"+ie),t.ev(oe)||e.push("flwrp"+oe),t.ev(se)||e.push("fltyp"+se),t.ev(ae)||e.push("flchld"+ae),t.ev(de)||e.push("flgrid"+de),t.ev(le)||e.push("flvrt"+le),t.ev(ne)||e.push("flhrz"+ne),t.ev(ge)||e.push("grcnt"+ge),t.ev(he)||e.push("grcol"+he),t.ev(ce)||e.push("hgt"+ce),t.ev(Se)||e.push("wdt"+Se),t.ev(xe)||e.push("unthgt"+xe),t.ev(ye)||e.push("untwdt"+ye),t.ev(pe)||e.push("trnst"+pe),t.ev(ue)||e.push("maxh"+ue),t.ev(fe)||e.push("minh"+fe),t.ev(me)||e.push("maxw"+me),t.ev(be)||e.push("minw"+be)}return e.length?d+e.join(" "+d):""}},ke=d=>{let c=s({},d),{gradients:e,ssCardBox:l,ssSphere:x,ssSquare:y,ssPushable:H,ssAbsoluteCovered:k,ssTextEllipsis:F,flexCenter:n,flexNewLine:E,isLightFont:P,isBoldFont:D,isSemiBoldFont:G,isRounded:p,freeCSS:b={}}=c,o=ze(b,[]),r=ze(c,["gradients","ssCardBox","ssSphere","ssSquare","ssPushable","ssAbsoluteCovered","ssTextEllipsis","flexCenter","flexNewLine","isLightFont","isBoldFont","isSemiBoldFont","isRounded","freeCSS"]);if(o=o||{},r=r||{},e){let{deg:i,colors:S}=e;o=Ae(s({},o),{background:`linear-gradient(${i}deg,${S.join(",")})`})}if(l){l===!0&&(l="border");let i={backgroundColor:"layer.1",borderRadius:"1.tone.primary",boxShadow:"0.min",freeCSS:{zIndex:1}};l=="border"?i.border=!0:l=="layer"?i.backgroundColor="layer.1":l=="cloud"?i.backgroundColor="cloud":l=="shadow"&&(i.boxShadow="0.normal"),Ne.get().darkMode=="dim"&&(i.boxShadow="1.normal"),Ne.get().darkMode=="dark"&&(i.boxShadow="1.remark"),o=s(s({},i.freeCSS),o),r=s(s({},i),r)}return x&&(n=n!=null?n:!0,r=s({padding:0,unitWidth:x,unitHeight:x,borderRadius:"sphere",flexSizing:"none"},r)),y&&(n=n!=null?n:!0,r=s({padding:0,unitWidth:y,unitHeight:y,flexSizing:"none"},r)),H&&(r=s({transition:"middle"},r),r=Ae(s({},r),{className:[r.className,"ssPushable"].join(" ")})),k&&(r=s({position:"absolute",top:0,left:0,right:0,bottom:0},r)),F&&(r=s({overflow:"hidden"},r),o=s({whiteSpace:"nowrap",textOverflow:"ellipsis"},o)),E&&(r=s({width:1,flexSizing:"none"},r)),n&&(r=s({display:"flex",horizontalAlign:"center",verticalAlign:"center"},r)),P&&(r.fontWeight="1.light"),G&&(r.fontWeight="3.semiBold"),D&&(r.fontWeight="4.bold"),p&&(a.is.number(p)?o.borderRadius=p*12:r.borderRadius="sphere"),Ae(s({},r),{freeCSS:o})},je=d=>{let He=ke(d),{componentID:e,gap:l,display:x,position:y,overflow:H,fontColor:k,fontSize:F,fontWeight:n,backgroundColor:E,textAlign:P,textDecoration:D,boxShadow:G,margin:p,marginTop:o,marginRight:r,marginBottom:c,marginLeft:b,padding:i,paddingTop:S,paddingRight:v,paddingBottom:C,paddingLeft:R,top:J,right:Q,bottom:Y,left:Z,border:W,borderTop:h,borderRight:u,borderBottom:f,borderLeft:m,borderWidth:ee,borderColor:te,borderStyle:re,borderRadius:A,borderTopLeftRadius:B,borderTopRightRadius:T,borderBottomLeftRadius:_,borderBottomRightRadius:w,flexSizing:ie,flexWrap:oe,flexType:se,flexChilds:ae,flexGrid:de,horizontalAlign:ne,verticalAlign:le,transition:pe,gridCenter:ge,gridCols:he,maxHeight:ue,minHeight:fe,maxWidth:me,minWidth:be,width:Se,height:ce,unitHeight:xe,unitWidth:ye,opacity:ve,ssLastChildLossBorder:M,ssAbsoluteCovered:Be,ssCardBox:Te,ssEffectsOnActive:z,ssPushable:_e,ssSphere:we,ssSquare:Le,ssTextEllipsis:j,isBoldFont:$,isLightFont:q,isSemiBoldFont:I,isRounded:O,flexCenter:U,flexNewLine:K,gradients:V,UnderBreakPointStyles:g={},className:N="",freeCSS:Ce={}}=He,Pe=ze(He,["componentID","gap","display","position","overflow","fontColor","fontSize","fontWeight","backgroundColor","textAlign","textDecoration","boxShadow","margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderWidth","borderColor","borderStyle","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","flexSizing","flexWrap","flexType","flexChilds","flexGrid","horizontalAlign","verticalAlign","transition","gridCenter","gridCols","maxHeight","minHeight","maxWidth","minWidth","width","height","unitHeight","unitWidth","opacity","ssLastChildLossBorder","ssAbsoluteCovered","ssCardBox","ssEffectsOnActive","ssPushable","ssSphere","ssSquare","ssTextEllipsis","isBoldFont","isLightFont","isSemiBoldFont","isRounded","flexCenter","flexNewLine","gradients","UnderBreakPointStyles","className","freeCSS"]),Re=[N];if(M&&Re.push("ssLastChildLossBorder_"+M),z){z=a.flatArray(z);for(let We of z)Re.push("eff_"+We,"eff_"+We.split(".")[0])}{let We=t.ClassNames("amotf_",{gap:l,display:x,position:y,overflow:H,fontColor:k,fontSize:F,fontWeight:n,backgroundColor:E,textAlign:P,textDecoration:D,boxShadow:G,margin:p,marginTop:o,marginRight:r,marginBottom:c,marginLeft:b,padding:i,paddingTop:S,paddingRight:v,paddingBottom:C,paddingLeft:R,top:J,right:Q,bottom:Y,left:Z,border:W,borderTop:h,borderRight:u,borderBottom:f,borderLeft:m,borderWidth:ee,borderColor:te,borderStyle:re,borderRadius:A,borderTopLeftRadius:B,borderTopRightRadius:T,borderBottomLeftRadius:_,borderBottomRightRadius:w,flexSizing:ie,flexWrap:oe,flexType:se,flexChilds:ae,flexGrid:de,horizontalAlign:ne,verticalAlign:le,transition:pe,gridCenter:ge,gridCols:he,maxHeight:ue,minHeight:fe,maxWidth:me,minWidth:be,width:Se,height:ce,unitHeight:xe,unitWidth:ye,opacity:ve});Re.push(We)}g&&Re.push(t.ClassNames("amotf_bp",g));let X=s({},Pe);return Ce&&(X.style=s(s({},Ce),X.style)),(e||X["data-component-id"])&&(X["data-component-id"]=X["data-component-id"]||e),Re.length&&(X.className=Re.join(" ").trim().replace(/%/ig,"P").replace(/\d+px/ig,"PIX").replace(/\s+/ig," ").replace(/\//ig,"_").replace(/\./ig,"-")),X},$e=d=>{let{gap:L,display:e,position:l,overflow:x,fontColor:y,fontSize:H,fontWeight:k,backgroundColor:F,textAlign:n,textDecoration:E,boxShadow:P,margin:D,marginTop:G,marginRight:p,marginBottom:o,marginLeft:r,padding:c,paddingTop:b,paddingRight:i,paddingBottom:S,paddingLeft:v,top:C,right:R,bottom:J,left:Q,border:Y,borderTop:Z,borderRight:W,borderBottom:h,borderLeft:u,borderWidth:f,borderColor:m,borderStyle:ee,borderRadius:te,borderTopLeftRadius:re,borderTopRightRadius:A,borderBottomLeftRadius:B,borderBottomRightRadius:T,flexSizing:_,flexWrap:w,flexType:ie,flexChilds:oe,flexGrid:se,horizontalAlign:ae,verticalAlign:de,transition:ne,gridCenter:le,gridCols:pe,maxHeight:ge,minHeight:he,maxWidth:ue,minWidth:fe,width:me,height:be,unitHeight:Se,unitWidth:ce,opacity:xe,ssLastChildLossBorder:ye,ssAbsoluteCovered:ve,ssCardBox:M,ssEffectsOnActive:Be,ssPushable:Te,ssSphere:z,ssSquare:_e,ssTextEllipsis:we,isBoldFont:Le,isLightFont:j,isSemiBoldFont:$,isRounded:q,flexCenter:I,flexNewLine:O,gradients:U,UnderBreakPointStyles:K={},freeCSS:V={}}=d;return{gap:L,display:e,position:l,overflow:x,fontColor:y,fontSize:H,fontWeight:k,backgroundColor:F,textAlign:n,textDecoration:E,boxShadow:P,margin:D,marginTop:G,marginRight:p,marginBottom:o,marginLeft:r,padding:c,paddingTop:b,paddingRight:i,paddingBottom:S,paddingLeft:v,top:C,right:R,bottom:J,left:Q,border:Y,borderTop:Z,borderRight:W,borderBottom:h,borderLeft:u,borderWidth:f,borderColor:m,borderStyle:ee,borderRadius:te,borderTopLeftRadius:re,borderTopRightRadius:A,borderBottomLeftRadius:B,borderBottomRightRadius:T,flexSizing:_,flexWrap:w,flexType:ie,flexChilds:oe,flexGrid:se,horizontalAlign:ae,verticalAlign:de,transition:ne,gridCenter:le,gridCols:pe,maxHeight:ge,minHeight:he,maxWidth:ue,minWidth:fe,width:me,height:be,unitHeight:Se,unitWidth:ce,opacity:xe,ssLastChildLossBorder:ye,ssAbsoluteCovered:ve,ssCardBox:M,ssEffectsOnActive:Be,ssPushable:Te,ssSphere:z,ssSquare:_e,ssTextEllipsis:we,isBoldFont:Le,isLightFont:j,isSemiBoldFont:$,isRounded:q,flexCenter:I,flexNewLine:O,gradients:U,freeCSS:V,UnderBreakPointStyles:K}};export{$e as ExtractStyles,je as GenerateHTMLProps,ke as ReadStyleSet};
|
|
1
|
+
import{b as a,c as Ae,d as ze}from"../chunk-C5N2D3ZX.js";import d from"@mingoo/jsmin";import{Config as Ne}from".";const e={toConcreteBorderRadius:l=>{let w=Ne.get().roundness|0;return l=="1.tone.primary"?l=[0,2,3,4,5,5][w]:l=="2.tone.secondary"?l=[0,1,2,3,4,5][w]:l=="3.tone.tertiary"&&(l=[0,"1/3","2/3",1,2,3][w]),l},ev:l=>d.is.exist(l),ClassNames:(l,w)=>{var M,Ce,Re,z,Be,Te,Le;let r=[],{gap:p,display:x,position:c,overflow:N,fontColor:H,fontSize:k,fontWeight:n,backgroundColor:F,textAlign:P,textDecoration:D,boxShadow:E,margin:g,marginTop:s,marginRight:i,marginBottom:S,marginLeft:m,padding:o,paddingTop:b,paddingRight:y,paddingBottom:C,paddingLeft:R,top:X,right:J,bottom:Q,left:Y,border:W,borderTop:h,borderRight:f,borderBottom:u,borderLeft:v,borderWidth:Z,borderColor:ee,borderStyle:te,borderRadius:A,borderTopLeftRadius:B,borderTopRightRadius:T,borderBottomLeftRadius:L,borderBottomRightRadius:_,flexSizing:re,flexWrap:ie,flexType:oe,flexChilds:se,flexGrid:ae,horizontalAlign:de,verticalAlign:ne,transition:le,gridCenter:pe,gridCols:ge,maxHeight:he,minHeight:fe,maxWidth:ue,minWidth:ve,width:me,height:be,unitHeight:Se,unitWidth:xe,opacity:ce}=w;{if(e.ev(x)&&r.push("dsp"+x),N){let t=d.flatArray(N);r.push("ovfl-x-"+t[0]),r.push("ovfl-y-"+(t[1]||t[0]))}e.ev(c)&&r.push("ps"+c),e.ev(P)&&r.push("txtalg"+P),e.ev(P)&&r.push("txtdeco"+D),e.ev(H)&&r.push("ftcl"+((M=String(H))==null?void 0:M.replace(/\./g,"_"))),e.ev(k)&&r.push("ftsz"+((Ce=String(k))==null?void 0:Ce.replace(/\..*/,""))),e.ev(n)&&r.push("ftwt"+(n==null?void 0:n.replace(/\..*/,""))),e.ev(F)&&r.push("bgc"+((Re=String(F))==null?void 0:Re.replace(/\./g,"_"))),e.ev(E)&&r.push("bs"+E);let j,q,O,$;d.is.exist(g)&&(d.is.array(g)?g.length==2?[j,q,O,$]=[...g,...g]:g.length==4&&([j,q,O,$]=g):j=q=O=$=g,s=s!=null?s:j,i=i!=null?i:q,S=S!=null?S:O,m=m!=null?m:$),e.ev(s)&&r.push("mrgt"+s),e.ev(i)&&r.push("mrgr"+i),e.ev(S)&&r.push("mrgb"+S),e.ev(m)&&r.push("mrgl"+m);let I,U,K,V;d.is.exist(o)&&(d.is.array(o)?o.length==2?[I,U,K,V]=[...o,...o]:o.length==4&&([I,U,K,V]=o):I=U=K=V=o,b=b!=null?b:I,y=y!=null?y:U,C=C!=null?C:K,R=R!=null?R:V),e.ev(b)&&r.push("pdt"+b),e.ev(y)&&r.push("pdr"+y),e.ev(C)&&r.push("pdb"+C),e.ev(R)&&r.push("pdl"+R),e.ev(X)&&r.push("pstt"+X),e.ev(J)&&r.push("pstr"+J),e.ev(Q)&&r.push("pstb"+Q),e.ev(Y)&&r.push("pstl"+Y);{d.is.exist(W)&&(h=h!=null?h:W,f=f!=null?f:W,u=u!=null?u:W,v=v!=null?v:W),d.is.boolean(h)&&(h=["unset","2.normal"][Number(h)]),d.is.boolean(f)&&(f=["unset","2.normal"][Number(f)]),d.is.boolean(u)&&(u=["unset","2.normal"][Number(u)]),d.is.boolean(v)&&(v=["unset","2.normal"][Number(v)]),e.ev(h)&&r.push("b_t_ss"+((z=String(h))==null?void 0:z.replace(/\..*/,""))),e.ev(f)&&r.push("b_r_ss"+((Be=String(f))==null?void 0:Be.replace(/\..*/,""))),e.ev(u)&&r.push("b_b_ss"+((Te=String(u))==null?void 0:Te.replace(/\..*/,""))),e.ev(v)&&r.push("b_l_ss"+((Le=String(v))==null?void 0:Le.replace(/\..*/,""))),d.is.exist(Z)&&r.push("b_wth"+String(Z)),d.is.exist(ee)&&r.push("b_cl"+String(ee)),d.is.exist(te)&&r.push("b_st"+String(te));{let t,G,_e,Pe;d.is.exist(A)&&(d.is.array(A)?A.length==4&&([t,G,Pe,_e]=A):t=G=_e=Pe=A,B=B!=null?B:t,T=T!=null?T:G,L=L!=null?L:_e,_=_!=null?_:Pe)}e.ev(B)&&r.push("br_tl"+e.toConcreteBorderRadius(B)),e.ev(T)&&r.push("br_tr"+e.toConcreteBorderRadius(T)),e.ev(L)&&r.push("br_bl"+e.toConcreteBorderRadius(L)),e.ev(_)&&r.push("br_br"+e.toConcreteBorderRadius(_))}if(e.ev(ce)&&r.push("op"+ce),d.is.exist(p)){let t,G;d.is.array(p)?(t=p[0],G=p[1]):t=G=p,r.push("gapRow"+t,"gapCol"+G)}e.ev(re)&&r.push("flsz"+re),e.ev(ie)&&r.push("flwrp"+ie),e.ev(oe)&&r.push("fltyp"+oe),e.ev(se)&&r.push("flchld"+se),e.ev(ae)&&r.push("flgrid"+ae),e.ev(ne)&&r.push("flvrt"+ne),e.ev(de)&&r.push("flhrz"+de),e.ev(pe)&&r.push("grcnt"+pe),e.ev(ge)&&r.push("grcol"+ge),e.ev(be)&&r.push("hgt"+be),e.ev(me)&&r.push("wdt"+me),e.ev(Se)&&r.push("unthgt"+Se),e.ev(xe)&&r.push("untwdt"+xe),e.ev(le)&&r.push("trnst"+le),e.ev(he)&&r.push("maxh"+he),e.ev(fe)&&r.push("minh"+fe),e.ev(ue)&&r.push("maxw"+ue),e.ev(ve)&&r.push("minw"+ve)}return r.length?l+r.join(" "+l):""}},ke=l=>{let S=a({},l),{gradients:r,ssCardBox:p,ssSphere:x,ssSquare:c,ssPushable:N,ssAbsoluteCovered:H,ssTextEllipsis:k,flexCenter:n,flexNewLine:F,isLightFont:P,isBoldFont:D,isSemiBoldFont:E,isRounded:g,freeCSS:m={}}=S,s=ze(m,[]),i=ze(S,["gradients","ssCardBox","ssSphere","ssSquare","ssPushable","ssAbsoluteCovered","ssTextEllipsis","flexCenter","flexNewLine","isLightFont","isBoldFont","isSemiBoldFont","isRounded","freeCSS"]);if(s=s||{},i=i||{},r){let{deg:o,colors:b}=r;s=Ae(a({},s),{background:`linear-gradient(${o}deg,${b.join(",")})`})}if(p){p===!0&&(p="border");let o={backgroundColor:"layer.1",borderRadius:"1.tone.primary",boxShadow:"0.min",freeCSS:{zIndex:1}};p=="border"?o.border=!0:p=="layer"?o.backgroundColor="layer.1":p=="cloud"?o.backgroundColor="cloud":p=="shadow"&&(o.boxShadow="0.normal"),Ne.get().darkMode=="dim"&&(o.boxShadow="1.normal"),Ne.get().darkMode=="dark"&&(o.boxShadow="1.remark"),s=a(a({},o.freeCSS),s),i=a(a({},o),i)}return x&&(n=n!=null?n:!0,i=a({padding:0,unitWidth:x,unitHeight:x,borderRadius:"sphere",flexSizing:"none"},i)),c&&(n=n!=null?n:!0,i=a({padding:0,unitWidth:c,unitHeight:c,flexSizing:"none"},i)),N&&(i=a({transition:"middle"},i),i=Ae(a({},i),{className:[i.className,"ssPushable"].join(" ")})),H&&(i=a({position:"absolute",top:0,left:0,right:0,bottom:0},i)),k&&(i=a({overflow:"hidden"},i),s=a({whiteSpace:"nowrap",textOverflow:"ellipsis"},s)),F&&(i=a({width:1,flexSizing:"none"},i)),n&&(i=a({display:"flex",horizontalAlign:"center",verticalAlign:"center"},i)),P&&(i.fontWeight="1.light"),E&&(i.fontWeight="3.semiBold"),D&&(i.fontWeight="4.bold"),g&&(d.is.number(g)?s.borderRadius=g*12:i.borderRadius="sphere"),Ae(a({},i),{freeCSS:s})},je=l=>{let He=ke(l),{componentID:r,gap:p,display:x,position:c,overflow:N,fontColor:H,fontSize:k,fontWeight:n,backgroundColor:F,textAlign:P,textDecoration:D,boxShadow:E,margin:g,marginTop:s,marginRight:i,marginBottom:S,marginLeft:m,padding:o,paddingTop:b,paddingRight:y,paddingBottom:C,paddingLeft:R,top:X,right:J,bottom:Q,left:Y,border:W,borderTop:h,borderRight:f,borderBottom:u,borderLeft:v,borderWidth:Z,borderColor:ee,borderStyle:te,borderRadius:A,borderTopLeftRadius:B,borderTopRightRadius:T,borderBottomLeftRadius:L,borderBottomRightRadius:_,flexSizing:re,flexWrap:ie,flexType:oe,flexChilds:se,flexGrid:ae,horizontalAlign:de,verticalAlign:ne,transition:le,gridCenter:pe,gridCols:ge,maxHeight:he,minHeight:fe,maxWidth:ue,minWidth:ve,width:me,height:be,unitHeight:Se,unitWidth:xe,opacity:ce,ssLastChildLossBorder:M,ssAbsoluteCovered:Ce,ssCardBox:Re,ssEffectsOnActive:z,ssPushable:Be,ssSphere:Te,ssSquare:Le,ssTextEllipsis:j,isBoldFont:q,isLightFont:O,isSemiBoldFont:$,isRounded:I,flexCenter:U,flexNewLine:K,gradients:V,UnderBreakPointStyles:t={},className:G="",freeCSS:_e={}}=He,Pe=ze(He,["componentID","gap","display","position","overflow","fontColor","fontSize","fontWeight","backgroundColor","textAlign","textDecoration","boxShadow","margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderWidth","borderColor","borderStyle","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","flexSizing","flexWrap","flexType","flexChilds","flexGrid","horizontalAlign","verticalAlign","transition","gridCenter","gridCols","maxHeight","minHeight","maxWidth","minWidth","width","height","unitHeight","unitWidth","opacity","ssLastChildLossBorder","ssAbsoluteCovered","ssCardBox","ssEffectsOnActive","ssPushable","ssSphere","ssSquare","ssTextEllipsis","isBoldFont","isLightFont","isSemiBoldFont","isRounded","flexCenter","flexNewLine","gradients","UnderBreakPointStyles","className","freeCSS"]),we=[G];if(M&&we.push("ssLastChildLossBorder_"+M),z){z=d.flatArray(z);for(let We of z)we.push("eff_"+We,"eff_"+We.split(".")[0])}{let We=e.ClassNames("amotf_",{gap:p,display:x,position:c,overflow:N,fontColor:H,fontSize:k,fontWeight:n,backgroundColor:F,textAlign:P,textDecoration:D,boxShadow:E,margin:g,marginTop:s,marginRight:i,marginBottom:S,marginLeft:m,padding:o,paddingTop:b,paddingRight:y,paddingBottom:C,paddingLeft:R,top:X,right:J,bottom:Q,left:Y,border:W,borderTop:h,borderRight:f,borderBottom:u,borderLeft:v,borderWidth:Z,borderColor:ee,borderStyle:te,borderRadius:A,borderTopLeftRadius:B,borderTopRightRadius:T,borderBottomLeftRadius:L,borderBottomRightRadius:_,flexSizing:re,flexWrap:ie,flexType:oe,flexChilds:se,flexGrid:ae,horizontalAlign:de,verticalAlign:ne,transition:le,gridCenter:pe,gridCols:ge,maxHeight:he,minHeight:fe,maxWidth:ue,minWidth:ve,width:me,height:be,unitHeight:Se,unitWidth:xe,opacity:ce});we.push(We)}t&&we.push(e.ClassNames("amotf_bp",t));let ye=a({},Pe);return _e&&(ye.style=a(a({},_e),ye.style)),(r||ye["data-component-id"])&&(ye["data-component-id"]=ye["data-component-id"]||r),we.length&&(ye.className=we.join(" ").trim().replace(/%/ig,"P").replace(/\d+px/ig,"PIX").replace(/\s+/ig," ").replace(/\//ig,"_").replace(/\./ig,"-")),ye},qe=l=>{let{gap:w,display:r,position:p,overflow:x,fontColor:c,fontSize:N,fontWeight:H,backgroundColor:k,textAlign:n,textDecoration:F,boxShadow:P,margin:D,marginTop:E,marginRight:g,marginBottom:s,marginLeft:i,padding:S,paddingTop:m,paddingRight:o,paddingBottom:b,paddingLeft:y,top:C,right:R,bottom:X,left:J,border:Q,borderTop:Y,borderRight:W,borderBottom:h,borderLeft:f,borderWidth:u,borderColor:v,borderStyle:Z,borderRadius:ee,borderTopLeftRadius:te,borderTopRightRadius:A,borderBottomLeftRadius:B,borderBottomRightRadius:T,flexSizing:L,flexWrap:_,flexType:re,flexChilds:ie,flexGrid:oe,horizontalAlign:se,verticalAlign:ae,transition:de,gridCenter:ne,gridCols:le,maxHeight:pe,minHeight:ge,maxWidth:he,minWidth:fe,width:ue,height:ve,unitHeight:me,unitWidth:be,opacity:Se,ssLastChildLossBorder:xe,ssAbsoluteCovered:ce,ssCardBox:M,ssEffectsOnActive:Ce,ssPushable:Re,ssSphere:z,ssSquare:Be,ssTextEllipsis:Te,isBoldFont:Le,isLightFont:j,isSemiBoldFont:q,isRounded:O,flexCenter:$,flexNewLine:I,gradients:U,UnderBreakPointStyles:K={},freeCSS:V={}}=l,t={};return e.ev(w)&&(t.gap=w),e.ev(r)&&(t.display=r),e.ev(p)&&(t.position=p),e.ev(x)&&(t.overflow=x),e.ev(c)&&(t.fontColor=c),e.ev(N)&&(t.fontSize=N),e.ev(H)&&(t.fontWeight=H),e.ev(k)&&(t.backgroundColor=k),e.ev(n)&&(t.textAlign=n),e.ev(F)&&(t.textDecoration=F),e.ev(P)&&(t.boxShadow=P),e.ev(D)&&(t.margin=D),e.ev(E)&&(t.marginTop=E),e.ev(g)&&(t.marginRight=g),e.ev(s)&&(t.marginBottom=s),e.ev(i)&&(t.marginLeft=i),e.ev(S)&&(t.padding=S),e.ev(m)&&(t.paddingTop=m),e.ev(o)&&(t.paddingRight=o),e.ev(b)&&(t.paddingBottom=b),e.ev(y)&&(t.paddingLeft=y),e.ev(C)&&(t.top=C),e.ev(R)&&(t.right=R),e.ev(X)&&(t.bottom=X),e.ev(J)&&(t.left=J),e.ev(Q)&&(t.border=Q),e.ev(Y)&&(t.borderTop=Y),e.ev(W)&&(t.borderRight=W),e.ev(h)&&(t.borderBottom=h),e.ev(f)&&(t.borderLeft=f),e.ev(u)&&(t.borderWidth=u),e.ev(v)&&(t.borderColor=v),e.ev(Z)&&(t.borderStyle=Z),e.ev(ee)&&(t.borderRadius=ee),e.ev(te)&&(t.borderTopLeftRadius=te),e.ev(A)&&(t.borderTopRightRadius=A),e.ev(B)&&(t.borderBottomLeftRadius=B),e.ev(T)&&(t.borderBottomRightRadius=T),e.ev(L)&&(t.flexSizing=L),e.ev(_)&&(t.flexWrap=_),e.ev(re)&&(t.flexType=re),e.ev(ie)&&(t.flexChilds=ie),e.ev(oe)&&(t.flexGrid=oe),e.ev(se)&&(t.horizontalAlign=se),e.ev(ae)&&(t.verticalAlign=ae),e.ev(de)&&(t.transition=de),e.ev(ne)&&(t.gridCenter=ne),e.ev(le)&&(t.gridCols=le),e.ev(pe)&&(t.maxHeight=pe),e.ev(ge)&&(t.minHeight=ge),e.ev(he)&&(t.maxWidth=he),e.ev(fe)&&(t.minWidth=fe),e.ev(ue)&&(t.width=ue),e.ev(ve)&&(t.height=ve),e.ev(me)&&(t.unitHeight=me),e.ev(be)&&(t.unitWidth=be),e.ev(Se)&&(t.opacity=Se),e.ev(xe)&&(t.ssLastChildLossBorder=xe),e.ev(ce)&&(t.ssAbsoluteCovered=ce),e.ev(M)&&(t.ssCardBox=M),e.ev(Ce)&&(t.ssEffectsOnActive=Ce),e.ev(Re)&&(t.ssPushable=Re),e.ev(z)&&(t.ssSphere=z),e.ev(Be)&&(t.ssSquare=Be),e.ev(Te)&&(t.ssTextEllipsis=Te),e.ev(Le)&&(t.isBoldFont=Le),e.ev(j)&&(t.isLightFont=j),e.ev(q)&&(t.isSemiBoldFont=q),e.ev(O)&&(t.isRounded=O),e.ev($)&&(t.flexCenter=$),e.ev(I)&&(t.flexNewLine=I),e.ev(U)&&(t.gradients=U),e.ev(V)&&(t.freeCSS=V),e.ev(K)&&(t.UnderBreakPointStyles=K),t};export{qe as ExtractStyles,je as GenerateHTMLProps,ke as ReadStyleSet};
|
package/dist/fn/Cropper.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t,c as l,e as m}from"../../chunk-C5N2D3ZX.js";import{jsx as
|
|
1
|
+
import{b as t,c as l,e as m}from"../../chunk-C5N2D3ZX.js";import{jsx as c,jsxs as D}from"react/jsx-runtime";import o from"@mingoo/jsmin";import{useEffect as I,useState as p}from"react";import w from"./TextArea";import H from"../../mols/Text";import{ExtractStyles as z}from"../../@utils";import{BoxWrapper as A}from"./core";import{InputAutoHeightClasses as f}from"../../@styles/componentClasses";const g=e=>{let[a]=p(o.uuid.gen()),[n,h]=p(String(e.value||""));I(()=>{o.scope(()=>m(void 0,null,function*(){let i=o('[data-id="origin_'+a+'"]')[0],s=o('[data-id="shallow_'+a+'"]')[0];if(!i||!s)return;let d=s.getClientRects()[0];if(!d)return;let{width:V,height:y}=d;i.style.height=y+"px"}))},[n]);let S={componentID:e.componentID,dataValue:e.value,eventType:"init",eventID:o.uuid.gen()},[x,v]=p(S),[T,C]=p({ok:!1,notice:[]}),_=!!n.match(/\n$/),u=n||e.placeholder;_&&(u+="d");let r=z(e);return console.log(r),console.log(e),D(A,{val_status:x,set_status:v,val_validate:T,states:e,children:[c(H.Description,l(t({className:[e.className,f("Shallow")].join(" "),id:"shallow_"+a,padding:1,fontSize:"inherit",flexSizing:0,minHeight:1,position:"absolute",left:0,right:0,top:0,border:"0.trans",opacity:"trans"},r),{freeCSS:l(t({minHeight:16*2,resize:"none"},r.freeCSS),{color:"transparent",zIndex:3,pointerEvents:"none",lineHeight:"1.25",letterSpacing:"1px"}),"data-id":"shallow_"+a,children:u})),c(w,l(t({padding:1,fontSize:"inherit",overflow:"hidden",flexSizing:0},e),{wrapStyles:t({flexSizing:0},e.wrapStyles),freeCSS:l(t({minHeight:16*1,resize:"none"},r.freeCSS),{lineHeight:"1.25",letterSpacing:"1px"}),className:[e.className,f("Origin")].join(" "),value:n,"data-id":"origin_"+a,onUpdateValue:i=>{let s=i.value;h(s),e.onUpdateValue&&e.onUpdateValue(i)}}))]})};export{g as AutoHeightText,g as default};
|
package/dist/fn/Input/List.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t,c as d,d as w}from"../../chunk-C5N2D3ZX.js";import{jsx as n,jsxs as le}from"react/jsx-runtime";import{useState as Z}from"react";import
|
|
1
|
+
import{b as t,c as d,d as w}from"../../chunk-C5N2D3ZX.js";import{jsx as n,jsxs as le}from"react/jsx-runtime";import{useState as Z}from"react";import S from"@mingoo/jsmin";import{$$fromRoot as ie}from"../../@utils";import D from"../../atoms/Box";import se from"../../atoms/Flex";import oe from"../../atoms/FAI";import re from"../Button";import{BoxWrapper as ce,SubmitForm as ue,CommonEffects as de,DefaultStyles as pe,Wrapper as fe}from"./core";import me from"./Hidden";import{InputListClasses as o}from"../../@styles/componentClasses";function ye(e){let{value:l,states:r}=e,{type:C,required:p,minSelect:a=0}=r,i=[];return p&&(l.length||C=="radio"&&i.push({type:"invalid",label:"\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093"})),a&&l.length<a&&i.push({type:"invalid",label:`${a}\u500B\u4EE5\u4E0A\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044`}),{ok:!i.filter(({type:c})=>c=="invalid").length,notice:i}}const Ce=e=>{let{value:l,options:r=[]}=e,C=S.is.exist(l)?S.flatArray(l):[],p=r.map(i=>{let{value:c,label:I}=i;return d(t({},i),{value:JSON.stringify(c),label:I})}),a=[];return C.forEach(i=>{let c=JSON.stringify(i);p.findIndex(N=>N.value==c)!=-1&&a.push(c)}),n(P.Core,d(t({},e),{value:a,options:p}))},P={Core:e=>{let k=e,{type:l,tone:r,required:C,componentID:p="",form:a,override:i,icon:c,iconType:I,enableFormSubmit:N,defaultActiveStyling:W,checkValidationAtFirst:j,onValidate:z,onUpdateValue:R,onUpdateValidValue:_,value:F,options:U,leftIndicator:b,rightIndicator:q,className:H,cellStyles:A,cellClassName:K,cellCheckedStyles:G,cellCheckedClassName:M,minSelect:Q,hideInput:O,freeCSS:g,wrapStyles:T}=k,v=w(k,["type","tone","required","componentID","form","override","icon","iconType","enableFormSubmit","defaultActiveStyling","checkValidationAtFirst","onValidate","onUpdateValue","onUpdateValidValue","value","options","leftIndicator","rightIndicator","className","cellStyles","cellClassName","cellCheckedStyles","cellCheckedClassName","minSelect","hideInput","freeCSS","wrapStyles"]),B={componentID:p,dataValue:F,eventType:"init",eventID:S.uuid.gen()},[u,x]=Z(B),[L,E]=Z({ok:!1,notice:[]});return de({type:"list",states:e,val_status:u,set_status:x,val_validate:L,set_validate:E,onUpdateValue:R,onUpdateValidValue:_,DefaultValidation:ye}),le(ce,{val_status:u,set_status:x,val_validate:L,states:e,children:[n(me,d(t({"data-value":JSON.stringify(u.dataValue),form:a,"data-input-type":l,"data-validation":L.ok},v),{componentID:u.componentID})),n(P.List,{states:e,val_status:u,set_status:x})]})},List:e=>{let{states:l,val_status:r,set_status:C}=e,{componentID:p,type:a,tone:i,icon:c=!0,options:I,name:N,form:W,tabIndex:j,hideInput:z,disabled:R,className:_,cellStyles:F,cellClassName:U="",cellCheckedStyles:b,cellCheckedClassName:q="",enableFormSubmit:H,defaultActiveStyling:A=!0}=l,{dataValue:K}=r,G=c?n(D,{flexSizing:"none",children:l.iconType=="radio"?n(P.RadioIcon,{}):l.iconType=="checkbox"?n(P.CheckboxIcon,{}):null}):null,M=I.map((Q,O)=>{let Y=Q,{value:g,label:T,disabled:v=R,className:B="",checkedStyles:u,checkedClassName:x="",freeCSS:L}=Y,E=w(Y,["value","label","disabled","className","checkedStyles","checkedClassName","freeCSS"]),k=S.uuid.gen(),X=K.findIndex(f=>f===g)!=-1,h=t(t({},F),E),$=[o("Label"),o("defaultActiveStyling_"+!!A),U,B];return X&&(h=d(t(t(t({},h),b),u),{freeCSS:t(t(t({},h==null?void 0:h.freeCSS),b==null?void 0:b.freeCSS),u==null?void 0:u.freeCSS)}),$=[...$,q,x]),[n("input",{type:a=="radio"?"radio":"checkbox",className:[o("Input"),o("defaultActiveStyling_"+!!A)].join(" "),name:"RadioCheckbox-"+N,"data-list-index":p+"-"+O,id:k,value:String(g),"data-form-name":W,disabled:v,checked:X,onFocus:f=>{if(v||a!="radio"||r.dataValue.length)return;let{value:m,checked:V}=f.target,y=[m];C(s=>d(t({},s),{dataValue:y,eventType:"update",eventID:S.uuid.gen()}))},onChange:f=>{if(v)return;let{value:m,checked:V}=f.target,y=[];if(a=="radio")y=[m];else if(a=="checkbox"||a=="checker")if(V)y=[...r.dataValue,m];else{let s=[...r.dataValue];s.splice(r.dataValue.findIndex(ne=>ne==m),1),y=s}C(s=>d(t({},s),{dataValue:y,eventType:"update",eventID:S.uuid.gen()}))},onKeyDown:f=>{let{key:m,shiftKey:V}=f;if((a=="checkbox"||a=="checker")&&m!="Tab"){if(m.match(/Arrow/)){f.preventDefault();let y=["ArrowLeft","ArrowUp"].includes(m)?-1:1,s=O+y;s<0?s=I.length-1:s>=I.length&&(s=0),ie(`input[data-list-index="${p}-${s}"]`).focus()}}H&&ue(f)},tabIndex:j},"List-"+JSON.stringify(g)),le(re.Label.Plain,d(t({htmlFor:k,className:$.join(" "),tabIndex:-1,display:"flex",ssEffectsOnActive:!1,verticalAlign:"center",gap:"1/3",flexWrap:!1},h),{children:[G,S.is.string(T)?n(D,{children:T}):T]}),"ListTrigger-"+JSON.stringify(g))]});return n(se,{flexSizing:"auto",style:l.style,freeCSS:t({},l.freeCSS),className:[_,o("CellBase"),o("HideInput_"+z),o("IconIndicator_"+!!c),o("Tone_"+i)].join(" "),children:M})},RadioIcon:()=>n(D,{className:o("Icon"),backgroundColor:"layer.1",border:!0,transition:"middle",position:"relative",borderRadius:"sphere",flexCenter:!0}),CheckboxIcon:()=>n(D,{className:[o("Icon"),o("CheckboxIcon")].join(" "),borderRadius:"3.tone.tertiary",backgroundColor:"layer.1",border:!0,transition:"middle",fontColor:"white",position:"relative",flexCenter:!0,children:n(oe.Check,{className:o("I"),transition:"middle",opacity:"trans",freeCSS:{zIndex:8}})})},J=e=>{e=t({},e);let l=pe.ListCell(e);return n(fe,{componentID:e.componentID,children:Ce,states:l})},ee=e=>n(J,d(t({iconType:"radio",tone:e.tone},e),{type:"radio"})),te=e=>n(J,d(t({iconType:"checkbox",tone:e.tone},e),{type:"checkbox"})),ae={Plain:J,Radio:ee,Checkbox:te};export{te as Checkbox,ae as List,ee as Radio,ae as default};
|