@brightspace-ui/core 1.184.2 → 1.184.3

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.
@@ -24,6 +24,7 @@ import { LocalizeCoreElement } from '../../lang/localize-core-element.js';
24
24
  import { offscreenStyles } from '../offscreen/offscreen.js';
25
25
  import { RtlMixin } from '../../mixins/rtl-mixin.js';
26
26
 
27
+ const ARROWLEFT_KEY_CODE = 37;
27
28
  const ESCAPE_KEY_CODE = 27;
28
29
  const SET_DIMENSION_ID_PREFIX = 'list-';
29
30
 
@@ -205,6 +206,7 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
205
206
  @d2l-hierarchical-view-hide-start="${this._handleDimensionHideStart}"
206
207
  @d2l-hierarchical-view-show-complete="${this._handleDimensionShowComplete}"
207
208
  @d2l-hierarchical-view-show-start="${this._handleDimensionShowStart}"
209
+ @keyup="${this._handleDimensionHideKeyPress}"
208
210
  data-key="${dimension.key}">
209
211
  ${dimensionHTML}
210
212
  </d2l-hierarchical-view>
@@ -293,7 +295,7 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
293
295
  `;
294
296
 
295
297
  return html`
296
- <div slot="header" @keyup="${this._handleEscKeyPress}">
298
+ <div slot="header" @keyup="${this._handleDimensionHideKeyPress}">
297
299
  ${header}
298
300
  ${actions}
299
301
  </div>
@@ -493,6 +495,13 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
493
495
  this.shadowRoot.querySelector(`d2l-hierarchical-view[data-key="${this._activeDimensionKey}"]`).hide();
494
496
  }
495
497
 
498
+ _handleDimensionHideKeyPress(e) {
499
+ if (this._activeDimensionKey && (e.keyCode === ARROWLEFT_KEY_CODE || e.keyCode === ESCAPE_KEY_CODE)) {
500
+ e.stopPropagation();
501
+ this._handleDimensionHide();
502
+ }
503
+ }
504
+
496
505
  _handleDimensionHideStart() {
497
506
  this._activeDimensionKey = null;
498
507
  }
@@ -519,13 +528,6 @@ class Filter extends LocalizeCoreElement(RtlMixin(LitElement)) {
519
528
  this._stopPropagation(e);
520
529
  }
521
530
 
522
- _handleEscKeyPress(e) {
523
- if (this._activeDimensionKey && e.keyCode === ESCAPE_KEY_CODE) {
524
- e.stopPropagation();
525
- this._handleDimensionHide();
526
- }
527
- }
528
-
529
531
  _handleSearch(e) {
530
532
  const dimension = this._getActiveDimension();
531
533
  const searchValue = e.detail.value.trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "1.184.2",
3
+ "version": "1.184.3",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "repository": "https://github.com/BrightspaceUI/core.git",
6
6
  "publishConfig": {