Socket
Socket
Sign inDemoInstall

@chakra-ui/focus-lock

Package Overview
Dependencies
Maintainers
3
Versions
258
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/focus-lock - npm Package Compare versions

Comparing version 0.0.0-dev-20230116122157 to 0.0.0-dev-20230116124502

dist/chunk-CG74IXYP.mjs

12

dist/focus-lock.js

@@ -37,2 +37,4 @@ "use strict";

var import_jsx_runtime = require("react/jsx-runtime");
var _a;
var FocusTrap = (_a = import_react_focus_lock.default.default) != null ? _a : import_react_focus_lock.default;
var FocusLock = (props) => {

@@ -57,4 +59,4 @@ const {

requestAnimationFrame(() => {
var _a;
(_a = contentRef.current) == null ? void 0 : _a.focus();
var _a2;
(_a2 = contentRef.current) == null ? void 0 : _a2.focus();
});

@@ -65,8 +67,8 @@ }

const onDeactivation = (0, import_react.useCallback)(() => {
var _a;
(_a = finalFocusRef == null ? void 0 : finalFocusRef.current) == null ? void 0 : _a.focus();
var _a2;
(_a2 = finalFocusRef == null ? void 0 : finalFocusRef.current) == null ? void 0 : _a2.focus();
}, [finalFocusRef]);
const returnFocus = restoreFocus && !finalFocusRef;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_focus_lock.default,
FocusTrap,
{

@@ -73,0 +75,0 @@ crossFrame: lockFocusAcrossFrames,

@@ -38,2 +38,4 @@ "use strict";

var import_jsx_runtime = require("react/jsx-runtime");
var _a;
var FocusTrap = (_a = import_react_focus_lock.default.default) != null ? _a : import_react_focus_lock.default;
var FocusLock = (props) => {

@@ -58,4 +60,4 @@ const {

requestAnimationFrame(() => {
var _a;
(_a = contentRef.current) == null ? void 0 : _a.focus();
var _a2;
(_a2 = contentRef.current) == null ? void 0 : _a2.focus();
});

@@ -66,8 +68,8 @@ }

const onDeactivation = (0, import_react.useCallback)(() => {
var _a;
(_a = finalFocusRef == null ? void 0 : finalFocusRef.current) == null ? void 0 : _a.focus();
var _a2;
(_a2 = finalFocusRef == null ? void 0 : finalFocusRef.current) == null ? void 0 : _a2.focus();
}, [finalFocusRef]);
const returnFocus = restoreFocus && !finalFocusRef;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_react_focus_lock.default,
FocusTrap,
{

@@ -74,0 +76,0 @@ crossFrame: lockFocusAcrossFrames,

{
"name": "@chakra-ui/focus-lock",
"version": "0.0.0-dev-20230116122157",
"version": "0.0.0-dev-20230116124502",
"description": "React focus lock for all Chakra components",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc