@zag-js/combobox 0.82.2 → 1.0.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 CHANGED
@@ -3,10 +3,10 @@ export { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from
3
3
  import * as _zag_js_anatomy from '@zag-js/anatomy';
4
4
  import { CollectionOptions, ListCollection, CollectionItem } from '@zag-js/collection';
5
5
  export { CollectionItem, CollectionOptions } from '@zag-js/collection';
6
- import { RequiredBy, PropTypes, DirectionProperty, CommonProperties, NormalizeProps } from '@zag-js/types';
6
+ import { DirectionProperty, CommonProperties, PropTypes, RequiredBy, NormalizeProps } from '@zag-js/types';
7
7
  import * as _zag_js_core from '@zag-js/core';
8
- import { Machine, StateMachine } from '@zag-js/core';
9
- import { PositioningOptions } from '@zag-js/popper';
8
+ import { Service, Machine, EventObject } from '@zag-js/core';
9
+ import { PositioningOptions, Placement } from '@zag-js/popper';
10
10
  export { Placement, PositioningOptions } from '@zag-js/popper';
11
11
 
12
12
  declare const anatomy: _zag_js_anatomy.AnatomyInstance<"content" | "list" | "label" | "input" | "root" | "item" | "clearTrigger" | "control" | "itemGroup" | "itemGroupLabel" | "itemIndicator" | "itemText" | "positioner" | "trigger">;
@@ -55,23 +55,30 @@ type ElementIds = Partial<{
55
55
  itemGroup(id: string | number): string;
56
56
  itemGroupLabel(id: string | number): string;
57
57
  }>;
58
- interface PublicContext<T extends CollectionItem = CollectionItem> extends DirectionProperty, CommonProperties, InteractOutsideHandlers {
58
+ interface ComboboxProps<T extends CollectionItem = CollectionItem> extends DirectionProperty, CommonProperties, InteractOutsideHandlers {
59
59
  /**
60
- * Whether the combobox is open
60
+ * The controlled open state of the combobox
61
61
  */
62
62
  open?: boolean | undefined;
63
63
  /**
64
- * Whether the combobox open state is controlled by the user
64
+ * The initial open state of the combobox when rendered.
65
+ * Use when you don't need to control the open state of the combobox.
65
66
  */
66
- "open.controlled"?: boolean | undefined;
67
+ defaultOpen?: boolean | undefined;
67
68
  /**
68
69
  * The ids of the elements in the combobox. Useful for composition.
69
70
  */
70
71
  ids?: ElementIds | undefined;
71
72
  /**
72
- * The current value of the combobox's input
73
+ * The controlled value of the combobox's input
73
74
  */
74
- inputValue: string;
75
+ inputValue?: string | undefined;
76
+ /**
77
+ * The initial value of the combobox's input when rendered.
78
+ * Use when you don't need to control the value of the combobox's input.
79
+ * @default ""
80
+ */
81
+ defaultInputValue?: string | undefined;
75
82
  /**
76
83
  * The `name` attribute of the combobox's input. Useful for form submission
77
84
  */
@@ -102,13 +109,24 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
102
109
  */
103
110
  placeholder?: string | undefined;
104
111
  /**
105
- * The active item's id. Used to set the `aria-activedescendant` attribute
112
+ * The initial highlighted value of the combobox when rendered.
113
+ * Use when you don't need to control the highlighted value of the combobox.
106
114
  */
107
- highlightedValue: string | null;
115
+ defaultHighlightedValue?: string | null | undefined;
108
116
  /**
109
- * The keys of the selected items
117
+ * The controlled highlighted value of the combobox
110
118
  */
111
- value: string[];
119
+ highlightedValue?: string | null | undefined;
120
+ /**
121
+ * The controlled value of the combobox's selected items
122
+ */
123
+ value?: string[] | undefined;
124
+ /**
125
+ * The initial value of the combobox's selected items when rendered.
126
+ * Use when you don't need to control the value of the combobox's selected items.
127
+ * @default []
128
+ */
129
+ defaultValue?: string[] | undefined;
112
130
  /**
113
131
  * Defines the auto-completion behavior of the combobox.
114
132
  *
@@ -117,7 +135,7 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
117
135
  *
118
136
  * @default "none"
119
137
  */
120
- inputBehavior: "autohighlight" | "autocomplete" | "none";
138
+ inputBehavior?: "autohighlight" | "autocomplete" | "none" | undefined;
121
139
  /**
122
140
  * The behavior of the combobox input when an item is selected
123
141
  *
@@ -127,7 +145,7 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
127
145
  *
128
146
  * @default "replace"
129
147
  */
130
- selectionBehavior: "clear" | "replace" | "preserve";
148
+ selectionBehavior?: "clear" | "replace" | "preserve" | undefined;
131
149
  /**
132
150
  * Whether to autofocus the input on mount
133
151
  */
@@ -153,8 +171,9 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
153
171
  loopFocus?: boolean | undefined;
154
172
  /**
155
173
  * The positioning options to dynamically position the menu
174
+ * @default { placement: "bottom-start" }
156
175
  */
157
- positioning: PositioningOptions;
176
+ positioning?: PositioningOptions | undefined;
158
177
  /**
159
178
  * Function called when the input's value changes
160
179
  */
@@ -175,11 +194,11 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
175
194
  /**
176
195
  * Specifies the localized strings that identifies the accessibility elements and their states
177
196
  */
178
- translations: IntlTranslations;
197
+ translations?: IntlTranslations | undefined;
179
198
  /**
180
199
  * The collection of items
181
200
  */
182
- collection: ListCollection<any>;
201
+ collection?: ListCollection<T> | undefined;
183
202
  /**
184
203
  * Whether to allow multiple selection.
185
204
  *
@@ -195,7 +214,7 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
195
214
  * Whether to open the combobox on arrow key press
196
215
  * @default true
197
216
  */
198
- openOnKeyPress: boolean;
217
+ openOnKeyPress?: boolean | undefined;
199
218
  /**
200
219
  * Function to scroll to a specific index
201
220
  */
@@ -204,7 +223,7 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
204
223
  * Whether the combobox is a composed with other composite widgets like tabs
205
224
  * @default true
206
225
  */
207
- composite: boolean;
226
+ composite?: boolean | undefined;
208
227
  /**
209
228
  * Whether to disable registering this a dismissable layer
210
229
  */
@@ -212,49 +231,36 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
212
231
  /**
213
232
  * Function to navigate to the selected item
214
233
  */
215
- navigate: (details: NavigateDetails) => void;
234
+ navigate?: ((details: NavigateDetails) => void) | undefined;
216
235
  }
217
- type UserDefinedContext<T extends CollectionItem = CollectionItem> = RequiredBy<PublicContext<T>, "id" | "collection">;
218
- type ComputedContext = Readonly<{
219
- /**
220
- * @computed
221
- * Whether the input's value is empty
222
- */
223
- isInputValueEmpty: boolean;
224
- /**
225
- * @computed
226
- * Whether the combobox is interactive
227
- */
228
- isInteractive: boolean;
229
- /**
230
- * @computed
231
- */
232
- autoComplete: boolean;
233
- /**
234
- * @computed
235
- */
236
- autoHighlight: boolean;
237
- /**
238
- * @computed
239
- * Whether there's a selected option
240
- */
241
- hasSelectedItems: boolean;
242
- }>;
243
- interface PrivateContext<T extends CollectionItem = CollectionItem> {
244
- /**
245
- * The highlighted item
246
- */
247
- highlightedItem: T | null;
248
- }
249
- interface MachineContext extends PublicContext, PrivateContext, ComputedContext {
250
- }
251
- interface MachineState {
252
- value: "idle" | "focused" | "suggesting" | "interacting";
253
- tags: "open" | "focused" | "idle" | "closed";
236
+ type PropsWithDefault = "openOnChange" | "openOnKeyPress" | "composite" | "navigate" | "loopFocus" | "positioning" | "openOnClick" | "openOnChange" | "inputBehavior" | "collection" | "selectionBehavior" | "closeOnSelect" | "translations" | "positioning";
237
+ interface ComboboxSchema<T extends CollectionItem = CollectionItem> {
238
+ props: RequiredBy<ComboboxProps<T>, PropsWithDefault>;
239
+ state: "idle" | "focused" | "suggesting" | "interacting";
240
+ tag: "open" | "focused" | "idle" | "closed";
241
+ context: {
242
+ value: string[];
243
+ inputValue: string;
244
+ highlightedValue: string | null;
245
+ currentPlacement?: Placement | undefined;
246
+ highlightedItem: T | null;
247
+ selectedItems: T[];
248
+ valueAsString: string;
249
+ };
250
+ computed: {
251
+ isInputValueEmpty: boolean;
252
+ isInteractive: boolean;
253
+ autoComplete: boolean;
254
+ autoHighlight: boolean;
255
+ hasSelectedItems: boolean;
256
+ };
257
+ event: EventObject;
258
+ action: string;
259
+ effect: string;
260
+ guard: string;
254
261
  }
255
- type State = StateMachine.State<MachineContext, MachineState>;
256
- type Send = StateMachine.Send<StateMachine.AnyEventObject>;
257
- type Service = Machine<MachineContext, MachineState, StateMachine.AnyEventObject>;
262
+ type ComboboxService<T extends CollectionItem = CollectionItem> = Service<ComboboxSchema<T>>;
263
+ type ComboboxMachine<T extends CollectionItem = CollectionItem> = Machine<ComboboxSchema<T>>;
258
264
  interface TriggerProps {
259
265
  /**
260
266
  * Whether the trigger is focusable
@@ -295,7 +301,7 @@ interface ItemGroupProps {
295
301
  interface ItemGroupLabelProps {
296
302
  htmlFor: string;
297
303
  }
298
- interface MachineApi<T extends PropTypes = PropTypes, V extends CollectionItem = CollectionItem> {
304
+ interface ComboboxApi<T extends PropTypes = PropTypes, V extends CollectionItem = CollectionItem> {
299
305
  /**
300
306
  * Whether the combobox is focused
301
307
  */
@@ -373,10 +379,6 @@ interface MachineApi<T extends PropTypes = PropTypes, V extends CollectionItem =
373
379
  * Function to toggle the combobox
374
380
  */
375
381
  collection: ListCollection<V>;
376
- /**
377
- * Function to set the collection of items
378
- */
379
- setCollection(collection: ListCollection<V>): void;
380
382
  /**
381
383
  * Function to set the positioning options
382
384
  */
@@ -405,8 +407,17 @@ interface MachineApi<T extends PropTypes = PropTypes, V extends CollectionItem =
405
407
  getItemGroupLabelProps(props: ItemGroupLabelProps): T["element"];
406
408
  }
407
409
 
408
- declare function connect<T extends PropTypes, V extends CollectionItem>(state: State, send: Send, normalize: NormalizeProps<T>): MachineApi<T, V>;
410
+ declare function connect<T extends PropTypes, V extends CollectionItem>(service: ComboboxService<V>, normalize: NormalizeProps<T>): ComboboxApi<T, V>;
411
+
412
+ declare const machine: _zag_js_core.Machine<ComboboxSchema<any>>;
409
413
 
410
- declare function machine<T extends CollectionItem>(userContext: UserDefinedContext<T>): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
414
+ declare const props: (keyof ComboboxProps<any>)[];
415
+ declare const splitProps: <Props extends Partial<ComboboxProps<any>>>(props: Props) => [Partial<ComboboxProps<any>>, Omit<Props, keyof ComboboxProps<any>>];
416
+ declare const itemGroupLabelProps: "htmlFor"[];
417
+ declare const splitItemGroupLabelProps: <Props extends ItemGroupLabelProps>(props: Props) => [ItemGroupLabelProps, Omit<Props, "htmlFor">];
418
+ declare const itemGroupProps: "id"[];
419
+ declare const splitItemGroupProps: <Props extends ItemGroupProps>(props: Props) => [ItemGroupProps, Omit<Props, "id">];
420
+ declare const itemProps: (keyof ItemProps)[];
421
+ declare const splitItemProps: <Props extends ItemProps>(props: Props) => [ItemProps, Omit<Props, keyof ItemProps>];
411
422
 
412
- 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 NavigateDetails, type OpenChangeDetails, type ScrollToIndexDetails, type Service, type TriggerProps, type ValueChangeDetails, anatomy, collection, connect, machine };
423
+ export { type ComboboxApi as Api, type ElementIds, type HighlightChangeDetails, type InputValueChangeDetails, type IntlTranslations, type ItemGroupLabelProps, type ItemGroupProps, type ItemProps, type ItemState, type ComboboxMachine as Machine, type NavigateDetails, type OpenChangeDetails, type ComboboxProps as Props, type ScrollToIndexDetails, type ComboboxService as Service, type TriggerProps, type ValueChangeDetails, anatomy, collection, connect, itemGroupLabelProps, itemGroupProps, itemProps, machine, props, splitItemGroupLabelProps, splitItemGroupProps, splitItemProps, splitProps };
package/dist/index.d.ts CHANGED
@@ -3,10 +3,10 @@ export { FocusOutsideEvent, InteractOutsideEvent, PointerDownOutsideEvent } from
3
3
  import * as _zag_js_anatomy from '@zag-js/anatomy';
4
4
  import { CollectionOptions, ListCollection, CollectionItem } from '@zag-js/collection';
5
5
  export { CollectionItem, CollectionOptions } from '@zag-js/collection';
6
- import { RequiredBy, PropTypes, DirectionProperty, CommonProperties, NormalizeProps } from '@zag-js/types';
6
+ import { DirectionProperty, CommonProperties, PropTypes, RequiredBy, NormalizeProps } from '@zag-js/types';
7
7
  import * as _zag_js_core from '@zag-js/core';
8
- import { Machine, StateMachine } from '@zag-js/core';
9
- import { PositioningOptions } from '@zag-js/popper';
8
+ import { Service, Machine, EventObject } from '@zag-js/core';
9
+ import { PositioningOptions, Placement } from '@zag-js/popper';
10
10
  export { Placement, PositioningOptions } from '@zag-js/popper';
11
11
 
12
12
  declare const anatomy: _zag_js_anatomy.AnatomyInstance<"content" | "list" | "label" | "input" | "root" | "item" | "clearTrigger" | "control" | "itemGroup" | "itemGroupLabel" | "itemIndicator" | "itemText" | "positioner" | "trigger">;
@@ -55,23 +55,30 @@ type ElementIds = Partial<{
55
55
  itemGroup(id: string | number): string;
56
56
  itemGroupLabel(id: string | number): string;
57
57
  }>;
58
- interface PublicContext<T extends CollectionItem = CollectionItem> extends DirectionProperty, CommonProperties, InteractOutsideHandlers {
58
+ interface ComboboxProps<T extends CollectionItem = CollectionItem> extends DirectionProperty, CommonProperties, InteractOutsideHandlers {
59
59
  /**
60
- * Whether the combobox is open
60
+ * The controlled open state of the combobox
61
61
  */
62
62
  open?: boolean | undefined;
63
63
  /**
64
- * Whether the combobox open state is controlled by the user
64
+ * The initial open state of the combobox when rendered.
65
+ * Use when you don't need to control the open state of the combobox.
65
66
  */
66
- "open.controlled"?: boolean | undefined;
67
+ defaultOpen?: boolean | undefined;
67
68
  /**
68
69
  * The ids of the elements in the combobox. Useful for composition.
69
70
  */
70
71
  ids?: ElementIds | undefined;
71
72
  /**
72
- * The current value of the combobox's input
73
+ * The controlled value of the combobox's input
73
74
  */
74
- inputValue: string;
75
+ inputValue?: string | undefined;
76
+ /**
77
+ * The initial value of the combobox's input when rendered.
78
+ * Use when you don't need to control the value of the combobox's input.
79
+ * @default ""
80
+ */
81
+ defaultInputValue?: string | undefined;
75
82
  /**
76
83
  * The `name` attribute of the combobox's input. Useful for form submission
77
84
  */
@@ -102,13 +109,24 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
102
109
  */
103
110
  placeholder?: string | undefined;
104
111
  /**
105
- * The active item's id. Used to set the `aria-activedescendant` attribute
112
+ * The initial highlighted value of the combobox when rendered.
113
+ * Use when you don't need to control the highlighted value of the combobox.
106
114
  */
107
- highlightedValue: string | null;
115
+ defaultHighlightedValue?: string | null | undefined;
108
116
  /**
109
- * The keys of the selected items
117
+ * The controlled highlighted value of the combobox
110
118
  */
111
- value: string[];
119
+ highlightedValue?: string | null | undefined;
120
+ /**
121
+ * The controlled value of the combobox's selected items
122
+ */
123
+ value?: string[] | undefined;
124
+ /**
125
+ * The initial value of the combobox's selected items when rendered.
126
+ * Use when you don't need to control the value of the combobox's selected items.
127
+ * @default []
128
+ */
129
+ defaultValue?: string[] | undefined;
112
130
  /**
113
131
  * Defines the auto-completion behavior of the combobox.
114
132
  *
@@ -117,7 +135,7 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
117
135
  *
118
136
  * @default "none"
119
137
  */
120
- inputBehavior: "autohighlight" | "autocomplete" | "none";
138
+ inputBehavior?: "autohighlight" | "autocomplete" | "none" | undefined;
121
139
  /**
122
140
  * The behavior of the combobox input when an item is selected
123
141
  *
@@ -127,7 +145,7 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
127
145
  *
128
146
  * @default "replace"
129
147
  */
130
- selectionBehavior: "clear" | "replace" | "preserve";
148
+ selectionBehavior?: "clear" | "replace" | "preserve" | undefined;
131
149
  /**
132
150
  * Whether to autofocus the input on mount
133
151
  */
@@ -153,8 +171,9 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
153
171
  loopFocus?: boolean | undefined;
154
172
  /**
155
173
  * The positioning options to dynamically position the menu
174
+ * @default { placement: "bottom-start" }
156
175
  */
157
- positioning: PositioningOptions;
176
+ positioning?: PositioningOptions | undefined;
158
177
  /**
159
178
  * Function called when the input's value changes
160
179
  */
@@ -175,11 +194,11 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
175
194
  /**
176
195
  * Specifies the localized strings that identifies the accessibility elements and their states
177
196
  */
178
- translations: IntlTranslations;
197
+ translations?: IntlTranslations | undefined;
179
198
  /**
180
199
  * The collection of items
181
200
  */
182
- collection: ListCollection<any>;
201
+ collection?: ListCollection<T> | undefined;
183
202
  /**
184
203
  * Whether to allow multiple selection.
185
204
  *
@@ -195,7 +214,7 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
195
214
  * Whether to open the combobox on arrow key press
196
215
  * @default true
197
216
  */
198
- openOnKeyPress: boolean;
217
+ openOnKeyPress?: boolean | undefined;
199
218
  /**
200
219
  * Function to scroll to a specific index
201
220
  */
@@ -204,7 +223,7 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
204
223
  * Whether the combobox is a composed with other composite widgets like tabs
205
224
  * @default true
206
225
  */
207
- composite: boolean;
226
+ composite?: boolean | undefined;
208
227
  /**
209
228
  * Whether to disable registering this a dismissable layer
210
229
  */
@@ -212,49 +231,36 @@ interface PublicContext<T extends CollectionItem = CollectionItem> extends Direc
212
231
  /**
213
232
  * Function to navigate to the selected item
214
233
  */
215
- navigate: (details: NavigateDetails) => void;
234
+ navigate?: ((details: NavigateDetails) => void) | undefined;
216
235
  }
217
- type UserDefinedContext<T extends CollectionItem = CollectionItem> = RequiredBy<PublicContext<T>, "id" | "collection">;
218
- type ComputedContext = Readonly<{
219
- /**
220
- * @computed
221
- * Whether the input's value is empty
222
- */
223
- isInputValueEmpty: boolean;
224
- /**
225
- * @computed
226
- * Whether the combobox is interactive
227
- */
228
- isInteractive: boolean;
229
- /**
230
- * @computed
231
- */
232
- autoComplete: boolean;
233
- /**
234
- * @computed
235
- */
236
- autoHighlight: boolean;
237
- /**
238
- * @computed
239
- * Whether there's a selected option
240
- */
241
- hasSelectedItems: boolean;
242
- }>;
243
- interface PrivateContext<T extends CollectionItem = CollectionItem> {
244
- /**
245
- * The highlighted item
246
- */
247
- highlightedItem: T | null;
248
- }
249
- interface MachineContext extends PublicContext, PrivateContext, ComputedContext {
250
- }
251
- interface MachineState {
252
- value: "idle" | "focused" | "suggesting" | "interacting";
253
- tags: "open" | "focused" | "idle" | "closed";
236
+ type PropsWithDefault = "openOnChange" | "openOnKeyPress" | "composite" | "navigate" | "loopFocus" | "positioning" | "openOnClick" | "openOnChange" | "inputBehavior" | "collection" | "selectionBehavior" | "closeOnSelect" | "translations" | "positioning";
237
+ interface ComboboxSchema<T extends CollectionItem = CollectionItem> {
238
+ props: RequiredBy<ComboboxProps<T>, PropsWithDefault>;
239
+ state: "idle" | "focused" | "suggesting" | "interacting";
240
+ tag: "open" | "focused" | "idle" | "closed";
241
+ context: {
242
+ value: string[];
243
+ inputValue: string;
244
+ highlightedValue: string | null;
245
+ currentPlacement?: Placement | undefined;
246
+ highlightedItem: T | null;
247
+ selectedItems: T[];
248
+ valueAsString: string;
249
+ };
250
+ computed: {
251
+ isInputValueEmpty: boolean;
252
+ isInteractive: boolean;
253
+ autoComplete: boolean;
254
+ autoHighlight: boolean;
255
+ hasSelectedItems: boolean;
256
+ };
257
+ event: EventObject;
258
+ action: string;
259
+ effect: string;
260
+ guard: string;
254
261
  }
255
- type State = StateMachine.State<MachineContext, MachineState>;
256
- type Send = StateMachine.Send<StateMachine.AnyEventObject>;
257
- type Service = Machine<MachineContext, MachineState, StateMachine.AnyEventObject>;
262
+ type ComboboxService<T extends CollectionItem = CollectionItem> = Service<ComboboxSchema<T>>;
263
+ type ComboboxMachine<T extends CollectionItem = CollectionItem> = Machine<ComboboxSchema<T>>;
258
264
  interface TriggerProps {
259
265
  /**
260
266
  * Whether the trigger is focusable
@@ -295,7 +301,7 @@ interface ItemGroupProps {
295
301
  interface ItemGroupLabelProps {
296
302
  htmlFor: string;
297
303
  }
298
- interface MachineApi<T extends PropTypes = PropTypes, V extends CollectionItem = CollectionItem> {
304
+ interface ComboboxApi<T extends PropTypes = PropTypes, V extends CollectionItem = CollectionItem> {
299
305
  /**
300
306
  * Whether the combobox is focused
301
307
  */
@@ -373,10 +379,6 @@ interface MachineApi<T extends PropTypes = PropTypes, V extends CollectionItem =
373
379
  * Function to toggle the combobox
374
380
  */
375
381
  collection: ListCollection<V>;
376
- /**
377
- * Function to set the collection of items
378
- */
379
- setCollection(collection: ListCollection<V>): void;
380
382
  /**
381
383
  * Function to set the positioning options
382
384
  */
@@ -405,8 +407,17 @@ interface MachineApi<T extends PropTypes = PropTypes, V extends CollectionItem =
405
407
  getItemGroupLabelProps(props: ItemGroupLabelProps): T["element"];
406
408
  }
407
409
 
408
- declare function connect<T extends PropTypes, V extends CollectionItem>(state: State, send: Send, normalize: NormalizeProps<T>): MachineApi<T, V>;
410
+ declare function connect<T extends PropTypes, V extends CollectionItem>(service: ComboboxService<V>, normalize: NormalizeProps<T>): ComboboxApi<T, V>;
411
+
412
+ declare const machine: _zag_js_core.Machine<ComboboxSchema<any>>;
409
413
 
410
- declare function machine<T extends CollectionItem>(userContext: UserDefinedContext<T>): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
414
+ declare const props: (keyof ComboboxProps<any>)[];
415
+ declare const splitProps: <Props extends Partial<ComboboxProps<any>>>(props: Props) => [Partial<ComboboxProps<any>>, Omit<Props, keyof ComboboxProps<any>>];
416
+ declare const itemGroupLabelProps: "htmlFor"[];
417
+ declare const splitItemGroupLabelProps: <Props extends ItemGroupLabelProps>(props: Props) => [ItemGroupLabelProps, Omit<Props, "htmlFor">];
418
+ declare const itemGroupProps: "id"[];
419
+ declare const splitItemGroupProps: <Props extends ItemGroupProps>(props: Props) => [ItemGroupProps, Omit<Props, "id">];
420
+ declare const itemProps: (keyof ItemProps)[];
421
+ declare const splitItemProps: <Props extends ItemProps>(props: Props) => [ItemProps, Omit<Props, keyof ItemProps>];
411
422
 
412
- 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 NavigateDetails, type OpenChangeDetails, type ScrollToIndexDetails, type Service, type TriggerProps, type ValueChangeDetails, anatomy, collection, connect, machine };
423
+ export { type ComboboxApi as Api, type ElementIds, type HighlightChangeDetails, type InputValueChangeDetails, type IntlTranslations, type ItemGroupLabelProps, type ItemGroupProps, type ItemProps, type ItemState, type ComboboxMachine as Machine, type NavigateDetails, type OpenChangeDetails, type ComboboxProps as Props, type ScrollToIndexDetails, type ComboboxService as Service, type TriggerProps, type ValueChangeDetails, anatomy, collection, connect, itemGroupLabelProps, itemGroupProps, itemProps, machine, props, splitItemGroupLabelProps, splitItemGroupProps, splitItemProps, splitProps };