@commercetools-uikit/text-field 14.0.1 → 14.0.2
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
CHANGED
|
@@ -46,13 +46,13 @@ export default Example;
|
|
|
46
46
|
| `id` | `string` | | | Used as HTML id property. An id is auto-generated when it is not specified. |
|
|
47
47
|
| `horizontalConstraint` | `union`<br/>Possible values:<br/>`, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 'scale', 'auto'` | | `'scale'` | Horizontal size limit of the input fields. |
|
|
48
48
|
| `errors` | `Record` | | | A map of errors. Error messages for known errors are rendered automatically.
<br/>
Unknown errors will be forwarded to renderError. |
|
|
49
|
-
| `renderError` | `Function`<br/>[See signature.](#signature-renderError) | | | This function can return a message which will be wrapped in an ErrorMessage. It can also return null to show no error
|
|
49
|
+
| `renderError` | `Function`<br/>[See signature.](#signature-renderError) | | | This function can return a message which will be wrapped in an ErrorMessage. It can also return null to show no error. |
|
|
50
50
|
| `isRequired` | `boolean` | | | Indicates if the value is required. Shows an the "required asterisk" if so. |
|
|
51
51
|
| `touched` | `boolean` | | | Indicates whether the field was touched. Errors will only be shown when the field was touched. |
|
|
52
52
|
| `autoComplete` | `string` | | | Used as HTML autocomplete property |
|
|
53
53
|
| `name` | `string` | | | Used as HTML name of the input component. property |
|
|
54
54
|
| `value` | `string` | ✅ | | Value of the input component. |
|
|
55
|
-
| `onChange` | `ChangeEventHandler` | | | Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value
|
|
55
|
+
| `onChange` | `ChangeEventHandler` | | | Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value. |
|
|
56
56
|
| `onBlur` | `FocusEventHandler` | | | Called when input is blurred |
|
|
57
57
|
| `onFocus` | `FocusEventHandler` | | | Called when input is focused |
|
|
58
58
|
| `isAutofocussed` | `boolean` | | | Focus the input on initial render |
|
|
@@ -96,7 +96,7 @@ var TextField = /*#__PURE__*/function (_Component) {
|
|
|
96
96
|
key: "render",
|
|
97
97
|
value: function render() {
|
|
98
98
|
if (!this.props.isReadOnly) {
|
|
99
|
-
process.env.NODE_ENV !== "production" ? utils.warning(typeof this.props.onChange === 'function', 'TextField: `onChange` is required when is not read only.') : void 0;
|
|
99
|
+
process.env.NODE_ENV !== "production" ? utils.warning(typeof this.props.onChange === 'function', 'TextField: `onChange` is required when field is not read only.') : void 0;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
if (this.props.hintIcon) {
|
|
@@ -198,7 +198,7 @@ TextField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
198
198
|
var TextField$1 = TextField;
|
|
199
199
|
|
|
200
200
|
// NOTE: This string will be replaced on build time with the package version.
|
|
201
|
-
var version = "14.0.
|
|
201
|
+
var version = "14.0.2";
|
|
202
202
|
|
|
203
203
|
exports["default"] = TextField$1;
|
|
204
204
|
exports.version = version;
|
|
@@ -170,7 +170,7 @@ TextField.propTypes = {};
|
|
|
170
170
|
var TextField$1 = TextField;
|
|
171
171
|
|
|
172
172
|
// NOTE: This string will be replaced on build time with the package version.
|
|
173
|
-
var version = "14.0.
|
|
173
|
+
var version = "14.0.2";
|
|
174
174
|
|
|
175
175
|
exports["default"] = TextField$1;
|
|
176
176
|
exports.version = version;
|
|
@@ -71,7 +71,7 @@ var TextField = /*#__PURE__*/function (_Component) {
|
|
|
71
71
|
key: "render",
|
|
72
72
|
value: function render() {
|
|
73
73
|
if (!this.props.isReadOnly) {
|
|
74
|
-
process.env.NODE_ENV !== "production" ? warning(typeof this.props.onChange === 'function', 'TextField: `onChange` is required when is not read only.') : void 0;
|
|
74
|
+
process.env.NODE_ENV !== "production" ? warning(typeof this.props.onChange === 'function', 'TextField: `onChange` is required when field is not read only.') : void 0;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
if (this.props.hintIcon) {
|
|
@@ -173,6 +173,6 @@ TextField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
173
173
|
var TextField$1 = TextField;
|
|
174
174
|
|
|
175
175
|
// NOTE: This string will be replaced on build time with the package version.
|
|
176
|
-
var version = "14.0.
|
|
176
|
+
var version = "14.0.2";
|
|
177
177
|
|
|
178
178
|
export { TextField$1 as default, version };
|
|
@@ -14,9 +14,9 @@ declare type TTextFieldProps = {
|
|
|
14
14
|
autoComplete?: string;
|
|
15
15
|
name?: string;
|
|
16
16
|
value: string;
|
|
17
|
-
onChange?: ChangeEventHandler
|
|
18
|
-
onBlur?: FocusEventHandler
|
|
19
|
-
onFocus?: FocusEventHandler
|
|
17
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
18
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
19
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
20
20
|
isAutofocussed?: boolean;
|
|
21
21
|
isDisabled?: boolean;
|
|
22
22
|
isReadOnly?: boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/text-field",
|
|
3
3
|
"description": "A controlled text input component for single-line strings with validation states.",
|
|
4
|
-
"version": "14.0.
|
|
4
|
+
"version": "14.0.2",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"@commercetools-uikit/constraints": "14.0.1",
|
|
25
25
|
"@commercetools-uikit/design-system": "14.0.0",
|
|
26
26
|
"@commercetools-uikit/field-errors": "14.0.1",
|
|
27
|
-
"@commercetools-uikit/field-label": "14.0.
|
|
27
|
+
"@commercetools-uikit/field-label": "14.0.2",
|
|
28
28
|
"@commercetools-uikit/spacings-stack": "14.0.1",
|
|
29
|
-
"@commercetools-uikit/text-input": "14.0.
|
|
29
|
+
"@commercetools-uikit/text-input": "14.0.2",
|
|
30
30
|
"@commercetools-uikit/utils": "14.0.1",
|
|
31
31
|
"@emotion/react": "^11.4.0",
|
|
32
32
|
"@emotion/styled": "^11.3.0",
|