@ariakit/core 0.4.16 → 0.4.17
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/{MLCPLY2P.cjs → 6BYUUR4M.cjs} +2 -6
- package/cjs/__chunks/AOXAROPF.cjs +59 -0
- package/cjs/__chunks/CPH45Z4I.cjs +36 -0
- package/cjs/__chunks/{E5AYFGW2.cjs → LT33CJGT.cjs} +17 -20
- package/cjs/__chunks/{L5GSFUJU.cjs → MJNGPYVQ.cjs} +19 -22
- package/cjs/__chunks/{7WVAUIME.cjs → NNJG45OF.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 +4 -5
- package/cjs/combobox/combobox-store.cjs +54 -54
- package/cjs/composite/composite-overflow-store.cjs +6 -7
- package/cjs/composite/composite-store.cjs +5 -6
- package/cjs/dialog/dialog-store.cjs +5 -6
- package/cjs/disclosure/disclosure-store.cjs +4 -5
- package/cjs/form/form-store.cjs +33 -34
- package/cjs/hovercard/hovercard-store.cjs +7 -8
- package/cjs/index.cjs +1 -3
- package/cjs/menu/menu-bar-store.cjs +6 -7
- package/cjs/menu/menu-store.cjs +48 -49
- package/cjs/menubar/menubar-store.cjs +6 -7
- package/cjs/popover/popover-store.cjs +6 -7
- package/cjs/radio/radio-store.cjs +22 -22
- package/cjs/select/select-store.cjs +48 -48
- package/cjs/tab/tab-store.cjs +46 -50
- package/cjs/tag/tag-store.cjs +20 -21
- package/cjs/toolbar/toolbar-store.cjs +9 -12
- package/cjs/tooltip/tooltip-store.cjs +20 -19
- package/cjs/utils/array.cjs +0 -1
- package/cjs/utils/dom.cjs +0 -1
- package/cjs/utils/events.cjs +2 -6
- package/cjs/utils/focus.cjs +1 -4
- package/cjs/utils/misc.cjs +2 -3
- package/cjs/utils/platform.cjs +0 -1
- package/cjs/utils/store.cjs +3 -4
- package/cjs/utils/undo.cjs +0 -1
- package/esm/__chunks/{C34RJTDU.js → 73UNQSFO.js} +13 -13
- package/esm/__chunks/{43IPP2F4.js → 75BJEVSH.js} +5 -8
- package/esm/__chunks/{K2KIGYQU.js → AMRA5WUK.js} +6 -9
- package/esm/__chunks/{MD3RIO2T.js → BFGNM53A.js} +15 -19
- package/esm/__chunks/{RZDDWCDV.js → KMAUV3TY.js} +1 -1
- package/esm/__chunks/{76UM5ZLT.js → PSMDSJUH.js} +13 -11
- package/esm/__chunks/{EWA2WL6G.js → SXKM4CGU.js} +2 -6
- package/esm/__chunks/{X2ASWIQW.js → TIQDSBWP.js} +13 -13
- package/esm/__chunks/{PBFD2E7P.js → XMCVU3LR.js} +1 -4
- package/esm/checkbox/checkbox-store.js +5 -8
- package/esm/collection/collection-store.js +3 -4
- package/esm/combobox/combobox-store.js +26 -26
- package/esm/composite/composite-overflow-store.js +5 -6
- package/esm/composite/composite-store.js +4 -5
- package/esm/dialog/dialog-store.js +4 -5
- package/esm/disclosure/disclosure-store.js +3 -4
- package/esm/form/form-store.js +11 -12
- package/esm/hovercard/hovercard-store.js +6 -7
- package/esm/index.js +0 -1
- package/esm/menu/menu-bar-store.js +5 -6
- package/esm/menu/menu-store.js +32 -33
- package/esm/menubar/menubar-store.js +5 -6
- package/esm/popover/popover-store.js +5 -6
- package/esm/radio/radio-store.js +19 -19
- package/esm/select/select-store.js +26 -26
- package/esm/tab/tab-store.js +20 -24
- package/esm/tag/tag-store.js +11 -12
- package/esm/toolbar/toolbar-store.js +7 -10
- package/esm/tooltip/tooltip-store.js +16 -15
- package/esm/utils/array.js +0 -1
- package/esm/utils/dom.js +0 -1
- package/esm/utils/events.js +2 -6
- package/esm/utils/focus.js +1 -4
- package/esm/utils/misc.js +1 -2
- package/esm/utils/platform.js +0 -1
- 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
package/esm/menu/menu-store.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createHovercardStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/TIQDSBWP.js";
|
|
5
|
+
import "../__chunks/BFGNM53A.js";
|
|
6
6
|
import {
|
|
7
7
|
createCompositeStore
|
|
8
|
-
} from "../__chunks/
|
|
8
|
+
} from "../__chunks/73UNQSFO.js";
|
|
9
9
|
import "../__chunks/7PRQYBBV.js";
|
|
10
|
-
import "../__chunks/
|
|
11
|
-
import "../__chunks/
|
|
12
|
-
import "../__chunks/
|
|
10
|
+
import "../__chunks/KMAUV3TY.js";
|
|
11
|
+
import "../__chunks/75BJEVSH.js";
|
|
12
|
+
import "../__chunks/AMRA5WUK.js";
|
|
13
13
|
import "../__chunks/37JWRFYW.js";
|
|
14
14
|
import {
|
|
15
15
|
createStore,
|
|
@@ -19,28 +19,19 @@ import {
|
|
|
19
19
|
setup,
|
|
20
20
|
sync,
|
|
21
21
|
throwOnConflictingProps
|
|
22
|
-
} from "../__chunks/
|
|
22
|
+
} from "../__chunks/SXKM4CGU.js";
|
|
23
23
|
import {
|
|
24
24
|
applyState,
|
|
25
25
|
defaultValue
|
|
26
|
-
} from "../__chunks/
|
|
27
|
-
import {
|
|
28
|
-
__objRest,
|
|
29
|
-
__spreadProps,
|
|
30
|
-
__spreadValues
|
|
31
|
-
} from "../__chunks/3YLGPPWQ.js";
|
|
26
|
+
} from "../__chunks/XMCVU3LR.js";
|
|
32
27
|
|
|
33
28
|
// src/menu/menu-store.ts
|
|
34
|
-
function createMenuStore(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"combobox",
|
|
41
|
-
"parent",
|
|
42
|
-
"menubar"
|
|
43
|
-
]);
|
|
29
|
+
function createMenuStore({
|
|
30
|
+
combobox,
|
|
31
|
+
parent,
|
|
32
|
+
menubar,
|
|
33
|
+
...props
|
|
34
|
+
} = {}) {
|
|
44
35
|
const parentIsMenubar = !!menubar && !parent;
|
|
45
36
|
const store = mergeStore(
|
|
46
37
|
props.store,
|
|
@@ -55,15 +46,17 @@ function createMenuStore(_a = {}) {
|
|
|
55
46
|
);
|
|
56
47
|
throwOnConflictingProps(props, store);
|
|
57
48
|
const syncState = store.getState();
|
|
58
|
-
const composite = createCompositeStore(
|
|
49
|
+
const composite = createCompositeStore({
|
|
50
|
+
...props,
|
|
59
51
|
store,
|
|
60
52
|
orientation: defaultValue(
|
|
61
53
|
props.orientation,
|
|
62
54
|
syncState.orientation,
|
|
63
55
|
"vertical"
|
|
64
56
|
)
|
|
65
|
-
})
|
|
66
|
-
const hovercard = createHovercardStore(
|
|
57
|
+
});
|
|
58
|
+
const hovercard = createHovercardStore({
|
|
59
|
+
...props,
|
|
67
60
|
store,
|
|
68
61
|
placement: defaultValue(
|
|
69
62
|
props.placement,
|
|
@@ -76,8 +69,10 @@ function createMenuStore(_a = {}) {
|
|
|
76
69
|
parentIsMenubar ? 0 : 150
|
|
77
70
|
),
|
|
78
71
|
hideTimeout: defaultValue(props.hideTimeout, syncState.hideTimeout, 0)
|
|
79
|
-
})
|
|
80
|
-
const initialState =
|
|
72
|
+
});
|
|
73
|
+
const initialState = {
|
|
74
|
+
...composite.getState(),
|
|
75
|
+
...hovercard.getState(),
|
|
81
76
|
initialFocus: defaultValue(syncState.initialFocus, "container"),
|
|
82
77
|
values: defaultValue(
|
|
83
78
|
props.values,
|
|
@@ -85,7 +80,7 @@ function createMenuStore(_a = {}) {
|
|
|
85
80
|
props.defaultValues,
|
|
86
81
|
{}
|
|
87
82
|
)
|
|
88
|
-
}
|
|
83
|
+
};
|
|
89
84
|
const menu = createStore(initialState, composite, hovercard, store);
|
|
90
85
|
setup(
|
|
91
86
|
menu,
|
|
@@ -103,7 +98,10 @@ function createMenuStore(_a = {}) {
|
|
|
103
98
|
);
|
|
104
99
|
})
|
|
105
100
|
);
|
|
106
|
-
return
|
|
101
|
+
return {
|
|
102
|
+
...composite,
|
|
103
|
+
...hovercard,
|
|
104
|
+
...menu,
|
|
107
105
|
combobox,
|
|
108
106
|
parent,
|
|
109
107
|
menubar,
|
|
@@ -121,12 +119,13 @@ function createMenuStore(_a = {}) {
|
|
|
121
119
|
const prevValue = values[name];
|
|
122
120
|
const nextValue = applyState(value, prevValue);
|
|
123
121
|
if (nextValue === prevValue) return values;
|
|
124
|
-
return
|
|
122
|
+
return {
|
|
123
|
+
...values,
|
|
125
124
|
[name]: nextValue !== void 0 && nextValue
|
|
126
|
-
}
|
|
125
|
+
};
|
|
127
126
|
});
|
|
128
127
|
}
|
|
129
|
-
}
|
|
128
|
+
};
|
|
130
129
|
}
|
|
131
130
|
export {
|
|
132
131
|
createMenuStore
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createMenubarStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/PSMDSJUH.js";
|
|
5
|
+
import "../__chunks/73UNQSFO.js";
|
|
6
6
|
import "../__chunks/7PRQYBBV.js";
|
|
7
|
-
import "../__chunks/
|
|
7
|
+
import "../__chunks/AMRA5WUK.js";
|
|
8
8
|
import "../__chunks/37JWRFYW.js";
|
|
9
|
-
import "../__chunks/
|
|
10
|
-
import "../__chunks/
|
|
11
|
-
import "../__chunks/3YLGPPWQ.js";
|
|
9
|
+
import "../__chunks/SXKM4CGU.js";
|
|
10
|
+
import "../__chunks/XMCVU3LR.js";
|
|
12
11
|
export {
|
|
13
12
|
createMenubarStore
|
|
14
13
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createPopoverStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
9
|
-
import "../__chunks/3YLGPPWQ.js";
|
|
4
|
+
} from "../__chunks/BFGNM53A.js";
|
|
5
|
+
import "../__chunks/KMAUV3TY.js";
|
|
6
|
+
import "../__chunks/75BJEVSH.js";
|
|
7
|
+
import "../__chunks/SXKM4CGU.js";
|
|
8
|
+
import "../__chunks/XMCVU3LR.js";
|
|
10
9
|
export {
|
|
11
10
|
createPopoverStore
|
|
12
11
|
};
|
package/esm/radio/radio-store.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/73UNQSFO.js";
|
|
5
5
|
import "../__chunks/7PRQYBBV.js";
|
|
6
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/AMRA5WUK.js";
|
|
7
7
|
import "../__chunks/37JWRFYW.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
|
-
__objRest,
|
|
16
|
-
__spreadProps,
|
|
17
|
-
__spreadValues
|
|
18
|
-
} from "../__chunks/3YLGPPWQ.js";
|
|
13
|
+
} from "../__chunks/XMCVU3LR.js";
|
|
19
14
|
|
|
20
15
|
// src/radio/radio-store.ts
|
|
21
|
-
function createRadioStore(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
16
|
+
function createRadioStore({
|
|
17
|
+
...props
|
|
18
|
+
} = {}) {
|
|
19
|
+
var _a;
|
|
20
|
+
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
21
|
+
const composite = createCompositeStore({
|
|
22
|
+
...props,
|
|
26
23
|
focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
|
|
27
|
-
})
|
|
28
|
-
const initialState =
|
|
24
|
+
});
|
|
25
|
+
const initialState = {
|
|
26
|
+
...composite.getState(),
|
|
29
27
|
value: defaultValue(
|
|
30
28
|
props.value,
|
|
31
29
|
syncState == null ? void 0 : syncState.value,
|
|
32
30
|
props.defaultValue,
|
|
33
31
|
null
|
|
34
32
|
)
|
|
35
|
-
}
|
|
33
|
+
};
|
|
36
34
|
const radio = createStore(initialState, composite, props.store);
|
|
37
|
-
return
|
|
35
|
+
return {
|
|
36
|
+
...composite,
|
|
37
|
+
...radio,
|
|
38
38
|
setValue: (value) => radio.setState("value", value)
|
|
39
|
-
}
|
|
39
|
+
};
|
|
40
40
|
}
|
|
41
41
|
export {
|
|
42
42
|
createRadioStore
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createPopoverStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/BFGNM53A.js";
|
|
5
5
|
import {
|
|
6
6
|
createCompositeStore
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/73UNQSFO.js";
|
|
8
8
|
import {
|
|
9
9
|
toArray
|
|
10
10
|
} from "../__chunks/7PRQYBBV.js";
|
|
11
|
-
import "../__chunks/
|
|
12
|
-
import "../__chunks/
|
|
13
|
-
import "../__chunks/
|
|
11
|
+
import "../__chunks/KMAUV3TY.js";
|
|
12
|
+
import "../__chunks/75BJEVSH.js";
|
|
13
|
+
import "../__chunks/AMRA5WUK.js";
|
|
14
14
|
import "../__chunks/37JWRFYW.js";
|
|
15
15
|
import {
|
|
16
16
|
batch,
|
|
@@ -20,23 +20,16 @@ import {
|
|
|
20
20
|
setup,
|
|
21
21
|
sync,
|
|
22
22
|
throwOnConflictingProps
|
|
23
|
-
} from "../__chunks/
|
|
23
|
+
} from "../__chunks/SXKM4CGU.js";
|
|
24
24
|
import {
|
|
25
25
|
defaultValue
|
|
26
|
-
} from "../__chunks/
|
|
27
|
-
import {
|
|
28
|
-
__objRest,
|
|
29
|
-
__spreadProps,
|
|
30
|
-
__spreadValues
|
|
31
|
-
} from "../__chunks/3YLGPPWQ.js";
|
|
26
|
+
} from "../__chunks/XMCVU3LR.js";
|
|
32
27
|
|
|
33
28
|
// src/select/select-store.ts
|
|
34
|
-
function createSelectStore(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"combobox"
|
|
39
|
-
]);
|
|
29
|
+
function createSelectStore({
|
|
30
|
+
combobox,
|
|
31
|
+
...props
|
|
32
|
+
} = {}) {
|
|
40
33
|
const store = mergeStore(
|
|
41
34
|
props.store,
|
|
42
35
|
omit(combobox, [
|
|
@@ -53,7 +46,8 @@ function createSelectStore(_a = {}) {
|
|
|
53
46
|
);
|
|
54
47
|
throwOnConflictingProps(props, store);
|
|
55
48
|
const syncState = store.getState();
|
|
56
|
-
const composite = createCompositeStore(
|
|
49
|
+
const composite = createCompositeStore({
|
|
50
|
+
...props,
|
|
57
51
|
store,
|
|
58
52
|
virtualFocus: defaultValue(
|
|
59
53
|
props.virtualFocus,
|
|
@@ -76,17 +70,20 @@ function createSelectStore(_a = {}) {
|
|
|
76
70
|
syncState.orientation,
|
|
77
71
|
"vertical"
|
|
78
72
|
)
|
|
79
|
-
})
|
|
80
|
-
const popover = createPopoverStore(
|
|
73
|
+
});
|
|
74
|
+
const popover = createPopoverStore({
|
|
75
|
+
...props,
|
|
81
76
|
store,
|
|
82
77
|
placement: defaultValue(
|
|
83
78
|
props.placement,
|
|
84
79
|
syncState.placement,
|
|
85
80
|
"bottom-start"
|
|
86
81
|
)
|
|
87
|
-
})
|
|
82
|
+
});
|
|
88
83
|
const initialValue = new String("");
|
|
89
|
-
const initialState =
|
|
84
|
+
const initialState = {
|
|
85
|
+
...composite.getState(),
|
|
86
|
+
...popover.getState(),
|
|
90
87
|
value: defaultValue(
|
|
91
88
|
props.value,
|
|
92
89
|
syncState.value,
|
|
@@ -101,7 +98,7 @@ function createSelectStore(_a = {}) {
|
|
|
101
98
|
labelElement: defaultValue(syncState.labelElement, null),
|
|
102
99
|
selectElement: defaultValue(syncState.selectElement, null),
|
|
103
100
|
listElement: defaultValue(syncState.listElement, null)
|
|
104
|
-
}
|
|
101
|
+
};
|
|
105
102
|
const select = createStore(initialState, composite, popover, store);
|
|
106
103
|
setup(
|
|
107
104
|
select,
|
|
@@ -150,13 +147,16 @@ function createSelectStore(_a = {}) {
|
|
|
150
147
|
select.setState("value", item.value);
|
|
151
148
|
})
|
|
152
149
|
);
|
|
153
|
-
return
|
|
150
|
+
return {
|
|
151
|
+
...composite,
|
|
152
|
+
...popover,
|
|
153
|
+
...select,
|
|
154
154
|
combobox,
|
|
155
155
|
setValue: (value) => select.setState("value", value),
|
|
156
156
|
setLabelElement: (element) => select.setState("labelElement", element),
|
|
157
157
|
setSelectElement: (element) => select.setState("selectElement", element),
|
|
158
158
|
setListElement: (element) => select.setState("listElement", element)
|
|
159
|
-
}
|
|
159
|
+
};
|
|
160
160
|
}
|
|
161
161
|
export {
|
|
162
162
|
createSelectStore
|
package/esm/tab/tab-store.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/73UNQSFO.js";
|
|
5
5
|
import "../__chunks/7PRQYBBV.js";
|
|
6
6
|
import {
|
|
7
7
|
createCollectionStore
|
|
8
|
-
} from "../__chunks/
|
|
8
|
+
} from "../__chunks/AMRA5WUK.js";
|
|
9
9
|
import "../__chunks/37JWRFYW.js";
|
|
10
10
|
import {
|
|
11
11
|
batch,
|
|
@@ -14,26 +14,18 @@ import {
|
|
|
14
14
|
omit,
|
|
15
15
|
setup,
|
|
16
16
|
sync
|
|
17
|
-
} from "../__chunks/
|
|
17
|
+
} from "../__chunks/SXKM4CGU.js";
|
|
18
18
|
import {
|
|
19
19
|
chain,
|
|
20
20
|
defaultValue
|
|
21
|
-
} from "../__chunks/
|
|
22
|
-
import {
|
|
23
|
-
__objRest,
|
|
24
|
-
__spreadProps,
|
|
25
|
-
__spreadValues
|
|
26
|
-
} from "../__chunks/3YLGPPWQ.js";
|
|
21
|
+
} from "../__chunks/XMCVU3LR.js";
|
|
27
22
|
|
|
28
23
|
// src/tab/tab-store.ts
|
|
29
|
-
function createTabStore(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"composite",
|
|
35
|
-
"combobox"
|
|
36
|
-
]);
|
|
24
|
+
function createTabStore({
|
|
25
|
+
composite: parentComposite,
|
|
26
|
+
combobox,
|
|
27
|
+
...props
|
|
28
|
+
} = {}) {
|
|
37
29
|
const independentKeys = [
|
|
38
30
|
"items",
|
|
39
31
|
"renderedItems",
|
|
@@ -52,7 +44,8 @@ function createTabStore(_a = {}) {
|
|
|
52
44
|
omit(combobox, independentKeys)
|
|
53
45
|
);
|
|
54
46
|
const syncState = store == null ? void 0 : store.getState();
|
|
55
|
-
const composite = createCompositeStore(
|
|
47
|
+
const composite = createCompositeStore({
|
|
48
|
+
...props,
|
|
56
49
|
store,
|
|
57
50
|
// We need to explicitly set the default value of `includesBaseElement` to
|
|
58
51
|
// `false` since we don't want the composite store to default it to `true`
|
|
@@ -69,9 +62,10 @@ function createTabStore(_a = {}) {
|
|
|
69
62
|
"horizontal"
|
|
70
63
|
),
|
|
71
64
|
focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
|
|
72
|
-
})
|
|
65
|
+
});
|
|
73
66
|
const panels = createCollectionStore();
|
|
74
|
-
const initialState =
|
|
67
|
+
const initialState = {
|
|
68
|
+
...composite.getState(),
|
|
75
69
|
selectedId: defaultValue(
|
|
76
70
|
props.selectedId,
|
|
77
71
|
syncState == null ? void 0 : syncState.selectedId,
|
|
@@ -82,7 +76,7 @@ function createTabStore(_a = {}) {
|
|
|
82
76
|
syncState == null ? void 0 : syncState.selectOnMove,
|
|
83
77
|
true
|
|
84
78
|
)
|
|
85
|
-
}
|
|
79
|
+
};
|
|
86
80
|
const tab = createStore(initialState, composite, store);
|
|
87
81
|
setup(
|
|
88
82
|
tab,
|
|
@@ -138,7 +132,7 @@ function createTabStore(_a = {}) {
|
|
|
138
132
|
if (panel.tabId) return;
|
|
139
133
|
const tabItem = tabs[i];
|
|
140
134
|
if (!tabItem) return;
|
|
141
|
-
panels.renderItem(
|
|
135
|
+
panels.renderItem({ ...panel, tabId: tabItem.id });
|
|
142
136
|
});
|
|
143
137
|
});
|
|
144
138
|
})
|
|
@@ -164,14 +158,16 @@ function createTabStore(_a = {}) {
|
|
|
164
158
|
sync(combobox, ["mounted"], restoreSelectedId)
|
|
165
159
|
);
|
|
166
160
|
});
|
|
167
|
-
return
|
|
161
|
+
return {
|
|
162
|
+
...composite,
|
|
163
|
+
...tab,
|
|
168
164
|
panels,
|
|
169
165
|
setSelectedId: (id) => tab.setState("selectedId", id),
|
|
170
166
|
select: (id) => {
|
|
171
167
|
tab.setState("selectedId", id);
|
|
172
168
|
composite.move(id);
|
|
173
169
|
}
|
|
174
|
-
}
|
|
170
|
+
};
|
|
175
171
|
}
|
|
176
172
|
export {
|
|
177
173
|
createTabStore
|
package/esm/tag/tag-store.js
CHANGED
|
@@ -4,30 +4,27 @@ import {
|
|
|
4
4
|
} from "../__chunks/7LM4Q2XB.js";
|
|
5
5
|
import {
|
|
6
6
|
createCompositeStore
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/73UNQSFO.js";
|
|
8
8
|
import "../__chunks/7PRQYBBV.js";
|
|
9
|
-
import "../__chunks/
|
|
9
|
+
import "../__chunks/AMRA5WUK.js";
|
|
10
10
|
import "../__chunks/37JWRFYW.js";
|
|
11
11
|
import {
|
|
12
12
|
createStore,
|
|
13
13
|
setup,
|
|
14
14
|
sync
|
|
15
|
-
} from "../__chunks/
|
|
15
|
+
} from "../__chunks/SXKM4CGU.js";
|
|
16
16
|
import {
|
|
17
17
|
applyState,
|
|
18
18
|
defaultValue
|
|
19
|
-
} from "../__chunks/
|
|
20
|
-
import {
|
|
21
|
-
__spreadProps,
|
|
22
|
-
__spreadValues
|
|
23
|
-
} from "../__chunks/3YLGPPWQ.js";
|
|
19
|
+
} from "../__chunks/XMCVU3LR.js";
|
|
24
20
|
|
|
25
21
|
// src/tag/tag-store.ts
|
|
26
22
|
function createTagStore(props = {}) {
|
|
27
23
|
var _a;
|
|
28
24
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
29
25
|
const composite = createCompositeStore(props);
|
|
30
|
-
const initialState =
|
|
26
|
+
const initialState = {
|
|
27
|
+
...composite.getState(),
|
|
31
28
|
inputElement: defaultValue(syncState == null ? void 0 : syncState.inputElement, null),
|
|
32
29
|
labelElement: defaultValue(syncState == null ? void 0 : syncState.labelElement, null),
|
|
33
30
|
value: defaultValue(props.value, syncState == null ? void 0 : syncState.value, props.defaultValue, ""),
|
|
@@ -37,7 +34,7 @@ function createTagStore(props = {}) {
|
|
|
37
34
|
props.defaultValues,
|
|
38
35
|
[]
|
|
39
36
|
)
|
|
40
|
-
}
|
|
37
|
+
};
|
|
41
38
|
const tag = createStore(initialState, composite, props.store);
|
|
42
39
|
setup(
|
|
43
40
|
tag,
|
|
@@ -66,7 +63,9 @@ function createTagStore(props = {}) {
|
|
|
66
63
|
};
|
|
67
64
|
});
|
|
68
65
|
};
|
|
69
|
-
return
|
|
66
|
+
return {
|
|
67
|
+
...composite,
|
|
68
|
+
...tag,
|
|
70
69
|
setInputElement: (inputElement) => tag.setState("inputElement", inputElement),
|
|
71
70
|
setLabelElement: (labelElement) => tag.setState("labelElement", labelElement),
|
|
72
71
|
setValue: (value) => tag.setState("value", value),
|
|
@@ -79,7 +78,7 @@ function createTagStore(props = {}) {
|
|
|
79
78
|
});
|
|
80
79
|
},
|
|
81
80
|
removeValue: (value) => setValues((values) => values.filter((v) => v !== value))
|
|
82
|
-
}
|
|
81
|
+
};
|
|
83
82
|
}
|
|
84
83
|
export {
|
|
85
84
|
createTagStore
|
|
@@ -1,31 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/73UNQSFO.js";
|
|
5
5
|
import "../__chunks/7PRQYBBV.js";
|
|
6
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/AMRA5WUK.js";
|
|
7
7
|
import "../__chunks/37JWRFYW.js";
|
|
8
|
-
import "../__chunks/
|
|
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
|
@@ -5,10 +5,6 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
contains
|
|
7
7
|
} from "../__chunks/37JWRFYW.js";
|
|
8
|
-
import {
|
|
9
|
-
__spreadProps,
|
|
10
|
-
__spreadValues
|
|
11
|
-
} from "../__chunks/3YLGPPWQ.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
|
@@ -5,9 +5,6 @@ import {
|
|
|
5
5
|
isFrame,
|
|
6
6
|
isVisible
|
|
7
7
|
} from "../__chunks/37JWRFYW.js";
|
|
8
|
-
import {
|
|
9
|
-
__spreadValues
|
|
10
|
-
} from "../__chunks/3YLGPPWQ.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'])";
|
|
@@ -208,7 +205,7 @@ function focusIntoView(element, options) {
|
|
|
208
205
|
element.focus();
|
|
209
206
|
} else {
|
|
210
207
|
element.focus({ preventScroll: true });
|
|
211
|
-
element.scrollIntoView(
|
|
208
|
+
element.scrollIntoView({ block: "nearest", inline: "nearest", ...options });
|
|
212
209
|
}
|
|
213
210
|
}
|
|
214
211
|
export {
|