@brightspace-ui/core 3.348.0 → 3.349.0

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.
@@ -23,6 +23,7 @@ import '../selection/selection-summary.js';
23
23
  import '../tooltip/tooltip.js';
24
24
 
25
25
  import { bodyCompactStyles, bodySmallStyles, bodyStandardStyles, heading4Styles } from '../typography/styles.js';
26
+ import { createRef, ref } from 'lit/directives/ref.js';
26
27
  import { css, html, LitElement, nothing } from 'lit';
27
28
  import { getNextFocusable, getPreviousFocusable } from '../../helpers/focus.js';
28
29
  import { getOverflowDeclarations, overflowEllipsisDeclarations } from '../../helpers/overflow.js';
@@ -404,6 +405,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) {
404
405
  }
405
406
 
406
407
  #resizeObserver;
408
+ #searchRef = createRef();
407
409
 
408
410
  _buildDimension(dimension, singleDimension) {
409
411
  let dimensionHTML;
@@ -486,7 +488,8 @@ class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) {
486
488
  @d2l-input-search-layout-updated="${this.#handleSearchLayoutUpdated}"
487
489
  ?disabled="${this._isDimensionEmpty(dimension)}"
488
490
  label="${this.localize('components.input-search.search')}"
489
- value="${ifDefined(dimension.searchValue)}">
491
+ value="${ifDefined(dimension.searchValue)}"
492
+ ${ref(this.#searchRef)}>
490
493
  </d2l-input-search>
491
494
  `;
492
495
 
@@ -859,7 +862,8 @@ class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) {
859
862
  }
860
863
 
861
864
  _handleDimensionHideKeyDown(e) {
862
- if (this._activeDimensionKey && (e.keyCode === ARROWLEFT_KEY_CODE || e.keyCode === ESCAPE_KEY_CODE)) {
865
+ if (!this._activeDimensionKey) return;
866
+ if ((e.keyCode === ARROWLEFT_KEY_CODE && e.target !== this.#searchRef.value) || e.keyCode === ESCAPE_KEY_CODE) {
863
867
  e.stopPropagation();
864
868
  this._handleDimensionHide();
865
869
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.348.0",
3
+ "version": "3.349.0",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",