-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRadioGroup.vue
More file actions
174 lines (161 loc) · 5.01 KB
/
Copy pathRadioGroup.vue
File metadata and controls
174 lines (161 loc) · 5.01 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
<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 runtimeEnv = ref('cloud')
const logLevel = ref('info')
const dispatchMode = ref('queue')
const cardPick = ref('standard')
const tablePick = ref('trace')
const runtimeItems = [
{ label: 'Cloud', description: 'Managed runtime hosted by ARCP', value: 'cloud' },
{ label: 'Edge', description: 'Low-latency node nearest to your agents', value: 'edge' },
{ label: 'Self-hosted', description: 'Run the runtime in your own infrastructure', value: 'self' },
]
const logLevelItems = [
{ label: 'debug', value: 'debug' },
{ label: 'info', value: 'info' },
{ label: 'warn', value: 'warn' },
{ label: 'error', value: 'error' },
]
const dispatchItems = [
{ label: 'Queue', description: 'Jobs are enqueued and processed in order', value: 'queue' },
{ label: 'Direct', description: 'Jobs are dispatched immediately to an available agent', value: 'direct' },
{ label: 'Broadcast', description: 'Jobs are fanned out to all connected agents', value: 'broadcast' },
]
const cardItems = [
{ label: 'Standard', description: 'Up to 10 concurrent agents', value: 'standard' },
{ label: 'Pro', description: 'Up to 100 concurrent agents', value: 'pro' },
{ label: 'Enterprise', description: 'Unlimited agents + SLA', value: 'enterprise' },
]
const tableItems = [
{ label: 'Trace', description: 'Full span tree', value: 'trace' },
{ label: 'Event', description: 'Discrete runtime events', value: 'event' },
{ label: 'Metric', description: 'Aggregated counters', value: 'metric' },
]
</script>
<template>
<div class="flex flex-col gap-8">
<GallerySection title="Variants">
<div class="flex flex-col gap-6 w-full max-w-sm">
<URadioGroup
legend="List (default)"
variant="list"
:items="runtimeItems"
v-model="runtimeEnv"
/>
<URadioGroup
legend="Card"
variant="card"
:items="cardItems"
v-model="cardPick"
/>
<URadioGroup
legend="Table"
variant="table"
:items="tableItems"
v-model="tablePick"
/>
</div>
</GallerySection>
<GallerySection title="Colors">
<div class="flex flex-wrap gap-6">
<URadioGroup
v-for="c in colors"
:key="c"
:legend="c"
:color="c"
:items="['Alpha', 'Beta']"
default-value="Alpha"
class="capitalize min-w-28"
/>
</div>
</GallerySection>
<GallerySection title="Sizes">
<div class="flex flex-col gap-4">
<URadioGroup
v-for="s in sizes"
:key="s"
:legend="s"
:size="s"
:items="['Agent', 'Session', 'Job']"
default-value="Agent"
orientation="horizontal"
/>
</div>
</GallerySection>
<GallerySection title="Orientation">
<div class="flex flex-col gap-4 w-full max-w-sm">
<URadioGroup
legend="Vertical (default)"
orientation="vertical"
:items="logLevelItems"
v-model="logLevel"
/>
<URadioGroup
legend="Horizontal"
orientation="horizontal"
:items="logLevelItems"
v-model="logLevel"
/>
</div>
</GallerySection>
<GallerySection title="Indicator position">
<div class="flex flex-col gap-4 w-full max-w-xs">
<URadioGroup
legend="Start (default)"
indicator="start"
:items="['Lease', 'Runtime', 'Agent']"
default-value="Lease"
/>
<URadioGroup
legend="End"
indicator="end"
:items="['Lease', 'Runtime', 'Agent']"
default-value="Lease"
/>
<URadioGroup
legend="Hidden"
indicator="hidden"
variant="card"
:items="['Lease', 'Runtime', 'Agent']"
default-value="Lease"
orientation="horizontal"
/>
</div>
</GallerySection>
<GallerySection title="States">
<div class="flex flex-col gap-4 w-full max-w-xs">
<URadioGroup
legend="Disabled"
disabled
:items="dispatchItems"
default-value="queue"
/>
<URadioGroup
legend="Required"
required
:items="['Immediate', 'Deferred', 'Scheduled']"
default-value="Immediate"
/>
<URadioGroup
legend="Highlighted"
highlight
color="success"
:items="['Running', 'Idle', 'Draining']"
default-value="Running"
/>
</div>
</GallerySection>
<GallerySection title="Realistic usage — dispatch mode">
<URadioGroup
legend="Job dispatch strategy"
variant="card"
color="primary"
:items="dispatchItems"
v-model="dispatchMode"
class="w-full max-w-sm"
required
/>
</GallerySection>
</div>
</template>