@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.
Files changed (176) hide show
  1. package/components/button/button.js +8 -8
  2. package/components/demo/test/demo-page-settings.test.js +25 -0
  3. package/components/demo/test/demo-page.test.js +17 -0
  4. package/package.json +1 -1
  5. package/components/alert/demo/alert-toast.html +0 -106
  6. package/components/alert/demo/alert.html +0 -82
  7. package/components/backdrop/demo/backdrop-loading.html +0 -166
  8. package/components/backdrop/demo/backdrop.html +0 -57
  9. package/components/breadcrumbs/demo/breadcrumbs.html +0 -53
  10. package/components/button/demo/button-add.html +0 -55
  11. package/components/button/demo/button-copy.html +0 -122
  12. package/components/button/demo/button-icon.html +0 -174
  13. package/components/button/demo/button-move.html +0 -38
  14. package/components/button/demo/button-split.html +0 -76
  15. package/components/button/demo/button-subtle.html +0 -132
  16. package/components/button/demo/button-toggle.html +0 -80
  17. package/components/button/demo/button.html +0 -67
  18. package/components/button/demo/floating-buttons-in-frame.html +0 -44
  19. package/components/button/demo/floating-buttons-in-tabs.html +0 -244
  20. package/components/button/demo/floating-buttons-page.html +0 -100
  21. package/components/button/demo/floating-buttons.html +0 -101
  22. package/components/calendar/demo/calendar.html +0 -76
  23. package/components/card/demo/card.html +0 -304
  24. package/components/collapsible-panel/demo/collapsible-panel.html +0 -218
  25. package/components/colors/demo/color-swatch.js +0 -240
  26. package/components/colors/demo/colors.html +0 -139
  27. package/components/count-badge/demo/count-badge-icon.html +0 -48
  28. package/components/count-badge/demo/count-badge.html +0 -73
  29. package/components/demo/demo/demo-snippet.html +0 -71
  30. package/components/description-list/demo/description-list-test.js +0 -142
  31. package/components/description-list/demo/description-list.html +0 -48
  32. package/components/dialog/demo/dialog-async-content-until.js +0 -89
  33. package/components/dialog/demo/dialog-async-content.js +0 -72
  34. package/components/dialog/demo/dialog-confirm.html +0 -102
  35. package/components/dialog/demo/dialog-container.js +0 -40
  36. package/components/dialog/demo/dialog-fullscreen.html +0 -273
  37. package/components/dialog/demo/dialog-nested.html +0 -94
  38. package/components/dialog/demo/dialog.html +0 -398
  39. package/components/dropdown/demo/dropdown-button.html +0 -102
  40. package/components/dropdown/demo/dropdown-context-menu.html +0 -129
  41. package/components/dropdown/demo/dropdown-flicker-inner.html +0 -70
  42. package/components/dropdown/demo/dropdown-flicker.html +0 -142
  43. package/components/dropdown/demo/dropdown-menu-demo-view.js +0 -37
  44. package/components/dropdown/demo/dropdown-menu.html +0 -227
  45. package/components/dropdown/demo/dropdown-more.html +0 -160
  46. package/components/dropdown/demo/dropdown-positioning.html +0 -127
  47. package/components/dropdown/demo/dropdown-tabs.html +0 -87
  48. package/components/dropdown/demo/dropdown.html +0 -217
  49. package/components/empty-state/demo/empty-state.html +0 -94
  50. package/components/expand-collapse/demo/expand-collapse-content.html +0 -58
  51. package/components/filter/demo/filter-load-more-demo.js +0 -182
  52. package/components/filter/demo/filter-overflow-group.html +0 -246
  53. package/components/filter/demo/filter-search-demo.js +0 -135
  54. package/components/filter/demo/filter-tags.html +0 -115
  55. package/components/filter/demo/filter.html +0 -230
  56. package/components/focus-trap/demo/focus-trap.html +0 -75
  57. package/components/form/demo/form-demo.js +0 -105
  58. package/components/form/demo/form-dialog-demo.js +0 -94
  59. package/components/form/demo/form-panel-demo.js +0 -89
  60. package/components/form/demo/form.html +0 -37
  61. package/components/hierarchical-view/demo/hierarchical-view.html +0 -221
  62. package/components/html-block/demo/html-block-code.html +0 -55
  63. package/components/html-block/demo/html-block.html +0 -696
  64. package/components/icons/demo/icon-color-override.js +0 -23
  65. package/components/icons/demo/icon-custom.html +0 -112
  66. package/components/icons/demo/icon-size-override.js +0 -24
  67. package/components/icons/demo/icon.html +0 -52
  68. package/components/inputs/demo/input-checkbox.html +0 -118
  69. package/components/inputs/demo/input-color-palette.js +0 -67
  70. package/components/inputs/demo/input-color.html +0 -110
  71. package/components/inputs/demo/input-date-range.html +0 -114
  72. package/components/inputs/demo/input-date-time-range.html +0 -128
  73. package/components/inputs/demo/input-date-time.html +0 -100
  74. package/components/inputs/demo/input-date.html +0 -81
  75. package/components/inputs/demo/input-group.html +0 -56
  76. package/components/inputs/demo/input-number.html +0 -136
  77. package/components/inputs/demo/input-percent.html +0 -99
  78. package/components/inputs/demo/input-radio-label-test.js +0 -45
  79. package/components/inputs/demo/input-radio-solo-test.js +0 -47
  80. package/components/inputs/demo/input-radio.html +0 -119
  81. package/components/inputs/demo/input-search.html +0 -75
  82. package/components/inputs/demo/input-select-test.js +0 -60
  83. package/components/inputs/demo/input-select.html +0 -45
  84. package/components/inputs/demo/input-text.html +0 -163
  85. package/components/inputs/demo/input-textarea.html +0 -124
  86. package/components/inputs/demo/input-time-range.html +0 -121
  87. package/components/inputs/demo/input-time.html +0 -95
  88. package/components/link/demo/link.html +0 -111
  89. package/components/list/demo/demo-list-nav.js +0 -170
  90. package/components/list/demo/demo-list-nested-iterations-helper.js +0 -168
  91. package/components/list/demo/demo-list-nested-lazy-load.js +0 -133
  92. package/components/list/demo/demo-list-nested.js +0 -291
  93. package/components/list/demo/demo-list.js +0 -241
  94. package/components/list/demo/list-color.html +0 -423
  95. package/components/list/demo/list-demo-scenarios.js +0 -380
  96. package/components/list/demo/list-drag-and-drop-position.js +0 -102
  97. package/components/list/demo/list-drag-and-drop.html +0 -82
  98. package/components/list/demo/list-expand-collapse.html +0 -136
  99. package/components/list/demo/list-item-actions.html +0 -371
  100. package/components/list/demo/list-item-custom.js +0 -204
  101. package/components/list/demo/list-item-layouts.html +0 -331
  102. package/components/list/demo/list-item-scroll.html +0 -122
  103. package/components/list/demo/list-layout.html +0 -575
  104. package/components/list/demo/list-nav.html +0 -110
  105. package/components/list/demo/list-nested.html +0 -270
  106. package/components/list/demo/list-selection.html +0 -301
  107. package/components/list/demo/list.html +0 -319
  108. package/components/loading-spinner/demo/loading-spinner-override.js +0 -34
  109. package/components/loading-spinner/demo/loading-spinner.html +0 -63
  110. package/components/menu/demo/checkbox-menu.html +0 -52
  111. package/components/menu/demo/custom-menu-item.js +0 -37
  112. package/components/menu/demo/custom-view.js +0 -63
  113. package/components/menu/demo/menu.html +0 -211
  114. package/components/menu/demo/radio-menu.html +0 -52
  115. package/components/meter/demo/meter.html +0 -115
  116. package/components/more-less/demo/more-less-test.js +0 -67
  117. package/components/more-less/demo/more-less.html +0 -71
  118. package/components/object-property-list/demo/object-property-list.html +0 -99
  119. package/components/offscreen/demo/offscreen-demo.js +0 -16
  120. package/components/offscreen/demo/offscreen.html +0 -44
  121. package/components/overflow-group/demo/demo-overflow-group.js +0 -29
  122. package/components/overflow-group/demo/overflow-group.html +0 -110
  123. package/components/paging/demo/pager-load-more.html +0 -120
  124. package/components/popover/demo/popover.html +0 -309
  125. package/components/progress/demo/progress.html +0 -104
  126. package/components/scroll-wrapper/demo/scroll-wrapper-test.js +0 -108
  127. package/components/scroll-wrapper/demo/scroll-wrapper.html +0 -52
  128. package/components/selection/demo/demo-selection.js +0 -35
  129. package/components/selection/demo/selection.html +0 -198
  130. package/components/skeleton/demo/skeleton-group-nested-test.js +0 -71
  131. package/components/skeleton/demo/skeleton-group-test-wrapper.js +0 -18
  132. package/components/skeleton/demo/skeleton-group-test.js +0 -91
  133. package/components/skeleton/demo/skeleton-mixin.html +0 -78
  134. package/components/skeleton/demo/skeleton-test-box.js +0 -34
  135. package/components/skeleton/demo/skeleton-test-container.js +0 -45
  136. package/components/skeleton/demo/skeleton-test-heading.js +0 -44
  137. package/components/skeleton/demo/skeleton-test-link.js +0 -47
  138. package/components/skeleton/demo/skeleton-test-paragraph.js +0 -54
  139. package/components/skeleton/demo/skeleton-test-stack.js +0 -38
  140. package/components/skeleton/demo/skeleton-test-width.js +0 -20
  141. package/components/sorting/demo/sort.html +0 -37
  142. package/components/status-indicator/demo/status-indicator.html +0 -99
  143. package/components/switch/demo/switch.html +0 -95
  144. package/components/table/demo/table-test.js +0 -271
  145. package/components/table/demo/table.html +0 -107
  146. package/components/tabs/demo/tab-custom.js +0 -39
  147. package/components/tabs/demo/tabs-array.js +0 -43
  148. package/components/tabs/demo/tabs.html +0 -558
  149. package/components/tag-list/demo/tag-list.html +0 -117
  150. package/components/tooltip/demo/tooltip.html +0 -275
  151. package/components/typography/demo/typography.html +0 -93
  152. package/components/view-switcher/demo/demo-table-view.js +0 -41
  153. package/components/view-switcher/demo/view-switcher.html +0 -71
  154. package/directives/animate/demo/animate-test.js +0 -98
  155. package/directives/animate/demo/index.html +0 -23
  156. package/helpers/demo/announce-test.js +0 -37
  157. package/helpers/demo/announce.html +0 -19
  158. package/helpers/demo/dismissible-test.js +0 -66
  159. package/helpers/demo/dismissible.html +0 -38
  160. package/helpers/demo/gestures.html +0 -58
  161. package/helpers/demo/prism.html +0 -694
  162. package/helpers/demo/template-tags.html +0 -118
  163. package/mixins/arrow-keys/demo/arrow-keys-mixin.html +0 -29
  164. package/mixins/arrow-keys/demo/arrow-keys-test.js +0 -38
  165. package/mixins/async-container/demo/async-container.html +0 -109
  166. package/mixins/async-container/demo/async-container.js +0 -27
  167. package/mixins/async-container/demo/async-item.js +0 -80
  168. package/mixins/labelled/demo/labelled-mixin.html +0 -90
  169. package/mixins/localize/demo/localize-mixin-greeting.js +0 -39
  170. package/mixins/localize/demo/localize-mixin-mission.js +0 -25
  171. package/mixins/localize/demo/localize-mixin.html +0 -28
  172. package/templates/primary-secondary/demo/form.html +0 -55
  173. package/templates/primary-secondary/demo/index.html +0 -27
  174. package/templates/primary-secondary/demo/integration.html +0 -457
  175. package/templates/primary-secondary/demo/overflow-hidden.html +0 -22
  176. package/templates/primary-secondary/demo/width-type-normal.html +0 -26
@@ -1,371 +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 '../../button/button-icon.js';
9
- import '../../demo/demo-page.js';
10
- import '../../dropdown/dropdown-menu.js';
11
- import '../../dropdown/dropdown-more.js';
12
- import '../../menu/menu.js';
13
- import '../../menu/menu-item.js';
14
- import '../../selection/selection-action.js';
15
- import '../../tooltip/tooltip.js';
16
- import '../list-controls.js';
17
- import '../list-item-button.js';
18
- import '../list-item-content.js';
19
- import '../list-item.js';
20
- import '../list.js';
21
- </script>
22
- </head>
23
- <body unresolved>
24
-
25
- <d2l-demo-page page-title="d2l-list-item (actions)">
26
-
27
- <h2>No Action, Add Button</h2>
28
-
29
- <d2l-demo-snippet>
30
- <template>
31
- <d2l-list add-button>
32
- <d2l-list-item>
33
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
34
- </d2l-list-item>
35
- <d2l-list-item>
36
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
37
- </d2l-list-item>
38
- <d2l-list-item>
39
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
40
- </d2l-list-item>
41
- </d2l-list>
42
- </template>
43
- </d2l-demo-snippet>
44
-
45
- <h2>Navigation (href) Primary Action</h2>
46
-
47
- <d2l-demo-snippet>
48
- <template>
49
- <d2l-list add-button>
50
- <d2l-list-item href="http://www.d2l.com">
51
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
52
- </d2l-list-item>
53
- <d2l-list-item href="http://www.d2l.com">
54
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
55
- </d2l-list-item>
56
- <d2l-list-item href="http://www.d2l.com">
57
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
58
- </d2l-list-item>
59
- </d2l-list>
60
- <script>
61
- (demo => {
62
- demo.addEventListener('d2l-list-item-link-click', e => console.log('d2l-list-item-link clicked!', e));
63
- })(document.currentScript.parentNode);
64
- </script>
65
- </template>
66
- </d2l-demo-snippet>
67
-
68
- <h2>Button Primary Action</h2>
69
-
70
- <d2l-demo-snippet>
71
- <template>
72
- <d2l-list>
73
- <d2l-list-item-button>
74
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
75
- </d2l-list-item-button>
76
- <d2l-list-item-button>
77
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
78
- </d2l-list-item-button>
79
- <d2l-list-item-button>
80
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
81
- </d2l-list-item-button>
82
- </d2l-list>
83
- <script>
84
- (demo => {
85
- demo.addEventListener('d2l-list-item-button-click', e => console.log('d2l-list-item-button clicked!', e));
86
- })(document.currentScript.parentNode);
87
- </script>
88
- </template>
89
- </d2l-demo-snippet>
90
-
91
- <h2>Secondary Actions</h2>
92
-
93
- <d2l-demo-snippet>
94
- <template>
95
- <d2l-list>
96
- <d2l-list-item>
97
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
98
- <div slot="actions">
99
- <d2l-button-icon id="tooltip-btn-1" text="My Button" icon="tier1:preview"></d2l-button-icon>
100
- <d2l-tooltip for="tooltip-btn-1">Preview</d2l-tooltip>
101
- <d2l-dropdown-more text="Open!">
102
- <d2l-dropdown-menu>
103
- <d2l-menu label="Astronomy">
104
- <d2l-menu-item text="Introduction"></d2l-menu-item>
105
- <d2l-menu-item text="Searching for the Heavens "></d2l-menu-item>
106
- </d2l-menu>
107
- </d2l-dropdown-menu>
108
- </d2l-dropdown-more>
109
- </div>
110
- </d2l-list-item>
111
- <d2l-list-item>
112
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
113
- <div slot="actions">
114
- <d2l-button-icon id="tooltip-btn-2" text="My Button" icon="tier1:preview"></d2l-button-icon>
115
- <d2l-tooltip for="tooltip-btn-2">Preview</d2l-tooltip>
116
- <d2l-dropdown-more text="Open!">
117
- <d2l-dropdown-menu>
118
- <d2l-menu label="Astronomy">
119
- <d2l-menu-item text="Introduction"></d2l-menu-item>
120
- <d2l-menu-item text="Searching for the Heavens "></d2l-menu-item>
121
- </d2l-menu>
122
- </d2l-dropdown-menu>
123
- </d2l-dropdown-more>
124
- </div>
125
- </d2l-list-item>
126
- <d2l-list-item>
127
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
128
- <div slot="actions">
129
- <d2l-button-icon id="tooltip-btn-3" text="My Button" icon="tier1:preview"></d2l-button-icon>
130
- <d2l-tooltip for="tooltip-btn-3">Preview</d2l-tooltip>
131
- <d2l-dropdown-more text="Open!">
132
- <d2l-dropdown-menu>
133
- <d2l-menu label="Astronomy">
134
- <d2l-menu-item text="Introduction"></d2l-menu-item>
135
- <d2l-menu-item text="Searching for the Heavens "></d2l-menu-item>
136
- </d2l-menu>
137
- </d2l-dropdown-menu>
138
- </d2l-dropdown-more>
139
- </div>
140
- </d2l-list-item>
141
- </d2l-list>
142
- </template>
143
- </d2l-demo-snippet>
144
-
145
- <h2>Selection</h2>
146
-
147
- <d2l-demo-snippet>
148
- <template>
149
- <d2l-list>
150
- <d2l-list-controls slot="controls">
151
- <d2l-selection-action icon="tier1:bookmark-hollow" text="Bookmark" requires-selection></d2l-selection-action>
152
- <d2l-selection-action icon="tier1:gear" text="Settings"></d2l-selection-action>
153
- </d2l-list-controls>
154
- <d2l-list-item selectable key="1" label="Introductory Earth Sciences">
155
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
156
- </d2l-list-item>
157
- <d2l-list-item selectable key="2" selected label="Engineering Materials for Energy Systems">
158
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
159
- </d2l-list-item>
160
- <d2l-list-item selectable selection-disabled key="3" label="Geomorphology and GIS">
161
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
162
- </d2l-list-item>
163
- <d2l-list-item selectable selection-disabled selection-disabled-tooltip="This option is not currently available" key="5" label="Fermentation Biology">
164
- <d2l-list-item-content>Fermentation Biology</d2l-list-item-content>
165
- </d2l-list-item>
166
- </d2l-list>
167
- </template>
168
- </d2l-demo-snippet>
169
-
170
- <h2>Selection (single)</h2>
171
-
172
- <d2l-demo-snippet>
173
- <template>
174
- <d2l-list selection-single>
175
- <d2l-list-controls slot="controls">
176
- <d2l-selection-action icon="tier1:bookmark-hollow" text="Bookmark" requires-selection></d2l-selection-action>
177
- <d2l-selection-action icon="tier1:gear" text="Settings"></d2l-selection-action>
178
- </d2l-list-controls>
179
- <d2l-list-item selectable key="1" label="Introductory Earth Sciences">
180
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
181
- </d2l-list-item>
182
- <d2l-list-item selectable key="2" selected label="Engineering Materials for Energy Systems">
183
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
184
- </d2l-list-item>
185
- <d2l-list-item selectable key="3" label="Geomorphology and GIS">
186
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
187
- </d2l-list-item>
188
- <d2l-list-item selectable key="4" label="Introductory Differential Equations">
189
- <d2l-list-item-content>Introductory Differential Equations</d2l-list-item-content>
190
- </d2l-list-item>
191
- <d2l-list-item selectable selection-disabled selection-disabled-tooltip="This option is not currently available" key="5" label="Fermentation Biology">
192
- <d2l-list-item-content>Fermentation Biology</d2l-list-item-content>
193
- </d2l-list-item>
194
- </d2l-list>
195
- </template>
196
- </d2l-demo-snippet>
197
-
198
- <h2>Selection (overflow)</h2>
199
-
200
- <d2l-demo-snippet>
201
- <template>
202
- <d2l-list>
203
- <d2l-list-controls slot="controls">
204
- <d2l-selection-action icon="tier1:tag-hollow" text="Tag" requires-selection></d2l-selection-action>
205
- <d2l-selection-action icon="tier1:share" text="Share" requires-selection></d2l-selection-action>
206
- <d2l-selection-action icon="tier1:bookmark-hollow" text="Bookmark" requires-selection></d2l-selection-action>
207
- <d2l-selection-action icon="tier1:delete" text="Delete" requires-selection></d2l-selection-action>
208
- <d2l-selection-action icon="tier1:gear" text="Settings"></d2l-selection-action>
209
- </d2l-list-controls>
210
- <d2l-list-item selectable key="1" label="Introductory Earth Sciences">
211
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
212
- </d2l-list-item>
213
- <d2l-list-item selectable key="2" selected label="Engineering Materials for Energy Systems">
214
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
215
- </d2l-list-item>
216
- <d2l-list-item selectable key="3" label="Geomorphology and GIS">
217
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
218
- </d2l-list-item>
219
- </d2l-list>
220
- </template>
221
- </d2l-demo-snippet>
222
-
223
- <h2>Selection (no actions)</h2>
224
-
225
- <d2l-demo-snippet>
226
- <template>
227
- <d2l-list>
228
- <d2l-list-controls slot="controls"></d2l-list-controls>
229
- <d2l-list-item selectable key="1" label="Introductory Earth Sciences">
230
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
231
- </d2l-list-item>
232
- <d2l-list-item selectable key="2" selected label="Engineering Materials for Energy Systems">
233
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
234
- </d2l-list-item>
235
- <d2l-list-item selectable key="3" label="Geomorphology and GIS">
236
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
237
- </d2l-list-item>
238
- </d2l-list>
239
- </template>
240
- </d2l-demo-snippet>
241
-
242
- <h2>Selection & Navigation (href) Primary Action</h2>
243
-
244
- <d2l-demo-snippet>
245
- <template>
246
- <d2l-list>
247
- <d2l-list-controls slot="controls">
248
- <d2l-selection-action icon="tier1:bookmark-hollow" text="Bookmark" requires-selection></d2l-selection-action>
249
- <d2l-selection-action icon="tier1:gear" text="Settings"></d2l-selection-action>
250
- </d2l-list-controls>
251
- <d2l-list-item href="http://www.d2l.com" selectable key="1" label="Introductory Earth Sciences">
252
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
253
- </d2l-list-item>
254
- <d2l-list-item href="http://www.d2l.com" selectable key="2" selected label="Engineering Materials for Energy Systems">
255
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
256
- </d2l-list-item>
257
- <d2l-list-item href="http://www.d2l.com" selectable key="3" label="Geomorphology and GIS">
258
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
259
- </d2l-list-item>
260
- </d2l-list>
261
- <script>
262
- (demo => {
263
- demo.addEventListener('d2l-list-item-link-click', e => console.log('d2l-list-item-link clicked!', e));
264
- })(document.currentScript.parentNode);
265
- </script>
266
- </template>
267
- </d2l-demo-snippet>
268
-
269
- <h2>Selection & Button Primary Action</h2>
270
-
271
- <d2l-demo-snippet>
272
- <template>
273
- <d2l-list>
274
- <d2l-list-controls slot="controls">
275
- <d2l-selection-action icon="tier1:bookmark-hollow" text="Bookmark" requires-selection></d2l-selection-action>
276
- <d2l-selection-action icon="tier1:gear" text="Settings"></d2l-selection-action>
277
- </d2l-list-controls>
278
- <d2l-list-item-button selectable key="1" label="Introductory Earth Sciences">
279
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
280
- </d2l-list-item-button>
281
- <d2l-list-item-button selectable key="2" selected label="Engineering Materials for Energy Systems">
282
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
283
- </d2l-list-item-button>
284
- <d2l-list-item-button selectable key="3" label="Geomorphology and GIS">
285
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
286
- </d2l-list-item-button>
287
- </d2l-list>
288
- <script>
289
- (demo => {
290
- demo.addEventListener('d2l-list-item-button-click', e => console.log('d2l-list-item-button clicked!', e));
291
- })(document.currentScript.parentNode);
292
- </script>
293
- </template>
294
- </d2l-demo-snippet>
295
-
296
- <h2>Grid Actions with Navigation (href) Primary Action</h2>
297
-
298
- <d2l-demo-snippet>
299
- <template>
300
- <d2l-list grid add-button>
301
- <d2l-list-controls slot="controls">
302
- <d2l-selection-action icon="tier1:bookmark-hollow" text="Bookmark" requires-selection></d2l-selection-action>
303
- <d2l-selection-action icon="tier1:gear" text="Settings"></d2l-selection-action>
304
- </d2l-list-controls>
305
- <d2l-list-item href="http://www.d2l.com" selectable key="1" label="Introductory Earth Sciences">
306
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
307
- <div slot="actions">
308
- <d2l-button-icon text="My Button" icon="tier1:more"></d2l-button-icon>
309
- </div>
310
- </d2l-list-item>
311
- <d2l-list-item href="http://www.d2l.com" selectable key="2" selected label="Engineering Materials for Energy Systems">
312
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
313
- <div slot="actions">
314
- <d2l-button-icon text="My Button" icon="tier1:more"></d2l-button-icon>
315
- </div>
316
- </d2l-list-item>
317
- <d2l-list-item href="http://www.d2l.com" selectable key="3" label="Geomorphology and GIS">
318
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
319
- <div slot="actions">
320
- <d2l-button-icon text="My Button" icon="tier1:more"></d2l-button-icon>
321
- </div>
322
- </d2l-list-item>
323
- </d2l-list>
324
- <script>
325
- (demo => {
326
- demo.addEventListener('d2l-list-item-link-click', e => console.log('d2l-list-item-link clicked!', e));
327
- })(document.currentScript.parentNode);
328
- </script>
329
- </template>
330
- </d2l-demo-snippet>
331
-
332
- <h2>Grid Actions with Button Primary Action</h2>
333
-
334
- <d2l-demo-snippet>
335
- <template>
336
- <d2l-list grid>
337
- <d2l-list-controls slot="controls">
338
- <d2l-selection-action icon="tier1:bookmark-hollow" text="Bookmark" requires-selection></d2l-selection-action>
339
- <d2l-selection-action icon="tier1:gear" text="Settings"></d2l-selection-action>
340
- </d2l-list-controls>
341
- <d2l-list-item-button selectable key="1" label="Introductory Earth Sciences">
342
- <d2l-list-item-content>Introductory Earth Sciences</d2l-list-item-content>
343
- <div slot="actions">
344
- <d2l-button-icon text="My Button" icon="tier1:more"></d2l-button-icon>
345
- </div>
346
- </d2l-list-item-button>
347
- <d2l-list-item-button selectable key="2" selected label="Engineering Materials for Energy Systems">
348
- <d2l-list-item-content>Engineering Materials for Energy Systems</d2l-list-item-content>
349
- <div slot="actions">
350
- <d2l-button-icon text="My Button" icon="tier1:more"></d2l-button-icon>
351
- </div>
352
- </d2l-list-item-button>
353
- <d2l-list-item-button selectable key="3" label="Geomorphology and GIS">
354
- <d2l-list-item-content>Geomorphology and GIS</d2l-list-item-content>
355
- <div slot="actions">
356
- <d2l-button-icon text="My Button" icon="tier1:more"></d2l-button-icon>
357
- </div>
358
- </d2l-list-item-button>
359
- </d2l-list>
360
- <script>
361
- (demo => {
362
- demo.addEventListener('d2l-list-item-button-click', e => console.log('d2l-list-item-button clicked!', e));
363
- })(document.currentScript.parentNode);
364
- </script>
365
- </template>
366
- </d2l-demo-snippet>
367
-
368
- </d2l-demo-page>
369
-
370
- </body>
371
- </html>
@@ -1,204 +0,0 @@
1
- import '../list.js';
2
- import '../list-item-content.js';
3
- import { html, LitElement } from 'lit';
4
- import { ListItemMixin } from '../list-item-mixin.js';
5
-
6
- const demoData = {
7
- 'L1-1': {
8
- primaryText: 'Earth Sciences (L1)',
9
- supportingText: 'Earth science or geoscience includes all fields of natural science related to planet Earth. This is a branch of science dealing with the physical and chemical constitution of Earth and its atmosphere. Earth science can be considered to be a branch of planetary science, but with a much older history.',
10
- nested: [ 'L2-1', 'L2-2', 'L2-3' ]
11
- },
12
- 'L1-2': {
13
- primaryText: 'Biology (L1)',
14
- supportingText: 'Supporting Info'
15
- },
16
- 'L1-3': {
17
- primaryText: 'Computer Science (L3)',
18
- supportingText: 'Supporting Info'
19
- },
20
- 'L2-1': {
21
- primaryText: 'Introductory Earth Sciences (L2)',
22
- supportingText: 'This course explores the geological processes of the Earth\'s interior and surface. These include volcanism, earthquakes, mountain building, glaciation and weathering. Students will gain an appreciation of how these processes have controlled the evolution of our planet and the role of geology in meeting society\'s current and future demand for sustainable energy and mineral resources.',
23
- nested: [ 'L3-1', 'L3-2', 'L3-3' ]
24
- },
25
- 'L2-2': {
26
- primaryText: 'Flow and Transport Through Fractured Rocks (L2)',
27
- supportingText: 'Fractures are ubiquitous in geologic media and important in disciplines such as physical and contaminant hydrogeology, geotechnical engineering, civil and environmental engineering, petroleum engineering among other areas. Despite the importance of fractures, its characterization and predictions of groundwater flow and contaminant transport are fraught with significant difficulties. Students are taught to deal with fractures in hydrogeology, to conceptualize them, and to build reliable models for predicting groundwater flow and contaminant transport.'
28
- },
29
- 'L2-3': {
30
- primaryText: 'Applied Wetland Science (L2)',
31
- supportingText: 'Advanced concepts on wetland ecosystems in the context of regional and global earth systems processes such as carbon and nitrogen cycling and climate change, applications of wetland paleoecology, use of isotopes and other geochemical tools in wetland science, and wetland engineering in landscape rehabilitation and ecotechnology. Current issues in Canada and abroad will be examined.'
32
- },
33
- 'L3-1': {
34
- primaryText: 'Glaciation (L3)',
35
- supportingText: 'Supporting Info',
36
- nested: [ 'L4-1', 'L4-2' ]
37
- },
38
- 'L3-2': {
39
- primaryText: 'Weathering (L3)',
40
- supportingText: 'Supporting Info'
41
- },
42
- 'L3-3': {
43
- primaryText: 'Volcanism (L3)',
44
- supportingText: 'Supporting Info'
45
- },
46
- 'L4-1': {
47
- primaryText: 'Ice Sheets',
48
- supportingText: 'Supporting Info',
49
- nested: [ /*'L5-1', 'L5-2', 'L5-3', 'L5-4', 'L5-5'*/ ]
50
- },
51
- 'L4-2': {
52
- primaryText: 'Alpine Glaciers',
53
- supportingText: 'Supporting Info'
54
- },
55
- 'L5-1': {
56
- primaryText: 'Topic L5-1',
57
- supportingText: 'Supporting Info',
58
- nested: [ 'L6-1' /*, 'L6-2', 'L6-3', 'L6-4', 'L6-5', 'L6-6', 'L6-7', 'L6-8'*/ ]
59
- },
60
- 'L5-2': {
61
- primaryText: 'Topic L5-2',
62
- supportingText: 'Supporting Info',
63
- nested: [ 'L6-1', 'L6-2', 'L6-3', 'L6-4', 'L6-5', 'L6-6', 'L6-7', 'L6-8' ]
64
- },
65
- 'L5-3': {
66
- primaryText: 'Topic L5-3',
67
- supportingText: 'Supporting Info',
68
- nested: [ 'L6-1', 'L6-2', 'L6-3', 'L6-4', 'L6-5', 'L6-6', 'L6-7', 'L6-8' ]
69
- },
70
- 'L5-4': {
71
- primaryText: 'Topic L5-4',
72
- supportingText: 'Supporting Info',
73
- nested: [ 'L6-1', 'L6-2', 'L6-3', 'L6-4', 'L6-5', 'L6-6', 'L6-7', 'L6-8' ]
74
- },
75
- 'L5-5': {
76
- primaryText: 'Topic L5-5',
77
- supportingText: 'Supporting Info',
78
- nested: [ 'L6-1', 'L6-2', 'L6-3', 'L6-4', 'L6-5', 'L6-6', 'L6-7', 'L6-8' ]
79
- },
80
- 'L6-1': {
81
- primaryText: 'Topic L6-1',
82
- supportingText: 'Supporting Info',
83
- nested: [ 'L7-1', 'L7-2', 'L7-3', 'L7-4', 'L7-5', 'L7-6', 'L7-7', 'L7-8', 'L7-9', 'L7-10' ]
84
- },
85
- 'L6-2': {
86
- primaryText: 'Topic L6-2',
87
- supportingText: 'Supporting Info',
88
- nested: [ 'L7-1', 'L7-2', 'L7-3', 'L7-4', 'L7-5', 'L7-6', 'L7-7', 'L7-8', 'L7-9', 'L7-10' ]
89
- },
90
- 'L6-3': {
91
- primaryText: 'Topic L6-3',
92
- supportingText: 'Supporting Info',
93
- nested: [ 'L7-1', 'L7-2', 'L7-3', 'L7-4', 'L7-5', 'L7-6', 'L7-7', 'L7-8', 'L7-9', 'L7-10' ]
94
- },
95
- 'L6-4': {
96
- primaryText: 'Topic L6-4',
97
- supportingText: 'Supporting Info',
98
- nested: [ 'L7-1', 'L7-2', 'L7-3', 'L7-4', 'L7-5', 'L7-6', 'L7-7', 'L7-8', 'L7-9', 'L7-10' ]
99
- },
100
- 'L6-5': {
101
- primaryText: 'Topic L6-5',
102
- supportingText: 'Supporting Info',
103
- nested: [ 'L7-1', 'L7-2', 'L7-3', 'L7-4', 'L7-5', 'L7-6', 'L7-7', 'L7-8', 'L7-9', 'L7-10' ]
104
- },
105
- 'L6-6': {
106
- primaryText: 'Topic L6-6',
107
- supportingText: 'Supporting Info',
108
- nested: [ 'L7-1', 'L7-2', 'L7-3', 'L7-4', 'L7-5', 'L7-6', 'L7-7', 'L7-8', 'L7-9', 'L7-10' ]
109
- },
110
- 'L6-7': {
111
- primaryText: 'Topic L6-7',
112
- supportingText: 'Supporting Info',
113
- nested: [ 'L7-1', 'L7-2', 'L7-3', 'L7-4', 'L7-5', 'L7-6', 'L7-7', 'L7-8', 'L7-9', 'L7-10' ]
114
- },
115
- 'L6-8': {
116
- primaryText: 'Topic L6-8',
117
- supportingText: 'Supporting Info',
118
- nested: [ 'L7-1', 'L7-2', 'L7-3', 'L7-4', 'L7-5', 'L7-6', 'L7-7', 'L7-8', 'L7-9', 'L7-10' ]
119
- },
120
- 'L6-9': {
121
- primaryText: 'Topic L6-9',
122
- supportingText: 'Supporting Info',
123
- nested: [ 'L7-1', 'L7-2', 'L7-3', 'L7-4', 'L7-5', 'L7-6', 'L7-7', 'L7-8', 'L7-9', 'L7-10' ]
124
- },
125
- 'L7-1': {
126
- primaryText: 'Topic L7-1',
127
- supportingText: 'Supporting Info'
128
- },
129
- 'L7-2': {
130
- primaryText: 'Topic L7-2',
131
- supportingText: 'Supporting Info'
132
- },
133
- 'L7-3': {
134
- primaryText: 'Topic L7-3',
135
- supportingText: 'Supporting Info'
136
- },
137
- 'L7-4': {
138
- primaryText: 'Topic L7-4',
139
- supportingText: 'Supporting Info'
140
- },
141
- 'L7-5': {
142
- primaryText: 'Topic L7-5',
143
- supportingText: 'Supporting Info'
144
- },
145
- 'L7-6': {
146
- primaryText: 'Topic L7-6',
147
- supportingText: 'Supporting Info'
148
- },
149
- 'L7-7': {
150
- primaryText: 'Topic L7-7',
151
- supportingText: 'Supporting Info'
152
- },
153
- 'L7-8': {
154
- primaryText: 'Topic L7-8',
155
- supportingText: 'Supporting Info'
156
- },
157
- 'L7-9': {
158
- primaryText: 'Topic L7-9',
159
- supportingText: 'Supporting Info'
160
- },
161
- 'L7-10': {
162
- primaryText: 'Topic L7-10',
163
- supportingText: 'Supporting Info'
164
- }
165
- };
166
-
167
- class DemoListItemCustom extends ListItemMixin(LitElement) {
168
-
169
- constructor() {
170
- super();
171
- this.selectable = true;
172
- }
173
-
174
- render() {
175
- const itemTemplates = {
176
- content: html`
177
- <d2l-list-item-content>
178
- <div>${demoData[this.key].primaryText}</div>
179
- <div slot="supporting-info">${demoData[this.key].supportingText}</div>
180
- </d2l-list-item-content>
181
- `
182
- };
183
-
184
- if (demoData[this.key].nested && demoData[this.key].nested.length > 0) {
185
- itemTemplates.nested = html`
186
- <d2l-list grid separators="all">
187
- ${demoData[this.key].nested.map(itemKey => html`<d2l-demo-list-item-custom selectable key="${itemKey}"></d2l-demo-list-item-custom>`)}
188
- </d2l-list>
189
- `;
190
- }
191
-
192
- return this._renderListItem(itemTemplates);
193
- }
194
-
195
- willUpdate(changedProperties) {
196
- super.willUpdate(changedProperties);
197
- if (changedProperties.has('key')) {
198
- this.label = `Label for ${this.key}`;
199
- }
200
- }
201
-
202
- }
203
-
204
- customElements.define('d2l-demo-list-item-custom', DemoListItemCustom);