@zag-js/combobox 1.18.4 → 1.18.5

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
@@ -65,10 +65,10 @@ type ElementIds = Partial<{
65
65
  content: string;
66
66
  trigger: string;
67
67
  clearTrigger: string;
68
- item(id: string, index?: number): string;
68
+ item: (id: string, index?: number) => string;
69
69
  positioner: string;
70
- itemGroup(id: string | number): string;
71
- itemGroupLabel(id: string | number): string;
70
+ itemGroup: (id: string | number) => string;
71
+ itemGroupLabel: (id: string | number) => string;
72
72
  }>;
73
73
  interface ComboboxProps<T extends CollectionItem = CollectionItem> extends DirectionProperty, CommonProperties, InteractOutsideHandlers {
74
74
  /**
@@ -345,16 +345,16 @@ interface ComboboxApi<T extends PropTypes = PropTypes, V extends CollectionItem
345
345
  /**
346
346
  * The value of the combobox input
347
347
  */
348
- setHighlightValue(value: string): void;
348
+ setHighlightValue: (value: string) => void;
349
349
  /**
350
350
  * Function to clear the highlighted value
351
351
  */
352
- clearHighlightValue(): void;
352
+ clearHighlightValue: VoidFunction;
353
353
  /**
354
354
  * Function to sync the selected items with the value.
355
355
  * Useful when `value` is updated from async sources.
356
356
  */
357
- syncSelectedItems(): void;
357
+ syncSelectedItems: VoidFunction;
358
358
  /**
359
359
  * The selected items
360
360
  */
@@ -374,31 +374,31 @@ interface ComboboxApi<T extends PropTypes = PropTypes, V extends CollectionItem
374
374
  /**
375
375
  * Function to select a value
376
376
  */
377
- selectValue(value: string): void;
377
+ selectValue: (value: string) => void;
378
378
  /**
379
379
  * Function to set the value of the combobox
380
380
  */
381
- setValue(value: string[]): void;
381
+ setValue: (value: string[]) => void;
382
382
  /**
383
383
  * Function to clear the value of the combobox
384
384
  */
385
- clearValue(value?: string): void;
385
+ clearValue: (value?: string) => void;
386
386
  /**
387
387
  * Function to focus on the combobox input
388
388
  */
389
- focus(): void;
389
+ focus: VoidFunction;
390
390
  /**
391
391
  * Function to set the input value of the combobox
392
392
  */
393
- setInputValue(value: string, reason?: InputValueChangeReason): void;
393
+ setInputValue: (value: string, reason?: InputValueChangeReason) => void;
394
394
  /**
395
395
  * Returns the state of a combobox item
396
396
  */
397
- getItemState(props: ItemProps): ItemState;
397
+ getItemState: (props: ItemProps) => ItemState;
398
398
  /**
399
399
  * Function to open or close the combobox
400
400
  */
401
- setOpen(open: boolean, reason?: OpenChangeReason): void;
401
+ setOpen: (open: boolean, reason?: OpenChangeReason) => void;
402
402
  /**
403
403
  * Function to toggle the combobox
404
404
  */
@@ -406,7 +406,7 @@ interface ComboboxApi<T extends PropTypes = PropTypes, V extends CollectionItem
406
406
  /**
407
407
  * Function to set the positioning options
408
408
  */
409
- reposition(options?: Partial<PositioningOptions>): void;
409
+ reposition: (options?: Partial<PositioningOptions>) => void;
410
410
  /**
411
411
  * Whether the combobox allows multiple selections
412
412
  */
@@ -415,20 +415,20 @@ interface ComboboxApi<T extends PropTypes = PropTypes, V extends CollectionItem
415
415
  * Whether the combobox is disabled
416
416
  */
417
417
  disabled: boolean;
418
- getRootProps(): T["element"];
419
- getLabelProps(): T["label"];
420
- getControlProps(): T["element"];
421
- getPositionerProps(): T["element"];
422
- getInputProps(): T["input"];
423
- getContentProps(): T["element"];
424
- getTriggerProps(props?: TriggerProps): T["button"];
425
- getClearTriggerProps(): T["button"];
426
- getListProps(): T["element"];
427
- getItemProps(props: ItemProps): T["element"];
428
- getItemTextProps(props: ItemProps): T["element"];
429
- getItemIndicatorProps(props: ItemProps): T["element"];
430
- getItemGroupProps(props: ItemGroupProps): T["element"];
431
- getItemGroupLabelProps(props: ItemGroupLabelProps): T["element"];
418
+ getRootProps: () => T["element"];
419
+ getLabelProps: () => T["label"];
420
+ getControlProps: () => T["element"];
421
+ getPositionerProps: () => T["element"];
422
+ getInputProps: () => T["input"];
423
+ getContentProps: () => T["element"];
424
+ getTriggerProps: (props?: TriggerProps) => T["button"];
425
+ getClearTriggerProps: () => T["button"];
426
+ getListProps: () => T["element"];
427
+ getItemProps: (props: ItemProps) => T["element"];
428
+ getItemTextProps: (props: ItemProps) => T["element"];
429
+ getItemIndicatorProps: (props: ItemProps) => T["element"];
430
+ getItemGroupProps: (props: ItemGroupProps) => T["element"];
431
+ getItemGroupLabelProps: (props: ItemGroupLabelProps) => T["element"];
432
432
  }
433
433
 
434
434
  declare function connect<T extends PropTypes, V extends CollectionItem>(service: ComboboxService<V>, normalize: NormalizeProps<T>): ComboboxApi<T, V>;
package/dist/index.d.ts CHANGED
@@ -65,10 +65,10 @@ type ElementIds = Partial<{
65
65
  content: string;
66
66
  trigger: string;
67
67
  clearTrigger: string;
68
- item(id: string, index?: number): string;
68
+ item: (id: string, index?: number) => string;
69
69
  positioner: string;
70
- itemGroup(id: string | number): string;
71
- itemGroupLabel(id: string | number): string;
70
+ itemGroup: (id: string | number) => string;
71
+ itemGroupLabel: (id: string | number) => string;
72
72
  }>;
73
73
  interface ComboboxProps<T extends CollectionItem = CollectionItem> extends DirectionProperty, CommonProperties, InteractOutsideHandlers {
74
74
  /**
@@ -345,16 +345,16 @@ interface ComboboxApi<T extends PropTypes = PropTypes, V extends CollectionItem
345
345
  /**
346
346
  * The value of the combobox input
347
347
  */
348
- setHighlightValue(value: string): void;
348
+ setHighlightValue: (value: string) => void;
349
349
  /**
350
350
  * Function to clear the highlighted value
351
351
  */
352
- clearHighlightValue(): void;
352
+ clearHighlightValue: VoidFunction;
353
353
  /**
354
354
  * Function to sync the selected items with the value.
355
355
  * Useful when `value` is updated from async sources.
356
356
  */
357
- syncSelectedItems(): void;
357
+ syncSelectedItems: VoidFunction;
358
358
  /**
359
359
  * The selected items
360
360
  */
@@ -374,31 +374,31 @@ interface ComboboxApi<T extends PropTypes = PropTypes, V extends CollectionItem
374
374
  /**
375
375
  * Function to select a value
376
376
  */
377
- selectValue(value: string): void;
377
+ selectValue: (value: string) => void;
378
378
  /**
379
379
  * Function to set the value of the combobox
380
380
  */
381
- setValue(value: string[]): void;
381
+ setValue: (value: string[]) => void;
382
382
  /**
383
383
  * Function to clear the value of the combobox
384
384
  */
385
- clearValue(value?: string): void;
385
+ clearValue: (value?: string) => void;
386
386
  /**
387
387
  * Function to focus on the combobox input
388
388
  */
389
- focus(): void;
389
+ focus: VoidFunction;
390
390
  /**
391
391
  * Function to set the input value of the combobox
392
392
  */
393
- setInputValue(value: string, reason?: InputValueChangeReason): void;
393
+ setInputValue: (value: string, reason?: InputValueChangeReason) => void;
394
394
  /**
395
395
  * Returns the state of a combobox item
396
396
  */
397
- getItemState(props: ItemProps): ItemState;
397
+ getItemState: (props: ItemProps) => ItemState;
398
398
  /**
399
399
  * Function to open or close the combobox
400
400
  */
401
- setOpen(open: boolean, reason?: OpenChangeReason): void;
401
+ setOpen: (open: boolean, reason?: OpenChangeReason) => void;
402
402
  /**
403
403
  * Function to toggle the combobox
404
404
  */
@@ -406,7 +406,7 @@ interface ComboboxApi<T extends PropTypes = PropTypes, V extends CollectionItem
406
406
  /**
407
407
  * Function to set the positioning options
408
408
  */
409
- reposition(options?: Partial<PositioningOptions>): void;
409
+ reposition: (options?: Partial<PositioningOptions>) => void;
410
410
  /**
411
411
  * Whether the combobox allows multiple selections
412
412
  */
@@ -415,20 +415,20 @@ interface ComboboxApi<T extends PropTypes = PropTypes, V extends CollectionItem
415
415
  * Whether the combobox is disabled
416
416
  */
417
417
  disabled: boolean;
418
- getRootProps(): T["element"];
419
- getLabelProps(): T["label"];
420
- getControlProps(): T["element"];
421
- getPositionerProps(): T["element"];
422
- getInputProps(): T["input"];
423
- getContentProps(): T["element"];
424
- getTriggerProps(props?: TriggerProps): T["button"];
425
- getClearTriggerProps(): T["button"];
426
- getListProps(): T["element"];
427
- getItemProps(props: ItemProps): T["element"];
428
- getItemTextProps(props: ItemProps): T["element"];
429
- getItemIndicatorProps(props: ItemProps): T["element"];
430
- getItemGroupProps(props: ItemGroupProps): T["element"];
431
- getItemGroupLabelProps(props: ItemGroupLabelProps): T["element"];
418
+ getRootProps: () => T["element"];
419
+ getLabelProps: () => T["label"];
420
+ getControlProps: () => T["element"];
421
+ getPositionerProps: () => T["element"];
422
+ getInputProps: () => T["input"];
423
+ getContentProps: () => T["element"];
424
+ getTriggerProps: (props?: TriggerProps) => T["button"];
425
+ getClearTriggerProps: () => T["button"];
426
+ getListProps: () => T["element"];
427
+ getItemProps: (props: ItemProps) => T["element"];
428
+ getItemTextProps: (props: ItemProps) => T["element"];
429
+ getItemIndicatorProps: (props: ItemProps) => T["element"];
430
+ getItemGroupProps: (props: ItemGroupProps) => T["element"];
431
+ getItemGroupLabelProps: (props: ItemGroupLabelProps) => T["element"];
432
432
  }
433
433
 
434
434
  declare function connect<T extends PropTypes, V extends CollectionItem>(service: ComboboxService<V>, normalize: NormalizeProps<T>): ComboboxApi<T, V>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/combobox",
3
- "version": "1.18.4",
3
+ "version": "1.18.5",
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.18.4",
30
- "@zag-js/aria-hidden": "1.18.4",
31
- "@zag-js/collection": "1.18.4",
32
- "@zag-js/core": "1.18.4",
33
- "@zag-js/dismissable": "1.18.4",
34
- "@zag-js/dom-query": "1.18.4",
35
- "@zag-js/utils": "1.18.4",
36
- "@zag-js/popper": "1.18.4",
37
- "@zag-js/types": "1.18.4"
29
+ "@zag-js/anatomy": "1.18.5",
30
+ "@zag-js/aria-hidden": "1.18.5",
31
+ "@zag-js/collection": "1.18.5",
32
+ "@zag-js/core": "1.18.5",
33
+ "@zag-js/dismissable": "1.18.5",
34
+ "@zag-js/dom-query": "1.18.5",
35
+ "@zag-js/utils": "1.18.5",
36
+ "@zag-js/popper": "1.18.5",
37
+ "@zag-js/types": "1.18.5"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"