@zag-js/color-picker 0.51.0 → 0.51.2
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
- package/src/color-picker.connect.ts +6 -9
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
getEventKey,
|
|
4
4
|
getEventPoint,
|
|
5
5
|
getEventStep,
|
|
6
|
-
getNativeEvent,
|
|
7
6
|
isLeftClick,
|
|
8
7
|
isModifierKey,
|
|
9
8
|
type EventKeyMap,
|
|
@@ -186,11 +185,10 @@ export function connect<T extends PropTypes>(state: State, send: Send, normalize
|
|
|
186
185
|
role: "group",
|
|
187
186
|
onPointerDown(event) {
|
|
188
187
|
if (!interactive) return
|
|
188
|
+
if (!isLeftClick(event)) return
|
|
189
|
+
if (isModifierKey(event)) return
|
|
189
190
|
|
|
190
|
-
const
|
|
191
|
-
if (!isLeftClick(evt) || isModifierKey(evt)) return
|
|
192
|
-
|
|
193
|
-
const point = getEventPoint(evt)
|
|
191
|
+
const point = getEventPoint(event)
|
|
194
192
|
const channel = { xChannel, yChannel }
|
|
195
193
|
|
|
196
194
|
send({ type: "AREA.POINTER_DOWN", point, channel, id: "area" })
|
|
@@ -329,11 +327,10 @@ export function connect<T extends PropTypes>(state: State, send: Send, normalize
|
|
|
329
327
|
role: "presentation",
|
|
330
328
|
onPointerDown(event) {
|
|
331
329
|
if (!interactive) return
|
|
330
|
+
if (!isLeftClick(event)) return
|
|
331
|
+
if (isModifierKey(event)) return
|
|
332
332
|
|
|
333
|
-
const
|
|
334
|
-
if (!isLeftClick(evt) || isModifierKey(evt)) return
|
|
335
|
-
|
|
336
|
-
const point = getEventPoint(evt)
|
|
333
|
+
const point = getEventPoint(event)
|
|
337
334
|
send({ type: "CHANNEL_SLIDER.POINTER_DOWN", channel, point, id: channel, orientation })
|
|
338
335
|
|
|
339
336
|
event.preventDefault()
|