@zag-js/slider 0.9.0 → 0.9.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.
|
@@ -6,7 +6,14 @@ import {
|
|
|
6
6
|
} from "./chunk-JG4OWFJP.mjs";
|
|
7
7
|
|
|
8
8
|
// src/slider.connect.ts
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
getEventKey,
|
|
11
|
+
getEventPoint,
|
|
12
|
+
getEventStep,
|
|
13
|
+
getNativeEvent,
|
|
14
|
+
isLeftClick,
|
|
15
|
+
isModifiedEvent
|
|
16
|
+
} from "@zag-js/dom-event";
|
|
10
17
|
import { ariaAttr, dataAttr } from "@zag-js/dom-query";
|
|
11
18
|
import { getPercentValue, getValuePercent } from "@zag-js/numeric-range";
|
|
12
19
|
function connect(state, send, normalize) {
|
|
@@ -221,7 +228,7 @@ function connect(state, send, normalize) {
|
|
|
221
228
|
const evt = getNativeEvent(event);
|
|
222
229
|
if (!isLeftClick(evt) || isModifiedEvent(evt))
|
|
223
230
|
return;
|
|
224
|
-
const point =
|
|
231
|
+
const point = getEventPoint(evt);
|
|
225
232
|
send({ type: "POINTER_DOWN", point });
|
|
226
233
|
event.preventDefault();
|
|
227
234
|
event.stopPropagation();
|
package/dist/index.js
CHANGED
|
@@ -418,7 +418,7 @@ function connect(state, send, normalize) {
|
|
|
418
418
|
const evt = (0, import_dom_event2.getNativeEvent)(event);
|
|
419
419
|
if (!(0, import_dom_event2.isLeftClick)(evt) || (0, import_dom_event2.isModifiedEvent)(evt))
|
|
420
420
|
return;
|
|
421
|
-
const point =
|
|
421
|
+
const point = (0, import_dom_event2.getEventPoint)(evt);
|
|
422
422
|
send({ type: "POINTER_DOWN", point });
|
|
423
423
|
event.preventDefault();
|
|
424
424
|
event.stopPropagation();
|
package/dist/index.mjs
CHANGED
package/dist/slider.connect.js
CHANGED
|
@@ -413,7 +413,7 @@ function connect(state, send, normalize) {
|
|
|
413
413
|
const evt = (0, import_dom_event2.getNativeEvent)(event);
|
|
414
414
|
if (!(0, import_dom_event2.isLeftClick)(evt) || (0, import_dom_event2.isModifiedEvent)(evt))
|
|
415
415
|
return;
|
|
416
|
-
const point =
|
|
416
|
+
const point = (0, import_dom_event2.getEventPoint)(evt);
|
|
417
417
|
send({ type: "POINTER_DOWN", point });
|
|
418
418
|
event.preventDefault();
|
|
419
419
|
event.stopPropagation();
|
package/dist/slider.connect.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/slider",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Core logic for the slider 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": "0.9.
|
|
30
|
-
"@zag-js/core": "0.
|
|
31
|
-
"@zag-js/dom-query": "0.
|
|
32
|
-
"@zag-js/dom-event": "0.
|
|
33
|
-
"@zag-js/form-utils": "0.2
|
|
34
|
-
"@zag-js/utils": "0.
|
|
35
|
-
"@zag-js/element-size": "0.
|
|
36
|
-
"@zag-js/numeric-range": "0.
|
|
37
|
-
"@zag-js/types": "0.
|
|
29
|
+
"@zag-js/anatomy": "0.9.2",
|
|
30
|
+
"@zag-js/core": "0.9.2",
|
|
31
|
+
"@zag-js/dom-query": "0.9.2",
|
|
32
|
+
"@zag-js/dom-event": "0.9.2",
|
|
33
|
+
"@zag-js/form-utils": "0.9.2",
|
|
34
|
+
"@zag-js/utils": "0.9.2",
|
|
35
|
+
"@zag-js/element-size": "0.9.2",
|
|
36
|
+
"@zag-js/numeric-range": "0.9.2",
|
|
37
|
+
"@zag-js/types": "0.9.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"clean-package": "2.2.0"
|