reaxify 0.0.75 → 0.0.77

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 (82) hide show
  1. package/dist/axios/AxiosProvider.cjs.js +1 -1
  2. package/dist/axios/AxiosProvider.es.js +14 -14
  3. package/dist/components/Accordion/index.cjs.js +1 -1
  4. package/dist/components/Accordion/index.d.ts +14 -7
  5. package/dist/components/Accordion/index.es.js +80 -70
  6. package/dist/components/Badge/index.cjs.js +1 -1
  7. package/dist/components/Badge/index.es.js +3 -3
  8. package/dist/components/Button/index.cjs.js +1 -1
  9. package/dist/components/Button/index.es.js +27 -27
  10. package/dist/components/ButtonGroup/index.cjs.js +1 -1
  11. package/dist/components/ButtonGroup/index.es.js +22 -22
  12. package/dist/components/Card/index.cjs.js +1 -1
  13. package/dist/components/Card/index.es.js +29 -29
  14. package/dist/components/Drawer/index.cjs.js +1 -1
  15. package/dist/components/Drawer/index.es.js +33 -33
  16. package/dist/components/InputGroup/index.cjs.js +1 -1
  17. package/dist/components/InputGroup/index.es.js +26 -26
  18. package/dist/components/Menu/index.cjs.js +1 -1
  19. package/dist/components/Menu/index.es.js +77 -77
  20. package/dist/components/Modal/index.cjs.js +1 -1
  21. package/dist/components/Modal/index.es.js +39 -39
  22. package/dist/components/Progress/index.cjs.js +1 -1
  23. package/dist/components/Progress/index.es.js +18 -18
  24. package/dist/components/Skeleton/index.cjs.js +1 -1
  25. package/dist/components/Skeleton/index.es.js +5 -5
  26. package/dist/components/Spacer/index.cjs.js +1 -1
  27. package/dist/components/Spacer/index.es.js +5 -5
  28. package/dist/components/Spinner/index.cjs.js +1 -1
  29. package/dist/components/Spinner/index.es.js +11 -11
  30. package/dist/components/Stack/index.cjs.js +1 -1
  31. package/dist/components/Stack/index.es.js +11 -11
  32. package/dist/components/Switch/index.cjs.js +1 -1
  33. package/dist/components/Switch/index.es.js +33 -33
  34. package/dist/components/Table/index.cjs.js +1 -1
  35. package/dist/components/Table/index.es.js +25 -25
  36. package/dist/components/Tabs/index.cjs.js +1 -1
  37. package/dist/components/Tabs/index.es.js +30 -30
  38. package/dist/components/Tooltip/index.cjs.js +1 -1
  39. package/dist/components/Tooltip/index.es.js +47 -47
  40. package/dist/components/Typography/index.cjs.js +1 -1
  41. package/dist/components/Typography/index.es.js +8 -8
  42. package/dist/helpers/index.cjs.js +1 -1
  43. package/dist/helpers/index.d.ts +0 -2
  44. package/dist/helpers/index.es.js +24 -28
  45. package/dist/hooks/index.cjs.js +1 -1
  46. package/dist/hooks/index.d.ts +0 -3
  47. package/dist/hooks/index.es.js +16 -22
  48. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.cjs.js +1 -1
  49. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.es.js +1 -1
  50. package/dist/providers/ThemeProvider.cjs.js +1 -1
  51. package/dist/providers/ThemeProvider.es.js +4 -4
  52. package/dist/reaxify.css +1 -1
  53. package/package.json +15 -10
  54. package/dist/_virtual/jsx-runtime.cjs.js +0 -1
  55. package/dist/_virtual/jsx-runtime.cjs2.js +0 -1
  56. package/dist/_virtual/jsx-runtime.es.js +0 -6
  57. package/dist/_virtual/jsx-runtime.es2.js +0 -5
  58. package/dist/_virtual/react-jsx-runtime.development.cjs.js +0 -1
  59. package/dist/_virtual/react-jsx-runtime.development.es.js +0 -5
  60. package/dist/_virtual/react-jsx-runtime.production.cjs.js +0 -1
  61. package/dist/_virtual/react-jsx-runtime.production.es.js +0 -5
  62. package/dist/helpers/getByPath.cjs.js +0 -1
  63. package/dist/helpers/getByPath.d.ts +0 -1
  64. package/dist/helpers/getByPath.es.js +0 -7
  65. package/dist/helpers/matrixArray.cjs.js +0 -1
  66. package/dist/helpers/matrixArray.d.ts +0 -1
  67. package/dist/helpers/matrixArray.es.js +0 -11
  68. package/dist/hooks/useAutoFill.cjs.js +0 -1
  69. package/dist/hooks/useAutoFill.d.ts +0 -4
  70. package/dist/hooks/useAutoFill.es.js +0 -27
  71. package/dist/hooks/useMouse.cjs.js +0 -1
  72. package/dist/hooks/useMouse.d.ts +0 -1
  73. package/dist/hooks/useMouse.es.js +0 -19
  74. package/dist/hooks/useOutsideClick.cjs.js +0 -1
  75. package/dist/hooks/useOutsideClick.d.ts +0 -4
  76. package/dist/hooks/useOutsideClick.es.js +0 -18
  77. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js +0 -14
  78. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +0 -248
  79. package/dist/node_modules/react/cjs/react-jsx-runtime.production.cjs.js +0 -9
  80. package/dist/node_modules/react/cjs/react-jsx-runtime.production.es.js +0 -36
  81. package/dist/node_modules/react/jsx-runtime.cjs.js +0 -1
  82. package/dist/node_modules/react/jsx-runtime.es.js +0 -11
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("../_virtual/jsx-runtime.cjs.js"),f=require("react"),e=f.createContext({config:{},cancelDuplicatedRequests:!1,cancelOnUnmount:!1,beforeRequest:[],afterResponse:[],afterError:[],beforeRetry:[],retry:null});function x({config:t={},cancelDuplicatedRequests:r=!1,cancelOnUnmount:o=!1,beforeRetry:s=[],beforeRequest:n=[],afterResponse:u=[],afterError:l=[],retry:i=null,children:a}){return c.jsxRuntimeExports.jsx(e.Provider,{value:{config:t,cancelDuplicatedRequests:r,cancelOnUnmount:o,beforeRequest:n,afterResponse:u,afterError:l,beforeRetry:s,retry:i},children:a})}exports.AxiosContext=e;exports.default=x;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react/jsx-runtime"),f=require("react"),e=f.createContext({config:{},cancelDuplicatedRequests:!1,cancelOnUnmount:!1,beforeRequest:[],afterResponse:[],afterError:[],beforeRetry:[],retry:null});function x({config:t={},cancelDuplicatedRequests:r=!1,cancelOnUnmount:o=!1,beforeRetry:n=[],beforeRequest:s=[],afterResponse:u=[],afterError:l=[],retry:a=null,children:i}){return c.jsx(e.Provider,{value:{config:t,cancelDuplicatedRequests:r,cancelOnUnmount:o,beforeRequest:s,afterResponse:u,afterError:l,beforeRetry:n,retry:a},children:i})}exports.AxiosContext=e;exports.default=x;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { j as u } from "../_virtual/jsx-runtime.es.js";
3
- import { createContext as i } from "react";
4
- const c = i({
2
+ import { jsx as u } from "react/jsx-runtime";
3
+ import { createContext as c } from "react";
4
+ const i = c({
5
5
  config: {},
6
6
  cancelDuplicatedRequests: !1,
7
7
  cancelOnUnmount: !1,
@@ -16,30 +16,30 @@ function p({
16
16
  cancelDuplicatedRequests: r = !1,
17
17
  cancelOnUnmount: t = !1,
18
18
  beforeRetry: o = [],
19
- beforeRequest: s = [],
20
- afterResponse: n = [],
21
- afterError: a = [],
22
- retry: l = null,
19
+ beforeRequest: n = [],
20
+ afterResponse: s = [],
21
+ afterError: l = [],
22
+ retry: a = null,
23
23
  children: f
24
24
  }) {
25
- return /* @__PURE__ */ u.jsx(
26
- c.Provider,
25
+ return /* @__PURE__ */ u(
26
+ i.Provider,
27
27
  {
28
28
  value: {
29
29
  config: e,
30
30
  cancelDuplicatedRequests: r,
31
31
  cancelOnUnmount: t,
32
- beforeRequest: s,
33
- afterResponse: n,
34
- afterError: a,
32
+ beforeRequest: n,
33
+ afterResponse: s,
34
+ afterError: l,
35
35
  beforeRetry: o,
36
- retry: l
36
+ retry: a
37
37
  },
38
38
  children: f
39
39
  }
40
40
  );
41
41
  }
42
42
  export {
43
- c as AxiosContext,
43
+ i as AxiosContext,
44
44
  p as default
45
45
  };
@@ -1 +1 @@
1
- "use client";"use strict";const a=require("../../_virtual/jsx-runtime.cjs.js"),r=require("react"),l=require("../../hooks/useClasses.cjs.js"),y=require("../../node_modules/react-animate-height/dist/esm/index.cjs.js"),x=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),A=require("../../helpers/randomID.cjs.js"),C=require("../../node_modules/iconsax-react/dist/esm/ArrowDown2.cjs.js"),v=r.createContext({activeKey:null,onChange:()=>{}}),d=r.createContext({active:!1,eventKey:null});function u({activeKey:t=null,onChange:n=()=>{},children:e}){return a.jsxRuntimeExports.jsx(v.Provider,{value:{activeKey:t,onChange:n},children:e})}function b({as:t,eventKey:n=null,className:e,children:o,...i}){const m=l(f=>f.accordion.item.base),{activeKey:c}=r.useContext(v),g=t||"div",p=r.useMemo(()=>A(),[]),s=n||p,j=r.useMemo(()=>Array.isArray(c)?c.includes(s):s===c,[c,s]);return a.jsxRuntimeExports.jsx(g,{className:x.twMerge("block w-full border border-[#e8eaee] rounded",m,e),...i,children:a.jsxRuntimeExports.jsx(d.Provider,{value:{eventKey:s,active:j},children:o})})}function h({type:t,className:n,children:e,onClick:o,...i}){const m=l(s=>s.accordion.toggle.base),{eventKey:c}=r.useContext(d),{onChange:g}=r.useContext(v),p=s=>{c&&g(c),o==null||o(s)};return a.jsxRuntimeExports.jsx("button",{type:t,className:x.twMerge("w-full flex items-center text-start text-base px-5 py-4 rounded-t cursor-pointer",m,n),onClick:p,...i,children:e})}function w({className:t,...n}){const e=l(i=>i.accordion.icon),{active:o}=r.useContext(d);return a.jsxRuntimeExports.jsx(C,{color:"currentColor",className:x.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 R({duration:t=300,children:n}){const{active:e}=r.useContext(d);return a.jsxRuntimeExports.jsx(y,{duration:t,height:e?"auto":0,className:"w-full",animationStateClasses:{animating:"",animatingUp:"",animatingDown:"",static:"",animatingToHeightZero:"",animatingToHeightAuto:"",animatingToHeightSpecific:"",staticHeightZero:"",staticHeightAuto:"",staticHeightSpecific:""},children:n})}function q({className:t,children:n,...e}){const o=l(i=>i.accordion.body.base);return a.jsxRuntimeExports.jsx("div",{className:x.twMerge("w-full block px-5 py-4 rounded-b",o,t),...e,children:n})}u.Item=b;u.Toggle=h;u.Icon=w;u.Collapse=R;u.Body=q;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 { j as a } from "../../_virtual/jsx-runtime.es.js";
3
- import { createContext as y, useContext as s, useMemo as A } from "react";
4
- import l from "../../hooks/useClasses.es.js";
5
- import b 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 j from "../../node_modules/iconsax-react/dist/esm/ArrowDown2.es.js";
9
- const x = y({
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 = y({
11
+ handleChange: () => {
12
+ },
13
+ variant: "single"
14
+ }), A = v({
14
15
  active: !1,
15
16
  eventKey: null
16
17
  });
17
- function u({
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.jsx(x.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
- function w({
26
- as: o,
27
- eventKey: e = null,
35
+ function H({
36
+ as: e,
37
+ eventKey: o = null,
28
38
  className: t,
29
39
  children: n,
30
- ...i
40
+ ...c
31
41
  }) {
32
- const f = l((v) => v.accordion.item.base), { activeKey: c } = s(x), g = o || "div", p = A(() => C(), []), r = e || p, h = A(() => Array.isArray(c) ? c.includes(r) : r === c, [c, r]);
33
- return /* @__PURE__ */ a.jsx(
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.jsx(d.Provider, { value: { eventKey: r, active: h }, children: n })
51
+ ...c,
52
+ children: /* @__PURE__ */ s(A.Provider, { value: { eventKey: r, active: b }, children: n })
43
53
  }
44
54
  );
45
55
  }
46
- function H({
47
- type: o,
48
- className: e,
56
+ function I({
57
+ type: e = "button",
58
+ className: o,
49
59
  children: t,
50
60
  onClick: n,
51
- ...i
61
+ ...c
52
62
  }) {
53
- const f = l((r) => r.accordion.toggle.base), { eventKey: c } = s(d), { onChange: g } = s(x), 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.jsx(
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 I({
72
- className: o,
73
- ...e
81
+ function N({
82
+ className: e,
83
+ ...o
74
84
  }) {
75
- const t = l((i) => i.accordion.icon), { active: n } = s(d);
76
- return /* @__PURE__ */ a.jsx(
77
- j,
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 K({
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.jsx(
97
- b,
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 K({
111
121
  staticHeightAuto: "",
112
122
  staticHeightSpecific: ""
113
123
  },
114
- children: e
124
+ children: o
115
125
  }
116
126
  );
117
127
  }
118
- function N({
119
- className: o,
120
- children: e,
128
+ function D({
129
+ className: e,
130
+ children: o,
121
131
  ...t
122
132
  }) {
123
- const n = l((i) => i.accordion.body.base);
124
- return /* @__PURE__ */ a.jsx(
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
- u.Item = w;
138
- u.Toggle = H;
139
- u.Icon = I;
140
- u.Collapse = K;
141
- u.Body = N;
147
+ d.Item = H;
148
+ d.Toggle = I;
149
+ d.Icon = N;
150
+ d.Collapse = T;
151
+ d.Body = D;
142
152
  export {
143
- u as default
153
+ d as default
144
154
  };
@@ -1 +1 @@
1
- "use client";"use strict";const w=require("../../_virtual/jsx-runtime.cjs.js"),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.jsxRuntimeExports.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
- import { j as w } from "../../_virtual/jsx-runtime.es.js";
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,
@@ -69,7 +69,7 @@ function B({
69
69
  };
70
70
  return e == null ? void 0 : e[a];
71
71
  }, [a, r == null ? void 0 : r.size]);
72
- return /* @__PURE__ */ w.jsx(
72
+ return /* @__PURE__ */ w(
73
73
  c,
74
74
  {
75
75
  className: k(
@@ -1 +1 @@
1
- "use client";"use strict";const u=require("../../_virtual/jsx-runtime.cjs.js"),r=require("react"),m=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),f=require("../../helpers/cn.cjs.js"),H=require("../../hooks/useClasses.cjs.js"),I=require("../../hooks/useCreateRipple.cjs.js"),J=require("../ButtonGroup/index.cjs.js"),K=require("../Drawer/index.cjs.js"),L=require("../Modal/index.cjs.js"),O=require("../Spinner/index.cjs.js");function Q({as:w,variant:y,color:l,size:h,loading:C,stopPropagation:j=!1,preventDefault:v=!1,closeModal:q=!1,closeDrawer:R=!1,className:k,onClick:b,children:M,disabled:z,...E}){const t=H(e=>e.button),n=r.useContext(J.ButtonGroupContext),N=r.useContext(L.ModalContext),D=r.useContext(K.DrawerContext),$=I(),B=w||"button",x=y??n.variant??"solid",i=r.useMemo(()=>l!==void 0?l:n.color!==void 0?n.color:"primary",[l,n.color]),a=h??n.size??"md",d=C??n.loading??!1,s=r.useMemo(()=>{var p,c,g;if(!i)return"border-transparent";const e={primary:{solid:"bg-primary text-white border-primary",outline:"bg-transparent text-primary border-primary",text:"bg-transparent text-primary border-transparent"},secondary:{solid:"bg-secondary text-white border-secondary",outline:"bg-transparent text-secondary border-secondary",text:"bg-transparent text-secondary border-transparent"},success:{solid:"bg-success text-white border-success",outline:"bg-transparent text-success border-success",text:"bg-transparent text-success border-transparent"},info:{solid:"bg-info text-white border-info",outline:"bg-transparent text-info border-info",text:"bg-transparent text-info border-transparent"},warning:{solid:"bg-warning text-white border-warning",outline:"bg-transparent text-warning border-warning",text:"bg-transparent text-warning border-transparent"},danger:{solid:"bg-danger text-white border-danger",outline:"bg-transparent text-danger border-danger",text:"bg-transparent text-danger border-transparent"},dark:{solid:"bg-dark text-white border-dark",outline:"bg-transparent text-dark border-dark",text:"bg-transparent text-dark border-transparent"},light:{solid:"bg-light text-dark border-light",outline:"bg-transparent text-dark border-light",text:"bg-transparent text-dark border-transparent"}},o=(c=(p=t==null?void 0:t.color)==null?void 0:p[i])==null?void 0:c[x],F=(g=e==null?void 0:e[i])==null?void 0:g[x];return m.twMerge(F,o)},[i,x,t==null?void 0:t.color]),G=r.useMemo(()=>s==null?void 0:s.split(" ").find(e=>e.startsWith("text-")),[s]),P=r.useMemo(()=>{var o;if(!a)return null;const e={sm:"text-base py-1 px-3.5",md:"text-base py-1.5 px-4",lg:"text-lg py-2 px-6"};return[e==null?void 0:e[a],(o=t==null?void 0:t.size)==null?void 0:o[a]]},[a,t==null?void 0:t.size]),W=r.useMemo(()=>{var e,o;return d?f("disabled:opacity-100 disabled:cursor-wait disabled:text-transparent",(e=t==null?void 0:t.loading)==null?void 0:e.active):f("disabled:opacity-75 disabled:cursor-not-allowed",(o=t==null?void 0:t.loading)==null?void 0:o.inactive)},[d,t==null?void 0:t.loading]),A=e=>{$(e),q&&N.onClose(),R&&D.onClose(),j&&e.stopPropagation(),v&&e.preventDefault(),b==null||b(e)};return u.jsxRuntimeExports.jsxs(B,{className:m.twMerge("relative inline-block no-underline whitespace-nowrap font-medium text-center rounded border border-[#e8eaee] cursor-pointer transition-[box-shadow,opacity,color,background-color,border-color]",t==null?void 0:t.base,s,P,W,n.buttonClasses,k),onClick:A,disabled:z||d,...E,children:[M,d&&u.jsxRuntimeExports.jsx("span",{className:"absolute inset-0 size-full flex items-center justify-center bg-transparent p-2",children:u.jsxRuntimeExports.jsx(O,{size:a,color:null,className:G})}),u.jsxRuntimeExports.jsx("span",{className:"ripple-group absolute size-full inset-0 overflow-hidden rounded-[inherit] pointer-events-none"})]})}module.exports=Q;
1
+ "use client";"use strict";const l=require("react/jsx-runtime"),r=require("react"),f=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),m=require("../../helpers/cn.cjs.js"),H=require("../../hooks/useClasses.cjs.js"),I=require("../../hooks/useCreateRipple.cjs.js"),J=require("../ButtonGroup/index.cjs.js"),K=require("../Drawer/index.cjs.js"),L=require("../Modal/index.cjs.js"),O=require("../Spinner/index.cjs.js");function Q({as:w,variant:y,color:u,size:h,loading:C,stopPropagation:v=!1,preventDefault:q=!1,closeModal:k=!1,closeDrawer:M=!1,className:j,onClick:b,children:z,disabled:R,...N}){const t=H(e=>e.button),n=r.useContext(J.ButtonGroupContext),D=r.useContext(L.ModalContext),$=r.useContext(K.DrawerContext),B=I(),G=w||"button",c=y??n.variant??"solid",i=r.useMemo(()=>u!==void 0?u:n.color!==void 0?n.color:"primary",[u,n.color]),a=h??n.size??"md",d=C??n.loading??!1,s=r.useMemo(()=>{var p,x,g;if(!i)return"border-transparent";const e={primary:{solid:"bg-primary text-white border-primary",outline:"bg-transparent text-primary border-primary",text:"bg-transparent text-primary border-transparent"},secondary:{solid:"bg-secondary text-white border-secondary",outline:"bg-transparent text-secondary border-secondary",text:"bg-transparent text-secondary border-transparent"},success:{solid:"bg-success text-white border-success",outline:"bg-transparent text-success border-success",text:"bg-transparent text-success border-transparent"},info:{solid:"bg-info text-white border-info",outline:"bg-transparent text-info border-info",text:"bg-transparent text-info border-transparent"},warning:{solid:"bg-warning text-white border-warning",outline:"bg-transparent text-warning border-warning",text:"bg-transparent text-warning border-transparent"},danger:{solid:"bg-danger text-white border-danger",outline:"bg-transparent text-danger border-danger",text:"bg-transparent text-danger border-transparent"},dark:{solid:"bg-dark text-white border-dark",outline:"bg-transparent text-dark border-dark",text:"bg-transparent text-dark border-transparent"},light:{solid:"bg-light text-dark border-light",outline:"bg-transparent text-dark border-light",text:"bg-transparent text-dark border-transparent"}},o=(x=(p=t==null?void 0:t.color)==null?void 0:p[i])==null?void 0:x[c],F=(g=e==null?void 0:e[i])==null?void 0:g[c];return f.twMerge(F,o)},[i,c,t==null?void 0:t.color]),P=r.useMemo(()=>s==null?void 0:s.split(" ").find(e=>e.startsWith("text-")),[s]),W=r.useMemo(()=>{var o;if(!a)return null;const e={sm:"text-base py-1 px-3.5",md:"text-base py-1.5 px-4",lg:"text-lg py-2 px-6"};return[e==null?void 0:e[a],(o=t==null?void 0:t.size)==null?void 0:o[a]]},[a,t==null?void 0:t.size]),A=r.useMemo(()=>{var e,o;return d?m("disabled:opacity-100 disabled:cursor-wait disabled:text-transparent",(e=t==null?void 0:t.loading)==null?void 0:e.active):m("disabled:opacity-75 disabled:cursor-not-allowed",(o=t==null?void 0:t.loading)==null?void 0:o.inactive)},[d,t==null?void 0:t.loading]),E=e=>{B(e),k&&D.onClose(),M&&$.onClose(),v&&e.stopPropagation(),q&&e.preventDefault(),b==null||b(e)};return l.jsxs(G,{className:f.twMerge("relative inline-block no-underline whitespace-nowrap font-medium text-center rounded border border-[#e8eaee] cursor-pointer transition-[box-shadow,opacity,color,background-color,border-color]",t==null?void 0:t.base,s,W,A,n.buttonClasses,j),onClick:E,disabled:R||d,...N,children:[z,d&&l.jsx("span",{className:"absolute inset-0 size-full flex items-center justify-center bg-transparent p-2",children:l.jsx(O,{size:a,color:null,className:P})}),l.jsx("span",{className:"ripple-group absolute size-full inset-0 overflow-hidden rounded-[inherit] pointer-events-none"})]})}module.exports=Q;
@@ -1,32 +1,32 @@
1
1
  "use client";
2
- import { j as l } from "../../_virtual/jsx-runtime.es.js";
3
- import { useContext as x, useMemo as i } from "react";
2
+ import { jsxs as I, jsx as u } from "react/jsx-runtime";
3
+ import { useContext as c, useMemo as i } from "react";
4
4
  import { twMerge as f } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
5
5
  import w from "../../helpers/cn.es.js";
6
- import I from "../../hooks/useClasses.es.js";
7
- import J from "../../hooks/useCreateRipple.es.js";
8
- import { ButtonGroupContext as K } from "../ButtonGroup/index.es.js";
9
- import { DrawerContext as L } from "../Drawer/index.es.js";
10
- import { ModalContext as O } from "../Modal/index.es.js";
11
- import Q from "../Spinner/index.es.js";
12
- function et({
6
+ import J from "../../hooks/useClasses.es.js";
7
+ import K from "../../hooks/useCreateRipple.es.js";
8
+ import { ButtonGroupContext as L } from "../ButtonGroup/index.es.js";
9
+ import { DrawerContext as O } from "../Drawer/index.es.js";
10
+ import { ModalContext as Q } from "../Modal/index.es.js";
11
+ import T from "../Spinner/index.es.js";
12
+ function nt({
13
13
  as: y,
14
14
  variant: h,
15
- color: p,
15
+ color: l,
16
16
  size: v,
17
17
  loading: C,
18
18
  stopPropagation: k = !1,
19
- preventDefault: j = !1,
20
- closeModal: z = !1,
19
+ preventDefault: z = !1,
20
+ closeModal: N = !1,
21
21
  closeDrawer: R = !1,
22
- className: N,
23
- onClick: b,
22
+ className: j,
23
+ onClick: p,
24
24
  children: D,
25
25
  disabled: M,
26
26
  ...B
27
27
  }) {
28
- const t = I((r) => r.button), e = x(K), G = x(O), E = x(L), P = J(), S = y || "button", u = h ?? e.variant ?? "solid", s = i(() => p !== void 0 ? p : e.color !== void 0 ? e.color : "primary", [p, e.color]), o = v ?? e.size ?? "md", d = C ?? e.loading ?? !1, a = i(() => {
29
- var c, g, m;
28
+ const t = J((r) => r.button), e = c(L), G = c(Q), P = c(O), S = K(), W = y || "button", b = h ?? e.variant ?? "solid", s = i(() => l !== void 0 ? l : e.color !== void 0 ? e.color : "primary", [l, e.color]), o = v ?? e.size ?? "md", d = C ?? e.loading ?? !1, a = i(() => {
29
+ var g, x, m;
30
30
  if (!s) return "border-transparent";
31
31
  const r = {
32
32
  primary: {
@@ -69,9 +69,9 @@ function et({
69
69
  outline: "bg-transparent text-dark border-light",
70
70
  text: "bg-transparent text-dark border-transparent"
71
71
  }
72
- }, n = (g = (c = t == null ? void 0 : t.color) == null ? void 0 : c[s]) == null ? void 0 : g[u], H = (m = r == null ? void 0 : r[s]) == null ? void 0 : m[u];
72
+ }, n = (x = (g = t == null ? void 0 : t.color) == null ? void 0 : g[s]) == null ? void 0 : x[b], H = (m = r == null ? void 0 : r[s]) == null ? void 0 : m[b];
73
73
  return f(H, n);
74
- }, [s, u, t == null ? void 0 : t.color]), W = i(() => a == null ? void 0 : a.split(" ").find((r) => r.startsWith("text-")), [a]), q = i(() => {
74
+ }, [s, b, t == null ? void 0 : t.color]), q = i(() => a == null ? void 0 : a.split(" ").find((r) => r.startsWith("text-")), [a]), A = i(() => {
75
75
  var n;
76
76
  if (!o) return null;
77
77
  const r = {
@@ -80,7 +80,7 @@ function et({
80
80
  lg: "text-lg py-2 px-6"
81
81
  };
82
82
  return [r == null ? void 0 : r[o], (n = t == null ? void 0 : t.size) == null ? void 0 : n[o]];
83
- }, [o, t == null ? void 0 : t.size]), A = i(() => {
83
+ }, [o, t == null ? void 0 : t.size]), E = i(() => {
84
84
  var r, n;
85
85
  return d ? w(
86
86
  "disabled:opacity-100 disabled:cursor-wait disabled:text-transparent",
@@ -90,10 +90,10 @@ function et({
90
90
  (n = t == null ? void 0 : t.loading) == null ? void 0 : n.inactive
91
91
  );
92
92
  }, [d, t == null ? void 0 : t.loading]), F = (r) => {
93
- P(r), z && G.onClose(), R && E.onClose(), k && r.stopPropagation(), j && r.preventDefault(), b == null || b(r);
93
+ S(r), N && G.onClose(), R && P.onClose(), k && r.stopPropagation(), z && r.preventDefault(), p == null || p(r);
94
94
  };
95
- return /* @__PURE__ */ l.jsxs(
96
- S,
95
+ return /* @__PURE__ */ I(
96
+ W,
97
97
  {
98
98
  className: f(
99
99
  "relative inline-block no-underline whitespace-nowrap font-medium text-center rounded border border-[#e8eaee] cursor-pointer transition-[box-shadow,opacity,color,background-color,border-color]",
@@ -104,22 +104,22 @@ function et({
104
104
  // color ? "ring-2 ring-offset-2 ring-transparent" : null,
105
105
  t == null ? void 0 : t.base,
106
106
  a,
107
- q,
108
107
  A,
108
+ E,
109
109
  e.buttonClasses,
110
- N
110
+ j
111
111
  ),
112
112
  onClick: F,
113
113
  disabled: M || d,
114
114
  ...B,
115
115
  children: [
116
116
  D,
117
- d && /* @__PURE__ */ l.jsx("span", { className: "absolute inset-0 size-full flex items-center justify-center bg-transparent p-2", children: /* @__PURE__ */ l.jsx(Q, { size: o, color: null, className: W }) }),
118
- /* @__PURE__ */ l.jsx("span", { className: "ripple-group absolute size-full inset-0 overflow-hidden rounded-[inherit] pointer-events-none" })
117
+ d && /* @__PURE__ */ u("span", { className: "absolute inset-0 size-full flex items-center justify-center bg-transparent p-2", children: /* @__PURE__ */ u(T, { size: o, color: null, className: q }) }),
118
+ /* @__PURE__ */ u("span", { className: "ripple-group absolute size-full inset-0 overflow-hidden rounded-[inherit] pointer-events-none" })
119
119
  ]
120
120
  }
121
121
  );
122
122
  }
123
123
  export {
124
- et as default
124
+ nt as default
125
125
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../../_virtual/jsx-runtime.cjs.js"),M=require("../../helpers/cn.cjs.js"),r=require("react"),R=require("../../hooks/useClasses.cjs.js"),h=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),G=require("../Tabs/index.cjs.js"),c=r.createContext({});function g({as:d,variant:l,color:a,size:x,loading:f,orientation:e="horizontal",className:p,children:b,...C}){const m=d||"div",t=R(o=>o.buttonGroup),{buttonGroupClasses:j}=r.useContext(G.TabsContext),v=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.jsxRuntimeExports.jsx(m,{className:h.twMerge("w-fit flex items-stretch justify-center",t==null?void 0:t.base,v,j,p),...C,children:i.jsxRuntimeExports.jsx(c.Provider,{value:{variant:l,color:a,size:x,loading:f,buttonClasses:q},children:b})})}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,40 +1,40 @@
1
1
  "use client";
2
- import { j as i } from "../../_virtual/jsx-runtime.es.js";
3
- import y from "../../helpers/cn.es.js";
4
- import { createContext as G, useContext as w, useMemo as s } from "react";
5
- import z from "../../hooks/useClasses.es.js";
6
- import { twMerge as R } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
- import { TabsContext as B } from "../Tabs/index.es.js";
8
- const M = G({});
9
- function q({
2
+ import { jsx as i } from "react/jsx-runtime";
3
+ import G from "../../helpers/cn.es.js";
4
+ import w from "../../hooks/useClasses.es.js";
5
+ import { createContext as z, useContext as j, useMemo as s } from "react";
6
+ import { twMerge as B } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
7
+ import { TabsContext as M } from "../Tabs/index.es.js";
8
+ const R = z({});
9
+ function A({
10
10
  as: f,
11
- variant: m,
12
- color: p,
13
- size: d,
11
+ variant: d,
12
+ color: m,
13
+ size: p,
14
14
  loading: a,
15
15
  orientation: o = "horizontal",
16
16
  className: l,
17
17
  children: c,
18
18
  ...x
19
19
  }) {
20
- const C = f || "div", t = z((n) => n.buttonGroup), { buttonGroupClasses: b } = w(B), 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",
24
24
  vertical: "flex-col"
25
25
  }[o], (e = t == null ? void 0 : t.orientation) == null ? void 0 : e[o]];
26
- }, [o, t == null ? void 0 : t.orientation]), j = s(() => {
26
+ }, [o, t == null ? void 0 : t.orientation]), v = s(() => {
27
27
  var r, u;
28
28
  const n = {
29
29
  horizontal: "rounded-none first-of-type:rounded-s last-of-type:rounded-e",
30
30
  vertical: "rounded-none first-of-type:rounded-t last-of-type:rounded-b"
31
- }, e = (u = (r = t == null ? void 0 : t.button) == null ? void 0 : r.orientation) == null ? void 0 : u[o], v = n[o];
32
- return y(v, e);
31
+ }, e = (u = (r = t == null ? void 0 : t.button) == null ? void 0 : r.orientation) == null ? void 0 : u[o], y = n[o];
32
+ return G(y, e);
33
33
  }, [o, t == null ? void 0 : t.button]);
34
- return /* @__PURE__ */ i.jsx(
34
+ return /* @__PURE__ */ i(
35
35
  C,
36
36
  {
37
- className: R(
37
+ className: B(
38
38
  "w-fit flex items-stretch justify-center",
39
39
  t == null ? void 0 : t.base,
40
40
  h,
@@ -42,10 +42,10 @@ function q({
42
42
  l
43
43
  ),
44
44
  ...x,
45
- children: /* @__PURE__ */ i.jsx(
46
- M.Provider,
45
+ children: /* @__PURE__ */ i(
46
+ R.Provider,
47
47
  {
48
- value: { variant: m, color: p, size: d, loading: a, buttonClasses: j },
48
+ value: { variant: d, color: m, size: p, loading: a, buttonClasses: v },
49
49
  children: c
50
50
  }
51
51
  )
@@ -53,6 +53,6 @@ function q({
53
53
  );
54
54
  }
55
55
  export {
56
- M as ButtonGroupContext,
57
- q as default
56
+ R as ButtonGroupContext,
57
+ A as default
58
58
  };
@@ -1 +1 @@
1
- "use client";"use strict";const a=require("../../_virtual/jsx-runtime.cjs.js");require("react");const n=require("../../hooks/useClasses.cjs.js"),c=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function d({as:e,className:s,children:r,...t}){const o=n(i=>i.card.base),u=e||"div";return a.jsxRuntimeExports.jsx(u,{className:c.twMerge("block w-full bg-white rounded shadow",o,s),...t,children:r})}function l({className:e,children:s,...r}){const t=n(o=>o.card.header.base);return a.jsxRuntimeExports.jsx("div",{className:c.twMerge("w-full border-b border-[#e8eaee] p-4",t,e),...r,children:s})}function x({className:e,children:s,...r}){const t=n(o=>o.card.body.base);return a.jsxRuntimeExports.jsx("div",{className:c.twMerge("w-full p-4",t,e),...r,children:s})}function b({className:e,children:s,...r}){const t=n(o=>o.card.footer.base);return a.jsxRuntimeExports.jsx("div",{className:c.twMerge("w-full border-t border-[#e8eaee] p-4",t,e),...r,children:s})}d.Header=l;d.Body=x;d.Footer=b;module.exports=d;
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;