UNPKG

dgz-ui

Version:

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

101 lines (100 loc) 2.97 kB
import { j as t } from "./jsx-runtime-C5mzlN2N.js"; import * as i from "react"; import { R as p, P as g, C as l, T as x, O as n, a as d, b as r, D as c } from "./index-sde7W6lA.js"; import { c as o } from "./utils-B6fNqzRf.js"; import { X as u } from "./x-DOq_pA7G.js"; const T = p, k = x, y = g, z = l, m = i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx( n, { ref: s, 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/80", a ), ...e } )); m.displayName = n.displayName; const N = i.forwardRef(({ className: a, children: e, ...s }, f) => /* @__PURE__ */ t.jsxs(y, { children: [ /* @__PURE__ */ t.jsx(m, {}), /* @__PURE__ */ t.jsxs( d, { ref: f, className: o( "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 ), ...s, children: [ e, /* @__PURE__ */ t.jsxs(l, { 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.jsx(u, { className: "h-4 w-4" }), /* @__PURE__ */ t.jsx("span", { className: "sr-only", children: "Close" }) ] }) ] } ) ] })); N.displayName = d.displayName; const D = ({ className: a, ...e }) => /* @__PURE__ */ t.jsx( "div", { className: o( "flex flex-col space-y-1.5 text-center sm:text-left", a ), ...e } ); D.displayName = "DialogHeader"; const j = ({ className: a, ...e }) => /* @__PURE__ */ t.jsx( "div", { className: o( "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", a ), ...e } ); j.displayName = "DialogFooter"; const b = i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx( r, { ref: s, className: o( "text-lg leading-none font-semibold tracking-tight", a ), ...e } )); b.displayName = r.displayName; const h = i.forwardRef(({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx( c, { ref: s, className: o("text-muted-foreground text-sm", a), ...e } )); h.displayName = c.displayName; export { T as D, y as a, m as b, z as c, k as d, N as e, D as f, j as g, b as h, h as i };