amotify 0.0.17 → 0.0.18

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 (43) hide show
  1. package/@types/state.tsx +9 -2
  2. package/dist/amotify.js +2 -2
  3. package/dist/amotify.min.css +3 -3
  4. package/dist/coreVender.js +1 -1
  5. package/package.json +2 -2
  6. package/src/atoms/Logo/parts.tsx +14 -14
  7. package/src/atoms/Various/parts.tsx +6 -6
  8. package/src/functions/Button/_.tsx +23 -14
  9. package/src/functions/Button/style.module.scss +34 -60
  10. package/src/functions/Cropper/parts.tsx +119 -121
  11. package/src/functions/Effects/Fade.tsx +4 -4
  12. package/src/functions/Effects/style.module.scss +9 -1
  13. package/src/functions/Input/Chips/Selector.tsx +2 -2
  14. package/src/functions/Input/Chips/_.tsx +4 -4
  15. package/src/functions/Input/DigitCharacters.tsx +2 -2
  16. package/src/functions/Input/File/_.tsx +206 -213
  17. package/src/functions/Input/List/_.tsx +4 -4
  18. package/src/functions/Input/Segmented/_.tsx +12 -12
  19. package/src/functions/Input/Select/_.tsx +6 -7
  20. package/src/functions/Input/Slider/_.tsx +4 -4
  21. package/src/functions/Input/Text.tsx +104 -106
  22. package/src/functions/Input/TextArea.tsx +33 -35
  23. package/src/functions/Input/Time/Picker.tsx +14 -14
  24. package/src/functions/Input/Time/_.tsx +77 -79
  25. package/src/functions/Input/_.tsx +87 -93
  26. package/src/functions/Input/core.tsx +2 -2
  27. package/src/functions/Inputs/text.tsx +6 -8
  28. package/src/functions/Layout/PageNotFound.tsx +2 -2
  29. package/src/functions/Layout/PageViewController/parts.tsx +3 -5
  30. package/src/functions/Layout/Plate.tsx +2 -3
  31. package/src/functions/Layout/RootViewController/parts.tsx +4 -4
  32. package/src/functions/Layout/SwipeView/parts.tsx +4 -4
  33. package/src/functions/Layout/TabBar.tsx +2 -2
  34. package/src/functions/Sheet/parts.tsx +11 -11
  35. package/src/functions/SnackBar/parts.tsx +4 -3
  36. package/src/functions/Table/Data/parts.tsx +35 -37
  37. package/src/functions/Table/Drag/parts.tsx +6 -6
  38. package/src/functions/Table/Normal/parts.tsx +6 -6
  39. package/src/functions/Table/_.tsx +2 -2
  40. package/src/molecules/Accordion/parts.tsx +2 -2
  41. package/src/molecules/LinkifyText/parts.tsx +3 -5
  42. package/src/templates/PlayGround/parts.tsx +2 -2
  43. package/webpack.config.js +0 -6
@@ -30,14 +30,14 @@ export const FadeEffects: amotify.fn.Effects.Methods = {
30
30
  },animationDelay );
31
31
  },[] );
32
32
 
33
- return ( <Box
33
+ return <Box
34
34
  { ...others }
35
35
  freeCSS={ {
36
36
  ...others.freeCSS,
37
37
  opacity: 0,
38
38
  } }
39
39
  componentID={ val_componentID }
40
- /> );
40
+ />;
41
41
  },
42
42
  FadeUp: ( params ) => {
43
43
  let {
@@ -63,7 +63,7 @@ export const FadeEffects: amotify.fn.Effects.Methods = {
63
63
  },animationDelay );
64
64
  },[] );
65
65
 
66
- return ( <Box
66
+ return <Box
67
67
  paddingTop={ 2 }
68
68
  { ...others }
69
69
  freeCSS={ {
@@ -71,6 +71,6 @@ export const FadeEffects: amotify.fn.Effects.Methods = {
71
71
  opacity: 0,
72
72
  } }
73
73
  componentID={ val_componentID }
74
- /> );
74
+ />;
75
75
  }
76
76
  }
@@ -8,7 +8,7 @@
8
8
  &.Color_ {
9
9
  &white .RippleWrap {}
10
10
  &cloud .RippleWrap .Wave {
11
- background-color: rgba(var(--color-dark-rgb), .4) !important;
11
+ background-color: rgba(var(--color-dark-rgb), .25) !important;
12
12
  }
13
13
  &theme .RippleWrap .Wave {
14
14
  background-color: $color-theme-lighter !important;
@@ -79,5 +79,13 @@
79
79
  transition: $animation-time-short;
80
80
  transform: scale(0.97);
81
81
  }
82
+ &push {
83
+ &:active {
84
+ box-shadow: $shadow2 inset, 0 0 0 transparent !important;
85
+ }
86
+ &:focus {
87
+ box-shadow: 0 0 0 transparent inset, $shadow3;
88
+ }
89
+ }
82
90
  }
83
91
  }
@@ -238,7 +238,7 @@ const Selector = ( params: {
238
238
  ];
239
239
  }
240
240
 
241
- return ( <>
241
+ return <>
242
242
  <Column
243
243
  padding={ '2/3' }
244
244
  gap={ '2/3' }
@@ -364,7 +364,7 @@ const Selector = ( params: {
364
364
  { List }
365
365
  </Column>
366
366
  { params.bottomContent }
367
- </> );
367
+ </>;
368
368
  }
369
369
 
370
370
  export const ChipsInputFNs: amotify.fn.Input.Chips.FNs = {
@@ -56,7 +56,7 @@ const DataWrapping: React.FC<amotify.fn.Input.Chips.PlainParams> = ( params ) =>
56
56
  let DefaultValues = [ ...( params.value || [] ) ];
57
57
  let Values = DefaultValues.splice( 0,params.limit || 65535 );
58
58
 
59
- return ( <Core
59
+ return <Core
60
60
  SelectedCellComponent={ ( params ) => {
61
61
  let {
62
62
  value,
@@ -91,7 +91,7 @@ const DataWrapping: React.FC<amotify.fn.Input.Chips.PlainParams> = ( params ) =>
91
91
  } }
92
92
  { ...params }
93
93
  value={ Values }
94
- /> );
94
+ />;
95
95
  }
96
96
 
97
97
  const Core: React.FC<amotify.fn.Input.Chips.PlainParams> = ( params ) => {
@@ -229,7 +229,7 @@ const Core: React.FC<amotify.fn.Input.Chips.PlainParams> = ( params ) => {
229
229
  />
230
230
  } );
231
231
 
232
- return ( <BoxWrapper
232
+ return <BoxWrapper
233
233
  val_status={ val_status }
234
234
  set_status={ set_status }
235
235
  val_validate={ val_validate }
@@ -280,7 +280,7 @@ const Core: React.FC<amotify.fn.Input.Chips.PlainParams> = ( params ) => {
280
280
  /> : null }
281
281
  { Selected }
282
282
  </button>
283
- </BoxWrapper> );
283
+ </BoxWrapper>;
284
284
  }
285
285
 
286
286
  const ChipsInput: amotify.fn.Input.Chips.Methods = DataWrapping as any;
@@ -207,7 +207,7 @@ export const DigitCharactersInput: React.FC<amotify.fn.Input.DigitCharacters.Pla
207
207
  /> );
208
208
  }
209
209
 
210
- return ( <BoxWrapper
210
+ return <BoxWrapper
211
211
  val_status={ val_status }
212
212
  set_status={ set_status }
213
213
  val_validate={ val_validate }
@@ -231,5 +231,5 @@ export const DigitCharactersInput: React.FC<amotify.fn.Input.DigitCharacters.Pla
231
231
  >
232
232
  { Digits }
233
233
  </Flex>
234
- </BoxWrapper> );
234
+ </BoxWrapper>;
235
235
  }
@@ -146,62 +146,60 @@ const FileComponent: React.FC<amotify.fn.Input.Filer.PlainParams> = ( params ) =
146
146
  else Accept = accept;
147
147
  }
148
148
 
149
- return (
150
- <BoxWrapper
149
+ return <BoxWrapper
150
+ val_status={ val_status }
151
+ set_status={ set_status }
152
+ val_validate={ val_validate }
153
+ params={ params }
154
+ >
155
+ <input
156
+ type='file'
157
+ className={ style.Input }
158
+ data-form={ form }
159
+ data-input-type={ 'file' }
160
+ data-component-id={ val_status.componentID }
161
+ data-validation={ val_validate.ok }
162
+ accept={ Accept }
163
+ multiple={ limit == 1 ? false : true }
164
+ onChange={ async ( event ) => {
165
+ let Input = event.target;
166
+ let files = Input.files as any;
167
+ let newFiles = [];
168
+ for ( var i = 0; i < files?.length; i++ ) {
169
+ let file = files[ i ];
170
+ let fileName = file.name;
171
+ file.id = $.uuidGen();
172
+
173
+ if ( i + 1 + val_status.dataValue.length > limit ) {
174
+ SnackBar.add( {
175
+ componentID: fileName,
176
+ secondsToClose: 12000,
177
+ children: `ファイル登録数を超えたため、${ fileName }}は追加できませんでした。`,
178
+ backgroundColor: 'nega'
179
+ } );
180
+ continue;
181
+ }
182
+ newFiles.push( file );
183
+ }
184
+ set_status( {
185
+ ...val_status,
186
+ dataValue: [ ...val_status.dataValue,...newFiles ],
187
+ eventType: 'update',
188
+ eventID: $.uuidGen(),
189
+ } );
190
+ Input.value = '';
191
+ } }
192
+ { ...others }
193
+ tabIndex={ -1 }
194
+ value={ '' }
195
+ />
196
+ { !systemOnly ? <FileList
197
+ files={ val_status.dataValue }
198
+ params={ params }
151
199
  val_status={ val_status }
152
200
  set_status={ set_status }
153
- val_validate={ val_validate }
154
- params={ params }
155
- >
156
- <input
157
- type='file'
158
- className={ style.Input }
159
- data-form={ form }
160
- data-input-type={ 'file' }
161
- data-component-id={ val_status.componentID }
162
- data-validation={ val_validate.ok }
163
- accept={ Accept }
164
- multiple={ limit == 1 ? false : true }
165
- onChange={ async ( event ) => {
166
- let Input = event.target;
167
- let files = Input.files as any;
168
- let newFiles = [];
169
- for ( var i = 0; i < files?.length; i++ ) {
170
- let file = files[ i ];
171
- let fileName = file.name;
172
- file.id = $.uuidGen();
173
-
174
- if ( i + 1 + val_status.dataValue.length > limit ) {
175
- SnackBar.add( {
176
- componentID: fileName,
177
- secondsToClose: 12000,
178
- children: `ファイル登録数を超えたため、${ fileName }}は追加できませんでした。`,
179
- backgroundColor: 'nega'
180
- } );
181
- continue;
182
- }
183
- newFiles.push( file );
184
- }
185
- set_status( {
186
- ...val_status,
187
- dataValue: [ ...val_status.dataValue,...newFiles ],
188
- eventType: 'update',
189
- eventID: $.uuidGen(),
190
- } );
191
- Input.value = '';
192
- } }
193
- { ...others }
194
- tabIndex={ -1 }
195
- value={ '' }
196
- />
197
- { !systemOnly ? <FileList
198
- files={ val_status.dataValue }
199
- params={ params }
200
- val_status={ val_status }
201
- set_status={ set_status }
202
- /> : null }
203
- </BoxWrapper>
204
- );
201
+ /> : null }
202
+ </BoxWrapper>;
205
203
  }
206
204
 
207
205
  const FileList: React.FC<{
@@ -219,17 +217,15 @@ const FileList: React.FC<{
219
217
  let Left = ( params.limit || 1 ) - val_status.dataValue.length;
220
218
 
221
219
  let Files = files.map( ( file,index ) => {
222
- return (
223
- <FileCell
224
- key={ file.name }
225
- index={ index }
226
- file={ file }
227
- className={ params.cellClassName }
228
- val_status={ val_status }
229
- set_status={ set_status }
230
- fileNameEdit={ params.fileNameEdit }
231
- />
232
- );
220
+ return <FileCell
221
+ key={ file.name }
222
+ index={ index }
223
+ file={ file }
224
+ className={ params.cellClassName }
225
+ val_status={ val_status }
226
+ set_status={ set_status }
227
+ fileNameEdit={ params.fileNameEdit }
228
+ />;
233
229
  } );
234
230
 
235
231
  if ( Left > 0 ) {
@@ -282,12 +278,11 @@ const FileList: React.FC<{
282
278
  )
283
279
  }
284
280
 
285
- return ( <Column
281
+ return <Column
286
282
  flexSizing={ 'auto' }
287
283
  className={ params.className }
288
284
  children={ Files }
289
- />
290
- );
285
+ />;
291
286
  }
292
287
 
293
288
  const FileCell: React.FC<{
@@ -354,155 +349,153 @@ const FileCell: React.FC<{
354
349
  }
355
350
  },[ val_edit ] );
356
351
 
357
- return (
358
- <Flex
359
- verticalAlign='center'
360
- flexWrap={ false }
361
- gap={ 1 }
362
- className={ className }
363
- >
364
- <FAI.File
365
- fontSize={ '4.thirdTitle' }
366
- fontColor={ '4.thin' }
367
- />
368
- <Box flexSizing={ 0 }>
369
- <Box>
370
- <Flex
371
- verticalAlign='center'
372
- gap={ '2/3' }
373
- flexWrap={ false }
374
- className={ style.FileName }
375
- children={ !val_edit ? <>
376
- { fileName }
377
- { fileNameEdit ?
378
- <Buttons.Button.Clear.R
379
- ssSphere={ 2.5 }
380
- flexSizing={ 'none' }
381
- color='cloud'
382
- fontColor='4.thin'
383
- padding={ '1/3' }
384
- ssEffectsOnActive={ 'expand' }
385
- onClick={ () => {
386
- set_edit( true );
352
+ return <Flex
353
+ verticalAlign='center'
354
+ flexWrap={ false }
355
+ gap={ 1 }
356
+ className={ className }
357
+ >
358
+ <FAI.File
359
+ fontSize={ '4.thirdTitle' }
360
+ fontColor={ '4.thin' }
361
+ />
362
+ <Box flexSizing={ 0 }>
363
+ <Box>
364
+ <Flex
365
+ verticalAlign='center'
366
+ gap={ '2/3' }
367
+ flexWrap={ false }
368
+ className={ style.FileName }
369
+ children={ !val_edit ? <>
370
+ { fileName }
371
+ { fileNameEdit ?
372
+ <Buttons.Button.Clear.R
373
+ ssSphere={ 2.5 }
374
+ flexSizing={ 'none' }
375
+ color='cloud'
376
+ fontColor='4.thin'
377
+ padding={ '1/3' }
378
+ ssEffectsOnActive={ 'expand' }
379
+ onClick={ () => {
380
+ set_edit( true );
381
+ } }
382
+ >
383
+ <FAI.Pen />
384
+ </Buttons.Button.Clear.R> : null
385
+ }
386
+ </> : <>
387
+ <Column
388
+ gap={ '1/2' }
389
+ flexSizing={ 0 }
390
+ >
391
+ <Flex
392
+ gap={ '2/3' }
393
+ verticalAlign='center'
394
+ >
395
+ <Input.Text.Normal
396
+ tone='border'
397
+ wrapStyles={ {
398
+ flexSizing: 'auto'
387
399
  } }
388
- >
389
- <FAI.Pen />
390
- </Buttons.Button.Clear.R> : null
391
- }
392
- </> : <>
393
- <Column
394
- gap={ '1/2' }
395
- flexSizing={ 0 }
400
+ restrict='fileName'
401
+ name='name'
402
+ required
403
+ id={ FileID }
404
+ form={ 'form-' + FileID }
405
+ enableFormSubmit
406
+ value={ name }
407
+ onKeyDown={ ( event ) => {
408
+ let { key } = event;
409
+ if ( key == 'Escape' ) set_edit( false );
410
+ } }
411
+ />
412
+ <Box>
413
+ . { extension }
414
+ </Box>
415
+ </Flex>
416
+ <Flex
417
+ gap={ '2/3' }
418
+ horizontalAlign='right'
419
+ flexWrap={ false }
396
420
  >
397
- <Flex
398
- gap={ '2/3' }
399
- verticalAlign='center'
400
- >
401
- <Input.Text.Normal
402
- tone='border'
403
- wrapStyles={ {
404
- flexSizing: 'auto'
405
- } }
406
- restrict='fileName'
407
- name='name'
408
- required
409
- id={ FileID }
410
- form={ 'form-' + FileID }
411
- enableFormSubmit
412
- value={ name }
413
- onKeyDown={ ( event ) => {
414
- let { key } = event;
415
- if ( key == 'Escape' ) set_edit( false );
416
- } }
417
- />
418
- <Box>
419
- . { extension }
420
- </Box>
421
- </Flex>
422
- <Flex
423
- gap={ '2/3' }
424
- horizontalAlign='right'
425
- flexWrap={ false }
426
- >
427
- <Buttons.Button.Sub.R
428
- padding={ [ '2/3',1 ] }
429
- children={ '閉じる' }
430
- onClick={ () => {
421
+ <Buttons.Button.Sub.R
422
+ padding={ [ '2/3',1 ] }
423
+ children={ '閉じる' }
424
+ onClick={ () => {
425
+ set_edit( false );
426
+ } }
427
+ />
428
+ <Buttons.Button.Prime.R
429
+ padding={ [ '2/3',1 ] }
430
+ submitOption={ {
431
+ formName: 'form-' + FileID,
432
+ submitDelegationKey: 'auxEnter',
433
+ callback: async ( form ) => {
434
+ let { name } = form;
435
+ let nextFiles = [ ...val_status.dataValue ];
436
+ let prevFile = nextFiles[ index ];
437
+ let id = prevFile.id;
438
+ if ( !prevFile ) return;
439
+
440
+ let { target } = await prevFile.read();
441
+ if ( !target ) return;
442
+ let dataUrl = String( target.result );
443
+
444
+ let newBlob = await dataUrl.toBlob( file.type )
445
+ if ( !newBlob ) return;
446
+ let newFile: any = new File( [ newBlob ],name + '.' + extension,{ type: prevFile.type } );
447
+ newFile.id = id;
448
+
449
+ nextFiles[ index ] = newFile;
450
+
451
+ set_status( {
452
+ ...val_status,
453
+ dataValue: nextFiles,
454
+ eventType: 'update',
455
+ eventID: $.uuidGen(),
456
+ } );
431
457
  set_edit( false );
432
- } }
433
- />
434
- <Buttons.Button.Prime.R
435
- padding={ [ '2/3',1 ] }
436
- submitOption={ {
437
- formName: 'form-' + FileID,
438
- submitDelegationKey: 'auxEnter',
439
- callback: async ( form ) => {
440
- let { name } = form;
441
- let nextFiles = [ ...val_status.dataValue ];
442
- let prevFile = nextFiles[ index ];
443
- let id = prevFile.id;
444
- if ( !prevFile ) return;
445
-
446
- let { target } = await prevFile.read();
447
- if ( !target ) return;
448
- let dataUrl = String( target.result );
449
-
450
- let newBlob = await dataUrl.toBlob( file.type )
451
- if ( !newBlob ) return;
452
- let newFile: any = new File( [ newBlob ],name + '.' + extension,{ type: prevFile.type } );
453
- newFile.id = id;
454
-
455
- nextFiles[ index ] = newFile;
456
-
457
- set_status( {
458
- ...val_status,
459
- dataValue: nextFiles,
460
- eventType: 'update',
461
- eventID: $.uuidGen(),
462
- } );
463
- set_edit( false );
464
- }
465
- } }
466
- >
467
- 決定
468
- </Buttons.Button.Prime.R>
469
- </Flex>
470
- </Column>
471
- </>
472
- }
473
- />
474
- </Box>
475
- { !val_edit ? <>
476
- <Box
477
- fontSize={ '1.mini' }
478
- fontColor={ '4.thin' }
479
- flexSizing={ 0 }
480
- children={ FileName + 'ファイル / ' + Size + 'B' }
481
- />
482
- </> : null }
458
+ }
459
+ } }
460
+ >
461
+ 決定
462
+ </Buttons.Button.Prime.R>
463
+ </Flex>
464
+ </Column>
465
+ </>
466
+ }
467
+ />
483
468
  </Box>
484
- <Buttons.Button.Sub.R
485
- color='cloud'
486
- fontColor='4.thin'
487
- ssSphere={ 3 }
488
- onClick={ () => {
489
- let nextFiles = [ ...val_status.dataValue ];
490
- let prevFile = nextFiles[ index ];
491
- if ( !prevFile ) return;
492
-
493
- nextFiles.splice( index,1 );
494
- set_status( {
495
- ...val_status,
496
- dataValue: nextFiles,
497
- eventType: 'update',
498
- eventID: $.uuidGen(),
499
- } )
500
- } }
501
- >
502
- <FAI.Times />
503
- </Buttons.Button.Sub.R>
504
- </Flex>
505
- );
469
+ { !val_edit ? <>
470
+ <Box
471
+ fontSize={ '1.mini' }
472
+ fontColor={ '4.thin' }
473
+ flexSizing={ 0 }
474
+ children={ FileName + 'ファイル / ' + Size + 'B' }
475
+ />
476
+ </> : null }
477
+ </Box>
478
+ <Buttons.Button.Sub.R
479
+ color='cloud'
480
+ fontColor='4.thin'
481
+ ssSphere={ 3 }
482
+ onClick={ () => {
483
+ let nextFiles = [ ...val_status.dataValue ];
484
+ let prevFile = nextFiles[ index ];
485
+ if ( !prevFile ) return;
486
+
487
+ nextFiles.splice( index,1 );
488
+ set_status( {
489
+ ...val_status,
490
+ dataValue: nextFiles,
491
+ eventType: 'update',
492
+ eventID: $.uuidGen(),
493
+ } )
494
+ } }
495
+ >
496
+ <FAI.Times />
497
+ </Buttons.Button.Sub.R>
498
+ </Flex>;
506
499
  }
507
500
 
508
501
 
@@ -129,7 +129,7 @@ const Core: React.FC<amotify.fn.Input.List.OriginParams> = ( params ) => {
129
129
  DefaultValidation
130
130
  } );
131
131
 
132
- return ( <BoxWrapper
132
+ return <BoxWrapper
133
133
  val_status={ val_status }
134
134
  set_status={ set_status }
135
135
  val_validate={ val_validate }
@@ -148,7 +148,7 @@ const Core: React.FC<amotify.fn.Input.List.OriginParams> = ( params ) => {
148
148
  val_status={ val_status }
149
149
  set_status={ set_status }
150
150
  />
151
- </BoxWrapper> );
151
+ </BoxWrapper>;
152
152
  }
153
153
 
154
154
  const CellList: React.FC<{
@@ -332,7 +332,7 @@ const CellList: React.FC<{
332
332
  ];
333
333
  } );
334
334
 
335
- return ( <Flex
335
+ return <Flex
336
336
  flexSizing={ 'auto' }
337
337
  freeCSS={ {
338
338
  ...params.freeCSS
@@ -345,7 +345,7 @@ const CellList: React.FC<{
345
345
  style[ 'Tone_' + tone ]
346
346
  ].join( ' ' ) }
347
347
  children={ Cells }
348
- /> );
348
+ />;
349
349
  }
350
350
 
351
351
  const Comps = {