123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- (function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory(require("./foundation.core"), require("jquery"));
- else if(typeof define === 'function' && define.amd)
- define(["./foundation.core", "jquery"], factory);
- else if(typeof exports === 'object')
- exports["foundation.util.motion"] = factory(require("./foundation.core"), require("jquery"));
- else
- root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]);
- })(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {
- return (function(modules) {
-
- var installedModules = {};
-
- function __webpack_require__(moduleId) {
-
- if(installedModules[moduleId]) {
- return installedModules[moduleId].exports;
- }
-
- var module = installedModules[moduleId] = {
- i: moduleId,
- l: false,
- exports: {}
- };
-
- modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-
- module.l = true;
-
- return module.exports;
- }
-
- __webpack_require__.m = modules;
-
- __webpack_require__.c = installedModules;
-
- __webpack_require__.d = function(exports, name, getter) {
- if(!__webpack_require__.o(exports, name)) {
- Object.defineProperty(exports, name, { enumerable: true, get: getter });
- }
- };
-
- __webpack_require__.r = function(exports) {
- if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
- }
- Object.defineProperty(exports, '__esModule', { value: true });
- };
-
-
-
-
-
- __webpack_require__.t = function(value, mode) {
- if(mode & 1) value = __webpack_require__(value);
- if(mode & 8) return value;
- if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
- var ns = Object.create(null);
- __webpack_require__.r(ns);
- Object.defineProperty(ns, 'default', { enumerable: true, value: value });
- if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
- return ns;
- };
-
- __webpack_require__.n = function(module) {
- var getter = module && module.__esModule ?
- function getDefault() { return module['default']; } :
- function getModuleExports() { return module; };
- __webpack_require__.d(getter, 'a', getter);
- return getter;
- };
-
- __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-
- __webpack_require__.p = "";
-
- return __webpack_require__(__webpack_require__.s = 25);
- })
- ({
- "./foundation.core":
- (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
- }),
- "./js/entries/plugins/foundation.util.motion.js":
- (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./foundation.core");
- var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
- __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; });
- var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./js/foundation.util.motion.js");
- __webpack_require__.d(__webpack_exports__, "Motion", function() { return _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Motion"]; });
- __webpack_require__.d(__webpack_exports__, "Move", function() { return _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Move"]; });
- _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Motion = _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Motion"];
- _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Move = _foundation_util_motion__WEBPACK_IMPORTED_MODULE_1__["Move"];
- }),
- "./js/foundation.util.motion.js":
- (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- __webpack_require__.d(__webpack_exports__, "Move", function() { return Move; });
- __webpack_require__.d(__webpack_exports__, "Motion", function() { return Motion; });
- var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "jquery");
- var jquery__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
- var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./foundation.core");
- var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__);
- var initClasses = ['mui-enter', 'mui-leave'];
- var activeClasses = ['mui-enter-active', 'mui-leave-active'];
- var Motion = {
- animateIn: function animateIn(element, animation, cb) {
- animate(true, element, animation, cb);
- },
- animateOut: function animateOut(element, animation, cb) {
- animate(false, element, animation, cb);
- }
- };
- function Move(duration, elem, fn) {
- var anim,
- prog,
- start = null;
- if (duration === 0) {
- fn.apply(elem);
- elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);
- return;
- }
- function move(ts) {
- if (!start) start = ts;
- prog = ts - start;
- fn.apply(elem);
- if (prog < duration) {
- anim = window.requestAnimationFrame(move, elem);
- } else {
- window.cancelAnimationFrame(anim);
- elem.trigger('finished.zf.animate', [elem]).triggerHandler('finished.zf.animate', [elem]);
- }
- }
- anim = window.requestAnimationFrame(move);
- }
- function animate(isIn, element, animation, cb) {
- element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element).eq(0);
- if (!element.length) return;
- var initClass = isIn ? initClasses[0] : initClasses[1];
- var activeClass = isIn ? activeClasses[0] : activeClasses[1];
- reset();
- element.addClass(animation).css('transition', 'none');
- requestAnimationFrame(function () {
- element.addClass(initClass);
- if (isIn) element.show();
- });
- requestAnimationFrame(function () {
-
-
-
- element[0].offsetWidth;
- element.css('transition', '').addClass(activeClass);
- });
- element.one(Object(_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__["transitionend"])(element), finish);
- function finish() {
- if (!isIn) element.hide();
- reset();
- if (cb) cb.apply(element);
- }
- function reset() {
- element[0].style.transitionDuration = 0;
- element.removeClass("".concat(initClass, " ").concat(activeClass, " ").concat(animation));
- }
- }
- }),
- 25:
- (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__("./js/entries/plugins/foundation.util.motion.js");
- }),
- "jquery":
- (function(module, exports) {
- module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
- })
- });
- });
|