@brightspace-ui/core 3.344.10 → 3.344.12

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.
@@ -1,7 +1,6 @@
1
1
  import './alert.js';
2
2
  import { css, html, LitElement } from 'lit';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
- import { getFlag } from '../../helpers/flags.js';
5
4
  import { ifDefined } from 'lit/directives/if-defined.js';
6
5
  import { styleMap } from 'lit/directives/style-map.js';
7
6
 
@@ -12,10 +11,6 @@ function isPopoverSupported() {
12
11
  return mockedPopoverSupported ?? ('popover' in HTMLElement.prototype);
13
12
  }
14
13
 
15
- function usePopover() {
16
- return getFlag('GAUD-10337-use-alert-toast-popover', true) && isPopoverSupported();
17
- }
18
-
19
14
  const reduceMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
20
15
  let activeReduceMotion = reduceMotion;
21
16
  export function disableReducedMotionForTesting() {
@@ -236,7 +231,7 @@ class AlertToast extends LitElement {
236
231
  insetBlockEnd: (this._totalSiblingHeightBelow || this._numAlertsBelow) ? `calc(${this._totalSiblingHeightBelow}px + ${spaceBetweenAlerts}rem)` : 0
237
232
  };
238
233
  const containerClasses = {
239
- 'd2l-alert-toast-container-not-popover': !usePopover(),
234
+ 'd2l-alert-toast-container-not-popover': !isPopoverSupported(),
240
235
  'd2l-alert-toast-container': true,
241
236
  'd2l-alert-toast-container-close-clicked': this._closeClicked,
242
237
  'd2l-alert-toast-container-lowest': !this._totalSiblingHeightBelow,
@@ -247,7 +242,7 @@ class AlertToast extends LitElement {
247
242
  <div
248
243
  class="${classMap(containerClasses)}"
249
244
  data-state="${this._state}"
250
- popover="${ifDefined(usePopover() ? 'manual' : undefined)}"
245
+ popover="${ifDefined(isPopoverSupported() ? 'manual' : undefined)}"
251
246
  style="${styleMap(containerStyles)}"
252
247
  @transitionend="${this._onTransitionEnd}">
253
248
  <d2l-alert
@@ -401,7 +396,7 @@ class AlertToast extends LitElement {
401
396
  }
402
397
 
403
398
  _onStateClosed() {
404
- if (usePopover()) {
399
+ if (isPopoverSupported()) {
405
400
  this.shadowRoot.querySelector('[popover="manual"]')?.hidePopover();
406
401
  }
407
402
  this._state = states.CLOSED;
@@ -421,7 +416,7 @@ class AlertToast extends LitElement {
421
416
  _openChanged(newOpen) {
422
417
  if (newOpen) {
423
418
 
424
- if (usePopover()) {
419
+ if (isPopoverSupported()) {
425
420
  // wait for popover attribute before managing top-layer (needed for case where toast is open immediately)
426
421
  requestAnimationFrame(() => {
427
422
  if (this.isConnected) this.shadowRoot.querySelector('[popover="manual"]')?.showPopover();
@@ -264,6 +264,7 @@ class Tooltip extends PopoverMixin(LitElement) {
264
264
 
265
265
  hide() {
266
266
  this.#isHovering = false;
267
+ this.#isHoveringTooltip = false;
267
268
  this.#isFocusing = false;
268
269
  this.#updateShowing();
269
270
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.344.10",
3
+ "version": "3.344.12",
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",