v1.0 with SW PWA enabled
This commit is contained in:
13
frontend/node_modules/@radix-ui/number/README.md
generated
vendored
Normal file
13
frontend/node_modules/@radix-ui/number/README.md
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
# `number`
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
$ yarn add @radix-ui/number
|
||||
# or
|
||||
$ npm install @radix-ui/number
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
This is an internal utility, not intended for public usage.
|
||||
3
frontend/node_modules/@radix-ui/number/dist/index.d.mts
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/number/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
declare function clamp(value: number, [min, max]: [number, number]): number;
|
||||
|
||||
export { clamp };
|
||||
3
frontend/node_modules/@radix-ui/number/dist/index.d.ts
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/number/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
declare function clamp(value: number, [min, max]: [number, number]): number;
|
||||
|
||||
export { clamp };
|
||||
31
frontend/node_modules/@radix-ui/number/dist/index.js
generated
vendored
Normal file
31
frontend/node_modules/@radix-ui/number/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
"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);
|
||||
|
||||
// packages/core/number/src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
clamp: () => clamp
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// packages/core/number/src/number.ts
|
||||
function clamp(value, [min, max]) {
|
||||
return Math.min(max, Math.max(min, value));
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/number/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/number/dist/index.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/index.ts", "../src/number.ts"],
|
||||
"sourcesContent": ["export { clamp } from './number';\n", "function clamp(value: number, [min, max]: [number, number]): number {\n return Math.min(max, Math.max(min, value));\n}\n\nexport { clamp };\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AAClE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;",
|
||||
"names": []
|
||||
}
|
||||
8
frontend/node_modules/@radix-ui/number/dist/index.mjs
generated
vendored
Normal file
8
frontend/node_modules/@radix-ui/number/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
// packages/core/number/src/number.ts
|
||||
function clamp(value, [min, max]) {
|
||||
return Math.min(max, Math.max(min, value));
|
||||
}
|
||||
export {
|
||||
clamp
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/number/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/number/dist/index.mjs.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/number.ts"],
|
||||
"sourcesContent": ["function clamp(value: number, [min, max]: [number, number]): number {\n return Math.min(max, Math.max(min, value));\n}\n\nexport { clamp };\n"],
|
||||
"mappings": ";AAAA,SAAS,MAAM,OAAe,CAAC,KAAK,GAAG,GAA6B;AAClE,SAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,KAAK,CAAC;AAC3C;",
|
||||
"names": []
|
||||
}
|
||||
62
frontend/node_modules/@radix-ui/number/package.json
generated
vendored
Normal file
62
frontend/node_modules/@radix-ui/number/package.json
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"name": "@radix-ui/number",
|
||||
"version": "1.1.1",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"publishConfig": {
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"version": "yarn version"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@repo/eslint-config": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0",
|
||||
"eslint": "^9.18.0",
|
||||
"typescript": "^5.7.3"
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"types": "./dist/index.d.ts"
|
||||
}
|
||||
21
frontend/node_modules/@radix-ui/primitive/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/primitive/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
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.
|
||||
3
frontend/node_modules/@radix-ui/primitive/README.md
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/primitive/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# `primitive`
|
||||
|
||||
This is an internal utility, not intended for public usage.
|
||||
20
frontend/node_modules/@radix-ui/primitive/dist/index.d.mts
generated
vendored
Normal file
20
frontend/node_modules/@radix-ui/primitive/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
declare const canUseDOM: boolean;
|
||||
declare function composeEventHandlers<E extends {
|
||||
defaultPrevented: boolean;
|
||||
}>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
|
||||
checkForDefaultPrevented?: boolean | undefined;
|
||||
}): (event: E) => void;
|
||||
declare function getOwnerWindow(element: Node | null | undefined): Window & typeof globalThis;
|
||||
declare function getOwnerDocument(element: Node | null | undefined): Document;
|
||||
/**
|
||||
* Lifted from https://github.com/ariakit/ariakit/blob/main/packages/ariakit-core/src/utils/dom.ts#L37
|
||||
* MIT License, Copyright (c) AriaKit.
|
||||
*/
|
||||
declare function getActiveElement(node: Node | null | undefined, activeDescendant?: boolean): HTMLElement | null;
|
||||
declare function isFrame(element: Element): element is HTMLIFrameElement;
|
||||
|
||||
type Timeout = ReturnType<typeof setTimeout>;
|
||||
type Interval = ReturnType<typeof setInterval>;
|
||||
type Immediate = ReturnType<typeof setImmediate>;
|
||||
|
||||
export { type Immediate, type Interval, type Timeout, canUseDOM, composeEventHandlers, getActiveElement, getOwnerDocument, getOwnerWindow, isFrame };
|
||||
20
frontend/node_modules/@radix-ui/primitive/dist/index.d.ts
generated
vendored
Normal file
20
frontend/node_modules/@radix-ui/primitive/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
declare const canUseDOM: boolean;
|
||||
declare function composeEventHandlers<E extends {
|
||||
defaultPrevented: boolean;
|
||||
}>(originalEventHandler?: (event: E) => void, ourEventHandler?: (event: E) => void, { checkForDefaultPrevented }?: {
|
||||
checkForDefaultPrevented?: boolean | undefined;
|
||||
}): (event: E) => void;
|
||||
declare function getOwnerWindow(element: Node | null | undefined): Window & typeof globalThis;
|
||||
declare function getOwnerDocument(element: Node | null | undefined): Document;
|
||||
/**
|
||||
* Lifted from https://github.com/ariakit/ariakit/blob/main/packages/ariakit-core/src/utils/dom.ts#L37
|
||||
* MIT License, Copyright (c) AriaKit.
|
||||
*/
|
||||
declare function getActiveElement(node: Node | null | undefined, activeDescendant?: boolean): HTMLElement | null;
|
||||
declare function isFrame(element: Element): element is HTMLIFrameElement;
|
||||
|
||||
type Timeout = ReturnType<typeof setTimeout>;
|
||||
type Interval = ReturnType<typeof setInterval>;
|
||||
type Immediate = ReturnType<typeof setImmediate>;
|
||||
|
||||
export { type Immediate, type Interval, type Timeout, canUseDOM, composeEventHandlers, getActiveElement, getOwnerDocument, getOwnerWindow, isFrame };
|
||||
76
frontend/node_modules/@radix-ui/primitive/dist/index.js
generated
vendored
Normal file
76
frontend/node_modules/@radix-ui/primitive/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
"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);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
canUseDOM: () => canUseDOM,
|
||||
composeEventHandlers: () => composeEventHandlers,
|
||||
getActiveElement: () => getActiveElement,
|
||||
getOwnerDocument: () => getOwnerDocument,
|
||||
getOwnerWindow: () => getOwnerWindow,
|
||||
isFrame: () => isFrame
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/primitive.tsx
|
||||
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
||||
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
||||
return function handleEvent(event) {
|
||||
originalEventHandler?.(event);
|
||||
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
||||
return ourEventHandler?.(event);
|
||||
}
|
||||
};
|
||||
}
|
||||
function getOwnerWindow(element) {
|
||||
if (!canUseDOM) {
|
||||
throw new Error("Cannot access window outside of the DOM");
|
||||
}
|
||||
return element?.ownerDocument?.defaultView ?? window;
|
||||
}
|
||||
function getOwnerDocument(element) {
|
||||
if (!canUseDOM) {
|
||||
throw new Error("Cannot access document outside of the DOM");
|
||||
}
|
||||
return element?.ownerDocument ?? document;
|
||||
}
|
||||
function getActiveElement(node, activeDescendant = false) {
|
||||
const { activeElement } = getOwnerDocument(node);
|
||||
if (!activeElement?.nodeName) {
|
||||
return null;
|
||||
}
|
||||
if (isFrame(activeElement) && activeElement.contentDocument) {
|
||||
return getActiveElement(activeElement.contentDocument.body, activeDescendant);
|
||||
}
|
||||
if (activeDescendant) {
|
||||
const id = activeElement.getAttribute("aria-activedescendant");
|
||||
if (id) {
|
||||
const element = getOwnerDocument(activeElement).getElementById(id);
|
||||
if (element) {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
}
|
||||
return activeElement;
|
||||
}
|
||||
function isFrame(element) {
|
||||
return element.tagName === "IFRAME";
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/primitive/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/primitive/dist/index.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/index.ts", "../src/primitive.tsx"],
|
||||
"sourcesContent": ["export * from './primitive';\nexport type * from './types';\n", "/* eslint-disable no-restricted-properties */\n\n/* eslint-disable no-restricted-globals */\nexport const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n/* eslint-enable no-restricted-globals */\n\nexport function composeEventHandlers<E extends { defaultPrevented: boolean }>(\n originalEventHandler?: (event: E) => void,\n ourEventHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) {\n return function handleEvent(event: E) {\n originalEventHandler?.(event);\n\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\n\nexport function getOwnerWindow(element: Node | null | undefined) {\n if (!canUseDOM) {\n throw new Error('Cannot access window outside of the DOM');\n }\n // eslint-disable-next-line no-restricted-globals\n return element?.ownerDocument?.defaultView ?? window;\n}\n\nexport function getOwnerDocument(element: Node | null | undefined) {\n if (!canUseDOM) {\n throw new Error('Cannot access document outside of the DOM');\n }\n // eslint-disable-next-line no-restricted-globals\n return element?.ownerDocument ?? document;\n}\n\n/**\n * Lifted from https://github.com/ariakit/ariakit/blob/main/packages/ariakit-core/src/utils/dom.ts#L37\n * MIT License, Copyright (c) AriaKit.\n */\nexport function getActiveElement(\n node: Node | null | undefined,\n activeDescendant = false\n): HTMLElement | null {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n // `activeElement` might be an empty object if we're interacting with elements\n // inside of an iframe.\n return null;\n }\n\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n\n if (activeDescendant) {\n const id = activeElement.getAttribute('aria-activedescendant');\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n\n return activeElement as HTMLElement | null;\n}\n\nexport function isFrame(element: Element): element is HTMLIFrameElement {\n return element.tagName === 'IFRAME';\n}\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,IAAM,YAAY,CAAC,EACxB,OAAO,WAAW,eAClB,OAAO,YACP,OAAO,SAAS;AAIX,SAAS,qBACd,sBACA,iBACA,EAAE,2BAA2B,KAAK,IAAI,CAAC,GACvC;AACA,SAAO,SAAS,YAAY,OAAU;AACpC,2BAAuB,KAAK;AAE5B,QAAI,6BAA6B,SAAS,CAAC,MAAM,kBAAkB;AACjE,aAAO,kBAAkB,KAAK;AAAA,IAChC;AAAA,EACF;AACF;AAEO,SAAS,eAAe,SAAkC;AAC/D,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,MAAM,yCAAyC;AAAA,EAC3D;AAEA,SAAO,SAAS,eAAe,eAAe;AAChD;AAEO,SAAS,iBAAiB,SAAkC;AACjE,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAC7D;AAEA,SAAO,SAAS,iBAAiB;AACnC;AAMO,SAAS,iBACd,MACA,mBAAmB,OACC;AACpB,QAAM,EAAE,cAAc,IAAI,iBAAiB,IAAI;AAC/C,MAAI,CAAC,eAAe,UAAU;AAG5B,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ,aAAa,KAAK,cAAc,iBAAiB;AAC3D,WAAO,iBAAiB,cAAc,gBAAgB,MAAM,gBAAgB;AAAA,EAC9E;AAEA,MAAI,kBAAkB;AACpB,UAAM,KAAK,cAAc,aAAa,uBAAuB;AAC7D,QAAI,IAAI;AACN,YAAM,UAAU,iBAAiB,aAAa,EAAE,eAAe,EAAE;AACjE,UAAI,SAAS;AACX,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEO,SAAS,QAAQ,SAAgD;AACtE,SAAO,QAAQ,YAAY;AAC7B;",
|
||||
"names": []
|
||||
}
|
||||
53
frontend/node_modules/@radix-ui/primitive/dist/index.mjs
generated
vendored
Normal file
53
frontend/node_modules/@radix-ui/primitive/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
// src/primitive.tsx
|
||||
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
||||
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
||||
return function handleEvent(event) {
|
||||
originalEventHandler?.(event);
|
||||
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
||||
return ourEventHandler?.(event);
|
||||
}
|
||||
};
|
||||
}
|
||||
function getOwnerWindow(element) {
|
||||
if (!canUseDOM) {
|
||||
throw new Error("Cannot access window outside of the DOM");
|
||||
}
|
||||
return element?.ownerDocument?.defaultView ?? window;
|
||||
}
|
||||
function getOwnerDocument(element) {
|
||||
if (!canUseDOM) {
|
||||
throw new Error("Cannot access document outside of the DOM");
|
||||
}
|
||||
return element?.ownerDocument ?? document;
|
||||
}
|
||||
function getActiveElement(node, activeDescendant = false) {
|
||||
const { activeElement } = getOwnerDocument(node);
|
||||
if (!activeElement?.nodeName) {
|
||||
return null;
|
||||
}
|
||||
if (isFrame(activeElement) && activeElement.contentDocument) {
|
||||
return getActiveElement(activeElement.contentDocument.body, activeDescendant);
|
||||
}
|
||||
if (activeDescendant) {
|
||||
const id = activeElement.getAttribute("aria-activedescendant");
|
||||
if (id) {
|
||||
const element = getOwnerDocument(activeElement).getElementById(id);
|
||||
if (element) {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
}
|
||||
return activeElement;
|
||||
}
|
||||
function isFrame(element) {
|
||||
return element.tagName === "IFRAME";
|
||||
}
|
||||
export {
|
||||
canUseDOM,
|
||||
composeEventHandlers,
|
||||
getActiveElement,
|
||||
getOwnerDocument,
|
||||
getOwnerWindow,
|
||||
isFrame
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/primitive/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/primitive/dist/index.mjs.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/primitive.tsx"],
|
||||
"sourcesContent": ["/* eslint-disable no-restricted-properties */\n\n/* eslint-disable no-restricted-globals */\nexport const canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n/* eslint-enable no-restricted-globals */\n\nexport function composeEventHandlers<E extends { defaultPrevented: boolean }>(\n originalEventHandler?: (event: E) => void,\n ourEventHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {}\n) {\n return function handleEvent(event: E) {\n originalEventHandler?.(event);\n\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\n\nexport function getOwnerWindow(element: Node | null | undefined) {\n if (!canUseDOM) {\n throw new Error('Cannot access window outside of the DOM');\n }\n // eslint-disable-next-line no-restricted-globals\n return element?.ownerDocument?.defaultView ?? window;\n}\n\nexport function getOwnerDocument(element: Node | null | undefined) {\n if (!canUseDOM) {\n throw new Error('Cannot access document outside of the DOM');\n }\n // eslint-disable-next-line no-restricted-globals\n return element?.ownerDocument ?? document;\n}\n\n/**\n * Lifted from https://github.com/ariakit/ariakit/blob/main/packages/ariakit-core/src/utils/dom.ts#L37\n * MIT License, Copyright (c) AriaKit.\n */\nexport function getActiveElement(\n node: Node | null | undefined,\n activeDescendant = false\n): HTMLElement | null {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n // `activeElement` might be an empty object if we're interacting with elements\n // inside of an iframe.\n return null;\n }\n\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n\n if (activeDescendant) {\n const id = activeElement.getAttribute('aria-activedescendant');\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n\n return activeElement as HTMLElement | null;\n}\n\nexport function isFrame(element: Element): element is HTMLIFrameElement {\n return element.tagName === 'IFRAME';\n}\n"],
|
||||
"mappings": ";AAGO,IAAM,YAAY,CAAC,EACxB,OAAO,WAAW,eAClB,OAAO,YACP,OAAO,SAAS;AAIX,SAAS,qBACd,sBACA,iBACA,EAAE,2BAA2B,KAAK,IAAI,CAAC,GACvC;AACA,SAAO,SAAS,YAAY,OAAU;AACpC,2BAAuB,KAAK;AAE5B,QAAI,6BAA6B,SAAS,CAAC,MAAM,kBAAkB;AACjE,aAAO,kBAAkB,KAAK;AAAA,IAChC;AAAA,EACF;AACF;AAEO,SAAS,eAAe,SAAkC;AAC/D,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,MAAM,yCAAyC;AAAA,EAC3D;AAEA,SAAO,SAAS,eAAe,eAAe;AAChD;AAEO,SAAS,iBAAiB,SAAkC;AACjE,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,MAAM,2CAA2C;AAAA,EAC7D;AAEA,SAAO,SAAS,iBAAiB;AACnC;AAMO,SAAS,iBACd,MACA,mBAAmB,OACC;AACpB,QAAM,EAAE,cAAc,IAAI,iBAAiB,IAAI;AAC/C,MAAI,CAAC,eAAe,UAAU;AAG5B,WAAO;AAAA,EACT;AAEA,MAAI,QAAQ,aAAa,KAAK,cAAc,iBAAiB;AAC3D,WAAO,iBAAiB,cAAc,gBAAgB,MAAM,gBAAgB;AAAA,EAC9E;AAEA,MAAI,kBAAkB;AACpB,UAAM,KAAK,cAAc,aAAa,uBAAuB;AAC7D,QAAI,IAAI;AACN,YAAM,UAAU,iBAAiB,aAAa,EAAE,eAAe,EAAE;AACjE,UAAI,SAAS;AACX,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEO,SAAS,QAAQ,SAAgD;AACtE,SAAO,QAAQ,YAAY;AAC7B;",
|
||||
"names": []
|
||||
}
|
||||
47
frontend/node_modules/@radix-ui/primitive/package.json
generated
vendored
Normal file
47
frontend/node_modules/@radix-ui/primitive/package.json
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "@radix-ui/primitive",
|
||||
"version": "1.1.3",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"devDependencies": {
|
||||
"eslint": "^9.18.0",
|
||||
"typescript": "^5.7.3",
|
||||
"@repo/builder": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0",
|
||||
"@repo/eslint-config": "0.0.0"
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
frontend/node_modules/@radix-ui/react-accordion/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-accordion/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
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.
|
||||
3
frontend/node_modules/@radix-ui/react-accordion/README.md
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/react-accordion/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# `react-accordion`
|
||||
|
||||
View docs [here](https://radix-ui.com/primitives/docs/components/accordion).
|
||||
114
frontend/node_modules/@radix-ui/react-accordion/dist/index.d.mts
generated
vendored
Normal file
114
frontend/node_modules/@radix-ui/react-accordion/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
||||
import React from 'react';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
||||
|
||||
type Direction = 'ltr' | 'rtl';
|
||||
declare const createAccordionScope: _radix_ui_react_context.CreateScope;
|
||||
interface AccordionSingleProps extends AccordionImplSingleProps {
|
||||
type: 'single';
|
||||
}
|
||||
interface AccordionMultipleProps extends AccordionImplMultipleProps {
|
||||
type: 'multiple';
|
||||
}
|
||||
declare const Accordion: React.ForwardRefExoticComponent<(AccordionSingleProps | AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
||||
interface AccordionImplSingleProps extends AccordionImplProps {
|
||||
/**
|
||||
* The controlled stateful value of the accordion item whose content is expanded.
|
||||
*/
|
||||
value?: string;
|
||||
/**
|
||||
* The value of the item whose content is expanded when the accordion is initially rendered. Use
|
||||
* `defaultValue` if you do not need to control the state of an accordion.
|
||||
*/
|
||||
defaultValue?: string;
|
||||
/**
|
||||
* The callback that fires when the state of the accordion changes.
|
||||
*/
|
||||
onValueChange?(value: string): void;
|
||||
/**
|
||||
* Whether an accordion item can be collapsed after it has been opened.
|
||||
* @default false
|
||||
*/
|
||||
collapsible?: boolean;
|
||||
}
|
||||
interface AccordionImplMultipleProps extends AccordionImplProps {
|
||||
/**
|
||||
* The controlled stateful value of the accordion items whose contents are expanded.
|
||||
*/
|
||||
value?: string[];
|
||||
/**
|
||||
* The value of the items whose contents are expanded when the accordion is initially rendered. Use
|
||||
* `defaultValue` if you do not need to control the state of an accordion.
|
||||
*/
|
||||
defaultValue?: string[];
|
||||
/**
|
||||
* The callback that fires when the state of the accordion changes.
|
||||
*/
|
||||
onValueChange?(value: string[]): void;
|
||||
}
|
||||
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
||||
interface AccordionImplProps extends PrimitiveDivProps {
|
||||
/**
|
||||
* Whether or not an accordion is disabled from user interaction.
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* The layout in which the Accordion operates.
|
||||
* @default vertical
|
||||
*/
|
||||
orientation?: React.AriaAttributes['aria-orientation'];
|
||||
/**
|
||||
* The language read direction.
|
||||
*/
|
||||
dir?: Direction;
|
||||
}
|
||||
type CollapsibleProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>;
|
||||
interface AccordionItemProps extends Omit<CollapsibleProps, 'open' | 'defaultOpen' | 'onOpenChange'> {
|
||||
/**
|
||||
* Whether or not an accordion item is disabled from user interaction.
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* A string value for the accordion item. All items within an accordion should use a unique value.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
/**
|
||||
* `AccordionItem` contains all of the parts of a collapsible section inside of an `Accordion`.
|
||||
*/
|
||||
declare const AccordionItem: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type PrimitiveHeading3Props = React.ComponentPropsWithoutRef<typeof Primitive.h3>;
|
||||
interface AccordionHeaderProps extends PrimitiveHeading3Props {
|
||||
}
|
||||
/**
|
||||
* `AccordionHeader` contains the content for the parts of an `AccordionItem` that will be visible
|
||||
* whether or not its content is collapsed.
|
||||
*/
|
||||
declare const AccordionHeader: React.ForwardRefExoticComponent<AccordionHeaderProps & React.RefAttributes<HTMLHeadingElement>>;
|
||||
type CollapsibleTriggerProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Trigger>;
|
||||
interface AccordionTriggerProps extends CollapsibleTriggerProps {
|
||||
}
|
||||
/**
|
||||
* `AccordionTrigger` is the trigger that toggles the collapsed state of an `AccordionItem`. It
|
||||
* should always be nested inside of an `AccordionHeader`.
|
||||
*/
|
||||
declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
type CollapsibleContentProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Content>;
|
||||
interface AccordionContentProps extends CollapsibleContentProps {
|
||||
}
|
||||
/**
|
||||
* `AccordionContent` contains the collapsible content for an `AccordionItem`.
|
||||
*/
|
||||
declare const AccordionContent: React.ForwardRefExoticComponent<AccordionContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Root: React.ForwardRefExoticComponent<(AccordionSingleProps | AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Item: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Header: React.ForwardRefExoticComponent<AccordionHeaderProps & React.RefAttributes<HTMLHeadingElement>>;
|
||||
declare const Trigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Content: React.ForwardRefExoticComponent<AccordionContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
|
||||
export { Accordion, AccordionContent, type AccordionContentProps, AccordionHeader, type AccordionHeaderProps, AccordionItem, type AccordionItemProps, type AccordionMultipleProps, type AccordionSingleProps, AccordionTrigger, type AccordionTriggerProps, Content, Header, Item, Root, Trigger, createAccordionScope };
|
||||
114
frontend/node_modules/@radix-ui/react-accordion/dist/index.d.ts
generated
vendored
Normal file
114
frontend/node_modules/@radix-ui/react-accordion/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
||||
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
||||
import React from 'react';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
||||
|
||||
type Direction = 'ltr' | 'rtl';
|
||||
declare const createAccordionScope: _radix_ui_react_context.CreateScope;
|
||||
interface AccordionSingleProps extends AccordionImplSingleProps {
|
||||
type: 'single';
|
||||
}
|
||||
interface AccordionMultipleProps extends AccordionImplMultipleProps {
|
||||
type: 'multiple';
|
||||
}
|
||||
declare const Accordion: React.ForwardRefExoticComponent<(AccordionSingleProps | AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
||||
interface AccordionImplSingleProps extends AccordionImplProps {
|
||||
/**
|
||||
* The controlled stateful value of the accordion item whose content is expanded.
|
||||
*/
|
||||
value?: string;
|
||||
/**
|
||||
* The value of the item whose content is expanded when the accordion is initially rendered. Use
|
||||
* `defaultValue` if you do not need to control the state of an accordion.
|
||||
*/
|
||||
defaultValue?: string;
|
||||
/**
|
||||
* The callback that fires when the state of the accordion changes.
|
||||
*/
|
||||
onValueChange?(value: string): void;
|
||||
/**
|
||||
* Whether an accordion item can be collapsed after it has been opened.
|
||||
* @default false
|
||||
*/
|
||||
collapsible?: boolean;
|
||||
}
|
||||
interface AccordionImplMultipleProps extends AccordionImplProps {
|
||||
/**
|
||||
* The controlled stateful value of the accordion items whose contents are expanded.
|
||||
*/
|
||||
value?: string[];
|
||||
/**
|
||||
* The value of the items whose contents are expanded when the accordion is initially rendered. Use
|
||||
* `defaultValue` if you do not need to control the state of an accordion.
|
||||
*/
|
||||
defaultValue?: string[];
|
||||
/**
|
||||
* The callback that fires when the state of the accordion changes.
|
||||
*/
|
||||
onValueChange?(value: string[]): void;
|
||||
}
|
||||
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
||||
interface AccordionImplProps extends PrimitiveDivProps {
|
||||
/**
|
||||
* Whether or not an accordion is disabled from user interaction.
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* The layout in which the Accordion operates.
|
||||
* @default vertical
|
||||
*/
|
||||
orientation?: React.AriaAttributes['aria-orientation'];
|
||||
/**
|
||||
* The language read direction.
|
||||
*/
|
||||
dir?: Direction;
|
||||
}
|
||||
type CollapsibleProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>;
|
||||
interface AccordionItemProps extends Omit<CollapsibleProps, 'open' | 'defaultOpen' | 'onOpenChange'> {
|
||||
/**
|
||||
* Whether or not an accordion item is disabled from user interaction.
|
||||
*
|
||||
* @defaultValue false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
/**
|
||||
* A string value for the accordion item. All items within an accordion should use a unique value.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
/**
|
||||
* `AccordionItem` contains all of the parts of a collapsible section inside of an `Accordion`.
|
||||
*/
|
||||
declare const AccordionItem: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type PrimitiveHeading3Props = React.ComponentPropsWithoutRef<typeof Primitive.h3>;
|
||||
interface AccordionHeaderProps extends PrimitiveHeading3Props {
|
||||
}
|
||||
/**
|
||||
* `AccordionHeader` contains the content for the parts of an `AccordionItem` that will be visible
|
||||
* whether or not its content is collapsed.
|
||||
*/
|
||||
declare const AccordionHeader: React.ForwardRefExoticComponent<AccordionHeaderProps & React.RefAttributes<HTMLHeadingElement>>;
|
||||
type CollapsibleTriggerProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Trigger>;
|
||||
interface AccordionTriggerProps extends CollapsibleTriggerProps {
|
||||
}
|
||||
/**
|
||||
* `AccordionTrigger` is the trigger that toggles the collapsed state of an `AccordionItem`. It
|
||||
* should always be nested inside of an `AccordionHeader`.
|
||||
*/
|
||||
declare const AccordionTrigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
type CollapsibleContentProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Content>;
|
||||
interface AccordionContentProps extends CollapsibleContentProps {
|
||||
}
|
||||
/**
|
||||
* `AccordionContent` contains the collapsible content for an `AccordionItem`.
|
||||
*/
|
||||
declare const AccordionContent: React.ForwardRefExoticComponent<AccordionContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Root: React.ForwardRefExoticComponent<(AccordionSingleProps | AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Item: React.ForwardRefExoticComponent<AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Header: React.ForwardRefExoticComponent<AccordionHeaderProps & React.RefAttributes<HTMLHeadingElement>>;
|
||||
declare const Trigger: React.ForwardRefExoticComponent<AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Content: React.ForwardRefExoticComponent<AccordionContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
|
||||
export { Accordion, AccordionContent, type AccordionContentProps, AccordionHeader, type AccordionHeaderProps, AccordionItem, type AccordionItemProps, type AccordionMultipleProps, type AccordionSingleProps, AccordionTrigger, type AccordionTriggerProps, Content, Header, Item, Root, Trigger, createAccordionScope };
|
||||
352
frontend/node_modules/@radix-ui/react-accordion/dist/index.js
generated
vendored
Normal file
352
frontend/node_modules/@radix-ui/react-accordion/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,352 @@
|
||||
"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);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
Accordion: () => Accordion,
|
||||
AccordionContent: () => AccordionContent,
|
||||
AccordionHeader: () => AccordionHeader,
|
||||
AccordionItem: () => AccordionItem,
|
||||
AccordionTrigger: () => AccordionTrigger,
|
||||
Content: () => Content2,
|
||||
Header: () => Header,
|
||||
Item: () => Item,
|
||||
Root: () => Root2,
|
||||
Trigger: () => Trigger2,
|
||||
createAccordionScope: () => createAccordionScope
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/accordion.tsx
|
||||
var import_react = __toESM(require("react"));
|
||||
var import_react_context = require("@radix-ui/react-context");
|
||||
var import_react_collection = require("@radix-ui/react-collection");
|
||||
var import_react_compose_refs = require("@radix-ui/react-compose-refs");
|
||||
var import_primitive = require("@radix-ui/primitive");
|
||||
var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state");
|
||||
var import_react_primitive = require("@radix-ui/react-primitive");
|
||||
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
|
||||
var import_react_collapsible = require("@radix-ui/react-collapsible");
|
||||
var import_react_id = require("@radix-ui/react-id");
|
||||
var import_react_direction = require("@radix-ui/react-direction");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
var ACCORDION_NAME = "Accordion";
|
||||
var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
|
||||
var [Collection, useCollection, createCollectionScope] = (0, import_react_collection.createCollection)(ACCORDION_NAME);
|
||||
var [createAccordionContext, createAccordionScope] = (0, import_react_context.createContextScope)(ACCORDION_NAME, [
|
||||
createCollectionScope,
|
||||
import_react_collapsible.createCollapsibleScope
|
||||
]);
|
||||
var useCollapsibleScope = (0, import_react_collapsible.createCollapsibleScope)();
|
||||
var Accordion = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { type, ...accordionProps } = props;
|
||||
const singleProps = accordionProps;
|
||||
const multipleProps = accordionProps;
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
Accordion.displayName = ACCORDION_NAME;
|
||||
var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME);
|
||||
var [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(
|
||||
ACCORDION_NAME,
|
||||
{ collapsible: false }
|
||||
);
|
||||
var AccordionImplSingle = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
value: valueProp,
|
||||
defaultValue,
|
||||
onValueChange = () => {
|
||||
},
|
||||
collapsible = false,
|
||||
...accordionSingleProps
|
||||
} = props;
|
||||
const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({
|
||||
prop: valueProp,
|
||||
defaultProp: defaultValue ?? "",
|
||||
onChange: onValueChange,
|
||||
caller: ACCORDION_NAME
|
||||
});
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
AccordionValueProvider,
|
||||
{
|
||||
scope: props.__scopeAccordion,
|
||||
value: import_react.default.useMemo(() => value ? [value] : [], [value]),
|
||||
onItemOpen: setValue,
|
||||
onItemClose: import_react.default.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
var AccordionImplMultiple = import_react.default.forwardRef((props, forwardedRef) => {
|
||||
const {
|
||||
value: valueProp,
|
||||
defaultValue,
|
||||
onValueChange = () => {
|
||||
},
|
||||
...accordionMultipleProps
|
||||
} = props;
|
||||
const [value, setValue] = (0, import_react_use_controllable_state.useControllableState)({
|
||||
prop: valueProp,
|
||||
defaultProp: defaultValue ?? [],
|
||||
onChange: onValueChange,
|
||||
caller: ACCORDION_NAME
|
||||
});
|
||||
const handleItemOpen = import_react.default.useCallback(
|
||||
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
||||
[setValue]
|
||||
);
|
||||
const handleItemClose = import_react.default.useCallback(
|
||||
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
||||
[setValue]
|
||||
);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
AccordionValueProvider,
|
||||
{
|
||||
scope: props.__scopeAccordion,
|
||||
value,
|
||||
onItemOpen: handleItemOpen,
|
||||
onItemClose: handleItemClose,
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
|
||||
}
|
||||
);
|
||||
});
|
||||
var [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);
|
||||
var AccordionImpl = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props;
|
||||
const accordionRef = import_react.default.useRef(null);
|
||||
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(accordionRef, forwardedRef);
|
||||
const getItems = useCollection(__scopeAccordion);
|
||||
const direction = (0, import_react_direction.useDirection)(dir);
|
||||
const isDirectionLTR = direction === "ltr";
|
||||
const handleKeyDown = (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => {
|
||||
if (!ACCORDION_KEYS.includes(event.key)) return;
|
||||
const target = event.target;
|
||||
const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled);
|
||||
const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target);
|
||||
const triggerCount = triggerCollection.length;
|
||||
if (triggerIndex === -1) return;
|
||||
event.preventDefault();
|
||||
let nextIndex = triggerIndex;
|
||||
const homeIndex = 0;
|
||||
const endIndex = triggerCount - 1;
|
||||
const moveNext = () => {
|
||||
nextIndex = triggerIndex + 1;
|
||||
if (nextIndex > endIndex) {
|
||||
nextIndex = homeIndex;
|
||||
}
|
||||
};
|
||||
const movePrev = () => {
|
||||
nextIndex = triggerIndex - 1;
|
||||
if (nextIndex < homeIndex) {
|
||||
nextIndex = endIndex;
|
||||
}
|
||||
};
|
||||
switch (event.key) {
|
||||
case "Home":
|
||||
nextIndex = homeIndex;
|
||||
break;
|
||||
case "End":
|
||||
nextIndex = endIndex;
|
||||
break;
|
||||
case "ArrowRight":
|
||||
if (orientation === "horizontal") {
|
||||
if (isDirectionLTR) {
|
||||
moveNext();
|
||||
} else {
|
||||
movePrev();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "ArrowDown":
|
||||
if (orientation === "vertical") {
|
||||
moveNext();
|
||||
}
|
||||
break;
|
||||
case "ArrowLeft":
|
||||
if (orientation === "horizontal") {
|
||||
if (isDirectionLTR) {
|
||||
movePrev();
|
||||
} else {
|
||||
moveNext();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "ArrowUp":
|
||||
if (orientation === "vertical") {
|
||||
movePrev();
|
||||
}
|
||||
break;
|
||||
}
|
||||
const clampedIndex = nextIndex % triggerCount;
|
||||
triggerCollection[clampedIndex].ref.current?.focus();
|
||||
});
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
AccordionImplProvider,
|
||||
{
|
||||
scope: __scopeAccordion,
|
||||
disabled,
|
||||
direction: dir,
|
||||
orientation,
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_react_primitive.Primitive.div,
|
||||
{
|
||||
...accordionProps,
|
||||
"data-orientation": orientation,
|
||||
ref: composedRefs,
|
||||
onKeyDown: disabled ? void 0 : handleKeyDown
|
||||
}
|
||||
) })
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
var ITEM_NAME = "AccordionItem";
|
||||
var [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME);
|
||||
var AccordionItem = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAccordion, value, ...accordionItemProps } = props;
|
||||
const accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion);
|
||||
const valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion);
|
||||
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
||||
const triggerId = (0, import_react_id.useId)();
|
||||
const open = value && valueContext.value.includes(value) || false;
|
||||
const disabled = accordionContext.disabled || props.disabled;
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
AccordionItemProvider,
|
||||
{
|
||||
scope: __scopeAccordion,
|
||||
open,
|
||||
disabled,
|
||||
triggerId,
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
CollapsiblePrimitive.Root,
|
||||
{
|
||||
"data-orientation": accordionContext.orientation,
|
||||
"data-state": getState(open),
|
||||
...collapsibleScope,
|
||||
...accordionItemProps,
|
||||
ref: forwardedRef,
|
||||
disabled,
|
||||
open,
|
||||
onOpenChange: (open2) => {
|
||||
if (open2) {
|
||||
valueContext.onItemOpen(value);
|
||||
} else {
|
||||
valueContext.onItemClose(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
AccordionItem.displayName = ITEM_NAME;
|
||||
var HEADER_NAME = "AccordionHeader";
|
||||
var AccordionHeader = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAccordion, ...headerProps } = props;
|
||||
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
||||
const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_react_primitive.Primitive.h3,
|
||||
{
|
||||
"data-orientation": accordionContext.orientation,
|
||||
"data-state": getState(itemContext.open),
|
||||
"data-disabled": itemContext.disabled ? "" : void 0,
|
||||
...headerProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
AccordionHeader.displayName = HEADER_NAME;
|
||||
var TRIGGER_NAME = "AccordionTrigger";
|
||||
var AccordionTrigger = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAccordion, ...triggerProps } = props;
|
||||
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
||||
const itemContext = useAccordionItemContext(TRIGGER_NAME, __scopeAccordion);
|
||||
const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME, __scopeAccordion);
|
||||
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Collection.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
CollapsiblePrimitive.Trigger,
|
||||
{
|
||||
"aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
|
||||
"data-orientation": accordionContext.orientation,
|
||||
id: itemContext.triggerId,
|
||||
...collapsibleScope,
|
||||
...triggerProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
) });
|
||||
}
|
||||
);
|
||||
AccordionTrigger.displayName = TRIGGER_NAME;
|
||||
var CONTENT_NAME = "AccordionContent";
|
||||
var AccordionContent = import_react.default.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAccordion, ...contentProps } = props;
|
||||
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
||||
const itemContext = useAccordionItemContext(CONTENT_NAME, __scopeAccordion);
|
||||
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
CollapsiblePrimitive.Content,
|
||||
{
|
||||
role: "region",
|
||||
"aria-labelledby": itemContext.triggerId,
|
||||
"data-orientation": accordionContext.orientation,
|
||||
...collapsibleScope,
|
||||
...contentProps,
|
||||
ref: forwardedRef,
|
||||
style: {
|
||||
["--radix-accordion-content-height"]: "var(--radix-collapsible-content-height)",
|
||||
["--radix-accordion-content-width"]: "var(--radix-collapsible-content-width)",
|
||||
...props.style
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
AccordionContent.displayName = CONTENT_NAME;
|
||||
function getState(open) {
|
||||
return open ? "open" : "closed";
|
||||
}
|
||||
var Root2 = Accordion;
|
||||
var Item = AccordionItem;
|
||||
var Header = AccordionHeader;
|
||||
var Trigger2 = AccordionTrigger;
|
||||
var Content2 = AccordionContent;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/react-accordion/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-accordion/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
320
frontend/node_modules/@radix-ui/react-accordion/dist/index.mjs
generated
vendored
Normal file
320
frontend/node_modules/@radix-ui/react-accordion/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,320 @@
|
||||
"use client";
|
||||
|
||||
// src/accordion.tsx
|
||||
import React from "react";
|
||||
import { createContextScope } from "@radix-ui/react-context";
|
||||
import { createCollection } from "@radix-ui/react-collection";
|
||||
import { useComposedRefs } from "@radix-ui/react-compose-refs";
|
||||
import { composeEventHandlers } from "@radix-ui/primitive";
|
||||
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
||||
import { Primitive } from "@radix-ui/react-primitive";
|
||||
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
||||
import { createCollapsibleScope } from "@radix-ui/react-collapsible";
|
||||
import { useId } from "@radix-ui/react-id";
|
||||
import { useDirection } from "@radix-ui/react-direction";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var ACCORDION_NAME = "Accordion";
|
||||
var ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"];
|
||||
var [Collection, useCollection, createCollectionScope] = createCollection(ACCORDION_NAME);
|
||||
var [createAccordionContext, createAccordionScope] = createContextScope(ACCORDION_NAME, [
|
||||
createCollectionScope,
|
||||
createCollapsibleScope
|
||||
]);
|
||||
var useCollapsibleScope = createCollapsibleScope();
|
||||
var Accordion = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { type, ...accordionProps } = props;
|
||||
const singleProps = accordionProps;
|
||||
const multipleProps = accordionProps;
|
||||
return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ jsx(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
Accordion.displayName = ACCORDION_NAME;
|
||||
var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME);
|
||||
var [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(
|
||||
ACCORDION_NAME,
|
||||
{ collapsible: false }
|
||||
);
|
||||
var AccordionImplSingle = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
value: valueProp,
|
||||
defaultValue,
|
||||
onValueChange = () => {
|
||||
},
|
||||
collapsible = false,
|
||||
...accordionSingleProps
|
||||
} = props;
|
||||
const [value, setValue] = useControllableState({
|
||||
prop: valueProp,
|
||||
defaultProp: defaultValue ?? "",
|
||||
onChange: onValueChange,
|
||||
caller: ACCORDION_NAME
|
||||
});
|
||||
return /* @__PURE__ */ jsx(
|
||||
AccordionValueProvider,
|
||||
{
|
||||
scope: props.__scopeAccordion,
|
||||
value: React.useMemo(() => value ? [value] : [], [value]),
|
||||
onItemOpen: setValue,
|
||||
onItemClose: React.useCallback(() => collapsible && setValue(""), [collapsible, setValue]),
|
||||
children: /* @__PURE__ */ jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible, children: /* @__PURE__ */ jsx(AccordionImpl, { ...accordionSingleProps, ref: forwardedRef }) })
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
var AccordionImplMultiple = React.forwardRef((props, forwardedRef) => {
|
||||
const {
|
||||
value: valueProp,
|
||||
defaultValue,
|
||||
onValueChange = () => {
|
||||
},
|
||||
...accordionMultipleProps
|
||||
} = props;
|
||||
const [value, setValue] = useControllableState({
|
||||
prop: valueProp,
|
||||
defaultProp: defaultValue ?? [],
|
||||
onChange: onValueChange,
|
||||
caller: ACCORDION_NAME
|
||||
});
|
||||
const handleItemOpen = React.useCallback(
|
||||
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
||||
[setValue]
|
||||
);
|
||||
const handleItemClose = React.useCallback(
|
||||
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
||||
[setValue]
|
||||
);
|
||||
return /* @__PURE__ */ jsx(
|
||||
AccordionValueProvider,
|
||||
{
|
||||
scope: props.__scopeAccordion,
|
||||
value,
|
||||
onItemOpen: handleItemOpen,
|
||||
onItemClose: handleItemClose,
|
||||
children: /* @__PURE__ */ jsx(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: true, children: /* @__PURE__ */ jsx(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
|
||||
}
|
||||
);
|
||||
});
|
||||
var [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME);
|
||||
var AccordionImpl = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAccordion, disabled, dir, orientation = "vertical", ...accordionProps } = props;
|
||||
const accordionRef = React.useRef(null);
|
||||
const composedRefs = useComposedRefs(accordionRef, forwardedRef);
|
||||
const getItems = useCollection(__scopeAccordion);
|
||||
const direction = useDirection(dir);
|
||||
const isDirectionLTR = direction === "ltr";
|
||||
const handleKeyDown = composeEventHandlers(props.onKeyDown, (event) => {
|
||||
if (!ACCORDION_KEYS.includes(event.key)) return;
|
||||
const target = event.target;
|
||||
const triggerCollection = getItems().filter((item) => !item.ref.current?.disabled);
|
||||
const triggerIndex = triggerCollection.findIndex((item) => item.ref.current === target);
|
||||
const triggerCount = triggerCollection.length;
|
||||
if (triggerIndex === -1) return;
|
||||
event.preventDefault();
|
||||
let nextIndex = triggerIndex;
|
||||
const homeIndex = 0;
|
||||
const endIndex = triggerCount - 1;
|
||||
const moveNext = () => {
|
||||
nextIndex = triggerIndex + 1;
|
||||
if (nextIndex > endIndex) {
|
||||
nextIndex = homeIndex;
|
||||
}
|
||||
};
|
||||
const movePrev = () => {
|
||||
nextIndex = triggerIndex - 1;
|
||||
if (nextIndex < homeIndex) {
|
||||
nextIndex = endIndex;
|
||||
}
|
||||
};
|
||||
switch (event.key) {
|
||||
case "Home":
|
||||
nextIndex = homeIndex;
|
||||
break;
|
||||
case "End":
|
||||
nextIndex = endIndex;
|
||||
break;
|
||||
case "ArrowRight":
|
||||
if (orientation === "horizontal") {
|
||||
if (isDirectionLTR) {
|
||||
moveNext();
|
||||
} else {
|
||||
movePrev();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "ArrowDown":
|
||||
if (orientation === "vertical") {
|
||||
moveNext();
|
||||
}
|
||||
break;
|
||||
case "ArrowLeft":
|
||||
if (orientation === "horizontal") {
|
||||
if (isDirectionLTR) {
|
||||
movePrev();
|
||||
} else {
|
||||
moveNext();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "ArrowUp":
|
||||
if (orientation === "vertical") {
|
||||
movePrev();
|
||||
}
|
||||
break;
|
||||
}
|
||||
const clampedIndex = nextIndex % triggerCount;
|
||||
triggerCollection[clampedIndex].ref.current?.focus();
|
||||
});
|
||||
return /* @__PURE__ */ jsx(
|
||||
AccordionImplProvider,
|
||||
{
|
||||
scope: __scopeAccordion,
|
||||
disabled,
|
||||
direction: dir,
|
||||
orientation,
|
||||
children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(
|
||||
Primitive.div,
|
||||
{
|
||||
...accordionProps,
|
||||
"data-orientation": orientation,
|
||||
ref: composedRefs,
|
||||
onKeyDown: disabled ? void 0 : handleKeyDown
|
||||
}
|
||||
) })
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
var ITEM_NAME = "AccordionItem";
|
||||
var [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME);
|
||||
var AccordionItem = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAccordion, value, ...accordionItemProps } = props;
|
||||
const accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion);
|
||||
const valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion);
|
||||
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
||||
const triggerId = useId();
|
||||
const open = value && valueContext.value.includes(value) || false;
|
||||
const disabled = accordionContext.disabled || props.disabled;
|
||||
return /* @__PURE__ */ jsx(
|
||||
AccordionItemProvider,
|
||||
{
|
||||
scope: __scopeAccordion,
|
||||
open,
|
||||
disabled,
|
||||
triggerId,
|
||||
children: /* @__PURE__ */ jsx(
|
||||
CollapsiblePrimitive.Root,
|
||||
{
|
||||
"data-orientation": accordionContext.orientation,
|
||||
"data-state": getState(open),
|
||||
...collapsibleScope,
|
||||
...accordionItemProps,
|
||||
ref: forwardedRef,
|
||||
disabled,
|
||||
open,
|
||||
onOpenChange: (open2) => {
|
||||
if (open2) {
|
||||
valueContext.onItemOpen(value);
|
||||
} else {
|
||||
valueContext.onItemClose(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
AccordionItem.displayName = ITEM_NAME;
|
||||
var HEADER_NAME = "AccordionHeader";
|
||||
var AccordionHeader = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAccordion, ...headerProps } = props;
|
||||
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
||||
const itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
|
||||
return /* @__PURE__ */ jsx(
|
||||
Primitive.h3,
|
||||
{
|
||||
"data-orientation": accordionContext.orientation,
|
||||
"data-state": getState(itemContext.open),
|
||||
"data-disabled": itemContext.disabled ? "" : void 0,
|
||||
...headerProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
AccordionHeader.displayName = HEADER_NAME;
|
||||
var TRIGGER_NAME = "AccordionTrigger";
|
||||
var AccordionTrigger = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAccordion, ...triggerProps } = props;
|
||||
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
||||
const itemContext = useAccordionItemContext(TRIGGER_NAME, __scopeAccordion);
|
||||
const collapsibleContext = useAccordionCollapsibleContext(TRIGGER_NAME, __scopeAccordion);
|
||||
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
||||
return /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeAccordion, children: /* @__PURE__ */ jsx(
|
||||
CollapsiblePrimitive.Trigger,
|
||||
{
|
||||
"aria-disabled": itemContext.open && !collapsibleContext.collapsible || void 0,
|
||||
"data-orientation": accordionContext.orientation,
|
||||
id: itemContext.triggerId,
|
||||
...collapsibleScope,
|
||||
...triggerProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
) });
|
||||
}
|
||||
);
|
||||
AccordionTrigger.displayName = TRIGGER_NAME;
|
||||
var CONTENT_NAME = "AccordionContent";
|
||||
var AccordionContent = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAccordion, ...contentProps } = props;
|
||||
const accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion);
|
||||
const itemContext = useAccordionItemContext(CONTENT_NAME, __scopeAccordion);
|
||||
const collapsibleScope = useCollapsibleScope(__scopeAccordion);
|
||||
return /* @__PURE__ */ jsx(
|
||||
CollapsiblePrimitive.Content,
|
||||
{
|
||||
role: "region",
|
||||
"aria-labelledby": itemContext.triggerId,
|
||||
"data-orientation": accordionContext.orientation,
|
||||
...collapsibleScope,
|
||||
...contentProps,
|
||||
ref: forwardedRef,
|
||||
style: {
|
||||
["--radix-accordion-content-height"]: "var(--radix-collapsible-content-height)",
|
||||
["--radix-accordion-content-width"]: "var(--radix-collapsible-content-width)",
|
||||
...props.style
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
AccordionContent.displayName = CONTENT_NAME;
|
||||
function getState(open) {
|
||||
return open ? "open" : "closed";
|
||||
}
|
||||
var Root2 = Accordion;
|
||||
var Item = AccordionItem;
|
||||
var Header = AccordionHeader;
|
||||
var Trigger2 = AccordionTrigger;
|
||||
var Content2 = AccordionContent;
|
||||
export {
|
||||
Accordion,
|
||||
AccordionContent,
|
||||
AccordionHeader,
|
||||
AccordionItem,
|
||||
AccordionTrigger,
|
||||
Content2 as Content,
|
||||
Header,
|
||||
Item,
|
||||
Root2 as Root,
|
||||
Trigger2 as Trigger,
|
||||
createAccordionScope
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/react-accordion/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-accordion/dist/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
76
frontend/node_modules/@radix-ui/react-accordion/package.json
generated
vendored
Normal file
76
frontend/node_modules/@radix-ui/react-accordion/package.json
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"name": "@radix-ui/react-accordion",
|
||||
"version": "1.2.12",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@radix-ui/primitive": "1.1.3",
|
||||
"@radix-ui/react-collapsible": "1.1.12",
|
||||
"@radix-ui/react-collection": "1.1.7",
|
||||
"@radix-ui/react-compose-refs": "1.1.2",
|
||||
"@radix-ui/react-context": "1.1.2",
|
||||
"@radix-ui/react-direction": "1.1.1",
|
||||
"@radix-ui/react-primitive": "2.1.3",
|
||||
"@radix-ui/react-id": "1.1.1",
|
||||
"@radix-ui/react-use-controllable-state": "1.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"eslint": "^9.18.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"typescript": "^5.7.3",
|
||||
"@repo/builder": "0.0.0",
|
||||
"@repo/eslint-config": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
frontend/node_modules/@radix-ui/react-alert-dialog/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-alert-dialog/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
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.
|
||||
3
frontend/node_modules/@radix-ui/react-alert-dialog/README.md
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/react-alert-dialog/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# `react-alert-dialog`
|
||||
|
||||
View docs [here](https://radix-ui.com/primitives/docs/components/alert-dialog).
|
||||
51
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.d.mts
generated
vendored
Normal file
51
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
||||
import * as React from 'react';
|
||||
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
|
||||
declare const createAlertDialogScope: _radix_ui_react_context.CreateScope;
|
||||
type DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
|
||||
interface AlertDialogProps extends Omit<DialogProps, 'modal'> {
|
||||
}
|
||||
declare const AlertDialog: React.FC<AlertDialogProps>;
|
||||
type DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
|
||||
interface AlertDialogTriggerProps extends DialogTriggerProps {
|
||||
}
|
||||
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
type DialogPortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;
|
||||
interface AlertDialogPortalProps extends DialogPortalProps {
|
||||
}
|
||||
declare const AlertDialogPortal: React.FC<AlertDialogPortalProps>;
|
||||
type DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
||||
interface AlertDialogOverlayProps extends DialogOverlayProps {
|
||||
}
|
||||
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
|
||||
interface AlertDialogContentProps extends Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'> {
|
||||
}
|
||||
declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
||||
interface AlertDialogTitleProps extends DialogTitleProps {
|
||||
}
|
||||
declare const AlertDialogTitle: React.ForwardRefExoticComponent<AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
||||
type DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
||||
interface AlertDialogDescriptionProps extends DialogDescriptionProps {
|
||||
}
|
||||
declare const AlertDialogDescription: React.ForwardRefExoticComponent<AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
||||
type DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;
|
||||
interface AlertDialogActionProps extends DialogCloseProps {
|
||||
}
|
||||
declare const AlertDialogAction: React.ForwardRefExoticComponent<AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
interface AlertDialogCancelProps extends DialogCloseProps {
|
||||
}
|
||||
declare const AlertDialogCancel: React.ForwardRefExoticComponent<AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Root: React.FC<AlertDialogProps>;
|
||||
declare const Trigger: React.ForwardRefExoticComponent<AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Portal: React.FC<AlertDialogPortalProps>;
|
||||
declare const Overlay: React.ForwardRefExoticComponent<AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Content: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Action: React.ForwardRefExoticComponent<AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Cancel: React.ForwardRefExoticComponent<AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Title: React.ForwardRefExoticComponent<AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
||||
declare const Description: React.ForwardRefExoticComponent<AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
||||
|
||||
export { Action, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, type AlertDialogPortalProps, type AlertDialogProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, Cancel, Content, Description, Overlay, Portal, Root, Title, Trigger, createAlertDialogScope };
|
||||
51
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.d.ts
generated
vendored
Normal file
51
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
||||
import * as React from 'react';
|
||||
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
|
||||
declare const createAlertDialogScope: _radix_ui_react_context.CreateScope;
|
||||
type DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
|
||||
interface AlertDialogProps extends Omit<DialogProps, 'modal'> {
|
||||
}
|
||||
declare const AlertDialog: React.FC<AlertDialogProps>;
|
||||
type DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
|
||||
interface AlertDialogTriggerProps extends DialogTriggerProps {
|
||||
}
|
||||
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
type DialogPortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;
|
||||
interface AlertDialogPortalProps extends DialogPortalProps {
|
||||
}
|
||||
declare const AlertDialogPortal: React.FC<AlertDialogPortalProps>;
|
||||
type DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
||||
interface AlertDialogOverlayProps extends DialogOverlayProps {
|
||||
}
|
||||
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
|
||||
interface AlertDialogContentProps extends Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'> {
|
||||
}
|
||||
declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
||||
interface AlertDialogTitleProps extends DialogTitleProps {
|
||||
}
|
||||
declare const AlertDialogTitle: React.ForwardRefExoticComponent<AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
||||
type DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
||||
interface AlertDialogDescriptionProps extends DialogDescriptionProps {
|
||||
}
|
||||
declare const AlertDialogDescription: React.ForwardRefExoticComponent<AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
||||
type DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;
|
||||
interface AlertDialogActionProps extends DialogCloseProps {
|
||||
}
|
||||
declare const AlertDialogAction: React.ForwardRefExoticComponent<AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
interface AlertDialogCancelProps extends DialogCloseProps {
|
||||
}
|
||||
declare const AlertDialogCancel: React.ForwardRefExoticComponent<AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Root: React.FC<AlertDialogProps>;
|
||||
declare const Trigger: React.ForwardRefExoticComponent<AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Portal: React.FC<AlertDialogPortalProps>;
|
||||
declare const Overlay: React.ForwardRefExoticComponent<AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Content: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Action: React.ForwardRefExoticComponent<AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Cancel: React.ForwardRefExoticComponent<AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Title: React.ForwardRefExoticComponent<AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
||||
declare const Description: React.ForwardRefExoticComponent<AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
||||
|
||||
export { Action, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, type AlertDialogPortalProps, type AlertDialogProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, Cancel, Content, Description, Overlay, Portal, Root, Title, Trigger, createAlertDialogScope };
|
||||
202
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.js
generated
vendored
Normal file
202
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,202 @@
|
||||
"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);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
Action: () => Action,
|
||||
AlertDialog: () => AlertDialog,
|
||||
AlertDialogAction: () => AlertDialogAction,
|
||||
AlertDialogCancel: () => AlertDialogCancel,
|
||||
AlertDialogContent: () => AlertDialogContent,
|
||||
AlertDialogDescription: () => AlertDialogDescription,
|
||||
AlertDialogOverlay: () => AlertDialogOverlay,
|
||||
AlertDialogPortal: () => AlertDialogPortal,
|
||||
AlertDialogTitle: () => AlertDialogTitle,
|
||||
AlertDialogTrigger: () => AlertDialogTrigger,
|
||||
Cancel: () => Cancel,
|
||||
Content: () => Content2,
|
||||
Description: () => Description2,
|
||||
Overlay: () => Overlay2,
|
||||
Portal: () => Portal2,
|
||||
Root: () => Root2,
|
||||
Title: () => Title2,
|
||||
Trigger: () => Trigger2,
|
||||
createAlertDialogScope: () => createAlertDialogScope
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/alert-dialog.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var import_react_context = require("@radix-ui/react-context");
|
||||
var import_react_compose_refs = require("@radix-ui/react-compose-refs");
|
||||
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
||||
var import_react_dialog = require("@radix-ui/react-dialog");
|
||||
var import_primitive = require("@radix-ui/primitive");
|
||||
var import_react_slot = require("@radix-ui/react-slot");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
var ROOT_NAME = "AlertDialog";
|
||||
var [createAlertDialogContext, createAlertDialogScope] = (0, import_react_context.createContextScope)(ROOT_NAME, [
|
||||
import_react_dialog.createDialogScope
|
||||
]);
|
||||
var useDialogScope = (0, import_react_dialog.createDialogScope)();
|
||||
var AlertDialog = (props) => {
|
||||
const { __scopeAlertDialog, ...alertDialogProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });
|
||||
};
|
||||
AlertDialog.displayName = ROOT_NAME;
|
||||
var TRIGGER_NAME = "AlertDialogTrigger";
|
||||
var AlertDialogTrigger = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...triggerProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
AlertDialogTrigger.displayName = TRIGGER_NAME;
|
||||
var PORTAL_NAME = "AlertDialogPortal";
|
||||
var AlertDialogPortal = (props) => {
|
||||
const { __scopeAlertDialog, ...portalProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });
|
||||
};
|
||||
AlertDialogPortal.displayName = PORTAL_NAME;
|
||||
var OVERLAY_NAME = "AlertDialogOverlay";
|
||||
var AlertDialogOverlay = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...overlayProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
AlertDialogOverlay.displayName = OVERLAY_NAME;
|
||||
var CONTENT_NAME = "AlertDialogContent";
|
||||
var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
|
||||
var Slottable = (0, import_react_slot.createSlottable)("AlertDialogContent");
|
||||
var AlertDialogContent = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, children, ...contentProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
const contentRef = React.useRef(null);
|
||||
const composedRefs = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, contentRef);
|
||||
const cancelRef = React.useRef(null);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
DialogPrimitive.WarningProvider,
|
||||
{
|
||||
contentName: CONTENT_NAME,
|
||||
titleName: TITLE_NAME,
|
||||
docsSlug: "alert-dialog",
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
||||
DialogPrimitive.Content,
|
||||
{
|
||||
role: "alertdialog",
|
||||
...dialogScope,
|
||||
...contentProps,
|
||||
ref: composedRefs,
|
||||
onOpenAutoFocus: (0, import_primitive.composeEventHandlers)(contentProps.onOpenAutoFocus, (event) => {
|
||||
event.preventDefault();
|
||||
cancelRef.current?.focus({ preventScroll: true });
|
||||
}),
|
||||
onPointerDownOutside: (event) => event.preventDefault(),
|
||||
onInteractOutside: (event) => event.preventDefault(),
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Slottable, { children }),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef })
|
||||
]
|
||||
}
|
||||
) })
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
AlertDialogContent.displayName = CONTENT_NAME;
|
||||
var TITLE_NAME = "AlertDialogTitle";
|
||||
var AlertDialogTitle = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...titleProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
AlertDialogTitle.displayName = TITLE_NAME;
|
||||
var DESCRIPTION_NAME = "AlertDialogDescription";
|
||||
var AlertDialogDescription = React.forwardRef((props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...descriptionProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
|
||||
});
|
||||
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
||||
var ACTION_NAME = "AlertDialogAction";
|
||||
var AlertDialogAction = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...actionProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
AlertDialogAction.displayName = ACTION_NAME;
|
||||
var CANCEL_NAME = "AlertDialogCancel";
|
||||
var AlertDialogCancel = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...cancelProps } = props;
|
||||
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
const ref = (0, import_react_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });
|
||||
}
|
||||
);
|
||||
AlertDialogCancel.displayName = CANCEL_NAME;
|
||||
var DescriptionWarning = ({ contentRef }) => {
|
||||
const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
||||
|
||||
You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||||
|
||||
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
||||
React.useEffect(() => {
|
||||
const hasDescription = document.getElementById(
|
||||
contentRef.current?.getAttribute("aria-describedby")
|
||||
);
|
||||
if (!hasDescription) console.warn(MESSAGE);
|
||||
}, [MESSAGE, contentRef]);
|
||||
return null;
|
||||
};
|
||||
var Root2 = AlertDialog;
|
||||
var Trigger2 = AlertDialogTrigger;
|
||||
var Portal2 = AlertDialogPortal;
|
||||
var Overlay2 = AlertDialogOverlay;
|
||||
var Content2 = AlertDialogContent;
|
||||
var Action = AlertDialogAction;
|
||||
var Cancel = AlertDialogCancel;
|
||||
var Title2 = AlertDialogTitle;
|
||||
var Description2 = AlertDialogDescription;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
170
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
generated
vendored
Normal file
170
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,170 @@
|
||||
"use client";
|
||||
|
||||
// src/alert-dialog.tsx
|
||||
import * as React from "react";
|
||||
import { createContextScope } from "@radix-ui/react-context";
|
||||
import { useComposedRefs } from "@radix-ui/react-compose-refs";
|
||||
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
||||
import { createDialogScope } from "@radix-ui/react-dialog";
|
||||
import { composeEventHandlers } from "@radix-ui/primitive";
|
||||
import { createSlottable } from "@radix-ui/react-slot";
|
||||
import { jsx, jsxs } from "react/jsx-runtime";
|
||||
var ROOT_NAME = "AlertDialog";
|
||||
var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
||||
createDialogScope
|
||||
]);
|
||||
var useDialogScope = createDialogScope();
|
||||
var AlertDialog = (props) => {
|
||||
const { __scopeAlertDialog, ...alertDialogProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });
|
||||
};
|
||||
AlertDialog.displayName = ROOT_NAME;
|
||||
var TRIGGER_NAME = "AlertDialogTrigger";
|
||||
var AlertDialogTrigger = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...triggerProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
AlertDialogTrigger.displayName = TRIGGER_NAME;
|
||||
var PORTAL_NAME = "AlertDialogPortal";
|
||||
var AlertDialogPortal = (props) => {
|
||||
const { __scopeAlertDialog, ...portalProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });
|
||||
};
|
||||
AlertDialogPortal.displayName = PORTAL_NAME;
|
||||
var OVERLAY_NAME = "AlertDialogOverlay";
|
||||
var AlertDialogOverlay = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...overlayProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
AlertDialogOverlay.displayName = OVERLAY_NAME;
|
||||
var CONTENT_NAME = "AlertDialogContent";
|
||||
var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
|
||||
var Slottable = createSlottable("AlertDialogContent");
|
||||
var AlertDialogContent = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, children, ...contentProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
const contentRef = React.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
||||
const cancelRef = React.useRef(null);
|
||||
return /* @__PURE__ */ jsx(
|
||||
DialogPrimitive.WarningProvider,
|
||||
{
|
||||
contentName: CONTENT_NAME,
|
||||
titleName: TITLE_NAME,
|
||||
docsSlug: "alert-dialog",
|
||||
children: /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxs(
|
||||
DialogPrimitive.Content,
|
||||
{
|
||||
role: "alertdialog",
|
||||
...dialogScope,
|
||||
...contentProps,
|
||||
ref: composedRefs,
|
||||
onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
|
||||
event.preventDefault();
|
||||
cancelRef.current?.focus({ preventScroll: true });
|
||||
}),
|
||||
onPointerDownOutside: (event) => event.preventDefault(),
|
||||
onInteractOutside: (event) => event.preventDefault(),
|
||||
children: [
|
||||
/* @__PURE__ */ jsx(Slottable, { children }),
|
||||
/* @__PURE__ */ jsx(DescriptionWarning, { contentRef })
|
||||
]
|
||||
}
|
||||
) })
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
AlertDialogContent.displayName = CONTENT_NAME;
|
||||
var TITLE_NAME = "AlertDialogTitle";
|
||||
var AlertDialogTitle = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...titleProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
AlertDialogTitle.displayName = TITLE_NAME;
|
||||
var DESCRIPTION_NAME = "AlertDialogDescription";
|
||||
var AlertDialogDescription = React.forwardRef((props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...descriptionProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
|
||||
});
|
||||
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
||||
var ACTION_NAME = "AlertDialogAction";
|
||||
var AlertDialogAction = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...actionProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
AlertDialogAction.displayName = ACTION_NAME;
|
||||
var CANCEL_NAME = "AlertDialogCancel";
|
||||
var AlertDialogCancel = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...cancelProps } = props;
|
||||
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
const ref = useComposedRefs(forwardedRef, cancelRef);
|
||||
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });
|
||||
}
|
||||
);
|
||||
AlertDialogCancel.displayName = CANCEL_NAME;
|
||||
var DescriptionWarning = ({ contentRef }) => {
|
||||
const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
||||
|
||||
You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||||
|
||||
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
||||
React.useEffect(() => {
|
||||
const hasDescription = document.getElementById(
|
||||
contentRef.current?.getAttribute("aria-describedby")
|
||||
);
|
||||
if (!hasDescription) console.warn(MESSAGE);
|
||||
}, [MESSAGE, contentRef]);
|
||||
return null;
|
||||
};
|
||||
var Root2 = AlertDialog;
|
||||
var Trigger2 = AlertDialogTrigger;
|
||||
var Portal2 = AlertDialogPortal;
|
||||
var Overlay2 = AlertDialogOverlay;
|
||||
var Content2 = AlertDialogContent;
|
||||
var Action = AlertDialogAction;
|
||||
var Cancel = AlertDialogCancel;
|
||||
var Title2 = AlertDialogTitle;
|
||||
var Description2 = AlertDialogDescription;
|
||||
export {
|
||||
Action,
|
||||
AlertDialog,
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
AlertDialogContent,
|
||||
AlertDialogDescription,
|
||||
AlertDialogOverlay,
|
||||
AlertDialogPortal,
|
||||
AlertDialogTitle,
|
||||
AlertDialogTrigger,
|
||||
Cancel,
|
||||
Content2 as Content,
|
||||
Description2 as Description,
|
||||
Overlay2 as Overlay,
|
||||
Portal2 as Portal,
|
||||
Root2 as Root,
|
||||
Title2 as Title,
|
||||
Trigger2 as Trigger,
|
||||
createAlertDialogScope
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
21
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
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.
|
||||
3
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/README.md
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# `react-slot`
|
||||
|
||||
View docs [here](https://radix-ui.com/primitives/docs/utilities/slot).
|
||||
17
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.d.mts
generated
vendored
Normal file
17
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import * as React from 'react';
|
||||
|
||||
interface SlotProps extends React.HTMLAttributes<HTMLElement> {
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
declare function createSlot(ownerName: string): React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
||||
declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
||||
interface SlottableProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
interface SlottableComponent extends React.FC<SlottableProps> {
|
||||
__radixId: symbol;
|
||||
}
|
||||
declare function createSlottable(ownerName: string): SlottableComponent;
|
||||
declare const Slottable: SlottableComponent;
|
||||
|
||||
export { Slot as Root, Slot, type SlotProps, Slottable, createSlot, createSlottable };
|
||||
17
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.d.ts
generated
vendored
Normal file
17
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import * as React from 'react';
|
||||
|
||||
interface SlotProps extends React.HTMLAttributes<HTMLElement> {
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
declare function createSlot(ownerName: string): React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
||||
declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
|
||||
interface SlottableProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
interface SlottableComponent extends React.FC<SlottableProps> {
|
||||
__radixId: symbol;
|
||||
}
|
||||
declare function createSlottable(ownerName: string): SlottableComponent;
|
||||
declare const Slottable: SlottableComponent;
|
||||
|
||||
export { Slot as Root, Slot, type SlotProps, Slottable, createSlot, createSlottable };
|
||||
138
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.js
generated
vendored
Normal file
138
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
"use strict";
|
||||
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);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
Root: () => Slot,
|
||||
Slot: () => Slot,
|
||||
Slottable: () => Slottable,
|
||||
createSlot: () => createSlot,
|
||||
createSlottable: () => createSlottable
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/slot.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var import_react_compose_refs = require("@radix-ui/react-compose-refs");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
// @__NO_SIDE_EFFECTS__
|
||||
function createSlot(ownerName) {
|
||||
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
||||
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
const childrenArray = React.Children.toArray(children);
|
||||
const slottable = childrenArray.find(isSlottable);
|
||||
if (slottable) {
|
||||
const newElement = slottable.props.children;
|
||||
const newChildren = childrenArray.map((child) => {
|
||||
if (child === slottable) {
|
||||
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
||||
return React.isValidElement(newElement) ? newElement.props.children : null;
|
||||
} else {
|
||||
return child;
|
||||
}
|
||||
});
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
||||
}
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
||||
});
|
||||
Slot2.displayName = `${ownerName}.Slot`;
|
||||
return Slot2;
|
||||
}
|
||||
var Slot = /* @__PURE__ */ createSlot("Slot");
|
||||
// @__NO_SIDE_EFFECTS__
|
||||
function createSlotClone(ownerName) {
|
||||
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
if (React.isValidElement(children)) {
|
||||
const childrenRef = getElementRef(children);
|
||||
const props2 = mergeProps(slotProps, children.props);
|
||||
if (children.type !== React.Fragment) {
|
||||
props2.ref = forwardedRef ? (0, import_react_compose_refs.composeRefs)(forwardedRef, childrenRef) : childrenRef;
|
||||
}
|
||||
return React.cloneElement(children, props2);
|
||||
}
|
||||
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
||||
});
|
||||
SlotClone.displayName = `${ownerName}.SlotClone`;
|
||||
return SlotClone;
|
||||
}
|
||||
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
||||
// @__NO_SIDE_EFFECTS__
|
||||
function createSlottable(ownerName) {
|
||||
const Slottable2 = ({ children }) => {
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
||||
};
|
||||
Slottable2.displayName = `${ownerName}.Slottable`;
|
||||
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
||||
return Slottable2;
|
||||
}
|
||||
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
||||
function isSlottable(child) {
|
||||
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||||
}
|
||||
function mergeProps(slotProps, childProps) {
|
||||
const overrideProps = { ...childProps };
|
||||
for (const propName in childProps) {
|
||||
const slotPropValue = slotProps[propName];
|
||||
const childPropValue = childProps[propName];
|
||||
const isHandler = /^on[A-Z]/.test(propName);
|
||||
if (isHandler) {
|
||||
if (slotPropValue && childPropValue) {
|
||||
overrideProps[propName] = (...args) => {
|
||||
const result = childPropValue(...args);
|
||||
slotPropValue(...args);
|
||||
return result;
|
||||
};
|
||||
} else if (slotPropValue) {
|
||||
overrideProps[propName] = slotPropValue;
|
||||
}
|
||||
} else if (propName === "style") {
|
||||
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
||||
} else if (propName === "className") {
|
||||
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
||||
}
|
||||
}
|
||||
return { ...slotProps, ...overrideProps };
|
||||
}
|
||||
function getElementRef(element) {
|
||||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
105
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs
generated
vendored
Normal file
105
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
// src/slot.tsx
|
||||
import * as React from "react";
|
||||
import { composeRefs } from "@radix-ui/react-compose-refs";
|
||||
import { Fragment as Fragment2, jsx } from "react/jsx-runtime";
|
||||
// @__NO_SIDE_EFFECTS__
|
||||
function createSlot(ownerName) {
|
||||
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
||||
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
const childrenArray = React.Children.toArray(children);
|
||||
const slottable = childrenArray.find(isSlottable);
|
||||
if (slottable) {
|
||||
const newElement = slottable.props.children;
|
||||
const newChildren = childrenArray.map((child) => {
|
||||
if (child === slottable) {
|
||||
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
||||
return React.isValidElement(newElement) ? newElement.props.children : null;
|
||||
} else {
|
||||
return child;
|
||||
}
|
||||
});
|
||||
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
||||
}
|
||||
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
||||
});
|
||||
Slot2.displayName = `${ownerName}.Slot`;
|
||||
return Slot2;
|
||||
}
|
||||
var Slot = /* @__PURE__ */ createSlot("Slot");
|
||||
// @__NO_SIDE_EFFECTS__
|
||||
function createSlotClone(ownerName) {
|
||||
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
if (React.isValidElement(children)) {
|
||||
const childrenRef = getElementRef(children);
|
||||
const props2 = mergeProps(slotProps, children.props);
|
||||
if (children.type !== React.Fragment) {
|
||||
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
||||
}
|
||||
return React.cloneElement(children, props2);
|
||||
}
|
||||
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
||||
});
|
||||
SlotClone.displayName = `${ownerName}.SlotClone`;
|
||||
return SlotClone;
|
||||
}
|
||||
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
||||
// @__NO_SIDE_EFFECTS__
|
||||
function createSlottable(ownerName) {
|
||||
const Slottable2 = ({ children }) => {
|
||||
return /* @__PURE__ */ jsx(Fragment2, { children });
|
||||
};
|
||||
Slottable2.displayName = `${ownerName}.Slottable`;
|
||||
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
||||
return Slottable2;
|
||||
}
|
||||
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
|
||||
function isSlottable(child) {
|
||||
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||||
}
|
||||
function mergeProps(slotProps, childProps) {
|
||||
const overrideProps = { ...childProps };
|
||||
for (const propName in childProps) {
|
||||
const slotPropValue = slotProps[propName];
|
||||
const childPropValue = childProps[propName];
|
||||
const isHandler = /^on[A-Z]/.test(propName);
|
||||
if (isHandler) {
|
||||
if (slotPropValue && childPropValue) {
|
||||
overrideProps[propName] = (...args) => {
|
||||
const result = childPropValue(...args);
|
||||
slotPropValue(...args);
|
||||
return result;
|
||||
};
|
||||
} else if (slotPropValue) {
|
||||
overrideProps[propName] = slotPropValue;
|
||||
}
|
||||
} else if (propName === "style") {
|
||||
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
||||
} else if (propName === "className") {
|
||||
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
||||
}
|
||||
}
|
||||
return { ...slotProps, ...overrideProps };
|
||||
}
|
||||
function getElementRef(element) {
|
||||
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
export {
|
||||
Slot as Root,
|
||||
Slot,
|
||||
Slottable,
|
||||
createSlot,
|
||||
createSlottable
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
63
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/package.json
generated
vendored
Normal file
63
frontend/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-slot/package.json
generated
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "@radix-ui/react-slot",
|
||||
"version": "1.2.3",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@radix-ui/react-compose-refs": "1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"eslint": "^9.18.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"typescript": "^5.7.3",
|
||||
"@repo/eslint-config": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0",
|
||||
"@repo/builder": "0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
73
frontend/node_modules/@radix-ui/react-alert-dialog/package.json
generated
vendored
Normal file
73
frontend/node_modules/@radix-ui/react-alert-dialog/package.json
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"name": "@radix-ui/react-alert-dialog",
|
||||
"version": "1.1.15",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"src",
|
||||
"dist"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@radix-ui/primitive": "1.1.3",
|
||||
"@radix-ui/react-context": "1.1.2",
|
||||
"@radix-ui/react-dialog": "1.1.15",
|
||||
"@radix-ui/react-primitive": "2.1.3",
|
||||
"@radix-ui/react-slot": "1.2.3",
|
||||
"@radix-ui/react-compose-refs": "1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"eslint": "^9.18.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"typescript": "^5.7.3",
|
||||
"@repo/builder": "0.0.0",
|
||||
"@repo/eslint-config": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
64
frontend/node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.test.tsx
generated
vendored
Normal file
64
frontend/node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.test.tsx
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
import React from 'react';
|
||||
import { axe } from 'vitest-axe';
|
||||
import type { RenderResult } from '@testing-library/react';
|
||||
import { cleanup, render, fireEvent } from '@testing-library/react';
|
||||
import * as AlertDialog from './alert-dialog';
|
||||
import { afterEach, describe, it, beforeEach, expect } from 'vitest';
|
||||
|
||||
const OPEN_TEXT = 'Open';
|
||||
const CANCEL_TEXT = 'Cancel';
|
||||
const ACTION_TEXT = 'Do it';
|
||||
const TITLE_TEXT = 'Warning';
|
||||
const DESC_TEXT = 'This is a warning';
|
||||
const OVERLAY_TEST_ID = 'test-overlay';
|
||||
|
||||
const DialogTest = (props: React.ComponentProps<typeof AlertDialog.Root>) => (
|
||||
<AlertDialog.Root {...props}>
|
||||
<AlertDialog.Trigger>{OPEN_TEXT}</AlertDialog.Trigger>
|
||||
<AlertDialog.Overlay data-testid={OVERLAY_TEST_ID} />
|
||||
<AlertDialog.Content>
|
||||
<AlertDialog.Title>{TITLE_TEXT}</AlertDialog.Title>
|
||||
<AlertDialog.Description>{DESC_TEXT}</AlertDialog.Description>
|
||||
<AlertDialog.Cancel>{CANCEL_TEXT}</AlertDialog.Cancel>
|
||||
<AlertDialog.Action>{ACTION_TEXT}</AlertDialog.Action>
|
||||
</AlertDialog.Content>
|
||||
</AlertDialog.Root>
|
||||
);
|
||||
|
||||
describe('given a default Dialog', () => {
|
||||
let rendered: RenderResult;
|
||||
let title: HTMLElement;
|
||||
let trigger: HTMLElement;
|
||||
let cancelButton: HTMLElement;
|
||||
|
||||
afterEach(cleanup);
|
||||
|
||||
beforeEach(() => {
|
||||
rendered = render(<DialogTest />);
|
||||
trigger = rendered.getByText(OPEN_TEXT);
|
||||
});
|
||||
|
||||
it('should have no accessibility violations in default state', async () => {
|
||||
expect(await axe(rendered.container)).toHaveNoViolations();
|
||||
});
|
||||
|
||||
describe('after clicking the trigger', () => {
|
||||
beforeEach(() => {
|
||||
fireEvent.click(trigger);
|
||||
title = rendered.getByText(TITLE_TEXT);
|
||||
cancelButton = rendered.getByText(CANCEL_TEXT);
|
||||
});
|
||||
|
||||
it('should open the content', () => {
|
||||
expect(title).toBeVisible();
|
||||
});
|
||||
|
||||
it('should have no accessibility violations when open', async () => {
|
||||
expect(await axe(rendered.container)).toHaveNoViolations();
|
||||
});
|
||||
|
||||
it('should focus the cancel button', () => {
|
||||
expect(cancelButton).toHaveFocus();
|
||||
});
|
||||
});
|
||||
});
|
||||
308
frontend/node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.tsx
generated
vendored
Normal file
308
frontend/node_modules/@radix-ui/react-alert-dialog/src/alert-dialog.tsx
generated
vendored
Normal file
@ -0,0 +1,308 @@
|
||||
import * as React from 'react';
|
||||
import { createContextScope } from '@radix-ui/react-context';
|
||||
import { useComposedRefs } from '@radix-ui/react-compose-refs';
|
||||
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
||||
import { createDialogScope } from '@radix-ui/react-dialog';
|
||||
import { composeEventHandlers } from '@radix-ui/primitive';
|
||||
import { createSlottable } from '@radix-ui/react-slot';
|
||||
|
||||
import type { Scope } from '@radix-ui/react-context';
|
||||
|
||||
/* -------------------------------------------------------------------------------------------------
|
||||
* AlertDialog
|
||||
* -----------------------------------------------------------------------------------------------*/
|
||||
|
||||
const ROOT_NAME = 'AlertDialog';
|
||||
|
||||
type ScopedProps<P> = P & { __scopeAlertDialog?: Scope };
|
||||
const [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
||||
createDialogScope,
|
||||
]);
|
||||
const useDialogScope = createDialogScope();
|
||||
|
||||
type DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
|
||||
interface AlertDialogProps extends Omit<DialogProps, 'modal'> {}
|
||||
|
||||
const AlertDialog: React.FC<AlertDialogProps> = (props: ScopedProps<AlertDialogProps>) => {
|
||||
const { __scopeAlertDialog, ...alertDialogProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return <DialogPrimitive.Root {...dialogScope} {...alertDialogProps} modal={true} />;
|
||||
};
|
||||
|
||||
AlertDialog.displayName = ROOT_NAME;
|
||||
|
||||
/* -------------------------------------------------------------------------------------------------
|
||||
* AlertDialogTrigger
|
||||
* -----------------------------------------------------------------------------------------------*/
|
||||
const TRIGGER_NAME = 'AlertDialogTrigger';
|
||||
|
||||
type AlertDialogTriggerElement = React.ComponentRef<typeof DialogPrimitive.Trigger>;
|
||||
type DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
|
||||
interface AlertDialogTriggerProps extends DialogTriggerProps {}
|
||||
|
||||
const AlertDialogTrigger = React.forwardRef<AlertDialogTriggerElement, AlertDialogTriggerProps>(
|
||||
(props: ScopedProps<AlertDialogTriggerProps>, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...triggerProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return <DialogPrimitive.Trigger {...dialogScope} {...triggerProps} ref={forwardedRef} />;
|
||||
}
|
||||
);
|
||||
|
||||
AlertDialogTrigger.displayName = TRIGGER_NAME;
|
||||
|
||||
/* -------------------------------------------------------------------------------------------------
|
||||
* AlertDialogPortal
|
||||
* -----------------------------------------------------------------------------------------------*/
|
||||
|
||||
const PORTAL_NAME = 'AlertDialogPortal';
|
||||
|
||||
type DialogPortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;
|
||||
interface AlertDialogPortalProps extends DialogPortalProps {}
|
||||
|
||||
const AlertDialogPortal: React.FC<AlertDialogPortalProps> = (
|
||||
props: ScopedProps<AlertDialogPortalProps>
|
||||
) => {
|
||||
const { __scopeAlertDialog, ...portalProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return <DialogPrimitive.Portal {...dialogScope} {...portalProps} />;
|
||||
};
|
||||
|
||||
AlertDialogPortal.displayName = PORTAL_NAME;
|
||||
|
||||
/* -------------------------------------------------------------------------------------------------
|
||||
* AlertDialogOverlay
|
||||
* -----------------------------------------------------------------------------------------------*/
|
||||
|
||||
const OVERLAY_NAME = 'AlertDialogOverlay';
|
||||
|
||||
type AlertDialogOverlayElement = React.ComponentRef<typeof DialogPrimitive.Overlay>;
|
||||
type DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
|
||||
interface AlertDialogOverlayProps extends DialogOverlayProps {}
|
||||
|
||||
const AlertDialogOverlay = React.forwardRef<AlertDialogOverlayElement, AlertDialogOverlayProps>(
|
||||
(props: ScopedProps<AlertDialogOverlayProps>, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...overlayProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return <DialogPrimitive.Overlay {...dialogScope} {...overlayProps} ref={forwardedRef} />;
|
||||
}
|
||||
);
|
||||
|
||||
AlertDialogOverlay.displayName = OVERLAY_NAME;
|
||||
|
||||
/* -------------------------------------------------------------------------------------------------
|
||||
* AlertDialogContent
|
||||
* -----------------------------------------------------------------------------------------------*/
|
||||
|
||||
const CONTENT_NAME = 'AlertDialogContent';
|
||||
|
||||
type AlertDialogContentContextValue = {
|
||||
cancelRef: React.MutableRefObject<AlertDialogCancelElement | null>;
|
||||
};
|
||||
|
||||
const [AlertDialogContentProvider, useAlertDialogContentContext] =
|
||||
createAlertDialogContext<AlertDialogContentContextValue>(CONTENT_NAME);
|
||||
|
||||
type AlertDialogContentElement = React.ComponentRef<typeof DialogPrimitive.Content>;
|
||||
type DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
|
||||
interface AlertDialogContentProps
|
||||
extends Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'> {}
|
||||
|
||||
const Slottable = createSlottable('AlertDialogContent');
|
||||
|
||||
const AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(
|
||||
(props: ScopedProps<AlertDialogContentProps>, forwardedRef) => {
|
||||
const { __scopeAlertDialog, children, ...contentProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
const contentRef = React.useRef<AlertDialogContentElement>(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
||||
const cancelRef = React.useRef<AlertDialogCancelElement | null>(null);
|
||||
|
||||
return (
|
||||
<DialogPrimitive.WarningProvider
|
||||
contentName={CONTENT_NAME}
|
||||
titleName={TITLE_NAME}
|
||||
docsSlug="alert-dialog"
|
||||
>
|
||||
<AlertDialogContentProvider scope={__scopeAlertDialog} cancelRef={cancelRef}>
|
||||
<DialogPrimitive.Content
|
||||
role="alertdialog"
|
||||
{...dialogScope}
|
||||
{...contentProps}
|
||||
ref={composedRefs}
|
||||
onOpenAutoFocus={composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
|
||||
event.preventDefault();
|
||||
cancelRef.current?.focus({ preventScroll: true });
|
||||
})}
|
||||
onPointerDownOutside={(event) => event.preventDefault()}
|
||||
onInteractOutside={(event) => event.preventDefault()}
|
||||
>
|
||||
{/**
|
||||
* We have to use `Slottable` here as we cannot wrap the `AlertDialogContentProvider`
|
||||
* around everything, otherwise the `DescriptionWarning` would be rendered straight away.
|
||||
* This is because we want the accessibility checks to run only once the content is actually
|
||||
* open and that behaviour is already encapsulated in `DialogContent`.
|
||||
*/}
|
||||
<Slottable>{children}</Slottable>
|
||||
{process.env.NODE_ENV === 'development' && (
|
||||
<DescriptionWarning contentRef={contentRef} />
|
||||
)}
|
||||
</DialogPrimitive.Content>
|
||||
</AlertDialogContentProvider>
|
||||
</DialogPrimitive.WarningProvider>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
AlertDialogContent.displayName = CONTENT_NAME;
|
||||
|
||||
/* -------------------------------------------------------------------------------------------------
|
||||
* AlertDialogTitle
|
||||
* -----------------------------------------------------------------------------------------------*/
|
||||
|
||||
const TITLE_NAME = 'AlertDialogTitle';
|
||||
|
||||
type AlertDialogTitleElement = React.ComponentRef<typeof DialogPrimitive.Title>;
|
||||
type DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
|
||||
interface AlertDialogTitleProps extends DialogTitleProps {}
|
||||
|
||||
const AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>(
|
||||
(props: ScopedProps<AlertDialogTitleProps>, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...titleProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return <DialogPrimitive.Title {...dialogScope} {...titleProps} ref={forwardedRef} />;
|
||||
}
|
||||
);
|
||||
|
||||
AlertDialogTitle.displayName = TITLE_NAME;
|
||||
|
||||
/* -------------------------------------------------------------------------------------------------
|
||||
* AlertDialogDescription
|
||||
* -----------------------------------------------------------------------------------------------*/
|
||||
|
||||
const DESCRIPTION_NAME = 'AlertDialogDescription';
|
||||
|
||||
type AlertDialogDescriptionElement = React.ComponentRef<typeof DialogPrimitive.Description>;
|
||||
type DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
|
||||
interface AlertDialogDescriptionProps extends DialogDescriptionProps {}
|
||||
|
||||
const AlertDialogDescription = React.forwardRef<
|
||||
AlertDialogDescriptionElement,
|
||||
AlertDialogDescriptionProps
|
||||
>((props: ScopedProps<AlertDialogDescriptionProps>, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...descriptionProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return <DialogPrimitive.Description {...dialogScope} {...descriptionProps} ref={forwardedRef} />;
|
||||
});
|
||||
|
||||
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
||||
|
||||
/* -------------------------------------------------------------------------------------------------
|
||||
* AlertDialogAction
|
||||
* -----------------------------------------------------------------------------------------------*/
|
||||
|
||||
const ACTION_NAME = 'AlertDialogAction';
|
||||
|
||||
type AlertDialogActionElement = React.ComponentRef<typeof DialogPrimitive.Close>;
|
||||
type DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;
|
||||
interface AlertDialogActionProps extends DialogCloseProps {}
|
||||
|
||||
const AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(
|
||||
(props: ScopedProps<AlertDialogActionProps>, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...actionProps } = props;
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
return <DialogPrimitive.Close {...dialogScope} {...actionProps} ref={forwardedRef} />;
|
||||
}
|
||||
);
|
||||
|
||||
AlertDialogAction.displayName = ACTION_NAME;
|
||||
|
||||
/* -------------------------------------------------------------------------------------------------
|
||||
* AlertDialogCancel
|
||||
* -----------------------------------------------------------------------------------------------*/
|
||||
|
||||
const CANCEL_NAME = 'AlertDialogCancel';
|
||||
|
||||
type AlertDialogCancelElement = React.ComponentRef<typeof DialogPrimitive.Close>;
|
||||
interface AlertDialogCancelProps extends DialogCloseProps {}
|
||||
|
||||
const AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(
|
||||
(props: ScopedProps<AlertDialogCancelProps>, forwardedRef) => {
|
||||
const { __scopeAlertDialog, ...cancelProps } = props;
|
||||
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
||||
const dialogScope = useDialogScope(__scopeAlertDialog);
|
||||
const ref = useComposedRefs(forwardedRef, cancelRef);
|
||||
return <DialogPrimitive.Close {...dialogScope} {...cancelProps} ref={ref} />;
|
||||
}
|
||||
);
|
||||
|
||||
AlertDialogCancel.displayName = CANCEL_NAME;
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
type DescriptionWarningProps = {
|
||||
contentRef: React.RefObject<AlertDialogContentElement | null>;
|
||||
};
|
||||
|
||||
const DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef }) => {
|
||||
const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
|
||||
|
||||
You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||||
|
||||
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
||||
|
||||
React.useEffect(() => {
|
||||
const hasDescription = document.getElementById(
|
||||
contentRef.current?.getAttribute('aria-describedby')!
|
||||
);
|
||||
if (!hasDescription) console.warn(MESSAGE);
|
||||
}, [MESSAGE, contentRef]);
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
const Root = AlertDialog;
|
||||
const Trigger = AlertDialogTrigger;
|
||||
const Portal = AlertDialogPortal;
|
||||
const Overlay = AlertDialogOverlay;
|
||||
const Content = AlertDialogContent;
|
||||
const Action = AlertDialogAction;
|
||||
const Cancel = AlertDialogCancel;
|
||||
const Title = AlertDialogTitle;
|
||||
const Description = AlertDialogDescription;
|
||||
|
||||
export {
|
||||
createAlertDialogScope,
|
||||
//
|
||||
AlertDialog,
|
||||
AlertDialogTrigger,
|
||||
AlertDialogPortal,
|
||||
AlertDialogOverlay,
|
||||
AlertDialogContent,
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
AlertDialogTitle,
|
||||
AlertDialogDescription,
|
||||
//
|
||||
Root,
|
||||
Trigger,
|
||||
Portal,
|
||||
Overlay,
|
||||
Content,
|
||||
Action,
|
||||
Cancel,
|
||||
Title,
|
||||
Description,
|
||||
};
|
||||
export type {
|
||||
AlertDialogProps,
|
||||
AlertDialogTriggerProps,
|
||||
AlertDialogPortalProps,
|
||||
AlertDialogOverlayProps,
|
||||
AlertDialogContentProps,
|
||||
AlertDialogActionProps,
|
||||
AlertDialogCancelProps,
|
||||
AlertDialogTitleProps,
|
||||
AlertDialogDescriptionProps,
|
||||
};
|
||||
35
frontend/node_modules/@radix-ui/react-alert-dialog/src/index.ts
generated
vendored
Normal file
35
frontend/node_modules/@radix-ui/react-alert-dialog/src/index.ts
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
'use client';
|
||||
export {
|
||||
createAlertDialogScope,
|
||||
//
|
||||
AlertDialog,
|
||||
AlertDialogTrigger,
|
||||
AlertDialogPortal,
|
||||
AlertDialogOverlay,
|
||||
AlertDialogContent,
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
AlertDialogTitle,
|
||||
AlertDialogDescription,
|
||||
//
|
||||
Root,
|
||||
Trigger,
|
||||
Portal,
|
||||
Overlay,
|
||||
Content,
|
||||
Action,
|
||||
Cancel,
|
||||
Title,
|
||||
Description,
|
||||
} from './alert-dialog';
|
||||
export type {
|
||||
AlertDialogProps,
|
||||
AlertDialogTriggerProps,
|
||||
AlertDialogPortalProps,
|
||||
AlertDialogOverlayProps,
|
||||
AlertDialogContentProps,
|
||||
AlertDialogActionProps,
|
||||
AlertDialogCancelProps,
|
||||
AlertDialogTitleProps,
|
||||
AlertDialogDescriptionProps,
|
||||
} from './alert-dialog';
|
||||
21
frontend/node_modules/@radix-ui/react-arrow/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-arrow/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
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.
|
||||
3
frontend/node_modules/@radix-ui/react-arrow/README.md
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/react-arrow/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# `react-arrow`
|
||||
|
||||
This is an internal utility, not intended for public usage.
|
||||
10
frontend/node_modules/@radix-ui/react-arrow/dist/index.d.mts
generated
vendored
Normal file
10
frontend/node_modules/@radix-ui/react-arrow/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
|
||||
type PrimitiveSvgProps = React.ComponentPropsWithoutRef<typeof Primitive.svg>;
|
||||
interface ArrowProps extends PrimitiveSvgProps {
|
||||
}
|
||||
declare const Arrow: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
|
||||
declare const Root: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
|
||||
|
||||
export { Arrow, type ArrowProps, Root };
|
||||
10
frontend/node_modules/@radix-ui/react-arrow/dist/index.d.ts
generated
vendored
Normal file
10
frontend/node_modules/@radix-ui/react-arrow/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
|
||||
type PrimitiveSvgProps = React.ComponentPropsWithoutRef<typeof Primitive.svg>;
|
||||
interface ArrowProps extends PrimitiveSvgProps {
|
||||
}
|
||||
declare const Arrow: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
|
||||
declare const Root: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
|
||||
|
||||
export { Arrow, type ArrowProps, Root };
|
||||
60
frontend/node_modules/@radix-ui/react-arrow/dist/index.js
generated
vendored
Normal file
60
frontend/node_modules/@radix-ui/react-arrow/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
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);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
Arrow: () => Arrow,
|
||||
Root: () => Root
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/arrow.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var import_react_primitive = require("@radix-ui/react-primitive");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
var NAME = "Arrow";
|
||||
var Arrow = React.forwardRef((props, forwardedRef) => {
|
||||
const { children, width = 10, height = 5, ...arrowProps } = props;
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_react_primitive.Primitive.svg,
|
||||
{
|
||||
...arrowProps,
|
||||
ref: forwardedRef,
|
||||
width,
|
||||
height,
|
||||
viewBox: "0 0 30 10",
|
||||
preserveAspectRatio: "none",
|
||||
children: props.asChild ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polygon", { points: "0,0 30,0 15,10" })
|
||||
}
|
||||
);
|
||||
});
|
||||
Arrow.displayName = NAME;
|
||||
var Root = Arrow;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/react-arrow/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-arrow/dist/index.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/index.ts", "../src/arrow.tsx"],
|
||||
"sourcesContent": ["export {\n Arrow,\n //\n Root,\n} from './arrow';\nexport type { ArrowProps } from './arrow';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Arrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Arrow';\n\ntype ArrowElement = React.ComponentRef<typeof Primitive.svg>;\ntype PrimitiveSvgProps = React.ComponentPropsWithoutRef<typeof Primitive.svg>;\ninterface ArrowProps extends PrimitiveSvgProps {}\n\nconst Arrow = React.forwardRef<ArrowElement, ArrowProps>((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return (\n <Primitive.svg\n {...arrowProps}\n ref={forwardedRef}\n width={width}\n height={height}\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n >\n {/* We use their children if they're slotting to replace the whole svg */}\n {props.asChild ? children : <polygon points=\"0,0 30,0 15,10\" />}\n </Primitive.svg>\n );\n});\n\nArrow.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Arrow;\n\nexport {\n Arrow,\n //\n Root,\n};\nexport type { ArrowProps };\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AAwBQ;AAlBlC,IAAM,OAAO;AAMb,IAAM,QAAc,iBAAqC,CAAC,OAAO,iBAAiB;AAChF,QAAM,EAAE,UAAU,QAAQ,IAAI,SAAS,GAAG,GAAG,WAAW,IAAI;AAC5D,SACE;AAAA,IAAC,iCAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,SAAQ;AAAA,MACR,qBAAoB;AAAA,MAGnB,gBAAM,UAAU,WAAW,4CAAC,aAAQ,QAAO,kBAAiB;AAAA;AAAA,EAC/D;AAEJ,CAAC;AAED,MAAM,cAAc;AAIpB,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
27
frontend/node_modules/@radix-ui/react-arrow/dist/index.mjs
generated
vendored
Normal file
27
frontend/node_modules/@radix-ui/react-arrow/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
// src/arrow.tsx
|
||||
import * as React from "react";
|
||||
import { Primitive } from "@radix-ui/react-primitive";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var NAME = "Arrow";
|
||||
var Arrow = React.forwardRef((props, forwardedRef) => {
|
||||
const { children, width = 10, height = 5, ...arrowProps } = props;
|
||||
return /* @__PURE__ */ jsx(
|
||||
Primitive.svg,
|
||||
{
|
||||
...arrowProps,
|
||||
ref: forwardedRef,
|
||||
width,
|
||||
height,
|
||||
viewBox: "0 0 30 10",
|
||||
preserveAspectRatio: "none",
|
||||
children: props.asChild ? children : /* @__PURE__ */ jsx("polygon", { points: "0,0 30,0 15,10" })
|
||||
}
|
||||
);
|
||||
});
|
||||
Arrow.displayName = NAME;
|
||||
var Root = Arrow;
|
||||
export {
|
||||
Arrow,
|
||||
Root
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/react-arrow/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-arrow/dist/index.mjs.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/arrow.tsx"],
|
||||
"sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Arrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Arrow';\n\ntype ArrowElement = React.ComponentRef<typeof Primitive.svg>;\ntype PrimitiveSvgProps = React.ComponentPropsWithoutRef<typeof Primitive.svg>;\ninterface ArrowProps extends PrimitiveSvgProps {}\n\nconst Arrow = React.forwardRef<ArrowElement, ArrowProps>((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return (\n <Primitive.svg\n {...arrowProps}\n ref={forwardedRef}\n width={width}\n height={height}\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n >\n {/* We use their children if they're slotting to replace the whole svg */}\n {props.asChild ? children : <polygon points=\"0,0 30,0 15,10\" />}\n </Primitive.svg>\n );\n});\n\nArrow.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Arrow;\n\nexport {\n Arrow,\n //\n Root,\n};\nexport type { ArrowProps };\n"],
|
||||
"mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAwBQ;AAlBlC,IAAM,OAAO;AAMb,IAAM,QAAc,iBAAqC,CAAC,OAAO,iBAAiB;AAChF,QAAM,EAAE,UAAU,QAAQ,IAAI,SAAS,GAAG,GAAG,WAAW,IAAI;AAC5D,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,SAAQ;AAAA,MACR,qBAAoB;AAAA,MAGnB,gBAAM,UAAU,WAAW,oBAAC,aAAQ,QAAO,kBAAiB;AAAA;AAAA,EAC/D;AAEJ,CAAC;AAED,MAAM,cAAc;AAIpB,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
68
frontend/node_modules/@radix-ui/react-arrow/package.json
generated
vendored
Normal file
68
frontend/node_modules/@radix-ui/react-arrow/package.json
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
"name": "@radix-ui/react-arrow",
|
||||
"version": "1.1.7",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@radix-ui/react-primitive": "2.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.7",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"eslint": "^9.18.0",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"typescript": "^5.7.3",
|
||||
"@repo/builder": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0",
|
||||
"@repo/eslint-config": "0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
frontend/node_modules/@radix-ui/react-aspect-ratio/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-aspect-ratio/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
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.
|
||||
3
frontend/node_modules/@radix-ui/react-aspect-ratio/README.md
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/react-aspect-ratio/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# `react-aspect-ratio`
|
||||
|
||||
View docs [here](https://radix-ui.com/primitives/docs/utilities/aspect-ratio).
|
||||
11
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.d.mts
generated
vendored
Normal file
11
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import * as React from 'react';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
|
||||
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
||||
interface AspectRatioProps extends PrimitiveDivProps {
|
||||
ratio?: number;
|
||||
}
|
||||
declare const AspectRatio: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Root: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
|
||||
|
||||
export { AspectRatio, type AspectRatioProps, Root };
|
||||
11
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.d.ts
generated
vendored
Normal file
11
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import * as React from 'react';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
|
||||
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
||||
interface AspectRatioProps extends PrimitiveDivProps {
|
||||
ratio?: number;
|
||||
}
|
||||
declare const AspectRatio: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Root: React.ForwardRefExoticComponent<AspectRatioProps & React.RefAttributes<HTMLDivElement>>;
|
||||
|
||||
export { AspectRatio, type AspectRatioProps, Root };
|
||||
79
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.js
generated
vendored
Normal file
79
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
"use strict";
|
||||
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);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
AspectRatio: () => AspectRatio,
|
||||
Root: () => Root
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/aspect-ratio.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var import_react_primitive = require("@radix-ui/react-primitive");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
var NAME = "AspectRatio";
|
||||
var AspectRatio = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { ratio = 1 / 1, style, ...aspectRatioProps } = props;
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
"div",
|
||||
{
|
||||
style: {
|
||||
// ensures inner element is contained
|
||||
position: "relative",
|
||||
// ensures padding bottom trick maths works
|
||||
width: "100%",
|
||||
paddingBottom: `${100 / ratio}%`
|
||||
},
|
||||
"data-radix-aspect-ratio-wrapper": "",
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_react_primitive.Primitive.div,
|
||||
{
|
||||
...aspectRatioProps,
|
||||
ref: forwardedRef,
|
||||
style: {
|
||||
...style,
|
||||
// ensures children expand in ratio
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
left: 0
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
AspectRatio.displayName = NAME;
|
||||
var Root = AspectRatio;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/index.ts", "../src/aspect-ratio.tsx"],
|
||||
"sourcesContent": ["export {\n AspectRatio,\n //\n Root,\n} from './aspect-ratio';\nexport type { AspectRatioProps } from './aspect-ratio';\n", "import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * AspectRatio\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'AspectRatio';\n\ntype AspectRatioElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface AspectRatioProps extends PrimitiveDivProps {\n ratio?: number;\n}\n\nconst AspectRatio = React.forwardRef<AspectRatioElement, AspectRatioProps>(\n (props, forwardedRef) => {\n const { ratio = 1 / 1, style, ...aspectRatioProps } = props;\n return (\n <div\n style={{\n // ensures inner element is contained\n position: 'relative',\n // ensures padding bottom trick maths works\n width: '100%',\n paddingBottom: `${100 / ratio}%`,\n }}\n data-radix-aspect-ratio-wrapper=\"\"\n >\n <Primitive.div\n {...aspectRatioProps}\n ref={forwardedRef}\n style={{\n ...style,\n // ensures children expand in ratio\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n }}\n />\n </div>\n );\n },\n);\n\nAspectRatio.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = AspectRatio;\n\nexport {\n AspectRatio,\n //\n Root,\n};\nexport type { AspectRatioProps };\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAA0B;AA4BlB;AAtBR,IAAM,OAAO;AAQb,IAAM,cAAoB;AAAA,EACxB,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,QAAQ,IAAI,GAAG,OAAO,GAAG,iBAAiB,IAAI;AACtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA;AAAA,UAEL,UAAU;AAAA;AAAA,UAEV,OAAO;AAAA,UACP,eAAe,GAAG,MAAM,KAAK;AAAA,QAC/B;AAAA,QACA,mCAAgC;AAAA,QAEhC;AAAA,UAAC,iCAAU;AAAA,UAAV;AAAA,YACE,GAAG;AAAA,YACJ,KAAK;AAAA,YACL,OAAO;AAAA,cACL,GAAG;AAAA;AAAA,cAEH,UAAU;AAAA,cACV,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,MAAM;AAAA,YACR;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAI1B,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
46
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs
generated
vendored
Normal file
46
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
// src/aspect-ratio.tsx
|
||||
import * as React from "react";
|
||||
import { Primitive } from "@radix-ui/react-primitive";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var NAME = "AspectRatio";
|
||||
var AspectRatio = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { ratio = 1 / 1, style, ...aspectRatioProps } = props;
|
||||
return /* @__PURE__ */ jsx(
|
||||
"div",
|
||||
{
|
||||
style: {
|
||||
// ensures inner element is contained
|
||||
position: "relative",
|
||||
// ensures padding bottom trick maths works
|
||||
width: "100%",
|
||||
paddingBottom: `${100 / ratio}%`
|
||||
},
|
||||
"data-radix-aspect-ratio-wrapper": "",
|
||||
children: /* @__PURE__ */ jsx(
|
||||
Primitive.div,
|
||||
{
|
||||
...aspectRatioProps,
|
||||
ref: forwardedRef,
|
||||
style: {
|
||||
...style,
|
||||
// ensures children expand in ratio
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
left: 0
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
AspectRatio.displayName = NAME;
|
||||
var Root = AspectRatio;
|
||||
export {
|
||||
AspectRatio,
|
||||
Root
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/aspect-ratio.tsx"],
|
||||
"sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * AspectRatio\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'AspectRatio';\n\ntype AspectRatioElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface AspectRatioProps extends PrimitiveDivProps {\n ratio?: number;\n}\n\nconst AspectRatio = React.forwardRef<AspectRatioElement, AspectRatioProps>(\n (props, forwardedRef) => {\n const { ratio = 1 / 1, style, ...aspectRatioProps } = props;\n return (\n <div\n style={{\n // ensures inner element is contained\n position: 'relative',\n // ensures padding bottom trick maths works\n width: '100%',\n paddingBottom: `${100 / ratio}%`,\n }}\n data-radix-aspect-ratio-wrapper=\"\"\n >\n <Primitive.div\n {...aspectRatioProps}\n ref={forwardedRef}\n style={{\n ...style,\n // ensures children expand in ratio\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n }}\n />\n </div>\n );\n },\n);\n\nAspectRatio.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = AspectRatio;\n\nexport {\n AspectRatio,\n //\n Root,\n};\nexport type { AspectRatioProps };\n"],
|
||||
"mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AA4BlB;AAtBR,IAAM,OAAO;AAQb,IAAM,cAAoB;AAAA,EACxB,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,QAAQ,IAAI,GAAG,OAAO,GAAG,iBAAiB,IAAI;AACtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA;AAAA,UAEL,UAAU;AAAA;AAAA,UAEV,OAAO;AAAA,UACP,eAAe,GAAG,MAAM,KAAK;AAAA,QAC/B;AAAA,QACA,mCAAgC;AAAA,QAEhC;AAAA,UAAC,UAAU;AAAA,UAAV;AAAA,YACE,GAAG;AAAA,YACJ,KAAK;AAAA,YACL,OAAO;AAAA,cACL,GAAG;AAAA;AAAA,cAEH,UAAU;AAAA,cACV,KAAK;AAAA,cACL,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,MAAM;AAAA,YACR;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAI1B,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
21
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
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.
|
||||
3
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/README.md
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# `react-primitive`
|
||||
|
||||
This is an internal utility, not intended for public usage.
|
||||
52
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.d.mts
generated
vendored
Normal file
52
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
import * as React from 'react';
|
||||
|
||||
declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul"];
|
||||
type Primitives = {
|
||||
[E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
|
||||
};
|
||||
type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
|
||||
asChild?: boolean;
|
||||
};
|
||||
interface PrimitiveForwardRefComponent<E extends React.ElementType> extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {
|
||||
}
|
||||
declare const Primitive: Primitives;
|
||||
/**
|
||||
* Flush custom event dispatch
|
||||
* https://github.com/radix-ui/primitives/pull/1378
|
||||
*
|
||||
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
||||
*
|
||||
* Internally, React prioritises events in the following order:
|
||||
* - discrete
|
||||
* - continuous
|
||||
* - default
|
||||
*
|
||||
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
||||
*
|
||||
* `discrete` is an important distinction as updates within these events are applied immediately.
|
||||
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
||||
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
||||
* dispatched by another `discrete` event.
|
||||
*
|
||||
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
||||
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
||||
* is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
||||
* For example:
|
||||
*
|
||||
* dispatching a known click 👎
|
||||
* target.dispatchEvent(new Event(‘click’))
|
||||
*
|
||||
* dispatching a custom type within a non-discrete event 👎
|
||||
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
||||
*
|
||||
* dispatching a custom type within a `discrete` event 👍
|
||||
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
||||
*
|
||||
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
||||
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
||||
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
||||
*/
|
||||
declare function dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E): void;
|
||||
declare const Root: Primitives;
|
||||
|
||||
export { Primitive, type PrimitivePropsWithRef, Root, dispatchDiscreteCustomEvent };
|
||||
52
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.d.ts
generated
vendored
Normal file
52
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
import * as React from 'react';
|
||||
|
||||
declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul"];
|
||||
type Primitives = {
|
||||
[E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
|
||||
};
|
||||
type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
|
||||
asChild?: boolean;
|
||||
};
|
||||
interface PrimitiveForwardRefComponent<E extends React.ElementType> extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {
|
||||
}
|
||||
declare const Primitive: Primitives;
|
||||
/**
|
||||
* Flush custom event dispatch
|
||||
* https://github.com/radix-ui/primitives/pull/1378
|
||||
*
|
||||
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
||||
*
|
||||
* Internally, React prioritises events in the following order:
|
||||
* - discrete
|
||||
* - continuous
|
||||
* - default
|
||||
*
|
||||
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
||||
*
|
||||
* `discrete` is an important distinction as updates within these events are applied immediately.
|
||||
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
||||
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
||||
* dispatched by another `discrete` event.
|
||||
*
|
||||
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
||||
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
||||
* is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
||||
* For example:
|
||||
*
|
||||
* dispatching a known click 👎
|
||||
* target.dispatchEvent(new Event(‘click’))
|
||||
*
|
||||
* dispatching a custom type within a non-discrete event 👎
|
||||
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
||||
*
|
||||
* dispatching a custom type within a `discrete` event 👍
|
||||
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
||||
*
|
||||
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
||||
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
||||
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
||||
*/
|
||||
declare function dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E): void;
|
||||
declare const Root: Primitives;
|
||||
|
||||
export { Primitive, type PrimitivePropsWithRef, Root, dispatchDiscreteCustomEvent };
|
||||
80
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.js
generated
vendored
Normal file
80
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
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);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
Primitive: () => Primitive,
|
||||
Root: () => Root,
|
||||
dispatchDiscreteCustomEvent: () => dispatchDiscreteCustomEvent
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/primitive.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var ReactDOM = __toESM(require("react-dom"));
|
||||
var import_react_slot = require("@radix-ui/react-slot");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
var NODES = [
|
||||
"a",
|
||||
"button",
|
||||
"div",
|
||||
"form",
|
||||
"h2",
|
||||
"h3",
|
||||
"img",
|
||||
"input",
|
||||
"label",
|
||||
"li",
|
||||
"nav",
|
||||
"ol",
|
||||
"p",
|
||||
"select",
|
||||
"span",
|
||||
"svg",
|
||||
"ul"
|
||||
];
|
||||
var Primitive = NODES.reduce((primitive, node) => {
|
||||
const Slot = (0, import_react_slot.createSlot)(`Primitive.${node}`);
|
||||
const Node = React.forwardRef((props, forwardedRef) => {
|
||||
const { asChild, ...primitiveProps } = props;
|
||||
const Comp = asChild ? Slot : node;
|
||||
if (typeof window !== "undefined") {
|
||||
window[Symbol.for("radix-ui")] = true;
|
||||
}
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
||||
});
|
||||
Node.displayName = `Primitive.${node}`;
|
||||
return { ...primitive, [node]: Node };
|
||||
}, {});
|
||||
function dispatchDiscreteCustomEvent(target, event) {
|
||||
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
||||
}
|
||||
var Root = Primitive;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/index.ts", "../src/primitive.tsx"],
|
||||
"sourcesContent": ["export {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n} from './primitive';\nexport type { PrimitivePropsWithRef } from './primitive';\n", "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,eAA0B;AAC1B,wBAA2B;AA4ChB;AA1CX,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAcA,IAAM,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAClD,QAAM,WAAO,8BAAW,aAAa,IAAI,EAAE;AAC3C,QAAM,OAAa,iBAAW,CAAC,OAA2C,iBAAsB;AAC9F,UAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AACvC,UAAM,OAAY,UAAU,OAAO;AAEnC,QAAI,OAAO,WAAW,aAAa;AACjC,MAAC,OAAe,OAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IAC5C;AAEA,WAAO,4CAAC,QAAM,GAAG,gBAAgB,KAAK,cAAc;AAAA,EACtD,CAAC;AAED,OAAK,cAAc,aAAa,IAAI;AAEpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAK;AACtC,GAAG,CAAC,CAAe;AA2CnB,SAAS,4BAAmD,QAAqB,OAAU;AACzF,MAAI,OAAQ,CAAS,mBAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;AAIA,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
47
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.mjs
generated
vendored
Normal file
47
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
// src/primitive.tsx
|
||||
import * as React from "react";
|
||||
import * as ReactDOM from "react-dom";
|
||||
import { createSlot } from "@radix-ui/react-slot";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var NODES = [
|
||||
"a",
|
||||
"button",
|
||||
"div",
|
||||
"form",
|
||||
"h2",
|
||||
"h3",
|
||||
"img",
|
||||
"input",
|
||||
"label",
|
||||
"li",
|
||||
"nav",
|
||||
"ol",
|
||||
"p",
|
||||
"select",
|
||||
"span",
|
||||
"svg",
|
||||
"ul"
|
||||
];
|
||||
var Primitive = NODES.reduce((primitive, node) => {
|
||||
const Slot = createSlot(`Primitive.${node}`);
|
||||
const Node = React.forwardRef((props, forwardedRef) => {
|
||||
const { asChild, ...primitiveProps } = props;
|
||||
const Comp = asChild ? Slot : node;
|
||||
if (typeof window !== "undefined") {
|
||||
window[Symbol.for("radix-ui")] = true;
|
||||
}
|
||||
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
||||
});
|
||||
Node.displayName = `Primitive.${node}`;
|
||||
return { ...primitive, [node]: Node };
|
||||
}, {});
|
||||
function dispatchDiscreteCustomEvent(target, event) {
|
||||
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
||||
}
|
||||
var Root = Primitive;
|
||||
export {
|
||||
Primitive,
|
||||
Root,
|
||||
dispatchDiscreteCustomEvent
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/dist/index.mjs.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/primitive.tsx"],
|
||||
"sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n"],
|
||||
"mappings": ";AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,kBAAkB;AA4ChB;AA1CX,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAcA,IAAM,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAClD,QAAM,OAAO,WAAW,aAAa,IAAI,EAAE;AAC3C,QAAM,OAAa,iBAAW,CAAC,OAA2C,iBAAsB;AAC9F,UAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AACvC,UAAM,OAAY,UAAU,OAAO;AAEnC,QAAI,OAAO,WAAW,aAAa;AACjC,MAAC,OAAe,OAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IAC5C;AAEA,WAAO,oBAAC,QAAM,GAAG,gBAAgB,KAAK,cAAc;AAAA,EACtD,CAAC;AAED,OAAK,cAAc,aAAa,IAAI;AAEpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAK;AACtC,GAAG,CAAC,CAAe;AA2CnB,SAAS,4BAAmD,QAAqB,OAAU;AACzF,MAAI,OAAQ,CAAS,mBAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;AAIA,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
69
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/package.json
generated
vendored
Normal file
69
frontend/node_modules/@radix-ui/react-aspect-ratio/node_modules/@radix-ui/react-primitive/package.json
generated
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
"name": "@radix-ui/react-primitive",
|
||||
"version": "2.1.4",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@radix-ui/react-slot": "1.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.2.2",
|
||||
"@types/react-dom": "^19.2.2",
|
||||
"eslint": "^9.38.0",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"typescript": "^5.9.3",
|
||||
"@repo/builder": "0.0.0",
|
||||
"@repo/eslint-config": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"reset": "rm -rf dist node_modules",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
69
frontend/node_modules/@radix-ui/react-aspect-ratio/package.json
generated
vendored
Normal file
69
frontend/node_modules/@radix-ui/react-aspect-ratio/package.json
generated
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
"name": "@radix-ui/react-aspect-ratio",
|
||||
"version": "1.1.8",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@radix-ui/react-primitive": "2.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.2.2",
|
||||
"@types/react-dom": "^19.2.2",
|
||||
"eslint": "^9.38.0",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"typescript": "^5.9.3",
|
||||
"@repo/builder": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0",
|
||||
"@repo/eslint-config": "0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"reset": "rm -rf dist node_modules",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
frontend/node_modules/@radix-ui/react-avatar/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-avatar/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
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.
|
||||
3
frontend/node_modules/@radix-ui/react-avatar/README.md
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/react-avatar/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# `react-avatar`
|
||||
|
||||
View docs [here](https://radix-ui.com/primitives/docs/components/avatar).
|
||||
24
frontend/node_modules/@radix-ui/react-avatar/dist/index.d.mts
generated
vendored
Normal file
24
frontend/node_modules/@radix-ui/react-avatar/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
||||
import * as React from 'react';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
|
||||
declare const createAvatarScope: _radix_ui_react_context.CreateScope;
|
||||
type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
|
||||
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
||||
interface AvatarProps extends PrimitiveSpanProps {
|
||||
}
|
||||
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
||||
type PrimitiveImageProps = React.ComponentPropsWithoutRef<typeof Primitive.img>;
|
||||
interface AvatarImageProps extends PrimitiveImageProps {
|
||||
onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
|
||||
}
|
||||
declare const AvatarImage: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLImageElement>>;
|
||||
interface AvatarFallbackProps extends PrimitiveSpanProps {
|
||||
delayMs?: number;
|
||||
}
|
||||
declare const AvatarFallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>>;
|
||||
declare const Root: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
||||
declare const Image: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLImageElement>>;
|
||||
declare const Fallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>>;
|
||||
|
||||
export { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Fallback, Image, Root, createAvatarScope };
|
||||
24
frontend/node_modules/@radix-ui/react-avatar/dist/index.d.ts
generated
vendored
Normal file
24
frontend/node_modules/@radix-ui/react-avatar/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
||||
import * as React from 'react';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
|
||||
declare const createAvatarScope: _radix_ui_react_context.CreateScope;
|
||||
type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
|
||||
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
||||
interface AvatarProps extends PrimitiveSpanProps {
|
||||
}
|
||||
declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
||||
type PrimitiveImageProps = React.ComponentPropsWithoutRef<typeof Primitive.img>;
|
||||
interface AvatarImageProps extends PrimitiveImageProps {
|
||||
onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
|
||||
}
|
||||
declare const AvatarImage: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLImageElement>>;
|
||||
interface AvatarFallbackProps extends PrimitiveSpanProps {
|
||||
delayMs?: number;
|
||||
}
|
||||
declare const AvatarFallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>>;
|
||||
declare const Root: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
|
||||
declare const Image: React.ForwardRefExoticComponent<AvatarImageProps & React.RefAttributes<HTMLImageElement>>;
|
||||
declare const Fallback: React.ForwardRefExoticComponent<AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>>;
|
||||
|
||||
export { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Fallback, Image, Root, createAvatarScope };
|
||||
160
frontend/node_modules/@radix-ui/react-avatar/dist/index.js
generated
vendored
Normal file
160
frontend/node_modules/@radix-ui/react-avatar/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,160 @@
|
||||
"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);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
Avatar: () => Avatar,
|
||||
AvatarFallback: () => AvatarFallback,
|
||||
AvatarImage: () => AvatarImage,
|
||||
Fallback: () => Fallback,
|
||||
Image: () => Image,
|
||||
Root: () => Root,
|
||||
createAvatarScope: () => createAvatarScope
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/avatar.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var import_react_context = require("@radix-ui/react-context");
|
||||
var import_react_use_callback_ref = require("@radix-ui/react-use-callback-ref");
|
||||
var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect");
|
||||
var import_react_primitive = require("@radix-ui/react-primitive");
|
||||
var import_react_use_is_hydrated = require("@radix-ui/react-use-is-hydrated");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
var AVATAR_NAME = "Avatar";
|
||||
var [createAvatarContext, createAvatarScope] = (0, import_react_context.createContextScope)(AVATAR_NAME);
|
||||
var [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);
|
||||
var Avatar = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAvatar, ...avatarProps } = props;
|
||||
const [imageLoadingStatus, setImageLoadingStatus] = React.useState("idle");
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
AvatarProvider,
|
||||
{
|
||||
scope: __scopeAvatar,
|
||||
imageLoadingStatus,
|
||||
onImageLoadingStatusChange: setImageLoadingStatus,
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.span, { ...avatarProps, ref: forwardedRef })
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
Avatar.displayName = AVATAR_NAME;
|
||||
var IMAGE_NAME = "AvatarImage";
|
||||
var AvatarImage = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAvatar, src, onLoadingStatusChange = () => {
|
||||
}, ...imageProps } = props;
|
||||
const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);
|
||||
const imageLoadingStatus = useImageLoadingStatus(src, imageProps);
|
||||
const handleLoadingStatusChange = (0, import_react_use_callback_ref.useCallbackRef)((status) => {
|
||||
onLoadingStatusChange(status);
|
||||
context.onImageLoadingStatusChange(status);
|
||||
});
|
||||
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
||||
if (imageLoadingStatus !== "idle") {
|
||||
handleLoadingStatusChange(imageLoadingStatus);
|
||||
}
|
||||
}, [imageLoadingStatus, handleLoadingStatusChange]);
|
||||
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
|
||||
}
|
||||
);
|
||||
AvatarImage.displayName = IMAGE_NAME;
|
||||
var FALLBACK_NAME = "AvatarFallback";
|
||||
var AvatarFallback = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAvatar, delayMs, ...fallbackProps } = props;
|
||||
const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);
|
||||
const [canRender, setCanRender] = React.useState(delayMs === void 0);
|
||||
React.useEffect(() => {
|
||||
if (delayMs !== void 0) {
|
||||
const timerId = window.setTimeout(() => setCanRender(true), delayMs);
|
||||
return () => window.clearTimeout(timerId);
|
||||
}
|
||||
}, [delayMs]);
|
||||
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
|
||||
}
|
||||
);
|
||||
AvatarFallback.displayName = FALLBACK_NAME;
|
||||
function resolveLoadingStatus(image, src) {
|
||||
if (!image) {
|
||||
return "idle";
|
||||
}
|
||||
if (!src) {
|
||||
return "error";
|
||||
}
|
||||
if (image.src !== src) {
|
||||
image.src = src;
|
||||
}
|
||||
return image.complete && image.naturalWidth > 0 ? "loaded" : "loading";
|
||||
}
|
||||
function useImageLoadingStatus(src, { referrerPolicy, crossOrigin }) {
|
||||
const isHydrated = (0, import_react_use_is_hydrated.useIsHydrated)();
|
||||
const imageRef = React.useRef(null);
|
||||
const image = (() => {
|
||||
if (!isHydrated) return null;
|
||||
if (!imageRef.current) {
|
||||
imageRef.current = new window.Image();
|
||||
}
|
||||
return imageRef.current;
|
||||
})();
|
||||
const [loadingStatus, setLoadingStatus] = React.useState(
|
||||
() => resolveLoadingStatus(image, src)
|
||||
);
|
||||
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
||||
setLoadingStatus(resolveLoadingStatus(image, src));
|
||||
}, [image, src]);
|
||||
(0, import_react_use_layout_effect.useLayoutEffect)(() => {
|
||||
const updateStatus = (status) => () => {
|
||||
setLoadingStatus(status);
|
||||
};
|
||||
if (!image) return;
|
||||
const handleLoad = updateStatus("loaded");
|
||||
const handleError = updateStatus("error");
|
||||
image.addEventListener("load", handleLoad);
|
||||
image.addEventListener("error", handleError);
|
||||
if (referrerPolicy) {
|
||||
image.referrerPolicy = referrerPolicy;
|
||||
}
|
||||
if (typeof crossOrigin === "string") {
|
||||
image.crossOrigin = crossOrigin;
|
||||
}
|
||||
return () => {
|
||||
image.removeEventListener("load", handleLoad);
|
||||
image.removeEventListener("error", handleError);
|
||||
};
|
||||
}, [image, crossOrigin, referrerPolicy]);
|
||||
return loadingStatus;
|
||||
}
|
||||
var Root = Avatar;
|
||||
var Image = AvatarImage;
|
||||
var Fallback = AvatarFallback;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/react-avatar/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-avatar/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
128
frontend/node_modules/@radix-ui/react-avatar/dist/index.mjs
generated
vendored
Normal file
128
frontend/node_modules/@radix-ui/react-avatar/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
"use client";
|
||||
|
||||
// src/avatar.tsx
|
||||
import * as React from "react";
|
||||
import { createContextScope } from "@radix-ui/react-context";
|
||||
import { useCallbackRef } from "@radix-ui/react-use-callback-ref";
|
||||
import { useLayoutEffect } from "@radix-ui/react-use-layout-effect";
|
||||
import { Primitive } from "@radix-ui/react-primitive";
|
||||
import { useIsHydrated } from "@radix-ui/react-use-is-hydrated";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var AVATAR_NAME = "Avatar";
|
||||
var [createAvatarContext, createAvatarScope] = createContextScope(AVATAR_NAME);
|
||||
var [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);
|
||||
var Avatar = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAvatar, ...avatarProps } = props;
|
||||
const [imageLoadingStatus, setImageLoadingStatus] = React.useState("idle");
|
||||
return /* @__PURE__ */ jsx(
|
||||
AvatarProvider,
|
||||
{
|
||||
scope: __scopeAvatar,
|
||||
imageLoadingStatus,
|
||||
onImageLoadingStatusChange: setImageLoadingStatus,
|
||||
children: /* @__PURE__ */ jsx(Primitive.span, { ...avatarProps, ref: forwardedRef })
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
Avatar.displayName = AVATAR_NAME;
|
||||
var IMAGE_NAME = "AvatarImage";
|
||||
var AvatarImage = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAvatar, src, onLoadingStatusChange = () => {
|
||||
}, ...imageProps } = props;
|
||||
const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);
|
||||
const imageLoadingStatus = useImageLoadingStatus(src, imageProps);
|
||||
const handleLoadingStatusChange = useCallbackRef((status) => {
|
||||
onLoadingStatusChange(status);
|
||||
context.onImageLoadingStatusChange(status);
|
||||
});
|
||||
useLayoutEffect(() => {
|
||||
if (imageLoadingStatus !== "idle") {
|
||||
handleLoadingStatusChange(imageLoadingStatus);
|
||||
}
|
||||
}, [imageLoadingStatus, handleLoadingStatusChange]);
|
||||
return imageLoadingStatus === "loaded" ? /* @__PURE__ */ jsx(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
|
||||
}
|
||||
);
|
||||
AvatarImage.displayName = IMAGE_NAME;
|
||||
var FALLBACK_NAME = "AvatarFallback";
|
||||
var AvatarFallback = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAvatar, delayMs, ...fallbackProps } = props;
|
||||
const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);
|
||||
const [canRender, setCanRender] = React.useState(delayMs === void 0);
|
||||
React.useEffect(() => {
|
||||
if (delayMs !== void 0) {
|
||||
const timerId = window.setTimeout(() => setCanRender(true), delayMs);
|
||||
return () => window.clearTimeout(timerId);
|
||||
}
|
||||
}, [delayMs]);
|
||||
return canRender && context.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ jsx(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
|
||||
}
|
||||
);
|
||||
AvatarFallback.displayName = FALLBACK_NAME;
|
||||
function resolveLoadingStatus(image, src) {
|
||||
if (!image) {
|
||||
return "idle";
|
||||
}
|
||||
if (!src) {
|
||||
return "error";
|
||||
}
|
||||
if (image.src !== src) {
|
||||
image.src = src;
|
||||
}
|
||||
return image.complete && image.naturalWidth > 0 ? "loaded" : "loading";
|
||||
}
|
||||
function useImageLoadingStatus(src, { referrerPolicy, crossOrigin }) {
|
||||
const isHydrated = useIsHydrated();
|
||||
const imageRef = React.useRef(null);
|
||||
const image = (() => {
|
||||
if (!isHydrated) return null;
|
||||
if (!imageRef.current) {
|
||||
imageRef.current = new window.Image();
|
||||
}
|
||||
return imageRef.current;
|
||||
})();
|
||||
const [loadingStatus, setLoadingStatus] = React.useState(
|
||||
() => resolveLoadingStatus(image, src)
|
||||
);
|
||||
useLayoutEffect(() => {
|
||||
setLoadingStatus(resolveLoadingStatus(image, src));
|
||||
}, [image, src]);
|
||||
useLayoutEffect(() => {
|
||||
const updateStatus = (status) => () => {
|
||||
setLoadingStatus(status);
|
||||
};
|
||||
if (!image) return;
|
||||
const handleLoad = updateStatus("loaded");
|
||||
const handleError = updateStatus("error");
|
||||
image.addEventListener("load", handleLoad);
|
||||
image.addEventListener("error", handleError);
|
||||
if (referrerPolicy) {
|
||||
image.referrerPolicy = referrerPolicy;
|
||||
}
|
||||
if (typeof crossOrigin === "string") {
|
||||
image.crossOrigin = crossOrigin;
|
||||
}
|
||||
return () => {
|
||||
image.removeEventListener("load", handleLoad);
|
||||
image.removeEventListener("error", handleError);
|
||||
};
|
||||
}, [image, crossOrigin, referrerPolicy]);
|
||||
return loadingStatus;
|
||||
}
|
||||
var Root = Avatar;
|
||||
var Image = AvatarImage;
|
||||
var Fallback = AvatarFallback;
|
||||
export {
|
||||
Avatar,
|
||||
AvatarFallback,
|
||||
AvatarImage,
|
||||
Fallback,
|
||||
Image,
|
||||
Root,
|
||||
createAvatarScope
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/react-avatar/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-avatar/dist/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
21
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
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.
|
||||
3
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/README.md
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# `react-context`
|
||||
|
||||
This is an internal utility, not intended for public usage.
|
||||
21
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.d.mts
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import * as React from 'react';
|
||||
|
||||
declare function createContext<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType): readonly [React.FC<ContextValueType & {
|
||||
children: React.ReactNode;
|
||||
}>, (consumerName: string) => ContextValueType];
|
||||
type Scope<C = any> = {
|
||||
[scopeName: string]: React.Context<C>[];
|
||||
} | undefined;
|
||||
type ScopeHook = (scope: Scope) => {
|
||||
[__scopeProp: string]: Scope;
|
||||
};
|
||||
interface CreateScope {
|
||||
scopeName: string;
|
||||
(): ScopeHook;
|
||||
}
|
||||
declare function createContextScope(scopeName: string, createContextScopeDeps?: CreateScope[]): readonly [<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType) => readonly [React.FC<ContextValueType & {
|
||||
scope: Scope<ContextValueType>;
|
||||
children: React.ReactNode;
|
||||
}>, (consumerName: string, scope: Scope<ContextValueType | undefined>) => ContextValueType], CreateScope];
|
||||
|
||||
export { type CreateScope, type Scope, createContext, createContextScope };
|
||||
21
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.d.ts
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import * as React from 'react';
|
||||
|
||||
declare function createContext<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType): readonly [React.FC<ContextValueType & {
|
||||
children: React.ReactNode;
|
||||
}>, (consumerName: string) => ContextValueType];
|
||||
type Scope<C = any> = {
|
||||
[scopeName: string]: React.Context<C>[];
|
||||
} | undefined;
|
||||
type ScopeHook = (scope: Scope) => {
|
||||
[__scopeProp: string]: Scope;
|
||||
};
|
||||
interface CreateScope {
|
||||
scopeName: string;
|
||||
(): ScopeHook;
|
||||
}
|
||||
declare function createContextScope(scopeName: string, createContextScopeDeps?: CreateScope[]): readonly [<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType) => readonly [React.FC<ContextValueType & {
|
||||
scope: Scope<ContextValueType>;
|
||||
children: React.ReactNode;
|
||||
}>, (consumerName: string, scope: Scope<ContextValueType | undefined>) => ContextValueType], CreateScope];
|
||||
|
||||
export { type CreateScope, type Scope, createContext, createContextScope };
|
||||
116
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js
generated
vendored
Normal file
116
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
"use strict";
|
||||
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);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
createContext: () => createContext2,
|
||||
createContextScope: () => createContextScope
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/create-context.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
function createContext2(rootComponentName, defaultContext) {
|
||||
const Context = React.createContext(defaultContext);
|
||||
Context.displayName = rootComponentName + "Context";
|
||||
const Provider = (props) => {
|
||||
const { children, ...context } = props;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName) {
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||||
let defaultContexts = [];
|
||||
function createContext3(rootComponentName, defaultContext) {
|
||||
const BaseContext = React.createContext(defaultContext);
|
||||
BaseContext.displayName = rootComponentName + "Context";
|
||||
const index = defaultContexts.length;
|
||||
defaultContexts = [...defaultContexts, defaultContext];
|
||||
const Provider = (props) => {
|
||||
const { scope, children, ...context } = props;
|
||||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName, scope) {
|
||||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
const createScope = () => {
|
||||
const scopeContexts = defaultContexts.map((defaultContext) => {
|
||||
return React.createContext(defaultContext);
|
||||
});
|
||||
return function useScope(scope) {
|
||||
const contexts = scope?.[scopeName] || scopeContexts;
|
||||
return React.useMemo(
|
||||
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
||||
[scope, contexts]
|
||||
);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = scopeName;
|
||||
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
||||
}
|
||||
function composeContextScopes(...scopes) {
|
||||
const baseScope = scopes[0];
|
||||
if (scopes.length === 1) return baseScope;
|
||||
const createScope = () => {
|
||||
const scopeHooks = scopes.map((createScope2) => ({
|
||||
useScope: createScope2(),
|
||||
scopeName: createScope2.scopeName
|
||||
}));
|
||||
return function useComposedScopes(overrideScopes) {
|
||||
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
||||
const scopeProps = useScope(overrideScopes);
|
||||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||||
return { ...nextScopes2, ...currentScope };
|
||||
}, {});
|
||||
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = baseScope.scopeName;
|
||||
return createScope;
|
||||
}
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
83
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.mjs
generated
vendored
Normal file
83
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
// src/create-context.tsx
|
||||
import * as React from "react";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
function createContext2(rootComponentName, defaultContext) {
|
||||
const Context = React.createContext(defaultContext);
|
||||
Context.displayName = rootComponentName + "Context";
|
||||
const Provider = (props) => {
|
||||
const { children, ...context } = props;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName) {
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||||
let defaultContexts = [];
|
||||
function createContext3(rootComponentName, defaultContext) {
|
||||
const BaseContext = React.createContext(defaultContext);
|
||||
BaseContext.displayName = rootComponentName + "Context";
|
||||
const index = defaultContexts.length;
|
||||
defaultContexts = [...defaultContexts, defaultContext];
|
||||
const Provider = (props) => {
|
||||
const { scope, children, ...context } = props;
|
||||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||||
const value = React.useMemo(() => context, Object.values(context));
|
||||
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName, scope) {
|
||||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||||
const context = React.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
const createScope = () => {
|
||||
const scopeContexts = defaultContexts.map((defaultContext) => {
|
||||
return React.createContext(defaultContext);
|
||||
});
|
||||
return function useScope(scope) {
|
||||
const contexts = scope?.[scopeName] || scopeContexts;
|
||||
return React.useMemo(
|
||||
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
||||
[scope, contexts]
|
||||
);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = scopeName;
|
||||
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
||||
}
|
||||
function composeContextScopes(...scopes) {
|
||||
const baseScope = scopes[0];
|
||||
if (scopes.length === 1) return baseScope;
|
||||
const createScope = () => {
|
||||
const scopeHooks = scopes.map((createScope2) => ({
|
||||
useScope: createScope2(),
|
||||
scopeName: createScope2.scopeName
|
||||
}));
|
||||
return function useComposedScopes(overrideScopes) {
|
||||
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
||||
const scopeProps = useScope(overrideScopes);
|
||||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||||
return { ...nextScopes2, ...currentScope };
|
||||
}, {});
|
||||
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = baseScope.scopeName;
|
||||
return createScope;
|
||||
}
|
||||
export {
|
||||
createContext2 as createContext,
|
||||
createContextScope
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
61
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/package.json
generated
vendored
Normal file
61
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/package.json
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "@radix-ui/react-context",
|
||||
"version": "1.1.3",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.2.2",
|
||||
"@types/react-dom": "^19.2.2",
|
||||
"eslint": "^9.38.0",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"typescript": "^5.9.3",
|
||||
"@repo/builder": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0",
|
||||
"@repo/eslint-config": "0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"reset": "rm -rf dist node_modules",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
21
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/LICENSE
generated
vendored
Normal file
21
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 WorkOS
|
||||
|
||||
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.
|
||||
3
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/README.md
generated
vendored
Normal file
3
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# `react-primitive`
|
||||
|
||||
This is an internal utility, not intended for public usage.
|
||||
52
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.d.mts
generated
vendored
Normal file
52
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.d.mts
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
import * as React from 'react';
|
||||
|
||||
declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul"];
|
||||
type Primitives = {
|
||||
[E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
|
||||
};
|
||||
type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
|
||||
asChild?: boolean;
|
||||
};
|
||||
interface PrimitiveForwardRefComponent<E extends React.ElementType> extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {
|
||||
}
|
||||
declare const Primitive: Primitives;
|
||||
/**
|
||||
* Flush custom event dispatch
|
||||
* https://github.com/radix-ui/primitives/pull/1378
|
||||
*
|
||||
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
||||
*
|
||||
* Internally, React prioritises events in the following order:
|
||||
* - discrete
|
||||
* - continuous
|
||||
* - default
|
||||
*
|
||||
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
||||
*
|
||||
* `discrete` is an important distinction as updates within these events are applied immediately.
|
||||
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
||||
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
||||
* dispatched by another `discrete` event.
|
||||
*
|
||||
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
||||
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
||||
* is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
||||
* For example:
|
||||
*
|
||||
* dispatching a known click 👎
|
||||
* target.dispatchEvent(new Event(‘click’))
|
||||
*
|
||||
* dispatching a custom type within a non-discrete event 👎
|
||||
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
||||
*
|
||||
* dispatching a custom type within a `discrete` event 👍
|
||||
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
||||
*
|
||||
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
||||
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
||||
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
||||
*/
|
||||
declare function dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E): void;
|
||||
declare const Root: Primitives;
|
||||
|
||||
export { Primitive, type PrimitivePropsWithRef, Root, dispatchDiscreteCustomEvent };
|
||||
52
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.d.ts
generated
vendored
Normal file
52
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
import * as React from 'react';
|
||||
|
||||
declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul"];
|
||||
type Primitives = {
|
||||
[E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
|
||||
};
|
||||
type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
|
||||
asChild?: boolean;
|
||||
};
|
||||
interface PrimitiveForwardRefComponent<E extends React.ElementType> extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {
|
||||
}
|
||||
declare const Primitive: Primitives;
|
||||
/**
|
||||
* Flush custom event dispatch
|
||||
* https://github.com/radix-ui/primitives/pull/1378
|
||||
*
|
||||
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
||||
*
|
||||
* Internally, React prioritises events in the following order:
|
||||
* - discrete
|
||||
* - continuous
|
||||
* - default
|
||||
*
|
||||
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
||||
*
|
||||
* `discrete` is an important distinction as updates within these events are applied immediately.
|
||||
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
||||
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
||||
* dispatched by another `discrete` event.
|
||||
*
|
||||
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
||||
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
||||
* is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
||||
* For example:
|
||||
*
|
||||
* dispatching a known click 👎
|
||||
* target.dispatchEvent(new Event(‘click’))
|
||||
*
|
||||
* dispatching a custom type within a non-discrete event 👎
|
||||
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
||||
*
|
||||
* dispatching a custom type within a `discrete` event 👍
|
||||
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
||||
*
|
||||
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
||||
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
||||
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
||||
*/
|
||||
declare function dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E): void;
|
||||
declare const Root: Primitives;
|
||||
|
||||
export { Primitive, type PrimitivePropsWithRef, Root, dispatchDiscreteCustomEvent };
|
||||
80
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js
generated
vendored
Normal file
80
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
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);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
Primitive: () => Primitive,
|
||||
Root: () => Root,
|
||||
dispatchDiscreteCustomEvent: () => dispatchDiscreteCustomEvent
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/primitive.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var ReactDOM = __toESM(require("react-dom"));
|
||||
var import_react_slot = require("@radix-ui/react-slot");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
var NODES = [
|
||||
"a",
|
||||
"button",
|
||||
"div",
|
||||
"form",
|
||||
"h2",
|
||||
"h3",
|
||||
"img",
|
||||
"input",
|
||||
"label",
|
||||
"li",
|
||||
"nav",
|
||||
"ol",
|
||||
"p",
|
||||
"select",
|
||||
"span",
|
||||
"svg",
|
||||
"ul"
|
||||
];
|
||||
var Primitive = NODES.reduce((primitive, node) => {
|
||||
const Slot = (0, import_react_slot.createSlot)(`Primitive.${node}`);
|
||||
const Node = React.forwardRef((props, forwardedRef) => {
|
||||
const { asChild, ...primitiveProps } = props;
|
||||
const Comp = asChild ? Slot : node;
|
||||
if (typeof window !== "undefined") {
|
||||
window[Symbol.for("radix-ui")] = true;
|
||||
}
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
||||
});
|
||||
Node.displayName = `Primitive.${node}`;
|
||||
return { ...primitive, [node]: Node };
|
||||
}, {});
|
||||
function dispatchDiscreteCustomEvent(target, event) {
|
||||
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
||||
}
|
||||
var Root = Primitive;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/index.ts", "../src/primitive.tsx"],
|
||||
"sourcesContent": ["export {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n} from './primitive';\nexport type { PrimitivePropsWithRef } from './primitive';\n", "import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n"],
|
||||
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,eAA0B;AAC1B,wBAA2B;AA4ChB;AA1CX,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAcA,IAAM,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAClD,QAAM,WAAO,8BAAW,aAAa,IAAI,EAAE;AAC3C,QAAM,OAAa,iBAAW,CAAC,OAA2C,iBAAsB;AAC9F,UAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AACvC,UAAM,OAAY,UAAU,OAAO;AAEnC,QAAI,OAAO,WAAW,aAAa;AACjC,MAAC,OAAe,OAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IAC5C;AAEA,WAAO,4CAAC,QAAM,GAAG,gBAAgB,KAAK,cAAc;AAAA,EACtD,CAAC;AAED,OAAK,cAAc,aAAa,IAAI;AAEpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAK;AACtC,GAAG,CAAC,CAAe;AA2CnB,SAAS,4BAAmD,QAAqB,OAAU;AACzF,MAAI,OAAQ,CAAS,mBAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;AAIA,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
47
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.mjs
generated
vendored
Normal file
47
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
// src/primitive.tsx
|
||||
import * as React from "react";
|
||||
import * as ReactDOM from "react-dom";
|
||||
import { createSlot } from "@radix-ui/react-slot";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var NODES = [
|
||||
"a",
|
||||
"button",
|
||||
"div",
|
||||
"form",
|
||||
"h2",
|
||||
"h3",
|
||||
"img",
|
||||
"input",
|
||||
"label",
|
||||
"li",
|
||||
"nav",
|
||||
"ol",
|
||||
"p",
|
||||
"select",
|
||||
"span",
|
||||
"svg",
|
||||
"ul"
|
||||
];
|
||||
var Primitive = NODES.reduce((primitive, node) => {
|
||||
const Slot = createSlot(`Primitive.${node}`);
|
||||
const Node = React.forwardRef((props, forwardedRef) => {
|
||||
const { asChild, ...primitiveProps } = props;
|
||||
const Comp = asChild ? Slot : node;
|
||||
if (typeof window !== "undefined") {
|
||||
window[Symbol.for("radix-ui")] = true;
|
||||
}
|
||||
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
||||
});
|
||||
Node.displayName = `Primitive.${node}`;
|
||||
return { ...primitive, [node]: Node };
|
||||
}, {});
|
||||
function dispatchDiscreteCustomEvent(target, event) {
|
||||
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
||||
}
|
||||
var Root = Primitive;
|
||||
export {
|
||||
Primitive,
|
||||
Root,
|
||||
dispatchDiscreteCustomEvent
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.mjs.map
generated
vendored
Normal file
7
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.mjs.map
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../src/primitive.tsx"],
|
||||
"sourcesContent": ["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { createSlot } from '@radix-ui/react-slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'select',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype Primitives = { [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E> };\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ninterface PrimitiveForwardRefComponent<E extends React.ElementType>\n extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}\n\n/* -------------------------------------------------------------------------------------------------\n * Primitive\n * -----------------------------------------------------------------------------------------------*/\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {\n const { asChild, ...primitiveProps } = props;\n const Comp: any = asChild ? Slot : node;\n\n if (typeof window !== 'undefined') {\n (window as any)[Symbol.for('radix-ui')] = true;\n }\n\n return <Comp {...primitiveProps} ref={forwardedRef} />;\n });\n\n Node.displayName = `Primitive.${node}`;\n\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Flush custom event dispatch\n * https://github.com/radix-ui/primitives/pull/1378\n *\n * React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.\n *\n * Internally, React prioritises events in the following order:\n * - discrete\n * - continuous\n * - default\n *\n * https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350\n *\n * `discrete` is an important distinction as updates within these events are applied immediately.\n * React however, is not able to infer the priority of custom event types due to how they are detected internally.\n * Because of this, it's possible for updates from custom events to be unexpectedly batched when\n * dispatched by another `discrete` event.\n *\n * In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.\n * This utility should be used when dispatching a custom event from within another `discrete` event, this utility\n * is not necessary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.\n * For example:\n *\n * dispatching a known click \uD83D\uDC4E\n * target.dispatchEvent(new Event(\u2018click\u2019))\n *\n * dispatching a custom type within a non-discrete event \uD83D\uDC4E\n * onScroll={(event) => event.target.dispatchEvent(new CustomEvent(\u2018customType\u2019))}\n *\n * dispatching a custom type within a `discrete` event \uD83D\uDC4D\n * onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(\u2018customType\u2019))}\n *\n * Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use\n * this utility with them. This is because it's possible for those handlers to be called implicitly during render\n * e.g. when focus is within a component as it is unmounted, or when managing focus on mount.\n */\n\nfunction dispatchDiscreteCustomEvent<E extends CustomEvent>(target: E['target'], event: E) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Primitive;\n\nexport {\n Primitive,\n //\n Root,\n //\n dispatchDiscreteCustomEvent,\n};\nexport type { PrimitivePropsWithRef };\n"],
|
||||
"mappings": ";AAAA,YAAY,WAAW;AACvB,YAAY,cAAc;AAC1B,SAAS,kBAAkB;AA4ChB;AA1CX,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAcA,IAAM,YAAY,MAAM,OAAO,CAAC,WAAW,SAAS;AAClD,QAAM,OAAO,WAAW,aAAa,IAAI,EAAE;AAC3C,QAAM,OAAa,iBAAW,CAAC,OAA2C,iBAAsB;AAC9F,UAAM,EAAE,SAAS,GAAG,eAAe,IAAI;AACvC,UAAM,OAAY,UAAU,OAAO;AAEnC,QAAI,OAAO,WAAW,aAAa;AACjC,MAAC,OAAe,OAAO,IAAI,UAAU,CAAC,IAAI;AAAA,IAC5C;AAEA,WAAO,oBAAC,QAAM,GAAG,gBAAgB,KAAK,cAAc;AAAA,EACtD,CAAC;AAED,OAAK,cAAc,aAAa,IAAI;AAEpC,SAAO,EAAE,GAAG,WAAW,CAAC,IAAI,GAAG,KAAK;AACtC,GAAG,CAAC,CAAe;AA2CnB,SAAS,4BAAmD,QAAqB,OAAU;AACzF,MAAI,OAAQ,CAAS,mBAAU,MAAM,OAAO,cAAc,KAAK,CAAC;AAClE;AAIA,IAAM,OAAO;",
|
||||
"names": []
|
||||
}
|
||||
69
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/package.json
generated
vendored
Normal file
69
frontend/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/package.json
generated
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
"name": "@radix-ui/react-primitive",
|
||||
"version": "2.1.4",
|
||||
"license": "MIT",
|
||||
"source": "./src/index.ts",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md"
|
||||
],
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@radix-ui/react-slot": "1.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.2.2",
|
||||
"@types/react-dom": "^19.2.2",
|
||||
"eslint": "^9.38.0",
|
||||
"react": "^19.2.0",
|
||||
"react-dom": "^19.2.0",
|
||||
"typescript": "^5.9.3",
|
||||
"@repo/builder": "0.0.0",
|
||||
"@repo/eslint-config": "0.0.0",
|
||||
"@repo/typescript-config": "0.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*",
|
||||
"@types/react-dom": "*",
|
||||
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react-dom": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://radix-ui.com/primitives",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/radix-ui/primitives.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/radix-ui/primitives/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --max-warnings 0 src",
|
||||
"clean": "rm -rf dist",
|
||||
"reset": "rm -rf dist node_modules",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "radix-build"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user