amotify 0.0.64 → 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 -357
  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 -149
  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 -74
  105. package/src/global/styleConverter.tsx +0 -465
  106. package/src/launch.tsx +0 -119
  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,524 +0,0 @@
1
- import {
2
- useStore,
3
- React
4
- } from '@global'
5
- import {
6
- Box,
7
- Flex,
8
- } from '@atoms'
9
- import {
10
- Column
11
- } from '@mols'
12
- import {
13
- Input,
14
- Buttons
15
- } from '@fn'
16
-
17
- import {
18
- BoxWrapper,
19
- SubmitForm,
20
- CommonEffects
21
- } from '../core'
22
- import style from './style.module.scss'
23
-
24
- function DefaultValidation( props: {
25
- value: any
26
- params: any
27
- } ): amotify.fn.Input.Validation.Result {
28
- let { value,params } = props
29
- let { required } = params as amotify.fn.Input.TextArea.PlainParams
30
- let notice: amotify.fn.Input.Validation.NoticeTypes[] = []
31
-
32
- if ( required && !value ) {
33
- notice.push( { type: 'invalid',label: '必須項目です' } )
34
- }
35
-
36
- return {
37
- ok: !notice.filter( ( { type } ) => type == 'invalid' ).length,
38
- notice: notice
39
- }
40
- }
41
-
42
- type DataLevelingResult = {
43
- stepValue: number
44
- stepIndex: number
45
- positionLeft: string
46
- }
47
- const DataLeveling: {
48
- ( props: {
49
- value: number
50
- val_status: amotify.fn.Input.Status.Slider
51
- } ): DataLevelingResult
52
- } = ( props ) => {
53
- let { value,val_status } = props
54
- let { min,max,step } = val_status
55
-
56
- value = Math.max( value,min )
57
- value = Math.min( value,max )
58
-
59
- let rawValue = value / max
60
- let stepValue = rawValue * max
61
-
62
- stepValue = Math.round( stepValue / step )
63
-
64
- return {
65
- stepValue: stepValue * step,
66
- stepIndex: stepValue,
67
- positionLeft: stepValue * step / max * 100 + '%'
68
- }
69
- }
70
-
71
- export const SliderInput: React.FC<amotify.fn.Input.Slider.PlainParams> = ( params ) => {
72
- let {
73
- color = 'theme',
74
- required,
75
- form = '',
76
-
77
- legends: {
78
- enable: showLegends = true,
79
- custom: customLegends,
80
- showAlways: showLegendsAlways = false
81
- } = {},
82
- min,max,step,
83
-
84
- enableFormSubmit,
85
-
86
- checkValidationAtFirst,
87
- onChange,onKeyDown,
88
- onValidate,
89
- onUpdateValue,onUpdateValidValue,
90
- value = '',
91
- className,
92
-
93
- ...others
94
- } = params
95
-
96
- let Default_Status: amotify.fn.Input.Status.Slider = {
97
- componentID: params.componentID || '',
98
- dataValue: value,
99
- min,max,step,
100
- eventType: 'init',
101
- eventID: $.uuidGen(),
102
- }
103
- let [ val_status,set_status ] = React.useState( Default_Status )
104
- let [ val_validate,set_validate ] = React.useState( {
105
- ok: false,
106
- notice: []
107
- } as amotify.fn.Input.Validation.Result )
108
-
109
- CommonEffects( {
110
- params,
111
- val_status,
112
- set_status,
113
- val_validate,
114
- set_validate,
115
- onUpdateValue,onUpdateValidValue,
116
- DefaultValidation,
117
- ExtraOverrideParams: {
118
- dataValue: value
119
- },
120
- ExtraStoreParams: {
121
- prevValue: val_status.dataValue,
122
- setValueByForeign: ( value: number ) => {
123
- set_status( {
124
- ...val_status,
125
- dataValue: value,
126
- eventType: 'update',
127
- eventID: $.uuidGen(),
128
- } )
129
- }
130
- }
131
- } )
132
-
133
- let DotData = DataLeveling( {
134
- value: val_status.dataValue,
135
- val_status
136
- } )
137
-
138
- return <BoxWrapper
139
- val_status={ val_status }
140
- set_status={ set_status }
141
- val_validate={ val_validate }
142
- params={ params }
143
- >
144
- <Input.Hidden
145
- value={ DotData.stepValue }
146
- form={ form }
147
- data-value={ DotData.stepValue }
148
- data-validation={ val_validate.ok }
149
- data-input-type={ 'slider' }
150
- { ...others }
151
- />
152
- <Column
153
- gap={ '1/2' }
154
- flexSizing={ 'auto' }
155
- className={ [
156
- style.Wrap,
157
- className,
158
- style[ 'ShowLegendsAlways_' + showLegendsAlways ]
159
- ].join( ' ' ) }
160
- >
161
- <Comps.Rail
162
- color={ color }
163
- val_status={ val_status }
164
- set_status={ set_status }
165
- DotData={ DotData }
166
- form={ form }
167
- enableFormSubmit={ enableFormSubmit! }
168
- />
169
- { showLegends ? <Comps.IndicatorLabels
170
- componentID={ val_status.componentID }
171
- min={ min }
172
- max={ max }
173
- step={ step }
174
- customLegends={ customLegends }
175
- /> : null }
176
- </Column>
177
- </BoxWrapper>
178
- }
179
-
180
- const Comps = {
181
- IndicatorLabels: ( props: {
182
- componentID: string
183
- min: number
184
- max: number
185
- step: number
186
- customLegends?: amotify.fn.Input.Slider.LegendsCallback
187
- } ) => {
188
- let {
189
- componentID,
190
- min,
191
- max,
192
- step,
193
- customLegends
194
- } = props
195
- let Labels = []
196
-
197
- let minStep = Math.round( min / step )
198
- let maxStep = Math.round( max / step )
199
- let steps = maxStep - minStep + 1
200
-
201
- for ( var index = minStep; index <= maxStep; index++ ) {
202
- let value = index * step
203
- value = Math.max( value,min )
204
- value = Math.min( value,max )
205
- let left = ( value / max * 100 ) + '%'
206
- Labels.push( <Box
207
- key={ value }
208
- className={ style.Label }
209
- id={ 'Legend-' + componentID + '-' + index }
210
- display={ index == minStep || index == maxStep ? 'flex' : 'none' }
211
- position='absolute'
212
- top={ 0 }
213
- unitHeight={ 1 }
214
- unitWidth={ 1.5 }
215
- transition='middle'
216
- fontColor={ '1.clear' }
217
- freeCSS={ {
218
- left: left,
219
- whiteSpace: 'nowrap',
220
- textAlign: 'center'
221
- } }
222
- verticalAlign='center'
223
- horizontalAlign='center'
224
- children={ customLegends ? customLegends( value ) : value.rank() }
225
- /> )
226
- }
227
-
228
- React.useEffect( () => {
229
- const LabelLeveling = () => {
230
- let Labels = $( '#Labels-' + componentID )
231
- let {
232
- width
233
- } = Labels.position()
234
-
235
- let maxLabelCount = Math.round( width / 50 ) - 1
236
- let labelStep = Math.round( steps / maxLabelCount )
237
-
238
- for ( let index = minStep + 1; index < maxStep; index++ ) {
239
- $( '#Legend-' + componentID + '-' + index ).css( {
240
- display: index % labelStep == 0 ? 'flex' : 'none'
241
- } )
242
- }
243
- }
244
-
245
- $( window ).addEvent( {
246
- eventID: 'SliderResizeCallback-' + componentID,
247
- eventType: 'resize',
248
- callback: () => {
249
- LabelLeveling()
250
- }
251
- } )
252
- LabelLeveling()
253
-
254
- return () => {
255
- $( window ).removeEvent( 'SliderResizeCallback-' + componentID )
256
- }
257
- },[] )
258
-
259
- return <Flex
260
- className={ style.Labels }
261
- verticalAlign='center'
262
- horizontalAlign='between'
263
- backgroundColor='posi'
264
- fontSize={ '0.xs' }
265
- position='relative'
266
- id={ 'Labels-' + componentID }
267
- >
268
- <Box
269
- position='absolute'
270
- top={ 0 }
271
- left={ 0 }
272
- bottom={ 0 }
273
- freeCSS={ {
274
- right: 12 * 1.5
275
- } }
276
- children={ Labels }
277
- />
278
- </Flex>
279
- },
280
- Rail: ( props: {
281
- color: amotify.fn.Input.Slider.ColorTypes
282
- val_status: amotify.fn.Input.Status.Slider
283
- set_status: React.Dispatch<React.SetStateAction<amotify.fn.Input.Status.Slider>>
284
- DotData: DataLevelingResult
285
- form: string
286
- enableFormSubmit: boolean
287
- } ) => {
288
- let {
289
- val_status,
290
- set_status,
291
- DotData,
292
- form,
293
- enableFormSubmit
294
- } = props
295
- let {
296
- componentID
297
- } = val_status
298
-
299
- return <Flex
300
- className={ style.Rail }
301
- position='relative'
302
- paddingLeft={ '1/2' }
303
- unitHeight={ 1.5 }
304
- verticalAlign='center'
305
- freeCSS={ {
306
- minWidth: '10rem',
307
- zIndex: 1,
308
- cursor: 'pointer'
309
- } }
310
- onMouseDown={ ( event ) => {
311
- event.stopPropagation()
312
- EffectStart( event,{
313
- val_status,
314
- set_status,
315
- DotData
316
- } )
317
- } }
318
- onTouchStart={ ( event ) => {
319
- event.stopPropagation()
320
- EffectStart( event,{
321
- val_status,
322
- set_status,
323
- DotData
324
- } )
325
- } }
326
- >
327
- <Box
328
- className={ style.Bar }
329
- backgroundColor={ '4.layer.darken' }
330
- position='relative'
331
- borderRadius={ 'sphere' }
332
- transition='middle'
333
- flexSizing={ 'none' }
334
- unitHeight={ '2/3' }
335
- width={ 1 }
336
- id={ componentID + '_Bar' }
337
- >
338
- <Box
339
- className={ style.BarColor }
340
- position='relative'
341
- height={ 1 }
342
- width={ 0 }
343
- left={ 0 }
344
- transition='long'
345
- borderRadius={ 'inherit' }
346
- backgroundColor={ props.color }
347
- opacity='middle'
348
- overflow='hidden'
349
- freeCSS={ {
350
- width: DotData.positionLeft
351
- } }
352
- id={ componentID + '_BarColor' }
353
- />
354
- </Box>
355
- <Box
356
- className={ style.BallWrap }
357
- position='absolute'
358
- top={ 0 }
359
- left={ 0 }
360
- bottom={ 0 }
361
- freeCSS={ {
362
- right: 12 * 1.5
363
- } }
364
- >
365
- <Buttons.Button.Plain
366
- className={ style.Ball }
367
- position='absolute'
368
- backgroundColor={ props.color }
369
- top={ 0 }
370
- left={ 0 }
371
- ssSphere={ 1.5 }
372
- freeCSS={ {
373
- zIndex: 2,
374
- left: DotData.positionLeft
375
- } }
376
- data-form-name={ form }
377
- id={ componentID + '_Ball' }
378
- onKeyDown={ ( event ) => {
379
- KeyDownEvent( {
380
- event,
381
- val_status,
382
- set_status,
383
- DotData
384
- } )
385
-
386
- if ( enableFormSubmit ) SubmitForm( event )
387
- } }
388
- />
389
- </Box>
390
- </Flex>
391
- }
392
- }
393
-
394
- const EffectStart = ( event: any,info: {
395
- val_status: amotify.fn.Input.Status.Slider
396
- set_status: React.Dispatch<React.SetStateAction<amotify.fn.Input.Status.Slider>>
397
- DotData: DataLevelingResult
398
- } ) => {
399
- $( document )
400
- .addEvent( {
401
- eventID: 'SliderMouseMove',
402
- eventType: 'mousemove',
403
- callback: ( event ) => { EffectMove( event,info ) },
404
- option: { passive: false }
405
- } )
406
- .addEvent( {
407
- eventID: 'SliderTouchMove',
408
- eventType: 'touchmove',
409
- callback: ( event ) => { EffectMove( event,info ) },
410
- option: { passive: false }
411
- } )
412
- .addEvent( {
413
- eventID: 'SliderMouseUp',
414
- eventType: 'mouseup',
415
- callback: () => { EffectEnd() }
416
- } )
417
- .addEvent( {
418
- eventID: 'SliderTouchEnd',
419
- eventType: 'touchend',
420
- callback: () => { EffectEnd() }
421
- } )
422
- }
423
- const EffectMove = ( event: any,info: {
424
- val_status: amotify.fn.Input.Status.Slider
425
- set_status: React.Dispatch<React.SetStateAction<amotify.fn.Input.Status.Slider>>
426
- } ) => {
427
- let mouseX = $.getCursor( event ).x
428
- let {
429
- val_status,
430
- set_status,
431
- } = info
432
- let {
433
- componentID,
434
- min,max
435
- } = val_status
436
-
437
- let Ball = $( '#' + componentID + '_Ball' )
438
- let Bar = $( '#' + componentID + '_Bar' )
439
- let BarColor = $( '#' + componentID + '_BarColor' )
440
-
441
- let { width: barWidth,left: barLeft } = Bar.position()
442
-
443
- let Left = ( mouseX - barLeft ) / barWidth
444
- Left = Math.max( Left,0 )
445
- Left = Math.min( Left,1 )
446
-
447
- let LeftRawValue = Left * max
448
- let resultValues = DataLeveling( {
449
- value: LeftRawValue,
450
- val_status
451
- } )
452
- let left = resultValues.positionLeft
453
- let stepValue = resultValues.stepValue
454
-
455
- Ball.css( { left: left } )
456
- BarColor.css( { width: left } )
457
-
458
- let { prevValue } = useStore.get( componentID )
459
- if ( stepValue != prevValue ) {
460
- useStore.update( {
461
- key: componentID,
462
- value: {
463
- prevValue: stepValue
464
- }
465
- } )
466
- set_status( {
467
- ...val_status,
468
- dataValue: stepValue,
469
- eventType: 'update',
470
- eventID: $.uuidGen(),
471
- } )
472
- }
473
- event.preventDefault()
474
- event.stopPropagation()
475
- return false
476
- }
477
- const EffectEnd = () => {
478
- $( document ).removeEvent( [ 'SliderMouseMove','SliderTouchMove','SliderMouseUp','SliderTouchEnd' ] )
479
- }
480
-
481
- const KeyDownEvent = (
482
- props: {
483
- event: React.KeyboardEvent<HTMLButtonElement>
484
- val_status: amotify.fn.Input.Status.Slider
485
- set_status: React.Dispatch<React.SetStateAction<amotify.fn.Input.Status.Slider>>
486
- DotData: DataLevelingResult
487
- }
488
- ) => {
489
- let {
490
- event,
491
- val_status,
492
- set_status
493
- } = props
494
- let { min,max,step } = val_status
495
- let { key,metaKey,ctrlKey } = event
496
- let auxKey = ctrlKey || metaKey
497
-
498
- let nextValue = val_status.dataValue
499
- if ( !key.match( /Arrow/ ) ) return
500
-
501
- event.preventDefault()
502
- if ( key.match( /Left|Up/ ) ) {
503
- if ( auxKey ) nextValue = min
504
- else nextValue -= step
505
- } else if ( key.match( /Right|Down/ ) ) {
506
- if ( auxKey ) nextValue = max
507
- else nextValue += step
508
- }
509
- nextValue = Math.max( Math.min( nextValue,max ),min )
510
-
511
- useStore.update( {
512
- key: val_status.componentID,
513
- value: {
514
- prevValue: nextValue
515
- }
516
- } )
517
-
518
- set_status( {
519
- ...val_status,
520
- dataValue: nextValue,
521
- eventType: 'update',
522
- eventID: $.uuidGen(),
523
- } )
524
- }
@@ -1,67 +0,0 @@
1
- @use '@props' as *;
2
- @use'@styleSet' as *;
3
- .Label {
4
- &:before {
5
- content: "";
6
- position: absolute;
7
- top: calc(-1 * $unit1-5 / 2);
8
- height: calc($unit1-5 / 2);
9
- left: 50%;
10
- width: 1px;
11
- transform: translateX(-50%);
12
- background-color: $font-color4;
13
- }
14
- &:not( :first-child):not( :last-child) {
15
- opacity: 0;
16
- }
17
- &:first-child, &:last-child {
18
- opacity: .6;
19
- }
20
- }
21
- .Wrap {
22
- &:hover {
23
- .Rail {
24
- .Bar {
25
- background-color: $color-layer5;
26
- .BarColor {
27
- opacity: 1 !important;
28
- }
29
- }
30
- + .Labels .Label {
31
- opacity: .75;
32
- }
33
- }
34
- }
35
- &.ShowLegendsAlways_true {
36
- .Label {
37
- opacity: 1;
38
- }
39
- }
40
- .Rail {
41
- user-select: none;
42
- -webkit-user-select: none;
43
- * {
44
- user-select: none;
45
- -webkit-user-select: none;
46
- }
47
- .Ball {
48
- transition: box-shadow $animation-time-middle, left .1s;
49
- &:focus {
50
- box-shadow: 0 0 0 $unit2_3 hsla(var(--color-layer5-hsl), .4);
51
- }
52
- &:before {
53
- @include absoluteCovered();
54
- border-radius: 100rem;
55
- box-shadow: $shadow1;
56
- }
57
- }
58
- &:active {
59
- .Ball {
60
- box-shadow: 0 0 0 $unit2_3 hsla(var(--color-layer5-hsl), .4);
61
- }
62
- + .Labels .Label {
63
- opacity: 1;
64
- }
65
- }
66
- }
67
- }