dhre-ui-kit 0.0.278 → 0.0.280
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 +22 -25
- package/lib/index.js +40 -43
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +42 -45
- package/lib/index.mjs.map +1 -1
- package/package.json +2 -3
package/lib/index.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React, { createContext, useContext,
|
|
1
|
+
import React, { createContext, useContext, useState, useEffect, useRef, memo, useCallback } from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
|
-
import { Dimensions, StyleSheet, Text, Pressable, View, TextInput, ScrollView, Animated,
|
|
4
|
-
import BottomSheet, { BottomSheetView } from '@gorhom/bottom-sheet';
|
|
3
|
+
import { Dimensions, StyleSheet, Text, Pressable, View, KeyboardAvoidingView, Platform, TextInput, ScrollView, Animated, FlatList, TouchableOpacity, Modal as Modal$1, Alert, Linking, PanResponder } from 'react-native';
|
|
5
4
|
import { BlurView } from '@react-native-community/blur';
|
|
5
|
+
import Modal from 'react-native-modal';
|
|
6
|
+
import { moderateScale as moderateScale$1 } from 'src/utils/stylehelper';
|
|
6
7
|
import LottieView from 'lottie-react-native';
|
|
7
8
|
import Tooltip from 'react-native-walkthrough-tooltip';
|
|
8
9
|
import Pdf from 'react-native-pdf';
|
|
@@ -657,53 +658,49 @@ const BottomDrawer = ({
|
|
|
657
658
|
titleStyle,
|
|
658
659
|
titleVariant = "B2_REGULAR",
|
|
659
660
|
showHeader = true,
|
|
660
|
-
blurType
|
|
661
|
+
blurType,
|
|
661
662
|
showSeparator = true
|
|
662
663
|
}) => {
|
|
663
|
-
const bottomSheetRef = useRef(null);
|
|
664
|
-
const handleSheetChanges = useCallback(
|
|
665
|
-
(index) => {
|
|
666
|
-
if (index === -1) {
|
|
667
|
-
toggleModal();
|
|
668
|
-
}
|
|
669
|
-
},
|
|
670
|
-
[toggleModal]
|
|
671
|
-
);
|
|
672
664
|
return /* @__PURE__ */ React.createElement(
|
|
673
|
-
|
|
665
|
+
Modal,
|
|
674
666
|
{
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
enablePanDownToClose: true,
|
|
680
|
-
style: [styles$z.mainContainer, style]
|
|
667
|
+
isVisible: isModalVisible,
|
|
668
|
+
swipeDirection: "down",
|
|
669
|
+
onSwipeComplete: toggleModal,
|
|
670
|
+
style: { margin: 0 }
|
|
681
671
|
},
|
|
682
|
-
/* @__PURE__ */ React.createElement(
|
|
683
|
-
|
|
684
|
-
{
|
|
685
|
-
style: [styles$z.blurView, blurViewStyle],
|
|
686
|
-
blurType,
|
|
687
|
-
blurAmount
|
|
688
|
-
}
|
|
689
|
-
) : null, /* @__PURE__ */ React.createElement(View, { style: [styles$z.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React.createElement(React.Fragment, null, showSeparator && /* @__PURE__ */ React.createElement(View, { style: styles$z.separator }), /* @__PURE__ */ React.createElement(View, { style: styles$z.headerContainer }, showLeftIcon && leftIcon ? React.cloneElement(leftIcon, {
|
|
690
|
-
width: moderateScale(24),
|
|
691
|
-
height: moderateScale(24),
|
|
692
|
-
style: styles$z.leftIconStyle,
|
|
693
|
-
onPress: onLeftIconPress
|
|
694
|
-
}) : null, /* @__PURE__ */ React.createElement(
|
|
695
|
-
CustomTypography,
|
|
672
|
+
/* @__PURE__ */ React.createElement(
|
|
673
|
+
KeyboardAvoidingView,
|
|
696
674
|
{
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
675
|
+
behavior: Platform.OS === "ios" ? "padding" : "height",
|
|
676
|
+
style: { flex: 1 }
|
|
677
|
+
},
|
|
678
|
+
/* @__PURE__ */ React.createElement(View, { style: [styles$z.mainContainer, style], testID }, showBlurView ? /* @__PURE__ */ React.createElement(
|
|
679
|
+
BlurView,
|
|
680
|
+
{
|
|
681
|
+
style: [styles$z.blurView, blurViewStyle],
|
|
682
|
+
blurType,
|
|
683
|
+
blurAmount
|
|
684
|
+
}
|
|
685
|
+
) : null, /* @__PURE__ */ React.createElement(View, { style: [styles$z.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React.createElement(React.Fragment, null, showSeparator && /* @__PURE__ */ React.createElement(View, { style: styles$z.separator }), /* @__PURE__ */ React.createElement(View, { style: styles$z.headerContainer }, showLeftIcon && leftIcon ? React.cloneElement(leftIcon, {
|
|
686
|
+
width: moderateScale$1(24),
|
|
687
|
+
height: moderateScale$1(24),
|
|
688
|
+
style: styles$z.leftIconStyle,
|
|
689
|
+
onPress: onLeftIconPress
|
|
690
|
+
}) : null, /* @__PURE__ */ React.createElement(
|
|
691
|
+
CustomTypography,
|
|
692
|
+
{
|
|
693
|
+
variant: titleVariant,
|
|
694
|
+
text: title,
|
|
695
|
+
style: { ...styles$z.title, ...titleStyle }
|
|
696
|
+
}
|
|
697
|
+
), showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
698
|
+
width: moderateScale$1(24),
|
|
699
|
+
height: moderateScale$1(24),
|
|
700
|
+
style: styles$z.rightIconStyle,
|
|
701
|
+
onPress: toggleModal
|
|
702
|
+
}) : null)), children))
|
|
703
|
+
)
|
|
707
704
|
);
|
|
708
705
|
};
|
|
709
706
|
|
|
@@ -2723,7 +2720,7 @@ const ContactModal = ({
|
|
|
2723
2720
|
}
|
|
2724
2721
|
)));
|
|
2725
2722
|
return /* @__PURE__ */ React.createElement(View, { style: styles$e.container }, /* @__PURE__ */ React.createElement(
|
|
2726
|
-
Modal,
|
|
2723
|
+
Modal$1,
|
|
2727
2724
|
{
|
|
2728
2725
|
animationType: "slide",
|
|
2729
2726
|
transparent: true,
|