@ariakit/core 0.3.8 → 0.3.10
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 +10 -0
- package/cjs/__chunks/{2UK5WUJX.cjs → 5CBCKBZ2.cjs} +0 -2
- package/cjs/__chunks/{3J44Z7YH.cjs → CWDUO5EV.cjs} +4 -4
- package/cjs/__chunks/{5SIVMOID.cjs → HMO4CKUP.cjs} +4 -4
- package/cjs/__chunks/{2LS4JJ4S.cjs → MFSCSSBJ.cjs} +2 -2
- package/cjs/__chunks/{GJFZ5ZPP.cjs → MWNFQD55.cjs} +11 -11
- package/cjs/__chunks/{EFIT5L4X.cjs → Y6PHIDP6.cjs} +7 -7
- package/cjs/__chunks/{ZQTYFYRS.cjs → YLMJBIQM.cjs} +26 -21
- package/cjs/__chunks/{QAZ4PF7S.cjs → ZXCB7MXN.cjs} +6 -6
- package/cjs/checkbox/checkbox-store.cjs +3 -3
- package/cjs/checkbox/checkbox-store.d.cts +5 -2
- package/cjs/checkbox/checkbox-store.d.ts +5 -2
- package/cjs/collection/collection-store.cjs +3 -3
- package/cjs/collection/collection-store.d.cts +11 -11
- package/cjs/collection/collection-store.d.ts +11 -11
- package/cjs/combobox/combobox-store.cjs +20 -20
- package/cjs/combobox/combobox-store.d.cts +5 -1
- package/cjs/combobox/combobox-store.d.ts +5 -1
- package/cjs/composite/composite-overflow-store.cjs +5 -5
- package/cjs/composite/composite-store.cjs +4 -4
- package/cjs/composite/composite-store.d.cts +134 -53
- package/cjs/composite/composite-store.d.ts +134 -53
- package/cjs/dialog/dialog-store.cjs +4 -4
- package/cjs/disclosure/disclosure-store.cjs +3 -3
- package/cjs/disclosure/disclosure-store.d.cts +33 -27
- package/cjs/disclosure/disclosure-store.d.ts +33 -27
- package/cjs/form/form-store.cjs +7 -7
- package/cjs/form/form-store.d.cts +34 -25
- package/cjs/form/form-store.d.ts +34 -25
- package/cjs/hovercard/hovercard-store.cjs +6 -6
- package/cjs/hovercard/hovercard-store.d.cts +6 -2
- package/cjs/hovercard/hovercard-store.d.ts +6 -2
- package/cjs/menu/menu-bar-store.cjs +5 -5
- package/cjs/menu/menu-store.cjs +18 -18
- package/cjs/menu/menu-store.d.cts +12 -2
- package/cjs/menu/menu-store.d.ts +12 -2
- package/cjs/menubar/menubar-store.cjs +5 -5
- package/cjs/popover/popover-store.cjs +5 -5
- package/cjs/popover/popover-store.d.cts +2 -0
- package/cjs/popover/popover-store.d.ts +2 -0
- package/cjs/radio/radio-store.cjs +5 -5
- package/cjs/select/select-store.cjs +18 -18
- package/cjs/tab/tab-store.cjs +15 -15
- package/cjs/tab/tab-store.d.cts +15 -4
- package/cjs/tab/tab-store.d.ts +15 -4
- package/cjs/toolbar/toolbar-store.cjs +4 -4
- package/cjs/tooltip/tooltip-store.cjs +7 -7
- package/cjs/utils/store.cjs +2 -2
- package/esm/__chunks/{LT2OYWRD.js → 25MEC56I.js} +1 -1
- package/esm/__chunks/{J6JIOWCS.js → AKMSZ36N.js} +2 -2
- package/esm/__chunks/{A2J4XZ5T.js → K6ELJFXN.js} +0 -2
- package/esm/__chunks/{NKLTHWCR.js → L5RYKTVQ.js} +1 -1
- package/esm/__chunks/{HMQYEBKF.js → MYUKSFP5.js} +20 -15
- package/esm/__chunks/{T3DVYGXI.js → QJ5CUA32.js} +2 -2
- package/esm/__chunks/{A2AGSVJO.js → UUFF4PQ6.js} +2 -2
- package/esm/__chunks/{CTZ2GQIZ.js → VEUNYQYR.js} +2 -2
- package/esm/checkbox/checkbox-store.d.ts +5 -2
- package/esm/checkbox/checkbox-store.js +1 -1
- package/esm/collection/collection-store.d.ts +11 -11
- package/esm/collection/collection-store.js +2 -2
- package/esm/combobox/combobox-store.d.ts +5 -1
- package/esm/combobox/combobox-store.js +6 -6
- package/esm/composite/composite-overflow-store.js +4 -4
- package/esm/composite/composite-store.d.ts +134 -53
- package/esm/composite/composite-store.js +3 -3
- package/esm/dialog/dialog-store.js +3 -3
- package/esm/disclosure/disclosure-store.d.ts +33 -27
- package/esm/disclosure/disclosure-store.js +2 -2
- package/esm/form/form-store.d.ts +34 -25
- package/esm/form/form-store.js +2 -2
- package/esm/hovercard/hovercard-store.d.ts +6 -2
- package/esm/hovercard/hovercard-store.js +5 -5
- package/esm/menu/menu-bar-store.js +4 -4
- package/esm/menu/menu-store.d.ts +12 -2
- package/esm/menu/menu-store.js +7 -7
- package/esm/menubar/menubar-store.js +4 -4
- package/esm/popover/popover-store.d.ts +2 -0
- package/esm/popover/popover-store.js +4 -4
- package/esm/radio/radio-store.js +3 -3
- package/esm/select/select-store.js +6 -6
- package/esm/tab/tab-store.d.ts +15 -4
- package/esm/tab/tab-store.js +3 -3
- package/esm/toolbar/toolbar-store.js +3 -3
- package/esm/tooltip/tooltip-store.js +5 -5
- package/esm/utils/store.js +1 -1
- package/package.json +1 -1
|
@@ -32,7 +32,9 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
|
|
|
32
32
|
*/
|
|
33
33
|
value: string;
|
|
34
34
|
/**
|
|
35
|
-
* The value of the
|
|
35
|
+
* The value of the currently active item. This state automatically updates as
|
|
36
|
+
* the user navigates the combobox items either by keyboard or mouse click.
|
|
37
|
+
* Note that it doesn't update when the user simply hovers over the items.
|
|
36
38
|
*/
|
|
37
39
|
activeValue: string | undefined;
|
|
38
40
|
/**
|
|
@@ -59,6 +61,8 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
|
|
|
59
61
|
* Combobox](https://ariakit.org/examples/combobox-multiple)
|
|
60
62
|
* - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
|
|
61
63
|
* - [Select with Combobox](https://ariakit.org/examples/select-combobox)
|
|
64
|
+
* - [Submenu with
|
|
65
|
+
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
62
66
|
*/
|
|
63
67
|
resetValueOnHide: boolean;
|
|
64
68
|
/**
|
|
@@ -32,7 +32,9 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
|
|
|
32
32
|
*/
|
|
33
33
|
value: string;
|
|
34
34
|
/**
|
|
35
|
-
* The value of the
|
|
35
|
+
* The value of the currently active item. This state automatically updates as
|
|
36
|
+
* the user navigates the combobox items either by keyboard or mouse click.
|
|
37
|
+
* Note that it doesn't update when the user simply hovers over the items.
|
|
36
38
|
*/
|
|
37
39
|
activeValue: string | undefined;
|
|
38
40
|
/**
|
|
@@ -59,6 +61,8 @@ export interface ComboboxStoreState<T extends ComboboxStoreSelectedValue = Combo
|
|
|
59
61
|
* Combobox](https://ariakit.org/examples/combobox-multiple)
|
|
60
62
|
* - [Menu with Combobox](https://ariakit.org/examples/menu-combobox)
|
|
61
63
|
* - [Select with Combobox](https://ariakit.org/examples/select-combobox)
|
|
64
|
+
* - [Submenu with
|
|
65
|
+
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
62
66
|
*/
|
|
63
67
|
resetValueOnHide: boolean;
|
|
64
68
|
/**
|
|
@@ -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 _Y6PHIDP6cjs = require('../__chunks/Y6PHIDP6.cjs');
|
|
5
|
+
require('../__chunks/MFSCSSBJ.cjs');
|
|
6
|
+
require('../__chunks/MWNFQD55.cjs');
|
|
7
|
+
require('../__chunks/5CBCKBZ2.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 _Y6PHIDP6cjs.createPopoverStore.call(void 0, props);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
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 _ZXCB7MXNcjs = require('../__chunks/ZXCB7MXN.cjs');
|
|
5
|
+
require('../__chunks/YLMJBIQM.cjs');
|
|
6
|
+
require('../__chunks/5CBCKBZ2.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 = _ZXCB7MXNcjs.createCompositeStore;
|
|
@@ -9,13 +9,14 @@ export declare function createCompositeStore<T extends CompositeStoreItem = Comp
|
|
|
9
9
|
export type CompositeStoreOrientation = Orientation;
|
|
10
10
|
export interface CompositeStoreItem extends CollectionStoreItem {
|
|
11
11
|
/**
|
|
12
|
-
* The row id of the item. This is only used on two-dimensional
|
|
13
|
-
* (when using
|
|
12
|
+
* The row id of the item. This is only used on two-dimensional composite
|
|
13
|
+
* widgets (when using
|
|
14
|
+
* [`CompositeRow`](https://ariakit.org/reference/composite-row)).
|
|
14
15
|
*/
|
|
15
16
|
rowId?: string;
|
|
16
17
|
/**
|
|
17
|
-
* If enabled, the item will be disabled and users won't be able to focus
|
|
18
|
-
* using arrow keys.
|
|
18
|
+
* If enabled, the item will be disabled and users won't be able to focus on
|
|
19
|
+
* it using arrow keys.
|
|
19
20
|
*/
|
|
20
21
|
disabled?: boolean;
|
|
21
22
|
/**
|
|
@@ -25,7 +26,11 @@ export interface CompositeStoreItem extends CollectionStoreItem {
|
|
|
25
26
|
}
|
|
26
27
|
export interface CompositeStoreState<T extends CompositeStoreItem = CompositeStoreItem> extends CollectionStoreState<T> {
|
|
27
28
|
/**
|
|
28
|
-
* The composite element.
|
|
29
|
+
* The composite element itself. Typically, it's the wrapper element that
|
|
30
|
+
* contains composite items. However, in a combobox, it's the input element.
|
|
31
|
+
*
|
|
32
|
+
* Live examples:
|
|
33
|
+
* - [Sliding Menu](https://ariakit.org/examples/menu-slide)
|
|
29
34
|
*/
|
|
30
35
|
baseElement: HTMLElement | null;
|
|
31
36
|
/**
|
|
@@ -35,6 +40,10 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
35
40
|
* tabindex](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex).
|
|
36
41
|
* DOM focus will remain on the composite element while its items receive
|
|
37
42
|
* virtual focus.
|
|
43
|
+
*
|
|
44
|
+
* In both scenarios, the item in focus will carry the
|
|
45
|
+
* [`data-active-item`](https://ariakit.org/guide/styling#data-active-item)
|
|
46
|
+
* attribute.
|
|
38
47
|
* @default false
|
|
39
48
|
*/
|
|
40
49
|
virtualFocus: boolean;
|
|
@@ -51,9 +60,13 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
51
60
|
*/
|
|
52
61
|
orientation: Orientation;
|
|
53
62
|
/**
|
|
54
|
-
* Determines how the
|
|
55
|
-
*
|
|
56
|
-
*
|
|
63
|
+
* Determines how the
|
|
64
|
+
* [`next`](https://ariakit.org/reference/use-composite-store#next) and
|
|
65
|
+
* [`previous`](https://ariakit.org/reference/use-composite-store#previous)
|
|
66
|
+
* functions will behave. If `rtl` is set to `true`, they will be inverted.
|
|
67
|
+
*
|
|
68
|
+
* This only affects the composite widget behavior. You still need to set
|
|
69
|
+
* `dir="rtl"` on HTML/CSS.
|
|
57
70
|
* @default false
|
|
58
71
|
*/
|
|
59
72
|
rtl: boolean;
|
|
@@ -61,15 +74,25 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
61
74
|
* Determines how the focus behaves when the user reaches the end of the
|
|
62
75
|
* composite widget.
|
|
63
76
|
*
|
|
64
|
-
* On one-dimensional
|
|
77
|
+
* On one-dimensional composite widgets:
|
|
65
78
|
* - `true` loops from the last item to the first item and vice-versa.
|
|
66
|
-
* - `horizontal` loops only if
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
79
|
+
* - `horizontal` loops only if
|
|
80
|
+
* [`orientation`](https://ariakit.org/reference/composite-provider#orientation)
|
|
81
|
+
* is `horizontal` or not set.
|
|
82
|
+
* - `vertical` loops only if
|
|
83
|
+
* [`orientation`](https://ariakit.org/reference/composite-provider#orientation)
|
|
84
|
+
* is `vertical` or not set.
|
|
85
|
+
* - If
|
|
86
|
+
* [`includesBaseElement`](https://ariakit.org/reference/composite-provider#includesbaseelement)
|
|
87
|
+
* is set to `true` (or
|
|
88
|
+
* [`activeId`](https://ariakit.org/reference/composite-provider#activeid)
|
|
89
|
+
* is initially set to `null`), the composite element will be focused in
|
|
90
|
+
* between the last and first items.
|
|
71
91
|
*
|
|
72
|
-
* On two-dimensional
|
|
92
|
+
* On two-dimensional composite widgets (when using
|
|
93
|
+
* [`CompositeRow`](https://ariakit.org/reference/composite-row) or explicitly
|
|
94
|
+
* passing a [`rowId`](https://ariakit.org/reference/composite-item#rowid)
|
|
95
|
+
* prop to composite items):
|
|
73
96
|
* - `true` loops from the last row/column item to the first item in the same
|
|
74
97
|
* row/column and vice-versa. If it's the last item in the last row, it
|
|
75
98
|
* moves to the first item in the first row and vice-versa.
|
|
@@ -77,64 +100,99 @@ export interface CompositeStoreState<T extends CompositeStoreItem = CompositeSto
|
|
|
77
100
|
* same row.
|
|
78
101
|
* - `vertical` loops only from the last column item to the first item in the
|
|
79
102
|
* column row.
|
|
80
|
-
* - If
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* or
|
|
103
|
+
* - If
|
|
104
|
+
* [`includesBaseElement`](https://ariakit.org/reference/composite-provider#includesbaseelement)
|
|
105
|
+
* is set to `true` (or
|
|
106
|
+
* [`activeId`](https://ariakit.org/reference/composite-provider#activeid)
|
|
107
|
+
* is initially set to `null`), vertical loop will have no effect as moving
|
|
108
|
+
* down from the last row or up from the first row will focus on the
|
|
109
|
+
* composite element.
|
|
110
|
+
* - If
|
|
111
|
+
* [`focusWrap`](https://ariakit.org/reference/composite-provider#focuswrap)
|
|
112
|
+
* matches the value of `focusLoop`, it'll wrap between the last item in the
|
|
113
|
+
* last row or column and the first item in the first row or column and
|
|
114
|
+
* vice-versa.
|
|
86
115
|
* @default false
|
|
87
116
|
*/
|
|
88
117
|
focusLoop: boolean | Orientation;
|
|
89
118
|
/**
|
|
90
|
-
* **Works only on two-dimensional
|
|
91
|
-
*
|
|
92
|
-
* the next row or column
|
|
119
|
+
* **Works only on two-dimensional composite widgets**.
|
|
120
|
+
*
|
|
121
|
+
* If enabled, moving to the next item from the last one in a row or column
|
|
122
|
+
* will focus on the first item in the next row or column and vice-versa.
|
|
93
123
|
* - `true` wraps between rows and columns.
|
|
94
124
|
* - `horizontal` wraps only between rows.
|
|
95
125
|
* - `vertical` wraps only between columns.
|
|
96
|
-
* - If
|
|
97
|
-
*
|
|
98
|
-
*
|
|
126
|
+
* - If
|
|
127
|
+
* [`focusLoop`](https://ariakit.org/reference/composite-provider#focusloop)
|
|
128
|
+
* matches the value of `focusWrap`, it'll wrap between the last item in the
|
|
129
|
+
* last row or column and the first item in the first row or column and
|
|
130
|
+
* vice-versa.
|
|
99
131
|
* @default false
|
|
100
132
|
*/
|
|
101
133
|
focusWrap: boolean | Orientation;
|
|
102
134
|
/**
|
|
103
|
-
* **Works only on two-dimensional
|
|
104
|
-
*
|
|
105
|
-
*
|
|
135
|
+
* **Works only on two-dimensional composite widgets**.
|
|
136
|
+
*
|
|
137
|
+
* If enabled, moving up or down when there's no next item or when the next
|
|
138
|
+
* item is disabled will shift to the item right before it.
|
|
106
139
|
* @default false
|
|
107
140
|
*/
|
|
108
141
|
focusShift: boolean;
|
|
109
142
|
/**
|
|
110
|
-
* The number of times the
|
|
143
|
+
* The number of times the
|
|
144
|
+
* [`move`](https://ariakit.org/reference/use-composite-store#move) function
|
|
145
|
+
* has been called.
|
|
111
146
|
*/
|
|
112
147
|
moves: number;
|
|
113
148
|
/**
|
|
114
|
-
* Indicates
|
|
115
|
-
*
|
|
149
|
+
* Indicates if the composite base element (the one with a [composite
|
|
150
|
+
* role](https://w3c.github.io/aria/#composite)) should be part of the focus
|
|
151
|
+
* order when navigating with arrow keys. In other words, moving to the
|
|
152
|
+
* previous element when the first item is in focus will focus on the
|
|
153
|
+
* composite element itself. The same applies to the last item when moving to
|
|
154
|
+
* the next element.
|
|
155
|
+
*
|
|
156
|
+
* Live examples:
|
|
157
|
+
* - [Submenu with
|
|
158
|
+
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
159
|
+
* - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
|
|
116
160
|
* @default false
|
|
117
161
|
*/
|
|
118
162
|
includesBaseElement: boolean;
|
|
119
163
|
/**
|
|
120
|
-
* The current
|
|
121
|
-
*
|
|
164
|
+
* The current active item `id`. The active item is the element within the
|
|
165
|
+
* composite widget that has either DOM or virtual focus (in case
|
|
166
|
+
* [`virtualFocus`](https://ariakit.org/reference/composite-provider#virtualfocus)
|
|
167
|
+
* is enabled).
|
|
168
|
+
* - `null` represents the base composite element (the one with a [composite
|
|
169
|
+
* role](https://w3c.github.io/aria/#composite)). Users will be able to
|
|
122
170
|
* navigate out of it using arrow keys.
|
|
123
|
-
* - If `activeId` is initially set to `null`, the
|
|
124
|
-
*
|
|
171
|
+
* - If `activeId` is initially set to `null`, the
|
|
172
|
+
* [`includesBaseElement`](https://ariakit.org/reference/composite-provider#includesbaseelement)
|
|
173
|
+
* prop will also default to `true`, which means the base composite element
|
|
125
174
|
* itself will have focus and users will be able to navigate to it using
|
|
126
175
|
* arrow keys.
|
|
176
|
+
*
|
|
177
|
+
* Live examples:
|
|
178
|
+
* - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
|
|
127
179
|
*/
|
|
128
180
|
activeId: string | null | undefined;
|
|
129
181
|
}
|
|
130
182
|
export interface CompositeStoreFunctions<T extends CompositeStoreItem = CompositeStoreItem> extends CollectionStoreFunctions<T> {
|
|
131
183
|
/**
|
|
132
|
-
* Sets the `baseElement
|
|
184
|
+
* Sets the `baseElement` state.
|
|
133
185
|
*/
|
|
134
186
|
setBaseElement: SetState<CompositeStoreState<T>["baseElement"]>;
|
|
135
187
|
/**
|
|
136
|
-
* Sets the
|
|
137
|
-
*
|
|
188
|
+
* Sets the
|
|
189
|
+
* [`activeId`](https://ariakit.org/reference/composite-provider#activeid)
|
|
190
|
+
* state _without moving focus_. If you want to move focus, use the
|
|
191
|
+
* [`move`](https://ariakit.org/reference/use-composite-store#move) function
|
|
192
|
+
* instead.
|
|
193
|
+
*
|
|
194
|
+
* Live examples:
|
|
195
|
+
* - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
|
|
138
196
|
* @example
|
|
139
197
|
* // Sets the composite element as the active item
|
|
140
198
|
* store.setActiveId(null);
|
|
@@ -145,9 +203,16 @@ export interface CompositeStoreFunctions<T extends CompositeStoreItem = Composit
|
|
|
145
203
|
*/
|
|
146
204
|
setActiveId: SetState<CompositeStoreState<T>["activeId"]>;
|
|
147
205
|
/**
|
|
148
|
-
* Moves focus to a given item id and sets it as the active item.
|
|
149
|
-
* `null` will focus the composite element itself
|
|
150
|
-
*
|
|
206
|
+
* Moves focus to a given item id and sets it as the active item.
|
|
207
|
+
* - Passing `null` will focus on the composite element itself (the one with a
|
|
208
|
+
* [composite role](https://w3c.github.io/aria/#composite)). Users will be
|
|
209
|
+
* able to navigate out of it using arrow keys.
|
|
210
|
+
* - If you want to set the active item id _without moving focus_, use the
|
|
211
|
+
* [`setActiveId`](https://ariakit.org/reference/use-composite-store#setactiveid)
|
|
212
|
+
* function instead.
|
|
213
|
+
*
|
|
214
|
+
* Live examples:
|
|
215
|
+
* - [Select Grid](https://ariakit.org/examples/select-grid)
|
|
151
216
|
* @example
|
|
152
217
|
* // Moves focus to the composite element
|
|
153
218
|
* store.move(null);
|
|
@@ -158,43 +223,59 @@ export interface CompositeStoreFunctions<T extends CompositeStoreItem = Composit
|
|
|
158
223
|
*/
|
|
159
224
|
move: (id?: string | null) => void;
|
|
160
225
|
/**
|
|
161
|
-
* Returns the id of the next item based on the current
|
|
162
|
-
*
|
|
226
|
+
* Returns the id of the next enabled item based on the current
|
|
227
|
+
* [`activeId`](https://ariakit.org/reference/composite-provider#activeid)
|
|
228
|
+
* state.
|
|
229
|
+
*
|
|
230
|
+
* Live examples:
|
|
231
|
+
* - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
|
|
163
232
|
* @example
|
|
164
233
|
* const nextId = store.next();
|
|
165
234
|
* const nextNextId = store.next(2);
|
|
166
235
|
*/
|
|
167
236
|
next: (skip?: number) => string | null | undefined;
|
|
168
237
|
/**
|
|
169
|
-
* Returns the id of the previous item based on the current
|
|
170
|
-
*
|
|
238
|
+
* Returns the id of the previous enabled item based on the current
|
|
239
|
+
* [`activeId`](https://ariakit.org/reference/composite-provider#activeid)
|
|
240
|
+
* state.
|
|
241
|
+
*
|
|
242
|
+
* Live examples:
|
|
243
|
+
* - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
|
|
171
244
|
* @example
|
|
172
245
|
* const previousId = store.previous();
|
|
173
246
|
* const previousPreviousId = store.previous(2);
|
|
174
247
|
*/
|
|
175
248
|
previous: (skip?: number) => string | null | undefined;
|
|
176
249
|
/**
|
|
177
|
-
* Returns the id of the item above based on the current
|
|
178
|
-
*
|
|
250
|
+
* Returns the id of the enabled item above based on the current
|
|
251
|
+
* [`activeId`](https://ariakit.org/reference/composite-provider#activeid)
|
|
252
|
+
* state.
|
|
179
253
|
* @example
|
|
180
254
|
* const upId = store.up();
|
|
181
255
|
* const upUpId = store.up(2);
|
|
182
256
|
*/
|
|
183
257
|
up: (skip?: number) => string | null | undefined;
|
|
184
258
|
/**
|
|
185
|
-
* Returns the id of the item below based on the current
|
|
186
|
-
*
|
|
259
|
+
* Returns the id of the enabled item below based on the current
|
|
260
|
+
* [`activeId`](https://ariakit.org/reference/composite-provider#activeid)
|
|
261
|
+
* state.
|
|
187
262
|
* @example
|
|
188
263
|
* const downId = store.down();
|
|
189
264
|
* const downDownId = store.down(2);
|
|
190
265
|
*/
|
|
191
266
|
down: (skip?: number) => string | null | undefined;
|
|
192
267
|
/**
|
|
193
|
-
* Returns the id of the first item.
|
|
268
|
+
* Returns the id of the first enabled item.
|
|
269
|
+
*
|
|
270
|
+
* Live examples:
|
|
271
|
+
* - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
|
|
194
272
|
*/
|
|
195
273
|
first: () => string | null | undefined;
|
|
196
274
|
/**
|
|
197
|
-
* Returns the id of the last item.
|
|
275
|
+
* Returns the id of the last enabled item.
|
|
276
|
+
*
|
|
277
|
+
* Live examples:
|
|
278
|
+
* - [Combobox with tabs](https://ariakit.org/examples/combobox-tabs)
|
|
198
279
|
*/
|
|
199
280
|
last: () => string | null | undefined;
|
|
200
281
|
}
|