dhre-ui-kit 0.0.328 → 0.0.330

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
@@ -15,7 +15,6 @@ import { TextInput as TextInput$1 } from 'react-native-paper';
15
15
  import { Dropdown } from 'react-native-element-dropdown';
16
16
  import DocumentPicker from 'react-native-document-picker';
17
17
  import RNFS from 'react-native-fs';
18
- import OTPVerify, { removeListener, startOtpListener } from 'react-native-otp-verify';
19
18
 
20
19
  var ShapeType = /* @__PURE__ */ ((ShapeType2) => {
21
20
  ShapeType2["LINE"] = "line";
@@ -3559,7 +3558,8 @@ const CustomDropdown = (props) => {
3559
3558
  activeColor,
3560
3559
  keepPlaceholderOnFocus = false,
3561
3560
  selectedItemTextStyle,
3562
- disable
3561
+ disable,
3562
+ autoScroll = true
3563
3563
  } = props;
3564
3564
  const [value, setValue] = useState(defaultValue);
3565
3565
  const [isFocus, setIsFocus] = useState(false);
@@ -3632,7 +3632,8 @@ const CustomDropdown = (props) => {
3632
3632
  containerStyle: menuContainerStyle,
3633
3633
  activeColor,
3634
3634
  itemContainerStyle: [styles$8.itemListStyle, itemContainerStyle],
3635
- disable
3635
+ disable,
3636
+ autoScroll
3636
3637
  }
3637
3638
  ));
3638
3639
  };
@@ -4115,28 +4116,6 @@ const OTPInput = React.forwardRef(
4115
4116
  setTimeLeft(timerToResend / 1e3);
4116
4117
  }, timerToResend);
4117
4118
  };
4118
- useEffect(() => {
4119
- if (Platform.OS === "android") {
4120
- onStartListeningOtp();
4121
- }
4122
- return () => {
4123
- if (Platform.OS === "android") {
4124
- OTPVerify.removeListener();
4125
- removeListener();
4126
- }
4127
- };
4128
- }, []);
4129
- const onStartListeningOtp = async () => {
4130
- await OTPVerify.getOtp();
4131
- startOtpListener((message) => {
4132
- const otpRegex = new RegExp(`(\\d{${length}})`, "g");
4133
- const otp2 = otpRegex.exec(message)?.[1];
4134
- setOTP(otp2 ?? "");
4135
- if (otp2) {
4136
- refs.current[otp2?.length - 1]?.focus();
4137
- }
4138
- });
4139
- };
4140
4119
  React.useImperativeHandle(ref, () => ({
4141
4120
  reset() {
4142
4121
  setOTP("");