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,678 @@
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 = 84);
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
+ /***/ 18:
86
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
87
+
88
+ "use strict";
89
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
90
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
91
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
92
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_dropdownMenu__ = __webpack_require__(48);
93
+
94
+
95
+
96
+ __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_dropdownMenu__["a" /* DropdownMenu */], 'DropdownMenu');
97
+
98
+ /***/ }),
99
+
100
+ /***/ 2:
101
+ /***/ (function(module, exports) {
102
+
103
+ module.exports = {Plugin: window.Foundation.Plugin};
104
+
105
+ /***/ }),
106
+
107
+ /***/ 3:
108
+ /***/ (function(module, exports) {
109
+
110
+ module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend};
111
+
112
+ /***/ }),
113
+
114
+ /***/ 48:
115
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
116
+
117
+ "use strict";
118
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DropdownMenu; });
119
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
120
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
121
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(5);
122
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__);
123
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__ = __webpack_require__(9);
124
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__);
125
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_box__ = __webpack_require__(8);
126
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_box___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__foundation_util_box__);
127
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_util_core__ = __webpack_require__(3);
128
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__foundation_util_core__);
129
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__foundation_plugin__ = __webpack_require__(2);
130
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__foundation_plugin__);
131
+
132
+
133
+ 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; }; }();
134
+
135
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
136
+
137
+ 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; }
138
+
139
+ 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; }
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ /**
149
+ * DropdownMenu module.
150
+ * @module foundation.dropdown-menu
151
+ * @requires foundation.util.keyboard
152
+ * @requires foundation.util.box
153
+ * @requires foundation.util.nest
154
+ */
155
+
156
+ var DropdownMenu = function (_Plugin) {
157
+ _inherits(DropdownMenu, _Plugin);
158
+
159
+ function DropdownMenu() {
160
+ _classCallCheck(this, DropdownMenu);
161
+
162
+ return _possibleConstructorReturn(this, (DropdownMenu.__proto__ || Object.getPrototypeOf(DropdownMenu)).apply(this, arguments));
163
+ }
164
+
165
+ _createClass(DropdownMenu, [{
166
+ key: '_setup',
167
+
168
+ /**
169
+ * Creates a new instance of DropdownMenu.
170
+ * @class
171
+ * @name DropdownMenu
172
+ * @fires DropdownMenu#init
173
+ * @param {jQuery} element - jQuery object to make into a dropdown menu.
174
+ * @param {Object} options - Overrides to the default plugin settings.
175
+ */
176
+ value: function _setup(element, options) {
177
+ this.$element = element;
178
+ this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, DropdownMenu.defaults, this.$element.data(), options);
179
+ this.className = 'DropdownMenu'; // ie9 back compat
180
+
181
+ __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__["Nest"].Feather(this.$element, 'dropdown');
182
+ this._init();
183
+
184
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].register('DropdownMenu', {
185
+ 'ENTER': 'open',
186
+ 'SPACE': 'open',
187
+ 'ARROW_RIGHT': 'next',
188
+ 'ARROW_UP': 'up',
189
+ 'ARROW_DOWN': 'down',
190
+ 'ARROW_LEFT': 'previous',
191
+ 'ESCAPE': 'close'
192
+ });
193
+ }
194
+
195
+ /**
196
+ * Initializes the plugin, and calls _prepareMenu
197
+ * @private
198
+ * @function
199
+ */
200
+
201
+ }, {
202
+ key: '_init',
203
+ value: function _init() {
204
+ var subs = this.$element.find('li.is-dropdown-submenu-parent');
205
+ this.$element.children('.is-dropdown-submenu-parent').children('.is-dropdown-submenu').addClass('first-sub');
206
+
207
+ this.$menuItems = this.$element.find('[role="menuitem"]');
208
+ this.$tabs = this.$element.children('[role="menuitem"]');
209
+ this.$tabs.find('ul.is-dropdown-submenu').addClass(this.options.verticalClass);
210
+
211
+ if (this.options.alignment === 'auto') {
212
+ if (this.$element.hasClass(this.options.rightClass) || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__foundation_util_core__["rtl"])() || this.$element.parents('.top-bar-right').is('*')) {
213
+ this.options.alignment = 'right';
214
+ subs.addClass('opens-left');
215
+ } else {
216
+ this.options.alignment = 'left';
217
+ subs.addClass('opens-right');
218
+ }
219
+ } else {
220
+ if (this.options.alignment === 'right') {
221
+ subs.addClass('opens-left');
222
+ } else {
223
+ subs.addClass('opens-right');
224
+ }
225
+ }
226
+ this.changed = false;
227
+ this._events();
228
+ }
229
+ }, {
230
+ key: '_isVertical',
231
+ value: function _isVertical() {
232
+ return this.$tabs.css('display') === 'block' || this.$element.css('flex-direction') === 'column';
233
+ }
234
+ }, {
235
+ key: '_isRtl',
236
+ value: function _isRtl() {
237
+ return this.$element.hasClass('align-right') || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__foundation_util_core__["rtl"])() && !this.$element.hasClass('align-left');
238
+ }
239
+
240
+ /**
241
+ * Adds event listeners to elements within the menu
242
+ * @private
243
+ * @function
244
+ */
245
+
246
+ }, {
247
+ key: '_events',
248
+ value: function _events() {
249
+ var _this = this,
250
+ hasTouch = 'ontouchstart' in window || typeof window.ontouchstart !== 'undefined',
251
+ parClass = 'is-dropdown-submenu-parent';
252
+
253
+ // used for onClick and in the keyboard handlers
254
+ var handleClickFn = function (e) {
255
+ var $elem = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(e.target).parentsUntil('ul', '.' + parClass),
256
+ hasSub = $elem.hasClass(parClass),
257
+ hasClicked = $elem.attr('data-is-click') === 'true',
258
+ $sub = $elem.children('.is-dropdown-submenu');
259
+
260
+ if (hasSub) {
261
+ if (hasClicked) {
262
+ if (!_this.options.closeOnClick || !_this.options.clickOpen && !hasTouch || _this.options.forceFollow && hasTouch) {
263
+ return;
264
+ } else {
265
+ e.stopImmediatePropagation();
266
+ e.preventDefault();
267
+ _this._hide($elem);
268
+ }
269
+ } else {
270
+ e.preventDefault();
271
+ e.stopImmediatePropagation();
272
+ _this._show($sub);
273
+ $elem.add($elem.parentsUntil(_this.$element, '.' + parClass)).attr('data-is-click', true);
274
+ }
275
+ }
276
+ };
277
+
278
+ if (this.options.clickOpen || hasTouch) {
279
+ this.$menuItems.on('click.zf.dropdownmenu touchstart.zf.dropdownmenu', handleClickFn);
280
+ }
281
+
282
+ // Handle Leaf element Clicks
283
+ if (_this.options.closeOnClickInside) {
284
+ this.$menuItems.on('click.zf.dropdownmenu', function (e) {
285
+ var $elem = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
286
+ hasSub = $elem.hasClass(parClass);
287
+ if (!hasSub) {
288
+ _this._hide();
289
+ }
290
+ });
291
+ }
292
+
293
+ if (!this.options.disableHover) {
294
+ this.$menuItems.on('mouseenter.zf.dropdownmenu', function (e) {
295
+ var $elem = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
296
+ hasSub = $elem.hasClass(parClass);
297
+
298
+ if (hasSub) {
299
+ clearTimeout($elem.data('_delay'));
300
+ $elem.data('_delay', setTimeout(function () {
301
+ _this._show($elem.children('.is-dropdown-submenu'));
302
+ }, _this.options.hoverDelay));
303
+ }
304
+ }).on('mouseleave.zf.dropdownmenu', function (e) {
305
+ var $elem = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
306
+ hasSub = $elem.hasClass(parClass);
307
+ if (hasSub && _this.options.autoclose) {
308
+ if ($elem.attr('data-is-click') === 'true' && _this.options.clickOpen) {
309
+ return false;
310
+ }
311
+
312
+ clearTimeout($elem.data('_delay'));
313
+ $elem.data('_delay', setTimeout(function () {
314
+ _this._hide($elem);
315
+ }, _this.options.closingTime));
316
+ }
317
+ });
318
+ }
319
+ this.$menuItems.on('keydown.zf.dropdownmenu', function (e) {
320
+ var $element = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(e.target).parentsUntil('ul', '[role="menuitem"]'),
321
+ isTab = _this.$tabs.index($element) > -1,
322
+ $elements = isTab ? _this.$tabs : $element.siblings('li').add($element),
323
+ $prevElement,
324
+ $nextElement;
325
+
326
+ $elements.each(function (i) {
327
+ if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is($element)) {
328
+ $prevElement = $elements.eq(i - 1);
329
+ $nextElement = $elements.eq(i + 1);
330
+ return;
331
+ }
332
+ });
333
+
334
+ var nextSibling = function () {
335
+ if (!$element.is(':last-child')) {
336
+ $nextElement.children('a:first').focus();
337
+ e.preventDefault();
338
+ }
339
+ },
340
+ prevSibling = function () {
341
+ $prevElement.children('a:first').focus();
342
+ e.preventDefault();
343
+ },
344
+ openSub = function () {
345
+ var $sub = $element.children('ul.is-dropdown-submenu');
346
+ if ($sub.length) {
347
+ _this._show($sub);
348
+ $element.find('li > a:first').focus();
349
+ e.preventDefault();
350
+ } else {
351
+ return;
352
+ }
353
+ },
354
+ closeSub = function () {
355
+ //if ($element.is(':first-child')) {
356
+ var close = $element.parent('ul').parent('li');
357
+ close.children('a:first').focus();
358
+ _this._hide(close);
359
+ e.preventDefault();
360
+ //}
361
+ };
362
+ var functions = {
363
+ open: openSub,
364
+ close: function () {
365
+ _this._hide(_this.$element);
366
+ _this.$menuItems.eq(0).children('a').focus(); // focus to first element
367
+ e.preventDefault();
368
+ },
369
+ handled: function () {
370
+ e.stopImmediatePropagation();
371
+ }
372
+ };
373
+
374
+ if (isTab) {
375
+ if (_this._isVertical()) {
376
+ // vertical menu
377
+ if (_this._isRtl()) {
378
+ // right aligned
379
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend(functions, {
380
+ down: nextSibling,
381
+ up: prevSibling,
382
+ next: closeSub,
383
+ previous: openSub
384
+ });
385
+ } else {
386
+ // left aligned
387
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend(functions, {
388
+ down: nextSibling,
389
+ up: prevSibling,
390
+ next: openSub,
391
+ previous: closeSub
392
+ });
393
+ }
394
+ } else {
395
+ // horizontal menu
396
+ if (_this._isRtl()) {
397
+ // right aligned
398
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend(functions, {
399
+ next: prevSibling,
400
+ previous: nextSibling,
401
+ down: openSub,
402
+ up: closeSub
403
+ });
404
+ } else {
405
+ // left aligned
406
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend(functions, {
407
+ next: nextSibling,
408
+ previous: prevSibling,
409
+ down: openSub,
410
+ up: closeSub
411
+ });
412
+ }
413
+ }
414
+ } else {
415
+ // not tabs -> one sub
416
+ if (_this._isRtl()) {
417
+ // right aligned
418
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend(functions, {
419
+ next: closeSub,
420
+ previous: openSub,
421
+ down: nextSibling,
422
+ up: prevSibling
423
+ });
424
+ } else {
425
+ // left aligned
426
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend(functions, {
427
+ next: openSub,
428
+ previous: closeSub,
429
+ down: nextSibling,
430
+ up: prevSibling
431
+ });
432
+ }
433
+ }
434
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].handleKey(e, 'DropdownMenu', functions);
435
+ });
436
+ }
437
+
438
+ /**
439
+ * Adds an event handler to the body to close any dropdowns on a click.
440
+ * @function
441
+ * @private
442
+ */
443
+
444
+ }, {
445
+ key: '_addBodyHandler',
446
+ value: function _addBodyHandler() {
447
+ var $body = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document.body),
448
+ _this = this;
449
+ $body.off('mouseup.zf.dropdownmenu touchend.zf.dropdownmenu').on('mouseup.zf.dropdownmenu touchend.zf.dropdownmenu', function (e) {
450
+ var $link = _this.$element.find(e.target);
451
+ if ($link.length) {
452
+ return;
453
+ }
454
+
455
+ _this._hide();
456
+ $body.off('mouseup.zf.dropdownmenu touchend.zf.dropdownmenu');
457
+ });
458
+ }
459
+
460
+ /**
461
+ * Opens a dropdown pane, and checks for collisions first.
462
+ * @param {jQuery} $sub - ul element that is a submenu to show
463
+ * @function
464
+ * @private
465
+ * @fires DropdownMenu#show
466
+ */
467
+
468
+ }, {
469
+ key: '_show',
470
+ value: function _show($sub) {
471
+ var idx = this.$tabs.index(this.$tabs.filter(function (i, el) {
472
+ return __WEBPACK_IMPORTED_MODULE_0_jquery___default()(el).find($sub).length > 0;
473
+ }));
474
+ var $sibs = $sub.parent('li.is-dropdown-submenu-parent').siblings('li.is-dropdown-submenu-parent');
475
+ this._hide($sibs, idx);
476
+ $sub.css('visibility', 'hidden').addClass('js-dropdown-active').parent('li.is-dropdown-submenu-parent').addClass('is-active');
477
+ var clear = __WEBPACK_IMPORTED_MODULE_3__foundation_util_box__["Box"].ImNotTouchingYou($sub, null, true);
478
+ if (!clear) {
479
+ var oldClass = this.options.alignment === 'left' ? '-right' : '-left',
480
+ $parentLi = $sub.parent('.is-dropdown-submenu-parent');
481
+ $parentLi.removeClass('opens' + oldClass).addClass('opens-' + this.options.alignment);
482
+ clear = __WEBPACK_IMPORTED_MODULE_3__foundation_util_box__["Box"].ImNotTouchingYou($sub, null, true);
483
+ if (!clear) {
484
+ $parentLi.removeClass('opens-' + this.options.alignment).addClass('opens-inner');
485
+ }
486
+ this.changed = true;
487
+ }
488
+ $sub.css('visibility', '');
489
+ if (this.options.closeOnClick) {
490
+ this._addBodyHandler();
491
+ }
492
+ /**
493
+ * Fires when the new dropdown pane is visible.
494
+ * @event DropdownMenu#show
495
+ */
496
+ this.$element.trigger('show.zf.dropdownmenu', [$sub]);
497
+ }
498
+
499
+ /**
500
+ * Hides a single, currently open dropdown pane, if passed a parameter, otherwise, hides everything.
501
+ * @function
502
+ * @param {jQuery} $elem - element with a submenu to hide
503
+ * @param {Number} idx - index of the $tabs collection to hide
504
+ * @private
505
+ */
506
+
507
+ }, {
508
+ key: '_hide',
509
+ value: function _hide($elem, idx) {
510
+ var $toClose;
511
+ if ($elem && $elem.length) {
512
+ $toClose = $elem;
513
+ } else if (idx !== undefined) {
514
+ $toClose = this.$tabs.not(function (i, el) {
515
+ return i === idx;
516
+ });
517
+ } else {
518
+ $toClose = this.$element;
519
+ }
520
+ var somethingToClose = $toClose.hasClass('is-active') || $toClose.find('.is-active').length > 0;
521
+
522
+ if (somethingToClose) {
523
+ $toClose.find('li.is-active').add($toClose).attr({
524
+ 'data-is-click': false
525
+ }).removeClass('is-active');
526
+
527
+ $toClose.find('ul.js-dropdown-active').removeClass('js-dropdown-active');
528
+
529
+ if (this.changed || $toClose.find('opens-inner').length) {
530
+ var oldClass = this.options.alignment === 'left' ? 'right' : 'left';
531
+ $toClose.find('li.is-dropdown-submenu-parent').add($toClose).removeClass('opens-inner opens-' + this.options.alignment).addClass('opens-' + oldClass);
532
+ this.changed = false;
533
+ }
534
+ /**
535
+ * Fires when the open menus are closed.
536
+ * @event DropdownMenu#hide
537
+ */
538
+ this.$element.trigger('hide.zf.dropdownmenu', [$toClose]);
539
+ }
540
+ }
541
+
542
+ /**
543
+ * Destroys the plugin.
544
+ * @function
545
+ */
546
+
547
+ }, {
548
+ key: '_destroy',
549
+ value: function _destroy() {
550
+ this.$menuItems.off('.zf.dropdownmenu').removeAttr('data-is-click').removeClass('is-right-arrow is-left-arrow is-down-arrow opens-right opens-left opens-inner');
551
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document.body).off('.zf.dropdownmenu');
552
+ __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__["Nest"].Burn(this.$element, 'dropdown');
553
+ }
554
+ }]);
555
+
556
+ return DropdownMenu;
557
+ }(__WEBPACK_IMPORTED_MODULE_5__foundation_plugin__["Plugin"]);
558
+
559
+ /**
560
+ * Default settings for plugin
561
+ */
562
+
563
+
564
+ DropdownMenu.defaults = {
565
+ /**
566
+ * Disallows hover events from opening submenus
567
+ * @option
568
+ * @type {boolean}
569
+ * @default false
570
+ */
571
+ disableHover: false,
572
+ /**
573
+ * Allow a submenu to automatically close on a mouseleave event, if not clicked open.
574
+ * @option
575
+ * @type {boolean}
576
+ * @default true
577
+ */
578
+ autoclose: true,
579
+ /**
580
+ * Amount of time to delay opening a submenu on hover event.
581
+ * @option
582
+ * @type {number}
583
+ * @default 50
584
+ */
585
+ hoverDelay: 50,
586
+ /**
587
+ * Allow a submenu to open/remain open on parent click event. Allows cursor to move away from menu.
588
+ * @option
589
+ * @type {boolean}
590
+ * @default false
591
+ */
592
+ clickOpen: false,
593
+ /**
594
+ * Amount of time to delay closing a submenu on a mouseleave event.
595
+ * @option
596
+ * @type {number}
597
+ * @default 500
598
+ */
599
+
600
+ closingTime: 500,
601
+ /**
602
+ * Position of the menu relative to what direction the submenus should open. Handled by JS. Can be `'auto'`, `'left'` or `'right'`.
603
+ * @option
604
+ * @type {string}
605
+ * @default 'auto'
606
+ */
607
+ alignment: 'auto',
608
+ /**
609
+ * Allow clicks on the body to close any open submenus.
610
+ * @option
611
+ * @type {boolean}
612
+ * @default true
613
+ */
614
+ closeOnClick: true,
615
+ /**
616
+ * Allow clicks on leaf anchor links to close any open submenus.
617
+ * @option
618
+ * @type {boolean}
619
+ * @default true
620
+ */
621
+ closeOnClickInside: true,
622
+ /**
623
+ * Class applied to vertical oriented menus, Foundation default is `vertical`. Update this if using your own class.
624
+ * @option
625
+ * @type {string}
626
+ * @default 'vertical'
627
+ */
628
+ verticalClass: 'vertical',
629
+ /**
630
+ * Class applied to right-side oriented menus, Foundation default is `align-right`. Update this if using your own class.
631
+ * @option
632
+ * @type {string}
633
+ * @default 'align-right'
634
+ */
635
+ rightClass: 'align-right',
636
+ /**
637
+ * Boolean to force overide the clicking of links to perform default action, on second touch event for mobile.
638
+ * @option
639
+ * @type {boolean}
640
+ * @default true
641
+ */
642
+ forceFollow: true
643
+ };
644
+
645
+
646
+
647
+ /***/ }),
648
+
649
+ /***/ 5:
650
+ /***/ (function(module, exports) {
651
+
652
+ module.exports = {Keyboard: window.Foundation.Keyboard};
653
+
654
+ /***/ }),
655
+
656
+ /***/ 8:
657
+ /***/ (function(module, exports) {
658
+
659
+ module.exports = {Box: window.Foundation.Box};
660
+
661
+ /***/ }),
662
+
663
+ /***/ 84:
664
+ /***/ (function(module, exports, __webpack_require__) {
665
+
666
+ module.exports = __webpack_require__(18);
667
+
668
+
669
+ /***/ }),
670
+
671
+ /***/ 9:
672
+ /***/ (function(module, exports) {
673
+
674
+ module.exports = {Nest: window.Foundation.Nest};
675
+
676
+ /***/ })
677
+
678
+ /******/ });