@ariakit/core 0.4.17 → 0.4.19
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 +9 -0
- package/cjs/__chunks/{MJNGPYVQ.cjs → 2RUCRSRF.cjs} +16 -16
- package/cjs/__chunks/{6BYUUR4M.cjs → 4TRESXTO.cjs} +7 -1
- package/cjs/__chunks/{AOXAROPF.cjs → 75F3RDBE.cjs} +14 -14
- package/cjs/__chunks/{SHOLYDNP.cjs → CTEQSOKZ.cjs} +2 -2
- package/cjs/__chunks/{T247D7JS.cjs → CVLMIMPT.cjs} +2 -2
- package/cjs/__chunks/{CPH45Z4I.cjs → G2CSOTWZ.cjs} +7 -7
- package/cjs/__chunks/{VZPNI7C2.cjs → I4CBIWTX.cjs} +4 -4
- package/cjs/__chunks/{6REHCF5T.cjs → LS2SNHDM.cjs} +6 -6
- package/cjs/__chunks/{UROTDZFK.cjs → R37KOEUW.cjs} +10 -10
- package/cjs/__chunks/{NNJG45OF.cjs → UGAVMSQJ.cjs} +18 -18
- package/cjs/__chunks/{LT33CJGT.cjs → VC22SYOD.cjs} +24 -21
- package/cjs/__chunks/{WPBYRKFQ.cjs → WMTGHDLE.cjs} +15 -15
- package/cjs/checkbox/checkbox-store.cjs +5 -5
- package/cjs/checkbox/checkbox-store.d.cts +5 -5
- package/cjs/checkbox/checkbox-store.d.ts +5 -5
- package/cjs/collection/collection-store.cjs +5 -5
- package/cjs/collection/collection-store.d.cts +5 -5
- package/cjs/collection/collection-store.d.ts +5 -5
- package/cjs/combobox/combobox-store.cjs +40 -40
- package/cjs/combobox/combobox-store.d.cts +26 -26
- package/cjs/combobox/combobox-store.d.ts +26 -26
- package/cjs/composite/composite-overflow-store.cjs +6 -6
- package/cjs/composite/composite-store.cjs +6 -6
- package/cjs/composite/composite-store.d.cts +62 -54
- package/cjs/composite/composite-store.d.ts +62 -54
- package/cjs/dialog/dialog-store.cjs +5 -5
- package/cjs/disclosure/disclosure-store.cjs +4 -4
- package/cjs/disclosure/disclosure-store.d.cts +22 -22
- package/cjs/disclosure/disclosure-store.d.ts +22 -22
- package/cjs/form/form-store.cjs +41 -37
- package/cjs/form/form-store.d.cts +14 -14
- package/cjs/form/form-store.d.ts +14 -14
- package/cjs/hovercard/hovercard-store.cjs +7 -7
- package/cjs/hovercard/hovercard-store.d.cts +10 -10
- package/cjs/hovercard/hovercard-store.d.ts +10 -10
- package/cjs/menu/menu-bar-store.cjs +7 -7
- package/cjs/menu/menu-store.cjs +27 -27
- package/cjs/menu/menu-store.d.cts +10 -10
- package/cjs/menu/menu-store.d.ts +10 -10
- package/cjs/menubar/menubar-store.cjs +7 -7
- package/cjs/popover/popover-store.cjs +6 -6
- package/cjs/popover/popover-store.d.cts +17 -17
- package/cjs/popover/popover-store.d.ts +17 -17
- package/cjs/radio/radio-store.cjs +9 -9
- package/cjs/radio/radio-store.d.cts +1 -1
- package/cjs/radio/radio-store.d.ts +1 -1
- package/cjs/select/select-store.cjs +32 -32
- package/cjs/select/select-store.d.cts +17 -17
- package/cjs/select/select-store.d.ts +17 -17
- package/cjs/tab/tab-store.cjs +32 -32
- package/cjs/tab/tab-store.d.cts +20 -20
- package/cjs/tab/tab-store.d.ts +20 -20
- package/cjs/tag/tag-store.cjs +16 -16
- package/cjs/tag/tag-store.d.cts +5 -5
- package/cjs/tag/tag-store.d.ts +5 -5
- package/cjs/toolbar/toolbar-store.cjs +8 -8
- package/cjs/tooltip/tooltip-store.cjs +13 -13
- package/cjs/utils/dom.cjs +2 -2
- package/cjs/utils/events.cjs +6 -6
- package/cjs/utils/focus.cjs +25 -24
- package/cjs/utils/misc.cjs +4 -2
- package/cjs/utils/misc.d.cts +4 -0
- package/cjs/utils/misc.d.ts +4 -0
- package/cjs/utils/platform.cjs +3 -3
- package/cjs/utils/store.cjs +3 -3
- package/cjs/utils/store.d.cts +1 -1
- package/cjs/utils/store.d.ts +1 -1
- package/cjs/utils/undo.cjs +2 -2
- package/esm/__chunks/{KMAUV3TY.js → 7KNZCZ55.js} +1 -1
- package/esm/__chunks/{37JWRFYW.js → G7XPWBXK.js} +3 -3
- package/esm/__chunks/{O6E4ZWCP.js → GMGLSF2B.js} +1 -1
- package/esm/__chunks/{PSMDSJUH.js → H7R2CY4Q.js} +3 -3
- package/esm/__chunks/{75BJEVSH.js → IHNLLH3I.js} +2 -2
- package/esm/__chunks/{AMRA5WUK.js → KZX46JDB.js} +11 -8
- package/esm/__chunks/{BFGNM53A.js → MJ4ZJEIM.js} +5 -5
- package/esm/__chunks/{TIQDSBWP.js → TEVO2DMI.js} +3 -3
- package/esm/__chunks/{7LM4Q2XB.js → U4NM2NCP.js} +1 -1
- package/esm/__chunks/{73UNQSFO.js → UNDE2QJS.js} +3 -3
- package/esm/__chunks/{XMCVU3LR.js → UWJK2WK2.js} +6 -0
- package/esm/__chunks/{SXKM4CGU.js → XTZ53NXG.js} +4 -4
- package/esm/checkbox/checkbox-store.d.ts +5 -5
- package/esm/checkbox/checkbox-store.js +2 -2
- package/esm/collection/collection-store.d.ts +5 -5
- package/esm/collection/collection-store.js +4 -4
- package/esm/combobox/combobox-store.d.ts +26 -26
- package/esm/combobox/combobox-store.js +9 -9
- package/esm/composite/composite-overflow-store.js +5 -5
- package/esm/composite/composite-store.d.ts +62 -54
- package/esm/composite/composite-store.js +5 -5
- package/esm/dialog/dialog-store.js +4 -4
- package/esm/disclosure/disclosure-store.d.ts +22 -22
- package/esm/disclosure/disclosure-store.js +3 -3
- package/esm/form/form-store.d.ts +14 -14
- package/esm/form/form-store.js +19 -15
- package/esm/hovercard/hovercard-store.d.ts +10 -10
- package/esm/hovercard/hovercard-store.js +6 -6
- package/esm/menu/menu-bar-store.js +6 -6
- package/esm/menu/menu-store.d.ts +10 -10
- package/esm/menu/menu-store.js +9 -9
- package/esm/menubar/menubar-store.js +6 -6
- package/esm/popover/popover-store.d.ts +17 -17
- package/esm/popover/popover-store.js +5 -5
- package/esm/radio/radio-store.d.ts +1 -1
- package/esm/radio/radio-store.js +5 -5
- package/esm/select/select-store.d.ts +17 -17
- package/esm/select/select-store.js +8 -8
- package/esm/tab/tab-store.d.ts +20 -20
- package/esm/tab/tab-store.js +5 -5
- package/esm/tag/tag-store.d.ts +5 -5
- package/esm/tag/tag-store.js +7 -7
- package/esm/toolbar/toolbar-store.js +5 -5
- package/esm/tooltip/tooltip-store.js +7 -7
- package/esm/utils/dom.js +1 -1
- package/esm/utils/events.js +4 -4
- package/esm/utils/focus.js +17 -16
- package/esm/utils/misc.d.ts +4 -0
- package/esm/utils/misc.js +3 -1
- package/esm/utils/platform.js +2 -2
- package/esm/utils/store.d.ts +1 -1
- package/esm/utils/store.js +2 -2
- package/esm/utils/undo.js +1 -1
- package/package.json +20 -21
- package/tsconfig.build.json +7 -2
- package/tsconfig.node.json +5 -0
- package/tsconfig.test.json +5 -0
|
@@ -1,14 +1,14 @@
|
|
|
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 _75F3RDBEcjs = require('../__chunks/75F3RDBE.cjs');
|
|
4
|
+
require('../__chunks/CVLMIMPT.cjs');
|
|
5
|
+
require('../__chunks/2RUCRSRF.cjs');
|
|
6
|
+
require('../__chunks/WMTGHDLE.cjs');
|
|
7
|
+
require('../__chunks/4TRESXTO.cjs');
|
|
8
8
|
|
|
9
9
|
// src/composite/composite-overflow-store.ts
|
|
10
10
|
function createCompositeOverflowStore(props = {}) {
|
|
11
|
-
return
|
|
11
|
+
return _75F3RDBEcjs.createPopoverStore.call(void 0, props);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _UGAVMSQJcjs = require('../__chunks/UGAVMSQJ.cjs');
|
|
4
4
|
require('../__chunks/GDZQUFNP.cjs');
|
|
5
|
-
require('../__chunks/
|
|
6
|
-
require('../__chunks/
|
|
7
|
-
require('../__chunks/
|
|
8
|
-
require('../__chunks/
|
|
5
|
+
require('../__chunks/VC22SYOD.cjs');
|
|
6
|
+
require('../__chunks/I4CBIWTX.cjs');
|
|
7
|
+
require('../__chunks/WMTGHDLE.cjs');
|
|
8
|
+
require('../__chunks/4TRESXTO.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.createCompositeStore =
|
|
11
|
+
exports.createCompositeStore = _UGAVMSQJcjs.createCompositeStore;
|
|
@@ -17,7 +17,7 @@ export interface CompositeStoreItem extends CollectionStoreItem {
|
|
|
17
17
|
/**
|
|
18
18
|
* The row id of the item. This is only used on two-dimensional composite
|
|
19
19
|
* widgets (when using
|
|
20
|
-
* [`CompositeRow`](https://ariakit.
|
|
20
|
+
* [`CompositeRow`](https://ariakit.com/reference/composite-row)).
|
|
21
21
|
*/
|
|
22
22
|
rowId?: string;
|
|
23
23
|
/**
|
|
@@ -42,7 +42,7 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
42
42
|
* contains composite items. However, in a combobox, it's the input element.
|
|
43
43
|
*
|
|
44
44
|
* Live examples:
|
|
45
|
-
* - [Sliding Menu](https://ariakit.
|
|
45
|
+
* - [Sliding Menu](https://ariakit.com/examples/menu-slide)
|
|
46
46
|
*/
|
|
47
47
|
baseElement: HTMLElement | null;
|
|
48
48
|
/**
|
|
@@ -54,12 +54,12 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
54
54
|
* virtual focus.
|
|
55
55
|
*
|
|
56
56
|
* In both scenarios, the item in focus will carry the
|
|
57
|
-
* [`data-active-item`](https://ariakit.
|
|
57
|
+
* [`data-active-item`](https://ariakit.com/guide/styling#data-active-item)
|
|
58
58
|
* attribute.
|
|
59
59
|
*
|
|
60
60
|
* Live examples:
|
|
61
61
|
* - [Select with Combobox and
|
|
62
|
-
* Tabs](https://ariakit.
|
|
62
|
+
* Tabs](https://ariakit.com/examples/select-combobox-tab)
|
|
63
63
|
* @default false
|
|
64
64
|
*/
|
|
65
65
|
virtualFocus: boolean;
|
|
@@ -77,8 +77,8 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
77
77
|
orientation: Orientation;
|
|
78
78
|
/**
|
|
79
79
|
* Determines how the
|
|
80
|
-
* [`next`](https://ariakit.
|
|
81
|
-
* [`previous`](https://ariakit.
|
|
80
|
+
* [`next`](https://ariakit.com/reference/use-composite-store#next) and
|
|
81
|
+
* [`previous`](https://ariakit.com/reference/use-composite-store#previous)
|
|
82
82
|
* functions will behave. If `rtl` is set to `true`, they will be inverted.
|
|
83
83
|
*
|
|
84
84
|
* This only affects the composite widget behavior. You still need to set
|
|
@@ -93,21 +93,21 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
93
93
|
* On one-dimensional composite widgets:
|
|
94
94
|
* - `true` loops from the last item to the first item and vice-versa.
|
|
95
95
|
* - `horizontal` loops only if
|
|
96
|
-
* [`orientation`](https://ariakit.
|
|
96
|
+
* [`orientation`](https://ariakit.com/reference/composite-provider#orientation)
|
|
97
97
|
* is `horizontal` or not set.
|
|
98
98
|
* - `vertical` loops only if
|
|
99
|
-
* [`orientation`](https://ariakit.
|
|
99
|
+
* [`orientation`](https://ariakit.com/reference/composite-provider#orientation)
|
|
100
100
|
* is `vertical` or not set.
|
|
101
101
|
* - If
|
|
102
|
-
* [`includesBaseElement`](https://ariakit.
|
|
102
|
+
* [`includesBaseElement`](https://ariakit.com/reference/composite-provider#includesbaseelement)
|
|
103
103
|
* is set to `true` (or
|
|
104
|
-
* [`activeId`](https://ariakit.
|
|
104
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
105
105
|
* is initially set to `null`), the composite element will be focused in
|
|
106
106
|
* between the last and first items.
|
|
107
107
|
*
|
|
108
108
|
* On two-dimensional composite widgets (when using
|
|
109
|
-
* [`CompositeRow`](https://ariakit.
|
|
110
|
-
* passing a [`rowId`](https://ariakit.
|
|
109
|
+
* [`CompositeRow`](https://ariakit.com/reference/composite-row) or explicitly
|
|
110
|
+
* passing a [`rowId`](https://ariakit.com/reference/composite-item#rowid)
|
|
111
111
|
* prop to composite items):
|
|
112
112
|
* - `true` loops from the last row/column item to the first item in the same
|
|
113
113
|
* row/column and vice-versa. If it's the last item in the last row, it
|
|
@@ -117,22 +117,22 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
117
117
|
* - `vertical` loops only from the last column item to the first item in the
|
|
118
118
|
* column row.
|
|
119
119
|
* - If
|
|
120
|
-
* [`includesBaseElement`](https://ariakit.
|
|
120
|
+
* [`includesBaseElement`](https://ariakit.com/reference/composite-provider#includesbaseelement)
|
|
121
121
|
* is set to `true` (or
|
|
122
|
-
* [`activeId`](https://ariakit.
|
|
122
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
123
123
|
* is initially set to `null`), vertical loop will have no effect as moving
|
|
124
124
|
* down from the last row or up from the first row will focus on the
|
|
125
125
|
* composite element.
|
|
126
126
|
* - If
|
|
127
|
-
* [`focusWrap`](https://ariakit.
|
|
127
|
+
* [`focusWrap`](https://ariakit.com/reference/composite-provider#focuswrap)
|
|
128
128
|
* matches the value of `focusLoop`, it'll wrap between the last item in the
|
|
129
129
|
* last row or column and the first item in the first row or column and
|
|
130
130
|
* vice-versa.
|
|
131
131
|
*
|
|
132
132
|
* Live examples:
|
|
133
|
-
* - [Command Menu](https://ariakit.
|
|
133
|
+
* - [Command Menu](https://ariakit.com/examples/dialog-combobox-command-menu)
|
|
134
134
|
* - [Command Menu with
|
|
135
|
-
* Tabs](https://ariakit.
|
|
135
|
+
* Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
|
|
136
136
|
* @default false
|
|
137
137
|
*/
|
|
138
138
|
focusLoop: boolean | Orientation;
|
|
@@ -145,14 +145,14 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
145
145
|
* - `horizontal` wraps only between rows.
|
|
146
146
|
* - `vertical` wraps only between columns.
|
|
147
147
|
* - If
|
|
148
|
-
* [`focusLoop`](https://ariakit.
|
|
148
|
+
* [`focusLoop`](https://ariakit.com/reference/composite-provider#focusloop)
|
|
149
149
|
* matches the value of `focusWrap`, it'll wrap between the last item in the
|
|
150
150
|
* last row or column and the first item in the first row or column and
|
|
151
151
|
* vice-versa.
|
|
152
152
|
*
|
|
153
153
|
* Live examples:
|
|
154
154
|
* - [Command Menu with
|
|
155
|
-
* Tabs](https://ariakit.
|
|
155
|
+
* Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
|
|
156
156
|
* @default false
|
|
157
157
|
*/
|
|
158
158
|
focusWrap: boolean | Orientation;
|
|
@@ -164,13 +164,13 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
164
164
|
*
|
|
165
165
|
* Live examples:
|
|
166
166
|
* - [Command Menu with
|
|
167
|
-
* Tabs](https://ariakit.
|
|
167
|
+
* Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
|
|
168
168
|
* @default false
|
|
169
169
|
*/
|
|
170
170
|
focusShift: boolean;
|
|
171
171
|
/**
|
|
172
172
|
* The number of times the
|
|
173
|
-
* [`move`](https://ariakit.
|
|
173
|
+
* [`move`](https://ariakit.com/reference/use-composite-store#move) function
|
|
174
174
|
* has been called.
|
|
175
175
|
*/
|
|
176
176
|
moves: number;
|
|
@@ -184,27 +184,27 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
184
184
|
*
|
|
185
185
|
* Live examples:
|
|
186
186
|
* - [Submenu with
|
|
187
|
-
* Combobox](https://ariakit.
|
|
188
|
-
* - [Command Menu](https://ariakit.
|
|
187
|
+
* Combobox](https://ariakit.com/examples/menu-nested-combobox)
|
|
188
|
+
* - [Command Menu](https://ariakit.com/examples/dialog-combobox-command-menu)
|
|
189
189
|
* @default false
|
|
190
190
|
*/
|
|
191
191
|
includesBaseElement: boolean;
|
|
192
192
|
/**
|
|
193
193
|
* The current active item `id`. The active item is the element within the
|
|
194
194
|
* composite widget that has either DOM or virtual focus (in case
|
|
195
|
-
* [`virtualFocus`](https://ariakit.
|
|
195
|
+
* [`virtualFocus`](https://ariakit.com/reference/composite-provider#virtualfocus)
|
|
196
196
|
* is enabled).
|
|
197
197
|
* - `null` represents the base composite element (the one with a [composite
|
|
198
198
|
* role](https://w3c.github.io/aria/#composite)). Users will be able to
|
|
199
199
|
* navigate out of it using arrow keys.
|
|
200
200
|
* - If `activeId` is initially set to `null`, the
|
|
201
|
-
* [`includesBaseElement`](https://ariakit.
|
|
201
|
+
* [`includesBaseElement`](https://ariakit.com/reference/composite-provider#includesbaseelement)
|
|
202
202
|
* prop will also default to `true`, which means the base composite element
|
|
203
203
|
* itself will have focus and users will be able to navigate to it using
|
|
204
204
|
* arrow keys.
|
|
205
205
|
*
|
|
206
206
|
* Live examples:
|
|
207
|
-
* - [Combobox with Tabs](https://ariakit.
|
|
207
|
+
* - [Combobox with Tabs](https://ariakit.com/examples/combobox-tabs)
|
|
208
208
|
*/
|
|
209
209
|
activeId: string | null | undefined;
|
|
210
210
|
}
|
|
@@ -215,9 +215,9 @@ export interface CompositeStoreFunctions<T extends CompositeStoreItem = Composit
|
|
|
215
215
|
setBaseElement: SetState<CompositeStoreState<T>["baseElement"]>;
|
|
216
216
|
/**
|
|
217
217
|
* Sets the
|
|
218
|
-
* [`activeId`](https://ariakit.
|
|
218
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
219
219
|
* state _without moving focus_. If you want to move focus, use the
|
|
220
|
-
* [`move`](https://ariakit.
|
|
220
|
+
* [`move`](https://ariakit.com/reference/use-composite-store#move) function
|
|
221
221
|
* instead.
|
|
222
222
|
* @example
|
|
223
223
|
* // Sets the composite element as the active item
|
|
@@ -234,11 +234,11 @@ export interface CompositeStoreFunctions<T extends CompositeStoreItem = Composit
|
|
|
234
234
|
* [composite role](https://w3c.github.io/aria/#composite)). Users will be
|
|
235
235
|
* able to navigate out of it using arrow keys.
|
|
236
236
|
* - If you want to set the active item id _without moving focus_, use the
|
|
237
|
-
* [`setActiveId`](https://ariakit.
|
|
237
|
+
* [`setActiveId`](https://ariakit.com/reference/use-composite-store#setactiveid)
|
|
238
238
|
* function instead.
|
|
239
239
|
*
|
|
240
240
|
* Live examples:
|
|
241
|
-
* - [Select Grid](https://ariakit.
|
|
241
|
+
* - [Select Grid](https://ariakit.com/examples/select-grid)
|
|
242
242
|
* @example
|
|
243
243
|
* // Moves focus to the composite element
|
|
244
244
|
* store.move(null);
|
|
@@ -250,52 +250,60 @@ export interface CompositeStoreFunctions<T extends CompositeStoreItem = Composit
|
|
|
250
250
|
move: (id?: string | null) => void;
|
|
251
251
|
/**
|
|
252
252
|
* Returns the id of the next enabled item based on the current
|
|
253
|
-
* [`activeId`](https://ariakit.
|
|
253
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
254
254
|
* state. You can pass additional options to override the current state.
|
|
255
255
|
* @example
|
|
256
256
|
* const nextId = store.next();
|
|
257
257
|
*/
|
|
258
|
-
next
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
258
|
+
next: {
|
|
259
|
+
(options?: NextOptions): string | null | undefined;
|
|
260
|
+
/**
|
|
261
|
+
* @deprecated Use the object syntax instead: `next({ skip: 2 })`.
|
|
262
|
+
*/
|
|
263
|
+
(skip?: number): string | null | undefined;
|
|
264
|
+
};
|
|
263
265
|
/**
|
|
264
266
|
* Returns the id of the previous enabled item based on the current
|
|
265
|
-
* [`activeId`](https://ariakit.
|
|
267
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
266
268
|
* state. You can pass additional options to override the current state.
|
|
267
269
|
* @example
|
|
268
270
|
* const previousId = store.previous();
|
|
269
271
|
*/
|
|
270
|
-
previous
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
previous: {
|
|
273
|
+
(options?: NextOptions): string | null | undefined;
|
|
274
|
+
/**
|
|
275
|
+
* @deprecated Use the object syntax instead: `previous({ skip: 2 })`.
|
|
276
|
+
*/
|
|
277
|
+
(skip?: number): string | null | undefined;
|
|
278
|
+
};
|
|
275
279
|
/**
|
|
276
280
|
* Returns the id of the enabled item above based on the current
|
|
277
|
-
* [`activeId`](https://ariakit.
|
|
281
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
278
282
|
* state. You can pass additional options to override the current state.
|
|
279
283
|
* @example
|
|
280
284
|
* const upId = store.up();
|
|
281
285
|
*/
|
|
282
|
-
up
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
up: {
|
|
287
|
+
(options?: NextOptions): string | null | undefined;
|
|
288
|
+
/**
|
|
289
|
+
* @deprecated Use the object syntax instead: `up({ skip: 2 })`.
|
|
290
|
+
*/
|
|
291
|
+
(skip?: number): string | null | undefined;
|
|
292
|
+
};
|
|
287
293
|
/**
|
|
288
294
|
* Returns the id of the enabled item below based on the current
|
|
289
|
-
* [`activeId`](https://ariakit.
|
|
295
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
290
296
|
* state. You can pass additional options to override the current state.
|
|
291
297
|
* @example
|
|
292
298
|
* const downId = store.down();
|
|
293
299
|
*/
|
|
294
|
-
down
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
300
|
+
down: {
|
|
301
|
+
(options?: NextOptions): string | null | undefined;
|
|
302
|
+
/**
|
|
303
|
+
* @deprecated Use the object syntax instead: `down({ skip: 2 })`.
|
|
304
|
+
*/
|
|
305
|
+
(skip?: number): string | null | undefined;
|
|
306
|
+
};
|
|
299
307
|
/**
|
|
300
308
|
* Returns the id of the first enabled item.
|
|
301
309
|
*/
|
|
@@ -17,7 +17,7 @@ export interface CompositeStoreItem extends CollectionStoreItem {
|
|
|
17
17
|
/**
|
|
18
18
|
* The row id of the item. This is only used on two-dimensional composite
|
|
19
19
|
* widgets (when using
|
|
20
|
-
* [`CompositeRow`](https://ariakit.
|
|
20
|
+
* [`CompositeRow`](https://ariakit.com/reference/composite-row)).
|
|
21
21
|
*/
|
|
22
22
|
rowId?: string;
|
|
23
23
|
/**
|
|
@@ -42,7 +42,7 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
42
42
|
* contains composite items. However, in a combobox, it's the input element.
|
|
43
43
|
*
|
|
44
44
|
* Live examples:
|
|
45
|
-
* - [Sliding Menu](https://ariakit.
|
|
45
|
+
* - [Sliding Menu](https://ariakit.com/examples/menu-slide)
|
|
46
46
|
*/
|
|
47
47
|
baseElement: HTMLElement | null;
|
|
48
48
|
/**
|
|
@@ -54,12 +54,12 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
54
54
|
* virtual focus.
|
|
55
55
|
*
|
|
56
56
|
* In both scenarios, the item in focus will carry the
|
|
57
|
-
* [`data-active-item`](https://ariakit.
|
|
57
|
+
* [`data-active-item`](https://ariakit.com/guide/styling#data-active-item)
|
|
58
58
|
* attribute.
|
|
59
59
|
*
|
|
60
60
|
* Live examples:
|
|
61
61
|
* - [Select with Combobox and
|
|
62
|
-
* Tabs](https://ariakit.
|
|
62
|
+
* Tabs](https://ariakit.com/examples/select-combobox-tab)
|
|
63
63
|
* @default false
|
|
64
64
|
*/
|
|
65
65
|
virtualFocus: boolean;
|
|
@@ -77,8 +77,8 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
77
77
|
orientation: Orientation;
|
|
78
78
|
/**
|
|
79
79
|
* Determines how the
|
|
80
|
-
* [`next`](https://ariakit.
|
|
81
|
-
* [`previous`](https://ariakit.
|
|
80
|
+
* [`next`](https://ariakit.com/reference/use-composite-store#next) and
|
|
81
|
+
* [`previous`](https://ariakit.com/reference/use-composite-store#previous)
|
|
82
82
|
* functions will behave. If `rtl` is set to `true`, they will be inverted.
|
|
83
83
|
*
|
|
84
84
|
* This only affects the composite widget behavior. You still need to set
|
|
@@ -93,21 +93,21 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
93
93
|
* On one-dimensional composite widgets:
|
|
94
94
|
* - `true` loops from the last item to the first item and vice-versa.
|
|
95
95
|
* - `horizontal` loops only if
|
|
96
|
-
* [`orientation`](https://ariakit.
|
|
96
|
+
* [`orientation`](https://ariakit.com/reference/composite-provider#orientation)
|
|
97
97
|
* is `horizontal` or not set.
|
|
98
98
|
* - `vertical` loops only if
|
|
99
|
-
* [`orientation`](https://ariakit.
|
|
99
|
+
* [`orientation`](https://ariakit.com/reference/composite-provider#orientation)
|
|
100
100
|
* is `vertical` or not set.
|
|
101
101
|
* - If
|
|
102
|
-
* [`includesBaseElement`](https://ariakit.
|
|
102
|
+
* [`includesBaseElement`](https://ariakit.com/reference/composite-provider#includesbaseelement)
|
|
103
103
|
* is set to `true` (or
|
|
104
|
-
* [`activeId`](https://ariakit.
|
|
104
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
105
105
|
* is initially set to `null`), the composite element will be focused in
|
|
106
106
|
* between the last and first items.
|
|
107
107
|
*
|
|
108
108
|
* On two-dimensional composite widgets (when using
|
|
109
|
-
* [`CompositeRow`](https://ariakit.
|
|
110
|
-
* passing a [`rowId`](https://ariakit.
|
|
109
|
+
* [`CompositeRow`](https://ariakit.com/reference/composite-row) or explicitly
|
|
110
|
+
* passing a [`rowId`](https://ariakit.com/reference/composite-item#rowid)
|
|
111
111
|
* prop to composite items):
|
|
112
112
|
* - `true` loops from the last row/column item to the first item in the same
|
|
113
113
|
* row/column and vice-versa. If it's the last item in the last row, it
|
|
@@ -117,22 +117,22 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
117
117
|
* - `vertical` loops only from the last column item to the first item in the
|
|
118
118
|
* column row.
|
|
119
119
|
* - If
|
|
120
|
-
* [`includesBaseElement`](https://ariakit.
|
|
120
|
+
* [`includesBaseElement`](https://ariakit.com/reference/composite-provider#includesbaseelement)
|
|
121
121
|
* is set to `true` (or
|
|
122
|
-
* [`activeId`](https://ariakit.
|
|
122
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
123
123
|
* is initially set to `null`), vertical loop will have no effect as moving
|
|
124
124
|
* down from the last row or up from the first row will focus on the
|
|
125
125
|
* composite element.
|
|
126
126
|
* - If
|
|
127
|
-
* [`focusWrap`](https://ariakit.
|
|
127
|
+
* [`focusWrap`](https://ariakit.com/reference/composite-provider#focuswrap)
|
|
128
128
|
* matches the value of `focusLoop`, it'll wrap between the last item in the
|
|
129
129
|
* last row or column and the first item in the first row or column and
|
|
130
130
|
* vice-versa.
|
|
131
131
|
*
|
|
132
132
|
* Live examples:
|
|
133
|
-
* - [Command Menu](https://ariakit.
|
|
133
|
+
* - [Command Menu](https://ariakit.com/examples/dialog-combobox-command-menu)
|
|
134
134
|
* - [Command Menu with
|
|
135
|
-
* Tabs](https://ariakit.
|
|
135
|
+
* Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
|
|
136
136
|
* @default false
|
|
137
137
|
*/
|
|
138
138
|
focusLoop: boolean | Orientation;
|
|
@@ -145,14 +145,14 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
145
145
|
* - `horizontal` wraps only between rows.
|
|
146
146
|
* - `vertical` wraps only between columns.
|
|
147
147
|
* - If
|
|
148
|
-
* [`focusLoop`](https://ariakit.
|
|
148
|
+
* [`focusLoop`](https://ariakit.com/reference/composite-provider#focusloop)
|
|
149
149
|
* matches the value of `focusWrap`, it'll wrap between the last item in the
|
|
150
150
|
* last row or column and the first item in the first row or column and
|
|
151
151
|
* vice-versa.
|
|
152
152
|
*
|
|
153
153
|
* Live examples:
|
|
154
154
|
* - [Command Menu with
|
|
155
|
-
* Tabs](https://ariakit.
|
|
155
|
+
* Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
|
|
156
156
|
* @default false
|
|
157
157
|
*/
|
|
158
158
|
focusWrap: boolean | Orientation;
|
|
@@ -164,13 +164,13 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
164
164
|
*
|
|
165
165
|
* Live examples:
|
|
166
166
|
* - [Command Menu with
|
|
167
|
-
* Tabs](https://ariakit.
|
|
167
|
+
* Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
|
|
168
168
|
* @default false
|
|
169
169
|
*/
|
|
170
170
|
focusShift: boolean;
|
|
171
171
|
/**
|
|
172
172
|
* The number of times the
|
|
173
|
-
* [`move`](https://ariakit.
|
|
173
|
+
* [`move`](https://ariakit.com/reference/use-composite-store#move) function
|
|
174
174
|
* has been called.
|
|
175
175
|
*/
|
|
176
176
|
moves: number;
|
|
@@ -184,27 +184,27 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
184
184
|
*
|
|
185
185
|
* Live examples:
|
|
186
186
|
* - [Submenu with
|
|
187
|
-
* Combobox](https://ariakit.
|
|
188
|
-
* - [Command Menu](https://ariakit.
|
|
187
|
+
* Combobox](https://ariakit.com/examples/menu-nested-combobox)
|
|
188
|
+
* - [Command Menu](https://ariakit.com/examples/dialog-combobox-command-menu)
|
|
189
189
|
* @default false
|
|
190
190
|
*/
|
|
191
191
|
includesBaseElement: boolean;
|
|
192
192
|
/**
|
|
193
193
|
* The current active item `id`. The active item is the element within the
|
|
194
194
|
* composite widget that has either DOM or virtual focus (in case
|
|
195
|
-
* [`virtualFocus`](https://ariakit.
|
|
195
|
+
* [`virtualFocus`](https://ariakit.com/reference/composite-provider#virtualfocus)
|
|
196
196
|
* is enabled).
|
|
197
197
|
* - `null` represents the base composite element (the one with a [composite
|
|
198
198
|
* role](https://w3c.github.io/aria/#composite)). Users will be able to
|
|
199
199
|
* navigate out of it using arrow keys.
|
|
200
200
|
* - If `activeId` is initially set to `null`, the
|
|
201
|
-
* [`includesBaseElement`](https://ariakit.
|
|
201
|
+
* [`includesBaseElement`](https://ariakit.com/reference/composite-provider#includesbaseelement)
|
|
202
202
|
* prop will also default to `true`, which means the base composite element
|
|
203
203
|
* itself will have focus and users will be able to navigate to it using
|
|
204
204
|
* arrow keys.
|
|
205
205
|
*
|
|
206
206
|
* Live examples:
|
|
207
|
-
* - [Combobox with Tabs](https://ariakit.
|
|
207
|
+
* - [Combobox with Tabs](https://ariakit.com/examples/combobox-tabs)
|
|
208
208
|
*/
|
|
209
209
|
activeId: string | null | undefined;
|
|
210
210
|
}
|
|
@@ -215,9 +215,9 @@ export interface CompositeStoreFunctions<T extends CompositeStoreItem = Composit
|
|
|
215
215
|
setBaseElement: SetState<CompositeStoreState<T>["baseElement"]>;
|
|
216
216
|
/**
|
|
217
217
|
* Sets the
|
|
218
|
-
* [`activeId`](https://ariakit.
|
|
218
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
219
219
|
* state _without moving focus_. If you want to move focus, use the
|
|
220
|
-
* [`move`](https://ariakit.
|
|
220
|
+
* [`move`](https://ariakit.com/reference/use-composite-store#move) function
|
|
221
221
|
* instead.
|
|
222
222
|
* @example
|
|
223
223
|
* // Sets the composite element as the active item
|
|
@@ -234,11 +234,11 @@ export interface CompositeStoreFunctions<T extends CompositeStoreItem = Composit
|
|
|
234
234
|
* [composite role](https://w3c.github.io/aria/#composite)). Users will be
|
|
235
235
|
* able to navigate out of it using arrow keys.
|
|
236
236
|
* - If you want to set the active item id _without moving focus_, use the
|
|
237
|
-
* [`setActiveId`](https://ariakit.
|
|
237
|
+
* [`setActiveId`](https://ariakit.com/reference/use-composite-store#setactiveid)
|
|
238
238
|
* function instead.
|
|
239
239
|
*
|
|
240
240
|
* Live examples:
|
|
241
|
-
* - [Select Grid](https://ariakit.
|
|
241
|
+
* - [Select Grid](https://ariakit.com/examples/select-grid)
|
|
242
242
|
* @example
|
|
243
243
|
* // Moves focus to the composite element
|
|
244
244
|
* store.move(null);
|
|
@@ -250,52 +250,60 @@ export interface CompositeStoreFunctions<T extends CompositeStoreItem = Composit
|
|
|
250
250
|
move: (id?: string | null) => void;
|
|
251
251
|
/**
|
|
252
252
|
* Returns the id of the next enabled item based on the current
|
|
253
|
-
* [`activeId`](https://ariakit.
|
|
253
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
254
254
|
* state. You can pass additional options to override the current state.
|
|
255
255
|
* @example
|
|
256
256
|
* const nextId = store.next();
|
|
257
257
|
*/
|
|
258
|
-
next
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
258
|
+
next: {
|
|
259
|
+
(options?: NextOptions): string | null | undefined;
|
|
260
|
+
/**
|
|
261
|
+
* @deprecated Use the object syntax instead: `next({ skip: 2 })`.
|
|
262
|
+
*/
|
|
263
|
+
(skip?: number): string | null | undefined;
|
|
264
|
+
};
|
|
263
265
|
/**
|
|
264
266
|
* Returns the id of the previous enabled item based on the current
|
|
265
|
-
* [`activeId`](https://ariakit.
|
|
267
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
266
268
|
* state. You can pass additional options to override the current state.
|
|
267
269
|
* @example
|
|
268
270
|
* const previousId = store.previous();
|
|
269
271
|
*/
|
|
270
|
-
previous
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
previous: {
|
|
273
|
+
(options?: NextOptions): string | null | undefined;
|
|
274
|
+
/**
|
|
275
|
+
* @deprecated Use the object syntax instead: `previous({ skip: 2 })`.
|
|
276
|
+
*/
|
|
277
|
+
(skip?: number): string | null | undefined;
|
|
278
|
+
};
|
|
275
279
|
/**
|
|
276
280
|
* Returns the id of the enabled item above based on the current
|
|
277
|
-
* [`activeId`](https://ariakit.
|
|
281
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
278
282
|
* state. You can pass additional options to override the current state.
|
|
279
283
|
* @example
|
|
280
284
|
* const upId = store.up();
|
|
281
285
|
*/
|
|
282
|
-
up
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
up: {
|
|
287
|
+
(options?: NextOptions): string | null | undefined;
|
|
288
|
+
/**
|
|
289
|
+
* @deprecated Use the object syntax instead: `up({ skip: 2 })`.
|
|
290
|
+
*/
|
|
291
|
+
(skip?: number): string | null | undefined;
|
|
292
|
+
};
|
|
287
293
|
/**
|
|
288
294
|
* Returns the id of the enabled item below based on the current
|
|
289
|
-
* [`activeId`](https://ariakit.
|
|
295
|
+
* [`activeId`](https://ariakit.com/reference/composite-provider#activeid)
|
|
290
296
|
* state. You can pass additional options to override the current state.
|
|
291
297
|
* @example
|
|
292
298
|
* const downId = store.down();
|
|
293
299
|
*/
|
|
294
|
-
down
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
300
|
+
down: {
|
|
301
|
+
(options?: NextOptions): string | null | undefined;
|
|
302
|
+
/**
|
|
303
|
+
* @deprecated Use the object syntax instead: `down({ skip: 2 })`.
|
|
304
|
+
*/
|
|
305
|
+
(skip?: number): string | null | undefined;
|
|
306
|
+
};
|
|
299
307
|
/**
|
|
300
308
|
* Returns the id of the first enabled item.
|
|
301
309
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
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 _CVLMIMPTcjs = require('../__chunks/CVLMIMPT.cjs');
|
|
4
|
+
require('../__chunks/2RUCRSRF.cjs');
|
|
5
|
+
require('../__chunks/WMTGHDLE.cjs');
|
|
6
|
+
require('../__chunks/4TRESXTO.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.createDialogStore =
|
|
9
|
+
exports.createDialogStore = _CVLMIMPTcjs.createDialogStore;
|
|
@@ -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 _2RUCRSRFcjs = require('../__chunks/2RUCRSRF.cjs');
|
|
4
|
+
require('../__chunks/WMTGHDLE.cjs');
|
|
5
|
+
require('../__chunks/4TRESXTO.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.createDisclosureStore =
|
|
8
|
+
exports.createDisclosureStore = _2RUCRSRFcjs.createDisclosureStore;
|