@zag-js/number-input 0.0.0-dev-20221212111136 → 0.0.0-dev-20221212123305
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.ts +12 -12
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -851,8 +851,8 @@ declare const anatomy: Omit<{
|
|
|
851
851
|
}>;
|
|
852
852
|
}, "parts">;
|
|
853
853
|
|
|
854
|
-
|
|
855
|
-
|
|
854
|
+
type ValidityState = "rangeUnderflow" | "rangeOverflow";
|
|
855
|
+
type ElementIds = Partial<{
|
|
856
856
|
root: string;
|
|
857
857
|
label: string;
|
|
858
858
|
input: string;
|
|
@@ -860,7 +860,7 @@ declare type ElementIds = Partial<{
|
|
|
860
860
|
decrementTrigger: string;
|
|
861
861
|
scrubber: string;
|
|
862
862
|
}>;
|
|
863
|
-
|
|
863
|
+
type IntlTranslations = {
|
|
864
864
|
/**
|
|
865
865
|
* Function that returns the human-readable value.
|
|
866
866
|
* It is used to set the `aria-valuetext` property of the input
|
|
@@ -875,11 +875,11 @@ declare type IntlTranslations = {
|
|
|
875
875
|
*/
|
|
876
876
|
decrementLabel: string;
|
|
877
877
|
};
|
|
878
|
-
|
|
878
|
+
type Value = {
|
|
879
879
|
value: string;
|
|
880
880
|
valueAsNumber: number;
|
|
881
881
|
};
|
|
882
|
-
|
|
882
|
+
type PublicContext = DirectionProperty & CommonProperties & {
|
|
883
883
|
/**
|
|
884
884
|
* The ids of the elements in the number input. Useful for composition.
|
|
885
885
|
*/
|
|
@@ -1002,8 +1002,8 @@ declare type PublicContext = DirectionProperty & CommonProperties & {
|
|
|
1002
1002
|
*/
|
|
1003
1003
|
spinOnPress?: boolean;
|
|
1004
1004
|
};
|
|
1005
|
-
|
|
1006
|
-
|
|
1005
|
+
type UserDefinedContext = RequiredBy<PublicContext, "id">;
|
|
1006
|
+
type ComputedContext = Readonly<{
|
|
1007
1007
|
/**
|
|
1008
1008
|
* @computed
|
|
1009
1009
|
* The value of the input as a number
|
|
@@ -1055,14 +1055,14 @@ declare type ComputedContext = Readonly<{
|
|
|
1055
1055
|
*/
|
|
1056
1056
|
isRtl: boolean;
|
|
1057
1057
|
}>;
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1058
|
+
type PrivateContext = Context<{}>;
|
|
1059
|
+
type MachineContext = PublicContext & PrivateContext & ComputedContext;
|
|
1060
|
+
type MachineState = {
|
|
1061
1061
|
value: "unknown" | "idle" | "focused" | "spinning" | "before:spin" | "scrubbing";
|
|
1062
1062
|
tags: "focus";
|
|
1063
1063
|
};
|
|
1064
|
-
|
|
1065
|
-
|
|
1064
|
+
type State = StateMachine.State<MachineContext, MachineState>;
|
|
1065
|
+
type Send = StateMachine.Send<StateMachine.AnyEventObject>;
|
|
1066
1066
|
|
|
1067
1067
|
declare function connect<T extends PropTypes>(state: State, send: Send, normalize: NormalizeProps<T>): {
|
|
1068
1068
|
isFocused: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/number-input",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20221212123305",
|
|
4
4
|
"description": "Core logic for the number-input widget implemented as a state machine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@zag-js/anatomy": "0.1.1",
|
|
33
|
-
"@zag-js/core": "0.
|
|
33
|
+
"@zag-js/core": "0.0.0-dev-20221212123305",
|
|
34
34
|
"@zag-js/types": "0.3.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|