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,527 @@
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 = 81);
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
+ /***/ 15:
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_accordionMenu__ = __webpack_require__(45);
93
+
94
+
95
+
96
+ __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_accordionMenu__["a" /* AccordionMenu */], 'AccordionMenu');
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
+ /***/ 45:
115
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
116
+
117
+ "use strict";
118
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AccordionMenu; });
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_core__ = __webpack_require__(3);
126
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__);
127
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_plugin__ = __webpack_require__(2);
128
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__foundation_plugin__);
129
+
130
+
131
+ 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; }; }();
132
+
133
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
134
+
135
+ 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; }
136
+
137
+ 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; }
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+ /**
146
+ * AccordionMenu module.
147
+ * @module foundation.accordionMenu
148
+ * @requires foundation.util.keyboard
149
+ * @requires foundation.util.nest
150
+ */
151
+
152
+ var AccordionMenu = function (_Plugin) {
153
+ _inherits(AccordionMenu, _Plugin);
154
+
155
+ function AccordionMenu() {
156
+ _classCallCheck(this, AccordionMenu);
157
+
158
+ return _possibleConstructorReturn(this, (AccordionMenu.__proto__ || Object.getPrototypeOf(AccordionMenu)).apply(this, arguments));
159
+ }
160
+
161
+ _createClass(AccordionMenu, [{
162
+ key: '_setup',
163
+
164
+ /**
165
+ * Creates a new instance of an accordion menu.
166
+ * @class
167
+ * @name AccordionMenu
168
+ * @fires AccordionMenu#init
169
+ * @param {jQuery} element - jQuery object to make into an accordion menu.
170
+ * @param {Object} options - Overrides to the default plugin settings.
171
+ */
172
+ value: function _setup(element, options) {
173
+ this.$element = element;
174
+ this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, AccordionMenu.defaults, this.$element.data(), options);
175
+ this.className = 'AccordionMenu'; // ie9 back compat
176
+
177
+ __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__["Nest"].Feather(this.$element, 'accordion');
178
+
179
+ this._init();
180
+
181
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].register('AccordionMenu', {
182
+ 'ENTER': 'toggle',
183
+ 'SPACE': 'toggle',
184
+ 'ARROW_RIGHT': 'open',
185
+ 'ARROW_UP': 'up',
186
+ 'ARROW_DOWN': 'down',
187
+ 'ARROW_LEFT': 'close',
188
+ 'ESCAPE': 'closeAll'
189
+ });
190
+ }
191
+
192
+ /**
193
+ * Initializes the accordion menu by hiding all nested menus.
194
+ * @private
195
+ */
196
+
197
+ }, {
198
+ key: '_init',
199
+ value: function _init() {
200
+ var _this = this;
201
+
202
+ this.$element.find('[data-submenu]').not('.is-active').slideUp(0); //.find('a').css('padding-left', '1rem');
203
+ this.$element.attr({
204
+ 'role': 'tree',
205
+ 'aria-multiselectable': this.options.multiOpen
206
+ });
207
+
208
+ this.$menuLinks = this.$element.find('.is-accordion-submenu-parent');
209
+ this.$menuLinks.each(function () {
210
+ var linkId = this.id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__["GetYoDigits"])(6, 'acc-menu-link'),
211
+ $elem = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
212
+ $sub = $elem.children('[data-submenu]'),
213
+ subId = $sub[0].id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_3__foundation_util_core__["GetYoDigits"])(6, 'acc-menu'),
214
+ isActive = $sub.hasClass('is-active');
215
+
216
+ if (_this.options.submenuToggle) {
217
+ $elem.addClass('has-submenu-toggle');
218
+ $elem.children('a').after('<button id="' + linkId + '" class="submenu-toggle" aria-controls="' + subId + '" aria-expanded="' + isActive + '" title="' + _this.options.submenuToggleText + '"><span class="submenu-toggle-text">' + _this.options.submenuToggleText + '</span></button>');
219
+ } else {
220
+ $elem.attr({
221
+ 'aria-controls': subId,
222
+ 'aria-expanded': isActive,
223
+ 'id': linkId
224
+ });
225
+ }
226
+ $sub.attr({
227
+ 'aria-labelledby': linkId,
228
+ 'aria-hidden': !isActive,
229
+ 'role': 'group',
230
+ 'id': subId
231
+ });
232
+ });
233
+ this.$element.find('li').attr({
234
+ 'role': 'treeitem'
235
+ });
236
+ var initPanes = this.$element.find('.is-active');
237
+ if (initPanes.length) {
238
+ var _this = this;
239
+ initPanes.each(function () {
240
+ _this.down(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this));
241
+ });
242
+ }
243
+ this._events();
244
+ }
245
+
246
+ /**
247
+ * Adds event handlers for items within the menu.
248
+ * @private
249
+ */
250
+
251
+ }, {
252
+ key: '_events',
253
+ value: function _events() {
254
+ var _this = this;
255
+
256
+ this.$element.find('li').each(function () {
257
+ var $submenu = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).children('[data-submenu]');
258
+
259
+ if ($submenu.length) {
260
+ if (_this.options.submenuToggle) {
261
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).children('.submenu-toggle').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function (e) {
262
+ _this.toggle($submenu);
263
+ });
264
+ } else {
265
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).children('a').off('click.zf.accordionMenu').on('click.zf.accordionMenu', function (e) {
266
+ e.preventDefault();
267
+ _this.toggle($submenu);
268
+ });
269
+ }
270
+ }
271
+ }).on('keydown.zf.accordionmenu', function (e) {
272
+ var $element = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
273
+ $elements = $element.parent('ul').children('li'),
274
+ $prevElement,
275
+ $nextElement,
276
+ $target = $element.children('[data-submenu]');
277
+
278
+ $elements.each(function (i) {
279
+ if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is($element)) {
280
+ $prevElement = $elements.eq(Math.max(0, i - 1)).find('a').first();
281
+ $nextElement = $elements.eq(Math.min(i + 1, $elements.length - 1)).find('a').first();
282
+
283
+ if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).children('[data-submenu]:visible').length) {
284
+ // has open sub menu
285
+ $nextElement = $element.find('li:first-child').find('a').first();
286
+ }
287
+ if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is(':first-child')) {
288
+ // is first element of sub menu
289
+ $prevElement = $element.parents('li').first().find('a').first();
290
+ } else if ($prevElement.parents('li').first().children('[data-submenu]:visible').length) {
291
+ // if previous element has open sub menu
292
+ $prevElement = $prevElement.parents('li').find('li:last-child').find('a').first();
293
+ }
294
+ if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is(':last-child')) {
295
+ // is last element of sub menu
296
+ $nextElement = $element.parents('li').first().next('li').find('a').first();
297
+ }
298
+
299
+ return;
300
+ }
301
+ });
302
+
303
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].handleKey(e, 'AccordionMenu', {
304
+ open: function () {
305
+ if ($target.is(':hidden')) {
306
+ _this.down($target);
307
+ $target.find('li').first().find('a').first().focus();
308
+ }
309
+ },
310
+ close: function () {
311
+ if ($target.length && !$target.is(':hidden')) {
312
+ // close active sub of this item
313
+ _this.up($target);
314
+ } else if ($element.parent('[data-submenu]').length) {
315
+ // close currently open sub
316
+ _this.up($element.parent('[data-submenu]'));
317
+ $element.parents('li').first().find('a').first().focus();
318
+ }
319
+ },
320
+ up: function () {
321
+ $prevElement.focus();
322
+ return true;
323
+ },
324
+ down: function () {
325
+ $nextElement.focus();
326
+ return true;
327
+ },
328
+ toggle: function () {
329
+ if (_this.options.submenuToggle) {
330
+ return false;
331
+ }
332
+ if ($element.children('[data-submenu]').length) {
333
+ _this.toggle($element.children('[data-submenu]'));
334
+ return true;
335
+ }
336
+ },
337
+ closeAll: function () {
338
+ _this.hideAll();
339
+ },
340
+ handled: function (preventDefault) {
341
+ if (preventDefault) {
342
+ e.preventDefault();
343
+ }
344
+ e.stopImmediatePropagation();
345
+ }
346
+ });
347
+ }); //.attr('tabindex', 0);
348
+ }
349
+
350
+ /**
351
+ * Closes all panes of the menu.
352
+ * @function
353
+ */
354
+
355
+ }, {
356
+ key: 'hideAll',
357
+ value: function hideAll() {
358
+ this.up(this.$element.find('[data-submenu]'));
359
+ }
360
+
361
+ /**
362
+ * Opens all panes of the menu.
363
+ * @function
364
+ */
365
+
366
+ }, {
367
+ key: 'showAll',
368
+ value: function showAll() {
369
+ this.down(this.$element.find('[data-submenu]'));
370
+ }
371
+
372
+ /**
373
+ * Toggles the open/close state of a submenu.
374
+ * @function
375
+ * @param {jQuery} $target - the submenu to toggle
376
+ */
377
+
378
+ }, {
379
+ key: 'toggle',
380
+ value: function toggle($target) {
381
+ if (!$target.is(':animated')) {
382
+ if (!$target.is(':hidden')) {
383
+ this.up($target);
384
+ } else {
385
+ this.down($target);
386
+ }
387
+ }
388
+ }
389
+
390
+ /**
391
+ * Opens the sub-menu defined by `$target`.
392
+ * @param {jQuery} $target - Sub-menu to open.
393
+ * @fires AccordionMenu#down
394
+ */
395
+
396
+ }, {
397
+ key: 'down',
398
+ value: function down($target) {
399
+ var _this = this;
400
+
401
+ if (!this.options.multiOpen) {
402
+ this.up(this.$element.find('.is-active').not($target.parentsUntil(this.$element).add($target)));
403
+ }
404
+
405
+ $target.addClass('is-active').attr({ 'aria-hidden': false });
406
+
407
+ if (this.options.submenuToggle) {
408
+ $target.prev('.submenu-toggle').attr({ 'aria-expanded': true });
409
+ } else {
410
+ $target.parent('.is-accordion-submenu-parent').attr({ 'aria-expanded': true });
411
+ }
412
+
413
+ $target.slideDown(_this.options.slideSpeed, function () {
414
+ /**
415
+ * Fires when the menu is done opening.
416
+ * @event AccordionMenu#down
417
+ */
418
+ _this.$element.trigger('down.zf.accordionMenu', [$target]);
419
+ });
420
+ }
421
+
422
+ /**
423
+ * Closes the sub-menu defined by `$target`. All sub-menus inside the target will be closed as well.
424
+ * @param {jQuery} $target - Sub-menu to close.
425
+ * @fires AccordionMenu#up
426
+ */
427
+
428
+ }, {
429
+ key: 'up',
430
+ value: function up($target) {
431
+ var _this = this;
432
+ $target.slideUp(_this.options.slideSpeed, function () {
433
+ /**
434
+ * Fires when the menu is done collapsing up.
435
+ * @event AccordionMenu#up
436
+ */
437
+ _this.$element.trigger('up.zf.accordionMenu', [$target]);
438
+ });
439
+
440
+ var $menus = $target.find('[data-submenu]').slideUp(0).addBack().attr('aria-hidden', true);
441
+
442
+ if (this.options.submenuToggle) {
443
+ $menus.prev('.submenu-toggle').attr('aria-expanded', false);
444
+ } else {
445
+ $menus.parent('.is-accordion-submenu-parent').attr('aria-expanded', false);
446
+ }
447
+ }
448
+
449
+ /**
450
+ * Destroys an instance of accordion menu.
451
+ * @fires AccordionMenu#destroyed
452
+ */
453
+
454
+ }, {
455
+ key: '_destroy',
456
+ value: function _destroy() {
457
+ this.$element.find('[data-submenu]').slideDown(0).css('display', '');
458
+ this.$element.find('a').off('click.zf.accordionMenu');
459
+
460
+ if (this.options.submenuToggle) {
461
+ this.$element.find('.has-submenu-toggle').removeClass('has-submenu-toggle');
462
+ this.$element.find('.submenu-toggle').remove();
463
+ }
464
+
465
+ __WEBPACK_IMPORTED_MODULE_2__foundation_util_nest__["Nest"].Burn(this.$element, 'accordion');
466
+ }
467
+ }]);
468
+
469
+ return AccordionMenu;
470
+ }(__WEBPACK_IMPORTED_MODULE_4__foundation_plugin__["Plugin"]);
471
+
472
+ AccordionMenu.defaults = {
473
+ /**
474
+ * Amount of time to animate the opening of a submenu in ms.
475
+ * @option
476
+ * @type {number}
477
+ * @default 250
478
+ */
479
+ slideSpeed: 250,
480
+ /**
481
+ * Adds a separate submenu toggle button. This allows the parent item to have a link.
482
+ * @option
483
+ * @example true
484
+ */
485
+ submenuToggle: false,
486
+ /**
487
+ * The text used for the submenu toggle if enabled. This is used for screen readers only.
488
+ * @option
489
+ * @example true
490
+ */
491
+ submenuToggleText: 'Toggle menu',
492
+ /**
493
+ * Allow the menu to have multiple open panes.
494
+ * @option
495
+ * @type {boolean}
496
+ * @default true
497
+ */
498
+ multiOpen: true
499
+ };
500
+
501
+
502
+
503
+ /***/ }),
504
+
505
+ /***/ 5:
506
+ /***/ (function(module, exports) {
507
+
508
+ module.exports = {Keyboard: window.Foundation.Keyboard};
509
+
510
+ /***/ }),
511
+
512
+ /***/ 81:
513
+ /***/ (function(module, exports, __webpack_require__) {
514
+
515
+ module.exports = __webpack_require__(15);
516
+
517
+
518
+ /***/ }),
519
+
520
+ /***/ 9:
521
+ /***/ (function(module, exports) {
522
+
523
+ module.exports = {Nest: window.Foundation.Nest};
524
+
525
+ /***/ })
526
+
527
+ /******/ });