dhre-ui-kit 0.0.280 → 0.0.282

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.mjs CHANGED
@@ -1,9 +1,8 @@
1
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, KeyboardAvoidingView, Platform, TextInput, ScrollView, Animated, FlatList, TouchableOpacity, Modal as Modal$1, Alert, Linking, PanResponder } from 'react-native';
4
- import { BlurView } from '@react-native-community/blur';
3
+ import { Dimensions, StyleSheet, Text, Pressable, View, Platform, KeyboardAvoidingView, TextInput, ScrollView, Animated, FlatList, TouchableOpacity, Modal as Modal$1, Alert, Linking, PanResponder } from 'react-native';
5
4
  import Modal from 'react-native-modal';
6
- import { moderateScale as moderateScale$1 } from 'src/utils/stylehelper';
5
+ import Clipboard from '@react-native-clipboard/clipboard';
7
6
  import LottieView from 'lottie-react-native';
8
7
  import Tooltip from 'react-native-walkthrough-tooltip';
9
8
  import Pdf from 'react-native-pdf';
@@ -17,7 +16,6 @@ import { Dropdown } from 'react-native-element-dropdown';
17
16
  import DocumentPicker from 'react-native-document-picker';
18
17
  import RNFS from 'react-native-fs';
19
18
  import OTPVerify, { removeListener, startOtpListener } from 'react-native-otp-verify';
20
- import Clipboard from '@react-native-clipboard/clipboard';
21
19
 
22
20
  var ShapeType = /* @__PURE__ */ ((ShapeType2) => {
23
21
  ShapeType2["LINE"] = "line";
@@ -639,6 +637,11 @@ const styles$z = StyleSheet.create({
639
637
  rightIconStyle: { marginLeft: 8 }
640
638
  });
641
639
 
640
+ const isIos = () => Platform.OS === "ios" /* ios */;
641
+ const copyToClipboard = (textToCopy) => {
642
+ Clipboard.setString(textToCopy);
643
+ };
644
+
642
645
  const BottomDrawer = ({
643
646
  isModalVisible,
644
647
  toggleModal,
@@ -647,9 +650,6 @@ const BottomDrawer = ({
647
650
  testID = "BOTTOM-DRAWER",
648
651
  style,
649
652
  modalContainerStyle,
650
- blurAmount = 10,
651
- blurViewStyle,
652
- showBlurView = true,
653
653
  showLeftIcon = false,
654
654
  showRightIcon = true,
655
655
  leftIcon,
@@ -658,33 +658,29 @@ const BottomDrawer = ({
658
658
  titleStyle,
659
659
  titleVariant = "B2_REGULAR",
660
660
  showHeader = true,
661
- blurType,
662
- showSeparator = true
661
+ showSeparator = true,
662
+ showBlurView
663
663
  }) => {
664
+ const { theme } = useTheme();
664
665
  return /* @__PURE__ */ React.createElement(
665
666
  Modal,
666
667
  {
667
668
  isVisible: isModalVisible,
668
669
  swipeDirection: "down",
669
670
  onSwipeComplete: toggleModal,
671
+ backdropColor: theme.SURFACE_PRIMARY,
672
+ hasBackdrop: showBlurView,
670
673
  style: { margin: 0 }
671
674
  },
672
675
  /* @__PURE__ */ React.createElement(
673
676
  KeyboardAvoidingView,
674
677
  {
675
- behavior: Platform.OS === "ios" ? "padding" : "height",
678
+ behavior: isIos() ? "padding" : "height",
676
679
  style: { flex: 1 }
677
680
  },
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),
681
+ /* @__PURE__ */ React.createElement(View, { style: [styles$z.mainContainer, style], testID }, /* @__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, {
682
+ width: moderateScale(24),
683
+ height: moderateScale(24),
688
684
  style: styles$z.leftIconStyle,
689
685
  onPress: onLeftIconPress
690
686
  }) : null, /* @__PURE__ */ React.createElement(
@@ -695,8 +691,8 @@ const BottomDrawer = ({
695
691
  style: { ...styles$z.title, ...titleStyle }
696
692
  }
697
693
  ), showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
698
- width: moderateScale$1(24),
699
- height: moderateScale$1(24),
694
+ width: moderateScale(24),
695
+ height: moderateScale(24),
700
696
  style: styles$z.rightIconStyle,
701
697
  onPress: toggleModal
702
698
  }) : null)), children))
@@ -4540,10 +4536,6 @@ const CustomSlideButton = React.forwardRef(
4540
4536
  );
4541
4537
  var index$2 = withThemeProvider(CustomSlideButton);
4542
4538
 
4543
- const copyToClipboard = (textToCopy) => {
4544
- Clipboard.setString(textToCopy);
4545
- };
4546
-
4547
4539
  const styles$2 = StyleSheet.create({
4548
4540
  accordionContainer: {
4549
4541
  gap: verticalScale(8),