v1.0 with SW PWA enabled
This commit is contained in:
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
Reference in New Issue
Block a user