@zag-js/number-input 0.2.2 → 0.2.3
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 +5 -1
- package/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ declare type PublicContext = DirectionProperty & CommonProperties & {
|
|
|
39
39
|
* The name attribute of the number input. Useful for form submission.
|
|
40
40
|
*/
|
|
41
41
|
name?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The associate form of the input element.
|
|
44
|
+
*/
|
|
45
|
+
form?: string;
|
|
42
46
|
/**
|
|
43
47
|
* Whether the number input is disabled.
|
|
44
48
|
*/
|
|
@@ -46,7 +50,7 @@ declare type PublicContext = DirectionProperty & CommonProperties & {
|
|
|
46
50
|
/**
|
|
47
51
|
* Whether the number input is readonly
|
|
48
52
|
*/
|
|
49
|
-
|
|
53
|
+
readOnly?: boolean;
|
|
50
54
|
/**
|
|
51
55
|
* Whether the number input value is invalid.
|
|
52
56
|
*/
|
package/dist/index.js
CHANGED
|
@@ -494,6 +494,7 @@ function connect(state, send, normalize) {
|
|
|
494
494
|
inputProps: normalize.input({
|
|
495
495
|
"data-part": "input",
|
|
496
496
|
name: state.context.name,
|
|
497
|
+
form: state.context.form,
|
|
497
498
|
id: dom.getInputId(state.context),
|
|
498
499
|
role: "spinbutton",
|
|
499
500
|
defaultValue: state.context.formattedValue,
|
|
@@ -503,7 +504,7 @@ function connect(state, send, normalize) {
|
|
|
503
504
|
"data-invalid": dataAttr(isInvalid),
|
|
504
505
|
disabled: isDisabled,
|
|
505
506
|
"data-disabled": dataAttr(isDisabled),
|
|
506
|
-
readOnly: !!state.context.
|
|
507
|
+
readOnly: !!state.context.readOnly,
|
|
507
508
|
autoComplete: "off",
|
|
508
509
|
autoCorrect: "off",
|
|
509
510
|
spellCheck: "false",
|
package/dist/index.mjs
CHANGED
|
@@ -467,6 +467,7 @@ function connect(state, send, normalize) {
|
|
|
467
467
|
inputProps: normalize.input({
|
|
468
468
|
"data-part": "input",
|
|
469
469
|
name: state.context.name,
|
|
470
|
+
form: state.context.form,
|
|
470
471
|
id: dom.getInputId(state.context),
|
|
471
472
|
role: "spinbutton",
|
|
472
473
|
defaultValue: state.context.formattedValue,
|
|
@@ -476,7 +477,7 @@ function connect(state, send, normalize) {
|
|
|
476
477
|
"data-invalid": dataAttr(isInvalid),
|
|
477
478
|
disabled: isDisabled,
|
|
478
479
|
"data-disabled": dataAttr(isDisabled),
|
|
479
|
-
readOnly: !!state.context.
|
|
480
|
+
readOnly: !!state.context.readOnly,
|
|
480
481
|
autoComplete: "off",
|
|
481
482
|
autoCorrect: "off",
|
|
482
483
|
spellCheck: "false",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/number-input",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@zag-js/dom-utils": "0.2.1",
|
|
37
|
-
"@zag-js/form-utils": "0.2.
|
|
37
|
+
"@zag-js/form-utils": "0.2.2",
|
|
38
38
|
"@zag-js/number-utils": "0.2.0",
|
|
39
39
|
"@zag-js/utils": "0.3.1"
|
|
40
40
|
},
|