@yamada-ui/use-focus
Advanced tools
Comparing version 0.1.6 to 0.2.0
@@ -0,1 +1,2 @@ | ||
"use client" | ||
"use strict"; | ||
@@ -105,6 +106,6 @@ var __defProp = Object.defineProperty; | ||
}; | ||
(0, import_use_event_listener.useEventListener)(doc, "pointerdown", (event) => { | ||
(0, import_use_event_listener.useEventListener)(doc, "pointerdown", (ev) => { | ||
if (!(0, import_utils.isSafari)() || !enabled) | ||
return; | ||
const target = event.target; | ||
const target = ev.target; | ||
const els = elements != null ? elements : [ref]; | ||
@@ -116,3 +117,3 @@ const isValidTarget = els.some((elementOrRef) => { | ||
if (doc().activeElement !== target && isValidTarget) { | ||
event.preventDefault(); | ||
ev.preventDefault(); | ||
target.focus(); | ||
@@ -119,0 +120,0 @@ } |
{ | ||
"name": "@yamada-ui/use-focus", | ||
"version": "0.1.6", | ||
"version": "0.2.0", | ||
"description": "Yamada UI useFocus custom hook", | ||
@@ -28,3 +28,3 @@ "keywords": [ | ||
"@yamada-ui/utils": "0.2.0", | ||
"@yamada-ui/use-event-listener": "0.1.6" | ||
"@yamada-ui/use-event-listener": "0.2.0" | ||
}, | ||
@@ -45,3 +45,6 @@ "devDependencies": { | ||
"esm" | ||
] | ||
], | ||
"banner": { | ||
"js": "\"use client\"" | ||
} | ||
}, | ||
@@ -48,0 +51,0 @@ "module": "dist/index.mjs", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12996
254
+ Added@yamada-ui/use-event-listener@0.2.0(transitive)
- Removed@yamada-ui/use-event-listener@0.1.6(transitive)