dhre-ui-kit 0.0.147 → 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 +4 -0
- package/lib/index.js +48 -26
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +48 -26
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
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_PRIMARY,
|
|
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_PRIMARY,
|
|
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:
|
|
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(
|
|
@@ -3232,7 +3236,9 @@ const CommonTextInput = ({
|
|
|
3232
3236
|
textColor = theme.CONTENT_PRIMARY["light"],
|
|
3233
3237
|
labelColor,
|
|
3234
3238
|
handlePress,
|
|
3235
|
-
pointerEvents
|
|
3239
|
+
pointerEvents,
|
|
3240
|
+
multiline = false
|
|
3241
|
+
// Default multiline to false
|
|
3236
3242
|
}) => {
|
|
3237
3243
|
return /* @__PURE__ */ React.createElement(Pressable, { onPress: handlePress, style: styles$8.container }, /* @__PURE__ */ React.createElement(
|
|
3238
3244
|
TextInput$1,
|
|
@@ -3252,12 +3258,19 @@ const CommonTextInput = ({
|
|
|
3252
3258
|
primary: labelColor ? labelColor : DHRE_COLORS_TEXT.DH_BLACK
|
|
3253
3259
|
}
|
|
3254
3260
|
},
|
|
3255
|
-
style: [
|
|
3261
|
+
style: [
|
|
3262
|
+
errorMessage ? styles$8.errorInput : styles$8.input,
|
|
3263
|
+
inputStyle,
|
|
3264
|
+
multiline && styles$8.multilineInput
|
|
3265
|
+
// Apply multiline style if true
|
|
3266
|
+
],
|
|
3256
3267
|
maxLength,
|
|
3257
3268
|
textColor,
|
|
3258
3269
|
placeholder: placeholderText,
|
|
3259
3270
|
editable,
|
|
3260
|
-
pointerEvents
|
|
3271
|
+
pointerEvents,
|
|
3272
|
+
multiline,
|
|
3273
|
+
numberOfLines: multiline ? 4 : 1
|
|
3261
3274
|
}
|
|
3262
3275
|
), errorMessage ? /* @__PURE__ */ React.createElement(
|
|
3263
3276
|
CustomTypography,
|
|
@@ -3275,9 +3288,6 @@ const styles$8 = StyleSheet.create({
|
|
|
3275
3288
|
container: {
|
|
3276
3289
|
justifyContent: "center"
|
|
3277
3290
|
},
|
|
3278
|
-
touchable: {
|
|
3279
|
-
width: "100%"
|
|
3280
|
-
},
|
|
3281
3291
|
input: {
|
|
3282
3292
|
marginVertical: verticalScale(8),
|
|
3283
3293
|
backgroundColor: DHRE_COLORS_TEXT.DH_WHITE,
|
|
@@ -3292,6 +3302,11 @@ const styles$8 = StyleSheet.create({
|
|
|
3292
3302
|
height: verticalScale(48),
|
|
3293
3303
|
justifyContent: "center"
|
|
3294
3304
|
},
|
|
3305
|
+
multilineInput: {
|
|
3306
|
+
minHeight: verticalScale(100),
|
|
3307
|
+
// Increased height for multiline
|
|
3308
|
+
paddingVertical: verticalScale(8)
|
|
3309
|
+
},
|
|
3295
3310
|
outlineStyle: {
|
|
3296
3311
|
borderWidth: 1,
|
|
3297
3312
|
height: verticalScale(48),
|
|
@@ -4053,7 +4068,7 @@ const styles$2 = StyleSheet.create({
|
|
|
4053
4068
|
borderRadius: moderateScale(20),
|
|
4054
4069
|
margin: moderateScale(4)
|
|
4055
4070
|
},
|
|
4056
|
-
|
|
4071
|
+
buttonTextContainer: {
|
|
4057
4072
|
position: "absolute",
|
|
4058
4073
|
left: 0,
|
|
4059
4074
|
right: 0,
|
|
@@ -4069,6 +4084,9 @@ const CustomSlideButton = ({
|
|
|
4069
4084
|
label,
|
|
4070
4085
|
onComplete,
|
|
4071
4086
|
icon,
|
|
4087
|
+
textStyle,
|
|
4088
|
+
containerStyle,
|
|
4089
|
+
sliderStyle,
|
|
4072
4090
|
size = BUTTON_WIDTH
|
|
4073
4091
|
}) => {
|
|
4074
4092
|
const value = useRef(0);
|
|
@@ -4115,14 +4133,17 @@ const CustomSlideButton = ({
|
|
|
4115
4133
|
const { theme } = useTheme();
|
|
4116
4134
|
return /* @__PURE__ */ React.createElement(View, { style: {
|
|
4117
4135
|
...styles$2.sliderContainer,
|
|
4118
|
-
backgroundColor: theme.SURFACE_INVERTED
|
|
4119
|
-
|
|
4136
|
+
backgroundColor: theme.SURFACE_INVERTED,
|
|
4137
|
+
...containerStyle
|
|
4138
|
+
}, onLayout: handleLayout, ref: cardRef }, /* @__PURE__ */ React.createElement(View, { style: styles$2.buttonTextContainer }, /* @__PURE__ */ React.createElement(
|
|
4120
4139
|
CustomTypography,
|
|
4121
4140
|
{
|
|
4122
4141
|
text: label,
|
|
4123
4142
|
variant: FontStyle.L1_REGULAR,
|
|
4124
4143
|
style: {
|
|
4125
|
-
color: theme.CONTENT_INVERTED
|
|
4144
|
+
color: theme.CONTENT_INVERTED,
|
|
4145
|
+
alignSelf: "center",
|
|
4146
|
+
...textStyle
|
|
4126
4147
|
}
|
|
4127
4148
|
}
|
|
4128
4149
|
)), /* @__PURE__ */ React.createElement(
|
|
@@ -4139,7 +4160,8 @@ const CustomSlideButton = ({
|
|
|
4139
4160
|
backgroundColor: theme.SURFACE_PRIMARY,
|
|
4140
4161
|
width: verticalScale(size),
|
|
4141
4162
|
height: verticalScale(size),
|
|
4142
|
-
borderRadius: verticalScale(size / 2)
|
|
4163
|
+
borderRadius: verticalScale(size / 2),
|
|
4164
|
+
...sliderStyle
|
|
4143
4165
|
}
|
|
4144
4166
|
},
|
|
4145
4167
|
icon
|