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 isValidNumericText = (text4, { allowDecimal = false, allowNegative = false } = {}) => {
189342
- const sign2 = allowNegative ? "-?" : "";
189343
- const body = allowDecimal ? "d*.?d*" : "d*";
189344
- return new RegExp(`^${sign2}${body}$`).test(text4);
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,6 +1,6 @@
1
1
  {
2
2
  "name": "anteriority-ui",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Librería interna de componentes React (UI) construida sobre MUI, lucide-react y CSS Modules.",
5
5
  "main": "index.js",
6
6
  "license": "ISC",
@@ -1,8 +1,10 @@
1
- const isValidNumericText = (text, { allowDecimal = false, allowNegative = false } = {}) => {
2
- const sign = allowNegative ? "-?" : "";
3
- const body = allowDecimal ? "d*.?d*" : "d*";
4
- return new RegExp(`^${sign}${body}$`).test(text);
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;