@zag-js/number-input 0.36.3 → 0.37.1
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 +11 -11
- package/src/number-input.props.ts +33 -0
- package/src/number-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, LocaleProperties, CommonProperties,
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "0.37.1",
|
|
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": "
|
|
31
|
-
"@zag-js/
|
|
32
|
-
"@zag-js/
|
|
33
|
-
"@zag-js/dom-
|
|
34
|
-
"@zag-js/
|
|
35
|
-
"@zag-js/
|
|
36
|
-
"@zag-js/mutation-observer": "0.
|
|
37
|
-
"@zag-js/number-utils": "0.
|
|
38
|
-
"@zag-js/types": "0.
|
|
39
|
-
"@zag-js/utils": "0.
|
|
30
|
+
"@internationalized/number": "3.5.1",
|
|
31
|
+
"@zag-js/core": "0.37.1",
|
|
32
|
+
"@zag-js/anatomy": "0.37.1",
|
|
33
|
+
"@zag-js/dom-query": "0.37.1",
|
|
34
|
+
"@zag-js/form-utils": "0.37.1",
|
|
35
|
+
"@zag-js/dom-event": "0.37.1",
|
|
36
|
+
"@zag-js/mutation-observer": "0.37.1",
|
|
37
|
+
"@zag-js/number-utils": "0.37.1",
|
|
38
|
+
"@zag-js/types": "0.37.1",
|
|
39
|
+
"@zag-js/utils": "0.37.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"clean-package": "2.2.0"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { createProps } from "@zag-js/types"
|
|
2
|
+
import { createSplitProps } from "@zag-js/utils"
|
|
3
|
+
import type { UserDefinedContext } from "./number-input.types"
|
|
4
|
+
|
|
5
|
+
export const props = createProps<UserDefinedContext>()([
|
|
6
|
+
"allowMouseWheel",
|
|
7
|
+
"allowOverflow",
|
|
8
|
+
"clampValueOnBlur",
|
|
9
|
+
"dir",
|
|
10
|
+
"disabled",
|
|
11
|
+
"focusInputOnChange",
|
|
12
|
+
"form",
|
|
13
|
+
"formatOptions",
|
|
14
|
+
"getRootNode",
|
|
15
|
+
"id",
|
|
16
|
+
"ids",
|
|
17
|
+
"inputMode",
|
|
18
|
+
"invalid",
|
|
19
|
+
"locale",
|
|
20
|
+
"max",
|
|
21
|
+
"min",
|
|
22
|
+
"name",
|
|
23
|
+
"onFocusChange",
|
|
24
|
+
"onValueChange",
|
|
25
|
+
"onValueInvalid",
|
|
26
|
+
"pattern",
|
|
27
|
+
"readOnly",
|
|
28
|
+
"spinOnPress",
|
|
29
|
+
"step",
|
|
30
|
+
"translations",
|
|
31
|
+
"value",
|
|
32
|
+
])
|
|
33
|
+
export const splitProps = createSplitProps<Partial<UserDefinedContext>>(props)
|
|
@@ -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,
|
|
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
|
-
|
|
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
|
|