@zag-js/number-input 0.74.2 → 0.75.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
@@ -44,31 +44,31 @@ interface PublicContext extends LocaleProperties, CommonProperties {
44
44
  /**
45
45
  * The ids of the elements in the number input. Useful for composition.
46
46
  */
47
- ids?: ElementIds;
47
+ ids?: ElementIds | undefined;
48
48
  /**
49
49
  * The name attribute of the number input. Useful for form submission.
50
50
  */
51
- name?: string;
51
+ name?: string | undefined;
52
52
  /**
53
53
  * The associate form of the input element.
54
54
  */
55
- form?: string;
55
+ form?: string | undefined;
56
56
  /**
57
57
  * Whether the number input is disabled.
58
58
  */
59
- disabled?: boolean;
59
+ disabled?: boolean | undefined;
60
60
  /**
61
61
  * Whether the number input is readonly
62
62
  */
63
- readOnly?: boolean;
63
+ readOnly?: boolean | undefined;
64
64
  /**
65
65
  * Whether the number input value is invalid.
66
66
  */
67
- invalid?: boolean;
67
+ invalid?: boolean | undefined;
68
68
  /**
69
69
  * Whether the number input is required
70
70
  */
71
- required?: boolean;
71
+ required?: boolean | undefined;
72
72
  /**
73
73
  * The pattern used to check the <input> element's value against
74
74
  *
@@ -97,7 +97,7 @@ interface PublicContext extends LocaleProperties, CommonProperties {
97
97
  /**
98
98
  * Whether to allow mouse wheel to change the value
99
99
  */
100
- allowMouseWheel?: boolean;
100
+ allowMouseWheel?: boolean | undefined;
101
101
  /**
102
102
  * Whether to allow the value overflow the min/max range
103
103
  * @default true
@@ -120,7 +120,7 @@ interface PublicContext extends LocaleProperties, CommonProperties {
120
120
  /**
121
121
  * The options to pass to the `Intl.NumberFormat` constructor
122
122
  */
123
- formatOptions?: Intl.NumberFormatOptions;
123
+ formatOptions?: Intl.NumberFormatOptions | undefined;
124
124
  /**
125
125
  * Hints at the type of data that might be entered by the user. It also determines
126
126
  * the type of keyboard shown to the user on mobile devices
@@ -130,20 +130,20 @@ interface PublicContext extends LocaleProperties, CommonProperties {
130
130
  /**
131
131
  * Function invoked when the value changes
132
132
  */
133
- onValueChange?: (details: ValueChangeDetails) => void;
133
+ onValueChange?: ((details: ValueChangeDetails) => void) | undefined;
134
134
  /**
135
135
  * Function invoked when the value overflows or underflows the min/max range
136
136
  */
137
- onValueInvalid?: (details: ValueInvalidDetails) => void;
137
+ onValueInvalid?: ((details: ValueInvalidDetails) => void) | undefined;
138
138
  /**
139
139
  * Function invoked when the number input is focused
140
140
  */
141
- onFocusChange?: (details: FocusChangeDetails) => void;
141
+ onFocusChange?: ((details: FocusChangeDetails) => void) | undefined;
142
142
  /**
143
143
  * Whether to spin the value when the increment/decrement button is pressed
144
144
  * @default true
145
145
  */
146
- spinOnPress?: boolean;
146
+ spinOnPress?: boolean | undefined;
147
147
  }
148
148
  type UserDefinedContext = RequiredBy<PublicContext, "id">;
149
149
  type ComputedContext = Readonly<{
package/dist/index.d.ts CHANGED
@@ -44,31 +44,31 @@ interface PublicContext extends LocaleProperties, CommonProperties {
44
44
  /**
45
45
  * The ids of the elements in the number input. Useful for composition.
46
46
  */
47
- ids?: ElementIds;
47
+ ids?: ElementIds | undefined;
48
48
  /**
49
49
  * The name attribute of the number input. Useful for form submission.
50
50
  */
51
- name?: string;
51
+ name?: string | undefined;
52
52
  /**
53
53
  * The associate form of the input element.
54
54
  */
55
- form?: string;
55
+ form?: string | undefined;
56
56
  /**
57
57
  * Whether the number input is disabled.
58
58
  */
59
- disabled?: boolean;
59
+ disabled?: boolean | undefined;
60
60
  /**
61
61
  * Whether the number input is readonly
62
62
  */
63
- readOnly?: boolean;
63
+ readOnly?: boolean | undefined;
64
64
  /**
65
65
  * Whether the number input value is invalid.
66
66
  */
67
- invalid?: boolean;
67
+ invalid?: boolean | undefined;
68
68
  /**
69
69
  * Whether the number input is required
70
70
  */
71
- required?: boolean;
71
+ required?: boolean | undefined;
72
72
  /**
73
73
  * The pattern used to check the <input> element's value against
74
74
  *
@@ -97,7 +97,7 @@ interface PublicContext extends LocaleProperties, CommonProperties {
97
97
  /**
98
98
  * Whether to allow mouse wheel to change the value
99
99
  */
100
- allowMouseWheel?: boolean;
100
+ allowMouseWheel?: boolean | undefined;
101
101
  /**
102
102
  * Whether to allow the value overflow the min/max range
103
103
  * @default true
@@ -120,7 +120,7 @@ interface PublicContext extends LocaleProperties, CommonProperties {
120
120
  /**
121
121
  * The options to pass to the `Intl.NumberFormat` constructor
122
122
  */
123
- formatOptions?: Intl.NumberFormatOptions;
123
+ formatOptions?: Intl.NumberFormatOptions | undefined;
124
124
  /**
125
125
  * Hints at the type of data that might be entered by the user. It also determines
126
126
  * the type of keyboard shown to the user on mobile devices
@@ -130,20 +130,20 @@ interface PublicContext extends LocaleProperties, CommonProperties {
130
130
  /**
131
131
  * Function invoked when the value changes
132
132
  */
133
- onValueChange?: (details: ValueChangeDetails) => void;
133
+ onValueChange?: ((details: ValueChangeDetails) => void) | undefined;
134
134
  /**
135
135
  * Function invoked when the value overflows or underflows the min/max range
136
136
  */
137
- onValueInvalid?: (details: ValueInvalidDetails) => void;
137
+ onValueInvalid?: ((details: ValueInvalidDetails) => void) | undefined;
138
138
  /**
139
139
  * Function invoked when the number input is focused
140
140
  */
141
- onFocusChange?: (details: FocusChangeDetails) => void;
141
+ onFocusChange?: ((details: FocusChangeDetails) => void) | undefined;
142
142
  /**
143
143
  * Whether to spin the value when the increment/decrement button is pressed
144
144
  * @default true
145
145
  */
146
- spinOnPress?: boolean;
146
+ spinOnPress?: boolean | undefined;
147
147
  }
148
148
  type UserDefinedContext = RequiredBy<PublicContext, "id">;
149
149
  type ComputedContext = Readonly<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/number-input",
3
- "version": "0.74.2",
3
+ "version": "0.75.0",
4
4
  "description": "Core logic for the number-input widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -26,15 +26,15 @@
26
26
  "url": "https://github.com/chakra-ui/zag/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@internationalized/number": "3.5.3",
30
- "@zag-js/anatomy": "0.74.2",
31
- "@zag-js/core": "0.74.2",
32
- "@zag-js/dom-event": "0.74.2",
33
- "@zag-js/dom-query": "0.74.2",
34
- "@zag-js/form-utils": "0.74.2",
35
- "@zag-js/number-utils": "0.74.2",
36
- "@zag-js/types": "0.74.2",
37
- "@zag-js/utils": "0.74.2"
29
+ "@internationalized/number": "3.5.4",
30
+ "@zag-js/anatomy": "0.75.0",
31
+ "@zag-js/core": "0.75.0",
32
+ "@zag-js/dom-event": "0.75.0",
33
+ "@zag-js/dom-query": "0.75.0",
34
+ "@zag-js/form-utils": "0.75.0",
35
+ "@zag-js/number-utils": "0.75.0",
36
+ "@zag-js/types": "0.75.0",
37
+ "@zag-js/utils": "0.75.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"