amotify 0.0.9 → 0.0.11

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 (59) hide show
  1. package/@types/_.tsx +1 -2
  2. package/@types/amot.tsx +125 -84
  3. package/@types/fn.tsx +221 -221
  4. package/@types/module.tsx +1 -2
  5. package/dist/amotify.js +1 -1
  6. package/package.json +8 -4
  7. package/src/@global.tsx +7 -7
  8. package/src/@molecules.tsx +1 -0
  9. package/src/atoms/FAIcon/parts.tsx +4 -3
  10. package/src/atoms/Logo/parts.tsx +1 -0
  11. package/src/atoms/Various/parts.tsx +9 -8
  12. package/src/config.tsx +4 -4
  13. package/src/functions/Button/_.tsx +1 -0
  14. package/src/functions/Cropper/parts.tsx +12 -16
  15. package/src/functions/Effects/Fade.tsx +4 -9
  16. package/src/functions/Input/Chips/Selector.tsx +13 -16
  17. package/src/functions/Input/Chips/_.tsx +10 -11
  18. package/src/functions/Input/DigitCharacters.tsx +3 -7
  19. package/src/functions/Input/File/_.tsx +9 -12
  20. package/src/functions/Input/Hidden.tsx +4 -3
  21. package/src/functions/Input/List/_.tsx +5 -9
  22. package/src/functions/Input/Segmented/_.tsx +1 -1
  23. package/src/functions/Input/Select/_.tsx +5 -8
  24. package/src/functions/Input/Slider/_.tsx +6 -9
  25. package/src/functions/Input/Switch/_.tsx +3 -7
  26. package/src/functions/Input/Text.tsx +4 -9
  27. package/src/functions/Input/TextArea.tsx +3 -7
  28. package/src/functions/Input/Time/Picker.tsx +7 -12
  29. package/src/functions/Input/Time/_.tsx +10 -14
  30. package/src/functions/Input/_.tsx +8 -13
  31. package/src/functions/Input/core.tsx +10 -15
  32. package/src/functions/Inputs/text.tsx +1 -0
  33. package/src/functions/Layout/PageNotFound.tsx +2 -1
  34. package/src/functions/Layout/PageRouter.tsx +23 -32
  35. package/src/functions/Layout/PageViewController/parts.tsx +2 -7
  36. package/src/functions/Layout/Plate.tsx +2 -1
  37. package/src/functions/Layout/SwipeView/parts.tsx +9 -13
  38. package/src/functions/Layout/TabBar.tsx +2 -6
  39. package/src/functions/Loader/corner.tsx +4 -10
  40. package/src/functions/Loader/mini.tsx +7 -10
  41. package/src/functions/Loader/parts.tsx +6 -9
  42. package/src/functions/Loader/top.tsx +4 -10
  43. package/src/functions/Sheet/parts.tsx +12 -15
  44. package/src/functions/SnackBar/parts.tsx +10 -13
  45. package/src/functions/Table/Drag/parts.tsx +9 -12
  46. package/src/functions/Table/Normal/parts.tsx +4 -3
  47. package/src/functions/Table/_.tsx +10 -3
  48. package/src/functions/Tooltips/parts.tsx +1 -0
  49. package/src/global/LaunchReactApplication.tsx +4 -3
  50. package/src/global/styleConverter.tsx +2 -2
  51. package/src/launch.tsx +8 -3
  52. package/src/molecules/Accordion/parts.tsx +6 -10
  53. package/src/molecules/LinkifyText/parts.tsx +2 -1
  54. package/src/molecules/List.tsx +2 -1
  55. package/src/organisms/DisplayStyleInput/darkmode.tsx +2 -7
  56. package/src/organisms/DisplayStyleInput/themeColor.tsx +3 -8
  57. package/src/templates/PlayGround/parts.tsx +20 -26
  58. package/webpack.config.js +5 -5
  59. package/@types/index.tsx +0 -70
@@ -11,12 +11,8 @@ import {
11
11
  import {
12
12
  Input
13
13
  } from '@fn';
14
- const {
15
- useEffect,
16
- useState
17
- } = React;
18
14
 
19
- export const TabBar: FNC<amotify.fn.Layout.TabBar.Params> = ( params ) => {
15
+ export const TabBar: React.FC<amotify.fn.Layout.TabBar.Params> = ( params ) => {
20
16
  let {
21
17
  tabIndex,
22
18
  tabs,
@@ -25,7 +21,7 @@ export const TabBar: FNC<amotify.fn.Layout.TabBar.Params> = ( params ) => {
25
21
  ...others
26
22
  } = params;
27
23
 
28
- useEffect( () => {
24
+ React.useEffect( () => {
29
25
  if ( componentDidMount ) componentDidMount();
30
26
  },[] );
31
27
 
@@ -1,26 +1,20 @@
1
1
  import {
2
- useStore
2
+ useStore,
3
+ React
3
4
  } from '@global';
4
5
  import {
5
6
  Box,
6
7
  Flex
7
8
  } from '@atoms';
8
- import {
9
- Row
10
- } from '@mols';
11
- const {
12
- useEffect,
13
- useState,
14
- } = React;
15
9
 
16
10
  import style from './style.module.scss';
17
11
 
18
12
  import { memoryID } from './parts';
19
13
 
20
14
  export const Corner = () => {
21
- let [ val_active,set_active ] = useState( false );
15
+ let [ val_active,set_active ] = React.useState( false );
22
16
 
23
- useEffect( () => {
17
+ React.useEffect( () => {
24
18
  useStore.set( {
25
19
  key: memoryID + '-corner',
26
20
  value: {
@@ -1,13 +1,10 @@
1
1
  import {
2
- useStore
2
+ useStore,
3
+ React
3
4
  } from '@global';
4
5
  import {
5
6
  Row
6
7
  } from '@mols';
7
- const {
8
- useEffect,
9
- useState,
10
- } = React;
11
8
 
12
9
  import style from './style.module.scss';
13
10
 
@@ -22,9 +19,9 @@ export const Mini = ( params: amotify.fn.Loader.CompInput & {
22
19
  loaderID = '',
23
20
  ...props
24
21
  } = params;
25
- let [ val_key ] = useState( loaderID );
26
- let [ val_componentID ] = useState( $.uuidGen() );
27
- let [ val_active,set_active ] = useState( showInitial );
22
+ let [ val_key ] = React.useState( loaderID );
23
+ let [ val_componentID ] = React.useState( $.uuidGen() );
24
+ let [ val_active,set_active ] = React.useState( showInitial );
28
25
 
29
26
  let Size: amotify.UniStyles.Sizes.SizeParams = 0;
30
27
  if ( size == 'S' ) {
@@ -48,7 +45,7 @@ export const Mini = ( params: amotify.fn.Loader.CompInput & {
48
45
  }[ color as 'theme' ];
49
46
 
50
47
  let QuerySelector = '[data-component-id="' + val_componentID + '"]';
51
- useEffect( () => {
48
+ React.useEffect( () => {
52
49
  if ( val_active ) {
53
50
  $( QuerySelector )
54
51
  .removeClass( style.Hide )
@@ -62,7 +59,7 @@ export const Mini = ( params: amotify.fn.Loader.CompInput & {
62
59
  }
63
60
  },[ val_active ] );
64
61
 
65
- useEffect( () => {
62
+ React.useEffect( () => {
66
63
  useStore.set( {
67
64
  key: val_componentID,
68
65
  value: {
@@ -1,11 +1,8 @@
1
+ import React from 'react';
1
2
  import {
2
3
  LaunchReactApplication,
3
4
  useStore
4
5
  } from '@global';
5
- const {
6
- useEffect,
7
- useState,
8
- } = React;
9
6
 
10
7
  import style from './style.module.scss';
11
8
 
@@ -18,11 +15,11 @@ const SizeWrapper: {
18
15
  ( params: {
19
16
  color: amotify.fn.Loader.Colors
20
17
  } ): {
21
- S: FNC<amotify.fn.Loader.CompInput>
22
- R: FNC<amotify.fn.Loader.CompInput>
23
- L: FNC<amotify.fn.Loader.CompInput>
24
- XL: FNC<amotify.fn.Loader.CompInput>
25
- MAX: FNC<amotify.fn.Loader.CompInput>
18
+ S: React.FC<amotify.fn.Loader.CompInput>
19
+ R: React.FC<amotify.fn.Loader.CompInput>
20
+ L: React.FC<amotify.fn.Loader.CompInput>
21
+ XL: React.FC<amotify.fn.Loader.CompInput>
22
+ MAX: React.FC<amotify.fn.Loader.CompInput>
26
23
  }
27
24
  } = ( params ) => {
28
25
  let color = params.color;
@@ -1,26 +1,20 @@
1
1
  import {
2
- useStore
2
+ useStore,
3
+ React
3
4
  } from '@global';
4
5
  import {
5
6
  Box,
6
7
  Flex
7
8
  } from '@atoms';
8
- import {
9
- Row
10
- } from '@mols';
11
- const {
12
- useEffect,
13
- useState,
14
- } = React;
15
9
 
16
10
  import style from './style.module.scss';
17
11
 
18
12
  import { memoryID } from './parts';
19
13
 
20
14
  export const Top = () => {
21
- let [ val_active,set_active ] = useState( false );
15
+ let [ val_active,set_active ] = React.useState( false );
22
16
 
23
- useEffect( () => {
17
+ React.useEffect( () => {
24
18
  useStore.set( {
25
19
  key: memoryID + '-top',
26
20
  value: {
@@ -1,4 +1,5 @@
1
1
  import {
2
+ React,
2
3
  LaunchReactApplication,
3
4
  useStore
4
5
  } from '@global';
@@ -18,10 +19,6 @@ import {
18
19
  Input,
19
20
  Layout
20
21
  } from '@fn';
21
- const {
22
- useEffect,
23
- useState,
24
- } = React;
25
22
 
26
23
  import style from './style.module.scss';
27
24
 
@@ -81,9 +78,9 @@ const Comps = {
81
78
  mainSheetScrolls: 0,
82
79
  subSheetLength: 0,
83
80
  Core: ( params: Params ) => {
84
- let [ val_componentID ] = useState( $.uuidGen() );
85
- let [ val_params,set_params ] = useState( params );
86
- let [ val_open,set_open ] = useState( true );
81
+ let [ val_componentID ] = React.useState( $.uuidGen() );
82
+ let [ val_params,set_params ] = React.useState( params );
83
+ let [ val_open,set_open ] = React.useState( true );
87
84
 
88
85
  let {
89
86
  type,
@@ -113,7 +110,7 @@ const Comps = {
113
110
  'custom': 'Custom',
114
111
  }[ type ] as 'Normal' ];
115
112
 
116
- useEffect( () => {
113
+ React.useEffect( () => {
117
114
  useStore.set( {
118
115
  key: sheetID!,
119
116
  value: {
@@ -148,7 +145,7 @@ const Comps = {
148
145
  }
149
146
  } );
150
147
  } );
151
- useEffect( () => {
148
+ React.useEffect( () => {
152
149
  let {
153
150
  closeOption
154
151
  } = params;
@@ -168,7 +165,7 @@ const Comps = {
168
165
  } );
169
166
  } );
170
167
  },[] );
171
- useEffect( () => {
168
+ React.useEffect( () => {
172
169
  $.fnScope( () => {
173
170
  // #ROOT
174
171
  if ( !isNewSheet ) return;
@@ -412,8 +409,8 @@ const Comps = {
412
409
  'L': 3
413
410
  }
414
411
 
415
- let [ val_stableSize,set_stableSize ] = useState( size as any );
416
- let [ val_edit,set_edit ] = useState( {
412
+ let [ val_stableSize,set_stableSize ] = React.useState( size as any );
413
+ let [ val_edit,set_edit ] = React.useState( {
417
414
  process: false,
418
415
  processStart: 0,
419
416
  originY: 0,
@@ -527,7 +524,7 @@ const Comps = {
527
524
  }
528
525
 
529
526
  const mounted = React.useRef( false );
530
- useEffect( () => {
527
+ React.useEffect( () => {
531
528
  if ( mounted.current ) {
532
529
  if ( val_stableSize == 'ZERO' ) {
533
530
  if ( swipeDown ) Sheet.close( sheetID! );
@@ -828,8 +825,8 @@ const Sheet: amotify.fn.Sheet.Methods = {
828
825
  transformOrigin: 'top'
829
826
  },
830
827
  content: () => {
831
- let [ val_image ] = useState( $.flatArray( src ) );
832
- let [ val_viewIndex,set_viewIndex ] = useState( 0 );
828
+ let [ val_image ] = React.useState( $.flatArray( src ) );
829
+ let [ val_viewIndex,set_viewIndex ] = React.useState( 0 );
833
830
 
834
831
  let Radio: amotify.fn.Input.List.OptionParams[] = [];
835
832
  let Slides: ReactElement[] = [];
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  LaunchReactApplication,
3
- useStore
3
+ useStore,
4
+ React
4
5
  } from '@global';
5
6
  import {
6
7
  Box,
@@ -14,10 +15,6 @@ import {
14
15
  import {
15
16
  Buttons
16
17
  } from '@fn';
17
- const {
18
- useEffect,
19
- useState,
20
- } = React;
21
18
 
22
19
  import style from './style.module.scss';
23
20
 
@@ -38,7 +35,7 @@ type ElementParams = amotify.fn.SnackBar.AddParams & {
38
35
  snackID: string
39
36
  }
40
37
 
41
- const Cell: FNC<ElementParams> = ( props ) => {
38
+ const Cell: React.FC<ElementParams> = ( props ) => {
42
39
  let {
43
40
  snackID,
44
41
  secondsToClose = 10,
@@ -48,10 +45,10 @@ const Cell: FNC<ElementParams> = ( props ) => {
48
45
  ...others
49
46
  } = props;
50
47
 
51
- let [ val_componentID ] = useState( componentID );
52
- let [ val_mouseOn,set_mouseOn ] = useState( false );
48
+ let [ val_componentID ] = React.useState( componentID );
49
+ let [ val_mouseOn,set_mouseOn ] = React.useState( false );
53
50
 
54
- useEffect( () => {
51
+ React.useEffect( () => {
55
52
  let Query = '[data-component-id="' + val_componentID + '"]';
56
53
  setTimeout( () => {
57
54
  $( Query ).addClass( style.FadeIn );
@@ -67,7 +64,7 @@ const Cell: FNC<ElementParams> = ( props ) => {
67
64
  } );
68
65
  },[] );
69
66
 
70
- useEffect( () => {
67
+ React.useEffect( () => {
71
68
  $.interval.clear( 'SnackBar-' + val_componentID );
72
69
  if ( !val_mouseOn ) {
73
70
  setTimeout( () => {
@@ -138,10 +135,10 @@ const Cell: FNC<ElementParams> = ( props ) => {
138
135
 
139
136
  let SnackBarElements: ElementParams[] = [];
140
137
 
141
- const SnackBarsWrap: FNC<{}> = () => {
142
- let [ val_refresh,set_refresh ] = useState( $.uuidGen() );
138
+ const SnackBarsWrap: React.FC<{}> = () => {
139
+ let [ val_refresh,set_refresh ] = React.useState( $.uuidGen() );
143
140
 
144
- useEffect( () => {
141
+ React.useEffect( () => {
145
142
  useStore.set( {
146
143
  key: 'SnackBar',
147
144
  privateKey: SnackBar.__memoryID,
@@ -1,5 +1,6 @@
1
1
  import {
2
- useStore
2
+ useStore,
3
+ React
3
4
  } from '@global';
4
5
  import {
5
6
  FAIcon
@@ -8,10 +9,6 @@ import {
8
9
  Buttons,
9
10
  Tooltips,
10
11
  } from '@fn';
11
- const {
12
- useState,
13
- useEffect,
14
- } = React;
15
12
 
16
13
  import {
17
14
  Comps,
@@ -20,7 +17,7 @@ import {
20
17
 
21
18
  import style from '../style.module.scss';
22
19
 
23
- const HeadRow: FNC<amotify.fn.Tables.Drag.Params> = ( props ) => {
20
+ const HeadRow: React.FC<amotify.fn.Tables.Drag.Params> = ( props ) => {
24
21
  let {
25
22
  cellStyles = {},
26
23
  cellClassName = '',
@@ -70,7 +67,7 @@ const HeadRow: FNC<amotify.fn.Tables.Drag.Params> = ( props ) => {
70
67
  children={ Cols }
71
68
  /> );
72
69
  }
73
- const BodyRows: FNC<amotify.fn.Tables.Drag.Params> = ( props ) => {
70
+ const BodyRows: React.FC<amotify.fn.Tables.Drag.Params> = ( props ) => {
74
71
  let {
75
72
  cellStyles = {},
76
73
  cellClassName = '',
@@ -81,8 +78,8 @@ const BodyRows: FNC<amotify.fn.Tables.Drag.Params> = ( props ) => {
81
78
  onOrderChanged
82
79
  } = props;
83
80
 
84
- let [ val_componentID ] = useState( $.uuidGen() );
85
- let [ val_info,set_info ] = useState( {
81
+ let [ val_componentID ] = React.useState( $.uuidGen() );
82
+ let [ val_info,set_info ] = React.useState( {
86
83
  rows: rows,
87
84
  origin: 0,
88
85
  to: NaN
@@ -253,7 +250,7 @@ const BodyRows: FNC<amotify.fn.Tables.Drag.Params> = ( props ) => {
253
250
  /> )
254
251
  }
255
252
 
256
- useEffect( () => {
253
+ React.useEffect( () => {
257
254
  useStore.set( {
258
255
  key: val_componentID,
259
256
  value: {
@@ -291,7 +288,7 @@ const BodyRows: FNC<amotify.fn.Tables.Drag.Params> = ( props ) => {
291
288
  }
292
289
  } )
293
290
  } );
294
- useEffect( () => {
291
+ React.useEffect( () => {
295
292
  return () => {
296
293
  useStore.delete( val_componentID );
297
294
  }
@@ -303,7 +300,7 @@ const BodyRows: FNC<amotify.fn.Tables.Drag.Params> = ( props ) => {
303
300
  }
304
301
 
305
302
 
306
- export const DragTable: FNC<amotify.fn.Tables.Drag.Params> = ( params ) => {
303
+ export const DragTable: React.FC<amotify.fn.Tables.Drag.Params> = ( params ) => {
307
304
  params.colLength = params.colLength + 1;
308
305
 
309
306
  if ( params.head ) {
@@ -1,10 +1,11 @@
1
+ import React from 'react';
1
2
  import {
2
3
  Comps,
3
4
  DefaultCellSystemStyles
4
5
  } from '../_';
5
6
  import style from '../style.module.scss';
6
7
 
7
- const HeadRow: FNC<amotify.fn.Tables.Normal.Params> = ( params ) => {
8
+ const HeadRow: React.FC<amotify.fn.Tables.Normal.Params> = ( params ) => {
8
9
  let {
9
10
  cellStyles = {},
10
11
  cellClassName = '',
@@ -51,7 +52,7 @@ const HeadRow: FNC<amotify.fn.Tables.Normal.Params> = ( params ) => {
51
52
  children={ Cols }
52
53
  /> );
53
54
  }
54
- const BodyRows: FNC<amotify.fn.Tables.Normal.Params> = ( params ) => {
55
+ const BodyRows: React.FC<amotify.fn.Tables.Normal.Params> = ( params ) => {
55
56
  let {
56
57
  cellStyles = {},
57
58
  cellClassName = '',
@@ -109,7 +110,7 @@ const BodyRows: FNC<amotify.fn.Tables.Normal.Params> = ( params ) => {
109
110
  </> );
110
111
  }
111
112
 
112
- export const NormalTable: FNC<amotify.fn.Tables.Normal.Params> = ( params ) => {
113
+ export const NormalTable: React.FC<amotify.fn.Tables.Normal.Params> = ( params ) => {
113
114
  params.rows = params.rows.map( ( row,rowIndex ) => {
114
115
  row.rowID = row.rowID || rowIndex;
115
116
  return row;
@@ -1,5 +1,6 @@
1
1
  import {
2
- StyleConverter
2
+ StyleConverter,
3
+ React
3
4
  } from '@global';
4
5
 
5
6
  import {
@@ -8,7 +9,13 @@ import {
8
9
  } from '@atoms';
9
10
 
10
11
  export const Comps: amotify.fn.Tables.CompsMethods = {
11
- Table: ( params ) => ( <table { ...StyleConverter.ToClassName( params ) } /> ),
12
+ Table: ( params ) => {
13
+ let Params = StyleConverter.ToClassName( params );
14
+ return <table
15
+ { ...Params }
16
+ border={ Params.border as any }
17
+ />;
18
+ },
12
19
  Head: ( params ) => ( <thead { ...StyleConverter.ToClassName( params ) } /> ),
13
20
  Body: ( params ) => ( <tbody { ...StyleConverter.ToClassName( params ) } /> ),
14
21
  Row: ( params ) => ( <tr { ...StyleConverter.ToClassName( params ) } /> ),
@@ -37,7 +44,7 @@ import { DragTable } from './Drag/parts';
37
44
 
38
45
  import style from './style.module.scss';
39
46
 
40
- const Wrapper: FNC<amotify.fn.Tables.Uni.Params & {
47
+ const Wrapper: React.FC<amotify.fn.Tables.Uni.Params & {
41
48
  type: amotify.fn.Tables.Types
42
49
  }> = ( params ) => {
43
50
  let {
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import {
2
3
  Box
3
4
  } from '@atoms';
@@ -1,7 +1,8 @@
1
- import * as ReactDom from 'react-dom';
1
+ import React from 'react';
2
+ import ReactDOMCLient from 'react-dom/client';
2
3
  import * as ReactRouterDom from 'react-router-dom';
3
4
 
4
- export const LaunchReactApplication: amotify.glob.LaunchReactApplicationParams = ( props ) => {
5
+ export const LaunchReactApplication: amotify.global.LaunchReactApplicationParams = ( props ) => {
5
6
  let {
6
7
  baseElement = '#ROOT',
7
8
  reactElement,
@@ -26,5 +27,5 @@ export const LaunchReactApplication: amotify.glob.LaunchReactApplicationParams =
26
27
  }
27
28
  let reactDom = nonRouter ? reactElement : <ReactRouterDom.BrowserRouter children={ reactElement } />;
28
29
 
29
- ReactDom.createRoot( Base ).render( <React.StrictMode children={ reactDom } /> );
30
+ ReactDOMCLient.createRoot( Base ).render( <React.StrictMode children={ reactDom } /> );
30
31
  }
@@ -238,7 +238,7 @@ const FNs = {
238
238
  }
239
239
  }
240
240
 
241
- export const ReadStyleSet: amotify.glob.StyleConverter.ReadStyleSet = ( rawParams ) => {
241
+ export const ReadStyleSet: amotify.global.StyleConverter.ReadStyleSet = ( rawParams ) => {
242
242
  let params: amotifyBasicElement = { ...rawParams } as any;
243
243
  let {
244
244
  gradients,
@@ -367,7 +367,7 @@ export const ReadStyleSet: amotify.glob.StyleConverter.ReadStyleSet = ( rawParam
367
367
 
368
368
  return ReturnParams as any;
369
369
  }
370
- export const ToClassName: amotify.glob.StyleConverter.ToClassName = ( rawParams ) => {
370
+ export const ToClassName: amotify.global.StyleConverter.ToClassName = ( rawParams ) => {
371
371
  let params = ReadStyleSet( rawParams ) as amotifyBasicElement;
372
372
 
373
373
  let {
package/src/launch.tsx CHANGED
@@ -10,8 +10,8 @@ export { publicURI }
10
10
  import './@jsminAmotifyExtension/_';
11
11
  import {
12
12
  React,
13
- ReactDom,
14
- ReactRouterDom,
13
+ ReactDOM,
14
+ ReactRouterDOM,
15
15
  pageTransit,
16
16
  useStore,
17
17
  useRecycle,
@@ -66,7 +66,12 @@ import {
66
66
 
67
67
  const amotify: amotify = {
68
68
  config: defaultConfig,
69
- glob: { React,ReactDom,ReactRouterDom: ReactRouterDom as any,pageTransit,useStore,useRecycle,StyleConverter,LaunchReactApplication },
69
+ global: {
70
+ React,
71
+ ReactDOM,
72
+ ReactRouterDOM,
73
+ pageTransit,useStore,useRecycle,StyleConverter,LaunchReactApplication
74
+ },
70
75
  atoms: { Flex,FlexBr,FAIcon,Placeholder,Grid,Logo,Box,Span,Paragraph,Img },
71
76
  mols: { List,Accordion,LinkifyText,Text,Column,Row },
72
77
  orgs: { DisplayStyleInput },
@@ -5,14 +5,10 @@ import {
5
5
  import {
6
6
  Box
7
7
  } from '@atoms';
8
- const {
9
- useEffect,
10
- useState,
11
- } = React;
12
8
 
13
9
  import style from './style.module.scss';
14
10
 
15
- const Component: FNC<amotify.mols.Accordion.Params> = ( params ) => {
11
+ const Component: React.FC<amotify.mols.Accordion.Params> = ( params ) => {
16
12
  let {
17
13
  accordionID = '',
18
14
  slideAnimation = 'fast',
@@ -20,16 +16,16 @@ const Component: FNC<amotify.mols.Accordion.Params> = ( params ) => {
20
16
  ...others
21
17
  } = params;
22
18
 
23
- let [ val_wrapID ] = useState( $.uuidGen() );
24
- let [ val_contentID ] = useState( $.uuidGen() );
25
- let [ val_open,set_open ] = useState( open );
19
+ let [ val_wrapID ] = React.useState( $.uuidGen() );
20
+ let [ val_contentID ] = React.useState( $.uuidGen() );
21
+ let [ val_open,set_open ] = React.useState( open );
26
22
 
27
23
  if ( val_open != open ) set_open( open );
28
24
 
29
25
  let Query = '[data-accordion-content-id="' + val_contentID + '"]';
30
26
 
31
27
  const mounted = React.useRef( false );
32
- useEffect( () => {
28
+ React.useEffect( () => {
33
29
  let Content = $( Query )[ 0 ];
34
30
  if ( Content ) {
35
31
  let contentHeight = Content.offsetHeight;
@@ -45,7 +41,7 @@ const Component: FNC<amotify.mols.Accordion.Params> = ( params ) => {
45
41
  } )
46
42
  }
47
43
  },[] );
48
- useEffect( () => {
44
+ React.useEffect( () => {
49
45
  let Wrap = $( '#' + val_wrapID );
50
46
  let Content = $( Query )[ 0 ];
51
47
  if ( mounted.current ) {
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import {
2
3
  FAIcon
3
4
  } from '@atoms';
@@ -10,7 +11,7 @@ const {
10
11
  } = Buttons;
11
12
 
12
13
 
13
- export const LinkifyText: FNC<amotify.mols.LinkifyTextProps> = ( props ) => {
14
+ export const LinkifyText: React.FC<amotify.mols.LinkifyTextProps> = ( props ) => {
14
15
  let {
15
16
  text,
16
17
  placeholder
@@ -1,8 +1,9 @@
1
+ import React from 'react';
1
2
  import {
2
3
  Flex
3
4
  } from '@atoms';
4
5
 
5
- export const List: FNC<amotify.mols.List.Params> = ( params ) => {
6
+ export const List: React.FC<amotify.mols.List.Params> = ( params ) => {
6
7
  let {
7
8
  rows,
8
9
  rowStyles: DefaultRowStyles,
@@ -16,11 +16,6 @@ import {
16
16
  Input
17
17
  } from '@fn';
18
18
 
19
- const {
20
- useState,
21
- useEffect
22
- } = React;
23
-
24
19
  const ColorCell = ( params: {
25
20
  colorType: amotify.DarkModeTypes
26
21
  } ) => {
@@ -79,10 +74,10 @@ const ColorCell = ( params: {
79
74
  }
80
75
 
81
76
  export const Darkmode = ( params: amotify.orgs.DisplayStyleInput.DarkmodeInput ) => {
82
- let [ val_darkmode,set_darkmode ] = useState( amotify.config.darkMode || 'light' );
77
+ let [ val_darkmode,set_darkmode ] = React.useState( amotify.config.darkMode || 'light' );
83
78
 
84
79
  const mounted = React.useRef( false );
85
- useEffect( () => {
80
+ React.useEffect( () => {
86
81
  if ( mounted.current ) {
87
82
  params.onUpdate( val_darkmode );
88
83
  } else {
@@ -16,11 +16,6 @@ import {
16
16
  Input
17
17
  } from '@fn';
18
18
 
19
- const {
20
- useState,
21
- useEffect
22
- } = React;
23
-
24
19
  type ColorIconParams = {
25
20
  key: string
26
21
  icon: ReactElement
@@ -137,7 +132,7 @@ const GenOption = ( params: ColorIconParams ) => {
137
132
  }
138
133
 
139
134
  const ThemeColor: {
140
- ( type: 'all' | 'brand' | 'original' | 'basic' ): FNC<amotify.orgs.DisplayStyleInput.ThemeColorInput>
135
+ ( type: 'all' | 'brand' | 'original' | 'basic' ): React.FC<amotify.orgs.DisplayStyleInput.ThemeColorInput>
141
136
  } = ( type ) => {
142
137
  let ColorsArray: ColorIconParams[][] = [];
143
138
  if ( type == 'all' ) {
@@ -172,9 +167,9 @@ const ThemeColor: {
172
167
  }
173
168
  const Comp = ( params: amotify.orgs.DisplayStyleInput.ThemeColorInput ) => {
174
169
  const mounted = React.useRef( false );
175
- let [ val_ColorKey,set_ColorKey ] = useState( amotify.config.themeColor );
170
+ let [ val_ColorKey,set_ColorKey ] = React.useState( amotify.config.themeColor );
176
171
 
177
- useEffect( () => {
172
+ React.useEffect( () => {
178
173
  if ( mounted.current ) {
179
174
  params.onUpdate( val_ColorKey );
180
175
  } else {