foundation-rails 6.4.1.0 → 6.4.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/Rakefile +5 -6
  4. data/lib/foundation/rails/version.rb +1 -1
  5. data/vendor/assets/js/foundation.abide.js +781 -0
  6. data/vendor/assets/js/foundation.accordion.js +511 -0
  7. data/vendor/assets/js/foundation.accordionMenu.js +527 -0
  8. data/vendor/assets/js/foundation.core.js +860 -0
  9. data/vendor/assets/js/foundation.drilldown.js +759 -0
  10. data/vendor/assets/js/foundation.dropdown.js +1131 -0
  11. data/vendor/assets/js/foundation.dropdownMenu.js +678 -0
  12. data/vendor/assets/js/foundation.equalizer.js +542 -0
  13. data/vendor/assets/js/foundation.interchange.js +399 -0
  14. data/vendor/assets/js/{foundation.js.es6 → foundation.js} +11 -12
  15. data/vendor/assets/js/foundation.magellan.js +449 -0
  16. data/vendor/assets/js/foundation.offcanvas.js +1052 -0
  17. data/vendor/assets/js/foundation.orbit.js +767 -0
  18. data/vendor/assets/js/foundation.responsiveAccordionTabs.js +440 -0
  19. data/vendor/assets/js/foundation.responsiveMenu.js +362 -0
  20. data/vendor/assets/js/foundation.responsiveToggle.js +336 -0
  21. data/vendor/assets/js/foundation.reveal.js +1066 -0
  22. data/vendor/assets/js/foundation.slider.js +1236 -0
  23. data/vendor/assets/js/foundation.smoothScroll.js +303 -0
  24. data/vendor/assets/js/foundation.sticky.js +1001 -0
  25. data/vendor/assets/js/foundation.tabs.js +678 -0
  26. data/vendor/assets/js/foundation.toggler.js +602 -0
  27. data/vendor/assets/js/foundation.tooltip.js +1195 -0
  28. data/vendor/assets/js/{foundation.util.box.js.es6 → foundation.util.box.js} +154 -41
  29. data/vendor/assets/js/foundation.util.imageLoader.js +163 -0
  30. data/vendor/assets/js/foundation.util.keyboard.js +298 -0
  31. data/vendor/assets/js/foundation.util.mediaQuery.js +353 -0
  32. data/vendor/assets/js/foundation.util.motion.js +231 -0
  33. data/vendor/assets/js/foundation.util.nest.js +181 -0
  34. data/vendor/assets/js/foundation.util.timer.js +170 -0
  35. data/vendor/assets/js/foundation.util.timerAndImageLoader.js +90 -0
  36. data/vendor/assets/js/foundation.util.touch.js +275 -0
  37. data/vendor/assets/js/foundation.util.triggers.js +399 -0
  38. data/vendor/assets/js/foundation.zf.responsiveAccordionTabs.js +262 -0
  39. metadata +37 -71
  40. data/vendor/assets/js/entries/foundation-plugins.js +0 -25
  41. data/vendor/assets/js/entries/foundation.js +0 -101
  42. data/vendor/assets/js/entries/plugins/foundation.abide.js +0 -4
  43. data/vendor/assets/js/entries/plugins/foundation.accordion.js +0 -4
  44. data/vendor/assets/js/entries/plugins/foundation.accordionMenu.js +0 -5
  45. data/vendor/assets/js/entries/plugins/foundation.core.js +0 -21
  46. data/vendor/assets/js/entries/plugins/foundation.drilldown.js +0 -4
  47. data/vendor/assets/js/entries/plugins/foundation.dropdown.js +0 -5
  48. data/vendor/assets/js/entries/plugins/foundation.dropdownMenu.js +0 -4
  49. data/vendor/assets/js/entries/plugins/foundation.equalizer.js +0 -4
  50. data/vendor/assets/js/entries/plugins/foundation.interchange.js +0 -4
  51. data/vendor/assets/js/entries/plugins/foundation.magellan.js +0 -4
  52. data/vendor/assets/js/entries/plugins/foundation.offcanvas.js +0 -4
  53. data/vendor/assets/js/entries/plugins/foundation.orbit.js +0 -5
  54. data/vendor/assets/js/entries/plugins/foundation.responsiveAccordionTabs.js +0 -5
  55. data/vendor/assets/js/entries/plugins/foundation.responsiveMenu.js +0 -5
  56. data/vendor/assets/js/entries/plugins/foundation.responsiveToggle.js +0 -5
  57. data/vendor/assets/js/entries/plugins/foundation.reveal.js +0 -4
  58. data/vendor/assets/js/entries/plugins/foundation.slider.js +0 -5
  59. data/vendor/assets/js/entries/plugins/foundation.smoothScroll.js +0 -5
  60. data/vendor/assets/js/entries/plugins/foundation.sticky.js +0 -5
  61. data/vendor/assets/js/entries/plugins/foundation.tabs.js +0 -5
  62. data/vendor/assets/js/entries/plugins/foundation.toggler.js +0 -5
  63. data/vendor/assets/js/entries/plugins/foundation.tooltip.js +0 -4
  64. data/vendor/assets/js/entries/plugins/foundation.util.box.js +0 -4
  65. data/vendor/assets/js/entries/plugins/foundation.util.imageLoader.js +0 -5
  66. data/vendor/assets/js/entries/plugins/foundation.util.keyboard.js +0 -4
  67. data/vendor/assets/js/entries/plugins/foundation.util.mediaQuery.js +0 -4
  68. data/vendor/assets/js/entries/plugins/foundation.util.motion.js +0 -5
  69. data/vendor/assets/js/entries/plugins/foundation.util.nest.js +0 -5
  70. data/vendor/assets/js/entries/plugins/foundation.util.timer.js +0 -5
  71. data/vendor/assets/js/entries/plugins/foundation.util.touch.js +0 -7
  72. data/vendor/assets/js/entries/plugins/foundation.util.triggers.js +0 -5
  73. data/vendor/assets/js/foundation.abide.js.es6 +0 -587
  74. data/vendor/assets/js/foundation.accordion.js.es6 +0 -329
  75. data/vendor/assets/js/foundation.accordionMenu.js.es6 +0 -328
  76. data/vendor/assets/js/foundation.core.js.es6 +0 -337
  77. data/vendor/assets/js/foundation.drilldown.js.es6 +0 -536
  78. data/vendor/assets/js/foundation.dropdown.js.es6 +0 -394
  79. data/vendor/assets/js/foundation.dropdownMenu.js.es6 +0 -458
  80. data/vendor/assets/js/foundation.equalizer.js.es6 +0 -318
  81. data/vendor/assets/js/foundation.interchange.js.es6 +0 -210
  82. data/vendor/assets/js/foundation.magellan.js.es6 +0 -257
  83. data/vendor/assets/js/foundation.offcanvas.js.es6 +0 -546
  84. data/vendor/assets/js/foundation.orbit.js.es6 +0 -531
  85. data/vendor/assets/js/foundation.plugin.js.es6 +0 -54
  86. data/vendor/assets/js/foundation.positionable.js.es6 +0 -206
  87. data/vendor/assets/js/foundation.responsiveAccordionTabs.js.es6 +0 -243
  88. data/vendor/assets/js/foundation.responsiveMenu.js.es6 +0 -155
  89. data/vendor/assets/js/foundation.responsiveToggle.js.es6 +0 -156
  90. data/vendor/assets/js/foundation.reveal.js.es6 +0 -585
  91. data/vendor/assets/js/foundation.slider.js.es6 +0 -712
  92. data/vendor/assets/js/foundation.smoothScroll.js.es6 +0 -135
  93. data/vendor/assets/js/foundation.sticky.js.es6 +0 -507
  94. data/vendor/assets/js/foundation.tabs.js.es6 +0 -498
  95. data/vendor/assets/js/foundation.toggler.js.es6 +0 -150
  96. data/vendor/assets/js/foundation.tooltip.js.es6 +0 -462
  97. data/vendor/assets/js/foundation.util.core.js.es6 +0 -52
  98. data/vendor/assets/js/foundation.util.imageLoader.js.es6 +0 -45
  99. data/vendor/assets/js/foundation.util.keyboard.js.es6 +0 -162
  100. data/vendor/assets/js/foundation.util.mediaQuery.js.es6 +0 -234
  101. data/vendor/assets/js/foundation.util.motion.js.es6 +0 -104
  102. data/vendor/assets/js/foundation.util.nest.js.es6 +0 -67
  103. data/vendor/assets/js/foundation.util.timer.js.es6 +0 -48
  104. data/vendor/assets/js/foundation.util.touch.js.es6 +0 -149
  105. data/vendor/assets/js/foundation.util.triggers.js.es6 +0 -268
@@ -0,0 +1,298 @@
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 = 102);
67
+ /******/ })
68
+ /************************************************************************/
69
+ /******/ ({
70
+
71
+ /***/ 0:
72
+ /***/ (function(module, exports) {
73
+
74
+ module.exports = jQuery;
75
+
76
+ /***/ }),
77
+
78
+ /***/ 1:
79
+ /***/ (function(module, exports) {
80
+
81
+ module.exports = {Foundation: window.Foundation};
82
+
83
+ /***/ }),
84
+
85
+ /***/ 102:
86
+ /***/ (function(module, exports, __webpack_require__) {
87
+
88
+ module.exports = __webpack_require__(36);
89
+
90
+
91
+ /***/ }),
92
+
93
+ /***/ 3:
94
+ /***/ (function(module, exports) {
95
+
96
+ module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend};
97
+
98
+ /***/ }),
99
+
100
+ /***/ 36:
101
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
102
+
103
+ "use strict";
104
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
105
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
106
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
107
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(66);
108
+
109
+
110
+
111
+ __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].Keyboard = __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["a" /* Keyboard */];
112
+
113
+ /***/ }),
114
+
115
+ /***/ 66:
116
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
117
+
118
+ "use strict";
119
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Keyboard; });
120
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
121
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
122
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core__ = __webpack_require__(3);
123
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__);
124
+ /*******************************************
125
+ * *
126
+ * This util was created by Marius Olbertz *
127
+ * Please thank Marius on GitHub /owlbertz *
128
+ * or the web http://www.mariusolbertz.de/ *
129
+ * *
130
+ ******************************************/
131
+
132
+
133
+
134
+
135
+
136
+
137
+ var keyCodes = {
138
+ 9: 'TAB',
139
+ 13: 'ENTER',
140
+ 27: 'ESCAPE',
141
+ 32: 'SPACE',
142
+ 35: 'END',
143
+ 36: 'HOME',
144
+ 37: 'ARROW_LEFT',
145
+ 38: 'ARROW_UP',
146
+ 39: 'ARROW_RIGHT',
147
+ 40: 'ARROW_DOWN'
148
+ };
149
+
150
+ var commands = {};
151
+
152
+ // Functions pulled out to be referenceable from internals
153
+ function findFocusable($element) {
154
+ if (!$element) {
155
+ return false;
156
+ }
157
+ return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function () {
158
+ if (!__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is(':visible') || __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).attr('tabindex') < 0) {
159
+ return false;
160
+ } //only have visible elements and those that have a tabindex greater or equal 0
161
+ return true;
162
+ });
163
+ }
164
+
165
+ function parseKey(event) {
166
+ var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase();
167
+
168
+ // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events
169
+ key = key.replace(/\W+/, '');
170
+
171
+ if (event.shiftKey) key = 'SHIFT_' + key;
172
+ if (event.ctrlKey) key = 'CTRL_' + key;
173
+ if (event.altKey) key = 'ALT_' + key;
174
+
175
+ // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`)
176
+ key = key.replace(/_$/, '');
177
+
178
+ return key;
179
+ }
180
+
181
+ var Keyboard = {
182
+ keys: getKeyCodes(keyCodes),
183
+
184
+ /**
185
+ * Parses the (keyboard) event and returns a String that represents its key
186
+ * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE
187
+ * @param {Event} event - the event generated by the event handler
188
+ * @return String key - String that represents the key pressed
189
+ */
190
+ parseKey: parseKey,
191
+
192
+ /**
193
+ * Handles the given (keyboard) event
194
+ * @param {Event} event - the event generated by the event handler
195
+ * @param {String} component - Foundation component's name, e.g. Slider or Reveal
196
+ * @param {Objects} functions - collection of functions that are to be executed
197
+ */
198
+ handleKey: function (event, component, functions) {
199
+ var commandList = commands[component],
200
+ keyCode = this.parseKey(event),
201
+ cmds,
202
+ command,
203
+ fn;
204
+
205
+ if (!commandList) return console.warn('Component not defined!');
206
+
207
+ if (typeof commandList.ltr === 'undefined') {
208
+ // this component does not differentiate between ltr and rtl
209
+ cmds = commandList; // use plain list
210
+ } else {
211
+ // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa
212
+ if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__["rtl"])()) cmds = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, commandList.ltr, commandList.rtl);else cmds = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, commandList.rtl, commandList.ltr);
213
+ }
214
+ command = cmds[keyCode];
215
+
216
+ fn = functions[command];
217
+ if (fn && typeof fn === 'function') {
218
+ // execute function if exists
219
+ var returnValue = fn.apply();
220
+ if (functions.handled || typeof functions.handled === 'function') {
221
+ // execute function when event was handled
222
+ functions.handled(returnValue);
223
+ }
224
+ } else {
225
+ if (functions.unhandled || typeof functions.unhandled === 'function') {
226
+ // execute function when event was not handled
227
+ functions.unhandled();
228
+ }
229
+ }
230
+ },
231
+
232
+
233
+ /**
234
+ * Finds all focusable elements within the given `$element`
235
+ * @param {jQuery} $element - jQuery object to search within
236
+ * @return {jQuery} $focusable - all focusable elements within `$element`
237
+ */
238
+
239
+ findFocusable: findFocusable,
240
+
241
+ /**
242
+ * Returns the component name name
243
+ * @param {Object} component - Foundation component, e.g. Slider or Reveal
244
+ * @return String componentName
245
+ */
246
+
247
+ register: function (componentName, cmds) {
248
+ commands[componentName] = cmds;
249
+ },
250
+
251
+
252
+ // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context?
253
+ //
254
+ /**
255
+ * Traps the focus in the given element.
256
+ * @param {jQuery} $element jQuery object to trap the foucs into.
257
+ */
258
+ trapFocus: function ($element) {
259
+ var $focusable = findFocusable($element),
260
+ $firstFocusable = $focusable.eq(0),
261
+ $lastFocusable = $focusable.eq(-1);
262
+
263
+ $element.on('keydown.zf.trapfocus', function (event) {
264
+ if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') {
265
+ event.preventDefault();
266
+ $firstFocusable.focus();
267
+ } else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') {
268
+ event.preventDefault();
269
+ $lastFocusable.focus();
270
+ }
271
+ });
272
+ },
273
+
274
+ /**
275
+ * Releases the trapped focus from the given element.
276
+ * @param {jQuery} $element jQuery object to release the focus for.
277
+ */
278
+ releaseFocus: function ($element) {
279
+ $element.off('keydown.zf.trapfocus');
280
+ }
281
+ };
282
+
283
+ /*
284
+ * Constants for easier comparing.
285
+ * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE
286
+ */
287
+ function getKeyCodes(kcs) {
288
+ var k = {};
289
+ for (var kc in kcs) {
290
+ k[kcs[kc]] = kcs[kc];
291
+ }return k;
292
+ }
293
+
294
+
295
+
296
+ /***/ })
297
+
298
+ /******/ });
@@ -0,0 +1,353 @@
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 = 103);
67
+ /******/ })
68
+ /************************************************************************/
69
+ /******/ ({
70
+
71
+ /***/ 0:
72
+ /***/ (function(module, exports) {
73
+
74
+ module.exports = jQuery;
75
+
76
+ /***/ }),
77
+
78
+ /***/ 1:
79
+ /***/ (function(module, exports) {
80
+
81
+ module.exports = {Foundation: window.Foundation};
82
+
83
+ /***/ }),
84
+
85
+ /***/ 103:
86
+ /***/ (function(module, exports, __webpack_require__) {
87
+
88
+ module.exports = __webpack_require__(37);
89
+
90
+
91
+ /***/ }),
92
+
93
+ /***/ 37:
94
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
95
+
96
+ "use strict";
97
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
98
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
99
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
100
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__ = __webpack_require__(67);
101
+
102
+
103
+
104
+ __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].MediaQuery = __WEBPACK_IMPORTED_MODULE_1__foundation_util_mediaQuery__["a" /* MediaQuery */];
105
+
106
+ /***/ }),
107
+
108
+ /***/ 67:
109
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
110
+
111
+ "use strict";
112
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MediaQuery; });
113
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
114
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
115
+
116
+
117
+
118
+
119
+ // Default set of media queries
120
+ var defaultQueries = {
121
+ 'default': 'only screen',
122
+ landscape: 'only screen and (orientation: landscape)',
123
+ portrait: 'only screen and (orientation: portrait)',
124
+ 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)'
125
+ };
126
+
127
+ // matchMedia() polyfill - Test a CSS media type/query in JS.
128
+ // Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license
129
+ var matchMedia = window.matchMedia || function () {
130
+ 'use strict';
131
+
132
+ // For browsers that support matchMedium api such as IE 9 and webkit
133
+
134
+ var styleMedia = window.styleMedia || window.media;
135
+
136
+ // For those that don't support matchMedium
137
+ if (!styleMedia) {
138
+ var style = document.createElement('style'),
139
+ script = document.getElementsByTagName('script')[0],
140
+ info = null;
141
+
142
+ style.type = 'text/css';
143
+ style.id = 'matchmediajs-test';
144
+
145
+ script && script.parentNode && script.parentNode.insertBefore(style, script);
146
+
147
+ // 'style.currentStyle' is used by IE <= 8 and 'window.getComputedStyle' for all other browsers
148
+ info = 'getComputedStyle' in window && window.getComputedStyle(style, null) || style.currentStyle;
149
+
150
+ styleMedia = {
151
+ matchMedium: function (media) {
152
+ var text = '@media ' + media + '{ #matchmediajs-test { width: 1px; } }';
153
+
154
+ // 'style.styleSheet' is used by IE <= 8 and 'style.textContent' for all other browsers
155
+ if (style.styleSheet) {
156
+ style.styleSheet.cssText = text;
157
+ } else {
158
+ style.textContent = text;
159
+ }
160
+
161
+ // Test if media query is true or false
162
+ return info.width === '1px';
163
+ }
164
+ };
165
+ }
166
+
167
+ return function (media) {
168
+ return {
169
+ matches: styleMedia.matchMedium(media || 'all'),
170
+ media: media || 'all'
171
+ };
172
+ };
173
+ }();
174
+
175
+ var MediaQuery = {
176
+ queries: [],
177
+
178
+ current: '',
179
+
180
+ /**
181
+ * Initializes the media query helper, by extracting the breakpoint list from the CSS and activating the breakpoint watcher.
182
+ * @function
183
+ * @private
184
+ */
185
+ _init: function () {
186
+ var self = this;
187
+ var $meta = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('meta.foundation-mq');
188
+ if (!$meta.length) {
189
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()('<meta class="foundation-mq">').appendTo(document.head);
190
+ }
191
+
192
+ var extractedStyles = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('.foundation-mq').css('font-family');
193
+ var namedQueries;
194
+
195
+ namedQueries = parseStyleToObject(extractedStyles);
196
+
197
+ for (var key in namedQueries) {
198
+ if (namedQueries.hasOwnProperty(key)) {
199
+ self.queries.push({
200
+ name: key,
201
+ value: 'only screen and (min-width: ' + namedQueries[key] + ')'
202
+ });
203
+ }
204
+ }
205
+
206
+ this.current = this._getCurrentSize();
207
+
208
+ this._watcher();
209
+ },
210
+
211
+
212
+ /**
213
+ * Checks if the screen is at least as wide as a breakpoint.
214
+ * @function
215
+ * @param {String} size - Name of the breakpoint to check.
216
+ * @returns {Boolean} `true` if the breakpoint matches, `false` if it's smaller.
217
+ */
218
+ atLeast: function (size) {
219
+ var query = this.get(size);
220
+
221
+ if (query) {
222
+ return matchMedia(query).matches;
223
+ }
224
+
225
+ return false;
226
+ },
227
+
228
+
229
+ /**
230
+ * Checks if the screen matches to a breakpoint.
231
+ * @function
232
+ * @param {String} size - Name of the breakpoint to check, either 'small only' or 'small'. Omitting 'only' falls back to using atLeast() method.
233
+ * @returns {Boolean} `true` if the breakpoint matches, `false` if it does not.
234
+ */
235
+ is: function (size) {
236
+ size = size.trim().split(' ');
237
+ if (size.length > 1 && size[1] === 'only') {
238
+ if (size[0] === this._getCurrentSize()) return true;
239
+ } else {
240
+ return this.atLeast(size[0]);
241
+ }
242
+ return false;
243
+ },
244
+
245
+
246
+ /**
247
+ * Gets the media query of a breakpoint.
248
+ * @function
249
+ * @param {String} size - Name of the breakpoint to get.
250
+ * @returns {String|null} - The media query of the breakpoint, or `null` if the breakpoint doesn't exist.
251
+ */
252
+ get: function (size) {
253
+ for (var i in this.queries) {
254
+ if (this.queries.hasOwnProperty(i)) {
255
+ var query = this.queries[i];
256
+ if (size === query.name) return query.value;
257
+ }
258
+ }
259
+
260
+ return null;
261
+ },
262
+
263
+
264
+ /**
265
+ * Gets the current breakpoint name by testing every breakpoint and returning the last one to match (the biggest one).
266
+ * @function
267
+ * @private
268
+ * @returns {String} Name of the current breakpoint.
269
+ */
270
+ _getCurrentSize: function () {
271
+ var matched;
272
+
273
+ for (var i = 0; i < this.queries.length; i++) {
274
+ var query = this.queries[i];
275
+
276
+ if (matchMedia(query.value).matches) {
277
+ matched = query;
278
+ }
279
+ }
280
+
281
+ if (typeof matched === 'object') {
282
+ return matched.name;
283
+ } else {
284
+ return matched;
285
+ }
286
+ },
287
+
288
+
289
+ /**
290
+ * Activates the breakpoint watcher, which fires an event on the window whenever the breakpoint changes.
291
+ * @function
292
+ * @private
293
+ */
294
+ _watcher: function () {
295
+ var _this = this;
296
+
297
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off('resize.zf.mediaquery').on('resize.zf.mediaquery', function () {
298
+ var newSize = _this._getCurrentSize(),
299
+ currentSize = _this.current;
300
+
301
+ if (newSize !== currentSize) {
302
+ // Change the current media query
303
+ _this.current = newSize;
304
+
305
+ // Broadcast the media query change on the window
306
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).trigger('changed.zf.mediaquery', [newSize, currentSize]);
307
+ }
308
+ });
309
+ }
310
+ };
311
+
312
+ // Thank you: https://github.com/sindresorhus/query-string
313
+ function parseStyleToObject(str) {
314
+ var styleObject = {};
315
+
316
+ if (typeof str !== 'string') {
317
+ return styleObject;
318
+ }
319
+
320
+ str = str.trim().slice(1, -1); // browsers re-quote string style values
321
+
322
+ if (!str) {
323
+ return styleObject;
324
+ }
325
+
326
+ styleObject = str.split('&').reduce(function (ret, param) {
327
+ var parts = param.replace(/\+/g, ' ').split('=');
328
+ var key = parts[0];
329
+ var val = parts[1];
330
+ key = decodeURIComponent(key);
331
+
332
+ // missing `=` should be `null`:
333
+ // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
334
+ val = val === undefined ? null : decodeURIComponent(val);
335
+
336
+ if (!ret.hasOwnProperty(key)) {
337
+ ret[key] = val;
338
+ } else if (Array.isArray(ret[key])) {
339
+ ret[key].push(val);
340
+ } else {
341
+ ret[key] = [ret[key], val];
342
+ }
343
+ return ret;
344
+ }, {});
345
+
346
+ return styleObject;
347
+ }
348
+
349
+
350
+
351
+ /***/ })
352
+
353
+ /******/ });