react-better-html 1.1.150 → 1.1.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/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3611,7 +3611,7 @@ var PageHeaderComponent = forwardRef8(function PageHeader({
|
|
|
3611
3611
|
{
|
|
3612
3612
|
alignItems: "center",
|
|
3613
3613
|
gap: theme2.styles.space,
|
|
3614
|
-
marginBottom: marginBottom
|
|
3614
|
+
marginBottom: marginBottom || theme2.styles.space * 2,
|
|
3615
3615
|
ref,
|
|
3616
3616
|
children: [
|
|
3617
3617
|
imageUrl && /* @__PURE__ */ jsx13(Image_default.profileImage, { src: imageUrl, size: imageSize ?? (mediaQuery.size600 ? 46 : 60) }),
|
|
@@ -6495,7 +6495,7 @@ InputFieldComponent.date = forwardRef11(function Date2({ minDate, maxDate, ...pr
|
|
|
6495
6495
|
}
|
|
6496
6496
|
);
|
|
6497
6497
|
});
|
|
6498
|
-
InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate, ...props }, ref) {
|
|
6498
|
+
InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate, defaultDateAfterTimePick, defaultTimeAfterDatePick = "00:00", ...props }, ref) {
|
|
6499
6499
|
const theme2 = useTheme();
|
|
6500
6500
|
const holderRef = useRef5(null);
|
|
6501
6501
|
const selectedHourRef = useRef5(null);
|
|
@@ -6504,31 +6504,31 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
|
|
|
6504
6504
|
const { internalValue, setInternalValue, inputFieldProps, insideInputFieldComponentProps, isOpen } = useComponentInputFieldDateProps(props, holderRef, isMobileIOS);
|
|
6505
6505
|
const onChange = useCallback9(
|
|
6506
6506
|
(date) => {
|
|
6507
|
-
const newValue = date ? `${date}T${internalValue?.toString().split("T")[1] ??
|
|
6507
|
+
const newValue = date ? `${date}T${internalValue?.toString().split("T")[1] ?? defaultTimeAfterDatePick}` : "";
|
|
6508
6508
|
inputFieldProps.onChangeValue?.(newValue);
|
|
6509
6509
|
setInternalValue(newValue);
|
|
6510
6510
|
},
|
|
6511
|
-
[internalValue, inputFieldProps.onChangeValue]
|
|
6511
|
+
[internalValue, defaultTimeAfterDatePick, inputFieldProps.onChangeValue]
|
|
6512
6512
|
);
|
|
6513
6513
|
const onClickHour = useCallback9(
|
|
6514
6514
|
(hour) => {
|
|
6515
6515
|
const newTime = `${hour.toString().padStart(2, "0")}:${internalValue?.toString().split(":")[1] || "00"}`;
|
|
6516
|
-
const today = `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1).toString().padStart(2, "0")}-${(/* @__PURE__ */ new Date()).getDate().toString().padStart(2, "0")}`;
|
|
6516
|
+
const today = defaultDateAfterTimePick ?? `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1).toString().padStart(2, "0")}-${(/* @__PURE__ */ new Date()).getDate().toString().padStart(2, "0")}`;
|
|
6517
6517
|
const newValue = `${(internalValue.trim() || today)?.toString().split("T")[0]}T${newTime}`;
|
|
6518
6518
|
inputFieldProps.onChangeValue?.(newValue);
|
|
6519
6519
|
setInternalValue(newValue);
|
|
6520
6520
|
},
|
|
6521
|
-
[internalValue, inputFieldProps.onChangeValue]
|
|
6521
|
+
[defaultDateAfterTimePick, internalValue, inputFieldProps.onChangeValue]
|
|
6522
6522
|
);
|
|
6523
6523
|
const onClickMinute = useCallback9(
|
|
6524
6524
|
(minute) => {
|
|
6525
6525
|
const newTime = `${internalValue?.toString().split("T")?.[1]?.split(":")[0] || "00"}:${minute.toString().padStart(2, "0")}`;
|
|
6526
|
-
const today = `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1).toString().padStart(2, "0")}-${(/* @__PURE__ */ new Date()).getDate().toString().padStart(2, "0")}`;
|
|
6526
|
+
const today = defaultDateAfterTimePick ?? `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1).toString().padStart(2, "0")}-${(/* @__PURE__ */ new Date()).getDate().toString().padStart(2, "0")}`;
|
|
6527
6527
|
const newValue = `${(internalValue.trim() || today)?.toString().split("T")[0]}T${newTime}`;
|
|
6528
6528
|
inputFieldProps.onChangeValue?.(newValue);
|
|
6529
6529
|
setInternalValue(newValue);
|
|
6530
6530
|
},
|
|
6531
|
-
[internalValue, inputFieldProps.onChangeValue]
|
|
6531
|
+
[defaultDateAfterTimePick, internalValue, inputFieldProps.onChangeValue]
|
|
6532
6532
|
);
|
|
6533
6533
|
useEffect8(() => {
|
|
6534
6534
|
if (isOpen && selectedHourRef.current)
|