@zag-js/color-picker 1.41.2 → 1.43.0

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.
@@ -546,6 +546,7 @@ function connect(service, normalize) {
546
546
  onKeyDown(event) {
547
547
  if (event.defaultPrevented) return;
548
548
  if (!interactive) return;
549
+ if ((0, import_dom_query.isComposingEvent)(event)) return;
549
550
  if (event.key === "Enter") {
550
551
  const value2 = isTextField ? event.currentTarget.value : event.currentTarget.valueAsNumber;
551
552
  send({ type: "CHANNEL_INPUT.CHANGE", channel, value: value2, isTextField });
@@ -1,6 +1,6 @@
1
1
  // src/color-picker.connect.ts
2
2
  import { getColorAreaGradient, normalizeColor } from "@zag-js/color-utils";
3
- import { getEventKey, getEventPoint, getEventStep, isLeftClick, isModifierKey } from "@zag-js/dom-query";
3
+ import { getEventKey, getEventPoint, getEventStep, isComposingEvent, isLeftClick, isModifierKey } from "@zag-js/dom-query";
4
4
  import { dataAttr, query, visuallyHiddenStyle } from "@zag-js/dom-query";
5
5
  import { getPlacementSide, getPlacementStyles } from "@zag-js/popper";
6
6
  import { parts } from "./color-picker.anatomy.mjs";
@@ -512,6 +512,7 @@ function connect(service, normalize) {
512
512
  onKeyDown(event) {
513
513
  if (event.defaultPrevented) return;
514
514
  if (!interactive) return;
515
+ if (isComposingEvent(event)) return;
515
516
  if (event.key === "Enter") {
516
517
  const value2 = isTextField ? event.currentTarget.value : event.currentTarget.valueAsNumber;
517
518
  send({ type: "CHANNEL_INPUT.CHANGE", channel, value: value2, isTextField });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/color-picker",
3
- "version": "1.41.2",
3
+ "version": "1.43.0",
4
4
  "description": "Core logic for the color-picker widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -15,7 +15,10 @@
15
15
  "homepage": "https://github.com/chakra-ui/zag#readme",
16
16
  "license": "MIT",
17
17
  "main": "dist/index.js",
18
- "repository": "https://github.com/chakra-ui/zag/tree/main/packages/color-picker",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/chakra-ui/zag/tree/main/packages/color-picker"
21
+ },
19
22
  "sideEffects": false,
20
23
  "files": [
21
24
  "dist"
@@ -27,14 +30,14 @@
27
30
  "url": "https://github.com/chakra-ui/zag/issues"
28
31
  },
29
32
  "dependencies": {
30
- "@zag-js/core": "1.41.2",
31
- "@zag-js/anatomy": "1.41.2",
32
- "@zag-js/dismissable": "1.41.2",
33
- "@zag-js/utils": "1.41.2",
34
- "@zag-js/dom-query": "1.41.2",
35
- "@zag-js/color-utils": "1.41.2",
36
- "@zag-js/popper": "1.41.2",
37
- "@zag-js/types": "1.41.2"
33
+ "@zag-js/core": "1.43.0",
34
+ "@zag-js/anatomy": "1.43.0",
35
+ "@zag-js/dom-query": "1.43.0",
36
+ "@zag-js/dismissable": "1.43.0",
37
+ "@zag-js/utils": "1.43.0",
38
+ "@zag-js/color-utils": "1.43.0",
39
+ "@zag-js/popper": "1.43.0",
40
+ "@zag-js/types": "1.43.0"
38
41
  },
39
42
  "devDependencies": {
40
43
  "clean-package": "2.2.0"