@mci-ui/mci-ui 0.0.8 → 0.0.9
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.es.js +29 -29
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -3302,19 +3302,19 @@ function kr({
|
|
|
3302
3302
|
r
|
|
3303
3303
|
),
|
|
3304
3304
|
"aria-label": "Breadcrumb",
|
|
3305
|
-
children: e
|
|
3306
|
-
const l = a === e
|
|
3305
|
+
children: e?.map((t, a) => {
|
|
3306
|
+
const l = a === e?.length - 1;
|
|
3307
3307
|
return /* @__PURE__ */ s.jsxs("div", { className: "flex items-center", children: [
|
|
3308
|
-
t
|
|
3308
|
+
t?.href ? /* @__PURE__ */ s.jsx(
|
|
3309
3309
|
"a",
|
|
3310
3310
|
{
|
|
3311
|
-
href: t
|
|
3312
|
-
onClick: t
|
|
3311
|
+
href: t?.href,
|
|
3312
|
+
onClick: t?.onClick,
|
|
3313
3313
|
className: g(
|
|
3314
3314
|
"hover:text-primary-600 dark:hover:text-primary-400 transition-colors",
|
|
3315
3315
|
l && "text-primary-600 dark:text-primary-400"
|
|
3316
3316
|
),
|
|
3317
|
-
children: t
|
|
3317
|
+
children: t?.label
|
|
3318
3318
|
}
|
|
3319
3319
|
) : /* @__PURE__ */ s.jsx(
|
|
3320
3320
|
"span",
|
|
@@ -3322,7 +3322,7 @@ function kr({
|
|
|
3322
3322
|
className: g(
|
|
3323
3323
|
l ? "text-primary-600 dark:text-primary-400" : "text-gray-500 dark:text-gray-400"
|
|
3324
3324
|
),
|
|
3325
|
-
children: t
|
|
3325
|
+
children: t?.label
|
|
3326
3326
|
}
|
|
3327
3327
|
),
|
|
3328
3328
|
!l && /* @__PURE__ */ s.jsx("span", { className: "mx-2 flex items-center", children: o })
|
|
@@ -3649,7 +3649,7 @@ function Nr({
|
|
|
3649
3649
|
return h < E ? c.direction === "asc" ? -1 : 1 : h > E ? c.direction === "asc" ? 1 : -1 : 0;
|
|
3650
3650
|
}), [r, c]), y = (f) => {
|
|
3651
3651
|
f.sortable && d((k) => !k || k.key !== f.key ? { key: f.key, direction: "asc" } : k.direction === "asc" ? { key: f.key, direction: "desc" } : k.direction === "desc" ? { key: f.key, direction: null } : null);
|
|
3652
|
-
}, A = (f) => f
|
|
3652
|
+
}, A = (f) => f?.sortable ? !c || c.key !== f?.key || !c.direction ? /* @__PURE__ */ s.jsx(lt, { size: 15, className: "opacity-40" }) : c.direction === "asc" ? /* @__PURE__ */ s.jsx(bt, { size: 15 }) : /* @__PURE__ */ s.jsx(Fe, { size: 15 }) : null, R = g(
|
|
3653
3653
|
"w-full border-separate border-spacing-0 transition-all duration-300",
|
|
3654
3654
|
t === "clean" && "bg-white",
|
|
3655
3655
|
t === "elevated" && "bg-white shadow-lg",
|
|
@@ -3664,14 +3664,14 @@ function Nr({
|
|
|
3664
3664
|
return /* @__PURE__ */ s.jsxs("div", { className: "w-full space-y-3", children: [
|
|
3665
3665
|
l && /* @__PURE__ */ s.jsx("div", { className: "flex justify-between items-center mb-2", children: l }),
|
|
3666
3666
|
/* @__PURE__ */ s.jsx("div", { className: "w-full overflow-x-auto rounded-lg", children: /* @__PURE__ */ s.jsxs("table", { className: R, children: [
|
|
3667
|
-
/* @__PURE__ */ s.jsx("thead", { children: /* @__PURE__ */ s.jsx("tr", { children: e
|
|
3667
|
+
/* @__PURE__ */ s.jsx("thead", { children: /* @__PURE__ */ s.jsx("tr", { children: e?.map((f, k) => /* @__PURE__ */ s.jsx(
|
|
3668
3668
|
"th",
|
|
3669
3669
|
{
|
|
3670
3670
|
onClick: () => y(f),
|
|
3671
3671
|
className: g(
|
|
3672
3672
|
_(f),
|
|
3673
3673
|
k === 0 && "rounded-tl-lg",
|
|
3674
|
-
k === e
|
|
3674
|
+
k === e?.length - 1 && "rounded-tr-lg"
|
|
3675
3675
|
),
|
|
3676
3676
|
style: { width: f.width },
|
|
3677
3677
|
children: /* @__PURE__ */ s.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -3679,23 +3679,23 @@ function Nr({
|
|
|
3679
3679
|
A(f)
|
|
3680
3680
|
] })
|
|
3681
3681
|
},
|
|
3682
|
-
String(f
|
|
3682
|
+
String(f?.key)
|
|
3683
3683
|
)) }) }),
|
|
3684
|
-
/* @__PURE__ */ s.jsx("tbody", { children: o ? Array.from({ length: a })
|
|
3684
|
+
/* @__PURE__ */ s.jsx("tbody", { children: o ? Array.from({ length: a })?.map((f, k) => /* @__PURE__ */ s.jsx("tr", { children: e?.map((h, E) => /* @__PURE__ */ s.jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ s.jsx(br, { height: 18, variant: "rounded" }) }, E)) }, k)) : N?.map((f, k) => /* @__PURE__ */ s.jsx(
|
|
3685
3685
|
"tr",
|
|
3686
3686
|
{
|
|
3687
3687
|
className: g(
|
|
3688
3688
|
"border-b border-secondary-100 transition-all duration-200"
|
|
3689
3689
|
),
|
|
3690
|
-
children: e
|
|
3690
|
+
children: e?.map((h, E) => /* @__PURE__ */ s.jsx(
|
|
3691
3691
|
"td",
|
|
3692
3692
|
{
|
|
3693
3693
|
className: g(
|
|
3694
3694
|
"px-4 py-3 text-sm text-gray-800",
|
|
3695
|
-
h
|
|
3696
|
-
h
|
|
3695
|
+
h?.align === "center" && "text-center",
|
|
3696
|
+
h?.align === "right" && "text-right"
|
|
3697
3697
|
),
|
|
3698
|
-
children: h
|
|
3698
|
+
children: h?.render ? h?.render(f[h?.key], f) : String(f[h?.key])
|
|
3699
3699
|
},
|
|
3700
3700
|
E
|
|
3701
3701
|
))
|
|
@@ -3703,7 +3703,7 @@ function Nr({
|
|
|
3703
3703
|
k
|
|
3704
3704
|
)) })
|
|
3705
3705
|
] }) }),
|
|
3706
|
-
!o && N
|
|
3706
|
+
!o && N?.length === 0 && /* @__PURE__ */ s.jsxs("div", { className: "flex flex-col items-center justify-center py-10 text-gray-500 dark:text-gray-400 animate-[fadeIn_0.4s_ease-in-out]", children: [
|
|
3707
3707
|
/* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
|
|
3708
3708
|
/* @__PURE__ */ s.jsx(
|
|
3709
3709
|
ct,
|
|
@@ -3802,7 +3802,7 @@ function Cr({
|
|
|
3802
3802
|
hover:border-secondary-500
|
|
3803
3803
|
focus:outline-none focus:ring-2 focus:ring-secondary-500
|
|
3804
3804
|
transition-all duration-200`,
|
|
3805
|
-
children: i
|
|
3805
|
+
children: i?.map((_) => /* @__PURE__ */ s.jsxs("option", { value: _, children: [
|
|
3806
3806
|
_,
|
|
3807
3807
|
" / page"
|
|
3808
3808
|
] }, _))
|
|
@@ -3819,7 +3819,7 @@ function Cr({
|
|
|
3819
3819
|
children: /* @__PURE__ */ s.jsx(mt, { size: 18 })
|
|
3820
3820
|
}
|
|
3821
3821
|
),
|
|
3822
|
-
/* @__PURE__ */ s.jsx("div", { className: "flex items-center gap-1 mx-2", children: y
|
|
3822
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex items-center gap-1 mx-2", children: y?.map((_, f) => /* @__PURE__ */ s.jsx(
|
|
3823
3823
|
"button",
|
|
3824
3824
|
{
|
|
3825
3825
|
onClick: () => typeof _ == "number" && t(_),
|
|
@@ -3921,7 +3921,7 @@ function Er({
|
|
|
3921
3921
|
style: d
|
|
3922
3922
|
}
|
|
3923
3923
|
),
|
|
3924
|
-
e
|
|
3924
|
+
e?.map((h, E) => {
|
|
3925
3925
|
const T = i === h.id, S = f[t];
|
|
3926
3926
|
return /* @__PURE__ */ s.jsxs(
|
|
3927
3927
|
"button",
|
|
@@ -3930,9 +3930,9 @@ function Er({
|
|
|
3930
3930
|
y.current[E] = P;
|
|
3931
3931
|
},
|
|
3932
3932
|
onClick: () => {
|
|
3933
|
-
h
|
|
3933
|
+
h?.disabled || (c(h?.id), l?.(h?.id));
|
|
3934
3934
|
},
|
|
3935
|
-
disabled: h
|
|
3935
|
+
disabled: h?.disabled,
|
|
3936
3936
|
className: g(
|
|
3937
3937
|
"relative flex items-center justify-center gap-2 px-4 py-3 font-medium",
|
|
3938
3938
|
"text-sm whitespace-nowrap transition-all duration-200 z-10",
|
|
@@ -3942,30 +3942,30 @@ function Er({
|
|
|
3942
3942
|
S.inactive,
|
|
3943
3943
|
"hover:bg-white/50 dark:hover:bg-gray-800/50"
|
|
3944
3944
|
],
|
|
3945
|
-
h
|
|
3945
|
+
h?.disabled && S.disabled,
|
|
3946
3946
|
k ? "w-full justify-start" : "flex-1"
|
|
3947
3947
|
),
|
|
3948
3948
|
children: [
|
|
3949
|
-
h
|
|
3949
|
+
h?.icon && /* @__PURE__ */ s.jsx(
|
|
3950
3950
|
"span",
|
|
3951
3951
|
{
|
|
3952
3952
|
className: g(
|
|
3953
3953
|
"flex-shrink-0 transition-transform duration-200",
|
|
3954
3954
|
T && "scale-110"
|
|
3955
3955
|
),
|
|
3956
|
-
children: h
|
|
3956
|
+
children: h?.icon
|
|
3957
3957
|
}
|
|
3958
3958
|
),
|
|
3959
|
-
/* @__PURE__ */ s.jsx("span", { className: "relative z-10", children: h
|
|
3959
|
+
/* @__PURE__ */ s.jsx("span", { className: "relative z-10", children: h?.label })
|
|
3960
3960
|
]
|
|
3961
3961
|
},
|
|
3962
|
-
h
|
|
3962
|
+
h?.id
|
|
3963
3963
|
);
|
|
3964
3964
|
})
|
|
3965
3965
|
]
|
|
3966
3966
|
}
|
|
3967
3967
|
),
|
|
3968
|
-
/* @__PURE__ */ s.jsx("div", { className: g("flex-1 overflow-hidden", _[o]), children: /* @__PURE__ */ s.jsx("div", { className: "animate-fade-in", children: e
|
|
3968
|
+
/* @__PURE__ */ s.jsx("div", { className: g("flex-1 overflow-hidden", _[o]), children: /* @__PURE__ */ s.jsx("div", { className: "animate-fade-in", children: e?.find((h) => h?.id === i)?.content }, i) })
|
|
3969
3969
|
] });
|
|
3970
3970
|
}
|
|
3971
3971
|
function Rr({ children: e, className: r }) {
|
|
@@ -4186,7 +4186,7 @@ function Sr({
|
|
|
4186
4186
|
onRemove: r,
|
|
4187
4187
|
position: o = "top-right"
|
|
4188
4188
|
}) {
|
|
4189
|
-
return /* @__PURE__ */ s.jsx(s.Fragment, { children: e
|
|
4189
|
+
return /* @__PURE__ */ s.jsx(s.Fragment, { children: e?.map((t) => /* @__PURE__ */ s.jsx(xr, { ...t, onClose: r, position: o }, t?.id)) });
|
|
4190
4190
|
}
|
|
4191
4191
|
function zr({
|
|
4192
4192
|
content: e,
|