@sikka/hawa 0.0.43 → 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.
Files changed (31) hide show
  1. package/countries.json +1 -0
  2. package/es/index.es.js +1 -1
  3. package/lib/index.js +1 -1
  4. package/package.json +6 -1
  5. package/postcss.config.js +6 -0
  6. package/src/elements/ActionButton.js +11 -2
  7. package/src/elements/HawaAccordian.js +103 -17
  8. package/src/elements/HawaAlert.js +19 -6
  9. package/src/elements/HawaButton.js +10 -2
  10. package/src/elements/HawaCheckbox.js +25 -10
  11. package/src/elements/HawaChip.js +5 -2
  12. package/src/elements/HawaDrawerItem.js +26 -0
  13. package/src/elements/HawaPhoneInput2.js +78 -0
  14. package/src/elements/{AdaptiveButton.js → ResponsiveButton.js} +2 -2
  15. package/src/elements/index.js +4 -2
  16. package/src/layout/HawaBottomAppBar.js +76 -0
  17. package/src/layout/HawaDrawer.js +109 -0
  18. package/src/layout/HawaLayout.js +80 -0
  19. package/src/layout/index.js +3 -0
  20. package/src/styles.css +991 -2
  21. package/src/tailwind.css +3 -0
  22. package/storybook-static/iframe.html +1 -1
  23. package/storybook-static/index.html +1 -1
  24. package/storybook-static/main.aaee24e3.iframe.bundle.js +1 -0
  25. package/storybook-static/project.json +1 -1
  26. package/storybook-static/{vendors~main.261044d5.iframe.bundle.js → vendors~main.afb35182.iframe.bundle.js} +4 -4
  27. package/storybook-static/{vendors~main.261044d5.iframe.bundle.js.LICENSE.txt → vendors~main.afb35182.iframe.bundle.js.LICENSE.txt} +0 -0
  28. package/storybook-static/vendors~main.afb35182.iframe.bundle.js.map +1 -0
  29. package/tailwind.config.js +9 -0
  30. package/storybook-static/main.2f0f77ef.iframe.bundle.js +0 -1
  31. package/storybook-static/vendors~main.261044d5.iframe.bundle.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.43",
3
+ "version": "0.0.45",
4
4
  "description": "UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -37,6 +37,7 @@
37
37
  "next": "^12.1.0",
38
38
  "next-scripts": "^0.3.4",
39
39
  "next-translate": "^1.3.5",
40
+ "postcss-focus-visible": "^7.1.0",
40
41
  "qs": "^6.10.3",
41
42
  "react": "^17.0.1",
42
43
  "react-color": "^2.19.3",
@@ -52,6 +53,7 @@
52
53
  "rollup-plugin-peer-deps-external": "^2.2.4",
53
54
  "rollup-plugin-postcss": "^4.0.0",
54
55
  "rollup-plugin-terser": "^7.0.2",
56
+ "tailwindcss": "^3.2.1",
55
57
  "tinycolor2": "^1.4.2"
56
58
  },
57
59
  "peerDependencies": {
@@ -80,5 +82,8 @@
80
82
  "@storybook/core-server/webpack": "^5",
81
83
  "@storybook/builder-webpack4/webpack": "^5",
82
84
  "@storybook/manager-webpack4/webpack": "^5"
85
+ },
86
+ "dependencies": {
87
+ "flowbite": "^1.5.3"
83
88
  }
84
89
  }
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ }
6
+ }
@@ -1,5 +1,14 @@
1
- import Button from "@mui/material/Button";
2
1
 
3
2
  export const ActionButton = (props) => {
4
- return <Button {...props}>{props.text}</Button>;
3
+ // <Button {...props}>{props.text}</Button>;
4
+ return (
5
+ <button
6
+ type="button"
7
+ class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
8
+ >
9
+ {props.icon ? <div class="mr-2 -ml-1 w-5 h-5">{props.icon}</div> : null}
10
+
11
+ {props.children}
12
+ </button>
13
+ );
5
14
  };
@@ -1,25 +1,111 @@
1
1
  import React from "react";
2
- import ExpandMore from "@mui/icons-material/ExpandMore";
3
- import Typography from "@mui/material/Typography";
4
- import Accordion from "@mui/material/Accordion";
5
- import AccordionSummary from "@mui/material/AccordionSummary";
6
- import AccordionDetails from "@mui/material/AccordionDetails";
7
2
  import PropTypes from "prop-types";
3
+ import "flowbite";
8
4
 
9
- export const HawaAccordian = (props) => {
5
+ const AccordionItem = (props) => {
6
+ let noRounding =
7
+ "flex items-center justify-between w-full p-5 font-medium text-left border border-gray-200 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-800 bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white";
8
+ let roundedTop =
9
+ "rounded-t-xl border-b-0 flex items-center justify-between w-full p-5 font-medium text-left border border-gray-200 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-800 bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white";
10
+ let roundedBottom =
11
+ "rounded-b-xl border-t-0 flex items-center justify-between w-full p-5 font-medium text-left border border-gray-200 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-800 bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white";
12
+ let accPaper =
13
+ "p-5 font-light border border-b-xl border-gray-200 dark:border-gray-700 dark:bg-gray-900";
14
+ let accPaperRounded =
15
+ "p-5 font-light border border-b-xl rounded-b-xl border-gray-200 dark:border-gray-700 dark:bg-gray-900";
10
16
  return (
11
- <Accordion elevation={0}>
12
- <AccordionSummary
13
- expandIcon={<ExpandMore />}
14
- aria-controls="panel1a-content"
15
- id="panel1a-header"
17
+ <div>
18
+ <h2 id={"accordion-collapse-heading-" + props.count}>
19
+ <button
20
+ type="button"
21
+ className={
22
+ props.count === 0 ? roundedTop : noRounding
23
+ // : props.count === -1
24
+ // ? roundedBottom
25
+ // : noRounding
26
+ }
27
+ data-accordion-target={"#accordion-collapse-body-" + props.count}
28
+ aria-expanded="true"
29
+ aria-controls={"accordion-collapse-body-" + props.count}
30
+ >
31
+ <span>What is Flowbite?</span>
32
+ <svg
33
+ data-accordion-icon=""
34
+ className="w-6 h-6 rotate-180 shrink-0"
35
+ fill="currentColor"
36
+ viewBox="0 0 20 20"
37
+ xmlns="http://www.w3.org/2000/svg"
38
+ >
39
+ <path
40
+ fill-rule="evenodd"
41
+ d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
42
+ clip-rule="evenodd"
43
+ ></path>
44
+ </svg>
45
+ </button>
46
+ </h2>
47
+ <div
48
+ id={"accordion-collapse-body-" + props.count}
49
+ className=""
50
+ aria-labelledby={"accordion-collapse-heading-" + props.count}
16
51
  >
17
- <Typography>{props.title}</Typography>
18
- </AccordionSummary>
19
- <AccordionDetails>
20
- <Typography>{props.content} </Typography>
21
- </AccordionDetails>
22
- </Accordion>
52
+ <div className={props.count === -1 ? accPaperRounded : accPaper}>
53
+ <p className="mb-2 text-gray-500 dark:text-gray-400">
54
+ Flowbite is an open-source library of interactive components built
55
+ on top of Tailwind CSS including buttons, dropdowns, modals,
56
+ navbars, and more.
57
+ </p>
58
+ <p className="text-gray-500 dark:text-gray-400">
59
+ Check out this guide to learn how to{" "}
60
+ <a
61
+ href="/docs/getting-started/introduction/"
62
+ class="text-blue-600 dark:text-blue-500 hover:underline"
63
+ >
64
+ get started
65
+ </a>{" "}
66
+ and start developing websites even faster with components on top of
67
+ Tailwind CSS.
68
+ </p>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ );
73
+ };
74
+ export const HawaAccordian = (props) => {
75
+ let accordionContent = [
76
+ { title: "etete", content: "teoite" },
77
+ { title: "etete", content: "teoite" },
78
+ { title: "etete", content: "teoite" },
79
+ { title: "etete", content: "teoite" }
80
+ ];
81
+ return (
82
+ <div id="accordion-collapse" data-accordion="collapse">
83
+ {accordionContent.map((acc, i) => {
84
+ return (
85
+ <AccordionItem
86
+ title={acc.title}
87
+ content={acc.content}
88
+ count={accordionContent.length - 1 === i ? -1 : i}
89
+ />
90
+ );
91
+ })}
92
+ {/* <AccordionItem count={1} />
93
+ <AccordionItem count={2} />
94
+ <AccordionItem count={3} /> */}
95
+ </div>
96
+
97
+ // <Accordion elevation={0}>
98
+ // <AccordionSummary
99
+ // expandIcon={<ExpandMore />}
100
+ // aria-controls="panel1a-content"
101
+ // id="panel1a-header"
102
+ // >
103
+ // <Typography>{props.title}</Typography>
104
+ // </AccordionSummary>
105
+ // <AccordionDetails>
106
+ // <Typography>{props.content} </Typography>
107
+ // </AccordionDetails>
108
+ // </Accordion>
23
109
  );
24
110
  };
25
111
  HawaAccordian.propTypes = {
@@ -1,14 +1,27 @@
1
1
  import React from "react";
2
- import Alert from "@mui/material/Alert";
3
- import AlertTitle from "@mui/material/AlertTitle";
4
2
  import PropTypes from "prop-types";
5
3
 
6
4
  export const HawaAlert = (props) => {
5
+ let severities = {
6
+ info: "text-blue-700 bg-blue-100 dark:bg-blue-200 dark:text-blue-800",
7
+ warning:
8
+ "text-yellow-700 bg-yellow-100 dark:bg-yellow-200 dark:text-yellow-800",
9
+ error: "text-red-700 bg-red-100 dark:bg-red-200 dark:text-red-800",
10
+ success: "text-green-700 bg-green-100 dark:bg-green-200 dark:text-green-800"
11
+ };
12
+
7
13
  return (
8
- <Alert severity={props.severity} icon={props.hideIcon}>
9
- {props.title && <AlertTitle>{props.title}</AlertTitle>}
10
- {props.text}
11
- </Alert>
14
+ <div
15
+ class={
16
+ "flex flex-col p-4 mb-4 text-sm rounded-lg" +
17
+ " " +
18
+ severities[props.severity]
19
+ }
20
+ role="alert"
21
+ >
22
+ <span class="font-medium">{props.title}</span>
23
+ <span>{" " + props.text}</span>
24
+ </div>
12
25
  );
13
26
  };
14
27
  HawaAlert.propTypes = {
@@ -1,6 +1,14 @@
1
1
  import React from "react";
2
- import Button from "@mui/material/Button";
3
2
 
4
3
  export const HawaButton = (props) => {
5
- return <Button {...props}>{props.children}</Button>;
4
+ return (
5
+ <button
6
+ type="button"
7
+ class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
8
+ >
9
+ {props.icon ? <div class="mr-2 -ml-1 w-5 h-5">{props.icon}</div> : null}
10
+
11
+ {props.children}
12
+ </button>
13
+ );
6
14
  };
@@ -5,16 +5,31 @@ import Checkbox from "@mui/material/Checkbox";
5
5
  export const HawaCheckbox = (props) => {
6
6
  console.log("props : ", props);
7
7
  return (
8
- <React.Fragment>
9
- <FormControlLabel
10
- label={props.label}
11
- control={
12
- <Checkbox
13
- style={{ color: props.color || null }}
14
- defaultChecked={props.defaultValue}
15
- />
16
- }
8
+ <div class="flex items-center mb-4">
9
+ <input
10
+ id="default-checkbox"
11
+ type="checkbox"
12
+ value=""
13
+ class="w-4 h-4 text-blue-600 bg-gray-100 rounded border-gray-300 focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"
17
14
  />
18
- </React.Fragment>
15
+ <label
16
+ for="default-checkbox"
17
+ class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300"
18
+ >
19
+ Default checkbox
20
+ </label>
21
+ </div>
22
+
23
+ // <React.Fragment>
24
+ // <FormControlLabel
25
+ // label={props.label}
26
+ // control={
27
+ // <Checkbox
28
+ // style={{ color: props.color || null }}
29
+ // defaultChecked={props.defaultValue}
30
+ // />
31
+ // }
32
+ // />
33
+ // </React.Fragment>
19
34
  );
20
35
  };
@@ -1,6 +1,9 @@
1
1
  import React from "react";
2
- import Chip from "@mui/material/Chip";
3
2
 
4
3
  export const HawaChip = (props) => {
5
- return <Chip {...props} />;
4
+ return (
5
+ <span class="bg-blue-100 text-blue-800 text-xs font-semibold mr-2 px-2.5 py-0.5 rounded dark:bg-blue-200 dark:text-blue-800">
6
+ {props.label}
7
+ </span>
8
+ );
6
9
  };
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+
3
+ const HawaDrawerItem = (props) => {
4
+ return (
5
+ <li>
6
+ <a
7
+ href="#"
8
+ class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700"
9
+ >
10
+ <svg
11
+ aria-hidden="true"
12
+ class="w-6 h-6 text-gray-500 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white"
13
+ fill="currentColor"
14
+ viewBox="0 0 20 20"
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ >
17
+ <path d="M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"></path>
18
+ <path d="M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"></path>
19
+ </svg>
20
+ <span class="ml-3">{props.text}</span>
21
+ </a>
22
+ </li>
23
+ );
24
+ };
25
+
26
+ export default HawaDrawerItem;
@@ -0,0 +1,78 @@
1
+ // import { Input } from "@mui/material";
2
+ // import { height } from "@mui/system";
3
+ // import { useState } from "react";
4
+ // import Countries from "../../countries.json";
5
+
6
+ // export default function HawaPhoneInput2({ preferredCountry }) {
7
+ // const [code, setCode] = useState(preferredCountry.toUpperCase() ?? "");
8
+ // const [tel, setTel] = useState("");
9
+
10
+ // const handleChangePhone = (phone) => {
11
+ // if (phone.length == 0) {
12
+ // setTel("");
13
+ // setCode("");
14
+ // return;
15
+ // }
16
+ // if (!phone.startsWith("+")) phone = "+".concat(phone);
17
+ // if (phone.length >= 5) {
18
+ // setTel(phone);
19
+ // return;
20
+ // }
21
+ // let findDialCode = Countries.find((country) => country.dial_code == phone);
22
+ // if (findDialCode != undefined && findDialCode != null) {
23
+ // setCode(findDialCode.code);
24
+ // }
25
+ // setTel(phone);
26
+ // };
27
+
28
+ // return (
29
+ // <div
30
+ // style={{
31
+ // display: "flex",
32
+ // flexDirection: "row",
33
+ // justifyContent: "center",
34
+ // alignItems: "center",
35
+ // height: "100%"
36
+ // }}
37
+ // >
38
+ // <div style={{ maxWidth: "50px", height: "100%" }}>
39
+ // <select
40
+ // style={{
41
+ // width: 38,
42
+ // height: 40,
43
+ // scale: 1.2,
44
+ // borderRight: "none",
45
+ // borderTop: "none",
46
+ // borderTopLeftRadius: 10
47
+ // }}
48
+ // onChange={(e) => {
49
+ // setCode(e.target.value);
50
+ // setTel(
51
+ // Countries.find((country) => country.code == e.target.value)
52
+ // .dial_code
53
+ // );
54
+ // }}
55
+ // defaultValue={code}
56
+ // value={code}
57
+ // >
58
+ // {Countries.map((country) => (
59
+ // <option
60
+ // value={country.code}
61
+ // dangerouslySetInnerHTML={{
62
+ // __html: country.unicode + " " + country.name
63
+ // }}
64
+ // key={country.name + "_" + country.code}
65
+ // ></option>
66
+ // ))}
67
+ // </select>
68
+ // </div>
69
+
70
+ // <Input
71
+ // type="tel"
72
+ // style={{ borderBottomLeftRadius: 0, borderTopLeftRadius: 0 }}
73
+ // onChange={(e) => handleChangePhone(e.target.value)}
74
+ // value={tel}
75
+ // />
76
+ // </div>
77
+ // );
78
+ // }
@@ -3,7 +3,7 @@ import Button from "@mui/material/Button";
3
3
  import Tooltip from "@mui/material/Tooltip";
4
4
  import PropTypes from "prop-types";
5
5
 
6
- export const AdaptiveButton = (props) => {
6
+ export const ResponsiveButton = (props) => {
7
7
  if (props.showText) {
8
8
  return (
9
9
  <Button variant="adaptive-dark" onClick={props.onClick}>
@@ -24,7 +24,7 @@ export const AdaptiveButton = (props) => {
24
24
  }
25
25
  };
26
26
 
27
- AdaptiveButton.propTypes = {
27
+ ResponsiveButton.propTypes = {
28
28
  buttonText: PropTypes.string,
29
29
  onClick: PropTypes.func,
30
30
  showText: PropTypes.bool,
@@ -1,4 +1,4 @@
1
- export * from "./AdaptiveButton";
1
+ export * from "./ResponsiveButton";
2
2
  export * from "./ActionButton";
3
3
  export * from "./HawaSnackbar";
4
4
  export * from "./HawaCheckbox";
@@ -20,4 +20,6 @@ export * from "./HawaSearchBar";
20
20
  export * from "./HawaAccordian";
21
21
  export * from "./DragDropImages";
22
22
  export * from "./DraggableCard";
23
- export * from "./HawaPhoneInput"
23
+ export * from "./HawaPhoneInput";
24
+ export * from "./HawaPhoneInput2";
25
+ export * from "./HawaDrawerItem";
@@ -0,0 +1,76 @@
1
+ import { AppBar, Paper, Box, IconButton, Typography } from "@mui/material";
2
+
3
+ export function HawaBottomAppBar({ args }) {
4
+ return (
5
+ <AppBar
6
+ position="fixed"
7
+ sx={args.sx}
8
+ style={{
9
+ bottom: 0,
10
+ top: "auto",
11
+ padding: 10,
12
+ flexDirection: "row",
13
+ alignItems: "center",
14
+ justifyContent: "space-evenly"
15
+ }}
16
+ color={args.color}
17
+ >
18
+ <BottomAppBar appBarContent={args.appBarContent} />
19
+ </AppBar>
20
+ );
21
+ }
22
+
23
+ export function BottomAppBar(props) {
24
+ return (
25
+ <Paper
26
+ elevation={3}
27
+ style={{
28
+ width: "100%",
29
+ display: "flex",
30
+ flexDirection: "row",
31
+ justifyContent: "space-evenly",
32
+ borderRadius: 10,
33
+ alignContent: "center",
34
+ padding: 10
35
+ }}
36
+ variant="outlined"
37
+ >
38
+ {props.appBarContent.map(({ label, icon, action }) => (
39
+ <SubAppBarContent label={label} icon={icon} action={action} />
40
+ ))}
41
+ </Paper>
42
+ );
43
+ }
44
+
45
+ function SubAppBarContent(props) {
46
+ return (
47
+ <Box
48
+ display="flex"
49
+ flexDirection="row"
50
+ justifyContent="center"
51
+ alignItems="center"
52
+ sx={{
53
+ "&:hover": {
54
+ cursor: "pointer",
55
+ color: "blue"
56
+ }
57
+ }}
58
+ onClick={props.action}
59
+ >
60
+ <IconButton
61
+ sx={{
62
+ ml: 1,
63
+ "&.MuiButtonBase-root:hover": {
64
+ color: "blue",
65
+ bgcolor: "transparent"
66
+ }
67
+ }}
68
+ >
69
+ {props.icon}
70
+ </IconButton>
71
+ <Typography sx={{ display: { xs: "none", sm: "none", md: "block" } }}>
72
+ {props.label}
73
+ </Typography>
74
+ </Box>
75
+ );
76
+ }
@@ -0,0 +1,109 @@
1
+ import * as React from "react";
2
+ import PropTypes from "prop-types";
3
+ import AppBar from "@mui/material/AppBar";
4
+ import Box from "@mui/material/Box";
5
+ import CssBaseline from "@mui/material/CssBaseline";
6
+ import Divider from "@mui/material/Divider";
7
+ import Drawer from "@mui/material/Drawer";
8
+ import List from "@mui/material/List";
9
+ import ListItem from "@mui/material/ListItem";
10
+ import ListItemButton from "@mui/material/ListItemButton";
11
+ import ListItemIcon from "@mui/material/ListItemIcon";
12
+ import ListItemText from "@mui/material/ListItemText";
13
+ import Toolbar from "@mui/material/Toolbar";
14
+ import SplitscreenIcon from "@mui/icons-material/Splitscreen";
15
+ import StyleIcon from "@mui/icons-material/Style";
16
+ import SettingsIcon from "@mui/icons-material/Settings";
17
+
18
+ export function HawaDrawer(props) {
19
+ const { window, children } = props;
20
+ const [mobileOpen, setMobileOpen] = React.useState(false);
21
+ const [drawerMaxWidth, setDrawerMaxWidth] = React.useState(
22
+ props.drawerMaxWidth ?? 240
23
+ );
24
+
25
+ const handleDrawerToggle = () => {
26
+ props.handleDrawerToggle();
27
+ setMobileOpen(!mobileOpen);
28
+ };
29
+
30
+ const drawer = (
31
+ <div>
32
+ <Toolbar />
33
+ <Divider />
34
+ <List>
35
+ {props.drawerContent.map(({ label, icon, action }, index) => (
36
+ <ListItem key={label} disablePadding onClick={props.action}>
37
+ <ListItemButton>
38
+ <ListItemIcon>{icon}</ListItemIcon>
39
+ <ListItemText primary={label} />
40
+ </ListItemButton>
41
+ </ListItem>
42
+ ))}
43
+ </List>
44
+ </div>
45
+ );
46
+
47
+ const container =
48
+ window !== undefined ? () => window().document.body : undefined;
49
+
50
+ return (
51
+ <Box sx={{ display: "flex" }}>
52
+ <CssBaseline />
53
+ <Box
54
+ component="nav"
55
+ sx={{ width: { sm: drawerMaxWidth }, flexShrink: { sm: 0 } }}
56
+ aria-label="mailbox folders"
57
+ >
58
+ {/* The implementation can be swapped with js to avoid SEO duplication of links. */}
59
+ <Drawer
60
+ container={container}
61
+ variant="temporary"
62
+ open={mobileOpen}
63
+ onClose={handleDrawerToggle}
64
+ ModalProps={{
65
+ keepMounted: true // Better open performance on mobile.
66
+ }}
67
+ sx={{
68
+ display: { xs: "block", sm: "none" },
69
+ "& .MuiDrawer-paper": {
70
+ boxSizing: "border-box",
71
+ width: drawerMaxWidth
72
+ }
73
+ }}
74
+ >
75
+ {drawer}
76
+ </Drawer>
77
+ <Drawer
78
+ variant="permanent"
79
+ sx={{
80
+ display: { xs: "none", sm: "block" },
81
+ "& .MuiDrawer-paper": {
82
+ boxSizing: "border-box",
83
+ width: drawerMaxWidth
84
+ }
85
+ }}
86
+ open
87
+ >
88
+ {drawer}
89
+ </Drawer>
90
+ </Box>
91
+
92
+ <Box
93
+ component="main"
94
+ sx={{
95
+ flexGrow: 1,
96
+ p: 3,
97
+ width: { sm: `calc(100% - ${drawerMaxWidth}px)` }
98
+ }}
99
+ // style={{
100
+ // backgroundColor: "red",
101
+ // height: "100%"
102
+ // }}
103
+ >
104
+ {/* <Toolbar /> */}
105
+ {children}
106
+ </Box>
107
+ </Box>
108
+ );
109
+ }