@madie/madie-design-system 1.2.63 → 1.2.64
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/AutoComplete/AutoComplete.jsx +4 -2
- package/components/AutoComplete/AutoComplete.stories.js +12 -0
- package/components/DateField/DateField.jsx +5 -3
- package/components/DateField/DateField.stories.jsx +16 -0
- package/components/DateTimeField/DateTimeField.jsx +10 -4
- package/components/DateTimeField/DateTimeField.stories.jsx +28 -0
- package/components/NumberInput/index.jsx +3 -0
- package/components/RadioButton/RadioButton.jsx +7 -3
- package/components/RadioButton/RadioButton.stories.jsx +21 -2
- package/components/ReadOnlyTextField/index.jsx +9 -3
- package/components/RichTextEditor/RichTextEditor.stories.js +21 -3
- package/components/RichTextEditor/index.jsx +28 -18
- package/components/Select/Select.stories.js +53 -0
- package/components/Select/index.jsx +4 -2
- package/components/TextArea/TextArea.stories.js +16 -0
- package/components/TextArea/index.jsx +5 -2
- package/components/TextField/TextField.stories.js +14 -0
- package/components/TextField/index.jsx +4 -2
- package/dist/browser.js +1 -1
- package/dist/index.js +1 -1
- package/dist/react/index.js +5 -5
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
- package/test/components/AutoComplete.test.js +25 -4
- package/test/components/DateField.test.js +26 -8
- package/test/components/DateTimeField.test.js +28 -7
- package/test/components/RadioButton.test.js +7 -5
- package/test/components/ReadOnlyTextField.test.js +4 -2
- package/test/components/RichTextEditor.test.js +34 -5
- package/test/components/Select.test.js +24 -4
- package/test/components/TextArea.test.js +27 -11
- package/test/components/TextField.test.js +21 -3
|
@@ -15,6 +15,7 @@ const TextField = ({
|
|
|
15
15
|
helperText = undefined,
|
|
16
16
|
required = false,
|
|
17
17
|
disabled = false,
|
|
18
|
+
readOnly = false,
|
|
18
19
|
label,
|
|
19
20
|
tooltipText,
|
|
20
21
|
inputProps,
|
|
@@ -23,7 +24,7 @@ const TextField = ({
|
|
|
23
24
|
maxLength = undefined,
|
|
24
25
|
...rest
|
|
25
26
|
}) => {
|
|
26
|
-
if (
|
|
27
|
+
if (readOnly) {
|
|
27
28
|
return (
|
|
28
29
|
<ReadOnlyTextField
|
|
29
30
|
required={required}
|
|
@@ -32,7 +33,7 @@ const TextField = ({
|
|
|
32
33
|
size="small"
|
|
33
34
|
{...rest}
|
|
34
35
|
/>
|
|
35
|
-
)
|
|
36
|
+
);
|
|
36
37
|
}
|
|
37
38
|
// get a copy of input props
|
|
38
39
|
const newInputProps = { ...inputProps } || {};
|
|
@@ -211,6 +212,7 @@ TextField.propTypes = {
|
|
|
211
212
|
helperText: PropTypes.string,
|
|
212
213
|
required: PropTypes.bool,
|
|
213
214
|
disabled: PropTypes.bool,
|
|
215
|
+
readOnly: PropTypes.bool,
|
|
214
216
|
placeholder: PropTypes.string, // expects placeholder objects of { name: value } and inserts into the render item function.
|
|
215
217
|
label: PropTypes.string,
|
|
216
218
|
tooltipText: PropTypes.string,
|