@julseb-lib/react 1.0.67 → 1.0.68
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 +15 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +15 -14
- package/dist/index.js.map +1 -1
- package/package.json +23 -23
package/dist/index.d.cts
CHANGED
|
@@ -154,7 +154,6 @@ declare function enableScroll(): void;
|
|
|
154
154
|
*/
|
|
155
155
|
declare function scrollToTop(): void;
|
|
156
156
|
|
|
157
|
-
type Event = MouseEvent | TouchEvent;
|
|
158
157
|
/**
|
|
159
158
|
* Hook to trigger a function when clicking outside a referenced element.
|
|
160
159
|
*
|
|
@@ -170,13 +169,14 @@ type Event = MouseEvent | TouchEvent;
|
|
|
170
169
|
* @template T - HTML element type that extends HTMLElement
|
|
171
170
|
* @param {RefObject<T>} ref - React ref object pointing to the target element
|
|
172
171
|
* @param {function} handler - Callback function to execute when clicking outside the element
|
|
173
|
-
* @param {
|
|
172
|
+
* @param {boolean} isActive - Whether the click outside detection is active (default: true)
|
|
173
|
+
* @param {number} delay - Delay in milliseconds before activating the listener (default: 100ms)
|
|
174
174
|
*
|
|
175
175
|
* @returns {void} This hook doesn't return anything
|
|
176
176
|
*
|
|
177
177
|
* @see https://doc-julseb-lib-react.vercel.app/helpers/hooks#useClickOutside
|
|
178
178
|
*/
|
|
179
|
-
declare const useClickOutside: <T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: (
|
|
179
|
+
declare const useClickOutside: <T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: () => void, isActive?: boolean, delay?: number) => void;
|
|
180
180
|
|
|
181
181
|
type CopiedValue = string | null;
|
|
182
182
|
type CopyFn = (text: string) => Promise<boolean>;
|
package/dist/index.d.ts
CHANGED
|
@@ -154,7 +154,6 @@ declare function enableScroll(): void;
|
|
|
154
154
|
*/
|
|
155
155
|
declare function scrollToTop(): void;
|
|
156
156
|
|
|
157
|
-
type Event = MouseEvent | TouchEvent;
|
|
158
157
|
/**
|
|
159
158
|
* Hook to trigger a function when clicking outside a referenced element.
|
|
160
159
|
*
|
|
@@ -170,13 +169,14 @@ type Event = MouseEvent | TouchEvent;
|
|
|
170
169
|
* @template T - HTML element type that extends HTMLElement
|
|
171
170
|
* @param {RefObject<T>} ref - React ref object pointing to the target element
|
|
172
171
|
* @param {function} handler - Callback function to execute when clicking outside the element
|
|
173
|
-
* @param {
|
|
172
|
+
* @param {boolean} isActive - Whether the click outside detection is active (default: true)
|
|
173
|
+
* @param {number} delay - Delay in milliseconds before activating the listener (default: 100ms)
|
|
174
174
|
*
|
|
175
175
|
* @returns {void} This hook doesn't return anything
|
|
176
176
|
*
|
|
177
177
|
* @see https://doc-julseb-lib-react.vercel.app/helpers/hooks#useClickOutside
|
|
178
178
|
*/
|
|
179
|
-
declare const useClickOutside: <T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: (
|
|
179
|
+
declare const useClickOutside: <T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: () => void, isActive?: boolean, delay?: number) => void;
|
|
180
180
|
|
|
181
181
|
type CopiedValue = string | null;
|
|
182
182
|
type CopyFn = (text: string) => Promise<boolean>;
|