anteriority-ui 1.1.0 → 1.1.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.
package/.verify-bundle.js
CHANGED
|
@@ -189338,11 +189338,13 @@ var Input_default = {
|
|
|
189338
189338
|
};
|
|
189339
189339
|
|
|
189340
189340
|
// dist/screens/components/Input/utils.js
|
|
189341
|
-
var
|
|
189342
|
-
|
|
189343
|
-
|
|
189344
|
-
|
|
189341
|
+
var NUMERIC_PATTERNS = {
|
|
189342
|
+
"int": /^\d*$/,
|
|
189343
|
+
"int-neg": /^-?\d*$/,
|
|
189344
|
+
"dec": /^\d*\.?\d*$/,
|
|
189345
|
+
"dec-neg": /^-?\d*\.?\d*$/
|
|
189345
189346
|
};
|
|
189347
|
+
var isValidNumericText = (text4, { allowDecimal = false, allowNegative = false } = {}) => NUMERIC_PATTERNS[`${allowDecimal ? "dec" : "int"}${allowNegative ? "-neg" : ""}`].test(text4);
|
|
189346
189348
|
var clampNumber = (n2, min10, max10) => {
|
|
189347
189349
|
let out = n2;
|
|
189348
189350
|
if (min10 !== void 0 && out < min10) out = min10;
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const NUMERIC_PATTERNS = {
|
|
2
|
+
"int": /^\d*$/,
|
|
3
|
+
"int-neg": /^-?\d*$/,
|
|
4
|
+
"dec": /^\d*\.?\d*$/,
|
|
5
|
+
"dec-neg": /^-?\d*\.?\d*$/
|
|
5
6
|
};
|
|
7
|
+
const isValidNumericText = (text, { allowDecimal = false, allowNegative = false } = {}) => NUMERIC_PATTERNS[`${allowDecimal ? "dec" : "int"}${allowNegative ? "-neg" : ""}`].test(text);
|
|
6
8
|
const clampNumber = (n, min, max) => {
|
|
7
9
|
let out = n;
|
|
8
10
|
if (min !== void 0 && out < min) out = min;
|