@sikka/hawa 0.0.19 → 0.0.22
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/UserSettingsForm.js +2 -2
- package/src/blocks/AuthForms/SignInForm.js +2 -0
- package/src/blocks/AuthForms/SignUpForm.js +2 -0
- package/src/blocks/Payment/ChargeWalletForm.js +6 -1
- package/src/blocks/Payment/CheckoutForm.js +213 -66
- package/src/blocks/Payment/Confirmation.js +120 -0
- package/src/blocks/Payment/CreditCardForm.js +3 -3
- package/src/blocks/Payment/PayWithWallet.js +3 -3
- package/src/blocks/Payment/SelectPayment.js +1 -1
- package/src/blocks/Payment/index.js +1 -0
- package/src/elements/AdaptiveButton.js +0 -2
- package/src/elements/HawaLogoButton.js +1 -2
- package/src/elements/HawaPopMenu.js +10 -0
- package/src/elements/HawaPricingCard.js +2 -1
- package/src/elements/HawaSelect.js +26 -0
- package/src/elements/HawaSwitch.js +1 -1
- package/src/elements/HawaTable.js +20 -5
- package/src/elements/HawaTextField.js +10 -4
- package/src/elements/HawaTypography.js +0 -1
- package/src/elements/index.js +1 -2
- package/src/{elements → layout}/HawaAppBar.js +19 -6
- package/src/layout/HawaAppLayout.js +44 -43
- package/src/layout/HawaDialog.js +5 -7
- package/src/layout/index.js +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.f236f782.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.7097848f.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.ae39b38c.iframe.bundle.js.LICENSE.txt → vendors~main.7097848f.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.7097848f.iframe.bundle.js.map +1 -0
- package/src/elements/HawaListItem.js +0 -21
- package/storybook-static/main.894e2873.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.ae39b38c.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.ae39b38c.iframe.bundle.js.map +0 -1
|
@@ -1,95 +1,242 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Box } from "../../layout";
|
|
9
|
-
import { FormProvider, useForm } from "react-hook-form";
|
|
10
|
-
import { Button, Container, Typography } from "@mui/material";
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { HawaTextField, HawaTable, HawaSelect } from "../../elements";
|
|
3
|
+
import { Controller, FormProvider, useForm } from "react-hook-form";
|
|
4
|
+
import Button from "@mui/material/Button";
|
|
5
|
+
import Container from "@mui/material/Container";
|
|
6
|
+
import Typography from "@mui/material/Typography";
|
|
7
|
+
import Divider from "@mui/material/Divider";
|
|
11
8
|
|
|
12
9
|
export const CheckoutForm = (props) => {
|
|
10
|
+
let isArabic = props.lang === "ar";
|
|
13
11
|
const methods = useForm();
|
|
14
12
|
const {
|
|
15
13
|
formState: { errors },
|
|
16
|
-
handleSubmit
|
|
14
|
+
handleSubmit,
|
|
15
|
+
register,
|
|
16
|
+
control
|
|
17
17
|
} = methods;
|
|
18
18
|
|
|
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
|
+
};
|
|
19
32
|
return (
|
|
20
|
-
<Container maxWidth="
|
|
33
|
+
<Container maxWidth="sm" style={{ direction: isArabic ? "rtl" : "ltr" }}>
|
|
21
34
|
<Typography
|
|
22
35
|
align="center"
|
|
23
|
-
variant="
|
|
24
|
-
fontWeight={
|
|
36
|
+
variant="h5"
|
|
37
|
+
fontWeight={500}
|
|
25
38
|
style={{ marginBottom: 10 }}
|
|
26
39
|
>
|
|
27
|
-
|
|
40
|
+
{props.texts.orderDetails}
|
|
28
41
|
</Typography>
|
|
29
42
|
<HawaTable
|
|
43
|
+
lang={props.lang}
|
|
30
44
|
columns={["Product", "Price"]}
|
|
31
|
-
rows={
|
|
32
|
-
|
|
33
|
-
["Website Design", "1,500 SAR"],
|
|
34
|
-
["Website Development", "900 SAR"],
|
|
35
|
-
["Hosting", "200 SAR"],
|
|
36
|
-
["Social Media Management", "700 SAR"]
|
|
37
|
-
]}
|
|
38
|
-
end={["Total", "5,330 SAR"]}
|
|
45
|
+
rows={props.products}
|
|
46
|
+
end={["Total", props.total]}
|
|
39
47
|
/>
|
|
48
|
+
<Divider variant="middle" />
|
|
49
|
+
|
|
40
50
|
<Typography
|
|
41
51
|
align="center"
|
|
42
|
-
variant="
|
|
43
|
-
fontWeight={
|
|
44
|
-
style={{
|
|
52
|
+
variant="h5"
|
|
53
|
+
fontWeight={500}
|
|
54
|
+
style={{ marginBottom: 10 }}
|
|
45
55
|
>
|
|
46
|
-
|
|
56
|
+
{props.texts.billingAddress}
|
|
47
57
|
</Typography>
|
|
58
|
+
|
|
48
59
|
<FormProvider {...methods}>
|
|
49
|
-
<form onSubmit={handleSubmit(props.
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
<form onSubmit={handleSubmit(props.handlePayNow)}>
|
|
61
|
+
<Container sx={containerStyle}>
|
|
62
|
+
<Controller
|
|
63
|
+
control={control}
|
|
64
|
+
name="firstName"
|
|
65
|
+
rules={{ required: props.texts?.required }}
|
|
66
|
+
render={({ field }) => (
|
|
67
|
+
<HawaTextField
|
|
68
|
+
inForm
|
|
69
|
+
fullWidth
|
|
70
|
+
type="text"
|
|
71
|
+
value={field.value ?? ""}
|
|
72
|
+
label={props.texts?.firstNameLabel + " *"}
|
|
73
|
+
helperText={errors.firstName?.message}
|
|
74
|
+
{...field}
|
|
75
|
+
/>
|
|
76
|
+
)}
|
|
77
|
+
/>
|
|
78
|
+
<div style={{ width: 20 }} />
|
|
67
79
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
<Controller
|
|
81
|
+
control={control}
|
|
82
|
+
name="lastName"
|
|
83
|
+
rules={{ required: props.texts?.required }}
|
|
84
|
+
render={({ field }) => (
|
|
85
|
+
<HawaTextField
|
|
86
|
+
inForm
|
|
87
|
+
fullWidth
|
|
88
|
+
type="text"
|
|
89
|
+
value={field.value ?? ""}
|
|
90
|
+
label={props.texts?.lastNameLabel + " *"}
|
|
91
|
+
helperText={errors.lastName?.message}
|
|
92
|
+
{...field}
|
|
93
|
+
/>
|
|
94
|
+
)}
|
|
95
|
+
/>
|
|
96
|
+
</Container>
|
|
97
|
+
<Controller
|
|
98
|
+
control={control}
|
|
99
|
+
name="email"
|
|
100
|
+
render={({ field }) => (
|
|
101
|
+
<HawaTextField
|
|
102
|
+
inForm
|
|
103
|
+
fullWidth
|
|
104
|
+
type="text"
|
|
105
|
+
value={field.value ?? ""}
|
|
106
|
+
label={props.texts?.emailLabel + " *"}
|
|
107
|
+
helperText={errors.email?.message}
|
|
108
|
+
{...field}
|
|
109
|
+
/>
|
|
110
|
+
)}
|
|
79
111
|
rules={{
|
|
80
|
-
required:
|
|
112
|
+
required: props.texts?.emailRequiredText,
|
|
113
|
+
pattern: {
|
|
114
|
+
value:
|
|
115
|
+
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
116
|
+
message: props.texts?.emailInvalidText
|
|
117
|
+
}
|
|
81
118
|
}}
|
|
82
|
-
helperText={errors.password?.message}
|
|
83
119
|
/>
|
|
84
120
|
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
121
|
+
<Container sx={containerStyle}>
|
|
122
|
+
<Controller
|
|
123
|
+
control={control}
|
|
124
|
+
name="streetAddress"
|
|
125
|
+
rules={{ required: props.texts?.required }}
|
|
126
|
+
render={({ field }) => (
|
|
127
|
+
<HawaTextField
|
|
128
|
+
inForm
|
|
129
|
+
fullWidth
|
|
130
|
+
type="text"
|
|
131
|
+
value={field.value ?? ""}
|
|
132
|
+
label={props.texts?.streetAddressLabel + " *"}
|
|
133
|
+
helperText={errors.streetAddress?.message}
|
|
134
|
+
{...field}
|
|
135
|
+
/>
|
|
136
|
+
)}
|
|
137
|
+
/>
|
|
138
|
+
<div style={{ width: 20 }} />
|
|
139
|
+
|
|
140
|
+
<Controller
|
|
141
|
+
control={control}
|
|
142
|
+
name="buildingNumber"
|
|
143
|
+
rules={{ required: props.texts?.required }}
|
|
144
|
+
render={({ field }) => (
|
|
145
|
+
<HawaTextField
|
|
146
|
+
inForm
|
|
147
|
+
fullWidth
|
|
148
|
+
type="text"
|
|
149
|
+
value={field.value ?? ""}
|
|
150
|
+
label={props.texts?.buildingNumberLabel + " *"}
|
|
151
|
+
helperText={errors.buildingNumber?.message}
|
|
152
|
+
{...field}
|
|
153
|
+
/>
|
|
154
|
+
)}
|
|
155
|
+
/>
|
|
156
|
+
</Container>
|
|
157
|
+
<Container sx={containerStyle}>
|
|
158
|
+
<Controller
|
|
159
|
+
control={control}
|
|
160
|
+
name="province"
|
|
161
|
+
rules={{ required: props.texts?.required }}
|
|
162
|
+
render={({ field }) => (
|
|
163
|
+
<HawaTextField
|
|
164
|
+
inForm
|
|
165
|
+
fullWidth
|
|
166
|
+
type="text"
|
|
167
|
+
value={field.value ?? ""}
|
|
168
|
+
label={props.texts?.stateLabel + " *"}
|
|
169
|
+
helperText={errors.province?.message}
|
|
170
|
+
{...field}
|
|
171
|
+
/>
|
|
172
|
+
)}
|
|
173
|
+
/>
|
|
174
|
+
<div style={{ width: 20 }} />
|
|
175
|
+
|
|
176
|
+
<Controller
|
|
177
|
+
control={control}
|
|
178
|
+
name="city"
|
|
179
|
+
rules={{ required: props.texts?.required }}
|
|
180
|
+
render={({ field }) => (
|
|
181
|
+
<HawaTextField
|
|
182
|
+
inForm
|
|
183
|
+
fullWidth
|
|
184
|
+
type="text"
|
|
185
|
+
value={field.value ?? ""}
|
|
186
|
+
label={props.texts?.cityLabel + " *"}
|
|
187
|
+
helperText={errors.city?.message}
|
|
188
|
+
{...field}
|
|
189
|
+
/>
|
|
190
|
+
)}
|
|
191
|
+
/>
|
|
192
|
+
</Container>
|
|
193
|
+
<Container sx={containerStyle}>
|
|
194
|
+
<Controller
|
|
195
|
+
control={control}
|
|
196
|
+
name="zipCode"
|
|
197
|
+
rules={{ required: props.texts?.required }}
|
|
198
|
+
render={({ field }) => (
|
|
199
|
+
<HawaTextField
|
|
200
|
+
inForm
|
|
201
|
+
fullWidth
|
|
202
|
+
type="number"
|
|
203
|
+
variant="unscrollable"
|
|
204
|
+
value={field.value ?? ""}
|
|
205
|
+
label={props.texts?.zipCodeLabel + " *"}
|
|
206
|
+
helperText={errors.zipCode?.message}
|
|
207
|
+
{...field}
|
|
208
|
+
/>
|
|
209
|
+
)}
|
|
210
|
+
/>
|
|
211
|
+
<div style={{ width: 20 }} />
|
|
212
|
+
|
|
213
|
+
<Controller
|
|
214
|
+
control={control}
|
|
215
|
+
name="country"
|
|
216
|
+
rules={{ required: props.texts?.required }}
|
|
217
|
+
render={({ field }) => (
|
|
218
|
+
<HawaSelect
|
|
219
|
+
fullWidth
|
|
220
|
+
native
|
|
221
|
+
label={props.texts?.countryLabel + " *"}
|
|
222
|
+
variant="standard"
|
|
223
|
+
value={field.value ?? ""}
|
|
224
|
+
helperText={errors.country?.message}
|
|
225
|
+
displayEmpty
|
|
226
|
+
disableUnderline
|
|
227
|
+
validators={["required"]}
|
|
228
|
+
{...field}
|
|
229
|
+
>
|
|
230
|
+
<option></option>
|
|
231
|
+
{props.countriesList.map((country, i) => (
|
|
232
|
+
<option key={i}>{country}</option>
|
|
233
|
+
))}
|
|
234
|
+
</HawaSelect>
|
|
235
|
+
)}
|
|
236
|
+
/>
|
|
237
|
+
</Container>
|
|
238
|
+
<Button type="submit" fullWidth variant="last">
|
|
239
|
+
{props.texts.payNow}
|
|
93
240
|
</Button>
|
|
94
241
|
</form>
|
|
95
242
|
</FormProvider>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { HawaTextField, HawaTable, HawaSelect } from "../../elements";
|
|
3
|
+
import { Controller, FormProvider, useForm } from "react-hook-form";
|
|
4
|
+
import Button from "@mui/material/Button";
|
|
5
|
+
import Container from "@mui/material/Container";
|
|
6
|
+
import Typography from "@mui/material/Typography";
|
|
7
|
+
import Divider from "@mui/material/Divider";
|
|
8
|
+
|
|
9
|
+
export const ConfirmationPage = (props) => {
|
|
10
|
+
let isArabic = props.lang === "ar";
|
|
11
|
+
const methods = useForm();
|
|
12
|
+
const {
|
|
13
|
+
formState: { errors },
|
|
14
|
+
handleSubmit,
|
|
15
|
+
register,
|
|
16
|
+
control
|
|
17
|
+
} = methods;
|
|
18
|
+
|
|
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
|
+
return (
|
|
33
|
+
<div
|
|
34
|
+
style={{
|
|
35
|
+
display: "flex",
|
|
36
|
+
flexDirection: "column",
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
alignItems: "center"
|
|
39
|
+
}}
|
|
40
|
+
>
|
|
41
|
+
<Container maxWidth="sm" style={{ direction: isArabic ? "rtl" : "ltr" }}>
|
|
42
|
+
<Typography
|
|
43
|
+
align="center"
|
|
44
|
+
variant="h3"
|
|
45
|
+
fontWeight={400}
|
|
46
|
+
style={{ marginBottom: 10 }}
|
|
47
|
+
>
|
|
48
|
+
{props.confirmationTitle}
|
|
49
|
+
</Typography>
|
|
50
|
+
<Divider variant="middle" />
|
|
51
|
+
|
|
52
|
+
<Typography
|
|
53
|
+
align="center"
|
|
54
|
+
variant="body1"
|
|
55
|
+
// fontWeight={500}
|
|
56
|
+
style={{ marginBottom: 10 }}
|
|
57
|
+
>
|
|
58
|
+
{props.texts.successMessage} <strong>{props.userEmail}</strong>
|
|
59
|
+
</Typography>
|
|
60
|
+
<Typography align="center" variant="body1">
|
|
61
|
+
{props.texts.yourOrderNumber}
|
|
62
|
+
</Typography>
|
|
63
|
+
<Typography
|
|
64
|
+
align="center"
|
|
65
|
+
variant="body1"
|
|
66
|
+
fontWeight={700}
|
|
67
|
+
style={{ marginBottom: 10 }}
|
|
68
|
+
>
|
|
69
|
+
{props.orderNumber}
|
|
70
|
+
</Typography>
|
|
71
|
+
<Divider variant="middle" />
|
|
72
|
+
{props.products && (
|
|
73
|
+
<>
|
|
74
|
+
<Typography
|
|
75
|
+
align="center"
|
|
76
|
+
variant="h5"
|
|
77
|
+
fontWeight={500}
|
|
78
|
+
style={{ marginBottom: 10 }}
|
|
79
|
+
>
|
|
80
|
+
{props.texts.orderDetails}
|
|
81
|
+
</Typography>
|
|
82
|
+
|
|
83
|
+
<HawaTable
|
|
84
|
+
lang={props.lang}
|
|
85
|
+
columns={["Product", "Price"]}
|
|
86
|
+
rows={props.products}
|
|
87
|
+
end={["Total", props.total]}
|
|
88
|
+
/>
|
|
89
|
+
<Divider variant="middle" />
|
|
90
|
+
</>
|
|
91
|
+
)}
|
|
92
|
+
<Button onClick={props.handlePrint} variant="contained">
|
|
93
|
+
{props.texts.print}
|
|
94
|
+
</Button>
|
|
95
|
+
<Button onClick={props.handleHistory} variant="last">
|
|
96
|
+
{props.texts.history}
|
|
97
|
+
</Button>
|
|
98
|
+
<Button onClick={props.handleHome} variant="last">
|
|
99
|
+
{props.texts.homePage}
|
|
100
|
+
</Button>
|
|
101
|
+
<Typography align="center" variant="body2" style={{ marginTop: 10 }}>
|
|
102
|
+
{props.texts.fasterPaymentNote}
|
|
103
|
+
</Typography>
|
|
104
|
+
</Container>
|
|
105
|
+
<a
|
|
106
|
+
style={{
|
|
107
|
+
marginTop: 10,
|
|
108
|
+
paddingTop: 10,
|
|
109
|
+
padding: 5,
|
|
110
|
+
cursor: "pointer"
|
|
111
|
+
}}
|
|
112
|
+
onClick={props.handleRefundPolicyLink}
|
|
113
|
+
>
|
|
114
|
+
<Typography align="center" variant="caption" fontWeight={500}>
|
|
115
|
+
{props.texts.refundPolicy}
|
|
116
|
+
</Typography>
|
|
117
|
+
</a>
|
|
118
|
+
</div>
|
|
119
|
+
);
|
|
120
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { HawaTextField
|
|
3
|
-
import { Box } from "../../layout";
|
|
2
|
+
import { HawaTextField } from "../../elements";
|
|
4
3
|
import { FormProvider, useForm } from "react-hook-form";
|
|
5
|
-
import
|
|
4
|
+
import Button from "@mui/material/Button";
|
|
5
|
+
import Container from "@mui/material/Container";
|
|
6
6
|
|
|
7
7
|
export const CreditCardForm = (props) => {
|
|
8
8
|
const methods = useForm();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import Typography from "@mui/material/Typography";
|
|
3
|
+
import Container from "@mui/material/Container";
|
|
4
|
+
import Button from "@mui/material/Button";
|
|
5
5
|
|
|
6
6
|
export const PayWithWallet = (props) => {
|
|
7
7
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { HawaTextField, HawaTypography, HawaLogoButton } from "../../elements";
|
|
4
|
-
import
|
|
4
|
+
import Container from "@mui/material/Container";
|
|
5
5
|
|
|
6
6
|
export const SelectPayment = (props) => {
|
|
7
7
|
return (
|
|
@@ -2,8 +2,6 @@ import React, { useState } from "react";
|
|
|
2
2
|
import Button from "@mui/material/Button";
|
|
3
3
|
import Tooltip from "@mui/material/Tooltip";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import { StyledTooltip } from "./StyledTooltip";
|
|
6
|
-
import { getTextColor } from "../util";
|
|
7
5
|
|
|
8
6
|
export const AdaptiveButton = (props) => {
|
|
9
7
|
if (props.showText) {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
// import { styled, darken } from "@mui/material/styles";
|
|
3
2
|
import Button from "@mui/material/Button";
|
|
4
3
|
import GitHubIcon from "@mui/icons-material/GitHub";
|
|
5
4
|
import TwitterIcon from "@mui/icons-material/Twitter";
|
|
6
5
|
import WalletIcon from "@mui/icons-material/AccountBalanceWallet";
|
|
7
|
-
import
|
|
6
|
+
import Typography from "@mui/material/Typography";
|
|
8
7
|
|
|
9
8
|
export const HawaLogoButton = (props) => {
|
|
10
9
|
let logoElement = "";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MenuItem, Typography } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const HawaPopMenu = () => {
|
|
4
|
+
return (
|
|
5
|
+
<MenuItem key={setting.label} onClick={setting.action}>
|
|
6
|
+
{setting.icon && <setting.icon />}
|
|
7
|
+
<Typography textAlign="center">{setting.label}</Typography>
|
|
8
|
+
</MenuItem>
|
|
9
|
+
);
|
|
10
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Container from "@mui/material/Container";
|
|
3
|
-
import
|
|
3
|
+
import Button from "@mui/material/Button";
|
|
4
|
+
import Typography from "@mui/material/Typography";
|
|
4
5
|
import CheckIcon from "@mui/icons-material/CheckCircleOutlined";
|
|
5
6
|
export const HawaPricingCard = (props) => {
|
|
6
7
|
let isArabic = props.lang === "ar";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import InputLabel from "@mui/material/InputLabel";
|
|
3
|
+
import Select from "@mui/material/Select";
|
|
4
|
+
import Typography from "@mui/material/Typography";
|
|
5
|
+
|
|
6
|
+
export const HawaSelect = (props) => {
|
|
7
|
+
return (
|
|
8
|
+
<div style={{ width: "100%" }}>
|
|
9
|
+
<div
|
|
10
|
+
style={{
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexDirection: "row",
|
|
13
|
+
justifyContent: "space-between",
|
|
14
|
+
alignItems: "center"
|
|
15
|
+
}}
|
|
16
|
+
>
|
|
17
|
+
<InputLabel>{props.label}</InputLabel>
|
|
18
|
+
|
|
19
|
+
{props.helperText && (
|
|
20
|
+
<Typography variant="validation">{props.helperText}</Typography>
|
|
21
|
+
)}
|
|
22
|
+
</div>
|
|
23
|
+
<Select {...props}>{props.children}</Select>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -7,15 +7,20 @@ import TableHead from "@mui/material/TableHead";
|
|
|
7
7
|
import TableRow from "@mui/material/TableRow";
|
|
8
8
|
|
|
9
9
|
export const HawaTable = (props) => {
|
|
10
|
+
let isArabic = props.lang === "ar";
|
|
10
11
|
return (
|
|
11
|
-
<TableContainer>
|
|
12
|
+
<TableContainer style={{ direction: isArabic ? "rtl" : "ltr" }}>
|
|
12
13
|
<Table aria-label="a dense table">
|
|
13
14
|
<TableHead>
|
|
14
15
|
<TableRow>
|
|
15
16
|
{props.columns.map((col, i) => (
|
|
16
17
|
<TableCell
|
|
18
|
+
align={isArabic ? "right" : "left"}
|
|
19
|
+
key={i}
|
|
17
20
|
style={{ fontWeight: 700 }}
|
|
18
|
-
variant={
|
|
21
|
+
variant={
|
|
22
|
+
i > 0 ? (isArabic ? "borderedRight" : "borderedLeft") : "body"
|
|
23
|
+
}
|
|
19
24
|
>
|
|
20
25
|
{col}
|
|
21
26
|
</TableCell>
|
|
@@ -28,10 +33,17 @@ export const HawaTable = (props) => {
|
|
|
28
33
|
<TableRow key={j}>
|
|
29
34
|
{singleRow.map((r, i) => (
|
|
30
35
|
<TableCell
|
|
36
|
+
align={isArabic ? "right" : "left"}
|
|
31
37
|
key={i}
|
|
32
38
|
component="th"
|
|
33
39
|
scope="row"
|
|
34
|
-
variant={
|
|
40
|
+
variant={
|
|
41
|
+
i > 0
|
|
42
|
+
? isArabic
|
|
43
|
+
? "borderedRight"
|
|
44
|
+
: "borderedLeft"
|
|
45
|
+
: "body"
|
|
46
|
+
}
|
|
35
47
|
>
|
|
36
48
|
{r}
|
|
37
49
|
</TableCell>
|
|
@@ -43,11 +55,14 @@ export const HawaTable = (props) => {
|
|
|
43
55
|
<TableRow>
|
|
44
56
|
{props.end.map((e, k) => (
|
|
45
57
|
<TableCell
|
|
46
|
-
|
|
58
|
+
align={isArabic ? "right" : "left"}
|
|
59
|
+
style={{ fontWeight: 700 }}
|
|
47
60
|
key={k}
|
|
48
61
|
component="th"
|
|
49
62
|
scope="row"
|
|
50
|
-
variant={
|
|
63
|
+
variant={
|
|
64
|
+
k > 0 ? (isArabic ? "borderedRight" : "borderedLeft") : "body"
|
|
65
|
+
}
|
|
51
66
|
>
|
|
52
67
|
{e}
|
|
53
68
|
</TableCell>
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Input from "@mui/material/Input";
|
|
3
3
|
import InputLabel from "@mui/material/InputLabel";
|
|
4
|
-
import
|
|
4
|
+
import Typography from "@mui/material/Typography";
|
|
5
5
|
|
|
6
6
|
export const HawaTextField = (props) => {
|
|
7
7
|
return (
|
|
8
|
-
|
|
8
|
+
<div
|
|
9
|
+
style={
|
|
10
|
+
props.inForm && {
|
|
11
|
+
width: "100%"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
>
|
|
9
15
|
<div
|
|
10
16
|
style={{
|
|
11
17
|
display: "flex",
|
|
@@ -14,13 +20,13 @@ export const HawaTextField = (props) => {
|
|
|
14
20
|
alignItems: "center"
|
|
15
21
|
}}
|
|
16
22
|
>
|
|
17
|
-
<InputLabel>{props.label}</InputLabel>
|
|
23
|
+
{props.label && <InputLabel>{props.label}</InputLabel>}
|
|
18
24
|
|
|
19
25
|
{props.helperText && (
|
|
20
26
|
<Typography variant="validation">{props.helperText}</Typography>
|
|
21
27
|
)}
|
|
22
28
|
</div>
|
|
23
29
|
<Input disableUnderline {...props} />
|
|
24
|
-
|
|
30
|
+
</div>
|
|
25
31
|
);
|
|
26
32
|
};
|
package/src/elements/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export * from "./AdaptiveButton";
|
|
2
2
|
export * from "./ActionButton";
|
|
3
|
-
export * from "./HawaListItem";
|
|
4
|
-
export * from "./HawaAppBar";
|
|
5
3
|
export * from "./HawaCheckbox";
|
|
6
4
|
export * from "./HawaRadio";
|
|
7
5
|
export * from "./HawaPricingCard";
|
|
8
6
|
export * from "./HawaSettingsRow";
|
|
9
7
|
export * from "./HawaLogoButton";
|
|
10
8
|
export * from "./HawaButton";
|
|
9
|
+
export * from "./HawaSelect";
|
|
11
10
|
export * from "./HawaTextField";
|
|
12
11
|
export * from "./HawaInputLabel";
|
|
13
12
|
export * from "./HawaTypography";
|