@ariakit/core 0.3.7 → 0.3.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 +11 -0
- package/cjs/__chunks/{GZDVJEID.cjs → 2LS4JJ4S.cjs} +2 -2
- package/cjs/__chunks/{46BH65MC.cjs → 2UK5WUJX.cjs} +15 -7
- package/cjs/__chunks/{PD7XZBXC.cjs → 5SIVMOID.cjs} +4 -4
- package/cjs/__chunks/{7ZUFMSXJ.cjs → EFIT5L4X.cjs} +7 -7
- package/cjs/__chunks/{MEHGRTJ3.cjs → GJFZ5ZPP.cjs} +11 -11
- package/cjs/__chunks/{6WBY3ZZM.cjs → JNFZSNOI.cjs} +6 -6
- package/cjs/__chunks/{JLC5A6WF.cjs → UCLKUBNP.cjs} +35 -25
- package/cjs/__chunks/{GXIZMD53.cjs → UTICNXST.cjs} +4 -4
- package/cjs/checkbox/checkbox-store.cjs +3 -3
- package/cjs/checkbox/checkbox-store.d.cts +9 -9
- package/cjs/checkbox/checkbox-store.d.ts +9 -9
- package/cjs/collection/collection-store.cjs +3 -3
- package/cjs/collection/collection-store.d.cts +16 -12
- package/cjs/collection/collection-store.d.ts +16 -12
- package/cjs/combobox/combobox-store.cjs +20 -20
- package/cjs/combobox/combobox-store.d.cts +14 -14
- package/cjs/combobox/combobox-store.d.ts +14 -14
- package/cjs/composite/composite-overflow-store.cjs +5 -5
- package/cjs/composite/composite-overflow-store.d.cts +13 -7
- package/cjs/composite/composite-overflow-store.d.ts +13 -7
- package/cjs/composite/composite-store.cjs +4 -4
- package/cjs/composite/composite-store.d.cts +31 -14
- package/cjs/composite/composite-store.d.ts +31 -14
- package/cjs/dialog/dialog-store.cjs +4 -4
- package/cjs/dialog/dialog-store.d.cts +12 -6
- package/cjs/dialog/dialog-store.d.ts +12 -6
- package/cjs/disclosure/disclosure-store.cjs +3 -3
- package/cjs/disclosure/disclosure-store.d.cts +4 -2
- package/cjs/disclosure/disclosure-store.d.ts +4 -2
- package/cjs/form/form-store.cjs +7 -7
- package/cjs/form/form-store.d.cts +15 -15
- package/cjs/form/form-store.d.ts +15 -15
- package/cjs/hovercard/hovercard-store.cjs +6 -6
- package/cjs/hovercard/hovercard-store.d.cts +11 -5
- package/cjs/hovercard/hovercard-store.d.ts +11 -5
- package/cjs/menu/menu-bar-store.cjs +5 -5
- package/cjs/menu/menu-bar-store.d.cts +12 -6
- package/cjs/menu/menu-bar-store.d.ts +12 -6
- package/cjs/menu/menu-store.cjs +18 -18
- package/cjs/menu/menu-store.d.cts +20 -10
- package/cjs/menu/menu-store.d.ts +20 -10
- package/cjs/menubar/menubar-store.cjs +5 -5
- package/cjs/menubar/menubar-store.d.cts +1 -1
- package/cjs/menubar/menubar-store.d.ts +1 -1
- package/cjs/popover/popover-store.cjs +5 -5
- package/cjs/popover/popover-store.d.cts +7 -3
- package/cjs/popover/popover-store.d.ts +7 -3
- package/cjs/radio/radio-store.cjs +5 -5
- package/cjs/radio/radio-store.d.cts +5 -3
- package/cjs/radio/radio-store.d.ts +5 -3
- package/cjs/select/select-store.cjs +18 -18
- package/cjs/select/select-store.d.cts +14 -16
- package/cjs/select/select-store.d.ts +14 -16
- package/cjs/tab/tab-store.cjs +15 -15
- package/cjs/tab/tab-store.d.cts +15 -16
- package/cjs/tab/tab-store.d.ts +15 -16
- package/cjs/toolbar/toolbar-store.cjs +4 -4
- package/cjs/toolbar/toolbar-store.d.cts +9 -6
- package/cjs/toolbar/toolbar-store.d.ts +9 -6
- package/cjs/tooltip/tooltip-store.cjs +7 -7
- package/cjs/tooltip/tooltip-store.d.cts +5 -3
- package/cjs/tooltip/tooltip-store.d.ts +5 -3
- package/cjs/utils/store.cjs +2 -2
- package/esm/__chunks/{E7OQVGGY.js → A2J4XZ5T.js} +15 -7
- package/esm/__chunks/{OGMLJYDV.js → DLX2AS6C.js} +2 -2
- package/esm/__chunks/{ANO6WJO4.js → EZ2TTBAQ.js} +2 -2
- package/esm/__chunks/{WY3EMTH6.js → J6JIOWCS.js} +2 -2
- package/esm/__chunks/{CL47ZAPY.js → LT2OYWRD.js} +1 -1
- package/esm/__chunks/{DYD4YNLE.js → NKLTHWCR.js} +1 -1
- package/esm/__chunks/{BXH3I7ML.js → T3DVYGXI.js} +2 -2
- package/esm/__chunks/{CCU5UHQ2.js → TLN4ALYH.js} +32 -22
- package/esm/checkbox/checkbox-store.d.ts +9 -9
- package/esm/checkbox/checkbox-store.js +1 -1
- package/esm/collection/collection-store.d.ts +16 -12
- package/esm/collection/collection-store.js +2 -2
- package/esm/combobox/combobox-store.d.ts +14 -14
- package/esm/combobox/combobox-store.js +6 -6
- package/esm/composite/composite-overflow-store.d.ts +13 -7
- package/esm/composite/composite-overflow-store.js +4 -4
- package/esm/composite/composite-store.d.ts +31 -14
- package/esm/composite/composite-store.js +3 -3
- package/esm/dialog/dialog-store.d.ts +12 -6
- package/esm/dialog/dialog-store.js +3 -3
- package/esm/disclosure/disclosure-store.d.ts +4 -2
- package/esm/disclosure/disclosure-store.js +2 -2
- package/esm/form/form-store.d.ts +15 -15
- package/esm/form/form-store.js +2 -2
- package/esm/hovercard/hovercard-store.d.ts +11 -5
- package/esm/hovercard/hovercard-store.js +5 -5
- package/esm/menu/menu-bar-store.d.ts +12 -6
- package/esm/menu/menu-bar-store.js +4 -4
- package/esm/menu/menu-store.d.ts +20 -10
- package/esm/menu/menu-store.js +7 -7
- package/esm/menubar/menubar-store.d.ts +1 -1
- package/esm/menubar/menubar-store.js +4 -4
- package/esm/popover/popover-store.d.ts +7 -3
- package/esm/popover/popover-store.js +4 -4
- package/esm/radio/radio-store.d.ts +5 -3
- package/esm/radio/radio-store.js +3 -3
- package/esm/select/select-store.d.ts +14 -16
- package/esm/select/select-store.js +6 -6
- package/esm/tab/tab-store.d.ts +15 -16
- package/esm/tab/tab-store.js +3 -3
- package/esm/toolbar/toolbar-store.d.ts +9 -6
- package/esm/toolbar/toolbar-store.js +3 -3
- package/esm/tooltip/tooltip-store.d.ts +5 -3
- package/esm/tooltip/tooltip-store.js +5 -5
- package/esm/utils/store.js +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
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 _EFIT5L4Xcjs = require('../__chunks/EFIT5L4X.cjs');
|
|
5
|
+
require('../__chunks/2LS4JJ4S.cjs');
|
|
6
|
+
require('../__chunks/GJFZ5ZPP.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
10
|
-
require('../__chunks/
|
|
9
|
+
var _JNFZSNOIcjs = require('../__chunks/JNFZSNOI.cjs');
|
|
10
|
+
require('../__chunks/UCLKUBNP.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _2UK5WUJXcjs = require('../__chunks/2UK5WUJX.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _3UT5FE6Kcjs = require('../__chunks/3UT5FE6K.cjs');
|
|
@@ -33,7 +33,7 @@ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
|
|
|
33
33
|
var isSafariOnMobile = _YIUPKKEKcjs.isSafari.call(void 0, ) && _YIUPKKEKcjs.isTouchDevice.call(void 0, );
|
|
34
34
|
function createComboboxStore(props = {}) {
|
|
35
35
|
var _a;
|
|
36
|
-
|
|
36
|
+
_2UK5WUJXcjs.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 = _JNFZSNOIcjs.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 = _EFIT5L4Xcjs.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,
|
|
@@ -96,10 +96,10 @@ function createComboboxStore(props = {}) {
|
|
|
96
96
|
),
|
|
97
97
|
activeValue: syncState == null ? void 0 : syncState.activeValue
|
|
98
98
|
});
|
|
99
|
-
const combobox =
|
|
100
|
-
|
|
99
|
+
const combobox = _2UK5WUJXcjs.createStore.call(void 0, initialState, composite, popover, props.store);
|
|
100
|
+
_2UK5WUJXcjs.setup.call(void 0,
|
|
101
101
|
combobox,
|
|
102
|
-
() =>
|
|
102
|
+
() => _2UK5WUJXcjs.sync.call(void 0, combobox, ["resetValueOnHide", "mounted"], (state) => {
|
|
103
103
|
if (!state.resetValueOnHide)
|
|
104
104
|
return;
|
|
105
105
|
if (state.mounted)
|
|
@@ -107,34 +107,34 @@ function createComboboxStore(props = {}) {
|
|
|
107
107
|
combobox.setState("value", value);
|
|
108
108
|
})
|
|
109
109
|
);
|
|
110
|
-
|
|
110
|
+
_2UK5WUJXcjs.setup.call(void 0,
|
|
111
111
|
combobox,
|
|
112
|
-
() =>
|
|
112
|
+
() => _2UK5WUJXcjs.sync.call(void 0, combobox, ["resetValueOnSelect", "selectedValue"], (state) => {
|
|
113
113
|
if (!state.resetValueOnSelect)
|
|
114
114
|
return;
|
|
115
115
|
combobox.setState("value", value);
|
|
116
116
|
})
|
|
117
117
|
);
|
|
118
|
-
|
|
118
|
+
_2UK5WUJXcjs.setup.call(void 0,
|
|
119
119
|
combobox,
|
|
120
|
-
() =>
|
|
120
|
+
() => _2UK5WUJXcjs.batch.call(void 0, combobox, ["mounted"], (state) => {
|
|
121
121
|
if (state.mounted)
|
|
122
122
|
return;
|
|
123
123
|
combobox.setState("activeId", activeId);
|
|
124
124
|
combobox.setState("moves", 0);
|
|
125
125
|
})
|
|
126
126
|
);
|
|
127
|
-
|
|
127
|
+
_2UK5WUJXcjs.setup.call(void 0,
|
|
128
128
|
combobox,
|
|
129
|
-
() =>
|
|
129
|
+
() => _2UK5WUJXcjs.sync.call(void 0, combobox, ["moves", "activeId"], (state, prevState) => {
|
|
130
130
|
if (state.moves === prevState.moves) {
|
|
131
131
|
combobox.setState("activeValue", void 0);
|
|
132
132
|
}
|
|
133
133
|
})
|
|
134
134
|
);
|
|
135
|
-
|
|
135
|
+
_2UK5WUJXcjs.setup.call(void 0,
|
|
136
136
|
combobox,
|
|
137
|
-
() =>
|
|
137
|
+
() => _2UK5WUJXcjs.batch.call(void 0, combobox, ["moves", "renderedItems"], (state, prev) => {
|
|
138
138
|
if (state.moves === prev.moves)
|
|
139
139
|
return;
|
|
140
140
|
const { activeId: activeId2 } = combobox.getState();
|
|
@@ -2,19 +2,17 @@ import type { CompositeStoreFunctions, CompositeStoreItem, CompositeStoreOptions
|
|
|
2
2
|
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.js";
|
|
3
3
|
import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
|
|
4
4
|
import type { PickRequired, SetState } from "../utils/types.js";
|
|
5
|
-
type
|
|
6
|
-
type MutableValue<T extends Value = Value> = T extends string ? string : T;
|
|
7
|
-
interface Item extends CompositeStoreItem {
|
|
8
|
-
value?: string;
|
|
9
|
-
}
|
|
5
|
+
type MutableValue<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> = T extends string ? string : T;
|
|
10
6
|
/**
|
|
11
7
|
* Creates a combobox store.
|
|
12
8
|
*/
|
|
13
|
-
export declare function createComboboxStore<T extends
|
|
9
|
+
export declare function createComboboxStore<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue>(props: PickRequired<ComboboxStoreProps<T>, "selectedValue" | "defaultSelectedValue">): ComboboxStore<T>;
|
|
14
10
|
export declare function createComboboxStore(props?: ComboboxStoreProps): ComboboxStore;
|
|
15
|
-
export type
|
|
16
|
-
export
|
|
17
|
-
|
|
11
|
+
export type ComboboxStoreSelectedValue = string | string[];
|
|
12
|
+
export interface ComboboxStoreItem extends CompositeStoreItem {
|
|
13
|
+
value?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreState<ComboboxStoreItem>, PopoverStoreState {
|
|
18
16
|
/**
|
|
19
17
|
* @default true
|
|
20
18
|
*/
|
|
@@ -61,6 +59,8 @@ export interface ComboboxStoreState<T extends Value = Value> extends CompositeSt
|
|
|
61
59
|
* Combobox](https://ariakit.org/examples/combobox-multiple)
|
|
62
60
|
* - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
|
|
63
61
|
* - [Select with Combobox](https://ariakit.org/examples/select-combobox)
|
|
62
|
+
* - [Submenu with
|
|
63
|
+
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
64
64
|
*/
|
|
65
65
|
resetValueOnHide: boolean;
|
|
66
66
|
/**
|
|
@@ -78,7 +78,7 @@ export interface ComboboxStoreState<T extends Value = Value> extends CompositeSt
|
|
|
78
78
|
*/
|
|
79
79
|
resetValueOnSelect: boolean;
|
|
80
80
|
}
|
|
81
|
-
export interface ComboboxStoreFunctions<T extends
|
|
81
|
+
export interface ComboboxStoreFunctions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreFunctions<ComboboxStoreItem>, PopoverStoreFunctions {
|
|
82
82
|
/**
|
|
83
83
|
* Sets the [`value`](https://ariakit.org/reference/combobox-provider#value)
|
|
84
84
|
* state.
|
|
@@ -98,11 +98,11 @@ export interface ComboboxStoreFunctions<T extends Value = Value> extends Composi
|
|
|
98
98
|
*/
|
|
99
99
|
setSelectedValue: SetState<ComboboxStoreState<T>["selectedValue"]>;
|
|
100
100
|
}
|
|
101
|
-
export interface ComboboxStoreOptions<T extends
|
|
101
|
+
export interface ComboboxStoreOptions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreOptions<ComboboxStoreItem>, PopoverStoreOptions, StoreOptions<ComboboxStoreState<T>, "includesBaseElement" | "value" | "selectedValue" | "resetValueOnHide" | "resetValueOnSelect"> {
|
|
102
102
|
/**
|
|
103
103
|
* @default null
|
|
104
104
|
*/
|
|
105
|
-
defaultActiveId?: CompositeStoreOptions<
|
|
105
|
+
defaultActiveId?: CompositeStoreOptions<ComboboxStoreItem>["activeId"];
|
|
106
106
|
/**
|
|
107
107
|
* The initial value of the combobox input.
|
|
108
108
|
* @default ""
|
|
@@ -118,8 +118,8 @@ export interface ComboboxStoreOptions<T extends Value = Value> extends StoreOpti
|
|
|
118
118
|
*/
|
|
119
119
|
defaultSelectedValue?: ComboboxStoreState<T>["selectedValue"];
|
|
120
120
|
}
|
|
121
|
-
export interface ComboboxStoreProps<T extends
|
|
121
|
+
export interface ComboboxStoreProps<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends ComboboxStoreOptions<T>, StoreProps<ComboboxStoreState<T>> {
|
|
122
122
|
}
|
|
123
|
-
export interface ComboboxStore<T extends
|
|
123
|
+
export interface ComboboxStore<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends ComboboxStoreFunctions<T>, Store<ComboboxStoreState<T>> {
|
|
124
124
|
}
|
|
125
125
|
export {};
|
|
@@ -2,19 +2,17 @@ import type { CompositeStoreFunctions, CompositeStoreItem, CompositeStoreOptions
|
|
|
2
2
|
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.js";
|
|
3
3
|
import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
|
|
4
4
|
import type { PickRequired, SetState } from "../utils/types.js";
|
|
5
|
-
type
|
|
6
|
-
type MutableValue<T extends Value = Value> = T extends string ? string : T;
|
|
7
|
-
interface Item extends CompositeStoreItem {
|
|
8
|
-
value?: string;
|
|
9
|
-
}
|
|
5
|
+
type MutableValue<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> = T extends string ? string : T;
|
|
10
6
|
/**
|
|
11
7
|
* Creates a combobox store.
|
|
12
8
|
*/
|
|
13
|
-
export declare function createComboboxStore<T extends
|
|
9
|
+
export declare function createComboboxStore<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue>(props: PickRequired<ComboboxStoreProps<T>, "selectedValue" | "defaultSelectedValue">): ComboboxStore<T>;
|
|
14
10
|
export declare function createComboboxStore(props?: ComboboxStoreProps): ComboboxStore;
|
|
15
|
-
export type
|
|
16
|
-
export
|
|
17
|
-
|
|
11
|
+
export type ComboboxStoreSelectedValue = string | string[];
|
|
12
|
+
export interface ComboboxStoreItem extends CompositeStoreItem {
|
|
13
|
+
value?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreState<ComboboxStoreItem>, PopoverStoreState {
|
|
18
16
|
/**
|
|
19
17
|
* @default true
|
|
20
18
|
*/
|
|
@@ -61,6 +59,8 @@ export interface ComboboxStoreState<T extends Value = Value> extends CompositeSt
|
|
|
61
59
|
* Combobox](https://ariakit.org/examples/combobox-multiple)
|
|
62
60
|
* - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
|
|
63
61
|
* - [Select with Combobox](https://ariakit.org/examples/select-combobox)
|
|
62
|
+
* - [Submenu with
|
|
63
|
+
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
64
64
|
*/
|
|
65
65
|
resetValueOnHide: boolean;
|
|
66
66
|
/**
|
|
@@ -78,7 +78,7 @@ export interface ComboboxStoreState<T extends Value = Value> extends CompositeSt
|
|
|
78
78
|
*/
|
|
79
79
|
resetValueOnSelect: boolean;
|
|
80
80
|
}
|
|
81
|
-
export interface ComboboxStoreFunctions<T extends
|
|
81
|
+
export interface ComboboxStoreFunctions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreFunctions<ComboboxStoreItem>, PopoverStoreFunctions {
|
|
82
82
|
/**
|
|
83
83
|
* Sets the [`value`](https://ariakit.org/reference/combobox-provider#value)
|
|
84
84
|
* state.
|
|
@@ -98,11 +98,11 @@ export interface ComboboxStoreFunctions<T extends Value = Value> extends Composi
|
|
|
98
98
|
*/
|
|
99
99
|
setSelectedValue: SetState<ComboboxStoreState<T>["selectedValue"]>;
|
|
100
100
|
}
|
|
101
|
-
export interface ComboboxStoreOptions<T extends
|
|
101
|
+
export interface ComboboxStoreOptions<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends CompositeStoreOptions<ComboboxStoreItem>, PopoverStoreOptions, StoreOptions<ComboboxStoreState<T>, "includesBaseElement" | "value" | "selectedValue" | "resetValueOnHide" | "resetValueOnSelect"> {
|
|
102
102
|
/**
|
|
103
103
|
* @default null
|
|
104
104
|
*/
|
|
105
|
-
defaultActiveId?: CompositeStoreOptions<
|
|
105
|
+
defaultActiveId?: CompositeStoreOptions<ComboboxStoreItem>["activeId"];
|
|
106
106
|
/**
|
|
107
107
|
* The initial value of the combobox input.
|
|
108
108
|
* @default ""
|
|
@@ -118,8 +118,8 @@ export interface ComboboxStoreOptions<T extends Value = Value> extends StoreOpti
|
|
|
118
118
|
*/
|
|
119
119
|
defaultSelectedValue?: ComboboxStoreState<T>["selectedValue"];
|
|
120
120
|
}
|
|
121
|
-
export interface ComboboxStoreProps<T extends
|
|
121
|
+
export interface ComboboxStoreProps<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends ComboboxStoreOptions<T>, StoreProps<ComboboxStoreState<T>> {
|
|
122
122
|
}
|
|
123
|
-
export interface ComboboxStore<T extends
|
|
123
|
+
export interface ComboboxStore<T extends ComboboxStoreSelectedValue = ComboboxStoreSelectedValue> extends ComboboxStoreFunctions<T>, Store<ComboboxStoreState<T>> {
|
|
124
124
|
}
|
|
125
125
|
export {};
|
|
@@ -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 _EFIT5L4Xcjs = require('../__chunks/EFIT5L4X.cjs');
|
|
5
|
+
require('../__chunks/2LS4JJ4S.cjs');
|
|
6
|
+
require('../__chunks/GJFZ5ZPP.cjs');
|
|
7
|
+
require('../__chunks/2UK5WUJX.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 _EFIT5L4Xcjs.createPopoverStore.call(void 0, props);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.js";
|
|
2
|
+
import type { Store, StoreProps } from "../utils/store.js";
|
|
2
3
|
/**
|
|
3
|
-
* Creates a
|
|
4
|
+
* Creates a compositeOverflow store.
|
|
4
5
|
*/
|
|
5
6
|
export declare function createCompositeOverflowStore(props?: CompositeOverflowStoreProps): CompositeOverflowStore;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
export
|
|
7
|
+
export interface CompositeOverflowStoreState extends PopoverStoreState {
|
|
8
|
+
}
|
|
9
|
+
export interface CompositeOverflowStoreFunctions extends PopoverStoreFunctions {
|
|
10
|
+
}
|
|
11
|
+
export interface CompositeOverflowStoreOptions extends PopoverStoreOptions {
|
|
12
|
+
}
|
|
13
|
+
export interface CompositeOverflowStoreProps extends CompositeOverflowStoreOptions, StoreProps<CompositeOverflowStoreState> {
|
|
14
|
+
}
|
|
15
|
+
export interface CompositeOverflowStore extends CompositeOverflowStoreFunctions, Store<CompositeOverflowStoreState> {
|
|
16
|
+
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopoverStoreFunctions, PopoverStoreOptions, PopoverStoreState } from "../popover/popover-store.js";
|
|
2
|
+
import type { Store, StoreProps } from "../utils/store.js";
|
|
2
3
|
/**
|
|
3
|
-
* Creates a
|
|
4
|
+
* Creates a compositeOverflow store.
|
|
4
5
|
*/
|
|
5
6
|
export declare function createCompositeOverflowStore(props?: CompositeOverflowStoreProps): CompositeOverflowStore;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
export
|
|
7
|
+
export interface CompositeOverflowStoreState extends PopoverStoreState {
|
|
8
|
+
}
|
|
9
|
+
export interface CompositeOverflowStoreFunctions extends PopoverStoreFunctions {
|
|
10
|
+
}
|
|
11
|
+
export interface CompositeOverflowStoreOptions extends PopoverStoreOptions {
|
|
12
|
+
}
|
|
13
|
+
export interface CompositeOverflowStoreProps extends CompositeOverflowStoreOptions, StoreProps<CompositeOverflowStoreState> {
|
|
14
|
+
}
|
|
15
|
+
export interface CompositeOverflowStore extends CompositeOverflowStoreFunctions, Store<CompositeOverflowStoreState> {
|
|
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 _JNFZSNOIcjs = require('../__chunks/JNFZSNOI.cjs');
|
|
5
|
+
require('../__chunks/UCLKUBNP.cjs');
|
|
6
|
+
require('../__chunks/2UK5WUJX.cjs');
|
|
7
7
|
require('../__chunks/3UT5FE6K.cjs');
|
|
8
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 = _JNFZSNOIcjs.createCompositeStore;
|
|
@@ -2,18 +2,28 @@ import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOpti
|
|
|
2
2
|
import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
|
|
3
3
|
import type { SetState } from "../utils/types.js";
|
|
4
4
|
type Orientation = "horizontal" | "vertical" | "both";
|
|
5
|
-
interface Item extends CollectionStoreItem {
|
|
6
|
-
rowId?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
children?: string;
|
|
9
|
-
}
|
|
10
5
|
/**
|
|
11
6
|
* Creates a composite store.
|
|
12
7
|
*/
|
|
13
|
-
export declare function createCompositeStore<T extends
|
|
8
|
+
export declare function createCompositeStore<T extends CompositeStoreItem = CompositeStoreItem>(props?: CompositeStoreProps<T>): CompositeStore<T>;
|
|
14
9
|
export type CompositeStoreOrientation = Orientation;
|
|
15
|
-
export
|
|
16
|
-
|
|
10
|
+
export interface CompositeStoreItem extends CollectionStoreItem {
|
|
11
|
+
/**
|
|
12
|
+
* The row id of the item. This is only used on two-dimensional composites
|
|
13
|
+
* (when using `CompositeRow`).
|
|
14
|
+
*/
|
|
15
|
+
rowId?: string;
|
|
16
|
+
/**
|
|
17
|
+
* If enabled, the item will be disabled and users won't be able to focus it
|
|
18
|
+
* using arrow keys.
|
|
19
|
+
*/
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The item children. This can be used for typeahead purposes.
|
|
23
|
+
*/
|
|
24
|
+
children?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CompositeStoreState<T extends CompositeStoreItem = CompositeStoreItem> extends CollectionStoreState<T> {
|
|
17
27
|
/**
|
|
18
28
|
* The composite element.
|
|
19
29
|
*/
|
|
@@ -101,8 +111,15 @@ export interface CompositeStoreState<T extends Item = Item> extends CollectionSt
|
|
|
101
111
|
*/
|
|
102
112
|
moves: number;
|
|
103
113
|
/**
|
|
104
|
-
* Indicates
|
|
105
|
-
* order.
|
|
114
|
+
* Indicates if the composite element (such as `menu`, `combobox`, `listbox`,
|
|
115
|
+
* `toolbar`, etc.) should be part of the focus order. In other words, moving
|
|
116
|
+
* to the previous element when the first item is in focus will focus on the
|
|
117
|
+
* composite element itself. The same applies to the last item when moving to
|
|
118
|
+
* the next element.
|
|
119
|
+
*
|
|
120
|
+
* Live examples:
|
|
121
|
+
* - [Submenu with
|
|
122
|
+
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
106
123
|
* @default false
|
|
107
124
|
*/
|
|
108
125
|
includesBaseElement: boolean;
|
|
@@ -117,7 +134,7 @@ export interface CompositeStoreState<T extends Item = Item> extends CollectionSt
|
|
|
117
134
|
*/
|
|
118
135
|
activeId: string | null | undefined;
|
|
119
136
|
}
|
|
120
|
-
export interface CompositeStoreFunctions<T extends
|
|
137
|
+
export interface CompositeStoreFunctions<T extends CompositeStoreItem = CompositeStoreItem> extends CollectionStoreFunctions<T> {
|
|
121
138
|
/**
|
|
122
139
|
* Sets the `baseElement`.
|
|
123
140
|
*/
|
|
@@ -188,7 +205,7 @@ export interface CompositeStoreFunctions<T extends Item = Item> extends Collecti
|
|
|
188
205
|
*/
|
|
189
206
|
last: () => string | null | undefined;
|
|
190
207
|
}
|
|
191
|
-
export interface CompositeStoreOptions<T extends
|
|
208
|
+
export interface CompositeStoreOptions<T extends CompositeStoreItem = CompositeStoreItem> extends CollectionStoreOptions<T>, StoreOptions<CompositeStoreState<T>, "virtualFocus" | "orientation" | "rtl" | "focusLoop" | "focusWrap" | "focusShift" | "includesBaseElement" | "activeId"> {
|
|
192
209
|
/**
|
|
193
210
|
* The composite item id that should be active by default when the composite
|
|
194
211
|
* widget is rendered. If `null`, the composite element itself will have focus
|
|
@@ -197,8 +214,8 @@ export interface CompositeStoreOptions<T extends Item = Item> extends StoreOptio
|
|
|
197
214
|
*/
|
|
198
215
|
defaultActiveId?: CompositeStoreState<T>["activeId"];
|
|
199
216
|
}
|
|
200
|
-
export interface CompositeStoreProps<T extends
|
|
217
|
+
export interface CompositeStoreProps<T extends CompositeStoreItem = CompositeStoreItem> extends CompositeStoreOptions<T>, StoreProps<CompositeStoreState<T>> {
|
|
201
218
|
}
|
|
202
|
-
export interface CompositeStore<T extends
|
|
219
|
+
export interface CompositeStore<T extends CompositeStoreItem = CompositeStoreItem> extends CompositeStoreFunctions<T>, Store<CompositeStoreState<T>> {
|
|
203
220
|
}
|
|
204
221
|
export {};
|
|
@@ -2,18 +2,28 @@ import type { CollectionStoreFunctions, CollectionStoreItem, CollectionStoreOpti
|
|
|
2
2
|
import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
|
|
3
3
|
import type { SetState } from "../utils/types.js";
|
|
4
4
|
type Orientation = "horizontal" | "vertical" | "both";
|
|
5
|
-
interface Item extends CollectionStoreItem {
|
|
6
|
-
rowId?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
children?: string;
|
|
9
|
-
}
|
|
10
5
|
/**
|
|
11
6
|
* Creates a composite store.
|
|
12
7
|
*/
|
|
13
|
-
export declare function createCompositeStore<T extends
|
|
8
|
+
export declare function createCompositeStore<T extends CompositeStoreItem = CompositeStoreItem>(props?: CompositeStoreProps<T>): CompositeStore<T>;
|
|
14
9
|
export type CompositeStoreOrientation = Orientation;
|
|
15
|
-
export
|
|
16
|
-
|
|
10
|
+
export interface CompositeStoreItem extends CollectionStoreItem {
|
|
11
|
+
/**
|
|
12
|
+
* The row id of the item. This is only used on two-dimensional composites
|
|
13
|
+
* (when using `CompositeRow`).
|
|
14
|
+
*/
|
|
15
|
+
rowId?: string;
|
|
16
|
+
/**
|
|
17
|
+
* If enabled, the item will be disabled and users won't be able to focus it
|
|
18
|
+
* using arrow keys.
|
|
19
|
+
*/
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The item children. This can be used for typeahead purposes.
|
|
23
|
+
*/
|
|
24
|
+
children?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CompositeStoreState<T extends CompositeStoreItem = CompositeStoreItem> extends CollectionStoreState<T> {
|
|
17
27
|
/**
|
|
18
28
|
* The composite element.
|
|
19
29
|
*/
|
|
@@ -101,8 +111,15 @@ export interface CompositeStoreState<T extends Item = Item> extends CollectionSt
|
|
|
101
111
|
*/
|
|
102
112
|
moves: number;
|
|
103
113
|
/**
|
|
104
|
-
* Indicates
|
|
105
|
-
* order.
|
|
114
|
+
* Indicates if the composite element (such as `menu`, `combobox`, `listbox`,
|
|
115
|
+
* `toolbar`, etc.) should be part of the focus order. In other words, moving
|
|
116
|
+
* to the previous element when the first item is in focus will focus on the
|
|
117
|
+
* composite element itself. The same applies to the last item when moving to
|
|
118
|
+
* the next element.
|
|
119
|
+
*
|
|
120
|
+
* Live examples:
|
|
121
|
+
* - [Submenu with
|
|
122
|
+
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
106
123
|
* @default false
|
|
107
124
|
*/
|
|
108
125
|
includesBaseElement: boolean;
|
|
@@ -117,7 +134,7 @@ export interface CompositeStoreState<T extends Item = Item> extends CollectionSt
|
|
|
117
134
|
*/
|
|
118
135
|
activeId: string | null | undefined;
|
|
119
136
|
}
|
|
120
|
-
export interface CompositeStoreFunctions<T extends
|
|
137
|
+
export interface CompositeStoreFunctions<T extends CompositeStoreItem = CompositeStoreItem> extends CollectionStoreFunctions<T> {
|
|
121
138
|
/**
|
|
122
139
|
* Sets the `baseElement`.
|
|
123
140
|
*/
|
|
@@ -188,7 +205,7 @@ export interface CompositeStoreFunctions<T extends Item = Item> extends Collecti
|
|
|
188
205
|
*/
|
|
189
206
|
last: () => string | null | undefined;
|
|
190
207
|
}
|
|
191
|
-
export interface CompositeStoreOptions<T extends
|
|
208
|
+
export interface CompositeStoreOptions<T extends CompositeStoreItem = CompositeStoreItem> extends CollectionStoreOptions<T>, StoreOptions<CompositeStoreState<T>, "virtualFocus" | "orientation" | "rtl" | "focusLoop" | "focusWrap" | "focusShift" | "includesBaseElement" | "activeId"> {
|
|
192
209
|
/**
|
|
193
210
|
* The composite item id that should be active by default when the composite
|
|
194
211
|
* widget is rendered. If `null`, the composite element itself will have focus
|
|
@@ -197,8 +214,8 @@ export interface CompositeStoreOptions<T extends Item = Item> extends StoreOptio
|
|
|
197
214
|
*/
|
|
198
215
|
defaultActiveId?: CompositeStoreState<T>["activeId"];
|
|
199
216
|
}
|
|
200
|
-
export interface CompositeStoreProps<T extends
|
|
217
|
+
export interface CompositeStoreProps<T extends CompositeStoreItem = CompositeStoreItem> extends CompositeStoreOptions<T>, StoreProps<CompositeStoreState<T>> {
|
|
201
218
|
}
|
|
202
|
-
export interface CompositeStore<T extends
|
|
219
|
+
export interface CompositeStore<T extends CompositeStoreItem = CompositeStoreItem> extends CompositeStoreFunctions<T>, Store<CompositeStoreState<T>> {
|
|
203
220
|
}
|
|
204
221
|
export {};
|
|
@@ -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 _2LS4JJ4Scjs = require('../__chunks/2LS4JJ4S.cjs');
|
|
5
|
+
require('../__chunks/GJFZ5ZPP.cjs');
|
|
6
|
+
require('../__chunks/2UK5WUJX.cjs');
|
|
7
7
|
require('../__chunks/3UT5FE6K.cjs');
|
|
8
8
|
require('../__chunks/AV6KTKLE.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.createDialogStore =
|
|
11
|
+
exports.createDialogStore = _2LS4JJ4Scjs.createDialogStore;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreState } from "../disclosure/disclosure-store.js";
|
|
2
|
+
import type { Store, StoreProps } from "../utils/store.js";
|
|
2
3
|
/**
|
|
3
4
|
* Creates a dialog store.
|
|
4
5
|
*/
|
|
5
6
|
export declare function createDialogStore(props?: DialogStoreProps): DialogStore;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
export
|
|
7
|
+
export interface DialogStoreState extends DisclosureStoreState {
|
|
8
|
+
}
|
|
9
|
+
export interface DialogStoreFunctions extends DisclosureStoreFunctions {
|
|
10
|
+
}
|
|
11
|
+
export interface DialogStoreOptions extends DisclosureStoreOptions {
|
|
12
|
+
}
|
|
13
|
+
export interface DialogStoreProps extends DialogStoreOptions, StoreProps<DialogStoreState> {
|
|
14
|
+
}
|
|
15
|
+
export interface DialogStore extends DialogStoreFunctions, Store<DialogStoreState> {
|
|
16
|
+
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DisclosureStoreFunctions, DisclosureStoreOptions, DisclosureStoreState } from "../disclosure/disclosure-store.js";
|
|
2
|
+
import type { Store, StoreProps } from "../utils/store.js";
|
|
2
3
|
/**
|
|
3
4
|
* Creates a dialog store.
|
|
4
5
|
*/
|
|
5
6
|
export declare function createDialogStore(props?: DialogStoreProps): DialogStore;
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
export
|
|
7
|
+
export interface DialogStoreState extends DisclosureStoreState {
|
|
8
|
+
}
|
|
9
|
+
export interface DialogStoreFunctions extends DisclosureStoreFunctions {
|
|
10
|
+
}
|
|
11
|
+
export interface DialogStoreOptions extends DisclosureStoreOptions {
|
|
12
|
+
}
|
|
13
|
+
export interface DialogStoreProps extends DialogStoreOptions, StoreProps<DialogStoreState> {
|
|
14
|
+
}
|
|
15
|
+
export interface DialogStore extends DialogStoreFunctions, Store<DialogStoreState> {
|
|
16
|
+
}
|
|
@@ -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 _GJFZ5ZPPcjs = require('../__chunks/GJFZ5ZPP.cjs');
|
|
5
|
+
require('../__chunks/2UK5WUJX.cjs');
|
|
6
6
|
require('../__chunks/3UT5FE6K.cjs');
|
|
7
7
|
require('../__chunks/AV6KTKLE.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.createDisclosureStore =
|
|
10
|
+
exports.createDisclosureStore = _GJFZ5ZPPcjs.createDisclosureStore;
|
|
@@ -123,5 +123,7 @@ export interface DisclosureStoreOptions extends StoreOptions<DisclosureStoreStat
|
|
|
123
123
|
*/
|
|
124
124
|
disclosure?: DisclosureStore | null;
|
|
125
125
|
}
|
|
126
|
-
export
|
|
127
|
-
|
|
126
|
+
export interface DisclosureStoreProps extends DisclosureStoreOptions, StoreProps<DisclosureStoreState> {
|
|
127
|
+
}
|
|
128
|
+
export interface DisclosureStore extends DisclosureStoreFunctions, Store<DisclosureStoreState> {
|
|
129
|
+
}
|
|
@@ -123,5 +123,7 @@ export interface DisclosureStoreOptions extends StoreOptions<DisclosureStoreStat
|
|
|
123
123
|
*/
|
|
124
124
|
disclosure?: DisclosureStore | null;
|
|
125
125
|
}
|
|
126
|
-
export
|
|
127
|
-
|
|
126
|
+
export interface DisclosureStoreProps extends DisclosureStoreOptions, StoreProps<DisclosureStoreState> {
|
|
127
|
+
}
|
|
128
|
+
export interface DisclosureStore extends DisclosureStoreFunctions, Store<DisclosureStoreState> {
|
|
129
|
+
}
|