dhre-ui-kit 0.0.148 → 0.0.150

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
@@ -722,6 +722,9 @@ interface CustomSlideButtonProps {
722
722
  onComplete?: () => void;
723
723
  icon: React$1.ReactElement;
724
724
  size?: number;
725
+ textStyle?: TextStyle;
726
+ containerStyle?: ViewStyle;
727
+ sliderStyle?: ViewStyle;
725
728
  }
726
729
 
727
730
  declare const _default$2: (props: CustomSlideButtonProps) => React$1.JSX.Element;
package/lib/index.js CHANGED
@@ -2771,31 +2771,33 @@ const DateRangePicker = (props) => {
2771
2771
  const getMarkedDates = () => {
2772
2772
  const { startDate, endDate } = selectedRange;
2773
2773
  const markedDates = {};
2774
+ if (startDate && endDate) {
2775
+ const start = new Date(startDate);
2776
+ const end = new Date(endDate);
2777
+ while (start < end) {
2778
+ start.setDate(start.getDate() + 1);
2779
+ markedDates[start.toISOString().split("T")[0]] = {
2780
+ color: theme.SUCCESS,
2781
+ textColor: theme.CONTENT_PRIMARY
2782
+ };
2783
+ }
2784
+ }
2774
2785
  if (startDate) {
2775
2786
  markedDates[startDate] = {
2776
2787
  startingDay: true,
2777
2788
  color: theme.SUCCESS,
2778
- textColor: theme.CONTENT_PRIMARY
2789
+ textColor: theme.CONTENT_PRIMARY,
2790
+ customContainerStyle: { backgroundColor: theme.SURFACE_INVERTED }
2779
2791
  };
2780
2792
  }
2781
2793
  if (endDate) {
2782
2794
  markedDates[endDate] = {
2783
2795
  endingDay: true,
2784
2796
  color: theme.SUCCESS,
2785
- textColor: theme.CONTENT_PRIMARY
2797
+ textColor: theme.CONTENT_PRIMARY,
2798
+ customContainerStyle: { backgroundColor: theme.SURFACE_INVERTED }
2786
2799
  };
2787
2800
  }
2788
- if (startDate && endDate) {
2789
- const start = new Date(startDate);
2790
- const end = new Date(endDate);
2791
- while (start < end) {
2792
- start.setDate(start.getDate() + 1);
2793
- markedDates[start.toISOString().split("T")[0]] = {
2794
- color: theme.SUCCESS,
2795
- textColor: theme.CONTENT_PRIMARY
2796
- };
2797
- }
2798
- }
2799
2801
  return markedDates;
2800
2802
  };
2801
2803
  const isButtonDisabled = !selectedRange.startDate || !selectedRange.endDate;
@@ -2813,10 +2815,12 @@ const DateRangePicker = (props) => {
2813
2815
  todayTextColor: theme.SUCCESS
2814
2816
  },
2815
2817
  style: {
2816
- backgroundColor: "transparent",
2817
- color: theme.CONTENT_SECONDRY
2818
+ backgroundColor: theme.SURFACE_TERTIARY,
2819
+ color: theme.CONTENT_SECONDRY,
2820
+ borderRadius: 24
2818
2821
  },
2819
2822
  onDayPress,
2823
+ firstDay: 1,
2820
2824
  ...props
2821
2825
  }
2822
2826
  ), /* @__PURE__ */ React__default["default"].createElement(
@@ -4097,7 +4101,7 @@ const styles$2 = reactNative.StyleSheet.create({
4097
4101
  borderRadius: moderateScale(20),
4098
4102
  margin: moderateScale(4)
4099
4103
  },
4100
- buttonTextCOntainer: {
4104
+ buttonTextContainer: {
4101
4105
  position: "absolute",
4102
4106
  left: 0,
4103
4107
  right: 0,
@@ -4113,6 +4117,9 @@ const CustomSlideButton = ({
4113
4117
  label,
4114
4118
  onComplete,
4115
4119
  icon,
4120
+ textStyle,
4121
+ containerStyle,
4122
+ sliderStyle,
4116
4123
  size = BUTTON_WIDTH
4117
4124
  }) => {
4118
4125
  const value = React.useRef(0);
@@ -4159,14 +4166,17 @@ const CustomSlideButton = ({
4159
4166
  const { theme } = useTheme();
4160
4167
  return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: {
4161
4168
  ...styles$2.sliderContainer,
4162
- backgroundColor: theme.SURFACE_INVERTED
4163
- }, onLayout: handleLayout, ref: cardRef }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$2.buttonTextCOntainer }, /* @__PURE__ */ React__default["default"].createElement(
4169
+ backgroundColor: theme.SURFACE_INVERTED,
4170
+ ...containerStyle
4171
+ }, onLayout: handleLayout, ref: cardRef }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$2.buttonTextContainer }, /* @__PURE__ */ React__default["default"].createElement(
4164
4172
  CustomTypography,
4165
4173
  {
4166
4174
  text: label,
4167
4175
  variant: FontStyle.L1_REGULAR,
4168
4176
  style: {
4169
- color: theme.CONTENT_INVERTED
4177
+ color: theme.CONTENT_INVERTED,
4178
+ alignSelf: "center",
4179
+ ...textStyle
4170
4180
  }
4171
4181
  }
4172
4182
  )), /* @__PURE__ */ React__default["default"].createElement(
@@ -4183,7 +4193,8 @@ const CustomSlideButton = ({
4183
4193
  backgroundColor: theme.SURFACE_PRIMARY,
4184
4194
  width: verticalScale(size),
4185
4195
  height: verticalScale(size),
4186
- borderRadius: verticalScale(size / 2)
4196
+ borderRadius: verticalScale(size / 2),
4197
+ ...sliderStyle
4187
4198
  }
4188
4199
  },
4189
4200
  icon