@moondreamsdev/dreamer-ui 1.7.7-test.10 → 1.7.7-test.11

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.
@@ -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"),S=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);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 X(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 J(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 K({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(J(j,y),X(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,L=()=>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((T,z)=>{const{label:A,className:q,...B}=T;return t.jsx(H,{className:q,type:"button",...B,"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,L()]})]})}),document.body)})}function R({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(K,{...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 k=a.createContext(null),V=()=>{const e=a.useContext(k);if(!e)throw new Error("Tabs components must be used within a Tabs component");return e},N={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 Z({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])||N[r]||N.info;return t.jsxs("div",{role:r==="error"?"alert":"status","aria-live":r==="error"?void 0:"polite",className:S.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=R;exports.TabsContext=k;exports.Toast=Z;exports.n=h;exports.useTabsContext=V;
2
+ //# sourceMappingURL=Toast-3QWxd83A.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast-3QWxd83A.cjs","sources":["utils.esm.js","X-CIoyLewf.js","Toast-DrQd4i4R.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 M, jsxs as f } from \"react/jsx-runtime\";\nimport q, { createContext as F, useId as H, useState as p, useEffect as b, useRef as P, useCallback as z, useMemo as C } from \"react\";\nimport { createPortal as V } from \"react-dom\";\nimport { X as D, C as J, E as K, I as X } from \"./X-CIoyLewf.js\";\nimport { join as Z } from \"./utils.esm.js\";\nfunction w(...e) {\n return e.filter((l) => typeof l == \"string\" && l).join(\" \").trim() || void 0;\n}\nfunction $({ size: e = 15, color: l = \"currentColor\", className: n = \"inline\", ...t }) {\n return /* @__PURE__ */ r(\n \"svg\",\n {\n ...t,\n width: e,\n height: e,\n className: n,\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: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction y(...e) {\n return e.filter((l) => typeof l == \"string\" && l).join(\" \").trim() || void 0;\n}\nF(void 0);\nfunction G() {\n const [e, l] = p(0);\n return b(() => {\n const n = setInterval(() => {\n l((t) => (t + 1) % 3);\n }, 500);\n return () => clearInterval(n);\n }, []), /* @__PURE__ */ r(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((n) => /* @__PURE__ */ r(\n \"div\",\n {\n className: w(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n e === n && \"transform -translate-y-1\"\n )\n },\n n\n )) });\n}\nconst Q = {\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}, x = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction Y({\n variant: e = x.variant,\n size: l,\n rounded: n = x.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\" && !l ? c = \"fitted\" : c = l || x.size;\n const u = w(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n Q[e],\n U[c],\n W[n],\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(G, {}),\n /* @__PURE__ */ r(\"span\", { className: w(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 [l, n] = p(!1), [t, i] = p(!1);\n return b(() => {\n e ? (i(!0), setTimeout(() => n(!0), 10)) : (n(!1), setTimeout(() => i(!1), 150));\n }, [e]), { show: l, shouldRender: t };\n}\nfunction R(e, l) {\n b(() => {\n const n = (t) => {\n t.key === \"Escape\" && e && l();\n };\n return document.addEventListener(\"keydown\", n), e && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", n), document.body.style.overflow = \"auto\";\n };\n }, [e, l]);\n}\nfunction ee(e, l) {\n const n = P(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 b(() => (l && (n.current = document.activeElement, t()), () => {\n document.body.style.overflow = \"auto\", n.current instanceof HTMLElement && n.current.focus();\n }), [l, t]);\n}\nfunction te({\n id: e,\n isOpen: l,\n onClose: n,\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: g\n}) {\n const h = H(), N = e || `modal-${h}`, k = e ? `${e}-title` : `modal-title-${h}`, { show: L, shouldRender: v } = _(l);\n if (ee(N, v), R(v, n), !v) return null;\n const T = () => t ? q.isValidElement(t) ? /* @__PURE__ */ r(\"div\", { className: \"mb-4\", children: t }) : /* @__PURE__ */ r(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: k, 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, A) => {\n const { label: B, className: O, ...S } = j;\n return /* @__PURE__ */ r(Y, { className: O, type: \"button\", ...S, \"data-modal-action\": \"true\", children: B }, A);\n }) });\n return /* @__PURE__ */ r(M, { children: V(\n /* @__PURE__ */ r(\n \"div\",\n {\n \"aria-labelledby\": m ?? t ? k : void 0,\n \"aria-describedby\": g,\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: y(\"fixed inset-0 bg-black/20 transition-all\", d),\n onClick: () => {\n u || n();\n }\n }\n ),\n a && /* @__PURE__ */ r(\"div\", { className: y(\"relative w-fit\", o), children: i }),\n !a && /* @__PURE__ */ f(\n \"div\",\n {\n id: N,\n tabIndex: -1,\n className: y(\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: n,\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($, { size: 18 })\n }\n ),\n T(),\n i,\n I()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction oe({\n type: e,\n message: l,\n cancelText: n,\n confirmText: t,\n onConfirm: i,\n onClose: a,\n destructive: o = !1,\n title: d,\n ...s\n}) {\n const c = C(() => e === \"confirm\" ? {\n confirm: t || \"Confirm\",\n cancel: n || \"Cancel\",\n defaultTitle: d || \"Confirm Action\"\n } : {\n confirm: t || \"OK\",\n cancel: null,\n defaultTitle: d || \"Alert\"\n }, [e, t, d, n]), u = C(\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 te,\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 l == \"string\" ? /* @__PURE__ */ r(\"p\", { className: \"text-sm\", children: l }) : l\n }\n );\n}\nconst E = {\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 se({\n id: e,\n title: l,\n description: n,\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] = p(!1), m = z(() => {\n u(!0), setTimeout(() => {\n o == null || o(e);\n }, 150);\n }, [e, o]);\n if (b(() => {\n if (a > 0) {\n const h = setTimeout(() => {\n m();\n }, a);\n return () => clearTimeout(h);\n }\n }, [a, e, o, m]), s)\n return /* @__PURE__ */ r(\n s,\n {\n id: e,\n title: l,\n description: n,\n type: t,\n action: i,\n duration: a,\n onRemove: o\n }\n );\n const g = (d == null ? void 0 : d[t]) || E[t] || E.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 g.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: g.icon }),\n /* @__PURE__ */ f(\"div\", { className: \"flex-grow min-w-0\", children: [\n /* @__PURE__ */ r(\"div\", { className: \"font-medium text-sm leading-5\", children: l }),\n n && /* @__PURE__ */ r(\"div\", { className: \"mt-1 text-sm opacity-90 leading-5\", children: n }),\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(D, { size: 16 })\n }\n )\n ]\n }\n );\n}\nexport {\n oe as A,\n se as T,\n w as n\n};\n//# sourceMappingURL=Toast-DrQd4i4R.js.map\n","import { jsxs as A, jsx as c, Fragment as O } from \"react/jsx-runtime\";\nimport F, { useId as z, useState as C, createElement as se, useEffect as T, useCallback as I, useMemo as ee, useRef as j, isValidElement as ce, cloneElement as de } from \"react\";\nimport { join as w } from \"./utils.esm.js\";\nimport { d as ue, C as fe, a as me, g as be, E as he, Q as pe, b as ge, e as ve, f as ye, c as we } from \"./QuestionMarkCircled-CY81euqP.js\";\nimport { n as R } from \"./Toast-DrQd4i4R.js\";\nimport { A as Nt, T as At } from \"./Toast-DrQd4i4R.js\";\nimport { E as xe, X as ie } from \"./X-CIoyLewf.js\";\nimport { createPortal as te } from \"react-dom\";\nfunction Z({\n id: n,\n title: a,\n content: t,\n children: o,\n className: e = \"\",\n disabled: r = !1,\n isOpen: s = !1,\n onToggle: i,\n triggerClassName: u = \"\",\n bodyClassName: d = \"\"\n}) {\n const b = z(), l = n || `accordion-item-${b}`, v = `${l}-header`, f = `${l}-panel`, m = () => {\n !r && i && i();\n }, g = (h) => {\n (h.key === \"Enter\" || h.key === \" \") && (h.preventDefault(), m());\n };\n return /* @__PURE__ */ A(\"div\", { className: w(\"border-b border-gray-200\", r && \"opacity-60 cursor-not-allowed\", e), children: [\n /* @__PURE__ */ A(\n \"button\",\n {\n id: v,\n type: \"button\",\n className: w(\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: m,\n onKeyDown: g,\n children: [\n /* @__PURE__ */ c(\"span\", { children: a }),\n /* @__PURE__ */ c(\n \"span\",\n {\n className: w(\n \"transform transition-transform duration-300 ease-linear\",\n s ? \"rotate-180\" : \"rotate-0\"\n ),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ c(ue, { 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: w(\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 && (o || t)\n }\n )\n ] });\n}\nfunction at({\n id: n,\n items: a = [],\n children: t,\n className: o = \"\",\n itemClassName: e = \"\",\n allowMultiple: r = !1,\n defaultOpenItems: s = [],\n triggersClassName: i = \"\",\n bodiesClassName: u = \"\"\n}) {\n const d = z(), b = n || `accordion-group-${d}`, [l, v] = C(new Set(s)), f = (h) => {\n v((y) => {\n const p = new Set(y);\n return p.has(h) ? p.delete(h) : (r || p.clear(), p.add(h)), p;\n });\n }, m = (h) => `${d}-item-${h}`, g = (h) => l.has(h);\n return /* @__PURE__ */ A(\"div\", { id: b, className: o, children: [\n a.length > 0 && a.map((h, y) => {\n const p = h.id || m(y);\n return /* @__PURE__ */ c(\n Z,\n {\n id: p,\n title: h.title,\n content: h.content,\n disabled: h.disabled,\n isOpen: g(p),\n onToggle: () => f(p),\n className: e,\n triggerClassName: i,\n bodyClassName: u\n },\n p\n );\n }),\n a.length === 0 && t && F.Children.map(t, (h, y) => {\n if (F.isValidElement(h) && h.type === Z) {\n const p = h.props.id || m(y);\n return /* @__PURE__ */ se(\n Z,\n {\n ...h.props,\n key: p,\n id: p,\n className: w(e, h.props.className),\n isOpen: g(p),\n onToggle: () => f(p),\n triggerClassName: w(i, h.props.triggerClassName),\n bodyClassName: w(u, h.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction Ee() {\n const [n, a] = C(0);\n return T(() => {\n const t = setInterval(() => {\n a((o) => (o + 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: w(\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 Ne = {\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}, Ae = {\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}, Ce = {\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 Ie({\n variant: n = J.variant,\n size: a,\n rounded: t = J.rounded,\n loading: o,\n linkTo: e,\n linkProps: r,\n type: s = \"button\",\n className: i,\n ...u\n}) {\n let d;\n n === \"link\" && !a ? d = \"fitted\" : d = a || J.size;\n const l = w(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n Ne[n],\n Ae[d],\n Ce[t],\n o && \"relative pointer-events-none\",\n e && \"relative\",\n i\n );\n return /* @__PURE__ */ A(\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 || o,\n \"aria-busy\": o,\n type: s,\n className: l,\n children: [\n o && /* @__PURE__ */ c(Ee, {}),\n /* @__PURE__ */ c(\"span\", { className: w(o && \"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 [a, t] = C(\"\"), o = 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 T(() => {\n const e = document.getElementById(n);\n if (e) {\n const r = o(e.parentElement);\n t(r);\n }\n }, [n, o]), a;\n}\nfunction st({\n ref: n,\n id: a,\n size: t = 20,\n color: o,\n filled: e = !1,\n rounded: r = !0,\n checked: s = !1,\n onCheckedChange: i,\n disabled: u,\n className: d = \"\",\n ...b\n}) {\n const l = z(), v = ee(() => a || `checkbox-${l}`, [a, l]), f = ke(v), [m, g] = C(s);\n T(() => {\n g(s);\n }, [s]);\n const h = () => {\n u || (g(!m), i == null || i(!m));\n }, y = (x) => {\n x.key === \" \" && (x.preventDefault(), h());\n }, p = w(\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: h,\n \"aria-checked\": m,\n \"aria-disabled\": u,\n onKeyDownCapture: y,\n style: {\n width: t,\n height: t,\n color: o,\n backgroundColor: m && e ? \"currentcolor\" : \"transparent\"\n },\n className: p,\n ...b,\n children: m && /* @__PURE__ */ c(fe, { size: t, color: e ? f : void 0 })\n }\n );\n}\nfunction it({\n children: n,\n className: a,\n linkTo: t,\n linkProps: o,\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__ */ A(\"div\", { className: w(\"relative w-fit\", a), ...s, children: [\n n,\n t && /* @__PURE__ */ c(\n \"a\",\n {\n ...o,\n rel: (o == null ? void 0 : o.rel) || \"noreferrer\",\n href: t,\n className: w(\"absolute inset-0\", o == null ? void 0 : o.className)\n }\n ),\n !t && e && /* @__PURE__ */ c(\n \"button\",\n {\n ...r,\n type: \"button\",\n onClick: e,\n className: w(\"absolute inset-0 cursor-pointer\", r == null ? void 0 : r.className)\n }\n )\n ] });\n}\nfunction Q({ elementId: n, type: a, message: t }) {\n return T(() => {\n const o = document.getElementById(n);\n if (o) {\n if (!t && a === \"error\") {\n o.removeAttribute(\"data-error\");\n return;\n }\n if (!t && a === \"success\") {\n o.removeAttribute(\"data-success\");\n return;\n }\n return o.setAttribute(\"aria-describedby\", `${n}-${a}-message`), o.setAttribute(\"aria-invalid\", a === \"error\" ? \"true\" : \"false\"), a === \"error\" && o.setAttribute(\"data-error\", \"true\"), a === \"success\" && o.setAttribute(\"data-success\", \"true\"), () => {\n o.removeAttribute(\"aria-describedby\"), o.removeAttribute(\"aria-invalid\"), o.removeAttribute(\"data-error\"), o.removeAttribute(\"data-success\");\n };\n }\n }, [n, a, t]), t ? /* @__PURE__ */ A(\n \"small\",\n {\n className: w(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start\",\n a === \"error\" && \"text-destructive\",\n a === \"success\" && \"text-success\"\n ),\n role: \"status\",\n children: [\n a === \"error\" ? /* @__PURE__ */ c(xe, {}) : /* @__PURE__ */ c(me, {}),\n /* @__PURE__ */ c(\"span\", { id: `${n}-${a}-message`, children: t })\n ]\n }\n ) : null;\n}\nconst De = {\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}, Te = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, re = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction lt({\n variant: n = re.variant,\n rounded: a,\n displayOnlyMode: t = !1,\n errorMessage: o,\n successMessage: e,\n type: r = \"text\",\n className: s,\n ...i\n}) {\n const u = z(), [d, b] = C(!1);\n let l = a;\n n === \"outline\" && !a && (l = \"md\"), l = l || re.rounded;\n const m = w(\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 && De[n],\n !t && Te[l],\n r === \"password\" && \"pr-10\",\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ A(\"div\", { className: w(t && \"cursor-text\"), style: { height: i.height, width: i.width }, children: [\n /* @__PURE__ */ A(\"div\", { className: w(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\": o ? !0 : void 0,\n \"data-success\": e ? !0 : void 0,\n className: m\n }\n ),\n r === \"password\" && /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => b(!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(be, { size: 20 }) : /* @__PURE__ */ c(he, { size: 20 })\n }\n )\n ] }),\n !t && /* @__PURE__ */ c(Q, { elementId: u, type: \"error\", message: o }),\n !t && /* @__PURE__ */ c(Q, { elementId: u, type: \"success\", message: e })\n ] });\n}\nfunction ct({\n display: n = \"inline\",\n width: a = \"fit-content\",\n className: t = \"\",\n required: o,\n helpMessage: e,\n suffix: r,\n htmlFor: s,\n children: i,\n ...u\n}) {\n const d = z(), b = w(\"font-medium\", n, t), l = e ? `${s ?? d}-help` : void 0;\n return /* @__PURE__ */ A(\"div\", { style: { display: n === \"inline\" ? \"inline-flex\" : \"flex\", width: a }, className: \"relative\", children: [\n /* @__PURE__ */ A(\"label\", { className: b, htmlFor: s, ...u, children: [\n i,\n o && /* @__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(pe, {})\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 $e(n) {\n const [a, t] = C(!1), [o, e] = C(!1);\n return T(() => {\n n ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [n]), { show: a, shouldRender: o };\n}\nfunction Re(n, a) {\n T(() => {\n const t = (o) => {\n o.key === \"Escape\" && n && a();\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, a]);\n}\nfunction Le(n, a) {\n const t = j(null), o = 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 T(() => (a && (t.current = document.activeElement, o()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [a, o]);\n}\nfunction dt({\n id: n,\n isOpen: a,\n onClose: t,\n title: o,\n children: e,\n contentOnly: r = !1,\n className: s,\n overlayClassName: i,\n hideCloseButton: u = !1,\n actions: d = [],\n disableCloseOnOverlayClick: b = !1,\n ariaLabelledBy: l,\n ariaDescribedBy: v\n}) {\n const f = z(), m = n || `modal-${f}`, g = n ? `${n}-title` : `modal-title-${f}`, { show: h, shouldRender: y } = $e(a);\n if (Le(m, y), Re(y, t), !y) return null;\n const p = () => o ? F.isValidElement(o) ? /* @__PURE__ */ c(\"div\", { className: \"mb-4\", children: o }) : /* @__PURE__ */ c(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: g, children: o }) : null, x = () => 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((E, N) => {\n const { label: B, className: k, ...L } = E;\n return /* @__PURE__ */ c(Ie, { className: k, type: \"button\", ...L, \"data-modal-action\": \"true\", children: B }, N);\n }) });\n return /* @__PURE__ */ c(O, { children: te(\n /* @__PURE__ */ c(\n \"div\",\n {\n \"aria-labelledby\": l ?? o ? g : 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__ */ A(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: R(\"fixed inset-0 bg-black/20 transition-all\", i),\n onClick: () => {\n b || t();\n }\n }\n ),\n r && /* @__PURE__ */ c(\"div\", { className: R(\"relative w-fit\", s), children: e }),\n !r && /* @__PURE__ */ A(\n \"div\",\n {\n id: m,\n tabIndex: -1,\n className: R(\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 h ? \"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(ie, { size: 18 })\n }\n ),\n p(),\n e,\n x()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nconst ze = {\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}, Be = {\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 ut({\n page: n,\n pageCount: a = 5,\n maxVisiblePages: t = 5,\n showFirstLast: o = !0,\n onPageChange: e,\n size: r = \"md\",\n variant: s = \"link\",\n className: i,\n ref: u,\n buttonsClassName: d,\n ...b\n}) {\n const l = a === 1 / 0, f = I(() => {\n if (l) return [];\n const E = a, N = Math.min(t, E);\n if (E <= N)\n return Array.from({ length: E }, (q, G) => G + 1);\n const B = Math.floor(N / 2);\n let k = Math.max(1, n - B), L = Math.min(E, k + N - 1);\n return L - k + 1 < N && (k = Math.max(1, L - N + 1), L = Math.min(E, k + N - 1)), Array.from({ length: L - k + 1 }, (q, G) => k + G);\n }, [l, t, n, a])(), m = n > 1, g = l || n < a, h = o && !l, y = o && !l, p = (E) => {\n E >= 1 && (l || E <= a) && e(E);\n }, x = I(() => {\n const E = R(\n \"flex items-center justify-center min-w-fit\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n Be[r],\n \"rounded-md\"\n );\n return R(E, ze[s], d);\n }, [s, r, d]);\n return /* @__PURE__ */ A(\n \"nav\",\n {\n ref: u,\n className: R(\"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\" : a,\n ...b,\n children: [\n h && /* @__PURE__ */ A(\n \"button\",\n {\n onClick: () => p(1),\n className: x(),\n disabled: n === 1,\n \"aria-label\": \"Go to first page\",\n children: [\n /* @__PURE__ */ c(ge, { size: r === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: \"First\" })\n ]\n }\n ),\n /* @__PURE__ */ A(\n \"button\",\n {\n onClick: () => p(n - 1),\n className: x(),\n disabled: !m,\n \"aria-label\": \"Go to previous page\",\n children: [\n /* @__PURE__ */ c(ve, { size: r === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: \"Previous\" })\n ]\n }\n ),\n !l && f.map((E) => /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => p(E),\n className: R(x(), \"aspect-square\"),\n \"aria-label\": `Go to page ${E}`,\n \"aria-current\": E === n ? !0 : void 0,\n children: E\n },\n E\n )),\n /* @__PURE__ */ A(\n \"button\",\n {\n onClick: () => p(n + 1),\n className: x(),\n disabled: !g,\n \"aria-label\": \"Go to next page\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: \"mr-1\", children: \"Next\" }),\n /* @__PURE__ */ c(ye, { size: r === \"sm\" ? 12 : 15 })\n ]\n }\n ),\n y && /* @__PURE__ */ A(\n \"button\",\n {\n onClick: () => p(a),\n className: x(),\n disabled: n === a,\n \"aria-label\": \"Go to last page\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: \"mr-1\", children: \"Last\" }),\n /* @__PURE__ */ c(we, { size: r === \"sm\" ? 12 : 15 })\n ]\n }\n )\n ]\n }\n );\n}\nfunction Se(n) {\n const [a, t] = C(!1), [o, e] = C(!1);\n return T(() => {\n n ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 300));\n }, [n]), { show: a, shouldRender: o };\n}\nfunction Ve(n, a) {\n T(() => {\n const t = (o) => {\n o.key === \"Escape\" && n && a();\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, a]);\n}\nfunction Fe(n, a) {\n const t = j(null), o = 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 T(() => (a && (t.current = document.activeElement, o()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [a, o]);\n}\nconst je = {\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 ft({\n ref: n,\n id: a,\n isOpen: t,\n onClose: o,\n title: e,\n children: r,\n footer: s,\n size: i = \"md\",\n className: u,\n overlayClassName: d,\n hideCloseButton: b = !1,\n disableCloseOnOverlayClick: l = !1,\n ariaLabelledBy: v,\n ariaDescribedBy: f\n}) {\n const m = z(), g = a || `panel-${m}`, h = a ? `${a}-title` : `panel-title-${m}`, { show: y, shouldRender: p } = Se(t);\n if (Fe(g, p), Ve(p, o), !p) return null;\n const x = () => e ? F.isValidElement(e) ? /* @__PURE__ */ c(\"div\", { children: e }) : /* @__PURE__ */ c(\"h2\", { className: \"text-2xl font-semibold\", id: h, children: e }) : null, E = () => {\n if (!s) return null;\n if (F.isValidElement(s)) {\n const N = s, B = N.props.className || \"\";\n return F.cloneElement(N, { className: R(\"px-6 py-4\", B) });\n }\n return /* @__PURE__ */ c(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ c(O, { children: te(\n /* @__PURE__ */ A(\n \"div\",\n {\n \"aria-labelledby\": v ?? e ? h : 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: R(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n y ? \"opacity-100\" : \"opacity-0\",\n d\n ),\n onClick: () => {\n l || o();\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: g,\n ref: n,\n tabIndex: -1,\n className: R(\n \"relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out\",\n i !== \"screen\" && \"border-l border-border\",\n je.size[i],\n y ? \"translate-x-0\" : \"translate-x-full\",\n u\n ),\n \"data-panel-size\": i,\n children: /* @__PURE__ */ A(\"div\", { className: \"flex h-full flex-col\", children: [\n e && /* @__PURE__ */ c(\"div\", { className: \"px-6 pt-6\", children: x() }),\n !b && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: o,\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(ie, { size: 18 })\n }\n ),\n /* @__PURE__ */ c(\"div\", { className: R(\"flex-1 overflow-y-auto px-6 pb-6\", e ? \"pt-6\" : \"pt-10\"), children: r }),\n E()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nfunction Ge({ itemId: n, checked: a, onChange: t, name: o, disabled: e = !1, className: r = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", i = () => {\n e || t();\n }, u = w(\n s,\n !a && \"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\": a,\n \"aria-disabled\": e,\n \"aria-description\": `Radio button for ${o}`,\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: a && /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\"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: a,\n className: t = \"\",\n isSelected: o = !1,\n onChange: e,\n disabled: r = !1,\n hideInput: s = !1,\n description: i,\n name: u\n}) {\n const b = `radio-${z()}-${n}`, l = () => {\n r || e == null || e(n);\n };\n return /* @__PURE__ */ A(\n \"div\",\n {\n title: i,\n className: w(\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 && !o && `border-transparent ${r ? \"\" : \"not-focus-within:hover:border-border/60\"}`,\n s && o && \"border-border\",\n r && \"opacity-60 cursor-not-allowed\"\n ),\n style: {\n gap: \"0.5em\"\n },\n children: [\n !s && /* @__PURE__ */ c(\n Ge,\n {\n itemId: b,\n name: u || \"\",\n checked: o,\n onChange: l,\n disabled: r,\n className: w(s && \"\")\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: s ? b : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? l : void 0,\n \"aria-checked\": s ? o ? \"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 ? `${b}-label` : void 0,\n className: w(s && \"size-full\", typeof a == \"object\" && \"grow focus:outline-none\"),\n children: /* @__PURE__ */ c(\n \"label\",\n {\n id: `${b}-label`,\n onClick: s ? void 0 : l,\n className: w(r && \"cursor-not-allowed\", !r && \"cursor-pointer\"),\n children: a\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction qe(n, a) {\n const [t, o] = C(a), [e, r] = C(-1), [s, i] = C(!1), u = I((f, m) => {\n var y;\n const g = f[m];\n g.hasAttribute(\"disabled\") || g.getAttribute(\"aria-disabled\") === \"true\" || ((y = f[m]) == null || y.click(), r(m));\n }, []), d = I(\n (f, m) => {\n var h;\n if (f.preventDefault(), s || !m.length) return;\n const g = a !== -1 ? a : 0;\n (h = m[g]) == null || h.focus(), o(g), a !== -1 && u(m, g);\n },\n [a, s, u]\n ), b = I(\n (f) => {\n var y;\n if (!f.shiftKey)\n return;\n f.preventDefault();\n const m = Array.from(\n document.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter((p) => !p.hasAttribute(\"disabled\") && p.tabIndex >= 0), g = m.findIndex((p) => p.id === n), h = g > 0 ? g - 1 : m.length - 1;\n (y = m[h]) == null || y.focus();\n },\n [n]\n ), l = I(\n (f, m) => {\n var x;\n if (!m.length) return;\n const g = f.target;\n if (!m.some((E) => E.id === g.id)) return;\n const y = t !== -1 ? t : 0;\n let p = y;\n switch (f.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n f.preventDefault(), p = y > 0 ? y - 1 : m.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n f.preventDefault(), p = (y + 1) % m.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n f.preventDefault(), u(m, y);\n return;\n case \"Tab\":\n b(f);\n return;\n default:\n return;\n }\n (x = m[p]) == null || x.focus(), o(p), e !== -1 && u(m, p);\n },\n [t, e, b, 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 T(() => {\n const f = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n if (!f) return;\n const m = v(), g = (x) => d(x, m), h = (x) => l(x, m), y = () => i(!0), p = () => i(!1);\n return document.addEventListener(\"keydown\", h), f.addEventListener(\"focus\", g), f.addEventListener(\"mousedown\", y), document.addEventListener(\"mouseup\", p), () => {\n document.removeEventListener(\"keydown\", h), f.removeEventListener(\"focus\", g), f.removeEventListener(\"mousedown\", y), document.removeEventListener(\"mouseup\", p);\n };\n }, [n, v, d, l]);\n}\nfunction mt({\n options: n = [],\n value: a,\n onChange: t,\n id: o,\n children: e,\n className: r = \"\",\n childrenClassName: s = \"\",\n hideInputs: i = !1\n}) {\n const u = z(), d = o || `radio-group-${u}`;\n qe(\n d,\n n.findIndex((l) => l === a)\n );\n const b = 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__ */ A(\"div\", { id: d, role: \"radiogroup\", tabIndex: 0, className: w(r, \"focus:outline-none\"), children: [\n b.length > 0 && b.map((l, v) => /* @__PURE__ */ c(\n Y,\n {\n value: l.value,\n isSelected: a === 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 b.length === 0 && e && F.Children.map(e, (l) => F.isValidElement(l) && l.type === Y ? /* @__PURE__ */ c(\n Y,\n {\n ...l.props,\n className: w(s, l.props.className),\n hideInput: l.props.hideInput || i,\n isSelected: a === l.props.value,\n onChange: t,\n name: d,\n children: l.props.children\n }\n ) : null)\n ] });\n}\nconst He = {\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}, Me = {\n horizontal: \"w-full\",\n vertical: \"min-h-4 h-full\"\n};\nfunction bt({\n orientation: n = \"horizontal\",\n decorative: a = !1,\n thickness: t = \"thin\",\n className: o,\n ...e\n}) {\n const r = w(\n \"shrink-0 bg-border\",\n Me[n],\n He[t][n],\n o\n );\n return /* @__PURE__ */ c(\n \"div\",\n {\n ...e,\n className: r,\n role: a ? \"presentation\" : \"separator\",\n \"aria-orientation\": a ? void 0 : n,\n \"aria-hidden\": a,\n \"data-orientation\": n,\n \"data-thickness\": t\n }\n );\n}\nconst ne = {\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 ht({\n shape: n = \"rectangle\",\n lineSpacing: a = \"sm\",\n className: t,\n lines: o = 1,\n animate: e = !0,\n ref: r,\n ...s\n}) {\n const i = w(\"bg-muted/70\", e && \"animate-pulse\", ne.shape[n], t);\n return o > 1 ? /* @__PURE__ */ c(\n \"div\",\n {\n ref: r,\n className: ne.lineSpacing[a],\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-container\",\n \"data-lines\": o,\n \"data-shape\": n,\n \"data-animate\": e,\n ...s,\n children: Array.from({ length: o }, (u, d) => /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\n i,\n // Make last line shorter for a more natural text appearance\n d === o - 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 pt({\n id: n,\n value: a,\n defaultValue: t = 0,\n onValueChange: o,\n min: e = 0,\n max: r = 100,\n step: s = 1,\n disabled: i = !1,\n trackClassName: u,\n rangeClassName: d,\n thumbClassName: b,\n className: l,\n ref: v,\n ariaLabel: f,\n ariaLabelledBy: m,\n ...g\n}) {\n const [h, y] = C(t), p = a !== void 0, x = p ? a : h, E = j(null), N = j(!1), B = j(0), k = I(\n (D) => {\n const $ = Math.max(e, Math.min(r, D)), S = Math.round($ / s) * s;\n p || y(S), o == null || o(S);\n },\n [e, r, s, p, o]\n ), L = I(\n (D, $ = !1) => {\n var P;\n const S = (P = E.current) == null ? void 0 : P.getBoundingClientRect();\n if (!S) return x;\n let M = D.clientX;\n $ && (M = M - B.current);\n const _ = Math.max(0, Math.min(1, (M - S.left) / S.width));\n return e + (r - e) * _;\n },\n [e, r, x]\n ), q = I(\n (D) => {\n if (i || D.target !== D.currentTarget) return;\n const $ = L(D);\n k($);\n },\n [i, L, k]\n ), G = I(\n (D) => {\n var P;\n if (i) return;\n D.stopPropagation(), N.current = !0;\n const $ = (P = E.current) == null ? void 0 : P.getBoundingClientRect(), S = D.currentTarget.getBoundingClientRect();\n if ($ && S) {\n const K = S.left + S.width / 2;\n B.current = D.clientX - K;\n }\n D.currentTarget.setPointerCapture(D.pointerId);\n const M = (K) => {\n if (!N.current) return;\n const le = L(K, !0);\n k(le);\n }, _ = (K) => {\n if (K.pointerId === D.pointerId) {\n N.current = !1, B.current = 0;\n try {\n D.currentTarget.releasePointerCapture(K.pointerId);\n } catch {\n }\n document.removeEventListener(\"pointermove\", M), document.removeEventListener(\"pointerup\", _);\n }\n };\n document.addEventListener(\"pointermove\", M), document.addEventListener(\"pointerup\", _);\n },\n [i, L, k]\n ), U = I(\n (D) => {\n if (i) return;\n let $ = x;\n switch (D.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n $ = x + s;\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n $ = x - s;\n break;\n case \"Home\":\n $ = e;\n break;\n case \"End\":\n $ = r;\n break;\n case \"PageUp\":\n $ = x + s * 10;\n break;\n case \"PageDown\":\n $ = x - s * 10;\n break;\n default:\n return;\n }\n D.preventDefault(), k($);\n },\n [i, x, s, e, r, k]\n ), H = r === e ? 0 : (x - e) / (r - e) * 100;\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: n,\n ref: v,\n className: R(\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\": x,\n \"data-min\": e,\n \"data-max\": r,\n \"data-step\": s,\n ...g,\n children: /* @__PURE__ */ A(\n \"div\",\n {\n ref: E,\n className: R(\n \"relative h-1.5 w-full rounded-full bg-muted cursor-pointer\",\n i && \"cursor-not-allowed\",\n u\n ),\n onPointerDown: q,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: R(\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 !N.current && \"transition-all\",\n d\n ),\n style: { width: `${H}%` }\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n className: R(\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 N.current ? \"cursor-grabbing scale-110\" : \"transition-all\",\n b\n ),\n style: { left: `calc(${H}% - 10px)` },\n tabIndex: i ? -1 : 0,\n role: \"slider\",\n \"aria-valuemin\": e,\n \"aria-valuemax\": r,\n \"aria-valuenow\": x,\n \"aria-label\": f,\n \"aria-labelledby\": m,\n \"aria-disabled\": i,\n onKeyDown: U,\n onPointerDown: G\n }\n )\n ]\n }\n )\n }\n );\n}\nfunction gt({ children: n, ref: a, ...t }) {\n if (ce(n)) {\n let o = { ...t };\n return n.props && (o = { ...o, ...n.props }), de(n, {\n ...o,\n ref: (e) => {\n typeof a == \"function\" ? a(e) : a && (a.current = e);\n }\n });\n }\n return se(\"div\", { ...t, ref: a }, n);\n}\nfunction Ke({ elementId: n, maxLength: a }) {\n const [t, o] = C(0);\n return T(() => {\n const e = document.getElementById(n);\n if (!e)\n return;\n const r = () => {\n const s = e.value.length;\n o(s);\n const i = s >= a;\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(a)), () => {\n e.removeEventListener(\"input\", r), e.removeAttribute(\"maxlength\"), e.removeAttribute(\"aria-describedby\"), e.removeAttribute(\"aria-invalid\"), e.removeAttribute(\"data-error\");\n };\n }, [n, a]), /* @__PURE__ */ c(\n \"small\",\n {\n className: w(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end\",\n t >= a && \"text-destructive\",\n t < a && \"text-current\"\n ),\n role: \"status\",\n children: /* @__PURE__ */ A(\"span\", { id: `${n}-character-count`, children: [\n t,\n \" / \",\n a,\n \" characters\"\n ] })\n }\n );\n}\nfunction Pe(n, a) {\n T(() => {\n const t = document.getElementById(n);\n if (!t)\n return;\n if (!a) {\n t.style.height = \"auto\";\n return;\n }\n const o = () => {\n t.style.height = \"auto\", t.style.height = `${t.scrollHeight}px`;\n };\n return o(), t.addEventListener(\"input\", o), t.addEventListener(\"resize\", o), window.addEventListener(\"resize\", o), () => {\n t.removeEventListener(\"input\", o), t.removeEventListener(\"resize\", o), window.removeEventListener(\"resize\", o);\n };\n }, [n, a]);\n}\nconst Ue = {\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}, _e = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, oe = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction vt({\n variant: n = oe.variant,\n rounded: a,\n displayOnlyMode: t = !1,\n errorMessage: o,\n successMessage: e,\n hideResizeHandle: r = !1,\n autoExpand: s = !1,\n characterLimit: i = 0,\n className: u,\n ...d\n}) {\n const b = z();\n Pe(b, s || t);\n let l = a;\n n === \"outline\" && !a && (l = \"md\"), l = l || oe.rounded;\n let v = r;\n (t || n === \"left-line\" && !r) && (v = !0);\n const m = w(\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 && Ue[n],\n !t && _e[l],\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n v && \"no-resize-handle\",\n u\n );\n return /* @__PURE__ */ A(\"div\", { className: w(\"-space-y-1.5\", t && \"cursor-text\"), children: [\n /* @__PURE__ */ c(\n \"textarea\",\n {\n ...d,\n id: b,\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: m\n }\n ),\n i > 0 && /* @__PURE__ */ c(Ke, { elementId: b, maxLength: i }),\n !t && /* @__PURE__ */ c(Q, { elementId: b, type: \"error\", message: o }),\n !t && /* @__PURE__ */ c(Q, { elementId: b, type: \"success\", message: e })\n ] });\n}\nconst We = {\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}, Xe = {\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}, ae = {\n variant: \"default\",\n size: \"md\"\n};\nfunction yt({\n ref: n,\n id: a,\n size: t = ae.size,\n variant: o = ae.variant,\n checked: e,\n onCheckedChange: r,\n disabled: s = !1,\n className: i,\n thumbClassName: u,\n backgroundClassNames: d,\n ...b\n}) {\n const l = z(), v = ee(() => a || `toggle-${l}`, [a, l]), [f, m] = C(e);\n T(() => {\n m(e);\n }, [e]);\n const g = () => {\n if (!s) {\n const N = !f;\n e === void 0 && m(N), r == null || r(N);\n }\n }, h = (N) => {\n (N.key === \" \" || N.key === \"Enter\") && (N.preventDefault(), g());\n }, y = We[t], p = Xe[o], x = w(\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) || p.checked : (d == null ? void 0 : d.unchecked) || p.unchecked,\n // Disabled state\n s && \"opacity-50 cursor-not-allowed\",\n !s && \"cursor-pointer\",\n i\n ), E = w(\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__ */ A(\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: g,\n onKeyDown: h,\n className: x,\n ...b,\n children: [\n /* @__PURE__ */ c(\"span\", { className: E }),\n /* @__PURE__ */ c(\"span\", { className: \"sr-only\", children: f ? \"Enabled\" : \"Disabled\" })\n ]\n }\n );\n}\nconst W = 8, X = 4, V = 6;\nfunction Qe(n) {\n return { calculatePosition: I(\n (t, o) => {\n const e = t.getBoundingClientRect(), r = o.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, i = (v, f, m, g) => v < 0 || f < 0 || v + m > s.width || f + g > 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 - V,\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 - V,\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 - V\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 - V\n }\n }\n };\n let d = n, b = u[n];\n if (i(b.x, b.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], b = f;\n else {\n const m = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (g) => g !== n && g !== v[n]\n );\n for (const g of m) {\n const h = u[g];\n if (!i(h.x, h.y, r.width, r.height)) {\n d = g, b = h;\n break;\n }\n }\n }\n }\n b.x = Math.max(\n W,\n Math.min(b.x, s.width - r.width - W)\n ), b.y = Math.max(\n W,\n Math.min(b.y, s.height - r.height - W)\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\" ? b.arrow.x = Math.max(\n V,\n Math.min(l.x - b.x - V, r.width - V * 2)\n ) : b.arrow.y = Math.max(\n V,\n Math.min(l.y - b.y - V, r.height - V * 2)\n ), {\n ...b,\n placement: d\n };\n },\n [n]\n ) };\n}\nfunction Ze(n, a, t) {\n const o = j(null), e = j(null), r = I(() => {\n if (!o.current || !e.current) return;\n const s = n(o.current, e.current);\n t(s);\n }, [n, t]);\n return T(() => {\n if (!a) return;\n const s = () => r();\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, [a, r]), {\n triggerRef: o,\n tooltipRef: e,\n updatePosition: r\n };\n}\nfunction Je(n, a, t, o, e, r, s, i, u) {\n const d = j(null), b = I(() => {\n n || (d.current && clearTimeout(d.current), d.current = window.setTimeout(() => {\n t(!0), requestAnimationFrame(() => {\n e(), o(!0);\n });\n }, a));\n }, [n, a, t, e, o]), l = I(\n (v = !1) => {\n if (d.current && clearTimeout(d.current), v) {\n o(!1), setTimeout(() => t(!1), 150);\n return;\n }\n d.current = window.setTimeout(() => {\n o(!1), setTimeout(() => t(!1), 150);\n }, 100);\n },\n [o, t]\n );\n return T(() => {\n !r && !s && !i && u && l();\n }, [r, s, i, u, l]), T(() => () => {\n d.current && clearTimeout(d.current);\n }, []), {\n showTooltip: b,\n hideTooltip: l,\n timeoutRef: d\n };\n}\nfunction wt({\n id: n,\n children: a,\n message: t,\n placement: o = \"top\",\n disabled: e = !1,\n delay: r = 200,\n className: s\n}) {\n const [i, u] = C(!1), [d, b] = C(!1), [l, v] = C(null), [f, m] = C(!1), [g, h] = C(!1), [y, p] = C(!1), { calculatePosition: x } = Qe(o), { triggerRef: E, tooltipRef: N, updatePosition: B } = Ze(x, d, v), { showTooltip: k, hideTooltip: L, timeoutRef: q } = Je(\n e,\n r,\n b,\n u,\n B,\n f,\n g,\n y,\n i\n ), G = z(), U = n ?? G;\n return /* @__PURE__ */ A(O, { children: [\n F.cloneElement(a, {\n ref: (H) => {\n E.current = H;\n },\n onMouseEnter: () => {\n m(!0), k();\n },\n onMouseLeave: () => {\n m(!1);\n },\n onFocus: () => {\n p(!0), k();\n },\n onBlur: () => {\n p(!1), L(!0);\n },\n onKeyDown: (H) => {\n H.key === \"Escape\" && L(!0);\n },\n \"aria-describedby\": e ? void 0 : U\n }),\n d && te(\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: N,\n id: U,\n role: \"tooltip\",\n className: w(\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 h(!0), q.current && clearTimeout(q.current);\n },\n onMouseLeave: () => {\n h(!1);\n },\n children: t\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n at as Accordion,\n Z as AccordionItem,\n Nt as ActionModal,\n Ie as Button,\n Ee as ButtonLoadingDots,\n st as Checkbox,\n it as Clickable,\n lt as Input,\n ct as Label,\n dt as Modal,\n ut as Pagination,\n ft as Panel,\n mt as RadioGroup,\n Y as RadioGroupItem,\n Ge as RadioInput,\n bt as Separator,\n ht as Skeleton,\n pt as Slider,\n gt as Slot,\n vt as Textarea,\n At as Toast,\n yt as Toggle,\n wt 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","w","F","Ee","a","T","o","c","Ne","Ae","Ce","J","Ie","r","u","d","A","$e","Re","Le","j","I","dt","b","v","f","z","m","g","p","x","E","N","B","k","L","O","te","R","ie","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,OAAQH,GAAM,OAAOA,GAAK,UAAYA,CAAC,EA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,SACnC,YAAWA,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,26 +1,26 @@
1
- import { jsx as r, Fragment as M, jsxs as f } from "react/jsx-runtime";
2
- import q, { createContext as F, useId as H, useState as p, useEffect as b, useRef as P, useCallback as z, useMemo as C } from "react";
3
- import { createPortal as V } from "react-dom";
4
- import { X as D, C as J, E as K, I as X } from "./X-CIoyLewf.js";
1
+ import { jsx as r, Fragment as $, jsxs as f } from "react/jsx-runtime";
2
+ import q, { createContext as L, useId as F, useState as p, useEffect as b, useRef as H, useCallback as T, useMemo as C, useContext as P } from "react";
3
+ import { createPortal as D } from "react-dom";
4
+ import { X as J, C as K, E as V, I as X } from "./X-CIoyLewf.js";
5
5
  import { join as Z } from "./utils.esm.js";
6
6
  function w(...e) {
7
- return e.filter((l) => typeof l == "string" && l).join(" ").trim() || void 0;
7
+ return e.filter((n) => typeof n == "string" && n).join(" ").trim() || void 0;
8
8
  }
9
- function $({ size: e = 15, color: l = "currentColor", className: n = "inline", ...t }) {
9
+ function G({ size: e = 15, color: n = "currentColor", className: l = "inline", ...t }) {
10
10
  return /* @__PURE__ */ r(
11
11
  "svg",
12
12
  {
13
13
  ...t,
14
14
  width: e,
15
15
  height: e,
16
- className: n,
16
+ className: l,
17
17
  viewBox: "0 0 15 15",
18
18
  xmlns: "http://www.w3.org/2000/svg",
19
19
  children: /* @__PURE__ */ r(
20
20
  "path",
21
21
  {
22
22
  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",
23
- fill: l,
23
+ fill: n,
24
24
  fillRule: "evenodd",
25
25
  clipRule: "evenodd"
26
26
  }
@@ -28,29 +28,29 @@ function $({ size: e = 15, color: l = "currentColor", className: n = "inline", .
28
28
  }
29
29
  );
30
30
  }
31
- function y(...e) {
32
- return e.filter((l) => typeof l == "string" && l).join(" ").trim() || void 0;
31
+ function v(...e) {
32
+ return e.filter((n) => typeof n == "string" && n).join(" ").trim() || void 0;
33
33
  }
34
- F(void 0);
35
- function G() {
36
- const [e, l] = p(0);
34
+ L(void 0);
35
+ function Q() {
36
+ const [e, n] = p(0);
37
37
  return b(() => {
38
- const n = setInterval(() => {
39
- l((t) => (t + 1) % 3);
38
+ const l = setInterval(() => {
39
+ n((t) => (t + 1) % 3);
40
40
  }, 500);
41
- return () => clearInterval(n);
42
- }, []), /* @__PURE__ */ r("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((n) => /* @__PURE__ */ r(
41
+ return () => clearInterval(l);
42
+ }, []), /* @__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(
43
43
  "div",
44
44
  {
45
45
  className: w(
46
46
  "rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",
47
- e === n && "transform -translate-y-1"
47
+ e === l && "transform -translate-y-1"
48
48
  )
49
49
  },
50
- n
50
+ l
51
51
  )) });
52
52
  }
53
- const Q = {
53
+ const R = {
54
54
  base: "",
55
55
  primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
56
56
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
@@ -79,8 +79,8 @@ const Q = {
79
79
  };
80
80
  function Y({
81
81
  variant: e = x.variant,
82
- size: l,
83
- rounded: n = x.rounded,
82
+ size: n,
83
+ rounded: l = x.rounded,
84
84
  loading: t,
85
85
  linkTo: i,
86
86
  linkProps: a,
@@ -89,12 +89,12 @@ function Y({
89
89
  ...s
90
90
  }) {
91
91
  let c;
92
- e === "link" && !l ? c = "fitted" : c = l || x.size;
92
+ e === "link" && !n ? c = "fitted" : c = n || x.size;
93
93
  const u = w(
94
94
  "appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
95
- Q[e],
95
+ R[e],
96
96
  U[c],
97
- W[n],
97
+ W[l],
98
98
  t && "relative pointer-events-none",
99
99
  i && "relative",
100
100
  d
@@ -111,7 +111,7 @@ function Y({
111
111
  type: o,
112
112
  className: u,
113
113
  children: [
114
- t && /* @__PURE__ */ r(G, {}),
114
+ t && /* @__PURE__ */ r(Q, {}),
115
115
  /* @__PURE__ */ r("span", { className: w(t && "invisible"), children: s.children }),
116
116
  i && !s.disabled && /* @__PURE__ */ r(
117
117
  "a",
@@ -128,23 +128,23 @@ function Y({
128
128
  );
129
129
  }
130
130
  function _(e) {
131
- const [l, n] = p(!1), [t, i] = p(!1);
131
+ const [n, l] = p(!1), [t, i] = p(!1);
132
132
  return b(() => {
133
- e ? (i(!0), setTimeout(() => n(!0), 10)) : (n(!1), setTimeout(() => i(!1), 150));
134
- }, [e]), { show: l, shouldRender: t };
133
+ e ? (i(!0), setTimeout(() => l(!0), 10)) : (l(!1), setTimeout(() => i(!1), 150));
134
+ }, [e]), { show: n, shouldRender: t };
135
135
  }
136
- function R(e, l) {
136
+ function ee(e, n) {
137
137
  b(() => {
138
- const n = (t) => {
139
- t.key === "Escape" && e && l();
138
+ const l = (t) => {
139
+ t.key === "Escape" && e && n();
140
140
  };
141
- return document.addEventListener("keydown", n), e && (document.body.style.overflow = "hidden"), () => {
142
- document.removeEventListener("keydown", n), document.body.style.overflow = "auto";
141
+ return document.addEventListener("keydown", l), e && (document.body.style.overflow = "hidden"), () => {
142
+ document.removeEventListener("keydown", l), document.body.style.overflow = "auto";
143
143
  };
144
- }, [e, l]);
144
+ }, [e, n]);
145
145
  }
146
- function ee(e, l) {
147
- const n = P(null), t = z(() => {
146
+ function te(e, n) {
147
+ const l = H(null), t = T(() => {
148
148
  const i = document.getElementById(e);
149
149
  if (!i) return;
150
150
  const a = i.querySelectorAll('[data-modal-action="true"]');
@@ -166,14 +166,14 @@ function ee(e, l) {
166
166
  }
167
167
  i.focus();
168
168
  }, [e]);
169
- b(() => (l && (n.current = document.activeElement, t()), () => {
170
- document.body.style.overflow = "auto", n.current instanceof HTMLElement && n.current.focus();
171
- }), [l, t]);
169
+ b(() => (n && (l.current = document.activeElement, t()), () => {
170
+ document.body.style.overflow = "auto", l.current instanceof HTMLElement && l.current.focus();
171
+ }), [n, t]);
172
172
  }
173
- function te({
173
+ function re({
174
174
  id: e,
175
- isOpen: l,
176
- onClose: n,
175
+ isOpen: n,
176
+ onClose: l,
177
177
  title: t,
178
178
  children: i,
179
179
  contentOnly: a = !1,
@@ -185,13 +185,13 @@ function te({
185
185
  ariaLabelledBy: m,
186
186
  ariaDescribedBy: g
187
187
  }) {
188
- const h = H(), N = e || `modal-${h}`, k = e ? `${e}-title` : `modal-title-${h}`, { show: L, shouldRender: v } = _(l);
189
- if (ee(N, v), R(v, n), !v) return null;
190
- const T = () => t ? q.isValidElement(t) ? /* @__PURE__ */ r("div", { className: "mb-4", children: t }) : /* @__PURE__ */ r("h2", { className: "mb-4 text-xl font-semibold", id: k, 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, A) => {
191
- const { label: B, className: O, ...S } = j;
192
- return /* @__PURE__ */ r(Y, { className: O, type: "button", ...S, "data-modal-action": "true", children: B }, A);
188
+ const h = F(), N = e || `modal-${h}`, k = e ? `${e}-title` : `modal-title-${h}`, { show: z, shouldRender: y } = _(n);
189
+ if (te(N, y), ee(y, l), !y) return null;
190
+ 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: k, 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) => {
191
+ const { label: O, className: M, ...S } = j;
192
+ return /* @__PURE__ */ r(Y, { className: M, type: "button", ...S, "data-modal-action": "true", children: O }, B);
193
193
  }) });
194
- return /* @__PURE__ */ r(M, { children: V(
194
+ return /* @__PURE__ */ r($, { children: D(
195
195
  /* @__PURE__ */ r(
196
196
  "div",
197
197
  {
@@ -204,21 +204,21 @@ function te({
204
204
  /* @__PURE__ */ r(
205
205
  "div",
206
206
  {
207
- className: y("fixed inset-0 bg-black/20 transition-all", d),
207
+ className: v("fixed inset-0 bg-black/20 transition-all", d),
208
208
  onClick: () => {
209
- u || n();
209
+ u || l();
210
210
  }
211
211
  }
212
212
  ),
213
- a && /* @__PURE__ */ r("div", { className: y("relative w-fit", o), children: i }),
213
+ a && /* @__PURE__ */ r("div", { className: v("relative w-fit", o), children: i }),
214
214
  !a && /* @__PURE__ */ f(
215
215
  "div",
216
216
  {
217
217
  id: N,
218
218
  tabIndex: -1,
219
- className: y(
219
+ className: v(
220
220
  "relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",
221
- L ? "opacity-100 scale-100" : "opacity-0 scale-90",
221
+ z ? "opacity-100 scale-100" : "opacity-0 scale-90",
222
222
  o
223
223
  ),
224
224
  children: [
@@ -226,13 +226,13 @@ function te({
226
226
  "button",
227
227
  {
228
228
  type: "button",
229
- onClick: n,
229
+ onClick: l,
230
230
  "data-modal-close-button": "true",
231
231
  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",
232
- children: /* @__PURE__ */ r($, { size: 18 })
232
+ children: /* @__PURE__ */ r(G, { size: 18 })
233
233
  }
234
234
  ),
235
- T(),
235
+ A(),
236
236
  i,
237
237
  I()
238
238
  ]
@@ -244,10 +244,10 @@ function te({
244
244
  document.body
245
245
  ) });
246
246
  }
247
- function oe({
247
+ function de({
248
248
  type: e,
249
- message: l,
250
- cancelText: n,
249
+ message: n,
250
+ cancelText: l,
251
251
  confirmText: t,
252
252
  onConfirm: i,
253
253
  onClose: a,
@@ -257,13 +257,13 @@ function oe({
257
257
  }) {
258
258
  const c = C(() => e === "confirm" ? {
259
259
  confirm: t || "Confirm",
260
- cancel: n || "Cancel",
260
+ cancel: l || "Cancel",
261
261
  defaultTitle: d || "Confirm Action"
262
262
  } : {
263
263
  confirm: t || "OK",
264
264
  cancel: null,
265
265
  defaultTitle: d || "Alert"
266
- }, [e, t, d, n]), u = C(
266
+ }, [e, t, d, l]), u = C(
267
267
  () => [
268
268
  ...c.cancel ? [
269
269
  {
@@ -283,7 +283,7 @@ function oe({
283
283
  [c, o, i, a]
284
284
  );
285
285
  return /* @__PURE__ */ r(
286
- te,
286
+ re,
287
287
  {
288
288
  ...s,
289
289
  title: d || c.defaultTitle,
@@ -291,28 +291,33 @@ function oe({
291
291
  actions: u,
292
292
  disableCloseOnOverlayClick: e === "confirm",
293
293
  hideCloseButton: e === "confirm",
294
- children: typeof l == "string" ? /* @__PURE__ */ r("p", { className: "text-sm", children: l }) : l
294
+ children: typeof n == "string" ? /* @__PURE__ */ r("p", { className: "text-sm", children: n }) : n
295
295
  }
296
296
  );
297
297
  }
298
- const E = {
298
+ const ne = L(null), ce = () => {
299
+ const e = P(ne);
300
+ if (!e)
301
+ throw new Error("Tabs components must be used within a Tabs component");
302
+ return e;
303
+ }, E = {
299
304
  info: {
300
305
  className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
301
306
  icon: /* @__PURE__ */ r(X, { size: 20 })
302
307
  },
303
308
  warning: {
304
309
  className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
305
- icon: /* @__PURE__ */ r(K, { size: 20 })
310
+ icon: /* @__PURE__ */ r(V, { size: 20 })
306
311
  },
307
312
  error: {
308
313
  className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
309
- icon: /* @__PURE__ */ r(J, { size: 20 })
314
+ icon: /* @__PURE__ */ r(K, { size: 20 })
310
315
  }
311
316
  };
312
- function se({
317
+ function ue({
313
318
  id: e,
314
- title: l,
315
- description: n,
319
+ title: n,
320
+ description: l,
316
321
  type: t = "info",
317
322
  action: i,
318
323
  duration: a = 5e3,
@@ -320,7 +325,7 @@ function se({
320
325
  customTypes: d,
321
326
  customComponent: s
322
327
  }) {
323
- const [c, u] = p(!1), m = z(() => {
328
+ const [c, u] = p(!1), m = T(() => {
324
329
  u(!0), setTimeout(() => {
325
330
  o == null || o(e);
326
331
  }, 150);
@@ -337,8 +342,8 @@ function se({
337
342
  s,
338
343
  {
339
344
  id: e,
340
- title: l,
341
- description: n,
345
+ title: n,
346
+ description: l,
342
347
  type: t,
343
348
  action: i,
344
349
  duration: a,
@@ -360,8 +365,8 @@ function se({
360
365
  children: [
361
366
  /* @__PURE__ */ r("div", { className: "flex-shrink-0 mr-3", children: g.icon }),
362
367
  /* @__PURE__ */ f("div", { className: "flex-grow min-w-0", children: [
363
- /* @__PURE__ */ r("div", { className: "font-medium text-sm leading-5", children: l }),
364
- n && /* @__PURE__ */ r("div", { className: "mt-1 text-sm opacity-90 leading-5", children: n }),
368
+ /* @__PURE__ */ r("div", { className: "font-medium text-sm leading-5", children: n }),
369
+ l && /* @__PURE__ */ r("div", { className: "mt-1 text-sm opacity-90 leading-5", children: l }),
365
370
  i && /* @__PURE__ */ r("div", { className: "mt-1.5", children: /* @__PURE__ */ r(
366
371
  "button",
367
372
  {
@@ -376,7 +381,7 @@ function se({
376
381
  {
377
382
  onClick: m,
378
383
  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",
379
- children: /* @__PURE__ */ r(D, { size: 16 })
384
+ children: /* @__PURE__ */ r(J, { size: 16 })
380
385
  }
381
386
  )
382
387
  ]
@@ -384,8 +389,10 @@ function se({
384
389
  );
385
390
  }
386
391
  export {
387
- oe as A,
388
- se as T,
389
- w as n
392
+ de as A,
393
+ ue as T,
394
+ ne as a,
395
+ w as n,
396
+ ce as u
390
397
  };
391
- //# sourceMappingURL=Toast-DrQd4i4R.js.map
398
+ //# sourceMappingURL=Toast-Cg9gyFxs.js.map