diff --git a/dist/react-onsenui.js b/dist/react-onsenui.js index f58558e..296c685 100644 --- a/dist/react-onsenui.js +++ b/dist/react-onsenui.js @@ -1,4 +1,4 @@ -/*! react-onsenui v0.3.1 - Thu Jun 09 2016 19:50:00 GMT+0900 (JST) */ +/*! react-onsenui v0.3.2 - Thu Jun 09 2016 20:27:35 GMT+0900 (JST) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom')) : typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom'], factory) : @@ -8,15 +8,52 @@ React = 'default' in React ? React['default'] : React; ReactDOM = 'default' in ReactDOM ? ReactDOM['default'] : ReactDOM; - var babelHelpers = {}; + var Util = { + sizeConverter: function sizeConverter(item) { + if (typeof item === 'number') { + return item + 'px'; + } else { + return item; + } + }, + numberConverter: function numberConverter(item) { + return item + 'px'; + }, + animationOptionsConverter: function animationOptionsConverter(options) { + var keys = Object.keys(options); + var innerString = keys.map(function (key) { + return key + ': "' + options[key] + '"'; + }); + return '{' + innerString.join(',') + '}'; + }, + convert: function convert(dict, name) { + var additionalDict = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; - babelHelpers.classCallCheck = function (instance, Constructor) { + var fun = additionalDict.fun ? additionalDict.fun : function (x) { + return x; + }; + var newName = additionalDict.newName ? additionalDict.newName : name; + + var val = dict[name]; + if (val) { + if (newName !== name) { + delete dict[name]; + } + dict[newName] = fun(val); + } else { + dict[newName] = null; + } + return dict; + } + }; + + var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; - babelHelpers.createClass = function () { + var createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; @@ -34,7 +71,7 @@ }; }(); - babelHelpers.extends = Object.assign || function (target) { + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; @@ -48,7 +85,7 @@ return target; }; - babelHelpers.get = function get(object, property, receiver) { + var get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); @@ -73,7 +110,7 @@ } }; - babelHelpers.inherits = function (subClass, superClass) { + var inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } @@ -89,7 +126,7 @@ if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }; - babelHelpers.objectWithoutProperties = function (obj, keys) { + var objectWithoutProperties = function (obj, keys) { var target = {}; for (var i in obj) { @@ -101,7 +138,7 @@ return target; }; - babelHelpers.possibleConstructorReturn = function (self, call) { + var possibleConstructorReturn = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } @@ -109,56 +146,15 @@ return call && (typeof call === "object" || typeof call === "function") ? call : self; }; - babelHelpers; - - var Util = { - sizeConverter: function sizeConverter(item) { - if (typeof item === 'number') { - return item + 'px'; - } else { - return item; - } - }, - numberConverter: function numberConverter(item) { - return item + 'px'; - }, - animationOptionsConverter: function animationOptionsConverter(options) { - var keys = Object.keys(options); - var innerString = keys.map(function (key) { - return key + ': "' + options[key] + '"'; - }); - return '{' + innerString.join(',') + '}'; - }, - convert: function convert(dict, name) { - var additionalDict = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; - - var fun = additionalDict.fun ? additionalDict.fun : function (x) { - return x; - }; - var newName = additionalDict.newName ? additionalDict.newName : name; - - var val = dict[name]; - if (val) { - if (newName !== name) { - delete dict[name]; - } - dict[newName] = fun(val); - } else { - dict[newName] = null; - } - return dict; - } - }; - var BaseDialog = function (_React$Component) { - babelHelpers.inherits(BaseDialog, _React$Component); + inherits(BaseDialog, _React$Component); function BaseDialog() { - babelHelpers.classCallCheck(this, BaseDialog); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(BaseDialog).apply(this, arguments)); + classCallCheck(this, BaseDialog); + return possibleConstructorReturn(this, Object.getPrototypeOf(BaseDialog).apply(this, arguments)); } - babelHelpers.createClass(BaseDialog, [{ + createClass(BaseDialog, [{ key: 'show', value: function show() { this.node.firstChild.show(); @@ -237,7 +233,7 @@ }, { key: 'renderPortal', value: function renderPortal(props) { - var newProps = babelHelpers.objectWithoutProperties(props, []); + var newProps = objectWithoutProperties(props, []); Util.convert(newProps, 'isCancelable', { newName: 'cancelable' }); @@ -308,14 +304,14 @@ */ var AlertDialog = function (_BaseDialog) { - babelHelpers.inherits(AlertDialog, _BaseDialog); + inherits(AlertDialog, _BaseDialog); function AlertDialog() { - babelHelpers.classCallCheck(this, AlertDialog); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(AlertDialog).apply(this, arguments)); + classCallCheck(this, AlertDialog); + return possibleConstructorReturn(this, Object.getPrototypeOf(AlertDialog).apply(this, arguments)); } - babelHelpers.createClass(AlertDialog, [{ + createClass(AlertDialog, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-alert-dialog'; @@ -462,18 +458,18 @@ }; var BasicComponent = function (_React$Component) { - babelHelpers.inherits(BasicComponent, _React$Component); + inherits(BasicComponent, _React$Component); function BasicComponent(props) { - babelHelpers.classCallCheck(this, BasicComponent); + classCallCheck(this, BasicComponent); - var _this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(BasicComponent).call(this, props)); + var _this = possibleConstructorReturn(this, Object.getPrototypeOf(BasicComponent).call(this, props)); _this.updateClasses = _this.updateClasses.bind(_this); return _this; } - babelHelpers.createClass(BasicComponent, [{ + createClass(BasicComponent, [{ key: 'updateClasses', value: function updateClasses() { var node = ReactDOM.findDOMNode(this); @@ -509,17 +505,17 @@ }(React.Component); var SimpleWrapper = function (_BasicComponent) { - babelHelpers.inherits(SimpleWrapper, _BasicComponent); + inherits(SimpleWrapper, _BasicComponent); function SimpleWrapper() { - babelHelpers.classCallCheck(this, SimpleWrapper); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(SimpleWrapper).apply(this, arguments)); + classCallCheck(this, SimpleWrapper); + return possibleConstructorReturn(this, Object.getPrototypeOf(SimpleWrapper).apply(this, arguments)); } - babelHelpers.createClass(SimpleWrapper, [{ + createClass(SimpleWrapper, [{ key: 'render', value: function render() { - var others = babelHelpers.objectWithoutProperties(this.props, []); + var others = objectWithoutProperties(this.props, []); Util.convert(others, 'disabled'); @@ -552,14 +548,14 @@ */ var BackButton = function (_SimpleWrapper) { - babelHelpers.inherits(BackButton, _SimpleWrapper); + inherits(BackButton, _SimpleWrapper); function BackButton() { - babelHelpers.classCallCheck(this, BackButton); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(BackButton).apply(this, arguments)); + classCallCheck(this, BackButton); + return possibleConstructorReturn(this, Object.getPrototypeOf(BackButton).apply(this, arguments)); } - babelHelpers.createClass(BackButton, [{ + createClass(BackButton, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-back-button'; @@ -625,14 +621,14 @@ */ var BottomToolbar = function (_SimpleWrapper) { - babelHelpers.inherits(BottomToolbar, _SimpleWrapper); + inherits(BottomToolbar, _SimpleWrapper); function BottomToolbar() { - babelHelpers.classCallCheck(this, BottomToolbar); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(BottomToolbar).apply(this, arguments)); + classCallCheck(this, BottomToolbar); + return possibleConstructorReturn(this, Object.getPrototypeOf(BottomToolbar).apply(this, arguments)); } - babelHelpers.createClass(BottomToolbar, [{ + createClass(BottomToolbar, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-bottom-toolbar'; @@ -671,14 +667,14 @@ */ var Button = function (_SimpleWrapper) { - babelHelpers.inherits(Button, _SimpleWrapper); + inherits(Button, _SimpleWrapper); function Button() { - babelHelpers.classCallCheck(this, Button); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Button).apply(this, arguments)); + classCallCheck(this, Button); + return possibleConstructorReturn(this, Object.getPrototypeOf(Button).apply(this, arguments)); } - babelHelpers.createClass(Button, [{ + createClass(Button, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-button'; @@ -758,14 +754,14 @@ */ var Carousel = function (_SimpleWrapper) { - babelHelpers.inherits(Carousel, _SimpleWrapper); + inherits(Carousel, _SimpleWrapper); function Carousel() { - babelHelpers.classCallCheck(this, Carousel); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Carousel).apply(this, arguments)); + classCallCheck(this, Carousel); + return possibleConstructorReturn(this, Object.getPrototypeOf(Carousel).apply(this, arguments)); } - babelHelpers.createClass(Carousel, [{ + createClass(Carousel, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-carousel'; @@ -773,7 +769,7 @@ }, { key: 'componentDidMount', value: function componentDidMount() { - babelHelpers.get(Object.getPrototypeOf(Carousel.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(Carousel.prototype), 'componentDidMount', this).call(this); var node = ReactDOM.findDOMNode(this); CustomElements.upgrade(node); node.addEventListener('postchange', this.props.onPostChange); @@ -799,7 +795,7 @@ }, { key: 'render', value: function render() { - var others = babelHelpers.objectWithoutProperties(this.props, []); + var others = objectWithoutProperties(this.props, []); ['fullscreen', 'swipeable', 'disabled', 'centered', 'overscrollable', 'centered'].forEach(function (el) { @@ -991,14 +987,14 @@ */ var CarouselItem = function (_SimpleWrapper) { - babelHelpers.inherits(CarouselItem, _SimpleWrapper); + inherits(CarouselItem, _SimpleWrapper); function CarouselItem() { - babelHelpers.classCallCheck(this, CarouselItem); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(CarouselItem).apply(this, arguments)); + classCallCheck(this, CarouselItem); + return possibleConstructorReturn(this, Object.getPrototypeOf(CarouselItem).apply(this, arguments)); } - babelHelpers.createClass(CarouselItem, [{ + createClass(CarouselItem, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-carousel-item'; @@ -1039,14 +1035,14 @@ */ var Col = function (_SimpleWrapper) { - babelHelpers.inherits(Col, _SimpleWrapper); + inherits(Col, _SimpleWrapper); function Col() { - babelHelpers.classCallCheck(this, Col); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Col).apply(this, arguments)); + classCallCheck(this, Col); + return possibleConstructorReturn(this, Object.getPrototypeOf(Col).apply(this, arguments)); } - babelHelpers.createClass(Col, [{ + createClass(Col, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-col'; @@ -1054,7 +1050,7 @@ }, { key: 'render', value: function render() { - var others = babelHelpers.objectWithoutProperties(this.props, []); + var others = objectWithoutProperties(this.props, []); Util.convert(others, 'verticalAlign', { newName: 'vertical-align' }); @@ -1109,14 +1105,14 @@ */ var Dialog = function (_BaseDialog) { - babelHelpers.inherits(Dialog, _BaseDialog); + inherits(Dialog, _BaseDialog); function Dialog() { - babelHelpers.classCallCheck(this, Dialog); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Dialog).apply(this, arguments)); + classCallCheck(this, Dialog); + return possibleConstructorReturn(this, Object.getPrototypeOf(Dialog).apply(this, arguments)); } - babelHelpers.createClass(Dialog, [{ + createClass(Dialog, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-dialog'; @@ -1284,14 +1280,14 @@ */ var Fab = function (_SimpleWrapper) { - babelHelpers.inherits(Fab, _SimpleWrapper); + inherits(Fab, _SimpleWrapper); function Fab() { - babelHelpers.classCallCheck(this, Fab); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Fab).apply(this, arguments)); + classCallCheck(this, Fab); + return possibleConstructorReturn(this, Object.getPrototypeOf(Fab).apply(this, arguments)); } - babelHelpers.createClass(Fab, [{ + createClass(Fab, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-fab'; @@ -1371,14 +1367,14 @@ /> */ var Icon = function (_SimpleWrapper) { - babelHelpers.inherits(Icon, _SimpleWrapper); + inherits(Icon, _SimpleWrapper); function Icon() { - babelHelpers.classCallCheck(this, Icon); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Icon).apply(this, arguments)); + classCallCheck(this, Icon); + return possibleConstructorReturn(this, Object.getPrototypeOf(Icon).apply(this, arguments)); } - babelHelpers.createClass(Icon, [{ + createClass(Icon, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-icon'; @@ -1389,7 +1385,7 @@ var _props = this.props; var icon = _props.icon; var size = _props.size; - var others = babelHelpers.objectWithoutProperties(_props, ['icon', 'size']); + var others = objectWithoutProperties(_props, ['icon', 'size']); Util.convert(others, 'fixedWidth', { newName: 'fixed-width' }); @@ -1509,19 +1505,19 @@ */ var Input = function (_BasicComponent) { - babelHelpers.inherits(Input, _BasicComponent); + inherits(Input, _BasicComponent); function Input() { - babelHelpers.classCallCheck(this, Input); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Input).apply(this, arguments)); + classCallCheck(this, Input); + return possibleConstructorReturn(this, Object.getPrototypeOf(Input).apply(this, arguments)); } - babelHelpers.createClass(Input, [{ + createClass(Input, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; - babelHelpers.get(Object.getPrototypeOf(Input.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(Input.prototype), 'componentDidMount', this).call(this); var node = ReactDOM.findDOMNode(this); EVENT_TYPES.forEach(function (eventType) { @@ -1557,13 +1553,13 @@ value: function render() { var _props = this.props; var checked = _props.checked; - var other = babelHelpers.objectWithoutProperties(_props, ['checked']); + var other = objectWithoutProperties(_props, ['checked']); other['input-id'] = this.props.inputId; Util.convert(other, 'disabled'); - return React.createElement('ons-input', babelHelpers.extends({ checked: checked ? '' : null }, other)); + return React.createElement('ons-input', _extends({ checked: checked ? '' : null }, other)); } }]); return Input; @@ -1689,19 +1685,19 @@ */ var LazyList = function (_BasicComponent) { - babelHelpers.inherits(LazyList, _BasicComponent); + inherits(LazyList, _BasicComponent); function LazyList(props) { - babelHelpers.classCallCheck(this, LazyList); + classCallCheck(this, LazyList); - var _this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(LazyList).call(this, props)); + var _this = possibleConstructorReturn(this, Object.getPrototypeOf(LazyList).call(this, props)); _this.state = { children: [] }; _this.update = _this.update.bind(_this); return _this; } - babelHelpers.createClass(LazyList, [{ + createClass(LazyList, [{ key: 'update', value: function update(props) { var self = this; @@ -1741,13 +1737,13 @@ }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(newProps) { - var helpProps = babelHelpers.extends({}, this.props, newProps); + var helpProps = _extends({}, this.props, newProps); this.update(helpProps); } }, { key: 'componentDidMount', value: function componentDidMount() { - babelHelpers.get(Object.getPrototypeOf(LazyList.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(LazyList.prototype), 'componentDidMount', this).call(this); this.update(this.props); } }, { @@ -1755,7 +1751,7 @@ value: function render() { return React.createElement( 'ons-list', - babelHelpers.extends({}, this.props, { ref: 'list', + _extends({}, this.props, { ref: 'list', 'class': 'list', style: { position: 'relative', height: this.state.height } }), React.createElement('ons-lazy-repeat', { ref: 'lazyRepeat' }), @@ -1828,14 +1824,14 @@ */ var List = function (_BasicComponent) { - babelHelpers.inherits(List, _BasicComponent); + inherits(List, _BasicComponent); function List() { - babelHelpers.classCallCheck(this, List); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(List).apply(this, arguments)); + classCallCheck(this, List); + return possibleConstructorReturn(this, Object.getPrototypeOf(List).apply(this, arguments)); } - babelHelpers.createClass(List, [{ + createClass(List, [{ key: 'render', value: function render() { var _this2 = this; @@ -1846,7 +1842,7 @@ return React.createElement( 'ons-list', - babelHelpers.extends({}, this.props, { ref: 'list' }), + _extends({}, this.props, { ref: 'list' }), this.props.renderHeader(), pages, this.props.renderFooter() @@ -1943,14 +1939,14 @@ */ var ListHeader = function (_SimpleWrapper) { - babelHelpers.inherits(ListHeader, _SimpleWrapper); + inherits(ListHeader, _SimpleWrapper); function ListHeader() { - babelHelpers.classCallCheck(this, ListHeader); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(ListHeader).apply(this, arguments)); + classCallCheck(this, ListHeader); + return possibleConstructorReturn(this, Object.getPrototypeOf(ListHeader).apply(this, arguments)); } - babelHelpers.createClass(ListHeader, [{ + createClass(ListHeader, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-list-header'; @@ -1992,14 +1988,14 @@ */ var ListItem = function (_SimpleWrapper) { - babelHelpers.inherits(ListItem, _SimpleWrapper); + inherits(ListItem, _SimpleWrapper); function ListItem() { - babelHelpers.classCallCheck(this, ListItem); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(ListItem).apply(this, arguments)); + classCallCheck(this, ListItem); + return possibleConstructorReturn(this, Object.getPrototypeOf(ListItem).apply(this, arguments)); } - babelHelpers.createClass(ListItem, [{ + createClass(ListItem, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-list-item'; @@ -2007,19 +2003,19 @@ }, { key: 'componentDidMount', value: function componentDidMount() { - babelHelpers.get(Object.getPrototypeOf(ListItem.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(ListItem.prototype), 'componentDidMount', this).call(this); this.node = ReactDOM.findDOMNode(this); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { - babelHelpers.get(Object.getPrototypeOf(ListItem.prototype), 'componentDidUpdate', this).call(this); + get(Object.getPrototypeOf(ListItem.prototype), 'componentDidUpdate', this).call(this); this.node._compile(); } }, { key: 'render', value: function render() { - var others = babelHelpers.objectWithoutProperties(this.props, []); + var others = objectWithoutProperties(this.props, []); Util.convert(others, 'tappable'); @@ -2100,19 +2096,19 @@ */ var Navigator = function (_BasicComponent) { - babelHelpers.inherits(Navigator, _BasicComponent); + inherits(Navigator, _BasicComponent); function Navigator(props) { - babelHelpers.classCallCheck(this, Navigator); + classCallCheck(this, Navigator); - var _this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Navigator).call(this, props)); + var _this = possibleConstructorReturn(this, Object.getPrototypeOf(Navigator).call(this, props)); _this.pages = []; _this.state = {}; return _this; } - babelHelpers.createClass(Navigator, [{ + createClass(Navigator, [{ key: 'update', value: function update(pages, obj) { var _this2 = this; @@ -2314,13 +2310,13 @@ }, { key: 'render', value: function render() { - var others = babelHelpers.objectWithoutProperties(this.props, []); + var others = objectWithoutProperties(this.props, []); Util.convert(others, 'animationOptions', { fun: Util.animationOptionsConverter, newName: 'animation-options' }); return React.createElement( 'ons-navigator', - babelHelpers.extends({}, others, { ref: 'navi' }), + _extends({}, others, { ref: 'navi' }), this.pages ); } @@ -2401,17 +2397,17 @@ */ var Page = function (_BasicComponent) { - babelHelpers.inherits(Page, _BasicComponent); + inherits(Page, _BasicComponent); function Page() { - babelHelpers.classCallCheck(this, Page); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Page).apply(this, arguments)); + classCallCheck(this, Page); + return possibleConstructorReturn(this, Object.getPrototypeOf(Page).apply(this, arguments)); } - babelHelpers.createClass(Page, [{ + createClass(Page, [{ key: 'componentDidMount', value: function componentDidMount() { - babelHelpers.get(Object.getPrototypeOf(Page.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(Page.prototype), 'componentDidMount', this).call(this); var node = ReactDOM.findDOMNode(this); CustomElements.upgrade(node); node.addEventListener('init', this.props.onInit); @@ -2436,7 +2432,7 @@ return React.createElement( 'ons-page', - babelHelpers.extends({}, this.props, { _compiled: 'true' }), + _extends({}, this.props, { _compiled: 'true' }), toolbar, React.createElement( 'div', @@ -2554,14 +2550,14 @@ */ var Popover = function (_BaseDialog) { - babelHelpers.inherits(Popover, _BaseDialog); + inherits(Popover, _BaseDialog); function Popover() { - babelHelpers.classCallCheck(this, Popover); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Popover).apply(this, arguments)); + classCallCheck(this, Popover); + return possibleConstructorReturn(this, Object.getPrototypeOf(Popover).apply(this, arguments)); } - babelHelpers.createClass(Popover, [{ + createClass(Popover, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-popover'; @@ -2738,14 +2734,14 @@ */ var ProgressBar = function (_SimpleWrapper) { - babelHelpers.inherits(ProgressBar, _SimpleWrapper); + inherits(ProgressBar, _SimpleWrapper); function ProgressBar() { - babelHelpers.classCallCheck(this, ProgressBar); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(ProgressBar).apply(this, arguments)); + classCallCheck(this, ProgressBar); + return possibleConstructorReturn(this, Object.getPrototypeOf(ProgressBar).apply(this, arguments)); } - babelHelpers.createClass(ProgressBar, [{ + createClass(ProgressBar, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-progress-bar'; @@ -2753,7 +2749,7 @@ }, { key: 'render', value: function render() { - var others = babelHelpers.objectWithoutProperties(this.props, []); + var others = objectWithoutProperties(this.props, []); Util.convert(others, 'indeterminate'); @@ -2824,14 +2820,14 @@ */ var ProgressCircular = function (_SimpleWrapper) { - babelHelpers.inherits(ProgressCircular, _SimpleWrapper); + inherits(ProgressCircular, _SimpleWrapper); function ProgressCircular() { - babelHelpers.classCallCheck(this, ProgressCircular); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(ProgressCircular).apply(this, arguments)); + classCallCheck(this, ProgressCircular); + return possibleConstructorReturn(this, Object.getPrototypeOf(ProgressCircular).apply(this, arguments)); } - babelHelpers.createClass(ProgressCircular, [{ + createClass(ProgressCircular, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-progress-circular'; @@ -2839,7 +2835,7 @@ }, { key: 'render', value: function render() { - var others = babelHelpers.objectWithoutProperties(this.props, []); + var others = objectWithoutProperties(this.props, []); Util.convert(others, 'indeterminate'); @@ -2928,17 +2924,17 @@ */ var PullHook = function (_BasicComponent) { - babelHelpers.inherits(PullHook, _BasicComponent); + inherits(PullHook, _BasicComponent); function PullHook() { - babelHelpers.classCallCheck(this, PullHook); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(PullHook).apply(this, arguments)); + classCallCheck(this, PullHook); + return possibleConstructorReturn(this, Object.getPrototypeOf(PullHook).apply(this, arguments)); } - babelHelpers.createClass(PullHook, [{ + createClass(PullHook, [{ key: 'componentDidMount', value: function componentDidMount() { - babelHelpers.get(Object.getPrototypeOf(PullHook.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(PullHook.prototype), 'componentDidMount', this).call(this); var node = ReactDOM.findDOMNode(this); node.addEventListener('changestate', this.props.onChange); CustomElements.upgrade(this.refs.pullHook); @@ -2953,7 +2949,7 @@ }, { key: 'render', value: function render() { - var others = babelHelpers.objectWithoutProperties(this.props, []); + var others = objectWithoutProperties(this.props, []); ['disabled'].forEach(function (el) { @@ -2964,7 +2960,7 @@ Util.convert(others, 'thresholdHeight', { fun: Util.sizeConverter, newName: 'threshold-height' }); Util.convert(others, 'fixedContent', { newName: 'fixed-content' }); - return React.createElement('ons-pull-hook', babelHelpers.extends({ ref: 'pullHook' }, others)); + return React.createElement('ons-pull-hook', _extends({ ref: 'pullHook' }, others)); } }]); return PullHook; @@ -3047,19 +3043,19 @@ */ var Range = function (_SimpleWrapper) { - babelHelpers.inherits(Range, _SimpleWrapper); + inherits(Range, _SimpleWrapper); function Range() { - babelHelpers.classCallCheck(this, Range); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Range).apply(this, arguments)); + classCallCheck(this, Range); + return possibleConstructorReturn(this, Object.getPrototypeOf(Range).apply(this, arguments)); } - babelHelpers.createClass(Range, [{ + createClass(Range, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; - babelHelpers.get(Object.getPrototypeOf(Range.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(Range.prototype), 'componentDidMount', this).call(this); var node = ReactDOM.findDOMNode(this); EVENT_TYPES$1.forEach(function (eventType) { @@ -3145,14 +3141,14 @@ */ var Ripple = function (_SimpleWrapper) { - babelHelpers.inherits(Ripple, _SimpleWrapper); + inherits(Ripple, _SimpleWrapper); function Ripple() { - babelHelpers.classCallCheck(this, Ripple); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Ripple).apply(this, arguments)); + classCallCheck(this, Ripple); + return possibleConstructorReturn(this, Object.getPrototypeOf(Ripple).apply(this, arguments)); } - babelHelpers.createClass(Ripple, [{ + createClass(Ripple, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-ripple'; @@ -3213,14 +3209,14 @@ */ var Row = function (_SimpleWrapper) { - babelHelpers.inherits(Row, _SimpleWrapper); + inherits(Row, _SimpleWrapper); function Row() { - babelHelpers.classCallCheck(this, Row); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Row).apply(this, arguments)); + classCallCheck(this, Row); + return possibleConstructorReturn(this, Object.getPrototypeOf(Row).apply(this, arguments)); } - babelHelpers.createClass(Row, [{ + createClass(Row, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-row'; @@ -3228,7 +3224,7 @@ }, { key: 'render', value: function render() { - var others = babelHelpers.objectWithoutProperties(this.props, []); + var others = objectWithoutProperties(this.props, []); Util.convert(others, 'verticalAlign', { newName: 'vertical-align' }); @@ -3276,14 +3272,14 @@ */ var SpeedDial = function (_SimpleWrapper) { - babelHelpers.inherits(SpeedDial, _SimpleWrapper); + inherits(SpeedDial, _SimpleWrapper); function SpeedDial() { - babelHelpers.classCallCheck(this, SpeedDial); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(SpeedDial).apply(this, arguments)); + classCallCheck(this, SpeedDial); + return possibleConstructorReturn(this, Object.getPrototypeOf(SpeedDial).apply(this, arguments)); } - babelHelpers.createClass(SpeedDial, [{ + createClass(SpeedDial, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-speed-dial'; @@ -3356,14 +3352,14 @@ */ var SpeedDialItem = function (_SimpleWrapper) { - babelHelpers.inherits(SpeedDialItem, _SimpleWrapper); + inherits(SpeedDialItem, _SimpleWrapper); function SpeedDialItem() { - babelHelpers.classCallCheck(this, SpeedDialItem); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(SpeedDialItem).apply(this, arguments)); + classCallCheck(this, SpeedDialItem); + return possibleConstructorReturn(this, Object.getPrototypeOf(SpeedDialItem).apply(this, arguments)); } - babelHelpers.createClass(SpeedDialItem, [{ + createClass(SpeedDialItem, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-speed-dial-item'; @@ -3371,7 +3367,7 @@ }, { key: 'componentDidMount', value: function componentDidMount() { - babelHelpers.get(Object.getPrototypeOf(SpeedDialItem.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(SpeedDialItem.prototype), 'componentDidMount', this).call(this); var node = ReactDOM.findDOMNode(this); CustomElements.upgrade(node); node.addEventListener('click', this.props.onClick); @@ -3444,14 +3440,14 @@ */ var Splitter = function (_SimpleWrapper) { - babelHelpers.inherits(Splitter, _SimpleWrapper); + inherits(Splitter, _SimpleWrapper); function Splitter() { - babelHelpers.classCallCheck(this, Splitter); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Splitter).apply(this, arguments)); + classCallCheck(this, Splitter); + return possibleConstructorReturn(this, Object.getPrototypeOf(Splitter).apply(this, arguments)); } - babelHelpers.createClass(Splitter, [{ + createClass(Splitter, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-splitter'; @@ -3496,14 +3492,14 @@ */ var SplitterContent = function (_SimpleWrapper) { - babelHelpers.inherits(SplitterContent, _SimpleWrapper); + inherits(SplitterContent, _SimpleWrapper); function SplitterContent() { - babelHelpers.classCallCheck(this, SplitterContent); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(SplitterContent).apply(this, arguments)); + classCallCheck(this, SplitterContent); + return possibleConstructorReturn(this, Object.getPrototypeOf(SplitterContent).apply(this, arguments)); } - babelHelpers.createClass(SplitterContent, [{ + createClass(SplitterContent, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-splitter-content'; @@ -3548,17 +3544,17 @@ */ var SplitterSide = function (_BasicComponent) { - babelHelpers.inherits(SplitterSide, _BasicComponent); + inherits(SplitterSide, _BasicComponent); function SplitterSide() { - babelHelpers.classCallCheck(this, SplitterSide); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(SplitterSide).apply(this, arguments)); + classCallCheck(this, SplitterSide); + return possibleConstructorReturn(this, Object.getPrototypeOf(SplitterSide).apply(this, arguments)); } - babelHelpers.createClass(SplitterSide, [{ + createClass(SplitterSide, [{ key: 'render', value: function render() { - var props = babelHelpers.objectWithoutProperties(this.props, []); + var props = objectWithoutProperties(this.props, []); props.collapse = this.props.isCollapsed ? 'collapse' : 'false'; @@ -3581,7 +3577,7 @@ }, { key: 'componentDidMount', value: function componentDidMount() { - babelHelpers.get(Object.getPrototypeOf(SplitterSide.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(SplitterSide.prototype), 'componentDidMount', this).call(this); this.node = ReactDOM.findDOMNode(this); this.node.addEventListener('postopen', this.props.onOpen); @@ -3767,17 +3763,17 @@ */ var Switch = function (_BasicComponent) { - babelHelpers.inherits(Switch, _BasicComponent); + inherits(Switch, _BasicComponent); function Switch() { - babelHelpers.classCallCheck(this, Switch); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Switch).apply(this, arguments)); + classCallCheck(this, Switch); + return possibleConstructorReturn(this, Object.getPrototypeOf(Switch).apply(this, arguments)); } - babelHelpers.createClass(Switch, [{ + createClass(Switch, [{ key: 'componentDidMount', value: function componentDidMount() { - babelHelpers.get(Object.getPrototypeOf(Switch.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(Switch.prototype), 'componentDidMount', this).call(this); this.refs.switch.addEventListener('change', this.props.onChange); } }, { @@ -3791,13 +3787,13 @@ var _props = this.props; var checked = _props.checked; var inputId = _props.inputId; - var other = babelHelpers.objectWithoutProperties(_props, ['checked', 'inputId']); + var other = objectWithoutProperties(_props, ['checked', 'inputId']); if (inputId) { other['input-id'] = inputId; } - return React.createElement('ons-switch', babelHelpers.extends({ ref: 'switch', checked: checked ? '' : null }, other)); + return React.createElement('ons-switch', _extends({ ref: 'switch', checked: checked ? '' : null }, other)); } }]); return Switch; @@ -3858,14 +3854,14 @@ */ var Tab = function (_SimpleWrapper) { - babelHelpers.inherits(Tab, _SimpleWrapper); + inherits(Tab, _SimpleWrapper); function Tab() { - babelHelpers.classCallCheck(this, Tab); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Tab).apply(this, arguments)); + classCallCheck(this, Tab); + return possibleConstructorReturn(this, Object.getPrototypeOf(Tab).apply(this, arguments)); } - babelHelpers.createClass(Tab, [{ + createClass(Tab, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-tab'; @@ -3895,14 +3891,14 @@ */ var TabActive = function (_SimpleWrapper) { - babelHelpers.inherits(TabActive, _SimpleWrapper); + inherits(TabActive, _SimpleWrapper); function TabActive() { - babelHelpers.classCallCheck(this, TabActive); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(TabActive).apply(this, arguments)); + classCallCheck(this, TabActive); + return possibleConstructorReturn(this, Object.getPrototypeOf(TabActive).apply(this, arguments)); } - babelHelpers.createClass(TabActive, [{ + createClass(TabActive, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-tab-active'; @@ -3932,14 +3928,14 @@ */ var TabInactive = function (_SimpleWrapper) { - babelHelpers.inherits(TabInactive, _SimpleWrapper); + inherits(TabInactive, _SimpleWrapper); function TabInactive() { - babelHelpers.classCallCheck(this, TabInactive); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(TabInactive).apply(this, arguments)); + classCallCheck(this, TabInactive); + return possibleConstructorReturn(this, Object.getPrototypeOf(TabInactive).apply(this, arguments)); } - babelHelpers.createClass(TabInactive, [{ + createClass(TabInactive, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-tab-inactive'; @@ -3980,12 +3976,12 @@ */ var Tabbar = function (_BasicComponent) { - babelHelpers.inherits(Tabbar, _BasicComponent); + inherits(Tabbar, _BasicComponent); function Tabbar(props) { - babelHelpers.classCallCheck(this, Tabbar); + classCallCheck(this, Tabbar); - var _this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Tabbar).call(this, props)); + var _this = possibleConstructorReturn(this, Object.getPrototypeOf(Tabbar).call(this, props)); _this.state = { activeIndex: props.initialIndex || 0 @@ -3993,10 +3989,10 @@ return _this; } - babelHelpers.createClass(Tabbar, [{ + createClass(Tabbar, [{ key: 'componentDidMount', value: function componentDidMount() { - babelHelpers.get(Object.getPrototypeOf(Tabbar.prototype), 'componentDidMount', this).call(this); + get(Object.getPrototypeOf(Tabbar.prototype), 'componentDidMount', this).call(this); var node = this.refs.tabbar; CustomElements.upgrade(node); node.addEventListener('prechange', this.handleChange.bind(this)); @@ -4069,7 +4065,7 @@ value: function render() { var tabs = this.props.renderTabs(this.state.activeIndex, this); - var others = babelHelpers.objectWithoutProperties(this.props, []); + var others = objectWithoutProperties(this.props, []); ['animation'].forEach(function (el) { @@ -4080,7 +4076,7 @@ return React.createElement( 'ons-tabbar', - babelHelpers.extends({}, this.props, { ref: 'tabbar', activeIndex: this.state.activeIndex, _compiled: 'true' }), + _extends({}, this.props, { ref: 'tabbar', activeIndex: this.state.activeIndex, _compiled: 'true' }), React.createElement( 'div', { 'no-status-bar-fill': true, className: 'ons-tab-bar__content tab-bar__content' + (this.props.position === 'top' ? ' tab-bar--top__content' : '') }, @@ -4210,14 +4206,14 @@ */ var Toolbar = function (_SimpleWrapper) { - babelHelpers.inherits(Toolbar, _SimpleWrapper); + inherits(Toolbar, _SimpleWrapper); function Toolbar() { - babelHelpers.classCallCheck(this, Toolbar); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Toolbar).apply(this, arguments)); + classCallCheck(this, Toolbar); + return possibleConstructorReturn(this, Object.getPrototypeOf(Toolbar).apply(this, arguments)); } - babelHelpers.createClass(Toolbar, [{ + createClass(Toolbar, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-toolbar'; @@ -4268,14 +4264,14 @@ */ var ToolbarButton = function (_SimpleWrapper) { - babelHelpers.inherits(ToolbarButton, _SimpleWrapper); + inherits(ToolbarButton, _SimpleWrapper); function ToolbarButton() { - babelHelpers.classCallCheck(this, ToolbarButton); - return babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(ToolbarButton).apply(this, arguments)); + classCallCheck(this, ToolbarButton); + return possibleConstructorReturn(this, Object.getPrototypeOf(ToolbarButton).apply(this, arguments)); } - babelHelpers.createClass(ToolbarButton, [{ + createClass(ToolbarButton, [{ key: '_getDomNodeName', value: function _getDomNodeName() { return 'ons-toolbar-button'; @@ -4346,5 +4342,7 @@ exports.Toolbar = Toolbar; exports.ToolbarButton = ToolbarButton; + Object.defineProperty(exports, '__esModule', { value: true }); + })); //# sourceMappingURL=react-onsenui.js.map \ No newline at end of file diff --git a/dist/react-onsenui.js.map b/dist/react-onsenui.js.map index 33b4409..6ed43b7 100644 --- a/dist/react-onsenui.js.map +++ b/dist/react-onsenui.js.map @@ -1 +1 @@ -{"version":3,"file":"react-onsenui.js","sources":["../src/components/Util.js","../src/components/BaseDialog.jsx","../src/components/AlertDialog.jsx","../src/components/BasicComponent.jsx","../src/components/SimpleWrapper.jsx","../src/components/BackButton.jsx","../src/components/BottomToolbar.jsx","../src/components/Button.jsx","../src/components/Carousel.jsx","../src/components/CarouselItem.jsx","../src/components/Col.jsx","../src/components/Dialog.jsx","../src/components/Fab.jsx","../src/components/Icon.jsx","../src/components/Input.jsx","../src/components/LazyList.jsx","../src/components/List.jsx","../src/components/ListHeader.jsx","../src/components/ListItem.jsx","../src/components/Navigator.jsx","../src/components/Page.jsx","../src/components/Popover.jsx","../src/components/ProgressBar.jsx","../src/components/ProgressCircular.jsx","../src/components/PullHook.jsx","../src/components/Range.jsx","../src/components/Ripple.jsx","../src/components/Row.jsx","../src/components/SpeedDial.jsx","../src/components/SpeedDialItem.jsx","../src/components/Splitter.jsx","../src/components/SplitterContent.jsx","../src/components/SplitterSide.jsx","../src/components/Switch.jsx","../src/components/Tab.jsx","../src/components/TabActive.jsx","../src/components/TabInactive.jsx","../src/components/Tabbar.jsx","../src/components/Toolbar.jsx","../src/components/ToolbarButton.jsx"],"sourcesContent":["export default {\n sizeConverter(item) {\n if (typeof (item) === 'number') {\n return `${item}px`;\n } else {\n return item;\n }\n },\n\n numberConverter(item) {\n return `${item}px`;\n },\n\n animationOptionsConverter(options) {\n var keys = Object.keys(options);\n var innerString = keys.map((key) => key + ': \"' + options[key] + '\"');\n return '{' + innerString.join(',') + '}';\n },\n\n convert(dict, name, additionalDict = {}) {\n const fun = additionalDict.fun ? additionalDict.fun : (x) => x;\n const newName = additionalDict.newName ? additionalDict.newName : name;\n\n var val = dict[name];\n if (val) {\n if (newName !== name) {\n delete dict[name];\n }\n dict[newName] = fun(val);\n } else {\n dict[newName] = null;\n }\n return dict;\n }\n};\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport Util from './Util.js';\n\nclass BaseDialog extends React.Component {\n show() {\n this.node.firstChild.show();\n }\n\n updateClasses() {\n var node = this.node.firstChild;\n\n if (this.props.className) {\n if (this.lastClass) {\n node.className = node.className.replace(this.lastClass, '');\n }\n\n this.lastClass = ' ' + this.props.className;\n node.className += this.lastClass;\n }\n }\n\n hide() {\n this.node.firstChild.hide();\n }\n\n componentDidMount() {\n this.node = document.createElement('div');\n document.body.appendChild(this.node);\n\n this.node.addEventListener('cancel', this.props.onCancel);\n this.node.addEventListener('preshow', this.props.onPreShow);\n this.node.addEventListener('postshow', this.props.onPostShow);\n this.node.addEventListener('prehide', this.props.onPreHide);\n this.node.addEventListener('posthide', this.props.onPostHide);\n this.renderPortal(this.props);\n }\n\n componentWillReceiveProps(newProps) {\n if (newProps.isOpen !== this.props.isOpen) {\n this.animateShow = true;\n }\n this.renderPortal(newProps);\n }\n\n componentWillUnmount() {\n this.node.removeEventListener('cancel', this.props.onCancel);\n this.node.removeEventListener('preshow', this.props.onPreShow);\n this.node.removeEventListener('postshow', this.props.onPostShow);\n this.node.removeEventListener('prehide', this.props.onPreHide);\n this.node.removeEventListener('posthide', this.props.onPostHide);\n\n ReactDOM.unmountComponentAtNode(this.node);\n document.body.removeChild(this.node);\n }\n\n _update() {\n CustomElements.upgrade(this.node.firstChild);\n if (this.props.isOpen) {\n if (this.animateShow) {\n this.show();\n }\n this.animateShow = false;\n } else {\n this.hide();\n }\n this.updateClasses();\n }\n\n _getDomNodeName() {\n throw new Error('_getDomNodeName is not implemented');\n }\n\n renderPortal(props) {\n var {...newProps} = props;\n\n Util.convert(newProps, 'isCancelable', {newName: 'cancelable'});\n Util.convert(newProps, 'isDisabled', {newName: 'disabled'});\n Util.convert(newProps, 'maskColor', {newName: 'mask-color'});\n Util.convert(newProps, 'animationOptions', {fun: Util.animationOptionsConverter, newName: 'animation-options'});\n\n var element = React.createElement(this._getDomNodeName(), newProps);\n ReactDOM.render(element, this.node, this._update.bind(this));\n }\n\n shouldComponentUpdate() {\n return false;\n }\n\n render() {\n return React.DOM.noscript();\n }\n}\n\nBaseDialog.propTypes = {\n onCancel: React.PropTypes.func,\n isOpen: React.PropTypes.bool.isRequired,\n isCancelable: React.PropTypes.bool,\n isDisabled: React.PropTypes.bool,\n animation: React.PropTypes.string,\n maskColor: React.PropTypes.string,\n animationOptions: React.PropTypes.object,\n onPreShow: React.PropTypes.func,\n onPostShow: React.PropTypes.func,\n onPreHide: React.PropTypes.func,\n onPostHide: React.PropTypes.func\n};\n\nBaseDialog.defaultProps = {\n isCancelable: true,\n isDisabled: false\n};\n\nexport default BaseDialog;\n","import BaseDialog from './BaseDialog.jsx';\nimport React from 'react';\n\n/**\n * @original ons-alert-dialog\n * @category dialog\n * @tutorial react/Reference/dialog\n * @description\n * [en]\n * Alert dialog that is displayed on top of the current screen. Useful for displaying questions, warnings or error messages to the user. The title, content and buttons can be easily customized and it will automatically switch style based on the platform.\n * [/en]\n * [jp][/jp]\n * @example\n \n
Warning!
\n
\n An error has occurred!\n
\n
\n \n \n
\n
\n */\nclass AlertDialog extends BaseDialog {\n _getDomNodeName() {\n return 'ons-alert-dialog';\n }\n}\n\nAlertDialog.propTypes = {\n /**\n * @name onCancel\n * @type function\n * @required false\n * @description\n * [en]\n * Called only if isCancelable is true. It will be called after tapping the background or by pressing the back button on Android devices.\n * [/en]\n * [jp] どうしよう[/jp]\n */\n onCancel: React.PropTypes.func,\n\n /**\n * @name isOpen\n * @type bool\n * @required true\n * @description\n * [en]\n * Indicates whether the dialog is open and shown.\n * [/en]\n * [jp] [/jp]\n */\n isOpen: React.PropTypes.bool.isRequired,\n\n /**\n * @name isCancelable\n * @type bool\n * @required false\n * @description\n * [en]\n * Specifies whether the dialog is cancelable or not.\n * A cancelable dialog will call onCancel when tapping the background or or pressing the back button on Android devices\n * [/en]\n * [jp] [/jp]\n */\n isCancelable: React.PropTypes.bool,\n\n /**\n * @name isDisabled\n * @type bool\n * @required false\n * @description\n * [en]\n * Specifies whether the dialog is disabled.\n * [/en]\n * [jp] [/jp]\n */\n isDisabled: React.PropTypes.bool,\n\n /**\n * @name animation\n * @type string\n * @required false\n * @description\n * [en]\n * The animation used when showing and hiding the dialog. Can be either `\"none\"` or `\"default\"`.\n * [/en]\n * [jp] [/jp]\n */\n animation: React.PropTypes.string,\n\n /**\n * @name modifier\n * @type string\n * @required false\n * @description\n * [en]The appearance of the dialog.[/en]\n * [jp] [/jp]\n */\n modifier: React.PropTypes.string,\n\n /**\n * @name maskColor\n * @type string\n * @required false\n * @description\n * [en]Color of the background mask. Default is \"rgba(0, 0, 0, 0.2)\"[/en]\n * [jp] [/jp]\n */\n maskColor: React.PropTypes.string,\n\n /**\n * @name animationOptions\n * @type object\n * @required false\n * @description\n * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]\n * [jp] [/jp]\n */\n animationOptions: React.PropTypes.object,\n\n /**\n * @name onPreShow\n * @type function\n * @required false\n * @description\n * [en]\n * Called just before the alert dialog is displayed.\n * [/en]\n * [jp][/jp]\n */\n onPreShow: React.PropTypes.func,\n\n /**\n * @name onPostShow\n * @type function\n * @required false\n * @description\n * [en]\n * Called just after the alert dialog is displayed.\n * [/en]\n * [jp][/jp]\n */\n onPostShow: React.PropTypes.func,\n\n /**\n * @name onPreHide\n * @type function\n * @required false\n * @description\n * [en]Called just before the alert dialog is hidden.[/en]\n * [jp][/jp]\n */\n onPreHide: React.PropTypes.func,\n\n /**\n * @name onPostHide\n * @type function\n * @required false\n * @description\n * [en]Called just after the alert dialog is hidden.[/en]\n * [jp][/jp]\n */\n onPostHide: React.PropTypes.func\n};\n\nexport default AlertDialog;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\n\nclass BasicComponent extends React.Component {\n constructor(props) {\n super(props);\n this.updateClasses = this.updateClasses.bind(this);\n }\n\n updateClasses() {\n var node = ReactDOM.findDOMNode(this);\n\n if (typeof this.props.className !== 'undefined') {\n if (this.lastClass) {\n node.className = node.className.replace(this.lastClass, ' ');\n }\n\n this.lastClass = ' ' + this.props.className.trim();\n\n node.className = node.className.trim() + this.lastClass;\n }\n\n if (!window._superSecretOns) {\n throw new Error(\"react-onsenui requires `onsenui`, make sure you are loading it with `import onsenui` or `require('onsenui')` before using the components\");\n }\n\n window._superSecretOns._autoStyle.prepare(node);\n }\n\n componentDidMount() {\n this.updateClasses();\n }\n\n componentDidUpdate() {\n this.updateClasses();\n }\n}\n\nexport default BasicComponent;\n","import React from 'react';\nimport BasicComponent from './BasicComponent.jsx';\nimport Util from './Util.js';\n\nclass SimpleWrapper extends BasicComponent {\n render() {\n var {...others} = this.props;\n\n Util.convert(others, 'disabled');\n Util.convert(others, 'ripple');\n\n return React.createElement(this._getDomNodeName(), others, this.props.children);\n }\n};\n\nexport default SimpleWrapper;\n","import SimpleWrapper from './SimpleWrapper.jsx';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\n/**\n * @original ons-back-button\n * @category toolbar\n * @tutorial react/Reference/navigator\n * @description\n * [en]\n * Back button component for Toolbar. It enables to automatically to pop the top page of the navigator. When only presented with one page, the button is hidden automatically.\n *\n * The default behavior can be overridden using the `onClick` prop.\n * [/en]\n * [jp][/jp]\n * @example\n * \n
Back
\n
{this.props.title}
\n
\n */\nclass BackButton extends SimpleWrapper {\n _getDomNodeName() {\n return 'ons-back-button';\n }\n\n _updateOnClick(props) {\n const node = ReactDOM.findDOMNode(this);\n\n if (props.onClick) {\n node.onClick = () => null;\n } else {\n delete node.onClick;\n }\n }\n\n componentDidMount() {\n this._updateOnClick(this.props);\n }\n\n componentWillReceiveProps(props) {\n this._updateOnClick(props);\n }\n};\n\nBackButton.propTypes = {\n /**\n * @name modifier\n * @type string\n * @required false\n * @description\n * [en]The appearance of the back button.[/en]\n * [jp][/jp]\n */\n modifier: React.PropTypes.string,\n\n /**\n * @name onClick\n * @type function\n * @description\n * [en]This function will be called ones the button is clicked. It overrides the default behavior of the back button.[/en]\n * [jp][/jp]\n */\n onClick: React.PropTypes.func\n};\n\nexport default BackButton;\n","import SimpleWrapper from './SimpleWrapper.jsx';\nimport React from 'react';\n\n/**\n * @original ons-bottom-toolbar\n * @category toolbar\n * @description\n * [en] Back button component for Toolbar. It enables to automatically to pop the top page of the navigator. When only presented with one page, the button is hidden automatically. [/en]\n * [jp][/jp]\n * @example\n * Content \n */\nclass BottomToolbar extends SimpleWrapper {\n _getDomNodeName() {\n return 'ons-bottom-toolbar';\n }\n};\n\nBottomToolbar.propTypes = {\n /**\n * @name modifier\n * @type string\n * @description\n * [en]\n * Specify modifier name to specify custom styles. Optional.\n * [/en]\n * [jp][/jp]\n */\n modifier: React.PropTypes.string\n};\n\nexport default BottomToolbar;\n","import SimpleWrapper from './SimpleWrapper.jsx';\nimport React from 'react';\n\n/**\n * @original ons-button\n * @category button\n * @tutorial react/Reference/button\n * @description\n * [en] Button component. If you want to place a button in a toolbar, use `ToolbarButton` or `BackButton` instead. Will automatically display as a Material Design button with a ripple effect on Android.\n [/en]\n * [jp][/jp]\n * @example\n * \n */\nclass Button extends SimpleWrapper {\n _getDomNodeName() {\n return 'ons-button';\n }\n};\n\nButton.propTypes = {\n /**\n * @name modifier\n * @type string\n * @required false\n * @description\n * [en]The appearance of the button.[/en]\n * [jp] [/jp]\n */\n modifier: React.PropTypes.string,\n\n /**\n * @name disabled\n * @type bool\n * @description\n * [en]\n * Specifies whether the button is disabled.\n * [/en]\n * [jp] [/jp]\n */\n disabled: React.PropTypes.bool,\n\n /**\n * @name ripple\n * @type bool\n * @description\n * [en]\n * Specifies whether the button has a ripple effect.\n * [/en]\n * [jp] [/jp]\n */\n ripple: React.PropTypes.bool,\n\n /**\n * @name onClick\n * @type function\n * @description\n * [en] This function will be called ones the button is clicked. [/en]\n * [jp] [/jp]\n */\n onClick: React.PropTypes.func\n};\n\nexport default Button;\n","import SimpleWrapper from './SimpleWrapper.jsx';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Util from './Util.js';\n\n/**\n * @original ons-carousel\n * @category carousel\n * @tutorial react/Reference/carousel\n * @description\n * [en] Carousel component. A carousel can be used to display several items in the same space.\n * The component supports displaying content both horizontally and vertically. The user can scroll through the items by dragging and it can also be controller programmatically.\n [/en]\n * [jp][/jp]\n * @example\n * console.log('onPostChange')}\n onOverscroll={() => console.log('onOverscroll')}\n onRefresh={() => console.log('onRefresh')}\n ref='carousel' swipeable overscrollable autoScroll fullscreen autoScrollRatio={0.2}>\n \n
GRAY
\n
\n \n
BLUE
\n
\n \n\n */\nclass Carousel extends SimpleWrapper {\n _getDomNodeName() {\n return 'ons-carousel';\n }\n\n componentDidMount() {\n super.componentDidMount();\n var node = ReactDOM.findDOMNode(this);\n CustomElements.upgrade(node);\n node.addEventListener('postchange', this.props.onPostChange);\n node.addEventListener('refresh', this.props.onRefresh);\n node.addEventListener('overscroll', this.props.onOverscroll);\n }\n\n componentWillReceiveProps(props) {\n var node = ReactDOM.findDOMNode(this);\n if (this.props.index !== props.index) {\n node.setActiveIndex(props.index, props.animationOptions);\n }\n }\n\n componentWillUnmount() {\n var node = ReactDOM.findDOMNode(this);\n node.removeEventListener('postchange', this.props.onPostChange);\n node.removeEventListener('refresh', this.props.onRefresh);\n node.removeEventListener('overscroll', this.props.onOverscroll);\n }\n\n render() {\n var {...others} = this.props;\n\n ['fullscreen', 'swipeable', 'disabled', 'centered', 'overscrollable', 'centered'].forEach((el) => {\n Util.convert(others, el);\n });\n\n Util.convert(others, 'itemWidth', {fun: Util.sizeConverter, newName: 'item-width'});\n Util.convert(others, 'itemHeight', {fun: Util.sizeConverter, newName: 'item-height'});\n Util.convert(others, 'autoScroll', {newName: 'auto-scroll'});\n Util.convert(others, 'autoRefresh', {newName: 'auto-refresh'});\n Util.convert(others, 'autoScrollRatio', {newName: 'auto-scroll-ratio'});\n Util.convert(others, 'index', {newName: 'initial-index'});\n Util.convert(others, 'animationOptions', {fun: Util.animationOptionsConverter, newName: 'animation-options'});\n\n return React.createElement(this._getDomNodeName(), others, this.props.children);\n }\n};\n\nCarousel.propTypes = {\n\n /**\n * @name direction\n * @type string\n * @required false\n * @description\n * [en]The direction of the carousel. Can be either \"horizontal\" or \"vertical\". Default is \"horizontal\".[/en]\n * [jp] [/jp]\n */\n direction: React.PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * @name fullscreen\n * @type bool\n * @description\n * [en]If true, the carousel will cover the whole screen.[/en]\n * [jp] [/jp]\n */\n fullscreen: React.PropTypes.bool,\n\n /**\n * @name overscrollable\n * @type bool\n * @description\n * [en]If true, the carousel will be scrollable over the edge. It will bounce back when released.[/en]\n * [jp] [/jp]\n */\n overscrollable: React.PropTypes.bool,\n\n /**\n * @name centered\n * @type bool\n * @description\n * [en]If true, the carousel then the selected item will be in the center of the carousel instead of the beginning. Useful only when the items are smaller than the carousel.[/en]\n * [jp] [/jp]\n */\n centered: React.PropTypes.bool,\n\n /**\n * @name itemWidth\n * @type number\n * @description\n * [en]ons-carousel-item's width. Only works when the direction is set to \"horizontal\".[/en]\n * [jp] [/jp]\n */\n itemWidth: React.PropTypes.oneOf(React.PropTypes.string, React.PropTypes.string),\n\n /**\n * @name itemHeight\n * @type number\n * @description\n * [en]ons-carousel-item's height. Only works when the direction is set to \"vertical\".[/en]\n * [jp] [/jp]\n */\n itemHeight: React.PropTypes.oneOf(React.PropTypes.string, React.PropTypes.string),\n\n /**\n * @name autoScroll\n * @type bool\n * @description\n * [en]If true, the carousel will be automatically scrolled to the closest item border when released.[/en]\n * [jp] [/jp]\n */\n autoScroll: React.PropTypes.bool,\n\n /**\n * @name autoScrollRatio\n * @type number\n * @description\n * [en]A number between 0.0 and 1.0 that specifies how much the user must drag the carousel in order for it to auto scroll to the next item.[/en]\n * [jp] [/jp]\n */\n autoScrollRatio: React.PropTypes.number,\n\n /**\n * @name swipeable\n * @type bool\n * @description\n * [en]If true, the carousel can be scrolled by drag or swipe.[/en]\n * [jp] [/jp]\n */\n swipeable: React.PropTypes.bool,\n\n /**\n * @name disabled\n * @type bool\n * @description\n * [en]If true, the carousel will be disabled.[/en]\n * [jp] [/jp]\n */\n disabled: React.PropTypes.bool,\n\n /**\n * @name index\n * @type number\n * @description\n * [en]Specify the index of the ons-carousel-item to show. Default is 0.[/en]\n * [jp] [/jp]\n */\n index: React.PropTypes.number,\n\n /**\n * @name autoRefresh\n * @type bool\n * @description\n * [en]When this attribute is set the carousel will automatically refresh when the number of child nodes change.[/en]\n * [jp] [/jp]\n */\n autoRefresh: React.PropTypes.bool,\n\n /**\n * @name onPostChange\n * @type function\n * @description\n * [en]Called just after the current carousel item has changed. [/en]\n * [jp] [/jp]\n */\n onPostChange: React.PropTypes.func,\n\n /**\n * @name onRefresh\n * @type function\n * @description\n * [en]Called when the carousel has been refreshed. [/en]\n * [jp] [/jp]\n */\n onRefresh: React.PropTypes.func,\n\n /**\n * @name onOverscroll\n * @type function\n * @description\n * [en]Called when the carousel has been overscrolled. [/en]\n * [jp] [/jp]\n */\n onOverscroll: React.PropTypes.func,\n\n /**\n * @name animationOptions\n * @type object\n * @required false\n * @description\n * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]\n * [jp] [/jp]\n */\n animationOptions: React.PropTypes.object\n};\n\nexport default Carousel;\n","import SimpleWrapper from './SimpleWrapper.jsx';\nimport React from 'react';\n\n/**\n * @original ons-carousel-item\n * @category carousel\n * @tutorial react/Reference/carousel\n * @description\n * [en] Carousel item component. Used as a child of the `` element.\n [/en]\n * [jp][/jp]\n * @example\n* \n \n
GRAY
\n
\n \n
BLUE
\n
\n
\n */\nclass CarouselItem extends SimpleWrapper {\n _getDomNodeName() {\n return 'ons-carousel-item';\n }\n};\n\nCarouselItem.propTypes = {\n /**\n * @name modifier\n * @type string\n * @description\n * [en]\n * Specify modifier name to specify custom styles. Optional.\n * [/en]\n * [jp] どうしよう[/jp]\n */\n modifier: React.PropTypes.string\n};\n\nexport default CarouselItem;\n","import SimpleWrapper from './SimpleWrapper.jsx';\nimport React from 'react';\nimport Util from './Util.js';\n\n/**\n * @original ons-col\n * @category grid\n * @description\n * [en]\n * Represents a column in the grid system. Use with `` to layout components.\n * [/en]\n * [jp][/jp]\n * \n * \n * \n * \n * Text\n * \n */\nclass Col extends SimpleWrapper {\n _getDomNodeName() {\n return 'ons-col';\n }\n\n render() {\n var {...others} = this.props;\n\n Util.convert(others, 'verticalAlign', {newName: 'vertical-align'});\n Util.convert(others, 'width', {fun: Util.sizeConverter});\n\n return React.createElement(this._getDomNodeName(), others, this.props.children);\n }\n\n};\n\nCol.propTypes = {\n\n /**\n * @name verticalAlign\n * @type {String}\n * @description\n * [en]Short hand attribute for aligning vertically. Valid values are top, bottom, and center.[/en]\n * [ja][/ja]\n */\n verticalAlign: React.PropTypes.oneOf(['top', 'bottom', 'center']),\n\n /**\n * @name width\n * @type {String}\n * @description\n * [en]The width of the column. Valid values are css width values (\"10%\", 50).[/en]\n * [ja][/ja]\n */\n width: React.PropTypes.oneOfType([React.PropTypes.number, React.PropTypes.string])\n};\n\nexport default Col;\n","import BaseDialog from './BaseDialog.jsx';\nimport React from 'react';\n\n/**\n * @original ons-dialog\n * @category dialog\n * @tutorial react/Reference/dialog\n * @description\n * [en] Dialog that is displayed on top of current screen. As opposed to the AlertDialog element, this component can contain any kind of content. The dialog is useful for displaying menus, additional information or to ask the user to make a decision. It will automatically be displayed as Material Design when running on an Android device.\n [/en]\n * [jp][/jp]\n * @example\n \n \n Page Content\n \n \n\n */\nclass Dialog extends BaseDialog {\n _getDomNodeName() {\n return 'ons-dialog';\n }\n}\n\nDialog.propTypes = {\n /**\n * @name onCancel\n * @type function\n * @required false\n * @description\n * [en]\n * Called only if isCancelable is true. It will be called after tapping the background or by pressing the back button on Android devices.\n * [/en]\n * [jp] どうしよう[/jp]\n */\n onCancel: React.PropTypes.func,\n\n /**\n * @name isOpen\n * @type bool\n * @required true\n * @description\n * [en]\n * Indicates whether the dialog is open and shown.\n * [/en]\n * [jp] [/jp]\n */\n isOpen: React.PropTypes.bool.isRequired,\n\n /**\n * @name isCancelable\n * @type bool\n * @required false\n * @description\n * [en]\n * Specifies whether the dialog is cancelable or not.\n * A cancelable dialog will call onCancel when tapping the background or or pressing the back button on Android devices\n * [/en]\n * [jp] [/jp]\n */\n isCancelable: React.PropTypes.bool,\n\n /**\n * @name isDisabled\n * @type bool\n * @required false\n * @description\n * [en]\n * Specifies whether the dialog is disabled.\n * [/en]\n * [jp] [/jp]\n */\n isDisabled: React.PropTypes.bool,\n\n /**\n * @name animation\n * @type string\n * @required false\n * @description\n * [en]\n * The animation used when showing and hiding the dialog. Can be either `\"none\"` or `\"default\"`.\n * [/en]\n * [jp] [/jp]\n */\n animation: React.PropTypes.string,\n\n /**\n * @name modifier\n * @type string\n * @required false\n * @description\n * [en]The appearance of the dialog.[/en]\n * [jp] [/jp]\n */\n modifier: React.PropTypes.string,\n\n /**\n * @name maskColor\n * @type string\n * @required false\n * @description\n * [en]Color of the background mask. Default is \"rgba(0, 0, 0, 0.2)\"[/en]\n * [jp] [/jp]\n */\n maskColor: React.PropTypes.string,\n\n /**\n * @name animationOptions\n * @type object\n * @required false\n * @description\n * [en]Specify the animation's duration, delay and timing. E.g. `{duration: 0.2, delay: 0.4, timing: 'ease-in'}`.[/en]\n * [jp] [/jp]\n */\n animationOptions: React.PropTypes.object,\n\n /**\n * @name onPreShow\n * @type function\n * @required false\n * @description\n * [en]\n * Called just before the alert dialog is displayed.\n * [/en]\n * [jp][/jp]\n */\n onPreShow: React.PropTypes.func,\n\n /**\n * @name onPostShow\n * @type function\n * @required false\n * @description\n * [en]\n * Called just after the alert dialog is displayed.\n * [/en]\n * [jp][/jp]\n */\n onPostShow: React.PropTypes.func,\n\n /**\n * @name onPreHide\n * @type function\n * @required false\n * @description\n * [en]Called just before the alert dialog is hidden.[/en]\n * [jp][/jp]\n */\n onPreHide: React.PropTypes.func,\n\n /**\n * @name onPostHide\n * @type function\n * @required false\n * @description\n * [en]Called just after the alert dialog is hidden.[/en]\n * [jp][/jp]\n */\n onPostHide: React.PropTypes.func\n};\n\nexport default Dialog;\n","import SimpleWrapper from './SimpleWrapper.jsx';\nimport React from 'react';\n\n/**\n * @original ons-fab\n * @category fab\n * @tutorial react/Reference/fab\n * @description\n * [en] The Floating action button is a circular button defined in the [Material Design specification](https://www.google.com/design/spec/components/buttons-floating-action-button.html). They are often used to promote the primary action of the app.\n * It can be displayed either as an inline element or in one of the corners. Normally it will be positioned in the lower right corner of the screen.\n [/en]\n * [jp][/jp]\n * @example\n * console.log('test1')} position='left bottom'>\n \n \n \n console.log('speed A')}> A \n console.log('speed B')}> B \n console.log('speed C')}> C \n console.log('speed D')}> D \n \n */\nclass Fab extends SimpleWrapper {\n _getDomNodeName() {\n return 'ons-fab';\n }\n};\n\nFab.propTypes = {\n /**\n * @name modifier\n * @type string\n * @required false\n * @description\n * [en]The appearance of the button.[/en]\n * [jp] [/jp]\n */\n modifier: React.PropTypes.string,\n\n /**\n * @name ripple\n * @type bool\n * @description\n * [en]If true, the button will have a ripple effect when tapped.[/en]\n * [jp] [/jp]\n */\n ripple: React.PropTypes.bool,\n\n /**\n * @namep position\n * @type string\n * @required false\n * @description\n * [en]The position of the button. Should be a string like `\"bottom right\"` or `\"top left\"`. If this attribute is not defined it will be displayed as an inline element.[/en]\n * [jp] [/jp]\n */\n position: React.PropTypes.string,\n\n /**\n * @name disabled\n * @type bool\n * @description\n * [en] If true, the button will be disabled. [/en]\n * [jp] [/jp]\n */\n disabled: React.PropTypes.string,\n\n /**\n * @name onClick\n * @type function\n * @description\n * [en] This function will be called ones the button is clicked. [/en]\n * [jp] [/jp]\n */\n onClick: React.PropTypes.func\n};\n\nexport default Fab;\n","import SimpleWrapper from './SimpleWrapper.jsx';\nimport React from 'react';\nimport Util from './Util.js';\n\n/**\n * @original ons-icon\n * @category icon\n * @tutorial react/Reference/icon\n * @description\n * [en]\n * Displays an icon. The following icon suites are available:\n * * [Font Awesome](https://fortawesome.github.io/Font-Awesome/)\n * * [Ionicons](http://ionicons.com/)\n * * [Material Design Iconic Font](http://zavoloklom.github.io/material-design-iconic-font/)\n * [/en]\n * [jp][/jp]\n * @example\n \n/> */\nclass Icon extends SimpleWrapper {\n _getDomNodeName() {\n return 'ons-icon';\n }\n\n render() {\n var {icon, size, ...others} = this.props;\n\n Util.convert(others, 'fixedWidth', {newName: 'fixed-width'});\n Util.convert(others, 'spin');\n\n if (icon) {\n if ((typeof icon) === 'string') {\n others.icon = icon;\n } else {\n let keys = Object.keys(icon).filter((a) => a !== 'default');\n let innerString = keys.map((key) => key + ':' + icon[key] + '');\n others.icon = icon.default + ', ' + innerString.join(',');\n }\n }\n\n if (size) {\n if ((typeof size) === 'number') {\n others.size = `${size}px`;\n } else {\n let keys = Object.keys(size).filter((a) => a !== 'default');\n let innerString = keys.map((key) => key + ':' + size[key] + 'px');\n others.size = size.default + 'px, ' + innerString.join(',');\n }\n }\n\n return React.createElement(this._getDomNodeName(), others, this.props.children);\n }\n\n};\n\nIcon.propTypes = {\n /**\n * @name modifier\n * @type string\n * @required false\n * @description\n * [en]The appearance of the icon.[/en]\n * [jp] [/jp]\n */\n modifier: React.PropTypes.string,\n\n /**\n * @name icon\n * @type 'object or string'\n * @description\n * [en] can be either a string or an object. If it is an string, it is set to an specific icon like 'ions-navicon'. If it is an object, it represents a dictionary of the icons depending on the modifier e.g. `{{default: 'ion-navicon', material: 'md-menu'}}` [/en]\n * [jp] [/jp]\n */\n icon: React.PropTypes.oneOfType([\n React.PropTypes.string,\n React.PropTypes.objectOf(React.PropTypes.string)\n ]),\n\n /**\n * @name size\n * @type 'object or number'\n * @description\n * [en] can be either a number or an object. If it is an number, it specifies the icon size with a number in pixels. If it is an object, it represents a dictionary of the icon sizes depending on the modifier e.g. `{{default: 20, material: 18}}` [/en]\n * [jp] [/jp]\n */\n size: React.PropTypes.oneOfType([\n React.PropTypes.number,\n React.PropTypes.objectOf(React.PropTypes.number)\n ]),\n\n /**\n * @name rotate\n * @type number\n * @description\n * [en] Number of degrees to rotate the icon. Valid values are 90, 180 and 270. [/en]\n * [jp] [/jp]\n */\n rotate: React.PropTypes.oneOf([0, 90, 180, 270]),\n\n /**\n * @name fixedWidth\n * @type bool\n * @description\n * [en] When used in a list, you want the icons to have the same width so that they align vertically by defining this attribute. [/en]\n * [jp] [/jp]\n */\n fixedWidth: React.PropTypes.bool,\n\n /**\n * @name spin\n * @type bool\n * @description\n * [en] Specify whether the icon should be spinning. [/en]\n * [jp] [/jp]\n */\n spin: React.PropTypes.bool\n\n};\n\nexport default Icon;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport BasicComponent from './BasicComponent.jsx';\nimport Util from './Util.js';\n\nconst EVENT_TYPES = ['change', 'input'];\n\n/**\n * @original ons-input\n * @category input\n * @tutorial react/Reference/input\n * @description\n * [en]\n * An input element. The `type` attribute can be used to change the input type. All text input types as well as `checkbox` and `radio` are supported. The component will automatically render as a Material Design input on Android devices. Most attributes that can be used for a normal `` element can also be used on the `` element..\n [/en]\n * [jp][/jp]\n * @example\n * { this.setState({text: event.target.value})} }\n * modifier='material'\n * placeholder='Username' />\n */\nclass Input extends BasicComponent {\n componentDidMount() {\n super.componentDidMount();\n var node = ReactDOM.findDOMNode(this);\n\n EVENT_TYPES.forEach((eventType) => {\n node.addEventListener(eventType, this.props.onChange);\n });\n }\n\n componentWillUnmount() {\n var node = ReactDOM.findDOMNode(this);\n\n EVENT_TYPES.forEach((eventType) => {\n node.removeEventListener(eventType, this.props.onChange);\n });\n }\n\n componentWillReceiveProps(props) {\n var node = ReactDOM.findDOMNode(this);\n\n if (typeof props.value !== 'undefined') {\n node.value = props.value;\n }\n\n if (typeof props.checked !== 'undefined') {\n node.checked = props.checked;\n }\n }\n\n render() {\n var {checked, ...other} = this.props;\n other['input-id'] = this.props.inputId;\n\n Util.convert(other, 'disabled');\n\n return (\n \n );\n }\n}\n\nInput.propTypes = {\n /**\n * @name modifier\n * @type string\n * @required false\n * @description\n * [en]The appearance of the input.[/en]\n * [jp] [/jp]\n */\n modifier: React.PropTypes.string,\n\n /**\n * @name disabled\n * @type bool\n * @description\n * [en]\n * Specifies whether the input is disabled.\n * [/en]\n * [jp] [/jp]\n */\n disabled: React.PropTypes.bool,\n\n /**\n * @name onChange\n * @type function\n * @description\n * [en] Called when the text of the input changes.[/en]\n * [jp][/jp]\n */\n onChange: React.PropTypes.func,\n\n /**\n * @name value\n * @type string\n * @description\n * [en] Content of the input.[/en]\n * [jp][/jp]\n */\n value: React.PropTypes.string,\n\n /**\n * @name placehoder\n * @type string\n * @description\n * [en] Placeholder text. In Material Design this placeholder will be a floating label. [/en]\n * [jp][/jp]\n */\n placeholder: React.PropTypes.string,\n\n /**\n * @name type\n * @type string\n * @description\n * [en] Specify the input type. This is the same as the \"type\" attribute for normal inputs.\n * Please take a look at [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type) for an exhaustive list of possible values. Depending on the platform and browser version some of these might not work.\n [/en]\n * [jp][/jp]\n */\n type: React.PropTypes.string,\n\n /**\n * @name inputId\n * @type string\n * @description\n * [en] Specify the \"id\" attribute of the inner element. This is useful when using