@konstructio/ui 0.1.2-alpha.101 → 0.1.2-alpha.103

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 (221) hide show
  1. package/dist/AlertDialogTrigger-CgcsW_ta.js +109 -0
  2. package/dist/{Breadcrumb-Bmv0vzgt.js → Breadcrumb-Cp3abB2w.js} +1 -1
  3. package/dist/Checkbox-DzAx7n67.js +249 -0
  4. package/dist/{CommandInput-CYYsk_31.js → CommandInput-BnvRMfLI.js} +2 -2
  5. package/dist/{Counter-DWKyr569.js → Counter-CY0xGnVM.js} +2 -2
  6. package/dist/{DayPicker-CwO8Zff5.js → DayPicker-kweJz134.js} +750 -746
  7. package/dist/{DropdownButton-Beel5_gN.js → DropdownButton-DnlwdPmb.js} +1 -1
  8. package/dist/FlagSelectorList-BoYG-_It.js +852 -0
  9. package/dist/{HamburgerTrigger-7a4POUaM.js → HamburgerTrigger-1vOTrm8-.js} +2 -2
  10. package/dist/{Input-DG3snJf_.js → Input-CW0VwW2T.js} +4 -4
  11. package/dist/{Modal-Bcu6LLAp.js → Modal-Bfzggwlr.js} +2 -2
  12. package/dist/{Spinner-BegZ5yd7.js → Spinner-Lw9mZYhg.js} +1 -1
  13. package/dist/Switch-WBRr8uOJ.js +196 -0
  14. package/dist/Toast-ByH-l4XK.js +459 -0
  15. package/dist/{Wrapper-DwxJAkNQ.js → Wrapper-ClJ_Mham.js} +2 -2
  16. package/dist/{Wrapper-DtT29fc5.js → Wrapper-XeeD3av7.js} +1 -1
  17. package/dist/components/Alert/Alert.js +2 -2
  18. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  19. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  20. package/dist/components/AlertDialog/components/index.js +1 -1
  21. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  22. package/dist/components/Checkbox/Checkbox.js +1 -1
  23. package/dist/components/Command/Command.js +2 -2
  24. package/dist/components/Command/components/Command.js +1 -1
  25. package/dist/components/Command/components/CommandEmpty.js +1 -1
  26. package/dist/components/Command/components/CommandGroup.js +1 -1
  27. package/dist/components/Command/components/CommandInput.js +1 -1
  28. package/dist/components/Command/components/CommandItem.js +1 -1
  29. package/dist/components/Command/components/CommandList.js +1 -1
  30. package/dist/components/Command/components/CommandSeparator.js +1 -1
  31. package/dist/components/Command/components/DialogContent.js +2 -2
  32. package/dist/components/Command/components/DialogOverlay.js +1 -1
  33. package/dist/components/Command/components/index.js +1 -1
  34. package/dist/components/Counter/Counter.js +1 -1
  35. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
  36. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
  37. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
  38. package/dist/components/Datepicker/DatePicker.js +2 -3
  39. package/dist/components/Drawer/Drawer.js +2 -2
  40. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  41. package/dist/components/Filter/Filter.js +4 -3
  42. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +23 -24
  43. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +60 -65
  44. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +35 -43
  45. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +40 -45
  46. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +33 -34
  47. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +45 -51
  48. package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +28 -0
  49. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +56 -61
  50. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +33 -34
  51. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +70 -75
  52. package/dist/components/Filter/contexts/filter.provider.js +8 -5
  53. package/dist/components/Filter/utils/index.js +1 -1
  54. package/dist/components/Input/Input.js +1 -1
  55. package/dist/components/LineChart/LineChart.js +1 -1
  56. package/dist/components/Modal/Modal.js +1 -1
  57. package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
  58. package/dist/components/Modal/components/index.js +1 -1
  59. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
  60. package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
  61. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
  62. package/dist/components/MultiSelectDropdown/components/index.js +1 -1
  63. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
  64. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
  65. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +2 -2
  66. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +2 -2
  67. package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
  68. package/dist/components/PhoneNumberInput/components/index.js +2 -2
  69. package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
  70. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
  71. package/dist/components/PieChart/PieChart.js +1 -1
  72. package/dist/components/Range/Range.js +1 -1
  73. package/dist/components/Select/components/List/List.js +1 -1
  74. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
  75. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +1 -1
  76. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +1 -1
  77. package/dist/components/Sidebar/components/index.js +1 -1
  78. package/dist/components/Slider/Slider.js +1 -1
  79. package/dist/components/Spinner/Spinner.js +1 -1
  80. package/dist/components/Switch/Switch.js +1 -1
  81. package/dist/components/Table/components/Filter.js +1 -1
  82. package/dist/components/Tabs/Tabs.js +1 -1
  83. package/dist/components/Tabs/components/Content.js +1 -1
  84. package/dist/components/Tabs/components/List.js +1 -1
  85. package/dist/components/Tabs/components/Trigger.js +1 -1
  86. package/dist/components/TagSelect/TagSelect.js +1 -1
  87. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
  88. package/dist/components/TagSelect/components/index.js +1 -1
  89. package/dist/components/Toast/Toast.js +1 -1
  90. package/dist/components/Tooltip/Tooltip.js +1 -1
  91. package/dist/components/VirtualizedTable/VirtualizedTable.js +87 -87
  92. package/dist/components/VirtualizedTable/components/Actions/Actions.js +19 -19
  93. package/dist/components/VirtualizedTable/components/Body/Body.js +50 -49
  94. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +67 -21
  95. package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
  96. package/dist/components/VirtualizedTable/components/Filter/Filter.js +53 -63
  97. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +10 -10
  98. package/dist/components/VirtualizedTable/components/Header/Header.js +47 -34
  99. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +19 -15
  100. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +10 -10
  101. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
  102. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +8 -8
  103. package/dist/components/VirtualizedTable/contexts/index.js +1 -1
  104. package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
  105. package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
  106. package/dist/components/index.js +10 -10
  107. package/dist/{components-CYt24H4n.js → components-BIHlj4yH.js} +1 -1
  108. package/dist/{debounce-KoeGNmnW.js → debounce-C5Ycjilj.js} +14 -14
  109. package/dist/dist-2bGlmy8N2.js +165 -0
  110. package/dist/dist-BiJrNvNo.js +193 -0
  111. package/dist/dist-BuFiu480.js +13 -0
  112. package/dist/dist-C2aTw0m62.js +1320 -0
  113. package/dist/{dist-DvoMuWKO2.js → dist-C2s4VX-42.js} +4 -4
  114. package/dist/dist-CT6d9xe7.js +441 -0
  115. package/dist/dist-CTvBzxW8.js +31 -0
  116. package/dist/dist-CVDFmWf2.js +358 -0
  117. package/dist/dist-D4FePjTS.js +194 -0
  118. package/dist/dist-DISvWx7U.js +99 -0
  119. package/dist/dist-Db6UeFo4.js +291 -0
  120. package/dist/{dist-DGO9opgu.js → dist-Dse3gSmZ.js} +49 -49
  121. package/dist/dist-j7FOUrFU.js +206 -0
  122. package/dist/{dist-C8NWUTUh.js → dist-l-aDnQZC.js} +1 -1
  123. package/dist/es2015-BWf6xQHm.js +222 -0
  124. package/dist/index.js +10 -10
  125. package/dist/{isObject-1ZmdWuhC.js → isObject-BeFFiVJK.js} +8 -8
  126. package/dist/lib/components/Alert/Alert.types.d.ts +1 -1
  127. package/dist/lib/components/AlertDialog/AlertDialog.types.d.ts +1 -1
  128. package/dist/lib/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +2 -2
  129. package/dist/lib/components/Autocomplete/Autocomplete.types.d.ts +1 -1
  130. package/dist/lib/components/Breadcrumb/Breadcrumb.types.d.ts +1 -1
  131. package/dist/lib/components/Breadcrumb/components/BackButton/BackButton.types.d.ts +1 -1
  132. package/dist/lib/components/Breadcrumb/components/Item/Item.types.d.ts +1 -1
  133. package/dist/lib/components/Button/Button.types.d.ts +1 -1
  134. package/dist/lib/components/ButtonGroup/ButtonGroup.types.d.ts +1 -1
  135. package/dist/lib/components/Card/Card.types.d.ts +1 -1
  136. package/dist/lib/components/Checkbox/Checkbox.types.d.ts +1 -1
  137. package/dist/lib/components/Command/Command.types.d.ts +1 -1
  138. package/dist/lib/components/Counter/Counter.types.d.ts +1 -1
  139. package/dist/lib/components/DateRangePicker/DateRangePicker.types.d.ts +1 -1
  140. package/dist/lib/components/Drawer/Drawer.types.d.ts +1 -1
  141. package/dist/lib/components/Filter/Filter.types.d.ts +1 -1
  142. package/dist/lib/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +2 -3
  143. package/dist/lib/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.d.ts +1 -2
  144. package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.d.ts +2 -3
  145. package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +1 -1
  146. package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.d.ts +3 -0
  147. package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.types.d.ts +9 -0
  148. package/dist/lib/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
  149. package/dist/lib/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.d.ts +1 -2
  150. package/dist/lib/components/Filter/contexts/filter.context.d.ts +1 -0
  151. package/dist/lib/components/ImageUpload/ImageUpload.types.d.ts +1 -1
  152. package/dist/lib/components/Input/Input.types.d.ts +1 -1
  153. package/dist/lib/components/LineChart/LineChart.types.d.ts +1 -1
  154. package/dist/lib/components/Loading/Loading.types.d.ts +1 -1
  155. package/dist/lib/components/Modal/Modal.types.d.ts +1 -1
  156. package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +1 -1
  157. package/dist/lib/components/MultiSelectDropdown/components/Item/Item.types.d.ts +1 -1
  158. package/dist/lib/components/MultiSelectDropdown/components/List/List.types.d.ts +1 -1
  159. package/dist/lib/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
  160. package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +1 -1
  161. package/dist/lib/components/Radio/Radio.types.d.ts +1 -1
  162. package/dist/lib/components/RadioCard/RadioCard.types.d.ts +1 -1
  163. package/dist/lib/components/RadioCardGroup/RadioCardGroup.types.d.ts +1 -1
  164. package/dist/lib/components/RadioGroup/RadioGroup.types.d.ts +1 -1
  165. package/dist/lib/components/Range/Range.types.d.ts +1 -1
  166. package/dist/lib/components/Select/Select.types.d.ts +1 -1
  167. package/dist/lib/components/Sidebar/Sidebar.types.d.ts +2 -2
  168. package/dist/lib/components/Sidebar/components/Label/Label.types.d.ts +1 -1
  169. package/dist/lib/components/Slider/Slider.types.d.ts +1 -1
  170. package/dist/lib/components/Spinner/Spinner.types.d.ts +2 -2
  171. package/dist/lib/components/Stepper/Stepper.types.d.ts +1 -1
  172. package/dist/lib/components/Stepper/components/StepItem/StepItem.types.d.ts +1 -1
  173. package/dist/lib/components/Switch/Switch.types.d.ts +1 -1
  174. package/dist/lib/components/Table/Table.types.d.ts +1 -1
  175. package/dist/lib/components/Tabs/Tabs.types.d.ts +1 -1
  176. package/dist/lib/components/TagSelect/TagSelect.types.d.ts +1 -1
  177. package/dist/lib/components/TagSelect/components/Item/Item.types.d.ts +2 -2
  178. package/dist/lib/components/TagSelect/components/List/List.types.d.ts +1 -1
  179. package/dist/lib/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
  180. package/dist/lib/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
  181. package/dist/lib/components/TextArea/TextArea.types.d.ts +1 -1
  182. package/dist/lib/components/Toast/Toast.types.d.ts +1 -1
  183. package/dist/lib/components/Typography/Typography.types.d.ts +1 -1
  184. package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +27 -3
  185. package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
  186. package/dist/lib/components/VirtualizedTable/components/Body/Body.types.d.ts +1 -0
  187. package/dist/lib/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.types.d.ts +2 -0
  188. package/dist/lib/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -1
  189. package/dist/lib/components/VirtualizedTable/components/Header/Header.d.ts +1 -1
  190. package/dist/lib/components/VirtualizedTable/components/Header/Header.types.d.ts +1 -0
  191. package/dist/lib/components/VirtualizedTable/components/Pagination/Pagination.types.d.ts +2 -0
  192. package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +1 -1
  193. package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +2 -0
  194. package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
  195. package/dist/lib/components/VirtualizedTable/contexts/table.types.d.ts +1 -0
  196. package/dist/lib/contexts/theme.context.d.ts +1 -1
  197. package/dist/lib/contexts/theme.hook.d.ts +1 -1
  198. package/dist/package.json +34 -33
  199. package/dist/{phone-number.provider-CJJOFYk-.js → phone-number.provider-BxQCTxp8.js} +457 -457
  200. package/dist/{prop-types-CaJpPVsa.js → prop-types-CfEYxTbR.js} +52 -52
  201. package/dist/styles.css +1 -1
  202. package/dist/{table.provider-9uUt5a-s.js → table.provider-2sAkE7z_.js} +395 -368
  203. package/dist/{utils-B6A9pnrH.js → utils-B-BTGYA5.js} +193 -193
  204. package/dist/{x-CESTrenk.js → x-BI9jmc7e.js} +1 -1
  205. package/package.json +34 -33
  206. package/dist/AlertDialogTrigger-HhbFOOUE.js +0 -124
  207. package/dist/Checkbox-B1rTwzR3.js +0 -240
  208. package/dist/FlagSelectorList-BARhzfj2.js +0 -848
  209. package/dist/Switch-1RGhhTtg.js +0 -178
  210. package/dist/Toast-CS-igZor.js +0 -467
  211. package/dist/dist-7edduNXi.js +0 -398
  212. package/dist/dist-BkYHh2kH.js +0 -408
  213. package/dist/dist-C6Cif8-U.js +0 -28
  214. package/dist/dist-CeuUxVmT.js +0 -13
  215. package/dist/dist-CfYOvauX.js +0 -125
  216. package/dist/dist-CktbIsHq.js +0 -264
  217. package/dist/dist-DGqWMRtc.js +0 -183
  218. package/dist/dist-DdFwUrO22.js +0 -11
  219. package/dist/dist-DnGj9MTf.js +0 -1692
  220. package/dist/dist-eAwtFCCA.js +0 -87
  221. /package/dist/{dist-AihTpWdF2.js → dist-AihTpWdF.js} +0 -0
@@ -1,73 +1,74 @@
1
1
  import { t as r } from "../../../../utils-Cx-WzRZF.js";
2
- import { n as H } from "../../../../table.provider-9uUt5a-s.js";
3
- import { useTableContext as L } from "../../contexts/table.hook.js";
4
- import { Skeleton as M } from "../Skeleton/Skeleton.js";
5
- import { isPaginationBarVisible as O } from "../../utils/pagination.js";
6
- import { ExpandableRow as P } from "../ExpandableRow/ExpandableRow.js";
7
- import { Fragment as I } from "react";
8
- import { jsx as e, jsxs as T } from "react/jsx-runtime";
9
- var Y = ({ isLoading: h, showPagination: w, emptyState: p }) => {
10
- const { table: i, pageSize: k, totalItems: N = -1 / 0, tableFetching: R, enableExpandedRow: E, classNameExpandedRow: v, classNameExpandedCell: y, classNameExpandedContent: C, enableHoverRow: g, classNameHoverRow: D, classNameActiveExpandedRow: j, renderExpandedRow: f, isBorderOnAdjacentCell: B, isExpandColumnVisible: V } = L();
11
- if (h || R) return /* @__PURE__ */ e(M, {
12
- numberOfRows: k,
13
- table: i
2
+ import { n as I } from "../../../../table.provider-2sAkE7z_.js";
3
+ import { useTableContext as T } from "../../contexts/table.hook.js";
4
+ import { Skeleton as q } from "../Skeleton/Skeleton.js";
5
+ import { isPaginationBarVisible as G } from "../../utils/pagination.js";
6
+ import { ExpandableRow as J } from "../ExpandableRow/ExpandableRow.js";
7
+ import { Fragment as K } from "react";
8
+ import { jsx as e, jsxs as Q } from "react/jsx-runtime";
9
+ var re = ({ isLoading: v, showPagination: N, emptyState: y, errorState: a }) => {
10
+ const { table: m, pageSize: E, totalItems: R = -1 / 0, tableLoading: C, tableError: c, enableExpandedRow: D, classNameExpandedRow: j, classNameExpandedCell: B, classNameExpandedContent: V, enableHoverRow: u, classNameHoverRow: z, classNameActiveExpandedRow: L, renderExpandedRow: f, isBorderOnAdjacentCell: _, isExpandColumnVisible: A } = T();
11
+ if (v || C) return /* @__PURE__ */ e(q, {
12
+ numberOfRows: E,
13
+ table: m
14
14
  });
15
- const a = i.getRowModel().rows ?? [], o = w && O(N);
16
- if (a.length === 0 && p) {
17
- const d = i.getVisibleLeafColumns().length;
15
+ const t = m.getRowModel().rows ?? [], l = N && G(R), x = t.length === 0 && !!c && !!a, h = t.length > 0 ? null : c && a ? typeof a == "function" ? a(c) : a : y ?? null;
16
+ if (h) {
17
+ const d = m.getVisibleLeafColumns().length;
18
18
  return /* @__PURE__ */ e("tbody", {
19
- className: r("text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
19
+ className: r("kvt-body", "text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
20
20
  children: /* @__PURE__ */ e("tr", {
21
- className: r("border-b", "border-b-gray-200", "dark:border-b-metal-700", "bg-transparent"),
21
+ className: r(x ? "kvt-error-row" : "kvt-empty-row", "border-b", "border-b-gray-200", "dark:border-b-metal-700", "bg-transparent"),
22
22
  "data-empty-row": !0,
23
+ "data-error-row": x ? !0 : void 0,
23
24
  children: /* @__PURE__ */ e("td", {
24
25
  colSpan: d,
25
26
  className: r("p-0", "bg-white", "dark:bg-metal-900", "dark:border", "dark:border-metal-700", "rounded-b-lg"),
26
27
  children: /* @__PURE__ */ e("div", {
27
28
  className: "flex items-center justify-center",
28
- children: p
29
+ children: h
29
30
  })
30
31
  })
31
32
  })
32
33
  });
33
34
  }
34
35
  return /* @__PURE__ */ e("tbody", {
35
- className: r("text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
36
- children: a.map((d, m) => {
37
- const { id: c, original: b, getVisibleCells: z } = d, { meta: l = {} } = b, s = z(), t = E && d.getIsExpanded(), F = !!l.expandedRow || !!f, u = s[0]?.column.id !== "__expand" || V ? 0 : B ? 1 : null;
38
- return /* @__PURE__ */ T(I, { children: [/* @__PURE__ */ e("tr", {
39
- className: r({ "group/row": g }, "border-b", "border-b-gray-200", "dark:text-metal-50", "dark:border-b-metal-700", "bg-transparent", l.className),
40
- "data-row-id": c,
41
- ...l.attributes ?? {},
42
- children: s.map(({ id: S, column: n, getContext: _ }, x) => {
43
- const A = typeof n.columnDef.meta?.className == "function" ? n.columnDef.meta?.className(b) : n.columnDef.meta?.className;
36
+ className: r("kvt-body", "text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
37
+ children: t.map((d, b) => {
38
+ const { id: p, original: g, getVisibleCells: F } = d, { meta: s = {} } = g, i = F(), n = D && d.getIsExpanded(), H = !!s.expandedRow || !!f, k = i[0]?.column.id !== "__expand" || A ? 0 : _ ? 1 : null;
39
+ return /* @__PURE__ */ Q(K, { children: [/* @__PURE__ */ e("tr", {
40
+ className: r("kvt-row", { "group/row": u }, "border-b", "border-b-gray-200", "dark:text-metal-50", "dark:border-b-metal-700", "bg-transparent", s.className),
41
+ "data-row-id": p,
42
+ ...s.attributes ?? {},
43
+ children: i.map(({ id: M, column: o, getContext: O }, w) => {
44
+ const P = typeof o.columnDef.meta?.className == "function" ? o.columnDef.meta?.className(g) : o.columnDef.meta?.className;
44
45
  return /* @__PURE__ */ e("td", {
45
- className: r("px-4", "py-1", "text-sm", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", {
46
- "group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800": g,
47
- [r("bg-zinc-100 dark:bg-metal-800", j)]: !!t
48
- }, D, A, {
49
- "rounded-bl-lg": m === a.length - 1 && u !== null && x === u && !o && !t,
50
- "rounded-br-lg": m === a.length - 1 && x === s.length - 1 && !o && !t,
51
- "dark:[tr:last-child_&]:border-b": !o
46
+ className: r("kvt-cell", "px-4", "py-1", "text-sm", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", {
47
+ "group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800": u,
48
+ [r("bg-zinc-100 dark:bg-metal-800", L)]: !!n
49
+ }, z, P, {
50
+ "rounded-bl-lg": b === t.length - 1 && k !== null && w === k && !l && !n,
51
+ "rounded-br-lg": b === t.length - 1 && w === i.length - 1 && !l && !n,
52
+ "dark:[tr:last-child_&]:border-b": !l
52
53
  }),
53
- "data-expanded": t ? !0 : void 0,
54
- ...n.columnDef.meta?.attributes ?? {},
55
- children: H(n.columnDef.cell, _())
56
- }, S);
54
+ "data-expanded": n ? !0 : void 0,
55
+ ...o.columnDef.meta?.attributes ?? {},
56
+ children: I(o.columnDef.cell, O())
57
+ }, M);
57
58
  })
58
- }), F && /* @__PURE__ */ e(P, {
59
- classNameExpandedCell: y,
60
- classNameExpandedContent: C,
61
- classNameExpandedRow: v,
62
- colSpan: s.length,
63
- id: c,
64
- isExpanded: !!t,
65
- isLastRow: m === a.length - 1 && !o,
66
- children: l.expandedRow ?? f?.(b)
67
- })] }, c);
59
+ }), H && /* @__PURE__ */ e(J, {
60
+ classNameExpandedCell: B,
61
+ classNameExpandedContent: V,
62
+ classNameExpandedRow: j,
63
+ colSpan: i.length,
64
+ id: p,
65
+ isExpanded: !!n,
66
+ isLastRow: b === t.length - 1 && !l,
67
+ children: s.expandedRow ?? f?.(g)
68
+ })] }, p);
68
69
  })
69
70
  });
70
71
  };
71
72
  export {
72
- Y as Body
73
+ re as Body
73
74
  };
@@ -1,26 +1,72 @@
1
- import { Select as i } from "../../../Select/Select.js";
2
- import { DEFAULT_PAGE_SIZES as l } from "../../constants/pagination.js";
3
- import { useTableContext as p } from "../../contexts/table.hook.js";
4
- import { useCallback as g, useMemo as c } from "react";
5
- import { jsx as o, jsxs as d } from "react/jsx-runtime";
6
- var u = ({ pageSizes: m = l }) => {
7
- const { pageSize: r, onPageSize: t, handlePage: a } = p(), s = c(() => m.map(String).map((e) => ({
8
- label: e,
9
- value: e
10
- })), []), n = g((e) => {
11
- t(Number(e)), a(0);
12
- }, [a, t]);
13
- return /* @__PURE__ */ d("div", {
14
- className: "flex items-center gap-2 dark:text-metal-300",
15
- children: [/* @__PURE__ */ o("span", { children: "Show" }), /* @__PURE__ */ o(i, {
16
- className: "w-22 [&>div>p]:text-sm bg-white",
17
- listItemClassName: "[&>p]:text-sm dark:bg-metal-800",
18
- options: s,
19
- value: r.toString(),
20
- onChange: ({ target: e }) => n(e.value)
1
+ import { t as o } from "../../../../utils-Cx-WzRZF.js";
2
+ import { t as u } from "../../../../chevron-up-Bjpvg6ui.js";
3
+ import { Typography as c } from "../../../Typography/Typography.js";
4
+ import { i as b, n as v, r as w, t as S } from "../../../../dist-2bGlmy8N2.js";
5
+ import { listVariants as k } from "../../../Select/components/List/List.variants.js";
6
+ import { listItemVariants as N } from "../../../Select/components/ListItem/ListItem.variants.js";
7
+ import { selectVariants as C } from "../../../Select/Select.variants.js";
8
+ import { DEFAULT_PAGE_SIZES as y } from "../../constants/pagination.js";
9
+ import { useTableContext as z } from "../../contexts/table.hook.js";
10
+ import { useState as O } from "react";
11
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
12
+ var _ = ({ pageSizes: d = y, isListPortal: f = !1, direction: s = "auto" }) => {
13
+ const { pageSize: i, onPageSize: g, handlePage: h } = z(), [n, l] = O(!1), m = (e) => {
14
+ g(Number(e)), h(0), l(!1);
15
+ }, p = /* @__PURE__ */ t(S, {
16
+ asChild: !0,
17
+ side: s === "up" ? "top" : "bottom",
18
+ avoidCollisions: s === "auto",
19
+ align: "start",
20
+ sideOffset: 4,
21
+ onOpenAutoFocus: (e) => {
22
+ e.preventDefault();
23
+ },
24
+ children: /* @__PURE__ */ t("ul", {
25
+ role: "listbox",
26
+ "aria-label": "Rows per page",
27
+ className: o(k(), "kvt-page-size-list", "static top-auto mt-0 z-50 w-(--radix-popover-trigger-width)"),
28
+ children: d.map((e) => {
29
+ const a = String(e);
30
+ return /* @__PURE__ */ t("li", {
31
+ role: "option",
32
+ "aria-selected": a === String(i),
33
+ tabIndex: 0,
34
+ className: o(N(), "dark:bg-metal-800"),
35
+ onClick: () => {
36
+ m(a);
37
+ },
38
+ onKeyDown: (x) => {
39
+ x.key === "Enter" && m(a);
40
+ },
41
+ children: /* @__PURE__ */ t(c, {
42
+ variant: "body2",
43
+ className: "text-sm dark:text-metal-50",
44
+ children: a
45
+ })
46
+ }, a);
47
+ })
48
+ })
49
+ });
50
+ return /* @__PURE__ */ r("div", {
51
+ className: "kvt-page-size flex items-center gap-2 dark:text-metal-300",
52
+ children: [/* @__PURE__ */ t("span", { children: "Show" }), /* @__PURE__ */ r(w, {
53
+ open: n,
54
+ onOpenChange: l,
55
+ children: [/* @__PURE__ */ r(b, {
56
+ "aria-label": "Rows per page",
57
+ className: o(C(), "w-22 bg-white"),
58
+ children: [/* @__PURE__ */ t(c, {
59
+ variant: "body2",
60
+ className: "flex-1 text-left text-sm text-metal-800 dark:text-metal-50",
61
+ children: i
62
+ }), /* @__PURE__ */ t(u, {
63
+ "data-state": n ? "open" : "closed",
64
+ className: "w-4 h-4 text-zinc-500 transition-all duration-100 data-[state=open]:rotate-0 data-[state=closed]:rotate-180 select-none"
65
+ })]
66
+ }), f ? /* @__PURE__ */ t(v, { children: p }) : p]
21
67
  })]
22
68
  });
23
69
  };
24
70
  export {
25
- u as DropdownPaginate
71
+ _ as DropdownPaginate
26
72
  };
@@ -1,7 +1,7 @@
1
1
  import { t as a } from "../../../../utils-Cx-WzRZF.js";
2
2
  import { jsx as d } from "react/jsx-runtime";
3
3
  var n = ({ children: o, classNameExpandedCell: b, classNameExpandedContent: t, classNameExpandedRow: l, colSpan: m, id: i, isExpanded: r, isLastRow: e }) => /* @__PURE__ */ d("tr", {
4
- className: a("h-0 leading-0", l),
4
+ className: a("kvt-expanded-row h-0 leading-0", l),
5
5
  "data-expanded-row-id": i,
6
6
  children: /* @__PURE__ */ d("td", {
7
7
  colSpan: m,
@@ -1,54 +1,43 @@
1
- import { o as $ } from "../../../../rolldown-runtime-Ck3dxwZt.js";
2
- import { t as G } from "../../../../Input-DG3snJf_.js";
3
- import { t as H } from "../../../../utils-Cx-WzRZF.js";
4
- import { Button as J } from "../../../Button/Button.js";
5
- import { resetEvent as K } from "../../../Filter/events/index.js";
1
+ import { o as z } from "../../../../rolldown-runtime-Ck3dxwZt.js";
2
+ import { t as V } from "../../../../Input-CW0VwW2T.js";
3
+ import { t as $ } from "../../../../utils-Cx-WzRZF.js";
4
+ import { Button as f } from "../../../Button/Button.js";
5
+ import { resetEvent as G } from "../../../Filter/events/index.js";
6
6
  import { Filter as n } from "../../../Filter/Filter.js";
7
- import { t as Q } from "../../../../debounce-KoeGNmnW.js";
8
- import { useTableContext as U } from "../../contexts/table.hook.js";
9
- import { VirtualizedTableEvent as W } from "../../events/index.js";
10
- import { useCallback as w, useEffect as X, useMemo as u, useRef as Y } from "react";
11
- import { jsx as s, jsxs as p } from "react/jsx-runtime";
12
- var Z = /* @__PURE__ */ $(Q(), 1), ue = ({ id: m, actions: i, filters: d, multiSelectFilter: h, placeholder: D, showFilterInput: x = !0, showResetButton: A = !0, resetButtonClassName: M, closeOnApply: j = !0 }) => {
13
- const c = Y(null), { termOfSearch: y, multiselectSelected: b, dateFilters: F, dateRangeFilters: S, timeFilters: v, onChangeTermOfSearch: l, onSelectMultiselect: R, onSelectDateFilter: E, onSelectDateRangeFilter: O, onSelectTimeFilter: B } = U(), I = u(() => {
14
- const e = d ?? h?.map((a) => ({
15
- ...a,
16
- type: "badgeMultiSelect"
17
- })) ?? [], t = i ?? [];
18
- return [...e, ...t];
19
- }, [
20
- d,
21
- h,
22
- i
23
- ]), T = w((e, t) => R(e, t.map((a) => a.id)), [R]), _ = w(() => {
24
- l(""), c.current && (c.current.value = "");
25
- }, [l]);
26
- X(() => {
7
+ import { t as H } from "../../../../debounce-C5Ycjilj.js";
8
+ import { useTableContext as J } from "../../contexts/table.hook.js";
9
+ import { VirtualizedTableEvent as K } from "../../events/index.js";
10
+ import { useEffect as Q, useMemo as U, useRef as W } from "react";
11
+ import { jsx as s, jsxs as u } from "react/jsx-runtime";
12
+ var X = /* @__PURE__ */ z(H(), 1), me = ({ id: m, actions: i, filters: d, multiSelectFilter: h, placeholder: y, showFilterInput: F = !0, showResetButton: b = !0, resetButtonClassName: v, closeOnApply: S = !0 }) => {
13
+ const l = W(null), { termOfSearch: R, multiselectSelected: T, dateFilters: w, dateRangeFilters: D, timeFilters: x, onChangeTermOfSearch: c, onSelectMultiselect: M, onSelectDateFilter: j, onSelectDateRangeFilter: A, onSelectTimeFilter: E } = J(), k = [...d ?? h?.map((e) => ({
14
+ ...e,
15
+ type: "badgeMultiSelect"
16
+ })) ?? [], ...i ?? []], p = (e, t) => {
17
+ M(e, t.map((a) => a.id));
18
+ }, O = () => {
19
+ c(""), l.current && (l.current.value = "");
20
+ };
21
+ Q(() => {
27
22
  const e = Array.isArray(m) ? m.join(",") : String(m), t = new AbortController();
28
- return document.addEventListener(W.RESET_FILTERS, (a) => {
23
+ return document.addEventListener(K.RESET_FILTERS, (a) => {
29
24
  const { detail: o } = a;
30
- o.tableId === e && (l(""), c.current && (c.current.value = ""), K());
25
+ o.tableId === e && (c(""), l.current && (l.current.value = ""), G());
31
26
  }, { signal: t.signal }), () => t.abort();
32
- }, [m, l]);
33
- const k = u(() => (0, Z.default)((e) => {
34
- l(e.target.value);
35
- }, 500), [l]), P = u(() => !!y || Object.values(b ?? {}).flat().length > 0 || Object.values(F ?? {}).some(Boolean) || Object.values(S ?? {}).some(Boolean) || Object.values(v ?? {}).some(Boolean), [
36
- y,
37
- b,
38
- F,
39
- S,
40
- v
41
- ]), g = (e) => {
27
+ }, [m, c]);
28
+ const B = U(() => (0, X.default)((e) => {
29
+ c(e.target.value);
30
+ }, 500), [c]), I = !!R || Object.values(T ?? {}).flat().length > 0 || Object.values(w ?? {}).some(Boolean) || Object.values(D ?? {}).some(Boolean) || Object.values(x ?? {}).some(Boolean), _ = (e) => {
42
31
  if (e.type === "action") {
43
- const { label: r, appearance: N = "compact", variant: L = "secondary", leftIcon: q, rightIcon: z, type: f, ...V } = e;
44
- return /* @__PURE__ */ p(J, {
45
- appearance: N,
46
- variant: L,
47
- ...V,
32
+ const { label: r, appearance: P = "compact", variant: N = "secondary", leftIcon: g, rightIcon: L, type: Y, ...q } = e;
33
+ return /* @__PURE__ */ u(f, {
34
+ appearance: P,
35
+ variant: N,
36
+ ...q,
48
37
  children: [
49
- q,
38
+ g,
50
39
  r,
51
- z
40
+ L
52
41
  ]
53
42
  }, r);
54
43
  }
@@ -58,14 +47,14 @@ var Z = /* @__PURE__ */ $(Q(), 1), ue = ({ id: m, actions: i, filters: d, multiS
58
47
  position: o,
59
48
  options: e.options,
60
49
  onApply: (r) => {
61
- T(t, r);
50
+ p(t, r);
62
51
  }
63
52
  }, t) : e.type === "date" ? /* @__PURE__ */ s(n.DateFilterDropdown, {
64
53
  label: a,
65
54
  position: o,
66
55
  countryCode: e.countryCode,
67
56
  onApply: (r) => {
68
- E(t, r);
57
+ j(t, r);
69
58
  }
70
59
  }, t) : e.type === "dateRange" ? /* @__PURE__ */ s(n.DateRangeFilterDropdown, {
71
60
  label: a,
@@ -78,7 +67,7 @@ var Z = /* @__PURE__ */ $(Q(), 1), ue = ({ id: m, actions: i, filters: d, multiS
78
67
  maxDate: e.maxDate,
79
68
  countryCode: e.countryCode,
80
69
  onApply: (r) => {
81
- O(t, r);
70
+ A(t, r);
82
71
  },
83
72
  onRangeChange: e.onRangeChange
84
73
  }, t) : e.type === "time" ? /* @__PURE__ */ s(n.TimeFilterDropdown, {
@@ -88,37 +77,38 @@ var Z = /* @__PURE__ */ $(Q(), 1), ue = ({ id: m, actions: i, filters: d, multiS
88
77
  presets: e.presets,
89
78
  showTimePicker: e.showTimePicker,
90
79
  onApply: (r) => {
91
- B(t, r);
80
+ E(t, r);
92
81
  }
93
82
  }, t) : /* @__PURE__ */ s(n.BadgeMultiSelect, {
94
83
  label: a,
95
84
  position: o,
96
85
  options: e.options,
97
86
  onApply: (r) => {
98
- T(t, r);
87
+ p(t, r);
99
88
  }
100
89
  }, t);
101
90
  };
102
- return /* @__PURE__ */ p("div", {
103
- className: "w-full flex items-center justify-end pb-6",
104
- children: [x && /* @__PURE__ */ s(G, {
105
- ref: c,
106
- placeholder: D,
91
+ return /* @__PURE__ */ u("div", {
92
+ className: "kvt-filter w-full flex items-center justify-end pb-6",
93
+ children: [F && /* @__PURE__ */ s(V, {
94
+ ref: l,
95
+ placeholder: y,
107
96
  isSearch: !0,
108
97
  autoComplete: "false",
109
- className: "w-72",
98
+ className: "kvt-search w-72",
110
99
  inputMode: "search",
111
- onChange: k
112
- }), /* @__PURE__ */ p(n, {
113
- closeOnApply: j,
114
- children: [I.map(g), A && /* @__PURE__ */ s(n.ResetButton, {
115
- className: H("select-none", M),
116
- disabled: !P,
117
- onClick: _
100
+ onChange: B
101
+ }), /* @__PURE__ */ u(n, {
102
+ className: "kvt-filter-actions",
103
+ closeOnApply: S,
104
+ children: [k.map(_), b && /* @__PURE__ */ s(n.ResetButton, {
105
+ className: $("select-none", v),
106
+ disabled: !I,
107
+ onClick: O
118
108
  })]
119
109
  })]
120
110
  });
121
111
  };
122
112
  export {
123
- ue as Filter
113
+ me as Filter
124
114
  };
@@ -1,19 +1,19 @@
1
- import { t as s } from "../../../../Input-DG3snJf_.js";
1
+ import { t as s } from "../../../../Input-CW0VwW2T.js";
2
2
  import { Button as i } from "../../../Button/Button.js";
3
3
  import { Typography as p } from "../../../Typography/Typography.js";
4
4
  import { useTableContext as u } from "../../contexts/table.hook.js";
5
- import { useCallback as l, useRef as c } from "react";
6
- import { jsx as e, jsxs as f } from "react/jsx-runtime";
5
+ import { useRef as l } from "react";
6
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
7
7
  var N = () => {
8
- const r = c(null), { totalPages: t, handlePage: o } = u();
9
- return /* @__PURE__ */ f("form", {
8
+ const r = l(null), { totalPages: t, handlePage: m } = u();
9
+ return /* @__PURE__ */ c("form", {
10
10
  "aria-label": "footer-pagination",
11
11
  ref: r,
12
- onSubmit: l((a) => {
13
- a.preventDefault();
14
- const n = new FormData(a.currentTarget), m = Number(n.get("jump-to"));
15
- o(((m < t ? m : t) || 1) - 1), r.current?.reset();
16
- }, [o, t]),
12
+ onSubmit: (o) => {
13
+ o.preventDefault();
14
+ const n = new FormData(o.currentTarget), a = Number(n.get("jump-to"));
15
+ m(((a < t ? a : t) || 1) - 1), r.current?.reset();
16
+ },
17
17
  className: "flex items-center gap-2",
18
18
  noValidate: !0,
19
19
  children: [
@@ -1,40 +1,53 @@
1
- import { t as r } from "../../../../utils-Cx-WzRZF.js";
2
- import { n as b } from "../../../../table.provider-9uUt5a-s.js";
3
- import { useTableContext as g } from "../../contexts/table.hook.js";
1
+ import { t } from "../../../../utils-Cx-WzRZF.js";
2
+ import { n as g } from "../../../../table.provider-2sAkE7z_.js";
3
+ import { useTableContext as k } from "../../contexts/table.hook.js";
4
4
  import u from "../../assets/chevron-up.js";
5
- import k from "../../assets/chevron-down.js";
6
- import { useCallback as d } from "react";
7
- import { jsx as a, jsxs as l } from "react/jsx-runtime";
8
- var y = ({ className: n, classNameArrows: i, classNameActiveArrows: o }) => {
9
- const { table: c, onSorting: s } = g(), m = d((t) => s([{
10
- id: t.id,
11
- desc: !1
12
- }]), [s]), p = d((t) => s([{
13
- id: t.id,
14
- desc: !0
15
- }]), [s]);
16
- return /* @__PURE__ */ a("thead", {
17
- className: r("font-semibold", "uppercase", "text-slate-500", "text-xs", "not-italic", "bg-slate-100", "overflow-hidden", "dark:text-slate-300", "dark:bg-metal-800", n),
18
- children: c.getHeaderGroups().map(({ id: t, headers: f }) => /* @__PURE__ */ a("tr", { children: f.map(({ id: x, column: e, getContext: h }) => /* @__PURE__ */ a("th", {
19
- scope: "col",
20
- className: r("px-4", "py-3", "text-left", "text-xs", "first:rounded-tl-lg", "last:rounded-tr-lg", "border-transparent", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", e.columnDef.meta?.headerClassName),
21
- children: /* @__PURE__ */ l("span", {
22
- className: "flex items-center gap-2 w-full",
23
- children: [b(e.columnDef.header, h()), e.getCanSort() && /* @__PURE__ */ l("div", {
24
- className: r("flex flex-col text-slate-400 justify-center items-center gap-1", i),
25
- role: "presentation",
26
- children: [/* @__PURE__ */ a(u, {
27
- className: r("w-2 h-2 cursor-pointer", { "text-blue-600 dark:text-aurora-500": e.getIsSorted() === "asc" }, o),
28
- onClick: () => m(e)
29
- }), /* @__PURE__ */ a(k, {
30
- className: r("w-2 h-2 cursor-pointer", { "text-blue-600 dark:text-aurora-500": e.getIsSorted() === "desc" }, o),
31
- onClick: () => p(e)
32
- })]
33
- })]
5
+ import C from "../../assets/chevron-down.js";
6
+ import { jsx as r, jsxs as o } from "react/jsx-runtime";
7
+ var D = ({ className: c, classNameArrows: i, classNameActiveArrows: l, classNameHeaderContent: m }) => {
8
+ const { table: s, headerContent: d, onSorting: n } = k(), p = (a) => {
9
+ n([{
10
+ id: a.id,
11
+ desc: !1
12
+ }]);
13
+ }, x = (a) => {
14
+ n([{
15
+ id: a.id,
16
+ desc: !0
17
+ }]);
18
+ };
19
+ return /* @__PURE__ */ o("thead", {
20
+ className: t("kvt-header", "font-semibold", "uppercase", "text-slate-500", "text-xs", "not-italic", "bg-slate-100", "overflow-hidden", "dark:text-slate-300", "dark:bg-metal-800", c),
21
+ children: [d && /* @__PURE__ */ r("tr", {
22
+ "data-header-content": !0,
23
+ children: /* @__PURE__ */ r("th", {
24
+ colSpan: s.getVisibleLeafColumns().length,
25
+ className: t("kvt-header-content", "px-6", "py-4", "text-left", "text-sm", "font-normal", "normal-case", "text-slate-800", "bg-white", "rounded-tl-lg", "rounded-tr-lg", "border-b", "border-b-gray-200", "dark:border-b-0", "dark:text-metal-50", "dark:bg-metal-900", "dark:border-t", "dark:border-x", "dark:border-metal-700", m),
26
+ children: d
34
27
  })
35
- }, x)) }, t))
28
+ }), s.getHeaderGroups().map(({ id: a, headers: h }) => /* @__PURE__ */ r("tr", {
29
+ className: "kvt-header-row",
30
+ children: h.map(({ id: b, column: e, getContext: f }) => /* @__PURE__ */ r("th", {
31
+ scope: "col",
32
+ className: t("kvt-header-cell", "px-4", "py-3", "text-left", "text-xs", !d && "first:rounded-tl-lg", !d && "last:rounded-tr-lg", "border-transparent", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", e.columnDef.meta?.headerClassName),
33
+ children: /* @__PURE__ */ o("span", {
34
+ className: "flex items-center gap-2 w-full",
35
+ children: [g(e.columnDef.header, f()), e.getCanSort() && /* @__PURE__ */ o("div", {
36
+ className: t("flex flex-col text-slate-400 justify-center items-center gap-1", i),
37
+ role: "presentation",
38
+ children: [/* @__PURE__ */ r(u, {
39
+ className: t("w-2 h-2 cursor-pointer", { "text-blue-600 dark:text-aurora-500": e.getIsSorted() === "asc" }, l),
40
+ onClick: () => p(e)
41
+ }), /* @__PURE__ */ r(C, {
42
+ className: t("w-2 h-2 cursor-pointer", { "text-blue-600 dark:text-aurora-500": e.getIsSorted() === "desc" }, l),
43
+ onClick: () => x(e)
44
+ })]
45
+ })]
46
+ })
47
+ }, b))
48
+ }, a))]
36
49
  });
37
50
  };
38
51
  export {
39
- y as Header
52
+ D as Header
40
53
  };
@@ -1,14 +1,14 @@
1
- import { t as f } from "../../../../utils-Cx-WzRZF.js";
2
- import { useTableContext as p } from "../../contexts/table.hook.js";
3
- import { isPaginationBarVisible as x } from "../../utils/pagination.js";
4
- import { DotPaginate as b } from "../DotPaginate/DotPaginate.js";
5
- import { DropdownPaginate as g } from "../DropdownPaginate/DropdownPaginate.js";
6
- import { FormPaginate as u } from "../FormPaginate/FormPaginate.js";
7
- import { Fragment as h, jsx as e, jsxs as t } from "react/jsx-runtime";
8
- var j = ({ showTotalItems: a = !0, showDropdownPagination: i = !0, showDotPagination: n = !0, showFormPagination: s = !0, pageSizes: l, classNamePagination: m, isLoading: o }) => {
9
- const { totalItems: r = -1 / 0, tableFetching: d, isFirstLoad: c } = p();
10
- return !x(r) || d || o ? null : /* @__PURE__ */ t(h, { children: [/* @__PURE__ */ e("div", {
11
- className: f("bg-slate-50", "border", "border-y-transparent", "border-x-slate-100", "text-slate-500", "text-sm", "not-italic", "py-2", "px-6", "rounded-b-lg", "shadow", "dark:bg-metal-800", "dark:border-x-metal-700", "dark:border-b-metal-700", m, { "animate-in fade-in-10": !c }),
1
+ import { t as x } from "../../../../utils-Cx-WzRZF.js";
2
+ import { useTableContext as g } from "../../contexts/table.hook.js";
3
+ import { isPaginationBarVisible as b } from "../../utils/pagination.js";
4
+ import { DotPaginate as u } from "../DotPaginate/DotPaginate.js";
5
+ import { DropdownPaginate as h } from "../DropdownPaginate/DropdownPaginate.js";
6
+ import { FormPaginate as v } from "../FormPaginate/FormPaginate.js";
7
+ import { Fragment as N, jsx as e, jsxs as t } from "react/jsx-runtime";
8
+ var I = ({ showTotalItems: a = !0, showDropdownPagination: i = !0, showDotPagination: n = !0, showFormPagination: s = !0, pageSizes: l, classNamePagination: o, isLoading: m, isListPortal: d, dropdownPaginationDirection: c }) => {
9
+ const { totalItems: r = -1 / 0, tableLoading: p, isFirstLoad: f } = g();
10
+ return !b(r) || p || m ? null : /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e("div", {
11
+ className: x("kvt-pagination", "bg-slate-50", "border", "border-y-transparent", "border-x-slate-100", "text-slate-500", "text-sm", "not-italic", "py-2", "px-6", "rounded-b-lg", "shadow", "dark:bg-metal-800", "dark:border-x-metal-700", "dark:border-b-metal-700", o, { "animate-in fade-in-10": !f }),
12
12
  children: /* @__PURE__ */ t("div", {
13
13
  className: "flex items-center justify-between",
14
14
  children: [/* @__PURE__ */ t("div", {
@@ -18,15 +18,19 @@ var j = ({ showTotalItems: a = !0, showDropdownPagination: i = !0, showDotPagina
18
18
  children: [r, " Results"]
19
19
  }) : null, i && /* @__PURE__ */ e("div", {
20
20
  className: "flex items-center gap-2",
21
- children: /* @__PURE__ */ e(g, { pageSizes: l })
21
+ children: /* @__PURE__ */ e(h, {
22
+ pageSizes: l,
23
+ isListPortal: d,
24
+ direction: c
25
+ })
22
26
  })]
23
27
  }), /* @__PURE__ */ t("div", {
24
28
  className: "flex items-center gap-8",
25
- children: [n && /* @__PURE__ */ e(b, {}), s && /* @__PURE__ */ e(u, {})]
29
+ children: [n && /* @__PURE__ */ e(u, {}), s && /* @__PURE__ */ e(v, {})]
26
30
  })]
27
31
  })
28
- }), /* @__PURE__ */ e("div", { className: "w-full min-h-37.5" })] });
32
+ }) });
29
33
  };
30
34
  export {
31
- j as Pagination
35
+ I as Pagination
32
36
  };
@@ -1,13 +1,13 @@
1
1
  import { t as l } from "../../../../utils-Cx-WzRZF.js";
2
- import { Button as m } from "../../../Button/Button.js";
3
- import { t as c } from "../../../../ellipsis-vertical-BBmhzIXn.js";
4
- import { useTableContext as h } from "../../contexts/table.hook.js";
2
+ import { Button as b } from "../../../Button/Button.js";
3
+ import { t as m } from "../../../../ellipsis-vertical-BBmhzIXn.js";
4
+ import { useTableContext as c } from "../../contexts/table.hook.js";
5
5
  import { jsx as r } from "react/jsx-runtime";
6
- var N = ({ numberOfRows: i, table: o }) => {
7
- const { tableFetching: n, tableLoading: b } = h(), t = Array.from({ length: i });
6
+ var y = ({ numberOfRows: i, table: o }) => {
7
+ const { tableLoading: n } = c(), t = Array.from({ length: i });
8
8
  return /* @__PURE__ */ r("tbody", {
9
- className: "text-slate-800 text-sm font-normal relative",
10
- children: t.map((g, e) => {
9
+ className: "kvt-skeleton text-slate-800 text-sm font-normal relative",
10
+ children: t.map((h, e) => {
11
11
  const d = o.getAllColumns();
12
12
  return /* @__PURE__ */ r("tr", {
13
13
  className: l("border-b", "border-b-gray-200", "bg-transparent", "last:border-b-transparent"),
@@ -25,13 +25,13 @@ var N = ({ numberOfRows: i, table: o }) => {
25
25
  "[tr:last-child_&:first-of-type]:rounded-bl-lg": e === t.length - 1 && s === 0,
26
26
  "[tr:last-child_&:last-of-type]:rounded-br-lg": e === t.length - 1 && s === d.length - 1
27
27
  }),
28
- children: /* @__PURE__ */ r(m, {
28
+ children: /* @__PURE__ */ r(b, {
29
29
  variant: "link",
30
30
  shape: "circle",
31
31
  size: "large",
32
32
  disabled: !0,
33
33
  "aria-hidden": "true",
34
- children: /* @__PURE__ */ r(c, { className: l("w-5", "h-5", "text-slate-400", "dark:text-metal-700", { "text-gray-300 animate-pulse": n || b }) })
34
+ children: /* @__PURE__ */ r(m, { className: l("w-5", "h-5", "text-slate-400", "dark:text-metal-700", { "text-gray-300 animate-pulse": n }) })
35
35
  })
36
36
  }, `skeleton-${a.id}`))
37
37
  }, `skeleton-row-${e}`);
@@ -39,5 +39,5 @@ var N = ({ numberOfRows: i, table: o }) => {
39
39
  });
40
40
  };
41
41
  export {
42
- N as Skeleton
42
+ y as Skeleton
43
43
  };