dhre-ui-kit 0.0.117 → 0.0.119
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/lib/index.d.ts +11 -2
- package/lib/index.js +34 -30
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +203 -199
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React__default, { createContext, useContext, useState, useEffect, useRef, memo, useCallback } from 'react';
|
|
1
|
+
import React, { createContext, useContext, useState, useEffect, useRef, memo, useCallback } from 'react';
|
|
3
2
|
import { useSelector } from 'react-redux';
|
|
4
3
|
import { Dimensions, Text, StyleSheet, Pressable, View, Modal, KeyboardAvoidingView, Platform, TextInput, ScrollView, Animated, FlatList, ActivityIndicator, TouchableOpacity, Alert, Linking, PanResponder } from 'react-native';
|
|
5
4
|
import { PanGestureHandler, GestureHandlerRootView, Swipeable } from 'react-native-gesture-handler';
|
|
@@ -250,7 +249,7 @@ const ThemeProvider = ({ children }) => {
|
|
|
250
249
|
acc[key] = theme[key][mode];
|
|
251
250
|
return acc;
|
|
252
251
|
}, {});
|
|
253
|
-
return /* @__PURE__ */
|
|
252
|
+
return /* @__PURE__ */ React.createElement(ThemeContext.Provider, { value: { theme: filteredTheme } }, children);
|
|
254
253
|
};
|
|
255
254
|
const useTheme = () => {
|
|
256
255
|
const context = useContext(ThemeContext);
|
|
@@ -261,7 +260,7 @@ const useTheme = () => {
|
|
|
261
260
|
};
|
|
262
261
|
|
|
263
262
|
const withThemeProvider = (Component) => {
|
|
264
|
-
return (props) => /* @__PURE__ */
|
|
263
|
+
return (props) => /* @__PURE__ */ React.createElement(ThemeProvider, null, /* @__PURE__ */ React.createElement(Component, { ...props }));
|
|
265
264
|
};
|
|
266
265
|
|
|
267
266
|
const { width: width$1, height } = Dimensions.get("window");
|
|
@@ -325,7 +324,7 @@ const CustomTypography = ({
|
|
|
325
324
|
...props
|
|
326
325
|
}) => {
|
|
327
326
|
const textStyle = FONT_STYLES[variant];
|
|
328
|
-
return /* @__PURE__ */
|
|
327
|
+
return /* @__PURE__ */ React.createElement(Text, { testID, style: [textStyle, style], ...props }, text);
|
|
329
328
|
};
|
|
330
329
|
|
|
331
330
|
const CustomText = ({
|
|
@@ -336,7 +335,7 @@ const CustomText = ({
|
|
|
336
335
|
...props
|
|
337
336
|
}) => {
|
|
338
337
|
const { theme } = useTheme();
|
|
339
|
-
return /* @__PURE__ */
|
|
338
|
+
return /* @__PURE__ */ React.createElement(
|
|
340
339
|
CustomTypography,
|
|
341
340
|
{
|
|
342
341
|
variant,
|
|
@@ -559,15 +558,15 @@ const Badge = ({
|
|
|
559
558
|
iconStyle,
|
|
560
559
|
handleIconPress
|
|
561
560
|
}) => {
|
|
562
|
-
return /* @__PURE__ */
|
|
561
|
+
return /* @__PURE__ */ React.createElement(
|
|
563
562
|
Pressable,
|
|
564
563
|
{
|
|
565
564
|
style: [styles$C.badge, commonStyles.centerRow, style],
|
|
566
565
|
testID: "BADGE",
|
|
567
566
|
onPress: handleIconPress
|
|
568
567
|
},
|
|
569
|
-
iconName && /* @__PURE__ */
|
|
570
|
-
text && /* @__PURE__ */
|
|
568
|
+
iconName && /* @__PURE__ */ React.createElement(View, { style: [styles$C.icon, iconStyle] }, React.cloneElement(iconName)),
|
|
569
|
+
text && /* @__PURE__ */ React.createElement(
|
|
571
570
|
CustomTypography,
|
|
572
571
|
{
|
|
573
572
|
variant: "B3semiBold",
|
|
@@ -644,7 +643,7 @@ const BottomDrawer = ({
|
|
|
644
643
|
toggleModal();
|
|
645
644
|
}
|
|
646
645
|
};
|
|
647
|
-
return /* @__PURE__ */
|
|
646
|
+
return /* @__PURE__ */ React.createElement(
|
|
648
647
|
Modal,
|
|
649
648
|
{
|
|
650
649
|
animationType: "slide",
|
|
@@ -652,32 +651,32 @@ const BottomDrawer = ({
|
|
|
652
651
|
visible: isModalVisible,
|
|
653
652
|
onRequestClose: toggleModal
|
|
654
653
|
},
|
|
655
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ React.createElement(PanGestureHandler, { onGestureEvent: onSwipDown }, /* @__PURE__ */ React.createElement(
|
|
656
655
|
KeyboardAvoidingView,
|
|
657
656
|
{
|
|
658
657
|
behavior: Platform.OS === "ios" ? "padding" : "height",
|
|
659
658
|
style: { flex: 1 }
|
|
660
659
|
},
|
|
661
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ React.createElement(View, { style: [styles$B.mainContainer, style], testID }, showBlurView ? /* @__PURE__ */ React.createElement(
|
|
662
661
|
BlurView,
|
|
663
662
|
{
|
|
664
663
|
style: [styles$B.blurView, blurViewStyle],
|
|
665
664
|
blurType: "light",
|
|
666
665
|
blurAmount
|
|
667
666
|
}
|
|
668
|
-
) : null, /* @__PURE__ */
|
|
667
|
+
) : null, /* @__PURE__ */ React.createElement(View, { style: [styles$B.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(View, { style: styles$B.separator }), /* @__PURE__ */ React.createElement(View, { style: styles$B.headerContainer }, showLeftIcon && leftIcon ? React.cloneElement(leftIcon, {
|
|
669
668
|
width: moderateScale(24),
|
|
670
669
|
height: moderateScale(24),
|
|
671
670
|
style: styles$B.leftIconStyle,
|
|
672
671
|
onPress: onLeftIconPress
|
|
673
|
-
}) : null, /* @__PURE__ */
|
|
672
|
+
}) : null, /* @__PURE__ */ React.createElement(
|
|
674
673
|
CustomTypography,
|
|
675
674
|
{
|
|
676
675
|
variant: titleVariant,
|
|
677
676
|
text: title,
|
|
678
677
|
style: { ...styles$B.title, ...titleStyle }
|
|
679
678
|
}
|
|
680
|
-
), showRightIcon && rightIcon ?
|
|
679
|
+
), showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
681
680
|
width: moderateScale(24),
|
|
682
681
|
height: moderateScale(24),
|
|
683
682
|
style: styles$B.rightIconStyle,
|
|
@@ -704,7 +703,7 @@ const CustomButton = ({
|
|
|
704
703
|
disableButtonTitleColor
|
|
705
704
|
}) => {
|
|
706
705
|
const { theme } = useTheme();
|
|
707
|
-
return /* @__PURE__ */
|
|
706
|
+
return /* @__PURE__ */ React.createElement(
|
|
708
707
|
Pressable,
|
|
709
708
|
{
|
|
710
709
|
testID,
|
|
@@ -718,8 +717,8 @@ const CustomButton = ({
|
|
|
718
717
|
onPress,
|
|
719
718
|
disabled
|
|
720
719
|
},
|
|
721
|
-
imagePosition === "left" && leftIcon && /* @__PURE__ */
|
|
722
|
-
/* @__PURE__ */
|
|
720
|
+
imagePosition === "left" && leftIcon && /* @__PURE__ */ React.createElement(View, { style: iconStyle }, React.cloneElement(leftIcon, { width: 20, height: 20 })),
|
|
721
|
+
/* @__PURE__ */ React.createElement(
|
|
723
722
|
CustomText$1,
|
|
724
723
|
{
|
|
725
724
|
text: title,
|
|
@@ -733,7 +732,7 @@ const CustomButton = ({
|
|
|
733
732
|
textColor: titleColor
|
|
734
733
|
}
|
|
735
734
|
),
|
|
736
|
-
imagePosition === "right" && rightIcon && /* @__PURE__ */
|
|
735
|
+
imagePosition === "right" && rightIcon && /* @__PURE__ */ React.createElement(View, { style: iconStyle }, React.cloneElement(rightIcon, { width: 20, height: 20 }))
|
|
737
736
|
);
|
|
738
737
|
};
|
|
739
738
|
const styles$A = StyleSheet.create({
|
|
@@ -813,42 +812,42 @@ const Cards = ({
|
|
|
813
812
|
testID,
|
|
814
813
|
onButtonPress
|
|
815
814
|
}) => {
|
|
816
|
-
return /* @__PURE__ */
|
|
815
|
+
return /* @__PURE__ */ React.createElement(View, { testID, style: styles$z.container }, topLeftTitle ? /* @__PURE__ */ React.createElement(View, { style: styles$z.topLeft }, /* @__PURE__ */ React.createElement(
|
|
817
816
|
CustomTypography,
|
|
818
817
|
{
|
|
819
818
|
variant: "P2regular",
|
|
820
819
|
style: styles$z.title,
|
|
821
820
|
text: topLeftTitle
|
|
822
821
|
}
|
|
823
|
-
)) : null, title ? /* @__PURE__ */
|
|
822
|
+
)) : null, title ? /* @__PURE__ */ React.createElement(
|
|
824
823
|
CustomTypography,
|
|
825
824
|
{
|
|
826
825
|
variant: "H6bold",
|
|
827
826
|
style: styles$z.subTitleBelow,
|
|
828
827
|
text: title
|
|
829
828
|
}
|
|
830
|
-
) : null, subtitle ? /* @__PURE__ */
|
|
829
|
+
) : null, subtitle ? /* @__PURE__ */ React.createElement(
|
|
831
830
|
CustomTypography,
|
|
832
831
|
{
|
|
833
832
|
variant: "P3regular",
|
|
834
833
|
style: styles$z.subtitle,
|
|
835
834
|
text: subtitle
|
|
836
835
|
}
|
|
837
|
-
) : null, /* @__PURE__ */
|
|
836
|
+
) : null, /* @__PURE__ */ React.createElement(View, { style: styles$z.leftBottomView }, iconSource ? iconSource : null, iconTitle ? /* @__PURE__ */ React.createElement(
|
|
838
837
|
CustomTypography,
|
|
839
838
|
{
|
|
840
839
|
variant: "P3regular",
|
|
841
840
|
style: styles$z.subTitleLeftBelow,
|
|
842
841
|
text: iconTitle
|
|
843
842
|
}
|
|
844
|
-
) : null), buttonShown ? /* @__PURE__ */
|
|
843
|
+
) : null), buttonShown ? /* @__PURE__ */ React.createElement(
|
|
845
844
|
Pressable,
|
|
846
845
|
{
|
|
847
846
|
testID: "Button-Press",
|
|
848
847
|
style: styles$z.button,
|
|
849
848
|
onPress: onButtonPress
|
|
850
849
|
},
|
|
851
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ React.createElement(
|
|
852
851
|
CustomTypography,
|
|
853
852
|
{
|
|
854
853
|
variant: "B2semiBold",
|
|
@@ -909,7 +908,7 @@ const Checkbox = ({
|
|
|
909
908
|
setChecked(!checked);
|
|
910
909
|
onCheck && onCheck(!checked);
|
|
911
910
|
};
|
|
912
|
-
return /* @__PURE__ */
|
|
911
|
+
return /* @__PURE__ */ React.createElement(View, { testID, style: containerStyle }, /* @__PURE__ */ React.createElement(
|
|
913
912
|
Pressable,
|
|
914
913
|
{
|
|
915
914
|
testID: "Checkbox-Press",
|
|
@@ -917,8 +916,8 @@ const Checkbox = ({
|
|
|
917
916
|
disabled: disable,
|
|
918
917
|
style: styles$y.directionStyle
|
|
919
918
|
},
|
|
920
|
-
/* @__PURE__ */
|
|
921
|
-
/* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$y.checkboxContainer }, React.cloneElement(checked ? checkedIcon : uncheckedIcon)),
|
|
920
|
+
/* @__PURE__ */ React.createElement(
|
|
922
921
|
CustomTypography,
|
|
923
922
|
{
|
|
924
923
|
variant: titleVariant,
|
|
@@ -979,26 +978,26 @@ const CustomDropdown$1 = ({
|
|
|
979
978
|
downArrowIcon
|
|
980
979
|
}) => {
|
|
981
980
|
const [showOptions, setShowOptions] = useState(false);
|
|
982
|
-
return /* @__PURE__ */
|
|
981
|
+
return /* @__PURE__ */ React.createElement(View, { testID: testId }, /* @__PURE__ */ React.createElement(
|
|
983
982
|
CustomTypography,
|
|
984
983
|
{
|
|
985
984
|
variant: "P3regular",
|
|
986
985
|
style: styles$x.labelStyle,
|
|
987
986
|
text: label
|
|
988
987
|
}
|
|
989
|
-
), /* @__PURE__ */
|
|
988
|
+
), /* @__PURE__ */ React.createElement(
|
|
990
989
|
Pressable,
|
|
991
990
|
{
|
|
992
991
|
testID: `${testId}-BTN`,
|
|
993
992
|
style: styles$x.dropDownStyle,
|
|
994
993
|
onPress: () => setShowOptions(!showOptions)
|
|
995
994
|
},
|
|
996
|
-
iconName && /* @__PURE__ */
|
|
995
|
+
iconName && /* @__PURE__ */ React.createElement(View, { style: iconStyle }, React.cloneElement(iconName, {
|
|
997
996
|
width: moderateScale(24),
|
|
998
997
|
height: moderateScale(24),
|
|
999
998
|
style: styles$x.iconStyle
|
|
1000
999
|
})),
|
|
1001
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ React.createElement(
|
|
1002
1001
|
CustomTypography,
|
|
1003
1002
|
{
|
|
1004
1003
|
variant: "P3regular",
|
|
@@ -1006,14 +1005,14 @@ const CustomDropdown$1 = ({
|
|
|
1006
1005
|
text: selectedValue ? selectedValue.label : placeholder
|
|
1007
1006
|
}
|
|
1008
1007
|
),
|
|
1009
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ React.createElement(View, null, showOptions ? React.cloneElement(upArrowIcon, {
|
|
1010
1009
|
width: moderateScale(24),
|
|
1011
1010
|
height: moderateScale(24)
|
|
1012
|
-
}) :
|
|
1011
|
+
}) : React.cloneElement(downArrowIcon, {
|
|
1013
1012
|
width: moderateScale(24),
|
|
1014
1013
|
height: moderateScale(24)
|
|
1015
1014
|
}))
|
|
1016
|
-
), showOptions && /* @__PURE__ */
|
|
1015
|
+
), showOptions && /* @__PURE__ */ React.createElement(View, { style: styles$x.optionContainer }, options?.map(({ id, value, label: label2 }) => /* @__PURE__ */ React.createElement(
|
|
1017
1016
|
Pressable,
|
|
1018
1017
|
{
|
|
1019
1018
|
key: id,
|
|
@@ -1029,12 +1028,12 @@ const CustomDropdown$1 = ({
|
|
|
1029
1028
|
}
|
|
1030
1029
|
]
|
|
1031
1030
|
},
|
|
1032
|
-
iconName && /* @__PURE__ */
|
|
1031
|
+
iconName && /* @__PURE__ */ React.createElement(View, { style: iconStyle }, React.cloneElement(iconName, {
|
|
1033
1032
|
width: moderateScale(24),
|
|
1034
1033
|
height: moderateScale(24),
|
|
1035
1034
|
style: styles$x.iconStyle
|
|
1036
1035
|
})),
|
|
1037
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ React.createElement(
|
|
1038
1037
|
CustomTypography,
|
|
1039
1038
|
{
|
|
1040
1039
|
variant: "P3regular",
|
|
@@ -1125,14 +1124,14 @@ const CustomTextInput = ({
|
|
|
1125
1124
|
};
|
|
1126
1125
|
const handleIconPress1 = () => setValue("");
|
|
1127
1126
|
const handleIconPress2 = () => setIsSecureTextEntry(!isSecureTextEntry);
|
|
1128
|
-
return /* @__PURE__ */
|
|
1127
|
+
return /* @__PURE__ */ React.createElement(View, { testID }, /* @__PURE__ */ React.createElement(
|
|
1129
1128
|
CustomTypography,
|
|
1130
1129
|
{
|
|
1131
1130
|
variant: "P3medium",
|
|
1132
1131
|
style: [styles$w.labelStyle, disabled && styles$w.disableTextStyle],
|
|
1133
1132
|
text: label
|
|
1134
1133
|
}
|
|
1135
|
-
), /* @__PURE__ */
|
|
1134
|
+
), /* @__PURE__ */ React.createElement(
|
|
1136
1135
|
View,
|
|
1137
1136
|
{
|
|
1138
1137
|
style: [
|
|
@@ -1147,12 +1146,12 @@ const CustomTextInput = ({
|
|
|
1147
1146
|
}
|
|
1148
1147
|
]
|
|
1149
1148
|
},
|
|
1150
|
-
isSearchBar && searchIcon &&
|
|
1149
|
+
isSearchBar && searchIcon && React.cloneElement(searchIcon, {
|
|
1151
1150
|
width: moderateScale(24),
|
|
1152
1151
|
height: moderateScale(24),
|
|
1153
1152
|
style: styles$w.searchIconStyle
|
|
1154
1153
|
}),
|
|
1155
|
-
/* @__PURE__ */
|
|
1154
|
+
/* @__PURE__ */ React.createElement(
|
|
1156
1155
|
TextInput,
|
|
1157
1156
|
{
|
|
1158
1157
|
...props,
|
|
@@ -1169,15 +1168,15 @@ const CustomTextInput = ({
|
|
|
1169
1168
|
secureTextEntry: isSecureTextEntry
|
|
1170
1169
|
}
|
|
1171
1170
|
),
|
|
1172
|
-
value && !multiline && rightIcon1 &&
|
|
1171
|
+
value && !multiline && rightIcon1 && React.cloneElement(rightIcon1, {
|
|
1173
1172
|
onPress: handleIconPress1,
|
|
1174
1173
|
testID: "icon1"
|
|
1175
1174
|
}),
|
|
1176
|
-
secureTextEntry && rightIcon2 &&
|
|
1175
|
+
secureTextEntry && rightIcon2 && React.cloneElement(rightIcon2, {
|
|
1177
1176
|
onPress: handleIconPress2,
|
|
1178
1177
|
testID: "icon2"
|
|
1179
1178
|
})
|
|
1180
|
-
), (error || successMessage) && /* @__PURE__ */
|
|
1179
|
+
), (error || successMessage) && /* @__PURE__ */ React.createElement(
|
|
1181
1180
|
CustomTypography,
|
|
1182
1181
|
{
|
|
1183
1182
|
numberOfLines: 2,
|
|
@@ -1220,15 +1219,15 @@ const CustomTooltip = ({
|
|
|
1220
1219
|
iconStyle,
|
|
1221
1220
|
iconColor = DHRE_COLORS_TEXT.DH_BLACK
|
|
1222
1221
|
}) => {
|
|
1223
|
-
const defaultPopoverContent = /* @__PURE__ */
|
|
1222
|
+
const defaultPopoverContent = /* @__PURE__ */ React.createElement(View, { style: styles$v.mesageContainer, testID: testId }, /* @__PURE__ */ React.createElement(
|
|
1224
1223
|
CustomTypography,
|
|
1225
1224
|
{
|
|
1226
1225
|
variant: "P4regular",
|
|
1227
1226
|
style: styles$v.messageStyle,
|
|
1228
1227
|
text: message
|
|
1229
1228
|
}
|
|
1230
|
-
), icon && /* @__PURE__ */
|
|
1231
|
-
return /* @__PURE__ */
|
|
1229
|
+
), icon && /* @__PURE__ */ React.createElement(View, { style: iconStyle }, React.cloneElement(icon, { fill: iconColor })));
|
|
1230
|
+
return /* @__PURE__ */ React.createElement(
|
|
1232
1231
|
Tooltip,
|
|
1233
1232
|
{
|
|
1234
1233
|
containerStyle: styles$v.tooltipContainerStyle,
|
|
@@ -1287,27 +1286,27 @@ const FileUpload = ({
|
|
|
1287
1286
|
icon,
|
|
1288
1287
|
iconStyle
|
|
1289
1288
|
}) => {
|
|
1290
|
-
return /* @__PURE__ */
|
|
1289
|
+
return /* @__PURE__ */ React.createElement(
|
|
1291
1290
|
View,
|
|
1292
1291
|
{
|
|
1293
1292
|
style: [styles$u.container, containerStyle],
|
|
1294
1293
|
testID: "file-upload-container"
|
|
1295
1294
|
},
|
|
1296
|
-
/* @__PURE__ */
|
|
1295
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$u.content }, /* @__PURE__ */ React.createElement(View, { style: [uploadImageStyling], testID: "file-upload-image" }, icon && React.cloneElement(icon, { style: [iconStyle] })), /* @__PURE__ */ React.createElement(CustomTypography, { variant: "H8bold", style: styles$u.title, text: title }), /* @__PURE__ */ React.createElement(
|
|
1297
1296
|
CustomTypography,
|
|
1298
1297
|
{
|
|
1299
1298
|
variant: "P4regular",
|
|
1300
1299
|
style: styles$u.description,
|
|
1301
1300
|
text: `Drop files directly here or `
|
|
1302
1301
|
}
|
|
1303
|
-
), /* @__PURE__ */
|
|
1302
|
+
), /* @__PURE__ */ React.createElement(
|
|
1304
1303
|
CustomTypography,
|
|
1305
1304
|
{
|
|
1306
1305
|
variant: "P4regular",
|
|
1307
1306
|
style: styles$u.browse,
|
|
1308
1307
|
text: btnText
|
|
1309
1308
|
}
|
|
1310
|
-
), /* @__PURE__ */
|
|
1309
|
+
), /* @__PURE__ */ React.createElement(
|
|
1311
1310
|
CustomTypography,
|
|
1312
1311
|
{
|
|
1313
1312
|
testID: "file-upload-description",
|
|
@@ -1316,14 +1315,14 @@ const FileUpload = ({
|
|
|
1316
1315
|
text: ` from your device`
|
|
1317
1316
|
}
|
|
1318
1317
|
)),
|
|
1319
|
-
/* @__PURE__ */
|
|
1318
|
+
/* @__PURE__ */ React.createElement(
|
|
1320
1319
|
Pressable,
|
|
1321
1320
|
{
|
|
1322
1321
|
style: styles$u.button,
|
|
1323
1322
|
onPress: onUpload,
|
|
1324
1323
|
testID: "file-upload-button"
|
|
1325
1324
|
},
|
|
1326
|
-
/* @__PURE__ */
|
|
1325
|
+
/* @__PURE__ */ React.createElement(
|
|
1327
1326
|
CustomTypography,
|
|
1328
1327
|
{
|
|
1329
1328
|
variant: "B2semiBold",
|
|
@@ -1336,7 +1335,7 @@ const FileUpload = ({
|
|
|
1336
1335
|
};
|
|
1337
1336
|
|
|
1338
1337
|
const PdfView = (props) => {
|
|
1339
|
-
return /* @__PURE__ */
|
|
1338
|
+
return /* @__PURE__ */ React.createElement(Pdf, { ...props });
|
|
1340
1339
|
};
|
|
1341
1340
|
|
|
1342
1341
|
const styles$t = StyleSheet.create({
|
|
@@ -1395,28 +1394,28 @@ const PopUp = ({
|
|
|
1395
1394
|
leftButtonShown = false,
|
|
1396
1395
|
rightButtonShown = false
|
|
1397
1396
|
}) => {
|
|
1398
|
-
return /* @__PURE__ */
|
|
1397
|
+
return /* @__PURE__ */ React.createElement(View, { testID, style: styles$t.container }, title ? /* @__PURE__ */ React.createElement(
|
|
1399
1398
|
CustomTypography,
|
|
1400
1399
|
{
|
|
1401
1400
|
style: styles$t.subTitleBelow,
|
|
1402
1401
|
variant: "H6semiBold",
|
|
1403
1402
|
text: title
|
|
1404
1403
|
}
|
|
1405
|
-
) : null, subtitle ? /* @__PURE__ */
|
|
1404
|
+
) : null, subtitle ? /* @__PURE__ */ React.createElement(
|
|
1406
1405
|
CustomTypography,
|
|
1407
1406
|
{
|
|
1408
1407
|
style: styles$t.subtitle,
|
|
1409
1408
|
variant: "P3regular",
|
|
1410
1409
|
text: subtitle
|
|
1411
1410
|
}
|
|
1412
|
-
) : null, /* @__PURE__ */
|
|
1411
|
+
) : null, /* @__PURE__ */ React.createElement(View, { style: styles$t.buttonContainer }, leftButtonShown ? /* @__PURE__ */ React.createElement(
|
|
1413
1412
|
Pressable,
|
|
1414
1413
|
{
|
|
1415
1414
|
testID: "Left-Button-Press",
|
|
1416
1415
|
style: styles$t.buttonLeft,
|
|
1417
1416
|
onPress: onButtonPress
|
|
1418
1417
|
},
|
|
1419
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ React.createElement(
|
|
1420
1419
|
CustomTypography,
|
|
1421
1420
|
{
|
|
1422
1421
|
style: styles$t.buttonLeftText,
|
|
@@ -1424,7 +1423,7 @@ const PopUp = ({
|
|
|
1424
1423
|
text: buttonText
|
|
1425
1424
|
}
|
|
1426
1425
|
)
|
|
1427
|
-
) : null, rightButtonShown ? /* @__PURE__ */
|
|
1426
|
+
) : null, rightButtonShown ? /* @__PURE__ */ React.createElement(Pressable, { style: styles$t.button, onPress: onButtonPress }, /* @__PURE__ */ React.createElement(
|
|
1428
1427
|
CustomTypography,
|
|
1429
1428
|
{
|
|
1430
1429
|
style: styles$t.buttonText,
|
|
@@ -1465,7 +1464,7 @@ const CustomProgressBar = ({
|
|
|
1465
1464
|
return () => clearInterval(progressInterval);
|
|
1466
1465
|
}, [progress, value, increment, interval]);
|
|
1467
1466
|
const showPercentage = () => {
|
|
1468
|
-
return /* @__PURE__ */
|
|
1467
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$s.flexDirection }, /* @__PURE__ */ React.createElement(
|
|
1469
1468
|
CustomText$1,
|
|
1470
1469
|
{
|
|
1471
1470
|
text: `${value}%`,
|
|
@@ -1473,7 +1472,7 @@ const CustomProgressBar = ({
|
|
|
1473
1472
|
textColor: "CONTENT_PRIMARY",
|
|
1474
1473
|
style: valueTextStyle
|
|
1475
1474
|
}
|
|
1476
|
-
), percentageText ? /* @__PURE__ */
|
|
1475
|
+
), percentageText ? /* @__PURE__ */ React.createElement(
|
|
1477
1476
|
CustomText$1,
|
|
1478
1477
|
{
|
|
1479
1478
|
text: percentageText,
|
|
@@ -1485,7 +1484,7 @@ const CustomProgressBar = ({
|
|
|
1485
1484
|
const renderProgressBar = () => {
|
|
1486
1485
|
switch (type) {
|
|
1487
1486
|
case ShapeType.LINE:
|
|
1488
|
-
return /* @__PURE__ */
|
|
1487
|
+
return /* @__PURE__ */ React.createElement(
|
|
1489
1488
|
Progress.Bar,
|
|
1490
1489
|
{
|
|
1491
1490
|
progress: progress / 100,
|
|
@@ -1499,7 +1498,7 @@ const CustomProgressBar = ({
|
|
|
1499
1498
|
}
|
|
1500
1499
|
);
|
|
1501
1500
|
case ShapeType.CIRCLE:
|
|
1502
|
-
return /* @__PURE__ */
|
|
1501
|
+
return /* @__PURE__ */ React.createElement(
|
|
1503
1502
|
Progress.Circle,
|
|
1504
1503
|
{
|
|
1505
1504
|
progress: progress / 100,
|
|
@@ -1517,7 +1516,7 @@ const CustomProgressBar = ({
|
|
|
1517
1516
|
return null;
|
|
1518
1517
|
}
|
|
1519
1518
|
};
|
|
1520
|
-
return /* @__PURE__ */
|
|
1519
|
+
return /* @__PURE__ */ React.createElement(View, { testID: "custom-progress-bar" }, renderProgressBar());
|
|
1521
1520
|
};
|
|
1522
1521
|
const styles$s = StyleSheet.create({
|
|
1523
1522
|
flexDirection: {
|
|
@@ -1550,19 +1549,19 @@ const splitRating = (rating) => {
|
|
|
1550
1549
|
const drawStar = (starIndex, ratingArray, size, fullStarIcon, halfStarIcon, fullStarColor, emptyStarColor) => {
|
|
1551
1550
|
const [fullStars, decimalPart] = ratingArray;
|
|
1552
1551
|
if (starIndex <= fullStars) {
|
|
1553
|
-
return
|
|
1552
|
+
return React.cloneElement(fullStarIcon, {
|
|
1554
1553
|
style: { height: size, width: size },
|
|
1555
1554
|
fill: fullStarColor,
|
|
1556
1555
|
testID: `star-${starIndex}`
|
|
1557
1556
|
});
|
|
1558
1557
|
} else if (starIndex === fullStars + 1 && decimalPart >= 0.5) {
|
|
1559
|
-
return
|
|
1558
|
+
return React.cloneElement(halfStarIcon, {
|
|
1560
1559
|
style: { height: size, width: size },
|
|
1561
1560
|
fill: fullStarColor,
|
|
1562
1561
|
testID: `star-${starIndex}`
|
|
1563
1562
|
});
|
|
1564
1563
|
} else {
|
|
1565
|
-
return
|
|
1564
|
+
return React.cloneElement(fullStarIcon, {
|
|
1566
1565
|
style: { height: size, width: size },
|
|
1567
1566
|
fill: emptyStarColor,
|
|
1568
1567
|
testID: `star-${starIndex}`
|
|
@@ -1593,10 +1592,10 @@ const Star = ({
|
|
|
1593
1592
|
emptyStarColor
|
|
1594
1593
|
);
|
|
1595
1594
|
stars.push(
|
|
1596
|
-
/* @__PURE__ */
|
|
1595
|
+
/* @__PURE__ */ React.createElement(View, { key: i, style: [styles$r.star, starStyle] }, starType)
|
|
1597
1596
|
);
|
|
1598
1597
|
}
|
|
1599
|
-
return /* @__PURE__ */
|
|
1598
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$r.container, testID: "star" }, stars);
|
|
1600
1599
|
};
|
|
1601
1600
|
|
|
1602
1601
|
var styles$q = StyleSheet.create({
|
|
@@ -1641,7 +1640,7 @@ const Tabs = ({
|
|
|
1641
1640
|
onSelectionChange(selectedTabs);
|
|
1642
1641
|
}
|
|
1643
1642
|
};
|
|
1644
|
-
return /* @__PURE__ */
|
|
1643
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles$q.container, style] }, data?.map(({ id, title, isSelected }) => /* @__PURE__ */ React.createElement(
|
|
1645
1644
|
Pressable,
|
|
1646
1645
|
{
|
|
1647
1646
|
key: id,
|
|
@@ -1652,7 +1651,7 @@ const Tabs = ({
|
|
|
1652
1651
|
},
|
|
1653
1652
|
onPress: () => handlePress(id)
|
|
1654
1653
|
},
|
|
1655
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ React.createElement(
|
|
1656
1655
|
CustomText$1,
|
|
1657
1656
|
{
|
|
1658
1657
|
variant: FontStyle.L2_REGULAR,
|
|
@@ -1721,7 +1720,7 @@ const Tags = ({
|
|
|
1721
1720
|
);
|
|
1722
1721
|
handleTagsChange(tag);
|
|
1723
1722
|
};
|
|
1724
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ React.createElement(
|
|
1725
1724
|
ScrollView,
|
|
1726
1725
|
{
|
|
1727
1726
|
testID,
|
|
@@ -1729,7 +1728,7 @@ const Tags = ({
|
|
|
1729
1728
|
contentContainerStyle: styles$p.contentContainer,
|
|
1730
1729
|
horizontal: false
|
|
1731
1730
|
},
|
|
1732
|
-
tags?.map((tag) => /* @__PURE__ */
|
|
1731
|
+
tags?.map((tag) => /* @__PURE__ */ React.createElement(
|
|
1733
1732
|
Pressable,
|
|
1734
1733
|
{
|
|
1735
1734
|
testID: `${testID}-${tag}-BTN`,
|
|
@@ -1741,7 +1740,7 @@ const Tags = ({
|
|
|
1741
1740
|
selectedTags.includes(tag) ? styles$p.selectedTag : styles$p.tagUnSelected
|
|
1742
1741
|
]
|
|
1743
1742
|
},
|
|
1744
|
-
/* @__PURE__ */
|
|
1743
|
+
/* @__PURE__ */ React.createElement(
|
|
1745
1744
|
CustomTypography,
|
|
1746
1745
|
{
|
|
1747
1746
|
variant: selectedTags.includes(tag) ? "H9semiBold" : "P4regular",
|
|
@@ -1749,13 +1748,13 @@ const Tags = ({
|
|
|
1749
1748
|
text: tag
|
|
1750
1749
|
}
|
|
1751
1750
|
),
|
|
1752
|
-
selectedTags.includes(tag) && icon && /* @__PURE__ */
|
|
1751
|
+
selectedTags.includes(tag) && icon && /* @__PURE__ */ React.createElement(
|
|
1753
1752
|
Pressable,
|
|
1754
1753
|
{
|
|
1755
1754
|
testID: `${testID}-${tag}-PRESS`,
|
|
1756
1755
|
onPress: () => removeTag(tag)
|
|
1757
1756
|
},
|
|
1758
|
-
|
|
1757
|
+
React.cloneElement(icon, { style: [icon.props.style, iconStyle] })
|
|
1759
1758
|
)
|
|
1760
1759
|
))
|
|
1761
1760
|
);
|
|
@@ -1822,14 +1821,14 @@ const CustomSwitch = ({
|
|
|
1822
1821
|
const animatedStyle = {
|
|
1823
1822
|
transform: [{ translateX: animatedValue }]
|
|
1824
1823
|
};
|
|
1825
|
-
return /* @__PURE__ */
|
|
1824
|
+
return /* @__PURE__ */ React.createElement(
|
|
1826
1825
|
Pressable,
|
|
1827
1826
|
{
|
|
1828
1827
|
onPress: toggleSwitch,
|
|
1829
1828
|
style: [styles$o.container, { width }],
|
|
1830
1829
|
testID: "custom-switch"
|
|
1831
1830
|
},
|
|
1832
|
-
/* @__PURE__ */
|
|
1831
|
+
/* @__PURE__ */ React.createElement(
|
|
1833
1832
|
View,
|
|
1834
1833
|
{
|
|
1835
1834
|
style: [
|
|
@@ -1839,8 +1838,8 @@ const CustomSwitch = ({
|
|
|
1839
1838
|
}
|
|
1840
1839
|
]
|
|
1841
1840
|
},
|
|
1842
|
-
/* @__PURE__ */
|
|
1843
|
-
type !== ToggleButtonType.SMALL && /* @__PURE__ */
|
|
1841
|
+
/* @__PURE__ */ React.createElement(Animated.View, { style: [styles$o.thumb, animatedStyle] }),
|
|
1842
|
+
type !== ToggleButtonType.SMALL && /* @__PURE__ */ React.createElement(
|
|
1844
1843
|
CustomTypography,
|
|
1845
1844
|
{
|
|
1846
1845
|
variant: "B3semiBold",
|
|
@@ -1911,13 +1910,13 @@ const Accordion = ({
|
|
|
1911
1910
|
inputRange: [0, 1],
|
|
1912
1911
|
outputRange: [0, contentHeight]
|
|
1913
1912
|
});
|
|
1914
|
-
return /* @__PURE__ */
|
|
1913
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles$n.container, containerStyle], testID: testId }, /* @__PURE__ */ React.createElement(
|
|
1915
1914
|
Pressable,
|
|
1916
1915
|
{
|
|
1917
1916
|
style: [styles$n.header, headerStyle, disabled && { opacity: 0.5 }],
|
|
1918
1917
|
onPress: !disabled ? onToggle : void 0
|
|
1919
1918
|
},
|
|
1920
|
-
headerComponent ? headerComponent() : /* @__PURE__ */
|
|
1919
|
+
headerComponent ? headerComponent() : /* @__PURE__ */ React.createElement(
|
|
1921
1920
|
CustomTypography,
|
|
1922
1921
|
{
|
|
1923
1922
|
variant: "B4_REGULAR",
|
|
@@ -1925,12 +1924,12 @@ const Accordion = ({
|
|
|
1925
1924
|
style: [styles$n.title, titleStyle]
|
|
1926
1925
|
}
|
|
1927
1926
|
),
|
|
1928
|
-
|
|
1927
|
+
React.cloneElement(icon, {
|
|
1929
1928
|
width: moderateScale(20),
|
|
1930
1929
|
height: moderateScale(20),
|
|
1931
1930
|
style: styles$n.iconStyle
|
|
1932
1931
|
})
|
|
1933
|
-
), optionalElement ? optionalElement() : null, isOpen && /* @__PURE__ */
|
|
1932
|
+
), optionalElement ? optionalElement() : null, isOpen && /* @__PURE__ */ React.createElement(Animated.View, { style: [styles$n.content, { height: cardHeight }] }, /* @__PURE__ */ React.createElement(
|
|
1934
1933
|
View,
|
|
1935
1934
|
{
|
|
1936
1935
|
ref: contentRef,
|
|
@@ -1974,7 +1973,7 @@ const styles$m = StyleSheet.create({
|
|
|
1974
1973
|
}
|
|
1975
1974
|
});
|
|
1976
1975
|
|
|
1977
|
-
const Toast =
|
|
1976
|
+
const Toast = React.forwardRef(({ sucessIcon, errorIcon }, ref) => {
|
|
1978
1977
|
const [visible, setVisible] = useState(false);
|
|
1979
1978
|
const [message, setMessage] = useState("");
|
|
1980
1979
|
const [isSuccess, setIsSuccess] = useState(true);
|
|
@@ -2017,10 +2016,10 @@ const Toast = React__default.forwardRef((_props, ref) => {
|
|
|
2017
2016
|
return () => clearInterval(interval);
|
|
2018
2017
|
}
|
|
2019
2018
|
}, [visible]);
|
|
2020
|
-
|
|
2019
|
+
React.useImperativeHandle(ref, () => ({
|
|
2021
2020
|
showToast
|
|
2022
2021
|
}));
|
|
2023
|
-
return visible ? /* @__PURE__ */
|
|
2022
|
+
return visible ? /* @__PURE__ */ React.createElement(
|
|
2024
2023
|
Animated.View,
|
|
2025
2024
|
{
|
|
2026
2025
|
style: [
|
|
@@ -2030,21 +2029,21 @@ const Toast = React__default.forwardRef((_props, ref) => {
|
|
|
2030
2029
|
],
|
|
2031
2030
|
testID: "TOAST"
|
|
2032
2031
|
},
|
|
2033
|
-
/* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$m.toastContainer }, /* @__PURE__ */ React.createElement(View, { style: styles$m.innerContainer }, isSuccess ? sucessIcon : errorIcon, /* @__PURE__ */ React.createElement(
|
|
2034
2033
|
CustomTypography,
|
|
2035
2034
|
{
|
|
2036
2035
|
variant: "L2_REGULAR",
|
|
2037
2036
|
text: message,
|
|
2038
2037
|
style: styles$m.messageText
|
|
2039
2038
|
}
|
|
2040
|
-
), btnText && /* @__PURE__ */
|
|
2039
|
+
), btnText && /* @__PURE__ */ React.createElement(
|
|
2041
2040
|
Pressable,
|
|
2042
2041
|
{
|
|
2043
2042
|
style: styles$m.button,
|
|
2044
2043
|
onPress: onBtnPress || void 0,
|
|
2045
2044
|
testID: "TOAST-BTN"
|
|
2046
2045
|
},
|
|
2047
|
-
/* @__PURE__ */
|
|
2046
|
+
/* @__PURE__ */ React.createElement(
|
|
2048
2047
|
CustomTypography,
|
|
2049
2048
|
{
|
|
2050
2049
|
variant: "L2_BOLD",
|
|
@@ -2053,7 +2052,7 @@ const Toast = React__default.forwardRef((_props, ref) => {
|
|
|
2053
2052
|
}
|
|
2054
2053
|
)
|
|
2055
2054
|
))),
|
|
2056
|
-
/* @__PURE__ */
|
|
2055
|
+
/* @__PURE__ */ React.createElement(
|
|
2057
2056
|
Progress.Bar,
|
|
2058
2057
|
{
|
|
2059
2058
|
progress,
|
|
@@ -2067,20 +2066,6 @@ const Toast = React__default.forwardRef((_props, ref) => {
|
|
|
2067
2066
|
});
|
|
2068
2067
|
Toast.displayName = "Toast";
|
|
2069
2068
|
|
|
2070
|
-
var _path;
|
|
2071
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2072
|
-
var SvgCrossIcon = function SvgCrossIcon(props) {
|
|
2073
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
2074
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2075
|
-
width: 24,
|
|
2076
|
-
height: 25,
|
|
2077
|
-
fill: "none"
|
|
2078
|
-
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
2079
|
-
fill: "#fff",
|
|
2080
|
-
d: "M17.657 8.032a.686.686 0 0 0-.97-.97L12 11.749 7.313 7.062a.686.686 0 1 0-.97.97l4.687 4.687-4.687 4.687a.686.686 0 1 0 .97.97L12 13.688l4.687 4.688a.686.686 0 1 0 .97-.97l-4.687-4.687z"
|
|
2081
|
-
})));
|
|
2082
|
-
};
|
|
2083
|
-
|
|
2084
2069
|
const styles$l = StyleSheet.create({
|
|
2085
2070
|
inputContainer: {
|
|
2086
2071
|
flexDirection: "row",
|
|
@@ -2112,14 +2097,15 @@ const CustomSearchBar = ({
|
|
|
2112
2097
|
onCrossIconPress,
|
|
2113
2098
|
handleOnChangeText,
|
|
2114
2099
|
setValue,
|
|
2115
|
-
|
|
2100
|
+
searchIcon,
|
|
2101
|
+
rightIcon,
|
|
2116
2102
|
disableBorderColor = "#4F4F4F",
|
|
2117
2103
|
borderColor = "#FFFFFF",
|
|
2118
2104
|
disablePlaceHolderStyle = "#686868",
|
|
2119
2105
|
enablePlaceHolderStyle = "#A7A7A7",
|
|
2120
2106
|
...props
|
|
2121
2107
|
}) => {
|
|
2122
|
-
return /* @__PURE__ */
|
|
2108
|
+
return /* @__PURE__ */ React.createElement(
|
|
2123
2109
|
View,
|
|
2124
2110
|
{
|
|
2125
2111
|
testID,
|
|
@@ -2132,7 +2118,7 @@ const CustomSearchBar = ({
|
|
|
2132
2118
|
inputContainerStyle
|
|
2133
2119
|
]
|
|
2134
2120
|
},
|
|
2135
|
-
/* @__PURE__ */
|
|
2121
|
+
/* @__PURE__ */ React.createElement(
|
|
2136
2122
|
Pressable,
|
|
2137
2123
|
{
|
|
2138
2124
|
onPress: () => {
|
|
@@ -2140,9 +2126,14 @@ const CustomSearchBar = ({
|
|
|
2140
2126
|
onSearchIconPress?.();
|
|
2141
2127
|
},
|
|
2142
2128
|
style: searchIconStyle
|
|
2143
|
-
}
|
|
2129
|
+
},
|
|
2130
|
+
React.cloneElement(searchIcon, {
|
|
2131
|
+
width: moderateScale(24),
|
|
2132
|
+
height: moderateScale(24),
|
|
2133
|
+
style: [styles$l.searchIconStyle, searchIconStyle]
|
|
2134
|
+
})
|
|
2144
2135
|
),
|
|
2145
|
-
/* @__PURE__ */
|
|
2136
|
+
/* @__PURE__ */ React.createElement(
|
|
2146
2137
|
TextInput,
|
|
2147
2138
|
{
|
|
2148
2139
|
...props,
|
|
@@ -2157,7 +2148,7 @@ const CustomSearchBar = ({
|
|
|
2157
2148
|
}
|
|
2158
2149
|
}
|
|
2159
2150
|
),
|
|
2160
|
-
value && /* @__PURE__ */
|
|
2151
|
+
value && /* @__PURE__ */ React.createElement(
|
|
2161
2152
|
Pressable,
|
|
2162
2153
|
{
|
|
2163
2154
|
onPress: () => {
|
|
@@ -2166,7 +2157,7 @@ const CustomSearchBar = ({
|
|
|
2166
2157
|
},
|
|
2167
2158
|
style: crossIconStyle
|
|
2168
2159
|
},
|
|
2169
|
-
|
|
2160
|
+
React.cloneElement(rightIcon, {
|
|
2170
2161
|
// width: moderateScale(24),
|
|
2171
2162
|
// height: moderateScale(24),
|
|
2172
2163
|
style: [styles$l.crossIconStyle, crossIconStyle]
|
|
@@ -2207,19 +2198,19 @@ const CustomHeader = ({
|
|
|
2207
2198
|
onLeftPress,
|
|
2208
2199
|
onRightPress
|
|
2209
2200
|
}) => {
|
|
2210
|
-
return /* @__PURE__ */
|
|
2201
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$k.container, testID: testId }, /* @__PURE__ */ React.createElement(View, { style: styles$k.headderContainer }, showLeftIcon && leftIcon ? React.cloneElement(leftIcon, {
|
|
2211
2202
|
width: moderateScale(24),
|
|
2212
2203
|
height: moderateScale(24),
|
|
2213
2204
|
onPress: onLeftPress,
|
|
2214
2205
|
style: styles$k.leftIconStyle
|
|
2215
|
-
}) : null, /* @__PURE__ */
|
|
2206
|
+
}) : null, /* @__PURE__ */ React.createElement(
|
|
2216
2207
|
CustomTypography,
|
|
2217
2208
|
{
|
|
2218
2209
|
variant: "B2_REGULAR",
|
|
2219
2210
|
text: title,
|
|
2220
2211
|
style: styles$k.headerTitle
|
|
2221
2212
|
}
|
|
2222
|
-
)), showRightIcon && rightIcon ?
|
|
2213
|
+
)), showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
2223
2214
|
width: moderateScale(24),
|
|
2224
2215
|
height: moderateScale(24),
|
|
2225
2216
|
onPress: onRightPress,
|
|
@@ -2283,7 +2274,7 @@ const SwipableList = (props) => {
|
|
|
2283
2274
|
onPress,
|
|
2284
2275
|
style,
|
|
2285
2276
|
testID
|
|
2286
|
-
}) => /* @__PURE__ */
|
|
2277
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
2287
2278
|
Pressable,
|
|
2288
2279
|
{
|
|
2289
2280
|
testID,
|
|
@@ -2291,7 +2282,7 @@ const SwipableList = (props) => {
|
|
|
2291
2282
|
style: [styles$j.actionButton, style]
|
|
2292
2283
|
},
|
|
2293
2284
|
icon,
|
|
2294
|
-
/* @__PURE__ */
|
|
2285
|
+
/* @__PURE__ */ React.createElement(
|
|
2295
2286
|
CustomTypography,
|
|
2296
2287
|
{
|
|
2297
2288
|
variant: "L1_REGULAR",
|
|
@@ -2300,7 +2291,7 @@ const SwipableList = (props) => {
|
|
|
2300
2291
|
}
|
|
2301
2292
|
)
|
|
2302
2293
|
);
|
|
2303
|
-
const leftActionHandle = (item, leftPrimaryActionIcon, leftPrimaryActionTitle, leftSecondaryActionIcon, leftSecondaryActionTitle) => /* @__PURE__ */
|
|
2294
|
+
const leftActionHandle = (item, leftPrimaryActionIcon, leftPrimaryActionTitle, leftSecondaryActionIcon, leftSecondaryActionTitle) => /* @__PURE__ */ React.createElement(View, { style: [styles$j.leftActions, leftPrimaryActionStyle] }, leftPrimaryActionIcon && /* @__PURE__ */ React.createElement(
|
|
2304
2295
|
ActionButton,
|
|
2305
2296
|
{
|
|
2306
2297
|
icon: leftPrimaryActionIcon,
|
|
@@ -2309,7 +2300,7 @@ const SwipableList = (props) => {
|
|
|
2309
2300
|
style: leftPrimaryActionStyle,
|
|
2310
2301
|
testID: `${testId}-LEFT-PRIMARY-${item.id}`
|
|
2311
2302
|
}
|
|
2312
|
-
), leftSecondaryActionIcon && /* @__PURE__ */
|
|
2303
|
+
), leftSecondaryActionIcon && /* @__PURE__ */ React.createElement(
|
|
2313
2304
|
ActionButton,
|
|
2314
2305
|
{
|
|
2315
2306
|
icon: leftSecondaryActionIcon,
|
|
@@ -2319,7 +2310,7 @@ const SwipableList = (props) => {
|
|
|
2319
2310
|
testID: `${testId}-LEFT-SECONDARY-${item.id}`
|
|
2320
2311
|
}
|
|
2321
2312
|
));
|
|
2322
|
-
const rightActionHandle = (item) => /* @__PURE__ */
|
|
2313
|
+
const rightActionHandle = (item) => /* @__PURE__ */ React.createElement(View, { style: [styles$j.rightActions, rightPrimaryActionStyle] }, rightPrimaryActionIcon && /* @__PURE__ */ React.createElement(
|
|
2323
2314
|
ActionButton,
|
|
2324
2315
|
{
|
|
2325
2316
|
icon: rightPrimaryActionIcon,
|
|
@@ -2329,7 +2320,7 @@ const SwipableList = (props) => {
|
|
|
2329
2320
|
testID: `${testId}-RIGHT-PRIMARY-${item.id}`
|
|
2330
2321
|
}
|
|
2331
2322
|
));
|
|
2332
|
-
const renderItem = ({ item }) => /* @__PURE__ */
|
|
2323
|
+
const renderItem = ({ item }) => /* @__PURE__ */ React.createElement(GestureHandlerRootView, { testID: `${testId}-LIST`, style: styles$j.container }, /* @__PURE__ */ React.createElement(
|
|
2333
2324
|
Swipeable,
|
|
2334
2325
|
{
|
|
2335
2326
|
renderLeftActions: () => leftActionHandle(
|
|
@@ -2344,13 +2335,13 @@ const SwipableList = (props) => {
|
|
|
2344
2335
|
},
|
|
2345
2336
|
props?.renderItem(item)
|
|
2346
2337
|
));
|
|
2347
|
-
return /* @__PURE__ */
|
|
2338
|
+
return /* @__PURE__ */ React.createElement(View, { testID: testId }, /* @__PURE__ */ React.createElement(
|
|
2348
2339
|
FlatList,
|
|
2349
2340
|
{
|
|
2350
2341
|
data,
|
|
2351
2342
|
renderItem,
|
|
2352
2343
|
keyExtractor: (item) => item.id,
|
|
2353
|
-
ItemSeparatorComponent: () => /* @__PURE__ */
|
|
2344
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ React.createElement(View, { style: styles$j.seprator })
|
|
2354
2345
|
}
|
|
2355
2346
|
));
|
|
2356
2347
|
};
|
|
@@ -2374,7 +2365,7 @@ const CustomIcon = ({
|
|
|
2374
2365
|
containerStyle,
|
|
2375
2366
|
titleStyle
|
|
2376
2367
|
}) => {
|
|
2377
|
-
return /* @__PURE__ */
|
|
2368
|
+
return /* @__PURE__ */ React.createElement(
|
|
2378
2369
|
Pressable,
|
|
2379
2370
|
{
|
|
2380
2371
|
style: [styles$i.container, containerStyle],
|
|
@@ -2382,7 +2373,7 @@ const CustomIcon = ({
|
|
|
2382
2373
|
testID: testId
|
|
2383
2374
|
},
|
|
2384
2375
|
icon,
|
|
2385
|
-
title && /* @__PURE__ */
|
|
2376
|
+
title && /* @__PURE__ */ React.createElement(
|
|
2386
2377
|
CustomTypography,
|
|
2387
2378
|
{
|
|
2388
2379
|
variant: titleVariant,
|
|
@@ -2408,12 +2399,12 @@ const styles$h = StyleSheet.create({
|
|
|
2408
2399
|
|
|
2409
2400
|
const CustomLoader = ({ loading }) => {
|
|
2410
2401
|
if (!loading) return null;
|
|
2411
|
-
return /* @__PURE__ */
|
|
2402
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$h.container }, /* @__PURE__ */ React.createElement(ActivityIndicator, { size: "large", color: "#686868" }));
|
|
2412
2403
|
};
|
|
2413
2404
|
|
|
2414
2405
|
const HorizontalLine = ({ style }) => {
|
|
2415
2406
|
const { theme } = useTheme();
|
|
2416
|
-
return /* @__PURE__ */
|
|
2407
|
+
return /* @__PURE__ */ React.createElement(
|
|
2417
2408
|
View,
|
|
2418
2409
|
{
|
|
2419
2410
|
style: [
|
|
@@ -2440,7 +2431,7 @@ const Topic = ({
|
|
|
2440
2431
|
containterStyle
|
|
2441
2432
|
}) => {
|
|
2442
2433
|
const { theme } = useTheme();
|
|
2443
|
-
return /* @__PURE__ */
|
|
2434
|
+
return /* @__PURE__ */ React.createElement(
|
|
2444
2435
|
TouchableOpacity,
|
|
2445
2436
|
{
|
|
2446
2437
|
style: [
|
|
@@ -2450,15 +2441,15 @@ const Topic = ({
|
|
|
2450
2441
|
],
|
|
2451
2442
|
onPress
|
|
2452
2443
|
},
|
|
2453
|
-
rightIcon && /* @__PURE__ */
|
|
2454
|
-
/* @__PURE__ */
|
|
2444
|
+
rightIcon && /* @__PURE__ */ React.createElement(View, { style: styles$f.rightIconContainer }, React.cloneElement(rightIcon)),
|
|
2445
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$f.textContainer }, subTitle && /* @__PURE__ */ React.createElement(
|
|
2455
2446
|
CustomText$1,
|
|
2456
2447
|
{
|
|
2457
2448
|
text: subTitle,
|
|
2458
2449
|
variant: "L3_REGULAR",
|
|
2459
2450
|
textColor: "CONTENT_PRIMARY"
|
|
2460
2451
|
}
|
|
2461
|
-
), /* @__PURE__ */
|
|
2452
|
+
), /* @__PURE__ */ React.createElement(
|
|
2462
2453
|
CustomText$1,
|
|
2463
2454
|
{
|
|
2464
2455
|
text: title,
|
|
@@ -2546,27 +2537,27 @@ const ContactModal = ({
|
|
|
2546
2537
|
onClose();
|
|
2547
2538
|
};
|
|
2548
2539
|
const emailOptions = ["Mail", "Gmail", "Outlook"];
|
|
2549
|
-
const renderEmailOptions = () => /* @__PURE__ */
|
|
2540
|
+
const renderEmailOptions = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
2550
2541
|
CustomText$1,
|
|
2551
2542
|
{
|
|
2552
2543
|
style: styles$e.title,
|
|
2553
2544
|
text: "Open email app",
|
|
2554
2545
|
variant: "L2_REGULAR"
|
|
2555
2546
|
}
|
|
2556
|
-
), /* @__PURE__ */
|
|
2547
|
+
), /* @__PURE__ */ React.createElement(
|
|
2557
2548
|
CustomText$1,
|
|
2558
2549
|
{
|
|
2559
2550
|
style: styles$e.subtitle,
|
|
2560
2551
|
text: "Which app would you like to open?",
|
|
2561
2552
|
variant: "L2_REGULAR"
|
|
2562
2553
|
}
|
|
2563
|
-
), emailOptions.map((option) => /* @__PURE__ */
|
|
2554
|
+
), emailOptions.map((option) => /* @__PURE__ */ React.createElement(React.Fragment, { key: option }, /* @__PURE__ */ React.createElement(Line, null), /* @__PURE__ */ React.createElement(
|
|
2564
2555
|
Pressable,
|
|
2565
2556
|
{
|
|
2566
2557
|
onPress: () => handleOptionPress(),
|
|
2567
2558
|
style: styles$e.optionButton
|
|
2568
2559
|
},
|
|
2569
|
-
/* @__PURE__ */
|
|
2560
|
+
/* @__PURE__ */ React.createElement(
|
|
2570
2561
|
CustomText$1,
|
|
2571
2562
|
{
|
|
2572
2563
|
style: styles$e.optionText,
|
|
@@ -2575,14 +2566,14 @@ const ContactModal = ({
|
|
|
2575
2566
|
}
|
|
2576
2567
|
)
|
|
2577
2568
|
))));
|
|
2578
|
-
const renderContent = () => /* @__PURE__ */
|
|
2569
|
+
const renderContent = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(View, { style: styles$e.viewContainer }, isMailOpen ? renderEmailOptions() : /* @__PURE__ */ React.createElement(Pressable, { onPress: handleCall, style: styles$e.optionButton }, /* @__PURE__ */ React.createElement(
|
|
2579
2570
|
CustomText$1,
|
|
2580
2571
|
{
|
|
2581
2572
|
style: styles$e.optionText,
|
|
2582
2573
|
text: `Call ${phoneNumber}`,
|
|
2583
2574
|
variant: "B3_BOLD"
|
|
2584
2575
|
}
|
|
2585
|
-
))), /* @__PURE__ */
|
|
2576
|
+
))), /* @__PURE__ */ React.createElement(Pressable, { onPress: onClose, style: styles$e.cancelButton }, /* @__PURE__ */ React.createElement(
|
|
2586
2577
|
CustomText$1,
|
|
2587
2578
|
{
|
|
2588
2579
|
style: styles$e.cancelText,
|
|
@@ -2590,7 +2581,7 @@ const ContactModal = ({
|
|
|
2590
2581
|
variant: "B2_REGULAR"
|
|
2591
2582
|
}
|
|
2592
2583
|
)));
|
|
2593
|
-
return /* @__PURE__ */
|
|
2584
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$e.container }, /* @__PURE__ */ React.createElement(
|
|
2594
2585
|
Modal,
|
|
2595
2586
|
{
|
|
2596
2587
|
animationType: "slide",
|
|
@@ -2598,7 +2589,7 @@ const ContactModal = ({
|
|
|
2598
2589
|
visible,
|
|
2599
2590
|
onRequestClose: onClose
|
|
2600
2591
|
},
|
|
2601
|
-
/* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$e.modalContainer }, /* @__PURE__ */ React.createElement(View, { style: styles$e.modalContent }, renderContent()))
|
|
2602
2593
|
));
|
|
2603
2594
|
};
|
|
2604
2595
|
const styles$e = StyleSheet.create({
|
|
@@ -2721,7 +2712,7 @@ const DateRangePicker = (props) => {
|
|
|
2721
2712
|
return markedDates;
|
|
2722
2713
|
};
|
|
2723
2714
|
const isButtonDisabled = !selectedRange.startDate || !selectedRange.endDate;
|
|
2724
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ React.createElement(View, null, /* @__PURE__ */ React.createElement(
|
|
2725
2716
|
Calendar,
|
|
2726
2717
|
{
|
|
2727
2718
|
markedDates: getMarkedDates(),
|
|
@@ -2741,7 +2732,7 @@ const DateRangePicker = (props) => {
|
|
|
2741
2732
|
onDayPress,
|
|
2742
2733
|
...props
|
|
2743
2734
|
}
|
|
2744
|
-
), /* @__PURE__ */
|
|
2735
|
+
), /* @__PURE__ */ React.createElement(
|
|
2745
2736
|
CustomButton$1,
|
|
2746
2737
|
{
|
|
2747
2738
|
title: "Apply",
|
|
@@ -2768,7 +2759,7 @@ const OurOfficesButton = ({
|
|
|
2768
2759
|
descriptionColor = "CONTENT_SECONDARY"
|
|
2769
2760
|
}) => {
|
|
2770
2761
|
const { theme } = useTheme();
|
|
2771
|
-
return /* @__PURE__ */
|
|
2762
|
+
return /* @__PURE__ */ React.createElement(
|
|
2772
2763
|
TouchableOpacity,
|
|
2773
2764
|
{
|
|
2774
2765
|
style: [
|
|
@@ -2778,8 +2769,8 @@ const OurOfficesButton = ({
|
|
|
2778
2769
|
],
|
|
2779
2770
|
onPress
|
|
2780
2771
|
},
|
|
2781
|
-
leftIcon && /* @__PURE__ */
|
|
2782
|
-
/* @__PURE__ */
|
|
2772
|
+
leftIcon && /* @__PURE__ */ React.createElement(View, { style: styles$c.iconContainer }, React.cloneElement(leftIcon)),
|
|
2773
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$c.textContainer }, /* @__PURE__ */ React.createElement(
|
|
2783
2774
|
CustomText$1,
|
|
2784
2775
|
{
|
|
2785
2776
|
text: title,
|
|
@@ -2787,7 +2778,7 @@ const OurOfficesButton = ({
|
|
|
2787
2778
|
textColor: titleColor,
|
|
2788
2779
|
style: styles$c.textView
|
|
2789
2780
|
}
|
|
2790
|
-
), /* @__PURE__ */
|
|
2781
|
+
), /* @__PURE__ */ React.createElement(
|
|
2791
2782
|
CustomText$1,
|
|
2792
2783
|
{
|
|
2793
2784
|
text: description,
|
|
@@ -2796,7 +2787,7 @@ const OurOfficesButton = ({
|
|
|
2796
2787
|
style: styles$c.flexWrap
|
|
2797
2788
|
}
|
|
2798
2789
|
)),
|
|
2799
|
-
rightIcon && /* @__PURE__ */
|
|
2790
|
+
rightIcon && /* @__PURE__ */ React.createElement(View, { style: styles$c.rightIconContainer }, React.cloneElement(rightIcon))
|
|
2800
2791
|
);
|
|
2801
2792
|
};
|
|
2802
2793
|
const styles$c = StyleSheet.create({
|
|
@@ -2846,12 +2837,13 @@ const styles$b = StyleSheet.create({
|
|
|
2846
2837
|
});
|
|
2847
2838
|
|
|
2848
2839
|
const NotificationBandge = ({
|
|
2849
|
-
notificationCount = 0
|
|
2840
|
+
notificationCount = 0,
|
|
2841
|
+
icon
|
|
2850
2842
|
}) => {
|
|
2851
2843
|
if (notificationCount <= 0) {
|
|
2852
|
-
return
|
|
2844
|
+
return icon;
|
|
2853
2845
|
}
|
|
2854
|
-
return /* @__PURE__ */
|
|
2846
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$b.iconContainer }, icon, /* @__PURE__ */ React.createElement(View, { style: styles$b.badge }, /* @__PURE__ */ React.createElement(Text, { style: [styles$b.badgeText] }, notificationCount > 99 ? "99+" : notificationCount)));
|
|
2855
2847
|
};
|
|
2856
2848
|
|
|
2857
2849
|
const ScrollableList = ({
|
|
@@ -2869,7 +2861,7 @@ const ScrollableList = ({
|
|
|
2869
2861
|
data && data.length > 0 ? data[0].name : null
|
|
2870
2862
|
);
|
|
2871
2863
|
const { theme } = useTheme();
|
|
2872
|
-
return /* @__PURE__ */
|
|
2864
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles$a.container, containerStyle] }, /* @__PURE__ */ React.createElement(
|
|
2873
2865
|
ScrollView,
|
|
2874
2866
|
{
|
|
2875
2867
|
horizontal: true,
|
|
@@ -2879,7 +2871,7 @@ const ScrollableList = ({
|
|
|
2879
2871
|
scrollViewContentStyle
|
|
2880
2872
|
]
|
|
2881
2873
|
},
|
|
2882
|
-
data?.map((item) => /* @__PURE__ */
|
|
2874
|
+
data?.map((item) => /* @__PURE__ */ React.createElement(
|
|
2883
2875
|
Pressable,
|
|
2884
2876
|
{
|
|
2885
2877
|
key: item.value,
|
|
@@ -2896,7 +2888,7 @@ const ScrollableList = ({
|
|
|
2896
2888
|
handleSelectCategory(item.name, item.value);
|
|
2897
2889
|
}
|
|
2898
2890
|
},
|
|
2899
|
-
/* @__PURE__ */
|
|
2891
|
+
/* @__PURE__ */ React.createElement(
|
|
2900
2892
|
CustomText$1,
|
|
2901
2893
|
{
|
|
2902
2894
|
text: item.name,
|
|
@@ -2904,7 +2896,7 @@ const ScrollableList = ({
|
|
|
2904
2896
|
textColor: (activeTab ?? selectedItem) === item.name ? selectedItemTextColor : defaultItemTextColor
|
|
2905
2897
|
}
|
|
2906
2898
|
),
|
|
2907
|
-
item?.isError && /* @__PURE__ */
|
|
2899
|
+
item?.isError && /* @__PURE__ */ React.createElement(
|
|
2908
2900
|
View,
|
|
2909
2901
|
{
|
|
2910
2902
|
style: [
|
|
@@ -2998,7 +2990,7 @@ const FeedbackForm = ({
|
|
|
2998
2990
|
setFeedback
|
|
2999
2991
|
}) => {
|
|
3000
2992
|
const maxChars = 200;
|
|
3001
|
-
return /* @__PURE__ */
|
|
2993
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$9.container }, /* @__PURE__ */ React.createElement(Text, { style: styles$9.headerText }, title), /* @__PURE__ */ React.createElement(
|
|
3002
2994
|
TextInput,
|
|
3003
2995
|
{
|
|
3004
2996
|
style: [styles$9.textInput, { height: Math.max(100) }],
|
|
@@ -3009,7 +3001,7 @@ const FeedbackForm = ({
|
|
|
3009
3001
|
value: feedback,
|
|
3010
3002
|
onChangeText: (text) => setFeedback(text)
|
|
3011
3003
|
}
|
|
3012
|
-
), /* @__PURE__ */
|
|
3004
|
+
), /* @__PURE__ */ React.createElement(
|
|
3013
3005
|
CustomText$1,
|
|
3014
3006
|
{
|
|
3015
3007
|
text: `${feedback.length}/${maxChars} characters`,
|
|
@@ -3017,14 +3009,14 @@ const FeedbackForm = ({
|
|
|
3017
3009
|
textColor: "CONTENT_SECONDRY",
|
|
3018
3010
|
style: styles$9.charCounter
|
|
3019
3011
|
}
|
|
3020
|
-
), /* @__PURE__ */
|
|
3012
|
+
), /* @__PURE__ */ React.createElement(View, { style: styles$9.buttonContainer }, /* @__PURE__ */ React.createElement(Pressable, { style: styles$9.feedbackButton, onPress: handleSendFeedback }, /* @__PURE__ */ React.createElement(
|
|
3021
3013
|
CustomText$1,
|
|
3022
3014
|
{
|
|
3023
3015
|
text: "Send feedback",
|
|
3024
3016
|
variant: "L1_REGULAR",
|
|
3025
3017
|
textColor: "CONTENT_PRIMARY"
|
|
3026
3018
|
}
|
|
3027
|
-
)), /* @__PURE__ */
|
|
3019
|
+
)), /* @__PURE__ */ React.createElement(Pressable, { style: styles$9.cancelButton, onPress: clearAllData }, /* @__PURE__ */ React.createElement(
|
|
3028
3020
|
CustomText$1,
|
|
3029
3021
|
{
|
|
3030
3022
|
text: "Cancel",
|
|
@@ -3061,7 +3053,7 @@ const CountryDropDown = ({
|
|
|
3061
3053
|
setCallingCode(`+${country.callingCode[0]}`);
|
|
3062
3054
|
getCountryCode(`+${country.callingCode[0]}`);
|
|
3063
3055
|
};
|
|
3064
|
-
return /* @__PURE__ */
|
|
3056
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(View, { style: [styles$8.container, containerStyle] }, /* @__PURE__ */ React.createElement(View, { style: [styles$8.countryPickerContainer, countryPickerStyle] }, /* @__PURE__ */ React.createElement(
|
|
3065
3057
|
CountryPicker,
|
|
3066
3058
|
{
|
|
3067
3059
|
withFilter: true,
|
|
@@ -3071,21 +3063,21 @@ const CountryDropDown = ({
|
|
|
3071
3063
|
onSelect: handleSelect,
|
|
3072
3064
|
visible: pickerVisible
|
|
3073
3065
|
}
|
|
3074
|
-
), /* @__PURE__ */
|
|
3066
|
+
), /* @__PURE__ */ React.createElement(
|
|
3075
3067
|
Text,
|
|
3076
3068
|
{
|
|
3077
3069
|
onPress: () => setPickerVisible(true),
|
|
3078
3070
|
style: [styles$8.callingCode, callingCodeStyle]
|
|
3079
3071
|
},
|
|
3080
3072
|
callingCode
|
|
3081
|
-
)), /* @__PURE__ */
|
|
3073
|
+
)), /* @__PURE__ */ React.createElement(View, { style: styles$8.flex }, (isFocused || value) && /* @__PURE__ */ React.createElement(
|
|
3082
3074
|
CustomTypography,
|
|
3083
3075
|
{
|
|
3084
3076
|
variant: "L2_REGULAR",
|
|
3085
3077
|
text: label ?? "",
|
|
3086
3078
|
style: styles$8.floatingLabel
|
|
3087
3079
|
}
|
|
3088
|
-
), /* @__PURE__ */
|
|
3080
|
+
), /* @__PURE__ */ React.createElement(
|
|
3089
3081
|
TextInput,
|
|
3090
3082
|
{
|
|
3091
3083
|
style: [styles$8.input, inputStyle],
|
|
@@ -3098,7 +3090,7 @@ const CountryDropDown = ({
|
|
|
3098
3090
|
maxLength,
|
|
3099
3091
|
placeholderTextColor: theme.CONTENT_SECONDRY["light"]
|
|
3100
3092
|
}
|
|
3101
|
-
))), errorMessage ? /* @__PURE__ */
|
|
3093
|
+
))), errorMessage ? /* @__PURE__ */ React.createElement(
|
|
3102
3094
|
CustomTypography,
|
|
3103
3095
|
{
|
|
3104
3096
|
variant: "L2_REGULAR",
|
|
@@ -3174,7 +3166,7 @@ const CommonTextInput = ({
|
|
|
3174
3166
|
handlePress,
|
|
3175
3167
|
pointerEvents
|
|
3176
3168
|
}) => {
|
|
3177
|
-
return /* @__PURE__ */
|
|
3169
|
+
return /* @__PURE__ */ React.createElement(Pressable, { onPress: handlePress, style: styles$7.container }, /* @__PURE__ */ React.createElement(
|
|
3178
3170
|
TextInput$1,
|
|
3179
3171
|
{
|
|
3180
3172
|
mode: "outlined",
|
|
@@ -3199,7 +3191,7 @@ const CommonTextInput = ({
|
|
|
3199
3191
|
editable,
|
|
3200
3192
|
pointerEvents
|
|
3201
3193
|
}
|
|
3202
|
-
), errorMessage ? /* @__PURE__ */
|
|
3194
|
+
), errorMessage ? /* @__PURE__ */ React.createElement(
|
|
3203
3195
|
CustomTypography,
|
|
3204
3196
|
{
|
|
3205
3197
|
variant: "L2_REGULAR",
|
|
@@ -3264,7 +3256,7 @@ const CustomDropdown = ({
|
|
|
3264
3256
|
const [isFocus, setIsFocus] = useState(false);
|
|
3265
3257
|
const renderLabel = () => {
|
|
3266
3258
|
if (value || isFocus) {
|
|
3267
|
-
return /* @__PURE__ */
|
|
3259
|
+
return /* @__PURE__ */ React.createElement(
|
|
3268
3260
|
Text,
|
|
3269
3261
|
{
|
|
3270
3262
|
style: [
|
|
@@ -3286,7 +3278,7 @@ const CustomDropdown = ({
|
|
|
3286
3278
|
onValueChange(newValue);
|
|
3287
3279
|
}
|
|
3288
3280
|
};
|
|
3289
|
-
return /* @__PURE__ */
|
|
3281
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles$6.container, containerStyle] }, label && renderLabel(), /* @__PURE__ */ React.createElement(
|
|
3290
3282
|
Dropdown,
|
|
3291
3283
|
{
|
|
3292
3284
|
style: [
|
|
@@ -3404,20 +3396,20 @@ const CustomSwitchBtn = ({
|
|
|
3404
3396
|
const toggleSwitch = () => {
|
|
3405
3397
|
onValueChange(!value);
|
|
3406
3398
|
};
|
|
3407
|
-
return /* @__PURE__ */
|
|
3399
|
+
return /* @__PURE__ */ React.createElement(
|
|
3408
3400
|
Pressable,
|
|
3409
3401
|
{
|
|
3410
3402
|
disabled,
|
|
3411
3403
|
onPress: toggleSwitch,
|
|
3412
3404
|
style: { ...styles$5.mainContainer, ...containerStyle }
|
|
3413
3405
|
},
|
|
3414
|
-
/* @__PURE__ */
|
|
3406
|
+
/* @__PURE__ */ React.createElement(
|
|
3415
3407
|
Animated.View,
|
|
3416
3408
|
{
|
|
3417
3409
|
style: [styles$5.circle, { transform: [{ translateX }], ...circleStyle }]
|
|
3418
3410
|
}
|
|
3419
3411
|
),
|
|
3420
|
-
/* @__PURE__ */
|
|
3412
|
+
/* @__PURE__ */ React.createElement(
|
|
3421
3413
|
CustomTypography,
|
|
3422
3414
|
{
|
|
3423
3415
|
style: [styles$5.activeText, value ? inActiveTextStyle : activeTextStyle],
|
|
@@ -3425,7 +3417,7 @@ const CustomSwitchBtn = ({
|
|
|
3425
3417
|
variant: activeTextVariant
|
|
3426
3418
|
}
|
|
3427
3419
|
),
|
|
3428
|
-
/* @__PURE__ */
|
|
3420
|
+
/* @__PURE__ */ React.createElement(
|
|
3429
3421
|
CustomTypography,
|
|
3430
3422
|
{
|
|
3431
3423
|
style: [
|
|
@@ -3477,7 +3469,7 @@ const TagsComponent = ({
|
|
|
3477
3469
|
}
|
|
3478
3470
|
return tagList;
|
|
3479
3471
|
};
|
|
3480
|
-
const renderTagItem = ({ item }) => /* @__PURE__ */
|
|
3472
|
+
const renderTagItem = ({ item }) => /* @__PURE__ */ React.createElement(
|
|
3481
3473
|
Pressable,
|
|
3482
3474
|
{
|
|
3483
3475
|
onPress: () => handleTagPress?.(item.name),
|
|
@@ -3486,7 +3478,7 @@ const TagsComponent = ({
|
|
|
3486
3478
|
selectedTag === item?.name ? styles$4.selectedTagButton : styles$4.unselectedTagButton
|
|
3487
3479
|
]
|
|
3488
3480
|
},
|
|
3489
|
-
/* @__PURE__ */
|
|
3481
|
+
/* @__PURE__ */ React.createElement(
|
|
3490
3482
|
Text,
|
|
3491
3483
|
{
|
|
3492
3484
|
style: [
|
|
@@ -3496,9 +3488,9 @@ const TagsComponent = ({
|
|
|
3496
3488
|
},
|
|
3497
3489
|
item?.name
|
|
3498
3490
|
),
|
|
3499
|
-
selectedTag === item?.name && /* @__PURE__ */
|
|
3491
|
+
selectedTag === item?.name && /* @__PURE__ */ React.createElement(Text, { style: styles$4.closeButton }, "\u2715")
|
|
3500
3492
|
);
|
|
3501
|
-
return /* @__PURE__ */
|
|
3493
|
+
return /* @__PURE__ */ React.createElement(View, null, /* @__PURE__ */ React.createElement(
|
|
3502
3494
|
FlatList,
|
|
3503
3495
|
{
|
|
3504
3496
|
data: reorderedTags(),
|
|
@@ -3581,7 +3573,10 @@ const CustomDocumentPicker = ({
|
|
|
3581
3573
|
fileTypes = [DocumentPicker.types.images, DocumentPicker.types.pdf],
|
|
3582
3574
|
containerStyle,
|
|
3583
3575
|
titleStyle,
|
|
3584
|
-
hintStyle
|
|
3576
|
+
hintStyle,
|
|
3577
|
+
fileIcon,
|
|
3578
|
+
uploadIcon,
|
|
3579
|
+
deleteIcon
|
|
3585
3580
|
}) => {
|
|
3586
3581
|
const [error, setError] = useState("");
|
|
3587
3582
|
const [docDetails, setDocDetails] = useState();
|
|
@@ -3611,10 +3606,10 @@ const CustomDocumentPicker = ({
|
|
|
3611
3606
|
}
|
|
3612
3607
|
}
|
|
3613
3608
|
}, [fileTypes, maxFileSize, onDocumentUpload]);
|
|
3614
|
-
useCallback(() => {
|
|
3609
|
+
const removeDocument = useCallback(() => {
|
|
3615
3610
|
setDocDetails(void 0);
|
|
3616
3611
|
}, []);
|
|
3617
|
-
return /* @__PURE__ */
|
|
3612
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
3618
3613
|
View,
|
|
3619
3614
|
{
|
|
3620
3615
|
style: [
|
|
@@ -3624,22 +3619,25 @@ const CustomDocumentPicker = ({
|
|
|
3624
3619
|
containerStyle
|
|
3625
3620
|
]
|
|
3626
3621
|
},
|
|
3627
|
-
/* @__PURE__ */
|
|
3622
|
+
/* @__PURE__ */ React.createElement(Pressable, { style: styles$3.innerContainer, onPress: pickDocument }, docDetails ? fileIcon : uploadIcon, /* @__PURE__ */ React.createElement(View, { style: styles$3.titleContainer }, /* @__PURE__ */ React.createElement(
|
|
3628
3623
|
CustomTypography,
|
|
3629
3624
|
{
|
|
3630
3625
|
variant: FontStyle.L2_REGULAR,
|
|
3631
3626
|
text: docDetails?.name ?? title,
|
|
3632
3627
|
style: [{ color: theme.CONTENT_PRIMARY }, titleStyle]
|
|
3633
3628
|
}
|
|
3634
|
-
), !docDetails && /* @__PURE__ */
|
|
3629
|
+
), !docDetails && /* @__PURE__ */ React.createElement(
|
|
3635
3630
|
CustomTypography,
|
|
3636
3631
|
{
|
|
3637
3632
|
variant: FontStyle.L3_REGULAR,
|
|
3638
3633
|
text: hint,
|
|
3639
3634
|
style: [{ color: theme.CONTENT_SECONDRY }, hintStyle]
|
|
3640
3635
|
}
|
|
3641
|
-
)))
|
|
3642
|
-
|
|
3636
|
+
))),
|
|
3637
|
+
docDetails && React.cloneElement(deleteIcon, {
|
|
3638
|
+
onPress: removeDocument
|
|
3639
|
+
})
|
|
3640
|
+
), error && /* @__PURE__ */ React.createElement(
|
|
3643
3641
|
CustomTypography,
|
|
3644
3642
|
{
|
|
3645
3643
|
variant: FontStyle.L2_REGULAR,
|
|
@@ -3675,7 +3673,7 @@ const styles$2 = StyleSheet.create({
|
|
|
3675
3673
|
}
|
|
3676
3674
|
});
|
|
3677
3675
|
|
|
3678
|
-
const OTPInput =
|
|
3676
|
+
const OTPInput = React.forwardRef(
|
|
3679
3677
|
({
|
|
3680
3678
|
length = 4,
|
|
3681
3679
|
onComplete,
|
|
@@ -3703,7 +3701,7 @@ const OTPInput = React__default.forwardRef(
|
|
|
3703
3701
|
setIsResendOtpEnable(true);
|
|
3704
3702
|
}, 5e3);
|
|
3705
3703
|
};
|
|
3706
|
-
|
|
3704
|
+
React.useImperativeHandle(ref, () => ({
|
|
3707
3705
|
reset() {
|
|
3708
3706
|
setOTP("");
|
|
3709
3707
|
}
|
|
@@ -3734,7 +3732,7 @@ const OTPInput = React__default.forwardRef(
|
|
|
3734
3732
|
onComplete?.(otp);
|
|
3735
3733
|
}
|
|
3736
3734
|
}, [otp]);
|
|
3737
|
-
return /* @__PURE__ */
|
|
3735
|
+
return /* @__PURE__ */ React.createElement(View, { style: { ...otpContainerStyle }, testID: testId }, /* @__PURE__ */ React.createElement(
|
|
3738
3736
|
CustomTypography,
|
|
3739
3737
|
{
|
|
3740
3738
|
text: "OTP",
|
|
@@ -3744,7 +3742,7 @@ const OTPInput = React__default.forwardRef(
|
|
|
3744
3742
|
textAlign: "left"
|
|
3745
3743
|
}
|
|
3746
3744
|
}
|
|
3747
|
-
), /* @__PURE__ */
|
|
3745
|
+
), /* @__PURE__ */ React.createElement(View, { style: { ...styles$2.textInputContainer } }, Array.from({ length }).map((_, index) => /* @__PURE__ */ React.createElement(
|
|
3748
3746
|
TextInput,
|
|
3749
3747
|
{
|
|
3750
3748
|
key: index?.toString(),
|
|
@@ -3764,7 +3762,7 @@ const OTPInput = React__default.forwardRef(
|
|
|
3764
3762
|
returnKeyType: otp.length === length ? "done" : "next",
|
|
3765
3763
|
selectionColor: theme.CONTENT_PRIMARY
|
|
3766
3764
|
}
|
|
3767
|
-
))), /* @__PURE__ */
|
|
3765
|
+
))), /* @__PURE__ */ React.createElement(View, { style: styles$2.resendOtpContainer }, errorMessage ? /* @__PURE__ */ React.createElement(
|
|
3768
3766
|
CustomTypography,
|
|
3769
3767
|
{
|
|
3770
3768
|
text: errorMessage,
|
|
@@ -3773,7 +3771,7 @@ const OTPInput = React__default.forwardRef(
|
|
|
3773
3771
|
color: theme.ERROR
|
|
3774
3772
|
}
|
|
3775
3773
|
}
|
|
3776
|
-
) : /* @__PURE__ */
|
|
3774
|
+
) : /* @__PURE__ */ React.createElement(View, null), /* @__PURE__ */ React.createElement(Pressable, { onPress: onClickResendOTP, disabled: !isResendOtpEnable }, /* @__PURE__ */ React.createElement(
|
|
3777
3775
|
CustomTypography,
|
|
3778
3776
|
{
|
|
3779
3777
|
text: "Resend OTP",
|
|
@@ -3873,7 +3871,8 @@ const Stepper = ({
|
|
|
3873
3871
|
containerStyle,
|
|
3874
3872
|
showStepCount = false,
|
|
3875
3873
|
showStatus = false,
|
|
3876
|
-
data
|
|
3874
|
+
data,
|
|
3875
|
+
completedStatusIcon
|
|
3877
3876
|
}) => {
|
|
3878
3877
|
const { theme } = useTheme();
|
|
3879
3878
|
const renderCircleStyle = (status) => {
|
|
@@ -3915,18 +3914,18 @@ const Stepper = ({
|
|
|
3915
3914
|
return { borderColor: theme.CONTENT_SECONDRY };
|
|
3916
3915
|
}
|
|
3917
3916
|
};
|
|
3918
|
-
return /* @__PURE__ */
|
|
3917
|
+
return /* @__PURE__ */ React.createElement(View, { style: { ...styles$1.stepperContainer, ...containerStyle } }, data?.map((item, index) => {
|
|
3919
3918
|
const stepCircleStyle = renderCircleStyle(item?.status);
|
|
3920
3919
|
const dividerStyle = renderDividerStyle(item?.status);
|
|
3921
3920
|
const labelStyle = renderLableStyle(item?.status);
|
|
3922
3921
|
const lastViewStyle = index === data?.length - 1 ? styles$1.lastStepWrapper : null;
|
|
3923
|
-
return /* @__PURE__ */
|
|
3922
|
+
return /* @__PURE__ */ React.createElement(
|
|
3924
3923
|
View,
|
|
3925
3924
|
{
|
|
3926
3925
|
key: index?.toString(),
|
|
3927
3926
|
style: { ...styles$1.stepperWrapper, ...lastViewStyle }
|
|
3928
3927
|
},
|
|
3929
|
-
/* @__PURE__ */
|
|
3928
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$1.stepperSeparatorContainer }, /* @__PURE__ */ React.createElement(View, { style: { ...stepCircleStyle } }, showStepCount && /* @__PURE__ */ React.createElement(
|
|
3930
3929
|
CustomTypography,
|
|
3931
3930
|
{
|
|
3932
3931
|
text: item?.step,
|
|
@@ -3935,8 +3934,8 @@ const Stepper = ({
|
|
|
3935
3934
|
color: theme.CONTENT_PRIMARY
|
|
3936
3935
|
}
|
|
3937
3936
|
}
|
|
3938
|
-
)), index != data?.length - 1 && /* @__PURE__ */
|
|
3939
|
-
/* @__PURE__ */
|
|
3937
|
+
), showStatus && item?.status === Status.Completed && completedStatusIcon), index != data?.length - 1 && /* @__PURE__ */ React.createElement(View, { style: { ...styles$1.separator, ...dividerStyle } })),
|
|
3938
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$1.lableContainer }, /* @__PURE__ */ React.createElement(
|
|
3940
3939
|
CustomTypography,
|
|
3941
3940
|
{
|
|
3942
3941
|
text: item?.label,
|
|
@@ -3986,7 +3985,11 @@ const styles = StyleSheet.create({
|
|
|
3986
3985
|
|
|
3987
3986
|
const { width } = Dimensions.get("window");
|
|
3988
3987
|
const BUTTON_WIDTH = 40;
|
|
3989
|
-
const CustomSlideButton = ({
|
|
3988
|
+
const CustomSlideButton = ({
|
|
3989
|
+
label,
|
|
3990
|
+
onComplete,
|
|
3991
|
+
icon
|
|
3992
|
+
}) => {
|
|
3990
3993
|
const pan = useRef(new Animated.Value(0)).current;
|
|
3991
3994
|
const panResponder = useRef(
|
|
3992
3995
|
PanResponder.create({
|
|
@@ -4017,7 +4020,7 @@ const CustomSlideButton = ({ label, onComplete }) => {
|
|
|
4017
4020
|
})
|
|
4018
4021
|
).current;
|
|
4019
4022
|
const { theme } = useTheme();
|
|
4020
|
-
return /* @__PURE__ */
|
|
4023
|
+
return /* @__PURE__ */ React.createElement(
|
|
4021
4024
|
View,
|
|
4022
4025
|
{
|
|
4023
4026
|
style: {
|
|
@@ -4025,7 +4028,7 @@ const CustomSlideButton = ({ label, onComplete }) => {
|
|
|
4025
4028
|
backgroundColor: theme.SURFACE_INVERTED
|
|
4026
4029
|
}
|
|
4027
4030
|
},
|
|
4028
|
-
/* @__PURE__ */
|
|
4031
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.buttonTextCOntainer }, /* @__PURE__ */ React.createElement(
|
|
4029
4032
|
CustomTypography,
|
|
4030
4033
|
{
|
|
4031
4034
|
text: label,
|
|
@@ -4035,13 +4038,13 @@ const CustomSlideButton = ({ label, onComplete }) => {
|
|
|
4035
4038
|
}
|
|
4036
4039
|
}
|
|
4037
4040
|
)),
|
|
4038
|
-
/* @__PURE__ */
|
|
4041
|
+
/* @__PURE__ */ React.createElement(
|
|
4039
4042
|
Animated.View,
|
|
4040
4043
|
{
|
|
4041
4044
|
style: [styles.slider, { transform: [{ translateX: pan }] }],
|
|
4042
4045
|
...panResponder.panHandlers
|
|
4043
4046
|
},
|
|
4044
|
-
/* @__PURE__ */
|
|
4047
|
+
/* @__PURE__ */ React.createElement(
|
|
4045
4048
|
View,
|
|
4046
4049
|
{
|
|
4047
4050
|
style: {
|
|
@@ -4049,7 +4052,8 @@ const CustomSlideButton = ({ label, onComplete }) => {
|
|
|
4049
4052
|
backgroundColor: theme.SURFACE_PRIMARY,
|
|
4050
4053
|
width: BUTTON_WIDTH
|
|
4051
4054
|
}
|
|
4052
|
-
}
|
|
4055
|
+
},
|
|
4056
|
+
icon
|
|
4053
4057
|
)
|
|
4054
4058
|
)
|
|
4055
4059
|
);
|