@brightspace-ui/core 2.184.4 → 2.184.6
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.
@@ -434,6 +434,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
434
434
|
this.first = false;
|
435
435
|
this.noPrimaryAction = false;
|
436
436
|
this.paddingType = 'normal';
|
437
|
+
this._addButtonTopId = getUniqueId();
|
437
438
|
this._contentId = getUniqueId();
|
438
439
|
this._displayKeyboardTooltip = false;
|
439
440
|
this._hasColorSlot = false;
|
@@ -667,7 +668,14 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
667
668
|
|
668
669
|
const alignNested = ((this.draggable && this.selectable) || (this.expandable && this.selectable && this.color)) ? 'control' : undefined;
|
669
670
|
const primaryAction = ((!this.noPrimaryAction && this._renderPrimaryAction) ? this._renderPrimaryAction(this._contentId) : null);
|
670
|
-
|
671
|
+
let tooltipForId = null;
|
672
|
+
if (this._showAddButton) {
|
673
|
+
tooltipForId = this._addButtonTopId;
|
674
|
+
} else if (primaryAction) {
|
675
|
+
tooltipForId = this._primaryActionId;
|
676
|
+
} else if (this.selectable) {
|
677
|
+
tooltipForId = this._checkboxId;
|
678
|
+
}
|
671
679
|
const addButtonText = this._addButtonText || this.localize('components.list-item.addItem');
|
672
680
|
const innerView = html`
|
673
681
|
<d2l-list-item-generic-layout
|
@@ -680,7 +688,13 @@ export const ListItemMixin = superclass => class extends composeMixins(
|
|
680
688
|
?no-primary-action="${this.noPrimaryAction}">
|
681
689
|
${this._showAddButton && this.first ? html`
|
682
690
|
<div slot="add-top">
|
683
|
-
<d2l-button-add
|
691
|
+
<d2l-button-add
|
692
|
+
text="${addButtonText}"
|
693
|
+
mode="icon-when-interacted"
|
694
|
+
@click="${this._handleButtonAddClick}"
|
695
|
+
data-is-first
|
696
|
+
id="${this._addButtonTopId}">
|
697
|
+
</d2l-button-add>
|
684
698
|
</div>
|
685
699
|
` : nothing}
|
686
700
|
<div slot="outside-control-container" class="${classMap(bottomBorderClasses)}"></div>
|
@@ -42,8 +42,8 @@
|
|
42
42
|
</script>
|
43
43
|
<d2l-demo-snippet full-width>
|
44
44
|
<d2l-tag-list description="A bunch of example tags">
|
45
|
-
<d2l-tag-list-item text="Example 1"></d2l-tag-list-item>
|
46
|
-
<d2l-tag-list-item text="Example 2
|
45
|
+
<d2l-tag-list-item text="Example 1 - much much much much much much much much longer"></d2l-tag-list-item>
|
46
|
+
<d2l-tag-list-item text="Example 2"></d2l-tag-list-item>
|
47
47
|
<d2l-tag-list-item text="Example 3"></d2l-tag-list-item>
|
48
48
|
<d2l-tag-list-item-mixin-consumer name="Custom Tag List Item"></d2l-tag-list-item-mixin-consumer>
|
49
49
|
<d2l-tag-list-item text="Example 5"></d2l-tag-list-item>
|
@@ -191,11 +191,11 @@ export const TagListItemMixin = superclass => class extends LocalizeCoreElement(
|
|
191
191
|
|
192
192
|
announce(message);
|
193
193
|
}
|
194
|
+
this._onFocusIn();
|
194
195
|
|
195
196
|
await this.updateComplete;
|
196
197
|
// delay the focus to allow focusin to fire
|
197
198
|
setTimeout(() => {
|
198
|
-
this._onFocusIn();
|
199
199
|
container.focus();
|
200
200
|
});
|
201
201
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "2.184.
|
3
|
+
"version": "2.184.6",
|
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",
|