@mci-ui/mci-ui 0.0.86 → 0.0.88
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/index.css +1 -1
- package/dist/shared/ui/MciModal/MciModal.js +107 -59
- package/dist/shared/ui/mciAccordion/MciAccordion.js +97 -64
- package/dist/shared/ui/mciBreadcrumb/MciBreadcrumb.js +23 -21
- package/dist/shared/ui/mciButton/MciButton.js +47 -32
- package/dist/shared/ui/mciCheck/MciCheck.js +116 -92
- package/dist/shared/ui/mciCollapse/MciCollapse.js +86 -54
- package/dist/shared/ui/mciDrawer/MciDrawer.js +82 -59
- package/dist/shared/ui/mciInput/MciInput.js +143 -130
- package/dist/shared/ui/mciInput/mci-input.utils.js +10 -10
- package/dist/shared/ui/mciPagination/MciPagination.js +85 -63
- package/dist/shared/ui/mciPhone/MciPhone.js +59 -54
- package/dist/shared/ui/mciPhone/mci-phone.utils.js +10 -10
- package/dist/shared/ui/mciPicker/MciPicker.js +349 -181
- package/dist/shared/ui/mciSelect/MciSelect.js +150 -131
- package/dist/shared/ui/mciSelect/mci-select.utils.js +12 -12
- package/dist/shared/ui/mciSkeleton/MciSkeleton.js +16 -14
- package/dist/shared/ui/mciTable/MciTable.js +165 -126
- package/dist/shared/ui/mciTable/MciTableColumnsPanel.js +113 -106
- package/dist/shared/ui/mciTabs/MciTabs.js +73 -55
- package/dist/shared/ui/mciTag/MciTag.js +27 -18
- package/dist/shared/ui/mciTextarea/MciTextarea.js +47 -35
- package/dist/shared/ui/mciToast/MciToast.js +118 -72
- package/dist/shared/ui/mciToast/mci-toast.utils.js +40 -12
- package/dist/shared/ui/mciToggle/MciToggle.js +58 -36
- package/dist/shared/ui/mciTooltip/MciTooltip.js +2 -2
- package/dist/shared/ui/mciUpload/MciUpload.js +172 -149
- package/dist/types/shared/types/mci-table.types.d.ts +1 -0
- package/dist/types/shared/types/ui/accordion.types.d.ts +1 -0
- package/dist/types/shared/types/ui/breadcrumb.types.d.ts +1 -0
- package/dist/types/shared/types/ui/button.types.d.ts +3 -7
- package/dist/types/shared/types/ui/check.types.d.ts +4 -9
- package/dist/types/shared/types/ui/collapse.types.d.ts +1 -0
- package/dist/types/shared/types/ui/drawer.types.d.ts +2 -0
- package/dist/types/shared/types/ui/input.types.d.ts +4 -15
- package/dist/types/shared/types/ui/modal.types.d.ts +1 -0
- package/dist/types/shared/types/ui/pagination.types.d.ts +1 -0
- package/dist/types/shared/types/ui/phone.types.d.ts +1 -0
- package/dist/types/shared/types/ui/picker.types.d.ts +1 -0
- package/dist/types/shared/types/ui/select.types.d.ts +1 -0
- package/dist/types/shared/types/ui/skeleton.types.d.ts +1 -0
- package/dist/types/shared/types/ui/tabs.types.d.ts +1 -0
- package/dist/types/shared/types/ui/tag.types.d.ts +1 -0
- package/dist/types/shared/types/ui/textarea.types.d.ts +3 -7
- package/dist/types/shared/types/ui/toast.types.d.ts +1 -0
- package/dist/types/shared/types/ui/toggle.types.d.ts +3 -2
- package/dist/types/shared/types/ui/upload.types.d.ts +1 -0
- package/dist/types/shared/ui/MciModal/MciModal.d.ts +1 -1
- package/dist/types/shared/ui/mciAccordion/MciAccordion.d.ts +5 -3
- package/dist/types/shared/ui/mciBreadcrumb/MciBreadcrumb.d.ts +1 -1
- package/dist/types/shared/ui/mciButton/MciButton.d.ts +1 -1
- package/dist/types/shared/ui/mciCollapse/MciCollapse.d.ts +1 -1
- package/dist/types/shared/ui/mciDrawer/MciDrawer.d.ts +1 -1
- package/dist/types/shared/ui/mciInput/MciInput.d.ts +13 -2
- package/dist/types/shared/ui/mciInput/mci-input.utils.d.ts +2 -2
- package/dist/types/shared/ui/mciPagination/MciPagination.d.ts +1 -1
- package/dist/types/shared/ui/mciPhone/mci-phone.utils.d.ts +2 -2
- package/dist/types/shared/ui/mciSelect/mci-select.utils.d.ts +2 -2
- package/dist/types/shared/ui/mciSkeleton/MciSkeleton.d.ts +1 -1
- package/dist/types/shared/ui/mciTable/MciTable.d.ts +1 -1
- package/dist/types/shared/ui/mciTable/MciTableColumnsPanel.d.ts +2 -1
- package/dist/types/shared/ui/mciTabs/MciTabs.d.ts +1 -1
- package/dist/types/shared/ui/mciTag/MciTag.d.ts +1 -1
- package/dist/types/shared/ui/mciTextarea/MciTextarea.d.ts +7 -2
- package/dist/types/shared/ui/mciToast/mci-toast.utils.d.ts +32 -4
- package/dist/types/shared/ui/mciToggle/MciToggle.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import { AltArrowRight as
|
|
3
|
-
import { cn as
|
|
4
|
-
function
|
|
5
|
-
items:
|
|
6
|
-
variant:
|
|
7
|
-
|
|
1
|
+
import { jsx as l, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { AltArrowRight as p } from "@solar-icons/react";
|
|
3
|
+
import { cn as a } from "../../lib/utils.js";
|
|
4
|
+
function w({
|
|
5
|
+
items: s,
|
|
6
|
+
variant: x = "blue",
|
|
7
|
+
darkMode: r = !1,
|
|
8
|
+
className: m
|
|
8
9
|
}) {
|
|
9
|
-
const
|
|
10
|
-
return /* @__PURE__ */ l("nav", { className:
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
|
|
10
|
+
const t = x === "blue", f = r ? t ? "hover:text-blue-400" : "hover:text-yellow-400" : t ? "hover:text-blue-600" : "hover:text-yellow-500", h = r ? t ? "text-blue-400" : "text-yellow-400" : t ? "text-blue-600" : "text-yellow-500", o = r ? "text-neutral-50" : "text-slate-500";
|
|
11
|
+
return /* @__PURE__ */ l("nav", { className: a("flex items-center", m), "aria-label": "Breadcrumb", children: s.map((e, c) => {
|
|
12
|
+
const i = c === s.length - 1;
|
|
13
|
+
return /* @__PURE__ */ n("div", { className: "flex items-center", children: [
|
|
14
|
+
i ? /* @__PURE__ */ n("span", { className: a("flex items-center gap-x-2 font-medium", h), children: [
|
|
14
15
|
e.icon,
|
|
15
16
|
/* @__PURE__ */ l("span", { children: e.label })
|
|
16
|
-
] }) : /* @__PURE__ */
|
|
17
|
+
] }) : /* @__PURE__ */ n(
|
|
17
18
|
"a",
|
|
18
19
|
{
|
|
19
20
|
href: e.href ?? "#",
|
|
20
|
-
onClick: (
|
|
21
|
-
e.onClick && (
|
|
21
|
+
onClick: (u) => {
|
|
22
|
+
e.onClick && (u.preventDefault(), e.onClick());
|
|
22
23
|
},
|
|
23
|
-
className:
|
|
24
|
-
"flex items-center gap-x-2 transition-all text-sm font-normal
|
|
25
|
-
|
|
24
|
+
className: a(
|
|
25
|
+
"flex items-center gap-x-2 transition-all text-sm font-normal",
|
|
26
|
+
o,
|
|
27
|
+
f
|
|
26
28
|
),
|
|
27
29
|
children: [
|
|
28
30
|
e.icon,
|
|
@@ -30,10 +32,10 @@ function b({
|
|
|
30
32
|
]
|
|
31
33
|
}
|
|
32
34
|
),
|
|
33
|
-
!
|
|
34
|
-
] },
|
|
35
|
+
!i && /* @__PURE__ */ l("span", { className: "mx-2 flex items-center", children: /* @__PURE__ */ l(p, { weight: "Linear", size: 20, className: o }) })
|
|
36
|
+
] }, c);
|
|
35
37
|
}) });
|
|
36
38
|
}
|
|
37
39
|
export {
|
|
38
|
-
|
|
40
|
+
w as default
|
|
39
41
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { Star2 as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as h, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cn as x } from "../../lib/utils.js";
|
|
3
|
+
import { Star2 as p } from "@solar-icons/react";
|
|
4
|
+
const m = {
|
|
5
5
|
sm: "h-9 px-2 text-sm gap-1.5 rounded-lg leading-9 min-w-9",
|
|
6
6
|
md: "h-10 px-2 text-base gap-2 rounded-lg leading-10 min-w-10",
|
|
7
7
|
base: "h-12 px-4 text-base gap-2 rounded-xl leading-12 min-w-12"
|
|
8
|
-
},
|
|
8
|
+
}, N = {
|
|
9
9
|
blue: {
|
|
10
10
|
primary: "bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800 focus:ring-2 focus:ring-[rgba(21,93,252,0.25)]",
|
|
11
11
|
secondary: "bg-blue-100 text-blue-600 hover:bg-blue-200 active:bg-blue-200 active:border active:border-blue-600 focus:ring-2 focus:ring-[rgba(21,93,252,0.25)]",
|
|
@@ -16,48 +16,63 @@ const v = {
|
|
|
16
16
|
secondary: "bg-yellow-50 text-yellow-500 hover:bg-yellow-100 active:bg-yellow-100 active:border active:border-yellow-500 focus:ring-2 focus:ring-yellow-200",
|
|
17
17
|
outline: "border border-yellow-500 text-yellow-500 hover:border-yellow-600 hover:text-yellow-600 active:border-yellow-700 active:text-yellow-700 focus:ring-2 focus:ring-yellow-200"
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, T = {
|
|
20
|
+
blue: {
|
|
21
|
+
primary: "bg-blue-500 text-black hover:bg-blue-400 active:bg-blue-300 focus:ring-2 focus:ring-blue-500",
|
|
22
|
+
secondary: "border border-blue-900 bg-blue-900 text-blue-500 hover:bg-blue-700 active:bg-blue-700 active:border-blue-700 focus:ring-2 focus:ring-blue-900",
|
|
23
|
+
outline: "border border-blue-500 text-blue-500 hover:border-blue-400 hover:text-blue-400 active:text-blue-300 active:border-blue-300 focus:ring-2 focus:ring-blue-500"
|
|
24
|
+
},
|
|
25
|
+
yellow: {
|
|
26
|
+
primary: "bg-yellow-400 text-slate-950 hover:bg-yellow-300 active:bg-yellow-200 focus:ring-2 focus:ring-yellow-300/40",
|
|
27
|
+
secondary: "border border-slate-700 bg-slate-800 text-yellow-300 hover:bg-slate-700 active:bg-slate-600 focus:ring-2 focus:ring-yellow-300/30",
|
|
28
|
+
outline: "border border-yellow-400 text-yellow-300 hover:bg-yellow-500/10 hover:border-yellow-300 hover:text-yellow-200 active:bg-yellow-500/20 active:border-yellow-200 focus:ring-2 focus:ring-yellow-300/30"
|
|
29
|
+
}
|
|
30
|
+
}, _ = {
|
|
20
31
|
danger: "bg-red-600 text-white hover:bg-red-700 active:bg-red-800 focus:ring-2 focus:shadow-red",
|
|
21
32
|
tertiary: "bg-slate-100 text-black hover:bg-slate-200 active:bg-slate-300 focus:ring-2 focus:shadow-slate"
|
|
33
|
+
}, A = {
|
|
34
|
+
danger: "bg-red-500 text-black hover:bg-red-300 active:bg-red-200 focus:ring-2 focus:ring-red-500/35",
|
|
35
|
+
tertiary: "bg-neutral-300 text-white hover:bg-neutral-200 focus:ring-2 focus:ring-slate-200/80"
|
|
22
36
|
};
|
|
23
|
-
function
|
|
24
|
-
children:
|
|
25
|
-
text:
|
|
26
|
-
icon:
|
|
37
|
+
function S({
|
|
38
|
+
children: u,
|
|
39
|
+
text: c,
|
|
40
|
+
icon: r,
|
|
27
41
|
iconPosition: s = "left",
|
|
28
|
-
size:
|
|
42
|
+
size: g = "base",
|
|
29
43
|
variant: e = "primary",
|
|
30
|
-
color:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
className:
|
|
35
|
-
type:
|
|
44
|
+
color: a = "yellow",
|
|
45
|
+
darkMode: t = !1,
|
|
46
|
+
loading: l = !1,
|
|
47
|
+
disabled: d = !1,
|
|
48
|
+
className: f,
|
|
49
|
+
type: w = "button",
|
|
50
|
+
...v
|
|
36
51
|
}) {
|
|
37
|
-
const
|
|
38
|
-
return /* @__PURE__ */
|
|
52
|
+
const n = u ?? c, i = e === "primary" || e === "secondary" || e === "outline" ? t ? T[a][e] : N[a][e] : t ? A[e] : _[e], b = d || l, y = b ? e === "outline" ? t ? "border-neutral-200 bg-transparent text-neutral-100 cursor-not-allowed hover:bg-transparent hover:border-neutral-200 hover:text-neutral-100 active:border-neutral-200 active:text-neutral-100 active:bg-transparent focus:bg-transparent focus:ring-0" : "border-slate-200 bg-white text-slate-400 cursor-not-allowed hover:bg-transparent hover:border-slate-200 hover:text-slate-400 active:border-slate-200 active:text-slate-400 active:bg-transparent focus:bg-transparent focus:ring-0" : t ? "bg-neutral-200 text-neutral-100 cursor-not-allowed focus:ring-0" : "border-neutral-200 text-neutral-100 cursor-not-allowed focus:ring-0" : "";
|
|
53
|
+
return /* @__PURE__ */ h(
|
|
39
54
|
"button",
|
|
40
55
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
disabled:
|
|
44
|
-
className:
|
|
56
|
+
...v,
|
|
57
|
+
type: w,
|
|
58
|
+
disabled: b,
|
|
59
|
+
className: x(
|
|
45
60
|
"inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap text-center font-medium transition-all duration-200 cursor-pointer",
|
|
46
|
-
|
|
61
|
+
m[g],
|
|
47
62
|
i,
|
|
48
|
-
!
|
|
49
|
-
|
|
50
|
-
|
|
63
|
+
!b && i,
|
|
64
|
+
y,
|
|
65
|
+
f
|
|
51
66
|
),
|
|
52
67
|
children: [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
68
|
+
r && s === "left" && !l && /* @__PURE__ */ o("span", { className: "flex items-center", children: r }),
|
|
69
|
+
n && /* @__PURE__ */ o("span", { className: "whitespace-nowrap", children: n }),
|
|
70
|
+
r && s === "right" && !l && /* @__PURE__ */ o("span", { className: "flex items-center", children: r }),
|
|
71
|
+
l && /* @__PURE__ */ o(p, { weight: "Linear", size: 20, className: "animate-spin" })
|
|
57
72
|
]
|
|
58
73
|
}
|
|
59
74
|
);
|
|
60
75
|
}
|
|
61
76
|
export {
|
|
62
|
-
|
|
77
|
+
S as default
|
|
63
78
|
};
|
|
@@ -1,170 +1,194 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as h, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { memo as F, useState as S, useMemo as v, useCallback as H } from "react";
|
|
3
|
+
import L from "../../../assets/icons/check.svg.js";
|
|
4
|
+
import { cn as l } from "../../lib/utils.js";
|
|
5
|
+
const $ = {
|
|
6
6
|
blue: {
|
|
7
7
|
border: "border-blue-600",
|
|
8
8
|
bg: "bg-blue-600",
|
|
9
9
|
hover: "hover:border-blue-600 hover:bg-blue-100",
|
|
10
|
-
focus: "focus:shadow-blue"
|
|
10
|
+
focus: "peer-focus-visible:shadow-blue",
|
|
11
|
+
darkFocus: "peer-focus-visible:shadow-[0_0_0_2px_var(--opacity-25,rgba(21,93,252,0.25))]",
|
|
12
|
+
darkBorder: "border-blue-500",
|
|
13
|
+
darkBg: "bg-blue-500",
|
|
14
|
+
darkHover: "hover:border-blue-500 hover:bg-blue-500"
|
|
11
15
|
},
|
|
12
16
|
yellow: {
|
|
13
17
|
border: "border-yellow-500",
|
|
14
18
|
bg: "bg-yellow-500",
|
|
15
|
-
hover: "hover:border-yellow-500 hover:bg-
|
|
16
|
-
focus: "focus:ring-2 focus:ring-yellow-300"
|
|
19
|
+
hover: "hover:border-yellow-500 hover:bg-yellow-100",
|
|
20
|
+
focus: "peer-focus-visible:ring-2 peer-focus-visible:ring-yellow-300",
|
|
21
|
+
darkFocus: "peer-focus-visible:ring-2 peer-focus-visible:ring-yellow-300/40",
|
|
22
|
+
darkBorder: "border-yellow-500",
|
|
23
|
+
darkBg: "bg-yellow-500",
|
|
24
|
+
darkHover: "hover:border-yellow-500 hover:bg-yellow-500"
|
|
17
25
|
}
|
|
18
|
-
},
|
|
19
|
-
type:
|
|
26
|
+
}, A = F(function({
|
|
27
|
+
type: m = "checkbox",
|
|
20
28
|
label: c,
|
|
21
|
-
supportText:
|
|
22
|
-
checked:
|
|
23
|
-
onChange:
|
|
24
|
-
error:
|
|
25
|
-
disabled:
|
|
26
|
-
required:
|
|
27
|
-
className:
|
|
29
|
+
supportText: i,
|
|
30
|
+
checked: u,
|
|
31
|
+
onChange: d,
|
|
32
|
+
error: o,
|
|
33
|
+
disabled: n = !1,
|
|
34
|
+
required: f = !1,
|
|
35
|
+
className: w,
|
|
28
36
|
variant: p = "yellow",
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
darkMode: e = !1,
|
|
38
|
+
name: g,
|
|
39
|
+
value: N,
|
|
40
|
+
...B
|
|
31
41
|
}) {
|
|
32
|
-
const [y,
|
|
33
|
-
() =>
|
|
34
|
-
[
|
|
35
|
-
),
|
|
42
|
+
const [y, k] = S(!1), s = m === "radio", r = v(
|
|
43
|
+
() => u ?? y,
|
|
44
|
+
[u, y]
|
|
45
|
+
), C = H(
|
|
36
46
|
(t) => {
|
|
37
|
-
|
|
47
|
+
n || (u === void 0 && k(t.target.checked), d?.(t));
|
|
38
48
|
},
|
|
39
|
-
[
|
|
40
|
-
),
|
|
41
|
-
if (
|
|
42
|
-
const
|
|
49
|
+
[u, d, n]
|
|
50
|
+
), x = v(() => {
|
|
51
|
+
if (n) {
|
|
52
|
+
const b = e ? "border-neutral-200 bg-neutral-300/60" : "border-slate-200 bg-slate-100";
|
|
43
53
|
return s ? {
|
|
44
|
-
container:
|
|
45
|
-
dot: e ? "bg-slate-300" : "bg-transparent",
|
|
46
|
-
check: "text-slate-400"
|
|
54
|
+
container: b,
|
|
55
|
+
dot: r ? e ? "bg-neutral-100/70" : "bg-slate-300" : "bg-transparent",
|
|
56
|
+
check: e ? "text-neutral-100/50" : "text-slate-400"
|
|
47
57
|
} : {
|
|
48
|
-
container:
|
|
58
|
+
container: b,
|
|
49
59
|
dot: "",
|
|
50
|
-
check: e ? "text-slate-400" : "text-transparent"
|
|
60
|
+
check: r ? e ? "text-neutral-100/50" : "text-slate-400" : "text-transparent"
|
|
51
61
|
};
|
|
52
62
|
}
|
|
53
|
-
const t =
|
|
63
|
+
const t = $[p];
|
|
54
64
|
if (s) {
|
|
55
|
-
const
|
|
65
|
+
const b = l(
|
|
56
66
|
"border transition-all duration-200",
|
|
57
|
-
e ? t.border : "border-slate-400",
|
|
58
|
-
!
|
|
59
|
-
t.focus,
|
|
60
|
-
|
|
61
|
-
),
|
|
67
|
+
r ? e ? t.darkBorder : t.border : e ? "border-neutral-200 bg-transparent" : "border-slate-400",
|
|
68
|
+
!r && (e ? "hover:border-neutral-100 hover:bg-neutral-300" : t.hover),
|
|
69
|
+
e ? t.darkFocus : t.focus,
|
|
70
|
+
r && ""
|
|
71
|
+
), j = l(
|
|
62
72
|
"transition-all duration-200 rounded-full",
|
|
63
|
-
e ? t.bg : "bg-transparent"
|
|
73
|
+
r ? e ? "bg-white" : t.bg : "bg-transparent"
|
|
64
74
|
);
|
|
65
75
|
return {
|
|
66
|
-
container:
|
|
67
|
-
dot:
|
|
76
|
+
container: b,
|
|
77
|
+
dot: j,
|
|
68
78
|
check: ""
|
|
69
79
|
};
|
|
70
80
|
}
|
|
71
81
|
return {
|
|
72
|
-
container:
|
|
82
|
+
container: l(
|
|
73
83
|
"border transition-all duration-200",
|
|
74
|
-
e ?
|
|
75
|
-
!
|
|
76
|
-
t.
|
|
84
|
+
r ? l(e ? t.darkBg : t.bg, e ? t.darkBorder : t.border) : e ? "border-neutral-200 bg-transparent" : "border-slate-400",
|
|
85
|
+
!r && (e ? "hover:border-neutral-100 hover:bg-neutral-300" : t.hover),
|
|
86
|
+
r && e && t.darkHover,
|
|
87
|
+
e ? t.darkFocus : t.focus
|
|
77
88
|
),
|
|
78
89
|
dot: "",
|
|
79
|
-
check:
|
|
90
|
+
check: r ? "text-white" : "text-transparent"
|
|
80
91
|
};
|
|
81
|
-
}, [s,
|
|
82
|
-
c && /* @__PURE__ */
|
|
92
|
+
}, [s, r, n, p, e]), _ = v(() => !c && !i ? null : /* @__PURE__ */ h("div", { className: "flex flex-col", children: [
|
|
93
|
+
c && /* @__PURE__ */ h(
|
|
83
94
|
"span",
|
|
84
95
|
{
|
|
85
|
-
className:
|
|
86
|
-
"text-base font-medium
|
|
87
|
-
|
|
88
|
-
|
|
96
|
+
className: l(
|
|
97
|
+
"text-base font-medium",
|
|
98
|
+
o && (e ? "text-red-500" : "text-red-600"),
|
|
99
|
+
!o && (e ? "text-neutral-50" : "text-slate-700"),
|
|
100
|
+
n && (e ? "text-neutral-50/50" : "text-slate-400")
|
|
89
101
|
),
|
|
90
102
|
children: [
|
|
91
103
|
c,
|
|
92
|
-
|
|
104
|
+
f && /* @__PURE__ */ a("span", { className: "text-extra-small text-red-600 ml-1", children: "*" })
|
|
93
105
|
]
|
|
94
106
|
}
|
|
95
107
|
),
|
|
96
|
-
|
|
108
|
+
i && /* @__PURE__ */ a(
|
|
97
109
|
"span",
|
|
98
110
|
{
|
|
99
|
-
className:
|
|
100
|
-
"text-
|
|
101
|
-
|
|
111
|
+
className: l(
|
|
112
|
+
"text-base font-normal",
|
|
113
|
+
e ? "text-neutral-100" : "text-slate-500",
|
|
114
|
+
n && (e ? "text-neutral-100/50" : "text-slate-400")
|
|
102
115
|
),
|
|
103
|
-
children:
|
|
116
|
+
children: i
|
|
104
117
|
}
|
|
105
118
|
)
|
|
106
|
-
] }), [c,
|
|
107
|
-
return /* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
119
|
+
] }), [c, i, o, n, f, e]);
|
|
120
|
+
return /* @__PURE__ */ h("div", { className: l("flex items-start", w), children: [
|
|
121
|
+
/* @__PURE__ */ h(
|
|
109
122
|
"label",
|
|
110
123
|
{
|
|
111
|
-
className:
|
|
124
|
+
className: l(
|
|
112
125
|
"flex items-start gap-2 select-none",
|
|
113
|
-
|
|
126
|
+
n ? "cursor-not-allowed" : "cursor-pointer"
|
|
114
127
|
),
|
|
115
128
|
children: [
|
|
116
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ a(
|
|
117
130
|
"input",
|
|
118
131
|
{
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"
|
|
126
|
-
"aria-
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
...B,
|
|
133
|
+
type: m,
|
|
134
|
+
checked: r,
|
|
135
|
+
onChange: C,
|
|
136
|
+
disabled: n,
|
|
137
|
+
required: f,
|
|
138
|
+
className: "peer sr-only",
|
|
139
|
+
"aria-invalid": !!o,
|
|
140
|
+
"aria-describedby": o ? `${g}-error` : void 0,
|
|
141
|
+
name: g,
|
|
142
|
+
value: N
|
|
129
143
|
}
|
|
130
144
|
),
|
|
131
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ a(
|
|
132
146
|
"div",
|
|
133
147
|
{
|
|
134
|
-
className:
|
|
148
|
+
className: l(
|
|
135
149
|
"relative flex items-center justify-center",
|
|
136
150
|
s ? "w-5 h-5 rounded-full" : "w-5 h-5 rounded",
|
|
137
|
-
|
|
151
|
+
x.container
|
|
138
152
|
),
|
|
139
|
-
children: s ? /* @__PURE__ */
|
|
153
|
+
children: s ? /* @__PURE__ */ a("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ a(
|
|
140
154
|
"span",
|
|
141
155
|
{
|
|
142
|
-
className:
|
|
156
|
+
className: l(
|
|
143
157
|
"w-3 h-3 rounded-full transition-all duration-200",
|
|
144
|
-
|
|
145
|
-
|
|
158
|
+
x.dot,
|
|
159
|
+
r ? "opacity-100 scale-100" : "opacity-0 scale-50"
|
|
146
160
|
)
|
|
147
161
|
}
|
|
148
|
-
) }) : /* @__PURE__ */
|
|
149
|
-
|
|
162
|
+
) }) : /* @__PURE__ */ a(
|
|
163
|
+
L,
|
|
150
164
|
{
|
|
151
|
-
className:
|
|
165
|
+
className: l(
|
|
152
166
|
"w-4 h-4 stroke-[2.5px] transition-opacity duration-200",
|
|
153
|
-
|
|
154
|
-
|
|
167
|
+
x.check,
|
|
168
|
+
r ? "opacity-100" : "opacity-0"
|
|
155
169
|
)
|
|
156
170
|
}
|
|
157
171
|
)
|
|
158
172
|
}
|
|
159
173
|
),
|
|
160
|
-
|
|
174
|
+
_
|
|
161
175
|
]
|
|
162
176
|
}
|
|
163
177
|
),
|
|
164
|
-
|
|
178
|
+
o && /* @__PURE__ */ a(
|
|
179
|
+
"p",
|
|
180
|
+
{
|
|
181
|
+
id: `${g}-error`,
|
|
182
|
+
className: l(
|
|
183
|
+
"mt-1 text-extra-small",
|
|
184
|
+
e ? "text-red-500" : "text-red-600"
|
|
185
|
+
),
|
|
186
|
+
children: o
|
|
187
|
+
}
|
|
188
|
+
)
|
|
165
189
|
] });
|
|
166
190
|
});
|
|
167
|
-
|
|
191
|
+
A.displayName = "MciCheck";
|
|
168
192
|
export {
|
|
169
|
-
|
|
193
|
+
A as default
|
|
170
194
|
};
|
|
@@ -1,60 +1,92 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { AltArrowDown as
|
|
3
|
-
import { useState as i, useRef as
|
|
4
|
-
import { cn as
|
|
5
|
-
function
|
|
6
|
-
title:
|
|
7
|
-
children:
|
|
8
|
-
defaultOpen:
|
|
9
|
-
icon:
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsxs as o, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { AltArrowDown as N } from "@solar-icons/react";
|
|
3
|
+
import { useState as i, useRef as _, useEffect as j } from "react";
|
|
4
|
+
import { cn as t } from "../../lib/utils.js";
|
|
5
|
+
function R({
|
|
6
|
+
title: c,
|
|
7
|
+
children: a,
|
|
8
|
+
defaultOpen: u = !1,
|
|
9
|
+
icon: l,
|
|
10
|
+
darkMode: e = !1,
|
|
11
|
+
className: b,
|
|
12
|
+
contentClassName: h
|
|
12
13
|
}) {
|
|
13
|
-
const [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}, [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
14
|
+
const [r, d] = i(u), [p, f] = i(0), n = _(null);
|
|
15
|
+
j(() => {
|
|
16
|
+
n.current && f(r ? n.current.scrollHeight : 0);
|
|
17
|
+
}, [r, a]);
|
|
18
|
+
const g = e ? "border-neutral-200 bg-neutral-300 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]" : "border-slate-200 bg-white", m = e ? [
|
|
19
|
+
"bg-neutral-300/70 hover:bg-neutral-200/80",
|
|
20
|
+
r ? "border-b border-neutral-200 shadow-[inset_0_-1px_0_rgba(255,255,255,0.02)]" : "border-b border-transparent"
|
|
21
|
+
] : [
|
|
22
|
+
"hover:bg-slate-50",
|
|
23
|
+
r ? "border-b border-slate-200" : "border-b border-transparent"
|
|
24
|
+
], x = e ? "text-neutral-50 group-hover:text-white" : "text-black", w = e ? "text-neutral-100" : "text-slate-500", v = e ? "text-neutral-100 group-hover:text-neutral-50" : "text-slate-400", C = e ? "bg-[#22242A]" : "bg-white";
|
|
25
|
+
return /* @__PURE__ */ o(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: t(
|
|
29
|
+
"overflow-hidden rounded-xl border",
|
|
30
|
+
g,
|
|
31
|
+
b
|
|
32
|
+
),
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ o(
|
|
35
|
+
"button",
|
|
36
|
+
{
|
|
37
|
+
onClick: () => d(!r),
|
|
38
|
+
className: t(
|
|
39
|
+
"group flex w-full items-center justify-between p-5 transition-all duration-300 hover:cursor-pointer",
|
|
40
|
+
m
|
|
41
|
+
),
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
44
|
+
l && /* @__PURE__ */ s("span", { className: t("shrink-0", w), children: l }),
|
|
45
|
+
/* @__PURE__ */ s("div", { className: t("text-base font-medium transition-colors duration-300", x), children: c })
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ s(
|
|
48
|
+
N,
|
|
49
|
+
{
|
|
50
|
+
weight: "Linear",
|
|
51
|
+
size: 20,
|
|
52
|
+
className: t(
|
|
53
|
+
"shrink-0 transition-all duration-300",
|
|
54
|
+
v,
|
|
55
|
+
r && "rotate-180"
|
|
56
|
+
)
|
|
57
|
+
}
|
|
38
58
|
)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
/* @__PURE__ */ r(
|
|
45
|
-
"div",
|
|
46
|
-
{
|
|
47
|
-
className: e(
|
|
48
|
-
"overflow-hidden transition-all duration-300 ease-out"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
49
61
|
),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
/* @__PURE__ */ s(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: t(
|
|
66
|
+
"overflow-hidden transition-all duration-300 ease-out",
|
|
67
|
+
C
|
|
68
|
+
),
|
|
69
|
+
style: {
|
|
70
|
+
height: `${p}px`
|
|
71
|
+
},
|
|
72
|
+
children: /* @__PURE__ */ s(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
ref: n,
|
|
76
|
+
className: t(
|
|
77
|
+
"p-5",
|
|
78
|
+
e && "text-neutral-100",
|
|
79
|
+
h
|
|
80
|
+
),
|
|
81
|
+
children: a
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
57
89
|
}
|
|
58
90
|
export {
|
|
59
|
-
|
|
91
|
+
R as default
|
|
60
92
|
};
|