@primer/behaviors 1.7.2-rc.91a5267 → 1.8.0-rc.3eb63b8
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/dist/cjs/focus-zone.js
CHANGED
|
@@ -183,6 +183,9 @@ function focusZone(container, settings) {
|
|
|
183
183
|
activeDescendantControl === null || activeDescendantControl === void 0 ? void 0 : activeDescendantControl.removeAttribute('aria-activedescendant');
|
|
184
184
|
container.removeAttribute(hasActiveDescendantAttribute);
|
|
185
185
|
previouslyActiveElement === null || previouslyActiveElement === void 0 ? void 0 : previouslyActiveElement.removeAttribute(isActiveDescendantAttribute);
|
|
186
|
+
for (const item of container.querySelectorAll(`[${isActiveDescendantAttribute}]`)) {
|
|
187
|
+
item === null || item === void 0 ? void 0 : item.removeAttribute(isActiveDescendantAttribute);
|
|
188
|
+
}
|
|
186
189
|
activeDescendantCallback === null || activeDescendantCallback === void 0 ? void 0 : activeDescendantCallback(undefined, previouslyActiveElement, false);
|
|
187
190
|
}
|
|
188
191
|
function beginFocusManagement(...elements) {
|
|
@@ -301,7 +304,7 @@ function focusZone(container, settings) {
|
|
|
301
304
|
activeDescendantControl.focus({ preventScroll });
|
|
302
305
|
updateFocusedElement(event.target);
|
|
303
306
|
}
|
|
304
|
-
});
|
|
307
|
+
}, { signal });
|
|
305
308
|
container.addEventListener('mousemove', ({ target }) => {
|
|
306
309
|
if (!(target instanceof Node)) {
|
|
307
310
|
return;
|
|
@@ -318,10 +321,10 @@ function focusZone(container, settings) {
|
|
|
318
321
|
else {
|
|
319
322
|
setActiveDescendant(undefined, currentFocusedElement);
|
|
320
323
|
}
|
|
321
|
-
});
|
|
324
|
+
}, { signal });
|
|
322
325
|
activeDescendantControl.addEventListener('focusout', () => {
|
|
323
326
|
clearActiveDescendant();
|
|
324
|
-
});
|
|
327
|
+
}, { signal });
|
|
325
328
|
}
|
|
326
329
|
else {
|
|
327
330
|
container.addEventListener('focusin', event => {
|
package/dist/esm/focus-zone.mjs
CHANGED
|
@@ -181,6 +181,9 @@ function focusZone(container, settings) {
|
|
|
181
181
|
activeDescendantControl === null || activeDescendantControl === void 0 ? void 0 : activeDescendantControl.removeAttribute('aria-activedescendant');
|
|
182
182
|
container.removeAttribute(hasActiveDescendantAttribute);
|
|
183
183
|
previouslyActiveElement === null || previouslyActiveElement === void 0 ? void 0 : previouslyActiveElement.removeAttribute(isActiveDescendantAttribute);
|
|
184
|
+
for (const item of container.querySelectorAll(`[${isActiveDescendantAttribute}]`)) {
|
|
185
|
+
item === null || item === void 0 ? void 0 : item.removeAttribute(isActiveDescendantAttribute);
|
|
186
|
+
}
|
|
184
187
|
activeDescendantCallback === null || activeDescendantCallback === void 0 ? void 0 : activeDescendantCallback(undefined, previouslyActiveElement, false);
|
|
185
188
|
}
|
|
186
189
|
function beginFocusManagement(...elements) {
|
|
@@ -299,7 +302,7 @@ function focusZone(container, settings) {
|
|
|
299
302
|
activeDescendantControl.focus({ preventScroll });
|
|
300
303
|
updateFocusedElement(event.target);
|
|
301
304
|
}
|
|
302
|
-
});
|
|
305
|
+
}, { signal });
|
|
303
306
|
container.addEventListener('mousemove', ({ target }) => {
|
|
304
307
|
if (!(target instanceof Node)) {
|
|
305
308
|
return;
|
|
@@ -316,10 +319,10 @@ function focusZone(container, settings) {
|
|
|
316
319
|
else {
|
|
317
320
|
setActiveDescendant(undefined, currentFocusedElement);
|
|
318
321
|
}
|
|
319
|
-
});
|
|
322
|
+
}, { signal });
|
|
320
323
|
activeDescendantControl.addEventListener('focusout', () => {
|
|
321
324
|
clearActiveDescendant();
|
|
322
|
-
});
|
|
325
|
+
}, { signal });
|
|
323
326
|
}
|
|
324
327
|
else {
|
|
325
328
|
container.addEventListener('focusin', event => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/behaviors",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0-rc.3eb63b8",
|
|
4
4
|
"description": "Shared behaviors for JavaScript components",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
}
|
|
70
70
|
],
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@arethetypeswrong/cli": "^0.
|
|
72
|
+
"@arethetypeswrong/cli": "^0.16.2",
|
|
73
73
|
"@changesets/changelog-github": "^0.5.0",
|
|
74
74
|
"@changesets/cli": "^2.18.1",
|
|
75
75
|
"@github/prettier-config": "^0.0.6",
|
|
76
|
-
"@rollup/plugin-typescript": "^
|
|
76
|
+
"@rollup/plugin-typescript": "^12.1.0",
|
|
77
77
|
"@rollup/wasm-node": "^4.19.1",
|
|
78
78
|
"@size-limit/preset-small-lib": "^11.1.4",
|
|
79
79
|
"@testing-library/react": "^16.0.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@types/jest": "^29.5.11",
|
|
82
82
|
"@types/node": "^22.0.0",
|
|
83
83
|
"@types/react": "^18.2.23",
|
|
84
|
-
"esbuild": "^0.
|
|
84
|
+
"esbuild": "^0.24.0",
|
|
85
85
|
"esbuild-jest": "^0.5.0",
|
|
86
86
|
"eslint": "^8.50.0",
|
|
87
87
|
"eslint-plugin-github": "^5.0.0",
|