@zag-js/radio-group 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
@@ -142,6 +142,7 @@ function connect(service, normalize) {
142
142
  },
143
143
  onPointerDown(event) {
144
144
  if (itemState.disabled) return;
145
+ if (!domQuery.isLeftClick(event)) return;
145
146
  if (itemState.focused && event.pointerType === "mouse") {
146
147
  event.preventDefault();
147
148
  }
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createAnatomy } from '@zag-js/anatomy';
2
- import { dispatchInputCheckedEvent, trackElementRect, trackFormControl, queryAll, dataAttr, visuallyHiddenStyle, isSafari } from '@zag-js/dom-query';
2
+ import { dispatchInputCheckedEvent, trackElementRect, trackFormControl, queryAll, dataAttr, visuallyHiddenStyle, isSafari, isLeftClick } from '@zag-js/dom-query';
3
3
  import { trackFocusVisible, isFocusVisible } from '@zag-js/focus-visible';
4
4
  import { createGuards, createMachine } from '@zag-js/core';
5
5
  import { isString, createSplitProps } from '@zag-js/utils';
@@ -140,6 +140,7 @@ function connect(service, normalize) {
140
140
  },
141
141
  onPointerDown(event) {
142
142
  if (itemState.disabled) return;
143
+ if (!isLeftClick(event)) return;
143
144
  if (itemState.focused && event.pointerType === "mouse") {
144
145
  event.preventDefault();
145
146
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/radio-group",
3
- "version": "1.15.5",
3
+ "version": "1.15.6",
4
4
  "description": "Core logic for the radio group widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -27,12 +27,12 @@
27
27
  "url": "https://github.com/chakra-ui/zag/issues"
28
28
  },
29
29
  "dependencies": {
30
- "@zag-js/anatomy": "1.15.5",
31
- "@zag-js/dom-query": "1.15.5",
32
- "@zag-js/focus-visible": "1.15.5",
33
- "@zag-js/utils": "1.15.5",
34
- "@zag-js/core": "1.15.5",
35
- "@zag-js/types": "1.15.5"
30
+ "@zag-js/anatomy": "1.15.6",
31
+ "@zag-js/dom-query": "1.15.6",
32
+ "@zag-js/focus-visible": "1.15.6",
33
+ "@zag-js/utils": "1.15.6",
34
+ "@zag-js/core": "1.15.6",
35
+ "@zag-js/types": "1.15.6"
36
36
  },
37
37
  "devDependencies": {
38
38
  "clean-package": "2.2.0"