classcard-ui 0.2.705 → 0.2.708
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -24
- package/dist/classcard-ui.common.js +68 -75
- package/dist/classcard-ui.common.js.map +1 -1
- package/dist/classcard-ui.umd.js +68 -75
- package/dist/classcard-ui.umd.js.map +1 -1
- package/dist/classcard-ui.umd.min.js +1 -1
- package/dist/classcard-ui.umd.min.js.map +1 -1
- package/package.json +81 -81
- package/src/App.vue +16 -16
- package/src/components/CAlerts/CAlerts.vue +70 -70
- package/src/components/CAlerts/index.js +2 -2
- package/src/components/CAnchorTabs/CAnchorTabs.vue +96 -96
- package/src/components/CAnchorTabs/index.js +2 -2
- package/src/components/CAnchorTag/CAnchorTag.vue +62 -62
- package/src/components/CAnchorTag/index.js +2 -2
- package/src/components/CAvatar/CAvatar.vue +112 -112
- package/src/components/CAvatar/index.js +2 -2
- package/src/components/CAvatarGroup/CAvatarGroup.vue +145 -145
- package/src/components/CAvatarGroup/index.js +2 -2
- package/src/components/CBasicTable/CBasicTable.vue +184 -184
- package/src/components/CBasicTable/index.js +2 -2
- package/src/components/CBreadcrumbs/CBreadcrumbs.vue +38 -38
- package/src/components/CBreadcrumbs/index.js +2 -2
- package/src/components/CButton/CButton.vue +147 -147
- package/src/components/CButton/index.js +2 -2
- package/src/components/CButtonGroup/CButtonGroup.vue +116 -116
- package/src/components/CButtonGroup/index.js +2 -2
- package/src/components/CButtonIcon/CButtonIcon.vue +91 -91
- package/src/components/CButtonIcon/index.js +2 -2
- package/src/components/CButtonLink/CButtonLink.vue +39 -39
- package/src/components/CButtonLink/index.js +2 -2
- package/src/components/CButtonSelect/CButtonSelect.vue +103 -103
- package/src/components/CButtonSelect/index.js +2 -2
- package/src/components/CButtonWithDropdown/CButtonWithDropdown.vue +168 -168
- package/src/components/CButtonWithDropdown/index.js +2 -2
- package/src/components/CCalendar/CCalendar.vue +401 -401
- package/src/components/CCalendar/index.js +3 -3
- package/src/components/CCard/CCard.vue +49 -49
- package/src/components/CCard/index.js +2 -2
- package/src/components/CCheckbox/CCheckbox.vue +70 -70
- package/src/components/CCheckbox/index.js +2 -2
- package/src/components/CCollapsibleSection/CCollapsibleSection.vue +99 -99
- package/src/components/CCollapsibleSection/index.js +2 -2
- package/src/components/CColorDots/CColorDots.vue +35 -35
- package/src/components/CColorDots/index.js +3 -3
- package/src/components/CConfirmActionModal/CConfirmActionModal.vue +120 -120
- package/src/components/CConfirmActionModal/index.js +3 -3
- package/src/components/CDatepicker/CDatepicker.vue +139 -139
- package/src/components/CDatepicker/index.js +2 -2
- package/src/components/CDualSelect/CDualSelect.vue +193 -193
- package/src/components/CDualSelect/index.js +2 -2
- package/src/components/CEditor/CEditor.vue +96 -96
- package/src/components/CEditor/index.js +2 -2
- package/src/components/CFormSectionHeading/CFormSectionHeading.vue +53 -53
- package/src/components/CFormSectionHeading/index.js +2 -2
- package/src/components/CGroupedSelect/CGroupedSelect.vue +217 -217
- package/src/components/CGroupedSelect/index.js +3 -3
- package/src/components/CIcon/CIcon.vue +77 -77
- package/src/components/CIcon/index.js +2 -2
- package/src/components/CIconDropdown/CIconDropdown.vue +111 -111
- package/src/components/CIconDropdown/index.js +2 -2
- package/src/components/CInput/CInput.vue +120 -120
- package/src/components/CInput/index.js +2 -2
- package/src/components/CInputAddon/CInputAddon.vue +202 -202
- package/src/components/CInputAddon/index.js +2 -2
- package/src/components/CInputEmail/CInputEmail.vue +93 -93
- package/src/components/CInputEmail/index.js +2 -2
- package/src/components/CModalHeading/CModalHeading.vue +22 -22
- package/src/components/CModalHeading/index.js +2 -2
- package/src/components/CModuleHelpLinks/CModuleHelpLinks.vue +39 -39
- package/src/components/CModuleHelpLinks/index.js +3 -3
- package/src/components/CMultiselect/CMultiselect.vue +339 -339
- package/src/components/CMultiselect/index.js +2 -2
- package/src/components/CMultiselectr/CMultiselectr.vue +44 -44
- package/src/components/CMultiselectr/index.js +2 -2
- package/src/components/CPageHeading/CPageHeading.vue +56 -56
- package/src/components/CPageHeading/index.js +2 -2
- package/src/components/CPagination/CPagination.vue +202 -202
- package/src/components/CPagination/index.js +2 -2
- package/src/components/CPhoneNumber/CPhoneNumber.vue +81 -81
- package/src/components/CPhoneNumber/index.js +2 -2
- package/src/components/CRadio/CRadio.vue +106 -106
- package/src/components/CRadio/index.js +2 -2
- package/src/components/CRangeSlider/CRangeSlider.vue +55 -55
- package/src/components/CRangeSlider/index.js +2 -2
- package/src/components/CReorderableStackedList/CReorderableStackedList.vue +94 -94
- package/src/components/CReorderableStackedList/index.js +2 -2
- package/src/components/CSelect/CSelect.vue +348 -343
- package/src/components/CSelect/index.js +2 -2
- package/src/components/CSmallTimeline/CSmallTimeline.vue +40 -40
- package/src/components/CSmallTimeline/index.js +2 -2
- package/src/components/CStackedList/CStackedList.vue +132 -132
- package/src/components/CStackedList/index.js +2 -2
- package/src/components/CStats/CStats.vue +111 -111
- package/src/components/CStats/index.js +2 -2
- package/src/components/CSwitch/CSwitch.vue +140 -140
- package/src/components/CSwitch/index.js +2 -2
- package/src/components/CTable/CTable.vue +536 -536
- package/src/components/CTable/index.js +2 -2
- package/src/components/CTabs/CTabs.vue +111 -111
- package/src/components/CTabs/index.js +2 -2
- package/src/components/CTag/CTag.vue +36 -36
- package/src/components/CTag/index.js +2 -2
- package/src/components/CTextarea/CTextarea.vue +95 -95
- package/src/components/CTextarea/index.js +2 -2
- package/src/components/CTimeline/CTimeline.vue +237 -237
- package/src/components/CTimeline/index.js +2 -2
- package/src/components/CUpload/CUpload.vue +231 -231
- package/src/components/CUpload/index.js +2 -2
- package/src/components/index.js +48 -48
- package/src/icons.js +285 -285
- package/src/main.js +22 -22
- package/src/stories/CAlerts.stories.js +37 -37
- package/src/stories/CAnchorTabs.stories.js +29 -29
- package/src/stories/CAnchorTag.stories.js +36 -36
- package/src/stories/CAvatar.stories.js +38 -38
- package/src/stories/CAvatarGroup.stories.js +100 -100
- package/src/stories/CBasicTable.stories.js +316 -316
- package/src/stories/CBreadcrumbs.stories.js +24 -24
- package/src/stories/CButton.stories.js +46 -46
- package/src/stories/CButtonGroup.stories.js +33 -33
- package/src/stories/CButtonIcon.stories.js +27 -27
- package/src/stories/CButtonLink.stories.js +24 -24
- package/src/stories/CButtonSelect.stories.js +32 -32
- package/src/stories/CButtonWithDropdown.stories.js +41 -41
- package/src/stories/CCalendar.stories.js +16 -16
- package/src/stories/CCard.stories.js +30 -30
- package/src/stories/CCheckbox.stories.js +29 -29
- package/src/stories/CCollapsibleSection.stories.js +28 -28
- package/src/stories/CColorDots.stories.js +28 -28
- package/src/stories/CConfirmActionModal.stories.js +59 -59
- package/src/stories/CDatepicker.stories.js +30 -30
- package/src/stories/CDualSelect.stories.js +29 -29
- package/src/stories/CEditor.stories.js +30 -30
- package/src/stories/CFormSectionHeading.stories.js +34 -34
- package/src/stories/CGroupedSelect.stories.js +69 -69
- package/src/stories/CIcon.stories.js +26 -26
- package/src/stories/CIconDropdown.stories.js +39 -39
- package/src/stories/CInput.stories.js +36 -36
- package/src/stories/CInputAddon.stories.js +37 -37
- package/src/stories/CInputEmail.stories.js +27 -27
- package/src/stories/CModalHeading.stories.js +25 -25
- package/src/stories/CModuleHelpLinks.stories.js +25 -25
- package/src/stories/CMultiselect.stories.js +97 -97
- package/src/stories/CMultiselectr.stories.js +23 -23
- package/src/stories/CPageHeading.stories.js +32 -32
- package/src/stories/CPagination.stories.js +30 -30
- package/src/stories/CPhoneNumber.stories.js +29 -29
- package/src/stories/CRadio.stories.js +36 -36
- package/src/stories/CRangeSlider.stories.js +23 -23
- package/src/stories/CReorderableStackedList.stories.js +23 -23
- package/src/stories/CSelect.stories.js +50 -50
- package/src/stories/CSmallTimeline.stories.js +26 -26
- package/src/stories/CStackedList.stories.js +37 -37
- package/src/stories/CStats.stories.js +33 -33
- package/src/stories/CSwitch.stories.js +28 -28
- package/src/stories/CTable.stories.js +77 -77
- package/src/stories/CTabs.stories.js +33 -33
- package/src/stories/CTag.stories.js +23 -23
- package/src/stories/CTextarea.stories.js +32 -32
- package/src/stories/CTimeline.stories.js +26 -26
- package/src/stories/CUpload.stories.js +36 -36
- package/src/stories/Introduction.stories.mdx +207 -207
- package/src/stories/Page.vue +88 -88
- package/src/stories/assets/code-brackets.svg +0 -0
- package/src/stories/assets/colors.svg +0 -0
- package/src/stories/assets/comments.svg +0 -0
- package/src/stories/assets/direction.svg +0 -0
- package/src/stories/assets/flow.svg +0 -0
- package/src/stories/assets/plugin.svg +0 -0
- package/src/stories/assets/repo.svg +0 -0
- package/src/stories/assets/stackalt.svg +0 -0
- package/src/stories/header.css +26 -26
- package/src/stories/page.css +69 -69
- package/src/stories/utils.css +17 -17
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import CSelect from './CSelect.vue'
|
|
2
|
-
|
|
1
|
+
import CSelect from './CSelect.vue'
|
|
2
|
+
|
|
3
3
|
export default CSelect
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="flow-root">
|
|
4
|
-
<ul>
|
|
5
|
-
<li v-for="timeline in timelineItems" v-bind:key="timeline.label">
|
|
6
|
-
<div class="relative pb-1">
|
|
7
|
-
<span
|
|
8
|
-
class="absolute left-1 top-0.5 -ml-px h-full w-0.5 bg-indigo-600"
|
|
9
|
-
aria-hidden="true"
|
|
10
|
-
></span>
|
|
11
|
-
<div class="relative ml-3">
|
|
12
|
-
<div class="min-w-0 mb-1.5">
|
|
13
|
-
<div>
|
|
14
|
-
<p class="text-sm text-gray-400">
|
|
15
|
-
{{ timeline.label }}
|
|
16
|
-
</p>
|
|
17
|
-
</div>
|
|
18
|
-
<div><span class="text-sm text-gray-400">12/25</span></div>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</li>
|
|
23
|
-
</ul>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script>
|
|
29
|
-
export default {
|
|
30
|
-
name: "CSmallTimeline",
|
|
31
|
-
props: {
|
|
32
|
-
timelineItems: {
|
|
33
|
-
type: Array,
|
|
34
|
-
required: true,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<style></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="flow-root">
|
|
4
|
+
<ul>
|
|
5
|
+
<li v-for="timeline in timelineItems" v-bind:key="timeline.label">
|
|
6
|
+
<div class="relative pb-1">
|
|
7
|
+
<span
|
|
8
|
+
class="absolute left-1 top-0.5 -ml-px h-full w-0.5 bg-indigo-600"
|
|
9
|
+
aria-hidden="true"
|
|
10
|
+
></span>
|
|
11
|
+
<div class="relative ml-3">
|
|
12
|
+
<div class="min-w-0 mb-1.5">
|
|
13
|
+
<div>
|
|
14
|
+
<p class="text-sm text-gray-400">
|
|
15
|
+
{{ timeline.label }}
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
<div><span class="text-sm text-gray-400">12/25</span></div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</li>
|
|
23
|
+
</ul>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script>
|
|
29
|
+
export default {
|
|
30
|
+
name: "CSmallTimeline",
|
|
31
|
+
props: {
|
|
32
|
+
timelineItems: {
|
|
33
|
+
type: Array,
|
|
34
|
+
required: true,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style></style>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import CSmallTimeline from './CSmallTimeline.vue'
|
|
2
|
-
|
|
1
|
+
import CSmallTimeline from './CSmallTimeline.vue'
|
|
2
|
+
|
|
3
3
|
export default CSmallTimeline
|
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<ul>
|
|
4
|
-
<li
|
|
5
|
-
v-for="items in listItems"
|
|
6
|
-
v-bind:key="items.size"
|
|
7
|
-
class="flex items-center justify-between py-4"
|
|
8
|
-
:class="{
|
|
9
|
-
'cursor-pointer': items.collapse,
|
|
10
|
-
'border-b border-gray-200': divider === true,
|
|
11
|
-
}"
|
|
12
|
-
>
|
|
13
|
-
<div
|
|
14
|
-
class="flex w-full"
|
|
15
|
-
v-on="items.collapse ? { click: () => collapseList() } : null"
|
|
16
|
-
>
|
|
17
|
-
<c-icon
|
|
18
|
-
v-if="items.collapse"
|
|
19
|
-
:name="showSection ? 'chevron-down' : 'chevron-right'"
|
|
20
|
-
type="solid"
|
|
21
|
-
class="mt-3 mr-3 h-5 w-5 shrink-0 text-gray-900"
|
|
22
|
-
></c-icon>
|
|
23
|
-
|
|
24
|
-
<div v-if="isIcon" class="h-full rounded-md bg-gray-100">
|
|
25
|
-
<c-avatar
|
|
26
|
-
v-if="items.image"
|
|
27
|
-
:size="items.size"
|
|
28
|
-
:rounded="items.rounded"
|
|
29
|
-
:image="items.image"
|
|
30
|
-
class="shrink-0"
|
|
31
|
-
></c-avatar>
|
|
32
|
-
<c-icon
|
|
33
|
-
v-else
|
|
34
|
-
:name="icon.name"
|
|
35
|
-
:type="icon.type"
|
|
36
|
-
:class="icon.class"
|
|
37
|
-
></c-icon>
|
|
38
|
-
</div>
|
|
39
|
-
<c-avatar
|
|
40
|
-
v-else
|
|
41
|
-
:size="items.size"
|
|
42
|
-
:rounded="items.rounded"
|
|
43
|
-
:image="items.image"
|
|
44
|
-
class="shrink-0"
|
|
45
|
-
></c-avatar>
|
|
46
|
-
<div class="ml-3 w-full">
|
|
47
|
-
<div class="flex pb-1">
|
|
48
|
-
<p class="text-sm font-medium text-gray-900">
|
|
49
|
-
{{ items.heading }}
|
|
50
|
-
</p>
|
|
51
|
-
<c-tag
|
|
52
|
-
v-if="items.tag"
|
|
53
|
-
:label="items.tagLabel"
|
|
54
|
-
:color="items.tagColor"
|
|
55
|
-
class="relative bottom-0.5 ml-2.5"
|
|
56
|
-
></c-tag>
|
|
57
|
-
</div>
|
|
58
|
-
<p class="text-sm text-gray-500">{{ items.description }}</p>
|
|
59
|
-
<div v-if="showSection" class="mt-3">
|
|
60
|
-
<slot></slot>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
<!-- <c-icon
|
|
65
|
-
v-if="items.listIcon"
|
|
66
|
-
name="trash"
|
|
67
|
-
class="h-5 w-5 text-gray-500 hover:text-red-500 cursor-pointer"
|
|
68
|
-
type="solid"
|
|
69
|
-
></c-icon> -->
|
|
70
|
-
<button
|
|
71
|
-
v-if="items.listIcon"
|
|
72
|
-
type="button"
|
|
73
|
-
:id="listId ? listId : ''"
|
|
74
|
-
class="flex h-8 w-8 items-center justify-center rounded-full text-gray-500 hover:bg-red-100 hover:text-red-800 focus:outline-none focus:ring-2 focus:ring-red-500"
|
|
75
|
-
@click="deleteItem"
|
|
76
|
-
>
|
|
77
|
-
<c-icon
|
|
78
|
-
name="trash"
|
|
79
|
-
type="solid"
|
|
80
|
-
class="h-5 w-5 hover:text-red-800"
|
|
81
|
-
></c-icon>
|
|
82
|
-
</button>
|
|
83
|
-
</li>
|
|
84
|
-
</ul>
|
|
85
|
-
</div>
|
|
86
|
-
</template>
|
|
87
|
-
<script>
|
|
88
|
-
import CAvatar from "../CAvatar/CAvatar.vue";
|
|
89
|
-
import CTag from "../CTag/CTag.vue";
|
|
90
|
-
import CIcon from "../CIcon/CIcon.vue";
|
|
91
|
-
export default {
|
|
92
|
-
name: "CStackedList",
|
|
93
|
-
components: { CAvatar, CTag, CIcon },
|
|
94
|
-
props: {
|
|
95
|
-
listItems: {
|
|
96
|
-
type: Array,
|
|
97
|
-
required: true,
|
|
98
|
-
},
|
|
99
|
-
divider: {
|
|
100
|
-
type: Boolean,
|
|
101
|
-
default: true,
|
|
102
|
-
},
|
|
103
|
-
isIcon: {
|
|
104
|
-
type: Boolean,
|
|
105
|
-
default: false,
|
|
106
|
-
},
|
|
107
|
-
listId: {
|
|
108
|
-
type: String,
|
|
109
|
-
},
|
|
110
|
-
icon: {
|
|
111
|
-
type: Object,
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
data() {
|
|
115
|
-
return {
|
|
116
|
-
showSection: false,
|
|
117
|
-
};
|
|
118
|
-
},
|
|
119
|
-
methods: {
|
|
120
|
-
collapseList() {
|
|
121
|
-
this.showSection = !this.showSection;
|
|
122
|
-
},
|
|
123
|
-
deleteItem(item) {
|
|
124
|
-
if (this.listId) {
|
|
125
|
-
this.$emit("delete-item", this.listId, item);
|
|
126
|
-
} else {
|
|
127
|
-
this.$emit("delete-item", item);
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
};
|
|
132
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<ul>
|
|
4
|
+
<li
|
|
5
|
+
v-for="items in listItems"
|
|
6
|
+
v-bind:key="items.size"
|
|
7
|
+
class="flex items-center justify-between py-4"
|
|
8
|
+
:class="{
|
|
9
|
+
'cursor-pointer': items.collapse,
|
|
10
|
+
'border-b border-gray-200': divider === true,
|
|
11
|
+
}"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
class="flex w-full"
|
|
15
|
+
v-on="items.collapse ? { click: () => collapseList() } : null"
|
|
16
|
+
>
|
|
17
|
+
<c-icon
|
|
18
|
+
v-if="items.collapse"
|
|
19
|
+
:name="showSection ? 'chevron-down' : 'chevron-right'"
|
|
20
|
+
type="solid"
|
|
21
|
+
class="mt-3 mr-3 h-5 w-5 shrink-0 text-gray-900"
|
|
22
|
+
></c-icon>
|
|
23
|
+
|
|
24
|
+
<div v-if="isIcon" class="h-full rounded-md bg-gray-100">
|
|
25
|
+
<c-avatar
|
|
26
|
+
v-if="items.image"
|
|
27
|
+
:size="items.size"
|
|
28
|
+
:rounded="items.rounded"
|
|
29
|
+
:image="items.image"
|
|
30
|
+
class="shrink-0"
|
|
31
|
+
></c-avatar>
|
|
32
|
+
<c-icon
|
|
33
|
+
v-else
|
|
34
|
+
:name="icon.name"
|
|
35
|
+
:type="icon.type"
|
|
36
|
+
:class="icon.class"
|
|
37
|
+
></c-icon>
|
|
38
|
+
</div>
|
|
39
|
+
<c-avatar
|
|
40
|
+
v-else
|
|
41
|
+
:size="items.size"
|
|
42
|
+
:rounded="items.rounded"
|
|
43
|
+
:image="items.image"
|
|
44
|
+
class="shrink-0"
|
|
45
|
+
></c-avatar>
|
|
46
|
+
<div class="ml-3 w-full">
|
|
47
|
+
<div class="flex pb-1">
|
|
48
|
+
<p class="text-sm font-medium text-gray-900">
|
|
49
|
+
{{ items.heading }}
|
|
50
|
+
</p>
|
|
51
|
+
<c-tag
|
|
52
|
+
v-if="items.tag"
|
|
53
|
+
:label="items.tagLabel"
|
|
54
|
+
:color="items.tagColor"
|
|
55
|
+
class="relative bottom-0.5 ml-2.5"
|
|
56
|
+
></c-tag>
|
|
57
|
+
</div>
|
|
58
|
+
<p class="text-sm text-gray-500">{{ items.description }}</p>
|
|
59
|
+
<div v-if="showSection" class="mt-3">
|
|
60
|
+
<slot></slot>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<!-- <c-icon
|
|
65
|
+
v-if="items.listIcon"
|
|
66
|
+
name="trash"
|
|
67
|
+
class="h-5 w-5 text-gray-500 hover:text-red-500 cursor-pointer"
|
|
68
|
+
type="solid"
|
|
69
|
+
></c-icon> -->
|
|
70
|
+
<button
|
|
71
|
+
v-if="items.listIcon"
|
|
72
|
+
type="button"
|
|
73
|
+
:id="listId ? listId : ''"
|
|
74
|
+
class="flex h-8 w-8 items-center justify-center rounded-full text-gray-500 hover:bg-red-100 hover:text-red-800 focus:outline-none focus:ring-2 focus:ring-red-500"
|
|
75
|
+
@click="deleteItem"
|
|
76
|
+
>
|
|
77
|
+
<c-icon
|
|
78
|
+
name="trash"
|
|
79
|
+
type="solid"
|
|
80
|
+
class="h-5 w-5 hover:text-red-800"
|
|
81
|
+
></c-icon>
|
|
82
|
+
</button>
|
|
83
|
+
</li>
|
|
84
|
+
</ul>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
<script>
|
|
88
|
+
import CAvatar from "../CAvatar/CAvatar.vue";
|
|
89
|
+
import CTag from "../CTag/CTag.vue";
|
|
90
|
+
import CIcon from "../CIcon/CIcon.vue";
|
|
91
|
+
export default {
|
|
92
|
+
name: "CStackedList",
|
|
93
|
+
components: { CAvatar, CTag, CIcon },
|
|
94
|
+
props: {
|
|
95
|
+
listItems: {
|
|
96
|
+
type: Array,
|
|
97
|
+
required: true,
|
|
98
|
+
},
|
|
99
|
+
divider: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: true,
|
|
102
|
+
},
|
|
103
|
+
isIcon: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
default: false,
|
|
106
|
+
},
|
|
107
|
+
listId: {
|
|
108
|
+
type: String,
|
|
109
|
+
},
|
|
110
|
+
icon: {
|
|
111
|
+
type: Object,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
data() {
|
|
115
|
+
return {
|
|
116
|
+
showSection: false,
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
methods: {
|
|
120
|
+
collapseList() {
|
|
121
|
+
this.showSection = !this.showSection;
|
|
122
|
+
},
|
|
123
|
+
deleteItem(item) {
|
|
124
|
+
if (this.listId) {
|
|
125
|
+
this.$emit("delete-item", this.listId, item);
|
|
126
|
+
} else {
|
|
127
|
+
this.$emit("delete-item", item);
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
</script>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import CStackedList from './CStackedList.vue'
|
|
2
|
-
|
|
1
|
+
import CStackedList from './CStackedList.vue'
|
|
2
|
+
|
|
3
3
|
export default CStackedList
|
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- <div>
|
|
3
|
-
<dl class="mt-5 sm:flex sm:flex-col md:flex md:flex-row justify-between">
|
|
4
|
-
<div
|
|
5
|
-
:class="index == statsCount.length - 1 ? '' : 'mr-2'"
|
|
6
|
-
class="bg-white w-full overflow-hidden shadow rounded-lg"
|
|
7
|
-
v-for="(count, index) in statsCount"
|
|
8
|
-
v-bind:key="count.number"
|
|
9
|
-
>
|
|
10
|
-
<div class="px-4 pt-3 pb-1 flex">
|
|
11
|
-
<c-icon
|
|
12
|
-
v-if="count.icon"
|
|
13
|
-
:name="count.icon.name"
|
|
14
|
-
:type="count.icon.type"
|
|
15
|
-
:class="count.icon.class"
|
|
16
|
-
></c-icon>
|
|
17
|
-
<div :class="count.icon ? 'ml-3' : ''">
|
|
18
|
-
<dt class="text-sm text-gray-500 flex">
|
|
19
|
-
<span>{{ count.label }}</span>
|
|
20
|
-
<span class="text-sm text-gray-900 ml-1">{{ count.number }}</span>
|
|
21
|
-
</dt>
|
|
22
|
-
<dd class="text-2xl font-semibold text-gray-900">
|
|
23
|
-
{{ count.totalCount }}
|
|
24
|
-
</dd>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="ml-12 pb-2 flex items-center" v-if="count.tag || count.days">
|
|
28
|
-
<c-tag v-if="count.tag" :label="count.tag.label" :color="count.tag.color"></c-tag>
|
|
29
|
-
<label v-if="count.days" class="text-xs text-gray-500 ml-1">{{ count.days }}</label>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</dl>
|
|
33
|
-
</div> -->
|
|
34
|
-
<!-- This example requires Tailwind CSS v2.0+ -->
|
|
35
|
-
<div>
|
|
36
|
-
<div class="flex items-center justify-between" v-if="title">
|
|
37
|
-
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
|
38
|
-
{{ title.heading }}
|
|
39
|
-
</h3>
|
|
40
|
-
<c-tag
|
|
41
|
-
v-if="title.label"
|
|
42
|
-
class="hidden sm:block"
|
|
43
|
-
:label="title.label"
|
|
44
|
-
color="green"
|
|
45
|
-
></c-tag>
|
|
46
|
-
</div>
|
|
47
|
-
<dl
|
|
48
|
-
:class="`mt-4 grid grid-cols-1 divide-y ${
|
|
49
|
-
colorClasses ? colorClasses.divide : 'divide-gray-200'
|
|
50
|
-
} overflow-hidden rounded-lg ${
|
|
51
|
-
colorClasses ? colorClasses.background : 'bg-gray-100'
|
|
52
|
-
} md:grid-cols-3 md:divide-y-0 md:divide-x`"
|
|
53
|
-
>
|
|
54
|
-
<div
|
|
55
|
-
class="px-4 py-5 sm:p-6"
|
|
56
|
-
v-for="count in statsCount"
|
|
57
|
-
v-bind:key="count.number"
|
|
58
|
-
>
|
|
59
|
-
<div
|
|
60
|
-
class="flex items-end justify-between md:flex-col md:items-start md:justify-center lg:flex-row lg:items-end lg:justify-between"
|
|
61
|
-
>
|
|
62
|
-
<div>
|
|
63
|
-
<dt class="flex text-sm text-gray-500">
|
|
64
|
-
<span>{{ count.label }}</span>
|
|
65
|
-
<span class="ml-1 text-sm text-gray-900">{{ count.number }}</span>
|
|
66
|
-
</dt>
|
|
67
|
-
<div class="mt-1 flex items-baseline justify-start">
|
|
68
|
-
<p :class="`text-2xl font-semibold ${fontColor}`">
|
|
69
|
-
{{ count.totalCount }}
|
|
70
|
-
</p>
|
|
71
|
-
<label v-if="count.days" class="ml-2 text-xs text-gray-500">{{
|
|
72
|
-
count.days
|
|
73
|
-
}}</label>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
<c-tag
|
|
77
|
-
v-if="count.tag"
|
|
78
|
-
:label="count.tag.label"
|
|
79
|
-
:color="count.tag.color"
|
|
80
|
-
tagClasses="rounded-full text-xs"
|
|
81
|
-
></c-tag>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</dl>
|
|
85
|
-
</div>
|
|
86
|
-
</template>
|
|
87
|
-
|
|
88
|
-
<script>
|
|
89
|
-
import CTag from "../CTag/CTag.vue";
|
|
90
|
-
export default {
|
|
91
|
-
name: "CStats",
|
|
92
|
-
components: { CTag },
|
|
93
|
-
props: {
|
|
94
|
-
statsCount: {
|
|
95
|
-
type: Array,
|
|
96
|
-
},
|
|
97
|
-
title: {
|
|
98
|
-
type: Object,
|
|
99
|
-
},
|
|
100
|
-
fontColor: {
|
|
101
|
-
type: String,
|
|
102
|
-
default: "text-gray-900",
|
|
103
|
-
},
|
|
104
|
-
colorClasses: {
|
|
105
|
-
type: Object,
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
</script>
|
|
110
|
-
|
|
111
|
-
<style></style>
|
|
1
|
+
<template>
|
|
2
|
+
<!-- <div>
|
|
3
|
+
<dl class="mt-5 sm:flex sm:flex-col md:flex md:flex-row justify-between">
|
|
4
|
+
<div
|
|
5
|
+
:class="index == statsCount.length - 1 ? '' : 'mr-2'"
|
|
6
|
+
class="bg-white w-full overflow-hidden shadow rounded-lg"
|
|
7
|
+
v-for="(count, index) in statsCount"
|
|
8
|
+
v-bind:key="count.number"
|
|
9
|
+
>
|
|
10
|
+
<div class="px-4 pt-3 pb-1 flex">
|
|
11
|
+
<c-icon
|
|
12
|
+
v-if="count.icon"
|
|
13
|
+
:name="count.icon.name"
|
|
14
|
+
:type="count.icon.type"
|
|
15
|
+
:class="count.icon.class"
|
|
16
|
+
></c-icon>
|
|
17
|
+
<div :class="count.icon ? 'ml-3' : ''">
|
|
18
|
+
<dt class="text-sm text-gray-500 flex">
|
|
19
|
+
<span>{{ count.label }}</span>
|
|
20
|
+
<span class="text-sm text-gray-900 ml-1">{{ count.number }}</span>
|
|
21
|
+
</dt>
|
|
22
|
+
<dd class="text-2xl font-semibold text-gray-900">
|
|
23
|
+
{{ count.totalCount }}
|
|
24
|
+
</dd>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="ml-12 pb-2 flex items-center" v-if="count.tag || count.days">
|
|
28
|
+
<c-tag v-if="count.tag" :label="count.tag.label" :color="count.tag.color"></c-tag>
|
|
29
|
+
<label v-if="count.days" class="text-xs text-gray-500 ml-1">{{ count.days }}</label>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</dl>
|
|
33
|
+
</div> -->
|
|
34
|
+
<!-- This example requires Tailwind CSS v2.0+ -->
|
|
35
|
+
<div>
|
|
36
|
+
<div class="flex items-center justify-between" v-if="title">
|
|
37
|
+
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
|
38
|
+
{{ title.heading }}
|
|
39
|
+
</h3>
|
|
40
|
+
<c-tag
|
|
41
|
+
v-if="title.label"
|
|
42
|
+
class="hidden sm:block"
|
|
43
|
+
:label="title.label"
|
|
44
|
+
color="green"
|
|
45
|
+
></c-tag>
|
|
46
|
+
</div>
|
|
47
|
+
<dl
|
|
48
|
+
:class="`mt-4 grid grid-cols-1 divide-y ${
|
|
49
|
+
colorClasses ? colorClasses.divide : 'divide-gray-200'
|
|
50
|
+
} overflow-hidden rounded-lg ${
|
|
51
|
+
colorClasses ? colorClasses.background : 'bg-gray-100'
|
|
52
|
+
} md:grid-cols-3 md:divide-y-0 md:divide-x`"
|
|
53
|
+
>
|
|
54
|
+
<div
|
|
55
|
+
class="px-4 py-5 sm:p-6"
|
|
56
|
+
v-for="count in statsCount"
|
|
57
|
+
v-bind:key="count.number"
|
|
58
|
+
>
|
|
59
|
+
<div
|
|
60
|
+
class="flex items-end justify-between md:flex-col md:items-start md:justify-center lg:flex-row lg:items-end lg:justify-between"
|
|
61
|
+
>
|
|
62
|
+
<div>
|
|
63
|
+
<dt class="flex text-sm text-gray-500">
|
|
64
|
+
<span>{{ count.label }}</span>
|
|
65
|
+
<span class="ml-1 text-sm text-gray-900">{{ count.number }}</span>
|
|
66
|
+
</dt>
|
|
67
|
+
<div class="mt-1 flex items-baseline justify-start">
|
|
68
|
+
<p :class="`text-2xl font-semibold ${fontColor}`">
|
|
69
|
+
{{ count.totalCount }}
|
|
70
|
+
</p>
|
|
71
|
+
<label v-if="count.days" class="ml-2 text-xs text-gray-500">{{
|
|
72
|
+
count.days
|
|
73
|
+
}}</label>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
<c-tag
|
|
77
|
+
v-if="count.tag"
|
|
78
|
+
:label="count.tag.label"
|
|
79
|
+
:color="count.tag.color"
|
|
80
|
+
tagClasses="rounded-full text-xs"
|
|
81
|
+
></c-tag>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</dl>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<script>
|
|
89
|
+
import CTag from "../CTag/CTag.vue";
|
|
90
|
+
export default {
|
|
91
|
+
name: "CStats",
|
|
92
|
+
components: { CTag },
|
|
93
|
+
props: {
|
|
94
|
+
statsCount: {
|
|
95
|
+
type: Array,
|
|
96
|
+
},
|
|
97
|
+
title: {
|
|
98
|
+
type: Object,
|
|
99
|
+
},
|
|
100
|
+
fontColor: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: "text-gray-900",
|
|
103
|
+
},
|
|
104
|
+
colorClasses: {
|
|
105
|
+
type: Object,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style></style>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import CStats from './CStats.vue'
|
|
2
|
-
|
|
1
|
+
import CStats from './CStats.vue'
|
|
2
|
+
|
|
3
3
|
export default CStats
|