New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@zag-js/focus-trap

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/focus-trap - npm Package Compare versions

Comparing version 0.70.0 to 0.71.0

42

dist/index.js

@@ -1,34 +0,13 @@

"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
'use strict';
var domQuery = require('@zag-js/dom-query');
var focusTrap = require('focus-trap');
// src/index.ts
var src_exports = {};
__export(src_exports, {
trapFocus: () => trapFocus
});
module.exports = __toCommonJS(src_exports);
var import_dom_query = require("@zag-js/dom-query");
var import_focus_trap = require("focus-trap");
function trapFocus(el, options = {}) {
let trap;
(0, import_dom_query.nextTick)(() => {
domQuery.nextTick(() => {
const contentEl = typeof el === "function" ? el() : el;
if (!contentEl) return;
trap = (0, import_focus_trap.createFocusTrap)(contentEl, {
trap = focusTrap.createFocusTrap(contentEl, {
escapeDeactivates: false,

@@ -38,3 +17,3 @@ allowOutsideClick: true,

returnFocusOnDeactivate: true,
document: (0, import_dom_query.getDocument)(contentEl),
document: domQuery.getDocument(contentEl),
fallbackFocus: contentEl,

@@ -52,6 +31,3 @@ ...options

}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
trapFocus
});
//# sourceMappingURL=index.js.map
exports.trapFocus = trapFocus;
{
"name": "@zag-js/focus-trap",
"version": "0.70.0",
"version": "0.71.0",
"description": "Focus trap utility",

@@ -28,3 +28,3 @@ "keywords": [

"focus-trap": "7.6.0",
"@zag-js/dom-query": "0.70.0"
"@zag-js/dom-query": "0.71.0"
},

@@ -31,0 +31,0 @@ "devDependencies": {

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