@zag-js/color-picker 1.12.4 → 1.13.1
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 +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1293,7 +1293,7 @@ var machine = core.createMachine({
|
|
|
1293
1293
|
valueAsString: computed("valueAsString")
|
|
1294
1294
|
});
|
|
1295
1295
|
},
|
|
1296
|
-
setChannelColorFromInput({ context, event, scope }) {
|
|
1296
|
+
setChannelColorFromInput({ context, event, scope, prop }) {
|
|
1297
1297
|
const { channel, isTextField, value } = event;
|
|
1298
1298
|
const currentAlpha = context.get("value").getChannelValue("alpha");
|
|
1299
1299
|
let color;
|
|
@@ -1313,6 +1313,10 @@ var machine = core.createMachine({
|
|
|
1313
1313
|
}
|
|
1314
1314
|
syncChannelInputs(scope, context.get("value"), color);
|
|
1315
1315
|
context.set("value", color);
|
|
1316
|
+
prop("onValueChangeEnd")?.({
|
|
1317
|
+
value: color,
|
|
1318
|
+
valueAsString: color.toString(context.get("format"))
|
|
1319
|
+
});
|
|
1316
1320
|
},
|
|
1317
1321
|
incrementChannel({ context, event }) {
|
|
1318
1322
|
const color = context.get("value").incrementChannel(event.channel, event.step);
|
package/dist/index.mjs
CHANGED
|
@@ -1291,7 +1291,7 @@ var machine = createMachine({
|
|
|
1291
1291
|
valueAsString: computed("valueAsString")
|
|
1292
1292
|
});
|
|
1293
1293
|
},
|
|
1294
|
-
setChannelColorFromInput({ context, event, scope }) {
|
|
1294
|
+
setChannelColorFromInput({ context, event, scope, prop }) {
|
|
1295
1295
|
const { channel, isTextField, value } = event;
|
|
1296
1296
|
const currentAlpha = context.get("value").getChannelValue("alpha");
|
|
1297
1297
|
let color;
|
|
@@ -1311,6 +1311,10 @@ var machine = createMachine({
|
|
|
1311
1311
|
}
|
|
1312
1312
|
syncChannelInputs(scope, context.get("value"), color);
|
|
1313
1313
|
context.set("value", color);
|
|
1314
|
+
prop("onValueChangeEnd")?.({
|
|
1315
|
+
value: color,
|
|
1316
|
+
valueAsString: color.toString(context.get("format"))
|
|
1317
|
+
});
|
|
1314
1318
|
},
|
|
1315
1319
|
incrementChannel({ context, event }) {
|
|
1316
1320
|
const color = context.get("value").incrementChannel(event.channel, event.step);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/color-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
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.
|
|
31
|
-
"@zag-js/anatomy": "1.
|
|
32
|
-
"@zag-js/dom-query": "1.
|
|
33
|
-
"@zag-js/dismissable": "1.
|
|
34
|
-
"@zag-js/utils": "1.
|
|
35
|
-
"@zag-js/color-utils": "1.
|
|
36
|
-
"@zag-js/popper": "1.
|
|
37
|
-
"@zag-js/types": "1.
|
|
30
|
+
"@zag-js/core": "1.13.1",
|
|
31
|
+
"@zag-js/anatomy": "1.13.1",
|
|
32
|
+
"@zag-js/dom-query": "1.13.1",
|
|
33
|
+
"@zag-js/dismissable": "1.13.1",
|
|
34
|
+
"@zag-js/utils": "1.13.1",
|
|
35
|
+
"@zag-js/color-utils": "1.13.1",
|
|
36
|
+
"@zag-js/popper": "1.13.1",
|
|
37
|
+
"@zag-js/types": "1.13.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"clean-package": "2.2.0"
|