amotify 0.0.4 → 0.0.5

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 (186) hide show
  1. package/package.json +1 -1
  2. package/public/amotify.js +1 -0
  3. package/public/amotify.min.css +24 -0
  4. package/dist/src/@jsminAmotifyExtension/_.d.ts +0 -4
  5. package/dist/src/@jsminAmotifyExtension/fetch.d.ts +0 -9
  6. package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +0 -1
  7. package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +0 -4
  8. package/dist/src/@jsminAmotifyExtension/variables.d.ts +0 -0
  9. package/dist/src/@types/_.d.ts +0 -6
  10. package/dist/src/@types/amot.d.ts +0 -260
  11. package/dist/src/@types/fn.d.ts +0 -1040
  12. package/dist/src/@types/index.d.ts +0 -62
  13. package/dist/src/@types/jsminAmotifyExtension.d.ts +0 -134
  14. package/dist/src/@types/module.d.ts +0 -2
  15. package/dist/src/@types/state.d.ts +0 -145
  16. package/dist/src/Atoms/@export.d.ts +0 -4
  17. package/dist/src/Atoms/FAIcon/parts.d.ts +0 -2
  18. package/dist/src/Atoms/Logo/parts.d.ts +0 -1
  19. package/dist/src/Atoms/Various/parts.d.ts +0 -9
  20. package/dist/src/Functions/@export.d.ts +0 -12
  21. package/dist/src/Functions/Button/_.d.ts +0 -1
  22. package/dist/src/Functions/Cropper/parts.d.ts +0 -1
  23. package/dist/src/Functions/Effects/Fade.d.ts +0 -1
  24. package/dist/src/Functions/Effects/Ripple.d.ts +0 -1
  25. package/dist/src/Functions/Effects/_.d.ts +0 -3
  26. package/dist/src/Functions/Input/Chips/Selector.d.ts +0 -1
  27. package/dist/src/Functions/Input/Chips/_.d.ts +0 -2
  28. package/dist/src/Functions/Input/DigitCharacters.d.ts +0 -1
  29. package/dist/src/Functions/Input/File/_.d.ts +0 -2
  30. package/dist/src/Functions/Input/Hidden.d.ts +0 -1
  31. package/dist/src/Functions/Input/List/_.d.ts +0 -1
  32. package/dist/src/Functions/Input/Segmented/_.d.ts +0 -1
  33. package/dist/src/Functions/Input/Select/_.d.ts +0 -1
  34. package/dist/src/Functions/Input/Slider/_.d.ts +0 -1
  35. package/dist/src/Functions/Input/Switch/_.d.ts +0 -1
  36. package/dist/src/Functions/Input/Text.d.ts +0 -5
  37. package/dist/src/Functions/Input/TextArea.d.ts +0 -1
  38. package/dist/src/Functions/Input/Time/Picker.d.ts +0 -1
  39. package/dist/src/Functions/Input/Time/_.d.ts +0 -2
  40. package/dist/src/Functions/Input/_.d.ts +0 -5
  41. package/dist/src/Functions/Input/core.d.ts +0 -34
  42. package/dist/src/Functions/Inputs/_.d.ts +0 -3
  43. package/dist/src/Functions/Inputs/text.d.ts +0 -12
  44. package/dist/src/Functions/Layout/PageNotFound.d.ts +0 -1
  45. package/dist/src/Functions/Layout/PageRouter.d.ts +0 -2
  46. package/dist/src/Functions/Layout/PageViewController/parts.d.ts +0 -1
  47. package/dist/src/Functions/Layout/Plate.d.ts +0 -1
  48. package/dist/src/Functions/Layout/RootViewController/parts.d.ts +0 -1
  49. package/dist/src/Functions/Layout/SwipeView/parts.d.ts +0 -2
  50. package/dist/src/Functions/Layout/TabBar.d.ts +0 -1
  51. package/dist/src/Functions/Layout/_.d.ts +0 -2
  52. package/dist/src/Functions/Loader/corner.d.ts +0 -1
  53. package/dist/src/Functions/Loader/mini.d.ts +0 -33
  54. package/dist/src/Functions/Loader/parts.d.ts +0 -3
  55. package/dist/src/Functions/Loader/top.d.ts +0 -1
  56. package/dist/src/Functions/Sheet/parts.d.ts +0 -2
  57. package/dist/src/Functions/SnackBar/parts.d.ts +0 -2
  58. package/dist/src/Functions/Table/Data/parts.d.ts +0 -3
  59. package/dist/src/Functions/Table/Drag/parts.d.ts +0 -1
  60. package/dist/src/Functions/Table/Normal/parts.d.ts +0 -1
  61. package/dist/src/Functions/Table/_.d.ts +0 -9
  62. package/dist/src/Functions/Tooltips/parts.d.ts +0 -2
  63. package/dist/src/Global/@export.d.ts +0 -12
  64. package/dist/src/Global/LaunchReactApplication.d.ts +0 -1
  65. package/dist/src/Global/styleConverter.d.ts +0 -2
  66. package/dist/src/Molecules/@export.d.ts +0 -21
  67. package/dist/src/Molecules/Accordion/parts.d.ts +0 -2
  68. package/dist/src/Molecules/LinkifyText/parts.d.ts +0 -1
  69. package/dist/src/Molecules/List.d.ts +0 -1
  70. package/dist/src/Organisms/@export.d.ts +0 -2
  71. package/dist/src/Organisms/DisplayStyleInput/_.d.ts +0 -1
  72. package/dist/src/Organisms/DisplayStyleInput/darkmode.d.ts +0 -1
  73. package/dist/src/Organisms/DisplayStyleInput/themeColor.d.ts +0 -27
  74. package/dist/src/Templates/@export.d.ts +0 -2
  75. package/dist/src/Templates/PlayGround/parts.d.ts +0 -1
  76. package/dist/src/config.d.ts +0 -16
  77. package/dist/src/launch.d.ts +0 -9
  78. package/dist/src/preload.d.ts +0 -1
  79. package/src/@jsminAmotifyExtension/_.tsx +0 -4
  80. package/src/@jsminAmotifyExtension/fetch.tsx +0 -107
  81. package/src/@jsminAmotifyExtension/formCollect.tsx +0 -89
  82. package/src/@jsminAmotifyExtension/spreadSheet.tsx +0 -159
  83. package/src/@jsminAmotifyExtension/variables.tsx +0 -130
  84. package/src/@styles/@app.scss +0 -4
  85. package/src/@styles/@variables/customProps.scss +0 -109
  86. package/src/@styles/@variables/styleSet.scss +0 -38
  87. package/src/@styles/@variables/themeColor.scss +0 -71
  88. package/src/@styles/@variables/var.scss +0 -171
  89. package/src/@styles/UniStyling.scss +0 -996
  90. package/src/@styles/init.scss +0 -154
  91. package/src/@types/_.tsx +0 -6
  92. package/src/@types/amot.tsx +0 -323
  93. package/src/@types/fn.tsx +0 -1210
  94. package/src/@types/index.tsx +0 -74
  95. package/src/@types/jsminAmotifyExtension.tsx +0 -143
  96. package/src/@types/module.tsx +0 -2
  97. package/src/@types/state.tsx +0 -199
  98. package/src/Atoms/@export.tsx +0 -32
  99. package/src/Atoms/FAIcon/parts.tsx +0 -117
  100. package/src/Atoms/FAIcon/style.module.scss +0 -9
  101. package/src/Atoms/Logo/parts.tsx +0 -335
  102. package/src/Atoms/Logo/style.module.scss +0 -96
  103. package/src/Atoms/Various/parts.tsx +0 -157
  104. package/src/Atoms/Various/style.module.scss +0 -40
  105. package/src/Functions/@export.tsx +0 -29
  106. package/src/Functions/Button/_.tsx +0 -305
  107. package/src/Functions/Button/style.module.scss +0 -183
  108. package/src/Functions/Cropper/parts.tsx +0 -1061
  109. package/src/Functions/Cropper/style.module.scss +0 -62
  110. package/src/Functions/Effects/Fade.tsx +0 -81
  111. package/src/Functions/Effects/Ripple.tsx +0 -141
  112. package/src/Functions/Effects/_.tsx +0 -33
  113. package/src/Functions/Effects/style.module.scss +0 -83
  114. package/src/Functions/Input/Chips/Selector.tsx +0 -451
  115. package/src/Functions/Input/Chips/_.tsx +0 -286
  116. package/src/Functions/Input/Chips/style.module.scss +0 -6
  117. package/src/Functions/Input/DigitCharacters.tsx +0 -241
  118. package/src/Functions/Input/File/_.tsx +0 -596
  119. package/src/Functions/Input/File/style.module.scss +0 -34
  120. package/src/Functions/Input/Hidden.tsx +0 -18
  121. package/src/Functions/Input/List/_.tsx +0 -383
  122. package/src/Functions/Input/List/style.module.scss +0 -84
  123. package/src/Functions/Input/Segmented/_.tsx +0 -238
  124. package/src/Functions/Input/Segmented/style.module.scss +0 -81
  125. package/src/Functions/Input/Select/_.tsx +0 -225
  126. package/src/Functions/Input/Select/style.module.scss +0 -10
  127. package/src/Functions/Input/Slider/_.tsx +0 -519
  128. package/src/Functions/Input/Slider/style.module.scss +0 -67
  129. package/src/Functions/Input/Switch/_.tsx +0 -177
  130. package/src/Functions/Input/Switch/style.module.scss +0 -18
  131. package/src/Functions/Input/Text.tsx +0 -437
  132. package/src/Functions/Input/TextArea.tsx +0 -115
  133. package/src/Functions/Input/Time/Picker.tsx +0 -950
  134. package/src/Functions/Input/Time/_.tsx +0 -736
  135. package/src/Functions/Input/Time/style.module.scss +0 -72
  136. package/src/Functions/Input/_.tsx +0 -793
  137. package/src/Functions/Input/core.tsx +0 -461
  138. package/src/Functions/Input/style.module.scss +0 -43
  139. package/src/Functions/Inputs/_.tsx +0 -5
  140. package/src/Functions/Inputs/style.module.scss +0 -15
  141. package/src/Functions/Inputs/text.tsx +0 -67
  142. package/src/Functions/Inputs/types.d.ts +0 -1
  143. package/src/Functions/Layout/PageNotFound.tsx +0 -81
  144. package/src/Functions/Layout/PageRouter.tsx +0 -107
  145. package/src/Functions/Layout/PageViewController/parts.tsx +0 -32
  146. package/src/Functions/Layout/Plate.tsx +0 -30
  147. package/src/Functions/Layout/RootViewController/parts.tsx +0 -290
  148. package/src/Functions/Layout/RootViewController/style.module.scss +0 -24
  149. package/src/Functions/Layout/SwipeView/parts.tsx +0 -380
  150. package/src/Functions/Layout/SwipeView/style.module.scss +0 -19
  151. package/src/Functions/Layout/TabBar.tsx +0 -64
  152. package/src/Functions/Layout/_.tsx +0 -20
  153. package/src/Functions/Loader/corner.tsx +0 -78
  154. package/src/Functions/Loader/mini.tsx +0 -117
  155. package/src/Functions/Loader/parts.tsx +0 -105
  156. package/src/Functions/Loader/style.module.scss +0 -222
  157. package/src/Functions/Loader/top.tsx +0 -90
  158. package/src/Functions/Sheet/parts.tsx +0 -972
  159. package/src/Functions/Sheet/style.module.scss +0 -235
  160. package/src/Functions/SnackBar/parts.tsx +0 -215
  161. package/src/Functions/SnackBar/style.module.scss +0 -25
  162. package/src/Functions/Table/Data/parts.tsx +0 -955
  163. package/src/Functions/Table/Drag/parts.tsx +0 -448
  164. package/src/Functions/Table/Normal/parts.tsx +0 -123
  165. package/src/Functions/Table/_.tsx +0 -170
  166. package/src/Functions/Table/style.module.scss +0 -92
  167. package/src/Functions/Tooltips/parts.tsx +0 -52
  168. package/src/Global/@export.tsx +0 -138
  169. package/src/Global/LaunchReactApplication.tsx +0 -30
  170. package/src/Global/exe.tsx +0 -0
  171. package/src/Global/styleConverter.tsx +0 -435
  172. package/src/Molecules/@export.tsx +0 -95
  173. package/src/Molecules/Accordion/parts.tsx +0 -146
  174. package/src/Molecules/Accordion/style.module.scss +0 -13
  175. package/src/Molecules/LinkifyText/parts.tsx +0 -54
  176. package/src/Molecules/List.tsx +0 -30
  177. package/src/Organisms/@export.tsx +0 -5
  178. package/src/Organisms/DisplayStyleInput/_.tsx +0 -18
  179. package/src/Organisms/DisplayStyleInput/darkmode.tsx +0 -112
  180. package/src/Organisms/DisplayStyleInput/themeColor.tsx +0 -210
  181. package/src/Templates/@export.tsx +0 -7
  182. package/src/Templates/PlayGround/parts.tsx +0 -115
  183. package/src/Templates/PlayGround/style.module.scss +0 -38
  184. package/src/config.tsx +0 -132
  185. package/src/launch.tsx +0 -100
  186. package/src/preload.tsx +0 -49
@@ -1,435 +0,0 @@
1
- import {
2
- useStore
3
- } from '@global';
4
-
5
- type StyleType = '¥' | '¥_h' | '¥_f' | '¥_a' | '¥bk';
6
-
7
- const FNs = {
8
- toConcreteBorderRadius: ( br?: amotify.UniStyles.Borders.RadiusParams ) => {
9
- let roundness = amotify.config.roundness | 0;
10
-
11
- if ( br == '1.tone.primary' ) {
12
- br = [ 0,2,3,4,5,5 ][ roundness ] as amotify.UniStyles.Borders.RadiusParams;
13
- } else if ( br == '2.tone.secondary' ) {
14
- br = [ 0,1,2,3,4,5 ][ roundness ] as amotify.UniStyles.Borders.RadiusParams;
15
- } else if ( br == '3.tone.tertiary' ) {
16
- br = [ 0,'1/3','2/3',1,2,3 ][ roundness ] as amotify.UniStyles.Borders.RadiusParams;
17
- }
18
- return br;
19
- },
20
- ev: ( v: any ) => $.is.nullish( v ),
21
- ClassNames: ( type: StyleType,params: amotifyUniStyleParams ) => {
22
- let CLS = [];
23
-
24
- let {
25
- gap,
26
-
27
- display: disp,
28
- position,
29
- overflow,
30
- fontColor,fontSize,fontWeight,
31
- backgroundColor: bgc,
32
- textAlign,
33
- boxShadow,
34
-
35
- margin: mrg,
36
- marginTop: mrgT,
37
- marginRight: mrgR,
38
- marginBottom: mrgB,
39
- marginLeft: mrgL,
40
-
41
- padding: pd,
42
- paddingTop: pdT,
43
- paddingRight: pdR,
44
- paddingBottom: pdB,
45
- paddingLeft: pdL,
46
-
47
- top: T,
48
- right: R,
49
- bottom: B,
50
- left: L,
51
-
52
- border: b,
53
- borderTop: bT,
54
- borderRight: bR,
55
- borderBottom: bB,
56
- borderLeft: bL,
57
-
58
- borderWidth: bWidth,
59
- // borderTopWidth: bTWidth,
60
- // borderRightWidth: bRWidth,
61
- // borderBottomWidth: bBWidth,
62
- // borderLeftWidth: bLWidth,
63
-
64
- borderColor: bColor,
65
- // borderTopColor: bTColor,
66
- // borderRightColor: bRColor,
67
- // borderBottomColor: bBColor,
68
- // borderLeftColor: bLColor,
69
-
70
- borderStyle: bStyle,
71
- // borderTopStyle: bTStyle,
72
- // borderRightStyle: bRStyle,
73
- // borderBottomStyle: bBStyle,
74
- // borderLeftStyle: bLStyle,
75
-
76
- borderRadius: br,
77
- borderTopLeftRadius: brTL,
78
- borderTopRightRadius: brTR,
79
- borderBottomLeftRadius: brBL,
80
- borderBottomRightRadius: brBR,
81
-
82
-
83
-
84
- flexSizing,
85
- flexWrap,
86
- flexType,
87
- flexChilds,
88
- flexGrid,
89
- horizontalAlign,
90
- verticalAlign,
91
-
92
- transition,
93
-
94
- gridCenter,
95
- gridCols,
96
- maxHeight,minHeight,maxWidth,minWidth,
97
- width,height,
98
- unitHeight,unitWidth,
99
-
100
- opacity,
101
-
102
- ...others
103
- } = params;
104
-
105
- {
106
- FNs.ev( disp ) || CLS.push( 'dsp' + disp );
107
-
108
- if ( overflow ) {
109
- let arr = $.flatArray( overflow );
110
- CLS.push( 'ovfl-x-' + arr[ 0 ] );
111
- CLS.push( 'ovfl-y-' + ( arr[ 1 ] || arr[ 0 ] ) );
112
- }
113
-
114
- FNs.ev( position ) || ( CLS.push( 'ps' + position ) );
115
- FNs.ev( textAlign ) || ( CLS.push( 'txalg' + textAlign ) );
116
-
117
- FNs.ev( fontColor ) || ( CLS.push( 'ftcl' + String( fontColor )?.replace( /\..*/,'' ) ) );
118
-
119
- FNs.ev( fontSize ) || ( CLS.push( 'ftsz' + String( fontSize )?.replace( /\..*/,'' ) ) );
120
- FNs.ev( fontWeight ) || ( CLS.push( 'ftwt' + fontWeight?.replace( /\..*/,'' ) ) );
121
-
122
- FNs.ev( bgc ) || CLS.push( 'bgc' + String( bgc )?.replace( /\..*/,'' ) );
123
-
124
- FNs.ev( boxShadow ) || ( CLS.push( 'bs' + boxShadow ) );
125
-
126
- let _mrgT,_mrgR,_mrgB,_mrgL;
127
- if ( $.is.exist( mrg ) ) {
128
- if ( $.is.array( mrg ) ) {
129
- if ( mrg.length == 2 ) [ _mrgT,_mrgR,_mrgB,_mrgL ] = [ ...mrg,...mrg ];
130
- else if ( mrg.length == 4 ) [ _mrgT,_mrgR,_mrgB,_mrgL ] = mrg;
131
- } else _mrgT = _mrgR = _mrgB = _mrgL = mrg;
132
- mrgT = mrgT ?? _mrgT;
133
- mrgR = mrgR ?? _mrgR;
134
- mrgB = mrgB ?? _mrgB;
135
- mrgL = mrgL ?? _mrgL;
136
- }
137
- FNs.ev( mrgT ) || ( CLS.push( 'mrgt' + mrgT ) );
138
- FNs.ev( mrgR ) || ( CLS.push( 'mrgr' + mrgR ) );
139
- FNs.ev( mrgB ) || ( CLS.push( 'mrgb' + mrgB ) );
140
- FNs.ev( mrgL ) || ( CLS.push( 'mrgl' + mrgL ) );
141
-
142
- let _pdT,_pdR,_pdB,_pdL;
143
- if ( $.is.exist( pd ) ) {
144
- if ( $.is.array( pd ) ) {
145
- if ( pd.length == 2 ) [ _pdT,_pdR,_pdB,_pdL ] = [ ...pd,...pd ];
146
- else if ( pd.length == 4 ) [ _pdT,_pdR,_pdB,_pdL ] = pd;
147
- } else _pdT = _pdR = _pdB = _pdL = pd;
148
- pdT = pdT ?? _pdT;
149
- pdR = pdR ?? _pdR;
150
- pdB = pdB ?? _pdB;
151
- pdL = pdL ?? _pdL;
152
- }
153
- FNs.ev( pdT ) || ( CLS.push( 'pdt' + pdT ) );
154
- FNs.ev( pdR ) || ( CLS.push( 'pdr' + pdR ) );
155
- FNs.ev( pdB ) || ( CLS.push( 'pdb' + pdB ) );
156
- FNs.ev( pdL ) || ( CLS.push( 'pdl' + pdL ) );
157
-
158
- FNs.ev( T ) || ( CLS.push( 'pstt' + T ) );
159
- FNs.ev( R ) || ( CLS.push( 'pstr' + R ) );
160
- FNs.ev( B ) || ( CLS.push( 'pstb' + B ) );
161
- FNs.ev( L ) || ( CLS.push( 'pstl' + L ) );
162
-
163
- {
164
- {
165
- if ( $.is.exist( b ) ) {
166
- bT = bT ?? b;
167
- bR = bR ?? b;
168
- bB = bB ?? b;
169
- bL = bL ?? b;
170
- }
171
- if ( $.is.boolean( bT ) ) bT = [ 'unset','2.normal' ][ Number( bT ) ] as amotify.UniStyles.Borders.BorderParams;
172
- if ( $.is.boolean( bR ) ) bR = [ 'unset','2.normal' ][ Number( bR ) ] as amotify.UniStyles.Borders.BorderParams;
173
- if ( $.is.boolean( bB ) ) bB = [ 'unset','2.normal' ][ Number( bB ) ] as amotify.UniStyles.Borders.BorderParams;
174
- if ( $.is.boolean( bL ) ) bL = [ 'unset','2.normal' ][ Number( bL ) ] as amotify.UniStyles.Borders.BorderParams;
175
- FNs.ev( bT ) || ( CLS.push( 'b_t_ss' + String( bT )?.replace( /\..*/,'' ) ) );
176
- FNs.ev( bR ) || ( CLS.push( 'b_r_ss' + String( bR )?.replace( /\..*/,'' ) ) );
177
- FNs.ev( bB ) || ( CLS.push( 'b_b_ss' + String( bB )?.replace( /\..*/,'' ) ) );
178
- FNs.ev( bL ) || ( CLS.push( 'b_l_ss' + String( bL )?.replace( /\..*/,'' ) ) );
179
- }
180
- if ( $.is.exist( bWidth ) ) CLS.push( 'b_wth' + String( bWidth ) );
181
- if ( $.is.exist( bColor ) ) CLS.push( 'b_cl' + String( bColor ) );
182
- if ( $.is.exist( bStyle ) ) CLS.push( 'b_st' + String( bStyle ) );
183
-
184
- {
185
- let _brTL,_brTR,_brBL,_brBR;
186
- if ( $.is.exist( br ) ) {
187
- if ( $.is.array( br ) ) {
188
- if ( br.length == 4 ) [ _brTL,_brTR,_brBR,_brBL ] = br;
189
- } else {
190
- _brTL = _brTR = _brBL = _brBR = br;
191
- }
192
- brTL = brTL ?? _brTL;
193
- brTR = brTR ?? _brTR;
194
- brBL = brBL ?? _brBL;
195
- brBR = brBR ?? _brBR;
196
- }
197
- }
198
- FNs.ev( brTL ) || ( CLS.push( 'br_tl' + FNs.toConcreteBorderRadius( brTL ) ) );
199
- FNs.ev( brTR ) || ( CLS.push( 'br_tr' + FNs.toConcreteBorderRadius( brTR ) ) );
200
- FNs.ev( brBL ) || ( CLS.push( 'br_bl' + FNs.toConcreteBorderRadius( brBL ) ) );
201
- FNs.ev( brBR ) || ( CLS.push( 'br_br' + FNs.toConcreteBorderRadius( brBR ) ) );
202
- }
203
-
204
- FNs.ev( opacity ) || ( CLS.push( 'op' + opacity ) );
205
-
206
- if ( $.is.exist( gap ) ) {
207
- let gapRow,gapCol;
208
- if ( $.is.array( gap ) ) gapRow = gap[ 0 ],gapCol = gap[ 1 ];
209
- else gapRow = gapCol = gap;
210
- CLS.push( ...[ 'gapRow' + gapRow,'gapCol' + gapCol ] );
211
- }
212
-
213
- FNs.ev( flexSizing ) || ( CLS.push( 'flsz' + flexSizing ) );
214
- FNs.ev( flexWrap ) || ( CLS.push( 'flwrp' + flexWrap ) );
215
- FNs.ev( flexType ) || ( CLS.push( 'fltyp' + flexType ) );
216
- FNs.ev( flexChilds ) || ( CLS.push( 'flchld' + flexChilds ) );
217
- FNs.ev( flexGrid ) || ( CLS.push( 'flgrid' + flexGrid ) );
218
- FNs.ev( verticalAlign ) || ( CLS.push( 'flvrt' + verticalAlign ) );
219
- FNs.ev( horizontalAlign ) || ( CLS.push( 'flhrz' + horizontalAlign ) );
220
-
221
- FNs.ev( gridCenter ) || ( CLS.push( 'grcnt' + gridCenter ) );
222
- FNs.ev( gridCols ) || ( CLS.push( 'grcol' + gridCols ) );
223
-
224
- FNs.ev( height ) || ( CLS.push( 'hgt' + height ) );
225
- FNs.ev( width ) || ( CLS.push( 'wdt' + width ) );
226
-
227
- FNs.ev( unitHeight ) || ( CLS.push( 'unthgt' + unitHeight ) );
228
- FNs.ev( unitWidth ) || ( CLS.push( 'untwdt' + unitWidth ) );
229
-
230
- FNs.ev( transition ) || ( CLS.push( 'trnst' + transition ) );
231
-
232
- FNs.ev( maxHeight ) || ( CLS.push( 'maxh' + maxHeight ) );
233
- FNs.ev( minHeight ) || ( CLS.push( 'minh' + minHeight ) );
234
- FNs.ev( maxWidth ) || ( CLS.push( 'maxw' + maxWidth ) );
235
- FNs.ev( minWidth ) || ( CLS.push( 'minw' + minWidth ) );
236
- }
237
-
238
- return {
239
- otherParams: others,
240
- className: CLS.length ? type + CLS.join( ' ' + type ) : ''
241
- }
242
- }
243
- }
244
-
245
- export const ReadStyleSet: amotify.glob.StyleConverter.ReadStyleSet = ( rawParams ) => {
246
- let params: amotifyBasicElement = { ...rawParams } as any;
247
- let {
248
- gradients,
249
- ssCardBox,
250
- ssSphere,
251
- ssSquare,
252
- ssPushable,
253
- ssAbsoluteCovered,
254
- ssTextEllipsis,
255
- flexCenter,
256
- flexNewLine,
257
-
258
- isBoldFont,
259
- isRounded,
260
- ...ReturnParams
261
- } = params;
262
-
263
- if ( gradients ) {
264
- let {
265
- deg,
266
- colors
267
- } = gradients;
268
-
269
- ReturnParams = {
270
- ...ReturnParams,
271
- freeCSS: {
272
- background: `linear-gradient(${ deg }deg,${ colors.join( ',' ) })`,
273
- }
274
- }
275
- }
276
- if ( ssCardBox ) {
277
- if ( ssCardBox === true ) {
278
- ssCardBox = 'border';
279
- if ( amotify.config.tone == 'flat' ) ssCardBox = 'cloud';
280
- }
281
-
282
- let exStyles: amotifyUniStyleParams = {
283
- backgroundColor: '1.layer.base',
284
- borderRadius: '1.tone.primary',
285
- boxShadow: 0,
286
- freeCSS: {
287
- zIndex: 1
288
- }
289
- }
290
-
291
- if ( ssCardBox == 'border' ) {
292
- exStyles.border = true;
293
- } else if ( ssCardBox == 'layer' ) {
294
- exStyles.backgroundColor = '1.layer.base';
295
- } else if ( ssCardBox == 'cloud' ) {
296
- exStyles.backgroundColor = 'cloud';
297
- } else if ( ssCardBox == 'shadow' ) {
298
- exStyles.boxShadow = 1;
299
- }
300
-
301
- if ( [ 'dim','dark' ].includes( amotify.config.darkMode ) ) exStyles.boxShadow = 2;
302
- ReturnParams = $.deepMerge( exStyles,ReturnParams );
303
- }
304
- if ( ssSphere ) {
305
- flexCenter = flexCenter ?? true;
306
- ReturnParams = {
307
- padding: 0,
308
- unitWidth: ssSphere,
309
- unitHeight: ssSphere,
310
- borderRadius: 'sphere',
311
- flexSizing: 'none',
312
- ...ReturnParams,
313
- }
314
- }
315
- if ( ssSquare ) {
316
- flexCenter = flexCenter ?? true;
317
- ReturnParams = {
318
- padding: 0,
319
- unitWidth: ssSquare,
320
- unitHeight: ssSquare,
321
- flexSizing: 'none',
322
- ...ReturnParams,
323
- }
324
- }
325
-
326
- !ssPushable || ( ReturnParams = {
327
- transition: 'middle',
328
- ...ReturnParams,
329
- className: [
330
- ReturnParams.className,
331
- 'ssPushable'
332
- ].join( ' ' )
333
- } );
334
-
335
- !ssAbsoluteCovered || ( ReturnParams = {
336
- position: 'absolute',
337
- top: 0,
338
- left: 0,
339
- right: 0,
340
- bottom: 0,
341
- ...ReturnParams
342
- } );
343
- !ssTextEllipsis || ( ReturnParams = {
344
- overflow: 'hidden',
345
- ...ReturnParams,
346
- freeCSS: {
347
- whiteSpace: 'nowrap',
348
- textOverflow: 'ellipsis',
349
- ...ReturnParams.freeCSS
350
- }
351
- } );
352
- !flexNewLine || ( ReturnParams = {
353
- width: 1,
354
- flexSizing: 'none',
355
- ...ReturnParams
356
- } )
357
- !flexCenter || ( ReturnParams = {
358
- display: 'flex',
359
- horizontalAlign: 'center',
360
- verticalAlign: 'center',
361
- ...ReturnParams
362
- } );
363
- !isBoldFont || ( ReturnParams = {
364
- ...ReturnParams,
365
- fontWeight: '3.bold',
366
- } );
367
- !isRounded || ( ReturnParams = {
368
- ...ReturnParams,
369
- borderRadius: 'sphere'
370
- } );
371
-
372
- return ReturnParams as any;
373
- }
374
- export const ToClassName: amotify.glob.StyleConverter.ToClassName = ( rawParams ) => {
375
- let params = ReadStyleSet( rawParams ) as amotifyBasicElement;
376
-
377
- let {
378
- componentID,
379
- UnderBreakPointStyles = {},
380
- hoverStyles = {},
381
- focusStyles = {},
382
- activeStyles = {},
383
-
384
- className = '',
385
-
386
- freeCSS = {},
387
-
388
- ssEffectsOnActive,
389
- ssLastChildLossBorder,
390
- ...others
391
- } = params;
392
-
393
- let ClassNames = [ className ];
394
-
395
- if ( ssLastChildLossBorder ) {
396
- ClassNames.push( 'ssLastChildLossBorder_' + ssLastChildLossBorder );
397
- }
398
-
399
- if ( ssEffectsOnActive ) {
400
- ssEffectsOnActive = $.flatArray( ssEffectsOnActive );
401
- for ( let effect of ssEffectsOnActive as any[] ) ClassNames.push( ...[ 'eff_' + effect,'eff_' + effect.split( '.' )[ 0 ] ] );
402
- }
403
-
404
- {
405
- let result = FNs.ClassNames( '¥',others );
406
-
407
- ClassNames.push( result.className );
408
- others = result.otherParams;
409
- }
410
- if ( UnderBreakPointStyles ) ClassNames.push( FNs.ClassNames( '¥bk',UnderBreakPointStyles ).className );
411
- if ( hoverStyles ) ClassNames.push( FNs.ClassNames( '¥_h',hoverStyles ).className );
412
- if ( focusStyles ) ClassNames.push( FNs.ClassNames( '¥_f',focusStyles ).className );
413
- if ( activeStyles ) ClassNames.push( FNs.ClassNames( '¥_a',activeStyles ).className );
414
-
415
- let states = { ...others } as any
416
- if ( freeCSS ) states.style = {
417
- ...freeCSS,
418
- ...states.style
419
- }
420
-
421
- if ( componentID || states[ 'data-component-id' ] ) {
422
- states[ 'data-component-id' ] = states[ 'data-component-id' ] || componentID;
423
- }
424
-
425
- if ( ClassNames.length ) {
426
- states.className = ClassNames.join( ' ' )
427
- .trim()
428
- .replace( /%/ig,'P' )
429
- .replace( /\d+px/ig,'PIX' )
430
- .replace( /\s+/ig,' ' )
431
- .replace( /\//ig,'_' )
432
- .replace( /\./ig,'-' );
433
- }
434
- return states;
435
- }
@@ -1,95 +0,0 @@
1
- import {
2
- Span,
3
- Box,
4
- Flex
5
- } from '@atoms';
6
- import { List } from './List';
7
- import { Accordion } from './Accordion/parts';
8
- import { LinkifyText } from './LinkifyText/parts';
9
-
10
- const Text = {
11
- Title: ( params: amotify.atoms.BoxInput ) => ( <Box
12
- fontSize='6.title'
13
- fontWeight='3.bold'
14
- { ...params }
15
- /> ),
16
- SubTitle: ( params: amotify.atoms.BoxInput ) => ( <Box
17
- fontSize='5.subTitle'
18
- fontWeight='3.bold'
19
- { ...params }
20
- /> ),
21
- ThirdTitle: ( params: amotify.atoms.BoxInput ) => ( <Box
22
- fontSize='4.thirdTitle'
23
- fontWeight='3.bold'
24
- { ...params }
25
- /> ),
26
- Paragraph: ( params: amotify.atoms.BoxInput ) => ( <Box
27
- fontSize='3.paragraph'
28
- fontWeight='3.bold'
29
- { ...params }
30
- /> ),
31
- Normal: ( params: amotify.atoms.BoxInput ) => ( <Box
32
- { ...params }
33
- /> ),
34
- Description: ( params: amotify.atoms.BoxInput ) => ( <Box
35
- { ...params }
36
- freeCSS={ {
37
- whiteSpace: 'pre-wrap',
38
- ...params.freeCSS
39
- } }
40
- /> ),
41
- Supplement: ( params: amotify.atoms.BoxInput ) => ( <Box
42
- fontSize='1.mini'
43
- { ...params }
44
- /> ),
45
- NowrapSpan: ( params: amotify.atoms.SpanProps ) => ( <Span
46
- { ...params }
47
- freeCSS={ {
48
- whiteSpace: 'nowrap',
49
- ...params.freeCSS
50
- } }
51
- /> )
52
- }
53
- const Row = {
54
- Center: ( params: amotify.atoms.FlexProps ) => ( <Flex
55
- horizontalAlign='center'
56
- verticalAlign='center'
57
- flexWrap={ false }
58
- gap={ 1 }
59
- { ...params }
60
- /> ),
61
- Left: ( params: amotify.atoms.FlexProps ) => ( <Flex
62
- horizontalAlign='left'
63
- verticalAlign='center'
64
- flexWrap={ false }
65
- gap={ 1 }
66
- { ...params }
67
- /> ),
68
- Right: ( params: amotify.atoms.FlexProps ) => ( <Flex
69
- horizontalAlign='right'
70
- verticalAlign='center'
71
- flexWrap={ false }
72
- gap={ 1 }
73
- { ...params }
74
- /> ),
75
- Separate: ( params: amotify.atoms.FlexProps ) => ( <Flex
76
- horizontalAlign='between'
77
- verticalAlign='center'
78
- flexWrap={ false }
79
- gap={ 1 }
80
- { ...params }
81
- /> ),
82
- }
83
- const Column = ( params: amotify.atoms.FlexProps ) => ( <Flex
84
- flexType='col'
85
- gap={ 1 }
86
- { ...params }
87
- /> );
88
- export {
89
- List,
90
- Accordion,
91
- LinkifyText,
92
- Text,
93
- Column,
94
- Row
95
- }
@@ -1,146 +0,0 @@
1
- import {
2
- useStore,
3
- React
4
- } from '@global';
5
- import {
6
- Box
7
- } from '@atoms';
8
- const {
9
- useEffect,
10
- useState,
11
- } = React;
12
-
13
- import style from './style.module.scss';
14
-
15
- const Component: FNC<amotify.mols.Accordion.Params> = ( params ) => {
16
- let {
17
- accordionID = '',
18
- slideAnimation = 'fast',
19
- open = false,
20
- ...others
21
- } = params;
22
-
23
- let [ val_wrapID ] = useState( $.uuidGen() );
24
- let [ val_contentID ] = useState( $.uuidGen() );
25
- let [ val_open,set_open ] = useState( open );
26
-
27
- if ( val_open != open ) set_open( open );
28
-
29
- let Query = '[data-accordion-content-id="' + val_contentID + '"]';
30
-
31
- const mounted = React.useRef( false );
32
- useEffect( () => {
33
- let Content = $( Query )[ 0 ];
34
- if ( Content ) {
35
- let contentHeight = Content.offsetHeight;
36
- let transitionTime = 0;
37
- if ( slideAnimation == 'fast' ) {
38
- transitionTime = contentHeight / 1000;
39
- transitionTime = Math.max( transitionTime,.2 );
40
- } else if ( slideAnimation == 'slow' ) {
41
- transitionTime = contentHeight / 300;
42
- }
43
- $( '#' + val_wrapID ).css( {
44
- transition: transitionTime + 's'
45
- } )
46
- }
47
- },[] );
48
- useEffect( () => {
49
- let Wrap = $( '#' + val_wrapID );
50
- let Content = $( Query )[ 0 ];
51
- if ( mounted.current ) {
52
- if ( Content ) {
53
- let contentHeight = Content.offsetHeight;
54
- if ( $.is.exist( contentHeight ) ) {
55
- if ( val_open ) {
56
- Wrap.css( {
57
- maxHeight: ( contentHeight + 1 ) + 'px',
58
- } ).await( 200 ).css( {
59
- maxHeight: 'unset',
60
- overflow: ( params.overflow as any ) || 'unset'
61
- } );
62
- } else {
63
- Wrap.css( {
64
- maxHeight: ( contentHeight + 1 ) + 'px',
65
- } ).await( 100 ).css( {
66
- maxHeight: 0 + 'px',
67
- overflow: 'hidden'
68
- } );
69
- }
70
- }
71
- }
72
- } else {
73
- mounted.current = true;
74
- if ( Content ) {
75
- let contentHeight = Content.offsetHeight;
76
- if ( $.is.exist( contentHeight ) ) {
77
- if ( val_open ) {
78
- Wrap.css( {
79
- maxHeight: ( contentHeight + 1 ) + 'px',
80
- } ).await( 200 ).css( {
81
- maxHeight: 'unset',
82
- overflow: ( params.overflow as any ) || 'unset'
83
- } );
84
- } else {
85
- Wrap
86
- .css( {
87
- maxHeight: 0 + 'px',
88
- overflow: 'hidden'
89
- } );
90
- }
91
- }
92
- }
93
- }
94
- },[ val_open ] );
95
-
96
- if ( accordionID ) {
97
- useStore.set( {
98
- key: 'Accordion-' + accordionID,
99
- value: {
100
- open: () => {
101
- set_open( true );
102
- params.open = true;
103
- },
104
- close: () => {
105
- set_open( false );
106
- params.open = false;
107
- },
108
- toggle: () => {
109
- set_open( !val_open );
110
- params.open = !val_open;
111
- }
112
- }
113
- } );
114
- }
115
-
116
- return ( <Box
117
- className={ [
118
- style.Wrap,
119
- style[ 'Open_' + val_open ]
120
- ].join( ' ' ) }
121
- id={ val_wrapID }
122
- >
123
- <Box
124
- data-accordion-content-id={ val_contentID }
125
- { ...others }
126
- />
127
- </Box> );
128
- }
129
-
130
- const Accordion: amotify.mols.Accordion.SetParams = Component as any
131
- Accordion.fn = {
132
- open: ( id ) => {
133
- let component = useStore.get( 'Accordion-' + id );
134
- !component || component.open();
135
- },
136
- close: ( id ) => {
137
- let component = useStore.get( 'Accordion-' + id );
138
- !component || component.close();
139
- },
140
- toggle: ( id ) => {
141
- let component = useStore.get( 'Accordion-' + id );
142
- !component || component.toggle();
143
- }
144
- }
145
-
146
- export { Accordion }
@@ -1,13 +0,0 @@
1
- @use '@uniVar' as *;
2
- .Wrap {
3
- &.Open_true {
4
- opacity: 1;
5
- }
6
- &.Open_false {
7
- opacity: 0 !important;
8
- pointer-events: none !important;
9
- * {
10
- pointer-events: none !important;
11
- }
12
- }
13
- }