@stereopt/data-table 0.1.12 → 0.1.13

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.cjs CHANGED
@@ -139,24 +139,25 @@ function Input({ className, type, ...props }) {
139
139
  }
140
140
 
141
141
  // src/dataTable/filters/DataTableFilter.tsx
142
+ var import_jsx_runtime3 = require("react/jsx-runtime");
142
143
  var DataTableFilter = ({
143
144
  table,
144
145
  filter
145
146
  }) => {
146
147
  switch (filter.type) {
147
148
  case "select": {
148
- throw Error("Select Filter not implemented yet");
149
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("pre", { children: '"Select Filter not implemented yet"' });
149
150
  }
150
151
  case "date": {
151
- throw Error("Date Filter not implemented yet");
152
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("pre", { children: '"Date Filter not implemented yet"' });
152
153
  }
153
154
  default:
154
- throw new Error("Type not Implemented", filter.type);
155
+ throw new Error(`Type not Implemented: ${filter.type}`);
155
156
  }
156
157
  };
157
158
 
158
159
  // src/dataTable/DataTableControls.tsx
159
- var import_jsx_runtime3 = require("react/jsx-runtime");
160
+ var import_jsx_runtime4 = require("react/jsx-runtime");
160
161
  var DataTableControls = ({
161
162
  table,
162
163
  search,
@@ -165,8 +166,8 @@ var DataTableControls = ({
165
166
  const value = table.getState().globalFilter ?? "";
166
167
  const setValue = table.setGlobalFilter;
167
168
  if (!filters && !search) return null;
168
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center gap-4 pb-4", children: [
169
- search && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
169
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-4 pb-4", children: [
170
+ search && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
170
171
  Input,
171
172
  {
172
173
  className: "max-w-sm",
@@ -176,7 +177,7 @@ var DataTableControls = ({
176
177
  }
177
178
  ),
178
179
  filters?.map((filter) => {
179
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
180
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
180
181
  DataTableFilter,
181
182
  {
182
183
  filter,
@@ -237,7 +238,7 @@ function composeRefs(...refs) {
237
238
  }
238
239
 
239
240
  // node_modules/@radix-ui/react-slot/dist/index.mjs
240
- var import_jsx_runtime4 = require("react/jsx-runtime");
241
+ var import_jsx_runtime5 = require("react/jsx-runtime");
241
242
  // @__NO_SIDE_EFFECTS__
242
243
  function createSlot(ownerName) {
243
244
  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
@@ -255,9 +256,9 @@ function createSlot(ownerName) {
255
256
  return child;
256
257
  }
257
258
  });
258
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
259
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
259
260
  }
260
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
261
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
261
262
  });
262
263
  Slot2.displayName = `${ownerName}.Slot`;
263
264
  return Slot2;
@@ -284,7 +285,7 @@ var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
284
285
  // @__NO_SIDE_EFFECTS__
285
286
  function createSlottable(ownerName) {
286
287
  const Slottable2 = ({ children }) => {
287
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children });
288
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children });
288
289
  };
289
290
  Slottable2.displayName = `${ownerName}.Slottable`;
290
291
  Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
@@ -333,7 +334,7 @@ function getElementRef(element) {
333
334
  }
334
335
 
335
336
  // src/components/ui/button.tsx
336
- var import_jsx_runtime5 = require("react/jsx-runtime");
337
+ var import_jsx_runtime6 = require("react/jsx-runtime");
337
338
  var buttonVariants = (0, import_class_variance_authority.cva)(
338
339
  "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",
339
340
  {
@@ -371,7 +372,7 @@ function Button({
371
372
  ...props
372
373
  }) {
373
374
  const Comp = asChild ? dist_exports.Root : "button";
374
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
375
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
375
376
  Comp,
376
377
  {
377
378
  className: cn(buttonVariants({ variant, size, className })),
@@ -504,25 +505,25 @@ var __iconNode4 = [
504
505
  var ChevronsRight = createLucideIcon("chevrons-right", __iconNode4);
505
506
 
506
507
  // src/dataTable/pagination/DataTablePagination.tsx
507
- var import_jsx_runtime6 = require("react/jsx-runtime");
508
+ var import_jsx_runtime7 = require("react/jsx-runtime");
508
509
  function DataTablePagination({
509
510
  table
510
511
  }) {
511
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between px-2 pt-4", children: [
512
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "text-muted-foreground flex-1 text-sm", children: [
512
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between px-2 pt-4", children: [
513
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "text-muted-foreground flex-1 text-sm", children: [
513
514
  table.getFilteredRowModel().rows.length,
514
515
  " rows"
515
516
  ] }),
516
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
517
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
517
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
518
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
518
519
  "Page ",
519
520
  table.getState().pagination.pageIndex + 1,
520
521
  " of",
521
522
  " ",
522
523
  table.getPageCount() || 1
523
524
  ] }),
524
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center space-x-2", children: [
525
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
525
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center space-x-2", children: [
526
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
526
527
  Button,
527
528
  {
528
529
  className: "hidden size-8 lg:flex",
@@ -531,12 +532,12 @@ function DataTablePagination({
531
532
  size: "icon",
532
533
  variant: "outline",
533
534
  children: [
534
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "sr-only", children: "Go to first page" }),
535
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ChevronsLeft, {})
535
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sr-only", children: "Go to first page" }),
536
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronsLeft, {})
536
537
  ]
537
538
  }
538
539
  ),
539
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
540
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
540
541
  Button,
541
542
  {
542
543
  className: "size-8",
@@ -545,12 +546,12 @@ function DataTablePagination({
545
546
  size: "icon",
546
547
  variant: "outline",
547
548
  children: [
548
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "sr-only", children: "Go to previous page" }),
549
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ChevronLeft, {})
549
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sr-only", children: "Go to previous page" }),
550
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronLeft, {})
550
551
  ]
551
552
  }
552
553
  ),
553
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
554
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
554
555
  Button,
555
556
  {
556
557
  className: "size-8",
@@ -559,12 +560,12 @@ function DataTablePagination({
559
560
  size: "icon",
560
561
  variant: "outline",
561
562
  children: [
562
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "sr-only", children: "Go to next page" }),
563
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ChevronRight, {})
563
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sr-only", children: "Go to next page" }),
564
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronRight, {})
564
565
  ]
565
566
  }
566
567
  ),
567
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
568
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
568
569
  Button,
569
570
  {
570
571
  className: "hidden size-8 lg:flex",
@@ -573,8 +574,8 @@ function DataTablePagination({
573
574
  size: "icon",
574
575
  variant: "outline",
575
576
  children: [
576
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "sr-only", children: "Go to last page" }),
577
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ChevronsRight, {})
577
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "sr-only", children: "Go to last page" }),
578
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(ChevronsRight, {})
578
579
  ]
579
580
  }
580
581
  )
@@ -595,7 +596,7 @@ var fuzzyFilterFn = (searchableColumns) => (row, columnId, filterValue, addMeta)
595
596
 
596
597
  // src/dataTable/DataTable.tsx
597
598
  var import_react_table = require("@tanstack/react-table");
598
- var import_jsx_runtime7 = require("react/jsx-runtime");
599
+ var import_jsx_runtime8 = require("react/jsx-runtime");
599
600
  function DataTable({
600
601
  columns,
601
602
  data,
@@ -615,8 +616,8 @@ function DataTable({
615
616
  columnVisibility: config?.columnVisibility
616
617
  }
617
618
  });
618
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "w-full", children: [
619
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
619
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-full", children: [
620
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
620
621
  DataTableControls,
621
622
  {
622
623
  filters: config?.filters,
@@ -624,9 +625,9 @@ function DataTable({
624
625
  table
625
626
  }
626
627
  ),
627
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "rounded-md border overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(Table, { children: [
628
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TableHeader, { className: "bg-muted", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TableRow, { children: headerGroup.headers.map((header) => {
629
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
628
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rounded-md border overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Table, { children: [
629
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableHeader, { className: "bg-muted", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableRow, { children: headerGroup.headers.map((header) => {
630
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
630
631
  TableHead,
631
632
  {
632
633
  colSpan: header.colSpan,
@@ -639,17 +640,17 @@ function DataTable({
639
640
  header.id
640
641
  );
641
642
  }) }, headerGroup.id)) }),
642
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
643
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
643
644
  TableRow,
644
645
  {
645
646
  "data-state": row.getIsSelected() && "selected",
646
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TableCell, { className: "truncate max-w-0", children: (0, import_react_table.flexRender)(
647
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableCell, { className: "truncate max-w-0", children: (0, import_react_table.flexRender)(
647
648
  cell.column.columnDef.cell,
648
649
  cell.getContext()
649
650
  ) }, cell.id))
650
651
  },
651
652
  row.id
652
- )) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
653
+ )) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
653
654
  TableCell,
654
655
  {
655
656
  className: "h-24 text-center",
@@ -658,7 +659,7 @@ function DataTable({
658
659
  }
659
660
  ) }) })
660
661
  ] }) }),
661
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DataTablePagination, { table })
662
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DataTablePagination, { table })
662
663
  ] });
663
664
  }
664
665
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.js CHANGED
@@ -108,24 +108,25 @@ function Input({ className, type, ...props }) {
108
108
  }
109
109
 
110
110
  // src/dataTable/filters/DataTableFilter.tsx
111
+ import { jsx as jsx3 } from "react/jsx-runtime";
111
112
  var DataTableFilter = ({
112
113
  table,
113
114
  filter
114
115
  }) => {
115
116
  switch (filter.type) {
116
117
  case "select": {
117
- throw Error("Select Filter not implemented yet");
118
+ return /* @__PURE__ */ jsx3("pre", { children: '"Select Filter not implemented yet"' });
118
119
  }
119
120
  case "date": {
120
- throw Error("Date Filter not implemented yet");
121
+ return /* @__PURE__ */ jsx3("pre", { children: '"Date Filter not implemented yet"' });
121
122
  }
122
123
  default:
123
- throw new Error("Type not Implemented", filter.type);
124
+ throw new Error(`Type not Implemented: ${filter.type}`);
124
125
  }
125
126
  };
126
127
 
127
128
  // src/dataTable/DataTableControls.tsx
128
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
129
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
129
130
  var DataTableControls = ({
130
131
  table,
131
132
  search,
@@ -135,7 +136,7 @@ var DataTableControls = ({
135
136
  const setValue = table.setGlobalFilter;
136
137
  if (!filters && !search) return null;
137
138
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 pb-4", children: [
138
- search && /* @__PURE__ */ jsx3(
139
+ search && /* @__PURE__ */ jsx4(
139
140
  Input,
140
141
  {
141
142
  className: "max-w-sm",
@@ -145,7 +146,7 @@ var DataTableControls = ({
145
146
  }
146
147
  ),
147
148
  filters?.map((filter) => {
148
- return /* @__PURE__ */ jsx3(
149
+ return /* @__PURE__ */ jsx4(
149
150
  DataTableFilter,
150
151
  {
151
152
  filter,
@@ -206,7 +207,7 @@ function composeRefs(...refs) {
206
207
  }
207
208
 
208
209
  // node_modules/@radix-ui/react-slot/dist/index.mjs
209
- import { Fragment as Fragment2, jsx as jsx4 } from "react/jsx-runtime";
210
+ import { Fragment as Fragment2, jsx as jsx5 } from "react/jsx-runtime";
210
211
  // @__NO_SIDE_EFFECTS__
211
212
  function createSlot(ownerName) {
212
213
  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
@@ -224,9 +225,9 @@ function createSlot(ownerName) {
224
225
  return child;
225
226
  }
226
227
  });
227
- return /* @__PURE__ */ jsx4(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
228
+ return /* @__PURE__ */ jsx5(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
228
229
  }
229
- return /* @__PURE__ */ jsx4(SlotClone, { ...slotProps, ref: forwardedRef, children });
230
+ return /* @__PURE__ */ jsx5(SlotClone, { ...slotProps, ref: forwardedRef, children });
230
231
  });
231
232
  Slot2.displayName = `${ownerName}.Slot`;
232
233
  return Slot2;
@@ -253,7 +254,7 @@ var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
253
254
  // @__NO_SIDE_EFFECTS__
254
255
  function createSlottable(ownerName) {
255
256
  const Slottable2 = ({ children }) => {
256
- return /* @__PURE__ */ jsx4(Fragment2, { children });
257
+ return /* @__PURE__ */ jsx5(Fragment2, { children });
257
258
  };
258
259
  Slottable2.displayName = `${ownerName}.Slottable`;
259
260
  Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
@@ -302,7 +303,7 @@ function getElementRef(element) {
302
303
  }
303
304
 
304
305
  // src/components/ui/button.tsx
305
- import { jsx as jsx5 } from "react/jsx-runtime";
306
+ import { jsx as jsx6 } from "react/jsx-runtime";
306
307
  var buttonVariants = cva(
307
308
  "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",
308
309
  {
@@ -340,7 +341,7 @@ function Button({
340
341
  ...props
341
342
  }) {
342
343
  const Comp = asChild ? dist_exports.Root : "button";
343
- return /* @__PURE__ */ jsx5(
344
+ return /* @__PURE__ */ jsx6(
344
345
  Comp,
345
346
  {
346
347
  className: cn(buttonVariants({ variant, size, className })),
@@ -473,7 +474,7 @@ var __iconNode4 = [
473
474
  var ChevronsRight = createLucideIcon("chevrons-right", __iconNode4);
474
475
 
475
476
  // src/dataTable/pagination/DataTablePagination.tsx
476
- import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
477
+ import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
477
478
  function DataTablePagination({
478
479
  table
479
480
  }) {
@@ -500,8 +501,8 @@ function DataTablePagination({
500
501
  size: "icon",
501
502
  variant: "outline",
502
503
  children: [
503
- /* @__PURE__ */ jsx6("span", { className: "sr-only", children: "Go to first page" }),
504
- /* @__PURE__ */ jsx6(ChevronsLeft, {})
504
+ /* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Go to first page" }),
505
+ /* @__PURE__ */ jsx7(ChevronsLeft, {})
505
506
  ]
506
507
  }
507
508
  ),
@@ -514,8 +515,8 @@ function DataTablePagination({
514
515
  size: "icon",
515
516
  variant: "outline",
516
517
  children: [
517
- /* @__PURE__ */ jsx6("span", { className: "sr-only", children: "Go to previous page" }),
518
- /* @__PURE__ */ jsx6(ChevronLeft, {})
518
+ /* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Go to previous page" }),
519
+ /* @__PURE__ */ jsx7(ChevronLeft, {})
519
520
  ]
520
521
  }
521
522
  ),
@@ -528,8 +529,8 @@ function DataTablePagination({
528
529
  size: "icon",
529
530
  variant: "outline",
530
531
  children: [
531
- /* @__PURE__ */ jsx6("span", { className: "sr-only", children: "Go to next page" }),
532
- /* @__PURE__ */ jsx6(ChevronRight, {})
532
+ /* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Go to next page" }),
533
+ /* @__PURE__ */ jsx7(ChevronRight, {})
533
534
  ]
534
535
  }
535
536
  ),
@@ -542,8 +543,8 @@ function DataTablePagination({
542
543
  size: "icon",
543
544
  variant: "outline",
544
545
  children: [
545
- /* @__PURE__ */ jsx6("span", { className: "sr-only", children: "Go to last page" }),
546
- /* @__PURE__ */ jsx6(ChevronsRight, {})
546
+ /* @__PURE__ */ jsx7("span", { className: "sr-only", children: "Go to last page" }),
547
+ /* @__PURE__ */ jsx7(ChevronsRight, {})
547
548
  ]
548
549
  }
549
550
  )
@@ -572,7 +573,7 @@ import {
572
573
  getPaginationRowModel,
573
574
  useReactTable
574
575
  } from "@tanstack/react-table";
575
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
576
+ import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
576
577
  function DataTable({
577
578
  columns,
578
579
  data,
@@ -593,7 +594,7 @@ function DataTable({
593
594
  }
594
595
  });
595
596
  return /* @__PURE__ */ jsxs3("div", { className: "w-full", children: [
596
- /* @__PURE__ */ jsx7(
597
+ /* @__PURE__ */ jsx8(
597
598
  DataTableControls,
598
599
  {
599
600
  filters: config?.filters,
@@ -601,9 +602,9 @@ function DataTable({
601
602
  table
602
603
  }
603
604
  ),
604
- /* @__PURE__ */ jsx7("div", { className: "rounded-md border overflow-hidden", children: /* @__PURE__ */ jsxs3(Table, { children: [
605
- /* @__PURE__ */ jsx7(TableHeader, { className: "bg-muted", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx7(TableRow, { children: headerGroup.headers.map((header) => {
606
- return /* @__PURE__ */ jsx7(
605
+ /* @__PURE__ */ jsx8("div", { className: "rounded-md border overflow-hidden", children: /* @__PURE__ */ jsxs3(Table, { children: [
606
+ /* @__PURE__ */ jsx8(TableHeader, { className: "bg-muted", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx8(TableRow, { children: headerGroup.headers.map((header) => {
607
+ return /* @__PURE__ */ jsx8(
607
608
  TableHead,
608
609
  {
609
610
  colSpan: header.colSpan,
@@ -616,17 +617,17 @@ function DataTable({
616
617
  header.id
617
618
  );
618
619
  }) }, headerGroup.id)) }),
619
- /* @__PURE__ */ jsx7(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx7(
620
+ /* @__PURE__ */ jsx8(TableBody, { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx8(
620
621
  TableRow,
621
622
  {
622
623
  "data-state": row.getIsSelected() && "selected",
623
- children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx7(TableCell, { className: "truncate max-w-0", children: flexRender(
624
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx8(TableCell, { className: "truncate max-w-0", children: flexRender(
624
625
  cell.column.columnDef.cell,
625
626
  cell.getContext()
626
627
  ) }, cell.id))
627
628
  },
628
629
  row.id
629
- )) : /* @__PURE__ */ jsx7(TableRow, { children: /* @__PURE__ */ jsx7(
630
+ )) : /* @__PURE__ */ jsx8(TableRow, { children: /* @__PURE__ */ jsx8(
630
631
  TableCell,
631
632
  {
632
633
  className: "h-24 text-center",
@@ -635,7 +636,7 @@ function DataTable({
635
636
  }
636
637
  ) }) })
637
638
  ] }) }),
638
- /* @__PURE__ */ jsx7(DataTablePagination, { table })
639
+ /* @__PURE__ */ jsx8(DataTablePagination, { table })
639
640
  ] });
640
641
  }
641
642
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stereopt/data-table",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Simple reusable React data table component",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",