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

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 (103) hide show
  1. package/dist/{Modal-B8jrP02v.js → Modal-Dpk-1N9W.js} +2 -2
  2. package/dist/chevron-down-DgT-uSF9.js +5 -0
  3. package/dist/chevron-right-DYvXLeql.js +7 -0
  4. package/dist/components/Alert/Alert.js +2 -2
  5. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  6. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  7. package/dist/components/AlertDialog/components/index.js +1 -1
  8. package/dist/components/Badge/Badge.js +2 -8
  9. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  10. package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
  11. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  12. package/dist/components/Button/Button.js +1 -1
  13. package/dist/components/Checkbox/Checkbox.js +6 -7
  14. package/dist/components/Command/Command.js +2 -2
  15. package/dist/components/Command/components/Command.js +1 -1
  16. package/dist/components/Command/components/CommandEmpty.js +1 -1
  17. package/dist/components/Command/components/CommandGroup.js +1 -1
  18. package/dist/components/Command/components/CommandInput.js +2 -2
  19. package/dist/components/Command/components/CommandItem.js +1 -1
  20. package/dist/components/Command/components/CommandList.js +1 -1
  21. package/dist/components/Command/components/CommandSeparator.js +1 -1
  22. package/dist/components/Command/components/DialogContent.js +2 -2
  23. package/dist/components/Command/components/DialogOverlay.js +1 -1
  24. package/dist/components/Datepicker/DatePicker.js +1 -1
  25. package/dist/components/Dropdown/components/List/List.js +1 -1
  26. package/dist/components/Dropdown/components/Wrapper.js +52 -64
  27. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  28. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  29. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
  30. package/dist/components/Input/Input.js +1 -1
  31. package/dist/components/Loading/Loading.js +1 -7
  32. package/dist/components/Modal/Modal.js +1 -1
  33. package/dist/components/Modal/components/Body/Body.js +1 -1
  34. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  35. package/dist/components/Modal/components/Header/Header.js +1 -1
  36. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
  37. package/dist/components/Modal/components/index.js +1 -1
  38. package/dist/components/NumberInput/NumberInput.js +2 -2
  39. package/dist/components/PieChart/PieChart.js +0 -18
  40. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  41. package/dist/components/Range/Range.js +1 -1
  42. package/dist/components/Slider/Slider.js +1 -1
  43. package/dist/components/Switch/Switch.js +10 -11
  44. package/dist/components/Tabs/Tabs.js +1 -1
  45. package/dist/components/Tabs/components/Content.js +1 -1
  46. package/dist/components/Tabs/components/List.js +1 -1
  47. package/dist/components/Tabs/components/Trigger.js +1 -1
  48. package/dist/components/Tag/Tag.js +1 -1
  49. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -2
  50. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
  51. package/dist/components/Toast/Toast.js +233 -210
  52. package/dist/components/Tooltip/Tooltip.js +1 -1
  53. package/dist/components/VirtualizedTable/VirtualizedTable.js +64 -67
  54. package/dist/components/VirtualizedTable/components/Actions/Actions.js +2 -2
  55. package/dist/components/VirtualizedTable/components/Body/Body.js +36 -22
  56. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
  57. package/dist/components/VirtualizedTable/components/Header/Header.js +40 -38
  58. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +23 -16
  59. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +52 -0
  60. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +263 -236
  61. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
  62. package/dist/components/VirtualizedTable/components/index.js +8 -6
  63. package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
  64. package/dist/components/VirtualizedTable/contexts/table.provider.js +43 -42
  65. package/dist/components/index.js +1 -1
  66. package/dist/contexts/theme.provider.js +0 -1
  67. package/dist/{createLucideIcon-DGhJ8Z4k.js → createLucideIcon-D4r5Phnh.js} +0 -24
  68. package/dist/{ellipsis-vertical-DpnVYRxI.js → ellipsis-vertical-BVPtjl5f.js} +1 -7
  69. package/dist/{index-N2OStZoU.js → index--V_ZsiQe.js} +0 -21
  70. package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
  71. package/dist/index-BtQfgaSF.js +60 -0
  72. package/dist/index-CIAmiWcw.js +200 -0
  73. package/dist/index-CSFe9uC5.js +14 -0
  74. package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
  75. package/dist/index-CigKKiZS.js +91 -0
  76. package/dist/index-DDByhzds.js +137 -0
  77. package/dist/{index-DQJhMz8c.js → index-DH2Fnov1.js} +11 -12
  78. package/dist/index-DLcqcWxM.js +29 -0
  79. package/dist/{index-CffpTFMi.js → index-Dbt2vBmS.js} +5 -6
  80. package/dist/{index-l3NwplN0.js → index-DpW9ExsS.js} +10 -11
  81. package/dist/index-DrWQH0QF.js +55 -0
  82. package/dist/{index-0XtjXVpJ.js → index-X4k_cU8k.js} +4 -4
  83. package/dist/index-kyuBfLcN.js +479 -0
  84. package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
  85. package/dist/{index-BAEWsOG1.js → index-ohdbKsws.js} +1 -1
  86. package/dist/index.d.ts +9 -0
  87. package/dist/index.js +1 -1
  88. package/dist/package.json +17 -17
  89. package/dist/styles.css +1 -1
  90. package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
  91. package/dist/{x-4F_5p77m.js → x-DPU9OdYH.js} +1 -1
  92. package/package.json +17 -17
  93. package/dist/chevron-down-J5nS1Tu0.js +0 -11
  94. package/dist/chevron-right-DeMVrnIg.js +0 -19
  95. package/dist/components/Skeleton/Skeleton.js +0 -42
  96. package/dist/index-BVRIAMfe.js +0 -36
  97. package/dist/index-BfXxHr_2.js +0 -125
  98. package/dist/index-Bn4c-gww.js +0 -131
  99. package/dist/index-Cvx4lqTq.js +0 -47
  100. package/dist/index-DQH6odE9.js +0 -82
  101. package/dist/index-DdXGVVBv.js +0 -15
  102. package/dist/index-amYX3uxF.js +0 -436
  103. package/dist/index-sp5ZfG6g.js +0 -31
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { S as i } from "../../index-DQH6odE9.js";
2
+ import { S as i } from "../../index-BtQfgaSF.js";
3
3
  import { forwardRef as v, useRef as N, useImperativeHandle as w, useMemo as h, isValidElement as x } from "react";
4
4
  import { cn as o } from "../../utils/index.js";
5
5
  import { arrowVariants as R, tooltipVariants as V } from "./Tooltip.variants.js";
@@ -1,98 +1,95 @@
1
1
  import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
- import { useMemo as H } from "react";
3
- import { cn as m } from "../../utils/index.js";
4
- import { TableProvider as I } from "./contexts/table.provider.js";
5
- import { Filter as K } from "./components/Filter/Filter.js";
6
- import { Header as M } from "./components/Header/Header.js";
2
+ import { useMemo as I } from "react";
3
+ import { cn as c } from "../../utils/index.js";
4
+ import { TableProvider as K } from "./contexts/table.provider.js";
5
+ import { Filter as M } from "./components/Filter/Filter.js";
6
+ import { WrapperBody as W } from "./components/WrapperBody/WrapperBody.js";
7
+ import { Header as g } from "./components/Header/Header.js";
7
8
  import { Body as k } from "./components/Body/Body.js";
8
9
  import { Pagination as q } from "./components/Pagination/Pagination.js";
9
10
  import { TruncateText as C } from "./components/TruncateText/TruncateText.js";
10
11
  import { Actions as F } from "./components/Actions/Actions.js";
11
12
  const G = ({
12
13
  id: n,
13
- ariaLabel: c,
14
- columns: d,
15
- data: f,
16
- totalItems: p = -1 / 0,
17
- className: u,
18
- classNameHeaderActiveArrows: b,
19
- classNameHeaderArrows: T,
14
+ ariaLabel: f,
15
+ columns: p,
16
+ data: d,
17
+ totalItems: u = -1 / 0,
18
+ className: b,
19
+ classNameHeaderActiveArrows: T,
20
+ classNameHeaderArrows: x,
20
21
  classNameHeaderTable: N,
21
- classNameTable: h,
22
- classNameWrapperTable: x,
23
- isLoading: A,
24
- fetchData: v,
25
- queryOptions: g,
22
+ classNameTable: A,
23
+ classNameWrapperTable: y,
24
+ isLoading: o,
25
+ fetchData: h,
26
+ queryOptions: z,
26
27
  // Pagination
27
- showPagination: y,
28
- showTotalItems: i,
29
- showDropdownPagination: a,
28
+ showPagination: B,
29
+ showTotalItems: a,
30
+ showDropdownPagination: t,
30
31
  showDotPagination: l,
31
- showFormPagination: t,
32
- pageSizes: z,
32
+ showFormPagination: m,
33
+ pageSizes: V,
33
34
  // Filter
34
- showFilter: V = !1,
35
- showFilterInput: j,
35
+ showFilter: j = !1,
36
+ showFilterInput: v,
36
37
  filterSearchPlaceholder: w = "",
37
- multiSelectFilter: B,
38
- filterActions: P,
39
- showResetButton: E = !0
38
+ multiSelectFilter: P,
39
+ filterActions: E,
40
+ showResetButton: H = !0
40
41
  }) => {
41
- const e = H(
42
- () => y || [
43
- i,
42
+ const e = I(
43
+ () => B || [
44
44
  a,
45
+ t,
45
46
  l,
46
- t
47
+ m
47
48
  ].some(Boolean),
48
49
  []
49
50
  );
50
51
  return /* @__PURE__ */ r(
51
- I,
52
+ K,
52
53
  {
53
54
  id: n,
54
- columns: d,
55
- data: f,
56
- fetchData: v,
57
- totalItems: p,
58
- queryOptions: g,
55
+ columns: p,
56
+ data: d,
57
+ fetchData: h,
58
+ totalItems: u,
59
+ queryOptions: z,
59
60
  isPaginationEnabled: e,
60
- children: /* @__PURE__ */ s("section", { className: u, children: [
61
- V && /* @__PURE__ */ r(
62
- K,
61
+ children: /* @__PURE__ */ s("section", { className: c("w-full min-w-fit", b), children: [
62
+ j && /* @__PURE__ */ r(
63
+ M,
63
64
  {
64
- actions: P,
65
- multiSelectFilter: B,
65
+ actions: E,
66
+ multiSelectFilter: P,
66
67
  placeholder: w,
67
- showFilterInput: j,
68
- showResetButton: E
68
+ showFilterInput: v,
69
+ showResetButton: H
69
70
  }
70
71
  ),
71
72
  /* @__PURE__ */ r(
72
- "div",
73
+ W,
73
74
  {
74
- className: m(
75
- "shadow rounded-t-lg",
76
- {
77
- "overflow-hidden rounded-lg": !e
78
- },
79
- x
80
- ),
75
+ showPagination: e,
76
+ classNameWrapperTable: y,
77
+ isLoading: o,
81
78
  children: /* @__PURE__ */ s(
82
79
  "table",
83
80
  {
84
- className: m("w-full border-collapse", h),
85
- "aria-label": c,
81
+ className: c("w-full border-collapse table-fixed", A),
82
+ "aria-label": f,
86
83
  children: [
87
84
  /* @__PURE__ */ r(
88
- M,
85
+ g,
89
86
  {
90
87
  className: N,
91
- classNameArrows: T,
92
- classNameActiveArrows: b
88
+ classNameArrows: x,
89
+ classNameActiveArrows: T
93
90
  }
94
91
  ),
95
- /* @__PURE__ */ r(k, { isLoading: A })
92
+ /* @__PURE__ */ r(k, { isLoading: o })
96
93
  ]
97
94
  }
98
95
  )
@@ -101,21 +98,21 @@ const G = ({
101
98
  e && /* @__PURE__ */ r(
102
99
  q,
103
100
  {
104
- showTotalItems: i,
105
- showDropdownPagination: a,
101
+ showTotalItems: a,
102
+ showDropdownPagination: t,
106
103
  showDotPagination: l,
107
- showFormPagination: t,
108
- pageSizes: z
104
+ showFormPagination: m,
105
+ pageSizes: V
109
106
  }
110
107
  )
111
108
  ] })
112
109
  }
113
110
  );
114
- }, o = G;
115
- o.displayName = "KonstructVirtualizedTable";
116
- o.TruncateText = C;
117
- o.Actions = F;
111
+ }, i = G;
112
+ i.displayName = "KonstructVirtualizedTable";
113
+ i.TruncateText = C;
114
+ i.Actions = F;
118
115
  export {
119
116
  C as TruncateText,
120
- o as VirtualizedTable
117
+ i as VirtualizedTable
121
118
  };
@@ -1,11 +1,11 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import { Button as r } from "../../../Button/Button.js";
3
3
  import { cn as n } from "../../../../utils/index.js";
4
- import { E as c } from "../../../../ellipsis-vertical-DpnVYRxI.js";
4
+ import { E as c } from "../../../../ellipsis-vertical-BVPtjl5f.js";
5
5
  const u = ({
6
6
  actions: t,
7
7
  ...i
8
- }) => t ? /* @__PURE__ */ o("div", { className: "relative group w-fit", children: [
8
+ }) => t ? /* @__PURE__ */ o("div", { className: "relative group", children: [
9
9
  /* @__PURE__ */ o(
10
10
  r,
11
11
  {
@@ -1,26 +1,40 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { f as d } from "../../../../index-Dx2grAuN.js";
3
- import { Skeleton as i } from "../../../Skeleton/Skeleton.js";
4
- import { useTableContext as p } from "../../contexts/table.hook.js";
5
- const w = ({ isLoading: o }) => {
6
- const { table: t, pageSize: a } = p();
7
- return /* @__PURE__ */ e("tbody", { className: "text-slate-800 text-sm font-normal relative", children: o ? /* @__PURE__ */ e(i, { numberOfRows: a, table: t }) : t.getRowModel().rows.map(({ id: l, getVisibleCells: s }) => /* @__PURE__ */ e(
8
- "tr",
9
- {
10
- className: "border border-x-transparent border-t-gray-200 border-b-transparent table w-full table-fixed",
11
- children: s().map(({ id: m, column: r, getContext: n }) => /* @__PURE__ */ e(
12
- "td",
13
- {
14
- className: "px-4 py-1 text-sm",
15
- style: { width: r.getSize() },
16
- children: d(r.columnDef.cell, n())
17
- },
18
- m
19
- ))
20
- },
21
- l
22
- )) });
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
8
+ }) => {
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(
13
+ "tr",
14
+ {
15
+ className: m(
16
+ "border-b border-b-gray-200 bg-white last:border-b-transparent",
17
+ o.className
18
+ ),
19
+ "data-row-id": a,
20
+ ...o.attributes ?? {},
21
+ children: c().map(({ id: b, column: t, getContext: d }) => /* @__PURE__ */ e(
22
+ "td",
23
+ {
24
+ className: m(
25
+ "px-4 py-1 text-sm",
26
+ t.columnDef.meta?.className
27
+ ),
28
+ ...t.columnDef.meta?.attributes ?? {},
29
+ children: f(t.columnDef.cell, d())
30
+ },
31
+ b
32
+ ))
33
+ },
34
+ a
35
+ );
36
+ }) });
23
37
  };
24
38
  export {
25
- w as Body
39
+ y as Body
26
40
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as i, jsxs as m } from "react/jsx-runtime";
2
2
  import { memo as u } from "react";
3
3
  import { cn as p } from "../../../../utils/index.js";
4
- import { C as g, a as d } from "../../../../chevron-right-DeMVrnIg.js";
4
+ import { C as g, a as d } from "../../../../chevron-right-DYvXLeql.js";
5
5
  import { useTableContext as f } from "../../contexts/table.hook.js";
6
6
  const r = u(
7
7
  ({
@@ -1,68 +1,70 @@
1
- import { jsx as s, jsxs as a } from "react/jsx-runtime";
2
- import { f as u } from "../../../../index-Dx2grAuN.js";
3
- import { useCallback as i } from "react";
4
- import { cn as o } from "../../../../utils/index.js";
5
- import b from "../../assets/chevron-up.js";
6
- import g from "../../assets/chevron-down.js";
1
+ import { jsx as r, jsxs as l } from "react/jsx-runtime";
2
+ import { f as g } from "../../../../index-CSWGJT-v.js";
3
+ import { useCallback as p } from "react";
4
+ import { cn as s } from "../../../../utils/index.js";
5
+ import u from "../../assets/chevron-up.js";
6
+ import C from "../../assets/chevron-down.js";
7
7
  import { useTableContext as S } from "../../contexts/table.hook.js";
8
- const y = ({
9
- className: p,
10
- classNameArrows: n,
11
- classNameActiveArrows: l
8
+ const D = ({
9
+ className: n,
10
+ classNameArrows: i,
11
+ classNameActiveArrows: a
12
12
  }) => {
13
- const { table: c, onSorting: r } = S(), d = i(
14
- (t) => r([{ id: t.id, desc: !1 }]),
15
- [r]
16
- ), x = i(
17
- (t) => r([{ id: t.id, desc: !0 }]),
18
- [r]
13
+ const { table: c, onSorting: o } = S(), d = p(
14
+ (t) => o([{ id: t.id, desc: !1 }]),
15
+ [o]
16
+ ), x = p(
17
+ (t) => o([{ id: t.id, desc: !0 }]),
18
+ [o]
19
19
  );
20
- return /* @__PURE__ */ s(
20
+ return /* @__PURE__ */ r(
21
21
  "thead",
22
22
  {
23
- className: o(
24
- "font-semibold uppercase text-slate-500 text-xs not-italic bg-slate-100 w-full relative block overflow-hidden [clip-path:inset(-1px_-1px_0px_-1px_round_8px_8px_0px_0px)]",
25
- p
23
+ className: s(
24
+ "font-semibold uppercase text-slate-500 text-xs not-italic bg-slate-100 overflow-hidden [clip-path:inset(-1px_-1px_0px_-1px_round_8px_8px_0px_0px)]",
25
+ n
26
26
  ),
27
- children: c.getHeaderGroups().map(({ id: t, headers: f }) => /* @__PURE__ */ s("tr", { className: "table w-full table-fixed", children: f.map(({ id: m, column: e, getContext: h }) => /* @__PURE__ */ s(
27
+ children: c.getHeaderGroups().map(({ id: t, headers: m }) => /* @__PURE__ */ r("tr", { children: m.map(({ id: f, column: e, getContext: h }) => /* @__PURE__ */ r(
28
28
  "th",
29
29
  {
30
30
  scope: "col",
31
- className: "px-4 py-3 text-left text-xs",
32
- style: { width: e.columnDef.size },
33
- children: /* @__PURE__ */ a("span", { className: "flex items-center gap-2 w-full", children: [
34
- u(e.columnDef.header, h()),
35
- e.getCanSort() && /* @__PURE__ */ a(
31
+ className: s(
32
+ "px-4 py-3 text-left text-xs",
33
+ e.columnDef.meta?.headerClassName
34
+ ),
35
+ children: /* @__PURE__ */ l("span", { className: "flex items-center gap-2 w-full", children: [
36
+ g(e.columnDef.header, h()),
37
+ e.getCanSort() && /* @__PURE__ */ l(
36
38
  "div",
37
39
  {
38
- className: o(
40
+ className: s(
39
41
  "flex flex-col text-slate-400 justify-center items-center gap-1",
40
- n
42
+ i
41
43
  ),
42
44
  role: "presentation",
43
45
  children: [
44
- /* @__PURE__ */ s(
45
- b,
46
+ /* @__PURE__ */ r(
47
+ u,
46
48
  {
47
- className: o(
49
+ className: s(
48
50
  "w-2 h-2 cursor-pointer",
49
51
  {
50
52
  "text-blue-600": e.getIsSorted() === "asc"
51
53
  },
52
- l
54
+ a
53
55
  ),
54
56
  onClick: () => d(e)
55
57
  }
56
58
  ),
57
- /* @__PURE__ */ s(
58
- g,
59
+ /* @__PURE__ */ r(
60
+ C,
59
61
  {
60
- className: o(
62
+ className: s(
61
63
  "w-2 h-2 cursor-pointer",
62
64
  {
63
65
  "text-blue-600": e.getIsSorted() === "desc"
64
66
  },
65
- l
67
+ a
66
68
  ),
67
69
  onClick: () => x(e)
68
70
  }
@@ -72,11 +74,11 @@ const y = ({
72
74
  )
73
75
  ] })
74
76
  },
75
- m
77
+ f
76
78
  )) }, t))
77
79
  }
78
80
  );
79
81
  };
80
82
  export {
81
- y as Header
83
+ D as Header
82
84
  };
@@ -1,11 +1,11 @@
1
- import { jsxs as t, Fragment as c, jsx as e } from "react/jsx-runtime";
2
- import { DotPaginate as d } from "../DotPaginate/DotPaginate.js";
3
- import { DropdownPaginate as p } from "../DropdownPaginate/DropdownPaginate.js";
4
- import { FormPaginate as f } from "../FormPaginate/FormPaginate.js";
5
- import { cn as x } from "../../../../utils/index.js";
6
- import { useTableContext as u } from "../../contexts/table.hook.js";
7
- import { DEFAULT_PAGE_SIZE as g } from "../../constants/pagination.js";
8
- const F = ({
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 = ({
9
9
  showTotalItems: a = !0,
10
10
  showDropdownPagination: i = !0,
11
11
  showDotPagination: n = !0,
@@ -13,14 +13,21 @@ const F = ({
13
13
  pageSizes: l,
14
14
  classNamePagination: o
15
15
  }) => {
16
- const { totalItems: r = -1 / 0, tableFetching: m } = u();
17
- return r <= g || m ? null : /* @__PURE__ */ t(c, { children: [
16
+ const {
17
+ totalItems: r = -1 / 0,
18
+ tableFetching: m,
19
+ isFirstLoad: c
20
+ } = g();
21
+ return r <= h || m ? null : /* @__PURE__ */ t(d, { children: [
18
22
  /* @__PURE__ */ e(
19
23
  "div",
20
24
  {
21
- className: x(
25
+ className: u(
22
26
  "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",
23
- o
27
+ o,
28
+ {
29
+ "animate-in fade-in-10": !c
30
+ }
24
31
  ),
25
32
  children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
26
33
  /* @__PURE__ */ t("div", { className: "flex items-center gap-6", children: [
@@ -28,11 +35,11 @@ const F = ({
28
35
  r,
29
36
  " Results"
30
37
  ] }) : null,
31
- i && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(p, { pageSizes: l }) })
38
+ i && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(f, { pageSizes: l }) })
32
39
  ] }),
33
40
  /* @__PURE__ */ t("div", { className: "flex items-center gap-8", children: [
34
- n && /* @__PURE__ */ e(d, {}),
35
- s && /* @__PURE__ */ e(f, {})
41
+ n && /* @__PURE__ */ e(p, {}),
42
+ s && /* @__PURE__ */ e(x, {})
36
43
  ] })
37
44
  ] })
38
45
  }
@@ -41,5 +48,5 @@ const F = ({
41
48
  ] });
42
49
  };
43
50
  export {
44
- F as Pagination
51
+ j as Pagination
45
52
  };
@@ -0,0 +1,52 @@
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(
14
+ "td",
15
+ {
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" }) })
18
+ },
19
+ `skeleton-${a.id}`
20
+ ) : /* @__PURE__ */ e(
21
+ "td",
22
+ {
23
+ className: t("px-4 py-1", a.columnDef.meta?.className),
24
+ children: /* @__PURE__ */ e(
25
+ o,
26
+ {
27
+ variant: "text",
28
+ shape: "circle",
29
+ size: "large",
30
+ disabled: !0,
31
+ "aria-hidden": "true",
32
+ children: /* @__PURE__ */ e(
33
+ d,
34
+ {
35
+ className: t("w-5 h-5 text-slate-400", {
36
+ "text-gray-300 animate-pulse": l || i
37
+ })
38
+ }
39
+ )
40
+ }
41
+ )
42
+ },
43
+ `skeleton-${a.id}`
44
+ )
45
+ )
46
+ },
47
+ `skeleton-row-${n}`
48
+ )) });
49
+ };
50
+ export {
51
+ x as Skeleton
52
+ };