amotify 0.0.65 → 0.0.66

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 (114) hide show
  1. package/dist/amotify.js +3 -2
  2. package/dist/amotify.min.css +2 -2
  3. package/dist/coreVender.js +14 -2
  4. package/package.json +10 -10
  5. package/tsconfig.json +13 -5
  6. package/@types/_.tsx +0 -7
  7. package/@types/amot.tsx +0 -355
  8. package/@types/fn.tsx +0 -1280
  9. package/@types/jsminAmotifyExtension.tsx +0 -137
  10. package/@types/module.tsx +0 -1
  11. package/@types/state.tsx +0 -231
  12. package/src/@atoms.tsx +0 -34
  13. package/src/@functions.tsx +0 -29
  14. package/src/@global.tsx +0 -145
  15. package/src/@jsminAmotifyExtension/_.tsx +0 -4
  16. package/src/@jsminAmotifyExtension/fetch.tsx +0 -110
  17. package/src/@jsminAmotifyExtension/formCollect.tsx +0 -94
  18. package/src/@jsminAmotifyExtension/spreadSheet.tsx +0 -165
  19. package/src/@jsminAmotifyExtension/variables.tsx +0 -137
  20. package/src/@molecules.tsx +0 -96
  21. package/src/@organisms.tsx +0 -1
  22. package/src/@reactPacks/reactProduction@18.2.0.js +0 -79
  23. package/src/@reactPacks/reactRouterDomProduction@18.2.0.js +0 -31
  24. package/src/@styles/@app.scss +0 -4
  25. package/src/@styles/UniStyling.scss +0 -1028
  26. package/src/@styles/init.scss +0 -94
  27. package/src/@styles/props.scss +0 -109
  28. package/src/@styles/styleSet.scss +0 -38
  29. package/src/@styles/themeColor.scss +0 -71
  30. package/src/@styles/var.scss +0 -182
  31. package/src/@templates.tsx +0 -7
  32. package/src/@variables.tsx +0 -74
  33. package/src/atoms/FAI/parts.tsx +0 -139
  34. package/src/atoms/Logo/parts.tsx +0 -335
  35. package/src/atoms/Logo/style.module.scss +0 -96
  36. package/src/atoms/Various/parts.tsx +0 -159
  37. package/src/atoms/Various/style.module.scss +0 -46
  38. package/src/config.tsx +0 -191
  39. package/src/functions/Button/_.tsx +0 -331
  40. package/src/functions/Button/style.module.scss +0 -157
  41. package/src/functions/Cropper/parts.tsx +0 -1084
  42. package/src/functions/Cropper/style.module.scss +0 -64
  43. package/src/functions/Effects/Fade.tsx +0 -76
  44. package/src/functions/Effects/Ripple.tsx +0 -141
  45. package/src/functions/Effects/_.tsx +0 -33
  46. package/src/functions/Effects/style.module.scss +0 -91
  47. package/src/functions/Input/Chips/Selector.tsx +0 -445
  48. package/src/functions/Input/Chips/_.tsx +0 -289
  49. package/src/functions/Input/Chips/style.module.scss +0 -6
  50. package/src/functions/Input/Contenteditable.tsx +0 -114
  51. package/src/functions/Input/DigitCharacters.tsx +0 -235
  52. package/src/functions/Input/File/_.tsx +0 -553
  53. package/src/functions/Input/File/style.module.scss +0 -34
  54. package/src/functions/Input/Hidden.tsx +0 -21
  55. package/src/functions/Input/List/_.tsx +0 -383
  56. package/src/functions/Input/List/style.module.scss +0 -84
  57. package/src/functions/Input/RichSelect/_.tsx +0 -230
  58. package/src/functions/Input/RichSelect/style.module.scss +0 -11
  59. package/src/functions/Input/Segmented/_.tsx +0 -246
  60. package/src/functions/Input/Segmented/style.module.scss +0 -81
  61. package/src/functions/Input/Select/_.tsx +0 -218
  62. package/src/functions/Input/Select/style.module.scss +0 -11
  63. package/src/functions/Input/Slider/_.tsx +0 -524
  64. package/src/functions/Input/Slider/style.module.scss +0 -67
  65. package/src/functions/Input/Switch/_.tsx +0 -176
  66. package/src/functions/Input/Switch/style.module.scss +0 -18
  67. package/src/functions/Input/Text.tsx +0 -487
  68. package/src/functions/Input/TextArea.tsx +0 -109
  69. package/src/functions/Input/Time/Picker.tsx +0 -1361
  70. package/src/functions/Input/Time/_.tsx +0 -749
  71. package/src/functions/Input/Time/style.module.scss +0 -79
  72. package/src/functions/Input/_.tsx +0 -881
  73. package/src/functions/Input/core.tsx +0 -473
  74. package/src/functions/Input/style.module.scss +0 -102
  75. package/src/functions/Inputs/_.tsx +0 -5
  76. package/src/functions/Inputs/style.module.scss +0 -15
  77. package/src/functions/Inputs/text.tsx +0 -53
  78. package/src/functions/Inputs/types.d.ts +0 -13
  79. package/src/functions/Layout/PageNotFound.tsx +0 -78
  80. package/src/functions/Layout/PageRouter.tsx +0 -89
  81. package/src/functions/Layout/PageViewController/parts.tsx +0 -27
  82. package/src/functions/Layout/Plate.tsx +0 -30
  83. package/src/functions/Layout/RootViewController/parts.tsx +0 -300
  84. package/src/functions/Layout/RootViewController/style.module.scss +0 -23
  85. package/src/functions/Layout/SwipeView/parts.tsx +0 -375
  86. package/src/functions/Layout/SwipeView/style.module.scss +0 -20
  87. package/src/functions/Layout/TabBar.tsx +0 -60
  88. package/src/functions/Layout/_.tsx +0 -20
  89. package/src/functions/Loader/corner.tsx +0 -74
  90. package/src/functions/Loader/mini.tsx +0 -114
  91. package/src/functions/Loader/parts.tsx +0 -103
  92. package/src/functions/Loader/style.module.scss +0 -223
  93. package/src/functions/Loader/top.tsx +0 -84
  94. package/src/functions/Sheet/parts.tsx +0 -994
  95. package/src/functions/Sheet/style.module.scss +0 -208
  96. package/src/functions/SnackBar/parts.tsx +0 -215
  97. package/src/functions/SnackBar/style.module.scss +0 -25
  98. package/src/functions/Table/Data/parts.tsx +0 -965
  99. package/src/functions/Table/Drag/parts.tsx +0 -442
  100. package/src/functions/Table/Normal/parts.tsx +0 -124
  101. package/src/functions/Table/_.tsx +0 -177
  102. package/src/functions/Table/style.module.scss +0 -93
  103. package/src/functions/Tooltips/parts.tsx +0 -53
  104. package/src/global/LaunchReactApplication.tsx +0 -40
  105. package/src/global/styleConverter.tsx +0 -465
  106. package/src/launch.tsx +0 -117
  107. package/src/molecules/Accordion/parts.tsx +0 -146
  108. package/src/molecules/Accordion/style.module.scss +0 -13
  109. package/src/molecules/LinkifyText/parts.tsx +0 -52
  110. package/src/molecules/List.tsx +0 -31
  111. package/src/preload.tsx +0 -31
  112. package/src/templates/PlayGround/parts.tsx +0 -96
  113. package/src/templates/PlayGround/style.module.scss +0 -38
  114. package/webpack.config.js +0 -146
@@ -1,1361 +0,0 @@
1
- import {
2
- React
3
- } from '@global'
4
- import {
5
- Grid,
6
- Box,
7
- Flex,
8
- FAI
9
- } from '@atoms'
10
- import {
11
- Column,
12
- Row,
13
- Text
14
- } from '@mols'
15
- import {
16
- Buttons,
17
- Input,
18
- Tooltips
19
- } from '@fn'
20
-
21
- import style from './style.module.scss'
22
-
23
- let YearOptions: {
24
- ( params?: {
25
- min?: string
26
- max?: string
27
- } ): amotify.fn.Input.Select.OptionProps[]
28
- } = ( params ) => {
29
- let Years: amotify.fn.Input.Select.OptionProps[] = []
30
- let minYear = Number( params?.min ?? 1900 )
31
- let maxYear = Number( params?.max ?? $.Time().addYear( 10 ).year )
32
-
33
- for ( let year = minYear; year <= maxYear; year++ ) {
34
- Years.unshift( {
35
- value: year,
36
- label: [ year,...$.transformer.wareki( year ).value ].join( ' - ' ),
37
- // displayLabel: year + '年'
38
- } )
39
- }
40
- return Years
41
- }
42
-
43
- type ClockValueTypes = {
44
- modifiedType: 'init' | 'override' | 'update'
45
- hour: number
46
- minutes: number
47
- }
48
- type DateValueTypes = {
49
- modifiedType: 'init' | 'override' | 'update'
50
- year: number
51
- month: number
52
- date: number
53
- }
54
- type MonthValueTypes = {
55
- modifiedType: 'init' | 'override' | 'update'
56
- year: number
57
- month: number
58
- }
59
- type YearValueTypes = {
60
- modifiedType: 'init' | 'override' | 'update'
61
- year: number
62
- }
63
- type DateWarekiValueTypes = {
64
- modifiedType: 'init' | 'override' | 'update'
65
- era: amotify.fn.Input.Time.EraTypes
66
- year: number
67
- month: number
68
- date: number
69
- }
70
- type SendParams<T> = amotify.fn.Input.Time.PickerParams & {
71
- val_value: T
72
- set_value: React.Dispatch<React.SetStateAction<T>>
73
- }
74
-
75
- export const Picker: React.FC<amotify.fn.Input.Time.PickerParams> = ( params ) => {
76
- let {
77
- restrict,
78
- era = 'year',
79
- defaultValue = ''
80
- } = params
81
- params = { ...params }
82
- params.tipsID = params.tipsID || $.uuidGen()
83
-
84
- const mounted = React.useRef( false )
85
-
86
- let [ val_value,set_value ] = React.useState( ( () => {
87
- if ( restrict == 'clock' ) {
88
- let partValues: any = String( defaultValue ).split( /[^\d]/ )
89
-
90
- if ( !partValues[ 0 ] ) partValues = [ 0,0 ]
91
-
92
- let hour = Number( partValues[ 0 ] )
93
- let minutes = Number( partValues[ 1 ] )
94
-
95
- return {
96
- modifiedType: 'init',
97
- hour: hour,
98
- minutes: minutes
99
- } as ClockValueTypes
100
- } else if ( restrict == 'date' ) {
101
- let [ year,month,date ] = String( defaultValue )?.split( /\D/ )
102
- if ( $.is.nullish( year ) || $.is.nullish( month ) || $.is.nullish( date ) ) {
103
- [ year,month,date ] = $.Time().toFormat( '%Y-%M-%D' ).split( '-' )
104
- }
105
-
106
- return {
107
- modifiedType: 'init',
108
- year: Number( year ),
109
- month: Number( month ),
110
- date: Number( date )
111
- } as DateValueTypes
112
- } else if ( restrict == 'week' ) {
113
- } else if ( restrict == 'month' ) {
114
- let [ year,month ] = String( defaultValue ).split( /\D/ )
115
- if ( $.is.nullish( year ) || $.is.nullish( month ) ) {
116
- [ year,month ] = $.Time().toFormat( '%Y-%M' ).split( '-' )
117
- }
118
-
119
- return {
120
- modifiedType: 'init',
121
- year: Number( year ),
122
- month: Number( month )
123
- } as MonthValueTypes
124
- } else if ( restrict == 'year' ) {
125
- let [ year ] = String( defaultValue ).split( /\D/ )
126
- if ( $.is.nullish( year ) ) {
127
- [ year ] = $.Time().toFormat( '%Y' ).split( '-' )
128
- }
129
-
130
- return {
131
- modifiedType: 'init',
132
- year: Number( year )
133
- } as YearValueTypes
134
- } else if ( restrict == 'dateWareki' ) {
135
- let [ year,month,date ] = String( defaultValue )?.split( /\D/ )
136
- if ( $.is.nullish( year ) || $.is.nullish( month ) || $.is.nullish( date ) ) {
137
- [ year,month,date ] = $.Time().toFormat( '%Y-%M-%D' ).split( '-' )
138
- }
139
-
140
- return {
141
- modifiedType: 'init',
142
- era: era || 'year',
143
- year: Number( year ),
144
- month: Number( month ),
145
- date: Number( date )
146
- } as DateWarekiValueTypes
147
- }
148
-
149
- return {}
150
- } )() as any )
151
-
152
- React.useEffect( () => {
153
- if ( mounted.current ) {
154
- if ( val_value.modifiedType == 'update' ) {
155
- let sendValue = ''
156
- let sendEra: amotify.fn.Input.Time.EraTypes = era || 'year'
157
-
158
- if ( restrict == 'clock' ) {
159
- let { hour,minutes } = val_value as ClockValueTypes
160
- sendValue = [
161
- hour.zeroEmbed( 2 ),
162
- minutes.zeroEmbed( 2 )
163
- ].join( '/' )
164
- } else if ( restrict == 'date' ) {
165
- let { year,month,date } = val_value as DateValueTypes
166
- sendValue = [
167
- year,
168
- month.zeroEmbed( 2 ),
169
- date.zeroEmbed( 2 )
170
- ].join( '/' )
171
- } else if ( restrict == 'week' ) {
172
- } else if ( restrict == 'month' ) {
173
- let { year,month } = val_value as MonthValueTypes
174
- sendValue = [
175
- year,
176
- month.zeroEmbed( 2 )
177
- ].join( '/' )
178
- } else if ( restrict == 'year' ) {
179
- let { year } = val_value as YearValueTypes
180
- sendValue = String( year )
181
- } else if ( restrict == 'dateWareki' ) {
182
- let {
183
- year,
184
- month,
185
- date,
186
- era
187
- } = val_value as DateWarekiValueTypes
188
- sendEra = era
189
- sendValue = [
190
- year,
191
- month.zeroEmbed( 2 ),
192
- date.zeroEmbed( 2 )
193
- ].join( '/' )
194
- }
195
- params.onValueUpdate( sendValue,sendEra )
196
- }
197
- } else {
198
- mounted.current = true
199
- }
200
- },[ val_value ] )
201
-
202
- let Params = {
203
- ...params,
204
- val_value,
205
- set_value
206
- }
207
-
208
- return <Box
209
- backgroundColor={ '1.layer.base' }
210
- borderRadius={ '2.tone.secondary' }
211
- boxShadow={ '1.remark' }
212
- border
213
- overflow='hidden'
214
- >
215
- <Box
216
- overflow={ 'auto' }
217
- className={ style[ restrict.toCapital() + 'Base' ] }
218
- children={ restrict == 'clock' ? <Comps.Clock._ { ...Params } />
219
- : restrict == 'date' ? <Comps.Date._ { ...Params } />
220
- : restrict == 'week' ? ''
221
- : restrict == 'month' ? <Comps.Month._ { ...Params } />
222
- : restrict == 'year' ? <Comps.Year._ { ...Params } />
223
- : restrict == 'dates' ? ''
224
- : restrict == 'months' ? ''
225
- : restrict == 'dateWareki' ? <Comps.DateWareki._ { ...Params } />
226
- : <></> }
227
- />
228
- </Box>
229
- }
230
-
231
- const Comps = {
232
- Clock: {
233
- _: ( params: SendParams<ClockValueTypes> ) => {
234
- let {
235
- min,max,
236
- onValueUpdate,
237
- tipsID,
238
- val_value,
239
- set_value
240
- } = params
241
-
242
- let [ val_ampm,set_ampm ] = React.useState( val_value.hour > 12 ? 2 : 1 )
243
- let [ val_unit,set_unit ] = React.useState( Number( localStorage.getItem( 'timePickerUnit' ) || 5 ) )
244
-
245
- React.useEffect( () => {
246
- localStorage.setItem( 'timePickerUnit',String( val_unit ) )
247
- },[ val_unit ] )
248
-
249
- let { hour,minutes } = val_value
250
-
251
- return <Column
252
- padding={ 1 }
253
- >
254
- <Flex
255
- flexType='row'
256
- flexWrap={ false }
257
- gap={ 1 }
258
- className={ style.Body }
259
- >
260
- <Column
261
- className={ style.DesignSide }
262
- flexSizing={ 0 }
263
- >
264
- <Box
265
- className={ style.ClockUiBase }
266
- padding={ [ 1,'2/3' ] }
267
- flexCenter
268
- >
269
- <Box
270
- className={ style.ClockUi }
271
- backgroundColor={ 'tcOpLow' }
272
- isRounded
273
- position='relative'
274
- >
275
- <Box
276
- position='absolute'
277
- backgroundColor='theme'
278
- unitWidth={ '1/12' }
279
- className={ [
280
- style.Needle,
281
- style.hour
282
- ].join( ' ' ) }
283
- freeCSS={ {
284
- transform: `rotate(${ hour * 30 + minutes / 2 }deg)`
285
- } }
286
- />
287
- <Box
288
- position='absolute'
289
- backgroundColor='theme'
290
- unitWidth={ '1/12' }
291
- className={ [
292
- style.Needle,
293
- style.minute
294
- ].join( ' ' ) }
295
- freeCSS={ {
296
- transform: `rotate(${ minutes * 6 }deg)`
297
- } }
298
- />
299
- </Box>
300
- </Box>
301
-
302
- <Input.Radio
303
- tone='plain'
304
- icon
305
- value={ [ val_ampm ] }
306
- options={ [
307
- { value: 1,label: 'AM' },
308
- { value: 2,label: 'PM' }
309
- ] }
310
- flexType={ 'col' }
311
- gap={ 0 }
312
- cellStyles={ {
313
- padding: '1/2',
314
- horizontalAlign: 'between',
315
- gap: '1/3'
316
- } }
317
- tabIndex={ -1 }
318
- onUpdateValidValue={ ( { value } ) => {
319
- let prevHour = val_value.hour % 12
320
- let Hour = prevHour + ( value == 2 ? 12 : 0 )
321
-
322
- set_ampm( value )
323
- set_value( {
324
- modifiedType: 'update',
325
- hour: Hour,
326
- minutes: val_value.minutes
327
- } )
328
- } }
329
- />
330
-
331
- <Box borderTop margin={ [ 0,1 ] } />
332
- <Input.Radio
333
- tone='plain'
334
- icon
335
- value={ [ val_unit ] }
336
- options={ [
337
- { value: 1,label: '/ 1分' },
338
- { value: 2,label: '/ 2分' },
339
- { value: 5,label: '/ 5分' }
340
- ] }
341
- flexType={ 'col' }
342
- gap={ 0 }
343
- cellStyles={ {
344
- padding: '1/2',
345
- horizontalAlign: 'between',
346
- gap: '1/3'
347
- } }
348
- tabIndex={ -1 }
349
- onUpdateValidValue={ ( { value } ) => {
350
- set_unit( value )
351
- } }
352
- />
353
- </Column>
354
- <Column>
355
- <Box
356
- flexCenter
357
- fontSize='3.paragraph'
358
- isSemiBoldFont
359
- >
360
- { val_value.hour.zeroEmbed( 2 ) } : { val_value.minutes.zeroEmbed( 2 ) }
361
- </Box>
362
- <Flex
363
- flexWrap={ false }
364
- borderRadius={ '1.tone.primary' }
365
- boxShadow={ '0.remark.inset' }
366
- flexChilds='even'
367
- freeCSS={ {
368
- minWidth: 12 * 12
369
- } }
370
- padding={ [ '1/3',0 ] }
371
- >
372
- <Column
373
- gap={ 0 }
374
- overflow={ 'auto' }
375
- padding={ '2/3' }
376
- borderRight
377
- freeCSS={ {
378
- maxHeight: 12 * 22
379
- } }
380
- children={ Comps.Clock.Hours( {
381
- onClick: ( index ) => {
382
- let Hour = index + ( val_ampm == 2 ? 12 : 0 )
383
- set_value( {
384
- modifiedType: 'update',
385
- hour: Hour,
386
- minutes: val_value.minutes
387
- } )
388
- },
389
- min,max,
390
- ampm: val_ampm
391
- } ) }
392
- />
393
- <Column
394
- gap={ 0 }
395
- overflow={ 'auto' }
396
- padding={ '2/3' }
397
- freeCSS={ {
398
- maxHeight: 12 * 22
399
- } }
400
- children={ Comps.Clock.Minutes( {
401
- onClick: ( index ) => {
402
- set_value( {
403
- modifiedType: 'update',
404
- hour: val_value.hour,
405
- minutes: index
406
- } )
407
- },
408
- min,max,
409
- unit: val_unit
410
- } ) }
411
- />
412
- </Flex>
413
- </Column>
414
- </Flex>
415
- <Comps.Variables.Footer
416
- tipsID={ tipsID! }
417
- onValueUpdate={ onValueUpdate }
418
- />
419
- </Column>
420
- },
421
- Hours: ( params: {
422
- min?: string
423
- max?: string
424
- ampm: number
425
- onClick( index: number ): void
426
- } ) => {
427
- let list: ReactElement[] = []
428
-
429
- for ( let index = 0; index < 12; index++ ) {
430
- let labelIndex = params.ampm == 2 ? index + 12 : index
431
- let Disabled = false
432
-
433
- {
434
- let VAL = Number( String( labelIndex * 100 ).replace( /\D/ig,'' ) )
435
- if ( params.min ) {
436
- let MIN = Number( String( params.min ).replace( /\D/ig,'' ) )
437
- if ( MIN > VAL ) Disabled = true
438
- }
439
- if ( params.max ) {
440
- let MAX = Number( String( params.max ).replace( /\D/ig,'' ) )
441
- if ( VAL > MAX ) Disabled = true
442
- }
443
- }
444
-
445
- list.push( <Buttons.Button.Normal.R
446
- key={ index }
447
- isLocked={ Disabled }
448
- borderBottom borderRadius={ 0 }
449
- padding={ [ '1/2',1 ] }
450
- freeCSS={ { whiteSpace: 'nowrap' } }
451
- tabIndex={ -1 }
452
- onClick={ () => {
453
- params.onClick( index )
454
- } }
455
- children={ labelIndex.zeroEmbed( 2 ) }
456
- /> )
457
- }
458
- return list
459
- },
460
- Minutes: ( params: {
461
- min?: string
462
- max?: string
463
- unit: number
464
- onClick( index: number ): void
465
- } ) => {
466
- let list: ReactElement[] = []
467
-
468
- for ( let index = 0; index < 60 / params.unit; index++ ) {
469
- let Value = index * params.unit
470
-
471
- list.push( <Buttons.Button.Normal.R
472
- key={ Value }
473
- borderBottom borderRadius={ 0 }
474
- padding={ [ '1/2',1 ] }
475
- freeCSS={ { whiteSpace: 'nowrap' } }
476
- tabIndex={ -1 }
477
- onClick={ () => {
478
- params.onClick( Value )
479
- } }
480
- children={ Value.zeroEmbed( 2 ) }
481
- /> )
482
- }
483
- return list
484
- }
485
- },
486
- Date: {
487
- _: ( params: SendParams<DateValueTypes> ) => {
488
- let {
489
- min,max,
490
- onValueUpdate,
491
- tipsID,
492
- val_value,
493
- set_value
494
- } = params
495
-
496
- let { year,month,date } = val_value
497
-
498
- return <Column
499
- padding={ 1 }
500
- >
501
- <Flex
502
- horizontalAlign='between'
503
- verticalAlign='center'
504
- flexWrap={ false }
505
- >
506
- <Flex
507
- verticalAlign='bottom'
508
- horizontalAlign='left'
509
- gap={ '2/3' }
510
- flexWrap={ false }
511
- >
512
- <Input.Select
513
- override='force'
514
- enableUnSelected={ false }
515
- value={ year }
516
- options={ YearOptions() }
517
-
518
- border='1.thin'
519
- padding={ [ '1/3','2/3' ] }
520
- paddingRight={ 2 }
521
-
522
- rightIconStyles={ {
523
- right: '1/3'
524
- } }
525
- onUpdateValidValue={ ( { value } ) => {
526
- set_value( {
527
- modifiedType: 'update',
528
- year: Number( value ),
529
- month: month,
530
- date: date
531
- } )
532
- } }
533
- />
534
- <Input.Select
535
- override='force'
536
- enableUnSelected={ false }
537
- value={ month }
538
- options={ ( () => {
539
- let options = []
540
- for ( let i = 1; i <= 12; i++ ) {
541
- options.push( {
542
- value: i,
543
- label: String( i ),
544
- displayLabel: String( i ) + '月'
545
- } )
546
- }
547
- return options
548
- } )() }
549
- placeholder=''
550
-
551
- border='1.thin'
552
- padding={ [ '1/3','2/3' ] }
553
- paddingRight={ 2 }
554
-
555
- rightIconStyles={ {
556
- right: '1/3'
557
- } }
558
- onUpdateValidValue={ ( { value } ) => {
559
- set_value( {
560
- modifiedType: 'update',
561
- year: year,
562
- month: Number( value ),
563
- date: date
564
- } )
565
- } }
566
- />
567
- </Flex>
568
- <Comps.Variables.ShiftButtons
569
- callback={ ( dir ) => {
570
- let newMonth = month + dir
571
- let newYear = year
572
-
573
- if ( dir == -1 ) {
574
- if ( newMonth <= 0 ) newYear--
575
- newMonth = newMonth || 12
576
- } else {
577
- if ( month == 12 ) newYear++
578
- }
579
-
580
- set_value( {
581
- modifiedType: 'update',
582
- year: newYear,
583
- month: newMonth,
584
- date: val_value.date
585
- } )
586
- } }
587
- />
588
- </Flex>
589
- <Box borderTop />
590
- <Box
591
- children={ Comps.Date.MonthCalendar( {
592
- min,max,
593
- year: val_value.year,
594
- month: val_value.month,
595
- current: [ val_value.year,val_value.month,val_value.date ],
596
- callback: ( ( val: [ number,number,number ] ) => {
597
- let [ year,month,date ] = val
598
- set_value( {
599
- modifiedType: 'update',
600
- year: year,
601
- month: month,
602
- date: date
603
- } )
604
- } )
605
- } ) }
606
- />
607
- <Comps.Variables.Footer
608
- tipsID={ tipsID! }
609
- onValueUpdate={ onValueUpdate }
610
- />
611
- </Column>
612
- },
613
- MonthCalendar: ( params: {
614
- min?: string
615
- max?: string
616
- year: number
617
- month: number
618
- current: [ number,number,number ]
619
- callback: any
620
- } ) => {
621
- let {
622
- min,max,
623
- year,
624
- month,
625
- current,
626
- callback
627
- } = params
628
- let today = $.Time()
629
-
630
- let firstDate = $.Time( [ year,month.zeroEmbed( 2 ),'01' ].join( '/' ) )
631
- let lastDate = firstDate.getLastDayOfTheMonth()
632
- let lastMonthLastDay = $.Time( firstDate ).addMonth( -1 ).getLastDayOfTheMonth().date
633
-
634
- let legends = [],
635
- lastMonthLastishDates = [],
636
- thisMonthDates = [],
637
- nextMonthFirstishDates = []
638
-
639
- let commonStyle: amotifyUniStyleParams = {
640
- padding: 0,
641
- unitWidth: 3,
642
- unitHeight: 3,
643
- flexCenter: true,
644
- borderRadius: '3.tone.tertiary'
645
- }
646
-
647
- for ( var i = 0; i < 7; i++ ) {
648
- legends.push( <Box
649
- className={ [
650
- style.CalendarDay,
651
- style.Legend
652
- ].join( ' ' ) }
653
- { ...commonStyle }
654
- key={ i }
655
- >
656
- { [ '日','月','火','水','木','金','土' ][ i ] }
657
- </Box> )
658
- }
659
-
660
- for ( var i = 0; i < firstDate.weekday; i++ ) {
661
- lastMonthLastishDates.unshift( <Box
662
- className={ [
663
- style.CalendarDay,
664
- style.Dummy
665
- ].join( ' ' ) }
666
- fontColor='4.thin'
667
- { ...commonStyle }
668
- key={ i }
669
- >
670
- { lastMonthLastDay - i }
671
- </Box> )
672
- }
673
- for ( var i = 1; i <= lastDate.date; i++ ) {
674
- let idx = i
675
- let isToday = year == today.year && month == today.month && i == today.date
676
-
677
- let isLocked = false
678
-
679
- {
680
- let VAL = Number( String( [ year,month.zeroEmbed( 2 ),i.zeroEmbed( 2 ) ].join( '/' ) ).replace( /\D/ig,'' ) )
681
- if ( params.min ) {
682
- let MIN = Number( String( params.min ).replace( /\D/ig,'' ) )
683
- if ( MIN > VAL ) isLocked = true
684
- }
685
- if ( params.max ) {
686
- let MAX = Number( String( params.max ).replace( /\D/ig,'' ) )
687
- if ( VAL > MAX ) isLocked = true
688
- }
689
- }
690
-
691
- thisMonthDates.push( <Buttons.Button.Clear.R
692
- className={ [
693
- style.CalendarDay,
694
- style[ 'isToday_' + isToday ]
695
- ].join( ' ' ) }
696
- { ...commonStyle }
697
- onClick={ () => {
698
- callback( [ year,month,idx ] )
699
- } }
700
- tabIndex={ -1 }
701
- key={ idx }
702
- isLocked={ isLocked }
703
-
704
- fontColor={ '1.clear' }
705
- ssEffectsOnActive={ 'shrink' }
706
- padding={ 0 }
707
- flexCenter
708
- borderRadius={ 'sphere' }
709
- children={ i }
710
- /> )
711
- }
712
- for ( var i = 1; i < 7 - lastDate.weekday; i++ ) {
713
- nextMonthFirstishDates.push( <Box
714
- className={ [
715
- style.CalendarDay,
716
- style.Dummy
717
- ].join( ' ' ) }
718
- fontColor='4.thin'
719
- { ...commonStyle } key={ i }
720
- >
721
- { i }
722
- </Box> )
723
- }
724
-
725
- return <Grid gridCols={ 7 }
726
- gap={ '1/3' }
727
- >
728
- { legends }
729
- { lastMonthLastishDates }
730
- { thisMonthDates }
731
- { nextMonthFirstishDates }
732
- </Grid>
733
- }
734
- },
735
- Month: {
736
- _: ( params: SendParams<MonthValueTypes> ) => {
737
- let {
738
- min,max,
739
- onValueUpdate,
740
- tipsID,
741
- val_value,
742
- set_value
743
- } = params
744
-
745
- let { year,month } = val_value
746
-
747
- return <Column
748
- padding={ 1 }
749
- >
750
- <Row.Separate gap={ 0 }>
751
- <Row.Center
752
- verticalAlign='bottom'
753
- gap={ '2/3' }
754
- >
755
- <Input.Select
756
- enableUnSelected={ false }
757
- value={ year }
758
- options={ YearOptions() }
759
- override='force'
760
-
761
- border='1.thin'
762
- padding={ [ '1/3','2/3' ] }
763
- paddingRight={ 2 }
764
-
765
- rightIconStyles={ {
766
- right: '1/3'
767
- } }
768
- onUpdateValidValue={ ( { value } ) => {
769
- set_value( {
770
- modifiedType: 'update',
771
- year: Number( value ),
772
- month: month
773
- } )
774
- } }
775
- />
776
- </Row.Center>
777
-
778
- <Comps.Variables.ShiftButtons
779
- callback={ ( dir ) => {
780
- let newYear = Math.min( Math.max( year + dir,1900 ),2100 )
781
- set_value( {
782
- modifiedType: 'update',
783
- year: newYear,
784
- month: month
785
- } )
786
- } }
787
- />
788
- </Row.Separate>
789
- <Box borderTop />
790
- { Comps.Month.Months( {
791
- min,max,
792
- year: val_value.year,
793
- callback: ( ( val: [ number,number,number ] ) => {
794
- let [ year,month ] = val
795
- set_value( {
796
- modifiedType: 'update',
797
- year: year,
798
- month: month
799
- } )
800
- } )
801
- } ) }
802
- <Comps.Variables.Footer
803
- tipsID={ tipsID! }
804
- onValueUpdate={ onValueUpdate }
805
- />
806
- </Column>
807
- },
808
- Months: ( params: {
809
- min?: string
810
- max?: string
811
- year: number
812
- callback: any
813
- } ) => {
814
- let {
815
- year,
816
- callback
817
- } = params
818
- let Today = $.Time()
819
-
820
- let Months = []
821
-
822
- for ( let index = 1; index <= 12; index++ ) {
823
- let isThisMonth = year == Today.year && index == Today.month
824
- let isLocked = false
825
-
826
- {
827
- let VAL = Number( String( [ year,index.zeroEmbed( 2 ) ].join( '/' ) ).replace( /\D/ig,'' ) )
828
- if ( params.min ) {
829
- let MIN = Number( String( params.min ).replace( /\D/ig,'' ) )
830
- if ( MIN > VAL ) isLocked = true
831
- }
832
- if ( params.max ) {
833
- let MAX = Number( String( params.max ).replace( /\D/ig,'' ) )
834
- if ( VAL > MAX ) isLocked = true
835
- }
836
- }
837
-
838
- let ClassName = [
839
- style.Cell,
840
- isThisMonth ? style.isThisMonth : ''
841
- ].join( ' ' )
842
-
843
- Months.push( <Buttons.Button.Clear.R
844
- key={ year + '-' + index }
845
- className={ ClassName }
846
- isLocked={ isLocked }
847
- fontColor={ '2.normal' }
848
- padding={ [ '2/3',1 ] }
849
- ssEffectsOnActive={ 'shrink' }
850
- onClick={ () => {
851
- callback( [ year,index ] )
852
- } }
853
- >
854
- { index } 月
855
- </Buttons.Button.Clear.R> )
856
- }
857
-
858
- return <Grid
859
- gridCols={ 4 }
860
- gap={ '2/3' }
861
- children={ Months }
862
- />
863
- }
864
- },
865
- Year: {
866
- _: ( params: SendParams<YearValueTypes> ) => {
867
- let {
868
- min,max,
869
- onValueUpdate,
870
- tipsID,
871
- val_value,
872
- set_value
873
- } = params
874
-
875
- let { year } = val_value
876
-
877
- return <Column
878
- padding={ 1 }
879
- >
880
- <Input.Select
881
- enableUnSelected={ false }
882
- value={ year || $.Time().year }
883
- override='force'
884
- options={ YearOptions( { min,max } ) }
885
- onUpdateValidValue={ ( { value } ) => {
886
- set_value( {
887
- modifiedType: 'update',
888
- year: Number( value )
889
- } )
890
- } }
891
- />
892
- <Comps.Variables.Footer
893
- tipsID={ tipsID! }
894
- onValueUpdate={ onValueUpdate }
895
- onSubmit={ () => {
896
- set_value( {
897
- modifiedType: 'update',
898
- year: Number( year || $.Time().year )
899
- } )
900
- } }
901
- />
902
- </Column>
903
- }
904
- },
905
- DateWareki: {
906
- _: ( params: SendParams<DateWarekiValueTypes> ) => {
907
- let {
908
- min,max,
909
- onValueUpdate,
910
- tipsID,
911
- val_value,
912
- set_value
913
- } = params
914
-
915
- let {
916
- era,
917
- year,
918
- month,
919
- date
920
- } = val_value
921
-
922
- let Params = {
923
- val_value,
924
- set_value
925
- }
926
-
927
- return <Box>
928
- <Row.Left
929
- verticalAlign='unset'
930
- borderBottom
931
- gap={ 0 }
932
- >
933
- <Comps.DateWareki.EraSelect { ...Params } />
934
- <Box borderRight />
935
- <Comps.DateWareki.Calendar { ...Params } />
936
- </Row.Left>
937
- <Box
938
- padding={ 1 }
939
- >
940
- <Comps.Variables.Footer
941
- tipsID={ tipsID! }
942
- onValueUpdate={ onValueUpdate }
943
- />
944
- </Box>
945
- </Box>
946
- },
947
- EraSelect: ( params: {
948
- val_value: DateWarekiValueTypes
949
- set_value: React.Dispatch<React.SetStateAction<DateWarekiValueTypes>>
950
- } ) => {
951
- let {
952
- val_value,
953
- set_value
954
- } = params
955
-
956
- let styles: amotifyUniStyleParams = {
957
- padding: [ '1/2',1.5 ],
958
- fontColor: '3.blur'
959
- }
960
- let isActiveStyles: amotifyUniStyleParams = {
961
- backgroundColor: 'cloud',
962
- fontColor: '2.normal',
963
- isSemiBoldFont: true
964
- }
965
-
966
- return <Column
967
- gap={ 0 }
968
- padding={ 1 }
969
- >
970
- <Buttons.Button.Clear.R
971
- color='cloud'
972
- { ...styles }
973
- isActiveStyles={ isActiveStyles }
974
- isActive={ val_value.era == 'year' }
975
- onClick={ () => {
976
- let today = $.Time()
977
- set_value( {
978
- modifiedType: 'update',
979
- era: 'year',
980
- year: today.year,month: today.month,date: today.date
981
- } )
982
- } }
983
- >
984
- 西暦
985
- </Buttons.Button.Clear.R>
986
- <Buttons.Button.Clear.R
987
- color='cloud'
988
- { ...styles }
989
- isActiveStyles={ isActiveStyles }
990
- isActive={ val_value.era == 'reiwa' }
991
- onClick={ () => {
992
- let today = $.Time()
993
- set_value( {
994
- modifiedType: 'update',
995
- era: 'reiwa',
996
- year: today.year,month: today.month,date: today.date
997
- } )
998
- } }
999
- >
1000
- 令和
1001
- </Buttons.Button.Clear.R>
1002
- <Buttons.Button.Clear.R
1003
- color='cloud'
1004
- { ...styles }
1005
- isActiveStyles={ isActiveStyles }
1006
- isActive={ val_value.era == 'heisei' }
1007
- onClick={ () => {
1008
- set_value( {
1009
- modifiedType: 'update',
1010
- era: 'heisei',
1011
- year: 2019,month: 1,date: 1
1012
- } )
1013
- } }
1014
- >
1015
- 平成
1016
- </Buttons.Button.Clear.R>
1017
- <Buttons.Button.Clear.R
1018
- color='cloud'
1019
- { ...styles }
1020
- isActiveStyles={ isActiveStyles }
1021
- isActive={ val_value.era == 'shouwa' }
1022
- onClick={ () => {
1023
- set_value( {
1024
- modifiedType: 'update',
1025
- era: 'shouwa',
1026
- year: 1989,month: 1,date: 1
1027
- } )
1028
- } }
1029
- >
1030
- 昭和
1031
- </Buttons.Button.Clear.R>
1032
- <Buttons.Button.Clear.R
1033
- color='cloud'
1034
- { ...styles }
1035
- isActiveStyles={ isActiveStyles }
1036
- isActive={ val_value.era == 'taisho' }
1037
- onClick={ () => {
1038
- set_value( {
1039
- modifiedType: 'update',
1040
- era: 'taisho',
1041
- year: 1926,month: 1,date: 1
1042
- } )
1043
- } }
1044
- >
1045
- 大正
1046
- </Buttons.Button.Clear.R>
1047
- <Buttons.Button.Clear.R
1048
- color='cloud'
1049
- { ...styles }
1050
- isActiveStyles={ isActiveStyles }
1051
- isActive={ val_value.era == 'meiji' }
1052
- onClick={ () => {
1053
- set_value( {
1054
- modifiedType: 'update',
1055
- era: 'meiji',
1056
- year: 1912,month: 1,date: 1
1057
- } )
1058
- } }
1059
- >
1060
- 明治
1061
- </Buttons.Button.Clear.R>
1062
- </Column>
1063
- },
1064
- Calendar: ( params: {
1065
- val_value: DateWarekiValueTypes
1066
- set_value: React.Dispatch<React.SetStateAction<DateWarekiValueTypes>>
1067
- } ) => {
1068
- let {
1069
- val_value,
1070
- set_value
1071
- } = params
1072
-
1073
- let yearOptions: amotify.fn.Input.Select.OptionProps[] = []
1074
- if ( val_value.era == 'year' ) {
1075
- for ( let i = 1900; i < 2100; i++ ) yearOptions.unshift( { value: i,label: i + '年' } )
1076
- } else if ( val_value.era == 'reiwa' ) {
1077
- let thisReiwaYear = $.Time().year - 2018
1078
- for ( let i = 1; i <= thisReiwaYear + 10; i++ ) yearOptions.unshift( { value: 2019 + i - 1,label: '令和' + ( i == 1 ? '元' : i ) + '年' } )
1079
- } else if ( val_value.era == 'heisei' ) {
1080
- for ( let i = 1; i <= 31; i++ ) yearOptions.unshift( { value: 1989 + i - 1,label: '平成' + ( i == 1 ? '元' : i ) + '年' } )
1081
- } else if ( val_value.era == 'shouwa' ) {
1082
- for ( let i = 1; i <= 64; i++ ) yearOptions.unshift( { value: 1926 + i - 1,label: '昭和' + ( i == 1 ? '元' : i ) + '年' } )
1083
- } else if ( val_value.era == 'taisho' ) {
1084
- for ( let i = 1; i <= 15; i++ ) yearOptions.unshift( { value: 1912 + i - 1,label: '大正' + ( i == 1 ? '元' : i ) + '年' } )
1085
- } else if ( val_value.era == 'meiji' ) {
1086
- for ( let i = 1; i <= 45; i++ ) yearOptions.unshift( { value: 1868 + i - 1,label: '明治' + ( i == 1 ? '元' : i ) + '年' } )
1087
- }
1088
-
1089
- return <Column
1090
- padding={ 1 }
1091
- key={ val_value.era }
1092
- >
1093
- <Row.Separate>
1094
- <Input.Select
1095
- tone='cloud'
1096
- enableUnSelected={ false }
1097
- override='force'
1098
- border='1.thin'
1099
- padding={ [ '1/3','2/3' ] }
1100
- paddingRight={ 2 }
1101
- rightIconStyles={ { right: '1/3' } }
1102
- options={ yearOptions }
1103
- value={ val_value.year }
1104
- onUpdateValidValue={ ( { value } ) => {
1105
- set_value( {
1106
- ...val_value,
1107
- modifiedType: 'update',
1108
- year: Number( value )
1109
- } )
1110
- } }
1111
- />
1112
- <Row.Center
1113
- gap={ '1/3' }
1114
- >
1115
- <Buttons.Button.Clear.S
1116
- ssSphere={ 2 }
1117
- onClick={ () => {
1118
- let nextMonth = val_value.month - 1
1119
- set_value( {
1120
- modifiedType: 'update',
1121
- era: val_value.era,
1122
- year: nextMonth == 0 ? val_value.year - 1 : val_value.year,
1123
- month: nextMonth == 0 ? 12 : nextMonth,
1124
- date: 1
1125
- } )
1126
- } }
1127
- >
1128
- <FAI.ChevronLeft />
1129
- </Buttons.Button.Clear.S>
1130
- <Input.Select
1131
- tone='cloud'
1132
- enableUnSelected={ false }
1133
- override='force'
1134
- border='1.thin'
1135
- padding={ [ '1/3','2/3' ] }
1136
- paddingRight={ 2 }
1137
- rightIconStyles={ { right: '1/3' } }
1138
- options={ [
1139
- { value: 1,label: '1月' },
1140
- { value: 2,label: '2月' },
1141
- { value: 3,label: '3月' },
1142
- { value: 4,label: '4月' },
1143
- { value: 5,label: '5月' },
1144
- { value: 6,label: '6月' },
1145
- { value: 7,label: '7月' },
1146
- { value: 8,label: '8月' },
1147
- { value: 9,label: '9月' },
1148
- { value: 10,label: '10月' },
1149
- { value: 11,label: '11月' },
1150
- { value: 12,label: '12月' }
1151
- ] }
1152
- value={ val_value.month }
1153
- onUpdateValidValue={ ( { value } ) => {
1154
- set_value( {
1155
- modifiedType: 'update',
1156
- era: val_value.era,
1157
- year: val_value.year,
1158
- month: Number( value ),
1159
- date: 1
1160
- } )
1161
- } }
1162
- />
1163
- <Buttons.Button.Clear.S
1164
- ssSphere={ 2 }
1165
- onClick={ () => {
1166
- let nextMonth = val_value.month + 1
1167
- set_value( {
1168
- modifiedType: 'update',
1169
- era: val_value.era,
1170
- year: nextMonth == 13 ? val_value.year + 1 : val_value.year,
1171
- month: nextMonth == 13 ? 1 : nextMonth,
1172
- date: 1
1173
- } )
1174
- } }
1175
- >
1176
- <FAI.ChevronRight />
1177
- </Buttons.Button.Clear.S>
1178
- </Row.Center>
1179
- </Row.Separate>
1180
- <Comps.DateWareki.MonthCell { ...params } />
1181
- </Column>
1182
- },
1183
- MonthCell: ( params: {
1184
- val_value: DateWarekiValueTypes
1185
- set_value: React.Dispatch<React.SetStateAction<DateWarekiValueTypes>>
1186
- } ) => {
1187
- let {
1188
- val_value,
1189
- set_value
1190
- } = params
1191
- let targetDate = $.Time( [
1192
- val_value.year.zeroEmbed( 4 ),
1193
- val_value.month.zeroEmbed( 2 ),
1194
- val_value.date.zeroEmbed( 2 )
1195
- ].join( '/' ) )
1196
-
1197
- if ( !targetDate.validate ) return
1198
-
1199
- let weekdayOfFirstDay = targetDate.getFirstDayOfTheMonth().weekday
1200
- let lastDayOfTheMonth = targetDate.getLastDayOfTheMonth()
1201
-
1202
- let Cells: ReactElement[] = []
1203
- for ( let i = 0; i < 7; i++ ) {
1204
- Cells.push( <Text.Supplement
1205
- flexCenter
1206
- fontColor={ i == 0 ? 'googleRed' : i == 6 ? 'googleBlue' : '3.blur' }
1207
- >
1208
- { $.transformer.weekday.shortJP( i ) }
1209
- </Text.Supplement> )
1210
- }
1211
-
1212
- for ( let i = 0; i < weekdayOfFirstDay; i++ ) {
1213
- let date = $.Time( targetDate ).getFirstDayOfTheMonth().addDate( i - weekdayOfFirstDay )
1214
- Cells.push( <Buttons.Button.Sub.R
1215
- color='cloud'
1216
- border='1.thin'
1217
- ssSquare={ 3 }
1218
- opacity='middle'
1219
- onClick={ ( e ) => {
1220
- e.preventDefault()
1221
- e.stopPropagation()
1222
-
1223
- set_value( {
1224
- modifiedType: 'update',
1225
- era: val_value.era,
1226
- year: date.year,
1227
- month: date.month,
1228
- date: date.date
1229
- } )
1230
- } }
1231
- >
1232
- { date.date }
1233
- </Buttons.Button.Sub.R> )
1234
- }
1235
- for ( let i = 1; i <= lastDayOfTheMonth.date; i++ ) {
1236
- let date = $.Time( targetDate ).setDate( i )
1237
- Cells.push( <Buttons.Button.Border.R
1238
- ssSquare={ 3 }
1239
- onClick={ () => {
1240
- set_value( {
1241
- modifiedType: 'update',
1242
- era: val_value.era,
1243
- year: date.year,
1244
- month: date.month,
1245
- date: date.date
1246
- } )
1247
- } }
1248
- >
1249
- { date.date }
1250
- </Buttons.Button.Border.R> )
1251
- }
1252
- for ( let i = 0; i < 7 - lastDayOfTheMonth.weekday - 1; i++ ) {
1253
- let date = $.Time( targetDate ).addMonth( 1 ).setDate( 1 ).addDate( i )
1254
- Cells.push( <Buttons.Button.Sub.R
1255
- color='cloud'
1256
- border='1.thin'
1257
- ssSquare={ 3 }
1258
- opacity='middle'
1259
- onClick={ ( e ) => {
1260
- e.preventDefault()
1261
- e.stopPropagation()
1262
- set_value( {
1263
- modifiedType: 'update',
1264
- era: val_value.era,
1265
- year: date.year,
1266
- month: date.month,
1267
- date: date.date
1268
- } )
1269
- } }
1270
- >
1271
- { date.date }
1272
- </Buttons.Button.Sub.R> )
1273
- }
1274
-
1275
- return <Grid
1276
- gridCols={ 7 }
1277
- gap={ '1/4' }
1278
- >
1279
- { Cells }
1280
- </Grid>
1281
- }
1282
- },
1283
- Variables: {
1284
- Footer: ( params: {
1285
- tipsID: string
1286
- onValueUpdate: any
1287
- onSubmit?: {
1288
- (): void
1289
- }
1290
- } ) => {
1291
- return <Flex
1292
- flexWrap={ false }
1293
- gap={ 1 }
1294
- flexChilds='even'
1295
- freeCSS={ {
1296
- whiteSpace: 'nowrap'
1297
- } }
1298
- >
1299
- <Buttons.Button.Border.R
1300
- onClick={ () => {
1301
- params.onValueUpdate( '' )
1302
- } }
1303
- tabIndex={ -1 }
1304
- flexSizing={ 'none' }
1305
- padding={ [ '2/3',1 ] }
1306
- >
1307
- <FAI.Times /> 削除
1308
- </Buttons.Button.Border.R>
1309
- <Buttons.Button.Prime.R
1310
- flexSizing={ 'auto' }
1311
- onClick={ () => {
1312
- params.onSubmit && params.onSubmit()
1313
- Tooltips.close( params.tipsID )
1314
- } }
1315
- tabIndex={ -1 }
1316
- children={ '決定' }
1317
- padding={ [ '2/3',1 ] }
1318
- />
1319
- </Flex>
1320
- },
1321
- ShiftButtons: ( params: {
1322
- callback( dir: -1 | 1 ): void
1323
- } ) => {
1324
- return <Flex
1325
- flexWrap={ false }
1326
- gap={ '1/3' }
1327
- >
1328
- <Buttons.Button.Clear.R
1329
- className={ style.LeftButton }
1330
- tabIndex={ -1 }
1331
- right={ 0 }
1332
- { ...Comps.Variables.ShiftButtonStyles }
1333
- onClick={ () => {
1334
- params.callback( -1 )
1335
- } }
1336
- >
1337
- <FAI.ChevronLeft />
1338
- </Buttons.Button.Clear.R>
1339
- <Buttons.Button.Clear.R
1340
- className={ style.RightButton }
1341
- tabIndex={ -1 }
1342
- left={ 0 }
1343
- { ...Comps.Variables.ShiftButtonStyles }
1344
- onClick={ () => {
1345
- params.callback( 1 )
1346
- } }
1347
- >
1348
- <FAI.ChevronRight />
1349
- </Buttons.Button.Clear.R>
1350
- </Flex >
1351
- },
1352
- ShiftButtonStyles: {
1353
- flexCenter: true,
1354
- padding: 0,
1355
- unitWidth: 3,
1356
- unitHeight: 3,
1357
- borderRadius: 'sphere',
1358
- position: 'relative'
1359
- } as amotifyUniStyleParams
1360
- }
1361
- }