@zag-js/number-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, LocaleProperties, CommonProperties, Context, NormalizeProps } from '@zag-js/types';
2
+ import { RequiredBy, PropTypes, LocaleProperties, 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
 
@@ -196,7 +196,8 @@ type ComputedContext = Readonly<{
196
196
  */
197
197
  isRtl: boolean;
198
198
  }>;
199
- type PrivateContext = Context<{}>;
199
+ interface PrivateContext {
200
+ }
200
201
  interface MachineContext extends PublicContext, PrivateContext, ComputedContext {
201
202
  }
202
203
  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, LocaleProperties, CommonProperties, Context, NormalizeProps } from '@zag-js/types';
2
+ import { RequiredBy, PropTypes, LocaleProperties, 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
 
@@ -196,7 +196,8 @@ type ComputedContext = Readonly<{
196
196
  */
197
197
  isRtl: boolean;
198
198
  }>;
199
- type PrivateContext = Context<{}>;
199
+ interface PrivateContext {
200
+ }
200
201
  interface MachineContext extends PublicContext, PrivateContext, ComputedContext {
201
202
  }
202
203
  interface MachineState {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/number-input",
3
- "version": "0.36.3",
3
+ "version": "0.37.0",
4
4
  "description": "Core logic for the number-input widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -27,16 +27,16 @@
27
27
  "url": "https://github.com/chakra-ui/zag/issues"
28
28
  },
29
29
  "dependencies": {
30
- "@internationalized/number": "^3.5.0",
31
- "@zag-js/anatomy": "0.36.3",
32
- "@zag-js/core": "0.36.3",
33
- "@zag-js/dom-event": "0.36.3",
34
- "@zag-js/dom-query": "0.36.3",
35
- "@zag-js/form-utils": "0.36.3",
36
- "@zag-js/mutation-observer": "0.36.3",
37
- "@zag-js/number-utils": "0.36.3",
38
- "@zag-js/types": "0.36.3",
39
- "@zag-js/utils": "0.36.3"
30
+ "@internationalized/number": "3.5.1",
31
+ "@zag-js/anatomy": "0.37.0",
32
+ "@zag-js/core": "0.37.0",
33
+ "@zag-js/dom-event": "0.37.0",
34
+ "@zag-js/dom-query": "0.37.0",
35
+ "@zag-js/form-utils": "0.37.0",
36
+ "@zag-js/mutation-observer": "0.37.0",
37
+ "@zag-js/number-utils": "0.37.0",
38
+ "@zag-js/types": "0.37.0",
39
+ "@zag-js/utils": "0.37.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "clean-package": "2.2.0"
@@ -0,0 +1,31 @@
1
+ import { createProps } from "@zag-js/types"
2
+ import type { UserDefinedContext } from "./number-input.types"
3
+
4
+ export const props = createProps<UserDefinedContext>()([
5
+ "allowMouseWheel",
6
+ "allowOverflow",
7
+ "clampValueOnBlur",
8
+ "dir",
9
+ "disabled",
10
+ "focusInputOnChange",
11
+ "form",
12
+ "formatOptions",
13
+ "getRootNode",
14
+ "id",
15
+ "ids",
16
+ "inputMode",
17
+ "invalid",
18
+ "locale",
19
+ "max",
20
+ "min",
21
+ "name",
22
+ "onFocusChange",
23
+ "onValueChange",
24
+ "onValueInvalid",
25
+ "pattern",
26
+ "readOnly",
27
+ "spinOnPress",
28
+ "step",
29
+ "translations",
30
+ "value",
31
+ ])
@@ -1,6 +1,6 @@
1
1
  import type { NumberFormatter, NumberParser } from "@internationalized/number"
2
2
  import type { StateMachine as S } from "@zag-js/core"
3
- import type { CommonProperties, Context, LocaleProperties, PropTypes, RequiredBy } from "@zag-js/types"
3
+ import type { CommonProperties, LocaleProperties, PropTypes, RequiredBy } from "@zag-js/types"
4
4
 
5
5
  /* -----------------------------------------------------------------------------
6
6
  * Callback details
@@ -211,7 +211,7 @@ type ComputedContext = Readonly<{
211
211
  isRtl: boolean
212
212
  }>
213
213
 
214
- type PrivateContext = Context<{
214
+ interface PrivateContext {
215
215
  /**
216
216
  * @internal
217
217
  * The hint that determines if we're incrementing or decrementing
@@ -242,7 +242,7 @@ type PrivateContext = Context<{
242
242
  * Whether the checkbox's fieldset is disabled
243
243
  */
244
244
  fieldsetDisabled: boolean
245
- }>
245
+ }
246
246
 
247
247
  export interface MachineContext extends PublicContext, PrivateContext, ComputedContext {}
248
248