@sikka/hawa 0.0.52 → 0.0.54

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 (34) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +1 -1
  4. package/src/elements/DragDropImages.js +34 -28
  5. package/src/elements/HawaAccordian.js +0 -16
  6. package/src/elements/HawaColorPicker.js +3 -4
  7. package/src/elements/HawaPhoneInput.js +2 -6
  8. package/src/elements/HawaPopMenu.js +82 -38
  9. package/src/elements/HawaRange.js +28 -12
  10. package/src/elements/HawaSearchBar.js +5 -7
  11. package/src/elements/HawaTypography.js +1 -2
  12. package/src/elements/PinInput.js +14 -22
  13. package/src/elements/RadioBox.js +27 -27
  14. package/src/elements/SelectedField.js +43 -43
  15. package/src/elements/TabPanel.js +13 -16
  16. package/src/layout/HawaAppLayout.js +238 -238
  17. package/src/layout/HawaAppLayout2.js +239 -239
  18. package/src/layout/index.js +1 -1
  19. package/storybook-static/{1.1afe453d.iframe.bundle.js → 1.c5cb37d9.iframe.bundle.js} +0 -0
  20. package/storybook-static/{2.e7f8eecc.iframe.bundle.js → 2.c8f6dc2b.iframe.bundle.js} +0 -0
  21. package/storybook-static/{6.b22bfe7f.iframe.bundle.js → 6.98a925e3.iframe.bundle.js} +3 -3
  22. package/storybook-static/{6.b22bfe7f.iframe.bundle.js.LICENSE.txt → 6.98a925e3.iframe.bundle.js.LICENSE.txt} +0 -0
  23. package/storybook-static/6.98a925e3.iframe.bundle.js.map +1 -0
  24. package/storybook-static/iframe.html +1 -1
  25. package/storybook-static/main.e8596a39.iframe.bundle.js +1 -0
  26. package/storybook-static/project.json +1 -1
  27. package/storybook-static/{runtime~main.0e8a2888.iframe.bundle.js → runtime~main.e7e3ab5b.iframe.bundle.js} +1 -1
  28. package/storybook-static/vendors~main.f32ea22a.iframe.bundle.js +76 -0
  29. package/storybook-static/{vendors~main.db6a4c38.iframe.bundle.js.LICENSE.txt → vendors~main.f32ea22a.iframe.bundle.js.LICENSE.txt} +0 -10
  30. package/storybook-static/vendors~main.f32ea22a.iframe.bundle.js.map +1 -0
  31. package/storybook-static/6.b22bfe7f.iframe.bundle.js.map +0 -1
  32. package/storybook-static/main.c2f37ee9.iframe.bundle.js +0 -1
  33. package/storybook-static/vendors~main.db6a4c38.iframe.bundle.js +0 -76
  34. package/storybook-static/vendors~main.db6a4c38.iframe.bundle.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "description": "UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -1,11 +1,7 @@
1
1
  import React, { useEffect, useState } from "react";
2
- // import axios from "axios";
3
2
  import { useDropzone } from "react-dropzone";
4
- import CloseIcon from "@mui/icons-material/Close";
5
- // import styled from "@emotion/styled";
6
- import { Button, Container, IconButton, Typography } from "@mui/material";
7
- import { useTheme } from "@mui/system";
8
3
  import { HawaAlert } from "./HawaAlert";
4
+ import { HawaButton } from "./HawaButton";
9
5
 
10
6
  const thumbsContainer = {
11
7
  display: "flex",
@@ -33,7 +29,6 @@ export const DragDropImages = ({
33
29
  const [cmp, setCmp] = useState(0);
34
30
  const [max, setMax] = useState(0);
35
31
  //const [thumbs, setThumbs] = useState("");
36
- const theme = useTheme();
37
32
  const {
38
33
  getRootProps,
39
34
  getInputProps,
@@ -95,26 +90,33 @@ export const DragDropImages = ({
95
90
  });
96
91
  const thumbs = files?.map((file, index) => (
97
92
  <div style={{ position: "relative", margin: 10 }}>
98
- <IconButton
93
+ <button
99
94
  onClick={(e) => {
100
95
  e.stopPropagation();
101
96
  acceptedFiles.splice(acceptedFiles.indexOf(file), 1);
102
97
  setCmp(Math.random);
103
98
  onDeleteFile(file);
104
99
  }}
105
- size="small"
106
- variant="contained"
107
- style={{
108
- position: "absolute",
109
- top: -10,
110
- right: -10,
111
- backgroundColor: theme.primaryActionColor,
112
- color: "white",
113
- padding: 3
114
- }}
100
+ type="button"
101
+ class="text-gray-400 absolute left-0 bg-gray-900 hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white"
102
+ data-modal-toggle="defaultModal"
115
103
  >
116
- <CloseIcon fontSize="small" />
117
- </IconButton>
104
+ <svg
105
+ aria-hidden="true"
106
+ class="w-5 h-5"
107
+ fill="currentColor"
108
+ viewBox="0 0 20 20"
109
+ xmlns="http://www.w3.org/2000/svg"
110
+ >
111
+ <path
112
+ fill-rule="evenodd"
113
+ d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
114
+ clip-rule="evenodd"
115
+ ></path>
116
+ </svg>
117
+ <span class="sr-only">Close modal</span>
118
+ </button>
119
+
118
120
  <div
119
121
  style={{
120
122
  display: "flex",
@@ -136,17 +138,20 @@ export const DragDropImages = ({
136
138
  console.log("error", fileRejections);
137
139
 
138
140
  return (
139
- <Container
140
- variant="drop-area"
141
+ <div
142
+ // variant="drop-area"
141
143
  {...getRootProps({
142
144
  style: { backgroundColor: isDragActive && "white" }
143
145
  })}
146
+ className="border-black border border-dashed rounded-xl flex flex-col justify-center"
144
147
  >
145
148
  <input {...getInputProps()} />
146
- <Typography>Click here or drop files here to upload</Typography>
147
- <Typography>Max file size is {max}</Typography>
149
+ <div className="text-center p-1">
150
+ Click here or drop files here to upload
151
+ </div>
152
+ <div className="text-center p-1">Max file size is {max}</div>
148
153
  {acceptedFiles.length > 0 && (
149
- <Button
154
+ <HawaButton
150
155
  style={{ color: "black" }}
151
156
  onClick={(e) => {
152
157
  e.stopPropagation();
@@ -154,12 +159,13 @@ export const DragDropImages = ({
154
159
  }}
155
160
  >
156
161
  Clear All
157
- </Button>
162
+ </HawaButton>
158
163
  )}
159
164
 
160
- {thumbs && showPreview ? <aside style={thumbsContainer}>{thumbs}</aside> : null}
165
+ {thumbs && showPreview ? (
166
+ <aside style={thumbsContainer}>{thumbs}</aside>
167
+ ) : null}
161
168
  {fileRejections[0]?.errors[0]?.code === "too-many-files" ? (
162
- // <Typography variant="">{texts.tooManyFiles}</Typography>
163
169
  <HawaAlert text={texts.tooManyFiles} severity="error" />
164
170
  ) : fileRejections[0]?.errors[0]?.code === "file-too-large" ? (
165
171
  <HawaAlert text={texts.fileTooLarge} severity="error" />
@@ -167,6 +173,6 @@ export const DragDropImages = ({
167
173
  errs
168
174
  )}
169
175
  {}
170
- </Container>
176
+ </div>
171
177
  );
172
178
  };
@@ -89,23 +89,7 @@ export const HawaAccordian = (props) => {
89
89
  />
90
90
  );
91
91
  })}
92
- {/* <AccordionItem count={1} />
93
- <AccordionItem count={2} />
94
- <AccordionItem count={3} /> */}
95
92
  </div>
96
-
97
- // <Accordion elevation={0}>
98
- // <AccordionSummary
99
- // expandIcon={<ExpandMore />}
100
- // aria-controls="panel1a-content"
101
- // id="panel1a-header"
102
- // >
103
- // <Typography>{props.title}</Typography>
104
- // </AccordionSummary>
105
- // <AccordionDetails>
106
- // <Typography>{props.content} </Typography>
107
- // </AccordionDetails>
108
- // </Accordion>
109
93
  );
110
94
  };
111
95
  HawaAccordian.propTypes = {
@@ -1,4 +1,3 @@
1
- import { useTheme } from "@mui/system";
2
1
  import React from "react";
3
2
  import styled from "@emotion/styled";
4
3
  import PropTypes from "prop-types";
@@ -36,13 +35,13 @@ const ColorText = styled.input`
36
35
  }
37
36
  `;
38
37
  export const HawaColorPicker = (props) => {
39
- const theme = useTheme();
38
+ // const theme = useTheme();
40
39
  return (
41
40
  <div style={{ display: "flex", flexDirection: "row" }}>
42
41
  <ColorText
43
42
  type={"text"}
44
43
  value={props.color}
45
- borderRadius={theme.allBorderRadius}
44
+ // borderRadius={theme.allBorderRadius}
46
45
  onChange={props.handleChange}
47
46
  />
48
47
  <div style={{ width: 10 }} />
@@ -50,7 +49,7 @@ export const HawaColorPicker = (props) => {
50
49
  type={"color"}
51
50
  value={props.color}
52
51
  onChange={props.handleChange}
53
- borderRadius={theme.allBorderRadius}
52
+ // borderRadius={theme.allBorderRadius}
54
53
  />
55
54
  </div>
56
55
  );
@@ -1,7 +1,5 @@
1
1
  import PhoneInput from "react-phone-input-2";
2
2
  import "react-phone-input-2/lib/material.css";
3
- import { useTheme } from "@mui/system";
4
- import { InputLabel } from "@mui/material";
5
3
 
6
4
  export default function HawaPhoneInput(props) {
7
5
  const {
@@ -19,7 +17,6 @@ export default function HawaPhoneInput(props) {
19
17
  ...rest
20
18
  } = props;
21
19
 
22
- const theme = useTheme();
23
20
  return (
24
21
  <div>
25
22
  <label
@@ -33,7 +30,7 @@ export default function HawaPhoneInput(props) {
33
30
  className="mb-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
34
31
  />
35
32
 
36
- {label && <InputLabel>{props.label}</InputLabel>}
33
+ {/* {label && <InputLabel>{props.label}</InputLabel>} */}
37
34
  <PhoneInput
38
35
  country={country ?? null}
39
36
  onChange={(e) => onChange(e)}
@@ -49,8 +46,7 @@ export default function HawaPhoneInput(props) {
49
46
  specialLabel={""}
50
47
  placeholder={placeholder ?? ""}
51
48
  inputStyle={{
52
- width: "100%",
53
- borderRadius: theme.allBorderRadius
49
+ width: "100%"
54
50
  }}
55
51
  // inputClass="bg-red-900"
56
52
  // inputClass="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
@@ -1,44 +1,88 @@
1
- import { useTheme } from "@mui/material";
2
- import Typography from "@mui/material/Typography";
3
- import Menu from "@mui/material/Menu";
4
- import MenuItem from "@mui/material/MenuItem";
5
1
  import PropTypes from "prop-types";
6
-
2
+ import "flowbite";
7
3
  export const HawaPopMenu = (props) => {
8
- const theme = useTheme();
9
4
  return (
10
- <Menu
11
- sx={{ mt: "45px" }}
12
- id="menu-appbar"
13
- anchorEl={props.anchor}
14
- anchorOrigin={{
15
- vertical: "top",
16
- horizontal: "right"
17
- }}
18
- keepMounted
19
- transformOrigin={{
20
- vertical: "top",
21
- horizontal: "right"
22
- }}
23
- open={Boolean(props.anchor)}
24
- onClose={props.handleClose}
25
- variant="themed"
26
- PaperProps={{
27
- style: {
28
- boxShadow: "none",
29
- borderRadius: theme.allBorderRadius,
30
- border: `1px solid ${theme.primaryActionColor}`
31
- }
32
- }}
33
- >
34
- {props.menuItems.map((item) => (
35
- <MenuItem key={item.label} onClick={item.action}>
36
- {item.icon && <item.icon />}
37
- {item.icon && <div style={{ width: 10 }} />}
38
- <Typography textAlign="center">{item.label}</Typography>
39
- </MenuItem>
40
- ))}
41
- </Menu>
5
+ <div>
6
+ {/* <button
7
+ id="dropdownDefault"
8
+ data-dropdown-toggle={props.popMenuID}
9
+ class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
10
+ type="button"
11
+ >
12
+ Dropdown button{" "}
13
+ <svg
14
+ class="ml-2 w-4 h-4"
15
+ aria-hidden="true"
16
+ fill="none"
17
+ stroke="currentColor"
18
+ viewBox="0 0 24 24"
19
+ xmlns="http://www.w3.org/2000/svg"
20
+ >
21
+ <path
22
+ stroke-linecap="round"
23
+ stroke-linejoin="round"
24
+ stroke-width="2"
25
+ d="M19 9l-7 7-7-7"
26
+ ></path>
27
+ </svg>
28
+ </button> */}
29
+ <div
30
+ id={props.popMenuID}
31
+ class="hidden z-10 w-44 bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700"
32
+ data-popper-reference-hidden=""
33
+ data-popper-escaped=""
34
+ data-popper-placement="bottom"
35
+ // style="position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate3d(0px, 484.5px, 0px);"
36
+ >
37
+ <ul
38
+ class="py-1 text-sm text-gray-700 dark:text-gray-200"
39
+ aria-labelledby="dropdownDefault"
40
+ >
41
+ {props.menuItems.map((item) => (
42
+ <li>
43
+ <a
44
+ href="#"
45
+ class="block py-2 px-4 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
46
+ >
47
+ {item.label}
48
+ </a>
49
+ </li>
50
+ // <MenuItem key={item.label} onClick={item.action}>
51
+ // {item.icon && <item.icon />}
52
+ // {item.icon && <div style={{ width: 10 }} />}
53
+ // <Typography textAlign="center">{item.label}</Typography>
54
+ // </MenuItem>
55
+ ))}
56
+ </ul>
57
+ </div>
58
+ </div>
59
+
60
+ // <Menu
61
+ // sx={{ mt: "45px" }}
62
+ // id="menu-appbar"
63
+ // anchorEl={props.anchor}
64
+ // anchorOrigin={{
65
+ // vertical: "top",
66
+ // horizontal: "right"
67
+ // }}
68
+ // keepMounted
69
+ // transformOrigin={{
70
+ // vertical: "top",
71
+ // horizontal: "right"
72
+ // }}
73
+ // open={Boolean(props.anchor)}
74
+ // onClose={props.handleClose}
75
+ // variant="themed"
76
+ // PaperProps={{
77
+ // style: {
78
+ // boxShadow: "none",
79
+ // borderRadius: theme.allBorderRadius,
80
+ // border: `1px solid ${theme.primaryActionColor}`
81
+ // }
82
+ // }}
83
+ // >
84
+
85
+ // </Menu>
42
86
  );
43
87
  };
44
88
 
@@ -1,20 +1,36 @@
1
1
  import React from "react";
2
- import Slider from "@mui/material/Slider";
3
- import Stack from "@mui/material/Stack";
4
2
  import PropTypes from "prop-types";
5
3
 
6
4
  export const HawaRange = (props) => {
7
5
  return (
8
- <Stack spacing={2} direction="row" alignItems="center" style={props.style}>
9
- {props.startElement}
10
- <Slider
11
- size="small"
12
- aria-label="Volume"
13
- value={props.value}
14
- onChange={props.handleChange}
15
- />
16
- {props.endElement}
17
- </Stack>
6
+ // <Stack spacing={2} direction="row" alignItems="center" style={props.style}>
7
+ // {props.startElement}
8
+ // <Slider
9
+ // size="small"
10
+ // aria-label="Volume"
11
+ // value={props.value}
12
+ // onChange={props.handleChange}
13
+ // />
14
+ // {props.endElement}
15
+ // </Stack>
16
+ <div>
17
+ <label
18
+ for="default-range"
19
+ class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
20
+ >
21
+ Default range
22
+ </label>
23
+ <div className="flex flex-row justify-center items-center w-fit">
24
+ <div className="mr-2">{props.startElement}</div>{" "}
25
+ <input
26
+ id="default-range"
27
+ type="range"
28
+ value="50"
29
+ class="w-fit h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
30
+ />
31
+ <div className="ml-2">{props.endElement}</div>{" "}
32
+ </div>
33
+ </div>
18
34
  );
19
35
  };
20
36
  HawaRange.propTypes = {
@@ -1,16 +1,14 @@
1
- import { Search } from "@mui/icons-material";
2
- import { InputAdornment } from "@mui/material";
3
1
  import React from "react";
4
2
  import { HawaTextField } from "./HawaTextField";
5
3
 
6
4
  export const HawaSearchBar = (props) => {
7
5
  return (
8
6
  <HawaTextField
9
- endAdornment={
10
- <InputAdornment position="start">
11
- <Search />
12
- </InputAdornment>
13
- }
7
+ // endAdornment={
8
+ // <InputAdornment position="start">
9
+ // <Search />
10
+ // </InputAdornment>
11
+ // }
14
12
  {...props}
15
13
  />
16
14
  );
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
- import Typography from "@mui/material/Typography";
3
2
 
4
3
  export const HawaTypography = (props) => {
5
- return <Typography {...props}>{props.children}</Typography>;
4
+ return <div {...props}>{props.children}</div>;
6
5
  };
@@ -1,14 +1,4 @@
1
- import {
2
- Input,
3
- makeStyles,
4
- TextField,
5
- InputLabel,
6
- Typography,
7
- Stack
8
- } from "@mui/material";
9
- import { object } from "prop-types";
10
1
  import React, { useEffect, useState } from "react";
11
- import { replaceAt } from "../util";
12
2
 
13
3
  export const HawaPinInput = ({
14
4
  children,
@@ -86,24 +76,25 @@ export const HawaPinInput = ({
86
76
  alignItems: "center"
87
77
  }}
88
78
  >
89
- {props.label && <InputLabel>{props.label}</InputLabel>}
79
+ {props.label && (
80
+ <label
81
+ for="first_name"
82
+ className="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
83
+ >
84
+ {props.label}
85
+ </label>
86
+ )}
87
+
90
88
  {props.helperText && (
91
- <Typography
89
+ <div
92
90
  style={{ marginBottom: !props.label && 10 }}
93
91
  variant="validation"
94
92
  >
95
93
  {props.helperText}
96
- </Typography>
94
+ </div>
97
95
  )}
98
96
  </div>
99
- <Stack
100
- direction={"row"}
101
- spacing={2}
102
- justifyContent="center"
103
- alignItems={"center"}
104
- >
105
- {childrenWithProps}
106
- </Stack>
97
+ <div>{childrenWithProps}</div>
107
98
  </div>
108
99
  </div>
109
100
  );
@@ -111,7 +102,8 @@ export const HawaPinInput = ({
111
102
 
112
103
  export const HawaPinInputField = (props) => {
113
104
  return (
114
- <Input
105
+ <input
106
+ className="w-12 rounded-lg mx-2"
115
107
  type={props.type && props.type == "alphanumeric" ? "text" : "number"}
116
108
  id={"pinInput" + props.index}
117
109
  defaultValue={props.defaultValue || ""}
@@ -1,29 +1,29 @@
1
- import React from "react";
2
- import { Controller, useFormContext } from "react-hook-form";
3
- import FormControlLabel from "@mui/material/FormControlLabel";
4
- import Checkbox from "@mui/material/Checkbox";
1
+ // import React from "react";
2
+ // import { Controller, useFormContext } from "react-hook-form";
3
+ // import FormControlLabel from "@mui/material/FormControlLabel";
4
+ // import Checkbox from "@mui/material/Checkbox";
5
5
 
6
- export const StyledRadioBox = (props) => {
7
- const { control } = useFormContext();
8
- const { name, defaultValue, rules, shouldUnregister } = props;
6
+ // export const StyledRadioBox = (props) => {
7
+ // const { control } = useFormContext();
8
+ // const { name, defaultValue, rules, shouldUnregister } = props;
9
9
 
10
- return (
11
- <React.Fragment>
12
- <Controller
13
- render={({ field }) => (
14
- <FormControlLabel
15
- control={<Checkbox />}
16
- {...props}
17
- {...field}
18
- checked={field.value}
19
- />
20
- )}
21
- name={name}
22
- rules={rules}
23
- control={control}
24
- defaultValue={defaultValue}
25
- shouldUnregister={shouldUnregister}
26
- />
27
- </React.Fragment>
28
- );
29
- };
10
+ // return (
11
+ // <React.Fragment>
12
+ // <Controller
13
+ // render={({ field }) => (
14
+ // <FormControlLabel
15
+ // control={<Checkbox />}
16
+ // {...props}
17
+ // {...field}
18
+ // checked={field.value}
19
+ // />
20
+ // )}
21
+ // name={name}
22
+ // rules={rules}
23
+ // control={control}
24
+ // defaultValue={defaultValue}
25
+ // shouldUnregister={shouldUnregister}
26
+ // />
27
+ // </React.Fragment>
28
+ // );
29
+ // };
@@ -1,46 +1,46 @@
1
- import React from "react";
2
- import { Controller, useFormContext } from "react-hook-form";
3
- import FormHelperText from "@mui/material/FormHelperText";
4
- import FormControl from "@mui/material/FormControl";
5
- import MenuItem from "@mui/material/MenuItem";
6
- import Select from "@mui/material/Select";
1
+ // import React from "react";
2
+ // import { Controller, useFormContext } from "react-hook-form";
3
+ // import FormHelperText from "@mui/material/FormHelperText";
4
+ // import FormControl from "@mui/material/FormControl";
5
+ // import MenuItem from "@mui/material/MenuItem";
6
+ // import Select from "@mui/material/Select";
7
7
 
8
- const MuiSelect = (props) => {
9
- const { name, options, required, error } = props;
10
- let isError = false;
11
- let errorMessage = "";
12
- if (error && error.hasOwnProperty(name)) {
13
- isError = true;
14
- errorMessage = error[name].message;
15
- }
8
+ // const MuiSelect = (props) => {
9
+ // const { name, options, required, error } = props;
10
+ // let isError = false;
11
+ // let errorMessage = "";
12
+ // if (error && error.hasOwnProperty(name)) {
13
+ // isError = true;
14
+ // errorMessage = error[name].message;
15
+ // }
16
16
 
17
- return (
18
- <FormControl fullWidth={true} error={isError}>
19
- {label} {required ? <span className="req-label">*</span> : null}
20
- <Select id={name} {...props}>
21
- <MenuItem value="">
22
- <em>None</em>
23
- </MenuItem>
24
- {options.map((item) => (
25
- <MenuItem key={item.id} value={item.id}>
26
- {item.label}
27
- </MenuItem>
28
- ))}
29
- </Select>
30
- <FormHelperText>{errorMessage}</FormHelperText>
31
- </FormControl>
32
- );
33
- };
17
+ // return (
18
+ // <FormControl fullWidth={true} error={isError}>
19
+ // {label} {required ? <span className="req-label">*</span> : null}
20
+ // <Select id={name} {...props}>
21
+ // <MenuItem value="">
22
+ // <em>None</em>
23
+ // </MenuItem>
24
+ // {options.map((item) => (
25
+ // <MenuItem key={item.id} value={item.id}>
26
+ // {item.label}
27
+ // </MenuItem>
28
+ // ))}
29
+ // </Select>
30
+ // <FormHelperText>{errorMessage}</FormHelperText>
31
+ // </FormControl>
32
+ // );
33
+ // };
34
34
 
35
- export const SelectField = (props) => {
36
- const { control } = useFormContext();
37
- return (
38
- <React.Fragment>
39
- <Controller
40
- control={control}
41
- render={(field) => <MuiSelect {...props} {...field} />}
42
- {...props}
43
- />
44
- </React.Fragment>
45
- );
46
- };
35
+ // export const SelectField = (props) => {
36
+ // const { control } = useFormContext();
37
+ // return (
38
+ // <React.Fragment>
39
+ // <Controller
40
+ // control={control}
41
+ // render={(field) => <MuiSelect {...props} {...field} />}
42
+ // {...props}
43
+ // />
44
+ // </React.Fragment>
45
+ // );
46
+ // };