@brightspace-ui/core 3.151.0 → 3.151.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.
@@ -4,12 +4,11 @@ import { findComposedAncestor } from '../../helpers/dom.js';
4
4
  import { FocusMixin } from '../../mixins/focus/focus-mixin.js';
5
5
  import { ifDefined } from 'lit/directives/if-defined.js';
6
6
  import { linkStyles } from '../link/link.js';
7
- import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
8
7
 
9
8
  /**
10
9
  * An entry within a <d2l-breadcrumbs> parent.
11
10
  */
12
- class Breadcrumb extends RtlMixin(FocusMixin(LitElement)) {
11
+ class Breadcrumb extends FocusMixin(LitElement) {
13
12
 
14
13
  static get properties() {
15
14
  return {
@@ -59,25 +58,13 @@ class Breadcrumb extends RtlMixin(FocusMixin(LitElement)) {
59
58
  .d2l-link:focus {
60
59
  outline-offset: -2px;
61
60
  }
62
-
63
61
  d2l-icon {
64
62
  height: 8px;
65
- padding-left: 8px;
66
- padding-right: 3px;
63
+ padding-inline: 8px 3px;
67
64
  width: 8px;
68
65
  }
69
- :host([dir="rtl"]) d2l-icon {
70
- padding-left: 3px;
71
- padding-right: 8px;
72
- }
73
-
74
66
  d2l-icon[icon="tier1:chevron-left"] {
75
- padding-left: 0;
76
- padding-right: 8px;
77
- }
78
- :host([dir="rtl"]) d2l-icon[icon="tier1:chevron-left"] {
79
- padding-left: 8px;
80
- padding-right: 0;
67
+ padding-inline: 0 8px;
81
68
  }
82
69
  `];
83
70
  }
@@ -3,7 +3,6 @@ import { css, html, LitElement } from 'lit';
3
3
  import { getFlag } from '../../helpers/flags.js';
4
4
  import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
5
5
  import { overflowEllipsisDeclarations } from '../../helpers/overflow.js';
6
- import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
7
6
 
8
7
  const overflowClipEnabled = getFlag('GAUD-7887-core-components-overflow-clipping', true);
9
8
 
@@ -11,7 +10,8 @@ const overflowClipEnabled = getFlag('GAUD-7887-core-components-overflow-clipping
11
10
  * Help users understand where they are within the application, and provide useful clues about how the space is organized. They also provide a convenient navigation mechanism.
12
11
  * @slot - Breadcrumb items
13
12
  */
14
- class Breadcrumbs extends LocalizeCoreElement(RtlMixin(LitElement)) {
13
+ class Breadcrumbs extends LocalizeCoreElement(LitElement) {
14
+
15
15
  static get properties() {
16
16
  return {
17
17
  /**
@@ -38,23 +38,15 @@ class Breadcrumbs extends LocalizeCoreElement(RtlMixin(LitElement)) {
38
38
  :host([hidden]) {
39
39
  display: none;
40
40
  }
41
-
42
41
  :host::after {
43
- background: linear-gradient(to right, rgba(255, 255, 255, 0), rgb(251, 252, 252));
44
- bottom: 0;
42
+ background: linear-gradient(to var(--d2l-inline-end, right), rgba(255, 255, 255, 0), rgb(251, 252, 252));
45
43
  content: "";
44
+ inset-block: 0;
45
+ inset-inline-end: 0;
46
46
  pointer-events: none;
47
47
  position: absolute;
48
- right: 0;
49
- top: 0;
50
48
  width: 10px;
51
49
  }
52
- :host([dir="rtl"])::after {
53
- background: linear-gradient(to left, rgba(255, 255, 255, 0), rgb(251, 252, 252));
54
- left: 0;
55
- right: auto;
56
- }
57
-
58
50
  :host([compact]) ::slotted(d2l-breadcrumb:not(:last-of-type)),
59
51
  :host([compact]) ::slotted(d2l-breadcrumb-current-page) {
60
52
  display: none;
@@ -26,7 +26,7 @@ async removeSkeleton() {
26
26
  }
27
27
  ```
28
28
 
29
- If for any reason `resolveLoadingComplete` is never called, `loadingComplete` won't resolve and any consumers will hang.
29
+ If for any reason `resolveLoadingComplete` is never called, `loadingComplete` won't resolve and any consumers will hang. A warning will be thrown indicating that the component has entered a bad state.
30
30
 
31
31
  ### `getLoadingComplete`
32
32
 
@@ -1,5 +1,7 @@
1
1
  import { dedupeMixin } from '@open-wc/dedupe-mixin';
2
2
 
3
+ const timeoutMs = 30000;
4
+
3
5
  export const LoadingCompleteMixin = dedupeMixin((superclass) => class extends superclass {
4
6
  get loadingComplete() {
5
7
  return this.getLoadingComplete();
@@ -22,7 +24,16 @@ export const LoadingCompleteMixin = dedupeMixin((superclass) => class extends su
22
24
  #loadingCompleteResolve;
23
25
 
24
26
  #loadingCompletePromise = !Object.prototype.hasOwnProperty.call(this.constructor.prototype, 'getLoadingComplete')
25
- ? new Promise(resolve => this.#loadingCompleteResolve = resolve)
27
+ ? new Promise(resolve => {
28
+ const timeout = setTimeout(() => {
29
+ console.warn(`Failed to load ${this.localName} in ${timeoutMs}ms: resolveLoadingComplete was not called`);
30
+ }, timeoutMs);
31
+
32
+ this.#loadingCompleteResolve = () => {
33
+ clearTimeout(timeout);
34
+ resolve();
35
+ };
36
+ })
26
37
  : Promise.resolve();
27
38
 
28
39
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.151.0",
3
+ "version": "3.151.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",