@brightspace-ui/core 2.81.0 → 2.81.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.
|
@@ -241,7 +241,7 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
|
|
|
241
241
|
const availableHeight = this._ifrauContextInfo
|
|
242
242
|
? this._ifrauContextInfo.availableHeight - this._margin.top - this._margin.bottom
|
|
243
243
|
: window.innerHeight - this._margin.top - this._margin.bottom;
|
|
244
|
-
let preferredHeight =
|
|
244
|
+
let preferredHeight = 2;
|
|
245
245
|
|
|
246
246
|
const header = this.shadowRoot.querySelector('.d2l-dialog-header');
|
|
247
247
|
if (header) preferredHeight += Math.ceil(header.getBoundingClientRect().height);
|
|
@@ -26,7 +26,7 @@ export const dialogStyles = css`
|
|
|
26
26
|
border: 1px solid var(--d2l-color-mica);
|
|
27
27
|
border-radius: 8px;
|
|
28
28
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
29
|
-
box-sizing:
|
|
29
|
+
box-sizing: border-box;
|
|
30
30
|
position: fixed; /* also required for native to override position: absolute */
|
|
31
31
|
top: 100px;
|
|
32
32
|
}
|
package/components/tabs/tabs.js
CHANGED
|
@@ -414,6 +414,9 @@ class Tabs extends LocalizeCoreElement(ArrowKeysMixin(RtlMixin(FocusVisiblePolyf
|
|
|
414
414
|
_calculateScrollPosition(selectedTabInfo, measures) {
|
|
415
415
|
|
|
416
416
|
const selectedTabIndex = this._tabInfos.indexOf(selectedTabInfo);
|
|
417
|
+
|
|
418
|
+
if (!measures.tabRects[selectedTabIndex]) return 0;
|
|
419
|
+
|
|
417
420
|
const selectedTabMeasures = measures.tabRects[selectedTabIndex];
|
|
418
421
|
|
|
419
422
|
const isOverflowingLeft = (selectedTabMeasures.offsetLeft + this._translationValue < 0);
|
|
@@ -635,10 +638,12 @@ class Tabs extends LocalizeCoreElement(ArrowKeysMixin(RtlMixin(FocusVisiblePolyf
|
|
|
635
638
|
this._updateMeasures();
|
|
636
639
|
}
|
|
637
640
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
641
|
+
if (selectedTabInfo) {
|
|
642
|
+
Promise.all(animPromises).then(() => {
|
|
643
|
+
this._updateMeasures();
|
|
644
|
+
return this._updateScrollPosition(selectedTabInfo);
|
|
645
|
+
});
|
|
646
|
+
}
|
|
642
647
|
|
|
643
648
|
this.dispatchEvent(new CustomEvent(
|
|
644
649
|
'd2l-tabs-initialized', { bubbles: true, composed: true }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.81.
|
|
3
|
+
"version": "2.81.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",
|