@brightspace-ui/core 3.320.0 → 3.320.2
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/icons/icon.js
CHANGED
|
@@ -3,11 +3,12 @@ import { css, html, LitElement, noChange } from 'lit';
|
|
|
3
3
|
import { fixSvg } from './fix-svg.js';
|
|
4
4
|
import { guard } from 'lit/directives/guard.js';
|
|
5
5
|
import { iconStyles } from './icon-styles.js';
|
|
6
|
+
import { LoadingCompleteMixin } from '../../mixins/loading-complete/loading-complete-mixin.js';
|
|
6
7
|
import { loadSvg } from '../../generated/icons/presetIconLoader.js';
|
|
7
8
|
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
8
9
|
import { until } from 'lit/directives/until.js';
|
|
9
10
|
|
|
10
|
-
class Icon extends LitElement {
|
|
11
|
+
class Icon extends LoadingCompleteMixin(LitElement) {
|
|
11
12
|
|
|
12
13
|
static properties = {
|
|
13
14
|
icon: {
|
|
@@ -58,7 +59,13 @@ class Icon extends LitElement {
|
|
|
58
59
|
icon = icon.substring(4);
|
|
59
60
|
}
|
|
60
61
|
const svg = await loadSvg(icon);
|
|
61
|
-
|
|
62
|
+
const fixedSvg = this._fixSvg(svg ? svg.val : undefined);
|
|
63
|
+
|
|
64
|
+
this.updateComplete
|
|
65
|
+
.then(() => new Promise(resolve => requestAnimationFrame(resolve)))
|
|
66
|
+
.then(this.resolveLoadingComplete);
|
|
67
|
+
|
|
68
|
+
return fixedSvg;
|
|
62
69
|
}
|
|
63
70
|
}
|
|
64
71
|
|
|
@@ -164,8 +164,8 @@ class ScrollWrapper extends LocalizeCoreElement(LitElement) {
|
|
|
164
164
|
this._hScrollbar = true;
|
|
165
165
|
|
|
166
166
|
this._resizeObserver = new ResizeObserver(() => requestAnimationFrame(() => this.checkScrollbar()));
|
|
167
|
-
this._scrollbarLeft =
|
|
168
|
-
this._scrollbarRight =
|
|
167
|
+
this._scrollbarLeft = true;
|
|
168
|
+
this._scrollbarRight = true;
|
|
169
169
|
this._syncDriver = null;
|
|
170
170
|
this._syncDriverTimeout = null;
|
|
171
171
|
|
package/components/tabs/tabs.js
CHANGED
|
@@ -906,7 +906,9 @@ class Tabs extends LocalizeCoreElement(ArrowKeysMixin(SkeletonMixin(LitElement))
|
|
|
906
906
|
scrollVisibilityPromise,
|
|
907
907
|
scrollToPromise
|
|
908
908
|
]);
|
|
909
|
-
p.then(() => {
|
|
909
|
+
p.then(async() => {
|
|
910
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
911
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
910
912
|
if (this.#loadingCompleteResolve) {
|
|
911
913
|
this.#loadingCompleteResolve();
|
|
912
914
|
this.#loadingCompleteResolve = undefined;
|
package/custom-elements.json
CHANGED
|
@@ -5862,6 +5862,14 @@
|
|
|
5862
5862
|
"name": "styles",
|
|
5863
5863
|
"type": "array",
|
|
5864
5864
|
"default": "[\"iconStyles\",null]"
|
|
5865
|
+
},
|
|
5866
|
+
{
|
|
5867
|
+
"name": "loadingComplete",
|
|
5868
|
+
"type": "Promise<any>"
|
|
5869
|
+
},
|
|
5870
|
+
{
|
|
5871
|
+
"name": "resolveLoadingComplete",
|
|
5872
|
+
"type": "() => void"
|
|
5865
5873
|
}
|
|
5866
5874
|
]
|
|
5867
5875
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.320.
|
|
3
|
+
"version": "3.320.2",
|
|
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",
|