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

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 (110) hide show
  1. package/dist/{Modal-V67Uz78z.js → Modal-B8jrP02v.js} +20 -20
  2. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  3. package/dist/{chevron-down-BLZPftpV.js → chevron-down-J5nS1Tu0.js} +2 -2
  4. package/dist/chevron-right-DeMVrnIg.js +19 -0
  5. package/dist/components/Alert/Alert.js +2 -2
  6. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  7. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  8. package/dist/components/AlertDialog/components/index.js +1 -1
  9. package/dist/components/Badge/Badge.js +31 -28
  10. package/dist/components/Badge/Badge.variants.js +7 -5
  11. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  12. package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
  13. package/dist/components/Button/Button.variants.js +1 -1
  14. package/dist/components/Checkbox/Checkbox.js +5 -4
  15. package/dist/components/Checkbox/Checkbox.variants.js +5 -4
  16. package/dist/components/Command/Command.js +2 -2
  17. package/dist/components/Command/components/Command.js +1 -1
  18. package/dist/components/Command/components/CommandEmpty.js +1 -1
  19. package/dist/components/Command/components/CommandGroup.js +1 -1
  20. package/dist/components/Command/components/CommandInput.js +2 -2
  21. package/dist/components/Command/components/CommandItem.js +1 -1
  22. package/dist/components/Command/components/CommandList.js +1 -1
  23. package/dist/components/Command/components/CommandSeparator.js +1 -1
  24. package/dist/components/Command/components/DialogContent.js +2 -2
  25. package/dist/components/Command/components/DialogOverlay.js +1 -1
  26. package/dist/components/Datepicker/DatePicker.js +545 -543
  27. package/dist/components/Dropdown/Dropdown.js +36 -24
  28. package/dist/components/Dropdown/Dropdown.variants.js +32 -9
  29. package/dist/components/Dropdown/components/List/List.js +64 -45
  30. package/dist/components/Dropdown/components/List/List.variants.js +9 -7
  31. package/dist/components/Dropdown/components/ListItem/ListItem.js +70 -24
  32. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +9 -7
  33. package/dist/components/Dropdown/components/Wrapper.js +154 -108
  34. package/dist/components/Dropdown/contexts/dropdown.context.js +9 -8
  35. package/dist/components/Dropdown/contexts/dropdown.provider.js +20 -19
  36. package/dist/components/Dropdown/hooks/useDropdown.js +30 -27
  37. package/dist/components/Dropdown/hooks/useNavigationList.js +32 -28
  38. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  39. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  40. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
  41. package/dist/components/Input/Input.js +1 -1
  42. package/dist/components/Loading/Loading.js +2 -2
  43. package/dist/components/Modal/Modal.js +2 -2
  44. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
  45. package/dist/components/Modal/components/index.js +1 -1
  46. package/dist/components/NumberInput/NumberInput.js +2 -2
  47. package/dist/components/PieChart/PieChart.js +649 -648
  48. package/dist/components/Range/Range.js +1 -1
  49. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
  50. package/dist/components/Skeleton/Skeleton.js +42 -0
  51. package/dist/components/Slider/Slider.js +1 -1
  52. package/dist/components/Switch/Switch.js +6 -5
  53. package/dist/components/Tabs/Tabs.js +1 -1
  54. package/dist/components/Tabs/Tabs.variants.js +45 -24
  55. package/dist/components/Tabs/components/Content.js +1 -1
  56. package/dist/components/Tabs/components/List.js +1 -1
  57. package/dist/components/Tabs/components/Trigger.js +9 -8
  58. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +98 -49
  59. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
  60. package/dist/components/Toast/Toast.js +57 -55
  61. package/dist/components/VirtualizedTable/VirtualizedTable.js +121 -0
  62. package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
  63. package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
  64. package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
  65. package/dist/components/VirtualizedTable/assets/index.js +6 -0
  66. package/dist/components/VirtualizedTable/components/Actions/Actions.js +40 -0
  67. package/dist/components/VirtualizedTable/components/Body/Body.js +26 -0
  68. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
  69. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
  70. package/dist/components/VirtualizedTable/components/Filter/Filter.js +88 -0
  71. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
  72. package/dist/components/VirtualizedTable/components/Header/Header.js +82 -0
  73. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +45 -0
  74. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1871 -0
  75. package/dist/components/VirtualizedTable/components/index.js +14 -0
  76. package/dist/components/VirtualizedTable/constants/index.js +5 -0
  77. package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
  78. package/dist/components/VirtualizedTable/contexts/index.js +8 -0
  79. package/dist/components/VirtualizedTable/contexts/table.context.js +31 -0
  80. package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
  81. package/dist/components/VirtualizedTable/contexts/table.provider.js +84 -0
  82. package/dist/components/index.js +44 -40
  83. package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-DGhJ8Z4k.js} +4 -4
  84. package/dist/debounce-BFejQm9P.js +200 -0
  85. package/dist/ellipsis-vertical-DpnVYRxI.js +15 -0
  86. package/dist/{index-D3xzCzcO.js → index-0XtjXVpJ.js} +2 -2
  87. package/dist/index-BAEWsOG1.js +27 -0
  88. package/dist/index-BVRIAMfe.js +36 -0
  89. package/dist/index-BZPx6jYI.js +8 -0
  90. package/dist/{index-Oq5GlCHP.js → index-Bn4c-gww.js} +1 -1
  91. package/dist/index-CffpTFMi.js +137 -0
  92. package/dist/{index-BAraV3ai.js → index-DQJhMz8c.js} +1 -1
  93. package/dist/index-DdXGVVBv.js +15 -0
  94. package/dist/index-Dx2grAuN.js +1742 -0
  95. package/dist/{index-h-Ul0anl.js → index-N2OStZoU.js} +1 -1
  96. package/dist/{index-BXuxPoz7.js → index-amYX3uxF.js} +18 -17
  97. package/dist/{index-DB2XhXHn.js → index-l3NwplN0.js} +11 -10
  98. package/dist/{index-iXyXtdgP.js → index-sp5ZfG6g.js} +1 -1
  99. package/dist/index.d.ts +121 -10
  100. package/dist/index.js +41 -37
  101. package/dist/package.json +33 -25
  102. package/dist/styles.css +1 -1
  103. package/dist/ui/civo-theme.css +191 -167
  104. package/dist/{x-BPcqkRZd.js → x-4F_5p77m.js} +1 -1
  105. package/package.json +33 -25
  106. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  107. package/dist/chevron-up-RLP4nX7V.js +0 -54
  108. package/dist/index-C9T9HQaa.js +0 -423
  109. package/dist/index-CZnD2QxM.js +0 -32
  110. package/dist/index-CrBonFvu.js +0 -144
@@ -2,24 +2,26 @@ import { jsx as i, jsxs as A, Fragment as se } from "react/jsx-runtime";
2
2
  import { u as ae, S as B } from "../../index-DQH6odE9.js";
3
3
  import * as n from "react";
4
4
  import { useRef as xe, useEffect as be, useMemo as oe, isValidElement as re, useCallback as ge } from "react";
5
- import { P as D, r as Se, d as Ie } from "../../index-C9T9HQaa.js";
6
- import { c as Ne, a as Ae, b as x, u as De } from "../../index-BfXxHr_2.js";
7
- import { c as Fe } from "../../index-Cvx4lqTq.js";
8
- import { B as _e, R as Le, P as Me } from "../../index-CrBonFvu.js";
9
- import { P as Oe } from "../../index-C1g_chDT.js";
5
+ import * as Se from "react-dom";
6
+ import { c as Ie, a as Ne, b as x, u as Ae } from "../../index-BfXxHr_2.js";
7
+ import { c as De } from "../../index-Cvx4lqTq.js";
8
+ import { B as Fe, R as _e } from "../../index-CffpTFMi.js";
9
+ import { P as Le } from "../../index-DdXGVVBv.js";
10
+ import { P as Me } from "../../index-C1g_chDT.js";
11
+ import { P as D, d as Oe } from "../../index-BVRIAMfe.js";
10
12
  import { u as $ } from "../../index-0ioNhtNM.js";
11
- import { V as ie, R as ke } from "../../index-iXyXtdgP.js";
13
+ import { V as ie, R as ke } from "../../index-sp5ZfG6g.js";
12
14
  import { cn as j } from "../../utils/index.js";
13
15
  import { closeToastVariants as Ve, toastVariants as Ke, viewportToastVariants as He } from "./Toast.variants.js";
14
- import { X as We } from "../../x-BPcqkRZd.js";
15
- var Q = "ToastProvider", [Z, Xe, $e] = Fe("Toast"), [ce, xt] = Ne("Toast", [$e]), [Ue, U] = ce(Q), ue = (e) => {
16
+ import { X as We } from "../../x-4F_5p77m.js";
17
+ var Q = "ToastProvider", [Z, Xe, $e] = De("Toast"), [ce, bt] = Ie("Toast", [$e]), [Ue, U] = ce(Q), ue = (e) => {
16
18
  const {
17
19
  __scopeToast: r,
18
20
  label: o = "Notification",
19
21
  duration: t = 5e3,
20
22
  swipeDirection: c = "right",
21
23
  swipeThreshold: d = 50,
22
- children: p
24
+ children: f
23
25
  } = e, [T, v] = n.useState(null), [a, E] = n.useState(0), w = n.useRef(!1), S = n.useRef(!1);
24
26
  return o.trim() || console.error(
25
27
  `Invalid prop \`label\` supplied to \`${Q}\`. Expected non-empty \`string\`.`
@@ -38,7 +40,7 @@ var Q = "ToastProvider", [Z, Xe, $e] = Fe("Toast"), [ce, xt] = Ne("Toast", [$e])
38
40
  onToastRemove: n.useCallback(() => E((b) => b - 1), []),
39
41
  isFocusedToastEscapeKeyDownRef: w,
40
42
  isClosePausedRef: S,
41
- children: p
43
+ children: f
42
44
  }
43
45
  ) });
44
46
  };
@@ -50,7 +52,7 @@ var le = "ToastViewport", Ye = ["F8"], z = "toast.viewportPause", G = "toast.vie
50
52
  hotkey: t = Ye,
51
53
  label: c = "Notifications ({hotkey})",
52
54
  ...d
53
- } = e, p = U(le, o), T = Xe(o), v = n.useRef(null), a = n.useRef(null), E = n.useRef(null), w = n.useRef(null), S = ae(r, w, p.onViewportChange), b = t.join("+").replace(/Key/g, "").replace(/Digit/g, ""), R = p.toastCount > 0;
55
+ } = e, f = U(le, o), T = Xe(o), v = n.useRef(null), a = n.useRef(null), E = n.useRef(null), w = n.useRef(null), S = ae(r, w, f.onViewportChange), b = t.join("+").replace(/Key/g, "").replace(/Digit/g, ""), R = f.toastCount > 0;
54
56
  n.useEffect(() => {
55
57
  const u = (h) => {
56
58
  t.length !== 0 && t.every((m) => h[m] || h.code === m) && w.current?.focus();
@@ -59,55 +61,55 @@ var le = "ToastViewport", Ye = ["F8"], z = "toast.viewportPause", G = "toast.vie
59
61
  }, [t]), n.useEffect(() => {
60
62
  const u = v.current, h = w.current;
61
63
  if (R && u && h) {
62
- const f = () => {
63
- if (!p.isClosePausedRef.current) {
64
+ const p = () => {
65
+ if (!f.isClosePausedRef.current) {
64
66
  const y = new CustomEvent(z);
65
- h.dispatchEvent(y), p.isClosePausedRef.current = !0;
67
+ h.dispatchEvent(y), f.isClosePausedRef.current = !0;
66
68
  }
67
69
  }, m = () => {
68
- if (p.isClosePausedRef.current) {
70
+ if (f.isClosePausedRef.current) {
69
71
  const y = new CustomEvent(G);
70
- h.dispatchEvent(y), p.isClosePausedRef.current = !1;
72
+ h.dispatchEvent(y), f.isClosePausedRef.current = !1;
71
73
  }
72
74
  }, P = (y) => {
73
75
  !u.contains(y.relatedTarget) && m();
74
76
  }, C = () => {
75
77
  u.contains(document.activeElement) || m();
76
78
  };
77
- return u.addEventListener("focusin", f), u.addEventListener("focusout", P), u.addEventListener("pointermove", f), u.addEventListener("pointerleave", C), window.addEventListener("blur", f), window.addEventListener("focus", m), () => {
78
- u.removeEventListener("focusin", f), u.removeEventListener("focusout", P), u.removeEventListener("pointermove", f), u.removeEventListener("pointerleave", C), window.removeEventListener("blur", f), window.removeEventListener("focus", m);
79
+ return u.addEventListener("focusin", p), u.addEventListener("focusout", P), u.addEventListener("pointermove", p), u.addEventListener("pointerleave", C), window.addEventListener("blur", p), window.addEventListener("focus", m), () => {
80
+ u.removeEventListener("focusin", p), u.removeEventListener("focusout", P), u.removeEventListener("pointermove", p), u.removeEventListener("pointerleave", C), window.removeEventListener("blur", p), window.removeEventListener("focus", m);
79
81
  };
80
82
  }
81
- }, [R, p.isClosePausedRef]);
83
+ }, [R, f.isClosePausedRef]);
82
84
  const l = n.useCallback(
83
85
  ({ tabbingDirection: u }) => {
84
- const f = T().map((m) => {
86
+ const p = T().map((m) => {
85
87
  const P = m.ref.current, C = [P, ...nt(P)];
86
88
  return u === "forwards" ? C : C.reverse();
87
89
  });
88
- return (u === "forwards" ? f.reverse() : f).flat();
90
+ return (u === "forwards" ? p.reverse() : p).flat();
89
91
  },
90
92
  [T]
91
93
  );
92
94
  return n.useEffect(() => {
93
95
  const u = w.current;
94
96
  if (u) {
95
- const h = (f) => {
96
- const m = f.altKey || f.ctrlKey || f.metaKey;
97
- if (f.key === "Tab" && !m) {
98
- const C = document.activeElement, y = f.shiftKey;
99
- if (f.target === u && y) {
97
+ const h = (p) => {
98
+ const m = p.altKey || p.ctrlKey || p.metaKey;
99
+ if (p.key === "Tab" && !m) {
100
+ const C = document.activeElement, y = p.shiftKey;
101
+ if (p.target === u && y) {
100
102
  a.current?.focus();
101
103
  return;
102
104
  }
103
105
  const _ = l({ tabbingDirection: y ? "backwards" : "forwards" }), V = _.findIndex((N) => N === C);
104
- q(_.slice(V + 1)) ? f.preventDefault() : y ? a.current?.focus() : E.current?.focus();
106
+ q(_.slice(V + 1)) ? p.preventDefault() : y ? a.current?.focus() : E.current?.focus();
105
107
  }
106
108
  };
107
109
  return u.addEventListener("keydown", h), () => u.removeEventListener("keydown", h);
108
110
  }
109
111
  }, [T, l]), /* @__PURE__ */ A(
110
- _e,
112
+ Fe,
111
113
  {
112
114
  ref: v,
113
115
  role: "region",
@@ -146,9 +148,9 @@ var le = "ToastViewport", Ye = ["F8"], z = "toast.viewportPause", G = "toast.vie
146
148
  }
147
149
  );
148
150
  de.displayName = le;
149
- var pe = "ToastFocusProxy", J = n.forwardRef(
151
+ var fe = "ToastFocusProxy", J = n.forwardRef(
150
152
  (e, r) => {
151
- const { __scopeToast: o, onFocusFromOutsideViewport: t, ...c } = e, d = U(pe, o);
153
+ const { __scopeToast: o, onFocusFromOutsideViewport: t, ...c } = e, d = U(fe, o);
152
154
  return /* @__PURE__ */ i(
153
155
  ie,
154
156
  {
@@ -156,28 +158,28 @@ var pe = "ToastFocusProxy", J = n.forwardRef(
156
158
  ...c,
157
159
  ref: r,
158
160
  style: { position: "fixed" },
159
- onFocus: (p) => {
160
- const T = p.relatedTarget;
161
+ onFocus: (f) => {
162
+ const T = f.relatedTarget;
161
163
  !d.viewport?.contains(T) && t();
162
164
  }
163
165
  }
164
166
  );
165
167
  }
166
168
  );
167
- J.displayName = pe;
168
- var O = "Toast", Be = "toast.swipeStart", je = "toast.swipeMove", qe = "toast.swipeCancel", ze = "toast.swipeEnd", fe = n.forwardRef(
169
+ J.displayName = fe;
170
+ var O = "Toast", Be = "toast.swipeStart", je = "toast.swipeMove", qe = "toast.swipeCancel", ze = "toast.swipeEnd", pe = n.forwardRef(
169
171
  (e, r) => {
170
- const { forceMount: o, open: t, defaultOpen: c, onOpenChange: d, ...p } = e, [T, v] = Ae({
172
+ const { forceMount: o, open: t, defaultOpen: c, onOpenChange: d, ...f } = e, [T, v] = Ne({
171
173
  prop: t,
172
174
  defaultProp: c ?? !0,
173
175
  onChange: d,
174
176
  caller: O
175
177
  });
176
- return /* @__PURE__ */ i(Oe, { present: o || T, children: /* @__PURE__ */ i(
178
+ return /* @__PURE__ */ i(Me, { present: o || T, children: /* @__PURE__ */ i(
177
179
  Qe,
178
180
  {
179
181
  open: T,
180
- ...p,
182
+ ...f,
181
183
  ref: r,
182
184
  onClose: () => v(!1),
183
185
  onPause: $(e.onPause),
@@ -200,7 +202,7 @@ var O = "Toast", Be = "toast.swipeStart", je = "toast.swipeMove", qe = "toast.sw
200
202
  ) });
201
203
  }
202
204
  );
203
- fe.displayName = O;
205
+ pe.displayName = O;
204
206
  var [Ge, Je] = ce(O, {
205
207
  onClose() {
206
208
  }
@@ -211,7 +213,7 @@ var [Ge, Je] = ce(O, {
211
213
  type: t = "foreground",
212
214
  duration: c,
213
215
  open: d,
214
- onClose: p,
216
+ onClose: f,
215
217
  onEscapeKeyDown: T,
216
218
  onPause: v,
217
219
  onResume: a,
@@ -220,8 +222,8 @@ var [Ge, Je] = ce(O, {
220
222
  onSwipeCancel: S,
221
223
  onSwipeEnd: b,
222
224
  ...R
223
- } = e, l = U(O, o), [u, h] = n.useState(null), f = ae(r, (s) => h(s)), m = n.useRef(null), P = n.useRef(null), C = c || l.duration, y = n.useRef(0), F = n.useRef(C), k = n.useRef(0), { onToastAdd: _, onToastRemove: V } = l, N = $(() => {
224
- u?.contains(document.activeElement) && l.viewport?.focus(), p();
225
+ } = e, l = U(O, o), [u, h] = n.useState(null), p = ae(r, (s) => h(s)), m = n.useRef(null), P = n.useRef(null), C = c || l.duration, y = n.useRef(0), F = n.useRef(C), k = n.useRef(0), { onToastAdd: _, onToastRemove: V } = l, N = $(() => {
226
+ u?.contains(document.activeElement) && l.viewport?.focus(), f();
225
227
  }), K = n.useCallback(
226
228
  (s) => {
227
229
  !s || s === 1 / 0 || (window.clearTimeout(k.current), y.current = (/* @__PURE__ */ new Date()).getTime(), k.current = window.setTimeout(N, s));
@@ -257,7 +259,7 @@ var [Ge, Je] = ce(O, {
257
259
  ),
258
260
  /* @__PURE__ */ i(Ge, { scope: o, onClose: N, children: Se.createPortal(
259
261
  /* @__PURE__ */ i(Z.ItemSlot, { scope: o, children: /* @__PURE__ */ i(
260
- Le,
262
+ _e,
261
263
  {
262
264
  asChild: !0,
263
265
  onEscapeKeyDown: x(T, () => {
@@ -270,7 +272,7 @@ var [Ge, Je] = ce(O, {
270
272
  "data-state": d ? "open" : "closed",
271
273
  "data-swipe-direction": l.swipeDirection,
272
274
  ...R,
273
- ref: f,
275
+ ref: p,
274
276
  style: { userSelect: "none", touchAction: "none", ...e.style },
275
277
  onKeyDown: x(e.onKeyDown, (s) => {
276
278
  s.key === "Escape" && (T?.(s.nativeEvent), s.nativeEvent.defaultPrevented || (l.isFocusedToastEscapeKeyDownRef.current = !0, N()));
@@ -314,11 +316,11 @@ var [Ge, Je] = ce(O, {
314
316
  ] }) : null;
315
317
  }
316
318
  ), Ze = (e) => {
317
- const { __scopeToast: r, children: o, ...t } = e, c = U(O, r), [d, p] = n.useState(!1), [T, v] = n.useState(!1);
318
- return ot(() => p(!0)), n.useEffect(() => {
319
+ const { __scopeToast: r, children: o, ...t } = e, c = U(O, r), [d, f] = n.useState(!1), [T, v] = n.useState(!1);
320
+ return ot(() => f(!0)), n.useEffect(() => {
319
321
  const a = window.setTimeout(() => v(!0), 1e3);
320
322
  return () => window.clearTimeout(a);
321
- }, []), T ? null : /* @__PURE__ */ i(Me, { asChild: !0, children: /* @__PURE__ */ i(ie, { ...t, children: d && /* @__PURE__ */ A(se, { children: [
323
+ }, []), T ? null : /* @__PURE__ */ i(Le, { asChild: !0, children: /* @__PURE__ */ i(ie, { ...t, children: d && /* @__PURE__ */ A(se, { children: [
322
324
  c.label,
323
325
  " ",
324
326
  o
@@ -380,8 +382,8 @@ function Pe(e) {
380
382
  const c = t.ariaHidden || t.hidden || t.style.display === "none", d = t.dataset.radixToastAnnounceExclude === "";
381
383
  if (!c)
382
384
  if (d) {
383
- const p = t.dataset.radixToastAnnounceAlt;
384
- p && r.push(p);
385
+ const f = t.dataset.radixToastAnnounceAlt;
386
+ f && r.push(f);
385
387
  } else
386
388
  r.push(...Pe(t));
387
389
  }
@@ -389,7 +391,7 @@ function Pe(e) {
389
391
  }
390
392
  function X(e, r, o, { discrete: t }) {
391
393
  const c = o.originalEvent.currentTarget, d = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: o });
392
- r && c.addEventListener(e, r, { once: !0 }), t ? Ie(c, d) : c.dispatchEvent(d);
394
+ r && c.addEventListener(e, r, { once: !0 }), t ? Oe(c, d) : c.dispatchEvent(d);
393
395
  }
394
396
  var ne = (e, r, o = 0) => {
395
397
  const t = Math.abs(e.x), c = Math.abs(e.y), d = t > c;
@@ -398,7 +400,7 @@ var ne = (e, r, o = 0) => {
398
400
  function ot(e = () => {
399
401
  }) {
400
402
  const r = $(e);
401
- De(() => {
403
+ Ae(() => {
402
404
  let o = 0, t = 0;
403
405
  return o = window.requestAnimationFrame(() => t = window.requestAnimationFrame(r)), () => {
404
406
  window.cancelAnimationFrame(o), window.cancelAnimationFrame(t);
@@ -422,15 +424,15 @@ function q(e) {
422
424
  const r = document.activeElement;
423
425
  return e.some((o) => o === r ? !0 : (o.focus(), document.activeElement !== r));
424
426
  }
425
- var st = ue, at = de, it = fe, ct = me, ut = Te, lt = ve;
426
- const bt = ({
427
+ var st = ue, at = de, it = pe, ct = me, ut = Te, lt = ve;
428
+ const gt = ({
427
429
  title: e,
428
430
  duration: r = 5e3,
429
431
  titleClassName: o,
430
432
  descriptionClassName: t,
431
433
  description: c,
432
434
  children: d,
433
- theme: p,
435
+ theme: f,
434
436
  showCloseButton: T = !0,
435
437
  closeButtonClassName: v,
436
438
  className: a,
@@ -448,7 +450,7 @@ const bt = ({
448
450
  it,
449
451
  {
450
452
  className: j(Ke({ className: a })),
451
- "data-theme": p,
453
+ "data-theme": f,
452
454
  open: E,
453
455
  onOpenChange: w,
454
456
  children: [
@@ -474,5 +476,5 @@ const bt = ({
474
476
  ] });
475
477
  };
476
478
  export {
477
- bt as Toast
479
+ gt as Toast
478
480
  };
@@ -0,0 +1,121 @@
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";
7
+ import { Body as k } from "./components/Body/Body.js";
8
+ import { Pagination as q } from "./components/Pagination/Pagination.js";
9
+ import { TruncateText as C } from "./components/TruncateText/TruncateText.js";
10
+ import { Actions as F } from "./components/Actions/Actions.js";
11
+ const G = ({
12
+ 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,
20
+ classNameHeaderTable: N,
21
+ classNameTable: h,
22
+ classNameWrapperTable: x,
23
+ isLoading: A,
24
+ fetchData: v,
25
+ queryOptions: g,
26
+ // Pagination
27
+ showPagination: y,
28
+ showTotalItems: i,
29
+ showDropdownPagination: a,
30
+ showDotPagination: l,
31
+ showFormPagination: t,
32
+ pageSizes: z,
33
+ // Filter
34
+ showFilter: V = !1,
35
+ showFilterInput: j,
36
+ filterSearchPlaceholder: w = "",
37
+ multiSelectFilter: B,
38
+ filterActions: P,
39
+ showResetButton: E = !0
40
+ }) => {
41
+ const e = H(
42
+ () => y || [
43
+ i,
44
+ a,
45
+ l,
46
+ t
47
+ ].some(Boolean),
48
+ []
49
+ );
50
+ return /* @__PURE__ */ r(
51
+ I,
52
+ {
53
+ id: n,
54
+ columns: d,
55
+ data: f,
56
+ fetchData: v,
57
+ totalItems: p,
58
+ queryOptions: g,
59
+ isPaginationEnabled: e,
60
+ children: /* @__PURE__ */ s("section", { className: u, children: [
61
+ V && /* @__PURE__ */ r(
62
+ K,
63
+ {
64
+ actions: P,
65
+ multiSelectFilter: B,
66
+ placeholder: w,
67
+ showFilterInput: j,
68
+ showResetButton: E
69
+ }
70
+ ),
71
+ /* @__PURE__ */ r(
72
+ "div",
73
+ {
74
+ className: m(
75
+ "shadow rounded-t-lg",
76
+ {
77
+ "overflow-hidden rounded-lg": !e
78
+ },
79
+ x
80
+ ),
81
+ children: /* @__PURE__ */ s(
82
+ "table",
83
+ {
84
+ className: m("w-full border-collapse", h),
85
+ "aria-label": c,
86
+ children: [
87
+ /* @__PURE__ */ r(
88
+ M,
89
+ {
90
+ className: N,
91
+ classNameArrows: T,
92
+ classNameActiveArrows: b
93
+ }
94
+ ),
95
+ /* @__PURE__ */ r(k, { isLoading: A })
96
+ ]
97
+ }
98
+ )
99
+ }
100
+ ),
101
+ e && /* @__PURE__ */ r(
102
+ q,
103
+ {
104
+ showTotalItems: i,
105
+ showDropdownPagination: a,
106
+ showDotPagination: l,
107
+ showFormPagination: t,
108
+ pageSizes: z
109
+ }
110
+ )
111
+ ] })
112
+ }
113
+ );
114
+ }, o = G;
115
+ o.displayName = "KonstructVirtualizedTable";
116
+ o.TruncateText = C;
117
+ o.Actions = F;
118
+ export {
119
+ C as TruncateText,
120
+ o as VirtualizedTable
121
+ };
@@ -0,0 +1,5 @@
1
+ import { c as a } from "../../index-D29mdTf5.js";
2
+ const t = a([]);
3
+ export {
4
+ t as virtualizeTableVariants
5
+ };
@@ -0,0 +1,25 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ const l = ({
3
+ className: t,
4
+ onClick: e
5
+ }) => /* @__PURE__ */ o(
6
+ "svg",
7
+ {
8
+ width: "7",
9
+ height: "5",
10
+ viewBox: "0 0 7 5",
11
+ fill: "none",
12
+ className: t,
13
+ onClick: e,
14
+ children: /* @__PURE__ */ o(
15
+ "path",
16
+ {
17
+ d: "M0.8225 0L3.5 2.67167L6.1775 0L7 0.8225L3.5 4.3225L0 0.8225L0.8225 0Z",
18
+ fill: "currentColor"
19
+ }
20
+ )
21
+ }
22
+ );
23
+ export {
24
+ l as default
25
+ };
@@ -0,0 +1,25 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ const l = ({
3
+ className: r,
4
+ onClick: t
5
+ }) => /* @__PURE__ */ o(
6
+ "svg",
7
+ {
8
+ width: "7",
9
+ height: "5",
10
+ viewBox: "0 0 7 5",
11
+ fill: "currentColor",
12
+ className: r,
13
+ onClick: t,
14
+ children: /* @__PURE__ */ o(
15
+ "path",
16
+ {
17
+ d: "M0.8225 4.99999L3.5 2.32832L6.1775 4.99999L7 4.17749L3.5 0.67749L0 4.17749L0.8225 4.99999Z",
18
+ fill: "currentColor"
19
+ }
20
+ )
21
+ }
22
+ );
23
+ export {
24
+ l as default
25
+ };
@@ -0,0 +1,6 @@
1
+ import { default as r } from "./chevron-up.js";
2
+ import { default as f } from "./chevron-down.js";
3
+ export {
4
+ f as ChevronDown,
5
+ r as ChevronUp
6
+ };
@@ -0,0 +1,40 @@
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import { Button as r } from "../../../Button/Button.js";
3
+ import { cn as n } from "../../../../utils/index.js";
4
+ import { E as c } from "../../../../ellipsis-vertical-DpnVYRxI.js";
5
+ const u = ({
6
+ actions: t,
7
+ ...i
8
+ }) => t ? /* @__PURE__ */ o("div", { className: "relative group w-fit", children: [
9
+ /* @__PURE__ */ o(
10
+ r,
11
+ {
12
+ variant: "text",
13
+ shape: "circle",
14
+ size: "large",
15
+ className: "text-slate-400 group-hover:text-slate-800 group-hover:bg-aurora-50",
16
+ role: "presentation",
17
+ children: [
18
+ /* @__PURE__ */ e(c, { "aria-hidden": "true", className: "w-7 h-7" }),
19
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Show Actions" })
20
+ ]
21
+ }
22
+ ),
23
+ /* @__PURE__ */ e("div", { className: "absolute top-full right-0 w-[215px] hidden group-hover:block z-10", children: /* @__PURE__ */ e("div", { className: "bg-white mt-0.5 py-2 rounded-lg shadow-lg border border-zinc-100 animate-in fade-in-0", children: t.map(({ label: a, onClick: l, className: s }) => /* @__PURE__ */ e(
24
+ r,
25
+ {
26
+ className: n(
27
+ "w-full text-slate-800 cursor-pointer p-0 h-9 flex gap-2 text-sm font-normal justify-start hover:bg-gray-50 hover:text-slate-800 rounded-none px-6",
28
+ s
29
+ ),
30
+ variant: "text",
31
+ asChild: !0,
32
+ role: "presentation",
33
+ children: /* @__PURE__ */ e(r, { onClick: () => l(i.row.original), children: a })
34
+ },
35
+ a
36
+ )) }) })
37
+ ] }) : null;
38
+ export {
39
+ u as Actions
40
+ };
@@ -0,0 +1,26 @@
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
+ )) });
23
+ };
24
+ export {
25
+ w as Body
26
+ };