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,90 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
!function ($) {
|
4
|
+
|
5
|
+
function Timer(elem, options, cb) {
|
6
|
+
var _this = this,
|
7
|
+
duration = options.duration,
|
8
|
+
//options is an object for easily adding features later.
|
9
|
+
nameSpace = Object.keys(elem.data())[0] || 'timer',
|
10
|
+
remain = -1,
|
11
|
+
start,
|
12
|
+
timer;
|
13
|
+
|
14
|
+
this.isPaused = false;
|
15
|
+
|
16
|
+
this.restart = function () {
|
17
|
+
remain = -1;
|
18
|
+
clearTimeout(timer);
|
19
|
+
this.start();
|
20
|
+
};
|
21
|
+
|
22
|
+
this.start = function () {
|
23
|
+
this.isPaused = false;
|
24
|
+
// if(!elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.
|
25
|
+
clearTimeout(timer);
|
26
|
+
remain = remain <= 0 ? duration : remain;
|
27
|
+
elem.data('paused', false);
|
28
|
+
start = Date.now();
|
29
|
+
timer = setTimeout(function () {
|
30
|
+
if (options.infinite) {
|
31
|
+
_this.restart(); //rerun the timer.
|
32
|
+
}
|
33
|
+
if (cb && typeof cb === 'function') {
|
34
|
+
cb();
|
35
|
+
}
|
36
|
+
}, remain);
|
37
|
+
elem.trigger('timerstart.zf.' + nameSpace);
|
38
|
+
};
|
39
|
+
|
40
|
+
this.pause = function () {
|
41
|
+
this.isPaused = true;
|
42
|
+
//if(elem.data('paused')){ return false; }//maybe implement this sanity check if used for other things.
|
43
|
+
clearTimeout(timer);
|
44
|
+
elem.data('paused', true);
|
45
|
+
var end = Date.now();
|
46
|
+
remain = remain - (end - start);
|
47
|
+
elem.trigger('timerpaused.zf.' + nameSpace);
|
48
|
+
};
|
49
|
+
}
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Runs a callback function when images are fully loaded.
|
53
|
+
* @param {Object} images - Image(s) to check if loaded.
|
54
|
+
* @param {Func} callback - Function to execute when image is fully loaded.
|
55
|
+
*/
|
56
|
+
function onImagesLoaded(images, callback) {
|
57
|
+
var self = this,
|
58
|
+
unloaded = images.length;
|
59
|
+
|
60
|
+
if (unloaded === 0) {
|
61
|
+
callback();
|
62
|
+
}
|
63
|
+
|
64
|
+
images.each(function () {
|
65
|
+
// Check if image is loaded
|
66
|
+
if (this.complete || this.readyState === 4 || this.readyState === 'complete') {
|
67
|
+
singleImageLoaded();
|
68
|
+
}
|
69
|
+
// Force load the image
|
70
|
+
else {
|
71
|
+
// fix for IE. See https://css-tricks.com/snippets/jquery/fixing-load-in-ie-for-cached-images/
|
72
|
+
var src = $(this).attr('src');
|
73
|
+
$(this).attr('src', src + (src.indexOf('?') >= 0 ? '&' : '?') + new Date().getTime());
|
74
|
+
$(this).one('load', function () {
|
75
|
+
singleImageLoaded();
|
76
|
+
});
|
77
|
+
}
|
78
|
+
});
|
79
|
+
|
80
|
+
function singleImageLoaded() {
|
81
|
+
unloaded--;
|
82
|
+
if (unloaded === 0) {
|
83
|
+
callback();
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
Foundation.Timer = Timer;
|
89
|
+
Foundation.onImagesLoaded = onImagesLoaded;
|
90
|
+
}(jQuery);
|
@@ -0,0 +1,275 @@
|
|
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 = 107);
|
67
|
+
/******/ })
|
68
|
+
/************************************************************************/
|
69
|
+
/******/ ({
|
70
|
+
|
71
|
+
/***/ 0:
|
72
|
+
/***/ (function(module, exports) {
|
73
|
+
|
74
|
+
module.exports = jQuery;
|
75
|
+
|
76
|
+
/***/ }),
|
77
|
+
|
78
|
+
/***/ 107:
|
79
|
+
/***/ (function(module, exports, __webpack_require__) {
|
80
|
+
|
81
|
+
module.exports = __webpack_require__(41);
|
82
|
+
|
83
|
+
|
84
|
+
/***/ }),
|
85
|
+
|
86
|
+
/***/ 41:
|
87
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
88
|
+
|
89
|
+
"use strict";
|
90
|
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
91
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
|
92
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
|
93
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_touch__ = __webpack_require__(71);
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
__WEBPACK_IMPORTED_MODULE_1__foundation_util_touch__["a" /* Touch */].init(__WEBPACK_IMPORTED_MODULE_0_jquery___default.a);
|
99
|
+
|
100
|
+
window.Foundation.Touch = __WEBPACK_IMPORTED_MODULE_1__foundation_util_touch__["a" /* Touch */];
|
101
|
+
|
102
|
+
/***/ }),
|
103
|
+
|
104
|
+
/***/ 71:
|
105
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
106
|
+
|
107
|
+
"use strict";
|
108
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Touch; });
|
109
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
|
110
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
|
111
|
+
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; }; }();
|
112
|
+
|
113
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
114
|
+
|
115
|
+
//**************************************************
|
116
|
+
//**Work inspired by multiple jquery swipe plugins**
|
117
|
+
//**Done by Yohai Ararat ***************************
|
118
|
+
//**************************************************
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
var Touch = {};
|
123
|
+
|
124
|
+
var startPosX,
|
125
|
+
startPosY,
|
126
|
+
startTime,
|
127
|
+
elapsedTime,
|
128
|
+
isMoving = false;
|
129
|
+
|
130
|
+
function onTouchEnd() {
|
131
|
+
// alert(this);
|
132
|
+
this.removeEventListener('touchmove', onTouchMove);
|
133
|
+
this.removeEventListener('touchend', onTouchEnd);
|
134
|
+
isMoving = false;
|
135
|
+
}
|
136
|
+
|
137
|
+
function onTouchMove(e) {
|
138
|
+
if (__WEBPACK_IMPORTED_MODULE_0_jquery___default.a.spotSwipe.preventDefault) {
|
139
|
+
e.preventDefault();
|
140
|
+
}
|
141
|
+
if (isMoving) {
|
142
|
+
var x = e.touches[0].pageX;
|
143
|
+
var y = e.touches[0].pageY;
|
144
|
+
var dx = startPosX - x;
|
145
|
+
var dy = startPosY - y;
|
146
|
+
var dir;
|
147
|
+
elapsedTime = new Date().getTime() - startTime;
|
148
|
+
if (Math.abs(dx) >= __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.spotSwipe.moveThreshold && elapsedTime <= __WEBPACK_IMPORTED_MODULE_0_jquery___default.a.spotSwipe.timeThreshold) {
|
149
|
+
dir = dx > 0 ? 'left' : 'right';
|
150
|
+
}
|
151
|
+
// else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {
|
152
|
+
// dir = dy > 0 ? 'down' : 'up';
|
153
|
+
// }
|
154
|
+
if (dir) {
|
155
|
+
e.preventDefault();
|
156
|
+
onTouchEnd.call(this);
|
157
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('swipe', dir).trigger('swipe' + dir);
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
function onTouchStart(e) {
|
163
|
+
if (e.touches.length == 1) {
|
164
|
+
startPosX = e.touches[0].pageX;
|
165
|
+
startPosY = e.touches[0].pageY;
|
166
|
+
isMoving = true;
|
167
|
+
startTime = new Date().getTime();
|
168
|
+
this.addEventListener('touchmove', onTouchMove, false);
|
169
|
+
this.addEventListener('touchend', onTouchEnd, false);
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
function init() {
|
174
|
+
this.addEventListener && this.addEventListener('touchstart', onTouchStart, false);
|
175
|
+
}
|
176
|
+
|
177
|
+
function teardown() {
|
178
|
+
this.removeEventListener('touchstart', onTouchStart);
|
179
|
+
}
|
180
|
+
|
181
|
+
var SpotSwipe = function () {
|
182
|
+
function SpotSwipe($) {
|
183
|
+
_classCallCheck(this, SpotSwipe);
|
184
|
+
|
185
|
+
this.version = '1.0.0';
|
186
|
+
this.enabled = 'ontouchstart' in document.documentElement;
|
187
|
+
this.preventDefault = false;
|
188
|
+
this.moveThreshold = 75;
|
189
|
+
this.timeThreshold = 200;
|
190
|
+
this.$ = $;
|
191
|
+
this._init();
|
192
|
+
}
|
193
|
+
|
194
|
+
_createClass(SpotSwipe, [{
|
195
|
+
key: '_init',
|
196
|
+
value: function _init() {
|
197
|
+
var $ = this.$;
|
198
|
+
$.event.special.swipe = { setup: init };
|
199
|
+
|
200
|
+
$.each(['left', 'up', 'down', 'right'], function () {
|
201
|
+
$.event.special['swipe' + this] = { setup: function () {
|
202
|
+
$(this).on('swipe', $.noop);
|
203
|
+
} };
|
204
|
+
});
|
205
|
+
}
|
206
|
+
}]);
|
207
|
+
|
208
|
+
return SpotSwipe;
|
209
|
+
}();
|
210
|
+
|
211
|
+
/****************************************************
|
212
|
+
* As far as I can tell, both setupSpotSwipe and *
|
213
|
+
* setupTouchHandler should be idempotent, *
|
214
|
+
* because they directly replace functions & *
|
215
|
+
* values, and do not add event handlers directly. *
|
216
|
+
****************************************************/
|
217
|
+
|
218
|
+
Touch.setupSpotSwipe = function ($) {
|
219
|
+
$.spotSwipe = new SpotSwipe($);
|
220
|
+
};
|
221
|
+
|
222
|
+
/****************************************************
|
223
|
+
* Method for adding pseudo drag events to elements *
|
224
|
+
***************************************************/
|
225
|
+
Touch.setupTouchHandler = function ($) {
|
226
|
+
$.fn.addTouch = function () {
|
227
|
+
this.each(function (i, el) {
|
228
|
+
$(el).bind('touchstart touchmove touchend touchcancel', function () {
|
229
|
+
//we pass the original event object because the jQuery event
|
230
|
+
//object is normalized to w3c specs and does not provide the TouchList
|
231
|
+
handleTouch(event);
|
232
|
+
});
|
233
|
+
});
|
234
|
+
|
235
|
+
var handleTouch = function (event) {
|
236
|
+
var touches = event.changedTouches,
|
237
|
+
first = touches[0],
|
238
|
+
eventTypes = {
|
239
|
+
touchstart: 'mousedown',
|
240
|
+
touchmove: 'mousemove',
|
241
|
+
touchend: 'mouseup'
|
242
|
+
},
|
243
|
+
type = eventTypes[event.type],
|
244
|
+
simulatedEvent;
|
245
|
+
|
246
|
+
if ('MouseEvent' in window && typeof window.MouseEvent === 'function') {
|
247
|
+
simulatedEvent = new window.MouseEvent(type, {
|
248
|
+
'bubbles': true,
|
249
|
+
'cancelable': true,
|
250
|
+
'screenX': first.screenX,
|
251
|
+
'screenY': first.screenY,
|
252
|
+
'clientX': first.clientX,
|
253
|
+
'clientY': first.clientY
|
254
|
+
});
|
255
|
+
} else {
|
256
|
+
simulatedEvent = document.createEvent('MouseEvent');
|
257
|
+
simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0 /*left*/, null);
|
258
|
+
}
|
259
|
+
first.target.dispatchEvent(simulatedEvent);
|
260
|
+
};
|
261
|
+
};
|
262
|
+
};
|
263
|
+
|
264
|
+
Touch.init = function ($) {
|
265
|
+
if (typeof $.spotSwipe === 'undefined') {
|
266
|
+
Touch.setupSpotSwipe($);
|
267
|
+
Touch.setupTouchHandler($);
|
268
|
+
}
|
269
|
+
};
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
/***/ })
|
274
|
+
|
275
|
+
/******/ });
|
@@ -0,0 +1,399 @@
|
|
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 = 108);
|
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
|
+
/***/ 108:
|
86
|
+
/***/ (function(module, exports, __webpack_require__) {
|
87
|
+
|
88
|
+
module.exports = __webpack_require__(42);
|
89
|
+
|
90
|
+
|
91
|
+
/***/ }),
|
92
|
+
|
93
|
+
/***/ 4:
|
94
|
+
/***/ (function(module, exports) {
|
95
|
+
|
96
|
+
module.exports = {Motion: window.Foundation.Motion, Move: window.Foundation.Move};
|
97
|
+
|
98
|
+
/***/ }),
|
99
|
+
|
100
|
+
/***/ 42:
|
101
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
102
|
+
|
103
|
+
"use strict";
|
104
|
+
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
105
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core__ = __webpack_require__(1);
|
106
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__foundation_core___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__foundation_core__);
|
107
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_jquery__ = __webpack_require__(0);
|
108
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_jquery__);
|
109
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__foundation_util_triggers__ = __webpack_require__(7);
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
__WEBPACK_IMPORTED_MODULE_2__foundation_util_triggers__["a" /* Triggers */].init(__WEBPACK_IMPORTED_MODULE_1_jquery___default.a, __WEBPACK_IMPORTED_MODULE_0__foundation_core__["Foundation"]);
|
115
|
+
|
116
|
+
/***/ }),
|
117
|
+
|
118
|
+
/***/ 7:
|
119
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
120
|
+
|
121
|
+
"use strict";
|
122
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Triggers; });
|
123
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery__ = __webpack_require__(0);
|
124
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_jquery___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_jquery__);
|
125
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__ = __webpack_require__(4);
|
126
|
+
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__foundation_util_motion___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__);
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
var MutationObserver = function () {
|
133
|
+
var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];
|
134
|
+
for (var i = 0; i < prefixes.length; i++) {
|
135
|
+
if (prefixes[i] + 'MutationObserver' in window) {
|
136
|
+
return window[prefixes[i] + 'MutationObserver'];
|
137
|
+
}
|
138
|
+
}
|
139
|
+
return false;
|
140
|
+
}();
|
141
|
+
|
142
|
+
var triggers = function (el, type) {
|
143
|
+
el.data(type).split(' ').forEach(function (id) {
|
144
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id)[type === 'close' ? 'trigger' : 'triggerHandler'](type + '.zf.trigger', [el]);
|
145
|
+
});
|
146
|
+
};
|
147
|
+
|
148
|
+
var Triggers = {
|
149
|
+
Listeners: {
|
150
|
+
Basic: {},
|
151
|
+
Global: {}
|
152
|
+
},
|
153
|
+
Initializers: {}
|
154
|
+
};
|
155
|
+
|
156
|
+
Triggers.Listeners.Basic = {
|
157
|
+
openListener: function () {
|
158
|
+
triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'open');
|
159
|
+
},
|
160
|
+
closeListener: function () {
|
161
|
+
var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('close');
|
162
|
+
if (id) {
|
163
|
+
triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'close');
|
164
|
+
} else {
|
165
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('close.zf.trigger');
|
166
|
+
}
|
167
|
+
},
|
168
|
+
toggleListener: function () {
|
169
|
+
var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle');
|
170
|
+
if (id) {
|
171
|
+
triggers(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), 'toggle');
|
172
|
+
} else {
|
173
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('toggle.zf.trigger');
|
174
|
+
}
|
175
|
+
},
|
176
|
+
closeableListener: function (e) {
|
177
|
+
e.stopPropagation();
|
178
|
+
var animation = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('closable');
|
179
|
+
|
180
|
+
if (animation !== '') {
|
181
|
+
__WEBPACK_IMPORTED_MODULE_1__foundation_util_motion__["Motion"].animateOut(__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this), animation, function () {
|
182
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).trigger('closed.zf');
|
183
|
+
});
|
184
|
+
} else {
|
185
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).fadeOut().trigger('closed.zf');
|
186
|
+
}
|
187
|
+
},
|
188
|
+
toggleFocusListener: function () {
|
189
|
+
var id = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).data('toggle-focus');
|
190
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()('#' + id).triggerHandler('toggle.zf.trigger', [__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this)]);
|
191
|
+
}
|
192
|
+
};
|
193
|
+
|
194
|
+
// Elements with [data-open] will reveal a plugin that supports it when clicked.
|
195
|
+
Triggers.Initializers.addOpenListener = function ($elem) {
|
196
|
+
$elem.off('click.zf.trigger', Triggers.Listeners.Basic.openListener);
|
197
|
+
$elem.on('click.zf.trigger', '[data-open]', Triggers.Listeners.Basic.openListener);
|
198
|
+
};
|
199
|
+
|
200
|
+
// Elements with [data-close] will close a plugin that supports it when clicked.
|
201
|
+
// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.
|
202
|
+
Triggers.Initializers.addCloseListener = function ($elem) {
|
203
|
+
$elem.off('click.zf.trigger', Triggers.Listeners.Basic.closeListener);
|
204
|
+
$elem.on('click.zf.trigger', '[data-close]', Triggers.Listeners.Basic.closeListener);
|
205
|
+
};
|
206
|
+
|
207
|
+
// Elements with [data-toggle] will toggle a plugin that supports it when clicked.
|
208
|
+
Triggers.Initializers.addToggleListener = function ($elem) {
|
209
|
+
$elem.off('click.zf.trigger', Triggers.Listeners.Basic.toggleListener);
|
210
|
+
$elem.on('click.zf.trigger', '[data-toggle]', Triggers.Listeners.Basic.toggleListener);
|
211
|
+
};
|
212
|
+
|
213
|
+
// Elements with [data-closable] will respond to close.zf.trigger events.
|
214
|
+
Triggers.Initializers.addCloseableListener = function ($elem) {
|
215
|
+
$elem.off('close.zf.trigger', Triggers.Listeners.Basic.closeableListener);
|
216
|
+
$elem.on('close.zf.trigger', '[data-closeable], [data-closable]', Triggers.Listeners.Basic.closeableListener);
|
217
|
+
};
|
218
|
+
|
219
|
+
// Elements with [data-toggle-focus] will respond to coming in and out of focus
|
220
|
+
Triggers.Initializers.addToggleFocusListener = function ($elem) {
|
221
|
+
$elem.off('focus.zf.trigger blur.zf.trigger', Triggers.Listeners.Basic.toggleFocusListener);
|
222
|
+
$elem.on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', Triggers.Listeners.Basic.toggleFocusListener);
|
223
|
+
};
|
224
|
+
|
225
|
+
// More Global/complex listeners and triggers
|
226
|
+
Triggers.Listeners.Global = {
|
227
|
+
resizeListener: function ($nodes) {
|
228
|
+
if (!MutationObserver) {
|
229
|
+
//fallback for IE 9
|
230
|
+
$nodes.each(function () {
|
231
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('resizeme.zf.trigger');
|
232
|
+
});
|
233
|
+
}
|
234
|
+
//trigger all listening elements and signal a resize event
|
235
|
+
$nodes.attr('data-events', "resize");
|
236
|
+
},
|
237
|
+
scrollListener: function ($nodes) {
|
238
|
+
if (!MutationObserver) {
|
239
|
+
//fallback for IE 9
|
240
|
+
$nodes.each(function () {
|
241
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(this).triggerHandler('scrollme.zf.trigger');
|
242
|
+
});
|
243
|
+
}
|
244
|
+
//trigger all listening elements and signal a scroll event
|
245
|
+
$nodes.attr('data-events', "scroll");
|
246
|
+
},
|
247
|
+
closeMeListener: function (e, pluginId) {
|
248
|
+
var plugin = e.namespace.split('.')[0];
|
249
|
+
var plugins = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-' + plugin + ']').not('[data-yeti-box="' + pluginId + '"]');
|
250
|
+
|
251
|
+
plugins.each(function () {
|
252
|
+
var _this = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(this);
|
253
|
+
_this.triggerHandler('close.zf.trigger', [_this]);
|
254
|
+
});
|
255
|
+
}
|
256
|
+
};
|
257
|
+
|
258
|
+
// Global, parses whole document.
|
259
|
+
Triggers.Initializers.addClosemeListener = function (pluginName) {
|
260
|
+
var yetiBoxes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-yeti-box]'),
|
261
|
+
plugNames = ['dropdown', 'tooltip', 'reveal'];
|
262
|
+
|
263
|
+
if (pluginName) {
|
264
|
+
if (typeof pluginName === 'string') {
|
265
|
+
plugNames.push(pluginName);
|
266
|
+
} else if (typeof pluginName === 'object' && typeof pluginName[0] === 'string') {
|
267
|
+
plugNames.concat(pluginName);
|
268
|
+
} else {
|
269
|
+
console.error('Plugin names must be strings');
|
270
|
+
}
|
271
|
+
}
|
272
|
+
if (yetiBoxes.length) {
|
273
|
+
var listeners = plugNames.map(function (name) {
|
274
|
+
return 'closeme.zf.' + name;
|
275
|
+
}).join(' ');
|
276
|
+
|
277
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(listeners).on(listeners, Triggers.Listeners.Global.closeMeListener);
|
278
|
+
}
|
279
|
+
};
|
280
|
+
|
281
|
+
function debounceGlobalListener(debounce, trigger, listener) {
|
282
|
+
var timer = void 0,
|
283
|
+
args = Array.prototype.slice.call(arguments, 3);
|
284
|
+
__WEBPACK_IMPORTED_MODULE_0_jquery___default()(window).off(trigger).on(trigger, function (e) {
|
285
|
+
if (timer) {
|
286
|
+
clearTimeout(timer);
|
287
|
+
}
|
288
|
+
timer = setTimeout(function () {
|
289
|
+
listener.apply(null, args);
|
290
|
+
}, debounce || 10); //default time to emit scroll event
|
291
|
+
});
|
292
|
+
}
|
293
|
+
|
294
|
+
Triggers.Initializers.addResizeListener = function (debounce) {
|
295
|
+
var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-resize]');
|
296
|
+
if ($nodes.length) {
|
297
|
+
debounceGlobalListener(debounce, 'resize.zf.trigger', Triggers.Listeners.Global.resizeListener, $nodes);
|
298
|
+
}
|
299
|
+
};
|
300
|
+
|
301
|
+
Triggers.Initializers.addScrollListener = function (debounce) {
|
302
|
+
var $nodes = __WEBPACK_IMPORTED_MODULE_0_jquery___default()('[data-scroll]');
|
303
|
+
if ($nodes.length) {
|
304
|
+
debounceGlobalListener(debounce, 'scroll.zf.trigger', Triggers.Listeners.Global.scrollListener, $nodes);
|
305
|
+
}
|
306
|
+
};
|
307
|
+
|
308
|
+
Triggers.Initializers.addMutationEventsListener = function ($elem) {
|
309
|
+
if (!MutationObserver) {
|
310
|
+
return false;
|
311
|
+
}
|
312
|
+
var $nodes = $elem.find('[data-resize], [data-scroll], [data-mutate]');
|
313
|
+
|
314
|
+
//element callback
|
315
|
+
var listeningElementsMutation = function (mutationRecordsList) {
|
316
|
+
var $target = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(mutationRecordsList[0].target);
|
317
|
+
|
318
|
+
//trigger the event handler for the element depending on type
|
319
|
+
switch (mutationRecordsList[0].type) {
|
320
|
+
case "attributes":
|
321
|
+
if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") {
|
322
|
+
$target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);
|
323
|
+
}
|
324
|
+
if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") {
|
325
|
+
$target.triggerHandler('resizeme.zf.trigger', [$target]);
|
326
|
+
}
|
327
|
+
if (mutationRecordsList[0].attributeName === "style") {
|
328
|
+
$target.closest("[data-mutate]").attr("data-events", "mutate");
|
329
|
+
$target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
|
330
|
+
}
|
331
|
+
break;
|
332
|
+
|
333
|
+
case "childList":
|
334
|
+
$target.closest("[data-mutate]").attr("data-events", "mutate");
|
335
|
+
$target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
|
336
|
+
break;
|
337
|
+
|
338
|
+
default:
|
339
|
+
return false;
|
340
|
+
//nothing
|
341
|
+
}
|
342
|
+
};
|
343
|
+
|
344
|
+
if ($nodes.length) {
|
345
|
+
//for each element that needs to listen for resizing, scrolling, or mutation add a single observer
|
346
|
+
for (var i = 0; i <= $nodes.length - 1; i++) {
|
347
|
+
var elementObserver = new MutationObserver(listeningElementsMutation);
|
348
|
+
elementObserver.observe($nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: ["data-events", "style"] });
|
349
|
+
}
|
350
|
+
}
|
351
|
+
};
|
352
|
+
|
353
|
+
Triggers.Initializers.addSimpleListeners = function () {
|
354
|
+
var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document);
|
355
|
+
|
356
|
+
Triggers.Initializers.addOpenListener($document);
|
357
|
+
Triggers.Initializers.addCloseListener($document);
|
358
|
+
Triggers.Initializers.addToggleListener($document);
|
359
|
+
Triggers.Initializers.addCloseableListener($document);
|
360
|
+
Triggers.Initializers.addToggleFocusListener($document);
|
361
|
+
};
|
362
|
+
|
363
|
+
Triggers.Initializers.addGlobalListeners = function () {
|
364
|
+
var $document = __WEBPACK_IMPORTED_MODULE_0_jquery___default()(document);
|
365
|
+
Triggers.Initializers.addMutationEventsListener($document);
|
366
|
+
Triggers.Initializers.addResizeListener();
|
367
|
+
Triggers.Initializers.addScrollListener();
|
368
|
+
Triggers.Initializers.addClosemeListener();
|
369
|
+
};
|
370
|
+
|
371
|
+
Triggers.init = function ($, Foundation) {
|
372
|
+
if (typeof $.triggersInitialized === 'undefined') {
|
373
|
+
var $document = $(document);
|
374
|
+
|
375
|
+
if (document.readyState === "complete") {
|
376
|
+
Triggers.Initializers.addSimpleListeners();
|
377
|
+
Triggers.Initializers.addGlobalListeners();
|
378
|
+
} else {
|
379
|
+
$(window).on('load', function () {
|
380
|
+
Triggers.Initializers.addSimpleListeners();
|
381
|
+
Triggers.Initializers.addGlobalListeners();
|
382
|
+
});
|
383
|
+
}
|
384
|
+
|
385
|
+
$.triggersInitialized = true;
|
386
|
+
}
|
387
|
+
|
388
|
+
if (Foundation) {
|
389
|
+
Foundation.Triggers = Triggers;
|
390
|
+
// Legacy included to be backwards compatible for now.
|
391
|
+
Foundation.IHearYou = Triggers.Initializers.addGlobalListeners;
|
392
|
+
}
|
393
|
+
};
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
/***/ })
|
398
|
+
|
399
|
+
/******/ });
|