dhre-ui-kit 0.0.254 → 0.0.256

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
@@ -3975,14 +3975,6 @@ const OTPInput = React.forwardRef(
3975
3975
  const [activeInput, setActiveInput] = useState(null);
3976
3976
  const [resendOTPCount, setResendOTPCount] = useState(0);
3977
3977
  const [errorMessageMaxReachCount, setErrorMessageMaxReachCount] = useState("");
3978
- const filteredTheme = Object?.keys(theme)?.reduce(
3979
- (acc, key) => {
3980
- acc[key] = theme[key][mode];
3981
- return acc;
3982
- },
3983
- {}
3984
- );
3985
- const { theme: theme$1 } = mode ? { theme: filteredTheme } : useTheme();
3986
3978
  const [timeLeft, setTimeLeft] = useState(60);
3987
3979
  useEffect(() => {
3988
3980
  let timer;
@@ -4048,11 +4040,9 @@ const OTPInput = React.forwardRef(
4048
4040
  setOTP("");
4049
4041
  otpRefs.current[0]?.focus();
4050
4042
  };
4051
- useEffect(() => {
4052
- React.useImperativeHandle(ref, () => ({
4053
- reset
4054
- }));
4055
- }, []);
4043
+ React.useImperativeHandle(ref, () => ({
4044
+ reset
4045
+ }));
4056
4046
  const handleChange = (index, value) => {
4057
4047
  const regex = /^\d+$/;
4058
4048
  if (value.length === 1 && regex.test(value) && index >= 0 && index < length) {
@@ -4088,7 +4078,6 @@ const OTPInput = React.forwardRef(
4088
4078
  text: label,
4089
4079
  variant: FontStyle.B4_REGULAR,
4090
4080
  style: {
4091
- color: otp?.length ? theme$1.CONTENT_PRIMARY : theme$1.CONTENT_SECONDRY,
4092
4081
  textAlign: "left",
4093
4082
  ...otpHeaderTextStyle
4094
4083
  }
@@ -4099,8 +4088,6 @@ const OTPInput = React.forwardRef(
4099
4088
  key: index?.toString(),
4100
4089
  style: {
4101
4090
  ...styles$5.textInputStyle,
4102
- color: theme$1.CONTENT_PRIMARY,
4103
- borderColor: errorMessage ? theme$1.ERROR : otp.length === length ? theme$1.SUCCESS : activeInput === index ? theme$1.BORDER_INVERTED : theme$1.BORDER_PRIMARY,
4104
4091
  ...textInputStyle
4105
4092
  },
4106
4093
  onFocus: () => setActiveInput(index),
@@ -4114,15 +4101,13 @@ const OTPInput = React.forwardRef(
4114
4101
  returnKeyType: otp.length === length ? "done" : "next",
4115
4102
  importantForAutofill: "yes",
4116
4103
  textContentType: "oneTimeCode",
4117
- autoComplete: "sms-otp",
4118
- selectionColor: theme$1.CONTENT_PRIMARY
4104
+ autoComplete: "sms-otp"
4119
4105
  }
4120
4106
  ))), !errorMessageMaxReachCount && /* @__PURE__ */ React.createElement(View, { style: styles$5.timerContainer }, (disableResendButton() || !isResendOtpEnable) && /* @__PURE__ */ React.createElement(View, { style: styles$5.timerIconContainer }, timerIcon, /* @__PURE__ */ React.createElement(
4121
4107
  CustomTypography,
4122
4108
  {
4123
4109
  text: `00:${timeLeft} secs`,
4124
- variant: FontStyle.L1_REGULAR,
4125
- style: { color: theme$1.INFO }
4110
+ variant: FontStyle.L1_REGULAR
4126
4111
  }
4127
4112
  )), /* @__PURE__ */ React.createElement(
4128
4113
  Pressable,
@@ -4138,7 +4123,6 @@ const OTPInput = React.forwardRef(
4138
4123
  variant: FontStyle.L2_REGULAR,
4139
4124
  style: {
4140
4125
  textDecorationLine: "underline",
4141
- color: isResendOtpEnable ? resendOtpColor ?? theme$1.CONTENT_PRIMARY : theme$1.CONTENT_DISABLE,
4142
4126
  ...resendTextStyle
4143
4127
  }
4144
4128
  }
@@ -4149,8 +4133,7 @@ const OTPInput = React.forwardRef(
4149
4133
  text: errorMessage,
4150
4134
  variant: FontStyle.L2_REGULAR,
4151
4135
  style: {
4152
- alignSelf: "flex-start",
4153
- color: theme$1.ERROR
4136
+ alignSelf: "flex-start"
4154
4137
  }
4155
4138
  }
4156
4139
  )) : null, errorMessageMaxReachCount ? /* @__PURE__ */ React.createElement(View, { style: styles$5.resendOtpContainer }, /* @__PURE__ */ React.createElement(
@@ -4159,14 +4142,12 @@ const OTPInput = React.forwardRef(
4159
4142
  text: errorMessageMaxReachCount,
4160
4143
  variant: FontStyle.L2_REGULAR,
4161
4144
  style: {
4162
- alignSelf: "flex-start",
4163
- color: theme$1.ERROR
4145
+ alignSelf: "flex-start"
4164
4146
  }
4165
4147
  }
4166
4148
  )) : null);
4167
4149
  }
4168
4150
  );
4169
- var index$4 = withThemeProvider(OTPInput);
4170
4151
  OTPInput.displayName = "OTPInput";
4171
4152
 
4172
4153
  const styles$4 = StyleSheet.create({
@@ -4907,5 +4888,5 @@ const RadioButtonGroup = ({ data, onSelect, containerStyle, labelStyle, optionCo
4907
4888
  )));
4908
4889
  };
4909
4890
 
4910
- export { Accordion$1 as Accordion, index$1 as AppointmentCard, Badge$1 as Badge, BottomDrawer, CustomButton$1 as Button, Cards, category as Category, Checkbox as CheckBox, ContactModel, CountryDropDown as CountryPicker, CustomDocumentPicker$1 as CustomDocumentPicker, CustomDropdown$1 as CustomDropdown, CustomHeader$1 as CustomHeader, CustomIcon, CustomLoader$1 as CustomLoader, CustomProgressBar, CustomSearchBar, index$2 as CustomSlideButton, CustomSwitchBtn, CustomText$1 as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_DEFAULT, DateRangePicker$1 as DateRangePicker, CustomDropdown as DropDown, FONT_STYLES, feedback as FeedbackForm, FileUpload, FontStyle, Line, NotificationBandge, index$4 as OTPInput, OurOffices as OurOfficesButton, PdfView, PopUp, index as PropertyDetails, RadioButtonGroup, ShapeType, TagSingleSelection as SingleSelectionTags, Star as StarRating, index$3 as Stepper, SwipableList$1 as SwipableList, Tabs$1 as Tabs, Tags, TextDirectType, CommonTextInput as TextInput, Theme, Toast, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, Topic$1 as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
4891
+ export { Accordion$1 as Accordion, index$1 as AppointmentCard, Badge$1 as Badge, BottomDrawer, CustomButton$1 as Button, Cards, category as Category, Checkbox as CheckBox, ContactModel, CountryDropDown as CountryPicker, CustomDocumentPicker$1 as CustomDocumentPicker, CustomDropdown$1 as CustomDropdown, CustomHeader$1 as CustomHeader, CustomIcon, CustomLoader$1 as CustomLoader, CustomProgressBar, CustomSearchBar, index$2 as CustomSlideButton, CustomSwitchBtn, CustomText$1 as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_DEFAULT, DateRangePicker$1 as DateRangePicker, CustomDropdown as DropDown, FONT_STYLES, feedback as FeedbackForm, FileUpload, FontStyle, Line, NotificationBandge, OTPInput, OurOffices as OurOfficesButton, PdfView, PopUp, index as PropertyDetails, RadioButtonGroup, ShapeType, TagSingleSelection as SingleSelectionTags, Star as StarRating, index$3 as Stepper, SwipableList$1 as SwipableList, Tabs$1 as Tabs, Tags, TextDirectType, CommonTextInput as TextInput, Theme, Toast, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, Topic$1 as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
4911
4892
  //# sourceMappingURL=index.mjs.map