@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.
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/blocks/Account/UserProfileForm.js +4 -4
- package/src/blocks/Account/UserSettingsForm.js +3 -8
- package/src/blocks/AuthForms/CodeConfirmation.js +5 -21
- package/src/blocks/AuthForms/NewPasswordForm.js +6 -22
- package/src/blocks/AuthForms/ResetPasswordForm.js +6 -17
- package/src/blocks/AuthForms/SignInForm.js +59 -82
- package/src/blocks/AuthForms/SignInPhone.js +5 -9
- package/src/blocks/AuthForms/SignUpForm.js +38 -69
- package/src/blocks/Payment/ChargeWalletForm.js +3 -4
- package/src/blocks/Payment/CheckoutForm.js +8 -4
- package/src/blocks/Payment/Confirmation.js +7 -8
- package/src/blocks/Payment/CreditCardForm.js +3 -5
- package/src/blocks/Payment/Form/CForm.js +4 -5
- package/src/blocks/Payment/Form/PaymentMethod.js +2 -3
- package/src/blocks/Payment/Gateway/Wallet.js +2 -3
- package/src/blocks/Payment/PayWithWallet.js +3 -4
- package/src/elements/HawaButton.js +7 -4
- package/src/elements/HawaLogoButton.js +21 -23
- package/src/elements/HawaPanelTabs.js +3 -3
- package/src/elements/HawaPhoneInput.js +17 -0
- package/src/elements/HawaPricingCard.js +2 -3
- package/src/elements/HawaTextField.js +3 -3
- package/src/elements/ResponsiveButton.js +4 -5
- package/src/layout/HawaLayout.js +102 -74
- package/src/layout/index.js +0 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.8bf9785a.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/{vendors~main.bff3812a.iframe.bundle.js → vendors~main.ceb9a32a.iframe.bundle.js} +3 -3
- package/storybook-static/{vendors~main.bff3812a.iframe.bundle.js.LICENSE.txt → vendors~main.ceb9a32a.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.ceb9a32a.iframe.bundle.js.map +1 -0
- package/src/layout/HawaAppBar.js +0 -97
- package/storybook-static/main.07f6e990.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.bff3812a.iframe.bundle.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
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
4
|
import Container from "@mui/material/Container";
|
|
5
|
-
import Button from "@mui/material/Button";
|
|
6
5
|
|
|
7
6
|
export const UserProfileForm = (props) => {
|
|
8
7
|
const methods = useForm();
|
|
@@ -141,9 +140,10 @@ export const UserProfileForm = (props) => {
|
|
|
141
140
|
/>
|
|
142
141
|
);
|
|
143
142
|
})}
|
|
144
|
-
|
|
143
|
+
|
|
144
|
+
<HawaButton fullWidth type="submit">
|
|
145
145
|
{props.texts.updateProfile}
|
|
146
|
-
</
|
|
146
|
+
</HawaButton>
|
|
147
147
|
</form>
|
|
148
148
|
</FormProvider>
|
|
149
149
|
</Container>
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import Button from "@mui/material/Button";
|
|
2
1
|
import Container from "@mui/material/Container";
|
|
2
|
+
import { HawaButton } from "../../elements";
|
|
3
3
|
|
|
4
4
|
export const UserSettingsForm = (props) => {
|
|
5
5
|
return (
|
|
6
6
|
<Container maxWidth="sm">
|
|
7
7
|
{props.children}
|
|
8
|
-
<
|
|
9
|
-
type="submit"
|
|
10
|
-
fullWidth
|
|
11
|
-
variant="last"
|
|
12
|
-
onClick={props.handleSaveSettings}
|
|
13
|
-
>
|
|
8
|
+
<HawaButton type="submit" fullWidth onClick={props.handleSaveSettings}>
|
|
14
9
|
{props.saveSettingsText}
|
|
15
|
-
</
|
|
10
|
+
</HawaButton>
|
|
16
11
|
</Container>
|
|
17
12
|
);
|
|
18
13
|
};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { HawaTextField,
|
|
2
|
+
import { HawaTextField, HawaAlert, HawaButton } from "../../elements";
|
|
3
3
|
import { Controller, useForm } from "react-hook-form";
|
|
4
|
-
import InputAdornment from "@mui/material/InputAdornment";
|
|
5
|
-
import EmailIcon from "@mui/icons-material/MailOutline";
|
|
6
|
-
import PasswordIcon from "@mui/icons-material/HttpsOutlined";
|
|
7
|
-
import Container from "@mui/material/Container";
|
|
8
|
-
import Typography from "@mui/material/Typography";
|
|
9
|
-
import Button from "@mui/material/Button";
|
|
10
4
|
import PropTypes from "prop-types";
|
|
11
|
-
import Divider from "@mui/material/Divider";
|
|
12
5
|
|
|
13
6
|
export const CodeConfirmation = (props) => {
|
|
14
7
|
const methods = useForm();
|
|
@@ -19,11 +12,7 @@ export const CodeConfirmation = (props) => {
|
|
|
19
12
|
} = methods;
|
|
20
13
|
|
|
21
14
|
return (
|
|
22
|
-
<
|
|
23
|
-
maxWidth="xs"
|
|
24
|
-
variant="auth"
|
|
25
|
-
style={{ direction: props.lang === "ar" ? "rtl" : "ltr" }}
|
|
26
|
-
>
|
|
15
|
+
<div className="flex flex-col divide-y divide-gray-300 bg-blue-300 rounded-xl p-4">
|
|
27
16
|
{props.showError && (
|
|
28
17
|
<HawaAlert
|
|
29
18
|
title={props.errorTitle}
|
|
@@ -43,11 +32,6 @@ export const CodeConfirmation = (props) => {
|
|
|
43
32
|
label={props.texts.codeLabel}
|
|
44
33
|
helperText={errors.email?.message}
|
|
45
34
|
placeholder={props.texts.codePlaceholder}
|
|
46
|
-
// startAdornment={
|
|
47
|
-
// <InputAdornment position="start">
|
|
48
|
-
// <EmailIcon />
|
|
49
|
-
// </InputAdornment>
|
|
50
|
-
// }
|
|
51
35
|
{...field}
|
|
52
36
|
/>
|
|
53
37
|
)}
|
|
@@ -56,11 +40,11 @@ export const CodeConfirmation = (props) => {
|
|
|
56
40
|
}}
|
|
57
41
|
/>
|
|
58
42
|
|
|
59
|
-
<
|
|
43
|
+
<HawaButton type="submit" fullWidth>
|
|
60
44
|
{props.texts.confirmText}
|
|
61
|
-
</
|
|
45
|
+
</HawaButton>
|
|
62
46
|
</form>
|
|
63
|
-
</
|
|
47
|
+
</div>
|
|
64
48
|
);
|
|
65
49
|
};
|
|
66
50
|
CodeConfirmation.propTypes = {
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { HawaTextField, HawaAlert,
|
|
2
|
+
import { HawaTextField, HawaAlert, HawaButton } from "../../elements";
|
|
3
3
|
import { Controller, FormProvider, useForm } from "react-hook-form";
|
|
4
|
-
import InputAdornment from "@mui/material/InputAdornment";
|
|
5
|
-
import PasswordIcon from "@mui/icons-material/HttpsOutlined";
|
|
6
|
-
import Container from "@mui/material/Container";
|
|
7
|
-
import Button from "@mui/material/Button";
|
|
8
4
|
import PropTypes from "prop-types";
|
|
9
5
|
|
|
10
6
|
export const NewPasswordForm = (props) => {
|
|
@@ -26,14 +22,12 @@ export const NewPasswordForm = (props) => {
|
|
|
26
22
|
};
|
|
27
23
|
|
|
28
24
|
return (
|
|
29
|
-
<
|
|
25
|
+
<div className="flex flex-col divide-y divide-gray-300 bg-blue-300 rounded-xl p-4">
|
|
30
26
|
{matchError && (
|
|
31
27
|
<HawaAlert text={props.texts.passwordMatchError} severity="error" />
|
|
32
28
|
)}
|
|
33
29
|
{props.passwordChanged ? (
|
|
34
|
-
<
|
|
35
|
-
{props.texts.passwordChanged}
|
|
36
|
-
</HawaTypography>
|
|
30
|
+
<div className="text-center">{props.texts.passwordChanged}</div>
|
|
37
31
|
) : (
|
|
38
32
|
<FormProvider {...methods}>
|
|
39
33
|
<form onSubmit={handleSubmit(handleSubmission)}>
|
|
@@ -48,11 +42,6 @@ export const NewPasswordForm = (props) => {
|
|
|
48
42
|
label={props.texts.passwordLabel}
|
|
49
43
|
placeholder={props.texts.passwordPlaceholder}
|
|
50
44
|
helperText={errors.password?.message}
|
|
51
|
-
startAdornment={
|
|
52
|
-
<InputAdornment position="start">
|
|
53
|
-
<PasswordIcon />
|
|
54
|
-
</InputAdornment>
|
|
55
|
-
}
|
|
56
45
|
{...field}
|
|
57
46
|
/>
|
|
58
47
|
)}
|
|
@@ -71,11 +60,6 @@ export const NewPasswordForm = (props) => {
|
|
|
71
60
|
label={props.texts.confirmPasswordLabel}
|
|
72
61
|
placeholder={props.texts.confirmPasswordPlaceholder}
|
|
73
62
|
helperText={errors.confirmPassword?.message}
|
|
74
|
-
startAdornment={
|
|
75
|
-
<InputAdornment position="start">
|
|
76
|
-
<PasswordIcon />
|
|
77
|
-
</InputAdornment>
|
|
78
|
-
}
|
|
79
63
|
{...field}
|
|
80
64
|
/>
|
|
81
65
|
)}
|
|
@@ -84,13 +68,13 @@ export const NewPasswordForm = (props) => {
|
|
|
84
68
|
}}
|
|
85
69
|
/>
|
|
86
70
|
|
|
87
|
-
<
|
|
71
|
+
<HawaButton type="submit" fullWidth>
|
|
88
72
|
{props.texts.updatePassword}
|
|
89
|
-
</
|
|
73
|
+
</HawaButton>
|
|
90
74
|
</form>
|
|
91
75
|
</FormProvider>
|
|
92
76
|
)}
|
|
93
|
-
</
|
|
77
|
+
</div>
|
|
94
78
|
);
|
|
95
79
|
};
|
|
96
80
|
NewPasswordForm.propTypes = {
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Controller, useForm } from "react-hook-form";
|
|
3
|
-
import {
|
|
4
|
-
import InputAdornment from "@mui/material/InputAdornment";
|
|
5
|
-
import EmailIcon from "@mui/icons-material/MailOutline";
|
|
6
|
-
import Container from "@mui/material/Container";
|
|
7
|
-
import Button from "@mui/material/Button";
|
|
3
|
+
import { HawaButton, HawaTextField } from "../../elements";
|
|
8
4
|
import PropTypes from "prop-types";
|
|
9
5
|
|
|
10
6
|
export const ResetPasswordForm = (props) => {
|
|
@@ -16,7 +12,7 @@ export const ResetPasswordForm = (props) => {
|
|
|
16
12
|
control
|
|
17
13
|
} = methods;
|
|
18
14
|
return (
|
|
19
|
-
<
|
|
15
|
+
<div className="flex flex-col divide-y divide-gray-300 bg-blue-300 rounded-xl p-4">
|
|
20
16
|
{!props.sent ? (
|
|
21
17
|
<form onSubmit={handleSubmit(props.handleResetPassword)}>
|
|
22
18
|
<Controller
|
|
@@ -30,11 +26,6 @@ export const ResetPasswordForm = (props) => {
|
|
|
30
26
|
label={props.texts.emailLabel}
|
|
31
27
|
helperText={errors.email?.message}
|
|
32
28
|
placeholder={props.texts.emailPlaceholder}
|
|
33
|
-
startAdornment={
|
|
34
|
-
<InputAdornment position="start">
|
|
35
|
-
<EmailIcon />
|
|
36
|
-
</InputAdornment>
|
|
37
|
-
}
|
|
38
29
|
{...field}
|
|
39
30
|
/>
|
|
40
31
|
)}
|
|
@@ -47,16 +38,14 @@ export const ResetPasswordForm = (props) => {
|
|
|
47
38
|
}
|
|
48
39
|
}}
|
|
49
40
|
/>
|
|
50
|
-
<
|
|
41
|
+
<HawaButton fullWidth type="submit">
|
|
51
42
|
{props.texts.resetPassword}
|
|
52
|
-
</
|
|
43
|
+
</HawaButton>
|
|
53
44
|
</form>
|
|
54
45
|
) : (
|
|
55
|
-
<
|
|
56
|
-
{props.texts.emailSentText}
|
|
57
|
-
</HawaTypography>
|
|
46
|
+
<div className="text-center">{props.texts.emailSentText}</div>
|
|
58
47
|
)}
|
|
59
|
-
</
|
|
48
|
+
</div>
|
|
60
49
|
);
|
|
61
50
|
};
|
|
62
51
|
ResetPasswordForm.propTypes = {
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
HawaTextField,
|
|
4
|
+
HawaLogoButton,
|
|
5
|
+
HawaAlert,
|
|
6
|
+
HawaButton
|
|
7
|
+
} from "../../elements";
|
|
3
8
|
import { Controller, useForm } from "react-hook-form";
|
|
4
|
-
import InputAdornment from "@mui/material/InputAdornment";
|
|
5
|
-
import EmailIcon from "@mui/icons-material/MailOutline";
|
|
6
|
-
import PasswordIcon from "@mui/icons-material/HttpsOutlined";
|
|
7
|
-
import Container from "@mui/material/Container";
|
|
8
|
-
import Typography from "@mui/material/Typography";
|
|
9
|
-
import Button from "@mui/material/Button";
|
|
10
9
|
import PropTypes from "prop-types";
|
|
11
|
-
import Divider from "@mui/material/Divider";
|
|
12
10
|
|
|
13
11
|
export const SignInForm = (props) => {
|
|
14
12
|
const methods = useForm();
|
|
@@ -19,19 +17,15 @@ export const SignInForm = (props) => {
|
|
|
19
17
|
} = methods;
|
|
20
18
|
|
|
21
19
|
return (
|
|
22
|
-
<
|
|
23
|
-
variant="auth"
|
|
24
|
-
maxWidth="sm"
|
|
25
|
-
style={{ direction: props.lang === "ar" ? "rtl" : "ltr" }}
|
|
26
|
-
>
|
|
27
|
-
{props.showError && (
|
|
28
|
-
<HawaAlert
|
|
29
|
-
title={props.errorTitle}
|
|
30
|
-
text={props.errorText}
|
|
31
|
-
severity="error"
|
|
32
|
-
/>
|
|
33
|
-
)}
|
|
20
|
+
<div className="flex flex-col divide-y divide-gray-300 bg-blue-300 rounded-xl p-4">
|
|
34
21
|
<form onSubmit={handleSubmit(props.handleSignIn)}>
|
|
22
|
+
{props.showError && (
|
|
23
|
+
<HawaAlert
|
|
24
|
+
title={props.errorTitle}
|
|
25
|
+
text={props.errorText}
|
|
26
|
+
severity="error"
|
|
27
|
+
/>
|
|
28
|
+
)}
|
|
35
29
|
<Controller
|
|
36
30
|
control={control}
|
|
37
31
|
name="email"
|
|
@@ -43,11 +37,6 @@ export const SignInForm = (props) => {
|
|
|
43
37
|
label={props.texts.emailLabel}
|
|
44
38
|
helperText={errors.email?.message}
|
|
45
39
|
placeholder={props.texts.emailPlaceholder}
|
|
46
|
-
startAdornment={
|
|
47
|
-
<InputAdornment position="start">
|
|
48
|
-
<EmailIcon />
|
|
49
|
-
</InputAdornment>
|
|
50
|
-
}
|
|
51
40
|
{...field}
|
|
52
41
|
/>
|
|
53
42
|
)}
|
|
@@ -73,73 +62,61 @@ export const SignInForm = (props) => {
|
|
|
73
62
|
label={props.texts.passwordLabel}
|
|
74
63
|
placeholder={props.texts.passwordPlaceholder}
|
|
75
64
|
helperText={errors.password?.message}
|
|
76
|
-
startAdornment={
|
|
77
|
-
<InputAdornment position="start">
|
|
78
|
-
<PasswordIcon />
|
|
79
|
-
</InputAdornment>
|
|
80
|
-
}
|
|
81
65
|
{...field}
|
|
82
66
|
/>
|
|
83
67
|
)}
|
|
84
68
|
rules={{ required: props.texts.passwordRequiredText }}
|
|
85
69
|
/>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
marginTop: 5,
|
|
90
|
-
width: "max-content",
|
|
91
|
-
fontSize: 15,
|
|
92
|
-
padding: 5
|
|
93
|
-
}}
|
|
70
|
+
|
|
71
|
+
<div
|
|
72
|
+
className="text-xs cursor-pointer w-fit"
|
|
94
73
|
onClick={props.handleForgotPassword}
|
|
95
74
|
>
|
|
96
75
|
{props.texts.forgotPasswordText}
|
|
97
|
-
</
|
|
98
|
-
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<HawaButton fullWidth type="submit">
|
|
99
79
|
{props.texts.signInText}
|
|
100
|
-
</
|
|
80
|
+
</HawaButton>
|
|
81
|
+
<div className="font-semibold p-3 text-center text-sm">
|
|
82
|
+
{props.texts.newUserText}{" "}
|
|
83
|
+
<span
|
|
84
|
+
onClick={props.handleRouteToSignUp}
|
|
85
|
+
className="text-blue-600 cursor-pointer"
|
|
86
|
+
>
|
|
87
|
+
{props.texts.signUpText}
|
|
88
|
+
</span>
|
|
89
|
+
</div>
|
|
101
90
|
</form>
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
onClick={props.handleGithubSignIn}
|
|
132
|
-
/>
|
|
133
|
-
)}
|
|
134
|
-
{props.viaTwitter && (
|
|
135
|
-
<HawaLogoButton
|
|
136
|
-
logo="twitter"
|
|
137
|
-
buttonText={props.texts.twitterButtonLabel}
|
|
138
|
-
onClick={props.handleTwitterSignIn}
|
|
139
|
-
/>
|
|
140
|
-
)}
|
|
141
|
-
</div>
|
|
142
|
-
</Container>
|
|
91
|
+
{/* <Divider /> */}
|
|
92
|
+
|
|
93
|
+
{/* <div className="divide-y divide-gray-900"></div> */}
|
|
94
|
+
{props.viaGithub || props.viaGoogle || props.viaTwitter ? (
|
|
95
|
+
<div className="flex flex-col ">
|
|
96
|
+
{props.viaGoogle && (
|
|
97
|
+
<HawaLogoButton
|
|
98
|
+
logo="google"
|
|
99
|
+
buttonText={props.texts.googleButtonLabel}
|
|
100
|
+
onClick={props.handleGoogleSignIn}
|
|
101
|
+
/>
|
|
102
|
+
)}
|
|
103
|
+
{props.viaGithub && (
|
|
104
|
+
<HawaLogoButton
|
|
105
|
+
logo="github"
|
|
106
|
+
buttonText={props.texts.githubButtonLabel}
|
|
107
|
+
onClick={props.handleGithubSignIn}
|
|
108
|
+
/>
|
|
109
|
+
)}
|
|
110
|
+
{props.viaTwitter && (
|
|
111
|
+
<HawaLogoButton
|
|
112
|
+
logo="twitter"
|
|
113
|
+
buttonText={props.texts.twitterButtonLabel}
|
|
114
|
+
onClick={props.handleTwitterSignIn}
|
|
115
|
+
/>
|
|
116
|
+
)}
|
|
117
|
+
</div>
|
|
118
|
+
) : null}
|
|
119
|
+
</div>
|
|
143
120
|
);
|
|
144
121
|
};
|
|
145
122
|
SignInForm.propTypes = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Button, Container } from "@mui/material";
|
|
2
1
|
import { useState } from "react";
|
|
3
2
|
import { Controller, useForm } from "react-hook-form";
|
|
3
|
+
import { HawaButton } from "../../elements";
|
|
4
4
|
import HawaPhoneInput from "../../elements/HawaPhoneInput";
|
|
5
5
|
|
|
6
6
|
export const SignInPhone = (props) => {
|
|
@@ -12,11 +12,7 @@ export const SignInPhone = (props) => {
|
|
|
12
12
|
control
|
|
13
13
|
} = methods;
|
|
14
14
|
return (
|
|
15
|
-
<
|
|
16
|
-
maxWidth="xs"
|
|
17
|
-
variant="auth"
|
|
18
|
-
style={{ direction: props.lang === "ar" ? "rtl" : "ltr" }}
|
|
19
|
-
>
|
|
15
|
+
<div className="flex flex-col divide-y divide-gray-300 bg-blue-300 rounded-xl p-4">
|
|
20
16
|
<form onSubmit={handleSubmit(props.onSubmit)}>
|
|
21
17
|
<Controller
|
|
22
18
|
control={control}
|
|
@@ -34,10 +30,10 @@ export const SignInPhone = (props) => {
|
|
|
34
30
|
/>
|
|
35
31
|
)}
|
|
36
32
|
/>
|
|
37
|
-
<
|
|
33
|
+
<HawaButton fullWidth type="submit">
|
|
38
34
|
{props.SignInButtonText}
|
|
39
|
-
</
|
|
35
|
+
</HawaButton>
|
|
40
36
|
</form>
|
|
41
|
-
</
|
|
37
|
+
</div>
|
|
42
38
|
);
|
|
43
39
|
};
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
HawaTextField,
|
|
4
|
+
HawaLogoButton,
|
|
5
|
+
HawaAlert,
|
|
6
|
+
HawaButton
|
|
7
|
+
} from "../../elements";
|
|
3
8
|
import PropTypes from "prop-types";
|
|
4
9
|
import { Controller, FormProvider, useForm } from "react-hook-form";
|
|
5
|
-
import PersonIcon from "@mui/icons-material/PermIdentityOutlined";
|
|
6
|
-
import InputAdornment from "@mui/material/InputAdornment";
|
|
7
|
-
import EmailIcon from "@mui/icons-material/MailOutline";
|
|
8
|
-
import PasswordIcon from "@mui/icons-material/HttpsOutlined";
|
|
9
|
-
import Container from "@mui/material/Container";
|
|
10
|
-
import Divider from "@mui/material/Divider";
|
|
11
|
-
import Typography from "@mui/material/Typography";
|
|
12
|
-
import Button from "@mui/material/Button";
|
|
13
10
|
|
|
14
11
|
export const SignUpForm = (props) => {
|
|
15
12
|
const methods = useForm();
|
|
@@ -20,11 +17,7 @@ export const SignUpForm = (props) => {
|
|
|
20
17
|
} = methods;
|
|
21
18
|
|
|
22
19
|
return (
|
|
23
|
-
<
|
|
24
|
-
maxWidth="xs"
|
|
25
|
-
variant="auth"
|
|
26
|
-
style={{ direction: props.lang === "ar" ? "rtl" : "ltr" }}
|
|
27
|
-
>
|
|
20
|
+
<div className="flex flex-col divide-y divide-gray-300 bg-blue-300 rounded-xl p-4">
|
|
28
21
|
{props.showError && (
|
|
29
22
|
<HawaAlert
|
|
30
23
|
title={props.errorTitle}
|
|
@@ -46,11 +39,6 @@ export const SignUpForm = (props) => {
|
|
|
46
39
|
label={props.texts.fullNameLabel}
|
|
47
40
|
placeholder={props.texts.fullNamePlaceholder}
|
|
48
41
|
helperText={errors.fullName?.message}
|
|
49
|
-
startAdornment={
|
|
50
|
-
<InputAdornment position="start">
|
|
51
|
-
<PersonIcon />
|
|
52
|
-
</InputAdornment>
|
|
53
|
-
}
|
|
54
42
|
{...field}
|
|
55
43
|
/>
|
|
56
44
|
)}
|
|
@@ -70,11 +58,6 @@ export const SignUpForm = (props) => {
|
|
|
70
58
|
label={props.texts.emailLabel}
|
|
71
59
|
helperText={errors.email?.message}
|
|
72
60
|
placeholder={props.texts.emailPlaceholder}
|
|
73
|
-
startAdornment={
|
|
74
|
-
<InputAdornment position="start">
|
|
75
|
-
<EmailIcon />
|
|
76
|
-
</InputAdornment>
|
|
77
|
-
}
|
|
78
61
|
{...field}
|
|
79
62
|
/>
|
|
80
63
|
)}
|
|
@@ -99,68 +82,54 @@ export const SignUpForm = (props) => {
|
|
|
99
82
|
label={props.texts.passwordLabel}
|
|
100
83
|
placeholder={props.texts.passwordPlaceholder}
|
|
101
84
|
helperText={errors.password?.message}
|
|
102
|
-
startAdornment={
|
|
103
|
-
<InputAdornment position="start">
|
|
104
|
-
<PasswordIcon />
|
|
105
|
-
</InputAdornment>
|
|
106
|
-
}
|
|
107
85
|
{...field}
|
|
108
86
|
/>
|
|
109
87
|
)}
|
|
110
88
|
rules={{ required: props.texts.passwordRequiredText }}
|
|
111
89
|
/>
|
|
112
90
|
|
|
113
|
-
<
|
|
91
|
+
<HawaButton fullWidth type="submit">
|
|
114
92
|
{props.texts.signUpText}
|
|
115
|
-
</
|
|
93
|
+
</HawaButton>
|
|
116
94
|
</form>
|
|
117
95
|
</FormProvider>
|
|
118
96
|
|
|
119
|
-
<
|
|
120
|
-
variant="subtitle2"
|
|
121
|
-
style={{
|
|
122
|
-
marginTop: 5,
|
|
123
|
-
textAlign: "center",
|
|
124
|
-
padding: 5
|
|
125
|
-
}}
|
|
126
|
-
>
|
|
97
|
+
<div className="font-semibold p-3 text-center text-sm">
|
|
127
98
|
{props.texts.existingUserText}{" "}
|
|
128
99
|
<span
|
|
129
100
|
onClick={props.handleRouteToSignIn}
|
|
130
|
-
|
|
131
|
-
cursor: "pointer",
|
|
132
|
-
color: "blue",
|
|
133
|
-
textAlign: "center"
|
|
134
|
-
}}
|
|
101
|
+
className="text-blue-600 cursor-pointer"
|
|
135
102
|
>
|
|
136
103
|
{props.texts.signInText}
|
|
137
104
|
</span>
|
|
138
|
-
</Typography>
|
|
139
|
-
<Divider />
|
|
140
|
-
<div style={{ display: "flex", flexDirection: "column" }}>
|
|
141
|
-
{props.viaGoogle && (
|
|
142
|
-
<HawaLogoButton
|
|
143
|
-
logo="google"
|
|
144
|
-
buttonText={props.texts.googleButtonLabel}
|
|
145
|
-
onClick={props.handleGoogleSignUp}
|
|
146
|
-
/>
|
|
147
|
-
)}
|
|
148
|
-
{props.viaGithub && (
|
|
149
|
-
<HawaLogoButton
|
|
150
|
-
logo="github"
|
|
151
|
-
buttonText={props.texts.githubButtonLabel}
|
|
152
|
-
onClick={props.handleGithubSignUp}
|
|
153
|
-
/>
|
|
154
|
-
)}
|
|
155
|
-
{props.viaTwitter && (
|
|
156
|
-
<HawaLogoButton
|
|
157
|
-
logo="twitter"
|
|
158
|
-
buttonText={props.texts.twitterButtonLabel}
|
|
159
|
-
onClick={props.handleTwitterSignUp}
|
|
160
|
-
/>
|
|
161
|
-
)}
|
|
162
105
|
</div>
|
|
163
|
-
|
|
106
|
+
|
|
107
|
+
{props.viaGithub || props.viaGoogle || props.viaTwitter ? (
|
|
108
|
+
<div style={{ display: "flex", flexDirection: "column" }}>
|
|
109
|
+
{props.viaGoogle && (
|
|
110
|
+
<HawaLogoButton
|
|
111
|
+
logo="google"
|
|
112
|
+
buttonText={props.texts.googleButtonLabel}
|
|
113
|
+
onClick={props.handleGoogleSignUp}
|
|
114
|
+
/>
|
|
115
|
+
)}
|
|
116
|
+
{props.viaGithub && (
|
|
117
|
+
<HawaLogoButton
|
|
118
|
+
logo="github"
|
|
119
|
+
buttonText={props.texts.githubButtonLabel}
|
|
120
|
+
onClick={props.handleGithubSignUp}
|
|
121
|
+
/>
|
|
122
|
+
)}
|
|
123
|
+
{props.viaTwitter && (
|
|
124
|
+
<HawaLogoButton
|
|
125
|
+
logo="twitter"
|
|
126
|
+
buttonText={props.texts.twitterButtonLabel}
|
|
127
|
+
onClick={props.handleTwitterSignUp}
|
|
128
|
+
/>
|
|
129
|
+
)}
|
|
130
|
+
</div>
|
|
131
|
+
) : null}
|
|
132
|
+
</div>
|
|
164
133
|
);
|
|
165
134
|
};
|
|
166
135
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { HawaTextField } from "../../elements";
|
|
2
|
+
import { HawaButton, HawaTextField } from "../../elements";
|
|
3
3
|
import { Controller, FormProvider, useForm } from "react-hook-form";
|
|
4
4
|
import Container from "@mui/material/Container";
|
|
5
|
-
import Button from "@mui/material/Button";
|
|
6
5
|
import Typography from "@mui/material/Typography";
|
|
7
6
|
import PropTypes from "prop-types";
|
|
8
7
|
|
|
@@ -56,9 +55,9 @@ export const ChargeWalletForm = (props) => {
|
|
|
56
55
|
}}
|
|
57
56
|
/>
|
|
58
57
|
|
|
59
|
-
<
|
|
58
|
+
<HawaButton type="submit" fullWidth>
|
|
60
59
|
{props.texts.chargeWallet}
|
|
61
|
-
</
|
|
60
|
+
</HawaButton>
|
|
62
61
|
</form>
|
|
63
62
|
</FormProvider>
|
|
64
63
|
</Container>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
HawaTextField,
|
|
4
|
+
HawaTable,
|
|
5
|
+
HawaSelect,
|
|
6
|
+
HawaButton
|
|
7
|
+
} from "../../elements";
|
|
3
8
|
import { Controller, FormProvider, useForm } from "react-hook-form";
|
|
4
|
-
import Button from "@mui/material/Button";
|
|
5
9
|
import Container from "@mui/material/Container";
|
|
6
10
|
import Typography from "@mui/material/Typography";
|
|
7
11
|
import Divider from "@mui/material/Divider";
|
|
@@ -236,9 +240,9 @@ export const CheckoutForm = (props) => {
|
|
|
236
240
|
)}
|
|
237
241
|
/>
|
|
238
242
|
</Container>
|
|
239
|
-
<
|
|
243
|
+
<HawaButton type="submit" fullWidth>
|
|
240
244
|
{props.texts.payNow}
|
|
241
|
-
</
|
|
245
|
+
</HawaButton>
|
|
242
246
|
</form>
|
|
243
247
|
</FormProvider>
|
|
244
248
|
</Container>
|