@zag-js/popover 0.0.0-dev-20220709124657 → 0.0.0-dev-20220709173135
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 +4 -3
- package/dist/index.mjs +4 -3
- package/dist/popover.dom.d.ts +3 -0
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -88,7 +88,7 @@ function getEventTarget(event) {
|
|
|
88
88
|
var _a, _b;
|
|
89
89
|
return (_b = (_a = event.composedPath) == null ? void 0 : _a.call(event)[0]) != null ? _b : event.target;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function defineDomHelpers(domUtils) {
|
|
92
92
|
const roots = {
|
|
93
93
|
getRootNode: (ctx) => {
|
|
94
94
|
var _a, _b;
|
|
@@ -98,7 +98,8 @@ function withRootHelpers(domUtils) {
|
|
|
98
98
|
getWin: (ctx) => {
|
|
99
99
|
var _a;
|
|
100
100
|
return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
|
|
101
|
-
}
|
|
101
|
+
},
|
|
102
|
+
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
|
|
102
103
|
};
|
|
103
104
|
return __spreadValues2(__spreadValues2({}, roots), domUtils);
|
|
104
105
|
}
|
|
@@ -228,7 +229,7 @@ var runIfFn2 = (v, ...a) => {
|
|
|
228
229
|
};
|
|
229
230
|
|
|
230
231
|
// src/popover.dom.ts
|
|
231
|
-
var dom =
|
|
232
|
+
var dom = defineDomHelpers({
|
|
232
233
|
getActiveEl: (ctx) => dom.getDoc(ctx).activeElement,
|
|
233
234
|
getAnchorId: (ctx) => {
|
|
234
235
|
var _a, _b;
|
package/dist/index.mjs
CHANGED
|
@@ -64,7 +64,7 @@ function getEventTarget(event) {
|
|
|
64
64
|
var _a, _b;
|
|
65
65
|
return (_b = (_a = event.composedPath) == null ? void 0 : _a.call(event)[0]) != null ? _b : event.target;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function defineDomHelpers(domUtils) {
|
|
68
68
|
const roots = {
|
|
69
69
|
getRootNode: (ctx) => {
|
|
70
70
|
var _a, _b;
|
|
@@ -74,7 +74,8 @@ function withRootHelpers(domUtils) {
|
|
|
74
74
|
getWin: (ctx) => {
|
|
75
75
|
var _a;
|
|
76
76
|
return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
|
|
77
|
-
}
|
|
77
|
+
},
|
|
78
|
+
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
|
|
78
79
|
};
|
|
79
80
|
return __spreadValues2(__spreadValues2({}, roots), domUtils);
|
|
80
81
|
}
|
|
@@ -204,7 +205,7 @@ var runIfFn2 = (v, ...a) => {
|
|
|
204
205
|
};
|
|
205
206
|
|
|
206
207
|
// src/popover.dom.ts
|
|
207
|
-
var dom =
|
|
208
|
+
var dom = defineDomHelpers({
|
|
208
209
|
getActiveEl: (ctx) => dom.getDoc(ctx).activeElement,
|
|
209
210
|
getAnchorId: (ctx) => {
|
|
210
211
|
var _a, _b;
|
package/dist/popover.dom.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export declare const dom: {
|
|
|
9
9
|
getWin: (ctx: {
|
|
10
10
|
getRootNode?: () => Document | Node | ShadowRoot;
|
|
11
11
|
}) => Window & typeof globalThis;
|
|
12
|
+
getActiveElement: (ctx: {
|
|
13
|
+
getRootNode?: () => Document | Node | ShadowRoot;
|
|
14
|
+
}) => HTMLElement;
|
|
12
15
|
} & {
|
|
13
16
|
getActiveEl: (ctx: Ctx) => Element;
|
|
14
17
|
getAnchorId: (ctx: Ctx) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/popover",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20220709173135",
|
|
4
4
|
"description": "Core logic for the popover widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@zag-js/aria-hidden": "0.1.0",
|
|
33
33
|
"@zag-js/core": "0.1.7",
|
|
34
|
-
"@zag-js/dom-utils": "0.0.0-dev-
|
|
35
|
-
"@zag-js/popper": "0.0.0-dev-
|
|
36
|
-
"@zag-js/remove-scroll": "0.0.0-dev-
|
|
37
|
-
"@zag-js/types": "0.0.0-dev-
|
|
34
|
+
"@zag-js/dom-utils": "0.0.0-dev-20220709173135",
|
|
35
|
+
"@zag-js/popper": "0.0.0-dev-20220709173135",
|
|
36
|
+
"@zag-js/remove-scroll": "0.0.0-dev-20220709173135",
|
|
37
|
+
"@zag-js/types": "0.0.0-dev-20220709173135",
|
|
38
38
|
"@zag-js/utils": "0.1.2",
|
|
39
39
|
"focus-trap": "6.9.4"
|
|
40
40
|
},
|