-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
673 lines (663 loc) · 35.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
---
layout: default
title: Home
---
<div class="demo__container" role="main">
<section class="section__demos">
<div class="card">
<div class="title row">
<h2 id="page-title">MyUW Web Components</h2>
<div class="title__actions">
<button id="tourIconButton" class="mdl-button mdl-js-button mdl-button--raised mdl-button--icon"
onclick="startTour()">
<i class="material-icons">directions</i>
</button>
<div class="mdl-tooltip" data-mdl-for="tourIconButton">
Get a tour of the site
</div>
<button id="toggleTheme" class="mdl-button mdl-js-button mdl-button--raised mdl-button--icon"
onclick="toggleTheme()">
<i class="material-icons">style</i>
</button>
<div class="mdl-tooltip" data-mdl-for="toggleTheme">
Try <span id="alternateThemeName">MyUW White</span> theme
</div>
</div>
</div>
<p>
<strong>Our mission:</strong>
This small library of web components was created to provide developers across the UW-Madison campus with an
easy-to-use, framework agnostic
collection of elements that closely follows the design specifications of our university's User Experience
experts.
</p>
<h3>Interactive Demos</h3>
<p>Each entry in the table below has information about one of our components, the latest versions of which are
currently in use on this site.</p>
<div class="wrapper__table-scroll-wrapper">
<table class="mdl-data-table mdl-js-data-table">
<thead>
<tr>
<th class="mdl-data-table__cell--non-numeric">Component</th>
<th>Github link</th>
<th>Toggle visibility</th>
</tr>
</thead>
<tbody>
<tr id="tourHighlightAppBar" onclick="showDialog('topBarDialog');mediator.trigger('show-step-3');">
<td id="tourAnchorAppBar" class="mdl-data-table__cell--non-numeric">Top app bar</td>
<td><a href="https://github.com/myuw-web-components/myuw-app-bar" target="_blank"
onclick="event.stopImmediatePropagation()">myuw-app-bar</a></td>
<td>n/a</td>
</tr>
<tr onclick="showDialog('drawerDialog')">
<td class="mdl-data-table__cell--non-numeric">Navigation drawer</td>
<td><a href="https://github.com/myuw-web-components/myuw-drawer" target="_blank"
onclick="event.stopImmediatePropagation()">myuw-drawer</a></td>
<td>
<button id="toggleNav" aria-label="Hide navigation drawer" class="icon-button"
onclick="event.stopPropagation();toggleComponent('nav')">
<i id="navIconVisibilityTable" class="material-icons">visibility</i>
</button>
<div id="navToggleTooltip" class="mdl-tooltip" data-mdl-for="toggleNav">
Hide nav
</div>
</td>
</tr>
<tr onclick="showDialog('notificationsDialog')">
<td class="mdl-data-table__cell--non-numeric">Notifications <span class="badge__new-release"><i
class="material-icons">new_releases</i> (new 2019)</span></td>
<td><a href="https://github.com/myuw-web-components/myuw-notifications" target="_blank"
onclick="event.stopImmediatePropagation()">myuw-notifications</a></td>
<td>
<button id="toggleNotifications" aria-label="hide notifications component" class="icon-button"
onclick="event.stopImmediatePropagation();toggleComponent('notifications')">
<i id="notificationsIconVisibilityTable" class="material-icons">visibility</i>
</button>
<div id="notificationsToggleTooltip" class="mdl-tooltip" data-mdl-for="toggleNotifications">
Hide notifications
</div>
</td>
</tr>
<tr onclick="showDialog('bannerDialog')">
<td class="mdl-data-table__cell--non-numeric">Banner message <span class="badge__new-release"><i
class="material-icons">new_releases</i> (new 2019)</span></td>
<td><a href="https://github.com/myuw-web-components/myuw-banner" target="_blank"
onclick="event.stopImmediatePropagation()">myuw-banner</a></td>
<td>
<button id="toggleBanner" aria-label="hide banner component" class="icon-button"
onclick="event.stopImmediatePropagation();toggleComponent('banner')">
<i id="bannerIconVisibilityTable" class="material-icons">visibility</i>
</button>
<div id="bannerToggleTooltip" class="mdl-tooltip" data-mdl-for="toggleBanner">
Hide banner message
</div>
</td>
</tr>
<tr onclick="showDialog('searchDialog')">
<td class="mdl-data-table__cell--non-numeric">Search bar</td>
<td><a href="https://github.com/myuw-web-components/myuw-search" target="_blank"
onclick="event.stopImmediatePropagation()">myuw-search</a></td>
<td>
<button id="toggleSearch" aria-label="Hide search box" class="icon-button"
onclick="event.stopPropagation();toggleComponent('search')">
<i id="searchIconVisibilityTable" class="material-icons">visibility</i>
</button>
<div id="searchToggleTooltip" class="mdl-tooltip" data-mdl-for="toggleSearch">
Hide search
</div>
</td>
</tr>
<tr id="tourAnchorStep4" onclick="showDialog('profileDialog')">
<td class="mdl-data-table__cell--non-numeric">Profile button</td>
<td><a href="https://github.com/myuw-web-components/myuw-profile" target="_blank"
onclick="event.stopImmediatePropagation()">myuw-profile</a></td>
<td>
<button id="profileToggleButton" aria-label="Hide profile button" class="icon-button"
onclick="event.stopPropagation();toggleComponent('profile');mediator.trigger('enable-step-6');">
<i id="profileIconVisibilityTable" class="material-icons">visibility</i>
</button>
<div id="profileToggleTooltip" class="mdl-tooltip" data-mdl-for="profileToggleButton">
Hide profile
</div>
</td>
</tr>
<tr onclick="showDialog('helpDialog')">
<td class="mdl-data-table__cell--non-numeric">Help and feedback</td>
<td><a href="https://github.com/myuw-web-components/myuw-help" target="_blank"
onclick="event.stopImmediatePropagation()">myuw-help</a></td>
<td>
<button id="toggleHelp" aria-label="Hide help component" class="icon-button"
onclick="event.stopPropagation();toggleComponent('help')">
<i id="helpIconVisibilityTable" class="material-icons">visibility</i>
</button>
<div id="helpToggleTooltip" class="mdl-tooltip" data-mdl-for="toggleHelp">
Hide help
</div>
</td>
</tr>
<tr onclick="showDialog('badgeDialog')" style="height: 70px;">
<td class="mdl-data-table__cell--non-numeric">MyUW badge <span class="badge__new-release"><i
class="material-icons">new_releases</i> (new 2019)</span></td>
<td><a href="https://github.com/myuw-web-components/myuw-badge" target="_blank"
onclick="event.stopImmediatePropagation()">myuw-badge</a></td>
<td>
<button id="toggleBadge" aria-label="exclude badge from code generation" class="icon-button"
onclick="event.stopImmediatePropagation();toggleComponent('badge')">
<i id="badgeIconVisibilityTable" class="material-icons">visibility</i>
</button>
<div id="badgeToggleTooltip" class="mdl-tooltip" data-mdl-for="toggleBadge">
Exclude badge from code generation
</div>
</td>
</tr>
</tbody>
</table>
</div>
<h3>How to use this site</h3>
<p>The best way to get the most out of this site is to <a href="#" onclick="startTour()">take a quick tour.</a>
<p>Otherwise, you can follow these basic instructions:</p>
<ol>
<li class="font__small">Click a component's name in the table above</li>
<li class="font__small">Use the dialog that opens to customize the component however you like. <strong>Any
changes you make will be reflected live on this page.</strong></li>
<li class="font__small">When you've customized the page to your liking, scroll down to the "<a
href="#get-components">Get components</a>" section where you can generate the code for your custom
components that you can copy and paste into your own app/web page.</li>
<li class="font__small">Browse individual component pages (click the hamburger menu) to view usage and pattern
guidance before implementing them in your app.</li>
</ol>
</div>
</section>
<!-- Brief about section / mission statement -->
<section class="section__usage">
<div class="card">
<h2 id="get-components">Get components</h2>
<p>
The markup generated bythis tool will reflect any configuration options you have changed (or left unchanged)
while
experimenting with the demos.
</p>
<p><strong>Please note:</strong> The markup generated by this tool includes the <i>latest</i> 1.0+ version of
every component by default (the same ones used on the site). You can view the CHANGELOG.md file in each
component's
repository on Github to keep up to date.
Any breaking changes will result in a new major version (i.e. 2.0.0) and require manual updating to use.
</p>
<span id="tour-button__step5">
<button id="tour-button__step6-trigger" class="mdl-button mdl-js-button mdl-button--raised"
onclick="generateComponentMarkup()">Generate code</button>
</span>
<ol class="wrapper__code-wrapper">
<li>
Import components and dependencies into your document
<button id="copyImportsButton" class="icon-button" onclick="copyMarkup('generatedModuleImports')"><i
class="material-icons">file_copy</i></button>
<div class="mdl-tooltip" data-mdl-for="copyImportsButton">
Copy to clipboard
</div>
</li>
<!-- Module imports -->
<pre class="lang-markup"><code class="lang-markup" id="generatedModuleImports">
<!-- Script tags to import components will appear here -->
</code></pre>
<li>
<span>Add component HTML to your page</span>
<button id="copyComponentsButton" class="icon-button" onclick="copyMarkup('generatedTemplate')"><i
class="material-icons">file_copy</i></button>
<div class="mdl-tooltip" data-mdl-for="copyComponentsButton">
Copy to clipboard
</div>
</li>
<!-- Component markup -->
<pre><code class="lang-markup" id="generatedTemplate">
<!-- Component HTMl will appear here -->
</code></pre>
<li>
<span>Copy custom CSS variables</span>
<button id="copyCssButton" class="icon-button" onclick="copyMarkup('generatedCss')"><i
class="material-icons">file_copy</i></button>
<div class="mdl-tooltip" data-mdl-for="copyCssButton">
Copy to clipboard
</div>
</li>
<!-- CSS markup -->
<pre><code class="lang-css" id="generatedCss">
/* Custom CSS properties will appear here */
</code></pre>
<!-- Component javascript -->
<li id="customJsDescription">
<span>Custom javascript events</span>
<button id="copyJsButton" class="icon-button" onclick="copyMarkup('generatedJs')"><i
class="material-icons">file_copy</i></button>
<div class="mdl-tooltip" data-mdl-for="copyJsButton">
Copy to clipboard
</div>
</li>
<p><strong>myuw-help:</strong> When you know a user has an active session, dispatch the "myuw-login" custom
event to tell the profile component that someone is logged in.</p>
<p><strong>myuw-notifications:</strong> When you have organized the notifications you want to display, dispatch
the "myuw-has-notifications" custom event.</p>
<pre class="lang-js"><code class="lang-js" id="generatedJs">
/* Javascript events for selected components */
</code></pre>
</ol>
</div>
</section>
</div>
<!--
Dialogs for interactive content
-->
<!-- TOP BAR DIALOG -->
<div class="modal micromodal-slide mdl-dialog" id="topBarDialog">
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="topBarDialogTitle">
<div class="modal-title row">
<h4 id="topBarDialogTitle">Top app bar</h4>
<button id="closeBarDialog" class="icon-button close" onclick="closeDialog('topBarDialog')"><i
class="material-icons">close</i></button>
</div>
<main class="modal__content interactive">
<form name="topBarDemos">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="themeName" onkeydown="mediator.trigger('show-step-4');">
<label class="mdl-textfield__label" for="themeName">Theme name</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="appName">
<label class="mdl-textfield__label" for="appName">App name</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="appUrl">
<label class="mdl-textfield__label" for="appUrl">Title link</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="barBackground">
<label class="mdl-textfield__label" for="barBackground">Background color</label>
<div id="barBackgroundTooltip" class="mdl-tooltip" data-mdl-for="barBackground">
Accepts hex value, rgb, rgba, or plain text color
</div>
</div>
</form>
<div class="modal__actions">
<span id="tour-button__step3">
<button type="button" class="mdl-button md-js-button mdl-button--raised"
onclick="updateTopAppBar(event);mediator.trigger('show-step-5');">Update top bar</button>
</span>
</div>
</main>
</div>
</div>
</div>
<!-- NAVIGATION DRAWER DIALOG -->
<div class="modal micromodal-slide mdl-dialog" id="drawerDialog">
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="drawerDialogTitle">
<div class="modal-title row">
<h4 id="drawerDialogTitle">Navigation drawer</h4>
<div class="modal-title-controls row">
<button id="toggleDrawer" aria-label="Hide navigation drawer" class="icon-button"
onclick="toggleComponent('nav')">
<i id="navIconVisibility" class="material-icons">visibility</i>
</button>
<button id="closeDrawerDialog" type="button" class="icon-button close"
onclick="closeDialog('drawerDialog')"><i class="material-icons">close</i></button>
</div>
</div>
<main class="modal__content interactive">
<form name="drawerDemos" onsubmit="event.preventDefault(); addDrawerLink()">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="navItemLabel" required>
<label class="mdl-textfield__label" for="navItemLabel">Link text</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="navItemHref" required>
<label class="mdl-textfield__label" for="navItemHref">Link URL:</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="navItemIcon">
<label class="mdl-textfield__label" for="navItemIcon">Material icon</label>
</div>
<div class="modal__actions">
<button type="submit" class="mdl-button md-js-button mdl-button--raised">Add navigation link</button>
<span id="drawerHelperText" class="helper"></span>
</div>
</form>
<form name="drawerSubheaderDemo" onsubmit="event.preventDefault(); addSubheader()">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="subheaderName">
<label class="mdl-textfield__label" for="subheaderName">Subheader label</label>
</div>
<div style="display: inline-block">
<input class="checkbox" type="checkbox" id="subheaderDivider">
<label for="subheaderDivider">Show divider?</label>
</div>
<div class="modal__actions">
<button type="submit" class="mdl-button md-js-button mdl-button--raised">Add navigation subheader</button>
<span id="subheaderHelperText" class="helper"></span>
</div>
</form>
</main>
</div>
</div>
</div>
<!-- SEARCH BAR DIALOG -->
<div class="modal micromodal-slide mdl-dialog" id="searchDialog">
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="searchDialogTitle">
<div class="modal-title row">
<h4 id="searchDialogTitle">Search bar</h4>
<div class="modal-title-controls row">
<button id="toggleSearch" aria-label="Hide search bar component" class="icon-button"
onclick="toggleComponent('search')">
<i id="searchIconVisibility" class="material-icons">visibility</i>
</button>
<button id="closeSearchDialog" type="button" class="icon-button close"
onclick="closeDialog('searchDialog')"><i class="material-icons">close</i></button>
</div>
</div>
<main class="modal__content interactive">
<form name="profileDemos" onsubmit="event.preventDefault();updateSearchBar();">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="searchPlaceholder">
<label class="mdl-textfield__label" for="searchPlaceholder">Search box placeholder</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="searchAriaLabel">
<label class="mdl-textfield__label" for="searchAriaLabel">Search button aria-label</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="searchIcon">
<label class="mdl-textfield__label" for="searchIcon">Material icon</label>
</div>
<a aria-label="see material icons" id="searchIconInfo" class="icon-button"
href="https://material.io/tools/icons" target="_blank"><i class="material-icons">help</i></a>
<div id="materialIconTooltip" class="mdl-tooltip" data-mdl-for="searchIconInfo">
See available icons
</div>
<div class="form-control">
<label for="searchCallback">Choose search behavior: </label>
<select id="searchCallback" onchange="updateCallback(searchCallback.value)">
<option value="alert">Generate an alert</option>
<option value="yahoo">Change some text on screen</option>
</select>
</div>
<div class="modal__actions">
<button type="submit" class="mdl-button md-js-button mdl-button--raised">Update search component</button>
</div>
</form>
<h5>Guidance: Search behavior</h5>
<p>
The search component allows you to set a "callback" value on the root element. It is up to write the
corresponding function in your code. Without it, the search bar won't do anything when a search is submitted.
The example code below demonstrates how this page handles searches:
</p>
<pre class="language-js"><code id="searchCallbackCode"></code></pre>
</main>
</div>
</div>
</div>
<!-- PROFILE BUTTON INTERACTIVE CONTENT -->
<div class="modal micromodal-slide mdl-dialog" id="profileDialog">
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="profileDialogTitle">
<div class="modal-title row">
<h4 id="profileDialogTitle">Profile button/menu</h4>
<div class="modal-title-controls row">
<button id="toggleProfile" aria-label="Hide profile menu component" class="icon-button"
onclick="toggleComponent('profile')">
<i id="profileIconVisibility" class="material-icons">visibility</i>
</button>
<button id="closeProfileDialog" type="button" class="icon-button close"
onclick="closeDialog('profileDialog')"><i class="material-icons">close</i></button>
</div>
</div>
<main class="modal__content interactive">
<form name="profileDemos" onsubmit="event.preventDefault(); updateProfileTemplate()">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="profileColor">
<label class="mdl-textfield__label" for="profileColor">Profile button color</label>
</div>
<div id="profileColorTooltip" class="mdl-tooltip" data-mdl-for="profileColor">
Accepts hex value, rgb, rgba, or plain text color
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="loginUrl">
<label class="mdl-textfield__label" for="loginUrl">Login URL</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="logoutUrl">
<label class="mdl-textfield__label" for="logoutUrl">Logout URL</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="profileLinkLabel">
<label class="mdl-textfield__label" for="profileLinkLabel">Menu link text</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="profileLinkUrl">
<label class="mdl-textfield__label" for="profileLinkUrl">Menu link url</label>
</div>
<div class="modal__actions">
<button class="mdl-button md-js-button mdl-button--raised">Update profile component</button>
<span id="profileHelperText" class="helper"></span>
</div>
</form>
<h5>Example session states</h5>
<p>These buttons dispatch the "myuw-login" custom event. The component listens for this event and displays the
data it receives. See the component's readme on Github for more information.</p>
<div class="row" id="sessionStates">
<button aria-label="set no session" class="mdl-button md-js-button" onclick="noSession()" type="button">No
session</button>
<button aria-label="set alternate session" class="mdl-button md-js-button" onclick="setSession('Bucky')"
type="button">Known user session</button>
<button aria-label="restore demo session" class="mdl-button md-js-button" onclick="setSession()"
type="button">Generic session</button>
</div>
</main>
</div>
</div>
</div>
<!-- HELP AND FEEDBACK DIALOG -->
<div class="modal micromodal-slide mdl-dialog" id="helpDialog">
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="helpDialogTitle">
<div class="modal-title row">
<h4 id="helpDialogTitle">Help and feedback</h4>
<div class="modal-title-controls row">
<button id="toggleHelp" aria-label="Hide help component" class="icon-button"
onclick="toggleComponent('help')">
<i id="helpIconVisibility" class="material-icons">visibility</i>
</button>
<button id="closeHelpDialog" type="button" class="icon-button close" onclick="closeDialog('helpDialog')"><i
class="material-icons">close</i></button>
</div>
</div>
<main class="modal__content interactive">
<form name="helpDemos">
<div class="row mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="helpTitle">
<label class="mdl-textfield__label" for="helpTitle">Dialog heading</label>
</div>
<br>
<div class="row">
<input class="checkbox" type="checkbox" id="helpShowButton">
<label for="helpShowButton">Show icon button?</label>
</div>
<br>
<div class="row">
<input class="checkbox" type="checkbox" id="helpShowDefault">
<label for="helpShowDefault">Show default content?</label>
</div>
<br>
<div class="row html-textfield mdl-textfield mdl-js-textfield">
<textarea class="mdl-textfield__input" type="text" rows="5" id="helpContent"></textarea>
<label class="mdl-textfield__label" for="helpContent">Help dialog custom content</label>
<p><em>Note: Custom content will not be reflected in the live demo on this page, but will be included in the
generated code.</em></p>
</div>
</form>
<div class="modal__actions">
<button class="mdl-button md-js-button mdl-button--raised" type="button" onclick="updateHelpTemplate()">Update
help component</button>
<span id="helpHelperText" class="helper"></span>
</div>
</main>
</div>
</div>
</div>
<!-- NOTIFICATIONS DIALOG -->
<div class="modal micromodal-slide mdl-dialog" id="notificationsDialog">
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="notificationsDialogTitle">
<div class="modal-title row">
<h4 id="notificationsDialogTitle">Notifications bell and list</h4>
<div class="modal-title-controls row">
<button id="toggleNotifications" aria-label="Hide notifications menu component" class="icon-button"
onclick="toggleComponent('notifications')">
<i id="notificationsIconVisibility" class="material-icons">visibility</i>
</button>
<button id="closeNotificationsDialog" type="button" class="icon-button close"
onclick="closeDialog('notificationsDialog')"><i class="material-icons">close</i></button>
</div>
</div>
<main class="modal__content interactive">
<div class="modal__actions notifications">
<button class="mdl-button md-js-button mdl-button--raised" type="button"
onclick="event.stopPropagation(); getDemoNotifications();">Display demo notifications</button>
<span id="notificationsHelperText" class="helper"></span>
</div>
<h5>Add a new notification</h5>
<form name="notificationsDemos" onsubmit="event.preventDefault(); addNewNotification()">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="notificationId" required>
<label class="mdl-textfield__label" for="notificationId">Unique ID (e.g. "custom-id-1") </label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="notificationBody" required>
<label class="mdl-textfield__label" for="notificationBody">Notification text</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="actionButtonUrl" required>
<label class="mdl-textfield__label" for="actionButtonUrl">Action button URL</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="actionButtonLabel" required>
<label class="mdl-textfield__label" for="actionButtonLabel">Action button label (e.g. "Enroll now")</label>
</div>
<div class="modal__actions">
<button class="mdl-button md-js-button mdl-button--raised">Add notification</button>
<span id="newNotificationHelperText" class="helper"></span>
</div>
</form>
</main>
</div>
</div>
</div>
<!-- BANNER DIALOG -->
<div class="modal micromodal-slide mdl-dialog" id="bannerDialog">
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="bannerDialogTitle">
<div class="modal-title row">
<h4 id="bannerDialogTitle">Banner message</h4>
<div class="modal-title-controls row">
<button id="toggleBanner" aria-label="Hide banner message component" class="icon-button"
onclick="toggleComponent('banner')">
<i id="bannerIconVisibility" class="material-icons">visibility</i>
</button>
<button id="closeBannerDialog" type="button" class="icon-button close"
onclick="closeDialog('bannerDialog')"><i class="material-icons">close</i></button>
</div>
</div>
<main class="modal__content interactive">
<div class="modal__actions banner">
<button class="mdl-button md-js-button mdl-button--raised" type="button"
onclick="event.stopPropagation(); showTourBanner();">Display first-time tour banner</button>
<span id="bannerHelperText" class="helper"></span>
</div>
<h5>Change banner content</h5>
<form name="bannerDemos">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="bannerIcon">
<label class="mdl-textfield__label" for="bannerIcon">Banner icon</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="bannerMessage">
<label class="mdl-textfield__label" for="bannerMessage">Banner message</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="bannerConfirmingText">
<label class="mdl-textfield__label" for="bannerConfirmingText">Confirmation button text</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="bannerDismissiveText">
<label class="mdl-textfield__label" for="bannerDismissiveText">Dismissal button text</label>
</div>
<p style="margin: 8px 0 0">Only one of the following two fields is expected. If you provide values for both,
"confirmation url" will be used:</p>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="bannerConfirmingUrl">
<label class="mdl-textfield__label" for="bannerConfirmingUrl">Confirmation url</label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="bannerConfirmingCallback">
<label class="mdl-textfield__label" for="bannerConfirmingCallback">Confirmation callback name</label>
<span class="helper" style="position: absolute; margin: 4px 0;">Note: Expects a function to set "onclick"
attribute (e.g. <code>doTheThing()</code>)</span>
</div>
</form>
<div class="modal__actions">
<span id="tour-button__step3">
<button type="button" class="mdl-button md-js-button mdl-button--raised"
onclick="updateBanner(event)">Update banner component</button>
</span>
</div>
</main>
</div>
</div>
</div>
<!-- BADGE DIALOG -->
<div class="modal micromodal-slide mdl-dialog" id="badgeDialog">
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
<div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="badgeDialogTitle">
<div class="modal-title row">
<h4 id="badgeDialogTitle">MyUW badge</h4>
<div class="modal-title-controls row">
<button id="toggleBadge" aria-label="Exclude badge component from code generation" class="icon-button"
onclick="toggleComponent('badge')">
<i id="badgeIconVisibility" class="material-icons">visibility</i>
</button>
<button id="closeBadgeDialog" class="icon-button close" onclick="closeDialog('badgeDialog')"><i
class="material-icons">close</i></button>
</div>
</div>
<main class="modal__content interactive">
<div class="row" id="badgeDemo">
<form name="badgeDemos" onsubmit="event.preventDefault();">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" type="text" id="badgeUrl" placeholder="public.my.wisc.edu/web/apps/details/CourseGuide-Browse-Courses">
<label class="mdl-textfield__label" for="badgeUrl">URL</label>
</div>
<button type="button" class="mdl-button md-js-button mdl-button--raised"
onclick="updateDemoBadge(event, 'url');">Set URL</button><br><br>
<div class="row">
<input class="checkbox" type="checkbox" id="badgeDarkTheme" onchange="updateDemoBadge(event, 'theme')">
<label for="badgeDarkTheme">Use dark theme?</label>
</div>
<br>
<div class="row">
<input class="checkbox" type="checkbox" id="badgeWhiteBorder" onchange="updateDemoBadge(event, 'border')">
<label for="badgeWhiteBorder">Use white border?</label>
</div>
</form>
<div class="column">
<myuw-badge url="myuw-web-components.github.io"></myuw-badge>
<p>
<br>
<span id="badgeHelperText" class="helper"></span>
</p>
</div>
</div>
</main>
</div>
</div>
</div>