@konstructio/ui 0.1.2-alpha.22 → 0.1.2-alpha.24

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.
@@ -4,6 +4,22 @@ const t = e({
4
4
  isOpen: !1,
5
5
  searchTerm: "",
6
6
  value: void 0,
7
+ canFilter: !0,
8
+ canContinueFetching: !0,
9
+ page: 1,
10
+ options: [],
11
+ setOptions() {
12
+ throw new Error("setOptions function must be overridden");
13
+ },
14
+ setPage() {
15
+ throw new Error("setPage function must be overridden");
16
+ },
17
+ setCanContinueFetching() {
18
+ throw new Error("setCanContinueFetching function must be overridden");
19
+ },
20
+ setCanFilter() {
21
+ throw new Error("setCanFilter function must be overridden");
22
+ },
7
23
  setSearchTerm() {
8
24
  throw new Error("setSearchTerm function must be overridden");
9
25
  },
@@ -1,30 +1,53 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { useRef as p, useState as d, useCallback as v } from "react";
3
- import { DropdownContext as S } from "./dropdown.context.js";
4
- import { useToggle as b } from "../../../hooks/useToggle.js";
5
- const D = ({ children: s, value: n, name: e, highlightSearch: c = !1, onChange: r, onBlur: t }) => {
6
- const l = p(c), [h, i] = b(!1), [m, g] = d(""), u = v(
7
- (o, a) => {
8
- a?.current && (a.current.value = o), r?.({ target: { value: o, name: e ?? "" } }), t?.();
1
+ import { jsx as w } from "react/jsx-runtime";
2
+ import { useState as e, useRef as A, useCallback as u, useEffect as I } from "react";
3
+ import { DropdownContext as O } from "./dropdown.context.js";
4
+ import { useToggle as _ } from "../../../hooks/useToggle.js";
5
+ const s = 1, N = ({
6
+ children: p,
7
+ value: m,
8
+ name: c,
9
+ highlightSearch: f = !1,
10
+ options: r,
11
+ onChange: a,
12
+ onBlur: g
13
+ }) => {
14
+ const [d, i] = e(r), C = A(f), [T, l] = _(!1), [E, F] = e(""), [v, P] = e(!0), [S, n] = e(!0), [b, o] = e(s), x = u(
15
+ (t, h) => {
16
+ h?.current && (h.current.value = t), n(!0), o(s), a?.({ target: { value: t, name: c ?? "" } }), g?.();
9
17
  },
10
- [r, e, t]
18
+ [a, c, g]
19
+ ), D = u(
20
+ (t) => {
21
+ l(t), n(!0), o(s);
22
+ },
23
+ [l]
11
24
  );
12
- return /* @__PURE__ */ f(
13
- S.Provider,
25
+ return I(() => {
26
+ i(r);
27
+ }, [r.length]), /* @__PURE__ */ w(
28
+ O.Provider,
14
29
  {
15
30
  value: {
16
- highlightSearchEnabled: l.current,
17
- isOpen: h,
18
- searchTerm: m,
19
- value: n,
20
- setSearchTerm: g,
21
- setValue: u,
22
- toggleOpen: i
31
+ highlightSearchEnabled: C.current,
32
+ isOpen: T,
33
+ searchTerm: E,
34
+ value: m,
35
+ canFilter: v,
36
+ canContinueFetching: S,
37
+ page: b,
38
+ options: d,
39
+ setOptions: i,
40
+ setPage: o,
41
+ setCanContinueFetching: n,
42
+ setCanFilter: P,
43
+ setSearchTerm: F,
44
+ setValue: x,
45
+ toggleOpen: D
23
46
  },
24
- children: s
47
+ children: p
25
48
  }
26
49
  );
27
50
  };
28
51
  export {
29
- D as DropdownProvider
52
+ N as DropdownProvider
30
53
  };
@@ -1,20 +1,22 @@
1
- import { useRef as c, useEffect as u, useCallback as g } from "react";
2
- import { useDropdownContext as m } from "../contexts/dropdown.hook.js";
3
- const b = ({
4
- ulRef: i,
5
- inputRef: l,
6
- disabled: d
1
+ import { useRef as m, useEffect as l, useCallback as b } from "react";
2
+ import { useDropdownContext as L } from "../contexts/dropdown.hook.js";
3
+ const y = ({
4
+ ulRef: f,
5
+ inputRef: t,
6
+ disabled: w,
7
+ internalValue: i,
8
+ onBlur: g
7
9
  }) => {
8
- const o = c(null), t = c(null), { toggleOpen: n } = m();
9
- u(() => {
10
- const e = new AbortController(), s = (a) => {
11
- a.key === "Escape" && n(!1);
12
- }, r = (a) => {
13
- o.current?.contains(a.target) || n(!1);
10
+ const r = m(null), a = m(null), { value: c, setSearchTerm: v, setCanFilter: u, toggleOpen: n } = L();
11
+ l(() => {
12
+ const e = new AbortController(), o = (d) => {
13
+ d.key === "Escape" && n(!1);
14
+ }, s = (d) => {
15
+ r.current?.contains(d.target) || n(!1);
14
16
  };
15
- return document.addEventListener("keydown", s, {
17
+ return document.addEventListener("keydown", o, {
16
18
  signal: e.signal
17
- }), document.addEventListener("mousedown", r, {
19
+ }), document.addEventListener("mousedown", s, {
18
20
  signal: e.signal
19
21
  }), document.addEventListener(
20
22
  "visibilitychange",
@@ -24,39 +26,78 @@ const b = ({
24
26
  {
25
27
  signal: e.signal
26
28
  }
27
- ), t.current?.addEventListener(
28
- "focus",
29
+ ), a.current?.addEventListener(
30
+ "focusin",
29
31
  () => {
30
- d || n(!0);
32
+ w || n(!0);
31
33
  },
32
34
  { signal: e.signal }
33
35
  ), () => {
34
36
  e.abort();
35
37
  };
36
- }, [n, o]), u(() => {
38
+ }, [n, r]), l(() => {
37
39
  const e = new AbortController();
38
- return t.current?.addEventListener(
40
+ return a.current?.addEventListener(
39
41
  "keydown",
40
- (s) => {
41
- if (s.key === "ArrowDown") {
42
- const r = i.current?.querySelector("li");
43
- r && r.focus();
42
+ (o) => {
43
+ if (o.key === "ArrowDown") {
44
+ const s = f.current?.querySelector("li");
45
+ s && s.focus();
44
46
  }
45
47
  },
46
48
  { signal: e.signal }
47
49
  ), () => {
48
50
  e.abort();
49
51
  };
50
- }, [t, i]);
51
- const f = g(() => {
52
- n(!0), requestAnimationFrame(() => l?.current?.focus());
53
- }, [l, n]);
52
+ }, [a, f]), l(() => {
53
+ const e = new AbortController();
54
+ return t?.current?.addEventListener(
55
+ "focusin",
56
+ () => {
57
+ v(i?.value ?? ""), u(!1);
58
+ },
59
+ { signal: e.signal }
60
+ ), t?.current?.addEventListener(
61
+ "focusout",
62
+ () => {
63
+ u(!0);
64
+ },
65
+ { signal: e.signal }
66
+ ), a.current?.addEventListener(
67
+ "focus",
68
+ () => {
69
+ u(!1);
70
+ },
71
+ { signal: e.signal }
72
+ ), r.current?.addEventListener(
73
+ "focusout",
74
+ (o) => {
75
+ r.current?.contains(o.relatedTarget) || n(!1);
76
+ },
77
+ { signal: e.signal }
78
+ ), () => {
79
+ e.abort();
80
+ };
81
+ }, [c]), l(() => {
82
+ t?.current && (t.current.value = c && i?.value || "");
83
+ }, [i, c]), l(() => {
84
+ const e = new AbortController();
85
+ return r.current?.addEventListener("focusout", (o) => {
86
+ const s = o.relatedTarget;
87
+ (!s || !r.current?.contains(s)) && (t?.current?.value || g?.());
88
+ }), () => {
89
+ e.abort();
90
+ };
91
+ }, [n, r, v, g, c]);
92
+ const E = b(() => {
93
+ n(!0), requestAnimationFrame(() => t?.current?.focus());
94
+ }, [t, n]);
54
95
  return {
55
- wrapperRef: o,
56
- wrapperInputRef: t,
57
- handleOpen: f
96
+ wrapperRef: r,
97
+ wrapperInputRef: a,
98
+ handleOpen: E
58
99
  };
59
100
  };
60
101
  export {
61
- b as useDropdown
102
+ y as useDropdown
62
103
  };
@@ -1,62 +1,50 @@
1
- import { useRef as g, useEffect as i } from "react";
2
- import { useDropdownContext as d } from "../contexts/dropdown.hook.js";
3
- const w = ({
4
- inputRef: s,
5
- searchable: l,
6
- ulRef: t,
7
- wrapperInputRef: u,
8
- wrapperRef: a
1
+ import { useRef as g, useEffect as a } from "react";
2
+ import { useDropdownContext as k } from "../contexts/dropdown.hook.js";
3
+ const A = ({
4
+ searchable: o,
5
+ ulRef: n,
6
+ wrapperInputRef: e,
7
+ filteredOptions: f
9
8
  }) => {
10
- const r = g(0), { isOpen: f } = d();
11
- i(() => {
12
- const c = t.current?.querySelectorAll("li") ?? [], e = Array.from(c).filter(
13
- (n) => n.getAttribute("data-action") !== "true"
14
- ), o = new AbortController(), m = () => {
15
- r.current < e.length - 1 ? (r.current = r.current + 1, e[r.current].focus()) : (r.current = 0, e[0].focus());
16
- }, b = () => {
17
- r.current > 0 ? (r.current = r.current - 1, e[r.current].focus()) : (r.current = 0, s?.current && l ? s.current.focus() : u.current?.focus());
9
+ const r = g(0), { isOpen: s } = k();
10
+ a(() => {
11
+ const m = n.current?.querySelectorAll("li") ?? [], t = Array.from(m).filter(
12
+ (c) => c.getAttribute("data-action") !== "true"
13
+ ), u = new AbortController(), i = () => {
14
+ r.current < t.length - 1 ? (r.current = r.current + 1, t[r.current].focus()) : (r.current = 0, t[0].focus());
15
+ }, l = () => {
16
+ r.current > 0 ? (r.current = r.current - 1, t[r.current].focus()) : (r.current = 0, e?.current && o ? e.current.querySelector("input")?.focus() : e.current?.focus());
18
17
  };
19
- return t.current?.addEventListener(
18
+ return n.current?.addEventListener(
20
19
  "keydown",
21
- (n) => {
22
- switch (n.preventDefault(), n.key) {
20
+ (c) => {
21
+ switch (c.preventDefault(), c.key) {
23
22
  case "ArrowDown": {
24
- m();
23
+ i();
25
24
  break;
26
25
  }
27
26
  case "Tab": {
28
- n.shiftKey ? b() : m();
27
+ c.shiftKey ? l() : i();
29
28
  break;
30
29
  }
31
30
  case "ArrowUp": {
32
- r.current === 0 ? u.current?.focus() : b();
31
+ r.current === 0 ? e.current?.focus() : l();
33
32
  break;
34
33
  }
35
34
  case "Enter": {
36
- e[r.current]?.click();
35
+ t[r.current]?.click();
37
36
  break;
38
37
  }
39
38
  }
40
39
  },
41
- { signal: o.signal }
40
+ { signal: u.signal }
42
41
  ), () => {
43
- o.abort();
42
+ u.abort();
44
43
  };
45
- }, [t, r, u, s, l]), i(() => {
46
- const c = new AbortController();
47
- return a.current?.addEventListener(
48
- "mouseenter",
49
- () => {
50
- (t.current?.querySelectorAll("li") ?? []).forEach((o) => o.blur());
51
- },
52
- { signal: c.signal }
53
- ), () => {
54
- c.abort();
55
- };
56
- }, [t, a]), i(() => {
57
- f || (r.current = 0);
58
- }, [f]);
44
+ }, [n, r, e, o, f.length]), a(() => {
45
+ s || (r.current = 0);
46
+ }, [s]);
59
47
  };
60
48
  export {
61
- w as useNavigationUlList
49
+ A as useNavigationUlList
62
50
  };
@@ -4,12 +4,12 @@ import { cn as c } from "../../utils/index.js";
4
4
  import { TableProvider as K } from "./contexts/table.provider.js";
5
5
  import { Filter as M } from "./components/Filter/Filter.js";
6
6
  import { WrapperBody as W } from "./components/WrapperBody/WrapperBody.js";
7
- import { Header as g } from "./components/Header/Header.js";
8
- import { Body as k } from "./components/Body/Body.js";
9
- import { Pagination as q } from "./components/Pagination/Pagination.js";
10
- import { TruncateText as C } from "./components/TruncateText/TruncateText.js";
11
- import { Actions as F } from "./components/Actions/Actions.js";
12
- const G = ({
7
+ import { Header as k } from "./components/Header/Header.js";
8
+ import { Body as q } from "./components/Body/Body.js";
9
+ import { Pagination as C } from "./components/Pagination/Pagination.js";
10
+ import { TruncateText as F } from "./components/TruncateText/TruncateText.js";
11
+ import { Actions as G } from "./components/Actions/Actions.js";
12
+ const J = ({
13
13
  id: n,
14
14
  ariaLabel: f,
15
15
  columns: p,
@@ -26,8 +26,8 @@ const G = ({
26
26
  queryOptions: z,
27
27
  // Pagination
28
28
  showPagination: B,
29
- showTotalItems: a,
30
- showDropdownPagination: t,
29
+ showTotalItems: t,
30
+ showDropdownPagination: a,
31
31
  showDotPagination: l,
32
32
  showFormPagination: m,
33
33
  pageSizes: V,
@@ -41,8 +41,8 @@ const G = ({
41
41
  }) => {
42
42
  const e = I(
43
43
  () => B || [
44
- a,
45
44
  t,
45
+ a,
46
46
  l,
47
47
  m
48
48
  ].some(Boolean),
@@ -82,37 +82,38 @@ const G = ({
82
82
  "aria-label": f,
83
83
  children: [
84
84
  /* @__PURE__ */ r(
85
- g,
85
+ k,
86
86
  {
87
87
  className: N,
88
88
  classNameArrows: x,
89
89
  classNameActiveArrows: T
90
90
  }
91
91
  ),
92
- /* @__PURE__ */ r(k, { isLoading: o })
92
+ /* @__PURE__ */ r(q, { isLoading: o, showPagination: e })
93
93
  ]
94
94
  }
95
95
  )
96
96
  }
97
97
  ),
98
98
  e && /* @__PURE__ */ r(
99
- q,
99
+ C,
100
100
  {
101
- showTotalItems: a,
102
- showDropdownPagination: t,
101
+ showTotalItems: t,
102
+ showDropdownPagination: a,
103
103
  showDotPagination: l,
104
104
  showFormPagination: m,
105
- pageSizes: V
105
+ pageSizes: V,
106
+ isLoading: o
106
107
  }
107
108
  )
108
109
  ] })
109
110
  }
110
111
  );
111
- }, i = G;
112
+ }, i = J;
112
113
  i.displayName = "KonstructVirtualizedTable";
113
- i.TruncateText = C;
114
- i.Actions = F;
114
+ i.TruncateText = F;
115
+ i.Actions = G;
115
116
  export {
116
- C as TruncateText,
117
+ F as TruncateText,
117
118
  i as VirtualizedTable
118
119
  };
@@ -1,40 +1,48 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { f } from "../../../../index-CSWGJT-v.js";
3
- import { Skeleton as p } from "../Skeleton/Skeleton.js";
4
- import { cn as m } from "../../../../utils/index.js";
5
- import { useTableContext as u } from "../../contexts/table.hook.js";
6
- const y = ({
7
- isLoading: s
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { f as x } from "../../../../index-CSWGJT-v.js";
3
+ import { Skeleton as y } from "../Skeleton/Skeleton.js";
4
+ import { cn as b } from "../../../../utils/index.js";
5
+ import { useTableContext as N } from "../../contexts/table.hook.js";
6
+ const j = ({
7
+ isLoading: d,
8
+ showPagination: a
8
9
  }) => {
9
- const { table: r, pageSize: l, tableFetching: n } = u();
10
- return s || n ? /* @__PURE__ */ e(p, { numberOfRows: l, table: r }) : /* @__PURE__ */ e("tbody", { className: "text-slate-800 text-sm font-normal relative", children: r.getRowModel().rows.map(({ id: a, original: i, getVisibleCells: c }) => {
11
- const { meta: o = {} } = i;
12
- return /* @__PURE__ */ e(
10
+ const { table: o, pageSize: i, tableFetching: f } = N();
11
+ if (d || f)
12
+ return /* @__PURE__ */ t(y, { numberOfRows: i, table: o });
13
+ const e = o.getRowModel().rows ?? [];
14
+ return /* @__PURE__ */ t("tbody", { className: "text-slate-800 text-sm font-normal relative", children: e.map(({ id: s, original: p, getVisibleCells: u }, l) => {
15
+ const { meta: n = {} } = p, m = u();
16
+ return /* @__PURE__ */ t(
13
17
  "tr",
14
18
  {
15
- className: m(
16
- "border-b border-b-gray-200 bg-white last:border-b-transparent",
17
- o.className
19
+ className: b(
20
+ "border-b border-b-gray-200 last:border-b-transparent bg-transparent",
21
+ n.className
18
22
  ),
19
- "data-row-id": a,
20
- ...o.attributes ?? {},
21
- children: c().map(({ id: b, column: t, getContext: d }) => /* @__PURE__ */ e(
23
+ "data-row-id": s,
24
+ ...n.attributes ?? {},
25
+ children: m.map(({ id: g, column: r, getContext: h }, c) => /* @__PURE__ */ t(
22
26
  "td",
23
27
  {
24
- className: m(
25
- "px-4 py-1 text-sm",
26
- t.columnDef.meta?.className
28
+ className: b(
29
+ "px-4 py-1 text-sm bg-white",
30
+ r.columnDef.meta?.className,
31
+ {
32
+ "[tr:last-child_&:first-of-type]:rounded-bl-lg": l === e.length - 1 && c === 0 || !a,
33
+ "[tr:last-child_&:last-of-type]:rounded-br-lg": l === e.length - 1 && c === m.length - 1 || !a
34
+ }
27
35
  ),
28
- ...t.columnDef.meta?.attributes ?? {},
29
- children: f(t.columnDef.cell, d())
36
+ ...r.columnDef.meta?.attributes ?? {},
37
+ children: x(r.columnDef.cell, h())
30
38
  },
31
- b
39
+ g
32
40
  ))
33
41
  },
34
- a
42
+ s
35
43
  );
36
44
  }) });
37
45
  };
38
46
  export {
39
- y as Body
47
+ j as Body
40
48
  };
@@ -1,32 +1,33 @@
1
- import { jsxs as t, Fragment as d, jsx as e } from "react/jsx-runtime";
2
- import { DotPaginate as p } from "../DotPaginate/DotPaginate.js";
3
- import { DropdownPaginate as f } from "../DropdownPaginate/DropdownPaginate.js";
4
- import { FormPaginate as x } from "../FormPaginate/FormPaginate.js";
5
- import { cn as u } from "../../../../utils/index.js";
6
- import { useTableContext as g } from "../../contexts/table.hook.js";
7
- import { DEFAULT_PAGE_SIZE as h } from "../../constants/pagination.js";
8
- const j = ({
1
+ import { jsxs as t, Fragment as p, jsx as e } from "react/jsx-runtime";
2
+ import { DotPaginate as f } from "../DotPaginate/DotPaginate.js";
3
+ import { DropdownPaginate as x } from "../DropdownPaginate/DropdownPaginate.js";
4
+ import { FormPaginate as u } from "../FormPaginate/FormPaginate.js";
5
+ import { cn as g } from "../../../../utils/index.js";
6
+ import { useTableContext as h } from "../../contexts/table.hook.js";
7
+ import { DEFAULT_PAGE_SIZE as b } from "../../constants/pagination.js";
8
+ const D = ({
9
9
  showTotalItems: a = !0,
10
10
  showDropdownPagination: i = !0,
11
11
  showDotPagination: n = !0,
12
12
  showFormPagination: s = !0,
13
13
  pageSizes: l,
14
- classNamePagination: o
14
+ classNamePagination: o,
15
+ isLoading: m
15
16
  }) => {
16
17
  const {
17
18
  totalItems: r = -1 / 0,
18
- tableFetching: m,
19
- isFirstLoad: c
20
- } = g();
21
- return r <= h || m ? null : /* @__PURE__ */ t(d, { children: [
19
+ tableFetching: c,
20
+ isFirstLoad: d
21
+ } = h();
22
+ return r <= b || c || m ? null : /* @__PURE__ */ t(p, { children: [
22
23
  /* @__PURE__ */ e(
23
24
  "div",
24
25
  {
25
- className: u(
26
+ className: g(
26
27
  "bg-slate-50 border border-y-transparent border-x-slate-100 text-slate-500 text-xs not-italic py-2 px-6 rounded-b-lg shadow",
27
28
  o,
28
29
  {
29
- "animate-in fade-in-10": !c
30
+ "animate-in fade-in-10": !d
30
31
  }
31
32
  ),
32
33
  children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
@@ -35,11 +36,11 @@ const j = ({
35
36
  r,
36
37
  " Results"
37
38
  ] }) : null,
38
- i && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(f, { pageSizes: l }) })
39
+ i && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(x, { pageSizes: l }) })
39
40
  ] }),
40
41
  /* @__PURE__ */ t("div", { className: "flex items-center gap-8", children: [
41
- n && /* @__PURE__ */ e(p, {}),
42
- s && /* @__PURE__ */ e(x, {})
42
+ n && /* @__PURE__ */ e(f, {}),
43
+ s && /* @__PURE__ */ e(u, {})
43
44
  ] })
44
45
  ] })
45
46
  }
@@ -48,5 +49,5 @@ const j = ({
48
49
  ] });
49
50
  };
50
51
  export {
51
- j as Pagination
52
+ D as Pagination
52
53
  };
@@ -1,52 +1,67 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { Button as o } from "../../../Button/Button.js";
3
- import { cn as t } from "../../../../utils/index.js";
4
- import { useTableContext as m } from "../../contexts/table.hook.js";
5
- import { E as d } from "../../../../ellipsis-vertical-BVPtjl5f.js";
6
- const x = ({ numberOfRows: r, table: s }) => {
7
- const { tableFetching: l, tableLoading: i } = m();
8
- return /* @__PURE__ */ e("tbody", { className: "text-slate-800 text-sm font-normal relative", children: Array.from({ length: r }).map((c, n) => /* @__PURE__ */ e(
9
- "tr",
10
- {
11
- className: "border-b border-b-gray-200 bg-white last:border-b-transparent",
12
- children: s.getAllColumns().map(
13
- (a) => a.id !== "actions" ? /* @__PURE__ */ e(
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { Button as c } from "../../../Button/Button.js";
3
+ import { cn as i } from "../../../../utils/index.js";
4
+ import { useTableContext as h } from "../../contexts/table.hook.js";
5
+ import { E as g } from "../../../../ellipsis-vertical-BVPtjl5f.js";
6
+ const _ = ({ numberOfRows: n, table: o }) => {
7
+ const { tableFetching: d, tableLoading: m } = h(), e = Array.from({ length: n });
8
+ return /* @__PURE__ */ t("tbody", { className: "text-slate-800 text-sm font-normal relative", children: e.map((p, a) => {
9
+ const s = o.getAllColumns();
10
+ return /* @__PURE__ */ t(
11
+ "tr",
12
+ {
13
+ className: "border-b border-b-gray-200 bg-transparent last:border-b-transparent",
14
+ children: s.map((r, l) => r.id !== "actions" ? /* @__PURE__ */ t(
14
15
  "td",
15
16
  {
16
- className: t("px-4 py-1", a.columnDef.meta?.className),
17
- children: /* @__PURE__ */ e("div", { className: "animate-in fade-in-0", children: /* @__PURE__ */ e("div", { className: "bg-gray-200 animate-pulse rounded h-5 w-full" }) })
17
+ className: i(
18
+ "px-4 py-1 bg-white",
19
+ r.columnDef.meta?.className,
20
+ {
21
+ "[tr:last-child_&:first-of-type]:rounded-bl-lg": a === e.length - 1 && l === 0,
22
+ "[tr:last-child_&:last-of-type]:rounded-br-lg": a === e.length - 1 && l === s.length - 1
23
+ }
24
+ ),
25
+ children: /* @__PURE__ */ t("div", { className: "animate-in fade-in-0", children: /* @__PURE__ */ t("div", { className: "bg-gray-200 animate-pulse rounded h-5 w-full" }) })
18
26
  },
19
- `skeleton-${a.id}`
20
- ) : /* @__PURE__ */ e(
27
+ `skeleton-${r.id}`
28
+ ) : /* @__PURE__ */ t(
21
29
  "td",
22
30
  {
23
- className: t("px-4 py-1", a.columnDef.meta?.className),
24
- children: /* @__PURE__ */ e(
25
- o,
31
+ className: i(
32
+ "px-4 py-1 bg-white",
33
+ r.columnDef.meta?.className,
34
+ {
35
+ "[tr:last-child_&:first-of-type]:rounded-bl-lg": a === e.length - 1 && l === 0,
36
+ "[tr:last-child_&:last-of-type]:rounded-br-lg": a === e.length - 1 && l === s.length - 1
37
+ }
38
+ ),
39
+ children: /* @__PURE__ */ t(
40
+ c,
26
41
  {
27
42
  variant: "text",
28
43
  shape: "circle",
29
44
  size: "large",
30
45
  disabled: !0,
31
46
  "aria-hidden": "true",
32
- children: /* @__PURE__ */ e(
33
- d,
47
+ children: /* @__PURE__ */ t(
48
+ g,
34
49
  {
35
- className: t("w-5 h-5 text-slate-400", {
36
- "text-gray-300 animate-pulse": l || i
50
+ className: i("w-5 h-5 text-slate-400", {
51
+ "text-gray-300 animate-pulse": d || m
37
52
  })
38
53
  }
39
54
  )
40
55
  }
41
56
  )
42
57
  },
43
- `skeleton-${a.id}`
44
- )
45
- )
46
- },
47
- `skeleton-row-${n}`
48
- )) });
58
+ `skeleton-${r.id}`
59
+ ))
60
+ },
61
+ `skeleton-row-${a}`
62
+ );
63
+ }) });
49
64
  };
50
65
  export {
51
- x as Skeleton
66
+ _ as Skeleton
52
67
  };