amotify 0.0.59 → 0.0.60
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/@types/_.tsx +5 -5
- package/@types/amot.tsx +11 -11
- package/@types/fn.tsx +1 -1
- package/@types/module.tsx +1 -1
- package/dist/amotify.js +1 -1
- package/dist/amotify.min.css +3 -3
- package/package.json +1 -1
- package/src/@atoms.tsx +3 -3
- package/src/@functions.tsx +11 -11
- package/src/@global.tsx +40 -40
- package/src/@jsminAmotifyExtension/_.tsx +4 -4
- package/src/@jsminAmotifyExtension/fetch.tsx +30 -30
- package/src/@jsminAmotifyExtension/formCollect.tsx +32 -32
- package/src/@jsminAmotifyExtension/spreadSheet.tsx +71 -71
- package/src/@jsminAmotifyExtension/variables.tsx +38 -38
- package/src/@molecules.tsx +6 -6
- package/src/@styles/props.scss +1 -1
- package/src/@styles/var.scss +0 -1
- package/src/@templates.tsx +1 -1
- package/src/@variables.tsx +2 -2
- package/src/atoms/FAI/parts.tsx +105 -105
- package/src/atoms/Logo/parts.tsx +19 -19
- package/src/atoms/Various/parts.tsx +26 -26
- package/src/config.tsx +62 -59
- package/src/functions/Button/_.tsx +49 -49
- package/src/functions/Cropper/parts.tsx +249 -249
- package/src/functions/Effects/Fade.tsx +18 -18
- package/src/functions/Effects/Ripple.tsx +24 -24
- package/src/functions/Effects/_.tsx +5 -5
- package/src/functions/Input/Chips/Selector.tsx +107 -107
- package/src/functions/Input/Chips/_.tsx +66 -66
- package/src/functions/Input/Contenteditable.tsx +18 -18
- package/src/functions/Input/DigitCharacters.tsx +48 -48
- package/src/functions/Input/File/_.tsx +114 -114
- package/src/functions/Input/Hidden.tsx +3 -3
- package/src/functions/Input/List/_.tsx +61 -61
- package/src/functions/Input/RichSelect/_.tsx +38 -38
- package/src/functions/Input/Segmented/_.tsx +30 -30
- package/src/functions/Input/Select/_.tsx +42 -42
- package/src/functions/Input/Slider/_.tsx +93 -93
- package/src/functions/Input/Switch/_.tsx +21 -21
- package/src/functions/Input/Text.tsx +99 -97
- package/src/functions/Input/TextArea.tsx +17 -17
- package/src/functions/Input/Time/Picker.tsx +199 -199
- package/src/functions/Input/Time/_.tsx +173 -173
- package/src/functions/Input/_.tsx +135 -135
- package/src/functions/Input/core.tsx +96 -96
- package/src/functions/Inputs/_.tsx +1 -1
- package/src/functions/Inputs/text.tsx +5 -5
- package/src/functions/Layout/PageNotFound.tsx +6 -6
- package/src/functions/Layout/PageRouter.tsx +34 -34
- package/src/functions/Layout/PageViewController/parts.tsx +7 -7
- package/src/functions/Layout/Plate.tsx +5 -5
- package/src/functions/Layout/RootViewController/parts.tsx +53 -53
- package/src/functions/Layout/SwipeView/parts.tsx +90 -90
- package/src/functions/Layout/TabBar.tsx +10 -10
- package/src/functions/Layout/_.tsx +7 -7
- package/src/functions/Loader/corner.tsx +10 -10
- package/src/functions/Loader/mini.tsx +25 -25
- package/src/functions/Loader/parts.tsx +31 -31
- package/src/functions/Loader/top.tsx +10 -10
- package/src/functions/Sheet/parts.tsx +219 -219
- package/src/functions/Sheet/style.module.scss +0 -20
- package/src/functions/SnackBar/parts.tsx +50 -50
- package/src/functions/Table/Data/parts.tsx +202 -202
- package/src/functions/Table/Drag/parts.tsx +76 -76
- package/src/functions/Table/Normal/parts.tsx +23 -23
- package/src/functions/Table/_.tsx +33 -33
- package/src/functions/Tooltips/parts.tsx +7 -7
- package/src/global/LaunchReactApplication.tsx +28 -28
- package/src/global/styleConverter.tsx +133 -133
- package/src/launch.tsx +27 -27
- package/src/molecules/Accordion/parts.tsx +41 -41
- package/src/molecules/LinkifyText/parts.tsx +18 -18
- package/src/molecules/List.tsx +6 -6
- package/src/preload.tsx +5 -45
- package/src/templates/PlayGround/parts.tsx +8 -8
- package/webpack.config.js +9 -9
package/src/config.tsx
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export const script = document.currentScript
|
|
2
|
-
export const fileName = script?.attributes.getNamedItem( 'src' )!.textContent
|
|
3
|
-
export const Version = ( fileName?.match( /v\d\.\d\.\d/ ) || [ 'v0.0.0' ] )[ 0 ]
|
|
1
|
+
export const script = document.currentScript
|
|
2
|
+
export const fileName = script?.attributes.getNamedItem( 'src' )!.textContent
|
|
3
|
+
export const Version = ( fileName?.match( /v\d\.\d\.\d/ ) || [ 'v0.0.0' ] )[ 0 ]!
|
|
4
4
|
|
|
5
|
-
export const userAgent = window.navigator.userAgent.toLowerCase()
|
|
5
|
+
export const userAgent = window.navigator.userAgent.toLowerCase()
|
|
6
6
|
export const deviceType: amotify.DeviceTypes =
|
|
7
7
|
userAgent.indexOf( "windows nt" ) !== -1 ? 'windows'
|
|
8
8
|
: userAgent.indexOf( "android" ) !== -1 ? 'android'
|
|
9
9
|
: userAgent.indexOf( "iphone" ) !== -1 ? 'iPhone'
|
|
10
10
|
: userAgent.indexOf( "ipad" ) > -1 || ( userAgent.indexOf( "macintosh" ) > -1 && "ontouchend" in document ) ? 'iPad'
|
|
11
11
|
: userAgent.indexOf( "mac os x" ) !== -1 ? 'macOSX'
|
|
12
|
-
: 'undefined'
|
|
12
|
+
: 'undefined'
|
|
13
13
|
export const browserType: amotify.BrowserTypes =
|
|
14
14
|
userAgent.indexOf( "msie" ) !== -1 || userAgent.indexOf( "trident" ) !== -1 ? 'ie'
|
|
15
15
|
: userAgent.indexOf( "edge" ) !== -1 ? 'edge'
|
|
@@ -17,7 +17,7 @@ export const browserType: amotify.BrowserTypes =
|
|
|
17
17
|
: userAgent.indexOf( "safari" ) !== -1 ? 'safari'
|
|
18
18
|
: userAgent.indexOf( "firefox" ) !== -1 ? 'firefox'
|
|
19
19
|
: userAgent.indexOf( "opera" ) !== -1 || userAgent.indexOf( "opr" ) !== -1 ? 'opera'
|
|
20
|
-
: 'undefined'
|
|
20
|
+
: 'undefined'
|
|
21
21
|
|
|
22
22
|
export const deviceIdentifier = () => {
|
|
23
23
|
let info = {
|
|
@@ -27,26 +27,29 @@ export const deviceIdentifier = () => {
|
|
|
27
27
|
isPhone: [ 'Android','iPhone' ].includes( deviceType ),
|
|
28
28
|
isIOS: [ 'iPhone','iPad' ].includes( deviceType ),
|
|
29
29
|
isSystemDarkmode: () => {
|
|
30
|
-
return window.matchMedia( '(prefers-color-scheme: dark)' ).matches == true
|
|
30
|
+
return window.matchMedia( '(prefers-color-scheme: dark)' ).matches == true
|
|
31
|
+
},
|
|
32
|
+
isBreakpoint: () => {
|
|
33
|
+
// if (amotify.config.)
|
|
34
|
+
return window.innerWidth <= 834
|
|
31
35
|
},
|
|
32
|
-
isBreakpoint: () => window.innerWidth <= 896,
|
|
33
36
|
isPhonepoint: () => window.innerWidth <= 690
|
|
34
37
|
}
|
|
35
38
|
|
|
36
|
-
return info
|
|
39
|
+
return info
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
|
|
40
43
|
import {
|
|
41
44
|
launchID,
|
|
42
45
|
ColorObjects
|
|
43
|
-
} from './@variables'
|
|
46
|
+
} from './@variables'
|
|
44
47
|
|
|
45
48
|
export const SetThemeColorTag = () => {
|
|
46
|
-
let hex = '#45515c'
|
|
47
|
-
let meta = $( '#ThemeColorMetaTag' )
|
|
48
|
-
if ( !meta[ 0 ] ) return
|
|
49
|
-
meta.setAttribute( 'content',hex )
|
|
49
|
+
let hex = '#45515c'
|
|
50
|
+
let meta = $( '#ThemeColorMetaTag' )
|
|
51
|
+
if ( !meta[ 0 ] ) return
|
|
52
|
+
meta.setAttribute( 'content',hex )
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
const DarkmodeColors: {
|
|
@@ -59,7 +62,7 @@ const DarkmodeColors: {
|
|
|
59
62
|
dark: '#333',
|
|
60
63
|
dim: '#666',
|
|
61
64
|
auto: () => {
|
|
62
|
-
return amotify.config.device.isSystemDarkmode() ? '#333' : '#FFF'
|
|
65
|
+
return amotify.config.device.isSystemDarkmode() ? '#333' : '#FFF'
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
68
|
|
|
@@ -69,16 +72,16 @@ const ThemeColors: {
|
|
|
69
72
|
isBrand: boolean
|
|
70
73
|
isAvocado: boolean
|
|
71
74
|
}
|
|
72
|
-
} = {} as any
|
|
75
|
+
} = {} as any
|
|
73
76
|
ColorObjects.forEach( ( ColorObject ) => {
|
|
74
|
-
let { key,isAvocado,isBrand } = ColorObject
|
|
77
|
+
let { key,isAvocado,isBrand } = ColorObject
|
|
75
78
|
|
|
76
79
|
ThemeColors[ key ] = {
|
|
77
80
|
alfa: ( alfa?: number ) => ( `hsla( var( --cH_${ key } ),var( --cS_${ key } ),var( --cL_${ key } ),${ alfa ?? 1 } ) ` ),
|
|
78
81
|
isAvocado,
|
|
79
82
|
isBrand,
|
|
80
83
|
}
|
|
81
|
-
} )
|
|
84
|
+
} )
|
|
82
85
|
|
|
83
86
|
export const defaultConfig: amotify.config.Methods = {
|
|
84
87
|
version: Version,
|
|
@@ -91,72 +94,72 @@ export const defaultConfig: amotify.config.Methods = {
|
|
|
91
94
|
device: deviceIdentifier(),
|
|
92
95
|
update: {
|
|
93
96
|
tone: ( value ) => {
|
|
94
|
-
if ( ![ 'default','flat','sharp' ].includes( value ) ) value = 'default'
|
|
97
|
+
if ( ![ 'default','flat','sharp' ].includes( value ) ) value = 'default'
|
|
95
98
|
|
|
96
|
-
if ( value == amotify.config.tone ) return
|
|
99
|
+
if ( value == amotify.config.tone ) return
|
|
97
100
|
|
|
98
|
-
amotify.config.tone = value
|
|
101
|
+
amotify.config.tone = value
|
|
99
102
|
|
|
100
|
-
let body = $( 'body' )
|
|
103
|
+
let body = $( 'body' )
|
|
101
104
|
body
|
|
102
105
|
.removeClass( body.findClass( /^bdsTN/ ) )
|
|
103
106
|
.addClass( 'bdsTN' + value )
|
|
104
107
|
.callback( () => {
|
|
105
|
-
SetThemeColorTag()
|
|
106
|
-
} )
|
|
108
|
+
SetThemeColorTag()
|
|
109
|
+
} )
|
|
107
110
|
|
|
108
|
-
amotify.global.useRecycle.do( 'RootViewController' )
|
|
111
|
+
amotify.global.useRecycle.do( 'RootViewController' )
|
|
109
112
|
},
|
|
110
113
|
themeColor: ( value ) => {
|
|
111
|
-
if ( !ColorObjects.find( ( ColorObject ) => ColorObject.key == value ) ) value = 'comun'
|
|
112
|
-
if ( value == amotify.config.themeColor ) return
|
|
114
|
+
if ( !ColorObjects.find( ( ColorObject ) => ColorObject.key == value ) ) value = 'comun'
|
|
115
|
+
if ( value == amotify.config.themeColor ) return
|
|
113
116
|
|
|
114
|
-
amotify.config.themeColor = value
|
|
117
|
+
amotify.config.themeColor = value
|
|
115
118
|
|
|
116
|
-
let body = $( document.body )
|
|
119
|
+
let body = $( document.body )
|
|
117
120
|
body
|
|
118
121
|
.removeClass( body.findClass( /^bdsTC/ ) )
|
|
119
122
|
.addClass( 'bdsTC_' + value )
|
|
120
123
|
.callback( () => {
|
|
121
|
-
SetThemeColorTag()
|
|
122
|
-
} )
|
|
123
|
-
amotify.global.useRecycle.do( 'RootViewController' )
|
|
124
|
+
SetThemeColorTag()
|
|
125
|
+
} )
|
|
126
|
+
amotify.global.useRecycle.do( 'RootViewController' )
|
|
124
127
|
},
|
|
125
128
|
darkMode: ( value ) => {
|
|
126
|
-
if ( ![ 'light','dark','dim','auto' ].includes( value ) ) value = 'light'
|
|
127
|
-
if ( value == amotify.config.darkMode ) return
|
|
129
|
+
if ( ![ 'light','dark','dim','auto' ].includes( value ) ) value = 'light'
|
|
130
|
+
if ( value == amotify.config.darkMode ) return
|
|
128
131
|
let Value = value == 'auto'
|
|
129
132
|
? deviceIdentifier().isSystemDarkmode()
|
|
130
133
|
? 'dark'
|
|
131
134
|
: 'light'
|
|
132
|
-
: value
|
|
135
|
+
: value
|
|
133
136
|
|
|
134
|
-
amotify.config.darkMode = value
|
|
137
|
+
amotify.config.darkMode = value
|
|
135
138
|
|
|
136
|
-
let body = $( 'body' )
|
|
139
|
+
let body = $( 'body' )
|
|
137
140
|
body
|
|
138
141
|
.removeClass( body.findClass( /^bdsDM/ ) )
|
|
139
|
-
.addClass( 'bdsDM_' + Value )
|
|
142
|
+
.addClass( 'bdsDM_' + Value )
|
|
140
143
|
|
|
141
|
-
amotify.global.useRecycle.do( 'RootViewController' )
|
|
144
|
+
amotify.global.useRecycle.do( 'RootViewController' )
|
|
142
145
|
},
|
|
143
146
|
roundness: ( value ) => {
|
|
144
|
-
if ( !( value >= 0 && value <= 5 ) ) value = 2
|
|
145
|
-
if ( value == amotify.config.roundness ) return
|
|
147
|
+
if ( !( value >= 0 && value <= 5 ) ) value = 2
|
|
148
|
+
if ( value == amotify.config.roundness ) return
|
|
146
149
|
|
|
147
|
-
amotify.config.roundness = value
|
|
148
|
-
amotify.global.useRecycle.do( 'RootViewController' )
|
|
150
|
+
amotify.config.roundness = value
|
|
151
|
+
amotify.global.useRecycle.do( 'RootViewController' )
|
|
149
152
|
},
|
|
150
153
|
},
|
|
151
154
|
readExtraCDN: async ( key ) => {
|
|
152
|
-
let url = key
|
|
153
|
-
let valid = false
|
|
155
|
+
let url = key
|
|
156
|
+
let valid = false
|
|
154
157
|
if ( url ) {
|
|
155
|
-
await $.CDNReader( url )
|
|
156
|
-
console.log( 'Read extraCdn : ' + key )
|
|
157
|
-
valid = true
|
|
158
|
+
await $.CDNReader( url )
|
|
159
|
+
console.log( 'Read extraCdn : ' + key )
|
|
160
|
+
valid = true
|
|
158
161
|
}
|
|
159
|
-
return valid
|
|
162
|
+
return valid
|
|
160
163
|
},
|
|
161
164
|
variables: {
|
|
162
165
|
themeColors: ThemeColors,
|
|
@@ -168,21 +171,21 @@ $( 'body' ).addClass( [
|
|
|
168
171
|
'usrDevice_' + deviceIdentifier().deviceIs,
|
|
169
172
|
'bdsDM_' + defaultConfig.darkMode,
|
|
170
173
|
'bdsTC_' + defaultConfig.themeColor
|
|
171
|
-
] )
|
|
174
|
+
] )
|
|
172
175
|
|
|
173
176
|
$( window ).addEvent( {
|
|
174
177
|
eventType: 'load',
|
|
175
178
|
callback: () => {
|
|
176
|
-
let style: any = document.body.style
|
|
179
|
+
let style: any = document.body.style
|
|
177
180
|
|
|
178
|
-
let Body = $( document.body )
|
|
179
|
-
let topNavHeight = Number( Body.getStyleProperty( '--topNavHeight' ).removeLetters() || 0 )
|
|
180
|
-
let footerNavHeight = Number( Body.getStyleProperty( '--footerNavHeight' ).removeLetters() || 0 )
|
|
181
|
+
let Body = $( document.body )
|
|
182
|
+
let topNavHeight = Number( Body.getStyleProperty( '--topNavHeight' ).removeLetters() || 0 )
|
|
183
|
+
let footerNavHeight = Number( Body.getStyleProperty( '--footerNavHeight' ).removeLetters() || 0 )
|
|
181
184
|
|
|
182
|
-
let viewHeight = window.innerHeight
|
|
183
|
-
let contentHeight = viewHeight - topNavHeight - footerNavHeight
|
|
185
|
+
let viewHeight = window.innerHeight
|
|
186
|
+
let contentHeight = viewHeight - topNavHeight - footerNavHeight
|
|
184
187
|
|
|
185
|
-
style.setProperty( '--viewHeight',window.innerHeight + 'px' )
|
|
186
|
-
style.setProperty( '--contentHeight',contentHeight + 'px' )
|
|
188
|
+
style.setProperty( '--viewHeight',window.innerHeight + 'px' )
|
|
189
|
+
style.setProperty( '--contentHeight',contentHeight + 'px' )
|
|
187
190
|
}
|
|
188
|
-
} )
|
|
191
|
+
} )
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React from 'react'
|
|
2
2
|
import {
|
|
3
3
|
StyleConverter,
|
|
4
4
|
pageTransit
|
|
5
|
-
} from '@global'
|
|
5
|
+
} from '@global'
|
|
6
6
|
|
|
7
|
-
import style from './style.module.scss'
|
|
7
|
+
import style from './style.module.scss'
|
|
8
8
|
|
|
9
9
|
const Styles = {
|
|
10
10
|
Size: (
|
|
@@ -16,7 +16,7 @@ const Styles = {
|
|
|
16
16
|
let styles: amotifyUniStyleParams = {
|
|
17
17
|
fontSize: 'inherit'
|
|
18
18
|
}
|
|
19
|
-
size = size || 'R'
|
|
19
|
+
size = size || 'R'
|
|
20
20
|
if ( [ 'Plain','Link' ].includes( tone ) ) return {}
|
|
21
21
|
|
|
22
22
|
if ( size == 'XS' ) {
|
|
@@ -34,14 +34,14 @@ const Styles = {
|
|
|
34
34
|
borderRadius: '3.tone.tertiary'
|
|
35
35
|
}
|
|
36
36
|
} else if ( size == 'R' ) {
|
|
37
|
-
styles.padding = [ '3/4',1 ]
|
|
37
|
+
styles.padding = [ '3/4',1 ]
|
|
38
38
|
if ( tone == 'Prime' ) {
|
|
39
|
-
styles.padding = [ '3/4',2 ]
|
|
39
|
+
styles.padding = [ '3/4',2 ]
|
|
40
40
|
}
|
|
41
41
|
} else if ( size == 'L' ) {
|
|
42
|
-
styles.padding = [ 1,3 ]
|
|
43
|
-
styles.fontSize = '3.paragraph'
|
|
44
|
-
styles.isSemiBoldFont = true
|
|
42
|
+
styles.padding = [ 1,3 ]
|
|
43
|
+
styles.fontSize = '3.paragraph'
|
|
44
|
+
styles.isSemiBoldFont = true
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
styles = {
|
|
@@ -51,7 +51,7 @@ const Styles = {
|
|
|
51
51
|
textAlign: 'center',
|
|
52
52
|
...styles
|
|
53
53
|
}
|
|
54
|
-
return styles
|
|
54
|
+
return styles
|
|
55
55
|
},
|
|
56
56
|
Tone: (
|
|
57
57
|
seed: amotify.fn.Buttons.Seeds,
|
|
@@ -66,16 +66,16 @@ const Styles = {
|
|
|
66
66
|
border: 'unset'
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
if ( tone == 'Plain' ) return styles
|
|
69
|
+
if ( tone == 'Plain' ) return styles
|
|
70
70
|
if ( tone == 'Link' ) {
|
|
71
|
-
styles.fontColor = 'theme'
|
|
72
|
-
styles.textAlign = 'left'
|
|
73
|
-
styles.backgroundColor = 'trans'
|
|
71
|
+
styles.fontColor = 'theme'
|
|
72
|
+
styles.textAlign = 'left'
|
|
73
|
+
styles.backgroundColor = 'trans'
|
|
74
74
|
} else if ( tone == 'Normal' ) {
|
|
75
75
|
styles = {
|
|
76
76
|
...styles,
|
|
77
77
|
backgroundColor: 'trans'
|
|
78
|
-
}
|
|
78
|
+
}
|
|
79
79
|
} else if ( tone == 'Border' ) {
|
|
80
80
|
styles = {
|
|
81
81
|
...styles,
|
|
@@ -83,7 +83,7 @@ const Styles = {
|
|
|
83
83
|
border: '2.normal',
|
|
84
84
|
borderStyle: 'solid',
|
|
85
85
|
boxShadow: '0.thin',
|
|
86
|
-
}
|
|
86
|
+
}
|
|
87
87
|
} else if ( tone == 'Prime' ) {
|
|
88
88
|
styles = {
|
|
89
89
|
...styles,
|
|
@@ -96,7 +96,7 @@ const Styles = {
|
|
|
96
96
|
'push',
|
|
97
97
|
'ripple.white'
|
|
98
98
|
]
|
|
99
|
-
}
|
|
99
|
+
}
|
|
100
100
|
if ( color == 'white' ) {
|
|
101
101
|
styles = {
|
|
102
102
|
...styles,
|
|
@@ -106,7 +106,7 @@ const Styles = {
|
|
|
106
106
|
'push',
|
|
107
107
|
'ripple.cloud'
|
|
108
108
|
]
|
|
109
|
-
}
|
|
109
|
+
}
|
|
110
110
|
}
|
|
111
111
|
} else if ( tone == 'Sub' ) {
|
|
112
112
|
styles = {
|
|
@@ -116,7 +116,7 @@ const Styles = {
|
|
|
116
116
|
'shrink',
|
|
117
117
|
'ripple.cloud'
|
|
118
118
|
]
|
|
119
|
-
}
|
|
119
|
+
}
|
|
120
120
|
} else if ( tone == 'Clear' ) {
|
|
121
121
|
styles = {
|
|
122
122
|
...styles,
|
|
@@ -126,7 +126,7 @@ const Styles = {
|
|
|
126
126
|
'shrink',
|
|
127
127
|
'ripple.cloud'
|
|
128
128
|
]
|
|
129
|
-
}
|
|
129
|
+
}
|
|
130
130
|
} else if ( tone == 'FillToBorder' ) {
|
|
131
131
|
styles = {
|
|
132
132
|
...styles,
|
|
@@ -136,7 +136,7 @@ const Styles = {
|
|
|
136
136
|
borderColor: color as any,
|
|
137
137
|
fontColor: color as any,
|
|
138
138
|
backgroundColor: color as any,
|
|
139
|
-
}
|
|
139
|
+
}
|
|
140
140
|
} else if ( tone == 'BorderToFill' ) {
|
|
141
141
|
styles = {
|
|
142
142
|
...styles,
|
|
@@ -146,10 +146,10 @@ const Styles = {
|
|
|
146
146
|
borderWidth: 2,
|
|
147
147
|
borderColor: color as any,
|
|
148
148
|
backgroundColor: color as any
|
|
149
|
-
}
|
|
149
|
+
}
|
|
150
150
|
}
|
|
151
151
|
if ( color == 'cloud' ) {
|
|
152
|
-
styles.fontColor = '3.blur'
|
|
152
|
+
styles.fontColor = '3.blur'
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
if ( tone != 'Link' ) {
|
|
@@ -159,7 +159,7 @@ const Styles = {
|
|
|
159
159
|
...styles
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
return styles
|
|
162
|
+
return styles
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -180,8 +180,8 @@ const SeedWrapper = ( params: SeedWrapperInput ) => {
|
|
|
180
180
|
componentID: $.uuidGen(),
|
|
181
181
|
'aria-label': $.uuidGen(),
|
|
182
182
|
...params,
|
|
183
|
-
} )
|
|
184
|
-
let seed = Params.seed
|
|
183
|
+
} )
|
|
184
|
+
let seed = Params.seed
|
|
185
185
|
{
|
|
186
186
|
let {
|
|
187
187
|
isLocked = false,
|
|
@@ -191,7 +191,7 @@ const SeedWrapper = ( params: SeedWrapperInput ) => {
|
|
|
191
191
|
tone = 'border',
|
|
192
192
|
color = 'theme',
|
|
193
193
|
className = '',
|
|
194
|
-
} = Params
|
|
194
|
+
} = Params
|
|
195
195
|
|
|
196
196
|
Params = {
|
|
197
197
|
...Styles.Size( params.seed,params.tone,params.size,color as amotify.fn.Buttons.Colors ),
|
|
@@ -207,7 +207,7 @@ const SeedWrapper = ( params: SeedWrapperInput ) => {
|
|
|
207
207
|
style[ 'Tone_' + tone ],
|
|
208
208
|
style[ 'Color_' + color ],
|
|
209
209
|
style[ 'Tone_' + tone + '_Color_' + color ],
|
|
210
|
-
].join( ' ' )
|
|
210
|
+
].join( ' ' )
|
|
211
211
|
|
|
212
212
|
if ( isActive ) {
|
|
213
213
|
Params = {
|
|
@@ -220,7 +220,7 @@ const SeedWrapper = ( params: SeedWrapperInput ) => {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
Params = StyleConverter.ToClassName( Params )
|
|
223
|
+
Params = StyleConverter.ToClassName( Params )
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
if ( seed == 'Button' ) {
|
|
@@ -230,42 +230,42 @@ const SeedWrapper = ( params: SeedWrapperInput ) => {
|
|
|
230
230
|
submitOption,
|
|
231
231
|
onClick,
|
|
232
232
|
...Props
|
|
233
|
-
} = Params as amotify.fn.Buttons.ButtonInput
|
|
233
|
+
} = Params as amotify.fn.Buttons.ButtonInput
|
|
234
234
|
|
|
235
235
|
if ( submitOption ) {
|
|
236
236
|
submitOption = {
|
|
237
237
|
acceptInvalidForm: false,
|
|
238
238
|
submitDelegationKey: 'auxEnter',
|
|
239
239
|
...submitOption
|
|
240
|
-
}
|
|
240
|
+
}
|
|
241
241
|
Props = {
|
|
242
242
|
...Props,
|
|
243
243
|
'data-form-submit-button': submitOption.formName,
|
|
244
244
|
'data-sdfike': $.flatArray( submitOption.submitDelegationKey ).join( ',' )
|
|
245
|
-
} as any
|
|
245
|
+
} as any
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
return <button
|
|
249
249
|
data-component-id={ componentID }
|
|
250
250
|
onClick={ async ( args ) => {
|
|
251
|
-
if ( onClick ) onClick( args )
|
|
251
|
+
if ( onClick ) onClick( args )
|
|
252
252
|
|
|
253
|
-
if ( !submitOption ) return
|
|
254
|
-
let form = await $.formCollect( submitOption.formName )
|
|
253
|
+
if ( !submitOption ) return
|
|
254
|
+
let form = await $.formCollect( submitOption.formName )
|
|
255
255
|
|
|
256
|
-
if ( !submitOption.acceptInvalidForm && !form.valid ) return
|
|
257
|
-
submitOption.callback( form.data,form.valid )
|
|
256
|
+
if ( !submitOption.acceptInvalidForm && !form.valid ) return
|
|
257
|
+
submitOption.callback( form.data,form.valid )
|
|
258
258
|
} }
|
|
259
259
|
{ ...Props as any }
|
|
260
|
-
|
|
260
|
+
/>
|
|
261
261
|
} else if ( seed == 'Label' ) {
|
|
262
262
|
let {
|
|
263
263
|
isLocked,isActive,isActiveClassName,isActiveStyles,
|
|
264
264
|
componentID,
|
|
265
265
|
...Props
|
|
266
|
-
} = Params as amotify.fn.Buttons.LabelInput
|
|
266
|
+
} = Params as amotify.fn.Buttons.LabelInput
|
|
267
267
|
|
|
268
|
-
return <label { ...Props }
|
|
268
|
+
return <label { ...Props } />
|
|
269
269
|
} else if ( seed == 'Anchor' ) {
|
|
270
270
|
let {
|
|
271
271
|
isLocked,isActive,isActiveClassName,isActiveStyles,
|
|
@@ -275,27 +275,27 @@ const SeedWrapper = ( params: SeedWrapperInput ) => {
|
|
|
275
275
|
sync,
|
|
276
276
|
shiftQueryParams,
|
|
277
277
|
...Props
|
|
278
|
-
} = Params as amotify.fn.Buttons.AnchorInput
|
|
278
|
+
} = Params as amotify.fn.Buttons.AnchorInput
|
|
279
279
|
|
|
280
280
|
return <button
|
|
281
281
|
onClick={ ( event ) => {
|
|
282
|
-
let aux = event.ctrlKey || event.metaKey
|
|
282
|
+
let aux = event.ctrlKey || event.metaKey
|
|
283
283
|
|
|
284
|
-
let openNew = newTab || !!aux
|
|
284
|
+
let openNew = newTab || !!aux
|
|
285
285
|
|
|
286
|
-
let URL = href
|
|
287
|
-
if ( shiftQueryParams ) URL += location.search
|
|
286
|
+
let URL = href
|
|
287
|
+
if ( shiftQueryParams ) URL += location.search
|
|
288
288
|
|
|
289
289
|
if ( sync ) {
|
|
290
|
-
pageTransit.pushSync( URL )
|
|
290
|
+
pageTransit.pushSync( URL )
|
|
291
291
|
} else {
|
|
292
|
-
pageTransit.push( URL,!!openNew )
|
|
292
|
+
pageTransit.push( URL,!!openNew )
|
|
293
293
|
}
|
|
294
294
|
} }
|
|
295
295
|
{ ...Props as any }
|
|
296
|
-
|
|
296
|
+
/>
|
|
297
297
|
}
|
|
298
|
-
return null
|
|
298
|
+
return null
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
const SizeBalancer: {
|