@sikka/hawa 0.0.10 → 0.0.11
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 +3 -2
- package/src/blocks/Account/UserProfile.js +55 -50
- package/src/blocks/Account/UserSettings.js +0 -1
- package/src/blocks/AuthForms/NewPasswordForm.js +57 -85
- package/src/blocks/AuthForms/ResetPasswordForm.js +43 -42
- package/src/blocks/AuthForms/SignInForm.js +92 -95
- package/src/blocks/AuthForms/SignUpForm.js +105 -104
- package/src/blocks/Payment/PaymentMethod.js +0 -1
- package/src/blocks/Payment/SelectPayment.js +53 -54
- package/src/index.js +0 -2
- package/src/layout/Box.js +36 -33
- package/src/stories/BlocksStories/AuthForm.stories.js +105 -39
- package/src/stories/BlocksStories/PaymentForm.stories.js +20 -35
- package/src/stories/BlocksStories/UserForm.stories.js +2 -16
- package/src/stories/LayoutStories/Box.stories.js +4 -10
- package/src/stories/UIStories/ActionButton.stories.js +1 -6
- package/src/stories/UIStories/AdaptiveButton.stories.js +1 -6
- package/src/stories/UIStories/Alert.stories.js +2 -3
- package/src/stories/UIStories/LogoButtons.stories.js +2 -6
- package/src/stories/UIStories/RadioSelector.stories.js +0 -3
- package/src/stories/UIStories/SettingsRow.stories.js +3 -16
- package/src/themes/HawaProvider.js +187 -178
- package/src/themes/QawaimTheme.js +199 -0
- package/src/ui/ActionButton.js +32 -35
- package/src/ui/AdaptiveButton.js +3 -8
- package/src/ui/HawaAlert.js +22 -24
- package/src/ui/HawaButton.js +43 -44
- package/src/ui/HawaInputLabel.js +22 -23
- package/src/ui/HawaLogoButton.js +7 -45
- package/src/ui/HawaRadio.js +23 -32
- package/src/ui/HawaSettingsRow.js +1 -27
- package/src/ui/HawaTextArea.js +1 -1
- package/src/ui/HawaTextField.js +146 -93
- package/src/ui/HawaTypography.js +19 -21
- package/src/ui/Row.js +1 -1
- package/src/ui/StyledTooltip.js +1 -1
- package/src/ui/TabPanel.js +1 -1
- package/storybook-static/8.1bf48ea7.iframe.bundle.js +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.b00949db.iframe.bundle.js +1 -0
- package/storybook-static/{runtime~main.cfefe972.iframe.bundle.js → runtime~main.f1ebae9b.iframe.bundle.js} +1 -1
- package/storybook-static/vendors~main.f8d30727.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.aa1d952a.iframe.bundle.js.LICENSE.txt → vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.f8d30727.iframe.bundle.js.map +1 -0
- package/src/stories/HawaProvider.stories.js +0 -22
- package/storybook-static/8.c4cb6081.iframe.bundle.js +0 -1
- package/storybook-static/main.5731dbe3.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js.map +0 -1
package/src/ui/HawaAlert.js
CHANGED
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
import { styled } from "@mui/material/styles";
|
|
1
|
+
import React from "react";
|
|
2
|
+
// import { styled } from "@mui/material/styles";
|
|
4
3
|
|
|
5
4
|
import Alert from "@mui/material/Alert";
|
|
6
5
|
import AlertTitle from "@mui/material/AlertTitle";
|
|
7
6
|
|
|
8
7
|
export const HawaAlert = (props) => {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
let alertStyle = {};
|
|
8
|
+
// const currentTheme = Object.keys(hawaTheme.alerts).find(
|
|
9
|
+
// (tName) => tName.toLowerCase() === themeName?.toLowerCase()
|
|
10
|
+
// );
|
|
11
|
+
// let alertStyle = {};
|
|
14
12
|
|
|
15
|
-
if (currentTheme) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} else {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
13
|
+
// if (currentTheme) {
|
|
14
|
+
// alertStyle = {
|
|
15
|
+
// ...hawaTheme.alerts[currentTheme]
|
|
16
|
+
// };
|
|
17
|
+
// } else {
|
|
18
|
+
// alertStyle = {
|
|
19
|
+
// marginBottom: 10
|
|
20
|
+
// };
|
|
21
|
+
// }
|
|
24
22
|
|
|
25
|
-
const StyledAlert = styled(Alert)(({ theme }) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
23
|
+
// const StyledAlert = styled(Alert)(({ theme }) => {
|
|
24
|
+
// return {
|
|
25
|
+
// ...alertStyle
|
|
26
|
+
// };
|
|
27
|
+
// });
|
|
30
28
|
|
|
31
29
|
return (
|
|
32
|
-
<
|
|
30
|
+
<Alert>
|
|
33
31
|
{props.title && <AlertTitle>{props.title}</AlertTitle>}
|
|
34
32
|
{props.text}
|
|
35
|
-
</
|
|
33
|
+
</Alert>
|
|
36
34
|
);
|
|
37
35
|
};
|
package/src/ui/HawaButton.js
CHANGED
|
@@ -1,48 +1,47 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { ThemeProvider } from "../themes/HawaProvider";
|
|
3
|
-
import { styled, darken } from "@mui/material/styles";
|
|
1
|
+
import React from "react";
|
|
2
|
+
// import { ThemeProvider } from "../themes/HawaProvider";
|
|
3
|
+
// import { styled, darken } from "@mui/material/styles";
|
|
4
4
|
import Button from "@mui/material/Button";
|
|
5
5
|
|
|
6
6
|
export const HawaButton = (props) => {
|
|
7
|
-
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
return <StyledButton {...props}>{props.children}</StyledButton>;
|
|
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
|
+
return <Button {...props}>{props.children}</Button>;
|
|
48
47
|
};
|
package/src/ui/HawaInputLabel.js
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import InputLabel from "@mui/material/InputLabel";
|
|
2
|
-
import { useContext } from "react";
|
|
3
|
-
import { ThemeProvider } from "../themes/HawaProvider";
|
|
4
2
|
|
|
5
3
|
export const HawaInputLabel = (props) => {
|
|
6
|
-
|
|
7
|
-
let labelStyle = {};
|
|
4
|
+
// let labelStyle = {};
|
|
8
5
|
|
|
9
|
-
let currentTheme = Object.keys(hawaTheme.actionButton).find(
|
|
10
|
-
|
|
11
|
-
);
|
|
12
|
-
if (currentTheme) {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} else {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
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
|
+
// }
|
|
27
24
|
return (
|
|
28
|
-
<InputLabel
|
|
25
|
+
<InputLabel
|
|
26
|
+
// style={labelStyle}
|
|
27
|
+
>
|
|
29
28
|
<div style={{ fontSize: 15 }}>{props.label}</div>
|
|
30
29
|
</InputLabel>
|
|
31
30
|
);
|
package/src/ui/HawaLogoButton.js
CHANGED
|
@@ -1,50 +1,12 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
import { styled, darken } from "@mui/material/styles";
|
|
1
|
+
import React from "react";
|
|
2
|
+
// import { styled, darken } from "@mui/material/styles";
|
|
4
3
|
import Button from "@mui/material/Button";
|
|
5
4
|
import GitHubIcon from "@mui/icons-material/GitHub";
|
|
6
5
|
import TwitterIcon from "@mui/icons-material/Twitter";
|
|
7
6
|
import WalletIcon from "@mui/icons-material/AccountBalanceWallet";
|
|
7
|
+
import { Typography } from "@mui/material";
|
|
8
8
|
|
|
9
9
|
export const HawaLogoButton = (props) => {
|
|
10
|
-
const { hawaTheme, themeName } = useContext(ThemeProvider);
|
|
11
|
-
let buttonStyle = {};
|
|
12
|
-
let currentTheme = Object.keys(hawaTheme.logoButton).find(
|
|
13
|
-
(tName) => tName.toLowerCase() === themeName?.toLowerCase()
|
|
14
|
-
);
|
|
15
|
-
if (currentTheme) {
|
|
16
|
-
buttonStyle = {
|
|
17
|
-
...hawaTheme.logoButton[currentTheme],
|
|
18
|
-
backgroundColor: "white",
|
|
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: 10,
|
|
32
|
-
height: 50,
|
|
33
|
-
padding: 30,
|
|
34
|
-
paddingTop: 0,
|
|
35
|
-
paddingBottom: 0,
|
|
36
|
-
border: "1px solid #ced4da",
|
|
37
|
-
backgroundColor: "white",
|
|
38
|
-
"&:hover": {
|
|
39
|
-
backgroundColor: darken("#ffffff", 0.1)
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
const StyledButton = styled(Button)(({ theme }) => {
|
|
44
|
-
return {
|
|
45
|
-
...buttonStyle
|
|
46
|
-
};
|
|
47
|
-
});
|
|
48
10
|
let logoElement = "";
|
|
49
11
|
switch (props.logo?.toLowerCase()) {
|
|
50
12
|
case "google":
|
|
@@ -118,10 +80,10 @@ export const HawaLogoButton = (props) => {
|
|
|
118
80
|
break;
|
|
119
81
|
}
|
|
120
82
|
return (
|
|
121
|
-
<
|
|
83
|
+
<Button {...props} variant="withLogo">
|
|
122
84
|
{logoElement}
|
|
123
85
|
<div style={{ width: 10 }} />
|
|
124
|
-
<
|
|
86
|
+
<Typography
|
|
125
87
|
style={{
|
|
126
88
|
color: "black",
|
|
127
89
|
fontSize: 14,
|
|
@@ -132,7 +94,7 @@ export const HawaLogoButton = (props) => {
|
|
|
132
94
|
}}
|
|
133
95
|
>
|
|
134
96
|
{props.buttonText}
|
|
135
|
-
</
|
|
136
|
-
</
|
|
97
|
+
</Typography>
|
|
98
|
+
</Button>
|
|
137
99
|
);
|
|
138
100
|
};
|
package/src/ui/HawaRadio.js
CHANGED
|
@@ -1,40 +1,31 @@
|
|
|
1
1
|
import { Typography } from "@mui/material";
|
|
2
|
-
import React
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { Box } from "../layout";
|
|
4
|
-
import { ThemeProvider } from "../themes/HawaProvider";
|
|
5
4
|
|
|
6
5
|
export const HawaRadio = (props) => {
|
|
7
|
-
|
|
6
|
+
// if (currentTheme) {
|
|
7
|
+
// radioSelectorStyle = {
|
|
8
|
+
// ...hawaTheme.radioSelector[currentTheme],
|
|
9
|
+
// "-moz-user-select": "-moz-none",
|
|
10
|
+
// "-khtml-user-select": "none",
|
|
11
|
+
// "-webkit-user-select": "none",
|
|
12
|
+
// "-ms-user-select": "none",
|
|
13
|
+
// "user-select": "none"
|
|
14
|
+
// };
|
|
15
|
+
// } else {
|
|
16
|
+
// radioSelectorStyle = {
|
|
17
|
+
// display: "flex",
|
|
18
|
+
// flexDirection: "row",
|
|
19
|
+
// justifyContent: "space-between",
|
|
20
|
+
// alignItems: "center",
|
|
21
|
+
// backgroundColor: "#F5F5F5",
|
|
22
|
+
// margin: 0,
|
|
8
23
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (currentTheme) {
|
|
16
|
-
radioSelectorStyle = {
|
|
17
|
-
...hawaTheme.radioSelector[currentTheme],
|
|
18
|
-
"-moz-user-select": "-moz-none",
|
|
19
|
-
"-khtml-user-select": "none",
|
|
20
|
-
"-webkit-user-select": "none",
|
|
21
|
-
"-ms-user-select": "none",
|
|
22
|
-
"user-select": "none"
|
|
23
|
-
};
|
|
24
|
-
} else {
|
|
25
|
-
radioSelectorStyle = {
|
|
26
|
-
display: "flex",
|
|
27
|
-
flexDirection: "row",
|
|
28
|
-
justifyContent: "space-between",
|
|
29
|
-
alignItems: "center",
|
|
30
|
-
backgroundColor: "#F5F5F5",
|
|
31
|
-
margin: 0,
|
|
32
|
-
|
|
33
|
-
backgroundColor: "lightGrey",
|
|
34
|
-
color: "black",
|
|
35
|
-
padding: 10
|
|
36
|
-
};
|
|
37
|
-
}
|
|
24
|
+
// backgroundColor: "lightGrey",
|
|
25
|
+
// color: "black",
|
|
26
|
+
// padding: 10
|
|
27
|
+
// };
|
|
28
|
+
// }
|
|
38
29
|
|
|
39
30
|
return (
|
|
40
31
|
<Box horizontal maxWidth={"fit-content"}>
|
|
@@ -1,38 +1,12 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
-
import { ThemeProvider } from "../themes/HawaProvider";
|
|
5
4
|
import { Box } from "../layout";
|
|
6
5
|
import Checkbox from "@mui/material/Checkbox";
|
|
7
6
|
import TextField from "@mui/material/TextField";
|
|
8
7
|
import { HawaTypography } from "./HawaTypography";
|
|
9
8
|
export const HawaSettingsRow = (props) => {
|
|
10
|
-
const { hawaTheme, themeName } = useContext(ThemeProvider);
|
|
11
|
-
const currentTheme = Object.keys(hawaTheme.settingsRow).find(
|
|
12
|
-
(tName) => tName.toLowerCase() === themeName?.toLowerCase()
|
|
13
|
-
);
|
|
14
|
-
let settingsRowStyle = {};
|
|
15
|
-
|
|
16
|
-
if (currentTheme) {
|
|
17
|
-
settingsRowStyle = {
|
|
18
|
-
...hawaTheme.settingsRow[currentTheme],
|
|
19
|
-
margin: props.last ? 0 : hawaTheme.settingsRow[currentTheme].margin,
|
|
20
|
-
marginTop: props.last ? hawaTheme.settingsRow[currentTheme].margin * 2 : 0
|
|
21
|
-
};
|
|
22
|
-
} else {
|
|
23
|
-
settingsRowStyle = {
|
|
24
|
-
display: "flex",
|
|
25
|
-
flexDirection: "row",
|
|
26
|
-
justifyContent: "space-between",
|
|
27
|
-
alignItems: "center",
|
|
28
|
-
backgroundColor: "#F5F5F5",
|
|
29
|
-
margin: 0,
|
|
30
9
|
|
|
31
|
-
backgroundColor: "lightGrey",
|
|
32
|
-
color: "black",
|
|
33
|
-
padding: 10
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
10
|
|
|
37
11
|
return (
|
|
38
12
|
<Box noColor>
|
package/src/ui/HawaTextArea.js
CHANGED
|
@@ -15,7 +15,7 @@ export const HawaTextArea = (props) => {
|
|
|
15
15
|
style={{
|
|
16
16
|
color: "black",
|
|
17
17
|
backgroundColor: props.bgColor || "white",
|
|
18
|
-
borderRadius: props.bdRadius || 10,
|
|
18
|
+
// borderRadius: props.bdRadius || 10,
|
|
19
19
|
borderBottom: "none",
|
|
20
20
|
border: "none",
|
|
21
21
|
width: "100%",
|
package/src/ui/HawaTextField.js
CHANGED
|
@@ -1,107 +1,160 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import InputBase from "@mui/material/InputBase";
|
|
3
|
-
import Typography from "@mui/material/Typography";
|
|
4
|
-
import { styled } from "@mui/material/styles";
|
|
5
|
-
import PropTypes from "prop-types";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
// import InputBase from "@mui/material/InputBase";
|
|
3
|
+
// import Typography from "@mui/material/Typography";
|
|
4
|
+
// import { styled } from "@mui/material/styles";
|
|
5
|
+
// import PropTypes from "prop-types";
|
|
6
|
+
// import { HawaInputLabel } from "./HawaInputLabel";
|
|
7
|
+
// import { Controller, useFormContext } from "react-hook-form";
|
|
8
|
+
import Input from "@mui/material/Input";
|
|
9
|
+
import InputLabel from "@mui/material/InputLabel";
|
|
9
10
|
|
|
10
11
|
export const HawaTextField = (props) => {
|
|
11
|
-
const { control, register } = useFormContext();
|
|
12
|
+
// const { control, register } = useFormContext();
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
// const currentTheme = Object.keys(hawaTheme.inputFields).find(
|
|
15
|
+
// (tName) => tName.toLowerCase() === themeName?.toLowerCase()
|
|
16
|
+
// );
|
|
17
|
+
// let textFieldStyle = {};
|
|
18
|
+
|
|
19
|
+
// if (currentTheme) {
|
|
20
|
+
// textFieldStyle = {
|
|
21
|
+
// ...hawaTheme.inputFields[currentTheme],
|
|
22
|
+
// margin: props.last ? 0 : hawaTheme.inputFields[currentTheme].margin,
|
|
23
|
+
// marginTop: props.last
|
|
24
|
+
// ? hawaTheme.inputFields[currentTheme].margin * 2
|
|
25
|
+
// : 0,
|
|
26
|
+
// };
|
|
27
|
+
// } else {
|
|
28
|
+
// textFieldStyle = {
|
|
29
|
+
// backgroundColor: "white"
|
|
30
|
+
// };
|
|
31
|
+
// }
|
|
32
|
+
|
|
33
|
+
// const StyledTextField = styled(InputBase)(({ theme }) => {
|
|
34
|
+
// return {
|
|
35
|
+
// // "& .MuiInputBase-input": {
|
|
36
|
+
// // // border: "1px solid #ced4da",
|
|
37
|
+
// // fontSize: 16,
|
|
38
|
+
// // // padding: "10px 12px",
|
|
39
|
+
// // marginBottom: props.helperText ? 5 : 0,
|
|
40
|
+
// // // paddingLeft: 10,
|
|
41
|
+
// // // paddingRight: 10,
|
|
42
|
+
// // ...textFieldStyle
|
|
43
|
+
// // },
|
|
44
|
+
// // "& .MuiInputBase-root": {
|
|
45
|
+
// // border: "1px solid #ced4da",
|
|
46
|
+
// // fontSize: 16,
|
|
47
|
+
// // // width: "auto",
|
|
48
|
+
// // // padding: "10px 12px",
|
|
49
|
+
// // marginBottom: props.helperText ? 5 : 0,
|
|
50
|
+
// // // paddingLeft: 10,
|
|
51
|
+
// // // paddingRight: 10,
|
|
18
52
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
53
|
+
// // // ...textFieldStyle,
|
|
54
|
+
// // backgroundColor: "blue"
|
|
55
|
+
// // // "&:focus": {
|
|
56
|
+
// // // borderColor: "red",
|
|
57
|
+
// // // borderWidth: 1,
|
|
58
|
+
// // // outline: "1px solid black",
|
|
59
|
+
// // // backgroundColor: "red"
|
|
60
|
+
// // // }
|
|
61
|
+
// // // "& input:valid + fieldset": {
|
|
62
|
+
// // // borderColor: "green",
|
|
63
|
+
// // // borderWidth: 2
|
|
64
|
+
// // // },
|
|
65
|
+
// // // "& input:invalid + fieldset": {
|
|
66
|
+
// // // borderColor: "red",
|
|
67
|
+
// // // borderWidth: 2
|
|
68
|
+
// // // },
|
|
69
|
+
// // // "& input:valid:focus + fieldset": {
|
|
70
|
+
// // // borderLeftWidth: 6,
|
|
71
|
+
// // // padding: "4px !important" // override inline-style
|
|
72
|
+
// // // }
|
|
73
|
+
// // },
|
|
30
74
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"& .MuiInputBase-input": {
|
|
37
|
-
// backgroundColor: theme.palette.mode === "light" ? "#fcfcfb" : "#2b2b2b",
|
|
38
|
-
transition: theme.transitions.create([
|
|
39
|
-
"border-color",
|
|
40
|
-
"background-color",
|
|
41
|
-
"box-shadow"
|
|
42
|
-
])
|
|
75
|
+
// // "&:hover": {
|
|
76
|
+
// // borderColor: "red",
|
|
77
|
+
// // borderWidth: 1,
|
|
78
|
+
// // outline: "1px solid black"
|
|
79
|
+
// // },
|
|
43
80
|
|
|
44
|
-
|
|
45
|
-
|
|
81
|
+
// // paddingLeft: 10,
|
|
82
|
+
// // paddingRight: 10,
|
|
83
|
+
// // border: "none"
|
|
46
84
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
marginBottom: props.helperText ? 5 : 0,
|
|
53
|
-
paddingLeft: 10,
|
|
54
|
-
paddingRight: 10,
|
|
55
|
-
...textFieldStyle
|
|
56
|
-
// backgroundColor: "green"
|
|
57
|
-
};
|
|
58
|
-
});
|
|
85
|
+
// // position: "relative",
|
|
86
|
+
// // backgroundColor: "green"
|
|
87
|
+
// ...textFieldStyle
|
|
88
|
+
// };
|
|
89
|
+
// });
|
|
59
90
|
|
|
60
91
|
return (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
92
|
+
<>
|
|
93
|
+
<InputLabel>{props.label}</InputLabel>
|
|
94
|
+
<Input disableUnderline {...props} />
|
|
95
|
+
</>
|
|
96
|
+
// <FormControl variant="hawa" style={{ marginTop: 10 }}>
|
|
65
97
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
98
|
+
// </FormControl>
|
|
99
|
+
// <TextField
|
|
100
|
+
// fullWidth
|
|
101
|
+
// type="text"
|
|
102
|
+
// // inputProps={{
|
|
103
|
+
// // shrink: true
|
|
104
|
+
// // }}
|
|
105
|
+
// // InputProps={{
|
|
106
|
+
// // disableUnderline: true,
|
|
107
|
+
// // shrink: true
|
|
108
|
+
// // }}
|
|
109
|
+
// InputLabelProps={{
|
|
110
|
+
// shrink: true
|
|
111
|
+
// }}
|
|
112
|
+
// {...props}
|
|
113
|
+
// />
|
|
114
|
+
// <Controller
|
|
115
|
+
// render={({ field }) => (
|
|
116
|
+
// <>
|
|
117
|
+
// {props.inputLabel && <InputLabel label={props.inputLabel} />}
|
|
81
118
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
119
|
+
// <TextField
|
|
120
|
+
// fullWidth={true}
|
|
121
|
+
// // helperText={props.helperText}
|
|
122
|
+
// type={props.type ?? "text"}
|
|
123
|
+
// // placeholder={props.placeholder}
|
|
124
|
+
// // inputProps={
|
|
125
|
+
// // props.type === "number"
|
|
126
|
+
// // ? {
|
|
127
|
+
// // inputMode: "numeric",
|
|
128
|
+
// // min: "0",
|
|
129
|
+
// // max: "9999999",
|
|
130
|
+
// // step: "0.01"
|
|
131
|
+
// // }
|
|
132
|
+
// // : {}
|
|
133
|
+
// // }
|
|
134
|
+
|
|
135
|
+
// defaultValue={props.defaultValue && ""}
|
|
136
|
+
// value={props.value && ""}
|
|
137
|
+
// {...props}
|
|
138
|
+
// // {...field}
|
|
139
|
+
// {...register(props.name)}
|
|
140
|
+
// />
|
|
141
|
+
// <Typography
|
|
142
|
+
// variant="caption"
|
|
143
|
+
// style={{ margin: 5, marginBottom: 0, color: "red" }}
|
|
144
|
+
// >
|
|
145
|
+
// {props.helperText}
|
|
146
|
+
// </Typography>
|
|
147
|
+
// </>
|
|
148
|
+
// )}
|
|
149
|
+
// name={props.name}
|
|
150
|
+
// rules={props.rules}
|
|
151
|
+
// control={control}
|
|
152
|
+
// shouldUnregister={props.shouldUnregister}
|
|
153
|
+
// />
|
|
101
154
|
);
|
|
102
155
|
};
|
|
103
156
|
|
|
104
|
-
HawaTextField.propTypes = {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
};
|
|
157
|
+
// HawaTextField.propTypes = {
|
|
158
|
+
// type: PropTypes.oneOf(["text", "number", "password"]),
|
|
159
|
+
// helperText: PropTypes.string
|
|
160
|
+
// };
|