Skip to content

Commit 9e3b039

Browse files
committed
Update to 1.0.6
- update: react to 16.1.1 - update: reactstrap to 5.0.0-alpha.4 - refactor: deprecated reactstrap NavDropdown change to Dropdown with nav prop - refactor: use prop bsSize instead of size to bootstrap's input sizing - update: dependencies
1 parent e8b83ef commit 9e3b039

File tree

13 files changed

+168
-114
lines changed

13 files changed

+168
-114
lines changed

CHANGELOG.md

+20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
## [react](./REACT.md) version `changelog`
22

3+
###### `v1.0.6`
4+
5+
- update: react to `^16.1.1`
6+
- update: reactstrap to `^5.0.0-alpha.4`
7+
- refactor: deprecated reactstrap `NavDropdown` change to `Dropdown` with `nav` prop
8+
- refactor: use prop `bsSize` instead of the `size` to bootstrap's input sizing
9+
- update: dependencies
10+
11+
###### `v1.0.5`
12+
- feature: Sidebar add divider.class
13+
- refactor: Sidebar
14+
- moved to react: `^16.1.0`
15+
- chore: dependencies update
16+
17+
###### `v1.0.4`
18+
- refactor: scss
19+
20+
###### `v1.0.3`
21+
- update: bootstrap to `4.0.0-beta.2`
22+
323
###### `v1.0.2`
424
- `HeaderDropdown` component example extracted out of `Header`
525

React_Full_Project/package.json

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
{
22
"name": "@coreui/react",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Open Source Bootstrap Admin Template",
55
"author": "Łukasz Holeczek",
66
"homepage": "http://coreui.io",
77
"copyright": "Copyright 2017 creativeLabs Łukasz Holeczek",
88
"license": "MIT",
99
"private": true,
1010
"devDependencies": {
11-
"babel-core": "^6.26.0",
12-
"babel-loader": "^7.1.2",
13-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
14-
"babel-preset-env": "^1.6.0",
15-
"babel-preset-react": "^6.24.1",
16-
"copy-webpack-plugin": "^4.1.1",
17-
"css-hot-loader": "^1.3.2",
18-
"css-loader": "^0.28.7",
19-
"extract-text-webpack-plugin": "^3.0.1",
20-
"file-loader": "^1.1.5",
21-
"html-loader": "^0.5.1",
22-
"html-webpack-plugin": "^2.30.1",
23-
"node-sass": "^4.5.3",
24-
"rimraf": "^2.6.2",
25-
"sass-loader": "^6.0.6",
26-
"source-list-map": "^2.0.0",
27-
"style-loader": "^0.19.0",
28-
"uglify-js": "^3.1.4",
29-
"url-loader": "^0.6.2",
30-
"webpack": "^3.7.1",
31-
"webpack-dev-server": "^2.9.2"
11+
"babel-core": "6.26.0",
12+
"babel-loader": "7.1.2",
13+
"babel-plugin-transform-object-rest-spread": "6.26.0",
14+
"babel-preset-env": "1.6.1",
15+
"babel-preset-react": "6.24.1",
16+
"copy-webpack-plugin": "4.2.1",
17+
"css-hot-loader": "1.3.3",
18+
"css-loader": "0.28.7",
19+
"extract-text-webpack-plugin": "3.0.2",
20+
"file-loader": "1.1.5",
21+
"html-loader": "0.5.1",
22+
"html-webpack-plugin": "2.30.1",
23+
"node-sass": "4.7.1",
24+
"rimraf": "2.6.2",
25+
"sass-loader": "6.0.6",
26+
"source-list-map": "2.0.0",
27+
"style-loader": "0.19.0",
28+
"uglify-js": "3.1.10",
29+
"url-loader": "0.6.2",
30+
"webpack": "3.8.1",
31+
"webpack-dev-server": "2.9.4"
3232
},
3333
"dependencies": {
3434
"bootstrap": "4.0.0-beta.2",
35-
"chart.js": "2.7.0",
36-
"font-awesome": "^4.7.0",
35+
"chart.js": "2.7.1",
36+
"font-awesome": "4.7.0",
3737
"history": "4.7.2",
38-
"react": "^16.0.0",
38+
"react": "16.1.1",
3939
"react-chartjs-2": "2.6.4",
40-
"react-dom": "^16.0.0",
41-
"react-router-dom": "^4.2.2",
42-
"react-transition-group": "^2.2.1",
43-
"reactstrap": "^5.0.0-alpha.3",
44-
"simple-line-icons": "^2.4.1"
40+
"react-dom": "16.1.1",
41+
"react-router-dom": "4.2.2",
42+
"react-transition-group": "2.2.1",
43+
"reactstrap": "5.0.0-alpha.4",
44+
"simple-line-icons": "2.4.1"
4545
},
4646
"scripts": {
4747
"dev": "webpack -d --progress --watch --profile --json > compilation-stats.json --env.dev",
@@ -50,7 +50,7 @@
5050
"clean": "rimraf ./build"
5151
},
5252
"engines": {
53-
"node": ">= 6.0.0",
53+
"node": ">= 6.4.0",
5454
"npm": ">= 5.0.0"
5555
}
5656
}

React_Full_Project/scss/style.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* CoreUI - Open Source Bootstrap Admin Template
3-
* @version v1.0.5
3+
* @version v1.0.6
44
* @link http://coreui.io
55
* Copyright (c) 2017 creativeLabs Łukasz Holeczek
66
* @license MIT

React_Full_Project/src/components/Header/HeaderDropdown.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
DropdownItem,
55
DropdownMenu,
66
DropdownToggle,
7-
NavDropdown
7+
Dropdown
88
} from 'reactstrap';
99

1010
class HeaderDropdown extends Component {
@@ -26,7 +26,7 @@ class HeaderDropdown extends Component {
2626

2727
dropAccnt() {
2828
return (
29-
<NavDropdown isOpen={this.state.dropdownOpen} toggle={this.toggle}>
29+
<Dropdown nav isOpen={this.state.dropdownOpen} toggle={this.toggle}>
3030
<DropdownToggle nav>
3131
<img src={'img/avatars/6.jpg'} className="img-avatar" alt="[email protected]"/>
3232
</DropdownToggle>
@@ -45,7 +45,7 @@ class HeaderDropdown extends Component {
4545
<DropdownItem><i className="fa fa-shield"></i> Lock Account</DropdownItem>
4646
<DropdownItem><i className="fa fa-lock"></i> Logout</DropdownItem>
4747
</DropdownMenu>
48-
</NavDropdown>
48+
</Dropdown>
4949
);
5050
}
5151

React_Full_Project/src/components/Sidebar/Sidebar.js

+34-18
Original file line numberDiff line numberDiff line change
@@ -46,30 +46,41 @@ class Sidebar extends Component {
4646

4747
// nav list section title
4848
const title = (title, key) => {
49-
const classes = classNames( "nav-title", title.class);
49+
const classes = classNames( 'nav-title', title.class);
5050
return (<li key={key} className={ classes }>{wrapper(title)} </li>);
5151
};
5252

5353
// nav list divider
54-
const divider = (divider, key) => (<li key={key} className="divider"></li>);
54+
const divider = (divider, key) => {
55+
const classes = classNames( 'divider', divider.class);
56+
return (<li key={key} className={ classes }></li>);
57+
};
5558

5659
// nav item with nav link
5760
const navItem = (item, key) => {
58-
const classes = classNames( item.class )
59-
const isExternal = (url) => {
60-
return url.substring(0, 4) === 'http' ? true : false
61-
}
62-
const variant = classNames( "nav-link", item.variant ? `nav-link-${item.variant}` : "");
61+
const classes = {
62+
item: classNames( item.class) ,
63+
link: classNames( 'nav-link', item.variant ? `nav-link-${item.variant}` : ''),
64+
icon: classNames( item.icon )
65+
};
66+
return (
67+
navLink(item, key, classes)
68+
)
69+
};
70+
71+
// nav link
72+
const navLink = (item, key, classes) => {
73+
const url = item.url ? item.url : '';
6374
return (
64-
<NavItem key={key} className={classes}>
65-
{ isExternal(item.url) ?
66-
<RsNavLink href={item.url} className={variant} active>
67-
<i className={item.icon}></i>{item.name}{badge(item.badge)}
68-
</RsNavLink>
75+
<NavItem key={key} className={classes.item}>
76+
{ isExternal(url) ?
77+
<RsNavLink href={url} className={classes.link} active>
78+
<i className={classes.icon}></i>{item.name}{badge(item.badge)}
79+
</RsNavLink>
6980
:
70-
<NavLink to={item.url} className={variant} activeClassName="active">
71-
<i className={item.icon}></i>{item.name}{badge(item.badge)}
72-
</NavLink>
81+
<NavLink to={url} className={classes.link} activeClassName="active">
82+
<i className={classes.icon}></i>{item.name}{badge(item.badge)}
83+
</NavLink>
7384
}
7485
</NavItem>
7586
)
@@ -86,16 +97,21 @@ class Sidebar extends Component {
8697
</li>)
8798
};
8899

89-
// nav link
90-
const navLink = (item, idx) =>
100+
// nav type
101+
const navType = (item, idx) =>
91102
item.title ? title(item, idx) :
92103
item.divider ? divider(item, idx) :
93104
item.children ? navDropdown(item, idx)
94105
: navItem(item, idx) ;
95106

96107
// nav list
97108
const navList = (items) => {
98-
return items.map( (item, index) => navLink(item, index) );
109+
return items.map( (item, index) => navType(item, index) );
110+
};
111+
112+
const isExternal = (url) => {
113+
const link = url ? url.substring(0, 4) : '';
114+
return link === 'http';
99115
};
100116

101117
// sidebar-nav root

React_Full_Project/src/views/Components/Forms/Forms.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class Forms extends Component {
221221
<Label htmlFor="selectLg">Select Large</Label>
222222
</Col>
223223
<Col xs="12" md="9" size="lg">
224-
<Input type="select" name="selectLg" id="selectLg" size="lg">
224+
<Input type="select" name="selectLg" id="selectLg" bsSize="lg">
225225
<option value="0">Please select</option>
226226
<option value="1">Option #1</option>
227227
<option value="2">Option #2</option>
@@ -234,7 +234,7 @@ class Forms extends Component {
234234
<Label htmlFor="selectSm">Select Small</Label>
235235
</Col>
236236
<Col xs="12" md="9">
237-
<Input type="select" name="selectSm" id="SelectLm" size="sm">
237+
<Input type="select" name="selectSm" id="SelectLm" bsSize="sm">
238238
<option value="0">Please select</option>
239239
<option value="1">Option #1</option>
240240
<option value="2">Option #2</option>
@@ -307,9 +307,11 @@ class Forms extends Component {
307307
<Label check htmlFor="inline-radio1">
308308
<Input type="radio" id="inline-radio1" name="inline-radios" value="option1"/> One
309309
</Label>
310+
{' '}
310311
<Label check htmlFor="inline-radio2">
311312
<Input type="radio" id="inline-radio2" name="inline-radios" value="option2"/> Two
312313
</Label>
314+
{' '}
313315
<Label check htmlFor="inline-radio3">
314316
<Input type="radio" id="inline-radio3" name="inline-radios" value="option3"/> Three
315317
</Label>
@@ -346,9 +348,11 @@ class Forms extends Component {
346348
<Label check htmlFor="inline-checkbox1">
347349
<Input type="checkbox" id="inline-checkbox1" name="inline-checkbox1" value="option1"/> One
348350
</Label>
351+
{' '}
349352
<Label check htmlFor="inline-checkbox2">
350353
<Input type="checkbox" id="inline-checkbox2" name="inline-checkbox2" value="option2"/> Two
351354
</Label>
355+
{' '}
352356
<Label check htmlFor="inline-checkbox3">
353357
<Input type="checkbox" id="inline-checkbox3" name="inline-checkbox3" value="option3"/> Three
354358
</Label>
@@ -540,8 +544,7 @@ class Forms extends Component {
540544
<Label htmlFor="input-small">Small Input</Label>
541545
</Col>
542546
<Col sm="6">
543-
<Input size="sm" type="text" id="input-small" name="input-small" className="input-sm"
544-
placeholder=".form-control-sm"/>
547+
<Input bsSize="sm" type="text" id="input-small" name="input-small" className="input-sm" placeholder=".form-control-sm"/>
545548
</Col>
546549
</FormGroup>
547550
<FormGroup row>
@@ -557,8 +560,7 @@ class Forms extends Component {
557560
<Label htmlFor="input-large">Large Input</Label>
558561
</Col>
559562
<Col sm="6">
560-
<Input size="lg" type="text" id="input-large" name="input-large" className="input-lg"
561-
placeholder=".form-control-lg"/>
563+
<Input bsSize="lg" type="text" id="input-large" name="input-large" className="input-lg" placeholder=".form-control-lg"/>
562564
</Col>
563565
</FormGroup>
564566
</Form>

React_Full_Project/src/views/Components/Switches/Switches.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {Component} from "react";
2-
import {Row, Col, Card, CardHeader, CardBody, Label, Input, Table} from "reactstrap";
2+
import {Row, Col, Card, CardHeader, CardBody, Label, Input, Table} from 'reactstrap';
33

44
class Switches extends Component {
55
render() {

React_Starter/package.json

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
{
22
"name": "@coreui/react",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Open Source Bootstrap Admin Template",
55
"author": "Łukasz Holeczek",
66
"homepage": "http://coreui.io",
77
"copyright": "Copyright 2017 creativeLabs Łukasz Holeczek",
88
"license": "MIT",
99
"private": true,
1010
"devDependencies": {
11-
"babel-core": "^6.26.0",
12-
"babel-loader": "^7.1.2",
13-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
14-
"babel-preset-env": "^1.6.0",
15-
"babel-preset-react": "^6.24.1",
16-
"copy-webpack-plugin": "^4.1.1",
17-
"css-hot-loader": "^1.3.2",
18-
"css-loader": "^0.28.7",
19-
"extract-text-webpack-plugin": "^3.0.1",
20-
"file-loader": "^1.1.5",
21-
"html-loader": "^0.5.1",
22-
"html-webpack-plugin": "^2.30.1",
23-
"node-sass": "^4.5.3",
24-
"rimraf": "^2.6.2",
25-
"sass-loader": "^6.0.6",
26-
"source-list-map": "^2.0.0",
27-
"style-loader": "^0.19.0",
28-
"uglify-js": "^3.1.4",
29-
"url-loader": "^0.6.2",
30-
"webpack": "^3.7.1",
31-
"webpack-dev-server": "^2.9.2"
11+
"babel-core": "6.26.0",
12+
"babel-loader": "7.1.2",
13+
"babel-plugin-transform-object-rest-spread": "6.26.0",
14+
"babel-preset-env": "1.6.1",
15+
"babel-preset-react": "6.24.1",
16+
"copy-webpack-plugin": "4.2.1",
17+
"css-hot-loader": "1.3.3",
18+
"css-loader": "0.28.7",
19+
"extract-text-webpack-plugin": "3.0.2",
20+
"file-loader": "1.1.5",
21+
"html-loader": "0.5.1",
22+
"html-webpack-plugin": "2.30.1",
23+
"node-sass": "4.7.1",
24+
"rimraf": "2.6.2",
25+
"sass-loader": "6.0.6",
26+
"source-list-map": "2.0.0",
27+
"style-loader": "0.19.0",
28+
"uglify-js": "3.1.10",
29+
"url-loader": "0.6.2",
30+
"webpack": "3.8.1",
31+
"webpack-dev-server": "2.9.4"
3232
},
3333
"dependencies": {
3434
"bootstrap": "4.0.0-beta.2",
35-
"chart.js": "2.7.0",
36-
"font-awesome": "^4.7.0",
35+
"chart.js": "2.7.1",
36+
"font-awesome": "4.7.0",
3737
"history": "4.7.2",
38-
"react": "^16.0.0",
38+
"react": "16.1.1",
3939
"react-chartjs-2": "2.6.4",
40-
"react-dom": "^16.0.0",
41-
"react-router-dom": "^4.2.2",
42-
"react-transition-group": "^2.2.1",
43-
"reactstrap": "^5.0.0-alpha.3",
44-
"simple-line-icons": "^2.4.1"
40+
"react-dom": "16.1.1",
41+
"react-router-dom": "4.2.2",
42+
"react-transition-group": "2.2.1",
43+
"reactstrap": "5.0.0-alpha.4",
44+
"simple-line-icons": "2.4.1"
4545
},
4646
"scripts": {
4747
"dev": "webpack -d --progress --watch --profile --json > compilation-stats.json --env.dev",
@@ -50,7 +50,7 @@
5050
"clean": "rimraf ./build"
5151
},
5252
"engines": {
53-
"node": ">= 6.0.0",
53+
"node": ">= 6.4.0",
5454
"npm": ">= 5.0.0"
5555
}
5656
}

React_Starter/scss/style.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* CoreUI - Open Source Bootstrap Admin Template
3-
* @version v1.0.5
3+
* @version v1.0.6
44
* @link http://coreui.io
55
* Copyright (c) 2017 creativeLabs Łukasz Holeczek
66
* @license MIT

React_Starter/src/components/Footer/Footer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component } from 'react';
1+
import React, {Component} from 'react';
22

33
class Footer extends Component {
44
render() {

0 commit comments

Comments
 (0)