dgz-ui
Version:
Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript
3 lines (2 loc) • 2.98 kB
JavaScript
;const e=require("react/jsx-runtime"),s=require("./index-CtCzh8NB.cjs.js");require("react");const l=require("react-i18next"),o=require("./utils-C4d7Ql9-.cjs.js"),d=require("./x-Ev63aQi_.cjs.js");function c({...t}){return e.jsx(s.Root,{"data-slot":"sheet",...t})}function u({...t}){return e.jsx(s.Trigger,{"data-slot":"sheet-trigger",...t})}function h({...t}){return e.jsx(s.Close,{"data-slot":"sheet-close",...t})}function f({...t}){return e.jsx(s.Portal,{"data-slot":"sheet-portal",...t})}function x({className:t,...a}){return e.jsx(s.Overlay,{"data-slot":"sheet-overlay",className:o.cn("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 m({className:t,children:a,side:n="right",...r}){const{t:i}=l.useTranslation();return e.jsxs(f,{children:[e.jsx(x,{}),e.jsxs(s.Content,{"data-slot":"sheet-content",className:o.cn("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",n==="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",n==="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",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="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),...r,children:[a,e.jsxs(s.Close,{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:[e.jsx(d.X,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:i("Close")})]})]})]})}function p({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-header",className:o.cn("flex flex-col gap-1.5 p-4",t),...a})}function g({className:t,...a}){return e.jsx("div",{"data-slot":"sheet-footer",className:o.cn("mt-auto flex flex-col gap-2 p-4",t),...a})}function S({className:t,...a}){return e.jsx(s.Title,{"data-slot":"sheet-title",className:o.cn("font-semibold text-neutral-950 dark:text-neutral-50",t),...a})}function b({className:t,...a}){return e.jsx(s.Description,{"data-slot":"sheet-description",className:o.cn("text-sm text-neutral-500 dark:text-neutral-400",t),...a})}exports.Sheet=c;exports.SheetClose=h;exports.SheetContent=m;exports.SheetDescription=b;exports.SheetFooter=g;exports.SheetHeader=p;exports.SheetTitle=S;exports.SheetTrigger=u;
//# sourceMappingURL=sheet-BL1AP0aU.cjs.js.map