@pnkx-lib/ui 1.9.477 → 1.9.478

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.
@@ -1295,6 +1295,7 @@ const Input = (props) => {
1295
1295
  subLabel,
1296
1296
  classNameSubLabel,
1297
1297
  maxValue,
1298
+ minValue,
1298
1299
  ...restProps
1299
1300
  } = props;
1300
1301
  const { name, value, onChange, onBlur } = field || {};
@@ -1363,6 +1364,7 @@ const Input = (props) => {
1363
1364
  NumericFormatCustom,
1364
1365
  {
1365
1366
  maxValue,
1367
+ minValue,
1366
1368
  name,
1367
1369
  ref: inputRef,
1368
1370
  type,
@@ -1448,6 +1450,7 @@ const NumericFormatCustom = forwardRef((props, ref) => {
1448
1450
  type,
1449
1451
  prefix,
1450
1452
  helperText,
1453
+ minValue,
1451
1454
  maxValue = 999999999999999,
1452
1455
  decimalScale,
1453
1456
  thousandSeparator,
@@ -1488,7 +1491,10 @@ const NumericFormatCustom = forwardRef((props, ref) => {
1488
1491
  prefix: isMoney ? "$" : prefix,
1489
1492
  isAllowed: (values) => {
1490
1493
  const { floatValue } = values;
1491
- return floatValue === void 0 || floatValue.toString().length <= maxValue;
1494
+ if (floatValue === void 0) return true;
1495
+ if (minValue !== void 0 && floatValue < minValue) return false;
1496
+ if (maxValue !== void 0 && floatValue > maxValue) return false;
1497
+ return true;
1492
1498
  },
1493
1499
  ...restProps
1494
1500
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.477",
4
+ "version": "1.9.478",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",
@@ -24,6 +24,7 @@ export interface InputProps extends InputPropsAntd {
24
24
  subLabel?: string;
25
25
  classNameSubLabel?: string;
26
26
  maxValue?: number;
27
+ minValue?: number;
27
28
  thousandSeparator?: string;
28
29
  decimalSeparator?: string;
29
30
  }