amotify 0.1.31 → 0.1.32

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.
Files changed (95) hide show
  1. package/dist/@declaration/_.js +1 -1
  2. package/dist/@styles/componentClasses/_.css +68 -65
  3. package/dist/@styles/componentClasses/_.js +39 -39
  4. package/dist/@styles/index.css +68 -65
  5. package/dist/@styles/index.js +39 -39
  6. package/dist/@styles/init.css +1 -1
  7. package/dist/@styles/style.css +68 -65
  8. package/dist/@styles/style.js +39 -39
  9. package/dist/@styles/var.css +1 -1
  10. package/dist/@utils/GenerateClassName.js +470 -1
  11. package/dist/@utils/LaunchReactApp.js +78 -1
  12. package/dist/@utils/_.js +12 -1
  13. package/dist/@utils/collectForm.js +96 -1
  14. package/dist/@utils/color.js +103 -1
  15. package/dist/@utils/config.js +101 -1
  16. package/dist/@utils/fin.js +39 -1
  17. package/dist/@utils/getElement.js +13 -1
  18. package/dist/@utils/jsminEx.js +172 -1
  19. package/dist/@utils/pageTransit.js +33 -1
  20. package/dist/@utils/useRecycle.js +44 -1
  21. package/dist/@utils/useStore.js +54 -1
  22. package/dist/atoms/Box.js +20 -1
  23. package/dist/atoms/FAI.js +148 -1
  24. package/dist/atoms/Flex.js +34 -1
  25. package/dist/atoms/Grid.js +17 -1
  26. package/dist/atoms/Img.js +65 -1
  27. package/dist/atoms/Logo.js +359 -51
  28. package/dist/atoms/P.js +20 -1
  29. package/dist/atoms/Placeholder.js +44 -1
  30. package/dist/atoms/Span.js +20 -1
  31. package/dist/atoms/_.js +9 -1
  32. package/dist/chunk-JJ3PEWPN.js +60 -0
  33. package/dist/fn/Button.js +316 -1
  34. package/dist/fn/Cropper.js +1009 -1
  35. package/dist/fn/Effect/Fade.js +88 -1
  36. package/dist/fn/Effect/Pudding.js +22 -1
  37. package/dist/fn/Effect/Ripple.js +117 -3
  38. package/dist/fn/Effect/_.js +14 -1
  39. package/dist/fn/Input/AutoHeightText.js +112 -1
  40. package/dist/fn/Input/Checker.js +36 -1
  41. package/dist/fn/Input/Chips/Selector.js +472 -1
  42. package/dist/fn/Input/Chips/_.js +349 -1
  43. package/dist/fn/Input/Contenteditable.js +160 -1
  44. package/dist/fn/Input/DigitCharacters.js +275 -1
  45. package/dist/fn/Input/Filer.js +619 -1
  46. package/dist/fn/Input/Hidden.js +48 -1
  47. package/dist/fn/Input/List.js +450 -1
  48. package/dist/fn/Input/Parts.js +121 -1
  49. package/dist/fn/Input/Plain.js +12 -1
  50. package/dist/fn/Input/RichSelect.js +279 -1
  51. package/dist/fn/Input/Search.js +53 -1
  52. package/dist/fn/Input/Segmented.js +245 -1
  53. package/dist/fn/Input/Select.js +278 -1
  54. package/dist/fn/Input/Slider.js +538 -1
  55. package/dist/fn/Input/Switch.js +221 -1
  56. package/dist/fn/Input/Text.js +626 -1
  57. package/dist/fn/Input/TextArea.js +151 -1
  58. package/dist/fn/Input/Time/Picker.js +1457 -1
  59. package/dist/fn/Input/Time/_.js +867 -1
  60. package/dist/fn/Input/_.js +48 -1
  61. package/dist/fn/Input/core.js +626 -1
  62. package/dist/fn/Layout/PageNotFound.js +90 -1
  63. package/dist/fn/Layout/PageRouter.js +87 -1
  64. package/dist/fn/Layout/PageViewController.js +29 -1
  65. package/dist/fn/Layout/Plate.js +37 -1
  66. package/dist/fn/Layout/RootViewController.js +315 -1
  67. package/dist/fn/Layout/SwipeView.js +348 -1
  68. package/dist/fn/Layout/TabBar.js +72 -1
  69. package/dist/fn/Layout/_.js +22 -1
  70. package/dist/fn/Loader/_.js +104 -1
  71. package/dist/fn/Loader/corner.js +85 -1
  72. package/dist/fn/Loader/mini.js +125 -1
  73. package/dist/fn/Loader/top.js +73 -1
  74. package/dist/fn/Sheet.js +1101 -1
  75. package/dist/fn/Snackbar.js +216 -1
  76. package/dist/fn/Table/Data.js +974 -1
  77. package/dist/fn/Table/Drag.js +435 -1
  78. package/dist/fn/Table/Normal.js +136 -1
  79. package/dist/fn/Table/Parts.js +41 -1
  80. package/dist/fn/Table/Wrapper.js +60 -1
  81. package/dist/fn/Table/_.js +16 -1
  82. package/dist/fn/Table/cellStyling.js +51 -1
  83. package/dist/fn/Tooltips.js +58 -1
  84. package/dist/fn/_.js +10 -1
  85. package/dist/index.js +20 -1
  86. package/dist/mols/Accordion.js +152 -1
  87. package/dist/mols/Column.js +16 -1
  88. package/dist/mols/LinkifyText.js +42 -1
  89. package/dist/mols/List.js +42 -1
  90. package/dist/mols/Row.js +47 -1
  91. package/dist/mols/Text.js +67 -1
  92. package/dist/mols/_.js +6 -1
  93. package/dist/temps/_.js +1 -1
  94. package/dist/temps/designBook.js +3639 -20
  95. package/package.json +1 -1
@@ -1 +1,470 @@
1
- import{b as t,c as f,d as X}from"../chunk-VY3566IV.js";import{$$ as o,Config as ke}from"./_";const r={toConcreteBorderRadius:l=>{let T=ke.get().roundness|0;return l=="1.tone.primary"?l=[0,2,3,4,5,5][T]:l=="2.tone.secondary"?l=[0,1,2,3,4,5][T]:l=="3.tone.tertiary"&&(l=[0,"1/3","2/3",1,2,3][T]),l},ev:l=>o.is.nullish(l),ClassNames:(l,T)=>{var _e,Be,Te,Re,Pe,we,Ne;let e=[],xe=T,{gap:n,display:x,position:m,overflow:b,fontColor:R,fontSize:_,fontWeight:i,backgroundColor:p,textAlign:P,boxShadow:h,margin:u,marginTop:B,marginRight:s,marginBottom:c,marginLeft:a,padding:g,paddingTop:N,paddingRight:k,paddingBottom:L,paddingLeft:z,top:Q,right:V,bottom:Y,left:Z,border:E,borderTop:v,borderRight:S,borderBottom:y,borderLeft:C,borderWidth:ee,borderColor:re,borderStyle:se,borderRadius:F,borderTopLeftRadius:W,borderTopRightRadius:A,borderBottomLeftRadius:H,borderBottomRightRadius:j,flexSizing:te,flexWrap:ie,flexType:oe,flexChilds:ae,flexGrid:le,horizontalAlign:ne,verticalAlign:pe,transition:de,gridCenter:he,gridCols:ue,maxHeight:ge,minHeight:fe,maxWidth:me,minWidth:be,width:ce,height:ve,unitHeight:Se,unitWidth:ye,opacity:Ce}=xe,Le=X(xe,["gap","display","position","overflow","fontColor","fontSize","fontWeight","backgroundColor","textAlign","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"]);{if(r.ev(x)||e.push("dsp"+x),b){let d=o.flatArray(b);e.push("ovfl-x-"+d[0]),e.push("ovfl-y-"+(d[1]||d[0]))}r.ev(m)||e.push("ps"+m),r.ev(P)||e.push("txalg"+P),r.ev(R)||e.push("ftcl"+((_e=String(R))==null?void 0:_e.replace(/\..*/,""))),r.ev(_)||e.push("ftsz"+((Be=String(_))==null?void 0:Be.replace(/\..*/,""))),r.ev(i)||e.push("ftwt"+(i==null?void 0:i.replace(/\..*/,""))),r.ev(p)||e.push("bgc"+((Te=String(p))==null?void 0:Te.replace(/\..*/,""))),r.ev(h)||e.push("bs"+h);let U,$,I,G;o.is.exist(u)&&(o.is.array(u)?u.length==2?[U,$,I,G]=[...u,...u]:u.length==4&&([U,$,I,G]=u):U=$=I=G=u,B=B!=null?B:U,s=s!=null?s:$,c=c!=null?c:I,a=a!=null?a:G),r.ev(B)||e.push("mrgt"+B),r.ev(s)||e.push("mrgr"+s),r.ev(c)||e.push("mrgb"+c),r.ev(a)||e.push("mrgl"+a);let O,q,D,M;o.is.exist(g)&&(o.is.array(g)?g.length==2?[O,q,D,M]=[...g,...g]:g.length==4&&([O,q,D,M]=g):O=q=D=M=g,N=N!=null?N:O,k=k!=null?k:q,L=L!=null?L:D,z=z!=null?z:M),r.ev(N)||e.push("pdt"+N),r.ev(k)||e.push("pdr"+k),r.ev(L)||e.push("pdb"+L),r.ev(z)||e.push("pdl"+z),r.ev(Q)||e.push("pstt"+Q),r.ev(V)||e.push("pstr"+V),r.ev(Y)||e.push("pstb"+Y),r.ev(Z)||e.push("pstl"+Z);{o.is.exist(E)&&(v=v!=null?v:E,S=S!=null?S:E,y=y!=null?y:E,C=C!=null?C:E),o.is.boolean(v)&&(v=["unset","2.normal"][Number(v)]),o.is.boolean(S)&&(S=["unset","2.normal"][Number(S)]),o.is.boolean(y)&&(y=["unset","2.normal"][Number(y)]),o.is.boolean(C)&&(C=["unset","2.normal"][Number(C)]),r.ev(v)||e.push("b_t_ss"+((Re=String(v))==null?void 0:Re.replace(/\..*/,""))),r.ev(S)||e.push("b_r_ss"+((Pe=String(S))==null?void 0:Pe.replace(/\..*/,""))),r.ev(y)||e.push("b_b_ss"+((we=String(y))==null?void 0:we.replace(/\..*/,""))),r.ev(C)||e.push("b_l_ss"+((Ne=String(C))==null?void 0:Ne.replace(/\..*/,""))),o.is.exist(ee)&&e.push("b_wth"+String(ee)),o.is.exist(re)&&e.push("b_cl"+String(re)),o.is.exist(se)&&e.push("b_st"+String(se));{let d,w,J,K;o.is.exist(F)&&(o.is.array(F)?F.length==4&&([d,w,K,J]=F):d=w=J=K=F,W=W!=null?W:d,A=A!=null?A:w,H=H!=null?H:J,j=j!=null?j:K)}r.ev(W)||e.push("br_tl"+r.toConcreteBorderRadius(W)),r.ev(A)||e.push("br_tr"+r.toConcreteBorderRadius(A)),r.ev(H)||e.push("br_bl"+r.toConcreteBorderRadius(H)),r.ev(j)||e.push("br_br"+r.toConcreteBorderRadius(j))}if(r.ev(Ce)||e.push("op"+Ce),o.is.exist(n)){let d,w;o.is.array(n)?(d=n[0],w=n[1]):d=w=n,e.push("gapRow"+d,"gapCol"+w)}r.ev(te)||e.push("flsz"+te),r.ev(ie)||e.push("flwrp"+ie),r.ev(oe)||e.push("fltyp"+oe),r.ev(ae)||e.push("flchld"+ae),r.ev(le)||e.push("flgrid"+le),r.ev(pe)||e.push("flvrt"+pe),r.ev(ne)||e.push("flhrz"+ne),r.ev(he)||e.push("grcnt"+he),r.ev(ue)||e.push("grcol"+ue),r.ev(ve)||e.push("hgt"+ve),r.ev(ce)||e.push("wdt"+ce),r.ev(Se)||e.push("unthgt"+Se),r.ev(ye)||e.push("untwdt"+ye),r.ev(de)||e.push("trnst"+de),r.ev(ge)||e.push("maxh"+ge),r.ev(fe)||e.push("minh"+fe),r.ev(me)||e.push("maxw"+me),r.ev(be)||e.push("minw"+be)}return{otherParams:Le,className:e.length?l+e.join(" "+l):""}}},ze=l=>{let c=t({},l),{gradients:e,ssCardBox:n,ssSphere:x,ssSquare:m,ssPushable:b,ssAbsoluteCovered:R,ssTextEllipsis:_,flexCenter:i,flexNewLine:p,isLightFont:P,isBoldFont:h,isSemiBoldFont:u,isRounded:B}=c,s=X(c,["gradients","ssCardBox","ssSphere","ssSquare","ssPushable","ssAbsoluteCovered","ssTextEllipsis","flexCenter","flexNewLine","isLightFont","isBoldFont","isSemiBoldFont","isRounded"]);if(e){let{deg:a,colors:g}=e;s=f(t({},s),{freeCSS:f(t({},s.freeCSS),{background:`linear-gradient(${a}deg,${g.join(",")})`})})}if(n){n===!0&&(n="border");let a={backgroundColor:"1.layer.base",borderRadius:"1.tone.primary",boxShadow:"0.thin",freeCSS:{zIndex:1}};n=="border"?a.border=!0:n=="layer"?a.backgroundColor="1.layer.base":n=="cloud"?a.backgroundColor="cloud":n=="shadow"&&(a.boxShadow="0.normal"),["dim","dark"].includes(ke.get().darkMode)&&(a.boxShadow="1.remark"),s=f(t(t({},a),s),{freeCSS:t(t({},a.freeCSS),s.freeCSS),UnderBreakPointStyles:t(t({},a.UnderBreakPointStyles),s.UnderBreakPointStyles)})}return x&&(i=i!=null?i:!0,s=t({padding:0,unitWidth:x,unitHeight:x,borderRadius:"sphere",flexSizing:"none"},s)),m&&(i=i!=null?i:!0,s=t({padding:0,unitWidth:m,unitHeight:m,flexSizing:"none"},s)),!b||(s=f(t({transition:"middle"},s),{className:[s.className,"ssPushable"].join(" ")})),!R||(s=t({position:"absolute",top:0,left:0,right:0,bottom:0},s)),!_||(s=f(t({overflow:"hidden"},s),{freeCSS:t({whiteSpace:"nowrap",textOverflow:"ellipsis"},s.freeCSS)})),!p||(s=t({width:1,flexSizing:"none"},s)),!i||(s=t({display:"flex",horizontalAlign:"center",verticalAlign:"center"},s)),!P||(s=f(t({},s),{fontWeight:"1.light"})),!u||(s=f(t({},s),{fontWeight:"3.semiBold"})),!h||(s=f(t({},s),{fontWeight:"4.bold"})),!B||(s=f(t({},s),{borderRadius:"sphere"})),s},je=l=>{let P=ze(l),{componentID:e,UnderBreakPointStyles:n={},className:x="",freeCSS:m={},ssEffectsOnActive:b,ssLastChildLossBorder:R}=P,_=X(P,["componentID","UnderBreakPointStyles","className","freeCSS","ssEffectsOnActive","ssLastChildLossBorder"]),i=[x];if(R&&i.push("ssLastChildLossBorder_"+R),b){b=o.flatArray(b);for(let h of b)i.push("eff_"+h,"eff_"+h.split(".")[0])}{let h=r.ClassNames("amotf_",_);i.push(h.className),_=h.otherParams}n&&i.push(r.ClassNames("amotf_bp",n).className);let p=t({},_);return m&&(p.style=t(t({},m),p.style)),(e||p["data-component-id"])&&(p["data-component-id"]=p["data-component-id"]||e),i.length&&(p.className=i.join(" ").trim().replace(/%/ig,"P").replace(/\d+px/ig,"PIX").replace(/\s+/ig," ").replace(/\//ig,"_").replace(/\./ig,"-")),p};export{je as GenerateClassName,ze as ReadStyleSet};
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "../chunk-JJ3PEWPN.js";
6
+ import {
7
+ $$,
8
+ Config
9
+ } from "./_";
10
+ const FNs = {
11
+ toConcreteBorderRadius: (br) => {
12
+ let roundness = Config.get().roundness | 0;
13
+ if (br == "1.tone.primary") {
14
+ br = [0, 2, 3, 4, 5, 5][roundness];
15
+ } else if (br == "2.tone.secondary") {
16
+ br = [0, 1, 2, 3, 4, 5][roundness];
17
+ } else if (br == "3.tone.tertiary") {
18
+ br = [0, "1/3", "2/3", 1, 2, 3][roundness];
19
+ }
20
+ return br;
21
+ },
22
+ ev: (v) => $$.is.nullish(v),
23
+ ClassNames: (type, params) => {
24
+ var _b, _c, _d, _e, _f, _g, _h;
25
+ let CLS = [];
26
+ let _a = params, {
27
+ gap,
28
+ display: disp,
29
+ position,
30
+ overflow,
31
+ fontColor,
32
+ fontSize,
33
+ fontWeight,
34
+ backgroundColor: bgc,
35
+ textAlign,
36
+ boxShadow,
37
+ margin: mrg,
38
+ marginTop: mrgT,
39
+ marginRight: mrgR,
40
+ marginBottom: mrgB,
41
+ marginLeft: mrgL,
42
+ padding: pd,
43
+ paddingTop: pdT,
44
+ paddingRight: pdR,
45
+ paddingBottom: pdB,
46
+ paddingLeft: pdL,
47
+ top: T,
48
+ right: R,
49
+ bottom: B,
50
+ left: L,
51
+ border: b,
52
+ borderTop: bT,
53
+ borderRight: bR,
54
+ borderBottom: bB,
55
+ borderLeft: bL,
56
+ borderWidth: bWidth,
57
+ borderColor: bColor,
58
+ borderStyle: bStyle,
59
+ borderRadius: br,
60
+ borderTopLeftRadius: brTL,
61
+ borderTopRightRadius: brTR,
62
+ borderBottomLeftRadius: brBL,
63
+ borderBottomRightRadius: brBR,
64
+ flexSizing,
65
+ flexWrap,
66
+ flexType,
67
+ flexChilds,
68
+ flexGrid,
69
+ horizontalAlign,
70
+ verticalAlign,
71
+ transition,
72
+ gridCenter,
73
+ gridCols,
74
+ maxHeight,
75
+ minHeight,
76
+ maxWidth,
77
+ minWidth,
78
+ width,
79
+ height,
80
+ unitHeight,
81
+ unitWidth,
82
+ opacity
83
+ } = _a, others = __objRest(_a, [
84
+ "gap",
85
+ "display",
86
+ "position",
87
+ "overflow",
88
+ "fontColor",
89
+ "fontSize",
90
+ "fontWeight",
91
+ "backgroundColor",
92
+ "textAlign",
93
+ "boxShadow",
94
+ "margin",
95
+ "marginTop",
96
+ "marginRight",
97
+ "marginBottom",
98
+ "marginLeft",
99
+ "padding",
100
+ "paddingTop",
101
+ "paddingRight",
102
+ "paddingBottom",
103
+ "paddingLeft",
104
+ "top",
105
+ "right",
106
+ "bottom",
107
+ "left",
108
+ "border",
109
+ "borderTop",
110
+ "borderRight",
111
+ "borderBottom",
112
+ "borderLeft",
113
+ "borderWidth",
114
+ // borderTopWidth: bTWidth,
115
+ // borderRightWidth: bRWidth,
116
+ // borderBottomWidth: bBWidth,
117
+ // borderLeftWidth: bLWidth,
118
+ "borderColor",
119
+ // borderTopColor: bTColor,
120
+ // borderRightColor: bRColor,
121
+ // borderBottomColor: bBColor,
122
+ // borderLeftColor: bLColor,
123
+ "borderStyle",
124
+ // borderTopStyle: bTStyle,
125
+ // borderRightStyle: bRStyle,
126
+ // borderBottomStyle: bBStyle,
127
+ // borderLeftStyle: bLStyle,
128
+ "borderRadius",
129
+ "borderTopLeftRadius",
130
+ "borderTopRightRadius",
131
+ "borderBottomLeftRadius",
132
+ "borderBottomRightRadius",
133
+ "flexSizing",
134
+ "flexWrap",
135
+ "flexType",
136
+ "flexChilds",
137
+ "flexGrid",
138
+ "horizontalAlign",
139
+ "verticalAlign",
140
+ "transition",
141
+ "gridCenter",
142
+ "gridCols",
143
+ "maxHeight",
144
+ "minHeight",
145
+ "maxWidth",
146
+ "minWidth",
147
+ "width",
148
+ "height",
149
+ "unitHeight",
150
+ "unitWidth",
151
+ "opacity"
152
+ ]);
153
+ {
154
+ FNs.ev(disp) || CLS.push("dsp" + disp);
155
+ if (overflow) {
156
+ let arr = $$.flatArray(overflow);
157
+ CLS.push("ovfl-x-" + arr[0]);
158
+ CLS.push("ovfl-y-" + (arr[1] || arr[0]));
159
+ }
160
+ FNs.ev(position) || CLS.push("ps" + position);
161
+ FNs.ev(textAlign) || CLS.push("txalg" + textAlign);
162
+ FNs.ev(fontColor) || CLS.push("ftcl" + ((_b = String(fontColor)) == null ? void 0 : _b.replace(/\..*/, "")));
163
+ FNs.ev(fontSize) || CLS.push("ftsz" + ((_c = String(fontSize)) == null ? void 0 : _c.replace(/\..*/, "")));
164
+ FNs.ev(fontWeight) || CLS.push("ftwt" + (fontWeight == null ? void 0 : fontWeight.replace(/\..*/, "")));
165
+ FNs.ev(bgc) || CLS.push("bgc" + ((_d = String(bgc)) == null ? void 0 : _d.replace(/\..*/, "")));
166
+ FNs.ev(boxShadow) || CLS.push("bs" + boxShadow);
167
+ let _mrgT, _mrgR, _mrgB, _mrgL;
168
+ if ($$.is.exist(mrg)) {
169
+ if ($$.is.array(mrg)) {
170
+ if (mrg.length == 2)
171
+ [_mrgT, _mrgR, _mrgB, _mrgL] = [...mrg, ...mrg];
172
+ else if (mrg.length == 4)
173
+ [_mrgT, _mrgR, _mrgB, _mrgL] = mrg;
174
+ } else
175
+ _mrgT = _mrgR = _mrgB = _mrgL = mrg;
176
+ mrgT = mrgT != null ? mrgT : _mrgT;
177
+ mrgR = mrgR != null ? mrgR : _mrgR;
178
+ mrgB = mrgB != null ? mrgB : _mrgB;
179
+ mrgL = mrgL != null ? mrgL : _mrgL;
180
+ }
181
+ FNs.ev(mrgT) || CLS.push("mrgt" + mrgT);
182
+ FNs.ev(mrgR) || CLS.push("mrgr" + mrgR);
183
+ FNs.ev(mrgB) || CLS.push("mrgb" + mrgB);
184
+ FNs.ev(mrgL) || CLS.push("mrgl" + mrgL);
185
+ let _pdT, _pdR, _pdB, _pdL;
186
+ if ($$.is.exist(pd)) {
187
+ if ($$.is.array(pd)) {
188
+ if (pd.length == 2)
189
+ [_pdT, _pdR, _pdB, _pdL] = [...pd, ...pd];
190
+ else if (pd.length == 4)
191
+ [_pdT, _pdR, _pdB, _pdL] = pd;
192
+ } else
193
+ _pdT = _pdR = _pdB = _pdL = pd;
194
+ pdT = pdT != null ? pdT : _pdT;
195
+ pdR = pdR != null ? pdR : _pdR;
196
+ pdB = pdB != null ? pdB : _pdB;
197
+ pdL = pdL != null ? pdL : _pdL;
198
+ }
199
+ FNs.ev(pdT) || CLS.push("pdt" + pdT);
200
+ FNs.ev(pdR) || CLS.push("pdr" + pdR);
201
+ FNs.ev(pdB) || CLS.push("pdb" + pdB);
202
+ FNs.ev(pdL) || CLS.push("pdl" + pdL);
203
+ FNs.ev(T) || CLS.push("pstt" + T);
204
+ FNs.ev(R) || CLS.push("pstr" + R);
205
+ FNs.ev(B) || CLS.push("pstb" + B);
206
+ FNs.ev(L) || CLS.push("pstl" + L);
207
+ {
208
+ {
209
+ if ($$.is.exist(b)) {
210
+ bT = bT != null ? bT : b;
211
+ bR = bR != null ? bR : b;
212
+ bB = bB != null ? bB : b;
213
+ bL = bL != null ? bL : b;
214
+ }
215
+ if ($$.is.boolean(bT))
216
+ bT = ["unset", "2.normal"][Number(bT)];
217
+ if ($$.is.boolean(bR))
218
+ bR = ["unset", "2.normal"][Number(bR)];
219
+ if ($$.is.boolean(bB))
220
+ bB = ["unset", "2.normal"][Number(bB)];
221
+ if ($$.is.boolean(bL))
222
+ bL = ["unset", "2.normal"][Number(bL)];
223
+ FNs.ev(bT) || CLS.push("b_t_ss" + ((_e = String(bT)) == null ? void 0 : _e.replace(/\..*/, "")));
224
+ FNs.ev(bR) || CLS.push("b_r_ss" + ((_f = String(bR)) == null ? void 0 : _f.replace(/\..*/, "")));
225
+ FNs.ev(bB) || CLS.push("b_b_ss" + ((_g = String(bB)) == null ? void 0 : _g.replace(/\..*/, "")));
226
+ FNs.ev(bL) || CLS.push("b_l_ss" + ((_h = String(bL)) == null ? void 0 : _h.replace(/\..*/, "")));
227
+ }
228
+ if ($$.is.exist(bWidth))
229
+ CLS.push("b_wth" + String(bWidth));
230
+ if ($$.is.exist(bColor))
231
+ CLS.push("b_cl" + String(bColor));
232
+ if ($$.is.exist(bStyle))
233
+ CLS.push("b_st" + String(bStyle));
234
+ {
235
+ let _brTL, _brTR, _brBL, _brBR;
236
+ if ($$.is.exist(br)) {
237
+ if ($$.is.array(br)) {
238
+ if (br.length == 4)
239
+ [_brTL, _brTR, _brBR, _brBL] = br;
240
+ } else {
241
+ _brTL = _brTR = _brBL = _brBR = br;
242
+ }
243
+ brTL = brTL != null ? brTL : _brTL;
244
+ brTR = brTR != null ? brTR : _brTR;
245
+ brBL = brBL != null ? brBL : _brBL;
246
+ brBR = brBR != null ? brBR : _brBR;
247
+ }
248
+ }
249
+ FNs.ev(brTL) || CLS.push("br_tl" + FNs.toConcreteBorderRadius(brTL));
250
+ FNs.ev(brTR) || CLS.push("br_tr" + FNs.toConcreteBorderRadius(brTR));
251
+ FNs.ev(brBL) || CLS.push("br_bl" + FNs.toConcreteBorderRadius(brBL));
252
+ FNs.ev(brBR) || CLS.push("br_br" + FNs.toConcreteBorderRadius(brBR));
253
+ }
254
+ FNs.ev(opacity) || CLS.push("op" + opacity);
255
+ if ($$.is.exist(gap)) {
256
+ let gapRow, gapCol;
257
+ if ($$.is.array(gap))
258
+ gapRow = gap[0], gapCol = gap[1];
259
+ else
260
+ gapRow = gapCol = gap;
261
+ CLS.push(...["gapRow" + gapRow, "gapCol" + gapCol]);
262
+ }
263
+ FNs.ev(flexSizing) || CLS.push("flsz" + flexSizing);
264
+ FNs.ev(flexWrap) || CLS.push("flwrp" + flexWrap);
265
+ FNs.ev(flexType) || CLS.push("fltyp" + flexType);
266
+ FNs.ev(flexChilds) || CLS.push("flchld" + flexChilds);
267
+ FNs.ev(flexGrid) || CLS.push("flgrid" + flexGrid);
268
+ FNs.ev(verticalAlign) || CLS.push("flvrt" + verticalAlign);
269
+ FNs.ev(horizontalAlign) || CLS.push("flhrz" + horizontalAlign);
270
+ FNs.ev(gridCenter) || CLS.push("grcnt" + gridCenter);
271
+ FNs.ev(gridCols) || CLS.push("grcol" + gridCols);
272
+ FNs.ev(height) || CLS.push("hgt" + height);
273
+ FNs.ev(width) || CLS.push("wdt" + width);
274
+ FNs.ev(unitHeight) || CLS.push("unthgt" + unitHeight);
275
+ FNs.ev(unitWidth) || CLS.push("untwdt" + unitWidth);
276
+ FNs.ev(transition) || CLS.push("trnst" + transition);
277
+ FNs.ev(maxHeight) || CLS.push("maxh" + maxHeight);
278
+ FNs.ev(minHeight) || CLS.push("minh" + minHeight);
279
+ FNs.ev(maxWidth) || CLS.push("maxw" + maxWidth);
280
+ FNs.ev(minWidth) || CLS.push("minw" + minWidth);
281
+ }
282
+ return {
283
+ otherParams: others,
284
+ className: CLS.length ? type + CLS.join(" " + type) : ""
285
+ };
286
+ }
287
+ };
288
+ const ReadStyleSet = (rawParams) => {
289
+ let params = __spreadValues({}, rawParams);
290
+ let _a = params, {
291
+ gradients,
292
+ ssCardBox,
293
+ ssSphere,
294
+ ssSquare,
295
+ ssPushable,
296
+ ssAbsoluteCovered,
297
+ ssTextEllipsis,
298
+ flexCenter,
299
+ flexNewLine,
300
+ isLightFont,
301
+ isBoldFont,
302
+ isSemiBoldFont,
303
+ isRounded
304
+ } = _a, ReturnParams = __objRest(_a, [
305
+ "gradients",
306
+ "ssCardBox",
307
+ "ssSphere",
308
+ "ssSquare",
309
+ "ssPushable",
310
+ "ssAbsoluteCovered",
311
+ "ssTextEllipsis",
312
+ "flexCenter",
313
+ "flexNewLine",
314
+ "isLightFont",
315
+ "isBoldFont",
316
+ "isSemiBoldFont",
317
+ "isRounded"
318
+ ]);
319
+ if (gradients) {
320
+ let {
321
+ deg,
322
+ colors
323
+ } = gradients;
324
+ ReturnParams = __spreadProps(__spreadValues({}, ReturnParams), {
325
+ freeCSS: __spreadProps(__spreadValues({}, ReturnParams.freeCSS), {
326
+ background: `linear-gradient(${deg}deg,${colors.join(",")})`
327
+ })
328
+ });
329
+ }
330
+ if (ssCardBox) {
331
+ if (ssCardBox === true) {
332
+ ssCardBox = "border";
333
+ }
334
+ let exStyles = {
335
+ backgroundColor: "1.layer.base",
336
+ borderRadius: "1.tone.primary",
337
+ boxShadow: "0.thin",
338
+ freeCSS: {
339
+ zIndex: 1
340
+ }
341
+ };
342
+ if (ssCardBox == "border") {
343
+ exStyles.border = true;
344
+ } else if (ssCardBox == "layer") {
345
+ exStyles.backgroundColor = "1.layer.base";
346
+ } else if (ssCardBox == "cloud") {
347
+ exStyles.backgroundColor = "cloud";
348
+ } else if (ssCardBox == "shadow") {
349
+ exStyles.boxShadow = "0.normal";
350
+ }
351
+ if (["dim", "dark"].includes(Config.get().darkMode))
352
+ exStyles.boxShadow = "1.remark";
353
+ ReturnParams = __spreadProps(__spreadValues(__spreadValues({}, exStyles), ReturnParams), {
354
+ freeCSS: __spreadValues(__spreadValues({}, exStyles.freeCSS), ReturnParams.freeCSS),
355
+ UnderBreakPointStyles: __spreadValues(__spreadValues({}, exStyles.UnderBreakPointStyles), ReturnParams.UnderBreakPointStyles)
356
+ });
357
+ }
358
+ if (ssSphere) {
359
+ flexCenter = flexCenter != null ? flexCenter : true;
360
+ ReturnParams = __spreadValues({
361
+ padding: 0,
362
+ unitWidth: ssSphere,
363
+ unitHeight: ssSphere,
364
+ borderRadius: "sphere",
365
+ flexSizing: "none"
366
+ }, ReturnParams);
367
+ }
368
+ if (ssSquare) {
369
+ flexCenter = flexCenter != null ? flexCenter : true;
370
+ ReturnParams = __spreadValues({
371
+ padding: 0,
372
+ unitWidth: ssSquare,
373
+ unitHeight: ssSquare,
374
+ flexSizing: "none"
375
+ }, ReturnParams);
376
+ }
377
+ !ssPushable || (ReturnParams = __spreadProps(__spreadValues({
378
+ transition: "middle"
379
+ }, ReturnParams), {
380
+ className: [
381
+ ReturnParams.className,
382
+ "ssPushable"
383
+ ].join(" ")
384
+ }));
385
+ !ssAbsoluteCovered || (ReturnParams = __spreadValues({
386
+ position: "absolute",
387
+ top: 0,
388
+ left: 0,
389
+ right: 0,
390
+ bottom: 0
391
+ }, ReturnParams));
392
+ !ssTextEllipsis || (ReturnParams = __spreadProps(__spreadValues({
393
+ overflow: "hidden"
394
+ }, ReturnParams), {
395
+ freeCSS: __spreadValues({
396
+ whiteSpace: "nowrap",
397
+ textOverflow: "ellipsis"
398
+ }, ReturnParams.freeCSS)
399
+ }));
400
+ !flexNewLine || (ReturnParams = __spreadValues({
401
+ width: 1,
402
+ flexSizing: "none"
403
+ }, ReturnParams));
404
+ !flexCenter || (ReturnParams = __spreadValues({
405
+ display: "flex",
406
+ horizontalAlign: "center",
407
+ verticalAlign: "center"
408
+ }, ReturnParams));
409
+ !isLightFont || (ReturnParams = __spreadProps(__spreadValues({}, ReturnParams), {
410
+ fontWeight: "1.light"
411
+ }));
412
+ !isSemiBoldFont || (ReturnParams = __spreadProps(__spreadValues({}, ReturnParams), {
413
+ fontWeight: "3.semiBold"
414
+ }));
415
+ !isBoldFont || (ReturnParams = __spreadProps(__spreadValues({}, ReturnParams), {
416
+ fontWeight: "4.bold"
417
+ }));
418
+ !isRounded || (ReturnParams = __spreadProps(__spreadValues({}, ReturnParams), {
419
+ borderRadius: "sphere"
420
+ }));
421
+ return ReturnParams;
422
+ };
423
+ const GenerateClassName = (rawParams) => {
424
+ let params = ReadStyleSet(rawParams);
425
+ let _a = params, {
426
+ componentID,
427
+ UnderBreakPointStyles = {},
428
+ className = "",
429
+ freeCSS = {},
430
+ ssEffectsOnActive,
431
+ ssLastChildLossBorder
432
+ } = _a, others = __objRest(_a, [
433
+ "componentID",
434
+ "UnderBreakPointStyles",
435
+ "className",
436
+ "freeCSS",
437
+ "ssEffectsOnActive",
438
+ "ssLastChildLossBorder"
439
+ ]);
440
+ let ClassNames = [className];
441
+ if (ssLastChildLossBorder) {
442
+ ClassNames.push("ssLastChildLossBorder_" + ssLastChildLossBorder);
443
+ }
444
+ if (ssEffectsOnActive) {
445
+ ssEffectsOnActive = $$.flatArray(ssEffectsOnActive);
446
+ for (let effect of ssEffectsOnActive)
447
+ ClassNames.push(...["eff_" + effect, "eff_" + effect.split(".")[0]]);
448
+ }
449
+ {
450
+ let result = FNs.ClassNames("amotf_", others);
451
+ ClassNames.push(result.className);
452
+ others = result.otherParams;
453
+ }
454
+ if (UnderBreakPointStyles)
455
+ ClassNames.push(FNs.ClassNames("amotf_bp", UnderBreakPointStyles).className);
456
+ let states = __spreadValues({}, others);
457
+ if (freeCSS)
458
+ states.style = __spreadValues(__spreadValues({}, freeCSS), states.style);
459
+ if (componentID || states["data-component-id"]) {
460
+ states["data-component-id"] = states["data-component-id"] || componentID;
461
+ }
462
+ if (ClassNames.length) {
463
+ states.className = ClassNames.join(" ").trim().replace(/%/ig, "P").replace(/\d+px/ig, "PIX").replace(/\s+/ig, " ").replace(/\//ig, "_").replace(/\./ig, "-");
464
+ }
465
+ return states;
466
+ };
467
+ export {
468
+ GenerateClassName,
469
+ ReadStyleSet
470
+ };
@@ -1 +1,78 @@
1
- import"../chunk-VY3566IV.js";import{Fragment as R,jsx as e,jsxs as f}from"react/jsx-runtime";import{$$ as a,Config as o}from"./_";import l from"react";import M from"react-dom/client";import*as y from"react-router-dom";import A from"./useRecycle";import E from"../atoms/Box";import b from"../fn/Sheet";import k from"../fn/Snackbar";import x from"../fn/Loader/_";import d from"../fn/Effect/_";const I=t=>{let r=A.set("RootViewController_"+o.get().sessionUID);return l.createElement("amotify-app",{id:"appRoot_"+o.get().sessionUID},f(R,{children:[e(d.Pudding.Wrapper,{}),e(d.Ripple.Wrapper,{}),e(x.Wrapper,{}),e(k.Wrapper,{}),e(b.Wrapper,{}),e(E,{className:`AMOTIFY_be AMOTIFY_be_root ${t.originClassName}`,children:e(y.BrowserRouter,{children:t.children},r)})]}))},c=t=>{let{shadowRoot:r,baseElement:u,reactElement:n,inlineCSS:h,originClassName:C="AMOTIFY_be_origin",appearances:g}=t,s=a(u);if(!s[0]||!n)return;r&&o.update.appRoot(r);let{roundness:i,themeColor:p,darkMode:m}=g||{};a.is.exist(i)&&o.update.roundness(i),a.is.exist(p)&&o.update.themeColor(p),a.is.exist(m)&&o.update.darkMode(m),M.createRoot(s[0]).render(f(R,{children:[e("style",{children:h}),e(I,{originClassName:C,children:n})]}))};export{c as LaunchReactApp,l as React,c as default};
1
+ import "../chunk-JJ3PEWPN.js";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import {
4
+ $$,
5
+ Config
6
+ } from "./_";
7
+ import React from "react";
8
+ import defaultReactDOMClient from "react-dom/client";
9
+ import * as ReactRouterDOM from "react-router-dom";
10
+ import useRecycle from "./useRecycle";
11
+ import Box from "../atoms/Box";
12
+ import Sheet from "../fn/Sheet";
13
+ import Snackbar from "../fn/Snackbar";
14
+ import Loader from "../fn/Loader/_";
15
+ import Effect from "../fn/Effect/_";
16
+ const AmotifyRoot = (params) => {
17
+ let Key = useRecycle.set("RootViewController_" + Config.get().sessionUID);
18
+ return React.createElement(
19
+ "amotify-app",
20
+ {
21
+ id: "appRoot_" + Config.get().sessionUID
22
+ },
23
+ /* @__PURE__ */ jsxs(Fragment, { children: [
24
+ /* @__PURE__ */ jsx(Effect.Pudding.Wrapper, {}),
25
+ /* @__PURE__ */ jsx(Effect.Ripple.Wrapper, {}),
26
+ /* @__PURE__ */ jsx(Loader.Wrapper, {}),
27
+ /* @__PURE__ */ jsx(Snackbar.Wrapper, {}),
28
+ /* @__PURE__ */ jsx(Sheet.Wrapper, {}),
29
+ /* @__PURE__ */ jsx(Box, { className: `AMOTIFY_be AMOTIFY_be_root ${params.originClassName}`, children: /* @__PURE__ */ jsx(
30
+ ReactRouterDOM.BrowserRouter,
31
+ {
32
+ children: params.children
33
+ },
34
+ Key
35
+ ) })
36
+ ] })
37
+ );
38
+ };
39
+ const LaunchReactApp = (params) => {
40
+ let {
41
+ shadowRoot,
42
+ baseElement,
43
+ reactElement,
44
+ inlineCSS,
45
+ originClassName = "AMOTIFY_be_origin",
46
+ appearances
47
+ } = params;
48
+ let base = $$(baseElement);
49
+ if (!base[0])
50
+ return;
51
+ if (!reactElement)
52
+ return;
53
+ if (shadowRoot)
54
+ Config.update.appRoot(shadowRoot);
55
+ let {
56
+ roundness,
57
+ themeColor,
58
+ darkMode
59
+ } = appearances || {};
60
+ $$.is.exist(roundness) && Config.update.roundness(roundness);
61
+ $$.is.exist(themeColor) && Config.update.themeColor(themeColor);
62
+ $$.is.exist(darkMode) && Config.update.darkMode(darkMode);
63
+ defaultReactDOMClient.createRoot(base[0]).render(/* @__PURE__ */ jsxs(Fragment, { children: [
64
+ /* @__PURE__ */ jsx("style", { children: inlineCSS }),
65
+ /* @__PURE__ */ jsx(
66
+ AmotifyRoot,
67
+ {
68
+ originClassName,
69
+ children: reactElement
70
+ }
71
+ )
72
+ ] }));
73
+ };
74
+ export {
75
+ LaunchReactApp,
76
+ React,
77
+ LaunchReactApp as default
78
+ };
package/dist/@utils/_.js CHANGED
@@ -1 +1,12 @@
1
- export*from"../@declaration/_";export*from"./jsminEx";export*from"./config";export*from"./useStore";export*from"./useRecycle";export*from"./collectForm";export*from"./pageTransit";export*from"./color";export*from"./GenerateClassName";export*from"./LaunchReactApp";export*from"./getElement";export*from"./fin";
1
+ export * from "../@declaration/_";
2
+ export * from "./jsminEx";
3
+ export * from "./config";
4
+ export * from "./useStore";
5
+ export * from "./useRecycle";
6
+ export * from "./collectForm";
7
+ export * from "./pageTransit";
8
+ export * from "./color";
9
+ export * from "./GenerateClassName";
10
+ export * from "./LaunchReactApp";
11
+ export * from "./getElement";
12
+ export * from "./fin";
@@ -1 +1,96 @@
1
- import{e as m}from"../chunk-VY3566IV.js";import u from"@mingoo/jsmin";import b from"./useStore";let f=!1;const d=h=>m(void 0,null,function*(){if(f)return{valid:!1,data:{}};let c=document.activeElement;c&&c.blur(),f=!0;let s=u(`[data-form="${h}"]`),o=1,n={};for(let i=0;i<s.length;i++){let N=s[i],{componentId:O=""}=N.dataset,a=b.get(O);a&&a.Refresh&&(yield a.Refresh());let{value:F,name:r,checked:S,dataset:{value:y,name:J="",inputType:t="",validation:l}}=s[i],e=y;r=r||J,l=+((l!=null?l:"true")=="true"),t=="hidden"?e&&(e=JSON.parse(e)):["radio","checkbox","checker"].includes(t)?e&&(e=JSON.parse(e),u.is.array(e)?e=e.map(p=>JSON.parse(p)):e=JSON.parse(e),t=="radio"&&(e=e[0]),t=="checker"&&(e=!!e[0])):["chips-single","chips-multi"].includes(t)?(e=JSON.parse(e),e.length&&t=="chips-single"&&(e=e[0])):t=="time"||t=="select"||t=="richSelect"?e&&(e=JSON.parse(e)):t=="file"?a&&(e=a.Files):t=="slider"?e&&(e=JSON.parse(e)):t=="switch"&&(e=S|0);let g=(l!=null?l:1)|0;o&=g,l&&(n[r]=e)}return f=!1,{valid:!!o,data:n}});export{d as collectForm,d as default};
1
+ import {
2
+ __async
3
+ } from "../chunk-JJ3PEWPN.js";
4
+ import $$ from "@mingoo/jsmin";
5
+ import useStore from "./useStore";
6
+ let formProcess = false;
7
+ const collectForm = (form) => __async(void 0, null, function* () {
8
+ if (formProcess)
9
+ return {
10
+ valid: false,
11
+ data: {}
12
+ };
13
+ let focusElement = document.activeElement;
14
+ if (focusElement)
15
+ focusElement.blur();
16
+ formProcess = true;
17
+ let Inputs = $$(`[data-form="${form}"]`), totalValid = 1, Values = {};
18
+ for (let index = 0; index < Inputs.length; index++) {
19
+ let Input = Inputs[index];
20
+ let { componentId = "" } = Input.dataset;
21
+ let componentData = useStore.get(componentId);
22
+ if (componentData && componentData.Refresh)
23
+ yield componentData.Refresh();
24
+ let {
25
+ value: displayValue,
26
+ name,
27
+ checked,
28
+ dataset: {
29
+ value,
30
+ name: dataName = "",
31
+ inputType = "",
32
+ validation
33
+ }
34
+ } = Inputs[index];
35
+ let Value = value;
36
+ name = name || dataName;
37
+ validation = Number((validation != null ? validation : "true") == "true");
38
+ if (inputType == "hidden") {
39
+ if (Value)
40
+ Value = JSON.parse(Value);
41
+ } else if (["radio", "checkbox", "checker"].includes(inputType)) {
42
+ if (Value) {
43
+ Value = JSON.parse(Value);
44
+ if ($$.is.array(Value)) {
45
+ Value = Value.map((v) => JSON.parse(v));
46
+ } else {
47
+ Value = JSON.parse(Value);
48
+ }
49
+ if (inputType == "radio") {
50
+ Value = Value[0];
51
+ }
52
+ if (inputType == "checker") {
53
+ Value = Boolean(Value[0]);
54
+ }
55
+ }
56
+ } else if (["chips-single", "chips-multi"].includes(inputType)) {
57
+ Value = JSON.parse(Value);
58
+ if (Value.length) {
59
+ if (inputType == "chips-single")
60
+ Value = Value[0];
61
+ }
62
+ } else if (inputType == "time") {
63
+ if (Value)
64
+ Value = JSON.parse(Value);
65
+ } else if (inputType == "select") {
66
+ if (Value)
67
+ Value = JSON.parse(Value);
68
+ } else if (inputType == "richSelect") {
69
+ if (Value)
70
+ Value = JSON.parse(Value);
71
+ } else if (inputType == "file") {
72
+ if (componentData) {
73
+ let files = componentData.Files;
74
+ Value = files;
75
+ }
76
+ } else if (inputType == "slider") {
77
+ if (Value)
78
+ Value = JSON.parse(Value);
79
+ } else if (inputType == "switch") {
80
+ Value = checked | 0;
81
+ }
82
+ let valid = (validation != null ? validation : 1) | 0;
83
+ totalValid &= valid;
84
+ if (validation)
85
+ Values[name] = Value;
86
+ }
87
+ formProcess = false;
88
+ return {
89
+ valid: Boolean(totalValid),
90
+ data: Values
91
+ };
92
+ });
93
+ export {
94
+ collectForm,
95
+ collectForm as default
96
+ };