@aiszlab/relax 1.2.28-beta.3 → 1.2.28-beta.4

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.
@@ -3,7 +3,7 @@ import { type DOMAttributes } from 'react';
3
3
  * @description
4
4
  * hooks for focus
5
5
  */
6
- type UseFoucsBy<T> = Pick<DOMAttributes<T>, 'onFocus' | 'onBlur'> & {
6
+ type UseFocusBy<T> = Pick<DOMAttributes<T>, 'onFocus' | 'onBlur'> & {
7
7
  onFocusChange?: (isFocused: boolean) => void;
8
8
  };
9
9
  /**
@@ -11,5 +11,5 @@ type UseFoucsBy<T> = Pick<DOMAttributes<T>, 'onFocus' | 'onBlur'> & {
11
11
  * dom attributes
12
12
  */
13
13
  type UsedFocus<T> = [boolean, Required<Pick<DOMAttributes<T>, 'onFocus' | 'onBlur'>>];
14
- export declare const useFoucs: <T = Element>(useBy?: UseFoucsBy<T> | undefined) => UsedFocus<T>;
14
+ export declare const useFocus: <T = Element>(useBy?: UseFocusBy<T> | undefined) => UsedFocus<T>;
15
15
  export {};
@@ -2,7 +2,7 @@ import { useCallback } from 'react';
2
2
  import { useBoolean } from './use-boolean.mjs';
3
3
  import { chain } from '../utils/chain.mjs';
4
4
 
5
- const useFoucs = (useBy) => {
5
+ const useFocus = (useBy) => {
6
6
  const [isFocused, { turnOn, turnOff }] = useBoolean(false);
7
7
  const onFocus = useCallback(() => {
8
8
  chain(useBy === null || useBy === void 0 ? void 0 : useBy.onFocus, turnOn, () => { var _a; return (_a = useBy === null || useBy === void 0 ? void 0 : useBy.onFocusChange) === null || _a === void 0 ? void 0 : _a.call(useBy, true); })();
@@ -13,4 +13,4 @@ const useFoucs = (useBy) => {
13
13
  return [isFocused, { onFocus, onBlur }];
14
14
  };
15
15
 
16
- export { useFoucs };
16
+ export { useFocus };
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export { useEvent } from './hooks/use-event';
20
20
  export { useUpdateEffect } from './hooks/use-update-effect';
21
21
  export { useCounter } from './hooks/use-counter';
22
22
  export { useHover } from './hooks/use-hover';
23
- export { useFoucs } from './hooks/use-focus';
23
+ export { useFocus } from './hooks/use-focus';
24
24
  /**
25
25
  * @description
26
26
  * is
package/dist/index.mjs CHANGED
@@ -16,7 +16,7 @@ export { useEvent } from './hooks/use-event.mjs';
16
16
  export { useUpdateEffect } from './hooks/use-update-effect.mjs';
17
17
  export { useCounter } from './hooks/use-counter.mjs';
18
18
  export { useHover } from './hooks/use-hover.mjs';
19
- export { useFoucs } from './hooks/use-focus.mjs';
19
+ export { useFocus } from './hooks/use-focus.mjs';
20
20
  export { isRefable } from './is/is-refable.mjs';
21
21
  export { isUndefined } from './is/is-undefined.mjs';
22
22
  export { isStateGetter } from './is/is-state-getter.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiszlab/relax",
3
- "version": "1.2.28-beta.3",
3
+ "version": "1.2.28-beta.4",
4
4
  "description": "react utils collection",
5
5
  "type": "module",
6
6
  "exports": {