1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory(require("./foundation.core"), require("jquery"));
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define(["./foundation.core", "jquery"], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["foundation.util.motion"] = factory(require("./foundation.core"), require("jquery"));
|
8 | else
|
9 | root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]);
|
10 | })(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.d = function(exports, name, getter) {
|
48 | if(!__webpack_require__.o(exports, name)) {
|
49 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
50 | }
|
51 | };
|
52 |
|
53 |
|
54 | __webpack_require__.r = function(exports) {
|
55 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
56 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
57 | }
|
58 | Object.defineProperty(exports, '__esModule', { value: true });
|
59 | };
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | __webpack_require__.t = function(value, mode) {
|
67 | if(mode & 1) value = __webpack_require__(value);
|
68 | if(mode & 8) return value;
|
69 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
70 | var ns = Object.create(null);
|
71 | __webpack_require__.r(ns);
|
72 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
73 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
74 | return ns;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.n = function(module) {
|
79 | var getter = module && module.__esModule ?
|
80 | function getDefault() { return module['default']; } :
|
81 | function getModuleExports() { return module; };
|
82 | __webpack_require__.d(getter, 'a', getter);
|
83 | return getter;
|
84 | };
|
85 |
|
86 |
|
87 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
88 |
|
89 |
|
90 | __webpack_require__.p = "";
|
91 |
|
92 |
|
93 |
|
94 | return __webpack_require__(__webpack_require__.s = 25);
|
95 | })
|
96 |
|
97 | ({
|
98 |
|
99 | "./foundation.core":
|
100 |
|
101 |
|
102 |
|
103 |
|
104 | (function(module, exports) {
|
105 |
|
106 | module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
|
107 |
|
108 | }),
|
109 |
|
110 | "./js/entries/plugins/foundation.util.motion.js":
|
111 |
|
112 |
|
113 |
|
114 |
|
115 | (function(module, __webpack_exports__, __webpack_require__) {
|
116 |
|
117 | "use strict";
|
118 | __webpack_require__.r(__webpack_exports__);
|
119 | var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./foundation.core");
|
120 | var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
|
121 | __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; });
|
122 |
|
123 | var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./js/foundation.util.motion.js");
|
124 | __webpack_require__.d(__webpack_exports__, "Motion", function() { return _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Motion"]; });
|
125 |
|
126 | __webpack_require__.d(__webpack_exports__, "Move", function() { return _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Move"]; });
|
127 |
|
128 |
|
129 |
|
130 | _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Motion = _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Motion"];
|
131 | _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Move = _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Move"];
|
132 |
|
133 |
|
134 | }),
|
135 |
|
136 | "./js/foundation.util.motion.js":
|
137 |
|
138 |
|
139 |
|
140 |
|
141 | (function(module, __webpack_exports__, __webpack_require__) {
|
142 |
|
143 | "use strict";
|
144 | __webpack_require__.r(__webpack_exports__);
|
145 | __webpack_require__.d(__webpack_exports__, "Move", function() { return Move; });
|
146 | __webpack_require__.d(__webpack_exports__, "Motion", function() { return Motion; });
|
147 | var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
|
148 | var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
149 | var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./foundation.core");
|
150 | var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__);
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 |
|
160 | var initClasses = ['mui-enter', 'mui-leave'];
|
161 | var activeClasses = ['mui-enter-active', 'mui-leave-active'];
|
162 | var Motion = {
|
163 | animateIn: function animateIn(element, animation, cb) {
|
164 | animate(true, element, animation, cb);
|
165 | },
|
166 | animateOut: function animateOut(element, animation, cb) {
|
167 | animate(false, element, animation, cb);
|
168 | }
|
169 | };
|
170 |
|
171 | function Move(duration, elem, fn) {
|
172 | var anim,
|
173 | prog,
|
174 | start = null;
|
175 |
|
176 | if (duration === 0) {
|
177 | fn.apply(elem);
|
178 | elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);
|
179 | return;
|
180 | }
|
181 |
|
182 | function move(ts) {
|
183 | if (!start) start = ts;
|
184 |
|
185 | prog = ts - start;
|
186 | fn.apply(elem);
|
187 |
|
188 | if (prog < duration) {
|
189 | anim = window.requestAnimationFrame(move, elem);
|
190 | } else {
|
191 | window.cancelAnimationFrame(anim);
|
192 | elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);
|
193 | }
|
194 | }
|
195 |
|
196 | anim = window.requestAnimationFrame(move);
|
197 | }
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 | function animate(isIn, element, animation, cb) {
|
210 | element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element).eq(0);
|
211 | if (!element.length) return;
|
212 | var initClass = isIn ? initClasses[0] : initClasses[1];
|
213 | var activeClass = isIn ? activeClasses[0] : activeClasses[1];
|
214 |
|
215 | reset();
|
216 | element.addClass(animation).css('transition', 'none');
|
217 | requestAnimationFrame(function () {
|
218 | element.addClass(initClass);
|
219 | if (isIn) element.show();
|
220 | });
|
221 |
|
222 | requestAnimationFrame(function () {
|
223 |
|
224 |
|
225 |
|
226 | element[0].offsetWidth;
|
227 | element.css('transition', '').addClass(activeClass);
|
228 | });
|
229 |
|
230 | element.one(Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["transitionend"])(element), finish);
|
231 |
|
232 | function finish() {
|
233 | if (!isIn) element.hide();
|
234 | reset();
|
235 | if (cb) cb.apply(element);
|
236 | }
|
237 |
|
238 |
|
239 | function reset() {
|
240 | element[0].style.transitionDuration = 0;
|
241 | element.removeClass("".concat(initClass, " ").concat(activeClass, " ").concat(animation));
|
242 | }
|
243 | }
|
244 |
|
245 |
|
246 |
|
247 | }),
|
248 |
|
249 | 25:
|
250 |
|
251 |
|
252 |
|
253 |
|
254 | (function(module, exports, __webpack_require__) {
|
255 |
|
256 | module.exports = __webpack_require__("./js/entries/plugins/foundation.util.motion.js");
|
257 |
|
258 |
|
259 | }),
|
260 |
|
261 | "jquery":
|
262 |
|
263 |
|
264 |
|
265 |
|
266 | (function(module, exports) {
|
267 |
|
268 | module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
|
269 |
|
270 | })
|
271 |
|
272 | });
|
273 | });
|
274 |
|
\ | No newline at end of file |