@ztwoint/z-ui 0.1.34 → 0.1.36

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.
@@ -1,13 +1,13 @@
1
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- function s({ fill: o = "currentColor", title: r = "badge 13", ...t }) {
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
+ function s({ fill: r = "currentColor", title: e = "", ...t }) {
3
3
  return /* @__PURE__ */ n("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...t, children: [
4
- /* @__PURE__ */ e("title", { children: r }),
5
- /* @__PURE__ */ e("g", { fill: o, children: /* @__PURE__ */ e(
4
+ /* @__PURE__ */ o("title", { children: e }),
5
+ /* @__PURE__ */ o("g", { fill: r, children: /* @__PURE__ */ o(
6
6
  "path",
7
7
  {
8
8
  d: "M2.45 5.25l4.55 4.55 4.55-4.55",
9
9
  fill: "none",
10
- stroke: o,
10
+ stroke: r,
11
11
  strokeLinecap: "round",
12
12
  strokeLinejoin: "round",
13
13
  strokeWidth: "2"
@@ -1,16 +1,12 @@
1
1
  import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- const s = ({
3
- fill: e = "currentColor",
4
- title: o = "badge 13",
5
- ...t
6
- }) => /* @__PURE__ */ n("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...t, children: [
7
- /* @__PURE__ */ r("title", { children: o }),
8
- /* @__PURE__ */ r("g", { fill: e, children: /* @__PURE__ */ r(
2
+ const s = ({ fill: o = "currentColor", title: e = "", ...t }) => /* @__PURE__ */ n("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...t, children: [
3
+ /* @__PURE__ */ r("title", { children: e }),
4
+ /* @__PURE__ */ r("g", { fill: o, children: /* @__PURE__ */ r(
9
5
  "path",
10
6
  {
11
7
  d: "M11.55 8.75l-4.55-4.55-4.55 4.55",
12
8
  fill: "none",
13
- stroke: e,
9
+ stroke: o,
14
10
  strokeLinecap: "round",
15
11
  strokeLinejoin: "round",
16
12
  strokeWidth: "2"
@@ -2,7 +2,7 @@ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
2
  function a({
3
3
  fill: o = "currentColor",
4
4
  secondaryfill: n,
5
- title: i = "badge 13",
5
+ title: i = "",
6
6
  ...s
7
7
  }) {
8
8
  const t = n || o;
@@ -1,41 +1,36 @@
1
- import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
- function d({
3
- fill: e = "currentColor",
4
- secondaryfill: t,
5
- title: n = "badge 13",
6
- ...s
7
- }) {
8
- return t = t || e, /* @__PURE__ */ r("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...s, children: [
9
- /* @__PURE__ */ o("title", { children: n }),
10
- /* @__PURE__ */ r("g", { fill: e, children: [
11
- /* @__PURE__ */ o(
1
+ import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
+ function d({ fill: o = "currentColor", secondaryfill: e, title: n = "", ...s }) {
3
+ return e = e || o, /* @__PURE__ */ r("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...s, children: [
4
+ /* @__PURE__ */ t("title", { children: n }),
5
+ /* @__PURE__ */ r("g", { fill: o, children: [
6
+ /* @__PURE__ */ t(
12
7
  "path",
13
8
  {
14
9
  d: "M2.8 3.85v6.3c0 0.97 1.88 1.75 4.2 1.75s4.2-0.78 4.2-1.75v-6.3",
15
10
  fill: "none",
16
- stroke: e,
11
+ stroke: o,
17
12
  strokeLinecap: "round",
18
13
  strokeLinejoin: "round",
19
14
  strokeWidth: "2"
20
15
  }
21
16
  ),
22
- /* @__PURE__ */ o(
17
+ /* @__PURE__ */ t(
23
18
  "path",
24
19
  {
25
20
  d: "M7 2.1a4.2 1.75 0 1 0 0 3.5 4.2 1.75 0 1 0 0-3.5z",
26
21
  fill: "none",
27
- stroke: t,
22
+ stroke: e,
28
23
  strokeLinecap: "round",
29
24
  strokeLinejoin: "round",
30
25
  strokeWidth: "2"
31
26
  }
32
27
  ),
33
- /* @__PURE__ */ o(
28
+ /* @__PURE__ */ t(
34
29
  "path",
35
30
  {
36
31
  d: "M11.2 7c0 0.97-1.88 1.75-4.2 1.75s-4.2-0.78-4.2-1.75",
37
32
  fill: "none",
38
- stroke: e,
33
+ stroke: o,
39
34
  strokeLinecap: "round",
40
35
  strokeLinejoin: "round",
41
36
  strokeWidth: "2"
@@ -2,7 +2,7 @@ import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
2
  function d({
3
3
  fill: t = "currentColor",
4
4
  secondaryfill: e,
5
- title: h = "badge 13",
5
+ title: h = "",
6
6
  ...n
7
7
  }) {
8
8
  return e = e || t, /* @__PURE__ */ r("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...n, children: [
@@ -1,25 +1,20 @@
1
- import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
- function d({
3
- fill: e = "currentColor",
4
- secondaryfill: t,
5
- title: n = "badge 13",
6
- ...i
7
- }) {
8
- return t = t || e, /* @__PURE__ */ r("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...i, children: [
9
- /* @__PURE__ */ o("title", { children: n }),
10
- /* @__PURE__ */ r("g", { fill: e, children: [
11
- /* @__PURE__ */ o(
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ function s({ fill: o = "currentColor", secondaryfill: t, title: n = "", ...i }) {
3
+ return t = t || o, /* @__PURE__ */ r("svg", { height: "14", width: "14", viewBox: "0 0 14 14", xmlns: "http://www.w3.org/2000/svg", ...i, children: [
4
+ /* @__PURE__ */ e("title", { children: n }),
5
+ /* @__PURE__ */ r("g", { fill: o, children: [
6
+ /* @__PURE__ */ e(
12
7
  "path",
13
8
  {
14
9
  d: "M11.9 4.9v4.2q0 2.1-2.1 2.1h-5.6q-2.1 0-2.1-2.1v-4.2q0-2.1 2.1-2.1h5.6q2.1 0 2.1 2.1z",
15
10
  fill: "none",
16
- stroke: e,
11
+ stroke: o,
17
12
  strokeLinecap: "round",
18
13
  strokeLinejoin: "round",
19
14
  strokeWidth: "2"
20
15
  }
21
16
  ),
22
- /* @__PURE__ */ o(
17
+ /* @__PURE__ */ e(
23
18
  "path",
24
19
  {
25
20
  d: "M5.6 4.9v4.2h-1.4v-4.2z",
@@ -34,5 +29,5 @@ function d({
34
29
  ] });
35
30
  }
36
31
  export {
37
- d as default
32
+ s as default
38
33
  };
@@ -59,7 +59,7 @@ const C = o.forwardRef(
59
59
  {
60
60
  ref: u,
61
61
  className: n(
62
- "fixed z-[9999] px-3 py-2 text-sm bg-white text-gray-900 rounded-lg shadow-lg border border-gray-200 min-w-[200px]",
62
+ "fixed z-[9999] px-3 py-2 text-sm bg-white text-gray-900 rounded-lg shadow-lg border border-gray-200 min-w-[256px] max-w-[256px]",
63
63
  "pointer-events-auto select-none",
64
64
  c[l],
65
65
  f
@@ -1,44 +1,44 @@
1
- import { jsxs as i, jsx as r, Fragment as D } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as r, Fragment as D } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import { cn as f } from "../../lib/utils.js";
3
+ import { cn as m } from "../../lib/utils.js";
4
4
  import { useZ2SideNavBar as B } from "./context.js";
5
5
  import { ChevronUpIcon as M } from "../assets/icons/chevron-up-icon.js";
6
- import Z from "../assets/icons/sub-nav-indicator.js";
6
+ import P from "../assets/icons/sub-nav-indicator.js";
7
7
  import { Z2Popover as A } from "./popover/popover.js";
8
8
  import R from "../assets/icons/chevron-down.js";
9
9
  import { Z2PopoverTrigger as E } from "./popover/popover-trigger.js";
10
10
  import { Z2PopoverContent as F } from "./popover/popover-content.js";
11
11
  const K = d.forwardRef(
12
12
  ({
13
- className: x,
14
- children: u,
15
- icon: h,
16
- label: o,
13
+ className: g,
14
+ children: p,
15
+ icon: f,
16
+ label: i,
17
17
  href: N,
18
- isActive: m = !1,
19
- onClick: p,
20
- tooltip: v,
21
- subItems: c,
22
- ...y
23
- }, P) => {
24
- const { isCollapsed: a } = B(), [t, k] = d.useState(!1), s = o && !a, n = c && c.length > 0, C = d.useMemo(() => a ? n ? /* @__PURE__ */ i("div", { className: "text-left", children: [
25
- /* @__PURE__ */ r("div", { className: "text-gray-500 mt-2 mb-1", children: v || o }),
26
- /* @__PURE__ */ r("div", { className: "space-y-1", children: c.map((e) => {
27
- const g = (l) => {
28
- l.preventDefault(), l.stopPropagation(), e.onClick ? e.onClick() : e.href && (window.location.href = e.href);
29
- }, b = /* @__PURE__ */ i(
18
+ isActive: h = !1,
19
+ onClick: v,
20
+ tooltip: u,
21
+ subItems: s,
22
+ ...C
23
+ }, b) => {
24
+ const { isCollapsed: o } = B(), [t, k] = d.useState(!1), c = i && !o, n = s && s.length > 0, y = d.useMemo(() => o ? n ? /* @__PURE__ */ l("div", { className: "text-left", children: [
25
+ /* @__PURE__ */ r("div", { className: "text-neutral-secondary mt-2 mb-1", children: u || i }),
26
+ /* @__PURE__ */ r("div", { className: "space-y-1", children: s.map((e) => {
27
+ const x = (a) => {
28
+ a.preventDefault(), a.stopPropagation(), e.onClick ? e.onClick() : e.href && (window.location.href = e.href);
29
+ }, Z = /* @__PURE__ */ l(
30
30
  "div",
31
31
  {
32
- className: f(
32
+ className: m(
33
33
  "cursor-pointer transition-colors flex items-center gap-1.5 self-stretch rounded-lg p-2",
34
34
  {
35
- "hover:!bg-gray-100 bg-gray-100": e.isActive,
36
- "hover:!bg-gray-50": !e.isActive
35
+ "hover:!bg-(--color-neutral-75) bg-(--color-neutral-75) text-neutral-primary": e.isActive,
36
+ "hover:!bg-(--color-neutral-75) text-neutral-secondary": !e.isActive
37
37
  }
38
38
  ),
39
39
  onClick: e.onClick,
40
40
  children: [
41
- /* @__PURE__ */ r(Z, { className: "text-(--color-neutral-150)" }),
41
+ /* @__PURE__ */ r(P, { className: "text-(--color-neutral-150)" }),
42
42
  /* @__PURE__ */ r("div", { className: "px-0.5 text-ellipsis leading-none-medium-sm", children: e.label })
43
43
  ]
44
44
  },
@@ -49,83 +49,84 @@ const K = d.forwardRef(
49
49
  {
50
50
  href: e.href,
51
51
  className: "block mt-2",
52
- onClick: g,
53
- children: b
52
+ onClick: x,
53
+ children: Z
54
54
  },
55
55
  e.id
56
56
  ) : /* @__PURE__ */ r(
57
57
  "div",
58
58
  {
59
- onClick: g,
59
+ onClick: x,
60
60
  role: "button",
61
61
  tabIndex: 0,
62
62
  className: "block",
63
- onKeyDown: (l) => {
64
- (l.key === "Enter" || l.key === " ") && (l.preventDefault(), g(l));
63
+ onKeyDown: (a) => {
64
+ (a.key === "Enter" || a.key === " ") && (a.preventDefault(), x(a));
65
65
  },
66
- children: b
66
+ children: Z
67
67
  },
68
68
  e.id
69
69
  );
70
70
  }) })
71
- ] }) : v || o : null, [a, n, v, o, c]), w = d.useCallback(
71
+ ] }) : u || i : null, [o, n, u, i, s]), w = d.useCallback(
72
72
  (e) => {
73
73
  e.stopPropagation(), k(!t);
74
74
  },
75
75
  [t]
76
76
  ), S = d.useCallback(() => {
77
- n && !a ? k(!t) : p && p();
78
- }, [n, a, t, p]);
79
- if (a) {
80
- const e = /* @__PURE__ */ i(
77
+ n && !o ? k(!t) : v && v();
78
+ }, [n, o, t, v]);
79
+ if (o) {
80
+ const e = /* @__PURE__ */ l(
81
81
  "div",
82
82
  {
83
- className: f(
83
+ className: m(
84
84
  "flex items-center justify-center gap-1.5 rounded-lg cursor-pointer transition-all duration-200",
85
85
  "p-2 justify-center gap-1.5 self-stretch relative",
86
- "hover:bg-gray-50 text-gray-700 hover:text-gray-900",
87
- m && "bg-(--color-neutral-100)",
88
- x
86
+ "hover:bg-(--color-neutral-75) text-neutral-secondary hover:text-neutral-primary",
87
+ h && "bg-(--color-neutral-75) text-neutral-primary",
88
+ g
89
89
  ),
90
90
  onClick: S,
91
- ...y,
91
+ ...C,
92
92
  children: [
93
- h && /* @__PURE__ */ r("span", { className: "nav-item-icon flex-shrink-0 flex items-center justify-center w-3.5 h-3.5", children: h }),
94
- u
93
+ f && /* @__PURE__ */ r("span", { className: "nav-item-icon flex-shrink-0 flex items-center justify-center w-3.5 h-3.5", children: f }),
94
+ p
95
95
  ]
96
96
  }
97
97
  );
98
- return C ? /* @__PURE__ */ i(A, { children: [
98
+ return y ? /* @__PURE__ */ l(A, { children: [
99
99
  /* @__PURE__ */ r(E, { children: e }),
100
- /* @__PURE__ */ r(F, { side: "right", children: C })
100
+ /* @__PURE__ */ r(F, { side: "right", children: y })
101
101
  ] }) : /* @__PURE__ */ r("div", { children: e });
102
102
  }
103
- const j = /* @__PURE__ */ i(
103
+ const j = /* @__PURE__ */ l(
104
104
  "div",
105
105
  {
106
- className: f(
106
+ className: m(
107
107
  "nav-item-container flex flex-col justify-center items-center gap-1.5 rounded-lg relative overflow-hidden p-0 w-full"
108
108
  ),
109
109
  children: [
110
- /* @__PURE__ */ i(
110
+ /* @__PURE__ */ l(
111
111
  "div",
112
112
  {
113
- className: f(
114
- "nav-item-main flex items-center justify-center gap-1.5 self-stretch rounded-lg cursor-pointer transition-all duration-200 p-2 relative",
113
+ className: m(
114
+ "nav-item-main flex items-center gap-1.5 self-stretch rounded-lg cursor-pointer transition-all duration-200 p-2 relative",
115
115
  {
116
116
  // Background colors based on state
117
- "hover:bg-gray-50 text-gray-700 hover:text-gray-900": !m && !(s && n && t),
117
+ "hover:bg-(--color-neutral-75) text-neutral-secondary hover:text-neutral-primary": !h && !(c && n && t),
118
118
  // Focused state for expanded nav with sub items (matching component design)
119
- "text-black bg-gray-100": m || s && n && t
119
+ "text-neutral-primary bg-(--color-neutral-75)": h || c && n && t
120
120
  },
121
- x
121
+ g
122
122
  ),
123
123
  onClick: S,
124
- ...y,
124
+ ...C,
125
125
  children: [
126
- h && /* @__PURE__ */ r("span", { className: "nav-item-icon flex-shrink-0 flex items-center justify-center w-3.5 h-3.5", children: h }),
127
- s && /* @__PURE__ */ r("div", { className: "nav-item-label-container flex items-center gap-2.5 flex-1 px-0.5 relative", children: /* @__PURE__ */ r("div", { className: "nav-item-label flex-1 truncate text-sm font-medium leading-none tracking-tight text-black relative line-clamp-1", children: o }) }),
128
- s && n && /* @__PURE__ */ r(D, { children: t ? /* @__PURE__ */ r(
126
+ f && /* @__PURE__ */ r("span", { className: "nav-item-icon flex-shrink-0 flex items-center justify-center w-3.5 h-3.5", children: f }),
127
+ c && i && /* @__PURE__ */ r("div", { className: "nav-item-label-container flex items-center gap-2.5 flex-1 px-0.5 relative", children: /* @__PURE__ */ r("div", { className: "nav-item-label flex-1 truncate text-sm font-medium leading-none tracking-tight text-black relative line-clamp-1", children: i }) }),
128
+ !c || !i ? /* @__PURE__ */ r("div", { className: "flex items-center gap-2.5 flex-1 px-0.5 relative", children: p }) : p,
129
+ c && n && /* @__PURE__ */ r(D, { children: t ? /* @__PURE__ */ r(
129
130
  M,
130
131
  {
131
132
  className: "w-3.5 h-3.5 cursor-pointer text-(--color-neutral-600)",
@@ -137,26 +138,25 @@ const K = d.forwardRef(
137
138
  className: "w-3.5 h-3.5 text-(--color-neutral-600) cursor-pointer",
138
139
  onClick: w
139
140
  }
140
- ) }),
141
- u
141
+ ) })
142
142
  ]
143
143
  }
144
144
  ),
145
- s && n && t && /* @__PURE__ */ i("div", { className: "sub-nav-container flex items-start gap-0 self-stretch p-0", children: [
145
+ c && n && t && /* @__PURE__ */ l("div", { className: "sub-nav-container flex items-start gap-0 self-stretch p-0", children: [
146
146
  /* @__PURE__ */ r("div", { className: "divider-group flex w-2 items-center gap-2.5 self-stretch" }),
147
- /* @__PURE__ */ r("div", { className: "sub-nav-list flex flex-col items-start gap-1.5 flex-1", children: c.map((e) => /* @__PURE__ */ i(
147
+ /* @__PURE__ */ r("div", { className: "sub-nav-list flex flex-col items-start gap-1.5 flex-1", children: s.map((e) => /* @__PURE__ */ l(
148
148
  "div",
149
149
  {
150
- className: f(
150
+ className: m(
151
151
  "cursor-pointer transition-colors flex items-center gap-1.5 self-stretch rounded-lg p-2",
152
152
  {
153
- "hover:!bg-gray-100 bg-gray-100": e.isActive,
154
- "hover:!bg-gray-50": !e.isActive
153
+ "hover:!bg-(--color-neutral-75) bg-(--color-neutral-75) text-neutral-primary": e.isActive,
154
+ "hover:!bg-(--color-neutral-75) text-neutral-secondary": !e.isActive
155
155
  }
156
156
  ),
157
157
  onClick: e.onClick,
158
158
  children: [
159
- /* @__PURE__ */ r(Z, { className: "text-(--color-neutral-150)" }),
159
+ /* @__PURE__ */ r(P, { className: "text-(--color-neutral-150)" }),
160
160
  /* @__PURE__ */ r("div", { className: "px-0.5 text-ellipsis leading-none-medium-sm", children: e.label })
161
161
  ]
162
162
  },
@@ -166,7 +166,7 @@ const K = d.forwardRef(
166
166
  ]
167
167
  }
168
168
  );
169
- return N ? /* @__PURE__ */ r("a", { href: N, children: j }) : /* @__PURE__ */ r("div", { ref: P, children: j });
169
+ return N ? /* @__PURE__ */ r("a", { href: N, children: j }) : /* @__PURE__ */ r("div", { ref: b, children: j });
170
170
  }
171
171
  );
172
172
  K.displayName = "Z2SideNavBarItem";
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  const l = ({ children: e, className: r = "" }) => /* @__PURE__ */ t(
3
3
  "div",
4
4
  {
5
- className: `flex justify-between items-center bg-neutral-default border-stroke-solid-light border border-t-[0.5px] gap-3 p-2 pl-4 rounded-b-xl ${r} `,
5
+ className: `flex justify-between items-center bg-neutral-surface-default border-stroke-solid-light border border-t-[0.5px] gap-3 p-2 pl-4 rounded-b-xl ${r} `,
6
6
  children: e
7
7
  }
8
8
  );
@@ -12,7 +12,7 @@ const x = ({
12
12
  }) => /* @__PURE__ */ r(
13
13
  "thead",
14
14
  {
15
- className: `${t.header} ${s ? "sticky top-[-1.5px] z-10" : ""}`,
15
+ className: `${t.header} ${s ? "sticky top-[-1.5px] z-1" : ""}`,
16
16
  children: /* @__PURE__ */ r("tr", { children: a.map((e) => {
17
17
  const l = h(e.key, i), d = p(e.key, i);
18
18
  return /* @__PURE__ */ r(
@@ -1,7 +1,7 @@
1
1
  export declare const DEFAULT_EMPTY_MESSAGE = "No data available";
2
2
  export declare const TABLE_CSS_CLASSES: {
3
3
  readonly table: "w-full";
4
- readonly header: "bg-neutral-25 text-text-neutral-secondary";
4
+ readonly header: "bg-background-neutral-medium text-text-neutral-secondary";
5
5
  readonly cell: {
6
6
  readonly default: "px-4 py-3 text-sm";
7
7
  readonly cellHeight: {
@@ -1,6 +1,6 @@
1
1
  const e = "No data available", t = {
2
2
  table: "w-full",
3
- header: "bg-neutral-25 text-text-neutral-secondary",
3
+ header: "bg-background-neutral-medium text-text-neutral-secondary",
4
4
  cell: {
5
5
  default: "px-4 py-3 text-sm",
6
6
  cellHeight: {
@@ -1,2 +1,2 @@
1
1
  export { default as TableCard } from './table-card';
2
- export type { TableCardProps, TableCardSearch, TableCardFilter, TableCardPaginationInfo, TableCardPaginationQuickJumper, TableCardPagination, TableCardBodyProps, } from './table-card.type';
2
+ export type { TableCardProps } from './table-card.type';
@@ -1,83 +1,92 @@
1
- import { jsx as a, jsxs as s } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as d } from "react/jsx-runtime";
2
2
  import { Table as e } from "../table/table-provider.js";
3
3
  import "react";
4
- import { cn as c } from "../../lib/utils.js";
4
+ import { cn as o } from "../../lib/utils.js";
5
5
  import "../table/table.context.js";
6
6
  import "../button/button.js";
7
7
  import "../input/input.js";
8
- const J = ({
9
- dataSource: g,
10
- schema: h,
11
- className: C,
12
- showHeader: b = !0,
13
- headerClassName: x,
14
- search: m,
15
- filter: f,
16
- body: k = {
8
+ const S = ({
9
+ dataSource: f,
10
+ schema: m,
11
+ loading: u,
12
+ emptyMessage: N,
13
+ className: H,
14
+ showHeader: P = !0,
15
+ headerClassName: v,
16
+ search: s,
17
+ filter: h,
18
+ headerActions: n,
19
+ body: r = {
17
20
  cell: { cellHeight: "small", hasBorder: !0 },
18
21
  className: "",
19
22
  stickyHeader: !0
20
23
  },
21
- showFooter: N = !0,
22
- footerClassName: v,
23
- paginationInfo: u,
24
- paginationQuickJumper: P,
25
- pagination: p,
26
- overrides: n = {},
27
- ...y
24
+ showFooter: C = !0,
25
+ footerClassName: _,
26
+ pagination: a,
27
+ paginationInfo: c,
28
+ paginationQuickJumper: t
28
29
  }) => {
29
- const r = m ? { ...m, ...n.search } : void 0, d = f ? { ...f, ...n.filter } : void 0, i = { ...k, ...n.body }, o = u ? { ...u, ...n.paginationInfo } : void 0, t = P ? { ...P, ...n.paginationQuickJumper } : void 0, l = p ? { ...p, ...n.pagination } : void 0;
30
- return /* @__PURE__ */ a("div", { className: c("flex flex-col overflow-hidden", C), children: /* @__PURE__ */ s(e, { dataSource: g, schema: h, ...y, children: [
31
- b && /* @__PURE__ */ a(e.Header, { className: c("flex-shrink-0", x), children: /* @__PURE__ */ s(e.HeaderContent, { children: [
32
- r && /* @__PURE__ */ a(
33
- e.Search,
34
- {
35
- search: {
36
- value: r.value || "",
37
- onChange: r.onChange || (() => {
38
- }),
39
- placeholder: r.placeholder
40
- },
41
- className: r.className
42
- }
43
- ),
44
- d && /* @__PURE__ */ a(
45
- e.Filter,
46
- {
47
- schema: h,
48
- filter: {
49
- value: d.value || [],
50
- onChange: d.onChange || (() => {
51
- })
30
+ const x = a || c || t, g = s || h || n;
31
+ return /* @__PURE__ */ l("div", { className: o("flex flex-col overflow-hidden", H), children: /* @__PURE__ */ d(e, { dataSource: f, schema: m, loading: u, emptyMessage: N, children: [
32
+ P && g && /* @__PURE__ */ d(e.Header, { className: o("flex-shrink-0", v), children: [
33
+ /* @__PURE__ */ d(e.HeaderContent, { children: [
34
+ s && /* @__PURE__ */ l(
35
+ e.Search,
36
+ {
37
+ search: {
38
+ value: s.value || "",
39
+ onChange: s.onChange || (() => {
40
+ }),
41
+ placeholder: s.placeholder
42
+ },
43
+ className: s.className
52
44
  }
53
- }
54
- )
55
- ] }) }),
56
- /* @__PURE__ */ a(
45
+ ),
46
+ h && /* @__PURE__ */ l(
47
+ e.Filter,
48
+ {
49
+ schema: m,
50
+ filter: {
51
+ value: h.value || [],
52
+ onChange: h.onChange || (() => {
53
+ })
54
+ }
55
+ }
56
+ )
57
+ ] }),
58
+ n && /* @__PURE__ */ l(e.HeaderContent, { children: n })
59
+ ] }),
60
+ /* @__PURE__ */ l(
57
61
  e.Body,
58
62
  {
59
- cell: i.cell,
60
- sort: i.sort,
61
- className: c(
63
+ cell: r == null ? void 0 : r.cell,
64
+ sort: r == null ? void 0 : r.sort,
65
+ className: o(
62
66
  "flex-1 min-h-0",
63
- g.length < 1 && "border-stroke-solid-light border-b-1 border-x-1 border-t-0 rounded-b-xl",
64
- i.className
67
+ "border-stroke-solid-light border-b-1 border-x-1 border-t-0",
68
+ !(P && g) && "rounded-t-xl",
69
+ !(C && x) && "rounded-b-xl",
70
+ "[&_td:first-child]:border-l-0 [&_td:last-child]:border-r-0",
71
+ "[&_th:first-child]:border-l-0 [&_th:last-child]:border-r-0",
72
+ "[&_tr:last-child_td]:border-b-0",
73
+ r == null ? void 0 : r.className
65
74
  ),
66
- stickyHeader: i.stickyHeader
75
+ stickyHeader: r == null ? void 0 : r.stickyHeader
67
76
  }
68
77
  ),
69
- N && (o || t || l) && /* @__PURE__ */ s(e.Footer, { className: c("flex-shrink-0", v), children: [
70
- o && /* @__PURE__ */ a(e.FooterContent, { children: /* @__PURE__ */ a(
78
+ C && x && /* @__PURE__ */ d(e.Footer, { className: o("flex-shrink-0", _), children: [
79
+ c && /* @__PURE__ */ l(e.FooterContent, { children: /* @__PURE__ */ l(
71
80
  e.PaginationInfo,
72
81
  {
73
- showTotal: o.showTotal || !1,
74
- totalItems: o.totalItems || 0,
75
- currentPage: o.currentPage || 1,
76
- itemsPerPage: o.itemsPerPage || 10
82
+ showTotal: c.showTotal || !1,
83
+ totalItems: c.totalItems || 0,
84
+ currentPage: c.currentPage || 1,
85
+ itemsPerPage: c.itemsPerPage || 10
77
86
  }
78
87
  ) }),
79
- (t || l) && /* @__PURE__ */ s(e.FooterContent, { children: [
80
- t && /* @__PURE__ */ a(
88
+ (t || a) && /* @__PURE__ */ d(e.FooterContent, { children: [
89
+ t && /* @__PURE__ */ l(
81
90
  e.PaginationQuickJumper,
82
91
  {
83
92
  currentPage: t.currentPage || 1,
@@ -87,12 +96,12 @@ const J = ({
87
96
  disabled: t.disabled || !1
88
97
  }
89
98
  ),
90
- l && /* @__PURE__ */ a(
99
+ a && /* @__PURE__ */ l(
91
100
  e.Pagination,
92
101
  {
93
- currentPage: l.currentPage || 1,
94
- totalPage: l.totalPage || 1,
95
- onChange: l.onChange || (() => {
102
+ currentPage: a.currentPage || 1,
103
+ totalPage: a.totalPage || 1,
104
+ onChange: a.onChange || (() => {
96
105
  })
97
106
  }
98
107
  )
@@ -101,5 +110,5 @@ const J = ({
101
110
  ] }) });
102
111
  };
103
112
  export {
104
- J as default
113
+ S as default
105
114
  };