@moondreamsdev/dreamer-ui 1.7.7-test.13 → 1.7.7-test.15

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.
Files changed (32) hide show
  1. package/dist/Toast-BnDLmjXs.cjs +2 -0
  2. package/dist/Toast-BnDLmjXs.cjs.map +1 -0
  3. package/dist/{Toast-cdFf2Gbf.js → Toast-Dux71f5k.js} +55 -53
  4. package/dist/Toast-Dux71f5k.js.map +1 -0
  5. package/dist/components.cjs.js +1 -1
  6. package/dist/components.cjs.js.map +1 -1
  7. package/dist/components.esm.js +1255 -801
  8. package/dist/components.esm.js.map +1 -1
  9. package/dist/providers.cjs.js +1 -1
  10. package/dist/providers.esm.js +1 -1
  11. package/dist/src/components/accordion/AccordionItem.d.ts +0 -1
  12. package/dist/src/components/clickable/Clickable.d.ts +0 -1
  13. package/dist/src/components/index.d.ts +2 -0
  14. package/dist/src/components/radiogroup/RadioGroupItem.d.ts +0 -1
  15. package/dist/src/components/scroll-area/ScrollArea.d.ts +1 -1
  16. package/dist/src/components/scroll-area/hooks.d.ts +0 -1
  17. package/dist/src/components/select/Select.d.ts +22 -0
  18. package/dist/src/components/select/hooks.d.ts +35 -0
  19. package/dist/src/components/select/index.d.ts +2 -0
  20. package/dist/src/components/select/variants.d.ts +15 -0
  21. package/dist/src/components/tabs/TabsContent.d.ts +0 -1
  22. package/dist/src/components/tabs/TabsContext.d.ts +0 -1
  23. package/dist/src/components/tabs/TabsList.d.ts +0 -1
  24. package/dist/src/components/tabs/TabsTrigger.d.ts +0 -1
  25. package/dist/src/components/tooltip/hooks.d.ts +0 -1
  26. package/dist/src/hooks/useActionModal.d.ts +0 -1
  27. package/dist/src/hooks/useToast.d.ts +0 -1
  28. package/dist/src/symbols/index.d.ts +0 -1
  29. package/package.json +3 -3
  30. package/dist/Toast-BabLpwoU.cjs +0 -2
  31. package/dist/Toast-BabLpwoU.cjs.map +0 -1
  32. package/dist/Toast-cdFf2Gbf.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ "use strict";const t=require("react/jsx-runtime"),a=require("react"),I=require("react-dom"),g=require("./X-CgjeP2OI.cjs"),B=require("./utils.cjs.js");function h(...e){return e.filter(n=>typeof n=="string"&&n).join(" ").trim()||void 0}function M({size:e=15,color:n="currentColor",className:l="inline",...r}){return t.jsx("svg",{...r,width:e,height:e,className:l,viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"})})}function v(...e){return e.filter(n=>typeof n=="string"&&n).join(" ").trim()||void 0}a.createContext(void 0);a.createContext(null);a.createContext(null);a.createContext(null);a.createContext(null);function O(){const[e,n]=a.useState(0);return a.useEffect(()=>{const l=setInterval(()=>{n(r=>(r+1)%3)},500);return()=>clearInterval(l)},[]),t.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle",children:[0,1,2].map(l=>t.jsx("div",{className:h("rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",e===l&&"transform -translate-y-1")},l))})}const $={base:"",primary:"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",tertiary:"text-primary hover:text-primary-foreground disabled:text-muted",outline:"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",link:"underline-offset-4 hover:underline disabled:underline disabled:text-muted",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"},D={stripped:"",fitted:"size-fit",sm:"px-2 py-1 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",icon:"p-1 w-fit aspect-square",full:"p-2 w-full"},F={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},p={variant:"primary",size:"md",rounded:"md"};function H({variant:e=p.variant,size:n,rounded:l=p.rounded,loading:r,linkTo:s,linkProps:i,type:o="button",className:c,...d}){let u;e==="link"&&!n?u="fitted":u=n||p.size;const m=h("appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",$[e],D[u],F[l],r&&"relative pointer-events-none",s&&"relative",c);return t.jsxs("button",{...d,role:s?"link":d.role,"aria-label":d["aria-label"]||(i==null?void 0:i["aria-label"]),"aria-description":d["aria-description"]||(i==null?void 0:i["aria-description"]),"aria-disabled":d.disabled||r,"aria-busy":r,type:o,className:m,children:[r&&t.jsx(O,{}),t.jsx("span",{className:h(r&&"invisible"),children:d.children}),s&&!d.disabled&&t.jsx("a",{...i,"aria-hidden":!0,href:s,rel:(i==null?void 0:i.rel)||"noreferrer",className:"absolute inset-0"})]})}function P(e){const[n,l]=a.useState(!1),[r,s]=a.useState(!1);return a.useEffect(()=>{e?(s(!0),setTimeout(()=>l(!0),10)):(l(!1),setTimeout(()=>s(!1),150))},[e]),{show:n,shouldRender:r}}function V(e,n){a.useEffect(()=>{const l=r=>{r.key==="Escape"&&e&&n()};return document.addEventListener("keydown",l),e&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",l),document.body.style.overflow="auto"}},[e,n])}function X(e,n){const l=a.useRef(null),r=a.useCallback(()=>{const s=document.getElementById(e);if(!s)return;const i=s.querySelectorAll('[data-modal-action="true"]');if(i.length>0){i[0].focus();return}const o=s.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(o.length>0){const c=Array.from(o).filter(d=>!(d instanceof HTMLButtonElement&&d.getAttribute("data-modal-close-button")==="true"));if(c.length>0){c[0].focus();return}o[0].focus();return}s.focus()},[e]);a.useEffect(()=>(n&&(l.current=document.activeElement,r()),()=>{document.body.style.overflow="auto",l.current instanceof HTMLElement&&l.current.focus()}),[n,r])}function J({id:e,isOpen:n,onClose:l,title:r,children:s,contentOnly:i=!1,className:o,overlayClassName:c,hideCloseButton:d=!1,actions:u=[],disableCloseOnOverlayClick:m=!1,ariaLabelledBy:f,ariaDescribedBy:b}){const x=a.useId(),j=e||`modal-${x}`,w=e?`${e}-title`:`modal-title-${x}`,{show:C,shouldRender:y}=P(n);if(X(j,y),V(y,l),!y)return null;const E=()=>r?a.isValidElement(r)?t.jsx("div",{className:"mb-4",children:r}):t.jsx("h2",{className:"mb-4 text-xl font-semibold",id:w,children:r}):null,T=()=>u.length===0?null:t.jsx("div",{className:"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3",children:u.map((L,z)=>{const{label:A,className:S,...q}=L;return t.jsx(H,{className:S,type:"button",...q,"data-modal-action":"true",children:A},z)})});return t.jsx(t.Fragment,{children:I.createPortal(t.jsx("div",{"aria-labelledby":f??r?w:void 0,"aria-describedby":b,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-y-auto",children:t.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[t.jsx("div",{className:v("fixed inset-0 bg-black/20 transition-all",c),onClick:()=>{m||l()}}),i&&t.jsx("div",{className:v("relative w-fit",o),children:s}),!i&&t.jsxs("div",{id:j,tabIndex:-1,className:v("relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",C?"opacity-100 scale-100":"opacity-0 scale-90",o),children:[!d&&t.jsx("button",{type:"button",onClick:l,"data-modal-close-button":"true",className:"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:t.jsx(M,{size:18})}),E(),s,T()]})]})}),document.body)})}function K({type:e,message:n,cancelText:l,confirmText:r,onConfirm:s,onClose:i,destructive:o=!1,title:c,...d}){const u=a.useMemo(()=>e==="confirm"?{confirm:r||"Confirm",cancel:l||"Cancel",defaultTitle:c||"Confirm Action"}:{confirm:r||"OK",cancel:null,defaultTitle:c||"Alert"},[e,r,c,l]),m=a.useMemo(()=>[...u.cancel?[{label:u.cancel,variant:"secondary",onClick:i}]:[],{label:u.confirm,variant:o?"destructive":"primary",onClick:()=>{s==null||s(),i()}}],[u,o,s,i]);return t.jsx(J,{...d,title:c||u.defaultTitle,onClose:i,actions:m,disableCloseOnOverlayClick:e==="confirm",hideCloseButton:e==="confirm",children:typeof n=="string"?t.jsx("p",{className:"text-sm",children:n}):n})}const N=a.createContext(null),Z=()=>{const e=a.useContext(N);if(!e)throw new Error("Tabs components must be used within a Tabs component");return e},k={info:{className:"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",icon:t.jsx(g.InfoCircled,{size:20})},warning:{className:"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",icon:t.jsx(g.ExclamationTriangle,{size:20})},error:{className:"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",icon:t.jsx(g.CrossCircled,{size:20})}};function G({id:e,title:n,description:l,type:r="info",action:s,duration:i=5e3,onRemove:o,customTypes:c,customComponent:d}){const[u,m]=a.useState(!1),f=a.useCallback(()=>{m(!0),setTimeout(()=>{o==null||o(e)},150)},[e,o]);if(a.useEffect(()=>{if(i>0){const x=setTimeout(()=>{f()},i);return()=>clearTimeout(x)}},[i,e,o,f]),d)return t.jsx(d,{id:e,title:n,description:l,type:r,action:s,duration:i,onRemove:o});const b=(c==null?void 0:c[r])||k[r]||k.info;return t.jsxs("div",{role:r==="error"?"alert":"status","aria-live":r==="error"?void 0:"polite",className:B.join("relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",s&&"pb-3",b.className,u?"opacity-0 translate-x-full":"opacity-100 translate-x-0"),children:[t.jsx("div",{className:"flex-shrink-0 mr-3",children:b.icon}),t.jsxs("div",{className:"flex-grow min-w-0",children:[t.jsx("div",{className:"font-medium text-sm leading-5",children:n}),l&&t.jsx("div",{className:"mt-1 text-sm opacity-90 leading-5",children:l}),s&&t.jsx("div",{className:"mt-1.5",children:t.jsx("button",{onClick:s.onClick,className:"text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer",children:s.label})})]}),t.jsx("button",{onClick:f,className:"flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0",children:t.jsx(g.X,{size:16})})]})}exports.ActionModal=K;exports.TabsContext=N;exports.Toast=G;exports.n=h;exports.useTabsContext=Z;
2
+ //# sourceMappingURL=Toast-BnDLmjXs.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast-BnDLmjXs.cjs","sources":["utils.esm.js","X-CIoyLewf.js","Toast-CuxloQs8.js","components.esm.js","../src/components/actionmodal/ActionModal.tsx","../src/components/tabs/TabsContext.tsx","../src/components/toast/Toast.tsx"],"sourcesContent":["function n(...t) {\n return t.filter((s) => typeof s == \"string\" && s).join(\" \").trim() || void 0;\n}\nexport {\n n as join\n};\n//# sourceMappingURL=utils.esm.js.map\n","import { jsx as e } from \"react/jsx-runtime\";\nfunction t({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction o({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction d({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction h({ size: C = 15, color: l = \"currentColor\", className: n = \"inline\", ...i }) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nexport {\n t as C,\n o as E,\n d as I,\n h as X\n};\n//# sourceMappingURL=X-CIoyLewf.js.map\n","import { jsx as r, Fragment as $, jsxs as f } from \"react/jsx-runtime\";\nimport q, { createContext as b, useId as V, useState as v, useEffect as g, useRef as H, useCallback as z, useMemo as E, useContext as P } from \"react\";\nimport { createPortal as D } from \"react-dom\";\nimport { X as F, C as J, E as K, I as X } from \"./X-CIoyLewf.js\";\nimport { join as Z } from \"./utils.esm.js\";\nfunction k(...e) {\n return e.filter((n) => typeof n == \"string\" && n).join(\" \").trim() || void 0;\n}\nfunction G({ size: e = 15, color: n = \"currentColor\", className: l = \"inline\", ...t }) {\n return /* @__PURE__ */ r(\n \"svg\",\n {\n ...t,\n width: e,\n height: e,\n className: l,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ r(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: n,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction x(...e) {\n return e.filter((n) => typeof n == \"string\" && n).join(\" \").trim() || void 0;\n}\nb(void 0);\nb(null);\nb(null);\nb(null);\nfunction Q() {\n const [e, n] = v(0);\n return g(() => {\n const l = setInterval(() => {\n n((t) => (t + 1) % 3);\n }, 500);\n return () => clearInterval(l);\n }, []), /* @__PURE__ */ r(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((l) => /* @__PURE__ */ r(\n \"div\",\n {\n className: k(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n e === l && \"transform -translate-y-1\"\n )\n },\n l\n )) });\n}\nconst R = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, U = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, W = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, w = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction Y({\n variant: e = w.variant,\n size: n,\n rounded: l = w.rounded,\n loading: t,\n linkTo: i,\n linkProps: a,\n type: o = \"button\",\n className: d,\n ...s\n}) {\n let c;\n e === \"link\" && !n ? c = \"fitted\" : c = n || w.size;\n const u = k(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n R[e],\n U[c],\n W[l],\n t && \"relative pointer-events-none\",\n i && \"relative\",\n d\n );\n return /* @__PURE__ */ f(\n \"button\",\n {\n ...s,\n role: i ? \"link\" : s.role,\n \"aria-label\": s[\"aria-label\"] || (a == null ? void 0 : a[\"aria-label\"]),\n \"aria-description\": s[\"aria-description\"] || (a == null ? void 0 : a[\"aria-description\"]),\n \"aria-disabled\": s.disabled || t,\n \"aria-busy\": t,\n type: o,\n className: u,\n children: [\n t && /* @__PURE__ */ r(Q, {}),\n /* @__PURE__ */ r(\"span\", { className: k(t && \"invisible\"), children: s.children }),\n i && !s.disabled && /* @__PURE__ */ r(\n \"a\",\n {\n ...a,\n \"aria-hidden\": !0,\n href: i,\n rel: (a == null ? void 0 : a.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction _(e) {\n const [n, l] = v(!1), [t, i] = v(!1);\n return g(() => {\n e ? (i(!0), setTimeout(() => l(!0), 10)) : (l(!1), setTimeout(() => i(!1), 150));\n }, [e]), { show: n, shouldRender: t };\n}\nfunction ee(e, n) {\n g(() => {\n const l = (t) => {\n t.key === \"Escape\" && e && n();\n };\n return document.addEventListener(\"keydown\", l), e && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", l), document.body.style.overflow = \"auto\";\n };\n }, [e, n]);\n}\nfunction te(e, n) {\n const l = H(null), t = z(() => {\n const i = document.getElementById(e);\n if (!i) return;\n const a = i.querySelectorAll('[data-modal-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const o = i.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (o.length > 0) {\n const d = Array.from(o).filter((s) => !(s instanceof HTMLButtonElement && s.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (d.length > 0) {\n d[0].focus();\n return;\n }\n o[0].focus();\n return;\n }\n i.focus();\n }, [e]);\n g(() => (n && (l.current = document.activeElement, t()), () => {\n document.body.style.overflow = \"auto\", l.current instanceof HTMLElement && l.current.focus();\n }), [n, t]);\n}\nfunction re({\n id: e,\n isOpen: n,\n onClose: l,\n title: t,\n children: i,\n contentOnly: a = !1,\n className: o,\n overlayClassName: d,\n hideCloseButton: s = !1,\n actions: c = [],\n disableCloseOnOverlayClick: u = !1,\n ariaLabelledBy: m,\n ariaDescribedBy: h\n}) {\n const p = V(), N = e || `modal-${p}`, C = e ? `${e}-title` : `modal-title-${p}`, { show: L, shouldRender: y } = _(n);\n if (te(N, y), ee(y, l), !y) return null;\n const j = () => t ? q.isValidElement(t) ? /* @__PURE__ */ r(\"div\", { className: \"mb-4\", children: t }) : /* @__PURE__ */ r(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: C, children: t }) : null, A = () => c.length === 0 ? null : /* @__PURE__ */ r(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: c.map((I, B) => {\n const { label: O, className: M, ...S } = I;\n return /* @__PURE__ */ r(Y, { className: M, type: \"button\", ...S, \"data-modal-action\": \"true\", children: O }, B);\n }) });\n return /* @__PURE__ */ r($, { children: D(\n /* @__PURE__ */ r(\n \"div\",\n {\n \"aria-labelledby\": m ?? t ? C : void 0,\n \"aria-describedby\": h,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ f(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ r(\n \"div\",\n {\n className: x(\"fixed inset-0 bg-black/20 transition-all\", d),\n onClick: () => {\n u || l();\n }\n }\n ),\n a && /* @__PURE__ */ r(\"div\", { className: x(\"relative w-fit\", o), children: i }),\n !a && /* @__PURE__ */ f(\n \"div\",\n {\n id: N,\n tabIndex: -1,\n className: x(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n L ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n o\n ),\n children: [\n !s && /* @__PURE__ */ r(\n \"button\",\n {\n type: \"button\",\n onClick: l,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ r(G, { size: 18 })\n }\n ),\n j(),\n i,\n A()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction de({\n type: e,\n message: n,\n cancelText: l,\n confirmText: t,\n onConfirm: i,\n onClose: a,\n destructive: o = !1,\n title: d,\n ...s\n}) {\n const c = E(() => e === \"confirm\" ? {\n confirm: t || \"Confirm\",\n cancel: l || \"Cancel\",\n defaultTitle: d || \"Confirm Action\"\n } : {\n confirm: t || \"OK\",\n cancel: null,\n defaultTitle: d || \"Alert\"\n }, [e, t, d, l]), u = E(\n () => [\n ...c.cancel ? [\n {\n label: c.cancel,\n variant: \"secondary\",\n onClick: a\n }\n ] : [],\n {\n label: c.confirm,\n variant: o ? \"destructive\" : \"primary\",\n onClick: () => {\n i == null || i(), a();\n }\n }\n ],\n [c, o, i, a]\n );\n return /* @__PURE__ */ r(\n re,\n {\n ...s,\n title: d || c.defaultTitle,\n onClose: a,\n actions: u,\n disableCloseOnOverlayClick: e === \"confirm\",\n hideCloseButton: e === \"confirm\",\n children: typeof n == \"string\" ? /* @__PURE__ */ r(\"p\", { className: \"text-sm\", children: n }) : n\n }\n );\n}\nconst ne = b(null), ce = () => {\n const e = P(ne);\n if (!e)\n throw new Error(\"Tabs components must be used within a Tabs component\");\n return e;\n}, T = {\n info: {\n className: \"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100\",\n icon: /* @__PURE__ */ r(X, { size: 20 })\n },\n warning: {\n className: \"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100\",\n icon: /* @__PURE__ */ r(K, { size: 20 })\n },\n error: {\n className: \"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100\",\n icon: /* @__PURE__ */ r(J, { size: 20 })\n }\n};\nfunction ue({\n id: e,\n title: n,\n description: l,\n type: t = \"info\",\n action: i,\n duration: a = 5e3,\n onRemove: o,\n customTypes: d,\n customComponent: s\n}) {\n const [c, u] = v(!1), m = z(() => {\n u(!0), setTimeout(() => {\n o == null || o(e);\n }, 150);\n }, [e, o]);\n if (g(() => {\n if (a > 0) {\n const p = setTimeout(() => {\n m();\n }, a);\n return () => clearTimeout(p);\n }\n }, [a, e, o, m]), s)\n return /* @__PURE__ */ r(\n s,\n {\n id: e,\n title: n,\n description: l,\n type: t,\n action: i,\n duration: a,\n onRemove: o\n }\n );\n const h = (d == null ? void 0 : d[t]) || T[t] || T.info;\n return /* @__PURE__ */ f(\n \"div\",\n {\n role: t === \"error\" ? \"alert\" : \"status\",\n \"aria-live\": t === \"error\" ? void 0 : \"polite\",\n className: Z(\n \"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out\",\n i && \"pb-3\",\n h.className,\n c ? \"opacity-0 translate-x-full\" : \"opacity-100 translate-x-0\"\n ),\n children: [\n /* @__PURE__ */ r(\"div\", { className: \"flex-shrink-0 mr-3\", children: h.icon }),\n /* @__PURE__ */ f(\"div\", { className: \"flex-grow min-w-0\", children: [\n /* @__PURE__ */ r(\"div\", { className: \"font-medium text-sm leading-5\", children: n }),\n l && /* @__PURE__ */ r(\"div\", { className: \"mt-1 text-sm opacity-90 leading-5\", children: l }),\n i && /* @__PURE__ */ r(\"div\", { className: \"mt-1.5\", children: /* @__PURE__ */ r(\n \"button\",\n {\n onClick: i.onClick,\n className: \"text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer\",\n children: i.label\n }\n ) })\n ] }),\n /* @__PURE__ */ r(\n \"button\",\n {\n onClick: m,\n className: \"flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0\",\n children: /* @__PURE__ */ r(F, { size: 16 })\n }\n )\n ]\n }\n );\n}\nexport {\n de as A,\n ue as T,\n ne as a,\n k as n,\n ce as u\n};\n//# sourceMappingURL=Toast-CuxloQs8.js.map\n","import { jsxs as C, jsx as c, Fragment as O } from \"react/jsx-runtime\";\nimport F, { useId as V, useState as A, createElement as le, useEffect as z, useCallback as I, useMemo as ee, useRef as S, isValidElement as de, cloneElement as fe } from \"react\";\nimport { join as x } from \"./utils.esm.js\";\nimport { d as me, C as be, a as he, g as pe, E as ve, Q as ge, b as ye, e as we, f as xe, c as Ne } from \"./QuestionMarkCircled-CY81euqP.js\";\nimport { n as T, a as Ee, u as te } from \"./Toast-CuxloQs8.js\";\nimport { A as St, T as Vt } from \"./Toast-CuxloQs8.js\";\nimport { E as Ce, X as ce } from \"./X-CIoyLewf.js\";\nimport { createPortal as re } from \"react-dom\";\nfunction Z({\n id: n,\n title: o,\n content: t,\n children: a,\n className: e = \"\",\n disabled: r = !1,\n isOpen: s = !1,\n onToggle: i,\n triggerClassName: u = \"\",\n bodyClassName: d = \"\"\n}) {\n const h = V(), l = n || `accordion-item-${h}`, v = `${l}-header`, f = `${l}-panel`, b = () => {\n !r && i && i();\n }, m = (p) => {\n (p.key === \"Enter\" || p.key === \" \") && (p.preventDefault(), b());\n };\n return /* @__PURE__ */ C(\"div\", { className: x(\"border-b border-gray-200\", r && \"opacity-60 cursor-not-allowed\", e), children: [\n /* @__PURE__ */ C(\n \"button\",\n {\n id: v,\n type: \"button\",\n className: x(\n \"w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary\",\n r ? \"cursor-not-allowed\" : \"hover:bg-gray-50/10 cursor-pointer\",\n u\n ),\n \"aria-expanded\": s,\n \"aria-controls\": f,\n disabled: r,\n onClick: b,\n onKeyDown: m,\n children: [\n /* @__PURE__ */ c(\"span\", { children: o }),\n /* @__PURE__ */ c(\n \"span\",\n {\n className: x(\n \"transform transition-transform duration-300 ease-linear\",\n s ? \"rotate-180\" : \"rotate-0\"\n ),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ c(me, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: f,\n role: \"region\",\n \"aria-labelledby\": v,\n className: x(\n \"transition-all duration-300 ease-linear px-4\",\n s ? \"max-h-96 opacity-100 overflow-auto py-3\" : \"max-h-0 opacity-0 overflow-hidden\",\n d\n ),\n children: s && (a || t)\n }\n )\n ] });\n}\nfunction dt({\n id: n,\n items: o = [],\n children: t,\n className: a = \"\",\n itemClassName: e = \"\",\n allowMultiple: r = !1,\n defaultOpenItems: s = [],\n triggersClassName: i = \"\",\n bodiesClassName: u = \"\"\n}) {\n const d = V(), h = n || `accordion-group-${d}`, [l, v] = A(new Set(s)), f = (p) => {\n v((y) => {\n const g = new Set(y);\n return g.has(p) ? g.delete(p) : (r || g.clear(), g.add(p)), g;\n });\n }, b = (p) => `${d}-item-${p}`, m = (p) => l.has(p);\n return /* @__PURE__ */ C(\"div\", { id: h, className: a, children: [\n o.length > 0 && o.map((p, y) => {\n const g = p.id || b(y);\n return /* @__PURE__ */ c(\n Z,\n {\n id: g,\n title: p.title,\n content: p.content,\n disabled: p.disabled,\n isOpen: m(g),\n onToggle: () => f(g),\n className: e,\n triggerClassName: i,\n bodyClassName: u\n },\n g\n );\n }),\n o.length === 0 && t && F.Children.map(t, (p, y) => {\n if (F.isValidElement(p) && p.type === Z) {\n const g = p.props.id || b(y);\n return /* @__PURE__ */ le(\n Z,\n {\n ...p.props,\n key: g,\n id: g,\n className: x(e, p.props.className),\n isOpen: m(g),\n onToggle: () => f(g),\n triggerClassName: x(i, p.props.triggerClassName),\n bodyClassName: x(u, p.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction Ae() {\n const [n, o] = A(0);\n return z(() => {\n const t = setInterval(() => {\n o((a) => (a + 1) % 3);\n }, 500);\n return () => clearInterval(t);\n }, []), /* @__PURE__ */ c(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((t) => /* @__PURE__ */ c(\n \"div\",\n {\n className: x(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n n === t && \"transform -translate-y-1\"\n )\n },\n t\n )) });\n}\nconst Te = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, Ie = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, $e = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, J = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction ze({\n variant: n = J.variant,\n size: o,\n rounded: t = J.rounded,\n loading: a,\n linkTo: e,\n linkProps: r,\n type: s = \"button\",\n className: i,\n ...u\n}) {\n let d;\n n === \"link\" && !o ? d = \"fitted\" : d = o || J.size;\n const l = x(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n Te[n],\n Ie[d],\n $e[t],\n a && \"relative pointer-events-none\",\n e && \"relative\",\n i\n );\n return /* @__PURE__ */ C(\n \"button\",\n {\n ...u,\n role: e ? \"link\" : u.role,\n \"aria-label\": u[\"aria-label\"] || (r == null ? void 0 : r[\"aria-label\"]),\n \"aria-description\": u[\"aria-description\"] || (r == null ? void 0 : r[\"aria-description\"]),\n \"aria-disabled\": u.disabled || a,\n \"aria-busy\": a,\n type: s,\n className: l,\n children: [\n a && /* @__PURE__ */ c(Ae, {}),\n /* @__PURE__ */ c(\"span\", { className: x(a && \"invisible\"), children: u.children }),\n e && !u.disabled && /* @__PURE__ */ c(\n \"a\",\n {\n ...r,\n \"aria-hidden\": !0,\n href: e,\n rel: (r == null ? void 0 : r.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction ke(n) {\n const [o, t] = A(\"\"), a = I((e) => {\n let r = e, s = \"\";\n for (; r && !s; ) {\n const i = window.getComputedStyle(r).backgroundColor;\n i && i !== \"transparent\" && i !== \"rgba(0, 0, 0, 0)\" && (s = i), r = r.parentElement;\n }\n return s || \"transparent\";\n }, []);\n return z(() => {\n const e = document.getElementById(n);\n if (e) {\n const r = a(e.parentElement);\n t(r);\n }\n }, [n, a]), o;\n}\nfunction ft({\n ref: n,\n id: o,\n size: t = 20,\n color: a,\n filled: e = !1,\n rounded: r = !0,\n checked: s = !1,\n onCheckedChange: i,\n disabled: u,\n className: d = \"\",\n ...h\n}) {\n const l = V(), v = ee(() => o || `checkbox-${l}`, [o, l]), f = ke(v), [b, m] = A(s);\n z(() => {\n m(s);\n }, [s]);\n const p = () => {\n u || (m(!b), i == null || i(!b));\n }, y = (w) => {\n w.key === \" \" && (w.preventDefault(), p());\n }, g = x(\n \"flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2\",\n r && \"rounded\",\n u && \"opacity-40 cursor-not-allowed\",\n !u && \"cursor-pointer\",\n d\n );\n return /* @__PURE__ */ c(\n \"button\",\n {\n id: v,\n type: \"button\",\n ref: n,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: p,\n \"aria-checked\": b,\n \"aria-disabled\": u,\n onKeyDownCapture: y,\n style: {\n width: t,\n height: t,\n color: a,\n backgroundColor: b && e ? \"currentcolor\" : \"transparent\"\n },\n className: g,\n ...h,\n children: b && /* @__PURE__ */ c(be, { size: t, color: e ? f : void 0 })\n }\n );\n}\nfunction mt({\n children: n,\n className: o,\n linkTo: t,\n linkProps: a,\n onButtonClick: e,\n buttonProps: r,\n ...s\n}) {\n return t && e && console.warn('Clickable: Both \"linkTo\" and \"onButtonClick\" props are provided. Only \"linkTo\" will be used.'), /* @__PURE__ */ C(\"div\", { className: x(\"relative w-fit\", o), ...s, children: [\n n,\n t && /* @__PURE__ */ c(\n \"a\",\n {\n ...a,\n rel: (a == null ? void 0 : a.rel) || \"noreferrer\",\n href: t,\n className: x(\"absolute inset-0\", a == null ? void 0 : a.className)\n }\n ),\n !t && e && /* @__PURE__ */ c(\n \"button\",\n {\n ...r,\n type: \"button\",\n onClick: e,\n className: x(\"absolute inset-0 cursor-pointer\", r == null ? void 0 : r.className)\n }\n )\n ] });\n}\nfunction Q({ elementId: n, type: o, message: t }) {\n return z(() => {\n const a = document.getElementById(n);\n if (a) {\n if (!t && o === \"error\") {\n a.removeAttribute(\"data-error\");\n return;\n }\n if (!t && o === \"success\") {\n a.removeAttribute(\"data-success\");\n return;\n }\n return a.setAttribute(\"aria-describedby\", `${n}-${o}-message`), a.setAttribute(\"aria-invalid\", o === \"error\" ? \"true\" : \"false\"), o === \"error\" && a.setAttribute(\"data-error\", \"true\"), o === \"success\" && a.setAttribute(\"data-success\", \"true\"), () => {\n a.removeAttribute(\"aria-describedby\"), a.removeAttribute(\"aria-invalid\"), a.removeAttribute(\"data-error\"), a.removeAttribute(\"data-success\");\n };\n }\n }, [n, o, t]), t ? /* @__PURE__ */ C(\n \"small\",\n {\n className: x(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start\",\n o === \"error\" && \"text-destructive\",\n o === \"success\" && \"text-success\"\n ),\n role: \"status\",\n children: [\n o === \"error\" ? /* @__PURE__ */ c(Ce, {}) : /* @__PURE__ */ c(he, {}),\n /* @__PURE__ */ c(\"span\", { id: `${n}-${o}-message`, children: t })\n ]\n }\n ) : null;\n}\nconst Re = {\n base: \"\",\n default: \"ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success\",\n underline: \"border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\"\n}, De = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, ne = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction bt({\n variant: n = ne.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: a,\n successMessage: e,\n type: r = \"text\",\n className: s,\n ...i\n}) {\n const u = V(), [d, h] = A(!1);\n let l = o;\n n === \"outline\" && !o && (l = \"md\"), l = l || ne.rounded;\n const b = x(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n \"file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors\",\n !t && Re[n],\n !t && De[l],\n r === \"password\" && \"pr-10\",\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ C(\"div\", { className: x(t && \"cursor-text\"), style: { height: i.height, width: i.width }, children: [\n /* @__PURE__ */ C(\"div\", { className: x(r === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ c(\n \"input\",\n {\n ...i,\n id: u,\n type: r === \"password\" && d ? \"text\" : r,\n \"aria-disabled\": i.disabled,\n readOnly: t,\n \"aria-readonly\": t || i[\"aria-readonly\"],\n \"data-error\": a ? !0 : void 0,\n \"data-success\": e ? !0 : void 0,\n className: b\n }\n ),\n r === \"password\" && /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => h(!d),\n className: \"absolute inset-y-0 right-0 px-2 hover:cursor-pointer\",\n \"aria-label\": \"Toggle password visibility\",\n \"data-state\": d ? \"visible\" : \"hidden\",\n children: d ? /* @__PURE__ */ c(pe, { size: 20 }) : /* @__PURE__ */ c(ve, { size: 20 })\n }\n )\n ] }),\n !t && /* @__PURE__ */ c(Q, { elementId: u, type: \"error\", message: a }),\n !t && /* @__PURE__ */ c(Q, { elementId: u, type: \"success\", message: e })\n ] });\n}\nfunction ht({\n display: n = \"inline\",\n width: o = \"fit-content\",\n className: t = \"\",\n required: a,\n helpMessage: e,\n suffix: r,\n htmlFor: s,\n children: i,\n ...u\n}) {\n const d = V(), h = x(\"font-medium\", n, t), l = e ? `${s ?? d}-help` : void 0;\n return /* @__PURE__ */ C(\"div\", { style: { display: n === \"inline\" ? \"inline-flex\" : \"flex\", width: o }, className: \"relative\", children: [\n /* @__PURE__ */ C(\"label\", { className: h, htmlFor: s, ...u, children: [\n i,\n a && /* @__PURE__ */ c(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n e && /* @__PURE__ */ c(\n \"span\",\n {\n className: \"text-gray-500 ml-1 size-fit -translate-y-1/3\",\n \"aria-describedby\": l,\n \"aria-label\": \"Help information\",\n title: e,\n children: /* @__PURE__ */ c(ge, {})\n }\n ),\n e && /* @__PURE__ */ c(\"div\", { id: l, className: \"sr-only\", children: e }),\n r && /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: r })\n ] });\n}\nfunction Le(n) {\n const [o, t] = A(!1), [a, e] = A(!1);\n return z(() => {\n n ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [n]), { show: o, shouldRender: a };\n}\nfunction Se(n, o) {\n z(() => {\n const t = (a) => {\n a.key === \"Escape\" && n && o();\n };\n return document.addEventListener(\"keydown\", t), n && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [n, o]);\n}\nfunction Ve(n, o) {\n const t = S(null), a = I(() => {\n const e = document.getElementById(n);\n if (!e) return;\n const r = e.querySelectorAll('[data-modal-action=\"true\"]');\n if (r.length > 0) {\n r[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const i = Array.from(s).filter((u) => !(u instanceof HTMLButtonElement && u.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (i.length > 0) {\n i[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [n]);\n z(() => (o && (t.current = document.activeElement, a()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, a]);\n}\nfunction pt({\n id: n,\n isOpen: o,\n onClose: t,\n title: a,\n children: e,\n contentOnly: r = !1,\n className: s,\n overlayClassName: i,\n hideCloseButton: u = !1,\n actions: d = [],\n disableCloseOnOverlayClick: h = !1,\n ariaLabelledBy: l,\n ariaDescribedBy: v\n}) {\n const f = V(), b = n || `modal-${f}`, m = n ? `${n}-title` : `modal-title-${f}`, { show: p, shouldRender: y } = Le(o);\n if (Ve(b, y), Se(y, t), !y) return null;\n const g = () => a ? F.isValidElement(a) ? /* @__PURE__ */ c(\"div\", { className: \"mb-4\", children: a }) : /* @__PURE__ */ c(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: m, children: a }) : null, w = () => d.length === 0 ? null : /* @__PURE__ */ c(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: d.map((N, E) => {\n const { label: D, className: $, ...k } = N;\n return /* @__PURE__ */ c(ze, { className: $, type: \"button\", ...k, \"data-modal-action\": \"true\", children: D }, E);\n }) });\n return /* @__PURE__ */ c(O, { children: re(\n /* @__PURE__ */ c(\n \"div\",\n {\n \"aria-labelledby\": l ?? a ? m : void 0,\n \"aria-describedby\": v,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ C(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: T(\"fixed inset-0 bg-black/20 transition-all\", i),\n onClick: () => {\n h || t();\n }\n }\n ),\n r && /* @__PURE__ */ c(\"div\", { className: T(\"relative w-fit\", s), children: e }),\n !r && /* @__PURE__ */ C(\n \"div\",\n {\n id: b,\n tabIndex: -1,\n className: T(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n p ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !u && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: t,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ c(ce, { size: 18 })\n }\n ),\n g(),\n e,\n w()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nconst Be = {\n link: \"text-primary hover:text-primary-foreground hover:bg-primary/10 aria-current:text-primary-foreground aria-current:bg-primary\",\n outline: \"border border-primary text-primary hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground aria-current:border-primary\",\n filled: \"bg-secondary text-secondary-foreground hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground\"\n}, He = {\n sm: \"px-2 py-1 text-sm min-w-[32px] min-h-8\",\n md: \"px-2 py-1 text-base min-w-[40px] min-h-10\"\n};\nfunction vt({\n page: n,\n pageCount: o = 5,\n maxVisiblePages: t = 5,\n showFirstLast: a = !0,\n onPageChange: e,\n size: r = \"md\",\n variant: s = \"link\",\n className: i,\n ref: u,\n buttonsClassName: d,\n ...h\n}) {\n const l = o === 1 / 0, f = I(() => {\n if (l) return [];\n const N = o, E = Math.min(t, N);\n if (N <= E)\n return Array.from({ length: N }, (P, j) => j + 1);\n const D = Math.floor(E / 2);\n let $ = Math.max(1, n - D), k = Math.min(N, $ + E - 1);\n return k - $ + 1 < E && ($ = Math.max(1, k - E + 1), k = Math.min(N, $ + E - 1)), Array.from({ length: k - $ + 1 }, (P, j) => $ + j);\n }, [l, t, n, o])(), b = n > 1, m = l || n < o, p = a && !l, y = a && !l, g = (N) => {\n N >= 1 && (l || N <= o) && e(N);\n }, w = I(() => {\n const N = T(\n \"flex items-center justify-center min-w-fit\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n He[r],\n \"rounded-md\"\n );\n return T(N, Be[s], d);\n }, [s, r, d]);\n return /* @__PURE__ */ C(\n \"nav\",\n {\n ref: u,\n className: T(\"flex items-center justify-center gap-1\", i),\n role: \"navigation\",\n \"aria-label\": \"Pagination\",\n \"data-page\": n,\n \"data-page-count\": l ? \"infinite\" : o,\n ...h,\n children: [\n p && /* @__PURE__ */ C(\n \"button\",\n {\n onClick: () => g(1),\n className: w(),\n disabled: n === 1,\n \"aria-label\": \"Go to first page\",\n children: [\n /* @__PURE__ */ c(ye, { size: r === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: \"First\" })\n ]\n }\n ),\n /* @__PURE__ */ C(\n \"button\",\n {\n onClick: () => g(n - 1),\n className: w(),\n disabled: !b,\n \"aria-label\": \"Go to previous page\",\n children: [\n /* @__PURE__ */ c(we, { size: r === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: \"Previous\" })\n ]\n }\n ),\n !l && f.map((N) => /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => g(N),\n className: T(w(), \"aspect-square\"),\n \"aria-label\": `Go to page ${N}`,\n \"aria-current\": N === n ? !0 : void 0,\n children: N\n },\n N\n )),\n /* @__PURE__ */ C(\n \"button\",\n {\n onClick: () => g(n + 1),\n className: w(),\n disabled: !m,\n \"aria-label\": \"Go to next page\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: \"mr-1\", children: \"Next\" }),\n /* @__PURE__ */ c(xe, { size: r === \"sm\" ? 12 : 15 })\n ]\n }\n ),\n y && /* @__PURE__ */ C(\n \"button\",\n {\n onClick: () => g(o),\n className: w(),\n disabled: n === o,\n \"aria-label\": \"Go to last page\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: \"mr-1\", children: \"Last\" }),\n /* @__PURE__ */ c(Ne, { size: r === \"sm\" ? 12 : 15 })\n ]\n }\n )\n ]\n }\n );\n}\nfunction Fe(n) {\n const [o, t] = A(!1), [a, e] = A(!1);\n return z(() => {\n n ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 300));\n }, [n]), { show: o, shouldRender: a };\n}\nfunction je(n, o) {\n z(() => {\n const t = (a) => {\n a.key === \"Escape\" && n && o();\n };\n return document.addEventListener(\"keydown\", t), n && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [n, o]);\n}\nfunction Pe(n, o) {\n const t = S(null), a = I(() => {\n const e = document.getElementById(n);\n if (!e) return;\n const r = e.querySelectorAll('[data-panel-action=\"true\"]');\n if (r.length > 0) {\n r[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const i = Array.from(s).filter((u) => !(u instanceof HTMLButtonElement && u.getAttribute(\"data-panel-close-button\") === \"true\"));\n if (i.length > 0) {\n i[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [n]);\n z(() => (o && (t.current = document.activeElement, a()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, a]);\n}\nconst Ge = {\n size: {\n sm: \"max-w-sm\",\n md: \"max-w-md\",\n lg: \"max-w-lg\",\n xl: \"max-w-xl\",\n \"2xl\": \"max-w-2xl\",\n full: \"w-full\",\n screen: \"w-screen\"\n }\n};\nfunction gt({\n ref: n,\n id: o,\n isOpen: t,\n onClose: a,\n title: e,\n children: r,\n footer: s,\n size: i = \"md\",\n className: u,\n overlayClassName: d,\n hideCloseButton: h = !1,\n disableCloseOnOverlayClick: l = !1,\n ariaLabelledBy: v,\n ariaDescribedBy: f\n}) {\n const b = V(), m = o || `panel-${b}`, p = o ? `${o}-title` : `panel-title-${b}`, { show: y, shouldRender: g } = Fe(t);\n if (Pe(m, g), je(g, a), !g) return null;\n const w = () => e ? F.isValidElement(e) ? /* @__PURE__ */ c(\"div\", { children: e }) : /* @__PURE__ */ c(\"h2\", { className: \"text-2xl font-semibold\", id: p, children: e }) : null, N = () => {\n if (!s) return null;\n if (F.isValidElement(s)) {\n const E = s, D = E.props.className || \"\";\n return F.cloneElement(E, { className: T(\"px-6 py-4\", D) });\n }\n return /* @__PURE__ */ c(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ c(O, { children: re(\n /* @__PURE__ */ C(\n \"div\",\n {\n \"aria-labelledby\": v ?? e ? p : void 0,\n \"aria-describedby\": f,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-hidden\",\n \"data-panel-open\": t,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: T(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n y ? \"opacity-100\" : \"opacity-0\",\n d\n ),\n onClick: () => {\n l || a();\n }\n }\n ),\n /* @__PURE__ */ c(\"div\", { className: \"fixed inset-y-0 right-0 flex max-w-full\", children: /* @__PURE__ */ c(\n \"div\",\n {\n id: m,\n ref: n,\n tabIndex: -1,\n className: T(\n \"relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out\",\n i !== \"screen\" && \"border-l border-border\",\n Ge.size[i],\n y ? \"translate-x-0\" : \"translate-x-full\",\n u\n ),\n \"data-panel-size\": i,\n children: /* @__PURE__ */ C(\"div\", { className: \"flex h-full flex-col\", children: [\n e && /* @__PURE__ */ c(\"div\", { className: \"px-6 pt-6\", children: w() }),\n !h && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: a,\n \"data-panel-close-button\": \"true\",\n \"aria-label\": \"Close panel\",\n className: \"rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ c(ce, { size: 18 })\n }\n ),\n /* @__PURE__ */ c(\"div\", { className: T(\"flex-1 overflow-y-auto px-6 pb-6\", e ? \"pt-6\" : \"pt-10\"), children: r }),\n N()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nfunction Me({ itemId: n, checked: o, onChange: t, name: a, disabled: e = !1, className: r = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", i = () => {\n e || t();\n }, u = x(\n s,\n !o && \"hover:border-current/60\",\n !e && \"border-current cursor-pointer\",\n e && \"border-muted/60 cursor-not-allowed\",\n r\n );\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: n,\n role: \"radio\",\n tabIndex: -1,\n \"aria-checked\": o,\n \"aria-disabled\": e,\n \"aria-description\": `Radio button for ${a}`,\n \"aria-labelledby\": `${n}-label`,\n onClick: i,\n className: u,\n style: {\n width: \"1em\",\n height: \"1em\",\n padding: \"0.1em\",\n borderWidth: \"0.06em\"\n },\n children: o && /* @__PURE__ */ c(\n \"div\",\n {\n className: x(\"size-full aspect-square rounded-full\", e && \"bg-muted/60\", !e && \"bg-current\")\n }\n )\n }\n );\n}\nfunction Y({\n value: n,\n children: o,\n className: t = \"\",\n isSelected: a = !1,\n onChange: e,\n disabled: r = !1,\n hideInput: s = !1,\n description: i,\n name: u\n}) {\n const h = `radio-${V()}-${n}`, l = () => {\n r || e == null || e(n);\n };\n return /* @__PURE__ */ C(\n \"div\",\n {\n title: i,\n className: x(\n \"relative flex items-center\",\n t,\n // Uses text color for borders\n s && `p-2 border-2 focus-within:border-dashed focus-within:${r ? \"border-current/50\" : \"border-current/80\"}`,\n s && !a && `border-transparent ${r ? \"\" : \"not-focus-within:hover:border-border/60\"}`,\n s && a && \"border-border\",\n r && \"opacity-60 cursor-not-allowed\"\n ),\n style: {\n gap: \"0.5em\"\n },\n children: [\n !s && /* @__PURE__ */ c(\n Me,\n {\n itemId: h,\n name: u || \"\",\n checked: a,\n onChange: l,\n disabled: r,\n className: x(s && \"\")\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: s ? h : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? l : void 0,\n \"aria-checked\": s ? a ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": s ? r : void 0,\n \"aria-description\": s ? i || `Radio button for ${u}` : void 0,\n \"aria-labelledby\": s ? `${h}-label` : void 0,\n className: x(s && \"size-full\", typeof o == \"object\" && \"grow focus:outline-none\"),\n children: /* @__PURE__ */ c(\n \"label\",\n {\n id: `${h}-label`,\n onClick: s ? void 0 : l,\n className: x(r && \"cursor-not-allowed\", !r && \"cursor-pointer\"),\n children: o\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction qe(n, o) {\n const [t, a] = A(o), [e, r] = A(-1), [s, i] = A(!1), u = I((f, b) => {\n var y;\n const m = f[b];\n m.hasAttribute(\"disabled\") || m.getAttribute(\"aria-disabled\") === \"true\" || ((y = f[b]) == null || y.click(), r(b));\n }, []), d = I(\n (f, b) => {\n var p;\n if (f.preventDefault(), s || !b.length) return;\n const m = o !== -1 ? o : 0;\n (p = b[m]) == null || p.focus(), a(m), o !== -1 && u(b, m);\n },\n [o, s, u]\n ), h = I(\n (f) => {\n var y;\n if (!f.shiftKey)\n return;\n f.preventDefault();\n const b = Array.from(\n document.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter((g) => !g.hasAttribute(\"disabled\") && g.tabIndex >= 0), m = b.findIndex((g) => g.id === n), p = m > 0 ? m - 1 : b.length - 1;\n (y = b[p]) == null || y.focus();\n },\n [n]\n ), l = I(\n (f, b) => {\n var w;\n if (!b.length) return;\n const m = f.target;\n if (!b.some((N) => N.id === m.id)) return;\n const y = t !== -1 ? t : 0;\n let g = y;\n switch (f.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n f.preventDefault(), g = y > 0 ? y - 1 : b.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n f.preventDefault(), g = (y + 1) % b.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n f.preventDefault(), u(b, y);\n return;\n case \"Tab\":\n h(f);\n return;\n default:\n return;\n }\n (w = b[g]) == null || w.focus(), a(g), e !== -1 && u(b, g);\n },\n [t, e, h, u]\n ), v = I(() => {\n const f = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n return f ? Array.from(f.querySelectorAll('[role=\"radio\"]')) : [];\n }, [n]);\n z(() => {\n const f = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n if (!f) return;\n const b = v(), m = (w) => d(w, b), p = (w) => l(w, b), y = () => i(!0), g = () => i(!1);\n return document.addEventListener(\"keydown\", p), f.addEventListener(\"focus\", m), f.addEventListener(\"mousedown\", y), document.addEventListener(\"mouseup\", g), () => {\n document.removeEventListener(\"keydown\", p), f.removeEventListener(\"focus\", m), f.removeEventListener(\"mousedown\", y), document.removeEventListener(\"mouseup\", g);\n };\n }, [n, v, d, l]);\n}\nfunction yt({\n options: n = [],\n value: o,\n onChange: t,\n id: a,\n children: e,\n className: r = \"\",\n childrenClassName: s = \"\",\n hideInputs: i = !1\n}) {\n const u = V(), d = a || `radio-group-${u}`;\n qe(\n d,\n n.findIndex((l) => l === o)\n );\n const h = ee(() => n.reduce((l, v) => (typeof v == \"string\" ? l.some((f) => f.value === v) || l.push({ label: v, value: v }) : l.push(v), l), []), [n]);\n return /* @__PURE__ */ C(\"div\", { id: d, role: \"radiogroup\", tabIndex: 0, className: x(r, \"focus:outline-none\"), children: [\n h.length > 0 && h.map((l, v) => /* @__PURE__ */ c(\n Y,\n {\n value: l.value,\n isSelected: o === l.value,\n onChange: t,\n name: d,\n disabled: l.disabled,\n description: l.description,\n hideInput: i,\n className: s,\n children: l.label\n },\n `${l.value}-${v}`\n )),\n h.length === 0 && e && F.Children.map(e, (l) => F.isValidElement(l) && l.type === Y ? /* @__PURE__ */ c(\n Y,\n {\n ...l.props,\n className: x(s, l.props.className),\n hideInput: l.props.hideInput || i,\n isSelected: o === l.props.value,\n onChange: t,\n name: d,\n children: l.props.children\n }\n ) : null)\n ] });\n}\nfunction We(n) {\n const o = S(null), t = S(null), a = S(null), [e, r] = A(!1), [s, i] = A(!1), [u, d] = A({\n vertical: !1,\n horizontal: !1\n }), h = S(null), l = S(null), v = I(() => {\n const m = o.current;\n if (!m) return;\n const p = m.scrollHeight > m.clientHeight, y = m.scrollWidth > m.clientWidth;\n d({\n vertical: p,\n horizontal: y\n });\n }, []), f = I(() => {\n const m = o.current, p = t.current, y = a.current;\n if (m) {\n if (p && u.vertical) {\n const w = (u.horizontal ? m.clientHeight - n : m.clientHeight) / m.scrollHeight, N = Math.max(w * 100, 10), E = m.scrollHeight - m.clientHeight, D = E > 0 ? m.scrollTop / E : 0, $ = 100 - N, k = D * $;\n p.style.height = `${N}%`, p.style.top = `${k}%`, p.style.transform = \"none\";\n }\n if (y && u.horizontal) {\n const w = (u.vertical ? m.clientWidth - n : m.clientWidth) / m.scrollWidth, N = Math.max(w * 100, 10), E = m.scrollWidth - m.clientWidth, D = E > 0 ? m.scrollLeft / E : 0, $ = 100 - N, k = D * $;\n y.style.width = `${N}%`, y.style.left = `${k}%`, y.style.transform = \"none\";\n }\n }\n }, [u, n]), b = I(() => {\n h.current && clearTimeout(h.current), l.current && clearTimeout(l.current), r(!0), i(!1), f(), h.current = setTimeout(() => {\n i(!0), l.current = setTimeout(() => {\n r(!1), i(!1);\n }, 300);\n }, 1e3);\n }, [f]);\n return z(() => {\n const m = o.current;\n if (!m) return;\n v();\n const p = new ResizeObserver(v);\n p.observe(m);\n const y = new MutationObserver(v);\n return y.observe(m, {\n childList: !0,\n subtree: !0,\n attributes: !0\n }), () => {\n p.disconnect(), y.disconnect();\n };\n }, [v]), z(() => {\n f();\n }, [u, f]), z(() => () => {\n h.current && clearTimeout(h.current), l.current && clearTimeout(l.current);\n }, []), {\n viewportRef: o,\n verticalThumbRef: t,\n horizontalThumbRef: a,\n isScrolling: e,\n isFadingOut: s,\n scrollbarVisible: u,\n handleScroll: b\n };\n}\nfunction wt({\n className: n,\n thumbClassName: o,\n viewportClassName: t,\n scrollbarClassName: a,\n scrollbarThickness: e = 10,\n children: r,\n id: s,\n ref: i,\n ...u\n}) {\n const { viewportRef: d, verticalThumbRef: h, horizontalThumbRef: l, isScrolling: v, isFadingOut: f, scrollbarVisible: b, handleScroll: m } = We(e), p = T(\n \"relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400\",\n o\n );\n return /* @__PURE__ */ C(\"div\", { ref: i, id: s, className: T(\"relative overflow-hidden\", n), \"data-scroll-area-root\": \"\", ...u, children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: d,\n className: T(\n \"h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\",\n t\n ),\n onScroll: m,\n \"data-scroll-area-viewport\": \"\",\n children: r\n }\n ),\n b.vertical && (v || f) && /* @__PURE__ */ c(\n \"div\",\n {\n className: T(\n \"touch-none select-none transition-all duration-300\",\n \"p-[1px]\",\n \"absolute right-0 top-0\",\n f ? \"opacity-0\" : \"opacity-100\",\n a\n ),\n \"data-scroll-area-scrollbar\": \"vertical\",\n \"data-state\": v ? \"visible\" : \"hidden\",\n style: {\n width: `${e}px`,\n height: b.horizontal ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ c(\n \"div\",\n {\n ref: h,\n className: T(\"absolute rounded-full\", p),\n \"data-scroll-area-thumb\": \"\",\n style: { height: \"20%\", top: \"0%\", width: \"100%\" }\n }\n )\n }\n ),\n b.horizontal && (v || f) && /* @__PURE__ */ c(\n \"div\",\n {\n className: T(\n \"touch-none select-none transition-all duration-300\",\n \"p-[1px]\",\n \"absolute bottom-0 left-0\",\n f ? \"opacity-0\" : \"opacity-100\",\n a\n ),\n \"data-scroll-area-scrollbar\": \"horizontal\",\n \"data-state\": v ? \"visible\" : \"hidden\",\n style: {\n height: `${e}px`,\n width: b.vertical ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ c(\n \"div\",\n {\n ref: l,\n className: T(\"absolute rounded-full\", p),\n \"data-scroll-area-thumb\": \"\",\n style: { width: \"20%\", left: \"0%\", height: \"100%\" }\n }\n )\n }\n ),\n b.vertical && b.horizontal && /* @__PURE__ */ c(\n \"div\",\n {\n className: T(\"bg-transparent\", \"absolute bottom-0 right-0\"),\n \"data-scroll-area-corner\": \"\",\n style: {\n height: `${e}px`,\n width: `${e}px`\n }\n }\n )\n ] });\n}\nconst Ke = {\n thin: {\n horizontal: \"h-px\",\n vertical: \"w-px\"\n },\n medium: {\n horizontal: \"h-0.5\",\n vertical: \"w-0.5\"\n },\n thick: {\n horizontal: \"h-1\",\n vertical: \"w-1\"\n },\n \"extra-thick\": {\n horizontal: \"h-2\",\n vertical: \"w-2\"\n }\n}, Ue = {\n horizontal: \"w-full\",\n vertical: \"min-h-4 h-full\"\n};\nfunction xt({\n orientation: n = \"horizontal\",\n decorative: o = !1,\n thickness: t = \"thin\",\n className: a,\n ...e\n}) {\n const r = x(\n \"shrink-0 bg-border\",\n Ue[n],\n Ke[t][n],\n a\n );\n return /* @__PURE__ */ c(\n \"div\",\n {\n ...e,\n className: r,\n role: o ? \"presentation\" : \"separator\",\n \"aria-orientation\": o ? void 0 : n,\n \"aria-hidden\": o,\n \"data-orientation\": n,\n \"data-thickness\": t\n }\n );\n}\nconst oe = {\n shape: {\n rectangle: \"rounded-md min-h-1\",\n circle: \"rounded-full aspect-square min-h-1\",\n text: \"rounded-sm min-h-1 h-4\"\n },\n lineSpacing: {\n xs: \"space-y-1\",\n sm: \"space-y-2\",\n md: \"space-y-3\",\n lg: \"space-y-4\",\n xl: \"space-y-6\"\n }\n};\nfunction Nt({\n shape: n = \"rectangle\",\n lineSpacing: o = \"sm\",\n className: t,\n lines: a = 1,\n animate: e = !0,\n ref: r,\n ...s\n}) {\n const i = x(\"bg-muted/70\", e && \"animate-pulse\", oe.shape[n], t);\n return a > 1 ? /* @__PURE__ */ c(\n \"div\",\n {\n ref: r,\n className: oe.lineSpacing[o],\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-container\",\n \"data-lines\": a,\n \"data-shape\": n,\n \"data-animate\": e,\n ...s,\n children: Array.from({ length: a }, (u, d) => /* @__PURE__ */ c(\n \"div\",\n {\n className: x(\n i,\n // Make last line shorter for a more natural text appearance\n d === a - 1 && \"w-3/4\"\n ),\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-line\",\n \"data-line-index\": d\n },\n d\n ))\n }\n ) : /* @__PURE__ */ c(\n \"div\",\n {\n ref: r,\n className: i,\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton\",\n \"data-shape\": n,\n \"data-animate\": e,\n ...s\n }\n );\n}\nfunction Et({\n id: n,\n value: o,\n defaultValue: t = 0,\n onValueChange: a,\n min: e = 0,\n max: r = 100,\n step: s = 1,\n disabled: i = !1,\n trackClassName: u,\n rangeClassName: d,\n thumbClassName: h,\n className: l,\n ref: v,\n ariaLabel: f,\n ariaLabelledBy: b,\n ...m\n}) {\n const [p, y] = A(t), g = o !== void 0, w = g ? o : p, N = S(null), E = S(!1), D = S(0), $ = I(\n (R) => {\n const L = Math.max(e, Math.min(r, R)), B = Math.round(L / s) * s;\n g || y(B), a == null || a(B);\n },\n [e, r, s, g, a]\n ), k = I(\n (R, L = !1) => {\n var W;\n const B = (W = N.current) == null ? void 0 : W.getBoundingClientRect();\n if (!B) return w;\n let M = R.clientX;\n L && (M = M - D.current);\n const U = Math.max(0, Math.min(1, (M - B.left) / B.width));\n return e + (r - e) * U;\n },\n [e, r, w]\n ), P = I(\n (R) => {\n if (i || R.target !== R.currentTarget) return;\n const L = k(R);\n $(L);\n },\n [i, k, $]\n ), j = I(\n (R) => {\n var W;\n if (i) return;\n R.stopPropagation(), E.current = !0;\n const L = (W = N.current) == null ? void 0 : W.getBoundingClientRect(), B = R.currentTarget.getBoundingClientRect();\n if (L && B) {\n const q = B.left + B.width / 2;\n D.current = R.clientX - q;\n }\n R.currentTarget.setPointerCapture(R.pointerId);\n const M = (q) => {\n if (!E.current) return;\n const ue = k(q, !0);\n $(ue);\n }, U = (q) => {\n if (q.pointerId === R.pointerId) {\n E.current = !1, D.current = 0;\n try {\n R.currentTarget.releasePointerCapture(q.pointerId);\n } catch {\n }\n document.removeEventListener(\"pointermove\", M), document.removeEventListener(\"pointerup\", U);\n }\n };\n document.addEventListener(\"pointermove\", M), document.addEventListener(\"pointerup\", U);\n },\n [i, k, $]\n ), K = I(\n (R) => {\n if (i) return;\n let L = w;\n switch (R.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n L = w + s;\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n L = w - s;\n break;\n case \"Home\":\n L = e;\n break;\n case \"End\":\n L = r;\n break;\n case \"PageUp\":\n L = w + s * 10;\n break;\n case \"PageDown\":\n L = w - s * 10;\n break;\n default:\n return;\n }\n R.preventDefault(), $(L);\n },\n [i, w, s, e, r, $]\n ), G = r === e ? 0 : (w - e) / (r - e) * 100;\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: n,\n ref: v,\n className: T(\n \"relative flex items-center w-full touch-none select-none\",\n i && \"opacity-50 cursor-not-allowed\",\n l\n ),\n \"data-disabled\": i,\n \"data-value\": w,\n \"data-min\": e,\n \"data-max\": r,\n \"data-step\": s,\n ...m,\n children: /* @__PURE__ */ C(\n \"div\",\n {\n ref: N,\n className: T(\n \"relative h-1.5 w-full rounded-full bg-muted cursor-pointer\",\n i && \"cursor-not-allowed\",\n u\n ),\n onPointerDown: P,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: T(\n \"absolute h-full rounded-full pointer-events-none\",\n // pointer-events are disabled so that user interactions are handled by the track element, enabling correct slider behavior\n !E.current && \"transition-all\",\n d\n ),\n style: { width: `${G}%` }\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n className: T(\n \"absolute size-5 -top-2 rounded-full shadow-md cursor-grab\",\n i && \"cursor-not-allowed\",\n !i && \"cursor-grab focus:outline-none focus:ring-2\",\n E.current ? \"cursor-grabbing scale-110\" : \"transition-all\",\n h\n ),\n style: { left: `calc(${G}% - 10px)` },\n tabIndex: i ? -1 : 0,\n role: \"slider\",\n \"aria-valuemin\": e,\n \"aria-valuemax\": r,\n \"aria-valuenow\": w,\n \"aria-label\": f,\n \"aria-labelledby\": b,\n \"aria-disabled\": i,\n onKeyDown: K,\n onPointerDown: j\n }\n )\n ]\n }\n )\n }\n );\n}\nfunction Ct({ children: n, ref: o, ...t }) {\n if (de(n)) {\n let a = { ...t };\n return n.props && (a = { ...a, ...n.props }), fe(n, {\n ...a,\n ref: (e) => {\n typeof o == \"function\" ? o(e) : o && (o.current = e);\n }\n });\n }\n return le(\"div\", { ...t, ref: o }, n);\n}\nconst _e = ({ defaultValue: n, value: o, onValueChange: t } = {}) => {\n const [a, e] = A(n || \"\"), r = o !== void 0, s = r ? o : a, i = I((u) => {\n r || e(u), t == null || t(u);\n }, [r, t]);\n return {\n value: s,\n onValueChange: i\n };\n};\nfunction At({\n defaultValue: n,\n value: o,\n onValueChange: t,\n tabsWidth: a = \"fit\",\n variant: e = \"underline\",\n className: r,\n children: s,\n ref: i,\n id: u,\n triggersClassName: d,\n contentClassName: h\n}) {\n const { value: l, onValueChange: v } = _e({\n defaultValue: n,\n value: o,\n onValueChange: t\n }), f = {\n selectedValue: l,\n onValueChange: v,\n tabsWidth: a,\n variant: e,\n triggersClassName: d,\n contentClassName: h\n };\n return /* @__PURE__ */ c(Ee.Provider, { value: f, children: /* @__PURE__ */ c(\"div\", { id: u, ref: i, className: r, \"data-tabs-width\": a, \"data-variant\": e, children: s }) });\n}\nfunction Tt({ value: n, className: o, children: t, ref: a }) {\n const { selectedValue: e, contentClassName: r } = te(), s = e === n;\n return s ? /* @__PURE__ */ c(\n \"div\",\n {\n ref: a,\n role: \"tabpanel\",\n id: `tabs-content-${n}`,\n \"aria-labelledby\": `tabs-trigger-${n}`,\n \"data-state\": s ? \"active\" : \"inactive\",\n \"data-value\": n,\n className: x(\"mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2\", r, o),\n tabIndex: 0,\n children: t\n }\n ) : null;\n}\nconst ae = {\n width: {\n fit: \"w-fit\",\n full: \"w-full *:flex-1\"\n },\n variant: {\n underline: \"border-b border-border\",\n pills: \"\",\n bordered: \"border border-border rounded-lg p-1\"\n }\n}, Xe = {\n underline: \"border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground\",\n pills: \"rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\",\n bordered: \"rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\"\n};\nfunction It({ children: n, className: o, id: t, ref: a }) {\n const { tabsWidth: e, variant: r } = te();\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: t,\n ref: a,\n role: \"tablist\",\n className: x(\"flex\", ae.width[e], ae.variant[r], o),\n \"data-tabs-width\": e,\n \"data-variant\": r,\n children: n\n }\n );\n}\nfunction $t({ value: n, disabled: o = !1, className: t, children: a, onClick: e, id: r, ref: s }) {\n const { selectedValue: i, onValueChange: u, variant: d, triggersClassName: h } = te(), l = i === n, v = (b) => {\n o || u(n), e == null || e(b);\n };\n return /* @__PURE__ */ c(\n \"button\",\n {\n id: r,\n ref: s,\n role: \"tab\",\n type: \"button\",\n \"aria-selected\": l,\n \"aria-controls\": `tabs-content-${n}`,\n \"data-state\": l ? \"active\" : \"inactive\",\n \"data-value\": n,\n disabled: o,\n className: x(\n \"inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n l ? \"font-medium\" : \"font-light\",\n Xe[d],\n h,\n t\n ),\n onClick: v,\n children: a\n }\n );\n}\nfunction Qe({ elementId: n, maxLength: o }) {\n const [t, a] = A(0);\n return z(() => {\n const e = document.getElementById(n);\n if (!e)\n return;\n const r = () => {\n const s = e.value.length;\n a(s);\n const i = s >= o;\n e.setAttribute(\"aria-describedby\", `${n}-character-count`), e.setAttribute(\"aria-invalid\", i ? \"true\" : \"false\"), i ? e.setAttribute(\"data-error\", \"true\") : e.removeAttribute(\"data-error\");\n };\n return r(), e.addEventListener(\"input\", r), e.setAttribute(\"maxlength\", String(o)), () => {\n e.removeEventListener(\"input\", r), e.removeAttribute(\"maxlength\"), e.removeAttribute(\"aria-describedby\"), e.removeAttribute(\"aria-invalid\"), e.removeAttribute(\"data-error\");\n };\n }, [n, o]), /* @__PURE__ */ c(\n \"small\",\n {\n className: x(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end\",\n t >= o && \"text-destructive\",\n t < o && \"text-current\"\n ),\n role: \"status\",\n children: /* @__PURE__ */ C(\"span\", { id: `${n}-character-count`, children: [\n t,\n \" / \",\n o,\n \" characters\"\n ] })\n }\n );\n}\nfunction Ze(n, o) {\n z(() => {\n const t = document.getElementById(n);\n if (!t)\n return;\n if (!o) {\n t.style.height = \"auto\";\n return;\n }\n const a = () => {\n t.style.height = \"auto\", t.style.height = `${t.scrollHeight}px`;\n };\n return a(), t.addEventListener(\"input\", a), t.addEventListener(\"resize\", a), window.addEventListener(\"resize\", a), () => {\n t.removeEventListener(\"input\", a), t.removeEventListener(\"resize\", a), window.removeEventListener(\"resize\", a);\n };\n }, [n, o]);\n}\nconst Je = {\n base: \"\",\n \"left-line\": \"border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\"\n}, Ye = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, se = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction zt({\n variant: n = se.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: a,\n successMessage: e,\n hideResizeHandle: r = !1,\n autoExpand: s = !1,\n characterLimit: i = 0,\n className: u,\n ...d\n}) {\n const h = V();\n Ze(h, s || t);\n let l = o;\n n === \"outline\" && !o && (l = \"md\"), l = l || se.rounded;\n let v = r;\n (t || n === \"left-line\" && !r) && (v = !0);\n const b = x(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n !t && Je[n],\n !t && Ye[l],\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n v && \"no-resize-handle\",\n u\n );\n return /* @__PURE__ */ C(\"div\", { className: x(\"-space-y-1.5\", t && \"cursor-text\"), children: [\n /* @__PURE__ */ c(\n \"textarea\",\n {\n ...d,\n id: h,\n \"aria-disabled\": d.disabled,\n readOnly: t,\n \"aria-readonly\": t || d[\"aria-readonly\"],\n style: {\n resize: s ? \"none\" : void 0\n },\n className: b\n }\n ),\n i > 0 && /* @__PURE__ */ c(Qe, { elementId: h, maxLength: i }),\n !t && /* @__PURE__ */ c(Q, { elementId: h, type: \"error\", message: a }),\n !t && /* @__PURE__ */ c(Q, { elementId: h, type: \"success\", message: e })\n ] });\n}\nconst Oe = {\n sm: {\n container: \"h-5 min-w-9 w-9\",\n thumb: \"h-4 w-4\",\n translate: \"translate-x-4\"\n },\n md: {\n container: \"h-6 min-w-11 w-11\",\n thumb: \"h-5 w-5\",\n translate: \"translate-x-5\"\n },\n lg: {\n container: \"h-7 min-w-13 w-13\",\n thumb: \"h-6 w-6\",\n translate: \"translate-x-6\"\n }\n}, et = {\n default: {\n unchecked: \"bg-muted\",\n checked: \"bg-primary\"\n },\n success: {\n unchecked: \"bg-muted\",\n checked: \"bg-success\"\n },\n destructive: {\n unchecked: \"bg-muted\",\n checked: \"bg-destructive\"\n }\n}, ie = {\n variant: \"default\",\n size: \"md\"\n};\nfunction kt({\n ref: n,\n id: o,\n size: t = ie.size,\n variant: a = ie.variant,\n checked: e,\n onCheckedChange: r,\n disabled: s = !1,\n className: i,\n thumbClassName: u,\n backgroundClassNames: d,\n ...h\n}) {\n const l = V(), v = ee(() => o || `toggle-${l}`, [o, l]), [f, b] = A(e);\n z(() => {\n b(e);\n }, [e]);\n const m = () => {\n if (!s) {\n const E = !f;\n e === void 0 && b(E), r == null || r(E);\n }\n }, p = (E) => {\n (E.key === \" \" || E.key === \"Enter\") && (E.preventDefault(), m());\n }, y = Oe[t], g = et[a], w = x(\n // Base styles\n \"relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out\",\n \"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2\",\n // Size\n y.container,\n // Variant and state\n f ? (d == null ? void 0 : d.checked) || g.checked : (d == null ? void 0 : d.unchecked) || g.unchecked,\n // Disabled state\n s && \"opacity-50 cursor-not-allowed\",\n !s && \"cursor-pointer\",\n i\n ), N = x(\n // Base thumb styles\n \"absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out\",\n // Size\n y.thumb,\n // Position based on state\n f && y.translate,\n u\n );\n return /* @__PURE__ */ C(\n \"button\",\n {\n ref: n,\n id: v,\n type: \"button\",\n role: \"switch\",\n tabIndex: 0,\n \"aria-checked\": f,\n \"aria-disabled\": s,\n disabled: s,\n onClick: m,\n onKeyDown: p,\n className: w,\n ...h,\n children: [\n /* @__PURE__ */ c(\"span\", { className: N }),\n /* @__PURE__ */ c(\"span\", { className: \"sr-only\", children: f ? \"Enabled\" : \"Disabled\" })\n ]\n }\n );\n}\nconst _ = 8, X = 4, H = 6;\nfunction tt(n) {\n return { calculatePosition: I(\n (t, a) => {\n const e = t.getBoundingClientRect(), r = a.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, i = (v, f, b, m) => v < 0 || f < 0 || v + b > s.width || f + m > s.height, u = {\n top: {\n x: e.left + e.width / 2 - r.width / 2,\n y: e.top - r.height - X,\n arrow: {\n x: r.width / 2 - H,\n y: r.height\n }\n },\n bottom: {\n x: e.left + e.width / 2 - r.width / 2,\n y: e.bottom + X,\n arrow: {\n x: r.width / 2 - H,\n y: -6\n }\n },\n left: {\n x: e.left - r.width - X,\n y: e.top + e.height / 2 - r.height / 2,\n arrow: {\n x: r.width,\n y: r.height / 2 - H\n }\n },\n right: {\n x: e.right + X,\n y: e.top + e.height / 2 - r.height / 2,\n arrow: {\n x: -6,\n y: r.height / 2 - H\n }\n }\n };\n let d = n, h = u[n];\n if (i(h.x, h.y, r.width, r.height)) {\n const v = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n }, f = u[v[n]];\n if (!i(f.x, f.y, r.width, r.height))\n d = v[n], h = f;\n else {\n const b = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (m) => m !== n && m !== v[n]\n );\n for (const m of b) {\n const p = u[m];\n if (!i(p.x, p.y, r.width, r.height)) {\n d = m, h = p;\n break;\n }\n }\n }\n }\n h.x = Math.max(\n _,\n Math.min(h.x, s.width - r.width - _)\n ), h.y = Math.max(\n _,\n Math.min(h.y, s.height - r.height - _)\n );\n const l = {\n x: e.left + e.width / 2,\n y: e.top + e.height / 2\n };\n return d === \"top\" || d === \"bottom\" ? h.arrow.x = Math.max(\n H,\n Math.min(l.x - h.x - H, r.width - H * 2)\n ) : h.arrow.y = Math.max(\n H,\n Math.min(l.y - h.y - H, r.height - H * 2)\n ), {\n ...h,\n placement: d\n };\n },\n [n]\n ) };\n}\nfunction rt(n, o, t) {\n const a = S(null), e = S(null), r = I(() => {\n if (!a.current || !e.current) return;\n const s = n(a.current, e.current);\n t(s);\n }, [n, t]);\n return z(() => {\n if (!o) return;\n const s = () => r();\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, [o, r]), {\n triggerRef: a,\n tooltipRef: e,\n updatePosition: r\n };\n}\nfunction nt(n, o, t, a, e, r, s, i, u) {\n const d = S(null), h = I(() => {\n n || (d.current && clearTimeout(d.current), d.current = window.setTimeout(() => {\n t(!0), requestAnimationFrame(() => {\n e(), a(!0);\n });\n }, o));\n }, [n, o, t, e, a]), l = I(\n (v = !1) => {\n if (d.current && clearTimeout(d.current), v) {\n a(!1), setTimeout(() => t(!1), 150);\n return;\n }\n d.current = window.setTimeout(() => {\n a(!1), setTimeout(() => t(!1), 150);\n }, 100);\n },\n [a, t]\n );\n return z(() => {\n !r && !s && !i && u && l();\n }, [r, s, i, u, l]), z(() => () => {\n d.current && clearTimeout(d.current);\n }, []), {\n showTooltip: h,\n hideTooltip: l,\n timeoutRef: d\n };\n}\nfunction Rt({\n id: n,\n children: o,\n message: t,\n placement: a = \"top\",\n disabled: e = !1,\n delay: r = 200,\n className: s\n}) {\n const [i, u] = A(!1), [d, h] = A(!1), [l, v] = A(null), [f, b] = A(!1), [m, p] = A(!1), [y, g] = A(!1), { calculatePosition: w } = tt(a), { triggerRef: N, tooltipRef: E, updatePosition: D } = rt(w, d, v), { showTooltip: $, hideTooltip: k, timeoutRef: P } = nt(\n e,\n r,\n h,\n u,\n D,\n f,\n m,\n y,\n i\n ), j = V(), K = n ?? j;\n return /* @__PURE__ */ C(O, { children: [\n F.cloneElement(o, {\n ref: (G) => {\n N.current = G;\n },\n onMouseEnter: () => {\n b(!0), $();\n },\n onMouseLeave: () => {\n b(!1);\n },\n onFocus: () => {\n g(!0), $();\n },\n onBlur: () => {\n g(!1), k(!0);\n },\n onKeyDown: (G) => {\n G.key === \"Escape\" && k(!0);\n },\n \"aria-describedby\": e ? void 0 : K\n }),\n d && re(\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: E,\n id: K,\n role: \"tooltip\",\n className: x(\n \"fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover pointer-events-auto transition-all duration-150 ease-out\",\n i ? \"opacity-100\" : \"opacity-0\",\n s\n ),\n style: l ? { left: l.x, top: l.y } : { opacity: 0 },\n onMouseEnter: () => {\n p(!0), P.current && clearTimeout(P.current);\n },\n onMouseLeave: () => {\n p(!1);\n },\n children: t\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n dt as Accordion,\n Z as AccordionItem,\n St as ActionModal,\n ze as Button,\n Ae as ButtonLoadingDots,\n ft as Checkbox,\n mt as Clickable,\n bt as Input,\n ht as Label,\n pt as Modal,\n vt as Pagination,\n gt as Panel,\n yt as RadioGroup,\n Y as RadioGroupItem,\n Me as RadioInput,\n wt as ScrollArea,\n xt as Separator,\n Nt as Skeleton,\n Et as Slider,\n Ct as Slot,\n At as Tabs,\n Tt as TabsContent,\n It as TabsList,\n $t as TabsTrigger,\n zt as Textarea,\n Vt as Toast,\n kt as Toggle,\n Rt as Tooltip\n};\n//# sourceMappingURL=components.esm.js.map\n","import { Modal, ModalProps } from '@moondreamsdev/dreamer-ui/components';\nimport React, { useMemo } from 'react';\n\ninterface BaseActionModalProps extends Omit<ModalProps, 'children' | 'actions'> {\n message: React.ReactNode;\n destructive?: boolean;\n}\n\ninterface AlertModalProps extends BaseActionModalProps {\n type: 'alert';\n confirmText?: string;\n onConfirm?: () => void;\n // Cancel-related props are not allowed for alerts\n cancelText?: never;\n}\n\ninterface ConfirmModalProps extends BaseActionModalProps {\n type: 'confirm';\n confirmText?: string;\n cancelText?: string;\n onConfirm?: () => void;\n}\n\nexport type ActionModalProps = AlertModalProps | ConfirmModalProps;\n\nexport function ActionModal({\n type,\n message,\n cancelText,\n confirmText,\n onConfirm,\n onClose,\n destructive = false,\n title,\n ...modalProps\n}: ActionModalProps) {\n const defaultTexts = useMemo(() => {\n if (type === 'confirm') {\n return {\n confirm: confirmText || 'Confirm',\n cancel: cancelText || 'Cancel',\n defaultTitle: title || 'Confirm Action',\n };\n }\n return {\n confirm: confirmText || 'OK',\n cancel: null,\n defaultTitle: title || 'Alert',\n };\n }, [type, confirmText, title, cancelText]);\n\n const actions: ModalProps['actions'] = useMemo(\n () => [\n ...(defaultTexts.cancel\n ? [\n {\n label: defaultTexts.cancel,\n variant: 'secondary' as const,\n onClick: onClose,\n },\n ]\n : []),\n {\n label: defaultTexts.confirm,\n variant: destructive ? 'destructive' : 'primary',\n onClick: () => {\n onConfirm?.();\n onClose();\n },\n },\n ],\n [defaultTexts, destructive, onConfirm, onClose]\n );\n\n return (\n <Modal\n {...modalProps}\n title={title || defaultTexts.defaultTitle}\n onClose={onClose}\n actions={actions}\n disableCloseOnOverlayClick={type === 'confirm'}\n hideCloseButton={type === 'confirm'}\n >\n {typeof message === 'string' ? <p className='text-sm'>{message}</p> : message}\n </Modal>\n );\n}\n","import { createContext, useContext } from 'react';\nimport { TabsVariant, TabsWidth } from './variants';\n\nexport interface TabsContextValue {\n selectedValue: string;\n onValueChange: (value: string) => void;\n tabsWidth: TabsWidth;\n variant: TabsVariant;\n triggersClassName?: string;\n contentClassName?: string;\n}\n\nexport const TabsContext = createContext<TabsContextValue | null>(null);\n\nexport const useTabsContext = () => {\n const context = useContext(TabsContext);\n if (!context) {\n throw new Error('Tabs components must be used within a Tabs component');\n }\n return context;\n};\n","import { ReactNode, useCallback, useEffect, useState } from 'react';\nimport { CrossCircled, ExclamationTriangle, InfoCircled, X } from '../../symbols';\nimport { join } from '../../utils';\nexport type ToastType = 'info' | 'warning' | 'error';\n\nexport interface ToastAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface ToastData {\n id: string;\n title: string;\n description?: string;\n type?: ToastType;\n action?: ToastAction;\n duration?: number;\n onRemove?: (id: string) => void;\n}\n\ninterface ToastProps extends ToastData {\n customTypes?: Record<string, { className: string; icon?: ReactNode }>;\n customComponent?: React.ComponentType<ToastData>;\n}\n\nconst defaultTypeStyles: Record<ToastType, { className: string; icon: ReactNode }> = {\n info: {\n className: 'bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100',\n icon: <InfoCircled size={20} />,\n },\n warning: {\n className:\n 'bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100',\n icon: <ExclamationTriangle size={20} />,\n },\n error: {\n className: 'bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100',\n icon: <CrossCircled size={20} />,\n },\n};\n\nexport function Toast({\n id,\n title,\n description,\n type = 'info',\n action,\n duration = 5000,\n onRemove,\n customTypes,\n customComponent: CustomComponent,\n}: ToastProps) {\n const [isExiting, setIsExiting] = useState(false);\n\n const handleRemove = useCallback(() => {\n setIsExiting(true);\n setTimeout(() => {\n onRemove?.(id);\n }, 150); // Match animation duration\n }, [id, onRemove]);\n\n useEffect(() => {\n if (duration > 0) {\n const timer = setTimeout(() => {\n handleRemove();\n }, duration);\n\n return () => clearTimeout(timer);\n }\n }, [duration, id, onRemove, handleRemove]);\n\n if (CustomComponent) {\n return (\n <CustomComponent\n id={id}\n title={title}\n description={description}\n type={type}\n action={action}\n duration={duration}\n onRemove={onRemove}\n />\n );\n }\n\n // Check custom types first, then fall back to default\n const typeStyle = customTypes?.[type] || defaultTypeStyles[type as ToastType] || defaultTypeStyles.info;\n\n return (\n <div\n role={type === 'error' ? 'alert' : 'status'}\n aria-live={type === 'error' ? undefined : 'polite'}\n className={join(\n 'relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out',\n action && 'pb-3',\n typeStyle.className,\n isExiting ? 'opacity-0 translate-x-full' : 'opacity-100 translate-x-0'\n )}\n >\n {/* Icon */}\n <div className='flex-shrink-0 mr-3'>{typeStyle.icon}</div>\n\n {/* Content */}\n <div className='flex-grow min-w-0'>\n <div className='font-medium text-sm leading-5'>{title}</div>\n {description && <div className='mt-1 text-sm opacity-90 leading-5'>{description}</div>}\n {action && (\n <div className='mt-1.5'>\n <button\n onClick={action.onClick}\n className='text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer'\n >\n {action.label}\n </button>\n </div>\n )}\n </div>\n\n {/* Close button */}\n <button\n onClick={handleRemove}\n className='flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0'\n >\n <X size={16} />\n </button>\n </div>\n );\n}\n"],"names":["n","t","s","h","C","l","i","e","k","b","Ae","o","A","z","a","c","x","Te","Ie","$e","J","ze","r","u","d","Le","Se","Ve","S","I","pt","v","f","V","m","p","g","F","w","N","E","D","$","O","re","T","ce","ActionModal","type","message","cancelText","confirmText","onConfirm","onClose","destructive","title","modalProps","defaultTexts","useMemo","actions","jsx","Modal","TabsContext","createContext","useTabsContext","context","useContext","defaultTypeStyles","InfoCircled","ExclamationTriangle","CrossCircled","Toast","id","description","action","duration","onRemove","customTypes","CustomComponent","isExiting","setIsExiting","useState","handleRemove","useCallback","useEffect","timer","typeStyle","jsxs","join","X"],"mappings":"sJAAA,SAASA,KAAKC,EAAG,CACf,OAAOA,EAAE,OAAQC,GAAM,OAAOA,GAAK,UAAYA,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,GAAI,MACxE,CCgFA,SAASC,EAAE,CAAE,KAAMC,EAAI,GAAI,MAAOC,EAAI,eAAgB,UAAWL,EAAI,SAAU,GAAGM,CAAC,EAAI,CACrF,OAAuBC,EAAC,IACtB,MACA,CACE,GAAGD,EACH,MAAOF,EACP,OAAQA,EACR,UAAWJ,EACX,QAAS,YACT,MAAO,6BACP,SAA0BO,EAAC,IACzB,OACA,CACE,EAAG,0gBACH,KAAMF,EACN,SAAU,UACV,SAAU,SACpB,CACA,CACA,CACG,CACH,CClGA,SAASG,KAAK,EAAG,CACf,OAAO,EAAE,OAAQ,GAAM,OAAO,GAAK,UAAY,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,GAAI,MACxE,CA0BAC,EAAC,cAAC,MAAM,EACRA,EAAC,cAAC,IAAI,EACNA,EAAC,cAAC,IAAI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WA,IAAS,QAAU,OAAY,SAC1C,UAAWwC,EAAA,KACT,oGACAd,GAAU,OACVY,EAAU,UACVP,EAAY,6BAA+B,2BAC7C,EAGA,SAAA,CAAAnB,EAAA,IAAC,MAAI,CAAA,UAAU,qBAAsB,SAAA0B,EAAU,KAAK,EAGpDC,EAAAA,KAAC,MAAI,CAAA,UAAU,oBACb,SAAA,CAAC3B,EAAA,IAAA,MAAA,CAAI,UAAU,gCAAiC,SAAML,EAAA,EACrDkB,GAAeb,EAAA,IAAC,MAAI,CAAA,UAAU,oCAAqC,SAAYa,EAAA,EAC/EC,GACCd,EAAA,IAAC,MAAI,CAAA,UAAU,SACb,SAAAA,EAAA,IAAC,SAAA,CACC,QAASc,EAAO,QAChB,UAAU,+IAET,SAAOA,EAAA,KAAA,CAAA,CAEZ,CAAA,CAAA,EAEJ,EAGAd,EAAA,IAAC,SAAA,CACC,QAASsB,EACT,UAAU,0IAEV,SAAAtB,EAAAA,IAAC6B,EAAAA,EAAE,CAAA,KAAM,EAAI,CAAA,CAAA,CAAA,CACf,CAAA,CACF,CAEJ"}
@@ -1,7 +1,7 @@
1
- import { jsx as r, Fragment as $, jsxs as f } from "react/jsx-runtime";
2
- import q, { createContext as v, useId as V, useState as p, useEffect as b, useRef as H, useCallback as z, useMemo as E, useContext as P } from "react";
3
- import { createPortal as D } from "react-dom";
4
- import { X as F, C as J, E as K, I as X } from "./X-CIoyLewf.js";
1
+ import { jsx as r, Fragment as $, jsxs as b } from "react/jsx-runtime";
2
+ import q, { createContext as m, useId as D, useState as y, useEffect as g, useRef as F, useCallback as T, useMemo as E, useContext as H } from "react";
3
+ import { createPortal as P } from "react-dom";
4
+ import { X as V, C as J, E as K, I as X } from "./X-CIoyLewf.js";
5
5
  import { join as Z } from "./utils.esm.js";
6
6
  function k(...e) {
7
7
  return e.filter((l) => typeof l == "string" && l).join(" ").trim() || void 0;
@@ -31,12 +31,14 @@ function G({ size: e = 15, color: l = "currentColor", className: n = "inline", .
31
31
  function x(...e) {
32
32
  return e.filter((l) => typeof l == "string" && l).join(" ").trim() || void 0;
33
33
  }
34
- v(void 0);
35
- v(null);
36
- v(null);
34
+ m(void 0);
35
+ m(null);
36
+ m(null);
37
+ m(null);
38
+ m(null);
37
39
  function Q() {
38
- const [e, l] = p(0);
39
- return b(() => {
40
+ const [e, l] = y(0);
41
+ return g(() => {
40
42
  const n = setInterval(() => {
41
43
  l((t) => (t + 1) % 3);
42
44
  }, 500);
@@ -52,7 +54,7 @@ function Q() {
52
54
  n
53
55
  )) });
54
56
  }
55
- const R = {
57
+ const U = {
56
58
  base: "",
57
59
  primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
58
60
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
@@ -60,7 +62,7 @@ const R = {
60
62
  outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
61
63
  link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
62
64
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
63
- }, U = {
65
+ }, W = {
64
66
  stripped: "",
65
67
  fitted: "size-fit",
66
68
  sm: "px-2 py-1 text-sm",
@@ -68,7 +70,7 @@ const R = {
68
70
  lg: "px-6 py-3 text-lg",
69
71
  icon: "p-1 w-fit aspect-square",
70
72
  full: "p-2 w-full"
71
- }, W = {
73
+ }, Y = {
72
74
  none: "rounded-none",
73
75
  sm: "rounded-sm",
74
76
  md: "rounded-md",
@@ -79,7 +81,7 @@ const R = {
79
81
  size: "md",
80
82
  rounded: "md"
81
83
  };
82
- function Y({
84
+ function _({
83
85
  variant: e = w.variant,
84
86
  size: l,
85
87
  rounded: n = w.rounded,
@@ -94,14 +96,14 @@ function Y({
94
96
  e === "link" && !l ? c = "fitted" : c = l || w.size;
95
97
  const u = k(
96
98
  "appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
97
- R[e],
98
- U[c],
99
- W[n],
99
+ U[e],
100
+ W[c],
101
+ Y[n],
100
102
  t && "relative pointer-events-none",
101
103
  i && "relative",
102
104
  d
103
105
  );
104
- return /* @__PURE__ */ f(
106
+ return /* @__PURE__ */ b(
105
107
  "button",
106
108
  {
107
109
  ...s,
@@ -129,14 +131,14 @@ function Y({
129
131
  }
130
132
  );
131
133
  }
132
- function _(e) {
133
- const [l, n] = p(!1), [t, i] = p(!1);
134
- return b(() => {
134
+ function R(e) {
135
+ const [l, n] = y(!1), [t, i] = y(!1);
136
+ return g(() => {
135
137
  e ? (i(!0), setTimeout(() => n(!0), 10)) : (n(!1), setTimeout(() => i(!1), 150));
136
138
  }, [e]), { show: l, shouldRender: t };
137
139
  }
138
140
  function ee(e, l) {
139
- b(() => {
141
+ g(() => {
140
142
  const n = (t) => {
141
143
  t.key === "Escape" && e && l();
142
144
  };
@@ -146,7 +148,7 @@ function ee(e, l) {
146
148
  }, [e, l]);
147
149
  }
148
150
  function te(e, l) {
149
- const n = H(null), t = z(() => {
151
+ const n = F(null), t = T(() => {
150
152
  const i = document.getElementById(e);
151
153
  if (!i) return;
152
154
  const a = i.querySelectorAll('[data-modal-action="true"]');
@@ -168,7 +170,7 @@ function te(e, l) {
168
170
  }
169
171
  i.focus();
170
172
  }, [e]);
171
- b(() => (l && (n.current = document.activeElement, t()), () => {
173
+ g(() => (l && (n.current = document.activeElement, t()), () => {
172
174
  document.body.style.overflow = "auto", n.current instanceof HTMLElement && n.current.focus();
173
175
  }), [l, t]);
174
176
  }
@@ -184,25 +186,25 @@ function re({
184
186
  hideCloseButton: s = !1,
185
187
  actions: c = [],
186
188
  disableCloseOnOverlayClick: u = !1,
187
- ariaLabelledBy: m,
188
- ariaDescribedBy: g
189
+ ariaLabelledBy: f,
190
+ ariaDescribedBy: p
189
191
  }) {
190
- const h = V(), N = e || `modal-${h}`, C = e ? `${e}-title` : `modal-title-${h}`, { show: L, shouldRender: y } = _(l);
191
- if (te(N, y), ee(y, n), !y) return null;
192
- const j = () => t ? q.isValidElement(t) ? /* @__PURE__ */ r("div", { className: "mb-4", children: t }) : /* @__PURE__ */ r("h2", { className: "mb-4 text-xl font-semibold", id: C, children: t }) : null, A = () => c.length === 0 ? null : /* @__PURE__ */ r("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: c.map((I, B) => {
193
- const { label: O, className: M, ...S } = I;
194
- return /* @__PURE__ */ r(Y, { className: M, type: "button", ...S, "data-modal-action": "true", children: O }, B);
192
+ const h = D(), N = e || `modal-${h}`, C = e ? `${e}-title` : `modal-title-${h}`, { show: z, shouldRender: v } = R(l);
193
+ if (te(N, v), ee(v, n), !v) return null;
194
+ const A = () => t ? q.isValidElement(t) ? /* @__PURE__ */ r("div", { className: "mb-4", children: t }) : /* @__PURE__ */ r("h2", { className: "mb-4 text-xl font-semibold", id: C, children: t }) : null, I = () => c.length === 0 ? null : /* @__PURE__ */ r("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: c.map((j, B) => {
195
+ const { label: O, className: S, ...M } = j;
196
+ return /* @__PURE__ */ r(_, { className: S, type: "button", ...M, "data-modal-action": "true", children: O }, B);
195
197
  }) });
196
- return /* @__PURE__ */ r($, { children: D(
198
+ return /* @__PURE__ */ r($, { children: P(
197
199
  /* @__PURE__ */ r(
198
200
  "div",
199
201
  {
200
- "aria-labelledby": m ?? t ? C : void 0,
201
- "aria-describedby": g,
202
+ "aria-labelledby": f ?? t ? C : void 0,
203
+ "aria-describedby": p,
202
204
  role: "dialog",
203
205
  "aria-modal": "true",
204
206
  className: "fixed inset-0 z-[100] overflow-y-auto",
205
- children: /* @__PURE__ */ f("div", { className: "flex min-h-screen items-center justify-center p-4", children: [
207
+ children: /* @__PURE__ */ b("div", { className: "flex min-h-screen items-center justify-center p-4", children: [
206
208
  /* @__PURE__ */ r(
207
209
  "div",
208
210
  {
@@ -213,14 +215,14 @@ function re({
213
215
  }
214
216
  ),
215
217
  a && /* @__PURE__ */ r("div", { className: x("relative w-fit", o), children: i }),
216
- !a && /* @__PURE__ */ f(
218
+ !a && /* @__PURE__ */ b(
217
219
  "div",
218
220
  {
219
221
  id: N,
220
222
  tabIndex: -1,
221
223
  className: x(
222
224
  "relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",
223
- L ? "opacity-100 scale-100" : "opacity-0 scale-90",
225
+ z ? "opacity-100 scale-100" : "opacity-0 scale-90",
224
226
  o
225
227
  ),
226
228
  children: [
@@ -234,9 +236,9 @@ function re({
234
236
  children: /* @__PURE__ */ r(G, { size: 18 })
235
237
  }
236
238
  ),
237
- j(),
239
+ A(),
238
240
  i,
239
- A()
241
+ I()
240
242
  ]
241
243
  }
242
244
  )
@@ -297,12 +299,12 @@ function de({
297
299
  }
298
300
  );
299
301
  }
300
- const le = v(null), ce = () => {
301
- const e = P(le);
302
+ const le = m(null), ce = () => {
303
+ const e = H(le);
302
304
  if (!e)
303
305
  throw new Error("Tabs components must be used within a Tabs component");
304
306
  return e;
305
- }, T = {
307
+ }, L = {
306
308
  info: {
307
309
  className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
308
310
  icon: /* @__PURE__ */ r(X, { size: 20 })
@@ -327,19 +329,19 @@ function ue({
327
329
  customTypes: d,
328
330
  customComponent: s
329
331
  }) {
330
- const [c, u] = p(!1), m = z(() => {
332
+ const [c, u] = y(!1), f = T(() => {
331
333
  u(!0), setTimeout(() => {
332
334
  o == null || o(e);
333
335
  }, 150);
334
336
  }, [e, o]);
335
- if (b(() => {
337
+ if (g(() => {
336
338
  if (a > 0) {
337
339
  const h = setTimeout(() => {
338
- m();
340
+ f();
339
341
  }, a);
340
342
  return () => clearTimeout(h);
341
343
  }
342
- }, [a, e, o, m]), s)
344
+ }, [a, e, o, f]), s)
343
345
  return /* @__PURE__ */ r(
344
346
  s,
345
347
  {
@@ -352,8 +354,8 @@ function ue({
352
354
  onRemove: o
353
355
  }
354
356
  );
355
- const g = (d == null ? void 0 : d[t]) || T[t] || T.info;
356
- return /* @__PURE__ */ f(
357
+ const p = (d == null ? void 0 : d[t]) || L[t] || L.info;
358
+ return /* @__PURE__ */ b(
357
359
  "div",
358
360
  {
359
361
  role: t === "error" ? "alert" : "status",
@@ -361,12 +363,12 @@ function ue({
361
363
  className: Z(
362
364
  "relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",
363
365
  i && "pb-3",
364
- g.className,
366
+ p.className,
365
367
  c ? "opacity-0 translate-x-full" : "opacity-100 translate-x-0"
366
368
  ),
367
369
  children: [
368
- /* @__PURE__ */ r("div", { className: "flex-shrink-0 mr-3", children: g.icon }),
369
- /* @__PURE__ */ f("div", { className: "flex-grow min-w-0", children: [
370
+ /* @__PURE__ */ r("div", { className: "flex-shrink-0 mr-3", children: p.icon }),
371
+ /* @__PURE__ */ b("div", { className: "flex-grow min-w-0", children: [
370
372
  /* @__PURE__ */ r("div", { className: "font-medium text-sm leading-5", children: l }),
371
373
  n && /* @__PURE__ */ r("div", { className: "mt-1 text-sm opacity-90 leading-5", children: n }),
372
374
  i && /* @__PURE__ */ r("div", { className: "mt-1.5", children: /* @__PURE__ */ r(
@@ -381,9 +383,9 @@ function ue({
381
383
  /* @__PURE__ */ r(
382
384
  "button",
383
385
  {
384
- onClick: m,
386
+ onClick: f,
385
387
  className: "flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0",
386
- children: /* @__PURE__ */ r(F, { size: 16 })
388
+ children: /* @__PURE__ */ r(V, { size: 16 })
387
389
  }
388
390
  )
389
391
  ]
@@ -397,4 +399,4 @@ export {
397
399
  k as n,
398
400
  ce as u
399
401
  };
400
- //# sourceMappingURL=Toast-cdFf2Gbf.js.map
402
+ //# sourceMappingURL=Toast-Dux71f5k.js.map