@zag-js/pin-input 0.0.0-dev-20221015064943 → 0.0.0-dev-20221015071051
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 +6 -3
- package/dist/index.mjs +6 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -61,10 +61,13 @@ function defineDomHelpers(helpers) {
|
|
|
61
61
|
throw new Error("[dom/create-emit] Expected an element but got undefined");
|
|
62
62
|
}
|
|
63
63
|
return (evt, detail, options) => {
|
|
64
|
-
const
|
|
64
|
+
const { bubbles = true, cancelable } = options ?? {};
|
|
65
|
+
const eventName = `zag:${ns}:${evt}`;
|
|
66
|
+
const event = new win.CustomEvent(eventName, {
|
|
65
67
|
detail,
|
|
66
|
-
bubbles
|
|
67
|
-
cancelable
|
|
68
|
+
bubbles,
|
|
69
|
+
cancelable,
|
|
70
|
+
composed: true
|
|
68
71
|
});
|
|
69
72
|
target.dispatchEvent(event);
|
|
70
73
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -34,10 +34,13 @@ function defineDomHelpers(helpers) {
|
|
|
34
34
|
throw new Error("[dom/create-emit] Expected an element but got undefined");
|
|
35
35
|
}
|
|
36
36
|
return (evt, detail, options) => {
|
|
37
|
-
const
|
|
37
|
+
const { bubbles = true, cancelable } = options ?? {};
|
|
38
|
+
const eventName = `zag:${ns}:${evt}`;
|
|
39
|
+
const event = new win.CustomEvent(eventName, {
|
|
38
40
|
detail,
|
|
39
|
-
bubbles
|
|
40
|
-
cancelable
|
|
41
|
+
bubbles,
|
|
42
|
+
cancelable,
|
|
43
|
+
composed: true
|
|
41
44
|
});
|
|
42
45
|
target.dispatchEvent(event);
|
|
43
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/pin-input",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20221015071051",
|
|
4
4
|
"description": "Core logic for the pin-input widget implemented as a state machine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@zag-js/types": "0.2.7"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zag-js/dom-utils": "0.0.0-dev-
|
|
36
|
+
"@zag-js/dom-utils": "0.0.0-dev-20221015071051",
|
|
37
37
|
"@zag-js/form-utils": "0.1.3",
|
|
38
38
|
"@zag-js/utils": "0.1.6"
|
|
39
39
|
},
|