@symply.io/basic-components 1.1.2-beta.2 → 1.1.2-beta.4
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/DataTable/TableFooter.js
CHANGED
@@ -14,9 +14,13 @@ import { cloneElement } from "react";
|
|
14
14
|
import TableRow from "@mui/material/TableRow";
|
15
15
|
import Footer from "@mui/material/TableFooter";
|
16
16
|
import TableCell from "@mui/material/TableCell";
|
17
|
+
import { alpha, useTheme } from "@mui/material/styles";
|
17
18
|
function TableFooter(props) {
|
18
19
|
var footers = props.footers;
|
19
|
-
|
20
|
+
var theme = useTheme();
|
21
|
+
return (_jsx(Footer, { children: _jsx(TableRow, __assign({ sx: {
|
22
|
+
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.focusOpacity)
|
23
|
+
} }, { children: footers.map(function (footer) {
|
20
24
|
var accessor = footer.accessor, Cell = footer.Cell, _a = footer.disablePadding, disablePadding = _a === void 0 ? false : _a, _b = footer.align, align = _b === void 0 ? "center" : _b, width = footer.width;
|
21
25
|
return (_jsx(TableCell, __assign({ align: align, padding: disablePadding ? "none" : "normal", sx: {
|
22
26
|
width: width,
|
package/DataTable/TableHeader.js
CHANGED
@@ -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
|
-
|
20
|
+
var theme = useTheme();
|
21
|
+
return (_jsx(TableHead, { children: _jsx(TableRow, __assign({ sx: {
|
22
|
+
backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.focusOpacity)
|
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,
|
package/DataTable/index.js
CHANGED
@@ -22,7 +22,14 @@ 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: {
|
25
|
+
return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsxs(TableContainer, { children: [_jsxs(Table, __assign({ sx: {
|
26
|
+
minWidth: 600,
|
27
|
+
borderWidth: "thin",
|
28
|
+
borderColor: "#e5e5e5",
|
29
|
+
borderStyle: "solid",
|
30
|
+
borderRadius: "4px",
|
31
|
+
borderCollapse: "unset !important"
|
32
|
+
}, 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
33
|
}
|
27
34
|
export default DataTable;
|
28
35
|
export { default as useDataTable } from "./useTable";
|
package/Sidebar/SidebarItem.js
CHANGED
@@ -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,
|
29
|
+
backgroundColor: alpha(theme.palette.primary.main, active
|
30
|
+
? theme.palette.action.activatedOpacity
|
31
|
+
: theme.palette.action.selectedOpacity)
|
30
32
|
},
|
31
33
|
backgroundColor: active
|
32
34
|
? alpha(theme.palette.primary.main, theme.palette.action.activatedOpacity)
|