amotify 0.0.6 → 0.0.7
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/package.json +1 -1
- package/public/amotify.js +1 -310
- package/public/amotify.min.css +24 -12724
- 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/webpack.config.js +114 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useStore,
|
|
3
|
+
ReactRouterDom
|
|
4
|
+
} from '@global';
|
|
5
|
+
import {
|
|
6
|
+
Layout
|
|
7
|
+
} from '@functions';
|
|
8
|
+
const {
|
|
9
|
+
useEffect,
|
|
10
|
+
useRef,
|
|
11
|
+
} = React;
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
useHistory,
|
|
15
|
+
useLocation,
|
|
16
|
+
BrowserRouter,
|
|
17
|
+
Switch,
|
|
18
|
+
Route,
|
|
19
|
+
} = ReactRouterDom;
|
|
20
|
+
|
|
21
|
+
const userEffect = ( beforeCallback?: Function,afterCallback?: Function,afterFirstCallback?: Function ) => {
|
|
22
|
+
const mounted = useRef( false );
|
|
23
|
+
let location = useLocation();
|
|
24
|
+
let history = useHistory();
|
|
25
|
+
useStore.set( {
|
|
26
|
+
key: 'history',
|
|
27
|
+
value: history
|
|
28
|
+
} );
|
|
29
|
+
|
|
30
|
+
amotify.fn.Sheet.closeAll( true );
|
|
31
|
+
|
|
32
|
+
useEffect( () => {
|
|
33
|
+
if ( mounted.current ) {
|
|
34
|
+
$( '#TopNavigation' )
|
|
35
|
+
.callback( ( topHeader ) => {
|
|
36
|
+
let Body = $( document.body );
|
|
37
|
+
if ( topHeader[ 0 ] ) {
|
|
38
|
+
Body.setStyleProperty( '--topNavHeight',topHeader.position().height + 'px' );
|
|
39
|
+
} else {
|
|
40
|
+
Body.setStyleProperty( '--topNavHeight','0px' );
|
|
41
|
+
}
|
|
42
|
+
} );
|
|
43
|
+
} else {
|
|
44
|
+
mounted.current = true;
|
|
45
|
+
}
|
|
46
|
+
},[ location ] );
|
|
47
|
+
|
|
48
|
+
if ( beforeCallback ) beforeCallback( location );
|
|
49
|
+
|
|
50
|
+
useEffect( () => {
|
|
51
|
+
if ( afterFirstCallback ) afterFirstCallback( location );
|
|
52
|
+
},[] );
|
|
53
|
+
useEffect( () => {
|
|
54
|
+
setTimeout( () => {
|
|
55
|
+
window.dispatchEvent( new Event( 'resize' ) );
|
|
56
|
+
},200 );
|
|
57
|
+
if ( afterCallback ) afterCallback( location );
|
|
58
|
+
},[ location ] );
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const Switcher: React.FC<amotify.fn.Layout.PageRouter.RoutesSwitchProps> = ( props ) => {
|
|
62
|
+
let { routes,beforeCallBack,afterCallBack,afterFirstCallBack } = props;
|
|
63
|
+
|
|
64
|
+
userEffect( beforeCallBack,afterCallBack,afterFirstCallBack );
|
|
65
|
+
|
|
66
|
+
let Routes = routes.map( ( page ) => {
|
|
67
|
+
let { path,content } = page;
|
|
68
|
+
path = '/' + path.replace( /^\//,'' );
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<Route
|
|
72
|
+
key={ path }
|
|
73
|
+
exact
|
|
74
|
+
path={ path }
|
|
75
|
+
render={ () => ( <>{ content }</> ) }
|
|
76
|
+
/>
|
|
77
|
+
);
|
|
78
|
+
} );
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<Switch>
|
|
82
|
+
{ Routes }
|
|
83
|
+
<Route
|
|
84
|
+
path='*'
|
|
85
|
+
render={ () => ( <><Layout.PageNotFound /></> ) }
|
|
86
|
+
/>
|
|
87
|
+
</Switch>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export const PageRouter: React.FC<amotify.fn.Layout.PageRouter.RouterProps> = ( props ) => {
|
|
92
|
+
let {
|
|
93
|
+
pages,
|
|
94
|
+
beforeCallBack,
|
|
95
|
+
afterCallBack,
|
|
96
|
+
afterFirstCallBack
|
|
97
|
+
} = props;
|
|
98
|
+
|
|
99
|
+
return (
|
|
100
|
+
<Switcher
|
|
101
|
+
routes={ pages }
|
|
102
|
+
beforeCallBack={ beforeCallBack }
|
|
103
|
+
afterCallBack={ afterCallBack }
|
|
104
|
+
afterFirstCallBack={ afterFirstCallBack }
|
|
105
|
+
/>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
React
|
|
3
|
+
} from '@global';
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
useState,
|
|
7
|
+
useEffect
|
|
8
|
+
} = React;
|
|
9
|
+
|
|
10
|
+
import { Effects } from '@functions';
|
|
11
|
+
|
|
12
|
+
export const PageViewController: FNC<amotify.fn.Layout.PageViewController.Params> = ( params ) => {
|
|
13
|
+
let {
|
|
14
|
+
viewIndex = 0,
|
|
15
|
+
views,
|
|
16
|
+
wrapper = ( body ) => ( <Effects.FadeIn
|
|
17
|
+
key={ viewIndex }
|
|
18
|
+
animationTime={ 400 }
|
|
19
|
+
children={ body }
|
|
20
|
+
/> )
|
|
21
|
+
} = params;
|
|
22
|
+
viewIndex = Math.min( Math.max( viewIndex,0 ),views.length );
|
|
23
|
+
|
|
24
|
+
let [ val_index,set_index ] = useState( viewIndex );
|
|
25
|
+
if ( val_index != viewIndex ) set_index( viewIndex );
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<>
|
|
29
|
+
{ wrapper( views[ viewIndex ] ) }
|
|
30
|
+
</>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Box
|
|
3
|
+
} from '@atoms';
|
|
4
|
+
|
|
5
|
+
export const Plate: FNC<amotify.fn.Layout.Plate.Params> = ( props ) => {
|
|
6
|
+
let {
|
|
7
|
+
size = 'R',
|
|
8
|
+
...others
|
|
9
|
+
} = props;
|
|
10
|
+
|
|
11
|
+
let Size = {
|
|
12
|
+
'XS': 48,
|
|
13
|
+
'S': 60,
|
|
14
|
+
'R': 72,
|
|
15
|
+
'L': 84,
|
|
16
|
+
'XL': 100,
|
|
17
|
+
'MAX': 120,
|
|
18
|
+
}[ size ];
|
|
19
|
+
|
|
20
|
+
return ( <Box
|
|
21
|
+
margin={ [ 0,'auto' ] }
|
|
22
|
+
width={ 1 }
|
|
23
|
+
{ ...others }
|
|
24
|
+
freeCSS={ {
|
|
25
|
+
maxWidth: 12 * Size,
|
|
26
|
+
...others.freeCSS
|
|
27
|
+
} }
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import {
|
|
2
|
+
React,
|
|
3
|
+
useRecycle,
|
|
4
|
+
pageTransit
|
|
5
|
+
} from '@global';
|
|
6
|
+
import {
|
|
7
|
+
Box,
|
|
8
|
+
Flex,
|
|
9
|
+
} from '@atoms';
|
|
10
|
+
import {
|
|
11
|
+
Column,
|
|
12
|
+
Row
|
|
13
|
+
} from '@mols';
|
|
14
|
+
import {
|
|
15
|
+
Buttons,
|
|
16
|
+
Input
|
|
17
|
+
} from '@functions';
|
|
18
|
+
|
|
19
|
+
import style from './style.module.scss';
|
|
20
|
+
|
|
21
|
+
export const RootViewController: amotify.fn.Layout.RootViewController.Methods = {
|
|
22
|
+
Base: ( params ) => {
|
|
23
|
+
let {
|
|
24
|
+
topNavigation,
|
|
25
|
+
sideNavigation,
|
|
26
|
+
footerNavigation,
|
|
27
|
+
children,
|
|
28
|
+
className,
|
|
29
|
+
...others
|
|
30
|
+
} = params;
|
|
31
|
+
let Key = useRecycle.set( 'RootViewController' );
|
|
32
|
+
|
|
33
|
+
React.useEffect( () => {
|
|
34
|
+
calcHeights();
|
|
35
|
+
setTimeout( () => {
|
|
36
|
+
calcHeights();
|
|
37
|
+
},100 );
|
|
38
|
+
|
|
39
|
+
let getSideNavigationHeight = 'ResizeCB';
|
|
40
|
+
let beforeunload = 'RemovePageEventCB';
|
|
41
|
+
|
|
42
|
+
$( window ).addEvent( {
|
|
43
|
+
eventType: 'resize',
|
|
44
|
+
eventID: getSideNavigationHeight,
|
|
45
|
+
callback: () => {
|
|
46
|
+
if ( !amotify.config.device.isPhonepoint() ) calcHeights();
|
|
47
|
+
}
|
|
48
|
+
} )
|
|
49
|
+
return () => {
|
|
50
|
+
$( window ).removeEvent( beforeunload );
|
|
51
|
+
$( window ).removeEvent( getSideNavigationHeight );
|
|
52
|
+
}
|
|
53
|
+
},[] );
|
|
54
|
+
|
|
55
|
+
let Chilren: ReactElement = children;
|
|
56
|
+
|
|
57
|
+
return ( <Column
|
|
58
|
+
key={ Key }
|
|
59
|
+
className={ [
|
|
60
|
+
className,
|
|
61
|
+
style.Root,
|
|
62
|
+
].join( ' ' ) }
|
|
63
|
+
backgroundColor='1.layer.base'
|
|
64
|
+
{ ...others }
|
|
65
|
+
gap={ 0 }
|
|
66
|
+
minHeight={ 'viewHeight' }
|
|
67
|
+
>
|
|
68
|
+
{ topNavigation }
|
|
69
|
+
<Flex
|
|
70
|
+
className={ style.Body }
|
|
71
|
+
flexWrap={ false }
|
|
72
|
+
position='relative'
|
|
73
|
+
flexSizing={ 0 }
|
|
74
|
+
>
|
|
75
|
+
{ sideNavigation }
|
|
76
|
+
<Box
|
|
77
|
+
className={ style.Content }
|
|
78
|
+
position='relative'
|
|
79
|
+
flexSizing={ 0 }
|
|
80
|
+
width={ 0 }
|
|
81
|
+
UnderBreakPointStyles={ {
|
|
82
|
+
width: 1
|
|
83
|
+
} }
|
|
84
|
+
>
|
|
85
|
+
{ Chilren }
|
|
86
|
+
</Box>
|
|
87
|
+
</Flex>
|
|
88
|
+
{ footerNavigation }
|
|
89
|
+
</Column> );
|
|
90
|
+
},
|
|
91
|
+
TopNavigation: ( params ) => {
|
|
92
|
+
let {
|
|
93
|
+
className,
|
|
94
|
+
children,
|
|
95
|
+
...others
|
|
96
|
+
} = params;
|
|
97
|
+
|
|
98
|
+
let [ val_componentID ] = React.useState( $.uuidGen() );
|
|
99
|
+
|
|
100
|
+
React.useEffect( () => {
|
|
101
|
+
let { height } = $( `[data-id="${ val_componentID }"]` ).position();
|
|
102
|
+
height = height | 0;
|
|
103
|
+
let topBase = height;
|
|
104
|
+
|
|
105
|
+
if ( $( '#TopNavigation' ).getStyleProperty( 'position' ) != 'sticky' ) {
|
|
106
|
+
topBase = 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
$( document.body )
|
|
110
|
+
.setStyleProperty( '--topNavHeight',height + 'px' )
|
|
111
|
+
.setStyleProperty( '--topBase',topBase + 'px' );
|
|
112
|
+
},[] );
|
|
113
|
+
|
|
114
|
+
return ( <Flex
|
|
115
|
+
key={ val_componentID }
|
|
116
|
+
data-id={ val_componentID }
|
|
117
|
+
flexSizing={ 'none' }
|
|
118
|
+
flexType='col'
|
|
119
|
+
position='sticky'
|
|
120
|
+
top={ 0 }
|
|
121
|
+
backgroundColor='1.layer.base'
|
|
122
|
+
{ ...others }
|
|
123
|
+
id='TopNavigation'
|
|
124
|
+
className={ [
|
|
125
|
+
className,
|
|
126
|
+
style.TopNav
|
|
127
|
+
].join( ' ' ) }
|
|
128
|
+
>
|
|
129
|
+
<Box
|
|
130
|
+
position='absolute'
|
|
131
|
+
left={ 0 }
|
|
132
|
+
right={ 0 }
|
|
133
|
+
backgroundColor='inherit'
|
|
134
|
+
className={ style.TopCover }
|
|
135
|
+
freeCSS={ {
|
|
136
|
+
top: '-1rem',
|
|
137
|
+
height: '2rem',
|
|
138
|
+
zIndex: -1
|
|
139
|
+
} }
|
|
140
|
+
/>
|
|
141
|
+
{ children }
|
|
142
|
+
</Flex> );
|
|
143
|
+
},
|
|
144
|
+
SideNavigation: ( params ) => {
|
|
145
|
+
let {
|
|
146
|
+
className = '',
|
|
147
|
+
baseStyles,
|
|
148
|
+
...others
|
|
149
|
+
} = params;
|
|
150
|
+
|
|
151
|
+
return ( <Box
|
|
152
|
+
flexSizing={ 'none' }
|
|
153
|
+
className={ [
|
|
154
|
+
className,
|
|
155
|
+
style.SideNav
|
|
156
|
+
].join( ' ' ) }
|
|
157
|
+
minHeight='sideNavigationHeight'
|
|
158
|
+
{ ...others }
|
|
159
|
+
/> );
|
|
160
|
+
},
|
|
161
|
+
FooterNavigation: ( params ) => {
|
|
162
|
+
let {
|
|
163
|
+
className = '',
|
|
164
|
+
baseStyles,
|
|
165
|
+
...others
|
|
166
|
+
} = params;
|
|
167
|
+
let [ val_componentID ] = React.useState( $.uuidGen() );
|
|
168
|
+
|
|
169
|
+
React.useEffect( () => {
|
|
170
|
+
let { height } = $( `[data-id="${ val_componentID }"]` ).position();
|
|
171
|
+
height = height | 0;
|
|
172
|
+
$( document.body ).setStyleProperty( '--footerNavHeight',height + 'px' );
|
|
173
|
+
},[] );
|
|
174
|
+
|
|
175
|
+
return ( <Flex
|
|
176
|
+
data-id={ val_componentID }
|
|
177
|
+
borderTop
|
|
178
|
+
position='sticky'
|
|
179
|
+
bottom={ 0 }
|
|
180
|
+
overflow={ 'auto' }
|
|
181
|
+
backgroundColor='1.layer.base'
|
|
182
|
+
paddingBottom={ 'safeAreaBottom' }
|
|
183
|
+
display='none'
|
|
184
|
+
{ ...baseStyles }
|
|
185
|
+
UnderBreakPointStyles={ {
|
|
186
|
+
display: 'flex',
|
|
187
|
+
...baseStyles?.UnderBreakPointStyles
|
|
188
|
+
} }
|
|
189
|
+
className={ [
|
|
190
|
+
style.FooterNav,
|
|
191
|
+
className
|
|
192
|
+
].join( ' ' ) }
|
|
193
|
+
>
|
|
194
|
+
<Flex
|
|
195
|
+
gap={ 1 }
|
|
196
|
+
flexWrap={ false }
|
|
197
|
+
padding={ '2/3' }
|
|
198
|
+
margin={ 'auto' }
|
|
199
|
+
{ ...others }
|
|
200
|
+
/>
|
|
201
|
+
</Flex> );
|
|
202
|
+
},
|
|
203
|
+
Comps: {
|
|
204
|
+
Button: ( params ) => {
|
|
205
|
+
let {
|
|
206
|
+
isActive,
|
|
207
|
+
uri,
|
|
208
|
+
uriGroup,
|
|
209
|
+
activeClassName = '',
|
|
210
|
+
...others
|
|
211
|
+
} = params;
|
|
212
|
+
|
|
213
|
+
let groups = $.flatArray( uriGroup );
|
|
214
|
+
|
|
215
|
+
let currentURL = location.pathname + location.search;
|
|
216
|
+
|
|
217
|
+
{
|
|
218
|
+
let isCurrentURL = false;
|
|
219
|
+
if ( $.is.exist( uri ) && $.is.string( uri ) ) {
|
|
220
|
+
let url = [
|
|
221
|
+
location.origin,
|
|
222
|
+
uri.replace( /\//,'' )
|
|
223
|
+
].join( '/' );
|
|
224
|
+
|
|
225
|
+
isCurrentURL = currentURL == new URL( url ).pathname;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if ( !isCurrentURL ) {
|
|
229
|
+
if ( groups.length ) {
|
|
230
|
+
for ( let group of groups ) {
|
|
231
|
+
if ( $.is.nullish( group ) ) continue;
|
|
232
|
+
if ( !!currentURL.match( new RegExp( group ) ) ) isCurrentURL = true;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
isActive = isActive ?? isCurrentURL;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
return <Buttons.Button.Clear.R
|
|
240
|
+
padding={ [ '3/4',1 ] }
|
|
241
|
+
display='flex'
|
|
242
|
+
gap='1/2'
|
|
243
|
+
fontColor='inherit'
|
|
244
|
+
width={ 1 }
|
|
245
|
+
flexSizing={ 'none' }
|
|
246
|
+
flexWrap={ false }
|
|
247
|
+
ssEffectsOnActive='ripple.cloud'
|
|
248
|
+
verticalAlign='center'
|
|
249
|
+
textAlign='left'
|
|
250
|
+
isBoldFont
|
|
251
|
+
isActive={ isActive }
|
|
252
|
+
isActiveStyles={ {
|
|
253
|
+
fontColor: 'theme',
|
|
254
|
+
backgroundColor: 'cloud'
|
|
255
|
+
} }
|
|
256
|
+
onClick={ ( event ) => {
|
|
257
|
+
if ( $.is.exist( uri ) && $.is.string( uri ) ) pageTransit.push( uri,event.ctrlKey || event.metaKey );
|
|
258
|
+
} }
|
|
259
|
+
color={ 'cloud' }
|
|
260
|
+
{ ...others }
|
|
261
|
+
/>;
|
|
262
|
+
},
|
|
263
|
+
Bar: ( params ) => ( <Box
|
|
264
|
+
backgroundColor={ 'lcOpMiddle' }
|
|
265
|
+
unitHeight={ '1/3' }
|
|
266
|
+
margin={ [ '2/3',1 ] }
|
|
267
|
+
borderRadius='sphere'
|
|
268
|
+
{ ...params }
|
|
269
|
+
/> ),
|
|
270
|
+
Title: ( params ) => ( <Box
|
|
271
|
+
fontSize='3.paragraph'
|
|
272
|
+
isBoldFont
|
|
273
|
+
padding={ [ 0,1 ] }
|
|
274
|
+
{ ...params }
|
|
275
|
+
/> ),
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
const calcHeights = () => {
|
|
280
|
+
let Body = $( document.body );
|
|
281
|
+
let viewHeight = window.innerHeight;
|
|
282
|
+
|
|
283
|
+
let topNavHeight = Number( Body.getStyleProperty( '--topNavHeight' ).removeLetters() );
|
|
284
|
+
let footerNavHeight = Number( Body.getStyleProperty( '--footerNavHeight' ).removeLetters() );
|
|
285
|
+
let contentHeight = viewHeight - topNavHeight - footerNavHeight;
|
|
286
|
+
|
|
287
|
+
Body.setStyleProperty( '--viewHeight',viewHeight + 'px' )
|
|
288
|
+
.setStyleProperty( '--sideNavHeight',contentHeight + 'px' )
|
|
289
|
+
.setStyleProperty( '--contentHeight',contentHeight + 'px' );
|
|
290
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use '@uniVar' as *;
|
|
2
|
+
.Content {
|
|
3
|
+
@media (max-width:$breakPoint ) {
|
|
4
|
+
min-height: calc($viewHeight - $topNavigationHeight - $footerNavigationHeight );
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
.Root {
|
|
8
|
+
.TopNav {
|
|
9
|
+
z-index: 5;
|
|
10
|
+
}
|
|
11
|
+
.FooterNav {
|
|
12
|
+
z-index: 4;
|
|
13
|
+
}
|
|
14
|
+
.Body {
|
|
15
|
+
.SideNav {
|
|
16
|
+
z-index: 3;
|
|
17
|
+
.Wrap {}
|
|
18
|
+
}
|
|
19
|
+
.Content {
|
|
20
|
+
z-index: 2;
|
|
21
|
+
padding-bottom: $footerNavigationHeight;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|