@megha-ui/react 1.2.820 → 1.2.821

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.
@@ -55,25 +55,15 @@ const GroupedRow = ({ item, rowStyle, cellStyle, rowHeight, columns, widthMode,
55
55
  }
56
56
  }, 50);
57
57
  };
58
- return (_jsxs(_Fragment, { children: [groupByKeys.map((_groupBy) => {
59
- var _a, _b;
60
- return (_jsx("div", { style: {
61
- width: widthMode === "auto"
62
- ? "auto"
63
- : ((_a = columns.find((column) => column.key === _groupBy)) === null || _a === void 0 ? void 0 : _a.width)
64
- ? `calc(${(_b = columns.find((column) => column.key === _groupBy)) === null || _b === void 0 ? void 0 : _b.width} + 4rem)`
65
- : (hugColumnWidths === null || hugColumnWidths === void 0 ? void 0 : hugColumnWidths[`column-${_groupBy}`])
66
- ? `calc(${hugColumnWidths === null || hugColumnWidths === void 0 ? void 0 : hugColumnWidths[`column-${_groupBy}`]} + 4rem)`
67
- : "fit-content",
68
- padding: _groupBy ? "0.5rem" : 0,
69
- backgroundColor: alternateRowColor && (index + 1) % 2 === 0
70
- ? "var(--row-bg)"
71
- : "var(--row-bg-even)",
72
- flex: widthMode === "auto" ? 1 : undefined,
73
- flexGrow: widthMode === "auto" ? 1 : 0,
74
- flexShrink: widthMode === "auto" ? 1 : 0,
75
- }, className: `column index-${_groupBy}`, children: _jsx("div", {}) }));
76
- }), columns
58
+ return (_jsxs(_Fragment, { children: [groupByKeys.map((_groupBy) => (_jsx("div", { style: {
59
+ padding: _groupBy ? "0.5rem" : 0,
60
+ backgroundColor: alternateRowColor && (index + 1) % 2 === 0
61
+ ? "var(--row-bg)"
62
+ : "var(--row-bg-even)",
63
+ flex: widthMode === "auto" ? 1 : undefined,
64
+ flexGrow: widthMode === "auto" ? 1 : 0,
65
+ flexShrink: widthMode === "auto" ? 1 : 0,
66
+ }, className: `column index-${_groupBy}`, children: _jsx("div", {}) }))), columns
77
67
  .filter((column) => !groupByKeys.includes(column.key))
78
68
  .map((column, colIndex) => {
79
69
  var _a, _b, _c, _d, _e;
@@ -108,20 +98,9 @@ const GroupedRow = ({ item, rowStyle, cellStyle, rowHeight, columns, widthMode,
108
98
  const cellUrl = cellData === null || cellData === void 0 ? void 0 : cellData.url;
109
99
  const isHidden = column.overflowHidden;
110
100
  if (!column.hidden) {
111
- return (_jsx("div", { id: `column-${index}-${colIndex}`, className: `column index-${column.key}`, style: Object.assign(Object.assign({}, cellStyle), { padding: "0.5rem", display: "flex", alignItems: "center", justifyContent: "flex-start", overflow: isHidden ? "hidden" : "visible", textOverflow: isHidden ? "ellipsis" : "clip", whiteSpace: isHidden ? "nowrap" : "normal", height: "100%", width: widthMode === "auto"
112
- ? "auto"
113
- : (column === null || column === void 0 ? void 0 : column.width)
114
- ? column === null || column === void 0 ? void 0 : column.width
115
- : (hugColumnWidths === null || hugColumnWidths === void 0 ? void 0 : hugColumnWidths[`column-${column.key}`])
116
- ? hugColumnWidths === null || hugColumnWidths === void 0 ? void 0 : hugColumnWidths[`column-${column.key}`]
117
- : "fit-content", flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, boxSizing: "border-box",
118
- // marginTop:
119
- // rowIndex === index && rowIndex > -1 && rowIndex < 2
120
- // ? rowHeight
121
- // : "",
122
- backgroundColor: alternateRowColor && (index + 1) % 2 === 0
101
+ return (_jsx("div", { id: `column-${index}-${colIndex}`, className: `column index-${column.key}`, style: Object.assign(Object.assign({}, cellStyle), { padding: "0.5rem", display: "flex", alignItems: "center", justifyContent: "flex-start", overflow: isHidden ? "hidden" : "visible", textOverflow: isHidden ? "ellipsis" : "clip", whiteSpace: isHidden ? "nowrap" : "normal", height: "100%", flex: widthMode === "auto" ? 1 : undefined, flexGrow: widthMode === "auto" ? 1 : 0, flexShrink: widthMode === "auto" ? 1 : 0, boxSizing: "border-box", backgroundColor: alternateRowColor && (index + 1) % 2 === 0
123
102
  ? "var(--row-bg)"
124
- : "var(--row-bg-even)" }), onClick: () => handleRowClick(column), children: loading ? (_jsx("div", { style: { width: column.width, height: rowHeight }, children: _jsx(Shimmer, { height: 32, width: column.width }) })) : (_jsx("div", { className: (cellData === null || cellData === void 0 ? void 0 : cellData.className) || "", style: {
103
+ : "var(--row-bg-even)" }), onClick: () => handleRowClick(column), children: loading ? (_jsx("div", { style: { height: rowHeight }, children: _jsx(Shimmer, { height: 32, width: column.width }) })) : (_jsx("div", { className: (cellData === null || cellData === void 0 ? void 0 : cellData.className) || "", style: {
125
104
  display: "flex",
126
105
  alignItems: "center", // Vertically center content within the cell
127
106
  width: "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.820",
3
+ "version": "1.2.821",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",