@commercetools-uikit/text-input 13.0.2 → 14.0.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/README.md
CHANGED
|
@@ -45,6 +45,8 @@ export default Example;
|
|
|
45
45
|
| ---------------------- | ----------------------------------------------------------------------------------------------------- | :------: | --------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
46
46
|
| `id` | `string` | | | Used as HTML id property. An id is auto-generated when it is not specified. |
|
|
47
47
|
| `autoComplete` | `string` | | | Used as HTML autocomplete property |
|
|
48
|
+
| `aria-invalid` | `boolean` | | | Indicate if the value entered in the input is invalid. |
|
|
49
|
+
| `aria-errormessage` | `string` | | | HTML ID of an element containing an error message related to the input. |
|
|
48
50
|
| `className` | `string` | | | `className` forwarded to the underlying `<input />`. |
|
|
49
51
|
| `name` | `string` | | | Used as HTML name of the input component. property |
|
|
50
52
|
| `value` | `string` | ✅ | | Value of the input component. |
|
|
@@ -71,7 +71,9 @@ var TextInput = function TextInput(props) {
|
|
|
71
71
|
}, utils.filterDataAttributes(props)), {}, {
|
|
72
72
|
/* ARIA */
|
|
73
73
|
"aria-readonly": props.isReadOnly,
|
|
74
|
-
contentEditable: !props.isReadOnly
|
|
74
|
+
contentEditable: !props.isReadOnly,
|
|
75
|
+
"aria-invalid": props['aria-invalid'],
|
|
76
|
+
"aria-errormessage": props['aria-errormessage']
|
|
75
77
|
}))
|
|
76
78
|
});
|
|
77
79
|
};
|
|
@@ -79,6 +81,8 @@ var TextInput = function TextInput(props) {
|
|
|
79
81
|
TextInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
80
82
|
id: _pt__default["default"].string,
|
|
81
83
|
autoComplete: _pt__default["default"].string,
|
|
84
|
+
'aria-invalid': _pt__default["default"].bool,
|
|
85
|
+
'aria-errormessage': _pt__default["default"].string,
|
|
82
86
|
className: _pt__default["default"].string,
|
|
83
87
|
name: _pt__default["default"].string,
|
|
84
88
|
value: _pt__default["default"].string.isRequired,
|
|
@@ -103,7 +107,7 @@ TextInput.isEmpty = function (value) {
|
|
|
103
107
|
var TextInput$1 = TextInput;
|
|
104
108
|
|
|
105
109
|
// NOTE: This string will be replaced on build time with the package version.
|
|
106
|
-
var version = "
|
|
110
|
+
var version = "14.0.1";
|
|
107
111
|
|
|
108
112
|
exports["default"] = TextInput$1;
|
|
109
113
|
exports.version = version;
|
|
@@ -68,7 +68,9 @@ var TextInput = function TextInput(props) {
|
|
|
68
68
|
}, utils.filterDataAttributes(props)), {}, {
|
|
69
69
|
/* ARIA */
|
|
70
70
|
"aria-readonly": props.isReadOnly,
|
|
71
|
-
contentEditable: !props.isReadOnly
|
|
71
|
+
contentEditable: !props.isReadOnly,
|
|
72
|
+
"aria-invalid": props['aria-invalid'],
|
|
73
|
+
"aria-errormessage": props['aria-errormessage']
|
|
72
74
|
}))
|
|
73
75
|
});
|
|
74
76
|
};
|
|
@@ -84,7 +86,7 @@ TextInput.isEmpty = function (value) {
|
|
|
84
86
|
var TextInput$1 = TextInput;
|
|
85
87
|
|
|
86
88
|
// NOTE: This string will be replaced on build time with the package version.
|
|
87
|
-
var version = "
|
|
89
|
+
var version = "14.0.1";
|
|
88
90
|
|
|
89
91
|
exports["default"] = TextInput$1;
|
|
90
92
|
exports.version = version;
|
|
@@ -53,7 +53,9 @@ var TextInput = function TextInput(props) {
|
|
|
53
53
|
}, filterDataAttributes(props)), {}, {
|
|
54
54
|
/* ARIA */
|
|
55
55
|
"aria-readonly": props.isReadOnly,
|
|
56
|
-
contentEditable: !props.isReadOnly
|
|
56
|
+
contentEditable: !props.isReadOnly,
|
|
57
|
+
"aria-invalid": props['aria-invalid'],
|
|
58
|
+
"aria-errormessage": props['aria-errormessage']
|
|
57
59
|
}))
|
|
58
60
|
});
|
|
59
61
|
};
|
|
@@ -61,6 +63,8 @@ var TextInput = function TextInput(props) {
|
|
|
61
63
|
TextInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
62
64
|
id: _pt.string,
|
|
63
65
|
autoComplete: _pt.string,
|
|
66
|
+
'aria-invalid': _pt.bool,
|
|
67
|
+
'aria-errormessage': _pt.string,
|
|
64
68
|
className: _pt.string,
|
|
65
69
|
name: _pt.string,
|
|
66
70
|
value: _pt.string.isRequired,
|
|
@@ -85,6 +89,6 @@ TextInput.isEmpty = function (value) {
|
|
|
85
89
|
var TextInput$1 = TextInput;
|
|
86
90
|
|
|
87
91
|
// NOTE: This string will be replaced on build time with the package version.
|
|
88
|
-
var version = "
|
|
92
|
+
var version = "14.0.1";
|
|
89
93
|
|
|
90
94
|
export { TextInput$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/text-input",
|
|
3
3
|
"description": "A controlled text input component for single-line strings with validation states.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "14.0.1",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"directory": "packages/components/inputs/text-input"
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://uikit.commercetools.com",
|
|
12
|
-
"keywords": ["javascript", "design
|
|
12
|
+
"keywords": ["javascript", "typescript", "design-system", "react", "uikit"],
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"module": "dist/commercetools-uikit-text-input.esm.js",
|
|
20
20
|
"files": ["dist"],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@babel/runtime": "7.17.2",
|
|
23
|
-
"@babel/runtime-corejs3": "7.17.2",
|
|
24
|
-
"@commercetools-uikit/constraints": "
|
|
25
|
-
"@commercetools-uikit/design-system": "
|
|
26
|
-
"@commercetools-uikit/input-utils": "
|
|
27
|
-
"@commercetools-uikit/utils": "
|
|
22
|
+
"@babel/runtime": "^7.17.2",
|
|
23
|
+
"@babel/runtime-corejs3": "^7.17.2",
|
|
24
|
+
"@commercetools-uikit/constraints": "14.0.1",
|
|
25
|
+
"@commercetools-uikit/design-system": "14.0.0",
|
|
26
|
+
"@commercetools-uikit/input-utils": "14.0.1",
|
|
27
|
+
"@commercetools-uikit/utils": "14.0.1",
|
|
28
28
|
"@emotion/react": "^11.4.0",
|
|
29
29
|
"@emotion/styled": "^11.3.0",
|
|
30
30
|
"prop-types": "15.8.1"
|