@zag-js/popover 1.43.3 → 1.45.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/popover.anatomy.d.mts +2 -2
- package/dist/popover.anatomy.d.ts +2 -2
- package/dist/popover.connect.js +1 -3
- package/dist/popover.connect.mjs +1 -3
- package/dist/popover.machine.js +2 -1
- package/dist/popover.machine.mjs +2 -1
- package/dist/popover.types.d.mts +2 -1
- package/dist/popover.types.d.ts +2 -1
- package/package.json +11 -11
|
@@ -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<"title" | "arrow" | "arrowTip" | "anchor" | "trigger" | "indicator" | "positioner" | "content" | "description" | "closeTrigger">;
|
|
4
|
+
declare const parts: Record<"title" | "arrow" | "arrowTip" | "anchor" | "trigger" | "indicator" | "positioner" | "content" | "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<"title" | "arrow" | "arrowTip" | "anchor" | "trigger" | "indicator" | "positioner" | "content" | "description" | "closeTrigger">;
|
|
4
|
+
declare const parts: Record<"title" | "arrow" | "arrowTip" | "anchor" | "trigger" | "indicator" | "positioner" | "content" | "description" | "closeTrigger", _zag_js_anatomy.AnatomyPart>;
|
|
5
5
|
|
|
6
6
|
export { anatomy, parts };
|
package/dist/popover.connect.js
CHANGED
|
@@ -58,9 +58,7 @@ function connect(service, normalize) {
|
|
|
58
58
|
portalled,
|
|
59
59
|
open,
|
|
60
60
|
setOpen(nextOpen) {
|
|
61
|
-
|
|
62
|
-
if (open2 === nextOpen) return;
|
|
63
|
-
send({ type: nextOpen ? "OPEN" : "CLOSE" });
|
|
61
|
+
send({ type: nextOpen ? "OPEN" : "CLOSE", replaces: "open" });
|
|
64
62
|
},
|
|
65
63
|
triggerValue,
|
|
66
64
|
setTriggerValue(value) {
|
package/dist/popover.connect.mjs
CHANGED
|
@@ -24,9 +24,7 @@ function connect(service, normalize) {
|
|
|
24
24
|
portalled,
|
|
25
25
|
open,
|
|
26
26
|
setOpen(nextOpen) {
|
|
27
|
-
|
|
28
|
-
if (open2 === nextOpen) return;
|
|
29
|
-
send({ type: nextOpen ? "OPEN" : "CLOSE" });
|
|
27
|
+
send({ type: nextOpen ? "OPEN" : "CLOSE", replaces: "open" });
|
|
30
28
|
},
|
|
31
29
|
triggerValue,
|
|
32
30
|
setTriggerValue(value) {
|
package/dist/popover.machine.js
CHANGED
|
@@ -295,7 +295,8 @@ var machine = (0, import_core.createMachine)({
|
|
|
295
295
|
getInitialEl: prop("initialFocusEl"),
|
|
296
296
|
enabled: prop("autoFocus")
|
|
297
297
|
});
|
|
298
|
-
element
|
|
298
|
+
if (!element) return;
|
|
299
|
+
element.focus({ preventScroll: true });
|
|
299
300
|
});
|
|
300
301
|
},
|
|
301
302
|
setFinalFocus({ event, prop, scope, context }) {
|
package/dist/popover.machine.mjs
CHANGED
|
@@ -261,7 +261,8 @@ var machine = createMachine({
|
|
|
261
261
|
getInitialEl: prop("initialFocusEl"),
|
|
262
262
|
enabled: prop("autoFocus")
|
|
263
263
|
});
|
|
264
|
-
element
|
|
264
|
+
if (!element) return;
|
|
265
|
+
element.focus({ preventScroll: true });
|
|
265
266
|
});
|
|
266
267
|
},
|
|
267
268
|
setFinalFocus({ event, prop, scope, context }) {
|
package/dist/popover.types.d.mts
CHANGED
|
@@ -65,8 +65,9 @@ interface PopoverProps extends CommonProperties, DirectionProperty, DismissableE
|
|
|
65
65
|
autoFocus?: boolean | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* The element to focus on when the popover is opened.
|
|
68
|
+
* Return `false` to skip moving focus, or `null` to use the default.
|
|
68
69
|
*/
|
|
69
|
-
initialFocusEl?: (() => HTMLElement | null) | undefined;
|
|
70
|
+
initialFocusEl?: (() => HTMLElement | null | false) | undefined;
|
|
70
71
|
/**
|
|
71
72
|
* Element to receive focus when the popover is closed.
|
|
72
73
|
*/
|
package/dist/popover.types.d.ts
CHANGED
|
@@ -65,8 +65,9 @@ interface PopoverProps extends CommonProperties, DirectionProperty, DismissableE
|
|
|
65
65
|
autoFocus?: boolean | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* The element to focus on when the popover is opened.
|
|
68
|
+
* Return `false` to skip moving focus, or `null` to use the default.
|
|
68
69
|
*/
|
|
69
|
-
initialFocusEl?: (() => HTMLElement | null) | undefined;
|
|
70
|
+
initialFocusEl?: (() => HTMLElement | null | false) | undefined;
|
|
70
71
|
/**
|
|
71
72
|
* Element to receive focus when the popover is closed.
|
|
72
73
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/popover",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.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.45.0",
|
|
33
|
+
"@zag-js/aria-hidden": "1.45.0",
|
|
34
|
+
"@zag-js/core": "1.45.0",
|
|
35
|
+
"@zag-js/dom-query": "1.45.0",
|
|
36
|
+
"@zag-js/utils": "1.45.0",
|
|
37
|
+
"@zag-js/dismissable": "1.45.0",
|
|
38
|
+
"@zag-js/popper": "1.45.0",
|
|
39
|
+
"@zag-js/remove-scroll": "1.45.0",
|
|
40
|
+
"@zag-js/types": "1.45.0",
|
|
41
|
+
"@zag-js/focus-trap": "1.45.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"clean-package": "2.2.0"
|