@redseed/redseed-ui-vue3 5.2.0 → 5.3.0
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
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import Card from './Card.vue'
|
|
3
|
+
|
|
4
|
+
const emit = defineEmits(['click:icon'])
|
|
5
|
+
|
|
6
|
+
function handleIconClick() {
|
|
7
|
+
emit('click:icon')
|
|
8
|
+
}
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<Card class="rsui-metric-card">
|
|
13
|
+
<div class="rsui-metric-card__container">
|
|
14
|
+
<div class="rsui-metric-card__header">
|
|
15
|
+
<div class="rsui-metric-card__avatar">
|
|
16
|
+
<slot name="avatar"></slot>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="rsui-metric-card__icon"
|
|
19
|
+
@click="handleIconClick"
|
|
20
|
+
>
|
|
21
|
+
<slot name="icon"></slot>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="rsui-metric-card__content">
|
|
26
|
+
<div class="rsui-metric-card__title" v-if="$slots.title">
|
|
27
|
+
<slot name="title"></slot>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="rsui-metric-card__value" v-if="$slots.value">
|
|
30
|
+
<slot name="value"></slot>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</Card>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<style lang="scss" scoped>
|
|
38
|
+
.rsui-metric-card {
|
|
39
|
+
@apply w-64 sm:w-96;
|
|
40
|
+
|
|
41
|
+
&__header {
|
|
42
|
+
@apply flex items-center justify-between;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&__avatar {
|
|
46
|
+
@apply size-14 rounded-full overflow-hidden flex items-center justify-center pointer-events-auto;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__icon {
|
|
50
|
+
@apply text-rsui-grey-800 transition-transform pointer-events-auto cursor-pointer size-6;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&__content {
|
|
54
|
+
@apply flex flex-col gap-2;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__title {
|
|
58
|
+
@apply text-sm font-normal text-rsui-grey-700 mt-4;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&__value {
|
|
62
|
+
@apply text-3xl font-semibold text-rsui-grey-900 leading-9;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
</style>
|
|
@@ -3,11 +3,12 @@ import Card from './Card.vue'
|
|
|
3
3
|
import CardHeader from './CardHeader.vue'
|
|
4
4
|
import CardResource from './CardResource.vue'
|
|
5
5
|
import RadioCard from './RadioCard.vue'
|
|
6
|
-
|
|
6
|
+
import MetricCard from './MetricCard.vue'
|
|
7
7
|
export {
|
|
8
8
|
ButtonCard,
|
|
9
9
|
Card,
|
|
10
10
|
CardHeader,
|
|
11
11
|
CardResource,
|
|
12
12
|
RadioCard,
|
|
13
|
+
MetricCard,
|
|
13
14
|
}
|