@commercetools-uikit/date-field 19.12.1 → 19.14.0
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.
|
@@ -56,8 +56,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
|
|
|
56
56
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
57
57
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
58
58
|
const sequentialId = utils.createSequentialId('date-field-');
|
|
59
|
-
const sequentialErrorsId = utils.createSequentialId('date-field-error-')();
|
|
60
|
-
const sequentialWarningsId = utils.createSequentialId('date-field-warning-')();
|
|
61
59
|
|
|
62
60
|
// Similar shape of `FormikErrors` but values are `TFieldErrors` objects.
|
|
63
61
|
|
|
@@ -96,6 +94,8 @@ let DateField = /*#__PURE__*/function (_Component) {
|
|
|
96
94
|
if (this.props.hintIcon) {
|
|
97
95
|
process.env.NODE_ENV !== "production" ? utils.warning(typeof this.props.hint === 'string' || /*#__PURE__*/react.isValidElement(this.props.hint), 'DateField: `hint` is required to be string or ReactNode if hintIcon is present') : void 0;
|
|
98
96
|
}
|
|
97
|
+
const errorsContainerId = `${this.state.id}-errors`;
|
|
98
|
+
const warningsContainerId = `${this.state.id}-warnings`;
|
|
99
99
|
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
100
100
|
max: this.props.horizontalConstraint,
|
|
101
101
|
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
@@ -128,14 +128,14 @@ let DateField = /*#__PURE__*/function (_Component) {
|
|
|
128
128
|
}, utils.filterDataAttributes(this.props)), {}, {
|
|
129
129
|
/* ARIA */
|
|
130
130
|
"aria-invalid": hasError,
|
|
131
|
-
"aria-errormessage":
|
|
131
|
+
"aria-errormessage": errorsContainerId
|
|
132
132
|
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
133
|
-
id:
|
|
133
|
+
id: errorsContainerId,
|
|
134
134
|
errors: this.props.errors,
|
|
135
135
|
isVisible: hasError,
|
|
136
136
|
renderError: this.props.renderError
|
|
137
137
|
}), jsxRuntime.jsx(FieldWarnings__default["default"], {
|
|
138
|
-
id:
|
|
138
|
+
id: warningsContainerId,
|
|
139
139
|
warnings: this.props.warnings,
|
|
140
140
|
isVisible: hasWarning,
|
|
141
141
|
renderWarning: this.props.renderWarning
|
|
@@ -193,7 +193,7 @@ DateField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
193
193
|
var DateField$1 = DateField;
|
|
194
194
|
|
|
195
195
|
// NOTE: This string will be replaced on build time with the package version.
|
|
196
|
-
var version = "19.
|
|
196
|
+
var version = "19.14.0";
|
|
197
197
|
|
|
198
198
|
exports["default"] = DateField$1;
|
|
199
199
|
exports.version = version;
|
|
@@ -55,8 +55,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
|
|
|
55
55
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
56
56
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
57
57
|
const sequentialId = utils.createSequentialId('date-field-');
|
|
58
|
-
const sequentialErrorsId = utils.createSequentialId('date-field-error-')();
|
|
59
|
-
const sequentialWarningsId = utils.createSequentialId('date-field-warning-')();
|
|
60
58
|
|
|
61
59
|
// Similar shape of `FormikErrors` but values are `TFieldErrors` objects.
|
|
62
60
|
|
|
@@ -91,6 +89,8 @@ let DateField = /*#__PURE__*/function (_Component) {
|
|
|
91
89
|
const hasWarning = this.props.touched && hasWarnings(this.props.warnings);
|
|
92
90
|
if (!this.props.isReadOnly) ;
|
|
93
91
|
if (this.props.hintIcon) ;
|
|
92
|
+
const errorsContainerId = `${this.state.id}-errors`;
|
|
93
|
+
const warningsContainerId = `${this.state.id}-warnings`;
|
|
94
94
|
return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
|
|
95
95
|
max: this.props.horizontalConstraint,
|
|
96
96
|
children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
|
|
@@ -123,14 +123,14 @@ let DateField = /*#__PURE__*/function (_Component) {
|
|
|
123
123
|
}, utils.filterDataAttributes(this.props)), {}, {
|
|
124
124
|
/* ARIA */
|
|
125
125
|
"aria-invalid": hasError,
|
|
126
|
-
"aria-errormessage":
|
|
126
|
+
"aria-errormessage": errorsContainerId
|
|
127
127
|
})), jsxRuntime.jsx(FieldErrors__default["default"], {
|
|
128
|
-
id:
|
|
128
|
+
id: errorsContainerId,
|
|
129
129
|
errors: this.props.errors,
|
|
130
130
|
isVisible: hasError,
|
|
131
131
|
renderError: this.props.renderError
|
|
132
132
|
}), jsxRuntime.jsx(FieldWarnings__default["default"], {
|
|
133
|
-
id:
|
|
133
|
+
id: warningsContainerId,
|
|
134
134
|
warnings: this.props.warnings,
|
|
135
135
|
isVisible: hasWarning,
|
|
136
136
|
renderWarning: this.props.renderWarning
|
|
@@ -162,7 +162,7 @@ DateField.propTypes = {};
|
|
|
162
162
|
var DateField$1 = DateField;
|
|
163
163
|
|
|
164
164
|
// NOTE: This string will be replaced on build time with the package version.
|
|
165
|
-
var version = "19.
|
|
165
|
+
var version = "19.14.0";
|
|
166
166
|
|
|
167
167
|
exports["default"] = DateField$1;
|
|
168
168
|
exports.version = version;
|
|
@@ -31,8 +31,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
|
|
|
31
31
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
32
32
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
33
33
|
const sequentialId = createSequentialId('date-field-');
|
|
34
|
-
const sequentialErrorsId = createSequentialId('date-field-error-')();
|
|
35
|
-
const sequentialWarningsId = createSequentialId('date-field-warning-')();
|
|
36
34
|
|
|
37
35
|
// Similar shape of `FormikErrors` but values are `TFieldErrors` objects.
|
|
38
36
|
|
|
@@ -71,6 +69,8 @@ let DateField = /*#__PURE__*/function (_Component) {
|
|
|
71
69
|
if (this.props.hintIcon) {
|
|
72
70
|
process.env.NODE_ENV !== "production" ? warning(typeof this.props.hint === 'string' || /*#__PURE__*/isValidElement(this.props.hint), 'DateField: `hint` is required to be string or ReactNode if hintIcon is present') : void 0;
|
|
73
71
|
}
|
|
72
|
+
const errorsContainerId = `${this.state.id}-errors`;
|
|
73
|
+
const warningsContainerId = `${this.state.id}-warnings`;
|
|
74
74
|
return jsx(Constraints.Horizontal, {
|
|
75
75
|
max: this.props.horizontalConstraint,
|
|
76
76
|
children: jsxs(Spacings.Stack, {
|
|
@@ -103,14 +103,14 @@ let DateField = /*#__PURE__*/function (_Component) {
|
|
|
103
103
|
}, filterDataAttributes(this.props)), {}, {
|
|
104
104
|
/* ARIA */
|
|
105
105
|
"aria-invalid": hasError,
|
|
106
|
-
"aria-errormessage":
|
|
106
|
+
"aria-errormessage": errorsContainerId
|
|
107
107
|
})), jsx(FieldErrors, {
|
|
108
|
-
id:
|
|
108
|
+
id: errorsContainerId,
|
|
109
109
|
errors: this.props.errors,
|
|
110
110
|
isVisible: hasError,
|
|
111
111
|
renderError: this.props.renderError
|
|
112
112
|
}), jsx(FieldWarnings, {
|
|
113
|
-
id:
|
|
113
|
+
id: warningsContainerId,
|
|
114
114
|
warnings: this.props.warnings,
|
|
115
115
|
isVisible: hasWarning,
|
|
116
116
|
renderWarning: this.props.renderWarning
|
|
@@ -168,6 +168,6 @@ DateField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
168
168
|
var DateField$1 = DateField;
|
|
169
169
|
|
|
170
170
|
// NOTE: This string will be replaced on build time with the package version.
|
|
171
|
-
var version = "19.
|
|
171
|
+
var version = "19.14.0";
|
|
172
172
|
|
|
173
173
|
export { DateField$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/date-field",
|
|
3
3
|
"description": "A controlled date input component for single date, with validation states and a label.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.14.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/constraints": "19.
|
|
25
|
-
"@commercetools-uikit/date-input": "19.
|
|
26
|
-
"@commercetools-uikit/design-system": "19.
|
|
27
|
-
"@commercetools-uikit/field-errors": "19.
|
|
28
|
-
"@commercetools-uikit/field-label": "19.
|
|
29
|
-
"@commercetools-uikit/field-warnings": "19.
|
|
30
|
-
"@commercetools-uikit/spacings": "19.
|
|
31
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/constraints": "19.14.0",
|
|
25
|
+
"@commercetools-uikit/date-input": "19.14.0",
|
|
26
|
+
"@commercetools-uikit/design-system": "19.14.0",
|
|
27
|
+
"@commercetools-uikit/field-errors": "19.14.0",
|
|
28
|
+
"@commercetools-uikit/field-label": "19.14.0",
|
|
29
|
+
"@commercetools-uikit/field-warnings": "19.14.0",
|
|
30
|
+
"@commercetools-uikit/spacings": "19.14.0",
|
|
31
|
+
"@commercetools-uikit/utils": "19.14.0",
|
|
32
32
|
"@emotion/react": "^11.10.5",
|
|
33
33
|
"@emotion/styled": "^11.10.5",
|
|
34
34
|
"prop-types": "15.8.1",
|