Skip to content

Commit 18baae7

Browse files
committed
docs: color only the selected card, drop the check mark, add question icons
- Apply each item's accent color to the card's border/background/ring and its icon badge only when selected; unselected cards stay neutral gray. - Remove the corner check mark (color now signals selection). - Add a leading icon to every question heading.
1 parent df7730d commit 18baae7

1 file changed

Lines changed: 32 additions & 28 deletions

File tree

docs/app/components/global/GettingStartedWizard.vue

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,39 @@ interface WizardItem {
1414
value: string
1515
label: string
1616
icon: string
17-
/** Accent color key from `ICON_COLORS`, giving each item its own tinted badge. */
18-
color: keyof typeof ICON_COLORS
17+
/** Accent color key from `ITEM_COLORS`, applied once the item is selected. */
18+
color: keyof typeof ITEM_COLORS
1919
description?: string
2020
}
2121
2222
/**
23-
* Per-item icon badge colors. Spelled out as full class strings (not
24-
* interpolated) so Tailwind's scanner keeps them in the build.
23+
* Per-item accent colors, applied only to a *selected* card (its badge, plus
24+
* the card's border/background/ring); unselected cards stay neutral gray.
25+
* Spelled out as full class strings (not interpolated) so Tailwind's scanner
26+
* keeps them in the build.
2527
*/
26-
const ICON_COLORS = {
27-
sky: 'bg-sky-500/10 text-sky-500',
28-
indigo: 'bg-indigo-500/10 text-indigo-500',
29-
violet: 'bg-violet-500/10 text-violet-500',
30-
purple: 'bg-purple-500/10 text-purple-500',
31-
fuchsia: 'bg-fuchsia-500/10 text-fuchsia-500',
32-
pink: 'bg-pink-500/10 text-pink-500',
33-
rose: 'bg-rose-500/10 text-rose-500',
34-
amber: 'bg-amber-500/10 text-amber-500',
35-
orange: 'bg-orange-500/10 text-orange-500',
36-
emerald: 'bg-emerald-500/10 text-emerald-500',
37-
teal: 'bg-teal-500/10 text-teal-500',
38-
cyan: 'bg-cyan-500/10 text-cyan-500',
39-
blue: 'bg-blue-500/10 text-blue-500',
40-
green: 'bg-green-500/10 text-green-500',
28+
const ITEM_COLORS = {
29+
sky: { badge: 'bg-sky-500/10 text-sky-500', card: 'border-sky-500/60 bg-sky-500/5 ring-1 ring-sky-500/20' },
30+
indigo: { badge: 'bg-indigo-500/10 text-indigo-500', card: 'border-indigo-500/60 bg-indigo-500/5 ring-1 ring-indigo-500/20' },
31+
violet: { badge: 'bg-violet-500/10 text-violet-500', card: 'border-violet-500/60 bg-violet-500/5 ring-1 ring-violet-500/20' },
32+
purple: { badge: 'bg-purple-500/10 text-purple-500', card: 'border-purple-500/60 bg-purple-500/5 ring-1 ring-purple-500/20' },
33+
fuchsia: { badge: 'bg-fuchsia-500/10 text-fuchsia-500', card: 'border-fuchsia-500/60 bg-fuchsia-500/5 ring-1 ring-fuchsia-500/20' },
34+
pink: { badge: 'bg-pink-500/10 text-pink-500', card: 'border-pink-500/60 bg-pink-500/5 ring-1 ring-pink-500/20' },
35+
rose: { badge: 'bg-rose-500/10 text-rose-500', card: 'border-rose-500/60 bg-rose-500/5 ring-1 ring-rose-500/20' },
36+
amber: { badge: 'bg-amber-500/10 text-amber-500', card: 'border-amber-500/60 bg-amber-500/5 ring-1 ring-amber-500/20' },
37+
orange: { badge: 'bg-orange-500/10 text-orange-500', card: 'border-orange-500/60 bg-orange-500/5 ring-1 ring-orange-500/20' },
38+
emerald: { badge: 'bg-emerald-500/10 text-emerald-500', card: 'border-emerald-500/60 bg-emerald-500/5 ring-1 ring-emerald-500/20' },
39+
teal: { badge: 'bg-teal-500/10 text-teal-500', card: 'border-teal-500/60 bg-teal-500/5 ring-1 ring-teal-500/20' },
40+
cyan: { badge: 'bg-cyan-500/10 text-cyan-500', card: 'border-cyan-500/60 bg-cyan-500/5 ring-1 ring-cyan-500/20' },
41+
blue: { badge: 'bg-blue-500/10 text-blue-500', card: 'border-blue-500/60 bg-blue-500/5 ring-1 ring-blue-500/20' },
42+
green: { badge: 'bg-green-500/10 text-green-500', card: 'border-green-500/60 bg-green-500/5 ring-1 ring-green-500/20' },
4143
} as const
4244
4345
interface WizardSection {
4446
key: string
4547
title: string
4648
hint: string
49+
icon: string
4750
items: WizardItem[]
4851
}
4952
@@ -60,6 +63,7 @@ const sections: WizardSection[] = [
6063
key: 'environments',
6164
title: 'Target environments',
6265
hint: 'What do you expect your tool to work with?',
66+
icon: 'i-lucide-target',
6367
items: [
6468
{ value: 'standalone', label: 'Standalone', icon: 'i-lucide-terminal', color: 'sky', description: 'A CLI or dev server with no host framework' },
6569
{ value: 'framework', label: 'Specific framework', icon: 'i-lucide-shapes', color: 'violet', description: 'Specifically for frameworks like Vite, Next.js, Nuxt, etc.' },
@@ -70,6 +74,7 @@ const sections: WizardSection[] = [
7074
key: 'dataSource',
7175
title: 'Data source',
7276
hint: 'Where do you want to visualize data from?',
77+
icon: 'i-lucide-database',
7378
items: [
7479
{ value: 'node', label: 'The node side', icon: 'i-lucide-server', color: 'indigo', description: 'Server state, build output, the filesystem, child processes' },
7580
{ value: 'browser', label: 'The user\'s web app', icon: 'i-lucide-app-window', color: 'cyan', description: 'State living in the page you\'re developing' },
@@ -79,6 +84,7 @@ const sections: WizardSection[] = [
7984
key: 'availability',
8085
title: 'Data availability',
8186
hint: 'When is the data available?',
87+
icon: 'i-lucide-clock',
8288
items: [
8389
{ value: 'dev', label: 'Development time', icon: 'i-lucide-code', color: 'blue', description: 'Live, over a running dev server' },
8490
{ value: 'build', label: 'Production build time', icon: 'i-lucide-hammer', color: 'amber', description: 'Data from the production build' },
@@ -90,6 +96,7 @@ const sections: WizardSection[] = [
9096
key: 'frontend',
9197
title: 'Frontend approach',
9298
hint: 'How do you want to build the frontend view?',
99+
icon: 'i-lucide-palette',
93100
items: [
94101
{ value: 'framework', label: 'A preferred framework', icon: 'i-lucide-component', color: 'green', description: 'Vue, React, Svelte, Solid...' },
95102
{ value: 'webcomponents', label: 'Web Components', icon: 'i-lucide-box', color: 'orange', description: 'Use Web Components for renderering' },
@@ -100,6 +107,7 @@ const sections: WizardSection[] = [
100107
key: 'requirements',
101108
title: 'Other requirements',
102109
hint: 'Any specific requirements?',
110+
icon: 'i-lucide-list-checks',
103111
items: [
104112
{ value: 'agent', label: 'Exposed to coding agents', icon: 'i-lucide-bot', color: 'pink', description: 'Some functionality should be available to coding agents.' },
105113
{ value: 'terminal', label: 'Sub process access', icon: 'i-lucide-square-terminal', color: 'amber', description: 'Need to spawn other child process from the node side' },
@@ -270,7 +278,8 @@ function reset(): void {
270278
class="px-5 py-4 sm:px-6"
271279
>
272280
<div class="flex flex-wrap items-baseline gap-x-2 mb-3">
273-
<p class="font-medium text-highlighted">
281+
<p class="flex items-center gap-2 font-medium text-highlighted">
282+
<UIcon :name="section.icon" class="size-4 text-muted" />
274283
{{ section.hint }}
275284
</p>
276285
<p class="text-xs text-muted uppercase tracking-widest">
@@ -287,13 +296,13 @@ function reset(): void {
287296
:aria-checked="isChecked(section.key, item.value)"
288297
class="relative flex items-center gap-3 rounded-lg border p-3 text-left transition-colors cursor-pointer"
289298
:class="isChecked(section.key, item.value)
290-
? 'border-primary/80 bg-primary/10 ring-1 ring-primary/20'
299+
? ITEM_COLORS[item.color].card
291300
: 'border-default hover:border-accented hover:bg-elevated/50'"
292301
@click="toggle(section.key, item.value)"
293302
>
294303
<span
295-
class="inline-flex items-center justify-center size-8 shrink-0 rounded-full"
296-
:class="ICON_COLORS[item.color]"
304+
class="inline-flex items-center justify-center size-8 shrink-0 rounded-full transition-colors"
305+
:class="isChecked(section.key, item.value) ? ITEM_COLORS[item.color].badge : 'bg-elevated text-muted'"
297306
>
298307
<UIcon :name="item.icon" class="size-4" />
299308
</span>
@@ -304,11 +313,6 @@ function reset(): void {
304313
class="block text-xs text-muted mt-0.5"
305314
>{{ item.description }}</span>
306315
</span>
307-
<UIcon
308-
v-if="isChecked(section.key, item.value)"
309-
name="i-lucide-circle-check"
310-
class="size-4 shrink-0 text-primary"
311-
/>
312316
</button>
313317
</div>
314318
</div>

0 commit comments

Comments
 (0)