diff --git a/dist/react-onsenui.js b/dist/react-onsenui.js
index 58fc7ff..fefc172 100644
--- a/dist/react-onsenui.js
+++ b/dist/react-onsenui.js
@@ -1,4 +1,4 @@
-/*! react-onsenui v0.7.3 - Mon Aug 01 2016 19:40:24 GMT+0900 (JST) */
+/*! react-onsenui v0.7.4 - Fri Aug 05 2016 14:38:31 GMT+0900 (JST) */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom'), require('onsenui')) :
typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom', 'onsenui'], factory) :
@@ -6,7 +6,7 @@
}(this, function (exports,React,ReactDOM,ons) { 'use strict';
React = 'default' in React ? React['default'] : React;
- ReactDOM = 'default' in ReactDOM ? ReactDOM['default'] : ReactDOM;
+ var ReactDOM__default = 'default' in ReactDOM ? ReactDOM['default'] : ReactDOM;
ons = 'default' in ons ? ons['default'] : ons;
var Util = {
@@ -207,7 +207,7 @@
this.node.removeEventListener('prehide', this.props.onPreHide);
this.node.removeEventListener('posthide', this.props.onPostHide);
- ReactDOM.unmountComponentAtNode(this.node);
+ ReactDOM__default.unmountComponentAtNode(this.node);
document.body.removeChild(this.node);
}
}, {
@@ -239,7 +239,7 @@
Util.convert(newProps, 'animationOptions', { fun: Util.animationOptionsConverter, newName: 'animation-options' });
var element = React.createElement(this._getDomNodeName(), newProps);
- ReactDOM.render(element, this.node, this._update.bind(this, isShown));
+ ReactDOM__default.render(element, this.node, this._update.bind(this, isShown));
}
}, {
key: 'shouldComponentUpdate',
@@ -469,7 +469,7 @@
createClass(BasicComponent, [{
key: 'updateClasses',
value: function updateClasses() {
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
if (typeof this.props.className !== 'undefined') {
if (this.lastClass) {
@@ -559,7 +559,7 @@
}, {
key: '_updateOnClick',
value: function _updateOnClick(props) {
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
if (props.onClick) {
node.onClick = function () {
@@ -776,10 +776,20 @@
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(props) {
var node = ReactDOM.findDOMNode(this);
+
if (this.props.index !== props.index) {
node.setActiveIndex(props.index, props.animationOptions);
}
}
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate(props) {
+ var node = ReactDOM.findDOMNode(this);
+
+ if (this.props.children.length !== props.children.length) {
+ node.refresh();
+ }
+ }
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
@@ -1511,7 +1521,7 @@
var _this2 = this;
get(Object.getPrototypeOf(Input.prototype), 'componentDidMount', this).call(this);
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
EVENT_TYPES.forEach(function (eventType) {
node.addEventListener(eventType, _this2.props.onChange);
@@ -1522,7 +1532,7 @@
value: function componentWillUnmount() {
var _this3 = this;
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
EVENT_TYPES.forEach(function (eventType) {
node.removeEventListener(eventType, _this3.props.onChange);
@@ -1531,7 +1541,7 @@
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(props) {
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
if (typeof props.value !== 'undefined' && node.value !== props.value) {
node.value = props.value;
@@ -1851,7 +1861,7 @@
* @type string
* @description
* [en]
- * Specify modifier name to specify custom styles.
+ * Source of the list data. Should be an array.
* [/en]
* [jp] どうしよう[/jp]
*/
@@ -1986,7 +1996,7 @@
key: 'componentDidMount',
value: function componentDidMount() {
get(Object.getPrototypeOf(ListItem.prototype), 'componentDidMount', this).call(this);
- this.node = ReactDOM.findDOMNode(this);
+ this.node = ReactDOM__default.findDOMNode(this);
}
}, {
key: 'componentDidUpdate',
@@ -2514,7 +2524,7 @@
key: 'componentDidMount',
value: function componentDidMount() {
get(Object.getPrototypeOf(Modal.prototype), 'componentDidMount', this).call(this);
- this.node = ReactDOM.findDOMNode(this);
+ this.node = ReactDOM__default.findDOMNode(this);
CustomElements.upgrade(this.node);
this._update(this.props, false);
@@ -2536,7 +2546,7 @@
this.node.show(animationOptions).then(function () {
return props.onShow && props.onShow();
});
- } else {
+ } else if (!props.isOpen && isOpen) {
this.node.hide(animationOptions).then(function () {
return props.onHide && props.onHide();
});
@@ -2650,7 +2660,7 @@
key: 'componentDidMount',
value: function componentDidMount() {
get(Object.getPrototypeOf(Page.prototype), 'componentDidMount', this).call(this);
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
CustomElements.upgrade(node);
node.addEventListener('init', this.props.onInit);
node.addEventListener('show', this.props.onShow);
@@ -2659,7 +2669,7 @@
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
node.removeEventListener('init', this.props.onInit);
node.removeEventListener('show', this.props.onShow);
node.removeEventListener('hide', this.props.onHide);
@@ -2839,7 +2849,7 @@
key: 'show',
value: function show() {
var target = this.props.getTarget();
- target = ReactDOM.findDOMNode(target);
+ target = ReactDOM__default.findDOMNode(target);
return this.node.firstChild.show(target);
}
}]);
@@ -3206,7 +3216,7 @@
key: 'componentDidMount',
value: function componentDidMount() {
get(Object.getPrototypeOf(PullHook.prototype), 'componentDidMount', this).call(this);
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
node.addEventListener('changestate', this.props.onChange);
CustomElements.upgrade(this.refs.pullHook);
this.refs.pullHook.onAction = this.props.onLoad;
@@ -3214,7 +3224,7 @@
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
node.removeEventListener('changestate', this.props.onChange);
}
}, {
@@ -3326,7 +3336,7 @@
var _this2 = this;
get(Object.getPrototypeOf(Range.prototype), 'componentDidMount', this).call(this);
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
EVENT_TYPES$1.forEach(function (eventType) {
node.addEventListener(eventType, _this2.props.onChange);
@@ -3337,7 +3347,7 @@
value: function componentWillUnmount() {
var _this3 = this;
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
EVENT_TYPES$1.forEach(function (eventType) {
node.removeEventListener(eventType, _this3.props.onChange);
@@ -3346,7 +3356,7 @@
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(props) {
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
node.value = props.value;
}
}, {
@@ -3643,14 +3653,14 @@
key: 'componentDidMount',
value: function componentDidMount() {
get(Object.getPrototypeOf(SpeedDialItem.prototype), 'componentDidMount', this).call(this);
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
CustomElements.upgrade(node);
node.addEventListener('click', this.props.onClick);
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
- var node = ReactDOM.findDOMNode(this);
+ var node = ReactDOM__default.findDOMNode(this);
node.removeEventListener('click', this.props.onClick);
}
}]);
@@ -3862,7 +3872,7 @@
key: 'componentDidMount',
value: function componentDidMount() {
get(Object.getPrototypeOf(SplitterSide.prototype), 'componentDidMount', this).call(this);
- this.node = ReactDOM.findDOMNode(this);
+ this.node = ReactDOM__default.findDOMNode(this);
this.componentWillReceiveProps(this.props);
this.node.addEventListener('postopen', this.props.onOpen);
@@ -4318,7 +4328,7 @@
Util.convert(others, 'animationOptions', { fun: Util.animationOptionsConverter, newName: 'animation-options' });
- return React.createElement('ons-tabbar', _extends({}, this.props, { ref: 'tabbar', activeIndex: this.props.index, _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' : '') }, this.tabPages), React.createElement('div', { className: 'tab-bar ons-tab-bar__footer ons-tabbar-inner' + (this.props.position === 'top' ? ' tab-bar--top' : '') }, tabs.map(function (tab) {
+ return React.createElement('ons-tabbar', _extends({}, this.props, { ref: 'tabbar', activeIndex: this.props.index, _compiled: 'true' }), React.createElement('div', { className: 'ons-tab-bar__content tab-bar__content' + (this.props.position === 'top' ? ' tab-bar--top__content' : '') }, this.tabPages), React.createElement('div', { className: 'tab-bar ons-tab-bar__footer ons-tabbar-inner' + (this.props.position === 'top' ? ' tab-bar--top' : '') }, tabs.map(function (tab) {
return tab.tab;
})));
}
diff --git a/dist/react-onsenui.js.map b/dist/react-onsenui.js.map
index f0101f5..f39f7cf 100644
--- a/dist/react-onsenui.js.map
+++ b/dist/react-onsenui.js.map
@@ -1 +1 @@
-{"version":3,"file":null,"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/Modal.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('dialog-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\n this.renderPortal(this.props, false);\n }\n\n componentWillReceiveProps(newProps) {\n this.renderPortal(newProps, this.props.isOpen);\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(isShown) {\n CustomElements.upgrade(this.node.firstChild);\n if (this.props.isOpen) {\n if (!isShown) {\n this.show();\n }\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, isShown) {\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, isShown));\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\nimport ons from 'onsenui';\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 (!ons) {\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 ons._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.number]),\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.number]),\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 */\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' && node.value !== props.value) {\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