@radix-ui/react-focus-guards
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
9104
17
1