dhre-ui-kit 0.0.276 → 0.0.279
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 -43
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +45 -44
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -3
package/lib/index.mjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
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
|
|
3
|
+
import { Dimensions, StyleSheet, Text, Pressable, View, Modal, KeyboardAvoidingView, Platform, TextInput, ScrollView, Animated, FlatList, TouchableOpacity, Alert, Linking, PanResponder } from 'react-native';
|
|
4
|
+
import { PanGestureHandler, GestureHandlerRootView, Swipeable } from 'react-native-gesture-handler';
|
|
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';
|
|
11
10
|
import DeviceInfo from 'react-native-device-info';
|
|
12
11
|
import { Calendar } from 'react-native-calendars';
|
|
13
12
|
import CountryPicker from 'react-native-country-picker-modal';
|
|
@@ -660,50 +659,52 @@ const BottomDrawer = ({
|
|
|
660
659
|
blurType = "light",
|
|
661
660
|
showSeparator = true
|
|
662
661
|
}) => {
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
(
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
},
|
|
670
|
-
[toggleModal]
|
|
671
|
-
);
|
|
662
|
+
const onSwipDown = (event) => {
|
|
663
|
+
const { translationY } = event.nativeEvent;
|
|
664
|
+
if (translationY > 50) {
|
|
665
|
+
toggleModal();
|
|
666
|
+
}
|
|
667
|
+
};
|
|
672
668
|
return /* @__PURE__ */ React.createElement(
|
|
673
|
-
|
|
669
|
+
Modal,
|
|
674
670
|
{
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
enablePanDownToClose: true,
|
|
680
|
-
style: [styles$z.mainContainer, style]
|
|
671
|
+
animationType: "slide",
|
|
672
|
+
transparent: true,
|
|
673
|
+
visible: isModalVisible,
|
|
674
|
+
onRequestClose: toggleModal
|
|
681
675
|
},
|
|
682
|
-
/* @__PURE__ */ React.createElement(
|
|
683
|
-
|
|
676
|
+
/* @__PURE__ */ React.createElement(PanGestureHandler, { onGestureEvent: onSwipDown }, /* @__PURE__ */ React.createElement(
|
|
677
|
+
KeyboardAvoidingView,
|
|
684
678
|
{
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
679
|
+
behavior: Platform.OS === "ios" ? "padding" : "height",
|
|
680
|
+
style: { flex: 1 }
|
|
681
|
+
},
|
|
682
|
+
/* @__PURE__ */ React.createElement(View, { style: [styles$z.mainContainer, style], testID }, showBlurView ? /* @__PURE__ */ React.createElement(
|
|
683
|
+
BlurView,
|
|
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,
|
|
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))
|
|
707
|
+
))
|
|
707
708
|
);
|
|
708
709
|
};
|
|
709
710
|
|