@ariakit/core 0.4.5 → 0.4.7
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 +12 -0
- package/cjs/__chunks/{QD2A4YF6.cjs → 3COGJMN3.cjs} +11 -11
- package/cjs/__chunks/{MHZQJPY3.cjs → 5BQ2XS3R.cjs} +4 -4
- package/cjs/__chunks/{2D5LEVE7.cjs → D7M2PCAQ.cjs} +6 -6
- package/cjs/__chunks/{LTLFSC4X.cjs → DIYYVJDK.cjs} +2 -2
- package/cjs/__chunks/{AETQC2AR.cjs → LAYUSNGM.cjs} +11 -11
- package/cjs/__chunks/{KL74MAHB.cjs → LBFF2BBK.cjs} +6 -6
- package/cjs/__chunks/{B4LYZ4EM.cjs → M2NNCFIJ.cjs} +13 -11
- package/cjs/__chunks/{5JEQEZFR.cjs → MB5TLEVH.cjs} +7 -7
- package/cjs/__chunks/{IMYW2UAC.cjs → Q2WCPTYS.cjs} +4 -22
- package/cjs/__chunks/{UEZLSKZ4.cjs → XVL5HZ27.cjs} +4 -4
- package/cjs/checkbox/checkbox-store.cjs +3 -3
- package/cjs/checkbox/checkbox-store.d.cts +2 -2
- package/cjs/checkbox/checkbox-store.d.ts +2 -2
- package/cjs/collection/collection-store.cjs +4 -4
- package/cjs/collection/collection-store.d.cts +2 -2
- package/cjs/collection/collection-store.d.ts +2 -2
- package/cjs/combobox/combobox-store.cjs +35 -26
- package/cjs/combobox/combobox-store.d.cts +7 -5
- package/cjs/combobox/combobox-store.d.ts +7 -5
- package/cjs/composite/composite-overflow-store.cjs +5 -5
- package/cjs/composite/composite-overflow-store.d.cts +2 -2
- package/cjs/composite/composite-overflow-store.d.ts +2 -2
- package/cjs/composite/composite-store.cjs +5 -5
- package/cjs/composite/composite-store.d.cts +8 -4
- package/cjs/composite/composite-store.d.ts +8 -4
- package/cjs/dialog/dialog-store.cjs +4 -4
- package/cjs/dialog/dialog-store.d.cts +2 -2
- package/cjs/dialog/dialog-store.d.ts +2 -2
- package/cjs/disclosure/disclosure-store.cjs +3 -3
- package/cjs/disclosure/disclosure-store.d.cts +2 -2
- package/cjs/disclosure/disclosure-store.d.ts +2 -2
- package/cjs/form/form-store.cjs +8 -8
- package/cjs/form/form-store.d.cts +4 -4
- package/cjs/form/form-store.d.ts +4 -4
- package/cjs/form/types.d.cts +3 -3
- package/cjs/form/types.d.ts +3 -3
- package/cjs/hovercard/hovercard-store.cjs +6 -6
- package/cjs/hovercard/hovercard-store.d.cts +3 -3
- package/cjs/hovercard/hovercard-store.d.ts +3 -3
- package/cjs/menu/menu-bar-store.cjs +6 -6
- package/cjs/menu/menu-bar-store.d.cts +2 -2
- package/cjs/menu/menu-bar-store.d.ts +2 -2
- package/cjs/menu/menu-store.cjs +19 -19
- package/cjs/menu/menu-store.d.cts +6 -6
- package/cjs/menu/menu-store.d.ts +6 -6
- package/cjs/menubar/menubar-store.cjs +6 -6
- package/cjs/menubar/menubar-store.d.cts +2 -2
- package/cjs/menubar/menubar-store.d.ts +2 -2
- package/cjs/popover/popover-store.cjs +5 -5
- package/cjs/popover/popover-store.d.cts +3 -3
- package/cjs/popover/popover-store.d.ts +3 -3
- package/cjs/radio/radio-store.cjs +6 -6
- package/cjs/radio/radio-store.d.cts +3 -3
- package/cjs/radio/radio-store.d.ts +3 -3
- package/cjs/select/select-store.cjs +31 -21
- package/cjs/select/select-store.d.cts +19 -9
- package/cjs/select/select-store.d.ts +19 -9
- package/cjs/tab/tab-store.cjs +58 -25
- package/cjs/tab/tab-store.d.cts +17 -10
- package/cjs/tab/tab-store.d.ts +17 -10
- package/cjs/tag/tag-store.cjs +8 -8
- package/cjs/tag/tag-store.d.cts +3 -3
- package/cjs/tag/tag-store.d.ts +3 -3
- package/cjs/toolbar/toolbar-store.cjs +5 -5
- package/cjs/toolbar/toolbar-store.d.cts +2 -2
- package/cjs/toolbar/toolbar-store.d.ts +2 -2
- package/cjs/tooltip/tooltip-store.cjs +7 -7
- package/cjs/tooltip/tooltip-store.d.cts +2 -2
- package/cjs/tooltip/tooltip-store.d.ts +2 -2
- package/cjs/utils/dom.cjs +2 -6
- package/cjs/utils/dom.d.cts +1 -17
- package/cjs/utils/dom.d.ts +1 -17
- package/cjs/utils/events.cjs +23 -16
- package/cjs/utils/events.d.cts +1 -1
- package/cjs/utils/events.d.ts +1 -1
- package/cjs/utils/focus.cjs +20 -18
- package/cjs/utils/focus.d.cts +1 -1
- package/cjs/utils/focus.d.ts +1 -1
- package/cjs/utils/misc.d.cts +1 -1
- package/cjs/utils/misc.d.ts +1 -1
- package/cjs/utils/platform.cjs +3 -3
- package/cjs/utils/store.cjs +2 -2
- package/cjs/utils/store.d.cts +3 -3
- package/cjs/utils/store.d.ts +3 -3
- package/esm/__chunks/{QAI5BPCY.js → CLSHHUGK.js} +1 -1
- package/esm/__chunks/{BRS7GKWU.js → E4HA32QI.js} +2 -2
- package/esm/__chunks/{IUORCTET.js → I2NJJ3XW.js} +3 -21
- package/esm/__chunks/{ABMC67JW.js → I2WJ7JBQ.js} +2 -2
- package/esm/__chunks/{WCKXDMU7.js → KDSZSVV5.js} +1 -1
- package/esm/__chunks/{R676XYVY.js → KLPDXTDE.js} +13 -11
- package/esm/__chunks/{5RJNXXU2.js → NWACXGIN.js} +1 -1
- package/esm/__chunks/{K7A7LTR3.js → RCLYDUHE.js} +2 -2
- package/esm/__chunks/{MFZZDIHG.js → SAZZJI72.js} +2 -2
- package/esm/__chunks/{YVUNPQHS.js → VH2P7HEP.js} +2 -2
- package/esm/checkbox/checkbox-store.d.ts +2 -2
- package/esm/checkbox/checkbox-store.js +1 -1
- package/esm/collection/collection-store.d.ts +2 -2
- package/esm/collection/collection-store.js +3 -3
- package/esm/combobox/combobox-store.d.ts +7 -5
- package/esm/combobox/combobox-store.js +20 -11
- package/esm/composite/composite-overflow-store.d.ts +2 -2
- package/esm/composite/composite-overflow-store.js +4 -4
- package/esm/composite/composite-store.d.ts +8 -4
- package/esm/composite/composite-store.js +4 -4
- package/esm/dialog/dialog-store.d.ts +2 -2
- package/esm/dialog/dialog-store.js +3 -3
- package/esm/disclosure/disclosure-store.d.ts +2 -2
- package/esm/disclosure/disclosure-store.js +2 -2
- package/esm/form/form-store.d.ts +4 -4
- package/esm/form/form-store.js +3 -3
- package/esm/form/types.d.ts +3 -3
- package/esm/hovercard/hovercard-store.d.ts +3 -3
- package/esm/hovercard/hovercard-store.js +5 -5
- package/esm/menu/menu-bar-store.d.ts +2 -2
- package/esm/menu/menu-bar-store.js +5 -5
- package/esm/menu/menu-store.d.ts +6 -6
- package/esm/menu/menu-store.js +8 -8
- package/esm/menubar/menubar-store.d.ts +2 -2
- package/esm/menubar/menubar-store.js +5 -5
- package/esm/popover/popover-store.d.ts +3 -3
- package/esm/popover/popover-store.js +4 -4
- package/esm/radio/radio-store.d.ts +3 -3
- package/esm/radio/radio-store.js +4 -4
- package/esm/select/select-store.d.ts +19 -9
- package/esm/select/select-store.js +19 -9
- package/esm/tab/tab-store.d.ts +17 -10
- package/esm/tab/tab-store.js +44 -11
- package/esm/tag/tag-store.d.ts +3 -3
- package/esm/tag/tag-store.js +4 -4
- package/esm/toolbar/toolbar-store.d.ts +2 -2
- package/esm/toolbar/toolbar-store.js +4 -4
- package/esm/tooltip/tooltip-store.d.ts +2 -2
- package/esm/tooltip/tooltip-store.js +5 -5
- package/esm/utils/dom.d.ts +1 -17
- package/esm/utils/dom.js +1 -5
- package/esm/utils/events.d.ts +1 -1
- package/esm/utils/events.js +20 -13
- package/esm/utils/focus.d.ts +1 -1
- package/esm/utils/focus.js +12 -10
- package/esm/utils/misc.d.ts +1 -1
- package/esm/utils/platform.js +2 -2
- package/esm/utils/store.d.ts +3 -3
- package/esm/utils/store.js +1 -1
- package/package.json +2 -2
- package/.eslintignore +0 -6
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../__chunks/
|
|
4
|
+
var _LBFF2BBKcjs = require('../__chunks/LBFF2BBK.cjs');
|
|
5
|
+
require('../__chunks/3COGJMN3.cjs');
|
|
6
6
|
require('../__chunks/ULSPM3Y3.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
require('../__chunks/
|
|
11
|
-
require('../__chunks/
|
|
9
|
+
var _MB5TLEVHcjs = require('../__chunks/MB5TLEVH.cjs');
|
|
10
|
+
require('../__chunks/DIYYVJDK.cjs');
|
|
11
|
+
require('../__chunks/LAYUSNGM.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -17,15 +17,16 @@ require('../__chunks/AETQC2AR.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _M2NNCFIJcjs = require('../__chunks/M2NNCFIJ.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
require('../__chunks/
|
|
27
|
+
|
|
28
|
+
var _D7M2PCAQcjs = require('../__chunks/D7M2PCAQ.cjs');
|
|
29
|
+
require('../__chunks/Q2WCPTYS.cjs');
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
|
|
@@ -33,15 +34,15 @@ require('../__chunks/IMYW2UAC.cjs');
|
|
|
33
34
|
var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
|
|
34
35
|
|
|
35
36
|
// src/combobox/combobox-store.ts
|
|
36
|
-
var
|
|
37
|
+
var isTouchSafari = _D7M2PCAQcjs.isSafari.call(void 0, ) && _D7M2PCAQcjs.isTouchDevice.call(void 0, );
|
|
37
38
|
function createComboboxStore(_a = {}) {
|
|
38
39
|
var _b = _a, {
|
|
39
40
|
tag
|
|
40
41
|
} = _b, props = _AV6KTKLEcjs.__objRest.call(void 0, _b, [
|
|
41
42
|
"tag"
|
|
42
43
|
]);
|
|
43
|
-
const store =
|
|
44
|
-
|
|
44
|
+
const store = _M2NNCFIJcjs.mergeStore.call(void 0, props.store, _M2NNCFIJcjs.pick.call(void 0, tag, ["value", "rtl"]));
|
|
45
|
+
_M2NNCFIJcjs.throwOnConflictingProps.call(void 0, props, store);
|
|
45
46
|
const tagState = tag == null ? void 0 : tag.getState();
|
|
46
47
|
const syncState = store == null ? void 0 : store.getState();
|
|
47
48
|
const activeId = _EEDWPDM2cjs.defaultValue.call(void 0,
|
|
@@ -50,7 +51,7 @@ function createComboboxStore(_a = {}) {
|
|
|
50
51
|
props.defaultActiveId,
|
|
51
52
|
null
|
|
52
53
|
);
|
|
53
|
-
const composite =
|
|
54
|
+
const composite = _LBFF2BBKcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
|
|
54
55
|
activeId,
|
|
55
56
|
includesBaseElement: _EEDWPDM2cjs.defaultValue.call(void 0,
|
|
56
57
|
props.includesBaseElement,
|
|
@@ -67,10 +68,10 @@ function createComboboxStore(_a = {}) {
|
|
|
67
68
|
virtualFocus: _EEDWPDM2cjs.defaultValue.call(void 0,
|
|
68
69
|
props.virtualFocus,
|
|
69
70
|
syncState == null ? void 0 : syncState.virtualFocus,
|
|
70
|
-
|
|
71
|
+
true
|
|
71
72
|
)
|
|
72
73
|
}));
|
|
73
|
-
const popover =
|
|
74
|
+
const popover = _MB5TLEVHcjs.createPopoverStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
|
|
74
75
|
placement: _EEDWPDM2cjs.defaultValue.call(void 0,
|
|
75
76
|
props.placement,
|
|
76
77
|
syncState == null ? void 0 : syncState.placement,
|
|
@@ -106,24 +107,32 @@ function createComboboxStore(_a = {}) {
|
|
|
106
107
|
),
|
|
107
108
|
activeValue: syncState == null ? void 0 : syncState.activeValue
|
|
108
109
|
});
|
|
109
|
-
const combobox =
|
|
110
|
-
|
|
110
|
+
const combobox = _M2NNCFIJcjs.createStore.call(void 0, initialState, composite, popover, store);
|
|
111
|
+
if (isTouchSafari) {
|
|
112
|
+
_M2NNCFIJcjs.setup.call(void 0,
|
|
113
|
+
combobox,
|
|
114
|
+
() => _M2NNCFIJcjs.sync.call(void 0, combobox, ["virtualFocus"], () => {
|
|
115
|
+
combobox.setState("virtualFocus", false);
|
|
116
|
+
})
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
_M2NNCFIJcjs.setup.call(void 0, combobox, () => {
|
|
111
120
|
if (!tag)
|
|
112
121
|
return;
|
|
113
122
|
return _EEDWPDM2cjs.chain.call(void 0,
|
|
114
|
-
|
|
123
|
+
_M2NNCFIJcjs.sync.call(void 0, combobox, ["selectedValue"], (state) => {
|
|
115
124
|
if (!Array.isArray(state.selectedValue))
|
|
116
125
|
return;
|
|
117
126
|
tag.setValues(state.selectedValue);
|
|
118
127
|
}),
|
|
119
|
-
|
|
128
|
+
_M2NNCFIJcjs.sync.call(void 0, tag, ["values"], (state) => {
|
|
120
129
|
combobox.setState("selectedValue", state.values);
|
|
121
130
|
})
|
|
122
131
|
);
|
|
123
132
|
});
|
|
124
|
-
|
|
133
|
+
_M2NNCFIJcjs.setup.call(void 0,
|
|
125
134
|
combobox,
|
|
126
|
-
() =>
|
|
135
|
+
() => _M2NNCFIJcjs.sync.call(void 0, combobox, ["resetValueOnHide", "mounted"], (state) => {
|
|
127
136
|
if (!state.resetValueOnHide)
|
|
128
137
|
return;
|
|
129
138
|
if (state.mounted)
|
|
@@ -131,26 +140,26 @@ function createComboboxStore(_a = {}) {
|
|
|
131
140
|
combobox.setState("value", value);
|
|
132
141
|
})
|
|
133
142
|
);
|
|
134
|
-
|
|
143
|
+
_M2NNCFIJcjs.setup.call(void 0,
|
|
135
144
|
combobox,
|
|
136
|
-
() =>
|
|
145
|
+
() => _M2NNCFIJcjs.batch.call(void 0, combobox, ["mounted"], (state) => {
|
|
137
146
|
if (state.mounted)
|
|
138
147
|
return;
|
|
139
148
|
combobox.setState("activeId", activeId);
|
|
140
149
|
combobox.setState("moves", 0);
|
|
141
150
|
})
|
|
142
151
|
);
|
|
143
|
-
|
|
152
|
+
_M2NNCFIJcjs.setup.call(void 0,
|
|
144
153
|
combobox,
|
|
145
|
-
() =>
|
|
154
|
+
() => _M2NNCFIJcjs.sync.call(void 0, combobox, ["moves", "activeId"], (state, prevState) => {
|
|
146
155
|
if (state.moves === prevState.moves) {
|
|
147
156
|
combobox.setState("activeValue", void 0);
|
|
148
157
|
}
|
|
149
158
|
})
|
|
150
159
|
);
|
|
151
|
-
|
|
160
|
+
_M2NNCFIJcjs.setup.call(void 0,
|
|
152
161
|
combobox,
|
|
153
|
-
() =>
|
|
162
|
+
() => _M2NNCFIJcjs.batch.call(void 0, combobox, ["moves", "renderedItems"], (state, prev) => {
|
|
154
163
|
if (state.moves === prev.moves)
|
|
155
164
|
return;
|
|
156
165
|
const { activeId: activeId2 } = combobox.getState();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { CompositeStoreFunctions, CompositeStoreItem, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.
|
|
2
|
-
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.
|
|
3
|
-
import type { TagStore } from "../tag/tag-store.
|
|
4
|
-
import type { Store, StoreOptions, StoreProps } from "../utils/store.
|
|
5
|
-
import type { PickRequired, SetState } from "../utils/types.
|
|
1
|
+
import type { CompositeStoreFunctions, CompositeStoreItem, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.ts";
|
|
2
|
+
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
|
|
3
|
+
import type { TagStore } from "../tag/tag-store.ts";
|
|
4
|
+
import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
|
|
5
|
+
import type { PickRequired, SetState } from "../utils/types.ts";
|
|
6
6
|
type MutableValue<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> = T extends string ? string : T;
|
|
7
7
|
/**
|
|
8
8
|
* Creates a combobox store.
|
|
@@ -71,6 +71,8 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
|
|
|
71
71
|
* - [Submenu with
|
|
72
72
|
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
73
73
|
* - [Command Menu](https://ariakit.org/examples/dialog-combobox-command-menu)
|
|
74
|
+
* - [Select with Combobox and
|
|
75
|
+
* Tabs](https://ariakit.org/examples/select-combobox-tab)
|
|
74
76
|
*/
|
|
75
77
|
resetValueOnHide: boolean;
|
|
76
78
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { CompositeStoreFunctions, CompositeStoreItem, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.
|
|
2
|
-
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.
|
|
3
|
-
import type { TagStore } from "../tag/tag-store.
|
|
4
|
-
import type { Store, StoreOptions, StoreProps } from "../utils/store.
|
|
5
|
-
import type { PickRequired, SetState } from "../utils/types.
|
|
1
|
+
import type { CompositeStoreFunctions, CompositeStoreItem, CompositeStoreOptions, CompositeStoreState } from "../composite/composite-store.ts";
|
|
2
|
+
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
|
|
3
|
+
import type { TagStore } from "../tag/tag-store.ts";
|
|
4
|
+
import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
|
|
5
|
+
import type { PickRequired, SetState } from "../utils/types.ts";
|
|
6
6
|
type MutableValue<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> = T extends string ? string : T;
|
|
7
7
|
/**
|
|
8
8
|
* Creates a combobox store.
|
|
@@ -71,6 +71,8 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
|
|
|
71
71
|
* - [Submenu with
|
|
72
72
|
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
73
73
|
* - [Command Menu](https://ariakit.org/examples/dialog-combobox-command-menu)
|
|
74
|
+
* - [Select with Combobox and
|
|
75
|
+
* Tabs](https://ariakit.org/examples/select-combobox-tab)
|
|
74
76
|
*/
|
|
75
77
|
resetValueOnHide: boolean;
|
|
76
78
|
/**
|
|
@@ -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 _MB5TLEVHcjs = require('../__chunks/MB5TLEVH.cjs');
|
|
5
|
+
require('../__chunks/DIYYVJDK.cjs');
|
|
6
|
+
require('../__chunks/LAYUSNGM.cjs');
|
|
7
|
+
require('../__chunks/M2NNCFIJ.cjs');
|
|
8
8
|
require('../__chunks/EEDWPDM2.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 _MB5TLEVHcjs.createPopoverStore.call(void 0, props);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.
|
|
2
|
-
import type { Store, StoreProps } from "../utils/store.
|
|
1
|
+
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
|
|
2
|
+
import type { Store, StoreProps } from "../utils/store.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a compositeOverflow store.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.
|
|
2
|
-
import type { Store, StoreProps } from "../utils/store.
|
|
1
|
+
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
|
|
2
|
+
import type { Store, StoreProps } from "../utils/store.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a compositeOverflow store.
|
|
5
5
|
*/
|
|
@@ -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/
|
|
4
|
+
var _LBFF2BBKcjs = require('../__chunks/LBFF2BBK.cjs');
|
|
5
|
+
require('../__chunks/3COGJMN3.cjs');
|
|
6
6
|
require('../__chunks/ULSPM3Y3.cjs');
|
|
7
|
-
require('../__chunks/
|
|
7
|
+
require('../__chunks/M2NNCFIJ.cjs');
|
|
8
8
|
require('../__chunks/EEDWPDM2.cjs');
|
|
9
|
-
require('../__chunks/
|
|
9
|
+
require('../__chunks/Q2WCPTYS.cjs');
|
|
10
10
|
require('../__chunks/AV6KTKLE.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.createCompositeStore =
|
|
13
|
+
exports.createCompositeStore = _LBFF2BBKcjs.createCompositeStore;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.
|
|
2
|
-
import type { Store, StoreOptions, StoreProps } from "../utils/store.
|
|
3
|
-
import type { SetState } from "../utils/types.
|
|
1
|
+
import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.ts";
|
|
2
|
+
import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
|
|
3
|
+
import type { SetState } from "../utils/types.ts";
|
|
4
4
|
type Orientation = "horizontal" | "vertical" | "both";
|
|
5
5
|
/**
|
|
6
6
|
* Creates a composite store.
|
|
@@ -44,6 +44,10 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
44
44
|
* In both scenarios, the item in focus will carry the
|
|
45
45
|
* [`data-active-item`](https://ariakit.org/guide/styling#data-active-item)
|
|
46
46
|
* attribute.
|
|
47
|
+
*
|
|
48
|
+
* Live examples:
|
|
49
|
+
* - [Select with Combobox and
|
|
50
|
+
* Tabs](https://ariakit.org/examples/select-combobox-tab)
|
|
47
51
|
* @default false
|
|
48
52
|
*/
|
|
49
53
|
virtualFocus: boolean;
|
|
@@ -178,7 +182,7 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
178
182
|
* arrow keys.
|
|
179
183
|
*
|
|
180
184
|
* Live examples:
|
|
181
|
-
* - [Combobox with
|
|
185
|
+
* - [Combobox with Tabs](https://ariakit.org/examples/combobox-tabs)
|
|
182
186
|
*/
|
|
183
187
|
activeId: string | null | undefined;
|
|
184
188
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.
|
|
2
|
-
import type { Store, StoreOptions, StoreProps } from "../utils/store.
|
|
3
|
-
import type { SetState } from "../utils/types.
|
|
1
|
+
import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.ts";
|
|
2
|
+
import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
|
|
3
|
+
import type { SetState } from "../utils/types.ts";
|
|
4
4
|
type Orientation = "horizontal" | "vertical" | "both";
|
|
5
5
|
/**
|
|
6
6
|
* Creates a composite store.
|
|
@@ -44,6 +44,10 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
44
44
|
* In both scenarios, the item in focus will carry the
|
|
45
45
|
* [`data-active-item`](https://ariakit.org/guide/styling#data-active-item)
|
|
46
46
|
* attribute.
|
|
47
|
+
*
|
|
48
|
+
* Live examples:
|
|
49
|
+
* - [Select with Combobox and
|
|
50
|
+
* Tabs](https://ariakit.org/examples/select-combobox-tab)
|
|
47
51
|
* @default false
|
|
48
52
|
*/
|
|
49
53
|
virtualFocus: boolean;
|
|
@@ -178,7 +182,7 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
178
182
|
* arrow keys.
|
|
179
183
|
*
|
|
180
184
|
* Live examples:
|
|
181
|
-
* - [Combobox with
|
|
185
|
+
* - [Combobox with Tabs](https://ariakit.org/examples/combobox-tabs)
|
|
182
186
|
*/
|
|
183
187
|
activeId: string | null | undefined;
|
|
184
188
|
}
|
|
@@ -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 _DIYYVJDKcjs = require('../__chunks/DIYYVJDK.cjs');
|
|
5
|
+
require('../__chunks/LAYUSNGM.cjs');
|
|
6
|
+
require('../__chunks/M2NNCFIJ.cjs');
|
|
7
7
|
require('../__chunks/EEDWPDM2.cjs');
|
|
8
8
|
require('../__chunks/AV6KTKLE.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.createDialogStore =
|
|
11
|
+
exports.createDialogStore = _DIYYVJDKcjs.createDialogStore;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreState } from "../disclosure/disclosure-store.
|
|
2
|
-
import type { Store, StoreProps } from "../utils/store.
|
|
1
|
+
import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreState } from "../disclosure/disclosure-store.ts";
|
|
2
|
+
import type { Store, StoreProps } from "../utils/store.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a dialog store.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreState } from "../disclosure/disclosure-store.
|
|
2
|
-
import type { Store, StoreProps } from "../utils/store.
|
|
1
|
+
import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreState } from "../disclosure/disclosure-store.ts";
|
|
2
|
+
import type { Store, StoreProps } from "../utils/store.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a dialog store.
|
|
5
5
|
*/
|
|
@@ -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 _LAYUSNGMcjs = require('../__chunks/LAYUSNGM.cjs');
|
|
5
|
+
require('../__chunks/M2NNCFIJ.cjs');
|
|
6
6
|
require('../__chunks/EEDWPDM2.cjs');
|
|
7
7
|
require('../__chunks/AV6KTKLE.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.createDisclosureStore =
|
|
10
|
+
exports.createDisclosureStore = _LAYUSNGMcjs.createDisclosureStore;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Store, StoreOptions, StoreProps } from "../utils/store.
|
|
2
|
-
import type { SetState } from "../utils/types.
|
|
1
|
+
import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
|
|
2
|
+
import type { SetState } from "../utils/types.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a disclosure store.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Store, StoreOptions, StoreProps } from "../utils/store.
|
|
2
|
-
import type { SetState } from "../utils/types.
|
|
1
|
+
import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
|
|
2
|
+
import type { SetState } from "../utils/types.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a disclosure store.
|
|
5
5
|
*/
|
package/cjs/form/form-store.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _3COGJMN3cjs = require('../__chunks/3COGJMN3.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _M2NNCFIJcjs = require('../__chunks/M2NNCFIJ.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
var _EEDWPDM2cjs = require('../__chunks/EEDWPDM2.cjs');
|
|
17
|
-
require('../__chunks/
|
|
17
|
+
require('../__chunks/Q2WCPTYS.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -114,9 +114,9 @@ function createNames() {
|
|
|
114
114
|
}
|
|
115
115
|
function createFormStore(props = {}) {
|
|
116
116
|
var _a;
|
|
117
|
-
|
|
117
|
+
_M2NNCFIJcjs.throwOnConflictingProps.call(void 0, props, props.store);
|
|
118
118
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
119
|
-
const collection =
|
|
119
|
+
const collection = _3COGJMN3cjs.createCollectionStore.call(void 0, props);
|
|
120
120
|
const values = _EEDWPDM2cjs.defaultValue.call(void 0,
|
|
121
121
|
props.values,
|
|
122
122
|
syncState == null ? void 0 : syncState.values,
|
|
@@ -145,15 +145,15 @@ function createFormStore(props = {}) {
|
|
|
145
145
|
submitFailed: _EEDWPDM2cjs.defaultValue.call(void 0, syncState == null ? void 0 : syncState.submitFailed, 0),
|
|
146
146
|
valid: !hasMessages(errors)
|
|
147
147
|
});
|
|
148
|
-
const form =
|
|
148
|
+
const form = _M2NNCFIJcjs.createStore.call(void 0, initialState, collection, props.store);
|
|
149
149
|
const syncCallbacks = getStoreCallbacks(props.store);
|
|
150
150
|
const syncCallbacksState = syncCallbacks == null ? void 0 : syncCallbacks.getState();
|
|
151
151
|
const callbacksInitialState = {
|
|
152
152
|
validate: (syncCallbacksState == null ? void 0 : syncCallbacksState.validate) || [],
|
|
153
153
|
submit: (syncCallbacksState == null ? void 0 : syncCallbacksState.submit) || []
|
|
154
154
|
};
|
|
155
|
-
const callbacks =
|
|
156
|
-
|
|
155
|
+
const callbacks = _M2NNCFIJcjs.createStore.call(void 0, callbacksInitialState, syncCallbacks);
|
|
156
|
+
_M2NNCFIJcjs.setup.call(void 0, form, () => _M2NNCFIJcjs.init.call(void 0, callbacks));
|
|
157
157
|
const validate = async () => {
|
|
158
158
|
form.setState("validating", true);
|
|
159
159
|
form.setState("errors", {});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.
|
|
2
|
-
import type { Store, StoreOptions, StoreProps } from "../utils/store.
|
|
3
|
-
import type { AnyObject, PickRequired, SetState, SetStateAction } from "../utils/types.
|
|
4
|
-
import type { DeepMap, DeepPartial, Names, StringLike } from "./types.
|
|
1
|
+
import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.ts";
|
|
2
|
+
import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
|
|
3
|
+
import type { AnyObject, PickRequired, SetState, SetStateAction } from "../utils/types.ts";
|
|
4
|
+
import type { DeepMap, DeepPartial, Names, StringLike } from "./types.ts";
|
|
5
5
|
type ErrorMessage = string | undefined | null;
|
|
6
6
|
export declare function hasMessages(object: FormStoreValues): boolean;
|
|
7
7
|
export declare function get<T>(values: FormStoreValues, path: StringLike | string[], defaultValue?: T): T;
|
package/cjs/form/form-store.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.
|
|
2
|
-
import type { Store, StoreOptions, StoreProps } from "../utils/store.
|
|
3
|
-
import type { AnyObject, PickRequired, SetState, SetStateAction } from "../utils/types.
|
|
4
|
-
import type { DeepMap, DeepPartial, Names, StringLike } from "./types.
|
|
1
|
+
import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOptions, CollectionStoreState } from "../collection/collection-store.ts";
|
|
2
|
+
import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
|
|
3
|
+
import type { AnyObject, PickRequired, SetState, SetStateAction } from "../utils/types.ts";
|
|
4
|
+
import type { DeepMap, DeepPartial, Names, StringLike } from "./types.ts";
|
|
5
5
|
type ErrorMessage = string | undefined | null;
|
|
6
6
|
export declare function hasMessages(object: FormStoreValues): boolean;
|
|
7
7
|
export declare function get<T>(values: FormStoreValues, path: StringLike | string[], defaultValue?: T): T;
|
package/cjs/form/types.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { AnyObject } from "../utils/types.
|
|
1
|
+
import type { AnyObject } from "../utils/types.ts";
|
|
2
2
|
/**
|
|
3
3
|
* An object or primitive value that can be converted to a string.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export interface StringLike {
|
|
6
6
|
toString: () => string;
|
|
7
7
|
valueOf: () => string;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
/**
|
|
10
10
|
* Maps through an object `T` or array and defines the leaf values to the given
|
|
11
11
|
* type `V`.
|
package/cjs/form/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { AnyObject } from "../utils/types.
|
|
1
|
+
import type { AnyObject } from "../utils/types.ts";
|
|
2
2
|
/**
|
|
3
3
|
* An object or primitive value that can be converted to a string.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export interface StringLike {
|
|
6
6
|
toString: () => string;
|
|
7
7
|
valueOf: () => string;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
9
9
|
/**
|
|
10
10
|
* Maps through an object `T` or array and defines the leaf values to the given
|
|
11
11
|
* type `V`.
|
|
@@ -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/
|
|
7
|
-
require('../__chunks/
|
|
8
|
-
require('../__chunks/
|
|
4
|
+
var _XVL5HZ27cjs = require('../__chunks/XVL5HZ27.cjs');
|
|
5
|
+
require('../__chunks/MB5TLEVH.cjs');
|
|
6
|
+
require('../__chunks/DIYYVJDK.cjs');
|
|
7
|
+
require('../__chunks/LAYUSNGM.cjs');
|
|
8
|
+
require('../__chunks/M2NNCFIJ.cjs');
|
|
9
9
|
require('../__chunks/EEDWPDM2.cjs');
|
|
10
10
|
require('../__chunks/AV6KTKLE.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.createHovercardStore =
|
|
13
|
+
exports.createHovercardStore = _XVL5HZ27cjs.createHovercardStore;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.
|
|
2
|
-
import type { Store, StoreOptions, StoreProps } from "../utils/store.
|
|
3
|
-
import type { SetState } from "../utils/types.
|
|
1
|
+
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
|
|
2
|
+
import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
|
|
3
|
+
import type { SetState } from "../utils/types.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Creates a hovercard store.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.
|
|
2
|
-
import type { Store, StoreOptions, StoreProps } from "../utils/store.
|
|
3
|
-
import type { SetState } from "../utils/types.
|
|
1
|
+
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.ts";
|
|
2
|
+
import type { Store, StoreOptions, StoreProps } from "../utils/store.ts";
|
|
3
|
+
import type { SetState } from "../utils/types.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Creates a hovercard store.
|
|
6
6
|
*/
|
|
@@ -1,18 +1,18 @@
|
|
|
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 _5BQ2XS3Rcjs = require('../__chunks/5BQ2XS3R.cjs');
|
|
5
|
+
require('../__chunks/LBFF2BBK.cjs');
|
|
6
|
+
require('../__chunks/3COGJMN3.cjs');
|
|
7
7
|
require('../__chunks/ULSPM3Y3.cjs');
|
|
8
|
-
require('../__chunks/
|
|
8
|
+
require('../__chunks/M2NNCFIJ.cjs');
|
|
9
9
|
require('../__chunks/EEDWPDM2.cjs');
|
|
10
|
-
require('../__chunks/
|
|
10
|
+
require('../__chunks/Q2WCPTYS.cjs');
|
|
11
11
|
require('../__chunks/AV6KTKLE.cjs');
|
|
12
12
|
|
|
13
13
|
// src/menu/menu-bar-store.ts
|
|
14
14
|
function createMenuBarStore(props = {}) {
|
|
15
|
-
return
|
|
15
|
+
return _5BQ2XS3Rcjs.createMenubarStore.call(void 0, props);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MenubarStoreFunctions, MenubarStoreOptions, MenubarStoreState } from "../menubar/menubar-store.
|
|
2
|
-
import type { Store, StoreProps } from "../utils/store.
|
|
1
|
+
import type { MenubarStoreFunctions, MenubarStoreOptions, MenubarStoreState } from "../menubar/menubar-store.ts";
|
|
2
|
+
import type { Store, StoreProps } from "../utils/store.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a menu bar store.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MenubarStoreFunctions, MenubarStoreOptions, MenubarStoreState } from "../menubar/menubar-store.
|
|
2
|
-
import type { Store, StoreProps } from "../utils/store.
|
|
1
|
+
import type { MenubarStoreFunctions, MenubarStoreOptions, MenubarStoreState } from "../menubar/menubar-store.ts";
|
|
2
|
+
import type { Store, StoreProps } from "../utils/store.ts";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a menu bar store.
|
|
5
5
|
*/
|