reaxify 0.0.84 → 0.0.86

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