reaxify 0.0.85 → 0.0.87

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 (84) hide show
  1. package/dist/components/Alert/index.cjs.js +1 -0
  2. package/dist/components/Alert/index.es.js +8 -0
  3. package/dist/components/Badge/index.cjs.js +1 -1
  4. package/dist/components/Badge/index.es.js +36 -36
  5. package/dist/components/Button/index.cjs.js +1 -1
  6. package/dist/components/Button/index.es.js +75 -57
  7. package/dist/components/Drawer/index.cjs.js +1 -1
  8. package/dist/components/Drawer/index.es.js +73 -64
  9. package/dist/components/Menu/index.cjs.js +1 -1
  10. package/dist/components/Menu/index.es.js +82 -73
  11. package/dist/components/Modal/index.cjs.js +1 -1
  12. package/dist/components/Modal/index.es.js +65 -53
  13. package/dist/components/Progress/index.cjs.js +1 -1
  14. package/dist/components/Progress/index.es.js +21 -21
  15. package/dist/components/Spacer/index.cjs.js +1 -1
  16. package/dist/components/Spacer/index.es.js +13 -7
  17. package/dist/components/Stack/index.cjs.js +1 -1
  18. package/dist/components/Stack/index.es.js +28 -28
  19. package/dist/components/Switch/index.cjs.js +1 -1
  20. package/dist/components/Switch/index.es.js +1 -1
  21. package/dist/components/Tabs/index.cjs.js +1 -1
  22. package/dist/components/Tabs/index.es.js +9 -9
  23. package/dist/node_modules/@tanstack/hotkeys/dist/match.es.js +4 -4
  24. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.cjs.js +1 -1
  25. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.es.js +2 -2
  26. package/dist/node_modules/react-transition-group/esm/Transition.cjs.js +1 -1
  27. package/dist/node_modules/react-transition-group/esm/Transition.es.js +2 -2
  28. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.js +1 -1
  29. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.es.js +745 -553
  30. package/dist/reaxify.css +1 -1
  31. package/dist/{axios → src/axios}/AxiosProvider.d.ts +1 -1
  32. package/dist/{components → src/components}/Accordion/index.d.ts +1 -1
  33. package/dist/src/components/Alert/index.d.ts +26 -0
  34. package/dist/src/components/Avatar/index.d.ts +21 -0
  35. package/dist/{components → src/components}/Badge/index.d.ts +1 -1
  36. package/dist/{components → src/components}/Button/index.d.ts +3 -3
  37. package/dist/{components → src/components}/ButtonGroup/index.d.ts +1 -1
  38. package/dist/{components → src/components}/Card/index.d.ts +1 -1
  39. package/dist/{components → src/components}/Drawer/index.d.ts +4 -2
  40. package/dist/src/components/Fill/index.d.ts +3 -0
  41. package/dist/{components → src/components}/InputGroup/index.d.ts +1 -1
  42. package/dist/{components → src/components}/Menu/index.d.ts +3 -2
  43. package/dist/{components → src/components}/Modal/index.d.ts +3 -2
  44. package/dist/{components → src/components}/Portal/index.d.ts +1 -1
  45. package/dist/{components → src/components}/Progress/index.d.ts +1 -1
  46. package/dist/src/components/Spacer/index.d.ts +6 -0
  47. package/dist/{components → src/components}/Spinner/index.d.ts +1 -1
  48. package/dist/src/components/Stack/index.d.ts +10 -0
  49. package/dist/{components → src/components}/Switch/index.d.ts +1 -1
  50. package/dist/{components → src/components}/Tabs/index.d.ts +1 -1
  51. package/dist/{components → src/components}/Tooltip/index.d.ts +2 -2
  52. package/dist/{components → src/components}/Typography/index.d.ts +1 -1
  53. package/dist/{hooks → src/hooks}/useClasses.d.ts +2 -2
  54. package/dist/{providers → src/providers}/ThemeProvider.d.ts +49 -5
  55. package/dist/{types → src/types}/index.d.ts +6 -1
  56. package/package.json +17 -17
  57. package/dist/components/Spacer/index.d.ts +0 -6
  58. package/dist/components/Stack/index.d.ts +0 -10
  59. /package/dist/{axios → src/axios}/index.d.ts +0 -0
  60. /package/dist/{axios → src/axios}/types.d.ts +0 -0
  61. /package/dist/{axios → src/axios}/useAxios.d.ts +0 -0
  62. /package/dist/{components → src/components}/Skeleton/index.d.ts +0 -0
  63. /package/dist/{components → src/components}/Table/index.d.ts +0 -0
  64. /package/dist/{components → src/components}/index.d.ts +0 -0
  65. /package/dist/{helpers → src/helpers}/cn.d.ts +0 -0
  66. /package/dist/{helpers → src/helpers}/copy.d.ts +0 -0
  67. /package/dist/{helpers → src/helpers}/index.d.ts +0 -0
  68. /package/dist/{helpers → src/helpers}/isEmpty.d.ts +0 -0
  69. /package/dist/{helpers → src/helpers}/isServer.d.ts +0 -0
  70. /package/dist/{helpers → src/helpers}/randomID.d.ts +0 -0
  71. /package/dist/{helpers → src/helpers}/replaceNonDigits.d.ts +0 -0
  72. /package/dist/{helpers → src/helpers}/replacePersianNumbers.d.ts +0 -0
  73. /package/dist/{helpers → src/helpers}/scrollIntoView.d.ts +0 -0
  74. /package/dist/{helpers → src/helpers}/twoDigitNumber.d.ts +0 -0
  75. /package/dist/{helpers → src/helpers}/wait.d.ts +0 -0
  76. /package/dist/{hooks → src/hooks}/index.d.ts +0 -0
  77. /package/dist/{hooks → src/hooks}/useCreateRipple.d.ts +0 -0
  78. /package/dist/{hooks → src/hooks}/useDebounce.d.ts +0 -0
  79. /package/dist/{hooks → src/hooks}/useDocumentVisible.d.ts +0 -0
  80. /package/dist/{hooks → src/hooks}/useIsOffline.d.ts +0 -0
  81. /package/dist/{hooks → src/hooks}/usePersistedState.d.ts +0 -0
  82. /package/dist/{hooks → src/hooks}/useToggle.d.ts +0 -0
  83. /package/dist/{index.d.ts → src/index.d.ts} +0 -0
  84. /package/dist/{providers → src/providers}/index.d.ts +0 -0
@@ -1 +1 @@
1
- "use client";"use strict";const i=require("react/jsx-runtime"),z=require("../../hooks/useClasses.cjs.js"),t=require("react"),N=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),j=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"),b=t.createContext({open:!1,onClose:()=>{},transitionState:"unmounted",closeOnClick:!1});function E({as:o,ref:l,open:s,onClose:c,closeOnClick:u=!1,anchorEl:d=null,className:m,children:h,...C}){const M=z(e=>e.menu.base),f=o||"div",n=16,r=t.useRef(null),p=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=>{p.current=e},[]),H=t.useCallback(e=>{var a,v,x;(a=r.current)==null||a.style.setProperty("--left",`${e.left}px`),(v=r.current)==null||v.style.setProperty("--right",`${e.right}px`),(x=r.current)==null||x.style.setProperty("--top",`${e.top}px`)},[]),g=t.useCallback(()=>{var q,P;if(!s||!d)return;const e=d.getBoundingClientRect(),a=window.innerWidth,v=window.innerHeight,x=((q=r.current)==null?void 0:q.offsetWidth)||150,L=((P=r.current)==null?void 0:P.offsetHeight)||200;let w=e.left,k=e.right,y=e.bottom;w=Math.min(Math.max(w,n),a-x-n),k=Math.min(Math.max(a-e.right,n),a-x-n),y=Math.min(Math.max(y,n),v-L-n),R({left:w,right:k,top:y}),H({left:w,right:k,top:y})},[s,d,R,H]);return t.useEffect(()=>{g()},[g,h]),t.useEffect(()=>{const e=()=>{g()};return window.addEventListener("scroll",e),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[g]),t.useImperativeHandle(l,()=>r.current),N.useHotkey("Escape",()=>c==null?void 0:c(),{enabled:s}),i.jsx(W,{children:i.jsx(I.default,{nodeRef:r,in:s,timeout:300,unmountOnExit:!0,children:e=>i.jsx(b.Provider,{value:{open:s,onClose:c,transitionState:e,closeOnClick:u},children:i.jsxs(S,{children:[i.jsx($,{}),i.jsx(f,{ref:r,"data-open":s,className:j.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],m),...C,children:h})]})})})})}function S({children:o}){const{transitionState:l}=t.useContext(b),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:j.twMerge("fixed inset-0 size-full flex flex-col bg-transparent transition-opacity overflow-hidden z-10",s[l]),children:o})}function $(){const{onClose:o}=t.useContext(b);return i.jsx("button",{type:"button",className:"w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",onClick:o})}function B({as:o,closeOnClick:l,className:s,children:c,onClick:u,...d}){const m=o||"button",h=m==="button"?"button":void 0,C=z(p=>p.menu.item.base),{closeOnClick:M,onClose:f}=t.useContext(b),n=l??M,r=p=>{n&&(f==null||f()),u==null||u(p)};return i.jsx(m,{type:h,className:j.twMerge("flex items-center px-3 py-2 w-full text-dark text-base font-normal rounded cursor-pointer transition-colors hover:bg-dark hover:text-white",C,s),onClick:r,...d,children:c})}E.Item=B;module.exports=E;
1
+ "use client";"use strict";const r=require("react/jsx-runtime"),I=require("../../helpers/cn.cjs.js"),z=require("../../hooks/useClasses.cjs.js"),n=require("react"),S=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),j=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),$=require("../Portal/index.cjs.js"),B=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),y=n.createContext({open:!1,onClose:()=>{},transitionState:"unmounted",closeOnClick:!1,preventClose:!1});function E({as:c,ref:a,open:i,onClose:o,closeOnClick:d=!1,preventClose:f=!1,anchorEl:l=null,className:b,children:h,...C}){const p=z(e=>e.menu.base),M=c||"div",s=16,t=n.useRef(null),O=n.useRef({left:s,right:s,top:s}),L={entering:"scale-100 opacity-100",entered:"scale-100 opacity-100",exiting:"scale-90 opacity-0",exited:"scale-90 opacity-0",unmounted:""},R=n.useCallback(e=>{O.current=e},[]),q=n.useCallback(e=>{var u,g,x;(u=t.current)==null||u.style.setProperty("--left",`${e.left}px`),(g=t.current)==null||g.style.setProperty("--right",`${e.right}px`),(x=t.current)==null||x.style.setProperty("--top",`${e.top}px`)},[]),m=n.useCallback(()=>{var H,P;if(!i||!l)return;const e=l.getBoundingClientRect(),u=window.innerWidth,g=window.innerHeight,x=((H=t.current)==null?void 0:H.offsetWidth)||150,W=((P=t.current)==null?void 0:P.offsetHeight)||200;let w=e.left,k=e.right,v=e.bottom;w=Math.min(Math.max(w,s),u-x-s),k=Math.min(Math.max(u-e.right,s),u-x-s),v=Math.min(Math.max(v,s),g-W-s),R({left:w,right:k,top:v}),q({left:w,right:k,top:v})},[i,l,R,q]),N=()=>{f||o==null||o()};return n.useEffect(()=>{m()},[m,h]),n.useEffect(()=>{const e=()=>{m()};return window.addEventListener("scroll",e),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[m]),n.useImperativeHandle(a,()=>t.current),S.useHotkey("Escape",()=>o==null?void 0:o(),{enabled:i&&!f}),r.jsx($,{children:r.jsx(B.default,{nodeRef:t,in:i,timeout:300,unmountOnExit:!0,children:e=>r.jsx(y.Provider,{value:{open:i,onClose:N,transitionState:e,closeOnClick:d,preventClose:f},children:r.jsxs(T,{children:[r.jsx(A,{}),r.jsx(M,{ref:t,"data-open":i,className:j.twMerge("w-fit min-w-52 bg-white shadow rounded p-2 transition-[scale,opacity] absolute top-(--top) left-(--left) right-auto origin-top-left rtl:left-auto rtl:right-(--right) rtl:origin-top-right",p,L[e],b),...C,children:h})]})})})})}function T({children:c}){const{transitionState:a}=n.useContext(y),i={entering:"active pointer-events-auto",entered:"active pointer-events-auto",exiting:"pointer-events-none",exited:"pointer-events-none",unmounted:""};return r.jsx("div",{className:j.twMerge("fixed inset-0 size-full flex flex-col bg-transparent transition-opacity overflow-hidden z-10",i[a]),children:c})}function A(){const{onClose:c,preventClose:a}=n.useContext(y);return r.jsx("button",{type:"button",className:I("w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",a&&"[&:active~*]:scale-95"),onClick:c})}function D({as:c,closeOnClick:a,className:i,children:o,onClick:d,...f}){const l=c||"button",b=l==="button"?"button":void 0,h=z(t=>t.menu.item.base),{closeOnClick:C,onClose:p}=n.useContext(y),M=a??C,s=t=>{M&&(p==null||p()),d==null||d(t)};return r.jsx(l,{type:b,className:j.twMerge("flex items-center px-3 py-2 w-full text-dark text-base font-normal rounded cursor-pointer transition-colors hover:bg-dark hover:text-white",h,i),onClick:s,...f,children:o})}E.Item=D;module.exports=E;
@@ -1,95 +1,101 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as $ } from "react/jsx-runtime";
2
+ import { jsx as r, jsxs as B } from "react/jsx-runtime";
3
+ import T from "../../helpers/cn.es.js";
3
4
  import W from "../../hooks/useClasses.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 { useHotkey as T } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
5
+ import { createContext as q, useRef as L, useCallback as C, useEffect as N, useImperativeHandle as A, useContext as P } from "react";
6
+ import { useHotkey as D } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
6
7
  import { twMerge as H } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
- import q from "../Portal/index.es.js";
8
- import A from "../../node_modules/react-transition-group/esm/Transition.es.js";
9
- const y = j({
8
+ import F from "../Portal/index.es.js";
9
+ import G from "../../node_modules/react-transition-group/esm/Transition.es.js";
10
+ const w = q({
10
11
  open: !1,
11
12
  onClose: () => {
12
13
  },
13
14
  transitionState: "unmounted",
14
- closeOnClick: !1
15
+ closeOnClick: !1,
16
+ preventClose: !1
15
17
  });
16
- function D({
17
- as: i,
18
- ref: l,
18
+ function J({
19
+ as: s,
20
+ ref: a,
19
21
  open: o,
20
- onClose: s,
21
- closeOnClick: c = !1,
22
- anchorEl: u = null,
23
- className: p,
24
- children: h,
22
+ onClose: i,
23
+ closeOnClick: u = !1,
24
+ preventClose: f = !1,
25
+ anchorEl: c = null,
26
+ className: y,
27
+ children: p,
25
28
  ...b
26
29
  }) {
27
- const C = W((t) => t.menu.base), f = i || "div", e = 16, n = L(null), d = L({
28
- left: e,
29
- right: e,
30
- top: e
31
- }), I = {
30
+ const d = W((t) => t.menu.base), M = s || "div", n = 16, e = L(null), I = L({
31
+ left: n,
32
+ right: n,
33
+ top: n
34
+ }), S = {
32
35
  entering: "scale-100 opacity-100",
33
36
  entered: "scale-100 opacity-100",
34
37
  exiting: "scale-90 opacity-0",
35
38
  exited: "scale-90 opacity-0",
36
39
  unmounted: ""
37
- }, z = k((t) => {
38
- d.current = t;
39
- }, []), O = k((t) => {
40
- var a, v, m;
41
- (a = n.current) == null || a.style.setProperty("--left", `${t.left}px`), (v = n.current) == null || v.style.setProperty("--right", `${t.right}px`), (m = n.current) == null || m.style.setProperty("--top", `${t.top}px`);
42
- }, []), g = k(() => {
40
+ }, z = C((t) => {
41
+ I.current = t;
42
+ }, []), O = C((t) => {
43
+ var l, g, m;
44
+ (l = e.current) == null || l.style.setProperty("--left", `${t.left}px`), (g = e.current) == null || g.style.setProperty("--right", `${t.right}px`), (m = e.current) == null || m.style.setProperty("--top", `${t.top}px`);
45
+ }, []), h = C(() => {
43
46
  var R, E;
44
- if (!o || !u) return;
45
- const t = u.getBoundingClientRect(), a = window.innerWidth, v = window.innerHeight, m = ((R = n.current) == null ? void 0 : R.offsetWidth) || 150, S = ((E = n.current) == null ? void 0 : E.offsetHeight) || 200;
46
- let x = t.left, M = t.right, w = t.bottom;
47
- x = Math.min(Math.max(x, e), a - m - e), M = Math.min(
48
- Math.max(a - t.right, e),
49
- a - m - e
50
- ), w = Math.min(Math.max(w, e), v - S - e), z({ left: x, right: M, top: w }), O({ left: x, right: M, top: w });
51
- }, [o, u, z, O]);
47
+ if (!o || !c) return;
48
+ const t = c.getBoundingClientRect(), l = window.innerWidth, g = window.innerHeight, m = ((R = e.current) == null ? void 0 : R.offsetWidth) || 150, j = ((E = e.current) == null ? void 0 : E.offsetHeight) || 200;
49
+ let x = t.left, k = t.right, v = t.bottom;
50
+ x = Math.min(Math.max(x, n), l - m - n), k = Math.min(
51
+ Math.max(l - t.right, n),
52
+ l - m - n
53
+ ), v = Math.min(Math.max(v, n), g - j - n), z({ left: x, right: k, top: v }), O({ left: x, right: k, top: v });
54
+ }, [o, c, z, O]), $ = () => {
55
+ f || i == null || i();
56
+ };
52
57
  return N(() => {
53
- g();
54
- }, [g, h]), N(() => {
58
+ h();
59
+ }, [h, p]), N(() => {
55
60
  const t = () => {
56
- g();
61
+ h();
57
62
  };
58
63
  return window.addEventListener("scroll", t), window.addEventListener("resize", t), () => {
59
64
  window.removeEventListener("scroll", t), window.removeEventListener("resize", t);
60
65
  };
61
- }, [g]), B(l, () => n.current), T("Escape", () => s == null ? void 0 : s(), { enabled: o }), /* @__PURE__ */ r(q, { children: /* @__PURE__ */ r(A, { nodeRef: n, in: o, timeout: 300, unmountOnExit: !0, children: (t) => /* @__PURE__ */ r(
62
- y.Provider,
66
+ }, [h]), A(a, () => e.current), D("Escape", () => i == null ? void 0 : i(), { enabled: o && !f }), /* @__PURE__ */ r(F, { children: /* @__PURE__ */ r(G, { nodeRef: e, in: o, timeout: 300, unmountOnExit: !0, children: (t) => /* @__PURE__ */ r(
67
+ w.Provider,
63
68
  {
64
69
  value: {
65
70
  open: o,
66
- onClose: s,
71
+ onClose: $,
67
72
  transitionState: t,
68
- closeOnClick: c
73
+ closeOnClick: u,
74
+ preventClose: f
69
75
  },
70
- children: /* @__PURE__ */ $(F, { children: [
71
- /* @__PURE__ */ r(G, {}),
76
+ children: /* @__PURE__ */ B(K, { children: [
77
+ /* @__PURE__ */ r(Q, {}),
72
78
  /* @__PURE__ */ r(
73
- f,
79
+ M,
74
80
  {
75
- ref: n,
81
+ ref: e,
76
82
  "data-open": o,
77
83
  className: H(
78
- "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",
79
- C,
80
- I[t],
81
- p
84
+ "w-fit min-w-52 bg-white shadow rounded p-2 transition-[scale,opacity] absolute top-(--top) left-(--left) right-auto origin-top-left rtl:left-auto rtl:right-(--right) rtl:origin-top-right",
85
+ d,
86
+ S[t],
87
+ y
82
88
  ),
83
89
  ...b,
84
- children: h
90
+ children: p
85
91
  }
86
92
  )
87
93
  ] })
88
94
  }
89
95
  ) }) });
90
96
  }
91
- function F({ children: i }) {
92
- const { transitionState: l } = P(y);
97
+ function K({ children: s }) {
98
+ const { transitionState: a } = P(w);
93
99
  return /* @__PURE__ */ r(
94
100
  "div",
95
101
  {
@@ -101,50 +107,53 @@ function F({ children: i }) {
101
107
  exiting: "pointer-events-none",
102
108
  exited: "pointer-events-none",
103
109
  unmounted: ""
104
- }[l]
110
+ }[a]
105
111
  ),
106
- children: i
112
+ children: s
107
113
  }
108
114
  );
109
115
  }
110
- function G() {
111
- const { onClose: i } = P(y);
116
+ function Q() {
117
+ const { onClose: s, preventClose: a } = P(w);
112
118
  return /* @__PURE__ */ r(
113
119
  "button",
114
120
  {
115
121
  type: "button",
116
- className: "w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",
117
- onClick: i
122
+ className: T(
123
+ "w-full flex-1 opacity-0 cursor-default lg:absolute lg:size-full lg:inset-0",
124
+ a && "[&:active~*]:scale-95"
125
+ ),
126
+ onClick: s
118
127
  }
119
128
  );
120
129
  }
121
- function J({
122
- as: i,
123
- closeOnClick: l,
130
+ function U({
131
+ as: s,
132
+ closeOnClick: a,
124
133
  className: o,
125
- children: s,
126
- onClick: c,
127
- ...u
134
+ children: i,
135
+ onClick: u,
136
+ ...f
128
137
  }) {
129
- const p = i || "button", h = p === "button" ? "button" : void 0, b = W((d) => d.menu.item.base), { closeOnClick: C, onClose: f } = P(y), e = l ?? C, n = (d) => {
130
- e && (f == null || f()), c == null || c(d);
138
+ const c = s || "button", y = c === "button" ? "button" : void 0, p = W((e) => e.menu.item.base), { closeOnClick: b, onClose: d } = P(w), M = a ?? b, n = (e) => {
139
+ M && (d == null || d()), u == null || u(e);
131
140
  };
132
141
  return /* @__PURE__ */ r(
133
- p,
142
+ c,
134
143
  {
135
- type: h,
144
+ type: y,
136
145
  className: H(
137
146
  "flex items-center px-3 py-2 w-full text-dark text-base font-normal rounded cursor-pointer transition-colors hover:bg-dark hover:text-white",
138
- b,
147
+ p,
139
148
  o
140
149
  ),
141
150
  onClick: n,
142
- ...u,
143
- children: s
151
+ ...f,
152
+ children: i
144
153
  }
145
154
  );
146
155
  }
147
- D.Item = J;
156
+ J.Item = U;
148
157
  export {
149
- D as default
158
+ J as default
150
159
  };
@@ -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"),l=require("../../hooks/useClasses.cjs.js"),u=require("react"),q=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.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:a=()=>{},duration:r=300,className:f,children:p,...b}){const d=l(m=>m.modal.base),i=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,()=>i.current),q.useHotkey("Escape",()=>a(),{enabled:e}),s.jsx(z,{children:s.jsx(C.default,{nodeRef:i,in:e,timeout:r,unmountOnExit:!0,children:m=>s.jsxs(M,{ref:i,"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:()=>a(),className:"absolute inset-0 cursor-default opacity-0"}),s.jsx(v.Provider,{value:{size:o,open:e,onClose:a,transitionState:m,duration:r},children:p})]})})})}function w({className:t,children:n,...o}){const e=l(d=>d.modal.dialog),{size:a,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 i;return[{sm:"min-[576px]:w-[300px]",md:"min-[576px]:w-[500px]",lg:"min-[992px]:w-[800px]"}[a],(i=e==null?void 0:e.size)==null?void 0:i[a]]},[a,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 H({className:t,...n}){const o=l(e=>e.modal.header.base);return s.jsx(x.Header,{className:y(o,t),...n})}function N({className:t,...n}){const o=l(e=>e.modal.body.base);return s.jsx(x.Body,{className:y(o,t),...n})}function S({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=H;c.Body=N;c.Footer=S;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"),f=require("../../helpers/cn.cjs.js"),u=require("../../hooks/useClasses.cjs.js"),l=require("react"),C=require("../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.cjs.js"),j=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),p=require("../Card/index.cjs.js"),h=require("../Portal/index.cjs.js"),w=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),v=l.createContext({size:"md",open:!1,onClose:()=>{},transitionState:"unmounted",duration:300});function c({as:t,ref:n,size:o="md",open:e=!1,onClose:a=()=>{},duration:i=300,preventClose:r=!1,className:b,children:y,...d}){const m=u(x=>x.modal.base),g=l.useRef(null),q=t||"div",z={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:""},M=()=>{r||a()};return l.useImperativeHandle(n,()=>g.current),C.useHotkey("Escape",()=>a(),{enabled:e&&!r}),s.jsx(h,{children:s.jsx(w.default,{nodeRef:g,in:e,timeout:i,unmountOnExit:!0,children:x=>s.jsxs(q,{ref:g,"data-open":e,style:{transitionDuration:`${i}ms`},className:j.twMerge("modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",m,z[x],b),...d,children:[s.jsx("button",{type:"button",onClick:M,className:f("absolute inset-0 cursor-default opacity-0",r&&"[&:active~*]:scale-95")}),s.jsx(v.Provider,{value:{size:o,open:e,onClose:M,transitionState:x,duration:i},children:y})]})})})}function H({className:t,children:n,...o}){const e=u(d=>d.modal.dialog),{size:a,transitionState:i,duration:r}=l.useContext(v),b={entering:"scale-100",entered:"scale-100",exiting:"scale-75",exited:"scale-75",unmounted:""},y=l.useMemo(()=>{var m;return[{sm:"min-[576px]:w-[300px]",md:"min-[576px]:w-[500px]",lg:"min-[992px]:w-[800px]"}[a],(m=e==null?void 0:e.size)==null?void 0:m[a]]},[a,e==null?void 0:e.size]);return s.jsx(p,{as:"div",style:{transitionDuration:`${r}ms`},className:j.twMerge("max-w-full max-h-full m-auto transition-transform",e==null?void 0:e.base,y,b[i],t),...o,children:n})}function N({className:t,...n}){const o=u(e=>e.modal.header.base);return s.jsx(p.Header,{className:f(o,t),...n})}function S({className:t,...n}){const o=u(e=>e.modal.body.base);return s.jsx(p.Body,{className:f(o,t),...n})}function k({className:t,...n}){const o=u(e=>e.modal.footer.base);return s.jsx(p.Footer,{className:f(o,t),...n})}c.Dialog=H;c.Header=N;c.Body=S;c.Footer=k;exports.ModalContext=v;exports.default=c;
@@ -1,14 +1,14 @@
1
1
  "use client";
2
- import { jsx as a, jsxs as C } from "react/jsx-runtime";
3
- import b from "../../helpers/cn.es.js";
2
+ import { jsx as a, jsxs as h } from "react/jsx-runtime";
3
+ import u from "../../helpers/cn.es.js";
4
4
  import l from "../../hooks/useClasses.es.js";
5
- import { createContext as M, useRef as N, useImperativeHandle as h, useContext as w, useMemo as H } from "react";
6
- import { useHotkey as k } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
7
- import { twMerge as y } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
8
- import d from "../Card/index.es.js";
9
- import D from "../Portal/index.es.js";
10
- import S from "../../node_modules/react-transition-group/esm/Transition.es.js";
11
- const v = M({
5
+ import { createContext as N, useRef as w, useImperativeHandle as H, useContext as k, useMemo as D } from "react";
6
+ import { useHotkey as S } from "../../node_modules/@tanstack/react-hotkeys/dist/useHotkey.es.js";
7
+ import { twMerge as g } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
8
+ import f from "../Card/index.es.js";
9
+ import B from "../Portal/index.es.js";
10
+ import F from "../../node_modules/react-transition-group/esm/Transition.es.js";
11
+ const z = N({
12
12
  size: "md",
13
13
  open: !1,
14
14
  onClose: () => {
@@ -16,83 +16,95 @@ const v = M({
16
16
  transitionState: "unmounted",
17
17
  duration: 300
18
18
  });
19
- function u({
19
+ function p({
20
20
  as: t,
21
21
  ref: o,
22
22
  size: n = "md",
23
23
  open: e = !1,
24
- onClose: i = () => {
24
+ onClose: s = () => {
25
25
  },
26
- duration: r = 300,
27
- className: p,
28
- children: f,
29
- ...x
26
+ duration: i = 300,
27
+ preventClose: r = !1,
28
+ className: x,
29
+ children: b,
30
+ ...m
30
31
  }) {
31
- const m = l((c) => c.modal.base), s = N(null), g = t || "div", z = {
32
+ const c = l((d) => d.modal.base), y = w(null), C = t || "div", M = {
32
33
  entering: "active opacity-100 pointer-events-auto",
33
34
  entered: "active opacity-100 pointer-events-auto",
34
35
  exiting: "opacity-0 pointer-events-none",
35
36
  exited: "opacity-0 pointer-events-none",
36
37
  unmounted: ""
38
+ }, v = () => {
39
+ r || s();
37
40
  };
38
- return h(o, () => s.current), k("Escape", () => i(), { enabled: e }), /* @__PURE__ */ a(D, { children: /* @__PURE__ */ a(S, { nodeRef: s, in: e, timeout: r, unmountOnExit: !0, children: (c) => /* @__PURE__ */ C(
39
- g,
41
+ return H(o, () => y.current), S("Escape", () => s(), { enabled: e && !r }), /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(F, { nodeRef: y, in: e, timeout: i, unmountOnExit: !0, children: (d) => /* @__PURE__ */ h(
42
+ C,
40
43
  {
41
- ref: s,
44
+ ref: y,
42
45
  "data-open": e,
43
- style: { transitionDuration: `${r}ms` },
44
- className: y(
46
+ style: { transitionDuration: `${i}ms` },
47
+ className: g(
45
48
  "modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",
46
- m,
47
- z[c],
48
- p
49
+ c,
50
+ M[d],
51
+ x
49
52
  ),
50
- ...x,
53
+ ...m,
51
54
  children: [
52
55
  /* @__PURE__ */ a(
53
56
  "button",
54
57
  {
55
58
  type: "button",
56
- onClick: () => i(),
57
- className: "absolute inset-0 cursor-default opacity-0"
59
+ onClick: v,
60
+ className: u(
61
+ "absolute inset-0 cursor-default opacity-0",
62
+ r && "[&:active~*]:scale-95"
63
+ )
58
64
  }
59
65
  ),
60
66
  /* @__PURE__ */ a(
61
- v.Provider,
67
+ z.Provider,
62
68
  {
63
- value: { size: n, open: e, onClose: i, transitionState: c, duration: r },
64
- children: f
69
+ value: {
70
+ size: n,
71
+ open: e,
72
+ onClose: v,
73
+ transitionState: d,
74
+ duration: i
75
+ },
76
+ children: b
65
77
  }
66
78
  )
67
79
  ]
68
80
  }
69
81
  ) }) });
70
82
  }
71
- function B({ className: t, children: o, ...n }) {
72
- const e = l((m) => m.modal.dialog), { size: i, transitionState: r, duration: p } = w(v), f = {
83
+ function R({ className: t, children: o, ...n }) {
84
+ const e = l((m) => m.modal.dialog), { size: s, transitionState: i, duration: r } = k(z), x = {
73
85
  entering: "scale-100",
74
86
  entered: "scale-100",
75
87
  exiting: "scale-75",
76
88
  exited: "scale-75",
77
89
  unmounted: ""
78
- }, x = H(() => {
79
- var s;
90
+ }, b = D(() => {
91
+ var c;
80
92
  return [{
81
93
  sm: "min-[576px]:w-[300px]",
82
94
  md: "min-[576px]:w-[500px]",
83
95
  lg: "min-[992px]:w-[800px]"
84
- }[i], (s = e == null ? void 0 : e.size) == null ? void 0 : s[i]];
85
- }, [i, e == null ? void 0 : e.size]);
96
+ }[s], (c = e == null ? void 0 : e.size) == null ? void 0 : c[s]];
97
+ }, [s, e == null ? void 0 : e.size]);
86
98
  return /* @__PURE__ */ a(
87
- d,
99
+ f,
88
100
  {
89
101
  as: "div",
90
- style: { transitionDuration: `${p}ms` },
91
- className: y(
102
+ style: { transitionDuration: `${r}ms` },
103
+ className: g(
92
104
  "max-w-full max-h-full m-auto transition-transform",
93
105
  e == null ? void 0 : e.base,
94
- x,
95
- f[r],
106
+ b,
107
+ x[i],
96
108
  t
97
109
  ),
98
110
  ...n,
@@ -100,23 +112,23 @@ function B({ className: t, children: o, ...n }) {
100
112
  }
101
113
  );
102
114
  }
103
- function F({ className: t, ...o }) {
115
+ function j({ className: t, ...o }) {
104
116
  const n = l((e) => e.modal.header.base);
105
- return /* @__PURE__ */ a(d.Header, { className: b(n, t), ...o });
117
+ return /* @__PURE__ */ a(f.Header, { className: u(n, t), ...o });
106
118
  }
107
- function R({ className: t, ...o }) {
119
+ function E({ className: t, ...o }) {
108
120
  const n = l((e) => e.modal.body.base);
109
- return /* @__PURE__ */ a(d.Body, { className: b(n, t), ...o });
121
+ return /* @__PURE__ */ a(f.Body, { className: u(n, t), ...o });
110
122
  }
111
- function j({ className: t, ...o }) {
123
+ function P({ className: t, ...o }) {
112
124
  const n = l((e) => e.modal.footer.base);
113
- return /* @__PURE__ */ a(d.Footer, { className: b(n, t), ...o });
125
+ return /* @__PURE__ */ a(f.Footer, { className: u(n, t), ...o });
114
126
  }
115
- u.Dialog = B;
116
- u.Header = F;
117
- u.Body = R;
118
- u.Footer = j;
127
+ p.Dialog = R;
128
+ p.Header = j;
129
+ p.Body = E;
130
+ p.Footer = P;
119
131
  export {
120
- v as ModalContext,
121
- u as default
132
+ z as ModalContext,
133
+ p as default
122
134
  };
@@ -1 +1 @@
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
+ "use client";"use strict";const n=require("react/jsx-runtime"),h=require("../../helpers/cn.cjs.js"),b=require("../../hooks/useClasses.cjs.js"),a=require("react"),x=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function f({color:r="primary",value:i=0,animate:s=!1,className:u,...l}){const t=b(e=>e.progress),g=a.useMemo(()=>{var o;if(!r)return"border-transparent";const e={primary:"bg-light-primary text-primary",secondary:"bg-light-secondary text-secondary",success:"bg-light-success text-success",info:"bg-light-info text-info",warning:"bg-light-warning text-warning",danger:"bg-light-danger text-danger",dark:"bg-dark/10 text-dark",light:"bg-light/10 text-light"},d=(o=t==null?void 0:t.color)==null?void 0:o[r];return[e==null?void 0:e[r],d]},[r,t==null?void 0:t.color]),c=a.useMemo(()=>{if(!s)return`${Math.max(i,0)}%`},[i,s]);return n.jsxs("div",{className:x.twMerge("relative block w-full h-1.5 rounded-full overflow-hidden",t==null?void 0:t.base,g,u),...l,children:[n.jsx("span",{style:{width:c},className:h("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=f;
@@ -1,56 +1,56 @@
1
1
  "use client";
2
- import { jsxs as f, jsx as a } from "react/jsx-runtime";
2
+ import { jsxs as f, jsx as i } from "react/jsx-runtime";
3
3
  import c from "../../helpers/cn.es.js";
4
- import p from "../../hooks/useClasses.es.js";
5
- import { useMemo as i } from "react";
6
- import { twMerge as b } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
4
+ import h from "../../hooks/useClasses.es.js";
5
+ import { useMemo as a } from "react";
6
+ import { twMerge as p } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
7
  function v({
8
8
  color: e = "primary",
9
9
  value: o = 0,
10
10
  animate: n = !1,
11
11
  className: l,
12
- ...u
12
+ ...g
13
13
  }) {
14
- const r = p((t) => t.progress), d = i(() => {
14
+ const r = h((t) => t.progress), u = a(() => {
15
15
  var s;
16
16
  if (!e) return "border-transparent";
17
17
  const t = {
18
- primary: "bg-primary/15 text-primary",
19
- secondary: "bg-secondary/15 text-secondary",
20
- success: "bg-success/15 text-success",
21
- info: "bg-info/15 text-info",
22
- warning: "bg-warning/15 text-warning",
23
- danger: "bg-danger/15 text-danger",
24
- dark: "bg-dark/15 text-dark",
25
- light: "bg-light/15 text-light"
18
+ primary: "bg-light-primary text-primary",
19
+ secondary: "bg-light-secondary text-secondary",
20
+ success: "bg-light-success text-success",
21
+ info: "bg-light-info text-info",
22
+ warning: "bg-light-warning text-warning",
23
+ danger: "bg-light-danger text-danger",
24
+ dark: "bg-dark/10 text-dark",
25
+ light: "bg-light/10 text-light"
26
26
  }, m = (s = r == null ? void 0 : r.color) == null ? void 0 : s[e];
27
27
  return [t == null ? void 0 : t[e], m];
28
- }, [e, r == null ? void 0 : r.color]), g = i(() => {
28
+ }, [e, r == null ? void 0 : r.color]), d = a(() => {
29
29
  if (!n)
30
30
  return `${Math.max(o, 0)}%`;
31
31
  }, [o, n]);
32
32
  return /* @__PURE__ */ f(
33
33
  "div",
34
34
  {
35
- className: b(
35
+ className: p(
36
36
  "relative block w-full h-1.5 rounded-full overflow-hidden",
37
37
  r == null ? void 0 : r.base,
38
- d,
38
+ u,
39
39
  l
40
40
  ),
41
- ...u,
41
+ ...g,
42
42
  children: [
43
- /* @__PURE__ */ a(
43
+ /* @__PURE__ */ i(
44
44
  "span",
45
45
  {
46
- style: { width: g },
46
+ style: { width: d },
47
47
  className: c(
48
48
  "absolute h-full max-w-full bg-current rounded-[inherit] top-0 bottom-0 start-0",
49
49
  n ? "animate-linear-progress-1" : "transition-[width]"
50
50
  )
51
51
  }
52
52
  ),
53
- n && /* @__PURE__ */ a("span", { className: "absolute h-full max-w-full bg-current rounded-[inherit] top-0 bottom-0 start-0 animate-linear-progress-2" })
53
+ n && /* @__PURE__ */ i("span", { className: "absolute h-full max-w-full bg-current rounded-[inherit] top-0 bottom-0 start-0 animate-linear-progress-2" })
54
54
  ]
55
55
  }
56
56
  );
@@ -1 +1 @@
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
+ "use client";"use strict";const t=require("react/jsx-runtime"),u=require("../../hooks/useClasses.cjs.js");require("react");const n=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function i({className:e,...s}){const r=u(c=>c.spacer.base);return t.jsx("div",{className:n.twMerge("block flex-1",r,e),...s})}module.exports=i;
@@ -1,12 +1,18 @@
1
1
  "use client";
2
- import { jsx as a } from "react/jsx-runtime";
3
- import o from "../../hooks/useClasses.es.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import a from "../../hooks/useClasses.es.js";
4
4
  import "react";
5
- import { twMerge as m } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
6
- function l({ className: s, ...e }) {
7
- const r = o((t) => t.spacer.base);
8
- return /* @__PURE__ */ a("span", { className: m("flex-1", r, s), ...e });
5
+ import { twMerge as c } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
6
+ function f({ className: e, ...s }) {
7
+ const r = a((o) => o.spacer.base);
8
+ return /* @__PURE__ */ t(
9
+ "div",
10
+ {
11
+ className: c("block flex-1", r, e),
12
+ ...s
13
+ }
14
+ );
9
15
  }
10
16
  export {
11
- l as default
17
+ f as default
12
18
  };
@@ -1 +1 @@
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"),C=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function M({as:l,variant:n="horizontal",wrap:r=!1,reverse:t=!1,className:c,children:f,...v}){const e=h(o=>o.stack),x=l||"div",m=u.useMemo(()=>{var i,s;return{horizontal:a("*:min-w-0",t?"flex-row-reverse":"flex-row",(i=e==null?void 0:e.variants)==null?void 0:i.horizontal),vertical:a("*:min-h-0",t?"flex-col-reverse":"flex-col",(s=e==null?void 0:e.variants)==null?void 0:s.vertical)}[n]},[n,t,e==null?void 0:e.variants]),q=u.useMemo(()=>r==="reverse"?"flex-wrap-reverse":r?"flex-wrap":null,[r]);return w.jsx(x,{className:C.twMerge("flex",e==null?void 0:e.base,m,q,c),...v,children:f})}module.exports=M;
1
+ "use client";"use strict";const q=require("react/jsx-runtime"),u=require("../../helpers/cn.cjs.js"),C=require("../../hooks/useClasses.cjs.js"),c=require("react"),M=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function j({as:l,direction:t="row",wrap:r=!1,reverse:n=!1,className:f,children:x,...m}){const e=C(o=>o.stack),w=l||"div",d=c.useMemo(()=>{var i,s;return{row:u("*:min-w-0",n?"flex-row-reverse":"flex-row",(i=e==null?void 0:e.directions)==null?void 0:i.row),column:u("*:min-h-0",n?"flex-col-reverse":"flex-col",(s=e==null?void 0:e.directions)==null?void 0:s.column)}[t]},[t,n,e==null?void 0:e.directions]),a=c.useMemo(()=>r==="reverse"?"flex-wrap-reverse":r?"flex-wrap":null,[r]);return q.jsx(w,{className:M.twMerge("flex",e==null?void 0:e.base,d,a,f),...m,children:x})}module.exports=j;