PageSourceSearch

https://www.zadikim.net/assets/alert-dialog-CBPW0EiY.js

js zadikim.net collected 2026-10-02 14:20:03 UTC 4,819 bytes, 7 lines download raw bytes

1import{W as e,t,z as n}from"./jsx-runtime-AI795Xzu.js";import{B as r,_ as i,d as a,f as o,g as s,h as c,m as l,p as u,u as d,v as f,y as p,z as ee}from"./AuthModal-P3vXiX16.js";import{c as m,r as h,u as g}from"./input-DF7630gq.js";import{n as _}from"./utils-eM1IDTos.js";var v=e(n(),1),y=t(),b=`AlertDialog`,[te,ne]=ee(b,[p]),x=p(),S=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,y.jsx)(c,{...r,...n,modal:!0})};S.displayName=b;var re=`AlertDialogTrigger`,C=v.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,a=x(n);return(0,y.jsx)(i,{...a,...r,ref:t})});C.displayName=re;var w=`AlertDialogPortal`,T=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,y.jsx)(l,{...r,...n})};T.displayName=w;var E=`AlertDialogOverlay`,D=v.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,y.jsx)(u,{...i,...r,ref:t})});D.displayName=E;var O=`AlertDialogContent`,[ie,k]=te(O),A=v.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:i,...o}=e,s=x(n),c=v.useRef(null),l=g(t,c),u=v.useRef(null);return(0,y.jsx)(f,{contentName:O,titleName:j,docsSlug:`alert-dialog`,children:(0,y.jsx)(ie,{scope:n,cancelRef:u,children:(0,y.jsxs)(a,{role:`alertdialog`,...s,...o,ref:l,onOpenAutoFocus:r(o.onOpenAutoFocus,e=>{e.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,y.jsx)(m,{children:i}),(0,y.jsx)(oe,{contentRef:c})]})})})});A.displayName=O;var j=`AlertDialogTitle`,M=v.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,y.jsx)(s,{...i,...r,ref:t})});M.displayName=j;var N=`AlertDialogDescription`,P=v.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,y.jsx)(o,{...i,...r,ref:t})});P.displayName=N;var ae=`AlertDialogAction`,F=v.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,y.jsx)(d,{...i,...r,ref:t})});F.displayName=ae;var I=`AlertDialogCancel`,L=v.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=k(I,n),a=x(n),o=g(t,i);return(0,y.jsx)(d,{...a,...r,ref:o})});L.displayName=I;var oe=({contentRef:e})=>{let t=`\`${O}\` requires a description for the component to be accessible for screen reader users.
2
3You can add a description to the \`${O}\` by passing a \`${N}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
5Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${O}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
7For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},se=S,ce=C,R=T,z=D,B=A,V=F,H=L,U=M,W=P,G=se,le=ce,ue=R,K=v.forwardRef(({className:e,...t},n)=>(0,y.jsx)(z,{className:_(`fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));K.displayName=z.displayName;var q=v.forwardRef(({className:e,...t},n)=>(0,y.jsxs)(ue,{children:[(0,y.jsx)(K,{}),(0,y.jsx)(B,{ref:n,className:_(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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%] sm:rounded-lg`,e),...t})]}));q.displayName=B.displayName;var J=({className:e,...t})=>(0,y.jsx)(`div`,{className:_(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});J.displayName=`AlertDialogHeader`;var Y=({className:e,...t})=>(0,y.jsx)(`div`,{className:_(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Y.displayName=`AlertDialogFooter`;var X=v.forwardRef(({className:e,...t},n)=>(0,y.jsx)(U,{ref:n,className:_(`text-lg font-semibold`,e),...t}));X.displayName=U.displayName;var Z=v.forwardRef(({className:e,...t},n)=>(0,y.jsx)(W,{ref:n,className:_(`text-sm text-muted-foreground`,e),...t}));Z.displayName=W.displayName;var Q=v.forwardRef(({className:e,...t},n)=>(0,y.jsx)(V,{ref:n,className:_(h(),e),...t}));Q.displayName=V.displayName;var $=v.forwardRef(({className:e,...t},n)=>(0,y.jsx)(H,{ref:n,className:_(h({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));$.displayName=H.displayName;export{Z as a,X as c,q as i,le as l,Q as n,Y as o,$ as r,J as s,G as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.