Initial commit
This commit is contained in:
9
node_modules/@radix-ui/react-focus-guards/dist/index.d.mts
generated
vendored
Normal file
9
node_modules/@radix-ui/react-focus-guards/dist/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
declare function FocusGuards(props: any): any;
|
||||
/**
|
||||
* Injects a pair of focus guards at the edges of the whole DOM tree
|
||||
* to ensure `focusin` & `focusout` events can be caught consistently.
|
||||
*/
|
||||
declare function useFocusGuards(): void;
|
||||
declare const Root: typeof FocusGuards;
|
||||
|
||||
export { FocusGuards, Root, useFocusGuards };
|
||||
9
node_modules/@radix-ui/react-focus-guards/dist/index.d.ts
generated
vendored
Normal file
9
node_modules/@radix-ui/react-focus-guards/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
declare function FocusGuards(props: any): any;
|
||||
/**
|
||||
* Injects a pair of focus guards at the edges of the whole DOM tree
|
||||
* to ensure `focusin` & `focusout` events can be caught consistently.
|
||||
*/
|
||||
declare function useFocusGuards(): void;
|
||||
declare const Root: typeof FocusGuards;
|
||||
|
||||
export { FocusGuards, Root, useFocusGuards };
|
||||
72
node_modules/@radix-ui/react-focus-guards/dist/index.js
generated
vendored
Normal file
72
node_modules/@radix-ui/react-focus-guards/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// packages/react/focus-guards/src/index.ts
|
||||
var src_exports = {};
|
||||
__export(src_exports, {
|
||||
FocusGuards: () => FocusGuards,
|
||||
Root: () => Root,
|
||||
useFocusGuards: () => useFocusGuards
|
||||
});
|
||||
module.exports = __toCommonJS(src_exports);
|
||||
|
||||
// packages/react/focus-guards/src/FocusGuards.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var count = 0;
|
||||
function FocusGuards(props) {
|
||||
useFocusGuards();
|
||||
return props.children;
|
||||
}
|
||||
function useFocusGuards() {
|
||||
React.useEffect(() => {
|
||||
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
||||
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
||||
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
||||
count++;
|
||||
return () => {
|
||||
if (count === 1) {
|
||||
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
||||
}
|
||||
count--;
|
||||
};
|
||||
}, []);
|
||||
}
|
||||
function createFocusGuard() {
|
||||
const element = document.createElement("span");
|
||||
element.setAttribute("data-radix-focus-guard", "");
|
||||
element.tabIndex = 0;
|
||||
element.style.outline = "none";
|
||||
element.style.opacity = "0";
|
||||
element.style.position = "fixed";
|
||||
element.style.pointerEvents = "none";
|
||||
return element;
|
||||
}
|
||||
var Root = FocusGuards;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
node_modules/@radix-ui/react-focus-guards/dist/index.js.map
generated
vendored
Normal file
7
node_modules/@radix-ui/react-focus-guards/dist/index.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/index.ts", "../src/FocusGuards.tsx"],
|
||||
"sourcesContent": ["'use client';\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n} from './FocusGuards';\n", "import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\nfunction FocusGuards(props: any) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\n\nfunction createFocusGuard() {\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.outline = 'none';\n element.style.opacity = '0';\n element.style.position = 'fixed';\n element.style.pointerEvents = 'none';\n return element;\n}\n\nconst Root = FocusGuards;\n\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n};\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAGvB,IAAI,QAAQ;AAEZ,SAAS,YAAY,OAAY;AAC/B,iBAAe;AACf,SAAO,MAAM;AACf;AAMA,SAAS,iBAAiB;AACxB,EAAM,gBAAU,MAAM;AACpB,UAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,aAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACrF,aAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACpF;AAEA,WAAO,MAAM;AACX,UAAI,UAAU,GAAG;AACf,iBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,OAAO,CAAC;AAAA,MACvF;AACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACP;AAEA,SAAS,mBAAmB;AAC1B,QAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,UAAQ,aAAa,0BAA0B,EAAE;AACjD,UAAQ,WAAW;AACnB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,WAAW;AACzB,UAAQ,MAAM,gBAAgB;AAC9B,SAAO;AACT;AAEA,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
40
node_modules/@radix-ui/react-focus-guards/dist/index.mjs
generated
vendored
Normal file
40
node_modules/@radix-ui/react-focus-guards/dist/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
"use client";
|
||||
|
||||
// packages/react/focus-guards/src/FocusGuards.tsx
|
||||
import * as React from "react";
|
||||
var count = 0;
|
||||
function FocusGuards(props) {
|
||||
useFocusGuards();
|
||||
return props.children;
|
||||
}
|
||||
function useFocusGuards() {
|
||||
React.useEffect(() => {
|
||||
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
||||
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
||||
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
||||
count++;
|
||||
return () => {
|
||||
if (count === 1) {
|
||||
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
||||
}
|
||||
count--;
|
||||
};
|
||||
}, []);
|
||||
}
|
||||
function createFocusGuard() {
|
||||
const element = document.createElement("span");
|
||||
element.setAttribute("data-radix-focus-guard", "");
|
||||
element.tabIndex = 0;
|
||||
element.style.outline = "none";
|
||||
element.style.opacity = "0";
|
||||
element.style.position = "fixed";
|
||||
element.style.pointerEvents = "none";
|
||||
return element;
|
||||
}
|
||||
var Root = FocusGuards;
|
||||
export {
|
||||
FocusGuards,
|
||||
Root,
|
||||
useFocusGuards
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map
generated
vendored
Normal file
7
node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/FocusGuards.tsx"],
|
||||
"sourcesContent": ["import * as React from 'react';\n\n/** Number of components which have requested interest to have focus guards */\nlet count = 0;\n\nfunction FocusGuards(props: any) {\n useFocusGuards();\n return props.children;\n}\n\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n\n return () => {\n if (count === 1) {\n document.querySelectorAll('[data-radix-focus-guard]').forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\n\nfunction createFocusGuard() {\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.outline = 'none';\n element.style.opacity = '0';\n element.style.position = 'fixed';\n element.style.pointerEvents = 'none';\n return element;\n}\n\nconst Root = FocusGuards;\n\nexport {\n FocusGuards,\n //\n Root,\n //\n useFocusGuards,\n};\n"],
|
||||
"mappings": ";;;AAAA,YAAY,WAAW;AAGvB,IAAI,QAAQ;AAEZ,SAAS,YAAY,OAAY;AAC/B,iBAAe;AACf,SAAO,MAAM;AACf;AAMA,SAAS,iBAAiB;AACxB,EAAM,gBAAU,MAAM;AACpB,UAAM,aAAa,SAAS,iBAAiB,0BAA0B;AACvE,aAAS,KAAK,sBAAsB,cAAc,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACrF,aAAS,KAAK,sBAAsB,aAAa,WAAW,CAAC,KAAK,iBAAiB,CAAC;AACpF;AAEA,WAAO,MAAM;AACX,UAAI,UAAU,GAAG;AACf,iBAAS,iBAAiB,0BAA0B,EAAE,QAAQ,CAAC,SAAS,KAAK,OAAO,CAAC;AAAA,MACvF;AACA;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACP;AAEA,SAAS,mBAAmB;AAC1B,QAAM,UAAU,SAAS,cAAc,MAAM;AAC7C,UAAQ,aAAa,0BAA0B,EAAE;AACjD,UAAQ,WAAW;AACnB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,UAAU;AACxB,UAAQ,MAAM,WAAW;AACzB,UAAQ,MAAM,gBAAgB;AAC9B,SAAO;AACT;AAEA,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
Reference in New Issue
Block a user