-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHeader.vue
More file actions
184 lines (174 loc) · 5.74 KB
/
Copy pathHeader.vue
File metadata and controls
184 lines (174 loc) · 5.74 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<script setup lang="ts">
const menuOpen = ref(false)
const drawerOpen = ref(false)
const navLinks = [
{ label: 'Dashboard', icon: 'i-material-symbols-dashboard-outline', to: '#' },
{ label: 'Agents', icon: 'i-material-symbols-smart-toy-outline', to: '#' },
{ label: 'Sessions', icon: 'i-material-symbols-forum-outline', to: '#' },
{ label: 'Traces', icon: 'i-material-symbols-account-tree-outline', to: '#' },
]
</script>
<template>
<div class="flex flex-col gap-8">
<GallerySection title="Basic — title + logo slot">
<div class="w-full overflow-hidden rounded-lg border border-(--ui-border)">
<UHeader title="ARCP Console" to="#">
<template #right>
<UButton
icon="i-material-symbols-notifications-outline"
color="neutral"
variant="ghost"
size="sm"
/>
<UButton size="sm" color="primary" icon="i-material-symbols-rocket-launch-outline">
Deploy
</UButton>
</template>
</UHeader>
</div>
</GallerySection>
<GallerySection title="With center nav links">
<div class="w-full overflow-hidden rounded-lg border border-(--ui-border)">
<UHeader title="ARCP" to="#">
<div class="hidden items-center gap-1 md:flex">
<UButton
v-for="link in navLinks"
:key="link.label"
:label="link.label"
:icon="link.icon"
color="neutral"
variant="ghost"
size="sm"
:to="link.to"
/>
</div>
<template #right>
<UBadge color="success" variant="soft" size="sm">
<span class="flex items-center gap-1">
<span class="size-1.5 rounded-full bg-green-500 inline-block" />
Runtime online
</span>
</UBadge>
<UAvatar
icon="i-material-symbols-person-outline"
size="sm"
color="neutral"
variant="soft"
/>
</template>
</UHeader>
</div>
</GallerySection>
<GallerySection title="With mobile menu (modal mode)">
<div class="w-full overflow-hidden rounded-lg border border-(--ui-border)">
<UHeader
v-model:open="menuOpen"
title="ARCP Console"
to="#"
mode="modal"
:toggle="true"
toggle-side="right"
>
<template #right>
<UButton size="sm" color="neutral" variant="outline">
Docs
</UButton>
</template>
<template #body>
<nav class="flex flex-col gap-1 p-4">
<UButton
v-for="link in navLinks"
:key="link.label"
:label="link.label"
:icon="link.icon"
color="neutral"
variant="ghost"
class="justify-start"
to="#"
/>
</nav>
</template>
</UHeader>
</div>
<p class="text-sm text-(--ui-text-muted)">
Toggle button appears on the right; opens a modal with mobile nav.
</p>
</GallerySection>
<GallerySection title="Drawer mode (toggle left)">
<div class="w-full overflow-hidden rounded-lg border border-(--ui-border)">
<UHeader
v-model:open="drawerOpen"
title="Agent Runtime"
to="#"
mode="drawer"
:toggle="true"
toggle-side="left"
>
<template #right>
<UButton
icon="i-material-symbols-account-circle-outline"
color="neutral"
variant="ghost"
size="sm"
/>
</template>
<template #body>
<nav class="flex flex-col gap-2 p-4">
<p class="text-xs font-semibold uppercase text-(--ui-text-muted) px-2 mb-1">Navigation</p>
<UButton
v-for="link in navLinks"
:key="link.label"
:label="link.label"
:icon="link.icon"
color="neutral"
variant="ghost"
class="justify-start"
to="#"
/>
<USeparator class="my-2" />
<UButton
label="Settings"
icon="i-material-symbols-settings-outline"
color="neutral"
variant="ghost"
class="justify-start"
to="#"
/>
</nav>
</template>
</UHeader>
</div>
<p class="text-sm text-(--ui-text-muted)">
Toggle button on the left; opens a drawer with sidebar navigation.
</p>
</GallerySection>
<GallerySection title="Custom title slot">
<div class="w-full overflow-hidden rounded-lg border border-(--ui-border)">
<UHeader to="#">
<template #title>
<div class="flex items-center gap-2">
<UIcon name="i-material-symbols-hub-outline" class="text-primary size-5" />
<span class="font-bold tracking-tight">ARCP</span>
<UBadge label="v2" color="primary" variant="soft" size="xs" />
</div>
</template>
<template #right>
<UButton
label="Sign in"
color="neutral"
variant="outline"
size="sm"
icon="i-material-symbols-login"
/>
<UButton
label="Get started"
color="primary"
size="sm"
trailing-icon="i-material-symbols-arrow-forward"
/>
</template>
</UHeader>
</div>
</GallerySection>
</div>
</template>