@sikka/hawa 0.0.33 → 0.0.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "description": "UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
package/rollup.config.js CHANGED
@@ -1,9 +1,9 @@
1
- import babel from "rollup-plugin-babel";
2
1
  import resolve from "@rollup/plugin-node-resolve";
2
+ import commonjs from "@rollup/plugin-commonjs";
3
+ import babel from "rollup-plugin-babel";
3
4
  import external from "rollup-plugin-peer-deps-external";
4
5
  import { terser } from "rollup-plugin-terser";
5
6
  import postcss from "rollup-plugin-postcss";
6
- import commonjs from "@rollup/plugin-commonjs";
7
7
 
8
8
  export default [
9
9
  {
@@ -0,0 +1 @@
1
+ export * from "./PricingPlans";
@@ -0,0 +1,4 @@
1
+ export * from "./Account";
2
+ export * from "./AuthForms";
3
+ export * from "./Payment";
4
+ export * from "./Pricing";
@@ -34,7 +34,7 @@ export const HawaPopMenu = (props) => {
34
34
  {props.menuItems.map((item) => (
35
35
  <MenuItem key={item.label} onClick={item.action}>
36
36
  {item.icon && <item.icon />}
37
- <div style={{ width: 10 }} />
37
+ {item.icon && <div style={{ width: 10 }} />}
38
38
  <Typography textAlign="center">{item.label}</Typography>
39
39
  </MenuItem>
40
40
  ))}
package/src/index.js CHANGED
@@ -1,5 +1,3 @@
1
- export * from "./blocks/Account";
2
- export * from "./blocks/AuthForms";
3
- export * from "./blocks/Payment";
1
+ export * from "./blocks";
4
2
  export * from "./elements";
5
3
  export * from "./layout";
@@ -0,0 +1,61 @@
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
+ };
@@ -2,3 +2,4 @@ export * from "./Box";
2
2
  export * from "./HawaAppLayout";
3
3
  export * from "./HawaDialog";
4
4
  export * from "./HawaAppBar";
5
+ export * from "./HawaPageControls";
@@ -345,4 +345,4 @@
345
345
 
346
346
 
347
347
 
348
- window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.708d7ac1.iframe.bundle.js"></script><script src="vendors~main.a7262b49.iframe.bundle.js"></script><script src="main.2511f65a.iframe.bundle.js"></script></body></html>
348
+ window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.708d7ac1.iframe.bundle.js"></script><script src="vendors~main.a7262b49.iframe.bundle.js"></script><script src="main.e9b7f5c4.iframe.bundle.js"></script></body></html>