Skip to content

Commit 280b804

Browse files
committed
wip
1 parent 1d2810d commit 280b804

File tree

352 files changed

+15651
-337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

352 files changed

+15651
-337
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Now you are ready to use the imported reactstrap components within your componen
4747

4848
### CDN
4949

50-
Reactstrap can be included directly in your application's bundle or excluded during compilation and linked directly to a CDN.
50+
Reactstrap can be included directly in your application's bundle or excluded during compilation and linked directly to a CDN.
5151

5252
```html
5353
https://cdnjs.cloudflare.com/ajax/libs/reactstrap/4.8.0/reactstrap.min.js
@@ -110,7 +110,7 @@ https://reactstrap.github.io
110110
Install dependencies:
111111

112112
```sh
113-
npm install
113+
npm run lerna:bootstrap
114114
```
115115

116116
Run examples at [http://localhost:8080/](http://localhost:8080/) with webpack dev server:

docs/static/docs.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ pre[class*="language-"] {
223223
/* Code blocks */
224224
pre[class*="language-"] {
225225
padding: 1em;
226-
margin: 1.5em 0;
227226
overflow: auto;
228227
}
229228

lerna.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"lerna": "2.0.0-rc.5",
3+
"packages": [
4+
"packages/*"
5+
],
6+
"version": "0.0.0",
7+
"npmClient": "yarn"
8+
}

package.json

Lines changed: 12 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
{
2-
"name": "reactstrap",
2+
"name": "reactstrap-lerna",
33
"version": "4.8.0",
44
"description": "React Bootstrap 4 components",
5-
"main": "dist/reactstrap.cjs.js",
6-
"jsnext:main": "dist/reactstrap.es.js",
7-
"module": "dist/reactstrap.es.js",
5+
"private": true,
86
"scripts": {
9-
"report-coverage": "coveralls < ./coverage/lcov.info",
10-
"test": "BABEL_ENV=test react-scripts test --env=jsdom",
11-
"cover": "npm test -- --coverage",
12-
"start": "BABEL_ENV=webpack webpack-dev-server --config ./webpack.dev.config.js --watch",
13-
"build-docs": "cross-env WEBPACK_BUILD=production webpack --config ./webpack.dev.config.js --progress --colors",
14-
"build": "rollup -c",
15-
"prebuild": "BABEL_ENV=lib-dir babel src --out-dir lib --ignore src/__tests__/",
16-
"create-release": "npm test && sh ./scripts/release",
17-
"publish-release": "npm test && sh ./scripts/publish",
18-
"lint": "eslint src"
7+
"report-coverage": "lerna run report-coverage",
8+
"test": "lerna run test",
9+
"cover": "lerna run cover",
10+
"start": "lerna run start",
11+
"build": "lerna run build",
12+
"create-release": "lerna run test && sh ./scripts/release",
13+
"publish-release": "lerna run test && sh ./scripts/publish",
14+
"lint": "lerna run lint",
15+
"lerna:bootstrap": "lerna bootstrap --npm-client=yarn"
1916
},
2017
"repository": {
2118
"type": "git",
@@ -85,65 +82,7 @@
8582
"url": "https://github.com/reactstrap/reactstrap/issues"
8683
},
8784
"homepage": "https://github.com/reactstrap/reactstrap#readme",
88-
"dependencies": {
89-
"classnames": "^2.2.3",
90-
"lodash.isfunction": "^3.0.8",
91-
"lodash.isobject": "^3.0.2",
92-
"lodash.tonumber": "^4.0.3",
93-
"prop-types": "^15.5.8",
94-
"reactstrap-tether": "1.3.4"
95-
},
96-
"peerDependencies": {
97-
"react": "^0.14.9 || ^15.3.0",
98-
"react-dom": "^0.14.9 || ^15.3.0",
99-
"react-transition-group": "^1.1.2"
100-
},
10185
"devDependencies": {
102-
"babel-cli": "^6.14.0",
103-
"babel-loader": "^6.2.2",
104-
"babel-plugin-transform-object-rest-spread": "^6.23.0",
105-
"babel-preset-es2015-rollup": "^3.0.0",
106-
"babel-preset-react": "^6.11.1",
107-
"babel-preset-react-app": "^0.2.1",
108-
"bootstrap": "^4.0.0-alpha.6",
109-
"clean-webpack-plugin": "^0.1.8",
110-
"conventional-changelog-cli": "^1.1.1",
111-
"conventional-recommended-bump": "^0.3.0",
112-
"copy-webpack-plugin": "^3.0.1",
113-
"coveralls": "^2.11.12",
114-
"cross-env": "^2.0.0",
115-
"css-loader": "^0.25.0",
116-
"ejs": "^2.5.1",
117-
"enzyme": "^2.8.2",
118-
"eslint": "^3.2.2",
119-
"eslint-config-airbnb": "^10.0.0",
120-
"eslint-plugin-import": "^1.12.0",
121-
"eslint-plugin-jsx-a11y": "^2.0.1",
122-
"eslint-plugin-react": "^6.0.0",
123-
"eslint-plugin-standard": "^2.0.0",
124-
"extract-text-webpack-plugin": "^1.0.1",
125-
"history": "^3.0.0",
126-
"holderjs": "^2.9.3",
127-
"json-loader": "^0.5.4",
128-
"raw-loader": "^0.5.1",
129-
"react": "^15.3.0",
130-
"react-addons-test-utils": "^15.3.0",
131-
"react-dom": "^15.3.0",
132-
"react-helmet": "^5.0.3",
133-
"react-prism": "^4.1.0",
134-
"react-router": "^2.6.1",
135-
"react-scripts": "^0.9.5",
136-
"react-test-renderer": "^15.5.4",
137-
"react-transition-group": "^1.1.2",
138-
"rollup": "^0.43.0",
139-
"rollup-plugin-babel": "^2.7.1",
140-
"rollup-plugin-babili": "^3.1.0",
141-
"rollup-plugin-commonjs": "^8.0.2",
142-
"rollup-plugin-node-resolve": "^3.0.0",
143-
"rollup-plugin-replace": "^1.1.1",
144-
"static-site-generator-webpack-plugin": "^2.0.1",
145-
"style-loader": "^0.13.1",
146-
"webpack": "^1.12.13",
147-
"webpack-dev-server": "^1.14.1"
86+
"lerna": "2.0.0-rc.5"
14887
}
14988
}
File renamed without changes.

packages/reactstrap/lib/Alert.js

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
'use strict';
2+
3+
Object.defineProperty(exports, "__esModule", {
4+
value: true
5+
});
6+
7+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
8+
9+
var _react = require('react');
10+
11+
var _react2 = _interopRequireDefault(_react);
12+
13+
var _propTypes = require('prop-types');
14+
15+
var _propTypes2 = _interopRequireDefault(_propTypes);
16+
17+
var _classnames = require('classnames');
18+
19+
var _classnames2 = _interopRequireDefault(_classnames);
20+
21+
var _reactTransitionGroup = require('react-transition-group');
22+
23+
var _utils = require('./utils');
24+
25+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26+
27+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
28+
29+
var FirstChild = function FirstChild(_ref) {
30+
var children = _ref.children;
31+
return _react2.default.Children.toArray(children)[0] || null;
32+
};
33+
34+
var propTypes = {
35+
children: _propTypes2.default.node,
36+
className: _propTypes2.default.string,
37+
closeClassName: _propTypes2.default.string,
38+
cssModule: _propTypes2.default.object,
39+
color: _propTypes2.default.string,
40+
isOpen: _propTypes2.default.bool,
41+
toggle: _propTypes2.default.func,
42+
tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]),
43+
transitionAppearTimeout: _propTypes2.default.number,
44+
transitionEnterTimeout: _propTypes2.default.number,
45+
transitionLeaveTimeout: _propTypes2.default.number
46+
};
47+
48+
var defaultProps = {
49+
color: 'success',
50+
isOpen: true,
51+
tag: 'div',
52+
transitionAppearTimeout: 150,
53+
transitionEnterTimeout: 150,
54+
transitionLeaveTimeout: 150
55+
};
56+
57+
var Alert = function Alert(props) {
58+
var className = props.className,
59+
closeClassName = props.closeClassName,
60+
cssModule = props.cssModule,
61+
Tag = props.tag,
62+
color = props.color,
63+
isOpen = props.isOpen,
64+
toggle = props.toggle,
65+
children = props.children,
66+
transitionAppearTimeout = props.transitionAppearTimeout,
67+
transitionEnterTimeout = props.transitionEnterTimeout,
68+
transitionLeaveTimeout = props.transitionLeaveTimeout,
69+
attributes = _objectWithoutProperties(props, ['className', 'closeClassName', 'cssModule', 'tag', 'color', 'isOpen', 'toggle', 'children', 'transitionAppearTimeout', 'transitionEnterTimeout', 'transitionLeaveTimeout']);
70+
71+
var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'alert', 'alert-' + color, { 'alert-dismissible': toggle }), cssModule);
72+
73+
var closeClasses = (0, _utils.mapToCssModules)((0, _classnames2.default)('close', closeClassName), cssModule);
74+
75+
var alert = _react2.default.createElement(
76+
Tag,
77+
_extends({}, attributes, { className: classes, role: 'alert' }),
78+
toggle ? _react2.default.createElement(
79+
'button',
80+
{ type: 'button', className: closeClasses, 'aria-label': 'Close', onClick: toggle },
81+
_react2.default.createElement(
82+
'span',
83+
{ 'aria-hidden': 'true' },
84+
'\xD7'
85+
)
86+
) : null,
87+
children
88+
);
89+
90+
return _react2.default.createElement(
91+
_reactTransitionGroup.CSSTransitionGroup,
92+
{
93+
component: FirstChild,
94+
transitionName: {
95+
appear: 'fade',
96+
appearActive: 'show',
97+
enter: 'fade',
98+
enterActive: 'show',
99+
leave: 'fade',
100+
leaveActive: 'out'
101+
},
102+
transitionAppear: transitionAppearTimeout > 0,
103+
transitionAppearTimeout: transitionAppearTimeout,
104+
transitionEnter: transitionEnterTimeout > 0,
105+
transitionEnterTimeout: transitionEnterTimeout,
106+
transitionLeave: transitionLeaveTimeout > 0,
107+
transitionLeaveTimeout: transitionLeaveTimeout
108+
},
109+
isOpen ? alert : null
110+
);
111+
};
112+
113+
Alert.propTypes = propTypes;
114+
Alert.defaultProps = defaultProps;
115+
116+
exports.default = Alert;

packages/reactstrap/lib/Badge.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
'use strict';
2+
3+
Object.defineProperty(exports, "__esModule", {
4+
value: true
5+
});
6+
7+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
8+
9+
var _react = require('react');
10+
11+
var _react2 = _interopRequireDefault(_react);
12+
13+
var _propTypes = require('prop-types');
14+
15+
var _propTypes2 = _interopRequireDefault(_propTypes);
16+
17+
var _classnames = require('classnames');
18+
19+
var _classnames2 = _interopRequireDefault(_classnames);
20+
21+
var _utils = require('./utils');
22+
23+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24+
25+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
26+
27+
var propTypes = {
28+
color: _propTypes2.default.string,
29+
pill: _propTypes2.default.bool,
30+
tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]),
31+
children: _propTypes2.default.node,
32+
className: _propTypes2.default.string,
33+
cssModule: _propTypes2.default.object
34+
};
35+
36+
var defaultProps = {
37+
color: 'default',
38+
pill: false,
39+
tag: 'span'
40+
};
41+
42+
var Badge = function Badge(props) {
43+
var className = props.className,
44+
cssModule = props.cssModule,
45+
color = props.color,
46+
pill = props.pill,
47+
Tag = props.tag,
48+
attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'color', 'pill', 'tag']);
49+
50+
var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'badge', 'badge-' + color, pill ? 'badge-pill' : false), cssModule);
51+
52+
return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
53+
};
54+
55+
Badge.propTypes = propTypes;
56+
Badge.defaultProps = defaultProps;
57+
58+
exports.default = Badge;

packages/reactstrap/lib/Breadcrumb.js

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
'use strict';
2+
3+
Object.defineProperty(exports, "__esModule", {
4+
value: true
5+
});
6+
7+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
8+
9+
var _react = require('react');
10+
11+
var _react2 = _interopRequireDefault(_react);
12+
13+
var _propTypes = require('prop-types');
14+
15+
var _propTypes2 = _interopRequireDefault(_propTypes);
16+
17+
var _classnames = require('classnames');
18+
19+
var _classnames2 = _interopRequireDefault(_classnames);
20+
21+
var _utils = require('./utils');
22+
23+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24+
25+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
26+
27+
var propTypes = {
28+
tag: _propTypes2.default.string,
29+
className: _propTypes2.default.string,
30+
cssModule: _propTypes2.default.object
31+
};
32+
33+
var defaultProps = {
34+
tag: 'ol'
35+
};
36+
37+
var Breadcrumb = function Breadcrumb(props) {
38+
var className = props.className,
39+
cssModule = props.cssModule,
40+
Tag = props.tag,
41+
attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'tag']);
42+
43+
var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, 'breadcrumb'), cssModule);
44+
45+
return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
46+
};
47+
48+
Breadcrumb.propTypes = propTypes;
49+
Breadcrumb.defaultProps = defaultProps;
50+
51+
exports.default = Breadcrumb;

0 commit comments

Comments
 (0)