alope-ui 1.2.62 → 1.2.64

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.
@@ -1,6 +1,12 @@
1
- type PaginationProps = {
1
+ import { default as React } from 'react';
2
+ declare const PaginationSizes: {
3
+ readonly sm: "px-3 py-1.5 text-xs font-medium rounded-lg";
4
+ readonly md: "px-3.5 py-2 text-sm font-medium rounded-lg";
5
+ readonly lg: "px-4.5 py-2.5 text-base font-medium rounded-lg";
6
+ };
7
+ export type PaginationProps = {
2
8
  currentPage: number;
3
- format?: 'none' | 'long';
9
+ format?: "none" | "long";
4
10
  count?: number;
5
11
  pageSize?: number;
6
12
  simplified?: boolean;
@@ -13,10 +19,5 @@ type PaginationProps = {
13
19
  nextIcon?: React.ReactNode;
14
20
  size?: keyof typeof PaginationSizes;
15
21
  };
16
- declare const PaginationSizes: {
17
- sm: string;
18
- md: string;
19
- lg: string;
20
- };
21
22
  export declare const Pagination: React.FC<PaginationProps>;
22
23
  export {};
@@ -1,55 +1,52 @@
1
+ import { default as React } from 'react';
1
2
  declare const TabsVariants: {
2
- line: {
3
- wrapper: string;
4
- button: string;
5
- active: string;
6
- inactive: string;
3
+ readonly line: {
4
+ readonly wrapper: "border-b border-gray-200 dark:border-neutral-800";
5
+ readonly button: "whitespace-nowrap py-3 px-3 font-medium text-sm";
6
+ readonly active: "text-primary dark:text-primary-dark";
7
+ readonly inactive: "text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100";
7
8
  };
8
- solid: {
9
- wrapper: string;
10
- button: string;
11
- active: string;
12
- inactive: string;
9
+ readonly solid: {
10
+ readonly wrapper: "rounded-lg bg-gray-100 dark:bg-neutral-900 border border-gray-200 dark:border-neutral-800 p-1";
11
+ readonly button: "whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md";
12
+ readonly active: "bg-primary/15 dark:bg-primary/25 text-primary dark:text-neutral-100";
13
+ readonly inactive: "text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100";
13
14
  };
14
- subtle: {
15
- wrapper: string;
16
- button: string;
17
- active: string;
18
- inactive: string;
15
+ readonly subtle: {
16
+ readonly wrapper: "rounded-lg bg-transparent p-1";
17
+ readonly button: "whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md";
18
+ readonly active: "text-white";
19
+ readonly inactive: "text-gray-600 hover:text-primary dark:text-neutral-400 dark:hover:text-neutral-100";
19
20
  };
20
- inline: {
21
- wrapper: string;
22
- button: string;
23
- active: string;
24
- inactive: string;
21
+ readonly inline: {
22
+ readonly wrapper: "border-b border-gray-200 dark:border-neutral-800";
23
+ readonly button: "whitespace-nowrap py-2 px-4 font-medium text-sm rounded-t-md";
24
+ readonly active: "text-white";
25
+ readonly inactive: "text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100";
25
26
  };
26
- outline: {
27
- wrapper: string;
28
- button: string;
29
- active: string;
30
- inactive: string;
27
+ readonly outline: {
28
+ readonly wrapper: "border border-gray-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 rounded-lg p-1";
29
+ readonly button: "whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md";
30
+ readonly active: "bg-primary/15 dark:bg-primary/25 text-primary dark:text-neutral-100";
31
+ readonly inactive: "text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100";
31
32
  };
32
- plain: {
33
- wrapper: string;
34
- button: string;
35
- active: string;
36
- inactive: string;
33
+ readonly plain: {
34
+ readonly wrapper: "";
35
+ readonly button: "whitespace-nowrap py-2 px-3 font-medium text-sm";
36
+ readonly active: "text-primary dark:text-primary-dark";
37
+ readonly inactive: "text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100";
37
38
  };
38
39
  };
39
- export type Tabs = {
40
+ export type TabItem = {
40
41
  label: string;
41
42
  content: React.ReactNode;
42
43
  disabled?: boolean;
43
44
  link?: string;
44
45
  };
45
46
  export type TabsProps = {
46
- tabs: Tabs[];
47
+ tabs: TabItem[];
47
48
  variant?: keyof typeof TabsVariants;
48
49
  fitted?: boolean;
49
- wrapperClassName?: string;
50
- buttonClassName?: string;
51
- activeClassName?: string;
52
- inactiveClassName?: string;
53
50
  activeTab?: number;
54
51
  onTabChange?: (index: number) => void;
55
52
  };
package/dist/main.cjs CHANGED
@@ -1,134 +1,136 @@
1
1
  "use strict"
2
2
  Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})
3
- const e=require("react/jsx-runtime"),r=require("react"),a=require("clsx-for-tailwind"),t=require("react-router-dom"),s=require("react-select"),o={outline:"outline-1",solid:""},n={success:"fill-success-700 dark:fill-success",info:"fill-info-700 dark:fill-info",error:"fill-error-700 dark:fill-error",warning:"fill-warning-700 dark:fill-warning",default:"fill-secondary-700 dark:fill-secondary"},l={success:"bg-success-30/50 outline-success-700 text-success-700 dark:bg-success-dark-30/20 dark:text-success",info:"bg-info-30/50 outline-info-700 text-info-700 dark:bg-info-dark-30/20 dark:text-info",warning:"bg-warning-30/50 outline-warning-700 text-warning-700 dark:bg-warning-dark-30/20 dark:text-warning",error:"bg-error-30/50 outline-error-700 text-error-700 dark:bg-error-dark-30/20 dark:text-error",default:"bg-secondary-30/50 outline-secondary-700 dark:bg-secondary-dark-30/20 dark:text-secondary"},d={sm:"w-8 h-8 text-xs",md:"w-12 h-12 text-sm",lg:"w-16 h-16 text-base"},i={sharp:"rounded-none",cornered:"rounded-md",rounded:"rounded-full"},c={primary:"bg-primary dark:bg-primary-dark text-white",error:"bg-error dark:bg-error-dark text-white",warning:"bg-warning dark:bg-warning-dark text-white",success:"bg-success dark:bg-success-dark text-white",info:"bg-info dark:bg-info-dark text-white",secondary:"bg-secondary dark:bg-secondary-dark text-secondary-foreground dark:text-neutral-900"},m={primary:"ring-primary dark:ring-primary-dark",error:"ring-error dark:ring-error-dark",warning:"ring-warning dark:ring-warning-dark",success:"ring-success dark:ring-success-dark",info:"ring-info dark:ring-info-dark",secondary:"ring-secondary dark:ring-secondary-dark"},u={sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"},x=({imageSrc:t,fallbackName:s,ring:o=!1,shape:n="rounded",fallbackColor:l="primary",size:x="md",alt:g="avatar",status:b})=>{const[p,h]=r.useState(!1)
3
+ const e=require("react/jsx-runtime"),r=require("react"),a=require("clsx-for-tailwind"),t=require("react-router-dom"),s=require("react-select"),n={outline:"outline-1",solid:""},o={success:"fill-success-700 dark:fill-success",info:"fill-info-700 dark:fill-info",error:"fill-error-700 dark:fill-error",warning:"fill-warning-700 dark:fill-warning",default:"fill-secondary-700 dark:fill-secondary"},l={success:"bg-success-30/50 outline-success-700 text-success-700 dark:bg-success-dark-30/20 dark:text-success",info:"bg-info-30/50 outline-info-700 text-info-700 dark:bg-info-dark-30/20 dark:text-info",warning:"bg-warning-30/50 outline-warning-700 text-warning-700 dark:bg-warning-dark-30/20 dark:text-warning",error:"bg-error-30/50 outline-error-700 text-error-700 dark:bg-error-dark-30/20 dark:text-error",default:"bg-secondary-30/50 outline-secondary-700 dark:bg-secondary-dark-30/20 dark:text-secondary"},d={sm:"w-8 h-8 text-xs",md:"w-12 h-12 text-sm",lg:"w-16 h-16 text-base"},i={sharp:"rounded-none",cornered:"rounded-md",rounded:"rounded-full"},c={primary:"bg-primary dark:bg-primary-dark text-white",error:"bg-error dark:bg-error-dark text-white",warning:"bg-warning dark:bg-warning-dark text-white",success:"bg-success dark:bg-success-dark text-white",info:"bg-info dark:bg-info-dark text-white",secondary:"bg-secondary dark:bg-secondary-dark text-secondary-foreground dark:text-neutral-900"},m={primary:"ring-primary dark:ring-primary-dark",error:"ring-error dark:ring-error-dark",warning:"ring-warning dark:ring-warning-dark",success:"ring-success dark:ring-success-dark",info:"ring-info dark:ring-info-dark",secondary:"ring-secondary dark:ring-secondary-dark"},u={sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5"},x=({imageSrc:t,fallbackName:s,ring:n=!1,shape:o="rounded",fallbackColor:l="primary",size:x="md",alt:g="avatar",status:b})=>{const[p,h]=r.useState(!1)
4
4
  r.useEffect(()=>{h(!1)},[t])
5
- const k=d[x],f=i[n],y=c[l],w=o?a.cn("ring-2 ring-offset-2 ring-offset-white dark:ring-offset-neutral-900",m[l]):"",v=(e=>{if(!e?.trim())return"?"
5
+ const k=d[x],f=i[o],y=c[l],w=n?a.cn("ring-2 ring-offset-2 ring-offset-white dark:ring-offset-neutral-900",m[l]):"",v=(e=>{if(!e?.trim())return"?"
6
6
  const r=e.trim().split(/\s+/)
7
7
  return 1===r.length?r[0].slice(0,2).toUpperCase():(r[0][0]+r[r.length-1][0]).toUpperCase()})(s),j=p||!t
8
- return e.jsxs("div",{className:"relative inline-flex shrink-0",children:[j?e.jsx("div",{role:"img","aria-label":s||g,className:a.cn("flex items-center justify-center font-semibold select-none transition-colors",y,k,f,w),children:v}):e.jsx("img",{src:t,alt:g,onError:()=>h(!0),className:a.cn("object-cover",k,f,w)}),b&&e.jsx("span",{"aria-label":`Status: ${b}`,className:a.cn("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-neutral-900",u[x],"online"===b?"bg-success dark:bg-success-dark":"bg-secondary-700 dark:bg-secondary-dark-700")})]})},g={sm:"w-8 h-8 text-xs",md:"w-12 h-12 text-sm",lg:"w-16 h-16 text-base"},b={sharp:"rounded-none",cornered:"rounded-md",rounded:"rounded-full"},p={default:"bg-secondary-30 text-black dark:bg-secondary-dark-30",success:"bg-success-30 text-green-700 dark:bg-success-dark-30",error:"bg-error-30 text-red-700 dark:bg-error-dark-30",info:"bg-info-30 text-blue-700 dark:bg-info-dark-30",warning:"bg-warning-30 text-amber-700 dark:bg-warning-dark-30"},h={"top-right":"absolute -top-3 -right-3","top-left":"absolute -top-3 -left-3","bottom-right":"absolute -bottom-3 -right-3","bottom-left":"absolute -bottom-3 -left-3"},k=({label:r,icon:t,value:s,selectedValue:o,onChangeValue:n,labelClassName:l,className:d})=>{const i=s===o
9
- return e.jsxs("button",{onClick:()=>n?.(s),className:a.cn("inline-flex flex-1 flex-col items-center justify-center p-5 group",i?"bg-secondary-30-50 dark:bg-secondary/10":"hover:bg-secondary-30 dark:hover:bg-secondary/30",d),children:[t,e.jsx("span",{className:a.cn("text-sm",i?"text-primary":"text-secondary-dark-700 dark:text-secondary-dark group-hover:text-secondary-700 dark:group-hover:text-white",l),children:r})]})},f={primary:"text-primary dark:text-primary-dark-30",secondary:"text-secondary-foreground dark:text-secondary-foreground-dark",success:"text-success-dark dark:text-success-dark-30",info:"text-info-dark dark:text-info-dark-30",warning:"text-warning-dark dark:text-warning-dark-30",error:"text-error-dark dark:text-error-dark-30"},y={sm:"px-3 py-2 text-sm font-medium",md:"px-4 py-2 text-base font-semibold tracking-[.2px]",lg:"px-6 py-3 text-lg font-semibold"},w={regular:"rounded-md",pill:"rounded-full"},v={primary:{solid:"bg-primary text-white hover:bg-primary-dark dark:bg-primary-dark dark:hover:bg-primary-dark/70",outline:"border border-primary text-primary hover:bg-primary-30 dark:bg-primary-dark/30 dark:border-primary-dark dark:hover:bg-primary-dark/70",ghost:"text-primary hover:bg-primary-30 dark:text-primary-dark dark:hover:bg-primary-dark/70 dark:hover:text-white",plain:"text-primary dark:text-primary-dark"},secondary:{solid:"bg-secondary text-black hover:bg-secondary-dark/80 dark:bg-secondary-dark dark:text-white dark:hover:bg-secondary-dark/70",outline:"border border-secondary text-black hover:bg-secondary-30 dark:bg-secondary-dark/30 dark:border-secondary-dark dark:text-white dark:hover:bg-secondary-dark/70",ghost:"text-black hover:bg-secondary-30 dark:text-white dark:hover:bg-secondary-dark/70",plain:"text-black dark:text-white"},success:{solid:"bg-success text-white hover:bg-success-dark dark:bg-success-dark dark:hover:bg-success-dark/70",outline:"border border-success text-success hover:bg-success-30 dark:bg-success-dark/30 dark:border-success-dark dark:text-white dark:hover:bg-success-dark/70",ghost:"text-success hover:bg-success-30 dark:text-success-dark dark:hover:bg-success-dark/70 dark:hover:text-white",plain:"text-success dark:text-success-dark"},warning:{solid:"bg-warning text-white hover:bg-warning-dark dark:bg-warning-dark dark:hover:bg-warning-dark/70",outline:"border border-warning text-warning hover:bg-warning-30 dark:bg-warning-dark/30 dark:border-warning-dark dark:text-white dark:hover:bg-warning-dark/70",ghost:"text-warning hover:bg-warning-30 dark:text-warning-dark dark:hover:bg-warning-dark/70 dark:hover:text-white",plain:"text-warning dark:text-warning-dark"},error:{solid:"bg-error text-white hover:bg-error-dark dark:bg-error-dark dark:hover:bg-error-dark/70",outline:"border border-error text-error hover:bg-error-30 dark:bg-error-dark/30 dark:border-error-dark dark:text-white dark:hover:bg-error-dark/70",ghost:"text-error hover:bg-error-30 dark:text-error-dark dark:hover:bg-error-dark/70 dark:hover:text-white",plain:"text-error dark:text-error-dark"},info:{solid:"bg-info text-white hover:bg-info-dark dark:bg-info-dark dark:hover:bg-info-dark/70",outline:"border border-info text-info hover:bg-info-30 dark:bg-info-dark/30 dark:border-info-dark dark:text-white dark:hover:bg-info-dark/70",ghost:"text-info hover:bg-info-30 dark:text-info-dark dark:hover:bg-info-dark/70 dark:hover:text-white",plain:"text-info dark:text-info-dark"}},j=(e,r)=>v[r][e]||"",N={sm:"max-w-xs",md:"max-w-sm",lg:"max-w-md",xl:"max-w-xl",full:"w-full"},C={primary:"bg-primary dark:bg-primary-dark text-white",error:"bg-error dark:bg-error-dark text-white",warning:"bg-warning dark:bg-warning-dark text-white",success:"bg-success dark:bg-success-dark text-white",info:"bg-info dark:bg-info-dark text-white",secondary:"bg-secondary dark:bg-secondary-dark text-secondary-foreground dark:text-neutral-900"},z=r.forwardRef(({label:t,description:s,indeterminate:o=!1,disabled:n,readOnly:l,children:d,checked:i,defaultChecked:c,onChange:m,...u},x)=>{const g=r.useRef(null)
8
+ return e.jsxs("div",{className:"relative inline-flex shrink-0",children:[j?e.jsx("div",{role:"img","aria-label":s||g,className:a.cn("flex items-center justify-center font-semibold select-none transition-colors",y,k,f,w),children:v}):e.jsx("img",{src:t,alt:g,onError:()=>h(!0),className:a.cn("object-cover",k,f,w)}),b&&e.jsx("span",{"aria-label":`Status: ${b}`,className:a.cn("absolute bottom-0 right-0 rounded-full border-2 border-white dark:border-neutral-900",u[x],"online"===b?"bg-success dark:bg-success-dark":"bg-secondary-700 dark:bg-secondary-dark-700")})]})},g={sm:"w-8 h-8 text-xs",md:"w-12 h-12 text-sm",lg:"w-16 h-16 text-base"},b={sharp:"rounded-none",cornered:"rounded-md",rounded:"rounded-full"},p={default:"bg-secondary-30 text-black dark:bg-secondary-dark-30",success:"bg-success-30 text-green-700 dark:bg-success-dark-30",error:"bg-error-30 text-red-700 dark:bg-error-dark-30",info:"bg-info-30 text-blue-700 dark:bg-info-dark-30",warning:"bg-warning-30 text-amber-700 dark:bg-warning-dark-30"},h={"top-right":"absolute -top-3 -right-3","top-left":"absolute -top-3 -left-3","bottom-right":"absolute -bottom-3 -right-3","bottom-left":"absolute -bottom-3 -left-3"},k=({label:r,icon:t,value:s,selectedValue:n,onChangeValue:o,labelClassName:l,className:d})=>{const i=s===n
9
+ return e.jsxs("button",{onClick:()=>o?.(s),className:a.cn("inline-flex flex-1 flex-col items-center justify-center p-5 group",i?"bg-secondary-30-50 dark:bg-secondary/10":"hover:bg-secondary-30 dark:hover:bg-secondary/30",d),children:[t,e.jsx("span",{className:a.cn("text-sm",i?"text-primary":"text-secondary-dark-700 dark:text-secondary-dark group-hover:text-secondary-700 dark:group-hover:text-white",l),children:r})]})},f={primary:"text-primary dark:text-primary-dark-30",secondary:"text-secondary-foreground dark:text-secondary-foreground-dark",success:"text-success-dark dark:text-success-dark-30",info:"text-info-dark dark:text-info-dark-30",warning:"text-warning-dark dark:text-warning-dark-30",error:"text-error-dark dark:text-error-dark-30"},y={sm:"px-3 py-2 text-sm font-medium",md:"px-4 py-2 text-base font-semibold tracking-[.2px]",lg:"px-6 py-3 text-lg font-semibold"},w={regular:"rounded-md",pill:"rounded-full"},v={primary:{solid:"bg-primary text-white hover:bg-primary-dark dark:bg-primary-dark dark:hover:bg-primary-dark/70",outline:"border border-primary text-primary hover:bg-primary-30 dark:bg-primary-dark/30 dark:border-primary-dark dark:hover:bg-primary-dark/70",ghost:"text-primary hover:bg-primary-30 dark:text-primary-dark dark:hover:bg-primary-dark/70 dark:hover:text-white",plain:"text-primary dark:text-primary-dark"},secondary:{solid:"bg-secondary text-black hover:bg-secondary-dark/80 dark:bg-secondary-dark dark:text-white dark:hover:bg-secondary-dark/70",outline:"border border-secondary text-black hover:bg-secondary-30 dark:bg-secondary-dark/30 dark:border-secondary-dark dark:text-white dark:hover:bg-secondary-dark/70",ghost:"text-black hover:bg-secondary-30 dark:text-white dark:hover:bg-secondary-dark/70",plain:"text-black dark:text-white"},success:{solid:"bg-success text-white hover:bg-success-dark dark:bg-success-dark dark:hover:bg-success-dark/70",outline:"border border-success text-success hover:bg-success-30 dark:bg-success-dark/30 dark:border-success-dark dark:text-white dark:hover:bg-success-dark/70",ghost:"text-success hover:bg-success-30 dark:text-success-dark dark:hover:bg-success-dark/70 dark:hover:text-white",plain:"text-success dark:text-success-dark"},warning:{solid:"bg-warning text-white hover:bg-warning-dark dark:bg-warning-dark dark:hover:bg-warning-dark/70",outline:"border border-warning text-warning hover:bg-warning-30 dark:bg-warning-dark/30 dark:border-warning-dark dark:text-white dark:hover:bg-warning-dark/70",ghost:"text-warning hover:bg-warning-30 dark:text-warning-dark dark:hover:bg-warning-dark/70 dark:hover:text-white",plain:"text-warning dark:text-warning-dark"},error:{solid:"bg-error text-white hover:bg-error-dark dark:bg-error-dark dark:hover:bg-error-dark/70",outline:"border border-error text-error hover:bg-error-30 dark:bg-error-dark/30 dark:border-error-dark dark:text-white dark:hover:bg-error-dark/70",ghost:"text-error hover:bg-error-30 dark:text-error-dark dark:hover:bg-error-dark/70 dark:hover:text-white",plain:"text-error dark:text-error-dark"},info:{solid:"bg-info text-white hover:bg-info-dark dark:bg-info-dark dark:hover:bg-info-dark/70",outline:"border border-info text-info hover:bg-info-30 dark:bg-info-dark/30 dark:border-info-dark dark:text-white dark:hover:bg-info-dark/70",ghost:"text-info hover:bg-info-30 dark:text-info-dark dark:hover:bg-info-dark/70 dark:hover:text-white",plain:"text-info dark:text-info-dark"}},j=(e,r)=>v[r][e]||"",N={sm:"max-w-xs",md:"max-w-sm",lg:"max-w-md",xl:"max-w-xl",full:"w-full"},C={primary:"bg-primary dark:bg-primary-dark text-white",error:"bg-error dark:bg-error-dark text-white",warning:"bg-warning dark:bg-warning-dark text-white",success:"bg-success dark:bg-success-dark text-white",info:"bg-info dark:bg-info-dark text-white",secondary:"bg-secondary dark:bg-secondary-dark text-secondary-foreground dark:text-neutral-900"},z=r.forwardRef(({label:t,description:s,indeterminate:n=!1,disabled:o,readOnly:l,children:d,checked:i,defaultChecked:c,onChange:m,...u},x)=>{const g=r.useRef(null)
10
10
  r.useImperativeHandle(x,()=>g.current)
11
11
  const[b,p]=r.useState(c??!1),h=void 0!==i,k=h?i:b
12
- return r.useEffect(()=>{g.current&&(g.current.indeterminate=o)},[o]),e.jsxs("label",{className:a.cn("inline-flex items-center gap-3 cursor-pointer select-none",n&&"opacity-50 cursor-not-allowed"),children:[e.jsxs("span",{className:"relative inline-flex items-center justify-center w-5 h-5",children:[e.jsx("input",{...u,ref:g,type:"checkbox",readOnly:l,disabled:n,onChange:e=>{h||p(e.target.checked),m?.(e)},checked:k,"aria-checked":o?"mixed":k?"true":"false",className:"absolute w-full h-full opacity-0 cursor-pointer peer"}),e.jsx("span",{className:a.cn("w-5 h-5 rounded border border-gray-300 dark:border-gray-600 flex items-center justify-center transition-colors duration-200",{"bg-primary border-primary dark:bg-primary-dark dark:border-primary-dark":k||o}),children:o?e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3 text-white",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M6 10a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1z"})}):k?e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3 text-white fill-white",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-7.778 7.778a1 1 0 01-1.414 0L3.293 10.05a1 1 0 111.414-1.414l3.536 3.535 7.071-7.071a1 1 0 011.414 0z",clipRule:"evenodd"})}):null})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[d,t&&e.jsx("span",{className:"font-medium text-sm dark:text-white",children:t}),s&&e.jsx("span",{className:"text-secondary-700 text-sm dark:text-secondary-dark",children:s})]})]})}),L={sm:{container:"text-sm",checkbox:"w-4 h-4",label:"pl-2"},md:{container:"text-base",checkbox:"w-5 h-5",label:"pl-2"},lg:{container:"text-lg",checkbox:"w-6 h-6",label:"pl-3"}},M={solid:{label:"border-transparent bg-transparent hover:bg-gray-100 dark:text-white dark:hover:bg-gray-800",checked:"bg-primary/30 text-primary-700 hover:bg-primary/30 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",checkbox:"border-gray-300 dark:border-gray-600",checkedCheckbox:"border-primary bg-primary dark:border-primary dark:bg-primary"},subtle:{label:"border-transparent bg-transparent hover:bg-gray-100 dark:text-white dark:hover:bg-gray-800",checked:"bg-primary/30 text-primary-700 hover:bg-primary/30 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",checkbox:"border-gray-300 dark:border-gray-600",checkedCheckbox:"border-primary-700 bg-primary-700 dark:border-primary dark:bg-primary"},outline:{label:"border-secondary-700 bg-transparent hover:bg-gray-100 dark:text-white dark:border-secondary-dark dark:hover:bg-gray-800",checked:"border-primary bg-primary/30 text-primary-700 hover:bg-primary/30 dark:border-primary-700 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",checkbox:"border-gray-300 dark:border-secondary-dark",checkedCheckbox:"border-primary bg-primary-700 dark:border-primary dark:bg-primary"}},S={sm:"w-10 h-10 text-sm",md:"w-12 h-12 text-base",lg:"w-14 h-14 text-lg",xl:"w-16 h-16 text-xl"},T={sm:"w-11 h-11 font-medium rounded-sm rounded rounded-full",md:"w-14 h-14 font-semibold tracking-[.2px] rounded-md rounded rounded-full",lg:"w-19 h-19 text-lg font-semibold rounded-lg rounded rounded-full"},$={base:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},sm:{1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},xl:{1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6",7:"xl:grid-cols-7",8:"xl:grid-cols-8",9:"xl:grid-cols-9",10:"xl:grid-cols-10",11:"xl:grid-cols-11",12:"xl:grid-cols-12"},"2xl":{1:"2xl:grid-cols-1",2:"2xl:grid-cols-2",3:"2xl:grid-cols-3",4:"2xl:grid-cols-4",5:"2xl:grid-cols-5",6:"2xl:grid-cols-6",7:"2xl:grid-cols-7",8:"2xl:grid-cols-8",9:"2xl:grid-cols-9",10:"2xl:grid-cols-10",11:"2xl:grid-cols-11",12:"2xl:grid-cols-12"}},E={base:{1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6"},sm:{1:"sm:gap-1",2:"sm:gap-2",3:"sm:gap-3",4:"sm:gap-4",5:"sm:gap-5",6:"sm:gap-6"},md:{1:"md:gap-1",2:"md:gap-2",3:"md:gap-3",4:"md:gap-4",5:"md:gap-5",6:"md:gap-6"},lg:{1:"lg:gap-1",2:"lg:gap-2",3:"lg:gap-3",4:"lg:gap-4",5:"lg:gap-5",6:"lg:gap-6"},xl:{1:"xl:gap-1",2:"xl:gap-2",3:"xl:gap-3",4:"xl:gap-4",5:"xl:gap-5",6:"xl:gap-6"},"2xl":{1:"2xl:gap-1",2:"2xl:gap-2",3:"2xl:gap-3",4:"2xl:gap-4",5:"2xl:gap-5",6:"2xl:gap-6"}}
13
- function D(e){return"number"==typeof e?{base:e}:e}const I={base:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},sm:{1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",full:"sm:col-span-full"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",full:"md:col-span-full"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",full:"lg:col-span-full"},xl:{1:"xl:col-span-1",2:"xl:col-span-2",3:"xl:col-span-3",4:"xl:col-span-4",5:"xl:col-span-5",6:"xl:col-span-6",7:"xl:col-span-7",8:"xl:col-span-8",9:"xl:col-span-9",10:"xl:col-span-10",11:"xl:col-span-11",12:"xl:col-span-12",full:"xl:col-span-full"},"2xl":{1:"2xl:col-span-1",2:"2xl:col-span-2",3:"2xl:col-span-3",4:"2xl:col-span-4",5:"2xl:col-span-5",6:"2xl:col-span-6",7:"2xl:col-span-7",8:"2xl:col-span-8",9:"2xl:col-span-9",10:"2xl:col-span-10",11:"2xl:col-span-11",12:"2xl:col-span-12",full:"2xl:col-span-full"}},R={base:{1:"columns-1",2:"columns-2",3:"columns-3",4:"columns-4",5:"columns-5",6:"columns-6",7:"columns-7",8:"columns-8",9:"columns-9",10:"columns-10",11:"columns-11",12:"columns-12"},sm:{1:"sm:columns-1",2:"sm:columns-2",3:"sm:columns-3",4:"sm:columns-4",5:"sm:columns-5",6:"sm:columns-6",7:"sm:columns-7",8:"sm:columns-8",9:"sm:columns-9",10:"sm:columns-10",11:"sm:columns-11",12:"sm:columns-12"},md:{1:"md:columns-1",2:"md:columns-2",3:"md:columns-3",4:"md:columns-4",5:"md:columns-5",6:"md:columns-6",7:"md:columns-7",8:"md:columns-8",9:"md:columns-9",10:"md:columns-10",11:"md:columns-11",12:"md:columns-12"},lg:{1:"lg:columns-1",2:"lg:columns-2",3:"lg:columns-3",4:"lg:columns-4",5:"lg:columns-5",6:"lg:columns-6",7:"lg:columns-7",8:"lg:columns-8",9:"lg:columns-9",10:"lg:columns-10",11:"lg:columns-11",12:"lg:columns-12"},xl:{1:"xl:columns-1",2:"xl:columns-2",3:"xl:columns-3",4:"xl:columns-4",5:"xl:columns-5",6:"xl:columns-6",7:"xl:columns-7",8:"xl:columns-8",9:"xl:columns-9",10:"xl:columns-10",11:"xl:columns-11",12:"xl:columns-12"},"2xl":{1:"2xl:columns-1",2:"2xl:columns-2",3:"2xl:columns-3",4:"2xl:columns-4",5:"2xl:columns-5",6:"2xl:columns-6",7:"2xl:columns-7",8:"2xl:columns-8",9:"2xl:columns-9",10:"2xl:columns-10",11:"2xl:columns-11",12:"2xl:columns-12"}},V={base:{1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6"},sm:{1:"sm:gap-1",2:"sm:gap-2",3:"sm:gap-3",4:"sm:gap-4",5:"sm:gap-5",6:"sm:gap-6"},md:{1:"md:gap-1",2:"md:gap-2",3:"md:gap-3",4:"md:gap-4",5:"md:gap-5",6:"md:gap-6"},lg:{1:"lg:gap-1",2:"lg:gap-2",3:"lg:gap-3",4:"lg:gap-4",5:"lg:gap-5",6:"lg:gap-6"},xl:{1:"xl:gap-1",2:"xl:gap-2",3:"xl:gap-3",4:"xl:gap-4",5:"xl:gap-5",6:"xl:gap-6"},"2xl":{1:"2xl:gap-1",2:"2xl:gap-2",3:"2xl:gap-3",4:"2xl:gap-4",5:"2xl:gap-5",6:"2xl:gap-6"}}
14
- function B(e){return"number"==typeof e?{base:e}:e}const A=r.forwardRef(({children:r,className:t,cols:s,gap:o=4,...n},l)=>{const d=(i=B(s))?Object.entries(i).map(([e,r])=>R[e]?.[r]??""):[]
12
+ return r.useEffect(()=>{g.current&&(g.current.indeterminate=n)},[n]),e.jsxs("label",{className:a.cn("inline-flex items-center gap-3 cursor-pointer select-none",o&&"opacity-50 cursor-not-allowed"),children:[e.jsxs("span",{className:"relative inline-flex items-center justify-center w-5 h-5",children:[e.jsx("input",{...u,ref:g,type:"checkbox",readOnly:l,disabled:o,onChange:e=>{h||p(e.target.checked),m?.(e)},checked:k,"aria-checked":n?"mixed":k?"true":"false",className:"absolute w-full h-full opacity-0 cursor-pointer peer"}),e.jsx("span",{className:a.cn("w-5 h-5 rounded border border-gray-300 dark:border-gray-600 flex items-center justify-center transition-colors duration-200",{"bg-primary border-primary dark:bg-primary-dark dark:border-primary-dark":k||n}),children:n?e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3 text-white",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M6 10a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1z"})}):k?e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3 text-white fill-white",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-7.778 7.778a1 1 0 01-1.414 0L3.293 10.05a1 1 0 111.414-1.414l3.536 3.535 7.071-7.071a1 1 0 011.414 0z",clipRule:"evenodd"})}):null})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[d,t&&e.jsx("span",{className:"font-medium text-sm dark:text-white",children:t}),s&&e.jsx("span",{className:"text-secondary-700 text-sm dark:text-secondary-dark",children:s})]})]})}),L={sm:{container:"text-sm",checkbox:"w-4 h-4",label:"pl-2"},md:{container:"text-base",checkbox:"w-5 h-5",label:"pl-2"},lg:{container:"text-lg",checkbox:"w-6 h-6",label:"pl-3"}},M={solid:{label:"border-transparent bg-transparent hover:bg-gray-100 dark:text-white dark:hover:bg-gray-800",checked:"bg-primary/30 text-primary-700 hover:bg-primary/30 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",checkbox:"border-gray-300 dark:border-gray-600",checkedCheckbox:"border-primary bg-primary dark:border-primary dark:bg-primary"},subtle:{label:"border-transparent bg-transparent hover:bg-gray-100 dark:text-white dark:hover:bg-gray-800",checked:"bg-primary/30 text-primary-700 hover:bg-primary/30 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",checkbox:"border-gray-300 dark:border-gray-600",checkedCheckbox:"border-primary-700 bg-primary-700 dark:border-primary dark:bg-primary"},outline:{label:"border-secondary-700 bg-transparent hover:bg-gray-100 dark:text-white dark:border-secondary-dark dark:hover:bg-gray-800",checked:"border-primary bg-primary/30 text-primary-700 hover:bg-primary/30 dark:border-primary-700 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",checkbox:"border-gray-300 dark:border-secondary-dark",checkedCheckbox:"border-primary bg-primary-700 dark:border-primary dark:bg-primary"}},$={sm:"w-10 h-10 text-sm",md:"w-12 h-12 text-base",lg:"w-14 h-14 text-lg",xl:"w-16 h-16 text-xl"},S={sm:"w-11 h-11 font-medium rounded-sm rounded rounded-full",md:"w-14 h-14 font-semibold tracking-[.2px] rounded-md rounded rounded-full",lg:"w-19 h-19 text-lg font-semibold rounded-lg rounded rounded-full"},T={base:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},sm:{1:"sm:grid-cols-1",2:"sm:grid-cols-2",3:"sm:grid-cols-3",4:"sm:grid-cols-4",5:"sm:grid-cols-5",6:"sm:grid-cols-6",7:"sm:grid-cols-7",8:"sm:grid-cols-8",9:"sm:grid-cols-9",10:"sm:grid-cols-10",11:"sm:grid-cols-11",12:"sm:grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"},xl:{1:"xl:grid-cols-1",2:"xl:grid-cols-2",3:"xl:grid-cols-3",4:"xl:grid-cols-4",5:"xl:grid-cols-5",6:"xl:grid-cols-6",7:"xl:grid-cols-7",8:"xl:grid-cols-8",9:"xl:grid-cols-9",10:"xl:grid-cols-10",11:"xl:grid-cols-11",12:"xl:grid-cols-12"},"2xl":{1:"2xl:grid-cols-1",2:"2xl:grid-cols-2",3:"2xl:grid-cols-3",4:"2xl:grid-cols-4",5:"2xl:grid-cols-5",6:"2xl:grid-cols-6",7:"2xl:grid-cols-7",8:"2xl:grid-cols-8",9:"2xl:grid-cols-9",10:"2xl:grid-cols-10",11:"2xl:grid-cols-11",12:"2xl:grid-cols-12"}},E={base:{1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6"},sm:{1:"sm:gap-1",2:"sm:gap-2",3:"sm:gap-3",4:"sm:gap-4",5:"sm:gap-5",6:"sm:gap-6"},md:{1:"md:gap-1",2:"md:gap-2",3:"md:gap-3",4:"md:gap-4",5:"md:gap-5",6:"md:gap-6"},lg:{1:"lg:gap-1",2:"lg:gap-2",3:"lg:gap-3",4:"lg:gap-4",5:"lg:gap-5",6:"lg:gap-6"},xl:{1:"xl:gap-1",2:"xl:gap-2",3:"xl:gap-3",4:"xl:gap-4",5:"xl:gap-5",6:"xl:gap-6"},"2xl":{1:"2xl:gap-1",2:"2xl:gap-2",3:"2xl:gap-3",4:"2xl:gap-4",5:"2xl:gap-5",6:"2xl:gap-6"}}
13
+ function I(e){return"number"==typeof e?{base:e}:e}const D={base:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12",full:"col-span-full"},sm:{1:"sm:col-span-1",2:"sm:col-span-2",3:"sm:col-span-3",4:"sm:col-span-4",5:"sm:col-span-5",6:"sm:col-span-6",7:"sm:col-span-7",8:"sm:col-span-8",9:"sm:col-span-9",10:"sm:col-span-10",11:"sm:col-span-11",12:"sm:col-span-12",full:"sm:col-span-full"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12",full:"md:col-span-full"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12",full:"lg:col-span-full"},xl:{1:"xl:col-span-1",2:"xl:col-span-2",3:"xl:col-span-3",4:"xl:col-span-4",5:"xl:col-span-5",6:"xl:col-span-6",7:"xl:col-span-7",8:"xl:col-span-8",9:"xl:col-span-9",10:"xl:col-span-10",11:"xl:col-span-11",12:"xl:col-span-12",full:"xl:col-span-full"},"2xl":{1:"2xl:col-span-1",2:"2xl:col-span-2",3:"2xl:col-span-3",4:"2xl:col-span-4",5:"2xl:col-span-5",6:"2xl:col-span-6",7:"2xl:col-span-7",8:"2xl:col-span-8",9:"2xl:col-span-9",10:"2xl:col-span-10",11:"2xl:col-span-11",12:"2xl:col-span-12",full:"2xl:col-span-full"}},R={base:{1:"columns-1",2:"columns-2",3:"columns-3",4:"columns-4",5:"columns-5",6:"columns-6",7:"columns-7",8:"columns-8",9:"columns-9",10:"columns-10",11:"columns-11",12:"columns-12"},sm:{1:"sm:columns-1",2:"sm:columns-2",3:"sm:columns-3",4:"sm:columns-4",5:"sm:columns-5",6:"sm:columns-6",7:"sm:columns-7",8:"sm:columns-8",9:"sm:columns-9",10:"sm:columns-10",11:"sm:columns-11",12:"sm:columns-12"},md:{1:"md:columns-1",2:"md:columns-2",3:"md:columns-3",4:"md:columns-4",5:"md:columns-5",6:"md:columns-6",7:"md:columns-7",8:"md:columns-8",9:"md:columns-9",10:"md:columns-10",11:"md:columns-11",12:"md:columns-12"},lg:{1:"lg:columns-1",2:"lg:columns-2",3:"lg:columns-3",4:"lg:columns-4",5:"lg:columns-5",6:"lg:columns-6",7:"lg:columns-7",8:"lg:columns-8",9:"lg:columns-9",10:"lg:columns-10",11:"lg:columns-11",12:"lg:columns-12"},xl:{1:"xl:columns-1",2:"xl:columns-2",3:"xl:columns-3",4:"xl:columns-4",5:"xl:columns-5",6:"xl:columns-6",7:"xl:columns-7",8:"xl:columns-8",9:"xl:columns-9",10:"xl:columns-10",11:"xl:columns-11",12:"xl:columns-12"},"2xl":{1:"2xl:columns-1",2:"2xl:columns-2",3:"2xl:columns-3",4:"2xl:columns-4",5:"2xl:columns-5",6:"2xl:columns-6",7:"2xl:columns-7",8:"2xl:columns-8",9:"2xl:columns-9",10:"2xl:columns-10",11:"2xl:columns-11",12:"2xl:columns-12"}},B={base:{1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6"},sm:{1:"sm:gap-1",2:"sm:gap-2",3:"sm:gap-3",4:"sm:gap-4",5:"sm:gap-5",6:"sm:gap-6"},md:{1:"md:gap-1",2:"md:gap-2",3:"md:gap-3",4:"md:gap-4",5:"md:gap-5",6:"md:gap-6"},lg:{1:"lg:gap-1",2:"lg:gap-2",3:"lg:gap-3",4:"lg:gap-4",5:"lg:gap-5",6:"lg:gap-6"},xl:{1:"xl:gap-1",2:"xl:gap-2",3:"xl:gap-3",4:"xl:gap-4",5:"xl:gap-5",6:"xl:gap-6"},"2xl":{1:"2xl:gap-1",2:"2xl:gap-2",3:"2xl:gap-3",4:"2xl:gap-4",5:"2xl:gap-5",6:"2xl:gap-6"}}
14
+ function V(e){return"number"==typeof e?{base:e}:e}const A=r.forwardRef(({children:r,className:t,cols:s,gap:n=4,...o},l)=>{const d=(i=V(s))?Object.entries(i).map(([e,r])=>R[e]?.[r]??""):[]
15
15
  var i
16
- const c=function(e){return e?Object.entries(e).map(([e,r])=>V[e]?.[r]??""):[]}(B(o))
17
- return e.jsx("div",{ref:l,className:a.cn("grid-mason",d,c,t),...n,children:r})}),O={outline:"border border-current",solid:""},F={"top-left":"top-5 left-5","bottom-left":"bottom-5 left-5","top-right":"top-5 right-5","bottom-right":"bottom-5 right-5"},P={success:"bg-success-30 border-success-700 text-success-700",info:"bg-info-30 border-info-700 text-info-700",warning:"bg-warning-30 border-warning-700 text-warning-700",error:"bg-error-30 border-error-700 text-error-700"},W={"top-right":"translate-x-0","bottom-right":"translate-x-0","top-left":"-translate-x-0","bottom-left":"-translate-x-0"},H={"top-right":"translate-x-40","bottom-right":"translate-x-40","top-left":"-translate-x-40","bottom-left":"-translate-x-40"},X={"top-right":"translate-x-10","bottom-right":"translate-x-10","top-left":"-translate-x-10","bottom-left":"-translate-x-10"},q=({title:t,message:s,type:o,icon:n,position:l="bottom-right",variant:d="solid",withClose:i=!0,withLoading:c=!1,onClose:m})=>{const[u,x]=r.useState(!1),[g,b]=r.useState(!1),[p,h]=r.useState(!1),k=r.useRef(null)
16
+ const c=function(e){return e?Object.entries(e).map(([e,r])=>B[e]?.[r]??""):[]}(V(n))
17
+ return e.jsx("div",{ref:l,className:a.cn("grid-mason",d,c,t),...o,children:r})}),F={outline:"border border-current",solid:""},O={"top-left":"top-5 left-5","bottom-left":"bottom-5 left-5","top-right":"top-5 right-5","bottom-right":"bottom-5 right-5"},P={success:"bg-success-30 border-success-700 text-success-700",info:"bg-info-30 border-info-700 text-info-700",warning:"bg-warning-30 border-warning-700 text-warning-700",error:"bg-error-30 border-error-700 text-error-700"},W={"top-right":"translate-x-0","bottom-right":"translate-x-0","top-left":"-translate-x-0","bottom-left":"-translate-x-0"},H={"top-right":"translate-x-40","bottom-right":"translate-x-40","top-left":"-translate-x-40","bottom-left":"-translate-x-40"},X={"top-right":"translate-x-10","bottom-right":"translate-x-10","top-left":"-translate-x-10","bottom-left":"-translate-x-10"},q=({title:t,message:s,type:n,icon:o,position:l="bottom-right",variant:d="solid",withClose:i=!0,withLoading:c=!1,onClose:m})=>{const[u,x]=r.useState(!1),[g,b]=r.useState(!1),[p,h]=r.useState(!1),k=r.useRef(null)
18
18
  r.useEffect(()=>{const e=setTimeout(()=>x(!0),50)
19
19
  return k.current=setTimeout(()=>{f()},3500),()=>{clearTimeout(e),k.current&&clearTimeout(k.current)}},[])
20
20
  const f=()=>{b(!0),setTimeout(()=>{m&&m()},500)}
21
- return e.jsxs("div",{onMouseEnter:()=>{h(!0),k.current&&(clearTimeout(k.current),k.current=null)},onMouseLeave:()=>{h(!1),k.current=setTimeout(()=>{f()},3500)},className:a.cn("relative overflow-hidden flex max-w-sm items-start gap-3 p-4 mb-3 rounded-lg shadow-lg transition-all duration-500 transform",P[o],O[d],g?`opacity-0 ${H[l]}`:u?`opacity-100 ${W[l]}`:`opacity-0 ${X[l]}`),children:[n&&e.jsx("div",{className:"text-2xl mt-1",children:n}),e.jsxs("div",{className:"flex-1",children:[t&&e.jsx("p",{className:"font-semibold text-base mb-1",children:t}),e.jsx("p",{className:"text-sm leading-snug",children:s})]}),i&&e.jsx("button",{onClick:f,className:"ml-2 text-lg leading-none hover:text-red-500 focus:outline-none cursor-pointer","aria-label":"Close",children:"×"}),c&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-current/20",children:e.jsx("div",{style:{width:u&&!p?"0%":"100%",transition:p?"none":"width 3500ms linear"},className:"h-full bg-current"})})]})},U=r.createContext(void 0),Y={sm:"max-w-sm",md:"max-w-md",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-6xl"},Z={sm:"w-3/4 md:w-64",md:"w-3/4 md:w-80",lg:"w-3/4 md:w-[40rem]"},G={sm:"px-3 py-2 text-sm font-medium rounded-lg",md:"px-4 py-2 text-base font-medium rounded-lg",lg:"px-6 py-3 text-lg font-medium rounded-lg"},K={sm:{container:"text-sm",radio:"w-4 h-4",label:"pl-2"},md:{container:"text-base",radio:"w-5 h-5",label:"pl-2"},lg:{container:"text-lg",radio:"w-6 h-6",label:"pl-3"}},_={solid:{label:"border-transparent bg-transparent hover:bg-gray-100 dark:text-white dark:hover:bg-gray-800",checked:"bg-primary/30 text-primary-700 hover:bg-primary/30 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",radio:"border-gray-300 dark:border-gray-600",checkedRadio:"border-primary bg-primary dark:border-primary dark:bg-primary"},subtle:{label:"border-transparent bg-transparent hover:bg-gray-100 dark:text-white dark:hover:bg-gray-800",checked:"bg-primary/30 text-primary-700 hover:bg-primary/30 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",radio:"border-gray-300 dark:border-gray-600",checkedRadio:"border-primary-700 bg-primary-700 dark:border-primary dark:bg-primary"},outline:{label:"border-secondary-700 bg-transparent hover:bg-gray-100 dark:text-white dark:border-secondary-dark dark:hover:bg-gray-800",checked:"border-primary bg-primary/30 text-primary-700 hover:bg-primary/30 dark:border-primary-700 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",radio:"border-gray-300 dark:border-secondary-dark",checkedRadio:"border-primary bg-primary-700 dark:border-primary dark:bg-primary"}},J=({children:t,text:s,showArrow:o=!0,placement:n="top",offset:l=8,bgColor:d="bg-gray-800 dark:bg-gray-600",isOpen:i,onOpenChange:c,disabled:m=!1,animationDuration:u=300,delay:x=700})=>{const[g,b]=r.useState(!1),p=i??g,h={...(()=>{switch(n){case"top":default:return{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:`${l}px`}
21
+ return e.jsxs("div",{onMouseEnter:()=>{h(!0),k.current&&(clearTimeout(k.current),k.current=null)},onMouseLeave:()=>{h(!1),k.current=setTimeout(()=>{f()},3500)},className:a.cn("relative overflow-hidden flex max-w-sm items-start gap-3 p-4 mb-3 rounded-lg shadow-lg transition-all duration-500 transform",P[n],F[d],g?`opacity-0 ${H[l]}`:u?`opacity-100 ${W[l]}`:`opacity-0 ${X[l]}`),children:[o&&e.jsx("div",{className:"text-2xl mt-1",children:o}),e.jsxs("div",{className:"flex-1",children:[t&&e.jsx("p",{className:"font-semibold text-base mb-1",children:t}),e.jsx("p",{className:"text-sm leading-snug",children:s})]}),i&&e.jsx("button",{onClick:f,className:"ml-2 text-lg leading-none hover:text-red-500 focus:outline-none cursor-pointer","aria-label":"Close",children:"×"}),c&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-current/20",children:e.jsx("div",{style:{width:u&&!p?"0%":"100%",transition:p?"none":"width 3500ms linear"},className:"h-full bg-current"})})]})},U=r.createContext(void 0),Y={sm:"max-w-sm",md:"max-w-md",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-6xl"},Z={sm:"w-3/4 md:w-64",md:"w-3/4 md:w-80",lg:"w-3/4 md:w-[40rem]"},G={sm:"px-3 py-1.5 text-xs font-medium rounded-lg",md:"px-3.5 py-2 text-sm font-medium rounded-lg",lg:"px-4.5 py-2.5 text-base font-medium rounded-lg"},K={sm:{container:"text-sm",radio:"w-4 h-4",label:"pl-2"},md:{container:"text-base",radio:"w-5 h-5",label:"pl-2"},lg:{container:"text-lg",radio:"w-6 h-6",label:"pl-3"}},_={solid:{label:"border-transparent bg-transparent hover:bg-gray-100 dark:text-white dark:hover:bg-gray-800",checked:"bg-primary/30 text-primary-700 hover:bg-primary/30 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",radio:"border-gray-300 dark:border-gray-600",checkedRadio:"border-primary bg-primary dark:border-primary dark:bg-primary"},subtle:{label:"border-transparent bg-transparent hover:bg-gray-100 dark:text-white dark:hover:bg-gray-800",checked:"bg-primary/30 text-primary-700 hover:bg-primary/30 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",radio:"border-gray-300 dark:border-gray-600",checkedRadio:"border-primary-700 bg-primary-700 dark:border-primary dark:bg-primary"},outline:{label:"border-secondary-700 bg-transparent hover:bg-gray-100 dark:text-white dark:border-secondary-dark dark:hover:bg-gray-800",checked:"border-primary bg-primary/30 text-primary-700 hover:bg-primary/30 dark:border-primary-700 dark:bg-primary/30 dark:text-white dark:hover:bg-primary/30",radio:"border-gray-300 dark:border-secondary-dark",checkedRadio:"border-primary bg-primary-700 dark:border-primary dark:bg-primary"}},J=({children:t,text:s,showArrow:n=!0,placement:o="top",offset:l=8,bgColor:d="bg-gray-800 dark:bg-gray-600",isOpen:i,onOpenChange:c,disabled:m=!1,animationDuration:u=300,delay:x=700})=>{const[g,b]=r.useState(!1),p=i??g,h={...(()=>{switch(o){case"top":default:return{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:`${l}px`}
22
22
  case"bottom":return{top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:`${l}px`}
23
23
  case"left":return{right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:`${l}px`}
24
24
  case"right":return{left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:`${l}px`}}})(),transitionDelay:p&&!i?`${x}ms`:"0ms",transitionDuration:`${u}ms`}
25
- return m?e.jsx(e.Fragment,{children:t}):e.jsxs("div",{className:"relative inline-block group",onMouseEnter:()=>b(!0),onMouseLeave:()=>{void 0!==i&&c?.(!1),b(!1)},children:[t,e.jsxs("div",{className:a.cn(`absolute text-white text-[.70rem] font-medium tracking-tight rounded py-1 px-2 z-10 transition-all ${d}`,p?"opacity-100 visible":"opacity-0 invisible"),style:h,children:[s,o&&e.jsx("div",{className:`absolute w-2 h-2 ${d}`,style:(()=>{switch(n){case"top":default:return{bottom:"-4px",left:"50%",transform:"translateX(-50%) rotate(45deg)"}
25
+ return m?e.jsx(e.Fragment,{children:t}):e.jsxs("div",{className:"relative inline-block group",onMouseEnter:()=>b(!0),onMouseLeave:()=>{void 0!==i&&c?.(!1),b(!1)},children:[t,e.jsxs("div",{className:a.cn(`absolute text-white text-[.70rem] font-medium tracking-tight rounded py-1 px-2 z-10 transition-all ${d}`,p?"opacity-100 visible":"opacity-0 invisible"),style:h,children:[s,n&&e.jsx("div",{className:`absolute w-2 h-2 ${d}`,style:(()=>{switch(o){case"top":default:return{bottom:"-4px",left:"50%",transform:"translateX(-50%) rotate(45deg)"}
26
26
  case"bottom":return{top:"-4px",left:"50%",transform:"translateX(-50%) rotate(225deg)"}
27
27
  case"left":return{right:"-4px",top:"50%",transform:"translateY(-50%) rotate(135deg)"}
28
- case"right":return{left:"-4px",top:"50%",transform:"translateY(-50%) rotate(-45deg)"}}})()})]})]})},Q=r.forwardRef(({label:r,id:t,name:s,error:o,...n},l)=>e.jsxs("div",{className:"w-full",children:[r&&e.jsx("label",{htmlFor:t||s,className:"block text-sm font-medium mb-1 text-gray-900 dark:text-neutral-100",children:r}),e.jsx("input",{ref:l,id:t||s,name:s,className:a.cn("block w-full px-3 py-2 border rounded-md shadow-sm sm:text-sm transition-colors","bg-white border-gray-200 text-gray-900 placeholder:text-gray-400","dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-100 dark:placeholder:text-neutral-500","focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary dark:focus:ring-primary-dark dark:focus:border-primary-dark",o&&"border-error dark:border-error-dark focus:ring-error focus:border-error dark:focus:ring-error-dark dark:focus:border-error-dark",n.disabled&&"opacity-50 bg-gray-100 dark:bg-neutral-800 cursor-not-allowed"),...n}),o&&e.jsx("p",{className:"mt-1 text-sm text-error dark:text-error-dark",children:o})]}))
28
+ case"right":return{left:"-4px",top:"50%",transform:"translateY(-50%) rotate(-45deg)"}}})()})]})]})},Q=r.forwardRef(({label:r,id:t,name:s,error:n,...o},l)=>e.jsxs("div",{className:"w-full",children:[r&&e.jsx("label",{htmlFor:t||s,className:"block text-sm font-medium mb-1 text-gray-900 dark:text-neutral-100",children:r}),e.jsx("input",{ref:l,id:t||s,name:s,className:a.cn("block w-full px-3 py-2 border rounded-md shadow-sm sm:text-sm transition-colors","bg-white border-gray-200 text-gray-900 placeholder:text-gray-400","dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-100 dark:placeholder:text-neutral-500","focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary dark:focus:ring-primary-dark dark:focus:border-primary-dark",n&&"border-error dark:border-error-dark focus:ring-error focus:border-error dark:focus:ring-error-dark dark:focus:border-error-dark",o.disabled&&"opacity-50 bg-gray-100 dark:bg-neutral-800 cursor-not-allowed"),...o}),n&&e.jsx("p",{className:"mt-1 text-sm text-error dark:text-error-dark",children:n})]}))
29
29
  Q.displayName="TextInput"
30
- const ee={primary:"bg-primary-30 dark:bg-primary-dark-30 hover:[&::-webkit-slider-thumb]:transition-all hover:[&::-webkit-slider-thumb]:duration-300 [&::-webkit-slider-thumb]:outline-5 hover:[&::-webkit-slider-thumb]:outline-10 [&::-webkit-slider-thumb]:outline-primary-30 [&::-webkit-slider-thumb]:bg-primary dark:[&::-webkit-slider-thumb]:bg-primary-dark [&::-webkit-slider-thumb]:outline-primary-30 dark:[&::-webkit-slider-thumb]:outline-primary-dark-30",error:"bg-error-30 dark:bg-error-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-error-30 [&::-webkit-slider-thumb]:bg-error dark:[&::-webkit-slider-thumb]:bg-error-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-error-dark-30",warning:"bg-warning-30 dark:bg-warning-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-warning-30 [&::-webkit-slider-thumb]:bg-warning dark:[&::-webkit-slider-thumb]:bg-warning-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-warning-dark-30",success:"bg-success-30 dark:bg-success-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-success-30 [&::-webkit-slider-thumb]:bg-success dark:[&::-webkit-slider-thumb]:bg-success-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-success-dark-30",info:"bg-info-30 dark:bg-info-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-info-30 [&::-webkit-slider-thumb]:bg-info dark:[&::-webkit-slider-thumb]:bg-info-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-info-dark-30",secondary:"bg-secondary dark:bg-secondary-dark [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-secondary [&::-webkit-slider-thumb]:bg-secondary-700 dark:[&::-webkit-slider-thumb]:bg-secondary-dark-700 dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-secondary-dark"},re={sm:"h-1 [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3 [&::-moz-range-thumb]:w-3 [&::-moz-range-thumb]:h-3",md:"h-2 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4",lg:"h-3 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:h-5 [&::-moz-range-thumb]:w-5 [&::-moz-range-thumb]:h-5",xl:"h-4 [&::-webkit-slider-thumb]:w-6 [&::-webkit-slider-thumb]:h-6 [&::-moz-range-thumb]:w-6 [&::-moz-range-thumb]:h-6"},ae={sm:"h-4 w-4 border-2",md:"h-6 w-6 border-3",lg:"h-8 w-8 border-4"},te={primary:"border-primary dark:border-primary-dark",error:"border-error dark:border-error-dark",warning:"border-warning dark:border-warning-dark",success:"border-success dark:border-success-dark",info:"border-info dark:border-info-dark",secondary:"border-secondary dark:border-secondary-dark"},se={sm:"text-xs",md:"text-sm",lg:"text-base"},oe={right:"flex-row",left:"flex-row-reverse",bottom:"flex-col",top:"flex-col-reverse"},ne={sm:"text-xs py-2 px-3",md:"text-sm py-3 px-4",lg:"text-base py-3.5 px-5"},le={line:{wrapper:"border-b border-secondary dark:border-secondary-dark",button:"whitespace-nowrap py-4 px-1 font-medium text-sm",active:"border-primary text-primary dark:text-primary-30 transition-all duration-300 ease-in-out",inactive:"border-transparent text-gray-500 hover:text-secondary-700 dark:text-white dark:hover:text-secondary-dark-700"},solid:{wrapper:"rounded-md p-1",button:"whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md",active:"bg-indigo-100 dark:bg-indigo-200 text-primary dark:text-primary-dark transition-all duration-300 ease-in-out",inactive:"text-gray-500 hover:text-secondary-700 dark:text-white dark:hover:text-secondary-dark-700"},subtle:{wrapper:"rounded-md bg-transparent p-1",button:"whitespace-nowrap py-2 px-4 font-medium text-sm",active:"text-white transition-all duration-300 ease-in-out z-10",inactive:"bg-transparent text-primary dark:text-primary-30 hover:text-primary-700"},inline:{wrapper:"border border-primary rounded-t-md border-b dark:border-primary-dark-30",button:"whitespace-nowrap py-2 px-4 font-medium text-sm z-10",active:"text-white transition-all duration-300 ease-in-out",inactive:"text-gray-500 hover:text-secondary-700 dark:text-white dark:hover:text-secondary-dark"},outline:{wrapper:"border border-primary dark:border-primary-dark-30 rounded-md p-1",button:"whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md",active:"bg-indigo-100 dark:bg-indigo-200 text-primary dark:text-primary-dark transition-all duration-300 ease-in-out",inactive:"text-gray-500 hover:text-secondary-700 dark:text-white dark:hover:text-secondary-dark"},plain:{wrapper:"",button:"whitespace-nowrap py-2 px-4 font-medium text-sm",active:"text-primary dark:text-primary-30 transition-all duration-300 ease-in-out",inactive:"text-gray-500 hover:text-secondary-700 dark:text-white dark:hover:text-secondary"}},de={line:"absolute bottom-0 h-1 bg-primary dark:bg-primary-30 transition-all duration-300 ease-in-out",solid:"absolute bottom-0 h-1 bg-primary transition-all duration-300 ease-in-out",subtle:"absolute bottom-0 h-full bg-primary rounded-md transition-all duration-300 ease-in-out",inline:"absolute bottom-0 h-full bg-primary border-t border-r border-l border-primary-700 rounded-tl-md rounded-tr-md transition-all duration-300 ease-in-out",outline:"absolute bottom-0 h-1 bg-primary transition-all duration-300 ease-in-out",plain:""},ie={success:"bg-success dark:bg-success-dark",info:"bg-info dark:bg-info-dark",error:"bg-error dark:bg-error-dark",warning:"bg-warning dark:bg-warning-dark",primary:"bg-primary dark:bg-primary-dark",default:"bg-secondary-700 dark:bg-secondary-dark"},ce={success:"border-success dark:border-success-dark md:before:border-success md:before:dark:border-success-dark",info:"border-info dark:border-info-dark md:before:border-info md:before:dark:border-info-dark",error:"border-error dark:border-error-dark md:before:border-error md:before:dark:border-error-dark",warning:"border-warning dark:border-warning-dark md:before:border-warning md:before:dark:border-warning-dark",primary:"border-primary dark:border-primary-dark md:before:border-primary md:before:dark:border-primary-dark",default:"border-secondary-700 dark:border-secondary-dark md:before:border-secondary md:before:dark:border-secondary-dark"},me=({position:t="left",lineColor:s="default",children:o})=>{const n=r.Children.map(o,e=>r.isValidElement(e)?r.cloneElement(e,{position:t}):e),l=ce[s]
31
- return e.jsx("ol",{className:a.cn("relative",{"border-s-2":"left"===t,"border-e-2":"right"===t,"border-s-2 md:border-s-0 md:before:content-[''] md:before:absolute md:before:top-0 md:before:left-1/2 md:before:h-full md:before:border-s-2 md:before:border-secondary md:before:dark:border-secondary-dark":"split"===t},l),children:n})}
32
- me.Item=({title:r,time:t,children:s,dotColor:o="default",icon:n,position:l})=>{const d=ie[o]
33
- return e.jsxs("li",{className:a.cn("mb-5",{"ms-8":"left"===l,"me-8 text-end":"right"===l,"ms-4 md:w-1/2 ps-4 md:odd:pe-8 md:odd:ms-0 md:odd:text-end md:even:ps-8 md:even:ms-auto":"split"===l}),children:[n?e.jsx("div",{className:a.cn("flex items-center justify-center absolute w-10 h-10 rounded-full mt-1.5 outline outline-white dark:outline-secondary",d,{"-start-[20px]":"left"===l||"split"===l&&"md:hidden","-end-[21px]":"right"===l,"-start-[21px] md:start-1/2 md:-ms-[19px]":"split"===l}),children:n}):e.jsx("div",{className:a.cn("absolute w-3 h-3 rounded-full mt-1.5 outline outline-white dark:outline-secondary",d,{"-start-[7px]":"left"===l||"split"===l&&"md:hidden","-end-[7px]":"right"===l,"-start-[7.1px] md:start-1/2 md:-ms-[4.7px]":"split"===l})}),e.jsx("time",{className:"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-secondary-dark",children:t}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:r}),e.jsx("p",{className:"mb-4 text-base font-normal text-secondary-foreground dark:text-secondary-foreground-dark",children:s})]})}
30
+ const ee={primary:"bg-primary-30 dark:bg-primary-dark-30 hover:[&::-webkit-slider-thumb]:transition-all hover:[&::-webkit-slider-thumb]:duration-300 [&::-webkit-slider-thumb]:outline-5 hover:[&::-webkit-slider-thumb]:outline-10 [&::-webkit-slider-thumb]:outline-primary-30 [&::-webkit-slider-thumb]:bg-primary dark:[&::-webkit-slider-thumb]:bg-primary-dark [&::-webkit-slider-thumb]:outline-primary-30 dark:[&::-webkit-slider-thumb]:outline-primary-dark-30",error:"bg-error-30 dark:bg-error-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-error-30 [&::-webkit-slider-thumb]:bg-error dark:[&::-webkit-slider-thumb]:bg-error-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-error-dark-30",warning:"bg-warning-30 dark:bg-warning-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-warning-30 [&::-webkit-slider-thumb]:bg-warning dark:[&::-webkit-slider-thumb]:bg-warning-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-warning-dark-30",success:"bg-success-30 dark:bg-success-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-success-30 [&::-webkit-slider-thumb]:bg-success dark:[&::-webkit-slider-thumb]:bg-success-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-success-dark-30",info:"bg-info-30 dark:bg-info-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-info-30 [&::-webkit-slider-thumb]:bg-info dark:[&::-webkit-slider-thumb]:bg-info-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-info-dark-30",secondary:"bg-secondary dark:bg-secondary-dark [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-secondary [&::-webkit-slider-thumb]:bg-secondary-700 dark:[&::-webkit-slider-thumb]:bg-secondary-dark-700 dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-secondary-dark"},re={sm:"h-1 [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3 [&::-moz-range-thumb]:w-3 [&::-moz-range-thumb]:h-3",md:"h-2 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:h-4",lg:"h-3 [&::-webkit-slider-thumb]:w-5 [&::-webkit-slider-thumb]:h-5 [&::-moz-range-thumb]:w-5 [&::-moz-range-thumb]:h-5",xl:"h-4 [&::-webkit-slider-thumb]:w-6 [&::-webkit-slider-thumb]:h-6 [&::-moz-range-thumb]:w-6 [&::-moz-range-thumb]:h-6"},ae={sm:"h-4 w-4 border-2",md:"h-6 w-6 border-3",lg:"h-8 w-8 border-4"},te={primary:"border-primary dark:border-primary-dark",error:"border-error dark:border-error-dark",warning:"border-warning dark:border-warning-dark",success:"border-success dark:border-success-dark",info:"border-info dark:border-info-dark",secondary:"border-secondary dark:border-secondary-dark"},se={sm:"text-xs",md:"text-sm",lg:"text-base"},ne={right:"flex-row",left:"flex-row-reverse",bottom:"flex-col",top:"flex-col-reverse"},oe={sm:"text-xs py-2 px-3",md:"text-sm py-3 px-4",lg:"text-base py-3.5 px-5"},le={line:{wrapper:"border-b border-gray-200 dark:border-neutral-800",button:"whitespace-nowrap py-3 px-3 font-medium text-sm",active:"text-primary dark:text-primary-dark",inactive:"text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100"},solid:{wrapper:"rounded-lg bg-gray-100 dark:bg-neutral-900 border border-gray-200 dark:border-neutral-800 p-1",button:"whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md",active:"bg-primary/15 dark:bg-primary/25 text-primary dark:text-neutral-100",inactive:"text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100"},subtle:{wrapper:"rounded-lg bg-transparent p-1",button:"whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md",active:"text-white",inactive:"text-gray-600 hover:text-primary dark:text-neutral-400 dark:hover:text-neutral-100"},inline:{wrapper:"border-b border-gray-200 dark:border-neutral-800",button:"whitespace-nowrap py-2 px-4 font-medium text-sm rounded-t-md",active:"text-white",inactive:"text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100"},outline:{wrapper:"border border-gray-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 rounded-lg p-1",button:"whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md",active:"bg-primary/15 dark:bg-primary/25 text-primary dark:text-neutral-100",inactive:"text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100"},plain:{wrapper:"",button:"whitespace-nowrap py-2 px-3 font-medium text-sm",active:"text-primary dark:text-primary-dark",inactive:"text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100"}},de={line:"absolute bottom-0 h-0.5 bg-primary dark:bg-primary-dark transition-all duration-300 ease-in-out z-0",solid:"absolute bottom-0 h-0.5 bg-primary dark:bg-primary-dark rounded-full transition-all duration-300 ease-in-out z-0",subtle:"absolute inset-y-0 bg-primary dark:bg-primary-dark rounded-md transition-all duration-300 ease-in-out z-0",inline:"absolute inset-y-0 bg-primary dark:bg-primary-dark rounded-t-md transition-all duration-300 ease-in-out z-0",outline:"absolute bottom-0 h-0.5 bg-primary dark:bg-primary-dark rounded-full transition-all duration-300 ease-in-out z-0",plain:"hidden"},ie={success:"bg-success dark:bg-success-dark",info:"bg-info dark:bg-info-dark",error:"bg-error dark:bg-error-dark",warning:"bg-warning dark:bg-warning-dark",primary:"bg-primary dark:bg-primary-dark",default:"bg-secondary-700 dark:bg-secondary-dark"},ce={success:"border-success dark:border-success-dark md:before:border-success md:before:dark:border-success-dark",info:"border-info dark:border-info-dark md:before:border-info md:before:dark:border-info-dark",error:"border-error dark:border-error-dark md:before:border-error md:before:dark:border-error-dark",warning:"border-warning dark:border-warning-dark md:before:border-warning md:before:dark:border-warning-dark",primary:"border-primary dark:border-primary-dark md:before:border-primary md:before:dark:border-primary-dark",default:"border-secondary-700 dark:border-secondary-dark md:before:border-secondary md:before:dark:border-secondary-dark"},me=({position:t="left",lineColor:s="default",children:n})=>{const o=r.Children.map(n,e=>r.isValidElement(e)?r.cloneElement(e,{position:t}):e),l=ce[s]
31
+ return e.jsx("ol",{className:a.cn("relative",{"border-s-2":"left"===t,"border-e-2":"right"===t,"border-s-2 md:border-s-0 md:before:content-[''] md:before:absolute md:before:top-0 md:before:left-1/2 md:before:h-full md:before:border-s-2 md:before:border-secondary md:before:dark:border-secondary-dark":"split"===t},l),children:o})}
32
+ me.Item=({title:r,time:t,children:s,dotColor:n="default",icon:o,position:l})=>{const d=ie[n]
33
+ return e.jsxs("li",{className:a.cn("mb-5",{"ms-8":"left"===l,"me-8 text-end":"right"===l,"ms-4 md:w-1/2 ps-4 md:odd:pe-8 md:odd:ms-0 md:odd:text-end md:even:ps-8 md:even:ms-auto":"split"===l}),children:[o?e.jsx("div",{className:a.cn("flex items-center justify-center absolute w-10 h-10 rounded-full mt-1.5 outline outline-white dark:outline-secondary",d,{"-start-[20px]":"left"===l||"split"===l&&"md:hidden","-end-[21px]":"right"===l,"-start-[21px] md:start-1/2 md:-ms-[19px]":"split"===l}),children:o}):e.jsx("div",{className:a.cn("absolute w-3 h-3 rounded-full mt-1.5 outline outline-white dark:outline-secondary",d,{"-start-[7px]":"left"===l||"split"===l&&"md:hidden","-end-[7px]":"right"===l,"-start-[7.1px] md:start-1/2 md:-ms-[4.7px]":"split"===l})}),e.jsx("time",{className:"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-secondary-dark",children:t}),e.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:r}),e.jsx("p",{className:"mb-4 text-base font-normal text-secondary-foreground dark:text-secondary-foreground-dark",children:s})]})}
34
34
  const ue={primary:"peer-checked:bg-primary dark:peer-checked:bg-primary-dark",error:"peer-checked:bg-error dark:peer-checked:bg-error-dark",warning:"peer-checked:bg-warning dark:peer-checked:bg-warning-dark",success:"peer-checked:bg-success dark:peer-checked:bg-success-dark",info:"peer-checked:bg-info dark:peer-checked:bg-info-dark",secondary:"peer-checked:bg-secondary dark:peer-checked:bg-secondary-dark"},xe={stadium:"rounded-full after:rounded-full",rounded:"rounded-md after:rounded-sm"},ge={sm:"w-9 h-5 after:h-4 after:w-4 after:start-[2px] after:top-[2px] peer-checked:after:translate-x-[16px] rtl:peer-checked:after:-translate-x-[16px]",md:"w-11 h-6 after:h-5 after:w-5 after:start-[2px] after:top-[2px] peer-checked:after:translate-x-[20px] rtl:peer-checked:after:-translate-x-[20px]",lg:"w-14 h-7 after:h-6 after:w-6 after:start-[2px] after:top-[2px] peer-checked:after:translate-x-[28px] rtl:peer-checked:after:-translate-x-[28px]"}
35
- exports.Accordion=({data:t,openIndex:s,single:o=!0,onToggleItem:n,icon:l,...d})=>{const i=void 0!==s&&void 0!==n,[c,m]=r.useState([]),u=i?Array.isArray(s)?s:null!=s?[s]:[]:c
35
+ exports.Accordion=({data:t,openIndex:s,single:n=!0,onToggleItem:o,icon:l,...d})=>{const i=void 0!==s&&void 0!==o,[c,m]=r.useState([]),u=i?Array.isArray(s)?s:null!=s?[s]:[]:c
36
36
  return e.jsx("div",{className:"space-y-2",...d,children:t.map((r,t)=>{const s=u.includes(t)
37
- return e.jsxs("div",{className:"border border-gray-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 rounded-lg overflow-hidden transition-colors",children:[e.jsxs("button",{type:"button","aria-expanded":s,onClick:()=>(e=>{const r=u.includes(e),a=o?r?[]:[e]:r?u.filter(r=>r!==e):[...u,e]
38
- i?n?.(o?a[0]??null:a):m(a)})(t),className:"w-full flex justify-between items-center p-4 text-left text-gray-900 dark:text-neutral-100 hover:bg-gray-50 dark:hover:bg-neutral-800/70 transition-colors cursor-pointer",children:[e.jsx("span",{className:"font-semibold",children:r.label}),"function"==typeof l?l(s):l??e.jsx("svg",{className:a.cn("w-5 h-5 shrink-0 text-gray-500 dark:text-neutral-400 transition-transform duration-200",s&&"rotate-180"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("path",{d:"M19 9l-7 7-7-7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e.jsx("div",{className:a.cn("overflow-hidden bg-gray-50/80 dark:bg-neutral-800/50 px-4 text-sm text-gray-600 dark:text-neutral-300 transition-all duration-200",s?"max-h-96 py-4 border-t border-gray-200 dark:border-neutral-800":"max-h-0"),children:r.description})]},t)})})},exports.Alert=({title:t,description:s,icon:d,action:i,withClose:c=!1,type:m="default",variant:u="outline"})=>{const[x,g]=r.useState(!0)
37
+ return e.jsxs("div",{className:"border border-gray-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 rounded-lg overflow-hidden transition-colors",children:[e.jsxs("button",{type:"button","aria-expanded":s,onClick:()=>(e=>{const r=u.includes(e),a=n?r?[]:[e]:r?u.filter(r=>r!==e):[...u,e]
38
+ i?o?.(n?a[0]??null:a):m(a)})(t),className:"w-full flex justify-between items-center p-4 text-left text-gray-900 dark:text-neutral-100 hover:bg-gray-50 dark:hover:bg-neutral-800/70 transition-colors cursor-pointer",children:[e.jsx("span",{className:"font-semibold",children:r.label}),"function"==typeof l?l(s):l??e.jsx("svg",{className:a.cn("w-5 h-5 shrink-0 text-gray-500 dark:text-neutral-400 transition-transform duration-200",s&&"rotate-180"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("path",{d:"M19 9l-7 7-7-7",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e.jsx("div",{className:a.cn("overflow-hidden bg-gray-50/80 dark:bg-neutral-800/50 px-4 text-sm text-gray-600 dark:text-neutral-300 transition-all duration-200",s?"max-h-96 py-4 border-t border-gray-200 dark:border-neutral-800":"max-h-0"),children:r.description})]},t)})})},exports.Alert=({title:t,description:s,icon:d,action:i,withClose:c=!1,type:m="default",variant:u="outline"})=>{const[x,g]=r.useState(!0)
39
39
  if(!x)return null
40
40
  const b=i?e.jsx("div",{className:"mt-2",children:"function"==typeof i?i():i}):null
41
- return e.jsxs("div",{id:"alopeAlert",className:a.cn("flex gap-2 p-4 rounded-md w-full",l[m],o[u]),children:[d??e.jsx("svg",{viewBox:"0 0 24 24",className:a.cn("w-6 h-6 shrink-0",n[m]),children:e.jsx("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z"})}),e.jsxs("div",{className:"flex md:flex-row flex-col justify-between md:items-center w-full",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("p",{className:"font-medium",children:t}),s&&e.jsx("p",{className:"text-sm",children:s}),c&&b]}),!c&&b&&e.jsx("div",{children:b})]}),c&&e.jsx("svg",{onClick:()=>g(!1),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",className:"w-6 h-6 shrink-0 hover:cursor-pointer",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})]})},exports.Avatar=x,exports.AvatarGroup=({avatars:r,maxVisible:t=3,size:s="md",shape:o="rounded",overlap:n=12})=>{const l=r.slice(0,t),d=r.length-t,i=g[s],c=b[o],m={marginLeft:`-${Math.abs(n)}px`}
42
- return e.jsxs("div",{className:"inline-flex items-center",children:[l.map((r,t)=>e.jsx("div",{style:0!==t?m:void 0,className:a.cn("relative inline-flex shrink-0 ring-2 ring-white dark:ring-neutral-900 transition-transform duration-150 hover:z-10 hover:-translate-y-0.5",c),children:e.jsx(x,{...r,size:s,shape:o,ring:!1})},t)),d>0&&e.jsxs("div",{style:l.length>0?m:void 0,"aria-label":`${d} more avatars`,className:a.cn("relative inline-flex shrink-0 items-center justify-center font-semibold select-none","bg-secondary dark:bg-secondary-dark text-secondary-foreground dark:text-neutral-900","ring-2 ring-white dark:ring-neutral-900",i,c),children:["+",d]})]})},exports.Badge=({children:r,color:t="default",position:s,prefixIcon:o,suffixIcon:n,...l})=>{const d=p[t],i=s?h[s]:""
43
- return e.jsxs("span",{...l,className:a.cn("inline-flex items-center gap-1 px-3 py-1 rounded-full text-sm font-semibold",d,i),children:[o&&e.jsx("span",{className:"inline-flex shrink-0",children:o}),r,n&&e.jsx("span",{className:"inline-flex shrink-0",children:n})]})},exports.BottomNavbar=({children:a,className:t,value:s,onChangeValue:o})=>e.jsx("div",{className:`fixed bottom-0 left-0 z-50 w-full bg-white border-t border-secondary dark:bg-gray-800 dark:border-secondary-dark-700 ${t??""}`,children:e.jsx("div",{className:"flex items-center justify-center h-full max-w-lg md:max-w-md mx-auto font-medium",children:r.Children.map(a,e=>r.isValidElement(e)&&e.type===k?r.cloneElement(e,{selectedValue:s,onChangeValue:o}):(process.env.NODE_ENV,null))})}),exports.BottomNavbarAction=k,exports.Breadcrumb=({data:r,color:s="primary",separator:o="/"})=>e.jsx("nav",{"aria-label":"breadcrumb",className:"mb-5",children:e.jsx("ol",{className:"flex flex-wrap items-center gap-2 text-sm",children:r.map((n,l)=>{const d=null===n.path||l===r.length-1
44
- return e.jsxs("li",{className:"flex items-center",children:[d?e.jsxs("span",{"aria-current":"page",className:a.cn("flex items-center font-medium",f[s]),children:[n.icon&&e.jsx("span",{className:"mr-1.5",children:n.icon}),n.label]}):n.path?e.jsxs(t.Link,{to:n.path,className:"flex items-center text-zinc-400 transition-colors hover:text-zinc-700 dark:text-zinc-500 dark:hover:text-zinc-300",children:[n.icon&&e.jsx("span",{className:"mr-1.5",children:n.icon}),n.label]}):e.jsxs("span",{className:"flex items-center text-zinc-400 dark:text-zinc-500",children:[n.icon&&e.jsx("span",{className:"mr-1.5",children:n.icon}),n.label]}),!d&&e.jsx("span",{"aria-hidden":"true",className:"ml-2 select-none text-zinc-300 dark:text-zinc-700",children:o})]},l)})})}),exports.Button=({children:r,onClick:s,size:o="md",to:n,type:l="button",disabled:d=!1,variant:i="solid",color:c="primary",radius:m="regular",fullWidth:u=!1,prefixIcon:x,suffixIcon:g})=>{const b=w[m],p=j(i,c),h=y[o]||"",k=d?"opacity-50 cursor-not-allowed":"cursor-pointer",f=u?"w-full":"",v=a.cn("inline-flex items-center justify-center transition-all duration-[170ms] hover:scale-[98%]",p,h,k,f,b)
45
- return n?e.jsxs(t.Link,{to:n,className:v,children:[x&&e.jsx("span",{className:"mr-2",children:x}),r,g&&e.jsx("span",{className:"ml-2",children:g})]}):e.jsxs("button",{disabled:d,type:l,onClick:s,className:v,children:[x&&e.jsx("span",{className:"mr-2",children:x}),r,g&&e.jsx("span",{className:"ml-2",children:g})]})},exports.ButtonVariantsMap=v,exports.Card=({title:r,description:t,image:s,onClick:o,footer:n,horizontal:l=!1,size:d="md",ribbon:i,ribbonColor:c="error",children:m})=>{const u=Boolean(o)
46
- return e.jsxs("div",{onClick:o,onKeyDown:u?e=>{o&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o()))}:void 0,role:u?"button":void 0,tabIndex:u?0:void 0,className:a.cn("group relative w-full rounded-xl overflow-hidden transition-all duration-200","bg-white dark:bg-neutral-900 border border-gray-200 dark:border-neutral-800 shadow-md",N[d],l?"flex flex-col md:flex-row":"flex flex-col",u&&"cursor-pointer hover:shadow-xl hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary dark:focus-visible:ring-primary-dark"),children:[i&&e.jsx("span",{className:a.cn("absolute z-10 w-[140px] py-1 text-center text-[11px] font-semibold tracking-wide uppercase shadow-sm select-none",C[c],l?"top-3.5 -left-[38px] -rotate-45":"top-3.5 -right-[38px] rotate-45"),children:i}),m??e.jsxs(e.Fragment,{children:[(()=>{if(!s)return null
41
+ return e.jsxs("div",{id:"alopeAlert",className:a.cn("flex gap-2 p-4 rounded-md w-full",l[m],n[u]),children:[d??e.jsx("svg",{viewBox:"0 0 24 24",className:a.cn("w-6 h-6 shrink-0",o[m]),children:e.jsx("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z"})}),e.jsxs("div",{className:"flex md:flex-row flex-col justify-between md:items-center w-full",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("p",{className:"font-medium",children:t}),s&&e.jsx("p",{className:"text-sm",children:s}),c&&b]}),!c&&b&&e.jsx("div",{children:b})]}),c&&e.jsx("svg",{onClick:()=>g(!1),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",className:"w-6 h-6 shrink-0 hover:cursor-pointer",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})]})},exports.Avatar=x,exports.AvatarGroup=({avatars:r,maxVisible:t=3,size:s="md",shape:n="rounded",overlap:o=12})=>{const l=r.slice(0,t),d=r.length-t,i=g[s],c=b[n],m={marginLeft:`-${Math.abs(o)}px`}
42
+ return e.jsxs("div",{className:"inline-flex items-center",children:[l.map((r,t)=>e.jsx("div",{style:0!==t?m:void 0,className:a.cn("relative inline-flex shrink-0 ring-2 ring-white dark:ring-neutral-900 transition-transform duration-150 hover:z-10 hover:-translate-y-0.5",c),children:e.jsx(x,{...r,size:s,shape:n,ring:!1})},t)),d>0&&e.jsxs("div",{style:l.length>0?m:void 0,"aria-label":`${d} more avatars`,className:a.cn("relative inline-flex shrink-0 items-center justify-center font-semibold select-none","bg-secondary dark:bg-secondary-dark text-secondary-foreground dark:text-neutral-900","ring-2 ring-white dark:ring-neutral-900",i,c),children:["+",d]})]})},exports.Badge=({children:r,color:t="default",position:s,prefixIcon:n,suffixIcon:o,...l})=>{const d=p[t],i=s?h[s]:""
43
+ return e.jsxs("span",{...l,className:a.cn("inline-flex items-center gap-1 px-3 py-1 rounded-full text-sm font-semibold",d,i),children:[n&&e.jsx("span",{className:"inline-flex shrink-0",children:n}),r,o&&e.jsx("span",{className:"inline-flex shrink-0",children:o})]})},exports.BottomNavbar=({children:a,className:t,value:s,onChangeValue:n})=>e.jsx("div",{className:`fixed bottom-0 left-0 z-50 w-full bg-white border-t border-secondary dark:bg-gray-800 dark:border-secondary-dark-700 ${t??""}`,children:e.jsx("div",{className:"flex items-center justify-center h-full max-w-lg md:max-w-md mx-auto font-medium",children:r.Children.map(a,e=>r.isValidElement(e)&&e.type===k?r.cloneElement(e,{selectedValue:s,onChangeValue:n}):(process.env.NODE_ENV,null))})}),exports.BottomNavbarAction=k,exports.Breadcrumb=({data:r,color:s="primary",separator:n="/"})=>e.jsx("nav",{"aria-label":"breadcrumb",className:"mb-5",children:e.jsx("ol",{className:"flex flex-wrap items-center gap-2 text-sm",children:r.map((o,l)=>{const d=null===o.path||l===r.length-1
44
+ return e.jsxs("li",{className:"flex items-center",children:[d?e.jsxs("span",{"aria-current":"page",className:a.cn("flex items-center font-medium",f[s]),children:[o.icon&&e.jsx("span",{className:"mr-1.5",children:o.icon}),o.label]}):o.path?e.jsxs(t.Link,{to:o.path,className:"flex items-center text-zinc-400 transition-colors hover:text-zinc-700 dark:text-zinc-500 dark:hover:text-zinc-300",children:[o.icon&&e.jsx("span",{className:"mr-1.5",children:o.icon}),o.label]}):e.jsxs("span",{className:"flex items-center text-zinc-400 dark:text-zinc-500",children:[o.icon&&e.jsx("span",{className:"mr-1.5",children:o.icon}),o.label]}),!d&&e.jsx("span",{"aria-hidden":"true",className:"ml-2 select-none text-zinc-300 dark:text-zinc-700",children:n})]},l)})})}),exports.Button=({children:r,onClick:s,size:n="md",to:o,type:l="button",disabled:d=!1,variant:i="solid",color:c="primary",radius:m="regular",fullWidth:u=!1,prefixIcon:x,suffixIcon:g})=>{const b=w[m],p=j(i,c),h=y[n]||"",k=d?"opacity-50 cursor-not-allowed":"cursor-pointer",f=u?"w-full":"",v=a.cn("inline-flex items-center justify-center transition-all duration-[170ms] hover:scale-[98%]",p,h,k,f,b)
45
+ return o?e.jsxs(t.Link,{to:o,className:v,children:[x&&e.jsx("span",{className:"mr-2",children:x}),r,g&&e.jsx("span",{className:"ml-2",children:g})]}):e.jsxs("button",{disabled:d,type:l,onClick:s,className:v,children:[x&&e.jsx("span",{className:"mr-2",children:x}),r,g&&e.jsx("span",{className:"ml-2",children:g})]})},exports.ButtonVariantsMap=v,exports.Card=({title:r,description:t,image:s,onClick:n,footer:o,horizontal:l=!1,size:d="md",ribbon:i,ribbonColor:c="error",children:m})=>{const u=Boolean(n)
46
+ return e.jsxs("div",{onClick:n,onKeyDown:u?e=>{n&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n()))}:void 0,role:u?"button":void 0,tabIndex:u?0:void 0,className:a.cn("group relative w-full rounded-xl overflow-hidden transition-all duration-200","bg-white dark:bg-neutral-900 border border-gray-200 dark:border-neutral-800 shadow-md",N[d],l?"flex flex-col md:flex-row":"flex flex-col",u&&"cursor-pointer hover:shadow-xl hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary dark:focus-visible:ring-primary-dark"),children:[i&&e.jsx("span",{className:a.cn("absolute z-10 w-[140px] py-1 text-center text-[11px] font-semibold tracking-wide uppercase shadow-sm select-none",C[c],l?"top-3.5 -left-[38px] -rotate-45":"top-3.5 -right-[38px] rotate-45"),children:i}),m??e.jsxs(e.Fragment,{children:[(()=>{if(!s)return null
47
47
  const t=a.cn("shrink-0 overflow-hidden bg-gray-100 dark:bg-neutral-800",l?"w-full h-48 md:h-auto md:w-2/5":"w-full h-48")
48
- return"string"==typeof s?e.jsx("div",{className:t,children:e.jsx("img",{src:s,alt:r||"Card media",className:a.cn("w-full h-full object-cover",u&&"transition-transform duration-300 group-hover:scale-105")})}):e.jsx("div",{className:t,children:s})})(),e.jsxs("div",{className:"flex flex-col justify-between flex-1 p-5",children:[e.jsxs("div",{children:[r&&e.jsx("h3",{className:"text-lg font-semibold leading-snug text-gray-900 dark:text-neutral-100 line-clamp-1",children:r}),t&&e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-gray-600 dark:text-neutral-400 line-clamp-3",children:t})]}),n&&e.jsx("div",{className:"mt-4 pt-3 border-t border-gray-100 dark:border-neutral-800",children:n})]})]})]})},exports.CheckboxInput=z,exports.CodeInput=({id:t,label:s,length:o,value:n,disabled:l,labelClassName:d,name:i,onCodeChange:c,inputSize:m="md",...u})=>{const x=r.useRef([]),g=S[m],b=e=>{const r=x.current.map(e=>e?.value||"").join("")
49
- c&&c(r),x.current[e]?.value&&e<o-1&&x.current[e+1]?.focus()}
50
- return e.jsxs("div",{className:"flex flex-col gap-2",children:[s&&e.jsx("label",{htmlFor:t||i,className:a.cn("block text-sm font-medium mb-1 dark:text-white",d),children:s}),e.jsx("div",{className:"flex gap-2",onPaste:e=>{e.preventDefault(),e.clipboardData.getData("text").slice(0,o).split("").forEach((e,r)=>{x.current[r]&&(x.current[r].value=e,b(r))})},children:Array.from({length:o},(r,t)=>e.jsx("input",{ref:e=>{x.current[t]=e},type:"text",disabled:l,value:n?.[t],maxLength:1,onChange:()=>b(t),onKeyDown:e=>((e,r)=>{"Backspace"===e.key&&!x.current[r]?.value&&r>0&&x.current[r-1]?.focus()})(e,t),onFocus:()=>(e=>{const r=(()=>{for(let e=0;e<o;e++)if(!x.current[e]?.value)return e
51
- return-1})();-1!==r&&r<e&&x.current[r]?.focus()})(t),className:a.cn("text-center border rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary border-secondary dark:text-white dark:placeholder:text-white",g,{"bg-secondary/40 cursor-not-allowed ":l}),...u},t))})]})},exports.Collection=function({data:r,title:t,className:s,wrapperClassName:o,children:n,suffixIcon:l,activeItem:d,onChangeActive:i}){return e.jsxs("div",{className:a.cn("p-3 border border-secondary-700 inline-block dark:border-secondary-dark-700 rounded-md dark:text-white",s),children:[t&&e.jsx("h2",{className:"text-lg font-semibold mb-4",children:t}),r.length>0?e.jsx("ul",{className:a.cn("space-y-3",o),children:r.map((r,t)=>{const s=r.id===d
52
- return e.jsx("li",{children:n?e.jsx("div",{onClick:()=>i?.(r,t),children:n(r,t,s)}):e.jsxs("div",{onClick:()=>i?.(r,t),className:a.cn("p-3 border border-secondary-700 dark:border-secondary-dark-700 rounded-md flex gap-3 items-center justify-between cursor-pointer",{"bg-primary-100 dark:bg-primary-dark-100":s}),children:[e.jsx("p",{className:"font-bold",children:r.name||`Item ${r.id}`}),l&&e.jsx("span",{children:"function"==typeof l?l(r,t,s):l})]})},r.id)})}):e.jsx("p",{children:"No items to display."})]})},exports.FAB=({children:t,direction:s="vertical",size:o="md",variant:n="solid",variantType:l="primary",isOpen:d,onOpen:i,icon:c="+"})=>{const[m,u]=r.useState(d),[x,g]=r.useState(!1)
48
+ return"string"==typeof s?e.jsx("div",{className:t,children:e.jsx("img",{src:s,alt:r||"Card media",className:a.cn("w-full h-full object-cover",u&&"transition-transform duration-300 group-hover:scale-105")})}):e.jsx("div",{className:t,children:s})})(),e.jsxs("div",{className:"flex flex-col justify-between flex-1 p-5",children:[e.jsxs("div",{children:[r&&e.jsx("h3",{className:"text-lg font-semibold leading-snug text-gray-900 dark:text-neutral-100 line-clamp-1",children:r}),t&&e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-gray-600 dark:text-neutral-400 line-clamp-3",children:t})]}),o&&e.jsx("div",{className:"mt-4 pt-3 border-t border-gray-100 dark:border-neutral-800",children:o})]})]})]})},exports.CheckboxInput=z,exports.CodeInput=({id:t,label:s,length:n,value:o,disabled:l,labelClassName:d,name:i,onCodeChange:c,inputSize:m="md",...u})=>{const x=r.useRef([]),g=$[m],b=e=>{const r=x.current.map(e=>e?.value||"").join("")
49
+ c&&c(r),x.current[e]?.value&&e<n-1&&x.current[e+1]?.focus()}
50
+ return e.jsxs("div",{className:"flex flex-col gap-2",children:[s&&e.jsx("label",{htmlFor:t||i,className:a.cn("block text-sm font-medium mb-1 dark:text-white",d),children:s}),e.jsx("div",{className:"flex gap-2",onPaste:e=>{e.preventDefault(),e.clipboardData.getData("text").slice(0,n).split("").forEach((e,r)=>{x.current[r]&&(x.current[r].value=e,b(r))})},children:Array.from({length:n},(r,t)=>e.jsx("input",{ref:e=>{x.current[t]=e},type:"text",disabled:l,value:o?.[t],maxLength:1,onChange:()=>b(t),onKeyDown:e=>((e,r)=>{"Backspace"===e.key&&!x.current[r]?.value&&r>0&&x.current[r-1]?.focus()})(e,t),onFocus:()=>(e=>{const r=(()=>{for(let e=0;e<n;e++)if(!x.current[e]?.value)return e
51
+ return-1})();-1!==r&&r<e&&x.current[r]?.focus()})(t),className:a.cn("text-center border rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary border-secondary dark:text-white dark:placeholder:text-white",g,{"bg-secondary/40 cursor-not-allowed ":l}),...u},t))})]})},exports.Collection=function({data:r,title:t,className:s,wrapperClassName:n,children:o,suffixIcon:l,activeItem:d,onChangeActive:i}){return e.jsxs("div",{className:a.cn("p-3 border border-secondary-700 inline-block dark:border-secondary-dark-700 rounded-md dark:text-white",s),children:[t&&e.jsx("h2",{className:"text-lg font-semibold mb-4",children:t}),r.length>0?e.jsx("ul",{className:a.cn("space-y-3",n),children:r.map((r,t)=>{const s=r.id===d
52
+ return e.jsx("li",{children:o?e.jsx("div",{onClick:()=>i?.(r,t),children:o(r,t,s)}):e.jsxs("div",{onClick:()=>i?.(r,t),className:a.cn("p-3 border border-secondary-700 dark:border-secondary-dark-700 rounded-md flex gap-3 items-center justify-between cursor-pointer",{"bg-primary-100 dark:bg-primary-dark-100":s}),children:[e.jsx("p",{className:"font-bold",children:r.name||`Item ${r.id}`}),l&&e.jsx("span",{children:"function"==typeof l?l(r,t,s):l})]})},r.id)})}):e.jsx("p",{children:"No items to display."})]})},exports.FAB=({children:t,direction:s="vertical",size:n="md",variant:o="solid",variantType:l="primary",isOpen:d,onOpen:i,icon:c="+"})=>{const[m,u]=r.useState(d),[x,g]=r.useState(!1)
53
53
  r.useEffect(()=>{if(d)u(!0),g(!1)
54
54
  else if(m){g(!0)
55
55
  const e=setTimeout(()=>{u(!1),g(!1)},300)
56
56
  return()=>clearTimeout(e)}},[d,m])
57
- const b=T[o],p=j(n,l),h=r.Children.toArray(t).map((t,s,o)=>{if(!r.isValidElement(t))return t
58
- const n=o.length-1-s
59
- return e.jsx("div",{style:{animationDelay:(x?100*n:100*s)+"ms"},className:a.cn(!x&&"opacity-0",x?"animate-pop-out":"animate-pop"),children:t},s)})
60
- return e.jsx("div",{className:"fixed bottom-8 right-8 flex flex-col items-end z-50",children:e.jsxs("div",{className:"vertical"===s?"block":"flex",children:[e.jsx("div",{className:a.cn("flex items-center transition-all duration-300 ease-in-out",{vertical:"flex-col-reverse space-y-2 space-y-reverse mb-2",horizontal:"flex-row-reverse space-x-2 space-x-reverse mr-2"}[s]),children:m&&h}),e.jsx("button",{onClick:i,className:a.cn("shadow-lg flex w-full items-center justify-center hover:cursor-pointer",b,p),"aria-expanded":d,"aria-haspopup":"true",children:e.jsx("span",{className:"transform transition-transform duration-300 "+(d?"rotate-45":"rotate-0"),children:c})})]})})},exports.FileUpload=({acceptedFiles:t="image/*",maxFiles:s=1,inputLabel:o,maxKiloByte:n=2048,helperText:l,mediaCapture:d,mode:i="dropzone",clearable:c=!0,onFilesChange:m})=>{const[u,x]=r.useState([]),[g,b]=r.useState(""),[p,h]=r.useState(!1),k=r.useRef(null),f=e=>{const r=e.target.files?Array.from(e.target.files):[]
57
+ const b=S[n],p=j(o,l),h=r.Children.toArray(t).map((t,s,n)=>{if(!r.isValidElement(t))return t
58
+ const o=n.length-1-s
59
+ return e.jsx("div",{style:{animationDelay:(x?100*o:100*s)+"ms"},className:a.cn(!x&&"opacity-0",x?"animate-pop-out":"animate-pop"),children:t},s)})
60
+ return e.jsx("div",{className:"fixed bottom-8 right-8 flex flex-col items-end z-50",children:e.jsxs("div",{className:"vertical"===s?"block":"flex",children:[e.jsx("div",{className:a.cn("flex items-center transition-all duration-300 ease-in-out",{vertical:"flex-col-reverse space-y-2 space-y-reverse mb-2",horizontal:"flex-row-reverse space-x-2 space-x-reverse mr-2"}[s]),children:m&&h}),e.jsx("button",{onClick:i,className:a.cn("shadow-lg flex w-full items-center justify-center hover:cursor-pointer",b,p),"aria-expanded":d,"aria-haspopup":"true",children:e.jsx("span",{className:"transform transition-transform duration-300 "+(d?"rotate-45":"rotate-0"),children:c})})]})})},exports.FileUpload=({acceptedFiles:t="image/*",maxFiles:s=1,inputLabel:n,maxKiloByte:o=2048,helperText:l,mediaCapture:d,mode:i="dropzone",clearable:c=!0,onFilesChange:m})=>{const[u,x]=r.useState([]),[g,b]=r.useState(""),[p,h]=r.useState(!1),k=r.useRef(null),f=e=>{const r=e.target.files?Array.from(e.target.files):[]
61
61
  if(0===r.length)return
62
62
  const a=v(r)
63
63
  if(!a.length)return
64
64
  const t=1===s?a.slice(0,1):[...u,...a].slice(0,s)
65
- x(t),m(t),b(""),k.current.value=""},y=e=>{e.preventDefault(),h(!0)},w=()=>{k.current&&k.current.click()},v=e=>{const r=1024*n,a=e.find(e=>e.size>r)
66
- if(a)return b(`File "${a.name}" exceeds size limit of ${(n/1024).toFixed(2)} MB.`),k.current.value="",[]
67
- const o=e.find(e=>{return r=e,!t.split(",").map(e=>e.trim()).some(e=>{if(""===e)return!1
65
+ x(t),m(t),b(""),k.current.value=""},y=e=>{e.preventDefault(),h(!0)},w=()=>{k.current&&k.current.click()},v=e=>{const r=1024*o,a=e.find(e=>e.size>r)
66
+ if(a)return b(`File "${a.name}" exceeds size limit of ${(o/1024).toFixed(2)} MB.`),k.current.value="",[]
67
+ const n=e.find(e=>{return r=e,!t.split(",").map(e=>e.trim()).some(e=>{if(""===e)return!1
68
68
  if(e===r.type)return!0
69
69
  if(e.endsWith("/*")){const a=e.split("/")[0]
70
70
  return r.type.startsWith(a+"/")}return!!e.startsWith(".")&&r.name.toLowerCase().endsWith(e.toLowerCase())})
71
71
  var r})
72
- return o?(b(`File type "${o.type}" is not accepted.`),k.current.value="",[]):u.length+e.length>s?(b(`You can only upload up to ${s} files.`),k.current.value="",[]):e},j=()=>u.map((r,a)=>e.jsxs("div",{onClick:e=>e.stopPropagation(),className:"relative pt-7 pb-3 px-5 border border-secondary dark:border-secondary-dark-700 rounded max-w-sm cursor-default",children:[e.jsx("div",{className:"flex items-center justify-center max-w-full h-56 mb-3",children:r.type.startsWith("image/")?e.jsx("img",{src:URL.createObjectURL(r),alt:r.name,className:"max-w-full h-56 object-cover"}):e.jsx("div",{className:"text-secondary dark:text-secondary-dark text-sm italic",children:"Preview not available"})}),e.jsx("p",{className:"text-xs text-secondary dark:text-secondary-dark text-center",children:r.name}),c&&u.length>0&&e.jsx("div",{className:"absolute top-0 right-0 z-10",children:e.jsx("button",{onClick:e=>((e,r)=>{e.stopPropagation()
72
+ return n?(b(`File type "${n.type}" is not accepted.`),k.current.value="",[]):u.length+e.length>s?(b(`You can only upload up to ${s} files.`),k.current.value="",[]):e},j=()=>u.map((r,a)=>e.jsxs("div",{onClick:e=>e.stopPropagation(),className:"relative pt-7 pb-3 px-5 border border-secondary dark:border-secondary-dark-700 rounded max-w-sm cursor-default",children:[e.jsx("div",{className:"flex items-center justify-center max-w-full h-56 mb-3",children:r.type.startsWith("image/")?e.jsx("img",{src:URL.createObjectURL(r),alt:r.name,className:"max-w-full h-56 object-cover"}):e.jsx("div",{className:"text-secondary dark:text-secondary-dark text-sm italic",children:"Preview not available"})}),e.jsx("p",{className:"text-xs text-secondary dark:text-secondary-dark text-center",children:r.name}),c&&u.length>0&&e.jsx("div",{className:"absolute top-0 right-0 z-10",children:e.jsx("button",{onClick:e=>((e,r)=>{e.stopPropagation()
73
73
  const a=u.filter((e,a)=>a!==r)
74
74
  x(a),m(a),0===a.length&&k.current&&(k.current.value="")})(e,a),className:"w-auto h-auto py-2 px-2 bg-error text-white rounded-xs hover:cursor-pointer",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:"w-4 h-4 fill-white",children:e.jsx("g",{fill:"currentColor",fillRule:"nonzero",stroke:"none",strokeWidth:"1",strokeLinecap:"butt",strokeLinejoin:"miter",strokeMiterlimit:"10",strokeDasharray:"",strokeDashoffset:"0",fontFamily:"none",fontWeight:"none",fontSize:"none",textAnchor:"none",style:{mixBlendMode:"normal"},children:e.jsx("g",{transform:"scale(5.33333,5.33333)",children:e.jsx("path",{d:"M39.48633,6.97852c-0.39614,0.00936 -0.77249,0.17506 -1.04687,0.46094l-14.43945,14.43945l-14.43945,-14.43945c-0.28248,-0.2909 -0.67069,-0.45506 -1.07617,-0.45508c-0.61064,0.00015 -1.16026,0.37042 -1.38978,0.93629c-0.22952,0.56587 -0.09314,1.21439 0.34486,1.63988l14.43945,14.43945l-14.43945,14.43945c-0.39185,0.37623 -0.54969,0.9349 -0.41265,1.46055c0.13704,0.52565 0.54754,0.93616 1.07319,1.07319c0.52565,0.13704 1.08432,-0.02081 1.46055,-0.41265l14.43945,-14.43945l14.43945,14.43945c0.37623,0.39185 0.9349,0.54969 1.46055,0.41265c0.52565,-0.13704 0.93616,-0.54754 1.07319,-1.07319c0.13704,-0.52565 -0.0208,-1.08432 -0.41265,-1.46055l-14.43945,-14.43945l14.43945,-14.43945c0.44646,-0.42851 0.58398,-1.08719 0.34628,-1.65854c-0.2377,-0.57135 -0.80184,-0.93811 -1.4205,-0.92349z"})})})})})})]},a))
75
75
  return"dropzone"===i?e.jsxs("div",{className:"",children:[e.jsxs("div",{className:a.cn("flex gap-5 flex-wrap items-center-safe justify-center-safe border-4 border-dashed rounded-lg p-6 text-center cursor-pointer dark:text-white",p?"border-info dark:border-info-dark":"border-secondary dark:border-secondary-dark"),onDragEnter:y,onDragOver:y,onDragLeave:e=>{e.preventDefault(),h(!1)},onDrop:e=>{e.preventDefault(),h(!1)
76
76
  const r=Array.from(e.dataTransfer.files),a=v(r)
77
77
  if(!a.length)return
78
78
  const t=1===s?a.slice(0,1):[...u,...a].slice(0,s)
79
- x(t),m(t),b(""),k.current.value=""},onClick:w,children:[e.jsx("input",{type:"file",ref:k,className:"hidden",accept:t,multiple:s>1,capture:d,onChange:f}),u.length>0?j():e.jsx("p",{className:"text-sm md:text-base",children:"Drag & drop files here, or click to select files"})]}),g?e.jsx("p",{className:"text-error text-sm mt-2",children:g}):l&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-secondary-dark mt-2",children:l})]}):e.jsxs("div",{onClick:w,className:"cursor-pointer inline-block",children:[e.jsx("input",{type:"file",ref:k,accept:t,multiple:s>1,capture:d,onChange:f,className:"hidden"}),e.jsx("div",{className:"inline-flex items-center gap-2 px-4 py-2 border border-secondary rounded bg-gray-50 hover:bg-secondary-30 text-sm dark:border-secondary-dark dark:bg-gray-700 dark:hover:bg-secondary-dark-700 dark:text-white",children:e.jsx("span",{className:"font-medium",children:u.length>0?`${u.length} file${u.length>1?"s":""} selected`:o??"Choose file"})}),u.length>0&&e.jsx("div",{className:"flex gap-5 flex-wrap mt-2",children:j()}),g?e.jsx("p",{className:"text-error text-sm mt-2",children:g}):l&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-secondary-dark mt-2",children:l})]})},exports.Grid=({className:r,cols:t,gap:s,children:o,style:n,...l})=>{const d=(i=D(t))?Object.entries(i).map(([e,r])=>$[e]?.[r]??""):[]
79
+ x(t),m(t),b(""),k.current.value=""},onClick:w,children:[e.jsx("input",{type:"file",ref:k,className:"hidden",accept:t,multiple:s>1,capture:d,onChange:f}),u.length>0?j():e.jsx("p",{className:"text-sm md:text-base",children:"Drag & drop files here, or click to select files"})]}),g?e.jsx("p",{className:"text-error text-sm mt-2",children:g}):l&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-secondary-dark mt-2",children:l})]}):e.jsxs("div",{onClick:w,className:"cursor-pointer inline-block",children:[e.jsx("input",{type:"file",ref:k,accept:t,multiple:s>1,capture:d,onChange:f,className:"hidden"}),e.jsx("div",{className:"inline-flex items-center gap-2 px-4 py-2 border border-secondary rounded bg-gray-50 hover:bg-secondary-30 text-sm dark:border-secondary-dark dark:bg-gray-700 dark:hover:bg-secondary-dark-700 dark:text-white",children:e.jsx("span",{className:"font-medium",children:u.length>0?`${u.length} file${u.length>1?"s":""} selected`:n??"Choose file"})}),u.length>0&&e.jsx("div",{className:"flex gap-5 flex-wrap mt-2",children:j()}),g?e.jsx("p",{className:"text-error text-sm mt-2",children:g}):l&&e.jsx("p",{className:"text-sm text-gray-500 dark:text-secondary-dark mt-2",children:l})]})},exports.Grid=({className:r,cols:t,gap:s,children:n,style:o,...l})=>{const d=(i=I(t))?Object.entries(i).map(([e,r])=>T[e]?.[r]??""):[]
80
80
  var i
81
- const c=function(e){return e?Object.entries(e).map(([e,r])=>E[e]?.[r]??""):[]}(D(s))
82
- return e.jsx("div",{className:a.cn("grid",d,c,r),...l,children:o})},exports.GridItem=({className:r,colSpan:t,children:s,...o})=>{const n=(l="number"==typeof(d=t)?{base:d}:d)?Object.entries(l).map(([e,r])=>I[e]?.[r]??""):[]
81
+ const c=function(e){return e?Object.entries(e).map(([e,r])=>E[e]?.[r]??""):[]}(I(s))
82
+ return e.jsx("div",{className:a.cn("grid",d,c,r),...l,children:n})},exports.GridItem=({className:r,colSpan:t,children:s,...n})=>{const o=(l="number"==typeof(d=t)?{base:d}:d)?Object.entries(l).map(([e,r])=>D[e]?.[r]??""):[]
83
83
  var l,d
84
- return e.jsx("div",{className:a.cn(...n,r),...o,children:s})},exports.ListCheckboxInput=({name:r,options:t,selectedValues:s,onValueChange:o,variant:n="subtle",checkboxSize:l="md",disabled:d,...i})=>{const c=L[l],m=M[n]
85
- return e.jsx("div",{className:"flex flex-wrap gap-3",children:t.map((t,n)=>{const l=s?.some(e=>e.value===t.value)??!1
84
+ return e.jsx("div",{className:a.cn(...o,r),...n,children:s})},exports.ListCheckboxInput=({name:r,options:t,selectedValues:s,onValueChange:n,variant:o="subtle",checkboxSize:l="md",disabled:d,...i})=>{const c=L[l],m=M[o]
85
+ return e.jsx("div",{className:"flex flex-wrap gap-3",children:t.map((t,o)=>{const l=s?.some(e=>e.value===t.value)??!1
86
86
  return e.jsxs("label",{className:a.cn("relative flex items-center rounded-md cursor-pointer transition-all duration-200 border px-3 py-2",c.container,m.label,{[m.checked]:l,"opacity-50 cursor-not-allowed":d}),children:[e.jsx("input",{type:"checkbox",name:r,value:t.value,checked:l,onChange:()=>{const e=l?s?.filter(e=>e.value!==t.value)||[]:[...s||[],t]
87
- o(e)},disabled:d,className:a.cn("absolute opacity-0 w-full h-full cursor-pointer",{"cursor-not-allowed":d}),...i}),e.jsx("span",{className:a.cn("flex items-center justify-center rounded-md border transition-all duration-200",c.checkbox,m.checkbox,{[m.checkedCheckbox]:l}),children:l&&e.jsx("span",{children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"white",className:"w-3 h-3",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-7.778 7.778a1 1 0 01-1.414 0L3.293 10.05a1 1 0 111.414-1.414l3.536 3.535 7.071-7.071a1 1 0 011.414 0z",clipRule:"evenodd"})})})}),e.jsx("span",{className:a.cn("ml-2",c.label),children:t.label})]},t.value??n)})})},exports.Masonry=A,exports.Modal=({isOpen:t,overlayClose:s=!0,onClose:o,title:n,children:l,showCloseButton:d=!0,size:i="md"})=>{const[c,m]=r.useState(t),[u,x]=r.useState(!1),g=r.useId()
87
+ n(e)},disabled:d,className:a.cn("absolute opacity-0 w-full h-full cursor-pointer",{"cursor-not-allowed":d}),...i}),e.jsx("span",{className:a.cn("flex items-center justify-center rounded-md border transition-all duration-200",c.checkbox,m.checkbox,{[m.checkedCheckbox]:l}),children:l&&e.jsx("span",{children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"white",className:"w-3 h-3",children:e.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-7.778 7.778a1 1 0 01-1.414 0L3.293 10.05a1 1 0 111.414-1.414l3.536 3.535 7.071-7.071a1 1 0 011.414 0z",clipRule:"evenodd"})})})}),e.jsx("span",{className:a.cn("ml-2",c.label),children:t.label})]},t.value??o)})})},exports.Masonry=A,exports.Modal=({isOpen:t,overlayClose:s=!0,onClose:n,title:o,children:l,showCloseButton:d=!0,size:i="md"})=>{const[c,m]=r.useState(t),[u,x]=r.useState(!1),g=r.useId()
88
88
  return r.useEffect(()=>{let e,r
89
89
  return t?(m(!0),e=setTimeout(()=>x(!0),15)):(x(!1),r=setTimeout(()=>m(!1),200)),()=>{clearTimeout(e),clearTimeout(r)}},[t]),r.useEffect(()=>{if(!t)return
90
- const e=e=>{"Escape"===e.key&&o()},r=document.body.style.overflow
91
- return document.body.style.overflow="hidden",document.addEventListener("keydown",e),()=>{document.body.style.overflow=r,document.removeEventListener("keydown",e)}},[t,o]),c?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",role:"dialog","aria-modal":"true","aria-labelledby":n?g:void 0,children:[e.jsx("div",{className:a.cn("fixed inset-0 bg-black/50 backdrop-blur-xs transition-opacity duration-200",u?"opacity-100":"opacity-0"),onClick:s?o:void 0}),e.jsxs("div",{className:a.cn("relative z-10 flex flex-col w-full max-h-[90vh] rounded-xl border border-gray-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 shadow-2xl transition-all duration-200 ease-out",Y[i],u?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 translate-y-2"),onClick:e=>e.stopPropagation(),children:[(n||d)&&e.jsxs("div",{className:"flex items-center justify-between gap-4 shrink-0 px-5 py-4 border-b border-gray-200 dark:border-neutral-800",children:[n&&e.jsx("h2",{id:g,className:"text-lg font-semibold text-gray-900 dark:text-neutral-100 leading-snug",children:n}),d&&e.jsx("button",{type:"button",onClick:o,className:"ml-auto -mr-1.5 p-1.5 rounded-lg text-gray-500 hover:text-gray-800 hover:bg-gray-100 dark:text-neutral-400 dark:hover:text-neutral-100 dark:hover:bg-neutral-800 transition-colors cursor-pointer","aria-label":"Close modal",children:e.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsx("div",{className:"p-5 overflow-y-auto text-gray-700 dark:text-neutral-300",children:l})]})]}):null},exports.Offcanvas=({isOpen:t,onClose:s,title:o,children:n,position:l="right",width:d="md",overlayClose:i=!0,showCloseButton:c=!0})=>{const m=r.useId()
90
+ const e=e=>{"Escape"===e.key&&n()},r=document.body.style.overflow
91
+ return document.body.style.overflow="hidden",document.addEventListener("keydown",e),()=>{document.body.style.overflow=r,document.removeEventListener("keydown",e)}},[t,n]),c?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",role:"dialog","aria-modal":"true","aria-labelledby":o?g:void 0,children:[e.jsx("div",{className:a.cn("fixed inset-0 bg-black/50 backdrop-blur-xs transition-opacity duration-200",u?"opacity-100":"opacity-0"),onClick:s?n:void 0}),e.jsxs("div",{className:a.cn("relative z-10 flex flex-col w-full max-h-[90vh] rounded-xl border border-gray-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 shadow-2xl transition-all duration-200 ease-out",Y[i],u?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 translate-y-2"),onClick:e=>e.stopPropagation(),children:[(o||d)&&e.jsxs("div",{className:"flex items-center justify-between gap-4 shrink-0 px-5 py-4 border-b border-gray-200 dark:border-neutral-800",children:[o&&e.jsx("h2",{id:g,className:"text-lg font-semibold text-gray-900 dark:text-neutral-100 leading-snug",children:o}),d&&e.jsx("button",{type:"button",onClick:n,className:"ml-auto -mr-1.5 p-1.5 rounded-lg text-gray-500 hover:text-gray-800 hover:bg-gray-100 dark:text-neutral-400 dark:hover:text-neutral-100 dark:hover:bg-neutral-800 transition-colors cursor-pointer","aria-label":"Close modal",children:e.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsx("div",{className:"p-5 overflow-y-auto text-gray-700 dark:text-neutral-300",children:l})]})]}):null},exports.Offcanvas=({isOpen:t,onClose:s,title:n,children:o,position:l="right",width:d="md",overlayClose:i=!0,showCloseButton:c=!0})=>{const m=r.useId()
92
92
  r.useEffect(()=>{if(!t)return
93
93
  const e=e=>{"Escape"===e.key&&s()},r=document.body.style.overflow
94
94
  return document.body.style.overflow="hidden",document.addEventListener("keydown",e),()=>{document.body.style.overflow=r,document.removeEventListener("keydown",e)}},[t,s])
95
95
  const u="right"===l?"right-0 border-l border-gray-200 dark:border-neutral-800":"left-0 border-r border-gray-200 dark:border-neutral-800",x=t?"translate-x-0":"right"===l?"translate-x-full":"-translate-x-full"
96
- return e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:i?s:void 0,"aria-hidden":"true",className:a.cn("fixed inset-0 z-40 bg-black/50 backdrop-blur-xs transition-opacity duration-300",t?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none")}),e.jsxs("aside",{role:"dialog","aria-modal":"true","aria-hidden":!t,"aria-labelledby":o?m:void 0,className:a.cn("fixed top-0 z-50 flex flex-col h-full bg-white dark:bg-neutral-900 shadow-2xl transform transition-transform duration-300 ease-in-out",Z[d],u,x),children:[(o||c)&&e.jsxs("div",{className:"flex items-center justify-between gap-4 shrink-0 px-5 py-4 border-b border-gray-200 dark:border-neutral-800",children:[o&&e.jsx("h5",{id:m,className:"text-lg font-semibold text-gray-900 dark:text-neutral-100 leading-snug",children:o}),c&&e.jsx("button",{type:"button",onClick:s,className:"ml-auto -mr-1.5 p-1.5 rounded-lg text-gray-500 hover:text-gray-800 hover:bg-gray-100 dark:text-neutral-400 dark:hover:text-neutral-100 dark:hover:bg-neutral-800 transition-colors cursor-pointer","aria-label":"Close offcanvas",children:e.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsx("div",{className:"flex-1 p-5 overflow-y-auto text-gray-700 dark:text-neutral-300",children:n})]})]})},exports.Pagination=({currentPage:r,simplified:t=!1,format:s="none",count:o,pageSize:n,asLink:l=!1,getPageHref:d,totalPages:i,onPageChange:c,siblingCount:m=1,prevIcon:u,nextIcon:x,size:g="sm"})=>{"production"!==process.env.NODE_ENV&&o&&n&&i&&Math.ceil(o/n)
97
- const b=o&&n&&1===m?Math.ceil(o/n):i??1
96
+ return e.jsxs(e.Fragment,{children:[e.jsx("div",{onClick:i?s:void 0,"aria-hidden":"true",className:a.cn("fixed inset-0 z-40 bg-black/50 backdrop-blur-xs transition-opacity duration-300",t?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none")}),e.jsxs("aside",{role:"dialog","aria-modal":"true","aria-hidden":!t,"aria-labelledby":n?m:void 0,className:a.cn("fixed top-0 z-50 flex flex-col h-full bg-white dark:bg-neutral-900 shadow-2xl transform transition-transform duration-300 ease-in-out",Z[d],u,x),children:[(n||c)&&e.jsxs("div",{className:"flex items-center justify-between gap-4 shrink-0 px-5 py-4 border-b border-gray-200 dark:border-neutral-800",children:[n&&e.jsx("h5",{id:m,className:"text-lg font-semibold text-gray-900 dark:text-neutral-100 leading-snug",children:n}),c&&e.jsx("button",{type:"button",onClick:s,className:"ml-auto -mr-1.5 p-1.5 rounded-lg text-gray-500 hover:text-gray-800 hover:bg-gray-100 dark:text-neutral-400 dark:hover:text-neutral-100 dark:hover:bg-neutral-800 transition-colors cursor-pointer","aria-label":"Close offcanvas",children:e.jsx("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("path",{d:"M6 18L18 6M6 6l12 12",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),e.jsx("div",{className:"flex-1 p-5 overflow-y-auto text-gray-700 dark:text-neutral-300",children:o})]})]})},exports.Pagination=({currentPage:r,simplified:t=!1,format:s="none",count:n,pageSize:o,asLink:l=!1,getPageHref:d,totalPages:i,onPageChange:c,siblingCount:m=1,prevIcon:u,nextIcon:x,size:g="md"})=>{void 0!==n&&void 0!==o&&void 0!==i&&Math.ceil(n/o)
97
+ const b=void 0!==n&&void 0!==o&&o>0?Math.ceil(n/o):i??1
98
98
  if(b<=1)return null
99
99
  const p="...",h=e=>{const a=Math.max(1,Math.min(e,b))
100
100
  a!==r&&c(a)},k=(()=>{if(2*m+5>=b)return Array.from({length:b},(e,r)=>r+1)
101
- const e=Math.max(r-m,1),a=Math.min(r+m,b),t=e>2,s=a<b-1,o=b
101
+ const e=Math.max(r-m,1),a=Math.min(r+m,b),t=e>2,s=a<b-1,n=b
102
102
  if(!t&&s){const e=3+2*m
103
103
  return[...Array.from({length:e},(e,r)=>r+1),p,b]}if(t&&!s){const e=3+2*m,r=Array.from({length:e},(r,a)=>b-e+1+a)
104
104
  return[1,p,...r]}if(t&&s){const r=Array.from({length:a-e+1},(r,a)=>e+a)
105
- return[1,p,...r,p,o]}return Array.from({length:b},(e,r)=>r+1)})(),f=G[g]||"",y="opacity-50 pointer-events-none",w=e=>d?.(e)??`?page=${e}`,v=l?e.jsx("a",{className:a.cn("px-3 py-1 rounded-lg border dark:border-gray-600 dark:text-white dark:hover:bg-gray-700",f,1===r?y:"hover:cursor-pointer"),href:r>1?w(r-1):void 0,onClick:e=>{1!==r?(e.preventDefault(),h(r-1)):e.preventDefault()},"aria-disabled":1===r,children:u??e.jsx("span",{children:"<"})}):e.jsx("button",{className:a.cn("px-3 py-1 rounded-lg border dark:border-gray-600 dark:text-white dark:hover:bg-gray-700",f,1===r?y:"hover:cursor-pointer"),onClick:()=>h(r-1),disabled:1===r,children:u??e.jsx("span",{children:"<"})}),j=l?e.jsx("a",{className:a.cn("px-3 py-1 rounded-lg border dark:border-gray-600 dark:text-white dark:hover:bg-gray-700",f,r===b?y:"hover:cursor-pointer"),href:r<b?w(r+1):void 0,onClick:e=>{r!==b?(e.preventDefault(),h(r+1)):e.preventDefault()},"aria-disabled":r===b,children:x??e.jsx("span",{children:">"})}):e.jsx("button",{className:a.cn("px-3 py-1 rounded-lg border dark:border-gray-600 dark:text-white dark:hover:bg-gray-700",f,r===b?y:"hover:cursor-pointer"),onClick:()=>h(r+1),disabled:r===b,children:x??e.jsx("span",{children:">"})})
106
- return t?e.jsxs("div",{className:"flex items-center gap-3",children:[v,(()=>{if("long"===s&&n&&o){const a=(r-1)*n+1,t=Math.min(r*n,o)
107
- return e.jsxs("p",{className:"dark:text-white",children:["Showing ",a," - ",t," of ",o]})}return"none"===s?e.jsxs("p",{className:"dark:text-white",children:[r," of ",b]}):null})(),j]}):e.jsxs("div",{className:"flex items-center gap-3",children:[v,k.map((t,s)=>{if("..."===t)return e.jsx("span",{className:a.cn("px-3 py-1 text-gray-500 dark:text-gray-400",f),children:"..."},s)
108
- const o=t===r,n=a.cn("px-3 py-1 rounded-lg border",o?"bg-primary text-white dark:bg-primary-dark dark:border-primary-dark":"hover:bg-secondary hover:cursor-pointer dark:border-gray-600 dark:text-white dark:hover:bg-gray-700",f,o&&"pointer-events-none")
109
- return l?e.jsx("a",{className:n,href:w(Number(t)),onClick:e=>{e.preventDefault(),h(Number(t))},children:t},s):e.jsx("button",{className:n,onClick:()=>h(Number(t)),children:t},s)}),j]})},exports.RadioInput=({name:r,options:t,selectedValue:s,onValueChange:o,variant:n="subtle",radioSize:l="md",disabled:d,...i})=>{const c=K[l],m=_[n]
110
- return e.jsx("div",{className:"flex flex-wrap gap-3",children:t.map((t,n)=>{const l=s?.value===t.value
111
- return e.jsxs("label",{className:a.cn("relative flex items-center rounded-md cursor-pointer transition-all duration-200 border px-3 py-2 select-none",c.container,m.label,{[m.checked]:l,"opacity-50 cursor-not-allowed":d}),children:[e.jsx("input",{type:"radio",name:r,value:t.value,checked:l,onChange:()=>o(t),disabled:d,className:a.cn("absolute opacity-0 w-full h-full cursor-pointer",{"cursor-not-allowed":d}),...i}),e.jsx("span",{className:a.cn("flex items-center justify-center rounded-full border transition-all duration-200",c.radio,m.radio,{[m.checkedRadio]:l}),children:l&&e.jsx("span",{className:"w-1/2 h-1/2 rounded-full bg-white transition-transform duration-200 scale-100"})}),e.jsx("span",{className:a.cn("ml-2",c.label),children:t.label})]},t.value??n)})})},exports.SelectInput=({label:r,error:t,...o})=>{const n={clearIndicator:()=>"!cursor-pointer !text-gray-500 dark:!text-neutral-400 hover:!text-error dark:hover:!text-error-dark transition-colors",dropdownIndicator:()=>"!cursor-pointer !text-gray-500 dark:!text-neutral-400 hover:!text-gray-800 dark:hover:!text-neutral-100 transition-colors",indicatorSeparator:()=>"!bg-gray-200 dark:!bg-neutral-800",control:({isFocused:e,isDisabled:r})=>a.cn("!w-full !border !rounded-md !shadow-sm sm:!text-sm !min-h-[38px] !bg-white dark:!bg-neutral-900 transition-colors",r&&"!opacity-50 !bg-gray-100 dark:!bg-neutral-800 !cursor-not-allowed",t?e?"!border-error dark:!border-error-dark !ring-1 !ring-error dark:!ring-error-dark":"!border-error dark:!border-error-dark":e?"!border-primary dark:!border-primary-dark !ring-1 !ring-primary dark:!ring-primary-dark":"!border-gray-200 dark:!border-neutral-800"),option:({isFocused:e,isSelected:r})=>a.cn("!px-4 !py-2 !cursor-pointer transition-colors",r?"!bg-primary dark:!bg-primary-dark !text-white":e?"!bg-gray-100 dark:!bg-neutral-800 !text-gray-900 dark:!text-neutral-100":"!bg-white dark:!bg-neutral-900 !text-gray-700 dark:!text-neutral-300"),multiValue:()=>"!bg-gray-100 dark:!bg-neutral-800 !rounded-md !flex !items-center !mr-1",multiValueLabel:()=>"!text-gray-800 dark:!text-neutral-100 !text-sm !px-2 !py-0.5",multiValueRemove:()=>"!text-gray-500 dark:!text-neutral-400 hover:!bg-gray-200 dark:hover:!bg-neutral-700 hover:!text-gray-800 dark:hover:!text-neutral-100 !rounded-r-md !px-1 !cursor-pointer transition-colors",menu:()=>"!mt-1 !border !border-gray-200 dark:!border-neutral-800 !bg-white dark:!bg-neutral-900 !rounded-md !shadow-lg !z-20 overflow-hidden",input:()=>"!text-gray-900 dark:!text-neutral-100",placeholder:()=>"!text-gray-400 dark:!text-neutral-500",singleValue:()=>"!text-gray-900 dark:!text-neutral-100",noOptionsMessage:()=>"!text-gray-500 dark:!text-neutral-400 !py-2 !text-sm"}
112
- return e.jsxs("div",{className:"w-full",children:[r&&e.jsx("label",{className:"block text-sm font-medium text-gray-900 dark:text-neutral-100 mb-1",children:r}),e.jsx(s,{classNames:n,...o}),t&&e.jsx("p",{className:"mt-1 text-sm text-error dark:text-error-dark",children:t})]})},exports.Skeleton=({width:a,height:t,rounded:s=!1,isLoading:o=!0,animode:n="flash",children:l})=>{if(!o)return e.jsx(e.Fragment,{children:l})
105
+ return[1,p,...r,p,n]}return Array.from({length:b},(e,r)=>r+1)})(),f=G[g],y=e=>d?.(e)??`?page=${e}`,w=a.cn("inline-flex items-center justify-center border transition-colors select-none","bg-white border-gray-200 text-gray-700 hover:bg-gray-100 hover:text-gray-900","dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:hover:text-neutral-100",f),v=t=>{const s="prev"===t,n=s?r<=1:r>=b,o=s?r-1:r+1,d=s?"Previous page":"Next page",i=s?u??"‹":x??"›",c=a.cn(w,n?"opacity-50 pointer-events-none cursor-not-allowed":"cursor-pointer")
106
+ return l?e.jsx("a",{"aria-label":d,"aria-disabled":n,className:c,href:n?void 0:y(o),onClick:e=>{e.preventDefault(),n||h(o)},children:i}):e.jsx("button",{type:"button","aria-label":d,className:c,onClick:()=>h(o),disabled:n,children:i})}
107
+ return t?e.jsxs("nav",{"aria-label":"Pagination",className:"inline-flex items-center gap-3",children:[v("prev"),(()=>{if("long"===s&&o&&n){const a=(r-1)*o+1,t=Math.min(r*o,n)
108
+ return e.jsxs("p",{className:"text-sm text-gray-600 dark:text-neutral-400",children:["Showing ",e.jsx("span",{className:"font-medium text-gray-900 dark:text-neutral-100",children:a})," -"," ",e.jsx("span",{className:"font-medium text-gray-900 dark:text-neutral-100",children:t})," of"," ",e.jsx("span",{className:"font-medium text-gray-900 dark:text-neutral-100",children:n})]})}return"none"===s?e.jsxs("p",{className:"text-sm text-gray-600 dark:text-neutral-400",children:[e.jsx("span",{className:"font-medium text-gray-900 dark:text-neutral-100",children:r})," of"," ",e.jsx("span",{className:"font-medium text-gray-900 dark:text-neutral-100",children:b})]}):null})(),v("next")]}):e.jsxs("nav",{"aria-label":"Pagination",className:"inline-flex flex-wrap items-center gap-1.5",children:[v("prev"),k.map((t,s)=>{if(t===p)return e.jsx("span",{className:a.cn("inline-flex items-center justify-center text-gray-400 dark:text-neutral-500 select-none",f),children:p},`dots-${s}`)
109
+ const n=Number(t),o=n===r,d=a.cn("inline-flex items-center justify-center border transition-colors select-none",f,o?"bg-primary border-primary text-white dark:bg-primary-dark dark:border-primary-dark pointer-events-none":"bg-white border-gray-200 text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:hover:text-neutral-100 cursor-pointer")
110
+ return l?e.jsx("a",{"aria-current":o?"page":void 0,className:d,href:y(n),onClick:e=>{e.preventDefault(),h(n)},children:n},n):e.jsx("button",{type:"button","aria-current":o?"page":void 0,className:d,onClick:()=>h(n),children:n},n)}),v("next")]})},exports.RadioInput=({name:r,options:t,selectedValue:s,onValueChange:n,variant:o="subtle",radioSize:l="md",disabled:d,...i})=>{const c=K[l],m=_[o]
111
+ return e.jsx("div",{className:"flex flex-wrap gap-3",children:t.map((t,o)=>{const l=s?.value===t.value
112
+ return e.jsxs("label",{className:a.cn("relative flex items-center rounded-md cursor-pointer transition-all duration-200 border px-3 py-2 select-none",c.container,m.label,{[m.checked]:l,"opacity-50 cursor-not-allowed":d}),children:[e.jsx("input",{type:"radio",name:r,value:t.value,checked:l,onChange:()=>n(t),disabled:d,className:a.cn("absolute opacity-0 w-full h-full cursor-pointer",{"cursor-not-allowed":d}),...i}),e.jsx("span",{className:a.cn("flex items-center justify-center rounded-full border transition-all duration-200",c.radio,m.radio,{[m.checkedRadio]:l}),children:l&&e.jsx("span",{className:"w-1/2 h-1/2 rounded-full bg-white transition-transform duration-200 scale-100"})}),e.jsx("span",{className:a.cn("ml-2",c.label),children:t.label})]},t.value??o)})})},exports.SelectInput=({label:r,error:t,...n})=>{const o={clearIndicator:()=>"!cursor-pointer !text-gray-500 dark:!text-neutral-400 hover:!text-error dark:hover:!text-error-dark transition-colors",dropdownIndicator:()=>"!cursor-pointer !text-gray-500 dark:!text-neutral-400 hover:!text-gray-800 dark:hover:!text-neutral-100 transition-colors",indicatorSeparator:()=>"!bg-gray-200 dark:!bg-neutral-800",control:({isFocused:e,isDisabled:r})=>a.cn("!w-full !border !rounded-md !shadow-sm sm:!text-sm !min-h-[38px] !bg-white dark:!bg-neutral-900 transition-colors",r&&"!opacity-50 !bg-gray-100 dark:!bg-neutral-800 !cursor-not-allowed",t?e?"!border-error dark:!border-error-dark !ring-1 !ring-error dark:!ring-error-dark":"!border-error dark:!border-error-dark":e?"!border-primary dark:!border-primary-dark !ring-1 !ring-primary dark:!ring-primary-dark":"!border-gray-200 dark:!border-neutral-800"),option:({isFocused:e,isSelected:r})=>a.cn("!px-4 !py-2 !cursor-pointer transition-colors",r?"!bg-primary dark:!bg-primary-dark !text-white":e?"!bg-gray-100 dark:!bg-neutral-800 !text-gray-900 dark:!text-neutral-100":"!bg-white dark:!bg-neutral-900 !text-gray-700 dark:!text-neutral-300"),multiValue:()=>"!bg-gray-100 dark:!bg-neutral-800 !rounded-md !flex !items-center !mr-1",multiValueLabel:()=>"!text-gray-800 dark:!text-neutral-100 !text-sm !px-2 !py-0.5",multiValueRemove:()=>"!text-gray-500 dark:!text-neutral-400 hover:!bg-gray-200 dark:hover:!bg-neutral-700 hover:!text-gray-800 dark:hover:!text-neutral-100 !rounded-r-md !px-1 !cursor-pointer transition-colors",menu:()=>"!mt-1 !border !border-gray-200 dark:!border-neutral-800 !bg-white dark:!bg-neutral-900 !rounded-md !shadow-lg !z-20 overflow-hidden",input:()=>"!text-gray-900 dark:!text-neutral-100",placeholder:()=>"!text-gray-400 dark:!text-neutral-500",singleValue:()=>"!text-gray-900 dark:!text-neutral-100",noOptionsMessage:()=>"!text-gray-500 dark:!text-neutral-400 !py-2 !text-sm"}
113
+ return e.jsxs("div",{className:"w-full",children:[r&&e.jsx("label",{className:"block text-sm font-medium text-gray-900 dark:text-neutral-100 mb-1",children:r}),e.jsx(s,{classNames:o,...n}),t&&e.jsx("p",{className:"mt-1 text-sm text-error dark:text-error-dark",children:t})]})},exports.Skeleton=({width:a,height:t,rounded:s=!1,isLoading:n=!0,animode:o="flash",children:l})=>{if(!n)return e.jsx(e.Fragment,{children:l})
113
114
  const d={width:a??"fit-content",height:t??(l?"auto":"1rem")}
114
- return l?e.jsx(e.Fragment,{children:r.Children.map(l,(r,a)=>e.jsx("div",{className:`${n} ${s?"rounded-full":"rounded-sm"} mb-1`,style:d,children:e.jsx("span",{className:"invisible",children:r})},a))}):e.jsx("div",{className:`${n} ${s?"rounded-full":"rounded-sm"}`,style:d})},exports.Slider=({id:t,name:s,label:o,min:n=0,disabled:l,max:d=100,step:i=1,value:c,showTooltip:m=!0,showMarks:u=!0,onChange:x,color:g="primary",prefixIcon:b,suffixIcon:p,sliderSize:h="md"})=>{const[k,f]=r.useState(!1),y=ee[g],w=re[h],v={sm:12,md:16,lg:20,xl:24}[h]
115
- return e.jsxs("div",{className:"w-full p-4 relative overflow-x-clip",children:[o&&e.jsx("label",{htmlFor:t||s,className:"block text-sm font-medium mb-1 dark:text-white",children:o}),e.jsxs("div",{className:"flex gap-3 items-center relative",children:[b,e.jsxs("div",{className:"relative w-full flex items-center",onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[m&&e.jsx("div",{className:"absolute z-10 -top-7 transition-opacity duration-300",style:(()=>{const e=Number(d)-Number(n),r=0===e?0:(Number(c)-Number(n))/e
116
- return{left:`calc(${100*r}% + ${r*-v+v/2}px)`,opacity:k?1:0,pointerEvents:"none"}})(),children:e.jsx(J,{text:String(c),isOpen:k,placement:"top",children:e.jsx("div",{})})}),e.jsx("input",{disabled:l,type:"range",id:t||"slider-range",min:n,max:d,step:i,value:c,onChange:x,onMouseDown:()=>f(!0),className:a.cn("w-full rounded-full appearance-none cursor-pointer dark:bg-gray-700","transition-all duration-300 ease-in-out",w,"[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:appearance-none","[&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:appearance-none",y,{[ee.secondary]:l,"bg-secondary opacity-50":l})}),(()=>{if(!u||Number(i)<=1)return null
117
- const r=Number(d)-Number(n),t=Math.floor(r/Number(i)),s=Array.from({length:t+1},(r,s)=>{const o=s/t*100
118
- return e.jsx("div",{className:a.cn("absolute top-1/2 -translate-y-1/2 w-[2px] h-2 rounded-full",y),style:{left:`${o}%`}},s)})
119
- return e.jsx("div",{className:"absolute top-full mt-2 -left-0.5 -right-0.5 h-2 me-[11px] ms-[9px]",children:s})})()]}),p,e.jsx("div",{className:"w-32",children:e.jsx(Q,{min:n,max:d,step:i,type:Number(c)<=0?"text":"number",value:Number(c)<=0?"":c,onChange:x})})]})]})},exports.Spinner=({color:r="primary",size:t="md",duration:s=1e3,thickness:o,label:n,labelPosition:l="right"})=>{const d=te[r],i=ae[t],c=se[t],m=oe[l],u=`${s}ms`,x=o?`${o}px`:void 0,g=e.jsx("span",{"aria-hidden":Boolean(n),role:n?void 0:"status","aria-label":n?void 0:"Loading",className:a.cn(i,d,"inline-block shrink-0 rounded-full animate-spin border-t-transparent dark:border-t-transparent"),style:{animationDuration:u,borderWidth:x}})
120
- return n?e.jsxs("div",{role:"status",className:a.cn("inline-flex items-center justify-center gap-2",m),children:[g,e.jsx("span",{className:a.cn(c,"text-gray-700 dark:text-neutral-200 font-medium select-none"),children:n})]}):g},exports.Table=function({columns:r,data:t,striped:s=!1,hoverable:o=!0,customEmptyData:n,size:l="md",caption:d,captionPosition:i="bottom",stickyHeader:c=!1,selectable:m=!1,onSelectionChange:u,selectedRows:x=[]}){const g=ne[l],b=t.length>0&&x.length===t.length,p=x.length>0&&x.length<t.length
121
- return e.jsxs("div",{className:"w-full",children:[d&&"top"===i&&e.jsx("p",{className:"text-center text-sm font-medium mb-2 text-gray-600 dark:text-neutral-400",children:d}),e.jsx("div",{className:a.cn("overflow-x-auto w-full rounded-lg border border-gray-200 dark:border-neutral-800 bg-white dark:bg-neutral-900",c&&"max-h-[400px] overflow-y-auto"),children:e.jsxs("table",{className:"min-w-full border-collapse text-left",children:[e.jsx("thead",{className:"bg-gray-50 dark:bg-neutral-800 text-gray-700 dark:text-neutral-200",children:e.jsxs("tr",{children:[m&&e.jsx("th",{className:a.cn("w-12 font-semibold border-b border-gray-200 dark:border-neutral-800",g,c&&"sticky top-0 bg-gray-50 dark:bg-neutral-800 z-10"),children:e.jsx(z,{checked:b,indeterminate:p,onChange:e=>{e.target.checked?u?.(t):u?.([])}})}),r.map((r,t)=>e.jsx("th",{className:a.cn("font-semibold whitespace-nowrap border-b border-gray-200 dark:border-neutral-800",g,c&&"sticky top-0 bg-gray-50 dark:bg-neutral-800 z-10"),children:r.header},t))]})}),e.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-neutral-800 text-gray-700 dark:text-neutral-300",children:t.length>0?t.map((t,n)=>{const l=m&&x.some(e=>e.id===t.id)
122
- return e.jsxs("tr",{className:a.cn("transition-colors",s&&n%2!=0&&"bg-gray-50/70 dark:bg-neutral-800/40",o&&"hover:bg-gray-100/80 dark:hover:bg-neutral-800/70",l&&"bg-primary/10 dark:bg-primary/20"),children:[m&&e.jsx("td",{className:a.cn(g),children:e.jsx(z,{checked:l,onChange:()=>(e=>{const r=x.some(r=>r.id===e.id)
123
- u?.(r?x.filter(r=>r.id!==e.id):[...x,e])})(t)})}),r.map((r,s)=>e.jsx("td",{className:a.cn(g),children:r.render?r.render(t[r.accessor],t):null!=t[r.accessor]?String(t[r.accessor]):"-"},s))]},t.id??n)}):e.jsx("tr",{children:e.jsx("td",{colSpan:r.length+(m?1:0),className:a.cn("py-8 text-center text-gray-500 dark:text-neutral-400",g),children:n??"Tidak ada data."})})})]})}),d&&"bottom"===i&&e.jsx("p",{className:"text-center text-sm font-medium mt-2 text-gray-600 dark:text-neutral-400",children:d})]})},exports.Tabs=({tabs:t,fitted:s,variant:o="line",wrapperClassName:n,buttonClassName:l,activeClassName:d,inactiveClassName:i,activeTab:c,onTabChange:m})=>{const[u,x]=r.useState(0),g=void 0!==c&&void 0!==m,b=g?c:u,p=le[o],h=de[o],k=r.useRef([]),f=r.useRef(null)
124
- return r.useEffect(()=>{!g&&b>=t.length&&x(Math.max(0,t.length-1))},[t,b,g]),r.useEffect(()=>{const e=k.current[b],r=f.current
125
- if(e&&r){const a=e.offsetLeft,t=e.offsetWidth
126
- r.style.transform=`translateX(${a}px)`,r.style.width=`${t}px`,e.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})}},[b,t]),e.jsxs("div",{children:[e.jsx("div",{className:a.cn("relative",p.wrapper,n),children:e.jsxs("nav",{className:"relative -mb-px flex space-x-2 overflow-x-auto scroll-smooth","aria-label":"Tabs",children:[t.map((r,t)=>{const o=a.cn("hover:cursor-pointer",s&&"flex-1",p.button,l,b===t?a.cn(p.active,d):a.cn(p.inactive,i),r.disabled&&"hover:cursor-not-allowed cursor-not-allowed opacity-50")
127
- return r.link?e.jsx("a",{href:r.disabled?void 0:r.link,ref:e=>{k.current[t]=e},className:o,"aria-disabled":r.disabled,onClick:e=>r.disabled&&e.preventDefault(),children:r.label},r.label):e.jsx("button",{ref:e=>{k.current[t]=e},onClick:()=>(e=>{g?m(e):x(e)})(t),disabled:r.disabled,className:o,children:r.label},r.label)}),e.jsx("div",{ref:f,className:a.cn(h),style:{width:0,transform:"translateX(0px)"}})]})}),e.jsx("div",{className:"mt-4",children:t[b]?.content})]})},exports.TextInput=Q,exports.Textarea=({label:t,id:s,name:o,error:n,autoResize:l=!1,onInput:d,...i})=>{const c=r.useRef(null),m=()=>{const e=c.current
115
+ return l?e.jsx(e.Fragment,{children:r.Children.map(l,(r,a)=>e.jsx("div",{className:`${o} ${s?"rounded-full":"rounded-sm"} mb-1`,style:d,children:e.jsx("span",{className:"invisible",children:r})},a))}):e.jsx("div",{className:`${o} ${s?"rounded-full":"rounded-sm"}`,style:d})},exports.Slider=({id:t,name:s,label:n,min:o=0,disabled:l,max:d=100,step:i=1,value:c,showTooltip:m=!0,showMarks:u=!0,onChange:x,color:g="primary",prefixIcon:b,suffixIcon:p,sliderSize:h="md"})=>{const[k,f]=r.useState(!1),y=ee[g],w=re[h],v={sm:12,md:16,lg:20,xl:24}[h]
116
+ return e.jsxs("div",{className:"w-full p-4 relative overflow-x-clip",children:[n&&e.jsx("label",{htmlFor:t||s,className:"block text-sm font-medium mb-1 dark:text-white",children:n}),e.jsxs("div",{className:"flex gap-3 items-center relative",children:[b,e.jsxs("div",{className:"relative w-full flex items-center",onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[m&&e.jsx("div",{className:"absolute z-10 -top-7 transition-opacity duration-300",style:(()=>{const e=Number(d)-Number(o),r=0===e?0:(Number(c)-Number(o))/e
117
+ return{left:`calc(${100*r}% + ${r*-v+v/2}px)`,opacity:k?1:0,pointerEvents:"none"}})(),children:e.jsx(J,{text:String(c),isOpen:k,placement:"top",children:e.jsx("div",{})})}),e.jsx("input",{disabled:l,type:"range",id:t||"slider-range",min:o,max:d,step:i,value:c,onChange:x,onMouseDown:()=>f(!0),className:a.cn("w-full rounded-full appearance-none cursor-pointer dark:bg-gray-700","transition-all duration-300 ease-in-out",w,"[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:appearance-none","[&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:appearance-none",y,{[ee.secondary]:l,"bg-secondary opacity-50":l})}),(()=>{if(!u||Number(i)<=1)return null
118
+ const r=Number(d)-Number(o),t=Math.floor(r/Number(i)),s=Array.from({length:t+1},(r,s)=>{const n=s/t*100
119
+ return e.jsx("div",{className:a.cn("absolute top-1/2 -translate-y-1/2 w-[2px] h-2 rounded-full",y),style:{left:`${n}%`}},s)})
120
+ return e.jsx("div",{className:"absolute top-full mt-2 -left-0.5 -right-0.5 h-2 me-[11px] ms-[9px]",children:s})})()]}),p,e.jsx("div",{className:"w-32",children:e.jsx(Q,{min:o,max:d,step:i,type:Number(c)<=0?"text":"number",value:Number(c)<=0?"":c,onChange:x})})]})]})},exports.Spinner=({color:r="primary",size:t="md",duration:s=1e3,thickness:n,label:o,labelPosition:l="right"})=>{const d=te[r],i=ae[t],c=se[t],m=ne[l],u=`${s}ms`,x=n?`${n}px`:void 0,g=e.jsx("span",{"aria-hidden":Boolean(o),role:o?void 0:"status","aria-label":o?void 0:"Loading",className:a.cn(i,d,"inline-block shrink-0 rounded-full animate-spin border-t-transparent dark:border-t-transparent"),style:{animationDuration:u,borderWidth:x}})
121
+ return o?e.jsxs("div",{role:"status",className:a.cn("inline-flex items-center justify-center gap-2",m),children:[g,e.jsx("span",{className:a.cn(c,"text-gray-700 dark:text-neutral-200 font-medium select-none"),children:o})]}):g},exports.Table=function({columns:r,data:t,striped:s=!1,hoverable:n=!0,customEmptyData:o,size:l="md",caption:d,captionPosition:i="bottom",stickyHeader:c=!1,selectable:m=!1,onSelectionChange:u,selectedRows:x=[]}){const g=oe[l],b=t.length>0&&x.length===t.length,p=x.length>0&&x.length<t.length
122
+ return e.jsxs("div",{className:"w-full",children:[d&&"top"===i&&e.jsx("p",{className:"text-center text-sm font-medium mb-2 text-gray-600 dark:text-neutral-400",children:d}),e.jsx("div",{className:a.cn("overflow-x-auto w-full rounded-lg border border-gray-200 dark:border-neutral-800 bg-white dark:bg-neutral-900",c&&"max-h-[400px] overflow-y-auto"),children:e.jsxs("table",{className:"min-w-full border-collapse text-left",children:[e.jsx("thead",{className:"bg-gray-50 dark:bg-neutral-800 text-gray-700 dark:text-neutral-200",children:e.jsxs("tr",{children:[m&&e.jsx("th",{className:a.cn("w-12 font-semibold border-b border-gray-200 dark:border-neutral-800",g,c&&"sticky top-0 bg-gray-50 dark:bg-neutral-800 z-10"),children:e.jsx(z,{checked:b,indeterminate:p,onChange:e=>{e.target.checked?u?.(t):u?.([])}})}),r.map((r,t)=>e.jsx("th",{className:a.cn("font-semibold whitespace-nowrap border-b border-gray-200 dark:border-neutral-800",g,c&&"sticky top-0 bg-gray-50 dark:bg-neutral-800 z-10"),children:r.header},t))]})}),e.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-neutral-800 text-gray-700 dark:text-neutral-300",children:t.length>0?t.map((t,o)=>{const l=m&&x.some(e=>e.id===t.id)
123
+ return e.jsxs("tr",{className:a.cn("transition-colors",s&&o%2!=0&&"bg-gray-50/70 dark:bg-neutral-800/40",n&&"hover:bg-gray-100/80 dark:hover:bg-neutral-800/70",l&&"bg-primary/10 dark:bg-primary/20"),children:[m&&e.jsx("td",{className:a.cn(g),children:e.jsx(z,{checked:l,onChange:()=>(e=>{const r=x.some(r=>r.id===e.id)
124
+ u?.(r?x.filter(r=>r.id!==e.id):[...x,e])})(t)})}),r.map((r,s)=>e.jsx("td",{className:a.cn(g),children:r.render?r.render(t[r.accessor],t):null!=t[r.accessor]?String(t[r.accessor]):"-"},s))]},t.id??o)}):e.jsx("tr",{children:e.jsx("td",{colSpan:r.length+(m?1:0),className:a.cn("py-8 text-center text-gray-500 dark:text-neutral-400",g),children:o??"Tidak ada data."})})})]})}),d&&"bottom"===i&&e.jsx("p",{className:"text-center text-sm font-medium mt-2 text-gray-600 dark:text-neutral-400",children:d})]})},exports.Tabs=({tabs:t,fitted:s=!1,variant:n="line",activeTab:o,onTabChange:l})=>{const[d,i]=r.useState(0),c=void 0!==o&&void 0!==l,m=c?o:d,u=le[n],x=de[n],g=r.useRef(null),b=r.useRef([]),p=r.useRef(null)
125
+ return r.useEffect(()=>{!c&&m>=t.length&&i(Math.max(0,t.length-1))},[t.length,m,c]),r.useEffect(()=>{const e=b.current[m],r=p.current,a=g.current
126
+ if(e&&r){const t=e.offsetLeft,s=e.offsetWidth
127
+ if(r.style.transform=`translateX(${t}px)`,r.style.width=`${s}px`,a){const e=t-a.clientWidth/2+s/2
128
+ a.scrollTo({left:e,behavior:"smooth"})}}},[m,t,s,n]),e.jsxs("div",{className:"w-full",children:[e.jsx("div",{className:a.cn("relative",u.wrapper),children:e.jsxs("nav",{ref:g,role:"tablist","aria-label":"Tabs",className:"relative flex space-x-1 overflow-x-auto scroll-smooth",children:[t.map((r,t)=>{const n=m===t,o=a.cn("relative z-10 inline-flex items-center justify-center transition-colors duration-200 select-none",s&&"flex-1",u.button,n?u.active:u.inactive,r.disabled?"cursor-not-allowed opacity-50":"cursor-pointer")
129
+ return r.link?e.jsx("a",{role:"tab","aria-selected":n,"aria-disabled":r.disabled,href:r.disabled?void 0:r.link,ref:e=>{b.current[t]=e},className:o,onClick:e=>{r.disabled&&e.preventDefault()},children:r.label},`${r.label}-${t}`):e.jsx("button",{type:"button",role:"tab","aria-selected":n,ref:e=>{b.current[t]=e},onClick:()=>(e=>{c?l(e):i(e)})(t),disabled:r.disabled,className:o,children:r.label},`${r.label}-${t}`)}),e.jsx("div",{ref:p,className:x,style:{width:0,transform:"translateX(0px)"}})]})}),e.jsx("div",{role:"tabpanel",className:"mt-4 text-gray-700 dark:text-neutral-300",children:t[m]?.content})]})},exports.TextInput=Q,exports.Textarea=({label:t,id:s,name:n,error:o,autoResize:l=!1,onInput:d,...i})=>{const c=r.useRef(null),m=()=>{const e=c.current
128
130
  e&&(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)}
129
- return r.useEffect(()=>{l&&m()},[l,i.value]),e.jsxs("div",{className:"w-full",children:[t&&e.jsx("label",{htmlFor:s||o,className:"inline-block text-sm font-medium mb-1 text-gray-900 dark:text-neutral-100",children:t}),e.jsx("textarea",{id:s||o,name:o,rows:l?1:5,ref:c,onInput:e=>{l&&m(),d?.(e)},className:a.cn("w-full block px-3 py-2 border rounded-md shadow-sm sm:text-sm min-h-[58px] max-h-[10rem] transition-colors","bg-white border-gray-200 text-gray-900 placeholder:text-gray-400","dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-100 dark:placeholder:text-neutral-500","focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary dark:focus:ring-primary-dark dark:focus:border-primary-dark",l?"resize-none overflow-hidden":"resize-y overflow-y-auto",n&&"border-error dark:border-error-dark focus:ring-error focus:border-error dark:focus:ring-error-dark dark:focus:border-error-dark",i.disabled&&"opacity-50 bg-gray-100 dark:bg-neutral-800 cursor-not-allowed"),...i}),n&&e.jsx("p",{className:"mt-1 text-sm text-error dark:text-error-dark",children:n})]})},exports.Timeline=me,exports.ToastProvider=({children:a})=>{const[t,s]=r.useState([]),o=Object.keys(F)
130
- return e.jsxs(U.Provider,{value:{addToast:({title:e,message:r,type:a,variant:t,icon:o,withClose:n=!0,withLoading:l=!1,onClose:d,position:i="bottom-right"})=>{const c=Date.now()+Math.random()
131
- s(s=>[...s,{title:e,id:c,message:r,type:a,variant:t,icon:o,withClose:n,withLoading:l,onClose:d,position:i}])}},children:[a,o.map(r=>e.jsx("div",{className:`fixed z-50 ${F[r]}`,children:t.filter(e=>e.position===r).map(r=>e.jsx(q,{title:r.title,message:r.message,type:r.type,variant:r.variant,icon:r.icon,withClose:r.withClose,withLoading:r.withLoading,position:r.position,onClose:()=>{var e
132
- r.onClose?.(),e=r.id,s(r=>r.filter(r=>r.id!==e))}},r.id))},r))]})},exports.Toggle=({variant:r="primary",size:t="md",shape:s="stadium",label:o,disabled:n,...l})=>e.jsxs("label",{className:a.cn("relative inline-flex items-center select-none",n?"cursor-not-allowed opacity-50":"cursor-pointer"),children:[e.jsx("input",{type:"checkbox",disabled:n,className:"sr-only peer pointer-events-none",...l}),e.jsx("div",{className:a.cn("relative shrink-0 transition-colors duration-300","bg-gray-300 dark:bg-neutral-800","peer-focus-visible:ring-2 peer-focus-visible:ring-primary/50 dark:peer-focus-visible:ring-primary-dark/50","after:content-[''] after:absolute after:bg-white after:shadow-xs after:transition-transform after:duration-300",ge[t],ue[r],xe[s])}),o&&e.jsx("span",{className:"ms-3 text-sm font-medium text-gray-900 dark:text-neutral-100",children:o})]}),exports.Tooltip=J,exports.getVariantClasses=j,exports.useToast=()=>{const e=r.useContext(U)
131
+ return r.useEffect(()=>{l&&m()},[l,i.value]),e.jsxs("div",{className:"w-full",children:[t&&e.jsx("label",{htmlFor:s||n,className:"inline-block text-sm font-medium mb-1 text-gray-900 dark:text-neutral-100",children:t}),e.jsx("textarea",{id:s||n,name:n,rows:l?1:5,ref:c,onInput:e=>{l&&m(),d?.(e)},className:a.cn("w-full block px-3 py-2 border rounded-md shadow-sm sm:text-sm min-h-[58px] max-h-[10rem] transition-colors","bg-white border-gray-200 text-gray-900 placeholder:text-gray-400","dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-100 dark:placeholder:text-neutral-500","focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary dark:focus:ring-primary-dark dark:focus:border-primary-dark",l?"resize-none overflow-hidden":"resize-y overflow-y-auto",o&&"border-error dark:border-error-dark focus:ring-error focus:border-error dark:focus:ring-error-dark dark:focus:border-error-dark",i.disabled&&"opacity-50 bg-gray-100 dark:bg-neutral-800 cursor-not-allowed"),...i}),o&&e.jsx("p",{className:"mt-1 text-sm text-error dark:text-error-dark",children:o})]})},exports.Timeline=me,exports.ToastProvider=({children:a})=>{const[t,s]=r.useState([]),n=Object.keys(O)
132
+ return e.jsxs(U.Provider,{value:{addToast:({title:e,message:r,type:a,variant:t,icon:n,withClose:o=!0,withLoading:l=!1,onClose:d,position:i="bottom-right"})=>{const c=Date.now()+Math.random()
133
+ s(s=>[...s,{title:e,id:c,message:r,type:a,variant:t,icon:n,withClose:o,withLoading:l,onClose:d,position:i}])}},children:[a,n.map(r=>e.jsx("div",{className:`fixed z-50 ${O[r]}`,children:t.filter(e=>e.position===r).map(r=>e.jsx(q,{title:r.title,message:r.message,type:r.type,variant:r.variant,icon:r.icon,withClose:r.withClose,withLoading:r.withLoading,position:r.position,onClose:()=>{var e
134
+ r.onClose?.(),e=r.id,s(r=>r.filter(r=>r.id!==e))}},r.id))},r))]})},exports.Toggle=({variant:r="primary",size:t="md",shape:s="stadium",label:n,disabled:o,...l})=>e.jsxs("label",{className:a.cn("relative inline-flex items-center select-none",o?"cursor-not-allowed opacity-50":"cursor-pointer"),children:[e.jsx("input",{type:"checkbox",disabled:o,className:"sr-only peer pointer-events-none",...l}),e.jsx("div",{className:a.cn("relative shrink-0 transition-colors duration-300","bg-gray-300 dark:bg-neutral-800","peer-focus-visible:ring-2 peer-focus-visible:ring-primary/50 dark:peer-focus-visible:ring-primary-dark/50","after:content-[''] after:absolute after:bg-white after:shadow-xs after:transition-transform after:duration-300",ge[t],ue[r],xe[s])}),n&&e.jsx("span",{className:"ms-3 text-sm font-medium text-gray-900 dark:text-neutral-100",children:n})]}),exports.Tooltip=J,exports.getVariantClasses=j,exports.useToast=()=>{const e=r.useContext(U)
133
135
  if(!e)throw new Error("useToast must be used within a ToastProvider")
134
136
  return e}
package/dist/main.js CHANGED
@@ -2095,9 +2095,9 @@ const Offcanvas = ({
2095
2095
  ] });
2096
2096
  };
2097
2097
  const PaginationSizes = {
2098
- sm: "px-3 py-2 text-sm font-medium rounded-lg",
2099
- md: "px-4 py-2 text-base font-medium rounded-lg",
2100
- lg: "px-6 py-3 text-lg font-medium rounded-lg"
2098
+ sm: "px-3 py-1.5 text-xs font-medium rounded-lg",
2099
+ md: "px-3.5 py-2 text-sm font-medium rounded-lg",
2100
+ lg: "px-4.5 py-2.5 text-base font-medium rounded-lg"
2101
2101
  };
2102
2102
  const Pagination = ({
2103
2103
  currentPage,
@@ -2112,14 +2112,17 @@ const Pagination = ({
2112
2112
  siblingCount = 1,
2113
2113
  prevIcon,
2114
2114
  nextIcon,
2115
- size = "sm"
2115
+ size = "md"
2116
2116
  }) => {
2117
- if (process.env.NODE_ENV !== "production" && count && pageSize && customTotalPages && Math.ceil(count / pageSize) !== customTotalPages) {
2117
+ if (
2118
+ // process.env.NODE_ENV !== "production" &&
2119
+ count !== void 0 && pageSize !== void 0 && customTotalPages !== void 0 && Math.ceil(count / pageSize) !== customTotalPages
2120
+ ) {
2118
2121
  console.warn(
2119
2122
  '[Pagination] Both "count/pageSize" and "totalPages" props are provided, but are inconsistent. "totalPages" will be ignored in favor of count/pageSize.'
2120
2123
  );
2121
2124
  }
2122
- const totalPages = count && pageSize && siblingCount === 1 ? Math.ceil(count / pageSize) : customTotalPages ?? 1;
2125
+ const totalPages = count !== void 0 && pageSize !== void 0 && pageSize > 0 ? Math.ceil(count / pageSize) : customTotalPages ?? 1;
2123
2126
  if (totalPages <= 1) return null;
2124
2127
  const DOTS = "...";
2125
2128
  const createPageRange = () => {
@@ -2162,127 +2165,133 @@ const Pagination = ({
2162
2165
  }
2163
2166
  };
2164
2167
  const paginationRange = createPageRange();
2165
- const sizeClass = PaginationSizes[size] || "";
2166
- const disabledClass = "opacity-50 pointer-events-none";
2168
+ const sizeClass = PaginationSizes[size];
2167
2169
  const getHref = (page) => getPageHref?.(page) ?? `?page=${page}`;
2168
- const PrevButton = asLink ? /* @__PURE__ */ jsx(
2169
- "a",
2170
- {
2171
- className: cn("px-3 py-1 rounded-lg border dark:border-gray-600 dark:text-white dark:hover:bg-gray-700", sizeClass, currentPage === 1 ? disabledClass : "hover:cursor-pointer"),
2172
- href: currentPage > 1 ? getHref(currentPage - 1) : void 0,
2173
- onClick: (e) => {
2174
- if (currentPage === 1) {
2175
- e.preventDefault();
2176
- return;
2177
- }
2178
- e.preventDefault();
2179
- goToPage(currentPage - 1);
2180
- },
2181
- "aria-disabled": currentPage === 1,
2182
- children: prevIcon ?? /* @__PURE__ */ jsx("span", { children: "<" })
2183
- }
2184
- ) : /* @__PURE__ */ jsx(
2185
- "button",
2186
- {
2187
- className: cn("px-3 py-1 rounded-lg border dark:border-gray-600 dark:text-white dark:hover:bg-gray-700", sizeClass, currentPage === 1 ? disabledClass : "hover:cursor-pointer"),
2188
- onClick: () => goToPage(currentPage - 1),
2189
- disabled: currentPage === 1,
2190
- children: prevIcon ?? /* @__PURE__ */ jsx("span", { children: "<" })
2191
- }
2170
+ const baseButtonClass = cn(
2171
+ "inline-flex items-center justify-center border transition-colors select-none",
2172
+ "bg-white border-gray-200 text-gray-700 hover:bg-gray-100 hover:text-gray-900",
2173
+ "dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:hover:text-neutral-100",
2174
+ sizeClass
2192
2175
  );
2193
- const NextButton = asLink ? /* @__PURE__ */ jsx(
2194
- "a",
2195
- {
2196
- className: cn("px-3 py-1 rounded-lg border dark:border-gray-600 dark:text-white dark:hover:bg-gray-700", sizeClass, currentPage === totalPages ? disabledClass : "hover:cursor-pointer"),
2197
- href: currentPage < totalPages ? getHref(currentPage + 1) : void 0,
2198
- onClick: (e) => {
2199
- if (currentPage === totalPages) {
2200
- e.preventDefault();
2201
- return;
2176
+ const renderNavButton = (direction) => {
2177
+ const isPrev = direction === "prev";
2178
+ const isDisabled = isPrev ? currentPage <= 1 : currentPage >= totalPages;
2179
+ const targetPage = isPrev ? currentPage - 1 : currentPage + 1;
2180
+ const label = isPrev ? "Previous page" : "Next page";
2181
+ const icon = isPrev ? prevIcon ?? "‹" : nextIcon ?? "›";
2182
+ const navClass = cn(
2183
+ baseButtonClass,
2184
+ isDisabled ? "opacity-50 pointer-events-none cursor-not-allowed" : "cursor-pointer"
2185
+ );
2186
+ if (asLink) {
2187
+ return /* @__PURE__ */ jsx(
2188
+ "a",
2189
+ {
2190
+ "aria-label": label,
2191
+ "aria-disabled": isDisabled,
2192
+ className: navClass,
2193
+ href: !isDisabled ? getHref(targetPage) : void 0,
2194
+ onClick: (e) => {
2195
+ e.preventDefault();
2196
+ if (!isDisabled) goToPage(targetPage);
2197
+ },
2198
+ children: icon
2202
2199
  }
2203
- e.preventDefault();
2204
- goToPage(currentPage + 1);
2205
- },
2206
- "aria-disabled": currentPage === totalPages,
2207
- children: nextIcon ?? /* @__PURE__ */ jsx("span", { children: ">" })
2208
- }
2209
- ) : /* @__PURE__ */ jsx(
2210
- "button",
2211
- {
2212
- className: cn("px-3 py-1 rounded-lg border dark:border-gray-600 dark:text-white dark:hover:bg-gray-700", sizeClass, currentPage === totalPages ? disabledClass : "hover:cursor-pointer"),
2213
- onClick: () => goToPage(currentPage + 1),
2214
- disabled: currentPage === totalPages,
2215
- children: nextIcon ?? /* @__PURE__ */ jsx("span", { children: ">" })
2200
+ );
2216
2201
  }
2217
- );
2202
+ return /* @__PURE__ */ jsx(
2203
+ "button",
2204
+ {
2205
+ type: "button",
2206
+ "aria-label": label,
2207
+ className: navClass,
2208
+ onClick: () => goToPage(targetPage),
2209
+ disabled: isDisabled,
2210
+ children: icon
2211
+ }
2212
+ );
2213
+ };
2218
2214
  const renderPageInfo = () => {
2219
2215
  if (format === "long" && pageSize && count) {
2220
2216
  const start = (currentPage - 1) * pageSize + 1;
2221
2217
  const end = Math.min(currentPage * pageSize, count);
2222
- return /* @__PURE__ */ jsxs("p", { className: "dark:text-white", children: [
2218
+ return /* @__PURE__ */ jsxs("p", { className: "text-sm text-gray-600 dark:text-neutral-400", children: [
2223
2219
  "Showing ",
2224
- start,
2225
- " - ",
2226
- end,
2227
- " of ",
2228
- count
2220
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900 dark:text-neutral-100", children: start }),
2221
+ " -",
2222
+ " ",
2223
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900 dark:text-neutral-100", children: end }),
2224
+ " of",
2225
+ " ",
2226
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900 dark:text-neutral-100", children: count })
2229
2227
  ] });
2230
2228
  }
2231
2229
  if (format === "none") {
2232
- return /* @__PURE__ */ jsxs("p", { className: "dark:text-white", children: [
2233
- currentPage,
2234
- " of ",
2235
- totalPages
2230
+ return /* @__PURE__ */ jsxs("p", { className: "text-sm text-gray-600 dark:text-neutral-400", children: [
2231
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900 dark:text-neutral-100", children: currentPage }),
2232
+ " of",
2233
+ " ",
2234
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-gray-900 dark:text-neutral-100", children: totalPages })
2236
2235
  ] });
2237
2236
  }
2238
2237
  return null;
2239
2238
  };
2240
- if (!simplified) {
2241
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
2242
- PrevButton,
2243
- paginationRange.map((page, idx) => {
2244
- if (page === "...") {
2245
- return /* @__PURE__ */ jsx("span", { className: cn("px-3 py-1 text-gray-500 dark:text-gray-400", sizeClass), children: "..." }, idx);
2246
- }
2247
- const isActive = page === currentPage;
2248
- const baseClasses = cn(
2249
- "px-3 py-1 rounded-lg border",
2250
- isActive ? "bg-primary text-white dark:bg-primary-dark dark:border-primary-dark" : "hover:bg-secondary hover:cursor-pointer dark:border-gray-600 dark:text-white dark:hover:bg-gray-700",
2251
- sizeClass,
2252
- isActive && "pointer-events-none"
2239
+ if (simplified) {
2240
+ return /* @__PURE__ */ jsxs("nav", { "aria-label": "Pagination", className: "inline-flex items-center gap-3", children: [
2241
+ renderNavButton("prev"),
2242
+ renderPageInfo(),
2243
+ renderNavButton("next")
2244
+ ] });
2245
+ }
2246
+ return /* @__PURE__ */ jsxs("nav", { "aria-label": "Pagination", className: "inline-flex flex-wrap items-center gap-1.5", children: [
2247
+ renderNavButton("prev"),
2248
+ paginationRange.map((page, idx) => {
2249
+ if (page === DOTS) {
2250
+ return /* @__PURE__ */ jsx(
2251
+ "span",
2252
+ {
2253
+ className: cn("inline-flex items-center justify-center text-gray-400 dark:text-neutral-500 select-none", sizeClass),
2254
+ children: DOTS
2255
+ },
2256
+ `dots-${idx}`
2253
2257
  );
2254
- if (asLink) {
2255
- return /* @__PURE__ */ jsx(
2256
- "a",
2257
- {
2258
- className: baseClasses,
2259
- href: getHref(Number(page)),
2260
- onClick: (e) => {
2261
- e.preventDefault();
2262
- goToPage(Number(page));
2263
- },
2264
- children: page
2265
- },
2266
- idx
2267
- );
2268
- }
2258
+ }
2259
+ const pageNumber = Number(page);
2260
+ const isActive = pageNumber === currentPage;
2261
+ const pageClass = cn(
2262
+ "inline-flex items-center justify-center border transition-colors select-none",
2263
+ sizeClass,
2264
+ isActive ? "bg-primary border-primary text-white dark:bg-primary-dark dark:border-primary-dark pointer-events-none" : "bg-white border-gray-200 text-gray-700 hover:bg-gray-100 hover:text-gray-900 dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-300 dark:hover:bg-neutral-800 dark:hover:text-neutral-100 cursor-pointer"
2265
+ );
2266
+ if (asLink) {
2269
2267
  return /* @__PURE__ */ jsx(
2270
- "button",
2268
+ "a",
2271
2269
  {
2272
- className: baseClasses,
2273
- onClick: () => goToPage(Number(page)),
2274
- children: page
2270
+ "aria-current": isActive ? "page" : void 0,
2271
+ className: pageClass,
2272
+ href: getHref(pageNumber),
2273
+ onClick: (e) => {
2274
+ e.preventDefault();
2275
+ goToPage(pageNumber);
2276
+ },
2277
+ children: pageNumber
2275
2278
  },
2276
- idx
2279
+ pageNumber
2277
2280
  );
2278
- }),
2279
- NextButton
2280
- ] });
2281
- }
2282
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
2283
- PrevButton,
2284
- renderPageInfo(),
2285
- NextButton
2281
+ }
2282
+ return /* @__PURE__ */ jsx(
2283
+ "button",
2284
+ {
2285
+ type: "button",
2286
+ "aria-current": isActive ? "page" : void 0,
2287
+ className: pageClass,
2288
+ onClick: () => goToPage(pageNumber),
2289
+ children: pageNumber
2290
+ },
2291
+ pageNumber
2292
+ );
2293
+ }),
2294
+ renderNavButton("next")
2286
2295
  ] });
2287
2296
  };
2288
2297
  const RadioSizes = {
@@ -2910,58 +2919,54 @@ function Table({
2910
2919
  }
2911
2920
  const TabsVariants = {
2912
2921
  line: {
2913
- wrapper: "border-b border-secondary dark:border-secondary-dark",
2914
- button: "whitespace-nowrap py-4 px-1 font-medium text-sm",
2915
- active: "border-primary text-primary dark:text-primary-30 transition-all duration-300 ease-in-out",
2916
- inactive: "border-transparent text-gray-500 hover:text-secondary-700 dark:text-white dark:hover:text-secondary-dark-700"
2922
+ wrapper: "border-b border-gray-200 dark:border-neutral-800",
2923
+ button: "whitespace-nowrap py-3 px-3 font-medium text-sm",
2924
+ active: "text-primary dark:text-primary-dark",
2925
+ inactive: "text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100"
2917
2926
  },
2918
2927
  solid: {
2919
- wrapper: "rounded-md p-1",
2928
+ wrapper: "rounded-lg bg-gray-100 dark:bg-neutral-900 border border-gray-200 dark:border-neutral-800 p-1",
2920
2929
  button: "whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md",
2921
- active: "bg-indigo-100 dark:bg-indigo-200 text-primary dark:text-primary-dark transition-all duration-300 ease-in-out",
2922
- inactive: "text-gray-500 hover:text-secondary-700 dark:text-white dark:hover:text-secondary-dark-700"
2930
+ active: "bg-primary/15 dark:bg-primary/25 text-primary dark:text-neutral-100",
2931
+ inactive: "text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100"
2923
2932
  },
2924
2933
  subtle: {
2925
- wrapper: "rounded-md bg-transparent p-1",
2926
- button: "whitespace-nowrap py-2 px-4 font-medium text-sm",
2927
- active: "text-white transition-all duration-300 ease-in-out z-10",
2928
- inactive: "bg-transparent text-primary dark:text-primary-30 hover:text-primary-700"
2934
+ wrapper: "rounded-lg bg-transparent p-1",
2935
+ button: "whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md",
2936
+ active: "text-white",
2937
+ inactive: "text-gray-600 hover:text-primary dark:text-neutral-400 dark:hover:text-neutral-100"
2929
2938
  },
2930
2939
  inline: {
2931
- wrapper: "border border-primary rounded-t-md border-b dark:border-primary-dark-30",
2932
- button: "whitespace-nowrap py-2 px-4 font-medium text-sm z-10",
2933
- active: "text-white transition-all duration-300 ease-in-out",
2934
- inactive: "text-gray-500 hover:text-secondary-700 dark:text-white dark:hover:text-secondary-dark"
2940
+ wrapper: "border-b border-gray-200 dark:border-neutral-800",
2941
+ button: "whitespace-nowrap py-2 px-4 font-medium text-sm rounded-t-md",
2942
+ active: "text-white",
2943
+ inactive: "text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100"
2935
2944
  },
2936
2945
  outline: {
2937
- wrapper: "border border-primary dark:border-primary-dark-30 rounded-md p-1",
2946
+ wrapper: "border border-gray-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 rounded-lg p-1",
2938
2947
  button: "whitespace-nowrap py-2 px-4 font-medium text-sm rounded-md",
2939
- active: "bg-indigo-100 dark:bg-indigo-200 text-primary dark:text-primary-dark transition-all duration-300 ease-in-out",
2940
- inactive: "text-gray-500 hover:text-secondary-700 dark:text-white dark:hover:text-secondary-dark"
2948
+ active: "bg-primary/15 dark:bg-primary/25 text-primary dark:text-neutral-100",
2949
+ inactive: "text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100"
2941
2950
  },
2942
2951
  plain: {
2943
2952
  wrapper: "",
2944
- button: "whitespace-nowrap py-2 px-4 font-medium text-sm",
2945
- active: "text-primary dark:text-primary-30 transition-all duration-300 ease-in-out",
2946
- inactive: "text-gray-500 hover:text-secondary-700 dark:text-white dark:hover:text-secondary"
2953
+ button: "whitespace-nowrap py-2 px-3 font-medium text-sm",
2954
+ active: "text-primary dark:text-primary-dark",
2955
+ inactive: "text-gray-500 hover:text-gray-800 dark:text-neutral-400 dark:hover:text-neutral-100"
2947
2956
  }
2948
2957
  };
2949
2958
  const IndicatorVariants = {
2950
- line: "absolute bottom-0 h-1 bg-primary dark:bg-primary-30 transition-all duration-300 ease-in-out",
2951
- solid: "absolute bottom-0 h-1 bg-primary transition-all duration-300 ease-in-out",
2952
- subtle: "absolute bottom-0 h-full bg-primary rounded-md transition-all duration-300 ease-in-out",
2953
- inline: "absolute bottom-0 h-full bg-primary border-t border-r border-l border-primary-700 rounded-tl-md rounded-tr-md transition-all duration-300 ease-in-out",
2954
- outline: "absolute bottom-0 h-1 bg-primary transition-all duration-300 ease-in-out",
2955
- plain: ""
2959
+ line: "absolute bottom-0 h-0.5 bg-primary dark:bg-primary-dark transition-all duration-300 ease-in-out z-0",
2960
+ solid: "absolute bottom-0 h-0.5 bg-primary dark:bg-primary-dark rounded-full transition-all duration-300 ease-in-out z-0",
2961
+ subtle: "absolute inset-y-0 bg-primary dark:bg-primary-dark rounded-md transition-all duration-300 ease-in-out z-0",
2962
+ inline: "absolute inset-y-0 bg-primary dark:bg-primary-dark rounded-t-md transition-all duration-300 ease-in-out z-0",
2963
+ outline: "absolute bottom-0 h-0.5 bg-primary dark:bg-primary-dark rounded-full transition-all duration-300 ease-in-out z-0",
2964
+ plain: "hidden"
2956
2965
  };
2957
2966
  const Tabs = ({
2958
2967
  tabs,
2959
- fitted,
2968
+ fitted = false,
2960
2969
  variant = "line",
2961
- wrapperClassName,
2962
- buttonClassName,
2963
- activeClassName,
2964
- inactiveClassName,
2965
2970
  activeTab: controlledActiveTab,
2966
2971
  onTabChange
2967
2972
  }) => {
@@ -2970,24 +2975,29 @@ const Tabs = ({
2970
2975
  const activeTab = isControlled ? controlledActiveTab : internalActiveTab;
2971
2976
  const variantClasses = TabsVariants[variant];
2972
2977
  const indicatorVariantClasses = IndicatorVariants[variant];
2978
+ const navRef = useRef(null);
2973
2979
  const tabRefs = useRef([]);
2974
2980
  const indicatorRef = useRef(null);
2975
2981
  useEffect(() => {
2976
2982
  if (!isControlled && activeTab >= tabs.length) {
2977
2983
  setInternalActiveTab(Math.max(0, tabs.length - 1));
2978
2984
  }
2979
- }, [tabs, activeTab, isControlled]);
2985
+ }, [tabs.length, activeTab, isControlled]);
2980
2986
  useEffect(() => {
2981
2987
  const currentTab = tabRefs.current[activeTab];
2982
2988
  const indicator = indicatorRef.current;
2989
+ const nav = navRef.current;
2983
2990
  if (currentTab && indicator) {
2984
2991
  const left = currentTab.offsetLeft;
2985
2992
  const width = currentTab.offsetWidth;
2986
2993
  indicator.style.transform = `translateX(${left}px)`;
2987
2994
  indicator.style.width = `${width}px`;
2988
- currentTab.scrollIntoView({ behavior: "smooth", inline: "center", block: "nearest" });
2995
+ if (nav) {
2996
+ const scrollLeft = left - nav.clientWidth / 2 + width / 2;
2997
+ nav.scrollTo({ left: scrollLeft, behavior: "smooth" });
2998
+ }
2989
2999
  }
2990
- }, [activeTab, tabs]);
3000
+ }, [activeTab, tabs, fitted, variant]);
2991
3001
  const handleTabClick = (index) => {
2992
3002
  if (isControlled) {
2993
3003
  onTabChange(index);
@@ -2995,57 +3005,73 @@ const Tabs = ({
2995
3005
  setInternalActiveTab(index);
2996
3006
  }
2997
3007
  };
2998
- return /* @__PURE__ */ jsxs("div", { children: [
2999
- /* @__PURE__ */ jsx("div", { className: cn("relative", variantClasses.wrapper, wrapperClassName), children: /* @__PURE__ */ jsxs("nav", { className: "relative -mb-px flex space-x-2 overflow-x-auto scroll-smooth", "aria-label": "Tabs", children: [
3000
- tabs.map((tab, index) => {
3001
- const className = cn(
3002
- "hover:cursor-pointer",
3003
- fitted && "flex-1",
3004
- variantClasses.button,
3005
- buttonClassName,
3006
- activeTab === index ? cn(variantClasses.active, activeClassName) : cn(variantClasses.inactive, inactiveClassName),
3007
- tab.disabled && "hover:cursor-not-allowed cursor-not-allowed opacity-50"
3008
- );
3009
- if (tab.link) {
3010
- return /* @__PURE__ */ jsx(
3011
- "a",
3012
- {
3013
- href: !tab.disabled ? tab.link : void 0,
3014
- ref: (el) => {
3015
- tabRefs.current[index] = el;
3008
+ return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
3009
+ /* @__PURE__ */ jsx("div", { className: cn("relative", variantClasses.wrapper), children: /* @__PURE__ */ jsxs(
3010
+ "nav",
3011
+ {
3012
+ ref: navRef,
3013
+ role: "tablist",
3014
+ "aria-label": "Tabs",
3015
+ className: "relative flex space-x-1 overflow-x-auto scroll-smooth",
3016
+ children: [
3017
+ tabs.map((tab, index) => {
3018
+ const isActive = activeTab === index;
3019
+ const tabClassName = cn(
3020
+ "relative z-10 inline-flex items-center justify-center transition-colors duration-200 select-none",
3021
+ fitted && "flex-1",
3022
+ variantClasses.button,
3023
+ isActive ? variantClasses.active : variantClasses.inactive,
3024
+ tab.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
3025
+ );
3026
+ if (tab.link) {
3027
+ return /* @__PURE__ */ jsx(
3028
+ "a",
3029
+ {
3030
+ role: "tab",
3031
+ "aria-selected": isActive,
3032
+ "aria-disabled": tab.disabled,
3033
+ href: !tab.disabled ? tab.link : void 0,
3034
+ ref: (el) => {
3035
+ tabRefs.current[index] = el;
3036
+ },
3037
+ className: tabClassName,
3038
+ onClick: (e) => {
3039
+ if (tab.disabled) e.preventDefault();
3040
+ },
3041
+ children: tab.label
3042
+ },
3043
+ `${tab.label}-${index}`
3044
+ );
3045
+ }
3046
+ return /* @__PURE__ */ jsx(
3047
+ "button",
3048
+ {
3049
+ type: "button",
3050
+ role: "tab",
3051
+ "aria-selected": isActive,
3052
+ ref: (el) => {
3053
+ tabRefs.current[index] = el;
3054
+ },
3055
+ onClick: () => handleTabClick(index),
3056
+ disabled: tab.disabled,
3057
+ className: tabClassName,
3058
+ children: tab.label
3016
3059
  },
3017
- className,
3018
- "aria-disabled": tab.disabled,
3019
- onClick: (e) => tab.disabled && e.preventDefault(),
3020
- children: tab.label
3021
- },
3022
- tab.label
3023
- );
3024
- }
3025
- return /* @__PURE__ */ jsx(
3026
- "button",
3027
- {
3028
- ref: (el) => {
3029
- tabRefs.current[index] = el;
3030
- },
3031
- onClick: () => handleTabClick(index),
3032
- disabled: tab.disabled,
3033
- className,
3034
- children: tab.label
3035
- },
3036
- tab.label
3037
- );
3038
- }),
3039
- /* @__PURE__ */ jsx(
3040
- "div",
3041
- {
3042
- ref: indicatorRef,
3043
- className: cn(indicatorVariantClasses),
3044
- style: { width: 0, transform: "translateX(0px)" }
3045
- }
3046
- )
3047
- ] }) }),
3048
- /* @__PURE__ */ jsx("div", { className: "mt-4", children: tabs[activeTab]?.content })
3060
+ `${tab.label}-${index}`
3061
+ );
3062
+ }),
3063
+ /* @__PURE__ */ jsx(
3064
+ "div",
3065
+ {
3066
+ ref: indicatorRef,
3067
+ className: indicatorVariantClasses,
3068
+ style: { width: 0, transform: "translateX(0px)" }
3069
+ }
3070
+ )
3071
+ ]
3072
+ }
3073
+ ) }),
3074
+ /* @__PURE__ */ jsx("div", { role: "tabpanel", className: "mt-4 text-gray-700 dark:text-neutral-300", children: tabs[activeTab]?.content })
3049
3075
  ] });
3050
3076
  };
3051
3077
  const Textarea = ({
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/Alope-Community/alope-ui.git"
7
7
  },
8
- "version": "1.2.62",
8
+ "version": "1.2.64",
9
9
  "type": "module",
10
10
  "files": [
11
11
  "dist"