@patternfly/react-core 4.242.8 → 4.243.1
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/CHANGELOG.md +19 -0
- package/dist/esm/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/esm/components/DatePicker/DatePicker.js +4 -2
- package/dist/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/TextArea/TextArea.d.ts +17 -11
- package/dist/esm/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/esm/components/TextArea/TextArea.js +8 -3
- package/dist/esm/components/TextArea/TextArea.js.map +1 -1
- package/dist/esm/components/TextInput/TextInput.d.ts +21 -16
- package/dist/esm/components/TextInput/TextInput.d.ts.map +1 -1
- package/dist/esm/components/TextInput/TextInput.js +7 -4
- package/dist/esm/components/TextInput/TextInput.js.map +1 -1
- package/dist/js/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/js/components/DatePicker/DatePicker.js +4 -2
- package/dist/js/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/js/components/TextArea/TextArea.d.ts +17 -11
- package/dist/js/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/js/components/TextArea/TextArea.js +9 -4
- package/dist/js/components/TextArea/TextArea.js.map +1 -1
- package/dist/js/components/TextInput/TextInput.d.ts +21 -16
- package/dist/js/components/TextInput/TextInput.d.ts.map +1 -1
- package/dist/js/components/TextInput/TextInput.js +8 -5
- package/dist/js/components/TextInput/TextInput.js.map +1 -1
- package/dist/umd/react-core.min.css +1090 -1068
- package/dist/umd/react-core.min.js +3 -3
- package/package.json +6 -6
- package/src/components/DatePicker/DatePicker.tsx +4 -2
- package/src/components/DatePicker/__tests__/DatePicker.test.tsx +22 -1
- package/src/components/NumberInput/examples/NumberInput.md +9 -448
- package/src/components/NumberInput/examples/NumberInputCustomStep.tsx +29 -0
- package/src/components/NumberInput/examples/NumberInputCustomStepAndThreshold.tsx +52 -0
- package/src/components/NumberInput/examples/NumberInputDefault.tsx +34 -0
- package/src/components/NumberInput/examples/NumberInputDisabled.tsx +40 -0
- package/src/components/NumberInput/examples/NumberInputUnit.tsx +57 -0
- package/src/components/NumberInput/examples/NumberInputUnitThreshold.tsx +55 -0
- package/src/components/NumberInput/examples/NumberInputVaryingSizes.tsx +80 -0
- package/src/components/NumberInput/examples/{WithStatus.tsx → NumberInputWithStatus.tsx} +4 -3
- package/src/components/TextArea/TextArea.tsx +21 -13
- package/src/components/TextArea/__tests__/TextArea.test.tsx +20 -6
- package/src/components/TextArea/__tests__/__snapshots__/TextArea.test.tsx.snap +31 -5
- package/src/components/TextArea/examples/TextArea.md +30 -0
- package/src/components/TextInput/TextInput.tsx +26 -18
- package/src/components/TextInput/__tests__/TextInput.test.tsx +16 -2
- package/src/components/TextInput/__tests__/__snapshots__/TextInput.test.tsx.snap +36 -4
- package/src/components/TextInput/examples/TextInput.md +23 -2
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`TextInput default read only text input 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<input
|
|
6
|
+
aria-invalid="false"
|
|
7
|
+
aria-label="default read only text input"
|
|
8
|
+
class="pf-c-form-control"
|
|
9
|
+
data-ouia-component-id="OUIA-Generated-TextInputBase-5"
|
|
10
|
+
data-ouia-component-type="PF4/TextInput"
|
|
11
|
+
data-ouia-safe="true"
|
|
12
|
+
readonly=""
|
|
13
|
+
type="text"
|
|
14
|
+
value="read only default"
|
|
15
|
+
/>
|
|
16
|
+
</DocumentFragment>
|
|
17
|
+
`;
|
|
18
|
+
|
|
3
19
|
exports[`TextInput disabled text input 1`] = `
|
|
4
20
|
<DocumentFragment>
|
|
5
21
|
<input
|
|
@@ -22,7 +38,7 @@ exports[`TextInput invalid text input 1`] = `
|
|
|
22
38
|
aria-invalid="true"
|
|
23
39
|
aria-label="invalid text input"
|
|
24
40
|
class="pf-c-form-control"
|
|
25
|
-
data-ouia-component-id="OUIA-Generated-TextInputBase-
|
|
41
|
+
data-ouia-component-id="OUIA-Generated-TextInputBase-7"
|
|
26
42
|
data-ouia-component-type="PF4/TextInput"
|
|
27
43
|
data-ouia-safe="true"
|
|
28
44
|
type="text"
|
|
@@ -31,11 +47,27 @@ exports[`TextInput invalid text input 1`] = `
|
|
|
31
47
|
</DocumentFragment>
|
|
32
48
|
`;
|
|
33
49
|
|
|
34
|
-
exports[`TextInput
|
|
50
|
+
exports[`TextInput plain read only text input 1`] = `
|
|
51
|
+
<DocumentFragment>
|
|
52
|
+
<input
|
|
53
|
+
aria-invalid="false"
|
|
54
|
+
aria-label="plain read only text input"
|
|
55
|
+
class="pf-c-form-control pf-m-plain"
|
|
56
|
+
data-ouia-component-id="OUIA-Generated-TextInputBase-6"
|
|
57
|
+
data-ouia-component-type="PF4/TextInput"
|
|
58
|
+
data-ouia-safe="true"
|
|
59
|
+
readonly=""
|
|
60
|
+
type="text"
|
|
61
|
+
value="read only plain"
|
|
62
|
+
/>
|
|
63
|
+
</DocumentFragment>
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
exports[`TextInput read only text input using isReadOnly 1`] = `
|
|
35
67
|
<DocumentFragment>
|
|
36
68
|
<input
|
|
37
69
|
aria-invalid="false"
|
|
38
|
-
aria-label="
|
|
70
|
+
aria-label="read only text input"
|
|
39
71
|
class="pf-c-form-control"
|
|
40
72
|
data-ouia-component-id="OUIA-Generated-TextInputBase-4"
|
|
41
73
|
data-ouia-component-type="PF4/TextInput"
|
|
@@ -68,7 +100,7 @@ exports[`TextInput validated text input error 1`] = `
|
|
|
68
100
|
aria-invalid="true"
|
|
69
101
|
aria-label="validated text input"
|
|
70
102
|
class="pf-c-form-control"
|
|
71
|
-
data-ouia-component-id="OUIA-Generated-TextInputBase-
|
|
103
|
+
data-ouia-component-id="OUIA-Generated-TextInputBase-10"
|
|
72
104
|
data-ouia-component-type="PF4/TextInput"
|
|
73
105
|
data-ouia-safe="true"
|
|
74
106
|
type="text"
|
|
@@ -80,9 +80,30 @@ constructor(props) {
|
|
|
80
80
|
|
|
81
81
|
```js
|
|
82
82
|
import React from 'react';
|
|
83
|
-
import { TextInput } from '@patternfly/react-core';
|
|
83
|
+
import { Checkbox, TextInput } from '@patternfly/react-core';
|
|
84
|
+
|
|
85
|
+
const ReadOnlyTextArea = () => {
|
|
86
|
+
const [isPlainChecked, setIsPlainChecked] = React.useState(false);
|
|
84
87
|
|
|
85
|
-
|
|
88
|
+
return (
|
|
89
|
+
<React.Fragment>
|
|
90
|
+
<div style={{ marginBottom: '12px' }}>
|
|
91
|
+
<Checkbox
|
|
92
|
+
id="isPlain"
|
|
93
|
+
key="isPlain"
|
|
94
|
+
label="Plain read only variant"
|
|
95
|
+
isChecked={isPlainChecked}
|
|
96
|
+
onChange={checked => setIsPlainChecked(checked)}
|
|
97
|
+
/>
|
|
98
|
+
</div>
|
|
99
|
+
<TextInput
|
|
100
|
+
aria-label="read only text input example"
|
|
101
|
+
value="read only text input example"
|
|
102
|
+
readOnlyVariant={isPlainChecked ? 'plain' : 'default'}
|
|
103
|
+
/>
|
|
104
|
+
</React.Fragment>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
86
107
|
```
|
|
87
108
|
|
|
88
109
|
### Invalid
|