@brightspace-ui/core 3.347.0 → 3.348.1

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
  }
@@ -21,7 +21,12 @@ class Toolbar extends PropertyRequiredMixin(LitElement) {
21
21
  * ACCESSIBILITY: REQUIRED: Accessible label for the toolbar
22
22
  * @type {string}
23
23
  */
24
- label: { type: String, required: true }
24
+ label: { type: String, required: true },
25
+ /**
26
+ * Hides the border
27
+ * @type {boolean}
28
+ */
29
+ noBorder: { type: Boolean, reflect: true, attribute: 'no-border' }
25
30
  };
26
31
 
27
32
  static styles = css`
@@ -38,11 +43,16 @@ class Toolbar extends PropertyRequiredMixin(LitElement) {
38
43
  gap: 4px;
39
44
  padding-block-end: 4px;
40
45
  }
46
+ :host([no-border]) .container {
47
+ border: none;
48
+ padding-block-end: 0;
49
+ }
41
50
  `;
42
51
 
43
52
  constructor() {
44
53
  super();
45
54
  this.label = '';
55
+ this.noBorder = false;
46
56
  }
47
57
 
48
58
  render() {
@@ -17874,12 +17874,18 @@
17874
17874
  "description": "ACCESSIBILITY: REQUIRED: Accessible label for the toolbar",
17875
17875
  "type": "string",
17876
17876
  "default": "\"\""
17877
+ },
17878
+ {
17879
+ "name": "no-border",
17880
+ "description": "Hides the border",
17881
+ "type": "boolean",
17882
+ "default": "false"
17877
17883
  }
17878
17884
  ],
17879
17885
  "properties": [
17880
17886
  {
17881
17887
  "name": "styles",
17882
- "default": "\"css`\\n\\t\\t:host {\\n\\t\\t\\tdisplay: inline-block;\\n\\t\\t}\\n\\t\\t:host([hidden]) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\t.container {\\n\\t\\t\\tborder-block-end: 1px solid var(--d2l-theme-border-color-standard);\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tflex-wrap: wrap;\\n\\t\\t\\tgap: 4px;\\n\\t\\t\\tpadding-block-end: 4px;\\n\\t\\t}\\n\\t`\""
17888
+ "default": "\"css`\\n\\t\\t:host {\\n\\t\\t\\tdisplay: inline-block;\\n\\t\\t}\\n\\t\\t:host([hidden]) {\\n\\t\\t\\tdisplay: none;\\n\\t\\t}\\n\\t\\t.container {\\n\\t\\t\\tborder-block-end: 1px solid var(--d2l-theme-border-color-standard);\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tflex-wrap: wrap;\\n\\t\\t\\tgap: 4px;\\n\\t\\t\\tpadding-block-end: 4px;\\n\\t\\t}\\n\\t\\t:host([no-border]) .container {\\n\\t\\t\\tborder: none;\\n\\t\\t\\tpadding-block-end: 0;\\n\\t\\t}\\n\\t`\""
17883
17889
  },
17884
17890
  {
17885
17891
  "name": "label",
@@ -17887,6 +17893,13 @@
17887
17893
  "description": "ACCESSIBILITY: REQUIRED: Accessible label for the toolbar",
17888
17894
  "type": "string",
17889
17895
  "default": "\"\""
17896
+ },
17897
+ {
17898
+ "name": "noBorder",
17899
+ "attribute": "no-border",
17900
+ "description": "Hides the border",
17901
+ "type": "boolean",
17902
+ "default": "false"
17890
17903
  }
17891
17904
  ],
17892
17905
  "slots": [
@@ -171,7 +171,9 @@ The localized value of [these common terms](https://github.com/BrightspaceUI/int
171
171
  Example:
172
172
 
173
173
  ```javascript
174
- const value = localizer.localizeCommon('actions:copy'); // -> Copy in en-US
174
+ render() {
175
+ return html`<button>${this.localizeCommon('actions:save')}</button>`;
176
+ }
175
177
  ```
176
178
 
177
179
  #### localizeCharacter
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.347.0",
3
+ "version": "3.348.1",
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",