lecom-ui 5.3.43 → 5.3.44

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.
@@ -185,7 +185,10 @@ function DataTable({
185
185
  "bg-white rounded-[8px] p-2 transition-all duration-500",
186
186
  className
187
187
  ),
188
- style: noScroll ? void 0 : { width: styleDataTableContainer.width }
188
+ style: {
189
+ contain: "layout",
190
+ ...noScroll ? {} : { width: styleDataTableContainer.width }
191
+ }
189
192
  },
190
193
  noScroll ? renderTable() : /* @__PURE__ */ React.createElement(ScrollArea, { type: "always", className: "p-2" }, /* @__PURE__ */ React.createElement(
191
194
  "div",
@@ -46,7 +46,7 @@ function Table({
46
46
  }
47
47
  )));
48
48
  }
49
- return /* @__PURE__ */ React.createElement("table", { id: "data-table", className: "w-full" }, /* @__PURE__ */ React.createElement("thead", { className: "sticky top-0 z-10 bg-white" }, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React.createElement("tr", { key: headerGroup.id }, headerGroup.headers.map((header) => /* @__PURE__ */ React.createElement(
49
+ return /* @__PURE__ */ React.createElement("table", { id: "data-table", className: "w-full", style: { tableLayout: "fixed" } }, /* @__PURE__ */ React.createElement("thead", { className: "sticky top-0 z-10 bg-white" }, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React.createElement("tr", { key: headerGroup.id }, headerGroup.headers.map((header) => /* @__PURE__ */ React.createElement(
50
50
  "th",
51
51
  {
52
52
  key: header.id,
@@ -67,37 +67,44 @@ function Table({
67
67
  header.column.columnDef.header,
68
68
  header.getContext()
69
69
  )
70
- ))))), /* @__PURE__ */ React.createElement("tbody", { className: "[&_tr:last-child]:border-0 [&_tr:last-child_td]:shadow-none" }, table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React.createElement(React.Fragment, { key: row.id }, /* @__PURE__ */ React.createElement(
71
- "tr",
70
+ ))))), /* @__PURE__ */ React.createElement(
71
+ "tbody",
72
72
  {
73
- "data-state": onIsSelected?.(row) ? "selected" : "",
74
- className: "[&_td]:hover:bg-grey-100 [&_td]:data-[state=selected]:bg-grey-100"
73
+ className: "[&_tr:last-child]:border-0 [&_tr:last-child_td]:shadow-none",
74
+ style: { willChange: "transform" }
75
75
  },
76
- row.getVisibleCells().map((cell) => /* @__PURE__ */ React.createElement(
76
+ table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React.createElement(React.Fragment, { key: row.id }, /* @__PURE__ */ React.createElement(
77
+ "tr",
78
+ {
79
+ "data-state": onIsSelected?.(row) ? "selected" : "",
80
+ className: "[&_td]:hover:bg-grey-100 [&_td]:data-[state=selected]:bg-grey-100"
81
+ },
82
+ row.getVisibleCells().map((cell) => /* @__PURE__ */ React.createElement(
83
+ "td",
84
+ {
85
+ key: cell.id,
86
+ className: cn(
87
+ "p-4 py-0 h-10 [&:has([role=checkbox])]:pr-0 transition-colors shadow-[0_-0.5px_0px_0px_#c9c9c9_inset] text-left",
88
+ cell.column.columnDef.meta?.cellClassName
89
+ ),
90
+ "data-column": cell.column.id,
91
+ "data-fixed": getFixed(cell.column.columnDef.meta),
92
+ style: styleColumn(
93
+ cell.column.columnDef.meta,
94
+ "td"
95
+ )
96
+ },
97
+ flexRender(cell.column.columnDef.cell, cell.getContext())
98
+ ))
99
+ ), row.getIsExpanded() && expandedContent && /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", { colSpan: columns.length, className: "p-0" }, expandedContent(row))))) : /* @__PURE__ */ React.createElement("tr", { className: "border-b-[0.5px] [&_td]:hover:bg-grey-100 [&_td]:data-[state=selected]:bg-grey-100" }, /* @__PURE__ */ React.createElement(
77
100
  "td",
78
101
  {
79
- key: cell.id,
80
- className: cn(
81
- "p-4 py-0 h-10 [&:has([role=checkbox])]:pr-0 transition-colors shadow-[0_-0.5px_0px_0px_#c9c9c9_inset] text-left",
82
- cell.column.columnDef.meta?.cellClassName
83
- ),
84
- "data-column": cell.column.id,
85
- "data-fixed": getFixed(cell.column.columnDef.meta),
86
- style: styleColumn(
87
- cell.column.columnDef.meta,
88
- "td"
89
- )
102
+ colSpan: columns.length,
103
+ className: "p-4 py-0 h-10 align-middle [&:has([role=checkbox])]:pr-0 transition-colors"
90
104
  },
91
- flexRender(cell.column.columnDef.cell, cell.getContext())
105
+ noResults ?? /* @__PURE__ */ React.createElement("div", { className: "text-center" }, "-")
92
106
  ))
93
- ), row.getIsExpanded() && expandedContent && /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", { colSpan: columns.length, className: "p-0" }, expandedContent(row))))) : /* @__PURE__ */ React.createElement("tr", { className: "border-b-[0.5px] [&_td]:hover:bg-grey-100 [&_td]:data-[state=selected]:bg-grey-100" }, /* @__PURE__ */ React.createElement(
94
- "td",
95
- {
96
- colSpan: columns.length,
97
- className: "p-4 py-0 h-10 align-middle [&:has([role=checkbox])]:pr-0 transition-colors"
98
- },
99
- noResults ?? /* @__PURE__ */ React.createElement("div", { className: "text-center" }, "-")
100
- ))));
107
+ ));
101
108
  }
102
109
  Table.displayName = "Table";
103
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "5.3.43",
3
+ "version": "5.3.44",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",