@moontra/moonui-pro 2.4.3 → 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 CHANGED
@@ -53265,31 +53265,27 @@ 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) => {
53269
- if (!header.column.getIsVisible())
53270
- return null;
53271
- return /* @__PURE__ */ jsx(
53272
- "th",
53273
- {
53274
- className: "moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground",
53275
- children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs(
53276
- "div",
53277
- {
53278
- className: cn(
53279
- "flex items-center space-x-2",
53280
- header.column.getCanSort() && "cursor-pointer select-none"
53281
- ),
53282
- onClick: header.column.getToggleSortingHandler(),
53283
- children: [
53284
- flexRender(header.column.columnDef.header, header.getContext()),
53285
- 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" }) }) })
53286
- ]
53287
- }
53288
- )
53289
- },
53290
- header.id
53291
- );
53292
- }) }, headerGroup.id)) }),
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
+ "th",
53270
+ {
53271
+ className: "moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground",
53272
+ children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs(
53273
+ "div",
53274
+ {
53275
+ className: cn(
53276
+ "flex items-center space-x-2",
53277
+ header.column.getCanSort() && "cursor-pointer select-none"
53278
+ ),
53279
+ onClick: header.column.getToggleSortingHandler(),
53280
+ children: [
53281
+ flexRender(header.column.columnDef.header, header.getContext()),
53282
+ 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" }) }) })
53283
+ ]
53284
+ }
53285
+ )
53286
+ },
53287
+ header.id
53288
+ )) }, headerGroup.id)) }),
53293
53289
  /* @__PURE__ */ jsx("tbody", { className: "moonui-data-table-body", children: isPaginationLoading ? /* @__PURE__ */ jsx(
53294
53290
  motion.tr,
53295
53291
  {
@@ -53297,7 +53293,7 @@ function DataTable({
53297
53293
  animate: { opacity: 1 },
53298
53294
  exit: { opacity: 0 },
53299
53295
  transition: { duration: 0.2 },
53300
- children: /* @__PURE__ */ jsx("td", { colSpan: table.getVisibleLeafColumns().length, className: "h-24 text-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center space-x-2", children: [
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: [
53301
53297
  /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) }),
53302
53298
  /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
53303
53299
  ] }) })
@@ -53324,7 +53320,7 @@ function DataTable({
53324
53320
  animate: { opacity: 1 },
53325
53321
  exit: { opacity: 0 },
53326
53322
  transition: { duration: 0.2 },
53327
- children: /* @__PURE__ */ jsx("td", { colSpan: table.getVisibleLeafColumns().length, className: "h-24 text-center", children: "No results found." })
53323
+ children: /* @__PURE__ */ jsx("td", { colSpan: table.getAllLeafColumns().filter((col) => col.getIsVisible()).length, className: "h-24 text-center", children: "No results found." })
53328
53324
  },
53329
53325
  "no-results"
53330
53326
  ) })
@@ -53513,14 +53509,10 @@ var TableRow2 = t__default.memo(({
53513
53509
  row.getIsSelected() && "bg-muted",
53514
53510
  isExpanded && "border-b-0"
53515
53511
  ),
53516
- children: row.getVisibleCells().map((cell) => {
53517
- if (!cell.column.getIsVisible())
53518
- return null;
53519
- return /* @__PURE__ */ jsx("td", { className: "moonui-data-table-td p-4 align-middle", children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id);
53520
- })
53512
+ children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx("td", { className: "moonui-data-table-td p-4 align-middle", children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
53521
53513
  }
53522
53514
  ),
53523
- isExpanded && renderSubComponent && /* @__PURE__ */ jsx("tr", { className: "border-b", children: /* @__PURE__ */ jsx("td", { colSpan: row.getVisibleCells().filter((cell) => cell.column.getIsVisible()).length, className: "p-0 overflow-hidden", children: /* @__PURE__ */ jsx(
53515
+ isExpanded && renderSubComponent && /* @__PURE__ */ jsx("tr", { className: "border-b", children: /* @__PURE__ */ jsx("td", { colSpan: row.getVisibleCells().length, className: "p-0 overflow-hidden", children: /* @__PURE__ */ jsx(
53524
53516
  "div",
53525
53517
  {
53526
53518
  className: "transition-all duration-300 ease-out",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.4.3",
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,11 +421,9 @@ 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.map((header) => {
425
- // Column visibility kontrolü
426
- if (!header.column.getIsVisible()) return null;
427
-
428
- return (
424
+ {headerGroup.headers
425
+ .filter((header) => header.column.getIsVisible())
426
+ .map((header) => (
429
427
  <th
430
428
  key={header.id}
431
429
  className="moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground"
@@ -453,8 +451,7 @@ export function DataTable<TData, TValue>({
453
451
  </div>
454
452
  )}
455
453
  </th>
456
- );
457
- })}
454
+ ))}
458
455
  </tr>
459
456
  ))}
460
457
  </thead>
@@ -467,7 +464,7 @@ export function DataTable<TData, TValue>({
467
464
  exit={{ opacity: 0 }}
468
465
  transition={{ duration: 0.2 }}
469
466
  >
470
- <td colSpan={table.getVisibleLeafColumns().length} className="h-24 text-center">
467
+ <td colSpan={table.getAllLeafColumns().filter(col => col.getIsVisible()).length} className="h-24 text-center">
471
468
  <div className="flex items-center justify-center space-x-2">
472
469
  <span suppressHydrationWarning><Loader2 className="h-4 w-4 animate-spin" /></span>
473
470
  <span className="text-sm text-muted-foreground">Loading...</span>
@@ -500,7 +497,7 @@ export function DataTable<TData, TValue>({
500
497
  exit={{ opacity: 0 }}
501
498
  transition={{ duration: 0.2 }}
502
499
  >
503
- <td colSpan={table.getVisibleLeafColumns().length} className="h-24 text-center">
500
+ <td colSpan={table.getAllLeafColumns().filter(col => col.getIsVisible()).length} className="h-24 text-center">
504
501
  No results found.
505
502
  </td>
506
503
  </motion.tr>
@@ -729,21 +726,16 @@ const TableRow = React.memo(({
729
726
  isExpanded && "border-b-0"
730
727
  )}
731
728
  >
732
- {row.getVisibleCells().map((cell) => {
733
- // Column visibility kontrolü
734
- if (!cell.column.getIsVisible()) return null;
735
-
736
- return (
737
- <td key={cell.id} className="moonui-data-table-td p-4 align-middle">
738
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
739
- </td>
740
- );
741
- })}
729
+ {row.getVisibleCells().map((cell) => (
730
+ <td key={cell.id} className="moonui-data-table-td p-4 align-middle">
731
+ {flexRender(cell.column.columnDef.cell, cell.getContext())}
732
+ </td>
733
+ ))}
742
734
  </tr>
743
735
 
744
736
  {isExpanded && renderSubComponent && (
745
737
  <tr className="border-b">
746
- <td colSpan={row.getVisibleCells().filter(cell => cell.column.getIsVisible()).length} className="p-0 overflow-hidden">
738
+ <td colSpan={row.getVisibleCells().length} className="p-0 overflow-hidden">
747
739
  <div
748
740
  className="transition-all duration-300 ease-out"
749
741
  style={{