@bluemarble/bm-components 0.0.44 → 0.0.45

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
@@ -3866,7 +3866,7 @@ const AutoCreatedRows = ({ tableData, columns, primaryKey, }) => {
3866
3866
  }))))));
3867
3867
  };
3868
3868
 
3869
- const Grid$1 = (props) => {
3869
+ const Grid = (props) => {
3870
3870
  const { columnTitles, isLoading, footer, noFilterButtons = false, selectedFilters, customButtons, setSelectedFilters, defaultData, setTableData, updateFilters, tableData, rowOptions = [60, 100, 150], noPagination, primaryKey, noFilters, } = props;
3871
3871
  const [order, setOrder] = useState(undefined);
3872
3872
  const [orderBy, setOrderBy] = useState("");
@@ -15012,7 +15012,7 @@ function useEvent(event, handler, passive = false) {
15012
15012
  });
15013
15013
  }
15014
15014
 
15015
- function Grid({ columns: columnsData, children, fixedColumns, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense = true, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions, }) {
15015
+ function BaseGrid({ columns: columnsData, children, fixedColumns, paperProps, tableBodyProps, tableHeadProps, tableProps, sortedDirection, sortedBy, onSortBy, dense = true, striped, bordered, currentPage, totalNumberOfPages, onPageChange, rowsPerPage, setRowsPerPage, rowsPerPageOptions, }) {
15016
15016
  const [columns, setColumns] = useState([]);
15017
15017
  const [startResize, setStartResize] = useState(0);
15018
15018
  const columnsRef = useRef(null);
@@ -15066,17 +15066,17 @@ function Grid({ columns: columnsData, children, fixedColumns, paperProps, tableB
15066
15066
  useEvent("mouseup", () => {
15067
15067
  setDraggingColumn(-1);
15068
15068
  });
15069
- return (React__default.createElement(Paper, Object.assign({}, paperProps, { sx: Object.assign({ "tbody tr td": {
15069
+ return (React__default.createElement(Paper, Object.assign({}, paperProps, { sx: Object.assign({ "tr td": {
15070
15070
  py: dense ? 0.23 : 0.7,
15071
15071
  border: bordered ? "1px solid" : "",
15072
15072
  borderColor: "divider",
15073
- }, "tbody tr:nth-of-type(even)": {
15073
+ }, "tr:nth-of-type(even)": {
15074
15074
  transition: "background-color ease 200ms",
15075
15075
  bgcolor: striped ? "divider" : "initial",
15076
- }, width: fixedColumns ? "fit-content" : "100%" }, paperProps === null || paperProps === void 0 ? void 0 : paperProps.sx) }),
15076
+ }, width: fixedColumns ? "fit-content" : "100" }, paperProps === null || paperProps === void 0 ? void 0 : paperProps.sx) }),
15077
15077
  React__default.createElement(Table, Object.assign({ size: "small", stickyHeader: true }, tableProps, { sx: Object.assign(Object.assign({}, getTableWidth()), tableProps === null || tableProps === void 0 ? void 0 : tableProps.sx) }),
15078
15078
  React__default.createElement(TableHead, Object.assign({}, tableHeadProps),
15079
- React__default.createElement(TableRow, { ref: columnsRef }, columns.map((column, index) => (React__default.createElement(TableCell, { key: column.name, padding: dense ? "none" : "normal", sx: Object.assign(Object.assign({ border: "1px solid", borderColor: "divider", width: column.width || 100, minWidth: getColWidth((column === null || column === void 0 ? void 0 : column.width) || 100), maxWidth: getColWidth((column === null || column === void 0 ? void 0 : column.width) || 100), pl: 2, zIndex: columns.length - index }, column === null || column === void 0 ? void 0 : column.sx), { position: tableProps.stickyHeader ? "sticky" : "relative" }) },
15079
+ React__default.createElement(TableRow, { ref: columnsRef }, columns.map((column, index) => (React__default.createElement(TableCell, { key: column.name, padding: dense ? "none" : "normal", sx: Object.assign({ border: "1px solid", borderColor: "divider", width: column.width || 100, minWidth: getColWidth((column === null || column === void 0 ? void 0 : column.width) || 100), maxWidth: getColWidth((column === null || column === void 0 ? void 0 : column.width) || 100), pl: 2, zIndex: columns.length - index }, column === null || column === void 0 ? void 0 : column.sx) },
15080
15080
  React__default.createElement(TableSortLabel, { active: sortedBy === column.name, direction: sortedDirection, onClick: () => onSortBy(column.name), disabled: column.canSort === false, sx: { position: "relative", right: "-9px" } }, column.label),
15081
15081
  index < columns.length && (React__default.createElement(Box$2, { id: `resize-col-${index}`, sx: {
15082
15082
  width: "4px",
@@ -15284,5 +15284,5 @@ const Modal = (_a) => {
15284
15284
  React__default.createElement(React__default.Fragment, null, rest.children))));
15285
15285
  };
15286
15286
 
15287
- export { Autocomplete, Grid as BaseGrid, Checkbox, EditableTableCell, Grid$1 as Grid, Input, InputMask, LargeButton, Modal, Radio, Select, Switch, TabPanel, Td, Tr, createFilter, filterData, getTabProps, useEvent, useFilter, useGrid, useLoading };
15287
+ export { Autocomplete, BaseGrid, Checkbox, EditableTableCell, Grid, Input, InputMask, LargeButton, Modal, Radio, Select, Switch, TabPanel, Td, Tr, createFilter, filterData, getTabProps, useEvent, useFilter, useGrid, useLoading };
15288
15288
  //# sourceMappingURL=index.js.map