@moondreamsdev/dreamer-ui 1.7.7-test.0 → 1.7.7-test.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{X-5_dKmWcQ.js → QuestionMarkCircled-B6xdNcJl.js} +5 -29
- package/dist/QuestionMarkCircled-B6xdNcJl.js.map +1 -0
- package/dist/QuestionMarkCircled-Dh6Bl18_.cjs +2 -0
- package/dist/QuestionMarkCircled-Dh6Bl18_.cjs.map +1 -0
- package/dist/Toast-Bn0CCsLY.js +380 -0
- package/dist/Toast-Bn0CCsLY.js.map +1 -0
- package/dist/Toast-uzg_Sy4r.cjs +2 -0
- package/dist/Toast-uzg_Sy4r.cjs.map +1 -0
- package/dist/X-JuXyHwMp.cjs +2 -0
- package/dist/X-JuXyHwMp.cjs.map +1 -0
- package/dist/X-aXWqJhiz.js +52 -0
- package/dist/X-aXWqJhiz.js.map +1 -0
- package/dist/components.cjs.js +1 -1
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +55 -53
- package/dist/components.esm.js.map +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.esm.js +4 -3
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.cjs.js.map +1 -1
- package/dist/providers.esm.js +75 -25
- package/dist/providers.esm.js.map +1 -1
- package/dist/src/components/accordion/AccordionItem.d.ts +0 -1
- package/dist/src/components/clickable/Clickable.d.ts +0 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/radiogroup/RadioGroupItem.d.ts +0 -1
- package/dist/src/components/toast/index.d.ts +0 -3
- package/dist/src/components/tooltip/hooks.d.ts +0 -1
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/useActionModal.d.ts +0 -1
- package/dist/src/{components/toast → hooks}/useToast.d.ts +1 -2
- package/dist/src/{components/toast → providers}/ToastProvider.d.ts +1 -1
- package/dist/src/providers/index.d.ts +1 -0
- package/dist/symbols.cjs.js +1 -1
- package/dist/symbols.cjs.js.map +1 -1
- package/dist/symbols.esm.js +12 -34
- package/dist/symbols.esm.js.map +1 -1
- package/dist/useToast-CEKvEJVB.js +22 -0
- package/dist/useToast-CEKvEJVB.js.map +1 -0
- package/dist/useToast-CraVIawn.cjs +2 -0
- package/dist/useToast-CraVIawn.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/X-5_dKmWcQ.js.map +0 -1
- package/dist/X-BCa88TDt.cjs +0 -2
- package/dist/X-BCa88TDt.cjs.map +0 -1
- package/dist/styles-B0WE-RIs.cjs +0 -2
- package/dist/styles-B0WE-RIs.cjs.map +0 -1
- package/dist/styles-Dm_OLOPv.js +0 -289
- package/dist/styles-Dm_OLOPv.js.map +0 -1
- package/dist/useActionModal-C4X_-O9_.js +0 -13
- package/dist/useActionModal-C4X_-O9_.js.map +0 -1
- package/dist/useActionModal-CqT8y2he.cjs +0 -2
- package/dist/useActionModal-CqT8y2he.cjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles-B0WE-RIs.cjs","sources":["utils.esm.js","QuestionMarkCircled-JRFAPLtT.js","styles-eVzajhIX.js","components.esm.js","../src/components/actionmodal/ActionModal.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 i({ size: C = 15, color: l = \"currentColor\" }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction t({ size: C = 15 }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction o({ size: C = 15, color: l = \"currentColor\" }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction r({ size: C = 15 }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", 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: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction d({ size: C = 15 }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M14.7649 6.07596C14.9991 6.22231 15.0703 6.53079 14.9239 6.76495C14.4849 7.46743 13.9632 8.10645 13.3702 8.66305L14.5712 9.86406C14.7664 10.0593 14.7664 10.3759 14.5712 10.5712C14.3759 10.7664 14.0593 10.7664 13.8641 10.5712L12.6011 9.30817C11.805 9.90283 10.9089 10.3621 9.93375 10.651L10.383 12.3277C10.4544 12.5944 10.2961 12.8685 10.0294 12.94C9.76267 13.0115 9.4885 12.8532 9.41704 12.5865L8.95917 10.8775C8.48743 10.958 8.00036 10.9999 7.50001 10.9999C6.99965 10.9999 6.51257 10.958 6.04082 10.8775L5.58299 12.5864C5.51153 12.8532 5.23737 13.0115 4.97064 12.94C4.7039 12.8686 4.5456 12.5944 4.61706 12.3277L5.06625 10.651C4.09111 10.3621 3.19503 9.90282 2.3989 9.30815L1.1359 10.5712C0.940638 10.7664 0.624058 10.7664 0.428798 10.5712C0.233537 10.3759 0.233537 10.0593 0.428798 9.86405L1.62982 8.66303C1.03682 8.10643 0.515113 7.46742 0.0760677 6.76495C-0.0702867 6.53079 0.000898544 6.22231 0.235065 6.07596C0.469231 5.9296 0.777703 6.00079 0.924058 6.23496C1.40354 7.00213 1.989 7.68057 2.66233 8.2427C2.67315 8.25096 2.6837 8.25972 2.69397 8.26898C4.00897 9.35527 5.65537 9.99991 7.50001 9.99991C10.3078 9.99991 12.6564 8.5063 14.076 6.23495C14.2223 6.00079 14.5308 5.9296 14.7649 6.07596Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction h({ size: C = 15 }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction w({ size: C = 15, color: l = \"currentColor\" }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", 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}\nfunction c({ size: C = 15, color: l = \"currentColor\" }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nexport {\n i as C,\n r as E,\n c as Q,\n w as X,\n t as a,\n o as b,\n d as c,\n h as d\n};\n//# sourceMappingURL=QuestionMarkCircled-JRFAPLtT.js.map\n","import { jsx as l, Fragment as R, jsxs as y } from \"react/jsx-runtime\";\nimport I, { createContext as M, useId as q, useState as v, useEffect as m, useRef as H, useCallback as S, useMemo as N } from \"react\";\nimport { createPortal as $ } from \"react-dom\";\nfunction g(...e) {\n return e.filter((t) => typeof t == \"string\" && t).join(\" \").trim() || void 0;\n}\nfunction F({ size: e = 15, color: t = \"currentColor\" }) {\n return /* @__PURE__ */ l(\"svg\", { width: e, height: e, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ l(\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: t,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction b(...e) {\n return e.filter((t) => typeof t == \"string\" && t).join(\" \").trim() || void 0;\n}\nM(void 0);\nfunction K() {\n const [e, t] = v(0);\n return m(() => {\n const n = setInterval(() => {\n t((r) => (r + 1) % 3);\n }, 500);\n return () => clearInterval(n);\n }, []), /* @__PURE__ */ l(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((n) => /* @__PURE__ */ l(\n \"div\",\n {\n className: g(\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 P = {\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}, D = {\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}, V = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, p = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction Z({\n variant: e = p.variant,\n size: t,\n rounded: n = p.rounded,\n loading: r,\n linkTo: i,\n linkProps: a,\n type: s = \"button\",\n className: c,\n ...o\n}) {\n let d;\n e === \"link\" && !t ? d = \"fitted\" : d = t || p.size;\n const u = g(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n P[e],\n D[d],\n V[n],\n r && \"relative pointer-events-none\",\n i && \"relative\",\n c\n );\n return /* @__PURE__ */ y(\n \"button\",\n {\n ...o,\n role: i ? \"link\" : o.role,\n \"aria-label\": o[\"aria-label\"] || (a == null ? void 0 : a[\"aria-label\"]),\n \"aria-description\": o[\"aria-description\"] || (a == null ? void 0 : a[\"aria-description\"]),\n \"aria-disabled\": o.disabled || r,\n \"aria-busy\": r,\n type: s,\n className: u,\n children: [\n r && /* @__PURE__ */ l(K, {}),\n /* @__PURE__ */ l(\"span\", { className: g(r && \"invisible\"), children: o.children }),\n i && !o.disabled && /* @__PURE__ */ l(\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 G(e) {\n const [t, n] = v(!1), [r, i] = v(!1);\n return m(() => {\n e ? (i(!0), setTimeout(() => n(!0), 10)) : (n(!1), setTimeout(() => i(!1), 150));\n }, [e]), { show: t, shouldRender: r };\n}\nfunction J(e, t) {\n m(() => {\n const n = (r) => {\n r.key === \"Escape\" && e && t();\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, t]);\n}\nfunction Q(e, t) {\n const n = H(null), r = S(() => {\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 s = i.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const c = Array.from(s).filter((o) => !(o instanceof HTMLButtonElement && o.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (c.length > 0) {\n c[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n i.focus();\n }, [e]);\n m(() => (t && (n.current = document.activeElement, r()), () => {\n document.body.style.overflow = \"auto\", n.current instanceof HTMLElement && n.current.focus();\n }), [t, r]);\n}\nfunction U({\n id: e,\n isOpen: t,\n onClose: n,\n title: r,\n children: i,\n contentOnly: a = !1,\n className: s,\n overlayClassName: c,\n hideCloseButton: o = !1,\n actions: d = [],\n disableCloseOnOverlayClick: u = !1,\n ariaLabelledBy: C,\n ariaDescribedBy: k\n}) {\n const h = q(), x = e || `modal-${h}`, w = e ? `${e}-title` : `modal-title-${h}`, { show: L, shouldRender: f } = G(t);\n if (Q(x, f), J(f, n), !f) return null;\n const E = () => r ? I.isValidElement(r) ? /* @__PURE__ */ l(\"div\", { className: \"mb-4\", children: r }) : /* @__PURE__ */ l(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: w, children: r }) : null, z = () => d.length === 0 ? null : /* @__PURE__ */ l(\"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((A, j) => {\n const { label: B, className: O, ...T } = A;\n return /* @__PURE__ */ l(Z, { className: O, type: \"button\", ...T, \"data-modal-action\": \"true\", children: B }, j);\n }) });\n return /* @__PURE__ */ l(R, { children: $(\n /* @__PURE__ */ l(\n \"div\",\n {\n \"aria-labelledby\": C ?? r ? w : void 0,\n \"aria-describedby\": k,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ y(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ l(\n \"div\",\n {\n className: b(\"fixed inset-0 bg-black/20 transition-all\", c),\n onClick: () => {\n u || n();\n }\n }\n ),\n a && /* @__PURE__ */ l(\"div\", { className: b(\"relative w-fit\", s), children: i }),\n !a && /* @__PURE__ */ y(\n \"div\",\n {\n id: x,\n tabIndex: -1,\n className: b(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl transition-all p-6 bg-inherit focus:ring ease-in duration-75\",\n L ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !o && /* @__PURE__ */ l(\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__ */ l(F, { size: 18 })\n }\n ),\n E(),\n i,\n z()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction _({\n type: e,\n message: t,\n cancelText: n,\n confirmText: r,\n onConfirm: i,\n onClose: a,\n destructive: s = !1,\n title: c,\n ...o\n}) {\n const d = N(() => e === \"confirm\" ? {\n confirm: r || \"Confirm\",\n cancel: n || \"Cancel\",\n defaultTitle: c || \"Confirm Action\"\n } : {\n confirm: r || \"OK\",\n cancel: null,\n defaultTitle: c || \"Alert\"\n }, [e, r, c, n]), u = N(\n () => [\n ...d.cancel ? [\n {\n label: d.cancel,\n variant: \"secondary\",\n onClick: a\n }\n ] : [],\n {\n label: d.confirm,\n variant: s ? \"destructive\" : \"primary\",\n onClick: () => {\n i == null || i(), a();\n }\n }\n ],\n [d, s, i, a]\n );\n return /* @__PURE__ */ l(\n U,\n {\n ...o,\n title: c || d.defaultTitle,\n onClose: a,\n actions: u,\n disableCloseOnOverlayClick: e === \"confirm\",\n hideCloseButton: e === \"confirm\",\n children: typeof t == \"string\" ? /* @__PURE__ */ l(\"p\", { className: \"text-sm\", children: t }) : t\n }\n );\n}\nexport {\n _ as A,\n g as n\n};\n//# sourceMappingURL=styles-eVzajhIX.js.map\n","import { jsxs as N, jsx as c, Fragment as X } from \"react/jsx-runtime\";\nimport T, { useId as $, useState as x, createElement as Z, useEffect as E, useCallback as A, useMemo as J, useRef as B, isValidElement as O, cloneElement as P } from \"react\";\nimport { join as w } from \"./utils.esm.js\";\nimport { b as ee, C as te, E as re, a as oe, d as ne, c as ae, Q as se, X as ie } from \"./QuestionMarkCircled-JRFAPLtT.js\";\nimport { n as q } from \"./styles-eVzajhIX.js\";\nimport { A as Qe } from \"./styles-eVzajhIX.js\";\nimport { createPortal as Y } from \"react-dom\";\nfunction V({\n id: n,\n title: a,\n content: e,\n children: o,\n className: t = \"\",\n disabled: r = !1,\n isOpen: s = !1,\n onToggle: l,\n triggerClassName: d = \"\",\n bodyClassName: u = \"\"\n}) {\n const f = $(), i = n || `accordion-item-${f}`, g = `${i}-header`, b = `${i}-panel`, m = () => {\n !r && l && l();\n }, v = (h) => {\n (h.key === \"Enter\" || h.key === \" \") && (h.preventDefault(), m());\n };\n return /* @__PURE__ */ N(\"div\", { className: w(\"border-b border-gray-200\", r && \"opacity-60 cursor-not-allowed\", t), children: [\n /* @__PURE__ */ N(\n \"button\",\n {\n id: g,\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 d\n ),\n \"aria-expanded\": s,\n \"aria-controls\": b,\n disabled: r,\n onClick: m,\n onKeyDown: v,\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(ee, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: b,\n role: \"region\",\n \"aria-labelledby\": g,\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 u\n ),\n children: s && (o || e)\n }\n )\n ] });\n}\nfunction Be({\n id: n,\n items: a = [],\n children: e,\n className: o = \"\",\n itemClassName: t = \"\",\n allowMultiple: r = !1,\n defaultOpenItems: s = [],\n triggersClassName: l = \"\",\n bodiesClassName: d = \"\"\n}) {\n const u = $(), f = n || `accordion-group-${u}`, [i, g] = x(new Set(s)), b = (h) => {\n g((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) => `${u}-item-${h}`, v = (h) => i.has(h);\n return /* @__PURE__ */ N(\"div\", { id: f, className: o, children: [\n a.length > 0 && a.map((h, y) => {\n const p = h.id || m(y);\n return /* @__PURE__ */ c(\n V,\n {\n id: p,\n title: h.title,\n content: h.content,\n disabled: h.disabled,\n isOpen: v(p),\n onToggle: () => b(p),\n className: t,\n triggerClassName: l,\n bodyClassName: d\n },\n p\n );\n }),\n a.length === 0 && e && T.Children.map(e, (h, y) => {\n if (T.isValidElement(h) && h.type === V) {\n const p = h.props.id || m(y);\n return /* @__PURE__ */ Z(\n V,\n {\n ...h.props,\n key: p,\n id: p,\n className: w(t, h.props.className),\n isOpen: v(p),\n onToggle: () => b(p),\n triggerClassName: w(l, h.props.triggerClassName),\n bodyClassName: w(d, h.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction le() {\n const [n, a] = x(0);\n return E(() => {\n const e = setInterval(() => {\n a((o) => (o + 1) % 3);\n }, 500);\n return () => clearInterval(e);\n }, []), /* @__PURE__ */ c(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((e) => /* @__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 === e && \"transform -translate-y-1\"\n )\n },\n e\n )) });\n}\nconst de = {\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}, ue = {\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}, K = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction fe({\n variant: n = K.variant,\n size: a,\n rounded: e = K.rounded,\n loading: o,\n linkTo: t,\n linkProps: r,\n type: s = \"button\",\n className: l,\n ...d\n}) {\n let u;\n n === \"link\" && !a ? u = \"fitted\" : u = a || K.size;\n const i = w(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n de[n],\n ue[u],\n ce[e],\n o && \"relative pointer-events-none\",\n t && \"relative\",\n l\n );\n return /* @__PURE__ */ N(\n \"button\",\n {\n ...d,\n role: t ? \"link\" : d.role,\n \"aria-label\": d[\"aria-label\"] || (r == null ? void 0 : r[\"aria-label\"]),\n \"aria-description\": d[\"aria-description\"] || (r == null ? void 0 : r[\"aria-description\"]),\n \"aria-disabled\": d.disabled || o,\n \"aria-busy\": o,\n type: s,\n className: i,\n children: [\n o && /* @__PURE__ */ c(le, {}),\n /* @__PURE__ */ c(\"span\", { className: w(o && \"invisible\"), children: d.children }),\n t && !d.disabled && /* @__PURE__ */ c(\n \"a\",\n {\n ...r,\n \"aria-hidden\": !0,\n href: t,\n rel: (r == null ? void 0 : r.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction me(n) {\n const [a, e] = x(\"\"), o = A((t) => {\n let r = t, s = \"\";\n for (; r && !s; ) {\n const l = window.getComputedStyle(r).backgroundColor;\n l && l !== \"transparent\" && l !== \"rgba(0, 0, 0, 0)\" && (s = l), r = r.parentElement;\n }\n return s || \"transparent\";\n }, []);\n return E(() => {\n const t = document.getElementById(n);\n if (t) {\n const r = o(t.parentElement);\n e(r);\n }\n }, [n, o]), a;\n}\nfunction je({\n ref: n,\n id: a,\n size: e = 20,\n color: o,\n filled: t = !1,\n rounded: r = !0,\n checked: s = !1,\n onCheckedChange: l,\n disabled: d,\n className: u = \"\",\n ...f\n}) {\n const i = $(), g = J(() => a || `checkbox-${i}`, [a, i]), b = me(g), [m, v] = x(s);\n E(() => {\n v(s);\n }, [s]);\n const h = () => {\n d || (v(!m), l == null || l(!m));\n }, y = (C) => {\n C.key === \" \" && (C.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 d && \"opacity-40 cursor-not-allowed\",\n !d && \"cursor-pointer\",\n u\n );\n return /* @__PURE__ */ c(\n \"button\",\n {\n id: g,\n type: \"button\",\n ref: n,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: h,\n \"aria-checked\": m,\n \"aria-disabled\": d,\n onKeyDownCapture: y,\n style: {\n width: e,\n height: e,\n color: o,\n backgroundColor: m && t ? \"currentcolor\" : \"transparent\"\n },\n className: p,\n ...f,\n children: m && /* @__PURE__ */ c(te, { size: e, color: t ? b : void 0 })\n }\n );\n}\nfunction Fe({\n children: n,\n className: a,\n linkTo: e,\n linkProps: o,\n onButtonClick: t,\n buttonProps: r,\n ...s\n}) {\n return e && t && console.warn('Clickable: Both \"linkTo\" and \"onButtonClick\" props are provided. Only \"linkTo\" will be used.'), /* @__PURE__ */ N(\"div\", { className: w(\"relative w-fit\", a), ...s, children: [\n n,\n e && /* @__PURE__ */ c(\n \"a\",\n {\n ...o,\n rel: (o == null ? void 0 : o.rel) || \"noreferrer\",\n href: e,\n className: w(\"absolute inset-0\", o == null ? void 0 : o.className)\n }\n ),\n !e && t && /* @__PURE__ */ c(\n \"button\",\n {\n ...r,\n type: \"button\",\n onClick: t,\n className: w(\"absolute inset-0 cursor-pointer\", r == null ? void 0 : r.className)\n }\n )\n ] });\n}\nfunction j({ elementId: n, type: a, message: e }) {\n return E(() => {\n const o = document.getElementById(n);\n if (o) {\n if (!e && a === \"error\") {\n o.removeAttribute(\"data-error\");\n return;\n }\n if (!e && 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, e]), e ? /* @__PURE__ */ N(\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(re, {}) : /* @__PURE__ */ c(oe, {}),\n /* @__PURE__ */ c(\"span\", { id: `${n}-${a}-message`, children: e })\n ]\n }\n ) : null;\n}\nconst be = {\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}, he = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, _ = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction Se({\n variant: n = _.variant,\n rounded: a,\n displayOnlyMode: e = !1,\n errorMessage: o,\n successMessage: t,\n type: r = \"text\",\n className: s,\n ...l\n}) {\n const d = $(), [u, f] = x(!1);\n let i = a;\n n === \"outline\" && !a && (i = \"md\"), i = i || _.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 !e && be[n],\n !e && he[i],\n r === \"password\" && \"pr-10\",\n !e && \"px-2 py-1\",\n e && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ N(\"div\", { className: w(e && \"cursor-text\"), style: { height: l.height, width: l.width }, children: [\n /* @__PURE__ */ N(\"div\", { className: w(r === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ c(\n \"input\",\n {\n ...l,\n id: d,\n type: r === \"password\" && u ? \"text\" : r,\n \"aria-disabled\": l.disabled,\n readOnly: e,\n \"aria-readonly\": e || l[\"aria-readonly\"],\n \"data-error\": o ? !0 : void 0,\n \"data-success\": t ? !0 : void 0,\n className: m\n }\n ),\n r === \"password\" && /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => f(!u),\n className: \"absolute inset-y-0 right-0 px-2 hover:cursor-pointer\",\n \"aria-label\": \"Toggle password visibility\",\n \"data-state\": u ? \"visible\" : \"hidden\",\n children: u ? /* @__PURE__ */ c(ne, { size: 20 }) : /* @__PURE__ */ c(ae, { size: 20 })\n }\n )\n ] }),\n !e && /* @__PURE__ */ c(j, { elementId: d, type: \"error\", message: o }),\n !e && /* @__PURE__ */ c(j, { elementId: d, type: \"success\", message: t })\n ] });\n}\nfunction He({\n display: n = \"inline\",\n width: a = \"fit-content\",\n className: e = \"\",\n required: o,\n helpMessage: t,\n suffix: r,\n htmlFor: s,\n children: l,\n ...d\n}) {\n const u = $(), f = w(\"font-medium\", n, e), i = t ? `${s ?? u}-help` : void 0;\n return /* @__PURE__ */ N(\"div\", { style: { display: n === \"inline\" ? \"inline-flex\" : \"flex\", width: a }, className: \"relative\", children: [\n /* @__PURE__ */ N(\"label\", { className: f, htmlFor: s, ...d, children: [\n l,\n o && /* @__PURE__ */ c(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n t && /* @__PURE__ */ c(\n \"span\",\n {\n className: \"text-gray-500 ml-1 size-fit -translate-y-1/3\",\n \"aria-describedby\": i,\n \"aria-label\": \"Help information\",\n title: t,\n children: /* @__PURE__ */ c(se, {})\n }\n ),\n t && /* @__PURE__ */ c(\"div\", { id: i, className: \"sr-only\", children: t }),\n r && /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: r })\n ] });\n}\nfunction pe(n) {\n const [a, e] = x(!1), [o, t] = x(!1);\n return E(() => {\n n ? (t(!0), setTimeout(() => e(!0), 10)) : (e(!1), setTimeout(() => t(!1), 150));\n }, [n]), { show: a, shouldRender: o };\n}\nfunction ge(n, a) {\n E(() => {\n const e = (o) => {\n o.key === \"Escape\" && n && a();\n };\n return document.addEventListener(\"keydown\", e), n && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", e), document.body.style.overflow = \"auto\";\n };\n }, [n, a]);\n}\nfunction ve(n, a) {\n const e = B(null), o = A(() => {\n const t = document.getElementById(n);\n if (!t) return;\n const r = t.querySelectorAll('[data-modal-action=\"true\"]');\n if (r.length > 0) {\n r[0].focus();\n return;\n }\n const s = t.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const l = Array.from(s).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (l.length > 0) {\n l[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n t.focus();\n }, [n]);\n E(() => (a && (e.current = document.activeElement, o()), () => {\n document.body.style.overflow = \"auto\", e.current instanceof HTMLElement && e.current.focus();\n }), [a, o]);\n}\nfunction qe({\n id: n,\n isOpen: a,\n onClose: e,\n title: o,\n children: t,\n contentOnly: r = !1,\n className: s,\n overlayClassName: l,\n hideCloseButton: d = !1,\n actions: u = [],\n disableCloseOnOverlayClick: f = !1,\n ariaLabelledBy: i,\n ariaDescribedBy: g\n}) {\n const b = $(), m = n || `modal-${b}`, v = n ? `${n}-title` : `modal-title-${b}`, { show: h, shouldRender: y } = pe(a);\n if (ve(m, y), ge(y, e), !y) return null;\n const p = () => o ? T.isValidElement(o) ? /* @__PURE__ */ c(\"div\", { className: \"mb-4\", children: o }) : /* @__PURE__ */ c(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: v, children: o }) : null, C = () => u.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: u.map((D, F) => {\n const { label: S, className: L, ...R } = D;\n return /* @__PURE__ */ c(fe, { className: L, type: \"button\", ...R, \"data-modal-action\": \"true\", children: S }, F);\n }) });\n return /* @__PURE__ */ c(X, { children: Y(\n /* @__PURE__ */ c(\n \"div\",\n {\n \"aria-labelledby\": i ?? o ? v : 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__ */ N(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: q(\"fixed inset-0 bg-black/20 transition-all\", l),\n onClick: () => {\n f || e();\n }\n }\n ),\n r && /* @__PURE__ */ c(\"div\", { className: q(\"relative w-fit\", s), children: t }),\n !r && /* @__PURE__ */ N(\n \"div\",\n {\n id: m,\n tabIndex: -1,\n className: q(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl transition-all p-6 bg-inherit focus:ring ease-in duration-75\",\n h ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !d && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: e,\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 t,\n C()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction we({ itemId: n, checked: a, onChange: e, name: o, disabled: t = !1, className: r = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", l = () => {\n t || e();\n }, d = w(\n s,\n !a && \"hover:border-current/60\",\n !t && \"border-current cursor-pointer\",\n t && \"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\": t,\n \"aria-description\": `Radio button for ${o}`,\n \"aria-labelledby\": `${n}-label`,\n onClick: l,\n className: d,\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\", t && \"bg-muted/60\", !t && \"bg-current\")\n }\n )\n }\n );\n}\nfunction G({\n value: n,\n children: a,\n className: e = \"\",\n isSelected: o = !1,\n onChange: t,\n disabled: r = !1,\n hideInput: s = !1,\n description: l,\n name: d\n}) {\n const f = `radio-${$()}-${n}`, i = () => {\n r || t == null || t(n);\n };\n return /* @__PURE__ */ N(\n \"div\",\n {\n title: l,\n className: w(\n \"relative flex items-center\",\n e,\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 we,\n {\n itemId: f,\n name: d || \"\",\n checked: o,\n onChange: i,\n disabled: r,\n className: w(s && \"\")\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: s ? f : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? i : void 0,\n \"aria-checked\": s ? o ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": s ? r : void 0,\n \"aria-description\": s ? l || `Radio button for ${d}` : void 0,\n \"aria-labelledby\": s ? `${f}-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: `${f}-label`,\n onClick: s ? void 0 : i,\n className: w(r && \"cursor-not-allowed\", !r && \"cursor-pointer\"),\n children: a\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction ye(n, a) {\n const [e, o] = x(a), [t, r] = x(-1), [s, l] = x(!1), d = A((b, m) => {\n var y;\n const v = b[m];\n v.hasAttribute(\"disabled\") || v.getAttribute(\"aria-disabled\") === \"true\" || ((y = b[m]) == null || y.click(), r(m));\n }, []), u = A(\n (b, m) => {\n var h;\n if (b.preventDefault(), s || !m.length) return;\n const v = a !== -1 ? a : 0;\n (h = m[v]) == null || h.focus(), o(v), a !== -1 && d(m, v);\n },\n [a, s, d]\n ), f = A(\n (b) => {\n var y;\n if (!b.shiftKey)\n return;\n b.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), v = m.findIndex((p) => p.id === n), h = v > 0 ? v - 1 : m.length - 1;\n (y = m[h]) == null || y.focus();\n },\n [n]\n ), i = A(\n (b, m) => {\n var C;\n if (!m.length) return;\n const v = b.target;\n if (!m.some((D) => D.id === v.id)) return;\n const y = e !== -1 ? e : 0;\n let p = y;\n switch (b.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n b.preventDefault(), p = y > 0 ? y - 1 : m.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n b.preventDefault(), p = (y + 1) % m.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n b.preventDefault(), d(m, y);\n return;\n case \"Tab\":\n f(b);\n return;\n default:\n return;\n }\n (C = m[p]) == null || C.focus(), o(p), t !== -1 && d(m, p);\n },\n [e, t, f, d]\n ), g = A(() => {\n const b = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n return b ? Array.from(b.querySelectorAll('[role=\"radio\"]')) : [];\n }, [n]);\n E(() => {\n const b = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n if (!b) return;\n const m = g(), v = (C) => u(C, m), h = (C) => i(C, m), y = () => l(!0), p = () => l(!1);\n return document.addEventListener(\"keydown\", h), b.addEventListener(\"focus\", v), b.addEventListener(\"mousedown\", y), document.addEventListener(\"mouseup\", p), () => {\n document.removeEventListener(\"keydown\", h), b.removeEventListener(\"focus\", v), b.removeEventListener(\"mousedown\", y), document.removeEventListener(\"mouseup\", p);\n };\n }, [n, g, u, i]);\n}\nfunction Ve({\n options: n = [],\n value: a,\n onChange: e,\n id: o,\n children: t,\n className: r = \"\",\n childrenClassName: s = \"\",\n hideInputs: l = !1\n}) {\n const d = $(), u = o || `radio-group-${d}`;\n ye(\n u,\n n.findIndex((i) => i === a)\n );\n const f = J(() => n.reduce((i, g) => (typeof g == \"string\" ? i.some((b) => b.value === g) || i.push({ label: g, value: g }) : i.push(g), i), []), [n]);\n return /* @__PURE__ */ N(\"div\", { id: u, role: \"radiogroup\", tabIndex: 0, className: w(r, \"focus:outline-none\"), children: [\n f.length > 0 && f.map((i, g) => /* @__PURE__ */ c(\n G,\n {\n value: i.value,\n isSelected: a === i.value,\n onChange: e,\n name: u,\n disabled: i.disabled,\n description: i.description,\n hideInput: l,\n className: s,\n children: i.label\n },\n `${i.value}-${g}`\n )),\n f.length === 0 && t && T.Children.map(t, (i) => T.isValidElement(i) && i.type === G ? /* @__PURE__ */ c(\n G,\n {\n ...i.props,\n className: w(s, i.props.className),\n hideInput: i.props.hideInput || l,\n isSelected: a === i.props.value,\n onChange: e,\n name: u,\n children: i.props.children\n }\n ) : null)\n ] });\n}\nfunction Ke({ children: n, ref: a, ...e }) {\n if (O(n)) {\n let o = { ...e };\n return n.props && (o = { ...o, ...n.props }), P(n, {\n ...o,\n ref: (t) => {\n typeof a == \"function\" ? a(t) : a && (a.current = t);\n }\n });\n }\n return Z(\"div\", { ...e, ref: a }, n);\n}\nfunction xe({ elementId: n, maxLength: a }) {\n const [e, o] = x(0);\n return E(() => {\n const t = document.getElementById(n);\n if (!t)\n return;\n const r = () => {\n const s = t.value.length;\n o(s);\n const l = s >= a;\n t.setAttribute(\"aria-describedby\", `${n}-character-count`), t.setAttribute(\"aria-invalid\", l ? \"true\" : \"false\"), l ? t.setAttribute(\"data-error\", \"true\") : t.removeAttribute(\"data-error\");\n };\n return r(), t.addEventListener(\"input\", r), t.setAttribute(\"maxlength\", String(a)), () => {\n t.removeEventListener(\"input\", r), t.removeAttribute(\"maxlength\"), t.removeAttribute(\"aria-describedby\"), t.removeAttribute(\"aria-invalid\"), t.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 e >= a && \"text-destructive\",\n e < a && \"text-current\"\n ),\n role: \"status\",\n children: /* @__PURE__ */ N(\"span\", { id: `${n}-character-count`, children: [\n e,\n \" / \",\n a,\n \" characters\"\n ] })\n }\n );\n}\nfunction Ne(n, a) {\n E(() => {\n const e = document.getElementById(n);\n if (!e)\n return;\n if (!a) {\n e.style.height = \"auto\";\n return;\n }\n const o = () => {\n e.style.height = \"auto\", e.style.height = `${e.scrollHeight}px`;\n };\n return o(), e.addEventListener(\"input\", o), e.addEventListener(\"resize\", o), window.addEventListener(\"resize\", o), () => {\n e.removeEventListener(\"input\", o), e.removeEventListener(\"resize\", o), window.removeEventListener(\"resize\", o);\n };\n }, [n, a]);\n}\nconst Ce = {\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}, Ee = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, Q = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction Ge({\n variant: n = Q.variant,\n rounded: a,\n displayOnlyMode: e = !1,\n errorMessage: o,\n successMessage: t,\n hideResizeHandle: r = !1,\n autoExpand: s = !1,\n characterLimit: l = 0,\n className: d,\n ...u\n}) {\n const f = $();\n Ne(f, s || e);\n let i = a;\n n === \"outline\" && !a && (i = \"md\"), i = i || Q.rounded;\n let g = r;\n (e || n === \"left-line\" && !r) && (g = !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 !e && Ce[n],\n !e && Ee[i],\n !e && \"px-2 py-1\",\n e && \"pointer-events-none\",\n g && \"no-resize-handle\",\n d\n );\n return /* @__PURE__ */ N(\"div\", { className: w(\"-space-y-1.5\", e && \"cursor-text\"), children: [\n /* @__PURE__ */ c(\n \"textarea\",\n {\n ...u,\n id: f,\n \"aria-disabled\": u.disabled,\n readOnly: e,\n \"aria-readonly\": e || u[\"aria-readonly\"],\n style: {\n resize: s ? \"none\" : void 0\n },\n className: m\n }\n ),\n l > 0 && /* @__PURE__ */ c(xe, { elementId: f, maxLength: l }),\n !e && /* @__PURE__ */ c(j, { elementId: f, type: \"error\", message: o }),\n !e && /* @__PURE__ */ c(j, { elementId: f, type: \"success\", message: t })\n ] });\n}\nconst k = 8, z = 4, I = 6;\nfunction Ae(n) {\n return { calculatePosition: A(\n (e, o) => {\n const t = e.getBoundingClientRect(), r = o.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, l = (g, b, m, v) => g < 0 || b < 0 || g + m > s.width || b + v > s.height, d = {\n top: {\n x: t.left + t.width / 2 - r.width / 2,\n y: t.top - r.height - z,\n arrow: {\n x: r.width / 2 - I,\n y: r.height\n }\n },\n bottom: {\n x: t.left + t.width / 2 - r.width / 2,\n y: t.bottom + z,\n arrow: {\n x: r.width / 2 - I,\n y: -6\n }\n },\n left: {\n x: t.left - r.width - z,\n y: t.top + t.height / 2 - r.height / 2,\n arrow: {\n x: r.width,\n y: r.height / 2 - I\n }\n },\n right: {\n x: t.right + z,\n y: t.top + t.height / 2 - r.height / 2,\n arrow: {\n x: -6,\n y: r.height / 2 - I\n }\n }\n };\n let u = n, f = d[n];\n if (l(f.x, f.y, r.width, r.height)) {\n const g = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n }, b = d[g[n]];\n if (!l(b.x, b.y, r.width, r.height))\n u = g[n], f = b;\n else {\n const m = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (v) => v !== n && v !== g[n]\n );\n for (const v of m) {\n const h = d[v];\n if (!l(h.x, h.y, r.width, r.height)) {\n u = v, f = h;\n break;\n }\n }\n }\n }\n f.x = Math.max(\n k,\n Math.min(f.x, s.width - r.width - k)\n ), f.y = Math.max(\n k,\n Math.min(f.y, s.height - r.height - k)\n );\n const i = {\n x: t.left + t.width / 2,\n y: t.top + t.height / 2\n };\n return u === \"top\" || u === \"bottom\" ? f.arrow.x = Math.max(\n I,\n Math.min(i.x - f.x - I, r.width - I * 2)\n ) : f.arrow.y = Math.max(\n I,\n Math.min(i.y - f.y - I, r.height - I * 2)\n ), {\n ...f,\n placement: u\n };\n },\n [n]\n ) };\n}\nfunction Ie(n, a, e) {\n const o = B(null), t = B(null), r = A(() => {\n if (!o.current || !t.current) return;\n const s = n(o.current, t.current);\n e(s);\n }, [n, e]);\n return E(() => {\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: t,\n updatePosition: r\n };\n}\nfunction $e(n, a, e, o, t, r, s, l, d) {\n const u = B(null), f = A(() => {\n n || (u.current && clearTimeout(u.current), u.current = window.setTimeout(() => {\n e(!0), requestAnimationFrame(() => {\n t(), o(!0);\n });\n }, a));\n }, [n, a, e, t, o]), i = A(\n (g = !1) => {\n if (u.current && clearTimeout(u.current), g) {\n o(!1), setTimeout(() => e(!1), 150);\n return;\n }\n u.current = window.setTimeout(() => {\n o(!1), setTimeout(() => e(!1), 150);\n }, 100);\n },\n [o, e]\n );\n return E(() => {\n !r && !s && !l && d && i();\n }, [r, s, l, d, i]), E(() => () => {\n u.current && clearTimeout(u.current);\n }, []), {\n showTooltip: f,\n hideTooltip: i,\n timeoutRef: u\n };\n}\nfunction We({\n id: n,\n children: a,\n message: e,\n placement: o = \"top\",\n disabled: t = !1,\n delay: r = 200,\n className: s\n}) {\n const [l, d] = x(!1), [u, f] = x(!1), [i, g] = x(null), [b, m] = x(!1), [v, h] = x(!1), [y, p] = x(!1), { calculatePosition: C } = Ae(o), { triggerRef: D, tooltipRef: F, updatePosition: S } = Ie(C, u, g), { showTooltip: L, hideTooltip: R, timeoutRef: W } = $e(\n t,\n r,\n f,\n d,\n S,\n b,\n v,\n y,\n l\n ), M = $(), U = n ?? M;\n return /* @__PURE__ */ N(X, { children: [\n T.cloneElement(a, {\n ref: (H) => {\n D.current = H;\n },\n onMouseEnter: () => {\n m(!0), L();\n },\n onMouseLeave: () => {\n m(!1);\n },\n onFocus: () => {\n p(!0), L();\n },\n onBlur: () => {\n p(!1), R(!0);\n },\n onKeyDown: (H) => {\n H.key === \"Escape\" && R(!0);\n },\n \"aria-describedby\": t ? void 0 : U\n }),\n u && Y(\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: F,\n id: U,\n role: \"tooltip\",\n className: w(\n \"fixed z-50 px-2 py-1 text-sm rounded shadow-lg pointer-events-auto transition-all duration-150 ease-out\",\n l ? \"opacity-100\" : \"opacity-0\",\n s\n ),\n style: i ? { left: i.x, top: i.y } : { opacity: 0 },\n onMouseEnter: () => {\n h(!0), W.current && clearTimeout(W.current);\n },\n onMouseLeave: () => {\n h(!1);\n },\n children: e\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n Be as Accordion,\n V as AccordionItem,\n Qe as ActionModal,\n fe as Button,\n le as ButtonLoadingDots,\n je as Checkbox,\n Fe as Clickable,\n Se as Input,\n He as Label,\n qe as Modal,\n Ve as RadioGroup,\n G as RadioGroupItem,\n we as RadioInput,\n Ke as Slot,\n Ge as Textarea,\n We 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"],"names":["n","t","s","w","C","l","e","g","M","le","a","x","E","o","c","de","ue","ce","K","fe","r","d","u","i","N","pe","ge","ve","B","A","qe","f","b","$","m","v","h","y","p","T","D","F","S","L","R","X","Y","q","ie","ActionModal","type","message","cancelText","confirmText","onConfirm","onClose","destructive","title","modalProps","defaultTexts","useMemo","actions","jsx","Modal"],"mappings":"4FAAA,SAASA,KAAKC,EAAG,CACf,OAAOA,EAAE,OAAQC,GAAM,OAAOA,GAAK,UAAYA,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,GAAI,MACxE,CCiEA,SAASC,EAAE,CAAE,KAAMC,EAAI,GAAI,MAAOC,EAAI,gBAAkB,CACtD,OAAuBC,EAAAA,IAAE,MAAO,CAAE,MAAOF,EAAG,OAAQA,EAAG,UAAW,SAAU,QAAS,YAAa,MAAO,6BAA8B,SAA0BE,EAAC,IAChK,OACA,CACE,EAAG,0gBACH,KAAMD,EACN,SAAU,UACV,SAAU,SAChB,CACA,EAAK,CACL,CC1EA,SAASE,KAAK,EAAG,CACf,OAAO,EAAE,OAAQ,GAAM,OAAO,GAAK,UAAY,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,GAAI,MACxE,CAeAC,EAAC,cAAC,MAAM,EC6GR,SAASC,GAAK,CACZ,KAAM,CAACT,EAAGU,CAAC,EAAIC,EAAAA,SAAE,CAAC,EAClB,OAAOC,EAAC,UAAC,IAAM,CACb,MAAMN,EAAI,YAAY,IAAM,CAC1BI,EAAGG,IAAOA,EAAI,GAAK,CAAC,CACrB,EAAE,GAAG,EACN,MAAO,IAAM,cAAcP,CAAC,CAChC,EAAK,CAAA,CAAE,EAAmBQ,EAAC,IAAC,MAAO,CAAE,UAAW,gFAAiF,SAAU,CAAC,EAAG,EAAG,CAAC,EAAE,IAAKR,GAAsBQ,EAAC,IAC7K,MACA,CACE,UAAWX,EACT,gFACAH,I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IAAS,UACJ,CACL,QAASG,GAAe,UACxB,OAAQD,GAAc,SACtB,aAAcK,GAAS,gBACzB,EAEK,CACL,QAASJ,GAAe,KACxB,OAAQ,KACR,aAAcI,GAAS,OACzB,EACC,CAACP,EAAMG,EAAaI,EAAOL,CAAU,CAAC,EAEnCS,EAAiCD,EAAA,QACrC,IAAM,CACJ,GAAID,EAAa,OACb,CACE,CACE,MAAOA,EAAa,OACpB,QAAS,YACT,QAASJ,CAAA,CACX,EAEF,CAAC,EACL,CACE,MAAOI,EAAa,QACpB,QAASH,EAAc,cAAgB,UACvC,QAAS,IAAM,CACDF,GAAA,MAAAA,IACJC,EAAA,CAAA,CACV,CAEJ,EACA,CAACI,EAAcH,EAAaF,EAAWC,CAAO,CAChD,EAGE,OAAAO,EAAA,IAACC,EAAA,CACE,GAAGL,EACJ,MAAOD,GAASE,EAAa,aAC7B,QAAAJ,EACA,QAAAM,EACA,2BAA4BX,IAAS,UACrC,gBAAiBA,IAAS,UAEzB,SAAA,OAAOC,GAAY,SAAWW,MAAC,KAAE,UAAU,UAAW,UAAQ,CAAA,EAAOX,CAAA,CACxE,CAEJ"}
|
package/dist/styles-Dm_OLOPv.js
DELETED
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import { jsx as l, Fragment as R, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import I, { createContext as M, useId as q, useState as v, useEffect as m, useRef as S, useCallback as $, useMemo as N } from "react";
|
|
3
|
-
import { createPortal as H } from "react-dom";
|
|
4
|
-
function g(...e) {
|
|
5
|
-
return e.filter((t) => typeof t == "string" && t).join(" ").trim() || void 0;
|
|
6
|
-
}
|
|
7
|
-
function K({ size: e = 15, color: t = "currentColor" }) {
|
|
8
|
-
return /* @__PURE__ */ l("svg", { width: e, height: e, className: "inline", viewBox: "0 0 15 15", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l(
|
|
9
|
-
"path",
|
|
10
|
-
{
|
|
11
|
-
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",
|
|
12
|
-
fill: t,
|
|
13
|
-
fillRule: "evenodd",
|
|
14
|
-
clipRule: "evenodd"
|
|
15
|
-
}
|
|
16
|
-
) });
|
|
17
|
-
}
|
|
18
|
-
function b(...e) {
|
|
19
|
-
return e.filter((t) => typeof t == "string" && t).join(" ").trim() || void 0;
|
|
20
|
-
}
|
|
21
|
-
M(void 0);
|
|
22
|
-
function P() {
|
|
23
|
-
const [e, t] = v(0);
|
|
24
|
-
return m(() => {
|
|
25
|
-
const n = setInterval(() => {
|
|
26
|
-
t((r) => (r + 1) % 3);
|
|
27
|
-
}, 500);
|
|
28
|
-
return () => clearInterval(n);
|
|
29
|
-
}, []), /* @__PURE__ */ l("div", { className: "absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle", children: [0, 1, 2].map((n) => /* @__PURE__ */ l(
|
|
30
|
-
"div",
|
|
31
|
-
{
|
|
32
|
-
className: g(
|
|
33
|
-
"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",
|
|
34
|
-
e === n && "transform -translate-y-1"
|
|
35
|
-
)
|
|
36
|
-
},
|
|
37
|
-
n
|
|
38
|
-
)) });
|
|
39
|
-
}
|
|
40
|
-
const D = {
|
|
41
|
-
base: "",
|
|
42
|
-
primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
|
|
43
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
|
|
44
|
-
tertiary: "text-primary hover:text-primary-foreground disabled:text-muted",
|
|
45
|
-
outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
|
|
46
|
-
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
|
|
47
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
|
|
48
|
-
}, F = {
|
|
49
|
-
stripped: "",
|
|
50
|
-
fitted: "size-fit",
|
|
51
|
-
sm: "px-2 py-1 text-sm",
|
|
52
|
-
md: "px-4 py-2 text-base",
|
|
53
|
-
lg: "px-6 py-3 text-lg",
|
|
54
|
-
icon: "p-1 w-fit aspect-square",
|
|
55
|
-
full: "p-2 w-full"
|
|
56
|
-
}, V = {
|
|
57
|
-
none: "rounded-none",
|
|
58
|
-
sm: "rounded-sm",
|
|
59
|
-
md: "rounded-md",
|
|
60
|
-
lg: "rounded-lg",
|
|
61
|
-
full: "rounded-full"
|
|
62
|
-
}, p = {
|
|
63
|
-
variant: "primary",
|
|
64
|
-
size: "md",
|
|
65
|
-
rounded: "md"
|
|
66
|
-
};
|
|
67
|
-
function Z({
|
|
68
|
-
variant: e = p.variant,
|
|
69
|
-
size: t,
|
|
70
|
-
rounded: n = p.rounded,
|
|
71
|
-
loading: r,
|
|
72
|
-
linkTo: i,
|
|
73
|
-
linkProps: a,
|
|
74
|
-
type: s = "button",
|
|
75
|
-
className: c,
|
|
76
|
-
...o
|
|
77
|
-
}) {
|
|
78
|
-
let d;
|
|
79
|
-
e === "link" && !t ? d = "fitted" : d = t || p.size;
|
|
80
|
-
const u = g(
|
|
81
|
-
"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
82
|
-
D[e],
|
|
83
|
-
F[d],
|
|
84
|
-
V[n],
|
|
85
|
-
r && "relative pointer-events-none",
|
|
86
|
-
i && "relative",
|
|
87
|
-
c
|
|
88
|
-
);
|
|
89
|
-
return /* @__PURE__ */ y(
|
|
90
|
-
"button",
|
|
91
|
-
{
|
|
92
|
-
...o,
|
|
93
|
-
role: i ? "link" : o.role,
|
|
94
|
-
"aria-label": o["aria-label"] || (a == null ? void 0 : a["aria-label"]),
|
|
95
|
-
"aria-description": o["aria-description"] || (a == null ? void 0 : a["aria-description"]),
|
|
96
|
-
"aria-disabled": o.disabled || r,
|
|
97
|
-
"aria-busy": r,
|
|
98
|
-
type: s,
|
|
99
|
-
className: u,
|
|
100
|
-
children: [
|
|
101
|
-
r && /* @__PURE__ */ l(P, {}),
|
|
102
|
-
/* @__PURE__ */ l("span", { className: g(r && "invisible"), children: o.children }),
|
|
103
|
-
i && !o.disabled && /* @__PURE__ */ l(
|
|
104
|
-
"a",
|
|
105
|
-
{
|
|
106
|
-
...a,
|
|
107
|
-
"aria-hidden": !0,
|
|
108
|
-
href: i,
|
|
109
|
-
rel: (a == null ? void 0 : a.rel) || "noreferrer",
|
|
110
|
-
className: "absolute inset-0"
|
|
111
|
-
}
|
|
112
|
-
)
|
|
113
|
-
]
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
function G(e) {
|
|
118
|
-
const [t, n] = v(!1), [r, i] = v(!1);
|
|
119
|
-
return m(() => {
|
|
120
|
-
e ? (i(!0), setTimeout(() => n(!0), 10)) : (n(!1), setTimeout(() => i(!1), 150));
|
|
121
|
-
}, [e]), { show: t, shouldRender: r };
|
|
122
|
-
}
|
|
123
|
-
function J(e, t) {
|
|
124
|
-
m(() => {
|
|
125
|
-
const n = (r) => {
|
|
126
|
-
r.key === "Escape" && e && t();
|
|
127
|
-
};
|
|
128
|
-
return document.addEventListener("keydown", n), e && (document.body.style.overflow = "hidden"), () => {
|
|
129
|
-
document.removeEventListener("keydown", n), document.body.style.overflow = "auto";
|
|
130
|
-
};
|
|
131
|
-
}, [e, t]);
|
|
132
|
-
}
|
|
133
|
-
function Q(e, t) {
|
|
134
|
-
const n = S(null), r = $(() => {
|
|
135
|
-
const i = document.getElementById(e);
|
|
136
|
-
if (!i) return;
|
|
137
|
-
const a = i.querySelectorAll('[data-modal-action="true"]');
|
|
138
|
-
if (a.length > 0) {
|
|
139
|
-
a[0].focus();
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
const s = i.querySelectorAll(
|
|
143
|
-
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
144
|
-
);
|
|
145
|
-
if (s.length > 0) {
|
|
146
|
-
const c = Array.from(s).filter((o) => !(o instanceof HTMLButtonElement && o.getAttribute("data-modal-close-button") === "true"));
|
|
147
|
-
if (c.length > 0) {
|
|
148
|
-
c[0].focus();
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
s[0].focus();
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
i.focus();
|
|
155
|
-
}, [e]);
|
|
156
|
-
m(() => (t && (n.current = document.activeElement, r()), () => {
|
|
157
|
-
document.body.style.overflow = "auto", n.current instanceof HTMLElement && n.current.focus();
|
|
158
|
-
}), [t, r]);
|
|
159
|
-
}
|
|
160
|
-
function U({
|
|
161
|
-
id: e,
|
|
162
|
-
isOpen: t,
|
|
163
|
-
onClose: n,
|
|
164
|
-
title: r,
|
|
165
|
-
children: i,
|
|
166
|
-
contentOnly: a = !1,
|
|
167
|
-
className: s,
|
|
168
|
-
overlayClassName: c,
|
|
169
|
-
hideCloseButton: o = !1,
|
|
170
|
-
actions: d = [],
|
|
171
|
-
disableCloseOnOverlayClick: u = !1,
|
|
172
|
-
ariaLabelledBy: C,
|
|
173
|
-
ariaDescribedBy: k
|
|
174
|
-
}) {
|
|
175
|
-
const h = q(), x = e || `modal-${h}`, w = e ? `${e}-title` : `modal-title-${h}`, { show: L, shouldRender: f } = G(t);
|
|
176
|
-
if (Q(x, f), J(f, n), !f) return null;
|
|
177
|
-
const E = () => r ? I.isValidElement(r) ? /* @__PURE__ */ l("div", { className: "mb-4", children: r }) : /* @__PURE__ */ l("h2", { className: "mb-4 text-xl font-semibold", id: w, children: r }) : null, z = () => d.length === 0 ? null : /* @__PURE__ */ l("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((A, j) => {
|
|
178
|
-
const { label: B, className: O, ...T } = A;
|
|
179
|
-
return /* @__PURE__ */ l(Z, { className: O, type: "button", ...T, "data-modal-action": "true", children: B }, j);
|
|
180
|
-
}) });
|
|
181
|
-
return /* @__PURE__ */ l(R, { children: H(
|
|
182
|
-
/* @__PURE__ */ l(
|
|
183
|
-
"div",
|
|
184
|
-
{
|
|
185
|
-
"aria-labelledby": C ?? r ? w : void 0,
|
|
186
|
-
"aria-describedby": k,
|
|
187
|
-
role: "dialog",
|
|
188
|
-
"aria-modal": "true",
|
|
189
|
-
className: "fixed inset-0 z-[100] overflow-y-auto",
|
|
190
|
-
children: /* @__PURE__ */ y("div", { className: "flex min-h-screen items-center justify-center p-4", children: [
|
|
191
|
-
/* @__PURE__ */ l(
|
|
192
|
-
"div",
|
|
193
|
-
{
|
|
194
|
-
className: b("fixed inset-0 bg-black/20 transition-all", c),
|
|
195
|
-
onClick: () => {
|
|
196
|
-
u || n();
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
),
|
|
200
|
-
a && /* @__PURE__ */ l("div", { className: b("relative w-fit", s), children: i }),
|
|
201
|
-
!a && /* @__PURE__ */ y(
|
|
202
|
-
"div",
|
|
203
|
-
{
|
|
204
|
-
id: x,
|
|
205
|
-
tabIndex: -1,
|
|
206
|
-
className: b(
|
|
207
|
-
"relative w-full max-w-xl transform rounded-lg shadow-xl transition-all p-6 bg-inherit focus:ring ease-in duration-75",
|
|
208
|
-
L ? "opacity-100 scale-100" : "opacity-0 scale-90",
|
|
209
|
-
s
|
|
210
|
-
),
|
|
211
|
-
children: [
|
|
212
|
-
!o && /* @__PURE__ */ l(
|
|
213
|
-
"button",
|
|
214
|
-
{
|
|
215
|
-
type: "button",
|
|
216
|
-
onClick: n,
|
|
217
|
-
"data-modal-close-button": "true",
|
|
218
|
-
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",
|
|
219
|
-
children: /* @__PURE__ */ l(K, { size: 18 })
|
|
220
|
-
}
|
|
221
|
-
),
|
|
222
|
-
E(),
|
|
223
|
-
i,
|
|
224
|
-
z()
|
|
225
|
-
]
|
|
226
|
-
}
|
|
227
|
-
)
|
|
228
|
-
] })
|
|
229
|
-
}
|
|
230
|
-
),
|
|
231
|
-
document.body
|
|
232
|
-
) });
|
|
233
|
-
}
|
|
234
|
-
function _({
|
|
235
|
-
type: e,
|
|
236
|
-
message: t,
|
|
237
|
-
cancelText: n,
|
|
238
|
-
confirmText: r,
|
|
239
|
-
onConfirm: i,
|
|
240
|
-
onClose: a,
|
|
241
|
-
destructive: s = !1,
|
|
242
|
-
title: c,
|
|
243
|
-
...o
|
|
244
|
-
}) {
|
|
245
|
-
const d = N(() => e === "confirm" ? {
|
|
246
|
-
confirm: r || "Confirm",
|
|
247
|
-
cancel: n || "Cancel",
|
|
248
|
-
defaultTitle: c || "Confirm Action"
|
|
249
|
-
} : {
|
|
250
|
-
confirm: r || "OK",
|
|
251
|
-
cancel: null,
|
|
252
|
-
defaultTitle: c || "Alert"
|
|
253
|
-
}, [e, r, c, n]), u = N(
|
|
254
|
-
() => [
|
|
255
|
-
...d.cancel ? [
|
|
256
|
-
{
|
|
257
|
-
label: d.cancel,
|
|
258
|
-
variant: "secondary",
|
|
259
|
-
onClick: a
|
|
260
|
-
}
|
|
261
|
-
] : [],
|
|
262
|
-
{
|
|
263
|
-
label: d.confirm,
|
|
264
|
-
variant: s ? "destructive" : "primary",
|
|
265
|
-
onClick: () => {
|
|
266
|
-
i == null || i(), a();
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
],
|
|
270
|
-
[d, s, i, a]
|
|
271
|
-
);
|
|
272
|
-
return /* @__PURE__ */ l(
|
|
273
|
-
U,
|
|
274
|
-
{
|
|
275
|
-
...o,
|
|
276
|
-
title: c || d.defaultTitle,
|
|
277
|
-
onClose: a,
|
|
278
|
-
actions: u,
|
|
279
|
-
disableCloseOnOverlayClick: e === "confirm",
|
|
280
|
-
hideCloseButton: e === "confirm",
|
|
281
|
-
children: typeof t == "string" ? /* @__PURE__ */ l("p", { className: "text-sm", children: t }) : t
|
|
282
|
-
}
|
|
283
|
-
);
|
|
284
|
-
}
|
|
285
|
-
export {
|
|
286
|
-
_ as A,
|
|
287
|
-
g as n
|
|
288
|
-
};
|
|
289
|
-
//# sourceMappingURL=styles-Dm_OLOPv.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles-Dm_OLOPv.js","sources":["utils.esm.js","QuestionMarkCircled-JRFAPLtT.js","styles-eVzajhIX.js","components.esm.js","../src/components/actionmodal/ActionModal.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 i({ size: C = 15, color: l = \"currentColor\" }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction t({ size: C = 15 }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction o({ size: C = 15, color: l = \"currentColor\" }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction r({ size: C = 15 }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", 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: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction d({ size: C = 15 }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M14.7649 6.07596C14.9991 6.22231 15.0703 6.53079 14.9239 6.76495C14.4849 7.46743 13.9632 8.10645 13.3702 8.66305L14.5712 9.86406C14.7664 10.0593 14.7664 10.3759 14.5712 10.5712C14.3759 10.7664 14.0593 10.7664 13.8641 10.5712L12.6011 9.30817C11.805 9.90283 10.9089 10.3621 9.93375 10.651L10.383 12.3277C10.4544 12.5944 10.2961 12.8685 10.0294 12.94C9.76267 13.0115 9.4885 12.8532 9.41704 12.5865L8.95917 10.8775C8.48743 10.958 8.00036 10.9999 7.50001 10.9999C6.99965 10.9999 6.51257 10.958 6.04082 10.8775L5.58299 12.5864C5.51153 12.8532 5.23737 13.0115 4.97064 12.94C4.7039 12.8686 4.5456 12.5944 4.61706 12.3277L5.06625 10.651C4.09111 10.3621 3.19503 9.90282 2.3989 9.30815L1.1359 10.5712C0.940638 10.7664 0.624058 10.7664 0.428798 10.5712C0.233537 10.3759 0.233537 10.0593 0.428798 9.86405L1.62982 8.66303C1.03682 8.10643 0.515113 7.46742 0.0760677 6.76495C-0.0702867 6.53079 0.000898544 6.22231 0.235065 6.07596C0.469231 5.9296 0.777703 6.00079 0.924058 6.23496C1.40354 7.00213 1.989 7.68057 2.66233 8.2427C2.67315 8.25096 2.6837 8.25972 2.69397 8.26898C4.00897 9.35527 5.65537 9.99991 7.50001 9.99991C10.3078 9.99991 12.6564 8.5063 14.076 6.23495C14.2223 6.00079 14.5308 5.9296 14.7649 6.07596Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction h({ size: C = 15 }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction w({ size: C = 15, color: l = \"currentColor\" }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", 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}\nfunction c({ size: C = 15, color: l = \"currentColor\" }) {\n return /* @__PURE__ */ e(\"svg\", { width: C, height: C, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nexport {\n i as C,\n r as E,\n c as Q,\n w as X,\n t as a,\n o as b,\n d as c,\n h as d\n};\n//# sourceMappingURL=QuestionMarkCircled-JRFAPLtT.js.map\n","import { jsx as l, Fragment as R, jsxs as y } from \"react/jsx-runtime\";\nimport I, { createContext as M, useId as q, useState as v, useEffect as m, useRef as H, useCallback as S, useMemo as N } from \"react\";\nimport { createPortal as $ } from \"react-dom\";\nfunction g(...e) {\n return e.filter((t) => typeof t == \"string\" && t).join(\" \").trim() || void 0;\n}\nfunction F({ size: e = 15, color: t = \"currentColor\" }) {\n return /* @__PURE__ */ l(\"svg\", { width: e, height: e, className: \"inline\", viewBox: \"0 0 15 15\", xmlns: \"http://www.w3.org/2000/svg\", children: /* @__PURE__ */ l(\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: t,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n ) });\n}\nfunction b(...e) {\n return e.filter((t) => typeof t == \"string\" && t).join(\" \").trim() || void 0;\n}\nM(void 0);\nfunction K() {\n const [e, t] = v(0);\n return m(() => {\n const n = setInterval(() => {\n t((r) => (r + 1) % 3);\n }, 500);\n return () => clearInterval(n);\n }, []), /* @__PURE__ */ l(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((n) => /* @__PURE__ */ l(\n \"div\",\n {\n className: g(\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 P = {\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}, D = {\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}, V = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, p = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction Z({\n variant: e = p.variant,\n size: t,\n rounded: n = p.rounded,\n loading: r,\n linkTo: i,\n linkProps: a,\n type: s = \"button\",\n className: c,\n ...o\n}) {\n let d;\n e === \"link\" && !t ? d = \"fitted\" : d = t || p.size;\n const u = g(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n P[e],\n D[d],\n V[n],\n r && \"relative pointer-events-none\",\n i && \"relative\",\n c\n );\n return /* @__PURE__ */ y(\n \"button\",\n {\n ...o,\n role: i ? \"link\" : o.role,\n \"aria-label\": o[\"aria-label\"] || (a == null ? void 0 : a[\"aria-label\"]),\n \"aria-description\": o[\"aria-description\"] || (a == null ? void 0 : a[\"aria-description\"]),\n \"aria-disabled\": o.disabled || r,\n \"aria-busy\": r,\n type: s,\n className: u,\n children: [\n r && /* @__PURE__ */ l(K, {}),\n /* @__PURE__ */ l(\"span\", { className: g(r && \"invisible\"), children: o.children }),\n i && !o.disabled && /* @__PURE__ */ l(\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 G(e) {\n const [t, n] = v(!1), [r, i] = v(!1);\n return m(() => {\n e ? (i(!0), setTimeout(() => n(!0), 10)) : (n(!1), setTimeout(() => i(!1), 150));\n }, [e]), { show: t, shouldRender: r };\n}\nfunction J(e, t) {\n m(() => {\n const n = (r) => {\n r.key === \"Escape\" && e && t();\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, t]);\n}\nfunction Q(e, t) {\n const n = H(null), r = S(() => {\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 s = i.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const c = Array.from(s).filter((o) => !(o instanceof HTMLButtonElement && o.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (c.length > 0) {\n c[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n i.focus();\n }, [e]);\n m(() => (t && (n.current = document.activeElement, r()), () => {\n document.body.style.overflow = \"auto\", n.current instanceof HTMLElement && n.current.focus();\n }), [t, r]);\n}\nfunction U({\n id: e,\n isOpen: t,\n onClose: n,\n title: r,\n children: i,\n contentOnly: a = !1,\n className: s,\n overlayClassName: c,\n hideCloseButton: o = !1,\n actions: d = [],\n disableCloseOnOverlayClick: u = !1,\n ariaLabelledBy: C,\n ariaDescribedBy: k\n}) {\n const h = q(), x = e || `modal-${h}`, w = e ? `${e}-title` : `modal-title-${h}`, { show: L, shouldRender: f } = G(t);\n if (Q(x, f), J(f, n), !f) return null;\n const E = () => r ? I.isValidElement(r) ? /* @__PURE__ */ l(\"div\", { className: \"mb-4\", children: r }) : /* @__PURE__ */ l(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: w, children: r }) : null, z = () => d.length === 0 ? null : /* @__PURE__ */ l(\"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((A, j) => {\n const { label: B, className: O, ...T } = A;\n return /* @__PURE__ */ l(Z, { className: O, type: \"button\", ...T, \"data-modal-action\": \"true\", children: B }, j);\n }) });\n return /* @__PURE__ */ l(R, { children: $(\n /* @__PURE__ */ l(\n \"div\",\n {\n \"aria-labelledby\": C ?? r ? w : void 0,\n \"aria-describedby\": k,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ y(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ l(\n \"div\",\n {\n className: b(\"fixed inset-0 bg-black/20 transition-all\", c),\n onClick: () => {\n u || n();\n }\n }\n ),\n a && /* @__PURE__ */ l(\"div\", { className: b(\"relative w-fit\", s), children: i }),\n !a && /* @__PURE__ */ y(\n \"div\",\n {\n id: x,\n tabIndex: -1,\n className: b(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl transition-all p-6 bg-inherit focus:ring ease-in duration-75\",\n L ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !o && /* @__PURE__ */ l(\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__ */ l(F, { size: 18 })\n }\n ),\n E(),\n i,\n z()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction _({\n type: e,\n message: t,\n cancelText: n,\n confirmText: r,\n onConfirm: i,\n onClose: a,\n destructive: s = !1,\n title: c,\n ...o\n}) {\n const d = N(() => e === \"confirm\" ? {\n confirm: r || \"Confirm\",\n cancel: n || \"Cancel\",\n defaultTitle: c || \"Confirm Action\"\n } : {\n confirm: r || \"OK\",\n cancel: null,\n defaultTitle: c || \"Alert\"\n }, [e, r, c, n]), u = N(\n () => [\n ...d.cancel ? [\n {\n label: d.cancel,\n variant: \"secondary\",\n onClick: a\n }\n ] : [],\n {\n label: d.confirm,\n variant: s ? \"destructive\" : \"primary\",\n onClick: () => {\n i == null || i(), a();\n }\n }\n ],\n [d, s, i, a]\n );\n return /* @__PURE__ */ l(\n U,\n {\n ...o,\n title: c || d.defaultTitle,\n onClose: a,\n actions: u,\n disableCloseOnOverlayClick: e === \"confirm\",\n hideCloseButton: e === \"confirm\",\n children: typeof t == \"string\" ? /* @__PURE__ */ l(\"p\", { className: \"text-sm\", children: t }) : t\n }\n );\n}\nexport {\n _ as A,\n g as n\n};\n//# sourceMappingURL=styles-eVzajhIX.js.map\n","import { jsxs as N, jsx as c, Fragment as X } from \"react/jsx-runtime\";\nimport T, { useId as $, useState as x, createElement as Z, useEffect as E, useCallback as A, useMemo as J, useRef as B, isValidElement as O, cloneElement as P } from \"react\";\nimport { join as w } from \"./utils.esm.js\";\nimport { b as ee, C as te, E as re, a as oe, d as ne, c as ae, Q as se, X as ie } from \"./QuestionMarkCircled-JRFAPLtT.js\";\nimport { n as q } from \"./styles-eVzajhIX.js\";\nimport { A as Qe } from \"./styles-eVzajhIX.js\";\nimport { createPortal as Y } from \"react-dom\";\nfunction V({\n id: n,\n title: a,\n content: e,\n children: o,\n className: t = \"\",\n disabled: r = !1,\n isOpen: s = !1,\n onToggle: l,\n triggerClassName: d = \"\",\n bodyClassName: u = \"\"\n}) {\n const f = $(), i = n || `accordion-item-${f}`, g = `${i}-header`, b = `${i}-panel`, m = () => {\n !r && l && l();\n }, v = (h) => {\n (h.key === \"Enter\" || h.key === \" \") && (h.preventDefault(), m());\n };\n return /* @__PURE__ */ N(\"div\", { className: w(\"border-b border-gray-200\", r && \"opacity-60 cursor-not-allowed\", t), children: [\n /* @__PURE__ */ N(\n \"button\",\n {\n id: g,\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 d\n ),\n \"aria-expanded\": s,\n \"aria-controls\": b,\n disabled: r,\n onClick: m,\n onKeyDown: v,\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(ee, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: b,\n role: \"region\",\n \"aria-labelledby\": g,\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 u\n ),\n children: s && (o || e)\n }\n )\n ] });\n}\nfunction Be({\n id: n,\n items: a = [],\n children: e,\n className: o = \"\",\n itemClassName: t = \"\",\n allowMultiple: r = !1,\n defaultOpenItems: s = [],\n triggersClassName: l = \"\",\n bodiesClassName: d = \"\"\n}) {\n const u = $(), f = n || `accordion-group-${u}`, [i, g] = x(new Set(s)), b = (h) => {\n g((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) => `${u}-item-${h}`, v = (h) => i.has(h);\n return /* @__PURE__ */ N(\"div\", { id: f, className: o, children: [\n a.length > 0 && a.map((h, y) => {\n const p = h.id || m(y);\n return /* @__PURE__ */ c(\n V,\n {\n id: p,\n title: h.title,\n content: h.content,\n disabled: h.disabled,\n isOpen: v(p),\n onToggle: () => b(p),\n className: t,\n triggerClassName: l,\n bodyClassName: d\n },\n p\n );\n }),\n a.length === 0 && e && T.Children.map(e, (h, y) => {\n if (T.isValidElement(h) && h.type === V) {\n const p = h.props.id || m(y);\n return /* @__PURE__ */ Z(\n V,\n {\n ...h.props,\n key: p,\n id: p,\n className: w(t, h.props.className),\n isOpen: v(p),\n onToggle: () => b(p),\n triggerClassName: w(l, h.props.triggerClassName),\n bodyClassName: w(d, h.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction le() {\n const [n, a] = x(0);\n return E(() => {\n const e = setInterval(() => {\n a((o) => (o + 1) % 3);\n }, 500);\n return () => clearInterval(e);\n }, []), /* @__PURE__ */ c(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((e) => /* @__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 === e && \"transform -translate-y-1\"\n )\n },\n e\n )) });\n}\nconst de = {\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}, ue = {\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}, K = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction fe({\n variant: n = K.variant,\n size: a,\n rounded: e = K.rounded,\n loading: o,\n linkTo: t,\n linkProps: r,\n type: s = \"button\",\n className: l,\n ...d\n}) {\n let u;\n n === \"link\" && !a ? u = \"fitted\" : u = a || K.size;\n const i = w(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n de[n],\n ue[u],\n ce[e],\n o && \"relative pointer-events-none\",\n t && \"relative\",\n l\n );\n return /* @__PURE__ */ N(\n \"button\",\n {\n ...d,\n role: t ? \"link\" : d.role,\n \"aria-label\": d[\"aria-label\"] || (r == null ? void 0 : r[\"aria-label\"]),\n \"aria-description\": d[\"aria-description\"] || (r == null ? void 0 : r[\"aria-description\"]),\n \"aria-disabled\": d.disabled || o,\n \"aria-busy\": o,\n type: s,\n className: i,\n children: [\n o && /* @__PURE__ */ c(le, {}),\n /* @__PURE__ */ c(\"span\", { className: w(o && \"invisible\"), children: d.children }),\n t && !d.disabled && /* @__PURE__ */ c(\n \"a\",\n {\n ...r,\n \"aria-hidden\": !0,\n href: t,\n rel: (r == null ? void 0 : r.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction me(n) {\n const [a, e] = x(\"\"), o = A((t) => {\n let r = t, s = \"\";\n for (; r && !s; ) {\n const l = window.getComputedStyle(r).backgroundColor;\n l && l !== \"transparent\" && l !== \"rgba(0, 0, 0, 0)\" && (s = l), r = r.parentElement;\n }\n return s || \"transparent\";\n }, []);\n return E(() => {\n const t = document.getElementById(n);\n if (t) {\n const r = o(t.parentElement);\n e(r);\n }\n }, [n, o]), a;\n}\nfunction je({\n ref: n,\n id: a,\n size: e = 20,\n color: o,\n filled: t = !1,\n rounded: r = !0,\n checked: s = !1,\n onCheckedChange: l,\n disabled: d,\n className: u = \"\",\n ...f\n}) {\n const i = $(), g = J(() => a || `checkbox-${i}`, [a, i]), b = me(g), [m, v] = x(s);\n E(() => {\n v(s);\n }, [s]);\n const h = () => {\n d || (v(!m), l == null || l(!m));\n }, y = (C) => {\n C.key === \" \" && (C.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 d && \"opacity-40 cursor-not-allowed\",\n !d && \"cursor-pointer\",\n u\n );\n return /* @__PURE__ */ c(\n \"button\",\n {\n id: g,\n type: \"button\",\n ref: n,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: h,\n \"aria-checked\": m,\n \"aria-disabled\": d,\n onKeyDownCapture: y,\n style: {\n width: e,\n height: e,\n color: o,\n backgroundColor: m && t ? \"currentcolor\" : \"transparent\"\n },\n className: p,\n ...f,\n children: m && /* @__PURE__ */ c(te, { size: e, color: t ? b : void 0 })\n }\n );\n}\nfunction Fe({\n children: n,\n className: a,\n linkTo: e,\n linkProps: o,\n onButtonClick: t,\n buttonProps: r,\n ...s\n}) {\n return e && t && console.warn('Clickable: Both \"linkTo\" and \"onButtonClick\" props are provided. Only \"linkTo\" will be used.'), /* @__PURE__ */ N(\"div\", { className: w(\"relative w-fit\", a), ...s, children: [\n n,\n e && /* @__PURE__ */ c(\n \"a\",\n {\n ...o,\n rel: (o == null ? void 0 : o.rel) || \"noreferrer\",\n href: e,\n className: w(\"absolute inset-0\", o == null ? void 0 : o.className)\n }\n ),\n !e && t && /* @__PURE__ */ c(\n \"button\",\n {\n ...r,\n type: \"button\",\n onClick: t,\n className: w(\"absolute inset-0 cursor-pointer\", r == null ? void 0 : r.className)\n }\n )\n ] });\n}\nfunction j({ elementId: n, type: a, message: e }) {\n return E(() => {\n const o = document.getElementById(n);\n if (o) {\n if (!e && a === \"error\") {\n o.removeAttribute(\"data-error\");\n return;\n }\n if (!e && 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, e]), e ? /* @__PURE__ */ N(\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(re, {}) : /* @__PURE__ */ c(oe, {}),\n /* @__PURE__ */ c(\"span\", { id: `${n}-${a}-message`, children: e })\n ]\n }\n ) : null;\n}\nconst be = {\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}, he = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, _ = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction Se({\n variant: n = _.variant,\n rounded: a,\n displayOnlyMode: e = !1,\n errorMessage: o,\n successMessage: t,\n type: r = \"text\",\n className: s,\n ...l\n}) {\n const d = $(), [u, f] = x(!1);\n let i = a;\n n === \"outline\" && !a && (i = \"md\"), i = i || _.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 !e && be[n],\n !e && he[i],\n r === \"password\" && \"pr-10\",\n !e && \"px-2 py-1\",\n e && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ N(\"div\", { className: w(e && \"cursor-text\"), style: { height: l.height, width: l.width }, children: [\n /* @__PURE__ */ N(\"div\", { className: w(r === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ c(\n \"input\",\n {\n ...l,\n id: d,\n type: r === \"password\" && u ? \"text\" : r,\n \"aria-disabled\": l.disabled,\n readOnly: e,\n \"aria-readonly\": e || l[\"aria-readonly\"],\n \"data-error\": o ? !0 : void 0,\n \"data-success\": t ? !0 : void 0,\n className: m\n }\n ),\n r === \"password\" && /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => f(!u),\n className: \"absolute inset-y-0 right-0 px-2 hover:cursor-pointer\",\n \"aria-label\": \"Toggle password visibility\",\n \"data-state\": u ? \"visible\" : \"hidden\",\n children: u ? /* @__PURE__ */ c(ne, { size: 20 }) : /* @__PURE__ */ c(ae, { size: 20 })\n }\n )\n ] }),\n !e && /* @__PURE__ */ c(j, { elementId: d, type: \"error\", message: o }),\n !e && /* @__PURE__ */ c(j, { elementId: d, type: \"success\", message: t })\n ] });\n}\nfunction He({\n display: n = \"inline\",\n width: a = \"fit-content\",\n className: e = \"\",\n required: o,\n helpMessage: t,\n suffix: r,\n htmlFor: s,\n children: l,\n ...d\n}) {\n const u = $(), f = w(\"font-medium\", n, e), i = t ? `${s ?? u}-help` : void 0;\n return /* @__PURE__ */ N(\"div\", { style: { display: n === \"inline\" ? \"inline-flex\" : \"flex\", width: a }, className: \"relative\", children: [\n /* @__PURE__ */ N(\"label\", { className: f, htmlFor: s, ...d, children: [\n l,\n o && /* @__PURE__ */ c(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n t && /* @__PURE__ */ c(\n \"span\",\n {\n className: \"text-gray-500 ml-1 size-fit -translate-y-1/3\",\n \"aria-describedby\": i,\n \"aria-label\": \"Help information\",\n title: t,\n children: /* @__PURE__ */ c(se, {})\n }\n ),\n t && /* @__PURE__ */ c(\"div\", { id: i, className: \"sr-only\", children: t }),\n r && /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: r })\n ] });\n}\nfunction pe(n) {\n const [a, e] = x(!1), [o, t] = x(!1);\n return E(() => {\n n ? (t(!0), setTimeout(() => e(!0), 10)) : (e(!1), setTimeout(() => t(!1), 150));\n }, [n]), { show: a, shouldRender: o };\n}\nfunction ge(n, a) {\n E(() => {\n const e = (o) => {\n o.key === \"Escape\" && n && a();\n };\n return document.addEventListener(\"keydown\", e), n && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", e), document.body.style.overflow = \"auto\";\n };\n }, [n, a]);\n}\nfunction ve(n, a) {\n const e = B(null), o = A(() => {\n const t = document.getElementById(n);\n if (!t) return;\n const r = t.querySelectorAll('[data-modal-action=\"true\"]');\n if (r.length > 0) {\n r[0].focus();\n return;\n }\n const s = t.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const l = Array.from(s).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (l.length > 0) {\n l[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n t.focus();\n }, [n]);\n E(() => (a && (e.current = document.activeElement, o()), () => {\n document.body.style.overflow = \"auto\", e.current instanceof HTMLElement && e.current.focus();\n }), [a, o]);\n}\nfunction qe({\n id: n,\n isOpen: a,\n onClose: e,\n title: o,\n children: t,\n contentOnly: r = !1,\n className: s,\n overlayClassName: l,\n hideCloseButton: d = !1,\n actions: u = [],\n disableCloseOnOverlayClick: f = !1,\n ariaLabelledBy: i,\n ariaDescribedBy: g\n}) {\n const b = $(), m = n || `modal-${b}`, v = n ? `${n}-title` : `modal-title-${b}`, { show: h, shouldRender: y } = pe(a);\n if (ve(m, y), ge(y, e), !y) return null;\n const p = () => o ? T.isValidElement(o) ? /* @__PURE__ */ c(\"div\", { className: \"mb-4\", children: o }) : /* @__PURE__ */ c(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: v, children: o }) : null, C = () => u.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: u.map((D, F) => {\n const { label: S, className: L, ...R } = D;\n return /* @__PURE__ */ c(fe, { className: L, type: \"button\", ...R, \"data-modal-action\": \"true\", children: S }, F);\n }) });\n return /* @__PURE__ */ c(X, { children: Y(\n /* @__PURE__ */ c(\n \"div\",\n {\n \"aria-labelledby\": i ?? o ? v : 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__ */ N(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: q(\"fixed inset-0 bg-black/20 transition-all\", l),\n onClick: () => {\n f || e();\n }\n }\n ),\n r && /* @__PURE__ */ c(\"div\", { className: q(\"relative w-fit\", s), children: t }),\n !r && /* @__PURE__ */ N(\n \"div\",\n {\n id: m,\n tabIndex: -1,\n className: q(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl transition-all p-6 bg-inherit focus:ring ease-in duration-75\",\n h ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !d && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: e,\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 t,\n C()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction we({ itemId: n, checked: a, onChange: e, name: o, disabled: t = !1, className: r = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", l = () => {\n t || e();\n }, d = w(\n s,\n !a && \"hover:border-current/60\",\n !t && \"border-current cursor-pointer\",\n t && \"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\": t,\n \"aria-description\": `Radio button for ${o}`,\n \"aria-labelledby\": `${n}-label`,\n onClick: l,\n className: d,\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\", t && \"bg-muted/60\", !t && \"bg-current\")\n }\n )\n }\n );\n}\nfunction G({\n value: n,\n children: a,\n className: e = \"\",\n isSelected: o = !1,\n onChange: t,\n disabled: r = !1,\n hideInput: s = !1,\n description: l,\n name: d\n}) {\n const f = `radio-${$()}-${n}`, i = () => {\n r || t == null || t(n);\n };\n return /* @__PURE__ */ N(\n \"div\",\n {\n title: l,\n className: w(\n \"relative flex items-center\",\n e,\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 we,\n {\n itemId: f,\n name: d || \"\",\n checked: o,\n onChange: i,\n disabled: r,\n className: w(s && \"\")\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: s ? f : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? i : void 0,\n \"aria-checked\": s ? o ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": s ? r : void 0,\n \"aria-description\": s ? l || `Radio button for ${d}` : void 0,\n \"aria-labelledby\": s ? `${f}-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: `${f}-label`,\n onClick: s ? void 0 : i,\n className: w(r && \"cursor-not-allowed\", !r && \"cursor-pointer\"),\n children: a\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction ye(n, a) {\n const [e, o] = x(a), [t, r] = x(-1), [s, l] = x(!1), d = A((b, m) => {\n var y;\n const v = b[m];\n v.hasAttribute(\"disabled\") || v.getAttribute(\"aria-disabled\") === \"true\" || ((y = b[m]) == null || y.click(), r(m));\n }, []), u = A(\n (b, m) => {\n var h;\n if (b.preventDefault(), s || !m.length) return;\n const v = a !== -1 ? a : 0;\n (h = m[v]) == null || h.focus(), o(v), a !== -1 && d(m, v);\n },\n [a, s, d]\n ), f = A(\n (b) => {\n var y;\n if (!b.shiftKey)\n return;\n b.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), v = m.findIndex((p) => p.id === n), h = v > 0 ? v - 1 : m.length - 1;\n (y = m[h]) == null || y.focus();\n },\n [n]\n ), i = A(\n (b, m) => {\n var C;\n if (!m.length) return;\n const v = b.target;\n if (!m.some((D) => D.id === v.id)) return;\n const y = e !== -1 ? e : 0;\n let p = y;\n switch (b.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n b.preventDefault(), p = y > 0 ? y - 1 : m.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n b.preventDefault(), p = (y + 1) % m.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n b.preventDefault(), d(m, y);\n return;\n case \"Tab\":\n f(b);\n return;\n default:\n return;\n }\n (C = m[p]) == null || C.focus(), o(p), t !== -1 && d(m, p);\n },\n [e, t, f, d]\n ), g = A(() => {\n const b = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n return b ? Array.from(b.querySelectorAll('[role=\"radio\"]')) : [];\n }, [n]);\n E(() => {\n const b = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n if (!b) return;\n const m = g(), v = (C) => u(C, m), h = (C) => i(C, m), y = () => l(!0), p = () => l(!1);\n return document.addEventListener(\"keydown\", h), b.addEventListener(\"focus\", v), b.addEventListener(\"mousedown\", y), document.addEventListener(\"mouseup\", p), () => {\n document.removeEventListener(\"keydown\", h), b.removeEventListener(\"focus\", v), b.removeEventListener(\"mousedown\", y), document.removeEventListener(\"mouseup\", p);\n };\n }, [n, g, u, i]);\n}\nfunction Ve({\n options: n = [],\n value: a,\n onChange: e,\n id: o,\n children: t,\n className: r = \"\",\n childrenClassName: s = \"\",\n hideInputs: l = !1\n}) {\n const d = $(), u = o || `radio-group-${d}`;\n ye(\n u,\n n.findIndex((i) => i === a)\n );\n const f = J(() => n.reduce((i, g) => (typeof g == \"string\" ? i.some((b) => b.value === g) || i.push({ label: g, value: g }) : i.push(g), i), []), [n]);\n return /* @__PURE__ */ N(\"div\", { id: u, role: \"radiogroup\", tabIndex: 0, className: w(r, \"focus:outline-none\"), children: [\n f.length > 0 && f.map((i, g) => /* @__PURE__ */ c(\n G,\n {\n value: i.value,\n isSelected: a === i.value,\n onChange: e,\n name: u,\n disabled: i.disabled,\n description: i.description,\n hideInput: l,\n className: s,\n children: i.label\n },\n `${i.value}-${g}`\n )),\n f.length === 0 && t && T.Children.map(t, (i) => T.isValidElement(i) && i.type === G ? /* @__PURE__ */ c(\n G,\n {\n ...i.props,\n className: w(s, i.props.className),\n hideInput: i.props.hideInput || l,\n isSelected: a === i.props.value,\n onChange: e,\n name: u,\n children: i.props.children\n }\n ) : null)\n ] });\n}\nfunction Ke({ children: n, ref: a, ...e }) {\n if (O(n)) {\n let o = { ...e };\n return n.props && (o = { ...o, ...n.props }), P(n, {\n ...o,\n ref: (t) => {\n typeof a == \"function\" ? a(t) : a && (a.current = t);\n }\n });\n }\n return Z(\"div\", { ...e, ref: a }, n);\n}\nfunction xe({ elementId: n, maxLength: a }) {\n const [e, o] = x(0);\n return E(() => {\n const t = document.getElementById(n);\n if (!t)\n return;\n const r = () => {\n const s = t.value.length;\n o(s);\n const l = s >= a;\n t.setAttribute(\"aria-describedby\", `${n}-character-count`), t.setAttribute(\"aria-invalid\", l ? \"true\" : \"false\"), l ? t.setAttribute(\"data-error\", \"true\") : t.removeAttribute(\"data-error\");\n };\n return r(), t.addEventListener(\"input\", r), t.setAttribute(\"maxlength\", String(a)), () => {\n t.removeEventListener(\"input\", r), t.removeAttribute(\"maxlength\"), t.removeAttribute(\"aria-describedby\"), t.removeAttribute(\"aria-invalid\"), t.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 e >= a && \"text-destructive\",\n e < a && \"text-current\"\n ),\n role: \"status\",\n children: /* @__PURE__ */ N(\"span\", { id: `${n}-character-count`, children: [\n e,\n \" / \",\n a,\n \" characters\"\n ] })\n }\n );\n}\nfunction Ne(n, a) {\n E(() => {\n const e = document.getElementById(n);\n if (!e)\n return;\n if (!a) {\n e.style.height = \"auto\";\n return;\n }\n const o = () => {\n e.style.height = \"auto\", e.style.height = `${e.scrollHeight}px`;\n };\n return o(), e.addEventListener(\"input\", o), e.addEventListener(\"resize\", o), window.addEventListener(\"resize\", o), () => {\n e.removeEventListener(\"input\", o), e.removeEventListener(\"resize\", o), window.removeEventListener(\"resize\", o);\n };\n }, [n, a]);\n}\nconst Ce = {\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}, Ee = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, Q = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction Ge({\n variant: n = Q.variant,\n rounded: a,\n displayOnlyMode: e = !1,\n errorMessage: o,\n successMessage: t,\n hideResizeHandle: r = !1,\n autoExpand: s = !1,\n characterLimit: l = 0,\n className: d,\n ...u\n}) {\n const f = $();\n Ne(f, s || e);\n let i = a;\n n === \"outline\" && !a && (i = \"md\"), i = i || Q.rounded;\n let g = r;\n (e || n === \"left-line\" && !r) && (g = !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 !e && Ce[n],\n !e && Ee[i],\n !e && \"px-2 py-1\",\n e && \"pointer-events-none\",\n g && \"no-resize-handle\",\n d\n );\n return /* @__PURE__ */ N(\"div\", { className: w(\"-space-y-1.5\", e && \"cursor-text\"), children: [\n /* @__PURE__ */ c(\n \"textarea\",\n {\n ...u,\n id: f,\n \"aria-disabled\": u.disabled,\n readOnly: e,\n \"aria-readonly\": e || u[\"aria-readonly\"],\n style: {\n resize: s ? \"none\" : void 0\n },\n className: m\n }\n ),\n l > 0 && /* @__PURE__ */ c(xe, { elementId: f, maxLength: l }),\n !e && /* @__PURE__ */ c(j, { elementId: f, type: \"error\", message: o }),\n !e && /* @__PURE__ */ c(j, { elementId: f, type: \"success\", message: t })\n ] });\n}\nconst k = 8, z = 4, I = 6;\nfunction Ae(n) {\n return { calculatePosition: A(\n (e, o) => {\n const t = e.getBoundingClientRect(), r = o.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, l = (g, b, m, v) => g < 0 || b < 0 || g + m > s.width || b + v > s.height, d = {\n top: {\n x: t.left + t.width / 2 - r.width / 2,\n y: t.top - r.height - z,\n arrow: {\n x: r.width / 2 - I,\n y: r.height\n }\n },\n bottom: {\n x: t.left + t.width / 2 - r.width / 2,\n y: t.bottom + z,\n arrow: {\n x: r.width / 2 - I,\n y: -6\n }\n },\n left: {\n x: t.left - r.width - z,\n y: t.top + t.height / 2 - r.height / 2,\n arrow: {\n x: r.width,\n y: r.height / 2 - I\n }\n },\n right: {\n x: t.right + z,\n y: t.top + t.height / 2 - r.height / 2,\n arrow: {\n x: -6,\n y: r.height / 2 - I\n }\n }\n };\n let u = n, f = d[n];\n if (l(f.x, f.y, r.width, r.height)) {\n const g = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n }, b = d[g[n]];\n if (!l(b.x, b.y, r.width, r.height))\n u = g[n], f = b;\n else {\n const m = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (v) => v !== n && v !== g[n]\n );\n for (const v of m) {\n const h = d[v];\n if (!l(h.x, h.y, r.width, r.height)) {\n u = v, f = h;\n break;\n }\n }\n }\n }\n f.x = Math.max(\n k,\n Math.min(f.x, s.width - r.width - k)\n ), f.y = Math.max(\n k,\n Math.min(f.y, s.height - r.height - k)\n );\n const i = {\n x: t.left + t.width / 2,\n y: t.top + t.height / 2\n };\n return u === \"top\" || u === \"bottom\" ? f.arrow.x = Math.max(\n I,\n Math.min(i.x - f.x - I, r.width - I * 2)\n ) : f.arrow.y = Math.max(\n I,\n Math.min(i.y - f.y - I, r.height - I * 2)\n ), {\n ...f,\n placement: u\n };\n },\n [n]\n ) };\n}\nfunction Ie(n, a, e) {\n const o = B(null), t = B(null), r = A(() => {\n if (!o.current || !t.current) return;\n const s = n(o.current, t.current);\n e(s);\n }, [n, e]);\n return E(() => {\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: t,\n updatePosition: r\n };\n}\nfunction $e(n, a, e, o, t, r, s, l, d) {\n const u = B(null), f = A(() => {\n n || (u.current && clearTimeout(u.current), u.current = window.setTimeout(() => {\n e(!0), requestAnimationFrame(() => {\n t(), o(!0);\n });\n }, a));\n }, [n, a, e, t, o]), i = A(\n (g = !1) => {\n if (u.current && clearTimeout(u.current), g) {\n o(!1), setTimeout(() => e(!1), 150);\n return;\n }\n u.current = window.setTimeout(() => {\n o(!1), setTimeout(() => e(!1), 150);\n }, 100);\n },\n [o, e]\n );\n return E(() => {\n !r && !s && !l && d && i();\n }, [r, s, l, d, i]), E(() => () => {\n u.current && clearTimeout(u.current);\n }, []), {\n showTooltip: f,\n hideTooltip: i,\n timeoutRef: u\n };\n}\nfunction We({\n id: n,\n children: a,\n message: e,\n placement: o = \"top\",\n disabled: t = !1,\n delay: r = 200,\n className: s\n}) {\n const [l, d] = x(!1), [u, f] = x(!1), [i, g] = x(null), [b, m] = x(!1), [v, h] = x(!1), [y, p] = x(!1), { calculatePosition: C } = Ae(o), { triggerRef: D, tooltipRef: F, updatePosition: S } = Ie(C, u, g), { showTooltip: L, hideTooltip: R, timeoutRef: W } = $e(\n t,\n r,\n f,\n d,\n S,\n b,\n v,\n y,\n l\n ), M = $(), U = n ?? M;\n return /* @__PURE__ */ N(X, { children: [\n T.cloneElement(a, {\n ref: (H) => {\n D.current = H;\n },\n onMouseEnter: () => {\n m(!0), L();\n },\n onMouseLeave: () => {\n m(!1);\n },\n onFocus: () => {\n p(!0), L();\n },\n onBlur: () => {\n p(!1), R(!0);\n },\n onKeyDown: (H) => {\n H.key === \"Escape\" && R(!0);\n },\n \"aria-describedby\": t ? void 0 : U\n }),\n u && Y(\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: F,\n id: U,\n role: \"tooltip\",\n className: w(\n \"fixed z-50 px-2 py-1 text-sm rounded shadow-lg pointer-events-auto transition-all duration-150 ease-out\",\n l ? \"opacity-100\" : \"opacity-0\",\n s\n ),\n style: i ? { left: i.x, top: i.y } : { opacity: 0 },\n onMouseEnter: () => {\n h(!0), W.current && clearTimeout(W.current);\n },\n onMouseLeave: () => {\n h(!1);\n },\n children: e\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n Be as Accordion,\n V as AccordionItem,\n Qe as ActionModal,\n fe as Button,\n le as ButtonLoadingDots,\n je as Checkbox,\n Fe as Clickable,\n Se as Input,\n He as Label,\n qe as Modal,\n Ve as RadioGroup,\n G as RadioGroupItem,\n we as RadioInput,\n Ke as Slot,\n Ge as Textarea,\n We 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"],"names":["n","t","s","w","C","l","e","g","M","le","a","x","E","o","c","de","ue","ce","K","fe","r","d","u","i","N","pe","ge","ve","B","A","qe","f","b","$","m","v","h","y","p","T","D","F","S","L","R","X","Y","q","ie","ActionModal","type","message","cancelText","confirmText","onConfirm","onClose","destructive","title","modalProps","defaultTexts","useMemo","actions","jsx","Modal"],"mappings":";;;AAAA,SAASA,KAAKC,GAAG;AACf,SAAOA,EAAE,OAAO,CAACC,MAAM,OAAOA,KAAK,YAAYA,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,KAAI;AACxE;ACiEA,SAASC,EAAE,EAAE,MAAMC,IAAI,IAAI,OAAOC,IAAI,kBAAkB;AACtD,SAAuBC,gBAAAA,EAAE,OAAO,EAAE,OAAOF,GAAG,QAAQA,GAAG,WAAW,UAAU,SAAS,aAAa,OAAO,8BAA8B,UAA0BE,gBAAAA;AAAAA,IAC/J;AAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,MAAMD;AAAA,MACN,UAAU;AAAA,MACV,UAAU;AAAA,IAChB;AAAA,EACA,GAAK;AACL;AC1EA,SAASE,KAAK,GAAG;AACf,SAAO,EAAE,OAAO,CAAC,MAAM,OAAO,KAAK,YAAY,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,KAAI;AACxE;AAeAC,EAAE,MAAM;AC6GR,SAASC,IAAK;AACZ,QAAM,CAACT,GAAGU,CAAC,IAAIC,EAAE,CAAC;AAClB,SAAOC,EAAE,MAAM;AACb,UAAMN,IAAI,YAAY,MAAM;AAC1B,MAAAI,EAAE,CAACG,OAAOA,IAAI,KAAK,CAAC;AAAA,IACrB,GAAE,GAAG;AACN,WAAO,MAAM,cAAcP,CAAC;AAAA,EAChC,GAAK,CAAA,CAAE,GAAmBQ,gBAAAA,EAAE,OAAO,EAAE,WAAW,iFAAiF,UAAU,CAAC,GAAG,GAAG,CAAC,EAAE,IAAI,CAACR,MAAsBQ,gBAAAA;AAAAA,IAC5K;AAAA,IACA;AAAA,MACE,WAAWX;AAAAA,QACT;AAAA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