@jameskyeong/uix 0.1.6 → 0.1.8

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.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),m=require("motion/react"),n=require("react"),v=require("clsx"),re=require("tailwind-merge"),y=require("lucide-react"),se=require("shiki"),ie=require("react-dom");function c(...e){return re.twMerge(v.clsx(e))}const w=n.forwardRef(({className:e,variant:t="default",size:r="sm",children:s,...o},a)=>{const l=t==="default"?"uix-convex-colored-sm":"uix-convex-sm",u={default:"bg-uix-prime-300 backdrop-blur-sm text-uix-white-100",secondary:"bg-uix-surface-300/80 backdrop-blur-sm text-uix-text-100",outline:"border border-uix-border-200 bg-uix-surface-100/50 backdrop-blur-sm text-uix-text-300"},x={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm"},{onDrag:g,onDragStart:d,onDragEnd:p,...b}=o;return i.jsx(m.motion.span,{ref:a,className:c("inline-flex items-center rounded-xl font-medium",l,u[t],x[r],e),whileHover:{scale:1.05},whileTap:{scale:.97},transition:{type:"tween",duration:.1,ease:"linear"},...b,children:s})});w.displayName="Badge";const j=n.forwardRef(({className:e,variant:t,color:r="prime",size:s="md",children:o,...a},l)=>{const x=`inline-flex items-center justify-center rounded-full font-semibold transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300 disabled:pointer-events-none disabled:opacity-50 cursor-pointer backdrop-blur-sm ${t==="filled"?"uix-convex-colored-sm":"uix-convex-sm"}`,g="bg-uix-surface-200/70 text-uix-text-100 hover:bg-uix-surface-300/80",d={prime:"bg-uix-prime-300 text-uix-white-100 hover:bg-uix-prime-400",sub1:"bg-uix-sub1-300 text-uix-white-100 hover:bg-uix-sub1-400",sub2:"bg-uix-sub2-300 text-uix-black-300 hover:bg-uix-sub2-400"},p={prime:"border border-uix-prime-300/50 text-uix-prime-300 bg-uix-surface-100/20 hover:bg-uix-prime-300 hover:text-uix-white-100 hover:border-transparent",sub1:"border border-uix-sub1-300/50 text-uix-sub1-300 bg-uix-surface-100/20 hover:bg-uix-sub1-300 hover:text-uix-white-100 hover:border-transparent",sub2:"border border-uix-sub2-300/50 text-uix-sub2-400 bg-uix-surface-100/20 hover:bg-uix-sub2-300 hover:text-uix-black-300 hover:border-transparent"},b={prime:"bg-transparent text-uix-prime-300 hover:bg-uix-prime-100/15",sub1:"bg-transparent text-uix-sub1-300 hover:bg-uix-sub1-100/15",sub2:"bg-transparent text-uix-sub2-400 hover:bg-uix-sub2-100/15"},f={filled:d[r],outline:p[r],ghost:b[r]},h={sm:"px-4 py-2 text-sm",md:"px-6 py-3 text-base",lg:"px-8 py-4 text-lg"},te=t?f[t]:g;return i.jsx(m.motion.button,{ref:l,className:c(x,te,h[s],e),whileHover:{scale:1.03,y:-1},whileTap:{scale:.96},transition:{duration:.06,ease:[0,0,1,1]},...a,children:o})});j.displayName="Button";const T=n.forwardRef(({className:e,children:t,hover:r=!0,accentColor:s="none",accentPosition:o="none",...a},l)=>{const u={prime:"bg-uix-prime-300",sub1:"bg-uix-sub1-300",sub2:"bg-uix-sub2-300",none:""};return i.jsxs(m.motion.div,{ref:l,className:c("relative bg-uix-surface-100/80 backdrop-blur-xl backdrop-saturate-150 uix-glass-border rounded-[2rem] overflow-hidden uix-convex",e),initial:!1,whileHover:r?{y:-4,scale:1.01}:void 0,transition:{type:"tween",duration:.15,ease:"linear"},...a,children:[o==="top"&&s!=="none"&&i.jsx("div",{className:c("absolute top-0 left-0 right-0 h-1",u[s])}),o==="left"&&s!=="none"&&i.jsx("div",{className:c("absolute top-0 left-0 bottom-0 w-1",u[s])}),t]})});T.displayName="Card";const C=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("p-6 xl:p-8",e),...r,children:t}));C.displayName="CardContent";const k=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("flex items-center gap-4 mb-4",e),...r,children:t}));k.displayName="CardHeader";const R=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("h3",{ref:s,className:c("text-xl xl:text-2xl font-bold text-uix-text-100",e),...r,children:t}));R.displayName="CardTitle";const E=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("p",{ref:s,className:c("text-uix-gray-200 leading-relaxed",e),...r,children:t}));E.displayName="CardDescription";const D=n.forwardRef(({className:e,code:t,language:r="tsx",showLineNumbers:s=!1,...o},a)=>{const[l,u]=n.useState(!1),[x,g]=n.useState("");n.useEffect(()=>{(async()=>{const b=await se.codeToHtml(t.trim(),{lang:r,theme:"github-dark"});g(b)})()},[t,r]);const d=async()=>{await navigator.clipboard.writeText(t.trim()),u(!0),setTimeout(()=>u(!1),2e3)};return i.jsxs("div",{ref:a,className:c("relative rounded-2xl bg-uix-black-400 overflow-hidden uix-convex",e),...o,children:[i.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-uix-black-200",children:[i.jsx(w,{variant:"secondary",size:"sm",children:r}),i.jsx("button",{type:"button",onClick:d,className:"p-1.5 rounded-xl hover:bg-uix-black-200 transition-colors","aria-label":"Copy code",children:l?i.jsx(y.Check,{size:14,className:"text-green-400"}):i.jsx(y.Copy,{size:14,className:"text-uix-gray-100"})})]}),i.jsx("div",{className:c("p-4 overflow-x-auto text-sm","[&_pre]:!bg-transparent [&_pre]:!m-0 [&_pre]:!p-0","[&_code]:!bg-transparent",s&&"[&_.line]:before:content-[counter(line)] [&_.line]:before:counter-increment-[line] [&_.line]:before:mr-4 [&_.line]:before:text-uix-gray-300"),dangerouslySetInnerHTML:{__html:x}})]})});D.displayName="CodeBlock";const ne={prime:"var(--uix-prime-300)",sub1:"var(--uix-sub1-300)",sub2:"var(--uix-sub2-300)"},oe={prime:"bg-gradient-to-br from-uix-prime-400 via-uix-prime-300 to-uix-prime-400",sub1:"bg-gradient-to-br from-uix-sub1-400 via-uix-sub1-300 to-uix-sub1-400",sub2:"bg-gradient-to-br from-uix-sub2-400 via-uix-sub2-300 to-uix-sub2-400"};function ae({children:e,className:t="",color:r="prime",gradient:s=!1,delay:o=0,charDelay:a=.04}){const l=n.useRef(null),u=m.useInView(l,{once:!0,margin:"-50px"}),[x,g]=n.useState(!1),d=1,p=e.length,b=d+o+p*a+.25;return n.useEffect(()=>{if(s&&u&&!x){const f=setTimeout(()=>{g(!0)},b*1e3);return()=>clearTimeout(f)}},[s,u,x,b]),s&&x?i.jsx("span",{ref:l,className:`inline-block bg-clip-text text-transparent ${oe[r]} ${t}`,children:e}):i.jsx("span",{ref:l,className:`inline-block ${t}`,children:e.split("").map((f,h)=>i.jsx(m.motion.span,{className:"inline-block",style:{color:"var(--uix-text-100)"},animate:u?{color:ne[r]}:{},transition:{duration:.25,delay:d+o+h*a,ease:[.1,.1,.9,.9]},children:f===" "?" ":f},h))})}const L=n.createContext(null);function S(){const e=n.useContext(L);if(!e)throw new Error("Dropdown components must be used within a Dropdown");return e}function le({children:e,open:t,onOpenChange:r,className:s,...o}){const[a,l]=n.useState(!1),u=n.useRef(null),x=t??a,g=d=>{l(d),r==null||r(d)};return i.jsx(L.Provider,{value:{open:x,setOpen:g,triggerRef:u},children:i.jsx("div",{className:v.clsx("relative inline-block",s),...o,children:e})})}function ue({children:e,className:t,onClick:r,...s}){const{open:o,setOpen:a,triggerRef:l}=S();return i.jsxs("button",{ref:l,type:"button",className:v.clsx("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-sm font-medium","uix-glass uix-glass-border uix-convex-sm","text-uix-text-200 hover:text-uix-text-100 transition-colors",t),onClick:u=>{a(!o),r==null||r(u)},"aria-expanded":o,"aria-haspopup":"true",...s,children:[e,i.jsx("svg",{className:v.clsx("w-3.5 h-3.5 transition-transform duration-200",o&&"rotate-180"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]})}function ce({children:e,className:t,align:r="start"}){const{open:s,setOpen:o,triggerRef:a}=S(),l=n.useRef(null),[u,x]=n.useState({top:0,left:0});n.useLayoutEffect(()=>{if(!s||!a.current)return;const d=()=>{var f;const p=(f=a.current)==null?void 0:f.getBoundingClientRect();if(!p)return;let b=p.left;r==="center"?b=p.left+p.width/2:r==="end"&&(b=p.right),x({top:p.bottom+8,left:b})};return d(),window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d)}},[s,a,r]),n.useEffect(()=>{if(!s)return;const d=b=>{l.current&&!l.current.contains(b.target)&&a.current&&!a.current.contains(b.target)&&o(!1)},p=b=>{var f;b.key==="Escape"&&(o(!1),(f=a.current)==null||f.focus())};return document.addEventListener("mousedown",d),document.addEventListener("keydown",p),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",p)}},[s,o,a]);const g={start:{transform:"translateX(0)"},center:{transform:"translateX(-50%)"},end:{transform:"translateX(-100%)"}};return typeof document>"u"?null:ie.createPortal(i.jsx(m.AnimatePresence,{children:s&&i.jsx(m.motion.div,{ref:l,initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{type:"spring",stiffness:400,damping:25,mass:.8},className:v.clsx("fixed z-50 min-w-[180px]","uix-glass uix-glass-border uix-convex uix-glass-noise rounded-2xl","p-1.5 shadow-xl",t),style:{top:u.top,left:u.left,...g[r]},role:"menu",children:e})}),document.body)}function de({children:e,className:t,disabled:r,onClick:s,...o}){const{setOpen:a}=S();return i.jsx("button",{type:"button",role:"menuitem",disabled:r,className:v.clsx("w-full flex items-center gap-2 px-3 py-2 rounded-xl text-sm text-left","transition-colors duration-100",r?"text-uix-text-300 cursor-not-allowed":"text-uix-text-200 hover:text-uix-text-100 hover:bg-uix-surface-300/60",t),onClick:l=>{r||(s==null||s(l),a(!1))},...o,children:e})}function xe({className:e,...t}){return i.jsx("hr",{className:v.clsx("my-1.5 h-px border-0 bg-uix-border-100",e),...t})}const N=n.forwardRef(({className:e,orientation:t="vertical",children:r,...s},o)=>{const a={vertical:"overflow-y-auto overflow-x-hidden",horizontal:"overflow-x-auto overflow-y-hidden",both:"overflow-auto"};return i.jsx("div",{ref:o,className:c("relative",a[t],"[&::-webkit-scrollbar]:w-2","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-uix-gray-300/50","[&::-webkit-scrollbar-thumb]:rounded-full","[&::-webkit-scrollbar-thumb]:hover:bg-uix-gray-300",e),...s,children:r})});N.displayName="ScrollArea";function be({threshold:e=500,className:t}){const[r,s]=n.useState(!1);n.useEffect(()=>{const a=()=>{s(window.scrollY>e)};return window.addEventListener("scroll",a,{passive:!0}),()=>window.removeEventListener("scroll",a)},[e]);const o=()=>{window.scrollTo({top:0,behavior:"smooth"})};return i.jsx(m.AnimatePresence,{children:r&&i.jsx(m.motion.button,{initial:{opacity:0,scale:.5,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.5,y:20},whileHover:{scale:1.1,y:-2},whileTap:{scale:.9},transition:{default:{type:"spring",stiffness:300,damping:20,mass:.8},scale:{duration:.06,ease:[0,0,1,1]}},onClick:o,className:c("fixed bottom-6 right-6 z-50 p-3 rounded-full bg-uix-prime-300 backdrop-blur-sm text-uix-white-100 hover:bg-uix-prime-400 cursor-pointer uix-convex-colored",t),"aria-label":"Scroll to top",children:i.jsx(y.ChevronUp,{size:24})})})}const H=n.forwardRef(({className:e,children:t,variant:r="default",container:s=!0,animate:o=!0,id:a,...l},u)=>{const x=n.useRef(null),g=m.useInView(x,{once:!0,margin:"-100px"}),d="backdrop-blur-xl backdrop-saturate-150 uix-glass-border uix-convex",p={default:`bg-uix-surface-200/50 ${d}`,secondary:`bg-uix-surface-300/50 ${d}`,accent:`bg-uix-prime-300/60 ${d} text-uix-white-100`},b=s?i.jsx("div",{className:"max-w-4xl mx-auto px-6 xl:px-12",children:t}):t;return i.jsx("section",{ref:f=>{x.current=f,typeof u=="function"?u(f):u&&(u.current=f)},id:a,className:c("relative py-16 xl:py-24 rounded-[2.5rem]",p[r],e),...l,children:o?i.jsx(m.motion.div,{initial:{opacity:0,y:40},animate:g?{opacity:1,y:0}:{opacity:0,y:40},transition:{type:"spring",stiffness:200,damping:25,mass:1},children:b}):b})});H.displayName="Section";const I=n.forwardRef(({className:e,children:t,subtitle:r,...s},o)=>i.jsxs("div",{className:"text-center mb-14 xl:mb-20",children:[i.jsx("h2",{ref:o,className:c("text-4xl xl:text-6xl font-bold text-uix-text-100 mb-6 tracking-tight",e),...s,children:t}),r&&i.jsx("p",{className:"text-xl xl:text-2xl text-uix-gray-200 max-w-3xl mx-auto leading-relaxed",children:r})]}));I.displayName="SectionTitle";const P=n.createContext(null),me=()=>{const e=n.useContext(P);if(!e)throw new Error("Sheet components must be used within a Sheet provider");return e},z=({open:e,onOpenChange:t,children:r})=>(n.useEffect(()=>{const s=o=>{o.key==="Escape"&&e&&t(!1)};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),n.useEffect(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),i.jsx(P.Provider,{value:{open:e,onOpenChange:t},children:r}));z.displayName="Sheet";const B=n.forwardRef(({className:e,side:t="left",children:r},s)=>{const{open:o,onOpenChange:a}=me(),l={left:{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"}},right:{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"}}},u={left:"left-0",right:"right-0"};return i.jsx(m.AnimatePresence,{children:o&&i.jsxs(i.Fragment,{children:[i.jsx(m.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:()=>a(!1)}),i.jsx(m.motion.div,{ref:s,initial:l[t].initial,animate:l[t].animate,exit:l[t].exit,transition:{type:"spring",damping:25,stiffness:300},className:c("fixed top-0 z-50 h-full w-72 bg-uix-surface-100/90 backdrop-blur-xl backdrop-saturate-150 border-r border-black/[0.3] dark:border-white/[0.03] rounded-r-3xl uix-convex-lg",u[t],e),children:r})]})})});B.displayName="SheetContent";const M=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("flex flex-col gap-2 p-6 border-b border-uix-border-100",e),...r,children:t}));M.displayName="SheetHeader";const A=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("h2",{ref:s,className:c("text-lg font-semibold text-uix-text-100",e),...r,children:t}));A.displayName="SheetTitle";const pe="relative uix-glass uix-glass-border uix-convex uix-glass-noise rounded-3xl",V=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("aside",{ref:s,className:c("hidden xl:flex flex-col w-60 h-full",pe,e),...r,children:t}));V.displayName="Sidebar";const _=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("flex flex-col gap-1 p-6",e),...r,children:t}));_.displayName="SidebarHeader";const $=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx(N,{ref:s,className:c("flex-1 p-4",e),...r,children:t}));$.displayName="SidebarContent";const q=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("mb-6",e),...r,children:t}));q.displayName="SidebarGroup";const G=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("px-3 mb-3 text-xs font-semibold uppercase tracking-widest text-uix-sub1-300/80",e),...r,children:t}));G.displayName="SidebarGroupLabel";const O=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("ul",{ref:s,className:c("space-y-1",e),...r,children:t}));O.displayName="SidebarMenu";const X=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("li",{ref:s,className:c("",e),...r,children:t}));X.displayName="SidebarMenuItem";const F=n.forwardRef(({className:e,isActive:t=!1,children:r,...s},o)=>{const{onDrag:a,onDragStart:l,onDragEnd:u,...x}=s;return i.jsxs(m.motion.button,{ref:o,type:"button",className:c("relative flex w-full items-center gap-2 rounded-xl px-3 py-2.5 text-base font-medium","hover:bg-uix-surface-300/50 hover:text-uix-text-100",t?"text-uix-prime-300 bg-uix-prime-100/15":"text-uix-text-300",e),whileHover:{x:4,scale:1.01},whileTap:{scale:.97},transition:{duration:.08,ease:[0,0,1,1]},...x,children:[t&&i.jsx(m.motion.span,{className:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-uix-prime-300 rounded-r-full",layoutId:"sidebar-active-indicator",transition:{type:"spring",stiffness:300,damping:20,mass:.8}}),r]})});F.displayName="SidebarMenuButton";const U=n.forwardRef(({className:e,variant:t="default",rounded:r="3xl",children:s,...o},a)=>{const l="relative uix-glass uix-glass-border uix-convex uix-glass-noise",u={default:"",subtle:"uix-convex-subtle",strong:"uix-convex-lg"},x={none:"rounded-none",sm:"rounded-lg",md:"rounded-xl",lg:"rounded-2xl",xl:"rounded-[1.5rem]","2xl":"rounded-[2rem]","3xl":"rounded-3xl",full:"rounded-full"};return i.jsx("div",{ref:a,className:c(l,u[t],x[r],e),...o,children:s})});U.displayName="Surface";const W=n.createContext(null),Y=()=>{const e=n.useContext(W);if(!e)throw new Error("Tabs components must be used within a Tabs provider");return e},J=n.forwardRef(({className:e,defaultValue:t,children:r,...s},o)=>{const[a,l]=n.useState(t),u=n.useId();return i.jsx(W.Provider,{value:{activeTab:a,setActiveTab:l,tabsId:u},children:i.jsx("div",{ref:o,className:c("w-full",e),...s,children:r})})});J.displayName="Tabs";const K=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("inline-flex items-center gap-1 rounded-2xl bg-uix-surface-300/50 backdrop-blur-xl backdrop-saturate-150 uix-glass-border p-1.5 uix-convex",e),...r,children:t}));K.displayName="TabsList";const Q=n.forwardRef(({className:e,value:t,children:r,...s},o)=>{const{activeTab:a,setActiveTab:l,tabsId:u}=Y(),x=a===t,{onDrag:g,onDragStart:d,onDragEnd:p,...b}=s;return i.jsxs(m.motion.button,{ref:o,type:"button",onClick:()=>l(t),className:c("relative inline-flex items-center justify-center px-4 py-2 text-base font-medium rounded-xl","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300",x?"text-uix-text-100":"text-uix-text-300 hover:text-uix-text-100",e),whileHover:{scale:1.02},whileTap:{scale:.96},transition:{duration:.06,ease:[0,0,1,1]},...b,children:[x&&i.jsx(m.motion.span,{layoutId:`tabs-indicator-${u}`,className:"absolute inset-0 bg-uix-surface-100 rounded-xl uix-convex-sm",transition:{type:"spring",stiffness:300,damping:20,mass:.8}}),i.jsx("span",{className:"relative z-10",children:r})]})});Q.displayName="TabsTrigger";const Z=n.forwardRef(({className:e,children:t,...r},s)=>i.jsx("div",{ref:s,className:c("relative mt-4",e),...r,children:i.jsx("div",{className:"grid [&>*]:col-start-1 [&>*]:row-start-1",children:t})}));Z.displayName="TabsPanels";const ee=n.forwardRef(({className:e,value:t,children:r,...s},o)=>{const{activeTab:a}=Y(),l=a===t;return i.jsx(m.motion.div,{ref:o,className:c(e),initial:!1,animate:{opacity:l?1:0,scale:l?1:.98,y:l?0:8,visibility:l?"visible":"hidden"},transition:{type:"spring",stiffness:400,damping:25,mass:.8},"aria-hidden":!l,children:i.jsx("div",{...s,children:r})})});ee.displayName="TabsContent";exports.Badge=w;exports.Button=j;exports.Card=T;exports.CardContent=C;exports.CardDescription=E;exports.CardHeader=k;exports.CardTitle=R;exports.CodeBlock=D;exports.ColorSwipeText=ae;exports.Dropdown=le;exports.DropdownContent=ce;exports.DropdownItem=de;exports.DropdownSeparator=xe;exports.DropdownTrigger=ue;exports.ScrollArea=N;exports.ScrollToTop=be;exports.Section=H;exports.SectionTitle=I;exports.Sheet=z;exports.SheetContent=B;exports.SheetHeader=M;exports.SheetTitle=A;exports.Sidebar=V;exports.SidebarContent=$;exports.SidebarGroup=q;exports.SidebarGroupLabel=G;exports.SidebarHeader=_;exports.SidebarMenu=O;exports.SidebarMenuButton=F;exports.SidebarMenuItem=X;exports.Surface=U;exports.Tabs=J;exports.TabsContent=ee;exports.TabsList=K;exports.TabsPanels=Z;exports.TabsTrigger=Q;exports.cn=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),Q=require("clsx"),D=require("motion/react"),r=require("react"),Ye=require("tailwind-merge"),Nt=require("lucide-react"),Fe=require("shiki"),Vt=require("react-dom"),$t=r.createContext(null),Yt=r.createContext(null),Ft=()=>{const n=r.useContext($t);if(!n)throw new Error("Accordion components must be used within an Accordion");return n},Ut=()=>{const n=r.useContext(Yt);if(!n)throw new Error("AccordionTrigger/Content must be used within an AccordionItem");return n},Xt=r.forwardRef(({children:n,className:s,multiple:t=!0,defaultValue:a=[],...l},i)=>{const[c,d]=r.useState(()=>new Set(a)),p=u=>{d(f=>{const e=new Set(f);return e.has(u)?e.delete(u):(t||e.clear(),e.add(u)),e})};return o.jsx($t.Provider,{value:{openItems:c,toggle:p,multiple:t},children:o.jsx("div",{ref:i,className:Q.clsx("space-y-2",s),...l,children:n})})});Xt.displayName="Accordion";const Wt=r.forwardRef(({children:n,className:s,value:t,disabled:a=!1,...l},i)=>{const{openItems:c}=Ft(),d=c.has(t);return o.jsx(Yt.Provider,{value:{value:t,isOpen:d,disabled:a},children:o.jsx("div",{ref:i,className:Q.clsx("border border-black/5 dark:border-white/5 rounded-xl overflow-hidden",a&&"opacity-50",s),...l,children:n})})});Wt.displayName="AccordionItem";const qt=r.forwardRef(({children:n,className:s,...t},a)=>{const{toggle:l}=Ft(),{value:i,isOpen:c,disabled:d}=Ut();return o.jsx("button",{ref:a,type:"button",disabled:d,onClick:()=>!d&&l(i),className:Q.clsx("w-full flex items-center justify-between px-4 py-3 text-left transition-colors",c?"bg-uix-surface-200/50":"hover:bg-uix-surface-200/30",d&&"cursor-not-allowed",s),"aria-expanded":c,...t,children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("svg",{className:Q.clsx("w-4 h-4 text-uix-text-300 transition-transform duration-200",c&&"rotate-90"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),n]})})});qt.displayName="AccordionTrigger";const Kt=r.forwardRef(({children:n,className:s,...t},a)=>{const{isOpen:l}=Ut();return o.jsx(D.AnimatePresence,{initial:!1,children:l&&o.jsx(D.motion.div,{ref:a,initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},children:o.jsx("div",{className:Q.clsx("px-4 pb-4 pt-2",s),...t,children:n})})})});Kt.displayName="AccordionContent";function x(...n){return Ye.twMerge(Q.clsx(n))}const kt=r.forwardRef(({className:n,variant:s="default",size:t="sm",children:a,...l},i)=>{const c=s==="default"?"uix-convex-colored-sm":"uix-convex-sm",d={default:"bg-uix-prime-300 backdrop-blur-sm text-uix-white-100",secondary:"bg-uix-surface-300/80 backdrop-blur-sm text-uix-text-100",outline:"border border-uix-border-200 bg-uix-surface-100/50 backdrop-blur-sm text-uix-text-300"},p={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm"},{onDrag:u,onDragStart:f,onDragEnd:e,...m}=l;return o.jsx(D.motion.span,{ref:i,className:x("inline-flex items-center rounded-xl font-medium",c,d[s],p[t],n),whileHover:{scale:1.05},whileTap:{scale:.97},transition:{type:"tween",duration:.1,ease:"linear"},...m,children:a})});kt.displayName="Badge";const Gt=r.forwardRef(({className:n,variant:s,color:t="prime",size:a="md",children:l,...i},c)=>{const p=`inline-flex items-center justify-center rounded-full font-semibold transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300 disabled:pointer-events-none disabled:opacity-50 cursor-pointer backdrop-blur-sm ${s==="filled"?"uix-convex-colored-sm":"uix-convex-sm"}`,u="bg-uix-surface-200/70 text-uix-text-100 hover:bg-uix-surface-300/80",f={prime:"bg-uix-prime-300 text-uix-white-100 hover:bg-uix-prime-400",sub1:"bg-uix-sub1-300 text-uix-white-100 hover:bg-uix-sub1-400",sub2:"bg-uix-sub2-300 text-uix-black-300 hover:bg-uix-sub2-400"},e={prime:"border border-uix-prime-300/50 text-uix-prime-300 bg-uix-surface-100/20 hover:bg-uix-prime-300 hover:text-uix-white-100 hover:border-transparent",sub1:"border border-uix-sub1-300/50 text-uix-sub1-300 bg-uix-surface-100/20 hover:bg-uix-sub1-300 hover:text-uix-white-100 hover:border-transparent",sub2:"border border-uix-sub2-300/50 text-uix-sub2-400 bg-uix-surface-100/20 hover:bg-uix-sub2-300 hover:text-uix-black-300 hover:border-transparent"},m={prime:"bg-transparent text-uix-prime-300 hover:bg-uix-prime-100/15",sub1:"bg-transparent text-uix-sub1-300 hover:bg-uix-sub1-100/15",sub2:"bg-transparent text-uix-sub2-400 hover:bg-uix-sub2-100/15"},y={filled:f[t],outline:e[t],ghost:m[t]},S={sm:"px-4 py-2 text-sm",md:"px-6 py-3 text-base",lg:"px-8 py-4 text-lg"},q=s?y[s]:u;return o.jsx(D.motion.button,{ref:c,className:x(p,q,S[a],n),whileHover:{scale:1.03,y:-1},whileTap:{scale:.96},transition:{duration:.06,ease:[0,0,1,1]},...i,children:l})});Gt.displayName="Button";const Qt=r.forwardRef(({className:n,children:s,hover:t=!0,accentColor:a="none",accentPosition:l="none",...i},c)=>{const d={prime:"bg-uix-prime-300",sub1:"bg-uix-sub1-300",sub2:"bg-uix-sub2-300",none:""};return o.jsxs(D.motion.div,{ref:c,className:x("relative bg-uix-surface-100/80 backdrop-blur-xl backdrop-saturate-150 uix-glass-border rounded-[2rem] overflow-hidden uix-convex",n),initial:!1,whileHover:t?{y:-4,scale:1.01}:void 0,transition:{type:"tween",duration:.15,ease:"linear"},...i,children:[l==="top"&&a!=="none"&&o.jsx("div",{className:x("absolute top-0 left-0 right-0 h-1",d[a])}),l==="left"&&a!=="none"&&o.jsx("div",{className:x("absolute top-0 left-0 bottom-0 w-1",d[a])}),s]})});Qt.displayName="Card";const Zt=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("div",{ref:a,className:x("p-6 xl:p-8",n),...t,children:s}));Zt.displayName="CardContent";const Jt=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("div",{ref:a,className:x("flex items-center gap-4 mb-4",n),...t,children:s}));Jt.displayName="CardHeader";const te=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("h3",{ref:a,className:x("text-xl xl:text-2xl font-bold text-uix-text-100",n),...t,children:s}));te.displayName="CardTitle";const ee=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("p",{ref:a,className:x("text-uix-gray-200 leading-relaxed",n),...t,children:s}));ee.displayName="CardDescription";const se=r.forwardRef(({className:n,code:s,language:t="tsx",showLineNumbers:a=!1,...l},i)=>{const[c,d]=r.useState(!1),[p,u]=r.useState("");r.useEffect(()=>{(async()=>{const m=await Fe.codeToHtml(s.trim(),{lang:t,theme:"github-dark"});u(m)})()},[s,t]);const f=async()=>{await navigator.clipboard.writeText(s.trim()),d(!0),setTimeout(()=>d(!1),2e3)};return o.jsxs("div",{ref:i,className:x("relative rounded-2xl bg-uix-black-400 overflow-hidden uix-convex",n),...l,children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-uix-black-200",children:[o.jsx(kt,{variant:"secondary",size:"sm",children:t}),o.jsx("button",{type:"button",onClick:f,className:"p-1.5 rounded-xl hover:bg-uix-black-200 transition-colors","aria-label":"Copy code",children:c?o.jsx(Nt.Check,{size:14,className:"text-green-400"}):o.jsx(Nt.Copy,{size:14,className:"text-uix-gray-100"})})]}),o.jsx("div",{className:x("p-4 overflow-x-auto text-sm","[&_pre]:!bg-transparent [&_pre]:!m-0 [&_pre]:!p-0","[&_code]:!bg-transparent",a&&"[&_.line]:before:content-[counter(line)] [&_.line]:before:counter-increment-[line] [&_.line]:before:mr-4 [&_.line]:before:text-uix-gray-300"),dangerouslySetInnerHTML:{__html:p}})]})});se.displayName="CodeBlock";const Ue={prime:"var(--uix-prime-300)",sub1:"var(--uix-sub1-300)",sub2:"var(--uix-sub2-300)"},Xe={prime:"bg-gradient-to-br from-uix-prime-400 via-uix-prime-300 to-uix-prime-400",sub1:"bg-gradient-to-br from-uix-sub1-400 via-uix-sub1-300 to-uix-sub1-400",sub2:"bg-gradient-to-br from-uix-sub2-400 via-uix-sub2-300 to-uix-sub2-400"};function We({children:n,className:s="",color:t="prime",gradient:a=!1,delay:l=0,charDelay:i=.04}){const c=r.useRef(null),d=D.useInView(c,{once:!0,margin:"-50px"}),[p,u]=r.useState(!1),f=1,e=n.length,m=f+l+e*i+.25;return r.useEffect(()=>{if(a&&d&&!p){const y=setTimeout(()=>{u(!0)},m*1e3);return()=>clearTimeout(y)}},[a,d,p,m]),a&&p?o.jsx("span",{ref:c,className:`inline-block bg-clip-text text-transparent ${Xe[t]} ${s}`,children:n}):o.jsx("span",{ref:c,className:`inline-block ${s}`,children:n.split("").map((y,S)=>o.jsx(D.motion.span,{className:"inline-block",style:{color:"var(--uix-text-100)"},animate:d?{color:Ue[t]}:{},transition:{duration:.25,delay:f+l+S*i,ease:[.1,.1,.9,.9]},children:y===" "?" ":y},S))})}const ne=r.createContext(null);function Dt(){const n=r.useContext(ne);if(!n)throw new Error("Dropdown components must be used within a Dropdown");return n}function qe({children:n,open:s,onOpenChange:t,className:a,...l}){const[i,c]=r.useState(!1),d=r.useRef(null),p=s??i,u=f=>{c(f),t==null||t(f)};return o.jsx(ne.Provider,{value:{open:p,setOpen:u,triggerRef:d},children:o.jsx("div",{className:Q.clsx("relative inline-block",a),...l,children:n})})}function Ke({children:n,className:s,onClick:t,...a}){const{open:l,setOpen:i,triggerRef:c}=Dt();return o.jsxs("button",{ref:c,type:"button",className:Q.clsx("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-sm font-medium","uix-glass uix-glass-border uix-convex-sm","text-uix-text-200 hover:text-uix-text-100 transition-colors",s),onClick:d=>{i(!l),t==null||t(d)},"aria-expanded":l,"aria-haspopup":"true",...a,children:[n,o.jsx("svg",{className:Q.clsx("w-3.5 h-3.5 transition-transform duration-200",l&&"rotate-180"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]})}function Ge({children:n,className:s,align:t="start"}){const{open:a,setOpen:l,triggerRef:i}=Dt(),c=r.useRef(null),[d,p]=r.useState({top:0,left:0});r.useLayoutEffect(()=>{if(!a||!i.current)return;const f=()=>{var y;const e=(y=i.current)==null?void 0:y.getBoundingClientRect();if(!e)return;let m=e.left;t==="center"?m=e.left+e.width/2:t==="end"&&(m=e.right),p({top:e.bottom+8,left:m})};return f(),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[a,i,t]),r.useEffect(()=>{if(!a)return;const f=m=>{c.current&&!c.current.contains(m.target)&&i.current&&!i.current.contains(m.target)&&l(!1)},e=m=>{var y;m.key==="Escape"&&(l(!1),(y=i.current)==null||y.focus())};return document.addEventListener("mousedown",f),document.addEventListener("keydown",e),()=>{document.removeEventListener("mousedown",f),document.removeEventListener("keydown",e)}},[a,l,i]);const u={start:{transform:"translateX(0)"},center:{transform:"translateX(-50%)"},end:{transform:"translateX(-100%)"}};return typeof document>"u"?null:Vt.createPortal(o.jsx(D.AnimatePresence,{children:a&&o.jsx(D.motion.div,{ref:c,initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{type:"spring",stiffness:400,damping:25,mass:.8},className:Q.clsx("fixed z-50 min-w-[180px]","uix-glass uix-glass-border uix-convex uix-glass-noise rounded-2xl","p-1.5 shadow-xl",s),style:{top:d.top,left:d.left,...u[t]},role:"menu",children:n})}),document.body)}function Qe({children:n,className:s,disabled:t,onClick:a,...l}){const{setOpen:i}=Dt();return o.jsx("button",{type:"button",role:"menuitem",disabled:t,className:Q.clsx("w-full flex items-center gap-2 px-3 py-2 rounded-xl text-sm text-left","transition-colors duration-100",t?"text-uix-text-300 cursor-not-allowed":"text-uix-text-200 hover:text-uix-text-100 hover:bg-uix-surface-300/60",s),onClick:c=>{t||(a==null||a(c),i(!1))},...l,children:n})}function Ze({className:n,...s}){return o.jsx("hr",{className:Q.clsx("my-1.5 h-px border-0 bg-white/15",n),...s})}const ae=({onFileSelect:n,onFilesSelect:s,accept:t="image/*",maxSizeMB:a=10,multiple:l=!1,disabled:i=!1,size:c="md",icon:d,title:p,description:u,className:f,onError:e})=>{const m=r.useRef(null),[y,S]=r.useState(!1),q=g=>{const P=a*1024*1024;return g.size>P?(e==null||e(`파일 크기는 ${a}MB 이하여야 합니다`),!1):!0},z=g=>{if(!g||g.length===0)return;const P=[];for(const $ of Array.from(g))q($)&&P.push($);P.length!==0&&(l&&s?s(P):n(P[0]))},v=g=>{z(g.target.files),g.target.value=""},F=g=>{g.preventDefault(),S(!1),!i&&z(g.dataTransfer.files)},h=g=>{g.preventDefault(),i||S(!0)},T=()=>{S(!1)},R=g=>{if(i)return;const P=g.clipboardData.items,$=[];for(const N of Array.from(P))if(N.type.startsWith("image/")||t==="*"){const M=N.getAsFile();if(M&&q(M)&&($.push(M),!l))break}$.length>0&&(l&&s?s($):n($[0]))},E=()=>{var g;i||(g=m.current)==null||g.click()},L=g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),E())},k={sm:"p-6",md:"p-10",lg:"p-14"},B={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16"},I=x("relative rounded-3xl text-center cursor-pointer transition-all duration-200","uix-glass uix-glass-border uix-convex","border-2 border-dashed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300",k[c],y?"border-uix-prime-300 bg-uix-prime-500/10":"border-uix-border-100 hover:border-uix-prime-300/50",i&&"opacity-50 cursor-not-allowed"),U=p??"파일을 선택하거나 드래그하세요",V=u??"클릭, 드래그 앤 드롭, 또는 붙여넣기";return o.jsxs(D.motion.div,{className:x(I,f),onClick:E,onDrop:F,onDragOver:h,onDragLeave:T,onPaste:R,onKeyDown:L,tabIndex:i?-1:0,role:"button","aria-label":U,"aria-disabled":i,whileHover:i?void 0:{scale:1.01},whileTap:i?void 0:{scale:.99},transition:{duration:.1},children:[o.jsx("input",{ref:m,type:"file",accept:t,multiple:l,onChange:v,disabled:i,className:"hidden",tabIndex:-1}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"flex justify-center",children:d??o.jsx(Nt.Upload,{className:x(B[c],"transition-colors",y?"text-uix-prime-300":"text-uix-text-300"),strokeWidth:1.5})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-uix-text-100 font-medium mb-1",children:U}),o.jsx("p",{className:"text-sm text-uix-text-200",children:V})]}),o.jsxs("p",{className:"text-xs text-uix-text-300",children:["최대 ",a,"MB"]})]})]})};ae.displayName="FileUploader";const re=({length:n=6,onComplete:s,onChange:t,disabled:a=!1,error:l=!1,mask:i=!1,size:c="md",type:d="numeric",className:p,autoFocus:u=!0})=>{const[f,e]=r.useState(Array(n).fill("")),m=r.useRef([]);r.useEffect(()=>{var h;u&&((h=m.current[0])==null||h.focus())},[u]),r.useEffect(()=>{const h=f.join("");t==null||t(h),h.length===n&&f.every(T=>T!=="")&&s(h)},[f,n,s,t]);const y=h=>d==="numeric"?h.replace(/\D/g,""):h.replace(/[^a-zA-Z0-9]/g,""),S=(h,T)=>{var L;const R=y(T).slice(-1),E=[...f];E[h]=R,e(E),R&&h<n-1&&((L=m.current[h+1])==null||L.focus())},q=(h,T)=>{var R,E,L;if(T.key==="Backspace")if(!f[h]&&h>0){(R=m.current[h-1])==null||R.focus();const k=[...f];k[h-1]="",e(k)}else{const k=[...f];k[h]="",e(k)}else T.key==="ArrowLeft"&&h>0?(E=m.current[h-1])==null||E.focus():T.key==="ArrowRight"&&h<n-1&&((L=m.current[h+1])==null||L.focus())},z=h=>{var R;h.preventDefault();const T=y(h.clipboardData.getData("text")).slice(0,n);if(T){const E=[...f];for(let k=0;k<T.length;k++)E[k]=T[k];e(E);const L=Math.min(T.length,n-1);(R=m.current[L])==null||R.focus()}},v={sm:{input:"w-10 h-11 text-lg",gap:"gap-2"},md:{input:"w-12 h-14 text-xl",gap:"gap-3"},lg:{input:"w-14 h-16 text-2xl",gap:"gap-3"}},F=x("text-center font-semibold rounded-2xl outline-none transition-all","uix-glass uix-glass-border","focus:ring-2 text-uix-text-100","disabled:opacity-50 disabled:cursor-not-allowed",v[c].input,l?"border-uix-sub1-400 focus:ring-uix-sub1-300/30":"focus:border-uix-prime-300 focus:ring-uix-prime-300/20");return o.jsx("div",{className:x("flex justify-center",v[c].gap,p),children:f.map((h,T)=>o.jsx("input",{ref:R=>{m.current[T]=R},type:i?"password":"text",inputMode:d==="numeric"?"numeric":"text",maxLength:1,value:h,onChange:R=>S(T,R.target.value),onKeyDown:R=>q(T,R),onPaste:z,disabled:a,className:F,autoComplete:"one-time-code","aria-label":`PIN 입력 ${T+1}/${n}`},T))})};re.displayName="PinInput";const Rt=r.forwardRef(({className:n,orientation:s="vertical",children:t,...a},l)=>{const i={vertical:"overflow-y-auto overflow-x-hidden",horizontal:"overflow-x-auto overflow-y-hidden",both:"overflow-auto"};return o.jsx("div",{ref:l,className:x("relative",i[s],"[&::-webkit-scrollbar]:w-2","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:bg-uix-gray-300/50","[&::-webkit-scrollbar-thumb]:rounded-full","[&::-webkit-scrollbar-thumb]:hover:bg-uix-gray-300",n),...a,children:t})});Rt.displayName="ScrollArea";function Je({threshold:n=500,className:s}){const[t,a]=r.useState(!1);r.useEffect(()=>{const i=()=>{a(window.scrollY>n)};return window.addEventListener("scroll",i,{passive:!0}),()=>window.removeEventListener("scroll",i)},[n]);const l=()=>{window.scrollTo({top:0,behavior:"smooth"})};return o.jsx(D.AnimatePresence,{children:t&&o.jsx(D.motion.button,{initial:{opacity:0,scale:.5,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.5,y:20},whileHover:{scale:1.1,y:-2},whileTap:{scale:.9},transition:{default:{type:"spring",stiffness:300,damping:20,mass:.8},scale:{duration:.06,ease:[0,0,1,1]}},onClick:l,className:x("fixed bottom-6 right-6 z-50 p-3 rounded-full bg-uix-prime-300 backdrop-blur-sm text-uix-white-100 hover:bg-uix-prime-400 cursor-pointer uix-convex-colored",s),"aria-label":"Scroll to top",children:o.jsx(Nt.ChevronUp,{size:24})})})}const oe=r.forwardRef(({className:n,children:s,variant:t="default",container:a=!0,animate:l=!0,id:i,...c},d)=>{const p=r.useRef(null),u=D.useInView(p,{once:!0,margin:"-100px"}),f="backdrop-blur-xl backdrop-saturate-150 uix-glass-border uix-convex",e={default:`bg-uix-surface-200/50 ${f}`,secondary:`bg-uix-surface-300/50 ${f}`,accent:`bg-uix-prime-300/60 ${f} text-uix-white-100`},m=a?o.jsx("div",{className:"max-w-4xl mx-auto px-6 xl:px-12",children:s}):s;return o.jsx("section",{ref:y=>{p.current=y,typeof d=="function"?d(y):d&&(d.current=y)},id:i,className:x("relative py-16 xl:py-24 rounded-[2.5rem]",e[t],n),...c,children:l?o.jsx(D.motion.div,{initial:{opacity:0,y:40},animate:u?{opacity:1,y:0}:{opacity:0,y:40},transition:{type:"spring",stiffness:200,damping:25,mass:1},children:m}):m})});oe.displayName="Section";const ie=r.forwardRef(({className:n,children:s,subtitle:t,...a},l)=>o.jsxs("div",{className:"text-center mb-14 xl:mb-20",children:[o.jsx("h2",{ref:l,className:x("text-4xl xl:text-6xl font-bold text-uix-text-100 mb-6 tracking-tight",n),...a,children:s}),t&&o.jsx("p",{className:"text-xl xl:text-2xl text-uix-gray-200 max-w-3xl mx-auto leading-relaxed",children:t})]}));ie.displayName="SectionTitle";const le=r.createContext(null),ts=()=>{const n=r.useContext(le);if(!n)throw new Error("Sheet components must be used within a Sheet provider");return n},ce=({open:n,onOpenChange:s,children:t})=>(r.useEffect(()=>{const a=l=>{l.key==="Escape"&&n&&s(!1)};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[n,s]),r.useEffect(()=>(n?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[n]),o.jsx(le.Provider,{value:{open:n,onOpenChange:s},children:t}));ce.displayName="Sheet";const de=r.forwardRef(({className:n,side:s="left",children:t},a)=>{const{open:l,onOpenChange:i}=ts(),c={left:{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"}},right:{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"}}},d={left:"left-0",right:"right-0"};return o.jsx(D.AnimatePresence,{children:l&&o.jsxs(o.Fragment,{children:[o.jsx(D.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",onClick:()=>i(!1)}),o.jsx(D.motion.div,{ref:a,initial:c[s].initial,animate:c[s].animate,exit:c[s].exit,transition:{type:"spring",damping:25,stiffness:300},className:x("fixed top-0 z-50 h-full w-72 bg-uix-surface-100/90 backdrop-blur-xl backdrop-saturate-150 border-r border-black/[0.3] dark:border-white/[0.03] rounded-r-3xl uix-convex-lg",d[s],n),children:t})]})})});de.displayName="SheetContent";const ue=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("div",{ref:a,className:x("flex flex-col gap-2 p-6 border-b border-black/10 dark:border-white/10",n),...t,children:s}));ue.displayName="SheetHeader";const fe=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("h2",{ref:a,className:x("text-lg font-semibold text-uix-text-100",n),...t,children:s}));fe.displayName="SheetTitle";const es="relative uix-glass uix-glass-border uix-convex uix-glass-noise rounded-3xl",me=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("aside",{ref:a,className:x("hidden xl:flex flex-col w-60 h-full",es,n),...t,children:s}));me.displayName="Sidebar";const pe=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("div",{ref:a,className:x("flex flex-col gap-1 p-6",n),...t,children:s}));pe.displayName="SidebarHeader";const xe=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx(Rt,{ref:a,className:x("flex-1 p-4",n),...t,children:s}));xe.displayName="SidebarContent";const be=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("div",{ref:a,className:x("mb-6",n),...t,children:s}));be.displayName="SidebarGroup";const ge=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("div",{ref:a,className:x("px-3 mb-3 text-xs font-semibold uppercase tracking-widest text-uix-sub1-300/80",n),...t,children:s}));ge.displayName="SidebarGroupLabel";const he=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("ul",{ref:a,className:x("space-y-1",n),...t,children:s}));he.displayName="SidebarMenu";const ve=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("li",{ref:a,className:x("",n),...t,children:s}));ve.displayName="SidebarMenuItem";const ye=r.forwardRef(({className:n,isActive:s=!1,children:t,...a},l)=>{const{onDrag:i,onDragStart:c,onDragEnd:d,...p}=a;return o.jsxs(D.motion.button,{ref:l,type:"button",className:x("relative flex w-full items-center gap-2 rounded-xl px-3 py-2.5 text-base font-medium","hover:bg-uix-surface-300/50 hover:text-uix-text-100",s?"text-uix-prime-300 bg-uix-prime-100/15":"text-uix-text-300",n),whileHover:{x:4,scale:1.01},whileTap:{scale:.97},transition:{duration:.08,ease:[0,0,1,1]},...p,children:[s&&o.jsx(D.motion.span,{className:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-uix-prime-300 rounded-r-full",layoutId:"sidebar-active-indicator",transition:{type:"spring",stiffness:300,damping:20,mass:.8}}),t]})});ye.displayName="SidebarMenuButton";const we=({value:n,onChange:s,min:t=0,max:a=100,step:l=1,disabled:i=!1,size:c="md",color:d="prime",showValue:p=!1,showMinMax:u=!1,marks:f,label:e,description:m,className:y})=>{const S=r.useRef(null),[q,z]=r.useState(!1),v=(n-t)/(a-t)*100,F=r.useCallback(B=>{if(!S.current)return n;const I=S.current.getBoundingClientRect(),U=Math.max(0,Math.min(1,(B-I.left)/I.width)),V=t+U*(a-t),g=Math.round(V/l)*l;return Math.max(t,Math.min(a,g))},[t,a,l,n]),h=B=>{if(i)return;B.preventDefault(),z(!0);const I=F(B.clientX);s(I);const U=g=>{const P=F(g.clientX);s(P)},V=()=>{z(!1),document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",V)};document.addEventListener("mousemove",U),document.addEventListener("mouseup",V)},T=B=>{if(i)return;z(!0);const I=B.touches[0],U=F(I.clientX);s(U);const V=P=>{const $=P.touches[0],N=F($.clientX);s(N)},g=()=>{z(!1),document.removeEventListener("touchmove",V),document.removeEventListener("touchend",g)};document.addEventListener("touchmove",V),document.addEventListener("touchend",g)},R=B=>{if(i)return;let I=n;switch(B.key){case"ArrowRight":case"ArrowUp":I=Math.min(a,n+l);break;case"ArrowLeft":case"ArrowDown":I=Math.max(t,n-l);break;case"Home":I=t;break;case"End":I=a;break;default:return}B.preventDefault(),s(I)},E={sm:{track:"h-1.5",thumb:"w-4 h-4"},md:{track:"h-2",thumb:"w-5 h-5"},lg:{track:"h-3",thumb:"w-6 h-6"}},L={prime:"bg-uix-prime-400",sub1:"bg-uix-sub1-400",sub2:"bg-uix-sub2-400"},k={prime:"bg-uix-prime-300",sub1:"bg-uix-sub1-300",sub2:"bg-uix-sub2-300"};return o.jsxs("div",{className:x("w-full",y),children:[(e||p)&&o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e&&o.jsx("span",{className:"text-sm font-medium text-uix-text-100",children:e}),p&&o.jsx("span",{className:"text-sm font-semibold text-uix-text-200",children:n})]}),m&&o.jsx("p",{className:"text-sm text-uix-text-300 mb-3",children:m}),o.jsxs("div",{ref:S,className:x("relative w-full rounded-full cursor-pointer","uix-glass uix-glass-border",E[c].track,i&&"opacity-50 cursor-not-allowed"),onMouseDown:h,onTouchStart:T,role:"slider","aria-valuemin":t,"aria-valuemax":a,"aria-valuenow":n,"aria-disabled":i,tabIndex:i?-1:0,onKeyDown:R,children:[o.jsx("div",{className:x("absolute left-0 top-0 h-full rounded-full",L[d]),style:{width:`${v}%`}}),f==null?void 0:f.map(B=>{const I=(B.value-t)/(a-t)*100;return o.jsxs("div",{className:"absolute top-1/2 -translate-y-1/2 -translate-x-1/2",style:{left:`${I}%`},children:[o.jsx("div",{className:x("w-2 h-2 rounded-full",B.value<=n?k[d]:"bg-uix-surface-400")}),o.jsx("span",{className:"absolute top-4 left-1/2 -translate-x-1/2 text-xs text-uix-text-300 whitespace-nowrap",children:B.label})]},B.value)}),o.jsx(D.motion.div,{className:x("absolute top-1/2 -translate-y-1/2 -translate-x-1/2 rounded-full","uix-convex-colored shadow-lg",E[c].thumb,k[d],!i&&"cursor-grab active:cursor-grabbing"),style:{left:`${v}%`},animate:{scale:q?1.15:1},whileHover:i?void 0:{scale:1.1},transition:{duration:.1}})]}),u&&o.jsxs("div",{className:"flex justify-between mt-2 text-xs text-uix-text-300",children:[o.jsx("span",{children:t}),o.jsx("span",{children:a})]})]})};we.displayName="Slider";const Ne=r.forwardRef(({className:n,variant:s="default",rounded:t="3xl",children:a,...l},i)=>{const c="relative uix-glass uix-glass-border uix-convex uix-glass-noise",d={default:"",subtle:"uix-convex-subtle",strong:"uix-convex-lg"},p={none:"rounded-none",sm:"rounded-lg",md:"rounded-xl",lg:"rounded-2xl",xl:"rounded-[1.5rem]","2xl":"rounded-[2rem]","3xl":"rounded-3xl",full:"rounded-full"};return o.jsx("div",{ref:i,className:x(c,d[s],p[t],n),...l,children:a})});Ne.displayName="Surface";const Se=r.createContext(null),Te=()=>{const n=r.useContext(Se);if(!n)throw new Error("Tabs components must be used within a Tabs provider");return n},Ee=r.forwardRef(({className:n,defaultValue:s,children:t,...a},l)=>{const[i,c]=r.useState(s),d=r.useId();return o.jsx(Se.Provider,{value:{activeTab:i,setActiveTab:c,tabsId:d},children:o.jsx("div",{ref:l,className:x("w-full",n),...a,children:t})})});Ee.displayName="Tabs";const je=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("div",{ref:a,className:x("inline-flex items-center gap-1 rounded-2xl bg-uix-surface-300/50 backdrop-blur-xl backdrop-saturate-150 uix-glass-border p-1.5 uix-convex",n),...t,children:s}));je.displayName="TabsList";const ke=r.forwardRef(({className:n,value:s,children:t,...a},l)=>{const{activeTab:i,setActiveTab:c,tabsId:d}=Te(),p=i===s,{onDrag:u,onDragStart:f,onDragEnd:e,...m}=a;return o.jsxs(D.motion.button,{ref:l,type:"button",onClick:()=>c(s),className:x("relative inline-flex items-center justify-center px-4 py-2 text-base font-medium rounded-xl","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300",p?"text-uix-text-100":"text-uix-text-300 hover:text-uix-text-100",n),whileHover:{scale:1.02},whileTap:{scale:.96},transition:{duration:.06,ease:[0,0,1,1]},...m,children:[p&&o.jsx(D.motion.span,{layoutId:`tabs-indicator-${d}`,className:"absolute inset-0 bg-uix-surface-100 rounded-xl uix-convex-sm",transition:{type:"spring",stiffness:300,damping:20,mass:.8}}),o.jsx("span",{className:"relative z-10",children:t})]})});ke.displayName="TabsTrigger";const De=r.forwardRef(({className:n,children:s,...t},a)=>o.jsx("div",{ref:a,className:x("relative mt-4",n),...t,children:o.jsx("div",{className:"grid [&>*]:col-start-1 [&>*]:row-start-1",children:s})}));De.displayName="TabsPanels";const Re=r.forwardRef(({className:n,value:s,children:t,...a},l)=>{const{activeTab:i}=Te(),c=i===s;return o.jsx(D.motion.div,{ref:l,className:x(n),initial:!1,animate:{opacity:c?1:0,scale:c?1:.98,y:c?0:8,visibility:c?"visible":"hidden"},transition:{type:"spring",stiffness:400,damping:25,mass:.8},"aria-hidden":!c,children:o.jsx("div",{...a,children:t})})});Re.displayName="TabsContent";function ss(n){if(typeof document>"u")return;let s=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",s.appendChild(t),t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n))}const ns=n=>{switch(n){case"success":return os;case"info":return ls;case"warning":return is;case"error":return cs;default:return null}},as=Array(12).fill(0),rs=({visible:n,className:s})=>r.createElement("div",{className:["sonner-loading-wrapper",s].filter(Boolean).join(" "),"data-visible":n},r.createElement("div",{className:"sonner-spinner"},as.map((t,a)=>r.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),os=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),is=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ls=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cs=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),ds=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),us=()=>{const[n,s]=r.useState(document.hidden);return r.useEffect(()=>{const t=()=>{s(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),n};let jt=1;class fs{constructor(){this.subscribe=s=>(this.subscribers.push(s),()=>{const t=this.subscribers.indexOf(s);this.subscribers.splice(t,1)}),this.publish=s=>{this.subscribers.forEach(t=>t(s))},this.addToast=s=>{this.publish(s),this.toasts=[...this.toasts,s]},this.create=s=>{var t;const{message:a,...l}=s,i=typeof(s==null?void 0:s.id)=="number"||((t=s.id)==null?void 0:t.length)>0?s.id:jt++,c=this.toasts.find(p=>p.id===i),d=s.dismissible===void 0?!0:s.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),c?this.toasts=this.toasts.map(p=>p.id===i?(this.publish({...p,...s,id:i,title:a}),{...p,...s,id:i,dismissible:d,title:a}):p):this.addToast({title:a,...l,dismissible:d,id:i}),i},this.dismiss=s=>(s?(this.dismissedToasts.add(s),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:s,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(a=>a({id:t.id,dismiss:!0}))}),s),this.message=(s,t)=>this.create({...t,message:s}),this.error=(s,t)=>this.create({...t,message:s,type:"error"}),this.success=(s,t)=>this.create({...t,type:"success",message:s}),this.info=(s,t)=>this.create({...t,type:"info",message:s}),this.warning=(s,t)=>this.create({...t,type:"warning",message:s}),this.loading=(s,t)=>this.create({...t,type:"loading",message:s}),this.promise=(s,t)=>{if(!t)return;let a;t.loading!==void 0&&(a=this.create({...t,promise:s,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const l=Promise.resolve(s instanceof Function?s():s);let i=a!==void 0,c;const d=l.then(async u=>{if(c=["resolve",u],r.isValidElement(u))i=!1,this.create({id:a,type:"default",message:u});else if(ps(u)&&!u.ok){i=!1;const e=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,S=typeof e=="object"&&!r.isValidElement(e)?e:{message:e};this.create({id:a,type:"error",description:m,...S})}else if(u instanceof Error){i=!1;const e=typeof t.error=="function"?await t.error(u):t.error,m=typeof t.description=="function"?await t.description(u):t.description,S=typeof e=="object"&&!r.isValidElement(e)?e:{message:e};this.create({id:a,type:"error",description:m,...S})}else if(t.success!==void 0){i=!1;const e=typeof t.success=="function"?await t.success(u):t.success,m=typeof t.description=="function"?await t.description(u):t.description,S=typeof e=="object"&&!r.isValidElement(e)?e:{message:e};this.create({id:a,type:"success",description:m,...S})}}).catch(async u=>{if(c=["reject",u],t.error!==void 0){i=!1;const f=typeof t.error=="function"?await t.error(u):t.error,e=typeof t.description=="function"?await t.description(u):t.description,y=typeof f=="object"&&!r.isValidElement(f)?f:{message:f};this.create({id:a,type:"error",description:e,...y})}}).finally(()=>{i&&(this.dismiss(a),a=void 0),t.finally==null||t.finally.call(t)}),p=()=>new Promise((u,f)=>d.then(()=>c[0]==="reject"?f(c[1]):u(c[1])).catch(f));return typeof a!="string"&&typeof a!="number"?{unwrap:p}:Object.assign(a,{unwrap:p})},this.custom=(s,t)=>{const a=(t==null?void 0:t.id)||jt++;return this.create({jsx:s(a),id:a,...t}),a},this.getActiveToasts=()=>this.toasts.filter(s=>!this.dismissedToasts.has(s.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Y=new fs,ms=(n,s)=>{const t=(s==null?void 0:s.id)||jt++;return Y.addToast({title:n,...s,id:t}),t},ps=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",xs=ms,bs=()=>Y.toasts,gs=()=>Y.getActiveToasts(),hs=Object.assign(xs,{success:Y.success,info:Y.info,warning:Y.warning,error:Y.error,custom:Y.custom,message:Y.message,promise:Y.promise,dismiss:Y.dismiss,loading:Y.loading},{getHistory:bs,getToasts:gs});ss("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function wt(n){return n.label!==void 0}const vs=3,ys="24px",ws="16px",zt=4e3,Ns=356,Ss=14,Ts=45,Es=200;function et(...n){return n.filter(Boolean).join(" ")}function js(n){const[s,t]=n.split("-"),a=[];return s&&a.push(s),t&&a.push(t),a}const ks=n=>{var s,t,a,l,i,c,d,p,u;const{invert:f,toast:e,unstyled:m,interacting:y,setHeights:S,visibleToasts:q,heights:z,index:v,toasts:F,expanded:h,removeToast:T,defaultRichColors:R,closeButton:E,style:L,cancelButtonStyle:k,actionButtonStyle:B,className:I="",descriptionClassName:U="",duration:V,position:g,gap:P,expandByDefault:$,classNames:N,icons:M,closeButtonAriaLabel:nt="Close toast"}=n,[rt,Z]=r.useState(null),[ot,xt]=r.useState(null),[w,A]=r.useState(!1),[C,K]=r.useState(!1),[lt,j]=r.useState(!1),[ct,bt]=r.useState(!1),[gt,dt]=r.useState(!1),[Ie,St]=r.useState(0),[Me,Ct]=r.useState(0),pt=r.useRef(e.duration||V||zt),It=r.useRef(null),st=r.useRef(null),Ae=v===0,Be=v+1<=q,X=e.type,ut=e.dismissible!==!1,_e=e.className||"",Le=e.descriptionClassName||"",ht=r.useMemo(()=>z.findIndex(b=>b.toastId===e.id)||0,[z,e.id]),Pe=r.useMemo(()=>{var b;return(b=e.closeButton)!=null?b:E},[e.closeButton,E]),Mt=r.useMemo(()=>e.duration||V||zt,[e.duration,V]),Tt=r.useRef(0),ft=r.useRef(0),At=r.useRef(0),mt=r.useRef(null),[He,ze]=g.split("-"),Bt=r.useMemo(()=>z.reduce((b,_,O)=>O>=ht?b:b+_.height,0),[z,ht]),_t=us(),Oe=e.invert||f,Et=X==="loading";ft.current=r.useMemo(()=>ht*P+Bt,[ht,Bt]),r.useEffect(()=>{pt.current=Mt},[Mt]),r.useEffect(()=>{A(!0)},[]),r.useEffect(()=>{const b=st.current;if(b){const _=b.getBoundingClientRect().height;return Ct(_),S(O=>[{toastId:e.id,height:_,position:e.position},...O]),()=>S(O=>O.filter(W=>W.toastId!==e.id))}},[S,e.id]),r.useLayoutEffect(()=>{if(!w)return;const b=st.current,_=b.style.height;b.style.height="auto";const O=b.getBoundingClientRect().height;b.style.height=_,Ct(O),S(W=>W.find(H=>H.toastId===e.id)?W.map(H=>H.toastId===e.id?{...H,height:O}:H):[{toastId:e.id,height:O,position:e.position},...W])},[w,e.title,e.description,S,e.id,e.jsx,e.action,e.cancel]);const at=r.useCallback(()=>{K(!0),St(ft.current),S(b=>b.filter(_=>_.toastId!==e.id)),setTimeout(()=>{T(e)},Es)},[e,T,S,ft]);r.useEffect(()=>{if(e.promise&&X==="loading"||e.duration===1/0||e.type==="loading")return;let b;return h||y||_t?(()=>{if(At.current<Tt.current){const W=new Date().getTime()-Tt.current;pt.current=pt.current-W}At.current=new Date().getTime()})():(()=>{pt.current!==1/0&&(Tt.current=new Date().getTime(),b=setTimeout(()=>{e.onAutoClose==null||e.onAutoClose.call(e,e),at()},pt.current))})(),()=>clearTimeout(b)},[h,y,e,X,_t,at]),r.useEffect(()=>{e.delete&&(at(),e.onDismiss==null||e.onDismiss.call(e,e))},[at,e.delete]);function Ve(){var b;if(M!=null&&M.loading){var _;return r.createElement("div",{className:et(N==null?void 0:N.loader,e==null||(_=e.classNames)==null?void 0:_.loader,"sonner-loader"),"data-visible":X==="loading"},M.loading)}return r.createElement(rs,{className:et(N==null?void 0:N.loader,e==null||(b=e.classNames)==null?void 0:b.loader),visible:X==="loading"})}const $e=e.icon||(M==null?void 0:M[X])||ns(X);var Lt,Pt;return r.createElement("li",{tabIndex:0,ref:st,className:et(I,_e,N==null?void 0:N.toast,e==null||(s=e.classNames)==null?void 0:s.toast,N==null?void 0:N.default,N==null?void 0:N[X],e==null||(t=e.classNames)==null?void 0:t[X]),"data-sonner-toast":"","data-rich-colors":(Lt=e.richColors)!=null?Lt:R,"data-styled":!(e.jsx||e.unstyled||m),"data-mounted":w,"data-promise":!!e.promise,"data-swiped":gt,"data-removed":C,"data-visible":Be,"data-y-position":He,"data-x-position":ze,"data-index":v,"data-front":Ae,"data-swiping":lt,"data-dismissible":ut,"data-type":X,"data-invert":Oe,"data-swipe-out":ct,"data-swipe-direction":ot,"data-expanded":!!(h||$&&w),"data-testid":e.testId,style:{"--index":v,"--toasts-before":v,"--z-index":F.length-v,"--offset":`${C?Ie:ft.current}px`,"--initial-height":$?"auto":`${Me}px`,...L,...e.style},onDragEnd:()=>{j(!1),Z(null),mt.current=null},onPointerDown:b=>{b.button!==2&&(Et||!ut||(It.current=new Date,St(ft.current),b.target.setPointerCapture(b.pointerId),b.target.tagName!=="BUTTON"&&(j(!0),mt.current={x:b.clientX,y:b.clientY})))},onPointerUp:()=>{var b,_,O;if(ct||!ut)return;mt.current=null;const W=Number(((b=st.current)==null?void 0:b.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vt=Number(((_=st.current)==null?void 0:_.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-((O=It.current)==null?void 0:O.getTime()),G=rt==="x"?W:vt,yt=Math.abs(G)/H;if(Math.abs(G)>=Ts||yt>.11){St(ft.current),e.onDismiss==null||e.onDismiss.call(e,e),xt(rt==="x"?W>0?"right":"left":vt>0?"down":"up"),at(),bt(!0);return}else{var J,tt;(J=st.current)==null||J.style.setProperty("--swipe-amount-x","0px"),(tt=st.current)==null||tt.style.setProperty("--swipe-amount-y","0px")}dt(!1),j(!1),Z(null)},onPointerMove:b=>{var _,O,W;if(!mt.current||!ut||((_=window.getSelection())==null?void 0:_.toString().length)>0)return;const H=b.clientY-mt.current.y,G=b.clientX-mt.current.x;var yt;const J=(yt=n.swipeDirections)!=null?yt:js(g);!rt&&(Math.abs(G)>1||Math.abs(H)>1)&&Z(Math.abs(G)>Math.abs(H)?"x":"y");let tt={x:0,y:0};const Ht=it=>1/(1.5+Math.abs(it)/20);if(rt==="y"){if(J.includes("top")||J.includes("bottom"))if(J.includes("top")&&H<0||J.includes("bottom")&&H>0)tt.y=H;else{const it=H*Ht(H);tt.y=Math.abs(it)<Math.abs(H)?it:H}}else if(rt==="x"&&(J.includes("left")||J.includes("right")))if(J.includes("left")&&G<0||J.includes("right")&&G>0)tt.x=G;else{const it=G*Ht(G);tt.x=Math.abs(it)<Math.abs(G)?it:G}(Math.abs(tt.x)>0||Math.abs(tt.y)>0)&&dt(!0),(O=st.current)==null||O.style.setProperty("--swipe-amount-x",`${tt.x}px`),(W=st.current)==null||W.style.setProperty("--swipe-amount-y",`${tt.y}px`)}},Pe&&!e.jsx&&X!=="loading"?r.createElement("button",{"aria-label":nt,"data-disabled":Et,"data-close-button":!0,onClick:Et||!ut?()=>{}:()=>{at(),e.onDismiss==null||e.onDismiss.call(e,e)},className:et(N==null?void 0:N.closeButton,e==null||(a=e.classNames)==null?void 0:a.closeButton)},(Pt=M==null?void 0:M.close)!=null?Pt:ds):null,(X||e.icon||e.promise)&&e.icon!==null&&((M==null?void 0:M[X])!==null||e.icon)?r.createElement("div",{"data-icon":"",className:et(N==null?void 0:N.icon,e==null||(l=e.classNames)==null?void 0:l.icon)},e.promise||e.type==="loading"&&!e.icon?e.icon||Ve():null,e.type!=="loading"?$e:null):null,r.createElement("div",{"data-content":"",className:et(N==null?void 0:N.content,e==null||(i=e.classNames)==null?void 0:i.content)},r.createElement("div",{"data-title":"",className:et(N==null?void 0:N.title,e==null||(c=e.classNames)==null?void 0:c.title)},e.jsx?e.jsx:typeof e.title=="function"?e.title():e.title),e.description?r.createElement("div",{"data-description":"",className:et(U,Le,N==null?void 0:N.description,e==null||(d=e.classNames)==null?void 0:d.description)},typeof e.description=="function"?e.description():e.description):null),r.isValidElement(e.cancel)?e.cancel:e.cancel&&wt(e.cancel)?r.createElement("button",{"data-button":!0,"data-cancel":!0,style:e.cancelButtonStyle||k,onClick:b=>{wt(e.cancel)&&ut&&(e.cancel.onClick==null||e.cancel.onClick.call(e.cancel,b),at())},className:et(N==null?void 0:N.cancelButton,e==null||(p=e.classNames)==null?void 0:p.cancelButton)},e.cancel.label):null,r.isValidElement(e.action)?e.action:e.action&&wt(e.action)?r.createElement("button",{"data-button":!0,"data-action":!0,style:e.actionButtonStyle||B,onClick:b=>{wt(e.action)&&(e.action.onClick==null||e.action.onClick.call(e.action,b),!b.defaultPrevented&&at())},className:et(N==null?void 0:N.actionButton,e==null||(u=e.classNames)==null?void 0:u.actionButton)},e.action.label):null)};function Ot(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function Ds(n,s){const t={};return[n,s].forEach((a,l)=>{const i=l===1,c=i?"--mobile-offset":"--offset",d=i?ws:ys;function p(u){["top","right","bottom","left"].forEach(f=>{t[`${c}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof a=="number"||typeof a=="string"?p(a):typeof a=="object"?["top","right","bottom","left"].forEach(u=>{a[u]===void 0?t[`${c}-${u}`]=d:t[`${c}-${u}`]=typeof a[u]=="number"?`${a[u]}px`:a[u]}):p(d)}),t}const Rs=r.forwardRef(function(s,t){const{id:a,invert:l,position:i="bottom-right",hotkey:c=["altKey","KeyT"],expand:d,closeButton:p,className:u,offset:f,mobileOffset:e,theme:m="light",richColors:y,duration:S,style:q,visibleToasts:z=vs,toastOptions:v,dir:F=Ot(),gap:h=Ss,icons:T,containerAriaLabel:R="Notifications"}=s,[E,L]=r.useState([]),k=r.useMemo(()=>a?E.filter(w=>w.toasterId===a):E.filter(w=>!w.toasterId),[E,a]),B=r.useMemo(()=>Array.from(new Set([i].concat(k.filter(w=>w.position).map(w=>w.position)))),[k,i]),[I,U]=r.useState([]),[V,g]=r.useState(!1),[P,$]=r.useState(!1),[N,M]=r.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),nt=r.useRef(null),rt=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),Z=r.useRef(null),ot=r.useRef(!1),xt=r.useCallback(w=>{L(A=>{var C;return(C=A.find(K=>K.id===w.id))!=null&&C.delete||Y.dismiss(w.id),A.filter(({id:K})=>K!==w.id)})},[]);return r.useEffect(()=>Y.subscribe(w=>{if(w.dismiss){requestAnimationFrame(()=>{L(A=>A.map(C=>C.id===w.id?{...C,delete:!0}:C))});return}setTimeout(()=>{Vt.flushSync(()=>{L(A=>{const C=A.findIndex(K=>K.id===w.id);return C!==-1?[...A.slice(0,C),{...A[C],...w},...A.slice(C+1)]:[w,...A]})})})}),[E]),r.useEffect(()=>{if(m!=="system"){M(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?M("dark"):M("light")),typeof window>"u")return;const w=window.matchMedia("(prefers-color-scheme: dark)");try{w.addEventListener("change",({matches:A})=>{M(A?"dark":"light")})}catch{w.addListener(({matches:C})=>{try{M(C?"dark":"light")}catch(K){console.error(K)}})}},[m]),r.useEffect(()=>{E.length<=1&&g(!1)},[E]),r.useEffect(()=>{const w=A=>{var C;if(c.every(j=>A[j]||A.code===j)){var lt;g(!0),(lt=nt.current)==null||lt.focus()}A.code==="Escape"&&(document.activeElement===nt.current||(C=nt.current)!=null&&C.contains(document.activeElement))&&g(!1)};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[c]),r.useEffect(()=>{if(nt.current)return()=>{Z.current&&(Z.current.focus({preventScroll:!0}),Z.current=null,ot.current=!1)}},[nt.current]),r.createElement("section",{ref:t,"aria-label":`${R} ${rt}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},B.map((w,A)=>{var C;const[K,lt]=w.split("-");return k.length?r.createElement("ol",{key:w,dir:F==="auto"?Ot():F,tabIndex:-1,ref:nt,className:u,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":K,"data-x-position":lt,style:{"--front-toast-height":`${((C=I[0])==null?void 0:C.height)||0}px`,"--width":`${Ns}px`,"--gap":`${h}px`,...q,...Ds(f,e)},onBlur:j=>{ot.current&&!j.currentTarget.contains(j.relatedTarget)&&(ot.current=!1,Z.current&&(Z.current.focus({preventScroll:!0}),Z.current=null))},onFocus:j=>{j.target instanceof HTMLElement&&j.target.dataset.dismissible==="false"||ot.current||(ot.current=!0,Z.current=j.relatedTarget)},onMouseEnter:()=>g(!0),onMouseMove:()=>g(!0),onMouseLeave:()=>{P||g(!1)},onDragEnd:()=>g(!1),onPointerDown:j=>{j.target instanceof HTMLElement&&j.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},k.filter(j=>!j.position&&A===0||j.position===w).map((j,ct)=>{var bt,gt;return r.createElement(ks,{key:j.id,icons:T,index:ct,toast:j,defaultRichColors:y,duration:(bt=v==null?void 0:v.duration)!=null?bt:S,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:l,visibleToasts:z,closeButton:(gt=v==null?void 0:v.closeButton)!=null?gt:p,interacting:P,position:w,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:xt,toasts:k.filter(dt=>dt.position==j.position),heights:I.filter(dt=>dt.position==j.position),setHeights:U,expandByDefault:d,gap:h,expanded:V,swipeDirections:s.swipeDirections})})):null}))}),Ce=({position:n="bottom-center",theme:s="system",toasterProps:t})=>{const a={toast:"uix-glass uix-glass-border uix-convex rounded-2xl shadow-lg text-uix-text-100",title:"text-uix-text-100 font-medium",description:"text-uix-text-200",actionButton:"bg-uix-prime-300 text-white rounded-xl hover:bg-uix-prime-400",cancelButton:"bg-uix-surface-300/50 text-uix-text-200 rounded-xl hover:bg-uix-surface-400/50",success:"text-green-500",error:"text-uix-sub1-400",warning:"text-amber-500",info:"text-uix-prime-400"};return o.jsx(Rs,{position:n,theme:s,toastOptions:{unstyled:!0,classNames:{toast:a.toast,title:a.title,description:a.description,actionButton:a.actionButton,cancelButton:a.cancelButton,success:a.success,error:a.error,warning:a.warning,info:a.info},style:{padding:"16px",gap:"8px",display:"flex",alignItems:"center"}},...t})};Ce.displayName="Toaster";exports.Accordion=Xt;exports.AccordionContent=Kt;exports.AccordionItem=Wt;exports.AccordionTrigger=qt;exports.Badge=kt;exports.Button=Gt;exports.Card=Qt;exports.CardContent=Zt;exports.CardDescription=ee;exports.CardHeader=Jt;exports.CardTitle=te;exports.CodeBlock=se;exports.ColorSwipeText=We;exports.Dropdown=qe;exports.DropdownContent=Ge;exports.DropdownItem=Qe;exports.DropdownSeparator=Ze;exports.DropdownTrigger=Ke;exports.FileUploader=ae;exports.PinInput=re;exports.ScrollArea=Rt;exports.ScrollToTop=Je;exports.Section=oe;exports.SectionTitle=ie;exports.Sheet=ce;exports.SheetContent=de;exports.SheetHeader=ue;exports.SheetTitle=fe;exports.Sidebar=me;exports.SidebarContent=xe;exports.SidebarGroup=be;exports.SidebarGroupLabel=ge;exports.SidebarHeader=pe;exports.SidebarMenu=he;exports.SidebarMenuButton=ye;exports.SidebarMenuItem=ve;exports.Slider=we;exports.Surface=Ne;exports.Tabs=Ee;exports.TabsContent=Re;exports.TabsList=je;exports.TabsPanels=De;exports.TabsTrigger=ke;exports.Toaster=Ce;exports.cn=x;exports.toast=hs;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,40 @@ import { JSX } from 'react/jsx-runtime';
6
6
  import { ReactNode } from 'react';
7
7
  import { ReactPortal } from 'react';
8
8
  import { RefAttributes } from 'react';
9
+ import { toast } from 'sonner';
10
+ import { ToasterProps as ToasterProps_2 } from 'sonner';
11
+
12
+ export declare const Accordion: ForwardRefExoticComponent<AccordionProps & RefAttributes<HTMLDivElement>>;
13
+
14
+ export declare const AccordionContent: ForwardRefExoticComponent<AccordionContentProps & RefAttributes<HTMLDivElement>>;
15
+
16
+ export declare interface AccordionContentProps extends HTMLAttributes<HTMLDivElement> {
17
+ children: ReactNode;
18
+ }
19
+
20
+ export declare const AccordionItem: ForwardRefExoticComponent<AccordionItemProps & RefAttributes<HTMLDivElement>>;
21
+
22
+ export declare interface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {
23
+ children: ReactNode;
24
+ /** Unique value for this item */
25
+ value: string;
26
+ /** Disabled state */
27
+ disabled?: boolean;
28
+ }
29
+
30
+ export declare interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
31
+ children: ReactNode;
32
+ /** Allow multiple items to be open at once */
33
+ multiple?: boolean;
34
+ /** Default open items (controlled by value) */
35
+ defaultValue?: string[];
36
+ }
37
+
38
+ export declare const AccordionTrigger: ForwardRefExoticComponent<AccordionTriggerProps & RefAttributes<HTMLButtonElement>>;
39
+
40
+ export declare interface AccordionTriggerProps extends HTMLAttributes<HTMLButtonElement> {
41
+ children: ReactNode;
42
+ }
9
43
 
10
44
  export declare const Badge: ForwardRefExoticComponent<BadgeProps & RefAttributes<HTMLSpanElement>>;
11
45
 
@@ -109,6 +143,66 @@ export declare interface DropdownTriggerProps extends HTMLAttributes<HTMLButtonE
109
143
  children: ReactNode;
110
144
  }
111
145
 
146
+ export declare const FileUploader: {
147
+ ({ onFileSelect, onFilesSelect, accept, maxSizeMB, multiple, disabled, size, icon, title, description, className, onError, }: FileUploaderProps): JSX.Element;
148
+ displayName: string;
149
+ };
150
+
151
+ export declare interface FileUploaderProps {
152
+ /** 단일 파일 선택 시 콜백 */
153
+ onFileSelect: (file: File) => void;
154
+ /** 다중 파일 선택 시 콜백 */
155
+ onFilesSelect?: (files: File[]) => void;
156
+ /** 허용 파일 타입 (예: 'image/*', '.pdf,.doc') */
157
+ accept?: string;
158
+ /** 최대 파일 크기 (MB 단위, 기본 10) */
159
+ maxSizeMB?: number;
160
+ /** 다중 파일 선택 허용 */
161
+ multiple?: boolean;
162
+ /** 비활성화 여부 */
163
+ disabled?: boolean;
164
+ /** 크기 */
165
+ size?: 'sm' | 'md' | 'lg';
166
+ /** 커스텀 아이콘 */
167
+ icon?: ReactNode;
168
+ /** 제목 텍스트 */
169
+ title?: string;
170
+ /** 설명 텍스트 */
171
+ description?: string;
172
+ /** 추가 클래스명 */
173
+ className?: string;
174
+ /** 파일 크기 초과 시 에러 콜백 */
175
+ onError?: (message: string) => void;
176
+ }
177
+
178
+ export declare const PinInput: {
179
+ ({ length, onComplete, onChange, disabled, error, mask, size, type, className, autoFocus, }: PinInputProps): JSX.Element;
180
+ displayName: string;
181
+ };
182
+
183
+ export declare interface PinInputProps {
184
+ /** PIN 자릿수 (기본 6) */
185
+ length?: number;
186
+ /** 모든 자리 입력 완료 시 콜백 */
187
+ onComplete: (pin: string) => void;
188
+ /** 입력 중 값 변경 콜백 */
189
+ onChange?: (pin: string) => void;
190
+ /** 비활성화 여부 */
191
+ disabled?: boolean;
192
+ /** 에러 상태 */
193
+ error?: boolean;
194
+ /** 비밀번호 마스킹 (●●●) */
195
+ mask?: boolean;
196
+ /** 크기 */
197
+ size?: 'sm' | 'md' | 'lg';
198
+ /** 입력 타입 */
199
+ type?: 'numeric' | 'alphanumeric';
200
+ /** 추가 클래스명 */
201
+ className?: string;
202
+ /** 자동 포커스 */
203
+ autoFocus?: boolean;
204
+ }
205
+
112
206
  export declare const ScrollArea: ForwardRefExoticComponent<ScrollAreaProps & RefAttributes<HTMLDivElement>>;
113
207
 
114
208
  export declare interface ScrollAreaProps extends HTMLAttributes<HTMLDivElement> {
@@ -217,6 +311,47 @@ export declare interface SidebarProps extends HTMLAttributes<HTMLElement> {
217
311
  children: ReactNode;
218
312
  }
219
313
 
314
+ export declare const Slider: {
315
+ ({ value, onChange, min, max, step, disabled, size, color, showValue, showMinMax, marks, label, description, className, }: SliderProps): JSX.Element;
316
+ displayName: string;
317
+ };
318
+
319
+ export declare interface SliderMark {
320
+ value: number;
321
+ label: string;
322
+ }
323
+
324
+ export declare interface SliderProps {
325
+ /** 현재 값 */
326
+ value: number;
327
+ /** 값 변경 콜백 */
328
+ onChange: (value: number) => void;
329
+ /** 최솟값 (기본 0) */
330
+ min?: number;
331
+ /** 최댓값 (기본 100) */
332
+ max?: number;
333
+ /** 스텝 단위 (기본 1) */
334
+ step?: number;
335
+ /** 비활성화 여부 */
336
+ disabled?: boolean;
337
+ /** 크기 */
338
+ size?: 'sm' | 'md' | 'lg';
339
+ /** 채워진 영역 색상 */
340
+ color?: 'prime' | 'sub1' | 'sub2';
341
+ /** 현재 값 표시 */
342
+ showValue?: boolean;
343
+ /** 양 끝 라벨 표시 */
344
+ showMinMax?: boolean;
345
+ /** 커스텀 마커 */
346
+ marks?: SliderMark[];
347
+ /** 라벨 텍스트 */
348
+ label?: string;
349
+ /** 설명 텍스트 */
350
+ description?: string;
351
+ /** 추가 클래스명 */
352
+ className?: string;
353
+ }
354
+
220
355
  export declare const Surface: ForwardRefExoticComponent<SurfaceProps & RefAttributes<HTMLDivElement>>;
221
356
 
222
357
  export declare interface SurfaceProps extends HTMLAttributes<HTMLDivElement> {
@@ -264,4 +399,20 @@ export declare interface TabsTriggerProps extends HTMLAttributes<HTMLButtonEleme
264
399
  children: ReactNode;
265
400
  }
266
401
 
402
+ export { toast }
403
+
404
+ export declare const Toaster: {
405
+ ({ position, theme, toasterProps }: ToasterProps): JSX.Element;
406
+ displayName: string;
407
+ };
408
+
409
+ export declare interface ToasterProps {
410
+ /** 토스트 위치 */
411
+ position?: 'top-center' | 'top-right' | 'bottom-center' | 'bottom-right' | 'top-left' | 'bottom-left';
412
+ /** 테마 (자동 감지 시 'system') */
413
+ theme?: 'light' | 'dark' | 'system';
414
+ /** sonner 기본 옵션 오버라이드 */
415
+ toasterProps?: Partial<ToasterProps_2>;
416
+ }
417
+
267
418
  export { }