@sikka/hawa 0.0.47 → 0.0.49

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 (37) 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/Account/UserProfileForm.js +4 -4
  5. package/src/blocks/Account/UserSettingsForm.js +3 -8
  6. package/src/blocks/AuthForms/CodeConfirmation.js +5 -21
  7. package/src/blocks/AuthForms/NewPasswordForm.js +6 -22
  8. package/src/blocks/AuthForms/ResetPasswordForm.js +6 -17
  9. package/src/blocks/AuthForms/SignInForm.js +59 -82
  10. package/src/blocks/AuthForms/SignInPhone.js +5 -9
  11. package/src/blocks/AuthForms/SignUpForm.js +38 -69
  12. package/src/blocks/Payment/ChargeWalletForm.js +3 -4
  13. package/src/blocks/Payment/CheckoutForm.js +8 -4
  14. package/src/blocks/Payment/Confirmation.js +7 -8
  15. package/src/blocks/Payment/CreditCardForm.js +3 -5
  16. package/src/blocks/Payment/Form/CForm.js +4 -5
  17. package/src/blocks/Payment/Form/PaymentMethod.js +2 -3
  18. package/src/blocks/Payment/Gateway/Wallet.js +2 -3
  19. package/src/blocks/Payment/PayWithWallet.js +3 -4
  20. package/src/elements/HawaButton.js +7 -4
  21. package/src/elements/HawaLogoButton.js +21 -23
  22. package/src/elements/HawaPanelTabs.js +3 -3
  23. package/src/elements/HawaPhoneInput.js +17 -0
  24. package/src/elements/HawaPricingCard.js +2 -3
  25. package/src/elements/HawaTextField.js +3 -3
  26. package/src/elements/ResponsiveButton.js +4 -5
  27. package/src/layout/HawaLayout.js +102 -74
  28. package/src/layout/index.js +0 -1
  29. package/storybook-static/iframe.html +1 -1
  30. package/storybook-static/main.8bf9785a.iframe.bundle.js +1 -0
  31. package/storybook-static/project.json +1 -1
  32. package/storybook-static/{vendors~main.bff3812a.iframe.bundle.js → vendors~main.ceb9a32a.iframe.bundle.js} +3 -3
  33. package/storybook-static/{vendors~main.bff3812a.iframe.bundle.js.LICENSE.txt → vendors~main.ceb9a32a.iframe.bundle.js.LICENSE.txt} +0 -0
  34. package/storybook-static/vendors~main.ceb9a32a.iframe.bundle.js.map +1 -0
  35. package/src/layout/HawaAppBar.js +0 -97
  36. package/storybook-static/main.07f6e990.iframe.bundle.js +0 -1
  37. package/storybook-static/vendors~main.bff3812a.iframe.bundle.js.map +0 -1
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
- import { HawaTable } from "../../elements";
3
- import Button from "@mui/material/Button";
2
+ import { HawaButton, HawaTable } from "../../elements";
4
3
  import Container from "@mui/material/Container";
5
4
  import Typography from "@mui/material/Typography";
6
5
  import Divider from "@mui/material/Divider";
@@ -69,15 +68,15 @@ export const ConfirmationPage = (props) => {
69
68
  <Divider variant="middle" />
70
69
  </>
71
70
  )}
72
- <Button onClick={props.handlePrint} variant="contained">
71
+ <HawaButton fullWidth onClick={props.handlePrint}>
73
72
  {props.texts.print}
74
- </Button>
75
- <Button onClick={props.handleHistory} variant="last">
73
+ </HawaButton>
74
+ <HawaButton fullWidth onClick={props.handleHistory}>
76
75
  {props.texts.history}
77
- </Button>
78
- <Button onClick={props.handleHome} variant="last">
76
+ </HawaButton>
77
+ <HawaButton fullWidth onClick={props.handleHome}>
79
78
  {props.texts.homePage}
80
- </Button>
79
+ </HawaButton>
81
80
  <Typography align="center" variant="body2" style={{ marginTop: 10 }}>
82
81
  {props.texts.fasterPaymentNote}
83
82
  </Typography>
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
- import { HawaTextField } from "../../elements";
2
+ import { HawaButton, HawaTextField } from "../../elements";
3
3
  import { Controller, FormProvider, useForm } from "react-hook-form";
4
- import Button from "@mui/material/Button";
5
4
  import Container from "@mui/material/Container";
6
5
 
7
6
  export const CreditCardForm = (props) => {
@@ -79,14 +78,13 @@ export const CreditCardForm = (props) => {
79
78
  )}
80
79
  />
81
80
 
82
- <Button
81
+ <HawaButton
83
82
  type="submit"
84
83
  fullWidth
85
- variant="last"
86
84
  onClick={props.handlePayWithCreditCard}
87
85
  >
88
86
  {"Pay with Credit Card"}
89
- </Button>
87
+ </HawaButton>
90
88
  </form>
91
89
  </Container>
92
90
  );
@@ -1,9 +1,9 @@
1
1
  import React, { useEffect, useState, useRef } from "react";
2
2
  import sha256 from "crypto-js/sha256";
3
- import Button from "@mui/material/Button";
4
3
  import CircularProgress from "@mui/material/CircularProgress";
5
4
  import useTranslation from "next-translate/useTranslation";
6
5
  import axios from "axios";
6
+ import { HawaButton } from "../../../elements";
7
7
 
8
8
  const currentYear = new Date().getFullYear();
9
9
  const monthsArr = Array.from({ length: 12 }, (x, i) => {
@@ -305,9 +305,8 @@ export default function CForm({
305
305
  />
306
306
  )}
307
307
  </form>
308
- <Button
309
- variant="contained"
310
- color="primary"
308
+ <HawaButton
309
+ // color="primary"
311
310
  fullWidth
312
311
  onClick={handlePayfortForm}
313
312
  >
@@ -320,7 +319,7 @@ export default function CForm({
320
319
  ) : (
321
320
  <span className="pay-new-btn-txt">{t("pay-now")}</span>
322
321
  )}
323
- </Button>
322
+ </HawaButton>
324
323
  </div>
325
324
  </div>
326
325
  </div>
@@ -1,5 +1,4 @@
1
1
  import useTranslation from "next-translate/useTranslation";
2
- import Button from "@mui/material/Button";
3
2
  import Chip from "@mui/material/Chip";
4
3
  import PropTypes from "prop-types";
5
4
 
@@ -68,7 +67,7 @@ export const PaymentMethod = (props) => {
68
67
 
69
68
  const PaymentMethodButton = (props) => {
70
69
  return (
71
- <Button
70
+ <button
72
71
  disabled={props?.chip ? true : false}
73
72
  fullWidth
74
73
  variant="contained"
@@ -116,7 +115,7 @@ const PaymentMethodButton = (props) => {
116
115
  />
117
116
  ) : null}
118
117
  </div>
119
- </Button>
118
+ </button>
120
119
  );
121
120
  };
122
121
 
@@ -1,5 +1,4 @@
1
1
  import useTranslation from "next-translate/useTranslation";
2
- import Button from "@mui/material/Button";
3
2
  import Grid from "@mui/material/Grid";
4
3
  import Paper from "@mui/material/Paper";
5
4
  import CircularProgress from "@mui/material/CircularProgress";
@@ -120,7 +119,7 @@ const Wallet = (props) => {
120
119
  </Grid>
121
120
  {!props.leftAmount && (
122
121
  <Grid item xs={12}>
123
- <Button
122
+ <button
124
123
  variant="contained"
125
124
  color="primary"
126
125
  fullWidth
@@ -136,7 +135,7 @@ const Wallet = (props) => {
136
135
  ) : (
137
136
  t("pay-now")
138
137
  )}
139
- </Button>
138
+ </button>
140
139
  </Grid>
141
140
  )}
142
141
  </Grid>
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import Typography from "@mui/material/Typography";
3
3
  import Container from "@mui/material/Container";
4
- import Button from "@mui/material/Button";
4
+ import { HawaButton } from "../../elements";
5
5
 
6
6
  export const PayWithWallet = (props) => {
7
7
  return (
@@ -11,14 +11,13 @@ export const PayWithWallet = (props) => {
11
11
  {props.walletBalance || "0"}
12
12
  <Typography>{props.currency || "SAR"}</Typography>
13
13
  </Typography>
14
- <Button
14
+ <HawaButton
15
15
  type="submit"
16
16
  fullWidth
17
- variant="last"
18
17
  onClick={props.handlePayWithWallet}
19
18
  >
20
19
  {"Pay Now"}
21
- </Button>
20
+ </HawaButton>
22
21
  </Container>
23
22
  );
24
23
  };
@@ -1,11 +1,14 @@
1
1
  import React from "react";
2
2
 
3
3
  export const HawaButton = (props) => {
4
+ let styles =
5
+ "text-center 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";
6
+ if (props.fullWidth) {
7
+ styles =
8
+ "mt-2 w-full flex justify-center 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 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";
9
+ }
4
10
  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
- >
11
+ <button type="button" className={styles} {...props}>
9
12
  {props.icon ? <div class="mr-2 -ml-1 w-5 h-5">{props.icon}</div> : null}
10
13
 
11
14
  {props.children}
@@ -1,9 +1,7 @@
1
1
  import React from "react";
2
- import Button from "@mui/material/Button";
3
2
  import GitHubIcon from "@mui/icons-material/GitHub";
4
3
  import TwitterIcon from "@mui/icons-material/Twitter";
5
4
  import WalletIcon from "@mui/icons-material/AccountBalanceWallet";
6
- import Typography from "@mui/material/Typography";
7
5
  import PropTypes from "prop-types";
8
6
 
9
7
  export const HawaLogoButton = (props) => {
@@ -29,7 +27,8 @@ export const HawaLogoButton = (props) => {
29
27
  logoElement = (
30
28
  <img
31
29
  src="https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png"
32
- height={20}
30
+ // height={20}
31
+ className="h-6"
33
32
  />
34
33
  );
35
34
  break;
@@ -37,7 +36,8 @@ export const HawaLogoButton = (props) => {
37
36
  logoElement = (
38
37
  <img
39
38
  src="https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png"
40
- height={20}
39
+ // height={20}
40
+ className="h-6"
41
41
  />
42
42
  );
43
43
  break;
@@ -45,7 +45,8 @@ export const HawaLogoButton = (props) => {
45
45
  logoElement = (
46
46
  <img
47
47
  src="https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png"
48
- height={30}
48
+ // height={30}
49
+ className="h-6"
49
50
  />
50
51
  );
51
52
  break;
@@ -53,7 +54,8 @@ export const HawaLogoButton = (props) => {
53
54
  logoElement = (
54
55
  <img
55
56
  src="https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png"
56
- height={25}
57
+ // height={25}
58
+ className="h-6"
57
59
  />
58
60
  );
59
61
  break;
@@ -61,7 +63,8 @@ export const HawaLogoButton = (props) => {
61
63
  logoElement = (
62
64
  <img
63
65
  src="https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png"
64
- height={20}
66
+ // height={20}
67
+ className="h-6"
65
68
  />
66
69
  );
67
70
  break;
@@ -69,7 +72,8 @@ export const HawaLogoButton = (props) => {
69
72
  logoElement = (
70
73
  <img
71
74
  src="https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png"
72
- height={40}
75
+ // height={40}
76
+ className="h-11"
73
77
  />
74
78
  );
75
79
  break;
@@ -81,26 +85,20 @@ export const HawaLogoButton = (props) => {
81
85
  break;
82
86
  }
83
87
  return (
84
- <Button
88
+ <button
85
89
  style={{ direction: isArabic ? "rtl" : "ltr" }}
86
90
  {...props}
87
- variant="withLogo"
91
+ // variant="withLogo"
92
+ className="bg-white rounded-xl my-2 h-11 flex flex-row justify-center align-middle"
88
93
  >
89
- {logoElement}
94
+ <div className="h-full w-1/2 flex flex-row justify-end items-center">
95
+ {logoElement}
96
+ </div>
90
97
  <div style={{ width: 10 }} />
91
- <Typography
92
- style={{
93
- color: "black",
94
- fontSize: 14,
95
- textAlign: "center",
96
- letterSpacing: 0.4,
97
- fontFamily: "Roboto",
98
- fontWeight: 500
99
- }}
100
- >
98
+ <div className="h-full w-1/2 flex flex-col justify-center items-start">
101
99
  {props.buttonText}
102
- </Typography>
103
- </Button>
100
+ </div>
101
+ </button>
104
102
  );
105
103
  };
106
104
 
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from "react";
2
- import Button from "@mui/material/Button";
2
+
3
3
  import Container from "@mui/material/Container";
4
4
  import PropTypes from "prop-types";
5
5
 
@@ -9,7 +9,7 @@ export const HawaPanelTabs = (props) => {
9
9
  <Container variant={props.location || "panelTabs"}>
10
10
  {props.options.map((singleOption, i) => {
11
11
  return (
12
- <Button
12
+ <button
13
13
  key={i}
14
14
  onClick={() => {
15
15
  props.handleChange(singleOption.value);
@@ -23,7 +23,7 @@ export const HawaPanelTabs = (props) => {
23
23
  }
24
24
  >
25
25
  {singleOption.label}
26
- </Button>
26
+ </button>
27
27
  );
28
28
  })}
29
29
  </Container>
@@ -22,6 +22,17 @@ export default function HawaPhoneInput(props) {
22
22
  const theme = useTheme();
23
23
  return (
24
24
  <div>
25
+ <label
26
+ for="first_name"
27
+ className="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
28
+ >
29
+ {props.label}
30
+ </label>
31
+ <input
32
+ {...props}
33
+ className="mb-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
34
+ />
35
+
25
36
  {label && <InputLabel>{props.label}</InputLabel>}
26
37
  <PhoneInput
27
38
  country={country ?? null}
@@ -41,6 +52,12 @@ export default function HawaPhoneInput(props) {
41
52
  width: "100%",
42
53
  borderRadius: theme.allBorderRadius
43
54
  }}
55
+ // inputClass="bg-red-900"
56
+ // inputClass="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
57
+ dropdownClass="bg-blue-900"
58
+ buttonClass="bg-green-900"
59
+ // containerClass="bg-orange-900"
60
+ // containerClass="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
44
61
  {...rest}
45
62
  />
46
63
  </div>
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import Container from "@mui/material/Container";
3
- import Button from "@mui/material/Button";
4
3
  import Typography from "@mui/material/Typography";
5
4
  import CheckIcon from "@mui/icons-material/CheckCircleOutlined";
6
5
  import PropTypes from "prop-types";
@@ -139,13 +138,13 @@ export const HawaPricingCard = (props) => {
139
138
  );
140
139
  })}
141
140
  </div>
142
- <Button
141
+ <button
143
142
  onClick={props.selectPlan}
144
143
  variant={props.selectedPlan ? "outlined" : "contained"}
145
144
  style={{ margin: 20 }}
146
145
  >
147
146
  {props.buttonText}
148
- </Button>
147
+ </button>
149
148
  </Container>
150
149
  );
151
150
  };
@@ -5,17 +5,17 @@ export const HawaTextField = (props) => {
5
5
  <div>
6
6
  <label
7
7
  for="first_name"
8
- class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
8
+ className="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
9
9
  >
10
10
  {props.label}
11
11
  </label>
12
12
  <input
13
13
  {...props}
14
- class="mb-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
14
+ className="mb-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
15
15
  />
16
16
 
17
17
  {props.helperText && (
18
- <p class="mt-2 text-sm text-red-600 dark:text-red-500">
18
+ <p className="mt-2 text-sm text-red-600 dark:text-red-500">
19
19
  {/* <span class="font-medium">Oh, snapp!</span> */}
20
20
  {props.helperText}
21
21
  </p>
@@ -1,24 +1,23 @@
1
1
  import React from "react";
2
- import Button from "@mui/material/Button";
3
2
  import Tooltip from "@mui/material/Tooltip";
4
3
  import PropTypes from "prop-types";
5
4
 
6
5
  export const ResponsiveButton = (props) => {
7
6
  if (props.showText) {
8
7
  return (
9
- <Button variant="adaptive-dark" onClick={props.onClick}>
8
+ <button variant="adaptive-dark" onClick={props.onClick}>
10
9
  {props.icon}
11
10
  <div style={{ width: 10 }} />
12
11
  {props.buttonText}
13
- </Button>
12
+ </button>
14
13
  );
15
14
  } else {
16
15
  //icon only
17
16
  return (
18
17
  <Tooltip title={props.buttonText} placement="top">
19
- <Button variant="adaptive-dark" onClick={props.onClick}>
18
+ <button variant="adaptive-dark" onClick={props.onClick}>
20
19
  {props.icon}
21
- </Button>
20
+ </button>
22
21
  </Tooltip>
23
22
  );
24
23
  }
@@ -29,6 +29,70 @@ const MenuButton = () => {
29
29
  </button>
30
30
  );
31
31
  };
32
+ const ProfileDropdown = (props) => {
33
+ return (
34
+ <div
35
+ id="userDropdown"
36
+ class="hidden z-10 w-44 bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 dark:divide-gray-600"
37
+ data-popper-reference-hidden=""
38
+ data-popper-escaped=""
39
+ data-popper-placement="bottom-start"
40
+ // style="position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate3d(0px, 295.5px, 0px);"
41
+ >
42
+ <div class="py-3 px-4 text-sm text-gray-900 dark:text-white">
43
+ <div>{props.username}</div>
44
+ <div class="font-medium truncate">{props.userEmail}</div>
45
+ </div>
46
+ <ul
47
+ class="py-1 text-sm text-gray-700 dark:text-gray-200"
48
+ aria-labelledby="avatarButton"
49
+ >
50
+ {props.profileItems.map((it) => {
51
+ return <ProfileItem text={it.text} link={it.slug} />;
52
+ })}
53
+ </ul>
54
+ <div class="py-1">
55
+ <a
56
+ href="#"
57
+ class="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
58
+ >
59
+ Sign out
60
+ </a>
61
+ </div>
62
+ </div>
63
+ );
64
+ };
65
+ const DrawerContent = (props) => {
66
+ return (
67
+ <div
68
+ id="drawer-navigation"
69
+ class="fixed z-40 h-screen p-4 overflow-y-auto bg-white w-80 dark:bg-gray-800"
70
+ tabindex="-1"
71
+ aria-labelledby="drawer-navigation-label"
72
+ >
73
+ <div href={props.logoHref} class="flex items-center">
74
+ <img
75
+ src={
76
+ "https://my.qawaim.app/_next/image?url=%2Fqawaim-logo.svg&w=256&q=75"
77
+ }
78
+ // src={props.logoLink}
79
+ class="h-9"
80
+ alt="Flowbite Logo"
81
+ />
82
+ </div>
83
+ <CloseButton />
84
+ <div class="py-4 overflow-y-auto">
85
+ <ul class="space-y-2">
86
+ {props.drawerItems.map((item, i) => {
87
+ return (
88
+ <HawaDrawerItem action={item.action} key={i} text={item.text} />
89
+ );
90
+ })}
91
+ </ul>
92
+ </div>
93
+ </div>
94
+ );
95
+ };
32
96
 
33
97
  const ProfileItem = (props) => {
34
98
  return (
@@ -72,31 +136,42 @@ export const HawaLayout = (props) => {
72
136
  <div>
73
137
  <nav class="border-gray-200 rounded dark:bg-gray-900">
74
138
  <div class="flex p-3 flex-row-reverse items-center justify-between w-full">
75
- <div href={props.logoHref} class="flex items-center">
139
+ {/* <div href={props.logoHref} class="flex items-center">
76
140
  <img src={props.logoLink} class="h-9" alt="Flowbite Logo" />
141
+ </div> */}
142
+ <div
143
+ data-dropdown-toggle="userDropdown"
144
+ data-dropdown-placement="bottom-start"
145
+ class="overflow-hidden mr-2 relative w-10 h-10 bg-gray-100 rounded-full dark:bg-gray-600"
146
+ >
147
+ <svg
148
+ class="absolute -left-1 w-12 h-12 text-gray-400"
149
+ fill="currentColor"
150
+ viewBox="0 0 20 20"
151
+ xmlns="http://www.w3.org/2000/svg"
152
+ >
153
+ <path
154
+ fill-rule="evenodd"
155
+ d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z"
156
+ clip-rule="evenodd"
157
+ ></path>
158
+ </svg>
77
159
  </div>
160
+
161
+ {/* <div href={props.logoHref} class="flex items-center">
162
+ <img
163
+ src={
164
+ // "https://my.qawaim.app/_next/image?url=%2Fqawaim-logo.svg&w=256&q=75"
165
+ "https://qawaim-images.s3-ap-southeast-1.amazonaws.com/614580f79706137eab618399"
166
+ }
167
+ // src={props.logoLink}
168
+ class="h-12"
169
+ alt="Flowbite Logo"
170
+ />
171
+ </div> */}
172
+ <div>{props.pageTitle ?? "Home"}</div>
78
173
  <div className="flex flex-row-reverse">
79
174
  <MenuButton />
80
-
81
- <div
82
- data-dropdown-toggle="userDropdown"
83
- data-dropdown-placement="bottom-start"
84
- class="overflow-hidden mr-2 relative w-10 h-10 bg-gray-100 rounded-full dark:bg-gray-600"
85
- >
86
- <svg
87
- class="absolute -left-1 w-12 h-12 text-gray-400"
88
- fill="currentColor"
89
- viewBox="0 0 20 20"
90
- xmlns="http://www.w3.org/2000/svg"
91
- >
92
- <path
93
- fill-rule="evenodd"
94
- d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z"
95
- clip-rule="evenodd"
96
- ></path>
97
- </svg>
98
- </div>
99
-
100
175
  {/* <img
101
176
  id="avatarButton"
102
177
  type="button"
@@ -110,59 +185,12 @@ export const HawaLayout = (props) => {
110
185
  </div>
111
186
  </nav>
112
187
  </div>
113
- <div
114
- id="userDropdown"
115
- class="hidden z-10 w-44 bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 dark:divide-gray-600"
116
- data-popper-reference-hidden=""
117
- data-popper-escaped=""
118
- data-popper-placement="bottom-start"
119
- // style="position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate3d(0px, 295.5px, 0px);"
120
- >
121
- <div class="py-3 px-4 text-sm text-gray-900 dark:text-white">
122
- <div>{props.username}</div>
123
- <div class="font-medium truncate">{props.userEmail}</div>
124
- </div>
125
- <ul
126
- class="py-1 text-sm text-gray-700 dark:text-gray-200"
127
- aria-labelledby="avatarButton"
128
- >
129
- {props.profileItems.map((it) => {
130
- return <ProfileItem text={it.text} link={it.slug} />;
131
- })}
132
- </ul>
133
- <div class="py-1">
134
- <a
135
- href="#"
136
- class="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
137
- >
138
- Sign out
139
- </a>
140
- </div>
141
- </div>
142
-
143
- <div
144
- id="drawer-navigation"
145
- class="fixed z-40 h-screen p-4 overflow-y-auto bg-white w-80 dark:bg-gray-800"
146
- tabindex="-1"
147
- aria-labelledby="drawer-navigation-label"
148
- >
149
- <h5
150
- id="drawer-navigation-label"
151
- class="text-base font-semibold text-gray-500 uppercase dark:text-gray-400"
152
- >
153
- {props.appTitle}
154
- </h5>
155
- <CloseButton />
156
- <div class="py-4 overflow-y-auto">
157
- <ul class="space-y-2">
158
- {props.drawerItems.map((item, i) => {
159
- return (
160
- <HawaDrawerItem action={item.action} key={i} text={item.text} />
161
- );
162
- })}
163
- </ul>
164
- </div>
165
- </div>
188
+ <ProfileDropdown profileItems={props.profileItems} />
189
+ <DrawerContent
190
+ logoHref={props.logoHref}
191
+ appTitle={props.appTitle}
192
+ drawerItems={props.drawerItems}
193
+ />
166
194
  <div className="p-3">{props.children}</div>
167
195
  </div>
168
196
  );
@@ -1,7 +1,6 @@
1
1
  export * from "./Box";
2
2
  export * from "./HawaAppLayout";
3
3
  export * from "./HawaDialog";
4
- export * from "./HawaAppBar";
5
4
  export * from "./HawaPageControls";
6
5
  export * from "./HawaBottomAppBar";
7
6
  export * from "./HawaDrawer";
@@ -361,4 +361,4 @@
361
361
 
362
362
 
363
363
 
364
- 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.0e8a2888.iframe.bundle.js"></script><script src="vendors~main.bff3812a.iframe.bundle.js"></script><script src="main.07f6e990.iframe.bundle.js"></script></body></html>
364
+ 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.0e8a2888.iframe.bundle.js"></script><script src="vendors~main.ceb9a32a.iframe.bundle.js"></script><script src="main.8bf9785a.iframe.bundle.js"></script></body></html>