@brightspace-ui/core 2.6.0 → 2.6.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.
@@ -167,7 +167,7 @@ class ListDemoDragAndDrop extends LitElement {
167
167
  await this.updateComplete;
168
168
 
169
169
  if (e.detail.keyboardActive) {
170
- requestAnimationFrame(() => {
170
+ setTimeout(() => {
171
171
  if (!this.shadowRoot) return;
172
172
  const newItem = this.shadowRoot.querySelector('d2l-list').getListItemByKey(sourceListItems[0].key);
173
173
  newItem.activateDragHandle();
@@ -262,23 +262,12 @@ class ListItemDragHandle extends LocalizeCoreElement(RtlMixin(LitElement)) {
262
262
  }
263
263
  }
264
264
 
265
- _onInactiveKeyDown(e) {
266
- if (e.type === 'click' || e.keyCode === keyCodes.ENTER || e.keyCode === keyCodes.SPACE) {
267
- e.preventDefault();
268
- }
269
- }
270
-
271
- _onPreventDefault(e) {
272
- e.preventDefault();
273
- }
274
-
275
265
  _renderDragger() {
276
266
  return html`
277
267
  <button
278
268
  class="d2l-list-item-drag-handle-dragger-button"
279
269
  @click="${this._onInactiveKeyboard}"
280
- @keyup="${this._onInactiveKeyboard}"
281
- @keydown="${this._onInactiveKeyDown}"
270
+ @keydown="${this._onInactiveKeyboard}"
282
271
  aria-label="${this._defaultLabel}"
283
272
  ?disabled="${this.disabled}">
284
273
  <d2l-icon icon="tier1:dragger" class="d2l-button-icon"></d2l-icon>
@@ -295,8 +284,7 @@ class ListItemDragHandle extends LocalizeCoreElement(RtlMixin(LitElement)) {
295
284
  @focusin="${this._onFocusInKeyboardButton}"
296
285
  @focusout="${this._onFocusOutKeyboardButton}"
297
286
  id="${this._buttonId}"
298
- @keydown="${this._onPreventDefault}"
299
- @keyup="${this._onActiveKeyboard}">
287
+ @keydown="${this._onActiveKeyboard}">
300
288
  <d2l-icon icon="tier1:arrow-toggle-up" @click="${this._dispatchActionUp}" class="d2l-button-icon"></d2l-icon>
301
289
  <d2l-icon icon="tier1:arrow-toggle-down" @click="${this._dispatchActionDown}" class="d2l-button-icon"></d2l-icon>
302
290
  </button>
@@ -172,7 +172,6 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
172
172
 
173
173
  firstUpdated() {
174
174
  this.addEventListener('keydown', this._onKeydown.bind(this));
175
- this.addEventListener('keyup', this._onKeyup.bind(this));
176
175
  this.addEventListener('focusin', this._setFocusInfo.bind(this));
177
176
  }
178
177
 
@@ -408,30 +407,6 @@ class ListItemGenericLayout extends RtlMixin(LitElement) {
408
407
  }
409
408
 
410
409
  _onKeydown(event) {
411
- if (!this.gridActive) return;
412
- let preventDefault = true;
413
- switch (event.keyCode) {
414
- case keyCodes.ENTER:
415
- case keyCodes.SPACE:
416
- case keyCodes.RIGHT:
417
- case keyCodes.LEFT:
418
- case keyCodes.UP:
419
- case keyCodes.DOWN:
420
- case keyCodes.HOME:
421
- case keyCodes.END:
422
- case keyCodes.PAGEUP:
423
- case keyCodes.PAGEDOWN:
424
- break;
425
- default:
426
- preventDefault = false;
427
- }
428
- if (preventDefault) {
429
- event.preventDefault();
430
- event.stopPropagation();
431
- }
432
- }
433
-
434
- _onKeyup(event) {
435
410
  if (!this.gridActive) return;
436
411
  let node = null;
437
412
  let preventDefault = true;
@@ -1,6 +1,5 @@
1
-
2
1
  # Tag List
3
- *This component is in progress and the api is not yet stable.*
2
+ *This component is in progress. The API is generally stable but the ability to clear tags is currently a WIP.*
4
3
 
5
4
  Tag lists are used to present a list of compact, discrete pieces of information.
6
5
 
@@ -12,9 +11,14 @@ Tag lists are used to present a list of compact, discrete pieces of information.
12
11
  </script>
13
12
 
14
13
  <d2l-tag-list description="Example Tags">
15
- <d2l-tag-list-item text="Tag"></d2l-tag-list-item>
16
- <d2l-tag-list-item text="Another Tag"></d2l-tag-list-item>
17
- <d2l-tag-list-item text="A Third Very Very Very Long Tag"></d2l-tag-list-item>
14
+ <d2l-tag-list-item text="Lorem ipsum dolor"></d2l-tag-list-item>
15
+ <d2l-tag-list-item text="Reprehenderit in voluptate velit esse"></d2l-tag-list-item>
16
+ <d2l-tag-list-item text="Sit amet"></d2l-tag-list-item>
17
+ <d2l-tag-list-item text="Duis aute irure"></d2l-tag-list-item>
18
+ <d2l-tag-list-item text="Excepteur sint"></d2l-tag-list-item>
19
+ <d2l-tag-list-item text="Cillum"></d2l-tag-list-item>
20
+ <d2l-tag-list-item text="Saunt in culpa"></d2l-tag-list-item>
21
+ <d2l-tag-list-item text="Laboris nisi"></d2l-tag-list-item>
18
22
  </d2l-tag-list>
19
23
  ```
20
24
 
@@ -30,9 +34,10 @@ The `d2l-tag-list` element can take a combination of any type of `d2l-tag-list-i
30
34
  </script>
31
35
 
32
36
  <d2l-tag-list description="Example Tags">
33
- <d2l-tag-list-item text="Tag"></d2l-tag-list-item>
34
- <d2l-tag-list-item text="Another Tag"></d2l-tag-list-item>
35
- <d2l-tag-list-item text="A Third Very Very Very Long Tag"></d2l-tag-list-item>
37
+ <d2l-tag-list-item text="Lorem ipsum dolor"></d2l-tag-list-item>
38
+ <d2l-tag-list-item text="Reprehenderit in voluptate velit esse"></d2l-tag-list-item>
39
+ <d2l-tag-list-item text="Sit amet"></d2l-tag-list-item>
40
+ <d2l-tag-list-item text="Duis aute irure"></d2l-tag-list-item>
36
41
  </d2l-tag-list>
37
42
  ```
38
43
 
@@ -26,6 +26,7 @@ class TagList extends LocalizeCoreElement(ArrowKeysMixin(LitElement)) {
26
26
  */
27
27
  description: { type: String },
28
28
  _chompIndex: { type: Number },
29
+ _lines: { type: Number },
29
30
  _showHiddenTags: { type: Boolean }
30
31
  };
31
32
  }
@@ -122,7 +123,7 @@ class TagList extends LocalizeCoreElement(ArrowKeysMixin(LitElement)) {
122
123
  `;
123
124
 
124
125
  const outerContainerStyles = {
125
- maxHeight: this._showHiddenTags ? undefined : `${(this._itemHeight + MARGIN_TOP_HEIGHT) * this._lines}px`
126
+ maxHeight: (this._showHiddenTags || !this._lines) ? undefined : `${(this._itemHeight + MARGIN_TOP_HEIGHT) * this._lines}px`
126
127
  };
127
128
 
128
129
  return html`
@@ -4918,7 +4918,8 @@
4918
4918
  "type": "number"
4919
4919
  },
4920
4920
  {
4921
- "name": "trailingZeroes"
4921
+ "name": "trailingZeroes",
4922
+ "type": "boolean"
4922
4923
  },
4923
4924
  {
4924
4925
  "name": "value",
@@ -8322,7 +8323,7 @@
8322
8323
  {
8323
8324
  "name": "d2l-overflow-group",
8324
8325
  "path": "./components/overflow-group/overflow-group.js",
8325
- "description": "A component that can be used to display a set of buttons, links or menus that will be put into a dropdown menu when they no longer fit on the first line of their container",
8326
+ "description": "\nA component that can be used to display a set of buttons, links or menus that will be put into a dropdown menu when they no longer fit on the first line of their container",
8326
8327
  "attributes": [
8327
8328
  {
8328
8329
  "name": "auto-show",
@@ -8449,7 +8450,7 @@
8449
8450
  {
8450
8451
  "name": "d2l-scroll-wrapper",
8451
8452
  "path": "./components/scroll-wrapper/scroll-wrapper.js",
8452
- "description": "Wraps content which may overflow its horizontal boundaries, providing left/right scroll buttons.",
8453
+ "description": "\nWraps content which may overflow its horizontal boundaries, providing left/right scroll buttons.",
8453
8454
  "attributes": [
8454
8455
  {
8455
8456
  "name": "hide-actions",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.6.0",
3
+ "version": "2.6.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",