website refactor

This commit is contained in:
2026-01-15 17:12:24 +01:00
parent c3b308e960
commit f035cfe7ce
468 changed files with 24378 additions and 17324 deletions

View File

@@ -2,8 +2,11 @@
import { motion, useReducedMotion } from 'framer-motion';
import { useState, useEffect } from 'react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
import { Stack } from '@/ui/Stack';
export default function CareerProgressionMockup() {
export function CareerProgressionMockup() {
const shouldReduceMotion = useReducedMotion();
const [isMobile, setIsMobile] = useState(false);
@@ -22,141 +25,191 @@ export default function CareerProgressionMockup() {
// Simple mobile version - just the essence
if (isMobile) {
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite to-iron-gray rounded-lg p-4 overflow-hidden flex items-center justify-center">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite to-iron-gray" rounded="lg" p={4} overflow="hidden" display="flex" alignItems="center" justifyContent="center">
<Box
as={motion.div}
initial="hidden"
animate="visible"
variants={{
visible: { transition: { staggerChildren: 0.1 } }
}}
className="space-y-4 w-full"
w="full"
>
{/* Clean stat cards */}
<motion.div variants={itemVariants} className="grid grid-cols-3 gap-3">
{[
{ value: '24', label: 'Wins' },
{ value: '48', label: 'Podiums' },
{ value: '156', label: 'Races' }
].map((stat, i) => (
<div key={i} className="bg-iron-gray/60 rounded-lg p-3 border border-primary-blue/20 text-center">
<div className="text-2xl font-bold text-primary-blue font-mono">{stat.value}</div>
<div className="text-[11px] text-white/50 mt-1">{stat.label}</div>
</div>
))}
</motion.div>
<Stack gap={4}>
{/* Clean stat cards */}
<Box as={motion.div} variants={itemVariants} display="grid" gridCols={3} gap={3}>
{[
{ value: '24', label: 'Wins' },
{ value: '48', label: 'Podiums' },
{ value: '156', label: 'Races' }
].map((stat, i) => (
<Box key={i} bg="bg-iron-gray/60" rounded="lg" p={3} border borderColor="border-primary-blue/20" textAlign="center">
<Text size="2xl" weight="bold" color="text-primary-blue" font="mono" block>{stat.value}</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '11px' }}
color="text-white"
opacity={0.5}
mt={1}
block
>
{stat.label}
</Text>
</Box>
))}
</Box>
{/* Single elegant season card */}
<motion.div variants={itemVariants}>
<div className="bg-iron-gray/40 rounded-lg p-3 border border-charcoal-outline">
<div className="flex items-center justify-between">
<span className="text-sm text-white/70">GT3 Championship</span>
<span className="px-2.5 py-1 bg-performance-green/20 rounded text-xs text-performance-green font-semibold">P2</span>
</div>
</div>
</motion.div>
</motion.div>
</div>
{/* Single elegant season card */}
<Box as={motion.div} variants={itemVariants}>
<Box bg="bg-iron-gray/40" rounded="lg" p={3} border borderColor="border-charcoal-outline">
<Box display="flex" alignItems="center" justifyContent="between">
<Text size="sm" color="text-white" opacity={0.7}>GT3 Championship</Text>
<Box as="span" px={2.5} py={1} bg="bg-performance-green/20" rounded="sm">
<Text size="xs" color="text-performance-green" weight="semibold">P2</Text>
</Box>
</Box>
</Box>
</Box>
</Stack>
</Box>
</Box>
);
}
// Desktop version - more detailed
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={{ base: 1.5, sm: 3, md: 5, lg: 8 }} overflow="hidden">
<Box
as={motion.div}
initial="hidden"
animate="visible"
variants={{
visible: { transition: { staggerChildren: shouldReduceMotion ? 0 : 0.08 } }
}}
className="space-y-1.5 sm:space-y-3 md:space-y-4 lg:space-y-6"
>
{/* Driver Header */}
<motion.div variants={itemVariants} className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4 pb-1.5 sm:pb-3 md:pb-4 lg:pb-6 border-b border-charcoal-outline">
<div className="h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:h-16 lg:w-16 bg-charcoal-outline rounded-full border-2 border-primary-blue/30 flex items-center justify-center text-base sm:text-xl md:text-2xl lg:text-3xl overflow-hidden">
🏎
</div>
<div className="flex-1">
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white/90 mb-1 sm:mb-1.5 md:mb-2">Your Racing Identity</div>
<div className="flex items-center gap-1 sm:gap-2 md:gap-3">
<span className="text-[8px] sm:text-[10px] md:text-xs text-primary-blue/70">Multi-league profile</span>
<span className="text-[8px] sm:text-[10px] md:text-xs text-performance-green/70">Career tracking</span>
</div>
</div>
</motion.div>
<Stack gap={{ base: 1.5, sm: 3, md: 4, lg: 6 }}>
{/* Driver Header */}
<Box as={motion.div} variants={itemVariants} display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }} pb={{ base: 1.5, sm: 3, md: 4, lg: 6 }} borderBottom borderColor="border-charcoal-outline">
<Box h={{ base: 8, sm: 10, md: 12, lg: 16 }} w={{ base: 8, sm: 10, md: 12, lg: 16 }} bg="bg-charcoal-outline" rounded="full" border borderWidth="2px" borderColor="border-primary-blue/30" display="flex" alignItems="center" justifyContent="center" overflow="hidden">
<Text size={{ base: 'base', sm: 'xl', md: '2xl', lg: '3xl' }}>🏎</Text>
</Box>
<Box flexGrow={1}>
<Text size={{ base: 'xs', sm: 'sm', md: 'base' }} weight="semibold" color="text-white" opacity={0.9} mb={{ base: 1, sm: 1.5, md: 2 }} block>Your Racing Identity</Text>
<Box display="flex" alignItems="center" gap={{ base: 1, sm: 2, md: 3 }}>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-primary-blue"
opacity={0.7}
>
Multi-league profile
</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-performance-green"
opacity={0.7}
>
Career tracking
</Text>
</Box>
</Box>
</Box>
{/* Career Stats */}
<motion.div variants={itemVariants}>
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white/60 mb-1 sm:mb-2 md:mb-3">Career Overview</div>
<div className="grid grid-cols-3 gap-1 sm:gap-2 md:gap-3">
{[
{ label: 'Wins', value: '24' },
{ label: 'Podiums', value: '48' },
{ label: 'Races', value: '156' }
].map((stat, i) => (
<motion.div
key={i}
className="bg-iron-gray rounded-lg p-1 sm:p-2 md:p-3 border border-charcoal-outline"
whileHover={shouldReduceMotion ? {} : {
y: -2,
boxShadow: '0 4px 16px rgba(0,0,0,0.3)',
transition: { duration: 0.15 }
}}
>
<div className="text-sm sm:text-base md:text-lg font-bold text-primary-blue font-mono mb-0.5">{stat.value}</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/40">{stat.label}</div>
</motion.div>
))}
</div>
</motion.div>
{/* Season Timeline */}
<motion.div variants={itemVariants}>
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white/60 mb-1 sm:mb-2 md:mb-3">Season History</div>
<div className="space-y-1 sm:space-y-1.5 md:space-y-2">
{[
{ league: 'GT3 Championship', season: 'S3', position: 'P2', points: '248' },
{ league: 'Endurance Series', season: 'S2', position: 'P1', points: '312' },
{ league: 'Formula Sprint', season: 'S1', position: 'P5', points: '186' }
].map((season, i) => (
<motion.div
key={i}
className="flex items-center gap-1.5 sm:gap-2 md:gap-3 bg-iron-gray rounded-lg p-1.5 sm:p-2 md:p-3 border border-charcoal-outline"
whileHover={shouldReduceMotion ? {} : {
x: 4,
boxShadow: '0 2px 12px rgba(25,140,255,0.2)',
transition: { duration: 0.15 }
}}
>
<div className="h-5 w-5 sm:h-6 sm:w-6 md:h-8 md:w-8 bg-charcoal-outline rounded border border-primary-blue/20 flex items-center justify-center text-xs sm:text-sm md:text-base">
🏁
</div>
<div className="flex-1">
<div className="text-[9px] sm:text-xs text-white/80 mb-0.5 sm:mb-1">{season.league}</div>
<div className="text-[8px] sm:text-xs text-white/40">Season complete</div>
</div>
<div className="flex gap-1 sm:gap-1.5 md:gap-2">
<div className="px-1 sm:px-1.5 md:px-2 py-0.5 bg-performance-green/20 rounded text-[8px] sm:text-[10px] md:text-xs text-performance-green font-semibold">{season.position}</div>
<div className="px-1 sm:px-1.5 md:px-2 py-0.5 bg-primary-blue/20 rounded text-[8px] sm:text-[10px] md:text-xs text-primary-blue font-mono">{season.points}</div>
</div>
</motion.div>
))}
</div>
</motion.div>
{/* Multi-League Badge */}
<motion.div variants={itemVariants}>
<div className="flex items-center gap-1 sm:gap-1.5 md:gap-2 bg-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 border border-primary-blue/30">
<div className="flex -space-x-2">
{[1, 2, 3].map((i) => (
<div key={i} className="h-4 w-4 sm:h-5 sm:w-5 md:h-6 md:w-6 bg-iron-gray rounded-full border-2 border-charcoal-outline flex items-center justify-center text-[8px] sm:text-[10px] md:text-xs">
🏆
</div>
{/* Career Stats */}
<Box as={motion.div} variants={itemVariants}>
<Text size={{ base: 'xs', sm: 'sm', md: 'base' }} weight="semibold" color="text-white" opacity={0.6} mb={{ base: 1, sm: 2, md: 3 }} block>Career Overview</Text>
<Box display="grid" gridCols={3} gap={{ base: 1, sm: 2, md: 3 }}>
{[
{ label: 'Wins', value: '24' },
{ label: 'Podiums', value: '48' },
{ label: 'Races', value: '156' }
].map((stat, i) => (
<Box
key={i}
as={motion.div}
bg="bg-iron-gray"
rounded="lg"
p={{ base: 1, sm: 2, md: 3 }}
border
borderColor="border-charcoal-outline"
whileHover={shouldReduceMotion ? {} : {
y: -2,
boxShadow: '0 4px 16px rgba(0,0,0,0.3)',
transition: { duration: 0.15 }
}}
>
<Text size={{ base: 'sm', sm: 'base', md: 'lg' }} weight="bold" color="text-primary-blue" font="mono" mb={0.5} block>{stat.value}</Text>
<Text size={{ base: 'xs', sm: 'sm' }} color="text-white" opacity={0.4} block>{stat.label}</Text>
</Box>
))}
</div>
<span className="text-[8px] sm:text-[10px] md:text-xs text-white/60">Active in 3 leagues across seasons</span>
</div>
</motion.div>
</motion.div>
</div>
</Box>
</Box>
{/* Season Timeline */}
<Box as={motion.div} variants={itemVariants}>
<Text size={{ base: 'xs', sm: 'sm', md: 'base' }} weight="semibold" color="text-white" opacity={0.6} mb={{ base: 1, sm: 2, md: 3 }} block>Season History</Text>
<Stack gap={{ base: 1, sm: 1.5, md: 2 }}>
{[
{ league: 'GT3 Championship', season: 'S3', position: 'P2', points: '248' },
{ league: 'Endurance Series', season: 'S2', position: 'P1', points: '312' },
{ league: 'Formula Sprint', season: 'S1', position: 'P5', points: '186' }
].map((season, i) => (
<Box
key={i}
as={motion.div}
display="flex"
alignItems="center"
gap={{ base: 1.5, sm: 2, md: 3 }}
bg="bg-iron-gray"
rounded="lg"
p={{ base: 1.5, sm: 2, md: 3 }}
border
borderColor="border-charcoal-outline"
whileHover={shouldReduceMotion ? {} : {
x: 4,
boxShadow: '0 2px 12px rgba(25,140,255,0.2)',
transition: { duration: 0.15 }
}}
>
<Box h={{ base: 5, sm: 6, md: 8 }} w={{ base: 5, sm: 6, md: 8 }} bg="bg-charcoal-outline" rounded border borderColor="border-primary-blue/20" display="flex" alignItems="center" justifyContent="center">
<Text size={{ base: 'xs', sm: 'sm', md: 'base' }}>🏁</Text>
</Box>
<Box flexGrow={1}>
<Text size={{ base: 'xs', sm: 'sm' }} color="text-white" opacity={0.8} mb={{ base: 0.5, sm: 1 }} block>{season.league}</Text>
<Text size={{ base: 'xs', sm: 'sm' }} color="text-white" opacity={0.4} block>Season complete</Text>
</Box>
<Box display="flex" gap={{ base: 1, sm: 1.5, md: 2 }}>
<Box as="span" px={{ base: 1, sm: 1.5, md: 2 }} py={0.5} bg="bg-performance-green/20" rounded="sm">
<Text size={{ base: 'xs', sm: 'sm' }} color="text-performance-green" weight="semibold">{season.position}</Text>
</Box>
<Box as="span" px={{ base: 1, sm: 1.5, md: 2 }} py={0.5} bg="bg-primary-blue/20" rounded="sm">
<Text size={{ base: 'xs', sm: 'sm' }} color="text-primary-blue" font="mono">{season.points}</Text>
</Box>
</Box>
</Box>
))}
</Stack>
</Box>
{/* Multi-League Badge */}
<Box as={motion.div} variants={itemVariants}>
<Box display="flex" alignItems="center" gap={{ base: 1, sm: 1.5, md: 2 }} bg="bg-charcoal-outline" rounded="lg" p={{ base: 1.5, sm: 2, md: 3 }} border borderColor="border-primary-blue/30">
<Box display="flex"
// eslint-disable-next-line gridpilot-rules/component-classification
className="-space-x-2"
>
{[1, 2, 3].map((i) => (
<Box key={i} h={{ base: 4, sm: 5, md: 6 }} w={{ base: 4, sm: 5, md: 6 }} bg="bg-iron-gray" rounded="full" border borderWidth="2px" borderColor="border-charcoal-outline" display="flex" alignItems="center" justifyContent="center">
<Text size={{ base: 'xs', sm: 'sm' }}>🏆</Text>
</Box>
))}
</Box>
<Text size={{ base: 'xs', sm: 'sm' }} color="text-white" opacity={0.6}>Active in 3 leagues across seasons</Text>
</Box>
</Box>
</Stack>
</Box>
</Box>
);
}
}

View File

@@ -2,8 +2,14 @@
import { motion, useReducedMotion } from 'framer-motion';
import { useState, useEffect } from 'react';
import { Check } from 'lucide-react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
import { Stack } from '@/ui/Stack';
import { Heading } from '@/ui/Heading';
import { Icon } from '@/ui/Icon';
export default function CompanionAutomationMockup() {
export function CompanionAutomationMockup() {
const shouldReduceMotion = useReducedMotion();
const [isMobile, setIsMobile] = useState(false);
@@ -17,55 +23,72 @@ export default function CompanionAutomationMockup() {
// Simple mobile version - just the essence of automation
if (isMobile) {
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite to-iron-gray rounded-lg p-4 overflow-hidden flex items-center justify-center">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite to-iron-gray" rounded="lg" p={4} overflow="hidden" display="flex" alignItems="center" justifyContent="center">
<Box
as={motion.div}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
className="space-y-4 w-full"
w="full"
>
{/* Simple progress indicator */}
<div className="bg-iron-gray/60 rounded-xl p-4 border border-primary-blue/40">
<div className="flex items-center gap-3 mb-3">
<motion.div
className="h-8 w-8 bg-performance-green/40 rounded-full flex items-center justify-center border-2 border-performance-green/60 flex-shrink-0"
animate={shouldReduceMotion ? {} : {
scale: [1, 1.1, 1],
opacity: [0.6, 1, 0.6]
}}
transition={{ duration: 1.5, repeat: Infinity }}
>
<div className="h-3 w-3 bg-performance-green rounded-full"></div>
</motion.div>
<div>
<div className="text-sm text-white font-medium">Creating Session</div>
<div className="text-xs text-white/50">Automated</div>
</div>
</div>
<div className="h-2.5 w-full bg-white/5 rounded-full overflow-hidden">
<motion.div
className="h-full bg-primary-blue/60"
initial={{ width: '0%' }}
animate={{ width: '75%' }}
transition={{ duration: 2, ease: 'easeInOut' }}
/>
</div>
</div>
<Stack gap={4}>
{/* Simple progress indicator */}
<Box bg="bg-iron-gray/60" rounded="xl" p={4} border borderColor="border-primary-blue/40">
<Box display="flex" alignItems="center" gap={3} mb={3}>
<Box
as={motion.div}
h="8"
w="8"
bg="bg-performance-green/40"
rounded="full"
display="flex"
alignItems="center"
justifyContent="center"
border
borderWidth="2px"
borderColor="border-performance-green/60"
flexShrink={0}
animate={shouldReduceMotion ? {} : {
scale: [1, 1.1, 1],
opacity: [0.6, 1, 0.6]
}}
transition={{ duration: 1.5, repeat: Infinity }}
>
<Box h="3" w="3" bg="bg-performance-green" rounded="full" />
</Box>
<Box>
<Text size="sm" color="text-white" weight="medium" block>Creating Session</Text>
<Text size="xs" color="text-white" opacity={0.5} block>Automated</Text>
</Box>
</Box>
<Box h="2.5" fullWidth bg="bg-white/5" rounded="full" overflow="hidden">
<Box
as={motion.div}
h="full"
bg="bg-primary-blue/60"
initial={{ width: '0%' }}
animate={{ width: '75%' }}
transition={{ duration: 2, ease: 'easeInOut' }}
/>
</Box>
</Box>
{/* Simple CTA */}
<div className="flex justify-center">
<div className="bg-primary-blue/20 text-primary-blue px-6 py-2.5 rounded-lg border border-primary-blue/40 text-sm font-semibold">
One Click
</div>
</div>
</motion.div>
</div>
{/* Simple CTA */}
<Box display="flex" justifyContent="center">
<Box bg="bg-primary-blue/20" color="text-primary-blue" px={6} py={2.5} rounded="lg" border borderColor="border-primary-blue/40">
<Text size="sm" weight="semibold">One Click</Text>
</Box>
</Box>
</Stack>
</Box>
</Box>
);
}
// Desktop version - richer with more automation steps
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 md:p-4 lg:p-6 overflow-hidden">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={{ base: 3, md: 4, lg: 6 }} overflow="hidden">
<Box
as={motion.div}
initial="hidden"
animate="visible"
variants={{
@@ -75,143 +98,218 @@ export default function CompanionAutomationMockup() {
transition: { staggerChildren: shouldReduceMotion ? 0 : 0.12 }
}
}}
className="space-y-3 md:space-y-4 lg:space-y-5"
>
{/* Companion App Header - Enhanced */}
<motion.div variants={{ hidden: { opacity: 0, y: -10 }, visible: { opacity: 1, y: 0 } }}>
<div className="flex items-center gap-2.5 md:gap-3 lg:gap-4 mb-3 md:mb-4 lg:mb-5">
<div className="h-10 w-10 md:h-12 md:w-12 lg:h-14 lg:w-14 bg-primary-blue/20 rounded-lg border-2 border-primary-blue/40 flex items-center justify-center shadow-lg">
<div className="h-6 w-6 md:h-7 md:w-7 lg:h-8 lg:w-8 bg-primary-blue/60 rounded"></div>
</div>
<div>
<div className="text-base md:text-lg lg:text-xl font-semibold text-white">GridPilot Companion</div>
<div className="text-xs md:text-sm lg:text-base text-white/50">Automated Session Creator</div>
</div>
</div>
</motion.div>
<Stack gap={{ base: 3, md: 4, lg: 5 }}>
{/* Companion App Header - Enhanced */}
<Box as={motion.div} variants={{ hidden: { opacity: 0, y: -10 }, visible: { opacity: 1, y: 0 } }}>
<Box display="flex" alignItems="center" gap={{ base: 2.5, md: 3, lg: 4 }} mb={{ base: 3, md: 4, lg: 5 }}>
<Box h={{ base: 10, md: 12, lg: 14 }} w={{ base: 10, md: 12, lg: 14 }} bg="bg-primary-blue/20" rounded="lg" border borderWidth="2px" borderColor="border-primary-blue/40" display="flex" alignItems="center" justifyContent="center" shadow="lg">
<Box h={{ base: 6, md: 7, lg: 8 }} w={{ base: 6, md: 7, lg: 8 }} bg="bg-primary-blue/60" rounded="sm" />
</Box>
<Box>
<Heading level={2} fontSize={{ base: 'base', md: 'lg', lg: 'xl' }} weight="semibold" color="text-white">GridPilot Companion</Heading>
<Text size={{ base: 'xs', md: 'sm', lg: 'base' }} color="text-white" opacity={0.5} block>Automated Session Creator</Text>
</Box>
</Box>
</Box>
{/* Browser Automation Visual - Full workflow */}
<motion.div
variants={{ hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0 } }}
className="relative bg-charcoal-outline rounded-lg p-3 md:p-4 lg:p-5 border-2 border-primary-blue/40 overflow-hidden"
>
{/* Browser Window Mockup */}
<div className="space-y-3 md:space-y-4">
<div className="flex items-center gap-2 md:gap-2.5 pb-3 md:pb-4 border-b border-white/10">
<div className="h-2.5 md:h-3 w-2.5 md:w-3 bg-red-500/60 rounded-full"></div>
<div className="h-2.5 md:h-3 w-2.5 md:w-3 bg-warning-amber/60 rounded-full"></div>
<div className="h-2.5 md:h-3 w-2.5 md:w-3 bg-performance-green/60 rounded-full"></div>
<div className="flex-1 h-2.5 md:h-3 bg-white/5 rounded ml-2 px-2 flex items-center">
<div className="text-[8px] md:text-[9px] text-white/30 font-mono">members.iracing.com</div>
</div>
</div>
{/* Automation Steps - More detailed */}
<div className="space-y-3 md:space-y-4">
{[
{ label: 'Open iRacing', status: 'Complete', detail: 'Browser ready' },
{ label: 'Navigate to Hosted', status: 'Complete', detail: 'Page loaded' },
{ label: 'Create Session', status: 'Running', detail: 'Filling form...' },
{ label: 'Configure Settings', status: 'Pending', detail: 'Waiting...' }
].map((step, index) => (
<motion.div
key={index}
className="space-y-2"
initial={{ opacity: 0, x: -10 }}
animate={{
opacity: 1,
x: 0,
transition: { delay: shouldReduceMotion ? 0 : 0.4 + (index * 0.15) }
}}
>
<div className="flex items-center gap-2.5 md:gap-3">
<motion.div
className={`h-7 w-7 md:h-8 md:w-8 lg:h-9 lg:w-9 rounded-full flex items-center justify-center flex-shrink-0 border-2 ${
step.status === 'Complete'
? 'bg-performance-green/40 border-performance-green/60'
: step.status === 'Running'
? 'bg-primary-blue/40 border-primary-blue/60'
: 'bg-charcoal-outline border-white/20'
}`}
animate={shouldReduceMotion ? {} : step.status === 'Running' ? {
scale: [1, 1.15, 1],
opacity: [0.4, 1, 0.4]
} : {}}
transition={{ duration: 1.5, repeat: Infinity }}
>
{step.status === 'Complete' && (
<svg className="h-4 w-4 md:h-5 md:w-5 text-performance-green" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={3} d="M5 13l4 4L19 7" />
</svg>
)}
{step.status === 'Running' && (
<div className="h-3 w-3 md:h-4 md:w-4 bg-primary-blue rounded-full"></div>
)}
{step.status === 'Pending' && (
<div className="h-2 w-2 md:h-2.5 md:w-2.5 bg-white/30 rounded-full"></div>
)}
</motion.div>
<div className="flex-1">
<div className="text-sm md:text-base lg:text-lg text-white font-medium">{step.label}</div>
<div className="text-[10px] md:text-xs lg:text-sm text-white/50">{step.detail}</div>
</div>
</div>
{step.status !== 'Pending' && (
<div className="h-2.5 md:h-3 w-full bg-white/5 rounded-full overflow-hidden ml-9 md:ml-10 lg:ml-11">
<motion.div
className={`h-full ${step.status === 'Complete' ? 'bg-performance-green/60' : 'bg-primary-blue/60'}`}
initial={{ width: '0%' }}
animate={{ width: step.status === 'Complete' ? '100%' : '65%' }}
transition={{ duration: 2, ease: 'easeInOut' }}
/>
</div>
)}
</motion.div>
))}
</div>
</div>
{/* Automation Running Indicator */}
<motion.div
className="absolute top-3 right-3 flex items-center gap-2 bg-deep-graphite/90 backdrop-blur-sm px-3 py-2 rounded-full border-2 border-primary-blue/40"
animate={shouldReduceMotion ? {} : {
boxShadow: [
'0 0 12px rgba(25,140,255,0.3)',
'0 0 20px rgba(25,140,255,0.5)',
'0 0 12px rgba(25,140,255,0.3)'
]
}}
transition={{ duration: 2, repeat: Infinity }}
{/* Browser Automation Visual - Full workflow */}
<Box
as={motion.div}
variants={{ hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0 } }}
position="relative"
bg="bg-charcoal-outline"
rounded="lg"
p={{ base: 3, md: 4, lg: 5 }}
border
borderWidth="2px"
borderColor="border-primary-blue/40"
overflow="hidden"
>
<motion.div
className="h-2.5 w-2.5 md:h-3 md:w-3 bg-primary-blue rounded-full"
{/* Browser Window Mockup */}
<Stack gap={{ base: 3, md: 4 }}>
<Box display="flex" alignItems="center" gap={{ base: 2, md: 2.5 }} pb={{ base: 3, md: 4 }} borderBottom borderColor="border-white/10">
<Box h={{ base: 2.5, md: 3 }} w={{ base: 2.5, md: 3 }} bg="bg-red-500/60" rounded="full" />
<Box h={{ base: 2.5, md: 3 }} w={{ base: 2.5, md: 3 }} bg="bg-warning-amber/60" rounded="full" />
<Box h={{ base: 2.5, md: 3 }} w={{ base: 2.5, md: 3 }} bg="bg-performance-green/60" rounded="full" />
<Box flexGrow={1} h={{ base: 2.5, md: 3 }} bg="bg-white/5" rounded="sm" ml={2} px={2} display="flex" alignItems="center">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '8px' }}
color="text-white"
opacity={0.3}
font="mono"
>
members.iracing.com
</Text>
</Box>
</Box>
{/* Automation Steps - More detailed */}
<Stack gap={{ base: 3, md: 4 }}>
{[
{ label: 'Open iRacing', status: 'Complete', detail: 'Browser ready' },
{ label: 'Navigate to Hosted', status: 'Complete', detail: 'Page loaded' },
{ label: 'Create Session', status: 'Running', detail: 'Filling form...' },
{ label: 'Configure Settings', status: 'Pending', detail: 'Waiting...' }
].map((step, index) => (
<Box
key={index}
as={motion.div}
initial={{ opacity: 0, x: -10 }}
animate={{
opacity: 1,
x: 0,
transition: { delay: shouldReduceMotion ? 0 : 0.4 + (index * 0.15) }
}}
>
<Stack gap={2}>
<Box display="flex" alignItems="center" gap={{ base: 2.5, md: 3 }}>
<Box
as={motion.div}
h={{ base: 7, md: 8, lg: 9 }}
w={{ base: 7, md: 8, lg: 9 }}
rounded="full"
display="flex"
alignItems="center"
justifyContent="center"
flexShrink={0}
border
borderWidth="2px"
bg={
step.status === 'Complete'
? 'bg-performance-green/40'
: step.status === 'Running'
? 'bg-primary-blue/40'
: 'bg-charcoal-outline'
}
borderColor={
step.status === 'Complete'
? 'border-performance-green/60'
: step.status === 'Running'
? 'border-primary-blue/60'
: 'border-white/20'
}
animate={shouldReduceMotion ? {} : step.status === 'Running' ? {
scale: [1, 1.15, 1],
opacity: [0.4, 1, 0.4]
} : {}}
transition={{ duration: 1.5, repeat: Infinity }}
>
{step.status === 'Complete' && (
<Icon icon={Check} size={5} color="text-performance-green" />
)}
{step.status === 'Running' && (
<Box h={{ base: 3, md: 4 }} w={{ base: 3, md: 4 }} bg="bg-primary-blue" rounded="full" />
)}
{step.status === 'Pending' && (
<Box h={{ base: 2, md: 2.5 }} w={{ base: 2, md: 2.5 }} bg="bg-white/30" rounded="full" />
)}
</Box>
<Box flexGrow={1}>
<Text size={{ base: 'sm', md: 'base', lg: 'lg' }} color="text-white" weight="medium" block>{step.label}</Text>
<Text size={{ base: 'xs', md: 'sm' }} color="text-white" opacity={0.5} block>{step.detail}</Text>
</Box>
</Box>
{step.status !== 'Pending' && (
<Box h={{ base: 2.5, md: 3 }} fullWidth bg="bg-white/5" rounded="full" overflow="hidden" ml={{ base: 9, md: 10, lg: 11 }}>
<Box
as={motion.div}
h="full"
bg={step.status === 'Complete' ? 'bg-performance-green/60' : 'bg-primary-blue/60'}
initial={{ width: '0%' }}
animate={{ width: step.status === 'Complete' ? '100%' : '65%' }}
transition={{ duration: 2, ease: 'easeInOut' }}
/>
</Box>
)}
</Stack>
</Box>
))}
</Stack>
</Stack>
{/* Automation Running Indicator */}
<Box
as={motion.div}
position="absolute"
top="3"
right="3"
display="flex"
alignItems="center"
gap={2}
bg="bg-deep-graphite/90"
// eslint-disable-next-line gridpilot-rules/component-classification
className="backdrop-blur-sm"
px={3}
py={2}
rounded="full"
border
borderWidth="2px"
borderColor="border-primary-blue/40"
animate={shouldReduceMotion ? {} : {
opacity: [1, 0.5, 1]
boxShadow: [
'0 0 12px rgba(25,140,255,0.3)',
'0 0 20px rgba(25,140,255,0.5)',
'0 0 12px rgba(25,140,255,0.3)'
]
}}
transition={{ duration: 1.5, repeat: Infinity }}
/>
<div className="text-xs md:text-sm text-primary-blue font-medium">Running</div>
</motion.div>
</motion.div>
transition={{ duration: 2, repeat: Infinity }}
>
<Box
as={motion.div}
h={{ base: 2.5, md: 3 }}
w={{ base: 2.5, md: 3 }}
bg="bg-primary-blue"
rounded="full"
animate={shouldReduceMotion ? {} : {
opacity: [1, 0.5, 1]
}}
transition={{ duration: 1.5, repeat: Infinity }}
/>
<Text size={{ base: 'xs', md: 'sm' }} color="text-primary-blue" weight="medium">Running</Text>
</Box>
</Box>
{/* One-Click Action - Enhanced */}
<motion.div
variants={{ hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0 } }}
className="flex flex-col items-center gap-2 md:gap-3"
>
<motion.div
className="bg-primary-blue/20 text-primary-blue px-8 py-4 rounded-lg border-2 border-primary-blue/40 text-base md:text-lg font-semibold cursor-pointer"
whileHover={shouldReduceMotion ? {} : {
scale: 1.03,
boxShadow: '0 4px 24px rgba(25,140,255,0.3)',
transition: { duration: 0.15 }
}}
{/* One-Click Action - Enhanced */}
<Box
as={motion.div}
variants={{ hidden: { opacity: 0, y: 10 }, visible: { opacity: 1, y: 0 } }}
display="flex"
flexDirection="col"
alignItems="center"
gap={{ base: 2, md: 3 }}
>
Create Session
</motion.div>
<div className="text-[10px] md:text-xs text-white/40">One click. All fields automated.</div>
</motion.div>
</motion.div>
</div>
<Box
as={motion.div}
bg="bg-primary-blue/20"
color="text-primary-blue"
px={8}
py={4}
rounded="lg"
border
borderWidth="2px"
borderColor="border-primary-blue/40"
cursor="pointer"
whileHover={shouldReduceMotion ? {} : {
scale: 1.03,
boxShadow: '0 4px 24px rgba(25,140,255,0.3)',
transition: { duration: 0.15 }
}}
>
<Text size={{ base: 'base', md: 'lg' }} weight="semibold">Create Session</Text>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.4}
>
One click. All fields automated.
</Text>
</Box>
</Stack>
</Box>
</Box>
);
}
}

View File

@@ -2,8 +2,11 @@
import { motion, useReducedMotion, useMotionValue, useSpring, useTransform } from 'framer-motion';
import { useEffect, useState } from 'react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
import { Stack } from '@/ui/Stack';
export default function DriverProfileMockup() {
export function DriverProfileMockup() {
const shouldReduceMotion = useReducedMotion();
const [isMobile, setIsMobile] = useState(false);
@@ -23,64 +26,79 @@ export default function DriverProfileMockup() {
if (isMobile) {
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
<div className="space-y-4">
<div>
<div className="flex items-center justify-between mb-2">
<div className="flex items-center gap-3">
<div className="relative h-12 w-12 rounded-full border-2 border-primary-blue/50 overflow-hidden bg-charcoal-outline">
<div className="absolute inset-0 flex items-center justify-center text-2xl">🏎</div>
</div>
<div>
<div className="text-base font-bold text-white">Driver Profile</div>
<div className="text-xs text-white/50">Cross-league</div>
</div>
</div>
<div className="text-2xl font-bold text-charcoal-outline">#33</div>
</div>
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={3} overflow="hidden">
<Stack gap={4}>
<Box>
<Box display="flex" alignItems="center" justifyContent="between" mb={2}>
<Box display="flex" alignItems="center" gap={3}>
<Box position="relative" h="12" w="12" rounded="full" border borderWidth="2px" borderColor="border-primary-blue/50" overflow="hidden" bg="bg-charcoal-outline">
<Box position="absolute" inset="0" display="flex" alignItems="center" justifyContent="center">
<Text size="2xl">🏎</Text>
</Box>
</Box>
<Box>
<Text weight="bold" color="text-white" block>Driver Profile</Text>
<Text size="xs" color="text-white" opacity={0.5} block>Cross-league</Text>
</Box>
</Box>
<Text size="2xl" weight="bold" color="text-charcoal-outline">#33</Text>
</Box>
<div className="relative h-2 bg-charcoal-outline rounded-full overflow-hidden mb-1">
<div
className="absolute inset-y-0 left-0 bg-gradient-to-r from-primary-blue to-neon-aqua rounded-full"
<Box position="relative" h="2" bg="bg-charcoal-outline" rounded="full" overflow="hidden" mb={1}>
<Box
position="absolute"
insetY="0"
left="0"
bg="bg-gradient-to-r from-primary-blue to-neon-aqua"
rounded="full"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ width: '86%' }}
/>
</div>
<div className="flex justify-end">
<span className="text-xs text-gray-400">2150 GP Rating</span>
</div>
</div>
</Box>
<Box display="flex" justifyContent="end">
<Text size="xs" color="text-gray-400">2150 GP Rating</Text>
</Box>
</Box>
<div>
<div className="text-sm font-semibold text-white mb-2">Career Stats</div>
<div className="grid grid-cols-3 gap-2">
<Box>
<Text size="sm" weight="semibold" color="text-white" mb={2} block>Career Stats</Text>
<Box display="grid" gridCols={3} gap={2}>
{stats.slice(0, 3).map((stat) => (
<div
<Box
key={stat.label}
className="bg-iron-gray/50 border border-charcoal-outline rounded-lg p-2 text-center"
bg="bg-iron-gray/50"
border
borderColor="border-charcoal-outline"
rounded="lg"
p={2}
textAlign="center"
>
<div className="text-base font-bold text-white font-mono">
<Text weight="bold" color="text-white" font="mono" block>
{stat.value}{stat.suffix}
</div>
<div className="text-xs text-gray-400 mt-0.5">{stat.label}</div>
</div>
</Text>
<Text size="xs" color="text-gray-400" mt={0.5} block>{stat.label}</Text>
</Box>
))}
</div>
</div>
</Box>
</Box>
<div>
<div className="text-sm font-semibold text-white mb-2">Recent Form</div>
<div className="h-16 bg-iron-gray/30 border border-charcoal-outline rounded-lg p-2 flex items-end gap-1">
<Box>
<Text size="sm" weight="semibold" color="text-white" mb={2} block>Recent Form</Text>
<Box h="16" bg="bg-iron-gray/30" border borderColor="border-charcoal-outline" rounded="lg" p={2} display="flex" alignItems="end" gap={1}>
{formData.slice(-6).map((value, i) => (
<div
<Box
key={i}
className="flex-1 bg-gradient-to-t from-performance-green to-primary-blue rounded-sm"
flexGrow={1}
bg="bg-gradient-to-t from-performance-green to-primary-blue"
rounded="sm"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ height: `${value}%` }}
/>
))}
</div>
</div>
</div>
</div>
</Box>
</Box>
</Stack>
</Box>
);
}
@@ -102,60 +120,83 @@ export default function DriverProfileMockup() {
};
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={{ base: 1.5, sm: 3, md: 5, lg: 8 }} overflow="hidden">
<Box
as={motion.div}
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : -10 }}
animate={{ opacity: 1, y: 0 }}
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
mb={{ base: 1.5, sm: 3, md: 4, lg: 6 }}
>
<div className="flex items-center justify-between mb-1.5 sm:mb-2 md:mb-3 lg:mb-4">
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4">
<div className="relative h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:h-16 lg:w-16 rounded-full border-2 border-primary-blue/50 overflow-hidden bg-charcoal-outline">
<div className="absolute inset-0 flex items-center justify-center text-base sm:text-xl md:text-2xl lg:text-3xl">🏎</div>
</div>
<div>
<div className="text-sm sm:text-base md:text-lg lg:text-xl font-bold text-white mb-1 sm:mb-1.5 md:mb-2">Driver Profile</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50">Cross-league racing identity</div>
</div>
</div>
<div className="text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold text-charcoal-outline">#33</div>
</div>
<Box display="flex" alignItems="center" justifyContent="between" mb={{ base: 1.5, sm: 2, md: 3, lg: 4 }}>
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }}>
<Box position="relative" h={{ base: 8, sm: 10, md: 12, lg: 16 }} w={{ base: 8, sm: 10, md: 12, lg: 16 }} rounded="full" border borderWidth="2px" borderColor="border-primary-blue/50" overflow="hidden" bg="bg-charcoal-outline">
<Box position="absolute" inset="0" display="flex" alignItems="center" justifyContent="center">
<Text size={{ base: 'base', sm: 'xl', md: '2xl', lg: '3xl' }}>🏎</Text>
</Box>
</Box>
<Box>
<Text size={{ base: 'sm', sm: 'base', md: 'lg', lg: 'xl' }} weight="bold" color="text-white" mb={{ base: 1, sm: 1.5, md: 2 }} block>Driver Profile</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.5}
block
>
Cross-league racing identity
</Text>
</Box>
</Box>
<Text size={{ base: 'xl', sm: '2xl', md: '3xl', lg: '4xl' }} weight="bold" color="text-charcoal-outline">#33</Text>
</Box>
<div className="flex flex-wrap items-center gap-1 sm:gap-2 md:gap-3 lg:gap-4 mb-1 sm:mb-1.5 md:mb-2">
<div className="text-[8px] sm:text-[10px] md:text-xs text-gray-400">GridPilot Rating:</div>
<Box display="flex" flexWrap="wrap" alignItems="center" gap={{ base: 1, sm: 2, md: 3, lg: 4 }} mb={{ base: 1, sm: 1.5, md: 2 }}>
<Text size="xs" color="text-gray-400">GridPilot Rating:</Text>
<AnimatedRating shouldReduceMotion={shouldReduceMotion ?? false} value={2150} />
<div className="text-[8px] sm:text-[10px] md:text-xs text-gray-400">iRating:</div>
<Text size="xs" color="text-gray-400">iRating:</Text>
<AnimatedRating shouldReduceMotion={shouldReduceMotion ?? false} value={3200} />
</div>
</Box>
<div className="relative h-1.5 sm:h-2 md:h-2.5 lg:h-3 bg-charcoal-outline rounded-full overflow-hidden">
<motion.div
className="absolute inset-y-0 left-0 bg-gradient-to-r from-primary-blue to-neon-aqua rounded-full"
<Box position="relative" h={{ base: 1.5, sm: 2, md: 2.5, lg: 3 }} bg="bg-charcoal-outline" rounded="full" overflow="hidden">
<Box
as={motion.div}
position="absolute"
insetY="0"
left="0"
bg="bg-gradient-to-r from-primary-blue to-neon-aqua"
rounded="full"
initial={{ width: '0%' }}
animate={{ width: '86%' }}
transition={{ delay: shouldReduceMotion ? 0 : 0.4, duration: 0.8, ease: 'easeOut' }}
/>
</div>
<div className="flex justify-end mt-1">
<span className="text-[8px] sm:text-[10px] md:text-xs text-gray-400">86%</span>
</div>
</motion.div>
</Box>
<Box display="flex" justifyContent="end" mt={1}>
<Text size="xs" color="text-gray-400">86%</Text>
</Box>
</Box>
<motion.div
<Box
as={motion.div}
variants={containerVariants}
initial="hidden"
animate="visible"
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
mb={{ base: 1.5, sm: 3, md: 4, lg: 6 }}
>
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white mb-1">Career Statistics</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1 sm:mb-2 md:mb-3">Aggregated across all leagues</div>
<Text size="sm" weight="semibold" color="text-white" mb={1} block>Career Statistics</Text>
<Text size="xs" color="text-white" opacity={0.5} mb={{ base: 1, sm: 2, md: 3 }} block>Aggregated across all leagues</Text>
<div className="grid grid-cols-2 md:grid-cols-5 gap-1.5 sm:gap-2 md:gap-3">
<Box display="grid" gridCols={{ base: 2, md: 5 }} gap={{ base: 1.5, sm: 2, md: 3 }}>
{stats.map((stat, index) => (
<motion.div
<Box
key={stat.label}
as={motion.div}
variants={itemVariants}
className="bg-iron-gray/50 border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 text-center"
bg="bg-iron-gray/50"
border
borderColor="border-charcoal-outline"
rounded="lg"
p={{ base: 1.5, sm: 2, md: 3 }}
textAlign="center"
>
<AnimatedCounter
value={stat.value}
@@ -163,26 +204,30 @@ export default function DriverProfileMockup() {
delay={index * 0.1}
suffix={stat.suffix ?? ''}
/>
<div className="text-[8px] sm:text-[10px] md:text-xs text-gray-400 mt-0.5">{stat.label}</div>
</motion.div>
<Text size="xs" color="text-gray-400" mt={0.5} block>{stat.label}</Text>
</Box>
))}
</div>
</motion.div>
</Box>
</Box>
<motion.div
<Box
as={motion.div}
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : 10 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: shouldReduceMotion ? 0 : 0.6 }}
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
mb={{ base: 1.5, sm: 3, md: 4, lg: 6 }}
>
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white mb-1">Recent Form</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1 sm:mb-2 md:mb-3">Performance trend over last 10 races</div>
<Text size="sm" weight="semibold" color="text-white" mb={1} block>Recent Form</Text>
<Text size="xs" color="text-white" opacity={0.5} mb={{ base: 1, sm: 2, md: 3 }} block>Performance trend over last 10 races</Text>
<div className="h-12 sm:h-16 md:h-20 bg-iron-gray/30 border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 flex items-end gap-0.5">
<Box h={{ base: 12, sm: 16, md: 20 }} bg="bg-iron-gray/30" border borderColor="border-charcoal-outline" rounded="lg" p={{ base: 1.5, sm: 2, md: 3 }} display="flex" alignItems="end" gap={0.5}>
{formData.map((value, i) => (
<motion.div
<Box
key={i}
className="flex-1 bg-gradient-to-t from-performance-green to-primary-blue rounded-sm"
as={motion.div}
flexGrow={1}
bg="bg-gradient-to-t from-performance-green to-primary-blue"
rounded="sm"
initial={{ height: 0 }}
animate={{ height: `${value}%` }}
transition={{
@@ -192,67 +237,76 @@ export default function DriverProfileMockup() {
}}
/>
))}
</div>
<div className="flex justify-between mt-0.5 text-[8px] sm:text-[10px] md:text-xs text-gray-500">
<span>Last 10 races</span>
<span>Recent</span>
</div>
</motion.div>
</Box>
<Box display="flex" justifyContent="between" mt={0.5}>
<Text size="xs" color="text-gray-500">Last 10 races</Text>
<Text size="xs" color="text-gray-500">Recent</Text>
</Box>
</Box>
<motion.div
<Box
as={motion.div}
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : 10 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: shouldReduceMotion ? 0 : 0.8 }}
>
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-white mb-1">Teams</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1 sm:mb-2 md:mb-3">Current and past team memberships</div>
<Text size="sm" weight="semibold" color="text-white" mb={1} block>Teams</Text>
<Text size="xs" color="text-white" opacity={0.5} mb={{ base: 1, sm: 2, md: 3 }} block>Current and past team memberships</Text>
<div className="space-y-1 sm:space-y-1.5 md:space-y-2">
<Stack gap={{ base: 1, sm: 1.5, md: 2 }}>
{[
{ team: 'Red Bull Racing', status: 'Current', color: 'primary-blue' },
{ team: 'Mercedes AMG', status: '2023', color: 'charcoal-outline' }
].map((team, i) => (
<motion.div
<Box
key={team.team}
as={motion.div}
initial={{ opacity: 0, x: shouldReduceMotion ? 0 : -10 }}
animate={{ opacity: 1, x: 0 }}
transition={{ delay: shouldReduceMotion ? 0 : 0.9 + i * 0.1 }}
className="flex items-center justify-between bg-iron-gray/30 border border-charcoal-outline rounded-lg p-1 sm:p-1.5 md:p-2 text-[10px] sm:text-xs md:text-sm"
display="flex"
alignItems="center"
justifyContent="between"
bg="bg-iron-gray/30"
border
borderColor="border-charcoal-outline"
rounded="lg"
p={{ base: 1, sm: 1.5, md: 2 }}
>
<div className="flex items-center gap-2 sm:gap-3">
<div className="h-5 w-5 sm:h-6 sm:w-6 md:h-8 md:w-8 rounded border border-primary-blue/30 bg-charcoal-outline flex items-center justify-center text-sm sm:text-base md:text-lg">
🏁
</div>
<div className="h-1.5 sm:h-2 md:h-3 w-16 sm:w-20 md:w-32 bg-white/10 rounded"></div>
</div>
<span className={`text-[8px] sm:text-[10px] md:text-xs px-1 sm:px-1.5 md:px-2 py-0.5 rounded ${
team.status === 'Current'
? 'bg-primary-blue/20 text-primary-blue'
: 'bg-charcoal-outline text-gray-400'
}`}>
{team.status}
</span>
</motion.div>
<Box display="flex" alignItems="center" gap={{ base: 2, sm: 3 }}>
<Box h={{ base: 5, sm: 6, md: 8 }} w={{ base: 5, sm: 6, md: 8 }} rounded="sm" border borderColor="border-primary-blue/30" bg="bg-charcoal-outline" display="flex" alignItems="center" justifyContent="center">
<Text size={{ base: 'sm', sm: 'base', md: 'lg' }}>🏁</Text>
</Box>
<Box h={{ base: 1.5, sm: 2, md: 3 }} w={{ base: 16, sm: 20, md: 32 }} bg="bg-white/10" rounded="sm" />
</Box>
<Box as="span" px={{ base: 1, sm: 1.5, md: 2 }} py={0.5} rounded="sm" bg={team.status === 'Current' ? 'bg-primary-blue/20' : 'bg-charcoal-outline'}>
<Text size="xs" color={team.status === 'Current' ? 'text-primary-blue' : 'text-gray-400'}>
{team.status}
</Text>
</Box>
</Box>
))}
</div>
</Stack>
<motion.div
<Box
as={motion.div}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: shouldReduceMotion ? 0 : 1.2 }}
className="mt-2 sm:mt-3 md:mt-4 text-center text-[8px] sm:text-[10px] md:text-xs text-gray-400"
mt={{ base: 2, sm: 3, md: 4 }}
textAlign="center"
>
Active in 3 leagues
</motion.div>
</motion.div>
</div>
<Text size="xs" color="text-gray-400">Active in 3 leagues</Text>
</Box>
</Box>
</Box>
);
}
function AnimatedRating({ shouldReduceMotion, value }: { shouldReduceMotion: boolean; value: number }) {
const count = useMotionValue(0);
const rounded = useTransform(count, (v: number) => Math.round(v));
const spring = useSpring(count, { stiffness: 50, damping: 25 });
const rounded = useTransform(spring, (v: number) => Math.round(v));
useEffect(() => {
if (shouldReduceMotion) {
@@ -264,9 +318,9 @@ function AnimatedRating({ shouldReduceMotion, value }: { shouldReduceMotion: boo
}, [shouldReduceMotion, count, value]);
return (
<motion.span className="text-sm sm:text-base md:text-lg font-bold text-primary-blue font-mono">
{shouldReduceMotion ? value : <motion.span>{rounded}</motion.span>}
</motion.span>
<Box as={motion.span} weight="bold" color="text-primary-blue" font="mono" size={{ base: 'sm', sm: 'base', md: 'lg' }}>
{shouldReduceMotion ? value : <Box as={motion.span}>{rounded}</Box>}
</Box>
);
}
@@ -294,8 +348,8 @@ function AnimatedCounter({
}, [shouldReduceMotion, count, value, delay]);
return (
<div className="text-sm sm:text-base md:text-lg lg:text-xl font-bold text-white font-mono">
{shouldReduceMotion ? value : <motion.span>{rounded}</motion.span>}{suffix}
</div>
<Box weight="bold" color="text-white" font="mono" size={{ base: 'sm', sm: 'base', md: 'lg', lg: 'xl' }}>
{shouldReduceMotion ? value : <Box as={motion.span}>{rounded}</Box>}{suffix}
</Box>
);
}
}

View File

@@ -2,14 +2,20 @@
import { motion, useReducedMotion } from 'framer-motion';
import { useState, useEffect } from 'react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
import { Stack } from '@/ui/Stack';
export default function LeagueDiscoveryMockup() {
export function LeagueDiscoveryMockup() {
const shouldReduceMotion = useReducedMotion();
const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);
const [isMobile, setIsMobile] = useState(false);
useEffect(() => {
setIsMobile(window.innerWidth < 768);
const checkMobile = () => setIsMobile(window.innerWidth < 768);
checkMobile();
window.addEventListener('resize', checkMobile);
return () => window.removeEventListener('resize', checkMobile);
}, []);
const leagues = [
@@ -37,76 +43,92 @@ export default function LeagueDiscoveryMockup() {
if (isMobile) {
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
<div className="mb-3">
<div className="h-4 w-40 bg-white/10 rounded mb-3"></div>
<div className="flex gap-2 flex-wrap">
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={3} overflow="hidden">
<Box mb={3}>
<Box h="4" w="40" bg="bg-white/10" rounded="sm" mb={3} />
<Box display="flex" gap={2} flexWrap="wrap">
{['Game', 'Region'].map((filter) => (
<div
<Box
key={filter}
className="h-6 px-3 bg-charcoal-outline border border-primary-blue/30 rounded-full flex items-center"
h="6"
px={3}
bg="bg-charcoal-outline"
border
borderColor="border-primary-blue/30"
rounded="full"
display="flex"
alignItems="center"
>
<div className="h-1.5 w-10 bg-white/10 rounded"></div>
</div>
<Box h="1.5" w="10" bg="bg-white/10" rounded="sm" />
</Box>
))}
</div>
</div>
</Box>
</Box>
<div className="space-y-3">
<Stack gap={3}>
{leagues.map((league) => (
<div
<Box
key={league.name}
className="bg-iron-gray/80 border border-charcoal-outline rounded-lg p-3"
bg="bg-iron-gray/80"
border
borderColor="border-charcoal-outline"
rounded="lg"
p={3}
>
<div className="flex items-start justify-between mb-2">
<div className="flex items-center gap-2">
<div className="h-10 w-10 rounded-lg border-2 border-primary-blue/30 bg-charcoal-outline flex items-center justify-center text-xl">
{league.icon}
</div>
<div>
<div className="h-3 w-32 bg-white/10 rounded mb-1"></div>
<div className="flex gap-1 text-xs">
<span className="px-1.5 py-0.5 bg-primary-blue/20 text-primary-blue rounded">
{league.carClass}
</span>
<span className="px-1.5 py-0.5 bg-neon-aqua/20 text-neon-aqua rounded">
{league.region}
</span>
</div>
</div>
</div>
</div>
<Box display="flex" alignItems="start" justifyContent="between" mb={2}>
<Box display="flex" alignItems="center" gap={2}>
<Box h="10" w="10" rounded="lg" border borderWidth="2px" borderColor="border-primary-blue/30" bg="bg-charcoal-outline" display="flex" alignItems="center" justifyContent="center">
<Text size="xl">{league.icon}</Text>
</Box>
<Box>
<Box h="3" w="32" bg="bg-white/10" rounded="sm" mb={1} />
<Box display="flex" gap={1}>
<Box as="span" px={1.5} py={0.5} bg="bg-primary-blue/20" rounded="sm">
<Text size="xs" color="text-primary-blue">{league.carClass}</Text>
</Box>
<Box as="span" px={1.5} py={0.5} bg="bg-neon-aqua/20" rounded="sm">
<Text size="xs" color="text-neon-aqua">{league.region}</Text>
</Box>
</Box>
</Box>
</Box>
</Box>
<div className="flex items-center justify-between text-xs text-gray-400 mb-2">
<div className="flex items-center gap-2">
<span>{league.drivers} drivers</span>
<span></span>
<span>{league.schedule}</span>
</div>
</div>
<Box display="flex" alignItems="center" justifyContent="between" mb={2}>
<Box display="flex" alignItems="center" gap={2}>
<Text size="xs" color="text-gray-400">{league.drivers} drivers</Text>
<Text size="xs" color="text-gray-400"></Text>
<Text size="xs" color="text-gray-400">{league.schedule}</Text>
</Box>
</Box>
<div className="flex items-center justify-between">
<div className="flex items-center gap-1">
<Box display="flex" alignItems="center" justifyContent="between">
<Box display="flex" alignItems="center" gap={1}>
{[...Array(5)].map((_, i) => (
<svg
<Box
as="svg"
key={i}
className={`w-3 h-3 ${i < Math.floor(league.rating) ? 'text-warning-amber' : 'text-charcoal-outline'}`}
fill="currentColor"
w="3"
h="3"
color={i < Math.floor(league.rating) ? 'text-warning-amber' : 'text-charcoal-outline'}
// eslint-disable-next-line gridpilot-rules/component-classification
className="fill-current"
viewBox="0 0 20 20"
>
{/* eslint-disable-next-line gridpilot-rules/component-classification */}
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</svg>
</Box>
))}
</div>
</Box>
<button className="px-2 py-1 bg-primary-blue text-white text-xs rounded">
Join
</button>
</div>
</div>
<Box as="button" px={2} py={1} bg="bg-primary-blue" rounded="sm">
<Text size="xs" color="text-white">Join</Text>
</Box>
</Box>
</Box>
))}
</div>
</div>
</Stack>
</Box>
);
}
@@ -128,126 +150,212 @@ export default function LeagueDiscoveryMockup() {
};
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={{ base: 1.5, sm: 3, md: 5, lg: 8 }} overflow="hidden">
<Box
as={motion.div}
initial={{ opacity: 0, y: shouldReduceMotion ? 0 : -10 }}
animate={{ opacity: 1, y: 0 }}
className="mb-1.5 sm:mb-3 md:mb-4 lg:mb-6"
mb={{ base: 1.5, sm: 3, md: 4, lg: 6 }}
>
<div className="h-3 sm:h-4 md:h-5 lg:h-6 w-32 sm:w-40 md:w-52 bg-white/10 rounded mb-1.5 sm:mb-2 md:mb-3 lg:mb-4"></div>
<Box h={{ base: 3, sm: 4, md: 5, lg: 6 }} w={{ base: 32, sm: 40, md: 52 }} bg="bg-white/10" rounded="sm" mb={{ base: 1.5, sm: 2, md: 3, lg: 4 }} />
<div className="flex gap-1 sm:gap-1.5 md:gap-2 flex-wrap">
<Box display="flex" gap={{ base: 1, sm: 1.5, md: 2 }} flexWrap="wrap">
{['Game', 'Region', 'Skill'].map((filter, i) => (
<motion.div
<Box
key={filter}
as={motion.div}
initial={{ opacity: 0, scale: shouldReduceMotion ? 1 : 0.9 }}
animate={{ opacity: 1, scale: 1 }}
transition={{ delay: shouldReduceMotion ? 0 : i * 0.1 }}
className="h-5 sm:h-6 md:h-7 lg:h-8 px-2 sm:px-3 md:px-4 bg-charcoal-outline border border-primary-blue/30 rounded-full flex items-center"
h={{ base: 5, sm: 6, md: 7, lg: 8 }}
px={{ base: 2, sm: 3, md: 4 }}
bg="bg-charcoal-outline"
border
borderColor="border-primary-blue/30"
rounded="full"
display="flex"
alignItems="center"
>
<div className="h-1 sm:h-1.5 md:h-2 w-8 sm:w-10 md:w-12 bg-white/10 rounded"></div>
</motion.div>
<Box h={{ base: 1, sm: 1.5, md: 2 }} w={{ base: 8, sm: 10, md: 12 }} bg="bg-white/10" rounded="sm" />
</Box>
))}
</div>
</motion.div>
</Box>
</Box>
<motion.div
<Box
as={motion.div}
variants={containerVariants}
initial="hidden"
animate="visible"
className="space-y-1.5 sm:space-y-2 md:space-y-3 lg:space-y-4"
>
{leagues.map((league, index) => (
<motion.div
key={league.name}
variants={cardVariants}
onHoverStart={() => !shouldReduceMotion && setHoveredIndex(index)}
onHoverEnd={() => setHoveredIndex(null)}
whileHover={shouldReduceMotion ? {} : {
scale: 1.02,
y: -4,
transition: { duration: 0.2 }
}}
className="bg-iron-gray/80 border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 backdrop-blur-sm"
>
<div className="flex items-start justify-between mb-1.5 sm:mb-2 md:mb-3">
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3">
<div className="h-7 w-7 sm:h-8 sm:w-8 md:h-10 md:w-10 lg:h-12 lg:w-12 rounded-lg border-2 border-primary-blue/30 bg-charcoal-outline flex items-center justify-center text-base sm:text-lg md:text-xl lg:text-2xl shadow-[0_0_12px_rgba(25,140,255,0.2)]">
{league.icon}
</div>
<div>
<div className="h-2.5 sm:h-3 md:h-4 w-28 sm:w-32 md:w-40 bg-white/10 rounded mb-1 sm:mb-1.5 md:mb-2"></div>
<div className="flex gap-1 sm:gap-1.5 md:gap-2 text-[8px] sm:text-[10px] md:text-xs">
<span className="px-1 sm:px-1.5 md:px-2 py-0.5 bg-primary-blue/20 text-primary-blue rounded">
{league.carClass}
</span>
<span className="px-1 sm:px-1.5 md:px-2 py-0.5 bg-neon-aqua/20 text-neon-aqua rounded">
{league.region}
</span>
<span className="px-1 sm:px-1.5 md:px-2 py-0.5 bg-charcoal-outline text-gray-400 rounded">
{league.skill}
</span>
</div>
</div>
</div>
</div>
<Stack gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }}>
{leagues.map((league, index) => (
<Box
key={league.name}
as={motion.div}
variants={cardVariants}
onHoverStart={() => !shouldReduceMotion && setHoveredIndex(index)}
onHoverEnd={() => setHoveredIndex(null)}
whileHover={shouldReduceMotion ? {} : {
scale: 1.02,
y: -4,
transition: { duration: 0.2 }
}}
bg="bg-iron-gray/80"
border
borderColor="border-charcoal-outline"
rounded="lg"
p={{ base: 1.5, sm: 2, md: 3, lg: 4 }}
// eslint-disable-next-line gridpilot-rules/component-classification
className="backdrop-blur-sm"
>
<Box display="flex" alignItems="start" justifyContent="between" mb={{ base: 1.5, sm: 2, md: 3 }}>
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }}>
<Box h={{ base: 7, sm: 8, md: 10, lg: 12 }} w={{ base: 7, sm: 8, md: 10, lg: 12 }} rounded="lg" border borderWidth="2px" borderColor="border-primary-blue/30" bg="bg-charcoal-outline" display="flex" alignItems="center" justifyContent="center" shadow="0_0_12px_rgba(25,140,255,0.2)">
<Text size={{ base: 'base', sm: 'lg', md: 'xl', lg: '2xl' }}>{league.icon}</Text>
</Box>
<Box>
<Box h={{ base: 2.5, sm: 3, md: 4 }} w={{ base: 28, sm: 32, md: 40 }} bg="bg-white/10" rounded="sm" mb={{ base: 1, sm: 1.5, md: 2 }} />
<Box display="flex" gap={{ base: 1, sm: 1.5, md: 2 }}>
<Box as="span" px={{ base: 1, sm: 1.5, md: 2 }} py={0.5} bg="bg-primary-blue/20" rounded="sm">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-primary-blue"
>
{league.carClass}
</Text>
</Box>
<Box as="span" px={{ base: 1, sm: 1.5, md: 2 }} py={0.5} bg="bg-neon-aqua/20" rounded="sm">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-neon-aqua"
>
{league.region}
</Text>
</Box>
<Box as="span" px={{ base: 1, sm: 1.5, md: 2 }} py={0.5} bg="bg-charcoal-outline" rounded="sm">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-gray-400"
>
{league.skill}
</Text>
</Box>
</Box>
</Box>
</Box>
</Box>
<div className="flex items-center justify-between text-[8px] sm:text-[10px] md:text-xs text-gray-400 mb-1.5 sm:mb-2 md:mb-3">
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4">
<div className="flex items-center gap-1">
<svg className="w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-4 md:h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
</svg>
<span>{league.drivers} drivers</span>
</div>
<div className="flex items-center gap-1">
<svg className="w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-4 md:h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<span>{league.schedule}</span>
</div>
</div>
</div>
<Box display="flex" alignItems="center" justifyContent="between" mb={{ base: 1.5, sm: 2, md: 3 }}>
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }}>
<Box display="flex" alignItems="center" gap={1}>
<Box as="svg" w={{ base: 2.5, sm: 3, md: 4 }} h={{ base: 2.5, sm: 3, md: 4 }} color="text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
{/* eslint-disable-next-line gridpilot-rules/component-classification */}
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-gray-400"
>
{league.drivers} drivers
</Text>
</Box>
<Box display="flex" alignItems="center" gap={1}>
<Box as="svg" w={{ base: 2.5, sm: 3, md: 4 }} h={{ base: 2.5, sm: 3, md: 4 }} color="text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
{/* eslint-disable-next-line gridpilot-rules/component-classification */}
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-gray-400"
>
{league.schedule}
</Text>
</Box>
</Box>
</Box>
<div className="flex items-center justify-between">
<div className="flex items-center gap-1">
{[...Array(5)].map((_, i) => (
<motion.svg
key={i}
className={`w-2.5 h-2.5 sm:w-3 sm:h-3 md:w-4 md:h-4 ${i < Math.floor(league.rating) ? 'text-warning-amber' : 'text-charcoal-outline'}`}
fill="currentColor"
viewBox="0 0 20 20"
animate={hoveredIndex === index && !shouldReduceMotion ? {
scale: [1, 1.2, 1],
transition: { delay: i * 0.05, duration: 0.3 }
} : {}}
<Box display="flex" alignItems="center" justifyContent="between">
<Box display="flex" alignItems="center" gap={1}>
{[...Array(5)].map((_, i) => (
<Box
as={motion.svg}
key={i}
w={{ base: 2.5, sm: 3, md: 4 }}
h={{ base: 2.5, sm: 3, md: 4 }}
color={i < Math.floor(league.rating) ? 'text-warning-amber' : 'text-charcoal-outline'}
// eslint-disable-next-line gridpilot-rules/component-classification
className="fill-current"
viewBox="0 0 20 20"
animate={hoveredIndex === index && !shouldReduceMotion ? {
scale: [1, 1.2, 1],
transition: { delay: i * 0.05, duration: 0.3 }
} : {}}
>
{/* eslint-disable-next-line gridpilot-rules/component-classification */}
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</Box>
))}
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-gray-400"
ml={1}
>
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" />
</motion.svg>
))}
<span className="text-[8px] sm:text-[10px] md:text-xs text-gray-400 ml-1">{league.rating}</span>
</div>
<div className="flex gap-1 sm:gap-1.5 md:gap-2">
<motion.button
whileHover={shouldReduceMotion ? {} : { scale: 1.05 }}
whileTap={shouldReduceMotion ? {} : { scale: 0.95 }}
className="px-1.5 sm:px-2 md:px-3 py-0.5 bg-primary-blue text-white text-[8px] sm:text-[10px] md:text-xs rounded hover:bg-primary-blue/80 transition-colors"
>
Join
</motion.button>
<motion.button
whileHover={shouldReduceMotion ? {} : { scale: 1.05 }}
whileTap={shouldReduceMotion ? {} : { scale: 0.95 }}
className="px-1.5 sm:px-2 md:px-3 py-0.5 bg-charcoal-outline text-gray-300 text-[8px] sm:text-[10px] md:text-xs rounded hover:bg-charcoal-outline/80 transition-colors"
>
View
</motion.button>
</div>
</div>
</motion.div>
))}
</motion.div>
</div>
{league.rating}
</Text>
</Box>
<Box display="flex" gap={{ base: 1, sm: 1.5, md: 2 }}>
<Box
as={motion.button}
whileHover={shouldReduceMotion ? {} : { scale: 1.05 }}
whileTap={shouldReduceMotion ? {} : { scale: 0.95 }}
px={{ base: 1.5, sm: 2, md: 3 }}
py={0.5}
bg="bg-primary-blue"
color="text-white"
rounded="sm"
transition
hoverBg="bg-primary-blue/80"
>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
>
Join
</Text>
</Box>
<Box
as={motion.button}
whileHover={shouldReduceMotion ? {} : { scale: 1.05 }}
whileTap={shouldReduceMotion ? {} : { scale: 0.95 }}
px={{ base: 1.5, sm: 2, md: 3 }}
py={0.5}
bg="bg-charcoal-outline"
color="text-gray-300"
rounded="sm"
transition
hoverBg="bg-charcoal-outline/80"
>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
>
View
</Text>
</Box>
</Box>
</Box>
</Box>
))}
</Stack>
</Box>
</Box>
);
}
}

View File

@@ -2,8 +2,12 @@
import { motion, useReducedMotion } from 'framer-motion';
import { useState, useEffect } from 'react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
import { Stack } from '@/ui/Stack';
import { Heading } from '@/ui/Heading';
export default function LeagueHomeMockup() {
export function LeagueHomeMockup() {
const shouldReduceMotion = useReducedMotion();
const [isMobile, setIsMobile] = useState(false);
@@ -13,49 +17,52 @@ export default function LeagueHomeMockup() {
if (isMobile) {
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
<div className="space-y-4">
<div className="flex items-center gap-3 mb-2">
<div className="h-12 w-12 rounded-lg border-2 border-primary-blue/50 bg-charcoal-outline flex items-center justify-center text-2xl shadow-[0_0_20px_rgba(25,140,255,0.3)]">
🏆
</div>
<div>
<div className="text-base font-bold text-white">Super GT</div>
<div className="text-xs text-gray-400">Round 8/12</div>
</div>
</div>
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={3} overflow="hidden">
<Stack gap={4}>
<Box display="flex" alignItems="center" gap={3} mb={2}>
<Box h="12" w="12" rounded="lg" border borderWidth="2px" borderColor="border-primary-blue/50" bg="bg-charcoal-outline" display="flex" alignItems="center" justifyContent="center" shadow="0_0_20px_rgba(25,140,255,0.3)">
<Text size="2xl">🏆</Text>
</Box>
<Box>
<Text size="base" weight="bold" color="text-white" block>Super GT</Text>
<Text size="xs" color="text-gray-400" block>Round 8/12</Text>
</Box>
</Box>
<div>
<div className="text-sm font-semibold text-white mb-3">Next Race</div>
<div className="relative flex items-center gap-3 bg-iron-gray rounded-lg p-3 border border-charcoal-outline">
<div className="h-8 w-8 bg-charcoal-outline rounded border border-primary-blue/20 flex items-center justify-center text-base">
🏁
</div>
<div className="flex-1">
<div className="h-2.5 w-28 bg-white/10 rounded mb-2"></div>
<div className="h-2 w-20 bg-white/5 rounded"></div>
</div>
<div className="w-2 h-2 bg-primary-blue rounded-full shadow-glow"></div>
</div>
</div>
<Box>
<Text size="sm" weight="semibold" color="text-white" mb={3} block>Next Race</Text>
<Box position="relative" display="flex" alignItems="center" gap={3} bg="bg-iron-gray" rounded="lg" p={3} border borderColor="border-charcoal-outline">
<Box h="8" w="8" bg="bg-charcoal-outline" rounded border borderColor="border-primary-blue/20" display="flex" alignItems="center" justifyContent="center">
<Text size="base">🏁</Text>
</Box>
<Box flexGrow={1}>
<Box h="2.5" w="28" bg="bg-white/10" rounded="sm" mb={2} />
<Box h="2" w="20" bg="bg-white/5" rounded="sm" />
</Box>
<Box w="2" h="2" bg="bg-primary-blue" rounded="full"
// eslint-disable-next-line gridpilot-rules/component-classification
className="shadow-glow"
/>
</Box>
</Box>
<div>
<div className="text-sm font-semibold text-white mb-3">Latest Result</div>
<div className="bg-iron-gray rounded-lg p-3 border border-charcoal-outline">
<div className="flex items-center gap-3 py-2 border-b border-charcoal-outline">
<div className="h-2.5 w-6 bg-white/10 rounded"></div>
<div className="h-2.5 flex-1 bg-white/10 rounded"></div>
<div className="h-2.5 w-10 bg-white/10 rounded"></div>
</div>
<div className="flex items-center gap-3 py-2">
<div className="h-2 w-6 bg-white/5 rounded"></div>
<div className="h-2 flex-1 bg-white/5 rounded"></div>
<div className="h-2 w-10 bg-performance-green/20 rounded"></div>
</div>
</div>
</div>
</div>
</div>
<Box>
<Text size="sm" weight="semibold" color="text-white" mb={3} block>Latest Result</Text>
<Box bg="bg-iron-gray" rounded="lg" p={3} border borderColor="border-charcoal-outline">
<Box display="flex" alignItems="center" gap={3} py={2} borderBottom borderColor="border-charcoal-outline">
<Box h="2.5" w="6" bg="bg-white/10" rounded="sm" />
<Box h="2.5" flexGrow={1} bg="bg-white/10" rounded="sm" />
<Box h="2.5" w="10" bg="bg-white/10" rounded="sm" />
</Box>
<Box display="flex" alignItems="center" gap={3} py={2}>
<Box h="2" w="6" bg="bg-white/5" rounded="sm" />
<Box h="2" flexGrow={1} bg="bg-white/5" rounded="sm" />
<Box h="2" w="10" bg="bg-performance-green/20" rounded="sm" />
</Box>
</Box>
</Box>
</Stack>
</Box>
);
}
@@ -73,88 +80,138 @@ export default function LeagueHomeMockup() {
};
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={{ base: 1.5, sm: 3, md: 5, lg: 8 }} overflow="hidden">
<Box
as={motion.div}
variants={containerVariants}
initial="hidden"
animate="visible"
className="space-y-1.5 sm:space-y-3 md:space-y-4 lg:space-y-6"
>
<motion.div variants={itemVariants}>
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4 mb-1 sm:mb-1.5 md:mb-2">
<div className="h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 lg:h-16 lg:w-16 rounded-lg border-2 border-primary-blue/50 bg-charcoal-outline flex items-center justify-center text-base sm:text-xl md:text-2xl lg:text-3xl shadow-[0_0_20px_rgba(25,140,255,0.3)]">
🏆
</div>
<div>
<div className="text-sm sm:text-base md:text-lg lg:text-xl font-bold text-white mb-0.5">Super GT Championship</div>
<div className="text-[9px] sm:text-xs md:text-sm text-gray-400">Season 3 Round 8/12</div>
</div>
</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mt-1 sm:mt-1.5 md:mt-2">Your league's dedicated home page</div>
</motion.div>
<Stack gap={{ base: 1.5, sm: 3, md: 4, lg: 6 }}>
<Box as={motion.div} variants={itemVariants}>
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }} mb={{ base: 1, sm: 1.5, md: 2 }}>
<Box h={{ base: 8, sm: 10, md: 12, lg: 16 }} w={{ base: 8, sm: 10, md: 12, lg: 16 }} rounded="lg" border borderWidth="2px" borderColor="border-primary-blue/50" bg="bg-charcoal-outline" display="flex" alignItems="center" justifyContent="center" shadow="0_0_20px_rgba(25,140,255,0.3)">
<Text size={{ base: 'base', sm: 'xl', md: '2xl', lg: '3xl' }}>🏆</Text>
</Box>
<Box>
<Heading level={2} fontSize={{ base: 'sm', sm: 'base', md: 'lg', lg: 'xl' }} weight="bold" color="text-white" mb={0.5}>Super GT Championship</Heading>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '9px' }}
color="text-gray-400"
>
Season 3 Round 8/12
</Text>
</Box>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '8px' }}
color="text-white"
opacity={0.5}
mt={{ base: 1, sm: 1.5, md: 2 }}
block
>
Your league&apos;s dedicated home page
</Text>
</Box>
<motion.div variants={itemVariants}>
<div className="text-[10px] sm:text-sm md:text-base font-semibold text-white mb-1.5 sm:mb-2 md:mb-3 lg:mb-4">Upcoming Races</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1.5 sm:mb-2 md:mb-3">Calendar automatically synced from iRacing</div>
<div className="space-y-1.5 sm:space-y-2 md:space-y-3">
{[1, 2, 3].map((i) => (
<motion.div
key={i}
className="relative flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4 bg-iron-gray rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 border border-charcoal-outline shadow-[inset_0_1px_2px_rgba(0,0,0,0.2)]"
whileHover={shouldReduceMotion ? {} : {
y: -2,
boxShadow: '0 4px 24px rgba(0,0,0,0.4), 0 0 20px rgba(25,140,255,0.3)',
transition: { duration: 0.15 }
}}
transition={{ type: 'spring', stiffness: 200, damping: 20 }}
>
<div className="h-6 w-6 sm:h-7 sm:w-7 md:h-8 md:w-8 lg:h-10 lg:w-10 bg-charcoal-outline rounded border border-primary-blue/20 flex items-center justify-center text-sm sm:text-base md:text-lg lg:text-xl">
🏁
</div>
<div className="flex-1">
<div className="h-1.5 sm:h-2 md:h-2.5 lg:h-3 w-20 sm:w-24 md:w-28 lg:w-32 bg-white/10 rounded mb-1 sm:mb-1.5 md:mb-2"></div>
<div className="h-1 sm:h-1.5 md:h-2 lg:h-2.5 w-12 sm:w-16 md:w-20 lg:w-24 bg-white/5 rounded font-mono"></div>
</div>
{i === 1 && (
<motion.div
className="absolute right-4"
animate={shouldReduceMotion ? {} : {
scale: [1, 1.2, 1],
boxShadow: [
'0 0 20px rgba(25,140,255,0.3)',
'0 0 32px rgba(67,201,230,0.4)',
'0 0 20px rgba(25,140,255,0.3)'
]
}}
transition={{ duration: 2, repeat: Infinity }}
>
<div className="w-1.5 h-1.5 sm:w-2 sm:h-2 md:w-2.5 md:h-2.5 lg:w-3 lg:h-3 bg-primary-blue rounded-full shadow-glow"></div>
</motion.div>
)}
</motion.div>
))}
</div>
</motion.div>
<Box as={motion.div} variants={itemVariants}>
<Text size={{ base: 'xs', sm: 'sm', md: 'base' }} weight="semibold" color="text-white" mb={{ base: 1.5, sm: 2, md: 3, lg: 4 }} block>Upcoming Races</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '8px' }}
color="text-white"
opacity={0.5}
mb={{ base: 1.5, sm: 2, md: 3 }}
block
>
Calendar automatically synced from iRacing
</Text>
<Stack gap={{ base: 1.5, sm: 2, md: 3 }}>
{[1, 2, 3].map((i) => (
<Box
key={i}
as={motion.div}
position="relative"
display="flex"
alignItems="center"
gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }}
bg="bg-iron-gray"
rounded="lg"
p={{ base: 1.5, sm: 2, md: 3, lg: 4 }}
border
borderColor="border-charcoal-outline"
shadow="inset_0_1px_2px_rgba(0,0,0,0.2)"
whileHover={shouldReduceMotion ? {} : {
y: -2,
boxShadow: '0 4px 24px rgba(0,0,0,0.4), 0 0 20px rgba(25,140,255,0.3)',
transition: { duration: 0.15 }
}}
transition={{ type: 'spring', stiffness: 200, damping: 20 }}
>
<Box h={{ base: 6, sm: 7, md: 8, lg: 10 }} w={{ base: 6, sm: 7, md: 8, lg: 10 }} bg="bg-charcoal-outline" rounded border borderColor="border-primary-blue/20" display="flex" alignItems="center" justifyContent="center">
<Text size={{ base: 'sm', sm: 'base', md: 'lg', lg: 'xl' }}>🏁</Text>
</Box>
<Box flexGrow={1}>
<Box h={{ base: 1.5, sm: 2, md: 2.5, lg: 3 }} w={{ base: 20, sm: 24, md: 28, lg: 32 }} bg="bg-white/10" rounded="sm" mb={{ base: 1, sm: 1.5, md: 2 }} />
<Box h={{ base: 1, sm: 1.5, md: 2, lg: 2.5 }} w={{ base: 12, sm: 16, md: 20, lg: 24 }} bg="bg-white/5" rounded="sm" font="mono" />
</Box>
{i === 1 && (
<Box
as={motion.div}
position="absolute"
right="4"
animate={shouldReduceMotion ? {} : {
scale: [1, 1.2, 1],
boxShadow: [
'0 0 20px rgba(25,140,255,0.3)',
'0 0 32px rgba(67,201,230,0.4)',
'0 0 20px rgba(25,140,255,0.3)'
]
}}
transition={{ duration: 2, repeat: Infinity }}
>
<Box w={{ base: 1.5, sm: 2, md: 2.5, lg: 3 }} h={{ base: 1.5, sm: 2, md: 2.5, lg: 3 }} bg="bg-primary-blue" rounded="full"
// eslint-disable-next-line gridpilot-rules/component-classification
className="shadow-glow"
/>
</Box>
)}
</Box>
))}
</Stack>
</Box>
<motion.div variants={itemVariants}>
<div className="text-[10px] sm:text-sm md:text-base font-semibold text-white mb-1.5 sm:mb-2 md:mb-3 lg:mb-4">Recent Results</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1.5 sm:mb-2 md:mb-3">Results appear instantly after each race</div>
<div className="bg-iron-gray rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 border border-charcoal-outline shadow-[0_4px_24px_rgba(0,0,0,0.4)]">
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 mb-1.5 sm:mb-2 md:mb-3 pb-1.5 sm:pb-2 md:pb-3 border-b border-charcoal-outline">
<div className="h-1.5 sm:h-2 md:h-2.5 w-5 sm:w-6 md:w-8 bg-white/10 rounded font-mono"></div>
<div className="h-1.5 sm:h-2 md:h-2.5 flex-1 bg-white/10 rounded"></div>
<div className="h-1.5 sm:h-2 md:h-2.5 w-8 sm:w-10 md:w-12 bg-white/10 rounded font-mono"></div>
</div>
{[1, 2].map((i) => (
<div key={i} className="flex items-center gap-1.5 sm:gap-2 md:gap-3 py-1 sm:py-1.5 md:py-2">
<div className="h-1.5 sm:h-2 md:h-2.5 w-5 sm:w-6 md:w-8 bg-white/5 rounded font-mono"></div>
<div className="h-1.5 sm:h-2 md:h-2.5 flex-1 bg-white/5 rounded"></div>
<div className="h-1.5 sm:h-2 md:h-2.5 w-8 sm:w-10 md:w-12 bg-performance-green/20 rounded text-center font-mono text-performance-green"></div>
</div>
))}
</div>
</motion.div>
</motion.div>
</div>
<Box as={motion.div} variants={itemVariants}>
<Text size={{ base: 'xs', sm: 'sm', md: 'base' }} weight="semibold" color="text-white" mb={{ base: 1.5, sm: 2, md: 3, lg: 4 }} block>Recent Results</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '8px' }}
color="text-white"
opacity={0.5}
mb={{ base: 1.5, sm: 2, md: 3 }}
block
>
Results appear instantly after each race
</Text>
<Box bg="bg-iron-gray" rounded="lg" p={{ base: 1.5, sm: 2, md: 3, lg: 4 }} border borderColor="border-charcoal-outline" shadow="0_4px_24px_rgba(0,0,0,0.4)">
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }} mb={{ base: 1.5, sm: 2, md: 3 }} pb={{ base: 1.5, sm: 2, md: 3 }} borderBottom borderColor="border-charcoal-outline">
<Box h={{ base: 1.5, sm: 2, md: 2.5 }} w={{ base: 5, sm: 6, md: 8 }} bg="bg-white/10" rounded="sm" font="mono" />
<Box h={{ base: 1.5, sm: 2, md: 2.5 }} flexGrow={1} bg="bg-white/10" rounded="sm" />
<Box h={{ base: 1.5, sm: 2, md: 2.5 }} w={{ base: 8, sm: 10, md: 12 }} bg="bg-white/10" rounded="sm" font="mono" />
</Box>
{[1, 2].map((i) => (
<Box key={i} display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }} py={{ base: 1, sm: 1.5, md: 2 }}>
<Box h={{ base: 1.5, sm: 2, md: 2.5 }} w={{ base: 5, sm: 6, md: 8 }} bg="bg-white/5" rounded="sm" font="mono" />
<Box h={{ base: 1.5, sm: 2, md: 2.5 }} flexGrow={1} bg="bg-white/5" rounded="sm" />
<Box h={{ base: 1.5, sm: 2, md: 2.5 }} w={{ base: 8, sm: 10, md: 12 }} bg="bg-performance-green/20" rounded="sm" textAlign="center" font="mono" color="text-performance-green" />
</Box>
))}
</Box>
</Box>
</Stack>
</Box>
</Box>
);
}
}

View File

@@ -2,14 +2,19 @@
import { motion, useReducedMotion } from 'framer-motion';
import { useState, useEffect } from 'react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
export default function ProtestWorkflowMockup() {
export function ProtestWorkflowMockup() {
const shouldReduceMotion = useReducedMotion();
const [activeStep, setActiveStep] = useState<number>(1);
const [isMobile, setIsMobile] = useState(false);
useEffect(() => {
setIsMobile(window.innerWidth < 768);
const checkMobile = () => setIsMobile(window.innerWidth < 768);
checkMobile();
window.addEventListener('resize', checkMobile);
return () => window.removeEventListener('resize', checkMobile);
}, []);
const steps = [
@@ -44,36 +49,53 @@ export default function ProtestWorkflowMockup() {
if (isMobile) {
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg overflow-hidden p-3 flex flex-col justify-center gap-4">
<div className="flex items-center justify-center gap-3">
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" overflow="hidden" p={3} display="flex" flexDirection="col" justifyContent="center" gap={4}>
<Box display="flex" alignItems="center" justifyContent="center" gap={3}>
{steps.map((step, i) => (
<div key={step.name} className="flex items-center">
<div className="flex flex-col items-center">
<div
className={`w-10 h-10 rounded-lg flex items-center justify-center mb-1 border-2 ${getStatusColor(step.status)}`}
<Box key={step.name} display="flex" alignItems="center">
<Box display="flex" flexDirection="col" alignItems="center">
<Box
w="10"
h="10"
rounded="lg"
display="flex"
alignItems="center"
justifyContent="center"
mb={1}
border
borderWidth="2px"
// eslint-disable-next-line gridpilot-rules/component-classification
className={getStatusColor(step.status)}
>
<svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<Box as="svg" w="5" h="5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
{/* eslint-disable-next-line gridpilot-rules/component-classification */}
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={step.icon} />
</svg>
</div>
<div className="text-xs text-white/70 text-center">{step.name}</div>
</div>
</Box>
</Box>
<Text size="xs" color="text-white" opacity={0.7} textAlign="center">{step.name}</Text>
</Box>
{i < steps.length - 1 && (
<svg className="w-4 h-4 mx-1" viewBox="0 0 24 24" fill="none">
<Box as="svg" w="4" h="4" mx={1} viewBox="0 0 24 24" fill="none">
{/* eslint-disable-next-line gridpilot-rules/component-classification */}
<path d="M5 12h14m-7-7l7 7-7 7" stroke="#43C9E6" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
</Box>
)}
</div>
</Box>
))}
</div>
</Box>
<div className="relative h-1 bg-charcoal-outline rounded-full overflow-hidden">
<div
className="absolute inset-y-0 left-0 bg-gradient-to-r from-neon-aqua to-primary-blue rounded-full"
<Box position="relative" h="1" bg="bg-charcoal-outline" rounded="full" overflow="hidden">
<Box
position="absolute"
insetY="0"
left="0"
bg="bg-gradient-to-r from-neon-aqua to-primary-blue"
rounded="full"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ width: `${((activeStep + 1) / steps.length) * 100}%` }}
/>
</div>
</div>
</Box>
</Box>
);
}
@@ -91,100 +113,135 @@ export default function ProtestWorkflowMockup() {
})
};
const arrowVariants = {
hidden: { opacity: 0, pathLength: 0 },
visible: (i: number) => ({
opacity: 1,
pathLength: 1,
transition: {
delay: shouldReduceMotion ? 0 : i * 0.2 + 0.1,
duration: 0.5,
ease: 'easeOut' as const
}
})
};
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg overflow-hidden p-1.5 sm:p-3 md:p-5 lg:p-8 flex flex-col justify-center gap-2 sm:gap-4 md:gap-6 lg:gap-8">
<div className="flex flex-col md:flex-row items-center justify-center gap-2 sm:gap-3 md:gap-4">
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" overflow="hidden" p={{ base: 1.5, sm: 3, md: 5, lg: 8 }} display="flex" flexDirection="col" justifyContent="center" gap={{ base: 2, sm: 4, md: 6, lg: 8 }}>
<Box display="flex" flexDirection={{ base: 'col', md: 'row' }} alignItems="center" justifyContent="center" gap={{ base: 2, sm: 3, md: 4 }}>
{steps.map((step, i) => (
<div key={step.name} className="flex items-center flex-shrink-0">
<motion.div
<Box key={step.name} display="flex" alignItems="center" flexShrink={0}>
<Box
as={motion.div}
custom={i}
variants={stepVariants}
initial="hidden"
animate="visible"
className="flex flex-col items-center"
display="flex"
flexDirection="col"
alignItems="center"
onHoverStart={() => !shouldReduceMotion && setActiveStep(i)}
>
<motion.div
className={`relative w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 lg:w-14 lg:h-14 rounded-lg flex items-center justify-center mb-1 sm:mb-1.5 md:mb-2 border-2 ${getStatusColor(step.status)}`}
whileHover={shouldReduceMotion ? {} : {
scale: 1.1,
boxShadow: step.status === 'active'
? '0 0 32px rgba(255,197,86,0.4)'
: step.status === 'resolved'
? '0 0 32px rgba(111,227,122,0.4)'
: '0 0 20px rgba(34,38,42,0.4)',
transition: { duration: 0.2 }
}}
<Box
as={motion.div}
position="relative"
w={{ base: 8, sm: 10, md: 12, lg: 14 }}
h={{ base: 8, sm: 10, md: 12, lg: 14 }}
rounded="lg"
display="flex"
alignItems="center"
justifyContent="center"
mb={{ base: 1, sm: 1.5, md: 2 }}
border
borderWidth="2px"
// eslint-disable-next-line gridpilot-rules/component-classification
className={getStatusColor(step.status)}
whileHover={shouldReduceMotion ? {} : {
scale: 1.1,
boxShadow: step.status === 'active'
? '0 0 32px rgba(255,197,86,0.4)'
: step.status === 'resolved'
? '0 0 32px rgba(111,227,122,0.4)'
: '0 0 20px rgba(34,38,42,0.4)',
transition: { duration: 0.2 }
}}
transition={{ type: 'spring', stiffness: 300, damping: 15 }}
>
<svg className="w-4 h-4 sm:w-5 sm:h-5 md:w-6 md:h-6 lg:w-7 lg:h-7" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<Box as="svg" w={{ base: 4, sm: 5, md: 6, lg: 7 }} h={{ base: 4, sm: 5, md: 6, lg: 7 }} fill="none" viewBox="0 0 24 24" stroke="currentColor">
{/* eslint-disable-next-line gridpilot-rules/component-classification */}
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d={step.icon} />
</svg>
</Box>
{step.status === 'active' && (
<motion.div
className="absolute inset-0 rounded-lg"
<Box
as={motion.div}
position="absolute"
inset="0"
rounded="lg"
animate={shouldReduceMotion ? {} : {
boxShadow: [
'0 0 20px rgba(255,197,86,0.3)',
'0 0 20px rgba(25,140,255,0.3)',
'0 0 32px rgba(255,197,86,0.5)',
'0 0 20px rgba(255,197,86,0.3)'
'0 0 20px rgba(25,140,255,0.3)'
]
}}
transition={{ duration: 2, repeat: Infinity }}
/>
)}
</motion.div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/70 text-center mb-0.5">{step.name}</div>
<motion.div
className={`h-0.5 sm:h-1 md:h-1.5 w-6 sm:w-8 md:w-10 lg:w-12 rounded ${
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '8px' }}
color="text-white"
opacity={0.7}
textAlign="center"
mb={0.5}
>
{step.name}
</Text>
<Box
as={motion.div}
h={{ base: 0.5, sm: 1, md: 1.5 }}
w={{ base: 6, sm: 8, md: 10, lg: 12 }}
rounded="sm"
bg={
step.status === 'pending' ? 'bg-charcoal-outline' :
step.status === 'active' ? 'bg-warning-amber/30' :
'bg-performance-green/30'
}`}
}
animate={shouldReduceMotion ? {} : step.status === 'active' ? {
opacity: [0.5, 1, 0.5]
} : {}}
transition={{ duration: 2, repeat: Infinity }}
/>
</motion.div>
</Box>
{i < steps.length - 1 && (
<div className="hidden md:block relative ml-1">
<svg className="w-3 h-3 sm:w-4 sm:h-4 md:w-5 md:h-5" viewBox="0 0 24 24" fill="none">
<Box
// eslint-disable-next-line gridpilot-rules/component-classification
className="hidden md:block"
position="relative"
ml={1}
>
<Box as="svg" w={{ base: 3, sm: 4, md: 5 }} h={{ base: 3, sm: 4, md: 5 }} viewBox="0 0 24 24" fill="none">
{/* eslint-disable-next-line gridpilot-rules/component-classification */}
<path d="M5 12h14m-7-7l7 7-7 7" stroke="#43C9E6" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
</div>
</Box>
</Box>
)}
</div>
</Box>
))}
</div>
</Box>
<motion.div
<Box
as={motion.div}
initial={{ opacity: 0, scaleX: 0 }}
animate={{ opacity: 1, scaleX: 1 }}
transition={{ delay: shouldReduceMotion ? 0 : 0.8, duration: 0.6 }}
className="relative h-0.5 sm:h-0.5 md:h-1 bg-charcoal-outline rounded-full overflow-hidden"
position="relative"
h={{ base: 0.5, md: 1 }}
bg="bg-charcoal-outline"
rounded="full"
overflow="hidden"
>
<motion.div
className="absolute inset-y-0 left-0 bg-gradient-to-r from-neon-aqua to-primary-blue rounded-full"
<Box
as={motion.div}
position="absolute"
insetY="0"
left="0"
bg="bg-gradient-to-r from-neon-aqua to-primary-blue"
rounded="full"
initial={{ width: '0%' }}
animate={{ width: `${((activeStep + 1) / steps.length) * 100}%` }}
transition={{ duration: 0.5, ease: 'easeOut' }}
/>
</motion.div>
</div>
</Box>
</Box>
);
}
}

View File

@@ -2,8 +2,12 @@
import { motion, useReducedMotion } from 'framer-motion';
import { useState, useEffect } from 'react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
import { Stack } from '@/ui/Stack';
import { Heading } from '@/ui/Heading';
export default function RaceHistoryMockup() {
export function RaceHistoryMockup() {
const shouldReduceMotion = useReducedMotion();
const [isMobile, setIsMobile] = useState(false);
@@ -22,184 +26,321 @@ export default function RaceHistoryMockup() {
// Simple, elegant mobile version - just the core story
if (isMobile) {
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite to-iron-gray rounded-lg p-4 overflow-hidden flex items-center justify-center">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite to-iron-gray" rounded="lg" p={4} overflow="hidden" display="flex" alignItems="center" justifyContent="center">
<Box
as={motion.div}
initial="hidden"
animate="visible"
variants={{
visible: { transition: { staggerChildren: 0.12 } }
}}
className="space-y-4 w-full max-w-xs"
w="full"
maxWidth="xs"
>
{/* Race result - clean and simple */}
<motion.div variants={itemVariants}>
<div className="bg-iron-gray/60 rounded-xl p-4 border-2 border-primary-blue/40">
<div className="flex items-center gap-3">
<div className="h-14 w-14 bg-primary-blue/20 rounded-lg flex items-center justify-center flex-shrink-0">
<span className="text-2xl font-bold text-primary-blue">P3</span>
</div>
<div>
<div className="text-base font-semibold text-white">Watkins Glen</div>
<div className="text-xs text-white/60">GT3 Sprint</div>
</div>
</div>
</div>
</motion.div>
<Stack gap={4}>
{/* Race result - clean and simple */}
<Box as={motion.div} variants={itemVariants}>
<Box bg="bg-iron-gray/60" rounded="xl" p={4} border borderWidth="2px" borderColor="border-primary-blue/40">
<Box display="flex" alignItems="center" gap={3}>
<Box h="14" w="14" bg="bg-primary-blue/20" rounded="lg" display="flex" alignItems="center" justifyContent="center" flexShrink={0}>
<Text size="2xl" weight="bold" color="text-primary-blue">P3</Text>
</Box>
<Box>
<Text size="base" weight="semibold" color="text-white" block>Watkins Glen</Text>
<Text size="xs" color="text-white" opacity={0.6} block>GT3 Sprint</Text>
</Box>
</Box>
</Box>
</Box>
{/* Simple arrow */}
<motion.div variants={itemVariants} className="flex justify-center">
<div className="text-primary-blue text-2xl"></div>
</motion.div>
{/* Simple arrow */}
<Box as={motion.div} variants={itemVariants} display="flex" justifyContent="center">
<Text color="text-primary-blue" size="2xl"></Text>
</Box>
{/* Updates - minimal */}
<motion.div variants={itemVariants}>
<div className="bg-iron-gray/40 rounded-xl p-3 border border-charcoal-outline space-y-2">
<div className="text-xs text-white/70 text-center mb-2">Profile Updated</div>
<div className="flex gap-2">
<div className="flex-1 bg-deep-graphite/50 rounded py-2 text-center border border-primary-blue/30">
<div className="text-xs text-primary-blue font-semibold">Stats </div>
</div>
<div className="flex-1 bg-deep-graphite/50 rounded py-2 text-center border border-performance-green/30">
<div className="text-xs text-performance-green font-semibold">+12</div>
</div>
</div>
</div>
</motion.div>
</motion.div>
</div>
{/* Updates - minimal */}
<Box as={motion.div} variants={itemVariants}>
<Box bg="bg-iron-gray/40" rounded="xl" p={3} border borderColor="border-charcoal-outline">
<Stack gap={2}>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.7}
textAlign="center"
mb={2}
block
>
Profile Updated
</Text>
<Box display="flex" gap={2}>
<Box flexGrow={1} bg="bg-deep-graphite/50" rounded="sm" py={2} textAlign="center" border borderColor="border-primary-blue/30">
<Text size="xs" color="text-primary-blue" weight="semibold" block>Stats </Text>
</Box>
<Box flexGrow={1} bg="bg-deep-graphite/50" rounded="sm" py={2} textAlign="center" border borderColor="border-performance-green/30">
<Text size="xs" color="text-performance-green" weight="semibold" block>+12</Text>
</Box>
</Box>
</Stack>
</Box>
</Box>
</Stack>
</Box>
</Box>
);
}
// Desktop version - richer with more updates
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-5 lg:p-8 overflow-hidden">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={{ base: 1.5, sm: 3, md: 5, lg: 8 }} overflow="hidden">
<Box
as={motion.div}
initial="hidden"
animate="visible"
variants={{
visible: { transition: { staggerChildren: shouldReduceMotion ? 0 : 0.12 } }
}}
className="space-y-2 sm:space-y-3 md:space-y-4 lg:space-y-5"
>
{/* Race Result Card - Enhanced */}
<motion.div variants={itemVariants}>
<div className="bg-iron-gray rounded-lg p-2 sm:p-3 md:p-4 lg:p-5 border-2 border-primary-blue/40">
<div className="flex items-center gap-2 sm:gap-3 md:gap-4">
<div className="relative h-12 w-12 sm:h-14 sm:w-14 md:h-16 md:w-16 lg:h-20 lg:w-20 bg-charcoal-outline rounded-lg border-2 border-primary-blue/30 overflow-hidden flex-shrink-0">
<div className="absolute inset-0 bg-gradient-to-br from-primary-blue/20 to-performance-green/20"></div>
<div className="absolute inset-0 flex items-center justify-center text-white text-xl sm:text-2xl md:text-3xl lg:text-4xl font-bold">P3</div>
</div>
<div className="flex-1 min-w-0">
<div className="flex items-center gap-1 sm:gap-1.5 md:gap-2 mb-1">
<div className="text-sm sm:text-base md:text-lg">🏁</div>
<div className="text-sm sm:text-base md:text-lg lg:text-xl font-semibold text-white truncate">Watkins Glen</div>
</div>
<div className="text-xs sm:text-sm md:text-base text-white/60 mb-1">GT3 Sprint Race</div>
<div className="flex items-center gap-2 sm:gap-3 md:gap-4 text-[10px] sm:text-xs md:text-sm text-white/50">
<span>24 drivers</span>
<span></span>
<span>45 min</span>
<span></span>
<span>Just finished</span>
</div>
</div>
</div>
</div>
</motion.div>
<Stack gap={{ base: 2, sm: 3, md: 4, lg: 5 }}>
{/* Race Result Card - Enhanced */}
<Box as={motion.div} variants={itemVariants}>
<Box bg="bg-iron-gray" rounded="lg" p={{ base: 2, sm: 3, md: 4, lg: 5 }} border borderWidth="2px" borderColor="border-primary-blue/40">
<Box display="flex" alignItems="center" gap={{ base: 2, sm: 3, md: 4 }}>
<Box position="relative" h={{ base: 12, sm: 14, md: 16, lg: 20 }} w={{ base: 12, sm: 14, md: 16, lg: 20 }} bg="bg-charcoal-outline" rounded="lg" border borderWidth="2px" borderColor="border-primary-blue/30" overflow="hidden" flexShrink={0}>
<Box position="absolute" inset="0" bg="bg-gradient-to-br from-primary-blue/20 to-performance-green/20" />
<Box position="absolute" inset="0" display="flex" alignItems="center" justifyContent="center">
<Text color="text-white" size={{ base: 'xl', sm: '2xl', md: '3xl', lg: '4xl' }} weight="bold">P3</Text>
</Box>
</Box>
<Box flexGrow={1} minWidth="0">
<Box display="flex" alignItems="center" gap={{ base: 1, sm: 1.5, md: 2 }} mb={1}>
<Text size={{ base: 'sm', sm: 'base', md: 'lg' }}>🏁</Text>
<Heading level={3} fontSize={{ base: 'sm', sm: 'base', md: 'lg', lg: 'xl' }} weight="semibold" color="text-white" truncate>Watkins Glen</Heading>
</Box>
<Text size={{ base: 'xs', sm: 'sm', md: 'base' }} color="text-white" opacity={0.6} mb={1} block>GT3 Sprint Race</Text>
<Box display="flex" alignItems="center" gap={{ base: 2, sm: 3, md: 4 }}>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.5}
>
24 drivers
</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.5}
>
</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.5}
>
45 min
</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.5}
>
</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.5}
>
Just finished
</Text>
</Box>
</Box>
</Box>
</Box>
</Box>
{/* Connection Flow with Animation */}
<motion.div variants={itemVariants} className="flex justify-center">
<motion.div
className="flex flex-col items-center gap-1"
animate={shouldReduceMotion ? {} : {
y: [0, 5, 0]
}}
transition={{ duration: 2, repeat: Infinity }}
>
<div className="text-primary-blue text-2xl sm:text-3xl md:text-4xl"></div>
<div className="text-[10px] sm:text-xs text-primary-blue/70">Auto-sync</div>
</motion.div>
</motion.div>
{/* Connection Flow with Animation */}
<Box as={motion.div} variants={itemVariants} display="flex" justifyContent="center">
<Box
as={motion.div}
display="flex"
flexDirection="col"
alignItems="center"
gap={1}
animate={shouldReduceMotion ? {} : {
y: [0, 5, 0]
}}
transition={{ duration: 2, repeat: Infinity }}
>
<Text color="text-primary-blue" size={{ base: '2xl', sm: '3xl', md: '4xl' }}></Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-primary-blue"
opacity={0.7}
>
Auto-sync
</Text>
</Box>
</Box>
{/* Profile Updates Grid - More detailed */}
<motion.div variants={itemVariants}>
<div className="bg-iron-gray/80 rounded-lg p-2 sm:p-3 md:p-4 lg:p-5 border border-charcoal-outline">
<div className="text-xs sm:text-sm md:text-base font-semibold text-white/80 text-center mb-2 sm:mb-3 md:mb-4">
Profile Updates
</div>
<div className="grid grid-cols-2 gap-2 sm:gap-3 md:gap-4">
{/* Career Stats Update */}
<div className="bg-deep-graphite/50 rounded-lg p-2 sm:p-3 md:p-4 border border-primary-blue/30">
<div className="flex items-center justify-between mb-2">
<span className="text-[10px] sm:text-xs md:text-sm text-white/70">Career Stats</span>
<motion.span
className="text-[10px] sm:text-xs md:text-sm text-performance-green font-semibold"
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
transition={{ duration: 0.5, delay: 0.5 }}
{/* Profile Updates Grid - More detailed */}
<Box as={motion.div} variants={itemVariants}>
<Box bg="bg-iron-gray/80" rounded="lg" p={{ base: 2, sm: 3, md: 4, lg: 5 }} border borderColor="border-charcoal-outline">
<Text size={{ base: 'xs', sm: 'sm', md: 'base' }} weight="semibold" color="text-white" opacity={0.8} textAlign="center" mb={{ base: 2, sm: 3, md: 4 }} block>
Profile Updates
</Text>
<Box display="grid" gridCols={2} gap={{ base: 2, sm: 3, md: 4 }}>
{/* Career Stats Update */}
<Box bg="bg-deep-graphite/50" rounded="lg" p={{ base: 2, sm: 3, md: 4 }} border borderColor="border-primary-blue/30">
<Box display="flex" alignItems="center" justifyContent="between" mb={2}>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.7}
>
Career Stats
</Text>
<Box
as={motion.span}
color="text-performance-green"
weight="semibold"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
transition={{ duration: 0.5, delay: 0.5 }}
>
</Box>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '9px' }}
color="text-white"
opacity={0.5}
block
>
</motion.span>
</div>
<div className="text-[9px] sm:text-[10px] md:text-xs text-white/50">
Wins: 24 25
</div>
</div>
Wins: 24 25
</Text>
</Box>
{/* Rating Update */}
<div className="bg-deep-graphite/50 rounded-lg p-2 sm:p-3 md:p-4 border border-performance-green/30">
<div className="flex items-center justify-between mb-2">
<span className="text-[10px] sm:text-xs md:text-sm text-white/70">Rating</span>
<motion.span
className="text-[10px] sm:text-xs md:text-sm text-performance-green font-semibold font-mono"
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
transition={{ duration: 0.5, delay: 0.6 }}
{/* Rating Update */}
<Box bg="bg-deep-graphite/50" rounded="lg" p={{ base: 2, sm: 3, md: 4 }} border borderColor="border-performance-green/30">
<Box display="flex" alignItems="center" justifyContent="between" mb={2}>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.7}
>
Rating
</Text>
<Box
as={motion.span}
color="text-performance-green"
weight="semibold"
font="mono"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
transition={{ duration: 0.5, delay: 0.6 }}
>
+12
</Box>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '9px' }}
color="text-white"
opacity={0.5}
block
>
+12
</motion.span>
</div>
<div className="text-[9px] sm:text-[10px] md:text-xs text-white/50">
1342 1354
</div>
</div>
1342 1354
</Text>
</Box>
{/* Season Points Update */}
<div className="bg-deep-graphite/50 rounded-lg p-2 sm:p-3 md:p-4 border border-warning-amber/30">
<div className="flex items-center justify-between mb-2">
<span className="text-[10px] sm:text-xs md:text-sm text-white/70">Season</span>
<motion.span
className="text-[10px] sm:text-xs md:text-sm text-warning-amber font-semibold font-mono"
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
transition={{ duration: 0.5, delay: 0.7 }}
{/* Season Points Update */}
<Box bg="bg-deep-graphite/50" rounded="lg" p={{ base: 2, sm: 3, md: 4 }} border borderColor="border-warning-amber/30">
<Box display="flex" alignItems="center" justifyContent="between" mb={2}>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.7}
>
Season
</Text>
<Box
as={motion.span}
color="text-warning-amber"
weight="semibold"
font="mono"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
transition={{ duration: 0.5, delay: 0.7 }}
>
+18
</Box>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '9px' }}
color="text-white"
opacity={0.5}
block
>
+18
</motion.span>
</div>
<div className="text-[9px] sm:text-[10px] md:text-xs text-white/50">
248 266 pts
</div>
</div>
248 266 pts
</Text>
</Box>
{/* Team Points Update */}
<div className="bg-deep-graphite/50 rounded-lg p-2 sm:p-3 md:p-4 border border-neon-aqua/30">
<div className="flex items-center justify-between mb-2">
<span className="text-[10px] sm:text-xs md:text-sm text-white/70">Team</span>
<motion.span
className="text-[10px] sm:text-xs md:text-sm text-neon-aqua font-semibold font-mono"
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
transition={{ duration: 0.5, delay: 0.8 }}
{/* Team Points Update */}
<Box bg="bg-deep-graphite/50" rounded="lg" p={{ base: 2, sm: 3, md: 4 }} border borderColor="border-neon-aqua/30">
<Box display="flex" alignItems="center" justifyContent="between" mb={2}>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.7}
>
Team
</Text>
<Box
as={motion.span}
color="text-neon-aqua"
weight="semibold"
font="mono"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
animate={shouldReduceMotion ? {} : { scale: [1, 1.2, 1] }}
transition={{ duration: 0.5, delay: 0.8 }}
>
+18
</Box>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '9px' }}
color="text-white"
opacity={0.5}
block
>
+18
</motion.span>
</div>
<div className="text-[9px] sm:text-[10px] md:text-xs text-white/50">
Contributing
</div>
</div>
</div>
</div>
</motion.div>
</motion.div>
</div>
Contributing
</Text>
</Box>
</Box>
</Box>
</Box>
</Stack>
</Box>
</Box>
);
}
}

View File

@@ -1,8 +1,11 @@
'use client';
import { useState, useEffect } from 'react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
import { Stack } from '@/ui/Stack';
export default function SimPlatformMockup() {
export function SimPlatformMockup() {
const [isMobile, setIsMobile] = useState(false);
useEffect(() => {
@@ -15,119 +18,189 @@ export default function SimPlatformMockup() {
// Simple mobile version - just the essence of cross-platform
if (isMobile) {
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite to-iron-gray rounded-lg p-4 overflow-hidden flex items-center justify-center">
<div className="space-y-3 w-full">
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite to-iron-gray" rounded="lg" p={4} overflow="hidden" display="flex" alignItems="center" justifyContent="center">
<Stack gap={3} w="full">
{/* Active Platform - Clean */}
<div className="bg-iron-gray/60 border-2 border-primary-blue rounded-xl p-4 relative">
<div className="absolute top-3 right-3">
<div className="w-2 h-2 rounded-full bg-performance-green animate-pulse" />
</div>
<div className="flex items-center gap-3">
<div className="w-12 h-12 rounded-lg bg-primary-blue/20 flex items-center justify-center flex-shrink-0">
<span className="text-2xl font-bold text-primary-blue">iR</span>
</div>
<div>
<div className="text-base font-semibold text-white">iRacing</div>
<div className="text-xs text-performance-green">Active</div>
</div>
</div>
</div>
<Box bg="bg-iron-gray/60" border borderWidth="2px" borderColor="border-primary-blue" rounded="xl" p={4} position="relative">
<Box position="absolute" top="3" right="3">
<Box w="2" h="2" rounded="full" bg="bg-performance-green"
// eslint-disable-next-line gridpilot-rules/component-classification
className="animate-pulse"
/>
</Box>
<Box display="flex" alignItems="center" gap={3}>
<Box w="12" h="12" rounded="lg" bg="bg-primary-blue/20" display="flex" alignItems="center" justifyContent="center" flexShrink={0}>
<Text size="2xl" weight="bold" color="text-primary-blue">iR</Text>
</Box>
<Box>
<Text size="base" weight="semibold" color="text-white" block>iRacing</Text>
<Text size="xs" color="text-performance-green" block>Active</Text>
</Box>
</Box>
</Box>
{/* Simple "more coming" indicator */}
<div className="bg-iron-gray/30 rounded-xl p-3 border border-charcoal-outline/50">
<div className="text-xs text-center text-slate-500">More platforms coming</div>
</div>
</div>
</div>
<Box bg="bg-iron-gray/30" rounded="xl" p={3} border borderColor="border-charcoal-outline/50">
<Text size="xs" textAlign="center" color="text-slate-500" block>More platforms coming</Text>
</Box>
</Stack>
</Box>
);
}
// Desktop version
return (
<div className="relative w-full max-w-3xl mx-auto">
<div className="bg-iron-gray border border-charcoal-outline rounded-lg p-1.5 sm:p-3 md:p-4 lg:p-6 shadow-2xl">
<div className="space-y-1.5 sm:space-y-2 md:space-y-3 lg:space-y-4">
<div className="flex items-center justify-between pb-1.5 sm:pb-2 md:pb-3 lg:pb-4 border-b border-charcoal-outline">
<div className="text-[9px] sm:text-xs md:text-sm font-semibold text-slate-300">Platform Support</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-slate-500">Active: 1 | Planned: 3</div>
</div>
<Box position="relative" fullWidth maxWidth="3xl" mx="auto">
<Box bg="bg-iron-gray" border borderColor="border-charcoal-outline" rounded="lg" p={{ base: 1.5, sm: 3, md: 4, lg: 6 }} shadow="2xl">
<Stack gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }}>
<Box display="flex" alignItems="center" justifyContent="between" pb={{ base: 1.5, sm: 2, md: 3, lg: 4 }} borderBottom borderColor="border-charcoal-outline">
<Text size={{ base: 'xs', sm: 'sm' }} weight="semibold" color="text-slate-300">Platform Support</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-slate-500"
>
Active: 1 | Planned: 3
</Text>
</Box>
<div className="grid grid-cols-1 md:grid-cols-2 gap-1.5 sm:gap-2 md:gap-3">
<Box display="grid" gridCols={{ base: 1, md: 2 }} gap={{ base: 1.5, sm: 2, md: 3 }}>
{/* iRacing - Active */}
<div className="bg-deep-graphite border-2 border-primary-blue rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 relative overflow-hidden">
<div className="absolute top-1 sm:top-1.5 md:top-2 right-1 sm:right-1.5 md:right-2">
<div className="w-1 sm:w-1.5 md:w-2 h-1 sm:h-1.5 md:h-2 rounded-full bg-performance-green animate-pulse" />
</div>
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3">
<div className="w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 rounded bg-primary-blue/10 flex items-center justify-center">
<span className="text-base sm:text-xl md:text-2xl font-bold text-primary-blue">iR</span>
</div>
<div>
<div className="text-xs sm:text-sm md:text-base font-semibold text-white">iRacing</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-performance-green">Active</div>
</div>
</div>
<div className="mt-1.5 sm:mt-2 md:mt-3 text-[8px] sm:text-[10px] md:text-xs text-slate-400">
<Box bg="bg-deep-graphite" border borderWidth="2px" borderColor="border-primary-blue" rounded="lg" p={{ base: 1.5, sm: 2, md: 3, lg: 4 }} position="relative" overflow="hidden">
<Box position="absolute" top={{ base: 1, sm: 1.5, md: 2 }} right={{ base: 1, sm: 1.5, md: 2 }}>
<Box w={{ base: 1, sm: 1.5, md: 2 }} h={{ base: 1, sm: 1.5, md: 2 }} rounded="full" bg="bg-performance-green"
// eslint-disable-next-line gridpilot-rules/component-classification
className="animate-pulse"
/>
</Box>
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }}>
<Box w={{ base: 8, sm: 10, md: 12 }} h={{ base: 8, sm: 10, md: 12 }} rounded="sm" bg="bg-primary-blue/10" display="flex" alignItems="center" justifyContent="center">
<Text size={{ base: 'base', sm: 'xl', md: '2xl' }} weight="bold" color="text-primary-blue">iR</Text>
</Box>
<Box>
<Text size={{ base: 'xs', sm: 'sm', md: 'base' }} weight="semibold" color="text-white" block>iRacing</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-performance-green"
block
>
Active
</Text>
</Box>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-slate-400"
mt={{ base: 1.5, sm: 2, md: 3 }}
block
>
Full integration
</div>
</div>
</Text>
</Box>
{/* ACC - Future */}
<div className="bg-deep-graphite border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 opacity-40">
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3">
<div className="w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 rounded bg-slate-700/20 flex items-center justify-center">
<span className="text-base sm:text-xl md:text-2xl font-bold text-slate-600">AC</span>
</div>
<div>
<div className="text-xs sm:text-sm font-semibold text-slate-500">ACC</div>
<div className="text-[9px] sm:text-xs text-slate-600">Planned</div>
</div>
</div>
<div className="mt-1.5 sm:mt-2 md:mt-3 text-[8px] sm:text-[10px] md:text-xs text-slate-600">
<Box bg="bg-deep-graphite" border borderColor="border-charcoal-outline" rounded="lg" p={{ base: 1.5, sm: 2, md: 3, lg: 4 }} opacity={0.4}>
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }}>
<Box w={{ base: 8, sm: 10, md: 12 }} h={{ base: 8, sm: 10, md: 12 }} rounded="sm" bg="bg-slate-700/20" display="flex" alignItems="center" justifyContent="center">
<Text size={{ base: 'base', sm: 'xl', md: '2xl' }} weight="bold" color="text-slate-600">AC</Text>
</Box>
<Box>
<Text size={{ base: 'xs', sm: 'sm' }} weight="semibold" color="text-slate-500" block>ACC</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-slate-600"
block
>
Planned
</Text>
</Box>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-slate-600"
mt={{ base: 1.5, sm: 2, md: 3 }}
block
>
Coming later
</div>
</div>
</Text>
</Box>
{/* rFactor 2 - Future */}
<div className="bg-deep-graphite border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 opacity-40">
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3">
<div className="w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 rounded bg-slate-700/20 flex items-center justify-center">
<span className="text-base sm:text-xl md:text-2xl font-bold text-slate-600">rF</span>
</div>
<div>
<div className="text-xs sm:text-sm md:text-base font-semibold text-slate-500">rFactor 2</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-slate-600">Planned</div>
</div>
</div>
<div className="mt-1.5 sm:mt-2 md:mt-3 text-[8px] sm:text-[10px] md:text-xs text-slate-600">
<Box bg="bg-deep-graphite" border borderColor="border-charcoal-outline" rounded="lg" p={{ base: 1.5, sm: 2, md: 3, lg: 4 }} opacity={0.4}>
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }}>
<Box w={{ base: 8, sm: 10, md: 12 }} h={{ base: 8, sm: 10, md: 12 }} rounded="sm" bg="bg-slate-700/20" display="flex" alignItems="center" justifyContent="center">
<Text size={{ base: 'base', sm: 'xl', md: '2xl' }} weight="bold" color="text-slate-600">rF</Text>
</Box>
<Box>
<Text size={{ base: 'xs', sm: 'sm' }} weight="semibold" color="text-slate-500" block>rFactor 2</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-slate-600"
block
>
Planned
</Text>
</Box>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-slate-600"
mt={{ base: 1.5, sm: 2, md: 3 }}
block
>
Coming later
</div>
</div>
</Text>
</Box>
{/* LMU - Future */}
<div className="bg-deep-graphite border border-charcoal-outline rounded-lg p-1.5 sm:p-2 md:p-3 lg:p-4 opacity-40">
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3">
<div className="w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 rounded bg-slate-700/20 flex items-center justify-center">
<span className="text-base sm:text-xl md:text-2xl font-bold text-slate-600">LM</span>
</div>
<div>
<div className="text-xs sm:text-sm md:text-base font-semibold text-slate-500">Le Mans Ult.</div>
<div className="text-[8px] sm:text-[10px] md:text-xs text-slate-600">Planned</div>
</div>
</div>
<div className="mt-1.5 sm:mt-2 md:mt-3 text-[8px] sm:text-[10px] md:text-xs text-slate-600">
<Box bg="bg-deep-graphite" border borderColor="border-charcoal-outline" rounded="lg" p={{ base: 1.5, sm: 2, md: 3, lg: 4 }} opacity={0.4}>
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3 }}>
<Box w={{ base: 8, sm: 10, md: 12 }} h={{ base: 8, sm: 10, md: 12 }} rounded="sm" bg="bg-slate-700/20" display="flex" alignItems="center" justifyContent="center">
<Text size={{ base: 'base', sm: 'xl', md: '2xl' }} weight="bold" color="text-slate-600">LM</Text>
</Box>
<Box>
<Text size={{ base: 'xs', sm: 'sm' }} weight="semibold" color="text-slate-500" block>Le Mans Ult.</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-slate-600"
block
>
Planned
</Text>
</Box>
</Box>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-slate-600"
mt={{ base: 1.5, sm: 2, md: 3 }}
block
>
Coming later
</div>
</div>
</div>
</Text>
</Box>
</Box>
<div className="pt-1.5 sm:pt-2 md:pt-3 lg:pt-4 border-t border-charcoal-outline">
<div className="text-[8px] sm:text-[10px] md:text-xs text-slate-500 text-center">
<Box pt={{ base: 1.5, sm: 2, md: 3, lg: 4 }} borderTop borderColor="border-charcoal-outline">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-slate-500"
textAlign="center"
block
>
Your identity stays with you across platforms
</div>
</div>
</div>
</div>
</div>
</Text>
</Box>
</Stack>
</Box>
</Box>
);
}
}

View File

@@ -2,8 +2,11 @@
import { motion, useReducedMotion, useMotionValue, useSpring } from 'framer-motion';
import { useEffect, useState } from 'react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
import { Stack } from '@/ui/Stack';
export default function StandingsTableMockup() {
export function StandingsTableMockup() {
const shouldReduceMotion = useReducedMotion();
const [hoveredRow, setHoveredRow] = useState<number | null>(null);
const [isMobile, setIsMobile] = useState(false);
@@ -14,59 +17,89 @@ export default function StandingsTableMockup() {
if (isMobile) {
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
<div className="mb-3">
<div className="flex items-center gap-2 pb-2 border-b border-charcoal-outline">
<div className="text-xs font-mono text-gray-400">#</div>
<div className="text-xs flex-1 font-semibold text-white">Driver</div>
<div className="text-xs font-mono text-gray-400">Pts</div>
</div>
</div>
<div className="space-y-2">
{[1, 2, 3, 4, 5].map((i) => (
<div
key={i}
className={`flex items-center gap-2 py-2 px-2 rounded-lg border ${
i <= 3
? 'bg-gradient-to-r from-performance-green/10 to-iron-gray border-performance-green/20'
: 'bg-iron-gray border-charcoal-outline'
}`}
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={3} overflow="hidden">
<Box mb={3}>
<Box display="flex" alignItems="center" gap={2} pb={2} borderBottom borderColor="border-charcoal-outline">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '12px' }}
font="mono"
color="text-gray-400"
>
<div
className={`h-7 w-7 rounded-full flex items-center justify-center font-semibold text-xs ${
i <= 3
? 'bg-primary-blue text-white shadow-glow'
: 'bg-charcoal-outline text-gray-400'
}`}
#
</Text>
<Text size="xs" flexGrow={1} weight="semibold" color="text-white">Driver</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '12px' }}
font="mono"
color="text-gray-400"
>
Pts
</Text>
</Box>
</Box>
<Stack gap={2}>
{[1, 2, 3, 4, 5].map((i) => (
<Box
key={i}
display="flex"
alignItems="center"
gap={2}
py={2}
px={2}
rounded="lg"
border
bg={i <= 3 ? 'bg-gradient-to-r from-performance-green/10 to-iron-gray' : 'bg-iron-gray'}
borderColor={i <= 3 ? 'border-performance-green/20' : 'border-charcoal-outline'}
>
<Box
h="7"
w="7"
rounded="full"
display="flex"
alignItems="center"
justifyContent="center"
weight="semibold"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '12px' }}
bg={i <= 3 ? 'bg-primary-blue' : 'bg-charcoal-outline'}
color={i <= 3 ? 'text-white' : 'text-gray-400'}
shadow={i <= 3 ? '0_0_12px_rgba(25,140,255,0.3)' : undefined}
>
{i}
</div>
<div className="flex-1 flex items-center gap-2">
<div className="h-5 w-5 rounded-full bg-charcoal-outline border border-primary-blue/20 flex items-center justify-center text-xs">
🏎
</div>
<div className="h-2.5 w-full max-w-[100px] bg-white/10 rounded"></div>
</div>
<div className="relative w-16 h-5 bg-charcoal-outline rounded border border-primary-blue/20 overflow-hidden">
<div
className={`absolute inset-y-0 left-0 ${
i <= 3
? 'bg-gradient-to-r from-performance-green/40 to-performance-green/20'
: 'bg-gradient-to-r from-iron-gray to-charcoal-outline'
}`}
</Box>
<Box flexGrow={1} display="flex" alignItems="center" gap={2}>
<Box h="5" w="5" rounded="full" bg="bg-charcoal-outline" border borderColor="border-primary-blue/20" display="flex" alignItems="center" justifyContent="center">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '12px' }}
>
🏎
</Text>
</Box>
<Box h="2.5" fullWidth maxWidth="100px" bg="bg-white/10" rounded="sm" />
</Box>
<Box position="relative" w="16" h="5" bg="bg-charcoal-outline" rounded="sm" border borderColor="border-primary-blue/20" overflow="hidden">
<Box
position="absolute"
insetY="0"
left="0"
bg={i <= 3 ? 'bg-gradient-to-r from-performance-green/40 to-performance-green/20' : 'bg-gradient-to-r from-iron-gray to-charcoal-outline'}
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ width: `${100 - (i - 1) * 15}%` }}
/>
<div className="relative h-full flex items-center justify-center">
<span className="text-xs font-mono font-semibold text-white">
<Box position="relative" h="full" display="flex" alignItems="center" justifyContent="center">
<Text size="xs" font="mono" weight="semibold" color="text-white">
{300 - i * 20}
</span>
</div>
</div>
</div>
</Text>
</Box>
</Box>
</Box>
))}
</div>
</div>
</Stack>
</Box>
);
}
@@ -85,32 +118,84 @@ export default function StandingsTableMockup() {
});
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-4 lg:p-6 overflow-hidden">
<div className="mb-1.5 sm:mb-2 md:mb-3 lg:mb-4">
<div className="text-[8px] sm:text-[10px] md:text-xs text-white/50 mb-1.5 sm:mb-2 md:mb-3">Real-time standings updated after every race</div>
<div className="flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4 pb-1.5 sm:pb-2 md:pb-3 border-b border-charcoal-outline">
<div className="text-[8px] sm:text-[10px] md:text-xs font-mono text-gray-400">#</div>
<div className="text-[8px] sm:text-[10px] md:text-xs flex-1 font-semibold text-white">Driver</div>
<div className="text-[8px] sm:text-[10px] md:text-xs font-mono text-gray-400 hidden md:block">Wins</div>
<div className="text-[8px] sm:text-[10px] md:text-xs font-mono text-gray-400 flex items-center gap-1">
<span>Points</span>
<span className="text-performance-green text-[8px]"></span>
</div>
</div>
</div>
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={{ base: 1.5, sm: 3, md: 4, lg: 6 }} overflow="hidden">
<Box mb={{ base: 1.5, sm: 2, md: 3, lg: 4 }}>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
opacity={0.5}
mb={{ base: 1.5, sm: 2, md: 3 }}
block
>
Real-time standings updated after every race
</Text>
<Box display="flex" alignItems="center" gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }} pb={{ base: 1.5, sm: 2, md: 3 }} borderBottom borderColor="border-charcoal-outline">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
font="mono"
color="text-gray-400"
>
#
</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
flexGrow={1}
weight="semibold"
color="text-white"
>
Driver
</Text>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
font="mono"
color="text-gray-400"
// eslint-disable-next-line gridpilot-rules/component-classification
className="hidden md:block"
>
Wins
</Text>
<Box display="flex" alignItems="center" gap={1}>
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
font="mono"
color="text-gray-400"
>
Points
</Text>
<Text color="text-performance-green"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '8px' }}
>
</Text>
</Box>
</Box>
</Box>
<div className="space-y-0.5">
<Stack gap={0.5}>
{[1, 2, 3, 4, 5, 6, 7, 8].map((i) => (
<motion.div
<Box
key={i}
as={motion.div}
variants={getRowAnimation(i)}
initial="hidden"
animate="visible"
className={`relative flex items-center gap-1.5 sm:gap-2 md:gap-3 lg:gap-4 py-1.5 sm:py-2 md:py-2.5 lg:py-3 px-1.5 sm:px-2 md:px-3 rounded-lg border transition-all duration-150 ${
i <= 3
? 'bg-gradient-to-r from-performance-green/10 to-iron-gray border-performance-green/20'
: 'bg-iron-gray border-charcoal-outline'
}`}
position="relative"
display="flex"
alignItems="center"
gap={{ base: 1.5, sm: 2, md: 3, lg: 4 }}
py={{ base: 1.5, sm: 2, md: 2.5, lg: 3 }}
px={{ base: 1.5, sm: 2, md: 3 }}
rounded="lg"
border
transition
bg={i <= 3 ? 'bg-gradient-to-r from-performance-green/10 to-iron-gray' : 'bg-iron-gray'}
borderColor={i <= 3 ? 'border-performance-green/20' : 'border-charcoal-outline'}
onHoverStart={() => !shouldReduceMotion && setHoveredRow(i)}
onHoverEnd={() => setHoveredRow(null)}
whileHover={shouldReduceMotion ? {} : {
@@ -119,12 +204,19 @@ export default function StandingsTableMockup() {
transition: { duration: 0.15 }
}}
>
<motion.div
className={`h-6 w-6 sm:h-7 sm:w-7 rounded-full flex items-center justify-center font-semibold text-[10px] sm:text-xs ${
i <= 3
? 'bg-primary-blue text-white shadow-glow'
: 'bg-charcoal-outline text-gray-400'
}`}
<Box
as={motion.div}
h={{ base: 6, sm: 7 }}
w={{ base: 6, sm: 7 }}
rounded="full"
display="flex"
alignItems="center"
justifyContent="center"
weight="semibold"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '12px' }}
bg={i <= 3 ? 'bg-primary-blue' : 'bg-charcoal-outline'}
color={i <= 3 ? 'text-white' : 'text-gray-400'}
animate={
shouldReduceMotion ? {} : i <= 3 && hoveredRow === i
? { scale: 1.15, boxShadow: '0 0 28px rgba(25,140,255,0.5)' }
@@ -132,25 +224,28 @@ export default function StandingsTableMockup() {
}
>
{i}
</motion.div>
<div className="flex-1 flex items-center gap-1 sm:gap-1.5 md:gap-2">
<div className="h-4 w-4 sm:h-5 sm:w-5 md:h-6 md:w-6 rounded-full bg-charcoal-outline border border-primary-blue/20 flex items-center justify-center text-[8px] sm:text-[10px] md:text-xs aspect-square">
🏎
</div>
<div className="h-1.5 sm:h-2 md:h-2.5 lg:h-3 w-full max-w-[80px] sm:max-w-[100px] md:max-w-[140px] bg-white/10 rounded"></div>
</div>
<div className="h-1.5 sm:h-2 md:h-2.5 lg:h-3 w-10 sm:w-12 md:w-16 bg-white/5 rounded font-mono hidden md:block"></div>
<div className="relative">
</Box>
<Box flexGrow={1} display="flex" alignItems="center" gap={{ base: 1, sm: 1.5, md: 2 }}>
<Box h={{ base: 4, sm: 5, md: 6 }} w={{ base: 4, sm: 5, md: 6 }} rounded="full" bg="bg-charcoal-outline" border borderColor="border-primary-blue/20" display="flex" alignItems="center" justifyContent="center">
<Text size={{ base: 'xs', sm: 'sm' }}>🏎</Text>
</Box>
<Box h={{ base: 1.5, sm: 2, md: 2.5, lg: 3 }} fullWidth maxWidth={{ base: '80px', sm: '100px', md: '140px' }} bg="bg-white/10" rounded="sm" />
</Box>
<Box h={{ base: 1.5, sm: 2, md: 2.5, lg: 3 }} w={{ base: 10, sm: 12, md: 16 }} bg="bg-white/5" rounded="sm" font="mono"
// eslint-disable-next-line gridpilot-rules/component-classification
className="hidden md:block"
/>
<Box position="relative">
<AnimatedPoints
points={300 - i * 20}
position={i}
shouldReduceMotion={shouldReduceMotion ?? false}
/>
</div>
</motion.div>
</Box>
</Box>
))}
</div>
</div>
</Stack>
</Box>
);
}
@@ -177,22 +272,28 @@ function AnimatedPoints({
const percentage = (points / 300) * 100;
return (
<div className="relative w-12 sm:w-16 md:w-20 lg:w-24 h-4 sm:h-5 md:h-6 lg:h-7 bg-charcoal-outline rounded border border-primary-blue/20 overflow-hidden">
<motion.div
className={`absolute inset-y-0 left-0 ${
position <= 3
? 'bg-gradient-to-r from-performance-green/40 to-performance-green/20'
: 'bg-gradient-to-r from-iron-gray to-charcoal-outline'
}`}
<Box position="relative" w={{ base: 12, sm: 16, md: 20, lg: 24 }} h={{ base: 4, sm: 5, md: 6, lg: 7 }} bg="bg-charcoal-outline" rounded="sm" border borderColor="border-primary-blue/20" overflow="hidden">
<Box
as={motion.div}
position="absolute"
insetY="0"
left="0"
bg={position <= 3 ? 'bg-gradient-to-r from-performance-green/40 to-performance-green/20' : 'bg-gradient-to-r from-iron-gray to-charcoal-outline'}
initial={{ width: '0%' }}
animate={{ width: `${percentage}%` }}
transition={{ duration: shouldReduceMotion ? 0 : 0.8, ease: 'easeOut', delay: 0.1 + position * 0.05 }}
/>
<div className="relative h-full flex items-center justify-center">
<motion.span className="text-[8px] sm:text-[10px] md:text-xs font-mono font-semibold text-white">
{shouldReduceMotion ? points : <motion.span>{spring}</motion.span>}
</motion.span>
</div>
</div>
<Box position="relative" h="full" display="flex" alignItems="center" justifyContent="center">
<Box as={motion.span}
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
font="mono"
weight="semibold"
color="text-white"
>
{shouldReduceMotion ? points : <Box as={motion.span}>{spring}</Box>}
</Box>
</Box>
</Box>
);
}
}

View File

@@ -2,8 +2,11 @@
import { motion, useReducedMotion } from 'framer-motion';
import { useState, useEffect } from 'react';
import { Box } from '@/ui/Box';
import { Text } from '@/ui/Text';
import { Stack } from '@/ui/Stack';
export default function TeamCompetitionMockup() {
export function TeamCompetitionMockup() {
const shouldReduceMotion = useReducedMotion();
const [hoveredDriver, setHoveredDriver] = useState<number | null>(null);
const [hoveredTeam, setHoveredTeam] = useState<number | null>(null);
@@ -17,79 +20,138 @@ export default function TeamCompetitionMockup() {
if (isMobile) {
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-3 overflow-hidden">
<div className="space-y-4">
<div>
<div className="text-sm font-semibold text-white mb-3">Drivers</div>
<div className="space-y-2">
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={3} overflow="hidden">
<Stack gap={4}>
<Box>
<Text size="sm" weight="semibold" color="text-white" mb={3} block>Drivers</Text>
<Stack gap={2}>
{[1, 2, 3].map((i) => (
<div
<Box
key={i}
className="relative flex items-center gap-2 bg-iron-gray rounded-lg p-2 border border-charcoal-outline overflow-hidden"
position="relative"
display="flex"
alignItems="center"
gap={2}
bg="bg-iron-gray"
rounded="lg"
p={2}
border
borderColor="border-charcoal-outline"
overflow="hidden"
>
<div
className="absolute left-0 top-0 bottom-0 w-1"
<Box
position="absolute"
left="0"
top="0"
bottom="0"
w="1"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ backgroundColor: teamColors[i-1] }}
/>
<div
className="h-5 w-5 rounded-full flex items-center justify-center font-semibold text-xs border-2"
<Box
h="5"
w="5"
rounded="full"
display="flex"
alignItems="center"
justifyContent="center"
weight="semibold"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{
fontSize: '10px',
borderColor: teamColors[i-1],
backgroundColor: `${teamColors[i-1]}20`
backgroundColor: `${teamColors[i-1]}20`,
borderWidth: '2px'
}}
>
<span className="text-white">{i}</span>
</div>
<div className="h-6 w-6 rounded-full flex items-center justify-center text-sm" style={{ backgroundColor: `${teamColors[i-1]}20`, borderWidth: '1px', borderColor: teamColors[i-1] }}>
🏎
</div>
<div className="flex-1">
<div className="h-2.5 w-full bg-white/10 rounded"></div>
</div>
<div className="h-3 w-10 bg-charcoal-outline rounded text-xs flex items-center justify-center text-white/70"></div>
</div>
<Text color="text-white">{i}</Text>
</Box>
<Box h="6" w="6" rounded="full" display="flex" alignItems="center" justifyContent="center"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ backgroundColor: `${teamColors[i-1]}20`, borderWidth: '1px', borderColor: teamColors[i-1], fontSize: '14px' }}
>
<Text>🏎</Text>
</Box>
<Box flexGrow={1}>
<Box h="2.5" w="full" bg="bg-white/10" rounded="sm" />
</Box>
<Box h="3" w="10" bg="bg-charcoal-outline" rounded="sm" display="flex" alignItems="center" justifyContent="center" color="text-white" opacity={0.7}
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
/>
</Box>
))}
</div>
</div>
</Stack>
</Box>
<div className="h-px bg-gradient-to-r from-transparent via-charcoal-outline to-transparent" />
<Box h="px"
// eslint-disable-next-line gridpilot-rules/component-classification
className="bg-gradient-to-r from-transparent via-charcoal-outline to-transparent"
/>
<div>
<div className="text-sm font-semibold text-white mb-3">Constructors</div>
<div className="space-y-2">
<Box>
<Text size="sm" weight="semibold" color="text-white" mb={3} block>Constructors</Text>
<Stack gap={2}>
{[1, 2, 3].map((i) => (
<div
<Box
key={i}
className="relative flex items-center gap-2 bg-iron-gray rounded-lg p-2 border border-charcoal-outline overflow-hidden"
position="relative"
display="flex"
alignItems="center"
gap={2}
bg="bg-iron-gray"
rounded="lg"
p={2}
border
borderColor="border-charcoal-outline"
overflow="hidden"
>
<div
className="absolute left-0 top-0 bottom-0 w-1"
<Box
position="absolute"
left="0"
top="0"
bottom="0"
w="1"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ backgroundColor: teamColors[i-1] }}
/>
<div
className="h-6 w-6 rounded flex items-center justify-center text-sm border-2"
<Box
h="6"
w="6"
rounded="sm"
display="flex"
alignItems="center"
justifyContent="center"
border
borderWidth="2px"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{
borderColor: teamColors[i-1],
backgroundColor: `${teamColors[i-1]}20`
backgroundColor: `${teamColors[i-1]}20`,
fontSize: '14px'
}}
>
🏁
</div>
<div className="flex-1">
<div className="h-2.5 w-full bg-white/10 rounded mb-1"></div>
<div className="relative h-1.5 bg-charcoal-outline rounded-full overflow-hidden">
<div
className="absolute inset-y-0 left-0 rounded-full"
<Text>🏁</Text>
</Box>
<Box flexGrow={1}>
<Box h="2.5" w="full" bg="bg-white/10" rounded="sm" mb={1} />
<Box position="relative" h="1.5" bg="bg-charcoal-outline" rounded="full" overflow="hidden">
<Box
position="absolute"
insetY="0"
left="0"
rounded="full"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ backgroundColor: teamColors[i-1], width: `${100 - (i-1) * 15}%` }}
/>
</div>
</div>
</div>
</Box>
</Box>
</Box>
))}
</div>
</div>
</div>
</div>
</Stack>
</Box>
</Stack>
</Box>
);
}
@@ -134,26 +196,44 @@ export default function TeamCompetitionMockup() {
};
return (
<div className="relative w-full h-full bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite rounded-lg p-1.5 sm:p-3 md:p-4 lg:p-6 overflow-hidden">
<div className="grid grid-cols-2 gap-2 sm:gap-3 md:gap-4 lg:gap-6 h-full">
<motion.div
<Box position="relative" fullWidth fullHeight bg="bg-gradient-to-br from-deep-graphite via-iron-gray to-deep-graphite" rounded="lg" p={{ base: 1.5, sm: 3, md: 4, lg: 6 }} overflow="hidden">
<Box display="grid" gridCols={2} gap={{ base: 2, sm: 3, md: 4, lg: 6 }} fullHeight>
<Box
as={motion.div}
variants={leftColumnVariants}
initial="hidden"
animate="visible"
className="relative"
position="relative"
>
<div className="h-3 sm:h-4 md:h-5 w-16 sm:w-20 md:w-24 bg-white/10 rounded mb-1.5 sm:mb-2 md:mb-3 lg:mb-4 text-[8px] sm:text-[10px] md:text-xs flex items-center justify-center text-white font-semibold">
Drivers
</div>
<div className="space-y-1 sm:space-y-1.5 md:space-y-2">
<Box h={{ base: 3, sm: 4, md: 5 }} w={{ base: 16, sm: 20, md: 24 }} bg="bg-white/10" rounded="sm" mb={{ base: 1.5, sm: 2, md: 3, lg: 4 }} display="flex" alignItems="center" justifyContent="center">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
weight="semibold"
>
Drivers
</Text>
</Box>
<Stack gap={{ base: 1, sm: 1.5, md: 2 }}>
{[1, 2, 3, 4, 5].map((i) => (
<motion.div
<Box
key={i}
as={motion.div}
custom={i}
variants={rowVariants}
initial="hidden"
animate="visible"
className="relative flex items-center gap-1.5 sm:gap-2 md:gap-2.5 lg:gap-3 bg-iron-gray rounded-lg p-1 sm:p-1.5 md:p-2 lg:p-2.5 border border-charcoal-outline overflow-hidden"
position="relative"
display="flex"
alignItems="center"
gap={{ base: 1.5, sm: 2, md: 2.5, lg: 3 }}
bg="bg-iron-gray"
rounded="lg"
p={{ base: 1, sm: 1.5, md: 2, lg: 2.5 }}
border
borderColor="border-charcoal-outline"
overflow="hidden"
onHoverStart={() => !shouldReduceMotion && setHoveredDriver(i)}
onHoverEnd={() => setHoveredDriver(null)}
whileHover={shouldReduceMotion ? {} : {
@@ -162,61 +242,107 @@ export default function TeamCompetitionMockup() {
transition: { duration: 0.15 }
}}
>
<div
className="absolute left-0 top-0 bottom-0 w-0.5"
<Box
position="absolute"
left="0"
top="0"
bottom="0"
w="0.5"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ backgroundColor: teamColors[i-1] }}
/>
<div
className="h-3.5 w-3.5 sm:h-4 sm:w-4 md:h-5 md:w-5 rounded-full flex items-center justify-center font-semibold text-[8px] sm:text-[9px] md:text-[10px] border-2"
<Box
h={{ base: 3.5, sm: 4, md: 5 }}
w={{ base: 3.5, sm: 4, md: 5 }}
rounded="full"
display="flex"
alignItems="center"
justifyContent="center"
weight="semibold"
border
borderWidth="2px"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{
fontSize: '10px',
borderColor: teamColors[i-1],
backgroundColor: `${teamColors[i-1]}20`
}}
>
<span className="text-white">{i}</span>
</div>
<div className="h-5 w-5 sm:h-6 sm:w-6 md:h-7 md:w-7 rounded-full flex items-center justify-center text-[10px] sm:text-xs" style={{ backgroundColor: `${teamColors[i-1]}20`, borderWidth: '1px', borderColor: teamColors[i-1] }}>
🏎
</div>
<div className="flex-1 min-w-0">
<div className="h-1.5 sm:h-2 md:h-2.5 w-full bg-white/10 rounded"></div>
</div>
<div className="h-2 sm:h-2.5 md:h-3 w-8 sm:w-10 md:w-12 bg-charcoal-outline rounded font-mono text-[8px] sm:text-[9px] md:text-[10px] flex items-center justify-center text-white/70"></div>
<Text color="text-white">{i}</Text>
</Box>
<Box h={{ base: 5, sm: 6, md: 7 }} w={{ base: 5, sm: 6, md: 7 }} rounded="full" display="flex" alignItems="center" justifyContent="center"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ backgroundColor: `${teamColors[i-1]}20`, borderWidth: '1px', borderColor: teamColors[i-1], fontSize: '12px' }}
>
<Text>🏎</Text>
</Box>
<Box flexGrow={1} minWidth="0">
<Box h={{ base: 1.5, sm: 2, md: 2.5 }} w="full" bg="bg-white/10" rounded="sm" />
</Box>
<Box h={{ base: 2, sm: 2.5, md: 3 }} w={{ base: 8, sm: 10, md: 12 }} bg="bg-charcoal-outline" rounded="sm" font="mono" display="flex" alignItems="center" justifyContent="center" color="text-white" opacity={0.7}
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
/>
{hoveredDriver === i && (
<motion.div
className="absolute inset-0 pointer-events-none"
<Box
as={motion.div}
position="absolute"
inset="0"
pointerEvents="none"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
// eslint-disable-next-line gridpilot-rules/component-classification
style={{
background: `linear-gradient(90deg, ${teamColors[i-1]}10 0%, transparent 100%)`
}}
/>
)}
</motion.div>
</Box>
))}
</div>
</motion.div>
</Stack>
</Box>
<div className="absolute left-1/2 top-8 bottom-8 w-px bg-gradient-to-b from-transparent via-charcoal-outline to-transparent backdrop-blur-sm" />
<Box position="absolute" left="1/2" top="8" bottom="8" w="px"
// eslint-disable-next-line gridpilot-rules/component-classification
className="bg-gradient-to-b from-transparent via-charcoal-outline to-transparent backdrop-blur-sm"
/>
<motion.div
<Box
as={motion.div}
variants={rightColumnVariants}
initial="hidden"
animate="visible"
className="relative"
position="relative"
>
<div className="h-3 sm:h-4 md:h-5 w-20 sm:w-24 md:w-32 bg-white/10 rounded mb-1.5 sm:mb-2 md:mb-3 lg:mb-4 text-[8px] sm:text-[10px] md:text-xs flex items-center justify-center text-white font-semibold">
Constructors
</div>
<div className="space-y-1 sm:space-y-1.5 md:space-y-2">
<Box h={{ base: 3, sm: 4, md: 5 }} w={{ base: 20, sm: 24, md: 32 }} bg="bg-white/10" rounded="sm" mb={{ base: 1.5, sm: 2, md: 3, lg: 4 }} display="flex" alignItems="center" justifyContent="center">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
color="text-white"
weight="semibold"
>
Constructors
</Text>
</Box>
<Stack gap={{ base: 1, sm: 1.5, md: 2 }}>
{[1, 2, 3, 4, 5].map((i) => (
<motion.div
<Box
key={i}
as={motion.div}
custom={i}
variants={rowVariants}
initial="hidden"
animate="visible"
className="relative flex items-center gap-1.5 sm:gap-2 md:gap-2.5 lg:gap-3 bg-iron-gray rounded-lg p-1 sm:p-1.5 md:p-2 lg:p-2.5 border border-charcoal-outline overflow-hidden"
position="relative"
display="flex"
alignItems="center"
gap={{ base: 1.5, sm: 2, md: 2.5, lg: 3 }}
bg="bg-iron-gray"
rounded="lg"
p={{ base: 1, sm: 1.5, md: 2, lg: 2.5 }}
border
borderColor="border-charcoal-outline"
overflow="hidden"
onHoverStart={() => !shouldReduceMotion && setHoveredTeam(i)}
onHoverEnd={() => setHoveredTeam(null)}
whileHover={shouldReduceMotion ? {} : {
@@ -225,51 +351,79 @@ export default function TeamCompetitionMockup() {
transition: { duration: 0.15 }
}}
>
<div
className="absolute left-0 top-0 bottom-0 w-0.5"
<Box
position="absolute"
left="0"
top="0"
bottom="0"
w="0.5"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ backgroundColor: teamColors[i-1] }}
/>
<div
className="h-5 w-5 sm:h-6 sm:w-6 md:h-7 md:w-7 rounded flex items-center justify-center text-[10px] sm:text-xs md:text-sm border-2"
<Box
h={{ base: 5, sm: 6, md: 7 }}
w={{ base: 5, sm: 6, md: 7 }}
rounded="sm"
display="flex"
alignItems="center"
justifyContent="center"
border
borderWidth="2px"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{
fontSize: '12px',
borderColor: teamColors[i-1],
backgroundColor: `${teamColors[i-1]}20`
}}
>
🏁
</div>
<div className="flex-1 min-w-0">
<div className="h-1.5 sm:h-2 md:h-2.5 w-full bg-white/10 rounded mb-0.5 sm:mb-1 md:mb-1.5"></div>
<div className="relative h-0.5 sm:h-1 md:h-1.5 bg-charcoal-outline rounded-full overflow-hidden">
<motion.div
className="absolute inset-y-0 left-0 rounded-full"
<Text>🏁</Text>
</Box>
<Box flexGrow={1} minWidth="0">
<Box h={{ base: 1.5, sm: 2, md: 2.5 }} w="full" bg="bg-white/10" rounded="sm" mb={{ base: 0.5, sm: 1, md: 1.5 }} />
<Box position="relative" h={{ base: 0.5, sm: 1, md: 1.5 }} bg="bg-charcoal-outline" rounded="full" overflow="hidden">
<Box
as={motion.div}
position="absolute"
insetY="0"
left="0"
rounded="full"
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ backgroundColor: teamColors[i-1] }}
initial={{ width: '0%' }}
animate={{ width: `${100 - (i-1) * 15}%` }}
transition={{ duration: shouldReduceMotion ? 0 : 0.8, delay: 0.4 + i * 0.05 }}
/>
</div>
</div>
</Box>
</Box>
{i === 3 && (
<div className="h-3 sm:h-3.5 md:h-4 px-0.5 sm:px-1 md:px-1.5 bg-warning-amber/20 rounded text-[7px] sm:text-[8px] md:text-[9px] flex items-center justify-center text-warning-amber font-semibold border border-warning-amber/30">
=
</div>
<Box h={{ base: 3, sm: 3.5, md: 4 }} px={{ base: 0.5, sm: 1, md: 1.5 }} bg="bg-warning-amber/20" rounded="sm" display="flex" alignItems="center" justifyContent="center" color="text-warning-amber" weight="semibold" border borderColor="border-warning-amber/30">
<Text
// eslint-disable-next-line gridpilot-rules/component-classification
style={{ fontSize: '10px' }}
>
=
</Text>
</Box>
)}
{hoveredTeam === i && (
<motion.div
className="absolute inset-0 pointer-events-none"
<Box
as={motion.div}
position="absolute"
inset="0"
pointerEvents="none"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
// eslint-disable-next-line gridpilot-rules/component-classification
style={{
background: `linear-gradient(90deg, ${teamColors[i-1]}10 0%, transparent 100%)`
}}
/>
)}
</motion.div>
</Box>
))}
</div>
</motion.div>
</div>
</div>
</Stack>
</Box>
</Box>
</Box>
);
}
}