@konstructio/ui 0.1.2-alpha.41 → 0.1.2-alpha.44

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 (113) hide show
  1. package/dist/{Modal-CtAG97Ts.js → Modal-CjC-CIJ8.js} +2 -2
  2. package/dist/chevron-right-DYvXLeql.js +7 -0
  3. package/dist/{chevron-up-CRyLc5Ml.js → chevron-up-DEfvgPCw.js} +1 -1
  4. package/dist/components/Alert/Alert.js +2 -2
  5. package/dist/components/AlertDialog/AlertDialog.js +75 -49
  6. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +3 -2
  7. package/dist/components/AlertDialog/components/index.js +1 -1
  8. package/dist/components/Badge/Badge.js +31 -30
  9. package/dist/components/Badge/Badge.variants.js +53 -16
  10. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  11. package/dist/components/Breadcrumb/Breadcrumb.variants.js +3 -3
  12. package/dist/components/Breadcrumb/components/Item/Item.variants.js +25 -14
  13. package/dist/components/Button/Button.js +1 -1
  14. package/dist/components/Card/Card.variants.js +4 -5
  15. package/dist/components/Checkbox/Checkbox.js +4 -4
  16. package/dist/components/Checkbox/Checkbox.variants.js +5 -1
  17. package/dist/components/Command/Command.js +2 -2
  18. package/dist/components/Command/components/Command.js +1 -1
  19. package/dist/components/Command/components/CommandEmpty.js +1 -1
  20. package/dist/components/Command/components/CommandGroup.js +1 -1
  21. package/dist/components/Command/components/CommandInput.js +2 -2
  22. package/dist/components/Command/components/CommandItem.js +1 -1
  23. package/dist/components/Command/components/CommandList.js +1 -1
  24. package/dist/components/Command/components/CommandSeparator.js +1 -1
  25. package/dist/components/Command/components/DialogContent.js +2 -2
  26. package/dist/components/Command/components/DialogOverlay.js +1 -1
  27. package/dist/components/Datepicker/DatePicker.js +1231 -1047
  28. package/dist/components/Dropdown/Dropdown.js +13 -13
  29. package/dist/components/Dropdown/Dropdown.variants.js +7 -6
  30. package/dist/components/Dropdown/components/List/List.js +42 -20
  31. package/dist/components/Dropdown/components/List/List.variants.js +5 -5
  32. package/dist/components/Dropdown/components/ListItem/ListItem.js +20 -20
  33. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +2 -2
  34. package/dist/components/Dropdown/components/Wrapper.js +60 -46
  35. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  36. package/dist/components/Filter/Filter.variants.js +6 -5
  37. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +73 -46
  38. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +2 -2
  39. package/dist/components/Filter/components/ResetButton/ResetButton.js +28 -14
  40. package/dist/components/Input/Input.js +1 -1
  41. package/dist/components/Input/Input.variants.js +2 -2
  42. package/dist/components/Modal/Modal.js +1 -1
  43. package/dist/components/Modal/components/Body/Body.js +1 -1
  44. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  45. package/dist/components/Modal/components/Header/Header.js +1 -1
  46. package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
  47. package/dist/components/Modal/components/index.js +1 -1
  48. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
  49. package/dist/components/NumberInput/NumberInput.js +2 -2
  50. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +358 -315
  51. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
  52. package/dist/components/PhoneNumberInput/components/Wrapper.js +58 -58
  53. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +2 -2
  54. package/dist/components/PhoneNumberInput/utils/index.js +1 -1
  55. package/dist/components/PieChart/PieChart.js +4 -4
  56. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  57. package/dist/components/Range/Range.js +1 -1
  58. package/dist/components/Slider/Slider.js +1 -1
  59. package/dist/components/Switch/Switch.js +2 -2
  60. package/dist/components/Tabs/Tabs.js +1 -1
  61. package/dist/components/Tabs/Tabs.variants.js +3 -2
  62. package/dist/components/Tabs/components/Content.js +1 -1
  63. package/dist/components/Tabs/components/List.js +1 -1
  64. package/dist/components/Tabs/components/Trigger.js +1 -1
  65. package/dist/components/Tag/Tag.js +1 -1
  66. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -2
  67. package/dist/components/TimePicker/TimePicker.js +1 -1
  68. package/dist/components/TimePicker/TimePicker.variants.js +20 -13
  69. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +23 -16
  70. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +53 -45
  71. package/dist/components/Toast/Toast.js +8 -8
  72. package/dist/components/Tooltip/Tooltip.js +1 -1
  73. package/dist/components/Typography/Typography.js +11 -9
  74. package/dist/components/VirtualizedTable/VirtualizedTable.js +58 -54
  75. package/dist/components/VirtualizedTable/components/Actions/Actions.js +58 -26
  76. package/dist/components/VirtualizedTable/components/Body/Body.js +72 -46
  77. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +80 -77
  78. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +20 -20
  79. package/dist/components/VirtualizedTable/components/Filter/Filter.js +37 -40
  80. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +19 -18
  81. package/dist/components/VirtualizedTable/components/Header/Header.js +49 -31
  82. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +36 -23
  83. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +74 -35
  84. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
  85. package/dist/components/index.js +1 -1
  86. package/dist/{index-mPY_8Y5v.js → index-AV6ZtGhy.js} +1 -1
  87. package/dist/{index-CigKKiZS.js → index-BG8O18ZY.js} +5 -3
  88. package/dist/{index-DrWQH0QF.js → index-BKjcReYh.js} +2 -2
  89. package/dist/{index--V_ZsiQe.js → index-BOE_3f_Z.js} +4 -4
  90. package/dist/{index-Dbt2vBmS.js → index-BlSRBdPy.js} +1 -1
  91. package/dist/{index-C3tHPg8y.js → index-BmVmDQGH.js} +2 -2
  92. package/dist/{index-BtQfgaSF.js → index-BvoZGpli.js} +2 -2
  93. package/dist/{index-2hB40Iuc.js → index-Byr10W8m.js} +6 -6
  94. package/dist/index-CPU02rhe.js +134 -0
  95. package/dist/{index-Ds6U2x4Z.js → index-CeZcoQDw.js} +11 -11
  96. package/dist/{index-CdwPV0FE.js → index-D9SSJ6om.js} +3 -3
  97. package/dist/{index-CIAmiWcw.js → index-DKfEnhKr.js} +2 -2
  98. package/dist/{index-CSFe9uC5.js → index-DMb4KD0b.js} +1 -1
  99. package/dist/{index-ohdbKsws.js → index-DtEcCIrM.js} +1 -1
  100. package/dist/{index-BbQkJE5L.js → index-Dy59FQl5.js} +1 -1
  101. package/dist/{index-DpW9ExsS.js → index-gSPwC-1I.js} +3 -3
  102. package/dist/{index-DH2Fnov1.js → index-vcSp8YRZ.js} +4 -4
  103. package/dist/index.d.ts +2 -1
  104. package/dist/index.js +1 -1
  105. package/dist/{libphonenumber-_7ZyKWA7.js → libphonenumber-FTwQ9nyV.js} +11 -11
  106. package/dist/package.json +21 -21
  107. package/dist/styles.css +1 -1
  108. package/dist/ui/civo-theme.css +11 -10
  109. package/dist/{x-DPU9OdYH.js → x-Eoa9FJjA.js} +1 -1
  110. package/package.json +21 -21
  111. package/dist/chevron-left-C4LEg1fH.js +0 -7
  112. package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +0 -16
  113. package/dist/index-C65LtGuU.js +0 -137
@@ -1,51 +1,77 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { f as y } from "../../../../index-CSWGJT-v.js";
3
- import { Skeleton as x } from "../Skeleton/Skeleton.js";
4
- import { cn as b } from "../../../../utils/index.js";
5
- import { useTableContext as D } from "../../contexts/table.hook.js";
6
- const _ = ({
7
- isLoading: d,
8
- showPagination: a
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { f as N } from "../../../../index-CSWGJT-v.js";
3
+ import { Skeleton as h } from "../Skeleton/Skeleton.js";
4
+ import { cn as s } from "../../../../utils/index.js";
5
+ import { useTableContext as y } from "../../contexts/table.hook.js";
6
+ const S = ({
7
+ isLoading: f,
8
+ showPagination: t
9
9
  }) => {
10
- const { table: s, pageSize: i, tableFetching: p } = D();
11
- if (d || p)
12
- return /* @__PURE__ */ e(x, { numberOfRows: i, table: s });
13
- const r = s.getRowModel().rows ?? [];
14
- return /* @__PURE__ */ e("tbody", { className: "text-slate-800 text-sm font-normal relative", children: r.map(({ id: o, original: l, getVisibleCells: u }, m) => {
15
- const { meta: n = {} } = l, c = u();
16
- return /* @__PURE__ */ e(
17
- "tr",
18
- {
19
- className: b(
20
- "border-b border-b-gray-200 last:border-b-transparent bg-transparent",
21
- n.className
22
- ),
23
- "data-row-id": o,
24
- ...n.attributes ?? {},
25
- children: c.map(({ id: g, column: t, getContext: h }, f) => {
26
- const N = typeof t.columnDef.meta?.className == "function" ? t.columnDef.meta?.className(l) : t.columnDef.meta?.className;
27
- return /* @__PURE__ */ e(
28
- "td",
29
- {
30
- className: b(
31
- "px-4 py-1 text-sm bg-white",
32
- N,
10
+ const { table: o, pageSize: i, tableFetching: p } = y();
11
+ if (f || p)
12
+ return /* @__PURE__ */ r(h, { numberOfRows: i, table: o });
13
+ const a = o.getRowModel().rows ?? [];
14
+ return /* @__PURE__ */ r(
15
+ "tbody",
16
+ {
17
+ className: s(
18
+ "text-slate-800",
19
+ "text-sm",
20
+ "font-normal",
21
+ "relative",
22
+ "dark:border-x"
23
+ ),
24
+ children: a.map(({ id: l, original: m, getVisibleCells: u }, d) => {
25
+ const { meta: b = {} } = m, n = u();
26
+ return /* @__PURE__ */ r(
27
+ "tr",
28
+ {
29
+ className: s(
30
+ "border-b",
31
+ "border-b-gray-200",
32
+ "dark:text-metal-50",
33
+ "dark:border-b-metal-700",
34
+ "last:border-b-transparent",
35
+ "bg-transparent",
36
+ b.className
37
+ ),
38
+ "data-row-id": l,
39
+ ...b.attributes ?? {},
40
+ children: n.map(({ id: k, column: e, getContext: g }, c) => {
41
+ const x = typeof e.columnDef.meta?.className == "function" ? e.columnDef.meta?.className(m) : e.columnDef.meta?.className;
42
+ return /* @__PURE__ */ r(
43
+ "td",
33
44
  {
34
- "[tr:last-child_&:first-of-type]:rounded-bl-lg": m === r.length - 1 && f === 0 || !a,
35
- "[tr:last-child_&:last-of-type]:rounded-br-lg": m === r.length - 1 && f === c.length - 1 || !a
36
- }
37
- ),
38
- ...t.columnDef.meta?.attributes ?? {},
39
- children: y(t.columnDef.cell, h())
40
- },
41
- g
42
- );
43
- })
44
- },
45
- o
46
- );
47
- }) });
45
+ className: s(
46
+ "px-4",
47
+ "py-1",
48
+ "text-sm",
49
+ "bg-white",
50
+ "dark:bg-metal-900",
51
+ "dark:border-t",
52
+ "dark:border-metal-700",
53
+ "dark:first:border-l",
54
+ "dark:last:border-r",
55
+ x,
56
+ {
57
+ "first:rounded-bl-lg": d === a.length - 1 && c === 0 && !t,
58
+ "last:rounded-br-lg": d === a.length - 1 && c === n.length - 1 && !t,
59
+ "dark:[tr:last-child_&]:border-b": !t
60
+ }
61
+ ),
62
+ ...e.columnDef.meta?.attributes ?? {},
63
+ children: N(e.columnDef.cell, g())
64
+ },
65
+ k
66
+ );
67
+ })
68
+ },
69
+ l
70
+ );
71
+ })
72
+ }
73
+ );
48
74
  };
49
75
  export {
50
- _ as Body
76
+ S as Body
51
77
  };
@@ -1,165 +1,168 @@
1
- import { jsx as i, jsxs as m } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as h } 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-left-C4LEg1fH.js";
4
+ import { C as m, a as g } from "../../../../chevron-right-DYvXLeql.js";
5
5
  import { useTableContext as f } from "../../contexts/table.hook.js";
6
- const r = u(
6
+ const a = u(
7
7
  ({
8
8
  index: e,
9
9
  currentPage: t,
10
- handlePage: l
11
- }) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
10
+ handlePage: i
11
+ }) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(
12
12
  "button",
13
13
  {
14
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
- }),
15
+ onClick: () => i(e),
16
+ className: p(
17
+ "px-2.5 py-1 rounded-lg text-blue-600 cursor-pointer dark:text-aurora-500",
18
+ {
19
+ "bg-blue-600 text-white dark:bg-aurora-500 dark:text-metal-800": e === t
20
+ }
21
+ ),
19
22
  children: e + 1
20
23
  }
21
24
  ) }, e)
22
25
  );
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(
26
+ a.displayName = "PageButton";
27
+ const n = u(({ keyValue: e }) => /* @__PURE__ */ s("li", { className: "px-2", children: /* @__PURE__ */ s("span", { className: "text-blue-600 select-none dark:text-aurora-500", children: "..." }) }, e));
28
+ n.displayName = "Ellipsis";
29
+ const o = u(
27
30
  ({
28
31
  direction: e,
29
32
  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
+ disabled: i
34
+ }) => /* @__PURE__ */ s("li", { className: "flex items-center justify-center", children: /* @__PURE__ */ s("button", { onClick: t, disabled: i, children: /* @__PURE__ */ s(
35
+ e === "left" ? m : g,
33
36
  {
34
37
  className: p("h-6 w-6 cursor-pointer", {
35
- "text-blue-600": !l,
36
- "text-slate-400 cursor-not-allowed": l
38
+ "text-blue-600 dark:text-aurora-500": !i,
39
+ "text-slate-400 cursor-not-allowed": i
37
40
  })
38
41
  }
39
42
  ) }) })
40
43
  );
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,
44
+ o.displayName = "NavigationButton";
45
+ const N = () => {
46
+ const { totalPages: e, page: t, handlePage: i } = f();
47
+ return /* @__PURE__ */ h("ul", { className: "flex items-center gap-2", children: [
48
+ /* @__PURE__ */ s(
49
+ o,
47
50
  {
48
51
  direction: "left",
49
- onClick: () => l(t - 1),
52
+ onClick: () => i(t - 1),
50
53
  disabled: t === 0
51
54
  }
52
55
  ),
53
56
  (() => {
54
57
  if (e <= 5)
55
- return Array.from({ length: e }, (s, c) => /* @__PURE__ */ i(
56
- r,
58
+ return Array.from({ length: e }, (r, c) => /* @__PURE__ */ s(
59
+ a,
57
60
  {
58
61
  index: c,
59
62
  currentPage: t,
60
- handlePage: l
63
+ handlePage: i
61
64
  },
62
65
  c
63
66
  ));
64
- const n = [];
67
+ const l = [];
65
68
  if (t < 3) {
66
- for (let s = 0; s < 3; s++)
67
- n.push(
68
- /* @__PURE__ */ i(
69
- r,
69
+ for (let r = 0; r < 3; r++)
70
+ l.push(
71
+ /* @__PURE__ */ s(
72
+ a,
70
73
  {
71
- index: s,
74
+ index: r,
72
75
  currentPage: t,
73
- handlePage: l
76
+ handlePage: i
74
77
  },
75
- s
78
+ r
76
79
  )
77
80
  );
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,
81
+ l.push(/* @__PURE__ */ s(n, { keyValue: "ellipsis" }, "ellipsis"));
82
+ for (let r = e - 2; r < e; r++)
83
+ l.push(
84
+ /* @__PURE__ */ s(
85
+ a,
83
86
  {
84
- index: s,
87
+ index: r,
85
88
  currentPage: t,
86
- handlePage: l
89
+ handlePage: i
87
90
  },
88
- s
91
+ r
89
92
  )
90
93
  );
91
94
  } else if (t >= e - 5) {
92
- n.push(
93
- /* @__PURE__ */ i(
94
- r,
95
+ l.push(
96
+ /* @__PURE__ */ s(
97
+ a,
95
98
  {
96
99
  index: 0,
97
100
  currentPage: t,
98
- handlePage: l
101
+ handlePage: i
99
102
  },
100
103
  0
101
104
  )
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,
105
+ ), e > 6 && l.push(/* @__PURE__ */ s(n, { keyValue: "ellipsis" }, "ellipsis"));
106
+ for (let r = Math.max(1, e - 5); r < e; r++)
107
+ l.push(
108
+ /* @__PURE__ */ s(
109
+ a,
107
110
  {
108
- index: s,
111
+ index: r,
109
112
  currentPage: t,
110
- handlePage: l
113
+ handlePage: i
111
114
  },
112
- s
115
+ r
113
116
  )
114
117
  );
115
118
  } else {
116
- n.push(
117
- /* @__PURE__ */ i(
118
- r,
119
+ l.push(
120
+ /* @__PURE__ */ s(
121
+ a,
119
122
  {
120
123
  index: 0,
121
124
  currentPage: t,
122
- handlePage: l
125
+ handlePage: i
123
126
  },
124
127
  0
125
128
  )
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,
129
+ ), t > 3 && l.push(/* @__PURE__ */ s(n, { keyValue: "ellipsis1" }, "ellipsis1"));
130
+ for (let r = t - 1; r <= t + 1; r++)
131
+ r > 0 && r < e - 1 && l.push(
132
+ /* @__PURE__ */ s(
133
+ a,
131
134
  {
132
- index: s,
135
+ index: r,
133
136
  currentPage: t,
134
- handlePage: l
137
+ handlePage: i
135
138
  },
136
- s
139
+ r
137
140
  )
138
141
  );
139
- t < e - 4 && n.push(/* @__PURE__ */ i(o, { keyValue: "ellipsis2" }, "ellipsis2")), n.push(
140
- /* @__PURE__ */ i(
141
- r,
142
+ t < e - 4 && l.push(/* @__PURE__ */ s(n, { keyValue: "ellipsis2" }, "ellipsis2")), l.push(
143
+ /* @__PURE__ */ s(
144
+ a,
142
145
  {
143
146
  index: e - 1,
144
147
  currentPage: t,
145
- handlePage: l
148
+ handlePage: i
146
149
  },
147
150
  e - 1
148
151
  )
149
152
  );
150
153
  }
151
- return n;
154
+ return l;
152
155
  })(),
153
- /* @__PURE__ */ i(
154
- a,
156
+ /* @__PURE__ */ s(
157
+ o,
155
158
  {
156
159
  direction: "right",
157
- onClick: () => l(t + 1),
160
+ onClick: () => i(t + 1),
158
161
  disabled: t >= e - 1
159
162
  }
160
163
  )
161
164
  ] });
162
165
  };
163
166
  export {
164
- k as DotPaginate
167
+ N as DotPaginate
165
168
  };
@@ -1,34 +1,34 @@
1
- import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
- import { useMemo as p, useCallback as l } from "react";
3
- import { Dropdown as c } from "../../../Dropdown/Dropdown.js";
4
- import { DEFAULT_PAGE_SIZES as g } from "../../constants/pagination.js";
5
- import { useTableContext as x } from "../../contexts/table.hook.js";
6
- const b = ({
7
- pageSizes: n = g
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ import { useMemo as l, useCallback as p } from "react";
3
+ import { Dropdown as g } from "../../../Dropdown/Dropdown.js";
4
+ import { DEFAULT_PAGE_SIZES as c } from "../../constants/pagination.js";
5
+ import { useTableContext as d } from "../../contexts/table.hook.js";
6
+ const u = ({
7
+ pageSizes: r = c
8
8
  }) => {
9
- const { pageSize: s, onPageSize: o, handlePage: t } = x(), r = p(
10
- () => n.map(String).map((e) => ({ label: e, value: e })),
9
+ const { pageSize: n, onPageSize: t, handlePage: a } = d(), s = l(
10
+ () => r.map(String).map((e) => ({ label: e, value: e })),
11
11
  []
12
- ), m = l(
12
+ ), m = p(
13
13
  (e) => {
14
- o(Number(e)), t(0);
14
+ t(Number(e)), a(0);
15
15
  },
16
- [t, o]
16
+ [a, t]
17
17
  );
18
- return /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
19
- /* @__PURE__ */ a("span", { children: "Show" }),
20
- /* @__PURE__ */ a(
21
- c,
18
+ return /* @__PURE__ */ i("div", { className: "flex items-center gap-2 dark:text-metal-300", children: [
19
+ /* @__PURE__ */ o("span", { children: "Show" }),
20
+ /* @__PURE__ */ o(
21
+ g,
22
22
  {
23
23
  className: "w-22 [&>div>p]:text-xs bg-white",
24
- listItemClassName: "[&>p]:text-xs",
25
- options: r,
26
- value: s.toString(),
24
+ listItemClassName: "[&>p]:text-xs dark:bg-metal-800",
25
+ options: s,
26
+ value: n.toString(),
27
27
  onChange: ({ target: e }) => m(e.value)
28
28
  }
29
29
  )
30
30
  ] });
31
31
  };
32
32
  export {
33
- b as DropdownPaginate
33
+ u as DropdownPaginate
34
34
  };
@@ -1,70 +1,70 @@
1
- import { jsxs as m, jsx as l } from "react/jsx-runtime";
2
- import { d as O } from "../../../../debounce-BFejQm9P.js";
3
- import { useRef as R, useCallback as u, useMemo as p } from "react";
1
+ import { jsxs as m, jsx as a } from "react/jsx-runtime";
2
+ import { d as R } from "../../../../debounce-BFejQm9P.js";
3
+ import { useRef as v, useCallback as u, useMemo as p } from "react";
4
4
  import { Button as y } from "../../../Button/Button.js";
5
- import { Filter as s } from "../../../Filter/Filter.js";
5
+ import { Filter as l } from "../../../Filter/Filter.js";
6
6
  import { Input as B } from "../../../Input/Input.js";
7
7
  import { cn as N } from "../../../../utils/index.js";
8
8
  import { useTableContext as T } from "../../contexts/table.hook.js";
9
9
  const E = ({
10
10
  actions: f,
11
- multiSelectFilter: d,
12
- placeholder: h,
11
+ multiSelectFilter: h,
12
+ placeholder: d,
13
13
  showFilterInput: g = !0,
14
- showResetButton: x = !0,
15
- resetButtonClassName: C
14
+ showResetButton: C = !0,
15
+ resetButtonClassName: S
16
16
  }) => {
17
- const n = R(null), {
18
- termOfSearch: o,
17
+ const o = v(null), {
18
+ termOfSearch: s,
19
19
  multiselectSelected: c,
20
- onChangeTermOfSearch: a,
20
+ onChangeTermOfSearch: n,
21
21
  onSelectMultiselect: i
22
- } = T(), S = u(
22
+ } = T(), x = u(
23
23
  (e, t) => i(
24
24
  e,
25
25
  t.map((r) => r.id)
26
26
  ),
27
27
  [i]
28
- ), b = u(() => {
29
- a(""), n.current && (n.current.value = "");
30
- }, [a]), F = p(
31
- () => O((e) => {
32
- a(e.target.value);
28
+ ), F = u(() => {
29
+ n(""), o.current && (o.current.value = "");
30
+ }, [n]), M = p(
31
+ () => R((e) => {
32
+ n(e.target.value);
33
33
  }, 500),
34
- [a]
35
- ), M = p(
36
- () => !!o || Object.entries(c ?? {}).map(([, e]) => e).flat().length > 0,
37
- [o, c]
34
+ [n]
35
+ ), b = p(
36
+ () => !!s || Object.entries(c ?? {}).map(([, e]) => e).flat().length > 0,
37
+ [s, c]
38
38
  );
39
39
  return /* @__PURE__ */ m("div", { className: "w-full flex items-center justify-end pb-6", children: [
40
- g && /* @__PURE__ */ l(
40
+ g && /* @__PURE__ */ a(
41
41
  B,
42
42
  {
43
- ref: n,
44
- placeholder: h,
43
+ ref: o,
44
+ placeholder: d,
45
45
  isSearch: !0,
46
46
  autoComplete: "false",
47
47
  className: "w-72",
48
48
  inputMode: "search",
49
- onChange: F
49
+ onChange: M
50
50
  }
51
51
  ),
52
- /* @__PURE__ */ m(s, { children: [
53
- d?.map(
54
- ({ key: e, label: t, position: r = "right", options: j }) => /* @__PURE__ */ l(
55
- s.BadgeMultiSelect,
52
+ /* @__PURE__ */ m(l, { children: [
53
+ h?.map(
54
+ ({ key: e, label: t, position: r = "right", options: j }) => /* @__PURE__ */ a(
55
+ l.BadgeMultiSelect,
56
56
  {
57
57
  label: t,
58
58
  position: r,
59
59
  options: j,
60
- onApply: (v) => {
61
- S(e, v);
60
+ onApply: (O) => {
61
+ x(e, O);
62
62
  }
63
63
  },
64
64
  t
65
65
  )
66
66
  ),
67
- f?.map(({ label: e, onClick: t, variant: r = "secondary" }) => /* @__PURE__ */ l(
67
+ f?.map(({ label: e, onClick: t, variant: r = "secondary" }) => /* @__PURE__ */ a(
68
68
  y,
69
69
  {
70
70
  variant: r,
@@ -74,15 +74,12 @@ const E = ({
74
74
  },
75
75
  e
76
76
  )),
77
- x && /* @__PURE__ */ l(
78
- s.ResetButton,
77
+ C && /* @__PURE__ */ a(
78
+ l.ResetButton,
79
79
  {
80
- className: N(
81
- "text-slate-700 hover:text-slate-700 disabled:text-slate-700/45 select-none",
82
- C
83
- ),
84
- disabled: !M,
85
- onClick: b
80
+ className: N("select-none", S),
81
+ disabled: !b,
82
+ onClick: F
86
83
  }
87
84
  )
88
85
  ] })
@@ -1,41 +1,42 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import { useRef as l, useCallback as c } from "react";
3
- import { Input as p } from "../../../Input/Input.js";
1
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
+ import { useRef as i, useCallback as p } from "react";
3
+ import { Input as c } from "../../../Input/Input.js";
4
4
  import { useTableContext as f } from "../../contexts/table.hook.js";
5
- const h = () => {
6
- const r = l(null), { totalPages: e, handlePage: o } = f(), m = c(
7
- (n) => {
8
- n.preventDefault();
9
- const s = new FormData(n.currentTarget), a = Number(s.get("jump-to")), u = (a < e ? a : e) || 1;
10
- o(u - 1), r.current?.reset();
5
+ const k = () => {
6
+ const r = i(null), { totalPages: e, handlePage: a } = f(), n = p(
7
+ (o) => {
8
+ o.preventDefault();
9
+ const s = new FormData(o.currentTarget), m = Number(s.get("jump-to")), l = (m < e ? m : e) || 1;
10
+ a(l - 1), r.current?.reset();
11
11
  },
12
- [o, e]
12
+ [a, e]
13
13
  );
14
- return /* @__PURE__ */ i(
14
+ return /* @__PURE__ */ u(
15
15
  "form",
16
16
  {
17
17
  "aria-label": "footer-pagination",
18
18
  ref: r,
19
- onSubmit: m,
19
+ onSubmit: n,
20
20
  className: "flex items-center gap-2",
21
21
  children: [
22
- /* @__PURE__ */ t("span", { className: "min-w-fit", children: "Jump to" }),
22
+ /* @__PURE__ */ t("span", { className: "min-w-fit dark:text-metal-300", children: "Jump to" }),
23
23
  /* @__PURE__ */ t(
24
- p,
24
+ c,
25
25
  {
26
26
  type: "number",
27
- className: "w-18 text-xs no-spinner",
27
+ className: "w-18 text-xs no-spinner dark:bg-metal-800 dark:border-metal-700 dark:text-metal-300",
28
28
  name: "jump-to",
29
29
  min: 1,
30
30
  max: e,
31
- required: !0
31
+ required: !0,
32
+ autoComplete: "off"
32
33
  }
33
34
  ),
34
35
  /* @__PURE__ */ t(
35
36
  "button",
36
37
  {
37
38
  type: "submit",
38
- className: "text-xs text-blue-600 p-2 cursor-pointer",
39
+ className: "text-xs text-blue-600 p-2 cursor-pointer dark:text-aurora-500",
39
40
  children: "Go"
40
41
  }
41
42
  )
@@ -44,5 +45,5 @@ const h = () => {
44
45
  );
45
46
  };
46
47
  export {
47
- h as FormPaginate
48
+ k as FormPaginate
48
49
  };