@brightspace-ui/core 2.81.1 → 2.82.0
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.
|
@@ -180,6 +180,64 @@
|
|
|
180
180
|
</template>
|
|
181
181
|
</d2l-demo-snippet>
|
|
182
182
|
|
|
183
|
+
<h2>Fullscreen Dialog using width property</h2>
|
|
184
|
+
|
|
185
|
+
<d2l-demo-snippet>
|
|
186
|
+
<template>
|
|
187
|
+
<d2l-button id="openWidth">Show Dialog</d2l-button>
|
|
188
|
+
<d2l-dropdown-more text="Open!">
|
|
189
|
+
<d2l-dropdown-menu>
|
|
190
|
+
<d2l-menu label="Dialog">
|
|
191
|
+
<d2l-menu-item id="dropdownWidth" text="See dialog"></d2l-menu-item>
|
|
192
|
+
</d2l-menu>
|
|
193
|
+
</d2l-dropdown-menu>
|
|
194
|
+
</d2l-dropdown-more>
|
|
195
|
+
<d2l-dialog-fullscreen id="dialogWidth" title-text="Fullscreen Title" width="1800">
|
|
196
|
+
<p>Deadlights jack lad schooner scallywag dance the hempen jig carouser broadside cable strike colors. Bring a spring upon her cable holystone blow the man down spanker</p>
|
|
197
|
+
<p>Shiver me timbers to go on account lookout wherry doubloon chase. Belay yo-ho-ho keelhaul squiffy black spot yardarm spyglass sheet transom heave to.</p>
|
|
198
|
+
<p>Trysail Sail ho Corsair red ensign hulk smartly boom jib rum gangway. Case shot Shiver me timbers gangplank crack Jennys tea cup ballast Blimey lee snow crow's nest rutters. Fluke jib scourge of the seven seas boatswain schooner gaff booty Jack Tar transom spirits.</p>
|
|
199
|
+
<p>Deadlights jack lad schooner scallywag dance the hempen jig carouser broadside cable strike colors. Bring a spring upon her cable holystone blow the man down spanker</p>
|
|
200
|
+
<p>Shiver me timbers to go on account lookout wherry doubloon chase. Belay yo-ho-ho keelhaul squiffy black spot yardarm spyglass sheet transom heave to.</p>
|
|
201
|
+
<p>Trysail Sail ho Corsair red ensign hulk smartly boom jib rum gangway. Case shot Shiver me timbers gangplank crack Jennys tea cup ballast Blimey lee snow crow's nest rutters. Fluke jib scourge of the seven seas boatswain schooner gaff booty Jack Tar transom spirits.</p>
|
|
202
|
+
<d2l-dropdown-button-subtle text="More">
|
|
203
|
+
<d2l-dropdown-content mobile-tray="bottom">
|
|
204
|
+
<p>Deadlights jack lad schooner scallywag dance the hempen jig carouser broadside cable strike colors. Bring a spring upon her cable holystone blow the man down spanker</p>
|
|
205
|
+
<p>Shiver me timbers to go on account lookout wherry doubloon chase. Belay yo-ho-ho keelhaul squiffy black spot yardarm spyglass sheet transom heave to.</p>
|
|
206
|
+
<p>Trysail Sail ho Corsair red ensign hulk smartly boom jib rum gangway. Case shot Shiver me timbers gangplank crack Jennys tea cup ballast Blimey lee snow crow's nest rutters. Fluke jib scourge of the seven seas boatswain schooner gaff booty Jack Tar transom spirits.</p>
|
|
207
|
+
</d2l-dropdown-content>
|
|
208
|
+
</d2l-dropdown-button-subtle>
|
|
209
|
+
<d2l-filter>
|
|
210
|
+
<d2l-filter-dimension-set key="course" text="Course" select-all>
|
|
211
|
+
<d2l-filter-dimension-set-value key="art" text="Art"></d2l-filter-dimension-set-value>
|
|
212
|
+
<d2l-filter-dimension-set-value key="astronomy" text="Astronomy" selected></d2l-filter-dimension-set-value>
|
|
213
|
+
<d2l-filter-dimension-set-value key="biology" text="Biology"></d2l-filter-dimension-set-value>
|
|
214
|
+
<d2l-filter-dimension-set-value key="chemistry" text="Chemistry"></d2l-filter-dimension-set-value>
|
|
215
|
+
<d2l-filter-dimension-set-value key="drama" text="Drama"></d2l-filter-dimension-set-value>
|
|
216
|
+
<d2l-filter-dimension-set-value key="english" text="English"></d2l-filter-dimension-set-value>
|
|
217
|
+
<d2l-filter-dimension-set-value key="how-to" text="How To Write a How To Article With a Flashy Title"></d2l-filter-dimension-set-value>
|
|
218
|
+
<d2l-filter-dimension-set-value key="math" text="Math"></d2l-filter-dimension-set-value>
|
|
219
|
+
<d2l-filter-dimension-set-value key="physics" text="Physics"></d2l-filter-dimension-set-value>
|
|
220
|
+
<d2l-filter-dimension-set-value key="stats" text="Statistics"></d2l-filter-dimension-set-value>
|
|
221
|
+
<d2l-filter-dimension-set-value key="writerscraft" text="Writer's Craft"></d2l-filter-dimension-set-value>
|
|
222
|
+
</d2l-filter-dimension-set>
|
|
223
|
+
</d2l-filter>
|
|
224
|
+
<d2l-button slot="footer" primary data-dialog-action="save">Save</d2l-button>
|
|
225
|
+
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
226
|
+
</d2l-dialog-fullscreen>
|
|
227
|
+
<script>
|
|
228
|
+
document.querySelector('#openWidth').addEventListener('click', () => {
|
|
229
|
+
document.querySelector('#dialogWidth').opened = true;
|
|
230
|
+
});
|
|
231
|
+
document.querySelector('#dropdownWidth').addEventListener('click', () => {
|
|
232
|
+
document.querySelector('#dialogWidth').opened = true;
|
|
233
|
+
});
|
|
234
|
+
document.querySelector('#dialogWidth').addEventListener('d2l-dialog-close', (e) => {
|
|
235
|
+
console.log('confirm action:', e.detail.action);
|
|
236
|
+
});
|
|
237
|
+
</script>
|
|
238
|
+
</template>
|
|
239
|
+
</d2l-demo-snippet>
|
|
240
|
+
|
|
183
241
|
</d2l-demo-page>
|
|
184
242
|
</body>
|
|
185
243
|
</html>
|
|
@@ -27,9 +27,14 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
|
27
27
|
* @type {boolean}
|
|
28
28
|
*/
|
|
29
29
|
async: { type: Boolean },
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The preferred width (unit-less) for the dialog. Maximum 1170.
|
|
33
|
+
*/
|
|
34
|
+
width: { type: Number },
|
|
30
35
|
_hasFooterContent: { type: Boolean, attribute: false },
|
|
31
36
|
_icon: { type: String, attribute: false },
|
|
32
|
-
_headerStyle: { type: String, attribute: false }
|
|
37
|
+
_headerStyle: { type: String, attribute: false },
|
|
33
38
|
};
|
|
34
39
|
}
|
|
35
40
|
|
|
@@ -44,6 +49,10 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
|
44
49
|
text-align: center;
|
|
45
50
|
}
|
|
46
51
|
|
|
52
|
+
.d2l-dialog-outer {
|
|
53
|
+
max-width: calc(100% - 3rem);
|
|
54
|
+
}
|
|
55
|
+
|
|
47
56
|
@media (min-width: 616px) {
|
|
48
57
|
|
|
49
58
|
.d2l-dialog-header {
|
|
@@ -78,7 +87,6 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
|
78
87
|
animation: d2l-dialog-fullscreen-close 200ms ease-out;
|
|
79
88
|
border-radius: 8px;
|
|
80
89
|
margin: 1.5rem;
|
|
81
|
-
max-width: 1170px;
|
|
82
90
|
top: 0;
|
|
83
91
|
width: auto;
|
|
84
92
|
}
|
|
@@ -179,6 +187,7 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
|
179
187
|
this._headerStyle = 'd2l-heading-2';
|
|
180
188
|
this._handleResize = this._handleResize.bind(this);
|
|
181
189
|
this._handleResize();
|
|
190
|
+
this.width = 1170;
|
|
182
191
|
}
|
|
183
192
|
|
|
184
193
|
get asyncContainerCustom() {
|
|
@@ -196,7 +205,7 @@ class DialogFullscreen extends LocalizeCoreElement(AsyncContainerMixin(DialogMix
|
|
|
196
205
|
}
|
|
197
206
|
|
|
198
207
|
render() {
|
|
199
|
-
|
|
208
|
+
this._width = Math.max(1170, this.width);
|
|
200
209
|
const heightOverride = {} ;
|
|
201
210
|
let topOverride = null;
|
|
202
211
|
if (this._ifrauContextInfo) {
|
|
@@ -432,6 +432,7 @@ export const DialogMixin = superclass => class extends RtlMixin(superclass) {
|
|
|
432
432
|
_render(inner, info, iframeTopOverride) {
|
|
433
433
|
|
|
434
434
|
const styles = {};
|
|
435
|
+
if (this._width) styles.width = `${this._width}px`;
|
|
435
436
|
if (this._autoSize) {
|
|
436
437
|
if (this._ifrauContextInfo) styles.top = `${this._top}px`;
|
|
437
438
|
if (this._ifrauContextInfo) styles.bottom = 'auto';
|
package/custom-elements.json
CHANGED
|
@@ -1816,6 +1816,12 @@
|
|
|
1816
1816
|
"type": "boolean",
|
|
1817
1817
|
"default": "false"
|
|
1818
1818
|
},
|
|
1819
|
+
{
|
|
1820
|
+
"name": "width",
|
|
1821
|
+
"description": "The preferred width (unit-less) for the dialog. Maximum 1170.",
|
|
1822
|
+
"type": "number",
|
|
1823
|
+
"default": "1170"
|
|
1824
|
+
},
|
|
1819
1825
|
{
|
|
1820
1826
|
"name": "title-text",
|
|
1821
1827
|
"description": "The optional title for the dialog",
|
|
@@ -1836,6 +1842,13 @@
|
|
|
1836
1842
|
"type": "boolean",
|
|
1837
1843
|
"default": "false"
|
|
1838
1844
|
},
|
|
1845
|
+
{
|
|
1846
|
+
"name": "width",
|
|
1847
|
+
"attribute": "width",
|
|
1848
|
+
"description": "The preferred width (unit-less) for the dialog. Maximum 1170.",
|
|
1849
|
+
"type": "number",
|
|
1850
|
+
"default": "1170"
|
|
1851
|
+
},
|
|
1839
1852
|
{
|
|
1840
1853
|
"name": "documentLocaleSettings",
|
|
1841
1854
|
"default": "\"getDocumentLocaleSettings()\""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.82.0",
|
|
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",
|