Skip to content

Commit 77a8f56

Browse files
committed
refactor: update theming demo on landing page
1 parent 369a282 commit 77a8f56

5 files changed

Lines changed: 168 additions & 209 deletions

File tree

apps/showcase/app/(app)/(landing)/components/demos/accessibility-demo.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ export function AccessibilityDemo() {
7676
key={tab.id}
7777
onClick={() => setActiveTab(tab.id)}
7878
className={`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors cursor-pointer ${
79-
activeTab === tab.id
80-
? 'bg-surface-900 dark:bg-surface-0 text-surface-0 dark:text-surface-900'
81-
: 'text-muted-color hover:text-color hover:bg-surface-200 dark:hover:bg-surface-800'
79+
activeTab === tab.id ? 'bg-surface-900 dark:bg-surface-0 text-surface-0 dark:text-surface-900' : 'text-muted-color hover:text-color hover:bg-surface-200 dark:hover:bg-surface-800'
8280
}`}
8381
>
8482
{tab.label}
@@ -135,9 +133,7 @@ function SelectMockup({ state, dir = 'ltr', cities: items = cities, placeholder
135133
aria-activedescendant={state.open ? focusedId : undefined}
136134
className="flex items-center justify-between px-3 py-2 rounded-lg border border-surface-200 dark:border-surface-700 bg-surface-0 dark:bg-surface-950 text-sm"
137135
>
138-
<span className={state.selectedIndex >= 0 ? 'text-color' : 'text-muted-color'}>
139-
{state.selectedIndex >= 0 ? items[state.selectedIndex] : placeholder}
140-
</span>
136+
<span className={state.selectedIndex >= 0 ? 'text-color' : 'text-muted-color'}>{state.selectedIndex >= 0 ? items[state.selectedIndex] : placeholder}</span>
141137
<svg className={`w-4 h-4 text-muted-color transition-transform duration-300 ${state.open ? 'rotate-180' : ''}`} viewBox="0 0 20 20" fill="currentColor">
142138
<path fillRule="evenodd" d={chevronPath} clipRule="evenodd" />
143139
</svg>
@@ -155,13 +151,7 @@ function SelectMockup({ state, dir = 'ltr', cities: items = cities, placeholder
155151
aria-posinset={index + 1}
156152
aria-setsize={items.length}
157153
data-focused={state.focusedIndex === index ? '' : undefined}
158-
className={`px-3 py-1.5 text-sm transition-colors duration-200 ${
159-
state.focusedIndex === index
160-
? 'bg-primary/10 text-primary font-medium'
161-
: state.selectedIndex === index
162-
? 'bg-primary/5 text-primary'
163-
: 'text-color'
164-
}`}
154+
className={`px-3 py-1.5 text-sm transition-colors duration-200 ${state.focusedIndex === index ? 'bg-primary text-primary-contrast font-medium' : state.selectedIndex === index ? 'bg-primary/5 text-primary' : 'text-color'}`}
165155
>
166156
{city}
167157
</li>

apps/showcase/app/(app)/(landing)/components/demos/component-cloud.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@ export function ComponentCloud() {
4646

4747
return next;
4848
});
49-
}, 500);
49+
}, 300);
5050

5151
return () => clearInterval(timer);
5252
}, []);
5353

5454
return (
55-
<div className="flex flex-col items-center justify-center gap-2 flex-1 select-none" style={{ maskImage: 'radial-gradient(ellipse 65% 60% at 50% 50%, black 35%, transparent 95%)' }}>
55+
<div className="flex flex-col items-center justify-center gap-2 flex-1 select-none" style={{ maskImage: 'radial-gradient(ellipse 75% 60% at 50% 50%, black 30%, transparent 95%)' }}>
5656
{rows.map((row, i) => (
5757
<div key={i} className="flex items-center justify-center gap-2 flex-nowrap">
5858
{row.map((name) => (
5959
<span
6060
key={name}
6161
className={`px-2.5 py-1 rounded-md text-xs font-mono font-medium whitespace-nowrap shrink-0 transition-all duration-700 ${
62-
highlighted.has(name) ? 'bg-primary/10 text-primary border border-primary/20' : 'bg-surface-200/60 dark:bg-surface-800/60 text-muted-color border border-surface-200 dark:border-surface-700'
62+
highlighted.has(name) ? 'bg-primary/10 text-primary border border-primary/20' : 'bg-surface-200/40 dark:bg-surface-800/40 text-surface-500/75 border border-surface-200/70 dark:border-surface-700/70'
6363
}`}
6464
>
6565
{name}

0 commit comments

Comments
 (0)