@zag-js/popover 1.45.0 → 1.46.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
2
2
|
|
|
3
|
-
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"
|
|
4
|
-
declare const parts: Record<"
|
|
3
|
+
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"content" | "title" | "anchor" | "arrow" | "arrowTip" | "trigger" | "indicator" | "positioner" | "description" | "closeTrigger">;
|
|
4
|
+
declare const parts: Record<"content" | "title" | "anchor" | "arrow" | "arrowTip" | "trigger" | "indicator" | "positioner" | "description" | "closeTrigger", _zag_js_anatomy.AnatomyPart>;
|
|
5
5
|
|
|
6
6
|
export { anatomy, parts };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
2
2
|
|
|
3
|
-
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"
|
|
4
|
-
declare const parts: Record<"
|
|
3
|
+
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"content" | "title" | "anchor" | "arrow" | "arrowTip" | "trigger" | "indicator" | "positioner" | "description" | "closeTrigger">;
|
|
4
|
+
declare const parts: Record<"content" | "title" | "anchor" | "arrow" | "arrowTip" | "trigger" | "indicator" | "positioner" | "description" | "closeTrigger", _zag_js_anatomy.AnatomyPart>;
|
|
5
5
|
|
|
6
6
|
export { anatomy, parts };
|
package/dist/popover.machine.js
CHANGED
|
@@ -125,6 +125,7 @@ var machine = (0, import_core.createMachine)({
|
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
127
|
open: {
|
|
128
|
+
entry: ["checkRenderedElements"],
|
|
128
129
|
effects: [
|
|
129
130
|
"trapFocus",
|
|
130
131
|
"preventScroll",
|
|
@@ -190,6 +191,7 @@ var machine = (0, import_core.createMachine)({
|
|
|
190
191
|
pointerBlocking: prop("modal"),
|
|
191
192
|
exclude: [dom.getTriggerEl(scope), ...dom.getTriggerEls(scope)].filter(Boolean),
|
|
192
193
|
defer: true,
|
|
194
|
+
layerStyleTargets: [() => dom.getPositionerEl(scope)],
|
|
193
195
|
onEscapeKeyDown(event) {
|
|
194
196
|
prop("onEscapeKeyDown")?.(event);
|
|
195
197
|
if (prop("closeOnEscape")) return;
|
|
@@ -281,7 +283,7 @@ var machine = (0, import_core.createMachine)({
|
|
|
281
283
|
},
|
|
282
284
|
checkRenderedElements({ context, scope }) {
|
|
283
285
|
(0, import_dom_query.raf)(() => {
|
|
284
|
-
|
|
286
|
+
context.set("renderedElements", {
|
|
285
287
|
title: !!dom.getTitleEl(scope),
|
|
286
288
|
description: !!dom.getDescriptionEl(scope)
|
|
287
289
|
});
|
package/dist/popover.machine.mjs
CHANGED
|
@@ -91,6 +91,7 @@ var machine = createMachine({
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
open: {
|
|
94
|
+
entry: ["checkRenderedElements"],
|
|
94
95
|
effects: [
|
|
95
96
|
"trapFocus",
|
|
96
97
|
"preventScroll",
|
|
@@ -156,6 +157,7 @@ var machine = createMachine({
|
|
|
156
157
|
pointerBlocking: prop("modal"),
|
|
157
158
|
exclude: [dom.getTriggerEl(scope), ...dom.getTriggerEls(scope)].filter(Boolean),
|
|
158
159
|
defer: true,
|
|
160
|
+
layerStyleTargets: [() => dom.getPositionerEl(scope)],
|
|
159
161
|
onEscapeKeyDown(event) {
|
|
160
162
|
prop("onEscapeKeyDown")?.(event);
|
|
161
163
|
if (prop("closeOnEscape")) return;
|
|
@@ -247,7 +249,7 @@ var machine = createMachine({
|
|
|
247
249
|
},
|
|
248
250
|
checkRenderedElements({ context, scope }) {
|
|
249
251
|
raf(() => {
|
|
250
|
-
|
|
252
|
+
context.set("renderedElements", {
|
|
251
253
|
title: !!dom.getTitleEl(scope),
|
|
252
254
|
description: !!dom.getDescriptionEl(scope)
|
|
253
255
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/popover",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.46.0",
|
|
4
4
|
"description": "Core logic for the popover widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zag-js/anatomy": "1.
|
|
33
|
-
"@zag-js/aria-hidden": "1.
|
|
34
|
-
"@zag-js/core": "1.
|
|
35
|
-
"@zag-js/dom-query": "1.
|
|
36
|
-
"@zag-js/utils": "1.
|
|
37
|
-
"@zag-js/dismissable": "1.
|
|
38
|
-
"@zag-js/popper": "1.
|
|
39
|
-
"@zag-js/remove-scroll": "1.
|
|
40
|
-
"@zag-js/types": "1.
|
|
41
|
-
"@zag-js/focus-trap": "1.
|
|
32
|
+
"@zag-js/anatomy": "1.46.0",
|
|
33
|
+
"@zag-js/aria-hidden": "1.46.0",
|
|
34
|
+
"@zag-js/core": "1.46.0",
|
|
35
|
+
"@zag-js/dom-query": "1.46.0",
|
|
36
|
+
"@zag-js/utils": "1.46.0",
|
|
37
|
+
"@zag-js/dismissable": "1.46.0",
|
|
38
|
+
"@zag-js/popper": "1.46.0",
|
|
39
|
+
"@zag-js/remove-scroll": "1.46.0",
|
|
40
|
+
"@zag-js/types": "1.46.0",
|
|
41
|
+
"@zag-js/focus-trap": "1.46.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"clean-package": "2.2.0"
|