@symply.io/basic-components 1.5.2-alpha.2 → 1.5.2

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.
@@ -16,16 +16,16 @@ function useInteractions(props) {
16
16
  event.preventDefault();
17
17
  }
18
18
  }
19
- else if (value.includes(".") && decimals > 0) {
20
- var decimalStrLen = value.split(".")[1].length;
21
- if (key !== "Backspace" && decimalStrLen >= decimals) {
22
- event.preventDefault();
23
- }
24
- }
25
19
  else {
26
20
  if (key === "-") {
27
21
  event.preventDefault();
28
22
  }
23
+ else if (value.includes(".") && decimals > 0) {
24
+ var decimalStrLen = value.split(".")[1].length;
25
+ if (key !== "Backspace" && decimalStrLen >= decimals) {
26
+ event.preventDefault();
27
+ }
28
+ }
29
29
  }
30
30
  }, [value, minValue, integerOnly]);
31
31
  var handleChange = useCallback(function (event) {
package/README.md CHANGED
@@ -707,9 +707,10 @@ import NumberInput from '@symply.io/basic-components/NumberInput';
707
707
 
708
708
  | Name | Type | Default | Required | Description |
709
709
  | ----------- | ------ | ----------- | -------- | ------------------------------------------------------------ |
710
+ | decimals | number | 0 | false | The max length of decimals, if `0` then no limit. |
710
711
  | integerOnly | bool | | false | If `true`, not allow to type a decimal value. |
711
712
  | maxValue | number | 2^53 − 1 | false | The max value of the `Input` element you can type in. |
712
- | minValue | Number | −(2^53 − 1) | false | The min value of the `Input` element you should type in. |
713
+ | minValue | number | −(2^53 − 1) | false | The min value of the `Input` element you should type in. |
713
714
  | onChange | func | | true | Callback fired when the `Input` value is changed.<br />**Signature:**<br/>`function(value: string) => void`<br/>*value:* The value of the `Input` element. |
714
715
  | tooltip | string | | false | A tooltip for the `Input` element. |
715
716
  | value | string | | true | The value of the `Input` element. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symply.io/basic-components",
3
- "version": "1.5.2-alpha.2",
3
+ "version": "1.5.2",
4
4
  "description": "Basic and reusable components for all frontend of Symply apps",
5
5
  "keywords": [
6
6
  "react",