-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAvatar.vue
More file actions
99 lines (91 loc) · 3.2 KB
/
Copy pathAvatar.vue
File metadata and controls
99 lines (91 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<script setup lang="ts">
const colors = ['primary', 'secondary', 'success', 'info', 'warning', 'error', 'neutral'] as const
const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as const
const agents = [
{ alt: 'Planner Agent', src: '', text: 'PA' },
{ alt: 'Executor Agent', src: '', text: 'EA' },
{ alt: 'Monitor Agent', src: '', text: 'MA' },
{ alt: 'Router Agent', src: '', text: 'RA' },
{ alt: 'Auditor Agent', src: '', text: 'AU' },
]
</script>
<template>
<div class="flex flex-col gap-8">
<GallerySection title="Colors">
<div class="flex flex-wrap gap-3 items-center">
<UAvatar
v-for="c in colors"
:key="c"
:color="c"
:text="c.slice(0, 2).toUpperCase()"
size="md"
/>
</div>
</GallerySection>
<GallerySection title="Sizes">
<div class="flex flex-wrap gap-3 items-end">
<UAvatar
v-for="s in sizes"
:key="s"
:size="s"
color="primary"
icon="i-material-symbols-smart-toy-outline"
/>
</div>
</GallerySection>
<GallerySection title="With icon">
<UAvatar icon="i-material-symbols-rocket-launch-outline" color="primary" size="lg" />
<UAvatar icon="i-material-symbols-memory-outline" color="info" size="lg" />
<UAvatar icon="i-material-symbols-timeline" color="success" size="lg" />
<UAvatar icon="i-material-symbols-timer-outline" color="warning" size="lg" />
<UAvatar icon="i-material-symbols-stop-circle-outline" color="error" size="lg" />
</GallerySection>
<GallerySection title="With text initials">
<UAvatar text="AR" color="primary" size="lg" />
<UAvatar text="CP" color="secondary" size="lg" />
<UAvatar text="RT" color="neutral" size="lg" />
</GallerySection>
<GallerySection title="With chip (status indicator)">
<UAvatar
icon="i-material-symbols-smart-toy-outline"
color="primary"
size="xl"
:chip="{ color: 'success', position: 'bottom-right' }"
/>
<UAvatar
text="EA"
color="info"
size="xl"
:chip="{ color: 'warning', position: 'bottom-right' }"
/>
<UAvatar
text="MA"
color="neutral"
size="xl"
:chip="{ color: 'error', position: 'bottom-right' }"
/>
</GallerySection>
<GallerySection title="Agent group (AvatarGroup)">
<UAvatarGroup :max="4" size="md" color="primary">
<UAvatar
v-for="agent in agents"
:key="agent.alt"
:alt="agent.alt"
:text="agent.text"
color="primary"
/>
</UAvatarGroup>
</GallerySection>
<GallerySection title="Runtime session roster">
<div class="flex items-center gap-3">
<UAvatarGroup size="sm">
<UAvatar text="PA" color="primary" :chip="{ color: 'success' }" />
<UAvatar text="EA" color="secondary" :chip="{ color: 'success' }" />
<UAvatar text="MA" color="info" :chip="{ color: 'warning' }" />
<UAvatar text="RA" color="neutral" :chip="{ color: 'error' }" />
</UAvatarGroup>
<span class="text-sm text-muted">4 agents in session · 2 idle</span>
</div>
</GallerySection>
</div>
</template>