Skip to content

Commit

Permalink
build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Mar 14, 2015
1 parent dc3509e commit 1f1c687
Show file tree
Hide file tree
Showing 26 changed files with 126 additions and 25,776 deletions.
Binary file removed dist/css/loader-big.gif
Binary file not shown.
Binary file removed dist/css/loading.gif
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/css/react-widgets.css

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions dist/react-widgets.js

Large diffs are not rendered by default.

1,537 changes: 1 addition & 1,536 deletions docs/public/docs.css

Large diffs are not rendered by default.

24,080 changes: 33 additions & 24,047 deletions docs/public/docs.js

Large diffs are not rendered by default.

18 changes: 7 additions & 11 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ var gulp = require('gulp')
, plumber = require('gulp-plumber')
, configs = require('./webpack.configs');


gulp.task('dist-clean', function(cb){
del('./dist', cb);
del('./dist/*', cb);
})

gulp.task('lib-clean', function(cb){
del('./lib', cb);
del('./lib/*', cb);
})

gulp.task('lib-assets', [ 'lib-clean' ], function(){
Expand Down Expand Up @@ -50,7 +49,7 @@ gulp.task('lib-compile', [ 'lib-clean' ], function(){

gulp.task('lib', [ 'lib-clean', 'lib-assets', 'lib-compile'])

gulp.task('dist-assets', ['dist-clean'], function(){
gulp.task('dist-assets', function(){

return merge(
gulp.src('./src/less/react-widgets.less')
Expand All @@ -65,10 +64,9 @@ gulp.task('dist-assets', ['dist-clean'], function(){
);
})

gulp.task('dist-build', function(cb) {
del('./dist/*.js', function(){
webpack(configs.browser, cb);
});
gulp.task('dist-build', ['lib', 'dist-assets'], function(cb) {
webpack(configs.browser, cb);

})

gulp.task('test-build', function(cb) {
Expand Down Expand Up @@ -116,6 +114,4 @@ gulp.task('dev-docs', function(cb) {
});
})

gulp.task('dist', ['dist-assets', 'dist-build'])

gulp.task('release', [ 'lib', 'dist', 'docs']);
gulp.task('release', [ 'lib', 'dist-build', 'docs']);
2 changes: 1 addition & 1 deletion lib/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ var Calendar = React.createClass({

this.setTimeout("focus", function () {

if (focused) _this.getDOMNode().focus();
if (focused) compat.findDOMNode(_this).focus();

if (focused !== _this.state.focused) {
_this.notify(focused ? "onFocus" : "onBlur", e);
Expand Down
11 changes: 6 additions & 5 deletions lib/Combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ var React = require("react"),
Popup = require("./Popup"),
Btn = require("./WidgetButton"),
Input = require("./ComboboxInput"),
createUncontrolledWidget = require("uncontrollable"),
compat = require("./util/compat"),
CustomPropTypes = require("./util/propTypes"),
PlainList = require("./List"),
GroupableList = require("./ListGroupable"),
validateList = require("./util/validateListInterface");
validateList = require("./util/validateListInterface"),
createUncontrolledWidget = require("uncontrollable");

var propTypes = {
//-- controlled props -----------
Expand Down Expand Up @@ -190,13 +191,13 @@ var ComboBox = React.createClass({
onKeyDown: this._inputKeyDown }),
React.createElement(
Popup,
babelHelpers._extends({}, _.pick(this.props, Object.keys(Popup.type.propTypes)), {
babelHelpers._extends({}, _.pick(this.props, Object.keys(compat.type(Popup).propTypes)), {
onRequestClose: this.close }),
React.createElement(
"div",
null,
React.createElement(List, babelHelpers._extends({ ref: "list"
}, _.pick(this.props, Object.keys(List.type.propTypes)), {
}, _.pick(this.props, Object.keys(compat.type(List).propTypes)), {
id: listID,
optID: optID,
"aria-hidden": !this.props.open,
Expand Down Expand Up @@ -289,7 +290,7 @@ var ComboBox = React.createClass({
this.notify("onKeyDown", [e]);

function select(item, fromList) {
if (!item) return self.change(self.refs.input.getDOMNode().value, false);
if (!item) return self.change(compat.findDOMNode(self.refs.input).value, false);

self.refs.input.accept(true); //removes caret

Expand Down
11 changes: 6 additions & 5 deletions lib/ComboboxInput.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"use strict";
var babelHelpers = require("./util/babelHelpers.js");
var React = require("react"),
caretPos = require("./util/caret");
caretPos = require("./util/caret"),
compat = require("./util/compat");

module.exports = React.createClass({
displayName: "exports",
Expand All @@ -12,7 +13,7 @@ module.exports = React.createClass({
},

componentDidUpdate: function () {
var input = this.getDOMNode(),
var input = compat.findDOMNode(this),
val = this.props.value;

if (this.isSuggesting()) {
Expand Down Expand Up @@ -48,11 +49,11 @@ module.exports = React.createClass({
},

accept: function (removeCaret) {
var val = this.getDOMNode().value || "",
var val = compat.findDOMNode(this).value || "",
end = val.length;

this._last = null;
removeCaret && caretPos(this.getDOMNode(), end, end);
removeCaret && caretPos(compat.findDOMNode(this), end, end);
},

_change: function (e) {
Expand All @@ -62,6 +63,6 @@ module.exports = React.createClass({
},

focus: function () {
this.getDOMNode().focus();
compat.findDOMNode(this).focus();
}
});
3 changes: 2 additions & 1 deletion lib/DateInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var babelHelpers = require("./util/babelHelpers.js");
var React = require("react"),
cx = require("classnames"),
dates = require("./util/dates"),
compat = require("./util/compat"),
CustomPropTypes = require("./util/propTypes");

module.exports = React.createClass({
Expand Down Expand Up @@ -65,7 +66,7 @@ module.exports = React.createClass({
},

focus: function () {
this.getDOMNode().focus();
compat.findDOMNode(this).focus();
}

});
Expand Down
2 changes: 1 addition & 1 deletion lib/DateTimePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ var DateTimePicker = React.createClass({

this.setTimeout("focus", function () {

if (focused) input.getDOMNode().focus();else _this.close();
if (focused) compat.findDOMNode(input).focus();else _this.close();

if (focused !== _this.state.focused) {
_this.notify(focused ? "onFocus" : "onBlur", e);
Expand Down
11 changes: 6 additions & 5 deletions lib/DropdownList.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ var babelHelpers = require("./util/babelHelpers.js");
var React = require("react"),
_ = require("./util/_"),
cx = require("classnames"),
createUncontrolledWidget = require("uncontrollable"),
compat = require("./util/compat"),
CustomPropTypes = require("./util/propTypes"),
Popup = require("./Popup"),
PlainList = require("./List"),
GroupableList = require("./ListGroupable"),
validateList = require("./util/validateListInterface");
validateList = require("./util/validateListInterface"),
createUncontrolledWidget = require("uncontrollable");

var propTypes = {
//-- controlled props -----------
Expand Down Expand Up @@ -146,13 +147,13 @@ var DropdownList = React.createClass({
),
React.createElement(
Popup,
babelHelpers._extends({}, _.pick(this.props, Object.keys(Popup.type.propTypes)), {
babelHelpers._extends({}, _.pick(this.props, Object.keys(compat.type(Popup).propTypes)), {
onRequestClose: this.close }),
React.createElement(
"div",
null,
React.createElement(List, babelHelpers._extends({ ref: "list"
}, _.pick(this.props, Object.keys(List.type.propTypes)), {
}, _.pick(this.props, Object.keys(compat.type(List).propTypes)), {
optID: optID,
"aria-hidden": !this.props.open,
selected: this.state.selectedItem,
Expand All @@ -169,7 +170,7 @@ var DropdownList = React.createClass({

this.setTimeout("focus", function () {

if (focused) _this.getDOMNode().focus();else _this.close();
if (focused) compat.findDOMNode(_this).focus();else _this.close();

if (focused !== _this.state.focused) {
_this.notify(focused ? "onFocus" : "onBlur", e);
Expand Down
3 changes: 2 additions & 1 deletion lib/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
var babelHelpers = require("./util/babelHelpers.js");
var React = require("react"),
CustomPropTypes = require("./util/propTypes"),
compat = require("./util/compat"),
cx = require("classnames"),
_ = require("./util/_");

Expand Down Expand Up @@ -101,7 +102,7 @@ module.exports = React.createClass({
},

_setScrollPosition: function () {
var list = this.getDOMNode(),
var list = compat.findDOMNode(this),
idx = this._data().indexOf(this.props.focused),
selected = list.children[idx];

Expand Down
5 changes: 3 additions & 2 deletions lib/ListGroupable.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
var babelHelpers = require("./util/babelHelpers.js");
var React = require("react"),
CustomPropTypes = require("./util/propTypes"),
compat = require("./util/compat"),
cx = require("classnames"),
_ = require("./util/_");

Expand Down Expand Up @@ -181,11 +182,11 @@ module.exports = React.createClass({

if (!selected) return;

this.notify("onMove", [selected, this.getDOMNode()]);
this.notify("onMove", [selected, compat.findDOMNode(this)]);
},

getItemDOMNode: function (item) {
var list = this.getDOMNode(),
var list = compat.findDOMNode(this),
groups = this.state.groups,
idx = -1,
itemIdx,
Expand Down
5 changes: 3 additions & 2 deletions lib/Multiselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var babelHelpers = require("./util/babelHelpers.js");
var React = require("react"),
cx = require("classnames"),
_ = require("./util/_"),
compat = require("./util/compat"),
SelectInput = require("./MultiselectInput"),
TagList = require("./MultiselectTagList"),
Popup = require("./Popup"),
Expand Down Expand Up @@ -128,7 +129,7 @@ var Multiselect = React.createClass({
var dropUp = this.props.dropUp;

var List = this.props.listComponent || this.props.groupBy && GroupableList || PlainList;
var listProps = _.pick(this.props, Object.keys(List.type.propTypes));
var listProps = _.pick(this.props, Object.keys(compat.type(List).propTypes));

return React.createElement(
"div",
Expand Down Expand Up @@ -179,7 +180,7 @@ var Multiselect = React.createClass({
),
React.createElement(
Popup,
babelHelpers._extends({}, _.pick(this.props, Object.keys(Popup.type.propTypes)), {
babelHelpers._extends({}, _.pick(this.props, Object.keys(compat.type(Popup).propTypes)), {
onRequestClose: this.close }),
React.createElement(
"div",
Expand Down
5 changes: 3 additions & 2 deletions lib/MultiselectInput.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";
var babelHelpers = require("./util/babelHelpers.js");
var React = require("react");
var React = require("react"),
compat = require("./util/compat");

module.exports = React.createClass({

Expand Down Expand Up @@ -35,7 +36,7 @@ module.exports = React.createClass({
},

focus: function () {
this.getDOMNode().focus();
compat.findDOMNode(this).focus();
}

});
3 changes: 2 additions & 1 deletion lib/NumberPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var React = require("react"),
cx = require("classnames"),
_ = require("./util/_") //omit
,
compat = require("./util/compat"),
CustomPropTypes = require("./util/propTypes"),
createUncontrolledWidget = require("uncontrollable"),
directions = require("./util/constants").directions,
Expand Down Expand Up @@ -186,7 +187,7 @@ var NumberPicker = React.createClass({
var _this = this;

this.setTimeout("focus", function () {
var el = _this.refs.input.getDOMNode();
var el = compat.findDOMNode(_this.refs.input);

focused && el.focus();

Expand Down
25 changes: 13 additions & 12 deletions lib/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
var babelHelpers = require("./util/babelHelpers.js");
var React = require("react"),
$ = require("./util/dom"),
cx = require("classnames");
cn = require("classnames"),
compat = require("./util/compat");

var PopupContent = React.createClass({
displayName: "PopupContent",

render: function () {
var Content = React.Children.only(this.props.children);
var child = React.Children.only(this.props.children);

Content.props.className = (Content.props.className || "") + " rw-popup rw-widget";

return Content;
return compat.cloneElement(child, {
className: cn(child.props.className, "rw-popup rw-widget")
});
}
});

Expand Down Expand Up @@ -67,7 +68,7 @@ module.exports = React.createClass({

return React.createElement(
"div",
babelHelpers._extends({}, props, { className: cx(className, "rw-popup-container", { "rw-dropup": dropUp }) }),
babelHelpers._extends({}, props, { className: cn(className, "rw-popup-container", { "rw-dropup": dropUp }) }),
React.createElement(
PopupContent,
{ ref: "content" },
Expand All @@ -77,8 +78,8 @@ module.exports = React.createClass({
},

dimensions: function () {
var el = this.getDOMNode(),
content = this.refs.content.getDOMNode(),
var el = compat.findDOMNode(this),
content = compat.findDOMNode(this.refs.content),
margin = parseInt($.css(content, "margin-top"), 10) + parseInt($.css(content, "margin-bottom"), 10);

el.style.display = "block";
Expand All @@ -87,8 +88,8 @@ module.exports = React.createClass({

open: function () {
var self = this,
anim = this.getDOMNode(),
el = this.refs.content.getDOMNode();
anim = compat.findDOMNode(this),
el = compat.findDOMNode(this.refs.content);

this.ORGINAL_POSITION = $.css(el, "position");

Expand All @@ -114,8 +115,8 @@ module.exports = React.createClass({

close: function (dur) {
var self = this,
el = this.refs.content.getDOMNode(),
anim = this.getDOMNode();
el = compat.findDOMNode(this.refs.content),
anim = compat.findDOMNode(this);

this.ORGINAL_POSITION = $.css(el, "position");

Expand Down
7 changes: 4 additions & 3 deletions lib/ReplaceTransitionGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

var React = require("react"),
$ = require("./util/dom"),
compat = require("./util/compat"),
_ = require("./util/_");

module.exports = React.createClass({
Expand Down Expand Up @@ -82,8 +83,8 @@ module.exports = React.createClass({
var entering = this.entering,
leaving = this.leaving,
first = this.refs[key(entering) || key(leaving)],
node = this.getDOMNode(),
el = first && first.getDOMNode();
node = compat.findDOMNode(this),
el = first && compat.findDOMNode(first);

if (el) $.css(node, {
overflow: "hidden",
Expand Down Expand Up @@ -114,7 +115,7 @@ module.exports = React.createClass({

if (this.isTransitioning()) return;

if (this.isMounted()) $.css(this.getDOMNode(), { overflow: "visible", height: "", width: "" });
if (this.isMounted()) $.css(compat.findDOMNode(this), { overflow: "visible", height: "", width: "" });

this.props.onAnimate();
},
Expand Down
Loading

0 comments on commit 1f1c687

Please sign in to comment.