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.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/Rakefile +5 -6
- data/lib/foundation/rails/version.rb +1 -1
- data/vendor/assets/js/foundation.abide.js +781 -0
- data/vendor/assets/js/foundation.accordion.js +511 -0
- data/vendor/assets/js/foundation.accordionMenu.js +527 -0
- data/vendor/assets/js/foundation.core.js +860 -0
- data/vendor/assets/js/foundation.drilldown.js +759 -0
- data/vendor/assets/js/foundation.dropdown.js +1131 -0
- data/vendor/assets/js/foundation.dropdownMenu.js +678 -0
- data/vendor/assets/js/foundation.equalizer.js +542 -0
- data/vendor/assets/js/foundation.interchange.js +399 -0
- data/vendor/assets/js/{foundation.js.es6 → foundation.js} +11 -12
- data/vendor/assets/js/foundation.magellan.js +449 -0
- data/vendor/assets/js/foundation.offcanvas.js +1052 -0
- data/vendor/assets/js/foundation.orbit.js +767 -0
- data/vendor/assets/js/foundation.responsiveAccordionTabs.js +440 -0
- data/vendor/assets/js/foundation.responsiveMenu.js +362 -0
- data/vendor/assets/js/foundation.responsiveToggle.js +336 -0
- data/vendor/assets/js/foundation.reveal.js +1066 -0
- data/vendor/assets/js/foundation.slider.js +1236 -0
- data/vendor/assets/js/foundation.smoothScroll.js +303 -0
- data/vendor/assets/js/foundation.sticky.js +1001 -0
- data/vendor/assets/js/foundation.tabs.js +678 -0
- data/vendor/assets/js/foundation.toggler.js +602 -0
- data/vendor/assets/js/foundation.tooltip.js +1195 -0
- data/vendor/assets/js/{foundation.util.box.js.es6 → foundation.util.box.js} +154 -41
- data/vendor/assets/js/foundation.util.imageLoader.js +163 -0
- data/vendor/assets/js/foundation.util.keyboard.js +298 -0
- data/vendor/assets/js/foundation.util.mediaQuery.js +353 -0
- data/vendor/assets/js/foundation.util.motion.js +231 -0
- data/vendor/assets/js/foundation.util.nest.js +181 -0
- data/vendor/assets/js/foundation.util.timer.js +170 -0
- data/vendor/assets/js/foundation.util.timerAndImageLoader.js +90 -0
- data/vendor/assets/js/foundation.util.touch.js +275 -0
- data/vendor/assets/js/foundation.util.triggers.js +399 -0
- data/vendor/assets/js/foundation.zf.responsiveAccordionTabs.js +262 -0
- metadata +37 -71
- data/vendor/assets/js/entries/foundation-plugins.js +0 -25
- data/vendor/assets/js/entries/foundation.js +0 -101
- data/vendor/assets/js/entries/plugins/foundation.abide.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.accordion.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.accordionMenu.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.core.js +0 -21
- data/vendor/assets/js/entries/plugins/foundation.drilldown.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.dropdown.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.dropdownMenu.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.equalizer.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.interchange.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.magellan.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.offcanvas.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.orbit.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.responsiveAccordionTabs.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.responsiveMenu.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.responsiveToggle.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.reveal.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.slider.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.smoothScroll.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.sticky.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.tabs.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.toggler.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.tooltip.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.util.box.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.util.imageLoader.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.util.keyboard.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.util.mediaQuery.js +0 -4
- data/vendor/assets/js/entries/plugins/foundation.util.motion.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.util.nest.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.util.timer.js +0 -5
- data/vendor/assets/js/entries/plugins/foundation.util.touch.js +0 -7
- data/vendor/assets/js/entries/plugins/foundation.util.triggers.js +0 -5
- data/vendor/assets/js/foundation.abide.js.es6 +0 -587
- data/vendor/assets/js/foundation.accordion.js.es6 +0 -329
- data/vendor/assets/js/foundation.accordionMenu.js.es6 +0 -328
- data/vendor/assets/js/foundation.core.js.es6 +0 -337
- data/vendor/assets/js/foundation.drilldown.js.es6 +0 -536
- data/vendor/assets/js/foundation.dropdown.js.es6 +0 -394
- data/vendor/assets/js/foundation.dropdownMenu.js.es6 +0 -458
- data/vendor/assets/js/foundation.equalizer.js.es6 +0 -318
- data/vendor/assets/js/foundation.interchange.js.es6 +0 -210
- data/vendor/assets/js/foundation.magellan.js.es6 +0 -257
- data/vendor/assets/js/foundation.offcanvas.js.es6 +0 -546
- data/vendor/assets/js/foundation.orbit.js.es6 +0 -531
- data/vendor/assets/js/foundation.plugin.js.es6 +0 -54
- data/vendor/assets/js/foundation.positionable.js.es6 +0 -206
- data/vendor/assets/js/foundation.responsiveAccordionTabs.js.es6 +0 -243
- data/vendor/assets/js/foundation.responsiveMenu.js.es6 +0 -155
- data/vendor/assets/js/foundation.responsiveToggle.js.es6 +0 -156
- data/vendor/assets/js/foundation.reveal.js.es6 +0 -585
- data/vendor/assets/js/foundation.slider.js.es6 +0 -712
- data/vendor/assets/js/foundation.smoothScroll.js.es6 +0 -135
- data/vendor/assets/js/foundation.sticky.js.es6 +0 -507
- data/vendor/assets/js/foundation.tabs.js.es6 +0 -498
- data/vendor/assets/js/foundation.toggler.js.es6 +0 -150
- data/vendor/assets/js/foundation.tooltip.js.es6 +0 -462
- data/vendor/assets/js/foundation.util.core.js.es6 +0 -52
- data/vendor/assets/js/foundation.util.imageLoader.js.es6 +0 -45
- data/vendor/assets/js/foundation.util.keyboard.js.es6 +0 -162
- data/vendor/assets/js/foundation.util.mediaQuery.js.es6 +0 -234
- data/vendor/assets/js/foundation.util.motion.js.es6 +0 -104
- data/vendor/assets/js/foundation.util.nest.js.es6 +0 -67
- data/vendor/assets/js/foundation.util.timer.js.es6 +0 -48
- data/vendor/assets/js/foundation.util.touch.js.es6 +0 -149
- data/vendor/assets/js/foundation.util.triggers.js.es6 +0 -268
@@ -0,0 +1,767 @@
|
|
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 = 89);
|
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
|
+
/***/ 12:
|
93
|
+
/***/ (function(module, exports) {
|
94
|
+
|
95
|
+
module.exports = {Touch: window.Foundation.Touch};
|
96
|
+
|
97
|
+
/***/ }),
|
98
|
+
|
99
|
+
/***/ 2:
|
100
|
+
/***/ (function(module, exports) {
|
101
|
+
|
102
|
+
module.exports = {Plugin: window.Foundation.Plugin};
|
103
|
+
|
104
|
+
/***/ }),
|
105
|
+
|
106
|
+
/***/ 23:
|
107
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
108
|
+
|
109
|
+
"use strict";
|
110
|
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
111
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
|
112
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
|
113
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_orbit__ = __webpack_require__(53);
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
__WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"].plugin(__WEBPACK_IMPORTED_MODULE_1__foundation_orbit__["a" /* Orbit */], 'Orbit');
|
118
|
+
|
119
|
+
/***/ }),
|
120
|
+
|
121
|
+
/***/ 3:
|
122
|
+
/***/ (function(module, exports) {
|
123
|
+
|
124
|
+
module.exports = {rtl: window.Foundation.rtl, GetYoDigits: window.Foundation.GetYoDigits, transitionend: window.Foundation.transitionend};
|
125
|
+
|
126
|
+
/***/ }),
|
127
|
+
|
128
|
+
/***/ 4:
|
129
|
+
/***/ (function(module, exports) {
|
130
|
+
|
131
|
+
module.exports = {Motion: window.Foundation.Motion, Move: window.Foundation.Move};
|
132
|
+
|
133
|
+
/***/ }),
|
134
|
+
|
135
|
+
/***/ 5:
|
136
|
+
/***/ (function(module, exports) {
|
137
|
+
|
138
|
+
module.exports = {Keyboard: window.Foundation.Keyboard};
|
139
|
+
|
140
|
+
/***/ }),
|
141
|
+
|
142
|
+
/***/ 53:
|
143
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
144
|
+
|
145
|
+
"use strict";
|
146
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Orbit; });
|
147
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
|
148
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
|
149
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__ = __webpack_require__(5);
|
150
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__);
|
151
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_motion__ = __webpack_require__(4);
|
152
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_motion___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__foundation_util_motion__);
|
153
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_timer__ = __webpack_require__(78);
|
154
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__foundation_util_timer___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__foundation_util_timer__);
|
155
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_util_imageLoader__ = __webpack_require__(10);
|
156
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__foundation_util_imageLoader___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4__foundation_util_imageLoader__);
|
157
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__foundation_util_core__ = __webpack_require__(3);
|
158
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__foundation_util_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__foundation_util_core__);
|
159
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__foundation_plugin__ = __webpack_require__(2);
|
160
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__foundation_plugin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__foundation_plugin__);
|
161
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__foundation_util_touch__ = __webpack_require__(12);
|
162
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__foundation_util_touch___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__foundation_util_touch__);
|
163
|
+
|
164
|
+
|
165
|
+
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; }; }();
|
166
|
+
|
167
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
168
|
+
|
169
|
+
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; }
|
170
|
+
|
171
|
+
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; }
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
/**
|
183
|
+
* Orbit module.
|
184
|
+
* @module foundation.orbit
|
185
|
+
* @requires foundation.util.keyboard
|
186
|
+
* @requires foundation.util.motion
|
187
|
+
* @requires foundation.util.timer
|
188
|
+
* @requires foundation.util.imageLoader
|
189
|
+
* @requires foundation.util.touch
|
190
|
+
*/
|
191
|
+
|
192
|
+
var Orbit = function (_Plugin) {
|
193
|
+
_inherits(Orbit, _Plugin);
|
194
|
+
|
195
|
+
function Orbit() {
|
196
|
+
_classCallCheck(this, Orbit);
|
197
|
+
|
198
|
+
return _possibleConstructorReturn(this, (Orbit.__proto__ || Object.getPrototypeOf(Orbit)).apply(this, arguments));
|
199
|
+
}
|
200
|
+
|
201
|
+
_createClass(Orbit, [{
|
202
|
+
key: '_setup',
|
203
|
+
|
204
|
+
/**
|
205
|
+
* Creates a new instance of an orbit carousel.
|
206
|
+
* @class
|
207
|
+
* @name Orbit
|
208
|
+
* @param {jQuery} element - jQuery object to make into an Orbit Carousel.
|
209
|
+
* @param {Object} options - Overrides to the default plugin settings.
|
210
|
+
*/
|
211
|
+
value: function _setup(element, options) {
|
212
|
+
this.$element = element;
|
213
|
+
this.options = __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.extend({}, Orbit.defaults, this.$element.data(), options);
|
214
|
+
this.className = 'Orbit'; // ie9 back compat
|
215
|
+
|
216
|
+
__WEBPACK_IMPORTED_MODULE_7__foundation_util_touch__["Touch"].init(__WEBPACK_IMPORTED_MODULE_0_jquery___default.a); // Touch init is idempotent, we just need to make sure it's initialied.
|
217
|
+
|
218
|
+
this._init();
|
219
|
+
|
220
|
+
__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].register('Orbit', {
|
221
|
+
'ltr': {
|
222
|
+
'ARROW_RIGHT': 'next',
|
223
|
+
'ARROW_LEFT': 'previous'
|
224
|
+
},
|
225
|
+
'rtl': {
|
226
|
+
'ARROW_LEFT': 'next',
|
227
|
+
'ARROW_RIGHT': 'previous'
|
228
|
+
}
|
229
|
+
});
|
230
|
+
}
|
231
|
+
|
232
|
+
/**
|
233
|
+
* Initializes the plugin by creating jQuery collections, setting attributes, and starting the animation.
|
234
|
+
* @function
|
235
|
+
* @private
|
236
|
+
*/
|
237
|
+
|
238
|
+
}, {
|
239
|
+
key: '_init',
|
240
|
+
value: function _init() {
|
241
|
+
// @TODO: consider discussion on PR #9278 about DOM pollution by changeSlide
|
242
|
+
this._reset();
|
243
|
+
|
244
|
+
this.$wrapper = this.$element.find('.' + this.options.containerClass);
|
245
|
+
this.$slides = this.$element.find('.' + this.options.slideClass);
|
246
|
+
|
247
|
+
var $images = this.$element.find('img'),
|
248
|
+
initActive = this.$slides.filter('.is-active'),
|
249
|
+
id = this.$element[0].id || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__foundation_util_core__["GetYoDigits"])(6, 'orbit');
|
250
|
+
|
251
|
+
this.$element.attr({
|
252
|
+
'data-resize': id,
|
253
|
+
'id': id
|
254
|
+
});
|
255
|
+
|
256
|
+
if (!initActive.length) {
|
257
|
+
this.$slides.eq(0).addClass('is-active');
|
258
|
+
}
|
259
|
+
|
260
|
+
if (!this.options.useMUI) {
|
261
|
+
this.$slides.addClass('no-motionui');
|
262
|
+
}
|
263
|
+
|
264
|
+
if ($images.length) {
|
265
|
+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_4__foundation_util_imageLoader__["onImagesLoaded"])($images, this._prepareForOrbit.bind(this));
|
266
|
+
} else {
|
267
|
+
this._prepareForOrbit(); //hehe
|
268
|
+
}
|
269
|
+
|
270
|
+
if (this.options.bullets) {
|
271
|
+
this._loadBullets();
|
272
|
+
}
|
273
|
+
|
274
|
+
this._events();
|
275
|
+
|
276
|
+
if (this.options.autoPlay && this.$slides.length > 1) {
|
277
|
+
this.geoSync();
|
278
|
+
}
|
279
|
+
|
280
|
+
if (this.options.accessible) {
|
281
|
+
// allow wrapper to be focusable to enable arrow navigation
|
282
|
+
this.$wrapper.attr('tabindex', 0);
|
283
|
+
}
|
284
|
+
}
|
285
|
+
|
286
|
+
/**
|
287
|
+
* Creates a jQuery collection of bullets, if they are being used.
|
288
|
+
* @function
|
289
|
+
* @private
|
290
|
+
*/
|
291
|
+
|
292
|
+
}, {
|
293
|
+
key: '_loadBullets',
|
294
|
+
value: function _loadBullets() {
|
295
|
+
this.$bullets = this.$element.find('.' + this.options.boxOfBullets).find('button');
|
296
|
+
}
|
297
|
+
|
298
|
+
/**
|
299
|
+
* Sets a `timer` object on the orbit, and starts the counter for the next slide.
|
300
|
+
* @function
|
301
|
+
*/
|
302
|
+
|
303
|
+
}, {
|
304
|
+
key: 'geoSync',
|
305
|
+
value: function geoSync() {
|
306
|
+
var _this = this;
|
307
|
+
this.timer = new __WEBPACK_IMPORTED_MODULE_3__foundation_util_timer__["Timer"](this.$element, {
|
308
|
+
duration: this.options.timerDelay,
|
309
|
+
infinite: false
|
310
|
+
}, function () {
|
311
|
+
_this.changeSlide(true);
|
312
|
+
});
|
313
|
+
this.timer.start();
|
314
|
+
}
|
315
|
+
|
316
|
+
/**
|
317
|
+
* Sets wrapper and slide heights for the orbit.
|
318
|
+
* @function
|
319
|
+
* @private
|
320
|
+
*/
|
321
|
+
|
322
|
+
}, {
|
323
|
+
key: '_prepareForOrbit',
|
324
|
+
value: function _prepareForOrbit() {
|
325
|
+
var _this = this;
|
326
|
+
this._setWrapperHeight();
|
327
|
+
}
|
328
|
+
|
329
|
+
/**
|
330
|
+
* Calulates the height of each slide in the collection, and uses the tallest one for the wrapper height.
|
331
|
+
* @function
|
332
|
+
* @private
|
333
|
+
* @param {Function} cb - a callback function to fire when complete.
|
334
|
+
*/
|
335
|
+
|
336
|
+
}, {
|
337
|
+
key: '_setWrapperHeight',
|
338
|
+
value: function _setWrapperHeight(cb) {
|
339
|
+
//rewrite this to `for` loop
|
340
|
+
var max = 0,
|
341
|
+
temp,
|
342
|
+
counter = 0,
|
343
|
+
_this = this;
|
344
|
+
|
345
|
+
this.$slides.each(function () {
|
346
|
+
temp = this.getBoundingClientRect().height;
|
347
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).attr('data-slide', counter);
|
348
|
+
|
349
|
+
if (_this.$slides.filter('.is-active')[0] !== _this.$slides.eq(counter)[0]) {
|
350
|
+
//if not the active slide, set css position and display property
|
351
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).css({ 'position': 'relative', 'display': 'none' });
|
352
|
+
}
|
353
|
+
max = temp > max ? temp : max;
|
354
|
+
counter++;
|
355
|
+
});
|
356
|
+
|
357
|
+
if (counter === this.$slides.length) {
|
358
|
+
this.$wrapper.css({ 'height': max }); //only change the wrapper height property once.
|
359
|
+
if (cb) {
|
360
|
+
cb(max);
|
361
|
+
} //fire callback with max height dimension.
|
362
|
+
}
|
363
|
+
}
|
364
|
+
|
365
|
+
/**
|
366
|
+
* Sets the max-height of each slide.
|
367
|
+
* @function
|
368
|
+
* @private
|
369
|
+
*/
|
370
|
+
|
371
|
+
}, {
|
372
|
+
key: '_setSlideHeight',
|
373
|
+
value: function _setSlideHeight(height) {
|
374
|
+
this.$slides.each(function () {
|
375
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).css('max-height', height);
|
376
|
+
});
|
377
|
+
}
|
378
|
+
|
379
|
+
/**
|
380
|
+
* Adds event listeners to basically everything within the element.
|
381
|
+
* @function
|
382
|
+
* @private
|
383
|
+
*/
|
384
|
+
|
385
|
+
}, {
|
386
|
+
key: '_events',
|
387
|
+
value: function _events() {
|
388
|
+
var _this = this;
|
389
|
+
|
390
|
+
//***************************************
|
391
|
+
//**Now using custom event - thanks to:**
|
392
|
+
//** Yohai Ararat of Toronto **
|
393
|
+
//***************************************
|
394
|
+
//
|
395
|
+
this.$element.off('.resizeme.zf.trigger').on({
|
396
|
+
'resizeme.zf.trigger': this._prepareForOrbit.bind(this)
|
397
|
+
});
|
398
|
+
if (this.$slides.length > 1) {
|
399
|
+
|
400
|
+
if (this.options.swipe) {
|
401
|
+
this.$slides.off('swipeleft.zf.orbit swiperight.zf.orbit').on('swipeleft.zf.orbit', function (e) {
|
402
|
+
e.preventDefault();
|
403
|
+
_this.changeSlide(true);
|
404
|
+
}).on('swiperight.zf.orbit', function (e) {
|
405
|
+
e.preventDefault();
|
406
|
+
_this.changeSlide(false);
|
407
|
+
});
|
408
|
+
}
|
409
|
+
//***************************************
|
410
|
+
|
411
|
+
if (this.options.autoPlay) {
|
412
|
+
this.$slides.on('click.zf.orbit', function () {
|
413
|
+
_this.$element.data('clickedOn', _this.$element.data('clickedOn') ? false : true);
|
414
|
+
_this.timer[_this.$element.data('clickedOn') ? 'pause' : 'start']();
|
415
|
+
});
|
416
|
+
|
417
|
+
if (this.options.pauseOnHover) {
|
418
|
+
this.$element.on('mouseenter.zf.orbit', function () {
|
419
|
+
_this.timer.pause();
|
420
|
+
}).on('mouseleave.zf.orbit', function () {
|
421
|
+
if (!_this.$element.data('clickedOn')) {
|
422
|
+
_this.timer.start();
|
423
|
+
}
|
424
|
+
});
|
425
|
+
}
|
426
|
+
}
|
427
|
+
|
428
|
+
if (this.options.navButtons) {
|
429
|
+
var $controls = this.$element.find('.' + this.options.nextClass + ', .' + this.options.prevClass);
|
430
|
+
$controls.attr('tabindex', 0)
|
431
|
+
//also need to handle enter/return and spacebar key presses
|
432
|
+
.on('click.zf.orbit touchend.zf.orbit', function (e) {
|
433
|
+
e.preventDefault();
|
434
|
+
_this.changeSlide(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).hasClass(_this.options.nextClass));
|
435
|
+
});
|
436
|
+
}
|
437
|
+
|
438
|
+
if (this.options.bullets) {
|
439
|
+
this.$bullets.on('click.zf.orbit touchend.zf.orbit', function () {
|
440
|
+
if (/is-active/g.test(this.className)) {
|
441
|
+
return false;
|
442
|
+
} //if this is active, kick out of function.
|
443
|
+
var idx = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('slide'),
|
444
|
+
ltr = idx > _this.$slides.filter('.is-active').data('slide'),
|
445
|
+
$slide = _this.$slides.eq(idx);
|
446
|
+
|
447
|
+
_this.changeSlide(ltr, $slide, idx);
|
448
|
+
});
|
449
|
+
}
|
450
|
+
|
451
|
+
if (this.options.accessible) {
|
452
|
+
this.$wrapper.add(this.$bullets).on('keydown.zf.orbit', function (e) {
|
453
|
+
// handle keyboard event with keyboard util
|
454
|
+
__WEBPACK_IMPORTED_MODULE_1__foundation_util_keyboard__["Keyboard"].handleKey(e, 'Orbit', {
|
455
|
+
next: function () {
|
456
|
+
_this.changeSlide(true);
|
457
|
+
},
|
458
|
+
previous: function () {
|
459
|
+
_this.changeSlide(false);
|
460
|
+
},
|
461
|
+
handled: function () {
|
462
|
+
// if bullet is focused, make sure focus moves
|
463
|
+
if (__WEBPACK_IMPORTED_MODULE_0_jquery___default()(e.target).is(_this.$bullets)) {
|
464
|
+
_this.$bullets.filter('.is-active').focus();
|
465
|
+
}
|
466
|
+
}
|
467
|
+
});
|
468
|
+
});
|
469
|
+
}
|
470
|
+
}
|
471
|
+
}
|
472
|
+
|
473
|
+
/**
|
474
|
+
* Resets Orbit so it can be reinitialized
|
475
|
+
*/
|
476
|
+
|
477
|
+
}, {
|
478
|
+
key: '_reset',
|
479
|
+
value: function _reset() {
|
480
|
+
// Don't do anything if there are no slides (first run)
|
481
|
+
if (typeof this.$slides == 'undefined') {
|
482
|
+
return;
|
483
|
+
}
|
484
|
+
|
485
|
+
if (this.$slides.length > 1) {
|
486
|
+
// Remove old events
|
487
|
+
this.$element.off('.zf.orbit').find('*').off('.zf.orbit');
|
488
|
+
|
489
|
+
// Restart timer if autoPlay is enabled
|
490
|
+
if (this.options.autoPlay) {
|
491
|
+
this.timer.restart();
|
492
|
+
}
|
493
|
+
|
494
|
+
// Reset all sliddes
|
495
|
+
this.$slides.each(function (el) {
|
496
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(el).removeClass('is-active is-active is-in').removeAttr('aria-live').hide();
|
497
|
+
});
|
498
|
+
|
499
|
+
// Show the first slide
|
500
|
+
this.$slides.first().addClass('is-active').show();
|
501
|
+
|
502
|
+
// Triggers when the slide has finished animating
|
503
|
+
this.$element.trigger('slidechange.zf.orbit', [this.$slides.first()]);
|
504
|
+
|
505
|
+
// Select first bullet if bullets are present
|
506
|
+
if (this.options.bullets) {
|
507
|
+
this._updateBullets(0);
|
508
|
+
}
|
509
|
+
}
|
510
|
+
}
|
511
|
+
|
512
|
+
/**
|
513
|
+
* Changes the current slide to a new one.
|
514
|
+
* @function
|
515
|
+
* @param {Boolean} isLTR - flag if the slide should move left to right.
|
516
|
+
* @param {jQuery} chosenSlide - the jQuery element of the slide to show next, if one is selected.
|
517
|
+
* @param {Number} idx - the index of the new slide in its collection, if one chosen.
|
518
|
+
* @fires Orbit#slidechange
|
519
|
+
*/
|
520
|
+
|
521
|
+
}, {
|
522
|
+
key: 'changeSlide',
|
523
|
+
value: function changeSlide(isLTR, chosenSlide, idx) {
|
524
|
+
if (!this.$slides) {
|
525
|
+
return;
|
526
|
+
} // Don't freak out if we're in the middle of cleanup
|
527
|
+
var $curSlide = this.$slides.filter('.is-active').eq(0);
|
528
|
+
|
529
|
+
if (/mui/g.test($curSlide[0].className)) {
|
530
|
+
return false;
|
531
|
+
} //if the slide is currently animating, kick out of the function
|
532
|
+
|
533
|
+
var $firstSlide = this.$slides.first(),
|
534
|
+
$lastSlide = this.$slides.last(),
|
535
|
+
dirIn = isLTR ? 'Right' : 'Left',
|
536
|
+
dirOut = isLTR ? 'Left' : 'Right',
|
537
|
+
_this = this,
|
538
|
+
$newSlide;
|
539
|
+
|
540
|
+
if (!chosenSlide) {
|
541
|
+
//most of the time, this will be auto played or clicked from the navButtons.
|
542
|
+
$newSlide = isLTR ? //if wrapping enabled, check to see if there is a `next` or `prev` sibling, if not, select the first or last slide to fill in. if wrapping not enabled, attempt to select `next` or `prev`, if there's nothing there, the function will kick out on next step. CRAZY NESTED TERNARIES!!!!!
|
543
|
+
this.options.infiniteWrap ? $curSlide.next('.' + this.options.slideClass).length ? $curSlide.next('.' + this.options.slideClass) : $firstSlide : $curSlide.next('.' + this.options.slideClass) : //pick next slide if moving left to right
|
544
|
+
this.options.infiniteWrap ? $curSlide.prev('.' + this.options.slideClass).length ? $curSlide.prev('.' + this.options.slideClass) : $lastSlide : $curSlide.prev('.' + this.options.slideClass); //pick prev slide if moving right to left
|
545
|
+
} else {
|
546
|
+
$newSlide = chosenSlide;
|
547
|
+
}
|
548
|
+
|
549
|
+
if ($newSlide.length) {
|
550
|
+
/**
|
551
|
+
* Triggers before the next slide starts animating in and only if a next slide has been found.
|
552
|
+
* @event Orbit#beforeslidechange
|
553
|
+
*/
|
554
|
+
this.$element.trigger('beforeslidechange.zf.orbit', [$curSlide, $newSlide]);
|
555
|
+
|
556
|
+
if (this.options.bullets) {
|
557
|
+
idx = idx || this.$slides.index($newSlide); //grab index to update bullets
|
558
|
+
this._updateBullets(idx);
|
559
|
+
}
|
560
|
+
|
561
|
+
if (this.options.useMUI && !this.$element.is(':hidden')) {
|
562
|
+
__WEBPACK_IMPORTED_MODULE_2__foundation_util_motion__["Motion"].animateIn($newSlide.addClass('is-active').css({ 'position': 'absolute', 'top': 0 }), this.options['animInFrom' + dirIn], function () {
|
563
|
+
$newSlide.css({ 'position': 'relative', 'display': 'block' }).attr('aria-live', 'polite');
|
564
|
+
});
|
565
|
+
|
566
|
+
__WEBPACK_IMPORTED_MODULE_2__foundation_util_motion__["Motion"].animateOut($curSlide.removeClass('is-active'), this.options['animOutTo' + dirOut], function () {
|
567
|
+
$curSlide.removeAttr('aria-live');
|
568
|
+
if (_this.options.autoPlay && !_this.timer.isPaused) {
|
569
|
+
_this.timer.restart();
|
570
|
+
}
|
571
|
+
//do stuff?
|
572
|
+
});
|
573
|
+
} else {
|
574
|
+
$curSlide.removeClass('is-active is-in').removeAttr('aria-live').hide();
|
575
|
+
$newSlide.addClass('is-active is-in').attr('aria-live', 'polite').show();
|
576
|
+
if (this.options.autoPlay && !this.timer.isPaused) {
|
577
|
+
this.timer.restart();
|
578
|
+
}
|
579
|
+
}
|
580
|
+
/**
|
581
|
+
* Triggers when the slide has finished animating in.
|
582
|
+
* @event Orbit#slidechange
|
583
|
+
*/
|
584
|
+
this.$element.trigger('slidechange.zf.orbit', [$newSlide]);
|
585
|
+
}
|
586
|
+
}
|
587
|
+
|
588
|
+
/**
|
589
|
+
* Updates the active state of the bullets, if displayed.
|
590
|
+
* @function
|
591
|
+
* @private
|
592
|
+
* @param {Number} idx - the index of the current slide.
|
593
|
+
*/
|
594
|
+
|
595
|
+
}, {
|
596
|
+
key: '_updateBullets',
|
597
|
+
value: function _updateBullets(idx) {
|
598
|
+
var $oldBullet = this.$element.find('.' + this.options.boxOfBullets).find('.is-active').removeClass('is-active').blur(),
|
599
|
+
span = $oldBullet.find('span:last').detach(),
|
600
|
+
$newBullet = this.$bullets.eq(idx).addClass('is-active').append(span);
|
601
|
+
}
|
602
|
+
|
603
|
+
/**
|
604
|
+
* Destroys the carousel and hides the element.
|
605
|
+
* @function
|
606
|
+
*/
|
607
|
+
|
608
|
+
}, {
|
609
|
+
key: '_destroy',
|
610
|
+
value: function _destroy() {
|
611
|
+
this.$element.off('.zf.orbit').find('*').off('.zf.orbit').end().hide();
|
612
|
+
}
|
613
|
+
}]);
|
614
|
+
|
615
|
+
return Orbit;
|
616
|
+
}(__WEBPACK_IMPORTED_MODULE_6__foundation_plugin__["Plugin"]);
|
617
|
+
|
618
|
+
Orbit.defaults = {
|
619
|
+
/**
|
620
|
+
* Tells the JS to look for and loadBullets.
|
621
|
+
* @option
|
622
|
+
* @type {boolean}
|
623
|
+
* @default true
|
624
|
+
*/
|
625
|
+
bullets: true,
|
626
|
+
/**
|
627
|
+
* Tells the JS to apply event listeners to nav buttons
|
628
|
+
* @option
|
629
|
+
* @type {boolean}
|
630
|
+
* @default true
|
631
|
+
*/
|
632
|
+
navButtons: true,
|
633
|
+
/**
|
634
|
+
* motion-ui animation class to apply
|
635
|
+
* @option
|
636
|
+
* @type {string}
|
637
|
+
* @default 'slide-in-right'
|
638
|
+
*/
|
639
|
+
animInFromRight: 'slide-in-right',
|
640
|
+
/**
|
641
|
+
* motion-ui animation class to apply
|
642
|
+
* @option
|
643
|
+
* @type {string}
|
644
|
+
* @default 'slide-out-right'
|
645
|
+
*/
|
646
|
+
animOutToRight: 'slide-out-right',
|
647
|
+
/**
|
648
|
+
* motion-ui animation class to apply
|
649
|
+
* @option
|
650
|
+
* @type {string}
|
651
|
+
* @default 'slide-in-left'
|
652
|
+
*
|
653
|
+
*/
|
654
|
+
animInFromLeft: 'slide-in-left',
|
655
|
+
/**
|
656
|
+
* motion-ui animation class to apply
|
657
|
+
* @option
|
658
|
+
* @type {string}
|
659
|
+
* @default 'slide-out-left'
|
660
|
+
*/
|
661
|
+
animOutToLeft: 'slide-out-left',
|
662
|
+
/**
|
663
|
+
* Allows Orbit to automatically animate on page load.
|
664
|
+
* @option
|
665
|
+
* @type {boolean}
|
666
|
+
* @default true
|
667
|
+
*/
|
668
|
+
autoPlay: true,
|
669
|
+
/**
|
670
|
+
* Amount of time, in ms, between slide transitions
|
671
|
+
* @option
|
672
|
+
* @type {number}
|
673
|
+
* @default 5000
|
674
|
+
*/
|
675
|
+
timerDelay: 5000,
|
676
|
+
/**
|
677
|
+
* Allows Orbit to infinitely loop through the slides
|
678
|
+
* @option
|
679
|
+
* @type {boolean}
|
680
|
+
* @default true
|
681
|
+
*/
|
682
|
+
infiniteWrap: true,
|
683
|
+
/**
|
684
|
+
* Allows the Orbit slides to bind to swipe events for mobile, requires an additional util library
|
685
|
+
* @option
|
686
|
+
* @type {boolean}
|
687
|
+
* @default true
|
688
|
+
*/
|
689
|
+
swipe: true,
|
690
|
+
/**
|
691
|
+
* Allows the timing function to pause animation on hover.
|
692
|
+
* @option
|
693
|
+
* @type {boolean}
|
694
|
+
* @default true
|
695
|
+
*/
|
696
|
+
pauseOnHover: true,
|
697
|
+
/**
|
698
|
+
* Allows Orbit to bind keyboard events to the slider, to animate frames with arrow keys
|
699
|
+
* @option
|
700
|
+
* @type {boolean}
|
701
|
+
* @default true
|
702
|
+
*/
|
703
|
+
accessible: true,
|
704
|
+
/**
|
705
|
+
* Class applied to the container of Orbit
|
706
|
+
* @option
|
707
|
+
* @type {string}
|
708
|
+
* @default 'orbit-container'
|
709
|
+
*/
|
710
|
+
containerClass: 'orbit-container',
|
711
|
+
/**
|
712
|
+
* Class applied to individual slides.
|
713
|
+
* @option
|
714
|
+
* @type {string}
|
715
|
+
* @default 'orbit-slide'
|
716
|
+
*/
|
717
|
+
slideClass: 'orbit-slide',
|
718
|
+
/**
|
719
|
+
* Class applied to the bullet container. You're welcome.
|
720
|
+
* @option
|
721
|
+
* @type {string}
|
722
|
+
* @default 'orbit-bullets'
|
723
|
+
*/
|
724
|
+
boxOfBullets: 'orbit-bullets',
|
725
|
+
/**
|
726
|
+
* Class applied to the `next` navigation button.
|
727
|
+
* @option
|
728
|
+
* @type {string}
|
729
|
+
* @default 'orbit-next'
|
730
|
+
*/
|
731
|
+
nextClass: 'orbit-next',
|
732
|
+
/**
|
733
|
+
* Class applied to the `previous` navigation button.
|
734
|
+
* @option
|
735
|
+
* @type {string}
|
736
|
+
* @default 'orbit-previous'
|
737
|
+
*/
|
738
|
+
prevClass: 'orbit-previous',
|
739
|
+
/**
|
740
|
+
* Boolean to flag the js to use motion ui classes or not. Default to true for backwards compatability.
|
741
|
+
* @option
|
742
|
+
* @type {boolean}
|
743
|
+
* @default true
|
744
|
+
*/
|
745
|
+
useMUI: true
|
746
|
+
};
|
747
|
+
|
748
|
+
|
749
|
+
|
750
|
+
/***/ }),
|
751
|
+
|
752
|
+
/***/ 78:
|
753
|
+
/***/ (function(module, exports) {
|
754
|
+
|
755
|
+
module.exports = {Timer: window.Foundation.Timer};
|
756
|
+
|
757
|
+
/***/ }),
|
758
|
+
|
759
|
+
/***/ 89:
|
760
|
+
/***/ (function(module, exports, __webpack_require__) {
|
761
|
+
|
762
|
+
module.exports = __webpack_require__(23);
|
763
|
+
|
764
|
+
|
765
|
+
/***/ })
|
766
|
+
|
767
|
+
/******/ });
|