@ariakit/core 0.4.17 → 0.4.18
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/CHANGELOG.md +4 -0
- package/cjs/__chunks/{VZPNI7C2.cjs → 4ITB54IT.cjs} +2 -1
- package/cjs/__chunks/{LT33CJGT.cjs → HGVIF2R4.cjs} +3 -3
- package/cjs/__chunks/{CPH45Z4I.cjs → JNPL5IHP.cjs} +2 -2
- package/cjs/__chunks/{6REHCF5T.cjs → JNYCP2QO.cjs} +6 -6
- package/cjs/__chunks/{NNJG45OF.cjs → OYTZFOIJ.cjs} +2 -2
- package/cjs/collection/collection-store.cjs +3 -3
- package/cjs/combobox/combobox-store.cjs +6 -6
- package/cjs/composite/composite-store.cjs +4 -4
- package/cjs/form/form-store.cjs +3 -3
- package/cjs/menu/menu-bar-store.cjs +5 -5
- package/cjs/menu/menu-store.cjs +4 -4
- package/cjs/menubar/menubar-store.cjs +5 -5
- package/cjs/radio/radio-store.cjs +4 -4
- package/cjs/select/select-store.cjs +4 -4
- package/cjs/tab/tab-store.cjs +5 -5
- package/cjs/tag/tag-store.cjs +4 -4
- package/cjs/toolbar/toolbar-store.cjs +4 -4
- package/cjs/utils/dom.cjs +2 -2
- package/cjs/utils/events.cjs +5 -5
- package/cjs/utils/focus.cjs +23 -21
- package/cjs/utils/platform.cjs +3 -3
- package/esm/__chunks/{37JWRFYW.js → 3DNM6L6E.js} +2 -1
- package/esm/__chunks/{AMRA5WUK.js → N5XGANPW.js} +1 -1
- package/esm/__chunks/{73UNQSFO.js → RVTIKFRL.js} +1 -1
- package/esm/__chunks/{O6E4ZWCP.js → SNHYQNEZ.js} +1 -1
- package/esm/__chunks/{PSMDSJUH.js → WSDJ6ZRB.js} +1 -1
- package/esm/collection/collection-store.js +2 -2
- package/esm/combobox/combobox-store.js +4 -4
- package/esm/composite/composite-store.js +3 -3
- package/esm/form/form-store.js +2 -2
- package/esm/menu/menu-bar-store.js +4 -4
- package/esm/menu/menu-store.js +3 -3
- package/esm/menubar/menubar-store.js +4 -4
- package/esm/radio/radio-store.js +3 -3
- package/esm/select/select-store.js +3 -3
- package/esm/tab/tab-store.js +3 -3
- package/esm/tag/tag-store.js +3 -3
- package/esm/toolbar/toolbar-store.js +3 -3
- package/esm/utils/dom.js +1 -1
- package/esm/utils/events.js +2 -2
- package/esm/utils/focus.js +16 -14
- package/esm/utils/platform.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -15,11 +15,12 @@ function getWindow(node) {
|
|
|
15
15
|
return getDocument(node).defaultView || window;
|
|
16
16
|
}
|
|
17
17
|
function getActiveElement(node, activeDescendant = false) {
|
|
18
|
+
var _a;
|
|
18
19
|
const { activeElement } = getDocument(node);
|
|
19
20
|
if (!(activeElement == null ? void 0 : activeElement.nodeName)) {
|
|
20
21
|
return null;
|
|
21
22
|
}
|
|
22
|
-
if (isFrame(activeElement) && activeElement.contentDocument) {
|
|
23
|
+
if (isFrame(activeElement) && ((_a = activeElement.contentDocument) == null ? void 0 : _a.body)) {
|
|
23
24
|
return getActiveElement(
|
|
24
25
|
activeElement.contentDocument.body,
|
|
25
26
|
activeDescendant
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _4ITB54ITcjs = require('./4ITB54IT.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -27,7 +27,7 @@ function getCommonParent(items) {
|
|
|
27
27
|
}
|
|
28
28
|
parentElement = parentElement.parentElement;
|
|
29
29
|
}
|
|
30
|
-
return
|
|
30
|
+
return _4ITB54ITcjs.getDocument.call(void 0, parentElement).body;
|
|
31
31
|
}
|
|
32
32
|
function getPrivateStore(store) {
|
|
33
33
|
return store == null ? void 0 : store.__unstablePrivateStore;
|
|
@@ -54,7 +54,7 @@ function createCollectionStore(props = {}) {
|
|
|
54
54
|
);
|
|
55
55
|
const collection = _WPBYRKFQcjs.createStore.call(void 0, initialState, props.store);
|
|
56
56
|
const sortItems = (renderedItems) => {
|
|
57
|
-
const sortedItems =
|
|
57
|
+
const sortedItems = _4ITB54ITcjs.sortBasedOnDOMPosition.call(void 0, renderedItems, (i) => i.element);
|
|
58
58
|
privateStore.setState("renderedItems", sortedItems);
|
|
59
59
|
collection.setState("renderedItems", sortedItems);
|
|
60
60
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _OYTZFOIJcjs = require('./OYTZFOIJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _WPBYRKFQcjs = require('./WPBYRKFQ.cjs');
|
|
@@ -12,7 +12,7 @@ var _6BYUUR4Mcjs = require('./6BYUUR4M.cjs');
|
|
|
12
12
|
function createMenubarStore(props = {}) {
|
|
13
13
|
var _a;
|
|
14
14
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
15
|
-
const composite =
|
|
15
|
+
const composite = _OYTZFOIJcjs.createCompositeStore.call(void 0, {
|
|
16
16
|
...props,
|
|
17
17
|
orientation: _6BYUUR4Mcjs.defaultValue.call(void 0,
|
|
18
18
|
props.orientation,
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _4ITB54ITcjs = require('./4ITB54IT.cjs');
|
|
4
4
|
|
|
5
5
|
// src/utils/platform.ts
|
|
6
6
|
function isTouchDevice() {
|
|
7
|
-
return
|
|
7
|
+
return _4ITB54ITcjs.canUseDOM && !!navigator.maxTouchPoints;
|
|
8
8
|
}
|
|
9
9
|
function isApple() {
|
|
10
|
-
if (!
|
|
10
|
+
if (!_4ITB54ITcjs.canUseDOM) return false;
|
|
11
11
|
return /mac|iphone|ipad|ipod/i.test(navigator.platform);
|
|
12
12
|
}
|
|
13
13
|
function isSafari() {
|
|
14
|
-
return
|
|
14
|
+
return _4ITB54ITcjs.canUseDOM && isApple() && /apple/i.test(navigator.vendor);
|
|
15
15
|
}
|
|
16
16
|
function isFirefox() {
|
|
17
|
-
return
|
|
17
|
+
return _4ITB54ITcjs.canUseDOM && /firefox\//i.test(navigator.userAgent);
|
|
18
18
|
}
|
|
19
19
|
function isMac() {
|
|
20
|
-
return
|
|
20
|
+
return _4ITB54ITcjs.canUseDOM && navigator.platform.startsWith("Mac") && !isTouchDevice();
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
var _GDZQUFNPcjs = require('./GDZQUFNP.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _HGVIF2R4cjs = require('./HGVIF2R4.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -113,7 +113,7 @@ function verticalizeItems(items) {
|
|
|
113
113
|
function createCompositeStore(props = {}) {
|
|
114
114
|
var _a;
|
|
115
115
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
116
|
-
const collection =
|
|
116
|
+
const collection = _HGVIF2R4cjs.createCollectionStore.call(void 0, props);
|
|
117
117
|
const activeId = _6BYUUR4Mcjs.defaultValue.call(void 0,
|
|
118
118
|
props.activeId,
|
|
119
119
|
syncState == null ? void 0 : syncState.activeId,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
3
|
+
var _HGVIF2R4cjs = require('../__chunks/HGVIF2R4.cjs');
|
|
4
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
5
5
|
require('../__chunks/WPBYRKFQ.cjs');
|
|
6
6
|
require('../__chunks/6BYUUR4M.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.createCollectionStore =
|
|
9
|
+
exports.createCollectionStore = _HGVIF2R4cjs.createCollectionStore;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _JNYCP2QOcjs = require('../__chunks/JNYCP2QO.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _AOXAROPFcjs = require('../__chunks/AOXAROPF.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _OYTZFOIJcjs = require('../__chunks/OYTZFOIJ.cjs');
|
|
11
11
|
require('../__chunks/GDZQUFNP.cjs');
|
|
12
12
|
require('../__chunks/T247D7JS.cjs');
|
|
13
13
|
require('../__chunks/MJNGPYVQ.cjs');
|
|
14
|
-
require('../__chunks/
|
|
15
|
-
require('../__chunks/
|
|
14
|
+
require('../__chunks/HGVIF2R4.cjs');
|
|
15
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -28,7 +28,7 @@ var _WPBYRKFQcjs = require('../__chunks/WPBYRKFQ.cjs');
|
|
|
28
28
|
var _6BYUUR4Mcjs = require('../__chunks/6BYUUR4M.cjs');
|
|
29
29
|
|
|
30
30
|
// src/combobox/combobox-store.ts
|
|
31
|
-
var isTouchSafari =
|
|
31
|
+
var isTouchSafari = _JNYCP2QOcjs.isSafari.call(void 0, ) && _JNYCP2QOcjs.isTouchDevice.call(void 0, );
|
|
32
32
|
function createComboboxStore({
|
|
33
33
|
tag,
|
|
34
34
|
...props
|
|
@@ -43,7 +43,7 @@ function createComboboxStore({
|
|
|
43
43
|
props.defaultActiveId,
|
|
44
44
|
null
|
|
45
45
|
);
|
|
46
|
-
const composite =
|
|
46
|
+
const composite = _OYTZFOIJcjs.createCompositeStore.call(void 0, {
|
|
47
47
|
...props,
|
|
48
48
|
activeId,
|
|
49
49
|
includesBaseElement: _6BYUUR4Mcjs.defaultValue.call(void 0,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _OYTZFOIJcjs = require('../__chunks/OYTZFOIJ.cjs');
|
|
4
4
|
require('../__chunks/GDZQUFNP.cjs');
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
5
|
+
require('../__chunks/HGVIF2R4.cjs');
|
|
6
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
7
7
|
require('../__chunks/WPBYRKFQ.cjs');
|
|
8
8
|
require('../__chunks/6BYUUR4M.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.createCompositeStore =
|
|
11
|
+
exports.createCompositeStore = _OYTZFOIJcjs.createCompositeStore;
|
package/cjs/form/form-store.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
3
|
+
var _HGVIF2R4cjs = require('../__chunks/HGVIF2R4.cjs');
|
|
4
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -111,7 +111,7 @@ function createFormStore(props = {}) {
|
|
|
111
111
|
var _a;
|
|
112
112
|
_WPBYRKFQcjs.throwOnConflictingProps.call(void 0, props, props.store);
|
|
113
113
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
114
|
-
const collection =
|
|
114
|
+
const collection = _HGVIF2R4cjs.createCollectionStore.call(void 0, props);
|
|
115
115
|
const values = _6BYUUR4Mcjs.defaultValue.call(void 0,
|
|
116
116
|
props.values,
|
|
117
117
|
syncState == null ? void 0 : syncState.values,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
3
|
+
var _JNPL5IHPcjs = require('../__chunks/JNPL5IHP.cjs');
|
|
4
|
+
require('../__chunks/OYTZFOIJ.cjs');
|
|
5
5
|
require('../__chunks/GDZQUFNP.cjs');
|
|
6
|
-
require('../__chunks/
|
|
7
|
-
require('../__chunks/
|
|
6
|
+
require('../__chunks/HGVIF2R4.cjs');
|
|
7
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
8
8
|
require('../__chunks/WPBYRKFQ.cjs');
|
|
9
9
|
require('../__chunks/6BYUUR4M.cjs');
|
|
10
10
|
|
|
11
11
|
// src/menu/menu-bar-store.ts
|
|
12
12
|
function createMenuBarStore(props = {}) {
|
|
13
|
-
return
|
|
13
|
+
return _JNPL5IHPcjs.createMenubarStore.call(void 0, props);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
|
package/cjs/menu/menu-store.cjs
CHANGED
|
@@ -4,12 +4,12 @@ var _UROTDZFKcjs = require('../__chunks/UROTDZFK.cjs');
|
|
|
4
4
|
require('../__chunks/AOXAROPF.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _OYTZFOIJcjs = require('../__chunks/OYTZFOIJ.cjs');
|
|
8
8
|
require('../__chunks/GDZQUFNP.cjs');
|
|
9
9
|
require('../__chunks/T247D7JS.cjs');
|
|
10
10
|
require('../__chunks/MJNGPYVQ.cjs');
|
|
11
|
-
require('../__chunks/
|
|
12
|
-
require('../__chunks/
|
|
11
|
+
require('../__chunks/HGVIF2R4.cjs');
|
|
12
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
@@ -45,7 +45,7 @@ function createMenuStore({
|
|
|
45
45
|
);
|
|
46
46
|
_WPBYRKFQcjs.throwOnConflictingProps.call(void 0, props, store);
|
|
47
47
|
const syncState = store.getState();
|
|
48
|
-
const composite =
|
|
48
|
+
const composite = _OYTZFOIJcjs.createCompositeStore.call(void 0, {
|
|
49
49
|
...props,
|
|
50
50
|
store,
|
|
51
51
|
orientation: _6BYUUR4Mcjs.defaultValue.call(void 0,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
3
|
+
var _JNPL5IHPcjs = require('../__chunks/JNPL5IHP.cjs');
|
|
4
|
+
require('../__chunks/OYTZFOIJ.cjs');
|
|
5
5
|
require('../__chunks/GDZQUFNP.cjs');
|
|
6
|
-
require('../__chunks/
|
|
7
|
-
require('../__chunks/
|
|
6
|
+
require('../__chunks/HGVIF2R4.cjs');
|
|
7
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
8
8
|
require('../__chunks/WPBYRKFQ.cjs');
|
|
9
9
|
require('../__chunks/6BYUUR4M.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.createMenubarStore =
|
|
12
|
+
exports.createMenubarStore = _JNPL5IHPcjs.createMenubarStore;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _OYTZFOIJcjs = require('../__chunks/OYTZFOIJ.cjs');
|
|
4
4
|
require('../__chunks/GDZQUFNP.cjs');
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
5
|
+
require('../__chunks/HGVIF2R4.cjs');
|
|
6
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _WPBYRKFQcjs = require('../__chunks/WPBYRKFQ.cjs');
|
|
@@ -17,7 +17,7 @@ function createRadioStore({
|
|
|
17
17
|
} = {}) {
|
|
18
18
|
var _a;
|
|
19
19
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
20
|
-
const composite =
|
|
20
|
+
const composite = _OYTZFOIJcjs.createCompositeStore.call(void 0, {
|
|
21
21
|
...props,
|
|
22
22
|
focusLoop: _6BYUUR4Mcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
|
|
23
23
|
});
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
var _AOXAROPFcjs = require('../__chunks/AOXAROPF.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _OYTZFOIJcjs = require('../__chunks/OYTZFOIJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _GDZQUFNPcjs = require('../__chunks/GDZQUFNP.cjs');
|
|
10
10
|
require('../__chunks/T247D7JS.cjs');
|
|
11
11
|
require('../__chunks/MJNGPYVQ.cjs');
|
|
12
|
-
require('../__chunks/
|
|
13
|
-
require('../__chunks/
|
|
12
|
+
require('../__chunks/HGVIF2R4.cjs');
|
|
13
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -45,7 +45,7 @@ function createSelectStore({
|
|
|
45
45
|
);
|
|
46
46
|
_WPBYRKFQcjs.throwOnConflictingProps.call(void 0, props, store);
|
|
47
47
|
const syncState = store.getState();
|
|
48
|
-
const composite =
|
|
48
|
+
const composite = _OYTZFOIJcjs.createCompositeStore.call(void 0, {
|
|
49
49
|
...props,
|
|
50
50
|
store,
|
|
51
51
|
virtualFocus: _6BYUUR4Mcjs.defaultValue.call(void 0,
|
package/cjs/tab/tab-store.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _OYTZFOIJcjs = require('../__chunks/OYTZFOIJ.cjs');
|
|
4
4
|
require('../__chunks/GDZQUFNP.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('../__chunks/
|
|
7
|
+
var _HGVIF2R4cjs = require('../__chunks/HGVIF2R4.cjs');
|
|
8
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -43,7 +43,7 @@ function createTabStore({
|
|
|
43
43
|
_WPBYRKFQcjs.omit.call(void 0, combobox, independentKeys)
|
|
44
44
|
);
|
|
45
45
|
const syncState = store == null ? void 0 : store.getState();
|
|
46
|
-
const composite =
|
|
46
|
+
const composite = _OYTZFOIJcjs.createCompositeStore.call(void 0, {
|
|
47
47
|
...props,
|
|
48
48
|
store,
|
|
49
49
|
// We need to explicitly set the default value of `includesBaseElement` to
|
|
@@ -62,7 +62,7 @@ function createTabStore({
|
|
|
62
62
|
),
|
|
63
63
|
focusLoop: _6BYUUR4Mcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
|
|
64
64
|
});
|
|
65
|
-
const panels =
|
|
65
|
+
const panels = _HGVIF2R4cjs.createCollectionStore.call(void 0, );
|
|
66
66
|
const initialState = {
|
|
67
67
|
...composite.getState(),
|
|
68
68
|
selectedId: _6BYUUR4Mcjs.defaultValue.call(void 0,
|
package/cjs/tag/tag-store.cjs
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
var _SHOLYDNPcjs = require('../__chunks/SHOLYDNP.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _OYTZFOIJcjs = require('../__chunks/OYTZFOIJ.cjs');
|
|
7
7
|
require('../__chunks/GDZQUFNP.cjs');
|
|
8
|
-
require('../__chunks/
|
|
9
|
-
require('../__chunks/
|
|
8
|
+
require('../__chunks/HGVIF2R4.cjs');
|
|
9
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -21,7 +21,7 @@ var _6BYUUR4Mcjs = require('../__chunks/6BYUUR4M.cjs');
|
|
|
21
21
|
function createTagStore(props = {}) {
|
|
22
22
|
var _a;
|
|
23
23
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
24
|
-
const composite =
|
|
24
|
+
const composite = _OYTZFOIJcjs.createCompositeStore.call(void 0, props);
|
|
25
25
|
const initialState = {
|
|
26
26
|
...composite.getState(),
|
|
27
27
|
inputElement: _6BYUUR4Mcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.inputElement, null),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _OYTZFOIJcjs = require('../__chunks/OYTZFOIJ.cjs');
|
|
4
4
|
require('../__chunks/GDZQUFNP.cjs');
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
5
|
+
require('../__chunks/HGVIF2R4.cjs');
|
|
6
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
7
7
|
require('../__chunks/WPBYRKFQ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ var _6BYUUR4Mcjs = require('../__chunks/6BYUUR4M.cjs');
|
|
|
13
13
|
function createToolbarStore(props = {}) {
|
|
14
14
|
var _a;
|
|
15
15
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
16
|
-
return
|
|
16
|
+
return _OYTZFOIJcjs.createCompositeStore.call(void 0, {
|
|
17
17
|
...props,
|
|
18
18
|
orientation: _6BYUUR4Mcjs.defaultValue.call(void 0,
|
|
19
19
|
props.orientation,
|
package/cjs/utils/dom.cjs
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _4ITB54ITcjs = require('../__chunks/4ITB54IT.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -39,4 +39,4 @@ var _VZPNI7C2cjs = require('../__chunks/VZPNI7C2.cjs');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
exports.canUseDOM =
|
|
42
|
+
exports.canUseDOM = _4ITB54ITcjs.canUseDOM; exports.contains = _4ITB54ITcjs.contains; exports.getActiveElement = _4ITB54ITcjs.getActiveElement; exports.getDocument = _4ITB54ITcjs.getDocument; exports.getPopupItemRole = _4ITB54ITcjs.getPopupItemRole; exports.getPopupRole = _4ITB54ITcjs.getPopupRole; exports.getScrollingElement = _4ITB54ITcjs.getScrollingElement; exports.getTextboxSelection = _4ITB54ITcjs.getTextboxSelection; exports.getTextboxValue = _4ITB54ITcjs.getTextboxValue; exports.getWindow = _4ITB54ITcjs.getWindow; exports.isButton = _4ITB54ITcjs.isButton; exports.isFrame = _4ITB54ITcjs.isFrame; exports.isPartiallyHidden = _4ITB54ITcjs.isPartiallyHidden; exports.isTextField = _4ITB54ITcjs.isTextField; exports.isTextbox = _4ITB54ITcjs.isTextbox; exports.isVisible = _4ITB54ITcjs.isVisible; exports.scrollIntoViewIfNeeded = _4ITB54ITcjs.scrollIntoViewIfNeeded; exports.setSelectionRange = _4ITB54ITcjs.setSelectionRange; exports.sortBasedOnDOMPosition = _4ITB54ITcjs.sortBasedOnDOMPosition;
|
package/cjs/utils/events.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _JNYCP2QOcjs = require('../__chunks/JNYCP2QO.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _4ITB54ITcjs = require('../__chunks/4ITB54IT.cjs');
|
|
7
7
|
|
|
8
8
|
// src/utils/events.ts
|
|
9
9
|
function isPortalEvent(event) {
|
|
10
10
|
return Boolean(
|
|
11
|
-
event.currentTarget && !
|
|
11
|
+
event.currentTarget && !_4ITB54ITcjs.contains.call(void 0, event.currentTarget, event.target)
|
|
12
12
|
);
|
|
13
13
|
}
|
|
14
14
|
function isSelfTarget(event) {
|
|
@@ -17,7 +17,7 @@ function isSelfTarget(event) {
|
|
|
17
17
|
function isOpeningInNewTab(event) {
|
|
18
18
|
const element = event.currentTarget;
|
|
19
19
|
if (!element) return false;
|
|
20
|
-
const isAppleDevice =
|
|
20
|
+
const isAppleDevice = _JNYCP2QOcjs.isApple.call(void 0, );
|
|
21
21
|
if (isAppleDevice && !event.metaKey) return false;
|
|
22
22
|
if (!isAppleDevice && !event.ctrlKey) return false;
|
|
23
23
|
const tagName = element.tagName.toLowerCase();
|
|
@@ -65,7 +65,7 @@ function fireClickEvent(element, eventInit) {
|
|
|
65
65
|
function isFocusEventOutside(event, container) {
|
|
66
66
|
const containerElement = container || event.currentTarget;
|
|
67
67
|
const relatedTarget = event.relatedTarget;
|
|
68
|
-
return !relatedTarget || !
|
|
68
|
+
return !relatedTarget || !_4ITB54ITcjs.contains.call(void 0, containerElement, relatedTarget);
|
|
69
69
|
}
|
|
70
70
|
function getInputType(event) {
|
|
71
71
|
const nativeEvent = "nativeEvent" in event ? event.nativeEvent : event;
|
package/cjs/utils/focus.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _4ITB54ITcjs = require('../__chunks/4ITB54IT.cjs');
|
|
7
7
|
|
|
8
8
|
// src/utils/focus.ts
|
|
9
9
|
var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
|
|
@@ -13,7 +13,7 @@ function hasNegativeTabIndex(element) {
|
|
|
13
13
|
}
|
|
14
14
|
function isFocusable(element) {
|
|
15
15
|
if (!element.matches(selector)) return false;
|
|
16
|
-
if (!
|
|
16
|
+
if (!_4ITB54ITcjs.isVisible.call(void 0, element)) return false;
|
|
17
17
|
if (element.closest("[inert]")) return false;
|
|
18
18
|
return true;
|
|
19
19
|
}
|
|
@@ -27,7 +27,7 @@ function isTabbable(element) {
|
|
|
27
27
|
const radioGroup = element.form.elements.namedItem(element.name);
|
|
28
28
|
if (!radioGroup) return true;
|
|
29
29
|
if (!("length" in radioGroup)) return true;
|
|
30
|
-
const activeElement =
|
|
30
|
+
const activeElement = _4ITB54ITcjs.getActiveElement.call(void 0, element);
|
|
31
31
|
if (!activeElement) return true;
|
|
32
32
|
if (activeElement === element) return true;
|
|
33
33
|
if (!("form" in activeElement)) return true;
|
|
@@ -44,10 +44,11 @@ function getAllFocusableIn(container, includeContainer) {
|
|
|
44
44
|
}
|
|
45
45
|
const focusableElements = elements.filter(isFocusable);
|
|
46
46
|
focusableElements.forEach((element, i) => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
var _a;
|
|
48
|
+
if (!_4ITB54ITcjs.isFrame.call(void 0, element)) return;
|
|
49
|
+
const frameBody = (_a = element.contentDocument) == null ? void 0 : _a.body;
|
|
50
|
+
if (!frameBody) return;
|
|
51
|
+
focusableElements.splice(i, 1, ...getAllFocusableIn(frameBody));
|
|
51
52
|
});
|
|
52
53
|
return focusableElements;
|
|
53
54
|
}
|
|
@@ -70,15 +71,16 @@ function getAllTabbableIn(container, includeContainer, fallbackToFocusable) {
|
|
|
70
71
|
tabbableElements.unshift(container);
|
|
71
72
|
}
|
|
72
73
|
tabbableElements.forEach((element, i) => {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
var _a;
|
|
75
|
+
if (!_4ITB54ITcjs.isFrame.call(void 0, element)) return;
|
|
76
|
+
const frameBody = (_a = element.contentDocument) == null ? void 0 : _a.body;
|
|
77
|
+
if (!frameBody) return;
|
|
78
|
+
const allFrameTabbable = getAllTabbableIn(
|
|
79
|
+
frameBody,
|
|
80
|
+
false,
|
|
81
|
+
fallbackToFocusable
|
|
82
|
+
);
|
|
83
|
+
tabbableElements.splice(i, 1, ...allFrameTabbable);
|
|
82
84
|
});
|
|
83
85
|
if (!tabbableElements.length && fallbackToFocusable) {
|
|
84
86
|
return elements;
|
|
@@ -111,7 +113,7 @@ function getLastTabbable(fallbackToFocusable) {
|
|
|
111
113
|
return getLastTabbableIn(document.body, false, fallbackToFocusable);
|
|
112
114
|
}
|
|
113
115
|
function getNextTabbableIn(container, includeContainer, fallbackToFirst, fallbackToFocusable) {
|
|
114
|
-
const activeElement =
|
|
116
|
+
const activeElement = _4ITB54ITcjs.getActiveElement.call(void 0, container);
|
|
115
117
|
const allFocusable = getAllFocusableIn(container, includeContainer);
|
|
116
118
|
const activeIndex = allFocusable.indexOf(activeElement);
|
|
117
119
|
const nextFocusableElements = allFocusable.slice(activeIndex + 1);
|
|
@@ -126,7 +128,7 @@ function getNextTabbable(fallbackToFirst, fallbackToFocusable) {
|
|
|
126
128
|
);
|
|
127
129
|
}
|
|
128
130
|
function getPreviousTabbableIn(container, includeContainer, fallbackToLast, fallbackToFocusable) {
|
|
129
|
-
const activeElement =
|
|
131
|
+
const activeElement = _4ITB54ITcjs.getActiveElement.call(void 0, container);
|
|
130
132
|
const allFocusable = getAllFocusableIn(container, includeContainer).reverse();
|
|
131
133
|
const activeIndex = allFocusable.indexOf(activeElement);
|
|
132
134
|
const previousFocusableElements = allFocusable.slice(activeIndex + 1);
|
|
@@ -147,7 +149,7 @@ function getClosestFocusable(element) {
|
|
|
147
149
|
return element || null;
|
|
148
150
|
}
|
|
149
151
|
function hasFocus(element) {
|
|
150
|
-
const activeElement =
|
|
152
|
+
const activeElement = _4ITB54ITcjs.getActiveElement.call(void 0, element);
|
|
151
153
|
if (!activeElement) return false;
|
|
152
154
|
if (activeElement === element) return true;
|
|
153
155
|
const activeDescendant = activeElement.getAttribute("aria-activedescendant");
|
|
@@ -155,9 +157,9 @@ function hasFocus(element) {
|
|
|
155
157
|
return activeDescendant === element.id;
|
|
156
158
|
}
|
|
157
159
|
function hasFocusWithin(element) {
|
|
158
|
-
const activeElement =
|
|
160
|
+
const activeElement = _4ITB54ITcjs.getActiveElement.call(void 0, element);
|
|
159
161
|
if (!activeElement) return false;
|
|
160
|
-
if (
|
|
162
|
+
if (_4ITB54ITcjs.contains.call(void 0, element, activeElement)) return true;
|
|
161
163
|
const activeDescendant = activeElement.getAttribute("aria-activedescendant");
|
|
162
164
|
if (!activeDescendant) return false;
|
|
163
165
|
if (!("id" in element)) return false;
|
package/cjs/utils/platform.cjs
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('../__chunks/
|
|
7
|
+
var _JNYCP2QOcjs = require('../__chunks/JNYCP2QO.cjs');
|
|
8
|
+
require('../__chunks/4ITB54IT.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
exports.isApple =
|
|
15
|
+
exports.isApple = _JNYCP2QOcjs.isApple; exports.isFirefox = _JNYCP2QOcjs.isFirefox; exports.isMac = _JNYCP2QOcjs.isMac; exports.isSafari = _JNYCP2QOcjs.isSafari; exports.isTouchDevice = _JNYCP2QOcjs.isTouchDevice;
|
|
@@ -17,11 +17,12 @@ function getWindow(node) {
|
|
|
17
17
|
return getDocument(node).defaultView || window;
|
|
18
18
|
}
|
|
19
19
|
function getActiveElement(node, activeDescendant = false) {
|
|
20
|
+
var _a;
|
|
20
21
|
const { activeElement } = getDocument(node);
|
|
21
22
|
if (!(activeElement == null ? void 0 : activeElement.nodeName)) {
|
|
22
23
|
return null;
|
|
23
24
|
}
|
|
24
|
-
if (isFrame(activeElement) && activeElement.contentDocument) {
|
|
25
|
+
if (isFrame(activeElement) && ((_a = activeElement.contentDocument) == null ? void 0 : _a.body)) {
|
|
25
26
|
return getActiveElement(
|
|
26
27
|
activeElement.contentDocument.body,
|
|
27
28
|
activeDescendant
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCollectionStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/N5XGANPW.js";
|
|
5
|
+
import "../__chunks/3DNM6L6E.js";
|
|
6
6
|
import "../__chunks/SXKM4CGU.js";
|
|
7
7
|
import "../__chunks/XMCVU3LR.js";
|
|
8
8
|
export {
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
isSafari,
|
|
4
4
|
isTouchDevice
|
|
5
|
-
} from "../__chunks/
|
|
5
|
+
} from "../__chunks/SNHYQNEZ.js";
|
|
6
6
|
import {
|
|
7
7
|
createPopoverStore
|
|
8
8
|
} from "../__chunks/BFGNM53A.js";
|
|
9
9
|
import {
|
|
10
10
|
createCompositeStore
|
|
11
|
-
} from "../__chunks/
|
|
11
|
+
} from "../__chunks/RVTIKFRL.js";
|
|
12
12
|
import "../__chunks/7PRQYBBV.js";
|
|
13
13
|
import "../__chunks/KMAUV3TY.js";
|
|
14
14
|
import "../__chunks/75BJEVSH.js";
|
|
15
|
-
import "../__chunks/
|
|
16
|
-
import "../__chunks/
|
|
15
|
+
import "../__chunks/N5XGANPW.js";
|
|
16
|
+
import "../__chunks/3DNM6L6E.js";
|
|
17
17
|
import {
|
|
18
18
|
batch,
|
|
19
19
|
createStore,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/RVTIKFRL.js";
|
|
5
5
|
import "../__chunks/7PRQYBBV.js";
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/N5XGANPW.js";
|
|
7
|
+
import "../__chunks/3DNM6L6E.js";
|
|
8
8
|
import "../__chunks/SXKM4CGU.js";
|
|
9
9
|
import "../__chunks/XMCVU3LR.js";
|
|
10
10
|
export {
|
package/esm/form/form-store.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createMenubarStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/WSDJ6ZRB.js";
|
|
5
|
+
import "../__chunks/RVTIKFRL.js";
|
|
6
6
|
import "../__chunks/7PRQYBBV.js";
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
7
|
+
import "../__chunks/N5XGANPW.js";
|
|
8
|
+
import "../__chunks/3DNM6L6E.js";
|
|
9
9
|
import "../__chunks/SXKM4CGU.js";
|
|
10
10
|
import "../__chunks/XMCVU3LR.js";
|
|
11
11
|
|
package/esm/menu/menu-store.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
import "../__chunks/BFGNM53A.js";
|
|
6
6
|
import {
|
|
7
7
|
createCompositeStore
|
|
8
|
-
} from "../__chunks/
|
|
8
|
+
} from "../__chunks/RVTIKFRL.js";
|
|
9
9
|
import "../__chunks/7PRQYBBV.js";
|
|
10
10
|
import "../__chunks/KMAUV3TY.js";
|
|
11
11
|
import "../__chunks/75BJEVSH.js";
|
|
12
|
-
import "../__chunks/
|
|
13
|
-
import "../__chunks/
|
|
12
|
+
import "../__chunks/N5XGANPW.js";
|
|
13
|
+
import "../__chunks/3DNM6L6E.js";
|
|
14
14
|
import {
|
|
15
15
|
createStore,
|
|
16
16
|
mergeStore,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createMenubarStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/WSDJ6ZRB.js";
|
|
5
|
+
import "../__chunks/RVTIKFRL.js";
|
|
6
6
|
import "../__chunks/7PRQYBBV.js";
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
7
|
+
import "../__chunks/N5XGANPW.js";
|
|
8
|
+
import "../__chunks/3DNM6L6E.js";
|
|
9
9
|
import "../__chunks/SXKM4CGU.js";
|
|
10
10
|
import "../__chunks/XMCVU3LR.js";
|
|
11
11
|
export {
|
package/esm/radio/radio-store.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/RVTIKFRL.js";
|
|
5
5
|
import "../__chunks/7PRQYBBV.js";
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/N5XGANPW.js";
|
|
7
|
+
import "../__chunks/3DNM6L6E.js";
|
|
8
8
|
import {
|
|
9
9
|
createStore
|
|
10
10
|
} from "../__chunks/SXKM4CGU.js";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
} from "../__chunks/BFGNM53A.js";
|
|
5
5
|
import {
|
|
6
6
|
createCompositeStore
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/RVTIKFRL.js";
|
|
8
8
|
import {
|
|
9
9
|
toArray
|
|
10
10
|
} from "../__chunks/7PRQYBBV.js";
|
|
11
11
|
import "../__chunks/KMAUV3TY.js";
|
|
12
12
|
import "../__chunks/75BJEVSH.js";
|
|
13
|
-
import "../__chunks/
|
|
14
|
-
import "../__chunks/
|
|
13
|
+
import "../__chunks/N5XGANPW.js";
|
|
14
|
+
import "../__chunks/3DNM6L6E.js";
|
|
15
15
|
import {
|
|
16
16
|
batch,
|
|
17
17
|
createStore,
|
package/esm/tab/tab-store.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/RVTIKFRL.js";
|
|
5
5
|
import "../__chunks/7PRQYBBV.js";
|
|
6
6
|
import {
|
|
7
7
|
createCollectionStore
|
|
8
|
-
} from "../__chunks/
|
|
9
|
-
import "../__chunks/
|
|
8
|
+
} from "../__chunks/N5XGANPW.js";
|
|
9
|
+
import "../__chunks/3DNM6L6E.js";
|
|
10
10
|
import {
|
|
11
11
|
batch,
|
|
12
12
|
createStore,
|
package/esm/tag/tag-store.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "../__chunks/7LM4Q2XB.js";
|
|
5
5
|
import {
|
|
6
6
|
createCompositeStore
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/RVTIKFRL.js";
|
|
8
8
|
import "../__chunks/7PRQYBBV.js";
|
|
9
|
-
import "../__chunks/
|
|
10
|
-
import "../__chunks/
|
|
9
|
+
import "../__chunks/N5XGANPW.js";
|
|
10
|
+
import "../__chunks/3DNM6L6E.js";
|
|
11
11
|
import {
|
|
12
12
|
createStore,
|
|
13
13
|
setup,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/RVTIKFRL.js";
|
|
5
5
|
import "../__chunks/7PRQYBBV.js";
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/N5XGANPW.js";
|
|
7
|
+
import "../__chunks/3DNM6L6E.js";
|
|
8
8
|
import "../__chunks/SXKM4CGU.js";
|
|
9
9
|
import {
|
|
10
10
|
defaultValue
|
package/esm/utils/dom.js
CHANGED
package/esm/utils/events.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
isApple
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/SNHYQNEZ.js";
|
|
5
5
|
import {
|
|
6
6
|
contains
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/3DNM6L6E.js";
|
|
8
8
|
|
|
9
9
|
// src/utils/events.ts
|
|
10
10
|
function isPortalEvent(event) {
|
package/esm/utils/focus.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getActiveElement,
|
|
5
5
|
isFrame,
|
|
6
6
|
isVisible
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/3DNM6L6E.js";
|
|
8
8
|
|
|
9
9
|
// src/utils/focus.ts
|
|
10
10
|
var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
|
|
@@ -45,10 +45,11 @@ function getAllFocusableIn(container, includeContainer) {
|
|
|
45
45
|
}
|
|
46
46
|
const focusableElements = elements.filter(isFocusable);
|
|
47
47
|
focusableElements.forEach((element, i) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
var _a;
|
|
49
|
+
if (!isFrame(element)) return;
|
|
50
|
+
const frameBody = (_a = element.contentDocument) == null ? void 0 : _a.body;
|
|
51
|
+
if (!frameBody) return;
|
|
52
|
+
focusableElements.splice(i, 1, ...getAllFocusableIn(frameBody));
|
|
52
53
|
});
|
|
53
54
|
return focusableElements;
|
|
54
55
|
}
|
|
@@ -71,15 +72,16 @@ function getAllTabbableIn(container, includeContainer, fallbackToFocusable) {
|
|
|
71
72
|
tabbableElements.unshift(container);
|
|
72
73
|
}
|
|
73
74
|
tabbableElements.forEach((element, i) => {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
var _a;
|
|
76
|
+
if (!isFrame(element)) return;
|
|
77
|
+
const frameBody = (_a = element.contentDocument) == null ? void 0 : _a.body;
|
|
78
|
+
if (!frameBody) return;
|
|
79
|
+
const allFrameTabbable = getAllTabbableIn(
|
|
80
|
+
frameBody,
|
|
81
|
+
false,
|
|
82
|
+
fallbackToFocusable
|
|
83
|
+
);
|
|
84
|
+
tabbableElements.splice(i, 1, ...allFrameTabbable);
|
|
83
85
|
});
|
|
84
86
|
if (!tabbableElements.length && fallbackToFocusable) {
|
|
85
87
|
return elements;
|
package/esm/utils/platform.js
CHANGED