@primer/behaviors 1.5.1-rc.b50217f → 1.6.0-rc.192d841
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 +12 -0
- package/dist/esm/focus-zone.js +12 -0
- package/package.json +8 -7
package/dist/cjs/focus-zone.js
CHANGED
|
@@ -259,6 +259,11 @@ function focusZone(container, settings) {
|
|
|
259
259
|
endFocusManagement(...(0, iterate_focusable_elements_js_1.iterateFocusableElements)(removedNode, iterateFocusableElementsOptions));
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
+
if (mutation.type === 'attributes' && mutation.oldValue === null) {
|
|
263
|
+
if (mutation.target instanceof HTMLElement) {
|
|
264
|
+
endFocusManagement(mutation.target);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
262
267
|
}
|
|
263
268
|
for (const mutation of mutations) {
|
|
264
269
|
for (const addedNode of mutation.addedNodes) {
|
|
@@ -266,11 +271,18 @@ function focusZone(container, settings) {
|
|
|
266
271
|
beginFocusManagement(...(0, iterate_focusable_elements_js_1.iterateFocusableElements)(addedNode, iterateFocusableElementsOptions));
|
|
267
272
|
}
|
|
268
273
|
}
|
|
274
|
+
if (mutation.type === 'attributes' && mutation.oldValue !== null) {
|
|
275
|
+
if (mutation.target instanceof HTMLElement) {
|
|
276
|
+
beginFocusManagement(mutation.target);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
269
279
|
}
|
|
270
280
|
});
|
|
271
281
|
observer.observe(container, {
|
|
272
282
|
subtree: true,
|
|
273
283
|
childList: true,
|
|
284
|
+
attributeFilter: ['hidden', 'disabled'],
|
|
285
|
+
attributeOldValue: true,
|
|
274
286
|
});
|
|
275
287
|
const controller = new AbortController();
|
|
276
288
|
const signal = (_e = settings === null || settings === void 0 ? void 0 : settings.abortSignal) !== null && _e !== void 0 ? _e : controller.signal;
|
package/dist/esm/focus-zone.js
CHANGED
|
@@ -256,6 +256,11 @@ export function focusZone(container, settings) {
|
|
|
256
256
|
endFocusManagement(...iterateFocusableElements(removedNode, iterateFocusableElementsOptions));
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
+
if (mutation.type === 'attributes' && mutation.oldValue === null) {
|
|
260
|
+
if (mutation.target instanceof HTMLElement) {
|
|
261
|
+
endFocusManagement(mutation.target);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
259
264
|
}
|
|
260
265
|
for (const mutation of mutations) {
|
|
261
266
|
for (const addedNode of mutation.addedNodes) {
|
|
@@ -263,11 +268,18 @@ export function focusZone(container, settings) {
|
|
|
263
268
|
beginFocusManagement(...iterateFocusableElements(addedNode, iterateFocusableElementsOptions));
|
|
264
269
|
}
|
|
265
270
|
}
|
|
271
|
+
if (mutation.type === 'attributes' && mutation.oldValue !== null) {
|
|
272
|
+
if (mutation.target instanceof HTMLElement) {
|
|
273
|
+
beginFocusManagement(mutation.target);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
266
276
|
}
|
|
267
277
|
});
|
|
268
278
|
observer.observe(container, {
|
|
269
279
|
subtree: true,
|
|
270
280
|
childList: true,
|
|
281
|
+
attributeFilter: ['hidden', 'disabled'],
|
|
282
|
+
attributeOldValue: true,
|
|
271
283
|
});
|
|
272
284
|
const controller = new AbortController();
|
|
273
285
|
const signal = (_e = settings === null || settings === void 0 ? void 0 : settings.abortSignal) !== null && _e !== void 0 ? _e : controller.signal;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/behaviors",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0-rc.192d841",
|
|
4
4
|
"description": "Shared behaviors for JavaScript components",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -66,21 +66,22 @@
|
|
|
66
66
|
}
|
|
67
67
|
],
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@changesets/changelog-github": "^0.
|
|
69
|
+
"@changesets/changelog-github": "^0.5.0",
|
|
70
70
|
"@changesets/cli": "^2.18.1",
|
|
71
71
|
"@github/prettier-config": "^0.0.6",
|
|
72
72
|
"@size-limit/preset-small-lib": "^8.2.4",
|
|
73
|
-
"@testing-library/react": "^
|
|
73
|
+
"@testing-library/react": "^15.0.2",
|
|
74
74
|
"@testing-library/user-event": "^14.5.1",
|
|
75
|
-
"@types/jest": "^
|
|
76
|
-
"@types/node": "^
|
|
75
|
+
"@types/jest": "^29.5.11",
|
|
76
|
+
"@types/node": "^20.10.5",
|
|
77
77
|
"@types/react": "^18.2.23",
|
|
78
|
-
"esbuild": "^0.
|
|
78
|
+
"esbuild": "^0.21.1",
|
|
79
79
|
"esbuild-jest": "^0.5.0",
|
|
80
80
|
"eslint": "^8.50.0",
|
|
81
81
|
"eslint-plugin-github": "^4.10.0",
|
|
82
82
|
"eslint-plugin-prettier": "^5.0.0",
|
|
83
|
-
"jest": "^
|
|
83
|
+
"jest": "^29.7.0",
|
|
84
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
84
85
|
"prettier": "^3.0.3",
|
|
85
86
|
"react": "^18.2.0",
|
|
86
87
|
"react-dom": "^18.2.0",
|