@nextworks/blocks-sections 0.1.0-alpha.8 → 0.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -11
- package/dist/components/Features.d.ts +4 -2
- package/dist/components/Features.d.ts.map +1 -1
- package/dist/components/Features.jsx +2 -2
- package/dist/components/HeroMotion.d.ts +4 -2
- package/dist/components/HeroMotion.d.ts.map +1 -1
- package/dist-types/components/About.d.ts +93 -0
- package/dist-types/components/About.d.ts.map +1 -0
- package/dist-types/components/CTA.d.ts +118 -0
- package/dist-types/components/CTA.d.ts.map +1 -0
- package/dist-types/components/Contact.d.ts +111 -0
- package/dist-types/components/Contact.d.ts.map +1 -0
- package/dist-types/components/FAQ.d.ts +89 -0
- package/dist-types/components/FAQ.d.ts.map +1 -0
- package/dist-types/components/Features.d.ts +113 -0
- package/dist-types/components/Features.d.ts.map +1 -0
- package/dist-types/components/Footer.d.ts +120 -0
- package/dist-types/components/Footer.d.ts.map +1 -0
- package/dist-types/components/HeroMotion.d.ts +109 -0
- package/dist-types/components/HeroMotion.d.ts.map +1 -0
- package/dist-types/components/HeroOverlay.d.ts +116 -0
- package/dist-types/components/HeroOverlay.d.ts.map +1 -0
- package/dist-types/components/HeroSplit.d.ts +98 -0
- package/dist-types/components/HeroSplit.d.ts.map +1 -0
- package/dist-types/components/Navbar.d.ts +112 -0
- package/dist-types/components/Navbar.d.ts.map +1 -0
- package/dist-types/components/Newsletter.d.ts +59 -0
- package/dist-types/components/Newsletter.d.ts.map +1 -0
- package/dist-types/components/PortfolioSimple.d.ts +137 -0
- package/dist-types/components/PortfolioSimple.d.ts.map +1 -0
- package/dist-types/components/Pricing.d.ts +96 -0
- package/dist-types/components/Pricing.d.ts.map +1 -0
- package/dist-types/components/ProcessTimeline.d.ts +121 -0
- package/dist-types/components/ProcessTimeline.d.ts.map +1 -0
- package/dist-types/components/ServicesGrid.d.ts +64 -0
- package/dist-types/components/ServicesGrid.d.ts.map +1 -0
- package/dist-types/components/Team.d.ts +115 -0
- package/dist-types/components/Team.d.ts.map +1 -0
- package/dist-types/components/Testimonials.d.ts +81 -0
- package/dist-types/components/Testimonials.d.ts.map +1 -0
- package/dist-types/components/TrustBadges.d.ts +80 -0
- package/dist-types/components/TrustBadges.d.ts.map +1 -0
- package/dist-types/components/index.d.ts +21 -0
- package/dist-types/components/index.d.ts.map +1 -0
- package/dist-types/index.d.ts +2 -0
- package/dist-types/index.d.ts.map +1 -0
- package/package.json +8 -6
- package/dist/components/About.js +0 -129
- package/dist/components/CTA.js +0 -58
- package/dist/components/Contact.js +0 -82
- package/dist/components/FAQ.js +0 -78
- package/dist/components/Features.js +0 -109
- package/dist/components/Footer.js +0 -101
- package/dist/components/HeroMotion.js +0 -55
- package/dist/components/HeroOverlay.js +0 -111
- package/dist/components/HeroSplit.js +0 -100
- package/dist/components/Navbar.js +0 -80
- package/dist/components/Newsletter.js +0 -34
- package/dist/components/PortfolioSimple.js +0 -180
- package/dist/components/Pricing.js +0 -91
- package/dist/components/ProcessTimeline.js +0 -88
- package/dist/components/ServicesGrid.js +0 -72
- package/dist/components/Team.js +0 -107
- package/dist/components/Testimonials.js +0 -46
- package/dist/components/TrustBadges.js +0 -46
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// components/sections/Navbar.tsx
|
|
2
|
-
"use client";
|
|
3
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { useEffect, useRef, useState } from "react";
|
|
5
|
-
import Link from "next/link";
|
|
6
|
-
import { Button } from "@nextworks/blocks-core";
|
|
7
|
-
import { ThemeToggle } from "@nextworks/blocks-core";
|
|
8
|
-
import { cn } from "@nextworks/blocks-core";
|
|
9
|
-
import { Menu, X } from "lucide-react";
|
|
10
|
-
const defaultMenuItems = [
|
|
11
|
-
{ label: "Home", href: "#home" },
|
|
12
|
-
{ label: "Features", href: "#features" },
|
|
13
|
-
{ label: "Pricing", href: "#pricing" },
|
|
14
|
-
{ label: "FAQ", href: "#faq" },
|
|
15
|
-
{ label: "Contact", href: "#contact" },
|
|
16
|
-
];
|
|
17
|
-
/**
|
|
18
|
-
* Responsive navbar with brand, menu links, color mode toggle, and optional CTA.
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* - Sticky behavior is enabled by default (sticky top-0 z-50).
|
|
22
|
-
* - Mobile menu toggles with a button and traps body scroll while open.
|
|
23
|
-
* - Accessibility: Focus rings are applied to interactive elements; aria
|
|
24
|
-
* attributes are set on the toggle button for state.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* <Navbar brand="Acme" />
|
|
28
|
-
*/
|
|
29
|
-
export function Navbar({ id, navHeight = "h-16", brand = "Brand Name", brandNode, menuItems = defaultMenuItems, ctaButton = { label: "Get Started", href: "#contact" }, showColorModeToggle = true, sticky = true, className, nav = {
|
|
30
|
-
className: "bg-background text-foreground border-b border-border",
|
|
31
|
-
}, brandText = {
|
|
32
|
-
className: "text-2xl font-bold text-primary",
|
|
33
|
-
}, links = {
|
|
34
|
-
className: "text-base font-normal text-foreground hover:text-gray-500 dark:hover-text-gray-400 transition-colors",
|
|
35
|
-
}, ctaButtonStyle = {
|
|
36
|
-
variant: "default",
|
|
37
|
-
size: "default",
|
|
38
|
-
className: "shadow-lg hover:shadow-xl transition-all duration-200 hover:-translate-y-0.5",
|
|
39
|
-
}, mobileMenu = {
|
|
40
|
-
className: "border-t border-border",
|
|
41
|
-
},
|
|
42
|
-
/* new slot defaults */
|
|
43
|
-
container = { className: "" }, brandWrapper = { className: "" }, desktopMenu = {
|
|
44
|
-
className: "hidden items-center space-x-1 lg:flex lg:space-x-6",
|
|
45
|
-
}, toggleButton = {
|
|
46
|
-
className: "hover:bg-accent flex items-center justify-center rounded-md p-2 transition-colors",
|
|
47
|
-
}, colorModeWrapper = { className: "ml-2" }, ctaButtonWrapper = { className: "ml-2" }, mobileMenuInner = { className: "space-y-2 px-4 pt-2 pb-4" }, mobileLinks = { className: "hover:bg-accent" }, themeToggle = {}, ariaLabel = "Main navigation", }) {
|
|
48
|
-
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
|
49
|
-
const mobileMenuId = "navbar-mobile-menu";
|
|
50
|
-
// Measure header height for reliable max height on mobile menu
|
|
51
|
-
const headerRef = useRef(null);
|
|
52
|
-
const [headerHeightPx, setHeaderHeightPx] = useState(0);
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
const update = () => { var _a, _b; return setHeaderHeightPx((_b = (_a = headerRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0); };
|
|
55
|
-
update();
|
|
56
|
-
window.addEventListener("resize", update);
|
|
57
|
-
return () => window.removeEventListener("resize", update);
|
|
58
|
-
}, []);
|
|
59
|
-
// Lock body scroll when mobile menu is open
|
|
60
|
-
useEffect(() => {
|
|
61
|
-
const originalOverflow = document.body.style.overflow;
|
|
62
|
-
if (isMobileMenuOpen) {
|
|
63
|
-
document.body.style.overflow = "hidden";
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
document.body.style.overflow = originalOverflow || "";
|
|
67
|
-
}
|
|
68
|
-
return () => {
|
|
69
|
-
document.body.style.overflow = originalOverflow || "";
|
|
70
|
-
};
|
|
71
|
-
}, [isMobileMenuOpen]);
|
|
72
|
-
return (_jsxs("nav", { id: id, className: cn("w-full", sticky && "sticky top-0 z-50", nav.className, className), "aria-label": ariaLabel, children: [_jsxs("div", { ref: headerRef, className: cn("flex items-center justify-between px-4 py-2", navHeight, container.className), children: [_jsxs("div", { className: cn("mr-2 flex items-center gap-2 pl-2", brandWrapper.className), children: [brandNode, brand && _jsx("h1", { className: cn(brandText.className), children: brand })] }), _jsx("button", { "aria-label": "Toggle mobile menu", "aria-expanded": isMobileMenuOpen, "aria-controls": mobileMenuId, className: cn("lg:hidden", toggleButton.className),
|
|
73
|
-
// className={cn("lg:hidden", toggleButton.className)}
|
|
74
|
-
onClick: () => setIsMobileMenuOpen(!isMobileMenuOpen), children: isMobileMenuOpen ? (_jsx(X, { className: "h-6 w-6" })) : (_jsx(Menu, { className: "h-6 w-6" })) }), _jsxs("div", { className: cn("hidden md:flex", desktopMenu.className), children: [menuItems.map((item) => (_jsx(Link, { href: item.href, className: cn("rounded-md px-2 py-2 transition-colors duration-200 lg:px-4", "focus:ring-ring focus:ring-2 focus:ring-offset-2 focus:outline-none", "focus-visible:ring-[var(--navbar-ring)]", links.className), children: item.label }, item.label))), showColorModeToggle && (_jsx("div", { className: cn(colorModeWrapper.className), children: _jsx(ThemeToggle, Object.assign({}, themeToggle)) })), ctaButton && (_jsx(Button, { asChild: true, unstyled: ctaButtonStyle.unstyled, variant: ctaButtonStyle.variant, size: ctaButtonStyle.size, className: cn(ctaButtonWrapper.className, ctaButtonStyle.className), style: ctaButtonStyle.style, children: _jsx(Link, { href: ctaButton.href, "aria-label": ctaButton.label, children: ctaButton.label }) }))] })] }), isMobileMenuOpen && (_jsx("div", { id: mobileMenuId, className: cn("md:hidden",
|
|
75
|
-
// "lg:hidden",
|
|
76
|
-
"overflow-y-auto overscroll-y-contain", nav.className, mobileMenu.className), style: {
|
|
77
|
-
maxHeight: `calc(100dvh - ${headerHeightPx}px)`,
|
|
78
|
-
WebkitOverflowScrolling: "touch",
|
|
79
|
-
}, children: _jsxs("div", { className: cn(mobileMenuInner.className), children: [menuItems.map((item) => (_jsx(Link, { href: item.href, className: cn("block w-full rounded-md px-2 py-4 text-center transition-colors duration-200", mobileLinks.className, "focus:ring-ring focus:ring-2 focus:ring-offset-2 focus:outline-none", "focus-visible:ring-[var(--navbar-ring)]", links.className), onClick: () => setIsMobileMenuOpen(false), children: item.label }, item.label))), showColorModeToggle && (_jsx("div", { className: "flex w-full justify-center pt-4", children: _jsx(ThemeToggle, Object.assign({}, themeToggle)) })), ctaButton && (_jsx("div", { className: "flex w-full justify-center pt-6", children: _jsx(Button, { asChild: true, unstyled: ctaButtonStyle.unstyled, variant: ctaButtonStyle.variant, size: ctaButtonStyle.size, className: cn("w-full max-w-xs", ctaButtonStyle.className), style: ctaButtonStyle.style, children: _jsx(Link, { href: ctaButton.href, "aria-label": ctaButton.label, children: ctaButton.label }) }) }))] }) }))] }));
|
|
80
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { cn } from "@nextworks/blocks-core";
|
|
5
|
-
import { Input, Button } from "@nextworks/blocks-core";
|
|
6
|
-
// Default classes used for slot merging. Consumers' slot.className will be merged after these.
|
|
7
|
-
const DEFAULT_SECTION = "py-12 bg-[var(--card-bg)] text-[var(--card-fg)]";
|
|
8
|
-
const DEFAULT_CONTAINER = "max-w-3xl mx-auto px-4";
|
|
9
|
-
const DEFAULT_HEADER = "text-center mb-6";
|
|
10
|
-
const DEFAULT_HEADING = "text-2xl font-bold font-poppins text-foreground text-[var(--heading-fg)]";
|
|
11
|
-
const DEFAULT_SUBHEADING = "text-sm font-inter text-muted-foreground max-w-xl mx-auto leading-relaxed text-[var(--subheading-fg)]";
|
|
12
|
-
const DEFAULT_FORM = "w-full";
|
|
13
|
-
const DEFAULT_FORM_ROW = "mt-6 flex flex-col sm:flex-row items-center gap-3 justify-center";
|
|
14
|
-
const DEFAULT_INPUT = "w-full sm:flex-1 p-3 rounded-md border border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)]";
|
|
15
|
-
const DEFAULT_BUTTON = "w-full sm:w-auto px-5 py-3 rounded-md bg-primary hover:bg-primary/90 dark:bg-primary dark:hover:bg-primary text-primary-foreground font-medium shadow-lg hover:shadow-xl transition-all duration-200 hover:-translate-y-0.5 border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]";
|
|
16
|
-
/**
|
|
17
|
-
* Compact newsletter/signup block.
|
|
18
|
-
*
|
|
19
|
-
* Usage:
|
|
20
|
-
* <Newsletter section={{ className: "bg-gradient-to-r ..." }} />
|
|
21
|
-
*
|
|
22
|
-
* Slots exposed: section, container, header, heading, subheading, form, formRow, input, button
|
|
23
|
-
*/
|
|
24
|
-
export function Newsletter({ id, className, headingText = "Stay in the loop", subheadingText = "Subscribe for product news, tips, and updates.", onSubmit, section, container, header, heading, subheading, form, formRow, input, button, enableMotion = true, ariaLabel = "Newsletter signup section", }) {
|
|
25
|
-
const [email, setEmail] = React.useState("");
|
|
26
|
-
const handleSubmit = (e) => {
|
|
27
|
-
e.preventDefault();
|
|
28
|
-
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(e, email);
|
|
29
|
-
// Optimistic clear; consumer can override behavior via onSubmit
|
|
30
|
-
setEmail("");
|
|
31
|
-
};
|
|
32
|
-
return (_jsx("section", { id: id, className: cn(DEFAULT_SECTION, section === null || section === void 0 ? void 0 : section.className, className), "aria-label": ariaLabel, children: _jsxs("div", { className: cn(DEFAULT_CONTAINER, container === null || container === void 0 ? void 0 : container.className), children: [_jsxs("div", { className: cn(DEFAULT_HEADER, header === null || header === void 0 ? void 0 : header.className), children: [_jsx("h2", { className: cn(DEFAULT_HEADING, heading === null || heading === void 0 ? void 0 : heading.className), children: headingText }), _jsx("p", { className: cn(DEFAULT_SUBHEADING, subheading === null || subheading === void 0 ? void 0 : subheading.className), children: subheadingText })] }), _jsx("form", { className: cn(DEFAULT_FORM, form === null || form === void 0 ? void 0 : form.className), onSubmit: handleSubmit, "aria-label": "Newsletter signup form", children: _jsxs("div", { className: cn(DEFAULT_FORM_ROW, formRow === null || formRow === void 0 ? void 0 : formRow.className), children: [_jsx(Input, { id: "newsletter-email", name: "email", type: "email", value: email, onChange: (e) => setEmail(e.target.value), placeholder: "Your email address", required: true, "aria-label": "Email address", className: cn(DEFAULT_INPUT, input === null || input === void 0 ? void 0 : input.className) }), _jsx(Button, { type: "submit", unstyled: button === null || button === void 0 ? void 0 : button.unstyled, variant: button === null || button === void 0 ? void 0 : button.variant, size: button === null || button === void 0 ? void 0 : button.size, className: cn(DEFAULT_BUTTON, button === null || button === void 0 ? void 0 : button.className, !enableMotion &&
|
|
33
|
-
"transition-none hover:!translate-y-0 hover:shadow-none"), children: "Subscribe" })] }) })] }) }));
|
|
34
|
-
}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { motion } from "motion/react";
|
|
5
|
-
import { cn } from "@nextworks/blocks-core";
|
|
6
|
-
import { CTAButton } from "@nextworks/blocks-core";
|
|
7
|
-
import { ExternalLink, TrendingUp } from "lucide-react";
|
|
8
|
-
import Image from "next/image";
|
|
9
|
-
const ProjectImage = ({ project, onClick, imageContainer = {
|
|
10
|
-
className: "relative rounded-lg overflow-hidden bg-muted shadow-lg transition-all duration-300 hover:-translate-y-2 hover:shadow-xl cursor-pointer aspect-[16/10]",
|
|
11
|
-
}, }) => {
|
|
12
|
-
const colorClasses = {
|
|
13
|
-
blue: "bg-blue-100 dark:bg-blue-900",
|
|
14
|
-
green: "bg-green-100 dark:bg-green-900",
|
|
15
|
-
purple: "bg-purple-100 dark:bg-purple-900",
|
|
16
|
-
red: "bg-red-100 dark:bg-red-900",
|
|
17
|
-
yellow: "bg-yellow-100 dark:bg-yellow-900",
|
|
18
|
-
indigo: "bg-indigo-100 dark:bg-indigo-900",
|
|
19
|
-
};
|
|
20
|
-
const fallbackBg = colorClasses[project.color] ||
|
|
21
|
-
colorClasses.blue;
|
|
22
|
-
return (_jsx("div", { className: imageContainer.className, onClick: onClick, children: project.image ? (_jsx(Image, { src: project.image, alt: project.title, fill: true, className: "object-cover", sizes: "(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw" })) : (_jsx("div", { className: `flex h-full w-full items-center justify-center ${fallbackBg}`, children: _jsxs("div", { className: "p-8 text-center", children: [_jsx("div", { className: "bg-background/20 dark:bg-foreground/20 mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full", children: _jsx(ExternalLink, { className: "h-8 w-8 text-[var(--card-muted-fg)]" }) }), _jsx("h3", { className: "mb-2 text-lg font-semibold text-[var(--card-title-fg)]", children: project.title }), _jsx("p", { className: "text-sm text-[var(--card-muted-fg)]", children: project.category })] }) })) }));
|
|
23
|
-
};
|
|
24
|
-
const defaultProjects = [
|
|
25
|
-
{
|
|
26
|
-
id: 1,
|
|
27
|
-
title: "TechStartup Growth Campaign",
|
|
28
|
-
category: "Digital Marketing",
|
|
29
|
-
industry: "Technology",
|
|
30
|
-
result: "+300% Leads",
|
|
31
|
-
description: "Comprehensive digital marketing campaign that increased qualified leads by 300% through targeted SEO, social media marketing, and conversion optimization strategies.",
|
|
32
|
-
tags: ["SEO", "Social Media", "PPC", "Analytics"],
|
|
33
|
-
color: "blue",
|
|
34
|
-
url: "#",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: 2,
|
|
38
|
-
title: "E-Commerce Brand Launch",
|
|
39
|
-
category: "Brand Marketing",
|
|
40
|
-
industry: "Retail",
|
|
41
|
-
result: "+250% Revenue",
|
|
42
|
-
description: "Complete brand launch and digital marketing strategy for a new e-commerce platform, resulting in 250% revenue growth within the first 6 months.",
|
|
43
|
-
tags: ["Brand Strategy", "Content Marketing", "Influencer", "Email"],
|
|
44
|
-
color: "green",
|
|
45
|
-
url: "#",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: 3,
|
|
49
|
-
title: "Healthcare Practice Expansion",
|
|
50
|
-
category: "Local Marketing",
|
|
51
|
-
industry: "Healthcare",
|
|
52
|
-
result: "+180% Patients",
|
|
53
|
-
description: "Local SEO and digital marketing campaign that helped a healthcare practice expand to three new locations and increase patient acquisition by 180%.",
|
|
54
|
-
tags: ["Local SEO", "Google Ads", "Reputation", "Content"],
|
|
55
|
-
color: "purple",
|
|
56
|
-
url: "#",
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: 4,
|
|
60
|
-
title: "SaaS Product Launch",
|
|
61
|
-
category: "B2B Marketing",
|
|
62
|
-
industry: "Software",
|
|
63
|
-
result: "+400% Signups",
|
|
64
|
-
description: "Strategic B2B marketing campaign for a SaaS product launch, achieving 400% increase in trial signups through targeted content marketing and account-based marketing.",
|
|
65
|
-
tags: ["B2B Strategy", "Content", "LinkedIn Ads", "Webinars"],
|
|
66
|
-
color: "indigo",
|
|
67
|
-
url: "#",
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
id: 5,
|
|
71
|
-
title: "Restaurant Chain Rebrand",
|
|
72
|
-
category: "Brand Marketing",
|
|
73
|
-
industry: "Food & Beverage",
|
|
74
|
-
result: "+220% Foot Traffic",
|
|
75
|
-
description: "Complete rebrand and digital marketing transformation for a restaurant chain, resulting in 220% increase in foot traffic and 150% growth in online orders.",
|
|
76
|
-
tags: ["Rebranding", "Social Media", "Local SEO", "Delivery"],
|
|
77
|
-
color: "red",
|
|
78
|
-
url: "#",
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
id: 6,
|
|
82
|
-
title: "Fitness App User Acquisition",
|
|
83
|
-
category: "Mobile Marketing",
|
|
84
|
-
industry: "Health & Fitness",
|
|
85
|
-
result: "+500% Downloads",
|
|
86
|
-
description: "Mobile-first marketing campaign that achieved 500% increase in app downloads through app store optimization, influencer partnerships, and targeted social media advertising.",
|
|
87
|
-
tags: ["ASO", "Influencer", "Social Ads", "Retention"],
|
|
88
|
-
color: "yellow",
|
|
89
|
-
url: "#",
|
|
90
|
-
},
|
|
91
|
-
];
|
|
92
|
-
const defaultFilters = [
|
|
93
|
-
"All Projects",
|
|
94
|
-
"Digital Marketing",
|
|
95
|
-
"Brand Marketing",
|
|
96
|
-
"B2B Marketing",
|
|
97
|
-
"Local Marketing",
|
|
98
|
-
"Mobile Marketing",
|
|
99
|
-
];
|
|
100
|
-
/**
|
|
101
|
-
* Responsive portfolio/gallery grid with simple category filtering and CTA block.
|
|
102
|
-
*
|
|
103
|
-
* @remarks
|
|
104
|
-
* - Filtering uses exact category match; include "All Projects" to disable filtering.
|
|
105
|
-
* - Accessibility: Renders a semantic <section> with aria-label; ensure images have informative titles or alt text.
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* <PortfolioSimple sectionTitle="Our Work" />
|
|
109
|
-
*/
|
|
110
|
-
export function PortfolioSimple({ id, className, projects = defaultProjects, filters = defaultFilters, enableMotion = true, sectionTitle = "Our Recent Work", sectionSubtitle = "Take a look at some of our successful projects that have helped businesses transform their digital presence and achieve remarkable growth.", ctaTitle = "Ready to See Your Project Here?", ctaDescription = "Let's discuss how we can help transform your business with a custom digital solution.", cta1Label = "Get Free Quote", cta1Href = "#contact", cta2Label, cta2Href, section = {
|
|
111
|
-
className: "py-16 md:py-24 bg-background",
|
|
112
|
-
}, container = {
|
|
113
|
-
className: "max-w-7xl mx-auto px-6",
|
|
114
|
-
}, header = {
|
|
115
|
-
className: "space-y-6 text-center mb-12",
|
|
116
|
-
}, title = {
|
|
117
|
-
className: "text-3xl md:text-4xl font-bold font-poppins text-foreground text-[var(--heading-fg)]",
|
|
118
|
-
}, subtitle = {
|
|
119
|
-
className: "text-xl font-inter text-muted-foreground max-w-2xl mx-auto leading-relaxed text-[var(--subheading-fg)]",
|
|
120
|
-
}, filterContainer = {
|
|
121
|
-
className: "flex gap-4 flex-wrap justify-center mt-8",
|
|
122
|
-
}, filterButton = {
|
|
123
|
-
className: "px-6 py-2 rounded-full transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md border-[var(--badge-border)] text-[var(--badge-fg)] bg-[var(--badge-bg)]",
|
|
124
|
-
}, activeFilterButton = {
|
|
125
|
-
className: "px-6 py-2 rounded-full transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md bg-[var(--badge-active-bg)] text-[var(--badge-active-fg)] border-[var(--badge-active-border)]",
|
|
126
|
-
}, grid = {
|
|
127
|
-
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 md:gap-10 mt-12",
|
|
128
|
-
}, projectCard = {
|
|
129
|
-
className: "group cursor-pointer transition-all duration-300",
|
|
130
|
-
}, imageContainer = {
|
|
131
|
-
className: "relative rounded-lg overflow-hidden bg-muted shadow-lg transition-all duration-300 hover:-translate-y-2 hover:shadow-xl cursor-pointer aspect-[16/10]",
|
|
132
|
-
}, projectInfo = {
|
|
133
|
-
className: "space-y-4 px-2 mt-4",
|
|
134
|
-
}, projectTitle = {
|
|
135
|
-
className: "text-xl font-bold font-poppins transition-colors duration-200 text-[var(--card-title-fg)] group-hover:text-[var(--card-title-hover-fg)]",
|
|
136
|
-
}, projectDescription = {
|
|
137
|
-
className: "text-base font-inter text-[var(--card-muted-fg)]",
|
|
138
|
-
}, tagsContainer = {
|
|
139
|
-
className: "flex gap-2 flex-wrap",
|
|
140
|
-
}, tagStyle = {
|
|
141
|
-
className: "px-2 py-1 text-xs border border-border rounded-full text-muted-foreground border-[var(--badge-border)] text-[var(--badge-fg)] bg-[var(--badge-bg)]",
|
|
142
|
-
}, result = {
|
|
143
|
-
className: "font-bold text-[var(--metric-fg)] text-sm whitespace-nowrap ml-4",
|
|
144
|
-
}, ctaSection = {
|
|
145
|
-
className: "space-y-6 text-center mt-16 pt-12 border-t border-border",
|
|
146
|
-
}, ctaTitleStyle = {
|
|
147
|
-
className: "text-xl font-bold text-foreground text-[var(--heading-fg)]",
|
|
148
|
-
}, ctaDescriptionStyle = {
|
|
149
|
-
className: "text-muted-foreground max-w-md mx-auto text-[var(--subheading-fg)]",
|
|
150
|
-
}, ctaButtons = {
|
|
151
|
-
className: "flex gap-4 justify-center",
|
|
152
|
-
}, cta1Button = {
|
|
153
|
-
className: "bg-primary hover:bg-primary/90 dark:bg-primary dark:hover:bg-primary/90 text-primary-foreground font-medium shadow-md hover:shadow-lg transition-all duration-200 hover:-translate-y-0.5 border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
|
|
154
|
-
}, cta2Button = {
|
|
155
|
-
className: "border-primary text-primary hover:bg-primary/10 font-medium shadow-md hover:shadow-lg transition-all duration-200 hover:-translate-y-0.5 border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
|
|
156
|
-
}, onProjectClick, onPrimaryCtaClick, onSecondaryCtaClick, ariaLabel = "Portfolio showcase section", }) {
|
|
157
|
-
const [activeFilter, setActiveFilter] = useState(filters[0] || "All Projects");
|
|
158
|
-
const filteredProjects = projects.filter((project) => activeFilter === "All Projects" || project.category === activeFilter);
|
|
159
|
-
return (_jsx("section", { id: id, className: cn(section.className, className), "aria-label": ariaLabel, children: _jsxs("div", { className: container.className, children: [_jsxs("div", { className: header.className, children: [_jsx("h2", { className: title.className, children: sectionTitle }), _jsx("p", { className: subtitle.className, children: sectionSubtitle }), _jsx("div", { className: filterContainer.className, children: filters.map((filter) => (_jsx("button", { className: activeFilter === filter
|
|
160
|
-
? activeFilterButton.className
|
|
161
|
-
: filterButton.className, onClick: () => setActiveFilter(filter), children: filter }, filter))) })] }), _jsx("div", { className: grid.className, children: filteredProjects.map((project, index) => (_jsx(motion.div, { initial: enableMotion ? { opacity: 0, y: 12 } : { opacity: 1, y: 0 }, whileInView: enableMotion ? { opacity: 1, y: 0 } : { opacity: 1, y: 0 }, viewport: enableMotion
|
|
162
|
-
? { once: true, amount: 0.2 }
|
|
163
|
-
: { once: true, amount: 0 }, transition: enableMotion
|
|
164
|
-
? {
|
|
165
|
-
type: "spring",
|
|
166
|
-
stiffness: 125,
|
|
167
|
-
damping: 50,
|
|
168
|
-
mass: 1,
|
|
169
|
-
delay: 0.1 + index * 0.05,
|
|
170
|
-
}
|
|
171
|
-
: { type: "tween", duration: 0 }, className: "motion-reduce:transform-none motion-reduce:transition-none", children: _jsx("div", { className: cn(projectCard.className, enableMotion
|
|
172
|
-
? "transition-all duration-200 hover:-translate-y-1"
|
|
173
|
-
: "cursor-default transition-none hover:!translate-y-0 hover:shadow-none"), children: _jsxs("div", { className: "space-y-4", children: [_jsx(ProjectImage, { project: project, onClick: () => onProjectClick === null || onProjectClick === void 0 ? void 0 : onProjectClick(project), imageContainer: imageContainer }), _jsxs("div", { className: projectInfo.className, children: [_jsx("div", { className: "flex w-full items-start justify-between", children: _jsxs("div", { className: "flex-1 space-y-2", children: [_jsx("h3", { className: projectTitle.className, children: project.title }), _jsx("p", { className: projectDescription.className, children: project.description })] }) }), _jsxs("div", { className: "flex w-full items-center justify-between", children: [_jsx("div", { className: tagsContainer.className, children: project.tags.map((tag, index) => (_jsx("span", { className: tagStyle.className, children: tag }, index))) }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(TrendingUp, { className: "h-4 w-4 text-[var(--metric-fg)]" }), _jsx("span", { className: result.className, children: project.result })] })] })] })] }) }) }, project.id))) }), _jsxs("div", { className: ctaSection.className, children: [_jsx("h3", { className: ctaTitleStyle.className, children: ctaTitle }), _jsx("p", { className: ctaDescriptionStyle.className, children: ctaDescription }), _jsxs("div", { className: ctaButtons.className, children: [_jsx(CTAButton, { ctaButtonLabel: cta1Label, ctaButtonHref: cta1Href, button: {
|
|
174
|
-
className: cta1Button.className,
|
|
175
|
-
}, onClick: onPrimaryCtaClick }), cta2Label && (_jsx(CTAButton, { ctaButtonLabel: cta2Label, ctaButtonHref: cta2Href, button: {
|
|
176
|
-
variant: "outline",
|
|
177
|
-
size: "lg",
|
|
178
|
-
className: cta2Button.className,
|
|
179
|
-
}, onClick: onSecondaryCtaClick }))] })] })] }) }));
|
|
180
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { motion } from "motion/react";
|
|
4
|
-
import { cn } from "@nextworks/blocks-core";
|
|
5
|
-
import { PricingCard } from "@nextworks/blocks-core";
|
|
6
|
-
/**
|
|
7
|
-
* Default pricing plans used if none are passed in.
|
|
8
|
-
*/
|
|
9
|
-
const defaultPricingData = [
|
|
10
|
-
{
|
|
11
|
-
pricingPlanHeaderText: "Basic",
|
|
12
|
-
pricingPlanPrice: "$9.99",
|
|
13
|
-
pricingPlanFeatures: ["Feature 1", "Feature 2", "Feature 3"],
|
|
14
|
-
pricingPlanCTALabel: "Select Plan",
|
|
15
|
-
pricingPlanCTAHref: "#contact",
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
pricingPlanHeaderText: "Pro",
|
|
19
|
-
pricingPlanPrice: "$19.99",
|
|
20
|
-
pricingPlanFeatures: ["Feature 1", "Feature 2", "Feature 3", "Feature 4"],
|
|
21
|
-
pricingPlanCTALabel: "Select Plan",
|
|
22
|
-
pricingPlanCTAHref: "#contact",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
pricingPlanHeaderText: "Enterprise",
|
|
26
|
-
pricingPlanPrice: "$49.99",
|
|
27
|
-
pricingPlanFeatures: [
|
|
28
|
-
"Feature 1",
|
|
29
|
-
"Feature 2",
|
|
30
|
-
"Feature 3",
|
|
31
|
-
"Feature 4",
|
|
32
|
-
"Feature 5",
|
|
33
|
-
],
|
|
34
|
-
pricingPlanCTALabel: "Select Plan",
|
|
35
|
-
pricingPlanCTAHref: "#contact",
|
|
36
|
-
},
|
|
37
|
-
];
|
|
38
|
-
/**
|
|
39
|
-
* Responsive pricing grid using PricingCard with optional motion.
|
|
40
|
-
*
|
|
41
|
-
* @remarks
|
|
42
|
-
* - Styling: exposes slot-style overrides (card, header, title, price, etc.).
|
|
43
|
-
* - Motion: enableMotion controls entrance animations and hover transitions.
|
|
44
|
-
* - Accessibility: semantic <section> with aria-label.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* <Pricing pricingPlans={[{ pricingPlanHeaderText: 'Pro', pricingPlanPrice: '$19' }]} />
|
|
48
|
-
*/
|
|
49
|
-
export function Pricing({ id, className, pricingPlans = defaultPricingData, pricingHeadingText = "Choose Your Plan", enableMotion = true, section = {
|
|
50
|
-
className: "pt-20 pb-5 bg-background text-foreground",
|
|
51
|
-
}, container = {
|
|
52
|
-
className: "max-w-7xl mx-auto px-6",
|
|
53
|
-
}, heading = {
|
|
54
|
-
className: "text-3xl font-bold font-poppins text-center text-foreground mb-8",
|
|
55
|
-
}, grid = {
|
|
56
|
-
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mt-8",
|
|
57
|
-
}, card = {
|
|
58
|
-
className: "relative bg-card border border-border rounded-lg shadow-md hover:shadow-lg transition-shadow duration-200 bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)] shadow-[var(--card-shadow)]",
|
|
59
|
-
}, header = {
|
|
60
|
-
className: "p-6 text-center border-b border-[var(--card-border)]",
|
|
61
|
-
}, title = {
|
|
62
|
-
className: "text-xl font-bold font-poppins text-card-foreground mb-2 text-[var(--card-title-fg)]",
|
|
63
|
-
}, price = {
|
|
64
|
-
className: "text-3xl font-bold font-poppins text-card-foreground mb-4 text-[var(--card-title-fg)]",
|
|
65
|
-
}, features = {
|
|
66
|
-
className: "p-6 space-y-3 font-inter",
|
|
67
|
-
}, featureItem = {
|
|
68
|
-
className: "flex items-center text-muted-foreground text-sm text-[var(--card-muted-fg)]",
|
|
69
|
-
}, cta = {
|
|
70
|
-
variant: "default",
|
|
71
|
-
size: "lg",
|
|
72
|
-
className: "w-full bg-primary hover:bg-primary/90 dark:bg-primary dark:hover:bg-primary/90 text-primary-foreground font-medium shadow-md hover:shadow-lg transition-all duration-200 hover:-translate-y-0.5 border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
|
|
73
|
-
}, popularBadge = {
|
|
74
|
-
className: "absolute -top-3 left-1/2 transform -translate-x-1/2 bg-primary text-primary-foreground px-4 py-1 rounded-full text-sm font-medium bg-[var(--badge-bg)] text-[var(--badge-fg)] border-[var(--badge-border)]",
|
|
75
|
-
}, ariaLabel = "Pricing section", }) {
|
|
76
|
-
return (_jsx("section", { id: id || "pricing", className: cn(section.className, className), "aria-label": ariaLabel, children: _jsxs("div", { className: container.className, children: [_jsx("h2", { className: heading.className, children: pricingHeadingText }), _jsx("div", { className: grid.className, children: pricingPlans.map((plan, index) => (_jsx(motion.div, { initial: enableMotion ? { opacity: 0, y: 12 } : { opacity: 1, y: 0 }, whileInView: { opacity: 1, y: 0 }, viewport: enableMotion
|
|
77
|
-
? { once: true, amount: 0.2 }
|
|
78
|
-
: { once: true, amount: 0 }, transition: enableMotion
|
|
79
|
-
? {
|
|
80
|
-
type: "spring",
|
|
81
|
-
stiffness: 125,
|
|
82
|
-
damping: 50,
|
|
83
|
-
mass: 1,
|
|
84
|
-
delay: 0.12 + index * 0.06,
|
|
85
|
-
}
|
|
86
|
-
: { type: "tween", duration: 0 }, className: "motion-reduce:transform-none motion-reduce:transition-none", children: _jsx(PricingCard, { pricingCardTitle: plan.pricingPlanHeaderText, pricingCardPrice: plan.pricingPlanPrice, pricingCardFeatures: plan.pricingPlanFeatures, pricingCardCTALabel: plan.pricingPlanCTALabel, pricingCardCTAHref: plan.pricingPlanCTAHref, isPopular: plan.isPopular, card: {
|
|
87
|
-
className: cn(card.className, enableMotion
|
|
88
|
-
? "transition-all duration-200 hover:-translate-y-1 motion-reduce:transform-none motion-reduce:transition-none"
|
|
89
|
-
: "transition-none hover:!translate-y-0 hover:shadow-none"),
|
|
90
|
-
}, header: header, title: title, price: price, features: features, featureItem: featureItem, cta: cta, popularBadge: popularBadge }) }, index))) })] }) }));
|
|
91
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "@nextworks/blocks-core";
|
|
4
|
-
/**
|
|
5
|
-
* Responsive timeline showing a multi-step process for your workflow.
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* - Renders horizontally on desktop and vertically on mobile.
|
|
9
|
-
* - Slot-style className overrides are merged after defaults via cn().
|
|
10
|
-
* - Uses a semantic <section> and supports aria-label.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* <ProcessTimeline steps={[{ stepNumber: 1, title: 'Plan', description: '...' }]} />
|
|
14
|
-
*/
|
|
15
|
-
export function ProcessTimeline({ id, className, steps = [
|
|
16
|
-
{
|
|
17
|
-
stepNumber: 1,
|
|
18
|
-
title: "Discovery Call",
|
|
19
|
-
description: "Understanding your goals and requirements",
|
|
20
|
-
icon: "🔍",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
stepNumber: 2,
|
|
24
|
-
title: "Strategy & Design",
|
|
25
|
-
description: "Custom mockups and project roadmap",
|
|
26
|
-
icon: "🎨",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
stepNumber: 3,
|
|
30
|
-
title: "Development",
|
|
31
|
-
description: "Building your site with regular updates",
|
|
32
|
-
icon: "⚡",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
stepNumber: 4,
|
|
36
|
-
title: "Launch & Support",
|
|
37
|
-
description: "Going live with ongoing maintenance",
|
|
38
|
-
icon: "🚀",
|
|
39
|
-
},
|
|
40
|
-
], heading = "Our Process", subheading, section = {
|
|
41
|
-
className: "py-16 md:py-20 bg-muted",
|
|
42
|
-
}, container = {
|
|
43
|
-
className: "max-w-6xl mx-auto px-5 md:px-10",
|
|
44
|
-
}, header = {
|
|
45
|
-
className: "space-y-4 mb-12 md:mb-16 text-center",
|
|
46
|
-
}, headingStyle = {
|
|
47
|
-
className: "text-4xl md:text-5xl font-bold font-poppins text-foreground leading-tight",
|
|
48
|
-
}, subheadingStyle = {
|
|
49
|
-
className: "text-lg md:text-xl font-inter text-muted-foreground max-w-2xl mx-auto leading-relaxed",
|
|
50
|
-
}, timelineContainer = {
|
|
51
|
-
className: "w-full max-w-4xl mx-auto",
|
|
52
|
-
}, desktopTimeline = {
|
|
53
|
-
className: "hidden lg:flex justify-between items-start relative w-full",
|
|
54
|
-
}, connectingLine = {
|
|
55
|
-
className: "absolute top-8 left-15 right-15 h-0.5 z-10 bg-[var(--process-connector)] dark:bg-[var(--process-connector)]",
|
|
56
|
-
}, stepContainer = {
|
|
57
|
-
className: "flex flex-col items-center space-y-4 flex-1 max-w-48 relative z-20",
|
|
58
|
-
}, stepCircle = {
|
|
59
|
-
className: "w-15 h-15 font-bold text-2xl rounded-full flex items-center justify-center shadow-lg relative z-30 bg-[var(--process-step-bg)] text-[var(--process-step-fg)] dark:bg-[var(--process-step-bg)] dark:text-[var(--process-step-fg)]",
|
|
60
|
-
}, stepNumber = {
|
|
61
|
-
className: "font-bold text-2xl text-[var(--process-step-fg)] dark:text-[var(--process-step-fg)]",
|
|
62
|
-
}, stepIcon = {
|
|
63
|
-
className: "text-2xl md:text-3xl mb-2",
|
|
64
|
-
}, stepContent = {
|
|
65
|
-
className: "space-y-2 text-center",
|
|
66
|
-
}, stepTitle = {
|
|
67
|
-
className: "text-lg md:text-xl font-semibold font-poppins text-foreground leading-tight",
|
|
68
|
-
}, stepDescription = {
|
|
69
|
-
className: "text-sm md:text-base font-inter text-muted-foreground leading-relaxed",
|
|
70
|
-
}, mobileTimeline = {
|
|
71
|
-
className: "flex lg:hidden flex-col space-y-8 w-full",
|
|
72
|
-
}, mobileStep = {
|
|
73
|
-
className: "flex items-start relative",
|
|
74
|
-
}, mobileVerticalLine = {
|
|
75
|
-
className: "absolute left-7 top-15 bottom-[-2rem] w-0.5 z-10 bg-[var(--process-connector)] dark:bg-[var(--process-connector)]",
|
|
76
|
-
}, mobileStepCircle = {
|
|
77
|
-
className: "w-15 h-15 font-bold text-2xl rounded-full flex items-center justify-center shadow-lg flex-shrink-0 mr-6 z-20 bg-[var(--process-step-bg)] text-[var(--process-step-fg)] dark:bg-[var(--process-step-bg)] dark:text-[var(--process-step-fg)]",
|
|
78
|
-
}, mobileStepContent = {
|
|
79
|
-
className: "flex flex-col items-start space-y-3 flex-1 pt-2",
|
|
80
|
-
}, mobileStepIcon = {
|
|
81
|
-
className: "text-2xl md:text-3xl",
|
|
82
|
-
}, mobileStepTitle = {
|
|
83
|
-
className: "text-lg md:text-xl font-semibold font-poppins text-foreground leading-tight",
|
|
84
|
-
}, mobileStepDescription = {
|
|
85
|
-
className: "text-sm md:text-base font-inter text-muted-foreground leading-relaxed",
|
|
86
|
-
}, ariaLabel = "Process timeline section", }) {
|
|
87
|
-
return (_jsx("section", { id: id, className: cn(section.className, className), "aria-label": ariaLabel, children: _jsxs("div", { className: container.className, children: [_jsxs("div", { className: header.className, children: [_jsx("h2", { className: headingStyle.className, children: heading }), subheading && (_jsx("p", { className: subheadingStyle.className, children: subheading }))] }), _jsxs("div", { className: timelineContainer.className, children: [_jsxs("div", { className: desktopTimeline.className, children: [_jsx("div", { className: connectingLine.className }), steps.map((step) => (_jsxs("div", { className: stepContainer.className, children: [_jsx("div", { className: stepCircle.className, children: _jsx("span", { className: stepNumber.className, children: step.stepNumber }) }), step.icon && (_jsx("div", { className: stepIcon.className, children: step.icon })), _jsxs("div", { className: stepContent.className, children: [_jsx("h3", { className: stepTitle.className, children: step.title }), _jsx("p", { className: stepDescription.className, children: step.description })] })] }, step.stepNumber)))] }), _jsx("div", { className: mobileTimeline.className, children: steps.map((step, index) => (_jsxs("div", { className: mobileStep.className, children: [index < steps.length - 1 && (_jsx("div", { className: mobileVerticalLine.className })), _jsx("div", { className: mobileStepCircle.className, children: _jsx("span", { className: stepNumber.className, children: step.stepNumber }) }), _jsxs("div", { className: mobileStepContent.className, children: [step.icon && (_jsx("div", { className: mobileStepIcon.className, children: step.icon })), _jsx("h3", { className: mobileStepTitle.className, children: step.title }), _jsx("p", { className: mobileStepDescription.className, children: step.description })] })] }, step.stepNumber))) })] })] }) }));
|
|
88
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { motion } from "motion/react";
|
|
4
|
-
import { cn } from "@nextworks/blocks-core";
|
|
5
|
-
/**
|
|
6
|
-
* Default services data for digital agency
|
|
7
|
-
*/
|
|
8
|
-
const defaultServicesData = [
|
|
9
|
-
{
|
|
10
|
-
icon: "💻",
|
|
11
|
-
title: "Web Design & Development",
|
|
12
|
-
description: "Custom websites that capture your brand and convert visitors into customers",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
icon: "📈",
|
|
16
|
-
title: "SEO & Digital Marketing",
|
|
17
|
-
description: "Get found on Google and drive qualified traffic to your website",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
icon: "🛒",
|
|
21
|
-
title: "E-commerce Solutions",
|
|
22
|
-
description: "Online stores that maximize sales and customer experience",
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
icon: "🎨",
|
|
26
|
-
title: "Brand Identity & Design",
|
|
27
|
-
description: "Logo, branding, and visual identity that makes you stand out",
|
|
28
|
-
},
|
|
29
|
-
];
|
|
30
|
-
/**
|
|
31
|
-
* Responsive services grid with subtle motion and slot-style overrides.
|
|
32
|
-
*
|
|
33
|
-
* @remarks
|
|
34
|
-
* - Motion can be disabled globally with enableMotion.
|
|
35
|
-
* - Each card uses simple emoji icons by default; replace with real icons if preferred.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* <ServicesGrid servicesData={[{ icon: '⚙️', title: 'Automation', description: '...' }]} />
|
|
39
|
-
*/
|
|
40
|
-
export function ServicesGrid({ id, className, sectionHeading = "Our Services", servicesData = defaultServicesData, enableMotion = true, section = {
|
|
41
|
-
className: "py-16 md:py-20 lg:py-24 bg-muted",
|
|
42
|
-
}, container = {
|
|
43
|
-
className: "max-w-6xl mx-auto px-4 md:px-6 lg:px-8",
|
|
44
|
-
}, heading = {
|
|
45
|
-
className: "text-3xl md:text-4xl lg:text-5xl font-bold font-poppins text-foreground text-center mb-8 md:mb-12",
|
|
46
|
-
}, grid = {
|
|
47
|
-
className: "grid grid-cols-1 md:grid-cols-2 gap-6 md:gap-8 items-stretch",
|
|
48
|
-
}, card = {
|
|
49
|
-
className: "bg-card/90 backdrop-blur p-6 md:p-8 rounded-lg border border-border shadow-sm hover:shadow-md transition-all duration-300 bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)] shadow-[var(--card-shadow)]",
|
|
50
|
-
}, cardContent = {
|
|
51
|
-
className: "flex flex-col h-full space-y-4",
|
|
52
|
-
}, icon = {
|
|
53
|
-
className: "text-4xl",
|
|
54
|
-
}, title = {
|
|
55
|
-
className: "text-lg md:text-xl font-semibold font-poppins text-card-foreground leading-tight text-[var(--card-title-fg)]",
|
|
56
|
-
}, description = {
|
|
57
|
-
className: "text-sm md:text-base font-inter text-muted-foreground leading-relaxed flex-1 text-[var(--card-muted-fg)]",
|
|
58
|
-
}, ariaLabel = "Services section", }) {
|
|
59
|
-
return (_jsx("section", { id: id, className: cn(section.className, className), "aria-label": ariaLabel, children: _jsxs("div", { className: container.className, children: [_jsx("h2", { className: heading.className, children: sectionHeading }), _jsx("div", { className: grid.className, children: servicesData.map((service, index) => (_jsx(motion.div, { initial: enableMotion ? { opacity: 0, y: 12 } : { opacity: 1, y: 0 }, whileInView: enableMotion ? { opacity: 1, y: 0 } : { opacity: 1, y: 0 }, viewport: enableMotion
|
|
60
|
-
? { once: true, amount: 0.2 }
|
|
61
|
-
: { once: true, amount: 0 }, transition: enableMotion
|
|
62
|
-
? {
|
|
63
|
-
type: "spring",
|
|
64
|
-
stiffness: 125,
|
|
65
|
-
damping: 50,
|
|
66
|
-
mass: 1,
|
|
67
|
-
delay: 0.12 + index * 0.05,
|
|
68
|
-
}
|
|
69
|
-
: { type: "tween", duration: 0 }, className: cn("h-full motion-reduce:transform-none motion-reduce:transition-none"), children: _jsx("div", { className: cn(card.className, "flex h-full flex-col", enableMotion
|
|
70
|
-
? "transition-transform duration-200 hover:-translate-y-1"
|
|
71
|
-
: "transition-none hover:!translate-y-0 hover:shadow-none"), children: _jsxs("div", { className: cardContent.className, children: [_jsx("div", { className: icon.className, role: "img", "aria-label": service.title, children: service.icon }), _jsx("h3", { className: title.className, children: service.title }), _jsx("p", { className: description.className, children: service.description })] }) }) }, index))) })] }) }));
|
|
72
|
-
}
|