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.d.ts
CHANGED
|
@@ -600,6 +600,7 @@ interface CommonTextInputProps {
|
|
|
600
600
|
labelColor?: string;
|
|
601
601
|
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto' | undefined;
|
|
602
602
|
handlePress?: () => void;
|
|
603
|
+
multiline?: boolean;
|
|
603
604
|
}
|
|
604
605
|
declare const CommonTextInput: React$1.FC<CommonTextInputProps>;
|
|
605
606
|
|
|
@@ -721,6 +722,9 @@ interface CustomSlideButtonProps {
|
|
|
721
722
|
onComplete?: () => void;
|
|
722
723
|
icon: React$1.ReactElement;
|
|
723
724
|
size?: number;
|
|
725
|
+
textStyle?: TextStyle;
|
|
726
|
+
containerStyle?: ViewStyle;
|
|
727
|
+
sliderStyle?: ViewStyle;
|
|
724
728
|
}
|
|
725
729
|
|
|
726
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:
|
|
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(
|
|
@@ -3265,7 +3269,9 @@ const CommonTextInput = ({
|
|
|
3265
3269
|
textColor = theme.CONTENT_PRIMARY["light"],
|
|
3266
3270
|
labelColor,
|
|
3267
3271
|
handlePress,
|
|
3268
|
-
pointerEvents
|
|
3272
|
+
pointerEvents,
|
|
3273
|
+
multiline = false
|
|
3274
|
+
// Default multiline to false
|
|
3269
3275
|
}) => {
|
|
3270
3276
|
return /* @__PURE__ */ React__default["default"].createElement(reactNative.Pressable, { onPress: handlePress, style: styles$8.container }, /* @__PURE__ */ React__default["default"].createElement(
|
|
3271
3277
|
reactNativePaper.TextInput,
|
|
@@ -3285,12 +3291,19 @@ const CommonTextInput = ({
|
|
|
3285
3291
|
primary: labelColor ? labelColor : DHRE_COLORS_TEXT.DH_BLACK
|
|
3286
3292
|
}
|
|
3287
3293
|
},
|
|
3288
|
-
style: [
|
|
3294
|
+
style: [
|
|
3295
|
+
errorMessage ? styles$8.errorInput : styles$8.input,
|
|
3296
|
+
inputStyle,
|
|
3297
|
+
multiline && styles$8.multilineInput
|
|
3298
|
+
// Apply multiline style if true
|
|
3299
|
+
],
|
|
3289
3300
|
maxLength,
|
|
3290
3301
|
textColor,
|
|
3291
3302
|
placeholder: placeholderText,
|
|
3292
3303
|
editable,
|
|
3293
|
-
pointerEvents
|
|
3304
|
+
pointerEvents,
|
|
3305
|
+
multiline,
|
|
3306
|
+
numberOfLines: multiline ? 4 : 1
|
|
3294
3307
|
}
|
|
3295
3308
|
), errorMessage ? /* @__PURE__ */ React__default["default"].createElement(
|
|
3296
3309
|
CustomTypography,
|
|
@@ -3308,9 +3321,6 @@ const styles$8 = reactNative.StyleSheet.create({
|
|
|
3308
3321
|
container: {
|
|
3309
3322
|
justifyContent: "center"
|
|
3310
3323
|
},
|
|
3311
|
-
touchable: {
|
|
3312
|
-
width: "100%"
|
|
3313
|
-
},
|
|
3314
3324
|
input: {
|
|
3315
3325
|
marginVertical: verticalScale(8),
|
|
3316
3326
|
backgroundColor: DHRE_COLORS_TEXT.DH_WHITE,
|
|
@@ -3325,6 +3335,11 @@ const styles$8 = reactNative.StyleSheet.create({
|
|
|
3325
3335
|
height: verticalScale(48),
|
|
3326
3336
|
justifyContent: "center"
|
|
3327
3337
|
},
|
|
3338
|
+
multilineInput: {
|
|
3339
|
+
minHeight: verticalScale(100),
|
|
3340
|
+
// Increased height for multiline
|
|
3341
|
+
paddingVertical: verticalScale(8)
|
|
3342
|
+
},
|
|
3328
3343
|
outlineStyle: {
|
|
3329
3344
|
borderWidth: 1,
|
|
3330
3345
|
height: verticalScale(48),
|
|
@@ -4086,7 +4101,7 @@ const styles$2 = reactNative.StyleSheet.create({
|
|
|
4086
4101
|
borderRadius: moderateScale(20),
|
|
4087
4102
|
margin: moderateScale(4)
|
|
4088
4103
|
},
|
|
4089
|
-
|
|
4104
|
+
buttonTextContainer: {
|
|
4090
4105
|
position: "absolute",
|
|
4091
4106
|
left: 0,
|
|
4092
4107
|
right: 0,
|
|
@@ -4102,6 +4117,9 @@ const CustomSlideButton = ({
|
|
|
4102
4117
|
label,
|
|
4103
4118
|
onComplete,
|
|
4104
4119
|
icon,
|
|
4120
|
+
textStyle,
|
|
4121
|
+
containerStyle,
|
|
4122
|
+
sliderStyle,
|
|
4105
4123
|
size = BUTTON_WIDTH
|
|
4106
4124
|
}) => {
|
|
4107
4125
|
const value = React.useRef(0);
|
|
@@ -4148,14 +4166,17 @@ const CustomSlideButton = ({
|
|
|
4148
4166
|
const { theme } = useTheme();
|
|
4149
4167
|
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: {
|
|
4150
4168
|
...styles$2.sliderContainer,
|
|
4151
|
-
backgroundColor: theme.SURFACE_INVERTED
|
|
4152
|
-
|
|
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(
|
|
4153
4172
|
CustomTypography,
|
|
4154
4173
|
{
|
|
4155
4174
|
text: label,
|
|
4156
4175
|
variant: FontStyle.L1_REGULAR,
|
|
4157
4176
|
style: {
|
|
4158
|
-
color: theme.CONTENT_INVERTED
|
|
4177
|
+
color: theme.CONTENT_INVERTED,
|
|
4178
|
+
alignSelf: "center",
|
|
4179
|
+
...textStyle
|
|
4159
4180
|
}
|
|
4160
4181
|
}
|
|
4161
4182
|
)), /* @__PURE__ */ React__default["default"].createElement(
|
|
@@ -4172,7 +4193,8 @@ const CustomSlideButton = ({
|
|
|
4172
4193
|
backgroundColor: theme.SURFACE_PRIMARY,
|
|
4173
4194
|
width: verticalScale(size),
|
|
4174
4195
|
height: verticalScale(size),
|
|
4175
|
-
borderRadius: verticalScale(size / 2)
|
|
4196
|
+
borderRadius: verticalScale(size / 2),
|
|
4197
|
+
...sliderStyle
|
|
4176
4198
|
}
|
|
4177
4199
|
},
|
|
4178
4200
|
icon
|