@sikka/hawa 0.0.25 → 0.0.28

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 (44) hide show
  1. package/README.md +11 -102
  2. package/es/index.es.js +1 -1
  3. package/lib/index.js +1 -1
  4. package/package.json +1 -1
  5. package/src/blocks/Account/UserProfileForm.js +2 -4
  6. package/src/blocks/AuthForms/NewPasswordForm.js +5 -4
  7. package/src/blocks/AuthForms/ResetPasswordForm.js +6 -0
  8. package/src/blocks/AuthForms/SignInForm.js +12 -2
  9. package/src/blocks/AuthForms/SignUpForm.js +10 -8
  10. package/src/blocks/Payment/ChargeWalletForm.js +9 -7
  11. package/src/blocks/Payment/CheckoutForm.js +11 -1
  12. package/src/blocks/Payment/Confirmation.js +18 -23
  13. package/src/blocks/Payment/PaymentMethod.js +8 -3
  14. package/src/blocks/Payment/SelectPayment.js +18 -7
  15. package/src/blocks/Pricing/PricingPlans.js +6 -0
  16. package/src/elements/ActionButton.js +0 -33
  17. package/src/elements/AdaptiveButton.js +1 -0
  18. package/src/elements/HawaAlert.js +8 -1
  19. package/src/elements/HawaButton.js +0 -41
  20. package/src/elements/HawaCheckbox.js +0 -1
  21. package/src/elements/HawaInputLabel.js +1 -23
  22. package/src/elements/HawaItemCard.js +5 -5
  23. package/src/elements/HawaLogoButton.js +13 -1
  24. package/src/elements/HawaPopMenu.js +6 -0
  25. package/src/elements/HawaPricingCard.js +14 -0
  26. package/src/elements/HawaRadio.js +7 -0
  27. package/src/elements/HawaTextArea.js +20 -32
  28. package/src/elements/HawaTextField.js +16 -20
  29. package/src/elements/TabPanel.js +0 -1
  30. package/src/elements/index.js +2 -1
  31. package/src/layout/Box.js +1 -37
  32. package/src/styles.css +3 -351
  33. package/storybook-static/iframe.html +1 -1
  34. package/storybook-static/index.html +1 -1
  35. package/storybook-static/{main.ac6e4b72b033097dad76.manager.bundle.js → main.9d5968bcf15d21f5487c.manager.bundle.js} +0 -0
  36. package/storybook-static/main.9dd59e4f.iframe.bundle.js +1 -0
  37. package/storybook-static/vendors~main.b026595c.iframe.bundle.js +76 -0
  38. package/storybook-static/{vendors~main.741b86a0.iframe.bundle.js.LICENSE.txt → vendors~main.b026595c.iframe.bundle.js.LICENSE.txt} +0 -0
  39. package/storybook-static/vendors~main.b026595c.iframe.bundle.js.map +1 -0
  40. package/src/elements/Hawa.js +0 -3
  41. package/src/elements/Row.js +0 -21
  42. package/storybook-static/main.06257453.iframe.bundle.js +0 -1
  43. package/storybook-static/vendors~main.741b86a0.iframe.bundle.js +0 -76
  44. package/storybook-static/vendors~main.741b86a0.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.25",
3
+ "version": "0.0.28",
4
4
  "description": "UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -77,7 +77,6 @@ export const UserProfileForm = (props) => {
77
77
  value={field.value ?? ""}
78
78
  label={props.texts.passwordLabel}
79
79
  placeholder={props.texts.passwordPlaceholder}
80
- // onChange={(e) => setNewPassword(e.target.value)}
81
80
  helperText={errors.password?.message}
82
81
  {...field}
83
82
  />
@@ -96,7 +95,6 @@ export const UserProfileForm = (props) => {
96
95
  value={field.value ?? ""}
97
96
  label={props.texts.confirmPasswordLabel}
98
97
  placeholder={props.texts.confirmPasswordPlaceholder}
99
- // onChange={(e) => setConfirmPassword(e.target.value)}
100
98
  helperText={errors.confirmPassword?.message}
101
99
  {...field}
102
100
  />
@@ -106,8 +104,8 @@ export const UserProfileForm = (props) => {
106
104
  }}
107
105
  />
108
106
  <Button type="submit" fullWidth variant="last">
109
- update profile
110
- </Button>{" "}
107
+ {props.texts.updateProfile}
108
+ </Button>
111
109
  </form>
112
110
  </FormProvider>
113
111
  </Container>
@@ -5,10 +5,9 @@ import InputAdornment from "@mui/material/InputAdornment";
5
5
  import PasswordIcon from "@mui/icons-material/HttpsOutlined";
6
6
  import Container from "@mui/material/Container";
7
7
  import Button from "@mui/material/Button";
8
+ import PropTypes from "prop-types";
8
9
 
9
10
  export const NewPasswordForm = (props) => {
10
- const [newPassword, setNewPassword] = useState("");
11
- const [confirmPassword, setConfirmPassword] = useState("");
12
11
  const [matchError, setMatchError] = useState(false);
13
12
  const methods = useForm();
14
13
  const {
@@ -48,7 +47,6 @@ export const NewPasswordForm = (props) => {
48
47
  value={field.value ?? ""}
49
48
  label={props.texts.passwordLabel}
50
49
  placeholder={props.texts.passwordPlaceholder}
51
- // onChange={(e) => setNewPassword(e.target.value)}
52
50
  helperText={errors.password?.message}
53
51
  startAdornment={
54
52
  <InputAdornment position="start">
@@ -72,7 +70,6 @@ export const NewPasswordForm = (props) => {
72
70
  value={field.value ?? ""}
73
71
  label={props.texts.confirmPasswordLabel}
74
72
  placeholder={props.texts.confirmPasswordPlaceholder}
75
- // onChange={(e) => setConfirmPassword(e.target.value)}
76
73
  helperText={errors.confirmPassword?.message}
77
74
  startAdornment={
78
75
  <InputAdornment position="start">
@@ -96,3 +93,7 @@ export const NewPasswordForm = (props) => {
96
93
  </Container>
97
94
  );
98
95
  };
96
+ NewPasswordForm.propTypes = {
97
+ texts: PropTypes.object,
98
+ handleNewPassword: PropTypes.func
99
+ };
@@ -5,6 +5,7 @@ import InputAdornment from "@mui/material/InputAdornment";
5
5
  import EmailIcon from "@mui/icons-material/MailOutline";
6
6
  import Container from "@mui/material/Container";
7
7
  import Button from "@mui/material/Button";
8
+ import PropTypes from "prop-types";
8
9
 
9
10
  export const ResetPasswordForm = (props) => {
10
11
  const methods = useForm();
@@ -58,3 +59,8 @@ export const ResetPasswordForm = (props) => {
58
59
  </Container>
59
60
  );
60
61
  };
62
+ ResetPasswordForm.propTypes = {
63
+ texts: PropTypes.object,
64
+ emailSentText: PropTypes.string,
65
+ handleResetPassword: PropTypes.func
66
+ };
@@ -7,8 +7,7 @@ import PasswordIcon from "@mui/icons-material/HttpsOutlined";
7
7
  import Container from "@mui/material/Container";
8
8
  import Typography from "@mui/material/Typography";
9
9
  import Button from "@mui/material/Button";
10
- import Alert from "@mui/material/Alert";
11
- import AlertTitle from "@mui/material/AlertTitle";
10
+ import PropTypes from "prop-types";
12
11
  import Divider from "@mui/material/Divider";
13
12
 
14
13
  export const SignInForm = (props) => {
@@ -143,3 +142,14 @@ export const SignInForm = (props) => {
143
142
  </Container>
144
143
  );
145
144
  };
145
+ SignInForm.propTypes = {
146
+ texts: PropTypes.object,
147
+ viaGoogle: PropTypes.bool,
148
+ viaGithub: PropTypes.bool,
149
+ viaTwitter: PropTypes.bool,
150
+ handleSignIn: PropTypes.func,
151
+ handleRouteToSignUp: PropTypes.func,
152
+ handleGoogleSignIn: PropTypes.func,
153
+ handleGithubSignIn: PropTypes.func,
154
+ handleTwitterSignIn: PropTypes.func
155
+ };
@@ -33,9 +33,7 @@ export const SignUpForm = (props) => {
33
33
  {props.errorText}
34
34
  </Alert>
35
35
  )}
36
- {/* {props.error && (
37
- <HawaAlert text="This is a sign in alert" severity="error" />
38
- )} */}
36
+
39
37
  <FormProvider {...methods}>
40
38
  <form onSubmit={handleSubmit(props.handleSignUp)}>
41
39
  <Controller
@@ -166,9 +164,13 @@ export const SignUpForm = (props) => {
166
164
  };
167
165
 
168
166
  SignUpForm.propTypes = {
169
- theme: PropTypes.oneOf(["secondary", "primary"])
170
- // buttonLabel: PropTypes.string,
171
- // danger: PropTypes.bool,
172
- // disabled: PropTypes.bool,
173
- // showText: PropTypes.bool
167
+ texts: PropTypes.object,
168
+ viaGoogle: PropTypes.bool,
169
+ viaGithub: PropTypes.bool,
170
+ viaTwitter: PropTypes.bool,
171
+ handleSignUp: PropTypes.func,
172
+ handleRouteToSignIn: PropTypes.func,
173
+ handleGoogleSignUp: PropTypes.func,
174
+ handleGithubSignUp: PropTypes.func,
175
+ handleTwitterSignUp: PropTypes.func
174
176
  };
@@ -4,6 +4,7 @@ import { Controller, FormProvider, useForm } from "react-hook-form";
4
4
  import Container from "@mui/material/Container";
5
5
  import Button from "@mui/material/Button";
6
6
  import Typography from "@mui/material/Typography";
7
+ import PropTypes from "prop-types";
7
8
 
8
9
  export const ChargeWalletForm = (props) => {
9
10
  const [walletAmount, setWalletAmount] = useState(0);
@@ -33,21 +34,18 @@ export const ChargeWalletForm = (props) => {
33
34
  render={({ field }) => (
34
35
  <HawaTextField
35
36
  fullWidth
36
- placeholder="Enter amount"
37
+ placeholder={props.texts.amountLabel}
37
38
  type="number"
38
39
  value={field.value ?? ""}
39
- // helperText={errors.amount?.message}
40
40
  {...field}
41
41
  inputProps={{
42
42
  inputMode: "numeric",
43
- min: "0",
43
+ min: "1",
44
44
  max: "9999999",
45
45
  step: "0.01"
46
46
  }}
47
47
  onChange={(e) => {
48
- // e.preventDefault();
49
48
  field.onChange(parseFloat(e.target.value));
50
- console.log("e", e.target.value);
51
49
  setWalletAmount(e.target.value);
52
50
  }}
53
51
  />
@@ -60,11 +58,15 @@ export const ChargeWalletForm = (props) => {
60
58
  variant="last"
61
59
  onClick={props.handleSignIn}
62
60
  >
63
- {/* {props.texts.signInText} */}
64
- {"Charge Wallet"}
61
+ {props.texts.chargeWallet}
65
62
  </Button>
66
63
  </form>
67
64
  </FormProvider>
68
65
  </Container>
69
66
  );
70
67
  };
68
+
69
+ ChargeWalletForm.propTypes = {
70
+ texts: PropTypes.object,
71
+ handleChargeWallet: PropTypes.func
72
+ };
@@ -1,10 +1,11 @@
1
- import React, { useState } from "react";
1
+ import React from "react";
2
2
  import { HawaTextField, HawaTable, HawaSelect } from "../../elements";
3
3
  import { Controller, FormProvider, useForm } from "react-hook-form";
4
4
  import Button from "@mui/material/Button";
5
5
  import Container from "@mui/material/Container";
6
6
  import Typography from "@mui/material/Typography";
7
7
  import Divider from "@mui/material/Divider";
8
+ import PropTypes from "prop-types";
8
9
 
9
10
  export const CheckoutForm = (props) => {
10
11
  let isArabic = props.lang === "ar";
@@ -243,3 +244,12 @@ export const CheckoutForm = (props) => {
243
244
  </Container>
244
245
  );
245
246
  };
247
+
248
+ CheckoutForm.propTypes = {
249
+ texts: PropTypes.object,
250
+ lang: PropTypes.string,
251
+ countriesList: PropTypes.array,
252
+ products: PropTypes.array,
253
+ total: PropTypes.string,
254
+ handlePayNow: PropTypes.func
255
+ };
@@ -1,34 +1,14 @@
1
- import React, { useState } from "react";
2
- import { HawaTextField, HawaTable, HawaSelect } from "../../elements";
3
- import { Controller, FormProvider, useForm } from "react-hook-form";
1
+ import React from "react";
2
+ import { HawaTable } from "../../elements";
4
3
  import Button from "@mui/material/Button";
5
4
  import Container from "@mui/material/Container";
6
5
  import Typography from "@mui/material/Typography";
7
6
  import Divider from "@mui/material/Divider";
7
+ import PropTypes from "prop-types";
8
8
 
9
9
  export const ConfirmationPage = (props) => {
10
10
  let isArabic = props.lang === "ar";
11
- const methods = useForm();
12
- const {
13
- formState: { errors },
14
- handleSubmit,
15
- register,
16
- control
17
- } = methods;
18
11
 
19
- let containerStyle = {
20
- display: "flex",
21
- padding: 0,
22
- paddingRight: "0px !important",
23
- paddingLeft: "0px !important",
24
- flexDirection: {
25
- xs: "column",
26
- sm: "row",
27
- md: "row",
28
- lg: "row",
29
- xl: "row"
30
- }
31
- };
32
12
  return (
33
13
  <div
34
14
  style={{
@@ -118,3 +98,18 @@ export const ConfirmationPage = (props) => {
118
98
  </div>
119
99
  );
120
100
  };
101
+
102
+ ConfirmationPage.propTypes = {
103
+ texts: PropTypes.object,
104
+ products: PropTypes.array,
105
+ countriesList: PropTypes.array,
106
+ lang: PropTypes.string,
107
+ total: PropTypes.string,
108
+ userEmail: PropTypes.string,
109
+ orderNumber: PropTypes.string,
110
+ confirmationTitle: PropTypes.string,
111
+ handleHome: PropTypes.func,
112
+ handlePrint: PropTypes.func,
113
+ handleHistory: PropTypes.func,
114
+ handleRefundPolicyLink: PropTypes.func
115
+ };
@@ -1,8 +1,9 @@
1
1
  import useTranslation from "next-translate/useTranslation";
2
2
  import Button from "@mui/material/Button";
3
3
  import Chip from "@mui/material/Chip";
4
+ import PropTypes from "prop-types";
4
5
 
5
- const PaymentMethod = (props) => {
6
+ export const PaymentMethod = (props) => {
6
7
  const { t } = useTranslation("common");
7
8
  const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
8
9
  return (
@@ -77,7 +78,7 @@ const PaymentMethodButton = (props) => {
77
78
  opacity: props.chip ? 0.7 : 1,
78
79
  padding: 20,
79
80
  width: "90%",
80
- margin: 10,
81
+ margin: 10
81
82
  }}
82
83
  onClick={(e) => props.handlePaymentMethod(e, props.methodCode)}
83
84
  >
@@ -128,4 +129,8 @@ const PaymentMethodButton = (props) => {
128
129
  );
129
130
  };
130
131
 
131
- export default PaymentMethod;
132
+ PaymentMethod.propTypes = {
133
+ texts: PropTypes.object,
134
+ wallet: PropTypes.bool,
135
+ handlePaymentMethod: PropTypes.func
136
+ };
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import PropTypes from "prop-types";
3
- import { HawaTextField, HawaTypography, HawaLogoButton } from "../../elements";
3
+ import { HawaTypography, HawaLogoButton } from "../../elements";
4
4
  import Container from "@mui/material/Container";
5
5
 
6
6
  export const SelectPayment = (props) => {
@@ -60,12 +60,23 @@ export const SelectPayment = (props) => {
60
60
  );
61
61
  };
62
62
 
63
- HawaTextField.propTypes = {
64
- theme: PropTypes.oneOf(["secondary", "primary"]),
65
- viaApplePay: PropTypes.bool,
66
- viaGooglePay: PropTypes.bool,
63
+ SelectPayment.propTypes = {
64
+ viaMada: PropTypes.bool,
65
+ viaWallet: PropTypes.bool,
67
66
  viaSTCPay: PropTypes.bool,
68
- viaCreditCard: PropTypes.bool,
69
67
  viaPayPal: PropTypes.bool,
70
- handleApplePay: PropTypes.func
68
+ viaApplePay: PropTypes.bool,
69
+ viaCreditCard: PropTypes.bool,
70
+ madaLabel: PropTypes.string,
71
+ stcPayLabel: PropTypes.string,
72
+ paypalLabel: PropTypes.string,
73
+ walletLabel: PropTypes.string,
74
+ applePayLabel: PropTypes.string,
75
+ visaMasterLabel: PropTypes.string,
76
+ handleMada: PropTypes.func,
77
+ handleWallet: PropTypes.func,
78
+ handleSTCPay: PropTypes.func,
79
+ handlePayPal: PropTypes.func,
80
+ handleApplePay: PropTypes.func,
81
+ handleCreditCard: PropTypes.func
71
82
  };
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
  import Container from "@mui/material/Container";
3
3
  import { HawaPricingCard, HawaRadio } from "../../elements";
4
+ import PropTypes from "prop-types";
4
5
 
5
6
  export const PricingPlans = (props) => {
6
7
  const [currentCurrency, setCurrentCurrency] = useState("sar");
@@ -55,3 +56,8 @@ export const PricingPlans = (props) => {
55
56
  </Container>
56
57
  );
57
58
  };
59
+
60
+ PricingPlans.propTypes = {
61
+ plans: PropTypes.array,
62
+ lang: PropTypes.string
63
+ };
@@ -1,38 +1,5 @@
1
1
  import Button from "@mui/material/Button";
2
- // import { styled, darken } from "@mui/material/styles";
3
2
 
4
3
  export const ActionButton = (props) => {
5
- // const currentTheme = Object.keys(hawaTheme.actionButton).find(
6
- // (tName) => tName.toLowerCase() === themeName?.toLowerCase()
7
- // );
8
- // let actionButtonStyle = {};
9
-
10
- // if (currentTheme) {
11
- // actionButtonStyle = {
12
- // ...hawaTheme.actionButton[currentTheme],
13
- // margin: props.last ? 0 : hawaTheme.actionButton[currentTheme].margin,
14
- // marginTop: props.last
15
- // ? hawaTheme.actionButton[currentTheme].margin * 2
16
- // : 0,
17
- // "&:hover": {
18
- // backgroundColor: darken(
19
- // hawaTheme.actionButton[currentTheme]?.backgroundColor,
20
- // 0.1
21
- // )
22
- // }
23
- // };
24
- // } else {
25
- // actionButtonStyle = {
26
- // backgroundColor: "black",
27
- // color: "white",
28
- // padding: 10,
29
- // marginTop: props.last ? 10 * 2 : 0,
30
- // borderRadius: 0
31
- // };
32
- // }
33
-
34
- // const StyledButton = styled(Button)(({ theme }) => {
35
- // return { ...actionButtonStyle };
36
- // });
37
4
  return <Button {...props}>{props.text}</Button>;
38
5
  };
@@ -26,5 +26,6 @@ export const AdaptiveButton = (props) => {
26
26
 
27
27
  AdaptiveButton.propTypes = {
28
28
  buttonText: PropTypes.string,
29
+ onClick: PropTypes.func,
29
30
  showText: PropTypes.bool
30
31
  };
@@ -1,12 +1,19 @@
1
1
  import React from "react";
2
2
  import Alert from "@mui/material/Alert";
3
3
  import AlertTitle from "@mui/material/AlertTitle";
4
+ import PropTypes from "prop-types";
4
5
 
5
6
  export const HawaAlert = (props) => {
6
7
  return (
7
- <Alert severity={props.severity} variant="inContainer">
8
+ <Alert severity={props.severity} icon={props.hideIcon}>
8
9
  {props.title && <AlertTitle>{props.title}</AlertTitle>}
9
10
  {props.text}
10
11
  </Alert>
11
12
  );
12
13
  };
14
+ HawaAlert.propTypes = {
15
+ severity: PropTypes.string,
16
+ title: PropTypes.string,
17
+ text: PropTypes.string,
18
+ hideIcon: PropTypes.bool
19
+ };
@@ -1,47 +1,6 @@
1
1
  import React from "react";
2
- // import { ThemeProvider } from "../themes/HawaProvider";
3
- // import { styled, darken } from "@mui/material/styles";
4
2
  import Button from "@mui/material/Button";
5
3
 
6
4
  export const HawaButton = (props) => {
7
- // let buttonStyle = {};
8
- // let currentTheme = Object.keys(hawaTheme.actionButton).find(
9
- // (tName) => tName.toLowerCase() === themeName?.toLowerCase()
10
- // );
11
- // if (currentTheme) {
12
- // buttonStyle = {
13
- // ...hawaTheme.actionButton[currentTheme],
14
- // // marginTop: theme.actionButton[currentTheme].margin,
15
- // border: props.outlined ? "2px solid black" : "none",
16
- // // borderRadius: theme.actionButton[currentTheme].borderRadius,
17
- // backgroundColor: "white",
18
- // // height: 50,
19
- // "&:hover": {
20
- // backgroundColor: darken("#ffffff", 0.1)
21
- // }
22
- // };
23
- // } else {
24
- // // Default theme
25
- // buttonStyle = {
26
- // cursor: "pointer",
27
- // display: "flex",
28
- // flexDirection: "row",
29
- // alignItems: "center",
30
- // justifyContent: "center",
31
- // marginTop: hawaTheme.actionButton[currentTheme]?.margin,
32
- // border: props.outlined ? "2px solid black" : "none",
33
- // borderRadius: 0,
34
- // //backgroundColor: "white",
35
- // backgroundColor: "red",
36
- // "&:hover": {
37
- // backgroundColor: darken("#ffffff", 0.1)
38
- // }
39
- // };
40
- // }
41
- // const StyledButton = styled(Button)(({ theme }) => {
42
- // return {
43
- // ...buttonStyle
44
- // };
45
- // });
46
5
  return <Button {...props}>{props.children}</Button>;
47
6
  };
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
2
  import FormControlLabel from "@mui/material/FormControlLabel";
3
3
  import Checkbox from "@mui/material/Checkbox";
4
- // import PropTypes from "prop-types";
5
4
 
6
5
  export const HawaCheckbox = (props) => {
7
6
  console.log("props : ", props);
@@ -1,30 +1,8 @@
1
1
  import InputLabel from "@mui/material/InputLabel";
2
2
 
3
3
  export const HawaInputLabel = (props) => {
4
- // let labelStyle = {};
5
-
6
- // let currentTheme = Object.keys(hawaTheme.actionButton).find(
7
- // (tName) => tName.toLowerCase() === themeName?.toLowerCase()
8
- // );
9
- // if (currentTheme) {
10
- // labelStyle = {
11
- // margin: 15,
12
- // marginRight: 5,
13
- // marginLeft: 5,
14
- // color: hawaTheme?.layout[currentTheme].color
15
- // };
16
- // } else {
17
- // labelStyle = {
18
- // margin: 15,
19
- // marginRight: 0,
20
- // marginLeft: 0,
21
- // color: "black"
22
- // };
23
- // }
24
4
  return (
25
- <InputLabel
26
- // style={labelStyle}
27
- >
5
+ <InputLabel>
28
6
  <div style={{ fontSize: 15 }}>{props.label}</div>
29
7
  </InputLabel>
30
8
  );
@@ -1,15 +1,11 @@
1
1
  import React from "react";
2
2
  import Container from "@mui/material/Container";
3
- import Button from "@mui/material/Button";
3
+ import PropTypes from "prop-types";
4
4
 
5
5
  export const HawaItemCard = (props) => {
6
6
  let isArabic = props.lang === "ar";
7
7
  const handleParentClick = (e) => {
8
8
  e.stopPropagation();
9
- // let dValue = e.currentTarget;
10
- // console.log("d value ", dValue);
11
- console.log("clicking parent");
12
-
13
9
  props.onCardClick();
14
10
  };
15
11
  return (
@@ -58,3 +54,7 @@ export const HawaItemCard = (props) => {
58
54
  </Container>
59
55
  );
60
56
  };
57
+ HawaItemCard.propTypes = {
58
+ lang: PropTypes.string,
59
+ onCardClick: PropTypes.func,
60
+ };
@@ -4,8 +4,10 @@ import GitHubIcon from "@mui/icons-material/GitHub";
4
4
  import TwitterIcon from "@mui/icons-material/Twitter";
5
5
  import WalletIcon from "@mui/icons-material/AccountBalanceWallet";
6
6
  import Typography from "@mui/material/Typography";
7
+ import PropTypes from "prop-types";
7
8
 
8
9
  export const HawaLogoButton = (props) => {
10
+ let isArabic = props.lang === "ar";
9
11
  let logoElement = "";
10
12
  switch (props.logo?.toLowerCase()) {
11
13
  case "google":
@@ -79,7 +81,11 @@ export const HawaLogoButton = (props) => {
79
81
  break;
80
82
  }
81
83
  return (
82
- <Button {...props} variant="withLogo">
84
+ <Button
85
+ style={{ direction: isArabic ? "rtl" : "ltr" }}
86
+ {...props}
87
+ variant="withLogo"
88
+ >
83
89
  {logoElement}
84
90
  <div style={{ width: 10 }} />
85
91
  <Typography
@@ -97,3 +103,9 @@ export const HawaLogoButton = (props) => {
97
103
  </Button>
98
104
  );
99
105
  };
106
+
107
+ HawaLogoButton.propTypes = {
108
+ lang: PropTypes.string,
109
+ logo: PropTypes.string,
110
+ buttonText: PropTypes.string
111
+ };
@@ -1,4 +1,5 @@
1
1
  import { MenuItem, Menu, Typography, useTheme } from "@mui/material";
2
+ import PropTypes from "prop-types";
2
3
 
3
4
  export const HawaPopMenu = (props) => {
4
5
  const theme = useTheme();
@@ -37,3 +38,8 @@ export const HawaPopMenu = (props) => {
37
38
  </Menu>
38
39
  );
39
40
  };
41
+
42
+ HawaPopMenu.propTypes = {
43
+ handleClose: PropTypes.func,
44
+ menuItems: PropTypes.array
45
+ };
@@ -3,6 +3,8 @@ import Container from "@mui/material/Container";
3
3
  import Button from "@mui/material/Button";
4
4
  import Typography from "@mui/material/Typography";
5
5
  import CheckIcon from "@mui/icons-material/CheckCircleOutlined";
6
+ import PropTypes from "prop-types";
7
+
6
8
  export const HawaPricingCard = (props) => {
7
9
  let isArabic = props.lang === "ar";
8
10
  let cycleTextsArabic = {
@@ -132,3 +134,15 @@ export const HawaPricingCard = (props) => {
132
134
  </Container>
133
135
  );
134
136
  };
137
+
138
+ HawaPricingCard.propTypes = {
139
+ lang: PropTypes.string,
140
+ buttonText: PropTypes.string,
141
+ selectedPlan: PropTypes.string,
142
+ title: PropTypes.string,
143
+ title_ar: PropTypes.string,
144
+ subtitle: PropTypes.string,
145
+ subtitle_ar: PropTypes.string,
146
+ features: PropTypes.array,
147
+ features_ar: PropTypes.array
148
+ };
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
  import Button from "@mui/material/Button";
3
3
  import Container from "@mui/material/Container";
4
+ import PropTypes from "prop-types";
4
5
 
5
6
  export const HawaRadio = (props) => {
6
7
  const [value, setValue] = useState(props.defaultValue);
@@ -28,3 +29,9 @@ export const HawaRadio = (props) => {
28
29
  </Container>
29
30
  );
30
31
  };
32
+ HawaRadio.propTypes = {
33
+ lang: PropTypes.string,
34
+ options: PropTypes.array,
35
+ defaultValue: PropTypes.string,
36
+ location: PropTypes.string
37
+ };