@zag-js/color-picker 1.27.1 → 1.29.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.
package/dist/index.d.mts CHANGED
@@ -32,6 +32,7 @@ interface ValueChangeDetails {
32
32
  }
33
33
  interface OpenChangeDetails {
34
34
  open: boolean;
35
+ value: Color;
35
36
  }
36
37
  interface FormatChangeDetails {
37
38
  format: ColorFormat;
package/dist/index.d.ts CHANGED
@@ -32,6 +32,7 @@ interface ValueChangeDetails {
32
32
  }
33
33
  interface OpenChangeDetails {
34
34
  open: boolean;
35
+ value: Color;
35
36
  }
36
37
  interface FormatChangeDetails {
37
38
  format: ColorFormat;
package/dist/index.js CHANGED
@@ -1419,13 +1419,13 @@ var machine = core.createMachine({
1419
1419
  syncFormatSelectElement({ context, scope }) {
1420
1420
  syncFormatSelect(scope, context.get("format"));
1421
1421
  },
1422
- invokeOnOpen({ prop }) {
1422
+ invokeOnOpen({ prop, context }) {
1423
1423
  if (prop("inline")) return;
1424
- prop("onOpenChange")?.({ open: true });
1424
+ prop("onOpenChange")?.({ open: true, value: context.get("value") });
1425
1425
  },
1426
- invokeOnClose({ prop }) {
1426
+ invokeOnClose({ prop, context }) {
1427
1427
  if (prop("inline")) return;
1428
- prop("onOpenChange")?.({ open: false });
1428
+ prop("onOpenChange")?.({ open: false, value: context.get("value") });
1429
1429
  },
1430
1430
  toggleVisibility({ prop, event, send }) {
1431
1431
  send({ type: prop("open") ? "CONTROLLED.OPEN" : "CONTROLLED.CLOSE", previousEvent: event });
package/dist/index.mjs CHANGED
@@ -1417,13 +1417,13 @@ var machine = createMachine({
1417
1417
  syncFormatSelectElement({ context, scope }) {
1418
1418
  syncFormatSelect(scope, context.get("format"));
1419
1419
  },
1420
- invokeOnOpen({ prop }) {
1420
+ invokeOnOpen({ prop, context }) {
1421
1421
  if (prop("inline")) return;
1422
- prop("onOpenChange")?.({ open: true });
1422
+ prop("onOpenChange")?.({ open: true, value: context.get("value") });
1423
1423
  },
1424
- invokeOnClose({ prop }) {
1424
+ invokeOnClose({ prop, context }) {
1425
1425
  if (prop("inline")) return;
1426
- prop("onOpenChange")?.({ open: false });
1426
+ prop("onOpenChange")?.({ open: false, value: context.get("value") });
1427
1427
  },
1428
1428
  toggleVisibility({ prop, event, send }) {
1429
1429
  send({ type: prop("open") ? "CONTROLLED.OPEN" : "CONTROLLED.CLOSE", previousEvent: event });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/color-picker",
3
- "version": "1.27.1",
3
+ "version": "1.29.0",
4
4
  "description": "Core logic for the color-picker widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -27,14 +27,14 @@
27
27
  "url": "https://github.com/chakra-ui/zag/issues"
28
28
  },
29
29
  "dependencies": {
30
- "@zag-js/core": "1.27.1",
31
- "@zag-js/anatomy": "1.27.1",
32
- "@zag-js/dom-query": "1.27.1",
33
- "@zag-js/dismissable": "1.27.1",
34
- "@zag-js/utils": "1.27.1",
35
- "@zag-js/color-utils": "1.27.1",
36
- "@zag-js/popper": "1.27.1",
37
- "@zag-js/types": "1.27.1"
30
+ "@zag-js/core": "1.29.0",
31
+ "@zag-js/anatomy": "1.29.0",
32
+ "@zag-js/dom-query": "1.29.0",
33
+ "@zag-js/dismissable": "1.29.0",
34
+ "@zag-js/utils": "1.29.0",
35
+ "@zag-js/color-utils": "1.29.0",
36
+ "@zag-js/popper": "1.29.0",
37
+ "@zag-js/types": "1.29.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "clean-package": "2.2.0"