@ariakit/core 0.2.7 → 0.2.9
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 +14 -0
- package/cjs/__chunks/{ZXPKRPGY.cjs → DPHJ32KR.cjs} +8 -7
- package/cjs/__chunks/{SXMUYOXB.cjs → F5DMXFQ2.cjs} +30 -31
- package/cjs/__chunks/{5AWPMH4S.cjs → FS2K2N7U.cjs} +72 -25
- package/cjs/__chunks/{NVEPU4WA.cjs → MCCIH6SG.cjs} +4 -4
- package/cjs/__chunks/{PR7FUI5D.cjs → OQIG5VE3.cjs} +16 -16
- package/cjs/__chunks/{K2LZWNNX.cjs → PIEJYPN7.cjs} +2 -2
- package/cjs/__chunks/{RS4LBZRZ.cjs → V7OHZPBO.cjs} +28 -32
- package/cjs/checkbox/checkbox-store.cjs +2 -2
- package/cjs/collection/collection-store.cjs +3 -3
- package/cjs/combobox/combobox-store.cjs +53 -56
- package/cjs/combobox/combobox-store.d.ts +1 -1
- package/cjs/composite/composite-overflow-store.cjs +5 -5
- package/cjs/composite/composite-store.cjs +4 -4
- package/cjs/dialog/dialog-store.cjs +4 -4
- package/cjs/disclosure/disclosure-store.cjs +3 -3
- package/cjs/form/form-store.cjs +4 -4
- package/cjs/hovercard/hovercard-store.cjs +6 -6
- package/cjs/menu/menu-bar-store.cjs +4 -4
- package/cjs/menu/menu-store.cjs +23 -22
- package/cjs/popover/popover-store.cjs +5 -5
- package/cjs/radio/radio-store.cjs +5 -5
- package/cjs/select/select-store.cjs +65 -67
- package/cjs/tab/tab-store.cjs +55 -56
- package/cjs/toolbar/toolbar-store.cjs +4 -4
- package/cjs/tooltip/tooltip-store.cjs +7 -7
- package/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/cjs/utils/events.cjs +5 -11
- package/cjs/utils/events.d.ts +0 -3
- package/cjs/utils/store.cjs +16 -2
- package/cjs/utils/store.d.ts +19 -59
- package/esm/__chunks/{SHUO6V52.js → A7IMXABC.js} +29 -30
- package/esm/__chunks/{XJGRXN57.js → COUCUJML.js} +2 -2
- package/esm/__chunks/{UWW2ZP3K.js → LNMWV6UV.js} +1 -1
- package/esm/__chunks/{FQL4TRMX.js → OGOHEUXI.js} +71 -24
- package/esm/__chunks/{NRXA5QTV.js → ROY5BBHL.js} +15 -15
- package/esm/__chunks/{LM4QG55U.js → SOCHV2LZ.js} +6 -5
- package/esm/__chunks/{L5RO76KW.js → WSKDP2MG.js} +27 -31
- package/esm/checkbox/checkbox-store.js +1 -1
- package/esm/collection/collection-store.js +2 -2
- package/esm/combobox/combobox-store.d.ts +1 -1
- package/esm/combobox/combobox-store.js +50 -53
- package/esm/composite/composite-overflow-store.js +4 -4
- package/esm/composite/composite-store.js +3 -3
- package/esm/dialog/dialog-store.js +3 -3
- package/esm/disclosure/disclosure-store.js +2 -2
- package/esm/form/form-store.js +2 -2
- package/esm/hovercard/hovercard-store.js +5 -5
- package/esm/menu/menu-bar-store.js +3 -3
- package/esm/menu/menu-store.js +20 -19
- package/esm/popover/popover-store.js +4 -4
- package/esm/radio/radio-store.js +3 -3
- package/esm/select/select-store.js +62 -64
- package/esm/tab/tab-store.js +53 -54
- package/esm/toolbar/toolbar-store.js +3 -3
- package/esm/tooltip/tooltip-store.js +5 -5
- package/esm/tsconfig.build.tsbuildinfo +1 -1
- package/esm/utils/events.d.ts +0 -3
- package/esm/utils/events.js +5 -11
- package/esm/utils/store.d.ts +19 -59
- package/esm/utils/store.js +17 -3
- package/package.json +1 -1
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
5
|
-
require('../__chunks/
|
|
3
|
+
var _DPHJ32KRcjs = require('../__chunks/DPHJ32KR.cjs');
|
|
4
|
+
require('../__chunks/PIEJYPN7.cjs');
|
|
5
|
+
require('../__chunks/V7OHZPBO.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('../__chunks/
|
|
8
|
+
var _OQIG5VE3cjs = require('../__chunks/OQIG5VE3.cjs');
|
|
9
|
+
require('../__chunks/F5DMXFQ2.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _FS2K2N7Ucjs = require('../__chunks/FS2K2N7U.cjs');
|
|
14
18
|
|
|
15
19
|
|
|
16
20
|
var _RCYVACJOcjs = require('../__chunks/RCYVACJO.cjs');
|
|
@@ -36,17 +40,18 @@ function createComboboxStore(_a = {}) {
|
|
|
36
40
|
"menu",
|
|
37
41
|
"select"
|
|
38
42
|
]);
|
|
39
|
-
const store =
|
|
43
|
+
const store = _FS2K2N7Ucjs.mergeStore.call(void 0,
|
|
40
44
|
props.store,
|
|
41
|
-
|
|
45
|
+
_FS2K2N7Ucjs.omit.call(void 0, menu, [
|
|
42
46
|
"baseElement",
|
|
43
47
|
"arrowElement",
|
|
44
48
|
"anchorElement",
|
|
45
49
|
"contentElement",
|
|
46
50
|
"popoverElement",
|
|
47
|
-
"disclosureElement"
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
"disclosureElement",
|
|
52
|
+
"anchorElement"
|
|
53
|
+
]),
|
|
54
|
+
_FS2K2N7Ucjs.omit.call(void 0, select, [
|
|
50
55
|
"value",
|
|
51
56
|
"items",
|
|
52
57
|
"renderedItems",
|
|
@@ -56,7 +61,7 @@ function createComboboxStore(_a = {}) {
|
|
|
56
61
|
"contentElement",
|
|
57
62
|
"popoverElement",
|
|
58
63
|
"disclosureElement"
|
|
59
|
-
)
|
|
64
|
+
])
|
|
60
65
|
);
|
|
61
66
|
const syncState = store.getState();
|
|
62
67
|
const activeId = _RCYVACJOcjs.defaultValue.call(void 0,
|
|
@@ -65,7 +70,7 @@ function createComboboxStore(_a = {}) {
|
|
|
65
70
|
props.defaultActiveId,
|
|
66
71
|
null
|
|
67
72
|
);
|
|
68
|
-
const composite =
|
|
73
|
+
const composite = _OQIG5VE3cjs.createCompositeStore.call(void 0, _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, props), {
|
|
69
74
|
store,
|
|
70
75
|
activeId,
|
|
71
76
|
includesBaseElement: _RCYVACJOcjs.defaultValue.call(void 0,
|
|
@@ -86,7 +91,7 @@ function createComboboxStore(_a = {}) {
|
|
|
86
91
|
!isSafariOnMobile
|
|
87
92
|
)
|
|
88
93
|
}));
|
|
89
|
-
const popover =
|
|
94
|
+
const popover = _DPHJ32KRcjs.createPopoverStore.call(void 0, _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, props), {
|
|
90
95
|
store,
|
|
91
96
|
placement: _RCYVACJOcjs.defaultValue.call(void 0,
|
|
92
97
|
props.placement,
|
|
@@ -109,51 +114,43 @@ function createComboboxStore(_a = {}) {
|
|
|
109
114
|
),
|
|
110
115
|
activeValue: syncState.activeValue
|
|
111
116
|
});
|
|
112
|
-
const combobox =
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
["resetValueOnHide", "mounted"]
|
|
123
|
-
)
|
|
117
|
+
const combobox = _FS2K2N7Ucjs.createStore.call(void 0, initialState, composite, popover, store);
|
|
118
|
+
_FS2K2N7Ucjs.setup.call(void 0,
|
|
119
|
+
combobox,
|
|
120
|
+
() => _FS2K2N7Ucjs.sync.call(void 0, combobox, ["resetValueOnHide", "mounted"], (state) => {
|
|
121
|
+
if (!state.resetValueOnHide)
|
|
122
|
+
return;
|
|
123
|
+
if (state.mounted)
|
|
124
|
+
return;
|
|
125
|
+
combobox.setState("value", initialValue);
|
|
126
|
+
})
|
|
124
127
|
);
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
["mounted"]
|
|
134
|
-
)
|
|
128
|
+
_FS2K2N7Ucjs.setup.call(void 0,
|
|
129
|
+
combobox,
|
|
130
|
+
() => _FS2K2N7Ucjs.batch.call(void 0, combobox, ["mounted"], (state) => {
|
|
131
|
+
if (state.mounted)
|
|
132
|
+
return;
|
|
133
|
+
combobox.setState("activeId", activeId);
|
|
134
|
+
combobox.setState("moves", 0);
|
|
135
|
+
})
|
|
135
136
|
);
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
["moves", "activeId"]
|
|
144
|
-
)
|
|
137
|
+
_FS2K2N7Ucjs.setup.call(void 0,
|
|
138
|
+
combobox,
|
|
139
|
+
() => _FS2K2N7Ucjs.sync.call(void 0, combobox, ["moves", "activeId"], (state, prevState) => {
|
|
140
|
+
if (state.moves === prevState.moves) {
|
|
141
|
+
combobox.setState("activeValue", void 0);
|
|
142
|
+
}
|
|
143
|
+
})
|
|
145
144
|
);
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
["moves", "renderedItems"]
|
|
156
|
-
)
|
|
145
|
+
_FS2K2N7Ucjs.setup.call(void 0,
|
|
146
|
+
combobox,
|
|
147
|
+
() => _FS2K2N7Ucjs.batch.call(void 0, combobox, ["moves", "renderedItems"], (state, prev) => {
|
|
148
|
+
if (state.moves === prev.moves)
|
|
149
|
+
return;
|
|
150
|
+
const { activeId: activeId2 } = combobox.getState();
|
|
151
|
+
const activeItem = composite.item(activeId2);
|
|
152
|
+
combobox.setState("activeValue", activeItem == null ? void 0 : activeItem.value);
|
|
153
|
+
})
|
|
157
154
|
);
|
|
158
155
|
return _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, popover), composite), combobox), {
|
|
159
156
|
setValue: (value) => combobox.setState("value", value)
|
|
@@ -23,7 +23,7 @@ export interface ComboboxStoreState extends CompositeStoreState<Item>, PopoverSt
|
|
|
23
23
|
* Live examples:
|
|
24
24
|
* - [ComboboxGroup](https://ariakit.org/examples/combobox-group)
|
|
25
25
|
* - [Combobox with links](https://ariakit.org/examples/combobox-links)
|
|
26
|
-
* - [
|
|
26
|
+
* - [Combobox filtering](https://ariakit.org/examples/combobox-filtering)
|
|
27
27
|
* - [Multi-selectable
|
|
28
28
|
* Combobox](https://ariakit.org/examples/combobox-multiple)
|
|
29
29
|
* - [Textarea with inline
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
3
|
+
var _DPHJ32KRcjs = require('../__chunks/DPHJ32KR.cjs');
|
|
4
|
+
require('../__chunks/PIEJYPN7.cjs');
|
|
5
|
+
require('../__chunks/V7OHZPBO.cjs');
|
|
6
|
+
require('../__chunks/FS2K2N7U.cjs');
|
|
7
7
|
require('../__chunks/RCYVACJO.cjs');
|
|
8
8
|
require('../__chunks/72I2GWXF.cjs');
|
|
9
9
|
|
|
10
10
|
// src/composite/composite-overflow-store.ts
|
|
11
11
|
function createCompositeOverflowStore(props = {}) {
|
|
12
|
-
return
|
|
12
|
+
return _DPHJ32KRcjs.createPopoverStore.call(void 0, props);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
5
|
-
require('../__chunks/
|
|
3
|
+
var _OQIG5VE3cjs = require('../__chunks/OQIG5VE3.cjs');
|
|
4
|
+
require('../__chunks/F5DMXFQ2.cjs');
|
|
5
|
+
require('../__chunks/FS2K2N7U.cjs');
|
|
6
6
|
require('../__chunks/RCYVACJO.cjs');
|
|
7
7
|
require('../__chunks/EXM2AW52.cjs');
|
|
8
8
|
require('../__chunks/GDZQUFNP.cjs');
|
|
9
9
|
require('../__chunks/72I2GWXF.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.createCompositeStore =
|
|
12
|
+
exports.createCompositeStore = _OQIG5VE3cjs.createCompositeStore;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
5
|
-
require('../__chunks/
|
|
3
|
+
var _PIEJYPN7cjs = require('../__chunks/PIEJYPN7.cjs');
|
|
4
|
+
require('../__chunks/V7OHZPBO.cjs');
|
|
5
|
+
require('../__chunks/FS2K2N7U.cjs');
|
|
6
6
|
require('../__chunks/RCYVACJO.cjs');
|
|
7
7
|
require('../__chunks/72I2GWXF.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.createDialogStore =
|
|
10
|
+
exports.createDialogStore = _PIEJYPN7cjs.createDialogStore;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
3
|
+
var _V7OHZPBOcjs = require('../__chunks/V7OHZPBO.cjs');
|
|
4
|
+
require('../__chunks/FS2K2N7U.cjs');
|
|
5
5
|
require('../__chunks/RCYVACJO.cjs');
|
|
6
6
|
require('../__chunks/72I2GWXF.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.createDisclosureStore =
|
|
9
|
+
exports.createDisclosureStore = _V7OHZPBOcjs.createDisclosureStore;
|
package/cjs/form/form-store.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _F5DMXFQ2cjs = require('../__chunks/F5DMXFQ2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _FS2K2N7Ucjs = require('../__chunks/FS2K2N7U.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -108,7 +108,7 @@ function createNames() {
|
|
|
108
108
|
function createFormStore(props = {}) {
|
|
109
109
|
var _a;
|
|
110
110
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
111
|
-
const collection =
|
|
111
|
+
const collection = _F5DMXFQ2cjs.createCollectionStore.call(void 0, props);
|
|
112
112
|
const values = _RCYVACJOcjs.defaultValue.call(void 0,
|
|
113
113
|
props.values,
|
|
114
114
|
syncState == null ? void 0 : syncState.values,
|
|
@@ -137,7 +137,7 @@ function createFormStore(props = {}) {
|
|
|
137
137
|
submitFailed: _RCYVACJOcjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.submitFailed, 0),
|
|
138
138
|
valid: !hasMessages(errors)
|
|
139
139
|
});
|
|
140
|
-
const form =
|
|
140
|
+
const form = _FS2K2N7Ucjs.createStore.call(void 0, initialState, collection, props.store);
|
|
141
141
|
const validateCallbacks = /* @__PURE__ */ new Set();
|
|
142
142
|
const submitCallbacks = /* @__PURE__ */ new Set();
|
|
143
143
|
const validate = async () => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
7
|
-
require('../__chunks/
|
|
3
|
+
var _MCCIH6SGcjs = require('../__chunks/MCCIH6SG.cjs');
|
|
4
|
+
require('../__chunks/DPHJ32KR.cjs');
|
|
5
|
+
require('../__chunks/PIEJYPN7.cjs');
|
|
6
|
+
require('../__chunks/V7OHZPBO.cjs');
|
|
7
|
+
require('../__chunks/FS2K2N7U.cjs');
|
|
8
8
|
require('../__chunks/RCYVACJO.cjs');
|
|
9
9
|
require('../__chunks/72I2GWXF.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.createHovercardStore =
|
|
12
|
+
exports.createHovercardStore = _MCCIH6SGcjs.createHovercardStore;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
5
|
-
require('../__chunks/
|
|
3
|
+
var _OQIG5VE3cjs = require('../__chunks/OQIG5VE3.cjs');
|
|
4
|
+
require('../__chunks/F5DMXFQ2.cjs');
|
|
5
|
+
require('../__chunks/FS2K2N7U.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _RCYVACJOcjs = require('../__chunks/RCYVACJO.cjs');
|
|
@@ -17,7 +17,7 @@ var _72I2GWXFcjs = require('../__chunks/72I2GWXF.cjs');
|
|
|
17
17
|
function createMenuBarStore(props = {}) {
|
|
18
18
|
var _a;
|
|
19
19
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
20
|
-
return
|
|
20
|
+
return _OQIG5VE3cjs.createCompositeStore.call(void 0, _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, props), {
|
|
21
21
|
orientation: _RCYVACJOcjs.defaultValue.call(void 0,
|
|
22
22
|
props.orientation,
|
|
23
23
|
syncState == null ? void 0 : syncState.orientation,
|
package/cjs/menu/menu-store.cjs
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
3
|
+
var _MCCIH6SGcjs = require('../__chunks/MCCIH6SG.cjs');
|
|
4
|
+
require('../__chunks/DPHJ32KR.cjs');
|
|
5
|
+
require('../__chunks/PIEJYPN7.cjs');
|
|
6
|
+
require('../__chunks/V7OHZPBO.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
require('../__chunks/
|
|
9
|
+
var _OQIG5VE3cjs = require('../__chunks/OQIG5VE3.cjs');
|
|
10
|
+
require('../__chunks/F5DMXFQ2.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _FS2K2N7Ucjs = require('../__chunks/FS2K2N7U.cjs');
|
|
15
18
|
|
|
16
19
|
|
|
17
20
|
|
|
@@ -31,18 +34,18 @@ function createMenuStore(_a = {}) {
|
|
|
31
34
|
} = _b, props = _72I2GWXFcjs.__objRest.call(void 0, _b, [
|
|
32
35
|
"combobox"
|
|
33
36
|
]);
|
|
34
|
-
const store =
|
|
37
|
+
const store = _FS2K2N7Ucjs.mergeStore.call(void 0,
|
|
35
38
|
props.store,
|
|
36
|
-
|
|
39
|
+
_FS2K2N7Ucjs.omit.call(void 0, combobox, [
|
|
37
40
|
"arrowElement",
|
|
38
41
|
"anchorElement",
|
|
39
42
|
"contentElement",
|
|
40
43
|
"popoverElement",
|
|
41
44
|
"disclosureElement"
|
|
42
|
-
)
|
|
45
|
+
])
|
|
43
46
|
);
|
|
44
47
|
const syncState = store.getState();
|
|
45
|
-
const composite =
|
|
48
|
+
const composite = _OQIG5VE3cjs.createCompositeStore.call(void 0, _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, props), {
|
|
46
49
|
store,
|
|
47
50
|
orientation: _RCYVACJOcjs.defaultValue.call(void 0,
|
|
48
51
|
props.orientation,
|
|
@@ -50,7 +53,7 @@ function createMenuStore(_a = {}) {
|
|
|
50
53
|
"vertical"
|
|
51
54
|
)
|
|
52
55
|
}));
|
|
53
|
-
const hovercard =
|
|
56
|
+
const hovercard = _MCCIH6SGcjs.createHovercardStore.call(void 0, _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, props), {
|
|
54
57
|
store,
|
|
55
58
|
placement: _RCYVACJOcjs.defaultValue.call(void 0,
|
|
56
59
|
props.placement,
|
|
@@ -68,16 +71,14 @@ function createMenuStore(_a = {}) {
|
|
|
68
71
|
{}
|
|
69
72
|
)
|
|
70
73
|
});
|
|
71
|
-
const menu =
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
["mounted"]
|
|
80
|
-
)
|
|
74
|
+
const menu = _FS2K2N7Ucjs.createStore.call(void 0, initialState, composite, hovercard, store);
|
|
75
|
+
_FS2K2N7Ucjs.setup.call(void 0,
|
|
76
|
+
menu,
|
|
77
|
+
() => _FS2K2N7Ucjs.sync.call(void 0, menu, ["mounted"], (state) => {
|
|
78
|
+
if (state.mounted)
|
|
79
|
+
return;
|
|
80
|
+
menu.setState("activeId", null);
|
|
81
|
+
})
|
|
81
82
|
);
|
|
82
83
|
return _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, composite), hovercard), menu), {
|
|
83
84
|
setInitialFocus: (value) => menu.setState("initialFocus", value),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
3
|
+
var _DPHJ32KRcjs = require('../__chunks/DPHJ32KR.cjs');
|
|
4
|
+
require('../__chunks/PIEJYPN7.cjs');
|
|
5
|
+
require('../__chunks/V7OHZPBO.cjs');
|
|
6
|
+
require('../__chunks/FS2K2N7U.cjs');
|
|
7
7
|
require('../__chunks/RCYVACJO.cjs');
|
|
8
8
|
require('../__chunks/72I2GWXF.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.createPopoverStore =
|
|
11
|
+
exports.createPopoverStore = _DPHJ32KRcjs.createPopoverStore;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
3
|
+
var _OQIG5VE3cjs = require('../__chunks/OQIG5VE3.cjs');
|
|
4
|
+
require('../__chunks/F5DMXFQ2.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _FS2K2N7Ucjs = require('../__chunks/FS2K2N7U.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _RCYVACJOcjs = require('../__chunks/RCYVACJO.cjs');
|
|
@@ -21,7 +21,7 @@ function createRadioStore(_a = {}) {
|
|
|
21
21
|
var props = _72I2GWXFcjs.__objRest.call(void 0, _a, []);
|
|
22
22
|
var _a2;
|
|
23
23
|
const syncState = (_a2 = props.store) == null ? void 0 : _a2.getState();
|
|
24
|
-
const composite =
|
|
24
|
+
const composite = _OQIG5VE3cjs.createCompositeStore.call(void 0, _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, props), {
|
|
25
25
|
focusLoop: _RCYVACJOcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
|
|
26
26
|
}));
|
|
27
27
|
const initialState = _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, composite.getState()), {
|
|
@@ -32,7 +32,7 @@ function createRadioStore(_a = {}) {
|
|
|
32
32
|
null
|
|
33
33
|
)
|
|
34
34
|
});
|
|
35
|
-
const radio =
|
|
35
|
+
const radio = _FS2K2N7Ucjs.createStore.call(void 0, initialState, composite, props.store);
|
|
36
36
|
return _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, composite), radio), {
|
|
37
37
|
setValue: (value) => radio.setState("value", value)
|
|
38
38
|
});
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../__chunks/
|
|
5
|
-
require('../__chunks/
|
|
3
|
+
var _DPHJ32KRcjs = require('../__chunks/DPHJ32KR.cjs');
|
|
4
|
+
require('../__chunks/PIEJYPN7.cjs');
|
|
5
|
+
require('../__chunks/V7OHZPBO.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('../__chunks/
|
|
8
|
+
var _OQIG5VE3cjs = require('../__chunks/OQIG5VE3.cjs');
|
|
9
|
+
require('../__chunks/F5DMXFQ2.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _FS2K2N7Ucjs = require('../__chunks/FS2K2N7U.cjs');
|
|
14
18
|
|
|
15
19
|
|
|
16
20
|
var _RCYVACJOcjs = require('../__chunks/RCYVACJO.cjs');
|
|
@@ -31,9 +35,9 @@ function createSelectStore(_a = {}) {
|
|
|
31
35
|
} = _b, props = _72I2GWXFcjs.__objRest.call(void 0, _b, [
|
|
32
36
|
"combobox"
|
|
33
37
|
]);
|
|
34
|
-
const store =
|
|
38
|
+
const store = _FS2K2N7Ucjs.mergeStore.call(void 0,
|
|
35
39
|
props.store,
|
|
36
|
-
|
|
40
|
+
_FS2K2N7Ucjs.omit.call(void 0, combobox, [
|
|
37
41
|
"value",
|
|
38
42
|
"items",
|
|
39
43
|
"renderedItems",
|
|
@@ -43,10 +47,10 @@ function createSelectStore(_a = {}) {
|
|
|
43
47
|
"contentElement",
|
|
44
48
|
"popoverElement",
|
|
45
49
|
"disclosureElement"
|
|
46
|
-
)
|
|
50
|
+
])
|
|
47
51
|
);
|
|
48
52
|
const syncState = store.getState();
|
|
49
|
-
const composite =
|
|
53
|
+
const composite = _OQIG5VE3cjs.createCompositeStore.call(void 0, _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, props), {
|
|
50
54
|
store,
|
|
51
55
|
virtualFocus: _RCYVACJOcjs.defaultValue.call(void 0,
|
|
52
56
|
props.virtualFocus,
|
|
@@ -70,7 +74,7 @@ function createSelectStore(_a = {}) {
|
|
|
70
74
|
"vertical"
|
|
71
75
|
)
|
|
72
76
|
}));
|
|
73
|
-
const popover =
|
|
77
|
+
const popover = _DPHJ32KRcjs.createPopoverStore.call(void 0, _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, props), {
|
|
74
78
|
store,
|
|
75
79
|
placement: _RCYVACJOcjs.defaultValue.call(void 0,
|
|
76
80
|
props.placement,
|
|
@@ -95,64 +99,58 @@ function createSelectStore(_a = {}) {
|
|
|
95
99
|
selectElement: _RCYVACJOcjs.defaultValue.call(void 0, syncState.selectElement, null),
|
|
96
100
|
labelElement: _RCYVACJOcjs.defaultValue.call(void 0, syncState.labelElement, null)
|
|
97
101
|
});
|
|
98
|
-
const select =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
["value", "items"]
|
|
114
|
-
)
|
|
102
|
+
const select = _FS2K2N7Ucjs.createStore.call(void 0, initialState, composite, popover, store);
|
|
103
|
+
_FS2K2N7Ucjs.setup.call(void 0,
|
|
104
|
+
select,
|
|
105
|
+
() => _FS2K2N7Ucjs.sync.call(void 0, select, ["value", "items"], (state) => {
|
|
106
|
+
if (state.value !== initialValue)
|
|
107
|
+
return;
|
|
108
|
+
if (!state.items.length)
|
|
109
|
+
return;
|
|
110
|
+
const item = state.items.find(
|
|
111
|
+
(item2) => !item2.disabled && item2.value != null
|
|
112
|
+
);
|
|
113
|
+
if ((item == null ? void 0 : item.value) == null)
|
|
114
|
+
return;
|
|
115
|
+
select.setState("value", item.value);
|
|
116
|
+
})
|
|
115
117
|
);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
["mounted", "items", "value"]
|
|
135
|
-
)
|
|
118
|
+
_FS2K2N7Ucjs.setup.call(void 0,
|
|
119
|
+
select,
|
|
120
|
+
() => _FS2K2N7Ucjs.sync.call(void 0, select, ["mounted", "items", "value"], (state) => {
|
|
121
|
+
if (combobox)
|
|
122
|
+
return;
|
|
123
|
+
if (state.mounted)
|
|
124
|
+
return;
|
|
125
|
+
const values = _GDZQUFNPcjs.toArray.call(void 0, state.value);
|
|
126
|
+
const lastValue = values[values.length - 1];
|
|
127
|
+
if (lastValue == null)
|
|
128
|
+
return;
|
|
129
|
+
const item = state.items.find(
|
|
130
|
+
(item2) => !item2.disabled && item2.value === lastValue
|
|
131
|
+
);
|
|
132
|
+
if (!item)
|
|
133
|
+
return;
|
|
134
|
+
select.setState("activeId", item.id);
|
|
135
|
+
})
|
|
136
136
|
);
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
["setValueOnMove", "moves"]
|
|
155
|
-
)
|
|
137
|
+
_FS2K2N7Ucjs.setup.call(void 0,
|
|
138
|
+
select,
|
|
139
|
+
() => _FS2K2N7Ucjs.batch.call(void 0, select, ["setValueOnMove", "moves"], (state) => {
|
|
140
|
+
const { mounted, value, activeId } = select.getState();
|
|
141
|
+
if (!state.setValueOnMove && mounted)
|
|
142
|
+
return;
|
|
143
|
+
if (Array.isArray(value))
|
|
144
|
+
return;
|
|
145
|
+
if (!state.moves)
|
|
146
|
+
return;
|
|
147
|
+
if (!activeId)
|
|
148
|
+
return;
|
|
149
|
+
const item = composite.item(activeId);
|
|
150
|
+
if (!item || item.disabled || item.value == null)
|
|
151
|
+
return;
|
|
152
|
+
select.setState("value", item.value);
|
|
153
|
+
})
|
|
156
154
|
);
|
|
157
155
|
return _72I2GWXFcjs.__spreadProps.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, _72I2GWXFcjs.__spreadValues.call(void 0, {}, composite), popover), select), {
|
|
158
156
|
setValue: (value) => select.setState("value", value),
|