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.d.ts CHANGED
@@ -18,7 +18,7 @@ interface CustomTextProps extends TextProps {
18
18
  style?: StyleProp<TextStyle>;
19
19
  textColor?: string;
20
20
  }
21
- declare const _default$l: (props: CustomTextProps) => React$1.JSX.Element;
21
+ declare const _default$k: (props: CustomTextProps) => React$1.JSX.Element;
22
22
 
23
23
  interface BadgeProps {
24
24
  text?: string;
@@ -28,7 +28,7 @@ interface BadgeProps {
28
28
  iconStyle?: ViewStyle;
29
29
  handleIconPress: () => void;
30
30
  }
31
- declare const _default$k: (props: BadgeProps) => React$1.JSX.Element;
31
+ declare const _default$j: (props: BadgeProps) => React$1.JSX.Element;
32
32
 
33
33
  interface BottomDrawerProps {
34
34
  isModalVisible: boolean;
@@ -74,7 +74,7 @@ interface CustomButtonProps {
74
74
  isLoading?: boolean;
75
75
  }
76
76
 
77
- declare const _default$j: (props: CustomButtonProps) => React$1.JSX.Element;
77
+ declare const _default$i: (props: CustomButtonProps) => React$1.JSX.Element;
78
78
 
79
79
  interface CardsProps {
80
80
  topLeftTitle?: string;
@@ -327,7 +327,7 @@ interface Props {
327
327
  onSelectionChange?: (selected: string[]) => void;
328
328
  style?: ViewStyle;
329
329
  }
330
- declare const _default$i: (props: Props) => React$1.JSX.Element;
330
+ declare const _default$h: (props: Props) => React$1.JSX.Element;
331
331
 
332
332
  interface TagsProps {
333
333
  tags: string[];
@@ -366,7 +366,7 @@ interface AccordionProps {
366
366
  titleVariant?: string;
367
367
  }
368
368
 
369
- declare const _default$h: (props: AccordionProps) => React$1.JSX.Element;
369
+ declare const _default$g: (props: AccordionProps) => React$1.JSX.Element;
370
370
 
371
371
  interface ToastProps {
372
372
  sucessIcon: React$1.ReactElement;
@@ -421,7 +421,7 @@ interface CustomHeaderProps {
421
421
  onRightPress?: () => void;
422
422
  }
423
423
 
424
- declare const _default$g: (props: CustomHeaderProps) => React$1.JSX.Element;
424
+ declare const _default$f: (props: CustomHeaderProps) => React$1.JSX.Element;
425
425
 
426
426
  interface ListItem {
427
427
  id: string;
@@ -464,7 +464,7 @@ interface SwipableListProps {
464
464
  titleStyle?: TextStyle;
465
465
  }
466
466
 
467
- declare const _default$f: (props: SwipableListProps) => React$1.JSX.Element;
467
+ declare const _default$e: (props: SwipableListProps) => React$1.JSX.Element;
468
468
 
469
469
  interface TypoTextProps extends TextProps {
470
470
  variant: keyof typeof FONT_STYLES;
@@ -490,9 +490,9 @@ interface CustomLoaderProps {
490
490
  loadingText?: string;
491
491
  }
492
492
 
493
- declare const _default$e: (props: CustomLoaderProps) => React$1.JSX.Element;
493
+ declare const _default$d: (props: CustomLoaderProps) => React$1.JSX.Element;
494
494
 
495
- declare const _default$d: (props: {
495
+ declare const _default$c: (props: {
496
496
  backgroundColor?: string;
497
497
  style?: ViewStyle;
498
498
  }) => React$1.JSX.Element;
@@ -507,7 +507,7 @@ interface OurOfficesButtonProps$1 {
507
507
  time?: string;
508
508
  subTitleStyle?: TextStyle;
509
509
  }
510
- declare const _default$c: (props: OurOfficesButtonProps$1) => React$1.JSX.Element;
510
+ declare const _default$b: (props: OurOfficesButtonProps$1) => React$1.JSX.Element;
511
511
 
512
512
  interface ContactModalProps {
513
513
  phoneNumber: string;
@@ -517,14 +517,14 @@ interface ContactModalProps {
517
517
  data: string;
518
518
  emailSubject: string;
519
519
  }
520
- declare const _default$b: (props: ContactModalProps) => React$1.JSX.Element;
520
+ declare const _default$a: (props: ContactModalProps) => React$1.JSX.Element;
521
521
 
522
522
  interface DateRangePickerProps extends CalendarProps {
523
523
  onButtonPress: (startDate: string, endDate: string) => void;
524
524
  btnTitle?: string;
525
525
  }
526
526
 
527
- declare const _default$a: (props: DateRangePickerProps) => React$1.JSX.Element;
527
+ declare const _default$9: (props: DateRangePickerProps) => React$1.JSX.Element;
528
528
 
529
529
  interface OurOfficesButtonProps {
530
530
  leftIcon?: ReactElement<SvgProps>;
@@ -538,7 +538,7 @@ interface OurOfficesButtonProps {
538
538
  titleColor?: string;
539
539
  descriptionColor?: string;
540
540
  }
541
- declare const _default$9: (props: OurOfficesButtonProps) => React$1.JSX.Element;
541
+ declare const _default$8: (props: OurOfficesButtonProps) => React$1.JSX.Element;
542
542
 
543
543
  interface NotificationBandgeProps {
544
544
  notificationCount?: number;
@@ -564,9 +564,9 @@ interface ScrollableListProps {
564
564
  activeTab?: string;
565
565
  errorStyle?: object;
566
566
  }
567
- declare const _default$8: (props: ScrollableListProps) => React$1.JSX.Element;
567
+ declare const _default$7: (props: ScrollableListProps) => React$1.JSX.Element;
568
568
 
569
- declare const _default$7: (props: {
569
+ declare const _default$6: (props: {
570
570
  title: string;
571
571
  feedback: string;
572
572
  inputText: string;
@@ -641,7 +641,7 @@ interface CustomDropdownProps {
641
641
  selectedItemTextStyle?: TextStyle;
642
642
  menuContainerStyle?: ViewStyle;
643
643
  activeColor?: string;
644
- renderRightIcon?: (visible?: boolean) => JSX.Element | null | undefined;
644
+ renderRightIcon?: (visible?: boolean) => JSX.Element | null;
645
645
  disable?: boolean;
646
646
  }
647
647
  declare const CustomDropdown: (props: CustomDropdownProps) => React$1.JSX.Element;
@@ -681,7 +681,7 @@ interface TagsComponentProps {
681
681
  selectedTagButton?: ViewStyle;
682
682
  unselectedTagButton?: ViewStyle;
683
683
  }
684
- declare const _default$6: (props: TagsComponentProps) => React$1.JSX.Element;
684
+ declare const _default$5: (props: TagsComponentProps) => React$1.JSX.Element;
685
685
 
686
686
  interface CustomDocumentPickerProps {
687
687
  onDocumentUpload: (base64: string, document?: DocumentPickerResponse) => void;
@@ -697,7 +697,7 @@ interface CustomDocumentPickerProps {
697
697
  deleteIcon: React$1.ReactElement;
698
698
  }
699
699
 
700
- declare const _default$5: (props: CustomDocumentPickerProps) => React$1.JSX.Element;
700
+ declare const _default$4: (props: CustomDocumentPickerProps) => React$1.JSX.Element;
701
701
 
702
702
  interface IProps$1 {
703
703
  length?: number;
@@ -723,7 +723,7 @@ type OTPInputHandle = {
723
723
  set?: (newOtp: string) => void;
724
724
  };
725
725
 
726
- declare const _default$4: (props: IProps$1 & React$1.RefAttributes<OTPInputHandle>) => React$1.JSX.Element;
726
+ declare const OTPInput: React$1.ForwardRefExoticComponent<IProps$1 & React$1.RefAttributes<OTPInputHandle>>;
727
727
 
728
728
  type StatusType = 'Active' | 'Inactive' | 'Completed' | 'Rejected' | 'Count';
729
729
  interface IData {
@@ -1128,4 +1128,4 @@ interface RadioButtonGroupProps {
1128
1128
 
1129
1129
  declare const RadioButtonGroup: React$1.FC<RadioButtonGroupProps>;
1130
1130
 
1131
- export { _default$h as Accordion, _default$1 as AppointmentCard, _default$k as Badge, BottomDrawer, _default$j as Button, Cards, _default$8 as Category, Checkbox as CheckBox, _default$b as ContactModel, CountryDropDown as CountryPicker, _default$5 as CustomDocumentPicker, CustomDropdown$1 as CustomDropdown, _default$g as CustomHeader, type CustomHeaderProps, CustomIcon, _default$e as CustomLoader, CustomProgressBar, CustomSearchBar, _default$2 as CustomSlideButton, CustomSwitchBtn, _default$l as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_DEFAULT, _default$a as DateRangePicker, CustomDropdown as DropDown, FONT_STYLES, _default$7 as FeedbackForm, FileUpload, FontStyle, _default$d as Line, NotificationBandge, _default$4 as OTPInput, _default$9 as OurOfficesButton, PdfView, PopUp, _default as PropertyDetails, RadioButtonGroup, ShapeType, _default$6 as SingleSelectionTags, type SlideButtonHandle, Star as StarRating, _default$3 as Stepper, _default$f as SwipableList, _default$i as Tabs, Tags, TextDirectType, CommonTextInput as TextInput, Theme, Toast, type ToastRef, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, _default$c as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
1131
+ export { _default$g as Accordion, _default$1 as AppointmentCard, _default$j as Badge, BottomDrawer, _default$i as Button, Cards, _default$7 as Category, Checkbox as CheckBox, _default$a as ContactModel, CountryDropDown as CountryPicker, _default$4 as CustomDocumentPicker, CustomDropdown$1 as CustomDropdown, _default$f as CustomHeader, type CustomHeaderProps, CustomIcon, _default$d as CustomLoader, CustomProgressBar, CustomSearchBar, _default$2 as CustomSlideButton, CustomSwitchBtn, _default$k as CustomText, CustomTextInput, CustomTooltip, CustomTypography, DHRE_COLORS_ALERT, DHRE_COLORS_BG, DHRE_COLORS_PRIMARY, DHRE_COLORS_SECONDARY, DHRE_COLORS_TEXT, DHRE_DEFAULT, _default$9 as DateRangePicker, CustomDropdown as DropDown, FONT_STYLES, _default$6 as FeedbackForm, FileUpload, FontStyle, _default$c as Line, NotificationBandge, OTPInput, _default$8 as OurOfficesButton, PdfView, PopUp, _default as PropertyDetails, RadioButtonGroup, ShapeType, _default$5 as SingleSelectionTags, type SlideButtonHandle, Star as StarRating, _default$3 as Stepper, _default$e as SwipableList, _default$h as Tabs, Tags, TextDirectType, CommonTextInput as TextInput, Theme, Toast, type ToastRef, CustomSwitch as ToggleButton, ToggleButtonType, ToggleTextType, _default$b as Topic, copyToClipboard, theme as default, height, horizontalScale, moderateScale, toastService, verticalScale, width };
package/lib/index.js CHANGED
@@ -4011,14 +4011,6 @@ const OTPInput = React__default["default"].forwardRef(
4011
4011
  const [activeInput, setActiveInput] = React.useState(null);
4012
4012
  const [resendOTPCount, setResendOTPCount] = React.useState(0);
4013
4013
  const [errorMessageMaxReachCount, setErrorMessageMaxReachCount] = React.useState("");
4014
- const filteredTheme = Object?.keys(theme)?.reduce(
4015
- (acc, key) => {
4016
- acc[key] = theme[key][mode];
4017
- return acc;
4018
- },
4019
- {}
4020
- );
4021
- const { theme: theme$1 } = mode ? { theme: filteredTheme } : useTheme();
4022
4014
  const [timeLeft, setTimeLeft] = React.useState(60);
4023
4015
  React.useEffect(() => {
4024
4016
  let timer;
@@ -4084,11 +4076,9 @@ const OTPInput = React__default["default"].forwardRef(
4084
4076
  setOTP("");
4085
4077
  otpRefs.current[0]?.focus();
4086
4078
  };
4087
- React.useEffect(() => {
4088
- React__default["default"].useImperativeHandle(ref, () => ({
4089
- reset
4090
- }));
4091
- }, []);
4079
+ React__default["default"].useImperativeHandle(ref, () => ({
4080
+ reset
4081
+ }));
4092
4082
  const handleChange = (index, value) => {
4093
4083
  const regex = /^\d+$/;
4094
4084
  if (value.length === 1 && regex.test(value) && index >= 0 && index < length) {
@@ -4124,7 +4114,6 @@ const OTPInput = React__default["default"].forwardRef(
4124
4114
  text: label,
4125
4115
  variant: FontStyle.B4_REGULAR,
4126
4116
  style: {
4127
- color: otp?.length ? theme$1.CONTENT_PRIMARY : theme$1.CONTENT_SECONDRY,
4128
4117
  textAlign: "left",
4129
4118
  ...otpHeaderTextStyle
4130
4119
  }
@@ -4135,8 +4124,6 @@ const OTPInput = React__default["default"].forwardRef(
4135
4124
  key: index?.toString(),
4136
4125
  style: {
4137
4126
  ...styles$5.textInputStyle,
4138
- color: theme$1.CONTENT_PRIMARY,
4139
- borderColor: errorMessage ? theme$1.ERROR : otp.length === length ? theme$1.SUCCESS : activeInput === index ? theme$1.BORDER_INVERTED : theme$1.BORDER_PRIMARY,
4140
4127
  ...textInputStyle
4141
4128
  },
4142
4129
  onFocus: () => setActiveInput(index),
@@ -4150,15 +4137,13 @@ const OTPInput = React__default["default"].forwardRef(
4150
4137
  returnKeyType: otp.length === length ? "done" : "next",
4151
4138
  importantForAutofill: "yes",
4152
4139
  textContentType: "oneTimeCode",
4153
- autoComplete: "sms-otp",
4154
- selectionColor: theme$1.CONTENT_PRIMARY
4140
+ autoComplete: "sms-otp"
4155
4141
  }
4156
4142
  ))), !errorMessageMaxReachCount && /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$5.timerContainer }, (disableResendButton() || !isResendOtpEnable) && /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$5.timerIconContainer }, timerIcon, /* @__PURE__ */ React__default["default"].createElement(
4157
4143
  CustomTypography,
4158
4144
  {
4159
4145
  text: `00:${timeLeft} secs`,
4160
- variant: FontStyle.L1_REGULAR,
4161
- style: { color: theme$1.INFO }
4146
+ variant: FontStyle.L1_REGULAR
4162
4147
  }
4163
4148
  )), /* @__PURE__ */ React__default["default"].createElement(
4164
4149
  reactNative.Pressable,
@@ -4174,7 +4159,6 @@ const OTPInput = React__default["default"].forwardRef(
4174
4159
  variant: FontStyle.L2_REGULAR,
4175
4160
  style: {
4176
4161
  textDecorationLine: "underline",
4177
- color: isResendOtpEnable ? resendOtpColor ?? theme$1.CONTENT_PRIMARY : theme$1.CONTENT_DISABLE,
4178
4162
  ...resendTextStyle
4179
4163
  }
4180
4164
  }
@@ -4185,8 +4169,7 @@ const OTPInput = React__default["default"].forwardRef(
4185
4169
  text: errorMessage,
4186
4170
  variant: FontStyle.L2_REGULAR,
4187
4171
  style: {
4188
- alignSelf: "flex-start",
4189
- color: theme$1.ERROR
4172
+ alignSelf: "flex-start"
4190
4173
  }
4191
4174
  }
4192
4175
  )) : null, errorMessageMaxReachCount ? /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$5.resendOtpContainer }, /* @__PURE__ */ React__default["default"].createElement(
@@ -4195,14 +4178,12 @@ const OTPInput = React__default["default"].forwardRef(
4195
4178
  text: errorMessageMaxReachCount,
4196
4179
  variant: FontStyle.L2_REGULAR,
4197
4180
  style: {
4198
- alignSelf: "flex-start",
4199
- color: theme$1.ERROR
4181
+ alignSelf: "flex-start"
4200
4182
  }
4201
4183
  }
4202
4184
  )) : null);
4203
4185
  }
4204
4186
  );
4205
- var index$4 = withThemeProvider(OTPInput);
4206
4187
  OTPInput.displayName = "OTPInput";
4207
4188
 
4208
4189
  const styles$4 = reactNative.StyleSheet.create({
@@ -4980,7 +4961,7 @@ exports.FileUpload = FileUpload;
4980
4961
  exports.FontStyle = FontStyle;
4981
4962
  exports.Line = Line;
4982
4963
  exports.NotificationBandge = NotificationBandge;
4983
- exports.OTPInput = index$4;
4964
+ exports.OTPInput = OTPInput;
4984
4965
  exports.OurOfficesButton = OurOffices;
4985
4966
  exports.PdfView = PdfView;
4986
4967
  exports.PopUp = PopUp;