From f144ec5b716c13cecee72086d33a01eafab9f7db Mon Sep 17 00:00:00 2001 From: Pedro Nauck Date: Wed, 28 Jan 2015 01:24:05 -0200 Subject: [PATCH] change to v0.2.2 --- README.md | 2 +- bower.json | 2 +- dist/react-simpletabs.css | 2 +- dist/react-simpletabs.js | 18 +++++++++--------- dist/react-simpletabs.min.css | 2 +- dist/react-simpletabs.min.js | 4 ++-- package.json | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index b33df26..b1d67ac 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Installing this component is very easy and it has just one dependency: [React](h $ bower install --save react-simpletabs ``` -- Or if you want to [download the lastest release](https://github.com/pedronauck/react-simpletabs/archive/v0.2.1.zip) and put in your website, it will work too! +- Or if you want to [download the lastest release](https://github.com/pedronauck/react-simpletabs/archive/v0.2.2.zip) and put in your website, it will work too! **NOTICE:** You need just one thing to make the component work. Put the [base component style](./dist/react-simpletabs.css) at the `
` tag. If you don't wanna use the `.css` extension, you can get the `.styl` or `.scss` extension at the folder `./lib`. diff --git a/bower.json b/bower.json index b8e56c2..d27ffeb 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-simpletabs", - "version": "0.2.1", + "version": "0.2.2", "homepage": "https://github.com/pedronauck/react-simpletabs", "authors": [ "Pedro Nauck (https://github.com/pedronauck)" diff --git a/dist/react-simpletabs.css b/dist/react-simpletabs.css index a202401..5596dc3 100644 --- a/dist/react-simpletabs.css +++ b/dist/react-simpletabs.css @@ -1,7 +1,7 @@ /*! * * React Simpletabs - Just a simple tabs component built with React - * @version v0.2.1 + * @version v0.2.2 * @link https://github.com/pedronauck/react-simpletabs * @license MIT * @author Pedro Nauck (https://github.com/pedronauck) diff --git a/dist/react-simpletabs.js b/dist/react-simpletabs.js index b3bb345..3312b4b 100644 --- a/dist/react-simpletabs.js +++ b/dist/react-simpletabs.js @@ -1,7 +1,7 @@ /*! * * React Simpletabs - Just a simple tabs component built with React - * @version v0.2.1 + * @version v0.2.2 * @link https://github.com/pedronauck/react-simpletabs * @license MIT * @author Pedro Nauck (https://github.com/pedronauck) @@ -95,7 +95,7 @@ return /******/ (function(modules) { // webpackBootstrap var panelsList = this._getPanels(); return ( - React.DOM.div({className: "tabs"}, + React.createElement("div", {className: "tabs"}, menuItems, panelsList ) @@ -138,15 +138,15 @@ return /******/ (function(modules) { // webpackBootstrap }); return ( - React.DOM.li({ref: ref, key: index, className: classes}, - React.DOM.a({href: "#", 'data-tab-id': index + 1, onClick: this.setActive}, title) + React.createElement("li", {ref: ref, key: index, className: classes}, + React.createElement("a", {href: "#", "data-tab-id": index + 1, onClick: this.setActive}, title) ) ); }.bind(this)); return ( - React.DOM.nav({className: "tabs-navigation"}, - React.DOM.ul({className: "tabs-menu"}, $menuItems) + React.createElement("nav", {className: "tabs-navigation"}, + React.createElement("ul", {className: "tabs-menu"}, $menuItems) ) ); }, @@ -159,12 +159,12 @@ return /******/ (function(modules) { // webpackBootstrap }); return ( - React.DOM.article({ref: ref, key: index, className: classes}, $panel) + React.createElement("article", {ref: ref, key: index, className: classes}, $panel) ); }.bind(this)); return ( - React.DOM.section({className: "tabs-panels"}, $panels) + React.createElement("section", {className: "tabs-panels"}, $panels) ); } }); @@ -179,7 +179,7 @@ return /******/ (function(modules) { // webpackBootstrap ]).isRequired }, render:function () { - return React.DOM.div(null, this.props.children); + return React.createElement("div", null, this.props.children); } }); diff --git a/dist/react-simpletabs.min.css b/dist/react-simpletabs.min.css index e0263bf..6a748c0 100644 --- a/dist/react-simpletabs.min.css +++ b/dist/react-simpletabs.min.css @@ -1,7 +1,7 @@ /*! * * React Simpletabs - Just a simple tabs component built with React - * @version v0.2.1 + * @version v0.2.2 * @link https://github.com/pedronauck/react-simpletabs * @license MIT * @author Pedro Nauck (https://github.com/pedronauck) diff --git a/dist/react-simpletabs.min.js b/dist/react-simpletabs.min.js index 61a0924..ba864f5 100644 --- a/dist/react-simpletabs.min.js +++ b/dist/react-simpletabs.min.js @@ -1,10 +1,10 @@ /*! * * React Simpletabs - Just a simple tabs component built with React - * @version v0.2.1 + * @version v0.2.2 * @link https://github.com/pedronauck/react-simpletabs * @license MIT * @author Pedro Nauck (https://github.com/pedronauck) * */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactSimpleTabs=t(require("react")):e.ReactSimpleTabs=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var s=r[n]={exports:{},id:n,loaded:!1};return e[n].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";var n=r(1),s=r(2);r(3);var a=n.createClass({displayName:"Tabs",propTypes:{tabActive:n.PropTypes.number,onBeforeChange:n.PropTypes.func,onAfterChange:n.PropTypes.func,children:n.PropTypes.oneOfType([n.PropTypes.array,n.PropTypes.element]).isRequired},getDefaultProps:function(){return{tabActive:1}},getInitialState:function(){return{tabActive:this.props.tabActive}},render:function(){var e=this._getMenuItems(),t=this._getPanels();return n.DOM.div({className:"tabs"},e,t)},setActive:function(e){var t=parseInt(e.target.getAttribute("data-tab-id")),r=this.props.onAfterChange,n=this.props.onBeforeChange,s=this.refs["tab-panel-"+t],a=this.refs["tab-menu-"+t];n&&n(t,s,a),this.setState({tabActive:t},function(){r&&r(t,s,a)}),e.preventDefault()},_getMenuItems:function(){if(!this.props.children)throw new Error("Tabs must contain at least one Tabs.Panel");Array.isArray(this.props.children)||(this.props.children=[this.props.children]);var e=this.props.children.map(function(e,t){var r="tab-menu-${index + 1}",a=e.props.title,i=s({"tabs-menu-item":!0,"is-active":this.state.tabActive===t+1});return n.DOM.li({ref:r,key:t,className:i},n.DOM.a({href:"#","data-tab-id":t+1,onClick:this.setActive},a))}.bind(this));return n.DOM.nav({className:"tabs-navigation"},n.DOM.ul({className:"tabs-menu"},e))},_getPanels:function(){var e=this.props.children.map(function(e,t){var r="tab-panel-${index + 1}",a=s({"tabs-panel":!0,"is-active":this.state.tabActive===t+1});return n.DOM.article({ref:r,key:t,className:a},e)}.bind(this));return n.DOM.section({className:"tabs-panels"},e)}});a.Panel=n.createClass({displayName:"Panel",propTypes:{title:n.PropTypes.string.isRequired,children:n.PropTypes.oneOfType([n.PropTypes.array,n.PropTypes.component]).isRequired},render:function(){return n.DOM.div(null,this.props.children)}}),e.exports=a},function(t){t.exports=e},function(e){e.exports=function(e){return"object"!=typeof e?Array.prototype.join.call(arguments," "):Object.keys(e).filter(function(t){return e[t]}).join(" ")}},function(){}])}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactSimpleTabs=t(require("react")):e.ReactSimpleTabs=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";var n=r(1),a=r(2);r(3);var s=n.createClass({displayName:"Tabs",propTypes:{tabActive:n.PropTypes.number,onBeforeChange:n.PropTypes.func,onAfterChange:n.PropTypes.func,children:n.PropTypes.oneOfType([n.PropTypes.array,n.PropTypes.element]).isRequired},getDefaultProps:function(){return{tabActive:1}},getInitialState:function(){return{tabActive:this.props.tabActive}},render:function(){var e=this._getMenuItems(),t=this._getPanels();return n.createElement("div",{className:"tabs"},e,t)},setActive:function(e){var t=parseInt(e.target.getAttribute("data-tab-id")),r=this.props.onAfterChange,n=this.props.onBeforeChange,a=this.refs["tab-panel-"+t],s=this.refs["tab-menu-"+t];n&&n(t,a,s),this.setState({tabActive:t},function(){r&&r(t,a,s)}),e.preventDefault()},_getMenuItems:function(){if(!this.props.children)throw new Error("Tabs must contain at least one Tabs.Panel");Array.isArray(this.props.children)||(this.props.children=[this.props.children]);var e=this.props.children.map(function(e,t){var r="tab-menu-${index + 1}",s=e.props.title,i=a({"tabs-menu-item":!0,"is-active":this.state.tabActive===t+1});return n.createElement("li",{ref:r,key:t,className:i},n.createElement("a",{href:"#","data-tab-id":t+1,onClick:this.setActive},s))}.bind(this));return n.createElement("nav",{className:"tabs-navigation"},n.createElement("ul",{className:"tabs-menu"},e))},_getPanels:function(){var e=this.props.children.map(function(e,t){var r="tab-panel-${index + 1}",s=a({"tabs-panel":!0,"is-active":this.state.tabActive===t+1});return n.createElement("article",{ref:r,key:t,className:s},e)}.bind(this));return n.createElement("section",{className:"tabs-panels"},e)}});s.Panel=n.createClass({displayName:"Panel",propTypes:{title:n.PropTypes.string.isRequired,children:n.PropTypes.oneOfType([n.PropTypes.array,n.PropTypes.component]).isRequired},render:function(){return n.createElement("div",null,this.props.children)}}),e.exports=s},function(t){t.exports=e},function(e){e.exports=function(e){return"object"!=typeof e?Array.prototype.join.call(arguments," "):Object.keys(e).filter(function(t){return e[t]}).join(" ")}},function(){}])}); \ No newline at end of file diff --git a/package.json b/package.json index 2b385d2..18e8838 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-simpletabs", - "version": "0.2.1", + "version": "0.2.2", "description": "Just a simple tabs component built with React", "author": { "name": "Pedro Nauck",