@zag-js/pin-input 0.2.10 → 0.2.11
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.
|
@@ -54,7 +54,7 @@ function machine(userContext) {
|
|
|
54
54
|
initial: ctx.autoFocus ? "focused" : "idle",
|
|
55
55
|
context: {
|
|
56
56
|
value: [],
|
|
57
|
-
focusedIndex:
|
|
57
|
+
focusedIndex: -1,
|
|
58
58
|
placeholder: "\u25CB",
|
|
59
59
|
otp: false,
|
|
60
60
|
type: "numeric",
|
|
@@ -76,7 +76,7 @@ function machine(userContext) {
|
|
|
76
76
|
value: ["dispatchInputEvent"],
|
|
77
77
|
isValueComplete: ["invokeOnComplete", "blurFocusedInputIfNeeded"]
|
|
78
78
|
},
|
|
79
|
-
entry: ["setupValue"],
|
|
79
|
+
entry: ctx.autoFocus ? ["setupValue", "setFocusIndexToFirst"] : ["setupValue"],
|
|
80
80
|
on: {
|
|
81
81
|
SET_VALUE: [
|
|
82
82
|
{
|
package/dist/index.js
CHANGED
|
@@ -336,7 +336,7 @@ function machine(userContext) {
|
|
|
336
336
|
initial: ctx.autoFocus ? "focused" : "idle",
|
|
337
337
|
context: {
|
|
338
338
|
value: [],
|
|
339
|
-
focusedIndex:
|
|
339
|
+
focusedIndex: -1,
|
|
340
340
|
placeholder: "\u25CB",
|
|
341
341
|
otp: false,
|
|
342
342
|
type: "numeric",
|
|
@@ -358,7 +358,7 @@ function machine(userContext) {
|
|
|
358
358
|
value: ["dispatchInputEvent"],
|
|
359
359
|
isValueComplete: ["invokeOnComplete", "blurFocusedInputIfNeeded"]
|
|
360
360
|
},
|
|
361
|
-
entry: ["setupValue"],
|
|
361
|
+
entry: ctx.autoFocus ? ["setupValue", "setFocusIndexToFirst"] : ["setupValue"],
|
|
362
362
|
on: {
|
|
363
363
|
SET_VALUE: [
|
|
364
364
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -128,7 +128,7 @@ function machine(userContext) {
|
|
|
128
128
|
initial: ctx.autoFocus ? "focused" : "idle",
|
|
129
129
|
context: {
|
|
130
130
|
value: [],
|
|
131
|
-
focusedIndex:
|
|
131
|
+
focusedIndex: -1,
|
|
132
132
|
placeholder: "\u25CB",
|
|
133
133
|
otp: false,
|
|
134
134
|
type: "numeric",
|
|
@@ -150,7 +150,7 @@ function machine(userContext) {
|
|
|
150
150
|
value: ["dispatchInputEvent"],
|
|
151
151
|
isValueComplete: ["invokeOnComplete", "blurFocusedInputIfNeeded"]
|
|
152
152
|
},
|
|
153
|
-
entry: ["setupValue"],
|
|
153
|
+
entry: ctx.autoFocus ? ["setupValue", "setFocusIndexToFirst"] : ["setupValue"],
|
|
154
154
|
on: {
|
|
155
155
|
SET_VALUE: [
|
|
156
156
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/pin-input",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "Core logic for the pin-input widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@zag-js/anatomy": "0.1.4",
|
|
30
|
-
"@zag-js/core": "0.2.
|
|
30
|
+
"@zag-js/core": "0.2.8",
|
|
31
31
|
"@zag-js/types": "0.3.4"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|