boottent-design 0.1.152 → 0.1.154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,4 +8,4 @@ You can add a description to the \`${$}\` by passing a \`${bt}\` component as a
8
8
 
9
9
  Alternatively, 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 \`${$}\`. 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.
10
10
 
11
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{var s;document.getElementById((s=e.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Ho=vt,zo=ht,Wo=yt,Ct=wt,jt=Tt,_t=At,St=Pt,Ot=Et,It=Nt;const Ne=Ho,Uo=zo,Ft=Wo,Ae=i.forwardRef(({className:e,...t},o)=>r.jsx(Ct,{className:a.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/60",e),...t,ref:o}));Ae.displayName=Ct.displayName;const Ko={sm:"max-w-[344px]",md:"max-w-[500px]",lg:"max-w-[640px]",fit:"max-w-fit"},ee=i.forwardRef(({className:e,size:t="sm",...o},s)=>r.jsxs(Ft,{children:[r.jsx(Ae,{}),r.jsx(jt,{ref:s,className:a.cn("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%] bg-background fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-2 rounded-lg border p-4 shadow-lg duration-200",Ko[t],e),...o})]}));ee.displayName=jt.displayName;const te=({className:e,...t})=>r.jsx("div",{className:a.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});te.displayName="AlertDialogHeader";const oe=({className:e,...t})=>r.jsx("div",{className:a.cn("flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",e),...t});oe.displayName="AlertDialogFooter";const se=i.forwardRef(({className:e,...t},o)=>r.jsx(Ot,{ref:o,className:a.cn("whitespace-pre-wrap text-base font-semibold",e),...t}));se.displayName=Ot.displayName;const U=i.forwardRef(({className:e,...t},o)=>r.jsx(It,{ref:o,className:a.cn("text-grey-600 whitespace-pre-wrap text-xs font-normal",e),...t}));U.displayName=It.displayName;const re=i.forwardRef(({className:e,...t},o)=>r.jsx(_t,{ref:o,className:a.cn(a.buttonVariants({size:"sm"}),e),...t}));re.displayName=_t.displayName;const J=i.forwardRef(({className:e,...t},o)=>r.jsx(St,{ref:o,className:a.cn(a.buttonVariants({variant:"outline",size:"sm",theme:"secondary"}),"mt-2 w-1/2 sm:mt-0",e),...t}));J.displayName=St.displayName;const qo=({title:e="알림",description:t,confirmText:o="확인",onConfirm:s,size:n="sm",onClose:l,theme:d="primary"})=>r.jsx(Ne,{open:!0,onOpenChange:u=>{!u&&l&&l()},children:r.jsxs(ee,{size:n,className:"gap-4",children:[r.jsxs(te,{children:[r.jsx(se,{children:e}),r.jsx(U,{className:"text-sm",children:t})]}),r.jsx(oe,{children:r.jsx(re,{className:a.cn(a.buttonVariants({theme:d,size:"sm"}),"w-full font-normal"),onClick:()=>{s&&s()},children:o})})]})}),Mt=ft,Bo=mt,$t=gt,kt=be,Re=i.forwardRef(({className:e,...t},o)=>r.jsx(we,{ref:o,className:a.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/50",e),...t}));Re.displayName=we.displayName;const Pe=i.forwardRef(({className:e,children:t,...o},s)=>r.jsxs($t,{children:[r.jsx(Re,{}),r.jsx(Te,{ref:s,className:a.cn("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%] fixed left-[50%] top-[50%] z-50 grid w-auto translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200",e),...o,children:t})]}));Pe.displayName=Te.displayName;const Ce=({className:e,...t})=>r.jsx("div",{className:a.cn("flex flex-col text-left md:text-center",e),...t});Ce.displayName="DialogHeader";const je=({className:e,...t})=>r.jsx("div",{className:a.cn("flex items-center gap-2",e),...t});je.displayName="DialogFooter";const _e=i.forwardRef(({className:e,...t},o)=>r.jsx(De,{ref:o,className:a.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));_e.displayName=De.displayName;const Se=i.forwardRef(({className:e,...t},o)=>r.jsx(Ee,{ref:o,className:a.cn("text-sm text-muted",e),...t}));Se.displayName=Ee.displayName;const Go=W.forwardRef(({id:e,title:t,description:o,onClose:s,content:n,className:l,open:d,onOpenChange:u,footer:p,...c},g)=>r.jsx(Mt,{open:!0,onOpenChange:x=>{!x&&s&&s()},children:r.jsxs(Pe,{ref:g,className:a.cn("flex flex-col gap-0 px-0 py-0",l),...c,children:[r.jsxs(Ce,{className:"sticky left-0 right-0 top-0 z-50 border-b border-b-border bg-white",children:[r.jsx(_e,{className:"flex h-[57px] w-full items-center justify-start px-5 md:h-[65px] md:justify-center md:px-[30px]",children:t}),r.jsxs(kt,{className:"absolute right-4 top-5 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground md:right-[30px] md:top-[25px]",children:[r.jsx(a.Icon.Cancel,{size:"16"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]}),o&&r.jsx(Se,{children:o}),n&&r.jsx(r.Fragment,{children:n}),p&&r.jsx(je,{children:p})]})})),Yo=i.forwardRef(({title:e,description:t,subDescription:o,contents:s,onConfirm:n,confirmText:l="확인",cancelText:d="취소",size:u="sm",className:p,onClose:c,theme:g="primary",...x},P)=>r.jsx(Ne,{open:!0,onOpenChange:A=>{!A&&c&&c()},children:r.jsxs(ee,{size:u,className:p,...x,ref:P,children:[r.jsxs(te,{children:[r.jsxs(a.FlexBox.Row,{className:"items-start justify-between gap-2",children:[r.jsx(se,{children:e}),r.jsx(J,{className:"h-auto w-auto border-none p-0",children:r.jsx(a.Icon.Cancel,{size:"16"})})]}),t&&r.jsx(U,{className:"text-sm text-grey-800",children:t}),o&&r.jsx(U,{className:"text-xs text-grey-600",children:o})]}),s&&r.jsx(r.Fragment,{children:s}),r.jsxs(oe,{className:"mt-2",children:[r.jsx(J,{className:a.cn("w-full font-normal"),children:d}),r.jsx(re,{className:a.cn(a.buttonVariants({theme:g,size:"sm"}),"w-full font-normal"),onClick:()=>{n&&n()},children:l})]})]})}));var Xo="VisuallyHidden",ae=i.forwardRef((e,t)=>r.jsx(a.Primitive.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ae.displayName=Xo;var Qo=ae,Oe="ToastProvider",[Ie,Zo,Jo]=a.createCollection("Toast"),[Lt,ws]=a.createContextScope("Toast",[Jo]),[es,ne]=Lt(Oe),Vt=e=>{const{__scopeToast:t,label:o="Notification",duration:s=5e3,swipeDirection:n="right",swipeThreshold:l=50,children:d}=e,[u,p]=i.useState(null),[c,g]=i.useState(0),x=i.useRef(!1),P=i.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${Oe}\`. Expected non-empty \`string\`.`),r.jsx(Ie.Provider,{scope:t,children:r.jsx(es,{scope:t,label:o,duration:s,swipeDirection:n,swipeThreshold:l,toastCount:c,viewport:u,onViewportChange:p,onToastAdd:i.useCallback(()=>g(A=>A+1),[]),onToastRemove:i.useCallback(()=>g(A=>A-1),[]),isFocusedToastEscapeKeyDownRef:x,isClosePausedRef:P,children:d})})};Vt.displayName=Oe;var Ht="ToastViewport",ts=["F8"],fe="toast.viewportPause",me="toast.viewportResume",zt=i.forwardRef((e,t)=>{const{__scopeToast:o,hotkey:s=ts,label:n="Notifications ({hotkey})",...l}=e,d=ne(Ht,o),u=Zo(o),p=i.useRef(null),c=i.useRef(null),g=i.useRef(null),x=i.useRef(null),P=a.useComposedRefs(t,x,d.onViewportChange),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),C=d.toastCount>0;i.useEffect(()=>{const m=E=>{var y;s.length!==0&&s.every(T=>E[T]||E.code===T)&&((y=x.current)==null||y.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[s]),i.useEffect(()=>{const m=p.current,E=x.current;if(C&&m&&E){const h=()=>{if(!d.isClosePausedRef.current){const b=new CustomEvent(fe);E.dispatchEvent(b),d.isClosePausedRef.current=!0}},y=()=>{if(d.isClosePausedRef.current){const b=new CustomEvent(me);E.dispatchEvent(b),d.isClosePausedRef.current=!1}},T=b=>{!m.contains(b.relatedTarget)&&y()},D=()=>{m.contains(document.activeElement)||y()};return m.addEventListener("focusin",h),m.addEventListener("focusout",T),m.addEventListener("pointermove",h),m.addEventListener("pointerleave",D),window.addEventListener("blur",h),window.addEventListener("focus",y),()=>{m.removeEventListener("focusin",h),m.removeEventListener("focusout",T),m.removeEventListener("pointermove",h),m.removeEventListener("pointerleave",D),window.removeEventListener("blur",h),window.removeEventListener("focus",y)}}},[C,d.isClosePausedRef]);const v=i.useCallback(({tabbingDirection:m})=>{const h=u().map(y=>{const T=y.ref.current,D=[T,...ms(T)];return m==="forwards"?D:D.reverse()});return(m==="forwards"?h.reverse():h).flat()},[u]);return i.useEffect(()=>{const m=x.current;if(m){const E=h=>{var D,b,S;const y=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!y){const k=document.activeElement,F=h.shiftKey;if(h.target===m&&F){(D=c.current)==null||D.focus();return}const O=v({tabbingDirection:F?"backwards":"forwards"}),K=O.findIndex(f=>f===k);pe(O.slice(K+1))?h.preventDefault():F?(b=c.current)==null||b.focus():(S=g.current)==null||S.focus()}};return m.addEventListener("keydown",E),()=>m.removeEventListener("keydown",E)}},[u,v]),r.jsxs(a.Branch,{ref:p,role:"region","aria-label":n.replace("{hotkey}",A),tabIndex:-1,style:{pointerEvents:C?void 0:"none"},children:[C&&r.jsx(ge,{ref:c,onFocusFromOutsideViewport:()=>{const m=v({tabbingDirection:"forwards"});pe(m)}}),r.jsx(Ie.Slot,{scope:o,children:r.jsx(a.Primitive.ol,{tabIndex:-1,...l,ref:P})}),C&&r.jsx(ge,{ref:g,onFocusFromOutsideViewport:()=>{const m=v({tabbingDirection:"backwards"});pe(m)}})]})});zt.displayName=Ht;var Wt="ToastFocusProxy",ge=i.forwardRef((e,t)=>{const{__scopeToast:o,onFocusFromOutsideViewport:s,...n}=e,l=ne(Wt,o);return r.jsx(ae,{"aria-hidden":!0,tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:d=>{var c;const u=d.relatedTarget;!((c=l.viewport)!=null&&c.contains(u))&&s()}})});ge.displayName=Wt;var ie="Toast",os="toast.swipeStart",ss="toast.swipeMove",rs="toast.swipeCancel",as="toast.swipeEnd",Ut=i.forwardRef((e,t)=>{const{forceMount:o,open:s,defaultOpen:n,onOpenChange:l,...d}=e,[u=!0,p]=a.useControllableState({prop:s,defaultProp:n,onChange:l});return r.jsx(a.Presence,{present:o||u,children:r.jsx(ls,{open:u,...d,ref:t,onClose:()=>p(!1),onPause:a.useCallbackRef(e.onPause),onResume:a.useCallbackRef(e.onResume),onSwipeStart:a.composeEventHandlers(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:a.composeEventHandlers(e.onSwipeMove,c=>{const{x:g,y:x}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${x}px`)}),onSwipeCancel:a.composeEventHandlers(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:a.composeEventHandlers(e.onSwipeEnd,c=>{const{x:g,y:x}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${x}px`),p(!1)})})})});Ut.displayName=ie;var[ns,is]=Lt(ie,{onClose(){}}),ls=i.forwardRef((e,t)=>{const{__scopeToast:o,type:s="foreground",duration:n,open:l,onClose:d,onEscapeKeyDown:u,onPause:p,onResume:c,onSwipeStart:g,onSwipeMove:x,onSwipeCancel:P,onSwipeEnd:A,...C}=e,v=ne(ie,o),[m,E]=i.useState(null),h=a.useComposedRefs(t,f=>E(f)),y=i.useRef(null),T=i.useRef(null),D=n||v.duration,b=i.useRef(0),S=i.useRef(D),k=i.useRef(0),{onToastAdd:F,onToastRemove:le}=v,M=a.useCallbackRef(()=>{var N;(m==null?void 0:m.contains(document.activeElement))&&((N=v.viewport)==null||N.focus()),d()}),O=i.useCallback(f=>{!f||f===1/0||(window.clearTimeout(k.current),b.current=new Date().getTime(),k.current=window.setTimeout(M,f))},[M]);i.useEffect(()=>{const f=v.viewport;if(f){const N=()=>{O(S.current),c==null||c()},_=()=>{const L=new Date().getTime()-b.current;S.current=S.current-L,window.clearTimeout(k.current),p==null||p()};return f.addEventListener(fe,_),f.addEventListener(me,N),()=>{f.removeEventListener(fe,_),f.removeEventListener(me,N)}}},[v.viewport,D,p,c,O]),i.useEffect(()=>{l&&!v.isClosePausedRef.current&&O(D)},[l,D,v.isClosePausedRef,O]),i.useEffect(()=>(F(),()=>le()),[F,le]);const K=i.useMemo(()=>m?Qt(m):null,[m]);return v.viewport?r.jsxs(r.Fragment,{children:[K&&r.jsx(cs,{__scopeToast:o,role:"status","aria-live":s==="foreground"?"assertive":"polite","aria-atomic":!0,children:K}),r.jsx(ns,{scope:o,onClose:M,children:po.createPortal(r.jsx(Ie.ItemSlot,{scope:o,children:r.jsx(a.Root,{asChild:!0,onEscapeKeyDown:a.composeEventHandlers(u,()=>{v.isFocusedToastEscapeKeyDownRef.current||M(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:r.jsx(a.Primitive.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":v.swipeDirection,...C,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:a.composeEventHandlers(e.onKeyDown,f=>{f.key==="Escape"&&(u==null||u(f.nativeEvent),f.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:a.composeEventHandlers(e.onPointerDown,f=>{f.button===0&&(y.current={x:f.clientX,y:f.clientY})}),onPointerMove:a.composeEventHandlers(e.onPointerMove,f=>{if(!y.current)return;const N=f.clientX-y.current.x,_=f.clientY-y.current.y,L=!!T.current,V=["left","right"].includes(v.swipeDirection),q=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,io=V?q(0,N):0,lo=V?0:q(0,_),ce=f.pointerType==="touch"?10:2,B={x:io,y:lo},ze={originalEvent:f,delta:B};L?(T.current=B,Y(ss,x,ze,{discrete:!1})):Ke(B,v.swipeDirection,ce)?(T.current=B,Y(os,g,ze,{discrete:!1}),f.target.setPointerCapture(f.pointerId)):(Math.abs(N)>ce||Math.abs(_)>ce)&&(y.current=null)}),onPointerUp:a.composeEventHandlers(e.onPointerUp,f=>{const N=T.current,_=f.target;if(_.hasPointerCapture(f.pointerId)&&_.releasePointerCapture(f.pointerId),T.current=null,y.current=null,N){const L=f.currentTarget,V={originalEvent:f,delta:N};Ke(N,v.swipeDirection,v.swipeThreshold)?Y(as,A,V,{discrete:!0}):Y(rs,P,V,{discrete:!0}),L.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),cs=e=>{const{__scopeToast:t,children:o,...s}=e,n=ne(ie,t),[l,d]=i.useState(!1),[u,p]=i.useState(!1);return ps(()=>d(!0)),i.useEffect(()=>{const c=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(c)},[]),u?null:r.jsx(a.Portal,{asChild:!0,children:r.jsx(ae,{...s,children:l&&r.jsxs(r.Fragment,{children:[n.label," ",o]})})})},ds="ToastTitle",Kt=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e;return r.jsx(a.Primitive.div,{...s,ref:t})});Kt.displayName=ds;var us="ToastDescription",qt=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e;return r.jsx(a.Primitive.div,{...s,ref:t})});qt.displayName=us;var Bt="ToastAction",Gt=i.forwardRef((e,t)=>{const{altText:o,...s}=e;return o.trim()?r.jsx(Xt,{altText:o,asChild:!0,children:r.jsx(Fe,{...s,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Bt}\`. Expected non-empty \`string\`.`),null)});Gt.displayName=Bt;var Yt="ToastClose",Fe=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e,n=is(Yt,o);return r.jsx(Xt,{asChild:!0,children:r.jsx(a.Primitive.button,{type:"button",...s,ref:t,onClick:a.composeEventHandlers(e.onClick,n.onClose)})})});Fe.displayName=Yt;var Xt=i.forwardRef((e,t)=>{const{__scopeToast:o,altText:s,...n}=e;return r.jsx(a.Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...n,ref:t})});function Qt(e){const t=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&t.push(s.textContent),fs(s)){const n=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!n)if(l){const d=s.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...Qt(s))}}),t}function Y(e,t,o,{discrete:s}){const n=o.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),s?a.dispatchDiscreteCustomEvent(n,l):n.dispatchEvent(l)}var Ke=(e,t,o=0)=>{const s=Math.abs(e.x),n=Math.abs(e.y),l=s>n;return t==="left"||t==="right"?l&&s>o:!l&&n>o};function ps(e=()=>{}){const t=a.useCallbackRef(e);a.useLayoutEffect2(()=>{let o=0,s=0;return o=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(s)}},[t])}function fs(e){return e.nodeType===e.ELEMENT_NODE}function ms(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const n=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||n?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function pe(e){const t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var gs=Vt,Zt=zt,Jt=Ut,eo=Kt,to=qt,oo=Gt,so=Fe;const ro=gs,ao={"top-left":"top-0 left-0 bottom-auto mt-10 items-start","top-center":"top-0 left-1/2 bottom-auto transform -translate-x-1/2 mt-10 items-center","top-right":"top-0 right-0 bottom-auto items-end mt-10","bottom-left":"top-auto bottom-4 left-0 items-start","bottom-center":"top-auto bottom-4 left-1/2 transform -translate-x-1/2 items-center","bottom-right":"top-auto bottom-4 right-0 items-end"},Me=i.forwardRef(({className:e,id:t,position:o="top-center",...s},n)=>r.jsx(Zt,{ref:n,id:t,className:a.cn("fixed z-[100] flex flex-col-reverse gap-2 p-4 outline-none ring-transparent md:p-10",ao[o],e),...s}));Me.displayName=Zt.displayName;const no=a.cva("group pointer-events-auto relative flex w-full whitespace-pre-wrap bg-opacity-90 items-center justify-between space-x-4 overflow-hidden rounded-lg border p-4 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full",{variants:{variant:{black:"group border bg-grey-800 border-grey-800 text-grey-50",white:"group border bg-grey-50 border-grey-50 text-grey-800"},size:{sm:"w-[300px]",md:"w-[400px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-[90vw]",fit:"w-fit"}},defaultVariants:{variant:"black",size:"fit"}}),$e=i.forwardRef(({className:e,variant:t,size:o,...s},n)=>r.jsx(Jt,{ref:n,className:a.cn(no({variant:t,size:o}),e),duration:3e3,...s}));$e.displayName=Jt.displayName;const ke=i.forwardRef(({className:e,...t},o)=>r.jsx(oo,{ref:o,className:a.cn(a.buttonVariants({variant:"outline",size:"sm",theme:"secondary"}),e),...t}));ke.displayName=oo.displayName;const Le=i.forwardRef(({className:e,children:t,...o},s)=>r.jsx(so,{ref:s,className:a.cn("absolute right-1.5 top-1.5 rounded-md p-1 focus:outline-none",e),"toast-close":"",...o,children:t}));Le.displayName=so.displayName;const Ve=i.forwardRef(({className:e,...t},o)=>r.jsx(eo,{ref:o,className:a.cn("text-sm font-semibold",e),...t}));Ve.displayName=eo.displayName;const He=i.forwardRef(({className:e,...t},o)=>r.jsx(to,{ref:o,className:a.cn("text-sm font-normal",e),...t}));He.displayName=to.displayName;function xs(){const{toasts:e}=Eo(),t=e.reduce((o,s)=>{const n=s.position||"top-center";return o[n]||(o[n]=[]),o[n].push(s),o},{});return r.jsx(W.Fragment,{children:Object.entries(t).map(([o,s])=>r.jsxs(ro,{children:[r.jsx(Me,{position:o}),s.map(function(n){const{id:l,title:d,description:u,onAction:p,actionBtnText:c="확인",closeButton:g=!1,variant:x="black",...P}=n,A=x==="black"?"solid":"outline",C=p&&c;return r.jsxs($e,{variant:x,className:a.cn({"pr-7":g,"items-end":d}),...P,children:[r.jsxs("div",{className:"flex flex-col gap-1",children:[d&&d.trim().length>0&&r.jsx(Ve,{children:d}),r.jsx(He,{children:u})]}),C&&r.jsx(ke,{altText:l||"toast action",onClick:p,className:a.cn(a.buttonVariants({variant:A,size:"sm",theme:"secondary"}),{"border-grey-600":x==="black"},"px-2 py-1 text-xs"),children:c}),g&&r.jsx(Le,{children:r.jsx(a.Icon.Cancel,{size:"10",className:a.cn({"fill-grey-600 hover:fill-grey-800":x==="white","fill-grey-100 hover:fill-white":x==="black"})})})]},l)})]},o))})}const vs=({children:e})=>{const[t,o]=W.useState(null);return W.useEffect(()=>{let s=document.getElementById("portal");s||(s=document.createElement("div"),s.id="portal",document.body.appendChild(s)),o(s)},[]),t?qe.createPortal(e,t):null};exports.AlertDialog=Ne;exports.AlertDialogAction=re;exports.AlertDialogCancel=J;exports.AlertDialogContent=ee;exports.AlertDialogDescription=U;exports.AlertDialogFooter=oe;exports.AlertDialogHeader=te;exports.AlertDialogOverlay=Ae;exports.AlertDialogPortal=Ft;exports.AlertDialogTitle=se;exports.AlertDialogTrigger=Uo;exports.AlertForm=qo;exports.Dialog=Mt;exports.DialogClose=kt;exports.DialogContent=Pe;exports.DialogDescription=Se;exports.DialogFooter=je;exports.DialogForm=Go;exports.DialogHeader=Ce;exports.DialogOverlay=Re;exports.DialogPortal=$t;exports.DialogTitle=_e;exports.DialogTrigger=Bo;exports.ModalForm=Yo;exports.PortalContainer=vs;exports.Root=Qo;exports.Toast=$e;exports.ToastAction=ke;exports.ToastClose=Le;exports.ToastDescription=He;exports.ToastForm=xs;exports.ToastProvider=ro;exports.ToastTitle=Ve;exports.ToastViewport=Me;exports.portalManager=yo;exports.toast=Ye;exports.toastPositionVariants=ao;exports.toastVariants=no;
11
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{var s;document.getElementById((s=e.current)==null?void 0:s.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Ho=vt,zo=ht,Wo=yt,Ct=wt,jt=Tt,_t=At,St=Pt,Ot=Et,It=Nt;const Ne=Ho,Uo=zo,Ft=Wo,Ae=i.forwardRef(({className:e,...t},o)=>r.jsx(Ct,{className:a.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/60",e),...t,ref:o}));Ae.displayName=Ct.displayName;const Ko={sm:"max-w-[344px]",md:"max-w-[500px]",lg:"max-w-[640px]",fit:"max-w-fit"},ee=i.forwardRef(({className:e,size:t="sm",...o},s)=>r.jsxs(Ft,{children:[r.jsx(Ae,{}),r.jsx(jt,{ref:s,className:a.cn("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%] bg-background fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-2 rounded-lg border p-4 shadow-lg duration-200",Ko[t],e),...o})]}));ee.displayName=jt.displayName;const te=({className:e,...t})=>r.jsx("div",{className:a.cn("flex flex-col space-y-2 text-center sm:text-left",e),...t});te.displayName="AlertDialogHeader";const oe=({className:e,...t})=>r.jsx("div",{className:a.cn("flex flex-col-reverse sm:flex-row sm:justify-between sm:space-x-2",e),...t});oe.displayName="AlertDialogFooter";const se=i.forwardRef(({className:e,...t},o)=>r.jsx(Ot,{ref:o,className:a.cn("whitespace-pre-wrap text-base font-semibold",e),...t}));se.displayName=Ot.displayName;const U=i.forwardRef(({className:e,...t},o)=>r.jsx(It,{ref:o,className:a.cn("text-grey-600 whitespace-pre-wrap text-xs font-normal",e),...t}));U.displayName=It.displayName;const re=i.forwardRef(({className:e,...t},o)=>r.jsx(_t,{ref:o,className:a.cn(a.buttonVariants({size:"sm"}),e),...t}));re.displayName=_t.displayName;const J=i.forwardRef(({className:e,...t},o)=>r.jsx(St,{ref:o,className:a.cn(a.buttonVariants({variant:"outline",size:"sm",theme:"secondary"}),"mt-2 w-1/2 sm:mt-0",e),...t}));J.displayName=St.displayName;const qo=({title:e="알림",description:t,confirmText:o="확인",onConfirm:s,size:n="sm",onClose:l,theme:d="primary"})=>r.jsx(Ne,{open:!0,onOpenChange:u=>{!u&&l&&l()},children:r.jsxs(ee,{size:n,className:"gap-4",children:[r.jsxs(te,{children:[r.jsx(se,{children:e}),r.jsx(U,{className:"text-sm",children:t})]}),r.jsx(oe,{children:r.jsx(re,{className:a.cn(a.buttonVariants({theme:d,size:"sm"}),"w-full font-normal"),onClick:()=>{s&&s()},children:o})})]})}),Mt=ft,Bo=mt,$t=gt,kt=be,Re=i.forwardRef(({className:e,...t},o)=>r.jsx(we,{ref:o,className:a.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/50",e),...t}));Re.displayName=we.displayName;const Pe=i.forwardRef(({className:e,children:t,...o},s)=>r.jsxs($t,{children:[r.jsx(Re,{}),r.jsx(Te,{ref:s,className:a.cn("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%] fixed left-[50%] top-[50%] z-50 grid w-auto translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200",e),...o,children:t})]}));Pe.displayName=Te.displayName;const Ce=({className:e,...t})=>r.jsx("div",{className:a.cn("flex flex-col text-left md:text-center",e),...t});Ce.displayName="DialogHeader";const je=({className:e,...t})=>r.jsx("div",{className:a.cn("flex items-center gap-2",e),...t});je.displayName="DialogFooter";const _e=i.forwardRef(({className:e,...t},o)=>r.jsx(De,{ref:o,className:a.cn("text-lg font-semibold leading-none tracking-tight",e),...t}));_e.displayName=De.displayName;const Se=i.forwardRef(({className:e,...t},o)=>r.jsx(Ee,{ref:o,className:a.cn("text-sm text-muted",e),...t}));Se.displayName=Ee.displayName;const Go=W.forwardRef(({id:e,title:t,description:o,onClose:s,content:n,className:l,open:d,onOpenChange:u,footer:p,...c},g)=>r.jsx(Mt,{open:!0,onOpenChange:x=>{!x&&s&&s()},children:r.jsxs(Pe,{ref:g,className:a.cn("flex flex-col gap-0 px-0 py-0",l),...c,children:[r.jsxs(Ce,{className:"sticky left-0 right-0 top-0 z-50 border-b border-b-border bg-white",children:[r.jsx(_e,{className:"flex h-[57px] w-full items-center justify-start px-5 md:h-[65px] md:justify-center md:px-[30px]",children:t}),r.jsxs(kt,{className:"absolute right-4 top-5 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground md:right-[30px] md:top-[25px]",children:[r.jsx(a.Icon.Cancel,{size:"16"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]}),o&&r.jsx(Se,{children:o}),n&&r.jsx(r.Fragment,{children:n}),p&&r.jsx(je,{children:p})]})})),Yo=i.forwardRef(({title:e,description:t,subDescription:o,contents:s,onConfirm:n,confirmText:l="확인",cancelText:d="취소",size:u="sm",className:p,onClose:c,theme:g="primary",...x},C)=>r.jsx(Ne,{open:!0,onOpenChange:A=>{!A&&c&&c()},children:r.jsxs(ee,{size:u,className:p,...x,ref:C,children:[r.jsxs(te,{children:[r.jsxs(a.FlexBox.Row,{className:"items-start justify-between gap-2",children:[r.jsx(se,{children:e}),r.jsx(J,{className:"h-auto w-auto border-none p-0",children:r.jsx(a.Icon.Cancel,{size:"16"})})]}),t&&r.jsx(U,{className:"text-sm text-grey-800",children:t}),o&&r.jsx(U,{className:"text-xs text-grey-600",children:o})]}),s&&r.jsx(r.Fragment,{children:s}),r.jsxs(oe,{className:"mt-2",children:[r.jsx(J,{className:a.cn("w-full font-normal"),children:d}),r.jsx(re,{className:a.cn(a.buttonVariants({theme:g,size:"sm"}),"w-full font-normal"),onClick:()=>{n&&n()},children:l})]})]})}));var Xo="VisuallyHidden",ae=i.forwardRef((e,t)=>r.jsx(a.Primitive.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));ae.displayName=Xo;var Qo=ae,Oe="ToastProvider",[Ie,Zo,Jo]=a.createCollection("Toast"),[Lt,ws]=a.createContextScope("Toast",[Jo]),[es,ne]=Lt(Oe),Vt=e=>{const{__scopeToast:t,label:o="Notification",duration:s=5e3,swipeDirection:n="right",swipeThreshold:l=50,children:d}=e,[u,p]=i.useState(null),[c,g]=i.useState(0),x=i.useRef(!1),C=i.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${Oe}\`. Expected non-empty \`string\`.`),r.jsx(Ie.Provider,{scope:t,children:r.jsx(es,{scope:t,label:o,duration:s,swipeDirection:n,swipeThreshold:l,toastCount:c,viewport:u,onViewportChange:p,onToastAdd:i.useCallback(()=>g(A=>A+1),[]),onToastRemove:i.useCallback(()=>g(A=>A-1),[]),isFocusedToastEscapeKeyDownRef:x,isClosePausedRef:C,children:d})})};Vt.displayName=Oe;var Ht="ToastViewport",ts=["F8"],fe="toast.viewportPause",me="toast.viewportResume",zt=i.forwardRef((e,t)=>{const{__scopeToast:o,hotkey:s=ts,label:n="Notifications ({hotkey})",...l}=e,d=ne(Ht,o),u=Zo(o),p=i.useRef(null),c=i.useRef(null),g=i.useRef(null),x=i.useRef(null),C=a.useComposedRefs(t,x,d.onViewportChange),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=d.toastCount>0;i.useEffect(()=>{const m=E=>{var y;s.length!==0&&s.every(T=>E[T]||E.code===T)&&((y=x.current)==null||y.focus())};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[s]),i.useEffect(()=>{const m=p.current,E=x.current;if(P&&m&&E){const h=()=>{if(!d.isClosePausedRef.current){const b=new CustomEvent(fe);E.dispatchEvent(b),d.isClosePausedRef.current=!0}},y=()=>{if(d.isClosePausedRef.current){const b=new CustomEvent(me);E.dispatchEvent(b),d.isClosePausedRef.current=!1}},T=b=>{!m.contains(b.relatedTarget)&&y()},D=()=>{m.contains(document.activeElement)||y()};return m.addEventListener("focusin",h),m.addEventListener("focusout",T),m.addEventListener("pointermove",h),m.addEventListener("pointerleave",D),window.addEventListener("blur",h),window.addEventListener("focus",y),()=>{m.removeEventListener("focusin",h),m.removeEventListener("focusout",T),m.removeEventListener("pointermove",h),m.removeEventListener("pointerleave",D),window.removeEventListener("blur",h),window.removeEventListener("focus",y)}}},[P,d.isClosePausedRef]);const v=i.useCallback(({tabbingDirection:m})=>{const h=u().map(y=>{const T=y.ref.current,D=[T,...ms(T)];return m==="forwards"?D:D.reverse()});return(m==="forwards"?h.reverse():h).flat()},[u]);return i.useEffect(()=>{const m=x.current;if(m){const E=h=>{var D,b,S;const y=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!y){const k=document.activeElement,F=h.shiftKey;if(h.target===m&&F){(D=c.current)==null||D.focus();return}const O=v({tabbingDirection:F?"backwards":"forwards"}),K=O.findIndex(f=>f===k);pe(O.slice(K+1))?h.preventDefault():F?(b=c.current)==null||b.focus():(S=g.current)==null||S.focus()}};return m.addEventListener("keydown",E),()=>m.removeEventListener("keydown",E)}},[u,v]),r.jsxs(a.Branch,{ref:p,role:"region","aria-label":n.replace("{hotkey}",A),tabIndex:-1,style:{pointerEvents:P?void 0:"none"},children:[P&&r.jsx(ge,{ref:c,onFocusFromOutsideViewport:()=>{const m=v({tabbingDirection:"forwards"});pe(m)}}),r.jsx(Ie.Slot,{scope:o,children:r.jsx(a.Primitive.ol,{tabIndex:-1,...l,ref:C})}),P&&r.jsx(ge,{ref:g,onFocusFromOutsideViewport:()=>{const m=v({tabbingDirection:"backwards"});pe(m)}})]})});zt.displayName=Ht;var Wt="ToastFocusProxy",ge=i.forwardRef((e,t)=>{const{__scopeToast:o,onFocusFromOutsideViewport:s,...n}=e,l=ne(Wt,o);return r.jsx(ae,{"aria-hidden":!0,tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:d=>{var c;const u=d.relatedTarget;!((c=l.viewport)!=null&&c.contains(u))&&s()}})});ge.displayName=Wt;var ie="Toast",os="toast.swipeStart",ss="toast.swipeMove",rs="toast.swipeCancel",as="toast.swipeEnd",Ut=i.forwardRef((e,t)=>{const{forceMount:o,open:s,defaultOpen:n,onOpenChange:l,...d}=e,[u=!0,p]=a.useControllableState({prop:s,defaultProp:n,onChange:l});return r.jsx(a.Presence,{present:o||u,children:r.jsx(ls,{open:u,...d,ref:t,onClose:()=>p(!1),onPause:a.useCallbackRef(e.onPause),onResume:a.useCallbackRef(e.onResume),onSwipeStart:a.composeEventHandlers(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:a.composeEventHandlers(e.onSwipeMove,c=>{const{x:g,y:x}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${x}px`)}),onSwipeCancel:a.composeEventHandlers(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:a.composeEventHandlers(e.onSwipeEnd,c=>{const{x:g,y:x}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${x}px`),p(!1)})})})});Ut.displayName=ie;var[ns,is]=Lt(ie,{onClose(){}}),ls=i.forwardRef((e,t)=>{const{__scopeToast:o,type:s="foreground",duration:n,open:l,onClose:d,onEscapeKeyDown:u,onPause:p,onResume:c,onSwipeStart:g,onSwipeMove:x,onSwipeCancel:C,onSwipeEnd:A,...P}=e,v=ne(ie,o),[m,E]=i.useState(null),h=a.useComposedRefs(t,f=>E(f)),y=i.useRef(null),T=i.useRef(null),D=n||v.duration,b=i.useRef(0),S=i.useRef(D),k=i.useRef(0),{onToastAdd:F,onToastRemove:le}=v,M=a.useCallbackRef(()=>{var N;(m==null?void 0:m.contains(document.activeElement))&&((N=v.viewport)==null||N.focus()),d()}),O=i.useCallback(f=>{!f||f===1/0||(window.clearTimeout(k.current),b.current=new Date().getTime(),k.current=window.setTimeout(M,f))},[M]);i.useEffect(()=>{const f=v.viewport;if(f){const N=()=>{O(S.current),c==null||c()},_=()=>{const L=new Date().getTime()-b.current;S.current=S.current-L,window.clearTimeout(k.current),p==null||p()};return f.addEventListener(fe,_),f.addEventListener(me,N),()=>{f.removeEventListener(fe,_),f.removeEventListener(me,N)}}},[v.viewport,D,p,c,O]),i.useEffect(()=>{l&&!v.isClosePausedRef.current&&O(D)},[l,D,v.isClosePausedRef,O]),i.useEffect(()=>(F(),()=>le()),[F,le]);const K=i.useMemo(()=>m?Qt(m):null,[m]);return v.viewport?r.jsxs(r.Fragment,{children:[K&&r.jsx(cs,{__scopeToast:o,role:"status","aria-live":s==="foreground"?"assertive":"polite","aria-atomic":!0,children:K}),r.jsx(ns,{scope:o,onClose:M,children:po.createPortal(r.jsx(Ie.ItemSlot,{scope:o,children:r.jsx(a.Root,{asChild:!0,onEscapeKeyDown:a.composeEventHandlers(u,()=>{v.isFocusedToastEscapeKeyDownRef.current||M(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:r.jsx(a.Primitive.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":v.swipeDirection,...P,ref:h,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:a.composeEventHandlers(e.onKeyDown,f=>{f.key==="Escape"&&(u==null||u(f.nativeEvent),f.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:a.composeEventHandlers(e.onPointerDown,f=>{f.button===0&&(y.current={x:f.clientX,y:f.clientY})}),onPointerMove:a.composeEventHandlers(e.onPointerMove,f=>{if(!y.current)return;const N=f.clientX-y.current.x,_=f.clientY-y.current.y,L=!!T.current,V=["left","right"].includes(v.swipeDirection),q=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,io=V?q(0,N):0,lo=V?0:q(0,_),ce=f.pointerType==="touch"?10:2,B={x:io,y:lo},ze={originalEvent:f,delta:B};L?(T.current=B,Y(ss,x,ze,{discrete:!1})):Ke(B,v.swipeDirection,ce)?(T.current=B,Y(os,g,ze,{discrete:!1}),f.target.setPointerCapture(f.pointerId)):(Math.abs(N)>ce||Math.abs(_)>ce)&&(y.current=null)}),onPointerUp:a.composeEventHandlers(e.onPointerUp,f=>{const N=T.current,_=f.target;if(_.hasPointerCapture(f.pointerId)&&_.releasePointerCapture(f.pointerId),T.current=null,y.current=null,N){const L=f.currentTarget,V={originalEvent:f,delta:N};Ke(N,v.swipeDirection,v.swipeThreshold)?Y(as,A,V,{discrete:!0}):Y(rs,C,V,{discrete:!0}),L.addEventListener("click",q=>q.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),cs=e=>{const{__scopeToast:t,children:o,...s}=e,n=ne(ie,t),[l,d]=i.useState(!1),[u,p]=i.useState(!1);return ps(()=>d(!0)),i.useEffect(()=>{const c=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(c)},[]),u?null:r.jsx(a.Portal,{asChild:!0,children:r.jsx(ae,{...s,children:l&&r.jsxs(r.Fragment,{children:[n.label," ",o]})})})},ds="ToastTitle",Kt=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e;return r.jsx(a.Primitive.div,{...s,ref:t})});Kt.displayName=ds;var us="ToastDescription",qt=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e;return r.jsx(a.Primitive.div,{...s,ref:t})});qt.displayName=us;var Bt="ToastAction",Gt=i.forwardRef((e,t)=>{const{altText:o,...s}=e;return o.trim()?r.jsx(Xt,{altText:o,asChild:!0,children:r.jsx(Fe,{...s,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Bt}\`. Expected non-empty \`string\`.`),null)});Gt.displayName=Bt;var Yt="ToastClose",Fe=i.forwardRef((e,t)=>{const{__scopeToast:o,...s}=e,n=is(Yt,o);return r.jsx(Xt,{asChild:!0,children:r.jsx(a.Primitive.button,{type:"button",...s,ref:t,onClick:a.composeEventHandlers(e.onClick,n.onClose)})})});Fe.displayName=Yt;var Xt=i.forwardRef((e,t)=>{const{__scopeToast:o,altText:s,...n}=e;return r.jsx(a.Primitive.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...n,ref:t})});function Qt(e){const t=[];return Array.from(e.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&t.push(s.textContent),fs(s)){const n=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!n)if(l){const d=s.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...Qt(s))}}),t}function Y(e,t,o,{discrete:s}){const n=o.originalEvent.currentTarget,l=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&n.addEventListener(e,t,{once:!0}),s?a.dispatchDiscreteCustomEvent(n,l):n.dispatchEvent(l)}var Ke=(e,t,o=0)=>{const s=Math.abs(e.x),n=Math.abs(e.y),l=s>n;return t==="left"||t==="right"?l&&s>o:!l&&n>o};function ps(e=()=>{}){const t=a.useCallbackRef(e);a.useLayoutEffect2(()=>{let o=0,s=0;return o=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(s)}},[t])}function fs(e){return e.nodeType===e.ELEMENT_NODE}function ms(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const n=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||n?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function pe(e){const t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var gs=Vt,Zt=zt,Jt=Ut,eo=Kt,to=qt,oo=Gt,so=Fe;const ro=gs,ao={"top-left":"top-0 left-0 bottom-auto mt-10 items-start","top-center":"top-0 left-1/2 bottom-auto transform -translate-x-1/2 mt-10 items-center","top-right":"top-0 right-0 bottom-auto items-end mt-10","bottom-left":"top-auto bottom-4 left-0 items-start","bottom-center":"top-auto bottom-4 left-1/2 transform -translate-x-1/2 items-center","bottom-right":"top-auto bottom-4 right-0 items-end"},Me=i.forwardRef(({className:e,id:t,position:o="top-center",...s},n)=>r.jsx(Zt,{ref:n,id:t,className:a.cn("fixed z-[100] flex flex-col-reverse gap-2 p-4 outline-none ring-transparent md:p-10",ao[o],e),...s}));Me.displayName=Zt.displayName;const no=a.cva("group pointer-events-auto bg-opacity-90 overflow-hidden rounded-lg border shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full",{variants:{variant:{black:"group border bg-grey-800 border-grey-800 text-grey-50",white:"group border bg-grey-50 border-grey-50 text-grey-800"},size:{sm:"w-[300px]",md:"w-[400px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-[90vw]",fit:"w-fit"}},defaultVariants:{variant:"black",size:"fit"}}),$e=i.forwardRef(({className:e,variant:t,size:o,...s},n)=>r.jsx(Jt,{ref:n,className:a.cn(no({variant:t,size:o}),e),duration:3e3,...s}));$e.displayName=Jt.displayName;const ke=i.forwardRef(({className:e,...t},o)=>r.jsx(oo,{ref:o,className:a.cn(a.buttonVariants({variant:"outline",size:"sm",theme:"secondary"}),e),...t}));ke.displayName=oo.displayName;const Le=i.forwardRef(({className:e,children:t,...o},s)=>r.jsx(so,{ref:s,className:a.cn("absolute right-1.5 top-1.5 rounded-md p-1 focus:outline-none",e),"toast-close":"",...o,children:t}));Le.displayName=so.displayName;const Ve=i.forwardRef(({className:e,...t},o)=>r.jsx(eo,{ref:o,className:a.cn("text-sm font-semibold",e),...t}));Ve.displayName=eo.displayName;const He=i.forwardRef(({className:e,...t},o)=>r.jsx(to,{ref:o,className:a.cn("text-sm font-normal",e),...t}));He.displayName=to.displayName;function xs(){const{toasts:e}=Eo(),t=e.reduce((o,s)=>{const n=s.position||"top-center";return o[n]||(o[n]=[]),o[n].push(s),o},{});return r.jsx(W.Fragment,{children:Object.entries(t).map(([o,s])=>r.jsxs(ro,{children:[r.jsx(Me,{position:o}),s.map(function(n){const{id:l,title:d,description:u,onAction:p,actionBtnText:c="확인",closeButton:g=!1,variant:x="black",...C}=n,A=x==="black"?"solid":"outline",P=p&&c;return r.jsx($e,{variant:x,...C,children:r.jsxs(a.Box,{className:a.cn("relative flex w-full items-center justify-between gap-2 whitespace-pre-wrap p-4",{"items-end":d,"pr-7":g,"justify-center":!P}),children:[r.jsxs(a.Box,{className:"flex flex-col gap-1",children:[d&&d.trim().length>0&&r.jsx(Ve,{children:d}),r.jsx(He,{children:u})]}),P&&r.jsx(ke,{altText:l||"toast action",onClick:p,className:a.cn(a.buttonVariants({variant:A,size:"sm",theme:"secondary"}),{"border-grey-600":x==="black"},"px-2 py-1 text-xs"),children:c}),g&&r.jsx(Le,{children:r.jsx(a.Icon.Cancel,{size:"10",className:a.cn({"fill-grey-600 hover:fill-grey-800":x==="white","fill-grey-100 hover:fill-white":x==="black"})})})]})},l)})]},o))})}const vs=({children:e})=>{const[t,o]=W.useState(null);return W.useEffect(()=>{let s=document.getElementById("portal");s||(s=document.createElement("div"),s.id="portal",document.body.appendChild(s)),o(s)},[]),t?qe.createPortal(e,t):null};exports.AlertDialog=Ne;exports.AlertDialogAction=re;exports.AlertDialogCancel=J;exports.AlertDialogContent=ee;exports.AlertDialogDescription=U;exports.AlertDialogFooter=oe;exports.AlertDialogHeader=te;exports.AlertDialogOverlay=Ae;exports.AlertDialogPortal=Ft;exports.AlertDialogTitle=se;exports.AlertDialogTrigger=Uo;exports.AlertForm=qo;exports.Dialog=Mt;exports.DialogClose=kt;exports.DialogContent=Pe;exports.DialogDescription=Se;exports.DialogFooter=je;exports.DialogForm=Go;exports.DialogHeader=Ce;exports.DialogOverlay=Re;exports.DialogPortal=$t;exports.DialogTitle=_e;exports.DialogTrigger=Bo;exports.ModalForm=Yo;exports.PortalContainer=vs;exports.Root=Qo;exports.Toast=$e;exports.ToastAction=ke;exports.ToastClose=Le;exports.ToastDescription=He;exports.ToastForm=xs;exports.ToastProvider=ro;exports.ToastTitle=Ve;exports.ToastViewport=Me;exports.portalManager=yo;exports.toast=Ye;exports.toastPositionVariants=ao;exports.toastVariants=no;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("./portal-container-tinIg0Za.cjs"),p=require("./index-Cbi-Ndbb.cjs"),i=require("react"),m=i.forwardRef(({open:r,onClose:a,className:t,contents:l,...e},s)=>o.jsx(n.Dialog,{open:!0,onOpenChange:c=>{!c&&a&&a()},children:o.jsx(n.DialogContent,{ref:s,className:p.cn("flex flex-col gap-0 px-0 py-0",t),...e,children:l&&o.jsx(o.Fragment,{children:l})})})),C=()=>{const[r,a]=i.useState([]);i.useEffect(()=>{const e=n.portalManager.subscribe((s,c)=>{a(u=>{const f=u.find(d=>d.id===s.id);return c?f?u:[...u,{...s,isOpen:c}]:u.map(d=>d.id===s.id?{...d,isOpen:!1}:d)})});return()=>{e()}},[]);const t=i.useCallback(e=>{n.portalManager.setPortalOpen(e,!1)},[]);i.useEffect(()=>{const e=[];return r.forEach(s=>{if(!s.isOpen){const c=setTimeout(()=>{a(u=>u.filter(f=>f.id!==s.id))},300);e.push(c)}}),()=>{e.forEach(s=>clearTimeout(s))}},[r]);const l=i.useCallback(e=>{const s=e.props;n.toast({title:s.title,description:s.description,onAction:s.onAction,actionBtnText:s.actionBtnText,closeButton:s.closeButton,variant:s.variant,position:s.position,size:s.size,className:s.className}),t(e.id)},[t]);return i.useEffect(()=>{r.forEach(e=>{e.type==="toast"&&e.isOpen&&l(e)})},[r,l]),o.jsxs(n.PortalContainer,{children:[o.jsx(n.ToastForm,{}),r.map(e=>{var s;if(!e.isOpen)return null;switch(e.type){case"modal":return o.jsx(n.ModalForm,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),t(e.id)},description:(s=e.props.description)==null?void 0:s.toString()},e.id);case"alert":return o.jsx(n.AlertForm,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),t(e.id)}},e.id);case"dialog":return o.jsx(n.DialogForm,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),t(e.id)}},e.id);case"custom":return o.jsx(m,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),t(e.id)},contents:e.props.contents},e.id);case"toast":return null;default:return null}})]})};exports.PortalProvider=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("./portal-container-vWuaOamD.cjs"),p=require("./index-Cbi-Ndbb.cjs"),i=require("react"),m=i.forwardRef(({open:r,onClose:a,className:t,contents:l,...e},s)=>o.jsx(n.Dialog,{open:!0,onOpenChange:c=>{!c&&a&&a()},children:o.jsx(n.DialogContent,{ref:s,className:p.cn("flex flex-col gap-0 px-0 py-0",t),...e,children:l&&o.jsx(o.Fragment,{children:l})})})),C=()=>{const[r,a]=i.useState([]);i.useEffect(()=>{const e=n.portalManager.subscribe((s,c)=>{a(u=>{const f=u.find(d=>d.id===s.id);return c?f?u:[...u,{...s,isOpen:c}]:u.map(d=>d.id===s.id?{...d,isOpen:!1}:d)})});return()=>{e()}},[]);const t=i.useCallback(e=>{n.portalManager.setPortalOpen(e,!1)},[]);i.useEffect(()=>{const e=[];return r.forEach(s=>{if(!s.isOpen){const c=setTimeout(()=>{a(u=>u.filter(f=>f.id!==s.id))},300);e.push(c)}}),()=>{e.forEach(s=>clearTimeout(s))}},[r]);const l=i.useCallback(e=>{const s=e.props;n.toast({title:s.title,description:s.description,onAction:s.onAction,actionBtnText:s.actionBtnText,closeButton:s.closeButton,variant:s.variant,position:s.position,size:s.size,className:s.className}),t(e.id)},[t]);return i.useEffect(()=>{r.forEach(e=>{e.type==="toast"&&e.isOpen&&l(e)})},[r,l]),o.jsxs(n.PortalContainer,{children:[o.jsx(n.ToastForm,{}),r.map(e=>{var s;if(!e.isOpen)return null;switch(e.type){case"modal":return o.jsx(n.ModalForm,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),t(e.id)},description:(s=e.props.description)==null?void 0:s.toString()},e.id);case"alert":return o.jsx(n.AlertForm,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),t(e.id)}},e.id);case"dialog":return o.jsx(n.DialogForm,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),t(e.id)}},e.id);case"custom":return o.jsx(m,{...e.props,onClose:()=>{e.props.onClose&&e.props.onClose(),t(e.id)},contents:e.props.contents},e.id);case"toast":return null;default:return null}})]})};exports.PortalProvider=C;
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, Fragment as f, jsxs as C } from "react/jsx-runtime";
2
- import { D as h, a as g, p, t as x, P as F, T as P, b as T, A as b, M as O } from "./portal-container-BR_2ILw2.js";
2
+ import { D as h, a as g, p, t as x, P as F, T as P, b as T, A as b, M as O } from "./portal-container-B3Inn3dx.js";
3
3
  import { c as A } from "./index-Bapbasgz.js";
4
4
  import { forwardRef as B, useState as D, useEffect as l, useCallback as m } from "react";
5
5
  const E = B(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "boottent-design",
3
3
  "private": false,
4
- "version": "0.1.152",
4
+ "version": "0.1.154",
5
5
  "description": "부트텐트 디자인시스템 라이브러리",
6
6
  "repository": {
7
7
  "type": "git",