PageSourceSearch

https://babki.app/build/assets/DialogTitle-D7Fo6kfP.js

js babki.app collected 2026-10-02 00:26:09 UTC 6,875 bytes, 1 lines download raw bytes

1import{g as b,u as q}from"./useEmitAsProps-D6ce1N3B.js";import{a as A,u as y}from"./useForwardExpose-CA5ZRFK5.js";import{b as E,D as M,F as R,a as $,P as F,u as h,T as k}from"./Teleport-BybCPSjg.js";import{g as T}from"./utils-be5WrVg2.js";import{f as g,T as K,O as v,k as e,v as O,y as N,o as c,p as _,j as d,i as I,P as m,n as V,U as S,V as L}from"./index-D9grhoKh.js";import{P as B}from"./Primitive-DeyDPfYZ.js";import{c as j}from"./createContext-CInMwZ4Y.js";const[D,U]=j("DialogRoot");var z=g({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(u,{emit:l}){const o=u,t=A(o,"open",l,{defaultValue:o.defaultOpen,passive:o.open===void 0}),f=O(),p=O(),{modal:n}=K(o);return U({open:t,modal:n,openModal:()=>{t.value=!0},onOpenChange:r=>{t.value=r},onOpenToggle:()=>{t.value=!t.value},contentId:"",titleId:"",descriptionId:"",triggerElement:f,contentElement:p}),(r,a)=>v(r.$slots,"default",{open:e(t),close:()=>t.value=!1})}}),pe=z,H=g({__name:"DialogContentImpl",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(u,{emit:l}){const o=u,s=l,t=D(),{forwardRef:f,currentElement:p}=y();return t.titleId||=E(void 0,"reka-dialog-title"),t.descriptionId||=E(void 0,"reka-dialog-description"),N(()=>{t.contentElement=p,b()!==document.body&&(t.triggerElement.value=b())}),(n,r)=>(c(),_(e(R),{"as-child":"",loop:"",trapped:o.trapFocus,onMountAutoFocus:r[5]||(r[5]=a=>s("openAutoFocus",a)),onUnmountAutoFocus:r[6]||(r[6]=a=>s("closeAutoFocus",a))},{default:d(()=>[I(e(M),m({id:e(t).contentId,ref:e(f),as:n.as,"as-child":n.asChild,"disable-outside-pointer-events":n.disableOutsidePointerEvents,role:"dialog","aria-describedby":e(t).descriptionId,"aria-labelledby":e(t).titleId,"data-state":e(T)(e(t).open.value)},n.$attrs,{onDismiss:r[0]||(r[0]=a=>e(t).onOpenChange(!1)),onEscapeKeyDown:r[1]||(r[1]=a=>s("escapeKeyDown",a)),onFocusOutside:r[2]||(r[2]=a=>s("focusOutside",a)),onInteractOutside:r[3]||(r[3]=a=>s("interactOutside",a)),onPointerDownOutside:r[4]||(r[4]=a=>s("pointerDownOutside",a))}),{default:d(()=>[v(n.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),w=H,x=g({__name:"DialogContentModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(u,{emit:l}){const o=u,s=l,t=D(),f=q(s),{forwardRef:p,currentElement:n}=y();return $(n),(r,a)=>(c(),_(w,m({...o,...e(f)},{ref:e(p),"trap-focus":e(t).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:a[0]||(a[0]=i=>{i.defaultPrevented||(i.preventDefault(),e(t).triggerElement.value?.focus())}),onPointerDownOutside:a[1]||(a[1]=i=>{const C=i.detail.originalEvent,P=C.button===0&&C.ctrlKey===!0;(C.button===2||P)&&i.preventDefault()}),onFocusOutside:a[2]||(a[2]=i=>{i.preventDefault()})}),{default:d(()=>[v(r.$slots,"default")]),_:3},16,["trap-focus"]))}}),G=x,J=g({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(u,{emit:l}){const o=u,t=q(l);y();const f=D(),p=O(!1),n=O(!1);return(r,a)=>(c(),_(w,m({...o,...e(t)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:a[0]||(a[0]=i=>{i.defaultPrevented||(p.value||e(f).triggerElement.value?.focus(),i.preventDefault()),p.value=!1,n.value=!1}),onInteractOutside:a[1]||(a[1]=i=>{i.defaultPrevented||(p.value=!0,i.detail.originalEvent.type==="pointerdown"&&(n.value=!0));const C=i.target;e(f).triggerElement.value?.contains(C)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&n.value&&i.preventDefault()})}),{default:d(()=>[v(r.$slots,"default")]),_:3},16))}}),Q=J,W=g({__name:"DialogContent",props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(u,{emit:l}){const o=u,s=l,t=D(),f=q(s),{forwardRef:p}=y();return(n,r)=>(c(),_(e(F),{present:n.forceMount||e(t).open.value},{default:d(()=>[e(t).modal.value?(c(),_(G,m({key:0,ref:e(p)},{...o,...e(f),...n.$attrs}),{default:d(()=>[v(n.$slots,"default")]),_:3},16)):(c(),_(Q,m({key:1,ref:e(p)},{...o,...e(f),...n.$attrs}),{default:d(()=>[v(n.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),fe=W,X=g({__name:"DialogDescription",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"p"}},setup(u){const l=u;y();const o=D();return(s,t)=>(c(),_(e(B),m(l,{id:e(o).descriptionId}),{default:d(()=>[v(s.$slots,"default")]),_:3},16,["id"]))}}),ce=X,Y=g({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const l=D();return h(!0),y(),(o,s)=>(c(),_(e(B),{as:o.as,"as-child":o.asChild,"data-state":e(l).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:d(()=>[v(o.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Z=Y,ee=g({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(u){const l=D(),{forwardRef:o}=y();return(s,t)=>e(l)?.modal.value?(c(),_(e(F),{key:0,present:s.forceMount||e(l).open.value},{default:d(()=>[I(Z,m(s.$attrs,{ref:e(o),as:s.as,"as-child":s.asChild}),{default:d(()=>[v(s.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):V("v-if",!0)}}),_e=ee,te=g({__name:"DialogPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(u){const l=u;return(o,s)=>(c(),_(e(k),S(L(l)),{default:d(()=>[v(o.$slots,"default")]),_:3},16))}}
1),ve=te,oe=g({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(u){const l=u,o=D();return y(),(s,t)=>(c(),_(e(B),m(l,{id:e(o).titleId}),{default:d(()=>[v(s.$slots,"default")]),_:3},16,["id"]))}}),ge=oe;export{ve as D,_e as a,fe as b,ge as c,ce as d,pe as e,D as i};

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.