8000 fix: cosmetic changes. · rmeltonmi/coreui-vue@3168e5e · GitHub
[go: up one dir, main page]

Skip to content

Commit 3168e5e

Browse files
committed
fix: cosmetic changes.
1 parent 1bd7358 commit 3168e5e

Some content is hidden

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

44 files changed

+123
-750
lines changed

package.json

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@
5151
"lint": "vue-cli-service lint",
5252
"test": "vue-cli-service test:unit",
5353
"test:coverage": "vue-cli-service test:unit --coverage --collectCoverageFrom=src/**/*.{js,vue} --collectCoverageFrom=!**/index*",
54-
"test:e2e": "vue-cli-service test:e2e"
54+
"test:e2e": "vue-cli-service test:e2e",
55+
"clear_jest": "jest --clearCache"
5556
},
5657
"dependencies": {
57-
"@coreui/coreui": "^2.0.26",
58+
"@coreui/coreui": "^2.1.3",
5859
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.2.0",
5960
"chart.js": "^2.7.3",
6061
"core-js": "^2.5.7",
@@ -64,27 +65,28 @@
6465
"vue-perfect-scrollbar": "^0.1.0"
6566
},
6667
"devDependencies": {
67-
"@babel/runtime": "^7.1.2",
6868
"@babel/plugin-transform-runtime": "^7.1.0",
69-
"@vue/cli-plugin-babel": "^3.1.1",
70-
"@vue/cli-plugin-e2e-nightwatch": "^3.0.5",
71-
"@vue/cli-plugin-eslint": "^3.1.1",
72-
"@vue/cli-plugin-unit-jest": "^3.0.5",
73-
"@vue/cli-service": "^3.1.3",
74-
"@vue/test-utils": "^1.0.0-beta.25",
69+
"@babel/runtime": "^7.1.5",
70+
"@vue/cli-plugin-babel": "^3.2.0",
71+
"@vue/cli-plugin-e2e-nightwatch": "^3.2.0",
72+
"@vue/cli-plugin-eslint": "^3.2.1",
73+
"@vue/cli-plugin-unit-jest": "^3.2.0",
74+
"@vue/cli-service": "^3.2.0",
75+
"@vue/test-utils": "^1.0.0-beta.26",
7576
"babel-core": "^7.0.0-bridge.0",
7677
"babel-eslint": "^10.0.1",
7778
"babel-jest": "^23.6.0",
7879
"babel-plugin-dynamic-import-node": "^2.2.0",
7980
"babel-plugin-module-resolver": "^3.1.1",
8081
"babel-preset-vue-app": "^2.0.0",
81-
"eslint": "^5.8.0",
82-
"eslint-plugin-vue": "^5.0.0-0",
82+
"eslint": "^5.9.0",
83+
"eslint-plugin-vue": "^5.0.0-beta.5",
8384
"growl": "^1.10.5",
8485
"https-proxy-agent": "^2.2.1",
85-
"node-sass": "^4.9.4",
86+
"node-sass": "^4.11.0",
8687
"sass-loader": "^7.1.0",
87-
"vue-jest": "^3.0.0",
88+
"vue-jest": "^3.0.1",
89+
"vue-router": "^3.0.2",
8890
"vue-template-compiler": "^2.5.17"
8991
},
9092
"eslintConfig": {
@@ -109,6 +111,6 @@
109111
"browserslist": [
110112
"> 1%",
111113
"last 2 versions",
112-
"not ie <= 10"
114+
"not ie <= 9"
113115
]
114116
}

src/components/Alert/CAlert.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ export default {
6060
type: [Boolean, Number],
6161
default: false
6262
},
63-
fade: {
64-
type: Boolean,
65-
default: false
66-
}
63+
fade: Boolean,
6764
},
6865
watch: {
6966
show () {

src/components/Badge/CBadge.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { mergeData } from 'vue-functional-data-merge'
22
import CLink, { props as linkProps } from '../Link/CLink'
33

4-
export const props = Object.assign(linkProps, {
4+
const props = Object.assign(linkProps, {
55
tag: {
66
type: String,
77
default: 'span'
@@ -10,10 +10,7 @@ export const props = Object.assign(linkProps, {
1010
type: String,
1111
default: 'secondary'
1212
},
13-
pill: {
14-
type: Boolean,
15-
default: false
16-
}
13+
pill: Boolean,
1714
})
1815

1916
export default {
@@ -25,7 +22,7 @@ export default {
2522
const componentData = {
2623
staticClass: 'badge',
2724
class: [
28-
!props.variant ? 'badge-secondary' : `badge-${props.variant}`,
25+
`badge-${props.variant}`,
2926
{
3027
'badge-pill': Boolean(props.pill),
3128
active: props.active,

src/components/Breadcrumb/CBreadcrumb.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
import { mergeData } from 'vue-functional-data-merge'
22
import CLink from '../Link/CLink'
33

4-
export const props = {
5-
items: {
6-
type: Array,
7-
default: null
8-
}
9-
}
10-
114
export default {
125
functional: true,
136
name: 'CBreadcrumb',
14-
props,
7+
props: {
8+
items: Array,
9+
},
1510
render (h, { props, data }) {
1611
if(!Array.isArray(props.items)){ return }
1712
let childNodes = props.items.map((item, index, items) => {

src/components/Link/CLink.js

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,64 +12,39 @@ import { mergeData } from 'vue-functional-data-merge'
1212
*/
1313
export function propsFactory () {
1414
return {
15-
href: {
16-
type: String,
17-
default: null
18-
},
19-
rel: {
20-
type: String,
21-
default: null
22-
},
15+
href:String,
16+
rel: String,
2317
target: {
2418
type: String,
2519
default: '_self'
26< F438 /td>20
},
27-
active: {
28-
type: Boolean,
29-
default: false
30-
},
21+
active: Boolean,
3122
activeClass: {
3223
type: String,
3324
default: 'active'
3425
},
35-
append: {
36-
type: Boolean,
37-
default: false
38-
},
39-
disabled: {
40-
type: Boolean,
41-
default: false
42-
},
26+
append: Boolean,
27+
disabled: Boolean,
4328
event: {
4429
type: [String, Array],
4530
default: 'click'
4631
},
47-
exact: {
48-
type: Boolean,
49-
default: false
50-
},
32+
exact: Boolean,
5133
exactActiveClass: {
5234
type: String,
5335
default: 'active'
5436
},
55-
replace: {
56-
type: Boolean,
57-
default: false
58-
},
37+
replace: Boolean,
5938
routerTag: {
6039
type: String,
6140
default: 'a'
6241
},
63-
to: {
64-
type: [String, Object],
65-
default: null
66-
}
42+
to: [String, Object],
6743
}
6844
}
6945

7046
export const props = propsFactory()
7147

72-
7348
function computeTag (props, parent) {
7449
return Boolean(parent.$router) && props.to && !props.disabled ? 'router-link' : 'a'
7550
}
@@ -132,7 +107,7 @@ function clickHandlerFactory ({ disabled, tag, href, suppliedHandler, parent })
132107
export default {
133108
functional: true,
134109
name: 'CLink',
135-
props: propsFactory(),
110+
props,
136111
render (h, { props, data, parent, children }) {
137112
const tag = computeTag(props, parent)
138113
const rel = computeRel(props)

src/components/Nav/CNavItemDropdown.vue

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
:id="safeId">
44
<a href="#"
55
:id="'C-' + safeId"
6-
aria-haspopup="true"
6+
aria-haspopup="true"
77
:aria-expanded="visible"
8-
:class="toggleClasses"
8+
:class="toggleClasses"
99
@click="toggle(!visible)"
1010
@blur="toggle(false)">
1111
<slot name="button-content">{{text}}</slot>
@@ -28,10 +28,7 @@ export default {
2828
}
2929
},
3030
props: {
31-
noCaret: {
32-
type: Boolean,
33-
default: false
34-
},
31+
noCaret: Boolean,
3532
extraToggleClasses: {
3633
type: String,
3734
default: ''
@@ -44,22 +41,10 @@ export default {
4441
type: String,
4542
default: 'Dropdown'
4643
},
47-
show: {
48-
type: Boolean,
49-
default: false
50-
},
51-
dropup: {
52-
type: Boolean,
53-
default: false
54-
},
55-
disabled: {
56-
type: Boolean,
57-
default: false
58-
},
59-
right: {
60-
type: Boolean,
61-
default: false
62-
},
44+
show: Boolean,
45+
dropup: Boolean,
46+
disabled: Boolean,
47+
right: Boolean,
6348
},
6449
methods:{
6550
toggle (visible) {

src/components/Progress/CProgress.js

Lines changed: 18 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// import { mergeData } from 'vue-functional-data-merge'
12
import CProgressBar from './CProgressBar'
23

34
export default {
@@ -22,51 +23,26 @@ export default {
2223
}
2324
)
2425
}
25-
return h('div', { class: [ 'progress' ], style: this.progressHeight }, [ childNodes ])
26+
return h(
27+
'div',
28+
{
29+
class: [ 'progress' ],
30+
style: { height: this.height }
31+
},
32+
[ childNodes ]
33+
)
2634
},
2735
props: {
28-
height: {
29-
type: String,
30-
default: null
31-
},
36+
height: String,
3237
// These props can be inherited via the child CProgressBar(s)
33-
color: {
34-
type: String,
35-
default: null
36-
},
37-
striped: {
38-
type: Boolean,
39-
default: false
40-
},
41-
animated: {
42-
type: Boolean,
43-
default: false
44-
},
45-
precision: {
46-
type: Number,
47-
default: 0
48-
},
49-
showProgress: {
50-
type: Boolean,
51-
default: false
52-
},
53-
showValue: {
54-
type: Boolean,
55-
default: false
56-
},
57-
max: {
58-
type: Number,
59-
default: 100
60-
},
38+
color: String,
39+
striped: Boolean,
40+
animated: Boolean,
41+
precision: Number,
42+
showProgress: Boolean,
43+
showValue: Boolean,
44+
max: Number,
6145
// This prop is not inherited by child CProgressBar(s)
62-
value: {
63-
type: Number,
64-
default: 0
65-
}
66-
},
67-
computed: {
68-
progressHeight () {
69-
return { height: this.height || null }
70-
}
46+
value: Number,
7147
}
7248
}

0 commit comments

Comments
 (0)
0