react-better-html 1.1.231 → 1.1.232
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.js +22 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2272,15 +2272,19 @@ var ModalComponent = forwardRef7(function Modal({
|
|
|
2272
2272
|
}
|
|
2273
2273
|
onOpen?.();
|
|
2274
2274
|
}, [onOpen, urlQuery, name]);
|
|
2275
|
-
const onClickClose = useCallback4(
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2275
|
+
const onClickClose = useCallback4(
|
|
2276
|
+
(event) => {
|
|
2277
|
+
event?.stopPropagation();
|
|
2278
|
+
setIsOpened.setFalse();
|
|
2279
|
+
onClose?.();
|
|
2280
|
+
if (urlQuery && name) urlQuery.removeQuery(`${name}-modal`, false);
|
|
2281
|
+
setTimeout(() => {
|
|
2282
|
+
dialogRef.current?.close();
|
|
2283
|
+
setIsOpenedLate.setFalse();
|
|
2284
|
+
}, 0.2 * 1e3);
|
|
2285
|
+
},
|
|
2286
|
+
[onClose, urlQuery, name]
|
|
2287
|
+
);
|
|
2284
2288
|
const onKeyDown = useCallback4(
|
|
2285
2289
|
(event) => {
|
|
2286
2290
|
if (event.key === "Escape") {
|
|
@@ -2294,17 +2298,13 @@ var ModalComponent = forwardRef7(function Modal({
|
|
|
2294
2298
|
if (!defaultIsOpened) return;
|
|
2295
2299
|
onClickOpen();
|
|
2296
2300
|
}, []);
|
|
2297
|
-
useImperativeHandle(
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
};
|
|
2305
|
-
},
|
|
2306
|
-
[onClickOpen, onClickClose, isOpened]
|
|
2307
|
-
);
|
|
2301
|
+
useImperativeHandle(ref, () => {
|
|
2302
|
+
return {
|
|
2303
|
+
open: onClickOpen,
|
|
2304
|
+
close: onClickClose,
|
|
2305
|
+
isOpened
|
|
2306
|
+
};
|
|
2307
|
+
}, [onClickOpen, onClickClose, isOpened]);
|
|
2308
2308
|
const headerVertical = headerTextAlign === "center";
|
|
2309
2309
|
return createPortal(
|
|
2310
2310
|
/* @__PURE__ */ jsx9(
|
|
@@ -4674,7 +4674,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, val
|
|
|
4674
4674
|
return;
|
|
4675
4675
|
}
|
|
4676
4676
|
setDropdownValue(country.phoneNumberExtension);
|
|
4677
|
-
setInputFieldValue(newValue.slice(country
|
|
4677
|
+
setInputFieldValue(newValue.slice(country.phoneNumberExtension.length + 1));
|
|
4678
4678
|
}, [value]);
|
|
4679
4679
|
const readyId = id ?? internalId;
|
|
4680
4680
|
return /* @__PURE__ */ jsxs14(Div_default.column, { width: "100%", gap: theme2.styles.gap / 2, children: [
|
|
@@ -4986,7 +4986,7 @@ InputFieldComponent.time = forwardRef11(function Time({ hoursToRender, minutesTo
|
|
|
4986
4986
|
const readyHour = readyHours.includes(hours2) ? hours2 : findClosestNumber(readyHours, hours2);
|
|
4987
4987
|
const readyMinute = readyMinutes.includes(minutes2) ? minutes2 : findClosestNumber(readyMinutes, minutes2);
|
|
4988
4988
|
const finalHour = minHours && readyHour < minHours ? minHours : maxHours && readyHour > maxHours ? maxHours : readyHour;
|
|
4989
|
-
const finalMinute = minHours
|
|
4989
|
+
const finalMinute = !!minHours && !!minMinutes && finalHour === minHours && readyMinute < minMinutes ? minMinutes : !!maxHours && !!maxMinutes && finalHour === maxHours && readyMinute > maxMinutes ? maxMinutes : readyMinute;
|
|
4990
4990
|
const newValue = `${finalHour.toString().padStart(2, "0")}:${finalMinute.toString().padStart(2, "0")}`;
|
|
4991
4991
|
inputFieldProps.onChangeValue?.(newValue);
|
|
4992
4992
|
}
|