@szum-tech/design-system
Version:
Szum-Tech design system with tailwindcss support
1 lines • 3.36 kB
JavaScript
import {a}from'./chunk-JUNHRB4B.js';import {Dialog}from'radix-ui';import {jsx,jsxs}from'react/jsx-runtime';import {XIcon}from'lucide-react';import {cva}from'class-variance-authority';function D(t){return jsx(Dialog.Root,{"data-slot":"sheet",...t})}function k(t){return jsx(Dialog.Trigger,{"data-slot":"sheet-trigger",...t})}function B(t){return jsx(Dialog.Close,{"data-slot":"sheet-close",...t})}var s=cva(["bg-background text-sm data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed z-50 flex flex-col gap-4 bg-clip-padding shadow-lg transition duration-200 ease-in-out","data-[state=open]:slide-in data-[state=closed]:slide-out"],{variants:{side:{top:["data-[side=top]:data-[state=open]:slide-in-from-top-10","data-[side=top]:data-[state=closed]:slide-out-to-top-10","data-[side=top]:inset-x-0","data-[side=top]:top-0","data-[side=top]:h-auto","data-[side=top]:border-b","data-[side=top]:max-h-[90vh]"],right:["data-[side=right]:data-[state=open]:slide-in-from-right-10","data-[side=right]:data-[state=closed]:slide-out-to-right-10","data-[side=right]:inset-y-0","data-[side=right]:right-0","data-[side=right]:h-full","data-[side=right]:border-l","data-[side=right]:w-3/4","data-[side=right]:sm:max-w-sm"],bottom:["data-[side=bottom]:data-[state=open]:slide-in-from-bottom-10","data-[side=bottom]:data-[state=closed]:slide-out-to-bottom-10","data-[side=bottom]:inset-x-0","data-[side=bottom]:bottom-0","data-[side=bottom]:h-auto","data-[side=bottom]:border-t","data-[side=bottom]:max-h-[90vh]"],left:["data-[side=left]:data-[state=open]:slide-in-from-left-10","data-[side=left]:data-[state=closed]:slide-out-to-left-10","data-[side=left]:inset-y-0","data-[side=left]:left-0","data-[side=left]:h-full","data-[side=left]:border-r","data-[side=left]:w-3/4","data-[side=left]:sm:max-w-sm"]}},defaultVariants:{side:"right"}});function J({side:t="right",showCloseButton:o=true,className:d,children:p,...n}){return jsxs(Dialog.Portal,{"data-slot":"sheet-portal",children:[jsx(Dialog.Overlay,{"data-slot":"sheet-overlay",className:"data-[state=open]:animate-in data-[state=closed]:animate-out [state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs"}),jsxs(Dialog.Content,{"data-slot":"sheet-content","data-side":t,className:a(s({side:t}),d),...n,children:[p,o?jsxs(Dialog.Close,{"data-slot":"sheet-close",className:"focus:ring-ring focus:ring-offset-background absolute top-3 right-3 rounded opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[jsx(XIcon,{}),jsx("span",{className:"sr-only",children:"Close"})]}):null]})]})}function Q({className:t,...o}){return jsx("div",{"data-slot":"sheet-header",className:a("flex flex-col gap-0.5 p-4",t),...o})}function Z({className:t,...o}){return jsx("div",{"data-slot":"sheet-footer",className:a("mt-auto flex flex-col gap-2 p-4",t),...o})}function et({className:t,...o}){return jsx(Dialog.Title,{"data-slot":"sheet-title",className:a("text-foreground text-base font-medium",t),...o})}function st({className:t,...o}){return jsx(Dialog.Description,{"data-slot":"sheet-description",className:a("text-muted-foreground text-sm",t),...o})}export{D as a,k as b,B as c,J as d,Q as e,Z as f,et as g,st as h};