@brightlocal/ui-components 0.1.1 → 0.1.3

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 (244) hide show
  1. package/dist/accordion.cjs +1 -1
  2. package/dist/accordion.d.ts +74 -4
  3. package/dist/accordion.d.ts.map +1 -1
  4. package/dist/accordion.js +100 -105
  5. package/dist/alert-dialog.cjs +1 -1
  6. package/dist/alert-dialog.d.ts +30 -10
  7. package/dist/alert-dialog.d.ts.map +1 -1
  8. package/dist/alert-dialog.js +129 -132
  9. package/dist/alert.d.ts +22 -1
  10. package/dist/alert.d.ts.map +1 -1
  11. package/dist/aspect-ratio.cjs +1 -1
  12. package/dist/aspect-ratio.d.ts +11 -1
  13. package/dist/aspect-ratio.d.ts.map +1 -1
  14. package/dist/aspect-ratio.js +16 -20
  15. package/dist/avatar.cjs +1 -1
  16. package/dist/avatar.d.ts +43 -3
  17. package/dist/avatar.d.ts.map +1 -1
  18. package/dist/avatar.js +18 -16
  19. package/dist/badge.cjs +1 -1
  20. package/dist/badge.d.ts +24 -9
  21. package/dist/badge.d.ts.map +1 -1
  22. package/dist/badge.js +34 -32
  23. package/dist/blocks/data-table.cjs +1 -1
  24. package/dist/blocks/data-table.d.ts.map +1 -1
  25. package/dist/blocks/data-table.js +209 -202
  26. package/dist/blocks/sidebar.cjs +1 -1
  27. package/dist/blocks/sidebar.d.ts +1 -1
  28. package/dist/blocks/sidebar.d.ts.map +1 -1
  29. package/dist/blocks/sidebar.js +154 -154
  30. package/dist/breadcrumb.cjs +1 -1
  31. package/dist/breadcrumb.d.ts +63 -8
  32. package/dist/breadcrumb.d.ts.map +1 -1
  33. package/dist/breadcrumb.js +97 -93
  34. package/dist/button.cjs +1 -1
  35. package/dist/button.d.ts +17 -45
  36. package/dist/button.d.ts.map +1 -1
  37. package/dist/button.js +49 -50
  38. package/dist/calendar.cjs +1 -1
  39. package/dist/calendar.d.ts +12 -0
  40. package/dist/calendar.d.ts.map +1 -1
  41. package/dist/calendar.js +10 -8
  42. package/dist/card.cjs +1 -1
  43. package/dist/card.d.ts +58 -18
  44. package/dist/card.d.ts.map +1 -1
  45. package/dist/card.js +60 -51
  46. package/dist/carousel.cjs +1 -1
  47. package/dist/carousel.d.ts +99 -9
  48. package/dist/carousel.d.ts.map +1 -1
  49. package/dist/carousel.js +142 -128
  50. package/dist/centred-layout.cjs +1 -1
  51. package/dist/centred-layout.d.ts +18 -2
  52. package/dist/centred-layout.d.ts.map +1 -1
  53. package/dist/centred-layout.js +46 -33
  54. package/dist/chart.cjs +4 -4
  55. package/dist/chart.d.ts +70 -7
  56. package/dist/chart.d.ts.map +1 -1
  57. package/dist/chart.js +71 -66
  58. package/dist/checkbox.cjs +1 -1
  59. package/dist/checkbox.d.ts +9 -5
  60. package/dist/checkbox.d.ts.map +1 -1
  61. package/dist/checkbox.js +61 -82
  62. package/dist/collapsible.cjs +1 -1
  63. package/dist/collapsible.d.ts +65 -8
  64. package/dist/collapsible.d.ts.map +1 -1
  65. package/dist/collapsible.js +41 -55
  66. package/dist/combobox.cjs +1 -1
  67. package/dist/combobox.d.ts +29 -11
  68. package/dist/combobox.d.ts.map +1 -1
  69. package/dist/combobox.js +193 -159
  70. package/dist/command.cjs +1 -1
  71. package/dist/command.d.ts +115 -9
  72. package/dist/command.d.ts.map +1 -1
  73. package/dist/command.js +176 -152
  74. package/dist/context-menu.cjs +1 -1
  75. package/dist/context-menu.d.ts +188 -20
  76. package/dist/context-menu.d.ts.map +1 -1
  77. package/dist/context-menu.js +119 -121
  78. package/dist/date-picker.cjs +1 -1
  79. package/dist/date-picker.d.ts +75 -9
  80. package/dist/date-picker.d.ts.map +1 -1
  81. package/dist/date-picker.js +220 -81
  82. package/dist/description.cjs +1 -0
  83. package/dist/description.d.ts +37 -0
  84. package/dist/description.d.ts.map +1 -0
  85. package/dist/description.js +25 -0
  86. package/dist/dialog.cjs +1 -1
  87. package/dist/dialog.d.ts +73 -9
  88. package/dist/dialog.d.ts.map +1 -1
  89. package/dist/dialog.js +103 -112
  90. package/dist/drawer.cjs +1 -1
  91. package/dist/drawer.d.ts +92 -0
  92. package/dist/drawer.d.ts.map +1 -1
  93. package/dist/drawer.js +67 -52
  94. package/dist/dropdown-menu.cjs +1 -1
  95. package/dist/dropdown-menu.d.ts +95 -11
  96. package/dist/dropdown-menu.d.ts.map +1 -1
  97. package/dist/dropdown-menu.js +146 -106
  98. package/dist/field.cjs +1 -1
  99. package/dist/field.d.ts +23 -6
  100. package/dist/field.d.ts.map +1 -1
  101. package/dist/field.js +54 -53
  102. package/dist/global-layout.cjs +1 -1
  103. package/dist/global-layout.d.ts +27 -17
  104. package/dist/global-layout.d.ts.map +1 -1
  105. package/dist/global-layout.js +86 -79
  106. package/dist/hover-card.cjs +1 -1
  107. package/dist/hover-card.d.ts +36 -6
  108. package/dist/hover-card.d.ts.map +1 -1
  109. package/dist/hover-card.js +44 -42
  110. package/dist/index.cjs +1 -1
  111. package/dist/index.d.ts +1 -1
  112. package/dist/index.d.ts.map +1 -1
  113. package/dist/index.js +383 -387
  114. package/dist/input-group.cjs +1 -1
  115. package/dist/input-group.d.ts +21 -2
  116. package/dist/input-group.d.ts.map +1 -1
  117. package/dist/input-group.js +51 -41
  118. package/dist/input-password.cjs +1 -1
  119. package/dist/input-password.d.ts.map +1 -1
  120. package/dist/input-password.js +24 -25
  121. package/dist/input.cjs +1 -1
  122. package/dist/input.d.ts +38 -24
  123. package/dist/input.d.ts.map +1 -1
  124. package/dist/input.js +68 -136
  125. package/dist/label.cjs +1 -1
  126. package/dist/label.d.ts +20 -1
  127. package/dist/label.d.ts.map +1 -1
  128. package/dist/label.js +31 -18
  129. package/dist/logo.cjs +1 -1
  130. package/dist/logo.d.ts +3 -0
  131. package/dist/logo.d.ts.map +1 -1
  132. package/dist/logo.js +12 -10
  133. package/dist/menubar.cjs +1 -1
  134. package/dist/menubar.d.ts +40 -6
  135. package/dist/menubar.d.ts.map +1 -1
  136. package/dist/menubar.js +97 -76
  137. package/dist/popover.cjs +1 -1
  138. package/dist/popover.d.ts +59 -4
  139. package/dist/popover.d.ts.map +1 -1
  140. package/dist/popover.js +42 -34
  141. package/dist/progress.cjs +1 -1
  142. package/dist/progress.d.ts +9 -2
  143. package/dist/progress.d.ts.map +1 -1
  144. package/dist/progress.js +71 -59
  145. package/dist/radio-group.d.ts +40 -0
  146. package/dist/radio-group.d.ts.map +1 -1
  147. package/dist/rating.d.ts +4 -0
  148. package/dist/rating.d.ts.map +1 -1
  149. package/dist/resizable.cjs +1 -1
  150. package/dist/resizable.d.ts +65 -4
  151. package/dist/resizable.d.ts.map +1 -1
  152. package/dist/resizable.js +53 -36
  153. package/dist/scroll-area.cjs +1 -1
  154. package/dist/scroll-area.d.ts +46 -5
  155. package/dist/scroll-area.d.ts.map +1 -1
  156. package/dist/scroll-area.js +42 -38
  157. package/dist/select.cjs +1 -1
  158. package/dist/select.d.ts +30 -0
  159. package/dist/select.d.ts.map +1 -1
  160. package/dist/select.js +64 -54
  161. package/dist/separator.cjs +1 -1
  162. package/dist/separator.d.ts +49 -2
  163. package/dist/separator.d.ts.map +1 -1
  164. package/dist/separator.js +48 -36
  165. package/dist/sheet.cjs +1 -1
  166. package/dist/sheet.d.ts +80 -9
  167. package/dist/sheet.d.ts.map +1 -1
  168. package/dist/sheet.js +117 -113
  169. package/dist/skeleton.cjs +1 -1
  170. package/dist/skeleton.d.ts +24 -2
  171. package/dist/skeleton.d.ts.map +1 -1
  172. package/dist/skeleton.js +15 -9
  173. package/dist/slider.cjs +1 -1
  174. package/dist/slider.d.ts +18 -4
  175. package/dist/slider.d.ts.map +1 -1
  176. package/dist/slider.js +72 -66
  177. package/dist/sonner.cjs +1 -1
  178. package/dist/sonner.d.ts +4 -2
  179. package/dist/sonner.d.ts.map +1 -1
  180. package/dist/sonner.js +29 -28
  181. package/dist/split-layout.d.ts +4 -1
  182. package/dist/split-layout.d.ts.map +1 -1
  183. package/dist/table.cjs +1 -1
  184. package/dist/table.js +1 -1
  185. package/dist/toggle-group.cjs +1 -1
  186. package/dist/toggle-group.d.ts +3 -1
  187. package/dist/toggle-group.d.ts.map +1 -1
  188. package/dist/toggle-group.js +38 -36
  189. package/package.json +8 -2
  190. package/src/blocks/data-table.tsx +42 -32
  191. package/src/blocks/sidebar.tsx +4 -12
  192. package/src/components/accordion.tsx +163 -77
  193. package/src/components/alert-dialog.tsx +156 -111
  194. package/src/components/alert.tsx +26 -13
  195. package/src/components/aspect-ratio.tsx +25 -16
  196. package/src/components/avatar.tsx +56 -8
  197. package/src/components/badge.tsx +65 -42
  198. package/src/components/breadcrumb.tsx +158 -82
  199. package/src/components/button.tsx +41 -62
  200. package/src/components/calendar.tsx +16 -2
  201. package/src/components/card.tsx +92 -40
  202. package/src/components/carousel.tsx +240 -115
  203. package/src/components/centred-layout.tsx +67 -35
  204. package/src/components/chart.tsx +118 -47
  205. package/src/components/checkbox.tsx +42 -78
  206. package/src/components/collapsible.tsx +95 -26
  207. package/src/components/combobox.tsx +242 -144
  208. package/src/components/command.tsx +295 -121
  209. package/src/components/context-menu.tsx +278 -81
  210. package/src/components/date-picker.tsx +281 -30
  211. package/src/components/description.tsx +60 -0
  212. package/src/components/dialog.tsx +162 -86
  213. package/src/components/drawer.tsx +76 -2
  214. package/src/components/dropdown-menu.tsx +143 -37
  215. package/src/components/field.tsx +36 -11
  216. package/src/components/global-layout.tsx +116 -77
  217. package/src/components/hover-card.tsx +54 -14
  218. package/src/components/input-group.tsx +56 -18
  219. package/src/components/input-password.tsx +3 -4
  220. package/src/components/input.tsx +93 -186
  221. package/src/components/label.tsx +56 -15
  222. package/src/components/logo.tsx +3 -0
  223. package/src/components/menubar.tsx +58 -4
  224. package/src/components/popover.tsx +103 -20
  225. package/src/components/progress.tsx +82 -60
  226. package/src/components/radio-group.tsx +40 -0
  227. package/src/components/rating.tsx +4 -1
  228. package/src/components/resizable.tsx +119 -31
  229. package/src/components/scroll-area.tsx +123 -56
  230. package/src/components/select.tsx +21 -1
  231. package/src/components/separator.tsx +97 -20
  232. package/src/components/sheet.tsx +180 -79
  233. package/src/components/skeleton.tsx +40 -10
  234. package/src/components/slider.tsx +83 -57
  235. package/src/components/sonner.tsx +10 -7
  236. package/src/components/split-layout.tsx +4 -1
  237. package/src/components/table.tsx +1 -1
  238. package/src/components/toggle-group.tsx +4 -0
  239. package/src/index.ts +1 -1
  240. package/dist/input-base.cjs +0 -1
  241. package/dist/input-base.d.ts +0 -28
  242. package/dist/input-base.d.ts.map +0 -1
  243. package/dist/input-base.js +0 -56
  244. package/src/components/input-base.tsx +0 -86
@@ -1,16 +1,16 @@
1
- import { jsx as a, jsxs as w, Fragment as We } from "react/jsx-runtime";
2
- import * as c from "react";
3
- import { useReactTable as Je, getFacetedMinMaxValues as Ke, getFacetedUniqueValues as Qe, getFacetedRowModel as Xe, getExpandedRowModel as Q, getGroupedRowModel as Ye, getFilteredRowModel as X, getSortedRowModel as Ze, getPaginationRowModel as et, getCoreRowModel as tt, flexRender as x } from "@tanstack/react-table";
1
+ import { jsx as a, jsxs as w, Fragment as qe } from "react/jsx-runtime";
2
+ import * as r from "react";
3
+ import { useReactTable as _e, getFacetedMinMaxValues as We, getFacetedUniqueValues as Je, getFacetedRowModel as Ke, getExpandedRowModel as Q, getGroupedRowModel as Qe, getFilteredRowModel as X, getSortedRowModel as Xe, getPaginationRowModel as Ye, getCoreRowModel as Ze, flexRender as k } from "@tanstack/react-table";
4
4
  import { createColumnHelper as qt, flexRender as _t } from "@tanstack/react-table";
5
- import { ArrowDownIcon as at, ArrowUpIcon as nt, ArrowUpDownIcon as lt, EllipsisIcon as ot, SearchIcon as it } from "lucide-react";
6
- import { cn as p } from "@brightlocal/ui-components/lib/utils";
7
- import { Button as Y, ButtonVariant as Z, ButtonSize as ee } from "../button.js";
8
- import { Checkbox as te } from "../checkbox.js";
9
- import { Input as st } from "../input.js";
10
- import { Skeleton as ct } from "../skeleton.js";
11
- import { DropdownMenu as rt, DropdownMenuTrigger as dt, DropdownMenuContent as gt } from "../dropdown-menu.js";
12
- import { Table as ut, TableHeader as ft, TableRow as S, TableHead as mt, TableBody as ht, TableCell as k } from "../table.js";
13
- import { usePagination as bt, Pagination as pt, PaginationContent as St, PaginationItem as R, PaginationPrevious as wt, PaginationNext as Ct, PaginationEllipsis as kt, PaginationLink as xt } from "../pagination.js";
5
+ import { ArrowDownIcon as et, ArrowUpIcon as tt, ArrowUpDownIcon as at, EllipsisIcon as nt, SearchIcon as lt } from "lucide-react";
6
+ import { cn as b } from "@brightlocal/ui-components/lib/utils";
7
+ import { Button as Y } from "../button.js";
8
+ import { Checkbox as Z } from "../checkbox.js";
9
+ import { InputGroup as ot, InputGroupInput as it, InputGroupAddon as st } from "../input-group.js";
10
+ import { Skeleton as rt } from "../skeleton.js";
11
+ import { DropdownMenu as ct, DropdownMenuTrigger as dt, DropdownMenuContent as gt } from "../dropdown-menu.js";
12
+ import { Table as ut, TableHeader as mt, TableRow as C, TableHead as ft, TableBody as ht, TableCell as x } from "../table.js";
13
+ import { usePagination as pt, Pagination as bt, PaginationContent as wt, PaginationItem as R, PaginationPrevious as Ct, PaginationNext as St, PaginationEllipsis as xt, PaginationLink as kt } from "../pagination.js";
14
14
  function Rt({
15
15
  columns: n,
16
16
  data: l,
@@ -18,111 +18,111 @@ function Rt({
18
18
  trackingEl: i,
19
19
  trackingLabel: s,
20
20
  enableRowSelection: g = !1,
21
- enableSorting: r = !0,
21
+ enableSorting: c = !0,
22
22
  enableFiltering: d = !1,
23
23
  enableGlobalFiltering: h = !1,
24
- enablePagination: b = !1,
25
- enableColumnPinning: C = !1,
24
+ enablePagination: p = !1,
25
+ enableColumnPinning: S = !1,
26
26
  enableRowPinning: u = !1,
27
- enableColumnOrdering: T = !1,
28
- enableGrouping: m = !1,
29
- enableExpanding: y = !1,
30
- enableFaceting: le = !1,
27
+ enableColumnOrdering: y = !1,
28
+ enableGrouping: f = !1,
29
+ enableExpanding: T = !1,
30
+ enableFaceting: ae = !1,
31
31
  pageSize: q = 10,
32
- noResultsMessage: oe = "No results.",
33
- isLoading: ie = !1,
34
- skeletonRowCount: se,
35
- getSubRows: ce,
36
- sorting: re,
32
+ noResultsMessage: ne = "No results.",
33
+ isLoading: le = !1,
34
+ skeletonRowCount: oe,
35
+ getSubRows: ie,
36
+ sorting: se,
37
37
  onSortingChange: P,
38
- columnFilters: de,
39
- onColumnFiltersChange: D,
40
- globalFilter: ge,
41
- onGlobalFilterChange: N,
42
- rowSelection: ue,
43
- onRowSelectionChange: M,
44
- columnOrder: fe,
45
- onColumnOrderChange: I,
46
- columnPinning: me,
38
+ columnFilters: re,
39
+ onColumnFiltersChange: N,
40
+ globalFilter: ce,
41
+ onGlobalFilterChange: D,
42
+ rowSelection: de,
43
+ onRowSelectionChange: I,
44
+ columnOrder: ge,
45
+ onColumnOrderChange: M,
46
+ columnPinning: ue,
47
47
  onColumnPinningChange: F,
48
- rowPinning: he,
48
+ rowPinning: me,
49
49
  onRowPinningChange: V,
50
- grouping: be,
50
+ grouping: fe,
51
51
  onGroupingChange: v,
52
- expanded: pe,
52
+ expanded: he,
53
53
  onExpandedChange: $,
54
- className: Se,
54
+ className: pe,
55
55
  renderToolbar: _,
56
56
  renderFooter: W,
57
57
  renderPagination: J
58
- }, we) {
59
- const [Ce, ke] = c.useState(
58
+ }, be) {
59
+ const [we, Ce] = r.useState(
60
60
  []
61
- ), [xe, Re] = c.useState([]), [Te, ye] = c.useState(""), [Pe, De] = c.useState({}), [Ne, Me] = c.useState([]), [Ie, Fe] = c.useState({}), [Ve, ve] = c.useState({}), [$e, Ae] = c.useState(
61
+ ), [Se, xe] = r.useState([]), [ke, Re] = r.useState(""), [ye, Te] = r.useState({}), [Pe, Ne] = r.useState([]), [De, Ie] = r.useState({}), [Me, Fe] = r.useState({}), [Ve, ve] = r.useState(
62
62
  []
63
- ), [He, ze] = c.useState(
63
+ ), [$e, Ae] = r.useState(
64
64
  {}
65
- ), A = re ?? Ce, H = de ?? xe, z = ge ?? Te, G = ue ?? Pe, j = fe ?? Ne, L = me ?? Ie, E = he ?? Ve, O = be ?? $e, B = pe ?? He, Ge = c.useCallback(
65
+ ), A = se ?? we, G = re ?? Se, z = ce ?? ke, H = de ?? ye, j = ge ?? Pe, E = ue ?? De, L = me ?? Me, O = fe ?? Ve, U = he ?? $e, Ge = r.useCallback(
66
66
  (e) => {
67
67
  const t = typeof e == "function" ? e(A) : e;
68
- P ? P(t) : ke(t);
68
+ P ? P(t) : Ce(t);
69
69
  },
70
70
  [A, P]
71
- ), je = c.useCallback(
71
+ ), ze = r.useCallback(
72
72
  (e) => {
73
- const t = typeof e == "function" ? e(H) : e;
74
- D ? D(t) : Re(t);
73
+ const t = typeof e == "function" ? e(G) : e;
74
+ N ? N(t) : xe(t);
75
75
  },
76
- [H, D]
77
- ), Le = c.useCallback(
76
+ [G, N]
77
+ ), He = r.useCallback(
78
78
  (e) => {
79
79
  const t = typeof e == "function" ? e(z) : e;
80
- N ? N(t) : ye(t);
80
+ D ? D(t) : Re(t);
81
81
  },
82
- [z, N]
83
- ), Ee = c.useCallback(
82
+ [z, D]
83
+ ), je = r.useCallback(
84
84
  (e) => {
85
- const t = typeof e == "function" ? e(G) : e;
86
- M ? M(t) : De(t);
85
+ const t = typeof e == "function" ? e(H) : e;
86
+ I ? I(t) : Te(t);
87
87
  },
88
- [G, M]
89
- ), Oe = c.useCallback(
88
+ [H, I]
89
+ ), Ee = r.useCallback(
90
90
  (e) => {
91
91
  const t = typeof e == "function" ? e(j) : e;
92
- I ? I(t) : Me(t);
92
+ M ? M(t) : Ne(t);
93
93
  },
94
- [j, I]
95
- ), Be = c.useCallback(
94
+ [j, M]
95
+ ), Le = r.useCallback(
96
96
  (e) => {
97
- const t = typeof e == "function" ? e(L) : e;
98
- F ? F(t) : Fe(t);
97
+ const t = typeof e == "function" ? e(E) : e;
98
+ F ? F(t) : Ie(t);
99
99
  },
100
- [L, F]
101
- ), Ue = c.useCallback(
100
+ [E, F]
101
+ ), Oe = r.useCallback(
102
102
  (e) => {
103
- const t = typeof e == "function" ? e(E) : e;
104
- V ? V(t) : ve(t);
103
+ const t = typeof e == "function" ? e(L) : e;
104
+ V ? V(t) : Fe(t);
105
105
  },
106
- [E, V]
107
- ), qe = c.useCallback(
106
+ [L, V]
107
+ ), Ue = r.useCallback(
108
108
  (e) => {
109
109
  const t = typeof e == "function" ? e(O) : e;
110
- v ? v(t) : Ae(t);
110
+ v ? v(t) : ve(t);
111
111
  },
112
112
  [O, v]
113
- ), K = c.useCallback(
113
+ ), K = r.useCallback(
114
114
  (e) => {
115
- const t = typeof e == "function" ? e(B) : e;
116
- $ ? $(t) : ze(t);
115
+ const t = typeof e == "function" ? e(U) : e;
116
+ $ ? $(t) : Ae(t);
117
117
  },
118
- [B, $]
119
- ), f = Je({
118
+ [U, $]
119
+ ), m = _e({
120
120
  data: l,
121
121
  columns: n,
122
- getCoreRowModel: tt(),
122
+ getCoreRowModel: Ze(),
123
123
  // Pagination
124
- ...b && {
125
- getPaginationRowModel: et(),
124
+ ...p && {
125
+ getPaginationRowModel: Ye(),
126
126
  initialState: {
127
127
  pagination: {
128
128
  pageSize: q
@@ -130,118 +130,118 @@ function Rt({
130
130
  }
131
131
  },
132
132
  // Sorting
133
- ...r && {
134
- getSortedRowModel: Ze(),
133
+ ...c && {
134
+ getSortedRowModel: Xe(),
135
135
  onSortingChange: Ge
136
136
  },
137
137
  // Column Filtering
138
138
  ...d && {
139
139
  getFilteredRowModel: X(),
140
- onColumnFiltersChange: je
140
+ onColumnFiltersChange: ze
141
141
  },
142
142
  // Global Filtering
143
143
  ...h && {
144
144
  getFilteredRowModel: X(),
145
- onGlobalFilterChange: Le,
145
+ onGlobalFilterChange: He,
146
146
  globalFilterFn: "includesString"
147
147
  },
148
148
  // Row Selection
149
149
  ...g && {
150
150
  enableRowSelection: !0,
151
- onRowSelectionChange: Ee
151
+ onRowSelectionChange: je
152
152
  },
153
153
  // Column Ordering
154
- ...T && {
155
- onColumnOrderChange: Oe
154
+ ...y && {
155
+ onColumnOrderChange: Ee
156
156
  },
157
157
  // Column Pinning
158
- ...C && {
159
- onColumnPinningChange: Be
158
+ ...S && {
159
+ onColumnPinningChange: Le
160
160
  },
161
161
  // Row Pinning
162
162
  ...u && {
163
163
  enableRowPinning: !0,
164
- onRowPinningChange: Ue,
164
+ onRowPinningChange: Oe,
165
165
  keepPinnedRows: !0
166
166
  },
167
167
  // Grouping
168
- ...m && {
169
- getGroupedRowModel: Ye(),
168
+ ...f && {
169
+ getGroupedRowModel: Qe(),
170
170
  getExpandedRowModel: Q(),
171
- onGroupingChange: qe,
171
+ onGroupingChange: Ue,
172
172
  onExpandedChange: K
173
173
  },
174
174
  // Expanding
175
- ...y && {
175
+ ...T && {
176
176
  getExpandedRowModel: Q(),
177
177
  onExpandedChange: K,
178
- getSubRows: ce
178
+ getSubRows: ie
179
179
  },
180
180
  // Faceting (for filter dropdowns)
181
- ...le && {
182
- getFacetedRowModel: Xe(),
183
- getFacetedUniqueValues: Qe(),
184
- getFacetedMinMaxValues: Ke()
181
+ ...ae && {
182
+ getFacetedRowModel: Ke(),
183
+ getFacetedUniqueValues: Je(),
184
+ getFacetedMinMaxValues: We()
185
185
  },
186
186
  // State
187
187
  state: {
188
188
  sorting: A,
189
- columnFilters: H,
189
+ columnFilters: G,
190
190
  globalFilter: z,
191
- rowSelection: G,
191
+ rowSelection: H,
192
192
  columnOrder: j,
193
- columnPinning: L,
194
- rowPinning: E,
193
+ columnPinning: E,
194
+ rowPinning: L,
195
195
  grouping: O,
196
- expanded: B
196
+ expanded: U
197
197
  }
198
198
  });
199
199
  return /* @__PURE__ */ w(
200
200
  "div",
201
201
  {
202
- ref: we,
203
- className: Se,
202
+ ref: be,
203
+ className: pe,
204
204
  "data-hook": o,
205
205
  "data-slot": "data-table",
206
206
  "data-tracking-el": i,
207
207
  "data-tracking-label": s,
208
208
  children: [
209
- _ && _(f),
209
+ _ && _(m),
210
210
  /* @__PURE__ */ w(ut, { dataHook: `${o}-table`, children: [
211
- /* @__PURE__ */ a(ft, { children: f.getHeaderGroups().map((e) => /* @__PURE__ */ a(S, { children: e.headers.map((t) => /* @__PURE__ */ a(mt, { colSpan: t.colSpan, children: t.isPlaceholder ? null : x(
211
+ /* @__PURE__ */ a(mt, { children: m.getHeaderGroups().map((e) => /* @__PURE__ */ a(C, { children: e.headers.map((t) => /* @__PURE__ */ a(ft, { colSpan: t.colSpan, children: t.isPlaceholder ? null : k(
212
212
  t.column.columnDef.header,
213
213
  t.getContext()
214
214
  ) }, t.id)) }, e.id)) }),
215
- /* @__PURE__ */ a(ht, { children: ie ? Array.from({ length: se ?? q }).map(
216
- (e, t) => /* @__PURE__ */ a(S, { children: f.getVisibleLeafColumns().map((Ft, _e) => /* @__PURE__ */ a(k, { children: /* @__PURE__ */ a(ct, { className: "h-4 w-full" }) }, `skeleton-${t}-${_e}`)) }, `skeleton-${t}`)
217
- ) : /* @__PURE__ */ w(We, { children: [
218
- u && f.getTopRows().map((e) => /* @__PURE__ */ a(
219
- S,
215
+ /* @__PURE__ */ a(ht, { children: le ? Array.from({ length: oe ?? q }).map(
216
+ (e, t) => /* @__PURE__ */ a(C, { children: m.getVisibleLeafColumns().map((Ft, Be) => /* @__PURE__ */ a(x, { children: /* @__PURE__ */ a(rt, { className: "h-4 w-full" }) }, `skeleton-${t}-${Be}`)) }, `skeleton-${t}`)
217
+ ) : /* @__PURE__ */ w(qe, { children: [
218
+ u && m.getTopRows().map((e) => /* @__PURE__ */ a(
219
+ C,
220
220
  {
221
221
  "data-state": e.getIsSelected() && "selected",
222
- children: e.getVisibleCells().map((t) => /* @__PURE__ */ a(k, { children: x(
222
+ children: e.getVisibleCells().map((t) => /* @__PURE__ */ a(x, { children: k(
223
223
  t.column.columnDef.cell,
224
224
  t.getContext()
225
225
  ) }, t.id))
226
226
  },
227
227
  e.id
228
228
  )),
229
- f.getRowModel().rows?.length ? f.getRowModel().rows.map((e) => /* @__PURE__ */ a(
230
- S,
229
+ m.getRowModel().rows?.length ? m.getRowModel().rows.map((e) => /* @__PURE__ */ a(
230
+ C,
231
231
  {
232
232
  "data-state": e.getIsSelected() && "selected",
233
- children: e.getVisibleCells().map((t) => /* @__PURE__ */ a(k, { children: x(
233
+ children: e.getVisibleCells().map((t) => /* @__PURE__ */ a(x, { children: k(
234
234
  t.column.columnDef.cell,
235
235
  t.getContext()
236
236
  ) }, t.id))
237
237
  },
238
238
  e.id
239
- )) : /* @__PURE__ */ a(S, { children: /* @__PURE__ */ a(k, { colSpan: f.getVisibleLeafColumns().length, children: oe }) }),
240
- u && f.getBottomRows().map((e) => /* @__PURE__ */ a(
241
- S,
239
+ )) : /* @__PURE__ */ a(C, { children: /* @__PURE__ */ a(x, { colSpan: m.getVisibleLeafColumns().length, children: ne }) }),
240
+ u && m.getBottomRows().map((e) => /* @__PURE__ */ a(
241
+ C,
242
242
  {
243
243
  "data-state": e.getIsSelected() && "selected",
244
- children: e.getVisibleCells().map((t) => /* @__PURE__ */ a(k, { children: x(
244
+ children: e.getVisibleCells().map((t) => /* @__PURE__ */ a(x, { children: k(
245
245
  t.column.columnDef.cell,
246
246
  t.getContext()
247
247
  ) }, t.id))
@@ -249,32 +249,32 @@ function Rt({
249
249
  e.id
250
250
  ))
251
251
  ] }) }),
252
- W && W(f)
252
+ W && W(m)
253
253
  ] }),
254
- J && J(f)
254
+ J && J(m)
255
255
  ]
256
256
  }
257
257
  );
258
258
  }
259
- const Tt = c.forwardRef(Rt);
260
- Tt.displayName = "DataTable";
261
- function yt({
259
+ const yt = r.forwardRef(Rt);
260
+ yt.displayName = "DataTable";
261
+ function Tt({
262
262
  column: n,
263
263
  title: l,
264
264
  className: o,
265
265
  dataHook: i,
266
266
  trackingEl: s,
267
267
  trackingLabel: g,
268
- align: r = "left"
268
+ align: c = "left"
269
269
  }) {
270
270
  if (!n.getCanSort())
271
271
  return /* @__PURE__ */ a(
272
272
  "div",
273
273
  {
274
- className: p(
275
- "text-left",
276
- r === "right" && "text-right",
277
- r === "center" && "text-center",
274
+ className: b(
275
+ "text-muted-foreground text-left text-sm leading-normal font-medium",
276
+ c === "right" && "text-right",
277
+ c === "center" && "text-center",
278
278
  o
279
279
  ),
280
280
  "data-hook": i,
@@ -288,10 +288,10 @@ function yt({
288
288
  return /* @__PURE__ */ a(
289
289
  "div",
290
290
  {
291
- className: p(
291
+ className: b(
292
292
  "flex items-center",
293
- r === "right" && "justify-end",
294
- r === "center" && "justify-center",
293
+ c === "right" && "justify-end",
294
+ c === "center" && "justify-center",
295
295
  o
296
296
  ),
297
297
  "data-slot": "data-table-column-header",
@@ -301,21 +301,28 @@ function yt({
301
301
  Y,
302
302
  {
303
303
  "aria-label": h,
304
- className: p("p-0"),
304
+ className: b("text-muted-foreground h-auto p-0 text-sm font-medium"),
305
305
  dataHook: i || `column-header-${n.id}`,
306
- size: ee.SM,
307
- variant: Z.GHOST,
306
+ size: "sm",
307
+ variant: "ghost",
308
308
  onClick: () => n.toggleSorting(d === "asc"),
309
309
  children: [
310
310
  /* @__PURE__ */ a("span", { "aria-hidden": "true", children: l }),
311
- /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "flex size-3 items-center justify-center", children: d === "desc" ? /* @__PURE__ */ a(at, { className: "size-3" }) : d === "asc" ? /* @__PURE__ */ a(nt, { className: "size-3" }) : /* @__PURE__ */ a(lt, { className: "size-3" }) })
311
+ /* @__PURE__ */ a(
312
+ "span",
313
+ {
314
+ "aria-hidden": "true",
315
+ className: "flex size-3 items-center justify-center",
316
+ children: d === "desc" ? /* @__PURE__ */ a(et, { className: "size-3" }) : d === "asc" ? /* @__PURE__ */ a(tt, { className: "size-3" }) : /* @__PURE__ */ a(at, { className: "size-3" })
317
+ }
318
+ )
312
319
  ]
313
320
  }
314
321
  )
315
322
  }
316
323
  );
317
324
  }
318
- yt.displayName = "DataTableColumnHeader";
325
+ Tt.displayName = "DataTableColumnHeader";
319
326
  function Pt({
320
327
  row: n,
321
328
  dataHook: l,
@@ -324,24 +331,24 @@ function Pt({
324
331
  ariaLabel: s = "Open row actions menu",
325
332
  children: g
326
333
  }) {
327
- return /* @__PURE__ */ w(rt, { children: [
334
+ return /* @__PURE__ */ w(ct, { children: [
328
335
  /* @__PURE__ */ a(dt, { asChild: !0, "data-slot": "data-table-row-actions", children: /* @__PURE__ */ a(
329
336
  Y,
330
337
  {
331
338
  "aria-label": s,
332
339
  dataHook: l || `row-actions-${n.id}`,
333
- size: ee.SM,
340
+ size: "sm",
334
341
  trackingEl: o,
335
342
  trackingLabel: i,
336
- variant: Z.GHOST,
337
- children: /* @__PURE__ */ a(ot, { className: "size-4" })
343
+ variant: "ghost",
344
+ children: /* @__PURE__ */ a(nt, { className: "size-4" })
338
345
  }
339
346
  ) }),
340
347
  /* @__PURE__ */ a(gt, { align: "end", dataHook: `${l}-menu`, children: g })
341
348
  ] });
342
349
  }
343
350
  Pt.displayName = "DataTableRowActions";
344
- function U({
351
+ function B({
345
352
  dataHook: n,
346
353
  trackingEl: l,
347
354
  trackingLabel: o,
@@ -351,7 +358,7 @@ function U({
351
358
  return /* @__PURE__ */ a(
352
359
  "div",
353
360
  {
354
- className: p(
361
+ className: b(
355
362
  "flex flex-wrap items-center justify-between gap-2 py-4",
356
363
  i
357
364
  ),
@@ -363,7 +370,7 @@ function U({
363
370
  }
364
371
  );
365
372
  }
366
- function ae({
373
+ function ee({
367
374
  dataHook: n,
368
375
  trackingEl: l,
369
376
  trackingLabel: o,
@@ -373,7 +380,7 @@ function ae({
373
380
  return /* @__PURE__ */ a(
374
381
  "div",
375
382
  {
376
- className: p("flex items-center gap-2", i),
383
+ className: b("flex items-center gap-2", i),
377
384
  "data-hook": n,
378
385
  "data-slot": "data-table-toolbar-left",
379
386
  "data-tracking-el": l,
@@ -382,8 +389,8 @@ function ae({
382
389
  }
383
390
  );
384
391
  }
385
- ae.displayName = "DataTableToolbar.Left";
386
- function ne({
392
+ ee.displayName = "DataTableToolbar.Left";
393
+ function te({
387
394
  dataHook: n,
388
395
  trackingEl: l,
389
396
  trackingLabel: o,
@@ -393,7 +400,7 @@ function ne({
393
400
  return /* @__PURE__ */ a(
394
401
  "div",
395
402
  {
396
- className: p("flex items-center gap-2", i),
403
+ className: b("flex items-center gap-2", i),
397
404
  "data-hook": n,
398
405
  "data-slot": "data-table-toolbar-right",
399
406
  "data-tracking-el": l,
@@ -402,50 +409,50 @@ function ne({
402
409
  }
403
410
  );
404
411
  }
405
- ne.displayName = "DataTableToolbar.Right";
406
- U.Left = ae;
407
- U.Right = ne;
408
- U.displayName = "DataTableToolbar";
409
- function Dt({
412
+ te.displayName = "DataTableToolbar.Right";
413
+ B.Left = ee;
414
+ B.Right = te;
415
+ B.displayName = "DataTableToolbar";
416
+ function Nt({
410
417
  table: n,
411
418
  dataHook: l,
412
419
  trackingEl: o,
413
420
  trackingLabel: i,
414
421
  ariaLabel: s = "Search table",
415
422
  placeholder: g = "Search...",
416
- column: r,
423
+ column: c,
417
424
  width: d,
418
425
  className: h
419
426
  }) {
420
- const b = r ? n.getColumn(r)?.getFilterValue() ?? "" : n.getState().globalFilter ?? "", C = (u) => {
421
- r ? n.getColumn(r)?.setFilterValue(u) : n.setGlobalFilter(u);
427
+ const p = c ? n.getColumn(c)?.getFilterValue() ?? "" : n.getState().globalFilter ?? "", S = (u) => {
428
+ c ? n.getColumn(c)?.setFilterValue(u) : n.setGlobalFilter(u);
422
429
  };
423
430
  return /* @__PURE__ */ a(
424
431
  "div",
425
432
  {
426
- className: p(!d && "w-full max-w-sm", h),
433
+ className: b(!d && "w-full max-w-sm", h),
427
434
  "data-slot": "data-table-search",
428
435
  style: d ? { width: d, minWidth: d } : void 0,
429
- children: /* @__PURE__ */ a(
430
- st,
431
- {
432
- "aria-label": s,
433
- className: "rounded-full",
434
- dataHook: l,
435
- placeholder: g,
436
- secondaryIcon: /* @__PURE__ */ a(it, { className: "size-4" }),
437
- trackingEl: o,
438
- trackingLabel: i,
439
- type: "text",
440
- value: b,
441
- onChange: (u) => C(u.target.value)
442
- }
443
- )
436
+ children: /* @__PURE__ */ w(ot, { className: "rounded-full", dataHook: l, children: [
437
+ /* @__PURE__ */ a(
438
+ it,
439
+ {
440
+ "aria-label": s,
441
+ placeholder: g,
442
+ trackingEl: o,
443
+ trackingLabel: i,
444
+ type: "text",
445
+ value: p,
446
+ onChange: (u) => S(u.target.value)
447
+ }
448
+ ),
449
+ /* @__PURE__ */ a(st, { className: "pr-3", children: /* @__PURE__ */ a(lt, { className: "size-4" }) })
450
+ ] })
444
451
  }
445
452
  );
446
453
  }
447
- Dt.displayName = "DataTableSearch";
448
- function Nt({
454
+ Nt.displayName = "DataTableSearch";
455
+ function Dt({
449
456
  table: n,
450
457
  dataHook: l,
451
458
  trackingEl: o,
@@ -453,8 +460,8 @@ function Nt({
453
460
  className: s,
454
461
  ariaLabel: g = "Table pagination"
455
462
  }) {
456
- const r = n.getState().pagination.pageIndex + 1, d = n.getPageCount(), h = n.getState().pagination.pageSize, b = n.getFilteredRowModel().rows.length, C = b === 0 ? 0 : (r - 1) * h + 1, u = Math.min(r * h, b), T = bt({
457
- page: r,
463
+ const c = n.getState().pagination.pageIndex + 1, d = n.getPageCount(), h = n.getState().pagination.pageSize, p = n.getFilteredRowModel().rows.length, S = p === 0 ? 0 : (c - 1) * h + 1, u = Math.min(c * h, p), y = pt({
464
+ page: c,
458
465
  totalPages: d,
459
466
  siblingCount: 1,
460
467
  boundaryCount: 1
@@ -462,56 +469,56 @@ function Nt({
462
469
  return /* @__PURE__ */ w(
463
470
  "div",
464
471
  {
465
- className: p("flex items-center justify-end gap-4", s),
472
+ className: b("flex items-center justify-end gap-4", s),
466
473
  "data-hook": l,
467
474
  "data-slot": "data-table-pagination",
468
475
  "data-tracking-el": o,
469
476
  "data-tracking-label": i,
470
477
  children: [
471
- /* @__PURE__ */ a("span", { className: "text-muted-foreground text-sm", children: b === 0 ? "0 of 0" : `${C}-${u} of ${b}` }),
478
+ /* @__PURE__ */ a("span", { className: "text-muted-foreground text-sm", children: p === 0 ? "0 of 0" : `${S}-${u} of ${p}` }),
472
479
  /* @__PURE__ */ a(
473
- pt,
480
+ bt,
474
481
  {
475
482
  ariaLabel: g,
476
483
  className: "mx-0 w-auto justify-end",
477
484
  dataHook: `${l}-nav`,
478
- children: /* @__PURE__ */ a(St, { children: T.map((m, y) => m === "previous" ? /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(
479
- wt,
485
+ children: /* @__PURE__ */ a(wt, { children: y.map((f, T) => f === "previous" ? /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(
486
+ Ct,
480
487
  {
481
488
  disabled: !n.getCanPreviousPage(),
482
489
  onClick: () => n.previousPage()
483
490
  }
484
- ) }, "previous") : m === "next" ? /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(
485
- Ct,
491
+ ) }, "previous") : f === "next" ? /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(
492
+ St,
486
493
  {
487
494
  disabled: !n.getCanNextPage(),
488
495
  onClick: () => n.nextPage()
489
496
  }
490
- ) }, "next") : m === "ellipsis" ? /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(kt, {}) }, `ellipsis-${y}`) : /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(
491
- xt,
497
+ ) }, "next") : f === "ellipsis" ? /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(xt, {}) }, `ellipsis-${T}`) : /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(
498
+ kt,
492
499
  {
493
- isActive: m === r,
494
- page: m,
495
- onClick: () => n.setPageIndex(m - 1)
500
+ isActive: f === c,
501
+ page: f,
502
+ onClick: () => n.setPageIndex(f - 1)
496
503
  }
497
- ) }, m)) })
504
+ ) }, f)) })
498
505
  }
499
506
  )
500
507
  ]
501
508
  }
502
509
  );
503
510
  }
504
- Nt.displayName = "DataTablePagination";
505
- function Mt({
511
+ Dt.displayName = "DataTablePagination";
512
+ function It({
506
513
  table: n,
507
514
  dataHook: l,
508
515
  trackingEl: o,
509
516
  trackingLabel: i
510
517
  }) {
511
518
  return /* @__PURE__ */ a(
512
- te,
519
+ Z,
513
520
  {
514
- ariaLabel: "Select all",
521
+ "aria-label": "Select all",
515
522
  checked: n.getIsAllPageRowsSelected() || n.getIsSomePageRowsSelected() && "indeterminate",
516
523
  dataHook: l || "select-all-checkbox",
517
524
  trackingEl: o,
@@ -520,17 +527,17 @@ function Mt({
520
527
  }
521
528
  );
522
529
  }
523
- Mt.displayName = "DataTableSelectAllCheckbox";
524
- function It({
530
+ It.displayName = "DataTableSelectAllCheckbox";
531
+ function Mt({
525
532
  row: n,
526
533
  dataHook: l,
527
534
  trackingEl: o,
528
535
  trackingLabel: i
529
536
  }) {
530
537
  return /* @__PURE__ */ a(
531
- te,
538
+ Z,
532
539
  {
533
- ariaLabel: "Select row",
540
+ "aria-label": "Select row",
534
541
  checked: n.getIsSelected(),
535
542
  dataHook: l || `select-row-${n.id}`,
536
543
  disabled: !n.getCanSelect(),
@@ -540,16 +547,16 @@ function It({
540
547
  }
541
548
  );
542
549
  }
543
- It.displayName = "DataTableSelectRowCheckbox";
550
+ Mt.displayName = "DataTableSelectRowCheckbox";
544
551
  export {
545
- Tt as DataTable,
546
- yt as DataTableColumnHeader,
547
- Nt as DataTablePagination,
552
+ yt as DataTable,
553
+ Tt as DataTableColumnHeader,
554
+ Dt as DataTablePagination,
548
555
  Pt as DataTableRowActions,
549
- Dt as DataTableSearch,
550
- Mt as DataTableSelectAllCheckbox,
551
- It as DataTableSelectRowCheckbox,
552
- U as DataTableToolbar,
556
+ Nt as DataTableSearch,
557
+ It as DataTableSelectAllCheckbox,
558
+ Mt as DataTableSelectRowCheckbox,
559
+ B as DataTableToolbar,
553
560
  qt as createColumnHelper,
554
561
  _t as flexRender
555
562
  };