amotify 0.0.13 → 0.0.14
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.
- package/@types/amot.tsx +48 -63
- package/@types/fn.tsx +10 -16
- package/dist/amotify.js +1 -1
- package/dist/amotify.min.css +8 -9
- package/dist/coreVender.js +14 -0
- package/package.json +27 -22
- package/src/@atoms.tsx +4 -2
- package/src/@global.tsx +5 -0
- package/src/@jsminAmotifyExtension/fetch.tsx +2 -0
- package/src/@jsminAmotifyExtension/variables.tsx +4 -0
- package/src/@organisms.tsx +1 -5
- package/src/@styles/init.scss +1 -1
- package/src/@variables.tsx +70 -0
- package/src/atoms/FAI/parts.tsx +134 -0
- package/src/config.tsx +31 -5
- package/src/functions/Button/_.tsx +0 -1
- package/src/functions/Cropper/parts.tsx +18 -10
- package/src/functions/Effects/Ripple.tsx +1 -1
- package/src/functions/Input/Chips/Selector.tsx +9 -9
- package/src/functions/Input/Chips/_.tsx +10 -3
- package/src/functions/Input/DigitCharacters.tsx +13 -15
- package/src/functions/Input/File/_.tsx +35 -63
- package/src/functions/Input/Hidden.tsx +3 -1
- package/src/functions/Input/List/_.tsx +8 -8
- package/src/functions/Input/Select/_.tsx +8 -7
- package/src/functions/Input/Slider/_.tsx +5 -5
- package/src/functions/Input/Switch/_.tsx +9 -8
- package/src/functions/Input/Text.tsx +3 -4
- package/src/functions/Input/TextArea.tsx +3 -3
- package/src/functions/Input/Time/Picker.tsx +10 -17
- package/src/functions/Input/Time/_.tsx +3 -2
- package/src/functions/Input/Time/style.module.scss +9 -2
- package/src/functions/Input/_.tsx +24 -12
- package/src/functions/Input/core.tsx +10 -10
- package/src/functions/Input/style.module.scss +16 -3
- package/src/functions/Layout/PageNotFound.tsx +2 -4
- package/src/functions/Layout/PageRouter.tsx +2 -3
- package/src/functions/Loader/parts.tsx +3 -1
- package/src/functions/Loader/style.module.scss +1 -1
- package/src/functions/Sheet/parts.tsx +45 -42
- package/src/functions/Sheet/style.module.scss +16 -23
- package/src/functions/SnackBar/parts.tsx +5 -3
- package/src/functions/SnackBar/style.module.scss +1 -1
- package/src/functions/Table/Data/parts.tsx +18 -12
- package/src/functions/Table/Drag/parts.tsx +7 -9
- package/src/functions/Table/_.tsx +2 -2
- package/src/global/LaunchReactApplication.tsx +16 -5
- package/src/launch.tsx +12 -5
- package/src/molecules/Accordion/parts.tsx +4 -1
- package/src/molecules/LinkifyText/parts.tsx +2 -3
- package/src/preload.tsx +19 -30
- package/tsconfig.json +19 -8
- package/webpack.config.js +16 -5
- package/src/atoms/FAIcon/parts.tsx +0 -118
- package/src/atoms/FAIcon/style.module.scss +0 -8
- package/src/organisms/DisplayStyleInput/_.tsx +0 -18
- package/src/organisms/DisplayStyleInput/darkmode.tsx +0 -107
- package/src/organisms/DisplayStyleInput/themeColor.tsx +0 -205
|
@@ -77,7 +77,7 @@ export const DigitCharactersInput: React.FC<amotify.fn.Input.DigitCharacters.Pla
|
|
|
77
77
|
className = '',
|
|
78
78
|
digits,
|
|
79
79
|
numericOnly = false,
|
|
80
|
-
|
|
80
|
+
enableFormSubmit,
|
|
81
81
|
|
|
82
82
|
checkValidationAtFirst,
|
|
83
83
|
onChange,onKeyDown,
|
|
@@ -87,7 +87,7 @@ export const DigitCharactersInput: React.FC<amotify.fn.Input.DigitCharacters.Pla
|
|
|
87
87
|
value = '',
|
|
88
88
|
|
|
89
89
|
override,
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
componentID,
|
|
92
92
|
listStyles,
|
|
93
93
|
...others
|
|
@@ -127,27 +127,24 @@ export const DigitCharactersInput: React.FC<amotify.fn.Input.DigitCharacters.Pla
|
|
|
127
127
|
|
|
128
128
|
let Styles: React.CSSProperties = {}
|
|
129
129
|
|
|
130
|
+
let ClassName = className;
|
|
131
|
+
|
|
130
132
|
if ( params.combineInput ) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
} else if ( index == digits - 1 ) {
|
|
137
|
-
Styles = {
|
|
138
|
-
borderTopRightRadius: 'inherit',
|
|
139
|
-
borderBottomRightRadius: 'inherit'
|
|
140
|
-
}
|
|
141
|
-
}
|
|
133
|
+
ClassName = [
|
|
134
|
+
className,
|
|
135
|
+
style.DigitCharacterCell,
|
|
136
|
+
style.Combined
|
|
137
|
+
].join( ' ' );
|
|
142
138
|
}
|
|
143
139
|
|
|
144
140
|
Digits.push( <input
|
|
141
|
+
key={ index }
|
|
145
142
|
type={ 'text' }
|
|
146
143
|
inputMode={ params.inputMode || 'text' }
|
|
147
144
|
value={ Character }
|
|
148
145
|
data-form-name={ form }
|
|
149
146
|
id={ 'Digit-' + index + '-' + val_status.componentID }
|
|
150
|
-
className={
|
|
147
|
+
className={ ClassName }
|
|
151
148
|
style={ {
|
|
152
149
|
...params.style,
|
|
153
150
|
...Styles
|
|
@@ -177,7 +174,7 @@ export const DigitCharactersInput: React.FC<amotify.fn.Input.DigitCharacters.Pla
|
|
|
177
174
|
let dir = Number( key == 'ArrowRight' ) * 2 - 1;
|
|
178
175
|
nextFocusIndex = index + dir;
|
|
179
176
|
} else {
|
|
180
|
-
if (
|
|
177
|
+
if ( enableFormSubmit ) SubmitForm( event );
|
|
181
178
|
|
|
182
179
|
( () => {
|
|
183
180
|
let regExp = code.match( /^(Key(.)|Digit(\d)|Numpad(\d))/ );
|
|
@@ -206,6 +203,7 @@ export const DigitCharactersInput: React.FC<amotify.fn.Input.DigitCharacters.Pla
|
|
|
206
203
|
$( '#Digit-' + nextFocusIndex + '-' + val_status.componentID ).focus();
|
|
207
204
|
}
|
|
208
205
|
} }
|
|
206
|
+
onChange={ () => { } }
|
|
209
207
|
/> );
|
|
210
208
|
}
|
|
211
209
|
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
Box,
|
|
7
7
|
Flex,
|
|
8
|
-
|
|
8
|
+
FAI
|
|
9
9
|
} from '@atoms';
|
|
10
10
|
import {
|
|
11
11
|
Column,
|
|
@@ -26,6 +26,8 @@ import {
|
|
|
26
26
|
} from '../core';
|
|
27
27
|
import style from './style.module.scss';
|
|
28
28
|
|
|
29
|
+
import { faCloudArrowUp } from '@fortawesome/pro-solid-svg-icons/faCloudArrowUp';
|
|
30
|
+
|
|
29
31
|
function DefaultValidation( props: {
|
|
30
32
|
value: any
|
|
31
33
|
params: any
|
|
@@ -64,6 +66,9 @@ const FileComponent: React.FC<amotify.fn.Input.Filer.PlainParams> = ( params ) =
|
|
|
64
66
|
|
|
65
67
|
cellStyles,cellClassName,
|
|
66
68
|
|
|
69
|
+
componentID,status_id,
|
|
70
|
+
enableFormSubmit,
|
|
71
|
+
|
|
67
72
|
...others
|
|
68
73
|
} = params;
|
|
69
74
|
|
|
@@ -250,8 +255,8 @@ const FileList: React.FC<{
|
|
|
250
255
|
isRounded
|
|
251
256
|
className={ style.AddIcon }
|
|
252
257
|
>
|
|
253
|
-
<
|
|
254
|
-
|
|
258
|
+
<FAI
|
|
259
|
+
icon={ faCloudArrowUp }
|
|
255
260
|
className={ style.Icon }
|
|
256
261
|
fontColor={ 'theme' }
|
|
257
262
|
backgroundColor={ 'tcOpLow' }
|
|
@@ -316,70 +321,31 @@ const FileCell: React.FC<{
|
|
|
316
321
|
.replace( /\s/,'' )
|
|
317
322
|
.replace( /(.*)\.(.*)$/,'$1 $2' ).split( ' ' );
|
|
318
323
|
|
|
319
|
-
let
|
|
320
|
-
name: '不明',
|
|
321
|
-
icon: 'fal file'
|
|
322
|
-
}
|
|
324
|
+
let FileName = 'ファイル';
|
|
323
325
|
if ( type.match( /image/ ) ) {
|
|
324
|
-
|
|
325
|
-
name: type.replace( /image\//,'' ),
|
|
326
|
-
icon: 'image'
|
|
327
|
-
}
|
|
326
|
+
FileName = type.replace( /image\//,'' );
|
|
328
327
|
} else if ( type.match( /pdf/ ) ) {
|
|
329
|
-
|
|
330
|
-
name: 'PDF',
|
|
331
|
-
icon: 'file-pdf'
|
|
332
|
-
}
|
|
328
|
+
FileName = 'PDF';
|
|
333
329
|
} else if ( type.match( /csv/ ) ) {
|
|
334
|
-
|
|
335
|
-
name: 'CSV',
|
|
336
|
-
icon: 'file-csv'
|
|
337
|
-
}
|
|
330
|
+
FileName = 'CSV';
|
|
338
331
|
} else if ( type.match( /spreadsheet/ ) ) {
|
|
339
|
-
|
|
340
|
-
name: 'SpreadSheet',
|
|
341
|
-
icon: 'file-excel'
|
|
342
|
-
}
|
|
332
|
+
FileName = 'SpreadSheet';
|
|
343
333
|
} else if ( type.match( /presentation/ ) ) {
|
|
344
|
-
|
|
345
|
-
name: 'PowerPoint',
|
|
346
|
-
icon: 'file-powerpoint'
|
|
347
|
-
}
|
|
334
|
+
FileName = 'PowerPoint';
|
|
348
335
|
} else if ( type.match( /word/ ) ) {
|
|
349
|
-
|
|
350
|
-
name: 'Word',
|
|
351
|
-
icon: 'file-word'
|
|
352
|
-
}
|
|
336
|
+
FileName = 'Word';
|
|
353
337
|
} else if ( type.match( /zip/ ) ) {
|
|
354
|
-
|
|
355
|
-
name: 'Zip',
|
|
356
|
-
icon: 'file-zipper'
|
|
357
|
-
}
|
|
338
|
+
FileName = 'Zip';
|
|
358
339
|
} else if ( type.match( /powerpoint/ ) ) {
|
|
359
|
-
|
|
360
|
-
name: 'PowerPoint',
|
|
361
|
-
icon: 'file-powerpoint'
|
|
362
|
-
}
|
|
340
|
+
FileName = 'PowerPoint';
|
|
363
341
|
} else if ( type.match( /html/ ) ) {
|
|
364
|
-
|
|
365
|
-
name: 'HTML',
|
|
366
|
-
icon: 'fab html5'
|
|
367
|
-
}
|
|
342
|
+
FileName = 'HTML';
|
|
368
343
|
} else if ( type.match( /js/ ) ) {
|
|
369
|
-
|
|
370
|
-
name: 'JS',
|
|
371
|
-
icon: 'fab js-square'
|
|
372
|
-
}
|
|
344
|
+
FileName = 'JavaScript';
|
|
373
345
|
} else if ( type.match( /css/ ) ) {
|
|
374
|
-
|
|
375
|
-
name: 'CSS',
|
|
376
|
-
icon: 'fab css3-alt'
|
|
377
|
-
}
|
|
346
|
+
FileName = 'CSS';
|
|
378
347
|
} else if ( type.match( /text\/plain/ ) ) {
|
|
379
|
-
|
|
380
|
-
name: 'テキスト',
|
|
381
|
-
icon: 'file-lines'
|
|
382
|
-
}
|
|
348
|
+
FileName = 'テキスト';
|
|
383
349
|
}
|
|
384
350
|
|
|
385
351
|
React.useEffect( () => {
|
|
@@ -397,10 +363,9 @@ const FileCell: React.FC<{
|
|
|
397
363
|
gap={ 1 }
|
|
398
364
|
className={ className }
|
|
399
365
|
>
|
|
400
|
-
<
|
|
366
|
+
<FAI.File
|
|
401
367
|
fontSize={ '4.thirdTitle' }
|
|
402
|
-
fontColor={ '
|
|
403
|
-
d={ FileType.icon }
|
|
368
|
+
fontColor={ '4.thin' }
|
|
404
369
|
/>
|
|
405
370
|
<Box flexSizing={ 0 }>
|
|
406
371
|
<Box>
|
|
@@ -413,13 +378,18 @@ const FileCell: React.FC<{
|
|
|
413
378
|
{ fileName }
|
|
414
379
|
{ fileNameEdit ?
|
|
415
380
|
<Buttons.Button.Clear.R
|
|
381
|
+
ssSphere={ 2.5 }
|
|
382
|
+
flexSizing={ 'none' }
|
|
383
|
+
color='cloud'
|
|
384
|
+
fontColor='4.thin'
|
|
416
385
|
padding={ '1/3' }
|
|
417
386
|
ssEffectsOnActive={ 'expand' }
|
|
418
|
-
children={ <FAIcon d='pen' /> }
|
|
419
387
|
onClick={ () => {
|
|
420
388
|
set_edit( true );
|
|
421
389
|
} }
|
|
422
|
-
|
|
390
|
+
>
|
|
391
|
+
<FAI.Pen />
|
|
392
|
+
</Buttons.Button.Clear.R> : null
|
|
423
393
|
}
|
|
424
394
|
</> : <>
|
|
425
395
|
<Column
|
|
@@ -440,7 +410,7 @@ const FileCell: React.FC<{
|
|
|
440
410
|
required
|
|
441
411
|
id={ FileID }
|
|
442
412
|
form={ 'form-' + FileID }
|
|
443
|
-
|
|
413
|
+
enableFormSubmit
|
|
444
414
|
value={ name }
|
|
445
415
|
onKeyDown={ ( event ) => {
|
|
446
416
|
let { key } = event;
|
|
@@ -509,11 +479,13 @@ const FileCell: React.FC<{
|
|
|
509
479
|
fontSize={ '1.mini' }
|
|
510
480
|
fontColor={ '4.thin' }
|
|
511
481
|
flexSizing={ 0 }
|
|
512
|
-
children={
|
|
482
|
+
children={ FileName + 'ファイル / ' + Size + 'B' }
|
|
513
483
|
/>
|
|
514
484
|
</> : null }
|
|
515
485
|
</Box>
|
|
516
486
|
<Buttons.Button.Sub.R
|
|
487
|
+
color='cloud'
|
|
488
|
+
fontColor='4.thin'
|
|
517
489
|
ssSphere={ 3 }
|
|
518
490
|
onClick={ () => {
|
|
519
491
|
let nextFiles = [ ...val_status.dataValue ];
|
|
@@ -529,7 +501,7 @@ const FileCell: React.FC<{
|
|
|
529
501
|
} )
|
|
530
502
|
} }
|
|
531
503
|
>
|
|
532
|
-
<
|
|
504
|
+
<FAI.Times />
|
|
533
505
|
</Buttons.Button.Sub.R>
|
|
534
506
|
</Flex>
|
|
535
507
|
);
|
|
@@ -2,10 +2,12 @@ import React from 'react';
|
|
|
2
2
|
export const HiddenInput: React.FC<amotify.fn.Input.Hidden.PlainParams> = ( params ) => {
|
|
3
3
|
let {
|
|
4
4
|
componentID = '',
|
|
5
|
+
enableFormSubmit,
|
|
6
|
+
|
|
5
7
|
form,
|
|
6
8
|
value = '',
|
|
7
9
|
...others
|
|
8
|
-
} = params;
|
|
10
|
+
} = params;
|
|
9
11
|
|
|
10
12
|
return <input
|
|
11
13
|
value={ JSON.stringify( value ) }
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
Box,
|
|
6
6
|
Flex,
|
|
7
|
-
|
|
7
|
+
FAI
|
|
8
8
|
} from '@atoms';
|
|
9
9
|
import {
|
|
10
10
|
Input,
|
|
@@ -84,12 +84,12 @@ const Core: React.FC<amotify.fn.Input.List.OriginParams> = ( params ) => {
|
|
|
84
84
|
componentID = '',
|
|
85
85
|
form,
|
|
86
86
|
override,
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
freeCSS,
|
|
89
89
|
icon,
|
|
90
90
|
iconType,
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
enableFormSubmit,
|
|
93
93
|
defaultActiveStyling,
|
|
94
94
|
checkValidationAtFirst,
|
|
95
95
|
onValidate,
|
|
@@ -180,7 +180,7 @@ const CellList: React.FC<{
|
|
|
180
180
|
cellCheckedStyles: DefaultCellCheckedStyles,
|
|
181
181
|
cellCheckedClassName: DefaultCellCheckedClassName = '',
|
|
182
182
|
|
|
183
|
-
|
|
183
|
+
enableFormSubmit,
|
|
184
184
|
defaultActiveStyling = true
|
|
185
185
|
} = params;
|
|
186
186
|
let {
|
|
@@ -240,6 +240,7 @@ const CellList: React.FC<{
|
|
|
240
240
|
|
|
241
241
|
return [
|
|
242
242
|
<input
|
|
243
|
+
key={ 'List-' + JSON.stringify( value ) }
|
|
243
244
|
type={ type == 'radio' ? 'radio' : 'checkbox' }
|
|
244
245
|
className={ [
|
|
245
246
|
style.Input,
|
|
@@ -247,7 +248,6 @@ const CellList: React.FC<{
|
|
|
247
248
|
].join( ' ' ) }
|
|
248
249
|
name={ 'RadioCheckbox-' + name }
|
|
249
250
|
data-list-index={ componentID + '-' + index }
|
|
250
|
-
key={ CellID }
|
|
251
251
|
id={ CellID }
|
|
252
252
|
value={ String( value ) }
|
|
253
253
|
data-form-name={ form }
|
|
@@ -310,12 +310,12 @@ const CellList: React.FC<{
|
|
|
310
310
|
}
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
if (
|
|
313
|
+
if ( enableFormSubmit ) SubmitForm( event );
|
|
314
314
|
} }
|
|
315
315
|
tabIndex={ tabIndex }
|
|
316
316
|
/>,
|
|
317
317
|
<Buttons.Label.Plain
|
|
318
|
-
key={ '
|
|
318
|
+
key={ 'ListTrigger-' + JSON.stringify( value ) }
|
|
319
319
|
htmlFor={ CellID }
|
|
320
320
|
className={ ClassName.join( ' ' ) }
|
|
321
321
|
tabIndex={ -1 }
|
|
@@ -371,7 +371,7 @@ const Comps = {
|
|
|
371
371
|
position='relative'
|
|
372
372
|
flexCenter
|
|
373
373
|
>
|
|
374
|
-
<
|
|
374
|
+
<FAI.Check
|
|
375
375
|
className={ style.I }
|
|
376
376
|
transition='middle'
|
|
377
377
|
opacity='trans'
|
|
@@ -84,7 +84,7 @@ const Core: React.FC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
|
|
|
84
84
|
form,
|
|
85
85
|
className,
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
enableFormSubmit,
|
|
88
88
|
enableUnSelected,
|
|
89
89
|
|
|
90
90
|
checkValidationAtFirst,
|
|
@@ -96,7 +96,8 @@ const Core: React.FC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
|
|
|
96
96
|
options,
|
|
97
97
|
placeholder,
|
|
98
98
|
|
|
99
|
-
leftIndicator,rightIndicator,rightIcon,
|
|
99
|
+
leftIndicator,rightIndicator,leftIcon,rightIcon,
|
|
100
|
+
componentID,status_id,
|
|
100
101
|
|
|
101
102
|
...others
|
|
102
103
|
} = params;
|
|
@@ -158,7 +159,7 @@ const Core: React.FC<amotify.fn.Input.Select.PlainParams> = ( params ) => {
|
|
|
158
159
|
value={ val_status.dataValue }
|
|
159
160
|
onKeyDown={ ( event ) => {
|
|
160
161
|
if ( onKeyDown ) onKeyDown( event );
|
|
161
|
-
if (
|
|
162
|
+
if ( enableFormSubmit ) SubmitForm( event );
|
|
162
163
|
} }
|
|
163
164
|
onChange={ ( event ) => {
|
|
164
165
|
let {
|
|
@@ -199,19 +200,19 @@ const Options: React.FC<{ params: amotify.fn.Input.Select.PlainParams }> = ( pro
|
|
|
199
200
|
label,
|
|
200
201
|
} = option;
|
|
201
202
|
let Value = String( value );
|
|
202
|
-
return
|
|
203
|
+
return <option
|
|
203
204
|
value={ Value }
|
|
204
205
|
key={ Value }
|
|
205
|
-
selected={ Value == SelectedValue }
|
|
206
|
+
// selected={ Value == SelectedValue }
|
|
206
207
|
children={ label }
|
|
207
|
-
|
|
208
|
+
/>;
|
|
208
209
|
} );
|
|
209
210
|
|
|
210
211
|
if ( enableUnSelected ) {
|
|
211
212
|
Options.unshift( <option
|
|
212
213
|
key={ 0 }
|
|
213
214
|
value={ JSON.stringify( null ) }
|
|
214
|
-
selected={ SelectedValue == 'null' }
|
|
215
|
+
// selected={ SelectedValue == 'null' }
|
|
215
216
|
children={ placeholder }
|
|
216
217
|
/> );
|
|
217
218
|
}
|
|
@@ -78,7 +78,7 @@ export const SliderInput: React.FC<amotify.fn.Input.Slider.PlainParams> = ( para
|
|
|
78
78
|
} = {},
|
|
79
79
|
min,max,step,
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
enableFormSubmit,
|
|
82
82
|
|
|
83
83
|
checkValidationAtFirst,
|
|
84
84
|
onChange,onKeyDown,
|
|
@@ -160,7 +160,7 @@ export const SliderInput: React.FC<amotify.fn.Input.Slider.PlainParams> = ( para
|
|
|
160
160
|
set_status={ set_status }
|
|
161
161
|
DotData={ DotData }
|
|
162
162
|
form={ form }
|
|
163
|
-
|
|
163
|
+
enableFormSubmit={ enableFormSubmit! }
|
|
164
164
|
/>
|
|
165
165
|
{ showLegends ? <Comps.IndicatorLabels
|
|
166
166
|
componentID={ val_status.componentID }
|
|
@@ -277,14 +277,14 @@ const Comps = {
|
|
|
277
277
|
set_status: React.Dispatch<React.SetStateAction<amotify.fn.Input.Status.Slider>>
|
|
278
278
|
DotData: DataLevelingResult
|
|
279
279
|
form: string
|
|
280
|
-
|
|
280
|
+
enableFormSubmit: boolean
|
|
281
281
|
} ) => {
|
|
282
282
|
let {
|
|
283
283
|
val_status,
|
|
284
284
|
set_status,
|
|
285
285
|
DotData,
|
|
286
286
|
form,
|
|
287
|
-
|
|
287
|
+
enableFormSubmit
|
|
288
288
|
} = props;
|
|
289
289
|
let {
|
|
290
290
|
componentID
|
|
@@ -375,7 +375,7 @@ const Comps = {
|
|
|
375
375
|
DotData
|
|
376
376
|
} );
|
|
377
377
|
|
|
378
|
-
if (
|
|
378
|
+
if ( enableFormSubmit ) SubmitForm( event );
|
|
379
379
|
} }
|
|
380
380
|
/>
|
|
381
381
|
</Box>
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from '@global';
|
|
4
4
|
import {
|
|
5
5
|
Box,
|
|
6
|
-
|
|
6
|
+
FAI
|
|
7
7
|
} from '@atoms';
|
|
8
8
|
import {
|
|
9
9
|
Row
|
|
@@ -45,7 +45,7 @@ export const SwitchInput: React.FC<amotify.fn.Input.Switch.PlainParams> = ( para
|
|
|
45
45
|
form,
|
|
46
46
|
id,
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
enableFormSubmit,
|
|
49
49
|
|
|
50
50
|
checkValidationAtFirst,
|
|
51
51
|
onChange,onKeyDown,
|
|
@@ -85,7 +85,7 @@ export const SwitchInput: React.FC<amotify.fn.Input.Switch.PlainParams> = ( para
|
|
|
85
85
|
},
|
|
86
86
|
} );
|
|
87
87
|
|
|
88
|
-
return
|
|
88
|
+
return <BoxWrapper
|
|
89
89
|
val_status={ val_status }
|
|
90
90
|
set_status={ set_status }
|
|
91
91
|
val_validate={ val_validate }
|
|
@@ -103,7 +103,7 @@ export const SwitchInput: React.FC<amotify.fn.Input.Switch.PlainParams> = ( para
|
|
|
103
103
|
id={ id }
|
|
104
104
|
onKeyDown={ ( event ) => {
|
|
105
105
|
if ( onKeyDown ) onKeyDown( event );
|
|
106
|
-
if (
|
|
106
|
+
if ( enableFormSubmit ) SubmitForm( event );
|
|
107
107
|
} }
|
|
108
108
|
onChange={ ( event ) => {
|
|
109
109
|
if ( val_validate.ok ) set_validate( { ok: false,notice: [] } );
|
|
@@ -160,14 +160,15 @@ export const SwitchInput: React.FC<amotify.fn.Input.Switch.PlainParams> = ( para
|
|
|
160
160
|
boxShadow={ 2 }
|
|
161
161
|
className={ style.Dot }
|
|
162
162
|
>
|
|
163
|
-
{ icon ? <
|
|
163
|
+
{ icon ? <Box
|
|
164
164
|
transition='middle'
|
|
165
165
|
fontColor={ appearance == 'applely' && isChecked ? color : 'white' }
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
>
|
|
167
|
+
{ icon }
|
|
168
|
+
</Box> : null }
|
|
168
169
|
</Box>
|
|
169
170
|
</Row.Center>
|
|
170
171
|
</Box>
|
|
171
172
|
</Buttons.Label.Plain>
|
|
172
|
-
</BoxWrapper
|
|
173
|
+
</BoxWrapper>;
|
|
173
174
|
}
|
|
@@ -256,7 +256,7 @@ export const TextInput: React.FC<amotify.fn.Input.Text.OriginParams> = ( params
|
|
|
256
256
|
autoComplete = 'off',
|
|
257
257
|
autoCapitalize = 'off',
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
enableFormSubmit,
|
|
260
260
|
clearButton = false,
|
|
261
261
|
|
|
262
262
|
checkValidationAtFirst,
|
|
@@ -265,11 +265,10 @@ export const TextInput: React.FC<amotify.fn.Input.Text.OriginParams> = ( params
|
|
|
265
265
|
onUpdateValue,
|
|
266
266
|
onUpdateValidValue,
|
|
267
267
|
value = '',
|
|
268
|
-
leftIndicator,rightIndicator,rightIcon,
|
|
268
|
+
leftIndicator,rightIndicator,leftIcon,rightIcon,
|
|
269
269
|
maxLength,
|
|
270
270
|
min,
|
|
271
271
|
max,
|
|
272
|
-
|
|
273
272
|
...others
|
|
274
273
|
} = params;
|
|
275
274
|
|
|
@@ -396,7 +395,7 @@ export const TextInput: React.FC<amotify.fn.Input.Text.OriginParams> = ( params
|
|
|
396
395
|
}
|
|
397
396
|
|
|
398
397
|
if ( onKeyDown ) onKeyDown( event );
|
|
399
|
-
if (
|
|
398
|
+
if ( enableFormSubmit ) SubmitForm( event );
|
|
400
399
|
} }
|
|
401
400
|
onChange={ ( event ) => {
|
|
402
401
|
let {
|
|
@@ -35,7 +35,7 @@ export const TextAreaInput: React.FC<amotify.fn.Input.TextArea.PlainParams> = (
|
|
|
35
35
|
required,
|
|
36
36
|
form,
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
enableFormSubmit,
|
|
39
39
|
|
|
40
40
|
checkValidationAtFirst,
|
|
41
41
|
onChange,onKeyDown,
|
|
@@ -43,7 +43,7 @@ export const TextAreaInput: React.FC<amotify.fn.Input.TextArea.PlainParams> = (
|
|
|
43
43
|
onUpdateValue,
|
|
44
44
|
onUpdateValidValue,
|
|
45
45
|
value = '',
|
|
46
|
-
leftIndicator,rightIndicator,
|
|
46
|
+
leftIndicator,rightIndicator,leftIcon,rightIcon,
|
|
47
47
|
|
|
48
48
|
...others
|
|
49
49
|
} = params;
|
|
@@ -87,7 +87,7 @@ export const TextAreaInput: React.FC<amotify.fn.Input.TextArea.PlainParams> = (
|
|
|
87
87
|
value={ val_status.dataValue }
|
|
88
88
|
onKeyDown={ ( event ) => {
|
|
89
89
|
if ( onKeyDown ) onKeyDown( event );
|
|
90
|
-
if (
|
|
90
|
+
if ( enableFormSubmit ) SubmitForm( event );
|
|
91
91
|
} }
|
|
92
92
|
onChange={ ( event ) => {
|
|
93
93
|
let {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
Grid,
|
|
6
6
|
Box,
|
|
7
7
|
Flex,
|
|
8
|
-
|
|
8
|
+
FAI
|
|
9
9
|
} from '@atoms';
|
|
10
10
|
import {
|
|
11
11
|
Column,
|
|
@@ -213,7 +213,7 @@ const Comps = {
|
|
|
213
213
|
|
|
214
214
|
let { hour,minutes } = val_value;
|
|
215
215
|
|
|
216
|
-
return
|
|
216
|
+
return <Column
|
|
217
217
|
padding={ 1 }
|
|
218
218
|
>
|
|
219
219
|
<Flex
|
|
@@ -381,8 +381,7 @@ const Comps = {
|
|
|
381
381
|
tipsID={ tipsID! }
|
|
382
382
|
onValueUpdate={ onValueUpdate }
|
|
383
383
|
/>
|
|
384
|
-
</Column
|
|
385
|
-
)
|
|
384
|
+
</Column>;
|
|
386
385
|
},
|
|
387
386
|
Hours: ( params: {
|
|
388
387
|
min?: string
|
|
@@ -657,6 +656,7 @@ const Comps = {
|
|
|
657
656
|
thisMonthDates.push( <Buttons.Button.Clear.R
|
|
658
657
|
className={ [
|
|
659
658
|
style.CalendarDay,
|
|
659
|
+
style[ 'isToday_' + isToday ]
|
|
660
660
|
].join( ' ' ) }
|
|
661
661
|
{ ...commonStyle }
|
|
662
662
|
onClick={ () => {
|
|
@@ -671,10 +671,6 @@ const Comps = {
|
|
|
671
671
|
padding={ 0 }
|
|
672
672
|
flexCenter
|
|
673
673
|
borderRadius={ 'sphere' }
|
|
674
|
-
{ ...isToday ? {
|
|
675
|
-
backgroundColor: 'warn',
|
|
676
|
-
fontColor: 'white'
|
|
677
|
-
} : null }
|
|
678
674
|
children={ i }
|
|
679
675
|
/> );
|
|
680
676
|
}
|
|
@@ -759,7 +755,6 @@ const Comps = {
|
|
|
759
755
|
{ Comps.Month.Months( {
|
|
760
756
|
min,max,
|
|
761
757
|
year: val_value.year,
|
|
762
|
-
current: [ val_value.year,val_value.month ],
|
|
763
758
|
callback: ( ( val: [ number,number,number ] ) => {
|
|
764
759
|
let [ year,month ] = val;
|
|
765
760
|
set_value( {
|
|
@@ -779,20 +774,18 @@ const Comps = {
|
|
|
779
774
|
min?: string
|
|
780
775
|
max?: string
|
|
781
776
|
year: number
|
|
782
|
-
current: [ number,number ]
|
|
783
777
|
callback: any
|
|
784
778
|
} ) => {
|
|
785
779
|
let {
|
|
786
780
|
year,
|
|
787
|
-
current,
|
|
788
781
|
callback
|
|
789
782
|
} = params;
|
|
790
|
-
let
|
|
783
|
+
let Today = $.Time();
|
|
791
784
|
|
|
792
785
|
let Months = [];
|
|
793
786
|
|
|
794
787
|
for ( let index = 1; index <= 12; index++ ) {
|
|
795
|
-
let
|
|
788
|
+
let isThisMonth = year == Today.year && index == Today.month;
|
|
796
789
|
let isLocked = false;
|
|
797
790
|
|
|
798
791
|
{
|
|
@@ -809,7 +802,7 @@ const Comps = {
|
|
|
809
802
|
|
|
810
803
|
let ClassName = [
|
|
811
804
|
style.Cell,
|
|
812
|
-
|
|
805
|
+
isThisMonth ? style.isThisMonth : ''
|
|
813
806
|
].join( ' ' );
|
|
814
807
|
|
|
815
808
|
Months.push( <Buttons.Button.Clear.R
|
|
@@ -889,7 +882,7 @@ const Comps = {
|
|
|
889
882
|
flexSizing={ 'none' }
|
|
890
883
|
padding={ [ '2/3',1 ] }
|
|
891
884
|
>
|
|
892
|
-
<
|
|
885
|
+
<FAI.Times /> 削除
|
|
893
886
|
</Buttons.Button.Border.R>
|
|
894
887
|
<Buttons.Button.Prime.R
|
|
895
888
|
flexSizing={ 'auto' }
|
|
@@ -918,7 +911,7 @@ const Comps = {
|
|
|
918
911
|
params.callback( -1 );
|
|
919
912
|
} }
|
|
920
913
|
>
|
|
921
|
-
<
|
|
914
|
+
<FAI.ChevronLeft />
|
|
922
915
|
</Buttons.Button.Clear.R>
|
|
923
916
|
<Buttons.Button.Clear.R
|
|
924
917
|
className={ style.RightButton }
|
|
@@ -929,7 +922,7 @@ const Comps = {
|
|
|
929
922
|
params.callback( 1 );
|
|
930
923
|
} }
|
|
931
924
|
>
|
|
932
|
-
<
|
|
925
|
+
<FAI.ChevronRight />
|
|
933
926
|
</Buttons.Button.Clear.R>
|
|
934
927
|
</Flex >;
|
|
935
928
|
},
|
|
@@ -306,7 +306,7 @@ export const TimeInput: React.FC<amotify.fn.Input.Time.OriginParams> = ( params
|
|
|
306
306
|
min,max,
|
|
307
307
|
className,
|
|
308
308
|
|
|
309
|
-
|
|
309
|
+
enableFormSubmit,
|
|
310
310
|
|
|
311
311
|
checkValidationAtFirst,
|
|
312
312
|
onKeyDown,
|
|
@@ -481,7 +481,7 @@ export const TimeInput: React.FC<amotify.fn.Input.Time.OriginParams> = ( params
|
|
|
481
481
|
} );
|
|
482
482
|
|
|
483
483
|
if ( onKeyDown ) onKeyDown( event );
|
|
484
|
-
if (
|
|
484
|
+
if ( enableFormSubmit ) SubmitForm( event );
|
|
485
485
|
} }
|
|
486
486
|
onKeyUp={ ( event ) => {
|
|
487
487
|
if ( event.key == 'Tab' ) set_focus( {
|
|
@@ -506,6 +506,7 @@ export const TimeInput: React.FC<amotify.fn.Input.Time.OriginParams> = ( params
|
|
|
506
506
|
} );
|
|
507
507
|
event.preventDefault();
|
|
508
508
|
} }
|
|
509
|
+
onChange={ () => { } }
|
|
509
510
|
{ ...others }
|
|
510
511
|
/> }
|
|
511
512
|
</BoxWrapper>
|