@commercetools-uikit/password-input 13.0.2 → 13.0.4
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
|
@@ -50,6 +50,8 @@ export default Example;
|
|
|
50
50
|
| ---------------------- | ----------------------------------------------------------------------------------------------------- | :------: | --------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
51
51
|
| `id` | `string` | | | Used as HTML id property. An id is auto-generated when it is not specified. |
|
|
52
52
|
| `name` | `string` | | | Used as HTML name of the input component. property |
|
|
53
|
+
| `aria-invalid` | `boolean` | | | Indicate if the value entered in the input is invalid. |
|
|
54
|
+
| `aria-errormessage` | `string` | | | HTML ID of an element containing an error message related to the input. |
|
|
53
55
|
| `value` | `string` | ✅ | | Value of the input component. |
|
|
54
56
|
| `placeholder` | `string` | | | Placeholder text for the input |
|
|
55
57
|
| `onChange` | `ChangeEventHandler` | | | Called with an event containing the new value. Required when input is not read only. Parent should pass it back as value. |
|
|
@@ -70,7 +70,9 @@ var PasswordInput = function PasswordInput(props) {
|
|
|
70
70
|
}, utils.filterDataAttributes(props)), {}, {
|
|
71
71
|
/* ARIA */
|
|
72
72
|
"aria-readonly": props.isReadOnly,
|
|
73
|
-
contentEditable: !props.isReadOnly
|
|
73
|
+
contentEditable: !props.isReadOnly,
|
|
74
|
+
"aria-invalid": props['aria-invalid'],
|
|
75
|
+
"aria-errormessage": props['aria-errormessage']
|
|
74
76
|
}))
|
|
75
77
|
});
|
|
76
78
|
};
|
|
@@ -78,6 +80,8 @@ var PasswordInput = function PasswordInput(props) {
|
|
|
78
80
|
PasswordInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
79
81
|
id: _pt__default["default"].string,
|
|
80
82
|
name: _pt__default["default"].string,
|
|
83
|
+
'aria-invalid': _pt__default["default"].bool,
|
|
84
|
+
'aria-errormessage': _pt__default["default"].string,
|
|
81
85
|
value: _pt__default["default"].string.isRequired,
|
|
82
86
|
placeholder: _pt__default["default"].string,
|
|
83
87
|
onChange: _pt__default["default"].func,
|
|
@@ -102,7 +106,7 @@ PasswordInput.isEmpty = function (value) {
|
|
|
102
106
|
var PasswordInput$1 = PasswordInput;
|
|
103
107
|
|
|
104
108
|
// NOTE: This string will be replaced on build time with the package version.
|
|
105
|
-
var version = "13.0.
|
|
109
|
+
var version = "13.0.4";
|
|
106
110
|
|
|
107
111
|
exports["default"] = PasswordInput$1;
|
|
108
112
|
exports.version = version;
|
|
@@ -67,7 +67,9 @@ var PasswordInput = function PasswordInput(props) {
|
|
|
67
67
|
}, utils.filterDataAttributes(props)), {}, {
|
|
68
68
|
/* ARIA */
|
|
69
69
|
"aria-readonly": props.isReadOnly,
|
|
70
|
-
contentEditable: !props.isReadOnly
|
|
70
|
+
contentEditable: !props.isReadOnly,
|
|
71
|
+
"aria-invalid": props['aria-invalid'],
|
|
72
|
+
"aria-errormessage": props['aria-errormessage']
|
|
71
73
|
}))
|
|
72
74
|
});
|
|
73
75
|
};
|
|
@@ -83,7 +85,7 @@ PasswordInput.isEmpty = function (value) {
|
|
|
83
85
|
var PasswordInput$1 = PasswordInput;
|
|
84
86
|
|
|
85
87
|
// NOTE: This string will be replaced on build time with the package version.
|
|
86
|
-
var version = "13.0.
|
|
88
|
+
var version = "13.0.4";
|
|
87
89
|
|
|
88
90
|
exports["default"] = PasswordInput$1;
|
|
89
91
|
exports.version = version;
|
|
@@ -52,7 +52,9 @@ var PasswordInput = function PasswordInput(props) {
|
|
|
52
52
|
}, filterDataAttributes(props)), {}, {
|
|
53
53
|
/* ARIA */
|
|
54
54
|
"aria-readonly": props.isReadOnly,
|
|
55
|
-
contentEditable: !props.isReadOnly
|
|
55
|
+
contentEditable: !props.isReadOnly,
|
|
56
|
+
"aria-invalid": props['aria-invalid'],
|
|
57
|
+
"aria-errormessage": props['aria-errormessage']
|
|
56
58
|
}))
|
|
57
59
|
});
|
|
58
60
|
};
|
|
@@ -60,6 +62,8 @@ var PasswordInput = function PasswordInput(props) {
|
|
|
60
62
|
PasswordInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
61
63
|
id: _pt.string,
|
|
62
64
|
name: _pt.string,
|
|
65
|
+
'aria-invalid': _pt.bool,
|
|
66
|
+
'aria-errormessage': _pt.string,
|
|
63
67
|
value: _pt.string.isRequired,
|
|
64
68
|
placeholder: _pt.string,
|
|
65
69
|
onChange: _pt.func,
|
|
@@ -84,6 +88,6 @@ PasswordInput.isEmpty = function (value) {
|
|
|
84
88
|
var PasswordInput$1 = PasswordInput;
|
|
85
89
|
|
|
86
90
|
// NOTE: This string will be replaced on build time with the package version.
|
|
87
|
-
var version = "13.0.
|
|
91
|
+
var version = "13.0.4";
|
|
88
92
|
|
|
89
93
|
export { PasswordInput$1 as default, version };
|
|
@@ -2,6 +2,8 @@ import { ChangeEventHandler, FocusEventHandler } from 'react';
|
|
|
2
2
|
export declare type TPasswordInputProps = {
|
|
3
3
|
id?: string;
|
|
4
4
|
name?: string;
|
|
5
|
+
'aria-invalid'?: boolean;
|
|
6
|
+
'aria-errormessage'?: string;
|
|
5
7
|
value: string;
|
|
6
8
|
placeholder?: string;
|
|
7
9
|
onChange?: ChangeEventHandler;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/password-input",
|
|
3
3
|
"description": "A controlled password input component.",
|
|
4
|
-
"version": "13.0.
|
|
4
|
+
"version": "13.0.4",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -23,12 +23,11 @@
|
|
|
23
23
|
"@babel/runtime-corejs3": "7.17.2",
|
|
24
24
|
"@commercetools-uikit/constraints": "13.0.2",
|
|
25
25
|
"@commercetools-uikit/design-system": "13.0.0",
|
|
26
|
-
"@commercetools-uikit/input-utils": "13.0.
|
|
26
|
+
"@commercetools-uikit/input-utils": "13.0.4",
|
|
27
27
|
"@commercetools-uikit/utils": "13.0.2",
|
|
28
28
|
"@emotion/react": "^11.4.0",
|
|
29
29
|
"@emotion/styled": "^11.3.0",
|
|
30
|
-
"prop-types": "15.8.1"
|
|
31
|
-
"react-required-if": "1.0.3"
|
|
30
|
+
"prop-types": "15.8.1"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"react": "17.0.2"
|