@moontra/moonui-pro 2.4.2 → 2.4.4
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.mjs +3 -3
- package/package.json +1 -1
- package/src/components/data-table/index.tsx +33 -31
package/dist/index.mjs
CHANGED
|
@@ -53265,7 +53265,7 @@ function DataTable({
|
|
|
53265
53265
|
] })
|
|
53266
53266
|
] }),
|
|
53267
53267
|
/* @__PURE__ */ jsx("div", { className: "moonui-pro-datatable-wrapper rounded-md border overflow-hidden", style: { contain: "layout style" }, children: /* @__PURE__ */ jsx("div", { style: { overflowX: "auto" }, children: /* @__PURE__ */ jsxs("table", { className: "moonui-pro-datatable", style: { width: "100%", tableLayout: "auto" }, children: [
|
|
53268
|
-
/* @__PURE__ */ jsx("thead", { className: "moonui-data-table-header", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", { className: "moonui-data-table-row border-b", children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx(
|
|
53268
|
+
/* @__PURE__ */ jsx("thead", { className: "moonui-data-table-header", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", { className: "moonui-data-table-row border-b", children: headerGroup.headers.filter((header) => header.column.getIsVisible()).map((header) => /* @__PURE__ */ jsx(
|
|
53269
53269
|
"th",
|
|
53270
53270
|
{
|
|
53271
53271
|
className: "moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground",
|
|
@@ -53293,7 +53293,7 @@ function DataTable({
|
|
|
53293
53293
|
animate: { opacity: 1 },
|
|
53294
53294
|
exit: { opacity: 0 },
|
|
53295
53295
|
transition: { duration: 0.2 },
|
|
53296
|
-
children: /* @__PURE__ */ jsx("td", { colSpan:
|
|
53296
|
+
children: /* @__PURE__ */ jsx("td", { colSpan: table.getAllLeafColumns().filter((col) => col.getIsVisible()).length, className: "h-24 text-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
53297
53297
|
/* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) }),
|
|
53298
53298
|
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
|
|
53299
53299
|
] }) })
|
|
@@ -53320,7 +53320,7 @@ function DataTable({
|
|
|
53320
53320
|
animate: { opacity: 1 },
|
|
53321
53321
|
exit: { opacity: 0 },
|
|
53322
53322
|
transition: { duration: 0.2 },
|
|
53323
|
-
children: /* @__PURE__ */ jsx("td", { colSpan:
|
|
53323
|
+
children: /* @__PURE__ */ jsx("td", { colSpan: table.getAllLeafColumns().filter((col) => col.getIsVisible()).length, className: "h-24 text-center", children: "No results found." })
|
|
53324
53324
|
},
|
|
53325
53325
|
"no-results"
|
|
53326
53326
|
) })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -421,35 +421,37 @@ export function DataTable<TData, TValue>({
|
|
|
421
421
|
<thead className="moonui-data-table-header">
|
|
422
422
|
{table.getHeaderGroups().map((headerGroup) => (
|
|
423
423
|
<tr key={headerGroup.id} className="moonui-data-table-row border-b">
|
|
424
|
-
{headerGroup.headers
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
424
|
+
{headerGroup.headers
|
|
425
|
+
.filter((header) => header.column.getIsVisible())
|
|
426
|
+
.map((header) => (
|
|
427
|
+
<th
|
|
428
|
+
key={header.id}
|
|
429
|
+
className="moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground"
|
|
430
|
+
>
|
|
431
|
+
{header.isPlaceholder ? null : (
|
|
432
|
+
<div
|
|
433
|
+
className={cn(
|
|
434
|
+
"flex items-center space-x-2",
|
|
435
|
+
header.column.getCanSort() && "cursor-pointer select-none"
|
|
436
|
+
)}
|
|
437
|
+
onClick={header.column.getToggleSortingHandler()}
|
|
438
|
+
>
|
|
439
|
+
{flexRender(header.column.columnDef.header, header.getContext())}
|
|
440
|
+
{header.column.getCanSort() && (
|
|
441
|
+
<div className="ml-2">
|
|
442
|
+
{header.column.getIsSorted() === 'asc' ? (
|
|
443
|
+
<span suppressHydrationWarning><ArrowUp className="h-4 w-4" /></span>
|
|
444
|
+
) : header.column.getIsSorted() === 'desc' ? (
|
|
445
|
+
<span suppressHydrationWarning><ArrowDown className="h-4 w-4" /></span>
|
|
446
|
+
) : (
|
|
447
|
+
<span suppressHydrationWarning><ArrowUpDown className="h-4 w-4" /></span>
|
|
448
|
+
)}
|
|
449
|
+
</div>
|
|
450
|
+
)}
|
|
451
|
+
</div>
|
|
452
|
+
)}
|
|
453
|
+
</th>
|
|
454
|
+
))}
|
|
453
455
|
</tr>
|
|
454
456
|
))}
|
|
455
457
|
</thead>
|
|
@@ -462,7 +464,7 @@ export function DataTable<TData, TValue>({
|
|
|
462
464
|
exit={{ opacity: 0 }}
|
|
463
465
|
transition={{ duration: 0.2 }}
|
|
464
466
|
>
|
|
465
|
-
<td colSpan={
|
|
467
|
+
<td colSpan={table.getAllLeafColumns().filter(col => col.getIsVisible()).length} className="h-24 text-center">
|
|
466
468
|
<div className="flex items-center justify-center space-x-2">
|
|
467
469
|
<span suppressHydrationWarning><Loader2 className="h-4 w-4 animate-spin" /></span>
|
|
468
470
|
<span className="text-sm text-muted-foreground">Loading...</span>
|
|
@@ -495,7 +497,7 @@ export function DataTable<TData, TValue>({
|
|
|
495
497
|
exit={{ opacity: 0 }}
|
|
496
498
|
transition={{ duration: 0.2 }}
|
|
497
499
|
>
|
|
498
|
-
<td colSpan={
|
|
500
|
+
<td colSpan={table.getAllLeafColumns().filter(col => col.getIsVisible()).length} className="h-24 text-center">
|
|
499
501
|
No results found.
|
|
500
502
|
</td>
|
|
501
503
|
</motion.tr>
|