mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove compoments Base-Table and Badges
This commit is contained in:
parent
ce97d24547
commit
5397a9ab26
@ -1,17 +0,0 @@
|
||||
//
|
||||
// Circle badge
|
||||
//
|
||||
|
||||
|
||||
// General styles
|
||||
|
||||
.badge-circle {
|
||||
text-align: center;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
font-size: .875rem;
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
//
|
||||
// Dot badge
|
||||
//
|
||||
|
||||
|
||||
// General styles
|
||||
|
||||
.badge-dot {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
background: transparent;
|
||||
font-weight: $font-weight-normal;
|
||||
font-size: $font-size-sm;
|
||||
text-transform: none;
|
||||
|
||||
strong {
|
||||
color: $gray-800;
|
||||
}
|
||||
|
||||
i {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: .375rem;
|
||||
height: .375rem;
|
||||
border-radius: 50%;
|
||||
margin-right: .375rem;
|
||||
}
|
||||
|
||||
&.badge-md {
|
||||
i {
|
||||
width: .5rem;
|
||||
height: .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.badge-lg {
|
||||
i {
|
||||
width: .625rem;
|
||||
height: .625rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
//
|
||||
// Badge
|
||||
//
|
||||
|
||||
|
||||
// General styles
|
||||
|
||||
.badge {
|
||||
text-transform: $badge-text-transfom;
|
||||
|
||||
a {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Size variations
|
||||
|
||||
.badge-md {
|
||||
padding: .65em 1em;
|
||||
}
|
||||
|
||||
.badge-lg {
|
||||
padding: .85em 1.375em;
|
||||
}
|
||||
|
||||
|
||||
// Multiple inline badges
|
||||
|
||||
.badge-inline {
|
||||
margin-right: .625rem;
|
||||
|
||||
+ span {
|
||||
top: 2px;
|
||||
position: relative;
|
||||
|
||||
> a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Badge spacing inside a btn with some text
|
||||
|
||||
.btn {
|
||||
.badge {
|
||||
&:not(:first-child) {
|
||||
margin-left: .5rem;
|
||||
}
|
||||
&:not(:last-child) {
|
||||
margin-right: .5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
@import "custom/alert";
|
||||
@import "custom/avatar";
|
||||
@import "custom/badge";
|
||||
@import "custom/buttons";
|
||||
@import "custom/card";
|
||||
@import "custom/chart";
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
<template>
|
||||
<b-badge :variant="type" :pill="rounded" :size="size" :class="{ 'badge-circle': circle }">
|
||||
<slot>
|
||||
<i v-if="icon" :class="icon"></i>
|
||||
</slot>
|
||||
</b-badge>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'badge',
|
||||
props: {
|
||||
tag: {
|
||||
type: String,
|
||||
default: 'span',
|
||||
description: 'Html tag to use for the badge.',
|
||||
},
|
||||
rounded: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
description: 'Whether badge is of pill type',
|
||||
},
|
||||
circle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
description: 'Whether badge is circle',
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: '',
|
||||
description: 'Icon name. Will be overwritten by slot if slot is used',
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'default',
|
||||
description: 'Badge type (primary|info|danger|default|warning|success)',
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
description: 'Badge size (md, lg)',
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style></style>
|
||||
@ -1,66 +0,0 @@
|
||||
<template>
|
||||
<table class="table tablesorter" :class="tableClass">
|
||||
<thead :class="theadClasses">
|
||||
<tr>
|
||||
<slot name="columns" :columns="columns">
|
||||
<th v-for="column in columns" :key="column">{{ column }}</th>
|
||||
</slot>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody :class="tbodyClasses">
|
||||
<tr v-for="(item, index) in data" :key="index">
|
||||
<slot :row="item" :index="index">
|
||||
<td v-for="(column, index) in columns" :key="index">
|
||||
{{ itemValue(item, column) }}
|
||||
</td>
|
||||
</slot>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'base-table',
|
||||
props: {
|
||||
columns: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
description: 'Table columns',
|
||||
},
|
||||
data: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
description: 'Table data',
|
||||
},
|
||||
type: {
|
||||
type: String, // striped | hover
|
||||
default: '',
|
||||
description: 'Whether table is striped or hover type',
|
||||
},
|
||||
theadClasses: {
|
||||
type: String,
|
||||
default: '',
|
||||
description: '<thead> css classes',
|
||||
},
|
||||
tbodyClasses: {
|
||||
type: String,
|
||||
default: '',
|
||||
description: '<tbody> css classes',
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
tableClass() {
|
||||
return this.type && `table-${this.type}`
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
hasValue(item, column) {
|
||||
return item[column.toLowerCase()] !== 'undefined'
|
||||
},
|
||||
itemValue(item, column) {
|
||||
return item[column.toLowerCase()]
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style></style>
|
||||
@ -1,7 +1,3 @@
|
||||
import Badge from './Badge'
|
||||
|
||||
import BaseTable from './BaseTable.vue'
|
||||
|
||||
import BaseNav from './Navbar/BaseNav'
|
||||
import NavbarToggleButton from './Navbar/NavbarToggleButton'
|
||||
|
||||
@ -14,8 +10,6 @@ import BaseSlider from './BaseSlider.vue'
|
||||
import SidebarPlugin from './SidebarPlugin'
|
||||
|
||||
export {
|
||||
Badge,
|
||||
BaseTable,
|
||||
SidebarPlugin,
|
||||
BaseNav,
|
||||
NavbarToggleButton,
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
import Badge from '@/components/Badge.vue'
|
||||
import BaseNav from '@/components/Navbar/BaseNav'
|
||||
import { ValidationProvider, ValidationObserver } from 'vee-validate'
|
||||
|
||||
const GlobalComponents = {
|
||||
install(Vue) {
|
||||
Vue.component(Badge.name, Badge)
|
||||
Vue.component(BaseNav.name, BaseNav)
|
||||
Vue.component('validation-provider', ValidationProvider)
|
||||
Vue.component('validation-observer', ValidationObserver)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user