-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChip.vue
More file actions
132 lines (120 loc) · 4.33 KB
/
Copy pathChip.vue
File metadata and controls
132 lines (120 loc) · 4.33 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<script setup lang="ts">
const colors = ['primary', 'secondary', 'success', 'info', 'warning', 'error', 'neutral'] as const
const sizes = ['3xs', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl'] as const
const positions = ['top-right', 'bottom-right', 'top-left', 'bottom-left'] as const
const agents = [
{ name: 'executor-01', status: 'success', label: 'Running' },
{ name: 'planner-02', status: 'warning', label: 'Idle' },
{ name: 'monitor-03', status: 'error', label: 'Faulted' },
{ name: 'router-04', status: 'info', label: 'Pending' },
]
</script>
<template>
<div class="flex flex-col gap-8">
<GallerySection title="Colors">
<div class="flex flex-wrap gap-6 items-center">
<UChip
v-for="c in colors"
:key="c"
:color="c"
size="xl"
>
<UButton :color="c" variant="soft" class="capitalize">{{ c }}</UButton>
</UChip>
</div>
</GallerySection>
<GallerySection title="Sizes">
<div class="flex flex-wrap gap-6 items-center">
<UChip
v-for="s in sizes"
:key="s"
:size="s"
color="primary"
>
<UButton color="neutral" variant="outline" size="sm">{{ s }}</UButton>
</UChip>
</div>
</GallerySection>
<GallerySection title="Positions">
<div class="flex flex-wrap gap-8 items-center">
<div v-for="p in positions" :key="p" class="flex flex-col items-center gap-2">
<UChip :position="p" color="error" size="lg">
<UButton color="neutral" variant="soft" size="sm" icon="i-material-symbols-smart-toy-outline" />
</UChip>
<span class="text-xs text-muted">{{ p }}</span>
</div>
</div>
</GallerySection>
<GallerySection title="With text (badge count)">
<div class="flex flex-wrap gap-6 items-center">
<UChip color="error" text="3" size="2xl">
<UButton color="neutral" variant="outline" icon="i-material-symbols-notifications-outline">
Events
</UButton>
</UChip>
<UChip color="warning" text="12" size="2xl">
<UButton color="neutral" variant="outline" icon="i-material-symbols-work-history-outline">
Jobs
</UButton>
</UChip>
<UChip color="primary" text="99+" size="2xl">
<UButton color="neutral" variant="outline" icon="i-material-symbols-layers-outline">
Traces
</UButton>
</UChip>
</div>
</GallerySection>
<GallerySection title="Inset (rounded elements)">
<div class="flex flex-wrap gap-6 items-center">
<UChip color="success" inset size="lg">
<UAvatar
icon="i-material-symbols-smart-toy-outline"
color="neutral"
variant="soft"
size="lg"
/>
</UChip>
<UChip color="error" inset size="lg">
<UAvatar
icon="i-material-symbols-cloud-outline"
color="neutral"
variant="soft"
size="lg"
/>
</UChip>
<UChip color="warning" inset size="lg">
<UAvatar
icon="i-material-symbols-memory-outline"
color="neutral"
variant="soft"
size="lg"
/>
</UChip>
</div>
</GallerySection>
<GallerySection title="Standalone">
<div class="flex flex-wrap gap-4 items-center">
<UChip standalone color="success" size="md" />
<UChip standalone color="warning" size="md" />
<UChip standalone color="error" size="md" />
<UChip standalone color="info" size="md" />
<UChip standalone color="neutral" size="md" />
</div>
</GallerySection>
<GallerySection title="Agent status list">
<div class="flex flex-col gap-3 w-full max-w-sm">
<div
v-for="agent in agents"
:key="agent.name"
class="flex items-center justify-between rounded-lg border border-default px-4 py-3"
>
<div class="flex items-center gap-3">
<UChip :color="agent.status as any" standalone size="lg" />
<span class="text-sm font-mono text-highlighted">{{ agent.name }}</span>
</div>
<UBadge :color="agent.status as any" variant="soft" size="sm">{{ agent.label }}</UBadge>
</div>
</div>
</GallerySection>
</div>
</template>