@stereopt/data-table 0.1.8 → 0.1.10

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.
package/dist/index.js CHANGED
@@ -1,9 +1,8 @@
1
- // src/dataTable/DataTable.tsx
2
- import {
3
- flexRender,
4
- getCoreRowModel,
5
- useReactTable
6
- } from "@tanstack/react-table";
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
7
6
 
8
7
  // src/lib/utils.ts
9
8
  import { clsx } from "clsx";
@@ -18,13 +17,13 @@ function Table({ className, ...props }) {
18
17
  return /* @__PURE__ */ jsx(
19
18
  "div",
20
19
  {
21
- "data-slot": "table-container",
22
20
  className: "relative w-full overflow-x-auto",
21
+ "data-slot": "table-container",
23
22
  children: /* @__PURE__ */ jsx(
24
23
  "table",
25
24
  {
26
- "data-slot": "table",
27
25
  className: cn("w-full caption-bottom text-sm", className),
26
+ "data-slot": "table",
28
27
  ...props
29
28
  }
30
29
  )
@@ -35,8 +34,8 @@ function TableHeader({ className, ...props }) {
35
34
  return /* @__PURE__ */ jsx(
36
35
  "thead",
37
36
  {
38
- "data-slot": "table-header",
39
37
  className: cn("[&_tr]:border-b", className),
38
+ "data-slot": "table-header",
40
39
  ...props
41
40
  }
42
41
  );
@@ -45,8 +44,8 @@ function TableBody({ className, ...props }) {
45
44
  return /* @__PURE__ */ jsx(
46
45
  "tbody",
47
46
  {
48
- "data-slot": "table-body",
49
47
  className: cn("[&_tr:last-child]:border-0", className),
48
+ "data-slot": "table-body",
50
49
  ...props
51
50
  }
52
51
  );
@@ -55,11 +54,11 @@ function TableRow({ className, ...props }) {
55
54
  return /* @__PURE__ */ jsx(
56
55
  "tr",
57
56
  {
58
- "data-slot": "table-row",
59
57
  className: cn(
60
58
  "border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",
61
59
  className
62
60
  ),
61
+ "data-slot": "table-row",
63
62
  ...props
64
63
  }
65
64
  );
@@ -68,11 +67,11 @@ function TableHead({ className, ...props }) {
68
67
  return /* @__PURE__ */ jsx(
69
68
  "th",
70
69
  {
71
- "data-slot": "table-head",
72
70
  className: cn(
73
71
  "h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",
74
72
  className
75
73
  ),
74
+ "data-slot": "table-head",
76
75
  ...props
77
76
  }
78
77
  );
@@ -81,60 +80,501 @@ function TableCell({ className, ...props }) {
81
80
  return /* @__PURE__ */ jsx(
82
81
  "td",
83
82
  {
84
- "data-slot": "table-cell",
85
83
  className: cn(
86
84
  "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",
87
85
  className
88
86
  ),
87
+ "data-slot": "table-cell",
88
+ ...props
89
+ }
90
+ );
91
+ }
92
+
93
+ // src/components/ui/button.tsx
94
+ import { cva } from "class-variance-authority";
95
+
96
+ // node_modules/@radix-ui/react-slot/dist/index.mjs
97
+ var dist_exports = {};
98
+ __export(dist_exports, {
99
+ Root: () => Slot,
100
+ Slot: () => Slot,
101
+ Slottable: () => Slottable,
102
+ createSlot: () => createSlot,
103
+ createSlottable: () => createSlottable
104
+ });
105
+ import * as React2 from "react";
106
+
107
+ // node_modules/@radix-ui/react-compose-refs/dist/index.mjs
108
+ import * as React from "react";
109
+ function setRef(ref, value) {
110
+ if (typeof ref === "function") {
111
+ return ref(value);
112
+ } else if (ref !== null && ref !== void 0) {
113
+ ref.current = value;
114
+ }
115
+ }
116
+ function composeRefs(...refs) {
117
+ return (node) => {
118
+ let hasCleanup = false;
119
+ const cleanups = refs.map((ref) => {
120
+ const cleanup = setRef(ref, node);
121
+ if (!hasCleanup && typeof cleanup == "function") {
122
+ hasCleanup = true;
123
+ }
124
+ return cleanup;
125
+ });
126
+ if (hasCleanup) {
127
+ return () => {
128
+ for (let i = 0; i < cleanups.length; i++) {
129
+ const cleanup = cleanups[i];
130
+ if (typeof cleanup == "function") {
131
+ cleanup();
132
+ } else {
133
+ setRef(refs[i], null);
134
+ }
135
+ }
136
+ };
137
+ }
138
+ };
139
+ }
140
+
141
+ // node_modules/@radix-ui/react-slot/dist/index.mjs
142
+ import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime";
143
+ // @__NO_SIDE_EFFECTS__
144
+ function createSlot(ownerName) {
145
+ const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
146
+ const Slot2 = React2.forwardRef((props, forwardedRef) => {
147
+ const { children, ...slotProps } = props;
148
+ const childrenArray = React2.Children.toArray(children);
149
+ const slottable = childrenArray.find(isSlottable);
150
+ if (slottable) {
151
+ const newElement = slottable.props.children;
152
+ const newChildren = childrenArray.map((child) => {
153
+ if (child === slottable) {
154
+ if (React2.Children.count(newElement) > 1) return React2.Children.only(null);
155
+ return React2.isValidElement(newElement) ? newElement.props.children : null;
156
+ } else {
157
+ return child;
158
+ }
159
+ });
160
+ return /* @__PURE__ */ jsx2(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
161
+ }
162
+ return /* @__PURE__ */ jsx2(SlotClone, { ...slotProps, ref: forwardedRef, children });
163
+ });
164
+ Slot2.displayName = `${ownerName}.Slot`;
165
+ return Slot2;
166
+ }
167
+ var Slot = /* @__PURE__ */ createSlot("Slot");
168
+ // @__NO_SIDE_EFFECTS__
169
+ function createSlotClone(ownerName) {
170
+ const SlotClone = React2.forwardRef((props, forwardedRef) => {
171
+ const { children, ...slotProps } = props;
172
+ if (React2.isValidElement(children)) {
173
+ const childrenRef = getElementRef(children);
174
+ const props2 = mergeProps(slotProps, children.props);
175
+ if (children.type !== React2.Fragment) {
176
+ props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
177
+ }
178
+ return React2.cloneElement(children, props2);
179
+ }
180
+ return React2.Children.count(children) > 1 ? React2.Children.only(null) : null;
181
+ });
182
+ SlotClone.displayName = `${ownerName}.SlotClone`;
183
+ return SlotClone;
184
+ }
185
+ var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
186
+ // @__NO_SIDE_EFFECTS__
187
+ function createSlottable(ownerName) {
188
+ const Slottable2 = ({ children }) => {
189
+ return /* @__PURE__ */ jsx2(Fragment2, { children });
190
+ };
191
+ Slottable2.displayName = `${ownerName}.Slottable`;
192
+ Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
193
+ return Slottable2;
194
+ }
195
+ var Slottable = /* @__PURE__ */ createSlottable("Slottable");
196
+ function isSlottable(child) {
197
+ return React2.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
198
+ }
199
+ function mergeProps(slotProps, childProps) {
200
+ const overrideProps = { ...childProps };
201
+ for (const propName in childProps) {
202
+ const slotPropValue = slotProps[propName];
203
+ const childPropValue = childProps[propName];
204
+ const isHandler = /^on[A-Z]/.test(propName);
205
+ if (isHandler) {
206
+ if (slotPropValue && childPropValue) {
207
+ overrideProps[propName] = (...args) => {
208
+ const result = childPropValue(...args);
209
+ slotPropValue(...args);
210
+ return result;
211
+ };
212
+ } else if (slotPropValue) {
213
+ overrideProps[propName] = slotPropValue;
214
+ }
215
+ } else if (propName === "style") {
216
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
217
+ } else if (propName === "className") {
218
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
219
+ }
220
+ }
221
+ return { ...slotProps, ...overrideProps };
222
+ }
223
+ function getElementRef(element) {
224
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
225
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
226
+ if (mayWarn) {
227
+ return element.ref;
228
+ }
229
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
230
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
231
+ if (mayWarn) {
232
+ return element.props.ref;
233
+ }
234
+ return element.props.ref || element.ref;
235
+ }
236
+
237
+ // src/components/ui/button.tsx
238
+ import { jsx as jsx3 } from "react/jsx-runtime";
239
+ var buttonVariants = cva(
240
+ "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
241
+ {
242
+ variants: {
243
+ variant: {
244
+ default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
245
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
246
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
247
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
248
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
249
+ link: "text-primary underline-offset-4 hover:underline"
250
+ },
251
+ size: {
252
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
253
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
254
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
255
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
256
+ icon: "size-8",
257
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
258
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
259
+ "icon-lg": "size-9"
260
+ }
261
+ },
262
+ defaultVariants: {
263
+ variant: "default",
264
+ size: "default"
265
+ }
266
+ }
267
+ );
268
+ function Button({
269
+ className,
270
+ variant = "default",
271
+ size = "default",
272
+ asChild = false,
273
+ ...props
274
+ }) {
275
+ const Comp = asChild ? dist_exports.Root : "button";
276
+ return /* @__PURE__ */ jsx3(
277
+ Comp,
278
+ {
279
+ className: cn(buttonVariants({ variant, size, className })),
280
+ "data-size": size,
281
+ "data-slot": "button",
282
+ "data-variant": variant,
89
283
  ...props
90
284
  }
91
285
  );
92
286
  }
93
287
 
288
+ // node_modules/lucide-react/dist/esm/createLucideIcon.js
289
+ import { forwardRef as forwardRef3, createElement as createElement2 } from "react";
290
+
291
+ // node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
292
+ var mergeClasses = (...classes) => classes.filter((className, index, array) => {
293
+ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
294
+ }).join(" ").trim();
295
+
296
+ // node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.js
297
+ var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
298
+
299
+ // node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.js
300
+ var toCamelCase = (string) => string.replace(
301
+ /^([A-Z])|[\s-_]+(\w)/g,
302
+ (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
303
+ );
304
+
305
+ // node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.js
306
+ var toPascalCase = (string) => {
307
+ const camelCase = toCamelCase(string);
308
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
309
+ };
310
+
311
+ // node_modules/lucide-react/dist/esm/Icon.js
312
+ import { forwardRef as forwardRef2, createElement } from "react";
313
+
314
+ // node_modules/lucide-react/dist/esm/defaultAttributes.js
315
+ var defaultAttributes = {
316
+ xmlns: "http://www.w3.org/2000/svg",
317
+ width: 24,
318
+ height: 24,
319
+ viewBox: "0 0 24 24",
320
+ fill: "none",
321
+ stroke: "currentColor",
322
+ strokeWidth: 2,
323
+ strokeLinecap: "round",
324
+ strokeLinejoin: "round"
325
+ };
326
+
327
+ // node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.js
328
+ var hasA11yProp = (props) => {
329
+ for (const prop in props) {
330
+ if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
331
+ return true;
332
+ }
333
+ }
334
+ return false;
335
+ };
336
+
337
+ // node_modules/lucide-react/dist/esm/Icon.js
338
+ var Icon = forwardRef2(
339
+ ({
340
+ color = "currentColor",
341
+ size = 24,
342
+ strokeWidth = 2,
343
+ absoluteStrokeWidth,
344
+ className = "",
345
+ children,
346
+ iconNode,
347
+ ...rest
348
+ }, ref) => createElement(
349
+ "svg",
350
+ {
351
+ ref,
352
+ ...defaultAttributes,
353
+ width: size,
354
+ height: size,
355
+ stroke: color,
356
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
357
+ className: mergeClasses("lucide", className),
358
+ ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
359
+ ...rest
360
+ },
361
+ [
362
+ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
363
+ ...Array.isArray(children) ? children : [children]
364
+ ]
365
+ )
366
+ );
367
+
368
+ // node_modules/lucide-react/dist/esm/createLucideIcon.js
369
+ var createLucideIcon = (iconName, iconNode) => {
370
+ const Component = forwardRef3(
371
+ ({ className, ...props }, ref) => createElement2(Icon, {
372
+ ref,
373
+ iconNode,
374
+ className: mergeClasses(
375
+ `lucide-${toKebabCase(toPascalCase(iconName))}`,
376
+ `lucide-${iconName}`,
377
+ className
378
+ ),
379
+ ...props
380
+ })
381
+ );
382
+ Component.displayName = toPascalCase(iconName);
383
+ return Component;
384
+ };
385
+
386
+ // node_modules/lucide-react/dist/esm/icons/chevron-left.js
387
+ var __iconNode = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
388
+ var ChevronLeft = createLucideIcon("chevron-left", __iconNode);
389
+
390
+ // node_modules/lucide-react/dist/esm/icons/chevron-right.js
391
+ var __iconNode2 = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
392
+ var ChevronRight = createLucideIcon("chevron-right", __iconNode2);
393
+
394
+ // node_modules/lucide-react/dist/esm/icons/chevrons-left.js
395
+ var __iconNode3 = [
396
+ ["path", { d: "m11 17-5-5 5-5", key: "13zhaf" }],
397
+ ["path", { d: "m18 17-5-5 5-5", key: "h8a8et" }]
398
+ ];
399
+ var ChevronsLeft = createLucideIcon("chevrons-left", __iconNode3);
400
+
401
+ // node_modules/lucide-react/dist/esm/icons/chevrons-right.js
402
+ var __iconNode4 = [
403
+ ["path", { d: "m6 17 5-5-5-5", key: "xnjwq" }],
404
+ ["path", { d: "m13 17 5-5-5-5", key: "17xmmf" }]
405
+ ];
406
+ var ChevronsRight = createLucideIcon("chevrons-right", __iconNode4);
407
+
408
+ // src/dataTable/pagination/DataTablePagination.tsx
409
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
410
+ function DataTablePagination({
411
+ table
412
+ }) {
413
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-2 pt-4", children: [
414
+ /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [
415
+ table.getFilteredRowModel().rows.length,
416
+ " rows"
417
+ ] }),
418
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
419
+ /* @__PURE__ */ jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
420
+ "Page ",
421
+ table.getState().pagination.pageIndex + 1,
422
+ " of",
423
+ " ",
424
+ table.getPageCount() || 1
425
+ ] }),
426
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
427
+ /* @__PURE__ */ jsxs(
428
+ Button,
429
+ {
430
+ className: "hidden size-8 lg:flex",
431
+ disabled: !table.getCanPreviousPage(),
432
+ onClick: () => table.setPageIndex(0),
433
+ size: "icon",
434
+ variant: "outline",
435
+ children: [
436
+ /* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Go to first page" }),
437
+ /* @__PURE__ */ jsx4(ChevronsLeft, {})
438
+ ]
439
+ }
440
+ ),
441
+ /* @__PURE__ */ jsxs(
442
+ Button,
443
+ {
444
+ className: "size-8",
445
+ disabled: !table.getCanPreviousPage(),
446
+ onClick: () => table.previousPage(),
447
+ size: "icon",
448
+ variant: "outline",
449
+ children: [
450
+ /* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Go to previous page" }),
451
+ /* @__PURE__ */ jsx4(ChevronLeft, {})
452
+ ]
453
+ }
454
+ ),
455
+ /* @__PURE__ */ jsxs(
456
+ Button,
457
+ {
458
+ className: "size-8",
459
+ disabled: !table.getCanNextPage(),
460
+ onClick: () => table.nextPage(),
461
+ size: "icon",
462
+ variant: "outline",
463
+ children: [
464
+ /* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Go to next page" }),
465
+ /* @__PURE__ */ jsx4(ChevronRight, {})
466
+ ]
467
+ }
468
+ ),
469
+ /* @__PURE__ */ jsxs(
470
+ Button,
471
+ {
472
+ className: "hidden size-8 lg:flex",
473
+ disabled: !table.getCanNextPage(),
474
+ onClick: () => table.setPageIndex(table.getPageCount() - 1),
475
+ size: "icon",
476
+ variant: "outline",
477
+ children: [
478
+ /* @__PURE__ */ jsx4("span", { className: "sr-only", children: "Go to last page" }),
479
+ /* @__PURE__ */ jsx4(ChevronsRight, {})
480
+ ]
481
+ }
482
+ )
483
+ ] })
484
+ ] })
485
+ ] });
486
+ }
487
+
94
488
  // src/dataTable/DataTable.tsx
95
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
96
- function DataTable({ columns, data }) {
489
+ import {
490
+ flexRender,
491
+ getCoreRowModel,
492
+ getFacetedRowModel,
493
+ getFacetedUniqueValues,
494
+ getFilteredRowModel,
495
+ getPaginationRowModel,
496
+ useReactTable
497
+ } from "@tanstack/react-table";
498
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
499
+ function DataTable({
500
+ columns,
501
+ data,
502
+ config
503
+ }) {
97
504
  const table = useReactTable({
98
505
  data,
99
506
  columns,
100
- getCoreRowModel: getCoreRowModel()
507
+ getCoreRowModel: getCoreRowModel(),
508
+ getPaginationRowModel: getPaginationRowModel(),
509
+ getFilteredRowModel: getFilteredRowModel(),
510
+ getFacetedRowModel: getFacetedRowModel(),
511
+ getFacetedUniqueValues: getFacetedUniqueValues(),
512
+ autoResetPageIndex: false,
513
+ initialState: {
514
+ columnVisibility: config?.columnVisibility
515
+ }
101
516
  });
102
- return /* @__PURE__ */ jsx2("div", { className: "w-full", children: /* @__PURE__ */ jsx2("div", { className: "rounded-md border overflow-hidden", children: /* @__PURE__ */ jsxs(Table, { children: [
103
- /* @__PURE__ */ jsx2(TableHeader, { className: "bg-muted", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx2(TableRow, { children: headerGroup.headers.map((header) => {
104
- return /* @__PURE__ */ jsx2(
105
- TableHead,
517
+ return /* @__PURE__ */ jsxs2("div", { className: "w-full", children: [
518
+ /* @__PURE__ */ jsx5("div", { className: "rounded-md border overflow-hidden", children: /* @__PURE__ */ jsxs2(Table, { children: [
519
+ /* @__PURE__ */ jsx5(TableHeader, { className: "bg-muted", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx5(TableRow, { children: headerGroup.headers.map((header) => {
520
+ return /* @__PURE__ */ jsx5(
521
+ TableHead,
522
+ {
523
+ colSpan: header.colSpan,
524
+ style: { width: header.getSize() },
525
+ children: header.isPlaceholder ? null : flexRender(
526
+ header.column.columnDef.header,
527
+ header.getContext()
528
+ )
529
+ },
530
+ header.id
531
+ );
532
+ }) }, headerGroup.id)) }),
533
+ /* @__PURE__ */ jsx5(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx5(
534
+ TableRow,
106
535
  {
107
- colSpan: header.colSpan,
108
- style: { width: header.getSize() },
109
- children: header.isPlaceholder ? null : flexRender(
110
- header.column.columnDef.header,
111
- header.getContext()
112
- )
536
+ "data-state": row.getIsSelected() && "selected",
537
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx5(TableCell, { className: "truncate max-w-0", children: flexRender(
538
+ cell.column.columnDef.cell,
539
+ cell.getContext()
540
+ ) }, cell.id))
113
541
  },
114
- header.id
115
- );
116
- }) }, headerGroup.id)) }),
117
- /* @__PURE__ */ jsx2(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx2(
118
- TableRow,
119
- {
120
- "data-state": row.getIsSelected() && "selected",
121
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx2(TableCell, { className: "truncate max-w-0", children: flexRender(
122
- cell.column.columnDef.cell,
123
- cell.getContext()
124
- ) }, cell.id))
125
- },
126
- row.id
127
- )) : /* @__PURE__ */ jsx2(TableRow, { children: /* @__PURE__ */ jsx2(
128
- TableCell,
129
- {
130
- className: "h-24 text-center",
131
- colSpan: columns.length,
132
- children: "No results."
133
- }
134
- ) }) })
135
- ] }) }) });
542
+ row.id
543
+ )) : /* @__PURE__ */ jsx5(TableRow, { children: /* @__PURE__ */ jsx5(
544
+ TableCell,
545
+ {
546
+ className: "h-24 text-center",
547
+ colSpan: columns.length,
548
+ children: "No results."
549
+ }
550
+ ) }) })
551
+ ] }) }),
552
+ /* @__PURE__ */ jsx5(DataTablePagination, { table })
553
+ ] });
136
554
  }
137
555
  export {
138
556
  DataTable,
139
557
  DataTable as default
140
558
  };
559
+ /*! Bundled license information:
560
+
561
+ lucide-react/dist/esm/shared/src/utils/mergeClasses.js:
562
+ lucide-react/dist/esm/shared/src/utils/toKebabCase.js:
563
+ lucide-react/dist/esm/shared/src/utils/toCamelCase.js:
564
+ lucide-react/dist/esm/shared/src/utils/toPascalCase.js:
565
+ lucide-react/dist/esm/defaultAttributes.js:
566
+ lucide-react/dist/esm/shared/src/utils/hasA11yProp.js:
567
+ lucide-react/dist/esm/Icon.js:
568
+ lucide-react/dist/esm/createLucideIcon.js:
569
+ lucide-react/dist/esm/icons/chevron-left.js:
570
+ lucide-react/dist/esm/icons/chevron-right.js:
571
+ lucide-react/dist/esm/icons/chevrons-left.js:
572
+ lucide-react/dist/esm/icons/chevrons-right.js:
573
+ lucide-react/dist/esm/lucide-react.js:
574
+ (**
575
+ * @license lucide-react v0.574.0 - ISC
576
+ *
577
+ * This source code is licensed under the ISC license.
578
+ * See the LICENSE file in the root directory of this source tree.
579
+ *)
580
+ */