dhre-ui-kit 0.0.148 → 0.0.151

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
@@ -2738,31 +2738,33 @@ const DateRangePicker = (props) => {
2738
2738
  const getMarkedDates = () => {
2739
2739
  const { startDate, endDate } = selectedRange;
2740
2740
  const markedDates = {};
2741
+ if (startDate && endDate) {
2742
+ const start = new Date(startDate);
2743
+ const end = new Date(endDate);
2744
+ while (start < end) {
2745
+ start.setDate(start.getDate() + 1);
2746
+ markedDates[start.toISOString().split("T")[0]] = {
2747
+ color: theme.SUCCESS,
2748
+ textColor: theme.CONTENT_PRIMARY
2749
+ };
2750
+ }
2751
+ }
2741
2752
  if (startDate) {
2742
2753
  markedDates[startDate] = {
2743
2754
  startingDay: true,
2744
2755
  color: theme.SUCCESS,
2745
- textColor: theme.CONTENT_PRIMARY
2756
+ textColor: theme.CONTENT_INVERTED,
2757
+ customContainerStyle: { backgroundColor: theme.SURFACE_INVERTED }
2746
2758
  };
2747
2759
  }
2748
2760
  if (endDate) {
2749
2761
  markedDates[endDate] = {
2750
2762
  endingDay: true,
2751
2763
  color: theme.SUCCESS,
2752
- textColor: theme.CONTENT_PRIMARY
2764
+ textColor: theme.CONTENT_INVERTED,
2765
+ customContainerStyle: { backgroundColor: theme.SURFACE_INVERTED }
2753
2766
  };
2754
2767
  }
2755
- if (startDate && endDate) {
2756
- const start = new Date(startDate);
2757
- const end = new Date(endDate);
2758
- while (start < end) {
2759
- start.setDate(start.getDate() + 1);
2760
- markedDates[start.toISOString().split("T")[0]] = {
2761
- color: theme.SUCCESS,
2762
- textColor: theme.CONTENT_PRIMARY
2763
- };
2764
- }
2765
- }
2766
2768
  return markedDates;
2767
2769
  };
2768
2770
  const isButtonDisabled = !selectedRange.startDate || !selectedRange.endDate;
@@ -2780,10 +2782,12 @@ const DateRangePicker = (props) => {
2780
2782
  todayTextColor: theme.SUCCESS
2781
2783
  },
2782
2784
  style: {
2783
- backgroundColor: "transparent",
2784
- color: theme.CONTENT_SECONDRY
2785
+ backgroundColor: theme.SURFACE_TERTIARY,
2786
+ color: theme.CONTENT_SECONDRY,
2787
+ borderRadius: 24
2785
2788
  },
2786
2789
  onDayPress,
2790
+ firstDay: 1,
2787
2791
  ...props
2788
2792
  }
2789
2793
  ), /* @__PURE__ */ React.createElement(
@@ -4064,7 +4068,7 @@ const styles$2 = StyleSheet.create({
4064
4068
  borderRadius: moderateScale(20),
4065
4069
  margin: moderateScale(4)
4066
4070
  },
4067
- buttonTextCOntainer: {
4071
+ buttonTextContainer: {
4068
4072
  position: "absolute",
4069
4073
  left: 0,
4070
4074
  right: 0,
@@ -4080,6 +4084,9 @@ const CustomSlideButton = ({
4080
4084
  label,
4081
4085
  onComplete,
4082
4086
  icon,
4087
+ textStyle,
4088
+ containerStyle,
4089
+ sliderStyle,
4083
4090
  size = BUTTON_WIDTH
4084
4091
  }) => {
4085
4092
  const value = useRef(0);
@@ -4126,14 +4133,17 @@ const CustomSlideButton = ({
4126
4133
  const { theme } = useTheme();
4127
4134
  return /* @__PURE__ */ React.createElement(View, { style: {
4128
4135
  ...styles$2.sliderContainer,
4129
- backgroundColor: theme.SURFACE_INVERTED
4130
- }, onLayout: handleLayout, ref: cardRef }, /* @__PURE__ */ React.createElement(View, { style: styles$2.buttonTextCOntainer }, /* @__PURE__ */ React.createElement(
4136
+ backgroundColor: theme.SURFACE_INVERTED,
4137
+ ...containerStyle
4138
+ }, onLayout: handleLayout, ref: cardRef }, /* @__PURE__ */ React.createElement(View, { style: styles$2.buttonTextContainer }, /* @__PURE__ */ React.createElement(
4131
4139
  CustomTypography,
4132
4140
  {
4133
4141
  text: label,
4134
4142
  variant: FontStyle.L1_REGULAR,
4135
4143
  style: {
4136
- color: theme.CONTENT_INVERTED
4144
+ color: theme.CONTENT_INVERTED,
4145
+ alignSelf: "center",
4146
+ ...textStyle
4137
4147
  }
4138
4148
  }
4139
4149
  )), /* @__PURE__ */ React.createElement(
@@ -4150,7 +4160,8 @@ const CustomSlideButton = ({
4150
4160
  backgroundColor: theme.SURFACE_PRIMARY,
4151
4161
  width: verticalScale(size),
4152
4162
  height: verticalScale(size),
4153
- borderRadius: verticalScale(size / 2)
4163
+ borderRadius: verticalScale(size / 2),
4164
+ ...sliderStyle
4154
4165
  }
4155
4166
  },
4156
4167
  icon