@sikka/hawa 0.0.26 → 0.0.27
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/README.md +8 -71
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/elements/HawaTextArea.js +20 -32
- package/src/elements/HawaTextField.js +16 -20
- package/src/elements/index.js +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.bc81d4bb.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.b026595c.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.741b86a0.iframe.bundle.js.LICENSE.txt → vendors~main.b026595c.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.b026595c.iframe.bundle.js.map +1 -0
- package/storybook-static/main.20c7df82.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.741b86a0.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.741b86a0.iframe.bundle.js.map +0 -1
|
@@ -1,38 +1,26 @@
|
|
|
1
|
+
import { useTheme } from "@mui/system";
|
|
1
2
|
import React from "react";
|
|
2
|
-
import { Controller, useFormContext } from "react-hook-form";
|
|
3
|
-
import { StyledInputLabel } from ".";
|
|
4
3
|
|
|
5
4
|
export const HawaTextArea = (props) => {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
console.log("theme is ", theme);
|
|
9
7
|
return (
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
value={field.value ?? ""}
|
|
28
|
-
{...field}
|
|
29
|
-
/>
|
|
30
|
-
</label>
|
|
31
|
-
)}
|
|
32
|
-
name={name}
|
|
33
|
-
rules={rules}
|
|
34
|
-
control={control}
|
|
35
|
-
shouldUnregister={shouldUnregister}
|
|
36
|
-
/>
|
|
8
|
+
<label>
|
|
9
|
+
{/* {inputLabel ? <StyledInputLabel label={inputLabel} /> : null} */}
|
|
10
|
+
<textarea
|
|
11
|
+
style={{
|
|
12
|
+
color: "black",
|
|
13
|
+
backgroundColor: props.bgColor || "white",
|
|
14
|
+
borderBottom: "none",
|
|
15
|
+
border: "none",
|
|
16
|
+
width: "100%",
|
|
17
|
+
padding: 0,
|
|
18
|
+
margin: 0,
|
|
19
|
+
marginBottom: 0,
|
|
20
|
+
resize: props.resize || "vertical"
|
|
21
|
+
}}
|
|
22
|
+
// value={field.value ?? ""}
|
|
23
|
+
/>
|
|
24
|
+
</label>
|
|
37
25
|
);
|
|
38
26
|
};
|
|
@@ -5,28 +5,24 @@ import Typography from "@mui/material/Typography";
|
|
|
5
5
|
|
|
6
6
|
export const HawaTextField = (props) => {
|
|
7
7
|
return (
|
|
8
|
-
<div
|
|
9
|
-
style={
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
justifyContent: "space-between",
|
|
20
|
-
alignItems: "center"
|
|
21
|
-
}}
|
|
22
|
-
>
|
|
23
|
-
{props.label && <InputLabel>{props.label}</InputLabel>}
|
|
8
|
+
<div style={props.inForm && { width: "100%" }}>
|
|
9
|
+
<div style={{ width: props.fullWidth ? "100%" : "fit-content" }}>
|
|
10
|
+
<div
|
|
11
|
+
style={{
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
justifyContent: "space-between",
|
|
15
|
+
alignItems: "center"
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
{props.label && <InputLabel>{props.label}</InputLabel>}
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
{props.helperText && (
|
|
21
|
+
<Typography variant="validation">{props.helperText}</Typography>
|
|
22
|
+
)}
|
|
23
|
+
</div>
|
|
24
|
+
<Input disableUnderline {...props} />
|
|
28
25
|
</div>
|
|
29
|
-
<Input disableUnderline {...props} />
|
|
30
26
|
</div>
|
|
31
27
|
);
|
|
32
28
|
};
|
package/src/elements/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./HawaLogoButton";
|
|
|
10
10
|
export * from "./HawaButton";
|
|
11
11
|
export * from "./HawaSelect";
|
|
12
12
|
export * from "./HawaTextField";
|
|
13
|
+
export * from "./HawaTextArea";
|
|
13
14
|
export * from "./HawaInputLabel";
|
|
14
15
|
export * from "./HawaTypography";
|
|
15
16
|
export * from "./HawaAlert";
|
|
@@ -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.b026595c.iframe.bundle.js"></script><script src="main.bc81d4bb.iframe.bundle.js"></script></body></html>
|