-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAvatarGroup.vue
More file actions
94 lines (87 loc) · 3.9 KB
/
Copy pathAvatarGroup.vue
File metadata and controls
94 lines (87 loc) · 3.9 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
<script setup lang="ts">
const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as const
const colors = ['primary', 'secondary', 'success', 'info', 'warning', 'error', 'neutral'] as const
const agents = [
{ src: '', alt: 'Planner', icon: 'i-material-symbols-manage-accounts-outline', color: 'primary' },
{ src: '', alt: 'Executor', icon: 'i-material-symbols-terminal-outline', color: 'success' },
{ src: '', alt: 'Observer', icon: 'i-material-symbols-visibility-outline', color: 'info' },
{ src: '', alt: 'Auditor', icon: 'i-material-symbols-policy-outline', color: 'warning' },
{ src: '', alt: 'Scheduler', icon: 'i-material-symbols-schedule-outline', color: 'secondary' },
]
</script>
<template>
<div class="flex flex-col gap-8">
<GallerySection title="Default">
<UAvatarGroup>
<UAvatar icon="i-material-symbols-manage-accounts-outline" alt="Planner" />
<UAvatar icon="i-material-symbols-terminal-outline" alt="Executor" />
<UAvatar icon="i-material-symbols-visibility-outline" alt="Observer" />
<UAvatar icon="i-material-symbols-policy-outline" alt="Auditor" />
</UAvatarGroup>
</GallerySection>
<GallerySection title="Sizes">
<div class="flex flex-col gap-4 items-start">
<UAvatarGroup v-for="s in sizes" :key="s" :size="s">
<UAvatar icon="i-material-symbols-manage-accounts-outline" alt="Planner" />
<UAvatar icon="i-material-symbols-terminal-outline" alt="Executor" />
<UAvatar icon="i-material-symbols-visibility-outline" alt="Observer" />
</UAvatarGroup>
</div>
</GallerySection>
<GallerySection title="Colors">
<div class="flex flex-col gap-4 items-start">
<UAvatarGroup v-for="c in colors" :key="c" :color="c">
<UAvatar icon="i-material-symbols-robot-outline" alt="Agent A" />
<UAvatar icon="i-material-symbols-robot-2-outline" alt="Agent B" />
<UAvatar icon="i-material-symbols-smart-toy-outline" alt="Agent C" />
</UAvatarGroup>
</div>
</GallerySection>
<GallerySection title="Max (overflow count)">
<div class="flex flex-col gap-4 items-start">
<div class="flex items-center gap-3">
<span class="text-sm text-neutral-500 w-16">max=3</span>
<UAvatarGroup :max="3">
<UAvatar v-for="a in agents" :key="a.alt" :icon="a.icon" :alt="a.alt" />
</UAvatarGroup>
</div>
<div class="flex items-center gap-3">
<span class="text-sm text-neutral-500 w-16">max=2</span>
<UAvatarGroup :max="2">
<UAvatar v-for="a in agents" :key="a.alt" :icon="a.icon" :alt="a.alt" />
</UAvatarGroup>
</div>
<div class="flex items-center gap-3">
<span class="text-sm text-neutral-500 w-16">no max</span>
<UAvatarGroup>
<UAvatar v-for="a in agents" :key="a.alt" :icon="a.icon" :alt="a.alt" />
</UAvatarGroup>
</div>
</div>
</GallerySection>
<GallerySection title="Text initials">
<UAvatarGroup size="md">
<UAvatar text="PA" alt="Planner Agent" color="primary" />
<UAvatar text="EA" alt="Executor Agent" color="success" />
<UAvatar text="OA" alt="Observer Agent" color="info" />
<UAvatar text="SA" alt="Scheduler Agent" color="secondary" />
</UAvatarGroup>
</GallerySection>
<GallerySection title="Active runtime session">
<div class="flex items-center gap-3">
<UAvatarGroup size="sm" :max="4">
<UAvatar
v-for="a in agents"
:key="a.alt"
:icon="a.icon"
:alt="a.alt"
:chip="{ color: 'success', position: 'bottom-right' }"
/>
</UAvatarGroup>
<span class="text-sm text-neutral-600 dark:text-neutral-400">
5 agents active in <span class="font-semibold text-primary">session-7f3a</span>
</span>
</div>
</GallerySection>
</div>
</template>