-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
151 lines (149 loc) · 4.92 KB
/
index.html
File metadata and controls
151 lines (149 loc) · 4.92 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Web Components</title>
<script src="modal.js"></script>
<script src="drawer.js"></script>
<script src="tree.js"></script>
<link rel="stylesheet" href="styles.css" />
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
rel="stylesheet"
/>
</head>
<body>
<!-- Drawer related structure -->
<section>
<div class="heading">Drawer Component</div>
<hr />
<uc-drawer>
<nav>
<div class="nav-item"><a href="#home">Home</a></div>
<div class="nav-item"><a href="#news">News</a></div>
<div class="nav-item"><a href="#contact">Contact</a></div>
<div class="nav-item"><a href="#about">About</a></div>
</nav>
</uc-drawer>
<button id="open-drawer-top" onclick="onDrawerOpenButtonClick('top')">
Open Drawer on Top
</button>
<button id="open-drawer-right" onclick="onDrawerOpenButtonClick('right')">
Open Drawer on Right
</button>
<button
id="open-drawer-bottom"
onclick="onDrawerOpenButtonClick('bottom')"
>
Open Drawer on Bottom
</button>
<button id="open-drawer-left" onclick="onDrawerOpenButtonClick('left')">
Open Drawer on Left
</button>
</section>
<!-- Modal related structure -->
<section>
<div class="heading">Modal Component</div>
<hr />
<div class="modal-component-section">
<uc-modal>
<div slot="modal-header">Modal Header</div>
<p>This is the default slot and here goes the modal content!</p>
</uc-modal>
<div class="modal-controls">
<label for="confirm-button-label">Confirm Button Label:</label><br />
<input
type="text"
id="confirm-button-label-input"
name="confirm-button-label"
/>
</div>
<div class="modal-controls">
<label for="cancel-button-label">Cancel Button Label:</label><br />
<input
type="text"
id="cancel-button-label-input"
name="cancel-button-label"
/>
</div>
<div class="modal-controls hide-cancel-button">
<label for="hide-cancel-button">Hide cancel button</label>
<input
type="checkbox"
id="hide-cancel-button-checkbox"
name="hide-cancel-button"
value="hide-cancel-button"
/>
</div>
<div class="modal-controls button-container">
<button id="reset-controls" onclick="onResetControlsButtonClick()">
Reset Controls
</button>
<button id="open-modal" onclick="onModalOpenButtonClick()">
Open Modal
</button>
</div>
</div>
</section>
<!-- Tree related structure -->
<section>
<div class="heading">Tree Component</div>
<hr />
<div class="tree-component-section">
<div class="tree-component">
<div class="sub-heading">Tree Component (selectable)</div>
<uc-tree selectable id="selectable-tree"></uc-tree>
<div>
<button
class="tree-set-selected"
onclick="onTreeSetSelectedButtonClick('selectable')"
>
Set selected node as Node 1-2-1
</button>
<button
class="tree-get-selected"
onclick="onTreeGetSelectedButtonClick('selectable')"
>
Get selected node
</button>
<button
class="tree-clear-selected"
onclick="onTreeClearSelectedButtonClick('selectable')"
>
Clear selection
</button>
</div>
</div>
<div class="tree-component">
<div class="sub-heading">Tree Component (un-selectable)</div>
<uc-tree id="un-selectable-tree"></uc-tree>
<div>
<button
class="tree-set-selected"
onclick="onTreeSetSelectedButtonClick()"
>
Set selected node as Node 1-2-1
</button>
<button
class="tree-get-selected"
onclick="onTreeGetSelectedButtonClick()"
>
Get selected node
</button>
<button
class="tree-clear-selected"
onclick="onTreeClearSelectedButtonClick()"
>
Clear selection
</button>
</div>
</div>
</div>
</section>
</body>
<script src="script.js"></script>
</html>