@brightspace-ui/core 2.16.0 → 2.16.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.
|
@@ -89,7 +89,12 @@ class DialogConfirm extends DialogMixin(LitElement) {
|
|
|
89
89
|
const descId = (this.titleText && this.text) ? this._textId : undefined;
|
|
90
90
|
return this._render(
|
|
91
91
|
inner,
|
|
92
|
-
{
|
|
92
|
+
{
|
|
93
|
+
descId: descId,
|
|
94
|
+
fullscreenMobile: false,
|
|
95
|
+
labelId: labelId,
|
|
96
|
+
role: 'alertdialog'
|
|
97
|
+
}
|
|
93
98
|
);
|
|
94
99
|
}
|
|
95
100
|
|
|
@@ -154,11 +154,6 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
|
154
154
|
padding-bottom: 15px;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
.d2l-dialog-header > div > d2l-button-icon {
|
|
158
|
-
flex: none;
|
|
159
|
-
margin: -8px -13px 0 15px;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
157
|
.d2l-dialog-footer.d2l-footer-no-content {
|
|
163
158
|
padding: 0 0 5px 0;
|
|
164
159
|
}
|
|
@@ -171,17 +166,6 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
|
171
166
|
height: calc(100% - 1px);
|
|
172
167
|
}
|
|
173
168
|
|
|
174
|
-
:host([dir="rtl"]) .d2l-dialog-header > div > d2l-button-icon {
|
|
175
|
-
margin-left: -13px;
|
|
176
|
-
margin-right: 15px;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
dialog.d2l-dialog-outer,
|
|
180
|
-
div.d2l-dialog-outer {
|
|
181
|
-
margin: 0 !important;
|
|
182
|
-
min-width: calc(var(--d2l-vw, 1vw) * 100);
|
|
183
|
-
top: 42px;
|
|
184
|
-
}
|
|
185
169
|
}
|
|
186
170
|
`];
|
|
187
171
|
}
|
|
@@ -226,9 +210,6 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
|
226
210
|
: 0;
|
|
227
211
|
const startTop = mediaQueryList.matches ? 42 : 0;
|
|
228
212
|
topOverride = iframeTop + startTop;
|
|
229
|
-
} else if (window.innerWidth <= 615 || (window.innerWidth <= 900 && window.innerHeight <= 420)) {
|
|
230
|
-
heightOverride.height = `${window.innerHeight - 42 - 2}px`; // render full window height - 42px top padding - 2px border
|
|
231
|
-
heightOverride.minHeight = heightOverride.height;
|
|
232
213
|
}
|
|
233
214
|
|
|
234
215
|
let loading = null;
|
|
@@ -269,7 +250,11 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
|
269
250
|
`;
|
|
270
251
|
return this._render(
|
|
271
252
|
inner,
|
|
272
|
-
{
|
|
253
|
+
{
|
|
254
|
+
fullscreenMobile: true,
|
|
255
|
+
labelId: this._titleId,
|
|
256
|
+
role: 'dialog'
|
|
257
|
+
},
|
|
273
258
|
topOverride
|
|
274
259
|
);
|
|
275
260
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '../focus-trap/focus-trap.js';
|
|
2
|
+
import '../../helpers/viewport-size.js';
|
|
2
3
|
import { allowBodyScroll, preventBodyScroll } from '../backdrop/backdrop.js';
|
|
3
4
|
import { clearDismissible, setDismissible } from '../../helpers/dismissible.js';
|
|
4
5
|
import { findComposedAncestor, isComposedAncestor } from '../../helpers/dom.js';
|
|
@@ -420,6 +421,7 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
|
|
|
420
421
|
'd2l-dialog-outer-nested': !this._useNative && this._parentDialog,
|
|
421
422
|
'd2l-dialog-outer-nested-showing': !this._useNative && this._nestedShowing,
|
|
422
423
|
'd2l-dialog-outer-scroll': this._scroll,
|
|
424
|
+
'd2l-dialog-fullscreen-mobile': info.fullscreenMobile,
|
|
423
425
|
'd2l-dialog-fullscreen-within': this._fullscreenWithin !== 0
|
|
424
426
|
};
|
|
425
427
|
|
|
@@ -154,12 +154,29 @@ export const dialogStyles = css`
|
|
|
154
154
|
.d2l-dialog-header {
|
|
155
155
|
padding: 14px 20px 16px 20px;
|
|
156
156
|
}
|
|
157
|
+
.d2l-dialog-fullscreen-mobile .d2l-dialog-header > div > d2l-button-icon {
|
|
158
|
+
margin: -8px -13px 0 15px;
|
|
159
|
+
}
|
|
160
|
+
:host([dir="rtl"]) .d2l-dialog-fullscreen-mobile .d2l-dialog-header > div > d2l-button-icon {
|
|
161
|
+
margin-left: -13px;
|
|
162
|
+
margin-right: 15px;
|
|
163
|
+
}
|
|
157
164
|
.d2l-dialog-content {
|
|
158
165
|
padding: 0 20px;
|
|
159
166
|
}
|
|
160
167
|
.d2l-dialog-footer {
|
|
161
168
|
padding: 20px 20px 2px 20px;
|
|
162
169
|
}
|
|
170
|
+
.d2l-dialog-outer.d2l-dialog-fullscreen-mobile {
|
|
171
|
+
margin: 0 !important;
|
|
172
|
+
min-width: calc(var(--d2l-vw, 1vw) * 100);
|
|
173
|
+
top: 42px;
|
|
174
|
+
}
|
|
175
|
+
:host(:not([in-iframe])) dialog.d2l-dialog-outer.d2l-dialog-fullscreen-mobile,
|
|
176
|
+
:host(:not([in-iframe])) div.d2l-dialog-outer.d2l-dialog-fullscreen-mobile {
|
|
177
|
+
height: calc(var(--d2l-vh, 1vh) * 100 - 42px);
|
|
178
|
+
min-height: calc(var(--d2l-vh, 1vh) * 100 - 42px);
|
|
179
|
+
}
|
|
163
180
|
}
|
|
164
181
|
|
|
165
182
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import '../button/button-icon.js';
|
|
2
2
|
import '../loading-spinner/loading-spinner.js';
|
|
3
|
-
import '../../helpers/viewport-size.js';
|
|
4
3
|
import { AsyncContainerMixin, asyncStates } from '../../mixins/async-container/async-container-mixin.js';
|
|
5
4
|
import { css, html, LitElement } from 'lit';
|
|
6
5
|
import { classMap } from 'lit/directives/class-map.js';
|
|
@@ -73,30 +72,6 @@ class Dialog extends LocalizeCoreElement(AsyncContainerMixin(DialogMixin(LitElem
|
|
|
73
72
|
padding: 0 0 5px 0;
|
|
74
73
|
}
|
|
75
74
|
|
|
76
|
-
@media (max-width: 615px), (max-height: 420px) and (max-width: 900px) {
|
|
77
|
-
|
|
78
|
-
.d2l-dialog-outer {
|
|
79
|
-
margin: 0 !important;
|
|
80
|
-
min-width: calc(var(--d2l-vw, 1vw) * 100);
|
|
81
|
-
top: 42px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.d2l-dialog-header > div > d2l-button-icon {
|
|
85
|
-
margin: -8px -13px 0 15px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
:host([dir="rtl"]) .d2l-dialog-header > div > d2l-button-icon {
|
|
89
|
-
margin-left: -13px;
|
|
90
|
-
margin-right: 15px;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
:host(:not([in-iframe])) dialog.d2l-dialog-outer,
|
|
94
|
-
:host(:not([in-iframe])) div.d2l-dialog-outer {
|
|
95
|
-
height: calc(var(--d2l-vh, 1vh) * 100 - 42px);
|
|
96
|
-
min-height: calc(var(--d2l-vh, 1vh) * 100 - 42px);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
75
|
`];
|
|
101
76
|
}
|
|
102
77
|
|
|
@@ -167,7 +142,7 @@ class Dialog extends LocalizeCoreElement(AsyncContainerMixin(DialogMixin(LitElem
|
|
|
167
142
|
|
|
168
143
|
if (!this._titleId) this._titleId = getUniqueId();
|
|
169
144
|
const inner = html`
|
|
170
|
-
<div class="d2l-dialog-inner"
|
|
145
|
+
<div class="d2l-dialog-inner" style=${styleMap(heightOverride)}>
|
|
171
146
|
<div class="d2l-dialog-header">
|
|
172
147
|
<div>
|
|
173
148
|
<h2 id="${this._titleId}" class="d2l-heading-3">${this.titleText}</h2>
|
|
@@ -184,7 +159,12 @@ class Dialog extends LocalizeCoreElement(AsyncContainerMixin(DialogMixin(LitElem
|
|
|
184
159
|
const descId = (this.describeContent) ? this._textId : undefined;
|
|
185
160
|
return this._render(
|
|
186
161
|
inner,
|
|
187
|
-
{
|
|
162
|
+
{
|
|
163
|
+
descId: descId,
|
|
164
|
+
fullscreenMobile: true,
|
|
165
|
+
labelId: this._titleId,
|
|
166
|
+
role: 'dialog'
|
|
167
|
+
},
|
|
188
168
|
topOverride
|
|
189
169
|
);
|
|
190
170
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.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",
|