rails-uikit-sass 2.27.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/README.md +43 -0
  4. data/lib/assets/stylesheets/rails-uikit-sass.scss +3 -0
  5. data/lib/rails-uikit-sass.rb +12 -0
  6. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  7. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  8. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  9. data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
  10. data/vendor/assets/javascripts/components/accordion.js +180 -0
  11. data/vendor/assets/javascripts/components/accordion.min.js +2 -0
  12. data/vendor/assets/javascripts/components/autocomplete.js +340 -0
  13. data/vendor/assets/javascripts/components/autocomplete.min.js +2 -0
  14. data/vendor/assets/javascripts/components/datepicker.js +3167 -0
  15. data/vendor/assets/javascripts/components/datepicker.min.js +3 -0
  16. data/vendor/assets/javascripts/components/form-password.js +67 -0
  17. data/vendor/assets/javascripts/components/form-password.min.js +2 -0
  18. data/vendor/assets/javascripts/components/form-select.js +85 -0
  19. data/vendor/assets/javascripts/components/form-select.min.js +2 -0
  20. data/vendor/assets/javascripts/components/grid-parallax.js +168 -0
  21. data/vendor/assets/javascripts/components/grid-parallax.min.js +2 -0
  22. data/vendor/assets/javascripts/components/grid.js +540 -0
  23. data/vendor/assets/javascripts/components/grid.min.js +2 -0
  24. data/vendor/assets/javascripts/components/htmleditor.js +679 -0
  25. data/vendor/assets/javascripts/components/htmleditor.min.js +2 -0
  26. data/vendor/assets/javascripts/components/lightbox.js +588 -0
  27. data/vendor/assets/javascripts/components/lightbox.min.js +2 -0
  28. data/vendor/assets/javascripts/components/nestable.js +653 -0
  29. data/vendor/assets/javascripts/components/nestable.min.js +2 -0
  30. data/vendor/assets/javascripts/components/notify.js +189 -0
  31. data/vendor/assets/javascripts/components/notify.min.js +2 -0
  32. data/vendor/assets/javascripts/components/pagination.js +147 -0
  33. data/vendor/assets/javascripts/components/pagination.min.js +2 -0
  34. data/vendor/assets/javascripts/components/parallax.js +462 -0
  35. data/vendor/assets/javascripts/components/parallax.min.js +2 -0
  36. data/vendor/assets/javascripts/components/search.js +92 -0
  37. data/vendor/assets/javascripts/components/search.min.js +2 -0
  38. data/vendor/assets/javascripts/components/slider.js +552 -0
  39. data/vendor/assets/javascripts/components/slider.min.js +2 -0
  40. data/vendor/assets/javascripts/components/slideset.js +523 -0
  41. data/vendor/assets/javascripts/components/slideset.min.js +2 -0
  42. data/vendor/assets/javascripts/components/slideshow-fx.js +382 -0
  43. data/vendor/assets/javascripts/components/slideshow-fx.min.js +2 -0
  44. data/vendor/assets/javascripts/components/slideshow.js +596 -0
  45. data/vendor/assets/javascripts/components/slideshow.min.js +2 -0
  46. data/vendor/assets/javascripts/components/sortable.js +688 -0
  47. data/vendor/assets/javascripts/components/sortable.min.js +2 -0
  48. data/vendor/assets/javascripts/components/sticky.js +364 -0
  49. data/vendor/assets/javascripts/components/sticky.min.js +2 -0
  50. data/vendor/assets/javascripts/components/timepicker.js +192 -0
  51. data/vendor/assets/javascripts/components/timepicker.min.js +2 -0
  52. data/vendor/assets/javascripts/components/tooltip.js +235 -0
  53. data/vendor/assets/javascripts/components/tooltip.min.js +2 -0
  54. data/vendor/assets/javascripts/components/upload.js +262 -0
  55. data/vendor/assets/javascripts/components/upload.min.js +2 -0
  56. data/vendor/assets/javascripts/core/alert.js +66 -0
  57. data/vendor/assets/javascripts/core/alert.min.js +2 -0
  58. data/vendor/assets/javascripts/core/button.js +156 -0
  59. data/vendor/assets/javascripts/core/button.min.js +2 -0
  60. data/vendor/assets/javascripts/core/core.js +820 -0
  61. data/vendor/assets/javascripts/core/core.min.js +2 -0
  62. data/vendor/assets/javascripts/core/cover.js +87 -0
  63. data/vendor/assets/javascripts/core/cover.min.js +2 -0
  64. data/vendor/assets/javascripts/core/dropdown.js +534 -0
  65. data/vendor/assets/javascripts/core/dropdown.min.js +2 -0
  66. data/vendor/assets/javascripts/core/grid.js +117 -0
  67. data/vendor/assets/javascripts/core/grid.min.js +2 -0
  68. data/vendor/assets/javascripts/core/modal.js +387 -0
  69. data/vendor/assets/javascripts/core/modal.min.js +2 -0
  70. data/vendor/assets/javascripts/core/nav.js +153 -0
  71. data/vendor/assets/javascripts/core/nav.min.js +2 -0
  72. data/vendor/assets/javascripts/core/offcanvas.js +197 -0
  73. data/vendor/assets/javascripts/core/offcanvas.min.js +2 -0
  74. data/vendor/assets/javascripts/core/scrollspy.js +209 -0
  75. data/vendor/assets/javascripts/core/scrollspy.min.js +2 -0
  76. data/vendor/assets/javascripts/core/smooth-scroll.js +62 -0
  77. data/vendor/assets/javascripts/core/smooth-scroll.min.js +2 -0
  78. data/vendor/assets/javascripts/core/switcher.js +307 -0
  79. data/vendor/assets/javascripts/core/switcher.min.js +2 -0
  80. data/vendor/assets/javascripts/core/tab.js +169 -0
  81. data/vendor/assets/javascripts/core/tab.min.js +2 -0
  82. data/vendor/assets/javascripts/core/toggle.js +124 -0
  83. data/vendor/assets/javascripts/core/toggle.min.js +2 -0
  84. data/vendor/assets/javascripts/core/touch.js +175 -0
  85. data/vendor/assets/javascripts/core/touch.min.js +2 -0
  86. data/vendor/assets/javascripts/core/utility.js +335 -0
  87. data/vendor/assets/javascripts/core/utility.min.js +2 -0
  88. data/vendor/assets/javascripts/uikit.js +3898 -0
  89. data/vendor/assets/javascripts/uikit.min.js +3 -0
  90. data/vendor/assets/stylesheets/components/accordion.scss +94 -0
  91. data/vendor/assets/stylesheets/components/autocomplete.scss +107 -0
  92. data/vendor/assets/stylesheets/components/datepicker.scss +197 -0
  93. data/vendor/assets/stylesheets/components/dotnav.scss +212 -0
  94. data/vendor/assets/stylesheets/components/form-advanced.scss +128 -0
  95. data/vendor/assets/stylesheets/components/form-file.scss +63 -0
  96. data/vendor/assets/stylesheets/components/form-password.scss +74 -0
  97. data/vendor/assets/stylesheets/components/form-select.scss +66 -0
  98. data/vendor/assets/stylesheets/components/htmleditor.scss +269 -0
  99. data/vendor/assets/stylesheets/components/nestable.scss +231 -0
  100. data/vendor/assets/stylesheets/components/notify.scss +190 -0
  101. data/vendor/assets/stylesheets/components/placeholder.scss +66 -0
  102. data/vendor/assets/stylesheets/components/progress.scss +173 -0
  103. data/vendor/assets/stylesheets/components/search.scss +309 -0
  104. data/vendor/assets/stylesheets/components/slidenav.scss +183 -0
  105. data/vendor/assets/stylesheets/components/slider.scss +139 -0
  106. data/vendor/assets/stylesheets/components/slideshow.scss +208 -0
  107. data/vendor/assets/stylesheets/components/sortable.scss +124 -0
  108. data/vendor/assets/stylesheets/components/sticky.scss +57 -0
  109. data/vendor/assets/stylesheets/components/tooltip.scss +178 -0
  110. data/vendor/assets/stylesheets/components/upload.scss +34 -0
  111. data/vendor/assets/stylesheets/core/alert.scss +141 -0
  112. data/vendor/assets/stylesheets/core/animation.scss +599 -0
  113. data/vendor/assets/stylesheets/core/article.scss +139 -0
  114. data/vendor/assets/stylesheets/core/badge.scss +110 -0
  115. data/vendor/assets/stylesheets/core/base.scss +563 -0
  116. data/vendor/assets/stylesheets/core/block.scss +155 -0
  117. data/vendor/assets/stylesheets/core/breadcrumb.scss +86 -0
  118. data/vendor/assets/stylesheets/core/button.scss +406 -0
  119. data/vendor/assets/stylesheets/core/close.scss +132 -0
  120. data/vendor/assets/stylesheets/core/column.scss +209 -0
  121. data/vendor/assets/stylesheets/core/comment.scss +172 -0
  122. data/vendor/assets/stylesheets/core/contrast.scss +493 -0
  123. data/vendor/assets/stylesheets/core/cover.scss +70 -0
  124. data/vendor/assets/stylesheets/core/description-list.scss +71 -0
  125. data/vendor/assets/stylesheets/core/dropdown.scss +283 -0
  126. data/vendor/assets/stylesheets/core/flex.scss +320 -0
  127. data/vendor/assets/stylesheets/core/form.scss +629 -0
  128. data/vendor/assets/stylesheets/core/grid.scss +731 -0
  129. data/vendor/assets/stylesheets/core/icon.scss +930 -0
  130. data/vendor/assets/stylesheets/core/list.scss +102 -0
  131. data/vendor/assets/stylesheets/core/modal.scss +343 -0
  132. data/vendor/assets/stylesheets/core/nav.scss +468 -0
  133. data/vendor/assets/stylesheets/core/navbar.scss +325 -0
  134. data/vendor/assets/stylesheets/core/offcanvas.scss +203 -0
  135. data/vendor/assets/stylesheets/core/overlay.scss +534 -0
  136. data/vendor/assets/stylesheets/core/pagination.scss +197 -0
  137. data/vendor/assets/stylesheets/core/panel.scss +332 -0
  138. data/vendor/assets/stylesheets/core/print.scss +61 -0
  139. data/vendor/assets/stylesheets/core/subnav.scss +213 -0
  140. data/vendor/assets/stylesheets/core/switcher.scss +38 -0
  141. data/vendor/assets/stylesheets/core/tab.scss +368 -0
  142. data/vendor/assets/stylesheets/core/table.scss +147 -0
  143. data/vendor/assets/stylesheets/core/text.scss +136 -0
  144. data/vendor/assets/stylesheets/core/thumbnail.scss +122 -0
  145. data/vendor/assets/stylesheets/core/thumbnav.scss +122 -0
  146. data/vendor/assets/stylesheets/core/utility.scss +610 -0
  147. data/vendor/assets/stylesheets/core/variables.scss +23 -0
  148. data/vendor/assets/stylesheets/uikit-mixins.scss +327 -0
  149. data/vendor/assets/stylesheets/uikit-variables.scss +819 -0
  150. data/vendor/assets/stylesheets/uikit.scss +52 -0
  151. metadata +251 -0
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(t){"use strict";function o(o,e,i,n){if(o=t.$(o),e=t.$(e),i=i||window.innerWidth,n=n||o.offset(),e.length){var r=e.outerWidth();if(o.css("min-width",r),"right"==t.langdirection){var s=i-(e.offset().left+r),d=i-(o.offset().left+o.outerWidth());o.css("margin-right",s-d)}else o.css("margin-left",e.offset().left-n.left)}}var e,i=!1,n={x:{"bottom-left":"bottom-right","bottom-right":"bottom-left","bottom-center":"bottom-center","top-left":"top-right","top-right":"top-left","top-center":"top-center","left-top":"right-top","left-bottom":"right-bottom","left-center":"right-center","right-top":"left-top","right-bottom":"left-bottom","right-center":"left-center"},y:{"bottom-left":"top-left","bottom-right":"top-right","bottom-center":"top-center","top-left":"bottom-left","top-right":"bottom-right","top-center":"bottom-center","left-top":"left-bottom","left-bottom":"left-top","left-center":"left-center","right-top":"right-bottom","right-bottom":"right-top","right-center":"right-center"},xy:{"bottom-left":"top-right","bottom-right":"top-left","bottom-center":"top-center","top-left":"bottom-right","top-right":"bottom-left","top-center":"bottom-center","left-top":"right-bottom","left-bottom":"right-top","left-center":"right-center","right-top":"left-bottom","right-bottom":"left-top","right-center":"left-center"}};t.component("dropdown",{defaults:{mode:"hover",pos:"bottom-left",offset:0,remaintime:800,justify:!1,boundary:t.$win,delay:0,dropdownSelector:".uk-dropdown,.uk-dropdown-blank",hoverDelayIdle:250,preventflip:!1},remainIdle:!1,boot:function(){var o=t.support.touch?"click":"mouseenter";t.$html.on(o+".dropdown.uikit focus pointerdown","[data-uk-dropdown]",function(e){var i=t.$(this);if(!i.data("dropdown")){var n=t.dropdown(i,t.Utils.options(i.attr("data-uk-dropdown")));("click"==e.type||"mouseenter"==e.type&&"hover"==n.options.mode)&&n.element.trigger(o),n.dropdown.length&&e.preventDefault()}})},init:function(){var o=this;this.dropdown=this.find(this.options.dropdownSelector),this.offsetParent=this.dropdown.parents().filter(function(){return-1!==t.$.inArray(t.$(this).css("position"),["relative","fixed","absolute"])}).slice(0,1),this.offsetParent.length||(this.offsetParent=this.element),this.centered=this.dropdown.hasClass("uk-dropdown-center"),this.justified=this.options.justify?t.$(this.options.justify):!1,this.boundary=t.$(this.options.boundary),this.boundary.length||(this.boundary=t.$win),this.dropdown.hasClass("uk-dropdown-up")&&(this.options.pos="top-left"),this.dropdown.hasClass("uk-dropdown-flip")&&(this.options.pos=this.options.pos.replace("left","right")),this.dropdown.hasClass("uk-dropdown-center")&&(this.options.pos=this.options.pos.replace(/(left|right)/,"center")),this.element.attr("aria-haspopup","true"),this.element.attr("aria-expanded",this.element.hasClass("uk-open")),this.dropdown.attr("aria-hidden","true"),"click"==this.options.mode||t.support.touch?this.on("click.uk.dropdown",function(e){var i=t.$(e.target);i.parents(o.options.dropdownSelector).length||((i.is("a[href='#']")||i.parent().is("a[href='#']")||o.dropdown.length&&!o.dropdown.is(":visible"))&&e.preventDefault(),i.blur()),o.element.hasClass("uk-open")?(!o.dropdown.find(e.target).length||i.is(".uk-dropdown-close")||i.parents(".uk-dropdown-close").length)&&o.hide():o.show()}):this.on("mouseenter",function(){o.trigger("pointerenter.uk.dropdown",[o]),o.remainIdle&&clearTimeout(o.remainIdle),e&&clearTimeout(e),i&&i==o||(e=i&&i!=o?setTimeout(function(){e=setTimeout(o.show.bind(o),o.options.delay)},o.options.hoverDelayIdle):setTimeout(o.show.bind(o),o.options.delay))}).on("mouseleave",function(){e&&clearTimeout(e),o.remainIdle=setTimeout(function(){i&&i==o&&o.hide()},o.options.remaintime),o.trigger("pointerleave.uk.dropdown",[o])}).on("click",function(e){var n=t.$(e.target);return o.remainIdle&&clearTimeout(o.remainIdle),i&&i==o?((!o.dropdown.find(e.target).length||n.is(".uk-dropdown-close")||n.parents(".uk-dropdown-close").length)&&o.hide(),void 0):((n.is("a[href='#']")||n.parent().is("a[href='#']"))&&e.preventDefault(),o.show(),void 0)})},show:function(){t.$html.off("click.outer.dropdown"),i&&i!=this&&i.hide(!0),e&&clearTimeout(e),this.trigger("beforeshow.uk.dropdown",[this]),this.checkDimensions(),this.element.addClass("uk-open"),this.element.attr("aria-expanded","true"),this.dropdown.attr("aria-hidden","false"),this.trigger("show.uk.dropdown",[this]),t.Utils.checkDisplay(this.dropdown,!0),t.Utils.focus(this.dropdown),i=this,this.registerOuterClick()},hide:function(t){this.trigger("beforehide.uk.dropdown",[this,t]),this.element.removeClass("uk-open"),this.remainIdle&&clearTimeout(this.remainIdle),this.remainIdle=!1,this.element.attr("aria-expanded","false"),this.dropdown.attr("aria-hidden","true"),this.trigger("hide.uk.dropdown",[this,t]),i==this&&(i=!1)},registerOuterClick:function(){var o=this;t.$html.off("click.outer.dropdown"),setTimeout(function(){t.$html.on("click.outer.dropdown",function(n){e&&clearTimeout(e);t.$(n.target);i!=o||o.element.find(n.target).length||(o.hide(!0),t.$html.off("click.outer.dropdown"))})},10)},checkDimensions:function(){if(this.dropdown.length){this.dropdown.removeClass("uk-dropdown-top uk-dropdown-bottom uk-dropdown-left uk-dropdown-right uk-dropdown-stack uk-dropdown-autoflip").css({topLeft:"",left:"",marginLeft:"",marginRight:""}),this.justified&&this.justified.length&&this.dropdown.css("min-width","");var e,i=t.$.extend({},this.offsetParent.offset(),{width:this.offsetParent[0].offsetWidth,height:this.offsetParent[0].offsetHeight}),r=this.options.offset,s=this.dropdown,d=(s.show().offset()||{left:0,top:0},s.outerWidth()),h=s.outerHeight(),p=this.boundary.width(),l=(this.boundary[0]!==window&&this.boundary.offset()?this.boundary.offset():{top:0,left:0},this.options.pos),a={"bottom-left":{top:0+i.height+r,left:0},"bottom-right":{top:0+i.height+r,left:0+i.width-d},"bottom-center":{top:0+i.height+r,left:0+i.width/2-d/2},"top-left":{top:0-h-r,left:0},"top-right":{top:0-h-r,left:0+i.width-d},"top-center":{top:0-h-r,left:0+i.width/2-d/2},"left-top":{top:0,left:0-d-r},"left-bottom":{top:0+i.height-h,left:0-d-r},"left-center":{top:0+i.height/2-h/2,left:0-d-r},"right-top":{top:0,left:0+i.width+r},"right-bottom":{top:0+i.height-h,left:0+i.width+r},"right-center":{top:0+i.height/2-h/2,left:0+i.width+r}},f={};if(e=l.split("-"),f=a[l]?a[l]:a["bottom-left"],this.justified&&this.justified.length)o(s.css({left:0}),this.justified,p);else if(this.options.preventflip!==!0){var u;switch(this.checkBoundary(i.left+f.left,i.top+f.top,d,h,p)){case"x":"x"!==this.options.preventflip&&(u=n.x[l]||"right-top");break;case"y":"y"!==this.options.preventflip&&(u=n.y[l]||"top-left");break;case"xy":this.options.preventflip||(u=n.xy[l]||"right-bottom")}u&&(e=u.split("-"),f=a[u]?a[u]:a["bottom-left"],s.addClass("uk-dropdown-autoflip"),this.checkBoundary(i.left+f.left,i.top+f.top,d,h,p)&&(e=l.split("-"),f=a[l]?a[l]:a["bottom-left"]))}d>p&&(s.addClass("uk-dropdown-stack"),this.trigger("stack.uk.dropdown",[this])),s.css(f).css("display","").addClass("uk-dropdown-"+e[0])}},checkBoundary:function(o,e,i,n,r){var s="";return(0>o||o-t.$win.scrollLeft()+i>r)&&(s+="x"),(e-t.$win.scrollTop()<0||e-t.$win.scrollTop()+n>window.innerHeight)&&(s+="y"),s}}),t.component("dropdownOverlay",{defaults:{justify:!1,cls:"",duration:200},boot:function(){t.ready(function(o){t.$("[data-uk-dropdown-overlay]",o).each(function(){var o=t.$(this);o.data("dropdownOverlay")||t.dropdownOverlay(o,t.Utils.options(o.attr("data-uk-dropdown-overlay")))})})},init:function(){var e=this;this.justified=this.options.justify?t.$(this.options.justify):!1,this.overlay=this.element.find("uk-dropdown-overlay"),this.overlay.length||(this.overlay=t.$('<div class="uk-dropdown-overlay"></div>').appendTo(this.element)),this.overlay.addClass(this.options.cls),this.on({"beforeshow.uk.dropdown":function(t,i){e.dropdown=i,e.justified&&e.justified.length&&o(e.overlay.css({display:"block",marginLeft:"",marginRight:""}),e.justified,e.justified.outerWidth())},"show.uk.dropdown":function(){var o=e.dropdown.dropdown.outerHeight(!0);e.dropdown.element.removeClass("uk-open"),e.overlay.stop().css("display","block").animate({height:o},e.options.duration,function(){e.dropdown.dropdown.css("visibility",""),e.dropdown.element.addClass("uk-open"),t.Utils.checkDisplay(e.dropdown.dropdown,!0)}),e.pointerleave=!1},"hide.uk.dropdown":function(){e.overlay.stop().animate({height:0},e.options.duration)},"pointerenter.uk.dropdown":function(){clearTimeout(e.remainIdle)},"pointerleave.uk.dropdown":function(){e.pointerleave=!0}}),this.overlay.on({mouseenter:function(){e.remainIdle&&(clearTimeout(e.dropdown.remainIdle),clearTimeout(e.remainIdle))},mouseleave:function(){e.pointerleave&&i&&(e.remainIdle=setTimeout(function(){i&&i.hide()},i.options.remaintime))}})}})}(UIkit);
@@ -0,0 +1,117 @@
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(UI) {
3
+
4
+ "use strict";
5
+
6
+ var grids = [];
7
+
8
+ UI.component('gridMatchHeight', {
9
+
10
+ defaults: {
11
+ target : false,
12
+ row : true,
13
+ ignorestacked : false,
14
+ observe : false
15
+ },
16
+
17
+ boot: function() {
18
+
19
+ // init code
20
+ UI.ready(function(context) {
21
+
22
+ UI.$('[data-uk-grid-match]', context).each(function() {
23
+ var grid = UI.$(this), obj;
24
+
25
+ if (!grid.data('gridMatchHeight')) {
26
+ obj = UI.gridMatchHeight(grid, UI.Utils.options(grid.attr('data-uk-grid-match')));
27
+ }
28
+ });
29
+ });
30
+ },
31
+
32
+ init: function() {
33
+
34
+ var $this = this;
35
+
36
+ this.columns = this.element.children();
37
+ this.elements = this.options.target ? this.find(this.options.target) : this.columns;
38
+
39
+ if (!this.columns.length) return;
40
+
41
+ UI.$win.on('load resize orientationchange', (function() {
42
+
43
+ var fn = function() {
44
+ if ($this.element.is(':visible')) $this.match();
45
+ };
46
+
47
+ UI.$(function() { fn(); });
48
+
49
+ return UI.Utils.debounce(fn, 50);
50
+ })());
51
+
52
+ if (this.options.observe) {
53
+
54
+ UI.domObserve(this.element, function(e) {
55
+ if ($this.element.is(':visible')) $this.match();
56
+ });
57
+ }
58
+
59
+ this.on('display.uk.check', function(e) {
60
+ if(this.element.is(':visible')) this.match();
61
+ }.bind(this));
62
+
63
+ grids.push(this);
64
+ },
65
+
66
+ match: function() {
67
+
68
+ var firstvisible = this.columns.filter(':visible:first');
69
+
70
+ if (!firstvisible.length) return;
71
+
72
+ var stacked = Math.ceil(100 * parseFloat(firstvisible.css('width')) / parseFloat(firstvisible.parent().css('width'))) >= 100;
73
+
74
+ if (stacked && !this.options.ignorestacked) {
75
+ this.revert();
76
+ } else {
77
+ UI.Utils.matchHeights(this.elements, this.options);
78
+ }
79
+
80
+ return this;
81
+ },
82
+
83
+ revert: function() {
84
+ this.elements.css('min-height', '');
85
+ return this;
86
+ }
87
+ });
88
+
89
+ UI.component('gridMargin', {
90
+
91
+ defaults: {
92
+ cls : 'uk-grid-margin',
93
+ rowfirst : 'uk-row-first'
94
+ },
95
+
96
+ boot: function() {
97
+
98
+ // init code
99
+ UI.ready(function(context) {
100
+
101
+ UI.$('[data-uk-grid-margin]', context).each(function() {
102
+ var grid = UI.$(this), obj;
103
+
104
+ if (!grid.data('gridMargin')) {
105
+ obj = UI.gridMargin(grid, UI.Utils.options(grid.attr('data-uk-grid-margin')));
106
+ }
107
+ });
108
+ });
109
+ },
110
+
111
+ init: function() {
112
+
113
+ var stackMargin = UI.stackMargin(this.element, this.options);
114
+ }
115
+ });
116
+
117
+ })(UIkit);
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(t){"use strict";var i=[];t.component("gridMatchHeight",{defaults:{target:!1,row:!0,ignorestacked:!1,observe:!1},boot:function(){t.ready(function(i){t.$("[data-uk-grid-match]",i).each(function(){var i,n=t.$(this);n.data("gridMatchHeight")||(i=t.gridMatchHeight(n,t.Utils.options(n.attr("data-uk-grid-match"))))})})},init:function(){var n=this;this.columns=this.element.children(),this.elements=this.options.target?this.find(this.options.target):this.columns,this.columns.length&&(t.$win.on("load resize orientationchange",function(){var i=function(){n.element.is(":visible")&&n.match()};return t.$(function(){i()}),t.Utils.debounce(i,50)}()),this.options.observe&&t.domObserve(this.element,function(){n.element.is(":visible")&&n.match()}),this.on("display.uk.check",function(){this.element.is(":visible")&&this.match()}.bind(this)),i.push(this))},match:function(){var i=this.columns.filter(":visible:first");if(i.length){var n=Math.ceil(100*parseFloat(i.css("width"))/parseFloat(i.parent().css("width")))>=100;return n&&!this.options.ignorestacked?this.revert():t.Utils.matchHeights(this.elements,this.options),this}},revert:function(){return this.elements.css("min-height",""),this}}),t.component("gridMargin",{defaults:{cls:"uk-grid-margin",rowfirst:"uk-row-first"},boot:function(){t.ready(function(i){t.$("[data-uk-grid-margin]",i).each(function(){var i,n=t.$(this);n.data("gridMargin")||(i=t.gridMargin(n,t.Utils.options(n.attr("data-uk-grid-margin"))))})})},init:function(){t.stackMargin(this.element,this.options)}})}(UIkit);
@@ -0,0 +1,387 @@
1
+ /*! UIkit 2.27.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(UI) {
3
+
4
+ "use strict";
5
+
6
+ var active = false, activeCount = 0, $html = UI.$html, body;
7
+
8
+ UI.$win.on('resize orientationchange', UI.Utils.debounce(function(){
9
+ UI.$('.uk-modal.uk-open').each(function(){
10
+ return UI.$(this).data('modal') && UI.$(this).data('modal').resize();
11
+ });
12
+ }, 150));
13
+
14
+ UI.component('modal', {
15
+
16
+ defaults: {
17
+ keyboard: true,
18
+ bgclose: true,
19
+ minScrollHeight: 150,
20
+ center: false,
21
+ modal: true
22
+ },
23
+
24
+ scrollable: false,
25
+ transition: false,
26
+ hasTransitioned: true,
27
+
28
+ init: function() {
29
+
30
+ if (!body) body = UI.$('body');
31
+
32
+ if (!this.element.length) return;
33
+
34
+ var $this = this;
35
+
36
+ this.paddingdir = 'padding-' + (UI.langdirection == 'left' ? 'right':'left');
37
+ this.dialog = this.find('.uk-modal-dialog');
38
+
39
+ this.active = false;
40
+
41
+ // Update ARIA
42
+ this.element.attr('aria-hidden', this.element.hasClass('uk-open'));
43
+
44
+ this.on('click', '.uk-modal-close', function(e) {
45
+ e.preventDefault();
46
+ $this.hide();
47
+ }).on('click', function(e) {
48
+
49
+ var target = UI.$(e.target);
50
+
51
+ if (target[0] == $this.element[0] && $this.options.bgclose) {
52
+ $this.hide();
53
+ }
54
+ });
55
+
56
+ UI.domObserve(this.element, function(e) { $this.resize(); });
57
+ },
58
+
59
+ toggle: function() {
60
+ return this[this.isActive() ? 'hide' : 'show']();
61
+ },
62
+
63
+ show: function() {
64
+
65
+ if (!this.element.length) return;
66
+
67
+ var $this = this;
68
+
69
+ if (this.isActive()) return;
70
+
71
+ if (this.options.modal && active) {
72
+ active.hide(true);
73
+ }
74
+
75
+ this.element.removeClass('uk-open').show();
76
+ this.resize(true);
77
+
78
+ if (this.options.modal) {
79
+ active = this;
80
+ }
81
+
82
+ this.active = true;
83
+
84
+ activeCount++;
85
+
86
+ if (UI.support.transition) {
87
+ this.hasTransitioned = false;
88
+ this.element.one(UI.support.transition.end, function(){
89
+ $this.hasTransitioned = true;
90
+ UI.Utils.focus($this.dialog, 'a[href]');
91
+ }).addClass('uk-open');
92
+ } else {
93
+ this.element.addClass('uk-open');
94
+ UI.Utils.focus(this.dialog, 'a[href]');
95
+ }
96
+
97
+ $html.addClass('uk-modal-page').height(); // force browser engine redraw
98
+
99
+ // Update ARIA
100
+ this.element.attr('aria-hidden', 'false');
101
+
102
+ this.element.trigger('show.uk.modal');
103
+
104
+ UI.Utils.checkDisplay(this.dialog, true);
105
+
106
+ return this;
107
+ },
108
+
109
+ hide: function(force) {
110
+
111
+ if (!force && UI.support.transition && this.hasTransitioned) {
112
+
113
+ var $this = this;
114
+
115
+ this.one(UI.support.transition.end, function() {
116
+ $this._hide();
117
+ }).removeClass('uk-open');
118
+
119
+ } else {
120
+
121
+ this._hide();
122
+ }
123
+
124
+ return this;
125
+ },
126
+
127
+ resize: function(force) {
128
+
129
+ if (!this.isActive() && !force) return;
130
+
131
+ var bodywidth = body.width();
132
+
133
+ this.scrollbarwidth = window.innerWidth - bodywidth;
134
+
135
+ body.css(this.paddingdir, this.scrollbarwidth);
136
+
137
+ this.element.css('overflow-y', this.scrollbarwidth ? 'scroll' : 'auto');
138
+
139
+ if (!this.updateScrollable() && this.options.center) {
140
+
141
+ var dh = this.dialog.outerHeight(),
142
+ pad = parseInt(this.dialog.css('margin-top'), 10) + parseInt(this.dialog.css('margin-bottom'), 10);
143
+
144
+ if ((dh + pad) < window.innerHeight) {
145
+ this.dialog.css({top: (window.innerHeight/2 - dh/2) - pad });
146
+ } else {
147
+ this.dialog.css({top: ''});
148
+ }
149
+ }
150
+ },
151
+
152
+ updateScrollable: function() {
153
+
154
+ // has scrollable?
155
+ var scrollable = this.dialog.find('.uk-overflow-container:visible:first');
156
+
157
+ if (scrollable.length) {
158
+
159
+ scrollable.css('height', 0);
160
+
161
+ var offset = Math.abs(parseInt(this.dialog.css('margin-top'), 10)),
162
+ dh = this.dialog.outerHeight(),
163
+ wh = window.innerHeight,
164
+ h = wh - 2*(offset < 20 ? 20:offset) - dh;
165
+
166
+ scrollable.css({
167
+ maxHeight: (h < this.options.minScrollHeight ? '':h),
168
+ height:''
169
+ });
170
+
171
+ return true;
172
+ }
173
+
174
+ return false;
175
+ },
176
+
177
+ _hide: function() {
178
+
179
+ this.active = false;
180
+ if (activeCount > 0) activeCount--;
181
+ else activeCount = 0;
182
+
183
+ this.element.hide().removeClass('uk-open');
184
+
185
+ // Update ARIA
186
+ this.element.attr('aria-hidden', 'true');
187
+
188
+ if (!activeCount) {
189
+ $html.removeClass('uk-modal-page');
190
+ body.css(this.paddingdir, "");
191
+ }
192
+
193
+ if (active===this) active = false;
194
+
195
+ this.trigger('hide.uk.modal');
196
+ },
197
+
198
+ isActive: function() {
199
+ return this.element.hasClass('uk-open');
200
+ }
201
+
202
+ });
203
+
204
+ UI.component('modalTrigger', {
205
+
206
+ boot: function() {
207
+
208
+ // init code
209
+ UI.$html.on('click.modal.uikit', '[data-uk-modal]', function(e) {
210
+
211
+ var ele = UI.$(this);
212
+
213
+ if (ele.is('a')) {
214
+ e.preventDefault();
215
+ }
216
+
217
+ if (!ele.data('modalTrigger')) {
218
+ var modal = UI.modalTrigger(ele, UI.Utils.options(ele.attr('data-uk-modal')));
219
+ modal.show();
220
+ }
221
+
222
+ });
223
+
224
+ // close modal on esc button
225
+ UI.$html.on('keydown.modal.uikit', function (e) {
226
+
227
+ if (active && e.keyCode === 27 && active.options.keyboard) { // ESC
228
+ e.preventDefault();
229
+ active.hide();
230
+ }
231
+ });
232
+ },
233
+
234
+ init: function() {
235
+
236
+ var $this = this;
237
+
238
+ this.options = UI.$.extend({
239
+ target: $this.element.is('a') ? $this.element.attr('href') : false
240
+ }, this.options);
241
+
242
+ this.modal = UI.modal(this.options.target, this.options);
243
+
244
+ this.on("click", function(e) {
245
+ e.preventDefault();
246
+ $this.show();
247
+ });
248
+
249
+ //methods
250
+ this.proxy(this.modal, 'show hide isActive');
251
+ }
252
+ });
253
+
254
+ UI.modal.dialog = function(content, options) {
255
+
256
+ var modal = UI.modal(UI.$(UI.modal.dialog.template).appendTo('body'), options);
257
+
258
+ modal.on('hide.uk.modal', function(){
259
+ if (modal.persist) {
260
+ modal.persist.appendTo(modal.persist.data('modalPersistParent'));
261
+ modal.persist = false;
262
+ }
263
+ modal.element.remove();
264
+ });
265
+
266
+ setContent(content, modal);
267
+
268
+ return modal;
269
+ };
270
+
271
+ UI.modal.dialog.template = '<div class="uk-modal"><div class="uk-modal-dialog" style="min-height:0;"></div></div>';
272
+
273
+ UI.modal.alert = function(content, options) {
274
+
275
+ options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, options);
276
+
277
+ var modal = UI.modal.dialog(([
278
+ '<div class="uk-margin uk-modal-content">'+String(content)+'</div>',
279
+ '<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-button-primary uk-modal-close">'+options.labels.Ok+'</button></div>'
280
+ ]).join(""), options);
281
+
282
+ modal.on('show.uk.modal', function(){
283
+ setTimeout(function(){
284
+ modal.element.find('button:first').focus();
285
+ }, 50);
286
+ });
287
+
288
+ return modal.show();
289
+ };
290
+
291
+ UI.modal.confirm = function(content, onconfirm, oncancel) {
292
+
293
+ var options = arguments.length > 1 && arguments[arguments.length-1] ? arguments[arguments.length-1] : {};
294
+
295
+ onconfirm = UI.$.isFunction(onconfirm) ? onconfirm : function(){};
296
+ oncancel = UI.$.isFunction(oncancel) ? oncancel : function(){};
297
+ options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, UI.$.isFunction(options) ? {}:options);
298
+
299
+ var modal = UI.modal.dialog(([
300
+ '<div class="uk-margin uk-modal-content">'+String(content)+'</div>',
301
+ '<div class="uk-modal-footer uk-text-right"><button class="uk-button js-modal-confirm-cancel">'+options.labels.Cancel+'</button> <button class="uk-button uk-button-primary js-modal-confirm">'+options.labels.Ok+'</button></div>'
302
+ ]).join(""), options);
303
+
304
+ modal.element.find(".js-modal-confirm, .js-modal-confirm-cancel").on("click", function(){
305
+ UI.$(this).is('.js-modal-confirm') ? onconfirm() : oncancel();
306
+ modal.hide();
307
+ });
308
+
309
+ modal.on('show.uk.modal', function(){
310
+ setTimeout(function(){
311
+ modal.element.find('.js-modal-confirm').focus();
312
+ }, 50);
313
+ });
314
+
315
+ return modal.show();
316
+ };
317
+
318
+ UI.modal.prompt = function(text, value, onsubmit, options) {
319
+
320
+ onsubmit = UI.$.isFunction(onsubmit) ? onsubmit : function(value){};
321
+ options = UI.$.extend(true, {bgclose:false, keyboard:false, modal:false, labels:UI.modal.labels}, options);
322
+
323
+ var modal = UI.modal.dialog(([
324
+ text ? '<div class="uk-modal-content uk-form">'+String(text)+'</div>':'',
325
+ '<div class="uk-margin-small-top uk-modal-content uk-form"><p><input type="text" class="uk-width-1-1"></p></div>',
326
+ '<div class="uk-modal-footer uk-text-right"><button class="uk-button uk-modal-close">'+options.labels.Cancel+'</button> <button class="uk-button uk-button-primary js-modal-ok">'+options.labels.Ok+'</button></div>'
327
+ ]).join(""), options),
328
+
329
+ input = modal.element.find("input[type='text']").val(value || '').on('keyup', function(e){
330
+ if (e.keyCode == 13) {
331
+ modal.element.find('.js-modal-ok').trigger('click');
332
+ }
333
+ });
334
+
335
+ modal.element.find('.js-modal-ok').on('click', function(){
336
+ if (onsubmit(input.val())!==false){
337
+ modal.hide();
338
+ }
339
+ });
340
+
341
+ return modal.show();
342
+ };
343
+
344
+ UI.modal.blockUI = function(content, options) {
345
+
346
+ var modal = UI.modal.dialog(([
347
+ '<div class="uk-margin uk-modal-content">'+String(content || '<div class="uk-text-center">...</div>')+'</div>'
348
+ ]).join(""), UI.$.extend({bgclose:false, keyboard:false, modal:false}, options));
349
+
350
+ modal.content = modal.element.find('.uk-modal-content:first');
351
+
352
+ return modal.show();
353
+ };
354
+
355
+ UI.modal.labels = {
356
+ Ok: 'Ok',
357
+ Cancel: 'Cancel'
358
+ };
359
+
360
+ // helper functions
361
+ function setContent(content, modal){
362
+
363
+ if(!modal) return;
364
+
365
+ if (typeof content === 'object') {
366
+
367
+ // convert DOM object to a jQuery object
368
+ content = content instanceof jQuery ? content : UI.$(content);
369
+
370
+ if(content.parent().length) {
371
+ modal.persist = content;
372
+ modal.persist.data('modalPersistParent', content.parent());
373
+ }
374
+ }else if (typeof content === 'string' || typeof content === 'number') {
375
+ // just insert the data as innerHTML
376
+ content = UI.$('<div></div>').html(content);
377
+ }else {
378
+ // unsupported data type!
379
+ content = UI.$('<div></div>').html('UIkit.modal Error: Unsupported data type: ' + typeof content);
380
+ }
381
+
382
+ content.appendTo(modal.element.find('.uk-modal-dialog'));
383
+
384
+ return modal;
385
+ }
386
+
387
+ })(UIkit);