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,1131 @@
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 = 83);
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
+ /***/ 11:
86
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
87
+
88
+ "use strict";
89
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Positionable; });
90
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_util_box__ = __webpack_require__(8);
91
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_util_box___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_util_box__);
92
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_plugin__ = __webpack_require__(2);
93
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_plugin__);
94
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__ = __webpack_require__(3);
95
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__);
96
+
97
+
98
+ 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; }; }();
99
+
100
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
101
+
102
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
103
+
104
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
105
+
106
+
107
+
108
+
109
+
110
+ var POSITIONS = ['left', 'right', 'top', 'bottom'];
111
+ var VERTICAL_ALIGNMENTS = ['top', 'bottom', 'center'];
112
+ var HORIZONTAL_ALIGNMENTS = ['left', 'right', 'center'];
113
+
114
+ var ALIGNMENTS = {
115
+ 'left': VERTICAL_ALIGNMENTS,
116
+ 'right': VERTICAL_ALIGNMENTS,
117
+ 'top': HORIZONTAL_ALIGNMENTS,
118
+ 'bottom': HORIZONTAL_ALIGNMENTS
119
+ };
120
+
121
+ function nextItem(item, array) {
122
+ var currentIdx = array.indexOf(item);
123
+ if (currentIdx === array.length - 1) {
124
+ return array[0];
125
+ } else {
126
+ return array[currentIdx + 1];
127
+ }
128
+ }
129
+
130
+ var Positionable = function (_Plugin) {
131
+ _inherits(Positionable, _Plugin);
132
+
133
+ function Positionable() {
134
+ _classCallCheck(this, Positionable);
135
+
136
+ return _possibleConstructorReturn(this, (Positionable.__proto__ || Object.getPrototypeOf(Positionable)).apply(this, arguments));
137
+ }
138
+
139
+ _createClass(Positionable, [{
140
+ key: '_init',
141
+
142
+ /**
143
+ * Abstract class encapsulating the tether-like explicit positioning logic
144
+ * including repositioning based on overlap.
145
+ * Expects classes to define defaults for vOffset, hOffset, position,
146
+ * alignment, allowOverlap, and allowBottomOverlap. They can do this by
147
+ * extending the defaults, or (for now recommended due to the way docs are
148
+ * generated) by explicitly declaring them.
149
+ *
150
+ **/
151
+
152
+ value: function _init() {
153
+ this.triedPositions = {};
154
+ this.position = this.options.position === 'auto' ? this._getDefaultPosition() : this.options.position;
155
+ this.alignment = this.options.alignment === 'auto' ? this._getDefaultAlignment() : this.options.alignment;
156
+ }
157
+ }, {
158
+ key: '_getDefaultPosition',
159
+ value: function _getDefaultPosition() {
160
+ return 'bottom';
161
+ }
162
+ }, {
163
+ key: '_getDefaultAlignment',
164
+ value: function _getDefaultAlignment() {
165
+ switch (this.position) {
166
+ case 'bottom':
167
+ case 'top':
168
+ return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["rtl"])() ? 'right' : 'left';
169
+ case 'left':
170
+ case 'right':
171
+ return 'bottom';
172
+ }
173
+ }
174
+
175
+ /**
176
+ * Adjusts the positionable possible positions by iterating through alignments
177
+ * and positions.
178
+ * @function
179
+ * @private
180
+ */
181
+
182
+ }, {
183
+ key: '_reposition',
184
+ value: function _reposition() {
185
+ if (this._alignmentsExhausted(this.position)) {
186
+ this.position = nextItem(this.position, POSITIONS);
187
+ this.alignment = ALIGNMENTS[this.position][0];
188
+ } else {
189
+ this._realign();
190
+ }
191
+ }
192
+
193
+ /**
194
+ * Adjusts the dropdown pane possible positions by iterating through alignments
195
+ * on the current position.
196
+ * @function
197
+ * @private
198
+ */
199
+
200
+ }, {
201
+ key: '_realign',
202
+ value: function _realign() {
203
+ this._addTriedPosition(this.position, this.alignment);
204
+ this.alignment = nextItem(this.alignment, ALIGNMENTS[this.position]);
205
+ }
206
+ }, {
207
+ key: '_addTriedPosition',
208
+ value: function _addTriedPosition(position, alignment) {
209
+ this.triedPositions[position] = this.triedPositions[position] || [];
210
+ this.triedPositions[position].push(alignment);
211
+ }
212
+ }, {
213
+ key: '_positionsExhausted',
214
+ value: function _positionsExhausted() {
215
+ var isExhausted = true;
216
+ for (var i = 0; i < POSITIONS.length; i++) {
217
+ isExhausted = isExhausted && this._alignmentsExhausted(POSITIONS[i]);
218
+ }
219
+ return isExhausted;
220
+ }
221
+ }, {
222
+ key: '_alignmentsExhausted',
223
+ value: function _alignmentsExhausted(position) {
224
+ return this.triedPositions[position] && this.triedPositions[position].length == ALIGNMENTS[position].length;
225
+ }
226
+
227
+ // When we're trying to center, we don't want to apply offset that's going to
228
+ // take us just off center, so wrap around to return 0 for the appropriate
229
+ // offset in those alignments. TODO: Figure out if we want to make this
230
+ // configurable behavior... it feels more intuitive, especially for tooltips, but
231
+ // it's possible someone might actually want to start from center and then nudge
232
+ // slightly off.
233
+
234
+ }, {
235
+ key: '_getVOffset',
236
+ value: function _getVOffset() {
237
+ return this.options.vOffset;
238
+ }
239
+ }, {
240
+ key: '_getHOffset',
241
+ value: function _getHOffset() {
242
+ return this.options.hOffset;
243
+ }
244
+ }, {
245
+ key: '_setPosition',
246
+ value: function _setPosition($anchor, $element, $parent) {
247
+ if ($anchor.attr('aria-expanded') === 'false') {
248
+ return false;
249
+ }
250
+ var $eleDims = __WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].GetDimensions($element),
251
+ $anchorDims = __WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].GetDimensions($anchor);
252
+
253
+ $element.offset(__WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));
254
+
255
+ if (!this.options.allowOverlap) {
256
+ var overlaps = {};
257
+ var minOverlap = 100000000;
258
+ // default coordinates to how we start, in case we can't figure out better
259
+ var minCoordinates = { position: this.position, alignment: this.alignment };
260
+ while (!this._positionsExhausted()) {
261
+ var overlap = __WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].OverlapArea($element, $parent, false, false, this.options.allowBottomOverlap);
262
+ if (overlap === 0) {
263
+ return;
264
+ }
265
+
266
+ if (overlap < minOverlap) {
267
+ minOverlap = overlap;
268
+ minCoordinates = { position: this.position, alignment: this.alignment };
269
+ }
270
+
271
+ this._reposition();
272
+
273
+ $element.offset(__WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));
274
+ }
275
+ // If we get through the entire loop, there was no non-overlapping
276
+ // position available. Pick the version with least overlap.
277
+ this.position = minCoordinates.position;
278
+ this.alignment = minCoordinates.alignment;
279
+ $element.offset(__WEBPACK_IMPORTED_MODULE_0__foundation_util_box__["Box"].GetExplicitOffsets($element, $anchor, this.position, this.alignment, this._getVOffset(), this._getHOffset()));
280
+ }
281
+ }
282
+ }]);
283
+
284
+ return Positionable;
285
+ }(__WEBPACK_IMPORTED_MODULE_1__foundation_plugin__["Plugin"]);
286
+
287
+ Positionable.defaults = {
288
+ /**
289
+ * Position of positionable relative to anchor. Can be left, right, bottom, top, or auto.
290
+ * @option
291
+ * @type {string}
292
+ * @default 'auto'
293
+ */
294
+ position: 'auto',
295
+ /**
296
+ * Alignment of positionable relative to anchor. Can be left, right, bottom, top, center, or auto.
297
+ * @option
298
+ * @type {string}
299
+ * @default 'auto'
300
+ */
301
+ alignment: 'auto',
302
+ /**
303
+ * Allow overlap of container/window. If false, dropdown positionable first
304
+ * try to position as defined by data-position and data-alignment, but
305
+ * reposition if it would cause an overflow.
306
+ * @option
307
+ * @type {boolean}
308
+ * @default false
309
+ */
310
+ allowOverlap: false,
311
+ /**
312
+ * Allow overlap of only the bottom of the container. This is the most common
313
+ * behavior for dropdowns, allowing the dropdown to extend the bottom of the
314
+ * screen but not otherwise influence or break out of the container.
315
+ * @option
316
+ * @type {boolean}
317
+ * @default true
318
+ */
319
+ allowBottomOverlap: true,
320
+ /**
321
+ * Number of pixels the positionable should be separated vertically from anchor
322
+ * @option
323
+ * @type {number}
324
+ * @default 0
325
+ */
326
+ vOffset: 0,
327
+ /**
328
+ * Number of pixels the positionable should be separated horizontally from anchor
329
+ * @option
330
+ * @type {number}
331
+ * @default 0
332
+ */
333
+ hOffset: 0
334
+ };
335
+
336
+
337
+
338
+ /***/ }),
339
+
340
+ /***/ 17:
341
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
342
+
343
+ "use strict";
344
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
345
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
346
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
347
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_dropdown__ = __webpack_require__(47);
348
+
349
+
350
+
351
+ __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_dropdown__["a" /* Dropdown */], 'Dropdown');
352
+
353
+ /***/ }),
354
+
355
+ /***/ 2:
356
+ /***/ (function(module, exports) {
357
+
358
+ module.exports = {Plugin: window.Foundation.Plugin};
359
+
360
+ /***/ }),
361
+
362
+ /***/ 3:
363
+ /***/ (function(module, exports) {
364
+
365
+ module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend};
366
+
367
+ /***/ }),
368
+
369
+ /***/ 4:
370
+ /***/ (function(module, exports) {
371
+
372
+ module.exports = {Motion: window.Foundation.Motion, Move: window.Foundation.Move};
373
+
374
+ /***/ }),
375
+
376
+ /***/ 47:
377
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
378
+
379
+ "use strict";
380
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Dropdown; });
381
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
382
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
383
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(5);
384
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__);
385
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core__ = __webpack_require__(3);
386
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__);
387
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_positionable__ = __webpack_require__(11);
388
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_util_triggers__ = __webpack_require__(7);
389
+
390
+
391
+ 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; }; }();
392
+
393
+ var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
394
+
395
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
396
+
397
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
398
+
399
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+
408
+ /**
409
+ * Dropdown module.
410
+ * @module foundation.dropdown
411
+ * @requires foundation.util.keyboard
412
+ * @requires foundation.util.box
413
+ * @requires foundation.util.triggers
414
+ */
415
+
416
+ var Dropdown = function (_Positionable) {
417
+ _inherits(Dropdown, _Positionable);
418
+
419
+ function Dropdown() {
420
+ _classCallCheck(this, Dropdown);
421
+
422
+ return _possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).apply(this, arguments));
423
+ }
424
+
425
+ _createClass(Dropdown, [{
426
+ key: '_setup',
427
+
428
+ /**
429
+ * Creates a new instance of a dropdown.
430
+ * @class
431
+ * @name Dropdown
432
+ * @param {jQuery} element - jQuery object to make into a dropdown.
433
+ * Object should be of the dropdown panel, rather than its anchor.
434
+ * @param {Object} options - Overrides to the default plugin settings.
435
+ */
436
+ value: function _setup(element, options) {
437
+ this.$element = element;
438
+ this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Dropdown.defaults, this.$element.data(), options);
439
+ this.className = 'Dropdown'; // ie9 back compat
440
+
441
+ // Triggers init is idempotent, just need to make sure it is initialized
442
+ __WEBPACK_IMPORTED_MODULE_4__foundation_util_triggers__["a" /* Triggers */].init(__WEBPACK_IMPORTED_MODULE_0_jquery___default.a);
443
+
444
+ this._init();
445
+
446
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].register('Dropdown', {
447
+ 'ENTER': 'open',
448
+ 'SPACE': 'open',
449
+ 'ESCAPE': 'close'
450
+ });
451
+ }
452
+
453
+ /**
454
+ * Initializes the plugin by setting/checking options and attributes, adding helper variables, and saving the anchor.
455
+ * @function
456
+ * @private
457
+ */
458
+
459
+ }, {
460
+ key: '_init',
461
+ value: function _init() {
462
+ var $id = this.$element.attr('id');
463
+
464
+ this.$anchor = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-toggle="' + $id + '"]').length ? __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-toggle="' + $id + '"]') : __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-open="' + $id + '"]');
465
+ this.$anchor.attr({
466
+ 'aria-controls': $id,
467
+ 'data-is-focus': false,
468
+ 'data-yeti-box': $id,
469
+ 'aria-haspopup': true,
470
+ 'aria-expanded': false
471
+
472
+ });
473
+
474
+ if (this.options.parentClass) {
475
+ this.$parent = this.$element.parents('.' + this.options.parentClass);
476
+ } else {
477
+ this.$parent = null;
478
+ }
479
+
480
+ this.$element.attr({
481
+ 'aria-hidden': 'true',
482
+ 'data-yeti-box': $id,
483
+ 'data-resize': $id,
484
+ 'aria-labelledby': this.$anchor[0].id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_core__["GetYoDigits"])(6, 'dd-anchor')
485
+ });
486
+ _get(Dropdown.prototype.__proto__ || Object.getPrototypeOf(Dropdown.prototype), '_init', this).call(this);
487
+ this._events();
488
+ }
489
+ }, {
490
+ key: '_getDefaultPosition',
491
+ value: function _getDefaultPosition() {
492
+ // handle legacy classnames
493
+ var position = this.$element[0].className.match(/(top|left|right|bottom)/g);
494
+ if (position) {
495
+ return position[0];
496
+ } else {
497
+ return 'bottom';
498
+ }
499
+ }
500
+ }, {
501
+ key: '_getDefaultAlignment',
502
+ value: function _getDefaultAlignment() {
503
+ // handle legacy float approach
504
+ var horizontalPosition = /float-(\S+)/.exec(this.$anchor[0].className);
505
+ if (horizontalPosition) {
506
+ return horizontalPosition[1];
507
+ }
508
+
509
+ return _get(Dropdown.prototype.__proto__ || Object.getPrototypeOf(Dropdown.prototype), '_getDefaultAlignment', this).call(this);
510
+ }
511
+
512
+ /**
513
+ * Sets the position and orientation of the dropdown pane, checks for collisions if allow-overlap is not true.
514
+ * Recursively calls itself if a collision is detected, with a new position class.
515
+ * @function
516
+ * @private
517
+ */
518
+
519
+ }, {
520
+ key: '_setPosition',
521
+ value: function _setPosition() {
522
+ _get(Dropdown.prototype.__proto__ || Object.getPrototypeOf(Dropdown.prototype), '_setPosition', this).call(this, this.$anchor, this.$element, this.$parent);
523
+ }
524
+
525
+ /**
526
+ * Adds event listeners to the element utilizing the triggers utility library.
527
+ * @function
528
+ * @private
529
+ */
530
+
531
+ }, {
532
+ key: '_events',
533
+ value: function _events() {
534
+ var _this = this;
535
+ this.$element.on({
536
+ 'open.zf.trigger': this.open.bind(this),
537
+ 'close.zf.trigger': this.close.bind(this),
538
+ 'toggle.zf.trigger': this.toggle.bind(this),
539
+ 'resizeme.zf.trigger': this._setPosition.bind(this)
540
+ });
541
+
542
+ if (this.options.hover) {
543
+ this.$anchor.off('mouseenter.zf.dropdown mouseleave.zf.dropdown').on('mouseenter.zf.dropdown', function () {
544
+ var bodyData = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('body').data();
545
+ if (typeof bodyData.whatinput === 'undefined' || bodyData.whatinput === 'mouse') {
546
+ clearTimeout(_this.timeout);
547
+ _this.timeout = setTimeout(function () {
548
+ _this.open();
549
+ _this.$anchor.data('hover', true);
550
+ }, _this.options.hoverDelay);
551
+ }
552
+ }).on('mouseleave.zf.dropdown', function () {
553
+ clearTimeout(_this.timeout);
554
+ _this.timeout = setTimeout(function () {
555
+ _this.close();
556
+ _this.$anchor.data('hover', false);
557
+ }, _this.options.hoverDelay);
558
+ });
559
+ if (this.options.hoverPane) {
560
+ this.$element.off('mouseenter.zf.dropdown mouseleave.zf.dropdown').on('mouseenter.zf.dropdown', function () {
561
+ clearTimeout(_this.timeout);
562
+ }).on('mouseleave.zf.dropdown', function () {
563
+ clearTimeout(_this.timeout);
564
+ _this.timeout = setTimeout(function () {
565
+ _this.close();
566
+ _this.$anchor.data('hover', false);
567
+ }, _this.options.hoverDelay);
568
+ });
569
+ }
570
+ }
571
+ this.$anchor.add(this.$element).on('keydown.zf.dropdown', function (e) {
572
+
573
+ var $target = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
574
+ visibleFocusableElements = __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].findFocusable(_this.$element);
575
+
576
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].handleKey(e, 'Dropdown', {
577
+ open: function () {
578
+ if ($target.is(_this.$anchor)) {
579
+ _this.open();
580
+ _this.$element.attr('tabindex', -1).focus();
581
+ e.preventDefault();
582
+ }
583
+ },
584
+ close: function () {
585
+ _this.close();
586
+ _this.$anchor.focus();
587
+ }
588
+ });
589
+ });
590
+ }
591
+
592
+ /**
593
+ * Adds an event handler to the body to close any dropdowns on a click.
594
+ * @function
595
+ * @private
596
+ */
597
+
598
+ }, {
599
+ key: '_addBodyHandler',
600
+ value: function _addBodyHandler() {
601
+ var $body = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document.body).not(this.$element),
602
+ _this = this;
603
+ $body.off('click.zf.dropdown').on('click.zf.dropdown', function (e) {
604
+ if (_this.$anchor.is(e.target) || _this.$anchor.find(e.target).length) {
605
+ return;
606
+ }
607
+ if (_this.$element.find(e.target).length) {
608
+ return;
609
+ }
610
+ _this.close();
611
+ $body.off('click.zf.dropdown');
612
+ });
613
+ }
614
+
615
+ /**
616
+ * Opens the dropdown pane, and fires a bubbling event to close other dropdowns.
617
+ * @function
618
+ * @fires Dropdown#closeme
619
+ * @fires Dropdown#show
620
+ */
621
+
622
+ }, {
623
+ key: 'open',
624
+ value: function open() {
625
+ // var _this = this;
626
+ /**
627
+ * Fires to close other open dropdowns, typically when dropdown is opening
628
+ * @event Dropdown#closeme
629
+ */
630
+ this.$element.trigger('closeme.zf.dropdown', this.$element.attr('id'));
631
+ this.$anchor.addClass('hover').attr({ 'aria-expanded': true });
632
+ // this.$element/*.show()*/;
633
+
634
+ this.$element.addClass('is-opening');
635
+ this._setPosition();
636
+ this.$element.removeClass('is-opening').addClass('is-open').attr({ 'aria-hidden': false });
637
+
638
+ if (this.options.autoFocus) {
639
+ var $focusable = __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].findFocusable(this.$element);
640
+ if ($focusable.length) {
641
+ $focusable.eq(0).focus();
642
+ }
643
+ }
644
+
645
+ if (this.options.closeOnClick) {
646
+ this._addBodyHandler();
647
+ }
648
+
649
+ if (this.options.trapFocus) {
650
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].trapFocus(this.$element);
651
+ }
652
+
653
+ /**
654
+ * Fires once the dropdown is visible.
655
+ * @event Dropdown#show
656
+ */
657
+ this.$element.trigger('show.zf.dropdown', [this.$element]);
658
+ }
659
+
660
+ /**
661
+ * Closes the open dropdown pane.
662
+ * @function
663
+ * @fires Dropdown#hide
664
+ */
665
+
666
+ }, {
667
+ key: 'close',
668
+ value: function close() {
669
+ if (!this.$element.hasClass('is-open')) {
670
+ return false;
671
+ }
672
+ this.$element.removeClass('is-open').attr({ 'aria-hidden': true });
673
+
674
+ this.$anchor.removeClass('hover').attr('aria-expanded', false);
675
+
676
+ /**
677
+ * Fires once the dropdown is no longer visible.
678
+ * @event Dropdown#hide
679
+ */
680
+ this.$element.trigger('hide.zf.dropdown', [this.$element]);
681
+
682
+ if (this.options.trapFocus) {
683
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].releaseFocus(this.$element);
684
+ }
685
+ }
686
+
687
+ /**
688
+ * Toggles the dropdown pane's visibility.
689
+ * @function
690
+ */
691
+
692
+ }, {
693
+ key: 'toggle',
694
+ value: function toggle() {
695
+ if (this.$element.hasClass('is-open')) {
696
+ if (this.$anchor.data('hover')) return;
697
+ this.close();
698
+ } else {
699
+ this.open();
700
+ }
701
+ }
702
+
703
+ /**
704
+ * Destroys the dropdown.
705
+ * @function
706
+ */
707
+
708
+ }, {
709
+ key: '_destroy',
710
+ value: function _destroy() {
711
+ this.$element.off('.zf.trigger').hide();
712
+ this.$anchor.off('.zf.dropdown');
713
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document.body).off('click.zf.dropdown');
714
+ }
715
+ }]);
716
+
717
+ return Dropdown;
718
+ }(__WEBPACK_IMPORTED_MODULE_3__foundation_positionable__["a" /* Positionable */]);
719
+
720
+ Dropdown.defaults = {
721
+ /**
722
+ * Class that designates bounding container of Dropdown (default: window)
723
+ * @option
724
+ * @type {?string}
725
+ * @default null
726
+ */
727
+ parentClass: null,
728
+ /**
729
+ * Amount of time to delay opening a submenu on hover event.
730
+ * @option
731
+ * @type {number}
732
+ * @default 250
733
+ */
734
+ hoverDelay: 250,
735
+ /**
736
+ * Allow submenus to open on hover events
737
+ * @option
738
+ * @type {boolean}
739
+ * @default false
740
+ */
741
+ hover: false,
742
+ /**
743
+ * Don't close dropdown when hovering over dropdown pane
744
+ * @option
745
+ * @type {boolean}
746
+ * @default false
747
+ */
748
+ hoverPane: false,
749
+ /**
750
+ * Number of pixels between the dropdown pane and the triggering element on open.
751
+ * @option
752
+ * @type {number}
753
+ * @default 0
754
+ */
755
+ vOffset: 0,
756
+ /**
757
+ * Number of pixels between the dropdown pane and the triggering element on open.
758
+ * @option
759
+ * @type {number}
760
+ * @default 0
761
+ */
762
+ hOffset: 0,
763
+ /**
764
+ * DEPRECATED: Class applied to adjust open position.
765
+ * @option
766
+ * @type {string}
767
+ * @default ''
768
+ */
769
+ positionClass: '',
770
+
771
+ /**
772
+ * Position of dropdown. Can be left, right, bottom, top, or auto.
773
+ * @option
774
+ * @type {string}
775
+ * @default 'auto'
776
+ */
777
+ position: 'auto',
778
+ /**
779
+ * Alignment of dropdown relative to anchor. Can be left, right, bottom, top, center, or auto.
780
+ * @option
781
+ * @type {string}
782
+ * @default 'auto'
783
+ */
784
+ alignment: 'auto',
785
+ /**
786
+ * Allow overlap of container/window. If false, dropdown will first try to position as defined by data-position and data-alignment, but reposition if it would cause an overflow.
787
+ * @option
788
+ * @type {boolean}
789
+ * @default false
790
+ */
791
+ allowOverlap: false,
792
+ /**
793
+ * Allow overlap of only the bottom of the container. This is the most common
794
+ * behavior for dropdowns, allowing the dropdown to extend the bottom of the
795
+ * screen but not otherwise influence or break out of the container.
796
+ * @option
797
+ * @type {boolean}
798
+ * @default true
799
+ */
800
+ allowBottomOverlap: true,
801
+ /**
802
+ * Allow the plugin to trap focus to the dropdown pane if opened with keyboard commands.
803
+ * @option
804
+ * @type {boolean}
805
+ * @default false
806
+ */
807
+ trapFocus: false,
808
+ /**
809
+ * Allow the plugin to set focus to the first focusable element within the pane, regardless of method of opening.
810
+ * @option
811
+ * @type {boolean}
812
+ * @default false
813
+ */
814
+ autoFocus: false,
815
+ /**
816
+ * Allows a click on the body to close the dropdown.
817
+ * @option
818
+ * @type {boolean}
819
+ * @default false
820
+ */
821
+ closeOnClick: false
822
+ };
823
+
824
+
825
+
826
+ /***/ }),
827
+
828
+ /***/ 5:
829
+ /***/ (function(module, exports) {
830
+
831
+ module.exports = {Keyboard: window.Foundation.Keyboard};
832
+
833
+ /***/ }),
834
+
835
+ /***/ 7:
836
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
837
+
838
+ "use strict";
839
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Triggers; });
840
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
841
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
842
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__ = __webpack_require__(4);
843
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__);
844
+
845
+
846
+
847
+
848
+
849
+ var MutationObserver = function () {
850
+ var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];
851
+ for (var i = 0; i < prefixes.length; i++) {
852
+ if (prefixes[i] + 'MutationObserver' in window) {
853
+ return window[prefixes[i] + 'MutationObserver'];
854
+ }
855
+ }
856
+ return false;
857
+ }();
858
+
859
+ var triggers = function (el, type) {
860
+ el.data(type).split(' ').forEach(function (id) {
861
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id)[type === 'close' ? 'trigger' : 'triggerHandler'](type + '.zf.trigger', [el]);
862
+ });
863
+ };
864
+
865
+ var Triggers = {
866
+ Listeners: {
867
+ Basic: {},
868
+ Global: {}
869
+ },
870
+ Initializers: {}
871
+ };
872
+
873
+ Triggers.Listeners.Basic = {
874
+ openListener: function () {
875
+ triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'open');
876
+ },
877
+ closeListener: function () {
878
+ var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('close');
879
+ if (id) {
880
+ triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'close');
881
+ } else {
882
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('close.zf.trigger');
883
+ }
884
+ },
885
+ toggleListener: function () {
886
+ var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle');
887
+ if (id) {
888
+ triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'toggle');
889
+ } else {
890
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('toggle.zf.trigger');
891
+ }
892
+ },
893
+ closeableListener: function (e) {
894
+ e.stopPropagation();
895
+ var animation = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('closable');
896
+
897
+ if (animation !== '') {
898
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__["Motion"].animateOut(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), animation, function () {
899
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('closed.zf');
900
+ });
901
+ } else {
902
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).fadeOut().trigger('closed.zf');
903
+ }
904
+ },
905
+ toggleFocusListener: function () {
906
+ var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle-focus');
907
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id).triggerHandler('toggle.zf.trigger', [__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this)]);
908
+ }
909
+ };
910
+
911
+ // Elements with [data-open] will reveal a plugin that supports it when clicked.
912
+ Triggers.Initializers.addOpenListener = function ($elem) {
913
+ $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);
914
+ $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);
915
+ };
916
+
917
+ // Elements with [data-close] will close a plugin that supports it when clicked.
918
+ // If used without a value on [data-close], the event will bubble, allowing it to close a parent component.
919
+ Triggers.Initializers.addCloseListener = function ($elem) {
920
+ $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);
921
+ $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);
922
+ };
923
+
924
+ // Elements with [data-toggle] will toggle a plugin that supports it when clicked.
925
+ Triggers.Initializers.addToggleListener = function ($elem) {
926
+ $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);
927
+ $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);
928
+ };
929
+
930
+ // Elements with [data-closable] will respond to close.zf.trigger events.
931
+ Triggers.Initializers.addCloseableListener = function ($elem) {
932
+ $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);
933
+ $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);
934
+ };
935
+
936
+ // Elements with [data-toggle-focus] will respond to coming in and out of focus
937
+ Triggers.Initializers.addToggleFocusListener = function ($elem) {
938
+ $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);
939
+ $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);
940
+ };
941
+
942
+ // More Global/complex listeners and triggers
943
+ Triggers.Listeners.Global = {
944
+ resizeListener: function ($nodes) {
945
+ if (!MutationObserver) {
946
+ //fallback for IE 9
947
+ $nodes.each(function () {
948
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('resizeme.zf.trigger');
949
+ });
950
+ }
951
+ //trigger all listening elements and signal a resize event
952
+ $nodes.attr('data-events', "resize");
953
+ },
954
+ scrollListener: function ($nodes) {
955
+ if (!MutationObserver) {
956
+ //fallback for IE 9
957
+ $nodes.each(function () {
958
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('scrollme.zf.trigger');
959
+ });
960
+ }
961
+ //trigger all listening elements and signal a scroll event
962
+ $nodes.attr('data-events', "scroll");
963
+ },
964
+ closeMeListener: function (e, pluginId) {
965
+ var plugin = e.namespace.split('.')[0];
966
+ var plugins = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-' + plugin + ']').not('[data-yeti-box="' + pluginId + '"]');
967
+
968
+ plugins.each(function () {
969
+ var _this = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this);
970
+ _this.triggerHandler('close.zf.trigger', [_this]);
971
+ });
972
+ }
973
+ };
974
+
975
+ // Global, parses whole document.
976
+ Triggers.Initializers.addClosemeListener = function (pluginName) {
977
+ var yetiBoxes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-yeti-box]'),
978
+ plugNames = ['dropdown', 'tooltip', 'reveal'];
979
+
980
+ if (pluginName) {
981
+ if (typeof pluginName === 'string') {
982
+ plugNames.push(pluginName);
983
+ } else if (typeof pluginName === 'object' && typeof pluginName[0] === 'string') {
984
+ plugNames.concat(pluginName);
985
+ } else {
986
+ console.error('Plugin names must be strings');
987
+ }
988
+ }
989
+ if (yetiBoxes.length) {
990
+ var listeners = plugNames.map(function (name) {
991
+ return 'closeme.zf.' + name;
992
+ }).join(' ');
993
+
994
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);
995
+ }
996
+ };
997
+
998
+ function debounceGlobalListener(debounce, trigger, listener) {
999
+ var timer = void 0,
1000
+ args = Array.prototype.slice.call(arguments, 3);
1001
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(trigger).on(trigger, function (e) {
1002
+ if (timer) {
1003
+ clearTimeout(timer);
1004
+ }
1005
+ timer = setTimeout(function () {
1006
+ listener.apply(null, args);
1007
+ }, debounce || 10); //default time to emit scroll event
1008
+ });
1009
+ }
1010
+
1011
+ Triggers.Initializers.addResizeListener = function (debounce) {
1012
+ var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-resize]');
1013
+ if ($nodes.length) {
1014
+ debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);
1015
+ }
1016
+ };
1017
+
1018
+ Triggers.Initializers.addScrollListener = function (debounce) {
1019
+ var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-scroll]');
1020
+ if ($nodes.length) {
1021
+ debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);
1022
+ }
1023
+ };
1024
+
1025
+ Triggers.Initializers.addMutationEventsListener = function ($elem) {
1026
+ if (!MutationObserver) {
1027
+ return false;
1028
+ }
1029
+ var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');
1030
+
1031
+ //element callback
1032
+ var listeningElementsMutation = function (mutationRecordsList) {
1033
+ var $target = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(mutationRecordsList[0].target);
1034
+
1035
+ //trigger the event handler for the element depending on type
1036
+ switch (mutationRecordsList[0].type) {
1037
+ case "attributes":
1038
+ if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") {
1039
+ $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);
1040
+ }
1041
+ if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") {
1042
+ $target.triggerHandler('resizeme.zf.trigger', [$target]);
1043
+ }
1044
+ if (mutationRecordsList[0].attributeName === "style") {
1045
+ $target.closest("[data-mutate]").attr("data-events", "mutate");
1046
+ $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
1047
+ }
1048
+ break;
1049
+
1050
+ case "childList":
1051
+ $target.closest("[data-mutate]").attr("data-events", "mutate");
1052
+ $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
1053
+ break;
1054
+
1055
+ default:
1056
+ return false;
1057
+ //nothing
1058
+ }
1059
+ };
1060
+
1061
+ if ($nodes.length) {
1062
+ //for each element that needs to listen for resizing, scrolling, or mutation add a single observer
1063
+ for (var i = 0; i <= $nodes.length - 1; i++) {
1064
+ var elementObserver = new MutationObserver(listeningElementsMutation);
1065
+ elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: ["data-events", "style"] });
1066
+ }
1067
+ }
1068
+ };
1069
+
1070
+ Triggers.Initializers.addSimpleListeners = function () {
1071
+ var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document);
1072
+
1073
+ Triggers.Initializers.addOpenListener($document);
1074
+ Triggers.Initializers.addCloseListener($document);
1075
+ Triggers.Initializers.addToggleListener($document);
1076
+ Triggers.Initializers.addCloseableListener($document);
1077
+ Triggers.Initializers.addToggleFocusListener($document);
1078
+ };
1079
+
1080
+ Triggers.Initializers.addGlobalListeners = function () {
1081
+ var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document);
1082
+ Triggers.Initializers.addMutationEventsListener($document);
1083
+ Triggers.Initializers.addResizeListener();
1084
+ Triggers.Initializers.addScrollListener();
1085
+ Triggers.Initializers.addClosemeListener();
1086
+ };
1087
+
1088
+ Triggers.init = function ($, Foundation) {
1089
+ if (typeof $.triggersInitialized === 'undefined') {
1090
+ var $document = $(document);
1091
+
1092
+ if (document.readyState === "complete") {
1093
+ Triggers.Initializers.addSimpleListeners();
1094
+ Triggers.Initializers.addGlobalListeners();
1095
+ } else {
1096
+ $(window).on('load', function () {
1097
+ Triggers.Initializers.addSimpleListeners();
1098
+ Triggers.Initializers.addGlobalListeners();
1099
+ });
1100
+ }
1101
+
1102
+ $.triggersInitialized = true;
1103
+ }
1104
+
1105
+ if (Foundation) {
1106
+ Foundation.Triggers = Triggers;
1107
+ // Legacy included to be backwards compatible for now.
1108
+ Foundation.IHearYou = Triggers.Initializers.addGlobalListeners;
1109
+ }
1110
+ };
1111
+
1112
+
1113
+
1114
+ /***/ }),
1115
+
1116
+ /***/ 8:
1117
+ /***/ (function(module, exports) {
1118
+
1119
+ module.exports = {Box: window.Foundation.Box};
1120
+
1121
+ /***/ }),
1122
+
1123
+ /***/ 83:
1124
+ /***/ (function(module, exports, __webpack_require__) {
1125
+
1126
+ module.exports = __webpack_require__(17);
1127
+
1128
+
1129
+ /***/ })
1130
+
1131
+ /******/ });