laif-ds
Version:
Design System di Laif con componenti React basati su principi di Atomic Design
121 lines (120 loc) • 3.15 kB
JavaScript
"use client";
import { jsx as e, jsxs as r } from "react/jsx-runtime";
import { Root as n, Trigger as i, Content as s, Title as d, Description as c, Action as g, Cancel as u, Portal as f, Overlay as m } from "../../node_modules/@radix-ui/react-alert-dialog/dist/index.js";
import { cn as o } from "../../lib/utils.js";
import { buttonVariants as l } from "./button.js";
function N({ ...t }) {
return /* @__PURE__ */ e(n, { "data-slot": "alert-dialog", ...t });
}
function y({ ...t }) {
return /* @__PURE__ */ e(i, { "data-slot": "alert-dialog-trigger", ...t });
}
function p({ ...t }) {
return /* @__PURE__ */ e(f, { "data-slot": "alert-dialog-portal", ...t });
}
function x({ className: t, ...a }) {
return /* @__PURE__ */ e(
m,
{
"data-slot": "alert-dialog-overlay",
className: o(
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
t
),
...a
}
);
}
function T({ className: t, ...a }) {
return /* @__PURE__ */ r(p, { children: [
/* @__PURE__ */ e(x, {}),
/* @__PURE__ */ e(
s,
{
"data-slot": "alert-dialog-content",
className: o(
"bg-d-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-d-border fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
t
),
...a
}
)
] });
}
function w({ className: t, ...a }) {
return /* @__PURE__ */ e(
"div",
{
"data-slot": "alert-dialog-header",
className: o("flex flex-col gap-2 text-center sm:text-left", t),
...a
}
);
}
function C({ className: t, ...a }) {
return /* @__PURE__ */ e(
"div",
{
"data-slot": "alert-dialog-footer",
className: o(
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
t
),
...a
}
);
}
function z({ className: t, ...a }) {
return /* @__PURE__ */ e(
d,
{
"data-slot": "alert-dialog-title",
className: o("text-lg font-semibold", t),
...a
}
);
}
function h({
className: t,
...a
}) {
return /* @__PURE__ */ e(
c,
{
"data-slot": "alert-dialog-description",
className: o("text-d-secondary-foreground text-sm", t),
...a
}
);
}
function j({ className: t, ...a }) {
return /* @__PURE__ */ e(
g,
{
className: o(l(), t),
...a
}
);
}
function O({ className: t, ...a }) {
return /* @__PURE__ */ e(
u,
{
className: o(l({ variant: "outline" }), t),
...a
}
);
}
export {
N as AlertDialog,
j as AlertDialogAction,
O as AlertDialogCancel,
T as AlertDialogContent,
h as AlertDialogDescription,
C as AlertDialogFooter,
w as AlertDialogHeader,
x as AlertDialogOverlay,
p as AlertDialogPortal,
z as AlertDialogTitle,
y as AlertDialogTrigger
};