@zag-js/number-input
Advanced tools
@@ -188,3 +188,3 @@ "use strict"; | ||
| { | ||
| guard: and("clampValueOnBlur", not("isInRange")), | ||
| guard: and("clampValueOnBlur", not("isValueEmpty"), not("isInRange")), | ||
| target: "idle", | ||
@@ -272,2 +272,3 @@ actions: ["setClampedValue", "clearHint", "invokeOnBlur", "invokeOnValueCommit"] | ||
| isInRange: ({ computed }) => !computed("isOutOfRange"), | ||
| isValueEmpty: ({ computed }) => computed("isValueEmpty"), | ||
| isDecrementHint: ({ context, event }) => (event.hint ?? context.get("hint")) === "decrement", | ||
@@ -274,0 +275,0 @@ isIncrementHint: ({ context, event }) => (event.hint ?? context.get("hint")) === "increment", |
@@ -170,3 +170,3 @@ // src/number-input.machine.ts | ||
| { | ||
| guard: and("clampValueOnBlur", not("isInRange")), | ||
| guard: and("clampValueOnBlur", not("isValueEmpty"), not("isInRange")), | ||
| target: "idle", | ||
@@ -254,2 +254,3 @@ actions: ["setClampedValue", "clearHint", "invokeOnBlur", "invokeOnValueCommit"] | ||
| isInRange: ({ computed }) => !computed("isOutOfRange"), | ||
| isValueEmpty: ({ computed }) => computed("isValueEmpty"), | ||
| isDecrementHint: ({ context, event }) => (event.hint ?? context.get("hint")) === "decrement", | ||
@@ -256,0 +257,0 @@ isIncrementHint: ({ context, event }) => (event.hint ?? context.get("hint")) === "increment", |
+7
-7
| { | ||
| "name": "@zag-js/number-input", | ||
| "version": "1.40.0", | ||
| "version": "1.41.0", | ||
| "description": "Core logic for the number-input widget implemented as a state machine", | ||
@@ -29,8 +29,8 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@internationalized/number": "3.6.5", | ||
| "@zag-js/anatomy": "1.40.0", | ||
| "@zag-js/core": "1.40.0", | ||
| "@zag-js/dom-query": "1.40.0", | ||
| "@zag-js/types": "1.40.0", | ||
| "@zag-js/utils": "1.40.0" | ||
| "@internationalized/number": "3.6.6", | ||
| "@zag-js/anatomy": "1.41.0", | ||
| "@zag-js/core": "1.41.0", | ||
| "@zag-js/dom-query": "1.41.0", | ||
| "@zag-js/types": "1.41.0", | ||
| "@zag-js/utils": "1.41.0" | ||
| }, | ||
@@ -37,0 +37,0 @@ "devDependencies": { |
111802
0.15%2656
0.08%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated
Updated