@symply.io/basic-components 1.1.2 → 1.1.3-beta.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.
@@ -31,7 +31,7 @@ function NumberInput(props) {
31
31
  var theme = useCustomTheme({ primaryColor: primaryColor, secondaryColor: secondaryColor });
32
32
  var EXCEED_ERROR = "Your value exceeds the exceptable input range";
33
33
  if (maxValue < minValue)
34
- throw new Error("Max should be bigger than min!");
34
+ throw new Error("Max should be bigger than the `miniValue`!");
35
35
  var _e = useInteractions({ maxValue: maxValue, minValue: minValue, value: value, onChange: onChange }), exceedError = _e.exceedError, tooltipOpen = _e.tooltipOpen, handleBlur = _e.handleBlur, handleChange = _e.handleChange, onOpenTooltip = _e.onOpenTooltip, onCloseTooltip = _e.onCloseTooltip;
36
36
  return (_jsx(ThemeProvider, __assign({ theme: theme }, { children: _jsx(Tooltip, __assign({ title: tooltip !== null && tooltip !== void 0 ? tooltip : "", open: !!tooltip && tooltipOpen }, { children: _jsx(Field, __assign({ size: size, margin: "dense", type: "number", value: value === undefined || value === null ? "" : value, onFocus: onOpenTooltip, onBlur: function () {
37
37
  onCloseTooltip();
@@ -35,6 +35,9 @@ function useInteractions(props) {
35
35
  else if (excludedValue.includes(strVal)) {
36
36
  onChange("");
37
37
  }
38
+ else {
39
+ onChange(Number(strVal).toString());
40
+ }
38
41
  }, [value, onChange]);
39
42
  var onOpenTooltip = useCallback(function () {
40
43
  setTooltipOpen(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symply.io/basic-components",
3
- "version": "1.1.2",
3
+ "version": "1.1.3-beta.1",
4
4
  "description": "Basic and reusable components for all frontend of Symply apps",
5
5
  "keywords": [
6
6
  "react",