@sikka/hawa 0.0.61 → 0.0.63

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendors~main.e7c4fe25.iframe.bundle.js","sources":[],"mappings":";A","sourceRoot":""}
@@ -1,43 +0,0 @@
1
- import CloseIcon from "@mui/icons-material/Close";
2
- import Dialog from "@mui/material/Dialog";
3
- import DialogActions from "@mui/material/DialogActions";
4
- import DialogContent from "@mui/material/DialogContent";
5
- import DialogTitle from "@mui/material/DialogTitle";
6
- import IconButton from "@mui/material/IconButton";
7
- import React, { useState } from "react";
8
-
9
- const BootstrapDialogTitle = (props) => {
10
- const { children, onClose, hideClose, ...other } = props;
11
-
12
- return (
13
- <DialogTitle sx={{ m: 0, p: 2 }} {...other}>
14
- {children}
15
- {!hideClose ? (
16
- <IconButton
17
- aria-label="close"
18
- onClick={onClose}
19
- sx={{
20
- position: "absolute",
21
- right: 8,
22
- top: 8,
23
- color: (theme) => theme.palette.grey[500]
24
- }}
25
- >
26
- <CloseIcon />
27
- </IconButton>
28
- ) : null}
29
- </DialogTitle>
30
- );
31
- };
32
- export function HawaDialog(props) {
33
- const [open, setOpen] = useState(false);
34
- return (
35
- <Dialog {...props} variant="main">
36
- <BootstrapDialogTitle onClose={props.onClose} hideClose={props.hideClose}>
37
- {props.title}
38
- </BootstrapDialogTitle>
39
- <DialogContent>{props.children}</DialogContent>
40
- <DialogActions>{props.actions}</DialogActions>
41
- </Dialog>
42
- );
43
- }
@@ -1,61 +0,0 @@
1
- import { Button, Container, Stack } from "@mui/material";
2
- import React from "react";
3
- import PropTypes from "prop-types";
4
- import { HawaPopMenu } from "../elements/HawaPopMenu";
5
- import MenuIcon from "@mui/icons-material/Menu";
6
-
7
- export const HawaPageControls = (props) => {
8
- const [anchorElUser, setAnchorElUser] = React.useState(null);
9
- const handleOpenUserMenu = (event) => setAnchorElUser(event.currentTarget);
10
-
11
- return (
12
- <Container
13
- variant="page-controls"
14
- {...props}
15
- // maxWidth="sm"
16
- style={{
17
- display: "flex",
18
- flexDirection: "row",
19
- justifyContent: "space-between"
20
- }}
21
- >
22
- <Button variant="layout" onClick={props.backAction}>
23
- {props.backText}
24
- </Button>
25
- <Stack
26
- direction="row"
27
- spacing={1}
28
- sx={{ display: { xs: "none", md: "flex" } }}
29
- >
30
- {props.actionButtons.map((d) => {
31
- return <Button variant="layout">{d.label}</Button>;
32
- })}
33
- </Stack>
34
- <Stack
35
- direction="row"
36
- spacing={1}
37
- sx={{ display: { xs: "flex", md: "none" } }}
38
- >
39
- <Button variant="layout" onClick={handleOpenUserMenu}>
40
- <MenuIcon />
41
- </Button>
42
- <HawaPopMenu
43
- handleClose={(e) => setAnchorElUser(null)}
44
- anchor={anchorElUser}
45
- menuItems={props.actionButtons}
46
- />
47
- </Stack>
48
- </Container>
49
- );
50
- };
51
-
52
- HawaPageControls.propTypes = {
53
- backText: PropTypes.string,
54
- backAction: PropTypes.func,
55
- actionButtons: PropTypes.arrayOf(
56
- PropTypes.shape({
57
- label: PropTypes.string,
58
- action: PropTypes.func
59
- })
60
- )
61
- };