@bluemarble/bm-components 0.0.83 → 0.0.84
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/esm/index.js
CHANGED
|
@@ -15033,18 +15033,43 @@ const GridPagination = ({ currentPage, totalNumberOfPages, onPageChange, rowsPer
|
|
|
15033
15033
|
React__default.createElement(MdArrowForwardIos, { size: 8 * 2 })))));
|
|
15034
15034
|
};
|
|
15035
15035
|
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15036
|
+
const styles = {
|
|
15037
|
+
rowGap: function (dense) {
|
|
15038
|
+
return {
|
|
15039
|
+
py: dense ? 0.23 : 0.7
|
|
15040
|
+
};
|
|
15041
|
+
},
|
|
15042
|
+
bordered: function (active) {
|
|
15043
|
+
if (!active)
|
|
15044
|
+
return {};
|
|
15045
|
+
return {
|
|
15046
|
+
'tr td:not(:last-child), tr th:not(:last-child)': {
|
|
15047
|
+
borderRight: '1px solid',
|
|
15041
15048
|
borderColor: 'divider'
|
|
15042
|
-
}
|
|
15049
|
+
}
|
|
15050
|
+
};
|
|
15051
|
+
},
|
|
15052
|
+
striped: function (active) {
|
|
15053
|
+
if (!active)
|
|
15054
|
+
return {};
|
|
15055
|
+
return {
|
|
15056
|
+
'tr:nth-of-type(even)': {
|
|
15043
15057
|
transition: 'background-color ease 200ms',
|
|
15044
|
-
bgcolor:
|
|
15045
|
-
}
|
|
15046
|
-
|
|
15047
|
-
|
|
15058
|
+
bgcolor: 'divider'
|
|
15059
|
+
}
|
|
15060
|
+
};
|
|
15061
|
+
},
|
|
15062
|
+
lastRowBorder: function (active) {
|
|
15063
|
+
return {
|
|
15064
|
+
'tbody tr:last-child td': {
|
|
15065
|
+
borderBottomWidth: active ? 0 : 1
|
|
15066
|
+
}
|
|
15067
|
+
};
|
|
15068
|
+
}
|
|
15069
|
+
};
|
|
15070
|
+
|
|
15071
|
+
function BaseGrid({ columns, children, fixedColumns, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense = true, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions, hideFooter, isLoading }) {
|
|
15072
|
+
return (React__default.createElement(Paper, Object.assign({}, paperProps, { sx: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, styles.rowGap(dense)), styles.bordered(bordered)), styles.striped(striped)), styles.lastRowBorder(hideFooter)), paperProps === null || paperProps === void 0 ? void 0 : paperProps.sx) }),
|
|
15048
15073
|
React__default.createElement(Table, Object.assign({ size: "small", stickyHeader: true }, tableProps, { sx: Object.assign({}, tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx) }),
|
|
15049
15074
|
React__default.createElement(TableHead, Object.assign({}, tableHeadProps),
|
|
15050
15075
|
React__default.createElement(TableRow, null, columns.map((column) => (React__default.createElement(TableCell, { key: column.name, padding: dense ? 'none' : 'normal', sx: Object.assign({ pl: 2 }, column === null || column === void 0 ? void 0 : column.sx) }, column.children ? (column.children) : (React__default.createElement(TableSortLabel, { active: sortedBy === column.name, direction: sortedDirection, onClick: () => onSortBy(column.name), disabled: column.canSort === false }, column.label)))))),
|