@ztwoint/z-ui 0.1.73 → 0.1.75

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,19 +1,19 @@
1
1
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import * as S from "react";
3
- import { DEFAULT_EMPTY_MESSAGE as g, TABLE_CSS_CLASSES as m } from "./table.const.js";
4
- import { TableHeader as y } from "./components/table-header/table-header.js";
2
+ import * as y from "react";
3
+ import { DEFAULT_EMPTY_MESSAGE as S, TABLE_CSS_CLASSES as n } from "./table.const.js";
4
+ import { TableHeader as g } from "./components/table-header/table-header.js";
5
5
  import { TableRow as T } from "./components/table-row.js";
6
- import { TableEmptyState as E } from "./components/table-empty-state.js";
7
- import { TableContext as v } from "./table.context.js";
8
- import { cn as n } from "../../lib/utils.js";
9
- const j = ({ cell: a = { hasBorder: !0 }, sort: i, className: d, stickyHeader: c = !1, ...f }) => {
10
- const u = S.useContext(v), {
6
+ import { TableEmptyState as v } from "./components/table-empty-state.js";
7
+ import { TableContext as w } from "./table.context.js";
8
+ import { cn as m } from "../../lib/utils.js";
9
+ const j = ({ cell: a = { hasBorder: !0 }, sort: d, className: i, stickyHeader: c = !1, ...f }) => {
10
+ const u = y.useContext(w), {
11
11
  dataSource: t = [],
12
12
  schema: o = [],
13
13
  loading: r = !1,
14
- emptyMessage: p = g,
14
+ emptyMessage: p = S,
15
15
  customCells: b
16
- } = u || f, h = () => !t || t.length === 0 && !r ? /* @__PURE__ */ e(E, { colSpan: o.length, message: p }) : /* @__PURE__ */ e("tbody", { children: t.map((x, s) => /* @__PURE__ */ e(
16
+ } = u || f, h = () => !t || t.length === 0 && !r ? /* @__PURE__ */ e(v, { colSpan: o.length, message: p }) : /* @__PURE__ */ e("tbody", { children: t.map((x, s) => /* @__PURE__ */ e(
17
17
  T,
18
18
  {
19
19
  record: x,
@@ -27,15 +27,15 @@ const j = ({ cell: a = { hasBorder: !0 }, sort: i, className: d, stickyHeader: c
27
27
  return /* @__PURE__ */ l(
28
28
  "div",
29
29
  {
30
- className: n(
31
- r ? "relative" : "overflow-y-auto",
32
- m.bordered[a.hasBorder && !r && t.length > 0 ? "true" : "false"],
33
- d
30
+ className: m(
31
+ r ? "overflow-y-hidden relative" : "overflow-y-auto",
32
+ n.bordered[a.hasBorder && !r && t.length > 0 ? "true" : "false"],
33
+ i
34
34
  ),
35
35
  children: [
36
- /* @__PURE__ */ l("table", { className: n(m.table, "w-full"), children: [
36
+ /* @__PURE__ */ l("table", { className: m(n.table, "w-full"), children: [
37
37
  h(),
38
- /* @__PURE__ */ e(y, { schema: o, sort: i, cell: a, stickyHeader: c })
38
+ /* @__PURE__ */ e(g, { schema: o, sort: d, cell: a, stickyHeader: c })
39
39
  ] }),
40
40
  r && /* @__PURE__ */ e("div", { className: "absolute top-0 inset-0 w-full h-full bg-white/80 flex items-center justify-center", children: /* @__PURE__ */ l("div", { className: "flex flex-col items-center gap-3", children: [
41
41
  /* @__PURE__ */ e("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-text-brand-secondary" }),
@@ -75,7 +75,7 @@ const ne = () => {
75
75
  shade: d ? "brand" : "neutral",
76
76
  size: "small",
77
77
  children: [
78
- "Filter ",
78
+ "Filters ",
79
79
  d && `(${h.value.length})`
80
80
  ]
81
81
  }