@brightspace-ui/core 2.112.0 → 2.112.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.
|
@@ -198,6 +198,11 @@
|
|
|
198
198
|
</template>
|
|
199
199
|
</d2l-demo-snippet>
|
|
200
200
|
|
|
201
|
+
<script>
|
|
202
|
+
document.addEventListener('d2l-tooltip-show', e => console.log('d2l-tooltip-show', e.target));
|
|
203
|
+
document.addEventListener('d2l-tooltip-hide', e => console.log('d2l-tooltip-hide', e.target));
|
|
204
|
+
</script>
|
|
205
|
+
|
|
201
206
|
</d2l-demo-page>
|
|
202
207
|
|
|
203
208
|
</body>
|
|
@@ -459,7 +459,7 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
459
459
|
if (oldVal !== val) {
|
|
460
460
|
this._showing = val;
|
|
461
461
|
this.requestUpdate('showing', oldVal);
|
|
462
|
-
this._showingChanged(val);
|
|
462
|
+
this._showingChanged(val, oldVal !== undefined); // don't dispatch hide event when initializing
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
|
|
@@ -882,7 +882,7 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
884
|
|
|
885
|
-
async _showingChanged(newValue) {
|
|
885
|
+
async _showingChanged(newValue, dispatch) {
|
|
886
886
|
clearTimeout(this._hoverTimeout);
|
|
887
887
|
clearTimeout(this._longPressTimeout);
|
|
888
888
|
if (newValue) {
|
|
@@ -895,9 +895,11 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
895
895
|
this.setAttribute('aria-hidden', 'false');
|
|
896
896
|
await this.updateComplete;
|
|
897
897
|
await this.updatePosition();
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
898
|
+
if (dispatch) {
|
|
899
|
+
this.dispatchEvent(new CustomEvent(
|
|
900
|
+
'd2l-tooltip-show', { bubbles: true, composed: true }
|
|
901
|
+
));
|
|
902
|
+
}
|
|
901
903
|
|
|
902
904
|
if (this.announced && !this._isInteractive(this._target)) announce(this.innerText);
|
|
903
905
|
} else {
|
|
@@ -908,9 +910,11 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
|
908
910
|
clearDismissible(this._dismissibleId);
|
|
909
911
|
this._dismissibleId = null;
|
|
910
912
|
}
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
913
|
+
if (dispatch) {
|
|
914
|
+
this.dispatchEvent(new CustomEvent(
|
|
915
|
+
'd2l-tooltip-hide', { bubbles: true, composed: true }
|
|
916
|
+
));
|
|
917
|
+
}
|
|
914
918
|
}
|
|
915
919
|
}
|
|
916
920
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.112.
|
|
3
|
+
"version": "2.112.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",
|