@zag-js/popover 0.0.0-dev-20230202104422 → 0.0.0-dev-20230203093446
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.
|
@@ -85,7 +85,7 @@ function machine(userContext) {
|
|
|
85
85
|
return createMachine(
|
|
86
86
|
{
|
|
87
87
|
id: "popover",
|
|
88
|
-
initial: "
|
|
88
|
+
initial: ctx.defaultOpen ? "open" : "closed",
|
|
89
89
|
context: {
|
|
90
90
|
closeOnInteractOutside: true,
|
|
91
91
|
closeOnEsc: true,
|
|
@@ -107,15 +107,8 @@ function machine(userContext) {
|
|
|
107
107
|
computed: {
|
|
108
108
|
currentPortalled: (ctx2) => !!ctx2.modal || !!ctx2.portalled
|
|
109
109
|
},
|
|
110
|
+
entry: ["checkRenderedElements"],
|
|
110
111
|
states: {
|
|
111
|
-
unknown: {
|
|
112
|
-
on: {
|
|
113
|
-
SETUP: {
|
|
114
|
-
target: ctx.defaultOpen ? "open" : "closed",
|
|
115
|
-
actions: "checkRenderedElements"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
112
|
closed: {
|
|
120
113
|
entry: "invokeOnClose",
|
|
121
114
|
on: {
|
package/dist/index.js
CHANGED
|
@@ -355,7 +355,7 @@ function machine(userContext) {
|
|
|
355
355
|
return (0, import_core.createMachine)(
|
|
356
356
|
{
|
|
357
357
|
id: "popover",
|
|
358
|
-
initial: "
|
|
358
|
+
initial: ctx.defaultOpen ? "open" : "closed",
|
|
359
359
|
context: {
|
|
360
360
|
closeOnInteractOutside: true,
|
|
361
361
|
closeOnEsc: true,
|
|
@@ -377,15 +377,8 @@ function machine(userContext) {
|
|
|
377
377
|
computed: {
|
|
378
378
|
currentPortalled: (ctx2) => !!ctx2.modal || !!ctx2.portalled
|
|
379
379
|
},
|
|
380
|
+
entry: ["checkRenderedElements"],
|
|
380
381
|
states: {
|
|
381
|
-
unknown: {
|
|
382
|
-
on: {
|
|
383
|
-
SETUP: {
|
|
384
|
-
target: ctx.defaultOpen ? "open" : "closed",
|
|
385
|
-
actions: "checkRenderedElements"
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
382
|
closed: {
|
|
390
383
|
entry: "invokeOnClose",
|
|
391
384
|
on: {
|
package/dist/index.mjs
CHANGED
package/dist/popover.machine.js
CHANGED
|
@@ -248,7 +248,7 @@ function machine(userContext) {
|
|
|
248
248
|
return (0, import_core.createMachine)(
|
|
249
249
|
{
|
|
250
250
|
id: "popover",
|
|
251
|
-
initial: "
|
|
251
|
+
initial: ctx.defaultOpen ? "open" : "closed",
|
|
252
252
|
context: {
|
|
253
253
|
closeOnInteractOutside: true,
|
|
254
254
|
closeOnEsc: true,
|
|
@@ -270,15 +270,8 @@ function machine(userContext) {
|
|
|
270
270
|
computed: {
|
|
271
271
|
currentPortalled: (ctx2) => !!ctx2.modal || !!ctx2.portalled
|
|
272
272
|
},
|
|
273
|
+
entry: ["checkRenderedElements"],
|
|
273
274
|
states: {
|
|
274
|
-
unknown: {
|
|
275
|
-
on: {
|
|
276
|
-
SETUP: {
|
|
277
|
-
target: ctx.defaultOpen ? "open" : "closed",
|
|
278
|
-
actions: "checkRenderedElements"
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
275
|
closed: {
|
|
283
276
|
entry: "invokeOnClose",
|
|
284
277
|
on: {
|
package/dist/popover.machine.mjs
CHANGED
package/dist/popover.types.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ type PrivateContext = Context<{
|
|
|
76
76
|
}>;
|
|
77
77
|
type MachineContext = PublicContext & ComputedContext & PrivateContext;
|
|
78
78
|
type MachineState = {
|
|
79
|
-
value: "
|
|
79
|
+
value: "open" | "closed";
|
|
80
80
|
};
|
|
81
81
|
type State = StateMachine.State<MachineContext, MachineState>;
|
|
82
82
|
type Send = StateMachine.Send<StateMachine.AnyEventObject>;
|
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-20230203093446",
|
|
4
4
|
"description": "Core logic for the popover widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"focus-trap": "7.2.0",
|
|
30
|
-
"@zag-js/anatomy": "0.
|
|
31
|
-
"@zag-js/aria-hidden": "0.
|
|
32
|
-
"@zag-js/core": "0.0.0-dev-
|
|
33
|
-
"@zag-js/dismissable": "0.
|
|
34
|
-
"@zag-js/popper": "0.
|
|
35
|
-
"@zag-js/remove-scroll": "0.
|
|
36
|
-
"@zag-js/types": "0.
|
|
30
|
+
"@zag-js/anatomy": "0.1.4",
|
|
31
|
+
"@zag-js/aria-hidden": "0.2.2",
|
|
32
|
+
"@zag-js/core": "0.0.0-dev-20230203093446",
|
|
33
|
+
"@zag-js/dismissable": "0.2.2",
|
|
34
|
+
"@zag-js/popper": "0.2.3",
|
|
35
|
+
"@zag-js/remove-scroll": "0.2.2",
|
|
36
|
+
"@zag-js/types": "0.3.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"clean-package": "2.2.0",
|
|
40
|
-
"@zag-js/dom-utils": "0.
|
|
41
|
-
"@zag-js/utils": "0.
|
|
40
|
+
"@zag-js/dom-utils": "0.2.4",
|
|
41
|
+
"@zag-js/utils": "0.3.3"
|
|
42
42
|
},
|
|
43
43
|
"clean-package": "../../../clean-package.config.json",
|
|
44
44
|
"main": "dist/index.js",
|