@jescon-technologies/react-native-ui-kit 0.0.16 → 0.0.17
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/index.d.ts +14 -0
- package/index.js +13 -0
- package/package.json +1 -1
- package/src/CommonStyle/PopupStyle.ts +161 -0
- package/src/CommonStyle/optionListStyles.ts +191 -0
- package/src/Components/SDropDown.tsx +861 -0
- package/src/Custom/CSliderMenu.tsx +226 -8
- package/src/Custom/Loader.tsx +216 -0
- package/src/Hoc/HProvider.tsx +8 -5
package/index.d.ts
CHANGED
|
@@ -10,13 +10,27 @@ export { default as Navigation } from './src/Navigation/PageNavigation';
|
|
|
10
10
|
export { default as SSearchBar } from './src/StaticComponents/SSearchBar';
|
|
11
11
|
export { default as SDateTimePicker } from './src/StaticComponents/SDateTimePicker';
|
|
12
12
|
export { default as CFooterView } from './src/CustomComponents/CFooterView';
|
|
13
|
+
export { default as SDropDown } from './src/Components/SDropDown';
|
|
13
14
|
export { default as CDetailView } from './src/CustomComponents/CDetailView';
|
|
15
|
+
export { default as CModalOverlay } from './src/CustomComponents/CModalOverlay';
|
|
16
|
+
export { default as CNetworkStatus } from './src/CustomComponents/CNetworkStatus';
|
|
17
|
+
export { default as COverlay } from './src/CustomComponents/COverlay';
|
|
18
|
+
export { default as Loader } from './src/Custom/Loader';
|
|
19
|
+
export { default as CSliderMenu } from './src/Custom/CSliderMenu';
|
|
20
|
+
export { default as OUserView } from './src/Custom/OUserView';
|
|
14
21
|
export { default as CContainerView } from './src/CustomComponents/CContainerView';
|
|
15
22
|
export { default as HeaderBlock } from './src/CustomComponents/HeaderBlock';
|
|
16
23
|
export { default as HDashboard } from './src/Hoc/HDashboard';
|
|
17
24
|
export { default as NetworkServiceCall } from './src/Common/NetworkServiceCall';
|
|
18
25
|
export { default as useNotifications } from './src/Handlers/NotificationsContext';
|
|
26
|
+
export { default as ResponseComponentContext, ResponseComponentProvider } from './src/Handlers/ResponseComponentContext';
|
|
27
|
+
export type { ResponseComponentProviderProps, ResponseContextValue, ResponseJSON } from './src/Handlers/ResponseComponentContext';
|
|
19
28
|
export * from './src/Navigation/useNavigation';
|
|
29
|
+
export * from './src/Navigation/useIsFocused';
|
|
30
|
+
export * from './src/Navigation/useFocusEffect';
|
|
20
31
|
export { default as CBackHandler } from './src/CustomComponents/CBackHandler';
|
|
21
32
|
export * from './src/CommonStyle/ComponentFunctions';
|
|
22
33
|
export * from './src/CommonStyle/commonStyle';
|
|
34
|
+
export * from './src/CommonStyle/componentStyle';
|
|
35
|
+
export * from './src/CommonStyle/optionListStyles';
|
|
36
|
+
export * from './src/CommonStyle/PopupStyle';
|
package/index.js
CHANGED
|
@@ -10,13 +10,26 @@ export { default as Navigation } from './src/Navigation/PageNavigation';
|
|
|
10
10
|
export { default as SSearchBar } from './src/StaticComponents/SSearchBar';
|
|
11
11
|
export { default as SDateTimePicker } from './src/StaticComponents/SDateTimePicker';
|
|
12
12
|
export { default as CFooterView } from './src/CustomComponents/CFooterView';
|
|
13
|
+
export { default as SDropDown } from './src/Components/SDropDown';
|
|
13
14
|
export { default as CDetailView } from './src/CustomComponents/CDetailView';
|
|
15
|
+
export { default as CModalOverlay } from './src/CustomComponents/CModalOverlay';
|
|
16
|
+
export { default as CNetworkStatus } from './src/CustomComponents/CNetworkStatus';
|
|
17
|
+
export { default as COverlay } from './src/CustomComponents/COverlay';
|
|
18
|
+
export { default as Loader } from './src/Custom/Loader';
|
|
19
|
+
export { default as CSliderMenu } from './src/Custom/CSliderMenu';
|
|
20
|
+
export { default as OUserView } from './src/Custom/OUserView';
|
|
14
21
|
export { default as CContainerView } from './src/CustomComponents/CContainerView';
|
|
15
22
|
export { default as HeaderBlock } from './src/CustomComponents/HeaderBlock';
|
|
16
23
|
export { default as HDashboard } from './src/Hoc/HDashboard';
|
|
17
24
|
export { default as NetworkServiceCall } from './src/Common/NetworkServiceCall';
|
|
18
25
|
export { default as useNotifications } from './src/Handlers/NotificationsContext';
|
|
26
|
+
export { default as ResponseComponentContext, ResponseComponentProvider } from './src/Handlers/ResponseComponentContext';
|
|
19
27
|
export * from './src/Navigation/useNavigation';
|
|
28
|
+
export * from './src/Navigation/useIsFocused';
|
|
29
|
+
export * from './src/Navigation/useFocusEffect';
|
|
20
30
|
export { default as CBackHandler } from './src/CustomComponents/CBackHandler';
|
|
21
31
|
export * from './src/CommonStyle/ComponentFunctions';
|
|
22
32
|
export * from './src/CommonStyle/commonStyle';
|
|
33
|
+
export * from './src/CommonStyle/componentStyle';
|
|
34
|
+
export * from './src/CommonStyle/optionListStyles';
|
|
35
|
+
export * from './src/CommonStyle/PopupStyle';
|
package/package.json
CHANGED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { StyleSheet, ViewStyle, TextStyle } from 'react-native';
|
|
2
|
+
import ComponentStyles, { normalize } from '../CommonStyle/componentStyle';
|
|
3
|
+
import { colors } from '../CommonStyle/commonStyle';
|
|
4
|
+
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Helper factories
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
export function getSearchButtonStyle(backgroundcolor?: string): ViewStyle {
|
|
10
|
+
return {
|
|
11
|
+
...ComponentStyles.searchButton,
|
|
12
|
+
width: '100%',
|
|
13
|
+
backgroundColor: backgroundcolor,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function getListviewItem(selected?: boolean, borderbottomwidth?: boolean): ViewStyle {
|
|
18
|
+
return {
|
|
19
|
+
borderColor: '#DCDEDD',
|
|
20
|
+
borderWidth: borderbottomwidth ? 0 : 1,
|
|
21
|
+
borderBottomWidth: 1,
|
|
22
|
+
width: '100%',
|
|
23
|
+
borderRadius: 7,
|
|
24
|
+
backgroundColor: selected ? 'lightblue' : colors.color_DeselectBgCOlor,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function getListviewItemText(selected?: boolean): TextStyle {
|
|
29
|
+
return {
|
|
30
|
+
...ComponentStyles.select_TextStyle,
|
|
31
|
+
fontWeight: selected ? 'bold' : 'normal',
|
|
32
|
+
color: selected ? '#094485' : 'black',
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function getListviewItemText2(selected?: boolean): ViewStyle {
|
|
37
|
+
return {
|
|
38
|
+
// ...ComponentStyles.select_TextStyle,
|
|
39
|
+
// fontWeight: selected ? 'bold' : 'normal',
|
|
40
|
+
// color: selected ? '#094485' : 'black',
|
|
41
|
+
backgroundColor: selected ? '#ccd9ff' : 'white',
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function getPopupHeadingOption(width: number): ViewStyle {
|
|
46
|
+
return {
|
|
47
|
+
paddingBottom: 5,
|
|
48
|
+
flexDirection: 'row',
|
|
49
|
+
justifyContent: 'space-around',
|
|
50
|
+
width: width * 0.9,
|
|
51
|
+
margin: 5,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* NOTE: `color` argument is not used by the current implementation — the
|
|
57
|
+
* returned `color` is hard-coded to `'darkblue'`. Signature kept for parity
|
|
58
|
+
* with callers; consider removing the parameter.
|
|
59
|
+
*/
|
|
60
|
+
export function getPopupHeadingOptionText(_color?: string): TextStyle {
|
|
61
|
+
return {
|
|
62
|
+
...ComponentStyles.popup_heading,
|
|
63
|
+
color: 'darkblue',
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function getPopupContainerStyle(height: number): ViewStyle {
|
|
68
|
+
return {
|
|
69
|
+
borderRadius: 20,
|
|
70
|
+
height: height * 0.6,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* NOTE: both `width` and `height` are unused in the current implementation.
|
|
76
|
+
* Signature kept for parity with callers; consider dropping parameters.
|
|
77
|
+
*/
|
|
78
|
+
export function getPopupTextAreaContainer(_width?: number, _height?: number): ViewStyle {
|
|
79
|
+
return {
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
flex: 1,
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function getPopupTextAreaChildContainer(
|
|
87
|
+
_width: number,
|
|
88
|
+
height: number,
|
|
89
|
+
bordercolor: string
|
|
90
|
+
): ViewStyle {
|
|
91
|
+
return {
|
|
92
|
+
flexDirection: 'row',
|
|
93
|
+
borderWidth: 1,
|
|
94
|
+
borderColor: bordercolor,
|
|
95
|
+
width: '80%',
|
|
96
|
+
justifyContent: 'flex-start',
|
|
97
|
+
alignItems: 'center',
|
|
98
|
+
borderRadius: 7,
|
|
99
|
+
margin: height * 0.003,
|
|
100
|
+
marginBottom: height * 0.003,
|
|
101
|
+
height: height * 0.3,
|
|
102
|
+
// ⚠️ Duplicate `backgroundColor` — the second (`'#fff'`) wins.
|
|
103
|
+
// Preserved to match runtime behavior; remove one.
|
|
104
|
+
backgroundColor: '#fff',
|
|
105
|
+
marginTop: 0,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function getPopupTextAreaStyle(_width: number, height: number): TextStyle {
|
|
110
|
+
return {
|
|
111
|
+
...ComponentStyles.input_Text,
|
|
112
|
+
textAlignVertical: 'top',
|
|
113
|
+
width: '98%',
|
|
114
|
+
marginLeft: '1%',
|
|
115
|
+
padding: 0,
|
|
116
|
+
height: '100%',
|
|
117
|
+
marginBottom: -(height * 0.003),
|
|
118
|
+
fontSize: normalize(14),
|
|
119
|
+
fontWeight: 'bold',
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// ---------------------------------------------------------------------------
|
|
124
|
+
// Static styles
|
|
125
|
+
// ---------------------------------------------------------------------------
|
|
126
|
+
|
|
127
|
+
const popupStyles = StyleSheet.create({
|
|
128
|
+
overlay_screen_listview_container: {
|
|
129
|
+
justifyContent: 'center',
|
|
130
|
+
marginBottom: 10,
|
|
131
|
+
},
|
|
132
|
+
overlay_screen_button_view: {
|
|
133
|
+
width: '99%',
|
|
134
|
+
marginTop: 20,
|
|
135
|
+
...ComponentStyles.View_row_center,
|
|
136
|
+
justifyContent: 'space-around',
|
|
137
|
+
},
|
|
138
|
+
overlay_screen_small_button_style: {
|
|
139
|
+
borderRadius: 7,
|
|
140
|
+
height: normalize(40),
|
|
141
|
+
backgroundColor: '#eae5e5',
|
|
142
|
+
width: normalize(60),
|
|
143
|
+
...ComponentStyles.View_col_center,
|
|
144
|
+
},
|
|
145
|
+
overlay_screen_big_button_style: {
|
|
146
|
+
backgroundColor: '#094485',
|
|
147
|
+
borderRadius: 7,
|
|
148
|
+
width: '100%',
|
|
149
|
+
marginBottom: 30,
|
|
150
|
+
height: 35,
|
|
151
|
+
alignItems: 'center',
|
|
152
|
+
justifyContent: 'center',
|
|
153
|
+
},
|
|
154
|
+
overlay_screen_button_text: {
|
|
155
|
+
fontSize: normalize(12),
|
|
156
|
+
fontWeight: '500',
|
|
157
|
+
color: 'black',
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
export default popupStyles;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { StyleSheet, ViewStyle, TextStyle, ImageStyle } from 'react-native';
|
|
2
|
+
import { Global } from '../../../../../src/Common/Global';
|
|
3
|
+
import { colors, fontWeight } from './commonStyle';
|
|
4
|
+
import { normalize } from './componentStyle';
|
|
5
|
+
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Static styles
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
const styles = StyleSheet.create({
|
|
11
|
+
profile_icon_container: {
|
|
12
|
+
height: '100%',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
flex: 2,
|
|
15
|
+
} as ViewStyle,
|
|
16
|
+
profile_icon_style: {
|
|
17
|
+
width: '100%',
|
|
18
|
+
height: '70%',
|
|
19
|
+
borderRadius: 0,
|
|
20
|
+
resizeMode: 'contain',
|
|
21
|
+
} as ImageStyle,
|
|
22
|
+
user_details_container: {
|
|
23
|
+
height: '100%',
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
flex: 4,
|
|
26
|
+
} as ViewStyle,
|
|
27
|
+
logout_icon_container: {
|
|
28
|
+
height: '100%',
|
|
29
|
+
justifyContent: 'center',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
flex: 1,
|
|
32
|
+
} as ViewStyle,
|
|
33
|
+
logout_icon_style: {
|
|
34
|
+
width: '60%',
|
|
35
|
+
height: '40%',
|
|
36
|
+
borderRadius: 100,
|
|
37
|
+
resizeMode: 'contain',
|
|
38
|
+
} as ImageStyle,
|
|
39
|
+
option_menu_icon: {
|
|
40
|
+
width: 40,
|
|
41
|
+
height: 40,
|
|
42
|
+
marginLeft: 20,
|
|
43
|
+
} as ImageStyle,
|
|
44
|
+
option_submenu_icon: {
|
|
45
|
+
width: 30,
|
|
46
|
+
height: 30,
|
|
47
|
+
marginLeft: 15,
|
|
48
|
+
resizeMode: 'contain',
|
|
49
|
+
} as ImageStyle,
|
|
50
|
+
option_menu_text: {
|
|
51
|
+
marginLeft: 5,
|
|
52
|
+
fontSize: normalize(14),
|
|
53
|
+
fontWeight: '600',
|
|
54
|
+
color: '#fff',
|
|
55
|
+
} as TextStyle,
|
|
56
|
+
option_detail_help_url_icon: {
|
|
57
|
+
width: 20,
|
|
58
|
+
height: 20,
|
|
59
|
+
marginLeft: 15,
|
|
60
|
+
borderRadius: 100,
|
|
61
|
+
resizeMode: 'contain',
|
|
62
|
+
} as ImageStyle,
|
|
63
|
+
option_selection_container: {
|
|
64
|
+
flexDirection: 'row',
|
|
65
|
+
justifyContent: 'flex-start',
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
flex: 4,
|
|
68
|
+
} as ViewStyle,
|
|
69
|
+
option_submenu_child_container: {
|
|
70
|
+
flexDirection: 'row',
|
|
71
|
+
justifyContent: 'flex-start',
|
|
72
|
+
alignContent: 'center',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
margin: 5,
|
|
75
|
+
borderRadius: 10,
|
|
76
|
+
} as ViewStyle,
|
|
77
|
+
option_menu_container: {
|
|
78
|
+
flexDirection: 'row',
|
|
79
|
+
justifyContent: 'flex-start',
|
|
80
|
+
alignContent: 'center',
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
margin: 2,
|
|
83
|
+
height: 32,
|
|
84
|
+
borderRadius: 10,
|
|
85
|
+
} as ViewStyle,
|
|
86
|
+
option_block: {
|
|
87
|
+
flex: 1,
|
|
88
|
+
width: '100%',
|
|
89
|
+
backgroundColor: Global.AppTheme.primary_color,
|
|
90
|
+
} as ViewStyle,
|
|
91
|
+
option_error_msg: {
|
|
92
|
+
justifyContent: 'center',
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
padding: 5,
|
|
95
|
+
} as ViewStyle,
|
|
96
|
+
usernameStyle: {
|
|
97
|
+
color: colors.color_usernameText,
|
|
98
|
+
fontSize: 16,
|
|
99
|
+
fontWeight: fontWeight.fontWeight_Bold,
|
|
100
|
+
} as TextStyle,
|
|
101
|
+
departmeNameStyle: {
|
|
102
|
+
color: '#C1C6D0',
|
|
103
|
+
fontSize: 12,
|
|
104
|
+
} as TextStyle,
|
|
105
|
+
dataListContainerStyle: {
|
|
106
|
+
justifyContent: 'flex-start',
|
|
107
|
+
flex: 1,
|
|
108
|
+
marginBottom: 20,
|
|
109
|
+
alignItems: 'flex-start',
|
|
110
|
+
paddingLeft: 5,
|
|
111
|
+
paddingTop: 5,
|
|
112
|
+
} as ViewStyle,
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
// ---------------------------------------------------------------------------
|
|
116
|
+
// Helper factories
|
|
117
|
+
// ---------------------------------------------------------------------------
|
|
118
|
+
|
|
119
|
+
export function getOptionContainerStyle(height: number): ViewStyle {
|
|
120
|
+
return {
|
|
121
|
+
position: 'absolute',
|
|
122
|
+
left: 0,
|
|
123
|
+
right: 0,
|
|
124
|
+
elevation: 999,
|
|
125
|
+
alignItems: 'flex-start',
|
|
126
|
+
margin: 0,
|
|
127
|
+
zIndex: 10000,
|
|
128
|
+
backgroundColor: 'rgba(0, 0, 0, 0.10)',
|
|
129
|
+
justifyContent: 'flex-start',
|
|
130
|
+
height,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function getOptionchildrenWrapperStyle(width: number, height: number): ViewStyle {
|
|
135
|
+
return {
|
|
136
|
+
backgroundColor: Global.AppTheme.primary_color,
|
|
137
|
+
width,
|
|
138
|
+
height,
|
|
139
|
+
margin: -20,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function getOptionHeaderContainer(height: number): ViewStyle {
|
|
144
|
+
return {
|
|
145
|
+
backgroundColor: Global.AppTheme.primary_color,
|
|
146
|
+
flexDirection: 'row',
|
|
147
|
+
height: height * 0.1,
|
|
148
|
+
alignItems: 'flex-end',
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function getOptionMenu(width: number): ViewStyle {
|
|
153
|
+
return {
|
|
154
|
+
width: width * 0.85,
|
|
155
|
+
marginLeft: width * 0.02,
|
|
156
|
+
...styles.option_menu_container,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function getOptionSubmenuContainer(width: number): ViewStyle {
|
|
161
|
+
return { width: width * 0.85, marginLeft: width * 0.03 };
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function getOptionSubmenuChildContainer(width: number): ViewStyle {
|
|
165
|
+
return {
|
|
166
|
+
width: width * 0.82,
|
|
167
|
+
...styles.option_submenu_child_container,
|
|
168
|
+
height: 30,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export function getOptionSubmenuText(width: number): TextStyle {
|
|
173
|
+
return {
|
|
174
|
+
marginLeft: 20,
|
|
175
|
+
fontSize: normalize(12),
|
|
176
|
+
fontWeight: '400',
|
|
177
|
+
color: '#fff',
|
|
178
|
+
width: width * 0.55,
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export function getoptiondetailhelpurlContainer(width: number): ViewStyle {
|
|
183
|
+
return {
|
|
184
|
+
alignItems: 'flex-end',
|
|
185
|
+
justifyContent: 'center',
|
|
186
|
+
flex: 1,
|
|
187
|
+
paddingRight: width * 0.02,
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export default styles;
|