@commercetools-uikit/text-field 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.
|
@@ -59,6 +59,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
59
59
|
|
|
60
60
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
61
61
|
var sequentialId = utils.createSequentialId('text-field-');
|
|
62
|
+
var sequentialErrorsId = utils.createSequentialId('text-field-error-')();
|
|
62
63
|
|
|
63
64
|
var hasErrors = function hasErrors(errors) {
|
|
64
65
|
var _context;
|
|
@@ -116,7 +117,7 @@ var TextField = /*#__PURE__*/function (_Component) {
|
|
|
116
117
|
badge: this.props.badge,
|
|
117
118
|
hasRequiredIndicator: this.props.isRequired,
|
|
118
119
|
htmlFor: this.state.id
|
|
119
|
-
}), jsxRuntime.jsx(TextInput__default["default"], _objectSpread({
|
|
120
|
+
}), jsxRuntime.jsx(TextInput__default["default"], _objectSpread(_objectSpread({
|
|
120
121
|
id: this.state.id,
|
|
121
122
|
name: this.props.name,
|
|
122
123
|
autoComplete: this.props.autoComplete,
|
|
@@ -130,7 +131,12 @@ var TextField = /*#__PURE__*/function (_Component) {
|
|
|
130
131
|
hasError: hasError,
|
|
131
132
|
placeholder: this.props.placeholder,
|
|
132
133
|
horizontalConstraint: "scale"
|
|
133
|
-
}, utils.filterDataAttributes(this.props))
|
|
134
|
+
}, utils.filterDataAttributes(this.props)), {}, {
|
|
135
|
+
/* ARIA */
|
|
136
|
+
"aria-invalid": hasError,
|
|
137
|
+
"aria-errormessage": sequentialErrorsId
|
|
138
|
+
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
139
|
+
id: sequentialErrorsId,
|
|
134
140
|
errors: this.props.errors,
|
|
135
141
|
isVisible: hasError,
|
|
136
142
|
renderError: this.props.renderError
|
|
@@ -181,7 +187,7 @@ TextField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
181
187
|
var TextField$1 = TextField;
|
|
182
188
|
|
|
183
189
|
// NOTE: This string will be replaced on build time with the package version.
|
|
184
|
-
var version = "13.0.
|
|
190
|
+
var version = "13.0.4";
|
|
185
191
|
|
|
186
192
|
exports["default"] = TextField$1;
|
|
187
193
|
exports.version = version;
|
|
@@ -58,6 +58,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
58
58
|
|
|
59
59
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
60
60
|
var sequentialId = utils.createSequentialId('text-field-');
|
|
61
|
+
var sequentialErrorsId = utils.createSequentialId('text-field-error-')();
|
|
61
62
|
|
|
62
63
|
var hasErrors = function hasErrors(errors) {
|
|
63
64
|
var _context;
|
|
@@ -111,7 +112,7 @@ var TextField = /*#__PURE__*/function (_Component) {
|
|
|
111
112
|
badge: this.props.badge,
|
|
112
113
|
hasRequiredIndicator: this.props.isRequired,
|
|
113
114
|
htmlFor: this.state.id
|
|
114
|
-
}), jsxRuntime.jsx(TextInput__default["default"], _objectSpread({
|
|
115
|
+
}), jsxRuntime.jsx(TextInput__default["default"], _objectSpread(_objectSpread({
|
|
115
116
|
id: this.state.id,
|
|
116
117
|
name: this.props.name,
|
|
117
118
|
autoComplete: this.props.autoComplete,
|
|
@@ -125,7 +126,12 @@ var TextField = /*#__PURE__*/function (_Component) {
|
|
|
125
126
|
hasError: hasError,
|
|
126
127
|
placeholder: this.props.placeholder,
|
|
127
128
|
horizontalConstraint: "scale"
|
|
128
|
-
}, utils.filterDataAttributes(this.props))
|
|
129
|
+
}, utils.filterDataAttributes(this.props)), {}, {
|
|
130
|
+
/* ARIA */
|
|
131
|
+
"aria-invalid": hasError,
|
|
132
|
+
"aria-errormessage": sequentialErrorsId
|
|
133
|
+
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
134
|
+
id: sequentialErrorsId,
|
|
129
135
|
errors: this.props.errors,
|
|
130
136
|
isVisible: hasError,
|
|
131
137
|
renderError: this.props.renderError
|
|
@@ -153,7 +159,7 @@ TextField.propTypes = {};
|
|
|
153
159
|
var TextField$1 = TextField;
|
|
154
160
|
|
|
155
161
|
// NOTE: This string will be replaced on build time with the package version.
|
|
156
|
-
var version = "13.0.
|
|
162
|
+
var version = "13.0.4";
|
|
157
163
|
|
|
158
164
|
exports["default"] = TextField$1;
|
|
159
165
|
exports.version = version;
|
|
@@ -34,6 +34,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
34
34
|
|
|
35
35
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
36
36
|
var sequentialId = createSequentialId('text-field-');
|
|
37
|
+
var sequentialErrorsId = createSequentialId('text-field-error-')();
|
|
37
38
|
|
|
38
39
|
var hasErrors = function hasErrors(errors) {
|
|
39
40
|
var _context;
|
|
@@ -91,7 +92,7 @@ var TextField = /*#__PURE__*/function (_Component) {
|
|
|
91
92
|
badge: this.props.badge,
|
|
92
93
|
hasRequiredIndicator: this.props.isRequired,
|
|
93
94
|
htmlFor: this.state.id
|
|
94
|
-
}), jsx(TextInput, _objectSpread({
|
|
95
|
+
}), jsx(TextInput, _objectSpread(_objectSpread({
|
|
95
96
|
id: this.state.id,
|
|
96
97
|
name: this.props.name,
|
|
97
98
|
autoComplete: this.props.autoComplete,
|
|
@@ -105,7 +106,12 @@ var TextField = /*#__PURE__*/function (_Component) {
|
|
|
105
106
|
hasError: hasError,
|
|
106
107
|
placeholder: this.props.placeholder,
|
|
107
108
|
horizontalConstraint: "scale"
|
|
108
|
-
}, filterDataAttributes(this.props))
|
|
109
|
+
}, filterDataAttributes(this.props)), {}, {
|
|
110
|
+
/* ARIA */
|
|
111
|
+
"aria-invalid": hasError,
|
|
112
|
+
"aria-errormessage": sequentialErrorsId
|
|
113
|
+
})), jsx(FieldErrors, {
|
|
114
|
+
id: sequentialErrorsId,
|
|
109
115
|
errors: this.props.errors,
|
|
110
116
|
isVisible: hasError,
|
|
111
117
|
renderError: this.props.renderError
|
|
@@ -156,6 +162,6 @@ TextField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
156
162
|
var TextField$1 = TextField;
|
|
157
163
|
|
|
158
164
|
// NOTE: This string will be replaced on build time with the package version.
|
|
159
|
-
var version = "13.0.
|
|
165
|
+
var version = "13.0.4";
|
|
160
166
|
|
|
161
167
|
export { TextField$1 as default, version };
|
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": "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,15 +23,15 @@
|
|
|
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/field-errors": "13.0.
|
|
27
|
-
"@commercetools-uikit/field-label": "13.0.
|
|
26
|
+
"@commercetools-uikit/field-errors": "13.0.4",
|
|
27
|
+
"@commercetools-uikit/field-label": "13.0.4",
|
|
28
28
|
"@commercetools-uikit/spacings-stack": "13.0.2",
|
|
29
|
-
"@commercetools-uikit/text-input": "13.0.
|
|
29
|
+
"@commercetools-uikit/text-input": "13.0.4",
|
|
30
30
|
"@commercetools-uikit/utils": "13.0.2",
|
|
31
31
|
"@emotion/react": "^11.4.0",
|
|
32
32
|
"@emotion/styled": "^11.3.0",
|
|
33
33
|
"prop-types": "15.8.1",
|
|
34
|
-
"react-
|
|
34
|
+
"react-intl": "^5.24.6"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"react": "17.0.2"
|