@julseb-lib/react 1.1.27 → 1.1.28
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 +2 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -560,7 +560,7 @@ declare const usePagination: ({ currentPage, setCurrentPage, totalPages, }: ILib
|
|
|
560
560
|
*/
|
|
561
561
|
declare const useTextLineCount: (text: string, fontSize?: number) => {
|
|
562
562
|
visualLines: number;
|
|
563
|
-
elementRef: react.RefObject<
|
|
563
|
+
elementRef: react.RefObject<HTMLTextAreaElement | HTMLInputElement | null>;
|
|
564
564
|
};
|
|
565
565
|
|
|
566
566
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -560,7 +560,7 @@ declare const usePagination: ({ currentPage, setCurrentPage, totalPages, }: ILib
|
|
|
560
560
|
*/
|
|
561
561
|
declare const useTextLineCount: (text: string, fontSize?: number) => {
|
|
562
562
|
visualLines: number;
|
|
563
|
-
elementRef: react.RefObject<
|
|
563
|
+
elementRef: react.RefObject<HTMLTextAreaElement | HTMLInputElement | null>;
|
|
564
564
|
};
|
|
565
565
|
|
|
566
566
|
/**
|
package/dist/index.js
CHANGED
|
@@ -140,7 +140,7 @@ var useClickOutside = (ref, handler, isActive = true, delay = 100) => {
|
|
|
140
140
|
useEffect(() => {
|
|
141
141
|
const handleClickOutside = (event) => {
|
|
142
142
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
143
|
-
handler();
|
|
143
|
+
handler(event);
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
if (isActive) {
|
|
@@ -67841,8 +67841,7 @@ var Header = ({
|
|
|
67841
67841
|
ref: el
|
|
67842
67842
|
};
|
|
67843
67843
|
useKeyPress("Escape", handleClose);
|
|
67844
|
-
useClickOutside(el, (
|
|
67845
|
-
if (e.target?.closest(".header-burger")) return;
|
|
67844
|
+
useClickOutside(el, () => {
|
|
67846
67845
|
if (isOpen) handleClose();
|
|
67847
67846
|
});
|
|
67848
67847
|
return /* @__PURE__ */ jsxs291(
|