-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInputMenu.vue
More file actions
153 lines (139 loc) · 4.48 KB
/
Copy pathInputMenu.vue
File metadata and controls
153 lines (139 loc) · 4.48 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
<script setup lang="ts">
const sizes = ['xs', 'sm', 'md', 'lg', 'xl'] as const
const variants = ['outline', 'soft', 'subtle', 'none'] as const
// Single-select
const runtimeItems = [
{ label: 'arcp-runtime-prod', icon: 'i-material-symbols-cloud-outline', description: 'Production cluster' },
{ label: 'arcp-runtime-staging', icon: 'i-material-symbols-cloud-queue', description: 'Staging cluster' },
{ label: 'arcp-runtime-dev', icon: 'i-material-symbols-laptop-outline', description: 'Local dev node' },
{ label: 'arcp-runtime-ci', icon: 'i-material-symbols-settings-suggest-outline', description: 'CI ephemeral' },
]
const selectedRuntime = ref(runtimeItems[0])
// Multiple select (tags mode)
const agentItems = [
{ label: 'planner-agent', icon: 'i-material-symbols-account-tree-outline' },
{ label: 'executor-agent', icon: 'i-material-symbols-play-circle-outline' },
{ label: 'monitor-agent', icon: 'i-material-symbols-monitor-heart-outline' },
{ label: 'router-agent', icon: 'i-material-symbols-alt-route-outline' },
{ label: 'summarizer-agent', icon: 'i-material-symbols-summarize-outline' },
]
const selectedAgents = ref([agentItems[0], agentItems[1]])
// Autocomplete / free-form
const traceInput = ref('')
const traceItems = [
'trace-4a2f', 'trace-7bc1', 'trace-9de0', 'trace-1af3', 'trace-2cb8',
]
// Sizes demo
const sizeValues = ref<Record<string, any>>({})
// Disabled / highlight states
const disabledValue = ref(runtimeItems[1])
const highlightValue = ref(runtimeItems[2])
</script>
<template>
<div class="flex flex-col gap-8">
<GallerySection title="Single select">
<UInputMenu
v-model="selectedRuntime"
:items="runtimeItems"
placeholder="Select a runtime…"
icon="i-material-symbols-cloud-outline"
class="w-72"
/>
</GallerySection>
<GallerySection title="Multiple select (tags)">
<UInputMenu
v-model="selectedAgents"
:items="agentItems"
multiple
placeholder="Add agents…"
icon="i-material-symbols-smart-toy-outline"
class="w-96"
/>
</GallerySection>
<GallerySection title="Autocomplete mode">
<UInputMenu
v-model="traceInput"
:items="traceItems"
mode="autocomplete"
placeholder="Search trace ID…"
icon="i-material-symbols-search"
:clear="true"
class="w-72"
/>
</GallerySection>
<GallerySection title="Variants">
<div class="flex flex-col gap-3 w-72">
<UInputMenu
v-for="v in variants"
:key="v"
:variant="v"
:items="runtimeItems"
:placeholder="`${v} — select runtime`"
class="w-full"
/>
</div>
</GallerySection>
<GallerySection title="Sizes">
<div class="flex flex-col gap-3 w-72">
<UInputMenu
v-for="s in sizes"
:key="s"
v-model="sizeValues[s]"
:size="s"
:items="runtimeItems"
:placeholder="`Size ${s}`"
class="w-full"
/>
</div>
</GallerySection>
<GallerySection title="States">
<div class="flex flex-col gap-3 w-72">
<UInputMenu
v-model="disabledValue"
:items="runtimeItems"
disabled
placeholder="Disabled"
class="w-full"
/>
<UInputMenu
v-model="highlightValue"
:items="runtimeItems"
highlight
placeholder="Highlighted (focus ring)"
class="w-full"
/>
<UInputMenu
:items="runtimeItems"
placeholder="Required field"
required
color="error"
class="w-full"
/>
</div>
</GallerySection>
<GallerySection title="Realistic usage — route a job to a runtime">
<div class="flex flex-col gap-3 w-80">
<p class="text-sm text-[var(--ui-text-muted)]">
Select the target runtime for this job dispatch.
</p>
<UInputMenu
v-model="selectedRuntime"
:items="runtimeItems"
placeholder="Choose runtime…"
icon="i-material-symbols-cloud-circle-outline"
:clear="true"
color="primary"
class="w-full"
/>
<UButton
icon="i-material-symbols-rocket-launch-outline"
color="primary"
:disabled="!selectedRuntime"
block
>
Dispatch job to {{ selectedRuntime?.label ?? '…' }}
</UButton>
</div>
</GallerySection>
</div>
</template>