@zag-js/popover 0.6.0 → 0.7.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/{chunk-QLF6NDJW.mjs → chunk-HRZXZNMW.mjs} +2 -2
- package/dist/{chunk-D27LEJFX.mjs → chunk-HXXI3VDD.mjs} +1 -1
- package/dist/{chunk-4IGGT6KB.mjs → chunk-UA4OMIJI.mjs} +2 -2
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/dist/popover.connect.d.ts +1 -1
- package/dist/popover.connect.js +3 -3
- package/dist/popover.connect.mjs +2 -2
- package/dist/popover.dom.js +2 -2
- package/dist/popover.dom.mjs +1 -1
- package/dist/popover.machine.js +2 -2
- package/dist/popover.machine.mjs +2 -2
- package/dist/popover.types.d.ts +2 -0
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-KTOPDXGV.mjs";
|
|
4
4
|
import {
|
|
5
5
|
dom
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UA4OMIJI.mjs";
|
|
7
7
|
|
|
8
8
|
// src/popover.connect.ts
|
|
9
9
|
import { dataAttr } from "@zag-js/dom-query";
|
|
@@ -40,7 +40,7 @@ function connect(state, send, normalize) {
|
|
|
40
40
|
/**
|
|
41
41
|
* Function to reposition the popover
|
|
42
42
|
*/
|
|
43
|
-
setPositioning(options) {
|
|
43
|
+
setPositioning(options = {}) {
|
|
44
44
|
send({ type: "SET_POSITIONING", options });
|
|
45
45
|
},
|
|
46
46
|
arrowProps: normalize.element({
|
|
@@ -7,8 +7,8 @@ var dom = createScope({
|
|
|
7
7
|
getAnchorId: (ctx) => ctx.ids?.anchor ?? `popover:${ctx.id}:anchor`,
|
|
8
8
|
getTriggerId: (ctx) => ctx.ids?.trigger ?? `popover:${ctx.id}:trigger`,
|
|
9
9
|
getContentId: (ctx) => ctx.ids?.content ?? `popover:${ctx.id}:content`,
|
|
10
|
-
getPositionerId: (ctx) => `popover:${ctx.id}:popper`,
|
|
11
|
-
getArrowId: (ctx) => `popover:${ctx.id}:arrow`,
|
|
10
|
+
getPositionerId: (ctx) => ctx.ids?.positioner ?? `popover:${ctx.id}:popper`,
|
|
11
|
+
getArrowId: (ctx) => ctx.ids?.arrow ?? `popover:${ctx.id}:arrow`,
|
|
12
12
|
getTitleId: (ctx) => ctx.ids?.title ?? `popover:${ctx.id}:title`,
|
|
13
13
|
getDescriptionId: (ctx) => ctx.ids?.description ?? `popover:${ctx.id}:desc`,
|
|
14
14
|
getCloseTriggerId: (ctx) => ctx.ids?.closeTrigger ?? `popover:${ctx.id}:close`,
|
package/dist/index.js
CHANGED
|
@@ -54,8 +54,8 @@ var dom = (0, import_dom_query.createScope)({
|
|
|
54
54
|
getAnchorId: (ctx) => ctx.ids?.anchor ?? `popover:${ctx.id}:anchor`,
|
|
55
55
|
getTriggerId: (ctx) => ctx.ids?.trigger ?? `popover:${ctx.id}:trigger`,
|
|
56
56
|
getContentId: (ctx) => ctx.ids?.content ?? `popover:${ctx.id}:content`,
|
|
57
|
-
getPositionerId: (ctx) => `popover:${ctx.id}:popper`,
|
|
58
|
-
getArrowId: (ctx) => `popover:${ctx.id}:arrow`,
|
|
57
|
+
getPositionerId: (ctx) => ctx.ids?.positioner ?? `popover:${ctx.id}:popper`,
|
|
58
|
+
getArrowId: (ctx) => ctx.ids?.arrow ?? `popover:${ctx.id}:arrow`,
|
|
59
59
|
getTitleId: (ctx) => ctx.ids?.title ?? `popover:${ctx.id}:title`,
|
|
60
60
|
getDescriptionId: (ctx) => ctx.ids?.description ?? `popover:${ctx.id}:desc`,
|
|
61
61
|
getCloseTriggerId: (ctx) => ctx.ids?.closeTrigger ?? `popover:${ctx.id}:close`,
|
|
@@ -114,7 +114,7 @@ function connect(state, send, normalize) {
|
|
|
114
114
|
/**
|
|
115
115
|
* Function to reposition the popover
|
|
116
116
|
*/
|
|
117
|
-
setPositioning(options) {
|
|
117
|
+
setPositioning(options = {}) {
|
|
118
118
|
send({ type: "SET_POSITIONING", options });
|
|
119
119
|
},
|
|
120
120
|
arrowProps: normalize.element({
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
connect
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HRZXZNMW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
anatomy
|
|
6
6
|
} from "./chunk-KTOPDXGV.mjs";
|
|
7
7
|
import {
|
|
8
8
|
machine
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-HXXI3VDD.mjs";
|
|
10
|
+
import "./chunk-UA4OMIJI.mjs";
|
|
11
11
|
export {
|
|
12
12
|
anatomy,
|
|
13
13
|
connect,
|
|
@@ -24,7 +24,7 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
|
|
|
24
24
|
/**
|
|
25
25
|
* Function to reposition the popover
|
|
26
26
|
*/
|
|
27
|
-
setPositioning(options
|
|
27
|
+
setPositioning(options?: Partial<PositioningOptions>): void;
|
|
28
28
|
arrowProps: T["element"];
|
|
29
29
|
arrowTipProps: T["element"];
|
|
30
30
|
anchorProps: T["element"];
|
package/dist/popover.connect.js
CHANGED
|
@@ -50,8 +50,8 @@ var dom = (0, import_dom_query.createScope)({
|
|
|
50
50
|
getAnchorId: (ctx) => ctx.ids?.anchor ?? `popover:${ctx.id}:anchor`,
|
|
51
51
|
getTriggerId: (ctx) => ctx.ids?.trigger ?? `popover:${ctx.id}:trigger`,
|
|
52
52
|
getContentId: (ctx) => ctx.ids?.content ?? `popover:${ctx.id}:content`,
|
|
53
|
-
getPositionerId: (ctx) => `popover:${ctx.id}:popper`,
|
|
54
|
-
getArrowId: (ctx) => `popover:${ctx.id}:arrow`,
|
|
53
|
+
getPositionerId: (ctx) => ctx.ids?.positioner ?? `popover:${ctx.id}:popper`,
|
|
54
|
+
getArrowId: (ctx) => ctx.ids?.arrow ?? `popover:${ctx.id}:arrow`,
|
|
55
55
|
getTitleId: (ctx) => ctx.ids?.title ?? `popover:${ctx.id}:title`,
|
|
56
56
|
getDescriptionId: (ctx) => ctx.ids?.description ?? `popover:${ctx.id}:desc`,
|
|
57
57
|
getCloseTriggerId: (ctx) => ctx.ids?.closeTrigger ?? `popover:${ctx.id}:close`,
|
|
@@ -110,7 +110,7 @@ function connect(state, send, normalize) {
|
|
|
110
110
|
/**
|
|
111
111
|
* Function to reposition the popover
|
|
112
112
|
*/
|
|
113
|
-
setPositioning(options) {
|
|
113
|
+
setPositioning(options = {}) {
|
|
114
114
|
send({ type: "SET_POSITIONING", options });
|
|
115
115
|
},
|
|
116
116
|
arrowProps: normalize.element({
|
package/dist/popover.connect.mjs
CHANGED
package/dist/popover.dom.js
CHANGED
|
@@ -31,8 +31,8 @@ var dom = (0, import_dom_query.createScope)({
|
|
|
31
31
|
getAnchorId: (ctx) => ctx.ids?.anchor ?? `popover:${ctx.id}:anchor`,
|
|
32
32
|
getTriggerId: (ctx) => ctx.ids?.trigger ?? `popover:${ctx.id}:trigger`,
|
|
33
33
|
getContentId: (ctx) => ctx.ids?.content ?? `popover:${ctx.id}:content`,
|
|
34
|
-
getPositionerId: (ctx) => `popover:${ctx.id}:popper`,
|
|
35
|
-
getArrowId: (ctx) => `popover:${ctx.id}:arrow`,
|
|
34
|
+
getPositionerId: (ctx) => ctx.ids?.positioner ?? `popover:${ctx.id}:popper`,
|
|
35
|
+
getArrowId: (ctx) => ctx.ids?.arrow ?? `popover:${ctx.id}:arrow`,
|
|
36
36
|
getTitleId: (ctx) => ctx.ids?.title ?? `popover:${ctx.id}:title`,
|
|
37
37
|
getDescriptionId: (ctx) => ctx.ids?.description ?? `popover:${ctx.id}:desc`,
|
|
38
38
|
getCloseTriggerId: (ctx) => ctx.ids?.closeTrigger ?? `popover:${ctx.id}:close`,
|
package/dist/popover.dom.mjs
CHANGED
package/dist/popover.machine.js
CHANGED
|
@@ -42,8 +42,8 @@ var dom = (0, import_dom_query.createScope)({
|
|
|
42
42
|
getAnchorId: (ctx) => ctx.ids?.anchor ?? `popover:${ctx.id}:anchor`,
|
|
43
43
|
getTriggerId: (ctx) => ctx.ids?.trigger ?? `popover:${ctx.id}:trigger`,
|
|
44
44
|
getContentId: (ctx) => ctx.ids?.content ?? `popover:${ctx.id}:content`,
|
|
45
|
-
getPositionerId: (ctx) => `popover:${ctx.id}:popper`,
|
|
46
|
-
getArrowId: (ctx) => `popover:${ctx.id}:arrow`,
|
|
45
|
+
getPositionerId: (ctx) => ctx.ids?.positioner ?? `popover:${ctx.id}:popper`,
|
|
46
|
+
getArrowId: (ctx) => ctx.ids?.arrow ?? `popover:${ctx.id}:arrow`,
|
|
47
47
|
getTitleId: (ctx) => ctx.ids?.title ?? `popover:${ctx.id}:title`,
|
|
48
48
|
getDescriptionId: (ctx) => ctx.ids?.description ?? `popover:${ctx.id}:desc`,
|
|
49
49
|
getCloseTriggerId: (ctx) => ctx.ids?.closeTrigger ?? `popover:${ctx.id}:close`,
|
package/dist/popover.machine.mjs
CHANGED
package/dist/popover.types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/popover",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Core logic for the popover widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"focus-trap": "7.4.0",
|
|
30
30
|
"@zag-js/anatomy": "0.1.4",
|
|
31
31
|
"@zag-js/aria-hidden": "0.2.2",
|
|
32
|
-
"@zag-js/core": "0.
|
|
32
|
+
"@zag-js/core": "0.7.0",
|
|
33
33
|
"@zag-js/dom-query": "0.1.4",
|
|
34
34
|
"@zag-js/utils": "0.3.4",
|
|
35
35
|
"@zag-js/dismissable": "0.6.0",
|