@homecode/ui 4.20.0 → 4.20.1

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/esm/index.js CHANGED
@@ -73,6 +73,11 @@ import * as resizeObserver from './src/tools/resizeObserver.js';
73
73
  export { resizeObserver };
74
74
  import * as queryParams from './src/tools/queryParams.js';
75
75
  export { queryParams };
76
+ export { useDebounce } from './src/hooks/useDebounce.js';
77
+ import 'react';
78
+ export { useThrottle } from './src/hooks/useThrottle.js';
79
+ export { useIsMounted } from './src/hooks/useIsMounted.js';
80
+ export { useListKeyboardControl } from './src/hooks/useListKeyboardControl.js';
76
81
  import * as Form_types from './src/components/Form/Form.types.js';
77
82
  export { Form_types as FormTypes };
78
83
  export { SubmitButtons } from './src/components/Form/SubmitButtons/SubmitButtons.js';
@@ -0,0 +1,8 @@
1
+ import { useCallback } from 'react';
2
+ import debounce from '../tools/debounce.js';
3
+
4
+ function useDebounce(fn, delay) {
5
+ return useCallback(debounce(fn, delay), [fn, delay]);
6
+ }
7
+
8
+ export { useDebounce };
@@ -0,0 +1,5 @@
1
+ export * from './useDebounce';
2
+ export * from './useEvent';
3
+ export * from './useThrottle';
4
+ export * from './useIsMounted';
5
+ export * from './useListKeyboardControl';
@@ -0,0 +1 @@
1
+ export declare function useDebounce(fn: (...args: any[]) => void, delay: number): any;
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
2
  export * from './services';
3
3
  export * from './tools';
4
+ export * from './hooks';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.20.0",
3
+ "version": "4.20.1",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "test": "jest",