UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

2 lines (1 loc) 1.78 kB
"use strict";const o=require("react/jsx-runtime"),l=require("./index-DwV9MiDB.js"),x=require("./utils/tailwind.cjs"),d=require("./x-DFpTDUiL.js"),t=require("./index-C_tT7b8f.js"),D=t.Root,m=t.Trigger,n=t.Portal,f=t.Close,r=({className:e,...s})=>o.jsxs(t.Close,{className:l.cn("focus-ring absolute top-4 right-4 opacity-70 transition hover:opacity-100 disabled:pointer-events-none",e),...s,children:[o.jsx(d.X,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]}),c=({className:e,...s})=>o.jsx(t.Overlay,{className:l.cn("animate-entrance-fade fixed inset-0 z-50 bg-black/20",e),"data-testid":"dialogOverlay",...s}),g=({size:e="lg",className:s,children:a,...i})=>o.jsx(t.Content,{className:l.cn("animate-entrance-fade-zoom bg-surface fixed top-[50%] left-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg",e&&x.sizeToMaxWidthRecord[e],s),...i,children:a}),u=({className:e,children:s,size:a,...i})=>o.jsxs(n,{children:[o.jsx(c,{}),o.jsxs(g,{className:e,size:a,...i,children:[s,o.jsx(r,{})]})]}),j=({className:e,...s})=>o.jsx("div",{className:l.cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...s}),p=({className:e,...s})=>o.jsx("div",{className:l.cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...s}),C=({className:e,...s})=>o.jsx(t.Title,{className:l.cn("text-lg font-semibold",e),...s}),y=({className:e,...s})=>o.jsx(t.Description,{className:l.cn("text-muted-foreground text-sm",e),...s});exports.Dialog=D;exports.DialogClose=f;exports.DialogCloseX=r;exports.DialogContent=u;exports.DialogContentElement=g;exports.DialogDescription=y;exports.DialogFooter=p;exports.DialogHeader=j;exports.DialogOverlay=c;exports.DialogPortal=n;exports.DialogTitle=C;exports.DialogTrigger=m;