@sikka/hawa 0.0.30 → 0.0.33

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 (28) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +1 -1
  4. package/src/blocks/AuthForms/NewPasswordForm.js +4 -0
  5. package/src/blocks/AuthForms/ResetPasswordForm.js +6 -2
  6. package/src/blocks/AuthForms/SignUpForm.js +7 -28
  7. package/src/blocks/Payment/ChargeWalletForm.js +18 -8
  8. package/src/blocks/Payment/Confirmation.js +3 -0
  9. package/src/blocks/Payment/CreditCardForm.js +0 -23
  10. package/src/blocks/Pricing/PricingPlans.js +3 -0
  11. package/src/elements/HawaColorPicker.js +1 -0
  12. package/src/elements/HawaPopMenu.js +5 -1
  13. package/src/elements/HawaPricingCard.js +18 -1
  14. package/src/elements/HawaRange.js +31 -0
  15. package/src/elements/HawaSettingsRow.js +2 -0
  16. package/src/elements/HawaTable.js +58 -20
  17. package/src/elements/HawaTextField.js +6 -2
  18. package/src/elements/index.js +1 -0
  19. package/src/layout/HawaAppBar.js +37 -64
  20. package/src/layout/HawaAppLayout.js +32 -14
  21. package/storybook-static/iframe.html +1 -1
  22. package/storybook-static/main.2511f65a.iframe.bundle.js +1 -0
  23. package/storybook-static/vendors~main.a7262b49.iframe.bundle.js +76 -0
  24. package/storybook-static/{vendors~main.8ffaa38a.iframe.bundle.js.LICENSE.txt → vendors~main.a7262b49.iframe.bundle.js.LICENSE.txt} +0 -0
  25. package/storybook-static/vendors~main.a7262b49.iframe.bundle.js.map +1 -0
  26. package/storybook-static/main.cbf6de78.iframe.bundle.js +0 -1
  27. package/storybook-static/vendors~main.8ffaa38a.iframe.bundle.js +0 -76
  28. package/storybook-static/vendors~main.8ffaa38a.iframe.bundle.js.map +0 -1
@@ -16,8 +16,6 @@ import ListItemText from "@mui/material/ListItemText";
16
16
  import Avatar from "@mui/material/Avatar";
17
17
  import Tooltip from "@mui/material/Tooltip";
18
18
  import { HawaPopMenu } from "../elements/HawaPopMenu";
19
- // use this to detect size and change things accordingly
20
- // import useMediaQuery from '@mui/material/useMediaQuery';
21
19
 
22
20
  const drawerWidth = 240;
23
21
 
@@ -36,16 +34,16 @@ const closedMixin = (theme) => ({
36
34
  duration: theme.transitions.duration.leavingScreen
37
35
  }),
38
36
  overflowX: "hidden",
39
- width: `calc(${theme.spacing(7)} + 1px)`,
37
+ width: `calc(${theme.spacing(8)} + 1px)`,
40
38
  [theme.breakpoints.up("sm")]: {
41
39
  width: `calc(${theme.spacing(8)} + 1px)`
42
40
  }
43
41
  });
44
42
 
45
- const DrawerHeader = styled("div")(({ theme }) => ({
43
+ const DrawerHeader = styled("div")(({ theme, direction }) => ({
46
44
  display: "flex",
47
45
  alignItems: "center",
48
- justifyContent: "flex-end",
46
+ justifyContent: direction === "rtl" ? "flex-start" : "flex-end",
49
47
  padding: theme.spacing(0, 1),
50
48
  // necessary for content to be below app bar
51
49
  ...theme.mixins.toolbar
@@ -53,14 +51,16 @@ const DrawerHeader = styled("div")(({ theme }) => ({
53
51
 
54
52
  const AppBar = styled(MuiAppBar, {
55
53
  shouldForwardProp: (prop) => prop !== "open"
56
- })(({ theme, open }) => ({
54
+ })(({ theme, open, direction }) => ({
57
55
  zIndex: theme.zIndex.drawer + 1,
58
56
  transition: theme.transitions.create(["width", "margin"], {
59
57
  easing: theme.transitions.easing.sharp,
60
58
  duration: theme.transitions.duration.leavingScreen
61
59
  }),
60
+
62
61
  ...(open && {
63
- marginLeft: drawerWidth,
62
+ marginLeft: direction === "rtl" ? 0 : drawerWidth,
63
+ marginRight: direction === "rtl" ? drawerWidth : 0,
64
64
  width: `calc(100% - ${drawerWidth}px)`,
65
65
  transition: theme.transitions.create(["width", "margin"], {
66
66
  easing: theme.transitions.easing.sharp,
@@ -89,7 +89,7 @@ const Drawer = styled(MuiDrawer, {
89
89
  export function HawaAppLayout(props) {
90
90
  const theme = useTheme();
91
91
  const [open, setOpen] = React.useState(true);
92
-
92
+ const isArabic = props.lang === "ar";
93
93
  const [anchorElNav, setAnchorElNav] = React.useState(null);
94
94
  const [anchorElUser, setAnchorElUser] = React.useState(null);
95
95
 
@@ -101,14 +101,23 @@ export function HawaAppLayout(props) {
101
101
  const handleDrawerClose = () => setOpen(false);
102
102
 
103
103
  return (
104
- <Box sx={{ display: "flex" }}>
105
- <AppBar variant="appbar" position="fixed" open={open}>
106
- <Toolbar variant="appbar">
104
+ <Box sx={{ display: "flex", direction: isArabic ? "rtl" : "ltr" }}>
105
+ <AppBar
106
+ variant="appbar"
107
+ position="fixed"
108
+ open={open}
109
+ direction={isArabic ? "rtl" : "ltr"}
110
+ >
111
+ <Toolbar
112
+ variant="appbar"
113
+ sx={{ paddingLeft: { xs: 3 }, paddingRight: { xs: 3 } }}
114
+ >
107
115
  <IconButton
108
116
  color="inherit"
109
117
  aria-label="open drawer"
110
118
  onClick={handleDrawerOpen}
111
119
  edge="start"
120
+ s
112
121
  sx={{
113
122
  marginRight: 5,
114
123
  ...(open && { display: "none" })
@@ -134,7 +143,11 @@ export function HawaAppLayout(props) {
134
143
 
135
144
  <Box>
136
145
  <Tooltip title="Open settings">
137
- <IconButton onClick={handleOpenUserMenu} sx={{ p: 0 }}>
146
+ <IconButton
147
+ onClick={handleOpenUserMenu}
148
+ sx={{ p: 0 }}
149
+ size="small"
150
+ >
138
151
  <Avatar />
139
152
  </IconButton>
140
153
  </Tooltip>
@@ -147,8 +160,13 @@ export function HawaAppLayout(props) {
147
160
  </div>
148
161
  </Toolbar>
149
162
  </AppBar>
150
- <Drawer variant="permanent" open={open}>
151
- <DrawerHeader>
163
+ <Drawer
164
+ // anchor="left"
165
+
166
+ variant="permanent"
167
+ open={open}
168
+ >
169
+ <DrawerHeader direction={isArabic ? "rtl" : "ltr"}>
152
170
  {props.logo}
153
171
  <IconButton onClick={handleDrawerClose}>
154
172
  {theme.direction === "rtl" ? (
@@ -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.8ffaa38a.iframe.bundle.js"></script><script src="main.cbf6de78.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.2511f65a.iframe.bundle.js"></script></body></html>