-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathpage-side-tabs.html
571 lines (393 loc) · 17.8 KB
/
page-side-tabs.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
---
layout: default
title: Side Tabs
permalink: /side-tabs/
is_searchable: true
---
<section>
<div class="sui-row-with-sidenav">
<!-- Navigation -->
<div class="sui-sidenav">
<ul class="sui-vertical-tabs sui-sidenav-hide-md">
<li class="sui-vertical-tab current">
<a href="#" data-tab="preview">Preview</a>
</li>
<li class="sui-vertical-tab">
<a href="#" data-tab="documentation">Documentation</a>
</li>
</ul>
</div>
<!-- SECTION: Preview -->
<div class="sui-box" data-tab="preview">
<div class="sui-box-header">
<h2 class="sui-box-title">Preview</h2>
</div>
<div class="sui-box-body">
<div class="sui-notice sui-notice-warning">
<div class="sui-notice-content">
<div class="sui-notice-message">
<span class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></span>
<p>If you are using individual js components, <code>tabs.js</code> file is required.</p>
</div>
</div>
</div>
<!-- Simple Tabs -->
<div class="sui-box-settings-row">
<div class="sui-box-settings-col-1">
<span class="sui-settings-label">Simple Tabs</span>
<span class="sui-description">These are regular tabs pointing each to its own content.</span>
</div>
<div class="sui-box-settings-col-2">
<div class="sui-tabs sui-side-tabs">
<div role="tablist" class="sui-tabs-menu">
<button type="button" role="tab" id="metrics__tab" class="sui-tab-item active" aria-controls="metrics__content" aria-selected="true">Metrics</button>
<button type="button" role="tab" id="audits__tab" class="sui-tab-item" aria-controls="audits__content" aria-selected="false" tabindex="-1">Audits</button>
<button type="button" role="tab" id="diagnostics__tab" class="sui-tab-item" aria-controls="diagnostics__content" aria-selected="false" tabindex="-1">Diagnostics</button>
</div>
<div class="sui-tabs-content">
<div role="tabpanel" tabindex="0" id="metrics__content" class="sui-tab-content active" aria-labelledby="metrics__tab">
<div class="sui-border-frame">
<h4>Metrics</h4>
<p>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Curabitur blandit tempus porttitor. Donec ullamcorper nulla non metus auctor fringilla. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vestibulum id ligula porta felis euismod semper.</p>
</div>
</div>
<div role="tabpanel" tabindex="0" id="audits__content" class="sui-tab-content" aria-labelledby="audits__tab" hidden>
<div class="sui-border-frame">
<h4>Audits</h4>
<p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Etiam porta sem malesuada magna mollis euismod. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla.</p>
</div>
</div>
<div role="tabpanel" tabindex="0" id="diagnostics__content" class="sui-tab-content" aria-labelledby="diagnostics__tab" hidden>
<div class="sui-border-frame">
<h4>Diagnostics</h4>
<p>Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Nullam quis risus eget urna mollis ornare vel eu leo. Donec sed odio dui.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Radio Button Tabs -->
<div class="sui-box-settings-row">
<div class="sui-box-settings-col-1">
<span class="sui-settings-label">Radio Button Tabs</span>
<span class="sui-description">These are simple tabs with radio inputs.</span>
</div>
<div class="sui-box-settings-col-2">
<div class="sui-tabs sui-side-tabs">
<div role="tablist" class="sui-tabs-menu">
<button type="button" role="tab" id="default__tab" class="sui-tab-item active" aria-controls="default__content" aria-selected="true">Default</button>
<input type="radio" name="form-design" value="default" class="sui-screen-reader-text" aria-label="Default" aria-hidden="true" checked="checked" />
<button type="button" role="tab" id="flat__tab" class="sui-tab-item" aria-controls="flat__content" aria-selected="false" tabindex="-1">Flat</button>
<input type="radio" name="form-design" value="flat" class="sui-screen-reader-text" aria-label="Flat" aria-hidden="true" />
<button type="button" role="tab" id="bold__tab" class="sui-tab-item" aria-controls="bold__content" aria-selected="false" tabindex="-1">Bold</button>
<input type="radio" name="form-design" value="bold" class="sui-screen-reader-text" aria-label="Bold" aria-hidden="true" />
<button type="button" role="tab" id="material__tab" class="sui-tab-item" aria-controls="material__content" aria-selected="false" tabindex="-1">Material</button>
<input type="radio" name="form-design" value="material" class="sui-screen-reader-text" aria-label="Material" aria-hidden="true" />
<button type="button" role="tab" id="none__tab" class="sui-tab-item" aria-selected="false" tabindex="-1">None</button>
<input type="radio" name="form-design" value="none" class="sui-screen-reader-text" aria-label="None" aria-hidden="true" />
</div>
<div class="sui-tabs-content">
<div role="tabpanel" tabindex="0" id="default__content" class="sui-tab-content active" aria-labelledby="default__tab">
<div class="sui-border-frame">
<h4>Default</h4>
<p>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Curabitur blandit tempus porttitor. Donec ullamcorper nulla non metus auctor fringilla. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vestibulum id ligula porta felis euismod semper.</p>
</div>
</div>
<div role="tabpanel" tabindex="0" id="flat__content" class="sui-tab-content" aria-labelledby="flat__tab" hidden>
<div class="sui-border-frame">
<h4>Flat</h4>
<p>Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Etiam porta sem malesuada magna mollis euismod. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla.</p>
</div>
</div>
<div role="tabpanel" tabindex="0" id="bold__content" class="sui-tab-content" aria-labelledby="bold__tab" hidden>
<div class="sui-border-frame">
<h4>Bold</h4>
<p>Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Nullam quis risus eget urna mollis ornare vel eu leo. Donec sed odio dui.</p>
</div>
</div>
<div role="tabpanel" tabindex="0" id="material__content" class="sui-tab-content" aria-labelledby="material__tab" hidden>
<div class="sui-border-frame">
<h4>Material</h4>
<p>Vestibulum id ligula porta felis euismod semper. Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Curabitur blandit tempus porttitor. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec ullamcorper nulla non metus auctor fringilla.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="sui-notice sui-notice-warning" style="margin-bottom: 10px;">
<div class="sui-notice-content">
<div class="sui-notice-message">
<span class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></span>
<p>If you are using individual js components, <code>side-tabs.js</code> file is required.</p>
</div>
</div>
</div>
<div class="sui-notice sui-notice-warning">
<div class="sui-notice-content">
<div class="sui-notice-message">
<span class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></span>
<p>If DOM already initialized, make sure to call <code>SUI.sideTabs( this )</code> function for each <code>.sui-side-tabs label.sui-tab-item input</code> element.</p>
</div>
</div>
</div>
<!-- Radio Buttons Only -->
<div class="sui-box-settings-row">
<div class="sui-box-settings-col-1">
<h3 class="sui-settings-label">Radio Buttons Only</h3>
<p class="sui-description">Input radio buttons styled as tab selectors with no content to show.</p>
</div>
<div class="sui-box-settings-col-2">
<div class="sui-side-tabs">
<div class="sui-tabs-menu">
<label id="hustle-feature-image-left-label" for="hustle-feature-image-left" class="sui-tab-item active">
<input type="radio" name="feature_image_position" value="left" id="hustle-feature-image-left" aria-selected="true" checked="checked">
Yes
</label>
<label id="hustle-feature-image-right-label" for="hustle-feature-image-right" class="sui-tab-item">
<input type="radio" name="feature_image_position" value="right" id="hustle-feature-image-right" aria-selected="false">
No
</label>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- SECTION: Documentation -->
<div class="sui-box" data-tab="documentation" style="display: none;">
<div class="sui-box-header">
<h2 class="sui-box-title">Documentation</h2>
</div>
<div class="sui-box-body">
<!-- ROW: Specifications -->
<div
id="showcase-specs"
version="2.12.5"
utilities-page="{{ site.baseurl }}/utilities/"
monochrome="true"
rtl-lang="true"
></div>
<!-- ROW: Sample Markup -->
<div class="sui-box-settings-row">
<div class="sui-box-settings-col-1">
<h3 class="sui-settings-label">Sample Markup</h3>
</div>
<div class="sui-box-settings-col-2">
<div class="sui-tabs sui-tabs-flushed">
<div role="tablist" class="sui-tabs-menu">
<button type="button" role="tab" id="simple-tabs" class="sui-tab-item active" style="padding-top: 0;" aria-controls="simple-tabs__content" aria-selected="true">Simple Tabs</button>
<button type="button" role="tab" id="radio-tabs" class="sui-tab-item" style="padding-top: 0;" aria-controls="radio-tabs__content" aria-selected="false" tabindex="-1">Radio Tabs</button>
<button type="button" role="tab" id="radio-only" class="sui-tab-item" style="padding-top: 0;" aria-controls="radio-only__content" aria-selected="false" tabindex="-1">Radio Only</button>
</div>
<div class="sui-tabs-content">
<div role="tabpanel" tabindex="0" id="simple-tabs__content" class="sui-tab-content active" aria-labelledby="simple-tabs">
<div class="sui-notice sui-notice-warning">
<div class="sui-notice-content">
<div class="sui-notice-message">
<span class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></span>
<p>If you are using individual js components, <code>tabs.js</code> file is required. For more info go to <a href="/shared-ui/tabs/">tabs documentation</a>.</p>
</div>
</div>
</div>
<div class="demo-code-block">
<pre class="sui-code-snippet html">
<div class="sui-tabs sui-side-tabs">
<div role="tablist" class="sui-tabs-menu">
<!--
NOTE(S):
1. Include "type" attribute when using tabs inside a form to prevent
problems when submitting the form.
2. Include "aria-controls" attribute when using tabs with content.
3. Unique IDs are a must for button tab and its content.
-->
<button
type="button"
role="tab"
id="one__tab"
class="sui-tab-item active"
aria-controls="one__content"
aria-selected="true">
Tab 1
</button>
<button
type="button"
role="tab"
id="two__tab"
class="sui-tab-item"
aria-controls="two__content"
aria-selected="false"
tabindex="-1">
Tab 2
</button>
</div>
<div class="sui-tabs-content">
<div
role="tabpanel"
id="one__content"
class="sui-tab-content active"
aria-labelledby="one__tab"
tabindex="0">
<div class="sui-border-frame">
<p>Tab 1</p>
</div>
</div>
<div
role="tabpanel"
id="two__content"
class="sui-tab-content"
aria-labelledby="two__tab"
tabindex="0"
hidden>
<div class="sui-border-frame">
<p>Tab 2</p>
</div>
</div>
<div
role="tabpanel"
id="sample-tab__three--content"
class="sui-tab-content"
aria-labelledby="sample-tab__three"
tabindex="0"
hidden>
<div class="sui-border-frame">
<p>Tab 3</p>
</div>
</div>
</div>
</div>
</pre>
</div>
</div>
<div role="tabpanel" tabindex="0" id="radio-tabs__content" class="sui-tab-content" aria-labelledby="radio-tabs" hidden>
<div class="sui-notice sui-notice-warning">
<div class="sui-notice-content">
<div class="sui-notice-message">
<span class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></span>
<p>If you are using individual js components, <code>tabs.js</code> file is required.</p>
</div>
</div>
</div>
<div class="demo-code-block">
<pre class="sui-code-snippet html">
<div class="sui-tabs sui-side-tabs">
<div role="tablist" class="sui-tabs-menu">
<!--
NOTE(S):
1. Include "type" attribute when using tabs inside a form to prevent
problems when submitting the form.
2. Include "aria-controls" attribute when using tabs with content.
3. Unique IDs are a must for button tab and its content.
-->
<button
type="button"
role="tab"
id="one__tab"
class="sui-tab-item active"
aria-controls="one__content"
aria-selected="true">
Tab 1
</button>
<input
type="radio"
name="sample-tabs"
value="one"
class="sui-screen-reader-text"
aria-label="Tab 1"
aria-hidden="true"
checked="checked" />
<button
type="button"
role="tab"
id="two__tab"
class="sui-tab-item"
aria-controls="two__content"
aria-selected="false"
tabindex="-1">
Tab 2
</button>
<input
type="radio"
name="sample-tabs"
value="two"
class="sui-screen-reader-text"
aria-label="Tab 2"
aria-hidden="true" />
</div>
<div class="sui-tabs-content">
<div role="tabpanel"
id="one__content"
class="sui-tab-content active"
aria-labelledby="one__tab"
tabindex="0">
<div class="sui-border-frame">
<p>Tab 1</p>
</div>
</div>
<div role="tabpanel"
id="two__content"
class="sui-tab-content"
aria-labelledby="two__tab"
tabindex="0"
hidden>
<div class="sui-border-frame">
<p>Tab 2</p>
</div>
</div>
</div>
</div>
</pre>
</div>
</div>
<div role="tabpanel" tabindex="0" id="radio-only__content" class="sui-tab-content" aria-labelledby="radio-only" hidden>
<div class="sui-notice sui-notice-warning" style="margin-bottom: 10px;">
<div class="sui-notice-content">
<div class="sui-notice-message">
<span class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></span>
<p>If you are using individual js components, <code>side-tabs.js</code> file is required.</p>
</div>
</div>
</div>
<div class="sui-notice sui-notice-warning">
<div class="sui-notice-content">
<div class="sui-notice-message">
<span class="sui-notice-icon sui-icon-warning-alert sui-md" aria-hidden="true"></span>
<p>If DOM already initialized, make sure to call <code>SUI.sideTabs( this )</code> function for each <code>.sui-side-tabs label.sui-tab-item input</code> element.</p>
</div>
</div>
</div>
<div class="demo-code-block">
<pre class="sui-code-snippet html">
<div class="sui-side-tabs">
<div class="sui-tabs-menu">
<label id="one__label" for="one__option" class="sui-tab-item active">
<input
type="radio"
name="sample-tabs"
value="one"
id="one__option"
checked="checked">
Option 1
</label>
<label id="two__label" for="two__option" class="sui-tab-item">
<input
type="radio"
name="sample-tabs"
value="two"
id="two__option">
Option 2
</label>
</div>
</div>
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>