@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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _zag_js_anatomy from '@zag-js/anatomy';
2
- import { RequiredBy, PropTypes, DirectionProperty, CommonProperties, Context, NormalizeProps } from '@zag-js/types';
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
- type PrivateContext = Context<{}>;
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, Context, NormalizeProps } from '@zag-js/types';
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
- type PrivateContext = Context<{}>;
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.36.3",
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.36.3",
31
- "@zag-js/dom-query": "0.36.3",
32
- "@zag-js/dom-event": "0.36.3",
33
- "@zag-js/form-utils": "0.36.3",
34
- "@zag-js/visually-hidden": "0.36.3",
35
- "@zag-js/utils": "0.36.3",
36
- "@zag-js/core": "0.36.3",
37
- "@zag-js/types": "0.36.3"
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
+ ])
@@ -1,5 +1,5 @@
1
1
  import type { StateMachine as S } from "@zag-js/core"
2
- import type { CommonProperties, Context, DirectionProperty, PropTypes, RequiredBy } from "@zag-js/types"
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
- type PrivateContext = Context<{
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