@brightspace-ui/core 3.227.4 → 3.227.5
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/button/button.js +8 -8
- package/components/demo/test/demo-page-settings.test.js +25 -0
- package/components/demo/test/demo-page.test.js +17 -0
- package/package.json +1 -1
- package/components/alert/demo/alert-toast.html +0 -106
- package/components/alert/demo/alert.html +0 -82
- package/components/backdrop/demo/backdrop-loading.html +0 -166
- package/components/backdrop/demo/backdrop.html +0 -57
- package/components/breadcrumbs/demo/breadcrumbs.html +0 -53
- package/components/button/demo/button-add.html +0 -55
- package/components/button/demo/button-copy.html +0 -122
- package/components/button/demo/button-icon.html +0 -174
- package/components/button/demo/button-move.html +0 -38
- package/components/button/demo/button-split.html +0 -76
- package/components/button/demo/button-subtle.html +0 -132
- package/components/button/demo/button-toggle.html +0 -80
- package/components/button/demo/button.html +0 -67
- package/components/button/demo/floating-buttons-in-frame.html +0 -44
- package/components/button/demo/floating-buttons-in-tabs.html +0 -244
- package/components/button/demo/floating-buttons-page.html +0 -100
- package/components/button/demo/floating-buttons.html +0 -101
- package/components/calendar/demo/calendar.html +0 -76
- package/components/card/demo/card.html +0 -304
- package/components/collapsible-panel/demo/collapsible-panel.html +0 -218
- package/components/colors/demo/color-swatch.js +0 -240
- package/components/colors/demo/colors.html +0 -139
- package/components/count-badge/demo/count-badge-icon.html +0 -48
- package/components/count-badge/demo/count-badge.html +0 -73
- package/components/demo/demo/demo-snippet.html +0 -71
- package/components/description-list/demo/description-list-test.js +0 -142
- package/components/description-list/demo/description-list.html +0 -48
- package/components/dialog/demo/dialog-async-content-until.js +0 -89
- package/components/dialog/demo/dialog-async-content.js +0 -72
- package/components/dialog/demo/dialog-confirm.html +0 -102
- package/components/dialog/demo/dialog-container.js +0 -40
- package/components/dialog/demo/dialog-fullscreen.html +0 -273
- package/components/dialog/demo/dialog-nested.html +0 -94
- package/components/dialog/demo/dialog.html +0 -398
- package/components/dropdown/demo/dropdown-button.html +0 -102
- package/components/dropdown/demo/dropdown-context-menu.html +0 -129
- package/components/dropdown/demo/dropdown-flicker-inner.html +0 -70
- package/components/dropdown/demo/dropdown-flicker.html +0 -142
- package/components/dropdown/demo/dropdown-menu-demo-view.js +0 -37
- package/components/dropdown/demo/dropdown-menu.html +0 -227
- package/components/dropdown/demo/dropdown-more.html +0 -160
- package/components/dropdown/demo/dropdown-positioning.html +0 -127
- package/components/dropdown/demo/dropdown-tabs.html +0 -87
- package/components/dropdown/demo/dropdown.html +0 -217
- package/components/empty-state/demo/empty-state.html +0 -94
- package/components/expand-collapse/demo/expand-collapse-content.html +0 -58
- package/components/filter/demo/filter-load-more-demo.js +0 -182
- package/components/filter/demo/filter-overflow-group.html +0 -246
- package/components/filter/demo/filter-search-demo.js +0 -135
- package/components/filter/demo/filter-tags.html +0 -115
- package/components/filter/demo/filter.html +0 -230
- package/components/focus-trap/demo/focus-trap.html +0 -75
- package/components/form/demo/form-demo.js +0 -105
- package/components/form/demo/form-dialog-demo.js +0 -94
- package/components/form/demo/form-panel-demo.js +0 -89
- package/components/form/demo/form.html +0 -37
- package/components/hierarchical-view/demo/hierarchical-view.html +0 -221
- package/components/html-block/demo/html-block-code.html +0 -55
- package/components/html-block/demo/html-block.html +0 -696
- package/components/icons/demo/icon-color-override.js +0 -23
- package/components/icons/demo/icon-custom.html +0 -112
- package/components/icons/demo/icon-size-override.js +0 -24
- package/components/icons/demo/icon.html +0 -52
- package/components/inputs/demo/input-checkbox.html +0 -118
- package/components/inputs/demo/input-color-palette.js +0 -67
- package/components/inputs/demo/input-color.html +0 -110
- package/components/inputs/demo/input-date-range.html +0 -114
- package/components/inputs/demo/input-date-time-range.html +0 -128
- package/components/inputs/demo/input-date-time.html +0 -100
- package/components/inputs/demo/input-date.html +0 -81
- package/components/inputs/demo/input-group.html +0 -56
- package/components/inputs/demo/input-number.html +0 -136
- package/components/inputs/demo/input-percent.html +0 -99
- package/components/inputs/demo/input-radio-label-test.js +0 -45
- package/components/inputs/demo/input-radio-solo-test.js +0 -47
- package/components/inputs/demo/input-radio.html +0 -119
- package/components/inputs/demo/input-search.html +0 -75
- package/components/inputs/demo/input-select-test.js +0 -60
- package/components/inputs/demo/input-select.html +0 -45
- package/components/inputs/demo/input-text.html +0 -163
- package/components/inputs/demo/input-textarea.html +0 -124
- package/components/inputs/demo/input-time-range.html +0 -121
- package/components/inputs/demo/input-time.html +0 -95
- package/components/link/demo/link.html +0 -111
- package/components/list/demo/demo-list-nav.js +0 -170
- package/components/list/demo/demo-list-nested-iterations-helper.js +0 -168
- package/components/list/demo/demo-list-nested-lazy-load.js +0 -133
- package/components/list/demo/demo-list-nested.js +0 -291
- package/components/list/demo/demo-list.js +0 -241
- package/components/list/demo/list-color.html +0 -423
- package/components/list/demo/list-demo-scenarios.js +0 -380
- package/components/list/demo/list-drag-and-drop-position.js +0 -102
- package/components/list/demo/list-drag-and-drop.html +0 -82
- package/components/list/demo/list-expand-collapse.html +0 -136
- package/components/list/demo/list-item-actions.html +0 -371
- package/components/list/demo/list-item-custom.js +0 -204
- package/components/list/demo/list-item-layouts.html +0 -331
- package/components/list/demo/list-item-scroll.html +0 -122
- package/components/list/demo/list-layout.html +0 -575
- package/components/list/demo/list-nav.html +0 -110
- package/components/list/demo/list-nested.html +0 -270
- package/components/list/demo/list-selection.html +0 -301
- package/components/list/demo/list.html +0 -319
- package/components/loading-spinner/demo/loading-spinner-override.js +0 -34
- package/components/loading-spinner/demo/loading-spinner.html +0 -63
- package/components/menu/demo/checkbox-menu.html +0 -52
- package/components/menu/demo/custom-menu-item.js +0 -37
- package/components/menu/demo/custom-view.js +0 -63
- package/components/menu/demo/menu.html +0 -211
- package/components/menu/demo/radio-menu.html +0 -52
- package/components/meter/demo/meter.html +0 -115
- package/components/more-less/demo/more-less-test.js +0 -67
- package/components/more-less/demo/more-less.html +0 -71
- package/components/object-property-list/demo/object-property-list.html +0 -99
- package/components/offscreen/demo/offscreen-demo.js +0 -16
- package/components/offscreen/demo/offscreen.html +0 -44
- package/components/overflow-group/demo/demo-overflow-group.js +0 -29
- package/components/overflow-group/demo/overflow-group.html +0 -110
- package/components/paging/demo/pager-load-more.html +0 -120
- package/components/popover/demo/popover.html +0 -309
- package/components/progress/demo/progress.html +0 -104
- package/components/scroll-wrapper/demo/scroll-wrapper-test.js +0 -108
- package/components/scroll-wrapper/demo/scroll-wrapper.html +0 -52
- package/components/selection/demo/demo-selection.js +0 -35
- package/components/selection/demo/selection.html +0 -198
- package/components/skeleton/demo/skeleton-group-nested-test.js +0 -71
- package/components/skeleton/demo/skeleton-group-test-wrapper.js +0 -18
- package/components/skeleton/demo/skeleton-group-test.js +0 -91
- package/components/skeleton/demo/skeleton-mixin.html +0 -78
- package/components/skeleton/demo/skeleton-test-box.js +0 -34
- package/components/skeleton/demo/skeleton-test-container.js +0 -45
- package/components/skeleton/demo/skeleton-test-heading.js +0 -44
- package/components/skeleton/demo/skeleton-test-link.js +0 -47
- package/components/skeleton/demo/skeleton-test-paragraph.js +0 -54
- package/components/skeleton/demo/skeleton-test-stack.js +0 -38
- package/components/skeleton/demo/skeleton-test-width.js +0 -20
- package/components/sorting/demo/sort.html +0 -37
- package/components/status-indicator/demo/status-indicator.html +0 -99
- package/components/switch/demo/switch.html +0 -95
- package/components/table/demo/table-test.js +0 -271
- package/components/table/demo/table.html +0 -107
- package/components/tabs/demo/tab-custom.js +0 -39
- package/components/tabs/demo/tabs-array.js +0 -43
- package/components/tabs/demo/tabs.html +0 -558
- package/components/tag-list/demo/tag-list.html +0 -117
- package/components/tooltip/demo/tooltip.html +0 -275
- package/components/typography/demo/typography.html +0 -93
- package/components/view-switcher/demo/demo-table-view.js +0 -41
- package/components/view-switcher/demo/view-switcher.html +0 -71
- package/directives/animate/demo/animate-test.js +0 -98
- package/directives/animate/demo/index.html +0 -23
- package/helpers/demo/announce-test.js +0 -37
- package/helpers/demo/announce.html +0 -19
- package/helpers/demo/dismissible-test.js +0 -66
- package/helpers/demo/dismissible.html +0 -38
- package/helpers/demo/gestures.html +0 -58
- package/helpers/demo/prism.html +0 -694
- package/helpers/demo/template-tags.html +0 -118
- package/mixins/arrow-keys/demo/arrow-keys-mixin.html +0 -29
- package/mixins/arrow-keys/demo/arrow-keys-test.js +0 -38
- package/mixins/async-container/demo/async-container.html +0 -109
- package/mixins/async-container/demo/async-container.js +0 -27
- package/mixins/async-container/demo/async-item.js +0 -80
- package/mixins/labelled/demo/labelled-mixin.html +0 -90
- package/mixins/localize/demo/localize-mixin-greeting.js +0 -39
- package/mixins/localize/demo/localize-mixin-mission.js +0 -25
- package/mixins/localize/demo/localize-mixin.html +0 -28
- package/templates/primary-secondary/demo/form.html +0 -55
- package/templates/primary-secondary/demo/index.html +0 -27
- package/templates/primary-secondary/demo/integration.html +0 -457
- package/templates/primary-secondary/demo/overflow-hidden.html +0 -22
- package/templates/primary-secondary/demo/width-type-normal.html +0 -26
|
@@ -1,398 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<link rel="stylesheet" href="../../demo/styles.css" type="text/css">
|
|
7
|
-
<script>
|
|
8
|
-
//window.D2L = { DialogMixin: { preferNative: false } };
|
|
9
|
-
</script>
|
|
10
|
-
<script type="module">
|
|
11
|
-
import '../../demo/demo-page.js';
|
|
12
|
-
import '../../button/button.js';
|
|
13
|
-
import '../../dropdown/dropdown-button-subtle.js';
|
|
14
|
-
import '../../dropdown/dropdown-content.js';
|
|
15
|
-
import '../../dropdown/dropdown.js';
|
|
16
|
-
import '../../dropdown/dropdown-menu.js';
|
|
17
|
-
import '../../filter/filter.js';
|
|
18
|
-
import '../../filter/filter-dimension-set.js';
|
|
19
|
-
import '../../filter/filter-dimension-set-value.js';
|
|
20
|
-
import '../../inputs/input-checkbox.js';
|
|
21
|
-
import '../../list/demo/demo-list.js';
|
|
22
|
-
import '../../menu/menu.js';
|
|
23
|
-
import '../../menu/menu-item.js';
|
|
24
|
-
import '../dialog.js';
|
|
25
|
-
import './dialog-async-content.js';
|
|
26
|
-
import './dialog-async-content-until.js';
|
|
27
|
-
import './dialog-container.js';
|
|
28
|
-
</script>
|
|
29
|
-
<style>
|
|
30
|
-
.d2l-typography p:first-child { margin-top: 0; }
|
|
31
|
-
.d2l-typography p:last-child { margin-bottom: 0; }
|
|
32
|
-
</style>
|
|
33
|
-
</head>
|
|
34
|
-
<body unresolved>
|
|
35
|
-
|
|
36
|
-
<d2l-demo-page page-title="d2l-dialog">
|
|
37
|
-
|
|
38
|
-
<h2>Dialog</h2>
|
|
39
|
-
|
|
40
|
-
<d2l-demo-snippet>
|
|
41
|
-
<template>
|
|
42
|
-
<d2l-button id="open">Show Dialog</d2l-button>
|
|
43
|
-
<d2l-dialog id="dialog" title-text="Dialog Title">
|
|
44
|
-
<div>
|
|
45
|
-
<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>
|
|
46
|
-
<d2l-demo-list></d2l-demo-list>
|
|
47
|
-
<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>
|
|
48
|
-
<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>
|
|
49
|
-
<d2l-dropdown-button-subtle text="More">
|
|
50
|
-
<d2l-dropdown-content mobile-tray="right">
|
|
51
|
-
<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>
|
|
52
|
-
<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>
|
|
53
|
-
<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>
|
|
54
|
-
</d2l-dropdown-content>
|
|
55
|
-
</d2l-dropdown-button-subtle>
|
|
56
|
-
<d2l-filter>
|
|
57
|
-
<d2l-filter-dimension-set key="course" text="Course" select-all>
|
|
58
|
-
<d2l-filter-dimension-set-value key="art" text="Art"></d2l-filter-dimension-set-value>
|
|
59
|
-
<d2l-filter-dimension-set-value key="astronomy" text="Astronomy" selected></d2l-filter-dimension-set-value>
|
|
60
|
-
<d2l-filter-dimension-set-value key="biology" text="Biology"></d2l-filter-dimension-set-value>
|
|
61
|
-
<d2l-filter-dimension-set-value key="chemistry" text="Chemistry"></d2l-filter-dimension-set-value>
|
|
62
|
-
<d2l-filter-dimension-set-value key="drama" text="Drama"></d2l-filter-dimension-set-value>
|
|
63
|
-
<d2l-filter-dimension-set-value key="english" text="English"></d2l-filter-dimension-set-value>
|
|
64
|
-
<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>
|
|
65
|
-
<d2l-filter-dimension-set-value key="math" text="Math"></d2l-filter-dimension-set-value>
|
|
66
|
-
<d2l-filter-dimension-set-value key="physics" text="Physics"></d2l-filter-dimension-set-value>
|
|
67
|
-
<d2l-filter-dimension-set-value key="stats" text="Statistics"></d2l-filter-dimension-set-value>
|
|
68
|
-
<d2l-filter-dimension-set-value key="writerscraft" text="Writer's Craft"></d2l-filter-dimension-set-value>
|
|
69
|
-
</d2l-filter-dimension-set>
|
|
70
|
-
</d2l-filter>
|
|
71
|
-
</div>
|
|
72
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Click Me!</d2l-button>
|
|
73
|
-
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
74
|
-
</d2l-dialog>
|
|
75
|
-
<script>
|
|
76
|
-
document.querySelector('#open').addEventListener('click', () => {
|
|
77
|
-
document.querySelector('#dialog').opened = true;
|
|
78
|
-
});
|
|
79
|
-
document.querySelector('#dialog').addEventListener('d2l-dialog-open', (e) => {
|
|
80
|
-
console.log('dialog open', e);
|
|
81
|
-
});
|
|
82
|
-
document.querySelector('#dialog').addEventListener('d2l-dialog-close', (e) => {
|
|
83
|
-
console.log('dialog close', e.detail.action);
|
|
84
|
-
});
|
|
85
|
-
</script>
|
|
86
|
-
</template>
|
|
87
|
-
</d2l-demo-snippet>
|
|
88
|
-
|
|
89
|
-
<h2>Dialog with complex opener</h2>
|
|
90
|
-
|
|
91
|
-
<d2l-demo-snippet>
|
|
92
|
-
<template>
|
|
93
|
-
<d2l-dropdown>
|
|
94
|
-
<button class="d2l-dropdown-opener">Open it!</button>
|
|
95
|
-
<d2l-dropdown-menu id="dropdown">
|
|
96
|
-
<d2l-menu label="Astronomy">
|
|
97
|
-
<d2l-menu-item id="complex-opener" text="Open dialog"></d2l-menu-item>
|
|
98
|
-
<d2l-menu-item text="Item 2"></d2l-menu-item>
|
|
99
|
-
<d2l-menu-item text="Item 3"></d2l-menu-item>
|
|
100
|
-
<d2l-menu-item text="Item 4"></d2l-menu-item>
|
|
101
|
-
</d2l-menu>
|
|
102
|
-
</d2l-dropdown-menu>
|
|
103
|
-
</d2l-dropdown>
|
|
104
|
-
<d2l-dialog id="complex-opener-dialog" title-text="Dialog Title">
|
|
105
|
-
<div>
|
|
106
|
-
Hello
|
|
107
|
-
</div>
|
|
108
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Click Me!</d2l-button>
|
|
109
|
-
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
110
|
-
</d2l-dialog>
|
|
111
|
-
<script>
|
|
112
|
-
document.querySelector('#complex-opener').addEventListener('d2l-menu-item-select', () => {
|
|
113
|
-
document.querySelector('#complex-opener-dialog').opened = true;
|
|
114
|
-
});
|
|
115
|
-
</script>
|
|
116
|
-
</template>
|
|
117
|
-
</d2l-demo-snippet>
|
|
118
|
-
|
|
119
|
-
<h2>Dialog (with promise)</h2>
|
|
120
|
-
|
|
121
|
-
<d2l-demo-snippet>
|
|
122
|
-
<template>
|
|
123
|
-
<d2l-button id="openPromise">Show Dialog</d2l-button>
|
|
124
|
-
<d2l-dialog id="dialogPromise" title-text="Dialog Title">
|
|
125
|
-
<div>
|
|
126
|
-
<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>
|
|
127
|
-
<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>
|
|
128
|
-
<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>
|
|
129
|
-
</div>
|
|
130
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Click Me!</d2l-button>
|
|
131
|
-
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
132
|
-
</d2l-dialog>
|
|
133
|
-
<script>
|
|
134
|
-
document.querySelector('#openPromise').addEventListener('click', async() => {
|
|
135
|
-
const action = await document.querySelector('#dialogPromise').open();
|
|
136
|
-
console.log('dialog action:', action);
|
|
137
|
-
});
|
|
138
|
-
</script>
|
|
139
|
-
</template>
|
|
140
|
-
</d2l-demo-snippet>
|
|
141
|
-
|
|
142
|
-
<h2>Dialog (declarative)</h2>
|
|
143
|
-
|
|
144
|
-
<d2l-demo-snippet>
|
|
145
|
-
<template>
|
|
146
|
-
<d2l-dialog-demo-container></d2l-dialog-demo-container>
|
|
147
|
-
</template>
|
|
148
|
-
</d2l-demo-snippet>
|
|
149
|
-
|
|
150
|
-
<h2>Dialog (async)</h2>
|
|
151
|
-
|
|
152
|
-
<d2l-demo-snippet>
|
|
153
|
-
<template>
|
|
154
|
-
<d2l-button id="openAsync">Show Dialog</d2l-button>
|
|
155
|
-
<d2l-dialog id="dialogAsync" title-text="Dialog Title" async>
|
|
156
|
-
<d2l-dialog-demo-async-content></d2l-dialog-demo-async-content>
|
|
157
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Click Me!</d2l-button>
|
|
158
|
-
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
159
|
-
</d2l-dialog>
|
|
160
|
-
<script>
|
|
161
|
-
document.querySelector('#openAsync').addEventListener('click', () => {
|
|
162
|
-
document.querySelector('#dialogAsync').opened = true;
|
|
163
|
-
document.querySelector('d2l-dialog-demo-async-content').href = 'some-href';
|
|
164
|
-
});
|
|
165
|
-
document.querySelector('#dialogAsync').addEventListener('d2l-dialog-close', (e) => {
|
|
166
|
-
console.log('dialog action:', e.detail.action);
|
|
167
|
-
});
|
|
168
|
-
</script>
|
|
169
|
-
</template>
|
|
170
|
-
</d2l-demo-snippet>
|
|
171
|
-
|
|
172
|
-
<h2>Dialog (async using until)</h2>
|
|
173
|
-
|
|
174
|
-
<d2l-demo-snippet>
|
|
175
|
-
<template>
|
|
176
|
-
<d2l-button id="openAsyncUntil">Show Dialog</d2l-button>
|
|
177
|
-
<d2l-dialog id="dialogAsyncUntil" title-text="Dialog Title">
|
|
178
|
-
<d2l-dialog-demo-async-content-until></d2l-dialog-demo-async-content-until>
|
|
179
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Click Me!</d2l-button>
|
|
180
|
-
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
181
|
-
</d2l-dialog>
|
|
182
|
-
<script>
|
|
183
|
-
document.querySelector('#openAsyncUntil').addEventListener('click', () => {
|
|
184
|
-
document.querySelector('#dialogAsyncUntil').opened = true;
|
|
185
|
-
document.querySelector('d2l-dialog-demo-async-content-until').href = 'some-href';
|
|
186
|
-
});
|
|
187
|
-
document.querySelector('#dialogAsyncUntil').addEventListener('d2l-dialog-close', (e) => {
|
|
188
|
-
console.log('dialog action:', e.detail.action);
|
|
189
|
-
});
|
|
190
|
-
</script>
|
|
191
|
-
</template>
|
|
192
|
-
</d2l-demo-snippet>
|
|
193
|
-
|
|
194
|
-
<h2>Dialog (intercept closing)</h2>
|
|
195
|
-
|
|
196
|
-
<d2l-demo-snippet>
|
|
197
|
-
<template>
|
|
198
|
-
<d2l-button id="openInterceptClosing">Show Dialog</d2l-button>
|
|
199
|
-
<d2l-dialog id="dialogInterceptClosing" title-text="Dialog Prevent Closing">
|
|
200
|
-
<div>
|
|
201
|
-
<p>This dialog is prevented from closing by listening "d2l-dialog-before-close" event.</p>
|
|
202
|
-
<d2l-dialog id="dialogConfirmClose" title-text="Comfirm close">
|
|
203
|
-
<div>
|
|
204
|
-
<p>Do you really want to close the previous dialog?</p>
|
|
205
|
-
</div>
|
|
206
|
-
<d2l-button slot="footer" primary data-dialog-action="confirm">Yes</d2l-button>
|
|
207
|
-
<d2l-button slot="footer" data-dialog-action="deny">No</d2l-button>
|
|
208
|
-
</d2l-dialog>
|
|
209
|
-
</div>
|
|
210
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Close Me!</d2l-button>
|
|
211
|
-
<d2l-button slot="footer" data-dialog-action="close">Close without confirmation</d2l-button>
|
|
212
|
-
<d2l-button slot="footer" data-dialog-action="cancel">Cancel</d2l-button>
|
|
213
|
-
</d2l-dialog>
|
|
214
|
-
<script>
|
|
215
|
-
let canBeClosed = false;
|
|
216
|
-
document.querySelector('#openInterceptClosing').addEventListener('click', () => {
|
|
217
|
-
document.querySelector('#dialogInterceptClosing').opened = true;
|
|
218
|
-
});
|
|
219
|
-
document.querySelector('#dialogInterceptClosing').addEventListener('d2l-dialog-open', () => {
|
|
220
|
-
canBeClosed = false;
|
|
221
|
-
});
|
|
222
|
-
document.querySelector('#dialogInterceptClosing').addEventListener('d2l-dialog-close', (e) => {
|
|
223
|
-
console.log('dialog action:', e.detail.action);
|
|
224
|
-
});
|
|
225
|
-
document.querySelector('#dialogConfirmClose').addEventListener('d2l-dialog-close', (e) => {
|
|
226
|
-
e.stopPropagation();
|
|
227
|
-
});
|
|
228
|
-
document.querySelector('#dialogInterceptClosing').addEventListener('d2l-dialog-before-close', async(e) => {
|
|
229
|
-
|
|
230
|
-
if (e.detail.action === 'close' || canBeClosed) return;
|
|
231
|
-
|
|
232
|
-
e.preventDefault();
|
|
233
|
-
const action = await document.querySelector('#dialogConfirmClose').open();
|
|
234
|
-
|
|
235
|
-
console.log('dialog action:', e.detail.action, ', confirm dialog action:', action);
|
|
236
|
-
if (action === 'confirm') {
|
|
237
|
-
canBeClosed = true;
|
|
238
|
-
e.detail.closeDialog();
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
</script>
|
|
242
|
-
</template>
|
|
243
|
-
</d2l-demo-snippet>
|
|
244
|
-
|
|
245
|
-
<h2>Dialog (critical)</h2>
|
|
246
|
-
|
|
247
|
-
<d2l-demo-snippet>
|
|
248
|
-
<template>
|
|
249
|
-
<d2l-button id="openCritical">Show Dialog</d2l-button>
|
|
250
|
-
<d2l-dialog id="dialogCritical" title-text="Dialog Title" critical>
|
|
251
|
-
<div>
|
|
252
|
-
<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>
|
|
253
|
-
<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>
|
|
254
|
-
<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>
|
|
255
|
-
</div>
|
|
256
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Click Me!</d2l-button>
|
|
257
|
-
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
258
|
-
</d2l-dialog>
|
|
259
|
-
<script>
|
|
260
|
-
document.querySelector('#openCritical').addEventListener('click', () => {
|
|
261
|
-
document.querySelector('#dialogCritical').opened = true;
|
|
262
|
-
});
|
|
263
|
-
</script>
|
|
264
|
-
</template>
|
|
265
|
-
</d2l-demo-snippet>
|
|
266
|
-
|
|
267
|
-
<h2>Dialog (native)</h2>
|
|
268
|
-
|
|
269
|
-
<d2l-demo-snippet>
|
|
270
|
-
<template>
|
|
271
|
-
<d2l-button id="openNative">Show Dialog</d2l-button>
|
|
272
|
-
<d2l-dialog id="dialogNative" title-text="Dialog Title">
|
|
273
|
-
<div>
|
|
274
|
-
<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>
|
|
275
|
-
<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>
|
|
276
|
-
<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>
|
|
277
|
-
</div>
|
|
278
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Click Me!</d2l-button>
|
|
279
|
-
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
280
|
-
</d2l-dialog>
|
|
281
|
-
<script>
|
|
282
|
-
document.querySelector('#dialogNative')._useNative = true;
|
|
283
|
-
document.querySelector('#openNative').addEventListener('click', () => {
|
|
284
|
-
document.querySelector('#dialogNative').opened = true;
|
|
285
|
-
});
|
|
286
|
-
</script>
|
|
287
|
-
</template>
|
|
288
|
-
</d2l-demo-snippet>
|
|
289
|
-
|
|
290
|
-
<h2>Dialog (full-height with iframe)</h2>
|
|
291
|
-
|
|
292
|
-
<d2l-demo-snippet>
|
|
293
|
-
<template>
|
|
294
|
-
<d2l-button id="openFullHeight">Show Dialog</d2l-button>
|
|
295
|
-
<d2l-dialog id="dialogFullHeight" full-height title-text="Dialog Title">
|
|
296
|
-
<iframe id="iframeFullHeight" style="box-sizing: border-box; display: block; height: 100%; width: 100%;"></iframe>
|
|
297
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Click Me!</d2l-button><d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
298
|
-
</d2l-dialog>
|
|
299
|
-
<script>
|
|
300
|
-
document.querySelector('#iframeFullHeight').src = window.location.href.substring(0, window.location.href.indexOf('/components'));
|
|
301
|
-
document.querySelector('#openFullHeight').addEventListener('click', () => {
|
|
302
|
-
document.querySelector('#dialogFullHeight').opened = true;
|
|
303
|
-
});
|
|
304
|
-
</script>
|
|
305
|
-
</template>
|
|
306
|
-
</d2l-demo-snippet>
|
|
307
|
-
|
|
308
|
-
<h2>Dialog (overflowing content)</h2>
|
|
309
|
-
|
|
310
|
-
<d2l-demo-snippet>
|
|
311
|
-
<template>
|
|
312
|
-
<d2l-button id="openScrollFocus">Show Dialog</d2l-button>
|
|
313
|
-
<d2l-dialog title-text="My Dialog" id="dialogScrollFocus">
|
|
314
|
-
<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>
|
|
315
|
-
<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>
|
|
316
|
-
<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>
|
|
317
|
-
<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>
|
|
318
|
-
<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>
|
|
319
|
-
<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>
|
|
320
|
-
<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>
|
|
321
|
-
<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>
|
|
322
|
-
<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>
|
|
323
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Click Me!</d2l-button>
|
|
324
|
-
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
325
|
-
</d2l-dialog>
|
|
326
|
-
<script>
|
|
327
|
-
document.querySelector('#openScrollFocus').addEventListener('click', () => {
|
|
328
|
-
document.querySelector('#dialogScrollFocus').opened = true;
|
|
329
|
-
});
|
|
330
|
-
</script>
|
|
331
|
-
</template>
|
|
332
|
-
</d2l-demo-snippet>
|
|
333
|
-
|
|
334
|
-
<h2>Dialog (no content scrolling)</h2>
|
|
335
|
-
|
|
336
|
-
<d2l-demo-snippet>
|
|
337
|
-
<template>
|
|
338
|
-
<d2l-button id="openNoScrollDialog">Show Dialog</d2l-button>
|
|
339
|
-
<d2l-dialog id="noScrollDialog" title-text="Dialog Title">
|
|
340
|
-
<d2l-input-checkbox id="noScroll" label="Show extra paragraphs"></d2l-input-checkbox>
|
|
341
|
-
<div>
|
|
342
|
-
<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>
|
|
343
|
-
<p id="p2" style="display: none;">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>
|
|
344
|
-
<p id="p3" style="display: none;">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>
|
|
345
|
-
</div>
|
|
346
|
-
<d2l-button slot="footer" primary data-dialog-action="ok">Click Me!</d2l-button>
|
|
347
|
-
<d2l-button slot="footer" data-dialog-action>Cancel</d2l-button>
|
|
348
|
-
</d2l-dialog>
|
|
349
|
-
<script>
|
|
350
|
-
document.querySelector('#noScroll').addEventListener('change', async(e) => {
|
|
351
|
-
const dialog = document.querySelector('#noScrollDialog');
|
|
352
|
-
dialog.noContentScroll = true;
|
|
353
|
-
const display = e.target.checked ? 'block' : 'none';
|
|
354
|
-
dialog.querySelector('#p2').style.display = display;
|
|
355
|
-
dialog.querySelector('#p3').style.display = display;
|
|
356
|
-
await dialog.resize();
|
|
357
|
-
dialog.noContentScroll = false;
|
|
358
|
-
});
|
|
359
|
-
document.querySelector('#openNoScrollDialog').addEventListener('click', () => {
|
|
360
|
-
document.querySelector('#noScrollDialog').opened = true;
|
|
361
|
-
});
|
|
362
|
-
</script>
|
|
363
|
-
</template>
|
|
364
|
-
</d2l-demo-snippet>
|
|
365
|
-
|
|
366
|
-
<h2>Simple dialog with longer loading content</h2>
|
|
367
|
-
|
|
368
|
-
<d2l-demo-snippet>
|
|
369
|
-
<template>
|
|
370
|
-
<d2l-button>Show Dialog</d2l-button>
|
|
371
|
-
<d2l-dialog title-text="Fullscreen Title">
|
|
372
|
-
</d2l-dialog>
|
|
373
|
-
<d2l-dropdown style="display: none; padding: 30px;">
|
|
374
|
-
<button class="d2l-dropdown-opener">Open!</button>
|
|
375
|
-
<d2l-dropdown-content>
|
|
376
|
-
<a href=" " style="display: block;">A Link</a>
|
|
377
|
-
Some content... Click me!
|
|
378
|
-
</d2l-dropdown-content>
|
|
379
|
-
</d2l-dropdown>
|
|
380
|
-
|
|
381
|
-
<script>
|
|
382
|
-
(demo => {
|
|
383
|
-
demo.querySelector('d2l-button').addEventListener('click', () => {
|
|
384
|
-
demo.querySelector('d2l-dialog').opened = true;
|
|
385
|
-
setTimeout(() => {
|
|
386
|
-
demo.querySelector('d2l-dropdown').style.display = 'block';
|
|
387
|
-
demo.querySelector('d2l-dialog').appendChild(demo.querySelector('d2l-dropdown'));
|
|
388
|
-
demo.querySelector('d2l-dialog').resize();
|
|
389
|
-
}, 1000);
|
|
390
|
-
});
|
|
391
|
-
})(document.currentScript.parentNode);
|
|
392
|
-
</script>
|
|
393
|
-
</template>
|
|
394
|
-
</d2l-demo-snippet>
|
|
395
|
-
|
|
396
|
-
</d2l-demo-page>
|
|
397
|
-
</body>
|
|
398
|
-
</html>
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
6
|
-
<meta charset="UTF-8">
|
|
7
|
-
<link rel="stylesheet" href="../../demo/styles.css" type="text/css">
|
|
8
|
-
<script type="module">
|
|
9
|
-
import '../../demo/demo-page.js';
|
|
10
|
-
import '../dropdown-button.js';
|
|
11
|
-
import '../dropdown-button-subtle.js';
|
|
12
|
-
import '../dropdown-content.js';
|
|
13
|
-
</script>
|
|
14
|
-
</head>
|
|
15
|
-
|
|
16
|
-
<body unresolved>
|
|
17
|
-
|
|
18
|
-
<d2l-demo-page page-title="d2l-dropdown-button">
|
|
19
|
-
|
|
20
|
-
<h2>Dropdown Button Opener</h2>
|
|
21
|
-
<d2l-demo-snippet>
|
|
22
|
-
<template>
|
|
23
|
-
<d2l-dropdown-button text="Open!">
|
|
24
|
-
<d2l-dropdown-content max-width="400">
|
|
25
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
26
|
-
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
|
|
27
|
-
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
28
|
-
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
29
|
-
anim id est laborum.</p>
|
|
30
|
-
<a href="http://www.desire2learn.com">D2L</a>
|
|
31
|
-
</d2l-dropdown-content>
|
|
32
|
-
</d2l-dropdown-button>
|
|
33
|
-
</template>
|
|
34
|
-
</d2l-demo-snippet>
|
|
35
|
-
|
|
36
|
-
<h2>Dropdown Primary Button Opener</h2>
|
|
37
|
-
<d2l-demo-snippet>
|
|
38
|
-
<template>
|
|
39
|
-
<d2l-dropdown-button text="Open!" primary>
|
|
40
|
-
<d2l-dropdown-content max-width="400">
|
|
41
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
42
|
-
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
|
|
43
|
-
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
44
|
-
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
45
|
-
anim id est laborum.</p>
|
|
46
|
-
<a href="http://www.desire2learn.com">D2L</a>
|
|
47
|
-
</d2l-dropdown-content>
|
|
48
|
-
</d2l-dropdown-button>
|
|
49
|
-
</template>
|
|
50
|
-
</d2l-demo-snippet>
|
|
51
|
-
|
|
52
|
-
<h2>Dropdown Subtle Button Opener</h2>
|
|
53
|
-
<d2l-demo-snippet>
|
|
54
|
-
<template>
|
|
55
|
-
<d2l-dropdown-button-subtle text="Open!">
|
|
56
|
-
<d2l-dropdown-content max-width="400">
|
|
57
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
58
|
-
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
|
|
59
|
-
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
60
|
-
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
61
|
-
anim id est laborum.</p>
|
|
62
|
-
<a href="http://www.desire2learn.com">D2L</a>
|
|
63
|
-
</d2l-dropdown-content>
|
|
64
|
-
</d2l-dropdown-button-subtle>
|
|
65
|
-
</template>
|
|
66
|
-
</d2l-demo-snippet>
|
|
67
|
-
|
|
68
|
-
<h2>Dropdown Button Opener (open-on-hover Option)</h2>
|
|
69
|
-
<d2l-demo-snippet>
|
|
70
|
-
<template>
|
|
71
|
-
<d2l-dropdown-button text="Open!" open-on-hover>
|
|
72
|
-
<d2l-dropdown-content mobile-tray="right">
|
|
73
|
-
<div slot="header">
|
|
74
|
-
<h3>Scrolling is Fun</h3>
|
|
75
|
-
</div>
|
|
76
|
-
<a href="https://youtu.be/9ze87zQFSak">Google</a>
|
|
77
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
|
|
78
|
-
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
|
|
79
|
-
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
|
|
80
|
-
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
|
|
81
|
-
anim id est laborum.Vestibulum vel sem non orci pretium fringilla sed eget augue. Vestibulum malesuada tortor
|
|
82
|
-
vitae odio elementum eleifend. Quisque ligula quam, ornare id malesuada ut, malesuada eleifend sem. Nulla porta
|
|
83
|
-
in arcu quis gravida. Duis ac sagittis felis, in condimentum libero. In dolor risus, semper vel iaculis vitae,
|
|
84
|
-
pellentesque efficitur lorem. Nunc a lacus malesuada, rhoncus risus aliquam, sodales nulla. Sed in varius elit.
|
|
85
|
-
Duis sagittis, turpis ut vehicula elementum, velit mi tincidunt turpis, sit amet sagittis quam urna ut justo.
|
|
86
|
-
Nunc interdum urna augue, ac pretium dui pulvinar eu. Proin vehicula placerat est, sed venenatis purus viverra
|
|
87
|
-
eget. Suspendisse imperdiet nulla eget velit sodales, sit amet tempus metus dignissim. Sed ac luctus leo, a
|
|
88
|
-
ornare nisl. Proin non sapien eu orci gravida aliquam. Praesent placerat auctor lacus sit amet faucibus.
|
|
89
|
-
Suspendisse sit amet dui sed turpis vestibulum dignissim.</p>
|
|
90
|
-
<div slot="footer">
|
|
91
|
-
<a href="http://www.desire2learn.com">D2L</a>
|
|
92
|
-
</div>
|
|
93
|
-
</d2l-dropdown-content>
|
|
94
|
-
</d2l-dropdown-button>
|
|
95
|
-
</template>
|
|
96
|
-
</d2l-demo-snippet>
|
|
97
|
-
|
|
98
|
-
</d2l-demo-page>
|
|
99
|
-
|
|
100
|
-
</body>
|
|
101
|
-
|
|
102
|
-
</html>
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
|
|
6
|
-
<meta charset="UTF-8">
|
|
7
|
-
<link rel="stylesheet" href="../../demo/styles.css" type="text/css">
|
|
8
|
-
<script type="module">
|
|
9
|
-
import '../../demo/demo-page.js';
|
|
10
|
-
import '../dropdown-context-menu.js';
|
|
11
|
-
import '../dropdown-content.js';
|
|
12
|
-
</script>
|
|
13
|
-
<style>
|
|
14
|
-
.ancestor-container {
|
|
15
|
-
padding: 0.5rem;
|
|
16
|
-
position: relative;
|
|
17
|
-
}
|
|
18
|
-
.ancestor-container::before {
|
|
19
|
-
background-color: rgba(0, 0, 0, 0.03);
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
content: "visible-on-ancestor-target";
|
|
22
|
-
font-size: 0.7rem;
|
|
23
|
-
height: 100%;
|
|
24
|
-
left: 0;
|
|
25
|
-
padding: 0.5rem;
|
|
26
|
-
position: absolute;
|
|
27
|
-
text-align: right;
|
|
28
|
-
top: 0;
|
|
29
|
-
width: 100%;
|
|
30
|
-
}
|
|
31
|
-
.translucent-container {
|
|
32
|
-
height: 150px;
|
|
33
|
-
position: relative;
|
|
34
|
-
}
|
|
35
|
-
.translucent-container > img {
|
|
36
|
-
border-radius: 6px;
|
|
37
|
-
height: 100%;
|
|
38
|
-
max-width: 400px;
|
|
39
|
-
position: absolute;
|
|
40
|
-
width: 100%;
|
|
41
|
-
}
|
|
42
|
-
.translucent-container > d2l-dropdown-context-menu {
|
|
43
|
-
margin-left: 12px;
|
|
44
|
-
margin-top: 12px;
|
|
45
|
-
padding-right: 0;
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
48
|
-
</head>
|
|
49
|
-
|
|
50
|
-
<body unresolved>
|
|
51
|
-
|
|
52
|
-
<d2l-demo-page page-title="d2l-dropdown-context-menu">
|
|
53
|
-
|
|
54
|
-
<h2>Normal</h2>
|
|
55
|
-
<d2l-demo-snippet>
|
|
56
|
-
<template>
|
|
57
|
-
<d2l-dropdown-context-menu text="Open!">
|
|
58
|
-
<d2l-dropdown-content max-width="400">
|
|
59
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
60
|
-
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
|
|
61
|
-
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
|
|
62
|
-
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
|
|
63
|
-
deserunt mollit anim id est laborum.</p>
|
|
64
|
-
<a href="http://www.desire2learn.com">D2L</a>
|
|
65
|
-
</d2l-dropdown-content>
|
|
66
|
-
</d2l-dropdown-context-menu>
|
|
67
|
-
</template>
|
|
68
|
-
</d2l-demo-snippet>
|
|
69
|
-
|
|
70
|
-
<h2>Translucent</h2>
|
|
71
|
-
<d2l-demo-snippet>
|
|
72
|
-
<template>
|
|
73
|
-
<d2l-dropdown-context-menu text="Open!" translucent>
|
|
74
|
-
<d2l-dropdown-content max-width="400">
|
|
75
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
|
|
76
|
-
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
|
77
|
-
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
78
|
-
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
|
79
|
-
culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
80
|
-
<a href="http://www.desire2learn.com">D2L</a>
|
|
81
|
-
</d2l-dropdown-content>
|
|
82
|
-
</d2l-dropdown-context-menu>
|
|
83
|
-
</template>
|
|
84
|
-
</d2l-demo-snippet>
|
|
85
|
-
|
|
86
|
-
<h2>Visible on Ancestor</h2>
|
|
87
|
-
<d2l-demo-snippet>
|
|
88
|
-
<template>
|
|
89
|
-
<div class="ancestor-container d2l-visible-on-ancestor-target">
|
|
90
|
-
<d2l-dropdown-context-menu text="Open!" visible-on-ancestor>
|
|
91
|
-
<d2l-dropdown-content max-width="400">
|
|
92
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
|
|
93
|
-
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
|
94
|
-
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
95
|
-
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
|
96
|
-
culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
97
|
-
<a href="http://www.desire2learn.com">D2L</a>
|
|
98
|
-
</d2l-dropdown-content>
|
|
99
|
-
</d2l-dropdown-context-menu>
|
|
100
|
-
</div>
|
|
101
|
-
</template>
|
|
102
|
-
</d2l-demo-snippet>
|
|
103
|
-
|
|
104
|
-
<h2>Translucent + Visible on Ancestor</h2>
|
|
105
|
-
<d2l-demo-snippet>
|
|
106
|
-
<template>
|
|
107
|
-
<div class="translucent-container d2l-visible-on-ancestor-target">
|
|
108
|
-
<img alt="" src="https://s.brightspace.com/course-images/images/e4fbb461-4cd9-4512-8304-44f2c2b741f1/tile-low-density-max-size.jpg">
|
|
109
|
-
<d2l-dropdown-context-menu text="Open!" translucent visible-on-ancestor>
|
|
110
|
-
<d2l-dropdown-content max-width="400">
|
|
111
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
|
|
112
|
-
labore
|
|
113
|
-
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
|
|
114
|
-
ut
|
|
115
|
-
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
|
116
|
-
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
|
117
|
-
culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
118
|
-
<a href="http://www.desire2learn.com">D2L</a>
|
|
119
|
-
</d2l-dropdown-content>
|
|
120
|
-
</d2l-dropdown-context-menu>
|
|
121
|
-
</div>
|
|
122
|
-
</template>
|
|
123
|
-
</d2l-demo-snippet>
|
|
124
|
-
|
|
125
|
-
</d2l-demo-page>
|
|
126
|
-
|
|
127
|
-
</body>
|
|
128
|
-
|
|
129
|
-
</html>
|