Skip to content

Commit

Permalink
refactor: minor refactors, update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
woothu committed Nov 21, 2019
1 parent cdfef77 commit 07e4966
Show file tree
Hide file tree
Showing 35 changed files with 1,627 additions and 1,589 deletions.
2 changes: 2 additions & 0 deletions src/assets/icons/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import {
cilEnvelopeOpen,
cilEuro,
cilGlobeAlt,
cilGrid,
cilFile,
cilJustifyCenter,
cilLaptop,
Expand Down Expand Up @@ -101,6 +102,7 @@ export const iconsSet = Object.assign(
cilEnvelopeOpen,
cilEuro,
cilGlobeAlt,
cilGrid,
cilFile,
cilJustifyCenter,
cilLaptop,
Expand Down
2 changes: 1 addition & 1 deletion src/assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// If you want to add something do it here
@import "custom";

.card-header .c-icon:first-child {
.card-header > .c-icon:first-child {
margin-right: 0.1rem;
margin-top: 0.1rem;
vertical-align: top;
Expand Down
4 changes: 3 additions & 1 deletion src/views/base/Table.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<CCard>
<CCardHeader>
<CIcon name="cil-justify-center"/> {{caption}}
<slot name="header">
<CIcon name="cil-grid"/> {{caption}}
</slot>
</CCardHeader>
<CCardBody>
<CDataTable
Expand Down
21 changes: 16 additions & 5 deletions src/views/base/Tables.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@
<div>
<CRow>
<CCol lg="6">
<CTableWrapper
:items="getShuffledUsersData()"
caption="Simple Table"
/>
<CTableWrapper :items="getShuffledUsersData()">
<template #header>
<CIcon name="cil-grid"/> Simple Table
<div class="card-header-actions">
<a
href="https://coreui.io/vue/docs/components/nav"
class="card-header-action"
rel="noreferrer noopener"
target="_blank"
>
<small class="text-muted">docs</small>
</a>
</div>
</template>
</CTableWrapper>
</CCol>

<CCol lg="6">
Expand Down Expand Up @@ -60,7 +71,7 @@
small
fixed
dark
caption="Combined All Table"
caption="Combined All dark Table"
/>
</CCol>
</CRow>
Expand Down
8 changes: 4 additions & 4 deletions src/views/charts/CChartBarSimple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export default {
data: this.dataPoints,
backgroundColor: getColor(this.backgroundColor),
pointHoverBackgroundColor: getColor(this.pointHoverBackgroundColor),
label: this.label
label: this.label,
barPercentage: 0.5,
categoryPercentage: 1
}
]
},
Expand All @@ -48,9 +50,7 @@ export default {
},
scales: {
xAxes: [{
display: false,
categoryPercentage: 1,
barPercentage: 0.5
display: false
}],
yAxes: [{
display: false
Expand Down
1 change: 0 additions & 1 deletion src/views/icons/CoreUIIcons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default {
freeSet,
methods: {
toKebabCase (str) {
console.log(this.$options.freeSet, this.$options.freeSet.handPointDown)
return str.replace(/([a-z])([A-Z0-9])/g, '$1-$2').toLowerCase()
}
}
Expand Down
32 changes: 14 additions & 18 deletions src/views/widgets/Widgets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,25 @@
<div>
<CRow>
<CCol sm="6" lg="3">
<CWidgetProgress
header="89.9%"
text="Lorem ipsum..."
footer="Lorem ipsum dolor sit amet enim."
>
<CWidgetProgress footer="Lorem ipsum dolor sit amet enim.">
<div class="h4 m-0">89.9%</div>
<div class="card-header-actions">
<a
href="https://coreui.io/vue/docs/components/widgets"
class="card-header-action position-absolute"
style="right:5px; top:5px"
rel="noreferrer noopener"
target="_blank"
>
<small class="text-muted">docs</small>
</a>
</div>
<div>Lorem ipsum...</div>
<CProgress
color="success"
:value="25"
class="progress-xs my-3 mb-0"
/>
<template #header>
<div class="card-header-actions">
<a
href="https://coreui.io/vue/docs/components/button-components"
class="card-header-action position-absolute"
style="right:10px; top:10px"
rel="noreferrer noopener"
target="_blank"
>
<small class="text-muted">docs</small>
</a>
</div>
</template>
</CWidgetProgress>
</CCol>
<CCol sm="6" lg="3">
Expand Down
7 changes: 3 additions & 4 deletions tests/unit/containers/__snapshots__/TheHeader.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,21 @@ exports[`TheHeader.vue renders correctly 1`] = `
height="46"
src="img/brand/coreui-base.svg"
width="97"
wrappedinlink="[object Object]"
/>
<cheadernav-stub
class="d-md-down-none mr-auto"
>
<cheadernavitem-stub
class="px-3"
to="/dashboard"
>
<cheadernavlink-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
to="/dashboard"
>
Dashboard
Expand All @@ -51,15 +50,15 @@ exports[`TheHeader.vue renders correctly 1`] = `
<cheadernavitem-stub
class="px-3"
exact=""
to="/users"
>
<cheadernavlink-stub
activeclass="active"
event="click"
exact="true"
exactactiveclass="active"
routertag="a"
target="_self"
to="/users"
>
Users
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports[`Breadcrumbs.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Breadcrumb"
href="https://coreui.io/vue/docs/components/breadcrumb"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/views/base/__snapshots__/Cards.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exports[`Cards.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/CardComponents"
href="https://coreui.io/vue/docs/components/card-components"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/views/base/__snapshots__/Carousels.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports[`Carousels.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Carousel"
href="https://coreui.io/vue/docs/components/carousel"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/views/base/__snapshots__/Collapses.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports[`Collapses.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Collapse"
href="https://coreui.io/vue/docs/components/collapse"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exports[`Jumbotrons.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Jumbotron"
href="https://coreui.io/vue/docs/components/jumbotron"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`ListGroups.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/ListGroup"
href="https://coreui.io/vue/docs/components/list-group"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/views/base/__snapshots__/Navbars.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`Navbars.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Navbar"
href="https://coreui.io/vue/docs/components/navbar"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/views/base/__snapshots__/Navs.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`Navs.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Nav"
href="https://coreui.io/vue/docs/components/nav"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`Paginations.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Pagination"
href="https://coreui.io/vue/docs/components/pagination"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`ProgressBars.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Progress"
href="https://coreui.io/vue/docs/components/progress"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/views/base/__snapshots__/Switches.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports[`Switches.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Switch"
href="https://coreui.io/vue/docs/components/switch"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/views/base/__snapshots__/Table.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ exports[`Table.vue renders correctly 1`] = `
<ccard-stub>
<ccardheader-stub>
<cicon-stub
name="cil-justify-center"
name="cil-grid"
/>
Table
</ccardheader-stub>
<ccardbody-stub>
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/views/base/__snapshots__/Tables.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`Tables.vue renders correctly 1`] = `
tag="div"
>
<ctablewrapper-stub
caption="Simple Table"
caption="Table"
fields="username,registered,role,status"
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]"
/>
Expand Down Expand Up @@ -87,7 +87,7 @@ exports[`Tables.vue renders correctly 1`] = `
>
<ctablewrapper-stub
bordered="true"
caption="Combined All Table"
caption="Combined All dark Table"
dark="true"
fields="username,registered,role,status"
fixed="true"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/views/base/__snapshots__/Tabs.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports[`Tabs.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Tabs"
href="https://coreui.io/vue/docs/components/tabs"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/views/base/__snapshots__/Tooltips.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`Tooltips.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Tooltip"
href="https://coreui.io/vue/docs/directives/tooltip"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exports[`BrandButtons.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/ButtonComponents"
href="https://coreui.io/vue/docs/components/button-components"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`Dropdowns.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Dropdown"
href="https://coreui.io/vue/docs/components/dropdown"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ exports[`ButtonGroups.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/ButtonComponents"
href="https://coreui.io/vue/docs/components/button-components"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`StandardButtons.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/ButtonComponents"
href="https://coreui.io/vue/docs/components/button-components"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/views/charts/__snapshots__/Charts.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`Charts.vue renders correctly 1`] = `
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/Charts"
href="https://coreui.io/vue/docs/components/charts"
rel="noreferrer noopener"
target="_blank"
>
Expand Down
Loading

0 comments on commit 07e4966

Please sign in to comment.