amotify 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/@jsminAmotifyExtension/_.d.ts +4 -0
- package/dist/src/@jsminAmotifyExtension/fetch.d.ts +9 -0
- package/dist/src/@jsminAmotifyExtension/formCollect.d.ts +1 -0
- package/dist/src/@jsminAmotifyExtension/spreadSheet.d.ts +4 -0
- package/dist/src/@jsminAmotifyExtension/variables.d.ts +0 -0
- package/dist/src/@types/_.d.ts +6 -0
- package/dist/src/@types/amot.d.ts +260 -0
- package/dist/src/@types/fn.d.ts +1040 -0
- package/dist/src/@types/index.d.ts +62 -0
- package/dist/src/@types/jsminAmotifyExtension.d.ts +134 -0
- package/dist/src/@types/module.d.ts +2 -0
- package/dist/src/@types/state.d.ts +145 -0
- package/dist/src/Atoms/@export.d.ts +4 -0
- package/dist/src/Atoms/FAIcon/parts.d.ts +2 -0
- package/dist/src/Atoms/Logo/parts.d.ts +1 -0
- package/dist/src/Atoms/Various/parts.d.ts +9 -0
- package/dist/src/Functions/@export.d.ts +12 -0
- package/dist/src/Functions/Button/_.d.ts +1 -0
- package/dist/src/Functions/Cropper/parts.d.ts +1 -0
- package/dist/src/Functions/Effects/Fade.d.ts +1 -0
- package/dist/src/Functions/Effects/Ripple.d.ts +1 -0
- package/dist/src/Functions/Effects/_.d.ts +3 -0
- package/dist/src/Functions/Input/Chips/Selector.d.ts +1 -0
- package/dist/src/Functions/Input/Chips/_.d.ts +2 -0
- package/dist/src/Functions/Input/DigitCharacters.d.ts +1 -0
- package/dist/src/Functions/Input/File/_.d.ts +2 -0
- package/dist/src/Functions/Input/Hidden.d.ts +1 -0
- package/dist/src/Functions/Input/List/_.d.ts +1 -0
- package/dist/src/Functions/Input/Segmented/_.d.ts +1 -0
- package/dist/src/Functions/Input/Select/_.d.ts +1 -0
- package/dist/src/Functions/Input/Slider/_.d.ts +1 -0
- package/dist/src/Functions/Input/Switch/_.d.ts +1 -0
- package/dist/src/Functions/Input/Text.d.ts +5 -0
- package/dist/src/Functions/Input/TextArea.d.ts +1 -0
- package/dist/src/Functions/Input/Time/Picker.d.ts +1 -0
- package/dist/src/Functions/Input/Time/_.d.ts +2 -0
- package/dist/src/Functions/Input/_.d.ts +5 -0
- package/dist/src/Functions/Input/core.d.ts +34 -0
- package/dist/src/Functions/Inputs/_.d.ts +3 -0
- package/dist/src/Functions/Inputs/text.d.ts +12 -0
- package/dist/src/Functions/Layout/PageNotFound.d.ts +1 -0
- package/dist/src/Functions/Layout/PageRouter.d.ts +2 -0
- package/dist/src/Functions/Layout/PageViewController/parts.d.ts +1 -0
- package/dist/src/Functions/Layout/Plate.d.ts +1 -0
- package/dist/src/Functions/Layout/RootViewController/parts.d.ts +1 -0
- package/dist/src/Functions/Layout/SwipeView/parts.d.ts +2 -0
- package/dist/src/Functions/Layout/TabBar.d.ts +1 -0
- package/dist/src/Functions/Layout/_.d.ts +2 -0
- package/dist/src/Functions/Loader/corner.d.ts +1 -0
- package/dist/src/Functions/Loader/mini.d.ts +33 -0
- package/dist/src/Functions/Loader/parts.d.ts +3 -0
- package/dist/src/Functions/Loader/top.d.ts +1 -0
- package/dist/src/Functions/Sheet/parts.d.ts +2 -0
- package/dist/src/Functions/SnackBar/parts.d.ts +2 -0
- package/dist/src/Functions/Table/Data/parts.d.ts +3 -0
- package/dist/src/Functions/Table/Drag/parts.d.ts +1 -0
- package/dist/src/Functions/Table/Normal/parts.d.ts +1 -0
- package/dist/src/Functions/Table/_.d.ts +9 -0
- package/dist/src/Functions/Tooltips/parts.d.ts +2 -0
- package/dist/src/Global/@export.d.ts +12 -0
- package/dist/src/Global/LaunchReactApplication.d.ts +1 -0
- package/dist/src/Global/styleConverter.d.ts +2 -0
- package/dist/src/Molecules/@export.d.ts +21 -0
- package/dist/src/Molecules/Accordion/parts.d.ts +2 -0
- package/dist/src/Molecules/LinkifyText/parts.d.ts +1 -0
- package/dist/src/Molecules/List.d.ts +1 -0
- package/dist/src/Organisms/@export.d.ts +2 -0
- package/dist/src/Organisms/DisplayStyleInput/_.d.ts +1 -0
- package/dist/src/Organisms/DisplayStyleInput/darkmode.d.ts +1 -0
- package/dist/src/Organisms/DisplayStyleInput/themeColor.d.ts +27 -0
- package/dist/src/Templates/@export.d.ts +2 -0
- package/dist/src/Templates/PlayGround/parts.d.ts +1 -0
- package/dist/src/config.d.ts +16 -0
- package/dist/src/launch.d.ts +9 -0
- package/dist/src/preload.d.ts +1 -0
- package/package.json +2 -2
- package/src/@jsminAmotifyExtension/_.tsx +4 -0
- package/src/@jsminAmotifyExtension/fetch.tsx +107 -0
- package/src/@jsminAmotifyExtension/formCollect.tsx +89 -0
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +159 -0
- package/src/@jsminAmotifyExtension/variables.tsx +130 -0
- package/src/@styles/@app.scss +4 -0
- package/src/@styles/@variables/customProps.scss +109 -0
- package/src/@styles/@variables/styleSet.scss +38 -0
- package/src/@styles/@variables/themeColor.scss +71 -0
- package/src/@styles/@variables/var.scss +171 -0
- package/src/@styles/UniStyling.scss +996 -0
- package/src/@styles/init.scss +154 -0
- package/src/@types/_.tsx +6 -0
- package/src/@types/amot.tsx +323 -0
- package/src/@types/fn.tsx +1210 -0
- package/src/@types/index.tsx +74 -0
- package/src/@types/jsminAmotifyExtension.tsx +143 -0
- package/src/@types/module.tsx +2 -0
- package/src/@types/state.tsx +199 -0
- package/src/Atoms/@export.tsx +32 -0
- package/src/Atoms/FAIcon/parts.tsx +117 -0
- package/src/Atoms/FAIcon/style.module.scss +9 -0
- package/src/Atoms/Logo/parts.tsx +335 -0
- package/src/Atoms/Logo/style.module.scss +96 -0
- package/src/Atoms/Various/parts.tsx +157 -0
- package/src/Atoms/Various/style.module.scss +40 -0
- package/src/Functions/@export.tsx +29 -0
- package/src/Functions/Button/_.tsx +305 -0
- package/src/Functions/Button/style.module.scss +183 -0
- package/src/Functions/Cropper/parts.tsx +1061 -0
- package/src/Functions/Cropper/style.module.scss +62 -0
- package/src/Functions/Effects/Fade.tsx +81 -0
- package/src/Functions/Effects/Ripple.tsx +141 -0
- package/src/Functions/Effects/_.tsx +33 -0
- package/src/Functions/Effects/style.module.scss +83 -0
- package/src/Functions/Input/Chips/Selector.tsx +451 -0
- package/src/Functions/Input/Chips/_.tsx +286 -0
- package/src/Functions/Input/Chips/style.module.scss +6 -0
- package/src/Functions/Input/DigitCharacters.tsx +241 -0
- package/src/Functions/Input/File/_.tsx +596 -0
- package/src/Functions/Input/File/style.module.scss +34 -0
- package/src/Functions/Input/Hidden.tsx +18 -0
- package/src/Functions/Input/List/_.tsx +383 -0
- package/src/Functions/Input/List/style.module.scss +84 -0
- package/src/Functions/Input/Segmented/_.tsx +238 -0
- package/src/Functions/Input/Segmented/style.module.scss +81 -0
- package/src/Functions/Input/Select/_.tsx +225 -0
- package/src/Functions/Input/Select/style.module.scss +10 -0
- package/src/Functions/Input/Slider/_.tsx +519 -0
- package/src/Functions/Input/Slider/style.module.scss +67 -0
- package/src/Functions/Input/Switch/_.tsx +177 -0
- package/src/Functions/Input/Switch/style.module.scss +18 -0
- package/src/Functions/Input/Text.tsx +437 -0
- package/src/Functions/Input/TextArea.tsx +115 -0
- package/src/Functions/Input/Time/Picker.tsx +950 -0
- package/src/Functions/Input/Time/_.tsx +736 -0
- package/src/Functions/Input/Time/style.module.scss +72 -0
- package/src/Functions/Input/_.tsx +793 -0
- package/src/Functions/Input/core.tsx +461 -0
- package/src/Functions/Input/style.module.scss +43 -0
- package/src/Functions/Inputs/_.tsx +5 -0
- package/src/Functions/Inputs/style.module.scss +15 -0
- package/src/Functions/Inputs/text.tsx +67 -0
- package/src/Functions/Inputs/types.d.ts +1 -0
- package/src/Functions/Layout/PageNotFound.tsx +81 -0
- package/src/Functions/Layout/PageRouter.tsx +107 -0
- package/src/Functions/Layout/PageViewController/parts.tsx +32 -0
- package/src/Functions/Layout/Plate.tsx +30 -0
- package/src/Functions/Layout/RootViewController/parts.tsx +290 -0
- package/src/Functions/Layout/RootViewController/style.module.scss +24 -0
- package/src/Functions/Layout/SwipeView/parts.tsx +380 -0
- package/src/Functions/Layout/SwipeView/style.module.scss +19 -0
- package/src/Functions/Layout/TabBar.tsx +64 -0
- package/src/Functions/Layout/_.tsx +20 -0
- package/src/Functions/Loader/corner.tsx +78 -0
- package/src/Functions/Loader/mini.tsx +117 -0
- package/src/Functions/Loader/parts.tsx +105 -0
- package/src/Functions/Loader/style.module.scss +222 -0
- package/src/Functions/Loader/top.tsx +90 -0
- package/src/Functions/Sheet/parts.tsx +972 -0
- package/src/Functions/Sheet/style.module.scss +235 -0
- package/src/Functions/SnackBar/parts.tsx +215 -0
- package/src/Functions/SnackBar/style.module.scss +25 -0
- package/src/Functions/Table/Data/parts.tsx +955 -0
- package/src/Functions/Table/Drag/parts.tsx +448 -0
- package/src/Functions/Table/Normal/parts.tsx +123 -0
- package/src/Functions/Table/_.tsx +170 -0
- package/src/Functions/Table/style.module.scss +92 -0
- package/src/Functions/Tooltips/parts.tsx +52 -0
- package/src/Global/@export.tsx +138 -0
- package/src/Global/LaunchReactApplication.tsx +30 -0
- package/src/Global/exe.tsx +0 -0
- package/src/Global/styleConverter.tsx +435 -0
- package/src/Molecules/@export.tsx +95 -0
- package/src/Molecules/Accordion/parts.tsx +146 -0
- package/src/Molecules/Accordion/style.module.scss +13 -0
- package/src/Molecules/LinkifyText/parts.tsx +54 -0
- package/src/Molecules/List.tsx +30 -0
- package/src/Organisms/@export.tsx +5 -0
- package/src/Organisms/DisplayStyleInput/_.tsx +18 -0
- package/src/Organisms/DisplayStyleInput/darkmode.tsx +112 -0
- package/src/Organisms/DisplayStyleInput/themeColor.tsx +210 -0
- package/src/Templates/@export.tsx +7 -0
- package/src/Templates/PlayGround/parts.tsx +115 -0
- package/src/Templates/PlayGround/style.module.scss +38 -0
- package/src/config.tsx +132 -0
- package/src/launch.tsx +100 -0
- package/src/preload.tsx +49 -0
- package/tsconfig.json +27 -14
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import {
|
|
2
|
+
React,
|
|
3
|
+
} from '@global';
|
|
4
|
+
const {
|
|
5
|
+
useState
|
|
6
|
+
} = React;
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
BoxWrapper,
|
|
10
|
+
SubmitForm,
|
|
11
|
+
ValidationCheck,
|
|
12
|
+
CommonEffects
|
|
13
|
+
} from './core'
|
|
14
|
+
|
|
15
|
+
import style from './style.module.scss';
|
|
16
|
+
|
|
17
|
+
function DefaultValidation( props: {
|
|
18
|
+
value: any
|
|
19
|
+
params: any
|
|
20
|
+
} ): amotify.fn.Input.Validation.Result {
|
|
21
|
+
let { value,params } = props;
|
|
22
|
+
let { required } = params as amotify.fn.Input.TextArea.PlainParams;
|
|
23
|
+
let notice: amotify.fn.Input.Validation.NoticeTypes[] = [];
|
|
24
|
+
|
|
25
|
+
if ( required && !value ) {
|
|
26
|
+
notice.push( { type: 'invalid',label: '必須項目です' } );
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return {
|
|
30
|
+
ok: !notice.filter( ( { type } ) => type == 'invalid' ).length,
|
|
31
|
+
notice: notice
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const TextAreaInput: FNC<amotify.fn.Input.TextArea.PlainParams> = ( params ) => {
|
|
36
|
+
let {
|
|
37
|
+
componentID,
|
|
38
|
+
tone,
|
|
39
|
+
required,
|
|
40
|
+
form,
|
|
41
|
+
|
|
42
|
+
enableFormSubmit,
|
|
43
|
+
|
|
44
|
+
checkValidationAtFirst,
|
|
45
|
+
onChange,onKeyDown,
|
|
46
|
+
onValidate,
|
|
47
|
+
onUpdateValue,
|
|
48
|
+
onUpdateValidValue,
|
|
49
|
+
value = '',
|
|
50
|
+
leftIndicator,rightIndicator,
|
|
51
|
+
|
|
52
|
+
...others
|
|
53
|
+
} = params;
|
|
54
|
+
|
|
55
|
+
let Default_Status: amotify.fn.Input.Status.Plain = {
|
|
56
|
+
componentID: componentID!,
|
|
57
|
+
dataValue: value,
|
|
58
|
+
eventType: 'init',
|
|
59
|
+
eventID: $.uuidGen()
|
|
60
|
+
}
|
|
61
|
+
let [ val_status,set_status ] = useState( Default_Status );
|
|
62
|
+
let [ val_validate,set_validate ] = useState( {
|
|
63
|
+
ok: false,
|
|
64
|
+
notice: []
|
|
65
|
+
} as amotify.fn.Input.Validation.Result );
|
|
66
|
+
|
|
67
|
+
CommonEffects( {
|
|
68
|
+
params,
|
|
69
|
+
val_status,
|
|
70
|
+
set_status,
|
|
71
|
+
val_validate,
|
|
72
|
+
set_validate,
|
|
73
|
+
onUpdateValue,
|
|
74
|
+
onUpdateValidValue,
|
|
75
|
+
DefaultValidation
|
|
76
|
+
} );
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<BoxWrapper
|
|
80
|
+
val_status={ val_status }
|
|
81
|
+
set_status={ set_status }
|
|
82
|
+
val_validate={ val_validate }
|
|
83
|
+
params={ params }
|
|
84
|
+
>
|
|
85
|
+
<textarea
|
|
86
|
+
data-form={ form }
|
|
87
|
+
data-input-type={ 'textarea' }
|
|
88
|
+
data-validation={ val_validate.ok }
|
|
89
|
+
data-value={ val_status.dataValue }
|
|
90
|
+
data-component-id={ val_status.componentID }
|
|
91
|
+
value={ val_status.dataValue }
|
|
92
|
+
onKeyDown={ ( event ) => {
|
|
93
|
+
if ( onKeyDown ) onKeyDown( event );
|
|
94
|
+
if ( enableFormSubmit ) SubmitForm( event );
|
|
95
|
+
} }
|
|
96
|
+
onChange={ ( event ) => {
|
|
97
|
+
let {
|
|
98
|
+
value
|
|
99
|
+
} = event.target;
|
|
100
|
+
|
|
101
|
+
if ( val_validate.ok ) set_validate( { ok: false,notice: [] } );
|
|
102
|
+
set_status( {
|
|
103
|
+
...val_status,
|
|
104
|
+
dataValue: value,
|
|
105
|
+
eventType: 'update',
|
|
106
|
+
eventID: $.uuidGen(),
|
|
107
|
+
} );
|
|
108
|
+
|
|
109
|
+
if ( onChange ) onChange( event );
|
|
110
|
+
} }
|
|
111
|
+
{ ...others }
|
|
112
|
+
/>
|
|
113
|
+
</BoxWrapper>
|
|
114
|
+
);
|
|
115
|
+
}
|