-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
198 lines (172 loc) · 6.06 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>StarDust</title>
<style>
@import url("https://fonts.googleapis.com/css2?family=Lexend&display=swap");
body {
font-family: "Lexend", Arial, Helvetica, sans-serif;
}
:root {
min-height: 100vh;
}
</style>
<script type="module" src="/src/stardust.ts"></script>
</head>
<body>
<sd-drawer id="$drawer" position="left" fixed>
<sd-button onclick="$drawer.open=!$drawer.open">CLOSE DRAWER</sd-button>
<sd-button
onclick="document.documentElement[document.documentElement.hasAttribute('data-dark-mode')?'removeAttribute':'setAttribute']('data-dark-mode','')"
>
toggle darkmode
</sd-button>
</sd-drawer>
<sd-modal id="$modal" open>
<p>Hello,World!</p>
<p onclick="$modal.open=false">[close]</p>
</sd-modal>
<sd-button onclick="$drawer.open=!$drawer.open">OPEN DRAWER</sd-button>
<sd-dragger percentage style="left: 50%; top: 50%">
<div data-draggable style="width: 10em">title (draggable)</div>
<div style="width: 10em">CONTENT (not draggable)</div>
</sd-dragger>
<sd-button onclick="$modal.open=true">SD-BUTTON</sd-button>
<sd-checkbox checked disabled>
<span slot="before">(</span>
▪
<span slot="after">)</span>
</sd-checkbox>
<sd-checkbox style="--size: 2em">?</sd-checkbox>
<sd-switch>
<span slot="before">(</span>
<span slot="after">)</span>
</sd-switch>
<sd-switch style="--size: 2em">G</sd-switch>
<sd-radio-group>
<sd-radio>Radio1</sd-radio>
<sd-radio>Radio2</sd-radio>
</sd-radio-group>
<sd-card>
<div slot="header">
<h1>StarDust!</h1>
</div>
<script>
document.write(new URL("./dist/stardust.js", location).href);
document.write("<br>");
document.write(new URL("./dist/style.css", location).href);
</script>
<div slot="footer">
<p>this is a sd-card</p>
</div>
</sd-card>
<sd-card>
<sd-loading>
<span slot="loading"> <sd-spinner></sd-spinner></span>
<p>This</p>
<p>is</p>
<p>content</p>
</sd-loading>
</sd-card>
<sd-detail>
<span slot="summary"> this is summary </span>
this is detail
</sd-detail>
<table>
<caption>
Table Caption
</caption>
<thead>
<tr>
<th>Table Heading 1</th>
<th>Table Heading 2</th>
<th>Table Heading 3</th>
<th>Table Heading 4</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Table Footer 1</th>
<th>Table Footer 2</th>
<th>Table Footer 3</th>
<th>Table Footer 4</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Table Cell 1</td>
<td>Table Cell 2</td>
<td>Table Cell 3</td>
<td>Table Cell 4</td>
</tr>
<tr>
<td>Table Cell 1</td>
<td>Table Cell 2</td>
<td>Table Cell 3</td>
<td>Table Cell 4</td>
</tr>
<tr>
<td>Table Cell 1</td>
<td>Table Cell 2</td>
<td>Table Cell 3</td>
<td>Table Cell 4</td>
</tr>
<tr>
<td>Table Cell 1</td>
<td>Table Cell 2</td>
<td>Table Cell 3</td>
<td>Table Cell 4</td>
</tr>
</tbody>
</table>
<table>
<tr>
<th>a</th>
<th>b</th>
<th>c</th>
</tr>
<tr>
<td>111</td>
<td>222</td>
<td>333</td>
</tr>
</table>
<sd-tabs tab="1">
<sd-tab>AA</sd-tab>
<sd-tab>BB</sd-tab>
<sd-tab>CC</sd-tab>
</sd-tabs>
<sd-slider step="5" min="10" max="50" value="25"></sd-slider>
<sd-slider step="0" min="10" max="50" value="20"></sd-slider>
<sd-tree node="NodeName" has-child>
<span slot="node">NodeName in HTML</span>
<sd-tree node="subtree" has-child>
<sd-tree node="sub111"></sd-tree>
<sd-tree node="sub222"></sd-tree>
</sd-tree>
</sd-tree>
<sd-select multiple style="--max-width: 10em">
<sd-option value="0">the first option is soooooooooooo long</sd-option>
<sd-option value="1" selected>middle</sd-option>
<sd-option value="2" disabled>the last one</sd-option>
</sd-select>
<sd-float position="center-right" fixed>
<p>I'm floating!</p>
</sd-float>
<sd-box display="block" p="1em">
<sd-input placeholder="please type here...">
<span slot="before">@</span>
</sd-input>
<sd-input disabled placeholder="please type here...">
<span slot="after">@</span>
</sd-input>
</sd-box>
<sd-input-text value="Hello!">😀</sd-input-text>
<sd-progress value="12"></sd-progress>
<sd-textarea></sd-textarea>
<sd-divider position="right">The End</sd-divider>
<sd-fab fixed backtop autohide></sd-fab>
</body>
</html>