dhre-ui-kit 0.0.274 → 0.0.276
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.js +43 -46
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +44 -48
- package/lib/index.mjs.map +1 -1
- package/package.json +3 -1
package/lib/index.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React, { createContext, useContext,
|
|
1
|
+
import React, { createContext, useContext, useRef, useCallback, useState, useEffect, memo } from 'react';
|
|
2
2
|
import { useSelector } from 'react-redux';
|
|
3
|
-
import { Dimensions, StyleSheet, Text, Pressable, View,
|
|
4
|
-
import
|
|
3
|
+
import { Dimensions, StyleSheet, Text, Pressable, View, TextInput, ScrollView, Animated, Platform, FlatList, TouchableOpacity, Modal, Alert, Linking, PanResponder } from 'react-native';
|
|
4
|
+
import BottomSheet from '@gorhom/bottom-sheet';
|
|
5
5
|
import { BlurView } from '@react-native-community/blur';
|
|
6
6
|
import LottieView from 'lottie-react-native';
|
|
7
7
|
import Tooltip from 'react-native-walkthrough-tooltip';
|
|
8
8
|
import Pdf from 'react-native-pdf';
|
|
9
9
|
import * as Progress from 'react-native-progress';
|
|
10
|
+
import { GestureHandlerRootView, Swipeable } from 'react-native-gesture-handler';
|
|
10
11
|
import DeviceInfo from 'react-native-device-info';
|
|
11
12
|
import { Calendar } from 'react-native-calendars';
|
|
12
13
|
import CountryPicker from 'react-native-country-picker-modal';
|
|
@@ -659,55 +660,50 @@ const BottomDrawer = ({
|
|
|
659
660
|
blurType = "light",
|
|
660
661
|
showSeparator = true
|
|
661
662
|
}) => {
|
|
662
|
-
const
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
663
|
+
const bottomSheetRef = useRef(null);
|
|
664
|
+
const handleSheetChanges = useCallback(
|
|
665
|
+
(index) => {
|
|
666
|
+
if (index === -1) {
|
|
667
|
+
toggleModal();
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
[toggleModal]
|
|
671
|
+
);
|
|
671
672
|
return /* @__PURE__ */ React.createElement(
|
|
672
|
-
|
|
673
|
+
BottomSheet,
|
|
673
674
|
{
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
675
|
+
ref: bottomSheetRef,
|
|
676
|
+
index: isModalVisible ? 0 : -1,
|
|
677
|
+
snapPoints: ["50%", "100%"],
|
|
678
|
+
onChange: handleSheetChanges,
|
|
679
|
+
enablePanDownToClose: true,
|
|
680
|
+
style: [styles$z.mainContainer, style]
|
|
678
681
|
},
|
|
679
|
-
/* @__PURE__ */ React.createElement(
|
|
680
|
-
|
|
682
|
+
/* @__PURE__ */ React.createElement(View, { style: [styles$z.mainContainer, style], testID }, showBlurView ? /* @__PURE__ */ React.createElement(
|
|
683
|
+
BlurView,
|
|
681
684
|
{
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
), showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
705
|
-
width: moderateScale(24),
|
|
706
|
-
height: moderateScale(24),
|
|
707
|
-
style: styles$z.rightIconStyle,
|
|
708
|
-
onPress: toggleModal
|
|
709
|
-
}) : null)), children))
|
|
710
|
-
))
|
|
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,
|
|
696
|
+
{
|
|
697
|
+
variant: titleVariant,
|
|
698
|
+
text: title,
|
|
699
|
+
style: { ...styles$z.title, ...titleStyle }
|
|
700
|
+
}
|
|
701
|
+
), showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
702
|
+
width: moderateScale(24),
|
|
703
|
+
height: moderateScale(24),
|
|
704
|
+
style: styles$z.rightIconStyle,
|
|
705
|
+
onPress: toggleModal
|
|
706
|
+
}) : null)), children))
|
|
711
707
|
);
|
|
712
708
|
};
|
|
713
709
|
|