Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@radix-ui/react-focus-guards

Package Overview
Dependencies
Maintainers
5
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-focus-guards - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

dist/index.js

@@ -1,2 +0,2 @@

function e(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!0})}var t=require("react").useEffect,n={};let r=0;function o(e){return u(),e.children}function u(){t((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:c()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:c()),r++,()=>{1===r&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),r--}}),[])}function c(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}exports.FocusGuards=o,exports.useFocusGuards=u;const d=o;exports.Root=d,e(n,"useFocusGuards",(function(){return u})),e(n,"Root",(function(){return d})),e(n,"FocusGuards",(function(){return o}));
var e,t,n=(e={},t=require("react"),Object.keys(t).forEach((function(n){"default"!==n&&"__esModule"!==n&&Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})),e);let o=0;function r(e){return u(),e.children}function u(){n.useEffect((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:c()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:c()),o++,()=>{1===o&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),o--}}),[])}function c(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}exports.FocusGuards=r,exports.useFocusGuards=u;const d=r;exports.Root=d;
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

function e(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!0})}import{useEffect as t}from"react";var n={};let o=0;function r(e){return useFocusGuards(),e.children}export{r as FocusGuards};export function useFocusGuards(){t((()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:u()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:u()),o++,()=>{1===o&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),o--}}),[])}function u(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}export const Root=r;e(n,"useFocusGuards",(function(){return useFocusGuards})),e(n,"Root",(function(){return Root})),e(n,"FocusGuards",(function(){return r}));
import*as e from"react";let t=0;export function FocusGuards(e){return useFocusGuards(),e.children}export function useFocusGuards(){e.useEffect((()=>{var e,n;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:o()),document.body.insertAdjacentElement("beforeend",null!==(n=r[1])&&void 0!==n?n:o()),t++,()=>{1===t&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),t--}}),[])}function o(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}export const Root=FocusGuards;
//# sourceMappingURL=index.module.js.map
{
"name": "@radix-ui/react-focus-guards",
"version": "0.0.5",
"version": "0.0.6",
"license": "MIT",

@@ -5,0 +5,0 @@ "source": "src/index.ts",

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