@zag-js/combobox 1.26.1 → 1.26.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.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -259,7 +259,7 @@ interface ComboboxProps<T extends CollectionItem = CollectionItem> extends Direc
|
|
|
259
259
|
*/
|
|
260
260
|
navigate?: ((details: NavigateDetails) => void) | null | undefined;
|
|
261
261
|
}
|
|
262
|
-
type PropsWithDefault = "openOnChange" | "openOnKeyPress" | "composite" | "loopFocus" | "positioning" | "openOnClick" | "openOnChange" | "inputBehavior" | "collection" | "selectionBehavior" | "closeOnSelect" | "translations" | "positioning";
|
|
262
|
+
type PropsWithDefault = "openOnChange" | "openOnKeyPress" | "composite" | "loopFocus" | "positioning" | "openOnClick" | "openOnChange" | "inputBehavior" | "collection" | "selectionBehavior" | "closeOnSelect" | "translations" | "positioning" | "defaultValue" | "defaultInputValue";
|
|
263
263
|
interface ComboboxSchema<T extends CollectionItem = CollectionItem> {
|
|
264
264
|
props: RequiredBy<ComboboxProps<T>, PropsWithDefault>;
|
|
265
265
|
state: "idle" | "focused" | "suggesting" | "interacting";
|
package/dist/index.d.ts
CHANGED
|
@@ -259,7 +259,7 @@ interface ComboboxProps<T extends CollectionItem = CollectionItem> extends Direc
|
|
|
259
259
|
*/
|
|
260
260
|
navigate?: ((details: NavigateDetails) => void) | null | undefined;
|
|
261
261
|
}
|
|
262
|
-
type PropsWithDefault = "openOnChange" | "openOnKeyPress" | "composite" | "loopFocus" | "positioning" | "openOnClick" | "openOnChange" | "inputBehavior" | "collection" | "selectionBehavior" | "closeOnSelect" | "translations" | "positioning";
|
|
262
|
+
type PropsWithDefault = "openOnChange" | "openOnKeyPress" | "composite" | "loopFocus" | "positioning" | "openOnClick" | "openOnChange" | "inputBehavior" | "collection" | "selectionBehavior" | "closeOnSelect" | "translations" | "positioning" | "defaultValue" | "defaultInputValue";
|
|
263
263
|
interface ComboboxSchema<T extends CollectionItem = CollectionItem> {
|
|
264
264
|
props: RequiredBy<ComboboxProps<T>, PropsWithDefault>;
|
|
265
265
|
state: "idle" | "focused" | "suggesting" | "interacting";
|
package/dist/index.js
CHANGED
|
@@ -486,6 +486,7 @@ var machine = createMachine({
|
|
|
486
486
|
loopFocus: true,
|
|
487
487
|
openOnClick: false,
|
|
488
488
|
defaultValue: [],
|
|
489
|
+
defaultInputValue: "",
|
|
489
490
|
closeOnSelect: !props2.multiple,
|
|
490
491
|
allowCustomValue: false,
|
|
491
492
|
alwaysSubmitOnEnter: false,
|
|
@@ -548,8 +549,8 @@ var machine = createMachine({
|
|
|
548
549
|
}
|
|
549
550
|
})),
|
|
550
551
|
inputValue: bindable(() => {
|
|
551
|
-
let inputValue = prop("inputValue") || prop("defaultInputValue")
|
|
552
|
-
const value = prop("
|
|
552
|
+
let inputValue = prop("inputValue") || prop("defaultInputValue");
|
|
553
|
+
const value = prop("value") || prop("defaultValue");
|
|
553
554
|
if (!inputValue.trim() && !prop("multiple")) {
|
|
554
555
|
const valueAsString = prop("collection").stringifyMany(value);
|
|
555
556
|
inputValue = utils.match(prop("selectionBehavior"), {
|
package/dist/index.mjs
CHANGED
|
@@ -484,6 +484,7 @@ var machine = createMachine({
|
|
|
484
484
|
loopFocus: true,
|
|
485
485
|
openOnClick: false,
|
|
486
486
|
defaultValue: [],
|
|
487
|
+
defaultInputValue: "",
|
|
487
488
|
closeOnSelect: !props2.multiple,
|
|
488
489
|
allowCustomValue: false,
|
|
489
490
|
alwaysSubmitOnEnter: false,
|
|
@@ -546,8 +547,8 @@ var machine = createMachine({
|
|
|
546
547
|
}
|
|
547
548
|
})),
|
|
548
549
|
inputValue: bindable(() => {
|
|
549
|
-
let inputValue = prop("inputValue") || prop("defaultInputValue")
|
|
550
|
-
const value = prop("
|
|
550
|
+
let inputValue = prop("inputValue") || prop("defaultInputValue");
|
|
551
|
+
const value = prop("value") || prop("defaultValue");
|
|
551
552
|
if (!inputValue.trim() && !prop("multiple")) {
|
|
552
553
|
const valueAsString = prop("collection").stringifyMany(value);
|
|
553
554
|
inputValue = match(prop("selectionBehavior"), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/combobox",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.3",
|
|
4
4
|
"description": "Core logic for the combobox 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
|
-
"@zag-js/anatomy": "1.26.
|
|
30
|
-
"@zag-js/aria-hidden": "1.26.
|
|
31
|
-
"@zag-js/collection": "1.26.
|
|
32
|
-
"@zag-js/core": "1.26.
|
|
33
|
-
"@zag-js/dismissable": "1.26.
|
|
34
|
-
"@zag-js/dom-query": "1.26.
|
|
35
|
-
"@zag-js/utils": "1.26.
|
|
36
|
-
"@zag-js/popper": "1.26.
|
|
37
|
-
"@zag-js/types": "1.26.
|
|
29
|
+
"@zag-js/anatomy": "1.26.3",
|
|
30
|
+
"@zag-js/aria-hidden": "1.26.3",
|
|
31
|
+
"@zag-js/collection": "1.26.3",
|
|
32
|
+
"@zag-js/core": "1.26.3",
|
|
33
|
+
"@zag-js/dismissable": "1.26.3",
|
|
34
|
+
"@zag-js/dom-query": "1.26.3",
|
|
35
|
+
"@zag-js/utils": "1.26.3",
|
|
36
|
+
"@zag-js/popper": "1.26.3",
|
|
37
|
+
"@zag-js/types": "1.26.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"clean-package": "2.2.0"
|