@symply.io/basic-components 1.1.2-beta.2 → 1.1.2-beta.3

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.
@@ -14,9 +14,13 @@ import { cloneElement } from "react";
14
14
  import TableRow from "@mui/material/TableRow";
15
15
  import TableHead from "@mui/material/TableHead";
16
16
  import TableCell from "@mui/material/TableCell";
17
+ import { alpha, useTheme } from "@mui/material/styles";
17
18
  function TableHeader(props) {
18
19
  var headers = props.headers;
19
- return (_jsx(TableHead, { children: _jsx(TableRow, __assign({ sx: { backgroundColor: "#eaf0f6" } }, { children: headers.map(function (header) {
20
+ var theme = useTheme();
21
+ return (_jsx(TableHead, { children: _jsx(TableRow, __assign({ sx: {
22
+ backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
23
+ } }, { children: headers.map(function (header) {
20
24
  var accessor = header.accessor, Cell = header.Cell, _a = header.disablePadding, disablePadding = _a === void 0 ? false : _a, _b = header.align, align = _b === void 0 ? "center" : _b, width = header.width, title = header.title, _c = header.sortable, sortable = _c === void 0 ? false : _c, onSort = header.onSort;
21
25
  return (_jsx(TableCell, __assign({ title: title, align: align, padding: disablePadding ? "none" : "normal", sx: {
22
26
  width: width,
@@ -22,7 +22,13 @@ function DataTable(props) {
22
22
  var _a = props.columns, columns = _a === void 0 ? [] : _a, _b = props.rows, rows = _b === void 0 ? [] : _b, _c = props.headers, headers = _c === void 0 ? [] : _c, _d = props.footers, footers = _d === void 0 ? [] : _d, _e = props.noDataText, noDataText = _e === void 0 ? "No Data!" : _e, dense = props.dense, stickyHeader = props.stickyHeader, primaryColor = props.primaryColor, secondaryColor = props.secondaryColor, onRowClick = props.onRowClick;
23
23
  var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
24
24
  var isUpMd = useMediaQuery(theme.breakpoints.up("md"));
25
- return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(TableContainer, { children: [_jsxs(Table, __assign({ sx: { minWidth: 600 }, stickyHeader: stickyHeader, size: dense ? "small" : "medium" }, { children: [_jsx(TableHeader, { headers: headers }), _jsx(TableBody, { rows: rows, columns: columns, noDataText: noDataText, onRowClick: onRowClick })] })), footers.length > 0 ? _jsx(TableFooter, { footers: footers }) : _jsx(_Fragment, {})] }) })));
25
+ return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(TableContainer, __assign({ sx: {
26
+ borderWidth: "thin",
27
+ borderColor: "#e5e5e5",
28
+ borderStyle: "solid",
29
+ borderRadius: "4px",
30
+ borderCollapse: "unset !important"
31
+ } }, { children: [_jsxs(Table, __assign({ sx: { minWidth: 600 }, stickyHeader: stickyHeader, size: dense ? "small" : "medium" }, { children: [_jsx(TableHeader, { headers: headers }), _jsx(TableBody, { rows: rows, columns: columns, noDataText: noDataText, onRowClick: onRowClick })] })), footers.length > 0 ? _jsx(TableFooter, { footers: footers }) : _jsx(_Fragment, {})] })) })));
26
32
  }
27
33
  export default DataTable;
28
34
  export { default as useDataTable } from "./useTable";
@@ -26,7 +26,9 @@ function SidebarItem(props) {
26
26
  display: "flex",
27
27
  width: "100%",
28
28
  "&:hover": {
29
- backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)
29
+ backgroundColor: alpha(theme.palette.primary.main, active
30
+ ? theme.palette.action.activatedOpacity
31
+ : theme.palette.action.hoverOpacity)
30
32
  },
31
33
  backgroundColor: active
32
34
  ? alpha(theme.palette.primary.main, theme.palette.action.activatedOpacity)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symply.io/basic-components",
3
- "version": "1.1.2-beta.2",
3
+ "version": "1.1.2-beta.3",
4
4
  "description": "Basic and reusable components for all frontend of Symply apps",
5
5
  "keywords": [
6
6
  "react",