@moontra/moonui-pro 2.3.4 → 2.3.5
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 +11 -11
- package/package.json +2 -2
- package/src/components/data-table/index.tsx +21 -17
package/dist/index.mjs
CHANGED
|
@@ -52264,7 +52264,7 @@ function DataTable({
|
|
|
52264
52264
|
/* @__PURE__ */ jsxs("div", { className: "moonui-pro-datatable-toolbar flex items-center justify-between", children: [
|
|
52265
52265
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
52266
52266
|
searchable && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
52267
|
-
/* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
|
|
52267
|
+
/* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }) }),
|
|
52268
52268
|
/* @__PURE__ */ jsx(
|
|
52269
52269
|
MoonUIInputPro,
|
|
52270
52270
|
{
|
|
@@ -52276,17 +52276,17 @@ function DataTable({
|
|
|
52276
52276
|
)
|
|
52277
52277
|
] }),
|
|
52278
52278
|
filterable && /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", children: [
|
|
52279
|
-
/* @__PURE__ */ jsx(Filter, { className: "mr-2 h-4 w-4" }),
|
|
52279
|
+
/* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(Filter, { className: "mr-2 h-4 w-4" }) }),
|
|
52280
52280
|
"Filters"
|
|
52281
52281
|
] })
|
|
52282
52282
|
] }),
|
|
52283
52283
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
52284
52284
|
exportable && /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", onClick: handleExport, children: [
|
|
52285
|
-
/* @__PURE__ */ jsx(Download, { className: "mr-2 h-4 w-4" }),
|
|
52285
|
+
/* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(Download, { className: "mr-2 h-4 w-4" }) }),
|
|
52286
52286
|
"Export"
|
|
52287
52287
|
] }),
|
|
52288
52288
|
/* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", children: [
|
|
52289
|
-
/* @__PURE__ */ jsx(Settings, { className: "mr-2 h-4 w-4" }),
|
|
52289
|
+
/* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(Settings, { className: "mr-2 h-4 w-4" }) }),
|
|
52290
52290
|
"Columns"
|
|
52291
52291
|
] })
|
|
52292
52292
|
] })
|
|
@@ -52306,7 +52306,7 @@ function DataTable({
|
|
|
52306
52306
|
onClick: header.column.getToggleSortingHandler(),
|
|
52307
52307
|
children: [
|
|
52308
52308
|
flexRender(header.column.columnDef.header, header.getContext()),
|
|
52309
|
-
header.column.getCanSort() && /* @__PURE__ */ jsx("div", { className: "ml-2", children: header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4" }) : header.column.getIsSorted() === "desc" ? /* @__PURE__ */ jsx(ArrowDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ArrowUpDown, { className: "h-4 w-4" }) })
|
|
52309
|
+
header.column.getCanSort() && /* @__PURE__ */ jsx("div", { className: "ml-2", children: header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4" }) }) : header.column.getIsSorted() === "desc" ? /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(ArrowDown, { className: "h-4 w-4" }) }) : /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(ArrowUpDown, { className: "h-4 w-4" }) }) })
|
|
52310
52310
|
]
|
|
52311
52311
|
}
|
|
52312
52312
|
)
|
|
@@ -52321,7 +52321,7 @@ function DataTable({
|
|
|
52321
52321
|
exit: { opacity: 0 },
|
|
52322
52322
|
transition: { duration: 0.2 },
|
|
52323
52323
|
children: /* @__PURE__ */ jsx("td", { colSpan: columns.length, className: "h-24 text-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center space-x-2", children: [
|
|
52324
|
-
/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }),
|
|
52324
|
+
/* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) }),
|
|
52325
52325
|
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
|
|
52326
52326
|
] }) })
|
|
52327
52327
|
},
|
|
@@ -52425,7 +52425,7 @@ function DataTable({
|
|
|
52425
52425
|
}
|
|
52426
52426
|
},
|
|
52427
52427
|
disabled: !table.getCanPreviousPage() || isPaginationLoading,
|
|
52428
|
-
children: /* @__PURE__ */ jsx(ChevronsLeft, { className: "h-4 w-4" })
|
|
52428
|
+
children: /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(ChevronsLeft, { className: "h-4 w-4" }) })
|
|
52429
52429
|
}
|
|
52430
52430
|
),
|
|
52431
52431
|
/* @__PURE__ */ jsx(
|
|
@@ -52445,7 +52445,7 @@ function DataTable({
|
|
|
52445
52445
|
}
|
|
52446
52446
|
},
|
|
52447
52447
|
disabled: !table.getCanPreviousPage() || isPaginationLoading,
|
|
52448
|
-
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
52448
|
+
children: /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }) })
|
|
52449
52449
|
}
|
|
52450
52450
|
),
|
|
52451
52451
|
/* @__PURE__ */ jsx(
|
|
@@ -52460,7 +52460,7 @@ function DataTable({
|
|
|
52460
52460
|
setIsPaginationLoading(false);
|
|
52461
52461
|
},
|
|
52462
52462
|
disabled: !table.getCanNextPage() || isPaginationLoading,
|
|
52463
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
52463
|
+
children: /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }) })
|
|
52464
52464
|
}
|
|
52465
52465
|
),
|
|
52466
52466
|
/* @__PURE__ */ jsx(
|
|
@@ -52475,7 +52475,7 @@ function DataTable({
|
|
|
52475
52475
|
setIsPaginationLoading(false);
|
|
52476
52476
|
},
|
|
52477
52477
|
disabled: !table.getCanNextPage() || isPaginationLoading,
|
|
52478
|
-
children: /* @__PURE__ */ jsx(ChevronsRight, { className: "h-4 w-4" })
|
|
52478
|
+
children: /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(ChevronsRight, { className: "h-4 w-4" }) })
|
|
52479
52479
|
}
|
|
52480
52480
|
)
|
|
52481
52481
|
] })
|
|
@@ -52500,7 +52500,7 @@ function getExpandableColumn(expandedRows, onToggle) {
|
|
|
52500
52500
|
},
|
|
52501
52501
|
className: "p-2 hover:bg-muted rounded-md transition-colors",
|
|
52502
52502
|
"aria-label": isExpanded ? "Collapse row" : "Expand row",
|
|
52503
|
-
children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 text-muted-foreground" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 text-muted-foreground" })
|
|
52503
|
+
children: /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: isExpanded ? /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 text-muted-foreground" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 text-muted-foreground" }) })
|
|
52504
52504
|
}
|
|
52505
52505
|
);
|
|
52506
52506
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
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",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react-dom": ">=18.0.0 || ^19.0.0"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@moontra/moonui-pro": "^2.3.
|
|
78
|
+
"@moontra/moonui-pro": "^2.3.4",
|
|
79
79
|
"@radix-ui/react-accordion": "^1.2.11",
|
|
80
80
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
81
81
|
"@radix-ui/react-checkbox": "^1.3.2",
|
|
@@ -246,7 +246,9 @@ export function DataTable<TData, TValue>({
|
|
|
246
246
|
<div className="flex items-center space-x-2">
|
|
247
247
|
{searchable && (
|
|
248
248
|
<div className="relative">
|
|
249
|
-
<
|
|
249
|
+
<span suppressHydrationWarning>
|
|
250
|
+
<Search className="absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" />
|
|
251
|
+
</span>
|
|
250
252
|
<Input
|
|
251
253
|
placeholder={filterPlaceholder}
|
|
252
254
|
value={globalFilter}
|
|
@@ -258,7 +260,7 @@ export function DataTable<TData, TValue>({
|
|
|
258
260
|
|
|
259
261
|
{filterable && (
|
|
260
262
|
<Button variant="outline" size="sm">
|
|
261
|
-
<Filter className="mr-2 h-4 w-4"
|
|
263
|
+
<span suppressHydrationWarning><Filter className="mr-2 h-4 w-4" /></span>
|
|
262
264
|
Filters
|
|
263
265
|
</Button>
|
|
264
266
|
)}
|
|
@@ -267,13 +269,13 @@ export function DataTable<TData, TValue>({
|
|
|
267
269
|
<div className="flex items-center space-x-2">
|
|
268
270
|
{exportable && (
|
|
269
271
|
<Button variant="outline" size="sm" onClick={handleExport}>
|
|
270
|
-
<Download className="mr-2 h-4 w-4"
|
|
272
|
+
<span suppressHydrationWarning><Download className="mr-2 h-4 w-4" /></span>
|
|
271
273
|
Export
|
|
272
274
|
</Button>
|
|
273
275
|
)}
|
|
274
276
|
|
|
275
277
|
<Button variant="outline" size="sm">
|
|
276
|
-
<Settings className="mr-2 h-4 w-4"
|
|
278
|
+
<span suppressHydrationWarning><Settings className="mr-2 h-4 w-4" /></span>
|
|
277
279
|
Columns
|
|
278
280
|
</Button>
|
|
279
281
|
</div>
|
|
@@ -303,11 +305,11 @@ export function DataTable<TData, TValue>({
|
|
|
303
305
|
{header.column.getCanSort() && (
|
|
304
306
|
<div className="ml-2">
|
|
305
307
|
{header.column.getIsSorted() === 'asc' ? (
|
|
306
|
-
<ArrowUp className="h-4 w-4"
|
|
308
|
+
<span suppressHydrationWarning><ArrowUp className="h-4 w-4" /></span>
|
|
307
309
|
) : header.column.getIsSorted() === 'desc' ? (
|
|
308
|
-
<ArrowDown className="h-4 w-4"
|
|
310
|
+
<span suppressHydrationWarning><ArrowDown className="h-4 w-4" /></span>
|
|
309
311
|
) : (
|
|
310
|
-
<ArrowUpDown className="h-4 w-4"
|
|
312
|
+
<span suppressHydrationWarning><ArrowUpDown className="h-4 w-4" /></span>
|
|
311
313
|
)}
|
|
312
314
|
</div>
|
|
313
315
|
)}
|
|
@@ -330,7 +332,7 @@ export function DataTable<TData, TValue>({
|
|
|
330
332
|
>
|
|
331
333
|
<td colSpan={columns.length} className="h-24 text-center">
|
|
332
334
|
<div className="flex items-center justify-center space-x-2">
|
|
333
|
-
<Loader2 className="h-4 w-4 animate-spin"
|
|
335
|
+
<span suppressHydrationWarning><Loader2 className="h-4 w-4 animate-spin" /></span>
|
|
334
336
|
<span className="text-sm text-muted-foreground">Loading...</span>
|
|
335
337
|
</div>
|
|
336
338
|
</td>
|
|
@@ -455,7 +457,7 @@ export function DataTable<TData, TValue>({
|
|
|
455
457
|
}}
|
|
456
458
|
disabled={!table.getCanPreviousPage() || isPaginationLoading}
|
|
457
459
|
>
|
|
458
|
-
<ChevronsLeft className="h-4 w-4"
|
|
460
|
+
<span suppressHydrationWarning><ChevronsLeft className="h-4 w-4" /></span>
|
|
459
461
|
</Button>
|
|
460
462
|
<Button
|
|
461
463
|
variant="outline"
|
|
@@ -473,7 +475,7 @@ export function DataTable<TData, TValue>({
|
|
|
473
475
|
}}
|
|
474
476
|
disabled={!table.getCanPreviousPage() || isPaginationLoading}
|
|
475
477
|
>
|
|
476
|
-
<ChevronLeft className="h-4 w-4"
|
|
478
|
+
<span suppressHydrationWarning><ChevronLeft className="h-4 w-4" /></span>
|
|
477
479
|
</Button>
|
|
478
480
|
<Button
|
|
479
481
|
variant="outline"
|
|
@@ -486,7 +488,7 @@ export function DataTable<TData, TValue>({
|
|
|
486
488
|
}}
|
|
487
489
|
disabled={!table.getCanNextPage() || isPaginationLoading}
|
|
488
490
|
>
|
|
489
|
-
<ChevronRight className="h-4 w-4"
|
|
491
|
+
<span suppressHydrationWarning><ChevronRight className="h-4 w-4" /></span>
|
|
490
492
|
</Button>
|
|
491
493
|
<Button
|
|
492
494
|
variant="outline"
|
|
@@ -499,7 +501,7 @@ export function DataTable<TData, TValue>({
|
|
|
499
501
|
}}
|
|
500
502
|
disabled={!table.getCanNextPage() || isPaginationLoading}
|
|
501
503
|
>
|
|
502
|
-
<ChevronsRight className="h-4 w-4"
|
|
504
|
+
<span suppressHydrationWarning><ChevronsRight className="h-4 w-4" /></span>
|
|
503
505
|
</Button>
|
|
504
506
|
</div>
|
|
505
507
|
</div>
|
|
@@ -536,11 +538,13 @@ export function getExpandableColumn<TData>(
|
|
|
536
538
|
className="p-2 hover:bg-muted rounded-md transition-colors"
|
|
537
539
|
aria-label={isExpanded ? "Collapse row" : "Expand row"}
|
|
538
540
|
>
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
541
|
+
<span suppressHydrationWarning>
|
|
542
|
+
{isExpanded ? (
|
|
543
|
+
<ChevronDown className="h-4 w-4 text-muted-foreground" />
|
|
544
|
+
) : (
|
|
545
|
+
<ChevronRight className="h-4 w-4 text-muted-foreground" />
|
|
546
|
+
)}
|
|
547
|
+
</span>
|
|
544
548
|
</button>
|
|
545
549
|
);
|
|
546
550
|
},
|