@konstructio/ui 0.1.2-alpha.4 → 0.1.2-alpha.6

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 (95) hide show
  1. package/dist/{Modal-V67Uz78z.js → Modal-D-NOEWMX.js} +3 -3
  2. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  3. package/dist/{chevron-down-BLZPftpV.js → chevron-down-MZvQoT2F.js} +2 -2
  4. package/dist/chevron-right-VYBOBhRt.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 +2 -2
  10. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  11. package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
  12. package/dist/components/Checkbox/Checkbox.js +5 -4
  13. package/dist/components/Command/Command.js +2 -2
  14. package/dist/components/Command/components/Command.js +1 -1
  15. package/dist/components/Command/components/CommandEmpty.js +1 -1
  16. package/dist/components/Command/components/CommandGroup.js +1 -1
  17. package/dist/components/Command/components/CommandInput.js +2 -2
  18. package/dist/components/Command/components/CommandItem.js +1 -1
  19. package/dist/components/Command/components/CommandList.js +1 -1
  20. package/dist/components/Command/components/CommandSeparator.js +1 -1
  21. package/dist/components/Command/components/DialogContent.js +2 -2
  22. package/dist/components/Command/components/DialogOverlay.js +1 -1
  23. package/dist/components/Datepicker/DatePicker.js +545 -543
  24. package/dist/components/Dropdown/components/List/List.js +36 -33
  25. package/dist/components/Dropdown/components/ListItem/ListItem.js +19 -18
  26. package/dist/components/Dropdown/components/Wrapper.js +3 -3
  27. package/dist/components/Dropdown/contexts/dropdown.provider.js +18 -18
  28. package/dist/components/Dropdown/hooks/useNavigationList.js +25 -25
  29. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  30. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  31. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
  32. package/dist/components/Input/Input.js +1 -1
  33. package/dist/components/Loading/Loading.js +2 -2
  34. package/dist/components/Modal/Modal.js +2 -2
  35. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
  36. package/dist/components/Modal/components/index.js +1 -1
  37. package/dist/components/NumberInput/NumberInput.js +2 -2
  38. package/dist/components/PieChart/PieChart.js +217 -215
  39. package/dist/components/Range/Range.js +1 -1
  40. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
  41. package/dist/components/Slider/Slider.js +1 -1
  42. package/dist/components/Switch/Switch.js +6 -5
  43. package/dist/components/Tabs/Tabs.js +1 -1
  44. package/dist/components/Tabs/components/Content.js +1 -1
  45. package/dist/components/Tabs/components/List.js +1 -1
  46. package/dist/components/Tabs/components/Trigger.js +1 -1
  47. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -2
  48. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
  49. package/dist/components/Toast/Toast.js +8 -7
  50. package/dist/components/VirtualizedTable/VirtualizedTable.js +99 -0
  51. package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
  52. package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
  53. package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
  54. package/dist/components/VirtualizedTable/assets/index.js +6 -0
  55. package/dist/components/VirtualizedTable/components/Actions/Actions.js +46 -0
  56. package/dist/components/VirtualizedTable/components/Body/Body.js +25 -0
  57. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
  58. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
  59. package/dist/components/VirtualizedTable/components/Filter/Filter.js +73 -0
  60. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
  61. package/dist/components/VirtualizedTable/components/Header/Header.js +82 -0
  62. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +45 -0
  63. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1870 -0
  64. package/dist/components/VirtualizedTable/components/index.js +14 -0
  65. package/dist/components/VirtualizedTable/constants/index.js +5 -0
  66. package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
  67. package/dist/components/VirtualizedTable/contexts/index.js +8 -0
  68. package/dist/components/VirtualizedTable/contexts/table.context.js +31 -0
  69. package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
  70. package/dist/components/VirtualizedTable/contexts/table.provider.js +778 -0
  71. package/dist/components/index.js +44 -40
  72. package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-D2CN7Ma9.js} +4 -4
  73. package/dist/debounce-BFejQm9P.js +200 -0
  74. package/dist/{index-D3xzCzcO.js → index-B7t8D14s.js} +2 -2
  75. package/dist/index-BAEWsOG1.js +27 -0
  76. package/dist/{index-C9T9HQaa.js → index-BITvcJAz.js} +1 -1
  77. package/dist/index-BZPx6jYI.js +8 -0
  78. package/dist/{index-BAraV3ai.js → index-Bnb0ezr3.js} +1 -1
  79. package/dist/{index-DB2XhXHn.js → index-C84F4YyO.js} +11 -10
  80. package/dist/index-Cd2vhaop.js +137 -0
  81. package/dist/{index-iXyXtdgP.js → index-DBbEcSUG.js} +1 -1
  82. package/dist/index-Dx2grAuN.js +1742 -0
  83. package/dist/{index-BXuxPoz7.js → index-DzIBBMjs.js} +18 -17
  84. package/dist/{index-h-Ul0anl.js → index-N2OStZoU.js} +1 -1
  85. package/dist/{index-Oq5GlCHP.js → index-os7vysFS.js} +1 -1
  86. package/dist/index-ti1b9kqV.js +14 -0
  87. package/dist/index.d.ts +88 -3
  88. package/dist/index.js +41 -37
  89. package/dist/package.json +19 -15
  90. package/dist/styles.css +1 -1
  91. package/dist/{x-BPcqkRZd.js → x-4F_5p77m.js} +1 -1
  92. package/package.json +19 -15
  93. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  94. package/dist/index-CZnD2QxM.js +0 -32
  95. package/dist/index-CrBonFvu.js +0 -144
@@ -1,5 +1,5 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { R as g, T as R, a as V, b as c } from "../../index-DB2XhXHn.js";
2
+ import { R as g, T as R, a as V, b as c } from "../../index-C84F4YyO.js";
3
3
  import { forwardRef as v, useRef as b, useState as j, useImperativeHandle as k, useEffect as w, useCallback as y } from "react";
4
4
  import { cn as a } from "../../utils/index.js";
5
5
  import { rangeOutsideVariants as C, trackVariants as T, thumbVariants as i, rangeVariants as S } from "./Range.variants.js";
@@ -1,37 +1,38 @@
1
- import { Footer as A } from "../Footer/Footer.js";
2
- import { Logo as b } from "../Logo/Logo.js";
3
- import { Navigation as C } from "../Navigation/Navigation.js";
1
+ import { Footer as b } from "../Footer/Footer.js";
2
+ import { Logo as C } from "../Logo/Logo.js";
3
+ import { Navigation as D } from "../Navigation/Navigation.js";
4
4
  import "../NavigationGroup/NavigationGroup.js";
5
5
  import "../NavigationOption/NavigationOption.js";
6
6
  import "../NavigationSeparator/NavigationSeparator.js";
7
7
  import "../NavigationTitle/NavigationTitle.js";
8
- import { jsxs as D, jsx as V } from "react/jsx-runtime";
8
+ import { jsxs as V, jsx as j } from "react/jsx-runtime";
9
9
  import { useRef as d, useCallback as f, useMemo as s, Children as a, isValidElement as l } from "react";
10
10
  import { cn as y } from "../../../../utils/index.js";
11
- import { dragVariants as j, wrapperSiderbarVariants as x } from "../../Sidebar.variants.js";
12
- const z = ({
11
+ import { dragVariants as x, wrapperSiderbarVariants as z } from "../../Sidebar.variants.js";
12
+ const S = ({
13
13
  canResize: g = !0,
14
14
  children: v,
15
+ dividerClassName: L,
15
16
  maxWith: i = 300,
16
17
  minWith: m = 240,
17
- theme: L,
18
- wrapperClassName: M
18
+ theme: M,
19
+ wrapperClassName: N
19
20
  }) => {
20
- const r = d(null), u = d(null), c = d(!1), n = f(
21
+ const r = d(null), c = d(null), u = d(!1), n = f(
21
22
  (e) => {
22
- if (!c.current) {
23
+ if (!u.current) {
23
24
  r.current && (r.current.style.opacity = "0");
24
25
  return;
25
26
  }
26
27
  let o = e.clientX;
27
- o < m && (o = m), o > i && (o = i), u.current && r.current && (u.current.style.width = `${o}px`, r.current.classList.add("opacity-100"));
28
+ o < m && (o = m), o > i && (o = i), c.current && r.current && (c.current.style.width = `${o}px`, r.current.classList.add("opacity-100"));
28
29
  },
29
30
  [i, m]
30
31
  ), p = f(() => {
31
- c.current = !1, r.current && r.current.classList.remove("opacity-100"), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", p);
32
+ u.current = !1, r.current && r.current.classList.remove("opacity-100"), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", p);
32
33
  }, [n]), w = f(
33
34
  (e) => {
34
- e.preventDefault(), e.stopPropagation(), c.current = !0, document.addEventListener("mousemove", n), document.addEventListener("mouseup", p);
35
+ e.preventDefault(), e.stopPropagation(), u.current = !0, document.addEventListener("mousemove", n), document.addEventListener("mouseup", p);
35
36
  },
36
37
  [n, p]
37
38
  ), t = s(
@@ -39,39 +40,39 @@ const z = ({
39
40
  [v]
40
41
  ), E = s(
41
42
  () => a.toArray(t).find(
42
- (e) => l(e) && e.type === b
43
+ (e) => l(e) && e.type === C
43
44
  ),
44
45
  [t]
45
- ), N = s(
46
+ ), R = s(
46
47
  () => a.toArray(t).find(
47
- (e) => l(e) && e.type === C
48
+ (e) => l(e) && e.type === D
48
49
  ),
49
50
  [t]
50
- ), R = s(
51
+ ), A = s(
51
52
  () => a.toArray(t).find(
52
- (e) => l(e) && e.type === A
53
+ (e) => l(e) && e.type === b
53
54
  ),
54
55
  [t]
55
56
  );
56
- return /* @__PURE__ */ D(
57
+ return /* @__PURE__ */ V(
57
58
  "aside",
58
59
  {
59
- ref: u,
60
+ ref: c,
60
61
  className: y(
61
- x({
62
- className: M
62
+ z({
63
+ className: N
63
64
  })
64
65
  ),
65
- "data-theme": L,
66
+ "data-theme": M,
66
67
  children: [
67
68
  E,
68
- N,
69
69
  R,
70
- g && /* @__PURE__ */ V(
70
+ A,
71
+ g && /* @__PURE__ */ j(
71
72
  "div",
72
73
  {
73
74
  ref: r,
74
- className: y(j()),
75
+ className: y(x({ className: L })),
75
76
  onMouseDown: w
76
77
  }
77
78
  )
@@ -79,7 +80,7 @@ const z = ({
79
80
  }
80
81
  );
81
82
  };
82
- z.displayName = "Sidebar.Wrapper";
83
+ S.displayName = "Sidebar.Wrapper";
83
84
  export {
84
- z as Wrapper
85
+ S as Wrapper
85
86
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs as l, jsx as a } from "react/jsx-runtime";
2
- import { R as x, T as N, b as v } from "../../index-DB2XhXHn.js";
2
+ import { R as x, T as N, b as v } from "../../index-C84F4YyO.js";
3
3
  import { forwardRef as V, useRef as b, useState as R, useImperativeHandle as g, useEffect as j, useCallback as k } from "react";
4
4
  import { cn as r } from "../../utils/index.js";
5
5
  import { trackVariants as w, thumbVariants as y, sliderVariants as C } from "./Slider.variants.js";
@@ -3,11 +3,12 @@ import * as h from "react";
3
3
  import { forwardRef as H, useRef as M, useId as $, useImperativeHandle as j, useEffect as z } from "react";
4
4
  import { a as A, c as U, b as q } from "../../index-BfXxHr_2.js";
5
5
  import { u as N } from "../../index-DQH6odE9.js";
6
- import { u as F, a as L } from "../../index-CZnD2QxM.js";
7
- import { P } from "../../index-C9T9HQaa.js";
6
+ import { u as F } from "../../index-BZPx6jYI.js";
7
+ import { u as L } from "../../index-BAEWsOG1.js";
8
+ import { P } from "../../index-BITvcJAz.js";
8
9
  import { cn as R } from "../../utils/index.js";
9
10
  import { thumbVariants as O, switchVariants as V } from "./Switch.variants.js";
10
- var b = "Switch", [D, se] = U(b), [W, X] = D(b), y = h.forwardRef(
11
+ var b = "Switch", [D, ce] = U(b), [W, X] = D(b), y = h.forwardRef(
11
12
  (e, l) => {
12
13
  const {
13
14
  __scopeSwitch: t,
@@ -124,7 +125,7 @@ function I(e) {
124
125
  return e ? "checked" : "unchecked";
125
126
  }
126
127
  var J = y, K = E;
127
- const ce = H(
128
+ const ne = H(
128
129
  ({
129
130
  name: e,
130
131
  alignment: l = "horizontal",
@@ -196,5 +197,5 @@ const ce = H(
196
197
  }
197
198
  );
198
199
  export {
199
- ce as Switch
200
+ ne as Switch
200
201
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { R as e } from "../../index-BAraV3ai.js";
2
+ import { R as e } from "../../index-Bnb0ezr3.js";
3
3
  import { cn as n } from "../../utils/index.js";
4
4
  import { rootVariants as p } from "./Tabs.variants.js";
5
5
  import { Content as f } from "./components/Content.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { C as a } from "../../../index-BAraV3ai.js";
2
+ import { C as a } from "../../../index-Bnb0ezr3.js";
3
3
  import { cn as m } from "../../../utils/index.js";
4
4
  import { contentVariants as s } from "../Tabs.variants.js";
5
5
  const e = ({ children: t, className: o, ...n }) => /* @__PURE__ */ r(
@@ -1,5 +1,5 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { L as n } from "../../../index-BAraV3ai.js";
2
+ import { L as n } from "../../../index-Bnb0ezr3.js";
3
3
  import { cn as a } from "../../../utils/index.js";
4
4
  import { listVariants as s } from "../Tabs.variants.js";
5
5
  const c = ({
@@ -1,5 +1,5 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { T as e } from "../../../index-BAraV3ai.js";
2
+ import { T as e } from "../../../index-Bnb0ezr3.js";
3
3
  import { Typography as m } from "../../Typography/Typography.js";
4
4
  import { cn as n } from "../../../utils/index.js";
5
5
  import { triggerVariants as p } from "../Tabs.variants.js";
@@ -6,8 +6,8 @@ import { Tag as P } from "../../../Tag/Tag.js";
6
6
  import { cn as l } from "../../../../utils/index.js";
7
7
  import { useTagSelect as C } from "../../hooks/useTagSelect.js";
8
8
  import { labelVariants as S, tagSelectVariants as z, wrapperVariants as R } from "../../TagSelect.variants.js";
9
- import { X as _ } from "../../../../x-BPcqkRZd.js";
10
- import { P as p } from "../../../../index-h-Ul0anl.js";
9
+ import { X as _ } from "../../../../x-4F_5p77m.js";
10
+ import { P as p } from "../../../../index-N2OStZoU.js";
11
11
  import { useTagSelect as I } from "../../contexts/TagSelect.hook.js";
12
12
  function u() {
13
13
  return u = Object.assign || function(e) {
@@ -3,7 +3,7 @@ import { useId as N, useState as y, useRef as E, useCallback as O, useEffect as
3
3
  import { cn as m } from "../../../../utils/index.js";
4
4
  import { timePickerVariants as L } from "../../TimePicker.variants.js";
5
5
  import { WrapperList as j } from "../WrapperList/WrapperList.js";
6
- import { C as P } from "../../../../chevron-down-BLZPftpV.js";
6
+ import { C as P } from "../../../../chevron-down-MZvQoT2F.js";
7
7
  import { useTimePickerContext as R } from "../../contexts/time-picker.hook.js";
8
8
  const V = ({
9
9
  name: d,
@@ -2,17 +2,18 @@ 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";
5
+ import { P as D, r as Se, d as Ie } from "../../index-BITvcJAz.js";
6
6
  import { c as Ne, a as Ae, b as x, u as De } from "../../index-BfXxHr_2.js";
7
7
  import { c as Fe } from "../../index-Cvx4lqTq.js";
8
- import { B as _e, R as Le, P as Me } from "../../index-CrBonFvu.js";
8
+ import { B as _e, R as Le } from "../../index-Cd2vhaop.js";
9
+ import { P as Me } from "../../index-ti1b9kqV.js";
9
10
  import { P as Oe } from "../../index-C1g_chDT.js";
10
11
  import { u as $ } from "../../index-0ioNhtNM.js";
11
- import { V as ie, R as ke } from "../../index-iXyXtdgP.js";
12
+ import { V as ie, R as ke } from "../../index-DBbEcSUG.js";
12
13
  import { cn as j } from "../../utils/index.js";
13
14
  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) => {
15
+ import { X as We } from "../../x-4F_5p77m.js";
16
+ var Q = "ToastProvider", [Z, Xe, $e] = Fe("Toast"), [ce, bt] = Ne("Toast", [$e]), [Ue, U] = ce(Q), ue = (e) => {
16
17
  const {
17
18
  __scopeToast: r,
18
19
  label: o = "Notification",
@@ -423,7 +424,7 @@ function q(e) {
423
424
  return e.some((o) => o === r ? !0 : (o.focus(), document.activeElement !== r));
424
425
  }
425
426
  var st = ue, at = de, it = fe, ct = me, ut = Te, lt = ve;
426
- const bt = ({
427
+ const gt = ({
427
428
  title: e,
428
429
  duration: r = 5e3,
429
430
  titleClassName: o,
@@ -474,5 +475,5 @@ const bt = ({
474
475
  ] });
475
476
  };
476
477
  export {
477
- bt as Toast
478
+ gt as Toast
478
479
  };
@@ -0,0 +1,99 @@
1
+ import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
+ import { useMemo as V } from "react";
3
+ import { cn as g } from "../../utils/index.js";
4
+ import { TableProvider as j } from "./contexts/table.provider.js";
5
+ import { Filter as w } from "./components/Filter/Filter.js";
6
+ import { Header as y } from "./components/Header/Header.js";
7
+ import { Body as B } from "./components/Body/Body.js";
8
+ import { Pagination as H } from "./components/Pagination/Pagination.js";
9
+ import { TruncateText as K } from "./components/TruncateText/TruncateText.js";
10
+ import { Actions as M } from "./components/Actions/Actions.js";
11
+ const P = ({
12
+ id: s,
13
+ ariaLabel: c,
14
+ columns: d,
15
+ data: n,
16
+ totalItems: f,
17
+ classNameHeaderTable: p,
18
+ classNameHeaderArrows: u,
19
+ classNameHeaderActiveArrows: b,
20
+ fetchData: T,
21
+ // Pagination
22
+ showPagination: N,
23
+ showTotalItems: o,
24
+ showDropdownPagination: l,
25
+ showDotPagination: a,
26
+ showFormPagination: i,
27
+ pageSizes: h,
28
+ // Filter
29
+ showFilter: x = !1,
30
+ showFilterInput: A,
31
+ filterSearchPlaceholder: v = "",
32
+ multiSelectFilter: z
33
+ }) => {
34
+ const t = V(
35
+ () => N || [
36
+ o,
37
+ l,
38
+ a,
39
+ i
40
+ ].some(Boolean),
41
+ []
42
+ );
43
+ return /* @__PURE__ */ r(
44
+ j,
45
+ {
46
+ id: s,
47
+ columns: d,
48
+ data: n,
49
+ fetchData: T,
50
+ totalItems: f,
51
+ children: /* @__PURE__ */ m("section", { children: [
52
+ x && /* @__PURE__ */ r(
53
+ w,
54
+ {
55
+ placeholder: v,
56
+ multiSelectFilter: z,
57
+ showFilterInput: A
58
+ }
59
+ ),
60
+ /* @__PURE__ */ r(
61
+ "div",
62
+ {
63
+ className: g("shadow rounded-t-lg", {
64
+ "overflow-hidden rounded-lg": !t
65
+ }),
66
+ children: /* @__PURE__ */ m("table", { className: "w-full border-collapse", "aria-label": c, children: [
67
+ /* @__PURE__ */ r(
68
+ y,
69
+ {
70
+ className: p,
71
+ classNameArrows: u,
72
+ classNameActiveArrows: b
73
+ }
74
+ ),
75
+ /* @__PURE__ */ r(B, {})
76
+ ] })
77
+ }
78
+ ),
79
+ t && /* @__PURE__ */ r(
80
+ H,
81
+ {
82
+ showTotalItems: o,
83
+ showDropdownPagination: l,
84
+ showDotPagination: a,
85
+ showFormPagination: i,
86
+ pageSizes: h
87
+ }
88
+ )
89
+ ] })
90
+ }
91
+ );
92
+ }, e = P;
93
+ e.displayName = "KonstructVirtualizedTable";
94
+ e.TruncateText = K;
95
+ e.Actions = M;
96
+ export {
97
+ K as TruncateText,
98
+ e as VirtualizedTable
99
+ };
@@ -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,46 @@
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import { Button as r } from "../../../Button/Button.js";
3
+ import { c } from "../../../../createLucideIcon-D2CN7Ma9.js";
4
+ /**
5
+ * @license lucide-react v0.545.0 - ISC
6
+ *
7
+ * This source code is licensed under the ISC license.
8
+ * See the LICENSE file in the root directory of this source tree.
9
+ */
10
+ const s = [
11
+ ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
12
+ ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
13
+ ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
14
+ ], n = c("ellipsis-vertical", s), u = ({
15
+ actions: t,
16
+ ...o
17
+ }) => t ? /* @__PURE__ */ l("div", { className: "relative group w-fit", children: [
18
+ /* @__PURE__ */ l(
19
+ r,
20
+ {
21
+ variant: "text",
22
+ shape: "circle",
23
+ size: "large",
24
+ className: "text-slate-400 group-hover:text-slate-800 group-hover:bg-aurora-50",
25
+ role: "presentation",
26
+ children: [
27
+ /* @__PURE__ */ e(n, { "aria-hidden": "true", className: "w-7 h-7" }),
28
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Show Actions" })
29
+ ]
30
+ }
31
+ ),
32
+ /* @__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: i, onClick: a }) => /* @__PURE__ */ e(
33
+ r,
34
+ {
35
+ className: "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",
36
+ variant: "text",
37
+ asChild: !0,
38
+ role: "presentation",
39
+ children: /* @__PURE__ */ e(r, { onClick: () => a(o.row.original), children: i })
40
+ },
41
+ i
42
+ )) }) })
43
+ ] }) : null;
44
+ export {
45
+ u as Actions
46
+ };
@@ -0,0 +1,25 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { f as d } from "../../../../index-Dx2grAuN.js";
3
+ import { useTableContext as m } from "../../contexts/table.hook.js";
4
+ const p = () => {
5
+ const { table: r } = m();
6
+ return /* @__PURE__ */ e("tbody", { className: "text-slate-800 text-sm font-normal relative", children: r.getRowModel().rows.map(({ id: a, getVisibleCells: o }) => /* @__PURE__ */ e(
7
+ "tr",
8
+ {
9
+ className: "border border-x-transparent border-t-gray-200 border-b-transparent table w-full table-fixed",
10
+ children: o().map(({ id: l, column: t, getContext: s }) => /* @__PURE__ */ e(
11
+ "td",
12
+ {
13
+ className: "px-4 py-1 text-sm",
14
+ style: { width: t.getSize() },
15
+ children: d(t.columnDef.cell, s())
16
+ },
17
+ l
18
+ ))
19
+ },
20
+ a
21
+ )) });
22
+ };
23
+ export {
24
+ p as Body
25
+ };
@@ -0,0 +1,165 @@
1
+ import { jsx as i, jsxs as m } from "react/jsx-runtime";
2
+ import { memo as u } from "react";
3
+ import { cn as p } from "../../../../utils/index.js";
4
+ import { C as g, a as d } from "../../../../chevron-right-VYBOBhRt.js";
5
+ import { useTableContext as f } from "../../contexts/table.hook.js";
6
+ const r = u(
7
+ ({
8
+ index: e,
9
+ currentPage: t,
10
+ handlePage: l
11
+ }) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
12
+ "button",
13
+ {
14
+ type: "button",
15
+ onClick: () => l(e),
16
+ className: p("px-2.5 py-1 rounded-lg text-blue-600 cursor-pointer", {
17
+ "bg-blue-600 text-white": e === t
18
+ }),
19
+ children: e + 1
20
+ }
21
+ ) }, e)
22
+ );
23
+ r.displayName = "PageButton";
24
+ const o = u(({ keyValue: e }) => /* @__PURE__ */ i("li", { className: "px-2", children: /* @__PURE__ */ i("span", { className: "text-blue-600 select-none", children: "..." }) }, e));
25
+ o.displayName = "Ellipsis";
26
+ const a = u(
27
+ ({
28
+ direction: e,
29
+ onClick: t,
30
+ disabled: l
31
+ }) => /* @__PURE__ */ i("li", { className: "flex items-center justify-center", children: /* @__PURE__ */ i("button", { onClick: t, disabled: l, children: /* @__PURE__ */ i(
32
+ e === "left" ? g : d,
33
+ {
34
+ className: p("h-6 w-6 cursor-pointer", {
35
+ "text-blue-600": !l,
36
+ "text-slate-400 cursor-not-allowed": l
37
+ })
38
+ }
39
+ ) }) })
40
+ );
41
+ a.displayName = "NavigationButton";
42
+ const k = () => {
43
+ const { totalPages: e, page: t, handlePage: l } = f();
44
+ return /* @__PURE__ */ m("ul", { className: "flex items-center gap-2", children: [
45
+ /* @__PURE__ */ i(
46
+ a,
47
+ {
48
+ direction: "left",
49
+ onClick: () => l(t - 1),
50
+ disabled: t === 0
51
+ }
52
+ ),
53
+ (() => {
54
+ if (e <= 5)
55
+ return Array.from({ length: e }, (s, c) => /* @__PURE__ */ i(
56
+ r,
57
+ {
58
+ index: c,
59
+ currentPage: t,
60
+ handlePage: l
61
+ },
62
+ c
63
+ ));
64
+ const n = [];
65
+ if (t < 3) {
66
+ for (let s = 0; s < 3; s++)
67
+ n.push(
68
+ /* @__PURE__ */ i(
69
+ r,
70
+ {
71
+ index: s,
72
+ currentPage: t,
73
+ handlePage: l
74
+ },
75
+ s
76
+ )
77
+ );
78
+ n.push(/* @__PURE__ */ i(o, { keyValue: "ellipsis" }, "ellipsis"));
79
+ for (let s = e - 2; s < e; s++)
80
+ n.push(
81
+ /* @__PURE__ */ i(
82
+ r,
83
+ {
84
+ index: s,
85
+ currentPage: t,
86
+ handlePage: l
87
+ },
88
+ s
89
+ )
90
+ );
91
+ } else if (t >= e - 5) {
92
+ n.push(
93
+ /* @__PURE__ */ i(
94
+ r,
95
+ {
96
+ index: 0,
97
+ currentPage: t,
98
+ handlePage: l
99
+ },
100
+ 0
101
+ )
102
+ ), e > 6 && n.push(/* @__PURE__ */ i(o, { keyValue: "ellipsis" }, "ellipsis"));
103
+ for (let s = Math.max(1, e - 5); s < e; s++)
104
+ n.push(
105
+ /* @__PURE__ */ i(
106
+ r,
107
+ {
108
+ index: s,
109
+ currentPage: t,
110
+ handlePage: l
111
+ },
112
+ s
113
+ )
114
+ );
115
+ } else {
116
+ n.push(
117
+ /* @__PURE__ */ i(
118
+ r,
119
+ {
120
+ index: 0,
121
+ currentPage: t,
122
+ handlePage: l
123
+ },
124
+ 0
125
+ )
126
+ ), t > 3 && n.push(/* @__PURE__ */ i(o, { keyValue: "ellipsis1" }, "ellipsis1"));
127
+ for (let s = t - 1; s <= t + 1; s++)
128
+ s > 0 && s < e - 1 && n.push(
129
+ /* @__PURE__ */ i(
130
+ r,
131
+ {
132
+ index: s,
133
+ currentPage: t,
134
+ handlePage: l
135
+ },
136
+ s
137
+ )
138
+ );
139
+ t < e - 4 && n.push(/* @__PURE__ */ i(o, { keyValue: "ellipsis2" }, "ellipsis2")), n.push(
140
+ /* @__PURE__ */ i(
141
+ r,
142
+ {
143
+ index: e - 1,
144
+ currentPage: t,
145
+ handlePage: l
146
+ },
147
+ e - 1
148
+ )
149
+ );
150
+ }
151
+ return n;
152
+ })(),
153
+ /* @__PURE__ */ i(
154
+ a,
155
+ {
156
+ direction: "right",
157
+ onClick: () => l(t + 1),
158
+ disabled: t >= e - 1
159
+ }
160
+ )
161
+ ] });
162
+ };
163
+ export {
164
+ k as DotPaginate
165
+ };