@brightspace-ui/core 2.86.0 → 2.86.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.
|
@@ -84,16 +84,16 @@
|
|
|
84
84
|
<d2l-demo-snippet>
|
|
85
85
|
<template>
|
|
86
86
|
<d2l-list grid>
|
|
87
|
-
<d2l-list-item selectable key="1" label="Introductory Earth Sciences">
|
|
87
|
+
<d2l-list-item no-primary-action selectable key="1" label="Introductory Earth Sciences">
|
|
88
88
|
<img slot="illustration" src="https://s.brightspace.com/course-images/images/38e839b1-37fa-470c-8830-b189ce4ae134/tile-high-density-max-size.jpg"></img>
|
|
89
89
|
<div>
|
|
90
90
|
<d2l-list-item-content>
|
|
91
91
|
<div>Introductory Earth Sciences</div>
|
|
92
92
|
</d2l-list-item-content>
|
|
93
93
|
<d2l-tag-list description="Tags for this course">
|
|
94
|
-
<d2l-tag-list-item text="Science"></d2l-tag-list-item>
|
|
95
|
-
<d2l-tag-list-item text="Environment"></d2l-tag-list-item>
|
|
96
|
-
<d2l-tag-list-item text="Earth"></d2l-tag-list-item>
|
|
94
|
+
<d2l-tag-list-item text="Science" description="This is a description for the Science tag that is really really really long and will overflow onto the next line."></d2l-tag-list-item>
|
|
95
|
+
<d2l-tag-list-item text="Environment" description="This is a description for the Environment tag."></d2l-tag-list-item>
|
|
96
|
+
<d2l-tag-list-item text="Earth" description="This is a description for the Earth tag."></d2l-tag-list-item>
|
|
97
97
|
</d2l-tag-list>
|
|
98
98
|
</div>
|
|
99
99
|
<div slot="actions">
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
<div>Engineering Materials for Energy Systems</div>
|
|
117
117
|
</d2l-list-item-content>
|
|
118
118
|
<d2l-tag-list description="Tags for this course">
|
|
119
|
-
<d2l-tag-list-item text="Engineering"></d2l-tag-list-item>
|
|
120
|
-
<d2l-tag-list-item text="Energy Systems"></d2l-tag-list-item>
|
|
119
|
+
<d2l-tag-list-item text="Engineering" description="This is a description for the Engineering tag."></d2l-tag-list-item>
|
|
120
|
+
<d2l-tag-list-item text="Energy Systems" description="This is a description for the Energy Systems tag."></d2l-tag-list-item>
|
|
121
121
|
</d2l-tag-list>
|
|
122
122
|
</div>
|
|
123
123
|
<div slot="actions">
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
<div>Geomorphology and GIS</div>
|
|
141
141
|
</d2l-list-item-content>
|
|
142
142
|
<d2l-tag-list description="Tags for this course">
|
|
143
|
-
<d2l-tag-list-item text="Geology"></d2l-tag-list-item>
|
|
144
|
-
<d2l-tag-list-item text="GIS"></d2l-tag-list-item>
|
|
145
|
-
<d2l-tag-list-item text="Earth Sciences"></d2l-tag-list-item>
|
|
143
|
+
<d2l-tag-list-item text="Geology" description="This is a description for the Geology tag."></d2l-tag-list-item>
|
|
144
|
+
<d2l-tag-list-item text="GIS" description="This is a description for the GIS tag."></d2l-tag-list-item>
|
|
145
|
+
<d2l-tag-list-item text="Earth Sciences" description="This is a description for the Earth Sciences tag."></d2l-tag-list-item>
|
|
146
146
|
</d2l-tag-list>
|
|
147
147
|
</div>
|
|
148
148
|
<div slot="actions">
|
|
@@ -71,9 +71,13 @@
|
|
|
71
71
|
<h2>Tooltip (info)</h2>
|
|
72
72
|
<d2l-demo-snippet>
|
|
73
73
|
<template>
|
|
74
|
-
<d2l-button id="tooltip-
|
|
75
|
-
<d2l-tooltip for="tooltip-
|
|
76
|
-
|
|
74
|
+
<d2l-button id="tooltip-preview">Preview</d2l-button>
|
|
75
|
+
<d2l-tooltip for="tooltip-preview">
|
|
76
|
+
Tooltip for the Preview button.
|
|
77
|
+
</d2l-tooltip>
|
|
78
|
+
<d2l-button id="tooltip-settings">Settings</d2l-button>
|
|
79
|
+
<d2l-tooltip for="tooltip-settings">
|
|
80
|
+
Tooltip for the Settings button.
|
|
77
81
|
</d2l-tooltip>
|
|
78
82
|
</template>
|
|
79
83
|
</d2l-demo-snippet>
|
|
@@ -163,7 +167,6 @@
|
|
|
163
167
|
<d2l-tooltip for="link-long" show-truncated-only>
|
|
164
168
|
Very Very Very Very Long Text - this tooltip will show because the text is truncating.
|
|
165
169
|
</d2l-tooltip>
|
|
166
|
-
|
|
167
170
|
</div>
|
|
168
171
|
</template>
|
|
169
172
|
</d2l-demo-snippet>
|
|
@@ -430,6 +430,8 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
430
430
|
this._onTargetTouchStart = this._onTargetTouchStart.bind(this);
|
|
431
431
|
this._onTargetTouchEnd = this._onTargetTouchEnd.bind(this);
|
|
432
432
|
|
|
433
|
+
this._onTooltipShowOther = this._onTooltipShowOther.bind(this);
|
|
434
|
+
|
|
433
435
|
this.announced = false;
|
|
434
436
|
this.closeOnClick = false;
|
|
435
437
|
this.delay = 300;
|
|
@@ -474,6 +476,7 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
474
476
|
super.disconnectedCallback();
|
|
475
477
|
this._removeListeners();
|
|
476
478
|
window.removeEventListener('resize', this._onTargetResize);
|
|
479
|
+
document.body.removeEventListener('d2l-tooltip-show', this._onTooltipShowOther);
|
|
477
480
|
clearDismissible(this._dismissibleId);
|
|
478
481
|
delayTimeoutId = null;
|
|
479
482
|
this._dismissibleId = null;
|
|
@@ -859,6 +862,11 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
859
862
|
}, 500);
|
|
860
863
|
}
|
|
861
864
|
|
|
865
|
+
_onTooltipShowOther() {
|
|
866
|
+
// only allow one tooltip showing at a time
|
|
867
|
+
this.hide();
|
|
868
|
+
}
|
|
869
|
+
|
|
862
870
|
_removeListeners() {
|
|
863
871
|
if (!this._target) {
|
|
864
872
|
return;
|
|
@@ -889,6 +897,9 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
889
897
|
this.dispatchEvent(new CustomEvent(
|
|
890
898
|
'd2l-tooltip-show', { bubbles: true, composed: true }
|
|
891
899
|
));
|
|
900
|
+
|
|
901
|
+
document.body.addEventListener('d2l-tooltip-show', this._onTooltipShowOther, true);
|
|
902
|
+
|
|
892
903
|
if (this.announced && !this._isInteractive(this._target)) announce(this.innerText);
|
|
893
904
|
} else {
|
|
894
905
|
this.setAttribute('aria-hidden', 'true');
|
|
@@ -899,6 +910,8 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
899
910
|
this.dispatchEvent(new CustomEvent(
|
|
900
911
|
'd2l-tooltip-hide', { bubbles: true, composed: true }
|
|
901
912
|
));
|
|
913
|
+
|
|
914
|
+
document.body.removeEventListener('d2l-tooltip-show', this._onTooltipShowOther, true);
|
|
902
915
|
}
|
|
903
916
|
}
|
|
904
917
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.86.
|
|
3
|
+
"version": "2.86.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",
|