@moondreamsdev/dreamer-ui 1.7.7-test.13 → 1.7.7-test.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Toast-BnDLmjXs.cjs +2 -0
- package/dist/Toast-BnDLmjXs.cjs.map +1 -0
- package/dist/{Toast-cdFf2Gbf.js → Toast-Dux71f5k.js} +55 -53
- package/dist/Toast-Dux71f5k.js.map +1 -0
- package/dist/components.cjs.js +1 -1
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +1255 -801
- package/dist/components.esm.js.map +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.esm.js +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 +2 -0
- package/dist/src/components/radiogroup/RadioGroupItem.d.ts +0 -1
- package/dist/src/components/scroll-area/ScrollArea.d.ts +1 -1
- package/dist/src/components/scroll-area/hooks.d.ts +0 -1
- package/dist/src/components/select/Select.d.ts +22 -0
- package/dist/src/components/select/hooks.d.ts +35 -0
- package/dist/src/components/select/index.d.ts +2 -0
- package/dist/src/components/select/variants.d.ts +15 -0
- package/dist/src/components/tabs/TabsContent.d.ts +0 -1
- package/dist/src/components/tabs/TabsContext.d.ts +0 -1
- package/dist/src/components/tabs/TabsList.d.ts +0 -1
- package/dist/src/components/tabs/TabsTrigger.d.ts +0 -1
- package/dist/src/components/tooltip/hooks.d.ts +0 -1
- package/dist/src/hooks/useActionModal.d.ts +0 -1
- package/dist/src/hooks/useToast.d.ts +0 -1
- package/dist/src/symbols/index.d.ts +0 -1
- package/package.json +3 -3
- package/dist/Toast-BabLpwoU.cjs +0 -2
- package/dist/Toast-BabLpwoU.cjs.map +0 -1
- package/dist/Toast-cdFf2Gbf.js.map +0 -1
package/dist/providers.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("react"),x=require("./Toast-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),r=require("react"),x=require("./Toast-BnDLmjXs.cjs");require("react-dom");const g=require("./useToast-CraVIawn.cjs"),b=require("./utils.cjs.js");function y({children:d}){const[e,n]=r.useState(null),m=r.useCallback(t=>new Promise(a=>{n({isOpen:!0,type:"confirm",title:t.title,message:t.message,confirmText:t.confirmText,cancelText:t.cancelText,destructive:t.destructive,resolve:a})}),[]),c=r.useCallback(t=>new Promise(a=>{n({isOpen:!0,type:"alert",title:t.title,message:t.message,confirmText:t.confirmText,destructive:t.destructive,resolve:a})}),[]),i=r.useCallback(()=>{e!=null&&e.resolve&&(e.type==="confirm"?e.resolve(!1):e.resolve()),n(null)},[e]),l=r.useCallback(()=>{e!=null&&e.resolve&&(e.type==="confirm"?e.resolve(!0):e.resolve()),n(null)},[e]),f={confirm:m,alert:c};return o.jsxs(g.ActionModalContext.Provider,{value:f,children:[d,e&&e.type==="alert"&&o.jsx(x.ActionModal,{type:"alert",isOpen:e.isOpen,onClose:i,title:e.title,message:e.message,confirmText:e.confirmText,destructive:e.destructive,onConfirm:l,className:"bg-white dark:bg-gray-800 rounded-lg"}),e&&e.type==="confirm"&&o.jsx(x.ActionModal,{type:"confirm",isOpen:e.isOpen,onClose:i,title:e.title,message:e.message,confirmText:e.confirmText,cancelText:e.cancelText,destructive:e.destructive,onConfirm:l,className:"bg-white dark:bg-gray-800 rounded-lg"})]})}const C={"top-right":"top-4 right-4","top-left":"top-4 left-4","bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-center":"top-4 left-1/2 -translate-x-1/2","bottom-center":"bottom-4 left-1/2 -translate-x-1/2"};function h({children:d,customTypes:e,customComponent:n,position:m="top-right",maxToasts:c=5}){const[i,l]=r.useState([]),f=r.useCallback(s=>{const v=`toast-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,u=s.id||v,T={id:u,title:s.title,description:s.description,type:s.type||"info",action:s.action,duration:s.duration??5e3};return l(p=>[T,...p].slice(0,c)),u},[c]),t=r.useCallback(s=>{l(v=>v.filter(u=>u.id!==s))},[]),a={addToast:f,removeToast:t,toasts:i};return o.jsxs(g.ToastContext.Provider,{value:a,children:[d,o.jsx("div",{className:b.join("fixed z-50 pointer-events-none max-w-sm w-full space-y-2",C[m]),role:"region","aria-label":"Notifications",children:i.map(s=>o.jsx("div",{className:"pointer-events-auto",children:o.jsx(x.Toast,{...s,onRemove:t,customTypes:e,customComponent:n})},s.id))})]})}exports.ActionModalProvider=y;exports.ToastProvider=h;
|
|
2
2
|
//# sourceMappingURL=providers.cjs.js.map
|
package/dist/providers.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as g, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useState as x, useCallback as s } from "react";
|
|
3
|
-
import { A as v, T as y } from "./Toast-
|
|
3
|
+
import { A as v, T as y } from "./Toast-Dux71f5k.js";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
import { A as b, T as C } from "./useToast-CEKvEJVB.js";
|
|
6
6
|
import { join as w } from "./utils.esm.js";
|
|
@@ -9,6 +9,8 @@ export * from './modal';
|
|
|
9
9
|
export * from './pagination';
|
|
10
10
|
export * from './panel';
|
|
11
11
|
export * from './radiogroup';
|
|
12
|
+
export * from './scroll-area';
|
|
13
|
+
export * from './select';
|
|
12
14
|
export * from './separator';
|
|
13
15
|
export * from './skeleton';
|
|
14
16
|
export * from './slider';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export interface ScrollAreaProps {
|
|
2
|
+
export interface ScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
/** Custom CSS classes for the root container. Use this to set width/height */
|
|
4
4
|
className?: string;
|
|
5
5
|
/** Custom CSS classes for the scroll thumb */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectOption } from './hooks';
|
|
3
|
+
import { SelectSize } from './variants';
|
|
4
|
+
export type { SelectOption };
|
|
5
|
+
export interface SelectProps {
|
|
6
|
+
options: SelectOption[];
|
|
7
|
+
value?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
searchable?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
clearable?: boolean;
|
|
12
|
+
size?: SelectSize;
|
|
13
|
+
className?: string;
|
|
14
|
+
triggerClassName?: string;
|
|
15
|
+
dropdownClassName?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
18
|
+
onChange?: (value: string) => void;
|
|
19
|
+
onSearch?: (searchTerm: string) => void;
|
|
20
|
+
searchPlaceholder?: string;
|
|
21
|
+
}
|
|
22
|
+
export default function Select({ options, value, placeholder, searchable, disabled, clearable, size, className, triggerClassName, dropdownClassName, id, ref, onChange, onSearch, searchPlaceholder, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
text: string;
|
|
4
|
+
value: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function useSelectDropdown(isOpen: boolean): {
|
|
9
|
+
show: boolean;
|
|
10
|
+
shouldRender: boolean;
|
|
11
|
+
};
|
|
12
|
+
interface UseSelectKeyboardNavigationProps {
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
setIsOpen: (open: boolean) => void;
|
|
15
|
+
filteredOptions: SelectOption[];
|
|
16
|
+
highlightedIndex: number;
|
|
17
|
+
setHighlightedIndex: (index: number) => void;
|
|
18
|
+
onSelect: (option: SelectOption) => void;
|
|
19
|
+
triggerRef: RefObject<HTMLButtonElement | null>;
|
|
20
|
+
}
|
|
21
|
+
export declare function useSelectKeyboardNavigation({ isOpen, setIsOpen, filteredOptions, highlightedIndex, setHighlightedIndex, onSelect, triggerRef, }: UseSelectKeyboardNavigationProps): {
|
|
22
|
+
handleKeyDown: (e: React.KeyboardEvent) => void;
|
|
23
|
+
};
|
|
24
|
+
interface UseSelectHighlightProps {
|
|
25
|
+
isOpen: boolean;
|
|
26
|
+
filteredOptions: SelectOption[];
|
|
27
|
+
selectedOption?: SelectOption;
|
|
28
|
+
shouldRender: boolean;
|
|
29
|
+
optionsContainerRef: RefObject<HTMLDivElement | null>;
|
|
30
|
+
}
|
|
31
|
+
export declare function useSelectHighlight({ isOpen, filteredOptions, selectedOption, shouldRender, optionsContainerRef, }: UseSelectHighlightProps): {
|
|
32
|
+
highlightedIndex: number;
|
|
33
|
+
setHighlightedIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const sizeVariants: {
|
|
2
|
+
readonly sm: {
|
|
3
|
+
readonly trigger: "px-2 py-1 text-sm";
|
|
4
|
+
readonly options: "px-2 py-2 text-xs";
|
|
5
|
+
};
|
|
6
|
+
readonly md: {
|
|
7
|
+
readonly trigger: "px-3 py-2 text-base";
|
|
8
|
+
readonly options: "px-3 py-2.5 text-sm";
|
|
9
|
+
};
|
|
10
|
+
readonly lg: {
|
|
11
|
+
readonly trigger: "px-4 py-3 text-lg";
|
|
12
|
+
readonly options: "px-4 py-3 text-base";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type SelectSize = keyof typeof sizeVariants;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moondreamsdev/dreamer-ui",
|
|
3
|
-
"version": "1.7.7-test.
|
|
3
|
+
"version": "1.7.7-test.15",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"bin": {
|
|
16
|
-
"dreamer-ui-init": "
|
|
16
|
+
"dreamer-ui-init": "dist/init.js"
|
|
17
17
|
},
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"license": "MIT",
|
|
60
60
|
"repository": {
|
|
61
61
|
"type": "git",
|
|
62
|
-
"url": "https://github.com/xFallingDuskx/Dreamer-UI.git"
|
|
62
|
+
"url": "git+https://github.com/xFallingDuskx/Dreamer-UI.git"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"dev": "vite",
|
package/dist/Toast-BabLpwoU.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),a=require("react"),I=require("react-dom"),g=require("./X-CgjeP2OI.cjs"),S=require("./utils.cjs.js");function h(...e){return e.filter(n=>typeof n=="string"&&n).join(" ").trim()||void 0}function M({size:e=15,color:n="currentColor",className:l="inline",...r}){return t.jsx("svg",{...r,width:e,height:e,className:l,viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"})})}function y(...e){return e.filter(n=>typeof n=="string"&&n).join(" ").trim()||void 0}a.createContext(void 0);a.createContext(null);a.createContext(null);function O(){const[e,n]=a.useState(0);return a.useEffect(()=>{const l=setInterval(()=>{n(r=>(r+1)%3)},500);return()=>clearInterval(l)},[]),t.jsx("div",{className:"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle",children:[0,1,2].map(l=>t.jsx("div",{className:h("rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current",e===l&&"transform -translate-y-1")},l))})}const $={base:"",primary:"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",tertiary:"text-primary hover:text-primary-foreground disabled:text-muted",outline:"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",link:"underline-offset-4 hover:underline disabled:underline disabled:text-muted",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"},V={stripped:"",fitted:"size-fit",sm:"px-2 py-1 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",icon:"p-1 w-fit aspect-square",full:"p-2 w-full"},D={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},p={variant:"primary",size:"md",rounded:"md"};function H({variant:e=p.variant,size:n,rounded:l=p.rounded,loading:r,linkTo:s,linkProps:i,type:o="button",className:c,...d}){let u;e==="link"&&!n?u="fitted":u=n||p.size;const m=h("appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",$[e],V[u],D[l],r&&"relative pointer-events-none",s&&"relative",c);return t.jsxs("button",{...d,role:s?"link":d.role,"aria-label":d["aria-label"]||(i==null?void 0:i["aria-label"]),"aria-description":d["aria-description"]||(i==null?void 0:i["aria-description"]),"aria-disabled":d.disabled||r,"aria-busy":r,type:o,className:m,children:[r&&t.jsx(O,{}),t.jsx("span",{className:h(r&&"invisible"),children:d.children}),s&&!d.disabled&&t.jsx("a",{...i,"aria-hidden":!0,href:s,rel:(i==null?void 0:i.rel)||"noreferrer",className:"absolute inset-0"})]})}function P(e){const[n,l]=a.useState(!1),[r,s]=a.useState(!1);return a.useEffect(()=>{e?(s(!0),setTimeout(()=>l(!0),10)):(l(!1),setTimeout(()=>s(!1),150))},[e]),{show:n,shouldRender:r}}function X(e,n){a.useEffect(()=>{const l=r=>{r.key==="Escape"&&e&&n()};return document.addEventListener("keydown",l),e&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",l),document.body.style.overflow="auto"}},[e,n])}function F(e,n){const l=a.useRef(null),r=a.useCallback(()=>{const s=document.getElementById(e);if(!s)return;const i=s.querySelectorAll('[data-modal-action="true"]');if(i.length>0){i[0].focus();return}const o=s.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(o.length>0){const c=Array.from(o).filter(d=>!(d instanceof HTMLButtonElement&&d.getAttribute("data-modal-close-button")==="true"));if(c.length>0){c[0].focus();return}o[0].focus();return}s.focus()},[e]);a.useEffect(()=>(n&&(l.current=document.activeElement,r()),()=>{document.body.style.overflow="auto",l.current instanceof HTMLElement&&l.current.focus()}),[n,r])}function J({id:e,isOpen:n,onClose:l,title:r,children:s,contentOnly:i=!1,className:o,overlayClassName:c,hideCloseButton:d=!1,actions:u=[],disableCloseOnOverlayClick:m=!1,ariaLabelledBy:f,ariaDescribedBy:b}){const x=a.useId(),j=e||`modal-${x}`,w=e?`${e}-title`:`modal-title-${x}`,{show:C,shouldRender:v}=P(n);if(F(j,v),X(v,l),!v)return null;const E=()=>r?a.isValidElement(r)?t.jsx("div",{className:"mb-4",children:r}):t.jsx("h2",{className:"mb-4 text-xl font-semibold",id:w,children:r}):null,T=()=>u.length===0?null:t.jsx("div",{className:"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3",children:u.map((z,L)=>{const{label:A,className:q,...B}=z;return t.jsx(H,{className:q,type:"button",...B,"data-modal-action":"true",children:A},L)})});return t.jsx(t.Fragment,{children:I.createPortal(t.jsx("div",{"aria-labelledby":f??r?w:void 0,"aria-describedby":b,role:"dialog","aria-modal":"true",className:"fixed inset-0 z-[100] overflow-y-auto",children:t.jsxs("div",{className:"flex min-h-screen items-center justify-center p-4",children:[t.jsx("div",{className:y("fixed inset-0 bg-black/20 transition-all",c),onClick:()=>{m||l()}}),i&&t.jsx("div",{className:y("relative w-fit",o),children:s}),!i&&t.jsxs("div",{id:j,tabIndex:-1,className:y("relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",C?"opacity-100 scale-100":"opacity-0 scale-90",o),children:[!d&&t.jsx("button",{type:"button",onClick:l,"data-modal-close-button":"true",className:"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",children:t.jsx(M,{size:18})}),E(),s,T()]})]})}),document.body)})}function K({type:e,message:n,cancelText:l,confirmText:r,onConfirm:s,onClose:i,destructive:o=!1,title:c,...d}){const u=a.useMemo(()=>e==="confirm"?{confirm:r||"Confirm",cancel:l||"Cancel",defaultTitle:c||"Confirm Action"}:{confirm:r||"OK",cancel:null,defaultTitle:c||"Alert"},[e,r,c,l]),m=a.useMemo(()=>[...u.cancel?[{label:u.cancel,variant:"secondary",onClick:i}]:[],{label:u.confirm,variant:o?"destructive":"primary",onClick:()=>{s==null||s(),i()}}],[u,o,s,i]);return t.jsx(J,{...d,title:c||u.defaultTitle,onClose:i,actions:m,disableCloseOnOverlayClick:e==="confirm",hideCloseButton:e==="confirm",children:typeof n=="string"?t.jsx("p",{className:"text-sm",children:n}):n})}const N=a.createContext(null),R=()=>{const e=a.useContext(N);if(!e)throw new Error("Tabs components must be used within a Tabs component");return e},k={info:{className:"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",icon:t.jsx(g.InfoCircled,{size:20})},warning:{className:"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",icon:t.jsx(g.ExclamationTriangle,{size:20})},error:{className:"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",icon:t.jsx(g.CrossCircled,{size:20})}};function Z({id:e,title:n,description:l,type:r="info",action:s,duration:i=5e3,onRemove:o,customTypes:c,customComponent:d}){const[u,m]=a.useState(!1),f=a.useCallback(()=>{m(!0),setTimeout(()=>{o==null||o(e)},150)},[e,o]);if(a.useEffect(()=>{if(i>0){const x=setTimeout(()=>{f()},i);return()=>clearTimeout(x)}},[i,e,o,f]),d)return t.jsx(d,{id:e,title:n,description:l,type:r,action:s,duration:i,onRemove:o});const b=(c==null?void 0:c[r])||k[r]||k.info;return t.jsxs("div",{role:r==="error"?"alert":"status","aria-live":r==="error"?void 0:"polite",className:S.join("relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",s&&"pb-3",b.className,u?"opacity-0 translate-x-full":"opacity-100 translate-x-0"),children:[t.jsx("div",{className:"flex-shrink-0 mr-3",children:b.icon}),t.jsxs("div",{className:"flex-grow min-w-0",children:[t.jsx("div",{className:"font-medium text-sm leading-5",children:n}),l&&t.jsx("div",{className:"mt-1 text-sm opacity-90 leading-5",children:l}),s&&t.jsx("div",{className:"mt-1.5",children:t.jsx("button",{onClick:s.onClick,className:"text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer",children:s.label})})]}),t.jsx("button",{onClick:f,className:"flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0",children:t.jsx(g.X,{size:16})})]})}exports.ActionModal=K;exports.TabsContext=N;exports.Toast=Z;exports.n=h;exports.useTabsContext=R;
|
|
2
|
-
//# sourceMappingURL=Toast-BabLpwoU.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toast-BabLpwoU.cjs","sources":["utils.esm.js","X-CIoyLewf.js","Toast-Cvlzqd59.js","components.esm.js","../src/components/actionmodal/ActionModal.tsx","../src/components/tabs/TabsContext.tsx","../src/components/toast/Toast.tsx"],"sourcesContent":["function n(...t) {\n return t.filter((s) => typeof s == \"string\" && s).join(\" \").trim() || void 0;\n}\nexport {\n n as join\n};\n//# sourceMappingURL=utils.esm.js.map\n","import { jsx as e } from \"react/jsx-runtime\";\nfunction t({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction o({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction d({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction h({ size: C = 15, color: l = \"currentColor\", className: n = \"inline\", ...i }) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nexport {\n t as C,\n o as E,\n d as I,\n h as X\n};\n//# sourceMappingURL=X-CIoyLewf.js.map\n","import { jsx as r, Fragment as $, jsxs as f } from \"react/jsx-runtime\";\nimport q, { createContext as k, useId as V, useState as p, useEffect as b, useRef as H, useCallback as z, useMemo as E, useContext as P } from \"react\";\nimport { createPortal as D } from \"react-dom\";\nimport { X as F, C as J, E as K, I as X } from \"./X-CIoyLewf.js\";\nimport { join as Z } from \"./utils.esm.js\";\nfunction w(...e) {\n return e.filter((n) => typeof n == \"string\" && n).join(\" \").trim() || void 0;\n}\nfunction G({ size: e = 15, color: n = \"currentColor\", className: l = \"inline\", ...t }) {\n return /* @__PURE__ */ r(\n \"svg\",\n {\n ...t,\n width: e,\n height: e,\n className: l,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ r(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: n,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction y(...e) {\n return e.filter((n) => typeof n == \"string\" && n).join(\" \").trim() || void 0;\n}\nk(void 0);\nk(null);\nfunction Q() {\n const [e, n] = p(0);\n return b(() => {\n const l = setInterval(() => {\n n((t) => (t + 1) % 3);\n }, 500);\n return () => clearInterval(l);\n }, []), /* @__PURE__ */ r(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((l) => /* @__PURE__ */ r(\n \"div\",\n {\n className: w(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n e === l && \"transform -translate-y-1\"\n )\n },\n l\n )) });\n}\nconst R = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, U = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, W = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, x = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction Y({\n variant: e = x.variant,\n size: n,\n rounded: l = x.rounded,\n loading: t,\n linkTo: i,\n linkProps: a,\n type: o = \"button\",\n className: d,\n ...s\n}) {\n let c;\n e === \"link\" && !n ? c = \"fitted\" : c = n || x.size;\n const u = w(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n R[e],\n U[c],\n W[l],\n t && \"relative pointer-events-none\",\n i && \"relative\",\n d\n );\n return /* @__PURE__ */ f(\n \"button\",\n {\n ...s,\n role: i ? \"link\" : s.role,\n \"aria-label\": s[\"aria-label\"] || (a == null ? void 0 : a[\"aria-label\"]),\n \"aria-description\": s[\"aria-description\"] || (a == null ? void 0 : a[\"aria-description\"]),\n \"aria-disabled\": s.disabled || t,\n \"aria-busy\": t,\n type: o,\n className: u,\n children: [\n t && /* @__PURE__ */ r(Q, {}),\n /* @__PURE__ */ r(\"span\", { className: w(t && \"invisible\"), children: s.children }),\n i && !s.disabled && /* @__PURE__ */ r(\n \"a\",\n {\n ...a,\n \"aria-hidden\": !0,\n href: i,\n rel: (a == null ? void 0 : a.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction _(e) {\n const [n, l] = p(!1), [t, i] = p(!1);\n return b(() => {\n e ? (i(!0), setTimeout(() => l(!0), 10)) : (l(!1), setTimeout(() => i(!1), 150));\n }, [e]), { show: n, shouldRender: t };\n}\nfunction ee(e, n) {\n b(() => {\n const l = (t) => {\n t.key === \"Escape\" && e && n();\n };\n return document.addEventListener(\"keydown\", l), e && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", l), document.body.style.overflow = \"auto\";\n };\n }, [e, n]);\n}\nfunction te(e, n) {\n const l = H(null), t = z(() => {\n const i = document.getElementById(e);\n if (!i) return;\n const a = i.querySelectorAll('[data-modal-action=\"true\"]');\n if (a.length > 0) {\n a[0].focus();\n return;\n }\n const o = i.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (o.length > 0) {\n const d = Array.from(o).filter((s) => !(s instanceof HTMLButtonElement && s.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (d.length > 0) {\n d[0].focus();\n return;\n }\n o[0].focus();\n return;\n }\n i.focus();\n }, [e]);\n b(() => (n && (l.current = document.activeElement, t()), () => {\n document.body.style.overflow = \"auto\", l.current instanceof HTMLElement && l.current.focus();\n }), [n, t]);\n}\nfunction re({\n id: e,\n isOpen: n,\n onClose: l,\n title: t,\n children: i,\n contentOnly: a = !1,\n className: o,\n overlayClassName: d,\n hideCloseButton: s = !1,\n actions: c = [],\n disableCloseOnOverlayClick: u = !1,\n ariaLabelledBy: m,\n ariaDescribedBy: g\n}) {\n const h = V(), N = e || `modal-${h}`, C = e ? `${e}-title` : `modal-title-${h}`, { show: L, shouldRender: v } = _(n);\n if (te(N, v), ee(v, l), !v) return null;\n const j = () => t ? q.isValidElement(t) ? /* @__PURE__ */ r(\"div\", { className: \"mb-4\", children: t }) : /* @__PURE__ */ r(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: C, children: t }) : null, A = () => c.length === 0 ? null : /* @__PURE__ */ r(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: c.map((I, B) => {\n const { label: O, className: M, ...S } = I;\n return /* @__PURE__ */ r(Y, { className: M, type: \"button\", ...S, \"data-modal-action\": \"true\", children: O }, B);\n }) });\n return /* @__PURE__ */ r($, { children: D(\n /* @__PURE__ */ r(\n \"div\",\n {\n \"aria-labelledby\": m ?? t ? C : void 0,\n \"aria-describedby\": g,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ f(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ r(\n \"div\",\n {\n className: y(\"fixed inset-0 bg-black/20 transition-all\", d),\n onClick: () => {\n u || l();\n }\n }\n ),\n a && /* @__PURE__ */ r(\"div\", { className: y(\"relative w-fit\", o), children: i }),\n !a && /* @__PURE__ */ f(\n \"div\",\n {\n id: N,\n tabIndex: -1,\n className: y(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n L ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n o\n ),\n children: [\n !s && /* @__PURE__ */ r(\n \"button\",\n {\n type: \"button\",\n onClick: l,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ r(G, { size: 18 })\n }\n ),\n j(),\n i,\n A()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction de({\n type: e,\n message: n,\n cancelText: l,\n confirmText: t,\n onConfirm: i,\n onClose: a,\n destructive: o = !1,\n title: d,\n ...s\n}) {\n const c = E(() => e === \"confirm\" ? {\n confirm: t || \"Confirm\",\n cancel: l || \"Cancel\",\n defaultTitle: d || \"Confirm Action\"\n } : {\n confirm: t || \"OK\",\n cancel: null,\n defaultTitle: d || \"Alert\"\n }, [e, t, d, l]), u = E(\n () => [\n ...c.cancel ? [\n {\n label: c.cancel,\n variant: \"secondary\",\n onClick: a\n }\n ] : [],\n {\n label: c.confirm,\n variant: o ? \"destructive\" : \"primary\",\n onClick: () => {\n i == null || i(), a();\n }\n }\n ],\n [c, o, i, a]\n );\n return /* @__PURE__ */ r(\n re,\n {\n ...s,\n title: d || c.defaultTitle,\n onClose: a,\n actions: u,\n disableCloseOnOverlayClick: e === \"confirm\",\n hideCloseButton: e === \"confirm\",\n children: typeof n == \"string\" ? /* @__PURE__ */ r(\"p\", { className: \"text-sm\", children: n }) : n\n }\n );\n}\nconst ne = k(null), ce = () => {\n const e = P(ne);\n if (!e)\n throw new Error(\"Tabs components must be used within a Tabs component\");\n return e;\n}, T = {\n info: {\n className: \"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100\",\n icon: /* @__PURE__ */ r(X, { size: 20 })\n },\n warning: {\n className: \"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100\",\n icon: /* @__PURE__ */ r(K, { size: 20 })\n },\n error: {\n className: \"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100\",\n icon: /* @__PURE__ */ r(J, { size: 20 })\n }\n};\nfunction ue({\n id: e,\n title: n,\n description: l,\n type: t = \"info\",\n action: i,\n duration: a = 5e3,\n onRemove: o,\n customTypes: d,\n customComponent: s\n}) {\n const [c, u] = p(!1), m = z(() => {\n u(!0), setTimeout(() => {\n o == null || o(e);\n }, 150);\n }, [e, o]);\n if (b(() => {\n if (a > 0) {\n const h = setTimeout(() => {\n m();\n }, a);\n return () => clearTimeout(h);\n }\n }, [a, e, o, m]), s)\n return /* @__PURE__ */ r(\n s,\n {\n id: e,\n title: n,\n description: l,\n type: t,\n action: i,\n duration: a,\n onRemove: o\n }\n );\n const g = (d == null ? void 0 : d[t]) || T[t] || T.info;\n return /* @__PURE__ */ f(\n \"div\",\n {\n role: t === \"error\" ? \"alert\" : \"status\",\n \"aria-live\": t === \"error\" ? void 0 : \"polite\",\n className: Z(\n \"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out\",\n i && \"pb-3\",\n g.className,\n c ? \"opacity-0 translate-x-full\" : \"opacity-100 translate-x-0\"\n ),\n children: [\n /* @__PURE__ */ r(\"div\", { className: \"flex-shrink-0 mr-3\", children: g.icon }),\n /* @__PURE__ */ f(\"div\", { className: \"flex-grow min-w-0\", children: [\n /* @__PURE__ */ r(\"div\", { className: \"font-medium text-sm leading-5\", children: n }),\n l && /* @__PURE__ */ r(\"div\", { className: \"mt-1 text-sm opacity-90 leading-5\", children: l }),\n i && /* @__PURE__ */ r(\"div\", { className: \"mt-1.5\", children: /* @__PURE__ */ r(\n \"button\",\n {\n onClick: i.onClick,\n className: \"text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer\",\n children: i.label\n }\n ) })\n ] }),\n /* @__PURE__ */ r(\n \"button\",\n {\n onClick: m,\n className: \"flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0\",\n children: /* @__PURE__ */ r(F, { size: 16 })\n }\n )\n ]\n }\n );\n}\nexport {\n de as A,\n ue as T,\n ne as a,\n w as n,\n ce as u\n};\n//# sourceMappingURL=Toast-Cvlzqd59.js.map\n","import { jsxs as C, jsx as c, Fragment as O } from \"react/jsx-runtime\";\nimport j, { useId as z, useState as A, createElement as le, useEffect as $, useCallback as I, useMemo as ee, useRef as F, isValidElement as ue, cloneElement as fe } from \"react\";\nimport { join as w } from \"./utils.esm.js\";\nimport { d as me, C as be, a as he, g as pe, E as ge, Q as ve, b as ye, e as we, f as xe, c as Ne } from \"./QuestionMarkCircled-CY81euqP.js\";\nimport { n as L, a as Ee, u as te } from \"./Toast-Cvlzqd59.js\";\nimport { A as Rt, T as zt } from \"./Toast-Cvlzqd59.js\";\nimport { E as Ce, X as ce } from \"./X-CIoyLewf.js\";\nimport { createPortal as re } from \"react-dom\";\nfunction Z({\n id: n,\n title: o,\n content: t,\n children: a,\n className: e = \"\",\n disabled: r = !1,\n isOpen: s = !1,\n onToggle: i,\n triggerClassName: u = \"\",\n bodyClassName: d = \"\"\n}) {\n const m = z(), l = n || `accordion-item-${m}`, g = `${l}-header`, f = `${l}-panel`, b = () => {\n !r && i && i();\n }, v = (h) => {\n (h.key === \"Enter\" || h.key === \" \") && (h.preventDefault(), b());\n };\n return /* @__PURE__ */ C(\"div\", { className: w(\"border-b border-gray-200\", r && \"opacity-60 cursor-not-allowed\", e), children: [\n /* @__PURE__ */ C(\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 u\n ),\n \"aria-expanded\": s,\n \"aria-controls\": f,\n disabled: r,\n onClick: b,\n onKeyDown: v,\n children: [\n /* @__PURE__ */ c(\"span\", { children: o }),\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(me, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: f,\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 d\n ),\n children: s && (a || t)\n }\n )\n ] });\n}\nfunction dt({\n id: n,\n items: o = [],\n children: t,\n className: a = \"\",\n itemClassName: e = \"\",\n allowMultiple: r = !1,\n defaultOpenItems: s = [],\n triggersClassName: i = \"\",\n bodiesClassName: u = \"\"\n}) {\n const d = z(), m = n || `accordion-group-${d}`, [l, g] = A(new Set(s)), f = (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 }, b = (h) => `${d}-item-${h}`, v = (h) => l.has(h);\n return /* @__PURE__ */ C(\"div\", { id: m, className: a, children: [\n o.length > 0 && o.map((h, y) => {\n const p = h.id || b(y);\n return /* @__PURE__ */ c(\n Z,\n {\n id: p,\n title: h.title,\n content: h.content,\n disabled: h.disabled,\n isOpen: v(p),\n onToggle: () => f(p),\n className: e,\n triggerClassName: i,\n bodyClassName: u\n },\n p\n );\n }),\n o.length === 0 && t && j.Children.map(t, (h, y) => {\n if (j.isValidElement(h) && h.type === Z) {\n const p = h.props.id || b(y);\n return /* @__PURE__ */ le(\n Z,\n {\n ...h.props,\n key: p,\n id: p,\n className: w(e, h.props.className),\n isOpen: v(p),\n onToggle: () => f(p),\n triggerClassName: w(i, h.props.triggerClassName),\n bodyClassName: w(u, h.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction Ae() {\n const [n, o] = A(0);\n return $(() => {\n const t = setInterval(() => {\n o((a) => (a + 1) % 3);\n }, 500);\n return () => clearInterval(t);\n }, []), /* @__PURE__ */ c(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((t) => /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n n === t && \"transform -translate-y-1\"\n )\n },\n t\n )) });\n}\nconst Ie = {\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}, ke = {\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}, Te = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, J = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction $e({\n variant: n = J.variant,\n size: o,\n rounded: t = J.rounded,\n loading: a,\n linkTo: e,\n linkProps: r,\n type: s = \"button\",\n className: i,\n ...u\n}) {\n let d;\n n === \"link\" && !o ? d = \"fitted\" : d = o || J.size;\n const l = w(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n Ie[n],\n ke[d],\n Te[t],\n a && \"relative pointer-events-none\",\n e && \"relative\",\n i\n );\n return /* @__PURE__ */ C(\n \"button\",\n {\n ...u,\n role: e ? \"link\" : u.role,\n \"aria-label\": u[\"aria-label\"] || (r == null ? void 0 : r[\"aria-label\"]),\n \"aria-description\": u[\"aria-description\"] || (r == null ? void 0 : r[\"aria-description\"]),\n \"aria-disabled\": u.disabled || a,\n \"aria-busy\": a,\n type: s,\n className: l,\n children: [\n a && /* @__PURE__ */ c(Ae, {}),\n /* @__PURE__ */ c(\"span\", { className: w(a && \"invisible\"), children: u.children }),\n e && !u.disabled && /* @__PURE__ */ c(\n \"a\",\n {\n ...r,\n \"aria-hidden\": !0,\n href: e,\n rel: (r == null ? void 0 : r.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction De(n) {\n const [o, t] = A(\"\"), a = I((e) => {\n let r = e, s = \"\";\n for (; r && !s; ) {\n const i = window.getComputedStyle(r).backgroundColor;\n i && i !== \"transparent\" && i !== \"rgba(0, 0, 0, 0)\" && (s = i), r = r.parentElement;\n }\n return s || \"transparent\";\n }, []);\n return $(() => {\n const e = document.getElementById(n);\n if (e) {\n const r = a(e.parentElement);\n t(r);\n }\n }, [n, a]), o;\n}\nfunction ut({\n ref: n,\n id: o,\n size: t = 20,\n color: a,\n filled: e = !1,\n rounded: r = !0,\n checked: s = !1,\n onCheckedChange: i,\n disabled: u,\n className: d = \"\",\n ...m\n}) {\n const l = z(), g = ee(() => o || `checkbox-${l}`, [o, l]), f = De(g), [b, v] = A(s);\n $(() => {\n v(s);\n }, [s]);\n const h = () => {\n u || (v(!b), i == null || i(!b));\n }, y = (x) => {\n x.key === \" \" && (x.preventDefault(), h());\n }, p = w(\n \"flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2\",\n r && \"rounded\",\n u && \"opacity-40 cursor-not-allowed\",\n !u && \"cursor-pointer\",\n d\n );\n return /* @__PURE__ */ c(\n \"button\",\n {\n id: g,\n type: \"button\",\n ref: n,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: h,\n \"aria-checked\": b,\n \"aria-disabled\": u,\n onKeyDownCapture: y,\n style: {\n width: t,\n height: t,\n color: a,\n backgroundColor: b && e ? \"currentcolor\" : \"transparent\"\n },\n className: p,\n ...m,\n children: b && /* @__PURE__ */ c(be, { size: t, color: e ? f : void 0 })\n }\n );\n}\nfunction ft({\n children: n,\n className: o,\n linkTo: t,\n linkProps: a,\n onButtonClick: e,\n buttonProps: r,\n ...s\n}) {\n return t && e && console.warn('Clickable: Both \"linkTo\" and \"onButtonClick\" props are provided. Only \"linkTo\" will be used.'), /* @__PURE__ */ C(\"div\", { className: w(\"relative w-fit\", o), ...s, children: [\n n,\n t && /* @__PURE__ */ c(\n \"a\",\n {\n ...a,\n rel: (a == null ? void 0 : a.rel) || \"noreferrer\",\n href: t,\n className: w(\"absolute inset-0\", a == null ? void 0 : a.className)\n }\n ),\n !t && e && /* @__PURE__ */ c(\n \"button\",\n {\n ...r,\n type: \"button\",\n onClick: e,\n className: w(\"absolute inset-0 cursor-pointer\", r == null ? void 0 : r.className)\n }\n )\n ] });\n}\nfunction Q({ elementId: n, type: o, message: t }) {\n return $(() => {\n const a = document.getElementById(n);\n if (a) {\n if (!t && o === \"error\") {\n a.removeAttribute(\"data-error\");\n return;\n }\n if (!t && o === \"success\") {\n a.removeAttribute(\"data-success\");\n return;\n }\n return a.setAttribute(\"aria-describedby\", `${n}-${o}-message`), a.setAttribute(\"aria-invalid\", o === \"error\" ? \"true\" : \"false\"), o === \"error\" && a.setAttribute(\"data-error\", \"true\"), o === \"success\" && a.setAttribute(\"data-success\", \"true\"), () => {\n a.removeAttribute(\"aria-describedby\"), a.removeAttribute(\"aria-invalid\"), a.removeAttribute(\"data-error\"), a.removeAttribute(\"data-success\");\n };\n }\n }, [n, o, t]), t ? /* @__PURE__ */ C(\n \"small\",\n {\n className: w(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start\",\n o === \"error\" && \"text-destructive\",\n o === \"success\" && \"text-success\"\n ),\n role: \"status\",\n children: [\n o === \"error\" ? /* @__PURE__ */ c(Ce, {}) : /* @__PURE__ */ c(he, {}),\n /* @__PURE__ */ c(\"span\", { id: `${n}-${o}-message`, children: t })\n ]\n }\n ) : null;\n}\nconst Le = {\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}, Re = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, ne = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction mt({\n variant: n = ne.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: a,\n successMessage: e,\n type: r = \"text\",\n className: s,\n ...i\n}) {\n const u = z(), [d, m] = A(!1);\n let l = o;\n n === \"outline\" && !o && (l = \"md\"), l = l || ne.rounded;\n const b = w(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n \"file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors\",\n !t && Le[n],\n !t && Re[l],\n r === \"password\" && \"pr-10\",\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ C(\"div\", { className: w(t && \"cursor-text\"), style: { height: i.height, width: i.width }, children: [\n /* @__PURE__ */ C(\"div\", { className: w(r === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ c(\n \"input\",\n {\n ...i,\n id: u,\n type: r === \"password\" && d ? \"text\" : r,\n \"aria-disabled\": i.disabled,\n readOnly: t,\n \"aria-readonly\": t || i[\"aria-readonly\"],\n \"data-error\": a ? !0 : void 0,\n \"data-success\": e ? !0 : void 0,\n className: b\n }\n ),\n r === \"password\" && /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => m(!d),\n className: \"absolute inset-y-0 right-0 px-2 hover:cursor-pointer\",\n \"aria-label\": \"Toggle password visibility\",\n \"data-state\": d ? \"visible\" : \"hidden\",\n children: d ? /* @__PURE__ */ c(pe, { size: 20 }) : /* @__PURE__ */ c(ge, { size: 20 })\n }\n )\n ] }),\n !t && /* @__PURE__ */ c(Q, { elementId: u, type: \"error\", message: a }),\n !t && /* @__PURE__ */ c(Q, { elementId: u, type: \"success\", message: e })\n ] });\n}\nfunction bt({\n display: n = \"inline\",\n width: o = \"fit-content\",\n className: t = \"\",\n required: a,\n helpMessage: e,\n suffix: r,\n htmlFor: s,\n children: i,\n ...u\n}) {\n const d = z(), m = w(\"font-medium\", n, t), l = e ? `${s ?? d}-help` : void 0;\n return /* @__PURE__ */ C(\"div\", { style: { display: n === \"inline\" ? \"inline-flex\" : \"flex\", width: o }, className: \"relative\", children: [\n /* @__PURE__ */ C(\"label\", { className: m, htmlFor: s, ...u, children: [\n i,\n a && /* @__PURE__ */ c(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n e && /* @__PURE__ */ c(\n \"span\",\n {\n className: \"text-gray-500 ml-1 size-fit -translate-y-1/3\",\n \"aria-describedby\": l,\n \"aria-label\": \"Help information\",\n title: e,\n children: /* @__PURE__ */ c(ve, {})\n }\n ),\n e && /* @__PURE__ */ c(\"div\", { id: l, className: \"sr-only\", children: e }),\n r && /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: r })\n ] });\n}\nfunction ze(n) {\n const [o, t] = A(!1), [a, e] = A(!1);\n return $(() => {\n n ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [n]), { show: o, shouldRender: a };\n}\nfunction Ve(n, o) {\n $(() => {\n const t = (a) => {\n a.key === \"Escape\" && n && o();\n };\n return document.addEventListener(\"keydown\", t), n && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [n, o]);\n}\nfunction Be(n, o) {\n const t = F(null), a = I(() => {\n const e = document.getElementById(n);\n if (!e) return;\n const r = e.querySelectorAll('[data-modal-action=\"true\"]');\n if (r.length > 0) {\n r[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const i = Array.from(s).filter((u) => !(u instanceof HTMLButtonElement && u.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (i.length > 0) {\n i[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [n]);\n $(() => (o && (t.current = document.activeElement, a()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, a]);\n}\nfunction ht({\n id: n,\n isOpen: o,\n onClose: t,\n title: a,\n children: e,\n contentOnly: r = !1,\n className: s,\n overlayClassName: i,\n hideCloseButton: u = !1,\n actions: d = [],\n disableCloseOnOverlayClick: m = !1,\n ariaLabelledBy: l,\n ariaDescribedBy: g\n}) {\n const f = z(), b = n || `modal-${f}`, v = n ? `${n}-title` : `modal-title-${f}`, { show: h, shouldRender: y } = ze(o);\n if (Be(b, y), Ve(y, t), !y) return null;\n const p = () => a ? j.isValidElement(a) ? /* @__PURE__ */ c(\"div\", { className: \"mb-4\", children: a }) : /* @__PURE__ */ c(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: v, children: a }) : null, x = () => d.length === 0 ? null : /* @__PURE__ */ c(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: d.map((N, E) => {\n const { label: V, className: k, ...R } = N;\n return /* @__PURE__ */ c($e, { className: k, type: \"button\", ...R, \"data-modal-action\": \"true\", children: V }, E);\n }) });\n return /* @__PURE__ */ c(O, { children: re(\n /* @__PURE__ */ c(\n \"div\",\n {\n \"aria-labelledby\": l ?? a ? 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__ */ C(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: L(\"fixed inset-0 bg-black/20 transition-all\", i),\n onClick: () => {\n m || t();\n }\n }\n ),\n r && /* @__PURE__ */ c(\"div\", { className: L(\"relative w-fit\", s), children: e }),\n !r && /* @__PURE__ */ C(\n \"div\",\n {\n id: b,\n tabIndex: -1,\n className: L(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n h ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !u && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: t,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ c(ce, { size: 18 })\n }\n ),\n p(),\n e,\n x()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nconst Se = {\n link: \"text-primary hover:text-primary-foreground hover:bg-primary/10 aria-current:text-primary-foreground aria-current:bg-primary\",\n outline: \"border border-primary text-primary hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground aria-current:border-primary\",\n filled: \"bg-secondary text-secondary-foreground hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground\"\n}, je = {\n sm: \"px-2 py-1 text-sm min-w-[32px] min-h-8\",\n md: \"px-2 py-1 text-base min-w-[40px] min-h-10\"\n};\nfunction pt({\n page: n,\n pageCount: o = 5,\n maxVisiblePages: t = 5,\n showFirstLast: a = !0,\n onPageChange: e,\n size: r = \"md\",\n variant: s = \"link\",\n className: i,\n ref: u,\n buttonsClassName: d,\n ...m\n}) {\n const l = o === 1 / 0, f = I(() => {\n if (l) return [];\n const N = o, E = Math.min(t, N);\n if (N <= E)\n return Array.from({ length: N }, (q, G) => G + 1);\n const V = Math.floor(E / 2);\n let k = Math.max(1, n - V), R = Math.min(N, k + E - 1);\n return R - k + 1 < E && (k = Math.max(1, R - E + 1), R = Math.min(N, k + E - 1)), Array.from({ length: R - k + 1 }, (q, G) => k + G);\n }, [l, t, n, o])(), b = n > 1, v = l || n < o, h = a && !l, y = a && !l, p = (N) => {\n N >= 1 && (l || N <= o) && e(N);\n }, x = I(() => {\n const N = L(\n \"flex items-center justify-center min-w-fit\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n je[r],\n \"rounded-md\"\n );\n return L(N, Se[s], d);\n }, [s, r, d]);\n return /* @__PURE__ */ C(\n \"nav\",\n {\n ref: u,\n className: L(\"flex items-center justify-center gap-1\", i),\n role: \"navigation\",\n \"aria-label\": \"Pagination\",\n \"data-page\": n,\n \"data-page-count\": l ? \"infinite\" : o,\n ...m,\n children: [\n h && /* @__PURE__ */ C(\n \"button\",\n {\n onClick: () => p(1),\n className: x(),\n disabled: n === 1,\n \"aria-label\": \"Go to first page\",\n children: [\n /* @__PURE__ */ c(ye, { size: r === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: \"First\" })\n ]\n }\n ),\n /* @__PURE__ */ C(\n \"button\",\n {\n onClick: () => p(n - 1),\n className: x(),\n disabled: !b,\n \"aria-label\": \"Go to previous page\",\n children: [\n /* @__PURE__ */ c(we, { size: r === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ c(\"span\", { className: \"ml-1\", children: \"Previous\" })\n ]\n }\n ),\n !l && f.map((N) => /* @__PURE__ */ c(\n \"button\",\n {\n onClick: () => p(N),\n className: L(x(), \"aspect-square\"),\n \"aria-label\": `Go to page ${N}`,\n \"aria-current\": N === n ? !0 : void 0,\n children: N\n },\n N\n )),\n /* @__PURE__ */ C(\n \"button\",\n {\n onClick: () => p(n + 1),\n className: x(),\n disabled: !v,\n \"aria-label\": \"Go to next page\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: \"mr-1\", children: \"Next\" }),\n /* @__PURE__ */ c(xe, { size: r === \"sm\" ? 12 : 15 })\n ]\n }\n ),\n y && /* @__PURE__ */ C(\n \"button\",\n {\n onClick: () => p(o),\n className: x(),\n disabled: n === o,\n \"aria-label\": \"Go to last page\",\n children: [\n /* @__PURE__ */ c(\"span\", { className: \"mr-1\", children: \"Last\" }),\n /* @__PURE__ */ c(Ne, { size: r === \"sm\" ? 12 : 15 })\n ]\n }\n )\n ]\n }\n );\n}\nfunction Fe(n) {\n const [o, t] = A(!1), [a, e] = A(!1);\n return $(() => {\n n ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 300));\n }, [n]), { show: o, shouldRender: a };\n}\nfunction Ge(n, o) {\n $(() => {\n const t = (a) => {\n a.key === \"Escape\" && n && o();\n };\n return document.addEventListener(\"keydown\", t), n && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [n, o]);\n}\nfunction qe(n, o) {\n const t = F(null), a = I(() => {\n const e = document.getElementById(n);\n if (!e) return;\n const r = e.querySelectorAll('[data-panel-action=\"true\"]');\n if (r.length > 0) {\n r[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const i = Array.from(s).filter((u) => !(u instanceof HTMLButtonElement && u.getAttribute(\"data-panel-close-button\") === \"true\"));\n if (i.length > 0) {\n i[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [n]);\n $(() => (o && (t.current = document.activeElement, a()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [o, a]);\n}\nconst He = {\n size: {\n sm: \"max-w-sm\",\n md: \"max-w-md\",\n lg: \"max-w-lg\",\n xl: \"max-w-xl\",\n \"2xl\": \"max-w-2xl\",\n full: \"w-full\",\n screen: \"w-screen\"\n }\n};\nfunction gt({\n ref: n,\n id: o,\n isOpen: t,\n onClose: a,\n title: e,\n children: r,\n footer: s,\n size: i = \"md\",\n className: u,\n overlayClassName: d,\n hideCloseButton: m = !1,\n disableCloseOnOverlayClick: l = !1,\n ariaLabelledBy: g,\n ariaDescribedBy: f\n}) {\n const b = z(), v = o || `panel-${b}`, h = o ? `${o}-title` : `panel-title-${b}`, { show: y, shouldRender: p } = Fe(t);\n if (qe(v, p), Ge(p, a), !p) return null;\n const x = () => e ? j.isValidElement(e) ? /* @__PURE__ */ c(\"div\", { children: e }) : /* @__PURE__ */ c(\"h2\", { className: \"text-2xl font-semibold\", id: h, children: e }) : null, N = () => {\n if (!s) return null;\n if (j.isValidElement(s)) {\n const E = s, V = E.props.className || \"\";\n return j.cloneElement(E, { className: L(\"px-6 py-4\", V) });\n }\n return /* @__PURE__ */ c(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ c(O, { children: re(\n /* @__PURE__ */ C(\n \"div\",\n {\n \"aria-labelledby\": g ?? e ? h : void 0,\n \"aria-describedby\": f,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-hidden\",\n \"data-panel-open\": t,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: L(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n y ? \"opacity-100\" : \"opacity-0\",\n d\n ),\n onClick: () => {\n l || a();\n }\n }\n ),\n /* @__PURE__ */ c(\"div\", { className: \"fixed inset-y-0 right-0 flex max-w-full\", children: /* @__PURE__ */ c(\n \"div\",\n {\n id: v,\n ref: n,\n tabIndex: -1,\n className: L(\n \"relative h-full transform shadow-xl bg-popover transition-transform duration-300 ease-in-out\",\n i !== \"screen\" && \"border-l border-border\",\n He.size[i],\n y ? \"translate-x-0\" : \"translate-x-full\",\n u\n ),\n \"data-panel-size\": i,\n children: /* @__PURE__ */ C(\"div\", { className: \"flex h-full flex-col\", children: [\n e && /* @__PURE__ */ c(\"div\", { className: \"px-6 pt-6\", children: x() }),\n !m && /* @__PURE__ */ c(\n \"button\",\n {\n type: \"button\",\n onClick: a,\n \"data-panel-close-button\": \"true\",\n \"aria-label\": \"Close panel\",\n className: \"rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ c(ce, { size: 18 })\n }\n ),\n /* @__PURE__ */ c(\"div\", { className: L(\"flex-1 overflow-y-auto px-6 pb-6\", e ? \"pt-6\" : \"pt-10\"), children: r }),\n N()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nfunction Me({ itemId: n, checked: o, onChange: t, name: a, disabled: e = !1, className: r = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", i = () => {\n e || t();\n }, u = w(\n s,\n !o && \"hover:border-current/60\",\n !e && \"border-current cursor-pointer\",\n e && \"border-muted/60 cursor-not-allowed\",\n r\n );\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: n,\n role: \"radio\",\n tabIndex: -1,\n \"aria-checked\": o,\n \"aria-disabled\": e,\n \"aria-description\": `Radio button for ${a}`,\n \"aria-labelledby\": `${n}-label`,\n onClick: i,\n className: u,\n style: {\n width: \"1em\",\n height: \"1em\",\n padding: \"0.1em\",\n borderWidth: \"0.06em\"\n },\n children: o && /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\"size-full aspect-square rounded-full\", e && \"bg-muted/60\", !e && \"bg-current\")\n }\n )\n }\n );\n}\nfunction Y({\n value: n,\n children: o,\n className: t = \"\",\n isSelected: a = !1,\n onChange: e,\n disabled: r = !1,\n hideInput: s = !1,\n description: i,\n name: u\n}) {\n const m = `radio-${z()}-${n}`, l = () => {\n r || e == null || e(n);\n };\n return /* @__PURE__ */ C(\n \"div\",\n {\n title: i,\n className: w(\n \"relative flex items-center\",\n t,\n // Uses text color for borders\n s && `p-2 border-2 focus-within:border-dashed focus-within:${r ? \"border-current/50\" : \"border-current/80\"}`,\n s && !a && `border-transparent ${r ? \"\" : \"not-focus-within:hover:border-border/60\"}`,\n s && a && \"border-border\",\n r && \"opacity-60 cursor-not-allowed\"\n ),\n style: {\n gap: \"0.5em\"\n },\n children: [\n !s && /* @__PURE__ */ c(\n Me,\n {\n itemId: m,\n name: u || \"\",\n checked: a,\n onChange: l,\n disabled: r,\n className: w(s && \"\")\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n id: s ? m : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? l : void 0,\n \"aria-checked\": s ? a ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": s ? r : void 0,\n \"aria-description\": s ? i || `Radio button for ${u}` : void 0,\n \"aria-labelledby\": s ? `${m}-label` : void 0,\n className: w(s && \"size-full\", typeof o == \"object\" && \"grow focus:outline-none\"),\n children: /* @__PURE__ */ c(\n \"label\",\n {\n id: `${m}-label`,\n onClick: s ? void 0 : l,\n className: w(r && \"cursor-not-allowed\", !r && \"cursor-pointer\"),\n children: o\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction Pe(n, o) {\n const [t, a] = A(o), [e, r] = A(-1), [s, i] = A(!1), u = I((f, b) => {\n var y;\n const v = f[b];\n v.hasAttribute(\"disabled\") || v.getAttribute(\"aria-disabled\") === \"true\" || ((y = f[b]) == null || y.click(), r(b));\n }, []), d = I(\n (f, b) => {\n var h;\n if (f.preventDefault(), s || !b.length) return;\n const v = o !== -1 ? o : 0;\n (h = b[v]) == null || h.focus(), a(v), o !== -1 && u(b, v);\n },\n [o, s, u]\n ), m = I(\n (f) => {\n var y;\n if (!f.shiftKey)\n return;\n f.preventDefault();\n const b = Array.from(\n document.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter((p) => !p.hasAttribute(\"disabled\") && p.tabIndex >= 0), v = b.findIndex((p) => p.id === n), h = v > 0 ? v - 1 : b.length - 1;\n (y = b[h]) == null || y.focus();\n },\n [n]\n ), l = I(\n (f, b) => {\n var x;\n if (!b.length) return;\n const v = f.target;\n if (!b.some((N) => N.id === v.id)) return;\n const y = t !== -1 ? t : 0;\n let p = y;\n switch (f.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n f.preventDefault(), p = y > 0 ? y - 1 : b.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n f.preventDefault(), p = (y + 1) % b.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n f.preventDefault(), u(b, y);\n return;\n case \"Tab\":\n m(f);\n return;\n default:\n return;\n }\n (x = b[p]) == null || x.focus(), a(p), e !== -1 && u(b, p);\n },\n [t, e, m, u]\n ), g = I(() => {\n const f = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n return f ? Array.from(f.querySelectorAll('[role=\"radio\"]')) : [];\n }, [n]);\n $(() => {\n const f = document.querySelector(`[id=\"${n}\"][role=\"radiogroup\"]`);\n if (!f) return;\n const b = g(), v = (x) => d(x, b), h = (x) => l(x, b), y = () => i(!0), p = () => i(!1);\n return document.addEventListener(\"keydown\", h), f.addEventListener(\"focus\", v), f.addEventListener(\"mousedown\", y), document.addEventListener(\"mouseup\", p), () => {\n document.removeEventListener(\"keydown\", h), f.removeEventListener(\"focus\", v), f.removeEventListener(\"mousedown\", y), document.removeEventListener(\"mouseup\", p);\n };\n }, [n, g, d, l]);\n}\nfunction vt({\n options: n = [],\n value: o,\n onChange: t,\n id: a,\n children: e,\n className: r = \"\",\n childrenClassName: s = \"\",\n hideInputs: i = !1\n}) {\n const u = z(), d = a || `radio-group-${u}`;\n Pe(\n d,\n n.findIndex((l) => l === o)\n );\n const m = ee(() => n.reduce((l, g) => (typeof g == \"string\" ? l.some((f) => f.value === g) || l.push({ label: g, value: g }) : l.push(g), l), []), [n]);\n return /* @__PURE__ */ C(\"div\", { id: d, role: \"radiogroup\", tabIndex: 0, className: w(r, \"focus:outline-none\"), children: [\n m.length > 0 && m.map((l, g) => /* @__PURE__ */ c(\n Y,\n {\n value: l.value,\n isSelected: o === l.value,\n onChange: t,\n name: d,\n disabled: l.disabled,\n description: l.description,\n hideInput: i,\n className: s,\n children: l.label\n },\n `${l.value}-${g}`\n )),\n m.length === 0 && e && j.Children.map(e, (l) => j.isValidElement(l) && l.type === Y ? /* @__PURE__ */ c(\n Y,\n {\n ...l.props,\n className: w(s, l.props.className),\n hideInput: l.props.hideInput || i,\n isSelected: o === l.props.value,\n onChange: t,\n name: d,\n children: l.props.children\n }\n ) : null)\n ] });\n}\nconst Ke = {\n thin: {\n horizontal: \"h-px\",\n vertical: \"w-px\"\n },\n medium: {\n horizontal: \"h-0.5\",\n vertical: \"w-0.5\"\n },\n thick: {\n horizontal: \"h-1\",\n vertical: \"w-1\"\n },\n \"extra-thick\": {\n horizontal: \"h-2\",\n vertical: \"w-2\"\n }\n}, Ue = {\n horizontal: \"w-full\",\n vertical: \"min-h-4 h-full\"\n};\nfunction yt({\n orientation: n = \"horizontal\",\n decorative: o = !1,\n thickness: t = \"thin\",\n className: a,\n ...e\n}) {\n const r = w(\n \"shrink-0 bg-border\",\n Ue[n],\n Ke[t][n],\n a\n );\n return /* @__PURE__ */ c(\n \"div\",\n {\n ...e,\n className: r,\n role: o ? \"presentation\" : \"separator\",\n \"aria-orientation\": o ? void 0 : n,\n \"aria-hidden\": o,\n \"data-orientation\": n,\n \"data-thickness\": t\n }\n );\n}\nconst ae = {\n shape: {\n rectangle: \"rounded-md min-h-1\",\n circle: \"rounded-full aspect-square min-h-1\",\n text: \"rounded-sm min-h-1 h-4\"\n },\n lineSpacing: {\n xs: \"space-y-1\",\n sm: \"space-y-2\",\n md: \"space-y-3\",\n lg: \"space-y-4\",\n xl: \"space-y-6\"\n }\n};\nfunction wt({\n shape: n = \"rectangle\",\n lineSpacing: o = \"sm\",\n className: t,\n lines: a = 1,\n animate: e = !0,\n ref: r,\n ...s\n}) {\n const i = w(\"bg-muted/70\", e && \"animate-pulse\", ae.shape[n], t);\n return a > 1 ? /* @__PURE__ */ c(\n \"div\",\n {\n ref: r,\n className: ae.lineSpacing[o],\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-container\",\n \"data-lines\": a,\n \"data-shape\": n,\n \"data-animate\": e,\n ...s,\n children: Array.from({ length: a }, (u, d) => /* @__PURE__ */ c(\n \"div\",\n {\n className: w(\n i,\n // Make last line shorter for a more natural text appearance\n d === a - 1 && \"w-3/4\"\n ),\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-line\",\n \"data-line-index\": d\n },\n d\n ))\n }\n ) : /* @__PURE__ */ c(\n \"div\",\n {\n ref: r,\n className: i,\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton\",\n \"data-shape\": n,\n \"data-animate\": e,\n ...s\n }\n );\n}\nfunction xt({\n id: n,\n value: o,\n defaultValue: t = 0,\n onValueChange: a,\n min: e = 0,\n max: r = 100,\n step: s = 1,\n disabled: i = !1,\n trackClassName: u,\n rangeClassName: d,\n thumbClassName: m,\n className: l,\n ref: g,\n ariaLabel: f,\n ariaLabelledBy: b,\n ...v\n}) {\n const [h, y] = A(t), p = o !== void 0, x = p ? o : h, N = F(null), E = F(!1), V = F(0), k = I(\n (T) => {\n const D = Math.max(e, Math.min(r, T)), B = Math.round(D / s) * s;\n p || y(B), a == null || a(B);\n },\n [e, r, s, p, a]\n ), R = I(\n (T, D = !1) => {\n var K;\n const B = (K = N.current) == null ? void 0 : K.getBoundingClientRect();\n if (!B) return x;\n let M = T.clientX;\n D && (M = M - V.current);\n const _ = Math.max(0, Math.min(1, (M - B.left) / B.width));\n return e + (r - e) * _;\n },\n [e, r, x]\n ), q = I(\n (T) => {\n if (i || T.target !== T.currentTarget) return;\n const D = R(T);\n k(D);\n },\n [i, R, k]\n ), G = I(\n (T) => {\n var K;\n if (i) return;\n T.stopPropagation(), E.current = !0;\n const D = (K = N.current) == null ? void 0 : K.getBoundingClientRect(), B = T.currentTarget.getBoundingClientRect();\n if (D && B) {\n const P = B.left + B.width / 2;\n V.current = T.clientX - P;\n }\n T.currentTarget.setPointerCapture(T.pointerId);\n const M = (P) => {\n if (!E.current) return;\n const de = R(P, !0);\n k(de);\n }, _ = (P) => {\n if (P.pointerId === T.pointerId) {\n E.current = !1, V.current = 0;\n try {\n T.currentTarget.releasePointerCapture(P.pointerId);\n } catch {\n }\n document.removeEventListener(\"pointermove\", M), document.removeEventListener(\"pointerup\", _);\n }\n };\n document.addEventListener(\"pointermove\", M), document.addEventListener(\"pointerup\", _);\n },\n [i, R, k]\n ), U = I(\n (T) => {\n if (i) return;\n let D = x;\n switch (T.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n D = x + s;\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n D = x - s;\n break;\n case \"Home\":\n D = e;\n break;\n case \"End\":\n D = r;\n break;\n case \"PageUp\":\n D = x + s * 10;\n break;\n case \"PageDown\":\n D = x - s * 10;\n break;\n default:\n return;\n }\n T.preventDefault(), k(D);\n },\n [i, x, s, e, r, k]\n ), H = r === e ? 0 : (x - e) / (r - e) * 100;\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: n,\n ref: g,\n className: L(\n \"relative flex items-center w-full touch-none select-none\",\n i && \"opacity-50 cursor-not-allowed\",\n l\n ),\n \"data-disabled\": i,\n \"data-value\": x,\n \"data-min\": e,\n \"data-max\": r,\n \"data-step\": s,\n ...v,\n children: /* @__PURE__ */ C(\n \"div\",\n {\n ref: N,\n className: L(\n \"relative h-1.5 w-full rounded-full bg-muted cursor-pointer\",\n i && \"cursor-not-allowed\",\n u\n ),\n onPointerDown: q,\n children: [\n /* @__PURE__ */ c(\n \"div\",\n {\n className: L(\n \"absolute h-full rounded-full pointer-events-none\",\n // pointer-events are disabled so that user interactions are handled by the track element, enabling correct slider behavior\n !E.current && \"transition-all\",\n d\n ),\n style: { width: `${H}%` }\n }\n ),\n /* @__PURE__ */ c(\n \"div\",\n {\n className: L(\n \"absolute size-5 -top-2 rounded-full shadow-md cursor-grab\",\n i && \"cursor-not-allowed\",\n !i && \"cursor-grab focus:outline-none focus:ring-2\",\n E.current ? \"cursor-grabbing scale-110\" : \"transition-all\",\n m\n ),\n style: { left: `calc(${H}% - 10px)` },\n tabIndex: i ? -1 : 0,\n role: \"slider\",\n \"aria-valuemin\": e,\n \"aria-valuemax\": r,\n \"aria-valuenow\": x,\n \"aria-label\": f,\n \"aria-labelledby\": b,\n \"aria-disabled\": i,\n onKeyDown: U,\n onPointerDown: G\n }\n )\n ]\n }\n )\n }\n );\n}\nfunction Nt({ children: n, ref: o, ...t }) {\n if (ue(n)) {\n let a = { ...t };\n return n.props && (a = { ...a, ...n.props }), fe(n, {\n ...a,\n ref: (e) => {\n typeof o == \"function\" ? o(e) : o && (o.current = e);\n }\n });\n }\n return le(\"div\", { ...t, ref: o }, n);\n}\nconst _e = ({ defaultValue: n, value: o, onValueChange: t } = {}) => {\n const [a, e] = A(n || \"\"), r = o !== void 0, s = r ? o : a, i = I((u) => {\n r || e(u), t == null || t(u);\n }, [r, t]);\n return {\n value: s,\n onValueChange: i\n };\n};\nfunction Et({\n defaultValue: n,\n value: o,\n onValueChange: t,\n tabsWidth: a = \"fit\",\n variant: e = \"underline\",\n className: r,\n children: s,\n ref: i,\n id: u,\n triggersClassName: d,\n contentClassName: m\n}) {\n const { value: l, onValueChange: g } = _e({\n defaultValue: n,\n value: o,\n onValueChange: t\n }), f = {\n selectedValue: l,\n onValueChange: g,\n tabsWidth: a,\n variant: e,\n triggersClassName: d,\n contentClassName: m\n };\n return /* @__PURE__ */ c(Ee.Provider, { value: f, children: /* @__PURE__ */ c(\"div\", { id: u, ref: i, className: r, \"data-tabs-width\": a, \"data-variant\": e, children: s }) });\n}\nfunction Ct({ value: n, className: o, children: t, ref: a }) {\n const { selectedValue: e, contentClassName: r } = te(), s = e === n;\n return s ? /* @__PURE__ */ c(\n \"div\",\n {\n ref: a,\n role: \"tabpanel\",\n id: `tabs-content-${n}`,\n \"aria-labelledby\": `tabs-trigger-${n}`,\n \"data-state\": s ? \"active\" : \"inactive\",\n \"data-value\": n,\n className: w(\"mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2\", r, o),\n tabIndex: 0,\n children: t\n }\n ) : null;\n}\nconst oe = {\n width: {\n fit: \"w-fit\",\n full: \"w-full *:flex-1\"\n },\n variant: {\n underline: \"border-b border-border\",\n pills: \"\",\n bordered: \"border border-border rounded-lg p-1\"\n }\n}, We = {\n underline: \"border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground\",\n pills: \"rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\",\n bordered: \"rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\"\n};\nfunction At({ children: n, className: o, id: t, ref: a }) {\n const { tabsWidth: e, variant: r } = te();\n return /* @__PURE__ */ c(\n \"div\",\n {\n id: t,\n ref: a,\n role: \"tablist\",\n className: w(\"flex\", oe.width[e], oe.variant[r], o),\n \"data-tabs-width\": e,\n \"data-variant\": r,\n children: n\n }\n );\n}\nfunction It({ value: n, disabled: o = !1, className: t, children: a, onClick: e, id: r, ref: s }) {\n const { selectedValue: i, onValueChange: u, variant: d, triggersClassName: m } = te(), l = i === n, g = (b) => {\n o || u(n), e == null || e(b);\n };\n return /* @__PURE__ */ c(\n \"button\",\n {\n id: r,\n ref: s,\n role: \"tab\",\n type: \"button\",\n \"aria-selected\": l,\n \"aria-controls\": `tabs-content-${n}`,\n \"data-state\": l ? \"active\" : \"inactive\",\n \"data-value\": n,\n disabled: o,\n className: w(\n \"inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n l ? \"font-medium\" : \"font-light\",\n We[d],\n m,\n t\n ),\n onClick: g,\n children: a\n }\n );\n}\nfunction Xe({ elementId: n, maxLength: o }) {\n const [t, a] = A(0);\n return $(() => {\n const e = document.getElementById(n);\n if (!e)\n return;\n const r = () => {\n const s = e.value.length;\n a(s);\n const i = s >= o;\n e.setAttribute(\"aria-describedby\", `${n}-character-count`), e.setAttribute(\"aria-invalid\", i ? \"true\" : \"false\"), i ? e.setAttribute(\"data-error\", \"true\") : e.removeAttribute(\"data-error\");\n };\n return r(), e.addEventListener(\"input\", r), e.setAttribute(\"maxlength\", String(o)), () => {\n e.removeEventListener(\"input\", r), e.removeAttribute(\"maxlength\"), e.removeAttribute(\"aria-describedby\"), e.removeAttribute(\"aria-invalid\"), e.removeAttribute(\"data-error\");\n };\n }, [n, o]), /* @__PURE__ */ c(\n \"small\",\n {\n className: w(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end\",\n t >= o && \"text-destructive\",\n t < o && \"text-current\"\n ),\n role: \"status\",\n children: /* @__PURE__ */ C(\"span\", { id: `${n}-character-count`, children: [\n t,\n \" / \",\n o,\n \" characters\"\n ] })\n }\n );\n}\nfunction Qe(n, o) {\n $(() => {\n const t = document.getElementById(n);\n if (!t)\n return;\n if (!o) {\n t.style.height = \"auto\";\n return;\n }\n const a = () => {\n t.style.height = \"auto\", t.style.height = `${t.scrollHeight}px`;\n };\n return a(), t.addEventListener(\"input\", a), t.addEventListener(\"resize\", a), window.addEventListener(\"resize\", a), () => {\n t.removeEventListener(\"input\", a), t.removeEventListener(\"resize\", a), window.removeEventListener(\"resize\", a);\n };\n }, [n, o]);\n}\nconst Ze = {\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}, Je = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, se = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction kt({\n variant: n = se.variant,\n rounded: o,\n displayOnlyMode: t = !1,\n errorMessage: a,\n successMessage: e,\n hideResizeHandle: r = !1,\n autoExpand: s = !1,\n characterLimit: i = 0,\n className: u,\n ...d\n}) {\n const m = z();\n Qe(m, s || t);\n let l = o;\n n === \"outline\" && !o && (l = \"md\"), l = l || se.rounded;\n let g = r;\n (t || n === \"left-line\" && !r) && (g = !0);\n const b = w(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n !t && Ze[n],\n !t && Je[l],\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n g && \"no-resize-handle\",\n u\n );\n return /* @__PURE__ */ C(\"div\", { className: w(\"-space-y-1.5\", t && \"cursor-text\"), children: [\n /* @__PURE__ */ c(\n \"textarea\",\n {\n ...d,\n id: m,\n \"aria-disabled\": d.disabled,\n readOnly: t,\n \"aria-readonly\": t || d[\"aria-readonly\"],\n style: {\n resize: s ? \"none\" : void 0\n },\n className: b\n }\n ),\n i > 0 && /* @__PURE__ */ c(Xe, { elementId: m, maxLength: i }),\n !t && /* @__PURE__ */ c(Q, { elementId: m, type: \"error\", message: a }),\n !t && /* @__PURE__ */ c(Q, { elementId: m, type: \"success\", message: e })\n ] });\n}\nconst Ye = {\n sm: {\n container: \"h-5 min-w-9 w-9\",\n thumb: \"h-4 w-4\",\n translate: \"translate-x-4\"\n },\n md: {\n container: \"h-6 min-w-11 w-11\",\n thumb: \"h-5 w-5\",\n translate: \"translate-x-5\"\n },\n lg: {\n container: \"h-7 min-w-13 w-13\",\n thumb: \"h-6 w-6\",\n translate: \"translate-x-6\"\n }\n}, Oe = {\n default: {\n unchecked: \"bg-muted\",\n checked: \"bg-primary\"\n },\n success: {\n unchecked: \"bg-muted\",\n checked: \"bg-success\"\n },\n destructive: {\n unchecked: \"bg-muted\",\n checked: \"bg-destructive\"\n }\n}, ie = {\n variant: \"default\",\n size: \"md\"\n};\nfunction Tt({\n ref: n,\n id: o,\n size: t = ie.size,\n variant: a = ie.variant,\n checked: e,\n onCheckedChange: r,\n disabled: s = !1,\n className: i,\n thumbClassName: u,\n backgroundClassNames: d,\n ...m\n}) {\n const l = z(), g = ee(() => o || `toggle-${l}`, [o, l]), [f, b] = A(e);\n $(() => {\n b(e);\n }, [e]);\n const v = () => {\n if (!s) {\n const E = !f;\n e === void 0 && b(E), r == null || r(E);\n }\n }, h = (E) => {\n (E.key === \" \" || E.key === \"Enter\") && (E.preventDefault(), v());\n }, y = Ye[t], p = Oe[a], x = w(\n // Base styles\n \"relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out\",\n \"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2\",\n // Size\n y.container,\n // Variant and state\n f ? (d == null ? void 0 : d.checked) || p.checked : (d == null ? void 0 : d.unchecked) || p.unchecked,\n // Disabled state\n s && \"opacity-50 cursor-not-allowed\",\n !s && \"cursor-pointer\",\n i\n ), N = w(\n // Base thumb styles\n \"absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out\",\n // Size\n y.thumb,\n // Position based on state\n f && y.translate,\n u\n );\n return /* @__PURE__ */ C(\n \"button\",\n {\n ref: n,\n id: g,\n type: \"button\",\n role: \"switch\",\n tabIndex: 0,\n \"aria-checked\": f,\n \"aria-disabled\": s,\n disabled: s,\n onClick: v,\n onKeyDown: h,\n className: x,\n ...m,\n children: [\n /* @__PURE__ */ c(\"span\", { className: N }),\n /* @__PURE__ */ c(\"span\", { className: \"sr-only\", children: f ? \"Enabled\" : \"Disabled\" })\n ]\n }\n );\n}\nconst W = 8, X = 4, S = 6;\nfunction et(n) {\n return { calculatePosition: I(\n (t, a) => {\n const e = t.getBoundingClientRect(), r = a.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, i = (g, f, b, v) => g < 0 || f < 0 || g + b > s.width || f + v > s.height, u = {\n top: {\n x: e.left + e.width / 2 - r.width / 2,\n y: e.top - r.height - X,\n arrow: {\n x: r.width / 2 - S,\n y: r.height\n }\n },\n bottom: {\n x: e.left + e.width / 2 - r.width / 2,\n y: e.bottom + X,\n arrow: {\n x: r.width / 2 - S,\n y: -6\n }\n },\n left: {\n x: e.left - r.width - X,\n y: e.top + e.height / 2 - r.height / 2,\n arrow: {\n x: r.width,\n y: r.height / 2 - S\n }\n },\n right: {\n x: e.right + X,\n y: e.top + e.height / 2 - r.height / 2,\n arrow: {\n x: -6,\n y: r.height / 2 - S\n }\n }\n };\n let d = n, m = u[n];\n if (i(m.x, m.y, r.width, r.height)) {\n const g = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n }, f = u[g[n]];\n if (!i(f.x, f.y, r.width, r.height))\n d = g[n], m = f;\n else {\n const b = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (v) => v !== n && v !== g[n]\n );\n for (const v of b) {\n const h = u[v];\n if (!i(h.x, h.y, r.width, r.height)) {\n d = v, m = h;\n break;\n }\n }\n }\n }\n m.x = Math.max(\n W,\n Math.min(m.x, s.width - r.width - W)\n ), m.y = Math.max(\n W,\n Math.min(m.y, s.height - r.height - W)\n );\n const l = {\n x: e.left + e.width / 2,\n y: e.top + e.height / 2\n };\n return d === \"top\" || d === \"bottom\" ? m.arrow.x = Math.max(\n S,\n Math.min(l.x - m.x - S, r.width - S * 2)\n ) : m.arrow.y = Math.max(\n S,\n Math.min(l.y - m.y - S, r.height - S * 2)\n ), {\n ...m,\n placement: d\n };\n },\n [n]\n ) };\n}\nfunction tt(n, o, t) {\n const a = F(null), e = F(null), r = I(() => {\n if (!a.current || !e.current) return;\n const s = n(a.current, e.current);\n t(s);\n }, [n, t]);\n return $(() => {\n if (!o) return;\n const s = () => r();\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, [o, r]), {\n triggerRef: a,\n tooltipRef: e,\n updatePosition: r\n };\n}\nfunction rt(n, o, t, a, e, r, s, i, u) {\n const d = F(null), m = I(() => {\n n || (d.current && clearTimeout(d.current), d.current = window.setTimeout(() => {\n t(!0), requestAnimationFrame(() => {\n e(), a(!0);\n });\n }, o));\n }, [n, o, t, e, a]), l = I(\n (g = !1) => {\n if (d.current && clearTimeout(d.current), g) {\n a(!1), setTimeout(() => t(!1), 150);\n return;\n }\n d.current = window.setTimeout(() => {\n a(!1), setTimeout(() => t(!1), 150);\n }, 100);\n },\n [a, t]\n );\n return $(() => {\n !r && !s && !i && u && l();\n }, [r, s, i, u, l]), $(() => () => {\n d.current && clearTimeout(d.current);\n }, []), {\n showTooltip: m,\n hideTooltip: l,\n timeoutRef: d\n };\n}\nfunction $t({\n id: n,\n children: o,\n message: t,\n placement: a = \"top\",\n disabled: e = !1,\n delay: r = 200,\n className: s\n}) {\n const [i, u] = A(!1), [d, m] = A(!1), [l, g] = A(null), [f, b] = A(!1), [v, h] = A(!1), [y, p] = A(!1), { calculatePosition: x } = et(a), { triggerRef: N, tooltipRef: E, updatePosition: V } = tt(x, d, g), { showTooltip: k, hideTooltip: R, timeoutRef: q } = rt(\n e,\n r,\n m,\n u,\n V,\n f,\n v,\n y,\n i\n ), G = z(), U = n ?? G;\n return /* @__PURE__ */ C(O, { children: [\n j.cloneElement(o, {\n ref: (H) => {\n N.current = H;\n },\n onMouseEnter: () => {\n b(!0), k();\n },\n onMouseLeave: () => {\n b(!1);\n },\n onFocus: () => {\n p(!0), k();\n },\n onBlur: () => {\n p(!1), R(!0);\n },\n onKeyDown: (H) => {\n H.key === \"Escape\" && R(!0);\n },\n \"aria-describedby\": e ? void 0 : U\n }),\n d && re(\n /* @__PURE__ */ c(\n \"div\",\n {\n ref: E,\n id: U,\n role: \"tooltip\",\n className: w(\n \"fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover pointer-events-auto transition-all duration-150 ease-out\",\n i ? \"opacity-100\" : \"opacity-0\",\n s\n ),\n style: l ? { left: l.x, top: l.y } : { opacity: 0 },\n onMouseEnter: () => {\n h(!0), q.current && clearTimeout(q.current);\n },\n onMouseLeave: () => {\n h(!1);\n },\n children: t\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n dt as Accordion,\n Z as AccordionItem,\n Rt as ActionModal,\n $e as Button,\n Ae as ButtonLoadingDots,\n ut as Checkbox,\n ft as Clickable,\n mt as Input,\n bt as Label,\n ht as Modal,\n pt as Pagination,\n gt as Panel,\n vt as RadioGroup,\n Y as RadioGroupItem,\n Me as RadioInput,\n yt as Separator,\n wt as Skeleton,\n xt as Slider,\n Nt as Slot,\n Et as Tabs,\n Ct as TabsContent,\n At as TabsList,\n It as TabsTrigger,\n kt as Textarea,\n zt as Toast,\n Tt as Toggle,\n $t as Tooltip\n};\n//# sourceMappingURL=components.esm.js.map\n","import { Modal, ModalProps } from '@moondreamsdev/dreamer-ui/components';\nimport React, { useMemo } from 'react';\n\ninterface BaseActionModalProps extends Omit<ModalProps, 'children' | 'actions'> {\n message: React.ReactNode;\n destructive?: boolean;\n}\n\ninterface AlertModalProps extends BaseActionModalProps {\n type: 'alert';\n confirmText?: string;\n onConfirm?: () => void;\n // Cancel-related props are not allowed for alerts\n cancelText?: never;\n}\n\ninterface ConfirmModalProps extends BaseActionModalProps {\n type: 'confirm';\n confirmText?: string;\n cancelText?: string;\n onConfirm?: () => void;\n}\n\nexport type ActionModalProps = AlertModalProps | ConfirmModalProps;\n\nexport function ActionModal({\n type,\n message,\n cancelText,\n confirmText,\n onConfirm,\n onClose,\n destructive = false,\n title,\n ...modalProps\n}: ActionModalProps) {\n const defaultTexts = useMemo(() => {\n if (type === 'confirm') {\n return {\n confirm: confirmText || 'Confirm',\n cancel: cancelText || 'Cancel',\n defaultTitle: title || 'Confirm Action',\n };\n }\n return {\n confirm: confirmText || 'OK',\n cancel: null,\n defaultTitle: title || 'Alert',\n };\n }, [type, confirmText, title, cancelText]);\n\n const actions: ModalProps['actions'] = useMemo(\n () => [\n ...(defaultTexts.cancel\n ? [\n {\n label: defaultTexts.cancel,\n variant: 'secondary' as const,\n onClick: onClose,\n },\n ]\n : []),\n {\n label: defaultTexts.confirm,\n variant: destructive ? 'destructive' : 'primary',\n onClick: () => {\n onConfirm?.();\n onClose();\n },\n },\n ],\n [defaultTexts, destructive, onConfirm, onClose]\n );\n\n return (\n <Modal\n {...modalProps}\n title={title || defaultTexts.defaultTitle}\n onClose={onClose}\n actions={actions}\n disableCloseOnOverlayClick={type === 'confirm'}\n hideCloseButton={type === 'confirm'}\n >\n {typeof message === 'string' ? <p className='text-sm'>{message}</p> : message}\n </Modal>\n );\n}\n","import { createContext, useContext } from 'react';\nimport { TabsVariant, TabsWidth } from './variants';\n\nexport interface TabsContextValue {\n selectedValue: string;\n onValueChange: (value: string) => void;\n tabsWidth: TabsWidth;\n variant: TabsVariant;\n triggersClassName?: string;\n contentClassName?: string;\n}\n\nexport const TabsContext = createContext<TabsContextValue | null>(null);\n\nexport const useTabsContext = () => {\n const context = useContext(TabsContext);\n if (!context) {\n throw new Error('Tabs components must be used within a Tabs component');\n }\n return context;\n};\n","import { ReactNode, useCallback, useEffect, useState } from 'react';\nimport { CrossCircled, ExclamationTriangle, InfoCircled, X } from '../../symbols';\nimport { join } from '../../utils';\nexport type ToastType = 'info' | 'warning' | 'error';\n\nexport interface ToastAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface ToastData {\n id: string;\n title: string;\n description?: string;\n type?: ToastType;\n action?: ToastAction;\n duration?: number;\n onRemove?: (id: string) => void;\n}\n\ninterface ToastProps extends ToastData {\n customTypes?: Record<string, { className: string; icon?: ReactNode }>;\n customComponent?: React.ComponentType<ToastData>;\n}\n\nconst defaultTypeStyles: Record<ToastType, { className: string; icon: ReactNode }> = {\n info: {\n className: 'bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100',\n icon: <InfoCircled size={20} />,\n },\n warning: {\n className:\n 'bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100',\n icon: <ExclamationTriangle size={20} />,\n },\n error: {\n className: 'bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100',\n icon: <CrossCircled size={20} />,\n },\n};\n\nexport function Toast({\n id,\n title,\n description,\n type = 'info',\n action,\n duration = 5000,\n onRemove,\n customTypes,\n customComponent: CustomComponent,\n}: ToastProps) {\n const [isExiting, setIsExiting] = useState(false);\n\n const handleRemove = useCallback(() => {\n setIsExiting(true);\n setTimeout(() => {\n onRemove?.(id);\n }, 150); // Match animation duration\n }, [id, onRemove]);\n\n useEffect(() => {\n if (duration > 0) {\n const timer = setTimeout(() => {\n handleRemove();\n }, duration);\n\n return () => clearTimeout(timer);\n }\n }, [duration, id, onRemove, handleRemove]);\n\n if (CustomComponent) {\n return (\n <CustomComponent\n id={id}\n title={title}\n description={description}\n type={type}\n action={action}\n duration={duration}\n onRemove={onRemove}\n />\n );\n }\n\n // Check custom types first, then fall back to default\n const typeStyle = customTypes?.[type] || defaultTypeStyles[type as ToastType] || defaultTypeStyles.info;\n\n return (\n <div\n role={type === 'error' ? 'alert' : 'status'}\n aria-live={type === 'error' ? undefined : 'polite'}\n className={join(\n 'relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out',\n action && 'pb-3',\n typeStyle.className,\n isExiting ? 'opacity-0 translate-x-full' : 'opacity-100 translate-x-0'\n )}\n >\n {/* Icon */}\n <div className='flex-shrink-0 mr-3'>{typeStyle.icon}</div>\n\n {/* Content */}\n <div className='flex-grow min-w-0'>\n <div className='font-medium text-sm leading-5'>{title}</div>\n {description && <div className='mt-1 text-sm opacity-90 leading-5'>{description}</div>}\n {action && (\n <div className='mt-1.5'>\n <button\n onClick={action.onClick}\n className='text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer'\n >\n {action.label}\n </button>\n </div>\n )}\n </div>\n\n {/* Close button */}\n <button\n onClick={handleRemove}\n className='flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0'\n >\n <X size={16} />\n </button>\n </div>\n );\n}\n"],"names":["n","t","s","h","C","l","i","e","w","k","Ae","o","A","$","a","c","Ie","ke","Te","J","$e","r","u","d","ze","Ve","Be","F","I","ht","g","f","z","b","v","y","p","j","x","N","E","V","R","O","re","L","ce","ActionModal","type","message","cancelText","confirmText","onConfirm","onClose","destructive","title","modalProps","defaultTexts","useMemo","actions","jsx","Modal","TabsContext","createContext","useTabsContext","context","useContext","defaultTypeStyles","InfoCircled","ExclamationTriangle","CrossCircled","Toast","id","description","action","duration","onRemove","customTypes","CustomComponent","isExiting","setIsExiting","useState","handleRemove","useCallback","useEffect","timer","typeStyle","jsxs","join","X"],"mappings":"sJAAA,SAASA,KAAKC,EAAG,CACf,OAAOA,EAAE,OAAQC,GAAM,OAAOA,GAAK,UAAYA,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,GAAI,MACxE,CCgFA,SAASC,EAAE,CAAE,KAAMC,EAAI,GAAI,MAAOC,EAAI,eAAgB,UAAWL,EAAI,SAAU,GAAGM,CAAC,EAAI,CACrF,OAAuBC,EAAC,IACtB,MACA,CACE,GAAGD,EACH,MAAOF,EACP,OAAQA,EACR,UAAWJ,EACX,QAAS,YACT,MAAO,6BACP,SAA0BO,EAAC,IACzB,OACA,CACE,EAAG,0gBACH,KAAMF,EACN,SAAU,UACV,SAAU,SACpB,CACA,CACA,CACG,CACH,CClGA,SAASG,KAAK,EAAG,CACf,OAAO,EAAE,OAAQ,GAAM,OAAO,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