@commercetools-uikit/localized-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('localized-text-field-');
|
|
62
|
+
var sequentialErrorsId = utils.createSequentialId('localized-text-field-error-')();
|
|
62
63
|
|
|
63
64
|
var hasErrors = function hasErrors(errors) {
|
|
64
65
|
var _context;
|
|
@@ -117,7 +118,7 @@ var LocalizedTextField = /*#__PURE__*/function (_Component) {
|
|
|
117
118
|
badge: this.props.badge,
|
|
118
119
|
hasRequiredIndicator: this.props.isRequired,
|
|
119
120
|
htmlFor: this.state.id
|
|
120
|
-
}), jsxRuntime.jsx(LocalizedTextInput__default["default"], _objectSpread({
|
|
121
|
+
}), jsxRuntime.jsx(LocalizedTextInput__default["default"], _objectSpread(_objectSpread({
|
|
121
122
|
autoComplete: this.props.autoComplete,
|
|
122
123
|
id: this.state.id,
|
|
123
124
|
name: this.props.name,
|
|
@@ -135,7 +136,11 @@ var LocalizedTextField = /*#__PURE__*/function (_Component) {
|
|
|
135
136
|
hasError: hasError,
|
|
136
137
|
placeholder: this.props.placeholder,
|
|
137
138
|
horizontalConstraint: "scale"
|
|
138
|
-
}, utils.filterDataAttributes(this.props))
|
|
139
|
+
}, utils.filterDataAttributes(this.props)), {}, {
|
|
140
|
+
"aria-invalid": hasError,
|
|
141
|
+
"aria-errormessage": sequentialErrorsId
|
|
142
|
+
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
143
|
+
id: sequentialErrorsId,
|
|
139
144
|
errors: this.props.errors,
|
|
140
145
|
isVisible: hasError,
|
|
141
146
|
renderError: this.props.renderError
|
|
@@ -189,7 +194,7 @@ LocalizedTextField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
189
194
|
var LocalizedTextField$1 = LocalizedTextField;
|
|
190
195
|
|
|
191
196
|
// NOTE: This string will be replaced on build time with the package version.
|
|
192
|
-
var version = "13.0.
|
|
197
|
+
var version = "13.0.4";
|
|
193
198
|
|
|
194
199
|
exports["default"] = LocalizedTextField$1;
|
|
195
200
|
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('localized-text-field-');
|
|
61
|
+
var sequentialErrorsId = utils.createSequentialId('localized-text-field-error-')();
|
|
61
62
|
|
|
62
63
|
var hasErrors = function hasErrors(errors) {
|
|
63
64
|
var _context;
|
|
@@ -112,7 +113,7 @@ var LocalizedTextField = /*#__PURE__*/function (_Component) {
|
|
|
112
113
|
badge: this.props.badge,
|
|
113
114
|
hasRequiredIndicator: this.props.isRequired,
|
|
114
115
|
htmlFor: this.state.id
|
|
115
|
-
}), jsxRuntime.jsx(LocalizedTextInput__default["default"], _objectSpread({
|
|
116
|
+
}), jsxRuntime.jsx(LocalizedTextInput__default["default"], _objectSpread(_objectSpread({
|
|
116
117
|
autoComplete: this.props.autoComplete,
|
|
117
118
|
id: this.state.id,
|
|
118
119
|
name: this.props.name,
|
|
@@ -130,7 +131,11 @@ var LocalizedTextField = /*#__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-invalid": hasError,
|
|
136
|
+
"aria-errormessage": sequentialErrorsId
|
|
137
|
+
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
138
|
+
id: sequentialErrorsId,
|
|
134
139
|
errors: this.props.errors,
|
|
135
140
|
isVisible: hasError,
|
|
136
141
|
renderError: this.props.renderError
|
|
@@ -158,7 +163,7 @@ LocalizedTextField.propTypes = {};
|
|
|
158
163
|
var LocalizedTextField$1 = LocalizedTextField;
|
|
159
164
|
|
|
160
165
|
// NOTE: This string will be replaced on build time with the package version.
|
|
161
|
-
var version = "13.0.
|
|
166
|
+
var version = "13.0.4";
|
|
162
167
|
|
|
163
168
|
exports["default"] = LocalizedTextField$1;
|
|
164
169
|
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('localized-text-field-');
|
|
37
|
+
var sequentialErrorsId = createSequentialId('localized-text-field-error-')();
|
|
37
38
|
|
|
38
39
|
var hasErrors = function hasErrors(errors) {
|
|
39
40
|
var _context;
|
|
@@ -92,7 +93,7 @@ var LocalizedTextField = /*#__PURE__*/function (_Component) {
|
|
|
92
93
|
badge: this.props.badge,
|
|
93
94
|
hasRequiredIndicator: this.props.isRequired,
|
|
94
95
|
htmlFor: this.state.id
|
|
95
|
-
}), jsx(LocalizedTextInput, _objectSpread({
|
|
96
|
+
}), jsx(LocalizedTextInput, _objectSpread(_objectSpread({
|
|
96
97
|
autoComplete: this.props.autoComplete,
|
|
97
98
|
id: this.state.id,
|
|
98
99
|
name: this.props.name,
|
|
@@ -110,7 +111,11 @@ var LocalizedTextField = /*#__PURE__*/function (_Component) {
|
|
|
110
111
|
hasError: hasError,
|
|
111
112
|
placeholder: this.props.placeholder,
|
|
112
113
|
horizontalConstraint: "scale"
|
|
113
|
-
}, filterDataAttributes(this.props))
|
|
114
|
+
}, filterDataAttributes(this.props)), {}, {
|
|
115
|
+
"aria-invalid": hasError,
|
|
116
|
+
"aria-errormessage": sequentialErrorsId
|
|
117
|
+
})), jsx(FieldErrors, {
|
|
118
|
+
id: sequentialErrorsId,
|
|
114
119
|
errors: this.props.errors,
|
|
115
120
|
isVisible: hasError,
|
|
116
121
|
renderError: this.props.renderError
|
|
@@ -164,6 +169,6 @@ LocalizedTextField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
164
169
|
var LocalizedTextField$1 = LocalizedTextField;
|
|
165
170
|
|
|
166
171
|
// NOTE: This string will be replaced on build time with the package version.
|
|
167
|
-
var version = "13.0.
|
|
172
|
+
var version = "13.0.4";
|
|
168
173
|
|
|
169
174
|
export { LocalizedTextField$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/localized-text-field",
|
|
3
3
|
"description": "A controlled text input component for localized 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,16 +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.
|
|
28
|
-
"@commercetools-uikit/localized-text-input": "13.0.
|
|
26
|
+
"@commercetools-uikit/field-errors": "13.0.4",
|
|
27
|
+
"@commercetools-uikit/field-label": "13.0.4",
|
|
28
|
+
"@commercetools-uikit/localized-text-input": "13.0.4",
|
|
29
29
|
"@commercetools-uikit/spacings": "13.0.2",
|
|
30
30
|
"@commercetools-uikit/utils": "13.0.2",
|
|
31
31
|
"@emotion/react": "^11.4.0",
|
|
32
32
|
"@emotion/styled": "^11.3.0",
|
|
33
|
-
"common-tags": "1.8.2",
|
|
34
33
|
"prop-types": "15.8.1",
|
|
35
|
-
"react-
|
|
34
|
+
"react-intl": "^5.24.6"
|
|
36
35
|
},
|
|
37
36
|
"devDependencies": {
|
|
38
37
|
"react": "17.0.2"
|