使用VUE重构项目
This commit is contained in:
20
frontend/admin/node_modules/@floating-ui/core/LICENSE
generated
vendored
Normal file
20
frontend/admin/node_modules/@floating-ui/core/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-present Floating UI contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
4
frontend/admin/node_modules/@floating-ui/core/README.md
generated
vendored
Normal file
4
frontend/admin/node_modules/@floating-ui/core/README.md
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# @floating-ui/core
|
||||
|
||||
This is the platform-agnostic core of Floating UI, exposing the main
|
||||
`computePosition` function but no platform interface logic.
|
||||
63
frontend/admin/node_modules/@floating-ui/core/package.json
generated
vendored
Normal file
63
frontend/admin/node_modules/@floating-ui/core/package.json
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "@floating-ui/core",
|
||||
"version": "1.7.5",
|
||||
"description": "Positioning library for floating elements: tooltips, popovers, dropdowns, and more",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./dist/floating-ui.core.umd.js",
|
||||
"module": "./dist/floating-ui.core.esm.js",
|
||||
"unpkg": "./dist/floating-ui.core.umd.min.js",
|
||||
"types": "./dist/floating-ui.core.d.ts",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/floating-ui.core.d.mts",
|
||||
"default": "./dist/floating-ui.core.mjs"
|
||||
},
|
||||
"types": "./dist/floating-ui.core.d.ts",
|
||||
"module": "./dist/floating-ui.core.esm.js",
|
||||
"default": "./dist/floating-ui.core.umd.js"
|
||||
}
|
||||
},
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"author": "atomiks",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/floating-ui/floating-ui",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/floating-ui/floating-ui.git",
|
||||
"directory": "packages/core"
|
||||
},
|
||||
"homepage": "https://floating-ui.com",
|
||||
"keywords": [
|
||||
"tooltip",
|
||||
"popover",
|
||||
"dropdown",
|
||||
"menu",
|
||||
"popup",
|
||||
"positioning"
|
||||
],
|
||||
"dependencies": {
|
||||
"@floating-ui/utils": "^0.2.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"config": "0.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch",
|
||||
"lint": "eslint .",
|
||||
"format": "prettier --write .",
|
||||
"clean": "rimraf dist out-tsc",
|
||||
"dev": "rollup -c -w",
|
||||
"build": "rollup -c",
|
||||
"build:api": "build-api --tsc tsconfig.lib.json",
|
||||
"publint": "publint",
|
||||
"typecheck": "tsc -b"
|
||||
}
|
||||
}
|
||||
20
frontend/admin/node_modules/@floating-ui/dom/LICENSE
generated
vendored
Normal file
20
frontend/admin/node_modules/@floating-ui/dom/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-present Floating UI contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
4
frontend/admin/node_modules/@floating-ui/dom/README.md
generated
vendored
Normal file
4
frontend/admin/node_modules/@floating-ui/dom/README.md
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# @floating-ui/dom
|
||||
|
||||
This is the library to use Floating UI on the web, wrapping `@floating-ui/core`
|
||||
with DOM interface logic.
|
||||
71
frontend/admin/node_modules/@floating-ui/dom/package.json
generated
vendored
Normal file
71
frontend/admin/node_modules/@floating-ui/dom/package.json
generated
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"name": "@floating-ui/dom",
|
||||
"version": "1.7.6",
|
||||
"description": "Floating UI for the web",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./dist/floating-ui.dom.umd.js",
|
||||
"module": "./dist/floating-ui.dom.esm.js",
|
||||
"unpkg": "./dist/floating-ui.dom.umd.min.js",
|
||||
"types": "./dist/floating-ui.dom.d.ts",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/floating-ui.dom.d.mts",
|
||||
"default": "./dist/floating-ui.dom.mjs"
|
||||
},
|
||||
"types": "./dist/floating-ui.dom.d.ts",
|
||||
"module": "./dist/floating-ui.dom.esm.js",
|
||||
"default": "./dist/floating-ui.dom.umd.js"
|
||||
}
|
||||
},
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"author": "atomiks",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/floating-ui/floating-ui",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/floating-ui/floating-ui.git",
|
||||
"directory": "packages/dom"
|
||||
},
|
||||
"homepage": "https://floating-ui.com",
|
||||
"keywords": [
|
||||
"tooltip",
|
||||
"popover",
|
||||
"dropdown",
|
||||
"menu",
|
||||
"popup",
|
||||
"positioning"
|
||||
],
|
||||
"dependencies": {
|
||||
"@floating-ui/core": "^1.7.5",
|
||||
"@floating-ui/utils": "^0.2.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.3.19",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router-dom": "^6.21.1",
|
||||
"config": "0.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"format": "prettier --write .",
|
||||
"clean": "rimraf dist out-tsc test-results",
|
||||
"dev": "vite",
|
||||
"build": "rollup -c",
|
||||
"build:api": "build-api --tsc tsconfig.lib.json",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch",
|
||||
"publint": "publint",
|
||||
"playwright": "playwright test ./test/functional",
|
||||
"typecheck": "tsc -b"
|
||||
}
|
||||
}
|
||||
20
frontend/admin/node_modules/@floating-ui/utils/LICENSE
generated
vendored
Normal file
20
frontend/admin/node_modules/@floating-ui/utils/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-present Floating UI contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
4
frontend/admin/node_modules/@floating-ui/utils/README.md
generated
vendored
Normal file
4
frontend/admin/node_modules/@floating-ui/utils/README.md
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
# @floating-ui/utils
|
||||
|
||||
Utility functions shared across Floating UI packages. You may use these
|
||||
functions in your own projects, but are subject to breaking changes.
|
||||
47
frontend/admin/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts
generated
vendored
Normal file
47
frontend/admin/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
declare function getComputedStyle_2(element: Element): CSSStyleDeclaration;
|
||||
export { getComputedStyle_2 as getComputedStyle }
|
||||
|
||||
export declare function getContainingBlock(element: Element): HTMLElement | null;
|
||||
|
||||
export declare function getDocumentElement(node: Node | Window): HTMLElement;
|
||||
|
||||
export declare function getFrameElement(win: Window): Element | null;
|
||||
|
||||
export declare function getNearestOverflowAncestor(node: Node): HTMLElement;
|
||||
|
||||
export declare function getNodeName(node: Node | Window): string;
|
||||
|
||||
export declare function getNodeScroll(element: Element | Window): {
|
||||
scrollLeft: number;
|
||||
scrollTop: number;
|
||||
};
|
||||
|
||||
export declare function getOverflowAncestors(node: Node, list?: OverflowAncestors, traverseIframes?: boolean): OverflowAncestors;
|
||||
|
||||
export declare function getParentNode(node: Node): Node;
|
||||
|
||||
export declare function getWindow(node: any): typeof window;
|
||||
|
||||
export declare function isContainingBlock(elementOrCss: Element | CSSStyleDeclaration): boolean;
|
||||
|
||||
export declare function isElement(value: unknown): value is Element;
|
||||
|
||||
export declare function isHTMLElement(value: unknown): value is HTMLElement;
|
||||
|
||||
export declare function isLastTraversableNode(node: Node): boolean;
|
||||
|
||||
export declare function isNode(value: unknown): value is Node;
|
||||
|
||||
export declare function isOverflowElement(element: Element): boolean;
|
||||
|
||||
export declare function isShadowRoot(value: unknown): value is ShadowRoot;
|
||||
|
||||
export declare function isTableElement(element: Element): boolean;
|
||||
|
||||
export declare function isTopLayer(element: Element): boolean;
|
||||
|
||||
export declare function isWebKit(): boolean;
|
||||
|
||||
declare type OverflowAncestors = Array<Element | Window | VisualViewport>;
|
||||
|
||||
export { }
|
||||
165
frontend/admin/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js
generated
vendored
Normal file
165
frontend/admin/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js
generated
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
function hasWindow() {
|
||||
return typeof window !== 'undefined';
|
||||
}
|
||||
function getNodeName(node) {
|
||||
if (isNode(node)) {
|
||||
return (node.nodeName || '').toLowerCase();
|
||||
}
|
||||
// Mocked nodes in testing environments may not be instances of Node. By
|
||||
// returning `#document` an infinite loop won't occur.
|
||||
// https://github.com/floating-ui/floating-ui/issues/2317
|
||||
return '#document';
|
||||
}
|
||||
function getWindow(node) {
|
||||
var _node$ownerDocument;
|
||||
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
||||
}
|
||||
function getDocumentElement(node) {
|
||||
var _ref;
|
||||
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
||||
}
|
||||
function isNode(value) {
|
||||
if (!hasWindow()) {
|
||||
return false;
|
||||
}
|
||||
return value instanceof Node || value instanceof getWindow(value).Node;
|
||||
}
|
||||
function isElement(value) {
|
||||
if (!hasWindow()) {
|
||||
return false;
|
||||
}
|
||||
return value instanceof Element || value instanceof getWindow(value).Element;
|
||||
}
|
||||
function isHTMLElement(value) {
|
||||
if (!hasWindow()) {
|
||||
return false;
|
||||
}
|
||||
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
||||
}
|
||||
function isShadowRoot(value) {
|
||||
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
||||
}
|
||||
function isOverflowElement(element) {
|
||||
const {
|
||||
overflow,
|
||||
overflowX,
|
||||
overflowY,
|
||||
display
|
||||
} = getComputedStyle(element);
|
||||
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
||||
}
|
||||
function isTableElement(element) {
|
||||
return /^(table|td|th)$/.test(getNodeName(element));
|
||||
}
|
||||
function isTopLayer(element) {
|
||||
try {
|
||||
if (element.matches(':popover-open')) {
|
||||
return true;
|
||||
}
|
||||
} catch (_e) {
|
||||
// no-op
|
||||
}
|
||||
try {
|
||||
return element.matches(':modal');
|
||||
} catch (_e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
||||
const containRe = /paint|layout|strict|content/;
|
||||
const isNotNone = value => !!value && value !== 'none';
|
||||
let isWebKitValue;
|
||||
function isContainingBlock(elementOrCss) {
|
||||
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
||||
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
||||
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
|
||||
}
|
||||
function getContainingBlock(element) {
|
||||
let currentNode = getParentNode(element);
|
||||
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
||||
if (isContainingBlock(currentNode)) {
|
||||
return currentNode;
|
||||
} else if (isTopLayer(currentNode)) {
|
||||
return null;
|
||||
}
|
||||
currentNode = getParentNode(currentNode);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function isWebKit() {
|
||||
if (isWebKitValue == null) {
|
||||
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
||||
}
|
||||
return isWebKitValue;
|
||||
}
|
||||
function isLastTraversableNode(node) {
|
||||
return /^(html|body|#document)$/.test(getNodeName(node));
|
||||
}
|
||||
function getComputedStyle(element) {
|
||||
return getWindow(element).getComputedStyle(element);
|
||||
}
|
||||
function getNodeScroll(element) {
|
||||
if (isElement(element)) {
|
||||
return {
|
||||
scrollLeft: element.scrollLeft,
|
||||
scrollTop: element.scrollTop
|
||||
};
|
||||
}
|
||||
return {
|
||||
scrollLeft: element.scrollX,
|
||||
scrollTop: element.scrollY
|
||||
};
|
||||
}
|
||||
function getParentNode(node) {
|
||||
if (getNodeName(node) === 'html') {
|
||||
return node;
|
||||
}
|
||||
const result =
|
||||
// Step into the shadow DOM of the parent of a slotted node.
|
||||
node.assignedSlot ||
|
||||
// DOM Element detected.
|
||||
node.parentNode ||
|
||||
// ShadowRoot detected.
|
||||
isShadowRoot(node) && node.host ||
|
||||
// Fallback.
|
||||
getDocumentElement(node);
|
||||
return isShadowRoot(result) ? result.host : result;
|
||||
}
|
||||
function getNearestOverflowAncestor(node) {
|
||||
const parentNode = getParentNode(node);
|
||||
if (isLastTraversableNode(parentNode)) {
|
||||
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
||||
}
|
||||
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
||||
return parentNode;
|
||||
}
|
||||
return getNearestOverflowAncestor(parentNode);
|
||||
}
|
||||
function getOverflowAncestors(node, list, traverseIframes) {
|
||||
var _node$ownerDocument2;
|
||||
if (list === void 0) {
|
||||
list = [];
|
||||
}
|
||||
if (traverseIframes === void 0) {
|
||||
traverseIframes = true;
|
||||
}
|
||||
const scrollableAncestor = getNearestOverflowAncestor(node);
|
||||
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
||||
const win = getWindow(scrollableAncestor);
|
||||
if (isBody) {
|
||||
const frameElement = getFrameElement(win);
|
||||
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
||||
} else {
|
||||
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
||||
}
|
||||
}
|
||||
function getFrameElement(win) {
|
||||
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
||||
}
|
||||
|
||||
export { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };
|
||||
192
frontend/admin/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js
generated
vendored
Normal file
192
frontend/admin/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js
generated
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.FloatingUIUtilsDOM = {}));
|
||||
})(this, (function (exports) { 'use strict';
|
||||
|
||||
function hasWindow() {
|
||||
return typeof window !== 'undefined';
|
||||
}
|
||||
function getNodeName(node) {
|
||||
if (isNode(node)) {
|
||||
return (node.nodeName || '').toLowerCase();
|
||||
}
|
||||
// Mocked nodes in testing environments may not be instances of Node. By
|
||||
// returning `#document` an infinite loop won't occur.
|
||||
// https://github.com/floating-ui/floating-ui/issues/2317
|
||||
return '#document';
|
||||
}
|
||||
function getWindow(node) {
|
||||
var _node$ownerDocument;
|
||||
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
||||
}
|
||||
function getDocumentElement(node) {
|
||||
var _ref;
|
||||
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
||||
}
|
||||
function isNode(value) {
|
||||
if (!hasWindow()) {
|
||||
return false;
|
||||
}
|
||||
return value instanceof Node || value instanceof getWindow(value).Node;
|
||||
}
|
||||
function isElement(value) {
|
||||
if (!hasWindow()) {
|
||||
return false;
|
||||
}
|
||||
return value instanceof Element || value instanceof getWindow(value).Element;
|
||||
}
|
||||
function isHTMLElement(value) {
|
||||
if (!hasWindow()) {
|
||||
return false;
|
||||
}
|
||||
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
||||
}
|
||||
function isShadowRoot(value) {
|
||||
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
||||
}
|
||||
function isOverflowElement(element) {
|
||||
const {
|
||||
overflow,
|
||||
overflowX,
|
||||
overflowY,
|
||||
display
|
||||
} = getComputedStyle(element);
|
||||
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
||||
}
|
||||
function isTableElement(element) {
|
||||
return /^(table|td|th)$/.test(getNodeName(element));
|
||||
}
|
||||
function isTopLayer(element) {
|
||||
try {
|
||||
if (element.matches(':popover-open')) {
|
||||
return true;
|
||||
}
|
||||
} catch (_e) {
|
||||
// no-op
|
||||
}
|
||||
try {
|
||||
return element.matches(':modal');
|
||||
} catch (_e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
||||
const containRe = /paint|layout|strict|content/;
|
||||
const isNotNone = value => !!value && value !== 'none';
|
||||
let isWebKitValue;
|
||||
function isContainingBlock(elementOrCss) {
|
||||
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
||||
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
||||
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
|
||||
}
|
||||
function getContainingBlock(element) {
|
||||
let currentNode = getParentNode(element);
|
||||
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
||||
if (isContainingBlock(currentNode)) {
|
||||
return currentNode;
|
||||
} else if (isTopLayer(currentNode)) {
|
||||
return null;
|
||||
}
|
||||
currentNode = getParentNode(currentNode);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function isWebKit() {
|
||||
if (isWebKitValue == null) {
|
||||
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
||||
}
|
||||
return isWebKitValue;
|
||||
}
|
||||
function isLastTraversableNode(node) {
|
||||
return /^(html|body|#document)$/.test(getNodeName(node));
|
||||
}
|
||||
function getComputedStyle(element) {
|
||||
return getWindow(element).getComputedStyle(element);
|
||||
}
|
||||
function getNodeScroll(element) {
|
||||
if (isElement(element)) {
|
||||
return {
|
||||
scrollLeft: element.scrollLeft,
|
||||
scrollTop: element.scrollTop
|
||||
};
|
||||
}
|
||||
return {
|
||||
scrollLeft: element.scrollX,
|
||||
scrollTop: element.scrollY
|
||||
};
|
||||
}
|
||||
function getParentNode(node) {
|
||||
if (getNodeName(node) === 'html') {
|
||||
return node;
|
||||
}
|
||||
const result =
|
||||
// Step into the shadow DOM of the parent of a slotted node.
|
||||
node.assignedSlot ||
|
||||
// DOM Element detected.
|
||||
node.parentNode ||
|
||||
// ShadowRoot detected.
|
||||
isShadowRoot(node) && node.host ||
|
||||
// Fallback.
|
||||
getDocumentElement(node);
|
||||
return isShadowRoot(result) ? result.host : result;
|
||||
}
|
||||
function getNearestOverflowAncestor(node) {
|
||||
const parentNode = getParentNode(node);
|
||||
if (isLastTraversableNode(parentNode)) {
|
||||
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
||||
}
|
||||
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
||||
return parentNode;
|
||||
}
|
||||
return getNearestOverflowAncestor(parentNode);
|
||||
}
|
||||
function getOverflowAncestors(node, list, traverseIframes) {
|
||||
var _node$ownerDocument2;
|
||||
if (list === void 0) {
|
||||
list = [];
|
||||
}
|
||||
if (traverseIframes === void 0) {
|
||||
traverseIframes = true;
|
||||
}
|
||||
const scrollableAncestor = getNearestOverflowAncestor(node);
|
||||
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
||||
const win = getWindow(scrollableAncestor);
|
||||
if (isBody) {
|
||||
const frameElement = getFrameElement(win);
|
||||
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
||||
} else {
|
||||
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
||||
}
|
||||
}
|
||||
function getFrameElement(win) {
|
||||
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
||||
}
|
||||
|
||||
exports.getComputedStyle = getComputedStyle;
|
||||
exports.getContainingBlock = getContainingBlock;
|
||||
exports.getDocumentElement = getDocumentElement;
|
||||
exports.getFrameElement = getFrameElement;
|
||||
exports.getNearestOverflowAncestor = getNearestOverflowAncestor;
|
||||
exports.getNodeName = getNodeName;
|
||||
exports.getNodeScroll = getNodeScroll;
|
||||
exports.getOverflowAncestors = getOverflowAncestors;
|
||||
exports.getParentNode = getParentNode;
|
||||
exports.getWindow = getWindow;
|
||||
exports.isContainingBlock = isContainingBlock;
|
||||
exports.isElement = isElement;
|
||||
exports.isHTMLElement = isHTMLElement;
|
||||
exports.isLastTraversableNode = isLastTraversableNode;
|
||||
exports.isNode = isNode;
|
||||
exports.isOverflowElement = isOverflowElement;
|
||||
exports.isShadowRoot = isShadowRoot;
|
||||
exports.isTableElement = isTableElement;
|
||||
exports.isTopLayer = isTopLayer;
|
||||
exports.isWebKit = isWebKit;
|
||||
|
||||
}));
|
||||
6
frontend/admin/node_modules/@floating-ui/utils/dom/package.json
generated
vendored
Normal file
6
frontend/admin/node_modules/@floating-ui/utils/dom/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sideEffects": false,
|
||||
"main": "floating-ui.utils.dom.umd.js",
|
||||
"module": "floating-ui.utils.dom.esm.js",
|
||||
"types": "floating-ui.utils.dom.d.ts"
|
||||
}
|
||||
70
frontend/admin/node_modules/@floating-ui/utils/package.json
generated
vendored
Normal file
70
frontend/admin/node_modules/@floating-ui/utils/package.json
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"name": "@floating-ui/utils",
|
||||
"version": "0.2.11",
|
||||
"description": "Utilities for Floating UI",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "./dist/floating-ui.utils.umd.js",
|
||||
"module": "./dist/floating-ui.utils.esm.js",
|
||||
"types": "./dist/floating-ui.utils.d.ts",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"dist",
|
||||
"dom"
|
||||
],
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/floating-ui.utils.d.mts",
|
||||
"default": "./dist/floating-ui.utils.mjs"
|
||||
},
|
||||
"types": "./dist/floating-ui.utils.d.ts",
|
||||
"module": "./dist/floating-ui.utils.esm.js",
|
||||
"default": "./dist/floating-ui.utils.umd.js"
|
||||
},
|
||||
"./dom": {
|
||||
"import": {
|
||||
"types": "./dist/floating-ui.utils.dom.d.mts",
|
||||
"default": "./dist/floating-ui.utils.dom.mjs"
|
||||
},
|
||||
"types": "./dist/floating-ui.utils.dom.d.ts",
|
||||
"module": "./dist/floating-ui.utils.dom.esm.js",
|
||||
"default": "./dist/floating-ui.utils.dom.umd.js"
|
||||
}
|
||||
},
|
||||
"author": "atomiks",
|
||||
"license": "MIT",
|
||||
"bugs": "https://github.com/floating-ui/floating-ui",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/floating-ui/floating-ui.git",
|
||||
"directory": "packages/utils"
|
||||
},
|
||||
"homepage": "https://floating-ui.com",
|
||||
"keywords": [
|
||||
"tooltip",
|
||||
"popover",
|
||||
"dropdown",
|
||||
"menu",
|
||||
"popup",
|
||||
"positioning"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^6.1.6",
|
||||
"config": "0.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"format": "prettier --write .",
|
||||
"clean": "rimraf dist out-tsc dom react",
|
||||
"test": "vitest run --globals",
|
||||
"test:watch": "vitest watch --globals",
|
||||
"dev": "rollup -c -w",
|
||||
"build": "rollup -c",
|
||||
"build:api": "build-api --tsc tsconfig.lib.json --aec api-extractor.json --aec api-extractor.dom.json --aec api-extractor.react.json",
|
||||
"publint": "publint",
|
||||
"typecheck": "tsc -b"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user