@commercetools-uikit/number-field 20.2.2 → 20.3.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.
@@ -131,8 +131,8 @@ let NumberField = /*#__PURE__*/function (_Component) {
131
131
  }
132
132
  const hasError = this.props.touched && hasErrors(this.props.errors);
133
133
  const hasWarning = this.props.touched && hasWarnings(this.props.warnings);
134
- const errorsContainerId = `${this.state.id}-errors`;
135
- const warningsContainerId = `${this.state.id}-warnings`;
134
+ const errorsContainerId = "".concat(this.state.id, "-errors");
135
+ const warningsContainerId = "".concat(this.state.id, "-warnings");
136
136
  return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
137
137
  max: this.props.horizontalConstraint,
138
138
  children: jsxRuntime.jsxs(Stack__default["default"], {
@@ -172,9 +172,13 @@ let NumberField = /*#__PURE__*/function (_Component) {
172
172
  id: errorsContainerId,
173
173
  errors: this.props.errors,
174
174
  isVisible: hasError,
175
- renderError: (key, error) =>
176
- // Custom errors take precedence over the default errors
177
- this.props.renderError?.(key, error) || this.renderError(key)
175
+ renderError: (key, error) => {
176
+ var _this$props$renderErr, _this$props;
177
+ return (
178
+ // Custom errors take precedence over the default errors
179
+ ((_this$props$renderErr = (_this$props = this.props).renderError) === null || _this$props$renderErr === void 0 ? void 0 : _this$props$renderErr.call(_this$props, key, error)) || this.renderError(key)
180
+ );
181
+ }
178
182
  }), jsxRuntime.jsx(FieldWarnings__default["default"], {
179
183
  id: warningsContainerId,
180
184
  warnings: this.props.warnings,
@@ -207,7 +211,7 @@ NumberField.getDerivedStateFromProps = (props, state) => ({
207
211
  var NumberField$1 = NumberField;
208
212
 
209
213
  // NOTE: This string will be replaced on build time with the package version.
210
- var version = "20.2.2";
214
+ var version = "20.3.0";
211
215
 
212
216
  exports["default"] = NumberField$1;
213
217
  exports.version = version;
@@ -127,8 +127,8 @@ let NumberField = /*#__PURE__*/function (_Component) {
127
127
  if (this.props.hintIcon) ;
128
128
  const hasError = this.props.touched && hasErrors(this.props.errors);
129
129
  const hasWarning = this.props.touched && hasWarnings(this.props.warnings);
130
- const errorsContainerId = `${this.state.id}-errors`;
131
- const warningsContainerId = `${this.state.id}-warnings`;
130
+ const errorsContainerId = "".concat(this.state.id, "-errors");
131
+ const warningsContainerId = "".concat(this.state.id, "-warnings");
132
132
  return jsxRuntime.jsx(Constraints__default["default"].Horizontal, {
133
133
  max: this.props.horizontalConstraint,
134
134
  children: jsxRuntime.jsxs(Stack__default["default"], {
@@ -168,9 +168,13 @@ let NumberField = /*#__PURE__*/function (_Component) {
168
168
  id: errorsContainerId,
169
169
  errors: this.props.errors,
170
170
  isVisible: hasError,
171
- renderError: (key, error) =>
172
- // Custom errors take precedence over the default errors
173
- this.props.renderError?.(key, error) || this.renderError(key)
171
+ renderError: (key, error) => {
172
+ var _this$props$renderErr, _this$props;
173
+ return (
174
+ // Custom errors take precedence over the default errors
175
+ ((_this$props$renderErr = (_this$props = this.props).renderError) === null || _this$props$renderErr === void 0 ? void 0 : _this$props$renderErr.call(_this$props, key, error)) || this.renderError(key)
176
+ );
177
+ }
174
178
  }), jsxRuntime.jsx(FieldWarnings__default["default"], {
175
179
  id: warningsContainerId,
176
180
  warnings: this.props.warnings,
@@ -203,7 +207,7 @@ NumberField.getDerivedStateFromProps = (props, state) => ({
203
207
  var NumberField$1 = NumberField;
204
208
 
205
209
  // NOTE: This string will be replaced on build time with the package version.
206
- var version = "20.2.2";
210
+ var version = "20.3.0";
207
211
 
208
212
  exports["default"] = NumberField$1;
209
213
  exports.version = version;
@@ -107,8 +107,8 @@ let NumberField = /*#__PURE__*/function (_Component) {
107
107
  }
108
108
  const hasError = this.props.touched && hasErrors(this.props.errors);
109
109
  const hasWarning = this.props.touched && hasWarnings(this.props.warnings);
110
- const errorsContainerId = `${this.state.id}-errors`;
111
- const warningsContainerId = `${this.state.id}-warnings`;
110
+ const errorsContainerId = "".concat(this.state.id, "-errors");
111
+ const warningsContainerId = "".concat(this.state.id, "-warnings");
112
112
  return jsx(Constraints.Horizontal, {
113
113
  max: this.props.horizontalConstraint,
114
114
  children: jsxs(Stack, {
@@ -148,9 +148,13 @@ let NumberField = /*#__PURE__*/function (_Component) {
148
148
  id: errorsContainerId,
149
149
  errors: this.props.errors,
150
150
  isVisible: hasError,
151
- renderError: (key, error) =>
152
- // Custom errors take precedence over the default errors
153
- this.props.renderError?.(key, error) || this.renderError(key)
151
+ renderError: (key, error) => {
152
+ var _this$props$renderErr, _this$props;
153
+ return (
154
+ // Custom errors take precedence over the default errors
155
+ ((_this$props$renderErr = (_this$props = this.props).renderError) === null || _this$props$renderErr === void 0 ? void 0 : _this$props$renderErr.call(_this$props, key, error)) || this.renderError(key)
156
+ );
157
+ }
154
158
  }), jsx(FieldWarnings, {
155
159
  id: warningsContainerId,
156
160
  warnings: this.props.warnings,
@@ -183,6 +187,6 @@ NumberField.getDerivedStateFromProps = (props, state) => ({
183
187
  var NumberField$1 = NumberField;
184
188
 
185
189
  // NOTE: This string will be replaced on build time with the package version.
186
- var version = "20.2.2";
190
+ var version = "20.3.0";
187
191
 
188
192
  export { NumberField$1 as default, version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/number-field",
3
3
  "description": "A controlled input component for numbers with validation states and a label.",
4
- "version": "20.2.2",
4
+ "version": "20.3.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,20 +21,20 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/constraints": "20.2.2",
25
- "@commercetools-uikit/design-system": "20.2.2",
26
- "@commercetools-uikit/field-errors": "20.2.2",
27
- "@commercetools-uikit/field-label": "20.2.2",
28
- "@commercetools-uikit/field-warnings": "20.2.2",
29
- "@commercetools-uikit/number-input": "20.2.2",
30
- "@commercetools-uikit/spacings-stack": "20.2.2",
31
- "@commercetools-uikit/utils": "20.2.2",
24
+ "@commercetools-uikit/constraints": "20.3.0",
25
+ "@commercetools-uikit/design-system": "20.3.0",
26
+ "@commercetools-uikit/field-errors": "20.3.0",
27
+ "@commercetools-uikit/field-label": "20.3.0",
28
+ "@commercetools-uikit/field-warnings": "20.3.0",
29
+ "@commercetools-uikit/number-input": "20.3.0",
30
+ "@commercetools-uikit/spacings-stack": "20.3.0",
31
+ "@commercetools-uikit/utils": "20.3.0",
32
32
  "@emotion/react": "^11.10.5",
33
33
  "@emotion/styled": "^11.10.5",
34
34
  "react-intl": "^7.1.4"
35
35
  },
36
36
  "devDependencies": {
37
- "react": "19.1.0"
37
+ "react": "19.2.0"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": "19.x"