├── .editorconfig ├── .eslintrc ├── .gitignore ├── .npmignore ├── .travis.yml ├── LICENSE ├── README.md ├── dist ├── ReactVelocityTransitionGroup.js ├── ReactVelocityTransitionGroup.map ├── ReactVelocityTransitionGroup.min.js └── ReactVelocityTransitionGroup.min.map ├── example ├── example.js └── index.html ├── index.js ├── karma.conf.js ├── lib ├── ReactVelocityTransitionGroup.js ├── ReactVelocityTransitionGroupChild.js └── propTypes.js ├── package.json ├── script └── build ├── specs ├── ReactVelocityTransitionGroup.spec.js └── main.js └── webpack.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | # Unix-style newlines with a newline ending every file 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | trim_trailing_whitespace = true 9 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | 4 | "plugins": ["react"], 5 | 6 | "ecmaFeatures": { 7 | "modules": true, 8 | "jsx": true 9 | }, 10 | 11 | "env": { 12 | "browser": true, 13 | "mocha": true, 14 | "node": true, 15 | "es6": true 16 | }, 17 | 18 | "rules": { 19 | "block-scoped-var": 2, 20 | "brace-style": [2, "1tbs", { "allowSingleLine": true }], 21 | "camelcase": 1, 22 | "comma-spacing": [2, { "before": false, "after": true }], 23 | "comma-style": [2, "last"], 24 | "complexity": [0, 11], 25 | "consistent-return": 2, 26 | "consistent-this": [2, "self"], 27 | "curly": [2, "multi-line"], 28 | "default-case": 1, 29 | "dot-notation": [2, {"allowKeywords": true}], 30 | "eol-last": 2, 31 | "eqeqeq": 2, 32 | "func-names": 0, 33 | "func-style": 0, 34 | "guard-for-in": 1, 35 | "handle-callback-err": 2, 36 | "indent": [2, 2], 37 | "key-spacing": [2, { "beforeColon": false, "afterColon": true }], 38 | "max-depth": 0, 39 | "max-len": 0, 40 | "max-nested-callbacks": 0, 41 | "max-params": [1, 3], 42 | "max-statements": 0, 43 | "new-cap": 1, 44 | "new-parens": 2, 45 | "no-alert": 1, 46 | "no-array-constructor": 2, 47 | "no-bitwise": 1, 48 | "no-caller": 2, 49 | "no-catch-shadow": 2, 50 | "no-comma-dangle": 2, 51 | "no-cond-assign": 2, 52 | "no-console": 1, 53 | "no-constant-condition": 2, 54 | "no-control-regex": 2, 55 | "no-debugger": 2, 56 | "no-delete-var": 2, 57 | "no-div-regex": 2, 58 | "no-dupe-keys": 2, 59 | "no-else-return": 2, 60 | "no-empty": 2, 61 | "no-empty-class": 2, 62 | "no-empty-label": 2, 63 | "no-eq-null": 1, 64 | "no-eval": 2, 65 | "no-ex-assign": 2, 66 | "no-extend-native": 2, 67 | "no-extra-bind": 2, 68 | "no-extra-boolean-cast": 2, 69 | "no-extra-parens": 0, 70 | "no-extra-semi": 2, 71 | "no-fallthrough": 2, 72 | "no-floating-decimal": 2, 73 | "no-func-assign": 2, 74 | "no-implied-eval": 2, 75 | "no-inline-comments": 1, 76 | "no-inner-declarations": 2, 77 | "no-invalid-regexp": 2, 78 | "no-irregular-whitespace": 2, 79 | "no-iterator": 2, 80 | "no-label-var": 2, 81 | "no-labels": 2, 82 | "no-lone-blocks": 2, 83 | "no-lonely-if": 1, 84 | "no-loop-func": 1, 85 | "no-mixed-requires": 1, 86 | "no-mixed-spaces-and-tabs": 2, 87 | "no-multi-spaces": 2, 88 | "no-multi-str": 2, 89 | "no-multiple-empty-lines": [2, { "max": 2 }], 90 | "no-native-reassign": 2, 91 | "no-negated-in-lhs": 2, 92 | "no-nested-ternary": 2, 93 | "no-new": 2, 94 | "no-new-func": 2, 95 | "no-new-object": 2, 96 | "no-new-require": 2, 97 | "no-new-wrappers": 2, 98 | "no-obj-calls": 2, 99 | "no-octal": 2, 100 | "no-octal-escape": 2, 101 | "no-path-concat": 2, 102 | "no-plusplus": 0, 103 | "no-process-env": 2, 104 | "no-process-exit": 2, 105 | "no-proto": 2, 106 | "no-redeclare": 2, 107 | "no-regex-spaces": 2, 108 | "no-reserved-keys": 2, 109 | "no-restricted-modules": 0, 110 | "no-return-assign": 2, 111 | "no-script-url": 2, 112 | "no-self-compare": 2, 113 | "no-sequences": 2, 114 | "no-shadow": 2, 115 | "no-shadow-restricted-names": 2, 116 | "no-space-before-semi": 2, 117 | "no-spaced-func": 2, 118 | "no-sparse-arrays": 2, 119 | "no-sync": 0, 120 | "no-ternary": 0, 121 | "no-trailing-spaces": 2, 122 | "no-undef": 2, 123 | "no-undef-init": 2, 124 | "no-undefined": 0, 125 | "no-underscore-dangle": 0, 126 | "no-unreachable": 2, 127 | "no-unused-expressions": 2, 128 | "no-unused-vars": 2, 129 | "no-use-before-define": 2, 130 | "no-void": 1, 131 | "no-warning-comments": [1, { "terms": ["todo", "fixme"], "location": "start" }], 132 | "no-with": 2, 133 | "no-wrap-func": 2, 134 | "object-shorthand": "methods", 135 | "one-var": 0, 136 | "operator-assignment": 0, 137 | "padded-blocks": 0, 138 | "quote-props": 0, 139 | "quotes": [2, "single", "avoid-escape"], 140 | "radix": 2, 141 | "semi": [2, "always"], 142 | "sort-vars": 0, 143 | "space-after-keywords": [2, "always", { "checkFunctionKeyword": true }], 144 | "space-before-blocks": [2, "always"], 145 | "space-in-brackets": 0, 146 | "space-in-parens": 0, 147 | "space-infix-ops": 2, 148 | "space-return-throw-case": 2, 149 | "space-unary-ops": [1, { "words": true, "nonwords": false }], 150 | "spaced-line-comment": [2, "always", { "exceptions": ["-"] }], 151 | "strict": [2, "global"], 152 | "use-isnan": 2, 153 | "valid-jsdoc": 2, 154 | "valid-typeof": 2, 155 | "vars-on-top": 0, 156 | "wrap-iife": [2, "any"], 157 | "wrap-regex": 0, 158 | "yoda": [2, "never"] 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 27 | node_modules 28 | 29 | .DS_Store 30 | 31 | bundle-stats.json 32 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | **/.* 2 | example 3 | script 4 | specs 5 | karma.conf.js 6 | webpack.config.js 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | before_script: 5 | - export DISPLAY=:99.0 6 | - sh -e /etc/init.d/xvfb start 7 | email: 8 | on_failure: change 9 | on_success: never 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Jake Hiller 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # VelocityTransitionGroup 4 | 5 | This is a replacement for React's `ReactCSSTransitionGroup` addon that uses [velocity.js](https://github.com/julianshapiro/velocity) for animations instead of CSS. 6 | 7 | ### Warning 8 | 9 | Many other libraries have popped up since this one that accomplish the same thing and more. 10 | 11 | I'd recommend looking at [velocity-react](https://github.com/twitter-fabric/velocity-react) before using this. It is likely more up to date with the latest React, and includes other components and features that make working with Velocity in React much easier. 12 | 13 | ### Installation: 14 | 15 | `npm install velocity-transition-group` 16 | 17 | ### Simple Example: 18 | 19 | ```js 20 | import VelocityTransitionGroup from `velocity-transition-group`; 21 | 22 | let overlayStyles = { 23 | backgroundColor: '#000', 24 | position: 'fixed', 25 | top: 0, 26 | right: 0, 27 | bottom: 0, 28 | left: 0 29 | }; 30 | 31 | let OverlayComponent = React.createClass({ 32 | render() { 33 | return ( 34 | 40 |
; 41 | 42 | ) 43 | } 44 | }); 45 | 46 | ``` 47 | 48 | Based heavily on @tkafka's [react-VelocityTransitionGroup](https://github.com/tkafka/react-VelocityTransitionGroup) 49 | -------------------------------------------------------------------------------- /dist/ReactVelocityTransitionGroup.js: -------------------------------------------------------------------------------- 1 | (function webpackUniversalModuleDefinition(root, factory) { 2 | if(typeof exports === 'object' && typeof module === 'object') 3 | module.exports = factory(require("lodash"), require("react/addons"), require("velocity-animate")); 4 | else if(typeof define === 'function' && define.amd) 5 | define(["lodash", "react/addons", "velocity-animate"], factory); 6 | else if(typeof exports === 'object') 7 | exports["ReactVelocityTransitionGroup"] = factory(require("lodash"), require("react/addons"), require("velocity-animate")); 8 | else 9 | root["ReactVelocityTransitionGroup"] = factory(root["_"], root["React"], root["Velocity"]); 10 | })(this, function(__WEBPACK_EXTERNAL_MODULE_19__, __WEBPACK_EXTERNAL_MODULE_20__, __WEBPACK_EXTERNAL_MODULE_23__) { 11 | return /******/ (function(modules) { // webpackBootstrap 12 | /******/ // The module cache 13 | /******/ var installedModules = {}; 14 | /******/ 15 | /******/ // The require function 16 | /******/ function __webpack_require__(moduleId) { 17 | /******/ 18 | /******/ // Check if module is in cache 19 | /******/ if(installedModules[moduleId]) 20 | /******/ return installedModules[moduleId].exports; 21 | /******/ 22 | /******/ // Create a new module (and put it into the cache) 23 | /******/ var module = installedModules[moduleId] = { 24 | /******/ exports: {}, 25 | /******/ id: moduleId, 26 | /******/ loaded: false 27 | /******/ }; 28 | /******/ 29 | /******/ // Execute the module function 30 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 31 | /******/ 32 | /******/ // Flag the module as loaded 33 | /******/ module.loaded = true; 34 | /******/ 35 | /******/ // Return the exports of the module 36 | /******/ return module.exports; 37 | /******/ } 38 | /******/ 39 | /******/ 40 | /******/ // expose the modules object (__webpack_modules__) 41 | /******/ __webpack_require__.m = modules; 42 | /******/ 43 | /******/ // expose the module cache 44 | /******/ __webpack_require__.c = installedModules; 45 | /******/ 46 | /******/ // __webpack_public_path__ 47 | /******/ __webpack_require__.p = "dist/"; 48 | /******/ 49 | /******/ // Load entry module and return exports 50 | /******/ return __webpack_require__(0); 51 | /******/ }) 52 | /************************************************************************/ 53 | /******/ ([ 54 | /* 0 */ 55 | /***/ function(module, exports, __webpack_require__) { 56 | 57 | 'use strict'; 58 | 59 | var _interopRequireDefault = __webpack_require__(1)['default']; 60 | 61 | Object.defineProperty(exports, '__esModule', { 62 | value: true 63 | }); 64 | 65 | var _libReactVelocityTransitionGroup = __webpack_require__(2); 66 | 67 | var _libReactVelocityTransitionGroup2 = _interopRequireDefault(_libReactVelocityTransitionGroup); 68 | 69 | exports['default'] = _libReactVelocityTransitionGroup2['default']; 70 | module.exports = exports['default']; 71 | 72 | /***/ }, 73 | /* 1 */ 74 | /***/ function(module, exports) { 75 | 76 | "use strict"; 77 | 78 | exports["default"] = function (obj) { 79 | return obj && obj.__esModule ? obj : { 80 | "default": obj 81 | }; 82 | }; 83 | 84 | exports.__esModule = true; 85 | 86 | /***/ }, 87 | /* 2 */ 88 | /***/ function(module, exports, __webpack_require__) { 89 | 90 | 'use strict'; 91 | 92 | var _extends = __webpack_require__(3)['default']; 93 | 94 | var _interopRequireDefault = __webpack_require__(1)['default']; 95 | 96 | Object.defineProperty(exports, '__esModule', { 97 | value: true 98 | }); 99 | 100 | var _lodash = __webpack_require__(19); 101 | 102 | var _lodash2 = _interopRequireDefault(_lodash); 103 | 104 | var _reactAddons = __webpack_require__(20); 105 | 106 | var _reactAddons2 = _interopRequireDefault(_reactAddons); 107 | 108 | var _propTypes = __webpack_require__(21); 109 | 110 | var _propTypes2 = _interopRequireDefault(_propTypes); 111 | 112 | var _ReactVelocityTransitionGroupChild = __webpack_require__(22); 113 | 114 | var _ReactVelocityTransitionGroupChild2 = _interopRequireDefault(_ReactVelocityTransitionGroupChild); 115 | 116 | var ReactTransitionGroup = _reactAddons2['default'].addons.TransitionGroup; 117 | 118 | var allowedChildProps = ['appear', 'enter', 'leave', 'easing', 'delay', 'duration', 'options']; 119 | 120 | var ReactVelocityTransitionGroup = _reactAddons2['default'].createClass({ 121 | displayName: 'ReactVelocityTransitionGroup', 122 | 123 | type: 'ReactTransitionGroup', 124 | propTypes: (0, _propTypes2['default'])(), 125 | 126 | _wrapChild: function _wrapChild(child) { 127 | var childProps = _lodash2['default'].extend({}, _lodash2['default'].pick(this.props, allowedChildProps)); 128 | return _reactAddons2['default'].createElement( 129 | _ReactVelocityTransitionGroupChild2['default'], 130 | childProps, 131 | child 132 | ); 133 | }, 134 | 135 | render: function render() { 136 | return _reactAddons2['default'].createElement(ReactTransitionGroup, _extends({}, this.props, { childFactory: this._wrapChild })); 137 | } 138 | }); 139 | 140 | exports['default'] = ReactVelocityTransitionGroup; 141 | module.exports = exports['default']; 142 | 143 | /***/ }, 144 | /* 3 */ 145 | /***/ function(module, exports, __webpack_require__) { 146 | 147 | "use strict"; 148 | 149 | var _Object$assign = __webpack_require__(4)["default"]; 150 | 151 | exports["default"] = _Object$assign || function (target) { 152 | for (var i = 1; i < arguments.length; i++) { 153 | var source = arguments[i]; 154 | 155 | for (var key in source) { 156 | if (Object.prototype.hasOwnProperty.call(source, key)) { 157 | target[key] = source[key]; 158 | } 159 | } 160 | } 161 | 162 | return target; 163 | }; 164 | 165 | exports.__esModule = true; 166 | 167 | /***/ }, 168 | /* 4 */ 169 | /***/ function(module, exports, __webpack_require__) { 170 | 171 | module.exports = { "default": __webpack_require__(5), __esModule: true }; 172 | 173 | /***/ }, 174 | /* 5 */ 175 | /***/ function(module, exports, __webpack_require__) { 176 | 177 | __webpack_require__(6); 178 | module.exports = __webpack_require__(9).Object.assign; 179 | 180 | /***/ }, 181 | /* 6 */ 182 | /***/ function(module, exports, __webpack_require__) { 183 | 184 | // 19.1.3.1 Object.assign(target, source) 185 | var $export = __webpack_require__(7); 186 | 187 | $export($export.S + $export.F, 'Object', {assign: __webpack_require__(12)}); 188 | 189 | /***/ }, 190 | /* 7 */ 191 | /***/ function(module, exports, __webpack_require__) { 192 | 193 | var global = __webpack_require__(8) 194 | , core = __webpack_require__(9) 195 | , ctx = __webpack_require__(10) 196 | , PROTOTYPE = 'prototype'; 197 | 198 | var $export = function(type, name, source){ 199 | var IS_FORCED = type & $export.F 200 | , IS_GLOBAL = type & $export.G 201 | , IS_STATIC = type & $export.S 202 | , IS_PROTO = type & $export.P 203 | , IS_BIND = type & $export.B 204 | , IS_WRAP = type & $export.W 205 | , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) 206 | , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] 207 | , key, own, out; 208 | if(IS_GLOBAL)source = name; 209 | for(key in source){ 210 | // contains in native 211 | own = !IS_FORCED && target && key in target; 212 | if(own && key in exports)continue; 213 | // export native or passed 214 | out = own ? target[key] : source[key]; 215 | // prevent global pollution for namespaces 216 | exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] 217 | // bind timers to global for call from export context 218 | : IS_BIND && own ? ctx(out, global) 219 | // wrap global constructors for prevent change them in library 220 | : IS_WRAP && target[key] == out ? (function(C){ 221 | var F = function(param){ 222 | return this instanceof C ? new C(param) : C(param); 223 | }; 224 | F[PROTOTYPE] = C[PROTOTYPE]; 225 | return F; 226 | // make static versions for prototype methods 227 | })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; 228 | if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out; 229 | } 230 | }; 231 | // type bitmap 232 | $export.F = 1; // forced 233 | $export.G = 2; // global 234 | $export.S = 4; // static 235 | $export.P = 8; // proto 236 | $export.B = 16; // bind 237 | $export.W = 32; // wrap 238 | module.exports = $export; 239 | 240 | /***/ }, 241 | /* 8 */ 242 | /***/ function(module, exports) { 243 | 244 | // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 245 | var global = module.exports = typeof window != 'undefined' && window.Math == Math 246 | ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); 247 | if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef 248 | 249 | /***/ }, 250 | /* 9 */ 251 | /***/ function(module, exports) { 252 | 253 | var core = module.exports = {version: '1.2.6'}; 254 | if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef 255 | 256 | /***/ }, 257 | /* 10 */ 258 | /***/ function(module, exports, __webpack_require__) { 259 | 260 | // optional / simple context binding 261 | var aFunction = __webpack_require__(11); 262 | module.exports = function(fn, that, length){ 263 | aFunction(fn); 264 | if(that === undefined)return fn; 265 | switch(length){ 266 | case 1: return function(a){ 267 | return fn.call(that, a); 268 | }; 269 | case 2: return function(a, b){ 270 | return fn.call(that, a, b); 271 | }; 272 | case 3: return function(a, b, c){ 273 | return fn.call(that, a, b, c); 274 | }; 275 | } 276 | return function(/* ...args */){ 277 | return fn.apply(that, arguments); 278 | }; 279 | }; 280 | 281 | /***/ }, 282 | /* 11 */ 283 | /***/ function(module, exports) { 284 | 285 | module.exports = function(it){ 286 | if(typeof it != 'function')throw TypeError(it + ' is not a function!'); 287 | return it; 288 | }; 289 | 290 | /***/ }, 291 | /* 12 */ 292 | /***/ function(module, exports, __webpack_require__) { 293 | 294 | // 19.1.2.1 Object.assign(target, source, ...) 295 | var $ = __webpack_require__(13) 296 | , toObject = __webpack_require__(14) 297 | , IObject = __webpack_require__(16); 298 | 299 | // should work with symbols and should have deterministic property order (V8 bug) 300 | module.exports = __webpack_require__(18)(function(){ 301 | var a = Object.assign 302 | , A = {} 303 | , B = {} 304 | , S = Symbol() 305 | , K = 'abcdefghijklmnopqrst'; 306 | A[S] = 7; 307 | K.split('').forEach(function(k){ B[k] = k; }); 308 | return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K; 309 | }) ? function assign(target, source){ // eslint-disable-line no-unused-vars 310 | var T = toObject(target) 311 | , $$ = arguments 312 | , $$len = $$.length 313 | , index = 1 314 | , getKeys = $.getKeys 315 | , getSymbols = $.getSymbols 316 | , isEnum = $.isEnum; 317 | while($$len > index){ 318 | var S = IObject($$[index++]) 319 | , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) 320 | , length = keys.length 321 | , j = 0 322 | , key; 323 | while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; 324 | } 325 | return T; 326 | } : Object.assign; 327 | 328 | /***/ }, 329 | /* 13 */ 330 | /***/ function(module, exports) { 331 | 332 | var $Object = Object; 333 | module.exports = { 334 | create: $Object.create, 335 | getProto: $Object.getPrototypeOf, 336 | isEnum: {}.propertyIsEnumerable, 337 | getDesc: $Object.getOwnPropertyDescriptor, 338 | setDesc: $Object.defineProperty, 339 | setDescs: $Object.defineProperties, 340 | getKeys: $Object.keys, 341 | getNames: $Object.getOwnPropertyNames, 342 | getSymbols: $Object.getOwnPropertySymbols, 343 | each: [].forEach 344 | }; 345 | 346 | /***/ }, 347 | /* 14 */ 348 | /***/ function(module, exports, __webpack_require__) { 349 | 350 | // 7.1.13 ToObject(argument) 351 | var defined = __webpack_require__(15); 352 | module.exports = function(it){ 353 | return Object(defined(it)); 354 | }; 355 | 356 | /***/ }, 357 | /* 15 */ 358 | /***/ function(module, exports) { 359 | 360 | // 7.2.1 RequireObjectCoercible(argument) 361 | module.exports = function(it){ 362 | if(it == undefined)throw TypeError("Can't call method on " + it); 363 | return it; 364 | }; 365 | 366 | /***/ }, 367 | /* 16 */ 368 | /***/ function(module, exports, __webpack_require__) { 369 | 370 | // fallback for non-array-like ES3 and non-enumerable old V8 strings 371 | var cof = __webpack_require__(17); 372 | module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ 373 | return cof(it) == 'String' ? it.split('') : Object(it); 374 | }; 375 | 376 | /***/ }, 377 | /* 17 */ 378 | /***/ function(module, exports) { 379 | 380 | var toString = {}.toString; 381 | 382 | module.exports = function(it){ 383 | return toString.call(it).slice(8, -1); 384 | }; 385 | 386 | /***/ }, 387 | /* 18 */ 388 | /***/ function(module, exports) { 389 | 390 | module.exports = function(exec){ 391 | try { 392 | return !!exec(); 393 | } catch(e){ 394 | return true; 395 | } 396 | }; 397 | 398 | /***/ }, 399 | /* 19 */ 400 | /***/ function(module, exports) { 401 | 402 | module.exports = __WEBPACK_EXTERNAL_MODULE_19__; 403 | 404 | /***/ }, 405 | /* 20 */ 406 | /***/ function(module, exports) { 407 | 408 | module.exports = __WEBPACK_EXTERNAL_MODULE_20__; 409 | 410 | /***/ }, 411 | /* 21 */ 412 | /***/ function(module, exports, __webpack_require__) { 413 | 414 | 'use strict'; 415 | 416 | var _interopRequireDefault = __webpack_require__(1)['default']; 417 | 418 | Object.defineProperty(exports, '__esModule', { 419 | value: true 420 | }); 421 | 422 | var _reactAddons = __webpack_require__(20); 423 | 424 | var _reactAddons2 = _interopRequireDefault(_reactAddons); 425 | 426 | var propTypes = function propTypes() { 427 | return { 428 | appear: _reactAddons2['default'].PropTypes.oneOfType([_reactAddons2['default'].PropTypes.string, _reactAddons2['default'].PropTypes.object, _reactAddons2['default'].PropTypes.array]), 429 | enter: _reactAddons2['default'].PropTypes.oneOfType([_reactAddons2['default'].PropTypes.string, _reactAddons2['default'].PropTypes.object, _reactAddons2['default'].PropTypes.array]), 430 | leave: _reactAddons2['default'].PropTypes.oneOfType([_reactAddons2['default'].PropTypes.string, _reactAddons2['default'].PropTypes.object, _reactAddons2['default'].PropTypes.array]), 431 | easing: _reactAddons2['default'].PropTypes.oneOfType([_reactAddons2['default'].PropTypes.string, _reactAddons2['default'].PropTypes.array]), 432 | delay: _reactAddons2['default'].PropTypes.number, 433 | duration: _reactAddons2['default'].PropTypes.number, 434 | options: _reactAddons2['default'].PropTypes.object 435 | }; 436 | }; 437 | 438 | exports['default'] = propTypes; 439 | module.exports = exports['default']; 440 | 441 | /***/ }, 442 | /* 22 */ 443 | /***/ function(module, exports, __webpack_require__) { 444 | 445 | 'use strict'; 446 | 447 | var _Object$assign = __webpack_require__(4)['default']; 448 | 449 | var _interopRequireDefault = __webpack_require__(1)['default']; 450 | 451 | Object.defineProperty(exports, '__esModule', { 452 | value: true 453 | }); 454 | 455 | var _lodash = __webpack_require__(19); 456 | 457 | var _lodash2 = _interopRequireDefault(_lodash); 458 | 459 | var _reactAddons = __webpack_require__(20); 460 | 461 | var _reactAddons2 = _interopRequireDefault(_reactAddons); 462 | 463 | var _velocityAnimate = __webpack_require__(23); 464 | 465 | var _velocityAnimate2 = _interopRequireDefault(_velocityAnimate); 466 | 467 | var _propTypes = __webpack_require__(21); 468 | 469 | var _propTypes2 = _interopRequireDefault(_propTypes); 470 | 471 | var ReactVelocityTransitionGroupChild = _reactAddons2['default'].createClass({ 472 | displayName: 'ReactVelocityTransitionGroupChild', 473 | 474 | propTypes: (0, _propTypes2['default'])(), 475 | 476 | getDefaultProps: function getDefaultProps() { 477 | return { 478 | options: {} 479 | }; 480 | }, 481 | 482 | _transition: function _transition(transition, done) { 483 | var _this = this; 484 | 485 | var node = _reactAddons2['default'].findDOMNode(this); 486 | 487 | var options = _Object$assign({}, { 488 | duration: this.props.duration, 489 | complete: function complete() { 490 | _this._transitionCallback(done); 491 | }, 492 | easing: this.props.easing 493 | }, this.props.options); 494 | 495 | (0, _velocityAnimate2['default'])(node, transition, options); 496 | }, 497 | 498 | _transitionCallback: function _transitionCallback(done) { 499 | if (!this.isMounted()) return; 500 | done(); 501 | }, 502 | 503 | componentWillAppear: function componentWillAppear(done) { 504 | if (this.props.appear) { 505 | this._transition(this.props.appear, done); 506 | } else { 507 | done(); 508 | } 509 | }, 510 | 511 | componentWillEnter: function componentWillEnter(done) { 512 | var transition = this.props.enter; 513 | 514 | if (_lodash2['default'].isUndefined(transition)) { 515 | transition = this.props.appear; 516 | } 517 | 518 | if (transition) { 519 | this._transition(transition, done); 520 | } else { 521 | done(); 522 | } 523 | }, 524 | 525 | componentWillLeave: function componentWillLeave(done) { 526 | if (this.props.leave) { 527 | this._transition(this.props.leave, done); 528 | } else { 529 | done(); 530 | } 531 | }, 532 | 533 | render: function render() { 534 | return _reactAddons2['default'].Children.only(this.props.children); 535 | } 536 | }); 537 | 538 | exports['default'] = ReactVelocityTransitionGroupChild; 539 | module.exports = exports['default']; 540 | 541 | /***/ }, 542 | /* 23 */ 543 | /***/ function(module, exports) { 544 | 545 | module.exports = __WEBPACK_EXTERNAL_MODULE_23__; 546 | 547 | /***/ } 548 | /******/ ]) 549 | }); 550 | ; 551 | //# sourceMappingURL=ReactVelocityTransitionGroup.map -------------------------------------------------------------------------------- /dist/ReactVelocityTransitionGroup.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 8279da0a7e3d9551eddb","webpack:///./index.js","webpack:///./~/babel-runtime/helpers/interop-require-default.js","webpack:///./lib/ReactVelocityTransitionGroup.js","webpack:///./~/babel-runtime/helpers/extends.js","webpack:///./~/babel-runtime/core-js/object/assign.js","webpack:///./~/core-js/library/fn/object/assign.js","webpack:///./~/core-js/library/modules/es6.object.assign.js","webpack:///./~/core-js/library/modules/$.export.js","webpack:///./~/core-js/library/modules/$.global.js","webpack:///./~/core-js/library/modules/$.core.js","webpack:///./~/core-js/library/modules/$.ctx.js","webpack:///./~/core-js/library/modules/$.a-function.js","webpack:///./~/core-js/library/modules/$.object-assign.js","webpack:///./~/core-js/library/modules/$.js","webpack:///./~/core-js/library/modules/$.to-object.js","webpack:///./~/core-js/library/modules/$.defined.js","webpack:///./~/core-js/library/modules/$.iobject.js","webpack:///./~/core-js/library/modules/$.cof.js","webpack:///./~/core-js/library/modules/$.fails.js","webpack:///external {\"root\":\"_\",\"commonjs2\":\"lodash\",\"commonjs\":\"lodash\",\"amd\":\"lodash\"}","webpack:///external {\"root\":\"React\",\"commonjs2\":\"react/addons\",\"commonjs\":\"react/addons\",\"amd\":\"react/addons\"}","webpack:///./lib/propTypes.js","webpack:///./lib/ReactVelocityTransitionGroupChild.js","webpack:///external {\"root\":\"Velocity\",\"commonjs2\":\"velocity-animate\",\"commonjs\":\"velocity-animate\",\"amd\":\"velocity-animate\"}"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;4DCtCyC,CAAoC;;;;;;;;;;;ACA7E;;AAEA;AACA;AACA;AACA;AACA;;AAEA,2B;;;;;;;;;;;;;;;;mCCRc,EAAQ;;;;wCACJ,EAAc;;;;sCAGV,EAAa;;;;8DACW,EAAqC;;;;AAHnF,KAAM,oBAAoB,GAAG,yBAAM,MAAM,CAAC,eAAe,CAAC;;AAK1D,KAAM,iBAAiB,GAAG,CACxB,QAAQ,EACR,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,EACP,UAAU,EACV,SAAS,CACV,CAAC;;AAEF,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CAAC;;AAElC,SAAI,oBAAE,WAAW,CAAC,UAAU,CAAC,EAAE;AAC7B,iBAAU,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;MAChC;;AAED,SAAI,UAAU,EAAE;AACd,WAAI,CAAC,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;MACpC,MAAM;AACL,WAAI,EAAE,CAAC;MACR;IACF;;AAED,qBAAkB,EAAE,4BAAS,IAAI,EAAE;AACjC,SAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;AACpB,WAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;MAC1C,MAAM;AACL,WAAI,EAAE,CAAC;MACR;IACF;;AAED,SAAM,EAAE,kBAAW;AACjB,YAAO,yBAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACjD;EACF,CAAC,CAAC;;sBAEY,iCAAiC;;;;;;;AC3EhD,iD","file":"ReactVelocityTransitionGroup.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"lodash\"), require(\"react/addons\"), require(\"velocity-animate\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"lodash\", \"react/addons\", \"velocity-animate\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactVelocityTransitionGroup\"] = factory(require(\"lodash\"), require(\"react/addons\"), require(\"velocity-animate\"));\n\telse\n\t\troot[\"ReactVelocityTransitionGroup\"] = factory(root[\"_\"], root[\"React\"], root[\"Velocity\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_19__, __WEBPACK_EXTERNAL_MODULE_20__, __WEBPACK_EXTERNAL_MODULE_23__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 8279da0a7e3d9551eddb\n **/","import ReactVelocityTransitionGroup from './lib/ReactVelocityTransitionGroup';\nexport default ReactVelocityTransitionGroup;\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","\"use strict\";\n\nexports[\"default\"] = function (obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n};\n\nexports.__esModule = true;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/interop-require-default.js\n ** module id = 1\n ** module chunks = 0\n **/","import _ from 'lodash';\nimport React from 'react/addons';\nconst ReactTransitionGroup = React.addons.TransitionGroup;\n\nimport propTypes from './propTypes';\nimport ReactVelocityTransitionGroupChild from './ReactVelocityTransitionGroupChild';\n\nconst allowedChildProps = [\n 'appear',\n 'enter',\n 'leave',\n 'easing',\n 'delay',\n 'duration',\n 'options'\n];\n\nlet ReactVelocityTransitionGroup = React.createClass({\n type: 'ReactTransitionGroup',\n propTypes: propTypes(),\n\n _wrapChild: function(child) {\n let childProps = _.extend({}, _.pick(this.props, allowedChildProps));\n return (\n \n {child}\n \n );\n },\n\n render: function() {\n return (\n \n );\n }\n});\n\nexport default ReactVelocityTransitionGroup;\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/ReactVelocityTransitionGroup.js\n **/","\"use strict\";\n\nvar _Object$assign = require(\"babel-runtime/core-js/object/assign\")[\"default\"];\n\nexports[\"default\"] = _Object$assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nexports.__esModule = true;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/extends.js\n ** module id = 3\n ** module chunks = 0\n **/","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/assign.js\n ** module id = 4\n ** module chunks = 0\n **/","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/$.core').Object.assign;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/fn/object/assign.js\n ** module id = 5\n ** module chunks = 0\n **/","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./$.export');\n\n$export($export.S + $export.F, 'Object', {assign: require('./$.object-assign')});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/es6.object.assign.js\n ** module id = 6\n ** module chunks = 0\n **/","var global = require('./$.global')\n , core = require('./$.core')\n , ctx = require('./$.ctx')\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && key in target;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(param){\n return this instanceof C ? new C(param) : C(param);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\nmodule.exports = $export;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.export.js\n ** module id = 7\n ** module chunks = 0\n **/","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\nif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.global.js\n ** module id = 8\n ** module chunks = 0\n **/","var core = module.exports = {version: '1.2.6'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.core.js\n ** module id = 9\n ** module chunks = 0\n **/","// optional / simple context binding\nvar aFunction = require('./$.a-function');\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.ctx.js\n ** module id = 10\n ** module chunks = 0\n **/","module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.a-function.js\n ** module id = 11\n ** module chunks = 0\n **/","// 19.1.2.1 Object.assign(target, source, ...)\nvar $ = require('./$')\n , toObject = require('./$.to-object')\n , IObject = require('./$.iobject');\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = require('./$.fails')(function(){\n var a = Object.assign\n , A = {}\n , B = {}\n , S = Symbol()\n , K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function(k){ B[k] = k; });\n return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K;\n}) ? function assign(target, source){ // eslint-disable-line no-unused-vars\n var T = toObject(target)\n , $$ = arguments\n , $$len = $$.length\n , index = 1\n , getKeys = $.getKeys\n , getSymbols = $.getSymbols\n , isEnum = $.isEnum;\n while($$len > index){\n var S = IObject($$[index++])\n , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)\n , length = keys.length\n , j = 0\n , key;\n while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];\n }\n return T;\n} : Object.assign;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.object-assign.js\n ** module id = 12\n ** module chunks = 0\n **/","var $Object = Object;\nmodule.exports = {\n create: $Object.create,\n getProto: $Object.getPrototypeOf,\n isEnum: {}.propertyIsEnumerable,\n getDesc: $Object.getOwnPropertyDescriptor,\n setDesc: $Object.defineProperty,\n setDescs: $Object.defineProperties,\n getKeys: $Object.keys,\n getNames: $Object.getOwnPropertyNames,\n getSymbols: $Object.getOwnPropertySymbols,\n each: [].forEach\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.js\n ** module id = 13\n ** module chunks = 0\n **/","// 7.1.13 ToObject(argument)\nvar defined = require('./$.defined');\nmodule.exports = function(it){\n return Object(defined(it));\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.to-object.js\n ** module id = 14\n ** module chunks = 0\n **/","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function(it){\n if(it == undefined)throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.defined.js\n ** module id = 15\n ** module chunks = 0\n **/","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./$.cof');\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.iobject.js\n ** module id = 16\n ** module chunks = 0\n **/","var toString = {}.toString;\n\nmodule.exports = function(it){\n return toString.call(it).slice(8, -1);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.cof.js\n ** module id = 17\n ** module chunks = 0\n **/","module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/core-js/library/modules/$.fails.js\n ** module id = 18\n ** module chunks = 0\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_19__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"root\":\"_\",\"commonjs2\":\"lodash\",\"commonjs\":\"lodash\",\"amd\":\"lodash\"}\n ** module id = 19\n ** module chunks = 0\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_20__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"root\":\"React\",\"commonjs2\":\"react/addons\",\"commonjs\":\"react/addons\",\"amd\":\"react/addons\"}\n ** module id = 20\n ** module chunks = 0\n **/","import React from 'react/addons';\n\nconst propTypes = () => {\n return {\n appear: React.PropTypes.oneOfType([\n React.PropTypes.string,\n React.PropTypes.object,\n React.PropTypes.array\n ]),\n enter: React.PropTypes.oneOfType([\n React.PropTypes.string,\n React.PropTypes.object,\n React.PropTypes.array\n ]),\n leave: React.PropTypes.oneOfType([\n React.PropTypes.string,\n React.PropTypes.object,\n React.PropTypes.array\n ]),\n easing: React.PropTypes.oneOfType([\n React.PropTypes.string,\n React.PropTypes.array\n ]),\n delay: React.PropTypes.number,\n duration: React.PropTypes.number,\n options: React.PropTypes.object\n };\n};\n\nexport default propTypes;\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/propTypes.js\n **/","import _ from 'lodash';\nimport React from 'react/addons';\nimport velocity from 'velocity-animate';\n\nimport propTypes from './propTypes';\n\nlet ReactVelocityTransitionGroupChild = React.createClass({\n\n propTypes: propTypes(),\n\n getDefaultProps() {\n return {\n options: {}\n };\n },\n\n _transition(transition, done) {\n let node = React.findDOMNode(this);\n\n let options = Object.assign({}, {\n duration: this.props.duration,\n complete: () => {\n this._transitionCallback(done);\n },\n easing: this.props.easing\n }, this.props.options);\n\n velocity(\n node,\n transition,\n options\n );\n\n },\n\n _transitionCallback(done) {\n if (!this.isMounted()) return;\n done();\n },\n\n componentWillAppear: function(done) {\n if (this.props.appear) {\n this._transition(this.props.appear, done);\n } else {\n done();\n }\n },\n\n componentWillEnter: function(done) {\n let transition = this.props.enter;\n\n if (_.isUndefined(transition)) {\n transition = this.props.appear;\n }\n\n if (transition) {\n this._transition(transition, done);\n } else {\n done();\n }\n },\n\n componentWillLeave: function(done) {\n if (this.props.leave) {\n this._transition(this.props.leave, done);\n } else {\n done();\n }\n },\n\n render: function() {\n return React.Children.only(this.props.children);\n }\n});\n\nexport default ReactVelocityTransitionGroupChild;\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/ReactVelocityTransitionGroupChild.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_23__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"root\":\"Velocity\",\"commonjs2\":\"velocity-animate\",\"commonjs\":\"velocity-animate\",\"amd\":\"velocity-animate\"}\n ** module id = 23\n ** module chunks = 0\n **/"],"sourceRoot":""} -------------------------------------------------------------------------------- /dist/ReactVelocityTransitionGroup.min.js: -------------------------------------------------------------------------------- 1 | !function(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory(require("lodash"),require("react/addons"),require("velocity-animate")):"function"==typeof define&&define.amd?define(["lodash","react/addons","velocity-animate"],factory):"object"==typeof exports?exports.ReactVelocityTransitionGroup=factory(require("lodash"),require("react/addons"),require("velocity-animate")):root.ReactVelocityTransitionGroup=factory(root._,root.React,root.Velocity)}(this,function(__WEBPACK_EXTERNAL_MODULE_19__,__WEBPACK_EXTERNAL_MODULE_20__,__WEBPACK_EXTERNAL_MODULE_23__){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="dist/",__webpack_require__(0)}([function(module,exports,__webpack_require__){"use strict";var _interopRequireDefault=__webpack_require__(1)["default"];Object.defineProperty(exports,"__esModule",{value:!0});var _libReactVelocityTransitionGroup=__webpack_require__(2),_libReactVelocityTransitionGroup2=_interopRequireDefault(_libReactVelocityTransitionGroup);exports["default"]=_libReactVelocityTransitionGroup2["default"],module.exports=exports["default"]},function(module,exports){"use strict";exports["default"]=function(obj){return obj&&obj.__esModule?obj:{"default":obj}},exports.__esModule=!0},function(module,exports,__webpack_require__){"use strict";var _extends=__webpack_require__(3)["default"],_interopRequireDefault=__webpack_require__(1)["default"];Object.defineProperty(exports,"__esModule",{value:!0});var _lodash=__webpack_require__(19),_lodash2=_interopRequireDefault(_lodash),_reactAddons=__webpack_require__(20),_reactAddons2=_interopRequireDefault(_reactAddons),_propTypes=__webpack_require__(21),_propTypes2=_interopRequireDefault(_propTypes),_ReactVelocityTransitionGroupChild=__webpack_require__(22),_ReactVelocityTransitionGroupChild2=_interopRequireDefault(_ReactVelocityTransitionGroupChild),ReactTransitionGroup=_reactAddons2["default"].addons.TransitionGroup,allowedChildProps=["appear","enter","leave","easing","delay","duration","options"],ReactVelocityTransitionGroup=_reactAddons2["default"].createClass({displayName:"ReactVelocityTransitionGroup",type:"ReactTransitionGroup",propTypes:(0,_propTypes2["default"])(),_wrapChild:function(child){var childProps=_lodash2["default"].extend({},_lodash2["default"].pick(this.props,allowedChildProps));return _reactAddons2["default"].createElement(_ReactVelocityTransitionGroupChild2["default"],childProps,child)},render:function(){return _reactAddons2["default"].createElement(ReactTransitionGroup,_extends({},this.props,{childFactory:this._wrapChild}))}});exports["default"]=ReactVelocityTransitionGroup,module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";var _Object$assign=__webpack_require__(4)["default"];exports["default"]=_Object$assign||function(target){for(var i=1;iindex;)for(var key,S=IObject($$[index++]),keys=getSymbols?getKeys(S).concat(getSymbols(S)):getKeys(S),length=keys.length,j=0;length>j;)isEnum.call(S,key=keys[j++])&&(T[key]=S[key]);return T}:Object.assign},function(module,exports){var $Object=Object;module.exports={create:$Object.create,getProto:$Object.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:$Object.getOwnPropertyDescriptor,setDesc:$Object.defineProperty,setDescs:$Object.defineProperties,getKeys:$Object.keys,getNames:$Object.getOwnPropertyNames,getSymbols:$Object.getOwnPropertySymbols,each:[].forEach}},function(module,exports,__webpack_require__){var defined=__webpack_require__(15);module.exports=function(it){return Object(defined(it))}},function(module,exports){module.exports=function(it){if(void 0==it)throw TypeError("Can't call method on "+it);return it}},function(module,exports,__webpack_require__){var cof=__webpack_require__(17);module.exports=Object("z").propertyIsEnumerable(0)?Object:function(it){return"String"==cof(it)?it.split(""):Object(it)}},function(module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},function(module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return!0}}},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_19__},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_20__},function(module,exports,__webpack_require__){"use strict";var _interopRequireDefault=__webpack_require__(1)["default"];Object.defineProperty(exports,"__esModule",{value:!0});var _reactAddons=__webpack_require__(20),_reactAddons2=_interopRequireDefault(_reactAddons),propTypes=function(){return{appear:_reactAddons2["default"].PropTypes.oneOfType([_reactAddons2["default"].PropTypes.string,_reactAddons2["default"].PropTypes.object,_reactAddons2["default"].PropTypes.array]),enter:_reactAddons2["default"].PropTypes.oneOfType([_reactAddons2["default"].PropTypes.string,_reactAddons2["default"].PropTypes.object,_reactAddons2["default"].PropTypes.array]),leave:_reactAddons2["default"].PropTypes.oneOfType([_reactAddons2["default"].PropTypes.string,_reactAddons2["default"].PropTypes.object,_reactAddons2["default"].PropTypes.array]),easing:_reactAddons2["default"].PropTypes.oneOfType([_reactAddons2["default"].PropTypes.string,_reactAddons2["default"].PropTypes.array]),delay:_reactAddons2["default"].PropTypes.number,duration:_reactAddons2["default"].PropTypes.number,options:_reactAddons2["default"].PropTypes.object}};exports["default"]=propTypes,module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";var _Object$assign=__webpack_require__(4)["default"],_interopRequireDefault=__webpack_require__(1)["default"];Object.defineProperty(exports,"__esModule",{value:!0});var _lodash=__webpack_require__(19),_lodash2=_interopRequireDefault(_lodash),_reactAddons=__webpack_require__(20),_reactAddons2=_interopRequireDefault(_reactAddons),_velocityAnimate=__webpack_require__(23),_velocityAnimate2=_interopRequireDefault(_velocityAnimate),_propTypes=__webpack_require__(21),_propTypes2=_interopRequireDefault(_propTypes),ReactVelocityTransitionGroupChild=_reactAddons2["default"].createClass({displayName:"ReactVelocityTransitionGroupChild",propTypes:(0,_propTypes2["default"])(),getDefaultProps:function(){return{options:{}}},_transition:function(transition,done){var _this=this,node=_reactAddons2["default"].findDOMNode(this),options=_Object$assign({},{duration:this.props.duration,complete:function(){_this._transitionCallback(done)},easing:this.props.easing},this.props.options);(0,_velocityAnimate2["default"])(node,transition,options)},_transitionCallback:function(done){this.isMounted()&&done()},componentWillAppear:function(done){this.props.appear?this._transition(this.props.appear,done):done()},componentWillEnter:function(done){var transition=this.props.enter;_lodash2["default"].isUndefined(transition)&&(transition=this.props.appear),transition?this._transition(transition,done):done()},componentWillLeave:function(done){this.props.leave?this._transition(this.props.leave,done):done()},render:function(){return _reactAddons2["default"].Children.only(this.props.children)}});exports["default"]=ReactVelocityTransitionGroupChild,module.exports=exports["default"]},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_23__}])}); 2 | //# sourceMappingURL=ReactVelocityTransitionGroup.min.map -------------------------------------------------------------------------------- /dist/ReactVelocityTransitionGroup.min.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["dist/ReactVelocityTransitionGroup.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_19__","__WEBPACK_EXTERNAL_MODULE_20__","__WEBPACK_EXTERNAL_MODULE_23__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","Object","defineProperty","value","_libReactVelocityTransitionGroup","_libReactVelocityTransitionGroup2","obj","__esModule","default","_extends","_lodash","_lodash2","_reactAddons","_reactAddons2","_propTypes","_propTypes2","_ReactVelocityTransitionGroupChild","_ReactVelocityTransitionGroupChild2","ReactTransitionGroup","addons","TransitionGroup","allowedChildProps","ReactVelocityTransitionGroup","createClass","displayName","type","propTypes","_wrapChild","child","childProps","extend","pick","props","createElement","render","childFactory","_Object$assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","assign","$export","S","F","global","core","ctx","PROTOTYPE","name","own","out","IS_FORCED","IS_GLOBAL","G","IS_STATIC","IS_PROTO","P","IS_BIND","B","IS_WRAP","W","C","param","Function","window","Math","self","__g","version","__e","aFunction","fn","that","undefined","a","b","apply","it","TypeError","$","toObject","IObject","A","Symbol","K","split","forEach","k","keys","join","T","$$","$$len","index","getKeys","getSymbols","isEnum","concat","j","$Object","create","getProto","getPrototypeOf","propertyIsEnumerable","getDesc","getOwnPropertyDescriptor","setDesc","setDescs","defineProperties","getNames","getOwnPropertyNames","getOwnPropertySymbols","each","defined","cof","toString","slice","exec","e","appear","PropTypes","oneOfType","string","object","array","enter","leave","easing","delay","number","duration","options","_velocityAnimate","_velocityAnimate2","ReactVelocityTransitionGroupChild","getDefaultProps","_transition","transition","done","_this","node","findDOMNode","complete","_transitionCallback","isMounted","componentWillAppear","componentWillEnter","isUndefined","componentWillLeave","Children","only","children"],"mappings":"CAAA,SAA2CA,KAAMC,SAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,QAAQG,QAAQ,UAAWA,QAAQ,gBAAiBA,QAAQ,qBACpD,kBAAXC,SAAyBA,OAAOC,IAC9CD,QAAQ,SAAU,eAAgB,oBAAqBJ,SAC7B,gBAAZC,SACdA,QAAsC,6BAAID,QAAQG,QAAQ,UAAWA,QAAQ,gBAAiBA,QAAQ,qBAEtGJ,KAAmC,6BAAIC,QAAQD,KAAQ,EAAGA,KAAY,MAAGA,KAAe,WACvFO,KAAM,SAASC,+BAAgCC,+BAAgCC,gCAClF,MAAgB,UAAUC,SAKhB,QAASC,qBAAoBC,UAG5B,GAAGC,iBAAiBD,UACnB,MAAOC,kBAAiBD,UAAUX,OAGnC,IAAIC,QAASW,iBAAiBD,WAC7BX,WACAa,GAAIF,SACJG,QAAQ,EAUT,OANAL,SAAQE,UAAUI,KAAKd,OAAOD,QAASC,OAAQA,OAAOD,QAASU,qBAG/DT,OAAOa,QAAS,EAGTb,OAAOD,QAvBf,GAAIY,oBAqCJ,OATAF,qBAAoBM,EAAIP,QAGxBC,oBAAoBO,EAAIL,iBAGxBF,oBAAoBQ,EAAI,QAGjBR,oBAAoB,KAK/B,SAAST,OAAQD,QAASU,qBAE/B,YAEA,IAAIS,w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AAMH,WAAYN,UAGtDY,oBAAqB,SAA6BL,MAC3C7J,KAAKmK,aACVN,QAGFO,oBAAqB,SAA6BP,MAC5C7J,KAAK8C,MAAM4F,OACb1I,KAAK2J,YAAY3J,KAAK8C,MAAM4F,OAAQmB,MAEpCA,QAIJQ,mBAAoB,SAA4BR,MAC9C,GAAID,YAAa5J,KAAK8C,MAAMkG,KAExBvH,UAAS,WAAW6I,YAAYV,cAClCA,WAAa5J,KAAK8C,MAAM4F,QAGtBkB,WACF5J,KAAK2J,YAAYC,WAAYC,MAE7BA,QAIJU,mBAAoB,SAA4BV,MAC1C7J,KAAK8C,MAAMmG,MACbjJ,KAAK2J,YAAY3J,KAAK8C,MAAMmG,MAAOY,MAEnCA,QAIJ7G,OAAQ,WACN,MAAOrB,eAAc,WAAW6I,SAASC,KAAKzK,KAAK8C,MAAM4H,YAI7D/K,SAAQ,WAAa8J,kCACrB7J,OAAOD,QAAUA,QAAQ,YAIpB,SAASC,OAAQD,SAEtBC,OAAOD,QAAUQ","file":"dist/ReactVelocityTransitionGroup.min.js"} -------------------------------------------------------------------------------- /example/example.js: -------------------------------------------------------------------------------- 1 | 2 | var itemStyle = { 3 | display: 'block', 4 | height: 50, 5 | fontFamily: 'helvetica, arial, sans-serif', 6 | marginBottom: 5, 7 | marginRight: 5, 8 | flex: 1, 9 | color: 'white', 10 | lineHeight: '50px', 11 | padding: 10, 12 | fontSize: '2rem' 13 | }; 14 | 15 | 16 | var App = React.createClass({ 17 | 18 | getInitialState: function() { 19 | return { 20 | showChildren: true, 21 | items: [1, 2, 3], 22 | colors: ['blue', 'red'] 23 | }; 24 | }, 25 | 26 | toggle: function() { 27 | this.setState({showChildren: !this.state.showChildren}); 28 | }, 29 | 30 | addOne: function() { 31 | var items = _.clone(this.state.items); 32 | items.push(items.length + 1); 33 | this.setState({items: items}); 34 | }, 35 | 36 | subtractOne: function() { 37 | var items = _.clone(this.state.items); 38 | items.pop(); 39 | this.setState({items: items}); 40 | }, 41 | 42 | reRender: function() { 43 | this.setState({colors: this.state.colors.reverse()}); 44 | }, 45 | 46 | getItems: function(backgroundColor) { 47 | if (!this.state.showChildren) return null; 48 | var styl = _.extend({}, itemStyle, {backgroundColor: backgroundColor}); 49 | return this.state.items.map(function(item, i) { 50 | return
{item}
51 | }); 52 | }, 53 | 54 | render: function () { 55 | return ( 56 |
57 | 58 | 59 | 60 | 61 |
62 | 63 | 70 | {this.getItems(this.state.colors[0])} 71 | 72 | 73 | 79 | {this.getItems(this.state.colors[1])} 80 | 81 | 82 |
83 |
84 | ); 85 | } 86 | }); 87 | 88 | React.render(, document.querySelector('#main')); 89 | -------------------------------------------------------------------------------- /example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ReactVelocityTransitionGroup Example 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | import ReactVelocityTransitionGroup from './lib/ReactVelocityTransitionGroup'; 2 | export default ReactVelocityTransitionGroup; 3 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | var webpackConfig = require('./webpack.config'); 2 | 3 | module.exports = function(config) { 4 | config.set({ 5 | 6 | basePath: '', 7 | 8 | frameworks: ['jasmine'], 9 | 10 | files: [ 11 | 'specs/main.js' 12 | ], 13 | 14 | exclude: [ 15 | ], 16 | 17 | preprocessors: { 18 | 'specs/main.js': ['webpack', 'sourcemap'] 19 | }, 20 | 21 | webpack: { 22 | module: webpackConfig.module 23 | }, 24 | 25 | webpackServer: { 26 | stats: { 27 | colors: true 28 | } 29 | }, 30 | 31 | reporters: ['progress'], 32 | 33 | port: 9876, 34 | 35 | colors: true, 36 | 37 | logLevel: config.LOG_INFO, 38 | 39 | autoWatch: false, 40 | 41 | browsers: ['PhantomJS'], 42 | 43 | singleRun: false 44 | }); 45 | }; 46 | -------------------------------------------------------------------------------- /lib/ReactVelocityTransitionGroup.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import React from 'react/addons'; 3 | const ReactTransitionGroup = React.addons.TransitionGroup; 4 | 5 | import propTypes from './propTypes'; 6 | import ReactVelocityTransitionGroupChild from './ReactVelocityTransitionGroupChild'; 7 | 8 | const allowedChildProps = [ 9 | 'appear', 10 | 'enter', 11 | 'leave', 12 | 'easing', 13 | 'delay', 14 | 'duration', 15 | 'options' 16 | ]; 17 | 18 | let ReactVelocityTransitionGroup = React.createClass({ 19 | type: 'ReactTransitionGroup', 20 | propTypes: propTypes(), 21 | 22 | _wrapChild: function(child) { 23 | let childProps = _.extend({}, _.pick(this.props, allowedChildProps)); 24 | return ( 25 | 26 | {child} 27 | 28 | ); 29 | }, 30 | 31 | render: function() { 32 | return ( 33 | 34 | ); 35 | } 36 | }); 37 | 38 | export default ReactVelocityTransitionGroup; 39 | -------------------------------------------------------------------------------- /lib/ReactVelocityTransitionGroupChild.js: -------------------------------------------------------------------------------- 1 | import _ from 'lodash'; 2 | import React from 'react/addons'; 3 | import velocity from 'velocity-animate'; 4 | 5 | import propTypes from './propTypes'; 6 | 7 | let ReactVelocityTransitionGroupChild = React.createClass({ 8 | 9 | propTypes: propTypes(), 10 | 11 | getDefaultProps() { 12 | return { 13 | options: {} 14 | }; 15 | }, 16 | 17 | _transition(transition, done) { 18 | let node = React.findDOMNode(this); 19 | 20 | let options = Object.assign({}, { 21 | duration: this.props.duration, 22 | complete: () => { 23 | this._transitionCallback(done); 24 | }, 25 | easing: this.props.easing 26 | }, this.props.options); 27 | 28 | velocity( 29 | node, 30 | transition, 31 | options 32 | ); 33 | 34 | }, 35 | 36 | _transitionCallback(done) { 37 | if (!this.isMounted()) return; 38 | done(); 39 | }, 40 | 41 | componentWillAppear: function(done) { 42 | if (this.props.appear) { 43 | this._transition(this.props.appear, done); 44 | } else { 45 | done(); 46 | } 47 | }, 48 | 49 | componentWillEnter: function(done) { 50 | let transition = this.props.enter; 51 | 52 | if (_.isUndefined(transition)) { 53 | transition = this.props.appear; 54 | } 55 | 56 | if (transition) { 57 | this._transition(transition, done); 58 | } else { 59 | done(); 60 | } 61 | }, 62 | 63 | componentWillLeave: function(done) { 64 | if (this.props.leave) { 65 | this._transition(this.props.leave, done); 66 | } else { 67 | done(); 68 | } 69 | }, 70 | 71 | render: function() { 72 | return React.Children.only(this.props.children); 73 | } 74 | }); 75 | 76 | export default ReactVelocityTransitionGroupChild; 77 | -------------------------------------------------------------------------------- /lib/propTypes.js: -------------------------------------------------------------------------------- 1 | import React from 'react/addons'; 2 | 3 | const propTypes = () => { 4 | return { 5 | appear: React.PropTypes.oneOfType([ 6 | React.PropTypes.string, 7 | React.PropTypes.object, 8 | React.PropTypes.array 9 | ]), 10 | enter: React.PropTypes.oneOfType([ 11 | React.PropTypes.string, 12 | React.PropTypes.object, 13 | React.PropTypes.array 14 | ]), 15 | leave: React.PropTypes.oneOfType([ 16 | React.PropTypes.string, 17 | React.PropTypes.object, 18 | React.PropTypes.array 19 | ]), 20 | easing: React.PropTypes.oneOfType([ 21 | React.PropTypes.string, 22 | React.PropTypes.array 23 | ]), 24 | delay: React.PropTypes.number, 25 | duration: React.PropTypes.number, 26 | options: React.PropTypes.object 27 | }; 28 | }; 29 | 30 | export default propTypes; 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "velocity-transition-group", 3 | "version": "1.2.2", 4 | "description": "Velocity.js based replacement for ReactCSSTransitionGroup", 5 | "main": "dist/ReactVelocityTransitionGroup.js", 6 | "scripts": { 7 | "test": "karma start --single-run", 8 | "build": "script/build", 9 | "prepublish": "npm run build", 10 | "watch": "webpack-dev-server --watch --port 9001 --devtool inline-source-map" 11 | }, 12 | "browserify": { 13 | "transform": [ 14 | "reactify" 15 | ] 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "https://github.com/jakemhiller/ReactVelocityTransitionGroup.git" 20 | }, 21 | "keywords": [ 22 | "react", 23 | "react-component" 24 | ], 25 | "author": "Jake Hiller", 26 | "license": "MIT", 27 | "bugs": { 28 | "url": "https://github.com/jakemhiller/ReactVelocityTransitionGroup/issues" 29 | }, 30 | "homepage": "https://github.com/jakemhiller/ReactVelocityTransitionGroup", 31 | "dependencies": { 32 | "babel-runtime": "^5.5.4", 33 | "react": "0.13.3", 34 | "lodash": "^3.9.3", 35 | "velocity-animate": "^1.2.2" 36 | }, 37 | "devDependencies": { 38 | "babel": "^5.5.5", 39 | "babel-eslint": "^3.1.14", 40 | "babel-loader": "^5.1.4", 41 | "eslint": "^0.22.1", 42 | "eslint-loader": "^0.12.0", 43 | "eslint-plugin-react": "^2.5.0", 44 | "karma": "^0.12.19", 45 | "karma-cli": "0.0.4", 46 | "karma-jasmine": "^0.1.5", 47 | "karma-phantomjs-launcher": "^0.2.0", 48 | "karma-sourcemap-loader": "^0.3.5", 49 | "karma-webpack": "^1.2.1", 50 | "uglify-js": "^2.4.15", 51 | "webpack": "^1.9.10", 52 | "webpack-dev-server": "^1.9.0" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /script/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | webpack --devtool source-map 3 | 4 | node_modules/.bin/uglifyjs dist/ReactVelocityTransitionGroup.js \ 5 | --output dist/ReactVelocityTransitionGroup.min.js \ 6 | --source-map dist/ReactVelocityTransitionGroup.min.map \ 7 | --source-map-url ReactVelocityTransitionGroup.min.map \ 8 | --compress warnings=false 9 | -------------------------------------------------------------------------------- /specs/ReactVelocityTransitionGroup.spec.js: -------------------------------------------------------------------------------- 1 | import React from 'react/addons'; 2 | const TestUtils = React.addons.TestUtils; 3 | 4 | import ReactVelocityTransitionGroup from '../index'; 5 | 6 | describe('ReactVelocityTransitionGroup', () => { 7 | it('should render successfully', () => { 8 | let childNode =
test
; 9 | 10 | let transitionGroup = TestUtils.renderIntoDocument( 11 | 16 | {childNode} 17 | 18 | ); 19 | 20 | let renderedTransitionGroup = TestUtils.scryRenderedComponentsWithType( 21 | transitionGroup, ReactVelocityTransitionGroup 22 | ); 23 | 24 | expect(renderedTransitionGroup.length).toBe(1); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /specs/main.js: -------------------------------------------------------------------------------- 1 | // Require spec files here 2 | import 'babel/register'; 3 | import './ReactVelocityTransitionGroup.spec.js'; 4 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | 3 | module.exports = { 4 | entry: './index.js', 5 | output: { 6 | path: path.join(__dirname, 'dist'), 7 | publicPath: 'dist/', 8 | filename: 'ReactVelocityTransitionGroup.js', 9 | sourceMapFilename: 'ReactVelocityTransitionGroup.map', 10 | library: 'ReactVelocityTransitionGroup', 11 | libraryTarget: 'umd' 12 | }, 13 | externals: [ 14 | { 15 | 'react/addons': { 16 | root: 'React', 17 | commonjs2: 'react/addons', 18 | commonjs: 'react/addons', 19 | amd: 'react/addons' 20 | }, 21 | 'velocity-animate': { 22 | root: 'Velocity', 23 | commonjs2: 'velocity-animate', 24 | commonjs: 'velocity-animate', 25 | amd: 'velocity-animate' 26 | }, 27 | 'lodash': { 28 | root: '_', 29 | commonjs2: 'lodash', 30 | commonjs: 'lodash', 31 | amd: 'lodash' 32 | } 33 | } 34 | ], 35 | module: { 36 | loaders: [ 37 | { 38 | test: /\.js$/, 39 | exclude: /node_modules/, 40 | loader: 'babel-loader?optional[]=runtime&cacheDirectory' 41 | } 42 | ], 43 | preLoaders: [ 44 | { 45 | test: /\.js$/, 46 | loader: 'eslint-loader', 47 | exclude: /node_modules/ 48 | } 49 | ] 50 | }, 51 | eslint: { 52 | configFile: './.eslintrc', 53 | emitWarning: true, 54 | emitError: true 55 | }, 56 | plugins: [ 57 | ] 58 | }; 59 | --------------------------------------------------------------------------------