@commercetools-uikit/time-field 14.0.6 → 15.1.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.
|
@@ -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('time-field-');
|
|
62
|
+
var sequentialErrorsId = utils.createSequentialId('time-field-error-')();
|
|
62
63
|
|
|
63
64
|
var hasErrors = function hasErrors(errors) {
|
|
64
65
|
var _context;
|
|
@@ -117,7 +118,7 @@ var TimeField = /*#__PURE__*/function (_Component) {
|
|
|
117
118
|
badge: this.props.badge,
|
|
118
119
|
hasRequiredIndicator: this.props.isRequired,
|
|
119
120
|
htmlFor: this.state.id
|
|
120
|
-
}), jsxRuntime.jsx(TimeInput__default["default"], _objectSpread({
|
|
121
|
+
}), jsxRuntime.jsx(TimeInput__default["default"], _objectSpread(_objectSpread({
|
|
121
122
|
id: this.state.id,
|
|
122
123
|
name: this.props.name,
|
|
123
124
|
autoComplete: this.props.autoComplete,
|
|
@@ -131,7 +132,11 @@ var TimeField = /*#__PURE__*/function (_Component) {
|
|
|
131
132
|
placeholder: this.props.placeholder,
|
|
132
133
|
horizontalConstraint: "scale",
|
|
133
134
|
isReadOnly: this.props.isReadOnly
|
|
134
|
-
}, utils.filterDataAttributes(this.props))
|
|
135
|
+
}, utils.filterDataAttributes(this.props)), {}, {
|
|
136
|
+
/* ARIA */
|
|
137
|
+
"aria-invalid": hasError,
|
|
138
|
+
"aria-errormessage": sequentialErrorsId
|
|
139
|
+
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
135
140
|
errors: this.props.errors,
|
|
136
141
|
isVisible: hasError,
|
|
137
142
|
renderError: this.props.renderError
|
|
@@ -193,7 +198,7 @@ TimeField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
193
198
|
var TimeField$1 = TimeField;
|
|
194
199
|
|
|
195
200
|
// NOTE: This string will be replaced on build time with the package version.
|
|
196
|
-
var version = "
|
|
201
|
+
var version = "15.1.1";
|
|
197
202
|
|
|
198
203
|
exports["default"] = TimeField$1;
|
|
199
204
|
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('time-field-');
|
|
61
|
+
var sequentialErrorsId = utils.createSequentialId('time-field-error-')();
|
|
61
62
|
|
|
62
63
|
var hasErrors = function hasErrors(errors) {
|
|
63
64
|
var _context;
|
|
@@ -112,7 +113,7 @@ var TimeField = /*#__PURE__*/function (_Component) {
|
|
|
112
113
|
badge: this.props.badge,
|
|
113
114
|
hasRequiredIndicator: this.props.isRequired,
|
|
114
115
|
htmlFor: this.state.id
|
|
115
|
-
}), jsxRuntime.jsx(TimeInput__default["default"], _objectSpread({
|
|
116
|
+
}), jsxRuntime.jsx(TimeInput__default["default"], _objectSpread(_objectSpread({
|
|
116
117
|
id: this.state.id,
|
|
117
118
|
name: this.props.name,
|
|
118
119
|
autoComplete: this.props.autoComplete,
|
|
@@ -126,7 +127,11 @@ var TimeField = /*#__PURE__*/function (_Component) {
|
|
|
126
127
|
placeholder: this.props.placeholder,
|
|
127
128
|
horizontalConstraint: "scale",
|
|
128
129
|
isReadOnly: this.props.isReadOnly
|
|
129
|
-
}, utils.filterDataAttributes(this.props))
|
|
130
|
+
}, utils.filterDataAttributes(this.props)), {}, {
|
|
131
|
+
/* ARIA */
|
|
132
|
+
"aria-invalid": hasError,
|
|
133
|
+
"aria-errormessage": sequentialErrorsId
|
|
134
|
+
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
130
135
|
errors: this.props.errors,
|
|
131
136
|
isVisible: hasError,
|
|
132
137
|
renderError: this.props.renderError
|
|
@@ -165,7 +170,7 @@ TimeField.propTypes = {};
|
|
|
165
170
|
var TimeField$1 = TimeField;
|
|
166
171
|
|
|
167
172
|
// NOTE: This string will be replaced on build time with the package version.
|
|
168
|
-
var version = "
|
|
173
|
+
var version = "15.1.1";
|
|
169
174
|
|
|
170
175
|
exports["default"] = TimeField$1;
|
|
171
176
|
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('time-field-');
|
|
37
|
+
var sequentialErrorsId = createSequentialId('time-field-error-')();
|
|
37
38
|
|
|
38
39
|
var hasErrors = function hasErrors(errors) {
|
|
39
40
|
var _context;
|
|
@@ -92,7 +93,7 @@ var TimeField = /*#__PURE__*/function (_Component) {
|
|
|
92
93
|
badge: this.props.badge,
|
|
93
94
|
hasRequiredIndicator: this.props.isRequired,
|
|
94
95
|
htmlFor: this.state.id
|
|
95
|
-
}), jsx(TimeInput, _objectSpread({
|
|
96
|
+
}), jsx(TimeInput, _objectSpread(_objectSpread({
|
|
96
97
|
id: this.state.id,
|
|
97
98
|
name: this.props.name,
|
|
98
99
|
autoComplete: this.props.autoComplete,
|
|
@@ -106,7 +107,11 @@ var TimeField = /*#__PURE__*/function (_Component) {
|
|
|
106
107
|
placeholder: this.props.placeholder,
|
|
107
108
|
horizontalConstraint: "scale",
|
|
108
109
|
isReadOnly: this.props.isReadOnly
|
|
109
|
-
}, filterDataAttributes(this.props))
|
|
110
|
+
}, filterDataAttributes(this.props)), {}, {
|
|
111
|
+
/* ARIA */
|
|
112
|
+
"aria-invalid": hasError,
|
|
113
|
+
"aria-errormessage": sequentialErrorsId
|
|
114
|
+
})), jsx(FieldErrors, {
|
|
110
115
|
errors: this.props.errors,
|
|
111
116
|
isVisible: hasError,
|
|
112
117
|
renderError: this.props.renderError
|
|
@@ -168,6 +173,6 @@ TimeField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
168
173
|
var TimeField$1 = TimeField;
|
|
169
174
|
|
|
170
175
|
// NOTE: This string will be replaced on build time with the package version.
|
|
171
|
-
var version = "
|
|
176
|
+
var version = "15.1.1";
|
|
172
177
|
|
|
173
178
|
export { TimeField$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/time-field",
|
|
3
3
|
"description": "A controlled date input component for single date.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "15.1.1",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.17.2",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.17.2",
|
|
24
|
-
"@commercetools-uikit/constraints": "
|
|
25
|
-
"@commercetools-uikit/design-system": "
|
|
26
|
-
"@commercetools-uikit/field-errors": "
|
|
27
|
-
"@commercetools-uikit/field-label": "
|
|
28
|
-
"@commercetools-uikit/spacings-stack": "
|
|
29
|
-
"@commercetools-uikit/time-input": "
|
|
30
|
-
"@commercetools-uikit/utils": "
|
|
24
|
+
"@commercetools-uikit/constraints": "15.1.1",
|
|
25
|
+
"@commercetools-uikit/design-system": "15.1.1",
|
|
26
|
+
"@commercetools-uikit/field-errors": "15.1.1",
|
|
27
|
+
"@commercetools-uikit/field-label": "15.1.1",
|
|
28
|
+
"@commercetools-uikit/spacings-stack": "15.1.1",
|
|
29
|
+
"@commercetools-uikit/time-input": "15.1.1",
|
|
30
|
+
"@commercetools-uikit/utils": "15.1.1",
|
|
31
31
|
"@emotion/react": "^11.4.0",
|
|
32
32
|
"@emotion/styled": "^11.3.0",
|
|
33
33
|
"prop-types": "15.8.1",
|