@ariakit/core 0.3.10 → 0.4.0
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 +60 -0
- package/cjs/__chunks/{Y6PHIDP6.cjs → 5JEQEZFR.cjs} +12 -12
- package/cjs/__chunks/{YIUPKKEK.cjs → 7DU6YMLQ.cjs} +6 -6
- package/cjs/__chunks/{MWNFQD55.cjs → AETQC2AR.cjs} +17 -16
- package/cjs/__chunks/{5CBCKBZ2.cjs → B4LYZ4EM.cjs} +12 -12
- package/cjs/__chunks/{3UT5FE6K.cjs → EEDWPDM2.cjs} +14 -1
- package/cjs/__chunks/{YLMJBIQM.cjs → FFZYCAXA.cjs} +24 -15
- package/cjs/__chunks/{MFSCSSBJ.cjs → LTLFSC4X.cjs} +2 -2
- package/cjs/__chunks/{CWDUO5EV.cjs → SU2BSHGB.cjs} +7 -7
- package/cjs/__chunks/{HMO4CKUP.cjs → UEZLSKZ4.cjs} +10 -10
- package/cjs/__chunks/{5F4DVUNS.cjs → UKR6TQI3.cjs} +1 -2
- package/cjs/__chunks/{ZXCB7MXN.cjs → Y7KNI5NS.cjs} +17 -17
- package/cjs/checkbox/checkbox-store.cjs +5 -5
- package/cjs/collection/collection-store.cjs +5 -5
- package/cjs/combobox/combobox-store.cjs +35 -35
- package/cjs/composite/composite-overflow-store.cjs +6 -6
- package/cjs/composite/composite-store.cjs +6 -6
- package/cjs/dialog/dialog-store.cjs +5 -5
- package/cjs/disclosure/disclosure-store.cjs +4 -4
- package/cjs/disclosure/disclosure-store.d.cts +6 -2
- package/cjs/disclosure/disclosure-store.d.ts +6 -2
- package/cjs/form/form-store.cjs +24 -24
- package/cjs/form/form-store.d.cts +1 -1
- package/cjs/form/form-store.d.ts +1 -1
- package/cjs/hovercard/hovercard-store.cjs +7 -7
- package/cjs/hovercard/hovercard-store.d.cts +14 -7
- package/cjs/hovercard/hovercard-store.d.ts +14 -7
- package/cjs/menu/menu-bar-store.cjs +7 -7
- package/cjs/menu/menu-store.cjs +27 -27
- package/cjs/menu/menu-store.d.cts +16 -7
- package/cjs/menu/menu-store.d.ts +16 -7
- package/cjs/menubar/menubar-store.cjs +7 -7
- package/cjs/popover/popover-store.cjs +6 -6
- package/cjs/popover/popover-store.d.cts +31 -6
- package/cjs/popover/popover-store.d.ts +31 -6
- package/cjs/radio/radio-store.cjs +9 -9
- package/cjs/radio/radio-store.d.cts +2 -1
- package/cjs/radio/radio-store.d.ts +2 -1
- package/cjs/select/select-store.cjs +29 -29
- package/cjs/select/select-store.d.cts +2 -1
- package/cjs/select/select-store.d.ts +2 -1
- package/cjs/tab/tab-store.cjs +21 -21
- package/cjs/tab/tab-store.d.cts +5 -11
- package/cjs/tab/tab-store.d.ts +5 -11
- package/cjs/toolbar/toolbar-store.cjs +8 -8
- package/cjs/toolbar/toolbar-store.d.cts +2 -6
- package/cjs/toolbar/toolbar-store.d.ts +2 -6
- package/cjs/tooltip/tooltip-store.cjs +21 -12
- package/cjs/tooltip/tooltip-store.d.cts +6 -4
- package/cjs/tooltip/tooltip-store.d.ts +6 -4
- package/cjs/utils/dom.cjs +2 -2
- package/cjs/utils/events.cjs +5 -5
- package/cjs/utils/focus.cjs +13 -13
- 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/esm/__chunks/{I2VQ3XGR.js → 22HHDS5F.js} +13 -0
- package/esm/__chunks/{VEUNYQYR.js → 2H5K47H4.js} +3 -3
- package/esm/__chunks/{25MEC56I.js → 5RJNXXU2.js} +1 -1
- package/esm/__chunks/{QJ5CUA32.js → BRS7GKWU.js} +3 -3
- package/esm/__chunks/{AKMSZ36N.js → MFZZDIHG.js} +3 -3
- package/esm/__chunks/{UUFF4PQ6.js → PXYVPXSS.js} +3 -3
- package/esm/__chunks/{K6ELJFXN.js → R676XYVY.js} +1 -1
- package/esm/__chunks/{DLOEKDPY.js → RRSZHCH6.js} +1 -2
- package/esm/__chunks/{MYUKSFP5.js → URUD7X4C.js} +14 -5
- package/esm/__chunks/{MHPO2BXA.js → VDNATJW2.js} +1 -1
- package/esm/__chunks/{L5RYKTVQ.js → WCKXDMU7.js} +3 -2
- package/esm/checkbox/checkbox-store.js +2 -2
- package/esm/collection/collection-store.js +4 -4
- package/esm/combobox/combobox-store.js +9 -9
- package/esm/composite/composite-overflow-store.js +5 -5
- package/esm/composite/composite-store.js +5 -5
- package/esm/dialog/dialog-store.js +4 -4
- package/esm/disclosure/disclosure-store.d.ts +6 -2
- package/esm/disclosure/disclosure-store.js +3 -3
- package/esm/form/form-store.d.ts +1 -1
- package/esm/form/form-store.js +4 -4
- package/esm/hovercard/hovercard-store.d.ts +14 -7
- package/esm/hovercard/hovercard-store.js +6 -6
- package/esm/menu/menu-bar-store.js +6 -6
- package/esm/menu/menu-store.d.ts +16 -7
- package/esm/menu/menu-store.js +9 -9
- package/esm/menubar/menubar-store.js +6 -6
- package/esm/popover/popover-store.d.ts +31 -6
- package/esm/popover/popover-store.js +5 -5
- package/esm/radio/radio-store.d.ts +2 -1
- package/esm/radio/radio-store.js +5 -5
- package/esm/select/select-store.d.ts +2 -1
- package/esm/select/select-store.js +8 -8
- package/esm/tab/tab-store.d.ts +5 -11
- package/esm/tab/tab-store.js +5 -5
- package/esm/toolbar/toolbar-store.d.ts +2 -6
- package/esm/toolbar/toolbar-store.js +5 -5
- package/esm/tooltip/tooltip-store.d.ts +6 -4
- package/esm/tooltip/tooltip-store.js +15 -6
- package/esm/utils/dom.js +1 -1
- package/esm/utils/events.js +2 -2
- package/esm/utils/focus.js +1 -1
- 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.js +2 -2
- package/package.json +1 -1
|
@@ -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/BRS7GKWU.js";
|
|
5
|
+
import "../__chunks/MFZZDIHG.js";
|
|
6
|
+
import "../__chunks/5RJNXXU2.js";
|
|
7
|
+
import "../__chunks/WCKXDMU7.js";
|
|
8
|
+
import "../__chunks/R676XYVY.js";
|
|
9
|
+
import "../__chunks/22HHDS5F.js";
|
|
10
10
|
import "../__chunks/4R3V3JGP.js";
|
|
11
11
|
export {
|
|
12
12
|
createHovercardStore
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createMenubarStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
9
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/PXYVPXSS.js";
|
|
5
|
+
import "../__chunks/2H5K47H4.js";
|
|
6
|
+
import "../__chunks/URUD7X4C.js";
|
|
7
|
+
import "../__chunks/R676XYVY.js";
|
|
8
|
+
import "../__chunks/22HHDS5F.js";
|
|
9
|
+
import "../__chunks/RRSZHCH6.js";
|
|
10
10
|
import "../__chunks/7PRQYBBV.js";
|
|
11
11
|
import "../__chunks/4R3V3JGP.js";
|
|
12
12
|
|
package/esm/menu/menu-store.d.ts
CHANGED
|
@@ -13,10 +13,13 @@ export interface MenuStoreState<T extends MenuStoreValues = MenuStoreValues> ext
|
|
|
13
13
|
*/
|
|
14
14
|
initialFocus: "container" | "first" | "last";
|
|
15
15
|
/**
|
|
16
|
-
* A map of names and values that will be used by the
|
|
17
|
-
* `
|
|
16
|
+
* A map of names and values that will be used by the
|
|
17
|
+
* [`MenuItemCheckbox`](https://ariakit.org/reference/menu-item-checkbox) and
|
|
18
|
+
* [`MenuItemRadio`](https://ariakit.org/reference/menu-item-radio)
|
|
19
|
+
* components.
|
|
18
20
|
*
|
|
19
21
|
* Live examples:
|
|
22
|
+
* - [MenuItemCheckbox](https://ariakit.org/examples/menu-item-checkbox)
|
|
20
23
|
* - [Submenu with
|
|
21
24
|
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
22
25
|
*/
|
|
@@ -42,7 +45,8 @@ export interface MenuStoreFunctions<T extends MenuStoreValues = MenuStoreValues>
|
|
|
42
45
|
*/
|
|
43
46
|
setInitialFocus: SetState<MenuStoreState<T>["initialFocus"]>;
|
|
44
47
|
/**
|
|
45
|
-
* Sets the `values`
|
|
48
|
+
* Sets the [`values`](https://ariakit.org/reference/menu-provider#values)
|
|
49
|
+
* state.
|
|
46
50
|
* @example
|
|
47
51
|
* store.setValues({ watching: ["issues"] });
|
|
48
52
|
* store.setValues((values) => ({ ...values, watching: ["issues"] }));
|
|
@@ -68,16 +72,21 @@ export interface MenuStoreOptions<T extends MenuStoreValues = MenuStoreValues> e
|
|
|
68
72
|
*/
|
|
69
73
|
combobox?: ComboboxStore | null;
|
|
70
74
|
/**
|
|
71
|
-
* A reference to a parent menu store. This
|
|
75
|
+
* A reference to a parent menu store. This is used on nested menus.
|
|
72
76
|
*/
|
|
73
77
|
parent?: MenuStore | null;
|
|
74
78
|
/**
|
|
75
|
-
* A reference to a
|
|
76
|
-
*
|
|
79
|
+
* A reference to a menubar store. This is used when rendering menus inside a
|
|
80
|
+
* menubar.
|
|
77
81
|
*/
|
|
78
82
|
menubar?: MenuBarStore | null;
|
|
79
83
|
/**
|
|
80
|
-
* The default values for the
|
|
84
|
+
* The default values for the
|
|
85
|
+
* [`values`](https://ariakit.org/reference/menu-provider#values) state.
|
|
86
|
+
*
|
|
87
|
+
* Live examples:
|
|
88
|
+
* - [MenuItemCheckbox](https://ariakit.org/examples/menu-item-checkbox)
|
|
89
|
+
* - [MenuItemRadio](https://ariakit.org/examples/menu-item-radio)
|
|
81
90
|
* @default {}
|
|
82
91
|
*/
|
|
83
92
|
defaultValues?: MenuStoreState<T>["values"];
|
package/esm/menu/menu-store.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createHovercardStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/BRS7GKWU.js";
|
|
5
|
+
import "../__chunks/MFZZDIHG.js";
|
|
6
|
+
import "../__chunks/5RJNXXU2.js";
|
|
7
|
+
import "../__chunks/WCKXDMU7.js";
|
|
8
8
|
import {
|
|
9
9
|
createCompositeStore
|
|
10
|
-
} from "../__chunks/
|
|
11
|
-
import "../__chunks/
|
|
10
|
+
} from "../__chunks/2H5K47H4.js";
|
|
11
|
+
import "../__chunks/URUD7X4C.js";
|
|
12
12
|
import {
|
|
13
13
|
createStore,
|
|
14
14
|
mergeStore,
|
|
@@ -17,12 +17,12 @@ import {
|
|
|
17
17
|
setup,
|
|
18
18
|
sync,
|
|
19
19
|
throwOnConflictingProps
|
|
20
|
-
} from "../__chunks/
|
|
20
|
+
} from "../__chunks/R676XYVY.js";
|
|
21
21
|
import {
|
|
22
22
|
applyState,
|
|
23
23
|
defaultValue
|
|
24
|
-
} from "../__chunks/
|
|
25
|
-
import "../__chunks/
|
|
24
|
+
} from "../__chunks/22HHDS5F.js";
|
|
25
|
+
import "../__chunks/RRSZHCH6.js";
|
|
26
26
|
import "../__chunks/7PRQYBBV.js";
|
|
27
27
|
import {
|
|
28
28
|
__objRest,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createMenubarStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
8
|
-
import "../__chunks/
|
|
9
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/PXYVPXSS.js";
|
|
5
|
+
import "../__chunks/2H5K47H4.js";
|
|
6
|
+
import "../__chunks/URUD7X4C.js";
|
|
7
|
+
import "../__chunks/R676XYVY.js";
|
|
8
|
+
import "../__chunks/22HHDS5F.js";
|
|
9
|
+
import "../__chunks/RRSZHCH6.js";
|
|
10
10
|
import "../__chunks/7PRQYBBV.js";
|
|
11
11
|
import "../__chunks/4R3V3JGP.js";
|
|
12
12
|
export {
|
|
@@ -10,10 +10,18 @@ export declare function createPopoverStore({ popover: otherPopover, ...props }?:
|
|
|
10
10
|
export interface PopoverStoreState extends DialogStoreState {
|
|
11
11
|
/**
|
|
12
12
|
* The anchor element.
|
|
13
|
+
*
|
|
14
|
+
* Live examples:
|
|
15
|
+
* - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
|
|
13
16
|
*/
|
|
14
17
|
anchorElement: HTMLElement | null;
|
|
15
18
|
/**
|
|
16
19
|
* The popover element that will render the placement attributes.
|
|
20
|
+
*
|
|
21
|
+
* Live examples:
|
|
22
|
+
* - [Form with Select](https://ariakit.org/examples/form-select)
|
|
23
|
+
* - [Sliding Menu](https://ariakit.org/examples/menu-slide)
|
|
24
|
+
* - [Responsive Popover](https://ariakit.org/examples/popover-responsive)
|
|
17
25
|
*/
|
|
18
26
|
popoverElement: HTMLElement | null;
|
|
19
27
|
/**
|
|
@@ -21,30 +29,42 @@ export interface PopoverStoreState extends DialogStoreState {
|
|
|
21
29
|
*/
|
|
22
30
|
arrowElement: HTMLElement | null;
|
|
23
31
|
/**
|
|
24
|
-
* The current temporary
|
|
25
|
-
*
|
|
26
|
-
*
|
|
32
|
+
* The current temporary position of the popover. This might differ from the
|
|
33
|
+
* [`placement`](https://ariakit.org/reference/popover-provider#placement)
|
|
34
|
+
* state if the popover has had to adjust its position dynamically.
|
|
35
|
+
*
|
|
36
|
+
* Live examples:
|
|
37
|
+
* - [Tooltip with Framer
|
|
38
|
+
* Motion](https://ariakit.org/examples/tooltip-framer-motion)
|
|
27
39
|
*/
|
|
28
40
|
currentPlacement: Placement;
|
|
29
41
|
/**
|
|
30
42
|
* The placement of the popover.
|
|
31
43
|
*
|
|
32
44
|
* Live examples:
|
|
33
|
-
* - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
|
|
34
45
|
* - [Submenu with
|
|
35
46
|
* Combobox](https://ariakit.org/examples/menu-nested-combobox)
|
|
47
|
+
* - [Sliding Menu](https://ariakit.org/examples/menu-slide)
|
|
48
|
+
* - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
|
|
49
|
+
* - [Selection Popover](https://ariakit.org/examples/popover-selection)
|
|
50
|
+
* - [Standalone Popover](https://ariakit.org/examples/popover-standalone)
|
|
51
|
+
* - [Select Grid](https://ariakit.org/examples/select-grid)
|
|
36
52
|
* @default "bottom"
|
|
37
53
|
*/
|
|
38
54
|
placement: Placement;
|
|
39
55
|
/**
|
|
40
|
-
* A symbol that's used to recompute the popover position when the
|
|
41
|
-
* method
|
|
56
|
+
* A symbol that's used to recompute the popover position when the
|
|
57
|
+
* [`render`](https://ariakit.org/reference/use-popover-store#render) method
|
|
58
|
+
* is called.
|
|
42
59
|
*/
|
|
43
60
|
rendered: symbol;
|
|
44
61
|
}
|
|
45
62
|
export interface PopoverStoreFunctions extends DialogStoreFunctions {
|
|
46
63
|
/**
|
|
47
64
|
* Sets the anchor element.
|
|
65
|
+
*
|
|
66
|
+
* Live examples:
|
|
67
|
+
* - [Navigation Menubar](https://ariakit.org/examples/menubar-navigation)
|
|
48
68
|
*/
|
|
49
69
|
setAnchorElement: SetState<PopoverStoreState["anchorElement"]>;
|
|
50
70
|
/**
|
|
@@ -59,6 +79,11 @@ export interface PopoverStoreFunctions extends DialogStoreFunctions {
|
|
|
59
79
|
* A function that can be used to recompute the popover position. This is
|
|
60
80
|
* useful when the popover anchor changes in a way that affects the popover
|
|
61
81
|
* position.
|
|
82
|
+
*
|
|
83
|
+
* Live examples:
|
|
84
|
+
* - [Textarea with inline
|
|
85
|
+
* Combobox](https://ariakit.org/examples/combobox-textarea)
|
|
86
|
+
* - [Selection Popover](https://ariakit.org/examples/popover-selection)
|
|
62
87
|
*/
|
|
63
88
|
render: () => void;
|
|
64
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/MFZZDIHG.js";
|
|
5
|
+
import "../__chunks/5RJNXXU2.js";
|
|
6
|
+
import "../__chunks/WCKXDMU7.js";
|
|
7
|
+
import "../__chunks/R676XYVY.js";
|
|
8
|
+
import "../__chunks/22HHDS5F.js";
|
|
9
9
|
import "../__chunks/4R3V3JGP.js";
|
|
10
10
|
export {
|
|
11
11
|
createPopoverStore
|
|
@@ -18,7 +18,8 @@ export interface RadioStoreState extends CompositeStoreState {
|
|
|
18
18
|
}
|
|
19
19
|
export interface RadioStoreFunctions extends CompositeStoreFunctions {
|
|
20
20
|
/**
|
|
21
|
-
* Sets the `value`
|
|
21
|
+
* Sets the [`value`](https://ariakit.org/reference/radio-provider#value)
|
|
22
|
+
* state.
|
|
22
23
|
* @example
|
|
23
24
|
* store.setValue("apple");
|
|
24
25
|
* store.setValue((value) => value === "apple" ? "orange" : "apple");
|
package/esm/radio/radio-store.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/2H5K47H4.js";
|
|
5
|
+
import "../__chunks/URUD7X4C.js";
|
|
6
6
|
import {
|
|
7
7
|
createStore
|
|
8
|
-
} from "../__chunks/
|
|
8
|
+
} from "../__chunks/R676XYVY.js";
|
|
9
9
|
import {
|
|
10
10
|
defaultValue
|
|
11
|
-
} from "../__chunks/
|
|
12
|
-
import "../__chunks/
|
|
11
|
+
} from "../__chunks/22HHDS5F.js";
|
|
12
|
+
import "../__chunks/RRSZHCH6.js";
|
|
13
13
|
import "../__chunks/7PRQYBBV.js";
|
|
14
14
|
import {
|
|
15
15
|
__objRest,
|
|
@@ -60,7 +60,8 @@ export interface SelectStoreState<T extends SelectStoreValue = SelectStoreValue>
|
|
|
60
60
|
}
|
|
61
61
|
export interface SelectStoreFunctions<T extends SelectStoreValue = SelectStoreValue> extends Pick<SelectStoreOptions<T>, "combobox">, CompositeStoreFunctions<SelectStoreItem>, PopoverStoreFunctions {
|
|
62
62
|
/**
|
|
63
|
-
* Sets the `value`
|
|
63
|
+
* Sets the [`value`](https://ariakit.org/reference/select-provider#value)
|
|
64
|
+
* state.
|
|
64
65
|
* @example
|
|
65
66
|
* store.setValue("Apple");
|
|
66
67
|
* store.setValue(["Apple", "Banana"]);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createPopoverStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/MFZZDIHG.js";
|
|
5
|
+
import "../__chunks/5RJNXXU2.js";
|
|
6
|
+
import "../__chunks/WCKXDMU7.js";
|
|
7
7
|
import {
|
|
8
8
|
createCompositeStore
|
|
9
|
-
} from "../__chunks/
|
|
10
|
-
import "../__chunks/
|
|
9
|
+
} from "../__chunks/2H5K47H4.js";
|
|
10
|
+
import "../__chunks/URUD7X4C.js";
|
|
11
11
|
import {
|
|
12
12
|
batch,
|
|
13
13
|
createStore,
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
setup,
|
|
17
17
|
sync,
|
|
18
18
|
throwOnConflictingProps
|
|
19
|
-
} from "../__chunks/
|
|
19
|
+
} from "../__chunks/R676XYVY.js";
|
|
20
20
|
import {
|
|
21
21
|
defaultValue
|
|
22
|
-
} from "../__chunks/
|
|
23
|
-
import "../__chunks/
|
|
22
|
+
} from "../__chunks/22HHDS5F.js";
|
|
23
|
+
import "../__chunks/RRSZHCH6.js";
|
|
24
24
|
import {
|
|
25
25
|
toArray
|
|
26
26
|
} from "../__chunks/7PRQYBBV.js";
|
package/esm/tab/tab-store.d.ts
CHANGED
|
@@ -10,13 +10,9 @@ export interface TabStorePanel extends CollectionStoreItem {
|
|
|
10
10
|
tabId?: string | null;
|
|
11
11
|
}
|
|
12
12
|
export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
|
|
13
|
-
/**
|
|
14
|
-
* @default "horizontal"
|
|
15
|
-
*/
|
|
13
|
+
/** @default "horizontal" */
|
|
16
14
|
orientation: CompositeStoreState<TabStoreItem>["orientation"];
|
|
17
|
-
/**
|
|
18
|
-
* @default true
|
|
19
|
-
*/
|
|
15
|
+
/** @default true */
|
|
20
16
|
focusLoop: CompositeStoreState<TabStoreItem>["focusLoop"];
|
|
21
17
|
/**
|
|
22
18
|
* The id of the tab whose panel is currently visible. If it's `undefined`, it
|
|
@@ -28,8 +24,9 @@ export interface TabStoreState extends CompositeStoreState<TabStoreItem> {
|
|
|
28
24
|
*/
|
|
29
25
|
selectedId: TabStoreState["activeId"];
|
|
30
26
|
/**
|
|
31
|
-
*
|
|
32
|
-
* `false`, the tab will be selected
|
|
27
|
+
* Determines if the tab should be selected when it receives focus. If set to
|
|
28
|
+
* `false`, the tab will only be selected upon clicking, not when
|
|
29
|
+
* using arrow keys to shift focus.
|
|
33
30
|
*
|
|
34
31
|
* Live examples:
|
|
35
32
|
* - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
|
|
@@ -44,9 +41,6 @@ export interface TabStoreFunctions extends CompositeStoreFunctions<TabStoreItem>
|
|
|
44
41
|
* without moving focus. If you want to move focus, use the
|
|
45
42
|
* [`select`](https://ariakit.org/reference/use-tab-store#select) function
|
|
46
43
|
* instead.
|
|
47
|
-
*
|
|
48
|
-
* Live examples:
|
|
49
|
-
* - [Tab with React Router](https://ariakit.org/examples/tab-react-router)
|
|
50
44
|
* @example
|
|
51
45
|
* // Selects the tab with id "tab-1"
|
|
52
46
|
* store.setSelectedId("tab-1");
|
package/esm/tab/tab-store.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/2H5K47H4.js";
|
|
5
5
|
import {
|
|
6
6
|
createCollectionStore
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/URUD7X4C.js";
|
|
8
8
|
import {
|
|
9
9
|
batch,
|
|
10
10
|
createStore,
|
|
11
11
|
setup,
|
|
12
12
|
sync
|
|
13
|
-
} from "../__chunks/
|
|
13
|
+
} from "../__chunks/R676XYVY.js";
|
|
14
14
|
import {
|
|
15
15
|
defaultValue
|
|
16
|
-
} from "../__chunks/
|
|
17
|
-
import "../__chunks/
|
|
16
|
+
} from "../__chunks/22HHDS5F.js";
|
|
17
|
+
import "../__chunks/RRSZHCH6.js";
|
|
18
18
|
import "../__chunks/7PRQYBBV.js";
|
|
19
19
|
import {
|
|
20
20
|
__spreadProps,
|
|
@@ -5,13 +5,9 @@ import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function createToolbarStore(props?: ToolbarStoreProps): ToolbarStore;
|
|
7
7
|
export interface ToolbarStoreState extends CompositeStoreState {
|
|
8
|
-
/**
|
|
9
|
-
* @default "horizontal"
|
|
10
|
-
*/
|
|
8
|
+
/** @default "horizontal" */
|
|
11
9
|
orientation: CompositeStoreState["orientation"];
|
|
12
|
-
/**
|
|
13
|
-
* @default true
|
|
14
|
-
*/
|
|
10
|
+
/** @default true */
|
|
15
11
|
focusLoop: CompositeStoreState["focusLoop"];
|
|
16
12
|
}
|
|
17
13
|
export interface ToolbarStoreFunctions extends CompositeStoreFunctions {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/2H5K47H4.js";
|
|
5
|
+
import "../__chunks/URUD7X4C.js";
|
|
6
|
+
import "../__chunks/R676XYVY.js";
|
|
7
7
|
import {
|
|
8
8
|
defaultValue
|
|
9
|
-
} from "../__chunks/
|
|
10
|
-
import "../__chunks/
|
|
9
|
+
} from "../__chunks/22HHDS5F.js";
|
|
10
|
+
import "../__chunks/RRSZHCH6.js";
|
|
11
11
|
import "../__chunks/7PRQYBBV.js";
|
|
12
12
|
import {
|
|
13
13
|
__spreadProps,
|
|
@@ -5,9 +5,15 @@ import type { Store, StoreOptions, StoreProps } from "../utils/store.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function createTooltipStore(props?: TooltipStoreProps): TooltipStore;
|
|
7
7
|
export interface TooltipStoreState extends HovercardStoreState {
|
|
8
|
+
/** @default "top" */
|
|
9
|
+
placement: HovercardStoreState["placement"];
|
|
10
|
+
/** @default 0 */
|
|
11
|
+
hideTimeout?: HovercardStoreState["hideTimeout"];
|
|
8
12
|
/**
|
|
9
13
|
* Determines whether the tooltip is being used as a label or a description
|
|
10
14
|
* for the anchor element.
|
|
15
|
+
* @deprecated Render a visually hidden label or use the `aria-label` or
|
|
16
|
+
* `aria-labelledby` attributes on the anchor element instead.
|
|
11
17
|
* @default "description"
|
|
12
18
|
*/
|
|
13
19
|
type: "label" | "description";
|
|
@@ -17,10 +23,6 @@ export interface TooltipStoreState extends HovercardStoreState {
|
|
|
17
23
|
* @default 300
|
|
18
24
|
*/
|
|
19
25
|
skipTimeout: number;
|
|
20
|
-
/** @default "top" */
|
|
21
|
-
placement: HovercardStoreState["placement"];
|
|
22
|
-
/** @default 0 */
|
|
23
|
-
hideTimeout?: HovercardStoreState["hideTimeout"];
|
|
24
26
|
}
|
|
25
27
|
export type TooltipStoreFunctions = HovercardStoreFunctions;
|
|
26
28
|
export interface TooltipStoreOptions extends HovercardStoreOptions, StoreOptions<TooltipStoreState, "type" | "placement" | "timeout" | "showTimeout" | "hideTimeout" | "skipTimeout"> {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createHovercardStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
7
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/BRS7GKWU.js";
|
|
5
|
+
import "../__chunks/MFZZDIHG.js";
|
|
6
|
+
import "../__chunks/5RJNXXU2.js";
|
|
7
|
+
import "../__chunks/WCKXDMU7.js";
|
|
8
8
|
import {
|
|
9
9
|
createStore
|
|
10
|
-
} from "../__chunks/
|
|
10
|
+
} from "../__chunks/R676XYVY.js";
|
|
11
11
|
import {
|
|
12
12
|
defaultValue
|
|
13
|
-
} from "../__chunks/
|
|
13
|
+
} from "../__chunks/22HHDS5F.js";
|
|
14
14
|
import {
|
|
15
15
|
__spreadProps,
|
|
16
16
|
__spreadValues
|
|
@@ -19,6 +19,15 @@ import {
|
|
|
19
19
|
// src/tooltip/tooltip-store.ts
|
|
20
20
|
function createTooltipStore(props = {}) {
|
|
21
21
|
var _a;
|
|
22
|
+
if (process.env.NODE_ENV !== "production") {
|
|
23
|
+
if (props.type === "label") {
|
|
24
|
+
console.warn(
|
|
25
|
+
"The `type` option on the tooltip store is deprecated.",
|
|
26
|
+
"Render a visually hidden label or use the `aria-label` or `aria-labelledby` attributes on the anchor element instead.",
|
|
27
|
+
"See https://ariakit.org/components/tooltip#tooltip-anchors-must-have-accessible-names"
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
22
31
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
23
32
|
const hovercard = createHovercardStore(__spreadProps(__spreadValues({}, props), {
|
|
24
33
|
placement: defaultValue(
|
package/esm/utils/dom.js
CHANGED
package/esm/utils/events.js
CHANGED
package/esm/utils/focus.js
CHANGED
package/esm/utils/misc.d.ts
CHANGED
|
@@ -113,6 +113,10 @@ export declare function disabledFromProps(props: {
|
|
|
113
113
|
disabled?: boolean;
|
|
114
114
|
"aria-disabled"?: boolean | "true" | "false";
|
|
115
115
|
}): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Removes undefined values from an object.
|
|
118
|
+
*/
|
|
119
|
+
export declare function removeUndefinedValues<T extends AnyObject>(obj: T): T;
|
|
116
120
|
/**
|
|
117
121
|
* Returns the first value that is not `undefined`.
|
|
118
122
|
*/
|
package/esm/utils/misc.js
CHANGED
|
@@ -19,8 +19,9 @@ import {
|
|
|
19
19
|
normalizeString,
|
|
20
20
|
omit,
|
|
21
21
|
pick,
|
|
22
|
+
removeUndefinedValues,
|
|
22
23
|
shallowEqual
|
|
23
|
-
} from "../__chunks/
|
|
24
|
+
} from "../__chunks/22HHDS5F.js";
|
|
24
25
|
import "../__chunks/4R3V3JGP.js";
|
|
25
26
|
export {
|
|
26
27
|
afterPaint,
|
|
@@ -42,5 +43,6 @@ export {
|
|
|
42
43
|
normalizeString,
|
|
43
44
|
omit,
|
|
44
45
|
pick,
|
|
46
|
+
removeUndefinedValues,
|
|
45
47
|
shallowEqual
|
|
46
48
|
};
|
package/esm/utils/platform.js
CHANGED
package/esm/utils/store.js
CHANGED
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
subscribe,
|
|
11
11
|
sync,
|
|
12
12
|
throwOnConflictingProps
|
|
13
|
-
} from "../__chunks/
|
|
14
|
-
import "../__chunks/
|
|
13
|
+
} from "../__chunks/R676XYVY.js";
|
|
14
|
+
import "../__chunks/22HHDS5F.js";
|
|
15
15
|
import "../__chunks/4R3V3JGP.js";
|
|
16
16
|
export {
|
|
17
17
|
batch,
|