@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.
Files changed (51) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +3 -2
  4. package/src/blocks/Account/UserProfile.js +55 -50
  5. package/src/blocks/Account/UserSettings.js +0 -1
  6. package/src/blocks/AuthForms/NewPasswordForm.js +57 -85
  7. package/src/blocks/AuthForms/ResetPasswordForm.js +43 -42
  8. package/src/blocks/AuthForms/SignInForm.js +92 -95
  9. package/src/blocks/AuthForms/SignUpForm.js +105 -104
  10. package/src/blocks/Payment/PaymentMethod.js +0 -1
  11. package/src/blocks/Payment/SelectPayment.js +53 -54
  12. package/src/index.js +0 -2
  13. package/src/layout/Box.js +36 -33
  14. package/src/stories/BlocksStories/AuthForm.stories.js +105 -39
  15. package/src/stories/BlocksStories/PaymentForm.stories.js +20 -35
  16. package/src/stories/BlocksStories/UserForm.stories.js +2 -16
  17. package/src/stories/LayoutStories/Box.stories.js +4 -10
  18. package/src/stories/UIStories/ActionButton.stories.js +1 -6
  19. package/src/stories/UIStories/AdaptiveButton.stories.js +1 -6
  20. package/src/stories/UIStories/Alert.stories.js +2 -3
  21. package/src/stories/UIStories/LogoButtons.stories.js +2 -6
  22. package/src/stories/UIStories/RadioSelector.stories.js +0 -3
  23. package/src/stories/UIStories/SettingsRow.stories.js +3 -16
  24. package/src/themes/HawaProvider.js +187 -178
  25. package/src/themes/QawaimTheme.js +199 -0
  26. package/src/ui/ActionButton.js +32 -35
  27. package/src/ui/AdaptiveButton.js +3 -8
  28. package/src/ui/HawaAlert.js +22 -24
  29. package/src/ui/HawaButton.js +43 -44
  30. package/src/ui/HawaInputLabel.js +22 -23
  31. package/src/ui/HawaLogoButton.js +7 -45
  32. package/src/ui/HawaRadio.js +23 -32
  33. package/src/ui/HawaSettingsRow.js +1 -27
  34. package/src/ui/HawaTextArea.js +1 -1
  35. package/src/ui/HawaTextField.js +146 -93
  36. package/src/ui/HawaTypography.js +19 -21
  37. package/src/ui/Row.js +1 -1
  38. package/src/ui/StyledTooltip.js +1 -1
  39. package/src/ui/TabPanel.js +1 -1
  40. package/storybook-static/8.1bf48ea7.iframe.bundle.js +1 -0
  41. package/storybook-static/iframe.html +1 -1
  42. package/storybook-static/main.b00949db.iframe.bundle.js +1 -0
  43. package/storybook-static/{runtime~main.cfefe972.iframe.bundle.js → runtime~main.f1ebae9b.iframe.bundle.js} +1 -1
  44. package/storybook-static/vendors~main.f8d30727.iframe.bundle.js +76 -0
  45. package/storybook-static/{vendors~main.aa1d952a.iframe.bundle.js.LICENSE.txt → vendors~main.f8d30727.iframe.bundle.js.LICENSE.txt} +0 -0
  46. package/storybook-static/vendors~main.f8d30727.iframe.bundle.js.map +1 -0
  47. package/src/stories/HawaProvider.stories.js +0 -22
  48. package/storybook-static/8.c4cb6081.iframe.bundle.js +0 -1
  49. package/storybook-static/main.5731dbe3.iframe.bundle.js +0 -1
  50. package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js +0 -76
  51. package/storybook-static/vendors~main.aa1d952a.iframe.bundle.js.map +0 -1
@@ -1,37 +1,35 @@
1
- import React, { useContext } from "react";
2
- import { ThemeProvider } from "../themes/HawaProvider";
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 { hawaTheme, themeName } = useContext(ThemeProvider);
10
- const currentTheme = Object.keys(hawaTheme.alerts).find(
11
- (tName) => tName.toLowerCase() === themeName?.toLowerCase()
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
- alertStyle = {
17
- ...hawaTheme.alerts[currentTheme]
18
- };
19
- } else {
20
- alertStyle = {
21
- marginBottom: 10
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
- return {
27
- ...alertStyle
28
- };
29
- });
23
+ // const StyledAlert = styled(Alert)(({ theme }) => {
24
+ // return {
25
+ // ...alertStyle
26
+ // };
27
+ // });
30
28
 
31
29
  return (
32
- <StyledAlert {...props}>
30
+ <Alert>
33
31
  {props.title && <AlertTitle>{props.title}</AlertTitle>}
34
32
  {props.text}
35
- </StyledAlert>
33
+ </Alert>
36
34
  );
37
35
  };
@@ -1,48 +1,47 @@
1
- import React, { useContext } from "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
- const { hawaTheme, themeName } = useContext(ThemeProvider);
8
- let buttonStyle = {};
9
- let currentTheme = Object.keys(hawaTheme.actionButton).find(
10
- (tName) => tName.toLowerCase() === themeName?.toLowerCase()
11
- );
12
- if (currentTheme) {
13
- buttonStyle = {
14
- ...hawaTheme.actionButton[currentTheme],
15
- // marginTop: theme.actionButton[currentTheme].margin,
16
- border: props.outlined ? "2px solid black" : "none",
17
- // borderRadius: theme.actionButton[currentTheme].borderRadius,
18
- backgroundColor: "white",
19
- // height: 50,
20
- "&:hover": {
21
- backgroundColor: darken("#ffffff", 0.1)
22
- }
23
- };
24
- } else {
25
- // Default theme
26
- buttonStyle = {
27
- cursor: "pointer",
28
- display: "flex",
29
- flexDirection: "row",
30
- alignItems: "center",
31
- justifyContent: "center",
32
- marginTop: hawaTheme.actionButton[currentTheme]?.margin,
33
- border: props.outlined ? "2px solid black" : "none",
34
- borderRadius: 0,
35
- //backgroundColor: "white",
36
- backgroundColor: "red",
37
- "&:hover": {
38
- backgroundColor: darken("#ffffff", 0.1)
39
- }
40
- };
41
- }
42
- const StyledButton = styled(Button)(({ theme }) => {
43
- return {
44
- ...buttonStyle
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
  };
@@ -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
- const { hawaTheme, themeName } = useContext(ThemeProvider);
7
- let labelStyle = {};
4
+ // let labelStyle = {};
8
5
 
9
- let currentTheme = Object.keys(hawaTheme.actionButton).find(
10
- (tName) => tName.toLowerCase() === themeName?.toLowerCase()
11
- );
12
- if (currentTheme) {
13
- labelStyle = {
14
- margin: 15,
15
- marginRight: 5,
16
- marginLeft: 5,
17
- color: hawaTheme?.layout[currentTheme].color
18
- };
19
- } else {
20
- labelStyle = {
21
- margin: 15,
22
- marginRight: 0,
23
- marginLeft: 0,
24
- color: "black"
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 style={labelStyle}>
25
+ <InputLabel
26
+ // style={labelStyle}
27
+ >
29
28
  <div style={{ fontSize: 15 }}>{props.label}</div>
30
29
  </InputLabel>
31
30
  );
@@ -1,50 +1,12 @@
1
- import React, { useContext } from "react";
2
- import { ThemeProvider } from "../themes/HawaProvider";
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
- <StyledButton {...props}>
83
+ <Button {...props} variant="withLogo">
122
84
  {logoElement}
123
85
  <div style={{ width: 10 }} />
124
- <p
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
- </p>
136
- </StyledButton>
97
+ </Typography>
98
+ </Button>
137
99
  );
138
100
  };
@@ -1,40 +1,31 @@
1
1
  import { Typography } from "@mui/material";
2
- import React, { useState, useContext } from "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
- const [value, setValue] = useState(props.defaultValue);
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
- const { hawaTheme, themeName } = useContext(ThemeProvider);
10
- const currentTheme = Object.keys(hawaTheme.radioSelector).find(
11
- (tName) => tName.toLowerCase() === themeName?.toLowerCase()
12
- );
13
- let radioSelectorStyle = {};
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, { useContext } from "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>
@@ -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%",
@@ -1,107 +1,160 @@
1
- import React, { useContext } 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 { ThemeProvider } from "../themes/HawaProvider";
7
- import { HawaInputLabel } from "./HawaInputLabel";
8
- import { Controller, useFormContext } from "react-hook-form";
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 { hawaTheme, themeName } = useContext(ThemeProvider);
14
- const currentTheme = Object.keys(hawaTheme.inputFields).find(
15
- (tName) => tName.toLowerCase() === themeName?.toLowerCase()
16
- );
17
- let textFieldStyle = {};
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
- if (currentTheme) {
20
- textFieldStyle = {
21
- ...hawaTheme.inputFields[currentTheme],
22
- margin: props.last ? 0 : hawaTheme.inputFields[currentTheme].margin,
23
- marginTop: props.last ? hawaTheme.inputFields[currentTheme].margin * 2 : 0
24
- };
25
- } else {
26
- textFieldStyle = {
27
- backgroundColor: "white"
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
- const StyledTextField = styled(InputBase)(({ theme }) => {
32
- return {
33
- // "label + &": {
34
- // marginTop: theme.spacing(3)
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
- // backgroundColor: "red"
45
- },
81
+ // // paddingLeft: 10,
82
+ // // paddingRight: 10,
83
+ // // border: "none"
46
84
 
47
- // position: "relative",
48
- border: "1px solid #ced4da",
49
- fontSize: 16,
50
- // width: "auto",
51
- padding: "10px 12px",
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
- <Controller
62
- render={({ field }) => (
63
- <>
64
- {props.inputLabel && <HawaInputLabel label={props.inputLabel} />}
92
+ <>
93
+ <InputLabel>{props.label}</InputLabel>
94
+ <Input disableUnderline {...props} />
95
+ </>
96
+ // <FormControl variant="hawa" style={{ marginTop: 10 }}>
65
97
 
66
- <StyledTextField
67
- fullWidth={true}
68
- // helperText={props.helperText}
69
- type={props.type ?? "text"}
70
- // placeholder={props.placeholder}
71
- // inputProps={
72
- // props.type === "number"
73
- // ? {
74
- // inputMode: "numeric",
75
- // min: "0",
76
- // max: "9999999",
77
- // step: "0.01"
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
- defaultValue={props.defaultValue && ""}
83
- value={props.value && ""}
84
- {...props}
85
- // {...field}
86
- {...register(props.name)}
87
- />
88
- <Typography
89
- variant="caption"
90
- style={{ margin: 5, marginBottom: 0, color: "red" }}
91
- >
92
- {props.helperText}
93
- </Typography>
94
- </>
95
- )}
96
- name={props.name}
97
- rules={props.rules}
98
- control={control}
99
- shouldUnregister={props.shouldUnregister}
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
- type: PropTypes.oneOf(["text", "number", "password"]),
106
- helperText: PropTypes.string
107
- };
157
+ // HawaTextField.propTypes = {
158
+ // type: PropTypes.oneOf(["text", "number", "password"]),
159
+ // helperText: PropTypes.string
160
+ // };