UNPKG

dgz-ui

Version:

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

137 lines (136 loc) 3.79 kB
import { jsx as e, jsxs as n } from "react/jsx-runtime"; import { R as d, C as r, a as u, D as c, b as f, T as m, P as h, O as p } from "./index-xl-szYFX.es.js"; import "react"; import { useTranslation as g } from "react-i18next"; import { c as o } from "./utils-CnvKSirc.es.js"; import { X as x } from "./x-8d8XBbXN.es.js"; function T({ ...t }) { return /* @__PURE__ */ e(d, { "data-slot": "sheet", ...t }); } function z({ ...t }) { return /* @__PURE__ */ e(m, { "data-slot": "sheet-trigger", ...t }); } function D({ ...t }) { return /* @__PURE__ */ e(r, { "data-slot": "sheet-close", ...t }); } function b({ ...t }) { return /* @__PURE__ */ e(h, { "data-slot": "sheet-portal", ...t }); } function S({ className: t, ...a }) { return /* @__PURE__ */ e( p, { "data-slot": "sheet-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/80", t ), ...a } ); } function O({ className: t, children: a, side: s = "right", ...i }) { const { t: l } = g(); return /* @__PURE__ */ n(b, { children: [ /* @__PURE__ */ e(S, {}), /* @__PURE__ */ n( u, { "data-slot": "sheet-content", className: o( "data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", s === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", s === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", s === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", s === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", t ), ...i, children: [ a, /* @__PURE__ */ n(r, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-neutral-100 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800", children: [ /* @__PURE__ */ e(x, { className: "size-4" }), /* @__PURE__ */ e("span", { className: "sr-only", children: l("Close") }) ] }) ] } ) ] }); } function P({ className: t, ...a }) { return /* @__PURE__ */ e( "div", { "data-slot": "sheet-header", className: o("flex flex-col gap-1.5 p-4", t), ...a } ); } function j({ className: t, ...a }) { return /* @__PURE__ */ e( "div", { "data-slot": "sheet-footer", className: o("mt-auto flex flex-col gap-2 p-4", t), ...a } ); } function R({ className: t, ...a }) { return /* @__PURE__ */ e( f, { "data-slot": "sheet-title", className: o( "font-semibold text-neutral-950 dark:text-neutral-50", t ), ...a } ); } function F({ className: t, ...a }) { return /* @__PURE__ */ e( c, { "data-slot": "sheet-description", className: o( "text-sm text-neutral-500 dark:text-neutral-400", t ), ...a } ); } export { T as S, D as a, O as b, F as c, j as d, P as e, R as f, z as g }; //# sourceMappingURL=sheet-CKsRhiVy.es.js.map