Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-slick

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-slick - npm Package Compare versions

Comparing version 0.12.2 to 0.12.3

.babelrc

6

dist/react-slick.min.js

@@ -1,6 +0,6 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.Slider=e(require("react"),require("react-dom")):t.Slider=e(t.React,t.ReactDOM)}(this,function(t,e){return function(t){function e(s){if(i[s])return i[s].exports;var n=i[s]={exports:{},id:s,loaded:!1};return t[s].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";t.exports=i(1)},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(2),r=s(n),o=i(3),a=i(12),l=s(a),d=i(19),u=s(d),c=i(21),h=s(c),p=i(14),f=s(p),v=r["default"].createClass({displayName:"Slider",mixins:[h["default"]],getInitialState:function(){return{breakpoint:null}},componentDidMount:function(){var t=this;if(this.props.responsive){var e=this.props.responsive.map(function(t){return t.breakpoint});e.sort(function(t,e){return t-e}),e.forEach(function(i,s){var n;n=0===s?u["default"]({minWidth:0,maxWidth:i}):u["default"]({minWidth:e[s-1],maxWidth:i}),t.media(n,function(){t.setState({breakpoint:i})})});var i=u["default"]({minWidth:e.slice(-1)[0]});this.media(i,function(){t.setState({breakpoint:null})})}},render:function(){var t,e,i=this;return this.state.breakpoint?(e=this.props.responsive.filter(function(t){return t.breakpoint===i.state.breakpoint}),t="unslick"===e[0].settings?"unslick":l["default"]({},this.props,e[0].settings)):t=l["default"]({},f["default"],this.props),"unslick"===t?r["default"].createElement("div",null,this.props.children):r["default"].createElement(o.InnerSlider,t,this.props.children)}});t.exports=v},function(e,i){e.exports=t},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},r=i(2),o=s(r),a=i(4),l=s(a),d=i(8),u=s(d),c=i(13),h=s(c),p=i(14),f=s(p),v=i(15),S=s(v),m=i(16),w=i(17),g=i(18),y=o["default"].createClass({displayName:"InnerSlider",mixins:[u["default"],l["default"]],getInitialState:function(){return h["default"]},getDefaultProps:function(){return f["default"]},componentWillMount:function(){this.props.init&&this.props.init(),this.setState({mounted:!0});for(var t=[],e=0;e<o["default"].Children.count(this.props.children);e++)e>=this.state.currentSlide&&e<this.state.currentSlide+this.props.slidesToShow&&t.push(e);this.props.lazyLoad&&0===this.state.lazyLoadedList.length&&this.setState({lazyLoadedList:t})},componentDidMount:function(){this.initialize(this.props),this.adaptHeight(),window.addEventListener?window.addEventListener("resize",this.onWindowResized):window.attachEvent("onresize",this.onWindowResized)},componentWillUnmount:function(){window.addEventListener?window.removeEventListener("resize",this.onWindowResized):window.detachEvent("onresize",this.onWindowResized),this.state.autoPlayTimer&&window.clearInterval(this.state.autoPlayTimer)},componentWillReceiveProps:function(t){this.props.slickGoTo!=t.slickGoTo?this.changeSlide({message:"index",index:t.slickGoTo,currentSlide:this.state.currentSlide}):this.update(t)},componentDidUpdate:function(){this.adaptHeight()},onWindowResized:function(){this.update(this.props)},render:function(){var t,e=S["default"]("slick-initialized","slick-slider",this.props.className),i={fade:this.props.fade,cssEase:this.props.cssEase,speed:this.props.speed,infinite:this.props.infinite,centerMode:this.props.centerMode,currentSlide:this.state.currentSlide,lazyLoad:this.props.lazyLoad,lazyLoadedList:this.state.lazyLoadedList,rtl:this.props.rtl,slideWidth:this.state.slideWidth,slidesToShow:this.props.slidesToShow,slideCount:this.state.slideCount,trackStyle:this.state.trackStyle,variableWidth:this.props.variableWidth};if(this.props.dots===!0&&this.state.slideCount>this.props.slidesToShow){var s={dotsClass:this.props.dotsClass,slideCount:this.state.slideCount,slidesToShow:this.props.slidesToShow,currentSlide:this.state.currentSlide,slidesToScroll:this.props.slidesToScroll,clickHandler:this.changeSlide};t=o["default"].createElement(w.Dots,s)}var r,a,l={infinite:this.props.infinite,centerMode:this.props.centerMode,currentSlide:this.state.currentSlide,slideCount:this.state.slideCount,slidesToShow:this.props.slidesToShow,prevArrow:this.props.prevArrow,nextArrow:this.props.nextArrow,clickHandler:this.changeSlide};return this.props.arrows&&(r=o["default"].createElement(g.PrevArrow,l),a=o["default"].createElement(g.NextArrow,l)),o["default"].createElement("div",{className:e,onMouseEnter:this.onInnerSliderEnter,onMouseLeave:this.onInnerSliderLeave},o["default"].createElement("div",{ref:"list",className:"slick-list",onMouseDown:this.swipeStart,onMouseMove:this.state.dragging?this.swipeMove:null,onMouseUp:this.swipeEnd,onMouseLeave:this.state.dragging?this.swipeEnd:null,onTouchStart:this.swipeStart,onTouchMove:this.state.dragging?this.swipeMove:null,onTouchEnd:this.swipeEnd,onTouchCancel:this.state.dragging?this.swipeEnd:null},o["default"].createElement(m.Track,n({ref:"track"},i),this.props.children)),r,a,t)}});e.InnerSlider=y},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(5),r=i(8),o=(s(r),i(12)),a=s(o),l={changeSlide:function(t){var e,i,s,n,r;if(n=this.state.slideCount%this.props.slidesToScroll!==0,e=n?0:(this.state.slideCount-this.state.currentSlide)%this.props.slidesToScroll,"previous"===t.message)s=0===e?this.props.slidesToScroll:this.props.slidesToShow-e,r=this.state.currentSlide-s,this.props.lazyLoad&&(i=this.state.currentSlide-s,r=-1===i?this.state.slideCount-1:i);else if("next"===t.message)s=0===e?this.props.slidesToScroll:e,r=this.state.currentSlide+s;else if("dots"===t.message){if(r=t.index*t.slidesToScroll,r===t.currentSlide)return}else if("index"===t.message&&(r=t.index,r===t.currentSlide))return;this.slideHandler(r)},keyHandler:function(t){},selectHandler:function(t){},swipeStart:function(t){var e,i;this.props.swipe===!1||"ontouchend"in document&&this.props.swipe===!1||(this.props.draggable!==!1||-1===t.type.indexOf("mouse"))&&(e=void 0!==t.touches?t.touches[0].pageX:t.clientX,i=void 0!==t.touches?t.touches[0].pageY:t.clientY,this.setState({dragging:!0,touchObject:{startX:e,startY:i,curX:e,curY:i}}))},swipeMove:function(t){if(this.state.dragging&&!this.state.animating){var e,i,s,r=this.state.touchObject;i=n.getTrackLeft(a["default"]({slideIndex:this.state.currentSlide,trackRef:this.refs.track},this.props,this.state)),r.curX=t.touches?t.touches[0].pageX:t.clientX,r.curY=t.touches?t.touches[0].pageY:t.clientY,r.swipeLength=Math.round(Math.sqrt(Math.pow(r.curX-r.startX,2))),s=(this.props.rtl===!1?1:-1)*(r.curX>r.startX?1:-1);var o=this.state.currentSlide,l=Math.ceil(this.state.slideCount/this.props.slidesToScroll),d=this.swipeDirection(this.state.touchObject),u=r.swipeLength;this.props.infinite===!1&&(0===o&&"right"===d||o+1>=l&&"left"===d)&&(u=r.swipeLength*this.props.edgeFriction,this.state.edgeDragged===!1&&this.props.edgeEvent&&(this.props.edgeEvent(d),this.setState({edgeDragged:!0}))),this.state.swiped===!1&&this.props.swipeEvent&&(this.props.swipeEvent(d),this.setState({swiped:!0})),e=i+u*s,this.setState({touchObject:r,swipeLeft:e,trackStyle:n.getTrackCSS(a["default"]({left:e},this.props,this.state))}),Math.abs(r.curX-r.startX)<.8*Math.abs(r.curY-r.startY)||r.swipeLength>4&&t.preventDefault()}},swipeEnd:function(t){if(this.state.dragging){var e=this.state.touchObject,i=this.state.listWidth/this.props.touchThreshold,s=this.swipeDirection(e);if(this.setState({dragging:!1,edgeDragged:!1,swiped:!1,swipeLeft:null,touchObject:{}}),e.swipeLength)if(e.swipeLength>i)t.preventDefault(),"left"===s?this.slideHandler(this.state.currentSlide+this.props.slidesToScroll):"right"===s?this.slideHandler(this.state.currentSlide-this.props.slidesToScroll):this.slideHandler(this.state.currentSlide);else{var r=n.getTrackLeft(a["default"]({slideIndex:this.state.currentSlide,trackRef:this.refs.track},this.props,this.state));this.setState({trackStyle:n.getTrackAnimateCSS(a["default"]({left:r},this.props,this.state))})}}},onInnerSliderEnter:function(t){this.props.autoplay&&this.props.pauseOnHover&&this.pause()},onInnerSliderLeave:function(t){this.props.autoplay&&this.props.pauseOnHover&&this.autoPlay()}};e["default"]=l,t.exports=e["default"]},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(6),r=s(n),o=function(t,e){return e.reduce(function(e,i){return e&&t.hasOwnProperty(i)},!0)?null:console.error("Keys Missing",t)},a=function(t){o(t,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);var e;e=t.variableWidth?(t.slideCount+2*t.slidesToShow)*t.slideWidth:t.centerMode?(t.slideCount+2*(t.slidesToShow+1))*t.slideWidth:(t.slideCount+2*t.slidesToShow)*t.slideWidth;var i={opacity:1,width:e,WebkitTransform:"translate3d("+t.left+"px, 0px, 0px)",transform:"translate3d("+t.left+"px, 0px, 0px)",transition:"",WebkitTransition:"",msTransform:"translateX("+t.left+"px)"};return!window.addEventListener&&window.attachEvent&&(i.marginLeft=t.left+"px"),i};e.getTrackCSS=a;var l=function(t){o(t,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var e=a(t);return e.WebkitTransition="-webkit-transform "+t.speed+"ms "+t.cssEase,e.transition="transform "+t.speed+"ms "+t.cssEase,e};e.getTrackAnimateCSS=l;var d=function(t){o(t,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth"]);var e,i,s=0;if(t.fade)return 0;if(t.infinite&&(t.slideCount>t.slidesToShow&&(s=t.slideWidth*t.slidesToShow*-1),t.slideCount%t.slidesToScroll!==0&&t.slideIndex+t.slidesToScroll>t.slideCount&&t.slideCount>t.slidesToShow&&(s=t.slideIndex>t.slideCount?(t.slidesToShow-(t.slideIndex-t.slideCount))*t.slideWidth*-1:t.slideCount%t.slidesToScroll*t.slideWidth*-1)),t.centerMode&&(t.infinite?s+=t.slideWidth*Math.floor(t.slidesToShow/2):s=t.slideWidth*Math.floor(t.slidesToShow/2)),e=t.slideIndex*t.slideWidth*-1+s,t.variableWidth===!0){var n;t.slideCount<=t.slidesToShow||t.infinite===!1?i=r["default"].findDOMNode(t.trackRef).childNodes[t.slideIndex]:(n=t.slideIndex+t.slidesToShow,i=r["default"].findDOMNode(t.trackRef).childNodes[n]),e=i?-1*i.offsetLeft:0,t.centerMode===!0&&(i=t.infinite===!1?r["default"].findDOMNode(t.trackRef).children[t.slideIndex]:r["default"].findDOMNode(t.trackRef).children[t.slideIndex+t.slidesToShow+1],e=i?-1*i.offsetLeft:0,e+=(t.listWidth-i.offsetWidth)/2)}return e};e.getTrackLeft=d},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),r=s(n),o=i(7),a=s(o),l=r["default"].version>="0.14.0"?a["default"]:r["default"];e["default"]=l,t.exports=e["default"]},function(t,i){t.exports=e},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),r=s(n),o=i(6),a=s(o),l=i(9),d=s(l),u=i(5),c=i(12),h=s(c),p={initialize:function(t){var e=r["default"].Children.count(t.children),i=this.getWidth(a["default"].findDOMNode(this.refs.list)),s=this.getWidth(a["default"].findDOMNode(this.refs.track)),n=this.getWidth(a["default"].findDOMNode(this))/t.slidesToShow,o=t.rtl?e-1-t.initialSlide:t.initialSlide;this.setState({slideCount:e,slideWidth:n,listWidth:i,trackWidth:s,currentSlide:o},function(){var e=u.getTrackLeft(h["default"]({slideIndex:this.state.currentSlide,trackRef:this.refs.track},t,this.state)),i=u.getTrackCSS(h["default"]({left:e},t,this.state));this.setState({trackStyle:i}),this.autoPlay()})},update:function(t){var e=r["default"].Children.count(t.children),i=this.getWidth(a["default"].findDOMNode(this.refs.list)),s=this.getWidth(a["default"].findDOMNode(this.refs.track)),n=this.getWidth(a["default"].findDOMNode(this))/t.slidesToShow;this.setState({slideCount:e,slideWidth:n,listWidth:i,trackWidth:s},function(){var e=u.getTrackLeft(h["default"]({slideIndex:this.state.currentSlide,trackRef:this.refs.track},t,this.state)),i=u.getTrackCSS(h["default"]({left:e},t,this.state));this.setState({trackStyle:i})})},getWidth:function(t){return t.getBoundingClientRect().width||t.offsetWidth},adaptHeight:function(){if(this.props.adaptiveHeight){var t='[data-index="'+this.state.currentSlide+'"]';if(this.refs.list){var e=a["default"].findDOMNode(this.refs.list);e.style.height=e.querySelector(t).offsetHeight+"px"}}},slideHandler:function(t){var e,i,s,n,r,o=this;if(!this.props.waitForAnimate||!this.state.animating){if(this.props.fade)return i=this.state.currentSlide,e=0>t?t+this.state.slideCount:t>=this.state.slideCount?t-this.state.slideCount:t,this.props.lazyLoad&&this.state.lazyLoadedList.indexOf(e)<0&&this.setState({lazyLoadedList:this.state.lazyLoadedList.concat(e)}),r=function(){o.setState({animating:!1}),o.props.afterChange&&o.props.afterChange(i),d["default"].removeEndEventListener(a["default"].findDOMNode(o.refs.track).children[i],r)},this.setState({animating:!0,currentSlide:e},function(){d["default"].addEndEventListener(a["default"].findDOMNode(this.refs.track).children[i],r)}),this.props.beforeChange&&this.props.beforeChange(this.state.currentSlide,i),void this.autoPlay();if(e=t,i=0>e?this.props.infinite===!1?0:this.state.slideCount%this.props.slidesToScroll!==0?this.state.slideCount-this.state.slideCount%this.props.slidesToScroll:this.state.slideCount+e:e>=this.state.slideCount?this.props.infinite===!1?this.state.slideCount-this.props.slidesToShow:this.state.slideCount%this.props.slidesToScroll!==0?0:e-this.state.slideCount:e,s=u.getTrackLeft(h["default"]({slideIndex:e,trackRef:this.refs.track},this.props,this.state)),n=u.getTrackLeft(h["default"]({slideIndex:i,trackRef:this.refs.track},this.props,this.state)),this.props.infinite===!1&&(s=n),this.props.beforeChange&&this.props.beforeChange(this.state.currentSlide,i),this.props.lazyLoad){for(var l=!0,c=[],p=e;p<e+this.props.slidesToShow;p++)l=l&&this.state.lazyLoadedList.indexOf(p)>=0,l||c.push(p);l||this.setState({lazyLoadedList:this.state.lazyLoadedList.concat(c)})}if(this.props.useCSS===!1)this.setState({currentSlide:i,trackStyle:u.getTrackCSS(h["default"]({left:n},this.props,this.state))},function(){this.props.afterChange&&this.props.afterChange(i)});else{var f={animating:!1,currentSlide:i,trackStyle:u.getTrackCSS(h["default"]({left:n},this.props,this.state)),swipeLeft:null};r=function(){o.setState(f),o.props.afterChange&&o.props.afterChange(i),d["default"].removeEndEventListener(a["default"].findDOMNode(o.refs.track),r)},this.setState({animating:!0,currentSlide:i,trackStyle:u.getTrackAnimateCSS(h["default"]({left:s},this.props,this.state))},function(){d["default"].addEndEventListener(a["default"].findDOMNode(this.refs.track),r)})}this.autoPlay()}},swipeDirection:function(t){var e,i,s,n;return e=t.startX-t.curX,i=t.startY-t.curY,s=Math.atan2(i,e),n=Math.round(180*s/Math.PI),0>n&&(n=360-Math.abs(n)),45>=n&&n>=0||360>=n&&n>=315?this.props.rtl===!1?"left":"right":n>=135&&225>=n?this.props.rtl===!1?"right":"left":"vertical"},autoPlay:function(){var t=this;if(!this.state.autoPlayTimer){var e=function(){if(t.state.mounted){var e=t.props.rtl?t.state.currentSlide-t.props.slidesToScroll:t.state.currentSlide+t.props.slidesToScroll;t.slideHandler(e)}};this.props.autoplay&&this.setState({autoPlayTimer:window.setInterval(e,this.props.autoplaySpeed)})}},pause:function(){this.state.autoPlayTimer&&(window.clearInterval(this.state.autoPlayTimer),this.setState({autoPlayTimer:null}))}};e["default"]=p,t.exports=e["default"]},function(t,e,i){"use strict";function s(){var t=a("animationend"),e=a("transitionend");t&&l.push(t),e&&l.push(e)}function n(t,e,i){t.addEventListener(e,i,!1)}function r(t,e,i){t.removeEventListener(e,i,!1)}var o=i(10),a=i(11),l=[];o.canUseDOM&&s();var d={addEndEventListener:function(t,e){return 0===l.length?void window.setTimeout(e,0):void l.forEach(function(i){n(t,i,e)})},removeEndEventListener:function(t,e){0!==l.length&&l.forEach(function(i){r(t,i,e)})}};t.exports=d},function(t,e){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),s={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen,isInWorker:!i};t.exports=s},function(t,e,i){"use strict";function s(t,e){var i={};return i[t.toLowerCase()]=e.toLowerCase(),i["Webkit"+t]="webkit"+e,i["Moz"+t]="moz"+e,i["ms"+t]="MS"+e,i["O"+t]="o"+e.toLowerCase(),i}function n(t){if(a[t])return a[t];if(!o[t])return t;var e=o[t];for(var i in e)if(e.hasOwnProperty(i)&&i in l)return a[t]=e[i];return""}var r=i(10),o={animationend:s("Animation","AnimationEnd"),animationiteration:s("Animation","AnimationIteration"),animationstart:s("Animation","AnimationStart"),transitionend:s("Transition","TransitionEnd")},a={},l={};r.canUseDOM&&(l=document.createElement("div").style,"AnimationEvent"in window||(delete o.animationend.animation,delete o.animationiteration.animation,delete o.animationstart.animation),"TransitionEvent"in window||delete o.transitionend.transition),t.exports=n},function(t,e){"use strict";function i(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=Object.assign||function(t,e){for(var s,n,r=i(t),o=1;o<arguments.length;o++){s=arguments[o],n=Object.keys(Object(s));for(var a=0;a<n.length;a++)r[n[a]]=s[n[a]]}return r}},function(t,e){"use strict";var i={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,slideCount:null,slideWidth:null,swipeLeft:null,touchObject:{startX:0,startY:0,curX:0,curY:0},lazyLoadedList:[],initialized:!1,edgeDragged:!1,swiped:!1,trackStyle:{},trackWidth:0};t.exports=i},function(t,e){"use strict";var i={className:"",adaptiveHeight:!1,arrows:!0,autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:!1,pauseOnHover:!1,responsive:null,rtl:!1,slide:"div",slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0,afterChange:null,beforeChange:null,edgeEvent:null,init:null,swipeEvent:null,nextArrow:null,prevArrow:null};t.exports=i},function(t,e,i){var s;/*!
Copyright (c) 2015 Jed Watson.
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],e):"object"==typeof exports?exports.Slider=e(require("react"),require("react-dom")):t.Slider=e(t.React,t.ReactDOM)}(this,function(t,e){return function(t){function e(s){if(i[s])return i[s].exports;var n=i[s]={exports:{},id:s,loaded:!1};return t[s].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}([function(t,e,i){"use strict";t.exports=i(1)},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}var n=i(2),r=s(n),o=i(3),a=i(11),l=s(a),d=i(18),u=s(d),c=i(20),h=s(c),p=i(13),f=s(p),v=r["default"].createClass({displayName:"Slider",mixins:[h["default"]],getInitialState:function(){return{breakpoint:null}},componentDidMount:function(){var t=this;if(this.props.responsive){var e=this.props.responsive.map(function(t){return t.breakpoint});e.sort(function(t,e){return t-e}),e.forEach(function(i,s){var n;n=0===s?(0,u["default"])({minWidth:0,maxWidth:i}):(0,u["default"])({minWidth:e[s-1],maxWidth:i}),t.media(n,function(){t.setState({breakpoint:i})})});var i=(0,u["default"])({minWidth:e.slice(-1)[0]});this.media(i,function(){t.setState({breakpoint:null})})}},render:function(){var t,e,i=this;this.state.breakpoint?(e=this.props.responsive.filter(function(t){return t.breakpoint===i.state.breakpoint}),t="unslick"===e[0].settings?"unslick":(0,l["default"])({},this.props,e[0].settings)):t=(0,l["default"])({},f["default"],this.props);var s=this.props.children;return Array.isArray(s)||(s=[s]),s=s.filter(function(t){return!!t}),"unslick"===t?r["default"].createElement("div",null,s):r["default"].createElement(o.InnerSlider,t,s)}});t.exports=v},function(e,i){e.exports=t},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.InnerSlider=void 0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},r=i(2),o=s(r),a=i(4),l=s(a),d=i(7),u=s(d),c=i(12),h=s(c),p=i(13),f=s(p),v=i(14),S=s(v),w=i(15),m=i(16),g=i(17);e.InnerSlider=o["default"].createClass({displayName:"InnerSlider",mixins:[u["default"],l["default"]],getInitialState:function(){return h["default"]},getDefaultProps:function(){return f["default"]},componentWillMount:function(){this.props.init&&this.props.init(),this.setState({mounted:!0});for(var t=[],e=0;e<o["default"].Children.count(this.props.children);e++)e>=this.state.currentSlide&&e<this.state.currentSlide+this.props.slidesToShow&&t.push(e);this.props.lazyLoad&&0===this.state.lazyLoadedList.length&&this.setState({lazyLoadedList:t})},componentDidMount:function(){this.initialize(this.props),this.adaptHeight(),window.addEventListener?window.addEventListener("resize",this.onWindowResized):window.attachEvent("onresize",this.onWindowResized)},componentWillUnmount:function(){window.addEventListener?window.removeEventListener("resize",this.onWindowResized):window.detachEvent("onresize",this.onWindowResized),this.state.autoPlayTimer&&window.clearInterval(this.state.autoPlayTimer)},componentWillReceiveProps:function(t){this.props.slickGoTo!=t.slickGoTo?this.changeSlide({message:"index",index:t.slickGoTo,currentSlide:this.state.currentSlide}):this.update(t)},componentDidUpdate:function(){this.adaptHeight()},onWindowResized:function(){this.update(this.props)},render:function(){var t,e=(0,S["default"])("slick-initialized","slick-slider",this.props.className),i={fade:this.props.fade,cssEase:this.props.cssEase,speed:this.props.speed,infinite:this.props.infinite,centerMode:this.props.centerMode,currentSlide:this.state.currentSlide,lazyLoad:this.props.lazyLoad,lazyLoadedList:this.state.lazyLoadedList,rtl:this.props.rtl,slideWidth:this.state.slideWidth,slidesToShow:this.props.slidesToShow,slideCount:this.state.slideCount,trackStyle:this.state.trackStyle,variableWidth:this.props.variableWidth};if(this.props.dots===!0&&this.state.slideCount>=this.props.slidesToShow){var s={dotsClass:this.props.dotsClass,slideCount:this.state.slideCount,slidesToShow:this.props.slidesToShow,currentSlide:this.state.currentSlide,slidesToScroll:this.props.slidesToScroll,clickHandler:this.changeSlide};t=o["default"].createElement(m.Dots,s)}var r,a,l={infinite:this.props.infinite,centerMode:this.props.centerMode,currentSlide:this.state.currentSlide,slideCount:this.state.slideCount,slidesToShow:this.props.slidesToShow,prevArrow:this.props.prevArrow,nextArrow:this.props.nextArrow,clickHandler:this.changeSlide};this.props.arrows&&(r=o["default"].createElement(g.PrevArrow,l),a=o["default"].createElement(g.NextArrow,l));var d=null;return this.props.vertical===!1?this.props.centerMode===!0&&(d={padding:"0px "+this.props.centerPadding}):this.props.centerMode===!0&&(d={padding:this.props.centerPadding+" 0px"}),o["default"].createElement("div",{className:e,onMouseEnter:this.onInnerSliderEnter,onMouseLeave:this.onInnerSliderLeave},o["default"].createElement("div",{ref:"list",className:"slick-list",style:d,onMouseDown:this.swipeStart,onMouseMove:this.state.dragging?this.swipeMove:null,onMouseUp:this.swipeEnd,onMouseLeave:this.state.dragging?this.swipeEnd:null,onTouchStart:this.swipeStart,onTouchMove:this.state.dragging?this.swipeMove:null,onTouchEnd:this.swipeEnd,onTouchCancel:this.state.dragging?this.swipeEnd:null},o["default"].createElement(w.Track,n({ref:"track"},i),this.props.children)),r,a,t)}})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var n=i(5),r=i(7),o=(s(r),i(11)),a=s(o),l={changeSlide:function(t){var e,i,s,n,r,o=this.props,a=o.slidesToScroll,l=o.slidesToShow,d=this.state,u=d.slideCount,c=d.currentSlide;if(n=u%a!==0,e=n?0:(u-c)%a,"previous"===t.message)s=0===e?a:l-e,r=c-s,this.props.lazyLoad&&(i=c-s,r=-1===i?u-1:i);else if("next"===t.message)s=0===e?a:e,r=c+s;else if("dots"===t.message){if(r=t.index*t.slidesToScroll,r===t.currentSlide)return}else if("index"===t.message&&(r=t.index,r===t.currentSlide))return;this.slideHandler(r)},keyHandler:function(t){},selectHandler:function(t){},swipeStart:function(t){var e,i;this.props.swipe===!1||"ontouchend"in document&&this.props.swipe===!1||this.props.draggable===!1&&-1!==t.type.indexOf("mouse")||(e=void 0!==t.touches?t.touches[0].pageX:t.clientX,i=void 0!==t.touches?t.touches[0].pageY:t.clientY,this.setState({dragging:!0,touchObject:{startX:e,startY:i,curX:e,curY:i}}))},swipeMove:function(t){if(this.state.dragging&&!this.state.animating){var e,i,s,r=this.state.touchObject;i=(0,n.getTrackLeft)((0,a["default"])({slideIndex:this.state.currentSlide,trackRef:this.refs.track},this.props,this.state)),r.curX=t.touches?t.touches[0].pageX:t.clientX,r.curY=t.touches?t.touches[0].pageY:t.clientY,r.swipeLength=Math.round(Math.sqrt(Math.pow(r.curX-r.startX,2))),s=(this.props.rtl===!1?1:-1)*(r.curX>r.startX?1:-1);var o=this.state.currentSlide,l=Math.ceil(this.state.slideCount/this.props.slidesToScroll),d=this.swipeDirection(this.state.touchObject),u=r.swipeLength;this.props.infinite===!1&&(0===o&&"right"===d||o+1>=l&&"left"===d)&&(u=r.swipeLength*this.props.edgeFriction,this.state.edgeDragged===!1&&this.props.edgeEvent&&(this.props.edgeEvent(d),this.setState({edgeDragged:!0}))),this.state.swiped===!1&&this.props.swipeEvent&&(this.props.swipeEvent(d),this.setState({swiped:!0})),e=i+u*s,this.setState({touchObject:r,swipeLeft:e,trackStyle:(0,n.getTrackCSS)((0,a["default"])({left:e},this.props,this.state))}),Math.abs(r.curX-r.startX)<.8*Math.abs(r.curY-r.startY)||r.swipeLength>4&&t.preventDefault()}},swipeEnd:function(t){if(this.state.dragging){var e=this.state.touchObject,i=this.state.listWidth/this.props.touchThreshold,s=this.swipeDirection(e);if(this.setState({dragging:!1,edgeDragged:!1,swiped:!1,swipeLeft:null,touchObject:{}}),e.swipeLength)if(e.swipeLength>i)t.preventDefault(),"left"===s?this.slideHandler(this.state.currentSlide+this.props.slidesToScroll):"right"===s?this.slideHandler(this.state.currentSlide-this.props.slidesToScroll):this.slideHandler(this.state.currentSlide);else{var r=(0,n.getTrackLeft)((0,a["default"])({slideIndex:this.state.currentSlide,trackRef:this.refs.track},this.props,this.state));this.setState({trackStyle:(0,n.getTrackAnimateCSS)((0,a["default"])({left:r},this.props,this.state))})}}},onInnerSliderEnter:function(t){this.props.autoplay&&this.props.pauseOnHover&&this.pause()},onInnerSliderLeave:function(t){this.props.autoplay&&this.props.pauseOnHover&&this.autoPlay()}};e["default"]=l},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.getTrackLeft=e.getTrackAnimateCSS=e.getTrackCSS=void 0;var n=i(6),r=s(n),o=function(t,e){return e.reduce(function(e,i){return e&&t.hasOwnProperty(i)},!0)?null:console.error("Keys Missing",t)},a=e.getTrackCSS=function(t){o(t,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);var e;e=t.variableWidth?(t.slideCount+2*t.slidesToShow)*t.slideWidth:t.centerMode?(t.slideCount+2*(t.slidesToShow+1))*t.slideWidth:(t.slideCount+2*t.slidesToShow)*t.slideWidth;var i={opacity:1,width:e,WebkitTransform:"translate3d("+t.left+"px, 0px, 0px)",transform:"translate3d("+t.left+"px, 0px, 0px)",transition:"",WebkitTransition:"",msTransform:"translateX("+t.left+"px)"};return!window.addEventListener&&window.attachEvent&&(i.marginLeft=t.left+"px"),i};e.getTrackAnimateCSS=function(t){o(t,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var e=a(t);return e.WebkitTransition="-webkit-transform "+t.speed+"ms "+t.cssEase,e.transition="transform "+t.speed+"ms "+t.cssEase,e},e.getTrackLeft=function(t){o(t,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth"]);var e,i,s=0;if(t.fade)return 0;if(t.infinite&&(t.slideCount>t.slidesToShow&&(s=t.slideWidth*t.slidesToShow*-1),t.slideCount%t.slidesToScroll!==0&&t.slideIndex+t.slidesToScroll>t.slideCount&&t.slideCount>t.slidesToShow&&(s=t.slideIndex>t.slideCount?(t.slidesToShow-(t.slideIndex-t.slideCount))*t.slideWidth*-1:t.slideCount%t.slidesToScroll*t.slideWidth*-1)),t.centerMode&&(t.infinite?s+=t.slideWidth*Math.floor(t.slidesToShow/2):s=t.slideWidth*Math.floor(t.slidesToShow/2)),e=t.slideIndex*t.slideWidth*-1+s,t.variableWidth===!0){var n;t.slideCount<=t.slidesToShow||t.infinite===!1?i=r["default"].findDOMNode(t.trackRef).childNodes[t.slideIndex]:(n=t.slideIndex+t.slidesToShow,i=r["default"].findDOMNode(t.trackRef).childNodes[n]),e=i?-1*i.offsetLeft:0,t.centerMode===!0&&(i=t.infinite===!1?r["default"].findDOMNode(t.trackRef).children[t.slideIndex]:r["default"].findDOMNode(t.trackRef).children[t.slideIndex+t.slidesToShow+1],e=i?-1*i.offsetLeft:0,e+=(t.listWidth-i.offsetWidth)/2)}return e}},function(t,i){t.exports=e},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var n=i(2),r=s(n),o=i(6),a=s(o),l=i(8),d=s(l),u=i(5),c=i(11),h=s(c),p={initialize:function(t){var e=r["default"].Children.count(t.children),i=this.getWidth(a["default"].findDOMNode(this.refs.list)),s=this.getWidth(a["default"].findDOMNode(this.refs.track)),n=s/t.slidesToShow,o=t.rtl?e-1-t.initialSlide:t.initialSlide;this.setState({slideCount:e,slideWidth:n,listWidth:i,trackWidth:s,currentSlide:o},function(){var e=(0,u.getTrackLeft)((0,h["default"])({slideIndex:this.state.currentSlide,trackRef:this.refs.track},t,this.state)),i=(0,u.getTrackCSS)((0,h["default"])({left:e},t,this.state));this.setState({trackStyle:i}),this.autoPlay()})},update:function(t){var e=r["default"].Children.count(t.children),i=this.getWidth(a["default"].findDOMNode(this.refs.list)),s=this.getWidth(a["default"].findDOMNode(this.refs.track)),n=this.getWidth(a["default"].findDOMNode(this))/t.slidesToShow;t.autoplay||this.pause(),this.setState({slideCount:e,slideWidth:n,listWidth:i,trackWidth:s},function(){var e=(0,u.getTrackLeft)((0,h["default"])({slideIndex:this.state.currentSlide,trackRef:this.refs.track},t,this.state)),i=(0,u.getTrackCSS)((0,h["default"])({left:e},t,this.state));this.setState({trackStyle:i})})},getWidth:function(t){return t.getBoundingClientRect().width||t.offsetWidth},adaptHeight:function(){if(this.props.adaptiveHeight){var t='[data-index="'+this.state.currentSlide+'"]';if(this.refs.list){var e=a["default"].findDOMNode(this.refs.list);e.style.height=e.querySelector(t).offsetHeight+"px"}}},slideHandler:function(t){var e,i,s,n,r,o=this;if(!this.props.waitForAnimate||!this.state.animating){if(this.props.fade)return i=this.state.currentSlide,e=0>t?t+this.state.slideCount:t>=this.state.slideCount?t-this.state.slideCount:t,this.props.lazyLoad&&this.state.lazyLoadedList.indexOf(e)<0&&this.setState({lazyLoadedList:this.state.lazyLoadedList.concat(e)}),r=function(){o.setState({animating:!1}),o.props.afterChange&&o.props.afterChange(e),d["default"].removeEndEventListener(a["default"].findDOMNode(o.refs.track).children[i],r)},this.setState({animating:!0,currentSlide:e},function(){d["default"].addEndEventListener(a["default"].findDOMNode(this.refs.track).children[i],r)}),this.props.beforeChange&&this.props.beforeChange(this.state.currentSlide,e),void this.autoPlay();if(e=t,i=0>e?this.props.infinite===!1?0:this.state.slideCount%this.props.slidesToScroll!==0?this.state.slideCount-this.state.slideCount%this.props.slidesToScroll:this.state.slideCount+e:e>=this.state.slideCount?this.props.infinite===!1?this.state.slideCount-this.props.slidesToShow:this.state.slideCount%this.props.slidesToScroll!==0?0:e-this.state.slideCount:e,s=(0,u.getTrackLeft)((0,h["default"])({slideIndex:e,trackRef:this.refs.track},this.props,this.state)),n=(0,u.getTrackLeft)((0,h["default"])({slideIndex:i,trackRef:this.refs.track},this.props,this.state)),this.props.infinite===!1&&(s=n),this.props.beforeChange&&this.props.beforeChange(this.state.currentSlide,i),this.props.lazyLoad){for(var l=!0,c=[],p=e;p<e+this.props.slidesToShow;p++)l=l&&this.state.lazyLoadedList.indexOf(p)>=0,l||c.push(p);l||this.setState({lazyLoadedList:this.state.lazyLoadedList.concat(c)})}if(this.props.useCSS===!1)this.setState({currentSlide:i,trackStyle:(0,u.getTrackCSS)((0,h["default"])({left:n},this.props,this.state))},function(){this.props.afterChange&&this.props.afterChange(i)});else{var f={animating:!1,currentSlide:i,trackStyle:(0,u.getTrackCSS)((0,h["default"])({left:n},this.props,this.state)),swipeLeft:null};r=function(){o.setState(f),o.props.afterChange&&o.props.afterChange(i),d["default"].removeEndEventListener(a["default"].findDOMNode(o.refs.track),r)},this.setState({animating:!0,currentSlide:i,trackStyle:(0,u.getTrackAnimateCSS)((0,h["default"])({left:s},this.props,this.state))},function(){d["default"].addEndEventListener(a["default"].findDOMNode(this.refs.track),r)})}this.autoPlay()}},swipeDirection:function(t){var e,i,s,n;return e=t.startX-t.curX,i=t.startY-t.curY,s=Math.atan2(i,e),n=Math.round(180*s/Math.PI),0>n&&(n=360-Math.abs(n)),45>=n&&n>=0||360>=n&&n>=315?this.props.rtl===!1?"left":"right":n>=135&&225>=n?this.props.rtl===!1?"right":"left":"vertical"},autoPlay:function(){var t=this;if(!this.state.autoPlayTimer){var e=function(){if(t.state.mounted){var e=t.props.rtl?t.state.currentSlide-t.props.slidesToScroll:t.state.currentSlide+t.props.slidesToScroll;t.slideHandler(e)}};this.props.autoplay&&this.setState({autoPlayTimer:window.setInterval(e,this.props.autoplaySpeed)})}},pause:function(){this.state.autoPlayTimer&&(window.clearInterval(this.state.autoPlayTimer),this.setState({autoPlayTimer:null}))}};e["default"]=p},function(t,e,i){"use strict";function s(){var t=a("animationend"),e=a("transitionend");t&&l.push(t),e&&l.push(e)}function n(t,e,i){t.addEventListener(e,i,!1)}function r(t,e,i){t.removeEventListener(e,i,!1)}var o=i(9),a=i(10),l=[];o.canUseDOM&&s();var d={addEndEventListener:function(t,e){return 0===l.length?void window.setTimeout(e,0):void l.forEach(function(i){n(t,i,e)})},removeEndEventListener:function(t,e){0!==l.length&&l.forEach(function(i){r(t,i,e)})}};t.exports=d},function(t,e){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),s={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen,isInWorker:!i};t.exports=s},function(t,e,i){"use strict";function s(t,e){var i={};return i[t.toLowerCase()]=e.toLowerCase(),i["Webkit"+t]="webkit"+e,i["Moz"+t]="moz"+e,i["ms"+t]="MS"+e,i["O"+t]="o"+e.toLowerCase(),i}function n(t){if(a[t])return a[t];if(!o[t])return t;var e=o[t];for(var i in e)if(e.hasOwnProperty(i)&&i in l)return a[t]=e[i];return""}var r=i(9),o={animationend:s("Animation","AnimationEnd"),animationiteration:s("Animation","AnimationIteration"),animationstart:s("Animation","AnimationStart"),transitionend:s("Transition","TransitionEnd")},a={},l={};r.canUseDOM&&(l=document.createElement("div").style,"AnimationEvent"in window||(delete o.animationend.animation,delete o.animationiteration.animation,delete o.animationstart.animation),"TransitionEvent"in window||delete o.transitionend.transition),t.exports=n},function(t,e){"use strict";function i(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function s(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;10>i;i++)e["_"+String.fromCharCode(i)]=i;var s=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==s.join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(r){return!1}}var n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;t.exports=s()?Object.assign:function(t,e){for(var s,o,a=i(t),l=1;l<arguments.length;l++){s=Object(arguments[l]);for(var d in s)n.call(s,d)&&(a[d]=s[d]);if(Object.getOwnPropertySymbols){o=Object.getOwnPropertySymbols(s);for(var u=0;u<o.length;u++)r.call(s,o[u])&&(a[o[u]]=s[o[u]])}}return a}},function(t,e){"use strict";var i={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,slideCount:null,slideWidth:null,swipeLeft:null,touchObject:{startX:0,startY:0,curX:0,curY:0},lazyLoadedList:[],initialized:!1,edgeDragged:!1,swiped:!1,trackStyle:{},trackWidth:0};t.exports=i},function(t,e){"use strict";var i={className:"",adaptiveHeight:!1,arrows:!0,autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:!1,pauseOnHover:!1,responsive:null,rtl:!1,slide:"div",slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,variableWidth:!1,vertical:!1,waitForAnimate:!0,afterChange:null,beforeChange:null,edgeEvent:null,init:null,swipeEvent:null,nextArrow:null,prevArrow:null};t.exports=i},function(t,e,i){var s,n;/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";function n(){for(var t="",e=0;e<arguments.length;e++){var i=arguments[e];if(i){var s=typeof i;if("string"===s||"number"===s)t+=" "+i;else if(Array.isArray(i))t+=" "+n.apply(null,i);else if("object"===s)for(var r in i)i.hasOwnProperty(r)&&i[r]&&(t+=" "+r)}}return t.substr(1)}"undefined"!=typeof t&&t.exports?t.exports=n:(s=function(){return n}.call(e,i,e,t),!(void 0!==s&&(t.exports=s)))}()},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),r=s(n),o=i(12),a=s(o),l=i(15),d=s(l),u=function(t){var e,i,s,n,r;return r=t.rtl?t.slideCount-1-t.index:t.index,s=0>r||r>=t.slideCount,t.centerMode?(n=Math.floor(t.slidesToShow/2),i=(r-t.currentSlide)%t.slideCount===0,r>t.currentSlide-n-1&&r<=t.currentSlide+n&&(e=!0)):e=t.currentSlide<=r&&r<t.currentSlide+t.slidesToShow,d["default"]({"slick-slide":!0,"slick-active":e,"slick-center":i,"slick-cloned":s})},c=function(t){var e={};return(void 0===t.variableWidth||t.variableWidth===!1)&&(e.width=t.slideWidth),t.fade&&(e.position="relative",e.left=-t.index*t.slideWidth,e.opacity=t.currentSlide===t.index?1:0,e.transition="opacity "+t.speed+"ms "+t.cssEase,e.WebkitTransition="opacity "+t.speed+"ms "+t.cssEase),e},h=function(t,e){return null===t.key||void 0===t.key?e:t.key},p=function(t){var e,i,s=[],n=[],o=[],l=r["default"].Children.count(t.children);return r["default"].Children.forEach(t.children,function(p,f){i=!t.lazyLoad|(t.lazyLoad&&t.lazyLoadedList.indexOf(f)>=0)?p:r["default"].createElement("div",null);var v,S=c(a["default"]({},t,{index:f})),m=u(a["default"]({index:f},t));if(v=i.props.className?d["default"](m,i.props.className):m,s.push(r["default"].cloneElement(i,{key:"original"+h(i,f),"data-index":f,className:v,style:a["default"]({},i.props.style||{},S)})),t.infinite&&t.fade===!1){var w=t.variableWidth?t.slidesToShow+1:t.slidesToShow;f>=l-w&&(e=-(l-f),n.push(r["default"].cloneElement(i,{key:"cloned"+h(i,e),"data-index":e,className:v,style:a["default"]({},i.props.style||{},S)}))),w>f&&(e=l+f,o.push(r["default"].cloneElement(i,{key:"cloned"+h(i,e),"data-index":e,className:v,style:a["default"]({},i.props.style||{},S)})))}}),t.rtl?n.concat(s,o).reverse():n.concat(s,o)},f=r["default"].createClass({displayName:"Track",render:function(){var t=p(this.props);return r["default"].createElement("div",{className:"slick-track",style:this.props.trackStyle},t)}});e.Track=f},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),r=s(n),o=i(15),a=s(o),l=function(t){var e;return e=Math.ceil(t.slideCount/t.slidesToScroll)},d=r["default"].createClass({displayName:"Dots",clickHandler:function(t,e){e.preventDefault(),this.props.clickHandler(t)},render:function(){var t=this,e=l({slideCount:this.props.slideCount,slidesToScroll:this.props.slidesToScroll}),i=Array.apply(null,Array(e+1).join("0").split("")).map(function(e,i){var s=a["default"]({"slick-active":t.props.currentSlide===i*t.props.slidesToScroll}),n={message:"dots",index:i,slidesToScroll:t.props.slidesToScroll,currentSlide:t.props.currentSlide};return r["default"].createElement("li",{key:i,className:s},r["default"].createElement("button",{onClick:t.clickHandler.bind(t,n)},i+1))});return r["default"].createElement("ul",{className:this.props.dotsClass,style:{display:"block"}},i)}});e.Dots=d},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},r=i(2),o=s(r),a=i(15),l=s(a),d=o["default"].createClass({displayName:"PrevArrow",clickHandler:function(t,e){e.preventDefault(),this.props.clickHandler(t,e)},render:function(){var t={"slick-prev":!0},e=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(t["slick-disabled"]=!0,e=null);var i,s={key:"0","data-role":"none",className:l["default"](t),style:{display:"block"},onClick:e};return i=this.props.prevArrow?o["default"].cloneElement(this.props.prevArrow,s):o["default"].createElement("button",n({key:"0",type:"button"},s)," Previous")}});e.PrevArrow=d;var u=o["default"].createClass({displayName:"NextArrow",clickHandler:function(t,e){e.preventDefault(),this.props.clickHandler(t,e)},render:function(){var t={"slick-next":!0},e=this.clickHandler.bind(this,{message:"next"});this.props.infinite||(this.props.centerMode&&this.props.currentSlide>=this.props.slideCount-1?(t["slick-disabled"]=!0,e=null):this.props.currentSlide>=this.props.slideCount-this.props.slidesToShow&&(t["slick-disabled"]=!0,e=null),this.props.slideCount<=this.props.slidesToShow&&(t["slick-disabled"]=!0,e=null));var i,s={key:"1","data-role":"none",className:l["default"](t),style:{display:"block"},onClick:e};return i=this.props.nextArrow?o["default"].cloneElement(this.props.nextArrow,s):o["default"].createElement("button",n({key:"1",type:"button"},s)," Next")}});e.NextArrow=u},function(t,e,i){var s=i(20),n=function(t){var e=/[height|width]$/;return e.test(t)},r=function(t){var e="",i=Object.keys(t);return i.forEach(function(r,o){var a=t[r];r=s(r),n(r)&&"number"==typeof a&&(a+="px"),e+=a===!0?r:a===!1?"not "+r:"("+r+": "+a+")",o<i.length-1&&(e+=" and ")}),e},o=function(t){var e="";return"string"==typeof t?t:t instanceof Array?(t.forEach(function(i,s){e+=r(i),s<t.length-1&&(e+=", ")}),e):r(t)};t.exports=o},function(t,e){var i=function(t){return t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}).toLowerCase()};t.exports=i},function(t,e,i){var s=i(22),n=s&&i(23),r=i(19),o={media:function(t,e){t=r(t),"function"==typeof e&&(e={match:e}),n.register(t,e),this._responsiveMediaHandlers||(this._responsiveMediaHandlers=[]),this._responsiveMediaHandlers.push({query:t,handler:e})},componentWillUnmount:function(){this._responsiveMediaHandlers&&this._responsiveMediaHandlers.forEach(function(t){n.unregister(t.query,t.handler)})}};t.exports=o},function(t,e){var i=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=i},function(t,e,i){var s;!function(n,r,o){var a=window.matchMedia;"undefined"!=typeof t&&t.exports?t.exports=o(a):(s=function(){return r[n]=o(a)}.call(e,i,e,t),!(void 0!==s&&(t.exports=s)))}("enquire",this,function(t){"use strict";function e(t,e){var i,s=0,n=t.length;for(s;n>s&&(i=e(t[s],s),i!==!1);s++);}function i(t){return"[object Array]"===Object.prototype.toString.apply(t)}function s(t){return"function"==typeof t}function n(t){this.options=t,!t.deferSetup&&this.setup()}function r(e,i){this.query=e,this.isUnconditional=i,this.handlers=[],this.mql=t(e);var s=this;this.listener=function(t){s.mql=t,s.assess()},this.mql.addListener(this.listener)}function o(){if(!t)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!t("only all").matches}return n.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(t){return this.options===t||this.options.match===t}},r.prototype={addHandler:function(t){var e=new n(t);this.handlers.push(e),this.matches()&&e.on()},removeHandler:function(t){var i=this.handlers;e(i,function(e,s){return e.equals(t)?(e.destroy(),!i.splice(s,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){e(this.handlers,function(t){t.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var t=this.matches()?"on":"off";e(this.handlers,function(e){e[t]()})}},o.prototype={register:function(t,n,o){var a=this.queries,l=o&&this.browserIsIncapable;return a[t]||(a[t]=new r(t,l)),s(n)&&(n={match:n}),i(n)||(n=[n]),e(n,function(e){a[t].addHandler(e)}),this},unregister:function(t,e){var i=this.queries[t];return i&&(e?i.removeHandler(e):(i.clear(),delete this.queries[t])),this}},new o})}])});
!function(){"use strict";function i(){for(var t=[],e=0;e<arguments.length;e++){var s=arguments[e];if(s){var n=typeof s;if("string"===n||"number"===n)t.push(s);else if(Array.isArray(s))t.push(i.apply(null,s));else if("object"===n)for(var o in s)r.call(s,o)&&s[o]&&t.push(o)}}return t.join(" ")}var r={}.hasOwnProperty;"undefined"!=typeof t&&t.exports?t.exports=i:(s=[],n=function(){return i}.apply(e,s),!(void 0!==n&&(t.exports=n)))}()},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.Track=void 0;var n=i(2),r=s(n),o=i(11),a=s(o),l=i(14),d=s(l),u=function(t){var e,i,s,n,r;return r=t.rtl?t.slideCount-1-t.index:t.index,s=0>r||r>=t.slideCount,t.centerMode?(n=Math.floor(t.slidesToShow/2),i=(r-t.currentSlide)%t.slideCount===0,r>t.currentSlide-n-1&&r<=t.currentSlide+n&&(e=!0)):e=t.currentSlide<=r&&r<t.currentSlide+t.slidesToShow,(0,d["default"])({"slick-slide":!0,"slick-active":e,"slick-center":i,"slick-cloned":s})},c=function(t){var e={};return void 0!==t.variableWidth&&t.variableWidth!==!1||(e.width=t.slideWidth),t.fade&&(e.position="relative",e.left=-t.index*t.slideWidth,e.opacity=t.currentSlide===t.index?1:0,e.transition="opacity "+t.speed+"ms "+t.cssEase,e.WebkitTransition="opacity "+t.speed+"ms "+t.cssEase),e},h=function(t,e){return null===t.key||void 0===t.key?e:t.key},p=function(t){var e,i,s=[],n=[],o=[],l=r["default"].Children.count(t.children);return r["default"].Children.forEach(t.children,function(p,f){i=!t.lazyLoad|(t.lazyLoad&&t.lazyLoadedList.indexOf(f)>=0)?p:r["default"].createElement("div",null);var v,S=c((0,a["default"])({},t,{index:f})),w=u((0,a["default"])({index:f},t));if(v=i.props.className?(0,d["default"])(w,i.props.className):w,s.push(r["default"].cloneElement(i,{key:"original"+h(i,f),"data-index":f,className:v,style:(0,a["default"])({},i.props.style||{},S)})),t.infinite&&t.fade===!1){var m=t.variableWidth?t.slidesToShow+1:t.slidesToShow;f>=l-m&&(e=-(l-f),n.push(r["default"].cloneElement(i,{key:"precloned"+h(i,e),"data-index":e,className:v,style:(0,a["default"])({},i.props.style||{},S)}))),m>f&&(e=l+f,o.push(r["default"].cloneElement(i,{key:"postcloned"+h(i,e),"data-index":e,className:v,style:(0,a["default"])({},i.props.style||{},S)})))}}),t.rtl?n.concat(s,o).reverse():n.concat(s,o)};e.Track=r["default"].createClass({displayName:"Track",render:function(){var t=p(this.props);return r["default"].createElement("div",{className:"slick-track",style:this.props.trackStyle},t)}})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.Dots=void 0;var n=i(2),r=s(n),o=i(14),a=s(o),l=function(t){var e;return e=Math.ceil(t.slideCount/t.slidesToScroll)};e.Dots=r["default"].createClass({displayName:"Dots",clickHandler:function(t,e){e.preventDefault(),this.props.clickHandler(t)},render:function(){var t=this,e=l({slideCount:this.props.slideCount,slidesToScroll:this.props.slidesToScroll}),i=Array.apply(null,Array(e+1).join("0").split("")).map(function(e,i){var s=(0,a["default"])({"slick-active":t.props.currentSlide===i*t.props.slidesToScroll}),n={message:"dots",index:i,slidesToScroll:t.props.slidesToScroll,currentSlide:t.props.currentSlide};return r["default"].createElement("li",{key:i,className:s},r["default"].createElement("button",{onClick:t.clickHandler.bind(t,n)},i+1))});return r["default"].createElement("ul",{className:this.props.dotsClass,style:{display:"block"}},i)}})},function(t,e,i){"use strict";function s(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0,e.NextArrow=e.PrevArrow=void 0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},r=i(2),o=s(r),a=i(14),l=s(a);e.PrevArrow=o["default"].createClass({displayName:"PrevArrow",clickHandler:function(t,e){e.preventDefault(),this.props.clickHandler(t,e)},render:function(){var t={"slick-arrow":!0,"slick-prev":!0},e=this.clickHandler.bind(this,{message:"previous"});!this.props.infinite&&(0===this.props.currentSlide||this.props.slideCount<=this.props.slidesToShow)&&(t["slick-disabled"]=!0,e=null);var i,s={key:"0","data-role":"none",className:(0,l["default"])(t),style:{display:"block"},onClick:e};return i=this.props.prevArrow?o["default"].cloneElement(this.props.prevArrow,s):o["default"].createElement("button",n({key:"0",type:"button"},s)," Previous")}}),e.NextArrow=o["default"].createClass({displayName:"NextArrow",clickHandler:function(t,e){e.preventDefault(),this.props.clickHandler(t,e)},render:function(){var t={"slick-arrow":!0,"slick-next":!0},e=this.clickHandler.bind(this,{message:"next"});this.props.infinite||(this.props.centerMode&&this.props.currentSlide>=this.props.slideCount-1?(t["slick-disabled"]=!0,e=null):this.props.currentSlide>=this.props.slideCount-this.props.slidesToShow&&(t["slick-disabled"]=!0,e=null),this.props.slideCount<=this.props.slidesToShow&&(t["slick-disabled"]=!0,e=null));var i,s={key:"1","data-role":"none",className:(0,l["default"])(t),style:{display:"block"},onClick:e};return i=this.props.nextArrow?o["default"].cloneElement(this.props.nextArrow,s):o["default"].createElement("button",n({key:"1",type:"button"},s)," Next")}})},function(t,e,i){var s=i(19),n=function(t){var e=/[height|width]$/;return e.test(t)},r=function(t){var e="",i=Object.keys(t);return i.forEach(function(r,o){var a=t[r];r=s(r),n(r)&&"number"==typeof a&&(a+="px"),e+=a===!0?r:a===!1?"not "+r:"("+r+": "+a+")",o<i.length-1&&(e+=" and ")}),e},o=function(t){var e="";return"string"==typeof t?t:t instanceof Array?(t.forEach(function(i,s){e+=r(i),s<t.length-1&&(e+=", ")}),e):r(t)};t.exports=o},function(t,e){var i=function(t){return t.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}).toLowerCase()};t.exports=i},function(t,e,i){var s=i(21),n=s&&i(22),r=i(18),o={media:function(t,e){t=r(t),"function"==typeof e&&(e={match:e}),n.register(t,e),this._responsiveMediaHandlers||(this._responsiveMediaHandlers=[]),this._responsiveMediaHandlers.push({query:t,handler:e})},componentWillUnmount:function(){this._responsiveMediaHandlers&&this._responsiveMediaHandlers.forEach(function(t){n.unregister(t.query,t.handler)})}};t.exports=o},function(t,e){var i=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=i},function(t,e,i){var s;!function(n,r,o){var a=window.matchMedia;"undefined"!=typeof t&&t.exports?t.exports=o(a):(s=function(){return r[n]=o(a)}.call(e,i,e,t),!(void 0!==s&&(t.exports=s)))}("enquire",this,function(t){"use strict";function e(t,e){var i,s=0,n=t.length;for(s;n>s&&(i=e(t[s],s),i!==!1);s++);}function i(t){return"[object Array]"===Object.prototype.toString.apply(t)}function s(t){return"function"==typeof t}function n(t){this.options=t,!t.deferSetup&&this.setup()}function r(e,i){this.query=e,this.isUnconditional=i,this.handlers=[],this.mql=t(e);var s=this;this.listener=function(t){s.mql=t,s.assess()},this.mql.addListener(this.listener)}function o(){if(!t)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!t("only all").matches}return n.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(t){return this.options===t||this.options.match===t}},r.prototype={addHandler:function(t){var e=new n(t);this.handlers.push(e),this.matches()&&e.on()},removeHandler:function(t){var i=this.handlers;e(i,function(e,s){return e.equals(t)?(e.destroy(),!i.splice(s,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){e(this.handlers,function(t){t.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var t=this.matches()?"on":"off";e(this.handlers,function(e){e[t]()})}},o.prototype={register:function(t,n,o){var a=this.queries,l=o&&this.browserIsIncapable;return a[t]||(a[t]=new r(t,l)),s(n)&&(n={match:n}),i(n)||(n=[n]),e(n,function(e){a[t].addHandler(e)}),this},unregister:function(t,e){var i=this.queries[t];return i&&(e?i.removeHandler(e):(i.clear(),delete this.queries[t])),this}},new o})}])});

@@ -6,5 +6,5 @@ 'use strict';

var baseUrl = '';
var baseUrl = '/img/react-slick';
if (process.env.NODE_ENV === 'production') {
baseUrl = 'http://static.webrafter.com';
baseUrl = 'https://s3.amazonaws.com/static.neostack.com/img/react-slick';
}

@@ -44,2 +44,3 @@

<div key={6}><h3>6</h3></div>
{false? <div key={6}><h3>6</h3></div>: null}
</Slider>

@@ -381,6 +382,6 @@ </div>

<Slider {...settings}>
<div><img src={baseUrl + '/img/abstract01.jpg'} /></div>
<div><img src={baseUrl + '/img/abstract02.jpg'} /></div>
<div><img src={baseUrl + '/img/abstract03.jpg'} /></div>
<div><img src={baseUrl + '/img/abstract04.jpg'} /></div>
<div><img src={baseUrl + '/abstract01.jpg'} /></div>
<div><img src={baseUrl + '/abstract02.jpg'} /></div>
<div><img src={baseUrl + '/abstract03.jpg'} /></div>
<div><img src={baseUrl + '/abstract04.jpg'} /></div>
</Slider>

@@ -407,6 +408,6 @@ </div>

<Slider {...settings}>
<div><img src={baseUrl + '/img/abstract01.jpg'} /></div>
<div><img src={baseUrl + '/img/abstract02.jpg'} /></div>
<div><img src={baseUrl + '/img/abstract03.jpg'} /></div>
<div><img src={baseUrl + '/img/abstract04.jpg'} /></div>
<div><img src={baseUrl + '/abstract01.jpg'} /></div>
<div><img src={baseUrl + '/abstract02.jpg'} /></div>
<div><img src={baseUrl + '/abstract03.jpg'} /></div>
<div><img src={baseUrl + '/abstract04.jpg'} /></div>
</Slider>

@@ -441,6 +442,6 @@ </div>

<Slider {...settings}>
<div><img src={baseUrl + '/img/abstract01.jpg'} /></div>
<div><img src={baseUrl + '/img/abstract02.jpg'} /></div>
<div><img src={baseUrl + '/img/abstract03.jpg'} /></div>
<div><img src={baseUrl + '/img/abstract04.jpg'} /></div>
<div><img src={baseUrl + '/abstract01.jpg'} /></div>
<div><img src={baseUrl + '/abstract02.jpg'} /></div>
<div><img src={baseUrl + '/abstract03.jpg'} /></div>
<div><img src={baseUrl + '/abstract04.jpg'} /></div>
</Slider>

@@ -447,0 +448,0 @@ </div>

'use strict';
var React = require('react');
var ReactDOM = require('../src/mixins/ReactDOM');
var ReactDOM = require('react-dom');
var Docs = require('./docs');

@@ -9,2 +9,1 @@

ReactDOM.render(<Docs />, document.getElementById('rapp'));
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
exports.NextArrow = exports.PrevArrow = undefined;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = require('react');

@@ -19,5 +16,8 @@

var PrevArrow = _react2['default'].createClass({
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var PrevArrow = exports.PrevArrow = _react2.default.createClass({
displayName: 'PrevArrow',
clickHandler: function clickHandler(options, e) {

@@ -28,3 +28,3 @@ e.preventDefault();

render: function render() {
var prevClasses = { 'slick-prev': true };
var prevClasses = { 'slick-arrow': true, 'slick-prev': true };
var prevHandler = this.clickHandler.bind(this, { message: 'previous' });

@@ -40,3 +40,3 @@

'data-role': 'none',
className: (0, _classnames2['default'])(prevClasses),
className: (0, _classnames2.default)(prevClasses),
style: { display: 'block' },

@@ -48,5 +48,5 @@ onClick: prevHandler

if (this.props.prevArrow) {
prevArrow = _react2['default'].cloneElement(this.props.prevArrow, prevArrowProps);
prevArrow = _react2.default.cloneElement(this.props.prevArrow, prevArrowProps);
} else {
prevArrow = _react2['default'].createElement(
prevArrow = _react2.default.createElement(
'button',

@@ -62,4 +62,3 @@ _extends({ key: '0', type: 'button' }, prevArrowProps),

exports.PrevArrow = PrevArrow;
var NextArrow = _react2['default'].createClass({
var NextArrow = exports.NextArrow = _react2.default.createClass({
displayName: 'NextArrow',

@@ -72,3 +71,3 @@

render: function render() {
var nextClasses = { 'slick-next': true };
var nextClasses = { 'slick-arrow': true, 'slick-next': true };
var nextHandler = this.clickHandler.bind(this, { message: 'next' });

@@ -96,3 +95,3 @@

'data-role': 'none',
className: (0, _classnames2['default'])(nextClasses),
className: (0, _classnames2.default)(nextClasses),
style: { display: 'block' },

@@ -105,5 +104,5 @@ onClick: nextHandler

if (this.props.nextArrow) {
nextArrow = _react2['default'].cloneElement(this.props.nextArrow, nextArrowProps);
nextArrow = _react2.default.cloneElement(this.props.nextArrow, nextArrowProps);
} else {
nextArrow = _react2['default'].createElement(
nextArrow = _react2.default.createElement(
'button',

@@ -117,3 +116,2 @@ _extends({ key: '1', type: 'button' }, nextArrowProps),

}
});
exports.NextArrow = NextArrow;
});
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
exports.Dots = undefined;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = require('react');

@@ -17,2 +14,4 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var getDotCount = function getDotCount(spec) {

@@ -24,5 +23,6 @@ var dots;

var Dots = _react2['default'].createClass({
var Dots = exports.Dots = _react2.default.createClass({
displayName: 'Dots',
clickHandler: function clickHandler(options, e) {

@@ -47,3 +47,3 @@ // In Autoplay the focus stays on clicked button even after transition

var className = (0, _classnames2['default'])({
var className = (0, _classnames2.default)({
'slick-active': _this.props.currentSlide === i * _this.props.slidesToScroll

@@ -59,6 +59,6 @@ });

return _react2['default'].createElement(
return _react2.default.createElement(
'li',
{ key: i, className: className },
_react2['default'].createElement(
_react2.default.createElement(
'button',

@@ -71,3 +71,3 @@ { onClick: _this.clickHandler.bind(_this, dotOptions) },

return _react2['default'].createElement(
return _react2.default.createElement(
'ul',

@@ -78,3 +78,2 @@ { className: this.props.dotsClass, style: { display: 'block' } },

}
});
exports.Dots = Dots;
});
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
exports.InnerSlider = undefined;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = require('react');

@@ -15,9 +12,9 @@

var _mixinsEventHandlers = require('./mixins/event-handlers');
var _eventHandlers = require('./mixins/event-handlers');
var _mixinsEventHandlers2 = _interopRequireDefault(_mixinsEventHandlers);
var _eventHandlers2 = _interopRequireDefault(_eventHandlers);
var _mixinsHelpers = require('./mixins/helpers');
var _helpers = require('./mixins/helpers');
var _mixinsHelpers2 = _interopRequireDefault(_mixinsHelpers);
var _helpers2 = _interopRequireDefault(_helpers);

@@ -42,11 +39,13 @@ var _initialState = require('./initial-state');

var InnerSlider = _react2['default'].createClass({
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var InnerSlider = exports.InnerSlider = _react2.default.createClass({
displayName: 'InnerSlider',
mixins: [_mixinsHelpers2['default'], _mixinsEventHandlers2['default']],
mixins: [_helpers2.default, _eventHandlers2.default],
getInitialState: function getInitialState() {
return _initialState2['default'];
return _initialState2.default;
},
getDefaultProps: function getDefaultProps() {
return _defaultProps2['default'];
return _defaultProps2.default;
},

@@ -61,3 +60,3 @@ componentWillMount: function componentWillMount() {

var lazyLoadedList = [];
for (var i = 0; i < _react2['default'].Children.count(this.props.children); i++) {
for (var i = 0; i < _react2.default.Children.count(this.props.children); i++) {
if (i >= this.state.currentSlide && i < this.state.currentSlide + this.props.slidesToShow) {

@@ -112,3 +111,3 @@ lazyLoadedList.push(i);

render: function render() {
var className = (0, _classnames2['default'])('slick-initialized', 'slick-slider', this.props.className);
var className = (0, _classnames2.default)('slick-initialized', 'slick-slider', this.props.className);

@@ -134,3 +133,3 @@ var trackProps = {

if (this.props.dots === true && this.state.slideCount > this.props.slidesToShow) {
if (this.props.dots === true && this.state.slideCount >= this.props.slidesToShow) {
var dotProps = {

@@ -145,3 +144,3 @@ dotsClass: this.props.dotsClass,

dots = _react2['default'].createElement(_dots.Dots, dotProps);
dots = _react2.default.createElement(_dots.Dots, dotProps);
}

@@ -163,10 +162,26 @@

if (this.props.arrows) {
prevArrow = _react2['default'].createElement(_arrows.PrevArrow, arrowProps);
nextArrow = _react2['default'].createElement(_arrows.NextArrow, arrowProps);
prevArrow = _react2.default.createElement(_arrows.PrevArrow, arrowProps);
nextArrow = _react2.default.createElement(_arrows.NextArrow, arrowProps);
}
return _react2['default'].createElement(
var centerPaddingStyle = null;
if (this.props.vertical === false) {
if (this.props.centerMode === true) {
centerPaddingStyle = {
padding: '0px ' + this.props.centerPadding
};
}
} else {
if (this.props.centerMode === true) {
centerPaddingStyle = {
padding: this.props.centerPadding + ' 0px'
};
}
}
return _react2.default.createElement(
'div',
{ className: className, onMouseEnter: this.onInnerSliderEnter, onMouseLeave: this.onInnerSliderLeave },
_react2['default'].createElement(
_react2.default.createElement(
'div',

@@ -176,2 +191,3 @@ {

className: 'slick-list',
style: centerPaddingStyle,
onMouseDown: this.swipeStart,

@@ -185,3 +201,3 @@ onMouseMove: this.state.dragging ? this.swipeMove : null,

onTouchCancel: this.state.dragging ? this.swipeEnd : null },
_react2['default'].createElement(
_react2.default.createElement(
_track.Track,

@@ -197,3 +213,2 @@ _extends({ ref: 'track' }, trackProps),

}
});
exports.InnerSlider = InnerSlider;
});
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
exports.__esModule = true;

@@ -18,2 +15,4 @@ var _trackHelper = require('./trackHelper');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var EventHandlers = {

@@ -23,15 +22,22 @@ // Event handler for previous and next

var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;
unevenOffset = this.state.slideCount % this.props.slidesToScroll !== 0;
indexOffset = unevenOffset ? 0 : (this.state.slideCount - this.state.currentSlide) % this.props.slidesToScroll;
var _props = this.props;
var slidesToScroll = _props.slidesToScroll;
var slidesToShow = _props.slidesToShow;
var _state = this.state;
var slideCount = _state.slideCount;
var currentSlide = _state.currentSlide;
unevenOffset = slideCount % slidesToScroll !== 0;
indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;
if (options.message === 'previous') {
slideOffset = indexOffset === 0 ? this.props.slidesToScroll : this.props.slidesToShow - indexOffset;
targetSlide = this.state.currentSlide - slideOffset;
slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset;
targetSlide = currentSlide - slideOffset;
if (this.props.lazyLoad) {
previousInt = this.state.currentSlide - slideOffset;
targetSlide = previousInt === -1 ? this.state.slideCount - 1 : previousInt;
previousInt = currentSlide - slideOffset;
targetSlide = previousInt === -1 ? slideCount - 1 : previousInt;
}
} else if (options.message === 'next') {
slideOffset = indexOffset === 0 ? this.props.slidesToScroll : indexOffset;
targetSlide = this.state.currentSlide + slideOffset;
slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset;
targetSlide = currentSlide + slideOffset;
} else if (options.message === 'dots') {

@@ -87,3 +93,3 @@ // Click on dots

curLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2['default'])({
curLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2.default)({
slideIndex: this.state.currentSlide,

@@ -123,3 +129,3 @@ trackRef: this.refs.track

swipeLeft: swipeLeft,
trackStyle: (0, _trackHelper.getTrackCSS)((0, _objectAssign2['default'])({ left: swipeLeft }, this.props, this.state))
trackStyle: (0, _trackHelper.getTrackCSS)((0, _objectAssign2.default)({ left: swipeLeft }, this.props, this.state))
});

@@ -165,3 +171,3 @@

// Adjust the track back to it's original position.
var currentLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2['default'])({
var currentLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2.default)({
slideIndex: this.state.currentSlide,

@@ -172,3 +178,3 @@ trackRef: this.refs.track

this.setState({
trackStyle: (0, _trackHelper.getTrackAnimateCSS)((0, _objectAssign2['default'])({ left: currentLeft }, this.props, this.state))
trackStyle: (0, _trackHelper.getTrackAnimateCSS)((0, _objectAssign2.default)({ left: currentLeft }, this.props, this.state))
});

@@ -189,3 +195,2 @@ }

exports['default'] = EventHandlers;
module.exports = exports['default'];
exports.default = EventHandlers;
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = require('react');

@@ -13,9 +9,9 @@

var _ReactDOM = require('./ReactDOM');
var _reactDom = require('react-dom');
var _ReactDOM2 = _interopRequireDefault(_ReactDOM);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _reactLibReactTransitionEvents = require('react/lib/ReactTransitionEvents');
var _ReactTransitionEvents = require('react/lib/ReactTransitionEvents');
var _reactLibReactTransitionEvents2 = _interopRequireDefault(_reactLibReactTransitionEvents);
var _ReactTransitionEvents2 = _interopRequireDefault(_ReactTransitionEvents);

@@ -28,8 +24,10 @@ var _trackHelper = require('./trackHelper');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var helpers = {
initialize: function initialize(props) {
var slideCount = _react2['default'].Children.count(props.children);
var listWidth = this.getWidth(_ReactDOM2['default'].findDOMNode(this.refs.list));
var trackWidth = this.getWidth(_ReactDOM2['default'].findDOMNode(this.refs.track));
var slideWidth = this.getWidth(_ReactDOM2['default'].findDOMNode(this)) / props.slidesToShow;
var slideCount = _react2.default.Children.count(props.children);
var listWidth = this.getWidth(_reactDom2.default.findDOMNode(this.refs.list));
var trackWidth = this.getWidth(_reactDom2.default.findDOMNode(this.refs.track));
var slideWidth = trackWidth / props.slidesToShow;

@@ -46,3 +44,3 @@ var currentSlide = props.rtl ? slideCount - 1 - props.initialSlide : props.initialSlide;

var targetLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2['default'])({
var targetLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2.default)({
slideIndex: this.state.currentSlide,

@@ -52,3 +50,3 @@ trackRef: this.refs.track

// getCSS function needs previously set state
var trackStyle = (0, _trackHelper.getTrackCSS)((0, _objectAssign2['default'])({ left: targetLeft }, props, this.state));
var trackStyle = (0, _trackHelper.getTrackCSS)((0, _objectAssign2.default)({ left: targetLeft }, props, this.state));

@@ -63,7 +61,10 @@ this.setState({ trackStyle: trackStyle });

// Refactor it
var slideCount = _react2['default'].Children.count(props.children);
var listWidth = this.getWidth(_ReactDOM2['default'].findDOMNode(this.refs.list));
var trackWidth = this.getWidth(_ReactDOM2['default'].findDOMNode(this.refs.track));
var slideWidth = this.getWidth(_ReactDOM2['default'].findDOMNode(this)) / props.slidesToShow;
var slideCount = _react2.default.Children.count(props.children);
var listWidth = this.getWidth(_reactDom2.default.findDOMNode(this.refs.list));
var trackWidth = this.getWidth(_reactDom2.default.findDOMNode(this.refs.track));
var slideWidth = this.getWidth(_reactDom2.default.findDOMNode(this)) / props.slidesToShow;
// pause slider if autoplay is set to false
if (!props.autoplay) this.pause();
this.setState({

@@ -76,3 +77,3 @@ slideCount: slideCount,

var targetLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2['default'])({
var targetLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2.default)({
slideIndex: this.state.currentSlide,

@@ -82,3 +83,3 @@ trackRef: this.refs.track

// getCSS function needs previously set state
var trackStyle = (0, _trackHelper.getTrackCSS)((0, _objectAssign2['default'])({ left: targetLeft }, props, this.state));
var trackStyle = (0, _trackHelper.getTrackCSS)((0, _objectAssign2.default)({ left: targetLeft }, props, this.state));

@@ -95,3 +96,3 @@ this.setState({ trackStyle: trackStyle });

if (this.refs.list) {
var slickList = _ReactDOM2['default'].findDOMNode(this.refs.list);
var slickList = _reactDom2.default.findDOMNode(this.refs.list);
slickList.style.height = slickList.querySelector(selector).offsetHeight + 'px';

@@ -108,3 +109,3 @@ }

var targetLeft, currentLeft;
var callback;
var _callback2;

@@ -133,3 +134,3 @@ if (this.props.waitForAnimate && this.state.animating) {

callback = function () {
_callback2 = function callback() {
_this.setState({

@@ -139,5 +140,5 @@ animating: false

if (_this.props.afterChange) {
_this.props.afterChange(currentSlide);
_this.props.afterChange(targetSlide);
}
_reactLibReactTransitionEvents2['default'].removeEndEventListener(_ReactDOM2['default'].findDOMNode(_this.refs.track).children[currentSlide], callback);
_ReactTransitionEvents2.default.removeEndEventListener(_reactDom2.default.findDOMNode(_this.refs.track).children[currentSlide], _callback2);
};

@@ -149,7 +150,7 @@

}, function () {
_reactLibReactTransitionEvents2['default'].addEndEventListener(_ReactDOM2['default'].findDOMNode(this.refs.track).children[currentSlide], callback);
_ReactTransitionEvents2.default.addEndEventListener(_reactDom2.default.findDOMNode(this.refs.track).children[currentSlide], _callback2);
});
if (this.props.beforeChange) {
this.props.beforeChange(this.state.currentSlide, currentSlide);
this.props.beforeChange(this.state.currentSlide, targetSlide);
}

@@ -182,3 +183,3 @@

targetLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2['default'])({
targetLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2.default)({
slideIndex: targetSlide,

@@ -188,3 +189,3 @@ trackRef: this.refs.track

currentLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2['default'])({
currentLeft = (0, _trackHelper.getTrackLeft)((0, _objectAssign2.default)({
slideIndex: currentSlide,

@@ -227,3 +228,3 @@ trackRef: this.refs.track

currentSlide: currentSlide,
trackStyle: (0, _trackHelper.getTrackCSS)((0, _objectAssign2['default'])({ left: currentLeft }, this.props, this.state))
trackStyle: (0, _trackHelper.getTrackCSS)((0, _objectAssign2.default)({ left: currentLeft }, this.props, this.state))
}, function () {

@@ -239,7 +240,7 @@ if (this.props.afterChange) {

currentSlide: currentSlide,
trackStyle: (0, _trackHelper.getTrackCSS)((0, _objectAssign2['default'])({ left: currentLeft }, this.props, this.state)),
trackStyle: (0, _trackHelper.getTrackCSS)((0, _objectAssign2.default)({ left: currentLeft }, this.props, this.state)),
swipeLeft: null
};
callback = function () {
_callback2 = function _callback() {
_this.setState(nextStateChanges);

@@ -249,3 +250,3 @@ if (_this.props.afterChange) {

}
_reactLibReactTransitionEvents2['default'].removeEndEventListener(_ReactDOM2['default'].findDOMNode(_this.refs.track), callback);
_ReactTransitionEvents2.default.removeEndEventListener(_reactDom2.default.findDOMNode(_this.refs.track), _callback2);
};

@@ -256,5 +257,5 @@

currentSlide: currentSlide,
trackStyle: (0, _trackHelper.getTrackAnimateCSS)((0, _objectAssign2['default'])({ left: targetLeft }, this.props, this.state))
trackStyle: (0, _trackHelper.getTrackAnimateCSS)((0, _objectAssign2.default)({ left: targetLeft }, this.props, this.state))
}, function () {
_reactLibReactTransitionEvents2['default'].addEndEventListener(_ReactDOM2['default'].findDOMNode(this.refs.track), callback);
_ReactTransitionEvents2.default.addEndEventListener(_reactDom2.default.findDOMNode(this.refs.track), _callback2);
});

@@ -313,3 +314,2 @@ }

exports['default'] = helpers;
module.exports = exports['default'];
exports.default = helpers;
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
exports.__esModule = true;
exports.getTrackLeft = exports.getTrackAnimateCSS = exports.getTrackCSS = undefined;
var _ReactDOM = require('./ReactDOM');
var _reactDom = require('react-dom');
var _ReactDOM2 = _interopRequireDefault(_ReactDOM);
var _reactDom2 = _interopRequireDefault(_reactDom);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var checkSpecKeys = function checkSpecKeys(spec, keysArray) {

@@ -18,3 +18,3 @@ return keysArray.reduce(function (value, key) {

var getTrackCSS = function getTrackCSS(spec) {
var getTrackCSS = exports.getTrackCSS = function getTrackCSS(spec) {
checkSpecKeys(spec, ['left', 'variableWidth', 'slideCount', 'slidesToShow', 'slideWidth']);

@@ -50,4 +50,3 @@

exports.getTrackCSS = getTrackCSS;
var getTrackAnimateCSS = function getTrackAnimateCSS(spec) {
var getTrackAnimateCSS = exports.getTrackAnimateCSS = function getTrackAnimateCSS(spec) {
checkSpecKeys(spec, ['left', 'variableWidth', 'slideCount', 'slidesToShow', 'slideWidth', 'speed', 'cssEase']);

@@ -62,4 +61,3 @@

exports.getTrackAnimateCSS = getTrackAnimateCSS;
var getTrackLeft = function getTrackLeft(spec) {
var getTrackLeft = exports.getTrackLeft = function getTrackLeft(spec) {

@@ -104,6 +102,6 @@ checkSpecKeys(spec, ['slideIndex', 'trackRef', 'infinite', 'centerMode', 'slideCount', 'slidesToShow', 'slidesToScroll', 'slideWidth', 'listWidth', 'variableWidth']);

if (spec.slideCount <= spec.slidesToShow || spec.infinite === false) {
targetSlide = _ReactDOM2['default'].findDOMNode(spec.trackRef).childNodes[spec.slideIndex];
targetSlide = _reactDom2.default.findDOMNode(spec.trackRef).childNodes[spec.slideIndex];
} else {
targetSlideIndex = spec.slideIndex + spec.slidesToShow;
targetSlide = _ReactDOM2['default'].findDOMNode(spec.trackRef).childNodes[targetSlideIndex];
targetSlide = _reactDom2.default.findDOMNode(spec.trackRef).childNodes[targetSlideIndex];
}

@@ -113,5 +111,5 @@ targetLeft = targetSlide ? targetSlide.offsetLeft * -1 : 0;

if (spec.infinite === false) {
targetSlide = _ReactDOM2['default'].findDOMNode(spec.trackRef).children[spec.slideIndex];
targetSlide = _reactDom2.default.findDOMNode(spec.trackRef).children[spec.slideIndex];
} else {
targetSlide = _ReactDOM2['default'].findDOMNode(spec.trackRef).children[spec.slideIndex + spec.slidesToShow + 1];
targetSlide = _reactDom2.default.findDOMNode(spec.trackRef).children[spec.slideIndex + spec.slidesToShow + 1];
}

@@ -125,3 +123,2 @@

return targetLeft;
};
exports.getTrackLeft = getTrackLeft;
};
'use strict';
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = require('react');

@@ -27,6 +25,8 @@

var Slider = _react2['default'].createClass({
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Slider = _react2.default.createClass({
displayName: 'Slider',
mixins: [_reactResponsiveMixin2['default']],
mixins: [_reactResponsiveMixin2.default],
getInitialState: function getInitialState() {

@@ -51,5 +51,5 @@ return {

if (index === 0) {
bQuery = (0, _json2mq2['default'])({ minWidth: 0, maxWidth: breakpoint });
bQuery = (0, _json2mq2.default)({ minWidth: 0, maxWidth: breakpoint });
} else {
bQuery = (0, _json2mq2['default'])({ minWidth: breakpoints[index - 1], maxWidth: breakpoint });
bQuery = (0, _json2mq2.default)({ minWidth: breakpoints[index - 1], maxWidth: breakpoint });
}

@@ -62,3 +62,3 @@ _this.media(bQuery, function () {

// Register media query for full screen. Need to support resize from small to large
var query = (0, _json2mq2['default'])({ minWidth: breakpoints.slice(-1)[0] });
var query = (0, _json2mq2.default)({ minWidth: breakpoints.slice(-1)[0] });

@@ -79,18 +79,29 @@ this.media(query, function () {

});
settings = newProps[0].settings === 'unslick' ? 'unslick' : (0, _objectAssign2['default'])({}, this.props, newProps[0].settings);
settings = newProps[0].settings === 'unslick' ? 'unslick' : (0, _objectAssign2.default)({}, this.props, newProps[0].settings);
} else {
settings = (0, _objectAssign2['default'])({}, _defaultProps2['default'], this.props);
settings = (0, _objectAssign2.default)({}, _defaultProps2.default, this.props);
}
var children = this.props.children;
if (!Array.isArray(children)) {
children = [children];
}
// Children may contain false or null, so we should filter them
children = children.filter(function (child) {
return !!child;
});
if (settings === 'unslick') {
// if 'unslick' responsive breakpoint setting used, just return the <Slider> tag nested HTML
return _react2['default'].createElement(
return _react2.default.createElement(
'div',
null,
this.props.children
children
);
} else {
return _react2['default'].createElement(
return _react2.default.createElement(
_innerSlider.InnerSlider,
settings,
this.props.children
children
);

@@ -97,0 +108,0 @@ }

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
exports.Track = undefined;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = require('react');

@@ -21,2 +18,4 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var getSlideClasses = function getSlideClasses(spec) {

@@ -42,3 +41,3 @@ var slickActive, slickCenter, slickCloned;

}
return (0, _classnames2['default'])({
return (0, _classnames2.default)({
'slick-slide': true,

@@ -79,17 +78,17 @@ 'slick-active': slickActive,

var postCloneSlides = [];
var count = _react2['default'].Children.count(spec.children);
var count = _react2.default.Children.count(spec.children);
var child;
_react2['default'].Children.forEach(spec.children, function (elem, index) {
_react2.default.Children.forEach(spec.children, function (elem, index) {
if (!spec.lazyLoad | (spec.lazyLoad && spec.lazyLoadedList.indexOf(index) >= 0)) {
child = elem;
} else {
child = _react2['default'].createElement('div', null);
child = _react2.default.createElement('div', null);
}
var childStyle = getSlideStyle((0, _objectAssign2['default'])({}, spec, { index: index }));
var slickClasses = getSlideClasses((0, _objectAssign2['default'])({ index: index }, spec));
var childStyle = getSlideStyle((0, _objectAssign2.default)({}, spec, { index: index }));
var slickClasses = getSlideClasses((0, _objectAssign2.default)({ index: index }, spec));
var cssClasses;
if (child.props.className) {
cssClasses = (0, _classnames2['default'])(slickClasses, child.props.className);
cssClasses = (0, _classnames2.default)(slickClasses, child.props.className);
} else {

@@ -99,7 +98,7 @@ cssClasses = slickClasses;

slides.push(_react2['default'].cloneElement(child, {
slides.push(_react2.default.cloneElement(child, {
key: 'original' + getKey(child, index),
'data-index': index,
className: cssClasses,
style: (0, _objectAssign2['default'])({}, child.props.style || {}, childStyle)
style: (0, _objectAssign2.default)({}, child.props.style || {}, childStyle)
}));

@@ -113,7 +112,7 @@

key = -(count - index);
preCloneSlides.push(_react2['default'].cloneElement(child, {
key: 'cloned' + getKey(child, key),
preCloneSlides.push(_react2.default.cloneElement(child, {
key: 'precloned' + getKey(child, key),
'data-index': key,
className: cssClasses,
style: (0, _objectAssign2['default'])({}, child.props.style || {}, childStyle)
style: (0, _objectAssign2.default)({}, child.props.style || {}, childStyle)
}));

@@ -124,7 +123,7 @@ }

key = count + index;
postCloneSlides.push(_react2['default'].cloneElement(child, {
key: 'cloned' + getKey(child, key),
postCloneSlides.push(_react2.default.cloneElement(child, {
key: 'postcloned' + getKey(child, key),
'data-index': key,
className: cssClasses,
style: (0, _objectAssign2['default'])({}, child.props.style || {}, childStyle)
style: (0, _objectAssign2.default)({}, child.props.style || {}, childStyle)
}));

@@ -142,3 +141,3 @@ }

var Track = _react2['default'].createClass({
var Track = exports.Track = _react2.default.createClass({
displayName: 'Track',

@@ -148,3 +147,3 @@

var slides = renderSlides(this.props);
return _react2['default'].createElement(
return _react2.default.createElement(
'div',

@@ -155,3 +154,2 @@ { className: 'slick-track', style: this.props.trackStyle },

}
});
exports.Track = Track;
});
{
"name": "react-slick",
"version": "0.12.2",
"version": "0.12.3",
"description": " React port of slick carousel",

@@ -9,3 +9,4 @@ "main": "./lib",

"prepublish": "babel ./src --out-dir ./lib && gulp dist",
"test": "karma start --single-run"
"test": "karma start --single-run",
"dev-test": "karma start"
},

@@ -27,43 +28,51 @@ "author": "Kiran Abburi",

"devDependencies": {
"autoprefixer-core": "^5.1.11",
"babel": "^5.4.7",
"babel-core": "^5.4.7",
"babel-eslint": "^3.1.10",
"babel-loader": "^5.1.3",
"css-loader": "^0.14.4",
"autoprefixer-core": "^6.0.1",
"babel-cli": "^6.10.1",
"babel-core": "^6.9.0",
"babel-eslint": "^6.0.4",
"babel-loader": "^6.2.4",
"babel-preset-airbnb": "^2.0.0",
"babel-preset-es2015": "^6.9.0",
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-react": "^6.5.0",
"css-loader": "^0.23.1",
"deepmerge": "^0.2.10",
"del": "^1.2.0",
"es5-shim": "^4.1.7",
"eslint": "^0.22.1",
"eslint-plugin-react": "^2.4.0",
"express": "^5.0.0-alpha.1",
"foundation-apps": "^1.1.0",
"gulp": "^3.8.11",
"gulp-sass": "^2.0.1",
"del": "^2.2.0",
"enzyme": "^2.3.0",
"es5-shim": "^4.5.8",
"eslint": "^2.10.2",
"eslint-plugin-react": "^5.1.1",
"express": "^4.13.4",
"foundation-apps": "^1.2.0",
"gulp": "^3.9.1",
"gulp-sass": "^2.3.1",
"jasmine-core": "^2.4.1",
"json-loader": "^0.5.4",
"karma": "^0.13",
"karma-chrome-launcher": "^0.1.12",
"karma-jasmine": "^0.3.6",
"karma-phantomjs-launcher": "^0.2.0",
"karma-webpack": "^1.6.0",
"mocha": "^2.2.5",
"node-sass": "^3.1.2",
"phantomjs": "^1.9.17",
"postcss-loader": "^0.4.4",
"react": "^0.14.6",
"react-dom": "^0.14.6",
"run-sequence": "^1.1.0",
"sass-loader": "^1.0.2",
"should": "^7.0.2",
"sinon": "^1.14.1",
"style-loader": "^0.12.3",
"webpack": "^1.9.10",
"webpack-dev-server": "^1.9.0"
"karma-babel-preprocessor": "^6.0.1",
"karma-chrome-launcher": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-phantomjs-launcher": "^1.0.0",
"karma-webpack": "^1.7.0",
"mocha": "^2.5.3",
"node-sass": "^3.7.0",
"phantomjs-prebuilt": "^2.1.7",
"postcss-loader": "^0.9.1",
"react": "^15.1.0",
"react-addons-test-utils": "^15.1.0",
"react-dom": "^15.1.0",
"run-sequence": "^1.2.1",
"sass-loader": "^3.2.0",
"should": "^8.4.0",
"sinon": "^1.17.4",
"style-loader": "^0.13.1",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
},
"dependencies": {
"classnames": "^2.1.1",
"classnames": "^2.2.5",
"json2mq": "^0.2.0",
"object-assign": "^2.0.0",
"object-assign": "^4.1.0",
"react-responsive-mixin": "^0.3.5",
"slick-carousel": "^1.5.5"
"slick-carousel": "^1.6.0"
},

@@ -70,0 +79,0 @@ "peerDependencies": {

@@ -14,11 +14,16 @@ # react-slick

### Installation
```bash
npm install react-slick
npm install react-slick
```
Also install slick-carousel for css and font
```bash
bower install slick-carousel
bower install slick-carousel
```
or add cdn link in your html
```
```html
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.3.15/slick.css" />

@@ -41,2 +46,3 @@ ```

### Example
```js

@@ -112,3 +118,3 @@ var React = require('react');

````
```js
class LeftNavButton extends React.Component {

@@ -119,5 +125,4 @@ render() {

}
```
````
Important: be sure that you pass your component's props to your clickable element

@@ -131,3 +136,4 @@ like the example above. If you don't, your custom component won't trigger the click handler.

Want to run demos locally
```
```shell
git clone https://github.com/akiran/react-slick

@@ -134,0 +140,0 @@ npm install

@@ -13,3 +13,3 @@ 'use strict';

render: function () {
var prevClasses = {'slick-prev': true};
var prevClasses = {'slick-arrow': true, 'slick-prev': true};
var prevHandler = this.clickHandler.bind(this, {message: 'previous'});

@@ -48,3 +48,3 @@

render: function () {
var nextClasses = {'slick-next': true};
var nextClasses = {'slick-arrow': true, 'slick-next': true};
var nextHandler = this.clickHandler.bind(this, {message: 'next'});

@@ -51,0 +51,0 @@

@@ -101,3 +101,3 @@ 'use strict';

if (this.props.dots === true && this.state.slideCount > this.props.slidesToShow) {
if (this.props.dots === true && this.state.slideCount >= this.props.slidesToShow) {
var dotProps = {

@@ -133,2 +133,18 @@ dotsClass: this.props.dotsClass,

var centerPaddingStyle = null;
if (this.props.vertical === false) {
if (this.props.centerMode === true) {
centerPaddingStyle = {
padding: ('0px ' + this.props.centerPadding)
};
}
} else {
if (this.props.centerMode === true) {
centerPaddingStyle = {
padding: (this.props.centerPadding + ' 0px')
};
}
}
return (

@@ -139,2 +155,3 @@ <div className={className} onMouseEnter={this.onInnerSliderEnter} onMouseLeave={this.onInnerSliderLeave}>

className="slick-list"
style={centerPaddingStyle}
onMouseDown={this.swipeStart}

@@ -141,0 +158,0 @@ onMouseMove={this.state.dragging ? this.swipeMove: null}

@@ -10,15 +10,17 @@ 'use strict';

var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;
unevenOffset = (this.state.slideCount % this.props.slidesToScroll !== 0);
indexOffset = unevenOffset ? 0 : (this.state.slideCount - this.state.currentSlide) % this.props.slidesToScroll;
const {slidesToScroll, slidesToShow} = this.props
const {slideCount, currentSlide} = this.state
unevenOffset = (slideCount % slidesToScroll !== 0);
indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;
if (options.message === 'previous') {
slideOffset = (indexOffset === 0) ? this.props.slidesToScroll : this.props.slidesToShow - indexOffset;
targetSlide = this.state.currentSlide - slideOffset;
slideOffset = (indexOffset === 0) ? slidesToScroll : slidesToShow - indexOffset;
targetSlide = currentSlide - slideOffset;
if (this.props.lazyLoad) {
previousInt = this.state.currentSlide - slideOffset;
targetSlide = previousInt === -1 ? this.state.slideCount -1 : previousInt;
previousInt = currentSlide - slideOffset;
targetSlide = previousInt === -1 ? slideCount -1 : previousInt;
}
} else if (options.message === 'next') {
slideOffset = (indexOffset === 0) ? this.props.slidesToScroll : indexOffset;
targetSlide = this.state.currentSlide + slideOffset;
slideOffset = (indexOffset === 0) ? slidesToScroll : indexOffset;
targetSlide = currentSlide + slideOffset;
} else if (options.message === 'dots') {

@@ -25,0 +27,0 @@ // Click on dots

'use strict';
import React from 'react';
import ReactDOM from './ReactDOM';
import ReactDOM from 'react-dom';
import ReactTransitionEvents from 'react/lib/ReactTransitionEvents';

@@ -14,3 +14,3 @@ import {getTrackCSS, getTrackLeft, getTrackAnimateCSS} from './trackHelper';

var trackWidth = this.getWidth(ReactDOM.findDOMNode(this.refs.track));
var slideWidth = this.getWidth(ReactDOM.findDOMNode(this))/props.slidesToShow;
var slideWidth = trackWidth/props.slidesToShow;

@@ -47,2 +47,6 @@ var currentSlide = props.rtl ? slideCount - 1 - props.initialSlide : props.initialSlide;

// pause slider if autoplay is set to false
if(!props.autoplay)
this.pause();
this.setState({

@@ -111,3 +115,3 @@ slideCount: slideCount,

if (this.props.afterChange) {
this.props.afterChange(currentSlide);
this.props.afterChange(targetSlide);
}

@@ -125,3 +129,3 @@ ReactTransitionEvents.removeEndEventListener(ReactDOM.findDOMNode(this.refs.track).children[currentSlide], callback);

if (this.props.beforeChange) {
this.props.beforeChange(this.state.currentSlide, currentSlide);
this.props.beforeChange(this.state.currentSlide, targetSlide);
}

@@ -128,0 +132,0 @@

'use strict';
import ReactDOM from './ReactDOM';
import ReactDOM from 'react-dom';

@@ -4,0 +4,0 @@ var checkSpecKeys = function (spec, keysArray) {

@@ -51,6 +51,17 @@ 'use strict';

}
var children = this.props.children;
if(!Array.isArray(children)) {
children = [children]
}
// Children may contain false or null, so we should filter them
children = children.filter(function(child){
return !!child
})
if (settings === 'unslick') {
// if 'unslick' responsive breakpoint setting used, just return the <Slider> tag nested HTML
return (
<div>{this.props.children}</div>
<div>{children}</div>
);

@@ -60,3 +71,3 @@ } else {

<InnerSlider {...settings}>
{this.props.children}
{children}
</InnerSlider>

@@ -63,0 +74,0 @@ );

@@ -96,3 +96,3 @@ 'use strict';

preCloneSlides.push(React.cloneElement(child, {
key: 'cloned' + getKey(child, key),
key: 'precloned' + getKey(child, key),
'data-index': key,

@@ -107,3 +107,3 @@ className: cssClasses,

postCloneSlides.push(React.cloneElement(child, {
key: 'cloned' + getKey(child, key),
key: 'postcloned' + getKey(child, key),
'data-index': key,

@@ -110,0 +110,0 @@ className: cssClasses,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc