@zag-js/pin-input 0.36.3 → 0.37.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.
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/package.json +9 -9
- package/src/pin-input.props.ts +26 -0
- package/src/pin-input.types.ts +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
2
|
-
import { RequiredBy, PropTypes, DirectionProperty, CommonProperties,
|
|
2
|
+
import { RequiredBy, PropTypes, DirectionProperty, CommonProperties, NormalizeProps } from '@zag-js/types';
|
|
3
3
|
import * as _zag_js_core from '@zag-js/core';
|
|
4
4
|
import { StateMachine } from '@zag-js/core';
|
|
5
5
|
|
|
@@ -126,7 +126,8 @@ type ComputedContext = Readonly<{
|
|
|
126
126
|
*/
|
|
127
127
|
focusedValue: string;
|
|
128
128
|
}>;
|
|
129
|
-
|
|
129
|
+
interface PrivateContext {
|
|
130
|
+
}
|
|
130
131
|
interface MachineContext extends PublicContext, PrivateContext, ComputedContext {
|
|
131
132
|
}
|
|
132
133
|
interface MachineState {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
2
|
-
import { RequiredBy, PropTypes, DirectionProperty, CommonProperties,
|
|
2
|
+
import { RequiredBy, PropTypes, DirectionProperty, CommonProperties, NormalizeProps } from '@zag-js/types';
|
|
3
3
|
import * as _zag_js_core from '@zag-js/core';
|
|
4
4
|
import { StateMachine } from '@zag-js/core';
|
|
5
5
|
|
|
@@ -126,7 +126,8 @@ type ComputedContext = Readonly<{
|
|
|
126
126
|
*/
|
|
127
127
|
focusedValue: string;
|
|
128
128
|
}>;
|
|
129
|
-
|
|
129
|
+
interface PrivateContext {
|
|
130
|
+
}
|
|
130
131
|
interface MachineContext extends PublicContext, PrivateContext, ComputedContext {
|
|
131
132
|
}
|
|
132
133
|
interface MachineState {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/pin-input",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Core logic for the pin-input widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@zag-js/anatomy": "0.
|
|
31
|
-
"@zag-js/dom-query": "0.
|
|
32
|
-
"@zag-js/dom-event": "0.
|
|
33
|
-
"@zag-js/form-utils": "0.
|
|
34
|
-
"@zag-js/visually-hidden": "0.
|
|
35
|
-
"@zag-js/utils": "0.
|
|
36
|
-
"@zag-js/core": "0.
|
|
37
|
-
"@zag-js/types": "0.
|
|
30
|
+
"@zag-js/anatomy": "0.37.0",
|
|
31
|
+
"@zag-js/dom-query": "0.37.0",
|
|
32
|
+
"@zag-js/dom-event": "0.37.0",
|
|
33
|
+
"@zag-js/form-utils": "0.37.0",
|
|
34
|
+
"@zag-js/visually-hidden": "0.37.0",
|
|
35
|
+
"@zag-js/utils": "0.37.0",
|
|
36
|
+
"@zag-js/core": "0.37.0",
|
|
37
|
+
"@zag-js/types": "0.37.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"clean-package": "2.2.0"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createProps } from "@zag-js/types"
|
|
2
|
+
import type { UserDefinedContext } from "./pin-input.types"
|
|
3
|
+
|
|
4
|
+
export const props = createProps<UserDefinedContext>()([
|
|
5
|
+
"autoFocus",
|
|
6
|
+
"blurOnComplete",
|
|
7
|
+
"dir",
|
|
8
|
+
"disabled",
|
|
9
|
+
"form",
|
|
10
|
+
"getRootNode",
|
|
11
|
+
"id",
|
|
12
|
+
"ids",
|
|
13
|
+
"invalid",
|
|
14
|
+
"mask",
|
|
15
|
+
"name",
|
|
16
|
+
"onValueChange",
|
|
17
|
+
"onValueComplete",
|
|
18
|
+
"onValueInvalid",
|
|
19
|
+
"otp",
|
|
20
|
+
"pattern",
|
|
21
|
+
"placeholder",
|
|
22
|
+
"selectOnFocus",
|
|
23
|
+
"translations",
|
|
24
|
+
"type",
|
|
25
|
+
"value",
|
|
26
|
+
])
|
package/src/pin-input.types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StateMachine as S } from "@zag-js/core"
|
|
2
|
-
import type { CommonProperties,
|
|
2
|
+
import type { CommonProperties, DirectionProperty, PropTypes, RequiredBy } from "@zag-js/types"
|
|
3
3
|
|
|
4
4
|
/* -----------------------------------------------------------------------------
|
|
5
5
|
* Callback details
|
|
@@ -137,13 +137,13 @@ type ComputedContext = Readonly<{
|
|
|
137
137
|
focusedValue: string
|
|
138
138
|
}>
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
interface PrivateContext {
|
|
141
141
|
/**
|
|
142
142
|
* @internal
|
|
143
143
|
* The index of the input field that has focus
|
|
144
144
|
*/
|
|
145
145
|
focusedIndex: number
|
|
146
|
-
}
|
|
146
|
+
}
|
|
147
147
|
|
|
148
148
|
export interface MachineContext extends PublicContext, PrivateContext, ComputedContext {}
|
|
149
149
|
|