@madie/madie-design-system 1.2.4 → 1.2.6
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/components/InputLabel/index.jsx +1 -1
- package/components/ReadOnlyTextField/index.jsx +26 -3
- package/components/TextField/TextField.stories.js +1 -2
- package/dist/browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.714d9ab1.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/main.9ac140bf.iframe.bundle.js +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { FormControl, TextField as MUITextField
|
|
2
|
+
import { FormControl, TextField as MUITextField,
|
|
3
|
+
FormHelperText,
|
|
4
|
+
} from "@mui/material";
|
|
3
5
|
import InputLabel from "../InputLabel";
|
|
4
6
|
import PropTypes from "prop-types";
|
|
5
7
|
|
|
@@ -23,6 +25,26 @@ const ReadOnlyTextField = ({
|
|
|
23
25
|
>
|
|
24
26
|
{label}
|
|
25
27
|
</InputLabel>
|
|
28
|
+
{helperText && (
|
|
29
|
+
<FormHelperText
|
|
30
|
+
tabIndex={0}
|
|
31
|
+
aria-live="polite"
|
|
32
|
+
id={`${id}-helper-text`}
|
|
33
|
+
data-testid={`${id}-helper-text`}
|
|
34
|
+
sx={[
|
|
35
|
+
{
|
|
36
|
+
margin: "4px 0px 0px 0px",
|
|
37
|
+
color: "#515151",
|
|
38
|
+
lineHeight: 1,
|
|
39
|
+
},
|
|
40
|
+
error && {
|
|
41
|
+
color: "#AE1C1C !important",
|
|
42
|
+
},
|
|
43
|
+
]}
|
|
44
|
+
>
|
|
45
|
+
{helperText}
|
|
46
|
+
</FormHelperText>
|
|
47
|
+
)}
|
|
26
48
|
<MUITextField
|
|
27
49
|
sx={{
|
|
28
50
|
height: 40, //there's a .13 coming from somewhere.
|
|
@@ -39,8 +61,10 @@ const ReadOnlyTextField = ({
|
|
|
39
61
|
disableUnderline: true,
|
|
40
62
|
fontSize: 16,
|
|
41
63
|
padding: "9px 0px",
|
|
64
|
+
color: "#333",
|
|
42
65
|
"&::placeholder": {
|
|
43
|
-
opacity:
|
|
66
|
+
opacity: 1,
|
|
67
|
+
color: "#333",
|
|
44
68
|
},
|
|
45
69
|
"&:focus": {
|
|
46
70
|
border: "none",
|
|
@@ -59,7 +83,6 @@ const ReadOnlyTextField = ({
|
|
|
59
83
|
id={id}
|
|
60
84
|
{...rest}
|
|
61
85
|
/>
|
|
62
|
-
{helperText && helperText}
|
|
63
86
|
</FormControl>
|
|
64
87
|
);
|
|
65
88
|
};
|
|
@@ -53,13 +53,12 @@ export const Disabled = () => (
|
|
|
53
53
|
<Wrapper>
|
|
54
54
|
<TextField
|
|
55
55
|
placeholder="Placeholder"
|
|
56
|
-
label="Text Label"
|
|
56
|
+
label="Disabled Text Label"
|
|
57
57
|
id="measureName"
|
|
58
58
|
inputProps={{ "data-testid": "measure-name-input" }}
|
|
59
59
|
data-testid="measure-name-text-field"
|
|
60
60
|
size="small"
|
|
61
61
|
disabled
|
|
62
|
-
required
|
|
63
62
|
/>
|
|
64
63
|
</Wrapper>
|
|
65
64
|
);
|