@zag-js/combobox 1.15.5 → 1.15.6

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.js CHANGED
@@ -314,6 +314,7 @@ function connect(service, normalize) {
314
314
  onPointerDown(event2) {
315
315
  if (!interactive) return;
316
316
  if (event2.pointerType === "touch") return;
317
+ if (!domQuery.isLeftClick(event2)) return;
317
318
  event2.preventDefault();
318
319
  queueMicrotask(() => {
319
320
  getInputEl(scope)?.focus({ preventScroll: true });
@@ -353,6 +354,7 @@ function connect(service, normalize) {
353
354
  "aria-multiselectable": prop("multiple") && composite ? true : void 0,
354
355
  "data-empty": domQuery.dataAttr(collection2.size === 0),
355
356
  onPointerDown(event2) {
357
+ if (!domQuery.isLeftClick(event2)) return;
356
358
  event2.preventDefault();
357
359
  }
358
360
  });
@@ -379,6 +381,7 @@ function connect(service, normalize) {
379
381
  "aria-controls": getInputId(scope),
380
382
  hidden: !context.get("value").length,
381
383
  onPointerDown(event2) {
384
+ if (!domQuery.isLeftClick(event2)) return;
382
385
  event2.preventDefault();
383
386
  },
384
387
  onClick(event2) {
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createAnatomy } from '@zag-js/anatomy';
2
2
  import { ListCollection } from '@zag-js/collection';
3
- import { raf, setCaretToEnd, observeAttributes, observeChildren, clickIfLink, scrollIntoView, query, dataAttr, ariaAttr, isDownloadingEvent, isOpeningInNewTab, isContextMenuEvent, getEventKey, isLeftClick, isComposingEvent, isAnchorElement } from '@zag-js/dom-query';
3
+ import { raf, setCaretToEnd, observeAttributes, observeChildren, clickIfLink, scrollIntoView, query, dataAttr, ariaAttr, isDownloadingEvent, isOpeningInNewTab, isContextMenuEvent, isLeftClick, getEventKey, isComposingEvent, isAnchorElement } from '@zag-js/dom-query';
4
4
  import { getPlacement, getPlacementStyles } from '@zag-js/popper';
5
5
  import { match, remove, addOrRemove, isBoolean, isEqual, createSplitProps, ensure } from '@zag-js/utils';
6
6
  import { ariaHidden } from '@zag-js/aria-hidden';
@@ -312,6 +312,7 @@ function connect(service, normalize) {
312
312
  onPointerDown(event2) {
313
313
  if (!interactive) return;
314
314
  if (event2.pointerType === "touch") return;
315
+ if (!isLeftClick(event2)) return;
315
316
  event2.preventDefault();
316
317
  queueMicrotask(() => {
317
318
  getInputEl(scope)?.focus({ preventScroll: true });
@@ -351,6 +352,7 @@ function connect(service, normalize) {
351
352
  "aria-multiselectable": prop("multiple") && composite ? true : void 0,
352
353
  "data-empty": dataAttr(collection2.size === 0),
353
354
  onPointerDown(event2) {
355
+ if (!isLeftClick(event2)) return;
354
356
  event2.preventDefault();
355
357
  }
356
358
  });
@@ -377,6 +379,7 @@ function connect(service, normalize) {
377
379
  "aria-controls": getInputId(scope),
378
380
  hidden: !context.get("value").length,
379
381
  onPointerDown(event2) {
382
+ if (!isLeftClick(event2)) return;
380
383
  event2.preventDefault();
381
384
  },
382
385
  onClick(event2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/combobox",
3
- "version": "1.15.5",
3
+ "version": "1.15.6",
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.15.5",
30
- "@zag-js/aria-hidden": "1.15.5",
31
- "@zag-js/collection": "1.15.5",
32
- "@zag-js/core": "1.15.5",
33
- "@zag-js/dismissable": "1.15.5",
34
- "@zag-js/dom-query": "1.15.5",
35
- "@zag-js/utils": "1.15.5",
36
- "@zag-js/popper": "1.15.5",
37
- "@zag-js/types": "1.15.5"
29
+ "@zag-js/anatomy": "1.15.6",
30
+ "@zag-js/aria-hidden": "1.15.6",
31
+ "@zag-js/collection": "1.15.6",
32
+ "@zag-js/core": "1.15.6",
33
+ "@zag-js/dismissable": "1.15.6",
34
+ "@zag-js/dom-query": "1.15.6",
35
+ "@zag-js/utils": "1.15.6",
36
+ "@zag-js/popper": "1.15.6",
37
+ "@zag-js/types": "1.15.6"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"