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.js
CHANGED
|
@@ -2335,15 +2335,19 @@ var ModalComponent = (0, import_react11.forwardRef)(function Modal({
|
|
|
2335
2335
|
}
|
|
2336
2336
|
onOpen?.();
|
|
2337
2337
|
}, [onOpen, urlQuery, name]);
|
|
2338
|
-
const onClickClose = (0, import_react11.useCallback)(
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2338
|
+
const onClickClose = (0, import_react11.useCallback)(
|
|
2339
|
+
(event) => {
|
|
2340
|
+
event?.stopPropagation();
|
|
2341
|
+
setIsOpened.setFalse();
|
|
2342
|
+
onClose?.();
|
|
2343
|
+
if (urlQuery && name) urlQuery.removeQuery(`${name}-modal`, false);
|
|
2344
|
+
setTimeout(() => {
|
|
2345
|
+
dialogRef.current?.close();
|
|
2346
|
+
setIsOpenedLate.setFalse();
|
|
2347
|
+
}, 0.2 * 1e3);
|
|
2348
|
+
},
|
|
2349
|
+
[onClose, urlQuery, name]
|
|
2350
|
+
);
|
|
2347
2351
|
const onKeyDown = (0, import_react11.useCallback)(
|
|
2348
2352
|
(event) => {
|
|
2349
2353
|
if (event.key === "Escape") {
|
|
@@ -2357,17 +2361,13 @@ var ModalComponent = (0, import_react11.forwardRef)(function Modal({
|
|
|
2357
2361
|
if (!defaultIsOpened) return;
|
|
2358
2362
|
onClickOpen();
|
|
2359
2363
|
}, []);
|
|
2360
|
-
(0, import_react11.useImperativeHandle)(
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
};
|
|
2368
|
-
},
|
|
2369
|
-
[onClickOpen, onClickClose, isOpened]
|
|
2370
|
-
);
|
|
2364
|
+
(0, import_react11.useImperativeHandle)(ref, () => {
|
|
2365
|
+
return {
|
|
2366
|
+
open: onClickOpen,
|
|
2367
|
+
close: onClickClose,
|
|
2368
|
+
isOpened
|
|
2369
|
+
};
|
|
2370
|
+
}, [onClickOpen, onClickClose, isOpened]);
|
|
2371
2371
|
const headerVertical = headerTextAlign === "center";
|
|
2372
2372
|
return (0, import_react_dom.createPortal)(
|
|
2373
2373
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
@@ -4723,7 +4723,7 @@ InputFieldComponent.phoneNumber = (0, import_react21.forwardRef)(function PhoneN
|
|
|
4723
4723
|
return;
|
|
4724
4724
|
}
|
|
4725
4725
|
setDropdownValue(country.phoneNumberExtension);
|
|
4726
|
-
setInputFieldValue(newValue.slice(country
|
|
4726
|
+
setInputFieldValue(newValue.slice(country.phoneNumberExtension.length + 1));
|
|
4727
4727
|
}, [value]);
|
|
4728
4728
|
const readyId = id ?? internalId;
|
|
4729
4729
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Div_default.column, { width: "100%", gap: theme2.styles.gap / 2, children: [
|
|
@@ -5035,7 +5035,7 @@ InputFieldComponent.time = (0, import_react21.forwardRef)(function Time({ hoursT
|
|
|
5035
5035
|
const readyHour = readyHours.includes(hours2) ? hours2 : findClosestNumber(readyHours, hours2);
|
|
5036
5036
|
const readyMinute = readyMinutes.includes(minutes2) ? minutes2 : findClosestNumber(readyMinutes, minutes2);
|
|
5037
5037
|
const finalHour = minHours && readyHour < minHours ? minHours : maxHours && readyHour > maxHours ? maxHours : readyHour;
|
|
5038
|
-
const finalMinute = minHours
|
|
5038
|
+
const finalMinute = !!minHours && !!minMinutes && finalHour === minHours && readyMinute < minMinutes ? minMinutes : !!maxHours && !!maxMinutes && finalHour === maxHours && readyMinute > maxMinutes ? maxMinutes : readyMinute;
|
|
5039
5039
|
const newValue = `${finalHour.toString().padStart(2, "0")}:${finalMinute.toString().padStart(2, "0")}`;
|
|
5040
5040
|
inputFieldProps.onChangeValue?.(newValue);
|
|
5041
5041
|
}
|