reaxify 0.0.76 → 0.0.78

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/components/Accordion/index.cjs.js +1 -1
  2. package/dist/components/Accordion/index.d.ts +14 -7
  3. package/dist/components/Accordion/index.es.js +78 -68
  4. package/dist/components/Badge/index.cjs.js +1 -1
  5. package/dist/components/Badge/index.es.js +1 -1
  6. package/dist/components/ButtonGroup/index.cjs.js +1 -1
  7. package/dist/components/ButtonGroup/index.es.js +4 -4
  8. package/dist/components/Card/index.cjs.js +1 -1
  9. package/dist/components/Card/index.es.js +1 -1
  10. package/dist/components/Drawer/index.cjs.js +1 -1
  11. package/dist/components/Drawer/index.es.js +8 -8
  12. package/dist/components/InputGroup/index.cjs.js +1 -1
  13. package/dist/components/InputGroup/index.es.js +1 -1
  14. package/dist/components/Menu/index.cjs.js +1 -1
  15. package/dist/components/Menu/index.es.js +15 -15
  16. package/dist/components/Modal/index.cjs.js +1 -1
  17. package/dist/components/Modal/index.es.js +5 -5
  18. package/dist/components/Progress/index.cjs.js +1 -1
  19. package/dist/components/Progress/index.es.js +1 -1
  20. package/dist/components/Skeleton/index.cjs.js +1 -1
  21. package/dist/components/Skeleton/index.es.js +1 -1
  22. package/dist/components/Spacer/index.cjs.js +1 -1
  23. package/dist/components/Spacer/index.es.js +1 -1
  24. package/dist/components/Spinner/index.cjs.js +1 -1
  25. package/dist/components/Spinner/index.es.js +1 -1
  26. package/dist/components/Stack/index.cjs.js +1 -1
  27. package/dist/components/Stack/index.es.js +3 -3
  28. package/dist/components/Table/index.cjs.js +1 -1
  29. package/dist/components/Table/index.es.js +1 -1
  30. package/dist/components/Tooltip/index.cjs.js +1 -1
  31. package/dist/components/Tooltip/index.es.js +7 -7
  32. package/dist/components/Typography/index.cjs.js +1 -1
  33. package/dist/components/Typography/index.es.js +1 -1
  34. package/dist/helpers/index.cjs.js +1 -1
  35. package/dist/helpers/index.d.ts +0 -2
  36. package/dist/helpers/index.es.js +24 -28
  37. package/dist/hooks/index.cjs.js +1 -1
  38. package/dist/hooks/index.d.ts +0 -3
  39. package/dist/hooks/index.es.js +16 -22
  40. package/dist/hooks/useKeyDown.cjs.js +1 -1
  41. package/dist/hooks/useKeyDown.d.ts +6 -1
  42. package/dist/hooks/useKeyDown.es.js +7 -7
  43. package/package.json +1 -1
  44. package/dist/helpers/getByPath.cjs.js +0 -1
  45. package/dist/helpers/getByPath.d.ts +0 -1
  46. package/dist/helpers/getByPath.es.js +0 -7
  47. package/dist/helpers/matrixArray.cjs.js +0 -1
  48. package/dist/helpers/matrixArray.d.ts +0 -1
  49. package/dist/helpers/matrixArray.es.js +0 -11
  50. package/dist/hooks/useAutoFill.cjs.js +0 -1
  51. package/dist/hooks/useAutoFill.d.ts +0 -4
  52. package/dist/hooks/useAutoFill.es.js +0 -27
  53. package/dist/hooks/useMouse.cjs.js +0 -1
  54. package/dist/hooks/useMouse.d.ts +0 -1
  55. package/dist/hooks/useMouse.es.js +0 -19
  56. package/dist/hooks/useOutsideClick.cjs.js +0 -1
  57. package/dist/hooks/useOutsideClick.d.ts +0 -4
  58. package/dist/hooks/useOutsideClick.es.js +0 -18
@@ -1 +1 @@
1
- "use client";"use strict";const a=require("react/jsx-runtime"),r=require("react"),l=require("../../hooks/useClasses.cjs.js"),C=require("../../node_modules/react-animate-height/dist/esm/index.cjs.js"),d=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),b=require("../../helpers/randomID.cjs.js"),h=require("../../node_modules/iconsax-react/dist/esm/ArrowDown2.cjs.js"),f=r.createContext({activeKey:null,onChange:()=>{}}),g=r.createContext({active:!1,eventKey:null});function u({activeKey:t=null,onChange:n=()=>{},children:e}){return a.jsx(f.Provider,{value:{activeKey:t,onChange:n},children:e})}function p({as:t,eventKey:n=null,className:e,children:o,...i}){const x=l(y=>y.accordion.item.base),{activeKey:s}=r.useContext(f),m=t||"div",v=r.useMemo(()=>b(),[]),c=n||v,A=r.useMemo(()=>Array.isArray(s)?s.includes(c):c===s,[s,c]);return a.jsx(m,{className:d.twMerge("block w-full border border-[#e8eaee] rounded",x,e),...i,children:a.jsx(g.Provider,{value:{eventKey:c,active:A},children:o})})}function w({type:t,className:n,children:e,onClick:o,...i}){const x=l(c=>c.accordion.toggle.base),{eventKey:s}=r.useContext(g),{onChange:m}=r.useContext(f),v=c=>{s&&m(s),o==null||o(c)};return a.jsx("button",{type:t,className:d.twMerge("w-full flex items-center text-start text-base px-5 py-4 rounded-t cursor-pointer",x,n),onClick:v,...i,children:e})}function j({className:t,...n}){const e=l(i=>i.accordion.icon),{active:o}=r.useContext(g);return a.jsx(h,{color:"currentColor",className:d.twMerge("size-5 transition-transform",e==null?void 0:e.base,o?"-rotate-180":"rotate-0",o?e==null?void 0:e.active:e==null?void 0:e.inactive,t),...n})}function q({duration:t=300,children:n}){const{active:e}=r.useContext(g);return a.jsx(C,{duration:t,height:e?"auto":0,className:"w-full",animationStateClasses:{animating:"",animatingUp:"",animatingDown:"",static:"",animatingToHeightZero:"",animatingToHeightAuto:"",animatingToHeightSpecific:"",staticHeightZero:"",staticHeightAuto:"",staticHeightSpecific:""},children:n})}function I({className:t,children:n,...e}){const o=l(i=>i.accordion.body.base);return a.jsx("div",{className:d.twMerge("w-full block px-5 py-4 rounded-b",o,t),...e,children:n})}u.Item=p;u.Toggle=w;u.Icon=j;u.Collapse=q;u.Body=I;module.exports=u;
1
+ "use client";"use strict";const u=require("react/jsx-runtime"),x=require("../../hooks/useClasses.cjs.js"),a=require("react"),C=require("../../node_modules/react-animate-height/dist/esm/index.cjs.js"),m=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),b=require("../../helpers/randomID.cjs.js"),p=require("../../node_modules/iconsax-react/dist/esm/ArrowDown2.cjs.js"),A=a.createContext({activeKey:null,handleChange:()=>{},variant:"single"}),f=a.createContext({active:!1,eventKey:null});function l({variant:n="single",activeKey:t=null,onChange:e=()=>{},children:o}){const r=s=>{if(n==="single")e(t===s?null:s);else{const c=Array.isArray(t)?t:[],d=c.includes(s)?c.filter(i=>i!==s):[...c,s];e(d)}};return u.jsx(A.Provider,{value:{activeKey:t,handleChange:r,variant:n},children:o})}function w({as:n,eventKey:t=null,className:e,children:o,...r}){const s=x(v=>v.accordion.item.base),{activeKey:c}=a.useContext(A),g=n||"div",d=a.useMemo(()=>b(),[]),i=t||d,h=a.useMemo(()=>Array.isArray(c)?c.includes(i):c===i,[c,i]);return u.jsx(g,{className:m.twMerge("block w-full border border-[#e8eaee] rounded",s,e),...r,children:u.jsx(f.Provider,{value:{eventKey:i,active:h},children:o})})}function j({type:n="button",className:t,children:e,onClick:o,...r}){const s=x(i=>i.accordion.toggle.base),{eventKey:c}=a.useContext(f),{handleChange:g}=a.useContext(A),d=i=>{c&&g(c),o==null||o(i)};return u.jsx("button",{type:n,className:m.twMerge("w-full flex items-center text-start text-base px-5 py-4 rounded-t cursor-pointer",s,t),onClick:d,...r,children:e})}function y({className:n,...t}){const e=x(r=>r.accordion.icon),{active:o}=a.useContext(f);return u.jsx(p,{color:"currentColor",className:m.twMerge("size-5 transition-transform",e==null?void 0:e.base,o?"-rotate-180":"rotate-0",o?e==null?void 0:e.active:e==null?void 0:e.inactive,n),...t})}function q({duration:n=300,children:t}){const{active:e}=a.useContext(f);return u.jsx(C,{duration:n,height:e?"auto":0,className:"w-full",animationStateClasses:{animating:"",animatingUp:"",animatingDown:"",static:"",animatingToHeightZero:"",animatingToHeightAuto:"",animatingToHeightSpecific:"",staticHeightZero:"",staticHeightAuto:"",staticHeightSpecific:""},children:t})}function I({className:n,children:t,...e}){const o=x(r=>r.accordion.body.base);return u.jsx("div",{className:m.twMerge("w-full block px-5 py-4 rounded-b",o,n),...e,children:t})}l.Item=w;l.Toggle=j;l.Icon=y;l.Collapse=q;l.Body=I;module.exports=l;
@@ -1,17 +1,24 @@
1
1
  import { ChildrenProps, ComponentPropsWithAs } from '../../types';
2
2
  import { ComponentProps, Dispatch, ElementType } from 'react';
3
3
  type EventKey = string;
4
- type AccordionProps<T extends EventKey> = {
5
- activeKey?: null | T | T[];
6
- onChange?: Dispatch<EventKey>;
7
- };
4
+ type AccordionSingleProps<T extends EventKey> = {
5
+ variant?: "single";
6
+ activeKey?: T | null;
7
+ onChange?: Dispatch<T | null>;
8
+ } & ChildrenProps;
9
+ type AccordionMultipleProps<T extends EventKey> = {
10
+ variant: "multiple";
11
+ activeKey?: T[];
12
+ onChange?: Dispatch<T[]>;
13
+ } & ChildrenProps;
14
+ type AccordionProps<T extends EventKey> = AccordionSingleProps<T> | AccordionMultipleProps<T>;
8
15
  type AccordionItemProps = {
9
- eventKey?: null | EventKey;
16
+ eventKey?: EventKey | null;
10
17
  };
11
18
  type AccordionCollapseProps = {
12
19
  duration?: number;
13
20
  } & ChildrenProps;
14
- declare function Accordion<T extends EventKey = "string">({ activeKey, onChange, children, }: ChildrenProps & AccordionProps<T>): import("react/jsx-runtime").JSX.Element;
21
+ declare function Accordion<T extends EventKey>({ variant, activeKey, onChange, children, }: AccordionProps<T>): import("react/jsx-runtime").JSX.Element;
15
22
  declare namespace Accordion {
16
23
  var Item: typeof AccordionItem;
17
24
  var Toggle: typeof AccordionToggle;
@@ -19,7 +26,7 @@ declare namespace Accordion {
19
26
  var Collapse: typeof AccordionCollapse;
20
27
  var Body: typeof AccordionBody;
21
28
  }
22
- declare function AccordionItem<E extends ElementType = "div">({ as, eventKey: initEventKey, className, children, ...props }: ComponentPropsWithAs<E, AccordionItemProps>): import("react/jsx-runtime").JSX.Element;
29
+ declare function AccordionItem<E extends ElementType = "div", T extends EventKey = string>({ as, eventKey: initEventKey, className, children, ...props }: ComponentPropsWithAs<E, AccordionItemProps>): import("react/jsx-runtime").JSX.Element;
23
30
  declare function AccordionToggle({ type, className, children, onClick, ...props }: ComponentProps<"button">): import("react/jsx-runtime").JSX.Element;
24
31
  declare function AccordionIcon({ className, ...props }: Omit<ComponentProps<"svg">, "ref" | "children">): import("react/jsx-runtime").JSX.Element;
25
32
  declare function AccordionCollapse({ duration, children, }: AccordionCollapseProps): import("react/jsx-runtime").JSX.Element;
@@ -1,102 +1,112 @@
1
1
  "use client";
2
- import { jsx as a } from "react/jsx-runtime";
3
- import { createContext as h, useContext as s, useMemo as y } from "react";
4
- import u from "../../hooks/useClasses.es.js";
5
- import x from "../../node_modules/react-animate-height/dist/esm/index.es.js";
6
- import { twMerge as m } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
- import C from "../../helpers/randomID.es.js";
8
- import w from "../../node_modules/iconsax-react/dist/esm/ArrowDown2.es.js";
9
- const v = h({
2
+ import { jsx as s } from "react/jsx-runtime";
3
+ import f from "../../hooks/useClasses.es.js";
4
+ import { createContext as v, useContext as u, useMemo as h } from "react";
5
+ import C from "../../node_modules/react-animate-height/dist/esm/index.es.js";
6
+ import { twMerge as g } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
+ import w from "../../helpers/randomID.es.js";
8
+ import y from "../../node_modules/iconsax-react/dist/esm/ArrowDown2.es.js";
9
+ const p = v({
10
10
  activeKey: null,
11
- onChange: () => {
12
- }
13
- }), d = h({
11
+ handleChange: () => {
12
+ },
13
+ variant: "single"
14
+ }), A = v({
14
15
  active: !1,
15
16
  eventKey: null
16
17
  });
17
- function l({
18
+ function d({
19
+ variant: e = "single",
18
20
  activeKey: o = null,
19
- onChange: e = () => {
21
+ onChange: t = () => {
20
22
  },
21
- children: t
23
+ children: n
22
24
  }) {
23
- return /* @__PURE__ */ a(v.Provider, { value: { activeKey: o, onChange: e }, children: t });
25
+ const c = (a) => {
26
+ if (e === "single")
27
+ t(o === a ? null : a);
28
+ else {
29
+ const i = Array.isArray(o) ? o : [], l = i.includes(a) ? i.filter((r) => r !== a) : [...i, a];
30
+ t(l);
31
+ }
32
+ };
33
+ return /* @__PURE__ */ s(p.Provider, { value: { activeKey: o, handleChange: c, variant: e }, children: n });
24
34
  }
25
35
  function H({
26
- as: o,
27
- eventKey: e = null,
36
+ as: e,
37
+ eventKey: o = null,
28
38
  className: t,
29
39
  children: n,
30
- ...i
40
+ ...c
31
41
  }) {
32
- const f = u((A) => A.accordion.item.base), { activeKey: c } = s(v), g = o || "div", p = y(() => C(), []), r = e || p, b = y(() => Array.isArray(c) ? c.includes(r) : r === c, [c, r]);
33
- return /* @__PURE__ */ a(
34
- g,
42
+ const a = f((x) => x.accordion.item.base), { activeKey: i } = u(p), m = e || "div", l = h(() => w(), []), r = o || l, b = h(() => Array.isArray(i) ? i.includes(r) : i === r, [i, r]);
43
+ return /* @__PURE__ */ s(
44
+ m,
35
45
  {
36
- className: m(
46
+ className: g(
37
47
  "block w-full border border-[#e8eaee] rounded",
38
- f,
48
+ a,
39
49
  t
40
50
  ),
41
- ...i,
42
- children: /* @__PURE__ */ a(d.Provider, { value: { eventKey: r, active: b }, children: n })
51
+ ...c,
52
+ children: /* @__PURE__ */ s(A.Provider, { value: { eventKey: r, active: b }, children: n })
43
53
  }
44
54
  );
45
55
  }
46
56
  function I({
47
- type: o,
48
- className: e,
57
+ type: e = "button",
58
+ className: o,
49
59
  children: t,
50
60
  onClick: n,
51
- ...i
61
+ ...c
52
62
  }) {
53
- const f = u((r) => r.accordion.toggle.base), { eventKey: c } = s(d), { onChange: g } = s(v), p = (r) => {
54
- c && g(c), n == null || n(r);
63
+ const a = f((r) => r.accordion.toggle.base), { eventKey: i } = u(A), { handleChange: m } = u(p), l = (r) => {
64
+ i && m(i), n == null || n(r);
55
65
  };
56
- return /* @__PURE__ */ a(
66
+ return /* @__PURE__ */ s(
57
67
  "button",
58
68
  {
59
- type: o,
60
- className: m(
69
+ type: e,
70
+ className: g(
61
71
  "w-full flex items-center text-start text-base px-5 py-4 rounded-t cursor-pointer",
62
- f,
63
- e
72
+ a,
73
+ o
64
74
  ),
65
- onClick: p,
66
- ...i,
75
+ onClick: l,
76
+ ...c,
67
77
  children: t
68
78
  }
69
79
  );
70
80
  }
71
- function K({
72
- className: o,
73
- ...e
81
+ function N({
82
+ className: e,
83
+ ...o
74
84
  }) {
75
- const t = u((i) => i.accordion.icon), { active: n } = s(d);
76
- return /* @__PURE__ */ a(
77
- w,
85
+ const t = f((c) => c.accordion.icon), { active: n } = u(A);
86
+ return /* @__PURE__ */ s(
87
+ y,
78
88
  {
79
89
  color: "currentColor",
80
- className: m(
90
+ className: g(
81
91
  "size-5 transition-transform",
82
92
  t == null ? void 0 : t.base,
83
93
  n ? "-rotate-180" : "rotate-0",
84
94
  n ? t == null ? void 0 : t.active : t == null ? void 0 : t.inactive,
85
- o
95
+ e
86
96
  ),
87
- ...e
97
+ ...o
88
98
  }
89
99
  );
90
100
  }
91
- function N({
92
- duration: o = 300,
93
- children: e
101
+ function T({
102
+ duration: e = 300,
103
+ children: o
94
104
  }) {
95
- const { active: t } = s(d);
96
- return /* @__PURE__ */ a(
97
- x,
105
+ const { active: t } = u(A);
106
+ return /* @__PURE__ */ s(
107
+ C,
98
108
  {
99
- duration: o,
109
+ duration: e,
100
110
  height: t ? "auto" : 0,
101
111
  className: "w-full",
102
112
  animationStateClasses: {
@@ -111,34 +121,34 @@ function N({
111
121
  staticHeightAuto: "",
112
122
  staticHeightSpecific: ""
113
123
  },
114
- children: e
124
+ children: o
115
125
  }
116
126
  );
117
127
  }
118
- function T({
119
- className: o,
120
- children: e,
128
+ function D({
129
+ className: e,
130
+ children: o,
121
131
  ...t
122
132
  }) {
123
- const n = u((i) => i.accordion.body.base);
124
- return /* @__PURE__ */ a(
133
+ const n = f((c) => c.accordion.body.base);
134
+ return /* @__PURE__ */ s(
125
135
  "div",
126
136
  {
127
- className: m(
137
+ className: g(
128
138
  "w-full block px-5 py-4 rounded-b",
129
139
  n,
130
- o
140
+ e
131
141
  ),
132
142
  ...t,
133
- children: e
143
+ children: o
134
144
  }
135
145
  );
136
146
  }
137
- l.Item = H;
138
- l.Toggle = I;
139
- l.Icon = K;
140
- l.Collapse = N;
141
- l.Body = T;
147
+ d.Item = H;
148
+ d.Toggle = I;
149
+ d.Icon = N;
150
+ d.Collapse = T;
151
+ d.Body = D;
142
152
  export {
143
- l as default
153
+ d as default
144
154
  };
@@ -1 +1 @@
1
- "use client";"use strict";const w=require("react/jsx-runtime"),a=require("../../helpers/cn.cjs.js"),u=require("react"),h=require("../../hooks/useClasses.cjs.js"),k=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function q({as:x,variant:i="solid",color:n=null,size:s="md",className:c,children:l,...p}){const e=h(r=>r.badge),m=x||"span",f=u.useMemo(()=>{var t,b,g;if(!n)return"border-transparent";const r={primary:{solid:"bg-primary text-white border-primary",outline:"bg-transparent text-primary border-primary",soft:"bg-primary/10 text-primary border-primary/10"},secondary:{solid:"bg-secondary text-white border-secondary",outline:"bg-transparent text-secondary border-secondary",soft:"bg-secondary/10 text-secondary border-secondary/10"},success:{solid:"bg-success text-white border-success",outline:"bg-transparent text-success border-success",soft:"bg-success/10 text-success border-success/10"},info:{solid:"bg-info text-white border-info",outline:"bg-transparent text-info border-info",soft:"bg-info/10 text-info border-info/10"},warning:{solid:"bg-warning text-white border-warning",outline:"bg-transparent text-warning border-warning",soft:"bg-warning/10 text-warning border-warning/10"},danger:{solid:"bg-danger text-white border-danger",outline:"bg-transparent text-danger border-danger",soft:"bg-danger/10 text-danger border-danger/10"},dark:{solid:"bg-dark text-white border-dark",outline:"bg-transparent text-dark border-dark",soft:"bg-dark/10 text-dark border-dark/10"},light:{solid:"bg-light text-dark border-light",outline:"bg-transparent text-dark border-light",soft:"bg-light/10 text-dark border-light/10"}},o=(t=r==null?void 0:r[n])==null?void 0:t[i],d=(g=(b=e==null?void 0:e.color)==null?void 0:b[n])==null?void 0:g[i];return[o,d]},[n,i,e==null?void 0:e.color]),y=u.useMemo(()=>{var o,d,t;if(!s)return null;const r={sm:a("text-xs py-0.5 px-1.5",(o=e==null?void 0:e.size)==null?void 0:o.sm),md:a("text-sm py-[0.1875rem] px-2",(d=e==null?void 0:e.size)==null?void 0:d.md),lg:a("text-base py-1 px-3",(t=e==null?void 0:e.size)==null?void 0:t.lg)};return r==null?void 0:r[s]},[s,e==null?void 0:e.size]);return w.jsx(m,{className:k.twMerge("inline-flex border border-[#e8eaee] items-center text-center font-medium align-middle whitespace-nowrap rounded",e==null?void 0:e.base,f,y,c),...p,children:l})}module.exports=q;
1
+ "use client";"use strict";const w=require("react/jsx-runtime"),a=require("../../helpers/cn.cjs.js"),h=require("../../hooks/useClasses.cjs.js"),u=require("react"),k=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function q({as:x,variant:i="solid",color:n=null,size:s="md",className:c,children:l,...p}){const e=h(r=>r.badge),m=x||"span",f=u.useMemo(()=>{var t,b,g;if(!n)return"border-transparent";const r={primary:{solid:"bg-primary text-white border-primary",outline:"bg-transparent text-primary border-primary",soft:"bg-primary/10 text-primary border-primary/10"},secondary:{solid:"bg-secondary text-white border-secondary",outline:"bg-transparent text-secondary border-secondary",soft:"bg-secondary/10 text-secondary border-secondary/10"},success:{solid:"bg-success text-white border-success",outline:"bg-transparent text-success border-success",soft:"bg-success/10 text-success border-success/10"},info:{solid:"bg-info text-white border-info",outline:"bg-transparent text-info border-info",soft:"bg-info/10 text-info border-info/10"},warning:{solid:"bg-warning text-white border-warning",outline:"bg-transparent text-warning border-warning",soft:"bg-warning/10 text-warning border-warning/10"},danger:{solid:"bg-danger text-white border-danger",outline:"bg-transparent text-danger border-danger",soft:"bg-danger/10 text-danger border-danger/10"},dark:{solid:"bg-dark text-white border-dark",outline:"bg-transparent text-dark border-dark",soft:"bg-dark/10 text-dark border-dark/10"},light:{solid:"bg-light text-dark border-light",outline:"bg-transparent text-dark border-light",soft:"bg-light/10 text-dark border-light/10"}},o=(t=r==null?void 0:r[n])==null?void 0:t[i],d=(g=(b=e==null?void 0:e.color)==null?void 0:b[n])==null?void 0:g[i];return[o,d]},[n,i,e==null?void 0:e.color]),y=u.useMemo(()=>{var o,d,t;if(!s)return null;const r={sm:a("text-xs py-0.5 px-1.5",(o=e==null?void 0:e.size)==null?void 0:o.sm),md:a("text-sm py-[0.1875rem] px-2",(d=e==null?void 0:e.size)==null?void 0:d.md),lg:a("text-base py-1 px-3",(t=e==null?void 0:e.size)==null?void 0:t.lg)};return r==null?void 0:r[s]},[s,e==null?void 0:e.size]);return w.jsx(m,{className:k.twMerge("inline-flex border border-[#e8eaee] items-center text-center font-medium align-middle whitespace-nowrap rounded",e==null?void 0:e.base,f,y,c),...p,children:l})}module.exports=q;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as w } from "react/jsx-runtime";
3
3
  import s from "../../helpers/cn.es.js";
4
- import { useMemo as x } from "react";
5
4
  import h from "../../hooks/useClasses.es.js";
5
+ import { useMemo as x } from "react";
6
6
  import { twMerge as k } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
7
  function B({
8
8
  as: p,
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),M=require("../../helpers/cn.cjs.js"),r=require("react"),h=require("../../hooks/useClasses.cjs.js"),G=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),R=require("../Tabs/index.cjs.js"),c=r.createContext({});function g({as:d,variant:l,color:a,size:f,loading:x,orientation:e="horizontal",className:b,children:p,...C}){const m=d||"div",t=h(o=>o.buttonGroup),{buttonGroupClasses:v}=r.useContext(R.TabsContext),j=r.useMemo(()=>{var n;return[{horizontal:"flex-row",vertical:"flex-col"}[e],(n=t==null?void 0:t.orientation)==null?void 0:n[e]]},[e,t==null?void 0:t.orientation]),q=r.useMemo(()=>{var u,s;const o={horizontal:"rounded-none first-of-type:rounded-s last-of-type:rounded-e",vertical:"rounded-none first-of-type:rounded-t last-of-type:rounded-b"},n=(s=(u=t==null?void 0:t.button)==null?void 0:u.orientation)==null?void 0:s[e],y=o[e];return M(y,n)},[e,t==null?void 0:t.button]);return i.jsx(m,{className:G.twMerge("w-fit flex items-stretch justify-center",t==null?void 0:t.base,j,v,b),...C,children:i.jsx(c.Provider,{value:{variant:l,color:a,size:f,loading:x,buttonClasses:q},children:p})})}exports.ButtonGroupContext=c;exports.default=g;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),M=require("../../helpers/cn.cjs.js"),h=require("../../hooks/useClasses.cjs.js"),r=require("react"),G=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),R=require("../Tabs/index.cjs.js"),c=r.createContext({});function g({as:d,variant:l,color:a,size:f,loading:x,orientation:e="horizontal",className:b,children:p,...C}){const m=d||"div",t=h(o=>o.buttonGroup),{buttonGroupClasses:v}=r.useContext(R.TabsContext),j=r.useMemo(()=>{var n;return[{horizontal:"flex-row",vertical:"flex-col"}[e],(n=t==null?void 0:t.orientation)==null?void 0:n[e]]},[e,t==null?void 0:t.orientation]),q=r.useMemo(()=>{var u,s;const o={horizontal:"rounded-none first-of-type:rounded-s last-of-type:rounded-e",vertical:"rounded-none first-of-type:rounded-t last-of-type:rounded-b"},n=(s=(u=t==null?void 0:t.button)==null?void 0:u.orientation)==null?void 0:s[e],y=o[e];return M(y,n)},[e,t==null?void 0:t.button]);return i.jsx(m,{className:G.twMerge("w-fit flex items-stretch justify-center",t==null?void 0:t.base,j,v,b),...C,children:i.jsx(c.Provider,{value:{variant:l,color:a,size:f,loading:x,buttonClasses:q},children:p})})}exports.ButtonGroupContext=c;exports.default=g;
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as i } from "react/jsx-runtime";
3
3
  import G from "../../helpers/cn.es.js";
4
- import { createContext as w, useContext as z, useMemo as s } from "react";
5
- import j from "../../hooks/useClasses.es.js";
4
+ import w from "../../hooks/useClasses.es.js";
5
+ import { createContext as z, useContext as j, useMemo as s } from "react";
6
6
  import { twMerge as B } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
7
  import { TabsContext as M } from "../Tabs/index.es.js";
8
- const R = w({});
8
+ const R = z({});
9
9
  function A({
10
10
  as: f,
11
11
  variant: d,
@@ -17,7 +17,7 @@ function A({
17
17
  children: c,
18
18
  ...x
19
19
  }) {
20
- const C = f || "div", t = j((n) => n.buttonGroup), { buttonGroupClasses: b } = z(M), h = s(() => {
20
+ const C = f || "div", t = w((n) => n.buttonGroup), { buttonGroupClasses: b } = j(M), h = s(() => {
21
21
  var e;
22
22
  return [{
23
23
  horizontal: "flex-row",
@@ -1 +1 @@
1
- "use client";"use strict";const t=require("react/jsx-runtime");require("react");const c=require("../../hooks/useClasses.cjs.js"),d=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function n({as:e,className:s,children:r,...a}){const o=c(l=>l.card.base),u=e||"div";return t.jsx(u,{className:d.twMerge("block w-full bg-white rounded shadow",o,s),...a,children:r})}function i({className:e,children:s,...r}){const a=c(o=>o.card.header.base);return t.jsx("div",{className:d.twMerge("w-full border-b border-[#e8eaee] p-4",a,e),...r,children:s})}function b({className:e,children:s,...r}){const a=c(o=>o.card.body.base);return t.jsx("div",{className:d.twMerge("w-full p-4",a,e),...r,children:s})}function w({className:e,children:s,...r}){const a=c(o=>o.card.footer.base);return t.jsx("div",{className:d.twMerge("w-full border-t border-[#e8eaee] p-4",a,e),...r,children:s})}n.Header=i;n.Body=b;n.Footer=w;module.exports=n;
1
+ "use client";"use strict";const t=require("react/jsx-runtime"),c=require("../../hooks/useClasses.cjs.js");require("react");const d=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function n({as:e,className:s,children:r,...a}){const o=c(l=>l.card.base),u=e||"div";return t.jsx(u,{className:d.twMerge("block w-full bg-white rounded shadow",o,s),...a,children:r})}function i({className:e,children:s,...r}){const a=c(o=>o.card.header.base);return t.jsx("div",{className:d.twMerge("w-full border-b border-[#e8eaee] p-4",a,e),...r,children:s})}function b({className:e,children:s,...r}){const a=c(o=>o.card.body.base);return t.jsx("div",{className:d.twMerge("w-full p-4",a,e),...r,children:s})}function w({className:e,children:s,...r}){const a=c(o=>o.card.footer.base);return t.jsx("div",{className:d.twMerge("w-full border-t border-[#e8eaee] p-4",a,e),...r,children:s})}n.Header=i;n.Body=b;n.Footer=w;module.exports=n;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
- import "react";
4
3
  import d from "../../hooks/useClasses.es.js";
4
+ import "react";
5
5
  import { twMerge as c } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
6
6
  function n({
7
7
  as: e,
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),i=require("react"),d=require("../../hooks/useClasses.cjs.js"),M=require("../../hooks/useKeyDown.cjs.js"),g=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),b=require("../../helpers/cn.cjs.js"),f=require("../Card/index.cjs.js"),q=require("../Portal/index.cjs.js"),R=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),h=i.createContext({open:!1,onClose:()=>{},duration:300,anchor:"start",transitionState:"unmounted"});function x({as:n,ref:a,open:r=!1,onClose:e=()=>{},duration:o=300,anchor:u="end",className:w="",children:y,...v}){const t=d(l=>l.drawer),c=i.useRef(null),m=n||"div",j={entering:"active opacity-100 pointer-events-auto",entered:"active opacity-100 pointer-events-auto",exiting:"opacity-0 pointer-events-none",exited:"opacity-0 pointer-events-none",unmounted:""},C=i.useMemo(()=>{var p;const l={start:"flex-row-reverse",end:"flex-row",top:"flex-col-reverse",bottom:"flex-col"},D=(p=t==null?void 0:t.anchor)==null?void 0:p[u];return[l[u],D]},[u,t==null?void 0:t.anchor]);return i.useImperativeHandle(a,()=>c.current),M(e,"Escape",r),s.jsx(q,{children:s.jsx(R.default,{nodeRef:c,in:r,timeout:o,unmountOnExit:!0,children:l=>s.jsxs(m,{ref:c,style:{transitionDuration:`${o}ms`},"data-open":r,className:g.twMerge("fixed size-full inset-0 flex z-10 bg-black/20 backdrop-blur transition-opacity [--drawer-ratio:1] rtl:[--drawer-ratio:-1]",t==null?void 0:t.base,j[l],C,w),...v,children:[s.jsx("button",{type:"button",onClick:()=>e(),className:"absolute inset-0 size-full cursor-default opacity-0"}),s.jsx(h.Provider,{value:{open:r,onClose:e,transitionState:l,duration:o,anchor:u},children:y})]})})})}function N({children:n,className:a="",...r}){const e=d(t=>t.drawer.menu),{anchor:o,duration:u,transitionState:w}=i.useContext(h),y=i.useMemo(()=>{var m;const t={start:"w-[31.875rem] h-full max-w-[92.5%] rounded-e me-auto",end:"w-[31.875rem] h-full max-w-[92.5%] rounded-s ms-auto",top:"w-full h-[31.875rem] max-h-[92.5%] rounded-b mb-auto",bottom:"w-full h-[31.875rem] max-h-[92.5%] rounded-t mt-auto"},c=(m=e==null?void 0:e.anchor)==null?void 0:m[o];return[t[o],c]},[o,e==null?void 0:e.anchor]),v=i.useMemo(()=>({start:{entering:"translate-x-0",entered:"translate-x-0",exiting:"-translate-x-[calc(100%*var(--drawer-ratio))]",exited:"-translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},end:{entering:"translate-x-0",entered:"translate-x-0",exiting:"translate-x-[calc(100%*var(--drawer-ratio))]",exited:"translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},top:{entering:"translate-y-0",entered:"translate-y-0",exiting:"-translate-y-full",exited:"-translate-y-full",unmounted:""},bottom:{entering:"translate-y-0",entered:"translate-y-0",exiting:"translate-y-full",exited:"translate-y-full",unmounted:""}})[o],[o]);return s.jsx(f,{as:"div",style:{transitionDuration:`${u}ms`},className:g.twMerge("relative flex flex-col transition-[translate,width] rounded-none",e==null?void 0:e.base,v[w],y,a),...r,children:n})}function S({className:n,...a}){const r=d(e=>e.drawer.header.base);return s.jsx(f.Header,{className:b(r,n),...a})}function H({className:n,...a}){const r=d(e=>e.drawer.body.base);return s.jsx(f.Body,{className:b("flex-1 overflow-auto",r,n),...a})}function k({className:n,...a}){const r=d(e=>e.drawer.footer.base);return s.jsx(f.Footer,{className:b(r,n),...a})}x.Menu=N;x.Header=S;x.Body=H;x.Footer=k;exports.DrawerContext=h;exports.default=x;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),d=require("../../hooks/useClasses.cjs.js"),i=require("react"),M=require("../../hooks/useKeyDown.cjs.js"),g=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),b=require("../../helpers/cn.cjs.js"),f=require("../Card/index.cjs.js"),q=require("../Portal/index.cjs.js"),R=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),p=i.createContext({open:!1,onClose:()=>{},duration:300,anchor:"start",transitionState:"unmounted"});function x({as:n,ref:a,open:r=!1,onClose:e=()=>{},duration:o=300,anchor:u="end",className:w="",children:y,...v}){const t=d(l=>l.drawer),c=i.useRef(null),m=n||"div",j={entering:"active opacity-100 pointer-events-auto",entered:"active opacity-100 pointer-events-auto",exiting:"opacity-0 pointer-events-none",exited:"opacity-0 pointer-events-none",unmounted:""},C=i.useMemo(()=>{var h;const l={start:"flex-row-reverse",end:"flex-row",top:"flex-col-reverse",bottom:"flex-col"},D=(h=t==null?void 0:t.anchor)==null?void 0:h[u];return[l[u],D]},[u,t==null?void 0:t.anchor]);return i.useImperativeHandle(a,()=>c.current),M(e,{skip:r,targetKey:"Escape"}),s.jsx(q,{children:s.jsx(R.default,{nodeRef:c,in:r,timeout:o,unmountOnExit:!0,children:l=>s.jsxs(m,{ref:c,style:{transitionDuration:`${o}ms`},"data-open":r,className:g.twMerge("fixed size-full inset-0 flex z-10 bg-black/20 backdrop-blur transition-opacity [--drawer-ratio:1] rtl:[--drawer-ratio:-1]",t==null?void 0:t.base,j[l],C,w),...v,children:[s.jsx("button",{type:"button",onClick:()=>e(),className:"absolute inset-0 size-full cursor-default opacity-0"}),s.jsx(p.Provider,{value:{open:r,onClose:e,transitionState:l,duration:o,anchor:u},children:y})]})})})}function N({children:n,className:a="",...r}){const e=d(t=>t.drawer.menu),{anchor:o,duration:u,transitionState:w}=i.useContext(p),y=i.useMemo(()=>{var m;const t={start:"w-[31.875rem] h-full max-w-[92.5%] rounded-e me-auto",end:"w-[31.875rem] h-full max-w-[92.5%] rounded-s ms-auto",top:"w-full h-[31.875rem] max-h-[92.5%] rounded-b mb-auto",bottom:"w-full h-[31.875rem] max-h-[92.5%] rounded-t mt-auto"},c=(m=e==null?void 0:e.anchor)==null?void 0:m[o];return[t[o],c]},[o,e==null?void 0:e.anchor]),v=i.useMemo(()=>({start:{entering:"translate-x-0",entered:"translate-x-0",exiting:"-translate-x-[calc(100%*var(--drawer-ratio))]",exited:"-translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},end:{entering:"translate-x-0",entered:"translate-x-0",exiting:"translate-x-[calc(100%*var(--drawer-ratio))]",exited:"translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},top:{entering:"translate-y-0",entered:"translate-y-0",exiting:"-translate-y-full",exited:"-translate-y-full",unmounted:""},bottom:{entering:"translate-y-0",entered:"translate-y-0",exiting:"translate-y-full",exited:"translate-y-full",unmounted:""}})[o],[o]);return s.jsx(f,{as:"div",style:{transitionDuration:`${u}ms`},className:g.twMerge("relative flex flex-col transition-[translate,width] rounded-none",e==null?void 0:e.base,v[w],y,a),...r,children:n})}function S({className:n,...a}){const r=d(e=>e.drawer.header.base);return s.jsx(f.Header,{className:b(r,n),...a})}function k({className:n,...a}){const r=d(e=>e.drawer.body.base);return s.jsx(f.Body,{className:b("flex-1 overflow-auto",r,n),...a})}function H({className:n,...a}){const r=d(e=>e.drawer.footer.base);return s.jsx(f.Footer,{className:b(r,n),...a})}x.Menu=N;x.Header=S;x.Body=k;x.Footer=H;exports.DrawerContext=p;exports.default=x;
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { jsx as s, jsxs as N } from "react/jsx-runtime";
3
- import { createContext as H, useRef as M, useMemo as y, useImperativeHandle as k, useContext as z } from "react";
4
3
  import d from "../../hooks/useClasses.es.js";
4
+ import { createContext as k, useRef as H, useMemo as y, useImperativeHandle as M, useContext as z } from "react";
5
5
  import B from "../../hooks/useKeyDown.es.js";
6
6
  import { twMerge as h } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
7
  import v from "../../helpers/cn.es.js";
8
8
  import m from "../Card/index.es.js";
9
9
  import F from "../Portal/index.es.js";
10
10
  import S from "../../node_modules/react-transition-group/esm/Transition.es.js";
11
- const g = H({
11
+ const g = k({
12
12
  open: !1,
13
13
  onClose: () => {
14
14
  },
@@ -28,7 +28,7 @@ function f({
28
28
  children: w,
29
29
  ...p
30
30
  }) {
31
- const e = d((l) => l.drawer), u = M(null), c = n || "div", C = {
31
+ const e = d((l) => l.drawer), u = H(null), c = n || "div", C = {
32
32
  entering: "active opacity-100 pointer-events-auto",
33
33
  entered: "active opacity-100 pointer-events-auto",
34
34
  exiting: "opacity-0 pointer-events-none",
@@ -44,7 +44,7 @@ function f({
44
44
  }, R = (b = e == null ? void 0 : e.anchor) == null ? void 0 : b[i];
45
45
  return [l[i], R];
46
46
  }, [i, e == null ? void 0 : e.anchor]);
47
- return k(a, () => u.current), B(t, "Escape", r), /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(S, { nodeRef: u, in: r, timeout: o, unmountOnExit: !0, children: (l) => /* @__PURE__ */ N(
47
+ return M(a, () => u.current), B(t, { skip: r, targetKey: "Escape" }), /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(S, { nodeRef: u, in: r, timeout: o, unmountOnExit: !0, children: (l) => /* @__PURE__ */ N(
48
48
  c,
49
49
  {
50
50
  ref: u,
@@ -145,7 +145,7 @@ function E({ className: n, ...a }) {
145
145
  const r = d((t) => t.drawer.header.base);
146
146
  return /* @__PURE__ */ s(m.Header, { className: v(r, n), ...a });
147
147
  }
148
- function P({ className: n, ...a }) {
148
+ function K({ className: n, ...a }) {
149
149
  const r = d((t) => t.drawer.body.base);
150
150
  return /* @__PURE__ */ s(
151
151
  m.Body,
@@ -155,14 +155,14 @@ function P({ className: n, ...a }) {
155
155
  }
156
156
  );
157
157
  }
158
- function $({ className: n, ...a }) {
158
+ function P({ className: n, ...a }) {
159
159
  const r = d((t) => t.drawer.footer.base);
160
160
  return /* @__PURE__ */ s(m.Footer, { className: v(r, n), ...a });
161
161
  }
162
162
  f.Menu = j;
163
163
  f.Header = E;
164
- f.Body = P;
165
- f.Footer = $;
164
+ f.Body = K;
165
+ f.Footer = P;
166
166
  export {
167
167
  g as DrawerContext,
168
168
  f as default
@@ -1 +1 @@
1
- "use client";"use strict";const u=require("react/jsx-runtime");require("react");const i=require("../../hooks/useClasses.cjs.js"),c=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function p({as:e,children:t,className:n,...s}){const o=e||"div",r=i(a=>a.inputGroup.base);return u.jsx(o,{className:c.twMerge("w-full",r,n),...s,children:t})}function x({as:e,children:t,className:n,...s}){const o=e||"h6",r=i(a=>a.inputGroup.label.base);return u.jsx(o,{className:c.twMerge("block font-normal text-start mb-0.5 px-0.5 text-sm",r,n),...s,children:t})}function d({as:e,children:t,className:n,...s}){const o=e||"div",r=i(a=>a.inputGroup.stack.base);return u.jsx(o,{className:c.twMerge("flex items-stretch border border-[#e8eaee] rounded divide-x divide-[#e8eaee] transition-[border-color,box-shadow] [&>*:first-child]:rounded-s [&>*:last-child]:rounded-e focus-within:border-primary focus-within:divide-primary",r,n),...s,children:t})}function m({as:e,children:t,className:n,...s}){const o=e||"span",r=i(a=>a.inputGroup.text.base);return u.jsx(o,{className:c.twMerge("flex items-center text-base py-1.5 px-3 font-normal text-center whitespace-nowrap",r,n),...s,children:t})}function b({as:e,children:t,className:n,...s}){const o=e||"input",r=e==="textarea",a=i(l=>l.inputGroup.formControl.base);return u.jsx(o,{className:c.twMerge("text-start flex-1 leading-10 text-base py-1.5 px-3 focus:outline-none bg-transparent border-0",r?"min-h-[7.5rem] field-sizing-content":"h-10",a,n),...s,children:t})}p.Label=x;p.Stack=d;p.Text=m;p.FormControl=b;module.exports=p;
1
+ "use client";"use strict";const u=require("react/jsx-runtime"),i=require("../../hooks/useClasses.cjs.js");require("react");const c=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function p({as:e,children:t,className:n,...s}){const o=e||"div",r=i(a=>a.inputGroup.base);return u.jsx(o,{className:c.twMerge("w-full",r,n),...s,children:t})}function x({as:e,children:t,className:n,...s}){const o=e||"h6",r=i(a=>a.inputGroup.label.base);return u.jsx(o,{className:c.twMerge("block font-normal text-start mb-0.5 px-0.5 text-sm",r,n),...s,children:t})}function d({as:e,children:t,className:n,...s}){const o=e||"div",r=i(a=>a.inputGroup.stack.base);return u.jsx(o,{className:c.twMerge("flex items-stretch border border-[#e8eaee] rounded divide-x divide-[#e8eaee] transition-[border-color,box-shadow] [&>*:first-child]:rounded-s [&>*:last-child]:rounded-e focus-within:border-primary focus-within:divide-primary",r,n),...s,children:t})}function m({as:e,children:t,className:n,...s}){const o=e||"span",r=i(a=>a.inputGroup.text.base);return u.jsx(o,{className:c.twMerge("flex items-center text-base py-1.5 px-3 font-normal text-center whitespace-nowrap",r,n),...s,children:t})}function b({as:e,children:t,className:n,...s}){const o=e||"input",r=e==="textarea",a=i(l=>l.inputGroup.formControl.base);return u.jsx(o,{className:c.twMerge("text-start flex-1 leading-10 text-base py-1.5 px-3 focus:outline-none bg-transparent border-0",r?"min-h-[7.5rem] field-sizing-content":"h-10",a,n),...s,children:t})}p.Label=x;p.Stack=d;p.Text=m;p.FormControl=b;module.exports=p;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as i } from "react/jsx-runtime";
3
- import "react";
4
3
  import c from "../../hooks/useClasses.es.js";
4
+ import "react";
5
5
  import { twMerge as p } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
6
6
  function u({
7
7
  as: t,
@@ -1 +1 @@
1
- "use client";"use strict";const i=require("react/jsx-runtime"),t=require("react"),E=require("../../hooks/useClasses.cjs.js"),N=require("../../hooks/useKeyDown.cjs.js"),k=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),W=require("../Portal/index.cjs.js"),I=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),w=t.createContext({open:!1,onClose:()=>{},transitionState:"unmounted",closeOnClick:!1});function H({as:r,ref:a,open:s,onClose:x,closeOnClick:C=!1,anchorEl:c=null,className:y,children:p,...b}){const M=E(e=>e.menu.base),u=r||"div",n=16,o=t.useRef(null),d=t.useRef({left:n,right:n,top:n}),O={entering:"scale-100 opacity-100",entered:"scale-100 opacity-100",exiting:"scale-90 opacity-0",exited:"scale-90 opacity-0",unmounted:""},R=t.useCallback(e=>{d.current=e},[]),q=t.useCallback(e=>{var l,h,f;(l=o.current)==null||l.style.setProperty("--left",`${e.left}px`),(h=o.current)==null||h.style.setProperty("--right",`${e.right}px`),(f=o.current)==null||f.style.setProperty("--top",`${e.top}px`)},[]),m=t.useCallback(()=>{var P,z;if(!s||!c)return;const e=c.getBoundingClientRect(),l=window.innerWidth,h=window.innerHeight,f=((P=o.current)==null?void 0:P.offsetWidth)||150,L=((z=o.current)==null?void 0:z.offsetHeight)||200;let g=e.left,j=e.right,v=e.bottom;g=Math.min(Math.max(g,n),l-f-n),j=Math.min(Math.max(l-e.right,n),l-f-n),v=Math.min(Math.max(v,n),h-L-n),R({left:g,right:j,top:v}),q({left:g,right:j,top:v})},[s,c,R,q]);return t.useEffect(()=>{m()},[m,p]),t.useEffect(()=>{const e=()=>{m()};return window.addEventListener("scroll",e),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[m]),t.useImperativeHandle(a,()=>o.current),N(x,"Escape",s),i.jsx(W,{children:i.jsx(I.default,{nodeRef:o,in:s,timeout:300,unmountOnExit:!0,children:e=>i.jsx(w.Provider,{value:{open:s,onClose:x,transitionState:e,closeOnClick:C},children:i.jsxs(S,{children:[i.jsx($,{}),i.jsx(u,{ref:o,"data-open":s,className:k.twMerge("w-fit min-w-[12.5rem] bg-white shadow rounded p-2 transition-[scale,opacity] absolute top-[var(--top)] left-[var(--left)] right-auto origin-top-left rtl:left-auto rtl:right-[var(--right)] rtl:origin-top-right",M,O[e],y),...b,children:p})]})})})})}function S({children:r}){const{transitionState:a}=t.useContext(w),s={entering:"active pointer-events-auto",entered:"active pointer-events-auto",exiting:"pointer-events-none",exited:"pointer-events-none",unmounted:""};return i.jsx("div",{className:k.twMerge("fixed inset-0 size-full flex flex-col bg-transparent transition-opacity overflow-hidden z-10",s[a]),children:r})}function $(){const{onClose:r}=t.useContext(w);return i.jsx("button",{type:"button",className:"w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",onClick:r})}function B({as:r,closeOnClick:a,type:s="button",className:x,children:C,onClick:c,...y}){const p=r||"div",b=E(d=>d.menu.item.base),{closeOnClick:M,onClose:u}=t.useContext(w),n=a??M,o=d=>{n&&(u==null||u()),c==null||c(d)};return i.jsx(p,{type:s,className:k.twMerge("flex items-center px-3 py-2 w-full text-dark text-base font-normal rounded transition-colors hover:bg-dark hover:text-white",b,x),onClick:o,...y,children:C})}H.Item=B;module.exports=H;
1
+ "use client";"use strict";const i=require("react/jsx-runtime"),E=require("../../hooks/useClasses.cjs.js"),t=require("react"),N=require("../../hooks/useKeyDown.cjs.js"),k=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),W=require("../Portal/index.cjs.js"),I=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),w=t.createContext({open:!1,onClose:()=>{},transitionState:"unmounted",closeOnClick:!1});function H({as:r,ref:a,open:s,onClose:p,closeOnClick:C=!1,anchorEl:c=null,className:y,children:x,...b}){const M=E(e=>e.menu.base),u=r||"div",n=16,o=t.useRef(null),d=t.useRef({left:n,right:n,top:n}),O={entering:"scale-100 opacity-100",entered:"scale-100 opacity-100",exiting:"scale-90 opacity-0",exited:"scale-90 opacity-0",unmounted:""},R=t.useCallback(e=>{d.current=e},[]),q=t.useCallback(e=>{var l,h,f;(l=o.current)==null||l.style.setProperty("--left",`${e.left}px`),(h=o.current)==null||h.style.setProperty("--right",`${e.right}px`),(f=o.current)==null||f.style.setProperty("--top",`${e.top}px`)},[]),m=t.useCallback(()=>{var P,z;if(!s||!c)return;const e=c.getBoundingClientRect(),l=window.innerWidth,h=window.innerHeight,f=((P=o.current)==null?void 0:P.offsetWidth)||150,L=((z=o.current)==null?void 0:z.offsetHeight)||200;let g=e.left,j=e.right,v=e.bottom;g=Math.min(Math.max(g,n),l-f-n),j=Math.min(Math.max(l-e.right,n),l-f-n),v=Math.min(Math.max(v,n),h-L-n),R({left:g,right:j,top:v}),q({left:g,right:j,top:v})},[s,c,R,q]);return t.useEffect(()=>{m()},[m,x]),t.useEffect(()=>{const e=()=>{m()};return window.addEventListener("scroll",e),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[m]),t.useImperativeHandle(a,()=>o.current),N(p,{skip:s,targetKey:"Escape"}),i.jsx(W,{children:i.jsx(I.default,{nodeRef:o,in:s,timeout:300,unmountOnExit:!0,children:e=>i.jsx(w.Provider,{value:{open:s,onClose:p,transitionState:e,closeOnClick:C},children:i.jsxs(S,{children:[i.jsx($,{}),i.jsx(u,{ref:o,"data-open":s,className:k.twMerge("w-fit min-w-[12.5rem] bg-white shadow rounded p-2 transition-[scale,opacity] absolute top-[var(--top)] left-[var(--left)] right-auto origin-top-left rtl:left-auto rtl:right-[var(--right)] rtl:origin-top-right",M,O[e],y),...b,children:x})]})})})})}function S({children:r}){const{transitionState:a}=t.useContext(w),s={entering:"active pointer-events-auto",entered:"active pointer-events-auto",exiting:"pointer-events-none",exited:"pointer-events-none",unmounted:""};return i.jsx("div",{className:k.twMerge("fixed inset-0 size-full flex flex-col bg-transparent transition-opacity overflow-hidden z-10",s[a]),children:r})}function $(){const{onClose:r}=t.useContext(w);return i.jsx("button",{type:"button",className:"w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",onClick:r})}function B({as:r,closeOnClick:a,type:s="button",className:p,children:C,onClick:c,...y}){const x=r||"div",b=E(d=>d.menu.item.base),{closeOnClick:M,onClose:u}=t.useContext(w),n=a??M,o=d=>{n&&(u==null||u()),c==null||c(d)};return i.jsx(x,{type:s,className:k.twMerge("flex items-center px-3 py-2 w-full text-dark text-base font-normal rounded transition-colors hover:bg-dark hover:text-white",b,p),onClick:o,...y,children:C})}H.Item=B;module.exports=H;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as i, jsxs as $ } from "react/jsx-runtime";
3
- import { createContext as j, useRef as L, useCallback as k, useEffect as N, useImperativeHandle as B, useContext as P } from "react";
4
3
  import W from "../../hooks/useClasses.es.js";
5
- import D from "../../hooks/useKeyDown.es.js";
4
+ import { createContext as j, useRef as L, useCallback as k, useEffect as N, useImperativeHandle as B, useContext as P } from "react";
5
+ import K from "../../hooks/useKeyDown.es.js";
6
6
  import { twMerge as z } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
- import K from "../Portal/index.es.js";
7
+ import D from "../Portal/index.es.js";
8
8
  import T from "../../node_modules/react-transition-group/esm/Transition.es.js";
9
9
  const x = j({
10
10
  open: !1,
@@ -15,7 +15,7 @@ const x = j({
15
15
  });
16
16
  function q({
17
17
  as: r,
18
- ref: a,
18
+ ref: l,
19
19
  open: o,
20
20
  onClose: d,
21
21
  closeOnClick: w = !1,
@@ -37,16 +37,16 @@ function q({
37
37
  }, H = k((t) => {
38
38
  u.current = t;
39
39
  }, []), O = k((t) => {
40
- var l, h, f;
41
- (l = n.current) == null || l.style.setProperty("--left", `${t.left}px`), (h = n.current) == null || h.style.setProperty("--right", `${t.right}px`), (f = n.current) == null || f.style.setProperty("--top", `${t.top}px`);
40
+ var a, h, f;
41
+ (a = n.current) == null || a.style.setProperty("--left", `${t.left}px`), (h = n.current) == null || h.style.setProperty("--right", `${t.right}px`), (f = n.current) == null || f.style.setProperty("--top", `${t.top}px`);
42
42
  }, []), p = k(() => {
43
43
  var R, E;
44
44
  if (!o || !s) return;
45
- const t = s.getBoundingClientRect(), l = window.innerWidth, h = window.innerHeight, f = ((R = n.current) == null ? void 0 : R.offsetWidth) || 150, S = ((E = n.current) == null ? void 0 : E.offsetHeight) || 200;
45
+ const t = s.getBoundingClientRect(), a = window.innerWidth, h = window.innerHeight, f = ((R = n.current) == null ? void 0 : R.offsetWidth) || 150, S = ((E = n.current) == null ? void 0 : E.offsetHeight) || 200;
46
46
  let g = t.left, M = t.right, v = t.bottom;
47
- g = Math.min(Math.max(g, e), l - f - e), M = Math.min(
48
- Math.max(l - t.right, e),
49
- l - f - e
47
+ g = Math.min(Math.max(g, e), a - f - e), M = Math.min(
48
+ Math.max(a - t.right, e),
49
+ a - f - e
50
50
  ), v = Math.min(Math.max(v, e), h - S - e), H({ left: g, right: M, top: v }), O({ left: g, right: M, top: v });
51
51
  }, [o, s, H, O]);
52
52
  return N(() => {
@@ -58,7 +58,7 @@ function q({
58
58
  return window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
59
59
  window.removeEventListener("scroll", t), window.removeEventListener("resize", t);
60
60
  };
61
- }, [p]), B(a, () => n.current), D(d, "Escape", o), /* @__PURE__ */ i(K, { children: /* @__PURE__ */ i(T, { nodeRef: n, in: o, timeout: 300, unmountOnExit: !0, children: (t) => /* @__PURE__ */ i(
61
+ }, [p]), B(l, () => n.current), K(d, { skip: o, targetKey: "Escape" }), /* @__PURE__ */ i(D, { children: /* @__PURE__ */ i(T, { nodeRef: n, in: o, timeout: 300, unmountOnExit: !0, children: (t) => /* @__PURE__ */ i(
62
62
  x.Provider,
63
63
  {
64
64
  value: {
@@ -89,7 +89,7 @@ function q({
89
89
  ) }) });
90
90
  }
91
91
  function A({ children: r }) {
92
- const { transitionState: a } = P(x);
92
+ const { transitionState: l } = P(x);
93
93
  return /* @__PURE__ */ i(
94
94
  "div",
95
95
  {
@@ -101,7 +101,7 @@ function A({ children: r }) {
101
101
  exiting: "pointer-events-none",
102
102
  exited: "pointer-events-none",
103
103
  unmounted: ""
104
- }[a]
104
+ }[l]
105
105
  ),
106
106
  children: r
107
107
  }
@@ -120,14 +120,14 @@ function F() {
120
120
  }
121
121
  function G({
122
122
  as: r,
123
- closeOnClick: a,
123
+ closeOnClick: l,
124
124
  type: o = "button",
125
125
  className: d,
126
126
  children: w,
127
127
  onClick: s,
128
128
  ...y
129
129
  }) {
130
- const m = r || "div", C = W((u) => u.menu.item.base), { closeOnClick: b, onClose: c } = P(x), e = a ?? b, n = (u) => {
130
+ const m = r || "div", C = W((u) => u.menu.item.base), { closeOnClick: b, onClose: c } = P(x), e = l ?? b, n = (u) => {
131
131
  e && (c == null || c()), s == null || s(u);
132
132
  };
133
133
  return /* @__PURE__ */ i(
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),y=require("../../helpers/cn.cjs.js"),u=require("react"),l=require("../../hooks/useClasses.cjs.js"),q=require("../../hooks/useKeyDown.cjs.js"),g=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),x=require("../Card/index.cjs.js"),z=require("../Portal/index.cjs.js"),C=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),v=u.createContext({size:"md",open:!1,onClose:()=>{},transitionState:"unmounted",duration:300});function c({as:t,ref:n,size:o="md",open:e=!1,onClose:i=()=>{},duration:r=300,className:f,children:p,...b}){const d=l(m=>m.modal.base),a=u.useRef(null),M=t||"div",j={entering:"active opacity-100 pointer-events-auto",entered:"active opacity-100 pointer-events-auto",exiting:"opacity-0 pointer-events-none",exited:"opacity-0 pointer-events-none",unmounted:""};return u.useImperativeHandle(n,()=>a.current),q(i,"Escape",e),s.jsx(z,{children:s.jsx(C.default,{nodeRef:a,in:e,timeout:r,unmountOnExit:!0,children:m=>s.jsxs(M,{ref:a,"data-open":e,style:{transitionDuration:`${r}ms`},className:g.twMerge("modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",d,j[m],f),...b,children:[s.jsx("button",{type:"button",onClick:()=>i(),className:"absolute inset-0 cursor-default opacity-0"}),s.jsx(v.Provider,{value:{size:o,open:e,onClose:i,transitionState:m,duration:r},children:p})]})})})}function w({className:t,children:n,...o}){const e=l(d=>d.modal.dialog),{size:i,transitionState:r,duration:f}=u.useContext(v),p={entering:"scale-100",entered:"scale-100",exiting:"scale-75",exited:"scale-75",unmounted:""},b=u.useMemo(()=>{var a;return[{sm:"min-[576px]:w-[300px]",md:"min-[576px]:w-[500px]",lg:"min-[992px]:w-[800px]"}[i],(a=e==null?void 0:e.size)==null?void 0:a[i]]},[i,e==null?void 0:e.size]);return s.jsx(x,{as:"div",style:{transitionDuration:`${f}ms`},className:g.twMerge("max-w-full max-h-full m-auto transition-transform",e==null?void 0:e.base,b,p[r],t),...o,children:n})}function N({className:t,...n}){const o=l(e=>e.modal.header.base);return s.jsx(x.Header,{className:y(o,t),...n})}function S({className:t,...n}){const o=l(e=>e.modal.body.base);return s.jsx(x.Body,{className:y(o,t),...n})}function h({className:t,...n}){const o=l(e=>e.modal.footer.base);return s.jsx(x.Footer,{className:y(o,t),...n})}c.Dialog=w;c.Header=N;c.Body=S;c.Footer=h;exports.ModalContext=v;exports.default=c;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),y=require("../../helpers/cn.cjs.js"),l=require("../../hooks/useClasses.cjs.js"),u=require("react"),q=require("../../hooks/useKeyDown.cjs.js"),v=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),x=require("../Card/index.cjs.js"),z=require("../Portal/index.cjs.js"),C=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),g=u.createContext({size:"md",open:!1,onClose:()=>{},transitionState:"unmounted",duration:300});function c({as:t,ref:n,size:o="md",open:e=!1,onClose:i=()=>{},duration:r=300,className:f,children:p,...b}){const d=l(m=>m.modal.base),a=u.useRef(null),M=t||"div",j={entering:"active opacity-100 pointer-events-auto",entered:"active opacity-100 pointer-events-auto",exiting:"opacity-0 pointer-events-none",exited:"opacity-0 pointer-events-none",unmounted:""};return u.useImperativeHandle(n,()=>a.current),q(i,{skip:e,targetKey:"Escape"}),s.jsx(z,{children:s.jsx(C.default,{nodeRef:a,in:e,timeout:r,unmountOnExit:!0,children:m=>s.jsxs(M,{ref:a,"data-open":e,style:{transitionDuration:`${r}ms`},className:v.twMerge("modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",d,j[m],f),...b,children:[s.jsx("button",{type:"button",onClick:()=>i(),className:"absolute inset-0 cursor-default opacity-0"}),s.jsx(g.Provider,{value:{size:o,open:e,onClose:i,transitionState:m,duration:r},children:p})]})})})}function w({className:t,children:n,...o}){const e=l(d=>d.modal.dialog),{size:i,transitionState:r,duration:f}=u.useContext(g),p={entering:"scale-100",entered:"scale-100",exiting:"scale-75",exited:"scale-75",unmounted:""},b=u.useMemo(()=>{var a;return[{sm:"min-[576px]:w-[300px]",md:"min-[576px]:w-[500px]",lg:"min-[992px]:w-[800px]"}[i],(a=e==null?void 0:e.size)==null?void 0:a[i]]},[i,e==null?void 0:e.size]);return s.jsx(x,{as:"div",style:{transitionDuration:`${f}ms`},className:v.twMerge("max-w-full max-h-full m-auto transition-transform",e==null?void 0:e.base,b,p[r],t),...o,children:n})}function N({className:t,...n}){const o=l(e=>e.modal.header.base);return s.jsx(x.Header,{className:y(o,t),...n})}function S({className:t,...n}){const o=l(e=>e.modal.body.base);return s.jsx(x.Body,{className:y(o,t),...n})}function h({className:t,...n}){const o=l(e=>e.modal.footer.base);return s.jsx(x.Footer,{className:y(o,t),...n})}c.Dialog=w;c.Header=N;c.Body=S;c.Footer=h;exports.ModalContext=g;exports.default=c;
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { jsx as a, jsxs as C } from "react/jsx-runtime";
3
3
  import y from "../../helpers/cn.es.js";
4
- import { createContext as M, useRef as w, useImperativeHandle as N, useContext as h, useMemo as D } from "react";
5
4
  import l from "../../hooks/useClasses.es.js";
6
- import H from "../../hooks/useKeyDown.es.js";
5
+ import { createContext as M, useRef as w, useImperativeHandle as N, useContext as h, useMemo as D } from "react";
6
+ import k from "../../hooks/useKeyDown.es.js";
7
7
  import { twMerge as b } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
8
8
  import d from "../Card/index.es.js";
9
- import S from "../Portal/index.es.js";
10
- import k from "../../node_modules/react-transition-group/esm/Transition.es.js";
9
+ import H from "../Portal/index.es.js";
10
+ import S from "../../node_modules/react-transition-group/esm/Transition.es.js";
11
11
  const v = M({
12
12
  size: "md",
13
13
  open: !1,
@@ -35,7 +35,7 @@ function u({
35
35
  exited: "opacity-0 pointer-events-none",
36
36
  unmounted: ""
37
37
  };
38
- return N(o, () => s.current), H(i, "Escape", e), /* @__PURE__ */ a(S, { children: /* @__PURE__ */ a(k, { nodeRef: s, in: e, timeout: r, unmountOnExit: !0, children: (c) => /* @__PURE__ */ C(
38
+ return N(o, () => s.current), k(i, { skip: e, targetKey: "Escape" }), /* @__PURE__ */ a(H, { children: /* @__PURE__ */ a(S, { nodeRef: s, in: e, timeout: r, unmountOnExit: !0, children: (c) => /* @__PURE__ */ C(
39
39
  g,
40
40
  {
41
41
  ref: s,
@@ -1 +1 @@
1
- "use client";"use strict";const n=require("react/jsx-runtime"),b=require("../../helpers/cn.cjs.js"),a=require("react"),x=require("../../hooks/useClasses.cjs.js"),f=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function m({color:t="primary",value:o=0,animate:s=!1,className:u,...l}){const e=x(r=>r.progress),c=a.useMemo(()=>{var i;if(!t)return"border-transparent";const r={primary:"bg-primary/15 text-primary",secondary:"bg-secondary/15 text-secondary",success:"bg-success/15 text-success",info:"bg-info/15 text-info",warning:"bg-warning/15 text-warning",danger:"bg-danger/15 text-danger",dark:"bg-dark/15 text-dark",light:"bg-light/15 text-light"},g=(i=e==null?void 0:e.color)==null?void 0:i[t];return[r==null?void 0:r[t],g]},[t,e==null?void 0:e.color]),d=a.useMemo(()=>{if(!s)return`${Math.max(o,0)}%`},[o,s]);return n.jsxs("div",{className:f.twMerge("relative block w-full h-1.5 rounded-full overflow-hidden",e==null?void 0:e.base,c,u),...l,children:[n.jsx("span",{style:{width:d},className:b("absolute h-full max-w-full bg-current rounded-[inherit] top-0 bottom-0 start-0",s?"animate-linear-progress-1":"transition-[width]")}),s&&n.jsx("span",{className:"absolute h-full max-w-full bg-current rounded-[inherit] top-0 bottom-0 start-0 animate-linear-progress-2"})]})}module.exports=m;
1
+ "use client";"use strict";const n=require("react/jsx-runtime"),b=require("../../helpers/cn.cjs.js"),x=require("../../hooks/useClasses.cjs.js"),a=require("react"),f=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function m({color:t="primary",value:o=0,animate:s=!1,className:u,...l}){const e=x(r=>r.progress),c=a.useMemo(()=>{var i;if(!t)return"border-transparent";const r={primary:"bg-primary/15 text-primary",secondary:"bg-secondary/15 text-secondary",success:"bg-success/15 text-success",info:"bg-info/15 text-info",warning:"bg-warning/15 text-warning",danger:"bg-danger/15 text-danger",dark:"bg-dark/15 text-dark",light:"bg-light/15 text-light"},g=(i=e==null?void 0:e.color)==null?void 0:i[t];return[r==null?void 0:r[t],g]},[t,e==null?void 0:e.color]),d=a.useMemo(()=>{if(!s)return`${Math.max(o,0)}%`},[o,s]);return n.jsxs("div",{className:f.twMerge("relative block w-full h-1.5 rounded-full overflow-hidden",e==null?void 0:e.base,c,u),...l,children:[n.jsx("span",{style:{width:d},className:b("absolute h-full max-w-full bg-current rounded-[inherit] top-0 bottom-0 start-0",s?"animate-linear-progress-1":"transition-[width]")}),s&&n.jsx("span",{className:"absolute h-full max-w-full bg-current rounded-[inherit] top-0 bottom-0 start-0 animate-linear-progress-2"})]})}module.exports=m;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsxs as f, jsx as a } from "react/jsx-runtime";
3
3
  import c from "../../helpers/cn.es.js";
4
- import { useMemo as i } from "react";
5
4
  import p from "../../hooks/useClasses.es.js";
5
+ import { useMemo as i } from "react";
6
6
  import { twMerge as b } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
7
  function v({
8
8
  color: e = "primary",
@@ -1 +1 @@
1
- "use client";"use strict";const u=require("react/jsx-runtime");require("react");const i=require("../../hooks/useClasses.cjs.js"),a=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function c({className:e,children:s,...n}){const t=i(r=>r.skeleton.base);return u.jsx("span",{className:a.twMerge("inline-block w-10 h-10 rounded bg-gray-200 text-gray-200 animate-pulse",t,e),...n,children:s})}module.exports=c;
1
+ "use client";"use strict";const u=require("react/jsx-runtime"),i=require("../../hooks/useClasses.cjs.js");require("react");const a=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function c({className:e,children:s,...n}){const t=i(r=>r.skeleton.base);return u.jsx("span",{className:a.twMerge("inline-block w-10 h-10 rounded bg-gray-200 text-gray-200 animate-pulse",t,e),...n,children:s})}module.exports=c;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as a } from "react/jsx-runtime";
3
- import "react";
4
3
  import n from "../../hooks/useClasses.es.js";
4
+ import "react";
5
5
  import { twMerge as l } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
6
6
  function c({
7
7
  className: e,
@@ -1 +1 @@
1
- "use client";"use strict";const c=require("react/jsx-runtime");require("react");const n=require("../../hooks/useClasses.cjs.js"),u=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function a({className:e,...s}){const r=n(t=>t.spacer.base);return c.jsx("span",{className:u.twMerge("flex-1",r,e),...s})}module.exports=a;
1
+ "use client";"use strict";const c=require("react/jsx-runtime"),n=require("../../hooks/useClasses.cjs.js");require("react");const u=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function a({className:e,...s}){const r=n(t=>t.spacer.base);return c.jsx("span",{className:u.twMerge("flex-1",r,e),...s})}module.exports=a;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as a } from "react/jsx-runtime";
3
- import "react";
4
3
  import o from "../../hooks/useClasses.es.js";
4
+ import "react";
5
5
  import { twMerge as m } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
6
6
  function l({ className: s, ...e }) {
7
7
  const r = o((t) => t.spacer.base);
@@ -1 +1 @@
1
- "use client";"use strict";const b=require("react/jsx-runtime"),d=require("react"),c=require("../../hooks/useClasses.cjs.js"),m=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function p({color:o="primary",size:t="md",className:i,...u}){const r=c(e=>e.spinner),a=d.useMemo(()=>{var n;if(!o)return"border-current";const e={primary:"border-primary",secondary:"border-secondary",success:"border-success",info:"border-info",warning:"border-warning",danger:"border-danger",dark:"border-dark",light:"border-light"};return[e==null?void 0:e[o],(n=r==null?void 0:r.color)==null?void 0:n[o]]},[o,r==null?void 0:r.color]),s=d.useMemo(()=>{var n;const e={sm:"border-2 w-4",md:"border-3 w-6",lg:"border-4 w-8"};return[e==null?void 0:e[t],(n=r==null?void 0:r.size)==null?void 0:n[t]]},[t,r==null?void 0:r.size]);return b.jsx("span",{className:m.twMerge("inline-block align-middle rounded-full animate-spin aspect-square",r==null?void 0:r.base,a,"border-l-transparent",s,i),...u})}module.exports=p;
1
+ "use client";"use strict";const b=require("react/jsx-runtime"),c=require("../../hooks/useClasses.cjs.js"),d=require("react"),m=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function p({color:o="primary",size:t="md",className:i,...u}){const r=c(e=>e.spinner),a=d.useMemo(()=>{var n;if(!o)return"border-current";const e={primary:"border-primary",secondary:"border-secondary",success:"border-success",info:"border-info",warning:"border-warning",danger:"border-danger",dark:"border-dark",light:"border-light"};return[e==null?void 0:e[o],(n=r==null?void 0:r.color)==null?void 0:n[o]]},[o,r==null?void 0:r.color]),s=d.useMemo(()=>{var n;const e={sm:"border-2 w-4",md:"border-3 w-6",lg:"border-4 w-8"};return[e==null?void 0:e[t],(n=r==null?void 0:r.size)==null?void 0:n[t]]},[t,r==null?void 0:r.size]);return b.jsx("span",{className:m.twMerge("inline-block align-middle rounded-full animate-spin aspect-square",r==null?void 0:r.base,a,"border-l-transparent",s,i),...u})}module.exports=p;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as u } from "react/jsx-runtime";
3
- import { useMemo as t } from "react";
4
3
  import p from "../../hooks/useClasses.es.js";
4
+ import { useMemo as t } from "react";
5
5
  import { twMerge as f } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
6
6
  function w({
7
7
  color: o = "primary",
@@ -1 +1 @@
1
- "use client";"use strict";const f=require("react/jsx-runtime"),o=require("../../helpers/cn.cjs.js"),m=require("react"),q=require("../../hooks/useClasses.cjs.js"),h=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function w({as:a,variant:e="horizontal",wrap:u=!1,className:c,children:s,...l}){const t=q(n=>n.stack),v=a||"div",x=m.useMemo(()=>{var r,i;return{horizontal:o("flex-row *:min-w-0",(r=t==null?void 0:t.variants)==null?void 0:r.horizontal),vertical:o("flex-col *:min-h-0",(i=t==null?void 0:t.variants)==null?void 0:i.vertical)}[e]},[e,t==null?void 0:t.variants]);return f.jsx(v,{className:h.twMerge("flex",t==null?void 0:t.base,x,u&&"flex-wrap",c),...l,children:s})}module.exports=w;
1
+ "use client";"use strict";const f=require("react/jsx-runtime"),o=require("../../helpers/cn.cjs.js"),m=require("../../hooks/useClasses.cjs.js"),q=require("react"),h=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function w({as:a,variant:e="horizontal",wrap:u=!1,className:c,children:s,...l}){const t=m(n=>n.stack),v=a||"div",x=q.useMemo(()=>{var r,i;return{horizontal:o("flex-row *:min-w-0",(r=t==null?void 0:t.variants)==null?void 0:r.horizontal),vertical:o("flex-col *:min-h-0",(i=t==null?void 0:t.variants)==null?void 0:i.vertical)}[e]},[e,t==null?void 0:t.variants]);return f.jsx(v,{className:h.twMerge("flex",t==null?void 0:t.base,x,u&&"flex-wrap",c),...l,children:s})}module.exports=w;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as c } from "react/jsx-runtime";
3
3
  import a from "../../helpers/cn.es.js";
4
- import { useMemo as x } from "react";
5
- import h from "../../hooks/useClasses.es.js";
4
+ import x from "../../hooks/useClasses.es.js";
5
+ import { useMemo as h } from "react";
6
6
  import { twMerge as s } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
7
  function M({
8
8
  as: e,
@@ -12,7 +12,7 @@ function M({
12
12
  children: l,
13
13
  ...p
14
14
  }) {
15
- const t = h((o) => o.stack), v = e || "div", u = x(() => {
15
+ const t = x((o) => o.stack), v = e || "div", u = h(() => {
16
16
  var n, i;
17
17
  return {
18
18
  horizontal: a("flex-row *:min-w-0", (n = t == null ? void 0 : t.variants) == null ? void 0 : n.horizontal),
@@ -1 +1 @@
1
- "use client";"use strict";const s=require("react/jsx-runtime"),u=require("react"),d=require("../../hooks/useClasses.cjs.js"),n=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),f=u.createContext({striped:!1,bordered:!1,hover:!1});function g({className:r,children:a,...o}){const e=d(t=>t.table.container.base);return s.jsx("div",{className:n.twMerge("w-full overflow-auto",e,r),...o,children:a})}function l({striped:r=!1,bordered:a=!1,hover:o=!1,className:e,children:t,...i}){const b=d(c=>c.table.base);return s.jsx("table",{className:n.twMerge("min-w-full border-collapse border-spacing-0",b,e),...i,children:s.jsx(f.Provider,{value:{bordered:a,hover:o,striped:r},children:t})})}function p({sticky:r=!1,className:a,children:o,...e}){const t=d(i=>i.table.header);return s.jsx("thead",{className:n.twMerge(t==null?void 0:t.base,r&&"sticky top-0 left-0 right-0 z-[2]",r&&(t==null?void 0:t.sticky),a),...e,children:o})}function m({className:r,children:a,...o}){const e=d(t=>t.table.body.base);return s.jsx("tbody",{className:n.twMerge(e,r),...o,children:a})}function y({className:r,children:a,...o}){const e=d(w=>w.table.row),{bordered:t,hover:i,striped:b}=u.useContext(f),c=!!t,x=t==="dashed",h=t==="solid";return s.jsx("tr",{className:n.twMerge("bg-white",e==null?void 0:e.base,c&&"border-b border-solid border-[#e8eaee]",x&&"border-dashed",h&&"border-solid",c&&(e==null?void 0:e.bordered),i&&"cursor-pointer transition-colors hover:bg-gray-200",i&&(e==null?void 0:e.hover),b&&"even:bg-gray-100",b&&(e==null?void 0:e.hover),r),...o,children:a})}function j({sticky:r=!1,className:a,children:o,...e}){return s.jsx("th",{className:n.twMerge("font-medium text-sm py-2 px-4 whitespace-nowrap text-center first:text-start last:text-end",r&&"bg-inherit sticky end-0 z-[1]",a),...e,children:o})}function v({sticky:r=!1,className:a,children:o,...e}){return s.jsx("td",{className:n.twMerge("font-normal text-sm py-2 px-4 whitespace-nowrap text-center first:text-start last:text-end",r&&"bg-inherit sticky end-0 z-[1]",a),...e,children:o})}l.Container=g;l.Header=p;l.Body=m;l.Row=y;l.HeaderCell=j;l.DataCell=v;module.exports=l;
1
+ "use client";"use strict";const s=require("react/jsx-runtime"),d=require("../../hooks/useClasses.cjs.js"),u=require("react"),n=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),f=u.createContext({striped:!1,bordered:!1,hover:!1});function g({className:r,children:a,...o}){const e=d(t=>t.table.container.base);return s.jsx("div",{className:n.twMerge("w-full overflow-auto",e,r),...o,children:a})}function l({striped:r=!1,bordered:a=!1,hover:o=!1,className:e,children:t,...i}){const b=d(c=>c.table.base);return s.jsx("table",{className:n.twMerge("min-w-full border-collapse border-spacing-0",b,e),...i,children:s.jsx(f.Provider,{value:{bordered:a,hover:o,striped:r},children:t})})}function p({sticky:r=!1,className:a,children:o,...e}){const t=d(i=>i.table.header);return s.jsx("thead",{className:n.twMerge(t==null?void 0:t.base,r&&"sticky top-0 left-0 right-0 z-[2]",r&&(t==null?void 0:t.sticky),a),...e,children:o})}function m({className:r,children:a,...o}){const e=d(t=>t.table.body.base);return s.jsx("tbody",{className:n.twMerge(e,r),...o,children:a})}function y({className:r,children:a,...o}){const e=d(w=>w.table.row),{bordered:t,hover:i,striped:b}=u.useContext(f),c=!!t,x=t==="dashed",h=t==="solid";return s.jsx("tr",{className:n.twMerge("bg-white",e==null?void 0:e.base,c&&"border-b border-solid border-[#e8eaee]",x&&"border-dashed",h&&"border-solid",c&&(e==null?void 0:e.bordered),i&&"cursor-pointer transition-colors hover:bg-gray-200",i&&(e==null?void 0:e.hover),b&&"even:bg-gray-100",b&&(e==null?void 0:e.hover),r),...o,children:a})}function j({sticky:r=!1,className:a,children:o,...e}){return s.jsx("th",{className:n.twMerge("font-medium text-sm py-2 px-4 whitespace-nowrap text-center first:text-start last:text-end",r&&"bg-inherit sticky end-0 z-[1]",a),...e,children:o})}function v({sticky:r=!1,className:a,children:o,...e}){return s.jsx("td",{className:n.twMerge("font-normal text-sm py-2 px-4 whitespace-nowrap text-center first:text-start last:text-end",r&&"bg-inherit sticky end-0 z-[1]",a),...e,children:o})}l.Container=g;l.Header=p;l.Body=m;l.Row=y;l.HeaderCell=j;l.DataCell=v;module.exports=l;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as n } from "react/jsx-runtime";
3
- import { createContext as p, useContext as x } from "react";
4
3
  import i from "../../hooks/useClasses.es.js";
4
+ import { createContext as p, useContext as x } from "react";
5
5
  import { twMerge as s } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
6
6
  const f = p({
7
7
  striped: !1,
@@ -1 +1 @@
1
- "use client";"use strict";const c=require("react/jsx-runtime"),z=require("../../helpers/cn.cjs.js"),n=require("react"),B=require("../../hooks/useClasses.cjs.js"),f=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),F=require("../Portal/index.cjs.js"),N=require("../../node_modules/react-transition-group/esm/Transition.cjs.js");function P({title:h,color:l="dark",placement:i="top",duration:x=300,className:w,children:s,...b}){const o=B(e=>e.tooltip),m=n.useRef(null),g=n.useRef(null),[p,u]=n.useState(!1),[v,y]=n.useState({}),d=n.useMemo(()=>{var t;if(!l)return"border-transparent";const e={primary:"bg-primary text-white",secondary:"bg-secondary text-white",success:"bg-success text-white",info:"bg-info text-white",warning:"bg-warning text-white",danger:"bg-danger text-white",dark:"bg-dark text-white",light:"bg-light text-dark"};return[e==null?void 0:e[l],(t=o==null?void 0:o.color)==null?void 0:t[l]]},[l,o==null?void 0:o.color]),M=n.useMemo(()=>{var t;return[{top:"w-(--width) top-(--top) left-(--left) right-(--right) translate-y-[calc(-100%-0.5rem)] flex-col origin-bottom",end:"h-(--height) top-(--top) bottom-(--bottom) left-(--right) translate-x-[0.5rem] flex-row-reverse origin-start",bottom:"w-(--width) top-(--bottom) left-(--left) right-(--right) translate-y-[0.5rem] flex-col-reverse origin-top",start:"h-(--height) top-(--top) bottom-(--bottom) left-(--left) translate-x-[calc(var(--ratio)*-100%-0.5rem)] flex-row origin-start"}[i],(t=o==null?void 0:o.placement)==null?void 0:t[i]]},[i,o==null?void 0:o.placement]),j={entering:"scale-100 opacity-100",entered:"scale-100 opacity-100",exiting:"scale-75 opacity-0",exited:"scale-75 opacity-0",unmounted:""},k=n.useMemo(()=>({top:"mt-[-0.5rem]",end:"me-[-0.5rem]",bottom:"mb-[-0.5rem]",start:"ms-[-0.5rem]"})[i],[i]),E=n.useMemo(()=>s?n.cloneElement(s,{ref:e=>{g.current=e},onMouseEnter:e=>{var t,r;(r=(t=s.props).onMouseEnter)==null||r.call(t,e),u(!0)},onMouseLeave:e=>{var t,r;(r=(t=s.props).onMouseLeave)==null||r.call(t,e),u(!1)},onFocus:e=>{var t,r;(r=(t=s.props).onFocus)==null||r.call(t,e),u(!0)},onBlur:e=>{var t,r;(r=(t=s.props).onBlur)==null||r.call(t,e),u(!1)}}):null,[s]),a=n.useCallback(()=>{const e=g.current;if(!e)return;const t=e.getBoundingClientRect(),r=t.width,C=t.height,R=t.top,q=t.left,L=t.right,$=t.bottom;y({"--width":`${r}px`,"--height":`${C}px`,"--top":`${R}px`,"--left":`${q}px`,"--right":`${L}px`,"--bottom":`${$}px`})},[]);return n.useEffect(()=>(p&&a(),window.addEventListener("scroll",a),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}),[p,i,a]),c.jsxs(n.Fragment,{children:[E,c.jsx(F,{children:c.jsx(N.default,{nodeRef:m,in:p,timeout:x,unmountOnExit:!0,children:e=>c.jsxs("div",{ref:m,style:v,className:z("fixed flex justify-center items-center z-10 pointer-events-none transition-[scale,opacity] [--ratio:1] rtl:[--ratio:-1]",...M,j[e]),children:[c.jsx("span",{className:f.twMerge("relative block w-fit h-fit bg-dark text-sm rounded px-2 py-px whitespace-nowrap z-[1]",o==null?void 0:o.base,d,w),...b,children:h}),c.jsx("span",{className:f.twMerge("block size-3 bg-dark rotate-45",k,d)})]})})})]})}module.exports=P;
1
+ "use client";"use strict";const c=require("react/jsx-runtime"),z=require("../../helpers/cn.cjs.js"),B=require("../../hooks/useClasses.cjs.js"),n=require("react"),f=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),F=require("../Portal/index.cjs.js"),N=require("../../node_modules/react-transition-group/esm/Transition.cjs.js");function P({title:h,color:l="dark",placement:i="top",duration:x=300,className:w,children:s,...b}){const o=B(e=>e.tooltip),m=n.useRef(null),g=n.useRef(null),[p,u]=n.useState(!1),[v,y]=n.useState({}),d=n.useMemo(()=>{var t;if(!l)return"border-transparent";const e={primary:"bg-primary text-white",secondary:"bg-secondary text-white",success:"bg-success text-white",info:"bg-info text-white",warning:"bg-warning text-white",danger:"bg-danger text-white",dark:"bg-dark text-white",light:"bg-light text-dark"};return[e==null?void 0:e[l],(t=o==null?void 0:o.color)==null?void 0:t[l]]},[l,o==null?void 0:o.color]),M=n.useMemo(()=>{var t;return[{top:"w-(--width) top-(--top) left-(--left) right-(--right) translate-y-[calc(-100%-0.5rem)] flex-col origin-bottom",end:"h-(--height) top-(--top) bottom-(--bottom) left-(--right) translate-x-[0.5rem] flex-row-reverse origin-start",bottom:"w-(--width) top-(--bottom) left-(--left) right-(--right) translate-y-[0.5rem] flex-col-reverse origin-top",start:"h-(--height) top-(--top) bottom-(--bottom) left-(--left) translate-x-[calc(var(--ratio)*-100%-0.5rem)] flex-row origin-start"}[i],(t=o==null?void 0:o.placement)==null?void 0:t[i]]},[i,o==null?void 0:o.placement]),j={entering:"scale-100 opacity-100",entered:"scale-100 opacity-100",exiting:"scale-75 opacity-0",exited:"scale-75 opacity-0",unmounted:""},k=n.useMemo(()=>({top:"mt-[-0.5rem]",end:"me-[-0.5rem]",bottom:"mb-[-0.5rem]",start:"ms-[-0.5rem]"})[i],[i]),E=n.useMemo(()=>s?n.cloneElement(s,{ref:e=>{g.current=e},onMouseEnter:e=>{var t,r;(r=(t=s.props).onMouseEnter)==null||r.call(t,e),u(!0)},onMouseLeave:e=>{var t,r;(r=(t=s.props).onMouseLeave)==null||r.call(t,e),u(!1)},onFocus:e=>{var t,r;(r=(t=s.props).onFocus)==null||r.call(t,e),u(!0)},onBlur:e=>{var t,r;(r=(t=s.props).onBlur)==null||r.call(t,e),u(!1)}}):null,[s]),a=n.useCallback(()=>{const e=g.current;if(!e)return;const t=e.getBoundingClientRect(),r=t.width,C=t.height,R=t.top,q=t.left,L=t.right,$=t.bottom;y({"--width":`${r}px`,"--height":`${C}px`,"--top":`${R}px`,"--left":`${q}px`,"--right":`${L}px`,"--bottom":`${$}px`})},[]);return n.useEffect(()=>(p&&a(),window.addEventListener("scroll",a),window.addEventListener("resize",a),()=>{window.removeEventListener("scroll",a),window.removeEventListener("resize",a)}),[p,i,a]),c.jsxs(n.Fragment,{children:[E,c.jsx(F,{children:c.jsx(N.default,{nodeRef:m,in:p,timeout:x,unmountOnExit:!0,children:e=>c.jsxs("div",{ref:m,style:v,className:z("fixed flex justify-center items-center z-10 pointer-events-none transition-[scale,opacity] [--ratio:1] rtl:[--ratio:-1]",...M,j[e]),children:[c.jsx("span",{className:f.twMerge("relative block w-fit h-fit bg-dark text-sm rounded px-2 py-px whitespace-nowrap z-[1]",o==null?void 0:o.base,d,w),...b,children:h}),c.jsx("span",{className:f.twMerge("block size-3 bg-dark rotate-45",k,d)})]})})})]})}module.exports=P;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsxs as d, jsx as p } from "react/jsx-runtime";
3
3
  import N from "../../helpers/cn.es.js";
4
- import { useRef as h, useState as w, useMemo as c, cloneElement as O, useCallback as T, useEffect as S, Fragment as q } from "react";
5
- import A from "../../hooks/useClasses.es.js";
4
+ import O from "../../hooks/useClasses.es.js";
5
+ import { useRef as h, useState as w, useMemo as c, cloneElement as T, useCallback as S, useEffect as q, Fragment as A } from "react";
6
6
  import { twMerge as x } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
7
  import D from "../Portal/index.es.js";
8
8
  import G from "../../node_modules/react-transition-group/esm/Transition.es.js";
@@ -15,7 +15,7 @@ function W({
15
15
  children: n,
16
16
  ...k
17
17
  }) {
18
- const o = A((e) => e.tooltip), f = h(null), u = h(null), [m, l] = w(!1), [E, C] = w({}), g = c(() => {
18
+ const o = O((e) => e.tooltip), f = h(null), u = h(null), [m, l] = w(!1), [E, C] = w({}), g = c(() => {
19
19
  var t;
20
20
  if (!a) return "border-transparent";
21
21
  const e = {
@@ -48,7 +48,7 @@ function W({
48
48
  end: "me-[-0.5rem]",
49
49
  bottom: "mb-[-0.5rem]",
50
50
  start: "ms-[-0.5rem]"
51
- })[i], [i]), z = c(() => n ? O(n, {
51
+ })[i], [i]), z = c(() => n ? T(n, {
52
52
  ref: (e) => {
53
53
  u.current = e;
54
54
  },
@@ -68,7 +68,7 @@ function W({
68
68
  var t, r;
69
69
  (r = (t = n.props).onBlur) == null || r.call(t, e), l(!1);
70
70
  }
71
- }) : null, [n]), s = T(() => {
71
+ }) : null, [n]), s = S(() => {
72
72
  const e = u.current;
73
73
  if (!e) return;
74
74
  const t = e.getBoundingClientRect(), r = t.width, R = t.height, P = t.top, j = t.left, B = t.right, F = t.bottom;
@@ -81,9 +81,9 @@ function W({
81
81
  "--bottom": `${F}px`
82
82
  });
83
83
  }, []);
84
- return S(() => (m && s(), window.addEventListener("scroll", s), window.addEventListener("resize", s), () => {
84
+ return q(() => (m && s(), window.addEventListener("scroll", s), window.addEventListener("resize", s), () => {
85
85
  window.removeEventListener("scroll", s), window.removeEventListener("resize", s);
86
- }), [m, i, s]), /* @__PURE__ */ d(q, { children: [
86
+ }), [m, i, s]), /* @__PURE__ */ d(A, { children: [
87
87
  z,
88
88
  /* @__PURE__ */ p(D, { children: /* @__PURE__ */ p(G, { nodeRef: f, in: m, timeout: v, unmountOnExit: !0, children: (e) => /* @__PURE__ */ d(
89
89
  "div",
@@ -1 +1 @@
1
- "use client";"use strict";const m=require("react/jsx-runtime"),d=require("react"),x=require("../../hooks/useClasses.cjs.js"),u=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function g({as:o,variant:t="body-1",className:r,...s}){const e=x(n=>n.typography),a=d.useMemo(()=>o||{"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6","body-1":"p","body-2":"p","body-3":"p"}[t]||"p",[o,t]),h=d.useMemo(()=>{var i;return[{"heading-1":"text-5xl font-semibold","heading-2":"text-4xl font-semibold","heading-3":"text-3xl font-semibold","heading-4":"text-2xl font-semibold","heading-5":"text-xl font-medium","heading-6":"text-lg font-medium","body-1":"text-base font-normal","body-2":"text-sm font-normal","body-3":"text-xs font-normal"}[t],(i=e==null?void 0:e.variant)==null?void 0:i[t]]},[t,e==null?void 0:e.variant]);return m.jsx(a,{className:u.twMerge(e==null?void 0:e.base,h,r),...s})}module.exports=g;
1
+ "use client";"use strict";const m=require("react/jsx-runtime"),x=require("../../hooks/useClasses.cjs.js"),d=require("react"),u=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function g({as:o,variant:t="body-1",className:r,...s}){const e=x(n=>n.typography),a=d.useMemo(()=>o||{"heading-1":"h1","heading-2":"h2","heading-3":"h3","heading-4":"h4","heading-5":"h5","heading-6":"h6","body-1":"p","body-2":"p","body-3":"p"}[t]||"p",[o,t]),h=d.useMemo(()=>{var i;return[{"heading-1":"text-5xl font-semibold","heading-2":"text-4xl font-semibold","heading-3":"text-3xl font-semibold","heading-4":"text-2xl font-semibold","heading-5":"text-xl font-medium","heading-6":"text-lg font-medium","body-1":"text-base font-normal","body-2":"text-sm font-normal","body-3":"text-xs font-normal"}[t],(i=e==null?void 0:e.variant)==null?void 0:i[t]]},[t,e==null?void 0:e.variant]);return m.jsx(a,{className:u.twMerge(e==null?void 0:e.base,h,r),...s})}module.exports=g;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as x } from "react/jsx-runtime";
3
- import { useMemo as i } from "react";
4
3
  import g from "../../hooks/useClasses.es.js";
4
+ import { useMemo as i } from "react";
5
5
  import { twMerge as p } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
6
6
  function y({
7
7
  as: n,
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./cn.cjs.js"),t=require("./copy.cjs.js"),i=require("./getByPath.cjs.js"),e=require("./isEmpty.cjs.js"),s=require("./isServer.cjs.js"),o=require("./matrixArray.cjs.js"),c=require("./randomID.cjs.js"),n=require("./replaceNonDigits.cjs.js"),a=require("./replacePersianNumbers.cjs.js"),u=require("./scrollIntoView.cjs.js"),y=require("./twoDigitNumber.cjs.js"),m=require("./wait.cjs.js");exports.cn=r;exports.copy=t;exports.getByPath=i;exports.isEmpty=e.isEmpty;exports.isEmptyArray=e.isEmptyArray;exports.isEmptyObject=e.isEmptyObject;exports.isEmptyString=e.isEmptyString;exports.isEmptyValue=e.isEmptyValue;exports.isServer=s;exports.matrixArray=o;exports.randomID=c;exports.replaceNonDigits=n;exports.replacePersianNumbers=a;exports.scrollIntoView=u;exports.twoDigitNumber=y;exports.wait=m;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./cn.cjs.js"),i=require("./copy.cjs.js"),e=require("./isEmpty.cjs.js"),t=require("./isServer.cjs.js"),s=require("./randomID.cjs.js"),o=require("./replaceNonDigits.cjs.js"),c=require("./replacePersianNumbers.cjs.js"),n=require("./scrollIntoView.cjs.js"),u=require("./twoDigitNumber.cjs.js"),m=require("./wait.cjs.js");exports.cn=r;exports.copy=i;exports.isEmpty=e.isEmpty;exports.isEmptyArray=e.isEmptyArray;exports.isEmptyObject=e.isEmptyObject;exports.isEmptyString=e.isEmptyString;exports.isEmptyValue=e.isEmptyValue;exports.isServer=t;exports.randomID=s;exports.replaceNonDigits=o;exports.replacePersianNumbers=c;exports.scrollIntoView=n;exports.twoDigitNumber=u;exports.wait=m;
@@ -1,9 +1,7 @@
1
1
  export { default as cn } from './cn';
2
2
  export { default as copy } from './copy';
3
- export { default as getByPath } from './getByPath';
4
3
  export { isEmpty, isEmptyArray, isEmptyObject, isEmptyString, isEmptyValue, } from './isEmpty';
5
4
  export { default as isServer } from './isServer';
6
- export { default as matrixArray } from './matrixArray';
7
5
  export { default as randomID } from './randomID';
8
6
  export { default as replaceNonDigits } from './replaceNonDigits';
9
7
  export { default as replacePersianNumbers } from './replacePersianNumbers';
@@ -1,31 +1,27 @@
1
1
  "use client";
2
- import { default as e } from "./cn.es.js";
3
- import { default as o } from "./copy.es.js";
4
- import { default as s } from "./getByPath.es.js";
5
- import { isEmpty as p, isEmptyArray as l, isEmptyObject as i, isEmptyString as u, isEmptyValue as x } from "./isEmpty.es.js";
6
- import { default as y } from "./isServer.es.js";
7
- import { default as n } from "./matrixArray.es.js";
8
- import { default as g } from "./randomID.es.js";
9
- import { default as w } from "./replaceNonDigits.es.js";
10
- import { default as N } from "./replacePersianNumbers.es.js";
11
- import { default as I } from "./scrollIntoView.es.js";
12
- import { default as S } from "./twoDigitNumber.es.js";
13
- import { default as h } from "./wait.es.js";
2
+ import { default as t } from "./cn.es.js";
3
+ import { default as a } from "./copy.es.js";
4
+ import { isEmpty as f, isEmptyArray as m, isEmptyObject as p, isEmptyString as i, isEmptyValue as l } from "./isEmpty.es.js";
5
+ import { default as d } from "./isServer.es.js";
6
+ import { default as c } from "./randomID.es.js";
7
+ import { default as y } from "./replaceNonDigits.es.js";
8
+ import { default as b } from "./replacePersianNumbers.es.js";
9
+ import { default as w } from "./scrollIntoView.es.js";
10
+ import { default as N } from "./twoDigitNumber.es.js";
11
+ import { default as S } from "./wait.es.js";
14
12
  export {
15
- e as cn,
16
- o as copy,
17
- s as getByPath,
18
- p as isEmpty,
19
- l as isEmptyArray,
20
- i as isEmptyObject,
21
- u as isEmptyString,
22
- x as isEmptyValue,
23
- y as isServer,
24
- n as matrixArray,
25
- g as randomID,
26
- w as replaceNonDigits,
27
- N as replacePersianNumbers,
28
- I as scrollIntoView,
29
- S as twoDigitNumber,
30
- h as wait
13
+ t as cn,
14
+ a as copy,
15
+ f as isEmpty,
16
+ m as isEmptyArray,
17
+ p as isEmptyObject,
18
+ i as isEmptyString,
19
+ l as isEmptyValue,
20
+ d as isServer,
21
+ c as randomID,
22
+ y as replaceNonDigits,
23
+ b as replacePersianNumbers,
24
+ w as scrollIntoView,
25
+ N as twoDigitNumber,
26
+ S as wait
31
27
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useAutoFill.cjs.js"),s=require("./useClasses.cjs.js"),u=require("./useCreateRipple.cjs.js"),t=require("./useDebounce.cjs.js"),i=require("./useDocumentVisible.cjs.js"),r=require("./useIsOffline.cjs.js"),o=require("./useKeyDown.cjs.js"),n=require("./useMouse.cjs.js"),c=require("./useOutsideClick.cjs.js"),l=require("./usePersistedState.cjs.js"),q=require("./useToggle.cjs.js");exports.useAutoFill=e;exports.useClasses=s;exports.useCreateRipple=u;exports.useDebounce=t;exports.useDocumentVisible=i;exports.useIsOffline=r;exports.useKeyDown=o;exports.useMouse=n;exports.useOutsideClick=c;exports.usePersistedState=l;exports.useToggle=q;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useClasses.cjs.js"),s=require("./useCreateRipple.cjs.js"),u=require("./useDebounce.cjs.js"),t=require("./useDocumentVisible.cjs.js"),r=require("./useIsOffline.cjs.js"),i=require("./useKeyDown.cjs.js"),o=require("./usePersistedState.cjs.js"),n=require("./useToggle.cjs.js");exports.useClasses=e;exports.useCreateRipple=s;exports.useDebounce=u;exports.useDocumentVisible=t;exports.useIsOffline=r;exports.useKeyDown=i;exports.usePersistedState=o;exports.useToggle=n;
@@ -1,11 +1,8 @@
1
- export { default as useAutoFill } from './useAutoFill';
2
1
  export { default as useClasses } from './useClasses';
3
2
  export { default as useCreateRipple } from './useCreateRipple';
4
3
  export { default as useDebounce } from './useDebounce';
5
4
  export { default as useDocumentVisible } from './useDocumentVisible';
6
5
  export { default as useIsOffline } from './useIsOffline';
7
6
  export { default as useKeyDown } from './useKeyDown';
8
- export { default as useMouse } from './useMouse';
9
- export { default as useOutsideClick } from './useOutsideClick';
10
7
  export { default as usePersistedState } from './usePersistedState';
11
8
  export { default as useToggle } from './useToggle';
@@ -1,25 +1,19 @@
1
1
  "use client";
2
- import { default as t } from "./useAutoFill.es.js";
3
- import { default as u } from "./useClasses.es.js";
4
- import { default as f } from "./useCreateRipple.es.js";
5
- import { default as l } from "./useDebounce.es.js";
6
- import { default as p } from "./useDocumentVisible.es.js";
7
- import { default as x } from "./useIsOffline.es.js";
8
- import { default as n } from "./useKeyDown.es.js";
9
- import { default as C } from "./useMouse.es.js";
10
- import { default as b } from "./useOutsideClick.es.js";
11
- import { default as O } from "./usePersistedState.es.js";
12
- import { default as w } from "./useToggle.es.js";
2
+ import { default as t } from "./useClasses.es.js";
3
+ import { default as a } from "./useCreateRipple.es.js";
4
+ import { default as f } from "./useDebounce.es.js";
5
+ import { default as l } from "./useDocumentVisible.es.js";
6
+ import { default as d } from "./useIsOffline.es.js";
7
+ import { default as x } from "./useKeyDown.es.js";
8
+ import { default as n } from "./usePersistedState.es.js";
9
+ import { default as D } from "./useToggle.es.js";
13
10
  export {
14
- t as useAutoFill,
15
- u as useClasses,
16
- f as useCreateRipple,
17
- l as useDebounce,
18
- p as useDocumentVisible,
19
- x as useIsOffline,
20
- n as useKeyDown,
21
- C as useMouse,
22
- b as useOutsideClick,
23
- O as usePersistedState,
24
- w as useToggle
11
+ t as useClasses,
12
+ a as useCreateRipple,
13
+ f as useDebounce,
14
+ l as useDocumentVisible,
15
+ d as useIsOffline,
16
+ x as useKeyDown,
17
+ n as usePersistedState,
18
+ D as useToggle
25
19
  };
@@ -1 +1 @@
1
- "use client";"use strict";const s=require("react");function o(r,e=null,i=!0){s.useEffect(()=>{if(!r||!i)return;const u=n=>e?Array.isArray(e)?e.includes(n):n===e:!0,t=n=>{u(n.key)&&r(n.key)};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[r,e,i])}module.exports=o;
1
+ "use client";"use strict";const s=require("react");function o(r,{skip:i=!1,targetKey:e=null}={}){s.useEffect(()=>{if(!r||i)return;const u=n=>e?Array.isArray(e)?e.includes(n):n===e:!0,t=n=>{u(n.key)&&r(n.key)};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[r,e,i])}module.exports=o;
@@ -1 +1,6 @@
1
- export default function useKeyDown(callback?: (key: string) => void, targetKey?: null | string | string[], force?: boolean): void;
1
+ type Options = {
2
+ skip?: boolean;
3
+ targetKey?: null | string | string[];
4
+ };
5
+ export default function useKeyDown(callback?: (key: string) => void, { skip, targetKey }?: Options): void;
6
+ export {};
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { useEffect as o } from "react";
3
- function d(r, n = null, i = !0) {
4
- o(() => {
5
- if (!r || !i) return;
6
- const t = (e) => n ? Array.isArray(n) ? n.includes(e) : e === n : !0, u = (e) => {
7
- t(e.key) && r(e.key);
2
+ import { useEffect as t } from "react";
3
+ function s(r, { skip: i = !1, targetKey: n = null } = {}) {
4
+ t(() => {
5
+ if (!r || i) return;
6
+ const o = (e) => n ? Array.isArray(n) ? n.includes(e) : e === n : !0, u = (e) => {
7
+ o(e.key) && r(e.key);
8
8
  };
9
9
  return window.addEventListener("keydown", u), () => {
10
10
  window.removeEventListener("keydown", u);
@@ -12,5 +12,5 @@ function d(r, n = null, i = !0) {
12
12
  }, [r, n, i]);
13
13
  }
14
14
  export {
15
- d as default
15
+ s as default
16
16
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reaxify",
3
3
  "private": false,
4
- "version": "0.0.76",
4
+ "version": "0.0.78",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "files": [
@@ -1 +0,0 @@
1
- "use client";"use strict";function i(u,n,r){return n?n.split(".").reduce((t,e)=>t&&typeof t=="object"&&e in t?t[e]??null:r??null,u):r??null}module.exports=i;
@@ -1 +0,0 @@
1
- export default function getByPath<T = any, R = any>(obj: T, path: string, defaultValue?: R): R | null;
@@ -1,7 +0,0 @@
1
- "use client";
2
- function l(u, t, e) {
3
- return t ? t.split(".").reduce((n, r) => n && typeof n == "object" && r in n ? n[r] ?? null : e ?? null, u) : e ?? null;
4
- }
5
- export {
6
- l as default
7
- };
@@ -1 +0,0 @@
1
- "use client";"use strict";function s(r,n=1){const i=[];let t,e;for(t=0,e=-1;t<r.length;t++)t%n===0&&(e++,i[e]=[]),i[e].push(r[t]);return i}module.exports=s;
@@ -1 +0,0 @@
1
- export default function matrixArray<T>(arr: T[], perSubArray?: number): T[][];
@@ -1,11 +0,0 @@
1
- "use client";
2
- function l(n, r = 1) {
3
- const i = [];
4
- let t, e;
5
- for (t = 0, e = -1; t < n.length; t++)
6
- t % r === 0 && (e++, i[e] = []), i[e].push(n[t]);
7
- return i;
8
- }
9
- export {
10
- l as default
11
- };
@@ -1 +0,0 @@
1
- "use client";"use strict";const a=require("react");function f(s,e){const l=a.useRef(null);a.useEffect(()=>{var t,u;if(e!=null&&e.skip)return;l.current=new AbortController;const r=l.current;return(u=(t=navigator==null?void 0:navigator.credentials)==null?void 0:t.get)==null||u.call(t,{otp:{transport:["sms"]},signal:r.signal}).then(c=>{const n=c;s((n==null?void 0:n.code)||null)}).catch(c=>{console.error(c)}),()=>{r==null||r.abort("signal has been aborted.")}},[e==null?void 0:e.skip])}module.exports=f;
@@ -1,4 +0,0 @@
1
- import { Dispatch } from 'react';
2
- export default function useAutoFill(callback: Dispatch<string | null>, options?: {
3
- skip?: boolean;
4
- }): void;
@@ -1,27 +0,0 @@
1
- "use client";
2
- import { useRef as s, useEffect as f } from "react";
3
- function b(u, e) {
4
- const a = s(null);
5
- f(() => {
6
- var t, c;
7
- if (e != null && e.skip) return;
8
- a.current = new AbortController();
9
- const r = a.current;
10
- return (c = (t = navigator == null ? void 0 : navigator.credentials) == null ? void 0 : t.get) == null || c.call(t, {
11
- // eslint-disable-next-line
12
- // @ts-ignore
13
- otp: { transport: ["sms"] },
14
- signal: r.signal
15
- }).then((l) => {
16
- const n = l;
17
- u((n == null ? void 0 : n.code) || null);
18
- }).catch((l) => {
19
- console.error(l);
20
- }), () => {
21
- r == null || r.abort("signal has been aborted.");
22
- };
23
- }, [e == null ? void 0 : e.skip]);
24
- }
25
- export {
26
- b as default
27
- };
@@ -1 +0,0 @@
1
- "use client";"use strict";const c=require("react");function r(){const[u,t]=c.useState([0,0]);return c.useEffect(()=>{const n=e=>{t([e.x,e.y])},o=e=>{const s=e.changedTouches[0];t([s.clientX,s.clientY])};return window.addEventListener("mousemove",n),window.addEventListener("touchmove",o),()=>{window.removeEventListener("mousemove",n),window.removeEventListener("touchmove",o)}},[]),u}module.exports=r;
@@ -1 +0,0 @@
1
- export default function useMouse(): [number, number];
@@ -1,19 +0,0 @@
1
- "use client";
2
- import { useState as c, useEffect as r } from "react";
3
- function d() {
4
- const [u, t] = c([0, 0]);
5
- return r(() => {
6
- const o = (e) => {
7
- t([e.x, e.y]);
8
- }, n = (e) => {
9
- const s = e.changedTouches[0];
10
- t([s.clientX, s.clientY]);
11
- };
12
- return window.addEventListener("mousemove", o), window.addEventListener("touchmove", n), () => {
13
- window.removeEventListener("mousemove", o), window.removeEventListener("touchmove", n);
14
- };
15
- }, []), u;
16
- }
17
- export {
18
- d as default
19
- };
@@ -1 +0,0 @@
1
- "use client";"use strict";const c=require("react");function r(e,t){c.useEffect(()=>{if(!e)return;const n="current"in e?e.current:e;if(!n)return;const i=s=>{!n.contains(s.target)&&t(s)};return window.addEventListener("click",i),()=>{window.removeEventListener("click",i)}},[e,t])}module.exports=r;
@@ -1,4 +0,0 @@
1
- import { Dispatch, RefObject } from 'react';
2
- type Ref = RefObject<HTMLElement | null> | HTMLElement | null;
3
- export default function useOutsideClick(ref: Ref, callback: Dispatch<MouseEvent>): void;
4
- export {};
@@ -1,18 +0,0 @@
1
- "use client";
2
- import { useEffect as c } from "react";
3
- function d(t, e) {
4
- c(() => {
5
- if (!t) return;
6
- const n = "current" in t ? t.current : t;
7
- if (!n) return;
8
- const i = (s) => {
9
- !n.contains(s.target) && e(s);
10
- };
11
- return window.addEventListener("click", i), () => {
12
- window.removeEventListener("click", i);
13
- };
14
- }, [t, e]);
15
- }
16
- export {
17
- d as default
18
- };