@mci-ui/mci-ui 0.0.88 → 0.0.89

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.
Files changed (29) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/shared/ui/MciModal/MciModal.js +30 -28
  3. package/dist/shared/ui/mciBreadcrumb/MciBreadcrumb.js +45 -25
  4. package/dist/shared/ui/mciButton/MciButton.js +39 -31
  5. package/dist/shared/ui/mciCheck/MciCheck.js +86 -76
  6. package/dist/shared/ui/mciDrawer/MciDrawer.js +78 -59
  7. package/dist/shared/ui/mciInput/MciInput.js +39 -40
  8. package/dist/shared/ui/mciLoader/MciLoader.js +14 -14
  9. package/dist/shared/ui/mciPagination/MciPagination.js +28 -18
  10. package/dist/shared/ui/mciPicker/MciPicker.js +53 -53
  11. package/dist/shared/ui/mciSelect/MciSelect.js +42 -41
  12. package/dist/shared/ui/mciTable/MciTable.js +97 -90
  13. package/dist/shared/ui/mciTable/MciTableClamp2.js +4 -3
  14. package/dist/shared/ui/mciTable/MciTableColumnsPanel.js +100 -79
  15. package/dist/shared/ui/mciToggle/MciToggle.js +51 -43
  16. package/dist/shared/ui/mciUpload/MciUpload.js +129 -107
  17. package/dist/types/shared/types/mci-table.types.d.ts +2 -0
  18. package/dist/types/shared/types/ui/breadcrumb.types.d.ts +1 -1
  19. package/dist/types/shared/types/ui/button.types.d.ts +1 -1
  20. package/dist/types/shared/types/ui/check.types.d.ts +1 -1
  21. package/dist/types/shared/types/ui/drawer.types.d.ts +1 -0
  22. package/dist/types/shared/types/ui/loader.types.d.ts +1 -1
  23. package/dist/types/shared/types/ui/pagination.types.d.ts +1 -1
  24. package/dist/types/shared/types/ui/toggle.types.d.ts +1 -1
  25. package/dist/types/shared/types/ui/upload.types.d.ts +1 -1
  26. package/dist/types/shared/ui/mciDrawer/MciDrawer.d.ts +1 -1
  27. package/dist/types/shared/ui/mciTable/MciTable.d.ts +1 -1
  28. package/dist/types/shared/ui/mciTable/MciTableColumnsPanel.d.ts +3 -2
  29. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { jsxs as _, jsx as a } from "react/jsx-runtime";
2
2
  import { AltArrowDown as st } from "@solar-icons/react";
3
3
  import ot from "../../../assets/icons/close.svg.js";
4
- import { forwardRef as ct, useState as w, useRef as G, useMemo as O, useCallback as h, useEffect as J } from "react";
4
+ import { forwardRef as ct, useState as w, useRef as G, useMemo as O, useCallback as p, useEffect as J } from "react";
5
5
  import { useClickOutside as it, useEscapeKey as ut, cn as s } from "../../lib/utils.js";
6
- import { getFilteredOptions as ft, getSelectStateStyles as mt, getSelectIconColor as ht, SELECT_SIZES as pt } from "./mci-select.utils.js";
6
+ import { getFilteredOptions as ft, getSelectStateStyles as mt, getSelectIconColor as pt, SELECT_SIZES as ht } from "./mci-select.utils.js";
7
7
  const xt = ct(
8
8
  ({
9
9
  label: U,
@@ -14,7 +14,7 @@ const xt = ct(
14
14
  size: l = "base",
15
15
  darkMode: e = !1,
16
16
  error: o,
17
- disabled: r = !1,
17
+ disabled: n = !1,
18
18
  required: Q = !1,
19
19
  value: m,
20
20
  onChange: b,
@@ -22,45 +22,45 @@ const xt = ct(
22
22
  onBlur: y,
23
23
  className: X,
24
24
  clearable: Y = !1,
25
- searchable: p = !1,
25
+ searchable: h = !1,
26
26
  onSearch: N,
27
27
  name: k
28
28
  }, z) => {
29
- const [n, S] = w(!1), [i, F] = w(!1), [M, $] = w(""), [T, x] = w(""), [C, u] = w(-1), H = G(null), K = G(null), d = m !== void 0 ? m : M, Z = L.find((t) => t.value === d), E = d !== "" && d !== void 0, D = Y && E && !r, I = !!(v && R === "right"), c = pt[l], tt = O(() => I && D ? l === "sm" || l === "md" ? "pr-16" : "pr-20" : I || D ? l === "sm" ? "pr-11" : l === "md" ? "pr-12" : "pr-14" : l === "sm" ? "pr-8" : l === "md" ? "pr-9" : "pr-10", [I, D, l]), f = O(() => ft(L, T, p, !!N), [L, T, p, N]), q = h(() => {
29
+ const [r, S] = w(!1), [i, F] = w(!1), [M, $] = w(""), [T, x] = w(""), [C, u] = w(-1), H = G(null), K = G(null), g = m !== void 0 ? m : M, Z = L.find((t) => t.value === g), E = g !== "" && g !== void 0, D = Y && E && !n, I = !!(v && R === "right"), c = ht[l], tt = O(() => I && D ? l === "sm" || l === "md" ? "pr-16" : "pr-20" : I || D ? l === "sm" ? "pr-11" : l === "md" ? "pr-12" : "pr-14" : l === "sm" ? "pr-8" : l === "md" ? "pr-9" : "pr-10", [I, D, l]), f = O(() => ft(L, T, h, !!N), [L, T, h, N]), q = p(() => {
30
30
  S(!1), F(!1), x(""), u(-1), y?.();
31
31
  }, [y]), { handleClick: V } = it(H, q), { handleEscape: j } = ut(q);
32
32
  J(() => {
33
- if (n)
33
+ if (r)
34
34
  return document.addEventListener("mousedown", V), document.addEventListener("keydown", j), () => {
35
35
  document.removeEventListener("mousedown", V), document.removeEventListener("keydown", j);
36
36
  };
37
- }, [n, V, j]), J(() => {
38
- n && p && K.current && K.current.focus();
39
- }, [n, p]);
40
- const et = h(() => {
41
- r || (S((t) => !t), n ? (x(""), u(-1)) : (F(!0), W?.()));
42
- }, [r, n, W]), P = h(
37
+ }, [r, V, j]), J(() => {
38
+ r && h && K.current && K.current.focus();
39
+ }, [r, h]);
40
+ const et = p(() => {
41
+ n || (S((t) => !t), r ? (x(""), u(-1)) : (F(!0), W?.()));
42
+ }, [n, r, W]), P = p(
43
43
  (t) => {
44
44
  m === void 0 && $(t), b?.(t), S(!1), F(!1), x(""), u(-1), y?.();
45
45
  },
46
46
  [m, b, y]
47
- ), nt = h(
47
+ ), nt = p(
48
48
  (t) => {
49
- if (!r) {
50
- if (!n && (t.key === "ArrowDown" || t.key === "ArrowUp" || t.key === "Enter")) {
49
+ if (!n) {
50
+ if (!r && (t.key === "ArrowDown" || t.key === "ArrowUp" || t.key === "Enter")) {
51
51
  t.preventDefault(), S(!0);
52
52
  return;
53
53
  }
54
- if (n)
54
+ if (r)
55
55
  switch (t.key) {
56
56
  case "ArrowDown":
57
57
  t.preventDefault(), u(
58
- (g) => g < f.length - 1 ? g + 1 : 0
58
+ (d) => d < f.length - 1 ? d + 1 : 0
59
59
  );
60
60
  break;
61
61
  case "ArrowUp":
62
62
  t.preventDefault(), u(
63
- (g) => g > 0 ? g - 1 : f.length - 1
63
+ (d) => d > 0 ? d - 1 : f.length - 1
64
64
  );
65
65
  break;
66
66
  case "Enter":
@@ -69,23 +69,23 @@ const xt = ct(
69
69
  }
70
70
  }
71
71
  },
72
- [n, f, C, r, P]
73
- ), rt = h(
72
+ [r, f, C, n, P]
73
+ ), rt = p(
74
74
  (t) => {
75
- t.stopPropagation(), !r && (m === void 0 && $(""), b?.(""), x(""), u(-1));
75
+ t.stopPropagation(), !n && (m === void 0 && $(""), b?.(""), x(""), u(-1));
76
76
  },
77
- [m, b, r]
78
- ), lt = h(
77
+ [m, b, n]
78
+ ), lt = p(
79
79
  (t) => {
80
80
  x(t), N?.(t), u(0);
81
81
  },
82
82
  [N]
83
83
  ), at = O(
84
- () => mt(r, o, e),
85
- [o, r, e]
84
+ () => mt(n, o, e),
85
+ [o, n, e]
86
86
  ), B = O(
87
- () => ht(r, o, n, i, e),
88
- [r, o, n, i, e]
87
+ () => pt(n, o, r, i, e),
88
+ [n, o, r, i, e]
89
89
  );
90
90
  return /* @__PURE__ */ _("div", { className: s("w-full", X), ref: z, children: [
91
91
  U && /* @__PURE__ */ _(
@@ -114,22 +114,23 @@ const xt = ct(
114
114
  "div",
115
115
  {
116
116
  role: "combobox",
117
- "aria-expanded": n,
117
+ "aria-expanded": r,
118
118
  "aria-haspopup": "listbox",
119
119
  "aria-controls": `${k}-listbox`,
120
- "aria-disabled": r,
121
- tabIndex: r ? -1 : 0,
120
+ "aria-disabled": n,
121
+ tabIndex: n ? -1 : 0,
122
122
  onClick: et,
123
123
  className: s(
124
124
  "flex w-full items-center border font-normal transition-all duration-300 ease-in-out",
125
+ n ? "cursor-not-allowed" : "cursor-pointer",
125
126
  l === "base" ? "rounded-xl" : "rounded-lg",
126
127
  c.container,
127
128
  v && R === "left" ? c.iconPaddingLeft : c.padding,
128
129
  tt,
129
130
  at,
130
- e && !r && (i || n) && !o && "border-blue-500 shadow-[0_0_0_2px_var(--opacity-25,rgba(21,93,252,0.25))] text-white",
131
- e && !r && (i || n) && o && "border-red-500 shadow-[0_0_0_2px_rgba(231,0,11,0.25)]",
132
- !e && !r && i && "shadow-blue border-blue-600"
131
+ e && !n && (i || r) && !o && "border-blue-500 shadow-[0_0_0_2px_var(--opacity-25,rgba(21,93,252,0.25))] text-white",
132
+ e && !n && (i || r) && o && "border-red-500 shadow-[0_0_0_2px_rgba(231,0,11,0.25)]",
133
+ !e && !n && i && "shadow-blue border-blue-600"
133
134
  ),
134
135
  children: [
135
136
  v && /* @__PURE__ */ a(
@@ -143,7 +144,7 @@ const xt = ct(
143
144
  children: v
144
145
  }
145
146
  ),
146
- p && n ? /* @__PURE__ */ a(
147
+ h && r ? /* @__PURE__ */ a(
147
148
  "input",
148
149
  {
149
150
  ref: K,
@@ -163,9 +164,9 @@ const xt = ct(
163
164
  title: Z?.label || A,
164
165
  className: s(
165
166
  "block min-w-0 flex-1 truncate select-none",
166
- !E && !r && (e ? "text-neutral-100" : "text-slate-400"),
167
- e && E && (i || n) && "text-white",
168
- e && E && !i && !n && "text-neutral-50"
167
+ !E && !n && (e ? "text-neutral-100" : "text-slate-400"),
168
+ e && E && (i || r) && "text-white",
169
+ e && E && !i && !r && "text-neutral-50"
169
170
  ),
170
171
  children: Z?.label || A
171
172
  }
@@ -190,7 +191,7 @@ const xt = ct(
190
191
  className: s(
191
192
  "absolute top-1/2 -translate-y-1/2 pointer-events-none transition-all duration-300",
192
193
  l === "sm" ? "right-2" : "right-3",
193
- n && "rotate-180",
194
+ r && "rotate-180",
194
195
  B
195
196
  ),
196
197
  children: /* @__PURE__ */ a(st, { className: c.iconSize })
@@ -199,7 +200,7 @@ const xt = ct(
199
200
  ]
200
201
  }
201
202
  ),
202
- n && !r && /* @__PURE__ */ a(
203
+ r && !n && /* @__PURE__ */ a(
203
204
  "div",
204
205
  {
205
206
  id: `${k}-listbox`,
@@ -216,12 +217,12 @@ const xt = ct(
216
217
  "div",
217
218
  {
218
219
  role: "option",
219
- "aria-selected": d === t.value,
220
+ "aria-selected": g === t.value,
220
221
  onClick: () => P(t.value),
221
222
  title: t.label,
222
223
  className: s(
223
224
  "cursor-pointer truncate rounded-sm px-3 py-2 font-normal transition-colors",
224
- d === t.value ? e ? "bg-neutral-300 text-white" : "bg-slate-100" : e ? "hover:bg-neutral-300 hover:text-white" : "hover:bg-slate-100"
225
+ g === t.value ? e ? "bg-neutral-300 text-white" : "bg-slate-100" : e ? "hover:bg-neutral-300 hover:text-white" : "hover:bg-slate-100"
225
226
  ),
226
227
  children: t.label
227
228
  },
@@ -1,65 +1,70 @@
1
1
  import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
- import { ConfoundedSquare as I, SortVertical as W, SortFromTopToBottom as _, SortFromBottomToTop as H } from "@solar-icons/react";
3
- import { useState as J, useMemo as x, useEffect as K, useCallback as O } from "react";
2
+ import { ConfoundedSquare as _, SortVertical as H, SortFromTopToBottom as J, SortFromBottomToTop as K } from "@solar-icons/react";
3
+ import { useState as O, useMemo as v, useEffect as Q, useCallback as U } from "react";
4
4
  import { cn as a } from "../../lib/utils.js";
5
5
  /* empty css */
6
6
  import z from "../mciCheck/MciCheck.js";
7
- import A from "../mciSkeleton/MciSkeleton.js";
8
- import Q from "./MciTableClamp2.js";
9
- import { sortRows as U, normalizeColWidth as X } from "./mci-table.utils.js";
10
- function re({
11
- columns: b,
12
- data: v = [],
13
- loading: p = !1,
14
- skeletonRows: B = 5,
15
- noDataText: D = "",
7
+ import B from "../mciSkeleton/MciSkeleton.js";
8
+ import X from "./MciTableClamp2.js";
9
+ import { sortRows as Y, normalizeColWidth as Z } from "./mci-table.utils.js";
10
+ const w = (o) => {
11
+ const b = String(o.key).toLowerCase(), d = o.title.toLowerCase();
12
+ return b === "action" || b === "actions" || b.includes("action") || d === "action" || d === "actions" || d.includes("action");
13
+ };
14
+ function ae({
15
+ columns: o,
16
+ data: b = [],
17
+ loading: d = !1,
18
+ skeletonRows: D = 5,
19
+ noDataText: P = "",
16
20
  sort: n,
17
21
  onSortChange: N,
18
- className: L,
19
- headerClassName: w,
20
- bodyClassName: C,
21
- darkMode: r = !1,
22
- rowKey: u = "id",
23
- rowSelection: s
22
+ className: F,
23
+ headerClassName: C,
24
+ bodyClassName: R,
25
+ darkMode: i = !1,
26
+ variant: j = "orange",
27
+ rowKey: p = "id",
28
+ rowSelection: l
24
29
  }) {
25
- const [P, R] = J(null), d = n ?? P, g = x(() => Array.isArray(v) ? v : [], [v]), j = x(() => U(g, d, !!n), [g, d, n]);
26
- K(() => {
27
- n !== void 0 && R(null);
30
+ const [V, A] = O(null), h = n ?? V, x = v(() => Array.isArray(b) ? b : [], [b]), L = v(() => Y(x, h, !!n), [x, h, n]);
31
+ Q(() => {
32
+ n !== void 0 && A(null);
28
33
  }, [n]);
29
- const m = x(
30
- () => p ? [] : n ? g : j,
31
- [p, n, g, j]
32
- ), F = O(
34
+ const f = v(
35
+ () => d ? [] : n ? x : L,
36
+ [d, n, x, L]
37
+ ), q = U(
33
38
  (e) => {
34
39
  if (!e.sortable) return;
35
- let l = null;
36
- d?.key !== e.key ? l = { key: e.key, direction: "asc" } : d.direction === "asc" && (l = { key: e.key, direction: "desc" }), n !== void 0 ? N?.(l) : R(l);
40
+ let s = null;
41
+ h?.key !== e.key ? s = { key: e.key, direction: "asc" } : h.direction === "asc" && (s = { key: e.key, direction: "desc" }), n !== void 0 ? N?.(s) : A(s);
37
42
  },
38
- [d, n, N]
39
- ), V = (e) => {
40
- if (!s) return;
41
- const { onChange: l, getCheckboxProps: o } = s;
43
+ [h, n, N]
44
+ ), E = (e) => {
45
+ if (!l) return;
46
+ const { onChange: s, getCheckboxProps: m } = l;
42
47
  if (e.target.checked) {
43
- const i = m.filter((h) => !o?.(h)?.disabled).map((h) => h[u]);
44
- l(i);
48
+ const r = f.filter((u) => !m?.(u)?.disabled).map((u) => u[p]);
49
+ s(r);
45
50
  } else
46
- l([]);
47
- }, q = (e, l) => {
48
- if (!s) return;
49
- const { selectedRowKeys: o, onChange: y } = s, f = e[u], i = l ? [...o, f] : o.filter((h) => h !== f);
50
- y(i);
51
- }, E = x(() => {
52
- if (!s || m.length === 0) return !1;
53
- const e = m.filter((l) => !s.getCheckboxProps?.(l)?.disabled);
51
+ s([]);
52
+ }, G = (e, s) => {
53
+ if (!l) return;
54
+ const { selectedRowKeys: m, onChange: y } = l, g = e[p], r = s ? [...m, g] : m.filter((u) => u !== g);
55
+ y(r);
56
+ }, I = v(() => {
57
+ if (!l || f.length === 0) return !1;
58
+ const e = f.filter((s) => !l.getCheckboxProps?.(s)?.disabled);
54
59
  return e.length === 0 ? !1 : e.every(
55
- (l) => s.selectedRowKeys.includes(l[u])
60
+ (s) => l.selectedRowKeys.includes(s[p])
56
61
  );
57
- }, [s, m, u]), G = (e) => {
58
- const l = a(r ? "text-neutral-100" : "text-slate-base", "shrink-0");
59
- return e.sortable ? !d || d.key !== e.key ? /* @__PURE__ */ t(W, { weight: "Linear", size: 20, className: l }) : d.direction === "asc" ? /* @__PURE__ */ t(_, { weight: "Linear", size: 20, className: l }) : /* @__PURE__ */ t(H, { weight: "Linear", size: 20, className: l }) : null;
62
+ }, [l, f, p]), W = (e) => {
63
+ const s = a(i ? "text-neutral-100" : "text-slate-base", "shrink-0");
64
+ return e.sortable ? !h || h.key !== e.key ? /* @__PURE__ */ t(H, { weight: "Linear", size: 20, className: s }) : h.direction === "asc" ? /* @__PURE__ */ t(J, { weight: "Linear", size: 20, className: s }) : /* @__PURE__ */ t(K, { weight: "Linear", size: 20, className: s }) : null;
60
65
  }, T = () => /* @__PURE__ */ c("colgroup", { children: [
61
- s && /* @__PURE__ */ t("col", { style: { width: 48 } }),
62
- b.map((e) => /* @__PURE__ */ t("col", { style: { width: X(e.width) ?? "auto" } }, e.key))
66
+ l && /* @__PURE__ */ t("col", { style: { width: 48 } }),
67
+ o.map((e) => /* @__PURE__ */ t("col", { style: { width: Z(e.width) ?? (w(e) ? "1%" : "auto") } }, e.key))
63
68
  ] });
64
69
  return /* @__PURE__ */ t(
65
70
  "div",
@@ -68,10 +73,10 @@ function re({
68
73
  "w-full overflow-x-auto pb-0.5",
69
74
  "[&::-webkit-scrollbar]:h-1",
70
75
  "[&::-webkit-scrollbar-track]:bg-transparent",
71
- r ? "[&::-webkit-scrollbar-thumb]:bg-neutral-200" : "[&::-webkit-scrollbar-thumb]:bg-slate-200",
76
+ i ? "[&::-webkit-scrollbar-thumb]:bg-neutral-200" : "[&::-webkit-scrollbar-thumb]:bg-slate-200",
72
77
  "[&::-webkit-scrollbar-thumb]:rounded-full",
73
- r ? "hover:[&::-webkit-scrollbar-thumb]:bg-neutral-100" : "hover:[&::-webkit-scrollbar-thumb]:bg-slate-300",
74
- L
78
+ i ? "hover:[&::-webkit-scrollbar-thumb]:bg-neutral-100" : "hover:[&::-webkit-scrollbar-thumb]:bg-slate-300",
79
+ F
75
80
  ),
76
81
  children: /* @__PURE__ */ c("div", { className: "inline-block min-w-full align-middle", children: [
77
82
  /* @__PURE__ */ t(
@@ -79,33 +84,34 @@ function re({
79
84
  {
80
85
  className: a(
81
86
  "overflow-hidden rounded-xl border",
82
- r ? "border-neutral-200 bg-neutral-300" : "border-slate-200 bg-slate-100"
87
+ i ? "border-neutral-200 bg-neutral-300" : "border-slate-200 bg-slate-100"
83
88
  ),
84
89
  children: /* @__PURE__ */ c("table", { className: "w-full table-fixed", children: [
85
90
  T(),
86
91
  /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ c("tr", { children: [
87
- s && /* @__PURE__ */ t("th", { className: a("w-12 px-4 py-3", w), children: /* @__PURE__ */ t("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ t(
92
+ l && /* @__PURE__ */ t("th", { className: a("w-12 px-4 py-3", C), children: /* @__PURE__ */ t("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ t(
88
93
  z,
89
94
  {
90
- checked: E,
91
- onChange: V,
92
- variant: "yellow",
93
- darkMode: r,
94
- disabled: p || m.length === 0
95
+ checked: I,
96
+ onChange: E,
97
+ variant: j,
98
+ darkMode: i,
99
+ disabled: d || f.length === 0
95
100
  }
96
101
  ) }) }),
97
- b.map((e) => /* @__PURE__ */ t(
102
+ o.map((e) => /* @__PURE__ */ t(
98
103
  "th",
99
104
  {
100
- onClick: () => F(e),
105
+ onClick: () => q(e),
101
106
  className: a(
102
107
  "px-4 py-3 text-left text-sm font-medium transition-colors",
103
- r ? "text-neutral-50" : "text-slate-700",
108
+ i ? "text-neutral-50" : "text-slate-700",
104
109
  "whitespace-nowrap overflow-hidden text-ellipsis",
110
+ w(e) && "w-px",
105
111
  e.align === "center" && "text-center",
106
112
  e.align === "right" && "text-right",
107
- e.sortable && (r ? "cursor-pointer hover:bg-neutral-200" : "cursor-pointer hover:bg-slate-200"),
108
- w
113
+ e.sortable && (i ? "cursor-pointer hover:bg-neutral-200" : "cursor-pointer hover:bg-slate-200"),
114
+ C
109
115
  ),
110
116
  children: /* @__PURE__ */ c(
111
117
  "div",
@@ -113,7 +119,7 @@ function re({
113
119
  className: a("flex items-center gap-2 min-w-0", e.align === "right" && "justify-end"),
114
120
  children: [
115
121
  /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate", title: e.title, children: e.title }),
116
- G(e)
122
+ W(e)
117
123
  ]
118
124
  }
119
125
  )
@@ -129,56 +135,57 @@ function re({
129
135
  {
130
136
  className: a(
131
137
  "overflow-hidden rounded-xl border border-t-0",
132
- r ? "border-neutral-200 bg-transparent" : "border-slate-200 bg-white"
138
+ i ? "border-neutral-200 bg-transparent" : "border-slate-200 bg-white"
133
139
  ),
134
140
  children: /* @__PURE__ */ c("table", { className: "w-full table-fixed", children: [
135
141
  T(),
136
- /* @__PURE__ */ t("tbody", { className: a("divide-y", r ? "divide-neutral-200" : "divide-slate-200"), children: p ? Array.from({ length: B }).map((e, l) => /* @__PURE__ */ c("tr", { children: [
137
- s && /* @__PURE__ */ t("td", { className: "w-12 px-4 py-3", children: /* @__PURE__ */ t(A, { height: 20, width: 20, variant: "rounded" }) }),
138
- b.map((o) => /* @__PURE__ */ t("td", { className: "px-4 py-3", children: /* @__PURE__ */ t(A, { height: 30, variant: "rounded" }) }, o.key))
139
- ] }, l)) : m.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: b.length + (s ? 1 : 0), className: "py-20", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center", children: [
142
+ /* @__PURE__ */ t("tbody", { className: a("divide-y", i ? "divide-neutral-200" : "divide-slate-200"), children: d ? Array.from({ length: D }).map((e, s) => /* @__PURE__ */ c("tr", { children: [
143
+ l && /* @__PURE__ */ t("td", { className: "w-12 px-4 py-3", children: /* @__PURE__ */ t(B, { height: 20, width: 20, variant: "rounded" }) }),
144
+ o.map((m) => /* @__PURE__ */ t("td", { className: "px-4 py-3", children: /* @__PURE__ */ t(B, { height: 30, variant: "rounded" }) }, m.key))
145
+ ] }, s)) : f.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: o.length + (l ? 1 : 0), className: "py-20", children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center", children: [
140
146
  /* @__PURE__ */ t("div", { className: "relative mb-4", children: /* @__PURE__ */ t(
141
- I,
147
+ _,
142
148
  {
143
149
  weight: "Bold",
144
150
  size: 64,
145
- className: a("animate-float", r ? "text-neutral-100" : "text-slate-400")
151
+ className: a("animate-float", i ? "text-neutral-100" : "text-slate-400")
146
152
  }
147
153
  ) }),
148
- /* @__PURE__ */ t("p", { className: a("text-sm font-medium", r ? "text-neutral-100" : "text-slate-400"), children: D })
149
- ] }) }) }) : m.map((e, l) => {
150
- const o = e[u], y = s?.selectedRowKeys.includes(o), f = s?.getCheckboxProps?.(e)?.disabled;
151
- return /* @__PURE__ */ c("tr", { className: a("group transition-colors", r ? "hover:bg-neutral-100/35" : "hover:bg-slate-50"), children: [
152
- s && /* @__PURE__ */ t("td", { className: a("w-12 px-4 py-3 align-top", C), children: /* @__PURE__ */ t("div", { className: "flex items-center justify-center pt-1", children: /* @__PURE__ */ t(
154
+ /* @__PURE__ */ t("p", { className: a("text-sm font-medium", i ? "text-neutral-100" : "text-slate-400"), children: P })
155
+ ] }) }) }) : f.map((e, s) => {
156
+ const m = e[p], y = l?.selectedRowKeys.includes(m), g = l?.getCheckboxProps?.(e)?.disabled;
157
+ return /* @__PURE__ */ c("tr", { className: a("group transition-colors", i ? "hover:bg-neutral-100/35" : "hover:bg-slate-50"), children: [
158
+ l && /* @__PURE__ */ t("td", { className: a("w-12 px-4 py-3 align-top", R), children: /* @__PURE__ */ t("div", { className: "flex items-center justify-center pt-1", children: /* @__PURE__ */ t(
153
159
  z,
154
160
  {
155
161
  checked: y,
156
- disabled: f,
157
- variant: "yellow",
158
- darkMode: r,
159
- onChange: (i) => q(e, i.target.checked)
162
+ disabled: g,
163
+ variant: j,
164
+ darkMode: i,
165
+ onChange: (r) => G(e, r.target.checked)
160
166
  }
161
167
  ) }) }),
162
- b.map((i) => {
163
- const h = e[i.key], k = i.render ? i.render(h, e) : String(h ?? "-");
168
+ o.map((r) => {
169
+ const u = e[r.key], k = r.render ? r.render(u, e) : String(u ?? "-");
164
170
  return /* @__PURE__ */ t(
165
171
  "td",
166
172
  {
167
173
  className: a(
168
- "align-top px-4 py-3 text-sm font-normal",
169
- r ? "text-neutral-50" : "text-black",
174
+ "align-top px-4 py-3 text-sm font-normal overflow-visible",
175
+ i ? "text-neutral-50" : "text-black",
170
176
  "min-w-0 whitespace-normal",
171
- i.align === "center" && "text-center",
172
- i.align === "right" && "text-right",
173
- C,
174
- i.className
177
+ w(r) && "w-px whitespace-nowrap",
178
+ r.align === "center" && "text-center",
179
+ r.align === "right" && "text-right",
180
+ R,
181
+ r.className
175
182
  ),
176
- children: /* @__PURE__ */ t(Q, { title: typeof k == "string" ? k : void 0, children: k })
183
+ children: /* @__PURE__ */ t(X, { title: typeof k == "string" ? k : void 0, children: k })
177
184
  },
178
- i.key
185
+ r.key
179
186
  );
180
187
  })
181
- ] }, l);
188
+ ] }, s);
182
189
  }) })
183
190
  ] })
184
191
  }
@@ -188,5 +195,5 @@ function re({
188
195
  );
189
196
  }
190
197
  export {
191
- re as default
198
+ ae as default
192
199
  };
@@ -1,7 +1,8 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- function l({ children: t, title: a }) {
3
- return /* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e("div", { className: "clamp-2 break-words", title: a ?? (typeof t == "string" ? t : void 0), children: t }) });
2
+ function o({ children: t, title: i }) {
3
+ const a = typeof t == "string" ? t : void 0;
4
+ return typeof t != "string" && typeof t != "number" ? /* @__PURE__ */ e("div", { className: "-m-1 inline-flex w-fit max-w-full items-start overflow-visible p-1 align-top", children: t }) : /* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e("div", { className: "clamp-2 break-words", title: i ?? a, children: t }) });
4
5
  }
5
6
  export {
6
- l as default
7
+ o as default
7
8
  };