@jescon-technologies/react-native-ui-kit 0.0.8 → 0.0.10
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 +3 -2
- package/index.js +3 -1
- package/package.json +1 -1
- package/src/Alerts/AAlert.tsx +196 -0
- package/src/Alerts/AAlertIOS.tsx +148 -0
- package/src/Common/Icons.tsx +97 -0
- package/src/CommonStyle/ComponentFunctions.tsx +619 -0
- package/src/CommonStyle/commonStyle.tsx +101 -0
- package/src/CommonStyle/componentStyle.tsx +545 -0
- package/src/CustomComponents/CModalOverlay.tsx +100 -0
- package/src/Navigation/useFocusEffect.native.tsx +1 -0
- package/src/Navigation/useFocusEffect.tsx +2 -0
- package/src/Navigation/useFocusEffect.web.tsx +1 -0
- package/src/Navigation/useIsFocused.native.tsx +1 -0
- package/src/Navigation/useIsFocused.tsx +1 -0
- package/src/Navigation/useIsFocused.web.tsx +1 -0
- package/src/Navigation/useNavigation.native.tsx +1 -0
- package/src/Navigation/useNavigation.tsx +2 -0
- package/src/Navigation/useNavigation.web.tsx +1 -0
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
import { StyleSheet, Dimensions, Platform, PixelRatio, Text } from 'react-native';
|
|
2
|
+
import { colors, fontWeight } from './commonStyle';
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
width: SCREEN_WIDTH,
|
|
6
|
+
height: SCREEN_HEIGHT,
|
|
7
|
+
} = Dimensions.get('window');
|
|
8
|
+
|
|
9
|
+
const scale = SCREEN_WIDTH / 320;
|
|
10
|
+
var radio_height = 20;
|
|
11
|
+
export function normalize(size) {
|
|
12
|
+
const newSize = scale < 1.5 ? size * scale : size * 1.6;
|
|
13
|
+
if (Platform.OS === 'ios') {
|
|
14
|
+
return Math.round(PixelRatio.roundToNearestPixel(newSize)) - 2;
|
|
15
|
+
} else {
|
|
16
|
+
return Math.round(PixelRatio.roundToNearestPixel(newSize)) - 2;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function width(itemwidth) {
|
|
21
|
+
return SCREEN_WIDTH * (itemwidth / 100);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function height(itemheight) {
|
|
25
|
+
return SCREEN_HEIGHT * (itemheight / 100);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const ComponentStyles = StyleSheet.create({
|
|
29
|
+
textinput: {
|
|
30
|
+
fontSize: normalize(15),
|
|
31
|
+
color: colors.color_componentText,
|
|
32
|
+
// ...ComponentStyles.input_Text,
|
|
33
|
+
width: width(20),
|
|
34
|
+
marginLeft: '1%',
|
|
35
|
+
marginRight: '1%',
|
|
36
|
+
padding: 0,
|
|
37
|
+
height: SCREEN_HEIGHT * 0.03,
|
|
38
|
+
marginBottom: height(3),
|
|
39
|
+
fontWeight: 'normal',
|
|
40
|
+
fontStyle: 'normal',
|
|
41
|
+
textAlign: 'left',
|
|
42
|
+
borderWidth: 1,
|
|
43
|
+
marginVertical:5,
|
|
44
|
+
borderColor:'lightgrey',
|
|
45
|
+
},
|
|
46
|
+
viewstyle: {
|
|
47
|
+
justifyContent: 'center',
|
|
48
|
+
alignContent: 'center',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
flexDirection: 'row',
|
|
51
|
+
// width: width(10)
|
|
52
|
+
},
|
|
53
|
+
textstyle: {
|
|
54
|
+
fontSize: normalize(10),
|
|
55
|
+
// width : '50%'
|
|
56
|
+
},
|
|
57
|
+
headerTitle: {
|
|
58
|
+
fontSize: normalize(13), color: '#fff', fontWeight: fontWeight.fontWeight_Normal,
|
|
59
|
+
},
|
|
60
|
+
headerSubTitle: {
|
|
61
|
+
fontSize: normalize(11), color: '#fff', fontWeight: fontWeight.fontWeight_Normal,
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
component_Icon: {
|
|
65
|
+
height: 25,
|
|
66
|
+
width: 25,
|
|
67
|
+
resizeMode: 'contain',
|
|
68
|
+
},
|
|
69
|
+
group_Button: {
|
|
70
|
+
width: 22, height: 22,
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
},
|
|
73
|
+
group_Button_BadgeStyle: {
|
|
74
|
+
backgroundColor: 'rgba(0,0,0,0)',
|
|
75
|
+
opacity: 0.7,
|
|
76
|
+
borderRadius: 100,
|
|
77
|
+
borderWidth: 1, borderColor: 'gray',
|
|
78
|
+
|
|
79
|
+
},
|
|
80
|
+
media_Gallery_Container: {
|
|
81
|
+
flex: 1, justifyContent: 'center',
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
margin: 1,
|
|
84
|
+
},
|
|
85
|
+
group_Button_Badge_TextStyle: {
|
|
86
|
+
color: colors.color_StatusBar,
|
|
87
|
+
fontSize: 10, fontWeight: 'bold',
|
|
88
|
+
|
|
89
|
+
},
|
|
90
|
+
group_Button_Badge_ContainerStyle: {
|
|
91
|
+
position: 'absolute', top: -3, left: -5,
|
|
92
|
+
},
|
|
93
|
+
no_data_found_text: {
|
|
94
|
+
fontSize: normalize(12),
|
|
95
|
+
color: colors.color_componentText,
|
|
96
|
+
fontWeight: '800', alignItems: 'center', justifyContent: 'center',
|
|
97
|
+
},
|
|
98
|
+
//footer
|
|
99
|
+
footer_Icon: {
|
|
100
|
+
height: 25,
|
|
101
|
+
width: 25,
|
|
102
|
+
alignItems: 'center',
|
|
103
|
+
alignSelf: 'center',
|
|
104
|
+
opacity: 0.9,
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
footer_Icon_Text: {
|
|
108
|
+
textAlign: 'center',
|
|
109
|
+
fontSize: normalize(6),
|
|
110
|
+
},
|
|
111
|
+
//Header style
|
|
112
|
+
header_section_conatiner_style: {
|
|
113
|
+
|
|
114
|
+
backgroundColor: colors.color_Header,
|
|
115
|
+
justifyContent: 'flex-end',
|
|
116
|
+
padding: 10,
|
|
117
|
+
},
|
|
118
|
+
header_section_child_container_style: {
|
|
119
|
+
flexDirection: 'row', justifyContent: 'space-between',
|
|
120
|
+
margin: 1, alignItems: 'flex-end',
|
|
121
|
+
paddingTop: Platform.OS === 'ios' ? '6%' : '3%',
|
|
122
|
+
},
|
|
123
|
+
header_left_menu_icon_container: {
|
|
124
|
+
// backgroundColor: '#F9AA33',
|
|
125
|
+
borderColor: '#000',
|
|
126
|
+
borderRadius: 5, borderWidth: 0.8, justifyContent: 'center',
|
|
127
|
+
},
|
|
128
|
+
header_right_menu_icon_container: {
|
|
129
|
+
borderColor: '#000',
|
|
130
|
+
borderRadius: 5,
|
|
131
|
+
justifyContent: 'center',
|
|
132
|
+
},
|
|
133
|
+
header_menu_icon: {
|
|
134
|
+
height: 27, width: 27, margin: 5,
|
|
135
|
+
},
|
|
136
|
+
// Result Report (ResultView, ResultViewDateWise, )
|
|
137
|
+
result_view_child_container: {
|
|
138
|
+
flexDirection: 'row', alignItems: 'center',
|
|
139
|
+
justifyContent: 'center', borderBottomWidth: 1,
|
|
140
|
+
borderColor: colors.color_componentBordercolor,
|
|
141
|
+
width: '100%',
|
|
142
|
+
|
|
143
|
+
},
|
|
144
|
+
result_view_heading_container: {
|
|
145
|
+
width: '19%', marginLeft: '1%',
|
|
146
|
+
|
|
147
|
+
},
|
|
148
|
+
result_view_display_Text: {
|
|
149
|
+
fontSize: normalize(12),
|
|
150
|
+
color: colors.color_componentText,
|
|
151
|
+
fontWeight: '800',
|
|
152
|
+
},
|
|
153
|
+
result_view_viewgraph_container: {
|
|
154
|
+
marginTop: '1%',
|
|
155
|
+
},
|
|
156
|
+
result_view_viewgraph_text: {
|
|
157
|
+
color: '#943126', fontStyle: 'italic',
|
|
158
|
+
},
|
|
159
|
+
result_view_range_container: {
|
|
160
|
+
width: '9%', alignItems: 'flex-start',
|
|
161
|
+
},
|
|
162
|
+
result_view_unit_Text: {
|
|
163
|
+
fontSize: normalize(10),
|
|
164
|
+
color: 'black',//"#606266",
|
|
165
|
+
fontWeight: 'bold',
|
|
166
|
+
},
|
|
167
|
+
result_view_range_child_container: {
|
|
168
|
+
width: '100%', flexDirection: 'column',
|
|
169
|
+
marginTop: '1%', alignItems: 'center',
|
|
170
|
+
},
|
|
171
|
+
result_view_range_Text: {
|
|
172
|
+
fontSize: normalize(10),
|
|
173
|
+
color: '#4D5656',//"#606266",
|
|
174
|
+
fontWeight: 'normal',
|
|
175
|
+
},
|
|
176
|
+
result_view_value_container: {
|
|
177
|
+
width: '68%', marginLeft: '1%',
|
|
178
|
+
flexDirection: 'row',
|
|
179
|
+
borderLeftWidth: 0.5,
|
|
180
|
+
borderColor: colors.color_componentBordercolor,
|
|
181
|
+
},
|
|
182
|
+
profilecard_dataContainer: {
|
|
183
|
+
flex: 1,
|
|
184
|
+
zIndex: 1,
|
|
185
|
+
flexDirection: 'row',
|
|
186
|
+
padding: 1,
|
|
187
|
+
},
|
|
188
|
+
profilecard_left: {
|
|
189
|
+
width: '5%',
|
|
190
|
+
backgroundColor: 'yellow',
|
|
191
|
+
// width: orientation.portrait ? width * 0.35 : width * 0.30,
|
|
192
|
+
},
|
|
193
|
+
profilecard_right: {
|
|
194
|
+
flex: 1, justifyContent: 'flex-start', paddingLeft: 10, paddingTop: 0,
|
|
195
|
+
// alignItems: 'center',
|
|
196
|
+
},
|
|
197
|
+
profilecard_end_view: {
|
|
198
|
+
width: '25%',
|
|
199
|
+
alignItems: 'flex-end',
|
|
200
|
+
// alignItems: 'center', justifyContent: 'center',
|
|
201
|
+
borderRadius: 10,
|
|
202
|
+
},
|
|
203
|
+
profilecard_end_child_view: {
|
|
204
|
+
height: 75,
|
|
205
|
+
justifyContent: 'space-around', width: '100%', alignItems: 'center',
|
|
206
|
+
},
|
|
207
|
+
profilecard_end_button: {
|
|
208
|
+
width: Dimensions.get('screen').width * 0.3,
|
|
209
|
+
height: Dimensions.get('screen').height * 0.04,
|
|
210
|
+
marginTop: 10,
|
|
211
|
+
alignItems: 'center',
|
|
212
|
+
justifyContent: 'center',
|
|
213
|
+
},
|
|
214
|
+
profilecard_end_button_icon: {
|
|
215
|
+
width: '100%', height: '100%', resizeMode: 'contain',
|
|
216
|
+
},
|
|
217
|
+
profilecard_content_left: {
|
|
218
|
+
justifyContent: 'space-around', alignItems: 'center',
|
|
219
|
+
},
|
|
220
|
+
profilecard_content_right: {
|
|
221
|
+
width: '90%',
|
|
222
|
+
justifyContent: 'flex-end', alignItems: 'center',
|
|
223
|
+
},
|
|
224
|
+
profilecard_image: {
|
|
225
|
+
height: normalize(50), width: '100%', resizeMode: 'contain',
|
|
226
|
+
|
|
227
|
+
},
|
|
228
|
+
profilecard_profilecontent_heading1: {
|
|
229
|
+
fontSize: normalize(13),
|
|
230
|
+
fontWeight: 'normal',
|
|
231
|
+
color: colors.color_profilecard_heading1,
|
|
232
|
+
|
|
233
|
+
},
|
|
234
|
+
profilecard_profilecontent_heading2: {
|
|
235
|
+
fontSize: normalize(17),
|
|
236
|
+
fontWeight: 'bold',
|
|
237
|
+
color: colors.color_profilecard_heading2,
|
|
238
|
+
|
|
239
|
+
},
|
|
240
|
+
profilecard_onlinestatus_badgecontainer: {
|
|
241
|
+
position: 'absolute',
|
|
242
|
+
top: normalize(5),
|
|
243
|
+
right: normalize(8),
|
|
244
|
+
},
|
|
245
|
+
profilecard_subheading_container: {
|
|
246
|
+
flexDirection: 'row',
|
|
247
|
+
justifyContent: 'space-between',
|
|
248
|
+
width: '98%',
|
|
249
|
+
|
|
250
|
+
},
|
|
251
|
+
profilecard_subheading_left_container: {
|
|
252
|
+
width: '50%',
|
|
253
|
+
justifyContent: 'flex-end', alignItems: 'flex-end',
|
|
254
|
+
|
|
255
|
+
},
|
|
256
|
+
profilecard_subheading_right_container: {
|
|
257
|
+
// width: orientation.portrait ? width * 0.28 : width * 0.27,
|
|
258
|
+
width: '49%',
|
|
259
|
+
paddingLeft: '1%',
|
|
260
|
+
|
|
261
|
+
},
|
|
262
|
+
profilecard_hiddenitem_container: {
|
|
263
|
+
flexDirection: 'row',
|
|
264
|
+
width: '100%',
|
|
265
|
+
height: normalize(60),
|
|
266
|
+
marginVertical: normalize(2),
|
|
267
|
+
alignItems:'center',
|
|
268
|
+
justifyContent: 'space-evenly',
|
|
269
|
+
},
|
|
270
|
+
profilecard_hiddenitem_Child_container: {
|
|
271
|
+
width: '70%',
|
|
272
|
+
backgroundColor: '#fff',
|
|
273
|
+
borderRadius: 10,
|
|
274
|
+
},
|
|
275
|
+
profilecard_hiddenitem_inner_container: {
|
|
276
|
+
width: '100%',
|
|
277
|
+
},
|
|
278
|
+
profilecard_hiddenitem_left_displaytext: {
|
|
279
|
+
marginTop: 1, marginLeft: 5,
|
|
280
|
+
textAlign: 'left', fontSize: normalize(8),
|
|
281
|
+
fontWeight: 'bold',
|
|
282
|
+
color: '#606266',
|
|
283
|
+
},
|
|
284
|
+
profilecard_hiddenitem_left_displayvalue: {
|
|
285
|
+
marginTop: 1, marginLeft: 12,
|
|
286
|
+
textAlign: 'left', fontSize: normalize(10),
|
|
287
|
+
fontWeight: 'bold',
|
|
288
|
+
color: '#0C4F60',
|
|
289
|
+
},
|
|
290
|
+
profilecard_hiddenitem_right_displaytext: {
|
|
291
|
+
marginTop: 0, marginRight: 5,
|
|
292
|
+
textAlign: 'right', fontSize: normalize(8),
|
|
293
|
+
fontWeight: 'bold',
|
|
294
|
+
color: '#606266',
|
|
295
|
+
},
|
|
296
|
+
profilecard_hiddenitem_right_displayvalue: {
|
|
297
|
+
marginTop: 1, marginRight: 12, textAlign: 'right', fontSize: normalize(10),
|
|
298
|
+
fontWeight: 'bold',
|
|
299
|
+
color: '#0C4F60',
|
|
300
|
+
},
|
|
301
|
+
doctorText: {
|
|
302
|
+
fontSize: normalize(16),
|
|
303
|
+
fontWeight: 'bold',
|
|
304
|
+
},
|
|
305
|
+
|
|
306
|
+
input_Text: {
|
|
307
|
+
fontSize: normalize(14),
|
|
308
|
+
color: colors.color_componentText,
|
|
309
|
+
},
|
|
310
|
+
select_TextStyle: {
|
|
311
|
+
alignContent: 'center',
|
|
312
|
+
margin: Dimensions.get('window').height * 0.004,
|
|
313
|
+
alignItems: 'center',
|
|
314
|
+
textAlign: 'left',
|
|
315
|
+
fontSize: normalize(14),
|
|
316
|
+
},
|
|
317
|
+
buttonStyle: {
|
|
318
|
+
flexDirection: 'row',
|
|
319
|
+
alignItems: 'center',
|
|
320
|
+
justifyContent: 'space-between',
|
|
321
|
+
borderRadius: 10,
|
|
322
|
+
},
|
|
323
|
+
buttonText: {
|
|
324
|
+
fontSize: normalize(20),
|
|
325
|
+
color: colors.color_buttonText,
|
|
326
|
+
},
|
|
327
|
+
label_underIcon: {
|
|
328
|
+
fontSize: normalize(6),
|
|
329
|
+
},
|
|
330
|
+
item_TitleLabel: {
|
|
331
|
+
fontSize: normalize(10),
|
|
332
|
+
color: colors.color_dark_grey,
|
|
333
|
+
// fontWeight:fontWeight.fontWeight_600
|
|
334
|
+
// padding:5,
|
|
335
|
+
// paddingBottom:0,
|
|
336
|
+
},
|
|
337
|
+
item_DOB: {
|
|
338
|
+
fontSize: normalize(10),
|
|
339
|
+
fontWeight: 'bold',
|
|
340
|
+
// color: colors.color_dark_grey,
|
|
341
|
+
// fontWeight:fontWeight.fontWeight_600
|
|
342
|
+
// padding:5,
|
|
343
|
+
// paddingBottom:0,
|
|
344
|
+
},
|
|
345
|
+
view_Display_Text: {
|
|
346
|
+
// justifyContent: 'center',
|
|
347
|
+
width: '100%',
|
|
348
|
+
// paddingLeft: Dimensions.get("window").width * 0.005
|
|
349
|
+
},
|
|
350
|
+
|
|
351
|
+
radioContainer: {
|
|
352
|
+
flexGrow: 1,
|
|
353
|
+
flexDirection: 'row',
|
|
354
|
+
width:'20%',
|
|
355
|
+
// padding: 10
|
|
356
|
+
// paddingRight:20,
|
|
357
|
+
paddingVertical: 5,
|
|
358
|
+
},
|
|
359
|
+
outerRadioButton: {
|
|
360
|
+
alignItems: 'center',
|
|
361
|
+
justifyContent: 'center',
|
|
362
|
+
height: radio_height,
|
|
363
|
+
width: radio_height,
|
|
364
|
+
borderRadius: radio_height / 2,
|
|
365
|
+
borderWidth: 1,
|
|
366
|
+
},
|
|
367
|
+
radioButtonText: {
|
|
368
|
+
fontSize: normalize(11),
|
|
369
|
+
},
|
|
370
|
+
innerRadioButton: {
|
|
371
|
+
height: radio_height / 1.3,
|
|
372
|
+
width: radio_height / 1.3,
|
|
373
|
+
borderRadius: radio_height / 2,
|
|
374
|
+
backgroundColor: 'darkblue',
|
|
375
|
+
},
|
|
376
|
+
|
|
377
|
+
//alignment//
|
|
378
|
+
View_row_center: {
|
|
379
|
+
justifyContent: 'center',
|
|
380
|
+
alignContent: 'center',
|
|
381
|
+
alignItems: 'center',
|
|
382
|
+
flexDirection: 'row',
|
|
383
|
+
},
|
|
384
|
+
View_row_flexstart: {
|
|
385
|
+
flexDirection: 'row',
|
|
386
|
+
justifyContent: 'flex-start',
|
|
387
|
+
alignContent: 'flex-start',
|
|
388
|
+
alignItems: 'flex-start',
|
|
389
|
+
},
|
|
390
|
+
View_row_flexend: {
|
|
391
|
+
flexDirection: 'row',
|
|
392
|
+
justifyContent: 'flex-end',
|
|
393
|
+
alignContent: 'flex-end',
|
|
394
|
+
alignItems: 'flex-end',
|
|
395
|
+
},
|
|
396
|
+
View_row_spacearound: {
|
|
397
|
+
flexDirection: 'row',
|
|
398
|
+
justifyContent: 'space-around',
|
|
399
|
+
alignContent: 'center',
|
|
400
|
+
alignItems: 'center',
|
|
401
|
+
},
|
|
402
|
+
View_col_spacearound: {
|
|
403
|
+
flexDirection: 'column',
|
|
404
|
+
justifyContent: 'space-around',
|
|
405
|
+
alignContent: 'center',
|
|
406
|
+
alignItems: 'center',
|
|
407
|
+
},
|
|
408
|
+
View_col_center: {
|
|
409
|
+
justifyContent: 'center',
|
|
410
|
+
alignContent: 'center',
|
|
411
|
+
alignItems: 'center',
|
|
412
|
+
flexDirection: 'column',
|
|
413
|
+
},
|
|
414
|
+
View_col_flexstart: {
|
|
415
|
+
flexDirection: 'column',
|
|
416
|
+
justifyContent: 'flex-start',
|
|
417
|
+
alignContent: 'flex-start',
|
|
418
|
+
alignItems: 'flex-start',
|
|
419
|
+
},
|
|
420
|
+
View_col_flexend: {
|
|
421
|
+
flexDirection: 'column',
|
|
422
|
+
justifyContent: 'flex-end',
|
|
423
|
+
alignContent: 'flex-end',
|
|
424
|
+
alignItems: 'flex-end',
|
|
425
|
+
},
|
|
426
|
+
|
|
427
|
+
//alignment ends here//
|
|
428
|
+
mediaoverlay_containerstyle: {
|
|
429
|
+
position: 'absolute',
|
|
430
|
+
left: 0,
|
|
431
|
+
right: 0,
|
|
432
|
+
elevation: 999,
|
|
433
|
+
alignItems: 'center',
|
|
434
|
+
zIndex: 10000,
|
|
435
|
+
// backgroundColor:'rgba(0,0,0,0)',
|
|
436
|
+
backgroundColor: 'rgba(0, 0, 0, 0.50)',
|
|
437
|
+
justifyContent: 'flex-end',
|
|
438
|
+
// height:Dimensions.get("window").height ,
|
|
439
|
+
flex: 1,
|
|
440
|
+
},
|
|
441
|
+
mediaoverlay_childrenwrapperstyle: {
|
|
442
|
+
// width:Dimensions.get("window").width,
|
|
443
|
+
// backgroundColor:'red',
|
|
444
|
+
borderTopLeftRadius: 20,
|
|
445
|
+
borderTopRightRadius: 20,
|
|
446
|
+
// height:Dimensions.get("window").height*0.30,
|
|
447
|
+
// padding:Dimensions.get("window").height*0.01,
|
|
448
|
+
marginBottom: 0,
|
|
449
|
+
},
|
|
450
|
+
mediaoverlay_topline: {
|
|
451
|
+
height: Dimensions.get('window').height * 0.003,
|
|
452
|
+
backgroundColor: colors.color_button,
|
|
453
|
+
width: Dimensions.get('window').width * 0.10,
|
|
454
|
+
},
|
|
455
|
+
mediaoverlay_icon: {
|
|
456
|
+
width: 35, height: 35, justifyContent: 'center', resizeMode: 'contain',
|
|
457
|
+
},
|
|
458
|
+
popup_containerStyle: {
|
|
459
|
+
backgroundColor: 'rgba(0, 0, 0, 0.65)',
|
|
460
|
+
},
|
|
461
|
+
popup_heading: {
|
|
462
|
+
fontSize: normalize(12),
|
|
463
|
+
fontWeight: 'bold',
|
|
464
|
+
paddingLeft: Dimensions.get('window').width * 0.02,
|
|
465
|
+
color: colors.color_PopupHeadingText,
|
|
466
|
+
},
|
|
467
|
+
mediaoverlay_iconundertext: {
|
|
468
|
+
fontSize: normalize(8),
|
|
469
|
+
},
|
|
470
|
+
alertHttpstatusText: {
|
|
471
|
+
fontSize: normalize(12),
|
|
472
|
+
color: colors.color_dark_grey,
|
|
473
|
+
fontWeight: fontWeight.fontWeight_Bold,
|
|
474
|
+
},
|
|
475
|
+
alertCaptionText: {
|
|
476
|
+
marginTop: 5,
|
|
477
|
+
fontWeight: 'bold',
|
|
478
|
+
fontSize: normalize(15),
|
|
479
|
+
color: colors.color_alertCaptionText,
|
|
480
|
+
},
|
|
481
|
+
alertMessageText: {
|
|
482
|
+
fontSize: normalize(12),
|
|
483
|
+
color: colors.color_dark_grey,
|
|
484
|
+
fontWeight: fontWeight.fontWeight_Bold,
|
|
485
|
+
textAlign: 'justify',
|
|
486
|
+
},
|
|
487
|
+
alertContentText: {
|
|
488
|
+
fontSize: normalize(10),
|
|
489
|
+
color: 'red',
|
|
490
|
+
fontWeight: 'bold',
|
|
491
|
+
textAlign: 'center',
|
|
492
|
+
textAlign: 'justify',
|
|
493
|
+
},
|
|
494
|
+
errorMoreButton: {
|
|
495
|
+
fontSize: normalize(10),
|
|
496
|
+
color: colors.color_errorMoreButton,
|
|
497
|
+
fontWeight: 'bold',
|
|
498
|
+
textAlign: 'center',
|
|
499
|
+
},
|
|
500
|
+
|
|
501
|
+
searchTextbox_View: {
|
|
502
|
+
flexDirection: 'row',
|
|
503
|
+
borderWidth: 0,
|
|
504
|
+
borderColor: colors.color_componentBordercolor,
|
|
505
|
+
justifyContent: 'flex-start',
|
|
506
|
+
alignItems: 'flex-start',
|
|
507
|
+
borderRadius: 7,
|
|
508
|
+
// margin: Dimensions.get("window").height * 0.002,
|
|
509
|
+
marginBottom: Dimensions.get('window').height * 0.003,
|
|
510
|
+
height: 35,
|
|
511
|
+
// width:'100%',
|
|
512
|
+
backgroundColor: '#f1f3f6',
|
|
513
|
+
// backgroundColor:colors.color_componentBgcolor,
|
|
514
|
+
marginTop: 0,padding:5,
|
|
515
|
+
},
|
|
516
|
+
searchTextbox: {
|
|
517
|
+
color: 'black',
|
|
518
|
+
width: '100%', marginLeft: '1%', marginRight: '1%',
|
|
519
|
+
fontWeight:'bold',
|
|
520
|
+
fontSize: normalize(18),
|
|
521
|
+
textAlign: 'justify',
|
|
522
|
+
padding: 0, height: '100%', marginBottom: -(Dimensions.get('window').height * 0.003),
|
|
523
|
+
},
|
|
524
|
+
searchIcon: {
|
|
525
|
+
width: 20, height: 20, margin: 5, resizeMode: 'contain',
|
|
526
|
+
},
|
|
527
|
+
searchButton: {
|
|
528
|
+
height: 35,
|
|
529
|
+
width: '20%',
|
|
530
|
+
borderRadius: 7,
|
|
531
|
+
justifyContent: 'center',
|
|
532
|
+
alignItems: 'center',
|
|
533
|
+
alignContent: 'center',
|
|
534
|
+
},
|
|
535
|
+
searchButtonText: {
|
|
536
|
+
fontSize: normalize(10),
|
|
537
|
+
fontWeight: 'bold',
|
|
538
|
+
color: colors.color_buttonText,
|
|
539
|
+
padding: 1,
|
|
540
|
+
},
|
|
541
|
+
errorMsgText: {
|
|
542
|
+
color: colors.color_error_msg_Text,
|
|
543
|
+
},
|
|
544
|
+
});
|
|
545
|
+
export default ComponentStyles;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Modal,
|
|
5
|
+
TouchableWithoutFeedback,
|
|
6
|
+
StyleSheet,
|
|
7
|
+
ScrollView,
|
|
8
|
+
SafeAreaView,
|
|
9
|
+
Dimensions,
|
|
10
|
+
ViewStyle,
|
|
11
|
+
StyleProp,
|
|
12
|
+
} from 'react-native';
|
|
13
|
+
|
|
14
|
+
const { height: SCREEN_HEIGHT } = Dimensions.get('window');
|
|
15
|
+
|
|
16
|
+
interface CModalOverlayProps {
|
|
17
|
+
visible: boolean;
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
|
|
21
|
+
closeOnTouchOutside?: boolean;
|
|
22
|
+
|
|
23
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
24
|
+
childrenWrapperStyle?: StyleProp<ViewStyle>;
|
|
25
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
26
|
+
footerStyle?: StyleProp<ViewStyle>;
|
|
27
|
+
|
|
28
|
+
footer?: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const CModalOverlay: React.FC<CModalOverlayProps> = ({
|
|
32
|
+
visible,
|
|
33
|
+
onClose,
|
|
34
|
+
children,
|
|
35
|
+
closeOnTouchOutside = true,
|
|
36
|
+
containerStyle,
|
|
37
|
+
childrenWrapperStyle,
|
|
38
|
+
contentStyle,
|
|
39
|
+
footer,
|
|
40
|
+
footerStyle,
|
|
41
|
+
}) => {
|
|
42
|
+
if (!visible) return null;
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<Modal visible={visible} transparent statusBarTranslucent>
|
|
46
|
+
<SafeAreaView style={styles.safeArea}>
|
|
47
|
+
<View style={[styles.container, containerStyle]}>
|
|
48
|
+
{/* Background */}
|
|
49
|
+
<TouchableWithoutFeedback
|
|
50
|
+
disabled={!closeOnTouchOutside}
|
|
51
|
+
onPress={onClose}
|
|
52
|
+
>
|
|
53
|
+
<View style={styles.overlayBackground} />
|
|
54
|
+
</TouchableWithoutFeedback>
|
|
55
|
+
|
|
56
|
+
{/* Modal Content */}
|
|
57
|
+
<View style={[styles.childrenWrapper, childrenWrapperStyle]}>
|
|
58
|
+
<ScrollView
|
|
59
|
+
bounces={false}
|
|
60
|
+
showsVerticalScrollIndicator={false}
|
|
61
|
+
contentContainerStyle={[styles.content, contentStyle]}
|
|
62
|
+
>
|
|
63
|
+
{children}
|
|
64
|
+
</ScrollView>
|
|
65
|
+
|
|
66
|
+
{footer && <View style={footerStyle}>{footer}</View>}
|
|
67
|
+
</View>
|
|
68
|
+
</View>
|
|
69
|
+
</SafeAreaView>
|
|
70
|
+
</Modal>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const styles = StyleSheet.create({
|
|
75
|
+
overlayBackground: {
|
|
76
|
+
...StyleSheet.absoluteFillObject,
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
safeArea: {
|
|
80
|
+
flex: 1,
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
container: {
|
|
84
|
+
flex: 1,
|
|
85
|
+
justifyContent: 'center',
|
|
86
|
+
alignItems: 'center',
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
childrenWrapper: {
|
|
90
|
+
backgroundColor: '#fff',
|
|
91
|
+
borderRadius: 0,
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
content: {
|
|
95
|
+
flexGrow: 1,
|
|
96
|
+
maxHeight: SCREEN_HEIGHT,
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export default CModalOverlay;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFocusEffect } from '@react-navigation/native';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFocusEffect } from './PageNavigation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useIsFocused } from '@react-navigation/native';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useIsFocused } from './PageNavigation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useIsFocused } from './PageNavigation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useNavigation } from '@react-navigation/native';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useNavigation } from './PageNavigation';
|