@brightspace-ui/core 3.227.3 → 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/colors/colors.js +8 -0
- package/components/count-badge/count-badge-icon.js +1 -1
- package/components/count-badge/count-badge-mixin.js +4 -4
- 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,67 +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 type="module">
|
|
8
|
-
import '../../demo/demo-page.js';
|
|
9
|
-
import '../button.js';
|
|
10
|
-
</script>
|
|
11
|
-
</head>
|
|
12
|
-
<body unresolved>
|
|
13
|
-
|
|
14
|
-
<d2l-demo-page page-title="d2l-button">
|
|
15
|
-
|
|
16
|
-
<h2>Button</h2>
|
|
17
|
-
|
|
18
|
-
<d2l-demo-snippet>
|
|
19
|
-
<template>
|
|
20
|
-
<d2l-button>Normal Button</d2l-button>
|
|
21
|
-
</template>
|
|
22
|
-
</d2l-demo-snippet>
|
|
23
|
-
|
|
24
|
-
<h2>Button (Primary)</h2>
|
|
25
|
-
|
|
26
|
-
<d2l-demo-snippet>
|
|
27
|
-
<template>
|
|
28
|
-
<d2l-button primary>Primary Button</d2l-button>
|
|
29
|
-
</template>
|
|
30
|
-
</d2l-demo-snippet>
|
|
31
|
-
|
|
32
|
-
<h2>Button (Disabled)</h2>
|
|
33
|
-
|
|
34
|
-
<d2l-demo-snippet>
|
|
35
|
-
<template>
|
|
36
|
-
<d2l-button disabled>Disabled Button</d2l-button>
|
|
37
|
-
</template>
|
|
38
|
-
</d2l-demo-snippet>
|
|
39
|
-
|
|
40
|
-
<h2>Button (Disabled with Tooltip)</h2>
|
|
41
|
-
|
|
42
|
-
<d2l-demo-snippet>
|
|
43
|
-
<template>
|
|
44
|
-
<d2l-button disabled disabled-tooltip="Optional disabled tooltip">Normal Button</d2l-button>
|
|
45
|
-
</template>
|
|
46
|
-
</d2l-demo-snippet>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<h2>Button (Primary and Disabled)</h2>
|
|
50
|
-
|
|
51
|
-
<d2l-demo-snippet>
|
|
52
|
-
<template>
|
|
53
|
-
<d2l-button disabled primary>Disabled Primary Button</d2l-button>
|
|
54
|
-
</template>
|
|
55
|
-
</d2l-demo-snippet>
|
|
56
|
-
|
|
57
|
-
</d2l-demo-page>
|
|
58
|
-
|
|
59
|
-
<script>
|
|
60
|
-
document.addEventListener('click', e => {
|
|
61
|
-
if (e.target.tagName !== 'D2L-BUTTON') return;
|
|
62
|
-
console.log('button clicked', e.target);
|
|
63
|
-
});
|
|
64
|
-
</script>
|
|
65
|
-
|
|
66
|
-
</body>
|
|
67
|
-
</html>
|
|
@@ -1,44 +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 type="module">
|
|
8
|
-
import '../../demo/demo-page.js';
|
|
9
|
-
</script>
|
|
10
|
-
<style>
|
|
11
|
-
#demoContainer {
|
|
12
|
-
display: inline-block;
|
|
13
|
-
min-height: 200px;
|
|
14
|
-
width: 100%;
|
|
15
|
-
}
|
|
16
|
-
#leftFrame {
|
|
17
|
-
float: left;
|
|
18
|
-
height: 505px;
|
|
19
|
-
min-height: 200px;
|
|
20
|
-
overflow: auto;
|
|
21
|
-
resize: both;
|
|
22
|
-
width: 30%;
|
|
23
|
-
}
|
|
24
|
-
#rightFrame {
|
|
25
|
-
float: left;
|
|
26
|
-
height: 505px;
|
|
27
|
-
min-height: 200px;
|
|
28
|
-
overflow: auto;
|
|
29
|
-
resize: both;
|
|
30
|
-
width: 65%;
|
|
31
|
-
}
|
|
32
|
-
</style>
|
|
33
|
-
</head>
|
|
34
|
-
<body unresolved>
|
|
35
|
-
<d2l-demo-page page-title="d2l-floating-buttons">
|
|
36
|
-
<h2>Floating Buttons in a frame</h2>
|
|
37
|
-
<p>(frames are resizable)</p>
|
|
38
|
-
<div id="demoContainer">
|
|
39
|
-
<iframe id="leftFrame" src="./floating-buttons-page.html"></iframe>
|
|
40
|
-
<iframe id="rightFrame" src="./floating-buttons-in-tabs.html"></iframe>
|
|
41
|
-
</div>
|
|
42
|
-
</d2l-demo-page>
|
|
43
|
-
</body>
|
|
44
|
-
</html>
|
|
@@ -1,244 +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 type="module">
|
|
8
|
-
import '../../demo/demo-page.js';
|
|
9
|
-
import '../button.js';
|
|
10
|
-
import '../floating-buttons.js';
|
|
11
|
-
</script>
|
|
12
|
-
<style>
|
|
13
|
-
/* ripping these off for now until we can get a local tabs menu to test this on. */
|
|
14
|
-
.vui-tabmenu {
|
|
15
|
-
border-bottom: 1px solid #dddddd;
|
|
16
|
-
list-style: none;
|
|
17
|
-
margin-bottom: 0;
|
|
18
|
-
margin-top: 0;
|
|
19
|
-
padding-left: 0;
|
|
20
|
-
}
|
|
21
|
-
.vui-tabmenu::after, .vui-tabmenu::before {
|
|
22
|
-
content: " ";
|
|
23
|
-
display: table;
|
|
24
|
-
}
|
|
25
|
-
.vui-tabmenu::after {
|
|
26
|
-
clear: both;
|
|
27
|
-
}
|
|
28
|
-
.vui-tabmenu > .vui-tabmenu-item {
|
|
29
|
-
display: block;
|
|
30
|
-
float: left;
|
|
31
|
-
margin-bottom: -1px;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
position: relative;
|
|
34
|
-
text-align: center;
|
|
35
|
-
}
|
|
36
|
-
.vui-tabmenu > .vui-tabmenu-item > a {
|
|
37
|
-
border: 1px solid transparent;
|
|
38
|
-
color: #a2a2a2;
|
|
39
|
-
display: block;
|
|
40
|
-
line-height: 1.428571429;
|
|
41
|
-
margin-right: 2px;
|
|
42
|
-
padding: 10px 15px;
|
|
43
|
-
position: relative;
|
|
44
|
-
}
|
|
45
|
-
.vui-tabmenu > .vui-tabmenu-item:last-child > a {
|
|
46
|
-
margin-right: 0;
|
|
47
|
-
}
|
|
48
|
-
.vui-tabmenu > .vui-tabmenu-item > a:hover {
|
|
49
|
-
color: #666666;
|
|
50
|
-
}
|
|
51
|
-
.vui-tabmenu > .vui-tabmenu-item-select > a {
|
|
52
|
-
background-color: #fafafa;
|
|
53
|
-
border: 1px solid #dddddd;
|
|
54
|
-
border-bottom-color: transparent;
|
|
55
|
-
color: #666666;
|
|
56
|
-
cursor: default;
|
|
57
|
-
font-weight: bold;
|
|
58
|
-
}
|
|
59
|
-
.vui-tabmenu > .vui-tabmenu-item > a > .vui-tabmenu-item-blue {
|
|
60
|
-
background-color: #bababa;
|
|
61
|
-
display: block;
|
|
62
|
-
height: 16px;
|
|
63
|
-
position: absolute;
|
|
64
|
-
right: -3px;
|
|
65
|
-
top: 10px;
|
|
66
|
-
width: 1px;
|
|
67
|
-
}
|
|
68
|
-
.vui-tabmenu > .vui-tabmenu-item-select-prev > a > .vui-tabmenu-item-blue,
|
|
69
|
-
.vui-tabmenu > .vui-tabmenu-item:last-child > a > .vui-tabmenu-item-blue {
|
|
70
|
-
display: none;
|
|
71
|
-
}
|
|
72
|
-
.vui-tabmenu > .vui-tabmenu-item-select:last-child > a > .vui-tabmenu-item-blue,
|
|
73
|
-
.vui-tabmenu > .vui-tabmenu-item-select > a > .vui-tabmenu-item-blue {
|
|
74
|
-
background-color: #00617f;
|
|
75
|
-
border: 1px solid #00617f;
|
|
76
|
-
display: block;
|
|
77
|
-
height: 2px;
|
|
78
|
-
left: -1px;
|
|
79
|
-
position: absolute;
|
|
80
|
-
top: -1px;
|
|
81
|
-
width: 100%;
|
|
82
|
-
}
|
|
83
|
-
[dir="rtl"] .vui-tabmenu > .vui-tabmenu-item-select:last-child > a > .vui-tabmenu-item-blue,
|
|
84
|
-
[dir="rtl"] .vui-tabmenu > .vui-tabmenu-item-select > a > .vui-tabmenu-item-blue {
|
|
85
|
-
right: -1px;
|
|
86
|
-
}
|
|
87
|
-
.d2l-textblock {
|
|
88
|
-
margin-bottom: 0;
|
|
89
|
-
overflow-wrap: break-word;
|
|
90
|
-
}
|
|
91
|
-
.d2l-hidden {
|
|
92
|
-
display: none !important;
|
|
93
|
-
}
|
|
94
|
-
</style>
|
|
95
|
-
</head>
|
|
96
|
-
<body unresolved>
|
|
97
|
-
<d2l-demo-page page-title="d2l-floating-buttons">
|
|
98
|
-
<h2>Floating Buttons In a Tab Menu</h2>
|
|
99
|
-
<ul class="vui-tabmenu" role="tablist" id="TabMenu">
|
|
100
|
-
<li class="vui-tabmenu-item vui-tabmenu-item-select" role="presentation" style="width: 50%;">
|
|
101
|
-
<a id="TabOne" href="javascript:void(0);" role="tab" aria-selected="true" tabindex="-1">
|
|
102
|
-
Coffee<span class="vui-tabmenu-item-blue">
|
|
103
|
-
</span>
|
|
104
|
-
</a>
|
|
105
|
-
</li>
|
|
106
|
-
<li class="vui-tabmenu-item vui-tabmenu-item-select-next" role="presentation" style="width: 50%;">
|
|
107
|
-
<a id="TabTwo" href="javascript:void(0);" role="tab" aria-selected="false" tabindex="0">
|
|
108
|
-
Tea<span class="vui-tabmenu-item-blue">
|
|
109
|
-
</span>
|
|
110
|
-
</a>
|
|
111
|
-
</li>
|
|
112
|
-
</ul>
|
|
113
|
-
|
|
114
|
-
<div class="" id="CtnOne">
|
|
115
|
-
<div class="d2l-textblock">
|
|
116
|
-
<br>
|
|
117
|
-
<d2l-code-view id="demo-codeview1" language="html" hide-language>
|
|
118
|
-
<textarea><d2l-floating-buttons id="wc-buttons">
|
|
119
|
-
<d2l-button primary id="btn-make-more">Brew more Coffee!</d2l-button>
|
|
120
|
-
</d2l-floating-buttons></textarea>
|
|
121
|
-
</d2l-code-view>
|
|
122
|
-
<br>
|
|
123
|
-
<d2l-button id="btn-remove-floating">Remove Floating Buttons</d2l-button>
|
|
124
|
-
<d2l-button id="btn-append-floating">Append Floating Buttons</d2l-button>
|
|
125
|
-
<br><br>
|
|
126
|
-
<d2l-button id="btn-append-new">Append New Button</d2l-button>
|
|
127
|
-
<d2l-button id="btn-remove-last">Remove Last Button</d2l-button>
|
|
128
|
-
<br><br>
|
|
129
|
-
<d2l-button id="btn-insert-content-above">Insert Content</d2l-button>
|
|
130
|
-
<d2l-button id="btn-remove-content-above">Remove Content</d2l-button>
|
|
131
|
-
<br><br>
|
|
132
|
-
<div class="content">
|
|
133
|
-
<p>I love Coffee!</p>
|
|
134
|
-
</div>
|
|
135
|
-
<d2l-floating-buttons id="wc-buttons-coffee">
|
|
136
|
-
<d2l-button primary id="btn-make-more-coffee">Brew more Coffee!</d2l-button>
|
|
137
|
-
</d2l-floating-buttons>
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
|
|
141
|
-
<div id="CtnTwo" class="d2l-hidden">
|
|
142
|
-
<br>
|
|
143
|
-
<d2l-code-view language="html" hide-language>
|
|
144
|
-
<textarea><d2l-floating-buttons id="wc-buttons">
|
|
145
|
-
<d2l-button primary id="btn-make-more">Brew more Tea!</d2l-button>
|
|
146
|
-
</d2l-floating-buttons></textarea>
|
|
147
|
-
</d2l-code-view>
|
|
148
|
-
|
|
149
|
-
<div class="content">
|
|
150
|
-
<p>I love Tea!</p>
|
|
151
|
-
<div style="height: 300px; width: 100px;"></div>
|
|
152
|
-
</div>
|
|
153
|
-
<d2l-floating-buttons id="wc-buttons-tea">
|
|
154
|
-
<d2l-button primary id="btn-make-more-tea">Brew more Tea!</d2l-button>
|
|
155
|
-
</d2l-floating-buttons>
|
|
156
|
-
</div>
|
|
157
|
-
</d2l-demo-page>
|
|
158
|
-
|
|
159
|
-
<script type="module">
|
|
160
|
-
/* faux tabbing functionality */
|
|
161
|
-
const tabOne = document.getElementById('TabOne').parentNode;
|
|
162
|
-
const ctnOne = document.getElementById('CtnOne');
|
|
163
|
-
const tabTwo = document.getElementById('TabTwo').parentNode;
|
|
164
|
-
const ctnTwo = document.getElementById('CtnTwo');
|
|
165
|
-
tabOne.addEventListener('click', () => {
|
|
166
|
-
tabOne.classList.add('vui-tabmenu-item-select');
|
|
167
|
-
tabOne.classList.remove('vui-tabmenu-item-select-prev');
|
|
168
|
-
ctnOne.classList.remove('d2l-hidden');
|
|
169
|
-
tabTwo.classList.remove('vui-tabmenu-item-select');
|
|
170
|
-
tabTwo.classList.add('vui-tabmenu-item-select-next');
|
|
171
|
-
ctnTwo.classList.add('d2l-hidden');
|
|
172
|
-
|
|
173
|
-
tabOne.dispatchEvent(new CustomEvent(
|
|
174
|
-
'd2l-tab-panel-selected', { bubbles: true, composed: true }
|
|
175
|
-
));
|
|
176
|
-
});
|
|
177
|
-
tabTwo.addEventListener('click', () => {
|
|
178
|
-
tabOne.classList.add('vui-tabmenu-item-select-prev');
|
|
179
|
-
tabOne.classList.remove('vui-tabmenu-item-select');
|
|
180
|
-
ctnOne.classList.add('d2l-hidden');
|
|
181
|
-
tabTwo.classList.remove('vui-tabmenu-item-select-next');
|
|
182
|
-
tabTwo.classList.add('vui-tabmenu-item-select');
|
|
183
|
-
ctnTwo.classList.remove('d2l-hidden');
|
|
184
|
-
|
|
185
|
-
tabTwo.dispatchEvent(new CustomEvent(
|
|
186
|
-
'd2l-tab-panel-selected', { bubbles: true, composed: true }
|
|
187
|
-
));
|
|
188
|
-
});
|
|
189
|
-
/* end: faux tabbing functionality */
|
|
190
|
-
let page_buttonCount = 0;
|
|
191
|
-
let page_floatingButtons;
|
|
192
|
-
function appendButton(beverage) {
|
|
193
|
-
const floatingButtons = document.getElementById(`wc-buttons-${beverage}`);
|
|
194
|
-
if (floatingButtons) {
|
|
195
|
-
page_buttonCount += 1;
|
|
196
|
-
const newButton = document.createElement('d2l-button');
|
|
197
|
-
newButton.textContent = `${beverage} #${page_buttonCount}`;
|
|
198
|
-
floatingButtons.appendChild(newButton);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
document.getElementById('btn-append-floating').addEventListener('click', () => {
|
|
202
|
-
const coffeePage = document.querySelector('#CtnOne');
|
|
203
|
-
if (page_floatingButtons) {
|
|
204
|
-
coffeePage.appendChild(page_floatingButtons);
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
document.getElementById('btn-remove-floating').addEventListener('click', () => {
|
|
208
|
-
const floatingButtons = document.getElementById('wc-buttons-coffee');
|
|
209
|
-
if (floatingButtons) {
|
|
210
|
-
page_floatingButtons = floatingButtons;
|
|
211
|
-
floatingButtons.parentNode.removeChild(floatingButtons);
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
document.getElementById('btn-append-new').addEventListener('click', () => {
|
|
215
|
-
appendButton('coffee');
|
|
216
|
-
});
|
|
217
|
-
document.getElementById('btn-remove-last').addEventListener('click', () => {
|
|
218
|
-
const floatingButtons = document.getElementById('wc-buttons-coffee');
|
|
219
|
-
if (floatingButtons.lastChild) {
|
|
220
|
-
floatingButtons.removeChild(
|
|
221
|
-
floatingButtons.lastChild
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
document.getElementById('btn-insert-content-above').addEventListener('click', () => {
|
|
226
|
-
const newContent = document.createElement('p');
|
|
227
|
-
newContent.textContent = 'I love Coffee!';
|
|
228
|
-
document.body.querySelector('.content').appendChild(newContent);
|
|
229
|
-
});
|
|
230
|
-
document.getElementById('btn-remove-content-above').addEventListener('click', () => {
|
|
231
|
-
const content = document.body.querySelector('.content');
|
|
232
|
-
if (content.lastChild) {
|
|
233
|
-
content.removeChild(content.lastChild);
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
document.getElementById('btn-make-more-coffee').addEventListener('click', () => {
|
|
237
|
-
appendButton('coffee');
|
|
238
|
-
});
|
|
239
|
-
document.getElementById('btn-make-more-tea').addEventListener('click', () => {
|
|
240
|
-
appendButton('tea');
|
|
241
|
-
});
|
|
242
|
-
</script>
|
|
243
|
-
</body>
|
|
244
|
-
</html>
|
|
@@ -1,100 +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 type="module">
|
|
8
|
-
import '../../demo/demo-page.js';
|
|
9
|
-
import '../button.js';
|
|
10
|
-
import '../floating-buttons.js';
|
|
11
|
-
</script>
|
|
12
|
-
</head>
|
|
13
|
-
<body unresolved>
|
|
14
|
-
<d2l-demo-page page-title="d2l-floating-buttons">
|
|
15
|
-
|
|
16
|
-
<h2>Floating Buttons (page)</h2>
|
|
17
|
-
<d2l-button id="btn-remove-floating">Remove Floating Buttons</d2l-button>
|
|
18
|
-
<d2l-button id="btn-append-floating">Append Floating Buttons</d2l-button>
|
|
19
|
-
<br><br>
|
|
20
|
-
<d2l-button id="btn-append-new">Append New Button</d2l-button>
|
|
21
|
-
<d2l-button id="btn-remove-last">Remove Last Button</d2l-button>
|
|
22
|
-
<br><br>
|
|
23
|
-
<d2l-button id="btn-insert-content-above">Insert Content</d2l-button>
|
|
24
|
-
<d2l-button id="btn-remove-content-above">Remove Content</d2l-button>
|
|
25
|
-
<br><br>
|
|
26
|
-
<d2l-button id="btn-always-float">Toggle always-float</d2l-button>
|
|
27
|
-
<br><br>
|
|
28
|
-
<div class="content">
|
|
29
|
-
<p>I love Coffee!</p>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<d2l-floating-buttons id="wc-buttons">
|
|
33
|
-
<d2l-button primary id="btn-make-more">Brew more Coffee!</d2l-button>
|
|
34
|
-
</d2l-floating-buttons>
|
|
35
|
-
</d2l-demo-page>
|
|
36
|
-
|
|
37
|
-
<script type="module">
|
|
38
|
-
let page_buttonCount = 0;
|
|
39
|
-
let page_floatingButtons;
|
|
40
|
-
function appendButton() {
|
|
41
|
-
const floatingButtons = document.getElementById('wc-buttons');
|
|
42
|
-
if (floatingButtons) {
|
|
43
|
-
page_buttonCount += 1;
|
|
44
|
-
const newButton = document.createElement('d2l-button');
|
|
45
|
-
newButton.textContent = `Coffee #${page_buttonCount}`;
|
|
46
|
-
floatingButtons.appendChild(newButton);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
document.getElementById('btn-append-floating').addEventListener('click', () => {
|
|
51
|
-
const demoPage = document.body.querySelector('d2l-demo-page');
|
|
52
|
-
if (page_floatingButtons) {
|
|
53
|
-
demoPage.appendChild(page_floatingButtons);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
document.getElementById('btn-remove-floating').addEventListener('click', () => {
|
|
58
|
-
const floatingButtons = document.getElementById('wc-buttons');
|
|
59
|
-
if (floatingButtons) {
|
|
60
|
-
page_floatingButtons = floatingButtons;
|
|
61
|
-
floatingButtons.parentNode.removeChild(floatingButtons);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
document.getElementById('btn-append-new').addEventListener('click', appendButton);
|
|
66
|
-
document.getElementById('btn-remove-last').addEventListener('click', () => {
|
|
67
|
-
const floatingButtons = document.getElementById('wc-buttons');
|
|
68
|
-
if (floatingButtons.lastChild) {
|
|
69
|
-
floatingButtons.removeChild(
|
|
70
|
-
floatingButtons.lastChild
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
document.getElementById('btn-insert-content-above').addEventListener('click', () => {
|
|
75
|
-
const newContent = document.createElement('p');
|
|
76
|
-
newContent.textContent = 'I love Coffee!';
|
|
77
|
-
document.body.querySelector('.content').appendChild(newContent);
|
|
78
|
-
});
|
|
79
|
-
document.getElementById('btn-remove-content-above').addEventListener('click', () => {
|
|
80
|
-
const content = document.body.querySelector('.content');
|
|
81
|
-
if (content.lastChild) {
|
|
82
|
-
content.removeChild(content.lastChild);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
document.getElementById('btn-make-more').addEventListener('click', () => {
|
|
87
|
-
appendButton();
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
document.getElementById('btn-always-float').addEventListener('click', () => {
|
|
91
|
-
const floatingButtons = document.getElementById('wc-buttons');
|
|
92
|
-
if (floatingButtons.hasAttribute('always-float')) {
|
|
93
|
-
floatingButtons.removeAttribute('always-float');
|
|
94
|
-
} else {
|
|
95
|
-
floatingButtons.setAttribute('always-float', true);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
</script>
|
|
99
|
-
</body>
|
|
100
|
-
</html>
|
|
@@ -1,101 +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 type="module">
|
|
8
|
-
import '../../demo/demo-page.js';
|
|
9
|
-
import '../button.js';
|
|
10
|
-
import '../floating-buttons.js';
|
|
11
|
-
</script>
|
|
12
|
-
</head>
|
|
13
|
-
<body unresolved>
|
|
14
|
-
<d2l-demo-page page-title="d2l-floating-buttons">
|
|
15
|
-
|
|
16
|
-
<h2>Floating Buttons</h2>
|
|
17
|
-
<d2l-button id="btn-remove-floating">Remove Floating Buttons</d2l-button>
|
|
18
|
-
<d2l-button id="btn-append-floating">Append Floating Buttons</d2l-button>
|
|
19
|
-
<br><br>
|
|
20
|
-
<d2l-button id="btn-append-new">Append New Button</d2l-button>
|
|
21
|
-
<d2l-button id="btn-remove-last">Remove Last Button</d2l-button>
|
|
22
|
-
<br><br>
|
|
23
|
-
<d2l-button id="btn-insert-content-above">Insert Content</d2l-button>
|
|
24
|
-
<d2l-button id="btn-remove-content-above">Remove Content</d2l-button>
|
|
25
|
-
<br><br>
|
|
26
|
-
<d2l-demo-snippet id="snippet-floating-buttons">
|
|
27
|
-
<div class="content">
|
|
28
|
-
<p>I love Coffee!</p>
|
|
29
|
-
</div>
|
|
30
|
-
<d2l-floating-buttons id="wc-buttons">
|
|
31
|
-
<d2l-button primary id="btn-make-more">Brew more Coffee!</d2l-button>
|
|
32
|
-
</d2l-floating-buttons>
|
|
33
|
-
</d2l-demo-snippet>
|
|
34
|
-
|
|
35
|
-
<h2>Floating Buttons (alwaysFloat)</h2>
|
|
36
|
-
<d2l-demo-snippet>
|
|
37
|
-
<p>
|
|
38
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci repellat cum totam! Enim, sunt. Numquam voluptate, velit quisquam ipsa molestias laudantium odit reiciendis nisi corporis voluptatibus, voluptatum sunt natus, accusantium magnam consequatur fugit officiis minima voluptatem consequuntur nam, earum necessitatibus! Cupiditate ullam repellendus, eius iure voluptas at commodi consectetur, quia, adipisci possimus, ex mollitia. Labore harum error consectetur officiis aut optio, temporibus iste nobis ducimus cumque laudantium rem pariatur. Ut repudiandae id, consequuntur quasi quis pariatur autem corporis perferendis facilis eius similique voluptatibus iusto deleniti odio officia numquam tenetur excepturi, aspernatur sunt minima aut fugiat ipsam. Ea nesciunt, amet fugit facere similique dolor nam tempora perferendis aut fugiat non, ex pariatur excepturi odio aspernatur libero saepe ducimus rem magni cumque. Laboriosam nisi fuga accusantium quos qui? Maiores ratione aliquam eos odio eius molestiae nesciunt exercitationem dolor perspiciatis quam. Necessitatibus rem nihil ad culpa, tenetur iusto consectetur rerum, delectus neque? Error, quas, eaque! Quibusdam voluptas expedita possimus consequatur accusantium distinctio, esse quisquam, ipsa blanditiis, officia perferendis et? Iste, nam optio vero earum tenetur voluptatibus modi a, odit aliquid eos corporis nulla saepe vel neque voluptate ratione, facilis quo sed nisi voluptates nostrum dolor. Non mollitia dignissimos laudantium quos libero nisi, nobis harum, asperiores soluta reprehenderit doloremque ipsa id unde voluptates beatae deserunt. Minima repellendus ipsam molestias veritatis pariatur nobis nihil, alias quasi, esse, aspernatur saepe beatae, hic consequatur. Sit sequi, libero quisquam quibusdam fuga tempore ab molestiae praesentium, necessitatibus, vero odio ullam qui non totam voluptas reprehenderit ad neque voluptate. Nam atque impedit ducimus, dolore reiciendis delectus inventore beatae cumque. Magni, id quos officiis soluta consequatur nam quis, modi fugit adipisci vel autem dolorum iusto cumque, libero reprehenderit amet doloremque voluptatem sunt sapiente reiciendis omnis, similique nulla enim. Autem repellendus, illo eveniet recusandae quae quibusdam itaque, delectus, consequatur provident vitae vero magnam repudiandae fugit, placeat sapiente! Omnis, possimus natus .
|
|
39
|
-
</p>
|
|
40
|
-
<d2l-floating-buttons always-float>
|
|
41
|
-
<d2l-button primary>Primary Button</d2l-button>
|
|
42
|
-
<d2l-button>Secondary Button</d2l-button>
|
|
43
|
-
</d2l-floating-buttons>
|
|
44
|
-
</d2l-demo-snippet>
|
|
45
|
-
</d2l-demo-page>
|
|
46
|
-
|
|
47
|
-
<script type="module">
|
|
48
|
-
let page_buttonCount = 0;
|
|
49
|
-
let page_floatingButtons;
|
|
50
|
-
function appendButton() {
|
|
51
|
-
const floatingButtons = document.getElementById('wc-buttons');
|
|
52
|
-
if (floatingButtons) {
|
|
53
|
-
page_buttonCount += 1;
|
|
54
|
-
const newButton = document.createElement('d2l-button');
|
|
55
|
-
newButton.textContent = `Coffee #${page_buttonCount}`;
|
|
56
|
-
floatingButtons.appendChild(newButton);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
document.getElementById('btn-append-floating').addEventListener('click', () => {
|
|
61
|
-
const demoSnippet = document.body.querySelector('#snippet-floating-buttons');
|
|
62
|
-
if (page_floatingButtons) {
|
|
63
|
-
demoSnippet.appendChild(page_floatingButtons);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
document.getElementById('btn-remove-floating').addEventListener('click', () => {
|
|
67
|
-
const floatingButtons = document.getElementById('wc-buttons');
|
|
68
|
-
if (floatingButtons) {
|
|
69
|
-
page_floatingButtons = floatingButtons;
|
|
70
|
-
floatingButtons.parentNode.removeChild(floatingButtons);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
document.getElementById('btn-append-new').addEventListener('click', appendButton);
|
|
75
|
-
document.getElementById('btn-remove-last').addEventListener('click', () => {
|
|
76
|
-
const floatingButtons = document.getElementById('wc-buttons');
|
|
77
|
-
if (floatingButtons.lastChild) {
|
|
78
|
-
floatingButtons.removeChild(
|
|
79
|
-
floatingButtons.lastChild
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
document.getElementById('btn-insert-content-above').addEventListener('click', () => {
|
|
85
|
-
const newContent = document.createElement('p');
|
|
86
|
-
newContent.textContent = 'I love Coffee!';
|
|
87
|
-
document.body.querySelector('.content').appendChild(newContent);
|
|
88
|
-
});
|
|
89
|
-
document.getElementById('btn-remove-content-above').addEventListener('click', () => {
|
|
90
|
-
const content = document.body.querySelector('.content');
|
|
91
|
-
if (content.lastChild) {
|
|
92
|
-
content.removeChild(content.lastChild);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
document.getElementById('btn-make-more').addEventListener('click', () => {
|
|
97
|
-
appendButton();
|
|
98
|
-
});
|
|
99
|
-
</script>
|
|
100
|
-
</body>
|
|
101
|
-
</html>
|
|
@@ -1,76 +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 type="module">
|
|
8
|
-
import '../../demo/demo-page.js';
|
|
9
|
-
import '../calendar.js';
|
|
10
|
-
|
|
11
|
-
window._allEvents = [
|
|
12
|
-
{ date: '2024-08-21' },
|
|
13
|
-
{ date: '2024-08-22' },
|
|
14
|
-
{ date: '2024-09-04' },
|
|
15
|
-
{ date: '2024-09-19' },
|
|
16
|
-
{ date: '2024-09-20' },
|
|
17
|
-
{ date: '2024-09-20' },
|
|
18
|
-
{ date: '2024-09-28' },
|
|
19
|
-
{ date: '2024-09-30' },
|
|
20
|
-
{ date: '2024-10-02' },
|
|
21
|
-
{ date: '2024-10-30' },
|
|
22
|
-
{ date: '2024-10-31' },
|
|
23
|
-
{ date: '2024-11-01' },
|
|
24
|
-
{ date: '2024-11-11' }
|
|
25
|
-
];
|
|
26
|
-
</script>
|
|
27
|
-
</head>
|
|
28
|
-
<body unresolved>
|
|
29
|
-
<d2l-demo-page page-title="d2l-calendar">
|
|
30
|
-
|
|
31
|
-
<h2>Calendar (Sept 8 2018 selected)</h2>
|
|
32
|
-
<d2l-demo-snippet>
|
|
33
|
-
<template>
|
|
34
|
-
<d2l-calendar selected-value="2018-09-08"></d2l-calendar>
|
|
35
|
-
</template>
|
|
36
|
-
</d2l-demo-snippet>
|
|
37
|
-
|
|
38
|
-
<h2>Calendar (no selected date)</h2>
|
|
39
|
-
<d2l-demo-snippet>
|
|
40
|
-
<template>
|
|
41
|
-
<d2l-calendar></d2l-calendar>
|
|
42
|
-
</template>
|
|
43
|
-
</d2l-demo-snippet>
|
|
44
|
-
|
|
45
|
-
<h2>Calendar (min and max value)</h2>
|
|
46
|
-
<d2l-demo-snippet>
|
|
47
|
-
<template>
|
|
48
|
-
<d2l-calendar min-value="2018-08-27" max-value="2018-09-30" selected-value="2018-09-08"></d2l-calendar>
|
|
49
|
-
</template>
|
|
50
|
-
</d2l-demo-snippet>
|
|
51
|
-
|
|
52
|
-
<h2>Calendar (with events)</h2>
|
|
53
|
-
<d2l-demo-snippet>
|
|
54
|
-
<template>
|
|
55
|
-
<d2l-calendar id="eventsCalendar" selected-value="2024-09-16"></d2l-calendar>
|
|
56
|
-
<script type="module">
|
|
57
|
-
import { getDateFromISODate, isDateInRange } from '../../../helpers/dateTime.js';
|
|
58
|
-
import { getMinMaxDatesInView } from '../calendar.js';
|
|
59
|
-
|
|
60
|
-
const getEvents = datesInView => {
|
|
61
|
-
return window._allEvents.filter(event => isDateInRange(getDateFromISODate(event.date), datesInView.minValue, datesInView.maxValue));
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const calendar = document.querySelector('#eventsCalendar');
|
|
65
|
-
calendar.dayInfos = getEvents(getMinMaxDatesInView(undefined, calendar.selectedValue));
|
|
66
|
-
calendar.addEventListener('d2l-calendar-view-change', e => {
|
|
67
|
-
console.log(e);
|
|
68
|
-
calendar.dayInfos = getEvents(e.detail);
|
|
69
|
-
});
|
|
70
|
-
</script>
|
|
71
|
-
</template>
|
|
72
|
-
</d2l-demo-snippet>
|
|
73
|
-
|
|
74
|
-
</d2l-demo-page>
|
|
75
|
-
</body>
|
|
76
|
-
</html>
|