Skip to content

Commit 07e4966

Browse files
committed
refactor: minor refactors, update snapshots
1 parent cdfef77 commit 07e4966

35 files changed

+1627
-1589
lines changed

src/assets/icons/icons.js

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import {
5252
cilEnvelopeOpen,
5353
cilEuro,
5454
cilGlobeAlt,
55+
cilGrid,
5556
cilFile,
5657
cilJustifyCenter,
5758
cilLaptop,
@@ -101,6 +102,7 @@ export const iconsSet = Object.assign(
101102
cilEnvelopeOpen,
102103
cilEuro,
103104
cilGlobeAlt,
105+
cilGrid,
104106
cilFile,
105107
cilJustifyCenter,
106108
cilLaptop,

src/assets/scss/style.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// If you want to add something do it here
88
@import "custom";
99

10-
.card-header .c-icon:first-child {
10+
.card-header > .c-icon:first-child {
1111
margin-right: 0.1rem;
1212
margin-top: 0.1rem;
1313
vertical-align: top;

src/views/base/Table.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<template>
22
<CCard>
33
<CCardHeader>
4-
<CIcon name="cil-justify-center"/> {{caption}}
4+
<slot name="header">
5+
<CIcon name="cil-grid"/> {{caption}}
6+
</slot>
57
</CCardHeader>
68
<CCardBody>
79
<CDataTable

src/views/base/Tables.vue

+16-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22
<div>
33
<CRow>
44
<CCol lg="6">
5-
<CTableWrapper
6-
:items="getShuffledUsersData()"
7-
caption="Simple Table"
8-
/>
5+
<CTableWrapper :items="getShuffledUsersData()">
6+
<template #header>
7+
<CIcon name="cil-grid"/> Simple Table
8+
<div class="card-header-actions">
9+
<a
10+
href="https://coreui.io/vue/docs/components/nav"
11+
class="card-header-action"
12+
rel="noreferrer noopener"
13+
target="_blank"
14+
>
15+
<small class="text-muted">docs</small>
16+
</a>
17+
</div>
18+
</template>
19+
</CTableWrapper>
920
</CCol>
1021

1122
<CCol lg="6">
@@ -60,7 +71,7 @@
6071
small
6172
fixed
6273
dark
63-
caption="Combined All Table"
74+
caption="Combined All dark Table"
6475
/>
6576
</CCol>
6677
</CRow>

src/views/charts/CChartBarSimple.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export default {
3636
data: this.dataPoints,
3737
backgroundColor: getColor(this.backgroundColor),
3838
pointHoverBackgroundColor: getColor(this.pointHoverBackgroundColor),
39-
label: this.label
39+
label: this.label,
40+
barPercentage: 0.5,
41+
categoryPercentage: 1
4042
}
4143
]
4244
},
@@ -48,9 +50,7 @@ export default {
4850
},
4951
scales: {
5052
xAxes: [{
51-
display: false,
52-
categoryPercentage: 1,
53-
barPercentage: 0.5
53+
display: false
5454
}],
5555
yAxes: [{
5656
display: false

src/views/icons/CoreUIIcons.vue

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export default {
4343
freeSet,
4444
methods: {
4545
toKebabCase (str) {
46-
console.log(this.$options.freeSet, this.$options.freeSet.handPointDown)
4746
return str.replace(/([a-z])([A-Z0-9])/g, '$1-$2').toLowerCase()
4847
}
4948
}

src/views/widgets/Widgets.vue

+14-18
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,25 @@
22
<div>
33
<CRow>
44
<CCol sm="6" lg="3">
5-
<CWidgetProgress
6-
header="89.9%"
7-
text="Lorem ipsum..."
8-
footer="Lorem ipsum dolor sit amet enim."
9-
>
5+
<CWidgetProgress footer="Lorem ipsum dolor sit amet enim.">
6+
<div class="h4 m-0">89.9%</div>
7+
<div class="card-header-actions">
8+
<a
9+
href="https://coreui.io/vue/docs/components/widgets"
10+
class="card-header-action position-absolute"
11+
style="right:5px; top:5px"
12+
rel="noreferrer noopener"
13+
target="_blank"
14+
>
15+
<small class="text-muted">docs</small>
16+
</a>
17+
</div>
18+
<div>Lorem ipsum...</div>
1019
<CProgress
1120
color="success"
1221
:value="25"
1322
class="progress-xs my-3 mb-0"
1423
/>
15-
<template #header>
16-
<div class="card-header-actions">
17-
<a
18-
href="https://coreui.io/vue/docs/components/button-components"
19-
class="card-header-action position-absolute"
20-
style="right:10px; top:10px"
21-
rel="noreferrer noopener"
22-
target="_blank"
23-
>
24-
<small class="text-muted">docs</small>
25-
</a>
26-
</div>
27-
</template>
2824
</CWidgetProgress>
2925
</CCol>
3026
<CCol sm="6" lg="3">

tests/unit/containers/__snapshots__/TheHeader.spec.js.snap

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,21 @@ exports[`TheHeader.vue renders correctly 1`] = `
2626
height="46"
2727
src="img/brand/coreui-base.svg"
2828
width="97"
29-
wrappedinlink="[object Object]"
3029
/>
3130
3231
<cheadernav-stub
3332
class="d-md-down-none mr-auto"
3433
>
3534
<cheadernavitem-stub
3635
class="px-3"
37-
to="/dashboard"
3836
>
3937
<cheadernavlink-stub
4038
activeclass="active"
4139
event="click"
4240
exactactiveclass="active"
4341
routertag="a"
4442
target="_self"
43+
to="/dashboard"
4544
>
4645
4746
Dashboard
@@ -51,15 +50,15 @@ exports[`TheHeader.vue renders correctly 1`] = `
5150
5251
<cheadernavitem-stub
5352
class="px-3"
54-
exact=""
55-
to="/users"
5653
>
5754
<cheadernavlink-stub
5855
activeclass="active"
5956
event="click"
57+
exact="true"
6058
exactactiveclass="active"
6159
routertag="a"
6260
target="_self"
61+
to="/users"
6362
>
6463
6564
Users

tests/unit/views/base/__snapshots__/Breadcrumbs.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ exports[`Breadcrumbs.vue renders correctly 1`] = `
2727
>
2828
<a
2929
class="card-header-action"
30-
href="https://coreui.io/vue/docs/3.0/components/Breadcrumb"
30+
href="https://coreui.io/vue/docs/components/breadcrumb"
3131
rel="noreferrer noopener"
3232
target="_blank"
3333
>

tests/unit/views/base/__snapshots__/Cards.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ exports[`Cards.vue renders correctly 1`] = `
2222
>
2323
<a
2424
class="card-header-action"
25-
href="https://coreui.io/vue/docs/3.0/components/CardComponents"
25+
href="https://coreui.io/vue/docs/components/card-components"
2626
rel="noreferrer noopener"
2727
target="_blank"
2828
>

tests/unit/views/base/__snapshots__/Carousels.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ exports[`Carousels.vue renders correctly 1`] = `
2828
>
2929
<a
3030
class="card-header-action"
31-
href="https://coreui.io/vue/docs/3.0/components/Carousel"
31+
href="https://coreui.io/vue/docs/components/carousel"
3232
rel="noreferrer noopener"
3333
target="_blank"
3434
>

tests/unit/views/base/__snapshots__/Collapses.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ exports[`Collapses.vue renders correctly 1`] = `
2828
>
2929
<a
3030
class="card-header-action"
31-
href="https://coreui.io/vue/docs/3.0/components/Collapse"
31+
href="https://coreui.io/vue/docs/components/collapse"
3232
rel="noreferrer noopener"
3333
target="_blank"
3434
>

tests/unit/views/base/__snapshots__/Jumbotrons.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ exports[`Jumbotrons.vue renders correctly 1`] = `
2323
>
2424
<a
2525
class="card-header-action"
26-
href="https://coreui.io/vue/docs/3.0/components/Jumbotron"
26+
href="https://coreui.io/vue/docs/components/jumbotron"
2727
rel="noreferrer noopener"
2828
target="_blank"
2929
>

tests/unit/views/base/__snapshots__/ListGroups.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ exports[`ListGroups.vue renders correctly 1`] = `
2424
>
2525
<a
2626
class="card-header-action"
27-
href="https://coreui.io/vue/docs/3.0/components/ListGroup"
27+
href="https://coreui.io/vue/docs/components/list-group"
2828
rel="noreferrer noopener"
2929
target="_blank"
3030
>

tests/unit/views/base/__snapshots__/Navbars.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exports[`Navbars.vue renders correctly 1`] = `
1717
>
1818
<a
1919
class="card-header-action"
20-
href="https://coreui.io/vue/docs/3.0/components/Navbar"
20+
href="https://coreui.io/vue/docs/components/navbar"
2121
rel="noreferrer noopener"
2222
target="_blank"
2323
>

tests/unit/views/base/__snapshots__/Navs.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports[`Navs.vue renders correctly 1`] = `
1616
>
1717
<a
1818
class="card-header-action"
19-
href="https://coreui.io/vue/docs/3.0/components/Nav"
19+
href="https://coreui.io/vue/docs/components/nav"
2020
rel="noreferrer noopener"
2121
target="_blank"
2222
>

tests/unit/views/base/__snapshots__/Paginations.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exports[`Paginations.vue renders correctly 1`] = `
1717
>
1818
<a
1919
class="card-header-action"
20-
href="https://coreui.io/vue/docs/3.0/components/Pagination"
20+
href="https://coreui.io/vue/docs/components/pagination"
2121
rel="noreferrer noopener"
2222
target="_blank"
2323
>

tests/unit/views/base/__snapshots__/ProgressBars.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ exports[`ProgressBars.vue renders correctly 1`] = `
1717
>
1818
<a
1919
class="card-header-action"
20-
href="https://coreui.io/vue/docs/3.0/components/Progress"
20+
href="https://coreui.io/vue/docs/components/progress"
2121
rel="noreferrer noopener"
2222
target="_blank"
2323
>

tests/unit/views/base/__snapshots__/Switches.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ exports[`Switches.vue renders correctly 1`] = `
3333
>
3434
<a
3535
class="card-header-action"
36-
href="https://coreui.io/vue/docs/3.0/components/Switch"
36+
href="https://coreui.io/vue/docs/components/switch"
3737
rel="noreferrer noopener"
3838
target="_blank"
3939
>

tests/unit/views/base/__snapshots__/Table.spec.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ exports[`Table.vue renders correctly 1`] = `
44
<ccard-stub>
55
<ccardheader-stub>
66
<cicon-stub
7-
name="cil-justify-center"
7+
name="cil-grid"
88
/>
99
Table
10-
10+
1111
</ccardheader-stub>
1212
1313
<ccardbody-stub>

tests/unit/views/base/__snapshots__/Tables.spec.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ exports[`Tables.vue renders correctly 1`] = `
1010
tag="div"
1111
>
1212
<ctablewrapper-stub
13-
caption="Simple Table"
13+
caption="Table"
1414
fields="username,registered,role,status"
1515
items="[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]"
1616
/>
@@ -87,7 +87,7 @@ exports[`Tables.vue renders correctly 1`] = `
8787
>
8888
<ctablewrapper-stub
8989
bordered="true"
90-
caption="Combined All Table"
90+
caption="Combined All dark Table"
9191
dark="true"
9292
fields="username,registered,role,status"
9393
fixed="true"

tests/unit/views/base/__snapshots__/Tabs.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ exports[`Tabs.vue renders correctly 1`] = `
2020
>
2121
<a
2222
class="card-header-action"
23-
href="https://coreui.io/vue/docs/3.0/components/Tabs"
23+
href="https://coreui.io/vue/docs/components/tabs"
2424
rel="noreferrer noopener"
2525
target="_blank"
2626
>

tests/unit/views/base/__snapshots__/Tooltips.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ exports[`Tooltips.vue renders correctly 1`] = `
2424
>
2525
<a
2626
class="card-header-action"
27-
href="https://coreui.io/vue/docs/3.0/components/Tooltip"
27+
href="https://coreui.io/vue/docs/directives/tooltip"
2828
rel="noreferrer noopener"
2929
target="_blank"
3030
>

tests/unit/views/buttons/__snapshots__/BrandButtons.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ exports[`BrandButtons.vue renders correctly 1`] = `
2222
>
2323
<a
2424
class="card-header-action"
25-
href="https://coreui.io/vue/docs/3.0/components/ButtonComponents"
25+
href="https://coreui.io/vue/docs/components/button-components"
2626
rel="noreferrer noopener"
2727
target="_blank"
2828
>

tests/unit/views/buttons/__snapshots__/ButtonDropdowns.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ exports[`Dropdowns.vue renders correctly 1`] = `
2929
>
3030
<a
3131
class="card-header-action"
32-
href="https://coreui.io/vue/docs/3.0/components/Dropdown"
32+
href="https://coreui.io/vue/docs/components/dropdown"
3333
rel="noreferrer noopener"
3434
target="_blank"
3535
>

tests/unit/views/buttons/__snapshots__/ButtonGroups.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ exports[`ButtonGroups.vue renders correctly 1`] = `
2323
>
2424
<a
2525
class="card-header-action"
26-
href="https://coreui.io/vue/docs/3.0/components/ButtonComponents"
26+
href="https://coreui.io/vue/docs/components/button-components"
2727
rel="noreferrer noopener"
2828
target="_blank"
2929
>

tests/unit/views/buttons/__snapshots__/StandardButtons.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exports[`StandardButtons.vue renders correctly 1`] = `
1313
>
1414
<a
1515
class="card-header-action"
16-
href="https://coreui.io/vue/docs/3.0/components/ButtonComponents"
16+
href="https://coreui.io/vue/docs/components/button-components"
1717
rel="noreferrer noopener"
1818
target="_blank"
1919
>

tests/unit/views/charts/__snapshots__/Charts.spec.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exports[`Charts.vue renders correctly 1`] = `
1616
>
1717
<a
1818
class="card-header-action"
19-
href="https://coreui.io/vue/docs/3.0/components/Charts"
19+
href="https://coreui.io/vue/docs/components/charts"
2020
rel="noreferrer noopener"
2121
target="_blank"
2222
>

0 commit comments

Comments
 (0)