@brightspace-ui/core 2.142.2 → 2.143.0

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.
@@ -318,7 +318,7 @@ class Card extends FocusMixin(RtlMixin(LitElement)) {
318
318
  _onBadgeResize(entries) {
319
319
  if (!entries || entries.length === 0) return;
320
320
  const entry = entries[0];
321
- this._badgeMarginTop = `${-0.5 * entry.contentRect.height}px`;
321
+ requestAnimationFrame(() => this._badgeMarginTop = `${-0.5 * entry.contentRect.height}px`);
322
322
  }
323
323
 
324
324
  _onDropdownClose() {
@@ -334,7 +334,7 @@ class Card extends FocusMixin(RtlMixin(LitElement)) {
334
334
  const entry = entries[0];
335
335
  // firefox has a rounding error when calculating the height of the contentRect
336
336
  // with `box-sizing: border-box;` so check for numbers which are close to 0 as well
337
- this._footerHidden = (entry.contentRect.height < 1);
337
+ requestAnimationFrame(() => this._footerHidden = (entry.contentRect.height < 1));
338
338
  }
339
339
 
340
340
  _onLinkBlur() {
@@ -216,7 +216,7 @@ export const CountBadgeMixin = superclass => class extends LocalizeCoreElement(S
216
216
  aria-live="${this.announceChanges ? 'polite' : 'off'}">
217
217
  ${innerHtml}
218
218
  </div>
219
- ${this.hasTooltip && !this.skeleton ? html`<d2l-tooltip for="${badgeId}" for-type="label">${this.text}</d2l-tooltip>` : null}
219
+ ${this.hasTooltip && !this.skeleton ? html`<d2l-tooltip class="vdiff-target" for="${badgeId}" for-type="label">${this.text}</d2l-tooltip>` : null}
220
220
  `;
221
221
  }
222
222
  };
@@ -3,6 +3,7 @@ import { css, html, LitElement } from 'lit';
3
3
  import { cssEscape, elemIdListAdd, elemIdListRemove, getBoundingAncestor, getOffsetParent } from '../../helpers/dom.js';
4
4
  import { announce } from '../../helpers/announce.js';
5
5
  import { bodySmallStyles } from '../typography/styles.js';
6
+ import { classMap } from 'lit/directives/class-map.js';
6
7
  import { getUniqueId } from '../../helpers/uniqueId.js';
7
8
  import { isFocusable } from '../../helpers/focus.js';
8
9
  import ResizeObserver from 'resize-observer-polyfill/dist/ResizeObserver.es.js';
@@ -501,11 +502,17 @@ class Tooltip extends RtlMixin(LitElement) {
501
502
  }
502
503
  }
503
504
 
505
+ const contentClasses = {
506
+ 'd2l-tooltip-content': true,
507
+ 'd2l-body-small': true,
508
+ 'vdiff-target': this.showing
509
+ };
510
+
504
511
  // Note: role="text" is a workaround for Safari. Otherwise, list-item content is not announced with VoiceOver
505
512
  return html`
506
513
  <div class="d2l-tooltip-container">
507
514
  <div class="d2l-tooltip-position" style=${styleMap(tooltipPositionStyle)}>
508
- <div class="d2l-body-small d2l-tooltip-content">
515
+ <div class="${classMap(contentClasses)}">
509
516
  <div role="text">
510
517
  <slot></slot>
511
518
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.142.2",
3
+ "version": "2.143.0",
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",
@@ -46,7 +46,7 @@
46
46
  "devDependencies": {
47
47
  "@babel/eslint-parser": "^7",
48
48
  "@brightspace-ui/stylelint-config": "^0.8",
49
- "@brightspace-ui/testing": "^0.30",
49
+ "@brightspace-ui/testing": "^0.32",
50
50
  "@open-wc/semantic-dom-diff": "^0.20",
51
51
  "@rollup/plugin-dynamic-import-vars": "^2",
52
52
  "@rollup/plugin-node-resolve": "^15",