@mci-ui/mci-ui 0.0.94 → 0.0.96
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/assets/png/empty.png.js +4 -0
- package/dist/index.css +1 -1
- package/dist/index.js +54 -50
- package/dist/shared/lib/uploadLanguage.js +6 -3
- package/dist/shared/ui/MciModal/MciModal.js +1 -1
- package/dist/shared/ui/mciAccordion/MciAccordion.js +4 -4
- package/dist/shared/ui/mciButton/MciButton.js +12 -10
- package/dist/shared/ui/mciCheck/MciCheck.js +3 -3
- package/dist/shared/ui/mciCollapse/MciCollapse.js +1 -1
- package/dist/shared/ui/mciDrawer/MciDrawer.js +1 -1
- package/dist/shared/ui/mciEmpty/MciEmpty.js +41 -0
- package/dist/shared/ui/mciInput/MciInput.js +32 -32
- package/dist/shared/ui/mciPagination/MciPagination.js +32 -32
- package/dist/shared/ui/mciPhone/MciPhone.js +23 -23
- package/dist/shared/ui/mciPicker/MciPicker.js +2 -2
- package/dist/shared/ui/mciTable/MciTable.js +317 -165
- package/dist/shared/ui/mciTable/MciTableClamp2.js +5 -5
- package/dist/shared/ui/mciTabs/FilledTabs.js +103 -90
- package/dist/shared/ui/mciTabs/OutlinedTabs.js +28 -24
- package/dist/shared/ui/mciTabs/TabCountBadge.js +19 -0
- package/dist/shared/ui/mciTag/MciTag.js +17 -17
- package/dist/shared/ui/mciTextarea/MciTextarea.js +5 -5
- package/dist/shared/ui/mciTimePicker/MciTimePicker.js +205 -194
- package/dist/shared/ui/mciUpload/MciUpload.js +102 -352
- package/dist/shared/ui/mciUpload/MciUploadButton.js +143 -0
- package/dist/shared/ui/mciUpload/MciUploadFileList.js +167 -0
- package/dist/shared/ui/mciUpload/mci-upload.theme.js +103 -0
- package/dist/shared/ui/mciUpload/mci-upload.utils.js +90 -41
- package/dist/shared/ui/mciUpload/useMciUpload.js +183 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/shared/lib/uploadLanguage.d.ts +2 -0
- package/dist/types/shared/types/ui/empty.types.d.ts +11 -0
- package/dist/types/shared/types/ui/index.d.ts +2 -1
- package/dist/types/shared/types/ui/tabs.types.d.ts +2 -0
- package/dist/types/shared/types/ui/time-picker.types.d.ts +2 -0
- package/dist/types/shared/types/ui/upload.types.d.ts +25 -1
- package/dist/types/shared/ui/mciEmpty/MciEmpty.d.ts +2 -0
- package/dist/types/shared/ui/mciTabs/FilledTabs.d.ts +1 -1
- package/dist/types/shared/ui/mciTabs/TabCountBadge.d.ts +5 -0
- package/dist/types/shared/ui/mciUpload/MciUploadButton.d.ts +4 -0
- package/dist/types/shared/ui/mciUpload/MciUploadFileList.d.ts +18 -0
- package/dist/types/shared/ui/mciUpload/mci-upload.theme.d.ts +101 -0
- package/dist/types/shared/ui/mciUpload/mci-upload.utils.d.ts +7 -0
- package/dist/types/shared/ui/mciUpload/useMciUpload.d.ts +131 -0
- package/package.json +1 -1
|
@@ -1,149 +1,162 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
1
|
+
import { jsxs as m, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useRef as N, useCallback as O, useEffect as v, useMemo as j } from "react";
|
|
3
|
+
import { cn as n } from "../../lib/utils.js";
|
|
4
|
+
import _ from "./TabCountBadge.js";
|
|
5
|
+
const $ = {
|
|
5
6
|
top: "flex-col",
|
|
6
7
|
bottom: "flex-col-reverse",
|
|
7
8
|
left: "flex-row",
|
|
8
9
|
right: "flex-row-reverse"
|
|
9
|
-
},
|
|
10
|
+
}, k = {
|
|
10
11
|
top: "flex-row",
|
|
11
12
|
bottom: "flex-row",
|
|
12
13
|
left: "flex-col",
|
|
13
14
|
right: "flex-col"
|
|
14
|
-
},
|
|
15
|
+
}, F = {
|
|
15
16
|
top: "mt-4",
|
|
16
17
|
bottom: "mb-4",
|
|
17
18
|
left: "ml-4",
|
|
18
19
|
right: "mr-4"
|
|
19
20
|
};
|
|
20
|
-
function
|
|
21
|
+
function V({
|
|
21
22
|
tabs: t,
|
|
22
|
-
defaultTab:
|
|
23
|
+
defaultTab: g,
|
|
23
24
|
position: c = "top",
|
|
24
25
|
darkMode: d = !1,
|
|
25
26
|
className: b,
|
|
26
|
-
|
|
27
|
+
width: u,
|
|
28
|
+
tabListClassName: y,
|
|
27
29
|
contentClassName: S,
|
|
28
30
|
extra: w,
|
|
29
|
-
onChange:
|
|
31
|
+
onChange: E
|
|
30
32
|
}) {
|
|
31
|
-
const [i,
|
|
33
|
+
const [i, A] = p(g || t[0]?.id), [T, C] = p({}), a = N([]), h = N(null), s = O(() => {
|
|
32
34
|
requestAnimationFrame(() => {
|
|
33
35
|
requestAnimationFrame(() => {
|
|
34
|
-
const e = t.findIndex((
|
|
35
|
-
if (!
|
|
36
|
-
const { offsetLeft: f, offsetTop:
|
|
37
|
-
|
|
36
|
+
const e = t.findIndex((I) => I?.id === i), r = a.current[e];
|
|
37
|
+
if (!r) return;
|
|
38
|
+
const { offsetLeft: f, offsetTop: x, offsetWidth: L, offsetHeight: R } = r;
|
|
39
|
+
C({
|
|
38
40
|
left: `${f}px`,
|
|
39
|
-
top: `${
|
|
40
|
-
width: `${
|
|
41
|
-
height: `${
|
|
41
|
+
top: `${x}px`,
|
|
42
|
+
width: `${L}px`,
|
|
43
|
+
height: `${R}px`,
|
|
42
44
|
transition: "all 0.35s cubic-bezier(0.25, 1, 0.5, 1)"
|
|
43
45
|
});
|
|
44
46
|
});
|
|
45
47
|
});
|
|
46
48
|
}, [i, t]);
|
|
47
|
-
|
|
49
|
+
v(() => (s(), window.addEventListener("resize", s), "fonts" in document && document.fonts.ready.then(s), () => window.removeEventListener("resize", s)), [c, s]), v(() => {
|
|
48
50
|
const e = h.current;
|
|
49
51
|
if (!e || typeof ResizeObserver > "u") return;
|
|
50
|
-
const
|
|
52
|
+
const r = new ResizeObserver(() => {
|
|
51
53
|
s();
|
|
52
54
|
});
|
|
53
|
-
return
|
|
54
|
-
f &&
|
|
55
|
-
}), () =>
|
|
56
|
-
}, [t, s]),
|
|
55
|
+
return r.observe(e), a.current.forEach((f) => {
|
|
56
|
+
f && r.observe(f);
|
|
57
|
+
}), () => r.disconnect();
|
|
58
|
+
}, [t, s]), v(() => {
|
|
57
59
|
a.current = a.current.slice(0, t.length);
|
|
58
60
|
}, [t]);
|
|
59
|
-
const o = c === "left" || c === "right",
|
|
61
|
+
const o = c === "left" || c === "right", z = j(
|
|
60
62
|
() => t.find((e) => e.id === i)?.content,
|
|
61
63
|
[i, t]
|
|
62
64
|
);
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ m("div", { className: n("flex w-full", $[c], b), children: [
|
|
66
|
+
/* @__PURE__ */ m(
|
|
65
67
|
"div",
|
|
66
68
|
{
|
|
67
|
-
className:
|
|
69
|
+
className: n(
|
|
68
70
|
"flex w-full gap-4",
|
|
69
71
|
o ? "flex-col items-start" : "flex-row flex-wrap items-center"
|
|
70
72
|
),
|
|
71
73
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ l(
|
|
73
75
|
"div",
|
|
74
76
|
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
d ? "bg-neutral-300" : "bg-slate-100",
|
|
79
|
-
_[c],
|
|
80
|
-
!o && "w-full overflow-hidden",
|
|
81
|
-
o ? "min-w-48" : "",
|
|
82
|
-
g
|
|
77
|
+
className: n(
|
|
78
|
+
u ? "flex-none" : "flex-1",
|
|
79
|
+
o ? "w-full" : !u && "min-w-[520px]"
|
|
83
80
|
),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
81
|
+
style: u !== void 0 ? { width: u } : void 0,
|
|
82
|
+
children: /* @__PURE__ */ m(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
ref: h,
|
|
86
|
+
className: n(
|
|
87
|
+
"relative flex rounded-xl p-1",
|
|
88
|
+
d ? "bg-neutral-300" : "bg-slate-100",
|
|
89
|
+
k[c],
|
|
90
|
+
!o && "w-full overflow-hidden",
|
|
91
|
+
o ? "min-w-48" : "",
|
|
92
|
+
y
|
|
93
|
+
),
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ l(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
className: n(
|
|
99
|
+
"absolute rounded-lg",
|
|
100
|
+
d ? "bg-black" : "bg-white",
|
|
101
|
+
o ? "w-full" : "h-full"
|
|
102
|
+
),
|
|
103
|
+
style: T
|
|
104
|
+
}
|
|
92
105
|
),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
106
|
+
t?.map((e, r) => {
|
|
107
|
+
const f = i === e.id;
|
|
108
|
+
return /* @__PURE__ */ m(
|
|
109
|
+
"button",
|
|
110
|
+
{
|
|
111
|
+
ref: (x) => {
|
|
112
|
+
a.current[r] = x;
|
|
113
|
+
},
|
|
114
|
+
onClick: () => {
|
|
115
|
+
e?.disabled || (A(e?.id), E?.(e?.id));
|
|
116
|
+
},
|
|
117
|
+
disabled: e?.disabled,
|
|
118
|
+
className: n(
|
|
119
|
+
"relative z-10 flex cursor-pointer items-center justify-center px-3 py-2 text-base font-normal whitespace-nowrap transition-colors duration-300",
|
|
120
|
+
d ? "text-white" : "text-black",
|
|
121
|
+
e?.disabled && (d ? "cursor-not-allowed text-neutral-100/50 opacity-60" : "cursor-not-allowed opacity-50"),
|
|
122
|
+
o ? "w-full justify-start" : "min-w-0 flex-1"
|
|
123
|
+
),
|
|
124
|
+
children: [
|
|
125
|
+
e?.icon && /* @__PURE__ */ l(
|
|
126
|
+
"span",
|
|
127
|
+
{
|
|
128
|
+
className: n(
|
|
129
|
+
"shrink-0 transition-transform duration-200",
|
|
130
|
+
f && "scale-110"
|
|
131
|
+
),
|
|
132
|
+
children: e?.icon
|
|
133
|
+
}
|
|
121
134
|
),
|
|
122
|
-
children: e?.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
135
|
+
/* @__PURE__ */ l("span", { className: "relative z-10 truncate", title: e?.label, children: e?.label }),
|
|
136
|
+
/* @__PURE__ */ l(_, { count: e?.count })
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
e?.id
|
|
140
|
+
);
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
)
|
|
132
145
|
}
|
|
133
|
-
)
|
|
134
|
-
w && /* @__PURE__ */
|
|
146
|
+
),
|
|
147
|
+
w && /* @__PURE__ */ l("div", { className: n("ml-auto shrink-0", o ? "w-full" : "max-w-full"), children: /* @__PURE__ */ l("div", { className: "flex flex-wrap items-center justify-end gap-2", children: w }) })
|
|
135
148
|
]
|
|
136
149
|
}
|
|
137
150
|
),
|
|
138
|
-
|
|
151
|
+
z && /* @__PURE__ */ l(
|
|
139
152
|
"div",
|
|
140
153
|
{
|
|
141
|
-
className:
|
|
154
|
+
className: n(
|
|
142
155
|
"w-full flex-1 overflow-hidden",
|
|
143
|
-
|
|
156
|
+
F[c],
|
|
144
157
|
S
|
|
145
158
|
),
|
|
146
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ l(
|
|
147
160
|
"div",
|
|
148
161
|
{
|
|
149
162
|
className: "w-full animate-fade-in",
|
|
@@ -157,5 +170,5 @@ function B({
|
|
|
157
170
|
] });
|
|
158
171
|
}
|
|
159
172
|
export {
|
|
160
|
-
|
|
173
|
+
V as default
|
|
161
174
|
};
|
|
@@ -1,50 +1,54 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as f, useRef as m, useEffect as
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useRef as m, useEffect as N, useMemo as S } from "react";
|
|
3
3
|
import { cn as i } from "../../lib/utils.js";
|
|
4
|
-
|
|
4
|
+
import A from "./TabCountBadge.js";
|
|
5
|
+
const _ = ({
|
|
5
6
|
tabs: e,
|
|
6
7
|
className: b,
|
|
7
8
|
contentClassName: p,
|
|
8
9
|
darkMode: l,
|
|
9
|
-
defaultTab:
|
|
10
|
-
onChange:
|
|
11
|
-
tabClassName:
|
|
12
|
-
tabListClassName:
|
|
10
|
+
defaultTab: T,
|
|
11
|
+
onChange: w,
|
|
12
|
+
tabClassName: B,
|
|
13
|
+
tabListClassName: v,
|
|
13
14
|
color: r = "orange"
|
|
14
15
|
}) => {
|
|
15
|
-
const [n,
|
|
16
|
-
|
|
17
|
-
const t =
|
|
16
|
+
const [n, y] = f(T || e[0]?.id), [d, C] = f({ left: 0, width: 0 }), g = m({}), u = m(null);
|
|
17
|
+
N(() => {
|
|
18
|
+
const t = g.current[n], o = u.current;
|
|
18
19
|
if (t && o) {
|
|
19
|
-
const k = o.getBoundingClientRect().left,
|
|
20
|
+
const k = o.getBoundingClientRect().left, x = t.getBoundingClientRect();
|
|
20
21
|
C({
|
|
21
|
-
left:
|
|
22
|
-
width:
|
|
22
|
+
left: x.left - k,
|
|
23
|
+
width: x.width
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
26
|
}, [n, e]);
|
|
26
27
|
const R = (t) => {
|
|
27
|
-
|
|
28
|
-
}, h =
|
|
28
|
+
y(t), w?.(t);
|
|
29
|
+
}, h = S(
|
|
29
30
|
() => e.find((t) => t.id === n)?.content,
|
|
30
31
|
[n, e]
|
|
31
32
|
);
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
e.map((t) => /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ c("div", { className: i("space-y-4", b), children: [
|
|
34
|
+
/* @__PURE__ */ c("div", { ref: u, className: i("relative flex", v), children: [
|
|
35
|
+
e.map((t) => /* @__PURE__ */ c(
|
|
35
36
|
"button",
|
|
36
37
|
{
|
|
37
38
|
ref: (o) => {
|
|
38
|
-
|
|
39
|
+
g.current[t.id] = o;
|
|
39
40
|
},
|
|
40
41
|
onClick: () => R(t.id),
|
|
41
42
|
className: i(
|
|
42
|
-
"cursor-pointer truncate border-b-2 px-3 py-2 text-sm font-medium transition-colors",
|
|
43
|
+
"flex cursor-pointer items-center truncate border-b-2 px-3 py-2 text-sm font-medium transition-colors",
|
|
43
44
|
l ? "border-slate-200/20" : "border-slate-200",
|
|
44
45
|
n === t.id ? l ? s[r].darkText : s[r].lightText : l ? "text-slate-200/70 hover:text-slate-100" : "hover:text-primary text-slate-400",
|
|
45
|
-
|
|
46
|
+
B
|
|
46
47
|
),
|
|
47
|
-
children:
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ a("span", { className: "truncate", children: t.label }),
|
|
50
|
+
/* @__PURE__ */ a(A, { count: t.count })
|
|
51
|
+
]
|
|
48
52
|
},
|
|
49
53
|
t.id
|
|
50
54
|
)),
|
|
@@ -55,7 +59,7 @@ const j = ({
|
|
|
55
59
|
"pointer-events-none absolute bottom-0 h-0.5 transition-all duration-300 ease-in-out",
|
|
56
60
|
l ? s[r].darkBg : s[r].lightBg
|
|
57
61
|
),
|
|
58
|
-
style: { left:
|
|
62
|
+
style: { left: d.left, width: d.width }
|
|
59
63
|
}
|
|
60
64
|
)
|
|
61
65
|
] }),
|
|
@@ -82,5 +86,5 @@ const j = ({
|
|
|
82
86
|
}
|
|
83
87
|
};
|
|
84
88
|
export {
|
|
85
|
-
|
|
89
|
+
_ as default
|
|
86
90
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as l } from "../../lib/utils.js";
|
|
3
|
+
function o({ count: t }) {
|
|
4
|
+
if (t == null) return null;
|
|
5
|
+
const e = String(t), n = e.length < 3;
|
|
6
|
+
return /* @__PURE__ */ r(
|
|
7
|
+
"span",
|
|
8
|
+
{
|
|
9
|
+
className: l(
|
|
10
|
+
"ml-2 flex h-4 shrink-0 items-center justify-center rounded-full bg-orange-600 text-[10px] font-medium whitespace-nowrap text-white tabular-nums",
|
|
11
|
+
n ? "w-4" : "min-w-4 px-1.5"
|
|
12
|
+
),
|
|
13
|
+
children: e
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
o as default
|
|
19
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { cn as l } from "../../lib/utils.js";
|
|
3
3
|
const d = {
|
|
4
4
|
sm: "px-2 py-0.5",
|
|
5
5
|
md: "px-2 py-1",
|
|
@@ -8,48 +8,48 @@ const d = {
|
|
|
8
8
|
sm: "w-3 h-3",
|
|
9
9
|
md: "w-3 h-3",
|
|
10
10
|
lg: "w-3 h-3"
|
|
11
|
-
},
|
|
11
|
+
}, i = {
|
|
12
12
|
success: "bg-green-50 text-green-600",
|
|
13
13
|
warning: "bg-yellow-50 text-yellow-600",
|
|
14
14
|
error: "bg-red-50 text-red-600",
|
|
15
15
|
gray: "bg-slate-200 text-slate-700",
|
|
16
16
|
blue: "bg-blue-50 text-blue-600"
|
|
17
|
-
},
|
|
17
|
+
}, o = {
|
|
18
18
|
success: "bg-green-950 text-green-400",
|
|
19
19
|
warning: "bg-yellow-900 text-yellow-400",
|
|
20
20
|
error: "bg-red-950 text-red-400",
|
|
21
21
|
gray: "bg-neutral-200 text-neutral-50",
|
|
22
22
|
blue: "bg-blue-900 text-blue-400"
|
|
23
23
|
};
|
|
24
|
-
function
|
|
24
|
+
function f({
|
|
25
25
|
children: g,
|
|
26
26
|
variant: r = "success",
|
|
27
27
|
size: t = "lg",
|
|
28
28
|
darkMode: x = !1,
|
|
29
29
|
icon: e,
|
|
30
30
|
iconPosition: a = "left",
|
|
31
|
-
rounded:
|
|
32
|
-
className:
|
|
31
|
+
rounded: c = !1,
|
|
32
|
+
className: m
|
|
33
33
|
}) {
|
|
34
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ u(
|
|
35
35
|
"span",
|
|
36
36
|
{
|
|
37
|
-
className:
|
|
38
|
-
"inline-flex animate-[fadeIn_0.3s_ease-out] items-center text-extra-small font-medium",
|
|
39
|
-
|
|
37
|
+
className: l(
|
|
38
|
+
"inline-flex max-w-full animate-[fadeIn_0.3s_ease-out] items-center overflow-hidden whitespace-nowrap text-extra-small font-medium",
|
|
39
|
+
c ? "rounded-full" : "rounded-lg",
|
|
40
40
|
d[t],
|
|
41
|
-
x ?
|
|
41
|
+
x ? o[r] : i[r],
|
|
42
42
|
e && "gap-[2px]",
|
|
43
|
-
|
|
43
|
+
m
|
|
44
44
|
),
|
|
45
45
|
children: [
|
|
46
|
-
e && a === "left" && /* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
e && a === "right" && /* @__PURE__ */
|
|
46
|
+
e && a === "left" && /* @__PURE__ */ s("span", { className: `flex shrink-0 items-center ${l(n[t])}`, children: e }),
|
|
47
|
+
/* @__PURE__ */ s("span", { className: "min-w-0 truncate", children: g }),
|
|
48
|
+
e && a === "right" && /* @__PURE__ */ s("span", { className: `flex shrink-0 items-center ${l(n[t])}`, children: e })
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
export {
|
|
54
|
-
|
|
54
|
+
f as default
|
|
55
55
|
};
|
|
@@ -13,8 +13,8 @@ const g = w(
|
|
|
13
13
|
error: t,
|
|
14
14
|
className: b,
|
|
15
15
|
rows: c = 4,
|
|
16
|
-
name:
|
|
17
|
-
...
|
|
16
|
+
name: x,
|
|
17
|
+
...f
|
|
18
18
|
}, m) => {
|
|
19
19
|
const h = _(() => e ? t ? "border-red-500 hover:border-red-500 focus:border-red-500 focus:shadow-[0_0_0_2px_rgba(231,0,11,0.25)]" : "border-neutral-200 hover:border-neutral-100 focus:border-blue-500 focus:shadow-[0_0_0_2px_var(--opacity-25,rgba(21,93,252,0.25))]" : t ? "border-red-600 focus:border-red-600 shadow-red" : "border-slate-200 hover:border-slate-400 focus:shadow-blue focus:border-blue-600", [e, t]);
|
|
20
20
|
return /* @__PURE__ */ s("div", { className: r("relative w-full", b), children: [
|
|
@@ -34,16 +34,16 @@ const g = w(
|
|
|
34
34
|
/* @__PURE__ */ a(
|
|
35
35
|
"textarea",
|
|
36
36
|
{
|
|
37
|
-
...
|
|
37
|
+
...f,
|
|
38
38
|
ref: m,
|
|
39
|
-
name:
|
|
39
|
+
name: x,
|
|
40
40
|
rows: c,
|
|
41
41
|
value: d,
|
|
42
42
|
onChange: (p) => n?.(p.target.value),
|
|
43
43
|
disabled: i,
|
|
44
44
|
placeholder: o,
|
|
45
45
|
className: r(
|
|
46
|
-
"w-full resize-none rounded-xl border text-base font-normal transition-all duration-300 ease-in-out outline-none",
|
|
46
|
+
"w-full resize-none rounded-xl border text-base font-normal transition-all duration-300 ease-in-out outline-none cursor-text",
|
|
47
47
|
e ? "p-3 text-neutral-50 placeholder:text-neutral-100 focus:text-white disabled:cursor-not-allowed disabled:border-neutral-200 disabled:bg-neutral-300 disabled:text-neutral-100/50 disabled:placeholder:text-neutral-100/50" : "bg-white p-3 disabled:cursor-not-allowed disabled:border-slate-200 disabled:bg-slate-100 disabled:text-slate-400",
|
|
48
48
|
h
|
|
49
49
|
)
|