@zag-js/combobox 0.76.0 → 0.77.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 +1 -10
- package/dist/index.d.ts +1 -10
- package/dist/index.js +3 -10
- package/dist/index.mjs +3 -10
- package/package.json +11 -11
package/dist/index.d.mts
CHANGED
|
@@ -30,11 +30,6 @@ interface InputValueChangeDetails {
|
|
|
30
30
|
interface OpenChangeDetails {
|
|
31
31
|
open: boolean;
|
|
32
32
|
}
|
|
33
|
-
interface SelectionValueDetails<T extends CollectionItem = CollectionItem> {
|
|
34
|
-
inputValue: string;
|
|
35
|
-
selectedItems: T[];
|
|
36
|
-
valueAsString: string;
|
|
37
|
-
}
|
|
38
33
|
interface ScrollToIndexDetails {
|
|
39
34
|
index: number;
|
|
40
35
|
immediate?: boolean | undefined;
|
|
@@ -192,10 +187,6 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
|
|
|
192
187
|
* Whether to close the combobox when an item is selected.
|
|
193
188
|
*/
|
|
194
189
|
closeOnSelect?: boolean | undefined;
|
|
195
|
-
/**
|
|
196
|
-
* Function to get the display value of the selected item
|
|
197
|
-
*/
|
|
198
|
-
getSelectionValue?: ((details: SelectionValueDetails<T>) => string) | undefined;
|
|
199
190
|
/**
|
|
200
191
|
* Whether to open the combobox on arrow key press
|
|
201
192
|
* @default true
|
|
@@ -415,4 +406,4 @@ declare function connect<T extends PropTypes, V extends CollectionItem>(state: S
|
|
|
415
406
|
|
|
416
407
|
declare function machine<T extends CollectionItem>(userContext: UserDefinedContext<T>): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
|
|
417
408
|
|
|
418
|
-
export { type MachineApi as Api, type UserDefinedContext as Context, type ElementIds, type HighlightChangeDetails, type InputValueChangeDetails, type IntlTranslations, type ItemGroupLabelProps, type ItemGroupProps, type ItemProps, type ItemState, type OpenChangeDetails, type ScrollToIndexDetails, type
|
|
409
|
+
export { type MachineApi as Api, type UserDefinedContext as Context, type ElementIds, type HighlightChangeDetails, type InputValueChangeDetails, type IntlTranslations, type ItemGroupLabelProps, type ItemGroupProps, type ItemProps, type ItemState, type OpenChangeDetails, type ScrollToIndexDetails, type Service, type TriggerProps, type ValueChangeDetails, anatomy, collection, connect, machine };
|
package/dist/index.d.ts
CHANGED
|
@@ -30,11 +30,6 @@ interface InputValueChangeDetails {
|
|
|
30
30
|
interface OpenChangeDetails {
|
|
31
31
|
open: boolean;
|
|
32
32
|
}
|
|
33
|
-
interface SelectionValueDetails<T extends CollectionItem = CollectionItem> {
|
|
34
|
-
inputValue: string;
|
|
35
|
-
selectedItems: T[];
|
|
36
|
-
valueAsString: string;
|
|
37
|
-
}
|
|
38
33
|
interface ScrollToIndexDetails {
|
|
39
34
|
index: number;
|
|
40
35
|
immediate?: boolean | undefined;
|
|
@@ -192,10 +187,6 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
|
|
|
192
187
|
* Whether to close the combobox when an item is selected.
|
|
193
188
|
*/
|
|
194
189
|
closeOnSelect?: boolean | undefined;
|
|
195
|
-
/**
|
|
196
|
-
* Function to get the display value of the selected item
|
|
197
|
-
*/
|
|
198
|
-
getSelectionValue?: ((details: SelectionValueDetails<T>) => string) | undefined;
|
|
199
190
|
/**
|
|
200
191
|
* Whether to open the combobox on arrow key press
|
|
201
192
|
* @default true
|
|
@@ -415,4 +406,4 @@ declare function connect<T extends PropTypes, V extends CollectionItem>(state: S
|
|
|
415
406
|
|
|
416
407
|
declare function machine<T extends CollectionItem>(userContext: UserDefinedContext<T>): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
|
|
417
408
|
|
|
418
|
-
export { type MachineApi as Api, type UserDefinedContext as Context, type ElementIds, type HighlightChangeDetails, type InputValueChangeDetails, type IntlTranslations, type ItemGroupLabelProps, type ItemGroupProps, type ItemProps, type ItemState, type OpenChangeDetails, type ScrollToIndexDetails, type
|
|
409
|
+
export { type MachineApi as Api, type UserDefinedContext as Context, type ElementIds, type HighlightChangeDetails, type InputValueChangeDetails, type IntlTranslations, type ItemGroupLabelProps, type ItemGroupProps, type ItemProps, type ItemState, type OpenChangeDetails, type ScrollToIndexDetails, type Service, type TriggerProps, type ValueChangeDetails, anatomy, collection, connect, machine };
|
package/dist/index.js
CHANGED
|
@@ -1143,12 +1143,12 @@ function machine(userContext) {
|
|
|
1143
1143
|
},
|
|
1144
1144
|
selectHighlightedItem(ctx2) {
|
|
1145
1145
|
set.value(ctx2, ctx2.highlightedValue);
|
|
1146
|
-
set.inputValue(ctx2, getInputValue(ctx2
|
|
1146
|
+
set.inputValue(ctx2, getInputValue(ctx2));
|
|
1147
1147
|
},
|
|
1148
1148
|
selectItem(ctx2, evt) {
|
|
1149
1149
|
if (evt.value == null) return;
|
|
1150
1150
|
set.value(ctx2, evt.value);
|
|
1151
|
-
set.inputValue(ctx2, getInputValue(ctx2
|
|
1151
|
+
set.inputValue(ctx2, getInputValue(ctx2));
|
|
1152
1152
|
},
|
|
1153
1153
|
clearItem(ctx2, evt) {
|
|
1154
1154
|
if (evt.value == null) return;
|
|
@@ -1330,14 +1330,7 @@ function machine(userContext) {
|
|
|
1330
1330
|
}
|
|
1331
1331
|
);
|
|
1332
1332
|
}
|
|
1333
|
-
function getInputValue(ctx
|
|
1334
|
-
if (ctx.getSelectionValue && selection) {
|
|
1335
|
-
return ctx.getSelectionValue({
|
|
1336
|
-
inputValue: ctx.inputValue,
|
|
1337
|
-
selectedItems: Array.from(ctx.selectedItems),
|
|
1338
|
-
valueAsString: ctx.valueAsString
|
|
1339
|
-
});
|
|
1340
|
-
}
|
|
1333
|
+
function getInputValue(ctx) {
|
|
1341
1334
|
return utils.match(ctx.selectionBehavior, {
|
|
1342
1335
|
preserve: ctx.inputValue,
|
|
1343
1336
|
replace: ctx.valueAsString,
|
package/dist/index.mjs
CHANGED
|
@@ -1141,12 +1141,12 @@ function machine(userContext) {
|
|
|
1141
1141
|
},
|
|
1142
1142
|
selectHighlightedItem(ctx2) {
|
|
1143
1143
|
set.value(ctx2, ctx2.highlightedValue);
|
|
1144
|
-
set.inputValue(ctx2, getInputValue(ctx2
|
|
1144
|
+
set.inputValue(ctx2, getInputValue(ctx2));
|
|
1145
1145
|
},
|
|
1146
1146
|
selectItem(ctx2, evt) {
|
|
1147
1147
|
if (evt.value == null) return;
|
|
1148
1148
|
set.value(ctx2, evt.value);
|
|
1149
|
-
set.inputValue(ctx2, getInputValue(ctx2
|
|
1149
|
+
set.inputValue(ctx2, getInputValue(ctx2));
|
|
1150
1150
|
},
|
|
1151
1151
|
clearItem(ctx2, evt) {
|
|
1152
1152
|
if (evt.value == null) return;
|
|
@@ -1328,14 +1328,7 @@ function machine(userContext) {
|
|
|
1328
1328
|
}
|
|
1329
1329
|
);
|
|
1330
1330
|
}
|
|
1331
|
-
function getInputValue(ctx
|
|
1332
|
-
if (ctx.getSelectionValue && selection) {
|
|
1333
|
-
return ctx.getSelectionValue({
|
|
1334
|
-
inputValue: ctx.inputValue,
|
|
1335
|
-
selectedItems: Array.from(ctx.selectedItems),
|
|
1336
|
-
valueAsString: ctx.valueAsString
|
|
1337
|
-
});
|
|
1338
|
-
}
|
|
1331
|
+
function getInputValue(ctx) {
|
|
1339
1332
|
return match(ctx.selectionBehavior, {
|
|
1340
1333
|
preserve: ctx.inputValue,
|
|
1341
1334
|
replace: ctx.valueAsString,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/combobox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.77.1",
|
|
4
4
|
"description": "Core logic for the combobox widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@zag-js/anatomy": "0.
|
|
30
|
-
"@zag-js/aria-hidden": "0.
|
|
31
|
-
"@zag-js/collection": "0.
|
|
32
|
-
"@zag-js/core": "0.
|
|
33
|
-
"@zag-js/dismissable": "0.
|
|
34
|
-
"@zag-js/dom-query": "0.
|
|
35
|
-
"@zag-js/dom-event": "0.
|
|
36
|
-
"@zag-js/utils": "0.
|
|
37
|
-
"@zag-js/popper": "0.
|
|
38
|
-
"@zag-js/types": "0.
|
|
29
|
+
"@zag-js/anatomy": "0.77.1",
|
|
30
|
+
"@zag-js/aria-hidden": "0.77.1",
|
|
31
|
+
"@zag-js/collection": "0.77.1",
|
|
32
|
+
"@zag-js/core": "0.77.1",
|
|
33
|
+
"@zag-js/dismissable": "0.77.1",
|
|
34
|
+
"@zag-js/dom-query": "0.77.1",
|
|
35
|
+
"@zag-js/dom-event": "0.77.1",
|
|
36
|
+
"@zag-js/utils": "0.77.1",
|
|
37
|
+
"@zag-js/popper": "0.77.1",
|
|
38
|
+
"@zag-js/types": "0.77.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"clean-package": "2.2.0"
|