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,1195 @@
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 = 99);
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
+ /***/ 2:
341
+ /***/ (function(module, exports) {
342
+
343
+ module.exports = {Plugin: window.Foundation.Plugin};
344
+
345
+ /***/ }),
346
+
347
+ /***/ 3:
348
+ /***/ (function(module, exports) {
349
+
350
+ module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend};
351
+
352
+ /***/ }),
353
+
354
+ /***/ 33:
355
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
356
+
357
+ "use strict";
358
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
359
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
360
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
361
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_tooltip__ = __webpack_require__(63);
362
+
363
+
364
+
365
+ __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_tooltip__["a" /* Tooltip */], 'Tooltip');
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
+ /***/ 6:
377
+ /***/ (function(module, exports) {
378
+
379
+ module.exports = {MediaQuery: window.Foundation.MediaQuery};
380
+
381
+ /***/ }),
382
+
383
+ /***/ 63:
384
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
385
+
386
+ "use strict";
387
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Tooltip; });
388
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
389
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
390
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core__ = __webpack_require__(3);
391
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__);
392
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_mediaQuery__ = __webpack_require__(6);
393
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_mediaQuery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_mediaQuery__);
394
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_triggers__ = __webpack_require__(7);
395
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_positionable__ = __webpack_require__(11);
396
+
397
+
398
+ 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; }; }();
399
+
400
+ 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); } };
401
+
402
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
403
+
404
+ 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; }
405
+
406
+ 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; }
407
+
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+ /**
416
+ * Tooltip module.
417
+ * @module foundation.tooltip
418
+ * @requires foundation.util.box
419
+ * @requires foundation.util.mediaQuery
420
+ * @requires foundation.util.triggers
421
+ */
422
+
423
+ var Tooltip = function (_Positionable) {
424
+ _inherits(Tooltip, _Positionable);
425
+
426
+ function Tooltip() {
427
+ _classCallCheck(this, Tooltip);
428
+
429
+ return _possibleConstructorReturn(this, (Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).apply(this, arguments));
430
+ }
431
+
432
+ _createClass(Tooltip, [{
433
+ key: '_setup',
434
+
435
+ /**
436
+ * Creates a new instance of a Tooltip.
437
+ * @class
438
+ * @name Tooltip
439
+ * @fires Tooltip#init
440
+ * @param {jQuery} element - jQuery object to attach a tooltip to.
441
+ * @param {Object} options - object to extend the default configuration.
442
+ */
443
+ value: function _setup(element, options) {
444
+ this.$element = element;
445
+ this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Tooltip.defaults, this.$element.data(), options);
446
+ this.className = 'Tooltip'; // ie9 back compat
447
+
448
+ this.isActive = false;
449
+ this.isClick = false;
450
+
451
+ // Triggers init is idempotent, just need to make sure it is initialized
452
+ __WEBPACK_IMPORTED_MODULE_3__foundation_util_triggers__["a" /* Triggers */].init(__WEBPACK_IMPORTED_MODULE_0_jquery___default.a);
453
+
454
+ this._init();
455
+ }
456
+
457
+ /**
458
+ * Initializes the tooltip by setting the creating the tip element, adding it's text, setting private variables and setting attributes on the anchor.
459
+ * @private
460
+ */
461
+
462
+ }, {
463
+ key: '_init',
464
+ value: function _init() {
465
+ __WEBPACK_IMPORTED_MODULE_2__foundation_util_mediaQuery__["MediaQuery"]._init();
466
+ var elemId = this.$element.attr('aria-describedby') || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__foundation_util_core__["GetYoDigits"])(6, 'tooltip');
467
+
468
+ this.options.tipText = this.options.tipText || this.$element.attr('title');
469
+ this.template = this.options.template ? __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this.options.template) : this._buildTemplate(elemId);
470
+
471
+ if (this.options.allowHtml) {
472
+ this.template.appendTo(document.body).html(this.options.tipText).hide();
473
+ } else {
474
+ this.template.appendTo(document.body).text(this.options.tipText).hide();
475
+ }
476
+
477
+ this.$element.attr({
478
+ 'title': '',
479
+ 'aria-describedby': elemId,
480
+ 'data-yeti-box': elemId,
481
+ 'data-toggle': elemId,
482
+ 'data-resize': elemId
483
+ }).addClass(this.options.triggerClass);
484
+
485
+ _get(Tooltip.prototype.__proto__ || Object.getPrototypeOf(Tooltip.prototype), '_init', this).call(this);
486
+ this._events();
487
+ }
488
+ }, {
489
+ key: '_getDefaultPosition',
490
+ value: function _getDefaultPosition() {
491
+ // handle legacy classnames
492
+ var position = this.$element[0].className.match(/\b(top|left|right|bottom)\b/g);
493
+ return position ? position[0] : 'top';
494
+ }
495
+ }, {
496
+ key: '_getDefaultAlignment',
497
+ value: function _getDefaultAlignment() {
498
+ return 'center';
499
+ }
500
+ }, {
501
+ key: '_getHOffset',
502
+ value: function _getHOffset() {
503
+ if (this.position === 'left' || this.position === 'right') {
504
+ return this.options.hOffset + this.options.tooltipWidth;
505
+ } else {
506
+ return this.options.hOffset;
507
+ }
508
+ }
509
+ }, {
510
+ key: '_getVOffset',
511
+ value: function _getVOffset() {
512
+ if (this.position === 'top' || this.position === 'bottom') {
513
+ return this.options.vOffset + this.options.tooltipHeight;
514
+ } else {
515
+ return this.options.vOffset;
516
+ }
517
+ }
518
+
519
+ /**
520
+ * builds the tooltip element, adds attributes, and returns the template.
521
+ * @private
522
+ */
523
+
524
+ }, {
525
+ key: '_buildTemplate',
526
+ value: function _buildTemplate(id) {
527
+ var templateClasses = (this.options.tooltipClass + ' ' + this.options.positionClass + ' ' + this.options.templateClasses).trim();
528
+ var $template = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('<div></div>').addClass(templateClasses).attr({
529
+ 'role': 'tooltip',
530
+ 'aria-hidden': true,
531
+ 'data-is-active': false,
532
+ 'data-is-focus': false,
533
+ 'id': id
534
+ });
535
+ return $template;
536
+ }
537
+
538
+ /**
539
+ * sets the position class of an element and recursively calls itself until there are no more possible positions to attempt, or the tooltip element is no longer colliding.
540
+ * if the tooltip is larger than the screen width, default to full width - any user selected margin
541
+ * @private
542
+ */
543
+
544
+ }, {
545
+ key: '_setPosition',
546
+ value: function _setPosition() {
547
+ _get(Tooltip.prototype.__proto__ || Object.getPrototypeOf(Tooltip.prototype), '_setPosition', this).call(this, this.$element, this.template);
548
+ }
549
+
550
+ /**
551
+ * reveals the tooltip, and fires an event to close any other open tooltips on the page
552
+ * @fires Tooltip#closeme
553
+ * @fires Tooltip#show
554
+ * @function
555
+ */
556
+
557
+ }, {
558
+ key: 'show',
559
+ value: function show() {
560
+ if (this.options.showOn !== 'all' && !__WEBPACK_IMPORTED_MODULE_2__foundation_util_mediaQuery__["MediaQuery"].is(this.options.showOn)) {
561
+ // console.error('The screen is too small to display this tooltip');
562
+ return false;
563
+ }
564
+
565
+ var _this = this;
566
+ this.template.css('visibility', 'hidden').show();
567
+ this._setPosition();
568
+ this.template.removeClass('top bottom left right').addClass(this.position);
569
+ this.template.removeClass('align-top align-bottom align-left align-right align-center').addClass('align-' + this.alignment);
570
+
571
+ /**
572
+ * Fires to close all other open tooltips on the page
573
+ * @event Closeme#tooltip
574
+ */
575
+ this.$element.trigger('closeme.zf.tooltip', this.template.attr('id'));
576
+
577
+ this.template.attr({
578
+ 'data-is-active': true,
579
+ 'aria-hidden': false
580
+ });
581
+ _this.isActive = true;
582
+ // console.log(this.template);
583
+ this.template.stop().hide().css('visibility', '').fadeIn(this.options.fadeInDuration, function () {
584
+ //maybe do stuff?
585
+ });
586
+ /**
587
+ * Fires when the tooltip is shown
588
+ * @event Tooltip#show
589
+ */
590
+ this.$element.trigger('show.zf.tooltip');
591
+ }
592
+
593
+ /**
594
+ * Hides the current tooltip, and resets the positioning class if it was changed due to collision
595
+ * @fires Tooltip#hide
596
+ * @function
597
+ */
598
+
599
+ }, {
600
+ key: 'hide',
601
+ value: function hide() {
602
+ // console.log('hiding', this.$element.data('yeti-box'));
603
+ var _this = this;
604
+ this.template.stop().attr({
605
+ 'aria-hidden': true,
606
+ 'data-is-active': false
607
+ }).fadeOut(this.options.fadeOutDuration, function () {
608
+ _this.isActive = false;
609
+ _this.isClick = false;
610
+ });
611
+ /**
612
+ * fires when the tooltip is hidden
613
+ * @event Tooltip#hide
614
+ */
615
+ this.$element.trigger('hide.zf.tooltip');
616
+ }
617
+
618
+ /**
619
+ * adds event listeners for the tooltip and its anchor
620
+ * TODO combine some of the listeners like focus and mouseenter, etc.
621
+ * @private
622
+ */
623
+
624
+ }, {
625
+ key: '_events',
626
+ value: function _events() {
627
+ var _this = this;
628
+ var $template = this.template;
629
+ var isFocus = false;
630
+
631
+ if (!this.options.disableHover) {
632
+
633
+ this.$element.on('mouseenter.zf.tooltip', function (e) {
634
+ if (!_this.isActive) {
635
+ _this.timeout = setTimeout(function () {
636
+ _this.show();
637
+ }, _this.options.hoverDelay);
638
+ }
639
+ }).on('mouseleave.zf.tooltip', function (e) {
640
+ clearTimeout(_this.timeout);
641
+ if (!isFocus || _this.isClick && !_this.options.clickOpen) {
642
+ _this.hide();
643
+ }
644
+ });
645
+ }
646
+
647
+ if (this.options.clickOpen) {
648
+ this.$element.on('mousedown.zf.tooltip', function (e) {
649
+ e.stopImmediatePropagation();
650
+ if (_this.isClick) {
651
+ //_this.hide();
652
+ // _this.isClick = false;
653
+ } else {
654
+ _this.isClick = true;
655
+ if ((_this.options.disableHover || !_this.$element.attr('tabindex')) && !_this.isActive) {
656
+ _this.show();
657
+ }
658
+ }
659
+ });
660
+ } else {
661
+ this.$element.on('mousedown.zf.tooltip', function (e) {
662
+ e.stopImmediatePropagation();
663
+ _this.isClick = true;
664
+ });
665
+ }
666
+
667
+ if (!this.options.disableForTouch) {
668
+ this.$element.on('tap.zf.tooltip touchend.zf.tooltip', function (e) {
669
+ _this.isActive ? _this.hide() : _this.show();
670
+ });
671
+ }
672
+
673
+ this.$element.on({
674
+ // 'toggle.zf.trigger': this.toggle.bind(this),
675
+ // 'close.zf.trigger': this.hide.bind(this)
676
+ 'close.zf.trigger': this.hide.bind(this)
677
+ });
678
+
679
+ this.$element.on('focus.zf.tooltip', function (e) {
680
+ isFocus = true;
681
+ if (_this.isClick) {
682
+ // If we're not showing open on clicks, we need to pretend a click-launched focus isn't
683
+ // a real focus, otherwise on hover and come back we get bad behavior
684
+ if (!_this.options.clickOpen) {
685
+ isFocus = false;
686
+ }
687
+ return false;
688
+ } else {
689
+ _this.show();
690
+ }
691
+ }).on('focusout.zf.tooltip', function (e) {
692
+ isFocus = false;
693
+ _this.isClick = false;
694
+ _this.hide();
695
+ }).on('resizeme.zf.trigger', function () {
696
+ if (_this.isActive) {
697
+ _this._setPosition();
698
+ }
699
+ });
700
+ }
701
+
702
+ /**
703
+ * adds a toggle method, in addition to the static show() & hide() functions
704
+ * @function
705
+ */
706
+
707
+ }, {
708
+ key: 'toggle',
709
+ value: function toggle() {
710
+ if (this.isActive) {
711
+ this.hide();
712
+ } else {
713
+ this.show();
714
+ }
715
+ }
716
+
717
+ /**
718
+ * Destroys an instance of tooltip, removes template element from the view.
719
+ * @function
720
+ */
721
+
722
+ }, {
723
+ key: '_destroy',
724
+ value: function _destroy() {
725
+ this.$element.attr('title', this.template.text()).off('.zf.trigger .zf.tooltip').removeClass('has-tip top right left').removeAttr('aria-describedby aria-haspopup data-disable-hover data-resize data-toggle data-tooltip data-yeti-box');
726
+
727
+ this.template.remove();
728
+ }
729
+ }]);
730
+
731
+ return Tooltip;
732
+ }(__WEBPACK_IMPORTED_MODULE_4__foundation_positionable__["a" /* Positionable */]);
733
+
734
+ Tooltip.defaults = {
735
+ disableForTouch: false,
736
+ /**
737
+ * Time, in ms, before a tooltip should open on hover.
738
+ * @option
739
+ * @type {number}
740
+ * @default 200
741
+ */
742
+ hoverDelay: 200,
743
+ /**
744
+ * Time, in ms, a tooltip should take to fade into view.
745
+ * @option
746
+ * @type {number}
747
+ * @default 150
748
+ */
749
+ fadeInDuration: 150,
750
+ /**
751
+ * Time, in ms, a tooltip should take to fade out of view.
752
+ * @option
753
+ * @type {number}
754
+ * @default 150
755
+ */
756
+ fadeOutDuration: 150,
757
+ /**
758
+ * Disables hover events from opening the tooltip if set to true
759
+ * @option
760
+ * @type {boolean}
761
+ * @default false
762
+ */
763
+ disableHover: false,
764
+ /**
765
+ * Optional addtional classes to apply to the tooltip template on init.
766
+ * @option
767
+ * @type {string}
768
+ * @default ''
769
+ */
770
+ templateClasses: '',
771
+ /**
772
+ * Non-optional class added to tooltip templates. Foundation default is 'tooltip'.
773
+ * @option
774
+ * @type {string}
775
+ * @default 'tooltip'
776
+ */
777
+ tooltipClass: 'tooltip',
778
+ /**
779
+ * Class applied to the tooltip anchor element.
780
+ * @option
781
+ * @type {string}
782
+ * @default 'has-tip'
783
+ */
784
+ triggerClass: 'has-tip',
785
+ /**
786
+ * Minimum breakpoint size at which to open the tooltip.
787
+ * @option
788
+ * @type {string}
789
+ * @default 'small'
790
+ */
791
+ showOn: 'small',
792
+ /**
793
+ * Custom template to be used to generate markup for tooltip.
794
+ * @option
795
+ * @type {string}
796
+ * @default ''
797
+ */
798
+ template: '',
799
+ /**
800
+ * Text displayed in the tooltip template on open.
801
+ * @option
802
+ * @type {string}
803
+ * @default ''
804
+ */
805
+ tipText: '',
806
+ touchCloseText: 'Tap to close.',
807
+ /**
808
+ * Allows the tooltip to remain open if triggered with a click or touch event.
809
+ * @option
810
+ * @type {boolean}
811
+ * @default true
812
+ */
813
+ clickOpen: true,
814
+ /**
815
+ * DEPRECATED Additional positioning classes, set by the JS
816
+ * @option
817
+ * @type {string}
818
+ * @default ''
819
+ */
820
+ positionClass: '',
821
+ /**
822
+ * Position of tooltip. Can be left, right, bottom, top, or auto.
823
+ * @option
824
+ * @type {string}
825
+ * @default 'auto'
826
+ */
827
+ position: 'auto',
828
+ /**
829
+ * Alignment of tooltip relative to anchor. Can be left, right, bottom, top, center, or auto.
830
+ * @option
831
+ * @type {string}
832
+ * @default 'auto'
833
+ */
834
+ alignment: 'auto',
835
+ /**
836
+ * Allow overlap of container/window. If false, tooltip will first try to
837
+ * position as defined by data-position and data-alignment, but reposition if
838
+ * it would cause an overflow. @option
839
+ * @type {boolean}
840
+ * @default false
841
+ */
842
+ allowOverlap: false,
843
+ /**
844
+ * Allow overlap of only the bottom of the container. This is the most common
845
+ * behavior for dropdowns, allowing the dropdown to extend the bottom of the
846
+ * screen but not otherwise influence or break out of the container.
847
+ * Less common for tooltips.
848
+ * @option
849
+ * @type {boolean}
850
+ * @default false
851
+ */
852
+ allowBottomOverlap: false,
853
+ /**
854
+ * Distance, in pixels, the template should push away from the anchor on the Y axis.
855
+ * @option
856
+ * @type {number}
857
+ * @default 0
858
+ */
859
+ vOffset: 0,
860
+ /**
861
+ * Distance, in pixels, the template should push away from the anchor on the X axis
862
+ * @option
863
+ * @type {number}
864
+ * @default 0
865
+ */
866
+ hOffset: 0,
867
+ /**
868
+ * Distance, in pixels, the template spacing auto-adjust for a vertical tooltip
869
+ * @option
870
+ * @type {number}
871
+ * @default 14
872
+ */
873
+ tooltipHeight: 14,
874
+ /**
875
+ * Distance, in pixels, the template spacing auto-adjust for a horizontal tooltip
876
+ * @option
877
+ * @type {number}
878
+ * @default 12
879
+ */
880
+ tooltipWidth: 12,
881
+ /**
882
+ * Allow HTML in tooltip. Warning: If you are loading user-generated content into tooltips,
883
+ * allowing HTML may open yourself up to XSS attacks.
884
+ * @option
885
+ * @type {boolean}
886
+ * @default false
887
+ */
888
+ allowHtml: false
889
+ };
890
+
891
+ /**
892
+ * TODO utilize resize event trigger
893
+ */
894
+
895
+
896
+
897
+ /***/ }),
898
+
899
+ /***/ 7:
900
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
901
+
902
+ "use strict";
903
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Triggers; });
904
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
905
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
906
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__ = __webpack_require__(4);
907
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__);
908
+
909
+
910
+
911
+
912
+
913
+ var MutationObserver = function () {
914
+ var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];
915
+ for (var i = 0; i < prefixes.length; i++) {
916
+ if (prefixes[i] + 'MutationObserver' in window) {
917
+ return window[prefixes[i] + 'MutationObserver'];
918
+ }
919
+ }
920
+ return false;
921
+ }();
922
+
923
+ var triggers = function (el, type) {
924
+ el.data(type).split(' ').forEach(function (id) {
925
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id)[type === 'close' ? 'trigger' : 'triggerHandler'](type + '.zf.trigger', [el]);
926
+ });
927
+ };
928
+
929
+ var Triggers = {
930
+ Listeners: {
931
+ Basic: {},
932
+ Global: {}
933
+ },
934
+ Initializers: {}
935
+ };
936
+
937
+ Triggers.Listeners.Basic = {
938
+ openListener: function () {
939
+ triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'open');
940
+ },
941
+ closeListener: function () {
942
+ var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('close');
943
+ if (id) {
944
+ triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'close');
945
+ } else {
946
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('close.zf.trigger');
947
+ }
948
+ },
949
+ toggleListener: function () {
950
+ var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle');
951
+ if (id) {
952
+ triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'toggle');
953
+ } else {
954
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('toggle.zf.trigger');
955
+ }
956
+ },
957
+ closeableListener: function (e) {
958
+ e.stopPropagation();
959
+ var animation = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('closable');
960
+
961
+ if (animation !== '') {
962
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__["Motion"].animateOut(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), animation, function () {
963
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('closed.zf');
964
+ });
965
+ } else {
966
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).fadeOut().trigger('closed.zf');
967
+ }
968
+ },
969
+ toggleFocusListener: function () {
970
+ var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle-focus');
971
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id).triggerHandler('toggle.zf.trigger', [__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this)]);
972
+ }
973
+ };
974
+
975
+ // Elements with [data-open] will reveal a plugin that supports it when clicked.
976
+ Triggers.Initializers.addOpenListener = function ($elem) {
977
+ $elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);
978
+ $elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);
979
+ };
980
+
981
+ // Elements with [data-close] will close a plugin that supports it when clicked.
982
+ // If used without a value on [data-close], the event will bubble, allowing it to close a parent component.
983
+ Triggers.Initializers.addCloseListener = function ($elem) {
984
+ $elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);
985
+ $elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);
986
+ };
987
+
988
+ // Elements with [data-toggle] will toggle a plugin that supports it when clicked.
989
+ Triggers.Initializers.addToggleListener = function ($elem) {
990
+ $elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);
991
+ $elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);
992
+ };
993
+
994
+ // Elements with [data-closable] will respond to close.zf.trigger events.
995
+ Triggers.Initializers.addCloseableListener = function ($elem) {
996
+ $elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);
997
+ $elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);
998
+ };
999
+
1000
+ // Elements with [data-toggle-focus] will respond to coming in and out of focus
1001
+ Triggers.Initializers.addToggleFocusListener = function ($elem) {
1002
+ $elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);
1003
+ $elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);
1004
+ };
1005
+
1006
+ // More Global/complex listeners and triggers
1007
+ Triggers.Listeners.Global = {
1008
+ resizeListener: function ($nodes) {
1009
+ if (!MutationObserver) {
1010
+ //fallback for IE 9
1011
+ $nodes.each(function () {
1012
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('resizeme.zf.trigger');
1013
+ });
1014
+ }
1015
+ //trigger all listening elements and signal a resize event
1016
+ $nodes.attr('data-events', "resize");
1017
+ },
1018
+ scrollListener: function ($nodes) {
1019
+ if (!MutationObserver) {
1020
+ //fallback for IE 9
1021
+ $nodes.each(function () {
1022
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('scrollme.zf.trigger');
1023
+ });
1024
+ }
1025
+ //trigger all listening elements and signal a scroll event
1026
+ $nodes.attr('data-events', "scroll");
1027
+ },
1028
+ closeMeListener: function (e, pluginId) {
1029
+ var plugin = e.namespace.split('.')[0];
1030
+ var plugins = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-' + plugin + ']').not('[data-yeti-box="' + pluginId + '"]');
1031
+
1032
+ plugins.each(function () {
1033
+ var _this = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this);
1034
+ _this.triggerHandler('close.zf.trigger', [_this]);
1035
+ });
1036
+ }
1037
+ };
1038
+
1039
+ // Global, parses whole document.
1040
+ Triggers.Initializers.addClosemeListener = function (pluginName) {
1041
+ var yetiBoxes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-yeti-box]'),
1042
+ plugNames = ['dropdown', 'tooltip', 'reveal'];
1043
+
1044
+ if (pluginName) {
1045
+ if (typeof pluginName === 'string') {
1046
+ plugNames.push(pluginName);
1047
+ } else if (typeof pluginName === 'object' && typeof pluginName[0] === 'string') {
1048
+ plugNames.concat(pluginName);
1049
+ } else {
1050
+ console.error('Plugin names must be strings');
1051
+ }
1052
+ }
1053
+ if (yetiBoxes.length) {
1054
+ var listeners = plugNames.map(function (name) {
1055
+ return 'closeme.zf.' + name;
1056
+ }).join(' ');
1057
+
1058
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);
1059
+ }
1060
+ };
1061
+
1062
+ function debounceGlobalListener(debounce, trigger, listener) {
1063
+ var timer = void 0,
1064
+ args = Array.prototype.slice.call(arguments, 3);
1065
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(trigger).on(trigger, function (e) {
1066
+ if (timer) {
1067
+ clearTimeout(timer);
1068
+ }
1069
+ timer = setTimeout(function () {
1070
+ listener.apply(null, args);
1071
+ }, debounce || 10); //default time to emit scroll event
1072
+ });
1073
+ }
1074
+
1075
+ Triggers.Initializers.addResizeListener = function (debounce) {
1076
+ var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-resize]');
1077
+ if ($nodes.length) {
1078
+ debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);
1079
+ }
1080
+ };
1081
+
1082
+ Triggers.Initializers.addScrollListener = function (debounce) {
1083
+ var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-scroll]');
1084
+ if ($nodes.length) {
1085
+ debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);
1086
+ }
1087
+ };
1088
+
1089
+ Triggers.Initializers.addMutationEventsListener = function ($elem) {
1090
+ if (!MutationObserver) {
1091
+ return false;
1092
+ }
1093
+ var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');
1094
+
1095
+ //element callback
1096
+ var listeningElementsMutation = function (mutationRecordsList) {
1097
+ var $target = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(mutationRecordsList[0].target);
1098
+
1099
+ //trigger the event handler for the element depending on type
1100
+ switch (mutationRecordsList[0].type) {
1101
+ case "attributes":
1102
+ if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") {
1103
+ $target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);
1104
+ }
1105
+ if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") {
1106
+ $target.triggerHandler('resizeme.zf.trigger', [$target]);
1107
+ }
1108
+ if (mutationRecordsList[0].attributeName === "style") {
1109
+ $target.closest("[data-mutate]").attr("data-events", "mutate");
1110
+ $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
1111
+ }
1112
+ break;
1113
+
1114
+ case "childList":
1115
+ $target.closest("[data-mutate]").attr("data-events", "mutate");
1116
+ $target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
1117
+ break;
1118
+
1119
+ default:
1120
+ return false;
1121
+ //nothing
1122
+ }
1123
+ };
1124
+
1125
+ if ($nodes.length) {
1126
+ //for each element that needs to listen for resizing, scrolling, or mutation add a single observer
1127
+ for (var i = 0; i <= $nodes.length - 1; i++) {
1128
+ var elementObserver = new MutationObserver(listeningElementsMutation);
1129
+ elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: ["data-events", "style"] });
1130
+ }
1131
+ }
1132
+ };
1133
+
1134
+ Triggers.Initializers.addSimpleListeners = function () {
1135
+ var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document);
1136
+
1137
+ Triggers.Initializers.addOpenListener($document);
1138
+ Triggers.Initializers.addCloseListener($document);
1139
+ Triggers.Initializers.addToggleListener($document);
1140
+ Triggers.Initializers.addCloseableListener($document);
1141
+ Triggers.Initializers.addToggleFocusListener($document);
1142
+ };
1143
+
1144
+ Triggers.Initializers.addGlobalListeners = function () {
1145
+ var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document);
1146
+ Triggers.Initializers.addMutationEventsListener($document);
1147
+ Triggers.Initializers.addResizeListener();
1148
+ Triggers.Initializers.addScrollListener();
1149
+ Triggers.Initializers.addClosemeListener();
1150
+ };
1151
+
1152
+ Triggers.init = function ($, Foundation) {
1153
+ if (typeof $.triggersInitialized === 'undefined') {
1154
+ var $document = $(document);
1155
+
1156
+ if (document.readyState === "complete") {
1157
+ Triggers.Initializers.addSimpleListeners();
1158
+ Triggers.Initializers.addGlobalListeners();
1159
+ } else {
1160
+ $(window).on('load', function () {
1161
+ Triggers.Initializers.addSimpleListeners();
1162
+ Triggers.Initializers.addGlobalListeners();
1163
+ });
1164
+ }
1165
+
1166
+ $.triggersInitialized = true;
1167
+ }
1168
+
1169
+ if (Foundation) {
1170
+ Foundation.Triggers = Triggers;
1171
+ // Legacy included to be backwards compatible for now.
1172
+ Foundation.IHearYou = Triggers.Initializers.addGlobalListeners;
1173
+ }
1174
+ };
1175
+
1176
+
1177
+
1178
+ /***/ }),
1179
+
1180
+ /***/ 8:
1181
+ /***/ (function(module, exports) {
1182
+
1183
+ module.exports = {Box: window.Foundation.Box};
1184
+
1185
+ /***/ }),
1186
+
1187
+ /***/ 99:
1188
+ /***/ (function(module, exports, __webpack_require__) {
1189
+
1190
+ module.exports = __webpack_require__(33);
1191
+
1192
+
1193
+ /***/ })
1194
+
1195
+ /******/ });