@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
|
@@ -11,32 +11,32 @@ export interface HovercardStoreState extends PopoverStoreState {
|
|
|
11
11
|
/**
|
|
12
12
|
* The amount of time in milliseconds to wait before showing and hiding the
|
|
13
13
|
* popup. To control the delay for showing and hiding separately, use
|
|
14
|
-
* [`showTimeout`](https://ariakit.
|
|
14
|
+
* [`showTimeout`](https://ariakit.com/reference/hovercard-provider#showtimeout)
|
|
15
15
|
* and
|
|
16
|
-
* [`hideTimeout`](https://ariakit.
|
|
16
|
+
* [`hideTimeout`](https://ariakit.com/reference/hovercard-provider#hidetimeout).
|
|
17
17
|
* @default 500
|
|
18
18
|
*/
|
|
19
19
|
timeout: number;
|
|
20
20
|
/**
|
|
21
21
|
* The amount of time in milliseconds to wait before _showing_ the popup. It
|
|
22
22
|
* defaults to the value passed to
|
|
23
|
-
* [`timeout`](https://ariakit.
|
|
23
|
+
* [`timeout`](https://ariakit.com/reference/hovercard-provider#timeout).
|
|
24
24
|
*
|
|
25
25
|
* Live examples:
|
|
26
|
-
* - [Navigation Menubar](https://ariakit.
|
|
26
|
+
* - [Navigation Menubar](https://ariakit.com/examples/menubar-navigation)
|
|
27
27
|
* - [Submenu with
|
|
28
|
-
* Combobox](https://ariakit.
|
|
28
|
+
* Combobox](https://ariakit.com/examples/menu-nested-combobox)
|
|
29
29
|
*/
|
|
30
30
|
showTimeout?: number;
|
|
31
31
|
/**
|
|
32
32
|
* The amount of time in milliseconds to wait before _hiding_ the popup. It
|
|
33
33
|
* defaults to the value passed to
|
|
34
|
-
* [`timeout`](https://ariakit.
|
|
34
|
+
* [`timeout`](https://ariakit.com/reference/hovercard-provider#timeout).
|
|
35
35
|
*
|
|
36
36
|
* Live examples:
|
|
37
|
-
* - [Navigation Menubar](https://ariakit.
|
|
38
|
-
* - [Tooltip with
|
|
39
|
-
* Motion](https://ariakit.
|
|
37
|
+
* - [Navigation Menubar](https://ariakit.com/examples/menubar-navigation)
|
|
38
|
+
* - [Tooltip with
|
|
39
|
+
* Motion](https://ariakit.com/examples/tooltip-framer-motion)
|
|
40
40
|
*/
|
|
41
41
|
hideTimeout?: number;
|
|
42
42
|
/**
|
|
@@ -51,7 +51,7 @@ export interface HovercardStoreFunctions extends PopoverStoreFunctions {
|
|
|
51
51
|
* Sets the `autoFocusOnShow` state.
|
|
52
52
|
*
|
|
53
53
|
* Live examples:
|
|
54
|
-
* - [Sliding Menu](https://ariakit.
|
|
54
|
+
* - [Sliding Menu](https://ariakit.com/examples/menu-slide)
|
|
55
55
|
*/
|
|
56
56
|
setAutoFocusOnShow: SetState<HovercardStoreState["autoFocusOnShow"]>;
|
|
57
57
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createHovercardStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
9
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/TEVO2DMI.js";
|
|
5
|
+
import "../__chunks/MJ4ZJEIM.js";
|
|
6
|
+
import "../__chunks/7KNZCZ55.js";
|
|
7
|
+
import "../__chunks/IHNLLH3I.js";
|
|
8
|
+
import "../__chunks/XTZ53NXG.js";
|
|
9
|
+
import "../__chunks/UWJK2WK2.js";
|
|
10
10
|
export {
|
|
11
11
|
createHovercardStore
|
|
12
12
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createMenubarStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/H7R2CY4Q.js";
|
|
5
|
+
import "../__chunks/UNDE2QJS.js";
|
|
6
6
|
import "../__chunks/7PRQYBBV.js";
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
9
|
-
import "../__chunks/
|
|
10
|
-
import "../__chunks/
|
|
7
|
+
import "../__chunks/KZX46JDB.js";
|
|
8
|
+
import "../__chunks/G7XPWBXK.js";
|
|
9
|
+
import "../__chunks/XTZ53NXG.js";
|
|
10
|
+
import "../__chunks/UWJK2WK2.js";
|
|
11
11
|
|
|
12
12
|
// src/menu/menu-bar-store.ts
|
|
13
13
|
function createMenuBarStore(props = {}) {
|
package/esm/menu/menu-store.d.ts
CHANGED
|
@@ -20,14 +20,14 @@ export interface MenuStoreState<T extends MenuStoreValues = MenuStoreValues> ext
|
|
|
20
20
|
initialFocus: "container" | "first" | "last";
|
|
21
21
|
/**
|
|
22
22
|
* A map of names and values that will be used by the
|
|
23
|
-
* [`MenuItemCheckbox`](https://ariakit.
|
|
24
|
-
* [`MenuItemRadio`](https://ariakit.
|
|
23
|
+
* [`MenuItemCheckbox`](https://ariakit.com/reference/menu-item-checkbox) and
|
|
24
|
+
* [`MenuItemRadio`](https://ariakit.com/reference/menu-item-radio)
|
|
25
25
|
* components.
|
|
26
26
|
*
|
|
27
27
|
* Live examples:
|
|
28
|
-
* - [MenuItemCheckbox](https://ariakit.
|
|
28
|
+
* - [MenuItemCheckbox](https://ariakit.com/examples/menu-item-checkbox)
|
|
29
29
|
* - [Submenu with
|
|
30
|
-
* Combobox](https://ariakit.
|
|
30
|
+
* Combobox](https://ariakit.com/examples/menu-nested-combobox)
|
|
31
31
|
*/
|
|
32
32
|
values: T;
|
|
33
33
|
}
|
|
@@ -37,7 +37,7 @@ export interface MenuStoreFunctions<T extends MenuStoreValues = MenuStoreValues>
|
|
|
37
37
|
*
|
|
38
38
|
* Live examples:
|
|
39
39
|
* - [Submenu with
|
|
40
|
-
* Combobox](https://ariakit.
|
|
40
|
+
* Combobox](https://ariakit.com/examples/menu-nested-combobox)
|
|
41
41
|
*/
|
|
42
42
|
hideAll: () => void;
|
|
43
43
|
/**
|
|
@@ -45,7 +45,7 @@ export interface MenuStoreFunctions<T extends MenuStoreValues = MenuStoreValues>
|
|
|
45
45
|
*/
|
|
46
46
|
setInitialFocus: SetState<MenuStoreState<T>["initialFocus"]>;
|
|
47
47
|
/**
|
|
48
|
-
* Sets the [`values`](https://ariakit.
|
|
48
|
+
* Sets the [`values`](https://ariakit.com/reference/menu-provider#values)
|
|
49
49
|
* state.
|
|
50
50
|
* @example
|
|
51
51
|
* store.setValues({ watching: ["issues"] });
|
|
@@ -57,7 +57,7 @@ export interface MenuStoreFunctions<T extends MenuStoreValues = MenuStoreValues>
|
|
|
57
57
|
*
|
|
58
58
|
* Live examples:
|
|
59
59
|
* - [Submenu with
|
|
60
|
-
* Combobox](https://ariakit.
|
|
60
|
+
* Combobox](https://ariakit.com/examples/menu-nested-combobox)
|
|
61
61
|
* @example
|
|
62
62
|
* store.setValue("watching", ["issues"]);
|
|
63
63
|
* store.setValue("watching", (value) => [...value, "issues"]);
|
|
@@ -82,11 +82,11 @@ export interface MenuStoreOptions<T extends MenuStoreValues = MenuStoreValues> e
|
|
|
82
82
|
menubar?: MenuBarStore | null;
|
|
83
83
|
/**
|
|
84
84
|
* The default values for the
|
|
85
|
-
* [`values`](https://ariakit.
|
|
85
|
+
* [`values`](https://ariakit.com/reference/menu-provider#values) state.
|
|
86
86
|
*
|
|
87
87
|
* Live examples:
|
|
88
|
-
* - [MenuItemCheckbox](https://ariakit.
|
|
89
|
-
* - [MenuItemRadio](https://ariakit.
|
|
88
|
+
* - [MenuItemCheckbox](https://ariakit.com/examples/menu-item-checkbox)
|
|
89
|
+
* - [MenuItemRadio](https://ariakit.com/examples/menu-item-radio)
|
|
90
90
|
* @default {}
|
|
91
91
|
*/
|
|
92
92
|
defaultValues?: MenuStoreState<T>["values"];
|
package/esm/menu/menu-store.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createHovercardStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/TEVO2DMI.js";
|
|
5
|
+
import "../__chunks/MJ4ZJEIM.js";
|
|
6
6
|
import {
|
|
7
7
|
createCompositeStore
|
|
8
|
-
} from "../__chunks/
|
|
8
|
+
} from "../__chunks/UNDE2QJS.js";
|
|
9
9
|
import "../__chunks/7PRQYBBV.js";
|
|
10
|
-
import "../__chunks/
|
|
11
|
-
import "../__chunks/
|
|
12
|
-
import "../__chunks/
|
|
13
|
-
import "../__chunks/
|
|
10
|
+
import "../__chunks/7KNZCZ55.js";
|
|
11
|
+
import "../__chunks/IHNLLH3I.js";
|
|
12
|
+
import "../__chunks/KZX46JDB.js";
|
|
13
|
+
import "../__chunks/G7XPWBXK.js";
|
|
14
14
|
import {
|
|
15
15
|
createStore,
|
|
16
16
|
mergeStore,
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
setup,
|
|
20
20
|
sync,
|
|
21
21
|
throwOnConflictingProps
|
|
22
|
-
} from "../__chunks/
|
|
22
|
+
} from "../__chunks/XTZ53NXG.js";
|
|
23
23
|
import {
|
|
24
24
|
applyState,
|
|
25
25
|
defaultValue
|
|
26
|
-
} from "../__chunks/
|
|
26
|
+
} from "../__chunks/UWJK2WK2.js";
|
|
27
27
|
|
|
28
28
|
// src/menu/menu-store.ts
|
|
29
29
|
function createMenuStore({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createMenubarStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/H7R2CY4Q.js";
|
|
5
|
+
import "../__chunks/UNDE2QJS.js";
|
|
6
6
|
import "../__chunks/7PRQYBBV.js";
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
9
|
-
import "../__chunks/
|
|
10
|
-
import "../__chunks/
|
|
7
|
+
import "../__chunks/KZX46JDB.js";
|
|
8
|
+
import "../__chunks/G7XPWBXK.js";
|
|
9
|
+
import "../__chunks/XTZ53NXG.js";
|
|
10
|
+
import "../__chunks/UWJK2WK2.js";
|
|
11
11
|
export {
|
|
12
12
|
createMenubarStore
|
|
13
13
|
};
|
|
@@ -12,16 +12,16 @@ export interface PopoverStoreState extends DialogStoreState {
|
|
|
12
12
|
* The anchor element.
|
|
13
13
|
*
|
|
14
14
|
* Live examples:
|
|
15
|
-
* - [Navigation Menubar](https://ariakit.
|
|
15
|
+
* - [Navigation Menubar](https://ariakit.com/examples/menubar-navigation)
|
|
16
16
|
*/
|
|
17
17
|
anchorElement: HTMLElement | null;
|
|
18
18
|
/**
|
|
19
19
|
* The popover element that will render the placement attributes.
|
|
20
20
|
*
|
|
21
21
|
* Live examples:
|
|
22
|
-
* - [Form with Select](https://ariakit.
|
|
23
|
-
* - [Sliding Menu](https://ariakit.
|
|
24
|
-
* - [Responsive Popover](https://ariakit.
|
|
22
|
+
* - [Form with Select](https://ariakit.com/examples/form-select)
|
|
23
|
+
* - [Sliding Menu](https://ariakit.com/examples/menu-slide)
|
|
24
|
+
* - [Responsive Popover](https://ariakit.com/examples/popover-responsive)
|
|
25
25
|
*/
|
|
26
26
|
popoverElement: HTMLElement | null;
|
|
27
27
|
/**
|
|
@@ -30,12 +30,12 @@ export interface PopoverStoreState extends DialogStoreState {
|
|
|
30
30
|
arrowElement: HTMLElement | null;
|
|
31
31
|
/**
|
|
32
32
|
* The current temporary position of the popover. This might differ from the
|
|
33
|
-
* [`placement`](https://ariakit.
|
|
33
|
+
* [`placement`](https://ariakit.com/reference/popover-provider#placement)
|
|
34
34
|
* state if the popover has had to adjust its position dynamically.
|
|
35
35
|
*
|
|
36
36
|
* Live examples:
|
|
37
|
-
* - [Tooltip with
|
|
38
|
-
* Motion](https://ariakit.
|
|
37
|
+
* - [Tooltip with
|
|
38
|
+
* Motion](https://ariakit.com/examples/tooltip-framer-motion)
|
|
39
39
|
*/
|
|
40
40
|
currentPlacement: Placement;
|
|
41
41
|
/**
|
|
@@ -43,18 +43,18 @@ export interface PopoverStoreState extends DialogStoreState {
|
|
|
43
43
|
*
|
|
44
44
|
* Live examples:
|
|
45
45
|
* - [Submenu with
|
|
46
|
-
* Combobox](https://ariakit.
|
|
47
|
-
* - [Sliding Menu](https://ariakit.
|
|
48
|
-
* - [Navigation Menubar](https://ariakit.
|
|
49
|
-
* - [Selection Popover](https://ariakit.
|
|
50
|
-
* - [Standalone Popover](https://ariakit.
|
|
51
|
-
* - [Select Grid](https://ariakit.
|
|
46
|
+
* Combobox](https://ariakit.com/examples/menu-nested-combobox)
|
|
47
|
+
* - [Sliding Menu](https://ariakit.com/examples/menu-slide)
|
|
48
|
+
* - [Navigation Menubar](https://ariakit.com/examples/menubar-navigation)
|
|
49
|
+
* - [Selection Popover](https://ariakit.com/examples/popover-selection)
|
|
50
|
+
* - [Standalone Popover](https://ariakit.com/examples/popover-standalone)
|
|
51
|
+
* - [Select Grid](https://ariakit.com/examples/select-grid)
|
|
52
52
|
* @default "bottom"
|
|
53
53
|
*/
|
|
54
54
|
placement: Placement;
|
|
55
55
|
/**
|
|
56
56
|
* A symbol that's used to recompute the popover position when the
|
|
57
|
-
* [`render`](https://ariakit.
|
|
57
|
+
* [`render`](https://ariakit.com/reference/use-popover-store#render) method
|
|
58
58
|
* is called.
|
|
59
59
|
*/
|
|
60
60
|
rendered: symbol;
|
|
@@ -64,7 +64,7 @@ export interface PopoverStoreFunctions extends DialogStoreFunctions {
|
|
|
64
64
|
* Sets the anchor element.
|
|
65
65
|
*
|
|
66
66
|
* Live examples:
|
|
67
|
-
* - [Navigation Menubar](https://ariakit.
|
|
67
|
+
* - [Navigation Menubar](https://ariakit.com/examples/menubar-navigation)
|
|
68
68
|
*/
|
|
69
69
|
setAnchorElement: SetState<PopoverStoreState["anchorElement"]>;
|
|
70
70
|
/**
|
|
@@ -82,8 +82,8 @@ export interface PopoverStoreFunctions extends DialogStoreFunctions {
|
|
|
82
82
|
*
|
|
83
83
|
* Live examples:
|
|
84
84
|
* - [Textarea with inline
|
|
85
|
-
* Combobox](https://ariakit.
|
|
86
|
-
* - [Selection Popover](https://ariakit.
|
|
85
|
+
* Combobox](https://ariakit.com/examples/combobox-textarea)
|
|
86
|
+
* - [Selection Popover](https://ariakit.com/examples/popover-selection)
|
|
87
87
|
*/
|
|
88
88
|
render: () => void;
|
|
89
89
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createPopoverStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/MJ4ZJEIM.js";
|
|
5
|
+
import "../__chunks/7KNZCZ55.js";
|
|
6
|
+
import "../__chunks/IHNLLH3I.js";
|
|
7
|
+
import "../__chunks/XTZ53NXG.js";
|
|
8
|
+
import "../__chunks/UWJK2WK2.js";
|
|
9
9
|
export {
|
|
10
10
|
createPopoverStore
|
|
11
11
|
};
|
|
@@ -16,7 +16,7 @@ export interface RadioStoreState extends CompositeStoreState {
|
|
|
16
16
|
}
|
|
17
17
|
export interface RadioStoreFunctions extends CompositeStoreFunctions {
|
|
18
18
|
/**
|
|
19
|
-
* Sets the [`value`](https://ariakit.
|
|
19
|
+
* Sets the [`value`](https://ariakit.com/reference/radio-provider#value)
|
|
20
20
|
* state.
|
|
21
21
|
* @example
|
|
22
22
|
* store.setValue("apple");
|
package/esm/radio/radio-store.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/UNDE2QJS.js";
|
|
5
5
|
import "../__chunks/7PRQYBBV.js";
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/KZX46JDB.js";
|
|
7
|
+
import "../__chunks/G7XPWBXK.js";
|
|
8
8
|
import {
|
|
9
9
|
createStore
|
|
10
|
-
} from "../__chunks/
|
|
10
|
+
} from "../__chunks/XTZ53NXG.js";
|
|
11
11
|
import {
|
|
12
12
|
defaultValue
|
|
13
|
-
} from "../__chunks/
|
|
13
|
+
} from "../__chunks/UWJK2WK2.js";
|
|
14
14
|
|
|
15
15
|
// src/radio/radio-store.ts
|
|
16
16
|
function createRadioStore({
|
|
@@ -23,26 +23,26 @@ export interface SelectStoreState<T extends SelectStoreValue = SelectStoreValue>
|
|
|
23
23
|
* The select value.
|
|
24
24
|
*
|
|
25
25
|
* Live examples:
|
|
26
|
-
* - [Form with Select](https://ariakit.
|
|
27
|
-
* - [Select Grid](https://ariakit.
|
|
26
|
+
* - [Form with Select](https://ariakit.com/examples/form-select)
|
|
27
|
+
* - [Select Grid](https://ariakit.com/examples/select-grid)
|
|
28
28
|
* - [Select with custom
|
|
29
|
-
* items](https://ariakit.
|
|
30
|
-
* - [Multi-Select](https://ariakit.
|
|
31
|
-
* - [Toolbar with Select](https://ariakit.
|
|
29
|
+
* items](https://ariakit.com/examples/select-item-custom)
|
|
30
|
+
* - [Multi-Select](https://ariakit.com/examples/select-multiple)
|
|
31
|
+
* - [Toolbar with Select](https://ariakit.com/examples/toolbar-select)
|
|
32
32
|
* - [Select with Next.js App
|
|
33
|
-
* Router](https://ariakit.
|
|
33
|
+
* Router](https://ariakit.com/examples/select-next-router)
|
|
34
34
|
*/
|
|
35
35
|
value: MutableValue<T>;
|
|
36
36
|
/**
|
|
37
37
|
* Whether the select
|
|
38
|
-
* [`value`](https://ariakit.
|
|
38
|
+
* [`value`](https://ariakit.com/reference/select-provider#value) should be
|
|
39
39
|
* set when the active item changes by moving (which usually happens when
|
|
40
40
|
* moving to an item using the keyboard).
|
|
41
41
|
*
|
|
42
42
|
* Live examples:
|
|
43
|
-
* - [Select Grid](https://ariakit.
|
|
43
|
+
* - [Select Grid](https://ariakit.com/examples/select-grid)
|
|
44
44
|
* - [Select with custom
|
|
45
|
-
* items](https://ariakit.
|
|
45
|
+
* items](https://ariakit.com/examples/select-item-custom)
|
|
46
46
|
* @default false
|
|
47
47
|
*/
|
|
48
48
|
setValueOnMove: boolean;
|
|
@@ -54,7 +54,7 @@ export interface SelectStoreState<T extends SelectStoreValue = SelectStoreValue>
|
|
|
54
54
|
* The select button element.
|
|
55
55
|
*
|
|
56
56
|
* Live examples:
|
|
57
|
-
* - [Form with Select](https://ariakit.
|
|
57
|
+
* - [Form with Select](https://ariakit.com/examples/form-select)
|
|
58
58
|
*/
|
|
59
59
|
selectElement: HTMLElement | null;
|
|
60
60
|
/**
|
|
@@ -64,7 +64,7 @@ export interface SelectStoreState<T extends SelectStoreValue = SelectStoreValue>
|
|
|
64
64
|
}
|
|
65
65
|
export interface SelectStoreFunctions<T extends SelectStoreValue = SelectStoreValue> extends Pick<SelectStoreOptions<T>, "combobox">, CompositeStoreFunctions<SelectStoreItem>, PopoverStoreFunctions {
|
|
66
66
|
/**
|
|
67
|
-
* Sets the [`value`](https://ariakit.
|
|
67
|
+
* Sets the [`value`](https://ariakit.com/reference/select-provider#value)
|
|
68
68
|
* state.
|
|
69
69
|
* @example
|
|
70
70
|
* store.setValue("Apple");
|
|
@@ -96,14 +96,14 @@ export interface SelectStoreOptions<T extends SelectStoreValue = SelectStoreValu
|
|
|
96
96
|
* The default value. If not set, the first non-disabled item will be used.
|
|
97
97
|
*
|
|
98
98
|
* Live examples:
|
|
99
|
-
* - [Form with Select](https://ariakit.
|
|
100
|
-
* - [Animated Select](https://ariakit.
|
|
101
|
-
* - [Select with Combobox](https://ariakit.
|
|
102
|
-
* - [SelectGroup](https://ariakit.
|
|
99
|
+
* - [Form with Select](https://ariakit.com/examples/form-select)
|
|
100
|
+
* - [Animated Select](https://ariakit.com/examples/select-animated)
|
|
101
|
+
* - [Select with Combobox](https://ariakit.com/examples/select-combobox)
|
|
102
|
+
* - [SelectGroup](https://ariakit.com/examples/select-group)
|
|
103
103
|
* - [Select with Next.js App
|
|
104
|
-
* Router](https://ariakit.
|
|
104
|
+
* Router](https://ariakit.com/examples/select-next-router)
|
|
105
105
|
* - [Select with Combobox and
|
|
106
|
-
* Tabs](https://ariakit.
|
|
106
|
+
* Tabs](https://ariakit.com/examples/select-combobox-tab)
|
|
107
107
|
*/
|
|
108
108
|
defaultValue?: SelectStoreState<T>["value"];
|
|
109
109
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createPopoverStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/MJ4ZJEIM.js";
|
|
5
5
|
import {
|
|
6
6
|
createCompositeStore
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/UNDE2QJS.js";
|
|
8
8
|
import {
|
|
9
9
|
toArray
|
|
10
10
|
} from "../__chunks/7PRQYBBV.js";
|
|
11
|
-
import "../__chunks/
|
|
12
|
-
import "../__chunks/
|
|
13
|
-
import "../__chunks/
|
|
14
|
-
import "../__chunks/
|
|
11
|
+
import "../__chunks/7KNZCZ55.js";
|
|
12
|
+
import "../__chunks/IHNLLH3I.js";
|
|
13
|
+
import "../__chunks/KZX46JDB.js";
|
|
14
|
+
import "../__chunks/G7XPWBXK.js";
|
|
15
15
|
import {
|
|
16
16
|
batch,
|
|
17
17
|
createStore,
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
setup,
|
|
21
21
|
sync,
|
|
22
22
|
throwOnConflictingProps
|
|
23
|
-
} from "../__chunks/
|
|
23
|
+
} from "../__chunks/XTZ53NXG.js";
|
|
24
24
|
import {
|
|
25
25
|
defaultValue
|
|
26
|
-
} from "../__chunks/
|
|
26
|
+
} from "../__chunks/UWJK2WK2.js";
|
|
27
27
|
|
|
28
28
|
// src/select/select-store.ts
|
|
29
29
|
function createSelectStore({
|
package/esm/tab/tab-store.d.ts
CHANGED
|
@@ -21,12 +21,12 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
|
|
|
21
21
|
* will be automatically set to the first enabled tab.
|
|
22
22
|
*
|
|
23
23
|
* Live examples:
|
|
24
|
-
* - [Tab with React Router](https://ariakit.
|
|
25
|
-
* - [Combobox with Tabs](https://ariakit.
|
|
24
|
+
* - [Tab with React Router](https://ariakit.com/examples/tab-react-router)
|
|
25
|
+
* - [Combobox with Tabs](https://ariakit.com/examples/combobox-tabs)
|
|
26
26
|
* - [Select with Combobox and
|
|
27
|
-
* Tabs](https://ariakit.
|
|
27
|
+
* Tabs](https://ariakit.com/examples/select-combobox-tab)
|
|
28
28
|
* - [Command Menu with
|
|
29
|
-
* Tabs](https://ariakit.
|
|
29
|
+
* Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
|
|
30
30
|
*/
|
|
31
31
|
selectedId: TabStoreState["activeId"];
|
|
32
32
|
/**
|
|
@@ -35,9 +35,9 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
|
|
|
35
35
|
* keys to shift focus.
|
|
36
36
|
*
|
|
37
37
|
* Live examples:
|
|
38
|
-
* - [Tab with React Router](https://ariakit.
|
|
38
|
+
* - [Tab with React Router](https://ariakit.com/examples/tab-react-router)
|
|
39
39
|
* - [Select with Combobox and
|
|
40
|
-
* Tabs](https://ariakit.
|
|
40
|
+
* Tabs](https://ariakit.com/examples/select-combobox-tab)
|
|
41
41
|
* @default true
|
|
42
42
|
*/
|
|
43
43
|
selectOnMove?: boolean;
|
|
@@ -45,9 +45,9 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
|
|
|
45
45
|
export interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem> {
|
|
46
46
|
/**
|
|
47
47
|
* Sets the
|
|
48
|
-
* [`selectedId`](https://ariakit.
|
|
48
|
+
* [`selectedId`](https://ariakit.com/reference/tab-provider#selectedid) state
|
|
49
49
|
* without moving focus. If you want to move focus, use the
|
|
50
|
-
* [`select`](https://ariakit.
|
|
50
|
+
* [`select`](https://ariakit.com/reference/use-tab-store#select) function
|
|
51
51
|
* instead.
|
|
52
52
|
* @example
|
|
53
53
|
* // Selects the tab with id "tab-1"
|
|
@@ -64,14 +64,14 @@ export interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem>
|
|
|
64
64
|
* A collection store containing the tab panels.
|
|
65
65
|
*
|
|
66
66
|
* Live examples:
|
|
67
|
-
* - [Animated TabPanel](https://ariakit.
|
|
67
|
+
* - [Animated TabPanel](https://ariakit.com/examples/tab-panel-animated)
|
|
68
68
|
*/
|
|
69
69
|
panels: CollectionStore<TabStorePanel>;
|
|
70
70
|
/**
|
|
71
71
|
* Selects the tab for the given id and moves focus to it. If you want to set
|
|
72
|
-
* the [`selectedId`](https://ariakit.
|
|
72
|
+
* the [`selectedId`](https://ariakit.com/reference/tab-provider#selectedid)
|
|
73
73
|
* state without moving focus, use the
|
|
74
|
-
* [`setSelectedId`](https://ariakit.
|
|
74
|
+
* [`setSelectedId`](https://ariakit.com/reference/use-tab-store#setselectedid-1)
|
|
75
75
|
* function instead.
|
|
76
76
|
* @example
|
|
77
77
|
* // Selects the tab with id "tab-1"
|
|
@@ -86,18 +86,18 @@ export interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem>
|
|
|
86
86
|
export interface TabStoreOptions extends StoreOptions<TabStoreState, "orientation" | "focusLoop" | "selectedId" | "selectOnMove">, CompositeStoreOptions<TabStoreItem> {
|
|
87
87
|
/**
|
|
88
88
|
* A reference to another [composite
|
|
89
|
-
* store](https://ariakit.
|
|
89
|
+
* store](https://ariakit.com/reference/use-composite-store). This is used when
|
|
90
90
|
* rendering tabs as part of another composite widget such as
|
|
91
|
-
* [Combobox](https://ariakit.
|
|
92
|
-
* [Select](https://ariakit.
|
|
91
|
+
* [Combobox](https://ariakit.com/components/combobox) or
|
|
92
|
+
* [Select](https://ariakit.com/components/select). The stores will share the
|
|
93
93
|
* same state.
|
|
94
94
|
*/
|
|
95
95
|
composite?: CompositeStore | SelectStore | null;
|
|
96
96
|
/**
|
|
97
97
|
* A reference to a [combobox
|
|
98
|
-
* store](https://ariakit.
|
|
98
|
+
* store](https://ariakit.com/reference/use-combobox-store). This is used when
|
|
99
99
|
* rendering tabs inside a
|
|
100
|
-
* [Combobox](https://ariakit.
|
|
100
|
+
* [Combobox](https://ariakit.com/components/combobox).
|
|
101
101
|
*/
|
|
102
102
|
combobox?: ComboboxStore | null;
|
|
103
103
|
/**
|
|
@@ -105,12 +105,12 @@ export interface TabStoreOptions extends StoreOptions<TabStoreState, "orientatio
|
|
|
105
105
|
* will be automatically set to the first enabled tab.
|
|
106
106
|
*
|
|
107
107
|
* Live examples:
|
|
108
|
-
* - [Combobox with Tabs](https://ariakit.
|
|
109
|
-
* - [Animated TabPanel](https://ariakit.
|
|
108
|
+
* - [Combobox with Tabs](https://ariakit.com/examples/combobox-tabs)
|
|
109
|
+
* - [Animated TabPanel](https://ariakit.com/examples/tab-panel-animated)
|
|
110
110
|
* - [Select with Combobox and
|
|
111
|
-
* Tabs](https://ariakit.
|
|
111
|
+
* Tabs](https://ariakit.com/examples/select-combobox-tab)
|
|
112
112
|
* - [Command Menu with
|
|
113
|
-
* Tabs](https://ariakit.
|
|
113
|
+
* Tabs](https://ariakit.com/examples/dialog-combobox-tab-command-menu)
|
|
114
114
|
*/
|
|
115
115
|
defaultSelectedId?: TabStoreState["selectedId"];
|
|
116
116
|
}
|
package/esm/tab/tab-store.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/UNDE2QJS.js";
|
|
5
5
|
import "../__chunks/7PRQYBBV.js";
|
|
6
6
|
import {
|
|
7
7
|
createCollectionStore
|
|
8
|
-
} from "../__chunks/
|
|
9
|
-
import "../__chunks/
|
|
8
|
+
} from "../__chunks/KZX46JDB.js";
|
|
9
|
+
import "../__chunks/G7XPWBXK.js";
|
|
10
10
|
import {
|
|
11
11
|
batch,
|
|
12
12
|
createStore,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
omit,
|
|
15
15
|
setup,
|
|
16
16
|
sync
|
|
17
|
-
} from "../__chunks/
|
|
17
|
+
} from "../__chunks/XTZ53NXG.js";
|
|
18
18
|
import {
|
|
19
19
|
chain,
|
|
20
20
|
defaultValue
|
|
21
|
-
} from "../__chunks/
|
|
21
|
+
} from "../__chunks/UWJK2WK2.js";
|
|
22
22
|
|
|
23
23
|
// src/tab/tab-store.ts
|
|
24
24
|
function createTabStore({
|
package/esm/tag/tag-store.d.ts
CHANGED
|
@@ -38,27 +38,27 @@ export interface TagStoreFunctions extends CompositeStoreFunctions<TagStoreItem>
|
|
|
38
38
|
*/
|
|
39
39
|
setLabelElement: SetState<TagStoreState["labelElement"]>;
|
|
40
40
|
/**
|
|
41
|
-
* Sets the [`value`](https://ariakit.
|
|
41
|
+
* Sets the [`value`](https://ariakit.com/reference/tag-provider#value) state.
|
|
42
42
|
*/
|
|
43
43
|
setValue: SetState<TagStoreState["value"]>;
|
|
44
44
|
/**
|
|
45
|
-
* Resets the [`value`](https://ariakit.
|
|
45
|
+
* Resets the [`value`](https://ariakit.com/reference/tag-provider#value)
|
|
46
46
|
* state to its initial value.
|
|
47
47
|
*/
|
|
48
48
|
resetValue: () => void;
|
|
49
49
|
/**
|
|
50
|
-
* Sets the [`values`](https://ariakit.
|
|
50
|
+
* Sets the [`values`](https://ariakit.com/reference/tag-provider#values) state.
|
|
51
51
|
*/
|
|
52
52
|
setValues: SetState<TagStoreState["values"]>;
|
|
53
53
|
/**
|
|
54
54
|
* Add a new value to the
|
|
55
|
-
* [`values`](https://ariakit.
|
|
55
|
+
* [`values`](https://ariakit.com/reference/tag-provider#values) state if it
|
|
56
56
|
* doesn't already exist.
|
|
57
57
|
*/
|
|
58
58
|
addValue: (value: string) => void;
|
|
59
59
|
/**
|
|
60
60
|
* Remove a value from the
|
|
61
|
-
* [`values`](https://ariakit.
|
|
61
|
+
* [`values`](https://ariakit.com/reference/tag-provider#values) state.
|
|
62
62
|
*/
|
|
63
63
|
removeValue: (value: string) => void;
|
|
64
64
|
}
|