@sikka/hawa 0.0.19 → 0.0.20
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 +208 -62
- 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/elements/AdaptiveButton.js +0 -2
- package/src/elements/HawaListItem.js +2 -1
- package/src/elements/HawaLogoButton.js +1 -2
- 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 -0
- package/src/layout/HawaDialog.js +5 -7
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.13189777.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.4ff76500.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.ae39b38c.iframe.bundle.js.LICENSE.txt → vendors~main.4ff76500.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.4ff76500.iframe.bundle.js.map +1 -0
- 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,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,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import ListItemText from "@mui/material/ListItemButton";
|
|
3
|
+
import ListItemButton from "@mui/material/ListItemText";
|
|
3
4
|
import InboxIcon from "@mui/icons-material/MoveToInbox";
|
|
4
5
|
|
|
5
6
|
export const HawaListItem = (props) => {
|
|
@@ -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 = "";
|
|
@@ -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
|
@@ -8,6 +8,7 @@ export * from "./HawaPricingCard";
|
|
|
8
8
|
export * from "./HawaSettingsRow";
|
|
9
9
|
export * from "./HawaLogoButton";
|
|
10
10
|
export * from "./HawaButton";
|
|
11
|
+
export * from "./HawaSelect";
|
|
11
12
|
export * from "./HawaTextField";
|
|
12
13
|
export * from "./HawaInputLabel";
|
|
13
14
|
export * from "./HawaTypography";
|
package/src/layout/HawaDialog.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import CloseIcon from "@mui/icons-material/Close";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
IconButton
|
|
8
|
-
} from "@mui/material";
|
|
2
|
+
import Dialog from "@mui/material/Dialog";
|
|
3
|
+
import DialogActions from "@mui/material/DialogActions";
|
|
4
|
+
import DialogContent from "@mui/material/DialogContent";
|
|
5
|
+
import DialogTitle from "@mui/material/DialogTitle";
|
|
6
|
+
import IconButton from "@mui/material/IconButton";
|
|
9
7
|
import React, { useState } from "react";
|
|
10
8
|
|
|
11
9
|
const BootstrapDialogTitle = (props) => {
|
|
@@ -345,4 +345,4 @@
|
|
|
345
345
|
|
|
346
346
|
|
|
347
347
|
|
|
348
|
-
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.708d7ac1.iframe.bundle.js"></script><script src="vendors~main.
|
|
348
|
+
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:[\\\\/](?!\\.)(?:(?:(?!(?:^|[\\\\/])\\.).)*?)[\\\\/]|[\\\\/]|$)(?!\\.)(?=.)[^\\\\/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.708d7ac1.iframe.bundle.js"></script><script src="vendors~main.4ff76500.iframe.bundle.js"></script><script src="main.13189777.iframe.bundle.js"></script></body></html>
|