@brightspace-ui/core 2.1.0 → 2.1.3
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.
|
@@ -124,7 +124,12 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
resize() {
|
|
127
|
-
return
|
|
127
|
+
return new Promise(resolve => {
|
|
128
|
+
setTimeout(async() => {
|
|
129
|
+
await this._updateSize();
|
|
130
|
+
resolve();
|
|
131
|
+
}, 0);
|
|
132
|
+
});
|
|
128
133
|
}
|
|
129
134
|
|
|
130
135
|
_addHandlers() {
|
|
@@ -330,7 +335,7 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
|
|
|
330
335
|
// focus first focusable child prior to auto resize (fixes screen reader hiccups)
|
|
331
336
|
this._focusInitial();
|
|
332
337
|
|
|
333
|
-
|
|
338
|
+
setTimeout(async() => {
|
|
334
339
|
|
|
335
340
|
this.shadowRoot.querySelector('.d2l-dialog-content').scrollTop = 0;
|
|
336
341
|
// scrollbar is kept hidden while we update the scroll position to avoid scrollbar flash
|
|
@@ -340,6 +345,7 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
|
|
|
340
345
|
|
|
341
346
|
await this._updateSize();
|
|
342
347
|
this._state = 'showing';
|
|
348
|
+
await this._updateComplete;
|
|
343
349
|
|
|
344
350
|
// edge case: no children were focused, try again after one redraw
|
|
345
351
|
const activeElement = getComposedActiveElement();
|
|
@@ -354,7 +360,7 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
|
|
|
354
360
|
this.dispatchEvent(new CustomEvent(
|
|
355
361
|
'd2l-dialog-open', { bubbles: true, composed: true }
|
|
356
362
|
));
|
|
357
|
-
});
|
|
363
|
+
}, 0);
|
|
358
364
|
|
|
359
365
|
}
|
|
360
366
|
|
|
@@ -11,6 +11,15 @@ export const dialogStyles = css`
|
|
|
11
11
|
display: block;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
:host([opened]:not([_state="showing"])) {
|
|
15
|
+
visibility: hidden;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host([opened][_state="showing"]),
|
|
19
|
+
:host([opened][_state="hiding"]) {
|
|
20
|
+
visibility: visible;
|
|
21
|
+
}
|
|
22
|
+
|
|
14
23
|
.d2l-dialog-outer {
|
|
15
24
|
background-color: white;
|
|
16
25
|
border: 1px solid var(--d2l-color-mica);
|
|
@@ -506,7 +506,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
|
506
506
|
const changes = e.detail.changes;
|
|
507
507
|
const dimension = this._dimensions.find(dimension => dimension.key === e.detail.dimensionKey);
|
|
508
508
|
const value = e.detail.valueKey && dimension.values.find(value => value.key === e.detail.valueKey);
|
|
509
|
-
const toUpdate =
|
|
509
|
+
const toUpdate = e.detail.valueKey ? value : dimension;
|
|
510
510
|
|
|
511
511
|
if (!toUpdate) return;
|
|
512
512
|
|
|
@@ -71,6 +71,7 @@ export const TabPanelMixin = superclass => class extends superclass {
|
|
|
71
71
|
}
|
|
72
72
|
} else if (prop === 'text') {
|
|
73
73
|
this.setAttribute('aria-label', this.text);
|
|
74
|
+
/** Dispatched when the text attribute is changed */
|
|
74
75
|
this.dispatchEvent(new CustomEvent(
|
|
75
76
|
'd2l-tab-panel-text-changed', { bubbles: true, composed: true, detail: { text: this.text } }
|
|
76
77
|
));
|
package/custom-elements.json
CHANGED
|
@@ -9707,7 +9707,8 @@
|
|
|
9707
9707
|
"description": "Dispatched when a tab is selected"
|
|
9708
9708
|
},
|
|
9709
9709
|
{
|
|
9710
|
-
"name": "d2l-tab-panel-text-changed"
|
|
9710
|
+
"name": "d2l-tab-panel-text-changed",
|
|
9711
|
+
"description": "Dispatched when the text attribute is changed"
|
|
9711
9712
|
}
|
|
9712
9713
|
],
|
|
9713
9714
|
"slots": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
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",
|