@trackunit/react-table 0.0.382 → 0.0.385
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/index.cjs.js +14 -1
- package/index.esm.js +14 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -326,7 +326,10 @@ const Table = (_a) => {
|
|
|
326
326
|
return null;
|
|
327
327
|
}
|
|
328
328
|
else {
|
|
329
|
-
return (jsxRuntime.jsx(reactTableBaseComponents.Tr, { className:
|
|
329
|
+
return (jsxRuntime.jsx(reactTableBaseComponents.Tr, { className: cvaTableRow({
|
|
330
|
+
showPointer: !!props.onRowClick || row.getCanSelect(),
|
|
331
|
+
isSelected: row.getIsSelected(),
|
|
332
|
+
}), dataTestId: `table-body-row-${virtualRow.index}`, layout: "flex", onClick: () => {
|
|
330
333
|
if (props.onRowClick) {
|
|
331
334
|
props.onRowClick(row);
|
|
332
335
|
}
|
|
@@ -353,6 +356,16 @@ const Table = (_a) => {
|
|
|
353
356
|
total: ((_c = (_b = props.pagination) === null || _b === void 0 ? void 0 : _b.pageInfo) === null || _c === void 0 ? void 0 : _c.count) || 0,
|
|
354
357
|
}) }), ((_d = props.pagination) === null || _d === void 0 ? void 0 : _d.isLoading) ? (jsxRuntime.jsx("span", { className: "ml-2", children: jsxRuntime.jsx(reactComponents.Spinner, { size: "small" }) })) : null, props.footerRightActions && jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: props.footerRightActions })] }))] }));
|
|
355
358
|
};
|
|
359
|
+
const cvaTableRow = cssClassVarianceUtilities.cvaMerge(["hover:bg-neutral-100"], {
|
|
360
|
+
variants: {
|
|
361
|
+
showPointer: {
|
|
362
|
+
true: "cursor-pointer",
|
|
363
|
+
},
|
|
364
|
+
isSelected: {
|
|
365
|
+
true: "bg-primary-50",
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
});
|
|
356
369
|
|
|
357
370
|
const cvaColumnFilterGrabbable = cssClassVarianceUtilities.cvaMerge(["flex", "items-center", "justify-center"], {
|
|
358
371
|
variants: {
|
package/index.esm.js
CHANGED
|
@@ -301,7 +301,10 @@ const Table = (_a) => {
|
|
|
301
301
|
return null;
|
|
302
302
|
}
|
|
303
303
|
else {
|
|
304
|
-
return (jsx(Tr, { className:
|
|
304
|
+
return (jsx(Tr, { className: cvaTableRow({
|
|
305
|
+
showPointer: !!props.onRowClick || row.getCanSelect(),
|
|
306
|
+
isSelected: row.getIsSelected(),
|
|
307
|
+
}), dataTestId: `table-body-row-${virtualRow.index}`, layout: "flex", onClick: () => {
|
|
305
308
|
if (props.onRowClick) {
|
|
306
309
|
props.onRowClick(row);
|
|
307
310
|
}
|
|
@@ -328,6 +331,16 @@ const Table = (_a) => {
|
|
|
328
331
|
total: ((_c = (_b = props.pagination) === null || _b === void 0 ? void 0 : _b.pageInfo) === null || _c === void 0 ? void 0 : _c.count) || 0,
|
|
329
332
|
}) }), ((_d = props.pagination) === null || _d === void 0 ? void 0 : _d.isLoading) ? (jsx("span", { className: "ml-2", children: jsx(Spinner, { size: "small" }) })) : null, props.footerRightActions && jsx("div", { className: "flex flex-1 justify-end", children: props.footerRightActions })] }))] }));
|
|
330
333
|
};
|
|
334
|
+
const cvaTableRow = cvaMerge(["hover:bg-neutral-100"], {
|
|
335
|
+
variants: {
|
|
336
|
+
showPointer: {
|
|
337
|
+
true: "cursor-pointer",
|
|
338
|
+
},
|
|
339
|
+
isSelected: {
|
|
340
|
+
true: "bg-primary-50",
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
});
|
|
331
344
|
|
|
332
345
|
const cvaColumnFilterGrabbable = cvaMerge(["flex", "items-center", "justify-center"], {
|
|
333
346
|
variants: {
|