react-mobile-picker
Advanced tools
Comparing version 0.1.2 to 0.1.6
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.Picker=t(require("react")):e.Picker=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();Object.defineProperty(t,"__esModule",{value:!0});var l=n(5),u=r(l);n(4);var p=function(e){function t(e){i(this,t);var n=o(this,Object.getPrototypeOf(t).call(this,e));return f.call(n),n.state=s({isMoving:!1,startTouchY:0,startScrollerTranslate:0},n.computeTranslate(e)),n}return a(t,e),c(t,[{key:"componentWillReceiveProps",value:function(e){this.state.isMoving||this.setState(this.computeTranslate(e))}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.options,r=t.itemHeight,i=t.value;return n.map(function(t,n){var o={height:r+"px",lineHeight:r+"px"},a="picker-item"+(t===i?" picker-item-selected":"");return u["default"].createElement("div",{key:n,className:a,style:o,onClick:function(){return e.handleItemClick(t)}},t)})}},{key:"render",value:function(){var e={transform:"translate3d(0, "+this.state.scrollerTranslate+"px, 0)"};return this.state.isMoving&&(e.transitionDuration="0ms"),u["default"].createElement("div",{className:"picker-column"},u["default"].createElement("div",{className:"picker-scroller",style:e,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,onTouchCancel:this.handleTouchCancel},this.renderItems()))}}]),t}(l.Component);p.propTypes={options:l.PropTypes.array.isRequired,name:l.PropTypes.string.isRequired,value:l.PropTypes.any.isRequired,itemHeight:l.PropTypes.number.isRequired,columnHeight:l.PropTypes.number.isRequired,onChange:l.PropTypes.func.isRequired};var f=function(){var e=this;this.computeTranslate=function(t){var n=t.options,r=t.value,i=t.itemHeight,o=t.columnHeight,a=n.indexOf(r);return 0>a&&(console.warn('Warning: "'+e.props.name+'" doesn\'t contain an option of "'+r+'".'),e.onValueSelected(n[0]),a=0),{scrollerTranslate:o/2-i/2-a*i,minTranslate:o/2-i*n.length+i/2,maxTranslate:o/2-i/2}},this.onValueSelected=function(t){e.props.onChange(e.props.name,t)},this.handleTouchStart=function(t){var n=t.targetTouches[0].pageY;e.setState(function(e){var t=e.scrollerTranslate;return{startTouchY:n,startScrollerTranslate:t}})},this.handleTouchMove=function(t){t.preventDefault();var n=t.targetTouches[0].pageY;e.setState(function(e){var t=e.isMoving,r=e.startTouchY,i=e.startScrollerTranslate,o=e.minTranslate,a=e.maxTranslate;if(!t)return{isMoving:!0};var s=i+n-r;return o>s?s=o-Math.pow(o-s,.8):s>a&&(s=a+Math.pow(s-a,.8)),{scrollerTranslate:s}})},this.handleTouchEnd=function(t){e.state.isMoving&&(e.setState({isMoving:!1,startTouchY:0,startScrollerTranslate:0}),setTimeout(function(){var t=e.props,n=t.options,r=t.itemHeight,i=e.state,o=i.scrollerTranslate,a=i.minTranslate,s=i.maxTranslate,c=void 0;c=o>s?0:a>o?n.length-1:-Math.floor((o-s)/r),e.onValueSelected(n[c])},0))},this.handleTouchCancel=function(t){e.state.isMoving&&e.setState(function(e){return{isMoving:!1,startTouchY:0,startScrollerTranslate:0,scrollerTranslate:e}})},this.handleItemClick=function(t){t!==e.props.value&&e.onValueSelected(t)}},h=function(e){function t(){return i(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),c(t,[{key:"renderInner",value:function(){var e=this.props,t=e.optionGroups,n=e.valueGroups,r=e.itemHeight,i=e.height,o=e.onChange,a={height:r,marginTop:-(r/2)},s=[];for(var c in t)s.push(u["default"].createElement(p,{key:c,name:c,options:t[c],value:n[c],itemHeight:r,columnHeight:i,onChange:o}));return u["default"].createElement("div",{className:"picker-inner"},s,u["default"].createElement("div",{className:"picker-highlight",style:a}))}},{key:"render",value:function(){var e={height:this.props.height};return u["default"].createElement("div",{className:"picker-container",style:e},this.renderInner())}}]),t}(l.Component);h.propTyps={optionGroups:l.PropTypes.object.isRequired,valueGroups:l.PropTypes.object.isRequired,onChange:l.PropTypes.func.isRequired,itemHeight:l.PropTypes.number,height:l.PropTypes.number},h.defaultProps={itemHeight:36,height:216},t["default"]=h},function(e,t,n){t=e.exports=n(2)(),t.push([e.id,".picker-container{z-index:10001;width:100%}.picker-container,.picker-container *,.picker-container :after,.picker-container :before{box-sizing:border-box}.picker-container .picker-inner{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:100%;font-size:1.2em;-webkit-mask-box-image:linear-gradient(0deg,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent)}.picker-container .picker-column{position:relative;max-height:100%;overflow:hidden}.picker-container .picker-column .picker-scroller{-webkit-transition:.3s;transition:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.picker-container .picker-column .picker-item{position:relative;padding:0 10px;white-space:nowrap;color:#999;overflow:hidden}.picker-container .picker-column .picker-item.picker-item-selected{color:#222}.picker-container .picker-highlight{position:absolute;top:50%;left:0;width:100%;pointer-events:none}.picker-container .picker-highlight:after,.picker-container .picker-highlight:before{content:' ';position:absolute;left:0;right:auto;display:block;width:100%;height:1px;background-color:#d9d9d9;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.picker-container .picker-highlight:before{top:0;bottom:auto}.picker-container .picker-highlight:after{bottom:0;top:auto}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=h[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(l(r.parts[o],t))}else{for(var a=[],o=0;o<r.parts.length;o++)a.push(l(r.parts[o],t));h[r.id]={id:r.id,refs:1,parts:a}}}}function i(e){for(var t=[],n={},r=0;r<e.length;r++){var i=e[r],o=i[0],a=i[1],s=i[2],c=i[3],l={css:a,media:s,sourceMap:c};n[o]?n[o].parts.push(l):t.push(n[o]={id:o,parts:[l]})}return t}function o(e,t){var n=v(),r=b[b.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),b.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=b.indexOf(e);t>=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function c(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function l(e,t){var n,r,i;if(t.singleton){var o=y++;n=g||(g=s(t)),r=u.bind(null,n,o,!1),i=u.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=c(t),r=f.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=p.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function u(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=k(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t){var n=t.css,r=t.media;t.sourceMap;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var h={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=d(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,y=0,b=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=i(e);return r(n,t),function(e){for(var o=[],a=0;a<n.length;a++){var s=n[a],c=h[s.id];c.refs--,o.push(c)}if(e){var l=i(e);r(l,t)}for(var a=0;a<o.length;a++){var c=o[a];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete h[c.id]}}}};var k=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.id,r,""]]);n(3)(r,{});r.locals&&(e.exports=r.locals)},function(t,n){t.exports=e}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.Picker=t(require("react")):e.Picker=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();Object.defineProperty(t,"__esModule",{value:!0});var l=n(5),u=r(l);n(4);var p=function(e){function t(e){i(this,t);var n=o(this,Object.getPrototypeOf(t).call(this,e));return f.call(n),n.state=s({isMoving:!1,startTouchY:0,startScrollerTranslate:0},n.computeTranslate(e)),n}return a(t,e),c(t,[{key:"componentWillReceiveProps",value:function(e){this.state.isMoving||this.setState(this.computeTranslate(e))}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.options,r=t.itemHeight,i=t.value;return n.map(function(t,n){var o={height:r+"px",lineHeight:r+"px"},a="picker-item"+(t===i?" picker-item-selected":"");return u["default"].createElement("div",{key:n,className:a,style:o,onClick:function(){return e.handleItemClick(t)}},t)})}},{key:"render",value:function(){var e="translate3d(0, "+this.state.scrollerTranslate+"px, 0)",t={MsTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e};return this.state.isMoving&&(t.transitionDuration="0ms"),u["default"].createElement("div",{className:"picker-column"},u["default"].createElement("div",{className:"picker-scroller",style:t,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd,onTouchCancel:this.handleTouchCancel},this.renderItems()))}}]),t}(l.Component);p.propTypes={options:l.PropTypes.array.isRequired,name:l.PropTypes.string.isRequired,value:l.PropTypes.any.isRequired,itemHeight:l.PropTypes.number.isRequired,columnHeight:l.PropTypes.number.isRequired,onChange:l.PropTypes.func.isRequired};var f=function(){var e=this;this.computeTranslate=function(t){var n=t.options,r=t.value,i=t.itemHeight,o=t.columnHeight,a=n.indexOf(r);return 0>a&&(console.warn('Warning: "'+e.props.name+'" doesn\'t contain an option of "'+r+'".'),e.onValueSelected(n[0]),a=0),{scrollerTranslate:o/2-i/2-a*i,minTranslate:o/2-i*n.length+i/2,maxTranslate:o/2-i/2}},this.onValueSelected=function(t){e.props.onChange(e.props.name,t)},this.handleTouchStart=function(t){var n=t.targetTouches[0].pageY;e.setState(function(e){var t=e.scrollerTranslate;return{startTouchY:n,startScrollerTranslate:t}})},this.handleTouchMove=function(t){t.preventDefault();var n=t.targetTouches[0].pageY;e.setState(function(e){var t=e.isMoving,r=e.startTouchY,i=e.startScrollerTranslate,o=e.minTranslate,a=e.maxTranslate;if(!t)return{isMoving:!0};var s=i+n-r;return o>s?s=o-Math.pow(o-s,.8):s>a&&(s=a+Math.pow(s-a,.8)),{scrollerTranslate:s}})},this.handleTouchEnd=function(t){e.state.isMoving&&(e.setState({isMoving:!1,startTouchY:0,startScrollerTranslate:0}),setTimeout(function(){var t=e.props,n=t.options,r=t.itemHeight,i=e.state,o=i.scrollerTranslate,a=i.minTranslate,s=i.maxTranslate,c=void 0;c=o>s?0:a>o?n.length-1:-Math.floor((o-s)/r),e.onValueSelected(n[c])},0))},this.handleTouchCancel=function(t){e.state.isMoving&&e.setState(function(e){return{isMoving:!1,startTouchY:0,startScrollerTranslate:0,scrollerTranslate:e}})},this.handleItemClick=function(t){t!==e.props.value&&e.onValueSelected(t)}},h=function(e){function t(){return i(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),c(t,[{key:"renderInner",value:function(){var e=this.props,t=e.optionGroups,n=e.valueGroups,r=e.itemHeight,i=e.height,o=e.onChange,a={height:r,marginTop:-(r/2)},s=[];for(var c in t)s.push(u["default"].createElement(p,{key:c,name:c,options:t[c],value:n[c],itemHeight:r,columnHeight:i,onChange:o}));return u["default"].createElement("div",{className:"picker-inner"},s,u["default"].createElement("div",{className:"picker-highlight",style:a}))}},{key:"render",value:function(){var e={height:this.props.height};return u["default"].createElement("div",{className:"picker-container",style:e},this.renderInner())}}]),t}(l.Component);h.propTyps={optionGroups:l.PropTypes.object.isRequired,valueGroups:l.PropTypes.object.isRequired,onChange:l.PropTypes.func.isRequired,itemHeight:l.PropTypes.number,height:l.PropTypes.number},h.defaultProps={itemHeight:36,height:216},t["default"]=h},function(e,t,n){t=e.exports=n(2)(),t.push([e.id,".picker-container{z-index:10001;width:100%}.picker-container,.picker-container *,.picker-container :after,.picker-container :before{box-sizing:border-box}.picker-container .picker-inner{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:100%;font-size:1.2em;-webkit-mask-box-image:linear-gradient(0deg,transparent,transparent 5%,#fff 20%,#fff 80%,transparent 95%,transparent)}.picker-container .picker-column{position:relative;max-height:100%;overflow:hidden}.picker-container .picker-column .picker-scroller{-webkit-transition:.3s;transition:.3s;-webkit-transition-timing-function:ease-out;transition-timing-function:ease-out}.picker-container .picker-column .picker-item{position:relative;padding:0 10px;white-space:nowrap;color:#999;overflow:hidden}.picker-container .picker-column .picker-item.picker-item-selected{color:#222}.picker-container .picker-highlight{position:absolute;top:50%;left:0;width:100%;pointer-events:none}.picker-container .picker-highlight:after,.picker-container .picker-highlight:before{content:' ';position:absolute;left:0;right:auto;display:block;width:100%;height:1px;background-color:#d9d9d9;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.picker-container .picker-highlight:before{top:0;bottom:auto}.picker-container .picker-highlight:after{bottom:0;top:auto}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=h[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(l(r.parts[o],t))}else{for(var a=[],o=0;o<r.parts.length;o++)a.push(l(r.parts[o],t));h[r.id]={id:r.id,refs:1,parts:a}}}}function i(e){for(var t=[],n={},r=0;r<e.length;r++){var i=e[r],o=i[0],a=i[1],s=i[2],c=i[3],l={css:a,media:s,sourceMap:c};n[o]?n[o].parts.push(l):t.push(n[o]={id:o,parts:[l]})}return t}function o(e,t){var n=v(),r=b[b.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),b.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=b.indexOf(e);t>=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function c(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function l(e,t){var n,r,i;if(t.singleton){var o=y++;n=g||(g=s(t)),r=u.bind(null,n,o,!1),i=u.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=c(t),r=f.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=p.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function u(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=k(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t){var n=t.css,r=t.media;t.sourceMap;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var h={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=d(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,y=0,b=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=i(e);return r(n,t),function(e){for(var o=[],a=0;a<n.length;a++){var s=n[a],c=h[s.id];c.refs--,o.push(c)}if(e){var l=i(e);r(l,t)}for(var a=0;a<o.length;a++){var c=o[a];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete h[c.id]}}}};var k=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){var r=n(1);"string"==typeof r&&(r=[[e.id,r,""]]);n(3)(r,{});r.locals&&(e.exports=r.locals)},function(t,n){t.exports=e}])}); |
{ | ||
"name": "react-mobile-picker", | ||
"version": "0.1.2", | ||
"version": "0.1.6", | ||
"description": "An iOS like select box component for React", | ||
@@ -5,0 +5,0 @@ "main": "lib/react-mobile-picker.js", |
@@ -142,4 +142,9 @@ import React, {Component, PropTypes} from 'react'; | ||
render() { | ||
const translateString = `translate3d(0, ${this.state.scrollerTranslate}px, 0)`; | ||
const style = { | ||
transform: `translate3d(0, ${this.state.scrollerTranslate}px, 0)` | ||
MsTransform: translateString, | ||
MozTransform: translateString, | ||
OTransform: translateString, | ||
WebkitTransform: translateString, | ||
transform: translateString | ||
}; | ||
@@ -146,0 +151,0 @@ if (this.state.isMoving) { |
23472
203