mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 21:59:16 +03:00
- Created new inline TableQuickstart component with expandable card pattern - Added feature flag support (control, ai, templates variants) - Implemented smooth Framer Motion animations for expand/collapse - Ported AI generation and template selection from legacy components - Integrated with GettingStartedSection using PostHog feature flag - Organized components into inline/ and legacy/ folders for clean separation - Maintains all existing functionality while providing better UX Key improvements: - No navigation away from Getting Started section - Progressive disclosure with smooth animations - Supports A/B testing with feature flag variants - Reuses existing API endpoints and logic
99 lines
1.5 KiB
TypeScript
99 lines
1.5 KiB
TypeScript
import { Variants } from 'framer-motion'
|
|
|
|
export const expandVariants: Variants = {
|
|
initial: {
|
|
opacity: 0,
|
|
height: 0,
|
|
scale: 0.98,
|
|
y: -10,
|
|
},
|
|
animate: {
|
|
opacity: 1,
|
|
height: 'auto',
|
|
scale: 1,
|
|
y: 0,
|
|
transition: {
|
|
type: 'spring',
|
|
stiffness: 400,
|
|
damping: 30,
|
|
staggerChildren: 0.1,
|
|
when: 'beforeChildren',
|
|
},
|
|
},
|
|
exit: {
|
|
opacity: 0,
|
|
height: 0,
|
|
scale: 0.98,
|
|
y: -10,
|
|
transition: {
|
|
duration: 0.2,
|
|
ease: 'easeInOut',
|
|
},
|
|
},
|
|
}
|
|
|
|
export const collapseVariants: Variants = {
|
|
initial: {
|
|
opacity: 0,
|
|
scale: 0.95,
|
|
},
|
|
animate: {
|
|
opacity: 1,
|
|
scale: 1,
|
|
transition: {
|
|
type: 'spring',
|
|
stiffness: 400,
|
|
damping: 30,
|
|
},
|
|
},
|
|
exit: {
|
|
opacity: 0,
|
|
scale: 0.95,
|
|
transition: {
|
|
duration: 0.15,
|
|
ease: 'easeInOut',
|
|
},
|
|
},
|
|
}
|
|
|
|
export const itemVariants: Variants = {
|
|
initial: {
|
|
opacity: 0,
|
|
y: 10,
|
|
},
|
|
animate: {
|
|
opacity: 1,
|
|
y: 0,
|
|
transition: {
|
|
duration: 0.3,
|
|
ease: 'easeOut',
|
|
},
|
|
},
|
|
exit: {
|
|
opacity: 0,
|
|
y: -10,
|
|
transition: {
|
|
duration: 0.2,
|
|
ease: 'easeIn',
|
|
},
|
|
},
|
|
}
|
|
|
|
export const cardExpandVariants: Variants = {
|
|
collapsed: {
|
|
scale: 1,
|
|
transition: {
|
|
type: 'spring',
|
|
stiffness: 400,
|
|
damping: 30,
|
|
},
|
|
},
|
|
expanded: {
|
|
scale: 1,
|
|
transition: {
|
|
type: 'spring',
|
|
stiffness: 300,
|
|
damping: 25,
|
|
},
|
|
},
|
|
} |