classcard-ui 0.2.606 → 0.2.609

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.606",
3
+ "version": "0.2.609",
4
4
  "main": "dist/classcard-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -294,7 +294,7 @@ export default {
294
294
  @apply rounded-b-md;
295
295
  }
296
296
  .vs__selected {
297
- @apply m-0 mr-1 border-none py-0 pl-1.5 pr-1.5;
297
+ @apply m-0 mr-1 border-none py-0 pl-0 pr-1.5;
298
298
  }
299
299
  .vs__selected-options {
300
300
  @apply pl-0;
@@ -33,46 +33,38 @@
33
33
  </div> -->
34
34
  <!-- This example requires Tailwind CSS v2.0+ -->
35
35
  <div>
36
+ <h3 class="text-lg font-medium leading-6 text-gray-900">{{ title }}</h3>
36
37
  <dl
37
- :class="`mt-5 grid grid-cols-1 divide-y divide-gray-200 overflow-hidden rounded-lg bg-gray-100 ${
38
- cols ? cols : 'md:grid-cols-3'
39
- } md:divide-y-0 md:divide-x`"
38
+ class="mt-5 grid grid-cols-1 divide-y divide-gray-200 overflow-hidden rounded-lg bg-gray-100 md:grid-cols-3 md:divide-y-0 md:divide-x"
40
39
  >
41
40
  <div
42
41
  class="px-4 py-5 sm:p-6"
43
42
  v-for="count in statsCount"
44
43
  v-bind:key="count.number"
45
44
  >
46
- <div class="flex">
47
- <c-icon
48
- v-if="count.icon"
49
- :name="count.icon.name"
50
- :type="count.icon.type"
51
- :class="count.icon.class"
52
- ></c-icon>
53
- <div :class="count.icon ? 'ml-3' : ''">
45
+ <div class="flex items-end justify-between">
46
+ <div>
54
47
  <dt class="flex text-sm text-gray-500">
55
48
  <span>{{ count.label }}</span>
56
49
  <span class="ml-1 text-sm text-gray-900">{{ count.number }}</span>
57
50
  </dt>
58
- <dd class="text-2xl font-semibold text-gray-900">
59
- {{ count.totalCount }}
60
- </dd>
51
+ <div class="mt-1 flex items-baseline justify-center">
52
+ <p :class="`text-2xl font-semibold ${fontColor}`">
53
+ {{ count.totalCount }}
54
+ </p>
55
+ <label v-if="count.days" class="ml-2 text-sm text-gray-500">{{
56
+ count.days
57
+ }}</label>
58
+ </div>
59
+ </div>
60
+ <div class="flex items-center pb-1" v-if="count.tag">
61
+ <c-tag
62
+ v-if="count.tag"
63
+ :label="count.tag.label"
64
+ :color="count.tag.color"
65
+ :tagClasses="count.tag.class"
66
+ ></c-tag>
61
67
  </div>
62
- </div>
63
- <div
64
- :class="`${count.icon ? 'ml-8' : ''} flex items-center pb-2`"
65
- v-if="count.tag || count.days"
66
- >
67
- <c-tag
68
- v-if="count.tag"
69
- :label="count.tag.label"
70
- :color="count.tag.color"
71
- :tagClasses="count.tag.class"
72
- ></c-tag>
73
- <label v-if="count.days" class="ml-1 text-xs text-gray-500">{{
74
- count.days
75
- }}</label>
76
68
  </div>
77
69
  </div>
78
70
  </dl>
@@ -80,21 +72,21 @@
80
72
  </template>
81
73
 
82
74
  <script>
83
- import CIcon from "../CIcon/CIcon.vue";
84
75
  import CTag from "../CTag/CTag.vue";
85
76
  export default {
86
77
  name: "CStats",
87
- components: { CIcon, CTag },
78
+ components: { CTag },
88
79
  props: {
89
80
  statsCount: {
90
81
  type: Array,
91
82
  },
92
- cols: {
83
+ title: {
84
+ type: String,
85
+ },
86
+ fontColor: {
93
87
  type: String,
88
+ default: "text-gray-900",
94
89
  },
95
- // icon: {
96
- // type: Object,
97
- // },
98
90
  },
99
91
  };
100
92
  </script>