@ariakit/core 0.4.18 → 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 +5 -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/{JNPL5IHP.cjs → G2CSOTWZ.cjs} +7 -7
- package/cjs/__chunks/{4ITB54IT.cjs → I4CBIWTX.cjs} +2 -3
- package/cjs/__chunks/{JNYCP2QO.cjs → LS2SNHDM.cjs} +6 -6
- package/cjs/__chunks/{UROTDZFK.cjs → R37KOEUW.cjs} +10 -10
- package/cjs/__chunks/{OYTZFOIJ.cjs → UGAVMSQJ.cjs} +18 -18
- package/cjs/__chunks/{HGVIF2R4.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 +12 -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/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/{3DNM6L6E.js → G7XPWBXK.js} +1 -2
- package/esm/__chunks/{SNHYQNEZ.js → GMGLSF2B.js} +1 -1
- package/esm/__chunks/{WSDJ6ZRB.js → H7R2CY4Q.js} +3 -3
- package/esm/__chunks/{75BJEVSH.js → IHNLLH3I.js} +2 -2
- package/esm/__chunks/{N5XGANPW.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/{RVTIKFRL.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 +2 -3
- 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
package/esm/tag/tag-store.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
UndoManager
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/U4NM2NCP.js";
|
|
5
5
|
import {
|
|
6
6
|
createCompositeStore
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/UNDE2QJS.js";
|
|
8
8
|
import "../__chunks/7PRQYBBV.js";
|
|
9
|
-
import "../__chunks/
|
|
10
|
-
import "../__chunks/
|
|
9
|
+
import "../__chunks/KZX46JDB.js";
|
|
10
|
+
import "../__chunks/G7XPWBXK.js";
|
|
11
11
|
import {
|
|
12
12
|
createStore,
|
|
13
13
|
setup,
|
|
14
14
|
sync
|
|
15
|
-
} from "../__chunks/
|
|
15
|
+
} from "../__chunks/XTZ53NXG.js";
|
|
16
16
|
import {
|
|
17
17
|
applyState,
|
|
18
18
|
defaultValue
|
|
19
|
-
} from "../__chunks/
|
|
19
|
+
} from "../__chunks/UWJK2WK2.js";
|
|
20
20
|
|
|
21
21
|
// src/tag/tag-store.ts
|
|
22
22
|
function createTagStore(props = {}) {
|
|
@@ -46,7 +46,7 @@ function createTagStore(props = {}) {
|
|
|
46
46
|
);
|
|
47
47
|
const setValues = (values) => {
|
|
48
48
|
const { values: previousValues } = tag.getState();
|
|
49
|
-
UndoManager.execute(() => {
|
|
49
|
+
void UndoManager.execute(() => {
|
|
50
50
|
let changed = true;
|
|
51
51
|
tag.setState("values", (prev) => {
|
|
52
52
|
const next = applyState(values, prev);
|
|
@@ -1,14 +1,14 @@
|
|
|
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/
|
|
8
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/KZX46JDB.js";
|
|
7
|
+
import "../__chunks/G7XPWBXK.js";
|
|
8
|
+
import "../__chunks/XTZ53NXG.js";
|
|
9
9
|
import {
|
|
10
10
|
defaultValue
|
|
11
|
-
} from "../__chunks/
|
|
11
|
+
} from "../__chunks/UWJK2WK2.js";
|
|
12
12
|
|
|
13
13
|
// src/toolbar/toolbar-store.ts
|
|
14
14
|
function createToolbarStore(props = {}) {
|
|
@@ -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/TEVO2DMI.js";
|
|
5
|
+
import "../__chunks/MJ4ZJEIM.js";
|
|
6
|
+
import "../__chunks/7KNZCZ55.js";
|
|
7
|
+
import "../__chunks/IHNLLH3I.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/tooltip/tooltip-store.ts
|
|
16
16
|
function createTooltipStore(props = {}) {
|
|
@@ -20,7 +20,7 @@ function createTooltipStore(props = {}) {
|
|
|
20
20
|
console.warn(
|
|
21
21
|
"The `type` option on the tooltip store is deprecated.",
|
|
22
22
|
"Render a visually hidden label or use the `aria-label` or `aria-labelledby` attributes on the anchor element instead.",
|
|
23
|
-
"See https://ariakit.
|
|
23
|
+
"See https://ariakit.com/components/tooltip#tooltip-anchors-must-have-accessible-names"
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
26
|
}
|
package/esm/utils/dom.js
CHANGED
package/esm/utils/events.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
isApple
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/GMGLSF2B.js";
|
|
5
5
|
import {
|
|
6
6
|
contains
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/G7XPWBXK.js";
|
|
8
8
|
|
|
9
9
|
// src/utils/events.ts
|
|
10
10
|
function isPortalEvent(event) {
|
|
@@ -102,12 +102,12 @@ function addGlobalEventListener(type, listener, options, scope = window) {
|
|
|
102
102
|
for (const frame of Array.from(scope.frames)) {
|
|
103
103
|
children.push(addGlobalEventListener(type, listener, options, frame));
|
|
104
104
|
}
|
|
105
|
-
} catch
|
|
105
|
+
} catch {
|
|
106
106
|
}
|
|
107
107
|
const removeEventListener = () => {
|
|
108
108
|
try {
|
|
109
109
|
scope.document.removeEventListener(type, listener, options);
|
|
110
|
-
} catch
|
|
110
|
+
} catch {
|
|
111
111
|
}
|
|
112
112
|
for (const remove of children) {
|
|
113
113
|
remove();
|
package/esm/utils/focus.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getActiveElement,
|
|
5
5
|
isFrame,
|
|
6
6
|
isVisible
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/G7XPWBXK.js";
|
|
8
8
|
|
|
9
9
|
// src/utils/focus.ts
|
|
10
10
|
var selector = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
|
|
@@ -173,8 +173,7 @@ function focusIfNeeded(element) {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
function disableFocus(element) {
|
|
176
|
-
|
|
177
|
-
const currentTabindex = (_a = element.getAttribute("tabindex")) != null ? _a : "";
|
|
176
|
+
const currentTabindex = element.getAttribute("tabindex") ?? "";
|
|
178
177
|
element.setAttribute("data-tabindex", currentTabindex);
|
|
179
178
|
element.setAttribute("tabindex", "-1");
|
|
180
179
|
}
|
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
|
+
* Checks whether something is disabled or not based on its DOM attributes.
|
|
118
|
+
*/
|
|
119
|
+
export declare function disabledFromElement(element: Element): boolean;
|
|
116
120
|
/**
|
|
117
121
|
* Removes undefined values from an object.
|
|
118
122
|
*/
|
package/esm/utils/misc.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
chain,
|
|
7
7
|
cx,
|
|
8
8
|
defaultValue,
|
|
9
|
+
disabledFromElement,
|
|
9
10
|
disabledFromProps,
|
|
10
11
|
getKeys,
|
|
11
12
|
hasOwnProperty,
|
|
@@ -21,7 +22,7 @@ import {
|
|
|
21
22
|
pick,
|
|
22
23
|
removeUndefinedValues,
|
|
23
24
|
shallowEqual
|
|
24
|
-
} from "../__chunks/
|
|
25
|
+
} from "../__chunks/UWJK2WK2.js";
|
|
25
26
|
export {
|
|
26
27
|
afterPaint,
|
|
27
28
|
applyState,
|
|
@@ -29,6 +30,7 @@ export {
|
|
|
29
30
|
chain,
|
|
30
31
|
cx,
|
|
31
32
|
defaultValue,
|
|
33
|
+
disabledFromElement,
|
|
32
34
|
disabledFromProps,
|
|
33
35
|
getKeys,
|
|
34
36
|
hasOwnProperty,
|
package/esm/utils/platform.js
CHANGED
package/esm/utils/store.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface StoreProps<S extends State = State> {
|
|
|
48
48
|
* Another store object that will be kept in sync with the original store.
|
|
49
49
|
*
|
|
50
50
|
* Live examples:
|
|
51
|
-
* - [Navigation Menubar](https://ariakit.
|
|
51
|
+
* - [Navigation Menubar](https://ariakit.com/examples/menubar-navigation)
|
|
52
52
|
*/
|
|
53
53
|
store?: Store<Partial<S>>;
|
|
54
54
|
}
|
package/esm/utils/store.js
CHANGED
package/esm/utils/undo.js
CHANGED
package/package.json
CHANGED
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ariakit/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.19",
|
|
4
4
|
"description": "Ariakit core",
|
|
5
|
-
"
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ariakit",
|
|
7
|
+
"core"
|
|
8
|
+
],
|
|
9
|
+
"homepage": "https://ariakit.com",
|
|
6
10
|
"license": "MIT",
|
|
7
|
-
"homepage": "https://ariakit.org",
|
|
8
|
-
"type": "module",
|
|
9
|
-
"main": "cjs/index.cjs",
|
|
10
|
-
"module": "esm/index.js",
|
|
11
|
-
"types": "cjs/index.d.ts",
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "https://github.com/ariakit/ariakit.git",
|
|
15
|
-
"directory": "packages/ariakit-core"
|
|
16
|
-
},
|
|
17
11
|
"author": {
|
|
18
12
|
"name": "Diego Haz",
|
|
19
13
|
"email": "hazdiego@gmail.com",
|
|
20
14
|
"url": "https://github.com/diegohaz"
|
|
21
15
|
},
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/ariakit/ariakit.git",
|
|
19
|
+
"directory": "packages/ariakit-core"
|
|
26
20
|
},
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
"type": "module",
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"main": "cjs/index.cjs",
|
|
24
|
+
"module": "esm/index.js",
|
|
25
|
+
"types": "cjs/index.d.ts",
|
|
31
26
|
"exports": {
|
|
32
27
|
".": {
|
|
33
28
|
"import": "./esm/index.js",
|
|
@@ -240,5 +235,9 @@
|
|
|
240
235
|
}
|
|
241
236
|
},
|
|
242
237
|
"./package.json": "./package.json"
|
|
238
|
+
},
|
|
239
|
+
"scripts": {
|
|
240
|
+
"build": "node ../../scripts/build/build.js",
|
|
241
|
+
"clean": "node ../../scripts/build/clean.js"
|
|
243
242
|
}
|
|
244
|
-
}
|
|
243
|
+
}
|
package/tsconfig.build.json
CHANGED