@ariakit/core 0.3.5 → 0.3.6
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/{FJSZTIOU.cjs → 46BH65MC.cjs} +4 -6
- package/cjs/__chunks/{FTB5CXVB.cjs → 5F4DVUNS.cjs} +7 -1
- package/cjs/__chunks/{AR2VJ37F.cjs → 6WBY3ZZM.cjs} +6 -6
- package/cjs/__chunks/{HOEZKRUM.cjs → 7ZUFMSXJ.cjs} +7 -7
- package/cjs/__chunks/{F5YZIIEA.cjs → GXIZMD53.cjs} +8 -2
- package/cjs/__chunks/{MYTMMWXI.cjs → GZDVJEID.cjs} +2 -2
- package/cjs/__chunks/{FFY2GSOG.cjs → JLC5A6WF.cjs} +8 -8
- package/cjs/__chunks/{F6Q5QSXF.cjs → MEHGRTJ3.cjs} +11 -11
- package/cjs/__chunks/{XVR5QRC3.cjs → PD7XZBXC.cjs} +4 -4
- package/cjs/__chunks/{G5EW4WED.cjs → YIUPKKEK.cjs} +6 -6
- package/cjs/checkbox/checkbox-store.cjs +3 -3
- package/cjs/collection/collection-store.cjs +4 -4
- package/cjs/combobox/combobox-store.cjs +21 -21
- package/cjs/combobox/combobox-store.d.cts +4 -1
- package/cjs/combobox/combobox-store.d.ts +4 -1
- package/cjs/composite/composite-overflow-store.cjs +5 -5
- package/cjs/composite/composite-store.cjs +5 -5
- package/cjs/dialog/dialog-store.cjs +4 -4
- package/cjs/disclosure/disclosure-store.cjs +3 -3
- package/cjs/form/form-store.cjs +8 -8
- package/cjs/hovercard/hovercard-store.cjs +6 -6
- package/cjs/menu/menu-bar-store.cjs +6 -6
- package/cjs/menu/menu-store.cjs +19 -19
- package/cjs/menubar/menubar-store.cjs +6 -6
- package/cjs/menubar/menubar-store.d.cts +12 -6
- package/cjs/menubar/menubar-store.d.ts +12 -6
- package/cjs/popover/popover-store.cjs +5 -5
- package/cjs/radio/radio-store.cjs +6 -6
- package/cjs/select/select-store.cjs +19 -19
- package/cjs/tab/tab-store.cjs +16 -16
- package/cjs/toolbar/toolbar-store.cjs +5 -5
- package/cjs/tooltip/tooltip-store.cjs +7 -7
- package/cjs/utils/dom.cjs +4 -2
- package/cjs/utils/dom.d.cts +9 -0
- package/cjs/utils/dom.d.ts +9 -0
- package/cjs/utils/events.cjs +5 -5
- package/cjs/utils/focus.cjs +13 -13
- package/cjs/utils/platform.cjs +3 -3
- package/cjs/utils/store.cjs +2 -2
- package/esm/__chunks/{6LSGADQM.js → ANO6WJO4.js} +8 -2
- package/esm/__chunks/{EIFVU736.js → BXH3I7ML.js} +2 -2
- package/esm/__chunks/{6EMNXRG3.js → CCU5UHQ2.js} +2 -2
- package/esm/__chunks/{DREIYIMP.js → CL47ZAPY.js} +1 -1
- package/esm/__chunks/{NIF7E7VE.js → DLOEKDPY.js} +7 -1
- package/esm/__chunks/{PCA5ARZU.js → DYD4YNLE.js} +1 -1
- package/esm/__chunks/{HJS6GJT4.js → E7OQVGGY.js} +4 -6
- package/esm/__chunks/{5UJPJ37G.js → MHPO2BXA.js} +1 -1
- package/esm/__chunks/{5BWT4GY2.js → OGMLJYDV.js} +2 -2
- package/esm/__chunks/{MRBDYBGO.js → WY3EMTH6.js} +2 -2
- package/esm/checkbox/checkbox-store.js +1 -1
- package/esm/collection/collection-store.js +3 -3
- package/esm/combobox/combobox-store.d.ts +4 -1
- package/esm/combobox/combobox-store.js +8 -8
- package/esm/composite/composite-overflow-store.js +4 -4
- package/esm/composite/composite-store.js +4 -4
- package/esm/dialog/dialog-store.js +3 -3
- package/esm/disclosure/disclosure-store.js +2 -2
- package/esm/form/form-store.js +3 -3
- package/esm/hovercard/hovercard-store.js +5 -5
- package/esm/menu/menu-bar-store.js +5 -5
- package/esm/menu/menu-store.js +8 -8
- package/esm/menubar/menubar-store.d.ts +12 -6
- package/esm/menubar/menubar-store.js +5 -5
- package/esm/popover/popover-store.js +4 -4
- package/esm/radio/radio-store.js +4 -4
- package/esm/select/select-store.js +7 -7
- package/esm/tab/tab-store.js +4 -4
- package/esm/toolbar/toolbar-store.js +4 -4
- package/esm/tooltip/tooltip-store.js +5 -5
- package/esm/utils/dom.d.ts +9 -0
- package/esm/utils/dom.js +5 -3
- package/esm/utils/events.js +2 -2
- package/esm/utils/focus.js +1 -1
- package/esm/utils/platform.js +2 -2
- package/esm/utils/store.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -50,17 +50,15 @@ function createStore(initialState, ...stores) {
|
|
|
50
50
|
return;
|
|
51
51
|
if (!_3UT5FE6Kcjs.hasOwnProperty.call(void 0, storeState, key))
|
|
52
52
|
return;
|
|
53
|
-
return sync(
|
|
54
|
-
|
|
55
|
-
[key],
|
|
56
|
-
(state2) => setState(
|
|
53
|
+
return sync(store, [key], (state2) => {
|
|
54
|
+
setState(
|
|
57
55
|
key,
|
|
58
56
|
state2[key],
|
|
59
57
|
// @ts-expect-error - Not public API. This is just to prevent
|
|
60
58
|
// infinite loops.
|
|
61
59
|
true
|
|
62
|
-
)
|
|
63
|
-
);
|
|
60
|
+
);
|
|
61
|
+
});
|
|
64
62
|
})
|
|
65
63
|
)
|
|
66
64
|
);
|
|
@@ -169,6 +169,12 @@ function isPartiallyHidden(element) {
|
|
|
169
169
|
const right = elementRect.right > scrollerRight;
|
|
170
170
|
return top || left || bottom || right;
|
|
171
171
|
}
|
|
172
|
+
function setSelectionRange(element, ...args) {
|
|
173
|
+
if (/text|search|password|tel|url/i.test(element.type)) {
|
|
174
|
+
element.setSelectionRange(...args);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
172
178
|
|
|
173
179
|
|
|
174
180
|
|
|
@@ -188,4 +194,4 @@ function isPartiallyHidden(element) {
|
|
|
188
194
|
|
|
189
195
|
|
|
190
196
|
|
|
191
|
-
exports.canUseDOM = canUseDOM; exports.getDocument = getDocument; exports.getWindow = getWindow; exports.getActiveElement = getActiveElement; exports.contains = contains; exports.isFrame = isFrame; exports.isButton = isButton; exports.matches = matches; exports.isVisible = isVisible; exports.closest = closest; exports.isTextField = isTextField; exports.getPopupRole = getPopupRole; exports.getPopupItemRole = getPopupItemRole; exports.getTextboxSelection = getTextboxSelection; exports.scrollIntoViewIfNeeded = scrollIntoViewIfNeeded; exports.getScrollingElement = getScrollingElement; exports.isPartiallyHidden = isPartiallyHidden;
|
|
197
|
+
exports.canUseDOM = canUseDOM; exports.getDocument = getDocument; exports.getWindow = getWindow; exports.getActiveElement = getActiveElement; exports.contains = contains; exports.isFrame = isFrame; exports.isButton = isButton; exports.matches = matches; exports.isVisible = isVisible; exports.closest = closest; exports.isTextField = isTextField; exports.getPopupRole = getPopupRole; exports.getPopupItemRole = getPopupItemRole; exports.getTextboxSelection = getTextboxSelection; exports.scrollIntoViewIfNeeded = scrollIntoViewIfNeeded; exports.getScrollingElement = getScrollingElement; exports.isPartiallyHidden = isPartiallyHidden; exports.setSelectionRange = setSelectionRange;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _JLC5A6WFcjs = require('./JLC5A6WF.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _46BH65MCcjs = require('./46BH65MC.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
|
|
@@ -124,7 +124,7 @@ function verticalizeItems(items) {
|
|
|
124
124
|
function createCompositeStore(props = {}) {
|
|
125
125
|
var _a;
|
|
126
126
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
127
|
-
const collection =
|
|
127
|
+
const collection = _JLC5A6WFcjs.createCollectionStore.call(void 0, props);
|
|
128
128
|
const activeId = _3UT5FE6Kcjs.defaultValue.call(void 0,
|
|
129
129
|
props.activeId,
|
|
130
130
|
syncState == null ? void 0 : syncState.activeId,
|
|
@@ -154,10 +154,10 @@ function createCompositeStore(props = {}) {
|
|
|
154
154
|
focusWrap: _3UT5FE6Kcjs.defaultValue.call(void 0, props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),
|
|
155
155
|
focusShift: _3UT5FE6Kcjs.defaultValue.call(void 0, props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)
|
|
156
156
|
});
|
|
157
|
-
const composite =
|
|
158
|
-
|
|
157
|
+
const composite = _46BH65MCcjs.createStore.call(void 0, initialState, collection, props.store);
|
|
158
|
+
_46BH65MCcjs.setup.call(void 0,
|
|
159
159
|
composite,
|
|
160
|
-
() =>
|
|
160
|
+
() => _46BH65MCcjs.sync.call(void 0, composite, ["renderedItems", "activeId"], (state) => {
|
|
161
161
|
composite.setState("activeId", (activeId2) => {
|
|
162
162
|
var _a2;
|
|
163
163
|
if (activeId2 !== void 0)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _GZDVJEIDcjs = require('./GZDVJEID.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _46BH65MCcjs = require('./46BH65MC.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
|
|
@@ -24,9 +24,9 @@ function createPopoverStore(_a = {}) {
|
|
|
24
24
|
} = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, [
|
|
25
25
|
"popover"
|
|
26
26
|
]);
|
|
27
|
-
const store =
|
|
27
|
+
const store = _46BH65MCcjs.mergeStore.call(void 0,
|
|
28
28
|
props.store,
|
|
29
|
-
|
|
29
|
+
_46BH65MCcjs.omit.call(void 0, otherPopover, [
|
|
30
30
|
"arrowElement",
|
|
31
31
|
"anchorElement",
|
|
32
32
|
"contentElement",
|
|
@@ -34,9 +34,9 @@ function createPopoverStore(_a = {}) {
|
|
|
34
34
|
"disclosureElement"
|
|
35
35
|
])
|
|
36
36
|
);
|
|
37
|
-
|
|
37
|
+
_46BH65MCcjs.throwOnConflictingProps.call(void 0, props, store);
|
|
38
38
|
const syncState = store == null ? void 0 : store.getState();
|
|
39
|
-
const dialog =
|
|
39
|
+
const dialog = _GZDVJEIDcjs.createDialogStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), { store }));
|
|
40
40
|
const placement = _3UT5FE6Kcjs.defaultValue.call(void 0,
|
|
41
41
|
props.placement,
|
|
42
42
|
syncState == null ? void 0 : syncState.placement,
|
|
@@ -50,7 +50,7 @@ function createPopoverStore(_a = {}) {
|
|
|
50
50
|
arrowElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.arrowElement, null),
|
|
51
51
|
rendered: Symbol("rendered")
|
|
52
52
|
});
|
|
53
|
-
const popover =
|
|
53
|
+
const popover = _46BH65MCcjs.createStore.call(void 0, initialState, dialog, store);
|
|
54
54
|
return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, dialog), popover), {
|
|
55
55
|
setAnchorElement: (element) => popover.setState("anchorElement", element),
|
|
56
56
|
setPopoverElement: (element) => popover.setState("popoverElement", element),
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _6WBY3ZZMcjs = require('./6WBY3ZZM.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _46BH65MCcjs = require('./46BH65MC.cjs');
|
|
5
8
|
|
|
6
9
|
|
|
7
10
|
var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
|
|
@@ -14,7 +17,7 @@ var _AV6KTKLEcjs = require('./AV6KTKLE.cjs');
|
|
|
14
17
|
function createMenubarStore(props = {}) {
|
|
15
18
|
var _a;
|
|
16
19
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
17
|
-
|
|
20
|
+
const composite = _6WBY3ZZMcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
|
|
18
21
|
orientation: _3UT5FE6Kcjs.defaultValue.call(void 0,
|
|
19
22
|
props.orientation,
|
|
20
23
|
syncState == null ? void 0 : syncState.orientation,
|
|
@@ -22,6 +25,9 @@ function createMenubarStore(props = {}) {
|
|
|
22
25
|
),
|
|
23
26
|
focusLoop: _3UT5FE6Kcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
|
|
24
27
|
}));
|
|
28
|
+
const initialState = _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState());
|
|
29
|
+
const menubar = _46BH65MCcjs.createStore.call(void 0, initialState, composite, props.store);
|
|
30
|
+
return _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite), menubar);
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _MEHGRTJ3cjs = require('./MEHGRTJ3.cjs');
|
|
5
5
|
|
|
6
6
|
// src/dialog/dialog-store.ts
|
|
7
7
|
function createDialogStore(props = {}) {
|
|
8
|
-
return
|
|
8
|
+
return _MEHGRTJ3cjs.createDisclosureStore.call(void 0, props);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _46BH65MCcjs = require('./46BH65MC.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _5F4DVUNScjs = require('./5F4DVUNS.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -61,11 +61,11 @@ function getCommonParent(items) {
|
|
|
61
61
|
}
|
|
62
62
|
parentElement = parentElement.parentElement;
|
|
63
63
|
}
|
|
64
|
-
return
|
|
64
|
+
return _5F4DVUNScjs.getDocument.call(void 0, parentElement).body;
|
|
65
65
|
}
|
|
66
66
|
function createCollectionStore(props = {}) {
|
|
67
67
|
var _a;
|
|
68
|
-
|
|
68
|
+
_46BH65MCcjs.throwOnConflictingProps.call(void 0, props, props.store);
|
|
69
69
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
70
70
|
const items = _3UT5FE6Kcjs.defaultValue.call(void 0,
|
|
71
71
|
props.items,
|
|
@@ -78,18 +78,18 @@ function createCollectionStore(props = {}) {
|
|
|
78
78
|
items,
|
|
79
79
|
renderedItems: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.renderedItems, [])
|
|
80
80
|
};
|
|
81
|
-
const privateStore =
|
|
81
|
+
const privateStore = _46BH65MCcjs.createStore.call(void 0, {
|
|
82
82
|
renderedItems: initialState.renderedItems
|
|
83
83
|
});
|
|
84
|
-
const collection =
|
|
84
|
+
const collection = _46BH65MCcjs.createStore.call(void 0, initialState, props.store);
|
|
85
85
|
const sortItems = () => {
|
|
86
86
|
const state = privateStore.getState();
|
|
87
87
|
const renderedItems = sortBasedOnDOMPosition(state.renderedItems);
|
|
88
88
|
privateStore.setState("renderedItems", renderedItems);
|
|
89
89
|
collection.setState("renderedItems", renderedItems);
|
|
90
90
|
};
|
|
91
|
-
|
|
92
|
-
return
|
|
91
|
+
_46BH65MCcjs.setup.call(void 0, collection, () => {
|
|
92
|
+
return _46BH65MCcjs.batch.call(void 0, privateStore, ["renderedItems"], (state) => {
|
|
93
93
|
let firstRun = true;
|
|
94
94
|
let raf = requestAnimationFrame(sortItems);
|
|
95
95
|
if (typeof IntersectionObserver !== "function")
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _46BH65MCcjs = require('./46BH65MC.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
|
|
@@ -18,11 +18,11 @@ var _AV6KTKLEcjs = require('./AV6KTKLE.cjs');
|
|
|
18
18
|
|
|
19
19
|
// src/disclosure/disclosure-store.ts
|
|
20
20
|
function createDisclosureStore(props = {}) {
|
|
21
|
-
const store =
|
|
21
|
+
const store = _46BH65MCcjs.mergeStore.call(void 0,
|
|
22
22
|
props.store,
|
|
23
|
-
|
|
23
|
+
_46BH65MCcjs.omit.call(void 0, props.disclosure, ["contentElement", "disclosureElement"])
|
|
24
24
|
);
|
|
25
|
-
|
|
25
|
+
_46BH65MCcjs.throwOnConflictingProps.call(void 0, props, store);
|
|
26
26
|
const syncState = store == null ? void 0 : store.getState();
|
|
27
27
|
const open = _3UT5FE6Kcjs.defaultValue.call(void 0,
|
|
28
28
|
props.open,
|
|
@@ -39,26 +39,26 @@ function createDisclosureStore(props = {}) {
|
|
|
39
39
|
contentElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.contentElement, null),
|
|
40
40
|
disclosureElement: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.disclosureElement, null)
|
|
41
41
|
};
|
|
42
|
-
const disclosure =
|
|
43
|
-
|
|
42
|
+
const disclosure = _46BH65MCcjs.createStore.call(void 0, initialState, store);
|
|
43
|
+
_46BH65MCcjs.setup.call(void 0,
|
|
44
44
|
disclosure,
|
|
45
|
-
() =>
|
|
45
|
+
() => _46BH65MCcjs.sync.call(void 0, disclosure, ["animated", "animating"], (state) => {
|
|
46
46
|
if (state.animated)
|
|
47
47
|
return;
|
|
48
48
|
disclosure.setState("animating", false);
|
|
49
49
|
})
|
|
50
50
|
);
|
|
51
|
-
|
|
51
|
+
_46BH65MCcjs.setup.call(void 0,
|
|
52
52
|
disclosure,
|
|
53
|
-
() =>
|
|
53
|
+
() => _46BH65MCcjs.subscribe.call(void 0, disclosure, ["open"], () => {
|
|
54
54
|
if (!disclosure.getState().animated)
|
|
55
55
|
return;
|
|
56
56
|
disclosure.setState("animating", true);
|
|
57
57
|
})
|
|
58
58
|
);
|
|
59
|
-
|
|
59
|
+
_46BH65MCcjs.setup.call(void 0,
|
|
60
60
|
disclosure,
|
|
61
|
-
() =>
|
|
61
|
+
() => _46BH65MCcjs.sync.call(void 0, disclosure, ["open", "animating"], (state) => {
|
|
62
62
|
disclosure.setState("mounted", state.open || state.animating);
|
|
63
63
|
})
|
|
64
64
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _7ZUFMSXJcjs = require('./7ZUFMSXJ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _46BH65MCcjs = require('./46BH65MC.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _3UT5FE6Kcjs = require('./3UT5FE6K.cjs');
|
|
@@ -17,7 +17,7 @@ var _AV6KTKLEcjs = require('./AV6KTKLE.cjs');
|
|
|
17
17
|
function createHovercardStore(props = {}) {
|
|
18
18
|
var _a;
|
|
19
19
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
20
|
-
const popover =
|
|
20
|
+
const popover = _7ZUFMSXJcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
|
|
21
21
|
placement: _3UT5FE6Kcjs.defaultValue.call(void 0,
|
|
22
22
|
props.placement,
|
|
23
23
|
syncState == null ? void 0 : syncState.placement,
|
|
@@ -31,7 +31,7 @@ function createHovercardStore(props = {}) {
|
|
|
31
31
|
hideTimeout: _3UT5FE6Kcjs.defaultValue.call(void 0, props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout),
|
|
32
32
|
autoFocusOnShow: _3UT5FE6Kcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.autoFocusOnShow, false)
|
|
33
33
|
});
|
|
34
|
-
const hovercard =
|
|
34
|
+
const hovercard = _46BH65MCcjs.createStore.call(void 0, initialState, popover, props.store);
|
|
35
35
|
return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, popover), hovercard), {
|
|
36
36
|
setAutoFocusOnShow: (value) => hovercard.setState("autoFocusOnShow", value)
|
|
37
37
|
});
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _5F4DVUNScjs = require('./5F4DVUNS.cjs');
|
|
5
5
|
|
|
6
6
|
// src/utils/platform.ts
|
|
7
7
|
function isTouchDevice() {
|
|
8
|
-
return
|
|
8
|
+
return _5F4DVUNScjs.canUseDOM && !!navigator.maxTouchPoints;
|
|
9
9
|
}
|
|
10
10
|
function isApple() {
|
|
11
|
-
if (!
|
|
11
|
+
if (!_5F4DVUNScjs.canUseDOM)
|
|
12
12
|
return false;
|
|
13
13
|
return /mac|iphone|ipad|ipod/i.test(navigator.platform);
|
|
14
14
|
}
|
|
15
15
|
function isSafari() {
|
|
16
|
-
return
|
|
16
|
+
return _5F4DVUNScjs.canUseDOM && isApple() && /apple/i.test(navigator.vendor);
|
|
17
17
|
}
|
|
18
18
|
function isFirefox() {
|
|
19
|
-
return
|
|
19
|
+
return _5F4DVUNScjs.canUseDOM && /firefox\//i.test(navigator.userAgent);
|
|
20
20
|
}
|
|
21
21
|
function isMac() {
|
|
22
|
-
return
|
|
22
|
+
return _5F4DVUNScjs.canUseDOM && navigator.platform.startsWith("Mac") && !isTouchDevice();
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _46BH65MCcjs = require('../__chunks/46BH65MC.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _3UT5FE6Kcjs = require('../__chunks/3UT5FE6K.cjs');
|
|
@@ -14,7 +14,7 @@ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
|
|
|
14
14
|
// src/checkbox/checkbox-store.ts
|
|
15
15
|
function createCheckboxStore(props = {}) {
|
|
16
16
|
var _a;
|
|
17
|
-
|
|
17
|
+
_46BH65MCcjs.throwOnConflictingProps.call(void 0, props, props.store);
|
|
18
18
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
19
19
|
const initialState = {
|
|
20
20
|
value: _3UT5FE6Kcjs.defaultValue.call(void 0,
|
|
@@ -24,7 +24,7 @@ function createCheckboxStore(props = {}) {
|
|
|
24
24
|
false
|
|
25
25
|
)
|
|
26
26
|
};
|
|
27
|
-
const checkbox =
|
|
27
|
+
const checkbox = _46BH65MCcjs.createStore.call(void 0, initialState, props.store);
|
|
28
28
|
return _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, checkbox), {
|
|
29
29
|
setValue: (value) => checkbox.setState("value", value)
|
|
30
30
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../__chunks/
|
|
4
|
+
var _JLC5A6WFcjs = require('../__chunks/JLC5A6WF.cjs');
|
|
5
|
+
require('../__chunks/46BH65MC.cjs');
|
|
6
6
|
require('../__chunks/3UT5FE6K.cjs');
|
|
7
|
-
require('../__chunks/
|
|
7
|
+
require('../__chunks/5F4DVUNS.cjs');
|
|
8
8
|
require('../__chunks/AV6KTKLE.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.createCollectionStore =
|
|
11
|
+
exports.createCollectionStore = _JLC5A6WFcjs.createCollectionStore;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
4
|
+
var _7ZUFMSXJcjs = require('../__chunks/7ZUFMSXJ.cjs');
|
|
5
|
+
require('../__chunks/GZDVJEID.cjs');
|
|
6
|
+
require('../__chunks/MEHGRTJ3.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
require('../__chunks/
|
|
9
|
+
var _6WBY3ZZMcjs = require('../__chunks/6WBY3ZZM.cjs');
|
|
10
|
+
require('../__chunks/JLC5A6WF.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _46BH65MCcjs = require('../__chunks/46BH65MC.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _3UT5FE6Kcjs = require('../__chunks/3UT5FE6K.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
25
|
-
require('../__chunks/
|
|
24
|
+
var _YIUPKKEKcjs = require('../__chunks/YIUPKKEK.cjs');
|
|
25
|
+
require('../__chunks/5F4DVUNS.cjs');
|
|
26
26
|
require('../__chunks/ULSPM3Y3.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
@@ -30,10 +30,10 @@ require('../__chunks/ULSPM3Y3.cjs');
|
|
|
30
30
|
var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
|
|
31
31
|
|
|
32
32
|
// src/combobox/combobox-store.ts
|
|
33
|
-
var isSafariOnMobile =
|
|
33
|
+
var isSafariOnMobile = _YIUPKKEKcjs.isSafari.call(void 0, ) && _YIUPKKEKcjs.isTouchDevice.call(void 0, );
|
|
34
34
|
function createComboboxStore(props = {}) {
|
|
35
35
|
var _a;
|
|
36
|
-
|
|
36
|
+
_46BH65MCcjs.throwOnConflictingProps.call(void 0, props, props.store);
|
|
37
37
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
38
38
|
const activeId = _3UT5FE6Kcjs.defaultValue.call(void 0,
|
|
39
39
|
props.activeId,
|
|
@@ -41,7 +41,7 @@ function createComboboxStore(props = {}) {
|
|
|
41
41
|
props.defaultActiveId,
|
|
42
42
|
null
|
|
43
43
|
);
|
|
44
|
-
const composite =
|
|
44
|
+
const composite = _6WBY3ZZMcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
|
|
45
45
|
activeId,
|
|
46
46
|
includesBaseElement: _3UT5FE6Kcjs.defaultValue.call(void 0,
|
|
47
47
|
props.includesBaseElement,
|
|
@@ -61,7 +61,7 @@ function createComboboxStore(props = {}) {
|
|
|
61
61
|
!isSafariOnMobile
|
|
62
62
|
)
|
|
63
63
|
}));
|
|
64
|
-
const popover =
|
|
64
|
+
const popover = _7ZUFMSXJcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
|
|
65
65
|
placement: _3UT5FE6Kcjs.defaultValue.call(void 0,
|
|
66
66
|
props.placement,
|
|
67
67
|
syncState == null ? void 0 : syncState.placement,
|
|
@@ -83,10 +83,10 @@ function createComboboxStore(props = {}) {
|
|
|
83
83
|
),
|
|
84
84
|
activeValue: syncState == null ? void 0 : syncState.activeValue
|
|
85
85
|
});
|
|
86
|
-
const combobox =
|
|
87
|
-
|
|
86
|
+
const combobox = _46BH65MCcjs.createStore.call(void 0, initialState, composite, popover, props.store);
|
|
87
|
+
_46BH65MCcjs.setup.call(void 0,
|
|
88
88
|
combobox,
|
|
89
|
-
() =>
|
|
89
|
+
() => _46BH65MCcjs.sync.call(void 0, combobox, ["resetValueOnHide", "mounted"], (state) => {
|
|
90
90
|
if (!state.resetValueOnHide)
|
|
91
91
|
return;
|
|
92
92
|
if (state.mounted)
|
|
@@ -94,26 +94,26 @@ function createComboboxStore(props = {}) {
|
|
|
94
94
|
combobox.setState("value", initialValue);
|
|
95
95
|
})
|
|
96
96
|
);
|
|
97
|
-
|
|
97
|
+
_46BH65MCcjs.setup.call(void 0,
|
|
98
98
|
combobox,
|
|
99
|
-
() =>
|
|
99
|
+
() => _46BH65MCcjs.batch.call(void 0, combobox, ["mounted"], (state) => {
|
|
100
100
|
if (state.mounted)
|
|
101
101
|
return;
|
|
102
102
|
combobox.setState("activeId", activeId);
|
|
103
103
|
combobox.setState("moves", 0);
|
|
104
104
|
})
|
|
105
105
|
);
|
|
106
|
-
|
|
106
|
+
_46BH65MCcjs.setup.call(void 0,
|
|
107
107
|
combobox,
|
|
108
|
-
() =>
|
|
108
|
+
() => _46BH65MCcjs.sync.call(void 0, combobox, ["moves", "activeId"], (state, prevState) => {
|
|
109
109
|
if (state.moves === prevState.moves) {
|
|
110
110
|
combobox.setState("activeValue", void 0);
|
|
111
111
|
}
|
|
112
112
|
})
|
|
113
113
|
);
|
|
114
|
-
|
|
114
|
+
_46BH65MCcjs.setup.call(void 0,
|
|
115
115
|
combobox,
|
|
116
|
-
() =>
|
|
116
|
+
() => _46BH65MCcjs.batch.call(void 0, combobox, ["moves", "renderedItems"], (state, prev) => {
|
|
117
117
|
if (state.moves === prev.moves)
|
|
118
118
|
return;
|
|
119
119
|
const { activeId: activeId2 } = combobox.getState();
|
|
@@ -19,7 +19,8 @@ export interface ComboboxStoreState extends CompositeStoreState<Item>, PopoverSt
|
|
|
19
19
|
* The input value.
|
|
20
20
|
*
|
|
21
21
|
* Live examples:
|
|
22
|
-
* - [
|
|
22
|
+
* - [Combobox with integrated
|
|
23
|
+
* filter](https://ariakit.org/examples/combobox-filtering-integrated)
|
|
23
24
|
* - [Combobox with links](https://ariakit.org/examples/combobox-links)
|
|
24
25
|
* - [Combobox filtering](https://ariakit.org/examples/combobox-filtering)
|
|
25
26
|
* - [Multi-selectable
|
|
@@ -38,6 +39,8 @@ export interface ComboboxStoreState extends CompositeStoreState<Item>, PopoverSt
|
|
|
38
39
|
* Live examples:
|
|
39
40
|
* - [Multi-selectable
|
|
40
41
|
* Combobox](https://ariakit.org/examples/combobox-multiple)
|
|
42
|
+
* - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
|
|
43
|
+
* - [Select with Combobox](https://ariakit.org/examples/select-combobox)
|
|
41
44
|
* @default false
|
|
42
45
|
*/
|
|
43
46
|
resetValueOnHide: boolean;
|
|
@@ -19,7 +19,8 @@ export interface ComboboxStoreState extends CompositeStoreState<Item>, PopoverSt
|
|
|
19
19
|
* The input value.
|
|
20
20
|
*
|
|
21
21
|
* Live examples:
|
|
22
|
-
* - [
|
|
22
|
+
* - [Combobox with integrated
|
|
23
|
+
* filter](https://ariakit.org/examples/combobox-filtering-integrated)
|
|
23
24
|
* - [Combobox with links](https://ariakit.org/examples/combobox-links)
|
|
24
25
|
* - [Combobox filtering](https://ariakit.org/examples/combobox-filtering)
|
|
25
26
|
* - [Multi-selectable
|
|
@@ -38,6 +39,8 @@ export interface ComboboxStoreState extends CompositeStoreState<Item>, PopoverSt
|
|
|
38
39
|
* Live examples:
|
|
39
40
|
* - [Multi-selectable
|
|
40
41
|
* Combobox](https://ariakit.org/examples/combobox-multiple)
|
|
42
|
+
* - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
|
|
43
|
+
* - [Select with Combobox](https://ariakit.org/examples/select-combobox)
|
|
41
44
|
* @default false
|
|
42
45
|
*/
|
|
43
46
|
resetValueOnHide: boolean;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
7
|
-
require('../__chunks/
|
|
4
|
+
var _7ZUFMSXJcjs = require('../__chunks/7ZUFMSXJ.cjs');
|
|
5
|
+
require('../__chunks/GZDVJEID.cjs');
|
|
6
|
+
require('../__chunks/MEHGRTJ3.cjs');
|
|
7
|
+
require('../__chunks/46BH65MC.cjs');
|
|
8
8
|
require('../__chunks/3UT5FE6K.cjs');
|
|
9
9
|
require('../__chunks/AV6KTKLE.cjs');
|
|
10
10
|
|
|
11
11
|
// src/composite/composite-overflow-store.ts
|
|
12
12
|
function createCompositeOverflowStore(props = {}) {
|
|
13
|
-
return
|
|
13
|
+
return _7ZUFMSXJcjs.createPopoverStore.call(void 0, props);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
4
|
+
var _6WBY3ZZMcjs = require('../__chunks/6WBY3ZZM.cjs');
|
|
5
|
+
require('../__chunks/JLC5A6WF.cjs');
|
|
6
|
+
require('../__chunks/46BH65MC.cjs');
|
|
7
7
|
require('../__chunks/3UT5FE6K.cjs');
|
|
8
|
-
require('../__chunks/
|
|
8
|
+
require('../__chunks/5F4DVUNS.cjs');
|
|
9
9
|
require('../__chunks/ULSPM3Y3.cjs');
|
|
10
10
|
require('../__chunks/AV6KTKLE.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.createCompositeStore =
|
|
13
|
+
exports.createCompositeStore = _6WBY3ZZMcjs.createCompositeStore;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
4
|
+
var _GZDVJEIDcjs = require('../__chunks/GZDVJEID.cjs');
|
|
5
|
+
require('../__chunks/MEHGRTJ3.cjs');
|
|
6
|
+
require('../__chunks/46BH65MC.cjs');
|
|
7
7
|
require('../__chunks/3UT5FE6K.cjs');
|
|
8
8
|
require('../__chunks/AV6KTKLE.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.createDialogStore =
|
|
11
|
+
exports.createDialogStore = _GZDVJEIDcjs.createDialogStore;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../__chunks/
|
|
4
|
+
var _MEHGRTJ3cjs = require('../__chunks/MEHGRTJ3.cjs');
|
|
5
|
+
require('../__chunks/46BH65MC.cjs');
|
|
6
6
|
require('../__chunks/3UT5FE6K.cjs');
|
|
7
7
|
require('../__chunks/AV6KTKLE.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.createDisclosureStore =
|
|
10
|
+
exports.createDisclosureStore = _MEHGRTJ3cjs.createDisclosureStore;
|