@destyler/popover 0.0.7-beta.9 → 0.2.0-beta.5
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.
|
@@ -346,20 +346,18 @@ function machine(userContext) {
|
|
|
346
346
|
setInitialFocus(ctx$1) {
|
|
347
347
|
if (ctx$1.modal) return;
|
|
348
348
|
raf(() => {
|
|
349
|
-
|
|
349
|
+
getInitialFocus({
|
|
350
350
|
root: dom.getContentEl(ctx$1),
|
|
351
351
|
getInitialEl: ctx$1.initialFocusEl,
|
|
352
352
|
enabled: ctx$1.autoFocus
|
|
353
|
-
});
|
|
354
|
-
element?.focus({ preventScroll: true });
|
|
353
|
+
})?.focus({ preventScroll: true });
|
|
355
354
|
});
|
|
356
355
|
},
|
|
357
356
|
setFinalFocus(ctx$1, evt) {
|
|
358
357
|
const restoreFocus = evt.restoreFocus ?? evt.previousEvent?.restoreFocus;
|
|
359
358
|
if (restoreFocus != null && !restoreFocus) return;
|
|
360
359
|
raf(() => {
|
|
361
|
-
|
|
362
|
-
element?.focus({ preventScroll: true });
|
|
360
|
+
dom.getTriggerEl(ctx$1)?.focus({ preventScroll: true });
|
|
363
361
|
});
|
|
364
362
|
},
|
|
365
363
|
invokeOnOpen(ctx$1) {
|
package/package.json
CHANGED
|
@@ -1,31 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@destyler/popover",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.2.0-beta.5",
|
|
5
5
|
"description": "displays rich content in a portal, triggered by a button.",
|
|
6
6
|
"author": "Elone Hoo <elonehoo@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/destyler/destyler",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/destyler/destyler.git",
|
|
12
|
+
"directory": "packages/components/popover"
|
|
13
|
+
},
|
|
8
14
|
"exports": {
|
|
9
|
-
".": "./dist/index.
|
|
15
|
+
".": "./dist/index.mjs"
|
|
10
16
|
},
|
|
11
|
-
"main": "dist/index.
|
|
12
|
-
"module": "dist/index.
|
|
13
|
-
"types": "dist/index.d.
|
|
17
|
+
"main": "dist/index.mjs",
|
|
18
|
+
"module": "dist/index.mjs",
|
|
19
|
+
"types": "dist/index.d.mts",
|
|
14
20
|
"files": [
|
|
15
21
|
"*.d.ts",
|
|
16
22
|
"dist"
|
|
17
23
|
],
|
|
18
24
|
"dependencies": {
|
|
19
|
-
"@destyler/anatomy": "0.0
|
|
20
|
-
"@destyler/aria-hidden": "0.0
|
|
21
|
-
"@destyler/dismissable": "0.0
|
|
22
|
-
"@destyler/dom": "0.0
|
|
23
|
-
"@destyler/focus-trap": "0.0
|
|
24
|
-
"@destyler/
|
|
25
|
-
"@destyler/
|
|
26
|
-
"@destyler/
|
|
27
|
-
"@destyler/utils": "0.0
|
|
28
|
-
"@destyler/xstate": "0.0
|
|
25
|
+
"@destyler/anatomy": "0.2.0-beta.5",
|
|
26
|
+
"@destyler/aria-hidden": "0.2.0-beta.5",
|
|
27
|
+
"@destyler/dismissable": "0.2.0-beta.5",
|
|
28
|
+
"@destyler/dom": "0.2.0-beta.5",
|
|
29
|
+
"@destyler/focus-trap": "0.2.0-beta.5",
|
|
30
|
+
"@destyler/popper": "0.2.0-beta.5",
|
|
31
|
+
"@destyler/types": "0.2.0-beta.5",
|
|
32
|
+
"@destyler/remove-scroll": "0.2.0-beta.5",
|
|
33
|
+
"@destyler/utils": "0.2.0-beta.5",
|
|
34
|
+
"@destyler/xstate": "0.2.0-beta.5"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
29
38
|
},
|
|
30
39
|
"scripts": {
|
|
31
40
|
"clear": "rimraf ./dist",
|
|
File without changes
|