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,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as a, jsxs as C } from "react/jsx-runtime";
|
|
3
3
|
import y from "../../helpers/cn.es.js";
|
|
4
|
-
import { createContext as
|
|
4
|
+
import { createContext as M, useRef as w, useImperativeHandle as N, useContext as h, useMemo as D } from "react";
|
|
5
5
|
import l from "../../hooks/useClasses.es.js";
|
|
6
|
-
import
|
|
6
|
+
import H from "../../hooks/useKeyDown.es.js";
|
|
7
7
|
import { twMerge as b } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
8
8
|
import d from "../Card/index.es.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const v =
|
|
9
|
+
import S from "../Portal/index.es.js";
|
|
10
|
+
import k from "../../node_modules/react-transition-group/esm/Transition.es.js";
|
|
11
|
+
const v = M({
|
|
12
12
|
size: "md",
|
|
13
13
|
open: !1,
|
|
14
14
|
onClose: () => {
|
|
@@ -21,69 +21,69 @@ function u({
|
|
|
21
21
|
ref: o,
|
|
22
22
|
size: n = "md",
|
|
23
23
|
open: e = !1,
|
|
24
|
-
onClose:
|
|
24
|
+
onClose: i = () => {
|
|
25
25
|
},
|
|
26
26
|
duration: r = 300,
|
|
27
27
|
className: p,
|
|
28
|
-
children:
|
|
29
|
-
...
|
|
28
|
+
children: f,
|
|
29
|
+
...x
|
|
30
30
|
}) {
|
|
31
|
-
const m = l((c) => c.modal.base),
|
|
31
|
+
const m = l((c) => c.modal.base), s = w(null), g = t || "div", z = {
|
|
32
32
|
entering: "active opacity-100 pointer-events-auto",
|
|
33
33
|
entered: "active opacity-100 pointer-events-auto",
|
|
34
34
|
exiting: "opacity-0 pointer-events-none",
|
|
35
35
|
exited: "opacity-0 pointer-events-none",
|
|
36
36
|
unmounted: ""
|
|
37
37
|
};
|
|
38
|
-
return
|
|
39
|
-
|
|
38
|
+
return N(o, () => s.current), H(i, "Escape", e), /* @__PURE__ */ a(S, { children: /* @__PURE__ */ a(k, { nodeRef: s, in: e, timeout: r, unmountOnExit: !0, children: (c) => /* @__PURE__ */ C(
|
|
39
|
+
g,
|
|
40
40
|
{
|
|
41
|
-
ref:
|
|
41
|
+
ref: s,
|
|
42
42
|
"data-open": e,
|
|
43
43
|
style: { transitionDuration: `${r}ms` },
|
|
44
44
|
className: b(
|
|
45
45
|
"modal fixed size-full inset-0 flex flex-col z-10 bg-black/20 transition-opacity backdrop-blur p-4",
|
|
46
46
|
m,
|
|
47
|
-
|
|
47
|
+
z[c],
|
|
48
48
|
p
|
|
49
49
|
),
|
|
50
|
-
...
|
|
50
|
+
...x,
|
|
51
51
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ a(
|
|
53
53
|
"button",
|
|
54
54
|
{
|
|
55
55
|
type: "button",
|
|
56
|
-
onClick: () =>
|
|
56
|
+
onClick: () => i(),
|
|
57
57
|
className: "absolute inset-0 cursor-default opacity-0"
|
|
58
58
|
}
|
|
59
59
|
),
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ a(
|
|
61
61
|
v.Provider,
|
|
62
62
|
{
|
|
63
|
-
value: { size: n, open: e, onClose:
|
|
64
|
-
children:
|
|
63
|
+
value: { size: n, open: e, onClose: i, transitionState: c, duration: r },
|
|
64
|
+
children: f
|
|
65
65
|
}
|
|
66
66
|
)
|
|
67
67
|
]
|
|
68
68
|
}
|
|
69
69
|
) }) });
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
const e = l((m) => m.modal.dialog), { size:
|
|
71
|
+
function B({ className: t, children: o, ...n }) {
|
|
72
|
+
const e = l((m) => m.modal.dialog), { size: i, transitionState: r, duration: p } = h(v), f = {
|
|
73
73
|
entering: "scale-100",
|
|
74
74
|
entered: "scale-100",
|
|
75
75
|
exiting: "scale-75",
|
|
76
76
|
exited: "scale-75",
|
|
77
77
|
unmounted: ""
|
|
78
|
-
},
|
|
79
|
-
var
|
|
78
|
+
}, x = D(() => {
|
|
79
|
+
var s;
|
|
80
80
|
return [{
|
|
81
81
|
sm: "min-[576px]:w-[300px]",
|
|
82
82
|
md: "min-[576px]:w-[500px]",
|
|
83
83
|
lg: "min-[992px]:w-[800px]"
|
|
84
|
-
}[
|
|
85
|
-
}, [
|
|
86
|
-
return /* @__PURE__ */
|
|
84
|
+
}[i], (s = e == null ? void 0 : e.size) == null ? void 0 : s[i]];
|
|
85
|
+
}, [i, e == null ? void 0 : e.size]);
|
|
86
|
+
return /* @__PURE__ */ a(
|
|
87
87
|
d,
|
|
88
88
|
{
|
|
89
89
|
as: "div",
|
|
@@ -91,8 +91,8 @@ function R({ className: t, children: o, ...n }) {
|
|
|
91
91
|
className: b(
|
|
92
92
|
"max-w-full max-h-full m-auto transition-transform",
|
|
93
93
|
e == null ? void 0 : e.base,
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
x,
|
|
95
|
+
f[r],
|
|
96
96
|
t
|
|
97
97
|
),
|
|
98
98
|
...n,
|
|
@@ -100,22 +100,22 @@ function R({ className: t, children: o, ...n }) {
|
|
|
100
100
|
}
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function F({ className: t, ...o }) {
|
|
104
104
|
const n = l((e) => e.modal.header.base);
|
|
105
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ a(d.Header, { className: y(n, t), ...o });
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function R({ className: t, ...o }) {
|
|
108
108
|
const n = l((e) => e.modal.body.base);
|
|
109
|
-
return /* @__PURE__ */
|
|
109
|
+
return /* @__PURE__ */ a(d.Body, { className: y(n, t), ...o });
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function j({ className: t, ...o }) {
|
|
112
112
|
const n = l((e) => e.modal.footer.base);
|
|
113
|
-
return /* @__PURE__ */
|
|
113
|
+
return /* @__PURE__ */ a(d.Footer, { className: y(n, t), ...o });
|
|
114
114
|
}
|
|
115
|
-
u.Dialog =
|
|
116
|
-
u.Header =
|
|
117
|
-
u.Body =
|
|
118
|
-
u.Footer =
|
|
115
|
+
u.Dialog = B;
|
|
116
|
+
u.Header = F;
|
|
117
|
+
u.Body = R;
|
|
118
|
+
u.Footer = j;
|
|
119
119
|
export {
|
|
120
120
|
v as ModalContext,
|
|
121
121
|
u as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const n=require("
|
|
1
|
+
"use client";"use strict";const n=require("react/jsx-runtime"),b=require("../../helpers/cn.cjs.js"),a=require("react"),x=require("../../hooks/useClasses.cjs.js"),f=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function m({color:t="primary",value:o=0,animate:s=!1,className:u,...l}){const e=x(r=>r.progress),c=a.useMemo(()=>{var i;if(!t)return"border-transparent";const r={primary:"bg-primary/15 text-primary",secondary:"bg-secondary/15 text-secondary",success:"bg-success/15 text-success",info:"bg-info/15 text-info",warning:"bg-warning/15 text-warning",danger:"bg-danger/15 text-danger",dark:"bg-dark/15 text-dark",light:"bg-light/15 text-light"},g=(i=e==null?void 0:e.color)==null?void 0:i[t];return[r==null?void 0:r[t],g]},[t,e==null?void 0:e.color]),d=a.useMemo(()=>{if(!s)return`${Math.max(o,0)}%`},[o,s]);return n.jsxs("div",{className:f.twMerge("relative block w-full h-1.5 rounded-full overflow-hidden",e==null?void 0:e.base,c,u),...l,children:[n.jsx("span",{style:{width:d},className:b("absolute h-full max-w-full bg-current rounded-[inherit] top-0 bottom-0 start-0",s?"animate-linear-progress-1":"transition-[width]")}),s&&n.jsx("span",{className:"absolute h-full max-w-full bg-current rounded-[inherit] top-0 bottom-0 start-0 animate-linear-progress-2"})]})}module.exports=m;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { jsxs as f, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import c from "../../helpers/cn.es.js";
|
|
4
4
|
import { useMemo as i } from "react";
|
|
5
|
-
import
|
|
6
|
-
import { twMerge as
|
|
7
|
-
function
|
|
5
|
+
import p from "../../hooks/useClasses.es.js";
|
|
6
|
+
import { twMerge as b } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
7
|
+
function v({
|
|
8
8
|
color: e = "primary",
|
|
9
9
|
value: o = 0,
|
|
10
|
-
animate:
|
|
10
|
+
animate: n = !1,
|
|
11
11
|
className: l,
|
|
12
12
|
...u
|
|
13
13
|
}) {
|
|
14
|
-
const r =
|
|
15
|
-
var
|
|
14
|
+
const r = p((t) => t.progress), d = i(() => {
|
|
15
|
+
var s;
|
|
16
16
|
if (!e) return "border-transparent";
|
|
17
17
|
const t = {
|
|
18
18
|
primary: "bg-primary/15 text-primary",
|
|
@@ -23,16 +23,16 @@ function j({
|
|
|
23
23
|
danger: "bg-danger/15 text-danger",
|
|
24
24
|
dark: "bg-dark/15 text-dark",
|
|
25
25
|
light: "bg-light/15 text-light"
|
|
26
|
-
}, m = (
|
|
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
28
|
}, [e, r == null ? void 0 : r.color]), g = i(() => {
|
|
29
|
-
if (!
|
|
29
|
+
if (!n)
|
|
30
30
|
return `${Math.max(o, 0)}%`;
|
|
31
|
-
}, [o,
|
|
32
|
-
return /* @__PURE__ */
|
|
31
|
+
}, [o, n]);
|
|
32
|
+
return /* @__PURE__ */ f(
|
|
33
33
|
"div",
|
|
34
34
|
{
|
|
35
|
-
className:
|
|
35
|
+
className: b(
|
|
36
36
|
"relative block w-full h-1.5 rounded-full overflow-hidden",
|
|
37
37
|
r == null ? void 0 : r.base,
|
|
38
38
|
d,
|
|
@@ -40,21 +40,21 @@ function j({
|
|
|
40
40
|
),
|
|
41
41
|
...u,
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ a(
|
|
44
44
|
"span",
|
|
45
45
|
{
|
|
46
46
|
style: { width: g },
|
|
47
|
-
className:
|
|
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
|
-
|
|
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" })
|
|
54
54
|
]
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
v as default
|
|
60
60
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const u=require("
|
|
1
|
+
"use client";"use strict";const u=require("react/jsx-runtime");require("react");const i=require("../../hooks/useClasses.cjs.js"),a=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function c({className:e,children:s,...n}){const t=i(r=>r.skeleton.base);return u.jsx("span",{className:a.twMerge("inline-block w-10 h-10 rounded bg-gray-200 text-gray-200 animate-pulse",t,e),...n,children:s})}module.exports=c;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import n from "../../hooks/useClasses.es.js";
|
|
5
|
-
import { twMerge as
|
|
5
|
+
import { twMerge as l } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
6
6
|
function c({
|
|
7
7
|
className: e,
|
|
8
8
|
children: s,
|
|
9
9
|
...t
|
|
10
10
|
}) {
|
|
11
11
|
const o = n((r) => r.skeleton.base);
|
|
12
|
-
return /* @__PURE__ */ a
|
|
12
|
+
return /* @__PURE__ */ a(
|
|
13
13
|
"span",
|
|
14
14
|
{
|
|
15
|
-
className:
|
|
15
|
+
className: l(
|
|
16
16
|
"inline-block w-10 h-10 rounded bg-gray-200 text-gray-200 animate-pulse",
|
|
17
17
|
o,
|
|
18
18
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
1
|
+
"use client";"use strict";const c=require("react/jsx-runtime");require("react");const n=require("../../hooks/useClasses.cjs.js"),u=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function a({className:e,...s}){const r=n(t=>t.spacer.base);return c.jsx("span",{className:u.twMerge("flex-1",r,e),...s})}module.exports=a;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import o from "../../hooks/useClasses.es.js";
|
|
5
5
|
import { twMerge as m } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
6
|
-
function
|
|
6
|
+
function l({ className: s, ...e }) {
|
|
7
7
|
const r = o((t) => t.spacer.base);
|
|
8
|
-
return /* @__PURE__ */ a
|
|
8
|
+
return /* @__PURE__ */ a("span", { className: m("flex-1", r, s), ...e });
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
l as default
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const b=require("
|
|
1
|
+
"use client";"use strict";const b=require("react/jsx-runtime"),d=require("react"),c=require("../../hooks/useClasses.cjs.js"),m=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function p({color:o="primary",size:t="md",className:i,...u}){const r=c(e=>e.spinner),a=d.useMemo(()=>{var n;if(!o)return"border-current";const e={primary:"border-primary",secondary:"border-secondary",success:"border-success",info:"border-info",warning:"border-warning",danger:"border-danger",dark:"border-dark",light:"border-light"};return[e==null?void 0:e[o],(n=r==null?void 0:r.color)==null?void 0:n[o]]},[o,r==null?void 0:r.color]),s=d.useMemo(()=>{var n;const e={sm:"border-2 w-4",md:"border-3 w-6",lg:"border-4 w-8"};return[e==null?void 0:e[t],(n=r==null?void 0:r.size)==null?void 0:n[t]]},[t,r==null?void 0:r.size]);return b.jsx("span",{className:m.twMerge("inline-block align-middle rounded-full animate-spin aspect-square",r==null?void 0:r.base,a,"border-l-transparent",s,i),...u})}module.exports=p;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { useMemo as
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as t } from "react";
|
|
4
4
|
import p from "../../hooks/useClasses.es.js";
|
|
5
|
-
import { twMerge as
|
|
5
|
+
import { twMerge as f } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
6
6
|
function w({
|
|
7
7
|
color: o = "primary",
|
|
8
|
-
size:
|
|
8
|
+
size: d = "md",
|
|
9
9
|
className: i,
|
|
10
10
|
...a
|
|
11
11
|
}) {
|
|
12
|
-
const r = p((e) => e.spinner), m =
|
|
12
|
+
const r = p((e) => e.spinner), m = t(() => {
|
|
13
13
|
var n;
|
|
14
14
|
if (!o) return "border-current";
|
|
15
15
|
const e = {
|
|
@@ -23,24 +23,24 @@ function w({
|
|
|
23
23
|
light: "border-light"
|
|
24
24
|
};
|
|
25
25
|
return [e == null ? void 0 : e[o], (n = r == null ? void 0 : r.color) == null ? void 0 : n[o]];
|
|
26
|
-
}, [o, r == null ? void 0 : r.color]),
|
|
26
|
+
}, [o, r == null ? void 0 : r.color]), b = t(() => {
|
|
27
27
|
var n;
|
|
28
28
|
const e = {
|
|
29
29
|
sm: "border-2 w-4",
|
|
30
30
|
md: "border-3 w-6",
|
|
31
31
|
lg: "border-4 w-8"
|
|
32
32
|
};
|
|
33
|
-
return [e == null ? void 0 : e[
|
|
34
|
-
}, [
|
|
35
|
-
return /* @__PURE__ */
|
|
33
|
+
return [e == null ? void 0 : e[d], (n = r == null ? void 0 : r.size) == null ? void 0 : n[d]];
|
|
34
|
+
}, [d, r == null ? void 0 : r.size]);
|
|
35
|
+
return /* @__PURE__ */ u(
|
|
36
36
|
"span",
|
|
37
37
|
{
|
|
38
|
-
className:
|
|
38
|
+
className: f(
|
|
39
39
|
"inline-block align-middle rounded-full animate-spin aspect-square",
|
|
40
40
|
r == null ? void 0 : r.base,
|
|
41
41
|
m,
|
|
42
42
|
"border-l-transparent",
|
|
43
|
-
|
|
43
|
+
b,
|
|
44
44
|
i
|
|
45
45
|
),
|
|
46
46
|
...a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
1
|
+
"use client";"use strict";const f=require("react/jsx-runtime"),o=require("../../helpers/cn.cjs.js"),m=require("react"),q=require("../../hooks/useClasses.cjs.js"),h=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function w({as:a,variant:e="horizontal",wrap:u=!1,className:c,children:s,...l}){const t=q(n=>n.stack),v=a||"div",x=m.useMemo(()=>{var r,i;return{horizontal:o("flex-row *:min-w-0",(r=t==null?void 0:t.variants)==null?void 0:r.horizontal),vertical:o("flex-col *:min-h-0",(i=t==null?void 0:t.variants)==null?void 0:i.vertical)}[e]},[e,t==null?void 0:t.variants]);return f.jsx(v,{className:h.twMerge("flex",t==null?void 0:t.base,x,u&&"flex-wrap",c),...l,children:s})}module.exports=w;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import a from "../../helpers/cn.es.js";
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import
|
|
6
|
-
import { twMerge as
|
|
7
|
-
function
|
|
4
|
+
import { useMemo as x } from "react";
|
|
5
|
+
import h from "../../hooks/useClasses.es.js";
|
|
6
|
+
import { twMerge as s } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
7
|
+
function M({
|
|
8
8
|
as: e,
|
|
9
9
|
variant: r = "horizontal",
|
|
10
10
|
wrap: m = !1,
|
|
@@ -12,20 +12,20 @@ function k({
|
|
|
12
12
|
children: l,
|
|
13
13
|
...p
|
|
14
14
|
}) {
|
|
15
|
-
const t =
|
|
15
|
+
const t = h((o) => o.stack), v = e || "div", u = x(() => {
|
|
16
16
|
var n, i;
|
|
17
17
|
return {
|
|
18
18
|
horizontal: a("flex-row *:min-w-0", (n = t == null ? void 0 : t.variants) == null ? void 0 : n.horizontal),
|
|
19
19
|
vertical: a("flex-col *:min-h-0", (i = t == null ? void 0 : t.variants) == null ? void 0 : i.vertical)
|
|
20
20
|
}[r];
|
|
21
21
|
}, [r, t == null ? void 0 : t.variants]);
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
22
|
+
return /* @__PURE__ */ c(
|
|
23
|
+
v,
|
|
24
24
|
{
|
|
25
|
-
className:
|
|
25
|
+
className: s(
|
|
26
26
|
"flex",
|
|
27
27
|
t == null ? void 0 : t.base,
|
|
28
|
-
|
|
28
|
+
u,
|
|
29
29
|
m && "flex-wrap",
|
|
30
30
|
f
|
|
31
31
|
),
|
|
@@ -35,5 +35,5 @@ function k({
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
export {
|
|
38
|
-
|
|
38
|
+
M as default
|
|
39
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const s=require("
|
|
1
|
+
"use client";"use strict";const s=require("react/jsx-runtime"),g=require("../../helpers/cn.cjs.js"),i=require("react"),y=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js");function z({checked:e,onChange:n,disabled:l,color:a="primary",size:b="md",inputProps:t={},className:u,...c}){const d=i.useMemo(()=>"",[e]),m=i.useMemo(()=>{const r={primary:e?"bg-primary border-primary":"bg-white border-[#e8eaee]",secondary:e?"bg-secondary border-secondary":"bg-white border-[#e8eaee]",success:e?"bg-success border-success":"bg-white border-[#e8eaee]",info:e?"bg-info border-info":"bg-white border-[#e8eaee]",warning:e?"bg-warning border-warning":"bg-white border-[#e8eaee]",danger:e?"bg-danger border-danger":"bg-white border-[#e8eaee]",dark:e?"bg-dark border-dark":"bg-white border-[#e8eaee]",light:e?"bg-light border-light":"bg-white border-[#e8eaee]"};return r==null?void 0:r[a]},[a,e]),w=i.useMemo(()=>{const r={primary:e?"bg-primary ":"bg-black",secondary:e?"bg-secondary":"bg-black",success:e?"bg-success":"bg-black",info:e?"bg-info":"bg-black",warning:e?"bg-warning":"bg-black",danger:e?"bg-danger":"bg-black",dark:e?"bg-dark":"bg-black",light:e?"bg-light":"bg-black"};return r==null?void 0:r[a]},[a,e]),f=i.useMemo(()=>{const r={sm:"[--size:0.25rem]",md:"[--size:0.5rem]",lg:"[--size:0.75rem]"};return r==null?void 0:r[b]},[b]),h=r=>{var o;n==null||n(r.currentTarget.checked),(o=t.onChange)==null||o.call(t,r)};return s.jsxs("span",{className:y.twMerge(f,"[--w:2.5rem] [--h:1.875rem] [--t:0.75rem] [--width:calc(var(--w)+var(--size)*2)] [--height:calc(var(--h)+var(--size))] [--thumb:calc(var(--t)+var(--size))] [--scale:0] hover:[--scale:1]","inline-flex w-(--width) h-(--height) overflow-hidden p-3 relative align-middle",l&&"opacity-75",d,u),...c,children:[s.jsx("input",{...t,type:"checkbox",className:"peer absolute inset-0 size-full opacity-0 cursor-pointer disabled:cursor-not-allowed z-[2]",checked:e,disabled:l,onChange:h}),s.jsxs("span",{className:"inline-flex justify-center items-center size-(--height) rounded-full absolute inset-y-0 my-auto left-0 peer-checked:left-[calc(100%-var(--height))] transition-[left] z-[1]",children:[s.jsx("span",{className:"absolute size-full inset-0 bg-black/5 rounded-full scale-(--scale) transition-[scale]"}),s.jsx("span",{className:g("absolute size-(--thumb) inset-0 m-auto border rounded-full shadow transition-colors",m)})]}),s.jsx("span",{className:g("size-full rounded-full opacity-35 transition-colors",w)})]})}module.exports=z;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import d from "../../helpers/cn.es.js";
|
|
4
4
|
import { useMemo as i } from "react";
|
|
5
|
-
import { twMerge as
|
|
6
|
-
function
|
|
5
|
+
import { twMerge as p } from "../../node_modules/tailwind-merge/dist/bundle-mjs.es.js";
|
|
6
|
+
function C({
|
|
7
7
|
checked: e,
|
|
8
8
|
onChange: n,
|
|
9
9
|
disabled: l,
|
|
10
|
-
color:
|
|
10
|
+
color: a = "primary",
|
|
11
11
|
size: b = "md",
|
|
12
|
-
inputProps:
|
|
13
|
-
className:
|
|
14
|
-
...
|
|
12
|
+
inputProps: s = {},
|
|
13
|
+
className: m,
|
|
14
|
+
...c
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
16
|
+
const u = i(() => "", [e]), f = i(() => {
|
|
17
17
|
const r = {
|
|
18
18
|
primary: e ? "bg-primary border-primary" : "bg-white border-[#e8eaee]",
|
|
19
19
|
secondary: e ? "bg-secondary border-secondary" : "bg-white border-[#e8eaee]",
|
|
@@ -24,8 +24,8 @@ function j({
|
|
|
24
24
|
dark: e ? "bg-dark border-dark" : "bg-white border-[#e8eaee]",
|
|
25
25
|
light: e ? "bg-light border-light" : "bg-white border-[#e8eaee]"
|
|
26
26
|
};
|
|
27
|
-
return r == null ? void 0 : r[
|
|
28
|
-
}, [
|
|
27
|
+
return r == null ? void 0 : r[a];
|
|
28
|
+
}, [a, e]), w = i(() => {
|
|
29
29
|
const r = {
|
|
30
30
|
primary: e ? "bg-primary " : "bg-black",
|
|
31
31
|
secondary: e ? "bg-secondary" : "bg-black",
|
|
@@ -36,60 +36,60 @@ function j({
|
|
|
36
36
|
dark: e ? "bg-dark" : "bg-black",
|
|
37
37
|
light: e ? "bg-light" : "bg-black"
|
|
38
38
|
};
|
|
39
|
-
return r == null ? void 0 : r[
|
|
40
|
-
}, [
|
|
39
|
+
return r == null ? void 0 : r[a];
|
|
40
|
+
}, [a, e]), h = i(() => {
|
|
41
41
|
const r = {
|
|
42
42
|
sm: "[--size:0.25rem]",
|
|
43
43
|
md: "[--size:0.5rem]",
|
|
44
44
|
lg: "[--size:0.75rem]"
|
|
45
45
|
};
|
|
46
46
|
return r == null ? void 0 : r[b];
|
|
47
|
-
}, [b]),
|
|
47
|
+
}, [b]), y = (r) => {
|
|
48
48
|
var o;
|
|
49
|
-
n == null || n(r.currentTarget.checked), (o =
|
|
49
|
+
n == null || n(r.currentTarget.checked), (o = s.onChange) == null || o.call(s, r);
|
|
50
50
|
};
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ g(
|
|
52
52
|
"span",
|
|
53
53
|
{
|
|
54
|
-
className:
|
|
55
|
-
|
|
54
|
+
className: p(
|
|
55
|
+
h,
|
|
56
56
|
"[--w:2.5rem] [--h:1.875rem] [--t:0.75rem] [--width:calc(var(--w)+var(--size)*2)] [--height:calc(var(--h)+var(--size))] [--thumb:calc(var(--t)+var(--size))] [--scale:0] hover:[--scale:1]",
|
|
57
57
|
"inline-flex w-(--width) h-(--height) overflow-hidden p-3 relative align-middle",
|
|
58
58
|
l && "opacity-75",
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
u,
|
|
60
|
+
m
|
|
61
61
|
),
|
|
62
|
-
...
|
|
62
|
+
...c,
|
|
63
63
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ t(
|
|
65
65
|
"input",
|
|
66
66
|
{
|
|
67
|
-
...
|
|
67
|
+
...s,
|
|
68
68
|
type: "checkbox",
|
|
69
69
|
className: "peer absolute inset-0 size-full opacity-0 cursor-pointer disabled:cursor-not-allowed z-[2]",
|
|
70
70
|
checked: e,
|
|
71
71
|
disabled: l,
|
|
72
|
-
onChange:
|
|
72
|
+
onChange: y
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ g("span", { className: "inline-flex justify-center items-center size-(--height) rounded-full absolute inset-y-0 my-auto left-0 peer-checked:left-[calc(100%-var(--height))] transition-[left] z-[1]", children: [
|
|
76
|
+
/* @__PURE__ */ t("span", { className: "absolute size-full inset-0 bg-black/5 rounded-full scale-(--scale) transition-[scale]" }),
|
|
77
|
+
/* @__PURE__ */ t(
|
|
78
78
|
"span",
|
|
79
79
|
{
|
|
80
|
-
className:
|
|
80
|
+
className: d(
|
|
81
81
|
"absolute size-(--thumb) inset-0 m-auto border rounded-full shadow transition-colors",
|
|
82
|
-
|
|
82
|
+
f
|
|
83
83
|
)
|
|
84
84
|
}
|
|
85
85
|
)
|
|
86
86
|
] }),
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ t(
|
|
88
88
|
"span",
|
|
89
89
|
{
|
|
90
|
-
className:
|
|
90
|
+
className: d(
|
|
91
91
|
"size-full rounded-full opacity-35 transition-colors",
|
|
92
|
-
|
|
92
|
+
w
|
|
93
93
|
)
|
|
94
94
|
}
|
|
95
95
|
)
|
|
@@ -98,5 +98,5 @@ function j({
|
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
100
|
export {
|
|
101
|
-
|
|
101
|
+
C as default
|
|
102
102
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
1
|
+
"use client";"use strict";const s=require("react/jsx-runtime"),u=require("react"),d=require("../../hooks/useClasses.cjs.js"),n=require("../../node_modules/tailwind-merge/dist/bundle-mjs.cjs.js"),f=u.createContext({striped:!1,bordered:!1,hover:!1});function g({className:r,children:a,...o}){const e=d(t=>t.table.container.base);return s.jsx("div",{className:n.twMerge("w-full overflow-auto",e,r),...o,children:a})}function l({striped:r=!1,bordered:a=!1,hover:o=!1,className:e,children:t,...i}){const b=d(c=>c.table.base);return s.jsx("table",{className:n.twMerge("min-w-full border-collapse border-spacing-0",b,e),...i,children:s.jsx(f.Provider,{value:{bordered:a,hover:o,striped:r},children:t})})}function p({sticky:r=!1,className:a,children:o,...e}){const t=d(i=>i.table.header);return s.jsx("thead",{className:n.twMerge(t==null?void 0:t.base,r&&"sticky top-0 left-0 right-0 z-[2]",r&&(t==null?void 0:t.sticky),a),...e,children:o})}function m({className:r,children:a,...o}){const e=d(t=>t.table.body.base);return s.jsx("tbody",{className:n.twMerge(e,r),...o,children:a})}function y({className:r,children:a,...o}){const e=d(w=>w.table.row),{bordered:t,hover:i,striped:b}=u.useContext(f),c=!!t,x=t==="dashed",h=t==="solid";return s.jsx("tr",{className:n.twMerge("bg-white",e==null?void 0:e.base,c&&"border-b border-solid border-[#e8eaee]",x&&"border-dashed",h&&"border-solid",c&&(e==null?void 0:e.bordered),i&&"cursor-pointer transition-colors hover:bg-gray-200",i&&(e==null?void 0:e.hover),b&&"even:bg-gray-100",b&&(e==null?void 0:e.hover),r),...o,children:a})}function j({sticky:r=!1,className:a,children:o,...e}){return s.jsx("th",{className:n.twMerge("font-medium text-sm py-2 px-4 whitespace-nowrap text-center first:text-start last:text-end",r&&"bg-inherit sticky end-0 z-[1]",a),...e,children:o})}function v({sticky:r=!1,className:a,children:o,...e}){return s.jsx("td",{className:n.twMerge("font-normal text-sm py-2 px-4 whitespace-nowrap text-center first:text-start last:text-end",r&&"bg-inherit sticky end-0 z-[1]",a),...e,children:o})}l.Container=g;l.Header=p;l.Body=m;l.Row=y;l.HeaderCell=j;l.DataCell=v;module.exports=l;
|