@zag-js/steps 1.3.3 → 1.4.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.js +3 -5
- package/dist/index.mjs +3 -5
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -208,17 +208,15 @@ var machine = core.createMachine({
|
|
|
208
208
|
...props2
|
|
209
209
|
};
|
|
210
210
|
},
|
|
211
|
-
context({ prop, bindable
|
|
211
|
+
context({ prop, bindable }) {
|
|
212
212
|
return {
|
|
213
213
|
step: bindable(() => ({
|
|
214
214
|
defaultValue: prop("defaultStep"),
|
|
215
215
|
value: prop("step"),
|
|
216
216
|
onChange(value) {
|
|
217
|
-
const computed = getComputed();
|
|
218
217
|
prop("onStepChange")?.({ step: value });
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
218
|
+
const completed = value == prop("count");
|
|
219
|
+
if (completed) prop("onStepComplete")?.();
|
|
222
220
|
}
|
|
223
221
|
}))
|
|
224
222
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -206,17 +206,15 @@ var machine = createMachine({
|
|
|
206
206
|
...props2
|
|
207
207
|
};
|
|
208
208
|
},
|
|
209
|
-
context({ prop, bindable
|
|
209
|
+
context({ prop, bindable }) {
|
|
210
210
|
return {
|
|
211
211
|
step: bindable(() => ({
|
|
212
212
|
defaultValue: prop("defaultStep"),
|
|
213
213
|
value: prop("step"),
|
|
214
214
|
onChange(value) {
|
|
215
|
-
const computed = getComputed();
|
|
216
215
|
prop("onStepChange")?.({ step: value });
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
216
|
+
const completed = value == prop("count");
|
|
217
|
+
if (completed) prop("onStepComplete")?.();
|
|
220
218
|
}
|
|
221
219
|
}))
|
|
222
220
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/steps",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Core logic for the steps widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@zag-js/anatomy": "1.
|
|
31
|
-
"@zag-js/
|
|
32
|
-
"@zag-js/
|
|
33
|
-
"@zag-js/
|
|
34
|
-
"@zag-js/types": "1.
|
|
30
|
+
"@zag-js/anatomy": "1.4.0",
|
|
31
|
+
"@zag-js/core": "1.4.0",
|
|
32
|
+
"@zag-js/dom-query": "1.4.0",
|
|
33
|
+
"@zag-js/utils": "1.4.0",
|
|
34
|
+
"@zag-js/types": "1.4.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"clean-package": "2.2.0"
|