amotify 0.0.4 → 0.0.6

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 (233) hide show
  1. package/dist/@jsminAmotifyExtension/formCollect.js +1 -1
  2. package/dist/Atoms/Logo/parts.js +1 -1
  3. package/dist/Atoms/Various/parts.js +1 -1
  4. package/dist/Functions/Button/_.js +1 -1
  5. package/dist/Functions/Cropper/parts.js +4 -4
  6. package/dist/Functions/Effects/Fade.js +2 -2
  7. package/dist/Functions/Input/Chips/Selector.js +4 -4
  8. package/dist/Functions/Input/Chips/_.js +3 -3
  9. package/dist/Functions/Input/DigitCharacters.js +3 -3
  10. package/dist/Functions/Input/File/_.js +4 -4
  11. package/dist/Functions/Input/List/_.js +3 -3
  12. package/dist/Functions/Input/Segmented/_.js +1 -1
  13. package/dist/Functions/Input/Select/_.js +2 -2
  14. package/dist/Functions/Input/Slider/_.js +3 -3
  15. package/dist/Functions/Input/Switch/_.js +4 -4
  16. package/dist/Functions/Input/Text.js +2 -2
  17. package/dist/Functions/Input/TextArea.js +1 -1
  18. package/dist/Functions/Input/Time/Picker.js +4 -4
  19. package/dist/Functions/Input/Time/_.js +3 -3
  20. package/dist/Functions/Input/_.js +4 -4
  21. package/dist/Functions/Input/core.js +4 -4
  22. package/dist/Functions/Inputs/text.js +1 -1
  23. package/dist/Functions/Layout/PageNotFound.js +3 -3
  24. package/dist/Functions/Layout/PageRouter.js +2 -2
  25. package/dist/Functions/Layout/PageViewController/parts.js +2 -2
  26. package/dist/Functions/Layout/Plate.js +1 -1
  27. package/dist/Functions/Layout/RootViewController/parts.js +4 -4
  28. package/dist/Functions/Layout/SwipeView/parts.js +2 -2
  29. package/dist/Functions/Layout/TabBar.js +3 -3
  30. package/dist/Functions/Loader/corner.js +2 -2
  31. package/dist/Functions/Loader/mini.js +2 -2
  32. package/dist/Functions/Loader/parts.js +1 -1
  33. package/dist/Functions/Loader/top.js +2 -2
  34. package/dist/Functions/Sheet/parts.js +4 -4
  35. package/dist/Functions/SnackBar/parts.js +4 -4
  36. package/dist/Functions/Table/Data/parts.js +4 -4
  37. package/dist/Functions/Table/Drag/parts.js +3 -3
  38. package/dist/Functions/Table/_.js +2 -2
  39. package/dist/Functions/Tooltips/parts.js +2 -2
  40. package/dist/Molecules/@export.js +1 -1
  41. package/dist/Molecules/Accordion/parts.js +2 -2
  42. package/dist/Molecules/LinkifyText/parts.js +2 -2
  43. package/dist/Molecules/List.js +1 -1
  44. package/dist/Organisms/DisplayStyleInput/darkmode.js +4 -4
  45. package/dist/Organisms/DisplayStyleInput/themeColor.js +4 -4
  46. package/dist/Templates/PlayGround/parts.js +5 -5
  47. package/dist/launch.js +6 -6
  48. package/package.json +6 -5
  49. package/public/amotify.js +310 -0
  50. package/public/amotify.min.css +12724 -0
  51. package/dist/src/@jsminAmotifyExtension/_.d.ts +0 -4
  52. package/dist/src/@jsminAmotifyExtension/fetch.d.ts +0 -9
  53. package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +0 -1
  54. package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +0 -4
  55. package/dist/src/@jsminAmotifyExtension/variables.d.ts +0 -0
  56. package/dist/src/@types/_.d.ts +0 -6
  57. package/dist/src/@types/amot.d.ts +0 -260
  58. package/dist/src/@types/fn.d.ts +0 -1040
  59. package/dist/src/@types/index.d.ts +0 -62
  60. package/dist/src/@types/jsminAmotifyExtension.d.ts +0 -134
  61. package/dist/src/@types/module.d.ts +0 -2
  62. package/dist/src/@types/state.d.ts +0 -145
  63. package/dist/src/Atoms/@export.d.ts +0 -4
  64. package/dist/src/Atoms/FAIcon/parts.d.ts +0 -2
  65. package/dist/src/Atoms/Logo/parts.d.ts +0 -1
  66. package/dist/src/Atoms/Various/parts.d.ts +0 -9
  67. package/dist/src/Functions/@export.d.ts +0 -12
  68. package/dist/src/Functions/Button/_.d.ts +0 -1
  69. package/dist/src/Functions/Cropper/parts.d.ts +0 -1
  70. package/dist/src/Functions/Effects/Fade.d.ts +0 -1
  71. package/dist/src/Functions/Effects/Ripple.d.ts +0 -1
  72. package/dist/src/Functions/Effects/_.d.ts +0 -3
  73. package/dist/src/Functions/Input/Chips/Selector.d.ts +0 -1
  74. package/dist/src/Functions/Input/Chips/_.d.ts +0 -2
  75. package/dist/src/Functions/Input/DigitCharacters.d.ts +0 -1
  76. package/dist/src/Functions/Input/File/_.d.ts +0 -2
  77. package/dist/src/Functions/Input/Hidden.d.ts +0 -1
  78. package/dist/src/Functions/Input/List/_.d.ts +0 -1
  79. package/dist/src/Functions/Input/Segmented/_.d.ts +0 -1
  80. package/dist/src/Functions/Input/Select/_.d.ts +0 -1
  81. package/dist/src/Functions/Input/Slider/_.d.ts +0 -1
  82. package/dist/src/Functions/Input/Switch/_.d.ts +0 -1
  83. package/dist/src/Functions/Input/Text.d.ts +0 -5
  84. package/dist/src/Functions/Input/TextArea.d.ts +0 -1
  85. package/dist/src/Functions/Input/Time/Picker.d.ts +0 -1
  86. package/dist/src/Functions/Input/Time/_.d.ts +0 -2
  87. package/dist/src/Functions/Input/_.d.ts +0 -5
  88. package/dist/src/Functions/Input/core.d.ts +0 -34
  89. package/dist/src/Functions/Inputs/_.d.ts +0 -3
  90. package/dist/src/Functions/Inputs/text.d.ts +0 -12
  91. package/dist/src/Functions/Layout/PageNotFound.d.ts +0 -1
  92. package/dist/src/Functions/Layout/PageRouter.d.ts +0 -2
  93. package/dist/src/Functions/Layout/PageViewController/parts.d.ts +0 -1
  94. package/dist/src/Functions/Layout/Plate.d.ts +0 -1
  95. package/dist/src/Functions/Layout/RootViewController/parts.d.ts +0 -1
  96. package/dist/src/Functions/Layout/SwipeView/parts.d.ts +0 -2
  97. package/dist/src/Functions/Layout/TabBar.d.ts +0 -1
  98. package/dist/src/Functions/Layout/_.d.ts +0 -2
  99. package/dist/src/Functions/Loader/corner.d.ts +0 -1
  100. package/dist/src/Functions/Loader/mini.d.ts +0 -33
  101. package/dist/src/Functions/Loader/parts.d.ts +0 -3
  102. package/dist/src/Functions/Loader/top.d.ts +0 -1
  103. package/dist/src/Functions/Sheet/parts.d.ts +0 -2
  104. package/dist/src/Functions/SnackBar/parts.d.ts +0 -2
  105. package/dist/src/Functions/Table/Data/parts.d.ts +0 -3
  106. package/dist/src/Functions/Table/Drag/parts.d.ts +0 -1
  107. package/dist/src/Functions/Table/Normal/parts.d.ts +0 -1
  108. package/dist/src/Functions/Table/_.d.ts +0 -9
  109. package/dist/src/Functions/Tooltips/parts.d.ts +0 -2
  110. package/dist/src/Global/@export.d.ts +0 -12
  111. package/dist/src/Global/LaunchReactApplication.d.ts +0 -1
  112. package/dist/src/Global/styleConverter.d.ts +0 -2
  113. package/dist/src/Molecules/@export.d.ts +0 -21
  114. package/dist/src/Molecules/Accordion/parts.d.ts +0 -2
  115. package/dist/src/Molecules/LinkifyText/parts.d.ts +0 -1
  116. package/dist/src/Molecules/List.d.ts +0 -1
  117. package/dist/src/Organisms/@export.d.ts +0 -2
  118. package/dist/src/Organisms/DisplayStyleInput/_.d.ts +0 -1
  119. package/dist/src/Organisms/DisplayStyleInput/darkmode.d.ts +0 -1
  120. package/dist/src/Organisms/DisplayStyleInput/themeColor.d.ts +0 -27
  121. package/dist/src/Templates/@export.d.ts +0 -2
  122. package/dist/src/Templates/PlayGround/parts.d.ts +0 -1
  123. package/dist/src/config.d.ts +0 -16
  124. package/dist/src/launch.d.ts +0 -9
  125. package/dist/src/preload.d.ts +0 -1
  126. package/src/@jsminAmotifyExtension/_.tsx +0 -4
  127. package/src/@jsminAmotifyExtension/fetch.tsx +0 -107
  128. package/src/@jsminAmotifyExtension/formCollect.tsx +0 -89
  129. package/src/@jsminAmotifyExtension/spreadSheet.tsx +0 -159
  130. package/src/@jsminAmotifyExtension/variables.tsx +0 -130
  131. package/src/@styles/@app.scss +0 -4
  132. package/src/@styles/@variables/customProps.scss +0 -109
  133. package/src/@styles/@variables/styleSet.scss +0 -38
  134. package/src/@styles/@variables/themeColor.scss +0 -71
  135. package/src/@styles/@variables/var.scss +0 -171
  136. package/src/@styles/UniStyling.scss +0 -996
  137. package/src/@styles/init.scss +0 -154
  138. package/src/@types/_.tsx +0 -6
  139. package/src/@types/amot.tsx +0 -323
  140. package/src/@types/fn.tsx +0 -1210
  141. package/src/@types/index.tsx +0 -74
  142. package/src/@types/jsminAmotifyExtension.tsx +0 -143
  143. package/src/@types/module.tsx +0 -2
  144. package/src/@types/state.tsx +0 -199
  145. package/src/Atoms/@export.tsx +0 -32
  146. package/src/Atoms/FAIcon/parts.tsx +0 -117
  147. package/src/Atoms/FAIcon/style.module.scss +0 -9
  148. package/src/Atoms/Logo/parts.tsx +0 -335
  149. package/src/Atoms/Logo/style.module.scss +0 -96
  150. package/src/Atoms/Various/parts.tsx +0 -157
  151. package/src/Atoms/Various/style.module.scss +0 -40
  152. package/src/Functions/@export.tsx +0 -29
  153. package/src/Functions/Button/_.tsx +0 -305
  154. package/src/Functions/Button/style.module.scss +0 -183
  155. package/src/Functions/Cropper/parts.tsx +0 -1061
  156. package/src/Functions/Cropper/style.module.scss +0 -62
  157. package/src/Functions/Effects/Fade.tsx +0 -81
  158. package/src/Functions/Effects/Ripple.tsx +0 -141
  159. package/src/Functions/Effects/_.tsx +0 -33
  160. package/src/Functions/Effects/style.module.scss +0 -83
  161. package/src/Functions/Input/Chips/Selector.tsx +0 -451
  162. package/src/Functions/Input/Chips/_.tsx +0 -286
  163. package/src/Functions/Input/Chips/style.module.scss +0 -6
  164. package/src/Functions/Input/DigitCharacters.tsx +0 -241
  165. package/src/Functions/Input/File/_.tsx +0 -596
  166. package/src/Functions/Input/File/style.module.scss +0 -34
  167. package/src/Functions/Input/Hidden.tsx +0 -18
  168. package/src/Functions/Input/List/_.tsx +0 -383
  169. package/src/Functions/Input/List/style.module.scss +0 -84
  170. package/src/Functions/Input/Segmented/_.tsx +0 -238
  171. package/src/Functions/Input/Segmented/style.module.scss +0 -81
  172. package/src/Functions/Input/Select/_.tsx +0 -225
  173. package/src/Functions/Input/Select/style.module.scss +0 -10
  174. package/src/Functions/Input/Slider/_.tsx +0 -519
  175. package/src/Functions/Input/Slider/style.module.scss +0 -67
  176. package/src/Functions/Input/Switch/_.tsx +0 -177
  177. package/src/Functions/Input/Switch/style.module.scss +0 -18
  178. package/src/Functions/Input/Text.tsx +0 -437
  179. package/src/Functions/Input/TextArea.tsx +0 -115
  180. package/src/Functions/Input/Time/Picker.tsx +0 -950
  181. package/src/Functions/Input/Time/_.tsx +0 -736
  182. package/src/Functions/Input/Time/style.module.scss +0 -72
  183. package/src/Functions/Input/_.tsx +0 -793
  184. package/src/Functions/Input/core.tsx +0 -461
  185. package/src/Functions/Input/style.module.scss +0 -43
  186. package/src/Functions/Inputs/_.tsx +0 -5
  187. package/src/Functions/Inputs/style.module.scss +0 -15
  188. package/src/Functions/Inputs/text.tsx +0 -67
  189. package/src/Functions/Inputs/types.d.ts +0 -1
  190. package/src/Functions/Layout/PageNotFound.tsx +0 -81
  191. package/src/Functions/Layout/PageRouter.tsx +0 -107
  192. package/src/Functions/Layout/PageViewController/parts.tsx +0 -32
  193. package/src/Functions/Layout/Plate.tsx +0 -30
  194. package/src/Functions/Layout/RootViewController/parts.tsx +0 -290
  195. package/src/Functions/Layout/RootViewController/style.module.scss +0 -24
  196. package/src/Functions/Layout/SwipeView/parts.tsx +0 -380
  197. package/src/Functions/Layout/SwipeView/style.module.scss +0 -19
  198. package/src/Functions/Layout/TabBar.tsx +0 -64
  199. package/src/Functions/Layout/_.tsx +0 -20
  200. package/src/Functions/Loader/corner.tsx +0 -78
  201. package/src/Functions/Loader/mini.tsx +0 -117
  202. package/src/Functions/Loader/parts.tsx +0 -105
  203. package/src/Functions/Loader/style.module.scss +0 -222
  204. package/src/Functions/Loader/top.tsx +0 -90
  205. package/src/Functions/Sheet/parts.tsx +0 -972
  206. package/src/Functions/Sheet/style.module.scss +0 -235
  207. package/src/Functions/SnackBar/parts.tsx +0 -215
  208. package/src/Functions/SnackBar/style.module.scss +0 -25
  209. package/src/Functions/Table/Data/parts.tsx +0 -955
  210. package/src/Functions/Table/Drag/parts.tsx +0 -448
  211. package/src/Functions/Table/Normal/parts.tsx +0 -123
  212. package/src/Functions/Table/_.tsx +0 -170
  213. package/src/Functions/Table/style.module.scss +0 -92
  214. package/src/Functions/Tooltips/parts.tsx +0 -52
  215. package/src/Global/@export.tsx +0 -138
  216. package/src/Global/LaunchReactApplication.tsx +0 -30
  217. package/src/Global/exe.tsx +0 -0
  218. package/src/Global/styleConverter.tsx +0 -435
  219. package/src/Molecules/@export.tsx +0 -95
  220. package/src/Molecules/Accordion/parts.tsx +0 -146
  221. package/src/Molecules/Accordion/style.module.scss +0 -13
  222. package/src/Molecules/LinkifyText/parts.tsx +0 -54
  223. package/src/Molecules/List.tsx +0 -30
  224. package/src/Organisms/@export.tsx +0 -5
  225. package/src/Organisms/DisplayStyleInput/_.tsx +0 -18
  226. package/src/Organisms/DisplayStyleInput/darkmode.tsx +0 -112
  227. package/src/Organisms/DisplayStyleInput/themeColor.tsx +0 -210
  228. package/src/Templates/@export.tsx +0 -7
  229. package/src/Templates/PlayGround/parts.tsx +0 -115
  230. package/src/Templates/PlayGround/style.module.scss +0 -38
  231. package/src/config.tsx +0 -132
  232. package/src/launch.tsx +0 -100
  233. package/src/preload.tsx +0 -49
@@ -1,380 +0,0 @@
1
- import {
2
- useStore
3
- } from '@global';
4
- import {
5
- Box,
6
- Flex
7
- } from '@atoms';
8
- const {
9
- useState,
10
- useEffect,
11
- useRef,
12
- } = React;
13
-
14
- import style from './style.module.scss';
15
-
16
-
17
- type SlideEventProps = {
18
- eventType: 'usr' | 'sys' | 'init' | 'adjustLoop'
19
- index: number
20
- }
21
- type SliderInfoProps = {
22
- x: number
23
- y: number
24
- effectStartAt: number
25
- process: boolean
26
- loop: boolean
27
- id: string
28
- index: number
29
- minIndex: number
30
- maxIndex: number
31
- width: number
32
- set_event: React.Dispatch<React.SetStateAction<SlideEventProps>>
33
- }
34
-
35
- export const SwipeView = ( params: amotify.fn.Layout.SwipeView.Params ) => {
36
- return ( <Core
37
- { ...params }
38
- slideIndex={ Math.max( Math.min( params.slideIndex!,params.slides.length - 1 ),0 ) }
39
- /> );
40
- }
41
- export const Core: FNC<amotify.fn.Layout.SwipeView.Params> = ( params ) => {
42
- let {
43
- options: {
44
- onSlideCallback,
45
- visibilitySurroundSlide = true,
46
- autoSwipeSeconds = 0,
47
- loop = false,
48
- disableMousedrag = false,
49
- disableTouch = false,
50
- } = {},
51
- wrapper = ( slide ) => ( slide ),
52
- slides = [],
53
- ...others
54
- } = params;
55
-
56
- let [ val_swipeID ] = useState( $.uuidGen() );
57
- let [ val_event,set_event ] = useState( {
58
- eventType: 'init',
59
- index: params.slideIndex
60
- } as SlideEventProps );
61
-
62
- useEffect( () => {
63
- useStore.set( {
64
- key: 'SwipeTimer-' + val_swipeID,
65
- value: null
66
- } );
67
- },[] );
68
-
69
- const mounted = useRef( false );
70
- useEffect( () => {
71
- set_event( {
72
- eventType: 'usr',
73
- index: params.slideIndex!
74
- } );
75
-
76
- if ( !mounted.current ) mounted.current = true;
77
- },[ params.slideIndex ] );
78
-
79
- useEffect( () => {
80
- let Index = val_event.index + ( loop ? 1 : 0 );
81
- let CopyIndex = [ -1,slides.length ].includes( val_event.index );
82
-
83
- if ( !CopyIndex ) if ( onSlideCallback ) setTimeout( () => {
84
- onSlideCallback!( val_event.index );
85
- },300 );
86
-
87
- let Base = $( '#Swiper-' + val_swipeID );
88
- if ( val_event.eventType == 'adjustLoop' ) {
89
- Base
90
- .await( 250 )
91
- .css( {
92
- transition: '0s',
93
- transform: FNs.TrasformString( Index )
94
- } )
95
- .children()
96
- .removeClass( style.Display )
97
- .parent().children( Index )
98
- .addClass( [ style.Display,style.LoopAdjusting ] )
99
- .await( 100 ).removeClass( style.LoopAdjusting );
100
- } else if ( val_event.eventType == 'sys' ) {
101
- Base
102
- .await( 250 )
103
- .css( {
104
- transform: FNs.TrasformString( Index )
105
- } )
106
- .children()
107
- .removeClass( style.Display )
108
- .parent().children( Index )
109
- .addClass( style.Display );
110
- } else {
111
- Base
112
- .children()
113
- .removeClass( style.Display )
114
- .parent().children( Index )
115
- .addClass( style.Display )
116
- .parent()
117
- .css( {
118
- transition: '0.3s',
119
- transform: FNs.TrasformString( Index )
120
- } )
121
- .await( 250 ).css( { transition: '0s' } );
122
-
123
- if ( CopyIndex ) {
124
- let ajastIndex = val_event.index == -1 ? slides.length - 1 : 0;
125
- set_event( {
126
- eventType: 'adjustLoop',
127
- index: ajastIndex
128
- } );
129
- }
130
- }
131
-
132
- if ( autoSwipeSeconds && !CopyIndex ) {
133
- $.interval.clear( 'SwipeTimer-' + val_swipeID );
134
- $.interval.standBy(
135
- 'SwipeTimer-' + val_swipeID,
136
- autoSwipeSeconds - ( val_event.eventType == 'sys' ? 310 : 0 ),
137
- () => {
138
- let newIndex = val_event.index + 1;
139
-
140
- if ( !loop && newIndex > slides.length - 1 ) newIndex = 0;
141
-
142
- set_event( {
143
- eventType: 'usr',
144
- index: newIndex
145
- } );
146
- }
147
- );
148
- }
149
- },[ val_event ] );
150
-
151
- let Slides = slides.map( ( slide,index ) => <Box
152
- key={ index }
153
- flexSizing={ 'none' }
154
- width={ 1 }
155
- height={ 0 }
156
- className={ style.Child }
157
- children={ wrapper( slide ) }
158
- /> );
159
-
160
- if ( loop ) {
161
- Slides.push( Slides[ 0 ] );
162
- Slides.unshift( Slides[ Slides.length - 2 ] );
163
- }
164
-
165
- let info: SliderInfoProps = {
166
- x: 0,
167
- y: 0,
168
- process: false,
169
- effectStartAt: 0,
170
- id: val_swipeID,
171
- loop,
172
- index: val_event.index,
173
- minIndex: loop ? -1 : 0,
174
- maxIndex: slides.length + ( loop ? 1 : -1 ),
175
- width: 0,
176
- set_event: set_event
177
- }
178
-
179
- let Index = val_event.index + ( loop ? 1 : 0 );
180
-
181
- return ( <Box
182
- overflow='hidden'
183
- position='relative'
184
- { ...others }
185
- freeCSS={ {
186
- zIndex: 1,
187
- ...others.freeCSS
188
- } }
189
- data-swipe-id={ val_swipeID }
190
- onMouseDown={ ( event ) => {
191
- if ( disableMousedrag ) return;
192
- if ( event.buttons != 1 ) return;
193
- FNs.EffectStart( event,info );
194
- } }
195
- onTouchStart={ ( event ) => {
196
- if ( disableTouch ) return;
197
- if ( event.touches?.length != 1 ) return;
198
- FNs.EffectStart( event as any,info );
199
- } }
200
- >
201
- <Flex
202
- flexWrap={ false }
203
- gap={ 1 }
204
- transition='long'
205
- className={ [
206
- style.Rail,
207
- style[ 'ShowOther_' + visibilitySurroundSlide ]
208
- ].join( ' ' ) }
209
- id={ 'Swiper-' + val_swipeID }
210
- freeCSS={ {
211
- ...!mounted.current ? {
212
- transform: FNs.TrasformString( Index )
213
- } : {}
214
- } }
215
- children={ Slides }
216
- />
217
- </Box> );
218
- }
219
-
220
- const FNs = {
221
- TrasformString: ( Index: number ) => ( `translateX( calc( ${ -100 * Index }% - ${ 12 * ( Index ) }px ) )` ),
222
- EffectStart: ( event: React.MouseEvent<HTMLDivElement,MouseEvent>,info: SliderInfoProps ) => {
223
- let {
224
- x,y
225
- } = $.getCursor( event as any );
226
- let eventTarget = event.currentTarget;
227
- let target = event.target as HTMLElement;
228
- if ( [ 'SELECT','BUTTON','LABEL','INPUT' ].includes( target.tagName ) ) return;
229
-
230
- info = {
231
- ...info,
232
- x: x - info.x + window.scrollX,
233
- y: y - info.y + window.scrollY,
234
- effectStartAt: new Date().getTime(),
235
- width: $( '#Swiper-' + info.id ).position().width
236
- }
237
-
238
- let { swipeId } = eventTarget.dataset;
239
- if ( swipeId == info.id ) {
240
- $( document )
241
- .addEvent( {
242
- eventID: 'SwipeMouseMove',eventType: 'mousemove',
243
- callback: ( event ) => { FNs.EffectCheck( event,info ); },
244
- option: { passive: false }
245
- } )
246
- .addEvent( {
247
- eventID: 'SwipeTouchMove',eventType: 'touchmove',
248
- callback: ( event ) => { FNs.EffectCheck( event,info ); },
249
- option: { passive: false }
250
- } )
251
- .addEvent( {
252
- eventID: 'SwipeMouseUp',eventType: 'mouseup',
253
- callback: ( event ) => { FNs.EffectEnd( event,info ); },
254
- option: { passive: false }
255
- } )
256
- .addEvent( {
257
- eventID: 'SwipeTouchEnd',eventType: 'touchend',
258
- callback: ( event ) => { FNs.EffectEnd( event,info ); },
259
- option: { passive: false }
260
- } );
261
- }
262
- },
263
- EffectCheck: ( event: any,info: SliderInfoProps ) => {
264
- if ( info.process ) return;
265
- let {
266
- x,y
267
- } = $.getCursor( event );
268
-
269
- let X = Math.abs( x - info.x + window.scrollX );
270
- let Y = Math.abs( y - info.y + window.scrollY );
271
-
272
- if ( event.touches && event.touches.length > 1 ) return;
273
- if ( Y + X < 15 ) return;
274
- if ( Y > X / 2 ) {
275
- $( document ).removeEvent( [
276
- 'SwipeMouseMove',
277
- 'SwipeTouchMove'
278
- ] );
279
- } else {
280
- info.process = true;
281
-
282
- let Index = info.index + ( info.loop ? 1 : 0 );
283
- $( '#Swiper-' + info.id ).children( Index - 1 ).addClass( style.Display );
284
- $( '#Swiper-' + info.id ).children( Index + 1 ).addClass( style.Display );
285
-
286
- $( document )
287
- .addEvent( {
288
- eventID: 'SwipeCheckMouseMove',eventType: 'mousemove',
289
- callback: ( event ) => { FNs.EffectMove( event,info ); },
290
- option: { passive: false }
291
- } )
292
- .addEvent( {
293
- eventID: 'SwipeCheckTouchMove',eventType: 'touchmove',
294
- callback: ( event ) => { FNs.EffectMove( event,info ); },
295
- option: { passive: false }
296
- } )
297
-
298
- event.preventDefault();
299
- return;
300
- }
301
- },
302
- EffectMove: ( event: any,info: SliderInfoProps ) => {
303
- if ( event.touches && event.touches.length > 1 ) return;
304
-
305
- let {
306
- x
307
- } = $.getCursor( event );
308
-
309
- let X = x - info.x + window.scrollX;
310
-
311
- let Index = info.index + ( info.loop ? 1 : 0 );
312
- let rate = Index - X / info.width;
313
-
314
- if ( rate < 0 ) {
315
- rate /= 2;
316
- } else if ( rate > info.maxIndex ) {
317
- let excess = rate - info.maxIndex;
318
- rate = info.maxIndex + excess / 2;
319
- }
320
-
321
- $( '#Swiper-' + info.id ).css( {
322
- transition: '0s',
323
- transform: FNs.TrasformString( rate )
324
- } );
325
-
326
- event.preventDefault();
327
- return;
328
- },
329
- EffectEnd: ( event: Event,info: SliderInfoProps ) => {
330
- if ( info.process ) {
331
- let cursor = $.getCursor( event );
332
- let X = cursor.x - info.x + window.scrollX;
333
-
334
- let current = new Date().getTime();
335
-
336
- let totalTime = current - info.effectStartAt;
337
-
338
- let Index = info.index + ( info.loop ? 1 : 0 );
339
-
340
- let newIndex = 0;
341
- if ( totalTime < 400 ) {
342
- newIndex = Index - ( Number( X > 0 ) * 2 - 1 );
343
- } else {
344
- newIndex = Math.round( Index - X / info.width );
345
- }
346
- newIndex = Math.max( Math.min( newIndex,info.maxIndex ),info.minIndex );
347
-
348
- info.process = false;
349
- if ( Index === newIndex ) {
350
- info.effectStartAt = current;
351
-
352
- $( '#Swiper-' + info.id )
353
- .css( {
354
- transition: '.2s',
355
- transform: FNs.TrasformString( newIndex )
356
- } )
357
- .await( 310 )
358
- .css( {
359
- transition: '0s'
360
- } )
361
- .children().removeClass( style.Display )
362
- .parent().children( Index ).addClass( style.Display );
363
- } else {
364
- info.set_event( {
365
- eventType: 'usr',
366
- index: newIndex + info.minIndex
367
- } );
368
- }
369
- }
370
-
371
- $( document ).removeEvent( [
372
- 'SwipeMouseMove',
373
- 'SwipeTouchMove',
374
- 'SwipeCheckMouseMove',
375
- 'SwipeCheckTouchMove',
376
- 'SwipeMouseUp',
377
- 'SwipeTouchEnd'
378
- ] );
379
- }
380
- }
@@ -1,19 +0,0 @@
1
- @use '@uniVar' as *;
2
- .Rail {
3
- &.ShowOther_true {
4
- > .Child {
5
- opacity: 100% !important;
6
- }
7
- }
8
- .Child {
9
- opacity: 0%;
10
- transition: .3s;
11
- &.Display {
12
- opacity: 100%;
13
- height: auto;
14
- }
15
- &.LoopAdjusting {
16
- transition: 0s !important;
17
- }
18
- }
19
- }
@@ -1,64 +0,0 @@
1
- import {
2
- React,
3
- } from '@global';
4
- import {
5
- Box,
6
- Flex
7
- } from '@atoms';
8
- import {
9
- Row
10
- } from '@mols';
11
- import {
12
- Input
13
- } from '@functions';
14
- const {
15
- useEffect,
16
- useState
17
- } = React;
18
-
19
- export const TabBar: FNC<amotify.fn.Layout.TabBar.Params> = ( params ) => {
20
- let {
21
- tabIndex,
22
- tabs,
23
- onTabChange,
24
- componentDidMount,
25
- ...others
26
- } = params;
27
-
28
- useEffect( () => {
29
- if ( componentDidMount ) componentDidMount();
30
- },[] );
31
-
32
- return ( <Flex
33
- position='relative'
34
- overflow={ 'auto' }
35
- flexWrap={ false }
36
- { ...others }
37
- freeCSS={ {
38
- zIndex: 3,
39
- whiteSpace: 'nowrap',
40
- ...others.freeCSS
41
- } }
42
- >
43
- <Box
44
- margin={ [ 0,'auto' ] }
45
- >
46
- <Input.Segmented.BottomLine
47
- value={ tabIndex }
48
- fontColor='inherit'
49
- override='force'
50
- gap={ 0 }
51
- options={ tabs.map( ( tab,index ) => {
52
- return {
53
- value: index,
54
- label: tab
55
- }
56
- } ) }
57
- onUpdateValidValue={ ( args ) => {
58
- let value = args.value[ 0 ];
59
- if ( onTabChange ) onTabChange( value );
60
- } }
61
- />
62
- </Box>
63
- </Flex> );
64
- }
@@ -1,20 +0,0 @@
1
- import { SwipeView } from './SwipeView/parts';
2
- import { PageViewController } from './PageViewController/parts';
3
- import { TabBar } from './TabBar';
4
- import { Plate } from './Plate';
5
- import { PageNotFound } from './PageNotFound';
6
- import { PageRouter } from './PageRouter';
7
-
8
- import { RootViewController } from './RootViewController/parts';
9
-
10
- const Layout: amotify.fn.Layout.Methods = {
11
- PageViewController,
12
- TabBar,
13
- Plate,
14
- SwipeView,
15
- PageRouter,
16
- PageNotFound,
17
- RootViewController
18
- }
19
-
20
- export { Layout }
@@ -1,78 +0,0 @@
1
- import {
2
- useStore
3
- } from '@global';
4
- import {
5
- Box,
6
- Flex
7
- } from '@atoms';
8
- import {
9
- Row
10
- } from '@mols';
11
- const {
12
- useEffect,
13
- useState,
14
- } = React;
15
-
16
- import style from './style.module.scss';
17
-
18
- import { memoryID } from './parts';
19
-
20
- export const Corner = () => {
21
- let [ val_active,set_active ] = useState( false );
22
-
23
- useEffect( () => {
24
- useStore.set( {
25
- key: memoryID + '-corner',
26
- value: {
27
- active: () => {
28
- set_active( true );
29
- },
30
- stop: () => {
31
- set_active( false );
32
- }
33
- }
34
- } );
35
- },[] );
36
-
37
- return <Flex
38
- className={ [
39
- style.CornerLoader,
40
- style[ 'Active_' + val_active ]
41
- ].join( ' ' ) }
42
- gap={ '1/2' }
43
- padding={ [ '1/2','3/4' ] }
44
- borderRadius={ '2/3' }
45
- backgroundColor='theme'
46
- position='fixed'
47
- boxShadow={ 2 }
48
- right={ 1 }
49
- bottom={ 1 }
50
- opacity='trans'
51
- transition='short'
52
- freeCSS={ {
53
- pointerEvents: 'none'
54
- } }
55
- >
56
- <Flex
57
- className={ style.Wrap }
58
- flexWrap={ false }
59
- verticalAlign='center'
60
- horizontalAlign='center'
61
- >
62
- <Box className={ style.Ld4 } />
63
- <Box className={ style.Ld3 } />
64
- <Box className={ style.Ld2 } />
65
- <Box className={ style.Ld1 } />
66
- <Box className={ style.Ld2 } />
67
- <Box className={ style.Ld3 } />
68
- <Box className={ style.Ld4 } />
69
- </Flex>
70
- <Box
71
- fontColor='white'
72
- fontSize='0.xs'
73
- isBoldFont
74
- >
75
- Loading
76
- </Box>
77
- </Flex>;
78
- }
@@ -1,117 +0,0 @@
1
- import {
2
- useStore
3
- } from '@global';
4
- import {
5
- Row
6
- } from '@mols';
7
- const {
8
- useEffect,
9
- useState,
10
- } = React;
11
-
12
- import style from './style.module.scss';
13
-
14
- export const Mini = ( params: amotify.fn.Loader.CompInput & {
15
- color?: amotify.fn.Loader.Colors
16
- size?: amotify.fn.Loader.Sizes
17
- } ) => {
18
- let {
19
- color = 'theme',
20
- size = 'R',
21
- showInitial = false,
22
- loaderID = '',
23
- ...props
24
- } = params;
25
- let [ val_key ] = useState( loaderID );
26
- let [ val_componentID ] = useState( $.uuidGen() );
27
- let [ val_active,set_active ] = useState( showInitial );
28
-
29
- let Size: amotify.UniStyles.Sizes.SizeParams = 0;
30
- if ( size == 'S' ) {
31
- Size = 1;
32
- } else if ( size == 'R' ) {
33
- Size = 1.5;
34
- } else if ( size == 'L' ) {
35
- Size = 3;
36
- } else if ( size == 'XL' ) {
37
- Size = 4;
38
- } else if ( size == 'MAX' ) {
39
- Size = 6;
40
- }
41
- let BorderColor = {
42
- 'theme': 'hsl( var( --color-theme-hsl ) )',
43
- 'posi': 'var( --color-positive )',
44
- 'nega': 'var( --color-negative )',
45
- 'warn': 'var( --color-warning )',
46
- 'cloud': 'hsl( var( --color-layer5-hsl ) )',
47
- 'white': 'white',
48
- }[ color as 'theme' ];
49
-
50
- let QuerySelector = '[data-component-id="' + val_componentID + '"]';
51
- useEffect( () => {
52
- if ( val_active ) {
53
- $( QuerySelector )
54
- .removeClass( style.Hide )
55
- .await( 10 )
56
- .addClass( style.Active );
57
- } else {
58
- $( QuerySelector )
59
- .removeClass( style.Active )
60
- .await( 210 )
61
- .addClass( style.Hide )
62
- }
63
- },[ val_active ] );
64
-
65
- useEffect( () => {
66
- useStore.set( {
67
- key: val_componentID,
68
- value: {
69
- active: ( keyCode: string ) => {
70
- if ( val_key != keyCode ) return;
71
- set_active( true );
72
- },
73
- stop: ( keyCode: string ) => {
74
- if ( val_key != keyCode ) return;
75
- set_active( false );
76
- },
77
- stopForce: () => {
78
- set_active( false );
79
- }
80
- }
81
- } );
82
- },[] );
83
-
84
- return <Row.Center
85
- ssSphere={ Size }
86
- className={ [
87
- style.MiniLoader,
88
- showInitial ? '' : style.Hide
89
- ].join( ' ' ) }
90
- componentID={ val_componentID }
91
- position='relative'
92
- { ...props }
93
- >
94
- <svg
95
- className={ style.SVG1 }
96
- width="100"
97
- height="100"
98
- viewBox="0 0 100 100"
99
- style={ {
100
- stroke: BorderColor
101
- } }
102
- >
103
- <circle cx="50" cy="50" r="40" />
104
- </svg>
105
- <svg
106
- className={ style.SVG2 }
107
- width="100"
108
- height="100"
109
- viewBox="0 0 100 100"
110
- style={ {
111
- stroke: BorderColor
112
- } }
113
- >
114
- <circle cx="50" cy="50" r="40" />
115
- </svg>
116
- </Row.Center>;
117
- }