react-carousel-ninja
Advanced tools
Comparing version
{ | ||
"name": "react-carousel-ninja", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "author": "ahomu", |
@@ -9,3 +9,3 @@ /** | ||
* homepage: https://github.com/ahomu/react-carousel-ninja | ||
* version: 0.1.1 | ||
* version: 0.1.3 | ||
* | ||
@@ -223,2 +223,11 @@ * date-now: | ||
CarouselNinjaContainer.prototype.provideMouseEventHandlers = function provideMouseEventHandlers() { | ||
return this.props.swipe ? { | ||
onMouseDown: this.onMouseDown.bind(this), | ||
onMouseMove: this.onMouseMove.bind(this), | ||
onMouseUp: this.onMouseUp.bind(this), | ||
onMouseLeave: this.onMouseLeave.bind(this) | ||
} : null; | ||
}; | ||
CarouselNinjaContainer.prototype.handleSwipe = function handleSwipe() { | ||
@@ -289,3 +298,3 @@ var deltaAbsX = Math.abs(this.state.deltaX); | ||
} | ||
return React.createElement("div", { "className": 'CarouselNinjaContainer ' + (this.state.dragging ? 'CarouselNinjaContainer--dragging' : ''), "onMouseDown": this.onMouseDown.bind(this), "onMouseMove": this.onMouseMove.bind(this), "onMouseUp": this.onMouseUp.bind(this), "onMouseLeave": this.onMouseLeave.bind(this) }, children.map(function (child, i) { | ||
return React.createElement("div", React.__spread({ "className": 'CarouselNinjaContainer ' + (this.state.dragging ? 'CarouselNinjaContainer--dragging' : '') }, this.provideMouseEventHandlers()), children.map(function (child, i) { | ||
var isCenter = i === _this2.props.select; | ||
@@ -337,3 +346,4 @@ var isLeftEdge = false; | ||
onSwipeLeft: function onSwipeLeft() {}, | ||
onSwipeRight: function onSwipeRight() {} | ||
onSwipeRight: function onSwipeRight() {}, | ||
swipe: false | ||
}; | ||
@@ -514,2 +524,2 @@ | ||
},{"./CarouselNinjaContainer":4,"./CarouselNinjaSelector":5,"react":undefined,"throttleit":3}]},{},[6]) | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2V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Q29udGFpbmVyX19wYW5lJztcbiAgICAgICAgICAgIGNsYXNzTmFtZSArPSBpc0NlbnRlciAgICA/IHRoaXMucHJvcHMuYWN0aXZlQ2xhc3MgICAgOiAnJztcbiAgICAgICAgICAgIGNsYXNzTmFtZSArPSBpc1JpZ2h0RWRnZSA/IHRoaXMucHJvcHMucmlnaHRFZGdlQ2xhc3MgOiAnJztcbiAgICAgICAgICAgIGNsYXNzTmFtZSArPSBpc0xlZnRFZGdlICA/IHRoaXMucHJvcHMubGVmdEVkZ2VDbGFzcyAgOiAnJztcblxuICAgICAgICAgICAgY29uc3Qgc3R5bGUgPSB7XG4gICAgICAgICAgICAgIGxlZnQgICAgICAgOiBjYWxjRnVuY3Rpb24sXG4gICAgICAgICAgICAgIG1hcmdpbkxlZnQgOiBgLSR7dGhpcy5zdGF0ZS5pbm5lcldpZHRoIC8gMn1weGBcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHJldHVybiA8ZGl2IHJlZj17YGNoaWxkLSR7aX1gfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtjbGFzc05hbWV9XG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk9e2l9XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHlsZT17c3R5bGV9XG4gICAgICAgICAgICAgICAgICAgICAgICBhcmlhLWhpZGRlbj17aXNDZW50ZXIgPyAnZmFsc2UnIDogJ3RydWUnfT57Y2hpbGR9PC9kaXY+O1xuICAgICAgICAgIH0pfVxuXG4gICAgICAgIDwvZGl2PlxuICAgICk7XG4gIH1cbn1cbiIsImltcG9ydCAqIGFzIFJlYWN0IGZyb20gJ3JlYWN0JztcbmltcG9ydCBSZWFjdEVsZW1lbnQgPSBfX1JlYWN0LlJlYWN0RWxlbWVudDtcblxuaW50ZXJmYWNlIENhcm91c2VsU2VsZWN0b3JQcm9wcyBleHRlbmRzIFJlYWN0LlByb3BzPENhcm91c2VsTmluamFTZWxlY3Rvcj4ge1xuICBhY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RleD17MH0gY2xhc3NOYW1lPXt0aGlzLnByb3BzLmNsYXNzTmFtZX0gb25LZXlVcD17dGhpcy5vbktleVVwLmJpbmQodGhpcyl9PlxuICAgICAgICA8Q2Fyb3VzZWxOaW5qYUNvbnRhaW5lciBhY3RpdmVDbGFzcz17dGhpcy5wcm9wcy5hY3RpdmVDbGFzc31cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0PXt0aGlzLnN0YXRlLmN1cnJlbnRTZWxlY3R9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uU2VsZWN0PXt0aGlzLm9uU2VsZWN0Q2hhbmdlLmJpbmQodGhpcyl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uU3dpcGVMZWZ0PXt0aGlzLm9uU3dpcGVMZWZ0LmJpbmQodGhpcyl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uU3dpcGVSaWdodD17dGhpcy5vblN3aXBlUmlnaHQuYmluZCh0aGlzKX0+XG4gICAgICAgICAge3RoaXMucHJvcHMuY2hpbGRyZW59XG4gICAgICAgIDwvQ2Fyb3VzZWxOaW5qYUNvbnRhaW5lcj5cblxuICAgICAgICA8Q2Fyb3VzZWxOaW5qYVNlbGVjdG9yIGFjdGl2ZUNsYXNzPXt0aGlzLnByb3BzLmFjdGl2ZUNsYXNzfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdD17dGhpcy5zdGF0ZS5jdXJyZW50U2VsZWN0fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aD17UmVhY3QuQ2hpbGRyZW4uY291bnQodGhpcy5wcm9wcy5jaGlsZHJlbil9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25TZWxlY3Q9e3RoaXMub25TZWxlY3RDaGFuZ2UuYmluZCh0aGlzKX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrU2VsZWN0b3I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ICAgIG9uU2VsZWN0PXt0aGlzLm9uU2VsZWN0Q2hhbmdlLmJpbmQodGhpcyl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uU3dpcGVMZWZ0PXt0aGlzLm9uU3dpcGVMZWZ0LmJpbmQodGhpcyl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uU3dpcGVSaWdodD17dGhpcy5vblN3aXBlUmlnaHQuYmluZCh0aGlzKX0+XG4gICAgICAgICAge3RoaXMucHJvcHMuY2hpbGRyZW59XG4gICAgICAgIDwvQ2Fyb3VzZWxOaW5qYUNvbnRhaW5lcj5cblxuICAgICAgICA8Q2Fyb3VzZWxOaW5qYVNlbGVjdG9yIGFjdGl2ZUNsYXNzPXt0aGlzLnByb3BzLmFjdGl2ZUNsYXNzfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdD17dGhpcy5zdGF0ZS5jdXJyZW50U2VsZWN0fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbmd0aD17UmVhY3QuQ2hpbGRyZW4uY291bnQodGhpcy5wcm9wcy5jaGlsZHJlbil9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25TZWxlY3Q9e3RoaXMub25TZWxlY3RDaGFuZ2UuYmluZCh0aGlzKX1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrU2VsZWN0b3I9e3RoaXMub25DbGlja1NlbGVjdG9yLmJpbmQodGhpcyl9IC8+XG4gICAgICA8L2Rpdj5cbiAgICApO1xuICB9XG59XG5cbmV4cG9ydCB7XG4gIENhcm91c2VsTmluamEsXG4gIENhcm91c2VsTmluamFDb250YWluZXIsXG4gIENhcm91c2VsTmluamFTZWxlY3RvclxufTtcbiJdfQ== |
@@ -9,3 +9,3 @@ /** | ||
* homepage: https://github.com/ahomu/react-carousel-ninja | ||
* version: 0.1.1 | ||
* version: 0.1.3 | ||
* | ||
@@ -36,2 +36,2 @@ * date-now: | ||
*/ | ||
!function t(e,n,o){function r(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=n[s]={exports:{}};e[s][0].call(p.exports,function(t){var n=e[s][1][t];return r(n?n:t)},p,p.exports,t,e,n,o)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(t,e){var n=t("date-now");e.exports=function(t,e,o){function r(){var p=n()-c;e>p&&p>0?i=setTimeout(r,e-p):(i=null,o||(l=t.apply(a,s),i||(a=s=null)))}var i,s,a,c,l;return null==e&&(e=100),function(){a=this,s=arguments,c=n();var p=o&&!i;return i||(i=setTimeout(r,e)),p&&(l=t.apply(a,s),a=s=null),l}}},{"date-now":2}],2:[function(t,e){function n(){return(new Date).getTime()}e.exports=Date.now||n},{}],3:[function(t,e){function n(t,e){function n(){s=0,a=+new Date,i=t.apply(o,r),o=null,r=null}var o,r,i,s,a=0;return function(){o=this,r=arguments;var t=new Date-a;return s||(t>=e?n():s=setTimeout(n,e-t)),i}}e.exports=n},{}],4:[function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var i=t("react"),s=i,a=t("debounce"),c=a,l=300,p=.2,u=0,h=1,f=function(t){function e(){var n=this;o(this,e);for(var r=arguments.length,i=Array(r),s=0;r>s;s++)i[s]=arguments[s];t.call.apply(t,[this].concat(i)),this.state={outerWidth:0,innerWidth:0,dragging:!1,deltaX:0,deltaY:0},this.startCoordinate={x:0,y:0},this.onResize=c(function(){n.calculateWidth()},l)}return r(e,t),e.prototype.calculateWidth=function(){var t=this.refs["child-"+this.props.select];this.setState({innerWidth:t.clientWidth})},e.prototype.onMouseDown=function(t){this.startCoordinate={x:t.clientX,y:t.clientY},this.setState({dragging:!0})},e.prototype.onMouseMove=function(t){this.state.dragging&&(t.preventDefault(),this.setState({deltaX:t.clientX-this.startCoordinate.x,deltaY:t.clientY-this.startCoordinate.y}))},e.prototype.onMouseUp=function(){this.state.dragging&&this.handleSwipe()},e.prototype.onMouseLeave=function(){this.state.dragging&&this.handleSwipe()},e.prototype.handleSwipe=function(){var t=Math.abs(this.state.deltaX),e=this.state.innerWidth*p;if(t>e){var n=this.state.deltaX>-1?u:h;n===h?this.props.onSwipeLeft(this.props.select+1):n===u&&this.props.onSwipeRight(this.props.select-1)}this.startCoordinate={x:0,y:0},this.setState({dragging:!1,deltaX:0,deltaY:0})},e.prototype.componentDidMount=function(){this.calculateWidth(),window.addEventListener("resize",this.onResize)},e.prototype.componentWillReceiveProps=function(t){this.props.onSelect&&this.props.onSelect(t.select,this.props.select)},e.prototype.shouldComponentUpdate=function(t,e){return!1||t.select!==this.props.select||t.children!==this.props.children||e!==this.state},e.prototype.componentWillUnmount=function(){window.addEventListener("resize",this.onResize)},e.prototype.render=function(){var t=this,e=s.Children.toArray(this.props.children),n=Math.floor(e.length/2),o=e.slice(0,this.props.select),r=e.slice(this.props.select+1,e.length);return o.length>n?r=[].concat(r,o.splice(0,o.length-n)):r.length>n&&(o=[].concat(r.splice(n),o)),s.createElement("div",{className:"CarouselNinjaContainer "+(this.state.dragging?"CarouselNinjaContainer--dragging":""),onMouseDown:this.onMouseDown.bind(this),onMouseMove:this.onMouseMove.bind(this),onMouseUp:this.onMouseUp.bind(this),onMouseLeave:this.onMouseLeave.bind(this)},e.map(function(e,n){var i=n===t.props.select,a=!1,c=!1,l=void 0,p=void 0;if(-1!==(l=o.indexOf(e))){var u=(o.length-l)*t.state.innerWidth;p="calc(50% - "+(u-t.state.deltaX)+"px)",a=0===l}else if(-1!==(l=r.indexOf(e))){var u=(l+1)*t.state.innerWidth;p="calc(50% + "+(u+t.state.deltaX)+"px)",c=l===r.length-1}else p="calc(50% + "+(0+t.state.deltaX)+"px)";var h="CarouselNinjaContainer__pane";h+=i?t.props.activeClass:"",h+=c?t.props.rightEdgeClass:"",h+=a?t.props.leftEdgeClass:"";var f={left:p,marginLeft:"-"+t.state.innerWidth/2+"px"};return s.createElement("div",{ref:"child-"+n,className:h,key:n,style:f,"aria-hidden":i?"false":"true"},e)}))},e}(s.Component);n["default"]=f,f.defaultProps={activeClass:" is-active",rightEdgeClass:" is-right",leftEdgeClass:" is-left",select:0,onSelect:function(){},onSwipeLeft:function(){},onSwipeRight:function(){}}},{debounce:1,react:void 0}],5:[function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var i=t("react"),s=i,a=function(t){function e(){o(this,e),t.apply(this,arguments)}return r(e,t),e.prototype.componentWillReceiveProps=function(t){this.props.onSelect&&this.props.onSelect(t.select,this.props.select)},e.prototype.shouldComponentUpdate=function(t){return!1||t.select!==this.props.select||t.children!==this.props.children},e.prototype.renderFromChildren=function(){var t=this;return s.Children.map(this.props.children,function(e,n){var o=n===t.props.select,r="CarouselNinjaSelector__item";return r+=o?t.props.activeClass:"",s.createElement("li",{className:r,key:n,onClick:t.props.onClickSelector.bind(t,n),"aria-selected":o?"true":"false"},e)})},e.prototype.renderItemsBySelf=function(){for(var t=[],e=this.props.length,n=0;e>n;n++){var o=n===this.props.select,r="CarouselNinjaSelector__item";r+=o?this.props.activeClass:"",t.push(s.createElement("li",{className:r,key:n,onClick:this.props.onClickSelector.bind(this,n),"aria-selected":o?"true":"false"},s.createElement("button",{tabIndex:-1})))}return t},e.prototype.render=function(){return s.createElement("ul",{className:"CarouselNinjaSelector"},s.Children.count(this.props.children)?this.renderFromChildren():this.renderItemsBySelf())},e}(s.Component);n["default"]=a,a.defaultProps={activeClass:" is-active",select:0,length:0,onSelect:function(){},onClickSelector:function(){}}},{react:void 0}],6:[function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var i=t("react"),s=i,a=t("throttleit"),c=a,l=t("./CarouselNinjaContainer"),p=t("./CarouselNinjaSelector"),u=150,h=37,f=39,d=function(t){function e(){var n=this;o(this,e);for(var r=arguments.length,i=Array(r),s=0;r>s;s++)i[s]=arguments[s];t.call.apply(t,[this].concat(i)),this.state={currentSelect:2},this.onKeyUp=c(function(t){switch(t.keyCode){case h:n.updateSelect(n.state.currentSelect-1);break;case f:n.updateSelect(n.state.currentSelect+1)}},u)}return r(e,t),e.prototype.updateSelect=function(t){var e=s.Children.count(this.props.children)-1;this.setState(0>t?{currentSelect:e}:t>e?{currentSelect:0}:{currentSelect:t})},e.prototype.onSelectChange=function(t,e){this.props.onSelect(t,e)},e.prototype.onClickSelector=function(t){this.updateSelect(t)},e.prototype.onSwipeLeft=function(t){this.updateSelect(t)},e.prototype.onSwipeRight=function(t){this.updateSelect(t)},e.prototype.render=function(){return s.createElement("div",{tabIndex:0,className:this.props.className,onKeyUp:this.onKeyUp.bind(this)},s.createElement(l["default"],{activeClass:this.props.activeClass,select:this.state.currentSelect,onSelect:this.onSelectChange.bind(this),onSwipeLeft:this.onSwipeLeft.bind(this),onSwipeRight:this.onSwipeRight.bind(this)},this.props.children),s.createElement(p["default"],{activeClass:this.props.activeClass,select:this.state.currentSelect,length:s.Children.count(this.props.children),onSelect:this.onSelectChange.bind(this),onClickSelector:this.onClickSelector.bind(this)}))},e}(s.Component);d.defaultProps={className:"",activeClass:" is-active",onSelect:function(){}},n.CarouselNinja=d,n.CarouselNinjaContainer=l["default"],n.CarouselNinjaSelector=p["default"]},{"./CarouselNinjaContainer":4,"./CarouselNinjaSelector":5,react:void 0,throttleit:3}]},{},[6]); | ||
!function t(e,n,o){function r(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=n[s]={exports:{}};e[s][0].call(p.exports,function(t){var n=e[s][1][t];return r(n?n:t)},p,p.exports,t,e,n,o)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<o.length;s++)r(o[s]);return r}({1:[function(t,e){var n=t("date-now");e.exports=function(t,e,o){function r(){var p=n()-c;e>p&&p>0?i=setTimeout(r,e-p):(i=null,o||(l=t.apply(a,s),i||(a=s=null)))}var i,s,a,c,l;return null==e&&(e=100),function(){a=this,s=arguments,c=n();var p=o&&!i;return i||(i=setTimeout(r,e)),p&&(l=t.apply(a,s),a=s=null),l}}},{"date-now":2}],2:[function(t,e){function n(){return(new Date).getTime()}e.exports=Date.now||n},{}],3:[function(t,e){function n(t,e){function n(){s=0,a=+new Date,i=t.apply(o,r),o=null,r=null}var o,r,i,s,a=0;return function(){o=this,r=arguments;var t=new Date-a;return s||(t>=e?n():s=setTimeout(n,e-t)),i}}e.exports=n},{}],4:[function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var i=t("react"),s=i,a=t("debounce"),c=a,l=300,p=.2,u=0,h=1,f=function(t){function e(){var n=this;o(this,e);for(var r=arguments.length,i=Array(r),s=0;r>s;s++)i[s]=arguments[s];t.call.apply(t,[this].concat(i)),this.state={outerWidth:0,innerWidth:0,dragging:!1,deltaX:0,deltaY:0},this.startCoordinate={x:0,y:0},this.onResize=c(function(){n.calculateWidth()},l)}return r(e,t),e.prototype.calculateWidth=function(){var t=this.refs["child-"+this.props.select];this.setState({innerWidth:t.clientWidth})},e.prototype.onMouseDown=function(t){this.startCoordinate={x:t.clientX,y:t.clientY},this.setState({dragging:!0})},e.prototype.onMouseMove=function(t){this.state.dragging&&(t.preventDefault(),this.setState({deltaX:t.clientX-this.startCoordinate.x,deltaY:t.clientY-this.startCoordinate.y}))},e.prototype.onMouseUp=function(){this.state.dragging&&this.handleSwipe()},e.prototype.onMouseLeave=function(){this.state.dragging&&this.handleSwipe()},e.prototype.provideMouseEventHandlers=function(){return this.props.swipe?{onMouseDown:this.onMouseDown.bind(this),onMouseMove:this.onMouseMove.bind(this),onMouseUp:this.onMouseUp.bind(this),onMouseLeave:this.onMouseLeave.bind(this)}:null},e.prototype.handleSwipe=function(){var t=Math.abs(this.state.deltaX),e=this.state.innerWidth*p;if(t>e){var n=this.state.deltaX>-1?u:h;n===h?this.props.onSwipeLeft(this.props.select+1):n===u&&this.props.onSwipeRight(this.props.select-1)}this.startCoordinate={x:0,y:0},this.setState({dragging:!1,deltaX:0,deltaY:0})},e.prototype.componentDidMount=function(){this.calculateWidth(),window.addEventListener("resize",this.onResize)},e.prototype.componentWillReceiveProps=function(t){this.props.onSelect&&this.props.onSelect(t.select,this.props.select)},e.prototype.shouldComponentUpdate=function(t,e){return!1||t.select!==this.props.select||t.children!==this.props.children||e!==this.state},e.prototype.componentWillUnmount=function(){window.addEventListener("resize",this.onResize)},e.prototype.render=function(){var t=this,e=s.Children.toArray(this.props.children),n=Math.floor(e.length/2),o=e.slice(0,this.props.select),r=e.slice(this.props.select+1,e.length);return o.length>n?r=[].concat(r,o.splice(0,o.length-n)):r.length>n&&(o=[].concat(r.splice(n),o)),s.createElement("div",s.__spread({className:"CarouselNinjaContainer "+(this.state.dragging?"CarouselNinjaContainer--dragging":"")},this.provideMouseEventHandlers()),e.map(function(e,n){var i=n===t.props.select,a=!1,c=!1,l=void 0,p=void 0;if(-1!==(l=o.indexOf(e))){var u=(o.length-l)*t.state.innerWidth;p="calc(50% - "+(u-t.state.deltaX)+"px)",a=0===l}else if(-1!==(l=r.indexOf(e))){var u=(l+1)*t.state.innerWidth;p="calc(50% + "+(u+t.state.deltaX)+"px)",c=l===r.length-1}else p="calc(50% + "+(0+t.state.deltaX)+"px)";var h="CarouselNinjaContainer__pane";h+=i?t.props.activeClass:"",h+=c?t.props.rightEdgeClass:"",h+=a?t.props.leftEdgeClass:"";var f={left:p,marginLeft:"-"+t.state.innerWidth/2+"px"};return s.createElement("div",{ref:"child-"+n,className:h,key:n,style:f,"aria-hidden":i?"false":"true"},e)}))},e}(s.Component);n["default"]=f,f.defaultProps={activeClass:" is-active",rightEdgeClass:" is-right",leftEdgeClass:" is-left",select:0,onSelect:function(){},onSwipeLeft:function(){},onSwipeRight:function(){},swipe:!1}},{debounce:1,react:void 0}],5:[function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var i=t("react"),s=i,a=function(t){function e(){o(this,e),t.apply(this,arguments)}return r(e,t),e.prototype.componentWillReceiveProps=function(t){this.props.onSelect&&this.props.onSelect(t.select,this.props.select)},e.prototype.shouldComponentUpdate=function(t){return!1||t.select!==this.props.select||t.children!==this.props.children},e.prototype.renderFromChildren=function(){var t=this;return s.Children.map(this.props.children,function(e,n){var o=n===t.props.select,r="CarouselNinjaSelector__item";return r+=o?t.props.activeClass:"",s.createElement("li",{className:r,key:n,onClick:t.props.onClickSelector.bind(t,n),"aria-selected":o?"true":"false"},e)})},e.prototype.renderItemsBySelf=function(){for(var t=[],e=this.props.length,n=0;e>n;n++){var o=n===this.props.select,r="CarouselNinjaSelector__item";r+=o?this.props.activeClass:"",t.push(s.createElement("li",{className:r,key:n,onClick:this.props.onClickSelector.bind(this,n),"aria-selected":o?"true":"false"},s.createElement("button",{tabIndex:-1})))}return t},e.prototype.render=function(){return s.createElement("ul",{className:"CarouselNinjaSelector"},s.Children.count(this.props.children)?this.renderFromChildren():this.renderItemsBySelf())},e}(s.Component);n["default"]=a,a.defaultProps={activeClass:" is-active",select:0,length:0,onSelect:function(){},onClickSelector:function(){}}},{react:void 0}],6:[function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var i=t("react"),s=i,a=t("throttleit"),c=a,l=t("./CarouselNinjaContainer"),p=t("./CarouselNinjaSelector"),u=150,h=37,f=39,d=function(t){function e(){var n=this;o(this,e);for(var r=arguments.length,i=Array(r),s=0;r>s;s++)i[s]=arguments[s];t.call.apply(t,[this].concat(i)),this.state={currentSelect:2},this.onKeyUp=c(function(t){switch(t.keyCode){case h:n.updateSelect(n.state.currentSelect-1);break;case f:n.updateSelect(n.state.currentSelect+1)}},u)}return r(e,t),e.prototype.updateSelect=function(t){var e=s.Children.count(this.props.children)-1;this.setState(0>t?{currentSelect:e}:t>e?{currentSelect:0}:{currentSelect:t})},e.prototype.onSelectChange=function(t,e){this.props.onSelect(t,e)},e.prototype.onClickSelector=function(t){this.updateSelect(t)},e.prototype.onSwipeLeft=function(t){this.updateSelect(t)},e.prototype.onSwipeRight=function(t){this.updateSelect(t)},e.prototype.render=function(){return s.createElement("div",{tabIndex:0,className:this.props.className,onKeyUp:this.onKeyUp.bind(this)},s.createElement(l["default"],{activeClass:this.props.activeClass,select:this.state.currentSelect,onSelect:this.onSelectChange.bind(this),onSwipeLeft:this.onSwipeLeft.bind(this),onSwipeRight:this.onSwipeRight.bind(this)},this.props.children),s.createElement(p["default"],{activeClass:this.props.activeClass,select:this.state.currentSelect,length:s.Children.count(this.props.children),onSelect:this.onSelectChange.bind(this),onClickSelector:this.onClickSelector.bind(this)}))},e}(s.Component);d.defaultProps={className:"",activeClass:" is-active",onSelect:function(){}},n.CarouselNinja=d,n.CarouselNinjaContainer=l["default"],n.CarouselNinjaSelector=p["default"]},{"./CarouselNinjaContainer":4,"./CarouselNinjaSelector":5,react:void 0,throttleit:3}]},{},[6]); |
Sorry, the diff of this file is not supported yet
155053
0.67%2988
0.57%