@commercetools-uikit/creatable-select-field 19.12.0 → 19.13.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.
@@ -58,8 +58,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
58
58
  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)); }
59
59
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
60
60
  const sequentialId = utils.createSequentialId('creatable-select-field-');
61
- const sequentialErrorsId = utils.createSequentialId('creatable-select-field-error-')();
62
- const sequentialWarningsId = utils.createSequentialId('creatable-select-field-warning-')();
63
61
  const hasErrors = errors => {
64
62
  var _context;
65
63
  return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
@@ -99,6 +97,8 @@ let CreatableSelectField = /*#__PURE__*/function (_Component) {
99
97
  process.env.NODE_ENV !== "production" ? utils.warning(_Array$isArray__default["default"](this.props.value), 'CreatableSelectField: `value` is expected to be an array of string when isMulti is true') : void 0;
100
98
  process.env.NODE_ENV !== "production" ? utils.warning(typeof this.props.touched === 'undefined' || _Array$isArray__default["default"](this.props.touched), 'CreatableSelectField: `touched` is expected to be an array of boolean when isMulti is true') : void 0;
101
99
  }
100
+ const errorsContainerId = `${this.state.id}-errors`;
101
+ const warningsContainerId = `${this.state.id}-warnings`;
102
102
  return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
103
103
  max: this.props.horizontalConstraint,
104
104
  children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
@@ -118,7 +118,7 @@ let CreatableSelectField = /*#__PURE__*/function (_Component) {
118
118
  "aria-label": this.props['aria-label'],
119
119
  "aria-labelledby": this.props['aria-labelledby'],
120
120
  "aria-invalid": hasError,
121
- "aria-errormessage": sequentialErrorsId,
121
+ "aria-errormessage": errorsContainerId,
122
122
  isAutofocussed: this.props.isAutofocussed,
123
123
  backspaceRemovesValue: this.props.backspaceRemovesValue,
124
124
  components: this.props.components,
@@ -158,12 +158,12 @@ let CreatableSelectField = /*#__PURE__*/function (_Component) {
158
158
  iconLeft: this.props.iconLeft,
159
159
  isCondensed: this.props.isCondensed
160
160
  }, utils.filterDataAttributes(this.props))), jsxRuntime.jsx(FieldErrors__default["default"], {
161
- id: sequentialErrorsId,
161
+ id: errorsContainerId,
162
162
  errors: this.props.errors,
163
163
  isVisible: hasError,
164
164
  renderError: this.props.renderError
165
165
  }), jsxRuntime.jsx(FieldWarnings__default["default"], {
166
- id: sequentialWarningsId,
166
+ id: warningsContainerId,
167
167
  warnings: this.props.warnings,
168
168
  isVisible: hasWarning,
169
169
  renderWarning: this.props.renderWarning
@@ -226,7 +226,7 @@ CreatableSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
226
226
  } : {};
227
227
 
228
228
  // NOTE: This string will be replaced on build time with the package version.
229
- var version = "19.11.0";
229
+ var version = "19.13.0";
230
230
 
231
231
  exports["default"] = CreatableSelectField;
232
232
  exports.version = version;
@@ -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('creatable-select-field-');
59
- const sequentialErrorsId = utils.createSequentialId('creatable-select-field-error-')();
60
- const sequentialWarningsId = utils.createSequentialId('creatable-select-field-warning-')();
61
59
  const hasErrors = errors => {
62
60
  var _context;
63
61
  return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
@@ -90,6 +88,8 @@ let CreatableSelectField = /*#__PURE__*/function (_Component) {
90
88
  if (!this.props.isReadOnly) ;
91
89
  if (this.props.hintIcon) ;
92
90
  if (this.props.isMulti) ;
91
+ const errorsContainerId = `${this.state.id}-errors`;
92
+ const warningsContainerId = `${this.state.id}-warnings`;
93
93
  return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
94
94
  max: this.props.horizontalConstraint,
95
95
  children: jsxRuntime.jsxs(Spacings__default["default"].Stack, {
@@ -109,7 +109,7 @@ let CreatableSelectField = /*#__PURE__*/function (_Component) {
109
109
  "aria-label": this.props['aria-label'],
110
110
  "aria-labelledby": this.props['aria-labelledby'],
111
111
  "aria-invalid": hasError,
112
- "aria-errormessage": sequentialErrorsId,
112
+ "aria-errormessage": errorsContainerId,
113
113
  isAutofocussed: this.props.isAutofocussed,
114
114
  backspaceRemovesValue: this.props.backspaceRemovesValue,
115
115
  components: this.props.components,
@@ -149,12 +149,12 @@ let CreatableSelectField = /*#__PURE__*/function (_Component) {
149
149
  iconLeft: this.props.iconLeft,
150
150
  isCondensed: this.props.isCondensed
151
151
  }, utils.filterDataAttributes(this.props))), jsxRuntime.jsx(FieldErrors__default["default"], {
152
- id: sequentialErrorsId,
152
+ id: errorsContainerId,
153
153
  errors: this.props.errors,
154
154
  isVisible: hasError,
155
155
  renderError: this.props.renderError
156
156
  }), jsxRuntime.jsx(FieldWarnings__default["default"], {
157
- id: sequentialWarningsId,
157
+ id: warningsContainerId,
158
158
  warnings: this.props.warnings,
159
159
  isVisible: hasWarning,
160
160
  renderWarning: this.props.renderWarning
@@ -185,7 +185,7 @@ CreatableSelectField.getDerivedStateFromProps = (props, state) => ({
185
185
  CreatableSelectField.propTypes = {};
186
186
 
187
187
  // NOTE: This string will be replaced on build time with the package version.
188
- var version = "19.11.0";
188
+ var version = "19.13.0";
189
189
 
190
190
  exports["default"] = CreatableSelectField;
191
191
  exports.version = version;
@@ -32,8 +32,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _co
32
32
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
33
33
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
34
34
  const sequentialId = createSequentialId('creatable-select-field-');
35
- const sequentialErrorsId = createSequentialId('creatable-select-field-error-')();
36
- const sequentialWarningsId = createSequentialId('creatable-select-field-warning-')();
37
35
  const hasErrors = errors => {
38
36
  var _context;
39
37
  return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
@@ -73,6 +71,8 @@ let CreatableSelectField = /*#__PURE__*/function (_Component) {
73
71
  process.env.NODE_ENV !== "production" ? warning(_Array$isArray(this.props.value), 'CreatableSelectField: `value` is expected to be an array of string when isMulti is true') : void 0;
74
72
  process.env.NODE_ENV !== "production" ? warning(typeof this.props.touched === 'undefined' || _Array$isArray(this.props.touched), 'CreatableSelectField: `touched` is expected to be an array of boolean when isMulti is true') : void 0;
75
73
  }
74
+ const errorsContainerId = `${this.state.id}-errors`;
75
+ const warningsContainerId = `${this.state.id}-warnings`;
76
76
  return jsx(Constraints.Horizontal, {
77
77
  max: this.props.horizontalConstraint,
78
78
  children: jsxs(Spacings.Stack, {
@@ -92,7 +92,7 @@ let CreatableSelectField = /*#__PURE__*/function (_Component) {
92
92
  "aria-label": this.props['aria-label'],
93
93
  "aria-labelledby": this.props['aria-labelledby'],
94
94
  "aria-invalid": hasError,
95
- "aria-errormessage": sequentialErrorsId,
95
+ "aria-errormessage": errorsContainerId,
96
96
  isAutofocussed: this.props.isAutofocussed,
97
97
  backspaceRemovesValue: this.props.backspaceRemovesValue,
98
98
  components: this.props.components,
@@ -132,12 +132,12 @@ let CreatableSelectField = /*#__PURE__*/function (_Component) {
132
132
  iconLeft: this.props.iconLeft,
133
133
  isCondensed: this.props.isCondensed
134
134
  }, filterDataAttributes(this.props))), jsx(FieldErrors, {
135
- id: sequentialErrorsId,
135
+ id: errorsContainerId,
136
136
  errors: this.props.errors,
137
137
  isVisible: hasError,
138
138
  renderError: this.props.renderError
139
139
  }), jsx(FieldWarnings, {
140
- id: sequentialWarningsId,
140
+ id: warningsContainerId,
141
141
  warnings: this.props.warnings,
142
142
  isVisible: hasWarning,
143
143
  renderWarning: this.props.renderWarning
@@ -200,6 +200,6 @@ CreatableSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
200
200
  } : {};
201
201
 
202
202
  // NOTE: This string will be replaced on build time with the package version.
203
- var version = "19.11.0";
203
+ var version = "19.13.0";
204
204
 
205
205
  export { CreatableSelectField as default, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/creatable-select-field",
3
3
  "description": "A controlled input component with validation states and a label getting a selection from the user, and where options can also be created by the user.",
4
- "version": "19.12.0",
4
+ "version": "19.13.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.12.0",
25
- "@commercetools-uikit/creatable-select-input": "19.12.0",
26
- "@commercetools-uikit/design-system": "19.12.0",
27
- "@commercetools-uikit/field-errors": "19.12.0",
28
- "@commercetools-uikit/field-label": "19.12.0",
29
- "@commercetools-uikit/field-warnings": "19.12.0",
30
- "@commercetools-uikit/spacings": "19.12.0",
31
- "@commercetools-uikit/utils": "19.12.0",
24
+ "@commercetools-uikit/constraints": "19.13.0",
25
+ "@commercetools-uikit/creatable-select-input": "19.13.0",
26
+ "@commercetools-uikit/design-system": "19.13.0",
27
+ "@commercetools-uikit/field-errors": "19.13.0",
28
+ "@commercetools-uikit/field-label": "19.13.0",
29
+ "@commercetools-uikit/field-warnings": "19.13.0",
30
+ "@commercetools-uikit/spacings": "19.13.0",
31
+ "@commercetools-uikit/utils": "19.13.0",
32
32
  "@emotion/react": "^11.10.5",
33
33
  "@emotion/styled": "^11.10.5",
34
34
  "prop-types": "15.8.1",