@zag-js/popover 0.0.0-dev-20230522212155 → 0.0.0-dev-20230523135722

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.
@@ -203,14 +203,14 @@ function machine(userContext) {
203
203
  },
204
204
  setInitialFocus(ctx2) {
205
205
  raf(() => {
206
- dom.getInitialFocusEl(ctx2)?.focus();
206
+ dom.getInitialFocusEl(ctx2)?.focus({ preventScroll: true });
207
207
  });
208
208
  },
209
209
  restoreFocusIfNeeded(ctx2, evt) {
210
210
  if (!evt.restoreFocus)
211
211
  return;
212
212
  raf(() => {
213
- dom.getTriggerEl(ctx2)?.focus();
213
+ dom.getTriggerEl(ctx2)?.focus({ preventScroll: true });
214
214
  });
215
215
  },
216
216
  invokeOnOpen(ctx2) {
package/dist/index.js CHANGED
@@ -383,14 +383,14 @@ function machine(userContext) {
383
383
  },
384
384
  setInitialFocus(ctx2) {
385
385
  (0, import_dom_query3.raf)(() => {
386
- dom.getInitialFocusEl(ctx2)?.focus();
386
+ dom.getInitialFocusEl(ctx2)?.focus({ preventScroll: true });
387
387
  });
388
388
  },
389
389
  restoreFocusIfNeeded(ctx2, evt) {
390
390
  if (!evt.restoreFocus)
391
391
  return;
392
392
  (0, import_dom_query3.raf)(() => {
393
- dom.getTriggerEl(ctx2)?.focus();
393
+ dom.getTriggerEl(ctx2)?.focus({ preventScroll: true });
394
394
  });
395
395
  },
396
396
  invokeOnOpen(ctx2) {
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-KTOPDXGV.mjs";
7
7
  import {
8
8
  machine
9
- } from "./chunk-PLTEBSYF.mjs";
9
+ } from "./chunk-EDQUDEDS.mjs";
10
10
  import "./chunk-UA4OMIJI.mjs";
11
11
  export {
12
12
  anatomy,
@@ -261,14 +261,14 @@ function machine(userContext) {
261
261
  },
262
262
  setInitialFocus(ctx2) {
263
263
  (0, import_dom_query2.raf)(() => {
264
- dom.getInitialFocusEl(ctx2)?.focus();
264
+ dom.getInitialFocusEl(ctx2)?.focus({ preventScroll: true });
265
265
  });
266
266
  },
267
267
  restoreFocusIfNeeded(ctx2, evt) {
268
268
  if (!evt.restoreFocus)
269
269
  return;
270
270
  (0, import_dom_query2.raf)(() => {
271
- dom.getTriggerEl(ctx2)?.focus();
271
+ dom.getTriggerEl(ctx2)?.focus({ preventScroll: true });
272
272
  });
273
273
  },
274
274
  invokeOnOpen(ctx2) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  machine
3
- } from "./chunk-PLTEBSYF.mjs";
3
+ } from "./chunk-EDQUDEDS.mjs";
4
4
  import "./chunk-UA4OMIJI.mjs";
5
5
  export {
6
6
  machine
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/popover",
3
- "version": "0.0.0-dev-20230522212155",
3
+ "version": "0.0.0-dev-20230523135722",
4
4
  "description": "Core logic for the popover widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -27,16 +27,16 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "focus-trap": "7.4.1",
30
- "@zag-js/anatomy": "0.0.0-dev-20230522212155",
31
- "@zag-js/aria-hidden": "0.0.0-dev-20230522212155",
32
- "@zag-js/core": "0.0.0-dev-20230522212155",
33
- "@zag-js/dom-query": "0.0.0-dev-20230522212155",
34
- "@zag-js/utils": "0.0.0-dev-20230522212155",
35
- "@zag-js/dismissable": "0.0.0-dev-20230522212155",
36
- "@zag-js/tabbable": "0.0.0-dev-20230522212155",
37
- "@zag-js/popper": "0.0.0-dev-20230522212155",
38
- "@zag-js/remove-scroll": "0.0.0-dev-20230522212155",
39
- "@zag-js/types": "0.0.0-dev-20230522212155"
30
+ "@zag-js/anatomy": "0.0.0-dev-20230523135722",
31
+ "@zag-js/aria-hidden": "0.0.0-dev-20230523135722",
32
+ "@zag-js/core": "0.0.0-dev-20230523135722",
33
+ "@zag-js/dom-query": "0.0.0-dev-20230523135722",
34
+ "@zag-js/utils": "0.0.0-dev-20230523135722",
35
+ "@zag-js/dismissable": "0.0.0-dev-20230523135722",
36
+ "@zag-js/tabbable": "0.0.0-dev-20230523135722",
37
+ "@zag-js/popper": "0.0.0-dev-20230523135722",
38
+ "@zag-js/remove-scroll": "0.0.0-dev-20230523135722",
39
+ "@zag-js/types": "0.0.0-dev-20230523135722"
40
40
  },
41
41
  "devDependencies": {
42
42
  "clean-package": "2.2.0"