amotify 0.0.59 → 0.0.62
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/_.tsx +5 -5
- package/@types/amot.tsx +11 -11
- package/@types/fn.tsx +14 -1
- package/@types/module.tsx +1 -1
- package/dist/amotify.js +1 -1
- package/dist/amotify.min.css +3 -3
- package/package.json +1 -1
- package/src/@atoms.tsx +3 -3
- package/src/@functions.tsx +11 -11
- package/src/@global.tsx +40 -40
- package/src/@jsminAmotifyExtension/_.tsx +4 -4
- package/src/@jsminAmotifyExtension/fetch.tsx +30 -30
- package/src/@jsminAmotifyExtension/formCollect.tsx +32 -32
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +71 -71
- package/src/@jsminAmotifyExtension/variables.tsx +38 -38
- package/src/@molecules.tsx +6 -6
- package/src/@styles/props.scss +1 -1
- package/src/@styles/var.scss +0 -1
- package/src/@templates.tsx +1 -1
- package/src/@variables.tsx +2 -2
- package/src/atoms/FAI/parts.tsx +105 -105
- package/src/atoms/Logo/parts.tsx +19 -19
- package/src/atoms/Various/parts.tsx +26 -26
- package/src/config.tsx +62 -59
- package/src/functions/Button/_.tsx +49 -49
- package/src/functions/Cropper/parts.tsx +249 -249
- package/src/functions/Effects/Fade.tsx +18 -18
- package/src/functions/Effects/Ripple.tsx +24 -24
- package/src/functions/Effects/_.tsx +5 -5
- package/src/functions/Input/Chips/Selector.tsx +107 -107
- package/src/functions/Input/Chips/_.tsx +66 -66
- package/src/functions/Input/Contenteditable.tsx +18 -18
- package/src/functions/Input/DigitCharacters.tsx +48 -48
- package/src/functions/Input/File/_.tsx +114 -114
- package/src/functions/Input/Hidden.tsx +3 -3
- package/src/functions/Input/List/_.tsx +61 -61
- package/src/functions/Input/RichSelect/_.tsx +38 -38
- package/src/functions/Input/Segmented/_.tsx +30 -30
- package/src/functions/Input/Select/_.tsx +42 -42
- package/src/functions/Input/Slider/_.tsx +93 -93
- package/src/functions/Input/Switch/_.tsx +21 -21
- package/src/functions/Input/Text.tsx +99 -97
- package/src/functions/Input/TextArea.tsx +17 -17
- package/src/functions/Input/Time/Picker.tsx +199 -199
- package/src/functions/Input/Time/_.tsx +173 -173
- package/src/functions/Input/_.tsx +135 -135
- package/src/functions/Input/core.tsx +96 -96
- package/src/functions/Inputs/_.tsx +1 -1
- package/src/functions/Inputs/text.tsx +5 -5
- package/src/functions/Layout/PageNotFound.tsx +6 -6
- package/src/functions/Layout/PageRouter.tsx +28 -44
- package/src/functions/Layout/PageViewController/parts.tsx +7 -7
- package/src/functions/Layout/Plate.tsx +5 -5
- package/src/functions/Layout/RootViewController/parts.tsx +94 -71
- package/src/functions/Layout/RootViewController/style.module.scss +0 -1
- package/src/functions/Layout/SwipeView/parts.tsx +90 -90
- package/src/functions/Layout/TabBar.tsx +10 -10
- package/src/functions/Layout/_.tsx +7 -7
- package/src/functions/Loader/corner.tsx +10 -10
- package/src/functions/Loader/mini.tsx +25 -25
- package/src/functions/Loader/parts.tsx +31 -31
- package/src/functions/Loader/top.tsx +10 -10
- package/src/functions/Sheet/parts.tsx +219 -219
- package/src/functions/Sheet/style.module.scss +0 -20
- package/src/functions/SnackBar/parts.tsx +50 -50
- package/src/functions/Table/Data/parts.tsx +202 -202
- package/src/functions/Table/Drag/parts.tsx +76 -76
- package/src/functions/Table/Normal/parts.tsx +23 -23
- package/src/functions/Table/_.tsx +33 -33
- package/src/functions/Tooltips/parts.tsx +7 -7
- package/src/global/LaunchReactApplication.tsx +28 -28
- package/src/global/styleConverter.tsx +133 -133
- package/src/launch.tsx +27 -27
- package/src/molecules/Accordion/parts.tsx +41 -41
- package/src/molecules/LinkifyText/parts.tsx +18 -18
- package/src/molecules/List.tsx +6 -6
- package/src/preload.tsx +5 -45
- package/src/templates/PlayGround/parts.tsx +8 -8
- package/webpack.config.js +9 -9
|
@@ -2,59 +2,59 @@ import {
|
|
|
2
2
|
StyleConverter,
|
|
3
3
|
useStore,
|
|
4
4
|
React
|
|
5
|
-
} from '@global'
|
|
5
|
+
} from '@global'
|
|
6
6
|
import {
|
|
7
7
|
Box,
|
|
8
8
|
Flex,
|
|
9
9
|
FAI,
|
|
10
10
|
Span
|
|
11
|
-
} from '@atoms'
|
|
11
|
+
} from '@atoms'
|
|
12
12
|
import {
|
|
13
13
|
Row,
|
|
14
14
|
Text,
|
|
15
15
|
Column
|
|
16
|
-
} from '@mols'
|
|
16
|
+
} from '@mols'
|
|
17
17
|
import {
|
|
18
18
|
Buttons,
|
|
19
19
|
Tooltips
|
|
20
|
-
} from '@fn'
|
|
20
|
+
} from '@fn'
|
|
21
21
|
|
|
22
22
|
// as FontawesomeCore.IconProp
|
|
23
|
-
import { faEye } from '@fortawesome/free-solid-svg-icons/faEye'
|
|
24
|
-
import { faClock } from '@fortawesome/free-regular-svg-icons/faClock'
|
|
25
|
-
import { faCalendarAlt } from '@fortawesome/free-regular-svg-icons/faCalendarAlt'
|
|
26
|
-
import { faAngleUp } from '@fortawesome/free-solid-svg-icons/faAngleUp'
|
|
27
|
-
import { faAngleDown } from '@fortawesome/free-solid-svg-icons/faAngleDown'
|
|
23
|
+
import { faEye } from '@fortawesome/free-solid-svg-icons/faEye'
|
|
24
|
+
import { faClock } from '@fortawesome/free-regular-svg-icons/faClock'
|
|
25
|
+
import { faCalendarAlt } from '@fortawesome/free-regular-svg-icons/faCalendarAlt'
|
|
26
|
+
import { faAngleUp } from '@fortawesome/free-solid-svg-icons/faAngleUp'
|
|
27
|
+
import { faAngleDown } from '@fortawesome/free-solid-svg-icons/faAngleDown'
|
|
28
28
|
|
|
29
|
-
import style from './style.module.scss'
|
|
29
|
+
import style from './style.module.scss'
|
|
30
30
|
|
|
31
|
-
import { HiddenInput } from './Hidden'
|
|
31
|
+
import { HiddenInput } from './Hidden'
|
|
32
32
|
import {
|
|
33
33
|
TextInput,
|
|
34
34
|
TextValidate
|
|
35
|
-
} from './Text'
|
|
36
|
-
import { TextAreaInput } from './TextArea'
|
|
37
|
-
import { ContenteditableInput } from './Contenteditable'
|
|
38
|
-
import { DigitCharactersInput } from './DigitCharacters'
|
|
35
|
+
} from './Text'
|
|
36
|
+
import { TextAreaInput } from './TextArea'
|
|
37
|
+
import { ContenteditableInput } from './Contenteditable'
|
|
38
|
+
import { DigitCharactersInput } from './DigitCharacters'
|
|
39
39
|
import {
|
|
40
40
|
TimeInput,
|
|
41
41
|
TimeFNs
|
|
42
|
-
} from './Time/_'
|
|
43
|
-
import { SelectInput } from './Select/_'
|
|
44
|
-
import { RichSelectInput } from './RichSelect/_'
|
|
45
|
-
import { ListInput } from './List/_'
|
|
46
|
-
import { ChipsInput } from './Chips/_'
|
|
47
|
-
import { SwitchInput } from './Switch/_'
|
|
48
|
-
import { FileInput } from './File/_'
|
|
49
|
-
import { SliderInput } from './Slider/_'
|
|
50
|
-
import { Segmented } from './Segmented/_'
|
|
42
|
+
} from './Time/_'
|
|
43
|
+
import { SelectInput } from './Select/_'
|
|
44
|
+
import { RichSelectInput } from './RichSelect/_'
|
|
45
|
+
import { ListInput } from './List/_'
|
|
46
|
+
import { ChipsInput } from './Chips/_'
|
|
47
|
+
import { SwitchInput } from './Switch/_'
|
|
48
|
+
import { FileInput } from './File/_'
|
|
49
|
+
import { SliderInput } from './Slider/_'
|
|
50
|
+
import { Segmented } from './Segmented/_'
|
|
51
51
|
|
|
52
52
|
const UniComponent: React.FC<{
|
|
53
53
|
componentID?: string
|
|
54
54
|
children: React.FC<any>
|
|
55
55
|
params: any
|
|
56
56
|
}> = ( props ) => {
|
|
57
|
-
let [ val_componentID ] = React.useState( props.componentID || $.uuidGen() )
|
|
57
|
+
let [ val_componentID ] = React.useState( props.componentID || $.uuidGen() )
|
|
58
58
|
|
|
59
59
|
props = { ...props }
|
|
60
60
|
props.params = {
|
|
@@ -71,23 +71,23 @@ const UniComponent: React.FC<{
|
|
|
71
71
|
|
|
72
72
|
let {
|
|
73
73
|
children: Children
|
|
74
|
-
} = props
|
|
74
|
+
} = props
|
|
75
75
|
|
|
76
|
-
return <Children { ...props.params }
|
|
76
|
+
return <Children { ...props.params } />
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
const TextInputs: amotify.fn.Input.Text.Methods = {
|
|
80
80
|
Validate: TextValidate,
|
|
81
81
|
Normal: ( rawParams ) => {
|
|
82
82
|
rawParams = { ...rawParams }
|
|
83
|
-
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3
|
|
84
|
-
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3
|
|
83
|
+
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3
|
|
84
|
+
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3
|
|
85
85
|
|
|
86
86
|
return <UniComponent
|
|
87
87
|
componentID={ rawParams.componentID }
|
|
88
88
|
children={ TextInput }
|
|
89
89
|
params={ DefaultStyles.Boxish( rawParams ) }
|
|
90
|
-
|
|
90
|
+
/>
|
|
91
91
|
},
|
|
92
92
|
Katakana: ( props ) => ( <TextInputs.Normal
|
|
93
93
|
restrict='katakana'
|
|
@@ -115,19 +115,19 @@ const TextInputs: amotify.fn.Input.Text.Methods = {
|
|
|
115
115
|
{ ...props }
|
|
116
116
|
/> ),
|
|
117
117
|
Postal: ( params ) => {
|
|
118
|
-
let [ val_postalEventID ] = React.useState( $.uuidGen() )
|
|
118
|
+
let [ val_postalEventID ] = React.useState( $.uuidGen() )
|
|
119
119
|
React.useEffect( () => {
|
|
120
120
|
return () => {
|
|
121
|
-
useStore.delete( val_postalEventID )
|
|
121
|
+
useStore.delete( val_postalEventID )
|
|
122
122
|
}
|
|
123
|
-
},[] )
|
|
123
|
+
},[] )
|
|
124
124
|
|
|
125
125
|
return <TextInputs.Normal
|
|
126
126
|
restrict='postal'
|
|
127
127
|
placeholder='郵便番号'
|
|
128
128
|
leftIndicator={ <Input.Comps.LeftIndicator children={ '〒' } /> }
|
|
129
129
|
{ ...params }
|
|
130
|
-
|
|
130
|
+
/>
|
|
131
131
|
},
|
|
132
132
|
Password: ( props ) => {
|
|
133
133
|
return <TextInputs.Normal
|
|
@@ -152,7 +152,7 @@ const TextInputs: amotify.fn.Input.Text.Methods = {
|
|
|
152
152
|
content: <Tooltips.Comps.Body>
|
|
153
153
|
パスワードを表示
|
|
154
154
|
</Tooltips.Comps.Body>
|
|
155
|
-
} )
|
|
155
|
+
} )
|
|
156
156
|
} }
|
|
157
157
|
tabIndex={ -1 }
|
|
158
158
|
onClick={ ( event ) => {
|
|
@@ -160,9 +160,9 @@ const TextInputs: amotify.fn.Input.Text.Methods = {
|
|
|
160
160
|
.parent().parent().parent()
|
|
161
161
|
.find( 'input' )
|
|
162
162
|
.callback( ( input ) => {
|
|
163
|
-
let Input = input[ 0 ]
|
|
164
|
-
Input.type = Input.type === 'password' ? 'text' : 'password'
|
|
165
|
-
} )
|
|
163
|
+
let Input = input[ 0 ]
|
|
164
|
+
Input.type = Input.type === 'password' ? 'text' : 'password'
|
|
165
|
+
} )
|
|
166
166
|
} }
|
|
167
167
|
>
|
|
168
168
|
<FAI
|
|
@@ -175,7 +175,7 @@ const TextInputs: amotify.fn.Input.Text.Methods = {
|
|
|
175
175
|
</Input.Comps.RightIndicator>
|
|
176
176
|
}
|
|
177
177
|
{ ...props }
|
|
178
|
-
|
|
178
|
+
/>
|
|
179
179
|
},
|
|
180
180
|
Money: {
|
|
181
181
|
JPY: ( props ) => ( <TextInputs.DigitNumber
|
|
@@ -193,13 +193,13 @@ const TimeInputs: amotify.fn.Input.Time.Methods & {
|
|
|
193
193
|
} = {
|
|
194
194
|
Origin: ( rawParams ) => {
|
|
195
195
|
rawParams = { ...rawParams }
|
|
196
|
-
let [ val_componentID ] = React.useState( rawParams.componentID || $.uuidGen() )
|
|
197
|
-
rawParams.componentID = val_componentID
|
|
196
|
+
let [ val_componentID ] = React.useState( rawParams.componentID || $.uuidGen() )
|
|
197
|
+
rawParams.componentID = val_componentID
|
|
198
198
|
|
|
199
199
|
if ( $.is.nullish( rawParams.rightIndicator ) ) {
|
|
200
200
|
let icon = ( rawParams.restrict || '' ).match( /clock/ )
|
|
201
201
|
? faClock
|
|
202
|
-
: faCalendarAlt
|
|
202
|
+
: faCalendarAlt
|
|
203
203
|
|
|
204
204
|
rawParams.rightIndicator = <Input.Comps.RightIndicator
|
|
205
205
|
padding={ 0 }
|
|
@@ -217,8 +217,8 @@ const TimeInputs: amotify.fn.Input.Time.Methods & {
|
|
|
217
217
|
tabIndex={ -1 }
|
|
218
218
|
id={ 'Picker-' + rawParams.componentID }
|
|
219
219
|
onClick={ () => {
|
|
220
|
-
let component = useStore.get( rawParams.componentID! )
|
|
221
|
-
if ( component ) component.openPicker()
|
|
220
|
+
let component = useStore.get( rawParams.componentID! )
|
|
221
|
+
if ( component ) component.openPicker()
|
|
222
222
|
} }
|
|
223
223
|
>
|
|
224
224
|
<FAI icon={ icon } />
|
|
@@ -230,7 +230,7 @@ const TimeInputs: amotify.fn.Input.Time.Methods & {
|
|
|
230
230
|
componentID={ rawParams.componentID! }
|
|
231
231
|
children={ TimeInput }
|
|
232
232
|
params={ DefaultStyles.Boxish( rawParams ) }
|
|
233
|
-
|
|
233
|
+
/>
|
|
234
234
|
},
|
|
235
235
|
Clock: ( props ) => ( <TimeInputs.Origin restrict='clock' era='clock' { ...props } /> ),
|
|
236
236
|
Date: ( props ) => ( <TimeInputs.Origin restrict='date' { ...props } /> ),
|
|
@@ -239,48 +239,48 @@ const TimeInputs: amotify.fn.Input.Time.Methods & {
|
|
|
239
239
|
Year: ( props ) => ( <TimeInputs.Origin restrict='year' { ...props } /> ),
|
|
240
240
|
DateWareki: ( params ) => {
|
|
241
241
|
params = { ...params }
|
|
242
|
-
let [ val_componentID ] = React.useState( params.componentID || $.uuidGen() )
|
|
243
|
-
params.componentID = val_componentID
|
|
242
|
+
let [ val_componentID ] = React.useState( params.componentID || $.uuidGen() )
|
|
243
|
+
params.componentID = val_componentID
|
|
244
244
|
let {
|
|
245
245
|
defaultEra = 'wareki',
|
|
246
|
-
} = params
|
|
246
|
+
} = params
|
|
247
247
|
|
|
248
248
|
let [ val_era,set_era ] = React.useState<amotify.fn.Input.Time.EraTypes>( ( () => {
|
|
249
|
-
let era: amotify.fn.Input.Time.EraTypes = 'year'
|
|
249
|
+
let era: amotify.fn.Input.Time.EraTypes = 'year'
|
|
250
250
|
if ( defaultEra == 'wareki' ) {
|
|
251
|
-
era = 'reiwa'
|
|
251
|
+
era = 'reiwa'
|
|
252
252
|
if ( params.value ) {
|
|
253
|
-
let [ year,month,date ] = params.value.split( /\D/ )
|
|
253
|
+
let [ year,month,date ] = params.value.split( /\D/ )
|
|
254
254
|
if ( year && month && date ) {
|
|
255
|
-
let Year = Number( year )
|
|
255
|
+
let Year = Number( year )
|
|
256
256
|
if ( Year >= 2019 ) {
|
|
257
|
-
Year -= 2019,era = 'reiwa'
|
|
257
|
+
Year -= 2019,era = 'reiwa'
|
|
258
258
|
} else if ( Year >= 1989 ) {
|
|
259
|
-
Year -= 1989,era = 'heisei'
|
|
259
|
+
Year -= 1989,era = 'heisei'
|
|
260
260
|
} else if ( Year >= 1926 ) {
|
|
261
|
-
Year -= 1926,era = 'shouwa'
|
|
261
|
+
Year -= 1926,era = 'shouwa'
|
|
262
262
|
} else if ( Year >= 1912 ) {
|
|
263
|
-
Year -= 1912,era = 'taisho'
|
|
263
|
+
Year -= 1912,era = 'taisho'
|
|
264
264
|
} else if ( Year >= 1868 ) {
|
|
265
|
-
Year -= 1868,era = 'meiji'
|
|
265
|
+
Year -= 1868,era = 'meiji'
|
|
266
266
|
}
|
|
267
|
-
Year += 1
|
|
267
|
+
Year += 1
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
return era
|
|
272
|
-
} )() as amotify.fn.Input.Time.EraTypes )
|
|
271
|
+
return era
|
|
272
|
+
} )() as amotify.fn.Input.Time.EraTypes )
|
|
273
273
|
|
|
274
274
|
React.useEffect( () => {
|
|
275
275
|
useStore.set( {
|
|
276
276
|
key: 'refreshEra_' + val_componentID,
|
|
277
277
|
value: {
|
|
278
278
|
refreshEra: ( value: amotify.fn.Input.Time.EraTypes ) => {
|
|
279
|
-
set_era( value )
|
|
279
|
+
set_era( value )
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
} )
|
|
283
|
-
},[] )
|
|
282
|
+
} )
|
|
283
|
+
},[] )
|
|
284
284
|
|
|
285
285
|
return <TimeInputs.Origin
|
|
286
286
|
restrict='dateWareki'
|
|
@@ -305,14 +305,14 @@ const TimeInputs: amotify.fn.Input.Time.Methods & {
|
|
|
305
305
|
{ value: 'meiji',label: '明治' }
|
|
306
306
|
] }
|
|
307
307
|
onUpdateValidValue={ ( { value,eventType } ) => {
|
|
308
|
-
set_era( value )
|
|
309
|
-
let component = useStore.get( params.componentID! )
|
|
310
|
-
component && component.resetEra && component.resetEra( value )
|
|
308
|
+
set_era( value )
|
|
309
|
+
let component = useStore.get( params.componentID! )
|
|
310
|
+
component && component.resetEra && component.resetEra( value )
|
|
311
311
|
} }
|
|
312
312
|
/> }
|
|
313
313
|
{ ...params }
|
|
314
314
|
era={ val_era }
|
|
315
|
-
|
|
315
|
+
/>
|
|
316
316
|
},
|
|
317
317
|
Periods: {
|
|
318
318
|
Date: ( props ) => ( <TimeInputs.Origin restrict='dates' { ...props } /> ),
|
|
@@ -331,47 +331,47 @@ const ChipsInputs = ( rawParams: amotify.fn.Input.Chips.PlainParams ) => {
|
|
|
331
331
|
flexWrap: true,
|
|
332
332
|
...rawParams
|
|
333
333
|
}
|
|
334
|
-
let params = DefaultStyles.Boxish( rawParams ) as amotify.fn.Input.Chips.PlainParams
|
|
334
|
+
let params = DefaultStyles.Boxish( rawParams ) as amotify.fn.Input.Chips.PlainParams
|
|
335
335
|
|
|
336
336
|
return <UniComponent
|
|
337
337
|
componentID={ rawParams.componentID }
|
|
338
338
|
children={ ChipsInput }
|
|
339
339
|
params={ params }
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
ChipsInputs.fn = ChipsInput.fn
|
|
340
|
+
/>
|
|
341
|
+
}
|
|
342
|
+
ChipsInputs.fn = ChipsInput.fn
|
|
343
343
|
|
|
344
344
|
const FileInputs = ( rawParams: amotify.fn.Input.Filer.PlainParams ) => {
|
|
345
345
|
rawParams = { ...rawParams }
|
|
346
|
-
rawParams.override = 'force'
|
|
347
|
-
let params = StyleConverter.ToClassName( rawParams )
|
|
346
|
+
rawParams.override = 'force'
|
|
347
|
+
let params = StyleConverter.ToClassName( rawParams )
|
|
348
348
|
params.cellClassName = [
|
|
349
349
|
params.cellClassName,
|
|
350
350
|
DefaultStyles.Boxish( {
|
|
351
351
|
...params.cellStyles,
|
|
352
352
|
tone: params.tone
|
|
353
353
|
} ).className,
|
|
354
|
-
].join( ' ' )
|
|
354
|
+
].join( ' ' )
|
|
355
355
|
|
|
356
356
|
return <UniComponent
|
|
357
357
|
componentID={ rawParams.componentID }
|
|
358
358
|
children={ FileInput }
|
|
359
359
|
params={ params }
|
|
360
|
-
|
|
360
|
+
/>
|
|
361
361
|
}
|
|
362
|
-
FileInputs.fn = FileInput.fn
|
|
362
|
+
FileInputs.fn = FileInput.fn
|
|
363
363
|
|
|
364
364
|
export const ListInputs: amotify.fn.Input.List.Methods & {
|
|
365
365
|
Origin: ( props: amotify.fn.Input.List.OriginParams ) => JSX.Element
|
|
366
366
|
} = {
|
|
367
367
|
Origin: ( rawParams ) => {
|
|
368
368
|
rawParams = { ...rawParams }
|
|
369
|
-
let params = DefaultStyles.ListCell( rawParams )
|
|
369
|
+
let params = DefaultStyles.ListCell( rawParams )
|
|
370
370
|
return <UniComponent
|
|
371
371
|
componentID={ rawParams.componentID }
|
|
372
372
|
children={ ListInput }
|
|
373
373
|
params={ params }
|
|
374
|
-
|
|
374
|
+
/>
|
|
375
375
|
},
|
|
376
376
|
Radio: ( params ) => ( <ListInputs.Origin
|
|
377
377
|
iconType='radio'
|
|
@@ -393,26 +393,26 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
393
393
|
componentID={ rawParams.componentID }
|
|
394
394
|
children={ HiddenInput }
|
|
395
395
|
params={ rawParams }
|
|
396
|
-
|
|
396
|
+
/>
|
|
397
397
|
},
|
|
398
398
|
Text: TextInputs,
|
|
399
399
|
TextArea: ( rawParams ) => {
|
|
400
400
|
rawParams = { ...rawParams }
|
|
401
|
-
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3
|
|
402
|
-
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3
|
|
401
|
+
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3
|
|
402
|
+
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3
|
|
403
403
|
|
|
404
|
-
let params = DefaultStyles.Boxish( rawParams )
|
|
405
|
-
params.rows = params.rows || 5
|
|
404
|
+
let params = DefaultStyles.Boxish( rawParams )
|
|
405
|
+
params.rows = params.rows || 5
|
|
406
406
|
return <UniComponent
|
|
407
407
|
componentID={ rawParams.componentID }
|
|
408
408
|
children={ TextAreaInput }
|
|
409
409
|
params={ params }
|
|
410
|
-
|
|
410
|
+
/>
|
|
411
411
|
},
|
|
412
412
|
Contenteditable: ( rawParams ) => {
|
|
413
413
|
rawParams = { ...rawParams }
|
|
414
|
-
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3
|
|
415
|
-
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3
|
|
414
|
+
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3
|
|
415
|
+
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3
|
|
416
416
|
rawParams = {
|
|
417
417
|
...rawParams,
|
|
418
418
|
freeCSS: {
|
|
@@ -421,13 +421,13 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
421
421
|
},
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
let params = DefaultStyles.Boxish( rawParams )
|
|
425
|
-
params.rows = params.rows || 5
|
|
424
|
+
let params = DefaultStyles.Boxish( rawParams )
|
|
425
|
+
params.rows = params.rows || 5
|
|
426
426
|
return <UniComponent
|
|
427
427
|
componentID={ rawParams.componentID }
|
|
428
428
|
children={ ContenteditableInput }
|
|
429
429
|
params={ params }
|
|
430
|
-
|
|
430
|
+
/>
|
|
431
431
|
},
|
|
432
432
|
DigitCharacters: ( rawParams ) => {
|
|
433
433
|
rawParams = { ...rawParams }
|
|
@@ -454,13 +454,13 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
454
454
|
},
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
let params = DefaultStyles.Boxish( rawParams ) as amotify.fn.Input.DigitCharacters.PlainParams
|
|
457
|
+
let params = DefaultStyles.Boxish( rawParams ) as amotify.fn.Input.DigitCharacters.PlainParams
|
|
458
458
|
|
|
459
459
|
return <UniComponent
|
|
460
460
|
componentID={ rawParams.componentID }
|
|
461
461
|
children={ DigitCharactersInput }
|
|
462
462
|
params={ params }
|
|
463
|
-
|
|
463
|
+
/>
|
|
464
464
|
},
|
|
465
465
|
Time: TimeInputs,
|
|
466
466
|
Select: ( rawParams ) => {
|
|
@@ -474,16 +474,16 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
474
474
|
<FAI.AngleDown />
|
|
475
475
|
</Input.Comps.RightIcon>
|
|
476
476
|
}
|
|
477
|
-
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3
|
|
478
|
-
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3
|
|
477
|
+
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3
|
|
478
|
+
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3
|
|
479
479
|
|
|
480
|
-
let params = DefaultStyles.Boxish( rawParams ) as amotify.fn.Input.Select.PlainParams
|
|
481
|
-
delete params.rightIconStyles
|
|
480
|
+
let params = DefaultStyles.Boxish( rawParams ) as amotify.fn.Input.Select.PlainParams
|
|
481
|
+
delete params.rightIconStyles
|
|
482
482
|
return <UniComponent
|
|
483
483
|
componentID={ rawParams.componentID }
|
|
484
484
|
children={ SelectInput }
|
|
485
485
|
params={ params }
|
|
486
|
-
|
|
486
|
+
/>
|
|
487
487
|
},
|
|
488
488
|
RichSelect: ( rawParams ) => {
|
|
489
489
|
rawParams = { ...rawParams }
|
|
@@ -496,16 +496,16 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
496
496
|
<FAI.AngleDown />
|
|
497
497
|
</Input.Comps.RightIcon>
|
|
498
498
|
}
|
|
499
|
-
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3
|
|
500
|
-
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3
|
|
499
|
+
if ( rawParams.rightIcon ) rawParams.paddingRight = rawParams.paddingRight ?? 3
|
|
500
|
+
if ( rawParams.leftIcon ) rawParams.paddingLeft = rawParams.paddingLeft ?? 3
|
|
501
501
|
|
|
502
|
-
let params = DefaultStyles.Boxish( rawParams ) as amotify.fn.Input.Select.PlainParams
|
|
503
|
-
delete params.rightIconStyles
|
|
502
|
+
let params = DefaultStyles.Boxish( rawParams ) as amotify.fn.Input.Select.PlainParams
|
|
503
|
+
delete params.rightIconStyles
|
|
504
504
|
return <UniComponent
|
|
505
505
|
componentID={ rawParams.componentID }
|
|
506
506
|
children={ RichSelectInput }
|
|
507
507
|
params={ params }
|
|
508
|
-
|
|
508
|
+
/>
|
|
509
509
|
},
|
|
510
510
|
Radio: ListInputs.Radio,
|
|
511
511
|
Checkbox: ListInputs.Checkbox,
|
|
@@ -513,7 +513,7 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
513
513
|
Search: ( params: amotify.fn.Input.Search.PlainParams ) => {
|
|
514
514
|
return <ChipsInputs
|
|
515
515
|
AddButtonComponent={ ( props ) => {
|
|
516
|
-
if ( props.selected.length ) return null
|
|
516
|
+
if ( props.selected.length ) return null
|
|
517
517
|
return <Box>
|
|
518
518
|
選択してください
|
|
519
519
|
</Box>
|
|
@@ -527,7 +527,7 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
527
527
|
{ props.label }
|
|
528
528
|
{ props.defaultRemoveButton }
|
|
529
529
|
</Row.Separate>
|
|
530
|
-
</Box
|
|
530
|
+
</Box>
|
|
531
531
|
} }
|
|
532
532
|
paddingLeft={ 3 }
|
|
533
533
|
rightIcon={ <Input.Comps.LeftIcon>
|
|
@@ -545,12 +545,12 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
545
545
|
File: FileInputs,
|
|
546
546
|
Switch: ( rawParams ) => {
|
|
547
547
|
rawParams = { ...rawParams }
|
|
548
|
-
rawParams.color = rawParams.color || 'theme'
|
|
548
|
+
rawParams.color = rawParams.color || 'theme'
|
|
549
549
|
return <UniComponent
|
|
550
550
|
componentID={ rawParams.componentID }
|
|
551
551
|
children={ SwitchInput }
|
|
552
552
|
params={ rawParams }
|
|
553
|
-
|
|
553
|
+
/>
|
|
554
554
|
},
|
|
555
555
|
Slider: ( rawParams ) => {
|
|
556
556
|
rawParams = { ...rawParams }
|
|
@@ -558,7 +558,7 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
558
558
|
componentID={ rawParams.componentID }
|
|
559
559
|
children={ SliderInput }
|
|
560
560
|
params={ StyleConverter.ToClassName( rawParams ) }
|
|
561
|
-
|
|
561
|
+
/>
|
|
562
562
|
},
|
|
563
563
|
Checker: ( rawParams ) => {
|
|
564
564
|
rawParams = { ...rawParams }
|
|
@@ -577,14 +577,14 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
577
577
|
{ value: true,label: rawParams.label }
|
|
578
578
|
] }
|
|
579
579
|
onUpdateValidValue={ ( args ) => {
|
|
580
|
-
let Value = !!args.value[ 0 ]
|
|
580
|
+
let Value = !!args.value[ 0 ]
|
|
581
581
|
if ( rawParams.onUpdateValidValue )
|
|
582
582
|
rawParams.onUpdateValidValue( {
|
|
583
583
|
...args,
|
|
584
584
|
value: Value
|
|
585
|
-
} )
|
|
585
|
+
} )
|
|
586
586
|
} }
|
|
587
|
-
|
|
587
|
+
/>
|
|
588
588
|
},
|
|
589
589
|
|
|
590
590
|
Segmented: Segmented,
|
|
@@ -599,7 +599,7 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
599
599
|
borderRadius={ '3.tone.tertiary' }
|
|
600
600
|
children={ '必須' }
|
|
601
601
|
{ ...params }
|
|
602
|
-
|
|
602
|
+
/>
|
|
603
603
|
},
|
|
604
604
|
RequiredShortSign: ( params ) => {
|
|
605
605
|
return <Span
|
|
@@ -608,7 +608,7 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
608
608
|
borderRadius={ '3.tone.tertiary' }
|
|
609
609
|
children={ '*' }
|
|
610
610
|
{ ...params }
|
|
611
|
-
|
|
611
|
+
/>
|
|
612
612
|
},
|
|
613
613
|
OmitSign: ( params ) => {
|
|
614
614
|
return <Span
|
|
@@ -619,39 +619,39 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
619
619
|
backgroundColor='6.layer.darkest'
|
|
620
620
|
children={ '省略可' }
|
|
621
621
|
{ ...params }
|
|
622
|
-
|
|
622
|
+
/>
|
|
623
623
|
},
|
|
624
624
|
LeftIndicator: ( params ) => {
|
|
625
625
|
let {
|
|
626
626
|
tone,
|
|
627
627
|
...others
|
|
628
|
-
} = params
|
|
628
|
+
} = params
|
|
629
629
|
|
|
630
630
|
return <Box
|
|
631
631
|
{ ...DefaultStyles.Indicator( tone! ) }
|
|
632
632
|
borderTopRightRadius={ '2/3' }
|
|
633
633
|
borderBottomRightRadius={ '2/3' }
|
|
634
634
|
{ ...others }
|
|
635
|
-
|
|
635
|
+
/>
|
|
636
636
|
},
|
|
637
637
|
RightIndicator: ( params ) => {
|
|
638
638
|
let {
|
|
639
639
|
tone,
|
|
640
640
|
...others
|
|
641
|
-
} = params
|
|
641
|
+
} = params
|
|
642
642
|
|
|
643
643
|
return <Box
|
|
644
644
|
{ ...DefaultStyles.Indicator( tone! ) }
|
|
645
645
|
borderTopLeftRadius={ '2/3' }
|
|
646
646
|
borderBottomLeftRadius={ '2/3' }
|
|
647
647
|
{ ...others }
|
|
648
|
-
|
|
648
|
+
/>
|
|
649
649
|
},
|
|
650
650
|
RightIcon: ( params ) => {
|
|
651
651
|
let {
|
|
652
652
|
tone = 'border',
|
|
653
653
|
...others
|
|
654
|
-
} = params
|
|
654
|
+
} = params
|
|
655
655
|
|
|
656
656
|
return <Box
|
|
657
657
|
{ ...DefaultStyles.IndicatorIcon }
|
|
@@ -663,13 +663,13 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
663
663
|
pointerEvents: 'none',
|
|
664
664
|
...others.freeCSS
|
|
665
665
|
} }
|
|
666
|
-
|
|
666
|
+
/>
|
|
667
667
|
},
|
|
668
668
|
LeftIcon: ( params ) => {
|
|
669
669
|
let {
|
|
670
670
|
tone = 'border',
|
|
671
671
|
...others
|
|
672
|
-
} = params
|
|
672
|
+
} = params
|
|
673
673
|
|
|
674
674
|
return <Box
|
|
675
675
|
{ ...DefaultStyles.IndicatorIcon }
|
|
@@ -681,14 +681,14 @@ export const Input: amotify.fn.Input.Methods = {
|
|
|
681
681
|
pointerEvents: 'none',
|
|
682
682
|
...others.freeCSS
|
|
683
683
|
} }
|
|
684
|
-
|
|
684
|
+
/>
|
|
685
685
|
},
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
|
|
689
689
|
const DefaultStyles = {
|
|
690
690
|
Input: ( type: amotify.fn.Input.BoxToneTypes ) => {
|
|
691
|
-
if ( type == 'plain' ) return {}
|
|
691
|
+
if ( type == 'plain' ) return {}
|
|
692
692
|
let Styles: amotifyUniStyleParams = {
|
|
693
693
|
padding: '3/4',
|
|
694
694
|
transition: 'middle',
|
|
@@ -718,17 +718,17 @@ const DefaultStyles = {
|
|
|
718
718
|
backgroundColor: 'cloud'
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
return Styles
|
|
721
|
+
return Styles
|
|
722
722
|
},
|
|
723
723
|
ListCell: ( params: amotify.fn.Input.List.OriginParams ) => {
|
|
724
724
|
params = { ...params }
|
|
725
725
|
if ( !params.tone ) {
|
|
726
|
-
params.tone = 'border'
|
|
726
|
+
params.tone = 'border'
|
|
727
727
|
|
|
728
|
-
if ( amotify.config.tone == 'flat' ) params.tone = 'cloud'
|
|
728
|
+
if ( amotify.config.tone == 'flat' ) params.tone = 'cloud'
|
|
729
729
|
}
|
|
730
730
|
|
|
731
|
-
let { tone } = params
|
|
731
|
+
let { tone } = params
|
|
732
732
|
|
|
733
733
|
if ( tone == 'plain' ) {
|
|
734
734
|
|
|
@@ -803,14 +803,14 @@ const DefaultStyles = {
|
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
return StyleConverter.ToClassName( params )
|
|
806
|
+
return StyleConverter.ToClassName( params )
|
|
807
807
|
},
|
|
808
808
|
Boxish: ( params: any ) => {
|
|
809
809
|
params = { ...params }
|
|
810
810
|
if ( !params.tone ) {
|
|
811
|
-
params.tone = 'border'
|
|
812
|
-
if ( amotify.config.tone == 'sharp' ) params.tone = 'bottomBorder'
|
|
813
|
-
else if ( amotify.config.tone == 'flat' ) params.tone = 'cloud'
|
|
811
|
+
params.tone = 'border'
|
|
812
|
+
if ( amotify.config.tone == 'sharp' ) params.tone = 'bottomBorder'
|
|
813
|
+
else if ( amotify.config.tone == 'flat' ) params.tone = 'cloud'
|
|
814
814
|
}
|
|
815
815
|
|
|
816
816
|
let Styles: amotifyUniStyleParams = {
|
|
@@ -833,14 +833,14 @@ const DefaultStyles = {
|
|
|
833
833
|
].join( ' ' ),
|
|
834
834
|
}
|
|
835
835
|
|
|
836
|
-
return StyleConverter.ToClassName( Styles ) as any
|
|
836
|
+
return StyleConverter.ToClassName( Styles ) as any
|
|
837
837
|
},
|
|
838
838
|
Indicator: ( type: amotify.fn.Input.BoxToneTypes ) => {
|
|
839
839
|
if ( !type ) {
|
|
840
|
-
type = 'border'
|
|
841
|
-
if ( amotify.config.tone == 'sharp' ) type = 'bottomBorder'
|
|
840
|
+
type = 'border'
|
|
841
|
+
if ( amotify.config.tone == 'sharp' ) type = 'bottomBorder'
|
|
842
842
|
}
|
|
843
|
-
if ( type == 'plain' ) return {}
|
|
843
|
+
if ( type == 'plain' ) return {}
|
|
844
844
|
let styles: amotifyUniStyleParams = {
|
|
845
845
|
flexSizing: 'none',
|
|
846
846
|
flexCenter: true,
|
|
@@ -866,7 +866,7 @@ const DefaultStyles = {
|
|
|
866
866
|
borderBottom: true
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
|
-
return styles
|
|
869
|
+
return styles
|
|
870
870
|
},
|
|
871
871
|
IndicatorIcon: {
|
|
872
872
|
position: 'absolute',
|
|
@@ -878,4 +878,4 @@ const DefaultStyles = {
|
|
|
878
878
|
fontSize: '1.mini',
|
|
879
879
|
backgroundColor: 'inherit',
|
|
880
880
|
} as amotifyUniStyleParams
|
|
881
|
-
}
|
|
881
|
+
}
|