@brightspace-ui/core 3.82.0 → 3.83.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.
package/components/form/form.js
CHANGED
@@ -193,9 +193,6 @@ class Form extends FormMixin(LitElement) {
|
|
193
193
|
}
|
194
194
|
|
195
195
|
_setupDialogValidationReset() {
|
196
|
-
const flag = window.D2L?.LP?.Web?.UI?.Flags.Flag('GAUD-6979-dialog-close-reset-validation', true) ?? true;
|
197
|
-
if (!flag) return;
|
198
|
-
|
199
196
|
const dialogAncestor = findComposedAncestor(
|
200
197
|
this,
|
201
198
|
node => node?._isDialogMixin
|
@@ -451,6 +451,9 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
451
451
|
this._isHovering = false;
|
452
452
|
this._resizeRunSinceTruncationCheck = false;
|
453
453
|
this._viewportMargin = defaultViewportMargin;
|
454
|
+
|
455
|
+
this.#isHoveringTooltip = false;
|
456
|
+
this.#mouseLeftTooltip = false;
|
454
457
|
}
|
455
458
|
|
456
459
|
/** @ignore */
|
@@ -525,7 +528,7 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
525
528
|
return html`
|
526
529
|
<div class="d2l-tooltip-container">
|
527
530
|
<div class="d2l-tooltip-position" style=${styleMap(tooltipPositionStyle)}>
|
528
|
-
<div class="${classMap(contentClasses)}">
|
531
|
+
<div class="${classMap(contentClasses)}" @mouseenter="${this.#onTooltipMouseEnter}" @mouseleave="${this.#onTooltipMouseLeave}">
|
529
532
|
<div role="text">
|
530
533
|
<slot></slot>
|
531
534
|
</div>
|
@@ -534,7 +537,7 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
534
537
|
<div class="d2l-tooltip-pointer d2l-tooltip-pointer-outline">
|
535
538
|
<div></div>
|
536
539
|
</div>
|
537
|
-
<div class="d2l-tooltip-pointer">
|
540
|
+
<div class="d2l-tooltip-pointer" @mouseenter="${this.#onTooltipMouseEnter}" @mouseleave="${this.#onTooltipMouseLeave}">
|
538
541
|
<div></div>
|
539
542
|
</div>
|
540
543
|
</div>`
|
@@ -647,6 +650,9 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
647
650
|
this.style.height = `${positionRect.height}px`;
|
648
651
|
}
|
649
652
|
|
653
|
+
#isHoveringTooltip;
|
654
|
+
#mouseLeftTooltip;
|
655
|
+
|
650
656
|
_addListeners() {
|
651
657
|
if (!this._target) {
|
652
658
|
return;
|
@@ -842,6 +848,12 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
842
848
|
}
|
843
849
|
|
844
850
|
_onTargetMouseEnter() {
|
851
|
+
// came from tooltip so keep showing
|
852
|
+
if (this.#mouseLeftTooltip) {
|
853
|
+
this._isHovering = true;
|
854
|
+
return;
|
855
|
+
}
|
856
|
+
|
845
857
|
this._hoverTimeout = setTimeout(async() => {
|
846
858
|
if (this.showTruncatedOnly) {
|
847
859
|
await this._updateTruncating();
|
@@ -856,7 +868,8 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
856
868
|
_onTargetMouseLeave() {
|
857
869
|
clearTimeout(this._hoverTimeout);
|
858
870
|
this._isHovering = false;
|
859
|
-
this.
|
871
|
+
if (this.showing) resetDelayTimeout();
|
872
|
+
setTimeout(() => this._updateShowing(), 100); // delay to allow for mouseenter to fire if hovering on tooltip
|
860
873
|
}
|
861
874
|
|
862
875
|
_onTargetResize() {
|
@@ -925,7 +938,6 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
925
938
|
this._dismissibleId = null;
|
926
939
|
}
|
927
940
|
if (dispatch) {
|
928
|
-
resetDelayTimeout();
|
929
941
|
this.dispatchEvent(new CustomEvent(
|
930
942
|
'd2l-tooltip-hide', { bubbles: true, composed: true }
|
931
943
|
));
|
@@ -934,7 +946,7 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
934
946
|
}
|
935
947
|
|
936
948
|
_updateShowing() {
|
937
|
-
this.showing = this._isFocusing || this._isHovering || this.forceShow;
|
949
|
+
this.showing = this._isFocusing || this._isHovering || this.forceShow || this.#isHoveringTooltip;
|
938
950
|
}
|
939
951
|
|
940
952
|
_updateTarget() {
|
@@ -1009,5 +1021,24 @@ class Tooltip extends RtlMixin(LitElement) {
|
|
1009
1021
|
this._resizeRunSinceTruncationCheck = false;
|
1010
1022
|
target.removeChild(cloneContainer);
|
1011
1023
|
}
|
1024
|
+
|
1025
|
+
#onTooltipMouseEnter() {
|
1026
|
+
if (!this.showing) return;
|
1027
|
+
this.#isHoveringTooltip = true;
|
1028
|
+
this._updateShowing();
|
1029
|
+
}
|
1030
|
+
|
1031
|
+
#onTooltipMouseLeave() {
|
1032
|
+
clearTimeout(this._mouseLeaveTimeout);
|
1033
|
+
|
1034
|
+
this.#isHoveringTooltip = false;
|
1035
|
+
this.#mouseLeftTooltip = true;
|
1036
|
+
resetDelayTimeout();
|
1037
|
+
|
1038
|
+
this._mouseLeaveTimeout = setTimeout(() => {
|
1039
|
+
this.#mouseLeftTooltip = false;
|
1040
|
+
this._updateShowing();
|
1041
|
+
}, 100); // delay to allow for mouseenter to fire if hovering on target
|
1042
|
+
}
|
1012
1043
|
}
|
1013
1044
|
customElements.define('d2l-tooltip', Tooltip);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.83.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",
|