@moontra/moonui-pro 2.26.23 → 2.26.25

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
@@ -74001,26 +74001,27 @@ function DataTable({
74001
74001
  const checkboxColumn = {
74002
74002
  id: "select",
74003
74003
  header: ({ table: table2 }) => /* @__PURE__ */ jsx(
74004
- "input",
74004
+ MoonUICheckboxPro,
74005
74005
  {
74006
- type: "checkbox",
74007
- checked: table2.getIsAllPageRowsSelected(),
74008
- onChange: (e) => table2.toggleAllPageRowsSelected(e.target.checked),
74009
- className: "h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"
74006
+ checked: table2.getIsAllPageRowsSelected() || table2.getIsSomePageRowsSelected() && "indeterminate",
74007
+ onCheckedChange: (value) => table2.toggleAllPageRowsSelected(!!value),
74008
+ "aria-label": "Select all",
74009
+ className: "translate-y-[2px]"
74010
74010
  }
74011
74011
  ),
74012
74012
  cell: ({ row }) => /* @__PURE__ */ jsx(
74013
- "input",
74013
+ MoonUICheckboxPro,
74014
74014
  {
74015
- type: "checkbox",
74016
74015
  checked: row.getIsSelected(),
74017
- onChange: (e) => row.toggleSelected(e.target.checked),
74018
- className: "h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"
74016
+ onCheckedChange: (value) => row.toggleSelected(!!value),
74017
+ "aria-label": "Select row",
74018
+ className: "translate-y-[2px]"
74019
74019
  }
74020
74020
  ),
74021
74021
  enableSorting: false,
74022
74022
  enableHiding: false,
74023
- size: 32
74023
+ size: 40,
74024
+ maxSize: 40
74024
74025
  };
74025
74026
  cols = [checkboxColumn, ...cols];
74026
74027
  }
@@ -74047,6 +74048,7 @@ function DataTable({
74047
74048
  onRowSelectionChange: setRowSelection,
74048
74049
  onGlobalFilterChange: setGlobalFilter,
74049
74050
  globalFilterFn: "includesString",
74051
+ enableRowSelection: selectable || enableRowSelection || false,
74050
74052
  filterFns: {
74051
74053
  custom: (row, columnId, filterValue) => {
74052
74054
  if (Array.isArray(filterValue)) {
@@ -74133,7 +74135,10 @@ function DataTable({
74133
74135
  autoResetAll: false,
74134
74136
  autoResetPageIndex: false,
74135
74137
  autoResetExpanded: false,
74136
- getRowId: (row) => row.id || row.orderId || Math.random().toString()
74138
+ getRowId: (row, index2) => {
74139
+ const rowData = row;
74140
+ return rowData.id || rowData.orderId || rowData.orderNumber || `row-${index2}`;
74141
+ }
74137
74142
  });
74138
74143
  const prevRowSelectionRef = t__default.useRef(rowSelection);
74139
74144
  t__default.useEffect(() => {
@@ -74197,8 +74202,8 @@ function DataTable({
74197
74202
  table.resetRowSelection();
74198
74203
  };
74199
74204
  return /* @__PURE__ */ jsxs("div", { className: cn("moonui-pro-datatable-container flex flex-col gap-4", className), children: [
74200
- /* @__PURE__ */ jsxs("div", { className: "moonui-pro-datatable-toolbar flex items-center justify-between", children: [
74201
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
74205
+ /* @__PURE__ */ jsxs("div", { className: "moonui-pro-datatable-toolbar flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
74206
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
74202
74207
  searchable && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
74203
74208
  /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }) }),
74204
74209
  /* @__PURE__ */ jsx(
@@ -74207,7 +74212,7 @@ function DataTable({
74207
74212
  placeholder: filterPlaceholder,
74208
74213
  value: globalFilter,
74209
74214
  onChange: (e) => setGlobalFilter(e.target.value),
74210
- className: "pl-8 w-64"
74215
+ className: "pl-8 w-full sm:w-64"
74211
74216
  }
74212
74217
  )
74213
74218
  ] }),
@@ -74256,7 +74261,7 @@ function DataTable({
74256
74261
  }
74257
74262
  )
74258
74263
  ] }),
74259
- /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
74264
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
74260
74265
  exportable && exportFormats.length > 0 && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
74261
74266
  /* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", children: [
74262
74267
  /* @__PURE__ */ jsx("span", { suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(Download, { className: "mr-2 h-4 w-4" }) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.26.23",
3
+ "version": "2.26.25",
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",