dhre-ui-kit 0.0.152 → 0.0.153
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.js +11 -5
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +11 -5
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -282,7 +282,7 @@ const ThemeProvider = ({ children }) => {
|
|
|
282
282
|
acc[key] = theme[key][mode];
|
|
283
283
|
return acc;
|
|
284
284
|
}, {});
|
|
285
|
-
return /* @__PURE__ */ React__default["default"].createElement(ThemeContext.Provider, { value: { theme: filteredTheme } }, children);
|
|
285
|
+
return /* @__PURE__ */ React__default["default"].createElement(ThemeContext.Provider, { value: { theme: filteredTheme, mode } }, children);
|
|
286
286
|
};
|
|
287
287
|
const useTheme = () => {
|
|
288
288
|
const context = React.useContext(ThemeContext);
|
|
@@ -2754,7 +2754,7 @@ const DateRangePicker = (props) => {
|
|
|
2754
2754
|
startDate: "",
|
|
2755
2755
|
endDate: ""
|
|
2756
2756
|
});
|
|
2757
|
-
const { theme } = useTheme();
|
|
2757
|
+
const { theme, mode } = useTheme();
|
|
2758
2758
|
const onDayPress = (day) => {
|
|
2759
2759
|
const { dateString } = day;
|
|
2760
2760
|
const { startDate, endDate } = selectedRange;
|
|
@@ -2778,7 +2778,7 @@ const DateRangePicker = (props) => {
|
|
|
2778
2778
|
start.setDate(start.getDate() + 1);
|
|
2779
2779
|
markedDates[start.toISOString().split("T")[0]] = {
|
|
2780
2780
|
color: theme.SUCCESS,
|
|
2781
|
-
textColor: theme.
|
|
2781
|
+
textColor: theme.CONTENT_INVERTED
|
|
2782
2782
|
};
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
@@ -2787,7 +2787,10 @@ const DateRangePicker = (props) => {
|
|
|
2787
2787
|
startingDay: true,
|
|
2788
2788
|
color: theme.SUCCESS,
|
|
2789
2789
|
textColor: theme.CONTENT_INVERTED,
|
|
2790
|
-
customContainerStyle: { backgroundColor: theme.SURFACE_INVERTED }
|
|
2790
|
+
customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
|
|
2791
|
+
borderWidth: moderateScale(2),
|
|
2792
|
+
borderColor: theme.SURFACE_PRIMARY
|
|
2793
|
+
}
|
|
2791
2794
|
};
|
|
2792
2795
|
}
|
|
2793
2796
|
if (endDate) {
|
|
@@ -2795,7 +2798,10 @@ const DateRangePicker = (props) => {
|
|
|
2795
2798
|
endingDay: true,
|
|
2796
2799
|
color: theme.SUCCESS,
|
|
2797
2800
|
textColor: theme.CONTENT_INVERTED,
|
|
2798
|
-
customContainerStyle: { backgroundColor: theme.SURFACE_INVERTED }
|
|
2801
|
+
customContainerStyle: mode === "dark" ? { backgroundColor: theme.SURFACE_INVERTED } : {
|
|
2802
|
+
borderWidth: moderateScale(2),
|
|
2803
|
+
borderColor: theme.SURFACE_PRIMARY
|
|
2804
|
+
}
|
|
2799
2805
|
};
|
|
2800
2806
|
}
|
|
2801
2807
|
return markedDates;
|