diff --git a/components.json b/components.json index d66adba..05b4a12 100644 --- a/components.json +++ b/components.json @@ -15,6 +15,7 @@ "utils": "@/lib/utils", "ui": "@/components/ui", "lib": "@/lib", - "hooks": "@/hooks" + "hooks": "@/hooks", + "form": "@/components/form" } -} +} \ No newline at end of file diff --git a/components/features-vertical.tsx b/components/features-vertical.tsx index c24737a..3cbed3f 100644 --- a/components/features-vertical.tsx +++ b/components/features-vertical.tsx @@ -12,6 +12,7 @@ import React, { import { cn } from '@/lib/utils' import Safari from './safari' +import { Card, CardContent } from './ui/card' type AccordionItemProps = { children: React.ReactNode @@ -88,19 +89,15 @@ export type FeaturesDataProps = { export type FeaturesProps = { collapseDelay?: number - ltr?: boolean - linePosition?: 'left' | 'right' | 'top' | 'bottom' data: FeaturesDataProps[] } export default function Features({ collapseDelay = 5000, - ltr = false, - linePosition = 'left', data = [], }: FeaturesProps) { const [currentIndex, setCurrentIndex] = useState(-1) - const carouselRef = useRef(null) + const carouselRef = useRef(null) const ref = useRef(null) const isInView = useInView(ref, { once: true, @@ -115,7 +112,6 @@ export default function Features({ setCurrentIndex(-1) } }, 100) - return () => clearTimeout(timer) }, [isInView]) @@ -138,213 +134,97 @@ export default function Features({ } } - // interval for changing images - useEffect(() => { - const timer = setInterval(() => { - setCurrentIndex((prevIndex) => - prevIndex !== undefined ? (prevIndex + 1) % data.length : 0, - ) - }, collapseDelay) - - return () => clearInterval(timer) - }, [collapseDelay, data.length]) - useEffect(() => { + if (data.length <= currentIndex) { // Only the case when you change data.length at runtime and you data.length goes <= currentIndex then we should reset our carousel. + setCurrentIndex(0); + return; + } const handleAutoScroll = () => { const nextIndex = (currentIndex !== undefined ? currentIndex + 1 : 0) % data.length + setCurrentIndex(nextIndex) scrollToIndex(nextIndex) } - const autoScrollTimer = setInterval(handleAutoScroll, collapseDelay) - return () => clearInterval(autoScrollTimer) }, [currentIndex, collapseDelay, data.length]) - useEffect(() => { - const carousel = carouselRef.current - if (carousel) { - const handleScroll = () => { - const scrollLeft = carousel.scrollLeft - const cardWidth = carousel.querySelector('.card')?.clientWidth || 0 - const newIndex = Math.min( - Math.floor(scrollLeft / cardWidth), - data.length - 1, - ) - setCurrentIndex(newIndex) - } - - carousel.addEventListener('scroll', handleScroll) - return () => carousel.removeEventListener('scroll', handleScroll) - } - }, [data.length]) - return ( -
+
-
-
-
diff --git a/components/footer/index.tsx b/components/footer/index.tsx index 3228156..22e91ac 100644 --- a/components/footer/index.tsx +++ b/components/footer/index.tsx @@ -32,8 +32,8 @@ export function Footer() {
- - + +

Shadcn Form Builder diff --git a/components/section.tsx b/components/section.tsx index e6b37a3..b2c1230 100644 --- a/components/section.tsx +++ b/components/section.tsx @@ -27,7 +27,7 @@ export default function Section({

)} {subtitle && ( -

+

{subtitle}

)} diff --git a/components/sections/hero/index.tsx b/components/sections/hero/index.tsx index 2aa5d4a..6c65ccc 100644 --- a/components/sections/hero/index.tsx +++ b/components/sections/hero/index.tsx @@ -96,14 +96,14 @@ function HeroPill() { initial={{ opacity: 0, y: -20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.8, ease }} - className="flex items-center" + className="flex items-center justify-center w-full" > -
+

Last Update {stats.lastUpdate}

-
-
+
+
@@ -123,7 +123,7 @@ function HeroPill() { className="h-10 cursor-pointer flex w-auto items-center space-x-1 rounded-full bg-muted px-3 group border-2 border-white whitespace-pre shadow hover:shadow-lg" >

- Star Project on GitHub + Star Project on{" "}GitHub

@@ -265,7 +265,7 @@ export default function HeroSection() { -
+
) diff --git a/components/sections/testimonials.tsx b/components/sections/testimonials.tsx index 0ee5502..8a77f99 100644 --- a/components/sections/testimonials.tsx +++ b/components/sections/testimonials.tsx @@ -65,6 +65,7 @@ export default function Testimonials() { delay: Math.random() * 0.8, duration: 1.2, }} + className='flex justify-center' > {/* */} diff --git a/public/sitemap-0.xml b/public/sitemap-0.xml index f6ca508..7694367 100644 --- a/public/sitemap-0.xml +++ b/public/sitemap-0.xml @@ -1,9 +1,9 @@ -https://www.shadcn-form.com/components2024-12-08T17:48:15.351Zdaily0.7 -https://www.shadcn-form.com/templates2024-12-08T17:48:15.352Zdaily0.7 -https://www.shadcn-form.com/test2024-12-08T17:48:15.352Zdaily0.7 -https://www.shadcn-form.com/readme2024-12-08T17:48:15.352Zdaily0.7 -https://www.shadcn-form.com2024-12-08T17:48:15.352Zdaily0.7 -https://www.shadcn-form.com/playground2024-12-08T17:48:15.352Zdaily0.7 +https://www.shadcn-form.com/readme2024-12-02T16:29:32.365Zdaily0.7 +https://www.shadcn-form.com/components2024-12-02T16:29:32.366Zdaily0.7 +https://www.shadcn-form.com/templates2024-12-02T16:29:32.366Zdaily0.7 +https://www.shadcn-form.com/test2024-12-02T16:29:32.366Zdaily0.7 +https://www.shadcn-form.com2024-12-02T16:29:32.366Zdaily0.7 +https://www.shadcn-form.com/playground2024-12-02T16:29:32.366Zdaily0.7 \ No newline at end of file