@zag-js/number-input 1.40.0 → 1.41.0
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.
|
@@ -185,7 +185,7 @@ var machine = createMachine({
|
|
|
185
185
|
},
|
|
186
186
|
"INPUT.BLUR": [
|
|
187
187
|
{
|
|
188
|
-
guard: and("clampValueOnBlur", not("isInRange")),
|
|
188
|
+
guard: and("clampValueOnBlur", not("isValueEmpty"), not("isInRange")),
|
|
189
189
|
target: "idle",
|
|
190
190
|
actions: ["setClampedValue", "clearHint", "invokeOnBlur", "invokeOnValueCommit"]
|
|
191
191
|
},
|
|
@@ -268,6 +268,7 @@ var machine = createMachine({
|
|
|
268
268
|
clampValueOnBlur: ({ prop }) => prop("clampValueOnBlur"),
|
|
269
269
|
spinOnPress: ({ prop }) => !!prop("spinOnPress"),
|
|
270
270
|
isInRange: ({ computed }) => !computed("isOutOfRange"),
|
|
271
|
+
isValueEmpty: ({ computed }) => computed("isValueEmpty"),
|
|
271
272
|
isDecrementHint: ({ context, event }) => (event.hint ?? context.get("hint")) === "decrement",
|
|
272
273
|
isIncrementHint: ({ context, event }) => (event.hint ?? context.get("hint")) === "increment",
|
|
273
274
|
isTouchPointer: ({ event }) => event.pointerType === "touch"
|
|
@@ -167,7 +167,7 @@ var machine = createMachine({
|
|
|
167
167
|
},
|
|
168
168
|
"INPUT.BLUR": [
|
|
169
169
|
{
|
|
170
|
-
guard: and("clampValueOnBlur", not("isInRange")),
|
|
170
|
+
guard: and("clampValueOnBlur", not("isValueEmpty"), not("isInRange")),
|
|
171
171
|
target: "idle",
|
|
172
172
|
actions: ["setClampedValue", "clearHint", "invokeOnBlur", "invokeOnValueCommit"]
|
|
173
173
|
},
|
|
@@ -250,6 +250,7 @@ var machine = createMachine({
|
|
|
250
250
|
clampValueOnBlur: ({ prop }) => prop("clampValueOnBlur"),
|
|
251
251
|
spinOnPress: ({ prop }) => !!prop("spinOnPress"),
|
|
252
252
|
isInRange: ({ computed }) => !computed("isOutOfRange"),
|
|
253
|
+
isValueEmpty: ({ computed }) => computed("isValueEmpty"),
|
|
253
254
|
isDecrementHint: ({ context, event }) => (event.hint ?? context.get("hint")) === "decrement",
|
|
254
255
|
isIncrementHint: ({ context, event }) => (event.hint ?? context.get("hint")) === "increment",
|
|
255
256
|
isTouchPointer: ({ event }) => event.pointerType === "touch"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/number-input",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"description": "Core logic for the number-input widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@internationalized/number": "3.6.
|
|
30
|
-
"@zag-js/anatomy": "1.
|
|
31
|
-
"@zag-js/core": "1.
|
|
32
|
-
"@zag-js/dom-query": "1.
|
|
33
|
-
"@zag-js/types": "1.
|
|
34
|
-
"@zag-js/utils": "1.
|
|
29
|
+
"@internationalized/number": "3.6.6",
|
|
30
|
+
"@zag-js/anatomy": "1.41.0",
|
|
31
|
+
"@zag-js/core": "1.41.0",
|
|
32
|
+
"@zag-js/dom-query": "1.41.0",
|
|
33
|
+
"@zag-js/types": "1.41.0",
|
|
34
|
+
"@zag-js/utils": "1.41.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"clean-package": "2.2.0"
|