foundation-rails 6.4.3.0 → 6.5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (268) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/.ruby-version +1 -1
  4. data/.travis.yml +14 -3
  5. data/Appraisals +19 -0
  6. data/Gemfile +5 -2
  7. data/Gemfile.lock +193 -0
  8. data/README.md +53 -24
  9. data/Rakefile +11 -12
  10. data/bower.json +3 -3
  11. data/foundation-rails.gemspec +5 -5
  12. data/gemfiles/rails_4.1.gemfile +10 -0
  13. data/gemfiles/rails_4.1.gemfile.lock +178 -0
  14. data/gemfiles/rails_4.2.gemfile +10 -0
  15. data/gemfiles/rails_4.2.gemfile.lock +178 -0
  16. data/gemfiles/rails_5.0.gemfile +10 -0
  17. data/gemfiles/rails_5.0.gemfile.lock +193 -0
  18. data/gemfiles/rails_5.1.gemfile +10 -0
  19. data/gemfiles/rails_5.1.gemfile.lock +193 -0
  20. data/gemfiles/rails_5.2.gemfile +10 -0
  21. data/gemfiles/rails_5.2.gemfile.lock +193 -0
  22. data/lib/foundation/rails/version.rb +1 -1
  23. data/lib/generators/foundation/install_generator.rb +1 -1
  24. data/lib/generators/foundation/templates/_settings.scss +5 -5
  25. data/spec/support/helpers.rb +1 -1
  26. data/vendor/assets/js/foundation.cjs.js +11795 -0
  27. data/vendor/assets/js/foundation.cjs.js.map +1 -0
  28. data/vendor/assets/js/foundation.es6.js +10361 -0
  29. data/vendor/assets/js/foundation.es6.js.map +1 -0
  30. data/vendor/assets/js/foundation.esm.js +11756 -0
  31. data/vendor/assets/js/foundation.esm.js.map +1 -0
  32. data/vendor/assets/js/foundation.js +13214 -31
  33. data/vendor/assets/js/foundation.js.map +1 -0
  34. data/vendor/assets/js/foundation.min.js +2 -0
  35. data/vendor/assets/js/foundation.min.js.map +1 -0
  36. data/vendor/assets/js/foundation.sprockets.js +38 -0
  37. data/vendor/assets/js/{foundation.abide.js → plugins/foundation.abide.js} +317 -138
  38. data/vendor/assets/js/plugins/foundation.abide.js.map +1 -0
  39. data/vendor/assets/js/plugins/foundation.abide.min.js +2 -0
  40. data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -0
  41. data/vendor/assets/js/plugins/foundation.accordion.js +676 -0
  42. data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -0
  43. data/vendor/assets/js/plugins/foundation.accordion.min.js +2 -0
  44. data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -0
  45. data/vendor/assets/js/plugins/foundation.accordionMenu.js +637 -0
  46. data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -0
  47. data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +2 -0
  48. data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -0
  49. data/vendor/assets/js/plugins/foundation.core.js +1072 -0
  50. data/vendor/assets/js/plugins/foundation.core.js.map +1 -0
  51. data/vendor/assets/js/plugins/foundation.core.min.js +2 -0
  52. data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -0
  53. data/vendor/assets/js/plugins/foundation.drilldown.js +982 -0
  54. data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -0
  55. data/vendor/assets/js/plugins/foundation.drilldown.min.js +2 -0
  56. data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -0
  57. data/vendor/assets/js/plugins/foundation.dropdown.js +1324 -0
  58. data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -0
  59. data/vendor/assets/js/plugins/foundation.dropdown.min.js +2 -0
  60. data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -0
  61. data/vendor/assets/js/plugins/foundation.dropdownMenu.js +792 -0
  62. data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -0
  63. data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +2 -0
  64. data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -0
  65. data/vendor/assets/js/plugins/foundation.equalizer.js +638 -0
  66. data/vendor/assets/js/plugins/foundation.equalizer.js.map +1 -0
  67. data/vendor/assets/js/plugins/foundation.equalizer.min.js +2 -0
  68. data/vendor/assets/js/plugins/foundation.equalizer.min.js.map +1 -0
  69. data/vendor/assets/js/plugins/foundation.interchange.js +471 -0
  70. data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -0
  71. data/vendor/assets/js/plugins/foundation.interchange.min.js +2 -0
  72. data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -0
  73. data/vendor/assets/js/plugins/foundation.magellan.js +551 -0
  74. data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -0
  75. data/vendor/assets/js/plugins/foundation.magellan.min.js +2 -0
  76. data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -0
  77. data/vendor/assets/js/plugins/foundation.offcanvas.js +1164 -0
  78. data/vendor/assets/js/plugins/foundation.offcanvas.js.map +1 -0
  79. data/vendor/assets/js/plugins/foundation.offcanvas.min.js +2 -0
  80. data/vendor/assets/js/plugins/foundation.offcanvas.min.js.map +1 -0
  81. data/vendor/assets/js/plugins/foundation.orbit.js +883 -0
  82. data/vendor/assets/js/plugins/foundation.orbit.js.map +1 -0
  83. data/vendor/assets/js/plugins/foundation.orbit.min.js +2 -0
  84. data/vendor/assets/js/plugins/foundation.orbit.min.js.map +1 -0
  85. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +546 -0
  86. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -0
  87. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js +2 -0
  88. data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -0
  89. data/vendor/assets/js/plugins/foundation.responsiveMenu.js +437 -0
  90. data/vendor/assets/js/plugins/foundation.responsiveMenu.js.map +1 -0
  91. data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js +2 -0
  92. data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js.map +1 -0
  93. data/vendor/assets/js/plugins/foundation.responsiveToggle.js +405 -0
  94. data/vendor/assets/js/plugins/foundation.responsiveToggle.js.map +1 -0
  95. data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js +2 -0
  96. data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js.map +1 -0
  97. data/vendor/assets/js/plugins/foundation.reveal.js +1278 -0
  98. data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -0
  99. data/vendor/assets/js/plugins/foundation.reveal.min.js +2 -0
  100. data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -0
  101. data/vendor/assets/js/{foundation.slider.js → plugins/foundation.slider.js} +405 -271
  102. data/vendor/assets/js/plugins/foundation.slider.js.map +1 -0
  103. data/vendor/assets/js/plugins/foundation.slider.min.js +2 -0
  104. data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -0
  105. data/vendor/assets/js/plugins/foundation.smoothScroll.js +382 -0
  106. data/vendor/assets/js/plugins/foundation.smoothScroll.js.map +1 -0
  107. data/vendor/assets/js/plugins/foundation.smoothScroll.min.js +2 -0
  108. data/vendor/assets/js/plugins/foundation.smoothScroll.min.js.map +1 -0
  109. data/vendor/assets/js/{foundation.sticky.js → plugins/foundation.sticky.js} +325 -203
  110. data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -0
  111. data/vendor/assets/js/plugins/foundation.sticky.min.js +2 -0
  112. data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -0
  113. data/vendor/assets/js/plugins/foundation.tabs.js +813 -0
  114. data/vendor/assets/js/plugins/foundation.tabs.js.map +1 -0
  115. data/vendor/assets/js/plugins/foundation.tabs.min.js +2 -0
  116. data/vendor/assets/js/plugins/foundation.tabs.min.js.map +1 -0
  117. data/vendor/assets/js/plugins/foundation.toggler.js +713 -0
  118. data/vendor/assets/js/plugins/foundation.toggler.js.map +1 -0
  119. data/vendor/assets/js/plugins/foundation.toggler.min.js +2 -0
  120. data/vendor/assets/js/plugins/foundation.toggler.min.js.map +1 -0
  121. data/vendor/assets/js/plugins/foundation.tooltip.js +1346 -0
  122. data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -0
  123. data/vendor/assets/js/plugins/foundation.tooltip.min.js +2 -0
  124. data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -0
  125. data/vendor/assets/js/{foundation.util.box.js → plugins/foundation.util.box.js} +136 -54
  126. data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -0
  127. data/vendor/assets/js/plugins/foundation.util.box.min.js +2 -0
  128. data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -0
  129. data/vendor/assets/js/plugins/foundation.util.imageLoader.js +218 -0
  130. data/vendor/assets/js/plugins/foundation.util.imageLoader.js.map +1 -0
  131. data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js +2 -0
  132. data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js.map +1 -0
  133. data/vendor/assets/js/plugins/foundation.util.keyboard.js +351 -0
  134. data/vendor/assets/js/plugins/foundation.util.keyboard.js.map +1 -0
  135. data/vendor/assets/js/plugins/foundation.util.keyboard.min.js +2 -0
  136. data/vendor/assets/js/plugins/foundation.util.keyboard.min.js.map +1 -0
  137. data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +405 -0
  138. data/vendor/assets/js/plugins/foundation.util.mediaQuery.js.map +1 -0
  139. data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js +2 -0
  140. data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js.map +1 -0
  141. data/vendor/assets/js/plugins/foundation.util.motion.js +282 -0
  142. data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -0
  143. data/vendor/assets/js/plugins/foundation.util.motion.min.js +2 -0
  144. data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -0
  145. data/vendor/assets/js/plugins/foundation.util.nest.js +240 -0
  146. data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -0
  147. data/vendor/assets/js/plugins/foundation.util.nest.min.js +2 -0
  148. data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -0
  149. data/vendor/assets/js/plugins/foundation.util.timer.js +226 -0
  150. data/vendor/assets/js/plugins/foundation.util.timer.js.map +1 -0
  151. data/vendor/assets/js/plugins/foundation.util.timer.min.js +2 -0
  152. data/vendor/assets/js/plugins/foundation.util.timer.min.js.map +1 -0
  153. data/vendor/assets/js/plugins/foundation.util.touch.js +365 -0
  154. data/vendor/assets/js/plugins/foundation.util.touch.js.map +1 -0
  155. data/vendor/assets/js/plugins/foundation.util.touch.min.js +2 -0
  156. data/vendor/assets/js/plugins/foundation.util.touch.min.js.map +1 -0
  157. data/vendor/assets/js/plugins/foundation.util.triggers.js +480 -0
  158. data/vendor/assets/js/plugins/foundation.util.triggers.js.map +1 -0
  159. data/vendor/assets/js/plugins/foundation.util.triggers.min.js +2 -0
  160. data/vendor/assets/js/plugins/foundation.util.triggers.min.js.map +1 -0
  161. data/vendor/assets/scss/_global.scss +10 -15
  162. data/vendor/assets/scss/components/_accordion-menu.scss +6 -3
  163. data/vendor/assets/scss/components/_accordion.scss +1 -0
  164. data/vendor/assets/scss/components/_breadcrumbs.scss +8 -6
  165. data/vendor/assets/scss/components/_button-group.scss +27 -8
  166. data/vendor/assets/scss/components/_button.scss +36 -8
  167. data/vendor/assets/scss/components/_card.scss +2 -2
  168. data/vendor/assets/scss/components/_drilldown.scss +5 -6
  169. data/vendor/assets/scss/components/_dropdown-menu.scss +15 -10
  170. data/vendor/assets/scss/components/_dropdown.scss +7 -4
  171. data/vendor/assets/scss/components/_flex.scss +6 -4
  172. data/vendor/assets/scss/components/_media-object.scss +33 -33
  173. data/vendor/assets/scss/components/_menu.scss +0 -4
  174. data/vendor/assets/scss/components/_off-canvas.scss +4 -4
  175. data/vendor/assets/scss/components/_orbit.scss +1 -0
  176. data/vendor/assets/scss/components/_responsive-embed.scss +0 -13
  177. data/vendor/assets/scss/components/_reveal.scss +19 -14
  178. data/vendor/assets/scss/components/_table.scss +3 -6
  179. data/vendor/assets/scss/components/_tabs.scss +1 -4
  180. data/vendor/assets/scss/components/_thumbnail.scss +1 -1
  181. data/vendor/assets/scss/components/_visibility.scss +5 -2
  182. data/vendor/assets/scss/forms/_error.scss +1 -0
  183. data/vendor/assets/scss/forms/_input-group.scss +10 -10
  184. data/vendor/assets/scss/forms/_meter.scss +5 -5
  185. data/vendor/assets/scss/forms/_progress.scss +6 -6
  186. data/vendor/assets/scss/forms/_range.scss +5 -5
  187. data/vendor/assets/scss/forms/_text.scss +7 -7
  188. data/vendor/assets/scss/foundation.scss +74 -57
  189. data/vendor/assets/scss/grid/_column.scss +2 -6
  190. data/vendor/assets/scss/grid/_flex-grid.scss +1 -0
  191. data/vendor/assets/scss/grid/_gutter.scss +0 -15
  192. data/vendor/assets/scss/grid/_position.scss +28 -4
  193. data/vendor/assets/scss/motion-ui/_settings.scss +1 -0
  194. data/vendor/assets/scss/motion-ui/effects/_fade.scss +1 -4
  195. data/vendor/assets/scss/motion-ui/effects/_hinge.scss +4 -3
  196. data/vendor/assets/scss/motion-ui/effects/_shake.scss +1 -1
  197. data/vendor/assets/scss/motion-ui/effects/_slide.scss +4 -3
  198. data/vendor/assets/scss/motion-ui/effects/_spin.scss +4 -3
  199. data/vendor/assets/scss/motion-ui/effects/_wiggle.scss +1 -1
  200. data/vendor/assets/scss/motion-ui/effects/_zoom.scss +2 -2
  201. data/vendor/assets/scss/motion-ui/motion-ui.scss +2 -0
  202. data/vendor/assets/scss/motion-ui/transitions/_fade.scss +6 -4
  203. data/vendor/assets/scss/motion-ui/transitions/_hinge.scss +3 -2
  204. data/vendor/assets/scss/motion-ui/transitions/_slide.scss +3 -2
  205. data/vendor/assets/scss/motion-ui/transitions/_spin.scss +2 -1
  206. data/vendor/assets/scss/motion-ui/transitions/_zoom.scss +6 -4
  207. data/vendor/assets/scss/motion-ui/util/_animation.scss +1 -1
  208. data/vendor/assets/scss/motion-ui/util/_args.scss +2 -2
  209. data/vendor/assets/scss/motion-ui/util/_function.scss +94 -0
  210. data/vendor/assets/scss/motion-ui/util/_keyframe.scss +5 -5
  211. data/vendor/assets/scss/motion-ui/util/_series.scss +20 -17
  212. data/vendor/assets/scss/motion-ui/util/_string.scss +36 -0
  213. data/vendor/assets/scss/prototype/_relation.scss +1 -1
  214. data/vendor/assets/scss/prototype/_rounded.scss +3 -0
  215. data/vendor/assets/scss/prototype/_spacing.scss +94 -121
  216. data/vendor/assets/scss/settings/_settings.scss +5 -5
  217. data/vendor/assets/scss/typography/_base.scss +2 -2
  218. data/vendor/assets/scss/typography/_helpers.scss +1 -1
  219. data/vendor/assets/scss/typography/_print.scss +4 -0
  220. data/vendor/assets/scss/util/_breakpoint.scss +22 -10
  221. data/vendor/assets/scss/util/_color.scss +11 -1
  222. data/vendor/assets/scss/util/_direction.scss +1 -1
  223. data/vendor/assets/scss/util/_flex.scss +12 -7
  224. data/vendor/assets/scss/util/_mixins.scss +7 -3
  225. data/vendor/assets/scss/util/_unit.scss +3 -3
  226. data/vendor/assets/scss/vendor/normalize.scss +281 -0
  227. data/vendor/assets/scss/xy-grid/_cell.scss +33 -17
  228. data/vendor/assets/scss/xy-grid/_classes.scss +31 -11
  229. data/vendor/assets/scss/xy-grid/_collapse.scss +2 -1
  230. data/vendor/assets/scss/xy-grid/_frame.scss +2 -1
  231. data/vendor/assets/scss/xy-grid/_grid.scss +1 -0
  232. data/vendor/assets/scss/xy-grid/_gutters.scss +1 -1
  233. data/vendor/assets/scss/xy-grid/_layout.scss +2 -1
  234. data/vendor/assets/scss/xy-grid/_position.scss +5 -1
  235. metadata +172 -80
  236. data/vendor/assets/_vendor/normalize-scss/sass/_normalize.scss +0 -3
  237. data/vendor/assets/_vendor/normalize-scss/sass/normalize/_import-now.scss +0 -11
  238. data/vendor/assets/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +0 -676
  239. data/vendor/assets/_vendor/normalize-scss/sass/normalize/_variables.scss +0 -36
  240. data/vendor/assets/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +0 -61
  241. data/vendor/assets/js/foundation.accordion.js +0 -511
  242. data/vendor/assets/js/foundation.accordionMenu.js +0 -527
  243. data/vendor/assets/js/foundation.core.js +0 -860
  244. data/vendor/assets/js/foundation.drilldown.js +0 -759
  245. data/vendor/assets/js/foundation.dropdown.js +0 -1151
  246. data/vendor/assets/js/foundation.dropdownMenu.js +0 -677
  247. data/vendor/assets/js/foundation.equalizer.js +0 -542
  248. data/vendor/assets/js/foundation.interchange.js +0 -399
  249. data/vendor/assets/js/foundation.magellan.js +0 -449
  250. data/vendor/assets/js/foundation.offcanvas.js +0 -1054
  251. data/vendor/assets/js/foundation.orbit.js +0 -767
  252. data/vendor/assets/js/foundation.responsiveAccordionTabs.js +0 -440
  253. data/vendor/assets/js/foundation.responsiveMenu.js +0 -362
  254. data/vendor/assets/js/foundation.responsiveToggle.js +0 -336
  255. data/vendor/assets/js/foundation.reveal.js +0 -1065
  256. data/vendor/assets/js/foundation.smoothScroll.js +0 -303
  257. data/vendor/assets/js/foundation.tabs.js +0 -678
  258. data/vendor/assets/js/foundation.toggler.js +0 -601
  259. data/vendor/assets/js/foundation.tooltip.js +0 -1194
  260. data/vendor/assets/js/foundation.util.imageLoader.js +0 -163
  261. data/vendor/assets/js/foundation.util.keyboard.js +0 -298
  262. data/vendor/assets/js/foundation.util.mediaQuery.js +0 -354
  263. data/vendor/assets/js/foundation.util.motion.js +0 -231
  264. data/vendor/assets/js/foundation.util.nest.js +0 -181
  265. data/vendor/assets/js/foundation.util.timer.js +0 -170
  266. data/vendor/assets/js/foundation.util.touch.js +0 -275
  267. data/vendor/assets/js/foundation.util.triggers.js +0 -398
  268. data/vendor/assets/scss/prototype/_typescale.scss +0 -20
@@ -1,860 +0,0 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // identity function for calling harmony imports with the correct context
37
- /******/ __webpack_require__.i = function(value) { return value; };
38
- /******/
39
- /******/ // define getter function for harmony exports
40
- /******/ __webpack_require__.d = function(exports, name, getter) {
41
- /******/ if(!__webpack_require__.o(exports, name)) {
42
- /******/ Object.defineProperty(exports, name, {
43
- /******/ configurable: false,
44
- /******/ enumerable: true,
45
- /******/ get: getter
46
- /******/ });
47
- /******/ }
48
- /******/ };
49
- /******/
50
- /******/ // getDefaultExport function for compatibility with non-harmony modules
51
- /******/ __webpack_require__.n = function(module) {
52
- /******/ var getter = module && module.__esModule ?
53
- /******/ function getDefault() { return module['default']; } :
54
- /******/ function getModuleExports() { return module; };
55
- /******/ __webpack_require__.d(getter, 'a', getter);
56
- /******/ return getter;
57
- /******/ };
58
- /******/
59
- /******/ // Object.prototype.hasOwnProperty.call
60
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
61
- /******/
62
- /******/ // __webpack_public_path__
63
- /******/ __webpack_require__.p = "";
64
- /******/
65
- /******/ // Load entry module and return exports
66
- /******/ return __webpack_require__(__webpack_require__.s = 6);
67
- /******/ })
68
- /************************************************************************/
69
- /******/ ([
70
- /* 0 */
71
- /***/ (function(module, exports) {
72
-
73
- module.exports = jQuery;
74
-
75
- /***/ }),
76
- /* 1 */
77
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
78
-
79
- "use strict";
80
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return rtl; });
81
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return GetYoDigits; });
82
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return transitionend; });
83
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
84
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
85
-
86
-
87
-
88
-
89
- // Core Foundation Utilities, utilized in a number of places.
90
-
91
- /**
92
- * Returns a boolean for RTL support
93
- */
94
- function rtl() {
95
- return __WEBPACK_IMPORTED_MODULE_0_jquery___default()('html').attr('dir') === 'rtl';
96
- }
97
-
98
- /**
99
- * returns a random base-36 uid with namespacing
100
- * @function
101
- * @param {Number} length - number of random base-36 digits desired. Increase for more random strings.
102
- * @param {String} namespace - name of plugin to be incorporated in uid, optional.
103
- * @default {String} '' - if no plugin name is provided, nothing is appended to the uid.
104
- * @returns {String} - unique id
105
- */
106
- function GetYoDigits(length, namespace) {
107
- length = length || 6;
108
- return Math.round(Math.pow(36, length + 1) - Math.random() * Math.pow(36, length)).toString(36).slice(1) + (namespace ? '-' + namespace : '');
109
- }
110
-
111
- function transitionend($elem) {
112
- var transitions = {
113
- 'transition': 'transitionend',
114
- 'WebkitTransition': 'webkitTransitionEnd',
115
- 'MozTransition': 'transitionend',
116
- 'OTransition': 'otransitionend'
117
- };
118
- var elem = document.createElement('div'),
119
- end;
120
-
121
- for (var t in transitions) {
122
- if (typeof elem.style[t] !== 'undefined') {
123
- end = transitions[t];
124
- }
125
- }
126
- if (end) {
127
- return end;
128
- } else {
129
- end = setTimeout(function () {
130
- $elem.triggerHandler('transitionend', [$elem]);
131
- }, 1);
132
- return 'transitionend';
133
- }
134
- }
135
-
136
-
137
-
138
- /***/ }),
139
- /* 2 */
140
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
141
-
142
- "use strict";
143
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
144
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
145
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
146
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_core__ = __webpack_require__(3);
147
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__ = __webpack_require__(1);
148
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_plugin__ = __webpack_require__(4);
149
-
150
-
151
-
152
- __WEBPACK_IMPORTED_MODULE_1__foundation_core__["a" /* Foundation */].addToJquery(__WEBPACK_IMPORTED_MODULE_0_jquery___default.a);
153
-
154
- // These are now separated out, but historically were a part of this module,
155
- // and since this is here for backwards compatibility we include them in
156
- // this entry.
157
-
158
- __WEBPACK_IMPORTED_MODULE_1__foundation_core__["a" /* Foundation */].rtl = __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["a" /* rtl */];
159
- __WEBPACK_IMPORTED_MODULE_1__foundation_core__["a" /* Foundation */].GetYoDigits = __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["b" /* GetYoDigits */];
160
- __WEBPACK_IMPORTED_MODULE_1__foundation_core__["a" /* Foundation */].transitionend = __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["c" /* transitionend */];
161
-
162
- // Every plugin depends on plugin now, we can include that on the core for the
163
- // script inclusion path.
164
-
165
-
166
- __WEBPACK_IMPORTED_MODULE_1__foundation_core__["a" /* Foundation */].Plugin = __WEBPACK_IMPORTED_MODULE_3__foundation_plugin__["a" /* Plugin */];
167
-
168
- window.Foundation = __WEBPACK_IMPORTED_MODULE_1__foundation_core__["a" /* Foundation */];
169
-
170
- /***/ }),
171
- /* 3 */
172
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
173
-
174
- "use strict";
175
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Foundation; });
176
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
177
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
178
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core__ = __webpack_require__(1);
179
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_mediaQuery__ = __webpack_require__(5);
180
-
181
-
182
-
183
-
184
-
185
-
186
- var FOUNDATION_VERSION = '6.4.3';
187
-
188
- // Global Foundation object
189
- // This is attached to the window, or used as a module for AMD/Browserify
190
- var Foundation = {
191
- version: FOUNDATION_VERSION,
192
-
193
- /**
194
- * Stores initialized plugins.
195
- */
196
- _plugins: {},
197
-
198
- /**
199
- * Stores generated unique ids for plugin instances
200
- */
201
- _uuids: [],
202
-
203
- /**
204
- * Defines a Foundation plugin, adding it to the `Foundation` namespace and the list of plugins to initialize when reflowing.
205
- * @param {Object} plugin - The constructor of the plugin.
206
- */
207
- plugin: function (plugin, name) {
208
- // Object key to use when adding to global Foundation object
209
- // Examples: Foundation.Reveal, Foundation.OffCanvas
210
- var className = name || functionName(plugin);
211
- // Object key to use when storing the plugin, also used to create the identifying data attribute for the plugin
212
- // Examples: data-reveal, data-off-canvas
213
- var attrName = hyphenate(className);
214
-
215
- // Add to the Foundation object and the plugins list (for reflowing)
216
- this._plugins[attrName] = this[className] = plugin;
217
- },
218
- /**
219
- * @function
220
- * Populates the _uuids array with pointers to each individual plugin instance.
221
- * Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls.
222
- * Also fires the initialization event for each plugin, consolidating repetitive code.
223
- * @param {Object} plugin - an instance of a plugin, usually `this` in context.
224
- * @param {String} name - the name of the plugin, passed as a camelCased string.
225
- * @fires Plugin#init
226
- */
227
- registerPlugin: function (plugin, name) {
228
- var pluginName = name ? hyphenate(name) : functionName(plugin.constructor).toLowerCase();
229
- plugin.uuid = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__["b" /* GetYoDigits */])(6, pluginName);
230
-
231
- if (!plugin.$element.attr('data-' + pluginName)) {
232
- plugin.$element.attr('data-' + pluginName, plugin.uuid);
233
- }
234
- if (!plugin.$element.data('zfPlugin')) {
235
- plugin.$element.data('zfPlugin', plugin);
236
- }
237
- /**
238
- * Fires when the plugin has initialized.
239
- * @event Plugin#init
240
- */
241
- plugin.$element.trigger('init.zf.' + pluginName);
242
-
243
- this._uuids.push(plugin.uuid);
244
-
245
- return;
246
- },
247
- /**
248
- * @function
249
- * Removes the plugins uuid from the _uuids array.
250
- * Removes the zfPlugin data attribute, as well as the data-plugin-name attribute.
251
- * Also fires the destroyed event for the plugin, consolidating repetitive code.
252
- * @param {Object} plugin - an instance of a plugin, usually `this` in context.
253
- * @fires Plugin#destroyed
254
- */
255
- unregisterPlugin: function (plugin) {
256
- var pluginName = hyphenate(functionName(plugin.$element.data('zfPlugin').constructor));
257
-
258
- this._uuids.splice(this._uuids.indexOf(plugin.uuid), 1);
259
- plugin.$element.removeAttr('data-' + pluginName).removeData('zfPlugin')
260
- /**
261
- * Fires when the plugin has been destroyed.
262
- * @event Plugin#destroyed
263
- */
264
- .trigger('destroyed.zf.' + pluginName);
265
- for (var prop in plugin) {
266
- plugin[prop] = null; //clean up script to prep for garbage collection.
267
- }
268
- return;
269
- },
270
-
271
- /**
272
- * @function
273
- * Causes one or more active plugins to re-initialize, resetting event listeners, recalculating positions, etc.
274
- * @param {String} plugins - optional string of an individual plugin key, attained by calling `$(element).data('pluginName')`, or string of a plugin class i.e. `'dropdown'`
275
- * @default If no argument is passed, reflow all currently active plugins.
276
- */
277
- reInit: function (plugins) {
278
- var isJQ = plugins instanceof __WEBPACK_IMPORTED_MODULE_0_jquery___default.a;
279
- try {
280
- if (isJQ) {
281
- plugins.each(function () {
282
- __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('zfPlugin')._init();
283
- });
284
- } else {
285
- var type = typeof plugins,
286
- _this = this,
287
- fns = {
288
- 'object': function (plgs) {
289
- plgs.forEach(function (p) {
290
- p = hyphenate(p);
291
- __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-' + p + ']').foundation('_init');
292
- });
293
- },
294
- 'string': function () {
295
- plugins = hyphenate(plugins);
296
- __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-' + plugins + ']').foundation('_init');
297
- },
298
- 'undefined': function () {
299
- this['object'](Object.keys(_this._plugins));
300
- }
301
- };
302
- fns[type](plugins);
303
- }
304
- } catch (err) {
305
- console.error(err);
306
- } finally {
307
- return plugins;
308
- }
309
- },
310
-
311
- /**
312
- * Initialize plugins on any elements within `elem` (and `elem` itself) that aren't already initialized.
313
- * @param {Object} elem - jQuery object containing the element to check inside. Also checks the element itself, unless it's the `document` object.
314
- * @param {String|Array} plugins - A list of plugins to initialize. Leave this out to initialize everything.
315
- */
316
- reflow: function (elem, plugins) {
317
-
318
- // If plugins is undefined, just grab everything
319
- if (typeof plugins === 'undefined') {
320
- plugins = Object.keys(this._plugins);
321
- }
322
- // If plugins is a string, convert it to an array with one item
323
- else if (typeof plugins === 'string') {
324
- plugins = [plugins];
325
- }
326
-
327
- var _this = this;
328
-
329
- // Iterate through each plugin
330
- __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.each(plugins, function (i, name) {
331
- // Get the current plugin
332
- var plugin = _this._plugins[name];
333
-
334
- // Localize the search to all elements inside elem, as well as elem itself, unless elem === document
335
- var $elem = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(elem).find('[data-' + name + ']').addBack('[data-' + name + ']');
336
-
337
- // For each plugin found, initialize it
338
- $elem.each(function () {
339
- var $el = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
340
- opts = {};
341
- // Don't double-dip on plugins
342
- if ($el.data('zfPlugin')) {
343
- console.warn("Tried to initialize " + name + " on an element that already has a Foundation plugin.");
344
- return;
345
- }
346
-
347
- if ($el.attr('data-options')) {
348
- var thing = $el.attr('data-options').split(';').forEach(function (e, i) {
349
- var opt = e.split(':').map(function (el) {
350
- return el.trim();
351
- });
352
- if (opt[0]) opts[opt[0]] = parseValue(opt[1]);
353
- });
354
- }
355
- try {
356
- $el.data('zfPlugin', new plugin(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), opts));
357
- } catch (er) {
358
- console.error(er);
359
- } finally {
360
- return;
361
- }
362
- });
363
- });
364
- },
365
- getFnName: functionName,
366
-
367
- addToJquery: function ($) {
368
- // TODO: consider not making this a jQuery function
369
- // TODO: need way to reflow vs. re-initialize
370
- /**
371
- * The Foundation jQuery method.
372
- * @param {String|Array} method - An action to perform on the current jQuery object.
373
- */
374
- var foundation = function (method) {
375
- var type = typeof method,
376
- $noJS = $('.no-js');
377
-
378
- if ($noJS.length) {
379
- $noJS.removeClass('no-js');
380
- }
381
-
382
- if (type === 'undefined') {
383
- //needs to initialize the Foundation object, or an individual plugin.
384
- __WEBPACK_IMPORTED_MODULE_2__foundation_util_mediaQuery__["a" /* MediaQuery */]._init();
385
- Foundation.reflow(this);
386
- } else if (type === 'string') {
387
- //an individual method to invoke on a plugin or group of plugins
388
- var args = Array.prototype.slice.call(arguments, 1); //collect all the arguments, if necessary
389
- var plugClass = this.data('zfPlugin'); //determine the class of plugin
390
-
391
- if (plugClass !== undefined && plugClass[method] !== undefined) {
392
- //make sure both the class and method exist
393
- if (this.length === 1) {
394
- //if there's only one, call it directly.
395
- plugClass[method].apply(plugClass, args);
396
- } else {
397
- this.each(function (i, el) {
398
- //otherwise loop through the jQuery collection and invoke the method on each
399
- plugClass[method].apply($(el).data('zfPlugin'), args);
400
- });
401
- }
402
- } else {
403
- //error for no class or no method
404
- throw new ReferenceError("We're sorry, '" + method + "' is not an available method for " + (plugClass ? functionName(plugClass) : 'this element') + '.');
405
- }
406
- } else {
407
- //error for invalid argument type
408
- throw new TypeError('We\'re sorry, ' + type + ' is not a valid parameter. You must use a string representing the method you wish to invoke.');
409
- }
410
- return this;
411
- };
412
- $.fn.foundation = foundation;
413
- return $;
414
- }
415
- };
416
-
417
- Foundation.util = {
418
- /**
419
- * Function for applying a debounce effect to a function call.
420
- * @function
421
- * @param {Function} func - Function to be called at end of timeout.
422
- * @param {Number} delay - Time in ms to delay the call of `func`.
423
- * @returns function
424
- */
425
- throttle: function (func, delay) {
426
- var timer = null;
427
-
428
- return function () {
429
- var context = this,
430
- args = arguments;
431
-
432
- if (timer === null) {
433
- timer = setTimeout(function () {
434
- func.apply(context, args);
435
- timer = null;
436
- }, delay);
437
- }
438
- };
439
- }
440
- };
441
-
442
- window.Foundation = Foundation;
443
-
444
- // Polyfill for requestAnimationFrame
445
- (function () {
446
- if (!Date.now || !window.Date.now) window.Date.now = Date.now = function () {
447
- return new Date().getTime();
448
- };
449
-
450
- var vendors = ['webkit', 'moz'];
451
- for (var i = 0; i < vendors.length && !window.requestAnimationFrame; ++i) {
452
- var vp = vendors[i];
453
- window.requestAnimationFrame = window[vp + 'RequestAnimationFrame'];
454
- window.cancelAnimationFrame = window[vp + 'CancelAnimationFrame'] || window[vp + 'CancelRequestAnimationFrame'];
455
- }
456
- if (/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent) || !window.requestAnimationFrame || !window.cancelAnimationFrame) {
457
- var lastTime = 0;
458
- window.requestAnimationFrame = function (callback) {
459
- var now = Date.now();
460
- var nextTime = Math.max(lastTime + 16, now);
461
- return setTimeout(function () {
462
- callback(lastTime = nextTime);
463
- }, nextTime - now);
464
- };
465
- window.cancelAnimationFrame = clearTimeout;
466
- }
467
- /**
468
- * Polyfill for performance.now, required by rAF
469
- */
470
- if (!window.performance || !window.performance.now) {
471
- window.performance = {
472
- start: Date.now(),
473
- now: function () {
474
- return Date.now() - this.start;
475
- }
476
- };
477
- }
478
- })();
479
- if (!Function.prototype.bind) {
480
- Function.prototype.bind = function (oThis) {
481
- if (typeof this !== 'function') {
482
- // closest thing possible to the ECMAScript 5
483
- // internal IsCallable function
484
- throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
485
- }
486
-
487
- var aArgs = Array.prototype.slice.call(arguments, 1),
488
- fToBind = this,
489
- fNOP = function () {},
490
- fBound = function () {
491
- return fToBind.apply(this instanceof fNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments)));
492
- };
493
-
494
- if (this.prototype) {
495
- // native functions don't have a prototype
496
- fNOP.prototype = this.prototype;
497
- }
498
- fBound.prototype = new fNOP();
499
-
500
- return fBound;
501
- };
502
- }
503
- // Polyfill to get the name of a function in IE9
504
- function functionName(fn) {
505
- if (Function.prototype.name === undefined) {
506
- var funcNameRegex = /function\s([^(]{1,})\(/;
507
- var results = funcNameRegex.exec(fn.toString());
508
- return results && results.length > 1 ? results[1].trim() : "";
509
- } else if (fn.prototype === undefined) {
510
- return fn.constructor.name;
511
- } else {
512
- return fn.prototype.constructor.name;
513
- }
514
- }
515
- function parseValue(str) {
516
- if ('true' === str) return true;else if ('false' === str) return false;else if (!isNaN(str * 1)) return parseFloat(str);
517
- return str;
518
- }
519
- // Convert PascalCase to kebab-case
520
- // Thank you: http://stackoverflow.com/a/8955580
521
- function hyphenate(str) {
522
- return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
523
- }
524
-
525
-
526
-
527
- /***/ }),
528
- /* 4 */
529
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
530
-
531
- "use strict";
532
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Plugin; });
533
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
534
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
535
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core__ = __webpack_require__(1);
536
-
537
-
538
- var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
539
-
540
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
541
-
542
-
543
-
544
-
545
- // Abstract class for providing lifecycle hooks. Expect plugins to define AT LEAST
546
- // {function} _setup (replaces previous constructor),
547
- // {function} _destroy (replaces previous destroy)
548
-
549
- var Plugin = function () {
550
- function Plugin(element, options) {
551
- _classCallCheck(this, Plugin);
552
-
553
- this._setup(element, options);
554
- var pluginName = getPluginName(this);
555
- this.uuid = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__["b" /* GetYoDigits */])(6, pluginName);
556
-
557
- if (!this.$element.attr('data-' + pluginName)) {
558
- this.$element.attr('data-' + pluginName, this.uuid);
559
- }
560
- if (!this.$element.data('zfPlugin')) {
561
- this.$element.data('zfPlugin', this);
562
- }
563
- /**
564
- * Fires when the plugin has initialized.
565
- * @event Plugin#init
566
- */
567
- this.$element.trigger('init.zf.' + pluginName);
568
- }
569
-
570
- _createClass(Plugin, [{
571
- key: 'destroy',
572
- value: function destroy() {
573
- this._destroy();
574
- var pluginName = getPluginName(this);
575
- this.$element.removeAttr('data-' + pluginName).removeData('zfPlugin')
576
- /**
577
- * Fires when the plugin has been destroyed.
578
- * @event Plugin#destroyed
579
- */
580
- .trigger('destroyed.zf.' + pluginName);
581
- for (var prop in this) {
582
- this[prop] = null; //clean up script to prep for garbage collection.
583
- }
584
- }
585
- }]);
586
-
587
- return Plugin;
588
- }();
589
-
590
- // Convert PascalCase to kebab-case
591
- // Thank you: http://stackoverflow.com/a/8955580
592
-
593
-
594
- function hyphenate(str) {
595
- return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
596
- }
597
-
598
- function getPluginName(obj) {
599
- if (typeof obj.constructor.name !== 'undefined') {
600
- return hyphenate(obj.constructor.name);
601
- } else {
602
- return hyphenate(obj.className);
603
- }
604
- }
605
-
606
-
607
-
608
- /***/ }),
609
- /* 5 */
610
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
611
-
612
- "use strict";
613
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MediaQuery; });
614
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
615
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
616
-
617
-
618
-
619
-
620
- // Default set of media queries
621
- var defaultQueries = {
622
- 'default': 'only screen',
623
- landscape: 'only screen and (orientation: landscape)',
624
- portrait: 'only screen and (orientation: portrait)',
625
- retina: 'only screen and (-webkit-min-device-pixel-ratio: 2),' + 'only screen and (min--moz-device-pixel-ratio: 2),' + 'only screen and (-o-min-device-pixel-ratio: 2/1),' + 'only screen and (min-device-pixel-ratio: 2),' + 'only screen and (min-resolution: 192dpi),' + 'only screen and (min-resolution: 2dppx)'
626
- };
627
-
628
- // matchMedia() polyfill - Test a CSS media type/query in JS.
629
- // Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license
630
- var matchMedia = window.matchMedia || function () {
631
- 'use strict';
632
-
633
- // For browsers that support matchMedium api such as IE 9 and webkit
634
-
635
- var styleMedia = window.styleMedia || window.media;
636
-
637
- // For those that don't support matchMedium
638
- if (!styleMedia) {
639
- var style = document.createElement('style'),
640
- script = document.getElementsByTagName('script')[0],
641
- info = null;
642
-
643
- style.type = 'text/css';
644
- style.id = 'matchmediajs-test';
645
-
646
- script && script.parentNode && script.parentNode.insertBefore(style, script);
647
-
648
- // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
649
- info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle;
650
-
651
- styleMedia = {
652
- matchMedium: function (media) {
653
- var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
654
-
655
- // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
656
- if (style.styleSheet) {
657
- style.styleSheet.cssText = text;
658
- } else {
659
- style.textContent = text;
660
- }
661
-
662
- // Test if media query is true or false
663
- return info.width === '1px';
664
- }
665
- };
666
- }
667
-
668
- return function (media) {
669
- return {
670
- matches: styleMedia.matchMedium(media || 'all'),
671
- media: media || 'all'
672
- };
673
- };
674
- }();
675
-
676
- var MediaQuery = {
677
- queries: [],
678
-
679
- current: '',
680
-
681
- /**
682
- * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher.
683
- * @function
684
- * @private
685
- */
686
- _init: function () {
687
- var self = this;
688
- var $meta = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('meta.foundation-mq');
689
- if (!$meta.length) {
690
- __WEBPACK_IMPORTED_MODULE_0_jquery___default()('<meta class="foundation-mq">').appendTo(document.head);
691
- }
692
-
693
- var extractedStyles = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('.foundation-mq').css('font-family');
694
- var namedQueries;
695
-
696
- namedQueries = parseStyleToObject(extractedStyles);
697
-
698
- for (var key in namedQueries) {
699
- if (namedQueries.hasOwnProperty(key)) {
700
- self.queries.push({
701
- name: key,
702
- value: 'only screen and (min-width: ' + namedQueries[key] + ')'
703
- });
704
- }
705
- }
706
-
707
- this.current = this._getCurrentSize();
708
-
709
- this._watcher();
710
- },
711
-
712
-
713
- /**
714
- * Checks if the screen is at least as wide as a breakpoint.
715
- * @function
716
- * @param {String} size - Name of the breakpoint to check.
717
- * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller.
718
- */
719
- atLeast: function (size) {
720
- var query = this.get(size);
721
-
722
- if (query) {
723
- return matchMedia(query).matches;
724
- }
725
-
726
- return false;
727
- },
728
-
729
-
730
- /**
731
- * Checks if the screen matches to a breakpoint.
732
- * @function
733
- * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method.
734
- * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not.
735
- */
736
- is: function (size) {
737
- size = size.trim().split(' ');
738
- if (size.length > 1 && size[1] === 'only') {
739
- if (size[0] === this._getCurrentSize()) return true;
740
- } else {
741
- return this.atLeast(size[0]);
742
- }
743
- return false;
744
- },
745
-
746
-
747
- /**
748
- * Gets the media query of a breakpoint.
749
- * @function
750
- * @param {String} size - Name of the breakpoint to get.
751
- * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist.
752
- */
753
- get: function (size) {
754
- for (var i in this.queries) {
755
- if (this.queries.hasOwnProperty(i)) {
756
- var query = this.queries[i];
757
- if (size === query.name) return query.value;
758
- }
759
- }
760
-
761
- return null;
762
- },
763
-
764
-
765
- /**
766
- * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one).
767
- * @function
768
- * @private
769
- * @returns {String} Name of the current breakpoint.
770
- */
771
- _getCurrentSize: function () {
772
- var matched;
773
-
774
- for (var i = 0; i < this.queries.length; i++) {
775
- var query = this.queries[i];
776
-
777
- if (matchMedia(query.value).matches) {
778
- matched = query;
779
- }
780
- }
781
-
782
- if (typeof matched === 'object') {
783
- return matched.name;
784
- } else {
785
- return matched;
786
- }
787
- },
788
-
789
-
790
- /**
791
- * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes.
792
- * @function
793
- * @private
794
- */
795
- _watcher: function () {
796
- var _this = this;
797
-
798
- __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', function () {
799
- var newSize = _this._getCurrentSize(),
800
- currentSize = _this.current;
801
-
802
- if (newSize !== currentSize) {
803
- // Change the current media query
804
- _this.current = newSize;
805
-
806
- // Broadcast the media query change on the window
807
- __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);
808
- }
809
- });
810
- }
811
- };
812
-
813
- // Thank you: https://github.com/sindresorhus/query-string
814
- function parseStyleToObject(str) {
815
- var styleObject = {};
816
-
817
- if (typeof str !== 'string') {
818
- return styleObject;
819
- }
820
-
821
- str = str.trim().slice(1, -1); // browsers re-quote string style values
822
-
823
- if (!str) {
824
- return styleObject;
825
- }
826
-
827
- styleObject = str.split('&').reduce(function (ret, param) {
828
- var parts = param.replace(/\+/g, ' ').split('=');
829
- var key = parts[0];
830
- var val = parts[1];
831
- key = decodeURIComponent(key);
832
-
833
- // missing `=` should be `null`:
834
- // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
835
- val = val === undefined ? null : decodeURIComponent(val);
836
-
837
- if (!ret.hasOwnProperty(key)) {
838
- ret[key] = val;
839
- } else if (Array.isArray(ret[key])) {
840
- ret[key].push(val);
841
- } else {
842
- ret[key] = [ret[key], val];
843
- }
844
- return ret;
845
- }, {});
846
-
847
- return styleObject;
848
- }
849
-
850
-
851
-
852
- /***/ }),
853
- /* 6 */
854
- /***/ (function(module, exports, __webpack_require__) {
855
-
856
- module.exports = __webpack_require__(2);
857
-
858
-
859
- /***/ })
860
- /******/ ]);