@ariakit/core 0.4.16 → 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 +8 -0
- package/cjs/__chunks/{VZPNI7C2.cjs → 4ITB54IT.cjs} +2 -1
- package/cjs/__chunks/{MLCPLY2P.cjs → 6BYUUR4M.cjs} +2 -6
- package/cjs/__chunks/AOXAROPF.cjs +59 -0
- package/cjs/__chunks/{E5AYFGW2.cjs → HGVIF2R4.cjs} +20 -23
- package/cjs/__chunks/JNPL5IHP.cjs +36 -0
- package/cjs/__chunks/{6REHCF5T.cjs → JNYCP2QO.cjs} +6 -6
- package/cjs/__chunks/{L5GSFUJU.cjs → MJNGPYVQ.cjs} +19 -22
- package/cjs/__chunks/{7WVAUIME.cjs → OYTZFOIJ.cjs} +28 -28
- package/cjs/__chunks/{VR2FVDSU.cjs → T247D7JS.cjs} +2 -2
- package/cjs/__chunks/UROTDZFK.cjs +41 -0
- package/cjs/__chunks/{EKSEHA55.cjs → WPBYRKFQ.cjs} +13 -17
- package/cjs/checkbox/checkbox-store.cjs +8 -11
- package/cjs/collection/collection-store.cjs +5 -6
- package/cjs/combobox/combobox-store.cjs +57 -57
- package/cjs/composite/composite-overflow-store.cjs +6 -7
- package/cjs/composite/composite-store.cjs +6 -7
- package/cjs/dialog/dialog-store.cjs +5 -6
- package/cjs/disclosure/disclosure-store.cjs +4 -5
- package/cjs/form/form-store.cjs +34 -35
- package/cjs/hovercard/hovercard-store.cjs +7 -8
- package/cjs/index.cjs +1 -3
- package/cjs/menu/menu-bar-store.cjs +7 -8
- package/cjs/menu/menu-store.cjs +49 -50
- package/cjs/menubar/menubar-store.cjs +7 -8
- package/cjs/popover/popover-store.cjs +6 -7
- package/cjs/radio/radio-store.cjs +23 -23
- package/cjs/select/select-store.cjs +49 -49
- package/cjs/tab/tab-store.cjs +47 -51
- package/cjs/tag/tag-store.cjs +21 -22
- package/cjs/toolbar/toolbar-store.cjs +10 -13
- package/cjs/tooltip/tooltip-store.cjs +20 -19
- package/cjs/utils/array.cjs +0 -1
- package/cjs/utils/dom.cjs +2 -3
- package/cjs/utils/events.cjs +7 -11
- package/cjs/utils/focus.cjs +24 -25
- package/cjs/utils/misc.cjs +2 -3
- package/cjs/utils/platform.cjs +3 -4
- package/cjs/utils/store.cjs +3 -4
- package/cjs/utils/undo.cjs +0 -1
- package/esm/__chunks/{37JWRFYW.js → 3DNM6L6E.js} +2 -1
- package/esm/__chunks/{43IPP2F4.js → 75BJEVSH.js} +5 -8
- package/esm/__chunks/{MD3RIO2T.js → BFGNM53A.js} +15 -19
- package/esm/__chunks/{RZDDWCDV.js → KMAUV3TY.js} +1 -1
- package/esm/__chunks/{K2KIGYQU.js → N5XGANPW.js} +7 -10
- package/esm/__chunks/{C34RJTDU.js → RVTIKFRL.js} +13 -13
- package/esm/__chunks/{O6E4ZWCP.js → SNHYQNEZ.js} +1 -1
- package/esm/__chunks/{EWA2WL6G.js → SXKM4CGU.js} +2 -6
- package/esm/__chunks/{X2ASWIQW.js → TIQDSBWP.js} +13 -13
- package/esm/__chunks/{76UM5ZLT.js → WSDJ6ZRB.js} +13 -11
- package/esm/__chunks/{PBFD2E7P.js → XMCVU3LR.js} +1 -4
- package/esm/checkbox/checkbox-store.js +5 -8
- package/esm/collection/collection-store.js +4 -5
- package/esm/combobox/combobox-store.js +28 -28
- package/esm/composite/composite-overflow-store.js +5 -6
- package/esm/composite/composite-store.js +5 -6
- package/esm/dialog/dialog-store.js +4 -5
- package/esm/disclosure/disclosure-store.js +3 -4
- package/esm/form/form-store.js +12 -13
- package/esm/hovercard/hovercard-store.js +6 -7
- package/esm/index.js +0 -1
- package/esm/menu/menu-bar-store.js +6 -7
- package/esm/menu/menu-store.js +33 -34
- package/esm/menubar/menubar-store.js +6 -7
- package/esm/popover/popover-store.js +5 -6
- package/esm/radio/radio-store.js +20 -20
- package/esm/select/select-store.js +27 -27
- package/esm/tab/tab-store.js +21 -25
- package/esm/tag/tag-store.js +12 -13
- package/esm/toolbar/toolbar-store.js +8 -11
- package/esm/tooltip/tooltip-store.js +16 -15
- package/esm/utils/array.js +0 -1
- package/esm/utils/dom.js +1 -2
- package/esm/utils/events.js +4 -8
- package/esm/utils/focus.js +17 -18
- package/esm/utils/misc.js +1 -2
- package/esm/utils/platform.js +2 -3
- package/esm/utils/store.js +2 -3
- package/esm/utils/undo.js +0 -1
- package/package.json +1 -1
- package/cjs/__chunks/34NK2NPD.cjs +0 -41
- package/cjs/__chunks/7EQBAZ46.cjs +0 -37
- package/cjs/__chunks/OGYYHXPP.cjs +0 -63
- package/cjs/__chunks/XVG7OFIP.cjs +0 -34
- package/esm/__chunks/3YLGPPWQ.js +0 -38
|
@@ -1,31 +1,28 @@
|
|
|
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/
|
|
8
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/N5XGANPW.js";
|
|
7
|
+
import "../__chunks/3DNM6L6E.js";
|
|
8
|
+
import "../__chunks/SXKM4CGU.js";
|
|
9
9
|
import {
|
|
10
10
|
defaultValue
|
|
11
|
-
} from "../__chunks/
|
|
12
|
-
import {
|
|
13
|
-
__spreadProps,
|
|
14
|
-
__spreadValues
|
|
15
|
-
} from "../__chunks/3YLGPPWQ.js";
|
|
11
|
+
} from "../__chunks/XMCVU3LR.js";
|
|
16
12
|
|
|
17
13
|
// src/toolbar/toolbar-store.ts
|
|
18
14
|
function createToolbarStore(props = {}) {
|
|
19
15
|
var _a;
|
|
20
16
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
21
|
-
return createCompositeStore(
|
|
17
|
+
return createCompositeStore({
|
|
18
|
+
...props,
|
|
22
19
|
orientation: defaultValue(
|
|
23
20
|
props.orientation,
|
|
24
21
|
syncState == null ? void 0 : syncState.orientation,
|
|
25
22
|
"horizontal"
|
|
26
23
|
),
|
|
27
24
|
focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
|
|
28
|
-
})
|
|
25
|
+
});
|
|
29
26
|
}
|
|
30
27
|
export {
|
|
31
28
|
createToolbarStore
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createHovercardStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/TIQDSBWP.js";
|
|
5
|
+
import "../__chunks/BFGNM53A.js";
|
|
6
|
+
import "../__chunks/KMAUV3TY.js";
|
|
7
|
+
import "../__chunks/75BJEVSH.js";
|
|
8
8
|
import {
|
|
9
9
|
createStore
|
|
10
|
-
} from "../__chunks/
|
|
10
|
+
} from "../__chunks/SXKM4CGU.js";
|
|
11
11
|
import {
|
|
12
12
|
defaultValue
|
|
13
|
-
} from "../__chunks/
|
|
14
|
-
import {
|
|
15
|
-
__spreadProps,
|
|
16
|
-
__spreadValues
|
|
17
|
-
} from "../__chunks/3YLGPPWQ.js";
|
|
13
|
+
} from "../__chunks/XMCVU3LR.js";
|
|
18
14
|
|
|
19
15
|
// src/tooltip/tooltip-store.ts
|
|
20
16
|
function createTooltipStore(props = {}) {
|
|
@@ -29,20 +25,25 @@ function createTooltipStore(props = {}) {
|
|
|
29
25
|
}
|
|
30
26
|
}
|
|
31
27
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
32
|
-
const hovercard = createHovercardStore(
|
|
28
|
+
const hovercard = createHovercardStore({
|
|
29
|
+
...props,
|
|
33
30
|
placement: defaultValue(
|
|
34
31
|
props.placement,
|
|
35
32
|
syncState == null ? void 0 : syncState.placement,
|
|
36
33
|
"top"
|
|
37
34
|
),
|
|
38
35
|
hideTimeout: defaultValue(props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout, 0)
|
|
39
|
-
})
|
|
40
|
-
const initialState =
|
|
36
|
+
});
|
|
37
|
+
const initialState = {
|
|
38
|
+
...hovercard.getState(),
|
|
41
39
|
type: defaultValue(props.type, syncState == null ? void 0 : syncState.type, "description"),
|
|
42
40
|
skipTimeout: defaultValue(props.skipTimeout, syncState == null ? void 0 : syncState.skipTimeout, 300)
|
|
43
|
-
}
|
|
41
|
+
};
|
|
44
42
|
const tooltip = createStore(initialState, hovercard, props.store);
|
|
45
|
-
return
|
|
43
|
+
return {
|
|
44
|
+
...hovercard,
|
|
45
|
+
...tooltip
|
|
46
|
+
};
|
|
46
47
|
}
|
|
47
48
|
export {
|
|
48
49
|
createTooltipStore
|
package/esm/utils/array.js
CHANGED
package/esm/utils/dom.js
CHANGED
package/esm/utils/events.js
CHANGED
|
@@ -1,14 +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/
|
|
8
|
-
import {
|
|
9
|
-
__spreadProps,
|
|
10
|
-
__spreadValues
|
|
11
|
-
} from "../__chunks/3YLGPPWQ.js";
|
|
7
|
+
} from "../__chunks/3DNM6L6E.js";
|
|
12
8
|
|
|
13
9
|
// src/utils/events.ts
|
|
14
10
|
function isPortalEvent(event) {
|
|
@@ -48,14 +44,14 @@ function fireEvent(element, type, eventInit) {
|
|
|
48
44
|
function fireBlurEvent(element, eventInit) {
|
|
49
45
|
const event = new FocusEvent("blur", eventInit);
|
|
50
46
|
const defaultAllowed = element.dispatchEvent(event);
|
|
51
|
-
const bubbleInit =
|
|
47
|
+
const bubbleInit = { ...eventInit, bubbles: true };
|
|
52
48
|
element.dispatchEvent(new FocusEvent("focusout", bubbleInit));
|
|
53
49
|
return defaultAllowed;
|
|
54
50
|
}
|
|
55
51
|
function fireFocusEvent(element, eventInit) {
|
|
56
52
|
const event = new FocusEvent("focus", eventInit);
|
|
57
53
|
const defaultAllowed = element.dispatchEvent(event);
|
|
58
|
-
const bubbleInit =
|
|
54
|
+
const bubbleInit = { ...eventInit, bubbles: true };
|
|
59
55
|
element.dispatchEvent(new FocusEvent("focusin", bubbleInit));
|
|
60
56
|
return defaultAllowed;
|
|
61
57
|
}
|
package/esm/utils/focus.js
CHANGED
|
@@ -4,10 +4,7 @@ import {
|
|
|
4
4
|
getActiveElement,
|
|
5
5
|
isFrame,
|
|
6
6
|
isVisible
|
|
7
|
-
} from "../__chunks/
|
|
8
|
-
import {
|
|
9
|
-
__spreadValues
|
|
10
|
-
} from "../__chunks/3YLGPPWQ.js";
|
|
7
|
+
} from "../__chunks/3DNM6L6E.js";
|
|
11
8
|
|
|
12
9
|
// src/utils/focus.ts
|
|
13
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'])";
|
|
@@ -48,10 +45,11 @@ function getAllFocusableIn(container, includeContainer) {
|
|
|
48
45
|
}
|
|
49
46
|
const focusableElements = elements.filter(isFocusable);
|
|
50
47
|
focusableElements.forEach((element, i) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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));
|
|
55
53
|
});
|
|
56
54
|
return focusableElements;
|
|
57
55
|
}
|
|
@@ -74,15 +72,16 @@ function getAllTabbableIn(container, includeContainer, fallbackToFocusable) {
|
|
|
74
72
|
tabbableElements.unshift(container);
|
|
75
73
|
}
|
|
76
74
|
tabbableElements.forEach((element, i) => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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);
|
|
86
85
|
});
|
|
87
86
|
if (!tabbableElements.length && fallbackToFocusable) {
|
|
88
87
|
return elements;
|
|
@@ -208,7 +207,7 @@ function focusIntoView(element, options) {
|
|
|
208
207
|
element.focus();
|
|
209
208
|
} else {
|
|
210
209
|
element.focus({ preventScroll: true });
|
|
211
|
-
element.scrollIntoView(
|
|
210
|
+
element.scrollIntoView({ block: "nearest", inline: "nearest", ...options });
|
|
212
211
|
}
|
|
213
212
|
}
|
|
214
213
|
export {
|
package/esm/utils/misc.js
CHANGED
package/esm/utils/platform.js
CHANGED
|
@@ -5,9 +5,8 @@ import {
|
|
|
5
5
|
isMac,
|
|
6
6
|
isSafari,
|
|
7
7
|
isTouchDevice
|
|
8
|
-
} from "../__chunks/
|
|
9
|
-
import "../__chunks/
|
|
10
|
-
import "../__chunks/3YLGPPWQ.js";
|
|
8
|
+
} from "../__chunks/SNHYQNEZ.js";
|
|
9
|
+
import "../__chunks/3DNM6L6E.js";
|
|
11
10
|
export {
|
|
12
11
|
isApple,
|
|
13
12
|
isFirefox,
|
package/esm/utils/store.js
CHANGED
|
@@ -10,9 +10,8 @@ import {
|
|
|
10
10
|
subscribe,
|
|
11
11
|
sync,
|
|
12
12
|
throwOnConflictingProps
|
|
13
|
-
} from "../__chunks/
|
|
14
|
-
import "../__chunks/
|
|
15
|
-
import "../__chunks/3YLGPPWQ.js";
|
|
13
|
+
} from "../__chunks/SXKM4CGU.js";
|
|
14
|
+
import "../__chunks/XMCVU3LR.js";
|
|
16
15
|
export {
|
|
17
16
|
batch,
|
|
18
17
|
createStore,
|
package/esm/utils/undo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _OGYYHXPPcjs = require('./OGYYHXPP.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _EKSEHA55cjs = require('./EKSEHA55.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _MLCPLY2Pcjs = require('./MLCPLY2P.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var _7EQBAZ46cjs = require('./7EQBAZ46.cjs');
|
|
14
|
-
|
|
15
|
-
// src/hovercard/hovercard-store.ts
|
|
16
|
-
function createHovercardStore(props = {}) {
|
|
17
|
-
var _a;
|
|
18
|
-
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
19
|
-
const popover = _OGYYHXPPcjs.createPopoverStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
|
|
20
|
-
placement: _MLCPLY2Pcjs.defaultValue.call(void 0,
|
|
21
|
-
props.placement,
|
|
22
|
-
syncState == null ? void 0 : syncState.placement,
|
|
23
|
-
"bottom"
|
|
24
|
-
)
|
|
25
|
-
}));
|
|
26
|
-
const timeout = _MLCPLY2Pcjs.defaultValue.call(void 0, props.timeout, syncState == null ? void 0 : syncState.timeout, 500);
|
|
27
|
-
const initialState = _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, popover.getState()), {
|
|
28
|
-
timeout,
|
|
29
|
-
showTimeout: _MLCPLY2Pcjs.defaultValue.call(void 0, props.showTimeout, syncState == null ? void 0 : syncState.showTimeout),
|
|
30
|
-
hideTimeout: _MLCPLY2Pcjs.defaultValue.call(void 0, props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout),
|
|
31
|
-
autoFocusOnShow: _MLCPLY2Pcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.autoFocusOnShow, false)
|
|
32
|
-
});
|
|
33
|
-
const hovercard = _EKSEHA55cjs.createStore.call(void 0, initialState, popover, props.store);
|
|
34
|
-
return _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, popover), hovercard), {
|
|
35
|
-
setAutoFocusOnShow: (value) => hovercard.setState("autoFocusOnShow", value)
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
exports.createHovercardStore = createHovercardStore;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
exports.__spreadValues = __spreadValues; exports.__spreadProps = __spreadProps; exports.__objRest = __objRest;
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _VR2FVDSUcjs = require('./VR2FVDSU.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _EKSEHA55cjs = require('./EKSEHA55.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _MLCPLY2Pcjs = require('./MLCPLY2P.cjs');
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var _7EQBAZ46cjs = require('./7EQBAZ46.cjs');
|
|
18
|
-
|
|
19
|
-
// src/popover/popover-store.ts
|
|
20
|
-
function createPopoverStore(_a = {}) {
|
|
21
|
-
var _b = _a, {
|
|
22
|
-
popover: otherPopover
|
|
23
|
-
} = _b, props = _7EQBAZ46cjs.__objRest.call(void 0, _b, [
|
|
24
|
-
"popover"
|
|
25
|
-
]);
|
|
26
|
-
const store = _EKSEHA55cjs.mergeStore.call(void 0,
|
|
27
|
-
props.store,
|
|
28
|
-
_EKSEHA55cjs.omit.call(void 0, otherPopover, [
|
|
29
|
-
"arrowElement",
|
|
30
|
-
"anchorElement",
|
|
31
|
-
"contentElement",
|
|
32
|
-
"popoverElement",
|
|
33
|
-
"disclosureElement"
|
|
34
|
-
])
|
|
35
|
-
);
|
|
36
|
-
_EKSEHA55cjs.throwOnConflictingProps.call(void 0, props, store);
|
|
37
|
-
const syncState = store == null ? void 0 : store.getState();
|
|
38
|
-
const dialog = _VR2FVDSUcjs.createDialogStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), { store }));
|
|
39
|
-
const placement = _MLCPLY2Pcjs.defaultValue.call(void 0,
|
|
40
|
-
props.placement,
|
|
41
|
-
syncState == null ? void 0 : syncState.placement,
|
|
42
|
-
"bottom"
|
|
43
|
-
);
|
|
44
|
-
const initialState = _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, dialog.getState()), {
|
|
45
|
-
placement,
|
|
46
|
-
currentPlacement: placement,
|
|
47
|
-
anchorElement: _MLCPLY2Pcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.anchorElement, null),
|
|
48
|
-
popoverElement: _MLCPLY2Pcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.popoverElement, null),
|
|
49
|
-
arrowElement: _MLCPLY2Pcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.arrowElement, null),
|
|
50
|
-
rendered: Symbol("rendered")
|
|
51
|
-
});
|
|
52
|
-
const popover = _EKSEHA55cjs.createStore.call(void 0, initialState, dialog, store);
|
|
53
|
-
return _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, dialog), popover), {
|
|
54
|
-
setAnchorElement: (element) => popover.setState("anchorElement", element),
|
|
55
|
-
setPopoverElement: (element) => popover.setState("popoverElement", element),
|
|
56
|
-
setArrowElement: (element) => popover.setState("arrowElement", element),
|
|
57
|
-
render: () => popover.setState("rendered", Symbol("rendered"))
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
exports.createPopoverStore = createPopoverStore;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _7WVAUIMEcjs = require('./7WVAUIME.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _EKSEHA55cjs = require('./EKSEHA55.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _MLCPLY2Pcjs = require('./MLCPLY2P.cjs');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var _7EQBAZ46cjs = require('./7EQBAZ46.cjs');
|
|
14
|
-
|
|
15
|
-
// src/menubar/menubar-store.ts
|
|
16
|
-
function createMenubarStore(props = {}) {
|
|
17
|
-
var _a;
|
|
18
|
-
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
19
|
-
const composite = _7WVAUIMEcjs.createCompositeStore.call(void 0, _7EQBAZ46cjs.__spreadProps.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, props), {
|
|
20
|
-
orientation: _MLCPLY2Pcjs.defaultValue.call(void 0,
|
|
21
|
-
props.orientation,
|
|
22
|
-
syncState == null ? void 0 : syncState.orientation,
|
|
23
|
-
"horizontal"
|
|
24
|
-
),
|
|
25
|
-
focusLoop: _MLCPLY2Pcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
|
|
26
|
-
}));
|
|
27
|
-
const initialState = _7EQBAZ46cjs.__spreadValues.call(void 0, {}, composite.getState());
|
|
28
|
-
const menubar = _EKSEHA55cjs.createStore.call(void 0, initialState, composite, props.store);
|
|
29
|
-
return _7EQBAZ46cjs.__spreadValues.call(void 0, _7EQBAZ46cjs.__spreadValues.call(void 0, {}, composite), menubar);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
exports.createMenubarStore = createMenubarStore;
|
package/esm/__chunks/3YLGPPWQ.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a, b) => {
|
|
10
|
-
for (var prop in b || (b = {}))
|
|
11
|
-
if (__hasOwnProp.call(b, prop))
|
|
12
|
-
__defNormalProp(a, prop, b[prop]);
|
|
13
|
-
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
-
if (__propIsEnum.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
}
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
-
var __objRest = (source, exclude) => {
|
|
22
|
-
var target = {};
|
|
23
|
-
for (var prop in source)
|
|
24
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
-
target[prop] = source[prop];
|
|
26
|
-
if (source != null && __getOwnPropSymbols)
|
|
27
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
}
|
|
31
|
-
return target;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
__spreadValues,
|
|
36
|
-
__spreadProps,
|
|
37
|
-
__objRest
|
|
38
|
-
};
|