UNPKG

dgz-ui

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript

106 lines (105 loc) 3.14 kB
import { jsxs as l, jsx as t } from "react/jsx-runtime"; import { R as x, C as n, P as y, T as N, a as d, D as r, O as c, b as m } from "./index-xl-szYFX.es.js"; import * as i from "react"; import { useTranslation as D } from "react-i18next"; import { c as s } from "./utils-CnvKSirc.es.js"; import { X as b } from "./x-8d8XBbXN.es.js"; const F = x, H = N, h = y, X = n, f = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t( c, { ref: o, className: s( "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/80", a ), ...e } )); f.displayName = c.displayName; const w = i.forwardRef(({ className: a, children: e, hasCloseButton: o, ...p }, g) => { const { t: u } = D(); return /* @__PURE__ */ l(h, { children: [ /* @__PURE__ */ t(f, {}), /* @__PURE__ */ l( d, { ref: g, className: s( "bg-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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg", a ), ...p, children: [ e, o && /* @__PURE__ */ l(n, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none", children: [ /* @__PURE__ */ t(b, { className: "size-4" }), /* @__PURE__ */ t("span", { className: "sr-only", children: u("Close") }) ] }) ] } ) ] }); }); w.displayName = d.displayName; const v = ({ className: a, ...e }) => /* @__PURE__ */ t( "div", { className: s( "flex flex-col space-y-1.5 text-center sm:text-left", a ), ...e } ); v.displayName = "DialogHeader"; const C = ({ className: a, ...e }) => /* @__PURE__ */ t( "div", { className: s( "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", a ), ...e } ); C.displayName = "DialogFooter"; const R = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t( m, { ref: o, className: s( "text-lg leading-none font-semibold tracking-tight", a ), ...e } )); R.displayName = m.displayName; const T = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t( r, { ref: o, className: s("text-muted-foreground text-sm", a), ...e } )); T.displayName = r.displayName; export { F as D, X as a, w as b, T as c, C as d, v as e, f, h as g, R as h, H as i }; //# sourceMappingURL=dialog-D9BMBoAJ.es.js.map