@ariakit/core 0.3.10 → 0.3.11
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/{ZXCB7MXN.cjs → BFE5R4EZ.cjs} +17 -17
- package/cjs/__chunks/{Y6PHIDP6.cjs → E53JW5BD.cjs} +12 -12
- package/cjs/__chunks/{5CBCKBZ2.cjs → F6HPKLO2.cjs} +12 -12
- package/cjs/__chunks/{MFSCSSBJ.cjs → I3Y4EXEF.cjs} +2 -2
- package/cjs/__chunks/{3UT5FE6K.cjs → KBNYGXWI.cjs} +3 -0
- package/cjs/__chunks/{YLMJBIQM.cjs → MI6NUQYQ.cjs} +22 -13
- package/cjs/__chunks/{CWDUO5EV.cjs → NOFH2BLB.cjs} +7 -7
- package/cjs/__chunks/{MWNFQD55.cjs → OTVLDMN2.cjs} +16 -16
- package/cjs/__chunks/{HMO4CKUP.cjs → TQTGWD5K.cjs} +10 -10
- package/cjs/checkbox/checkbox-store.cjs +5 -5
- package/cjs/collection/collection-store.cjs +4 -4
- package/cjs/combobox/combobox-store.cjs +32 -32
- package/cjs/composite/composite-overflow-store.cjs +6 -6
- package/cjs/composite/composite-store.cjs +5 -5
- package/cjs/dialog/dialog-store.cjs +5 -5
- package/cjs/disclosure/disclosure-store.cjs +4 -4
- package/cjs/form/form-store.cjs +23 -23
- 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 +6 -6
- package/cjs/menu/menu-store.cjs +26 -26
- package/cjs/menu/menu-store.d.cts +16 -7
- package/cjs/menu/menu-store.d.ts +16 -7
- package/cjs/menubar/menubar-store.cjs +6 -6
- 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 +8 -8
- package/cjs/radio/radio-store.d.cts +2 -1
- package/cjs/radio/radio-store.d.ts +2 -1
- package/cjs/select/select-store.cjs +28 -28
- package/cjs/select/select-store.d.cts +2 -1
- package/cjs/select/select-store.d.ts +2 -1
- package/cjs/tab/tab-store.cjs +20 -20
- package/cjs/tab/tab-store.d.cts +5 -11
- package/cjs/tab/tab-store.d.ts +5 -11
- package/cjs/toolbar/toolbar-store.cjs +7 -7
- package/cjs/toolbar/toolbar-store.d.cts +2 -6
- package/cjs/toolbar/toolbar-store.d.ts +2 -6
- package/cjs/tooltip/tooltip-store.cjs +12 -12
- package/cjs/tooltip/tooltip-store.d.cts +6 -4
- package/cjs/tooltip/tooltip-store.d.ts +6 -4
- package/cjs/utils/misc.cjs +2 -2
- package/cjs/utils/store.cjs +3 -3
- package/esm/__chunks/{MYUKSFP5.js → 22K762VQ.js} +13 -4
- package/esm/__chunks/{AKMSZ36N.js → AF6IUUFN.js} +3 -3
- package/esm/__chunks/{K6ELJFXN.js → EAHJFCU4.js} +1 -1
- package/esm/__chunks/{VEUNYQYR.js → IERTEJ3A.js} +3 -3
- package/esm/__chunks/{QJ5CUA32.js → SOLWE6E5.js} +3 -3
- package/esm/__chunks/{25MEC56I.js → SX2XFD6A.js} +1 -1
- package/esm/__chunks/{UUFF4PQ6.js → XU3EOSCU.js} +3 -3
- package/esm/__chunks/{I2VQ3XGR.js → Y3OOHFCN.js} +3 -0
- package/esm/__chunks/{L5RYKTVQ.js → Z5IGYIPT.js} +2 -2
- package/esm/checkbox/checkbox-store.js +2 -2
- package/esm/collection/collection-store.js +3 -3
- package/esm/combobox/combobox-store.js +7 -7
- package/esm/composite/composite-overflow-store.js +5 -5
- package/esm/composite/composite-store.js +4 -4
- package/esm/dialog/dialog-store.js +4 -4
- package/esm/disclosure/disclosure-store.js +3 -3
- package/esm/form/form-store.d.ts +1 -1
- package/esm/form/form-store.js +3 -3
- package/esm/hovercard/hovercard-store.d.ts +14 -7
- package/esm/hovercard/hovercard-store.js +6 -6
- package/esm/menu/menu-bar-store.js +5 -5
- package/esm/menu/menu-store.d.ts +16 -7
- package/esm/menu/menu-store.js +8 -8
- package/esm/menubar/menubar-store.js +5 -5
- 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 +4 -4
- package/esm/select/select-store.d.ts +2 -1
- package/esm/select/select-store.js +7 -7
- package/esm/tab/tab-store.d.ts +5 -11
- package/esm/tab/tab-store.js +4 -4
- package/esm/toolbar/toolbar-store.d.ts +2 -6
- package/esm/toolbar/toolbar-store.js +4 -4
- package/esm/tooltip/tooltip-store.d.ts +6 -4
- package/esm/tooltip/tooltip-store.js +6 -6
- package/esm/utils/misc.js +1 -1
- package/esm/utils/store.js +2 -2
- package/package.json +1 -1
|
@@ -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"]);
|
package/cjs/tab/tab-store.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _BFE5R4EZcjs = require('../__chunks/BFE5R4EZ.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _MI6NUQYQcjs = require('../__chunks/MI6NUQYQ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
|
|
17
17
|
require('../__chunks/5F4DVUNS.cjs');
|
|
18
18
|
require('../__chunks/ULSPM3Y3.cjs');
|
|
19
19
|
|
|
@@ -25,32 +25,32 @@ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
|
|
|
25
25
|
function createTabStore(props = {}) {
|
|
26
26
|
var _a;
|
|
27
27
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
28
|
-
const composite =
|
|
29
|
-
orientation:
|
|
28
|
+
const composite = _BFE5R4EZcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
|
|
29
|
+
orientation: _KBNYGXWIcjs.defaultValue.call(void 0,
|
|
30
30
|
props.orientation,
|
|
31
31
|
syncState == null ? void 0 : syncState.orientation,
|
|
32
32
|
"horizontal"
|
|
33
33
|
),
|
|
34
|
-
focusLoop:
|
|
34
|
+
focusLoop: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
|
|
35
35
|
}));
|
|
36
|
-
const panels =
|
|
36
|
+
const panels = _MI6NUQYQcjs.createCollectionStore.call(void 0, );
|
|
37
37
|
const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, composite.getState()), {
|
|
38
|
-
selectedId:
|
|
38
|
+
selectedId: _KBNYGXWIcjs.defaultValue.call(void 0,
|
|
39
39
|
props.selectedId,
|
|
40
40
|
syncState == null ? void 0 : syncState.selectedId,
|
|
41
41
|
props.defaultSelectedId,
|
|
42
42
|
void 0
|
|
43
43
|
),
|
|
44
|
-
selectOnMove:
|
|
44
|
+
selectOnMove: _KBNYGXWIcjs.defaultValue.call(void 0,
|
|
45
45
|
props.selectOnMove,
|
|
46
46
|
syncState == null ? void 0 : syncState.selectOnMove,
|
|
47
47
|
true
|
|
48
48
|
)
|
|
49
49
|
});
|
|
50
|
-
const tab =
|
|
51
|
-
|
|
50
|
+
const tab = _F6HPKLO2cjs.createStore.call(void 0, initialState, composite, props.store);
|
|
51
|
+
_F6HPKLO2cjs.setup.call(void 0,
|
|
52
52
|
tab,
|
|
53
|
-
() =>
|
|
53
|
+
() => _F6HPKLO2cjs.sync.call(void 0, tab, ["moves"], () => {
|
|
54
54
|
const { activeId, selectOnMove } = tab.getState();
|
|
55
55
|
if (!selectOnMove)
|
|
56
56
|
return;
|
|
@@ -66,17 +66,17 @@ function createTabStore(props = {}) {
|
|
|
66
66
|
tab.setState("selectedId", tabItem.id);
|
|
67
67
|
})
|
|
68
68
|
);
|
|
69
|
-
|
|
69
|
+
_F6HPKLO2cjs.setup.call(void 0,
|
|
70
70
|
tab,
|
|
71
|
-
() =>
|
|
71
|
+
() => _F6HPKLO2cjs.batch.call(void 0,
|
|
72
72
|
tab,
|
|
73
73
|
["selectedId"],
|
|
74
74
|
(state) => tab.setState("activeId", state.selectedId)
|
|
75
75
|
)
|
|
76
76
|
);
|
|
77
|
-
|
|
77
|
+
_F6HPKLO2cjs.setup.call(void 0,
|
|
78
78
|
tab,
|
|
79
|
-
() =>
|
|
79
|
+
() => _F6HPKLO2cjs.sync.call(void 0, tab, ["selectedId", "renderedItems"], (state) => {
|
|
80
80
|
if (state.selectedId !== void 0)
|
|
81
81
|
return;
|
|
82
82
|
const { activeId, renderedItems } = tab.getState();
|
|
@@ -91,13 +91,13 @@ function createTabStore(props = {}) {
|
|
|
91
91
|
}
|
|
92
92
|
})
|
|
93
93
|
);
|
|
94
|
-
|
|
94
|
+
_F6HPKLO2cjs.setup.call(void 0,
|
|
95
95
|
tab,
|
|
96
|
-
() =>
|
|
96
|
+
() => _F6HPKLO2cjs.sync.call(void 0, tab, ["renderedItems"], (state) => {
|
|
97
97
|
const tabs = state.renderedItems;
|
|
98
98
|
if (!tabs.length)
|
|
99
99
|
return;
|
|
100
|
-
return
|
|
100
|
+
return _F6HPKLO2cjs.sync.call(void 0, panels, ["renderedItems"], (state2) => {
|
|
101
101
|
const items = state2.renderedItems;
|
|
102
102
|
const hasOrphanPanels = items.some((panel) => !panel.tabId);
|
|
103
103
|
if (!hasOrphanPanels)
|
package/cjs/tab/tab-store.d.cts
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/cjs/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");
|
|
@@ -1,12 +1,12 @@
|
|
|
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 _BFE5R4EZcjs = require('../__chunks/BFE5R4EZ.cjs');
|
|
5
|
+
require('../__chunks/MI6NUQYQ.cjs');
|
|
6
|
+
require('../__chunks/F6HPKLO2.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
|
|
10
10
|
require('../__chunks/5F4DVUNS.cjs');
|
|
11
11
|
require('../__chunks/ULSPM3Y3.cjs');
|
|
12
12
|
|
|
@@ -18,13 +18,13 @@ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
|
|
|
18
18
|
function createToolbarStore(props = {}) {
|
|
19
19
|
var _a;
|
|
20
20
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
21
|
-
return
|
|
22
|
-
orientation:
|
|
21
|
+
return _BFE5R4EZcjs.createCompositeStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
|
|
22
|
+
orientation: _KBNYGXWIcjs.defaultValue.call(void 0,
|
|
23
23
|
props.orientation,
|
|
24
24
|
syncState == null ? void 0 : syncState.orientation,
|
|
25
25
|
"horizontal"
|
|
26
26
|
),
|
|
27
|
-
focusLoop:
|
|
27
|
+
focusLoop: _KBNYGXWIcjs.defaultValue.call(void 0, props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true)
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -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 {
|
|
@@ -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,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 _TQTGWD5Kcjs = require('../__chunks/TQTGWD5K.cjs');
|
|
5
|
+
require('../__chunks/E53JW5BD.cjs');
|
|
6
|
+
require('../__chunks/I3Y4EXEF.cjs');
|
|
7
|
+
require('../__chunks/OTVLDMN2.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -20,19 +20,19 @@ var _AV6KTKLEcjs = require('../__chunks/AV6KTKLE.cjs');
|
|
|
20
20
|
function createTooltipStore(props = {}) {
|
|
21
21
|
var _a;
|
|
22
22
|
const syncState = (_a = props.store) == null ? void 0 : _a.getState();
|
|
23
|
-
const hovercard =
|
|
24
|
-
placement:
|
|
23
|
+
const hovercard = _TQTGWD5Kcjs.createHovercardStore.call(void 0, _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, props), {
|
|
24
|
+
placement: _KBNYGXWIcjs.defaultValue.call(void 0,
|
|
25
25
|
props.placement,
|
|
26
26
|
syncState == null ? void 0 : syncState.placement,
|
|
27
27
|
"top"
|
|
28
28
|
),
|
|
29
|
-
hideTimeout:
|
|
29
|
+
hideTimeout: _KBNYGXWIcjs.defaultValue.call(void 0, props.hideTimeout, syncState == null ? void 0 : syncState.hideTimeout, 0)
|
|
30
30
|
}));
|
|
31
31
|
const initialState = _AV6KTKLEcjs.__spreadProps.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, hovercard.getState()), {
|
|
32
|
-
type:
|
|
33
|
-
skipTimeout:
|
|
32
|
+
type: _KBNYGXWIcjs.defaultValue.call(void 0, props.type, syncState == null ? void 0 : syncState.type, "description"),
|
|
33
|
+
skipTimeout: _KBNYGXWIcjs.defaultValue.call(void 0, props.skipTimeout, syncState == null ? void 0 : syncState.skipTimeout, 300)
|
|
34
34
|
});
|
|
35
|
-
const tooltip =
|
|
35
|
+
const tooltip = _F6HPKLO2cjs.createStore.call(void 0, initialState, hovercard, props.store);
|
|
36
36
|
return _AV6KTKLEcjs.__spreadValues.call(void 0, _AV6KTKLEcjs.__spreadValues.call(void 0, {}, hovercard), tooltip);
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -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"> {
|
|
@@ -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"> {
|
package/cjs/utils/misc.cjs
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _KBNYGXWIcjs = require('../__chunks/KBNYGXWI.cjs');
|
|
24
24
|
require('../__chunks/AV6KTKLE.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
@@ -43,4 +43,4 @@ require('../__chunks/AV6KTKLE.cjs');
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
exports.afterPaint =
|
|
46
|
+
exports.afterPaint = _KBNYGXWIcjs.afterPaint; exports.applyState = _KBNYGXWIcjs.applyState; exports.beforePaint = _KBNYGXWIcjs.beforePaint; exports.chain = _KBNYGXWIcjs.chain; exports.cx = _KBNYGXWIcjs.cx; exports.defaultValue = _KBNYGXWIcjs.defaultValue; exports.disabledFromProps = _KBNYGXWIcjs.disabledFromProps; exports.getKeys = _KBNYGXWIcjs.getKeys; exports.hasOwnProperty = _KBNYGXWIcjs.hasOwnProperty; exports.identity = _KBNYGXWIcjs.identity; exports.invariant = _KBNYGXWIcjs.invariant; exports.isEmpty = _KBNYGXWIcjs.isEmpty; exports.isFalsyBooleanCallback = _KBNYGXWIcjs.isFalsyBooleanCallback; exports.isInteger = _KBNYGXWIcjs.isInteger; exports.isObject = _KBNYGXWIcjs.isObject; exports.noop = _KBNYGXWIcjs.noop; exports.normalizeString = _KBNYGXWIcjs.normalizeString; exports.omit = _KBNYGXWIcjs.omit; exports.pick = _KBNYGXWIcjs.pick; exports.shallowEqual = _KBNYGXWIcjs.shallowEqual;
|
package/cjs/utils/store.cjs
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
require('../__chunks/
|
|
13
|
+
var _F6HPKLO2cjs = require('../__chunks/F6HPKLO2.cjs');
|
|
14
|
+
require('../__chunks/KBNYGXWI.cjs');
|
|
15
15
|
require('../__chunks/AV6KTKLE.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
@@ -24,4 +24,4 @@ require('../__chunks/AV6KTKLE.cjs');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
exports.batch =
|
|
27
|
+
exports.batch = _F6HPKLO2cjs.batch; exports.createStore = _F6HPKLO2cjs.createStore; exports.init = _F6HPKLO2cjs.init; exports.mergeStore = _F6HPKLO2cjs.mergeStore; exports.omit = _F6HPKLO2cjs.omit; exports.pick = _F6HPKLO2cjs.pick; exports.setup = _F6HPKLO2cjs.setup; exports.subscribe = _F6HPKLO2cjs.subscribe; exports.sync = _F6HPKLO2cjs.sync; exports.throwOnConflictingProps = _F6HPKLO2cjs.throwOnConflictingProps;
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
init,
|
|
6
6
|
setup,
|
|
7
7
|
throwOnConflictingProps
|
|
8
|
-
} from "./
|
|
8
|
+
} from "./EAHJFCU4.js";
|
|
9
9
|
import {
|
|
10
10
|
chain,
|
|
11
11
|
defaultValue
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./Y3OOHFCN.js";
|
|
13
13
|
import {
|
|
14
14
|
getDocument
|
|
15
15
|
} from "./DLOEKDPY.js";
|
|
@@ -84,7 +84,7 @@ function createCollectionStore(props = {}) {
|
|
|
84
84
|
};
|
|
85
85
|
const syncPrivateStore = getPrivateStore(props.store);
|
|
86
86
|
const privateStore = createStore(
|
|
87
|
-
{ renderedItems: initialState.renderedItems },
|
|
87
|
+
{ items, renderedItems: initialState.renderedItems },
|
|
88
88
|
syncPrivateStore
|
|
89
89
|
);
|
|
90
90
|
const collection = createStore(initialState, props.store);
|
|
@@ -94,6 +94,11 @@ function createCollectionStore(props = {}) {
|
|
|
94
94
|
collection.setState("renderedItems", sortedItems);
|
|
95
95
|
};
|
|
96
96
|
setup(collection, () => init(privateStore));
|
|
97
|
+
setup(privateStore, () => {
|
|
98
|
+
return batch(privateStore, ["items"], (state) => {
|
|
99
|
+
collection.setState("items", state.items);
|
|
100
|
+
});
|
|
101
|
+
});
|
|
97
102
|
setup(privateStore, () => {
|
|
98
103
|
return batch(privateStore, ["renderedItems"], (state) => {
|
|
99
104
|
let firstRun = true;
|
|
@@ -162,7 +167,11 @@ function createCollectionStore(props = {}) {
|
|
|
162
167
|
};
|
|
163
168
|
return unmergeItem;
|
|
164
169
|
};
|
|
165
|
-
const registerItem = (item) => mergeItem(
|
|
170
|
+
const registerItem = (item) => mergeItem(
|
|
171
|
+
item,
|
|
172
|
+
(getItems) => privateStore.setState("items", getItems),
|
|
173
|
+
true
|
|
174
|
+
);
|
|
166
175
|
return __spreadProps(__spreadValues({}, collection), {
|
|
167
176
|
registerItem,
|
|
168
177
|
renderItem: (item) => chain(
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createDialogStore
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./SX2XFD6A.js";
|
|
5
5
|
import {
|
|
6
6
|
createStore,
|
|
7
7
|
mergeStore,
|
|
8
8
|
omit,
|
|
9
9
|
throwOnConflictingProps
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./EAHJFCU4.js";
|
|
11
11
|
import {
|
|
12
12
|
defaultValue
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./Y3OOHFCN.js";
|
|
14
14
|
import {
|
|
15
15
|
__objRest,
|
|
16
16
|
__spreadProps,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCollectionStore
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./22K762VQ.js";
|
|
5
5
|
import {
|
|
6
6
|
createStore,
|
|
7
7
|
setup,
|
|
8
8
|
sync
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./EAHJFCU4.js";
|
|
10
10
|
import {
|
|
11
11
|
defaultValue
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./Y3OOHFCN.js";
|
|
13
13
|
import {
|
|
14
14
|
flatten2DArray,
|
|
15
15
|
reverseArray
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createPopoverStore
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./AF6IUUFN.js";
|
|
5
5
|
import {
|
|
6
6
|
createStore
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./EAHJFCU4.js";
|
|
8
8
|
import {
|
|
9
9
|
defaultValue
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./Y3OOHFCN.js";
|
|
11
11
|
import {
|
|
12
12
|
__spreadProps,
|
|
13
13
|
__spreadValues
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./IERTEJ3A.js";
|
|
5
5
|
import {
|
|
6
6
|
createStore
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./EAHJFCU4.js";
|
|
8
8
|
import {
|
|
9
9
|
defaultValue
|
|
10
|
-
} from "./
|
|
10
|
+
} from "./Y3OOHFCN.js";
|
|
11
11
|
import {
|
|
12
12
|
__spreadProps,
|
|
13
13
|
__spreadValues
|
|
@@ -63,6 +63,9 @@ function isInteger(arg) {
|
|
|
63
63
|
return String(Math.floor(Number(arg))) === arg;
|
|
64
64
|
}
|
|
65
65
|
function hasOwnProperty(object, prop) {
|
|
66
|
+
if (typeof Object.hasOwn === "function") {
|
|
67
|
+
return Object.hasOwn(object, prop);
|
|
68
|
+
}
|
|
66
69
|
return Object.prototype.hasOwnProperty.call(object, prop);
|
|
67
70
|
}
|
|
68
71
|
function chain(...fns) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
createStore,
|
|
4
4
|
throwOnConflictingProps
|
|
5
|
-
} from "../__chunks/
|
|
5
|
+
} from "../__chunks/EAHJFCU4.js";
|
|
6
6
|
import {
|
|
7
7
|
defaultValue
|
|
8
|
-
} from "../__chunks/
|
|
8
|
+
} from "../__chunks/Y3OOHFCN.js";
|
|
9
9
|
import {
|
|
10
10
|
__spreadProps,
|
|
11
11
|
__spreadValues
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCollectionStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/22K762VQ.js";
|
|
5
|
+
import "../__chunks/EAHJFCU4.js";
|
|
6
|
+
import "../__chunks/Y3OOHFCN.js";
|
|
7
7
|
import "../__chunks/DLOEKDPY.js";
|
|
8
8
|
import "../__chunks/4R3V3JGP.js";
|
|
9
9
|
export {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createPopoverStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
6
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/AF6IUUFN.js";
|
|
5
|
+
import "../__chunks/SX2XFD6A.js";
|
|
6
|
+
import "../__chunks/Z5IGYIPT.js";
|
|
7
7
|
import {
|
|
8
8
|
createCompositeStore
|
|
9
|
-
} from "../__chunks/
|
|
10
|
-
import "../__chunks/
|
|
9
|
+
} from "../__chunks/IERTEJ3A.js";
|
|
10
|
+
import "../__chunks/22K762VQ.js";
|
|
11
11
|
import {
|
|
12
12
|
batch,
|
|
13
13
|
createStore,
|
|
14
14
|
setup,
|
|
15
15
|
sync,
|
|
16
16
|
throwOnConflictingProps
|
|
17
|
-
} from "../__chunks/
|
|
17
|
+
} from "../__chunks/EAHJFCU4.js";
|
|
18
18
|
import {
|
|
19
19
|
defaultValue
|
|
20
|
-
} from "../__chunks/
|
|
20
|
+
} from "../__chunks/Y3OOHFCN.js";
|
|
21
21
|
import {
|
|
22
22
|
isSafari,
|
|
23
23
|
isTouchDevice
|
|
@@ -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/AF6IUUFN.js";
|
|
5
|
+
import "../__chunks/SX2XFD6A.js";
|
|
6
|
+
import "../__chunks/Z5IGYIPT.js";
|
|
7
|
+
import "../__chunks/EAHJFCU4.js";
|
|
8
|
+
import "../__chunks/Y3OOHFCN.js";
|
|
9
9
|
import "../__chunks/4R3V3JGP.js";
|
|
10
10
|
|
|
11
11
|
// src/composite/composite-overflow-store.ts
|