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 = 97);
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
+ /***/ 10:
86
+ /***/ (function(module, exports) {
87
+
88
+ module.exports = {onImagesLoaded: window.Foundation.onImagesLoaded};
89
+
90
+ /***/ }),
91
+
92
+ /***/ 2:
93
+ /***/ (function(module, exports) {
94
+
95
+ module.exports = {Plugin: window.Foundation.Plugin};
96
+
97
+ /***/ }),
98
+
99
+ /***/ 31:
100
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
101
+
102
+ "use strict";
103
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
104
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
105
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
106
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_tabs__ = __webpack_require__(61);
107
+
108
+
109
+
110
+ __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_tabs__["a" /* Tabs */], 'Tabs');
111
+
112
+ /***/ }),
113
+
114
+ /***/ 5:
115
+ /***/ (function(module, exports) {
116
+
117
+ module.exports = {Keyboard: window.Foundation.Keyboard};
118
+
119
+ /***/ }),
120
+
121
+ /***/ 61:
122
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
123
+
124
+ "use strict";
125
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Tabs; });
126
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
127
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
128
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(5);
129
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__);
130
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_imageLoader__ = __webpack_require__(10);
131
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_imageLoader___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_imageLoader__);
132
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_plugin__ = __webpack_require__(2);
133
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__foundation_plugin__);
134
+
135
+
136
+ 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; }; }();
137
+
138
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
139
+
140
+ 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; }
141
+
142
+ 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; }
143
+
144
+
145
+
146
+
147
+
148
+ /**
149
+ * Tabs module.
150
+ * @module foundation.tabs
151
+ * @requires foundation.util.keyboard
152
+ * @requires foundation.util.imageLoader if tabs contain images
153
+ */
154
+
155
+ var Tabs = function (_Plugin) {
156
+ _inherits(Tabs, _Plugin);
157
+
158
+ function Tabs() {
159
+ _classCallCheck(this, Tabs);
160
+
161
+ return _possibleConstructorReturn(this, (Tabs.__proto__ || Object.getPrototypeOf(Tabs)).apply(this, arguments));
162
+ }
163
+
164
+ _createClass(Tabs, [{
165
+ key: '_setup',
166
+
167
+ /**
168
+ * Creates a new instance of tabs.
169
+ * @class
170
+ * @name Tabs
171
+ * @fires Tabs#init
172
+ * @param {jQuery} element - jQuery object to make into tabs.
173
+ * @param {Object} options - Overrides to the default plugin settings.
174
+ */
175
+ value: function _setup(element, options) {
176
+ this.$element = element;
177
+ this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Tabs.defaults, this.$element.data(), options);
178
+ this.className = 'Tabs'; // ie9 back compat
179
+
180
+ this._init();
181
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].register('Tabs', {
182
+ 'ENTER': 'open',
183
+ 'SPACE': 'open',
184
+ 'ARROW_RIGHT': 'next',
185
+ 'ARROW_UP': 'previous',
186
+ 'ARROW_DOWN': 'next',
187
+ 'ARROW_LEFT': 'previous'
188
+ // 'TAB': 'next',
189
+ // 'SHIFT_TAB': 'previous'
190
+ });
191
+ }
192
+
193
+ /**
194
+ * Initializes the tabs by showing and focusing (if autoFocus=true) the preset active tab.
195
+ * @private
196
+ */
197
+
198
+ }, {
199
+ key: '_init',
200
+ value: function _init() {
201
+ var _this3 = this;
202
+
203
+ var _this = this;
204
+
205
+ this.$element.attr({ 'role': 'tablist' });
206
+ this.$tabTitles = this.$element.find('.' + this.options.linkClass);
207
+ this.$tabContent = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-tabs-content="' + this.$element[0].id + '"]');
208
+
209
+ this.$tabTitles.each(function () {
210
+ var $elem = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
211
+ $link = $elem.find('a'),
212
+ isActive = $elem.hasClass('' + _this.options.linkActiveClass),
213
+ hash = $link.attr('data-tabs-target') || $link[0].hash.slice(1),
214
+ linkId = $link[0].id ? $link[0].id : hash + '-label',
215
+ $tabContent = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + hash);
216
+
217
+ $elem.attr({ 'role': 'presentation' });
218
+
219
+ $link.attr({
220
+ 'role': 'tab',
221
+ 'aria-controls': hash,
222
+ 'aria-selected': isActive,
223
+ 'id': linkId,
224
+ 'tabindex': isActive ? '0' : '-1'
225
+ });
226
+
227
+ $tabContent.attr({
228
+ 'role': 'tabpanel',
229
+ 'aria-labelledby': linkId
230
+ });
231
+
232
+ if (!isActive) {
233
+ $tabContent.attr('aria-hidden', 'true');
234
+ }
235
+
236
+ if (isActive && _this.options.autoFocus) {
237
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).load(function () {
238
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()('html, body').animate({ scrollTop: $elem.offset().top }, _this.options.deepLinkSmudgeDelay, function () {
239
+ $link.focus();
240
+ });
241
+ });
242
+ }
243
+ });
244
+ if (this.options.matchHeight) {
245
+ var $images = this.$tabContent.find('img');
246
+
247
+ if ($images.length) {
248
+ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__foundation_util_imageLoader__["onImagesLoaded"])($images, this._setHeight.bind(this));
249
+ } else {
250
+ this._setHeight();
251
+ }
252
+ }
253
+
254
+ //current context-bound function to open tabs on page load or history popstate
255
+ this._checkDeepLink = function () {
256
+ var anchor = window.location.hash;
257
+ //need a hash and a relevant anchor in this tabset
258
+ if (anchor.length) {
259
+ var $link = _this3.$element.find('[href$="' + anchor + '"]');
260
+ if ($link.length) {
261
+ _this3.selectTab(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(anchor), true);
262
+
263
+ //roll up a little to show the titles
264
+ if (_this3.options.deepLinkSmudge) {
265
+ var offset = _this3.$element.offset();
266
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()('html, body').animate({ scrollTop: offset.top }, _this3.options.deepLinkSmudgeDelay);
267
+ }
268
+
269
+ /**
270
+ * Fires when the zplugin has deeplinked at pageload
271
+ * @event Tabs#deeplink
272
+ */
273
+ _this3.$element.trigger('deeplink.zf.tabs', [$link, __WEBPACK_IMPORTED_MODULE_0_jquery___default()(anchor)]);
274
+ }
275
+ }
276
+ };
277
+
278
+ //use browser to open a tab, if it exists in this tabset
279
+ if (this.options.deepLink) {
280
+ this._checkDeepLink();
281
+ }
282
+
283
+ this._events();
284
+ }
285
+
286
+ /**
287
+ * Adds event handlers for items within the tabs.
288
+ * @private
289
+ */
290
+
291
+ }, {
292
+ key: '_events',
293
+ value: function _events() {
294
+ this._addKeyHandler();
295
+ this._addClickHandler();
296
+ this._setHeightMqHandler = null;
297
+
298
+ if (this.options.matchHeight) {
299
+ this._setHeightMqHandler = this._setHeight.bind(this);
300
+
301
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).on('changed.zf.mediaquery', this._setHeightMqHandler);
302
+ }
303
+
304
+ if (this.options.deepLink) {
305
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).on('popstate', this._checkDeepLink);
306
+ }
307
+ }
308
+
309
+ /**
310
+ * Adds click handlers for items within the tabs.
311
+ * @private
312
+ */
313
+
314
+ }, {
315
+ key: '_addClickHandler',
316
+ value: function _addClickHandler() {
317
+ var _this = this;
318
+
319
+ this.$element.off('click.zf.tabs').on('click.zf.tabs', '.' + this.options.linkClass, function (e) {
320
+ e.preventDefault();
321
+ e.stopPropagation();
322
+ _this._handleTabChange(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this));
323
+ });
324
+ }
325
+
326
+ /**
327
+ * Adds keyboard event handlers for items within the tabs.
328
+ * @private
329
+ */
330
+
331
+ }, {
332
+ key: '_addKeyHandler',
333
+ value: function _addKeyHandler() {
334
+ var _this = this;
335
+
336
+ this.$tabTitles.off('keydown.zf.tabs').on('keydown.zf.tabs', function (e) {
337
+ if (e.which === 9) return;
338
+
339
+ var $element = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
340
+ $elements = $element.parent('ul').children('li'),
341
+ $prevElement,
342
+ $nextElement;
343
+
344
+ $elements.each(function (i) {
345
+ if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).is($element)) {
346
+ if (_this.options.wrapOnKeys) {
347
+ $prevElement = i === 0 ? $elements.last() : $elements.eq(i - 1);
348
+ $nextElement = i === $elements.length - 1 ? $elements.first() : $elements.eq(i + 1);
349
+ } else {
350
+ $prevElement = $elements.eq(Math.max(0, i - 1));
351
+ $nextElement = $elements.eq(Math.min(i + 1, $elements.length - 1));
352
+ }
353
+ return;
354
+ }
355
+ });
356
+
357
+ // handle keyboard event with keyboard util
358
+ __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].handleKey(e, 'Tabs', {
359
+ open: function () {
360
+ $element.find('[role="tab"]').focus();
361
+ _this._handleTabChange($element);
362
+ },
363
+ previous: function () {
364
+ $prevElement.find('[role="tab"]').focus();
365
+ _this._handleTabChange($prevElement);
366
+ },
367
+ next: function () {
368
+ $nextElement.find('[role="tab"]').focus();
369
+ _this._handleTabChange($nextElement);
370
+ },
371
+ handled: function () {
372
+ e.stopPropagation();
373
+ e.preventDefault();
374
+ }
375
+ });
376
+ });
377
+ }
378
+
379
+ /**
380
+ * Opens the tab `$targetContent` defined by `$target`. Collapses active tab.
381
+ * @param {jQuery} $target - Tab to open.
382
+ * @param {boolean} historyHandled - browser has already handled a history update
383
+ * @fires Tabs#change
384
+ * @function
385
+ */
386
+
387
+ }, {
388
+ key: '_handleTabChange',
389
+ value: function _handleTabChange($target, historyHandled) {
390
+
391
+ /**
392
+ * Check for active class on target. Collapse if exists.
393
+ */
394
+ if ($target.hasClass('' + this.options.linkActiveClass)) {
395
+ if (this.options.activeCollapse) {
396
+ this._collapseTab($target);
397
+
398
+ /**
399
+ * Fires when the zplugin has successfully collapsed tabs.
400
+ * @event Tabs#collapse
401
+ */
402
+ this.$element.trigger('collapse.zf.tabs', [$target]);
403
+ }
404
+ return;
405
+ }
406
+
407
+ var $oldTab = this.$element.find('.' + this.options.linkClass + '.' + this.options.linkActiveClass),
408
+ $tabLink = $target.find('[role="tab"]'),
409
+ hash = $tabLink.attr('data-tabs-target') || $tabLink[0].hash.slice(1),
410
+ $targetContent = this.$tabContent.find('#' + hash);
411
+
412
+ //close old tab
413
+ this._collapseTab($oldTab);
414
+
415
+ //open new tab
416
+ this._openTab($target);
417
+
418
+ //either replace or update browser history
419
+ if (this.options.deepLink && !historyHandled) {
420
+ var anchor = $target.find('a').attr('href');
421
+
422
+ if (this.options.updateHistory) {
423
+ history.pushState({}, '', anchor);
424
+ } else {
425
+ history.replaceState({}, '', anchor);
426
+ }
427
+ }
428
+
429
+ /**
430
+ * Fires when the plugin has successfully changed tabs.
431
+ * @event Tabs#change
432
+ */
433
+ this.$element.trigger('change.zf.tabs', [$target, $targetContent]);
434
+
435
+ //fire to children a mutation event
436
+ $targetContent.find("[data-mutate]").trigger("mutateme.zf.trigger");
437
+ }
438
+
439
+ /**
440
+ * Opens the tab `$targetContent` defined by `$target`.
441
+ * @param {jQuery} $target - Tab to Open.
442
+ * @function
443
+ */
444
+
445
+ }, {
446
+ key: '_openTab',
447
+ value: function _openTab($target) {
448
+ var $tabLink = $target.find('[role="tab"]'),
449
+ hash = $tabLink.attr('data-tabs-target') || $tabLink[0].hash.slice(1),
450
+ $targetContent = this.$tabContent.find('#' + hash);
451
+
452
+ $target.addClass('' + this.options.linkActiveClass);
453
+
454
+ $tabLink.attr({
455
+ 'aria-selected': 'true',
456
+ 'tabindex': '0'
457
+ });
458
+
459
+ $targetContent.addClass('' + this.options.panelActiveClass).removeAttr('aria-hidden');
460
+ }
461
+
462
+ /**
463
+ * Collapses `$targetContent` defined by `$target`.
464
+ * @param {jQuery} $target - Tab to Open.
465
+ * @function
466
+ */
467
+
468
+ }, {
469
+ key: '_collapseTab',
470
+ value: function _collapseTab($target) {
471
+ var $target_anchor = $target.removeClass('' + this.options.linkActiveClass).find('[role="tab"]').attr({
472
+ 'aria-selected': 'false',
473
+ 'tabindex': -1
474
+ });
475
+
476
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + $target_anchor.attr('aria-controls')).removeClass('' + this.options.panelActiveClass).attr({ 'aria-hidden': 'true' });
477
+ }
478
+
479
+ /**
480
+ * Public method for selecting a content pane to display.
481
+ * @param {jQuery | String} elem - jQuery object or string of the id of the pane to display.
482
+ * @param {boolean} historyHandled - browser has already handled a history update
483
+ * @function
484
+ */
485
+
486
+ }, {
487
+ key: 'selectTab',
488
+ value: function selectTab(elem, historyHandled) {
489
+ var idStr;
490
+
491
+ if (typeof elem === 'object') {
492
+ idStr = elem[0].id;
493
+ } else {
494
+ idStr = elem;
495
+ }
496
+
497
+ if (idStr.indexOf('#') < 0) {
498
+ idStr = '#' + idStr;
499
+ }
500
+
501
+ var $target = this.$tabTitles.find('[href$="' + idStr + '"]').parent('.' + this.options.linkClass);
502
+
503
+ this._handleTabChange($target, historyHandled);
504
+ }
505
+ }, {
506
+ key: '_setHeight',
507
+
508
+ /**
509
+ * Sets the height of each panel to the height of the tallest panel.
510
+ * If enabled in options, gets called on media query change.
511
+ * If loading content via external source, can be called directly or with _reflow.
512
+ * If enabled with `data-match-height="true"`, tabs sets to equal height
513
+ * @function
514
+ * @private
515
+ */
516
+ value: function _setHeight() {
517
+ var max = 0,
518
+ _this = this; // Lock down the `this` value for the root tabs object
519
+
520
+ this.$tabContent.find('.' + this.options.panelClass).css('height', '').each(function () {
521
+
522
+ var panel = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this),
523
+ isActive = panel.hasClass('' + _this.options.panelActiveClass); // get the options from the parent instead of trying to get them from the child
524
+
525
+ if (!isActive) {
526
+ panel.css({ 'visibility': 'hidden', 'display': 'block' });
527
+ }
528
+
529
+ var temp = this.getBoundingClientRect().height;
530
+
531
+ if (!isActive) {
532
+ panel.css({
533
+ 'visibility': '',
534
+ 'display': ''
535
+ });
536
+ }
537
+
538
+ max = temp > max ? temp : max;
539
+ }).css('height', max + 'px');
540
+ }
541
+
542
+ /**
543
+ * Destroys an instance of an tabs.
544
+ * @fires Tabs#destroyed
545
+ */
546
+
547
+ }, {
548
+ key: '_destroy',
549
+ value: function _destroy() {
550
+ this.$element.find('.' + this.options.linkClass).off('.zf.tabs').hide().end().find('.' + this.options.panelClass).hide();
551
+
552
+ if (this.options.matchHeight) {
553
+ if (this._setHeightMqHandler != null) {
554
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off('changed.zf.mediaquery', this._setHeightMqHandler);
555
+ }
556
+ }
557
+
558
+ if (this.options.deepLink) {
559
+ __WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off('popstate', this._checkDeepLink);
560
+ }
561
+ }
562
+ }]);
563
+
564
+ return Tabs;
565
+ }(__WEBPACK_IMPORTED_MODULE_3__foundation_plugin__["Plugin"]);
566
+
567
+ Tabs.defaults = {
568
+ /**
569
+ * Allows the window to scroll to content of pane specified by hash anchor
570
+ * @option
571
+ * @type {boolean}
572
+ * @default false
573
+ */
574
+ deepLink: false,
575
+
576
+ /**
577
+ * Adjust the deep link scroll to make sure the top of the tab panel is visible
578
+ * @option
579
+ * @type {boolean}
580
+ * @default false
581
+ */
582
+ deepLinkSmudge: false,
583
+
584
+ /**
585
+ * Animation time (ms) for the deep link adjustment
586
+ * @option
587
+ * @type {number}
588
+ * @default 300
589
+ */
590
+ deepLinkSmudgeDelay: 300,
591
+
592
+ /**
593
+ * Update the browser history with the open tab
594
+ * @option
595
+ * @type {boolean}
596
+ * @default false
597
+ */
598
+ updateHistory: false,
599
+
600
+ /**
601
+ * Allows the window to scroll to content of active pane on load if set to true.
602
+ * Not recommended if more than one tab panel per page.
603
+ * @option
604
+ * @type {boolean}
605
+ * @default false
606
+ */
607
+ autoFocus: false,
608
+
609
+ /**
610
+ * Allows keyboard input to 'wrap' around the tab links.
611
+ * @option
612
+ * @type {boolean}
613
+ * @default true
614
+ */
615
+ wrapOnKeys: true,
616
+
617
+ /**
618
+ * Allows the tab content panes to match heights if set to true.
619
+ * @option
620
+ * @type {boolean}
621
+ * @default false
622
+ */
623
+ matchHeight: false,
624
+
625
+ /**
626
+ * Allows active tabs to collapse when clicked.
627
+ * @option
628
+ * @type {boolean}
629
+ * @default false
630
+ */
631
+ activeCollapse: false,
632
+
633
+ /**
634
+ * Class applied to `li`'s in tab link list.
635
+ * @option
636
+ * @type {string}
637
+ * @default 'tabs-title'
638
+ */
639
+ linkClass: 'tabs-title',
640
+
641
+ /**
642
+ * Class applied to the active `li` in tab link list.
643
+ * @option
644
+ * @type {string}
645
+ * @default 'is-active'
646
+ */
647
+ linkActiveClass: 'is-active',
648
+
649
+ /**
650
+ * Class applied to the content containers.
651
+ * @option
652
+ * @type {string}
653
+ * @default 'tabs-panel'
654
+ */
655
+ panelClass: 'tabs-panel',
656
+
657
+ /**
658
+ * Class applied to the active content container.
659
+ * @option
660
+ * @type {string}
661
+ * @default 'is-active'
662
+ */
663
+ panelActiveClass: 'is-active'
664
+ };
665
+
666
+
667
+
668
+ /***/ }),
669
+
670
+ /***/ 97:
671
+ /***/ (function(module, exports, __webpack_require__) {
672
+
673
+ module.exports = __webpack_require__(31);
674
+
675
+
676
+ /***/ })
677
+
678
+ /******/ });