@ariakit/core 0.4.6 → 0.4.7
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 +4 -0
- package/cjs/__chunks/{4W3OYRR3.cjs → 3COGJMN3.cjs} +9 -9
- package/cjs/__chunks/{B4AKUC4S.cjs → 5BQ2XS3R.cjs} +4 -4
- package/cjs/__chunks/{LTLFSC4X.cjs → DIYYVJDK.cjs} +2 -2
- package/cjs/__chunks/{AETQC2AR.cjs → LAYUSNGM.cjs} +11 -11
- package/cjs/__chunks/{3HYNC3XA.cjs → LBFF2BBK.cjs} +6 -6
- package/cjs/__chunks/{B4LYZ4EM.cjs → M2NNCFIJ.cjs} +13 -11
- package/cjs/__chunks/{5JEQEZFR.cjs → MB5TLEVH.cjs} +7 -7
- package/cjs/__chunks/{UEZLSKZ4.cjs → XVL5HZ27.cjs} +4 -4
- package/cjs/checkbox/checkbox-store.cjs +3 -3
- package/cjs/collection/collection-store.cjs +3 -3
- package/cjs/combobox/combobox-store.cjs +24 -24
- package/cjs/combobox/combobox-store.d.cts +2 -0
- package/cjs/combobox/combobox-store.d.ts +2 -0
- package/cjs/composite/composite-overflow-store.cjs +5 -5
- package/cjs/composite/composite-store.cjs +4 -4
- package/cjs/composite/composite-store.d.cts +5 -1
- package/cjs/composite/composite-store.d.ts +5 -1
- package/cjs/dialog/dialog-store.cjs +4 -4
- package/cjs/disclosure/disclosure-store.cjs +3 -3
- package/cjs/form/form-store.cjs +7 -7
- package/cjs/hovercard/hovercard-store.cjs +6 -6
- package/cjs/menu/menu-bar-store.cjs +5 -5
- package/cjs/menu/menu-store.cjs +18 -18
- package/cjs/menubar/menubar-store.cjs +5 -5
- package/cjs/popover/popover-store.cjs +5 -5
- package/cjs/radio/radio-store.cjs +5 -5
- package/cjs/select/select-store.cjs +20 -20
- package/cjs/select/select-store.d.cts +2 -0
- package/cjs/select/select-store.d.ts +2 -0
- package/cjs/tab/tab-store.cjs +23 -23
- package/cjs/tab/tab-store.d.cts +10 -4
- package/cjs/tab/tab-store.d.ts +10 -4
- package/cjs/tag/tag-store.cjs +7 -7
- package/cjs/toolbar/toolbar-store.cjs +4 -4
- package/cjs/tooltip/tooltip-store.cjs +7 -7
- package/cjs/utils/events.cjs +3 -1
- package/cjs/utils/focus.cjs +7 -3
- package/cjs/utils/store.cjs +2 -2
- package/esm/__chunks/{BRS7GKWU.js → E4HA32QI.js} +2 -2
- package/esm/__chunks/{EQPTKGFA.js → I2WJ7JBQ.js} +1 -1
- package/esm/__chunks/{WCKXDMU7.js → KDSZSVV5.js} +1 -1
- package/esm/__chunks/{R676XYVY.js → KLPDXTDE.js} +13 -11
- package/esm/__chunks/{5RJNXXU2.js → NWACXGIN.js} +1 -1
- package/esm/__chunks/{P3MTNH46.js → RCLYDUHE.js} +2 -2
- package/esm/__chunks/{MFZZDIHG.js → SAZZJI72.js} +2 -2
- package/esm/__chunks/{PBSSD2DM.js → VH2P7HEP.js} +2 -2
- package/esm/checkbox/checkbox-store.js +1 -1
- package/esm/collection/collection-store.js +2 -2
- package/esm/combobox/combobox-store.d.ts +2 -0
- package/esm/combobox/combobox-store.js +6 -6
- package/esm/composite/composite-overflow-store.js +4 -4
- package/esm/composite/composite-store.d.ts +5 -1
- package/esm/composite/composite-store.js +3 -3
- package/esm/dialog/dialog-store.js +3 -3
- package/esm/disclosure/disclosure-store.js +2 -2
- package/esm/form/form-store.js +2 -2
- package/esm/hovercard/hovercard-store.js +5 -5
- package/esm/menu/menu-bar-store.js +4 -4
- package/esm/menu/menu-store.js +7 -7
- package/esm/menubar/menubar-store.js +4 -4
- package/esm/popover/popover-store.js +4 -4
- package/esm/radio/radio-store.js +3 -3
- package/esm/select/select-store.d.ts +2 -0
- package/esm/select/select-store.js +6 -6
- package/esm/tab/tab-store.d.ts +10 -4
- package/esm/tab/tab-store.js +3 -3
- package/esm/tag/tag-store.js +3 -3
- package/esm/toolbar/toolbar-store.js +3 -3
- package/esm/tooltip/tooltip-store.js +5 -5
- package/esm/utils/events.js +3 -1
- package/esm/utils/focus.js +7 -3
- package/esm/utils/store.js +1 -1
- package/package.json +2 -2
- package/.eslintignore +0 -6
package/esm/tab/tab-store.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/VH2P7HEP.js";
|
|
5
5
|
import {
|
|
6
6
|
createCollectionStore
|
|
7
|
-
} from "../__chunks/
|
|
7
|
+
} from "../__chunks/I2WJ7JBQ.js";
|
|
8
8
|
import "../__chunks/7PRQYBBV.js";
|
|
9
9
|
import {
|
|
10
10
|
batch,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
omit,
|
|
14
14
|
setup,
|
|
15
15
|
sync
|
|
16
|
-
} from "../__chunks/
|
|
16
|
+
} from "../__chunks/KLPDXTDE.js";
|
|
17
17
|
import {
|
|
18
18
|
chain,
|
|
19
19
|
defaultValue
|
package/esm/tag/tag-store.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/VH2P7HEP.js";
|
|
5
|
+
import "../__chunks/I2WJ7JBQ.js";
|
|
6
6
|
import "../__chunks/7PRQYBBV.js";
|
|
7
7
|
import {
|
|
8
8
|
UndoManager
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
createStore,
|
|
12
12
|
setup,
|
|
13
13
|
sync
|
|
14
|
-
} from "../__chunks/
|
|
14
|
+
} from "../__chunks/KLPDXTDE.js";
|
|
15
15
|
import {
|
|
16
16
|
applyState,
|
|
17
17
|
defaultValue
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createCompositeStore
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/VH2P7HEP.js";
|
|
5
|
+
import "../__chunks/I2WJ7JBQ.js";
|
|
6
6
|
import "../__chunks/7PRQYBBV.js";
|
|
7
|
-
import "../__chunks/
|
|
7
|
+
import "../__chunks/KLPDXTDE.js";
|
|
8
8
|
import {
|
|
9
9
|
defaultValue
|
|
10
10
|
} from "../__chunks/22HHDS5F.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
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/E4HA32QI.js";
|
|
5
|
+
import "../__chunks/SAZZJI72.js";
|
|
6
|
+
import "../__chunks/NWACXGIN.js";
|
|
7
|
+
import "../__chunks/KDSZSVV5.js";
|
|
8
8
|
import {
|
|
9
9
|
createStore
|
|
10
|
-
} from "../__chunks/
|
|
10
|
+
} from "../__chunks/KLPDXTDE.js";
|
|
11
11
|
import {
|
|
12
12
|
defaultValue
|
|
13
13
|
} from "../__chunks/22HHDS5F.js";
|
package/esm/utils/events.js
CHANGED
|
@@ -127,7 +127,9 @@ function addGlobalEventListener(type, listener, options, scope = window) {
|
|
|
127
127
|
scope.document.removeEventListener(type, listener, options);
|
|
128
128
|
} catch (e) {
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
for (const remove of children) {
|
|
131
|
+
remove();
|
|
132
|
+
}
|
|
131
133
|
};
|
|
132
134
|
return removeEventListener;
|
|
133
135
|
}
|
package/esm/utils/focus.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
// src/utils/focus.ts
|
|
13
13
|
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'])";
|
|
14
14
|
function hasNegativeTabIndex(element) {
|
|
15
|
-
const tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10);
|
|
15
|
+
const tabIndex = Number.parseInt(element.getAttribute("tabindex") || "0", 10);
|
|
16
16
|
return tabIndex < 0;
|
|
17
17
|
}
|
|
18
18
|
function isFocusable(element) {
|
|
@@ -205,7 +205,9 @@ function disableFocus(element) {
|
|
|
205
205
|
}
|
|
206
206
|
function disableFocusIn(container, includeContainer) {
|
|
207
207
|
const tabbableElements = getAllTabbableIn(container, includeContainer);
|
|
208
|
-
tabbableElements
|
|
208
|
+
for (const element of tabbableElements) {
|
|
209
|
+
disableFocus(element);
|
|
210
|
+
}
|
|
209
211
|
}
|
|
210
212
|
function restoreFocusIn(container) {
|
|
211
213
|
const elements = container.querySelectorAll("[data-tabindex]");
|
|
@@ -221,7 +223,9 @@ function restoreFocusIn(container) {
|
|
|
221
223
|
if (container.hasAttribute("data-tabindex")) {
|
|
222
224
|
restoreTabIndex(container);
|
|
223
225
|
}
|
|
224
|
-
elements
|
|
226
|
+
for (const element of elements) {
|
|
227
|
+
restoreTabIndex(element);
|
|
228
|
+
}
|
|
225
229
|
}
|
|
226
230
|
function focusIntoView(element, options) {
|
|
227
231
|
if (!("scrollIntoView" in element)) {
|
package/esm/utils/store.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ariakit/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
4
4
|
"description": "Ariakit core",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/diegohaz"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"lint": "
|
|
23
|
+
"lint": "biome check .",
|
|
24
24
|
"build": "node ../../scripts/build/build.js",
|
|
25
25
|
"clean": "node ../../scripts/build/clean.js"
|
|
26
26
|
},
|