uikit2-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.travis.yml +4 -0
  4. data/Gemfile +4 -0
  5. data/README.md +66 -0
  6. data/Rakefile +1 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +7 -0
  9. data/lib/uikit2/rails.rb +8 -0
  10. data/lib/uikit2/rails/version.rb +5 -0
  11. data/uikit2-rails.gemspec +25 -0
  12. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  13. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  14. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  15. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  16. data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
  17. data/vendor/assets/javascripts/uikit.js +3537 -0
  18. data/vendor/assets/javascripts/uikit/components/accordion.js +172 -0
  19. data/vendor/assets/javascripts/uikit/components/accordion.min.js +2 -0
  20. data/vendor/assets/javascripts/uikit/components/autocomplete.js +334 -0
  21. data/vendor/assets/javascripts/uikit/components/autocomplete.min.js +2 -0
  22. data/vendor/assets/javascripts/uikit/components/datepicker.js +3166 -0
  23. data/vendor/assets/javascripts/uikit/components/datepicker.min.js +3 -0
  24. data/vendor/assets/javascripts/uikit/components/form-password.js +67 -0
  25. data/vendor/assets/javascripts/uikit/components/form-password.min.js +2 -0
  26. data/vendor/assets/javascripts/uikit/components/form-select.js +70 -0
  27. data/vendor/assets/javascripts/uikit/components/form-select.min.js +2 -0
  28. data/vendor/assets/javascripts/uikit/components/grid.js +523 -0
  29. data/vendor/assets/javascripts/uikit/components/grid.min.js +2 -0
  30. data/vendor/assets/javascripts/uikit/components/htmleditor.js +623 -0
  31. data/vendor/assets/javascripts/uikit/components/htmleditor.min.js +2 -0
  32. data/vendor/assets/javascripts/uikit/components/lightbox.js +555 -0
  33. data/vendor/assets/javascripts/uikit/components/lightbox.min.js +2 -0
  34. data/vendor/assets/javascripts/uikit/components/nestable.js +638 -0
  35. data/vendor/assets/javascripts/uikit/components/nestable.min.js +2 -0
  36. data/vendor/assets/javascripts/uikit/components/notify.js +189 -0
  37. data/vendor/assets/javascripts/uikit/components/notify.min.js +2 -0
  38. data/vendor/assets/javascripts/uikit/components/pagination.js +147 -0
  39. data/vendor/assets/javascripts/uikit/components/pagination.min.js +2 -0
  40. data/vendor/assets/javascripts/uikit/components/parallax.js +417 -0
  41. data/vendor/assets/javascripts/uikit/components/parallax.min.js +2 -0
  42. data/vendor/assets/javascripts/uikit/components/search.js +92 -0
  43. data/vendor/assets/javascripts/uikit/components/search.min.js +2 -0
  44. data/vendor/assets/javascripts/uikit/components/slider.js +520 -0
  45. data/vendor/assets/javascripts/uikit/components/slider.min.js +2 -0
  46. data/vendor/assets/javascripts/uikit/components/slideset.js +502 -0
  47. data/vendor/assets/javascripts/uikit/components/slideset.min.js +2 -0
  48. data/vendor/assets/javascripts/uikit/components/slideshow-fx.js +375 -0
  49. data/vendor/assets/javascripts/uikit/components/slideshow-fx.min.js +2 -0
  50. data/vendor/assets/javascripts/uikit/components/slideshow.js +545 -0
  51. data/vendor/assets/javascripts/uikit/components/slideshow.min.js +2 -0
  52. data/vendor/assets/javascripts/uikit/components/sortable.js +664 -0
  53. data/vendor/assets/javascripts/uikit/components/sortable.min.js +2 -0
  54. data/vendor/assets/javascripts/uikit/components/sticky.js +349 -0
  55. data/vendor/assets/javascripts/uikit/components/sticky.min.js +2 -0
  56. data/vendor/assets/javascripts/uikit/components/timepicker.js +192 -0
  57. data/vendor/assets/javascripts/uikit/components/timepicker.min.js +2 -0
  58. data/vendor/assets/javascripts/uikit/components/tooltip.js +234 -0
  59. data/vendor/assets/javascripts/uikit/components/tooltip.min.js +2 -0
  60. data/vendor/assets/javascripts/uikit/components/upload.js +260 -0
  61. data/vendor/assets/javascripts/uikit/components/upload.min.js +2 -0
  62. data/vendor/assets/javascripts/uikit/core/alert.js +66 -0
  63. data/vendor/assets/javascripts/uikit/core/alert.min.js +2 -0
  64. data/vendor/assets/javascripts/uikit/core/button.js +157 -0
  65. data/vendor/assets/javascripts/uikit/core/button.min.js +2 -0
  66. data/vendor/assets/javascripts/uikit/core/core.js +725 -0
  67. data/vendor/assets/javascripts/uikit/core/core.min.js +2 -0
  68. data/vendor/assets/javascripts/uikit/core/cover.js +95 -0
  69. data/vendor/assets/javascripts/uikit/core/cover.min.js +2 -0
  70. data/vendor/assets/javascripts/uikit/core/dropdown.js +421 -0
  71. data/vendor/assets/javascripts/uikit/core/dropdown.min.js +2 -0
  72. data/vendor/assets/javascripts/uikit/core/grid.js +114 -0
  73. data/vendor/assets/javascripts/uikit/core/grid.min.js +2 -0
  74. data/vendor/assets/javascripts/uikit/core/modal.js +372 -0
  75. data/vendor/assets/javascripts/uikit/core/modal.min.js +2 -0
  76. data/vendor/assets/javascripts/uikit/core/nav.js +136 -0
  77. data/vendor/assets/javascripts/uikit/core/nav.min.js +2 -0
  78. data/vendor/assets/javascripts/uikit/core/offcanvas.js +180 -0
  79. data/vendor/assets/javascripts/uikit/core/offcanvas.min.js +2 -0
  80. data/vendor/assets/javascripts/uikit/core/scrollspy.js +208 -0
  81. data/vendor/assets/javascripts/uikit/core/scrollspy.min.js +2 -0
  82. data/vendor/assets/javascripts/uikit/core/smooth-scroll.js +62 -0
  83. data/vendor/assets/javascripts/uikit/core/smooth-scroll.min.js +2 -0
  84. data/vendor/assets/javascripts/uikit/core/switcher.js +304 -0
  85. data/vendor/assets/javascripts/uikit/core/switcher.min.js +2 -0
  86. data/vendor/assets/javascripts/uikit/core/tab.js +165 -0
  87. data/vendor/assets/javascripts/uikit/core/tab.min.js +2 -0
  88. data/vendor/assets/javascripts/uikit/core/toggle.js +120 -0
  89. data/vendor/assets/javascripts/uikit/core/toggle.min.js +2 -0
  90. data/vendor/assets/javascripts/uikit/core/touch.js +173 -0
  91. data/vendor/assets/javascripts/uikit/core/touch.min.js +2 -0
  92. data/vendor/assets/javascripts/uikit/core/utility.js +239 -0
  93. data/vendor/assets/javascripts/uikit/core/utility.min.js +2 -0
  94. data/vendor/assets/stylesheets/uikit.almost-flat.css +8551 -0
  95. data/vendor/assets/stylesheets/uikit.css +8252 -0
  96. data/vendor/assets/stylesheets/uikit.gradient.css +8614 -0
  97. data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.css +39 -0
  98. data/vendor/assets/stylesheets/uikit/components/accordion.almost-flat.min.css +2 -0
  99. data/vendor/assets/stylesheets/uikit/components/accordion.css +37 -0
  100. data/vendor/assets/stylesheets/uikit/components/accordion.gradient.css +39 -0
  101. data/vendor/assets/stylesheets/uikit/components/accordion.gradient.min.css +2 -0
  102. data/vendor/assets/stylesheets/uikit/components/accordion.min.css +2 -0
  103. data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.css +52 -0
  104. data/vendor/assets/stylesheets/uikit/components/autocomplete.almost-flat.min.css +2 -0
  105. data/vendor/assets/stylesheets/uikit/components/autocomplete.css +50 -0
  106. data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.css +52 -0
  107. data/vendor/assets/stylesheets/uikit/components/autocomplete.gradient.min.css +2 -0
  108. data/vendor/assets/stylesheets/uikit/components/autocomplete.min.css +2 -0
  109. data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.css +129 -0
  110. data/vendor/assets/stylesheets/uikit/components/datepicker.almost-flat.min.css +2 -0
  111. data/vendor/assets/stylesheets/uikit/components/datepicker.css +123 -0
  112. data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.css +139 -0
  113. data/vendor/assets/stylesheets/uikit/components/datepicker.gradient.min.css +2 -0
  114. data/vendor/assets/stylesheets/uikit/components/datepicker.min.css +2 -0
  115. data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.css +128 -0
  116. data/vendor/assets/stylesheets/uikit/components/dotnav.almost-flat.min.css +2 -0
  117. data/vendor/assets/stylesheets/uikit/components/dotnav.css +124 -0
  118. data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.css +128 -0
  119. data/vendor/assets/stylesheets/uikit/components/dotnav.gradient.min.css +2 -0
  120. data/vendor/assets/stylesheets/uikit/components/dotnav.min.css +2 -0
  121. data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.css +78 -0
  122. data/vendor/assets/stylesheets/uikit/components/form-advanced.almost-flat.min.css +2 -0
  123. data/vendor/assets/stylesheets/uikit/components/form-advanced.css +78 -0
  124. data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.css +78 -0
  125. data/vendor/assets/stylesheets/uikit/components/form-advanced.gradient.min.css +2 -0
  126. data/vendor/assets/stylesheets/uikit/components/form-advanced.min.css +2 -0
  127. data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.css +34 -0
  128. data/vendor/assets/stylesheets/uikit/components/form-file.almost-flat.min.css +2 -0
  129. data/vendor/assets/stylesheets/uikit/components/form-file.css +34 -0
  130. data/vendor/assets/stylesheets/uikit/components/form-file.gradient.css +34 -0
  131. data/vendor/assets/stylesheets/uikit/components/form-file.gradient.min.css +2 -0
  132. data/vendor/assets/stylesheets/uikit/components/form-file.min.css +2 -0
  133. data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.css +34 -0
  134. data/vendor/assets/stylesheets/uikit/components/form-password.almost-flat.min.css +2 -0
  135. data/vendor/assets/stylesheets/uikit/components/form-password.css +34 -0
  136. data/vendor/assets/stylesheets/uikit/components/form-password.gradient.css +34 -0
  137. data/vendor/assets/stylesheets/uikit/components/form-password.gradient.min.css +2 -0
  138. data/vendor/assets/stylesheets/uikit/components/form-password.min.css +2 -0
  139. data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.css +35 -0
  140. data/vendor/assets/stylesheets/uikit/components/form-select.almost-flat.min.css +2 -0
  141. data/vendor/assets/stylesheets/uikit/components/form-select.css +35 -0
  142. data/vendor/assets/stylesheets/uikit/components/form-select.gradient.css +35 -0
  143. data/vendor/assets/stylesheets/uikit/components/form-select.gradient.min.css +2 -0
  144. data/vendor/assets/stylesheets/uikit/components/form-select.min.css +2 -0
  145. data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.css +222 -0
  146. data/vendor/assets/stylesheets/uikit/components/htmleditor.almost-flat.min.css +2 -0
  147. data/vendor/assets/stylesheets/uikit/components/htmleditor.css +164 -0
  148. data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.css +229 -0
  149. data/vendor/assets/stylesheets/uikit/components/htmleditor.gradient.min.css +2 -0
  150. data/vendor/assets/stylesheets/uikit/components/htmleditor.min.css +2 -0
  151. data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.css +135 -0
  152. data/vendor/assets/stylesheets/uikit/components/nestable.almost-flat.min.css +2 -0
  153. data/vendor/assets/stylesheets/uikit/components/nestable.css +132 -0
  154. data/vendor/assets/stylesheets/uikit/components/nestable.gradient.css +139 -0
  155. data/vendor/assets/stylesheets/uikit/components/nestable.gradient.min.css +2 -0
  156. data/vendor/assets/stylesheets/uikit/components/nestable.min.css +2 -0
  157. data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.css +98 -0
  158. data/vendor/assets/stylesheets/uikit/components/notify.almost-flat.min.css +2 -0
  159. data/vendor/assets/stylesheets/uikit/components/notify.css +92 -0
  160. data/vendor/assets/stylesheets/uikit/components/notify.gradient.css +98 -0
  161. data/vendor/assets/stylesheets/uikit/components/notify.gradient.min.css +2 -0
  162. data/vendor/assets/stylesheets/uikit/components/notify.min.css +2 -0
  163. data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.css +29 -0
  164. data/vendor/assets/stylesheets/uikit/components/placeholder.almost-flat.min.css +2 -0
  165. data/vendor/assets/stylesheets/uikit/components/placeholder.css +29 -0
  166. data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.css +29 -0
  167. data/vendor/assets/stylesheets/uikit/components/placeholder.gradient.min.css +2 -0
  168. data/vendor/assets/stylesheets/uikit/components/placeholder.min.css +2 -0
  169. data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.css +104 -0
  170. data/vendor/assets/stylesheets/uikit/components/progress.almost-flat.min.css +2 -0
  171. data/vendor/assets/stylesheets/uikit/components/progress.css +94 -0
  172. data/vendor/assets/stylesheets/uikit/components/progress.gradient.css +112 -0
  173. data/vendor/assets/stylesheets/uikit/components/progress.gradient.min.css +2 -0
  174. data/vendor/assets/stylesheets/uikit/components/progress.min.css +2 -0
  175. data/vendor/assets/stylesheets/uikit/components/search.almost-flat.css +191 -0
  176. data/vendor/assets/stylesheets/uikit/components/search.almost-flat.min.css +2 -0
  177. data/vendor/assets/stylesheets/uikit/components/search.css +189 -0
  178. data/vendor/assets/stylesheets/uikit/components/search.gradient.css +191 -0
  179. data/vendor/assets/stylesheets/uikit/components/search.gradient.min.css +2 -0
  180. data/vendor/assets/stylesheets/uikit/components/search.min.css +2 -0
  181. data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.css +98 -0
  182. data/vendor/assets/stylesheets/uikit/components/slidenav.almost-flat.min.css +2 -0
  183. data/vendor/assets/stylesheets/uikit/components/slidenav.css +98 -0
  184. data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.css +98 -0
  185. data/vendor/assets/stylesheets/uikit/components/slidenav.gradient.min.css +2 -0
  186. data/vendor/assets/stylesheets/uikit/components/slidenav.min.css +2 -0
  187. data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.css +85 -0
  188. data/vendor/assets/stylesheets/uikit/components/slider.almost-flat.min.css +2 -0
  189. data/vendor/assets/stylesheets/uikit/components/slider.css +85 -0
  190. data/vendor/assets/stylesheets/uikit/components/slider.gradient.css +85 -0
  191. data/vendor/assets/stylesheets/uikit/components/slider.gradient.min.css +2 -0
  192. data/vendor/assets/stylesheets/uikit/components/slider.min.css +2 -0
  193. data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.css +140 -0
  194. data/vendor/assets/stylesheets/uikit/components/slideshow.almost-flat.min.css +2 -0
  195. data/vendor/assets/stylesheets/uikit/components/slideshow.css +140 -0
  196. data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.css +140 -0
  197. data/vendor/assets/stylesheets/uikit/components/slideshow.gradient.min.css +2 -0
  198. data/vendor/assets/stylesheets/uikit/components/slideshow.min.css +2 -0
  199. data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.css +62 -0
  200. data/vendor/assets/stylesheets/uikit/components/sortable.almost-flat.min.css +2 -0
  201. data/vendor/assets/stylesheets/uikit/components/sortable.css +62 -0
  202. data/vendor/assets/stylesheets/uikit/components/sortable.gradient.css +62 -0
  203. data/vendor/assets/stylesheets/uikit/components/sortable.gradient.min.css +2 -0
  204. data/vendor/assets/stylesheets/uikit/components/sortable.min.css +2 -0
  205. data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.css +31 -0
  206. data/vendor/assets/stylesheets/uikit/components/sticky.almost-flat.min.css +2 -0
  207. data/vendor/assets/stylesheets/uikit/components/sticky.css +31 -0
  208. data/vendor/assets/stylesheets/uikit/components/sticky.gradient.css +31 -0
  209. data/vendor/assets/stylesheets/uikit/components/sticky.gradient.min.css +2 -0
  210. data/vendor/assets/stylesheets/uikit/components/sticky.min.css +2 -0
  211. data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.css +118 -0
  212. data/vendor/assets/stylesheets/uikit/components/tooltip.almost-flat.min.css +2 -0
  213. data/vendor/assets/stylesheets/uikit/components/tooltip.css +116 -0
  214. data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.css +118 -0
  215. data/vendor/assets/stylesheets/uikit/components/tooltip.gradient.min.css +2 -0
  216. data/vendor/assets/stylesheets/uikit/components/tooltip.min.css +2 -0
  217. data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.css +10 -0
  218. data/vendor/assets/stylesheets/uikit/components/upload.almost-flat.min.css +2 -0
  219. data/vendor/assets/stylesheets/uikit/components/upload.css +10 -0
  220. data/vendor/assets/stylesheets/uikit/components/upload.gradient.css +10 -0
  221. data/vendor/assets/stylesheets/uikit/components/upload.gradient.min.css +2 -0
  222. data/vendor/assets/stylesheets/uikit/components/upload.min.css +2 -0
  223. metadata +295 -0
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(e){var t;window.UIkit&&(t=e(UIkit)),"function"==typeof define&&define.amd&&define("uikit-upload",["uikit"],function(){return t||e(UIkit)})}(function(e){"use strict";function t(o,a){function r(t,n){var o=new FormData,a=new XMLHttpRequest;if(n.before(n,t)!==!1){for(var r,i=0;r=t[i];i++)o.append(n.param,r);for(var l in n.params)o.append(l,n.params[l]);a.upload.addEventListener("progress",function(e){var t=e.loaded/e.total*100;n.progress(t,e)},!1),a.addEventListener("loadstart",function(e){n.loadstart(e)},!1),a.addEventListener("load",function(e){n.load(e)},!1),a.addEventListener("loadend",function(e){n.loadend(e)},!1),a.addEventListener("error",function(e){n.error(e)},!1),a.addEventListener("abort",function(e){n.abort(e)},!1),a.open(n.method,n.action,!0),"json"==n.type&&a.setRequestHeader("Accept","application/json"),a.onreadystatechange=function(){if(n.readystatechange(a),4==a.readyState){var t=a.responseText;if("json"==n.type)try{t=e.$.parseJSON(t)}catch(o){t=!1}n.complete(t,a)}},n.beforeSend(a),a.send(o)}}if(!e.support.ajaxupload)return this;if(a=e.$.extend({},t.defaults,a),o.length){if("*.*"!==a.allow)for(var i,l=0;i=o[l];l++)if(!n(a.allow,i.name))return"string"==typeof a.notallowed?alert(a.notallowed):a.notallowed(i,a),void 0;var s=a.complete;if(a.single){var d=o.length,f=0,p=!0;a.beforeAll(o),a.complete=function(e,t){f+=1,s(e,t),a.filelimit&&f>=a.filelimit&&(p=!1),p&&d>f?r([o[f]],a):a.allcomplete(e,t)},r([o[0]],a)}else a.complete=function(e,t){s(e,t),a.allcomplete(e,t)},r(o,a)}}function n(e,t){var n="^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$";return n="^"+n+"$",null!==t.match(new RegExp(n,"i"))}return e.component("uploadSelect",{init:function(){var e=this;this.on("change",function(){t(e.element[0].files,e.options);var n=e.element.clone(!0).data("uploadSelect",e);e.element.replaceWith(n),e.element=n})}}),e.component("uploadDrop",{defaults:{dragoverClass:"uk-dragover"},init:function(){var e=this,n=!1;this.on("drop",function(n){n.dataTransfer&&n.dataTransfer.files&&(n.stopPropagation(),n.preventDefault(),e.element.removeClass(e.options.dragoverClass),e.element.trigger("dropped.uk.upload",[n.dataTransfer.files]),t(n.dataTransfer.files,e.options))}).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}).on("dragover",function(t){t.stopPropagation(),t.preventDefault(),n||(e.element.addClass(e.options.dragoverClass),n=!0)}).on("dragleave",function(t){t.stopPropagation(),t.preventDefault(),e.element.removeClass(e.options.dragoverClass),n=!1})}}),e.support.ajaxupload=function(){function e(){var e=document.createElement("INPUT");return e.type="file","files"in e}function t(){var e=new XMLHttpRequest;return!!(e&&"upload"in e&&"onprogress"in e.upload)}function n(){return!!window.FormData}return e()&&t()&&n()}(),e.support.ajaxupload&&e.$.event.props.push("dataTransfer"),t.defaults={action:"",single:!0,method:"POST",param:"files[]",params:{},allow:"*.*",type:"text",filelimit:!1,before:function(){},beforeSend:function(){},beforeAll:function(){},loadstart:function(){},load:function(){},loadend:function(){},error:function(){},abort:function(){},progress:function(){},complete:function(){},allcomplete:function(){},readystatechange:function(){},notallowed:function(e,t){alert("Only the following file types are allowed: "+t.allow)}},e.Utils.xhrupload=t,t});
@@ -0,0 +1,66 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(UI) {
3
+
4
+ "use strict";
5
+
6
+ UI.component('alert', {
7
+
8
+ defaults: {
9
+ "fade": true,
10
+ "duration": 200,
11
+ "trigger": ".uk-alert-close"
12
+ },
13
+
14
+ boot: function() {
15
+
16
+ // init code
17
+ UI.$html.on("click.alert.uikit", "[data-uk-alert]", function(e) {
18
+
19
+ var ele = UI.$(this);
20
+
21
+ if (!ele.data("alert")) {
22
+
23
+ var alert = UI.alert(ele, UI.Utils.options(ele.attr("data-uk-alert")));
24
+
25
+ if (UI.$(e.target).is(alert.options.trigger)) {
26
+ e.preventDefault();
27
+ alert.close();
28
+ }
29
+ }
30
+ });
31
+ },
32
+
33
+ init: function() {
34
+
35
+ var $this = this;
36
+
37
+ this.on("click", this.options.trigger, function(e) {
38
+ e.preventDefault();
39
+ $this.close();
40
+ });
41
+ },
42
+
43
+ close: function() {
44
+
45
+ var element = this.trigger("close.uk.alert"),
46
+ removeElement = function () {
47
+ this.trigger("closed.uk.alert").remove();
48
+ }.bind(this);
49
+
50
+ if (this.options.fade) {
51
+ element.css("overflow", "hidden").css("max-height", element.height()).animate({
52
+ "height" : 0,
53
+ "opacity" : 0,
54
+ "padding-top" : 0,
55
+ "padding-bottom" : 0,
56
+ "margin-top" : 0,
57
+ "margin-bottom" : 0
58
+ }, this.options.duration, removeElement);
59
+ } else {
60
+ removeElement();
61
+ }
62
+ }
63
+
64
+ });
65
+
66
+ })(UIkit);
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(t){"use strict";t.component("alert",{defaults:{fade:!0,duration:200,trigger:".uk-alert-close"},boot:function(){t.$html.on("click.alert.uikit","[data-uk-alert]",function(i){var o=t.$(this);if(!o.data("alert")){var e=t.alert(o,t.Utils.options(o.attr("data-uk-alert")));t.$(i.target).is(e.options.trigger)&&(i.preventDefault(),e.close())}})},init:function(){var t=this;this.on("click",this.options.trigger,function(i){i.preventDefault(),t.close()})},close:function(){var t=this.trigger("close.uk.alert"),i=function(){this.trigger("closed.uk.alert").remove()}.bind(this);this.options.fade?t.css("overflow","hidden").css("max-height",t.height()).animate({height:0,opacity:0,"padding-top":0,"padding-bottom":0,"margin-top":0,"margin-bottom":0},this.options.duration,i):i()}})}(UIkit);
@@ -0,0 +1,157 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(UI) {
3
+
4
+ "use strict";
5
+
6
+ UI.component('buttonRadio', {
7
+
8
+ defaults: {
9
+ "activeClass": 'uk-active',
10
+ "target": ".uk-button"
11
+ },
12
+
13
+ boot: function() {
14
+
15
+ // init code
16
+ UI.$html.on("click.buttonradio.uikit", "[data-uk-button-radio]", function(e) {
17
+
18
+ var ele = UI.$(this);
19
+
20
+ if (!ele.data("buttonRadio")) {
21
+
22
+ var obj = UI.buttonRadio(ele, UI.Utils.options(ele.attr("data-uk-button-radio"))),
23
+ target = UI.$(e.target);
24
+
25
+ if (target.is(obj.options.target)) {
26
+ target.trigger("click");
27
+ }
28
+ }
29
+ });
30
+ },
31
+
32
+ init: function() {
33
+
34
+ var $this = this;
35
+
36
+ // Init ARIA
37
+ this.find($this.options.target).attr('aria-checked', 'false').filter('.' + $this.options.activeClass).attr('aria-checked', 'true');
38
+
39
+ this.on("click", this.options.target, function(e) {
40
+
41
+ var ele = UI.$(this);
42
+
43
+ if (ele.is('a[href="#"]')) e.preventDefault();
44
+
45
+ $this.find($this.options.target).not(ele).removeClass($this.options.activeClass).blur();
46
+ ele.addClass($this.options.activeClass);
47
+
48
+ // Update ARIA
49
+ $this.find($this.options.target).not(ele).attr('aria-checked', 'false');
50
+ ele.attr('aria-checked', 'true');
51
+
52
+ $this.trigger("change.uk.button", [ele]);
53
+ });
54
+
55
+ },
56
+
57
+ getSelected: function() {
58
+ return this.find('.' + this.options.activeClass);
59
+ }
60
+ });
61
+
62
+ UI.component('buttonCheckbox', {
63
+
64
+ defaults: {
65
+ "activeClass": 'uk-active',
66
+ "target": ".uk-button"
67
+ },
68
+
69
+ boot: function() {
70
+
71
+ UI.$html.on("click.buttoncheckbox.uikit", "[data-uk-button-checkbox]", function(e) {
72
+ var ele = UI.$(this);
73
+
74
+ if (!ele.data("buttonCheckbox")) {
75
+
76
+ var obj = UI.buttonCheckbox(ele, UI.Utils.options(ele.attr("data-uk-button-checkbox"))),
77
+ target = UI.$(e.target);
78
+
79
+ if (target.is(obj.options.target)) {
80
+ target.trigger("click");
81
+ }
82
+ }
83
+ });
84
+ },
85
+
86
+ init: function() {
87
+
88
+ var $this = this;
89
+
90
+ // Init ARIA
91
+ this.find($this.options.target).attr('aria-checked', 'false').filter('.' + $this.options.activeClass).attr('aria-checked', 'true');
92
+
93
+ this.on("click", this.options.target, function(e) {
94
+ var ele = UI.$(this);
95
+
96
+ if (ele.is('a[href="#"]')) e.preventDefault();
97
+
98
+ ele.toggleClass($this.options.activeClass).blur();
99
+
100
+ // Update ARIA
101
+ ele.attr('aria-checked', ele.hasClass($this.options.activeClass));
102
+
103
+ $this.trigger("change.uk.button", [ele]);
104
+ });
105
+
106
+ },
107
+
108
+ getSelected: function() {
109
+ return this.find('.' + this.options.activeClass);
110
+ }
111
+ });
112
+
113
+
114
+ UI.component('button', {
115
+
116
+ defaults: {},
117
+
118
+ boot: function() {
119
+
120
+ UI.$html.on("click.button.uikit", "[data-uk-button]", function(e) {
121
+ var ele = UI.$(this);
122
+
123
+ if (!ele.data("button")) {
124
+
125
+ var obj = UI.button(ele, UI.Utils.options(ele.attr("data-uk-button")));
126
+ ele.trigger("click");
127
+ }
128
+ });
129
+ },
130
+
131
+ init: function() {
132
+
133
+ var $this = this;
134
+
135
+ // Init ARIA
136
+ this.element.attr('aria-pressed', this.element.hasClass("uk-active"));
137
+
138
+ this.on("click", function(e) {
139
+
140
+ if ($this.element.is('a[href="#"]')) e.preventDefault();
141
+
142
+ $this.toggle();
143
+ $this.trigger("change.uk.button", [$this.element.blur().hasClass("uk-active")]);
144
+ });
145
+
146
+ },
147
+
148
+ toggle: function() {
149
+ this.element.toggleClass("uk-active");
150
+
151
+ // Update ARIA
152
+ this.element.attr('aria-pressed', this.element.hasClass("uk-active"));
153
+ }
154
+ });
155
+
156
+ })(UIkit);
157
+
@@ -0,0 +1,2 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ !function(t){"use strict";t.component("buttonRadio",{defaults:{activeClass:"uk-active",target:".uk-button"},boot:function(){t.$html.on("click.buttonradio.uikit","[data-uk-button-radio]",function(i){var a=t.$(this);if(!a.data("buttonRadio")){var e=t.buttonRadio(a,t.Utils.options(a.attr("data-uk-button-radio"))),o=t.$(i.target);o.is(e.options.target)&&o.trigger("click")}})},init:function(){var i=this;this.find(i.options.target).attr("aria-checked","false").filter("."+i.options.activeClass).attr("aria-checked","true"),this.on("click",this.options.target,function(a){var e=t.$(this);e.is('a[href="#"]')&&a.preventDefault(),i.find(i.options.target).not(e).removeClass(i.options.activeClass).blur(),e.addClass(i.options.activeClass),i.find(i.options.target).not(e).attr("aria-checked","false"),e.attr("aria-checked","true"),i.trigger("change.uk.button",[e])})},getSelected:function(){return this.find("."+this.options.activeClass)}}),t.component("buttonCheckbox",{defaults:{activeClass:"uk-active",target:".uk-button"},boot:function(){t.$html.on("click.buttoncheckbox.uikit","[data-uk-button-checkbox]",function(i){var a=t.$(this);if(!a.data("buttonCheckbox")){var e=t.buttonCheckbox(a,t.Utils.options(a.attr("data-uk-button-checkbox"))),o=t.$(i.target);o.is(e.options.target)&&o.trigger("click")}})},init:function(){var i=this;this.find(i.options.target).attr("aria-checked","false").filter("."+i.options.activeClass).attr("aria-checked","true"),this.on("click",this.options.target,function(a){var e=t.$(this);e.is('a[href="#"]')&&a.preventDefault(),e.toggleClass(i.options.activeClass).blur(),e.attr("aria-checked",e.hasClass(i.options.activeClass)),i.trigger("change.uk.button",[e])})},getSelected:function(){return this.find("."+this.options.activeClass)}}),t.component("button",{defaults:{},boot:function(){t.$html.on("click.button.uikit","[data-uk-button]",function(){var i=t.$(this);if(!i.data("button")){{t.button(i,t.Utils.options(i.attr("data-uk-button")))}i.trigger("click")}})},init:function(){var t=this;this.element.attr("aria-pressed",this.element.hasClass("uk-active")),this.on("click",function(i){t.element.is('a[href="#"]')&&i.preventDefault(),t.toggle(),t.trigger("change.uk.button",[t.element.blur().hasClass("uk-active")])})},toggle:function(){this.element.toggleClass("uk-active"),this.element.attr("aria-pressed",this.element.hasClass("uk-active"))}})}(UIkit);
@@ -0,0 +1,725 @@
1
+ /*! UIkit 2.22.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2
+ (function(core) {
3
+
4
+ if (typeof define == "function" && define.amd) { // AMD
5
+
6
+ define("uikit", function(){
7
+
8
+ var uikit = window.UIkit || core(window, window.jQuery, window.document);
9
+
10
+ uikit.load = function(res, req, onload, config) {
11
+
12
+ var resources = res.split(','), load = [], i, base = (config.config && config.config.uikit && config.config.uikit.base ? config.config.uikit.base : "").replace(/\/+$/g, "");
13
+
14
+ if (!base) {
15
+ throw new Error( "Please define base path to UIkit in the requirejs config." );
16
+ }
17
+
18
+ for (i = 0; i < resources.length; i += 1) {
19
+ var resource = resources[i].replace(/\./g, '/');
20
+ load.push(base+'/components/'+resource);
21
+ }
22
+
23
+ req(load, function() {
24
+ onload(uikit);
25
+ });
26
+ };
27
+
28
+ return uikit;
29
+ });
30
+ }
31
+
32
+ if (!window.jQuery) {
33
+ throw new Error( "UIkit requires jQuery" );
34
+ }
35
+
36
+ if (window && window.jQuery) {
37
+ core(window, window.jQuery, window.document);
38
+ }
39
+
40
+
41
+ })(function(global, $, doc) {
42
+
43
+ "use strict";
44
+
45
+ var UI = {}, _UI = global.UIkit ? Object.create(global.UIkit) : undefined;
46
+
47
+ UI.version = '2.22.0';
48
+
49
+ UI.noConflict = function() {
50
+ // restore UIkit version
51
+ if (_UI) {
52
+ global.UIkit = _UI;
53
+ $.UIkit = _UI;
54
+ $.fn.uk = _UI.fn;
55
+ }
56
+
57
+ return UI;
58
+ };
59
+
60
+ UI.prefix = function(str) {
61
+ return str;
62
+ };
63
+
64
+ // cache jQuery
65
+ UI.$ = $;
66
+
67
+ UI.$doc = UI.$(document);
68
+ UI.$win = UI.$(window);
69
+ UI.$html = UI.$('html');
70
+
71
+ UI.support = {};
72
+ UI.support.transition = (function() {
73
+
74
+ var transitionEnd = (function() {
75
+
76
+ var element = doc.body || doc.documentElement,
77
+ transEndEventNames = {
78
+ WebkitTransition : 'webkitTransitionEnd',
79
+ MozTransition : 'transitionend',
80
+ OTransition : 'oTransitionEnd otransitionend',
81
+ transition : 'transitionend'
82
+ }, name;
83
+
84
+ for (name in transEndEventNames) {
85
+ if (element.style[name] !== undefined) return transEndEventNames[name];
86
+ }
87
+ }());
88
+
89
+ return transitionEnd && { end: transitionEnd };
90
+ })();
91
+
92
+ UI.support.animation = (function() {
93
+
94
+ var animationEnd = (function() {
95
+
96
+ var element = doc.body || doc.documentElement,
97
+ animEndEventNames = {
98
+ WebkitAnimation : 'webkitAnimationEnd',
99
+ MozAnimation : 'animationend',
100
+ OAnimation : 'oAnimationEnd oanimationend',
101
+ animation : 'animationend'
102
+ }, name;
103
+
104
+ for (name in animEndEventNames) {
105
+ if (element.style[name] !== undefined) return animEndEventNames[name];
106
+ }
107
+ }());
108
+
109
+ return animationEnd && { end: animationEnd };
110
+ })();
111
+
112
+ // requestAnimationFrame polyfill
113
+ // https://gist.github.com/paulirish/1579671
114
+ (function(){
115
+
116
+ var lastTime = 0;
117
+
118
+ global.requestAnimationFrame = global.requestAnimationFrame || global.webkitRequestAnimationFrame || function(callback, element) {
119
+ var currTime = new Date().getTime();
120
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
121
+ var id = global.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall);
122
+ lastTime = currTime + timeToCall;
123
+ return id;
124
+ };
125
+
126
+ if (!global.cancelAnimationFrame) {
127
+
128
+ global.cancelAnimationFrame = function(id) {
129
+ clearTimeout(id);
130
+ };
131
+ }
132
+
133
+ })();
134
+
135
+ UI.support.touch = (
136
+ ('ontouchstart' in document) ||
137
+ (global.DocumentTouch && document instanceof global.DocumentTouch) ||
138
+ (global.navigator.msPointerEnabled && global.navigator.msMaxTouchPoints > 0) || //IE 10
139
+ (global.navigator.pointerEnabled && global.navigator.maxTouchPoints > 0) || //IE >=11
140
+ false
141
+ );
142
+
143
+ UI.support.mutationobserver = (global.MutationObserver || global.WebKitMutationObserver || null);
144
+
145
+ UI.Utils = {};
146
+
147
+ UI.Utils.isFullscreen = function() {
148
+ return document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement || document.fullscreenElement || false;
149
+ };
150
+
151
+ UI.Utils.str2json = function(str, notevil) {
152
+ try {
153
+ if (notevil) {
154
+ return JSON.parse(str
155
+ // wrap keys without quote with valid double quote
156
+ .replace(/([\$\w]+)\s*:/g, function(_, $1){return '"'+$1+'":';})
157
+ // replacing single quote wrapped ones to double quote
158
+ .replace(/'([^']+)'/g, function(_, $1){return '"'+$1+'"';})
159
+ );
160
+ } else {
161
+ return (new Function("", "var json = " + str + "; return JSON.parse(JSON.stringify(json));"))();
162
+ }
163
+ } catch(e) { return false; }
164
+ };
165
+
166
+ UI.Utils.debounce = function(func, wait, immediate) {
167
+ var timeout;
168
+ return function() {
169
+ var context = this, args = arguments;
170
+ var later = function() {
171
+ timeout = null;
172
+ if (!immediate) func.apply(context, args);
173
+ };
174
+ var callNow = immediate && !timeout;
175
+ clearTimeout(timeout);
176
+ timeout = setTimeout(later, wait);
177
+ if (callNow) func.apply(context, args);
178
+ };
179
+ };
180
+
181
+ UI.Utils.removeCssRules = function(selectorRegEx) {
182
+ var idx, idxs, stylesheet, _i, _j, _k, _len, _len1, _len2, _ref;
183
+
184
+ if(!selectorRegEx) return;
185
+
186
+ setTimeout(function(){
187
+ try {
188
+ _ref = document.styleSheets;
189
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
190
+ stylesheet = _ref[_i];
191
+ idxs = [];
192
+ stylesheet.cssRules = stylesheet.cssRules;
193
+ for (idx = _j = 0, _len1 = stylesheet.cssRules.length; _j < _len1; idx = ++_j) {
194
+ if (stylesheet.cssRules[idx].type === CSSRule.STYLE_RULE && selectorRegEx.test(stylesheet.cssRules[idx].selectorText)) {
195
+ idxs.unshift(idx);
196
+ }
197
+ }
198
+ for (_k = 0, _len2 = idxs.length; _k < _len2; _k++) {
199
+ stylesheet.deleteRule(idxs[_k]);
200
+ }
201
+ }
202
+ } catch (_error) {}
203
+ }, 0);
204
+ };
205
+
206
+ UI.Utils.isInView = function(element, options) {
207
+
208
+ var $element = $(element);
209
+
210
+ if (!$element.is(':visible')) {
211
+ return false;
212
+ }
213
+
214
+ var window_left = UI.$win.scrollLeft(), window_top = UI.$win.scrollTop(), offset = $element.offset(), left = offset.left, top = offset.top;
215
+
216
+ options = $.extend({topoffset:0, leftoffset:0}, options);
217
+
218
+ if (top + $element.height() >= window_top && top - options.topoffset <= window_top + UI.$win.height() &&
219
+ left + $element.width() >= window_left && left - options.leftoffset <= window_left + UI.$win.width()) {
220
+ return true;
221
+ } else {
222
+ return false;
223
+ }
224
+ };
225
+
226
+ UI.Utils.checkDisplay = function(context, initanimation) {
227
+
228
+ var elements = UI.$('[data-uk-margin], [data-uk-grid-match], [data-uk-grid-margin], [data-uk-check-display]', context || document), animated;
229
+
230
+ if (context && !elements.length) {
231
+ elements = $(context);
232
+ }
233
+
234
+ elements.trigger('display.uk.check');
235
+
236
+ // fix firefox / IE animations
237
+ if (initanimation) {
238
+
239
+ if (typeof(initanimation)!='string') {
240
+ initanimation = '[class*="uk-animation-"]';
241
+ }
242
+
243
+ elements.find(initanimation).each(function(){
244
+
245
+ var ele = UI.$(this),
246
+ cls = ele.attr('class'),
247
+ anim = cls.match(/uk\-animation\-(.+)/);
248
+
249
+ ele.removeClass(anim[0]).width();
250
+
251
+ ele.addClass(anim[0]);
252
+ });
253
+ }
254
+
255
+ return elements;
256
+ };
257
+
258
+ UI.Utils.options = function(string) {
259
+
260
+ if ($.isPlainObject(string)) return string;
261
+
262
+ var start = (string ? string.indexOf("{") : -1), options = {};
263
+
264
+ if (start != -1) {
265
+ try {
266
+ options = UI.Utils.str2json(string.substr(start));
267
+ } catch (e) {}
268
+ }
269
+
270
+ return options;
271
+ };
272
+
273
+ UI.Utils.animate = function(element, cls) {
274
+
275
+ var d = $.Deferred();
276
+
277
+ element = UI.$(element);
278
+ cls = cls;
279
+
280
+ element.css('display', 'none').addClass(cls).one(UI.support.animation.end, function() {
281
+ element.removeClass(cls);
282
+ d.resolve();
283
+ }).width();
284
+
285
+ element.css('display', '');
286
+
287
+ return d.promise();
288
+ };
289
+
290
+ UI.Utils.uid = function(prefix) {
291
+ return (prefix || 'id') + (new Date().getTime())+"RAND"+(Math.ceil(Math.random() * 100000));
292
+ };
293
+
294
+ UI.Utils.template = function(str, data) {
295
+
296
+ var tokens = str.replace(/\n/g, '\\n').replace(/\{\{\{\s*(.+?)\s*\}\}\}/g, "{{!$1}}").split(/(\{\{\s*(.+?)\s*\}\})/g),
297
+ i=0, toc, cmd, prop, val, fn, output = [], openblocks = 0;
298
+
299
+ while(i < tokens.length) {
300
+
301
+ toc = tokens[i];
302
+
303
+ if(toc.match(/\{\{\s*(.+?)\s*\}\}/)) {
304
+ i = i + 1;
305
+ toc = tokens[i];
306
+ cmd = toc[0];
307
+ prop = toc.substring(toc.match(/^(\^|\#|\!|\~|\:)/) ? 1:0);
308
+
309
+ switch(cmd) {
310
+ case '~':
311
+ output.push("for(var $i=0;$i<"+prop+".length;$i++) { var $item = "+prop+"[$i];");
312
+ openblocks++;
313
+ break;
314
+ case ':':
315
+ output.push("for(var $key in "+prop+") { var $val = "+prop+"[$key];");
316
+ openblocks++;
317
+ break;
318
+ case '#':
319
+ output.push("if("+prop+") {");
320
+ openblocks++;
321
+ break;
322
+ case '^':
323
+ output.push("if(!"+prop+") {");
324
+ openblocks++;
325
+ break;
326
+ case '/':
327
+ output.push("}");
328
+ openblocks--;
329
+ break;
330
+ case '!':
331
+ output.push("__ret.push("+prop+");");
332
+ break;
333
+ default:
334
+ output.push("__ret.push(escape("+prop+"));");
335
+ break;
336
+ }
337
+ } else {
338
+ output.push("__ret.push('"+toc.replace(/\'/g, "\\'")+"');");
339
+ }
340
+ i = i + 1;
341
+ }
342
+
343
+ fn = new Function('$data', [
344
+ 'var __ret = [];',
345
+ 'try {',
346
+ 'with($data){', (!openblocks ? output.join('') : '__ret = ["Not all blocks are closed correctly."]'), '};',
347
+ '}catch(e){__ret = [e.message];}',
348
+ 'return __ret.join("").replace(/\\n\\n/g, "\\n");',
349
+ "function escape(html) { return String(html).replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');}"
350
+ ].join("\n"));
351
+
352
+ return data ? fn(data) : fn;
353
+ };
354
+
355
+ UI.Utils.events = {};
356
+ UI.Utils.events.click = UI.support.touch ? 'tap' : 'click';
357
+
358
+ global.UIkit = UI;
359
+
360
+ // deprecated
361
+
362
+ UI.fn = function(command, options) {
363
+
364
+ var args = arguments, cmd = command.match(/^([a-z\-]+)(?:\.([a-z]+))?/i), component = cmd[1], method = cmd[2];
365
+
366
+ if (!UI[component]) {
367
+ $.error("UIkit component [" + component + "] does not exist.");
368
+ return this;
369
+ }
370
+
371
+ return this.each(function() {
372
+ var $this = $(this), data = $this.data(component);
373
+ if (!data) $this.data(component, (data = UI[component](this, method ? undefined : options)));
374
+ if (method) data[method].apply(data, Array.prototype.slice.call(args, 1));
375
+ });
376
+ };
377
+
378
+ $.UIkit = UI;
379
+ $.fn.uk = UI.fn;
380
+
381
+ UI.langdirection = UI.$html.attr("dir") == "rtl" ? "right" : "left";
382
+
383
+ UI.components = {};
384
+
385
+ UI.component = function(name, def) {
386
+
387
+ var fn = function(element, options) {
388
+
389
+ var $this = this;
390
+
391
+ this.UIkit = UI;
392
+ this.element = element ? UI.$(element) : null;
393
+ this.options = $.extend(true, {}, this.defaults, options);
394
+ this.plugins = {};
395
+
396
+ if (this.element) {
397
+ this.element.data(name, this);
398
+ }
399
+
400
+ this.init();
401
+
402
+ (this.options.plugins.length ? this.options.plugins : Object.keys(fn.plugins)).forEach(function(plugin) {
403
+
404
+ if (fn.plugins[plugin].init) {
405
+ fn.plugins[plugin].init($this);
406
+ $this.plugins[plugin] = true;
407
+ }
408
+
409
+ });
410
+
411
+ this.trigger('init.uk.component', [name, this]);
412
+
413
+ return this;
414
+ };
415
+
416
+ fn.plugins = {};
417
+
418
+ $.extend(true, fn.prototype, {
419
+
420
+ defaults : {plugins: []},
421
+
422
+ boot: function(){},
423
+ init: function(){},
424
+
425
+ on: function(a1,a2,a3){
426
+ return UI.$(this.element || this).on(a1,a2,a3);
427
+ },
428
+
429
+ one: function(a1,a2,a3){
430
+ return UI.$(this.element || this).one(a1,a2,a3);
431
+ },
432
+
433
+ off: function(evt){
434
+ return UI.$(this.element || this).off(evt);
435
+ },
436
+
437
+ trigger: function(evt, params) {
438
+ return UI.$(this.element || this).trigger(evt, params);
439
+ },
440
+
441
+ find: function(selector) {
442
+ return UI.$(this.element ? this.element: []).find(selector);
443
+ },
444
+
445
+ proxy: function(obj, methods) {
446
+
447
+ var $this = this;
448
+
449
+ methods.split(' ').forEach(function(method) {
450
+ if (!$this[method]) $this[method] = function() { return obj[method].apply(obj, arguments); };
451
+ });
452
+ },
453
+
454
+ mixin: function(obj, methods) {
455
+
456
+ var $this = this;
457
+
458
+ methods.split(' ').forEach(function(method) {
459
+ if (!$this[method]) $this[method] = obj[method].bind($this);
460
+ });
461
+ },
462
+
463
+ option: function() {
464
+
465
+ if (arguments.length == 1) {
466
+ return this.options[arguments[0]] || undefined;
467
+ } else if (arguments.length == 2) {
468
+ this.options[arguments[0]] = arguments[1];
469
+ }
470
+ }
471
+
472
+ }, def);
473
+
474
+ this.components[name] = fn;
475
+
476
+ this[name] = function() {
477
+
478
+ var element, options;
479
+
480
+ if (arguments.length) {
481
+
482
+ switch(arguments.length) {
483
+ case 1:
484
+
485
+ if (typeof arguments[0] === "string" || arguments[0].nodeType || arguments[0] instanceof jQuery) {
486
+ element = $(arguments[0]);
487
+ } else {
488
+ options = arguments[0];
489
+ }
490
+
491
+ break;
492
+ case 2:
493
+
494
+ element = $(arguments[0]);
495
+ options = arguments[1];
496
+ break;
497
+ }
498
+ }
499
+
500
+ if (element && element.data(name)) {
501
+ return element.data(name);
502
+ }
503
+
504
+ return (new UI.components[name](element, options));
505
+ };
506
+
507
+ if (UI.domready) {
508
+ UI.component.boot(name);
509
+ }
510
+
511
+ return fn;
512
+ };
513
+
514
+ UI.plugin = function(component, name, def) {
515
+ this.components[component].plugins[name] = def;
516
+ };
517
+
518
+ UI.component.boot = function(name) {
519
+
520
+ if (UI.components[name].prototype && UI.components[name].prototype.boot && !UI.components[name].booted) {
521
+ UI.components[name].prototype.boot.apply(UI, []);
522
+ UI.components[name].booted = true;
523
+ }
524
+ };
525
+
526
+ UI.component.bootComponents = function() {
527
+
528
+ for (var component in UI.components) {
529
+ UI.component.boot(component);
530
+ }
531
+ };
532
+
533
+
534
+ // DOM mutation save ready helper function
535
+
536
+ UI.domObservers = [];
537
+ UI.domready = false;
538
+
539
+ UI.ready = function(fn) {
540
+
541
+ UI.domObservers.push(fn);
542
+
543
+ if (UI.domready) {
544
+ fn(document);
545
+ }
546
+ };
547
+
548
+ UI.on = function(a1,a2,a3){
549
+
550
+ if (a1 && a1.indexOf('ready.uk.dom') > -1 && UI.domready) {
551
+ a2.apply(UI.$doc);
552
+ }
553
+
554
+ return UI.$doc.on(a1,a2,a3);
555
+ };
556
+
557
+ UI.one = function(a1,a2,a3){
558
+
559
+ if (a1 && a1.indexOf('ready.uk.dom') > -1 && UI.domready) {
560
+ a2.apply(UI.$doc);
561
+ return UI.$doc;
562
+ }
563
+
564
+ return UI.$doc.one(a1,a2,a3);
565
+ };
566
+
567
+ UI.trigger = function(evt, params) {
568
+ return UI.$doc.trigger(evt, params);
569
+ };
570
+
571
+ UI.domObserve = function(selector, fn) {
572
+
573
+ if(!UI.support.mutationobserver) return;
574
+
575
+ fn = fn || function() {};
576
+
577
+ UI.$(selector).each(function() {
578
+
579
+ var element = this,
580
+ $element = UI.$(element);
581
+
582
+ if ($element.data('observer')) {
583
+ return;
584
+ }
585
+
586
+ try {
587
+
588
+ var observer = new UI.support.mutationobserver(UI.Utils.debounce(function(mutations) {
589
+ fn.apply(element, []);
590
+ $element.trigger('changed.uk.dom');
591
+ }, 50));
592
+
593
+ // pass in the target node, as well as the observer options
594
+ observer.observe(element, { childList: true, subtree: true });
595
+
596
+ $element.data('observer', observer);
597
+
598
+ } catch(e) {}
599
+ });
600
+ };
601
+
602
+ UI.init = function(root) {
603
+
604
+ root = root || document;
605
+
606
+ UI.domObservers.forEach(function(fn){
607
+ fn(root);
608
+ });
609
+ };
610
+
611
+ UI.on('domready.uk.dom', function(){
612
+
613
+ UI.init();
614
+
615
+ if (UI.domready) UI.Utils.checkDisplay();
616
+ });
617
+
618
+ $(function(){
619
+
620
+ UI.$body = UI.$('body');
621
+
622
+ UI.ready(function(context){
623
+ UI.domObserve('[data-uk-observe]');
624
+ });
625
+
626
+ UI.on('changed.uk.dom', function(e) {
627
+ UI.init(e.target);
628
+ UI.Utils.checkDisplay(e.target);
629
+ });
630
+
631
+ UI.trigger('beforeready.uk.dom');
632
+
633
+ UI.component.bootComponents();
634
+
635
+ // custom scroll observer
636
+ setInterval((function(){
637
+
638
+ var memory = {x: window.pageXOffset, y:window.pageYOffset}, dir;
639
+
640
+ var fn = function(){
641
+
642
+ if (memory.x != window.pageXOffset || memory.y != window.pageYOffset) {
643
+
644
+ dir = {x: 0 , y: 0};
645
+
646
+ if (window.pageXOffset != memory.x) dir.x = window.pageXOffset > memory.x ? 1:-1;
647
+ if (window.pageYOffset != memory.y) dir.y = window.pageYOffset > memory.y ? 1:-1;
648
+
649
+ memory = {
650
+ "dir": dir, "x": window.pageXOffset, "y": window.pageYOffset
651
+ };
652
+
653
+ UI.$doc.trigger('scrolling.uk.document', [memory]);
654
+ }
655
+ };
656
+
657
+ if (UI.support.touch) {
658
+ UI.$html.on('touchmove touchend MSPointerMove MSPointerUp pointermove pointerup', fn);
659
+ }
660
+
661
+ if (memory.x || memory.y) fn();
662
+
663
+ return fn;
664
+
665
+ })(), 15);
666
+
667
+ // run component init functions on dom
668
+ UI.trigger('domready.uk.dom');
669
+
670
+ if (UI.support.touch) {
671
+
672
+ // remove css hover rules for touch devices
673
+ // UI.Utils.removeCssRules(/\.uk-(?!navbar).*:hover/);
674
+
675
+ // viewport unit fix for uk-height-viewport - should be fixed in iOS 8
676
+ if (navigator.userAgent.match(/(iPad|iPhone|iPod)/g)) {
677
+
678
+ UI.$win.on('load orientationchange resize', UI.Utils.debounce((function(){
679
+
680
+ var fn = function() {
681
+ $('.uk-height-viewport').css('height', window.innerHeight);
682
+ return fn;
683
+ };
684
+
685
+ return fn();
686
+
687
+ })(), 100));
688
+ }
689
+ }
690
+
691
+ UI.trigger('afterready.uk.dom');
692
+
693
+ // mark that domready is left behind
694
+ UI.domready = true;
695
+ });
696
+
697
+ // add touch identifier class
698
+ UI.$html.addClass(UI.support.touch ? "uk-touch" : "uk-notouch");
699
+
700
+ // add uk-hover class on tap to support overlays on touch devices
701
+ if (UI.support.touch) {
702
+
703
+ var hoverset = false,
704
+ exclude,
705
+ hovercls = 'uk-hover',
706
+ selector = '.uk-overlay, .uk-overlay-hover, .uk-overlay-toggle, .uk-animation-hover, .uk-has-hover';
707
+
708
+ UI.$html.on('mouseenter touchstart MSPointerDown pointerdown', selector, function() {
709
+
710
+ if (hoverset) $('.'+hovercls).removeClass(hovercls);
711
+
712
+ hoverset = $(this).addClass(hovercls);
713
+
714
+ }).on('mouseleave touchend MSPointerUp pointerup', function(e) {
715
+
716
+ exclude = $(e.target).parents(selector);
717
+
718
+ if (hoverset) {
719
+ hoverset.not(exclude).removeClass(hovercls);
720
+ }
721
+ });
722
+ }
723
+
724
+ return UI;
725
+ });