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.d.ts CHANGED
@@ -659,6 +659,7 @@ interface CustomDropdownProps {
659
659
  activeColor?: string;
660
660
  renderRightIcon?: (visible?: boolean) => JSX.Element | null;
661
661
  disable?: boolean;
662
+ autoScroll?: boolean;
662
663
  }
663
664
  declare const CustomDropdown: (props: CustomDropdownProps) => React$1.JSX.Element;
664
665
 
package/lib/index.js CHANGED
@@ -19,7 +19,6 @@ var reactNativePaper = require('react-native-paper');
19
19
  var reactNativeElementDropdown = require('react-native-element-dropdown');
20
20
  var DocumentPicker = require('react-native-document-picker');
21
21
  var RNFS = require('react-native-fs');
22
- var OTPVerify = require('react-native-otp-verify');
23
22
 
24
23
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
25
24
 
@@ -52,7 +51,6 @@ var DeviceInfo__default = /*#__PURE__*/_interopDefaultLegacy(DeviceInfo);
52
51
  var CountryPicker__default = /*#__PURE__*/_interopDefaultLegacy(CountryPicker);
53
52
  var DocumentPicker__default = /*#__PURE__*/_interopDefaultLegacy(DocumentPicker);
54
53
  var RNFS__default = /*#__PURE__*/_interopDefaultLegacy(RNFS);
55
- var OTPVerify__default = /*#__PURE__*/_interopDefaultLegacy(OTPVerify);
56
54
 
57
55
  var ShapeType = /* @__PURE__ */ ((ShapeType2) => {
58
56
  ShapeType2["LINE"] = "line";
@@ -3596,7 +3594,8 @@ const CustomDropdown = (props) => {
3596
3594
  activeColor,
3597
3595
  keepPlaceholderOnFocus = false,
3598
3596
  selectedItemTextStyle,
3599
- disable
3597
+ disable,
3598
+ autoScroll = true
3600
3599
  } = props;
3601
3600
  const [value, setValue] = React.useState(defaultValue);
3602
3601
  const [isFocus, setIsFocus] = React.useState(false);
@@ -3669,7 +3668,8 @@ const CustomDropdown = (props) => {
3669
3668
  containerStyle: menuContainerStyle,
3670
3669
  activeColor,
3671
3670
  itemContainerStyle: [styles$8.itemListStyle, itemContainerStyle],
3672
- disable
3671
+ disable,
3672
+ autoScroll
3673
3673
  }
3674
3674
  ));
3675
3675
  };
@@ -4152,28 +4152,6 @@ const OTPInput = React__default["default"].forwardRef(
4152
4152
  setTimeLeft(timerToResend / 1e3);
4153
4153
  }, timerToResend);
4154
4154
  };
4155
- React.useEffect(() => {
4156
- if (reactNative.Platform.OS === "android") {
4157
- onStartListeningOtp();
4158
- }
4159
- return () => {
4160
- if (reactNative.Platform.OS === "android") {
4161
- OTPVerify__default["default"].removeListener();
4162
- OTPVerify.removeListener();
4163
- }
4164
- };
4165
- }, []);
4166
- const onStartListeningOtp = async () => {
4167
- await OTPVerify__default["default"].getOtp();
4168
- OTPVerify.startOtpListener((message) => {
4169
- const otpRegex = new RegExp(`(\\d{${length}})`, "g");
4170
- const otp2 = otpRegex.exec(message)?.[1];
4171
- setOTP(otp2 ?? "");
4172
- if (otp2) {
4173
- refs.current[otp2?.length - 1]?.focus();
4174
- }
4175
- });
4176
- };
4177
4155
  React__default["default"].useImperativeHandle(ref, () => ({
4178
4156
  reset() {
4179
4157
  setOTP("");