dhre-ui-kit 0.0.116 → 0.0.118
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 +12 -2
- package/lib/index.js +64 -89
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +225 -250
- 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",
|
|
@@ -618,65 +617,6 @@ const styles$B = StyleSheet.create({
|
|
|
618
617
|
rightIconStyle: { marginLeft: 8 }
|
|
619
618
|
});
|
|
620
619
|
|
|
621
|
-
var _path$2;
|
|
622
|
-
function _extends$3() { return _extends$3 = 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$3.apply(null, arguments); }
|
|
623
|
-
var SvgCrossIcon = function SvgCrossIcon(props) {
|
|
624
|
-
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
625
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
626
|
-
width: 24,
|
|
627
|
-
height: 25,
|
|
628
|
-
fill: "none"
|
|
629
|
-
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
630
|
-
fill: "#fff",
|
|
631
|
-
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"
|
|
632
|
-
})));
|
|
633
|
-
};
|
|
634
|
-
|
|
635
|
-
function _extends$2() { return _extends$2 = 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$2.apply(null, arguments); }
|
|
636
|
-
var SvgCaretLeft = function SvgCaretLeft(props) {
|
|
637
|
-
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
638
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
639
|
-
width: 24,
|
|
640
|
-
height: 24,
|
|
641
|
-
fill: "none"
|
|
642
|
-
}, props));
|
|
643
|
-
};
|
|
644
|
-
|
|
645
|
-
var _path$1, _path2;
|
|
646
|
-
function _extends$1() { return _extends$1 = 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$1.apply(null, arguments); }
|
|
647
|
-
var SvgDotsThreeVertical = function SvgDotsThreeVertical(props) {
|
|
648
|
-
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
649
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
650
|
-
width: 24,
|
|
651
|
-
height: 24,
|
|
652
|
-
fill: "none"
|
|
653
|
-
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
654
|
-
fill: "#fff",
|
|
655
|
-
stroke: "#fff",
|
|
656
|
-
strokeWidth: 0.125,
|
|
657
|
-
d: "M13.438 6a1.438 1.438 0 1 1-2.876 0 1.438 1.438 0 0 1 2.876 0ZM13.438 12a1.438 1.438 0 1 1-2.876 0 1.438 1.438 0 0 1 2.876 0Z"
|
|
658
|
-
})), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
|
|
659
|
-
fill: "#fff",
|
|
660
|
-
d: "M12 19.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3"
|
|
661
|
-
})));
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
var _path;
|
|
665
|
-
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); }
|
|
666
|
-
var SvgArrowLeft = function SvgArrowLeft(props) {
|
|
667
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
668
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
669
|
-
width: 24,
|
|
670
|
-
height: 24,
|
|
671
|
-
fill: "none"
|
|
672
|
-
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
673
|
-
fill: "#fff",
|
|
674
|
-
fillRule: "evenodd",
|
|
675
|
-
d: "M15.6 4.186a.774.774 0 0 1 .085 1.092L9.923 12l5.762 6.722a.774.774 0 0 1-1.176 1.008l-6.194-7.226a.774.774 0 0 1 0-1.008L14.51 4.27a.774.774 0 0 1 1.092-.084",
|
|
676
|
-
clipRule: "evenodd"
|
|
677
|
-
})));
|
|
678
|
-
};
|
|
679
|
-
|
|
680
620
|
const BottomDrawer = ({
|
|
681
621
|
isModalVisible,
|
|
682
622
|
toggleModal,
|
|
@@ -690,8 +630,8 @@ const BottomDrawer = ({
|
|
|
690
630
|
showBlurView = true,
|
|
691
631
|
showLeftIcon = false,
|
|
692
632
|
showRightIcon = true,
|
|
693
|
-
leftIcon
|
|
694
|
-
rightIcon
|
|
633
|
+
leftIcon,
|
|
634
|
+
rightIcon,
|
|
695
635
|
onLeftIconPress,
|
|
696
636
|
titleStyle,
|
|
697
637
|
titleVariant = "B2_REGULAR",
|
|
@@ -703,7 +643,7 @@ const BottomDrawer = ({
|
|
|
703
643
|
toggleModal();
|
|
704
644
|
}
|
|
705
645
|
};
|
|
706
|
-
return /* @__PURE__ */
|
|
646
|
+
return /* @__PURE__ */ React.createElement(
|
|
707
647
|
Modal,
|
|
708
648
|
{
|
|
709
649
|
animationType: "slide",
|
|
@@ -711,27 +651,37 @@ const BottomDrawer = ({
|
|
|
711
651
|
visible: isModalVisible,
|
|
712
652
|
onRequestClose: toggleModal
|
|
713
653
|
},
|
|
714
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ React.createElement(PanGestureHandler, { onGestureEvent: onSwipDown }, /* @__PURE__ */ React.createElement(
|
|
715
655
|
KeyboardAvoidingView,
|
|
716
656
|
{
|
|
717
657
|
behavior: Platform.OS === "ios" ? "padding" : "height",
|
|
718
658
|
style: { flex: 1 }
|
|
719
659
|
},
|
|
720
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ React.createElement(View, { style: [styles$B.mainContainer, style], testID }, showBlurView ? /* @__PURE__ */ React.createElement(
|
|
721
661
|
BlurView,
|
|
722
662
|
{
|
|
723
663
|
style: [styles$B.blurView, blurViewStyle],
|
|
724
664
|
blurType: "light",
|
|
725
665
|
blurAmount
|
|
726
666
|
}
|
|
727
|
-
) : 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, {
|
|
668
|
+
width: moderateScale(24),
|
|
669
|
+
height: moderateScale(24),
|
|
670
|
+
style: styles$B.leftIconStyle,
|
|
671
|
+
onPress: onLeftIconPress
|
|
672
|
+
}) : null, /* @__PURE__ */ React.createElement(
|
|
728
673
|
CustomTypography,
|
|
729
674
|
{
|
|
730
675
|
variant: titleVariant,
|
|
731
676
|
text: title,
|
|
732
677
|
style: { ...styles$B.title, ...titleStyle }
|
|
733
678
|
}
|
|
734
|
-
)
|
|
679
|
+
), showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
680
|
+
width: moderateScale(24),
|
|
681
|
+
height: moderateScale(24),
|
|
682
|
+
style: styles$B.rightIconStyle,
|
|
683
|
+
onPress: toggleModal
|
|
684
|
+
}) : null)), children))
|
|
735
685
|
))
|
|
736
686
|
);
|
|
737
687
|
};
|
|
@@ -753,7 +703,7 @@ const CustomButton = ({
|
|
|
753
703
|
disableButtonTitleColor
|
|
754
704
|
}) => {
|
|
755
705
|
const { theme } = useTheme();
|
|
756
|
-
return /* @__PURE__ */
|
|
706
|
+
return /* @__PURE__ */ React.createElement(
|
|
757
707
|
Pressable,
|
|
758
708
|
{
|
|
759
709
|
testID,
|
|
@@ -767,8 +717,8 @@ const CustomButton = ({
|
|
|
767
717
|
onPress,
|
|
768
718
|
disabled
|
|
769
719
|
},
|
|
770
|
-
imagePosition === "left" && leftIcon && /* @__PURE__ */
|
|
771
|
-
/* @__PURE__ */
|
|
720
|
+
imagePosition === "left" && leftIcon && /* @__PURE__ */ React.createElement(View, { style: iconStyle }, React.cloneElement(leftIcon, { width: 20, height: 20 })),
|
|
721
|
+
/* @__PURE__ */ React.createElement(
|
|
772
722
|
CustomText$1,
|
|
773
723
|
{
|
|
774
724
|
text: title,
|
|
@@ -782,7 +732,7 @@ const CustomButton = ({
|
|
|
782
732
|
textColor: titleColor
|
|
783
733
|
}
|
|
784
734
|
),
|
|
785
|
-
imagePosition === "right" && rightIcon && /* @__PURE__ */
|
|
735
|
+
imagePosition === "right" && rightIcon && /* @__PURE__ */ React.createElement(View, { style: iconStyle }, React.cloneElement(rightIcon, { width: 20, height: 20 }))
|
|
786
736
|
);
|
|
787
737
|
};
|
|
788
738
|
const styles$A = StyleSheet.create({
|
|
@@ -862,42 +812,42 @@ const Cards = ({
|
|
|
862
812
|
testID,
|
|
863
813
|
onButtonPress
|
|
864
814
|
}) => {
|
|
865
|
-
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(
|
|
866
816
|
CustomTypography,
|
|
867
817
|
{
|
|
868
818
|
variant: "P2regular",
|
|
869
819
|
style: styles$z.title,
|
|
870
820
|
text: topLeftTitle
|
|
871
821
|
}
|
|
872
|
-
)) : null, title ? /* @__PURE__ */
|
|
822
|
+
)) : null, title ? /* @__PURE__ */ React.createElement(
|
|
873
823
|
CustomTypography,
|
|
874
824
|
{
|
|
875
825
|
variant: "H6bold",
|
|
876
826
|
style: styles$z.subTitleBelow,
|
|
877
827
|
text: title
|
|
878
828
|
}
|
|
879
|
-
) : null, subtitle ? /* @__PURE__ */
|
|
829
|
+
) : null, subtitle ? /* @__PURE__ */ React.createElement(
|
|
880
830
|
CustomTypography,
|
|
881
831
|
{
|
|
882
832
|
variant: "P3regular",
|
|
883
833
|
style: styles$z.subtitle,
|
|
884
834
|
text: subtitle
|
|
885
835
|
}
|
|
886
|
-
) : null, /* @__PURE__ */
|
|
836
|
+
) : null, /* @__PURE__ */ React.createElement(View, { style: styles$z.leftBottomView }, iconSource ? iconSource : null, iconTitle ? /* @__PURE__ */ React.createElement(
|
|
887
837
|
CustomTypography,
|
|
888
838
|
{
|
|
889
839
|
variant: "P3regular",
|
|
890
840
|
style: styles$z.subTitleLeftBelow,
|
|
891
841
|
text: iconTitle
|
|
892
842
|
}
|
|
893
|
-
) : null), buttonShown ? /* @__PURE__ */
|
|
843
|
+
) : null), buttonShown ? /* @__PURE__ */ React.createElement(
|
|
894
844
|
Pressable,
|
|
895
845
|
{
|
|
896
846
|
testID: "Button-Press",
|
|
897
847
|
style: styles$z.button,
|
|
898
848
|
onPress: onButtonPress
|
|
899
849
|
},
|
|
900
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ React.createElement(
|
|
901
851
|
CustomTypography,
|
|
902
852
|
{
|
|
903
853
|
variant: "B2semiBold",
|
|
@@ -958,7 +908,7 @@ const Checkbox = ({
|
|
|
958
908
|
setChecked(!checked);
|
|
959
909
|
onCheck && onCheck(!checked);
|
|
960
910
|
};
|
|
961
|
-
return /* @__PURE__ */
|
|
911
|
+
return /* @__PURE__ */ React.createElement(View, { testID, style: containerStyle }, /* @__PURE__ */ React.createElement(
|
|
962
912
|
Pressable,
|
|
963
913
|
{
|
|
964
914
|
testID: "Checkbox-Press",
|
|
@@ -966,8 +916,8 @@ const Checkbox = ({
|
|
|
966
916
|
disabled: disable,
|
|
967
917
|
style: styles$y.directionStyle
|
|
968
918
|
},
|
|
969
|
-
/* @__PURE__ */
|
|
970
|
-
/* @__PURE__ */
|
|
919
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$y.checkboxContainer }, React.cloneElement(checked ? checkedIcon : uncheckedIcon)),
|
|
920
|
+
/* @__PURE__ */ React.createElement(
|
|
971
921
|
CustomTypography,
|
|
972
922
|
{
|
|
973
923
|
variant: titleVariant,
|
|
@@ -1028,26 +978,26 @@ const CustomDropdown$1 = ({
|
|
|
1028
978
|
downArrowIcon
|
|
1029
979
|
}) => {
|
|
1030
980
|
const [showOptions, setShowOptions] = useState(false);
|
|
1031
|
-
return /* @__PURE__ */
|
|
981
|
+
return /* @__PURE__ */ React.createElement(View, { testID: testId }, /* @__PURE__ */ React.createElement(
|
|
1032
982
|
CustomTypography,
|
|
1033
983
|
{
|
|
1034
984
|
variant: "P3regular",
|
|
1035
985
|
style: styles$x.labelStyle,
|
|
1036
986
|
text: label
|
|
1037
987
|
}
|
|
1038
|
-
), /* @__PURE__ */
|
|
988
|
+
), /* @__PURE__ */ React.createElement(
|
|
1039
989
|
Pressable,
|
|
1040
990
|
{
|
|
1041
991
|
testID: `${testId}-BTN`,
|
|
1042
992
|
style: styles$x.dropDownStyle,
|
|
1043
993
|
onPress: () => setShowOptions(!showOptions)
|
|
1044
994
|
},
|
|
1045
|
-
iconName && /* @__PURE__ */
|
|
995
|
+
iconName && /* @__PURE__ */ React.createElement(View, { style: iconStyle }, React.cloneElement(iconName, {
|
|
1046
996
|
width: moderateScale(24),
|
|
1047
997
|
height: moderateScale(24),
|
|
1048
998
|
style: styles$x.iconStyle
|
|
1049
999
|
})),
|
|
1050
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ React.createElement(
|
|
1051
1001
|
CustomTypography,
|
|
1052
1002
|
{
|
|
1053
1003
|
variant: "P3regular",
|
|
@@ -1055,14 +1005,14 @@ const CustomDropdown$1 = ({
|
|
|
1055
1005
|
text: selectedValue ? selectedValue.label : placeholder
|
|
1056
1006
|
}
|
|
1057
1007
|
),
|
|
1058
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ React.createElement(View, null, showOptions ? React.cloneElement(upArrowIcon, {
|
|
1059
1009
|
width: moderateScale(24),
|
|
1060
1010
|
height: moderateScale(24)
|
|
1061
|
-
}) :
|
|
1011
|
+
}) : React.cloneElement(downArrowIcon, {
|
|
1062
1012
|
width: moderateScale(24),
|
|
1063
1013
|
height: moderateScale(24)
|
|
1064
1014
|
}))
|
|
1065
|
-
), showOptions && /* @__PURE__ */
|
|
1015
|
+
), showOptions && /* @__PURE__ */ React.createElement(View, { style: styles$x.optionContainer }, options?.map(({ id, value, label: label2 }) => /* @__PURE__ */ React.createElement(
|
|
1066
1016
|
Pressable,
|
|
1067
1017
|
{
|
|
1068
1018
|
key: id,
|
|
@@ -1078,12 +1028,12 @@ const CustomDropdown$1 = ({
|
|
|
1078
1028
|
}
|
|
1079
1029
|
]
|
|
1080
1030
|
},
|
|
1081
|
-
iconName && /* @__PURE__ */
|
|
1031
|
+
iconName && /* @__PURE__ */ React.createElement(View, { style: iconStyle }, React.cloneElement(iconName, {
|
|
1082
1032
|
width: moderateScale(24),
|
|
1083
1033
|
height: moderateScale(24),
|
|
1084
1034
|
style: styles$x.iconStyle
|
|
1085
1035
|
})),
|
|
1086
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ React.createElement(
|
|
1087
1037
|
CustomTypography,
|
|
1088
1038
|
{
|
|
1089
1039
|
variant: "P3regular",
|
|
@@ -1174,14 +1124,14 @@ const CustomTextInput = ({
|
|
|
1174
1124
|
};
|
|
1175
1125
|
const handleIconPress1 = () => setValue("");
|
|
1176
1126
|
const handleIconPress2 = () => setIsSecureTextEntry(!isSecureTextEntry);
|
|
1177
|
-
return /* @__PURE__ */
|
|
1127
|
+
return /* @__PURE__ */ React.createElement(View, { testID }, /* @__PURE__ */ React.createElement(
|
|
1178
1128
|
CustomTypography,
|
|
1179
1129
|
{
|
|
1180
1130
|
variant: "P3medium",
|
|
1181
1131
|
style: [styles$w.labelStyle, disabled && styles$w.disableTextStyle],
|
|
1182
1132
|
text: label
|
|
1183
1133
|
}
|
|
1184
|
-
), /* @__PURE__ */
|
|
1134
|
+
), /* @__PURE__ */ React.createElement(
|
|
1185
1135
|
View,
|
|
1186
1136
|
{
|
|
1187
1137
|
style: [
|
|
@@ -1196,12 +1146,12 @@ const CustomTextInput = ({
|
|
|
1196
1146
|
}
|
|
1197
1147
|
]
|
|
1198
1148
|
},
|
|
1199
|
-
isSearchBar && searchIcon &&
|
|
1149
|
+
isSearchBar && searchIcon && React.cloneElement(searchIcon, {
|
|
1200
1150
|
width: moderateScale(24),
|
|
1201
1151
|
height: moderateScale(24),
|
|
1202
1152
|
style: styles$w.searchIconStyle
|
|
1203
1153
|
}),
|
|
1204
|
-
/* @__PURE__ */
|
|
1154
|
+
/* @__PURE__ */ React.createElement(
|
|
1205
1155
|
TextInput,
|
|
1206
1156
|
{
|
|
1207
1157
|
...props,
|
|
@@ -1218,15 +1168,15 @@ const CustomTextInput = ({
|
|
|
1218
1168
|
secureTextEntry: isSecureTextEntry
|
|
1219
1169
|
}
|
|
1220
1170
|
),
|
|
1221
|
-
value && !multiline && rightIcon1 &&
|
|
1171
|
+
value && !multiline && rightIcon1 && React.cloneElement(rightIcon1, {
|
|
1222
1172
|
onPress: handleIconPress1,
|
|
1223
1173
|
testID: "icon1"
|
|
1224
1174
|
}),
|
|
1225
|
-
secureTextEntry && rightIcon2 &&
|
|
1175
|
+
secureTextEntry && rightIcon2 && React.cloneElement(rightIcon2, {
|
|
1226
1176
|
onPress: handleIconPress2,
|
|
1227
1177
|
testID: "icon2"
|
|
1228
1178
|
})
|
|
1229
|
-
), (error || successMessage) && /* @__PURE__ */
|
|
1179
|
+
), (error || successMessage) && /* @__PURE__ */ React.createElement(
|
|
1230
1180
|
CustomTypography,
|
|
1231
1181
|
{
|
|
1232
1182
|
numberOfLines: 2,
|
|
@@ -1269,15 +1219,15 @@ const CustomTooltip = ({
|
|
|
1269
1219
|
iconStyle,
|
|
1270
1220
|
iconColor = DHRE_COLORS_TEXT.DH_BLACK
|
|
1271
1221
|
}) => {
|
|
1272
|
-
const defaultPopoverContent = /* @__PURE__ */
|
|
1222
|
+
const defaultPopoverContent = /* @__PURE__ */ React.createElement(View, { style: styles$v.mesageContainer, testID: testId }, /* @__PURE__ */ React.createElement(
|
|
1273
1223
|
CustomTypography,
|
|
1274
1224
|
{
|
|
1275
1225
|
variant: "P4regular",
|
|
1276
1226
|
style: styles$v.messageStyle,
|
|
1277
1227
|
text: message
|
|
1278
1228
|
}
|
|
1279
|
-
), icon && /* @__PURE__ */
|
|
1280
|
-
return /* @__PURE__ */
|
|
1229
|
+
), icon && /* @__PURE__ */ React.createElement(View, { style: iconStyle }, React.cloneElement(icon, { fill: iconColor })));
|
|
1230
|
+
return /* @__PURE__ */ React.createElement(
|
|
1281
1231
|
Tooltip,
|
|
1282
1232
|
{
|
|
1283
1233
|
containerStyle: styles$v.tooltipContainerStyle,
|
|
@@ -1336,27 +1286,27 @@ const FileUpload = ({
|
|
|
1336
1286
|
icon,
|
|
1337
1287
|
iconStyle
|
|
1338
1288
|
}) => {
|
|
1339
|
-
return /* @__PURE__ */
|
|
1289
|
+
return /* @__PURE__ */ React.createElement(
|
|
1340
1290
|
View,
|
|
1341
1291
|
{
|
|
1342
1292
|
style: [styles$u.container, containerStyle],
|
|
1343
1293
|
testID: "file-upload-container"
|
|
1344
1294
|
},
|
|
1345
|
-
/* @__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(
|
|
1346
1296
|
CustomTypography,
|
|
1347
1297
|
{
|
|
1348
1298
|
variant: "P4regular",
|
|
1349
1299
|
style: styles$u.description,
|
|
1350
1300
|
text: `Drop files directly here or `
|
|
1351
1301
|
}
|
|
1352
|
-
), /* @__PURE__ */
|
|
1302
|
+
), /* @__PURE__ */ React.createElement(
|
|
1353
1303
|
CustomTypography,
|
|
1354
1304
|
{
|
|
1355
1305
|
variant: "P4regular",
|
|
1356
1306
|
style: styles$u.browse,
|
|
1357
1307
|
text: btnText
|
|
1358
1308
|
}
|
|
1359
|
-
), /* @__PURE__ */
|
|
1309
|
+
), /* @__PURE__ */ React.createElement(
|
|
1360
1310
|
CustomTypography,
|
|
1361
1311
|
{
|
|
1362
1312
|
testID: "file-upload-description",
|
|
@@ -1365,14 +1315,14 @@ const FileUpload = ({
|
|
|
1365
1315
|
text: ` from your device`
|
|
1366
1316
|
}
|
|
1367
1317
|
)),
|
|
1368
|
-
/* @__PURE__ */
|
|
1318
|
+
/* @__PURE__ */ React.createElement(
|
|
1369
1319
|
Pressable,
|
|
1370
1320
|
{
|
|
1371
1321
|
style: styles$u.button,
|
|
1372
1322
|
onPress: onUpload,
|
|
1373
1323
|
testID: "file-upload-button"
|
|
1374
1324
|
},
|
|
1375
|
-
/* @__PURE__ */
|
|
1325
|
+
/* @__PURE__ */ React.createElement(
|
|
1376
1326
|
CustomTypography,
|
|
1377
1327
|
{
|
|
1378
1328
|
variant: "B2semiBold",
|
|
@@ -1385,7 +1335,7 @@ const FileUpload = ({
|
|
|
1385
1335
|
};
|
|
1386
1336
|
|
|
1387
1337
|
const PdfView = (props) => {
|
|
1388
|
-
return /* @__PURE__ */
|
|
1338
|
+
return /* @__PURE__ */ React.createElement(Pdf, { ...props });
|
|
1389
1339
|
};
|
|
1390
1340
|
|
|
1391
1341
|
const styles$t = StyleSheet.create({
|
|
@@ -1444,28 +1394,28 @@ const PopUp = ({
|
|
|
1444
1394
|
leftButtonShown = false,
|
|
1445
1395
|
rightButtonShown = false
|
|
1446
1396
|
}) => {
|
|
1447
|
-
return /* @__PURE__ */
|
|
1397
|
+
return /* @__PURE__ */ React.createElement(View, { testID, style: styles$t.container }, title ? /* @__PURE__ */ React.createElement(
|
|
1448
1398
|
CustomTypography,
|
|
1449
1399
|
{
|
|
1450
1400
|
style: styles$t.subTitleBelow,
|
|
1451
1401
|
variant: "H6semiBold",
|
|
1452
1402
|
text: title
|
|
1453
1403
|
}
|
|
1454
|
-
) : null, subtitle ? /* @__PURE__ */
|
|
1404
|
+
) : null, subtitle ? /* @__PURE__ */ React.createElement(
|
|
1455
1405
|
CustomTypography,
|
|
1456
1406
|
{
|
|
1457
1407
|
style: styles$t.subtitle,
|
|
1458
1408
|
variant: "P3regular",
|
|
1459
1409
|
text: subtitle
|
|
1460
1410
|
}
|
|
1461
|
-
) : null, /* @__PURE__ */
|
|
1411
|
+
) : null, /* @__PURE__ */ React.createElement(View, { style: styles$t.buttonContainer }, leftButtonShown ? /* @__PURE__ */ React.createElement(
|
|
1462
1412
|
Pressable,
|
|
1463
1413
|
{
|
|
1464
1414
|
testID: "Left-Button-Press",
|
|
1465
1415
|
style: styles$t.buttonLeft,
|
|
1466
1416
|
onPress: onButtonPress
|
|
1467
1417
|
},
|
|
1468
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ React.createElement(
|
|
1469
1419
|
CustomTypography,
|
|
1470
1420
|
{
|
|
1471
1421
|
style: styles$t.buttonLeftText,
|
|
@@ -1473,7 +1423,7 @@ const PopUp = ({
|
|
|
1473
1423
|
text: buttonText
|
|
1474
1424
|
}
|
|
1475
1425
|
)
|
|
1476
|
-
) : null, rightButtonShown ? /* @__PURE__ */
|
|
1426
|
+
) : null, rightButtonShown ? /* @__PURE__ */ React.createElement(Pressable, { style: styles$t.button, onPress: onButtonPress }, /* @__PURE__ */ React.createElement(
|
|
1477
1427
|
CustomTypography,
|
|
1478
1428
|
{
|
|
1479
1429
|
style: styles$t.buttonText,
|
|
@@ -1514,7 +1464,7 @@ const CustomProgressBar = ({
|
|
|
1514
1464
|
return () => clearInterval(progressInterval);
|
|
1515
1465
|
}, [progress, value, increment, interval]);
|
|
1516
1466
|
const showPercentage = () => {
|
|
1517
|
-
return /* @__PURE__ */
|
|
1467
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$s.flexDirection }, /* @__PURE__ */ React.createElement(
|
|
1518
1468
|
CustomText$1,
|
|
1519
1469
|
{
|
|
1520
1470
|
text: `${value}%`,
|
|
@@ -1522,7 +1472,7 @@ const CustomProgressBar = ({
|
|
|
1522
1472
|
textColor: "CONTENT_PRIMARY",
|
|
1523
1473
|
style: valueTextStyle
|
|
1524
1474
|
}
|
|
1525
|
-
), percentageText ? /* @__PURE__ */
|
|
1475
|
+
), percentageText ? /* @__PURE__ */ React.createElement(
|
|
1526
1476
|
CustomText$1,
|
|
1527
1477
|
{
|
|
1528
1478
|
text: percentageText,
|
|
@@ -1534,7 +1484,7 @@ const CustomProgressBar = ({
|
|
|
1534
1484
|
const renderProgressBar = () => {
|
|
1535
1485
|
switch (type) {
|
|
1536
1486
|
case ShapeType.LINE:
|
|
1537
|
-
return /* @__PURE__ */
|
|
1487
|
+
return /* @__PURE__ */ React.createElement(
|
|
1538
1488
|
Progress.Bar,
|
|
1539
1489
|
{
|
|
1540
1490
|
progress: progress / 100,
|
|
@@ -1548,7 +1498,7 @@ const CustomProgressBar = ({
|
|
|
1548
1498
|
}
|
|
1549
1499
|
);
|
|
1550
1500
|
case ShapeType.CIRCLE:
|
|
1551
|
-
return /* @__PURE__ */
|
|
1501
|
+
return /* @__PURE__ */ React.createElement(
|
|
1552
1502
|
Progress.Circle,
|
|
1553
1503
|
{
|
|
1554
1504
|
progress: progress / 100,
|
|
@@ -1566,7 +1516,7 @@ const CustomProgressBar = ({
|
|
|
1566
1516
|
return null;
|
|
1567
1517
|
}
|
|
1568
1518
|
};
|
|
1569
|
-
return /* @__PURE__ */
|
|
1519
|
+
return /* @__PURE__ */ React.createElement(View, { testID: "custom-progress-bar" }, renderProgressBar());
|
|
1570
1520
|
};
|
|
1571
1521
|
const styles$s = StyleSheet.create({
|
|
1572
1522
|
flexDirection: {
|
|
@@ -1599,19 +1549,19 @@ const splitRating = (rating) => {
|
|
|
1599
1549
|
const drawStar = (starIndex, ratingArray, size, fullStarIcon, halfStarIcon, fullStarColor, emptyStarColor) => {
|
|
1600
1550
|
const [fullStars, decimalPart] = ratingArray;
|
|
1601
1551
|
if (starIndex <= fullStars) {
|
|
1602
|
-
return
|
|
1552
|
+
return React.cloneElement(fullStarIcon, {
|
|
1603
1553
|
style: { height: size, width: size },
|
|
1604
1554
|
fill: fullStarColor,
|
|
1605
1555
|
testID: `star-${starIndex}`
|
|
1606
1556
|
});
|
|
1607
1557
|
} else if (starIndex === fullStars + 1 && decimalPart >= 0.5) {
|
|
1608
|
-
return
|
|
1558
|
+
return React.cloneElement(halfStarIcon, {
|
|
1609
1559
|
style: { height: size, width: size },
|
|
1610
1560
|
fill: fullStarColor,
|
|
1611
1561
|
testID: `star-${starIndex}`
|
|
1612
1562
|
});
|
|
1613
1563
|
} else {
|
|
1614
|
-
return
|
|
1564
|
+
return React.cloneElement(fullStarIcon, {
|
|
1615
1565
|
style: { height: size, width: size },
|
|
1616
1566
|
fill: emptyStarColor,
|
|
1617
1567
|
testID: `star-${starIndex}`
|
|
@@ -1642,10 +1592,10 @@ const Star = ({
|
|
|
1642
1592
|
emptyStarColor
|
|
1643
1593
|
);
|
|
1644
1594
|
stars.push(
|
|
1645
|
-
/* @__PURE__ */
|
|
1595
|
+
/* @__PURE__ */ React.createElement(View, { key: i, style: [styles$r.star, starStyle] }, starType)
|
|
1646
1596
|
);
|
|
1647
1597
|
}
|
|
1648
|
-
return /* @__PURE__ */
|
|
1598
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$r.container, testID: "star" }, stars);
|
|
1649
1599
|
};
|
|
1650
1600
|
|
|
1651
1601
|
var styles$q = StyleSheet.create({
|
|
@@ -1690,7 +1640,7 @@ const Tabs = ({
|
|
|
1690
1640
|
onSelectionChange(selectedTabs);
|
|
1691
1641
|
}
|
|
1692
1642
|
};
|
|
1693
|
-
return /* @__PURE__ */
|
|
1643
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles$q.container, style] }, data?.map(({ id, title, isSelected }) => /* @__PURE__ */ React.createElement(
|
|
1694
1644
|
Pressable,
|
|
1695
1645
|
{
|
|
1696
1646
|
key: id,
|
|
@@ -1701,7 +1651,7 @@ const Tabs = ({
|
|
|
1701
1651
|
},
|
|
1702
1652
|
onPress: () => handlePress(id)
|
|
1703
1653
|
},
|
|
1704
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ React.createElement(
|
|
1705
1655
|
CustomText$1,
|
|
1706
1656
|
{
|
|
1707
1657
|
variant: FontStyle.L2_REGULAR,
|
|
@@ -1770,7 +1720,7 @@ const Tags = ({
|
|
|
1770
1720
|
);
|
|
1771
1721
|
handleTagsChange(tag);
|
|
1772
1722
|
};
|
|
1773
|
-
return /* @__PURE__ */
|
|
1723
|
+
return /* @__PURE__ */ React.createElement(
|
|
1774
1724
|
ScrollView,
|
|
1775
1725
|
{
|
|
1776
1726
|
testID,
|
|
@@ -1778,7 +1728,7 @@ const Tags = ({
|
|
|
1778
1728
|
contentContainerStyle: styles$p.contentContainer,
|
|
1779
1729
|
horizontal: false
|
|
1780
1730
|
},
|
|
1781
|
-
tags?.map((tag) => /* @__PURE__ */
|
|
1731
|
+
tags?.map((tag) => /* @__PURE__ */ React.createElement(
|
|
1782
1732
|
Pressable,
|
|
1783
1733
|
{
|
|
1784
1734
|
testID: `${testID}-${tag}-BTN`,
|
|
@@ -1790,7 +1740,7 @@ const Tags = ({
|
|
|
1790
1740
|
selectedTags.includes(tag) ? styles$p.selectedTag : styles$p.tagUnSelected
|
|
1791
1741
|
]
|
|
1792
1742
|
},
|
|
1793
|
-
/* @__PURE__ */
|
|
1743
|
+
/* @__PURE__ */ React.createElement(
|
|
1794
1744
|
CustomTypography,
|
|
1795
1745
|
{
|
|
1796
1746
|
variant: selectedTags.includes(tag) ? "H9semiBold" : "P4regular",
|
|
@@ -1798,13 +1748,13 @@ const Tags = ({
|
|
|
1798
1748
|
text: tag
|
|
1799
1749
|
}
|
|
1800
1750
|
),
|
|
1801
|
-
selectedTags.includes(tag) && icon && /* @__PURE__ */
|
|
1751
|
+
selectedTags.includes(tag) && icon && /* @__PURE__ */ React.createElement(
|
|
1802
1752
|
Pressable,
|
|
1803
1753
|
{
|
|
1804
1754
|
testID: `${testID}-${tag}-PRESS`,
|
|
1805
1755
|
onPress: () => removeTag(tag)
|
|
1806
1756
|
},
|
|
1807
|
-
|
|
1757
|
+
React.cloneElement(icon, { style: [icon.props.style, iconStyle] })
|
|
1808
1758
|
)
|
|
1809
1759
|
))
|
|
1810
1760
|
);
|
|
@@ -1871,14 +1821,14 @@ const CustomSwitch = ({
|
|
|
1871
1821
|
const animatedStyle = {
|
|
1872
1822
|
transform: [{ translateX: animatedValue }]
|
|
1873
1823
|
};
|
|
1874
|
-
return /* @__PURE__ */
|
|
1824
|
+
return /* @__PURE__ */ React.createElement(
|
|
1875
1825
|
Pressable,
|
|
1876
1826
|
{
|
|
1877
1827
|
onPress: toggleSwitch,
|
|
1878
1828
|
style: [styles$o.container, { width }],
|
|
1879
1829
|
testID: "custom-switch"
|
|
1880
1830
|
},
|
|
1881
|
-
/* @__PURE__ */
|
|
1831
|
+
/* @__PURE__ */ React.createElement(
|
|
1882
1832
|
View,
|
|
1883
1833
|
{
|
|
1884
1834
|
style: [
|
|
@@ -1888,8 +1838,8 @@ const CustomSwitch = ({
|
|
|
1888
1838
|
}
|
|
1889
1839
|
]
|
|
1890
1840
|
},
|
|
1891
|
-
/* @__PURE__ */
|
|
1892
|
-
type !== ToggleButtonType.SMALL && /* @__PURE__ */
|
|
1841
|
+
/* @__PURE__ */ React.createElement(Animated.View, { style: [styles$o.thumb, animatedStyle] }),
|
|
1842
|
+
type !== ToggleButtonType.SMALL && /* @__PURE__ */ React.createElement(
|
|
1893
1843
|
CustomTypography,
|
|
1894
1844
|
{
|
|
1895
1845
|
variant: "B3semiBold",
|
|
@@ -1936,7 +1886,8 @@ const Accordion = ({
|
|
|
1936
1886
|
optionalElement,
|
|
1937
1887
|
// Destructure the new prop,
|
|
1938
1888
|
headerComponent,
|
|
1939
|
-
disabled = false
|
|
1889
|
+
disabled = false,
|
|
1890
|
+
icon
|
|
1940
1891
|
}) => {
|
|
1941
1892
|
const contentRef = useRef(null);
|
|
1942
1893
|
const [animation] = useState(new Animated.Value(0));
|
|
@@ -1959,21 +1910,26 @@ const Accordion = ({
|
|
|
1959
1910
|
inputRange: [0, 1],
|
|
1960
1911
|
outputRange: [0, contentHeight]
|
|
1961
1912
|
});
|
|
1962
|
-
return /* @__PURE__ */
|
|
1913
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles$n.container, containerStyle], testID: testId }, /* @__PURE__ */ React.createElement(
|
|
1963
1914
|
Pressable,
|
|
1964
1915
|
{
|
|
1965
1916
|
style: [styles$n.header, headerStyle, disabled && { opacity: 0.5 }],
|
|
1966
1917
|
onPress: !disabled ? onToggle : void 0
|
|
1967
1918
|
},
|
|
1968
|
-
headerComponent ? headerComponent() : /* @__PURE__ */
|
|
1919
|
+
headerComponent ? headerComponent() : /* @__PURE__ */ React.createElement(
|
|
1969
1920
|
CustomTypography,
|
|
1970
1921
|
{
|
|
1971
1922
|
variant: "B4_REGULAR",
|
|
1972
1923
|
text: title,
|
|
1973
1924
|
style: [styles$n.title, titleStyle]
|
|
1974
1925
|
}
|
|
1975
|
-
)
|
|
1976
|
-
|
|
1926
|
+
),
|
|
1927
|
+
React.cloneElement(icon, {
|
|
1928
|
+
width: moderateScale(20),
|
|
1929
|
+
height: moderateScale(20),
|
|
1930
|
+
style: styles$n.iconStyle
|
|
1931
|
+
})
|
|
1932
|
+
), optionalElement ? optionalElement() : null, isOpen && /* @__PURE__ */ React.createElement(Animated.View, { style: [styles$n.content, { height: cardHeight }] }, /* @__PURE__ */ React.createElement(
|
|
1977
1933
|
View,
|
|
1978
1934
|
{
|
|
1979
1935
|
ref: contentRef,
|
|
@@ -2017,7 +1973,7 @@ const styles$m = StyleSheet.create({
|
|
|
2017
1973
|
}
|
|
2018
1974
|
});
|
|
2019
1975
|
|
|
2020
|
-
const Toast =
|
|
1976
|
+
const Toast = React.forwardRef(({ sucessIcon, errorIcon }, ref) => {
|
|
2021
1977
|
const [visible, setVisible] = useState(false);
|
|
2022
1978
|
const [message, setMessage] = useState("");
|
|
2023
1979
|
const [isSuccess, setIsSuccess] = useState(true);
|
|
@@ -2060,10 +2016,10 @@ const Toast = React__default.forwardRef((_props, ref) => {
|
|
|
2060
2016
|
return () => clearInterval(interval);
|
|
2061
2017
|
}
|
|
2062
2018
|
}, [visible]);
|
|
2063
|
-
|
|
2019
|
+
React.useImperativeHandle(ref, () => ({
|
|
2064
2020
|
showToast
|
|
2065
2021
|
}));
|
|
2066
|
-
return visible ? /* @__PURE__ */
|
|
2022
|
+
return visible ? /* @__PURE__ */ React.createElement(
|
|
2067
2023
|
Animated.View,
|
|
2068
2024
|
{
|
|
2069
2025
|
style: [
|
|
@@ -2073,21 +2029,21 @@ const Toast = React__default.forwardRef((_props, ref) => {
|
|
|
2073
2029
|
],
|
|
2074
2030
|
testID: "TOAST"
|
|
2075
2031
|
},
|
|
2076
|
-
/* @__PURE__ */
|
|
2032
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$m.toastContainer }, /* @__PURE__ */ React.createElement(View, { style: styles$m.innerContainer }, isSuccess ? sucessIcon : errorIcon, /* @__PURE__ */ React.createElement(
|
|
2077
2033
|
CustomTypography,
|
|
2078
2034
|
{
|
|
2079
2035
|
variant: "L2_REGULAR",
|
|
2080
2036
|
text: message,
|
|
2081
2037
|
style: styles$m.messageText
|
|
2082
2038
|
}
|
|
2083
|
-
), btnText && /* @__PURE__ */
|
|
2039
|
+
), btnText && /* @__PURE__ */ React.createElement(
|
|
2084
2040
|
Pressable,
|
|
2085
2041
|
{
|
|
2086
2042
|
style: styles$m.button,
|
|
2087
2043
|
onPress: onBtnPress || void 0,
|
|
2088
2044
|
testID: "TOAST-BTN"
|
|
2089
2045
|
},
|
|
2090
|
-
/* @__PURE__ */
|
|
2046
|
+
/* @__PURE__ */ React.createElement(
|
|
2091
2047
|
CustomTypography,
|
|
2092
2048
|
{
|
|
2093
2049
|
variant: "L2_BOLD",
|
|
@@ -2096,7 +2052,7 @@ const Toast = React__default.forwardRef((_props, ref) => {
|
|
|
2096
2052
|
}
|
|
2097
2053
|
)
|
|
2098
2054
|
))),
|
|
2099
|
-
/* @__PURE__ */
|
|
2055
|
+
/* @__PURE__ */ React.createElement(
|
|
2100
2056
|
Progress.Bar,
|
|
2101
2057
|
{
|
|
2102
2058
|
progress,
|
|
@@ -2141,14 +2097,15 @@ const CustomSearchBar = ({
|
|
|
2141
2097
|
onCrossIconPress,
|
|
2142
2098
|
handleOnChangeText,
|
|
2143
2099
|
setValue,
|
|
2144
|
-
|
|
2100
|
+
searchIcon,
|
|
2101
|
+
rightIcon,
|
|
2145
2102
|
disableBorderColor = "#4F4F4F",
|
|
2146
2103
|
borderColor = "#FFFFFF",
|
|
2147
2104
|
disablePlaceHolderStyle = "#686868",
|
|
2148
2105
|
enablePlaceHolderStyle = "#A7A7A7",
|
|
2149
2106
|
...props
|
|
2150
2107
|
}) => {
|
|
2151
|
-
return /* @__PURE__ */
|
|
2108
|
+
return /* @__PURE__ */ React.createElement(
|
|
2152
2109
|
View,
|
|
2153
2110
|
{
|
|
2154
2111
|
testID,
|
|
@@ -2161,7 +2118,7 @@ const CustomSearchBar = ({
|
|
|
2161
2118
|
inputContainerStyle
|
|
2162
2119
|
]
|
|
2163
2120
|
},
|
|
2164
|
-
/* @__PURE__ */
|
|
2121
|
+
/* @__PURE__ */ React.createElement(
|
|
2165
2122
|
Pressable,
|
|
2166
2123
|
{
|
|
2167
2124
|
onPress: () => {
|
|
@@ -2169,9 +2126,14 @@ const CustomSearchBar = ({
|
|
|
2169
2126
|
onSearchIconPress?.();
|
|
2170
2127
|
},
|
|
2171
2128
|
style: searchIconStyle
|
|
2172
|
-
}
|
|
2129
|
+
},
|
|
2130
|
+
React.cloneElement(searchIcon, {
|
|
2131
|
+
width: moderateScale(24),
|
|
2132
|
+
height: moderateScale(24),
|
|
2133
|
+
style: [styles$l.searchIconStyle, searchIconStyle]
|
|
2134
|
+
})
|
|
2173
2135
|
),
|
|
2174
|
-
/* @__PURE__ */
|
|
2136
|
+
/* @__PURE__ */ React.createElement(
|
|
2175
2137
|
TextInput,
|
|
2176
2138
|
{
|
|
2177
2139
|
...props,
|
|
@@ -2186,7 +2148,7 @@ const CustomSearchBar = ({
|
|
|
2186
2148
|
}
|
|
2187
2149
|
}
|
|
2188
2150
|
),
|
|
2189
|
-
value && /* @__PURE__ */
|
|
2151
|
+
value && /* @__PURE__ */ React.createElement(
|
|
2190
2152
|
Pressable,
|
|
2191
2153
|
{
|
|
2192
2154
|
onPress: () => {
|
|
@@ -2195,11 +2157,11 @@ const CustomSearchBar = ({
|
|
|
2195
2157
|
},
|
|
2196
2158
|
style: crossIconStyle
|
|
2197
2159
|
},
|
|
2198
|
-
|
|
2160
|
+
rightIcon ? React.cloneElement(rightIcon, {
|
|
2199
2161
|
// width: moderateScale(24),
|
|
2200
2162
|
// height: moderateScale(24),
|
|
2201
2163
|
style: [styles$l.crossIconStyle, crossIconStyle]
|
|
2202
|
-
})
|
|
2164
|
+
}) : null
|
|
2203
2165
|
)
|
|
2204
2166
|
);
|
|
2205
2167
|
};
|
|
@@ -2229,31 +2191,31 @@ const styles$k = StyleSheet.create({
|
|
|
2229
2191
|
const CustomHeader = ({
|
|
2230
2192
|
title,
|
|
2231
2193
|
testId = "CUSTOM-HEADER",
|
|
2232
|
-
leftIcon
|
|
2233
|
-
rightIcon
|
|
2194
|
+
leftIcon,
|
|
2195
|
+
rightIcon,
|
|
2234
2196
|
showLeftIcon = true,
|
|
2235
2197
|
showRightIcon = true,
|
|
2236
2198
|
onLeftPress,
|
|
2237
2199
|
onRightPress
|
|
2238
2200
|
}) => {
|
|
2239
|
-
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, {
|
|
2240
2202
|
width: moderateScale(24),
|
|
2241
2203
|
height: moderateScale(24),
|
|
2242
2204
|
onPress: onLeftPress,
|
|
2243
2205
|
style: styles$k.leftIconStyle
|
|
2244
|
-
}), /* @__PURE__ */
|
|
2206
|
+
}) : null, /* @__PURE__ */ React.createElement(
|
|
2245
2207
|
CustomTypography,
|
|
2246
2208
|
{
|
|
2247
2209
|
variant: "B2_REGULAR",
|
|
2248
2210
|
text: title,
|
|
2249
2211
|
style: styles$k.headerTitle
|
|
2250
2212
|
}
|
|
2251
|
-
)), showRightIcon &&
|
|
2213
|
+
)), showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
2252
2214
|
width: moderateScale(24),
|
|
2253
2215
|
height: moderateScale(24),
|
|
2254
2216
|
onPress: onRightPress,
|
|
2255
2217
|
style: styles$k.rightIconStyle
|
|
2256
|
-
}));
|
|
2218
|
+
}) : null);
|
|
2257
2219
|
};
|
|
2258
2220
|
|
|
2259
2221
|
const styles$j = StyleSheet.create({
|
|
@@ -2312,7 +2274,7 @@ const SwipableList = (props) => {
|
|
|
2312
2274
|
onPress,
|
|
2313
2275
|
style,
|
|
2314
2276
|
testID
|
|
2315
|
-
}) => /* @__PURE__ */
|
|
2277
|
+
}) => /* @__PURE__ */ React.createElement(
|
|
2316
2278
|
Pressable,
|
|
2317
2279
|
{
|
|
2318
2280
|
testID,
|
|
@@ -2320,7 +2282,7 @@ const SwipableList = (props) => {
|
|
|
2320
2282
|
style: [styles$j.actionButton, style]
|
|
2321
2283
|
},
|
|
2322
2284
|
icon,
|
|
2323
|
-
/* @__PURE__ */
|
|
2285
|
+
/* @__PURE__ */ React.createElement(
|
|
2324
2286
|
CustomTypography,
|
|
2325
2287
|
{
|
|
2326
2288
|
variant: "L1_REGULAR",
|
|
@@ -2329,7 +2291,7 @@ const SwipableList = (props) => {
|
|
|
2329
2291
|
}
|
|
2330
2292
|
)
|
|
2331
2293
|
);
|
|
2332
|
-
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(
|
|
2333
2295
|
ActionButton,
|
|
2334
2296
|
{
|
|
2335
2297
|
icon: leftPrimaryActionIcon,
|
|
@@ -2338,7 +2300,7 @@ const SwipableList = (props) => {
|
|
|
2338
2300
|
style: leftPrimaryActionStyle,
|
|
2339
2301
|
testID: `${testId}-LEFT-PRIMARY-${item.id}`
|
|
2340
2302
|
}
|
|
2341
|
-
), leftSecondaryActionIcon && /* @__PURE__ */
|
|
2303
|
+
), leftSecondaryActionIcon && /* @__PURE__ */ React.createElement(
|
|
2342
2304
|
ActionButton,
|
|
2343
2305
|
{
|
|
2344
2306
|
icon: leftSecondaryActionIcon,
|
|
@@ -2348,7 +2310,7 @@ const SwipableList = (props) => {
|
|
|
2348
2310
|
testID: `${testId}-LEFT-SECONDARY-${item.id}`
|
|
2349
2311
|
}
|
|
2350
2312
|
));
|
|
2351
|
-
const rightActionHandle = (item) => /* @__PURE__ */
|
|
2313
|
+
const rightActionHandle = (item) => /* @__PURE__ */ React.createElement(View, { style: [styles$j.rightActions, rightPrimaryActionStyle] }, rightPrimaryActionIcon && /* @__PURE__ */ React.createElement(
|
|
2352
2314
|
ActionButton,
|
|
2353
2315
|
{
|
|
2354
2316
|
icon: rightPrimaryActionIcon,
|
|
@@ -2358,7 +2320,7 @@ const SwipableList = (props) => {
|
|
|
2358
2320
|
testID: `${testId}-RIGHT-PRIMARY-${item.id}`
|
|
2359
2321
|
}
|
|
2360
2322
|
));
|
|
2361
|
-
const renderItem = ({ item }) => /* @__PURE__ */
|
|
2323
|
+
const renderItem = ({ item }) => /* @__PURE__ */ React.createElement(GestureHandlerRootView, { testID: `${testId}-LIST`, style: styles$j.container }, /* @__PURE__ */ React.createElement(
|
|
2362
2324
|
Swipeable,
|
|
2363
2325
|
{
|
|
2364
2326
|
renderLeftActions: () => leftActionHandle(
|
|
@@ -2373,13 +2335,13 @@ const SwipableList = (props) => {
|
|
|
2373
2335
|
},
|
|
2374
2336
|
props?.renderItem(item)
|
|
2375
2337
|
));
|
|
2376
|
-
return /* @__PURE__ */
|
|
2338
|
+
return /* @__PURE__ */ React.createElement(View, { testID: testId }, /* @__PURE__ */ React.createElement(
|
|
2377
2339
|
FlatList,
|
|
2378
2340
|
{
|
|
2379
2341
|
data,
|
|
2380
2342
|
renderItem,
|
|
2381
2343
|
keyExtractor: (item) => item.id,
|
|
2382
|
-
ItemSeparatorComponent: () => /* @__PURE__ */
|
|
2344
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ React.createElement(View, { style: styles$j.seprator })
|
|
2383
2345
|
}
|
|
2384
2346
|
));
|
|
2385
2347
|
};
|
|
@@ -2403,7 +2365,7 @@ const CustomIcon = ({
|
|
|
2403
2365
|
containerStyle,
|
|
2404
2366
|
titleStyle
|
|
2405
2367
|
}) => {
|
|
2406
|
-
return /* @__PURE__ */
|
|
2368
|
+
return /* @__PURE__ */ React.createElement(
|
|
2407
2369
|
Pressable,
|
|
2408
2370
|
{
|
|
2409
2371
|
style: [styles$i.container, containerStyle],
|
|
@@ -2411,7 +2373,7 @@ const CustomIcon = ({
|
|
|
2411
2373
|
testID: testId
|
|
2412
2374
|
},
|
|
2413
2375
|
icon,
|
|
2414
|
-
title && /* @__PURE__ */
|
|
2376
|
+
title && /* @__PURE__ */ React.createElement(
|
|
2415
2377
|
CustomTypography,
|
|
2416
2378
|
{
|
|
2417
2379
|
variant: titleVariant,
|
|
@@ -2437,12 +2399,12 @@ const styles$h = StyleSheet.create({
|
|
|
2437
2399
|
|
|
2438
2400
|
const CustomLoader = ({ loading }) => {
|
|
2439
2401
|
if (!loading) return null;
|
|
2440
|
-
return /* @__PURE__ */
|
|
2402
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$h.container }, /* @__PURE__ */ React.createElement(ActivityIndicator, { size: "large", color: "#686868" }));
|
|
2441
2403
|
};
|
|
2442
2404
|
|
|
2443
2405
|
const HorizontalLine = ({ style }) => {
|
|
2444
2406
|
const { theme } = useTheme();
|
|
2445
|
-
return /* @__PURE__ */
|
|
2407
|
+
return /* @__PURE__ */ React.createElement(
|
|
2446
2408
|
View,
|
|
2447
2409
|
{
|
|
2448
2410
|
style: [
|
|
@@ -2469,7 +2431,7 @@ const Topic = ({
|
|
|
2469
2431
|
containterStyle
|
|
2470
2432
|
}) => {
|
|
2471
2433
|
const { theme } = useTheme();
|
|
2472
|
-
return /* @__PURE__ */
|
|
2434
|
+
return /* @__PURE__ */ React.createElement(
|
|
2473
2435
|
TouchableOpacity,
|
|
2474
2436
|
{
|
|
2475
2437
|
style: [
|
|
@@ -2479,15 +2441,15 @@ const Topic = ({
|
|
|
2479
2441
|
],
|
|
2480
2442
|
onPress
|
|
2481
2443
|
},
|
|
2482
|
-
rightIcon && /* @__PURE__ */
|
|
2483
|
-
/* @__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(
|
|
2484
2446
|
CustomText$1,
|
|
2485
2447
|
{
|
|
2486
2448
|
text: subTitle,
|
|
2487
2449
|
variant: "L3_REGULAR",
|
|
2488
2450
|
textColor: "CONTENT_PRIMARY"
|
|
2489
2451
|
}
|
|
2490
|
-
), /* @__PURE__ */
|
|
2452
|
+
), /* @__PURE__ */ React.createElement(
|
|
2491
2453
|
CustomText$1,
|
|
2492
2454
|
{
|
|
2493
2455
|
text: title,
|
|
@@ -2575,27 +2537,27 @@ const ContactModal = ({
|
|
|
2575
2537
|
onClose();
|
|
2576
2538
|
};
|
|
2577
2539
|
const emailOptions = ["Mail", "Gmail", "Outlook"];
|
|
2578
|
-
const renderEmailOptions = () => /* @__PURE__ */
|
|
2540
|
+
const renderEmailOptions = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
2579
2541
|
CustomText$1,
|
|
2580
2542
|
{
|
|
2581
2543
|
style: styles$e.title,
|
|
2582
2544
|
text: "Open email app",
|
|
2583
2545
|
variant: "L2_REGULAR"
|
|
2584
2546
|
}
|
|
2585
|
-
), /* @__PURE__ */
|
|
2547
|
+
), /* @__PURE__ */ React.createElement(
|
|
2586
2548
|
CustomText$1,
|
|
2587
2549
|
{
|
|
2588
2550
|
style: styles$e.subtitle,
|
|
2589
2551
|
text: "Which app would you like to open?",
|
|
2590
2552
|
variant: "L2_REGULAR"
|
|
2591
2553
|
}
|
|
2592
|
-
), emailOptions.map((option) => /* @__PURE__ */
|
|
2554
|
+
), emailOptions.map((option) => /* @__PURE__ */ React.createElement(React.Fragment, { key: option }, /* @__PURE__ */ React.createElement(Line, null), /* @__PURE__ */ React.createElement(
|
|
2593
2555
|
Pressable,
|
|
2594
2556
|
{
|
|
2595
2557
|
onPress: () => handleOptionPress(),
|
|
2596
2558
|
style: styles$e.optionButton
|
|
2597
2559
|
},
|
|
2598
|
-
/* @__PURE__ */
|
|
2560
|
+
/* @__PURE__ */ React.createElement(
|
|
2599
2561
|
CustomText$1,
|
|
2600
2562
|
{
|
|
2601
2563
|
style: styles$e.optionText,
|
|
@@ -2604,14 +2566,14 @@ const ContactModal = ({
|
|
|
2604
2566
|
}
|
|
2605
2567
|
)
|
|
2606
2568
|
))));
|
|
2607
|
-
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(
|
|
2608
2570
|
CustomText$1,
|
|
2609
2571
|
{
|
|
2610
2572
|
style: styles$e.optionText,
|
|
2611
2573
|
text: `Call ${phoneNumber}`,
|
|
2612
2574
|
variant: "B3_BOLD"
|
|
2613
2575
|
}
|
|
2614
|
-
))), /* @__PURE__ */
|
|
2576
|
+
))), /* @__PURE__ */ React.createElement(Pressable, { onPress: onClose, style: styles$e.cancelButton }, /* @__PURE__ */ React.createElement(
|
|
2615
2577
|
CustomText$1,
|
|
2616
2578
|
{
|
|
2617
2579
|
style: styles$e.cancelText,
|
|
@@ -2619,7 +2581,7 @@ const ContactModal = ({
|
|
|
2619
2581
|
variant: "B2_REGULAR"
|
|
2620
2582
|
}
|
|
2621
2583
|
)));
|
|
2622
|
-
return /* @__PURE__ */
|
|
2584
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$e.container }, /* @__PURE__ */ React.createElement(
|
|
2623
2585
|
Modal,
|
|
2624
2586
|
{
|
|
2625
2587
|
animationType: "slide",
|
|
@@ -2627,7 +2589,7 @@ const ContactModal = ({
|
|
|
2627
2589
|
visible,
|
|
2628
2590
|
onRequestClose: onClose
|
|
2629
2591
|
},
|
|
2630
|
-
/* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$e.modalContainer }, /* @__PURE__ */ React.createElement(View, { style: styles$e.modalContent }, renderContent()))
|
|
2631
2593
|
));
|
|
2632
2594
|
};
|
|
2633
2595
|
const styles$e = StyleSheet.create({
|
|
@@ -2750,7 +2712,7 @@ const DateRangePicker = (props) => {
|
|
|
2750
2712
|
return markedDates;
|
|
2751
2713
|
};
|
|
2752
2714
|
const isButtonDisabled = !selectedRange.startDate || !selectedRange.endDate;
|
|
2753
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ React.createElement(View, null, /* @__PURE__ */ React.createElement(
|
|
2754
2716
|
Calendar,
|
|
2755
2717
|
{
|
|
2756
2718
|
markedDates: getMarkedDates(),
|
|
@@ -2770,7 +2732,7 @@ const DateRangePicker = (props) => {
|
|
|
2770
2732
|
onDayPress,
|
|
2771
2733
|
...props
|
|
2772
2734
|
}
|
|
2773
|
-
), /* @__PURE__ */
|
|
2735
|
+
), /* @__PURE__ */ React.createElement(
|
|
2774
2736
|
CustomButton$1,
|
|
2775
2737
|
{
|
|
2776
2738
|
title: "Apply",
|
|
@@ -2797,7 +2759,7 @@ const OurOfficesButton = ({
|
|
|
2797
2759
|
descriptionColor = "CONTENT_SECONDARY"
|
|
2798
2760
|
}) => {
|
|
2799
2761
|
const { theme } = useTheme();
|
|
2800
|
-
return /* @__PURE__ */
|
|
2762
|
+
return /* @__PURE__ */ React.createElement(
|
|
2801
2763
|
TouchableOpacity,
|
|
2802
2764
|
{
|
|
2803
2765
|
style: [
|
|
@@ -2807,8 +2769,8 @@ const OurOfficesButton = ({
|
|
|
2807
2769
|
],
|
|
2808
2770
|
onPress
|
|
2809
2771
|
},
|
|
2810
|
-
leftIcon && /* @__PURE__ */
|
|
2811
|
-
/* @__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(
|
|
2812
2774
|
CustomText$1,
|
|
2813
2775
|
{
|
|
2814
2776
|
text: title,
|
|
@@ -2816,7 +2778,7 @@ const OurOfficesButton = ({
|
|
|
2816
2778
|
textColor: titleColor,
|
|
2817
2779
|
style: styles$c.textView
|
|
2818
2780
|
}
|
|
2819
|
-
), /* @__PURE__ */
|
|
2781
|
+
), /* @__PURE__ */ React.createElement(
|
|
2820
2782
|
CustomText$1,
|
|
2821
2783
|
{
|
|
2822
2784
|
text: description,
|
|
@@ -2825,7 +2787,7 @@ const OurOfficesButton = ({
|
|
|
2825
2787
|
style: styles$c.flexWrap
|
|
2826
2788
|
}
|
|
2827
2789
|
)),
|
|
2828
|
-
rightIcon && /* @__PURE__ */
|
|
2790
|
+
rightIcon && /* @__PURE__ */ React.createElement(View, { style: styles$c.rightIconContainer }, React.cloneElement(rightIcon))
|
|
2829
2791
|
);
|
|
2830
2792
|
};
|
|
2831
2793
|
const styles$c = StyleSheet.create({
|
|
@@ -2875,12 +2837,13 @@ const styles$b = StyleSheet.create({
|
|
|
2875
2837
|
});
|
|
2876
2838
|
|
|
2877
2839
|
const NotificationBandge = ({
|
|
2878
|
-
notificationCount = 0
|
|
2840
|
+
notificationCount = 0,
|
|
2841
|
+
icon
|
|
2879
2842
|
}) => {
|
|
2880
2843
|
if (notificationCount <= 0) {
|
|
2881
|
-
return
|
|
2844
|
+
return icon;
|
|
2882
2845
|
}
|
|
2883
|
-
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)));
|
|
2884
2847
|
};
|
|
2885
2848
|
|
|
2886
2849
|
const ScrollableList = ({
|
|
@@ -2898,7 +2861,7 @@ const ScrollableList = ({
|
|
|
2898
2861
|
data && data.length > 0 ? data[0].name : null
|
|
2899
2862
|
);
|
|
2900
2863
|
const { theme } = useTheme();
|
|
2901
|
-
return /* @__PURE__ */
|
|
2864
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles$a.container, containerStyle] }, /* @__PURE__ */ React.createElement(
|
|
2902
2865
|
ScrollView,
|
|
2903
2866
|
{
|
|
2904
2867
|
horizontal: true,
|
|
@@ -2908,7 +2871,7 @@ const ScrollableList = ({
|
|
|
2908
2871
|
scrollViewContentStyle
|
|
2909
2872
|
]
|
|
2910
2873
|
},
|
|
2911
|
-
data?.map((item) => /* @__PURE__ */
|
|
2874
|
+
data?.map((item) => /* @__PURE__ */ React.createElement(
|
|
2912
2875
|
Pressable,
|
|
2913
2876
|
{
|
|
2914
2877
|
key: item.value,
|
|
@@ -2925,7 +2888,7 @@ const ScrollableList = ({
|
|
|
2925
2888
|
handleSelectCategory(item.name, item.value);
|
|
2926
2889
|
}
|
|
2927
2890
|
},
|
|
2928
|
-
/* @__PURE__ */
|
|
2891
|
+
/* @__PURE__ */ React.createElement(
|
|
2929
2892
|
CustomText$1,
|
|
2930
2893
|
{
|
|
2931
2894
|
text: item.name,
|
|
@@ -2933,7 +2896,7 @@ const ScrollableList = ({
|
|
|
2933
2896
|
textColor: (activeTab ?? selectedItem) === item.name ? selectedItemTextColor : defaultItemTextColor
|
|
2934
2897
|
}
|
|
2935
2898
|
),
|
|
2936
|
-
item?.isError && /* @__PURE__ */
|
|
2899
|
+
item?.isError && /* @__PURE__ */ React.createElement(
|
|
2937
2900
|
View,
|
|
2938
2901
|
{
|
|
2939
2902
|
style: [
|
|
@@ -3027,7 +2990,7 @@ const FeedbackForm = ({
|
|
|
3027
2990
|
setFeedback
|
|
3028
2991
|
}) => {
|
|
3029
2992
|
const maxChars = 200;
|
|
3030
|
-
return /* @__PURE__ */
|
|
2993
|
+
return /* @__PURE__ */ React.createElement(View, { style: styles$9.container }, /* @__PURE__ */ React.createElement(Text, { style: styles$9.headerText }, title), /* @__PURE__ */ React.createElement(
|
|
3031
2994
|
TextInput,
|
|
3032
2995
|
{
|
|
3033
2996
|
style: [styles$9.textInput, { height: Math.max(100) }],
|
|
@@ -3038,7 +3001,7 @@ const FeedbackForm = ({
|
|
|
3038
3001
|
value: feedback,
|
|
3039
3002
|
onChangeText: (text) => setFeedback(text)
|
|
3040
3003
|
}
|
|
3041
|
-
), /* @__PURE__ */
|
|
3004
|
+
), /* @__PURE__ */ React.createElement(
|
|
3042
3005
|
CustomText$1,
|
|
3043
3006
|
{
|
|
3044
3007
|
text: `${feedback.length}/${maxChars} characters`,
|
|
@@ -3046,14 +3009,14 @@ const FeedbackForm = ({
|
|
|
3046
3009
|
textColor: "CONTENT_SECONDRY",
|
|
3047
3010
|
style: styles$9.charCounter
|
|
3048
3011
|
}
|
|
3049
|
-
), /* @__PURE__ */
|
|
3012
|
+
), /* @__PURE__ */ React.createElement(View, { style: styles$9.buttonContainer }, /* @__PURE__ */ React.createElement(Pressable, { style: styles$9.feedbackButton, onPress: handleSendFeedback }, /* @__PURE__ */ React.createElement(
|
|
3050
3013
|
CustomText$1,
|
|
3051
3014
|
{
|
|
3052
3015
|
text: "Send feedback",
|
|
3053
3016
|
variant: "L1_REGULAR",
|
|
3054
3017
|
textColor: "CONTENT_PRIMARY"
|
|
3055
3018
|
}
|
|
3056
|
-
)), /* @__PURE__ */
|
|
3019
|
+
)), /* @__PURE__ */ React.createElement(Pressable, { style: styles$9.cancelButton, onPress: clearAllData }, /* @__PURE__ */ React.createElement(
|
|
3057
3020
|
CustomText$1,
|
|
3058
3021
|
{
|
|
3059
3022
|
text: "Cancel",
|
|
@@ -3090,7 +3053,7 @@ const CountryDropDown = ({
|
|
|
3090
3053
|
setCallingCode(`+${country.callingCode[0]}`);
|
|
3091
3054
|
getCountryCode(`+${country.callingCode[0]}`);
|
|
3092
3055
|
};
|
|
3093
|
-
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(
|
|
3094
3057
|
CountryPicker,
|
|
3095
3058
|
{
|
|
3096
3059
|
withFilter: true,
|
|
@@ -3100,21 +3063,21 @@ const CountryDropDown = ({
|
|
|
3100
3063
|
onSelect: handleSelect,
|
|
3101
3064
|
visible: pickerVisible
|
|
3102
3065
|
}
|
|
3103
|
-
), /* @__PURE__ */
|
|
3066
|
+
), /* @__PURE__ */ React.createElement(
|
|
3104
3067
|
Text,
|
|
3105
3068
|
{
|
|
3106
3069
|
onPress: () => setPickerVisible(true),
|
|
3107
3070
|
style: [styles$8.callingCode, callingCodeStyle]
|
|
3108
3071
|
},
|
|
3109
3072
|
callingCode
|
|
3110
|
-
)), /* @__PURE__ */
|
|
3073
|
+
)), /* @__PURE__ */ React.createElement(View, { style: styles$8.flex }, (isFocused || value) && /* @__PURE__ */ React.createElement(
|
|
3111
3074
|
CustomTypography,
|
|
3112
3075
|
{
|
|
3113
3076
|
variant: "L2_REGULAR",
|
|
3114
3077
|
text: label ?? "",
|
|
3115
3078
|
style: styles$8.floatingLabel
|
|
3116
3079
|
}
|
|
3117
|
-
), /* @__PURE__ */
|
|
3080
|
+
), /* @__PURE__ */ React.createElement(
|
|
3118
3081
|
TextInput,
|
|
3119
3082
|
{
|
|
3120
3083
|
style: [styles$8.input, inputStyle],
|
|
@@ -3127,7 +3090,7 @@ const CountryDropDown = ({
|
|
|
3127
3090
|
maxLength,
|
|
3128
3091
|
placeholderTextColor: theme.CONTENT_SECONDRY["light"]
|
|
3129
3092
|
}
|
|
3130
|
-
))), errorMessage ? /* @__PURE__ */
|
|
3093
|
+
))), errorMessage ? /* @__PURE__ */ React.createElement(
|
|
3131
3094
|
CustomTypography,
|
|
3132
3095
|
{
|
|
3133
3096
|
variant: "L2_REGULAR",
|
|
@@ -3203,7 +3166,7 @@ const CommonTextInput = ({
|
|
|
3203
3166
|
handlePress,
|
|
3204
3167
|
pointerEvents
|
|
3205
3168
|
}) => {
|
|
3206
|
-
return /* @__PURE__ */
|
|
3169
|
+
return /* @__PURE__ */ React.createElement(Pressable, { onPress: handlePress, style: styles$7.container }, /* @__PURE__ */ React.createElement(
|
|
3207
3170
|
TextInput$1,
|
|
3208
3171
|
{
|
|
3209
3172
|
mode: "outlined",
|
|
@@ -3228,7 +3191,7 @@ const CommonTextInput = ({
|
|
|
3228
3191
|
editable,
|
|
3229
3192
|
pointerEvents
|
|
3230
3193
|
}
|
|
3231
|
-
), errorMessage ? /* @__PURE__ */
|
|
3194
|
+
), errorMessage ? /* @__PURE__ */ React.createElement(
|
|
3232
3195
|
CustomTypography,
|
|
3233
3196
|
{
|
|
3234
3197
|
variant: "L2_REGULAR",
|
|
@@ -3293,7 +3256,7 @@ const CustomDropdown = ({
|
|
|
3293
3256
|
const [isFocus, setIsFocus] = useState(false);
|
|
3294
3257
|
const renderLabel = () => {
|
|
3295
3258
|
if (value || isFocus) {
|
|
3296
|
-
return /* @__PURE__ */
|
|
3259
|
+
return /* @__PURE__ */ React.createElement(
|
|
3297
3260
|
Text,
|
|
3298
3261
|
{
|
|
3299
3262
|
style: [
|
|
@@ -3315,7 +3278,7 @@ const CustomDropdown = ({
|
|
|
3315
3278
|
onValueChange(newValue);
|
|
3316
3279
|
}
|
|
3317
3280
|
};
|
|
3318
|
-
return /* @__PURE__ */
|
|
3281
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles$6.container, containerStyle] }, label && renderLabel(), /* @__PURE__ */ React.createElement(
|
|
3319
3282
|
Dropdown,
|
|
3320
3283
|
{
|
|
3321
3284
|
style: [
|
|
@@ -3433,20 +3396,20 @@ const CustomSwitchBtn = ({
|
|
|
3433
3396
|
const toggleSwitch = () => {
|
|
3434
3397
|
onValueChange(!value);
|
|
3435
3398
|
};
|
|
3436
|
-
return /* @__PURE__ */
|
|
3399
|
+
return /* @__PURE__ */ React.createElement(
|
|
3437
3400
|
Pressable,
|
|
3438
3401
|
{
|
|
3439
3402
|
disabled,
|
|
3440
3403
|
onPress: toggleSwitch,
|
|
3441
3404
|
style: { ...styles$5.mainContainer, ...containerStyle }
|
|
3442
3405
|
},
|
|
3443
|
-
/* @__PURE__ */
|
|
3406
|
+
/* @__PURE__ */ React.createElement(
|
|
3444
3407
|
Animated.View,
|
|
3445
3408
|
{
|
|
3446
3409
|
style: [styles$5.circle, { transform: [{ translateX }], ...circleStyle }]
|
|
3447
3410
|
}
|
|
3448
3411
|
),
|
|
3449
|
-
/* @__PURE__ */
|
|
3412
|
+
/* @__PURE__ */ React.createElement(
|
|
3450
3413
|
CustomTypography,
|
|
3451
3414
|
{
|
|
3452
3415
|
style: [styles$5.activeText, value ? inActiveTextStyle : activeTextStyle],
|
|
@@ -3454,7 +3417,7 @@ const CustomSwitchBtn = ({
|
|
|
3454
3417
|
variant: activeTextVariant
|
|
3455
3418
|
}
|
|
3456
3419
|
),
|
|
3457
|
-
/* @__PURE__ */
|
|
3420
|
+
/* @__PURE__ */ React.createElement(
|
|
3458
3421
|
CustomTypography,
|
|
3459
3422
|
{
|
|
3460
3423
|
style: [
|
|
@@ -3506,7 +3469,7 @@ const TagsComponent = ({
|
|
|
3506
3469
|
}
|
|
3507
3470
|
return tagList;
|
|
3508
3471
|
};
|
|
3509
|
-
const renderTagItem = ({ item }) => /* @__PURE__ */
|
|
3472
|
+
const renderTagItem = ({ item }) => /* @__PURE__ */ React.createElement(
|
|
3510
3473
|
Pressable,
|
|
3511
3474
|
{
|
|
3512
3475
|
onPress: () => handleTagPress?.(item.name),
|
|
@@ -3515,7 +3478,7 @@ const TagsComponent = ({
|
|
|
3515
3478
|
selectedTag === item?.name ? styles$4.selectedTagButton : styles$4.unselectedTagButton
|
|
3516
3479
|
]
|
|
3517
3480
|
},
|
|
3518
|
-
/* @__PURE__ */
|
|
3481
|
+
/* @__PURE__ */ React.createElement(
|
|
3519
3482
|
Text,
|
|
3520
3483
|
{
|
|
3521
3484
|
style: [
|
|
@@ -3525,9 +3488,9 @@ const TagsComponent = ({
|
|
|
3525
3488
|
},
|
|
3526
3489
|
item?.name
|
|
3527
3490
|
),
|
|
3528
|
-
selectedTag === item?.name && /* @__PURE__ */
|
|
3491
|
+
selectedTag === item?.name && /* @__PURE__ */ React.createElement(Text, { style: styles$4.closeButton }, "\u2715")
|
|
3529
3492
|
);
|
|
3530
|
-
return /* @__PURE__ */
|
|
3493
|
+
return /* @__PURE__ */ React.createElement(View, null, /* @__PURE__ */ React.createElement(
|
|
3531
3494
|
FlatList,
|
|
3532
3495
|
{
|
|
3533
3496
|
data: reorderedTags(),
|
|
@@ -3610,7 +3573,10 @@ const CustomDocumentPicker = ({
|
|
|
3610
3573
|
fileTypes = [DocumentPicker.types.images, DocumentPicker.types.pdf],
|
|
3611
3574
|
containerStyle,
|
|
3612
3575
|
titleStyle,
|
|
3613
|
-
hintStyle
|
|
3576
|
+
hintStyle,
|
|
3577
|
+
fileIcon,
|
|
3578
|
+
uploadIcon,
|
|
3579
|
+
deleteIcon
|
|
3614
3580
|
}) => {
|
|
3615
3581
|
const [error, setError] = useState("");
|
|
3616
3582
|
const [docDetails, setDocDetails] = useState();
|
|
@@ -3640,10 +3606,10 @@ const CustomDocumentPicker = ({
|
|
|
3640
3606
|
}
|
|
3641
3607
|
}
|
|
3642
3608
|
}, [fileTypes, maxFileSize, onDocumentUpload]);
|
|
3643
|
-
useCallback(() => {
|
|
3609
|
+
const removeDocument = useCallback(() => {
|
|
3644
3610
|
setDocDetails(void 0);
|
|
3645
3611
|
}, []);
|
|
3646
|
-
return /* @__PURE__ */
|
|
3612
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
3647
3613
|
View,
|
|
3648
3614
|
{
|
|
3649
3615
|
style: [
|
|
@@ -3653,22 +3619,25 @@ const CustomDocumentPicker = ({
|
|
|
3653
3619
|
containerStyle
|
|
3654
3620
|
]
|
|
3655
3621
|
},
|
|
3656
|
-
/* @__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(
|
|
3657
3623
|
CustomTypography,
|
|
3658
3624
|
{
|
|
3659
3625
|
variant: FontStyle.L2_REGULAR,
|
|
3660
3626
|
text: docDetails?.name ?? title,
|
|
3661
3627
|
style: [{ color: theme.CONTENT_PRIMARY }, titleStyle]
|
|
3662
3628
|
}
|
|
3663
|
-
), !docDetails && /* @__PURE__ */
|
|
3629
|
+
), !docDetails && /* @__PURE__ */ React.createElement(
|
|
3664
3630
|
CustomTypography,
|
|
3665
3631
|
{
|
|
3666
3632
|
variant: FontStyle.L3_REGULAR,
|
|
3667
3633
|
text: hint,
|
|
3668
3634
|
style: [{ color: theme.CONTENT_SECONDRY }, hintStyle]
|
|
3669
3635
|
}
|
|
3670
|
-
)))
|
|
3671
|
-
|
|
3636
|
+
))),
|
|
3637
|
+
docDetails && React.cloneElement(deleteIcon, {
|
|
3638
|
+
onPress: removeDocument
|
|
3639
|
+
})
|
|
3640
|
+
), error && /* @__PURE__ */ React.createElement(
|
|
3672
3641
|
CustomTypography,
|
|
3673
3642
|
{
|
|
3674
3643
|
variant: FontStyle.L2_REGULAR,
|
|
@@ -3704,7 +3673,7 @@ const styles$2 = StyleSheet.create({
|
|
|
3704
3673
|
}
|
|
3705
3674
|
});
|
|
3706
3675
|
|
|
3707
|
-
const OTPInput =
|
|
3676
|
+
const OTPInput = React.forwardRef(
|
|
3708
3677
|
({
|
|
3709
3678
|
length = 4,
|
|
3710
3679
|
onComplete,
|
|
@@ -3732,7 +3701,7 @@ const OTPInput = React__default.forwardRef(
|
|
|
3732
3701
|
setIsResendOtpEnable(true);
|
|
3733
3702
|
}, 5e3);
|
|
3734
3703
|
};
|
|
3735
|
-
|
|
3704
|
+
React.useImperativeHandle(ref, () => ({
|
|
3736
3705
|
reset() {
|
|
3737
3706
|
setOTP("");
|
|
3738
3707
|
}
|
|
@@ -3763,7 +3732,7 @@ const OTPInput = React__default.forwardRef(
|
|
|
3763
3732
|
onComplete?.(otp);
|
|
3764
3733
|
}
|
|
3765
3734
|
}, [otp]);
|
|
3766
|
-
return /* @__PURE__ */
|
|
3735
|
+
return /* @__PURE__ */ React.createElement(View, { style: { ...otpContainerStyle }, testID: testId }, /* @__PURE__ */ React.createElement(
|
|
3767
3736
|
CustomTypography,
|
|
3768
3737
|
{
|
|
3769
3738
|
text: "OTP",
|
|
@@ -3773,7 +3742,7 @@ const OTPInput = React__default.forwardRef(
|
|
|
3773
3742
|
textAlign: "left"
|
|
3774
3743
|
}
|
|
3775
3744
|
}
|
|
3776
|
-
), /* @__PURE__ */
|
|
3745
|
+
), /* @__PURE__ */ React.createElement(View, { style: { ...styles$2.textInputContainer } }, Array.from({ length }).map((_, index) => /* @__PURE__ */ React.createElement(
|
|
3777
3746
|
TextInput,
|
|
3778
3747
|
{
|
|
3779
3748
|
key: index?.toString(),
|
|
@@ -3793,7 +3762,7 @@ const OTPInput = React__default.forwardRef(
|
|
|
3793
3762
|
returnKeyType: otp.length === length ? "done" : "next",
|
|
3794
3763
|
selectionColor: theme.CONTENT_PRIMARY
|
|
3795
3764
|
}
|
|
3796
|
-
))), /* @__PURE__ */
|
|
3765
|
+
))), /* @__PURE__ */ React.createElement(View, { style: styles$2.resendOtpContainer }, errorMessage ? /* @__PURE__ */ React.createElement(
|
|
3797
3766
|
CustomTypography,
|
|
3798
3767
|
{
|
|
3799
3768
|
text: errorMessage,
|
|
@@ -3802,7 +3771,7 @@ const OTPInput = React__default.forwardRef(
|
|
|
3802
3771
|
color: theme.ERROR
|
|
3803
3772
|
}
|
|
3804
3773
|
}
|
|
3805
|
-
) : /* @__PURE__ */
|
|
3774
|
+
) : /* @__PURE__ */ React.createElement(View, null), /* @__PURE__ */ React.createElement(Pressable, { onPress: onClickResendOTP, disabled: !isResendOtpEnable }, /* @__PURE__ */ React.createElement(
|
|
3806
3775
|
CustomTypography,
|
|
3807
3776
|
{
|
|
3808
3777
|
text: "Resend OTP",
|
|
@@ -3902,7 +3871,8 @@ const Stepper = ({
|
|
|
3902
3871
|
containerStyle,
|
|
3903
3872
|
showStepCount = false,
|
|
3904
3873
|
showStatus = false,
|
|
3905
|
-
data
|
|
3874
|
+
data,
|
|
3875
|
+
completedStatusIcon
|
|
3906
3876
|
}) => {
|
|
3907
3877
|
const { theme } = useTheme();
|
|
3908
3878
|
const renderCircleStyle = (status) => {
|
|
@@ -3944,18 +3914,18 @@ const Stepper = ({
|
|
|
3944
3914
|
return { borderColor: theme.CONTENT_SECONDRY };
|
|
3945
3915
|
}
|
|
3946
3916
|
};
|
|
3947
|
-
return /* @__PURE__ */
|
|
3917
|
+
return /* @__PURE__ */ React.createElement(View, { style: { ...styles$1.stepperContainer, ...containerStyle } }, data?.map((item, index) => {
|
|
3948
3918
|
const stepCircleStyle = renderCircleStyle(item?.status);
|
|
3949
3919
|
const dividerStyle = renderDividerStyle(item?.status);
|
|
3950
3920
|
const labelStyle = renderLableStyle(item?.status);
|
|
3951
3921
|
const lastViewStyle = index === data?.length - 1 ? styles$1.lastStepWrapper : null;
|
|
3952
|
-
return /* @__PURE__ */
|
|
3922
|
+
return /* @__PURE__ */ React.createElement(
|
|
3953
3923
|
View,
|
|
3954
3924
|
{
|
|
3955
3925
|
key: index?.toString(),
|
|
3956
3926
|
style: { ...styles$1.stepperWrapper, ...lastViewStyle }
|
|
3957
3927
|
},
|
|
3958
|
-
/* @__PURE__ */
|
|
3928
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$1.stepperSeparatorContainer }, /* @__PURE__ */ React.createElement(View, { style: { ...stepCircleStyle } }, showStepCount && /* @__PURE__ */ React.createElement(
|
|
3959
3929
|
CustomTypography,
|
|
3960
3930
|
{
|
|
3961
3931
|
text: item?.step,
|
|
@@ -3964,8 +3934,8 @@ const Stepper = ({
|
|
|
3964
3934
|
color: theme.CONTENT_PRIMARY
|
|
3965
3935
|
}
|
|
3966
3936
|
}
|
|
3967
|
-
)), index != data?.length - 1 && /* @__PURE__ */
|
|
3968
|
-
/* @__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(
|
|
3969
3939
|
CustomTypography,
|
|
3970
3940
|
{
|
|
3971
3941
|
text: item?.label,
|
|
@@ -4015,7 +3985,11 @@ const styles = StyleSheet.create({
|
|
|
4015
3985
|
|
|
4016
3986
|
const { width } = Dimensions.get("window");
|
|
4017
3987
|
const BUTTON_WIDTH = 40;
|
|
4018
|
-
const CustomSlideButton = ({
|
|
3988
|
+
const CustomSlideButton = ({
|
|
3989
|
+
label,
|
|
3990
|
+
onComplete,
|
|
3991
|
+
icon
|
|
3992
|
+
}) => {
|
|
4019
3993
|
const pan = useRef(new Animated.Value(0)).current;
|
|
4020
3994
|
const panResponder = useRef(
|
|
4021
3995
|
PanResponder.create({
|
|
@@ -4046,7 +4020,7 @@ const CustomSlideButton = ({ label, onComplete }) => {
|
|
|
4046
4020
|
})
|
|
4047
4021
|
).current;
|
|
4048
4022
|
const { theme } = useTheme();
|
|
4049
|
-
return /* @__PURE__ */
|
|
4023
|
+
return /* @__PURE__ */ React.createElement(
|
|
4050
4024
|
View,
|
|
4051
4025
|
{
|
|
4052
4026
|
style: {
|
|
@@ -4054,7 +4028,7 @@ const CustomSlideButton = ({ label, onComplete }) => {
|
|
|
4054
4028
|
backgroundColor: theme.SURFACE_INVERTED
|
|
4055
4029
|
}
|
|
4056
4030
|
},
|
|
4057
|
-
/* @__PURE__ */
|
|
4031
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.buttonTextCOntainer }, /* @__PURE__ */ React.createElement(
|
|
4058
4032
|
CustomTypography,
|
|
4059
4033
|
{
|
|
4060
4034
|
text: label,
|
|
@@ -4064,13 +4038,13 @@ const CustomSlideButton = ({ label, onComplete }) => {
|
|
|
4064
4038
|
}
|
|
4065
4039
|
}
|
|
4066
4040
|
)),
|
|
4067
|
-
/* @__PURE__ */
|
|
4041
|
+
/* @__PURE__ */ React.createElement(
|
|
4068
4042
|
Animated.View,
|
|
4069
4043
|
{
|
|
4070
4044
|
style: [styles.slider, { transform: [{ translateX: pan }] }],
|
|
4071
4045
|
...panResponder.panHandlers
|
|
4072
4046
|
},
|
|
4073
|
-
/* @__PURE__ */
|
|
4047
|
+
/* @__PURE__ */ React.createElement(
|
|
4074
4048
|
View,
|
|
4075
4049
|
{
|
|
4076
4050
|
style: {
|
|
@@ -4078,7 +4052,8 @@ const CustomSlideButton = ({ label, onComplete }) => {
|
|
|
4078
4052
|
backgroundColor: theme.SURFACE_PRIMARY,
|
|
4079
4053
|
width: BUTTON_WIDTH
|
|
4080
4054
|
}
|
|
4081
|
-
}
|
|
4055
|
+
},
|
|
4056
|
+
icon
|
|
4082
4057
|
)
|
|
4083
4058
|
)
|
|
4084
4059
|
);
|