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,383 +0,0 @@
1
- import {
2
- React
3
- } from '@global'
4
- import {
5
- Box,
6
- Flex,
7
- FAI
8
- } from '@atoms'
9
- import {
10
- Input,
11
- Buttons
12
- } from '@fn'
13
- import {
14
- BoxWrapper,
15
- CommonEffects,
16
- SubmitForm
17
- } from '../core'
18
- import style from './style.module.scss'
19
-
20
- function DefaultValidation( props: {
21
- value: any
22
- params: any
23
- } ): amotify.fn.Input.Validation.Result {
24
- let { value,params } = props
25
- let {
26
- type,
27
- required,
28
- minSelect = 0
29
- } = params as amotify.fn.Input.List.OriginParams
30
- let notice: amotify.fn.Input.Validation.NoticeTypes[] = []
31
-
32
- if ( required ) {
33
- if ( !value.length ) {
34
- if ( type == 'radio' ) {
35
- notice.push( { type: 'invalid',label: '選択されていません' } )
36
- }
37
- }
38
- }
39
-
40
- if ( minSelect ) {
41
- if ( value.length < minSelect ) {
42
- notice.push( { type: 'invalid',label: `${ minSelect }個以上選択してください` } )
43
- }
44
- }
45
-
46
- return {
47
- ok: !notice.filter( ( { type } ) => type == 'invalid' ).length,
48
- notice: notice
49
- }
50
- }
51
-
52
- export const ListInput: React.FC<amotify.fn.Input.List.OriginParams> = ( props ) => {
53
- let { value,options = [] } = props
54
- let Values = $.is.exist( value ) ? $.flatArray( value ) : []
55
- let DefaultOptions = options.map( ( option ) => {
56
- let { value,label } = option
57
-
58
- return {
59
- ...option,
60
- value: JSON.stringify( value ),
61
- label
62
- }
63
- } )
64
- let DefaultValues: string[] = []
65
- Values.forEach( ( value ) => {
66
- let Val = JSON.stringify( value )
67
- let Index = DefaultOptions.findIndex( ( option ) => option.value == Val )
68
- if ( Index == -1 ) return
69
- DefaultValues.push( Val )
70
- } )
71
-
72
- return <Core
73
- { ...props }
74
- value={ DefaultValues }
75
- options={ DefaultOptions }
76
- />
77
- }
78
-
79
- const Core: React.FC<amotify.fn.Input.List.OriginParams> = ( params ) => {
80
- let {
81
- type,
82
- tone,
83
- required,
84
- componentID = '',
85
- form,
86
- override,
87
-
88
- freeCSS,
89
- icon,
90
- iconType,
91
-
92
- enableFormSubmit,
93
- defaultActiveStyling,
94
- checkValidationAtFirst,
95
- onValidate,
96
- onUpdateValue,onUpdateValidValue,
97
- value,
98
- options,
99
- leftIndicator,rightIndicator,
100
-
101
- className,
102
-
103
- cellStyles,cellClassName,
104
- cellCheckedStyles,cellCheckedClassName,
105
-
106
- ...others
107
- } = params
108
-
109
- let Default_Status: amotify.fn.Input.Status.Plain = {
110
- componentID,
111
- dataValue: value,
112
- eventType: 'init',
113
- eventID: $.uuidGen()
114
- }
115
- let [ val_status,set_status ] = React.useState( Default_Status )
116
- let [ val_validate,set_validate ] = React.useState( {
117
- ok: false,
118
- notice: []
119
- } as amotify.fn.Input.Validation.Result )
120
-
121
- CommonEffects( {
122
- type: 'list',
123
- params,
124
- val_status,
125
- set_status,
126
- val_validate,
127
- set_validate,
128
- onUpdateValue,onUpdateValidValue,
129
- DefaultValidation
130
- } )
131
-
132
- return <BoxWrapper
133
- val_status={ val_status }
134
- set_status={ set_status }
135
- val_validate={ val_validate }
136
- params={ params }
137
- >
138
- <Input.Hidden
139
- data-value={ JSON.stringify( val_status.dataValue ) }
140
- form={ form }
141
- data-input-type={ type }
142
- data-validation={ val_validate.ok }
143
- { ...others }
144
- componentID={ val_status.componentID }
145
- />
146
- <CellList
147
- params={ params }
148
- val_status={ val_status }
149
- set_status={ set_status }
150
- />
151
- </BoxWrapper>
152
- }
153
-
154
- const CellList: React.FC<{
155
- params: amotify.fn.Input.List.OriginParams
156
- val_status: amotify.fn.Input.Status.Plain
157
- set_status: React.Dispatch<React.SetStateAction<amotify.fn.Input.Status.Plain>>
158
- }> = ( props ) => {
159
- let {
160
- params,
161
- val_status,
162
- set_status
163
- } = props
164
-
165
- let {
166
- componentID,
167
- type,
168
- tone,
169
- icon = true,
170
- options,
171
- name,
172
- form,
173
- tabIndex,
174
- hideInput,
175
- disabled: DefaultDisabled,
176
- className: ListClassName,
177
-
178
- cellStyles: DefaultCellStyles,
179
- cellClassName: DefaultCellClassName = '',
180
- cellCheckedStyles: DefaultCellCheckedStyles,
181
- cellCheckedClassName: DefaultCellCheckedClassName = '',
182
-
183
- enableFormSubmit,
184
- defaultActiveStyling = true
185
- } = params
186
- let {
187
- dataValue
188
- } = val_status
189
-
190
- let IconBox = icon ? <Box
191
- flexSizing={ 'none' }
192
- children={ params.iconType == 'radio' ? <Comps.RadioIcon /> :
193
- params.iconType == 'checkbox' ? <Comps.CheckboxIcon /> : null }
194
- /> : null
195
-
196
- let Cells = options.map( ( option,index ) => {
197
- let {
198
- value,
199
- label,
200
- disabled = DefaultDisabled,
201
- className = '',
202
- checkedStyles,
203
- checkedClassName = '',
204
- ...styles
205
- } = option
206
-
207
- let CellID = $.uuidGen()
208
- let Checked = dataValue.findIndex( ( v: string ) => v === value ) != -1
209
-
210
- let Styles = {
211
- ...DefaultCellStyles,
212
- ...styles
213
- } as amotifyUniStyleParams
214
- let ClassName = [
215
- style.Label,
216
- style[ 'defaultActiveStyling_' + !!defaultActiveStyling ],
217
- DefaultCellClassName,
218
- className
219
- ]
220
-
221
- if ( Checked ) {
222
- Styles = {
223
- ...Styles,
224
- ...DefaultCellCheckedStyles,
225
- ...checkedStyles,
226
- activeStyles: checkedStyles,
227
- freeCSS: {
228
- ...Styles.freeCSS,
229
- ...DefaultCellCheckedStyles?.freeCSS,
230
- ...checkedStyles?.freeCSS
231
- }
232
- }
233
-
234
- ClassName = [
235
- ...ClassName,
236
- DefaultCellCheckedClassName,
237
- checkedClassName
238
- ]
239
- }
240
-
241
- return [
242
- <input
243
- key={ 'List-' + JSON.stringify( value ) }
244
- type={ type == 'radio' ? 'radio' : 'checkbox' }
245
- className={ [
246
- style.Input,
247
- style[ 'defaultActiveStyling_' + !!defaultActiveStyling ]
248
- ].join( ' ' ) }
249
- name={ 'RadioCheckbox-' + name }
250
- data-list-index={ componentID + '-' + index }
251
- id={ CellID }
252
- value={ String( value ) }
253
- data-form-name={ form }
254
- disabled={ disabled }
255
- checked={ Checked }
256
- onFocus={ ( event ) => {
257
- if ( disabled ) return
258
- if ( type != 'radio' ) return
259
- if ( val_status.dataValue.length ) return
260
- let { value,checked } = event.target
261
- let nextValue: any = [ value ]
262
-
263
- set_status( {
264
- ...val_status,
265
- dataValue: nextValue,
266
- eventType: 'update',
267
- eventID: $.uuidGen()
268
- } )
269
- } }
270
- onChange={ ( event ) => {
271
- if ( disabled ) return
272
- let { value,checked } = event.target
273
- let nextValue = []
274
- if ( type == 'radio' ) {
275
- nextValue = [ value ]
276
- } else if ( type == 'checkbox' || type == 'checker' ) {
277
- if ( checked ) {
278
- nextValue = [ ...val_status.dataValue,value ]
279
- } else {
280
- let prevValue = [ ...val_status.dataValue ]
281
- prevValue.splice( val_status.dataValue.findIndex( ( v: any ) => v == value ),1 )
282
- nextValue = prevValue
283
- }
284
- }
285
-
286
- set_status( {
287
- ...val_status,
288
- dataValue: nextValue,
289
- eventType: 'update',
290
- eventID: $.uuidGen()
291
- } )
292
- } }
293
- onKeyDown={ ( event ) => {
294
- let { key,shiftKey } = event
295
- if ( type == 'checkbox' || type == 'checker' ) {
296
- if ( key == 'Tab' ) {
297
- if ( shiftKey ) { } else { }
298
- } else if ( key.match( /Arrow/ ) ) {
299
- event.preventDefault()
300
-
301
- let dir = [ 'ArrowLeft','ArrowUp' ].includes( key ) ? -1 : 1
302
- let nextIndex = index + dir
303
-
304
- if ( nextIndex < 0 ) {
305
- nextIndex = options.length - 1
306
- } else if ( nextIndex >= options.length ) {
307
- nextIndex = 0
308
- }
309
- $( `input[data-list-index="${ componentID }-${ nextIndex }"]` ).focus()
310
- }
311
- }
312
-
313
- if ( enableFormSubmit ) SubmitForm( event )
314
- } }
315
- tabIndex={ tabIndex }
316
- />,
317
- <Buttons.Label.Plain
318
- key={ 'ListTrigger-' + JSON.stringify( value ) }
319
- htmlFor={ CellID }
320
- className={ ClassName.join( ' ' ) }
321
- tabIndex={ -1 }
322
- display='flex'
323
- ssEffectsOnActive={ false }
324
- verticalAlign='center'
325
- gap={ '1/3' }
326
- flexWrap={ false }
327
- { ...Styles }
328
- >
329
- { IconBox }
330
- { $.is.string( label ) ? <Box children={ label } /> : label }
331
- </Buttons.Label.Plain>
332
- ]
333
- } )
334
-
335
- return <Flex
336
- flexSizing={ 'auto' }
337
- freeCSS={ {
338
- ...params.freeCSS
339
- } }
340
- className={ [
341
- ListClassName,
342
- style.CellBase,
343
- style[ 'HideInput_' + hideInput ],
344
- style[ 'IconIndicator_' + !!icon ],
345
- style[ 'Tone_' + tone ]
346
- ].join( ' ' ) }
347
- children={ Cells }
348
- />
349
- }
350
-
351
- const Comps = {
352
- RadioIcon: () => ( <Box
353
- className={ style.Icon }
354
- backgroundColor={ '1.layer.base' }
355
- border
356
- transition='middle'
357
- position='relative'
358
- borderRadius={ 'sphere' }
359
- flexCenter
360
- /> ),
361
- CheckboxIcon: () => ( <Box
362
- className={ [
363
- style.Icon,
364
- style.CheckboxIcon
365
- ].join( ' ' ) }
366
- borderRadius={ '3.tone.tertiary' }
367
- backgroundColor={ '1.layer.base' }
368
- border
369
- transition='middle'
370
- fontColor={ 'white' }
371
- position='relative'
372
- flexCenter
373
- >
374
- <FAI.Check
375
- className={ style.I }
376
- transition='middle'
377
- opacity='trans'
378
- freeCSS={ {
379
- zIndex: 8
380
- } }
381
- />
382
- </Box> )
383
- }
@@ -1,84 +0,0 @@
1
- @use '@props' as *;
2
- .CellBase {
3
- &.HideInput_true .Input {
4
- display: none;
5
- }
6
- }
7
- .Input {
8
- &:checked + .Label .Icon {
9
- border-color: transparent;
10
- &:after, > * {
11
- transform: scale(1) !important;
12
- opacity: 1 !important;
13
- }
14
- }
15
- &.defaultActiveStyling_true {
16
- &:checked {
17
- &:focus + .Label {
18
- opacity: 1 !important;
19
- box-shadow:
20
- 0 0 0 transparent inset,
21
- 0 0 0 1px $color-theme-opacity-middle,
22
- 0 0 0 $unit1_3 $color-theme-opacity-low !important;
23
- }
24
- }
25
- &:focus + .Label {
26
- box-shadow:
27
- 0 0 0 transparent inset,
28
- 0 0 0 $unit1_3 $color-layer3 !important;
29
- }
30
- &:active + .Label {
31
- opacity: 1 !important;
32
- }
33
- }
34
- }
35
- .Label {
36
- -webkit-user-select: none;
37
- user-select: none;
38
- * {
39
- pointer-events: none;
40
- }
41
- &.defaultActiveStyling_true {
42
- &:hover {
43
- opacity: .6;
44
- }
45
- }
46
- }
47
- .Icon {
48
- width: 20px;
49
- height: 20px;
50
- &.CheckboxIcon {
51
- &:after {
52
- background-color: $color-theme;
53
- }
54
- .I {
55
- transform: scale(.3);
56
- }
57
- }
58
- &:before, &:after {
59
- content: "";
60
- position: absolute;
61
- opacity: 0;
62
- transition: $animation-time-middle;
63
- }
64
- &:before {
65
- width: 100%;
66
- height: 100%;
67
- border-radius: inherit;
68
- opacity: 1;
69
- transition: 0s;
70
- transition-timing-function: $animation-style1;
71
- }
72
- &:after {
73
- top: 0;
74
- left: 0;
75
- width: 100%;
76
- height: 100%;
77
- transform: scale(0.3);
78
- border-radius: inherit;
79
- background-color: $color-layer1;
80
- border: 5.5px solid $color-theme;
81
- box-shadow: 0 0 0 transparent inset, $shadow1;
82
- background-color: white;
83
- }
84
- }
@@ -1,230 +0,0 @@
1
- import {
2
- React,
3
- } from '@global'
4
-
5
- import {
6
- Box
7
- } from '@atoms'
8
- import {
9
- Column
10
- } from '@mols'
11
- import {
12
- BoxWrapper,
13
- SubmitForm,
14
- ValidationCheck,
15
- CommonEffects
16
- } from '../core'
17
- import {
18
- Input,
19
- Tooltips,
20
- Buttons
21
- } from '@fn'
22
-
23
-
24
- import style from './style.module.scss'
25
- import coreStyle from '../style.module.scss'
26
-
27
- function DefaultValidation( props: {
28
- value: any
29
- params: any
30
- } ): amotify.fn.Input.Validation.Result {
31
- let {
32
- value,
33
- params
34
- } = props
35
- let {
36
- required,
37
- options
38
- } = params as amotify.fn.Input.RichSelect.PlainParams
39
- let notice: amotify.fn.Input.Validation.NoticeTypes[] = []
40
-
41
- if ( required ) {
42
- if ( !options.length || ( options.length && $.is.nullish( JSON.parse( value ) ) ) ) {
43
- notice.push( { type: 'invalid',label: '必須項目です' } )
44
- }
45
- }
46
-
47
- return {
48
- ok: !notice.filter( ( { type } ) => type == 'invalid' ).length,
49
- notice: notice
50
- }
51
- }
52
-
53
- export const RichSelectInput: React.FC<amotify.fn.Input.RichSelect.PlainParams> = ( params ) => {
54
- let {
55
- value = null,
56
- placeholder,
57
- options = []
58
- } = params
59
-
60
- let SelectedExist = 0
61
- let SelectedValue = JSON.stringify( value )
62
- let DefaultOptions = options.map( ( option ) => {
63
- let { type,value } = option
64
- let Value = JSON.stringify( value )
65
- let Selected = Value == SelectedValue
66
- SelectedExist |= Number( Selected )
67
-
68
- return {
69
- ...option,
70
- type: type || 'button',
71
- value: Value
72
- }
73
- } )
74
- if ( !SelectedExist ) value = null
75
- let DefaultValue = JSON.stringify( value )
76
-
77
- return <Core
78
- { ...params }
79
- value={ DefaultValue }
80
- options={ DefaultOptions }
81
- />
82
- }
83
-
84
- const Core: React.FC<amotify.fn.Input.RichSelect.PlainParams> = ( params ) => {
85
- let {
86
- tone,
87
- required,
88
- form,
89
- className,
90
-
91
- enableFormSubmit,
92
- enableUnSelected,
93
-
94
- checkValidationAtFirst,
95
- onChange,onKeyDown,
96
- onValidate,
97
- onUpdateValue,
98
- onUpdateValidValue,
99
- value = '',
100
- options,
101
- placeholder,
102
-
103
- leftIndicator,rightIndicator,leftIcon,rightIcon,
104
- componentID,status_id,
105
-
106
- cellStyles,
107
- sheetStyles,
108
-
109
- gravityPoint,
110
- ...others
111
- } = params
112
-
113
- let Default_Status: amotify.fn.Input.Status.Plain = {
114
- componentID: params.componentID || '',
115
- dataValue: value,
116
- eventType: 'init',
117
- eventID: $.uuidGen()
118
- }
119
- let [ val_tipID ] = React.useState( $.uuid.gen() )
120
- let [ val_status,set_status ] = React.useState( Default_Status )
121
- let [ val_validate,set_validate ] = React.useState( {
122
- ok: false,
123
- notice: []
124
- } as amotify.fn.Input.Validation.Result )
125
-
126
- CommonEffects( {
127
- type: 'richSelect',
128
- params,
129
- val_status,
130
- set_status,
131
- ExtraOverrideParams: {
132
- dataValue: value,
133
- formatValue: value,
134
- },
135
- val_validate,
136
- set_validate,
137
- DefaultValidation,
138
- onUpdateValue,
139
- onUpdateValidValue
140
- } )
141
-
142
- let SelectedElement: ReactElement = <Box fontColor='4.thin' textAlign='left'>{ placeholder || '選択' }</Box>
143
- if ( val_status.dataValue ) {
144
- let Selected = options.find( ( option ) => option.type == 'button' && option.value == val_status.dataValue )
145
- if ( Selected ) {
146
- SelectedElement = Selected.selectedLabel || Selected.label
147
- }
148
- }
149
-
150
- return <BoxWrapper
151
- val_status={ val_status }
152
- set_status={ set_status }
153
- val_validate={ val_validate }
154
- params={ params }
155
- >
156
- <button
157
- { ...others as any }
158
- data-form={ form }
159
- data-validation={ val_validate.ok }
160
- data-component-id={ val_status.componentID }
161
- data-value={ val_status.dataValue }
162
- data-input-type={ 'richSelect' }
163
- className={ [
164
- className,
165
- style.SelectLegend,
166
- coreStyle.InputCover
167
- ].join( ' ' ) }
168
- onClick={ ( e ) => {
169
- Tooltips.open( {
170
- tipsID: val_tipID,
171
- parent: e.currentTarget,
172
- gravityPoint: gravityPoint || 13,
173
- close_option: {
174
- elementBlur: ''
175
- },
176
- content: () => {
177
- let Options = options.map( ( option ) => {
178
- let {
179
- type,
180
- value,
181
- label
182
- } = option
183
-
184
- if ( type == 'button' ) {
185
- return <Buttons.Button.Clear.R
186
- color='cloud'
187
- borderRadius={ 0 }
188
- fontColor='2.normal'
189
- textAlign='left'
190
- padding={ 0 }
191
- onClick={ () => {
192
- set_status( {
193
- ...val_status,
194
- dataValue: value,
195
- eventType: 'update',
196
- eventID: $.uuidGen()
197
- } )
198
- Tooltips.close( val_tipID )
199
- } }
200
- { ...cellStyles }
201
- >
202
- { label }
203
- </Buttons.Button.Clear.R>
204
- } else {
205
- return label
206
- }
207
- } )
208
- return <Column
209
- ssCardBox
210
- padding={ [ 1,0 ] }
211
- gap={ 0 }
212
- // maxHeight={ 'viewHeight' }
213
- overflow={ 'auto' }
214
- { ...sheetStyles }
215
- freeCSS={ {
216
- minWidth: 12 * 20,
217
- maxHeight: '90vh',
218
- ...sheetStyles?.freeCSS
219
- } }
220
- >
221
- { Options }
222
- </Column>
223
- }
224
- } )
225
- } }
226
- >
227
- { SelectedElement }
228
- </button>
229
- </BoxWrapper>
230
- }
@@ -1,11 +0,0 @@
1
- @use '@props' as *;
2
- .Select {
3
- cursor: pointer;
4
- position: absolute;
5
- top: 0;
6
- left: 0;
7
- right: 0;
8
- bottom: 0;
9
- opacity: 0;
10
- }
11
- .SelectLegend {}