@devalok/shilp-sutra 0.27.2 → 0.29.0

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 (250) hide show
  1. package/dist/_chunks/badge-group.js +299 -0
  2. package/dist/_chunks/framer.js +1915 -1980
  3. package/dist/_chunks/keybinding.js +4 -5
  4. package/dist/_chunks/primitives.js +3198 -3272
  5. package/dist/_chunks/sonner.js +29 -31
  6. package/dist/_chunks/stat-row.js +110 -131
  7. package/dist/_chunks/tiptap.js +42 -78
  8. package/dist/_chunks/tree-view.js +138 -149
  9. package/dist/_chunks/typing-indicator.js +565 -0
  10. package/dist/_chunks/use-calendar.js +416 -439
  11. package/dist/_chunks/vendor-client.js +977 -814
  12. package/dist/_chunks/vendor-utils.js +5 -5
  13. package/dist/ai/block-renderer.js +22 -22
  14. package/dist/ai/blocks/loading.d.ts.map +1 -1
  15. package/dist/ai/command-bar.d.ts.map +1 -1
  16. package/dist/ai/command-bar.js +241 -263
  17. package/dist/ai/conversation.d.ts.map +1 -1
  18. package/dist/ai/conversation.js +87 -107
  19. package/dist/composed/activity-feed.d.ts +2 -0
  20. package/dist/composed/activity-feed.d.ts.map +1 -1
  21. package/dist/composed/activity-feed.js +118 -90
  22. package/dist/composed/avatar-group.d.ts +1 -0
  23. package/dist/composed/avatar-group.d.ts.map +1 -1
  24. package/dist/composed/avatar-group.js +91 -67
  25. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  26. package/dist/composed/bulk-action-bar.js +29 -28
  27. package/dist/composed/command-palette.d.ts.map +1 -1
  28. package/dist/composed/command-palette.js +99 -113
  29. package/dist/composed/content-card.js +1 -1
  30. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  31. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  32. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  33. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  34. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  35. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  36. package/dist/composed/deadline-indicator.js +29 -28
  37. package/dist/composed/error-boundary.d.ts.map +1 -1
  38. package/dist/composed/error-boundary.js +30 -27
  39. package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
  40. package/dist/composed/file-preview.d.ts.map +1 -1
  41. package/dist/composed/file-preview.js +261 -271
  42. package/dist/composed/filter-bar.d.ts.map +1 -1
  43. package/dist/composed/filter-bar.js +49 -48
  44. package/dist/composed/form-section.d.ts.map +1 -1
  45. package/dist/composed/form-section.js +12 -11
  46. package/dist/composed/global-loading.js +1 -1
  47. package/dist/composed/index.js +63 -63
  48. package/dist/composed/inline-edit.d.ts.map +1 -1
  49. package/dist/composed/inline-edit.js +55 -54
  50. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  51. package/dist/composed/markdown-viewer.js +44 -43
  52. package/dist/composed/master-detail.d.ts.map +1 -1
  53. package/dist/composed/master-detail.js +35 -34
  54. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  55. package/dist/composed/multi-select-popover.js +64 -64
  56. package/dist/composed/page-header.d.ts.map +1 -1
  57. package/dist/composed/page-header.js +31 -37
  58. package/dist/composed/priority-indicator.d.ts.map +1 -1
  59. package/dist/composed/priority-indicator.js +37 -36
  60. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  61. package/dist/composed/rich-text-editor.js +287 -306
  62. package/dist/composed/schedule-view.js +62 -62
  63. package/dist/composed/status-badge.d.ts +4 -2
  64. package/dist/composed/status-badge.d.ts.map +1 -1
  65. package/dist/composed/status-badge.js +58 -45
  66. package/dist/shell/app-command-palette.d.ts.map +1 -1
  67. package/dist/shell/app-command-palette.js +93 -93
  68. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  69. package/dist/shell/bottom-navbar.js +21 -20
  70. package/dist/shell/index.js +18 -18
  71. package/dist/shell/notification-center.d.ts.map +1 -1
  72. package/dist/shell/notification-center.js +96 -95
  73. package/dist/shell/notification-preferences.d.ts.map +1 -1
  74. package/dist/shell/notification-preferences.js +82 -85
  75. package/dist/shell/sidebar.js +59 -60
  76. package/dist/shell/top-bar.d.ts.map +1 -1
  77. package/dist/shell/top-bar.js +103 -103
  78. package/dist/tailwind/index.cjs +37 -4
  79. package/dist/tailwind/preset.d.ts.map +1 -1
  80. package/dist/tailwind/preset.js +38 -5
  81. package/dist/tokens/primitives.css +10 -0
  82. package/dist/tokens/semantic.css +70 -7
  83. package/dist/ui/accordion.d.ts +5 -2
  84. package/dist/ui/accordion.d.ts.map +1 -1
  85. package/dist/ui/accordion.js +44 -39
  86. package/dist/ui/alert-dialog.js +57 -57
  87. package/dist/ui/alert.d.ts +1 -1
  88. package/dist/ui/alert.d.ts.map +1 -1
  89. package/dist/ui/alert.js +30 -29
  90. package/dist/ui/aspect-ratio.js +4 -4
  91. package/dist/ui/autocomplete.js +56 -56
  92. package/dist/ui/avatar.js +2 -2
  93. package/dist/ui/badge-group.d.ts +22 -0
  94. package/dist/ui/badge-group.d.ts.map +1 -0
  95. package/dist/ui/badge-group.js +8 -0
  96. package/dist/ui/badge-indicator.d.ts +32 -0
  97. package/dist/ui/badge-indicator.d.ts.map +1 -0
  98. package/dist/ui/badge-indicator.js +54 -0
  99. package/dist/ui/badge.d.ts +27 -24
  100. package/dist/ui/badge.d.ts.map +1 -1
  101. package/dist/ui/badge.js +13 -129
  102. package/dist/ui/banner.d.ts +1 -1
  103. package/dist/ui/banner.d.ts.map +1 -1
  104. package/dist/ui/banner.js +27 -26
  105. package/dist/ui/breadcrumb.d.ts.map +1 -1
  106. package/dist/ui/breadcrumb.js +37 -36
  107. package/dist/ui/button-group.d.ts +12 -6
  108. package/dist/ui/button-group.d.ts.map +1 -1
  109. package/dist/ui/button-group.js +18 -18
  110. package/dist/ui/button-processing.d.ts +15 -0
  111. package/dist/ui/button-processing.d.ts.map +1 -0
  112. package/dist/ui/button-processing.js +77 -0
  113. package/dist/ui/button.d.ts +50 -25
  114. package/dist/ui/button.d.ts.map +1 -1
  115. package/dist/ui/button.js +243 -127
  116. package/dist/ui/card.js +20 -21
  117. package/dist/ui/charts/index.js +499 -508
  118. package/dist/ui/chat/date-separator.d.ts +12 -0
  119. package/dist/ui/chat/date-separator.d.ts.map +1 -0
  120. package/dist/ui/chat/index.d.ts +9 -0
  121. package/dist/ui/chat/index.d.ts.map +1 -0
  122. package/dist/ui/chat/index.js +12 -0
  123. package/dist/ui/chat/message-input.d.ts +16 -0
  124. package/dist/ui/chat/message-input.d.ts.map +1 -0
  125. package/dist/ui/chat/message-list.d.ts +24 -0
  126. package/dist/ui/chat/message-list.d.ts.map +1 -0
  127. package/dist/ui/chat/message.d.ts +108 -0
  128. package/dist/ui/chat/message.d.ts.map +1 -0
  129. package/dist/ui/chat/system-message.d.ts +11 -0
  130. package/dist/ui/chat/system-message.d.ts.map +1 -0
  131. package/dist/ui/chat/typing-indicator.d.ts +14 -0
  132. package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
  133. package/dist/ui/chat/unread-separator.d.ts +12 -0
  134. package/dist/ui/chat/unread-separator.d.ts.map +1 -0
  135. package/dist/ui/checkbox.js +18 -18
  136. package/dist/ui/chip.d.ts +13 -62
  137. package/dist/ui/chip.d.ts.map +1 -1
  138. package/dist/ui/chip.js +10 -109
  139. package/dist/ui/collapsible.js +4 -4
  140. package/dist/ui/color-input.d.ts +19 -5
  141. package/dist/ui/color-input.d.ts.map +1 -1
  142. package/dist/ui/color-input.js +371 -79
  143. package/dist/ui/color-swatch.js +11 -11
  144. package/dist/ui/combobox.d.ts.map +1 -1
  145. package/dist/ui/combobox.js +74 -80
  146. package/dist/ui/context-menu.d.ts.map +1 -1
  147. package/dist/ui/context-menu.js +86 -85
  148. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  149. package/dist/ui/data-table-toolbar.js +51 -57
  150. package/dist/ui/data-table.d.ts.map +1 -1
  151. package/dist/ui/data-table.js +268 -296
  152. package/dist/ui/devalok-grain.d.ts +81 -0
  153. package/dist/ui/devalok-grain.d.ts.map +1 -0
  154. package/dist/ui/devalok-grain.js +69 -0
  155. package/dist/ui/dialog.d.ts.map +1 -1
  156. package/dist/ui/dialog.js +73 -72
  157. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  158. package/dist/ui/dropdown-menu.js +93 -92
  159. package/dist/ui/file-upload.d.ts.map +1 -1
  160. package/dist/ui/file-upload.js +82 -82
  161. package/dist/ui/hover-card.js +29 -29
  162. package/dist/ui/icon-button.d.ts +7 -7
  163. package/dist/ui/icon-button.d.ts.map +1 -1
  164. package/dist/ui/icon-context.d.ts +15 -0
  165. package/dist/ui/icon-context.d.ts.map +1 -0
  166. package/dist/ui/icon-context.js +20 -0
  167. package/dist/ui/icon-group.d.ts +22 -0
  168. package/dist/ui/icon-group.d.ts.map +1 -0
  169. package/dist/ui/icon-group.js +32 -0
  170. package/dist/ui/icon.d.ts +57 -0
  171. package/dist/ui/icon.d.ts.map +1 -0
  172. package/dist/ui/icon.js +122 -0
  173. package/dist/ui/index.d.ts +8 -1
  174. package/dist/ui/index.d.ts.map +1 -1
  175. package/dist/ui/index.js +351 -329
  176. package/dist/ui/input-otp.d.ts.map +1 -1
  177. package/dist/ui/input-otp.js +21 -20
  178. package/dist/ui/input.d.ts +32 -11
  179. package/dist/ui/input.d.ts.map +1 -1
  180. package/dist/ui/input.js +149 -44
  181. package/dist/ui/label.js +1 -1
  182. package/dist/ui/lib/motion.d.ts +2 -0
  183. package/dist/ui/lib/motion.d.ts.map +1 -1
  184. package/dist/ui/lib/motion.js +13 -11
  185. package/dist/ui/lib/utils.js +1 -1
  186. package/dist/ui/menubar.d.ts.map +1 -1
  187. package/dist/ui/menubar.js +87 -86
  188. package/dist/ui/navigation-menu.d.ts.map +1 -1
  189. package/dist/ui/navigation-menu.js +23 -28
  190. package/dist/ui/number-input.d.ts.map +1 -1
  191. package/dist/ui/number-input.js +54 -53
  192. package/dist/ui/pagination.d.ts.map +1 -1
  193. package/dist/ui/pagination.js +45 -44
  194. package/dist/ui/popover.js +30 -30
  195. package/dist/ui/progress.d.ts +3 -1
  196. package/dist/ui/progress.d.ts.map +1 -1
  197. package/dist/ui/progress.js +43 -39
  198. package/dist/ui/radio.js +1 -1
  199. package/dist/ui/search-input.d.ts.map +1 -1
  200. package/dist/ui/search-input.js +47 -60
  201. package/dist/ui/segmented-control.js +1 -1
  202. package/dist/ui/select.d.ts.map +1 -1
  203. package/dist/ui/select.js +54 -53
  204. package/dist/ui/separator.js +5 -5
  205. package/dist/ui/sheet.d.ts.map +1 -1
  206. package/dist/ui/sheet.js +46 -45
  207. package/dist/ui/sidebar.d.ts.map +1 -1
  208. package/dist/ui/sidebar.js +196 -193
  209. package/dist/ui/skeleton.js +1 -1
  210. package/dist/ui/slider.js +1 -1
  211. package/dist/ui/spinner.js +74 -74
  212. package/dist/ui/stat-card.d.ts.map +1 -1
  213. package/dist/ui/stat-card.js +85 -86
  214. package/dist/ui/switch.d.ts +3 -0
  215. package/dist/ui/switch.d.ts.map +1 -1
  216. package/dist/ui/switch.js +40 -26
  217. package/dist/ui/tabs.js +43 -43
  218. package/dist/ui/text.js +1 -1
  219. package/dist/ui/textarea.js +10 -10
  220. package/dist/ui/toast.d.ts.map +1 -1
  221. package/dist/ui/toast.js +169 -169
  222. package/dist/ui/toggle-group.js +1 -1
  223. package/dist/ui/toggle.js +5 -5
  224. package/dist/ui/tooltip.js +41 -41
  225. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  226. package/docs/components/_header.md +4 -4
  227. package/docs/components/composed/activity-feed.md +7 -0
  228. package/docs/components/composed/avatar-group.md +8 -5
  229. package/docs/components/composed/status-badge.md +14 -1
  230. package/docs/components/ui/accordion.md +5 -2
  231. package/docs/components/ui/badge-group.md +38 -0
  232. package/docs/components/ui/badge-indicator.md +40 -0
  233. package/docs/components/ui/badge.md +36 -5
  234. package/docs/components/ui/button-processing.md +15 -0
  235. package/docs/components/ui/button.md +40 -11
  236. package/docs/components/ui/chat.md +214 -0
  237. package/docs/components/ui/color-input.md +58 -4
  238. package/docs/components/ui/data-table.md +3 -0
  239. package/docs/components/ui/devalok-grain.md +55 -0
  240. package/docs/components/ui/icon-button.md +12 -5
  241. package/docs/components/ui/icon-context.md +38 -0
  242. package/docs/components/ui/icon-group.md +36 -0
  243. package/docs/components/ui/icon.md +47 -0
  244. package/docs/components/ui/input.md +32 -6
  245. package/docs/components/ui/progress.md +5 -0
  246. package/docs/components/ui/spinner.md +3 -0
  247. package/docs/components/ui/switch.md +13 -0
  248. package/llms-full.txt +724 -44
  249. package/llms.txt +38 -19
  250. package/package.json +8 -2
@@ -1,50 +1,50 @@
1
1
  "use client";
2
2
  import { jsxs as d, jsx as n } from "react/jsx-runtime";
3
- import st, { useState as f, useRef as V, useEffect as I, useCallback as $, useMemo as lt } from "react";
4
- import { useReactTable as ot, getExpandedRowModel as at, getPaginationRowModel as rt, getFilteredRowModel as ct, getSortedRowModel as it, getCoreRowModel as dt, flexRender as te } from "@tanstack/react-table";
3
+ import st, { useState as u, useRef as D, useEffect as E, useCallback as M, useMemo as lt } from "react";
4
+ import { useReactTable as at, getExpandedRowModel as ot, getPaginationRowModel as rt, getFilteredRowModel as it, getSortedRowModel as ct, getCoreRowModel as dt, flexRender as Z } from "@tanstack/react-table";
5
5
  import { useVirtualizer as ut } from "@tanstack/react-virtual";
6
- import { IconArrowUp as ft, IconArrowDown as mt, IconArrowsSort as gt, IconSearch as pt, IconChevronLeft as ht, IconChevronRight as we, IconX as bt } from "@tabler/icons-react";
7
- import { Table as xt, TableHeader as yt, TableRow as z, TableHead as Ne, TableBody as A, TableCell as O } from "./table.js";
8
- import { Button as St } from "./button.js";
9
- import { Checkbox as ke } from "./checkbox.js";
6
+ import { IconArrowUp as ft, IconArrowDown as mt, IconArrowsSort as gt, IconSearch as pt, IconChevronLeft as ht, IconChevronRight as Se, IconX as bt } from "@tabler/icons-react";
7
+ import { Icon as h } from "./icon.js";
8
+ import { Table as xt, TableHeader as yt, TableRow as z, TableHead as Ne, TableBody as P, TableCell as _ } from "./table.js";
9
+ import { Button as Ct } from "./button.js";
10
+ import { Checkbox as we } from "./checkbox.js";
10
11
  import { Skeleton as Re } from "./skeleton.js";
11
12
  import { cn as a } from "./lib/utils.js";
12
- import { springs as ne } from "./lib/motion.js";
13
- import { DataTableToolbar as Ct } from "./data-table-toolbar.js";
14
- import { A as wt, m as se } from "../_chunks/framer.js";
15
- function De(m) {
16
- if (!m) return "";
17
- const r = [];
18
- return m.align === "right" && r.push("text-right tabular-nums"), m.align === "center" && r.push("text-center"), m.hideBelow === "sm" && r.push("hidden sm:table-cell"), m.hideBelow === "md" && r.push("hidden md:table-cell"), m.hideBelow === "lg" && r.push("hidden lg:table-cell"), r.join(" ");
13
+ import { springs as ee } from "./lib/motion.js";
14
+ import { DataTableToolbar as St } from "./data-table-toolbar.js";
15
+ import { A as Nt, m as te } from "../_chunks/framer.js";
16
+ function ke(f) {
17
+ if (!f) return "";
18
+ const o = [];
19
+ return f.align === "right" && o.push("text-right tabular-nums"), f.align === "center" && o.push("text-center"), f.hideBelow === "sm" && o.push("hidden sm:table-cell"), f.hideBelow === "md" && o.push("hidden md:table-cell"), f.hideBelow === "lg" && o.push("hidden lg:table-cell"), o.join(" ");
19
20
  }
20
- const Nt = {
21
+ const wt = {
21
22
  compact: "py-ds-02",
22
23
  standard: "py-ds-05",
23
24
  comfortable: "py-ds-07"
24
25
  };
25
- function kt({
26
- initialValue: m,
27
- onSave: r,
28
- onCancel: K
26
+ function Rt({
27
+ initialValue: f,
28
+ onSave: o,
29
+ onCancel: B
29
30
  }) {
30
- const [E, C] = f(m), h = V(null);
31
- I(() => {
32
- var u, F;
33
- (u = h.current) == null || u.focus(), (F = h.current) == null || F.select();
31
+ const [I, N] = u(f), b = D(null);
32
+ E(() => {
33
+ b.current?.focus(), b.current?.select();
34
34
  }, []);
35
- const b = $(() => {
36
- r(E);
37
- }, [r, E]);
35
+ const x = M(() => {
36
+ o(I);
37
+ }, [o, I]);
38
38
  return /* @__PURE__ */ n(
39
39
  "input",
40
40
  {
41
- ref: h,
41
+ ref: b,
42
42
  type: "text",
43
- value: E,
44
- onChange: (u) => C(u.target.value),
45
- onBlur: b,
46
- onKeyDown: (u) => {
47
- u.key === "Enter" ? (u.preventDefault(), b()) : u.key === "Escape" && (u.preventDefault(), K());
43
+ value: I,
44
+ onChange: (g) => N(g.target.value),
45
+ onBlur: x,
46
+ onKeyDown: (g) => {
47
+ g.key === "Enter" ? (g.preventDefault(), x()) : g.key === "Escape" && (g.preventDefault(), B());
48
48
  },
49
49
  className: a(
50
50
  "h-ds-xs-plus w-full rounded-ds-md",
@@ -57,98 +57,98 @@ function kt({
57
57
  }
58
58
  );
59
59
  }
60
- const Rt = 'button, a, input, select, textarea, [role="checkbox"]';
61
- function Dt({
62
- columns: m,
63
- data: r,
64
- className: K,
65
- noResultsText: E,
66
- sortable: C = !1,
67
- filterable: h = !1,
68
- globalFilter: b = !1,
69
- paginated: u = !1,
70
- pageSize: F,
60
+ const kt = 'button, a, input, select, textarea, [role="checkbox"]';
61
+ function zt({
62
+ columns: f,
63
+ data: o,
64
+ className: B,
65
+ noResultsText: I,
66
+ sortable: N = !1,
67
+ filterable: b = !1,
68
+ globalFilter: x = !1,
69
+ paginated: g = !1,
70
+ pageSize: ne,
71
71
  pageSizeOptions: ze,
72
72
  selectable: w = !1,
73
- onSelectionChange: G,
74
- toolbar: le = !1,
75
- density: Ie = "standard",
76
- columnPinning: N,
73
+ onSelectionChange: H,
74
+ toolbar: se = !1,
75
+ density: De = "standard",
76
+ columnPinning: le,
77
77
  editable: Ee = !1,
78
- onCellEdit: L,
79
- expandable: _ = !1,
80
- renderExpanded: oe,
81
- virtualRows: x = !1,
82
- virtualRowHeight: Fe = 48,
83
- maxHeight: Te = 600,
84
- onSort: T,
85
- emptyState: ae,
86
- loading: Me = !1,
87
- selectedIds: Y,
78
+ onCellEdit: Ie,
79
+ expandable: j = !1,
80
+ renderExpanded: ae,
81
+ virtualRows: y = !1,
82
+ virtualRowHeight: ve = 48,
83
+ maxHeight: Fe = 600,
84
+ onSort: v,
85
+ emptyState: oe,
86
+ loading: Te = !1,
87
+ selectedIds: A,
88
88
  selectableFilter: re,
89
89
  getRowId: p,
90
- pagination: l,
91
- singleExpand: U = !1,
92
- stickyHeader: je = !1,
93
- onRowClick: M,
94
- bulkActions: B
90
+ pagination: r,
91
+ singleExpand: O = !1,
92
+ stickyHeader: Me = !1,
93
+ onRowClick: F,
94
+ bulkActions: V
95
95
  }) {
96
- const [Ve, ce] = f([]), [$e, _e] = f([]), [W, X] = f(""), [Be, q] = f({
97
- pageIndex: l ? l.page - 1 : 0,
98
- pageSize: (l == null ? void 0 : l.pageSize) ?? F ?? 10
99
- }), [y, ie] = f({}), [He, Ae] = f({}), [de, Oe] = f({
100
- left: (N == null ? void 0 : N.left) ?? [],
101
- right: (N == null ? void 0 : N.right) ?? []
102
- }), [ue, Ke] = f(Ie), [k, J] = f(null), [Ge, fe] = f({}), me = V(null), Q = V(!1);
103
- I(() => {
104
- if (Y) {
105
- Q.current = !0;
96
+ const [je, ie] = u([]), [Ve, $e] = u([]), [K, G] = u(""), [Pe, L] = u({
97
+ pageIndex: r ? r.page - 1 : 0,
98
+ pageSize: r?.pageSize ?? ne ?? 10
99
+ }), [C, ce] = u({}), [_e, Be] = u({}), [de, He] = u({
100
+ left: le?.left ?? [],
101
+ right: le?.right ?? []
102
+ }), [ue, Ae] = u(De), [fe, Y] = u(null), [Oe, me] = u({}), ge = D(null), U = D(!1);
103
+ E(() => {
104
+ if (A) {
105
+ U.current = !0;
106
106
  const e = {};
107
- Y.forEach((t) => {
107
+ A.forEach((t) => {
108
108
  e[t] = !0;
109
- }), ie(e);
109
+ }), ce(e);
110
110
  }
111
- }, [Y]), I(() => {
112
- l && q((e) => ({
111
+ }, [A]), E(() => {
112
+ r && L((e) => ({
113
113
  ...e,
114
- pageIndex: l.page - 1,
115
- pageSize: l.pageSize
114
+ pageIndex: r.page - 1,
115
+ pageSize: r.pageSize
116
116
  }));
117
- }, [l == null ? void 0 : l.page, l == null ? void 0 : l.pageSize]);
118
- const Le = $(
117
+ }, [r?.page, r?.pageSize]);
118
+ const Ke = M(
119
119
  (e) => {
120
- ce((t) => {
120
+ ie((t) => {
121
121
  const s = typeof e == "function" ? e(t) : e;
122
- return T && (s.length === 0 && t.length > 0 ? T(t[0].id, !1) : s.length > 0 && T(s[0].id, s[0].desc ? "desc" : "asc")), s;
122
+ return v && (s.length === 0 && t.length > 0 ? v(t[0].id, !1) : s.length > 0 && v(s[0].id, s[0].desc ? "desc" : "asc")), s;
123
123
  });
124
124
  },
125
- [T]
126
- ), Ye = $(
125
+ [v]
126
+ ), Ge = M(
127
127
  (e) => {
128
- fe((t) => {
128
+ me((t) => {
129
129
  const s = typeof e == "function" ? e(t) : e;
130
- if (!U || s === !0 || typeof s != "object") return s;
131
- const o = typeof t == "object" ? Object.keys(t).filter((g) => t[g]) : [], D = Object.keys(s).filter((g) => s[g]).filter((g) => !o.includes(g));
132
- return D.length > 0 ? { [D[D.length - 1]]: !0 } : s;
130
+ if (!O || s === !0 || typeof s != "object") return s;
131
+ const l = typeof t == "object" ? Object.keys(t).filter((m) => t[m]) : [], k = Object.keys(s).filter((m) => s[m]).filter((m) => !l.includes(m));
132
+ return k.length > 0 ? { [k[k.length - 1]]: !0 } : s;
133
133
  });
134
134
  },
135
- [U]
136
- ), Z = V(l == null ? void 0 : l.onPageChange);
137
- I(() => {
138
- Z.current = l == null ? void 0 : l.onPageChange;
139
- }, [l == null ? void 0 : l.onPageChange]);
140
- const Ue = $(
135
+ [O]
136
+ ), W = D(r?.onPageChange);
137
+ E(() => {
138
+ W.current = r?.onPageChange;
139
+ }, [r?.onPageChange]);
140
+ const Le = M(
141
141
  (e) => {
142
- q((t) => {
142
+ L((t) => {
143
143
  const s = typeof e == "function" ? e(t) : e;
144
- return Z.current && s.pageIndex !== t.pageIndex && Z.current(s.pageIndex + 1), s;
144
+ return W.current && s.pageIndex !== t.pageIndex && W.current(s.pageIndex + 1), s;
145
145
  });
146
146
  },
147
147
  []
148
- ), We = {
148
+ ), Ye = {
149
149
  id: "_select",
150
150
  header: ({ table: e }) => /* @__PURE__ */ n(
151
- ke,
151
+ we,
152
152
  {
153
153
  checked: e.getIsAllPageRowsSelected(),
154
154
  indeterminate: e.getIsSomePageRowsSelected(),
@@ -157,7 +157,7 @@ function Dt({
157
157
  }
158
158
  ),
159
159
  cell: ({ row: e }) => /* @__PURE__ */ n(
160
- ke,
160
+ we,
161
161
  {
162
162
  checked: e.getIsSelected(),
163
163
  disabled: !e.getCanSelect(),
@@ -168,7 +168,7 @@ function Dt({
168
168
  enableSorting: !1,
169
169
  enableColumnFilter: !1,
170
170
  enableHiding: !1
171
- }, Xe = {
171
+ }, Ue = {
172
172
  id: "_expand",
173
173
  header: () => null,
174
174
  cell: ({ row: e }) => /* @__PURE__ */ n(
@@ -179,14 +179,14 @@ function Dt({
179
179
  "aria-label": e.getIsExpanded() ? "Collapse row" : "Expand row",
180
180
  className: "flex items-center justify-center p-ds-01 rounded-ds-sm hover:bg-surface-raised transition-colors",
181
181
  children: /* @__PURE__ */ n(
182
- we,
182
+ h,
183
183
  {
184
- size: 16,
184
+ icon: Se,
185
+ size: "sm",
185
186
  className: a(
186
187
  "transition-transform duration-moderate-02",
187
188
  e.getIsExpanded() && "rotate-90"
188
- ),
189
- "aria-hidden": "true"
189
+ )
190
190
  }
191
191
  )
192
192
  }
@@ -195,94 +195,92 @@ function Dt({
195
195
  enableColumnFilter: !1,
196
196
  enableHiding: !1
197
197
  }, R = [
198
- ...w ? [We] : [],
199
- ..._ ? [Xe] : [],
200
- ...m
201
- ], j = !!l, v = u || j, S = {
202
- columnVisibility: He,
198
+ ...w ? [Ye] : [],
199
+ ...j ? [Ue] : [],
200
+ ...f
201
+ ], T = !!r, X = g || T, S = {
202
+ columnVisibility: _e,
203
203
  columnPinning: de
204
204
  };
205
- C && (S.sorting = Ve), (h || b) && (S.columnFilters = $e, S.globalFilter = W), v && (S.pagination = Be), w && (S.rowSelection = y), _ && (S.expanded = Ge);
206
- const ge = C && !!T, c = ot({
207
- data: r,
205
+ N && (S.sorting = je), (b || x) && (S.columnFilters = Ve, S.globalFilter = K), X && (S.pagination = Pe), w && (S.rowSelection = C), j && (S.expanded = Oe);
206
+ const pe = N && !!v, i = at({
207
+ data: o,
208
208
  columns: R,
209
209
  state: S,
210
- onColumnVisibilityChange: Ae,
211
- onColumnPinningChange: Oe,
210
+ onColumnVisibilityChange: Be,
211
+ onColumnPinningChange: He,
212
212
  getCoreRowModel: dt(),
213
- ...C && {
214
- onSortingChange: ge ? Le : ce,
215
- ...ge ? { manualSorting: !0 } : { getSortedRowModel: it() }
213
+ ...N && {
214
+ onSortingChange: pe ? Ke : ie,
215
+ ...pe ? { manualSorting: !0 } : { getSortedRowModel: ct() }
216
216
  },
217
- ...(h || b) && {
218
- onColumnFiltersChange: _e,
219
- onGlobalFilterChange: X,
220
- getFilteredRowModel: ct()
217
+ ...(b || x) && {
218
+ onColumnFiltersChange: $e,
219
+ onGlobalFilterChange: G,
220
+ getFilteredRowModel: it()
221
221
  },
222
- ...v && {
223
- onPaginationChange: j ? Ue : q,
224
- ...j ? {
222
+ ...X && {
223
+ onPaginationChange: T ? Le : L,
224
+ ...T ? {
225
225
  manualPagination: !0,
226
226
  pageCount: Math.ceil(
227
- l.total / l.pageSize
227
+ r.total / r.pageSize
228
228
  )
229
229
  } : { getPaginationRowModel: rt() }
230
230
  },
231
231
  ...w && {
232
- onRowSelectionChange: ie,
232
+ onRowSelectionChange: ce,
233
233
  enableRowSelection: re ? (e) => re(e.original) : !0
234
234
  },
235
- ..._ && {
236
- onExpandedChange: U ? Ye : fe,
237
- getExpandedRowModel: at()
235
+ ...j && {
236
+ onExpandedChange: O ? Ge : me,
237
+ getExpandedRowModel: ot()
238
238
  },
239
239
  ...p && {
240
240
  getRowId: (e) => p(e)
241
241
  }
242
- }), P = V(G);
243
- I(() => {
244
- P.current = G;
245
- }, [G]), I(() => {
246
- if (Q.current) {
247
- Q.current = !1;
242
+ }), q = D(H), J = D(p);
243
+ E(() => {
244
+ q.current = H, J.current = p;
245
+ }, [H, p]), E(() => {
246
+ if (U.current) {
247
+ U.current = !1;
248
248
  return;
249
249
  }
250
- if (!P.current) return;
251
- const e = Object.keys(y).filter((s) => y[s]), t = r.filter((s, o) => {
252
- const i = p ? p(r[o]) : String(o);
253
- return e.includes(i);
250
+ if (!q.current) return;
251
+ const e = Object.keys(C).filter((s) => C[s]), t = o.filter((s, l) => {
252
+ const c = J.current ? J.current(o[l]) : String(l);
253
+ return e.includes(c);
254
254
  });
255
- P.current(t);
256
- }, [y, r, p]);
257
- function pe(e) {
258
- const { left: t = [], right: s = [] } = de, o = t.indexOf(e), i = s.indexOf(e);
259
- return o !== -1 ? {
255
+ q.current(t);
256
+ }, [C, o]);
257
+ function he(e) {
258
+ const { left: t = [], right: s = [] } = de, l = t.indexOf(e), c = s.indexOf(e);
259
+ return l !== -1 ? {
260
260
  className: "sticky bg-surface-base z-raised",
261
261
  style: { left: 0 }
262
- } : i !== -1 ? {
262
+ } : c !== -1 ? {
263
263
  className: "sticky bg-surface-base z-raised",
264
264
  style: { right: 0 }
265
265
  } : { className: "", style: {} };
266
266
  }
267
- function qe(e) {
267
+ function We(e) {
268
268
  if (!Ee || e === "_select" || e === "_expand") return !1;
269
- const t = c.getColumn(e);
270
- if (!t) return !1;
271
- const s = t.columnDef.meta;
272
- return (s == null ? void 0 : s.enableEditing) !== !1;
269
+ const t = i.getColumn(e);
270
+ return !(!t || t.columnDef.meta?.enableEditing === !1);
273
271
  }
274
- const he = Nt[ue], H = c.getRowModel().rows, be = ut({
275
- count: x ? H.length : 0,
276
- getScrollElement: () => me.current,
277
- estimateSize: () => Fe,
272
+ const be = wt[ue], $ = i.getRowModel().rows, xe = ut({
273
+ count: y ? $.length : 0,
274
+ getScrollElement: () => ge.current,
275
+ estimateSize: () => ve,
278
276
  overscan: 10
279
- }), Je = (l == null ? void 0 : l.pageSize) ?? F ?? 5, Qe = R.length, Ze = $(
277
+ }), Xe = r?.pageSize ?? ne ?? 5, qe = R.length, Je = M(
280
278
  (e, t) => {
281
- !M || t.target.closest(Rt) || M(e);
279
+ !F || t.target.closest(kt) || F(e);
282
280
  },
283
- [M]
281
+ [F]
284
282
  );
285
- function xe(e, t) {
283
+ function ye(e, t) {
286
284
  const s = e.getVisibleCells();
287
285
  return /* @__PURE__ */ n(
288
286
  z,
@@ -290,109 +288,108 @@ function Dt({
290
288
  "data-state": e.getIsSelected() && "selected",
291
289
  style: t,
292
290
  className: a(
293
- x ? "absolute w-full flex" : void 0,
294
- M && "cursor-pointer"
291
+ y ? "absolute w-full flex" : void 0,
292
+ F && "cursor-pointer"
295
293
  ),
296
- onClick: M ? (o) => Ze(e.original, o) : void 0,
297
- children: s.map((o) => {
298
- const i = pe(o.column.id), D = (k == null ? void 0 : k.rowIndex) === e.index && (k == null ? void 0 : k.columnId) === o.column.id;
294
+ onClick: F ? (l) => Je(e.original, l) : void 0,
295
+ children: s.map((l) => {
296
+ const c = he(l.column.id), k = fe?.rowIndex === e.index && fe?.columnId === l.column.id;
299
297
  return /* @__PURE__ */ n(
300
- O,
298
+ _,
301
299
  {
302
300
  className: a(
303
- he,
304
- i.className,
305
- x && "flex-1",
306
- De(o.column.columnDef.meta)
301
+ be,
302
+ c.className,
303
+ y && "flex-1",
304
+ ke(l.column.columnDef.meta)
307
305
  ),
308
- style: i.style,
306
+ style: c.style,
309
307
  onDoubleClick: () => {
310
- qe(o.column.id) && J({
308
+ We(l.column.id) && Y({
311
309
  rowIndex: e.index,
312
- columnId: o.column.id
310
+ columnId: l.column.id
313
311
  });
314
312
  },
315
- children: D ? /* @__PURE__ */ n(
316
- kt,
313
+ children: k ? /* @__PURE__ */ n(
314
+ Rt,
317
315
  {
318
- initialValue: String(o.getValue() ?? ""),
319
- onSave: (g) => {
320
- L == null || L(e.index, o.column.id, g), J(null);
316
+ initialValue: String(l.getValue() ?? ""),
317
+ onSave: (m) => {
318
+ Ie?.(e.index, l.column.id, m), Y(null);
321
319
  },
322
- onCancel: () => J(null)
320
+ onCancel: () => Y(null)
323
321
  }
324
- ) : te(o.column.columnDef.cell, o.getContext())
322
+ ) : Z(l.column.columnDef.cell, l.getContext())
325
323
  },
326
- o.id
324
+ l.id
327
325
  );
328
326
  })
329
327
  },
330
328
  e.id
331
329
  );
332
330
  }
333
- function ve(e, t) {
334
- return !_ || !e.getIsExpanded() || !oe ? null : /* @__PURE__ */ n(
331
+ function Qe(e, t) {
332
+ return !j || !e.getIsExpanded() || !ae ? null : /* @__PURE__ */ n(
335
333
  z,
336
334
  {
337
335
  style: t,
338
- className: x ? "absolute w-full flex" : void 0,
336
+ className: y ? "absolute w-full flex" : void 0,
339
337
  children: /* @__PURE__ */ n(
340
- O,
338
+ _,
341
339
  {
342
340
  colSpan: R.length,
343
341
  className: a(
344
342
  "bg-surface-raised p-ds-05",
345
- x && "flex-1"
343
+ y && "flex-1"
346
344
  ),
347
- children: oe(e.original)
345
+ children: ae(e.original)
348
346
  }
349
347
  )
350
348
  },
351
349
  `${e.id}-expanded`
352
350
  );
353
351
  }
354
- function Pe() {
352
+ function Ze() {
355
353
  const e = ["w-3/4", "w-1/2", "w-2/3", "w-full"];
356
- return /* @__PURE__ */ n(A, { children: Array.from({ length: Je }, (t, s) => /* @__PURE__ */ n(z, { children: Array.from({ length: Qe }, (o, i) => {
357
- var Se, Ce;
358
- const g = (((Se = R[i]) == null ? void 0 : Se.id) ?? ((Ce = R[i]) == null ? void 0 : Ce.header)) === "_select";
354
+ return /* @__PURE__ */ n(P, { children: Array.from({ length: Xe }, (t, s) => /* @__PURE__ */ n(z, { children: Array.from({ length: qe }, (l, c) => {
355
+ const m = (R[c]?.id ?? R[c]?.header) === "_select";
359
356
  return /* @__PURE__ */ n(
360
- O,
357
+ _,
361
358
  {
362
- className: he,
363
- children: g ? /* @__PURE__ */ n(Re, { variant: "text", className: "h-4 w-4", animation: "pulse" }) : /* @__PURE__ */ n(Re, { variant: "text", className: a("h-4", e[i % e.length]), animation: "pulse" })
359
+ className: be,
360
+ children: m ? /* @__PURE__ */ n(Re, { variant: "text", className: "h-4 w-4", animation: "pulse" }) : /* @__PURE__ */ n(Re, { variant: "text", className: a("h-4", e[c % e.length]), animation: "pulse" })
364
361
  },
365
- `skeleton-${s}-${i}`
362
+ `skeleton-${s}-${c}`
366
363
  );
367
364
  }) }, `skeleton-${s}`)) });
368
365
  }
369
366
  function et() {
370
- if (Me)
371
- return Pe();
372
- if (!H.length)
373
- return /* @__PURE__ */ n(A, { children: /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(
374
- O,
367
+ if (Te)
368
+ return Ze();
369
+ if (!$.length)
370
+ return /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(
371
+ _,
375
372
  {
376
373
  colSpan: R.length,
377
374
  className: a(
378
375
  "h-24 text-center",
379
- !ae && "text-surface-fg-subtle"
376
+ !oe && "text-surface-fg-subtle"
380
377
  ),
381
- children: ae || E || "No results."
378
+ children: oe || I || "No results."
382
379
  }
383
380
  ) }) });
384
- if (x) {
385
- const e = be.getVirtualItems(), t = be.getTotalSize();
381
+ if (y) {
382
+ const e = xe.getVirtualItems(), t = xe.getTotalSize();
386
383
  return /* @__PURE__ */ n(
387
- A,
384
+ P,
388
385
  {
389
386
  style: {
390
387
  height: `${t}px`,
391
388
  position: "relative"
392
389
  },
393
390
  children: e.map((s) => {
394
- const o = H[s.index];
395
- return xe(o, {
391
+ const l = $[s.index];
392
+ return ye(l, {
396
393
  position: "absolute",
397
394
  top: 0,
398
395
  left: 0,
@@ -404,33 +401,33 @@ function Dt({
404
401
  }
405
402
  );
406
403
  }
407
- return /* @__PURE__ */ n(A, { children: H.map((e) => /* @__PURE__ */ d(st.Fragment, { children: [
408
- xe(e),
409
- ve(e)
404
+ return /* @__PURE__ */ n(P, { children: $.map((e) => /* @__PURE__ */ d(st.Fragment, { children: [
405
+ ye(e),
406
+ Qe(e)
410
407
  ] }, e.id)) });
411
408
  }
412
- const ee = lt(() => {
413
- if (!B || !w) return [];
414
- const e = Object.keys(y).filter((t) => y[t]);
415
- return r.filter((t, s) => {
416
- const o = p ? p(r[s]) : String(s);
417
- return e.includes(o);
409
+ const Q = lt(() => {
410
+ if (!V || !w) return [];
411
+ const e = Object.keys(C).filter((t) => C[t]);
412
+ return o.filter((t, s) => {
413
+ const l = p ? p(o[s]) : String(s);
414
+ return e.includes(l);
418
415
  });
419
- }, [B, w, y, r, p]), tt = ee.length > 0, nt = j ? l.total : c.getFilteredRowModel().rows.length, ye = /* @__PURE__ */ d(xt, { children: [
416
+ }, [V, w, C, o, p]), tt = Q.length > 0, nt = T ? r.total : i.getFilteredRowModel().rows.length, Ce = /* @__PURE__ */ d(xt, { children: [
420
417
  /* @__PURE__ */ d(
421
418
  yt,
422
419
  {
423
420
  className: a(
424
- je && "sticky top-0 z-10 bg-surface-base"
421
+ Me && "sticky top-0 z-10 bg-surface-base"
425
422
  ),
426
423
  children: [
427
- c.getHeaderGroups().map((e) => /* @__PURE__ */ n(z, { children: e.headers.map((t) => {
428
- const s = C && t.column.getCanSort(), o = t.column.getIsSorted(), i = pe(t.column.id);
424
+ i.getHeaderGroups().map((e) => /* @__PURE__ */ n(z, { children: e.headers.map((t) => {
425
+ const s = N && t.column.getCanSort(), l = t.column.getIsSorted(), c = he(t.column.id);
429
426
  return /* @__PURE__ */ n(
430
427
  Ne,
431
428
  {
432
- className: a(i.className, De(t.column.columnDef.meta)),
433
- style: i.style,
429
+ className: a(c.className, ke(t.column.columnDef.meta)),
430
+ style: c.style,
434
431
  children: t.isPlaceholder ? null : s ? /* @__PURE__ */ d(
435
432
  "button",
436
433
  {
@@ -444,65 +441,47 @@ function Dt({
444
441
  onClick: t.column.getToggleSortingHandler(),
445
442
  "aria-label": `Sort by ${typeof t.column.columnDef.header == "string" ? t.column.columnDef.header : t.column.id}`,
446
443
  children: [
447
- te(
444
+ Z(
448
445
  t.column.columnDef.header,
449
446
  t.getContext()
450
447
  ),
451
- /* @__PURE__ */ n(wt, { mode: "wait", initial: !1, children: o === "asc" ? /* @__PURE__ */ n(
452
- se.span,
448
+ /* @__PURE__ */ n(Nt, { mode: "wait", initial: !1, children: l === "asc" ? /* @__PURE__ */ n(
449
+ te.span,
453
450
  {
454
451
  initial: { opacity: 0, rotate: 90 },
455
452
  animate: { opacity: 1, rotate: 0 },
456
453
  exit: { opacity: 0, rotate: -90 },
457
- transition: ne.snappy,
454
+ transition: ee.snappy,
458
455
  className: "inline-flex",
459
- children: /* @__PURE__ */ n(
460
- ft,
461
- {
462
- className: "h-ico-sm w-ico-sm text-surface-fg-muted",
463
- "aria-hidden": "true"
464
- }
465
- )
456
+ children: /* @__PURE__ */ n(h, { icon: ft, size: "sm", className: "text-surface-fg-muted" })
466
457
  },
467
458
  "asc"
468
- ) : o === "desc" ? /* @__PURE__ */ n(
469
- se.span,
459
+ ) : l === "desc" ? /* @__PURE__ */ n(
460
+ te.span,
470
461
  {
471
462
  initial: { opacity: 0, rotate: -90 },
472
463
  animate: { opacity: 1, rotate: 0 },
473
464
  exit: { opacity: 0, rotate: 90 },
474
- transition: ne.snappy,
465
+ transition: ee.snappy,
475
466
  className: "inline-flex",
476
- children: /* @__PURE__ */ n(
477
- mt,
478
- {
479
- className: "h-ico-sm w-ico-sm text-surface-fg-muted",
480
- "aria-hidden": "true"
481
- }
482
- )
467
+ children: /* @__PURE__ */ n(h, { icon: mt, size: "sm", className: "text-surface-fg-muted" })
483
468
  },
484
469
  "desc"
485
470
  ) : /* @__PURE__ */ n(
486
- se.span,
471
+ te.span,
487
472
  {
488
473
  initial: { opacity: 0 },
489
474
  animate: { opacity: 1 },
490
475
  exit: { opacity: 0 },
491
- transition: ne.snappy,
476
+ transition: ee.snappy,
492
477
  className: "inline-flex",
493
- children: /* @__PURE__ */ n(
494
- gt,
495
- {
496
- className: "h-ico-sm w-ico-sm text-surface-fg-subtle",
497
- "aria-hidden": "true"
498
- }
499
- )
478
+ children: /* @__PURE__ */ n(h, { icon: gt, size: "sm", className: "text-surface-fg-subtle" })
500
479
  },
501
480
  "unsorted"
502
481
  ) })
503
482
  ]
504
483
  }
505
- ) : te(
484
+ ) : Z(
506
485
  t.column.columnDef.header,
507
486
  t.getContext()
508
487
  )
@@ -510,7 +489,7 @@ function Dt({
510
489
  t.id
511
490
  );
512
491
  }) }, e.id)),
513
- h && c.getHeaderGroups().map((e) => /* @__PURE__ */ n(z, { children: e.headers.map((t) => /* @__PURE__ */ n(Ne, { className: "py-ds-01", children: t.isPlaceholder || t.column.columnDef.enableColumnFilter === !1 ? null : /* @__PURE__ */ n(
492
+ b && i.getHeaderGroups().map((e) => /* @__PURE__ */ n(z, { children: e.headers.map((t) => /* @__PURE__ */ n(Ne, { className: "py-ds-01", children: t.isPlaceholder || t.column.columnDef.enableColumnFilter === !1 ? null : /* @__PURE__ */ n(
514
493
  "input",
515
494
  {
516
495
  type: "text",
@@ -532,33 +511,26 @@ function Dt({
532
511
  ),
533
512
  et()
534
513
  ] });
535
- return /* @__PURE__ */ d("div", { className: a(K), children: [
536
- le && /* @__PURE__ */ n(
537
- Ct,
514
+ return /* @__PURE__ */ d("div", { className: a(B), children: [
515
+ se && /* @__PURE__ */ n(
516
+ St,
538
517
  {
539
- table: c,
540
- globalFilter: b,
541
- globalFilterValue: W,
542
- onGlobalFilterChange: X,
518
+ table: i,
519
+ globalFilter: x,
520
+ globalFilterValue: K,
521
+ onGlobalFilterChange: G,
543
522
  density: ue,
544
- onDensityChange: Ke
523
+ onDensityChange: Ae
545
524
  }
546
525
  ),
547
- b && !le && /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-03 pb-ds-04 border-b border-surface-border mb-ds-04", children: [
548
- /* @__PURE__ */ n(
549
- pt,
550
- {
551
- size: 16,
552
- className: "text-surface-fg-subtle",
553
- "aria-hidden": "true"
554
- }
555
- ),
526
+ x && !se && /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-03 pb-ds-04 border-b border-surface-border mb-ds-04", children: [
527
+ /* @__PURE__ */ n(h, { icon: pt, size: "sm", className: "text-surface-fg-subtle" }),
556
528
  /* @__PURE__ */ n(
557
529
  "input",
558
530
  {
559
531
  type: "text",
560
- value: W,
561
- onChange: (e) => X(e.target.value),
532
+ value: K,
533
+ onChange: (e) => G(e.target.value),
562
534
  placeholder: "Search all columns...",
563
535
  "aria-label": "Search all columns",
564
536
  className: a(
@@ -569,26 +541,26 @@ function Dt({
569
541
  }
570
542
  )
571
543
  ] }),
572
- x ? /* @__PURE__ */ n(
544
+ y ? /* @__PURE__ */ n(
573
545
  "div",
574
546
  {
575
- ref: me,
576
- style: { maxHeight: `${Te}px`, overflowY: "auto" },
577
- children: ye
547
+ ref: ge,
548
+ style: { maxHeight: `${Fe}px`, overflowY: "auto" },
549
+ children: Ce
578
550
  }
579
- ) : ye,
580
- v && /* @__PURE__ */ d("div", { className: "flex items-center justify-between px-ds-03 py-ds-04 border-t border-surface-border", children: [
551
+ ) : Ce,
552
+ X && /* @__PURE__ */ d("div", { className: "flex items-center justify-between px-ds-03 py-ds-04 border-t border-surface-border", children: [
581
553
  /* @__PURE__ */ d("span", { className: "text-ds-sm text-surface-fg-muted", children: [
582
554
  nt,
583
555
  " total rows"
584
556
  ] }),
585
557
  /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-03", children: [
586
- !j && /* @__PURE__ */ n(
558
+ !T && /* @__PURE__ */ n(
587
559
  "select",
588
560
  {
589
- value: c.getState().pagination.pageSize,
561
+ value: i.getState().pagination.pageSize,
590
562
  onChange: (e) => {
591
- c.setPageSize(Number(e.target.value));
563
+ i.setPageSize(Number(e.target.value));
592
564
  },
593
565
  "aria-label": "Rows per page",
594
566
  className: a(
@@ -607,8 +579,8 @@ function Dt({
607
579
  "button",
608
580
  {
609
581
  type: "button",
610
- disabled: !c.getCanPreviousPage(),
611
- onClick: () => c.previousPage(),
582
+ disabled: !i.getCanPreviousPage(),
583
+ onClick: () => i.previousPage(),
612
584
  "aria-label": "Previous page",
613
585
  className: a(
614
586
  "h-ds-sm w-ds-sm flex items-center justify-center",
@@ -617,22 +589,22 @@ function Dt({
617
589
  "disabled:opacity-action-disabled disabled:cursor-not-allowed",
618
590
  "transition-colors"
619
591
  ),
620
- children: /* @__PURE__ */ n(ht, { size: 16, "aria-hidden": "true" })
592
+ children: /* @__PURE__ */ n(h, { icon: ht, size: "sm" })
621
593
  }
622
594
  ),
623
595
  /* @__PURE__ */ d("span", { className: "text-ds-sm text-surface-fg-muted", children: [
624
596
  "Page ",
625
- c.getState().pagination.pageIndex + 1,
597
+ i.getState().pagination.pageIndex + 1,
626
598
  " of",
627
599
  " ",
628
- c.getPageCount()
600
+ i.getPageCount()
629
601
  ] }),
630
602
  /* @__PURE__ */ n(
631
603
  "button",
632
604
  {
633
605
  type: "button",
634
- disabled: !c.getCanNextPage(),
635
- onClick: () => c.nextPage(),
606
+ disabled: !i.getCanNextPage(),
607
+ onClick: () => i.nextPage(),
636
608
  "aria-label": "Next page",
637
609
  className: a(
638
610
  "h-ds-sm w-ds-sm flex items-center justify-center",
@@ -641,12 +613,12 @@ function Dt({
641
613
  "disabled:opacity-action-disabled disabled:cursor-not-allowed",
642
614
  "transition-colors"
643
615
  ),
644
- children: /* @__PURE__ */ n(we, { size: 16, "aria-hidden": "true" })
616
+ children: /* @__PURE__ */ n(h, { icon: Se, size: "sm" })
645
617
  }
646
618
  )
647
619
  ] })
648
620
  ] }),
649
- B && w && tt && /* @__PURE__ */ d(
621
+ V && w && tt && /* @__PURE__ */ d(
650
622
  "div",
651
623
  {
652
624
  className: a(
@@ -659,17 +631,17 @@ function Dt({
659
631
  "aria-label": "Bulk actions",
660
632
  children: [
661
633
  /* @__PURE__ */ d("span", { className: "text-ds-sm font-medium text-surface-fg whitespace-nowrap", children: [
662
- ee.length,
634
+ Q.length,
663
635
  " selected"
664
636
  ] }),
665
637
  /* @__PURE__ */ n("div", { className: "h-5 w-px bg-surface-border", "aria-hidden": "true" }),
666
- B.map((e) => /* @__PURE__ */ n(
667
- St,
638
+ V.map((e) => /* @__PURE__ */ n(
639
+ Ct,
668
640
  {
669
641
  size: "sm",
670
642
  variant: e.color === "error" ? "destructive" : "outline",
671
643
  disabled: e.disabled,
672
- onClick: () => e.onClick(ee),
644
+ onClick: () => e.onClick(Q),
673
645
  children: e.label
674
646
  },
675
647
  e.label
@@ -678,14 +650,14 @@ function Dt({
678
650
  "button",
679
651
  {
680
652
  type: "button",
681
- onClick: () => c.resetRowSelection(),
653
+ onClick: () => i.resetRowSelection(),
682
654
  "aria-label": "Clear selection",
683
655
  className: a(
684
656
  "flex items-center justify-center p-ds-01",
685
657
  "rounded-ds-sm hover:bg-surface-raised transition-colors",
686
658
  "text-surface-fg-muted hover:text-surface-fg"
687
659
  ),
688
- children: /* @__PURE__ */ n(bt, { size: 16, "aria-hidden": "true" })
660
+ children: /* @__PURE__ */ n(h, { icon: bt, size: "sm" })
689
661
  }
690
662
  )
691
663
  ]
@@ -693,7 +665,7 @@ function Dt({
693
665
  )
694
666
  ] });
695
667
  }
696
- Dt.displayName = "DataTable";
668
+ zt.displayName = "DataTable";
697
669
  export {
698
- Dt as DataTable
670
+ zt as DataTable
699
671
  };