@zag-js/number-input 0.1.16 → 0.1.17
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/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -375,7 +375,7 @@ var utils = {
|
|
|
375
375
|
return true;
|
|
376
376
|
return ((_a = ctx.validateCharacter) == null ? void 0 : _a.call(ctx, event.key)) ?? utils.isFloatingPoint(event.key);
|
|
377
377
|
},
|
|
378
|
-
isFloatingPoint: (v) => /^[
|
|
378
|
+
isFloatingPoint: (v) => /^[0-9+\-.]$/.test(v),
|
|
379
379
|
sanitize: (ctx, value) => {
|
|
380
380
|
return value.split("").filter(ctx.validateCharacter ?? utils.isFloatingPoint).join("");
|
|
381
381
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -348,7 +348,7 @@ var utils = {
|
|
|
348
348
|
return true;
|
|
349
349
|
return ((_a = ctx.validateCharacter) == null ? void 0 : _a.call(ctx, event.key)) ?? utils.isFloatingPoint(event.key);
|
|
350
350
|
},
|
|
351
|
-
isFloatingPoint: (v) => /^[
|
|
351
|
+
isFloatingPoint: (v) => /^[0-9+\-.]$/.test(v),
|
|
352
352
|
sanitize: (ctx, value) => {
|
|
353
353
|
return value.split("").filter(ctx.validateCharacter ?? utils.isFloatingPoint).join("");
|
|
354
354
|
},
|