@zag-js/number-input 0.9.1 → 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.
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-AXXDGYUW.mjs";
10
10
 
11
11
  // src/number-input.connect.ts
12
- import { getEventStep, getNativeEvent, isLeftClick } from "@zag-js/dom-event";
12
+ import { getEventPoint, getEventStep, getNativeEvent, isLeftClick } from "@zag-js/dom-event";
13
13
  import { ariaAttr, dataAttr } from "@zag-js/dom-query";
14
14
  import { roundToDevicePixel } from "@zag-js/number-utils";
15
15
  function connect(state, send, normalize) {
@@ -228,11 +228,11 @@ function connect(state, send, normalize) {
228
228
  if (isDisabled)
229
229
  return;
230
230
  const evt = getNativeEvent(event);
231
- event.preventDefault();
232
- const point = { x: evt.clientX, y: evt.clientY };
231
+ const point = getEventPoint(evt);
233
232
  point.x = point.x - roundToDevicePixel(7.5);
234
233
  point.y = point.y - roundToDevicePixel(7.5);
235
234
  send({ type: "PRESS_DOWN_SCRUBBER", point });
235
+ event.preventDefault();
236
236
  },
237
237
  style: {
238
238
  cursor: isDisabled ? void 0 : "ew-resize"
package/dist/index.js CHANGED
@@ -399,11 +399,11 @@ function connect(state, send, normalize) {
399
399
  if (isDisabled)
400
400
  return;
401
401
  const evt = (0, import_dom_event2.getNativeEvent)(event);
402
- event.preventDefault();
403
- const point = { x: evt.clientX, y: evt.clientY };
402
+ const point = (0, import_dom_event2.getEventPoint)(evt);
404
403
  point.x = point.x - (0, import_number_utils3.roundToDevicePixel)(7.5);
405
404
  point.y = point.y - (0, import_number_utils3.roundToDevicePixel)(7.5);
406
405
  send({ type: "PRESS_DOWN_SCRUBBER", point });
406
+ event.preventDefault();
407
407
  },
408
408
  style: {
409
409
  cursor: isDisabled ? void 0 : "ew-resize"
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-DYFCS7PF.mjs";
3
+ } from "./chunk-ZMYZZUU6.mjs";
4
4
  import {
5
5
  anatomy
6
6
  } from "./chunk-XHRILSH3.mjs";
@@ -395,11 +395,11 @@ function connect(state, send, normalize) {
395
395
  if (isDisabled)
396
396
  return;
397
397
  const evt = (0, import_dom_event2.getNativeEvent)(event);
398
- event.preventDefault();
399
- const point = { x: evt.clientX, y: evt.clientY };
398
+ const point = (0, import_dom_event2.getEventPoint)(evt);
400
399
  point.x = point.x - (0, import_number_utils3.roundToDevicePixel)(7.5);
401
400
  point.y = point.y - (0, import_number_utils3.roundToDevicePixel)(7.5);
402
401
  send({ type: "PRESS_DOWN_SCRUBBER", point });
402
+ event.preventDefault();
403
403
  },
404
404
  style: {
405
405
  cursor: isDisabled ? void 0 : "ew-resize"
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  connect
3
- } from "./chunk-DYFCS7PF.mjs";
3
+ } from "./chunk-ZMYZZUU6.mjs";
4
4
  import "./chunk-XHRILSH3.mjs";
5
5
  import "./chunk-QYY4CWRS.mjs";
6
6
  import "./chunk-AXXDGYUW.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/number-input",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Core logic for the number-input 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.1",
30
- "@zag-js/core": "0.9.1",
31
- "@zag-js/dom-query": "0.9.1",
32
- "@zag-js/dom-event": "0.9.1",
33
- "@zag-js/form-utils": "0.9.1",
34
- "@zag-js/mutation-observer": "0.9.1",
35
- "@zag-js/number-utils": "0.9.1",
36
- "@zag-js/utils": "0.9.1",
37
- "@zag-js/types": "0.9.1"
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/mutation-observer": "0.9.2",
35
+ "@zag-js/number-utils": "0.9.2",
36
+ "@zag-js/utils": "0.9.2",
37
+ "@zag-js/types": "0.9.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"