Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"config": "",
"css": "src/styles/globals.css",
"baseColor": "slate",
"cssVariables": true,
Expand Down
2 changes: 2 additions & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"tailwind-merge": "^3.0.0"
},
"devDependencies": {
"@fontsource-variable/inter": "^5.3.0",
"@fontsource-variable/jetbrains-mono": "^5.3.0",
"@tailwindcss/vite": "^4.0.0",
"@types/qrcode": "^1.5.6",
"@types/react": "^19.0.0",
Expand Down
24 changes: 14 additions & 10 deletions apps/web/src/components/layout/AdminLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,22 @@ export default function AdminLayout() {

const sidebarContent = (
<>
<div className="p-4 border-b flex items-center gap-2">
<div className="flex items-center gap-2 border-b p-4">
<img src="/logo.svg" alt="" className="h-6 w-6 shrink-0" />
<span className="font-bold text-lg">{t('admin.adminPanel')}</span>
<span className="text-h3 font-bold tracking-tight">
{t('admin.adminPanel')}
</span>
</div>
<nav className="flex-1 p-3 space-y-1">
<nav className="flex-1 space-y-1 p-3">
{navItems.map(({ to, label, icon: Icon }) => (
<Link
key={to}
to={to}
onClick={() => setMobileOpen(false)}
className={cn(
'flex items-center gap-3 px-3 py-2 rounded-md text-sm font-medium transition-colors',
'flex items-center gap-3 rounded-md px-3 py-2 text-body font-medium tracking-wide transition-colors duration-(--duration-fast) ease-(--ease-out)',
location.pathname === to
? 'bg-primary text-primary-foreground'
? 'bg-accent font-semibold text-accent-foreground'
: 'text-muted-foreground hover:bg-accent hover:text-accent-foreground',
)}
>
Expand All @@ -40,11 +42,11 @@ export default function AdminLayout() {
</Link>
))}
</nav>
<div className="p-3 border-t">
<div className="border-t p-3">
<Link
to="/dashboard"
onClick={() => setMobileOpen(false)}
className="flex items-center gap-3 px-3 py-2 rounded-md text-sm font-medium text-muted-foreground hover:bg-accent hover:text-accent-foreground"
className="flex items-center gap-3 rounded-md px-3 py-2 text-body font-medium tracking-wide text-muted-foreground transition-colors duration-(--duration-fast) ease-(--ease-out) hover:bg-accent hover:text-accent-foreground"
>
<ArrowLeft className="h-4 w-4" />
{t('nav.backToDashboard')}
Expand All @@ -67,23 +69,25 @@ export default function AdminLayout() {
<aside
className={cn(
'flex flex-col w-60 border-r bg-background',
'fixed inset-y-0 left-0 z-50 transition-transform md:relative md:z-auto md:translate-x-0',
'fixed inset-y-0 left-0 z-50 transition-transform duration-(--duration-slow) ease-(--ease-out) md:relative md:z-auto md:translate-x-0',
mobileOpen ? 'translate-x-0' : '-translate-x-full',
)}
>
{sidebarContent}
</aside>

<div className="flex-1 flex flex-col min-w-0 overflow-hidden">
<div className="md:hidden flex items-center gap-3 px-4 py-3 border-b shrink-0">
<div className="flex shrink-0 items-center gap-3 border-b px-4 py-3 md:hidden">
<Button
variant="ghost"
size="icon"
onClick={() => setMobileOpen(true)}
>
<Menu className="h-5 w-5" />
</Button>
<span className="font-bold text-lg">{t('admin.adminPanel')}</span>
<span className="text-h3 font-bold tracking-tight">
{t('admin.adminPanel')}
</span>
</div>

<main className="flex-1 overflow-auto">
Expand Down
22 changes: 11 additions & 11 deletions apps/web/src/components/layout/DashboardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ export default function DashboardLayout() {

const navLinkClass = (to: string) =>
cn(
'flex items-center gap-3 px-3 py-2 rounded-md text-sm font-medium transition-colors',
'flex items-center gap-3 rounded-md px-3 py-2 text-body font-medium tracking-wide transition-colors duration-(--duration-fast) ease-(--ease-out)',
location.pathname.startsWith(to)
? 'bg-primary text-primary-foreground'
? 'bg-accent font-semibold text-accent-foreground'
: 'text-muted-foreground hover:bg-accent hover:text-accent-foreground',
);

const sidebarContent = (
<>
<div className="p-4 border-b">
<div className="border-b p-4">
<Link
to="/dashboard"
className="flex items-center gap-2 hover:opacity-80 transition-opacity"
className="flex items-center gap-2 transition-opacity duration-(--duration-fast) ease-(--ease-out) hover:opacity-80"
onClick={() => setMobileOpen(false)}
>
<img src="/logo.svg" alt="" className="h-6 w-6 shrink-0" />
<span className="font-bold text-lg">{appName}</span>
<span className="text-h3 font-bold tracking-tight">{appName}</span>
</Link>
</div>
<nav className="flex-1 p-3 space-y-1">
<nav className="flex-1 space-y-1 p-3">
{navItems.map(({ to, label, icon: Icon }) => (
<Link
key={to}
Expand All @@ -62,15 +62,15 @@ export default function DashboardLayout() {
<Link
to="/admin"
onClick={() => setMobileOpen(false)}
className="flex items-center gap-3 px-3 py-2 rounded-md text-sm font-medium text-muted-foreground hover:bg-accent hover:text-accent-foreground"
className="flex items-center gap-3 rounded-md px-3 py-2 text-body font-medium tracking-wide text-muted-foreground transition-colors duration-(--duration-fast) ease-(--ease-out) hover:bg-accent hover:text-accent-foreground"
>
<Shield className="h-4 w-4" />
{t('nav.admin')}
</Link>
)}
</nav>
<div className="p-3 border-t">
<div className="px-3 py-1 text-xs text-muted-foreground truncate mb-2">
<div className="mb-2 truncate px-3 py-1 text-caption text-muted-foreground">
{user?.email}
</div>
<Button
Expand Down Expand Up @@ -100,15 +100,15 @@ export default function DashboardLayout() {
<aside
className={cn(
'flex flex-col w-60 border-r bg-background',
'fixed inset-y-0 left-0 z-50 transition-transform md:relative md:z-auto md:translate-x-0',
'fixed inset-y-0 left-0 z-50 transition-transform duration-(--duration-slow) ease-(--ease-out) md:relative md:z-auto md:translate-x-0',
mobileOpen ? 'translate-x-0' : '-translate-x-full',
)}
>
{sidebarContent}
</aside>

<div className="flex-1 flex flex-col min-w-0 overflow-hidden">
<div className="md:hidden flex items-center gap-3 px-4 py-3 border-b shrink-0">
<div className="flex shrink-0 items-center gap-3 border-b px-4 py-3 md:hidden">
<Button
variant="ghost"
size="icon"
Expand All @@ -118,7 +118,7 @@ export default function DashboardLayout() {
</Button>
<Link
to="/dashboard"
className="flex items-center gap-2 font-bold text-lg"
className="flex items-center gap-2 text-h3 font-bold tracking-tight"
>
<img src="/logo.svg" alt="" className="h-6 w-6 shrink-0" />
{appName}
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/ui/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const variants = {
secondary: 'bg-secondary text-secondary-foreground',
destructive: 'bg-destructive text-destructive-foreground',
outline: 'border border-input text-foreground',
success: 'bg-green-100 text-green-800',
success: 'bg-success text-success-foreground',
};

export function Badge({
Expand All @@ -21,7 +21,7 @@ export function Badge({
return (
<div
className={cn(
'inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors',
'inline-flex items-center rounded-full px-2.5 py-0.5 text-caption font-semibold transition-colors duration-(--duration-fast) ease-(--ease-out)',
variants[variant],
className,
)}
Expand Down
6 changes: 3 additions & 3 deletions apps/web/src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const variants = {

const sizes = {
default: 'h-10 px-4 py-2',
sm: 'h-9 rounded-md px-3',
lg: 'h-11 rounded-md px-8',
sm: 'h-9 px-3 text-caption',
lg: 'h-11 px-8 text-body-lg',
icon: 'h-10 w-10',
};

Expand All @@ -49,7 +49,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
<button
ref={ref}
className={cn(
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-body font-medium tracking-wide transition-all duration-(--duration-fast) ease-(--ease-out) active:scale-[0.98] focus-visible:outline-none focus-visible:shadow-(--shadow-focus) disabled:pointer-events-none disabled:opacity-50',
variants[variant],
sizes[size],
className,
Expand Down
5 changes: 1 addition & 4 deletions apps/web/src/components/ui/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ export function CardTitle({
}: React.HTMLAttributes<HTMLHeadingElement>) {
return (
<h3
className={cn(
'text-2xl font-semibold leading-none tracking-tight',
className,
)}
className={cn('text-h2 font-semibold tracking-tight', className)}
{...props}
/>
);
Expand Down
11 changes: 8 additions & 3 deletions apps/web/src/components/ui/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function DialogContent({
return (
<div
className={cn(
'bg-background rounded-lg shadow-lg p-6 w-full max-w-lg mx-4 max-h-[90vh] overflow-y-auto',
'bg-background rounded-lg border shadow-lg p-6 w-full max-w-lg mx-4 max-h-[90vh] overflow-y-auto animate-dialog-in',
className,
)}
{...props}
Expand All @@ -51,7 +51,12 @@ export function DialogTitle({
className,
...props
}: React.HTMLAttributes<HTMLHeadingElement>) {
return <h2 className={cn('text-lg font-semibold', className)} {...props} />;
return (
<h2
className={cn('text-h3 font-semibold tracking-tight', className)}
{...props}
/>
);
}

export function DialogDescription({
Expand All @@ -60,7 +65,7 @@ export function DialogDescription({
}: React.HTMLAttributes<HTMLParagraphElement>) {
return (
<p
className={cn('text-sm text-muted-foreground mt-1', className)}
className={cn('text-body text-muted-foreground mt-1', className)}
{...props}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Input = React.forwardRef<HTMLInputElement, InputProps>(
<input
type={type}
className={cn(
'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-body shadow-xs transition-all duration-(--duration-fast) ease-(--ease-out) file:border-0 file:bg-transparent file:text-body file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:shadow-(--shadow-focus) disabled:cursor-not-allowed disabled:opacity-50',
className,
)}
ref={ref}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/ui/label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Label = React.forwardRef<
ref={ref}
htmlFor={htmlFor}
className={cn(
'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
'text-body font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
className,
)}
{...props}
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/components/ui/otp-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function OtpInput({
onChange={(e) => onChange(e.target.value.replace(/\D/g, ''))}
autoComplete="one-time-code"
autoFocus={autoFocus}
className="font-mono text-center text-body-lg tracking-caps"
/>
);
}
4 changes: 2 additions & 2 deletions apps/web/src/components/ui/switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export function Switch({
disabled={disabled}
onClick={() => onCheckedChange(!checked)}
className={cn(
'relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50',
'relative inline-flex h-6 w-11 items-center rounded-full transition-colors duration-(--duration-normal) ease-(--ease-in-out) focus-visible:outline-none focus-visible:shadow-(--shadow-focus) disabled:opacity-50',
checked ? 'bg-primary' : 'bg-input',
className,
)}
>
<span
className={cn(
'inline-block h-4 w-4 transform rounded-full bg-background shadow-sm transition-transform',
'inline-block h-4 w-4 transform rounded-full bg-background shadow-xs transition-transform duration-(--duration-normal) ease-(--ease-in-out)',
checked ? 'translate-x-6' : 'translate-x-1',
)}
/>
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { AppConfigProvider } from './contexts/AppConfigContext.tsx';
import { AuthProvider } from './contexts/AuthContext.tsx';
import { ThemeProvider } from './contexts/ThemeContext.tsx';
import { I18nProvider } from './i18n/index.tsx';
import '@fontsource-variable/inter';
import '@fontsource-variable/jetbrains-mono';
import './styles/globals.css';

const queryClient = new QueryClient({
Expand Down
Loading
Loading