-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
350 lines (332 loc) · 14 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
<!doctype html>
<html lang="en">
<head>
<title>Stellar</title>
<link href="../dist/font/inter/inter.css" rel="stylesheet" />
<link href="../dist/css/index.css" rel="stylesheet" />
<link href="./index.css" rel="stylesheet" />
<script src="./icons.js"></script>
</head>
<body>
<div class="header">
<div class="st-typography-displayH1 title">Stellar Design System</div>
<div class="st-typography-displayBody">
A CSS implementation of the Stellar design system for spacecraft operation tools.
</div>
</div>
<div>
<button onclick="switchTheme()" class="st-button secondary">Toggle Light/Dark Theme</button>
</div>
<section class="st-card">
<div class="st-typography-header">Button</div>
<div class="button-row">
<button class="st-button">Primary</button>
<button class="st-button" disabled>Disabled</button>
<button class="st-button secondary">Secondary</button>
<button class="st-button secondary" disabled>Disabled</button>
<button class="st-button tertiary">Tertiary</button>
<button class="st-button tertiary" disabled>Disabled</button>
<button class="st-button icon"><img src="../dist/icons/sol.svg" /></button>
<button class="st-button icon" disabled><img src="../dist/icons/sol.svg" /></button>
</div>
<br />
<div class="button-row">
<button class="st-button large">Primary</button>
<button class="st-button large" disabled>Disabled</button>
<button class="st-button large secondary">Secondary</button>
<button class="st-button large secondary" disabled>Disabled</button>
<button class="st-button large tertiary">Tertiary</button>
<button class="st-button large tertiary" disabled>Disabled</button>
<button class="st-button large icon"><img src="../dist/icons/sol.svg" /></button>
<button class="st-button large icon" disabled><img src="../dist/icons/sol.svg" /></button>
</div>
</section>
<section class="st-card">
<div class="st-typography-header">Input</div>
<div>
<input class="st-input" type="text" value="Hello, World!" />
<input class="st-input" type="password" value="Hello, World!" />
<input class="st-input" type="text" placeholder="Placeholder" />
<input class="st-input" type="text" placeholder="Disabled" disabled />
</div>
<br />
<div>
<input class="st-input error" type="text" placeholder="Error" value="Hello, World!" />
<input class="st-input warning" type="text" placeholder="Warning" />
</div>
</section>
<section class="st-card">
<div class="st-typography-header">Textarea</div>
<div>
<textarea placeholder="Placeholder that wraps to another line" class="st-input"></textarea>
<textarea placeholder="Placeholder that wraps to another line" class="st-input">
User input that wraps to another line
</textarea>
<textarea placeholder="Placeholder that wraps to another line" class="st-input no-resize">
Non-resizable textarea
</textarea>
</div>
</section>
<section class="st-card">
<div class="st-typography-header">Select</div>
<div>
<select class="st-select">
<option value="cat">Cat</option>
<option value="dog">Dog</option>
<option value="parrot">Parrot</option>
</select>
<select class="st-select" disabled>
<option value="disabled">Disabled</option>
</select>
<select class="st-select error">
<option value="error">Error</option>
</select>
</div>
</section>
<section class="st-card">
<div class="st-typography-header">Table</div>
<div>
<table class="st-table">
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
<th>Column 4</th>
</tr>
</thead>
<tbody>
<tr>
<td>Cell text</td>
<td>Cell text</td>
<td>Cell text</td>
<td>Cell text</td>
</tr>
<tr>
<td>Cell text</td>
<td>Cell text</td>
<td>Cell text</td>
<td>Cell text</td>
</tr>
<tr>
<td>Cell text</td>
<td>Cell text</td>
<td>Cell text</td>
<td>Cell text</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="st-card">
<div class="st-typography-header">Badge</div>
<div style="display: flex; gap: 8px">
<div class="st-badge">1</div>
<div class="st-badge">10</div>
<div class="st-badge">100</div>
<div class="st-badge">1000</div>
</div>
</section>
<section class="st-card">
<div class="st-typography-header">Typography</div>
<div style="gap: 4px; display: flex; flex-direction: column">
<div class="st-typography-displayH1">Display H1</div>
<div class="st-typography-displayH2">Display H2</div>
<div class="st-typography-displayH3">Display H3</div>
<div class="st-typography-displayBody">Display Body</div>
<div class="st-typography-header">Header</div>
<div class="st-typography-label">Label</div>
<div class="st-typography-body">Body</div>
<div class="st-typography-medium">Medium</div>
<div class="st-typography-bold">Bold</div>
<div class="st-typography-small-caps">Small Caps</div>
</div>
</section>
<section class="st-card">
<div class="st-typography-header">Color</div>
<div class="color-groups">
<div class="color-group">
<div class="color-square">
<div style="background: var(--st-gray-10)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 10</div>
<div class="st-typography-label">CSS Variable: --st-gray-10</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-gray-15)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 15</div>
<div class="st-typography-label">CSS Variable: --st-gray-15</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-gray-20)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 20</div>
<div class="st-typography-label">CSS Variable: --st-gray-20</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-gray-30)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 30</div>
<div class="st-typography-label">CSS Variable: --st-gray-30</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-gray-40)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 40</div>
<div class="st-typography-label">CSS Variable: --st-gray-40</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-gray-50)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 50</div>
<div class="st-typography-label">CSS Variable: --st-gray-50</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-gray-60)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 60</div>
<div class="st-typography-label">CSS Variable: --st-gray-60</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-gray-70)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 70</div>
<div class="st-typography-label">CSS Variable: --st-gray-70</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-gray-80)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 80</div>
<div class="st-typography-label">CSS Variable: --st-gray-80</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-gray-90)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 90</div>
<div class="st-typography-label">CSS Variable: --st-gray-90</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-gray-100)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Gray 100</div>
<div class="st-typography-label">CSS Variable: --st-gray-100</div>
</div>
</div>
</div>
<div class="color-group">
<div class="color-square">
<div style="background: var(--st-primary-10)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Primary 10</div>
<div class="st-typography-label">CSS Variable: --st-primary-10</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-primary-20)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Primary 20</div>
<div class="st-typography-label">CSS Variable: --st-primary-20</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-primary-30)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Primary 30</div>
<div class="st-typography-label">CSS Variable: --st-primary-30</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-primary-40)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Primary 40</div>
<div class="st-typography-label">CSS Variable: --st-primary-40</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-primary-50)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Primary 50</div>
<div class="st-typography-label">CSS Variable: --st-primary-50</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-primary-60)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Primary 60</div>
<div class="st-typography-label">CSS Variable: --st-primary-60</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-primary-70)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Primary 70</div>
<div class="st-typography-label">CSS Variable: --st-primary-70</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-primary-80)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Primary 80</div>
<div class="st-typography-label">CSS Variable: --st-primary-80</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-primary-90)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Primary 90</div>
<div class="st-typography-label">CSS Variable: --st-primary-90</div>
</div>
</div>
<div class="color-square">
<div style="background: var(--st-primary-100)" class="color"></div>
<div class="color-square-metadata">
<div class="st-typography-medium">Primary 100</div>
<div class="st-typography-label">CSS Variable: --st-primary-100</div>
</div>
</div>
</div>
</div>
</section>
<section class="st-card">
<div class="st-typography-header">Icons</div>
<div class="icons-container"></div>
</section>
<script type="text/javascript">
function switchTheme() {
document.documentElement.classList.toggle('st-theme-dark');
}
</script>
<script type="text/javascript">
const iconsContainer = document.querySelector('.icons-container');
for (const icon of window.icons) {
const iconContainer = document.createElement('div');
iconContainer.className = 'icon-container';
iconsContainer.appendChild(iconContainer);
const imgContainer = document.createElement('div');
imgContainer.className = 'img-container';
const img = document.createElement('img');
img.alt = icon;
img.height = '32';
img.src = `../dist/icons/${icon}`;
img.width = '32';
imgContainer.appendChild(img);
const label = document.createElement('div');
label.className = 'st-typography-label';
label.textContent = icon.replace(/\.svg/, '');
iconContainer.appendChild(imgContainer);
iconContainer.appendChild(label);
}
</script>
</body>
</html>