@primer/behaviors 0.0.0-20251215031129 → 0.0.0-20251215033125

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.
@@ -203,7 +203,9 @@ function focusZone(container, settings) {
203
203
  activeDescendantCallback === null || activeDescendantCallback === void 0 ? void 0 : activeDescendantCallback(undefined, previouslyActiveElement, false);
204
204
  }
205
205
  function beginFocusManagement(...elements) {
206
- const filteredElements = elements.filter(e => { var _a, _b; return (_b = (_a = settings === null || settings === void 0 ? void 0 : settings.focusableElementFilter) === null || _a === void 0 ? void 0 : _a.call(settings, e)) !== null && _b !== void 0 ? _b : true; });
206
+ const filteredElements = (settings === null || settings === void 0 ? void 0 : settings.focusableElementFilter)
207
+ ? elements.filter(e => settings.focusableElementFilter(e))
208
+ : elements;
207
209
  if (filteredElements.length === 0) {
208
210
  return;
209
211
  }
@@ -336,6 +338,7 @@ function focusZone(container, settings) {
336
338
  signal.addEventListener('abort', () => {
337
339
  observer.disconnect();
338
340
  endFocusManagement(...focusableElements);
341
+ focusableElements.clear();
339
342
  });
340
343
  let elementIndexFocusedByClick = undefined;
341
344
  container.addEventListener('mousedown', event => {
@@ -201,7 +201,9 @@ function focusZone(container, settings) {
201
201
  activeDescendantCallback === null || activeDescendantCallback === void 0 ? void 0 : activeDescendantCallback(undefined, previouslyActiveElement, false);
202
202
  }
203
203
  function beginFocusManagement(...elements) {
204
- const filteredElements = elements.filter(e => { var _a, _b; return (_b = (_a = settings === null || settings === void 0 ? void 0 : settings.focusableElementFilter) === null || _a === void 0 ? void 0 : _a.call(settings, e)) !== null && _b !== void 0 ? _b : true; });
204
+ const filteredElements = (settings === null || settings === void 0 ? void 0 : settings.focusableElementFilter)
205
+ ? elements.filter(e => settings.focusableElementFilter(e))
206
+ : elements;
205
207
  if (filteredElements.length === 0) {
206
208
  return;
207
209
  }
@@ -334,6 +336,7 @@ function focusZone(container, settings) {
334
336
  signal.addEventListener('abort', () => {
335
337
  observer.disconnect();
336
338
  endFocusManagement(...focusableElements);
339
+ focusableElements.clear();
337
340
  });
338
341
  let elementIndexFocusedByClick = undefined;
339
342
  container.addEventListener('mousedown', event => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/behaviors",
3
- "version": "0.0.0-20251215031129",
3
+ "version": "0.0.0-20251215033125",
4
4
  "description": "Shared behaviors for JavaScript components",
5
5
  "type": "commonjs",
6
6
  "main": "dist/cjs/index.js",