{"name":"rmc-nuka-carousel","version":"3.0.0-alpha.2","description":"Pure React Carousel","main":"./lib/index","module":"./es/index","dependencies":{"exenv":"^1.2.0","raf":"^3.3.2"},"devDependencies":{"@types/mocha":"~2.2.32","@types/react":"~16.0.2","@types/react-dom":"15.5.1","expect.js":"0.3.x","pre-commit":"1.x","rc-test":"~6.0.3","rc-tools":"6.x","react":"^15.0.0","react-dom":"^15.0.0","tween-functions":"^1.2.0"},"files":["lib","es","dist"],"config":{"port":8000,"entry":{"rmc-nuka-carousel":["./index.js"]}},"scripts":{"dist":"rc-tools run dist","watch-tsc":"rc-tools run watch-tsc","compile":"rc-tools run compile --babel-runtime","build":"rc-tools run build","gh-pages":"rc-tools run gh-pages","start":"rc-tools run server","pub":"rc-tools run pub --babel-runtime","lint":"rc-tools run lint","karma":"rc-test run karma","test":"rc-test run test","chrome-test":"rc-test run chrome-test","coverage":"rc-test run coverage"},"repository":{"type":"git","url":"git+https://github.com/kenwheeler/nuka-carousel.git"},"keywords":["react","carousel","nuka"],"author":{"name":"Ken Wheeler"},"license":"MIT","bugs":{"url":"https://github.com/kenwheeler/nuka-carousel/issues"},"homepage":"https://github.com/kenwheeler/nuka-carousel","gitHead":"0cfa5ee8fd9de34bf1a8945f19a78a42f28ec194","_id":"rmc-nuka-carousel@3.0.0-alpha.2","_shasum":"14cfc9598a7e63607cc360f8944e6481602f3c11","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"warmhug","email":"hualei5280@gmail.com"},"dist":{"shasum":"14cfc9598a7e63607cc360f8944e6481602f3c11","tarball":"http://registry-npm.ywwl.com/rmc-nuka-carousel/download/rmc-nuka-carousel-3.0.0-alpha.2.tgz","integrity":"sha512-AqG9hvtwI78/Ydv0k3UUPKn1RtA9FFV5ovCwnifoZNGyHSSsOf4b+yS/18aWtdMELi7OxgYV22j0Tu+MVAlw2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAKt/MI7j6/t6+9EZ6x/j10MKLv4xAe7EAtegCW4B1JdAiA0JKp4pBPkZ27LWKVwHyUCpC27OBvykV3ccaxYAP5MBA=="}],"size":98058,"noattachment":false,"key":"/rmc-nuka-carousel/-/rmc-nuka-carousel-3.0.0-alpha.2.tgz"},"maintainers":[{"name":"paranoidjk","email":"hust2012jiangkai@gmail.com"},{"name":"silentcloud","email":"rjmuqiang@gmail.com"},{"name":"warmhug","email":"hualei5280@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rmc-nuka-carousel-3.0.0-alpha.2.tgz_1505805887040_0.07740278542041779"},"directories":{},"readme":"\n## Modify from upstream nuka-carousel@2.0.4\n> Search for `by warmhug` comments in source file to see detailed changes.\n> This fork stream's version begin from `2.2.0` and the npm package name is `rmc-nuka-carousel`.\n\n- add `swipeSpeed` prop, you can configure the swipe sensitivity.\n- add `resetAutoplay` props, when set false, you can remove the sense of frustration between the items to switch.（自动循环播放时、第一个和第二个项目之间切换时的顿挫感）\n\nNote: if you set `autoplayInterval` prop to less than 1000, You need to set the `speed` prop to less than 300 at the same time.\n\n#### develop\n\n```sh\nnpm install\nnpm start # Running demo locally\n```\n\n------------\n\n# nuka-carousel\n\nA Pure ReactJS Carousel Component\n\n![http://i.imgur.com/UwP5gle.gif](http://i.imgur.com/UwP5gle.gif)\n\n### Install\n\n```\nnpm install nuka-carousel\n```\n\n### Example\n\nsee examples dir\n\n### Props\n\n#### afterSlide\n`React.PropTypes.func`\n\nHook to be called after a slide is changed.\n\n#### autoplay\n`React.PropTypes.bool`\n\nAutoplay mode active. Defaults to false.\n\n#### autoplayInterval\n`React.PropTypes.number`\n\nInterval for autoplay iteration. Defaults to 3000.\n\n#### beforeSlide\n`React.PropTypes.func`\n\nHook to be called before a slide is changed.\n\n#### cellAlign\n`React.PropTypes.oneOf(['left', 'center', 'right'])`\n\nWhen displaying more than one slide, sets which position to anchor the current slide to.\n\n#### cellSpacing\n`React.PropTypes.number`\n\nSpace between slides, as an integer, but reflected as `px`\n\n#### data\n`React.PropTypes.func`\n\nUsed with the ControllerMixin to add carousel data to parent state.\n\n#### decorators\n`React.PropTypes.array`\n\nAn array of objects that supply internal carousel controls.\nDecorator objects have `component`, `position` & `style` properties. `component` takes a React component, `position` takes a predefined position string and `style` takes an object of styles to be applied to the decorator. See an example below:\n\n```javascript\nvar Decorators = [{\n  component: React.createClass({\n    render() {\n      return (\n        <button\n          onClick={this.props.previousSlide}>\n          Previous Slide\n        </button>\n      )\n    }\n  }),\n  position: 'CenterLeft',\n  style: {\n    padding: 20\n  }\n}];\n\n// Valid position properties are TopLeft, TopCenter, TopRight\n// CenterLeft, CenterCenter, CenterRight, BottomLeft, BottomCenter\n// and BottomRight\n```\n\n#### dragging\n`React.PropTypes.bool`\n\nEnable mouse swipe/dragging\n\n#### easing\n`React.PropTypes.Function`\n\nAnimation easing function. Default is `easeOutCirc`. See valid easings here: [https://github.com/chenglou/tween-functions](https://github.com/chenglou/tween-functions)\n\n#### framePadding\n`React.PropTypes.string`\n\nUsed to set the margin of the slider frame. Accepts any string dimension value such as `\"0px 20px\"` or `\"500px\"`.\n\n#### frameOverflow\n`React.PropTypes.string`\n\nUsed to set overflow style property on slider frame. Defaults to `hidden`.\n\n#### edgeEasing\n`React.PropTypes.Function`\n\nAnimation easing function when swipe exceeds edge. Default is `linear`. See valid easings here: [https://github.com/chenglou/tween-functions](https://github.com/chenglou/tween-functions)\n\n#### initialSlideHeight\n`React.PropTypes.number`\n\nInitial height of the slides in pixels.\n\n#### initialSlideWidth\n`React.PropTypes.number`\n\nInitial width of the slides in pixels.\n\n#### slideIndex\n`React.PropTypes.number`\n\nManually set the index of the slide to be shown.\n\n#### slidesToShow\n`React.PropTypes.number`\n\nSlides to show at once.\n\n#### slidesToScroll\n```\nslidesToScroll: React.PropTypes.oneOfType([\n  React.PropTypes.number,\n  React.PropTypes.oneOf(['auto'])\n])\n```\n\nSlides to scroll at once. Set to `\"auto\"` to always scroll the current number of visible slides.\n\n#### slideWidth\n\n`React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.number])`\n\nManually set slideWidth. If you want hard pixel widths, use a string like `slideWidth=\"20px\"`, and if you prefer a percentage of the container, use a decimal integer like `slideWidth={0.8}`\n\n#### speed\n`React.PropTypes.number`\n\nAnimation duration.\n\n#### swiping\n`React.PropTypes.bool`\n\nEnable touch swipe/dragging\n\n#### vertical\n`React.PropTypes.bool`\n\nEnable the slides to transition vertically.\n\n#### width\n`React.PropTypes.string`\n\nUsed to hardcode the slider width. Accepts any string dimension value such as `\"80%\"` or `\"500px\"`.\n\n#### wrapAround\n`React.PropTypes.bool`\n\nSets infinite wrapAround mode. Defaults to `false`\n\n### ControllerMixin\n\nThe ControllerMixin provides a way to add external controllers for a carousel. To use the controller mixin, add it to your parent component as shown below:\n\n```javascript\nconst App = React.createClass({\n  mixins: [Carousel.ControllerMixin],\n  render() {\n    return (\n      <Carousel ref=\"carousel\" data={this.setCarouselData.bind(this, 'carousel')}>\n        ...\n      </Carousel>\n    )\n  }\n});\n```\n\nIt is required to give your component a ref value, and to pass the setCarouselData method to the data prop with the same ref as an argument.\n\nAfter setting this up, your parent component has a carousels object in it's state. You can now control your carousels from other child components:\n\n```javascript\nconst App = React.createClass({\n  mixins: [Carousel.ControllerMixin],\n  render() {\n    return (\n      <Carousel ref=\"carousel\" data={this.setCarouselData.bind(this, 'carousel')}>\n        ...\n      </Carousel>\n      {this.state.carousels.carousel ? <button type=\"button\" onClick={this.state.carousels.carousel.goToSlide.bind(null,4)}>\n        Go to slide 5\n      </button> : null}\n    )\n  }\n});\n\n```\n","publish_time":1505805887150,"_cnpm_publish_time":1505805887150,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"3.0.1"}}