forked from mozbrick/brick
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.html
More file actions
1083 lines (749 loc) · 40.1 KB
/
docs.html
File metadata and controls
1083 lines (749 loc) · 40.1 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
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
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
<title>Brick </title>
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400">
<link rel="stylesheet" href="site/css/bootstrap.min.css">
<link rel="stylesheet" href="dist/brick.css"/>
<link rel="stylesheet" href="site/css/main.css">
<link rel="stylesheet" type="text/css" href="site/css/prettify.css">
</head>
<body>
<header class="site-header">
<nav class="navbar navbar-default navbar-fixed-top grayshade" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">
<img class="logo" src="site/img/logo.png">
Brick<small> 1.0.0-rc2</small>
</a>
</div>
<ul class="navbar-nav nav">
<li><a href="docs.html">
<span class="succinct">Docs</span>
<span class="verbose">Documentation & Demos</span>
</a></li>
<li><a href="download.html">
<span>Download</span>
</a></li>
<li><a href="http://github.com/mozilla/brick/">
<span>Github</span>
</a></li>
<li><a href="http://github.com/mozilla/brick/issues">
<span>Issues</span>
</a></li>
</ul>
</div>
</nav>
</header>
<article class="container">
<div class="row">
<div class="col-sm-3">
<div class="panel panel-default" id="sidebar">
<div class="panel-heading">
Components
</div>
<div class="list-group">
<a class="list-group-item scrollnav" href="#usage">Usage</a>
<a class="list-group-item scrollnav" href="#x-tag-appbar">appbar</a>
<a class="list-group-item scrollnav" href="#x-tag-calendar">calendar</a>
<a class="list-group-item scrollnav" href="#x-tag-deck">deck</a>
<a class="list-group-item scrollnav" href="#x-tag-flipbox">flipbox</a>
<a class="list-group-item scrollnav" href="#x-tag-layout">layout</a>
<a class="list-group-item scrollnav" href="#x-tag-slider">slider</a>
<a class="list-group-item scrollnav" href="#x-tag-tabbar">tabbar</a>
<a class="list-group-item scrollnav" href="#x-tag-toggle">toggle</a>
</div>
</div>
</div>
<div class="col-sm-9 docs">
<section id="usage">
<h1>Usage</h1>
<p>To include Brick in your project, include your downloaded stylesheet and script files in your project's page like normal:
<pre class="prettyprint"><link rel="stylesheet" type="text/css" href="brick-1.0.0-rc2.css"/><br/><script type="text/javascript" src="brick-1.0.0-rc2.js"></script></pre>
</p>
<p>Using any of Brick's components is as simple as including the respective tag in your HTML markup. (See individual component docs for details.)</p>
<p><b>Important:</b> To run code relying on any of Brick's tags, make sure to wait until the x-tags library's <code class="prettyprint">"DOMComponentsLoaded"</code> event instead of just <code>window.onload</code>:</p>
<pre class="prettyprint">document.addEventListener('DOMComponentsLoaded', function(){<br/> // run code here...<br/>});</pre>
</section>
<section id="x-tag-appbar" class="main-sect">
<h1>appbar
<small><a href="demos/x-tag-appbar/index.html">View Demo »</a></small>
</h1>
<h5 class="details">
<span>Tag: <small>x-appbar</small></span>
<span>Version: <small>0.2.11</small></span>
<span>Source: <small><a href="http://github.com/x-tag/appbar.git">
http://github.com/x-tag/appbar
</a></small></span>
<span>Bower: <small>x-tag-appbar</small></span>
</h5>
<p>An x-appbar is a simple component emulating the standard layout of a header seen at the top of a mobile application.</p>
<h2>Attributes</h2>
<dl>
<dt><code>heading</code></dt>
<dd>Edits the large header text.</dd>
</dl>
<dl>
<dt><code>subheading</code></dt>
<dd>Edits the small optional subheader text.</dd>
</dl>
<h2>Getters</h2>
<dl>
<dt><code>heading</code></dt>
<dd>Gets the large header text.</dd>
</dl>
<dl>
<dt><code>subheading</code></dt>
<dd>Gets the small optional subheader text.</dd>
</dl>
<h2>Setters</h2>
<dl>
<dt><code>heading</code></dt>
<dd>Sets the large header text.</dd>
</dl>
<dl>
<dt><code>subheading</code></dt>
<dd>Sets the small optional subheader text</dd>
</dl>
</section>
<section id="x-tag-calendar" class="main-sect">
<h1>calendar
<small><a href="demos/x-tag-calendar/index.html">View Demo »</a></small>
</h1>
<h5 class="details">
<span>Tag: <small>x-calendar</small></span>
<span>Version: <small>0.1.6</small></span>
<span>Source: <small><a href="http://github.com/x-tag/calendar.git">
http://github.com/x-tag/calendar
</a></small></span>
<span>Bower: <small>x-tag-calendar</small></span>
</h5>
<p>A component acting as a calendar widget that can be manipulated with minimal user-written code/layout.</p>
<h2>Attributes</h2>
<dl>
<dt><code>controls</code></dt>
<dd>Controls the visibility of the calendar's navigation controls; usage is similar to the 'controls' attribute of <video> elements</dd>
</dl>
<dl>
<dt><code>multiple</code></dt>
<dd>Controls whether or not multiple calendar dates can be chosen simultaneously</dd>
</dl>
<dl>
<dt><code>span</code></dt>
<dd>Specifies the number of months displayed at once by the calendar</dd>
</dl>
<dl>
<dt><code>view</code></dt>
<dd>Specifies the Date to focus the calendar display on. For example, a view of Dec 25 2013 and a span of 3 would result in a calendar displaying the months of Nov 2013, Dec 2013, and Jan 2014</dd>
</dl>
<dl>
<dt><code>chosen</code></dt>
<dd>Specifies the date or dates that are toggled as chosen on the calendar. Can be specified as either a singular parsable date string or as a JSON string representing a list of both singular dates and [Date, Date] lists of the start and end date for a range of dates</dd>
</dl>
<dl>
<dt><code>notoggle</code></dt>
<dd>If set, the default date-toggling behavior of the UI is disabled. However, dates can still be programmatically chosen/toggled.</dd>
</dl>
<h2>Methods</h2>
<dl>
<dt><code>render([preserveNodes])</code></dt>
<dd>Can be called to manually force a refresh of the calendar's HTML elements. Optionally takes a preserveNodes parameter to indicate that the existing DOM elements in the calendar should be not recreated (Useful when the viewing window of the calendar does not need to change)</dd>
</dl>
<dl>
<dt><code>prevMonth()</code></dt>
<dd>Go back one month by updating the 'view' attribute of the calendar.</dd>
</dl>
<dl>
<dt><code>nextMonth()</code></dt>
<dd>Advance one month forward by updating the 'view' attribute of the calendar.</dd>
</dl>
<dl>
<dt><code>toggleDateOn(dateObjToToggle, [append])</code></dt>
<dd>Sets the day corresponding to the given Date object as chosen. Depending on what is given for the append parameter, this either overrides the current chosen dates if append is falsy/not given, or adds to the list of chosen dates, if append is truthy. Also updates the 'chosen' attribute of the calendar</dd>
</dl>
<dl>
<dt><code>toggleDateOff(dateObjToToggle)</code></dt>
<dd>Removes the given date from the calendar's list of chosen dates. Also updates the 'chosen' attribute of the calendar</dd>
</dl>
<dl>
<dt><code>toggleDate(dateObjToToggle, [appendIfAdd])</code></dt>
<dd>Alternates the chosen status of the given date. Takes an 'appendIfAdded' parameter to determine how the new date replaces existing chosen dates if it is toggled on. Also updates the 'chosen' attribute of the calendar</dd>
</dl>
<dl>
<dt><code>hasVisibleDate(dateToCheck, [excludeBadMonths])</code></dt>
<dd>Determines whether or not the given date is in the visible calendar display of dates. Optionally ignores dates outside of the span of fully-visible months.</dd>
</dl>
<h2>Events</h2>
<dl>
<dt><code>datetoggleon</code></dt>
<dd>Fired when the UI sets a day as chosen. Passes the following extra datamap in e.detail: 'date' is the actual Date object corresponding to the chosen day, and 'iso' is the ISO-formatted string representation of the date</dd>
</dl>
<dl>
<dt><code>datetoggleoff</code></dt>
<dd>Fired when the UI sets a day as unchosen. Passes the following extra datamap in e.detail: 'date' is the actual Date object corresponding to the unchosen day, and 'iso' is the ISO-formatted string representation of the date</dd>
</dl>
<dl>
<dt><code>datetap</code></dt>
<dd>Fired when the user taps a day without starting a drag-paint over other dates. Passes the following extra datamap in e.detail: 'date' is the actual Date object corresponding to the unchosen day, and 'iso' is the ISO-formatted string representation of the date</dd>
</dl>
<h2>Getters</h2>
<dl>
<dt><code>firstVisibleMonth</code></dt>
<dd>Returns the Date corresponding to the first day in the first fully-visible month displayed by the calendar</dd>
</dl>
<dl>
<dt><code>lastVisibleMonth</code></dt>
<dd>Returns the Date corresponding to the first day in the last fully-visible month displayed by the calendar</dd>
</dl>
<dl>
<dt><code>customRenderFn</code></dt>
<dd>Returns the currently set custom rendering function, if any is set. (See 'customRenderFn' setter documentation for further details)</dd>
</dl>
<dl>
<dt><code>labels</code></dt>
<dd>The labels of a calendar are managed using a datamap of strings. This allows localizers/translators to edit the labels of the calendar. <br/> This getter returns a deepcopy of the labels datamap.</dd>
</dl>
<dl>
<dt><code>controls</code></dt>
<dd>Returns true if the 'controls' attribute is set and false otherwise</dd>
</dl>
<dl>
<dt><code>multiple</code></dt>
<dd>Returns true if the 'multiple' attribute is set and false otherwise</dd>
</dl>
<dl>
<dt><code>span</code></dt>
<dd>Returns the value of the 'span' attribute</dd>
</dl>
<dl>
<dt><code>view</code></dt>
<dd>Returns the value of the 'view' attribute in form of a Date object if available and null of otherwise</dd>
</dl>
<dl>
<dt><code>chosen</code></dt>
<dd>Returns the value of the 'chosen' attribute as a Date object/null if the 'multiple' attribute is false, and as a list of singular dates and [Date,Date] ranges of dates if the 'multiple' attribute is true</dd>
</dl>
<dl>
<dt><code>disableUIToggle</code></dt>
<dd>Returns true if the 'disable-ui-toggle' attribute is set and false otherwise</dd>
</dl>
<h2>Setters</h2>
<dl>
<dt><code>customRenderFn</code></dt>
<dd>Sets an additional function to call on individual days when rendering the calendar. Will be called with three parameters: the day's DOM element, the JS Date corresponding to the day, and the ISO-formatted string version of the date. This is useful when styles need to be more dynamically flexible than the default. IMPORTANT NOTE: because this is intended as an additional callback to be used in rendering, the function itself should not modify attributes in a way that would require a re-render of the calendar, or infinite recursion can result.</dd>
</dl>
<dl>
<dt><code>labels</code></dt>
<dd>When called, will edit the labels of the calendar. <br/><br/> The set value should be a JS object that can contain any of the following key:value pairs:<br/>- 'prev': a string to display on the previous-month navigation button<br/>- 'next': a string to display on the next-month navigation button<br/>- 'months': an array of 12 strings, where the first string corresponds to January, the second to February, etc, all the way up to December.<br/>- 'weekdays': an array of 7 strings, where the first string corresponds to Sunday, the second to Monday, etc, all the way up to Saturday.<br/><br/>If the new data given does not have any of these keys, that corresponding label will remain unchanged.</dd>
</dl>
<dl>
<dt><code>controls</code></dt>
<dd>If true, sets the 'controls' attribute. Otherwise, removes the 'controls' attribute.</dd>
</dl>
<dl>
<dt><code>multiple</code></dt>
<dd>If true, sets the 'multiple' attribute. Otherwise, removes the 'multiple' attribute.</dd>
</dl>
<dl>
<dt><code>span</code></dt>
<dd>Sets the value of the 'span' attribute</dd>
</dl>
<dl>
<dt><code>view</code></dt>
<dd>Sets the value of the 'view' attribute. Can be given either a JS Date object or a parsable string corresponding to a date</dd>
</dl>
<dl>
<dt><code>chosen</code></dt>
<dd>Sets the value of the 'chosen' attribute. Can always take either a JS Date Object or a parsable date string. If multiple is true, can also take a list of singular Dates/parasable date string and [Date, Date] lists of the start and end points of a range of date, as well a JSON string corresponding to such a list.</dd>
</dl>
<dl>
<dt><code>disableUIToggle</code></dt>
<dd>If true, sets the 'disable-ui-toggle' attribute. Otherwise, removes the 'disable-ui-toggle' attribute.</dd>
</dl>
</section>
<section id="x-tag-deck" class="main-sect">
<h1>deck
<small><a href="demos/x-tag-deck/index.html">View Demo »</a></small>
</h1>
<h5 class="details">
<span>Tag: <small>x-deck</small></span>
<span>Version: <small>0.2.2</small></span>
<span>Source: <small><a href="http://github.com/x-tag/deck.git">
http://github.com/x-tag/deck
</a></small></span>
<span>Bower: <small>x-tag-deck</small></span>
</h5>
<p>A box in which <x-card> elements can be cycled independently of order with a variety of different transitions</p>
<h2>Attributes</h2>
<dl>
<dt><code>loop</code></dt>
<dd>A boolean attribute that turns on/off the auto-looping feature when the x-deck has reached the beginning or end of its card index</dd>
</dl>
<dl>
<dt><code>transition-type</code></dt>
<dd>Allows the user to set a default animation type for cards. If this attribute is added to an individual single <x-card> element, the animation specified will be used in place of the <x-deck>'s default card animation. Valid options are the same as the <x-deck>'s transition-type attribute.</dd>
</dl>
<dl>
<dt><code>selected-index</code></dt>
<dd>Defines which card index will be displayed. If set in the initial markup, this will initialize the given card as the selected card.</dd>
</dl>
<h2>Methods</h2>
<dl>
<dt><code>showCard(index||element, [direction])</code></dt>
<dd>Transitions an x-card element to the shown state via index or card element reference. If given a direction of 'forward', will perform the forwards animation. If given 'reverse', will performs the reverse animation.</dd>
</dl>
<dl>
<dt><code>hideCard(index||element, [direction])</code></dt>
<dd>Transitions an x-card element to the hidden state via index or card element reference. If given a direction of 'forward', will perform the forwards animation. If given 'reverse', will performs the reverse animation.</dd>
</dl>
<dl>
<dt><code>nextCard(index||element, [direction])</code></dt>
<dd>Transitions to the next x-card in the deck. Takes an optional direction of 'forward' or 'reverse'.</dd>
</dl>
<dl>
<dt><code>previousCard(index||element, [direction])</code></dt>
<dd>Transitions to the previous x-card in the deck. Takes an optional direction of 'forward' or 'reverse'.</dd>
</dl>
<h2>Events</h2>
<dl>
<dt><code>show</code></dt>
<dd>Fired from a card target after it has completed its show animation, and the show state has been finalized.</dd>
</dl>
<dl>
<dt><code>hide</code></dt>
<dd>Fired from a card target after it has completed its hide animation, and the hide state has been finalized.</dd>
</dl>
<h2>Getters</h2>
<dl>
<dt><code>cards</code></dt>
<dd>Returns an array of all <x-card> elements within the <x-deck>.</dd>
</dl>
<dl>
<dt><code>selectedCard</code></dt>
<dd>Returns the <x-card> currently displayed in the deck.</dd>
</dl>
<dl>
<dt><code>transitionType</code></dt>
<dd>Returns the value of the 'transition-type' attribute.</dd>
</dl>
<dl>
<dt><code>selectedIndex</code></dt>
<dd>Returns the value of the 'selected-index' attribute.</dd>
</dl>
<h2>Setters</h2>
<dl>
<dt><code>selectedCard</code></dt>
<dd>Sets the provided <x-card> element as the selected card, and shows the element.</dd>
</dl>
<dl>
<dt><code>selectedIndex</code></dt>
<dd>Sets the value of the 'selected-index' attribute, and shows the card at that index</dd>
</dl>
<dl>
<dt><code>transitionType (also available on <x-card> elements)</code></dt>
<dd>Sets the transition override of the card.</dd>
</dl>
</section>
<section id="x-tag-flipbox" class="main-sect">
<h1>flipbox
<small><a href="demos/x-tag-flipbox/index.html">View Demo »</a></small>
</h1>
<h5 class="details">
<span>Tag: <small>x-flipbox</small></span>
<span>Version: <small>0.2.7</small></span>
<span>Source: <small><a href="http://github.com/x-tag/flipbox.git">
http://github.com/x-tag/flipbox
</a></small></span>
<span>Bower: <small>x-tag-flipbox</small></span>
</h5>
<p>Flips between two content elements with a CSS Animation, similar to flipping a playing card. The front face defaults to the first direct child element of the <x-flipbox>, and the back face defaults to the last direct child element.</p>
<h2>Attributes</h2>
<dl>
<dt><code>direction</code></dt>
<dd>Indicates which direction the flip-animation swivels towards. Valid options are 'right', 'left', 'up', and 'down'. Defaults to 'left'.</dd>
</dl>
<dl>
<dt><code>flipped</code></dt>
<dd>Boolean attribute indicating whether the back face of the flipbox is showing or not.</dd>
</dl>
<h2>Methods</h2>
<dl>
<dt><code>toggle()</code></dt>
<dd>Flips the card to its opposite face.</dd>
</dl>
<dl>
<dt><code>showFront()</code></dt>
<dd>Force the flipbox to flip to its front face.</dd>
</dl>
<dl>
<dt><code>showBack()</code></dt>
<dd>Force the flipbox to flip to its back face.</dd>
</dl>
<h2>Events</h2>
<dl>
<dt><code>flipend</code></dt>
<dd>The flipbox fires a flipend event whenever it fully finishes a flipping animation. This will not fire if the flipping animation is interrupted before completion.</dd>
</dl>
<dl>
<dt><code>show</code></dt>
<dd>If either the front face or the back face of the flipbox receives a show event, the flipbox will automatically show that side. <br/> Note: this event is not fired by the flipbox itself.</dd>
</dl>
<h2>Getters</h2>
<dl>
<dt><code>direction</code></dt>
<dd>Returns the current flip direction.</dd>
</dl>
<dl>
<dt><code>flipped</code></dt>
<dd>Returns true if flipped.</dd>
</dl>
<h2>Setters</h2>
<dl>
<dt><code>direction</code></dt>
<dd>The direction to flip. Valid values are right, left, up, and down.</dd>
</dl>
<dl>
<dt><code>flipped</code></dt>
<dd>Set whether the back face of the flipbox is showing or not.</dd>
</dl>
</section>
<section id="x-tag-layout" class="main-sect">
<h1>layout
<small><a href="demos/x-tag-layout/index.html">View Demo »</a></small>
</h1>
<h5 class="details">
<span>Tag: <small>x-layout</small></span>
<span>Version: <small>0.1.6</small></span>
<span>Source: <small><a href="http://github.com/x-tag/layout.git">
http://github.com/x-tag/layout
</a></small></span>
<span>Bower: <small>x-tag-layout</small></span>
</h5>
<p>A simple layout element that automatically stretches to fill the parent, with optional toggleable header and footer elements.</p>
<h2>Attributes</h2>
<dl>
<dt><code>maxcontent</code></dt>
<dd>If set, the maxcontent attribute specifies that any header/footer in the layout should be minimized to give the main content full screen space.</dd>
</dl>
<h2>Getters</h2>
<dl>
<dt><code>maxcontent</code></dt>
<dd>Returns whether the 'maxcontent' attribute is set or not.</dd>
</dl>
<h2>Setters</h2>
<dl>
<dt><code>maxcontent</code></dt>
<dd>Sets the 'maxcontent' attribute.</dd>
</dl>
</section>
<section id="x-tag-slider" class="main-sect">
<h1>slider
<small><a href="demos/x-tag-slider/index.html">View Demo »</a></small>
</h1>
<h5 class="details">
<span>Tag: <small>x-slider</small></span>
<span>Version: <small>0.1.7</small></span>
<span>Source: <small><a href="http://github.com/x-tag/slider.git">
http://github.com/x-tag/slider
</a></small></span>
<span>Bower: <small>x-tag-slider</small></span>
</h5>
<p>Polyfill on top of input type='range', providing a consistent UI regardless of whether type='range' is supported or not.</p>
<h2>Attributes</h2>
<dl>
<dt><code>polyfill</code></dt>
<dd>If set, the input is 'replaced' with our polyfill slider's event handlers and graphics.</dd>
</dl>
<dl>
<dt><code>max</code></dt>
<dd>Sets the maximum of the slider's range</dd>
</dl>
<dl>
<dt><code>min</code></dt>
<dd>Sets the minimum of the slider's range</dd>
</dl>
<dl>
<dt><code>step</code></dt>
<dd>Sets the step value of the slider's range</dd>
</dl>
<h2>Events</h2>
<dl>
<dt><code>change</code></dt>
<dd>Fired when the value of the slider changes</dd>
</dl>
<dl>
<dt><code>input</code></dt>
<dd>Fired the user attempts to change the value of the slider (such as with the mouse).</dd>
</dl>
<dl>
<dt><code>focus</code></dt>
<dd>Fired when the slider is focused on</dd>
</dl>
<dl>
<dt><code>blur</code></dt>
<dd>Fired when the slider loses focus</dd>
</dl>
<h2>Getters</h2>
<dl>
<dt><code>inputElem</code></dt>
<dd>Returns the DOM element of the actual underlying <input> element</dd>
</dl>
<dl>
<dt><code>max</code></dt>
<dd>Gets the maximum of the slider's range (as a number, not a string)</dd>
</dl>
<dl>
<dt><code>min</code></dt>
<dd>Gets the minimum of the slider's range (as a number, not a string)</dd>
</dl>
<dl>
<dt><code>step</code></dt>
<dd>Gets the step value of the slider's range (as a number, not a string)</dd>
</dl>
<dl>
<dt><code>polyfill</code></dt>
<dd>Returns whether the slider is in polyfill mode or not.</dd>
</dl>
<h2>Setters</h2>
<dl>
<dt><code>polyfill</code></dt>
<dd>If set, the input is 'replaced' with our polyfill slider's event handlers and graphics.</dd>
</dl>
<dl>
<dt><code>max</code></dt>
<dd>Sets the maximum of the slider's range</dd>
</dl>
<dl>
<dt><code>min</code></dt>
<dd>Sets the minimum of the slider's range</dd>
</dl>
<dl>
<dt><code>step</code></dt>
<dd>Sets the step value of the slider's range</dd>
</dl>
</section>
<section id="x-tag-tabbar" class="main-sect">
<h1>tabbar
<small><a href="demos/x-tag-tabbar/index.html">View Demo »</a></small>
</h1>
<h5 class="details">
<span>Tag: <small>x-tabbar</small></span>
<span>Version: <small>0.1.8</small></span>
<span>Source: <small><a href="http://github.com/x-tag/tabbar.git">
http://github.com/x-tag/tabbar
</a></small></span>
<span>Bower: <small>x-tag-tabbar</small></span>
</h5>
<p>Tab bars are used to display an app-level navigation/tabbing bar (usually at the bottom of the UI) that shows different content depending on which tab is selected.</p>
<h2>Attributes</h2>
<dl>
<dt><code>target-event</code></dt>
<dd>Sets a custom event type for the tabbar to fire on selected elements, instead of the default of 'show'. Can also be applied on x-tabbar-tabs instead to further provide granular control.</dd>
</dl>
<h2>Events</h2>
<dl>
<dt><code>reveal</code></dt>
<dd>The default event that a x-tabbar-tab will fire on its selected elements if not overridden by 'target-event'</dd>
</dl>
<h2>Getters</h2>
<dl>
<dt><code>tabs</code></dt>
<dd>Returns a list of the <x-tabbar-tab>s that are in the x-tabbar</dd>
</dl>
<dl>
<dt><code>targetEvent</code></dt>
<dd>Returns the name of the event any tabs that don't have overrides will be firing.</dd>
</dl>
<dl>
<dt><code>targetEvent (on x-tabbar-tab)</code></dt>
<dd>Returns the name of the event a single tabbar-tab will fire on its targets. Accounts for user-specified overrides.</dd>
</dl>
<dl>
<dt><code>targetSelector (on x-tabbar-tab)</code></dt>
<dd>Returns the CSS selector used to select the targets of a specific tab</dd>
</dl>
<dl>
<dt><code>targetElems (on x-tabbar-tab)</code></dt>
<dd>Returns a list of the elements currently selected as targets of the specific tab</dd>
</dl>
<h2>Setters</h2>
<dl>
<dt><code>targetEvent</code></dt>
<dd>Sets the name of the event any tabs that don't have overrides will be firing.</dd>
</dl>
<dl>
<dt><code>targetEvent (on x-tabbar-tab)</code></dt>
<dd>Sets the name of the event a single tabbar-tab will fire on its targets, overriding the parent x-tabbar's overall targetEvent.</dd>
</dl>
<dl>
<dt><code>targetSelector (on x-tabbar-tab)</code></dt>
<dd>Sets the CSS selector used to select the targets of a specific tab</dd>
</dl>
<dl>
<dt><code>targetElems (on x-tabbar-tab)</code></dt>
<dd>Assigns a list of DOM elements to be targets of the specific tab</dd>
</dl>
</section>
<section id="x-tag-toggle" class="main-sect">
<h1>toggle
<small><a href="demos/x-tag-toggle/index.html">View Demo »</a></small>
</h1>
<h5 class="details">
<span>Tag: <small>x-toggle</small></span>
<span>Version: <small>0.2.8</small></span>
<span>Source: <small><a href="http://github.com/x-tag/toggle.git">
http://github.com/x-tag/toggle
</a></small></span>
<span>Bower: <small>x-tag-toggle</small></span>
</h5>
<p>A polyfill merging radiobutton/checkbox inputs into a single tag to provide a consistent UI and simplify markup. Automatically switches between radiobutton and checkbox depending on name attribute.</p>
<h2>Attributes</h2>
<dl>
<dt><code>no-box</code></dt>
<dd>If set, hides the polyfill's checkbox/radio button.</dd>
</dl>
<dl>
<dt><code>label</code></dt>
<dd>Contains the raw HTML string to render as the toggle's label.</dd>
</dl>
<dl>
<dt><code>name</code></dt>
<dd>Handles the name of the input. Follows the same rules as radio/checkbox input naming, and is required for form submissions to see the input. Multiple <x-toggle>s with the same name automatically become radio buttons.</dd>
</dl>
<dl>
<dt><code>value</code></dt>
<dd>Handles the input's value. Acts the same as any other <input> tag's value, and is submitted in forms.</dd>
</dl>
<dl>
<dt><code>group</code></dt>
<dd>Checkboxes with the same group can be range-toggled by holding down the shift key while toggling checkboxes</dd>
</dl>
<dl>
<dt><code>active</code></dt>
<dd>Indicates whether or not the toggle is the currently active toggle in of its group, if it has one.</dd>
</dl>
<dl>
<dt><code>checked</code></dt>
<dd>Indicates whether the toggle is checked or not</dd>
</dl>
<h2>Getters</h2>
<dl>
<dt><code>groupToggles</code></dt>
<dd>Returns a list of all toggles sharing the same group</dd>
</dl>
<dl>
<dt><code>noBox</code></dt>
<dd>Returns the value of the no-box attribute</dd>
</dl>
<dl>
<dt><code>label</code></dt>
<dd>Returns the value of the label attribute</dd>
</dl>
<dl>
<dt><code>name</code></dt>
<dd>Returns the value of the name attribute</dd>
</dl>
<dl>
<dt><code>group</code></dt>
<dd>Returns the value of the group attribute</dd>
</dl>
<dl>
<dt><code>active</code></dt>
<dd>Returns the value of the active attribute</dd>
</dl>
<dl>
<dt><code>checked</code></dt>
<dd>Returns the value of the checked attribute</dd>
</dl>
<h2>Setters</h2>
<dl>
<dt><code>noBox</code></dt>
<dd>Sets the value of the no-box attribute</dd>
</dl>
<dl>
<dt><code>label</code></dt>
<dd>Sets the value of the label attribute</dd>
</dl>
<dl>
<dt><code>name</code></dt>
<dd>Sets the value of the name attribute</dd>
</dl>
<dl>
<dt><code>group</code></dt>
<dd>Sets the value of the group attribute</dd>
</dl>
<dl>
<dt><code>active</code></dt>
<dd>Sets the value of the active attribute</dd>
</dl>