@zag-js/tooltip 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/tooltip.dom.d.ts +3 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -125,7 +125,7 @@ function getParent(el) {
|
|
|
125
125
|
return el;
|
|
126
126
|
return el.assignedSlot || el.parentElement || doc.documentElement;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function defineDomHelpers(domUtils) {
|
|
129
129
|
const roots = {
|
|
130
130
|
getRootNode: (ctx) => {
|
|
131
131
|
var _a, _b;
|
|
@@ -135,7 +135,8 @@ function withRootHelpers(domUtils) {
|
|
|
135
135
|
getWin: (ctx) => {
|
|
136
136
|
var _a;
|
|
137
137
|
return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
|
|
138
|
-
}
|
|
138
|
+
},
|
|
139
|
+
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
|
|
139
140
|
};
|
|
140
141
|
return __spreadValues2(__spreadValues2({}, roots), domUtils);
|
|
141
142
|
}
|
|
@@ -259,7 +260,7 @@ function getScrollParents(el, list = []) {
|
|
|
259
260
|
var import_popper = require("@zag-js/popper");
|
|
260
261
|
|
|
261
262
|
// src/tooltip.dom.ts
|
|
262
|
-
var dom =
|
|
263
|
+
var dom = defineDomHelpers({
|
|
263
264
|
getTriggerId: (ctx) => {
|
|
264
265
|
var _a, _b;
|
|
265
266
|
return (_b = (_a = ctx.ids) == null ? void 0 : _a.trigger) != null ? _b : `tooltip:${ctx.id}:trigger`;
|
package/dist/index.mjs
CHANGED
|
@@ -101,7 +101,7 @@ function getParent(el) {
|
|
|
101
101
|
return el;
|
|
102
102
|
return el.assignedSlot || el.parentElement || doc.documentElement;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function defineDomHelpers(domUtils) {
|
|
105
105
|
const roots = {
|
|
106
106
|
getRootNode: (ctx) => {
|
|
107
107
|
var _a, _b;
|
|
@@ -111,7 +111,8 @@ function withRootHelpers(domUtils) {
|
|
|
111
111
|
getWin: (ctx) => {
|
|
112
112
|
var _a;
|
|
113
113
|
return (_a = roots.getDoc(ctx).defaultView) != null ? _a : window;
|
|
114
|
-
}
|
|
114
|
+
},
|
|
115
|
+
getActiveElement: (ctx) => roots.getDoc(ctx).activeElement
|
|
115
116
|
};
|
|
116
117
|
return __spreadValues2(__spreadValues2({}, roots), domUtils);
|
|
117
118
|
}
|
|
@@ -235,7 +236,7 @@ function getScrollParents(el, list = []) {
|
|
|
235
236
|
import { getPlacementStyles } from "@zag-js/popper";
|
|
236
237
|
|
|
237
238
|
// src/tooltip.dom.ts
|
|
238
|
-
var dom =
|
|
239
|
+
var dom = defineDomHelpers({
|
|
239
240
|
getTriggerId: (ctx) => {
|
|
240
241
|
var _a, _b;
|
|
241
242
|
return (_b = (_a = ctx.ids) == null ? void 0 : _a.trigger) != null ? _b : `tooltip:${ctx.id}:trigger`;
|
package/dist/tooltip.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
|
getTriggerId: (ctx: Ctx) => string;
|
|
14
17
|
getContentId: (ctx: Ctx) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/tooltip",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20220709173135",
|
|
4
4
|
"description": "Core logic for the tooltip widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@zag-js/core": "0.1.7",
|
|
33
|
-
"@zag-js/dom-utils": "0.0.0-dev-
|
|
34
|
-
"@zag-js/popper": "0.0.0-dev-
|
|
35
|
-
"@zag-js/types": "0.0.0-dev-
|
|
33
|
+
"@zag-js/dom-utils": "0.0.0-dev-20220709173135",
|
|
34
|
+
"@zag-js/popper": "0.0.0-dev-20220709173135",
|
|
35
|
+
"@zag-js/types": "0.0.0-dev-20220709173135"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build:fast": "zag build",
|