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,473 +0,0 @@
1
- import {
2
- useStore,
3
- React
4
- } from '@global'
5
- import {
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
- Tooltips
18
- } from '@fn'
19
-
20
- import style from './style.module.scss'
21
-
22
- type BoxWrapperParams = {
23
- val_status: any
24
- set_status: React.Dispatch<React.SetStateAction<any>>
25
- val_validate: amotify.fn.Input.Validation.Result
26
- params: any
27
- children: ReactElement
28
- }
29
-
30
- export const BoxWrapper: React.FC<BoxWrapperParams> = ( props ) => {
31
- let {
32
- children,
33
- val_status,
34
- set_status,
35
- val_validate,
36
- params
37
- } = props
38
- let {
39
- clearButton,
40
- rightIcon,
41
- leftIcon,
42
- wrapStyles
43
- } = params
44
-
45
- if ( val_status.eventType == 'init' && !params.checkValidationAtFirst ) val_validate.notice = []
46
-
47
- return <Box
48
- position='relative'
49
- { ...wrapStyles }
50
- id={ 'BoxWrapper-' + val_status.componentID }
51
- >
52
- <Flex
53
- flexWrap={ false }
54
- // height='100%'
55
- className={ style.Wrapper }
56
- >
57
- { params.leftIndicator }
58
- <Flex
59
- position='relative'
60
- flexSizing={ 'auto' }
61
- >
62
- { leftIcon }
63
- { children }
64
- { clearButton && !!val_status.dataValue ? <Buttons.Button.Normal.R
65
- ssSphere={ 2 }
66
- flexCenter
67
- fontColor={ '5.translucent' }
68
- ssEffectsOnActive={ [ 'ripple.theme' ] }
69
- position='absolute'
70
- right={ 1 }
71
- top={ '50%' }
72
- freeCSS={ {
73
- zIndex: 3
74
- } }
75
- className={ style.IndicatorIcon }
76
- onClick={ () => {
77
- set_status( {
78
- ...val_status,
79
- dataValue: '',
80
- formatValue: '',
81
- eventType: 'update',
82
- eventID: $.uuidGen()
83
- } as any )
84
- } }
85
- >
86
- <FAI.Times />
87
- </Buttons.Button.Normal.R> : rightIcon }
88
- </Flex>
89
- { params.rightIndicator }
90
- </Flex>
91
- <GenNotices
92
- notice={ val_validate.notice }
93
- val_status={ val_status }
94
- />
95
- </Box>
96
- }
97
- const GenNotices: React.FC<{
98
- notice: amotify.fn.Input.Validation.NoticeTypes[]
99
- val_status: amotify.fn.Input.Status.Plain
100
- }> = ( params ) => {
101
- let { notice,val_status } = params
102
- let {
103
- componentID,
104
- eventType
105
- } = val_status
106
-
107
- $.interval.clear( 'NoticeTimer-' + componentID )
108
- $.interval.clear( 'NoticeTimerClose-' + componentID )
109
-
110
- let parentID = 'notice-' + params.val_status.componentID
111
- let tipsID = 'notice-tips-' + params.val_status.componentID
112
-
113
- if ( !notice.length ) {
114
- Tooltips.close( tipsID )
115
- return null
116
- }
117
-
118
- let Notices = notice.map( ( cell ) => {
119
- let { type,label } = cell
120
-
121
- let ICON =
122
- type == 'invalid' ? FAI.Times :
123
- type == 'warn' ? FAI.Exclamation :
124
- FAI.Check
125
-
126
- return <Row.Left
127
- gap={ 0 }
128
- borderRadius={ '2.tone.secondary' }
129
- >
130
- <ICON
131
- flexCenter
132
- fontSize='3.paragraph'
133
- fontColor={ {
134
- 'invalid': 'nega',
135
- 'warn': 'warn',
136
- 'valid': 'posi',
137
- }[ type ] as 'theme' }
138
- />
139
- <Box
140
- fontColor='white'
141
- >
142
- { label }
143
- </Box>
144
- </Row.Left>
145
- } )
146
-
147
- $.interval.standBy(
148
- 'NoticeTimer-' + componentID,
149
- 350,
150
- () => {
151
- Tooltips.open( {
152
- tipsID,
153
- parent: '#' + parentID,
154
- padding: [ '1/2',0 ],
155
- content: <Tooltips.Comps.Body
156
- padding={ [ '1/2','2/3' ] }
157
- fontSize='1.mini'
158
- position='relative'
159
- >
160
- <Box
161
- position='absolute'
162
- unitHeight={ 1 }
163
- unitWidth={ 1 }
164
- left={ 1 }
165
- backgroundColor='dark'
166
- freeCSS={ {
167
- zIndex: 1,
168
- transform: 'rotate(45deg)',
169
- top: -6
170
- } }
171
- />
172
- <Column
173
- gap={ '1/3' }
174
- position='relative'
175
- freeCSS={ {
176
- zIndex: 2
177
- } }
178
- backgroundColor='inherit'
179
- >
180
- { Notices }
181
- </Column>
182
- </Tooltips.Comps.Body>
183
- } )
184
-
185
- $.interval.standBy(
186
- 'NoticeTimerClose-' + componentID,
187
- 7500,
188
- () => {
189
- Tooltips.close( tipsID )
190
- }
191
- )
192
- } )
193
-
194
- return <Box
195
- className={ style.Notices }
196
- id={ parentID }
197
- />
198
- }
199
-
200
- export const CommonEffects: {
201
- ( props: {
202
- type?: string
203
- params: plainObject
204
- val_status: amotify.fn.Input.Status.Plain
205
- set_status: React.Dispatch<React.SetStateAction<any>>
206
- val_validate: amotify.fn.Input.Validation.Result
207
- set_validate: React.Dispatch<React.SetStateAction<amotify.fn.Input.Validation.Result>>
208
- DefaultValidation: amotify.fn.Input.Validation.SystemCheck
209
- onUpdateValue?: amotify.fn.Input.OnUpdateValue
210
- onUpdateValidValue?: amotify.fn.Input.OnUpdateValue
211
- ExtraOverrideParams?: plainObject
212
- ExtraStoreParams?: plainObject
213
- } ): void
214
- } = ( props ) => {
215
- let {
216
- type,
217
- params,
218
- val_status,
219
- set_status,
220
- ExtraOverrideParams,
221
- ExtraStoreParams,
222
- val_validate,
223
- set_validate,
224
- DefaultValidation,
225
- onUpdateValue,
226
- onUpdateValidValue
227
- } = props
228
- params = { ...params }
229
- let {
230
- componentID
231
- } = val_status
232
-
233
- let [ val_refresh,set_refresh ] = React.useState( $.uuidGen() )
234
-
235
- React.useEffect( () => {
236
- useStore.update( {
237
- key: componentID,
238
- value: {
239
- ResolveRefresh: null,
240
- Refresh: () => {
241
- return new Promise( ( res,rej ) => {
242
- useStore.get( componentID ).ResolveRefresh = res
243
- set_refresh( $.uuidGen() )
244
- } )
245
- },
246
- GenNotice: ( props: { ok: boolean,notice: amotify.fn.Input.Validation.NoticeTypes[] } ) => {
247
- let { ok,notice } = props
248
- set_validate( { ok,notice } )
249
- },
250
- ...ExtraStoreParams
251
- }
252
- } )
253
- return () => {
254
- useStore.delete( componentID )
255
- }
256
- },[] )
257
-
258
- const mounted = React.useRef( false )
259
- React.useEffect( () => {
260
- if ( mounted.current ) {
261
- set_status( {
262
- ...val_status,
263
- eventType: 'refresh',
264
- eventID: $.uuidGen()
265
- } )
266
- } else {
267
- mounted.current = true
268
- }
269
- },[ val_refresh ] )
270
- React.useEffect( () => {
271
- params.value = val_status.dataValue
272
-
273
- $.interval.clear( 'ValidationTimer-' + componentID )
274
-
275
- ValidationCheck( {
276
- val_status,
277
- set_validate,
278
- DefaultValidation,
279
- params
280
- } )
281
- },[ val_status.eventID ] );
282
-
283
- ( () => {
284
- let {
285
- override
286
- } = params
287
- if ( override == 'never' ) return
288
- if ( override == 'beforeModified' ) {
289
- if ( ![ 'init','override' ].includes( val_status.eventType ) ) return
290
- }
291
-
292
- let component = useStore.get( val_status.componentID )
293
- if ( !component ) return
294
- if (
295
- params.value != val_status.dataValue &&
296
- params.status_id != component.status_id
297
- ) {
298
- set_status( {
299
- ...val_status,
300
- dataValue: params.value,
301
- ...ExtraOverrideParams,
302
- eventType: 'override',
303
- eventID: $.uuidGen()
304
- } )
305
- }
306
- component.status_id = params.status_id
307
- } )()
308
-
309
- React.useEffect( () => {
310
- let {
311
- componentID,
312
- eventType,
313
- dataValue
314
- } = val_status
315
- let Value = dataValue
316
- if ( type == 'list' ) {
317
- Value = dataValue.map( ( value: any ) => JSON.parse( value ) )
318
- } else if ( type == 'select' ) {
319
- Value = JSON.parse( dataValue )
320
- } else if ( type == 'richSelect' ) {
321
- Value = JSON.parse( dataValue )
322
- } else if ( type == 'file' ) {
323
- useStore.update( {
324
- key: componentID,
325
- value: {
326
- Files: val_status.dataValue
327
- }
328
- } )
329
- }
330
-
331
- if ( eventType == 'refresh' ) {
332
- let comp = useStore.get( componentID )
333
- if ( comp && comp.ResolveRefresh ) comp.ResolveRefresh( null )
334
- }
335
-
336
- if ( eventType == 'update' ) {
337
- if ( onUpdateValue ) onUpdateValue( {
338
- componentID,
339
- value: Value,
340
- storeData: useStore.get( componentID ),
341
- eventType: eventType
342
- } )
343
-
344
- $.fnScope( () => {
345
- if ( !val_validate.ok ) return
346
- // if ( $.is.nullish( Value ) ) return
347
- if ( !onUpdateValidValue ) return
348
- onUpdateValidValue( {
349
- componentID,
350
- value: Value,
351
- storeData: useStore.get( componentID ),
352
- eventType: eventType
353
- } )
354
- } )
355
- }
356
- },[ val_validate ] )
357
- }
358
-
359
- export const ValidationCheck: {
360
- ( props: {
361
- val_status: amotify.fn.Input.Status.Plain
362
- DefaultValidation: amotify.fn.Input.Validation.SystemCheck
363
- params: any
364
- set_validate: React.Dispatch<React.SetStateAction<amotify.fn.Input.Validation.Result>>
365
- } ): void
366
- } = ( props ) => {
367
- let {
368
- val_status,
369
- params,
370
- set_validate,
371
- DefaultValidation
372
- } = props
373
-
374
- let result = DefaultValidation( {
375
- value: val_status.dataValue,
376
- params: params
377
- } )
378
-
379
- if ( !result.ok ) {
380
- set_validate( result )
381
- return
382
- }
383
- let sysDefaultNotice = result.notice
384
-
385
- const FN = async () => {
386
- if ( !params.onValidate ) return
387
-
388
- let result = await params.onValidate( {
389
- value: val_status.dataValue,
390
- eventType: val_status.eventType,
391
- props: props
392
- } )
393
- if ( !result.ok ) {
394
- set_validate( {
395
- ok: false,
396
- notice: [
397
- ...sysDefaultNotice,
398
- ...result.notice
399
- ]
400
- } )
401
- return
402
- }
403
- set_validate( {
404
- ok: true,
405
- notice: [
406
- ...sysDefaultNotice,
407
- ...result.notice
408
- ]
409
- } )
410
- }
411
-
412
- if ( params.onValidate ) {
413
- if ( val_status.eventType == 'refresh' ) {
414
- FN()
415
- } else {
416
- $.interval.standBy(
417
- 'ValidationTimer-' + val_status.componentID,
418
- 450,
419
- FN
420
- )
421
- }
422
- } else {
423
- set_validate( {
424
- ok: true,
425
- notice: sysDefaultNotice
426
- } )
427
- }
428
- }
429
-
430
- export const SubmitForm = (
431
- event: React.KeyboardEvent
432
- ) => {
433
- let input = event.target as HTMLInputElement
434
- let { form,formName } = input.dataset
435
- form = formName || form
436
- let complete = false
437
-
438
- let Button = $( `[data-form-submit-button="${ form }"]` )[ 0 ]
439
- if ( !Button ) return complete
440
-
441
- let gestures = Button.dataset.sdfike || ''
442
- let key = event.key
443
- let auxKey = event.ctrlKey || event.metaKey
444
-
445
- $.fnScope( () => {
446
- if ( gestures.includes( 'enter' ) ) {
447
- if ( key != 'Enter' ) return
448
-
449
- let isComposing = event.nativeEvent.isComposing
450
- if ( isComposing ) return
451
-
452
- if ( amotify.config.device.browserIs == 'safari' ) {
453
- if ( event.keyCode == 229 ) return
454
- }
455
- }
456
-
457
- if (
458
- (
459
- key == 'Enter' &&
460
- ( gestures.includes( 'enter' ) || ( gestures.includes( 'auxEnter' ) && auxKey ) )
461
- ) || (
462
- key == ' ' && gestures.includes( 'space' )
463
- )
464
- ) {
465
- Button.click()
466
- event.preventDefault()
467
- }
468
-
469
- complete = true
470
- } )
471
-
472
- return complete
473
- }
@@ -1,102 +0,0 @@
1
- @use '@props' as *;
2
- .Wrapper {
3
- textarea {
4
- display: block;
5
- width: 100%;
6
- min-height: $unit4;
7
- resize: vertical;
8
- transition-property: border, box-shadow, background-color !important;
9
- }
10
- input, select, textarea {
11
- display: inline-block;
12
- &[ disabled] {
13
- box-shadow: none !important;
14
- background-color: $color-layer3 !important;
15
- color: $font-color5 !important;
16
- filter: grayscale(50%);
17
- cursor: not-allowed !important;
18
- }
19
- }
20
- input, textarea {
21
- cursor: text;
22
- &::placeholder {
23
- font-family: inherit;
24
- color: $font-color5;
25
- }
26
- }
27
- input {
28
- min-width: 0;
29
- display: block;
30
- &[ type="text"], &[ type="number"] {
31
- width: 100%;
32
- }
33
- &[ type="number"] {
34
- &::-webkit-inner-spin-button,
35
- &::-webkit-outer-spin-button {
36
- -webkit-appearance: none;
37
- }
38
- }
39
- &[ type="radio"], &[ type="checkbox"], &[ type="file"] {
40
- opacity: 0;
41
- width: 0;
42
- height: 0;
43
- overflow: hidden;
44
- position: absolute;
45
- appearance: none;
46
- }
47
- &:-webkit-autofill {
48
- box-shadow: 0 0 0 100rem $color-layer3 inset !important;
49
- -webkit-text-fill-color: $font-color3;
50
- }
51
- }
52
- }
53
- .Input {
54
- outline: none !important;
55
- &:focus, &:active {
56
- z-index: 1;
57
- background-color: $color-layer1;
58
- }
59
- &:focus {
60
- border-color: $color-theme !important;
61
- box-shadow: 0 0 0 transparent inset, 0 0 0 $unit1_3 $color-theme-opacity-low;
62
- }
63
- &:active {
64
- box-shadow: 0 0 0 transparent inset, 0 0 0 transparent;
65
- transition: $animation-time-long;
66
- }
67
- &.InputCover {
68
- &:focus-within {
69
- z-index: 1;
70
- background-color: $color-layer1;
71
- }
72
- &:focus-within {
73
- border-color: $color-theme !important;
74
- box-shadow: 0 0 0 transparent inset, 0 0 0 $unit1_3 $color-theme-opacity-low;
75
- }
76
- }
77
- }
78
- @keyframes ShowCell {
79
- 0% {}
80
- 100% {
81
- opacity: 1;
82
- transform: scale(1);
83
- }
84
- }
85
- .IndicatorIcon {
86
- transform: translateY(-50%);
87
- }
88
- .DigitCharacterCell {
89
- &.Combined {
90
- &:not(:first-child):not(:last-child) {
91
- border-radius: 0 !important;
92
- }
93
- &:first-child {
94
- border-top-right-radius: 0 !important;
95
- border-bottom-right-radius: 0 !important;
96
- }
97
- &:last-child {
98
- border-top-left-radius: 0 !important;
99
- border-bottom-left-radius: 0 !important;
100
- }
101
- }
102
- }
@@ -1,5 +0,0 @@
1
- import { TextInput } from './text'
2
-
3
- export const Inputs = {
4
- TextInput
5
- }
@@ -1,15 +0,0 @@
1
- @use '@props' as *;
2
- .Focus {
3
- &:focus, &:active {
4
- z-index: 1;
5
- background-color: $color-layer1;
6
- }
7
- &:focus {
8
- border-color: $color-theme !important;
9
- box-shadow: 0 0 0 $unit1_3 $color-theme-opacity-low;
10
- }
11
- &:active {
12
- box-shadow: none;
13
- transition: $animation-time-long;
14
- }
15
- }
@@ -1,53 +0,0 @@
1
- import React from 'react'
2
- import {
3
- StyleConverter
4
- } from '@global'
5
-
6
- import style from './style.module.scss'
7
-
8
- import { TextInputs } from './types'
9
-
10
- let ToneStyles: {
11
- common: amotifyBasicElement
12
- border: amotifyBasicElement
13
- cloud: amotifyBasicElement
14
- bottomBorder: amotifyBasicElement
15
- plain: amotifyBasicElement
16
- } = {
17
- common: {
18
- padding: '3/4',
19
- borderRadius: '1.tone.primary',
20
- transition: 'middle',
21
- boxShadow: '0.thin',
22
- className: style.Focus
23
- },
24
- border: {
25
- border: true,
26
- },
27
- cloud: {
28
- border: '1.thin',
29
- backgroundColor: 'cloud'
30
- },
31
- bottomBorder: {
32
- borderRadius: 0,
33
- backgroundColor: 'cloud',
34
- borderBottom: true,
35
- },
36
- plain: {},
37
- }
38
-
39
- export const TextInput = ( params: TextInputs.Text.Params ) => {
40
- params = {
41
- ...ToneStyles.common,
42
- ...ToneStyles.bottomBorder,
43
- // ...ToneStyles.cloud,
44
- ...params
45
- }
46
-
47
- return <input
48
- type="text"
49
- placeholder='fvdgsbsfgdvs'
50
- // value={ 'AAAA' }
51
- { ...StyleConverter.ToClassName( params ) }
52
- />
53
- }
@@ -1,13 +0,0 @@
1
- namespace TextInputs {
2
- type ToneTypes = 'normal' | 'cloud' | 'bottomBorder' | 'plain'
3
-
4
- namespace Text {
5
- type Params =
6
- any &
7
- React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>,HTMLInputElement> &
8
- {
9
- tone?: ToneTypes
10
- }
11
- }
12
- }
13
- export { TextInputs }