reaxify 0.0.74 → 0.0.76
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.
- package/dist/axios/AxiosProvider.cjs.js +1 -1
- package/dist/axios/AxiosProvider.es.js +14 -14
- package/dist/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.es.js +32 -32
- package/dist/components/Badge/index.cjs.js +1 -1
- package/dist/components/Badge/index.es.js +2 -2
- package/dist/components/Button/index.cjs.js +1 -1
- package/dist/components/Button/index.es.js +27 -27
- package/dist/components/ButtonGroup/index.cjs.js +1 -1
- package/dist/components/ButtonGroup/index.es.js +22 -22
- package/dist/components/Card/index.cjs.js +1 -1
- package/dist/components/Card/index.es.js +28 -28
- package/dist/components/Drawer/index.cjs.js +1 -1
- package/dist/components/Drawer/index.es.js +33 -33
- package/dist/components/InputGroup/index.cjs.js +1 -1
- package/dist/components/InputGroup/index.es.js +26 -26
- package/dist/components/Menu/index.cjs.js +1 -1
- package/dist/components/Menu/index.es.js +77 -77
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.es.js +39 -39
- package/dist/components/Progress/index.cjs.js +1 -1
- package/dist/components/Progress/index.es.js +18 -18
- package/dist/components/Skeleton/index.cjs.js +1 -1
- package/dist/components/Skeleton/index.es.js +4 -4
- package/dist/components/Spacer/index.cjs.js +1 -1
- package/dist/components/Spacer/index.es.js +4 -4
- package/dist/components/Spinner/index.cjs.js +1 -1
- package/dist/components/Spinner/index.es.js +11 -11
- package/dist/components/Stack/index.cjs.js +1 -1
- package/dist/components/Stack/index.es.js +11 -11
- package/dist/components/Switch/index.cjs.js +1 -1
- package/dist/components/Switch/index.es.js +33 -33
- package/dist/components/Table/index.cjs.js +1 -1
- package/dist/components/Table/index.es.js +25 -25
- package/dist/components/Tabs/index.cjs.js +1 -1
- package/dist/components/Tabs/index.es.js +30 -30
- package/dist/components/Tooltip/index.cjs.js +1 -1
- package/dist/components/Tooltip/index.es.js +47 -47
- package/dist/components/Typography/index.cjs.js +1 -1
- package/dist/components/Typography/index.es.js +8 -8
- package/dist/helpers/isEmpty.d.ts +5 -5
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.cjs.js +1 -1
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.es.js +1 -1
- package/dist/providers/ThemeProvider.cjs.js +1 -1
- package/dist/providers/ThemeProvider.es.js +4 -4
- package/dist/reaxify.css +1 -1
- package/package.json +15 -10
- package/dist/_virtual/jsx-runtime.cjs.js +0 -1
- package/dist/_virtual/jsx-runtime.cjs2.js +0 -1
- package/dist/_virtual/jsx-runtime.es.js +0 -6
- package/dist/_virtual/jsx-runtime.es2.js +0 -5
- package/dist/_virtual/react-jsx-runtime.development.cjs.js +0 -1
- package/dist/_virtual/react-jsx-runtime.development.es.js +0 -5
- package/dist/_virtual/react-jsx-runtime.production.cjs.js +0 -1
- package/dist/_virtual/react-jsx-runtime.production.es.js +0 -5
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.js +0 -14
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +0 -248
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.cjs.js +0 -9
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.es.js +0 -36
- package/dist/node_modules/react/jsx-runtime.cjs.js +0 -1
- 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("
|
|
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 {
|
|
3
|
-
import { createContext as
|
|
4
|
-
const
|
|
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:
|
|
20
|
-
afterResponse:
|
|
21
|
-
afterError:
|
|
22
|
-
retry:
|
|
19
|
+
beforeRequest: n = [],
|
|
20
|
+
afterResponse: s = [],
|
|
21
|
+
afterError: l = [],
|
|
22
|
+
retry: a = null,
|
|
23
23
|
children: f
|
|
24
24
|
}) {
|
|
25
|
-
return /* @__PURE__ */ u
|
|
26
|
-
|
|
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:
|
|
33
|
-
afterResponse:
|
|
34
|
-
afterError:
|
|
32
|
+
beforeRequest: n,
|
|
33
|
+
afterResponse: s,
|
|
34
|
+
afterError: l,
|
|
35
35
|
beforeRetry: o,
|
|
36
|
-
retry:
|
|
36
|
+
retry: a
|
|
37
37
|
},
|
|
38
38
|
children: f
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
i as AxiosContext,
|
|
44
44
|
p as default
|
|
45
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const a=require("
|
|
1
|
+
"use client";"use strict";const a=require("react/jsx-runtime"),r=require("react"),l=require("../../hooks/useClasses.cjs.js"),C=require("../../node_modules/react-animate-height/dist/esm/index.cjs.js"),d=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),b=require("../../helpers/randomID.cjs.js"),h=require("../../node_modules/iconsax-react/dist/esm/ArrowDown2.cjs.js"),f=r.createContext({activeKey:null,onChange:()=>{}}),g=r.createContext({active:!1,eventKey:null});function u({activeKey:t=null,onChange:n=()=>{},children:e}){return a.jsx(f.Provider,{value:{activeKey:t,onChange:n},children:e})}function p({as:t,eventKey:n=null,className:e,children:o,...i}){const x=l(y=>y.accordion.item.base),{activeKey:s}=r.useContext(f),m=t||"div",v=r.useMemo(()=>b(),[]),c=n||v,A=r.useMemo(()=>Array.isArray(s)?s.includes(c):c===s,[s,c]);return a.jsx(m,{className:d.twMerge("block w-full border border-[#e8eaee] rounded",x,e),...i,children:a.jsx(g.Provider,{value:{eventKey:c,active:A},children:o})})}function w({type:t,className:n,children:e,onClick:o,...i}){const x=l(c=>c.accordion.toggle.base),{eventKey:s}=r.useContext(g),{onChange:m}=r.useContext(f),v=c=>{s&&m(s),o==null||o(c)};return a.jsx("button",{type:t,className:d.twMerge("w-full flex items-center text-start text-base px-5 py-4 rounded-t cursor-pointer",x,n),onClick:v,...i,children:e})}function j({className:t,...n}){const e=l(i=>i.accordion.icon),{active:o}=r.useContext(g);return a.jsx(h,{color:"currentColor",className:d.twMerge("size-5 transition-transform",e==null?void 0:e.base,o?"-rotate-180":"rotate-0",o?e==null?void 0:e.active:e==null?void 0:e.inactive,t),...n})}function q({duration:t=300,children:n}){const{active:e}=r.useContext(g);return a.jsx(C,{duration:t,height:e?"auto":0,className:"w-full",animationStateClasses:{animating:"",animatingUp:"",animatingDown:"",static:"",animatingToHeightZero:"",animatingToHeightAuto:"",animatingToHeightSpecific:"",staticHeightZero:"",staticHeightAuto:"",staticHeightSpecific:""},children:n})}function I({className:t,children:n,...e}){const o=l(i=>i.accordion.body.base);return a.jsx("div",{className:d.twMerge("w-full block px-5 py-4 rounded-b",o,t),...e,children:n})}u.Item=p;u.Toggle=w;u.Icon=j;u.Collapse=q;u.Body=I;module.exports=u;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { createContext as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as h, useContext as s, useMemo as y } from "react";
|
|
4
|
+
import u from "../../hooks/useClasses.es.js";
|
|
5
|
+
import x from "../../node_modules/react-animate-height/dist/esm/index.es.js";
|
|
6
6
|
import { twMerge as m } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
7
7
|
import C from "../../helpers/randomID.es.js";
|
|
8
|
-
import
|
|
9
|
-
const
|
|
8
|
+
import w from "../../node_modules/iconsax-react/dist/esm/ArrowDown2.es.js";
|
|
9
|
+
const v = h({
|
|
10
10
|
activeKey: null,
|
|
11
11
|
onChange: () => {
|
|
12
12
|
}
|
|
13
|
-
}), d =
|
|
13
|
+
}), d = h({
|
|
14
14
|
active: !1,
|
|
15
15
|
eventKey: null
|
|
16
16
|
});
|
|
17
|
-
function
|
|
17
|
+
function l({
|
|
18
18
|
activeKey: o = null,
|
|
19
19
|
onChange: e = () => {
|
|
20
20
|
},
|
|
21
21
|
children: t
|
|
22
22
|
}) {
|
|
23
|
-
return /* @__PURE__ */ a
|
|
23
|
+
return /* @__PURE__ */ a(v.Provider, { value: { activeKey: o, onChange: e }, children: t });
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function H({
|
|
26
26
|
as: o,
|
|
27
27
|
eventKey: e = null,
|
|
28
28
|
className: t,
|
|
29
29
|
children: n,
|
|
30
30
|
...i
|
|
31
31
|
}) {
|
|
32
|
-
const f =
|
|
33
|
-
return /* @__PURE__ */ a
|
|
32
|
+
const f = u((A) => A.accordion.item.base), { activeKey: c } = s(v), g = o || "div", p = y(() => C(), []), r = e || p, b = y(() => Array.isArray(c) ? c.includes(r) : r === c, [c, r]);
|
|
33
|
+
return /* @__PURE__ */ a(
|
|
34
34
|
g,
|
|
35
35
|
{
|
|
36
36
|
className: m(
|
|
@@ -39,21 +39,21 @@ function w({
|
|
|
39
39
|
t
|
|
40
40
|
),
|
|
41
41
|
...i,
|
|
42
|
-
children: /* @__PURE__ */ a
|
|
42
|
+
children: /* @__PURE__ */ a(d.Provider, { value: { eventKey: r, active: b }, children: n })
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function I({
|
|
47
47
|
type: o,
|
|
48
48
|
className: e,
|
|
49
49
|
children: t,
|
|
50
50
|
onClick: n,
|
|
51
51
|
...i
|
|
52
52
|
}) {
|
|
53
|
-
const f =
|
|
53
|
+
const f = u((r) => r.accordion.toggle.base), { eventKey: c } = s(d), { onChange: g } = s(v), p = (r) => {
|
|
54
54
|
c && g(c), n == null || n(r);
|
|
55
55
|
};
|
|
56
|
-
return /* @__PURE__ */ a
|
|
56
|
+
return /* @__PURE__ */ a(
|
|
57
57
|
"button",
|
|
58
58
|
{
|
|
59
59
|
type: o,
|
|
@@ -68,13 +68,13 @@ function H({
|
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function K({
|
|
72
72
|
className: o,
|
|
73
73
|
...e
|
|
74
74
|
}) {
|
|
75
|
-
const t =
|
|
76
|
-
return /* @__PURE__ */ a
|
|
77
|
-
|
|
75
|
+
const t = u((i) => i.accordion.icon), { active: n } = s(d);
|
|
76
|
+
return /* @__PURE__ */ a(
|
|
77
|
+
w,
|
|
78
78
|
{
|
|
79
79
|
color: "currentColor",
|
|
80
80
|
className: m(
|
|
@@ -88,13 +88,13 @@ function I({
|
|
|
88
88
|
}
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function N({
|
|
92
92
|
duration: o = 300,
|
|
93
93
|
children: e
|
|
94
94
|
}) {
|
|
95
95
|
const { active: t } = s(d);
|
|
96
|
-
return /* @__PURE__ */ a
|
|
97
|
-
|
|
96
|
+
return /* @__PURE__ */ a(
|
|
97
|
+
x,
|
|
98
98
|
{
|
|
99
99
|
duration: o,
|
|
100
100
|
height: t ? "auto" : 0,
|
|
@@ -115,13 +115,13 @@ function K({
|
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function T({
|
|
119
119
|
className: o,
|
|
120
120
|
children: e,
|
|
121
121
|
...t
|
|
122
122
|
}) {
|
|
123
|
-
const n =
|
|
124
|
-
return /* @__PURE__ */ a
|
|
123
|
+
const n = u((i) => i.accordion.body.base);
|
|
124
|
+
return /* @__PURE__ */ a(
|
|
125
125
|
"div",
|
|
126
126
|
{
|
|
127
127
|
className: m(
|
|
@@ -134,11 +134,11 @@ function N({
|
|
|
134
134
|
}
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
l.Item = H;
|
|
138
|
+
l.Toggle = I;
|
|
139
|
+
l.Icon = K;
|
|
140
|
+
l.Collapse = N;
|
|
141
|
+
l.Body = T;
|
|
142
142
|
export {
|
|
143
|
-
|
|
143
|
+
l as default
|
|
144
144
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const w=require("
|
|
1
|
+
"use client";"use strict";const w=require("react/jsx-runtime"),a=require("../../helpers/cn.cjs.js"),u=require("react"),h=require("../../hooks/useClasses.cjs.js"),k=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function q({as:x,variant:i="solid",color:n=null,size:s="md",className:c,children:l,...p}){const e=h(r=>r.badge),m=x||"span",f=u.useMemo(()=>{var t,b,g;if(!n)return"border-transparent";const r={primary:{solid:"bg-primary text-white border-primary",outline:"bg-transparent text-primary border-primary",soft:"bg-primary/10 text-primary border-primary/10"},secondary:{solid:"bg-secondary text-white border-secondary",outline:"bg-transparent text-secondary border-secondary",soft:"bg-secondary/10 text-secondary border-secondary/10"},success:{solid:"bg-success text-white border-success",outline:"bg-transparent text-success border-success",soft:"bg-success/10 text-success border-success/10"},info:{solid:"bg-info text-white border-info",outline:"bg-transparent text-info border-info",soft:"bg-info/10 text-info border-info/10"},warning:{solid:"bg-warning text-white border-warning",outline:"bg-transparent text-warning border-warning",soft:"bg-warning/10 text-warning border-warning/10"},danger:{solid:"bg-danger text-white border-danger",outline:"bg-transparent text-danger border-danger",soft:"bg-danger/10 text-danger border-danger/10"},dark:{solid:"bg-dark text-white border-dark",outline:"bg-transparent text-dark border-dark",soft:"bg-dark/10 text-dark border-dark/10"},light:{solid:"bg-light text-dark border-light",outline:"bg-transparent text-dark border-light",soft:"bg-light/10 text-dark border-light/10"}},o=(t=r==null?void 0:r[n])==null?void 0:t[i],d=(g=(b=e==null?void 0:e.color)==null?void 0:b[n])==null?void 0:g[i];return[o,d]},[n,i,e==null?void 0:e.color]),y=u.useMemo(()=>{var o,d,t;if(!s)return null;const r={sm:a("text-xs py-0.5 px-1.5",(o=e==null?void 0:e.size)==null?void 0:o.sm),md:a("text-sm py-[0.1875rem] px-2",(d=e==null?void 0:e.size)==null?void 0:d.md),lg:a("text-base py-1 px-3",(t=e==null?void 0:e.size)==null?void 0:t.lg)};return r==null?void 0:r[s]},[s,e==null?void 0:e.size]);return w.jsx(m,{className:k.twMerge("inline-flex border border-[#e8eaee] items-center text-center font-medium align-middle whitespace-nowrap rounded",e==null?void 0:e.base,f,y,c),...p,children:l})}module.exports=q;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
3
3
|
import s from "../../helpers/cn.es.js";
|
|
4
4
|
import { useMemo as x } from "react";
|
|
5
5
|
import h from "../../hooks/useClasses.es.js";
|
|
@@ -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
|
|
72
|
+
return /* @__PURE__ */ w(
|
|
73
73
|
c,
|
|
74
74
|
{
|
|
75
75
|
className: k(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
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 {
|
|
3
|
-
import { useContext as
|
|
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
|
|
7
|
-
import
|
|
8
|
-
import { ButtonGroupContext as
|
|
9
|
-
import { DrawerContext as
|
|
10
|
-
import { ModalContext as
|
|
11
|
-
import
|
|
12
|
-
function
|
|
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:
|
|
15
|
+
color: l,
|
|
16
16
|
size: v,
|
|
17
17
|
loading: C,
|
|
18
18
|
stopPropagation: k = !1,
|
|
19
|
-
preventDefault:
|
|
20
|
-
closeModal:
|
|
19
|
+
preventDefault: z = !1,
|
|
20
|
+
closeModal: N = !1,
|
|
21
21
|
closeDrawer: R = !1,
|
|
22
|
-
className:
|
|
23
|
-
onClick:
|
|
22
|
+
className: j,
|
|
23
|
+
onClick: p,
|
|
24
24
|
children: D,
|
|
25
25
|
disabled: M,
|
|
26
26
|
...B
|
|
27
27
|
}) {
|
|
28
|
-
const t =
|
|
29
|
-
var
|
|
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 = (
|
|
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,
|
|
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]),
|
|
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
|
-
|
|
93
|
+
S(r), N && G.onClose(), R && P.onClose(), k && r.stopPropagation(), z && r.preventDefault(), p == null || p(r);
|
|
94
94
|
};
|
|
95
|
-
return /* @__PURE__ */
|
|
96
|
-
|
|
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
|
-
|
|
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__ */
|
|
118
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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("
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),M=require("../../helpers/cn.cjs.js"),r=require("react"),h=require("../../hooks/useClasses.cjs.js"),G=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),R=require("../Tabs/index.cjs.js"),c=r.createContext({});function g({as:d,variant:l,color:a,size:f,loading:x,orientation:e="horizontal",className:b,children:p,...C}){const m=d||"div",t=h(o=>o.buttonGroup),{buttonGroupClasses:v}=r.useContext(R.TabsContext),j=r.useMemo(()=>{var n;return[{horizontal:"flex-row",vertical:"flex-col"}[e],(n=t==null?void 0:t.orientation)==null?void 0:n[e]]},[e,t==null?void 0:t.orientation]),q=r.useMemo(()=>{var u,s;const o={horizontal:"rounded-none first-of-type:rounded-s last-of-type:rounded-e",vertical:"rounded-none first-of-type:rounded-t last-of-type:rounded-b"},n=(s=(u=t==null?void 0:t.button)==null?void 0:u.orientation)==null?void 0:s[e],y=o[e];return M(y,n)},[e,t==null?void 0:t.button]);return i.jsx(m,{className:G.twMerge("w-fit flex items-stretch justify-center",t==null?void 0:t.base,j,v,b),...C,children:i.jsx(c.Provider,{value:{variant:l,color:a,size:f,loading:x,buttonClasses:q},children:p})})}exports.ButtonGroupContext=c;exports.default=g;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { createContext as
|
|
5
|
-
import
|
|
6
|
-
import { twMerge as
|
|
7
|
-
import { TabsContext as
|
|
8
|
-
const
|
|
9
|
-
function
|
|
2
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import G from "../../helpers/cn.es.js";
|
|
4
|
+
import { createContext as w, useContext as z, useMemo as s } from "react";
|
|
5
|
+
import j from "../../hooks/useClasses.es.js";
|
|
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 = w({});
|
|
9
|
+
function A({
|
|
10
10
|
as: f,
|
|
11
|
-
variant:
|
|
12
|
-
color:
|
|
13
|
-
size:
|
|
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 =
|
|
20
|
+
const C = f || "div", t = j((n) => n.buttonGroup), { buttonGroupClasses: b } = z(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]),
|
|
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],
|
|
32
|
-
return y
|
|
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
|
|
34
|
+
return /* @__PURE__ */ i(
|
|
35
35
|
C,
|
|
36
36
|
{
|
|
37
|
-
className:
|
|
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
|
|
46
|
-
|
|
45
|
+
children: /* @__PURE__ */ i(
|
|
46
|
+
R.Provider,
|
|
47
47
|
{
|
|
48
|
-
value: { variant:
|
|
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
|
-
|
|
57
|
-
|
|
56
|
+
R as ButtonGroupContext,
|
|
57
|
+
A as default
|
|
58
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime");require("react");const c=require("../../hooks/useClasses.cjs.js"),d=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function n({as:e,className:s,children:r,...a}){const o=c(l=>l.card.base),u=e||"div";return t.jsx(u,{className:d.twMerge("block w-full bg-white rounded shadow",o,s),...a,children:r})}function i({className:e,children:s,...r}){const a=c(o=>o.card.header.base);return t.jsx("div",{className:d.twMerge("w-full border-b border-[#e8eaee] p-4",a,e),...r,children:s})}function b({className:e,children:s,...r}){const a=c(o=>o.card.body.base);return t.jsx("div",{className:d.twMerge("w-full p-4",a,e),...r,children:s})}function w({className:e,children:s,...r}){const a=c(o=>o.card.footer.base);return t.jsx("div",{className:d.twMerge("w-full border-t border-[#e8eaee] p-4",a,e),...r,children:s})}n.Header=i;n.Body=b;n.Footer=w;module.exports=n;
|
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import d from "../../hooks/useClasses.es.js";
|
|
5
5
|
import { twMerge as c } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
6
6
|
function n({
|
|
7
7
|
as: e,
|
|
8
|
-
className:
|
|
9
|
-
children:
|
|
10
|
-
...
|
|
8
|
+
className: r,
|
|
9
|
+
children: o,
|
|
10
|
+
...s
|
|
11
11
|
}) {
|
|
12
|
-
const a = d((
|
|
13
|
-
return /* @__PURE__ */ t
|
|
14
|
-
|
|
12
|
+
const a = d((l) => l.card.base);
|
|
13
|
+
return /* @__PURE__ */ t(
|
|
14
|
+
e || "div",
|
|
15
15
|
{
|
|
16
16
|
className: c(
|
|
17
17
|
"block w-full bg-white rounded shadow",
|
|
18
18
|
a,
|
|
19
|
-
|
|
19
|
+
r
|
|
20
20
|
),
|
|
21
|
-
...
|
|
22
|
-
children:
|
|
21
|
+
...s,
|
|
22
|
+
children: o
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
const
|
|
28
|
-
return /* @__PURE__ */ t
|
|
26
|
+
function u({ className: e, children: r, ...o }) {
|
|
27
|
+
const s = d((a) => a.card.header.base);
|
|
28
|
+
return /* @__PURE__ */ t(
|
|
29
29
|
"div",
|
|
30
30
|
{
|
|
31
31
|
className: c(
|
|
32
32
|
"w-full border-b border-[#e8eaee] p-4",
|
|
33
|
-
|
|
33
|
+
s,
|
|
34
34
|
e
|
|
35
35
|
),
|
|
36
|
-
...
|
|
37
|
-
children:
|
|
36
|
+
...o,
|
|
37
|
+
children: r
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
return /* @__PURE__ */ t
|
|
41
|
+
function i({ className: e, children: r, ...o }) {
|
|
42
|
+
const s = d((a) => a.card.body.base);
|
|
43
|
+
return /* @__PURE__ */ t("div", { className: c("w-full p-4", s, e), ...o, children: r });
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
const
|
|
47
|
-
return /* @__PURE__ */ t
|
|
45
|
+
function f({ className: e, children: r, ...o }) {
|
|
46
|
+
const s = d((a) => a.card.footer.base);
|
|
47
|
+
return /* @__PURE__ */ t(
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
50
|
className: c(
|
|
51
51
|
"w-full border-t border-[#e8eaee] p-4",
|
|
52
|
-
|
|
52
|
+
s,
|
|
53
53
|
e
|
|
54
54
|
),
|
|
55
|
-
...
|
|
56
|
-
children:
|
|
55
|
+
...o,
|
|
56
|
+
children: r
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
|
-
n.Header =
|
|
61
|
-
n.Body =
|
|
62
|
-
n.Footer =
|
|
60
|
+
n.Header = u;
|
|
61
|
+
n.Body = i;
|
|
62
|
+
n.Footer = f;
|
|
63
63
|
export {
|
|
64
64
|
n as default
|
|
65
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),i=require("react"),d=require("../../hooks/useClasses.cjs.js"),M=require("../../hooks/useKeyDown.cjs.js"),g=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),b=require("../../helpers/cn.cjs.js"),f=require("../Card/index.cjs.js"),q=require("../Portal/index.cjs.js"),R=require("../../node_modules/react-transition-group/esm/Transition.cjs.js"),h=i.createContext({open:!1,onClose:()=>{},duration:300,anchor:"start",transitionState:"unmounted"});function x({as:n,ref:a,open:r=!1,onClose:e=()=>{},duration:o=300,anchor:u="end",className:w="",children:y,...v}){const t=d(l=>l.drawer),c=i.useRef(null),m=n||"div",j={entering:"active opacity-100 pointer-events-auto",entered:"active opacity-100 pointer-events-auto",exiting:"opacity-0 pointer-events-none",exited:"opacity-0 pointer-events-none",unmounted:""},C=i.useMemo(()=>{var p;const l={start:"flex-row-reverse",end:"flex-row",top:"flex-col-reverse",bottom:"flex-col"},D=(p=t==null?void 0:t.anchor)==null?void 0:p[u];return[l[u],D]},[u,t==null?void 0:t.anchor]);return i.useImperativeHandle(a,()=>c.current),M(e,"Escape",r),s.jsx(q,{children:s.jsx(R.default,{nodeRef:c,in:r,timeout:o,unmountOnExit:!0,children:l=>s.jsxs(m,{ref:c,style:{transitionDuration:`${o}ms`},"data-open":r,className:g.twMerge("fixed size-full inset-0 flex z-10 bg-black/20 backdrop-blur transition-opacity [--drawer-ratio:1] rtl:[--drawer-ratio:-1]",t==null?void 0:t.base,j[l],C,w),...v,children:[s.jsx("button",{type:"button",onClick:()=>e(),className:"absolute inset-0 size-full cursor-default opacity-0"}),s.jsx(h.Provider,{value:{open:r,onClose:e,transitionState:l,duration:o,anchor:u},children:y})]})})})}function N({children:n,className:a="",...r}){const e=d(t=>t.drawer.menu),{anchor:o,duration:u,transitionState:w}=i.useContext(h),y=i.useMemo(()=>{var m;const t={start:"w-[31.875rem] h-full max-w-[92.5%] rounded-e me-auto",end:"w-[31.875rem] h-full max-w-[92.5%] rounded-s ms-auto",top:"w-full h-[31.875rem] max-h-[92.5%] rounded-b mb-auto",bottom:"w-full h-[31.875rem] max-h-[92.5%] rounded-t mt-auto"},c=(m=e==null?void 0:e.anchor)==null?void 0:m[o];return[t[o],c]},[o,e==null?void 0:e.anchor]),v=i.useMemo(()=>({start:{entering:"translate-x-0",entered:"translate-x-0",exiting:"-translate-x-[calc(100%*var(--drawer-ratio))]",exited:"-translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},end:{entering:"translate-x-0",entered:"translate-x-0",exiting:"translate-x-[calc(100%*var(--drawer-ratio))]",exited:"translate-x-[calc(100%*var(--drawer-ratio))]",unmounted:""},top:{entering:"translate-y-0",entered:"translate-y-0",exiting:"-translate-y-full",exited:"-translate-y-full",unmounted:""},bottom:{entering:"translate-y-0",entered:"translate-y-0",exiting:"translate-y-full",exited:"translate-y-full",unmounted:""}})[o],[o]);return s.jsx(f,{as:"div",style:{transitionDuration:`${u}ms`},className:g.twMerge("relative flex flex-col transition-[translate,width] rounded-none",e==null?void 0:e.base,v[w],y,a),...r,children:n})}function S({className:n,...a}){const r=d(e=>e.drawer.header.base);return s.jsx(f.Header,{className:b(r,n),...a})}function H({className:n,...a}){const r=d(e=>e.drawer.body.base);return s.jsx(f.Body,{className:b("flex-1 overflow-auto",r,n),...a})}function k({className:n,...a}){const r=d(e=>e.drawer.footer.base);return s.jsx(f.Footer,{className:b(r,n),...a})}x.Menu=N;x.Header=S;x.Body=H;x.Footer=k;exports.DrawerContext=h;exports.default=x;
|