@chekinapp/ui 0.0.91 → 0.0.92
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.cjs +16 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +75 -84
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3195,7 +3195,11 @@ function useModalWithHistoryControls({
|
|
|
3195
3195
|
}, [resetHash]);
|
|
3196
3196
|
const toggleModal = (0, import_react20.useCallback)(() => {
|
|
3197
3197
|
setIsOpen(!isOpen);
|
|
3198
|
-
|
|
3198
|
+
if (isOpen) {
|
|
3199
|
+
resetHash();
|
|
3200
|
+
} else {
|
|
3201
|
+
addHash();
|
|
3202
|
+
}
|
|
3199
3203
|
}, [addHash, isOpen, resetHash]);
|
|
3200
3204
|
(0, import_react20.useEffect)(() => {
|
|
3201
3205
|
const targetWindow = getWindow();
|
|
@@ -3408,17 +3412,15 @@ function useScrollableArea(options = {}) {
|
|
|
3408
3412
|
const internalRef = (0, import_react25.useRef)(null);
|
|
3409
3413
|
const ref = options.ref ?? internalRef;
|
|
3410
3414
|
const [state, setState] = (0, import_react25.useState)({ canScrollUp: false, canScrollDown: false });
|
|
3411
|
-
const updateState = (0, import_react25.useCallback)(() => {
|
|
3412
|
-
const element = ref.current;
|
|
3413
|
-
if (!element) return;
|
|
3414
|
-
const newState = getScrollableAreaState(element);
|
|
3415
|
-
setState(
|
|
3416
|
-
(prev) => prev.canScrollUp !== newState.canScrollUp || prev.canScrollDown !== newState.canScrollDown ? newState : prev
|
|
3417
|
-
);
|
|
3418
|
-
}, [ref]);
|
|
3419
3415
|
(0, import_react25.useEffect)(() => {
|
|
3420
3416
|
const element = ref.current;
|
|
3421
3417
|
if (!element) return;
|
|
3418
|
+
const updateState = () => {
|
|
3419
|
+
const newState = getScrollableAreaState(element);
|
|
3420
|
+
setState(
|
|
3421
|
+
(prev) => prev.canScrollUp !== newState.canScrollUp || prev.canScrollDown !== newState.canScrollDown ? newState : prev
|
|
3422
|
+
);
|
|
3423
|
+
};
|
|
3422
3424
|
updateState();
|
|
3423
3425
|
const resizeObserver = new ResizeObserver(updateState);
|
|
3424
3426
|
resizeObserver.observe(element);
|
|
@@ -3427,7 +3429,7 @@ function useScrollableArea(options = {}) {
|
|
|
3427
3429
|
resizeObserver.disconnect();
|
|
3428
3430
|
element.removeEventListener("scroll", updateState);
|
|
3429
3431
|
};
|
|
3430
|
-
}, [ref
|
|
3432
|
+
}, [ref]);
|
|
3431
3433
|
return {
|
|
3432
3434
|
ref,
|
|
3433
3435
|
...state
|
|
@@ -11839,7 +11841,7 @@ var DashboardInput = React44.forwardRef(
|
|
|
11839
11841
|
"div",
|
|
11840
11842
|
{
|
|
11841
11843
|
className: cn(
|
|
11842
|
-
"relative block min-h-[68px] max-w-[var(--dashboard-input-max-width,none)]",
|
|
11844
|
+
"relative block w-full min-h-[68px] max-w-[var(--dashboard-input-max-width,none)]",
|
|
11843
11845
|
disabled && "cursor-not-allowed opacity-50",
|
|
11844
11846
|
loading && "cursor-progress opacity-50",
|
|
11845
11847
|
wrapperClassName,
|
|
@@ -14523,7 +14525,6 @@ var DashboardDatepicker = React54.forwardRef(
|
|
|
14523
14525
|
setIsWheelOpen(false);
|
|
14524
14526
|
mobileTriggerRef.current?.focus();
|
|
14525
14527
|
}, []);
|
|
14526
|
-
const closeMonth = () => setIsMonthOpen(false);
|
|
14527
14528
|
const showCoverage = isEmpty && !isFocused && !isMobile2;
|
|
14528
14529
|
const wheel = useDatePickerWheel({
|
|
14529
14530
|
isOpen: isWheelOpen,
|
|
@@ -14976,7 +14977,7 @@ function useRangeTextInputs({
|
|
|
14976
14977
|
}
|
|
14977
14978
|
setFromText(value?.from ? format2(value.from) : "");
|
|
14978
14979
|
return void 0;
|
|
14979
|
-
}, [format2, fromText, onBlur, onCommit, parse3, value
|
|
14980
|
+
}, [format2, fromText, onBlur, onCommit, parse3, value]);
|
|
14980
14981
|
const handleToBlur = React56.useCallback(() => {
|
|
14981
14982
|
if (!toText) {
|
|
14982
14983
|
const next = { from: value?.from, to: void 0 };
|
|
@@ -14992,7 +14993,7 @@ function useRangeTextInputs({
|
|
|
14992
14993
|
return;
|
|
14993
14994
|
}
|
|
14994
14995
|
setToText(value?.to ? format2(value.to) : "");
|
|
14995
|
-
}, [format2, onBlur, onCommit, parse3, toText, value
|
|
14996
|
+
}, [format2, onBlur, onCommit, parse3, toText, value]);
|
|
14996
14997
|
return {
|
|
14997
14998
|
fromText,
|
|
14998
14999
|
toText,
|
|
@@ -15730,15 +15731,6 @@ var React61 = __toESM(require("react"), 1);
|
|
|
15730
15731
|
var import_lucide_react47 = require("lucide-react");
|
|
15731
15732
|
var import_react_i18next36 = require("react-i18next");
|
|
15732
15733
|
var import_jsx_runtime165 = require("react/jsx-runtime");
|
|
15733
|
-
function defaultFileNameFromUrl(url) {
|
|
15734
|
-
try {
|
|
15735
|
-
const parsed = new URL(url);
|
|
15736
|
-
const segments = parsed.pathname.split("/");
|
|
15737
|
-
return decodeURIComponent(segments[segments.length - 1] ?? url);
|
|
15738
|
-
} catch {
|
|
15739
|
-
return url;
|
|
15740
|
-
}
|
|
15741
|
-
}
|
|
15742
15734
|
function defaultDownload(url) {
|
|
15743
15735
|
window.open(url, "_blank", "noopener,noreferrer");
|
|
15744
15736
|
}
|
|
@@ -15763,8 +15755,7 @@ var DashboardFileInput = React61.forwardRef(
|
|
|
15763
15755
|
hideErrorMessage,
|
|
15764
15756
|
className,
|
|
15765
15757
|
width,
|
|
15766
|
-
downloadLabel
|
|
15767
|
-
fileNameFromUrl = defaultFileNameFromUrl
|
|
15758
|
+
downloadLabel
|
|
15768
15759
|
}, ref) {
|
|
15769
15760
|
const internalRef = React61.useRef(null);
|
|
15770
15761
|
const inputRef = useCombinedRef(ref, internalRef);
|