@mci-ui/mci-ui 0.0.85 → 0.0.87
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/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 +70 -52
- 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 +125 -104
- package/dist/shared/ui/mciTabs/MciTabs.js +52 -45
- 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 +2 -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 +1 -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/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 +4 -2
- 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,39 +1,67 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { Refresh as
|
|
3
|
-
const
|
|
4
|
-
success: /* @__PURE__ */ t(
|
|
5
|
-
error: /* @__PURE__ */ t(
|
|
6
|
-
warning: /* @__PURE__ */ t(
|
|
7
|
-
info: /* @__PURE__ */ t(
|
|
8
|
-
loading: /* @__PURE__ */ t(
|
|
2
|
+
import { Refresh as r, InfoCircle as n, DangerCircle as l, CloseCircle as o, CheckCircle as g } from "@solar-icons/react";
|
|
3
|
+
const s = {
|
|
4
|
+
success: /* @__PURE__ */ t(g, { weight: "Bold", className: "w-5 h-5" }),
|
|
5
|
+
error: /* @__PURE__ */ t(o, { weight: "Bold", className: "w-5 h-5" }),
|
|
6
|
+
warning: /* @__PURE__ */ t(l, { weight: "Bold", className: "w-5 h-5" }),
|
|
7
|
+
info: /* @__PURE__ */ t(n, { weight: "Bold", className: "w-5 h-5" }),
|
|
8
|
+
loading: /* @__PURE__ */ t(r, { weight: "Bold", className: "w-5 h-5 animate-spin" })
|
|
9
9
|
}, c = {
|
|
10
10
|
bg: {
|
|
11
11
|
success: "bg-green-50",
|
|
12
12
|
error: "bg-red-50",
|
|
13
|
-
warning: "bg-
|
|
13
|
+
warning: "bg-yellow-50",
|
|
14
14
|
info: "bg-blue-50",
|
|
15
15
|
loading: "bg-slate-50"
|
|
16
16
|
},
|
|
17
|
+
bgDark: {
|
|
18
|
+
success: "bg-green-950",
|
|
19
|
+
error: "bg-red-950",
|
|
20
|
+
warning: "bg-yellow-900",
|
|
21
|
+
info: "bg-blue-900",
|
|
22
|
+
loading: "bg-slate-900"
|
|
23
|
+
},
|
|
17
24
|
line: {
|
|
18
25
|
success: "bg-green-600",
|
|
19
26
|
error: "bg-red-600",
|
|
20
|
-
warning: "bg-
|
|
27
|
+
warning: "bg-yellow-600",
|
|
21
28
|
info: "bg-blue-600",
|
|
22
29
|
loading: "bg-slate-600"
|
|
23
30
|
},
|
|
31
|
+
lineDark: {
|
|
32
|
+
success: "bg-green-400",
|
|
33
|
+
error: "bg-red-400",
|
|
34
|
+
warning: "bg-yellow-400",
|
|
35
|
+
info: "bg-blue-400",
|
|
36
|
+
loading: "bg-slate-400"
|
|
37
|
+
},
|
|
24
38
|
text: {
|
|
25
39
|
success: "text-green-600",
|
|
26
40
|
error: "text-red-600",
|
|
27
|
-
warning: "text-
|
|
41
|
+
warning: "text-yellow-600",
|
|
28
42
|
info: "text-blue-600",
|
|
29
43
|
loading: "text-slate-600"
|
|
30
44
|
},
|
|
45
|
+
textDark: {
|
|
46
|
+
success: "text-green-400",
|
|
47
|
+
error: "text-red-400",
|
|
48
|
+
warning: "text-yellow-400",
|
|
49
|
+
info: "text-blue-400",
|
|
50
|
+
loading: "text-slate-400"
|
|
51
|
+
},
|
|
31
52
|
action: {
|
|
32
53
|
success: "text-green-600",
|
|
33
54
|
error: "text-red-600",
|
|
34
|
-
warning: "text-
|
|
55
|
+
warning: "text-yellow-600",
|
|
35
56
|
info: "text-blue-600",
|
|
36
57
|
loading: "text-slate-600"
|
|
58
|
+
},
|
|
59
|
+
actionDark: {
|
|
60
|
+
success: "text-green-400",
|
|
61
|
+
error: "text-red-400",
|
|
62
|
+
warning: "text-yellow-400",
|
|
63
|
+
info: "text-blue-400",
|
|
64
|
+
loading: "text-slate-400"
|
|
37
65
|
}
|
|
38
66
|
};
|
|
39
67
|
function d() {
|
|
@@ -41,7 +69,7 @@ function d() {
|
|
|
41
69
|
return e || (e = document.createElement("div"), e.id = "mci-toast-container", e.className = "fixed top-4 right-4 z-[9999] flex flex-col gap-3 pointer-events-none", document.body.appendChild(e)), e;
|
|
42
70
|
}
|
|
43
71
|
export {
|
|
44
|
-
|
|
72
|
+
s as TOAST_ICONS,
|
|
45
73
|
c as TOAST_STYLES,
|
|
46
74
|
d as getOrCreateToastContainer
|
|
47
75
|
};
|
|
@@ -1,77 +1,99 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
2
|
-
import { cn as
|
|
3
|
-
const
|
|
1
|
+
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n } from "../../lib/utils.js";
|
|
3
|
+
const b = {
|
|
4
4
|
blue: {
|
|
5
5
|
active: "bg-blue-600",
|
|
6
6
|
hover: "hover:bg-blue-600",
|
|
7
|
-
focus: "focus:shadow-blue"
|
|
7
|
+
focus: "focus:shadow-blue",
|
|
8
|
+
darkActive: "bg-blue-500",
|
|
9
|
+
darkHover: "hover:bg-blue-500"
|
|
8
10
|
},
|
|
9
11
|
yellow: {
|
|
10
12
|
active: "bg-yellow-500",
|
|
11
13
|
hover: "hover:bg-yellow-500",
|
|
12
|
-
focus: "focus:ring-2 focus:ring-yellow-200"
|
|
14
|
+
focus: "focus:ring-2 focus:ring-yellow-200",
|
|
15
|
+
darkActive: "bg-yellow-500",
|
|
16
|
+
darkHover: "hover:bg-yellow-500"
|
|
13
17
|
}
|
|
14
18
|
};
|
|
15
|
-
function
|
|
16
|
-
checked:
|
|
19
|
+
function m({
|
|
20
|
+
checked: l = !1,
|
|
17
21
|
onChange: i,
|
|
18
|
-
disabled:
|
|
22
|
+
disabled: t = !1,
|
|
19
23
|
variant: s = "yellow",
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
darkMode: e = !1,
|
|
25
|
+
label: a,
|
|
26
|
+
supportText: u,
|
|
27
|
+
className: g,
|
|
28
|
+
...f
|
|
23
29
|
}) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
};
|
|
30
|
+
const v = () => {
|
|
31
|
+
t || i?.(!l);
|
|
32
|
+
}, o = b[s];
|
|
27
33
|
return /* @__PURE__ */ c(
|
|
28
34
|
"div",
|
|
29
35
|
{
|
|
30
|
-
className:
|
|
36
|
+
className: n(
|
|
31
37
|
"flex items-start gap-3 select-none",
|
|
32
|
-
|
|
38
|
+
g
|
|
33
39
|
),
|
|
34
40
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ r(
|
|
36
42
|
"button",
|
|
37
43
|
{
|
|
44
|
+
...f,
|
|
38
45
|
type: "button",
|
|
39
|
-
disabled:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
disabled: t,
|
|
47
|
+
onClick: v,
|
|
48
|
+
className: n(
|
|
49
|
+
"relative h-6 w-11 rounded-xl transition-all duration-300 outline-none",
|
|
50
|
+
t ? "cursor-not-allowed" : "cursor-pointer",
|
|
51
|
+
l ? e ? o.darkActive : o.active : e ? "bg-neutral-200" : "bg-slate-200",
|
|
52
|
+
!t && l && (e ? o.darkHover : o.hover),
|
|
53
|
+
!t && !l && (e ? "hover:bg-neutral-100" : "hover:bg-slate-300"),
|
|
54
|
+
!t && o.focus,
|
|
55
|
+
e && !t && s === "blue" && "focus-visible:shadow-[0_0_0_2px_var(--opacity-25,rgba(21,93,252,0.25))]",
|
|
56
|
+
e && !t && s === "yellow" && "focus-visible:ring-2 focus-visible:ring-yellow-300/40",
|
|
57
|
+
t && (e ? "bg-neutral-200/60" : "bg-slate-100")
|
|
46
58
|
),
|
|
47
|
-
|
|
48
|
-
children: /* @__PURE__ */ l(
|
|
59
|
+
children: /* @__PURE__ */ r(
|
|
49
60
|
"span",
|
|
50
61
|
{
|
|
51
|
-
className:
|
|
52
|
-
"absolute top-1/2 left-0.5 h-5 w-5 -translate-y-1/2 rounded-full transition-all duration-300
|
|
53
|
-
|
|
62
|
+
className: n(
|
|
63
|
+
"absolute top-1/2 left-0.5 h-5 w-5 -translate-y-1/2 rounded-full transition-all duration-300",
|
|
64
|
+
e ? "bg-black" : "bg-white",
|
|
65
|
+
l && "translate-x-5"
|
|
54
66
|
)
|
|
55
67
|
}
|
|
56
68
|
)
|
|
57
69
|
}
|
|
58
70
|
),
|
|
59
|
-
(
|
|
60
|
-
|
|
71
|
+
(a || u) && /* @__PURE__ */ c("div", { className: "flex flex-col leading-tight", children: [
|
|
72
|
+
a && /* @__PURE__ */ r(
|
|
61
73
|
"span",
|
|
62
74
|
{
|
|
63
|
-
className:
|
|
64
|
-
"text-base font-medium
|
|
75
|
+
className: n(
|
|
76
|
+
"text-base font-medium",
|
|
77
|
+
e ? t ? "text-neutral-50/50" : "text-neutral-50" : t ? "text-slate-400" : "text-black"
|
|
65
78
|
),
|
|
66
|
-
children:
|
|
79
|
+
children: a
|
|
67
80
|
}
|
|
68
81
|
),
|
|
69
|
-
|
|
82
|
+
u && /* @__PURE__ */ r(
|
|
83
|
+
"span",
|
|
84
|
+
{
|
|
85
|
+
className: n(
|
|
86
|
+
"text-sm font-normal",
|
|
87
|
+
e ? t ? "text-neutral-100/50" : "text-neutral-100" : t ? "text-slate-400" : "text-slate-500"
|
|
88
|
+
),
|
|
89
|
+
children: u
|
|
90
|
+
}
|
|
91
|
+
)
|
|
70
92
|
] })
|
|
71
93
|
]
|
|
72
94
|
}
|
|
73
95
|
);
|
|
74
96
|
}
|
|
75
97
|
export {
|
|
76
|
-
|
|
98
|
+
m as default
|
|
77
99
|
};
|
|
@@ -24,7 +24,7 @@ function m({
|
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
26
|
className: e(
|
|
27
|
-
"absolute z-50 rounded-md bg-slate-
|
|
27
|
+
"absolute z-50 rounded-md bg-slate-800 px-2 py-1 text-xs whitespace-nowrap text-white shadow-md",
|
|
28
28
|
"scale-95 opacity-0 transition-all group-hover:scale-100 group-hover:opacity-100",
|
|
29
29
|
"duration-200 ease-out group-hover:delay-200",
|
|
30
30
|
i[t],
|
|
@@ -37,7 +37,7 @@ function m({
|
|
|
37
37
|
"span",
|
|
38
38
|
{
|
|
39
39
|
className: e(
|
|
40
|
-
"absolute h-2 w-2 rotate-45 bg-slate-
|
|
40
|
+
"absolute h-2 w-2 rotate-45 bg-slate-800",
|
|
41
41
|
p[t]
|
|
42
42
|
)
|
|
43
43
|
}
|