nextworks 0.2.0-alpha.11 → 0.2.0-alpha.13

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.
Files changed (111) hide show
  1. package/README.md +283 -282
  2. package/dist/cli_manifests/blocks_manifest.json +198 -175
  3. package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +101 -100
  4. package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +105 -104
  5. package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +1 -1
  6. package/dist/kits/blocks/app/templates/aiworkflow/PresetThemeVars.tsx +58 -0
  7. package/dist/kits/blocks/app/templates/aiworkflow/README.md +46 -0
  8. package/dist/kits/blocks/app/templates/aiworkflow/components/CTA.tsx +44 -0
  9. package/dist/kits/blocks/app/templates/aiworkflow/components/Contact.tsx +105 -0
  10. package/dist/kits/blocks/app/templates/aiworkflow/components/FAQ.tsx +63 -0
  11. package/dist/kits/blocks/app/templates/aiworkflow/components/Features.tsx +65 -0
  12. package/dist/kits/blocks/app/templates/aiworkflow/components/Footer.tsx +109 -0
  13. package/dist/kits/blocks/app/templates/aiworkflow/components/Hero.tsx +636 -0
  14. package/dist/kits/blocks/app/templates/aiworkflow/components/Navbar.tsx +90 -0
  15. package/dist/kits/blocks/app/templates/aiworkflow/components/Pricing.tsx +86 -0
  16. package/dist/kits/blocks/app/templates/aiworkflow/components/ProcessTimeline.tsx +103 -0
  17. package/dist/kits/blocks/app/templates/aiworkflow/components/Testimonials.tsx +56 -0
  18. package/dist/kits/blocks/app/templates/aiworkflow/components/TrustBadges.tsx +59 -0
  19. package/dist/kits/blocks/app/templates/aiworkflow/page.tsx +43 -0
  20. package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -80
  21. package/dist/kits/blocks/app/templates/digitalagency/README.md +42 -42
  22. package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -114
  23. package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -59
  24. package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -55
  25. package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -28
  26. package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -65
  27. package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -38
  28. package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +84 -84
  29. package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +75 -75
  30. package/dist/kits/blocks/app/templates/productlaunch/README.md +62 -62
  31. package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +84 -84
  32. package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +50 -50
  33. package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -231
  34. package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +86 -86
  35. package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +83 -83
  36. package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -132
  37. package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +88 -88
  38. package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +116 -116
  39. package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -106
  40. package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -110
  41. package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -68
  42. package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -104
  43. package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +90 -90
  44. package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -76
  45. package/dist/kits/blocks/app/templates/productlaunch/page.tsx +43 -43
  46. package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -80
  47. package/dist/kits/blocks/app/templates/saasdashboard/README.md +44 -44
  48. package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +129 -129
  49. package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -293
  50. package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -55
  51. package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +90 -90
  52. package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -77
  53. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +104 -104
  54. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +126 -126
  55. package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +117 -117
  56. package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -90
  57. package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +96 -96
  58. package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -72
  59. package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -53
  60. package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -39
  61. package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -195
  62. package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -27
  63. package/dist/kits/blocks/components/sections/About.tsx +291 -291
  64. package/dist/kits/blocks/components/sections/CTA.tsx +257 -257
  65. package/dist/kits/blocks/components/sections/Contact.tsx +267 -267
  66. package/dist/kits/blocks/components/sections/FAQ.tsx +214 -214
  67. package/dist/kits/blocks/components/sections/Features.tsx +268 -268
  68. package/dist/kits/blocks/components/sections/Footer.tsx +302 -302
  69. package/dist/kits/blocks/components/sections/HeroMotion.tsx +308 -308
  70. package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -358
  71. package/dist/kits/blocks/components/sections/HeroProductDemo.tsx +236 -0
  72. package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -352
  73. package/dist/kits/blocks/components/sections/Navbar.tsx +350 -350
  74. package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +549 -549
  75. package/dist/kits/blocks/components/sections/Pricing.tsx +264 -264
  76. package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -325
  77. package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -210
  78. package/dist/kits/blocks/components/sections/Team.tsx +309 -309
  79. package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -158
  80. package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -162
  81. package/dist/kits/blocks/components/sections/product-demo/ApprovalInboxPanel.tsx +125 -0
  82. package/dist/kits/blocks/components/sections/product-demo/DemoStage.tsx +397 -0
  83. package/dist/kits/blocks/components/sections/product-demo/DemoWindow.tsx +128 -0
  84. package/dist/kits/blocks/components/sections/product-demo/KnowledgePanel.tsx +127 -0
  85. package/dist/kits/blocks/components/sections/product-demo/RunConsolePanel.tsx +150 -0
  86. package/dist/kits/blocks/components/sections/product-demo/WorkflowStudioPanel.tsx +191 -0
  87. package/dist/kits/blocks/components/sections/product-demo/types.ts +193 -0
  88. package/dist/kits/blocks/components/theme-provider.tsx +1 -1
  89. package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -134
  90. package/dist/kits/blocks/components/ui/brand-node.tsx +121 -121
  91. package/dist/kits/blocks/components/ui/button.tsx +122 -122
  92. package/dist/kits/blocks/components/ui/card.tsx +95 -95
  93. package/dist/kits/blocks/components/ui/checkbox.tsx +30 -30
  94. package/dist/kits/blocks/components/ui/cta-button.tsx +125 -125
  95. package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -201
  96. package/dist/kits/blocks/components/ui/feature-card.tsx +91 -91
  97. package/dist/kits/blocks/components/ui/input.tsx +27 -27
  98. package/dist/kits/blocks/components/ui/label.tsx +29 -29
  99. package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -120
  100. package/dist/kits/blocks/components/ui/select.tsx +25 -25
  101. package/dist/kits/blocks/components/ui/skeleton.tsx +13 -13
  102. package/dist/kits/blocks/components/ui/table.tsx +98 -98
  103. package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -108
  104. package/dist/kits/blocks/components/ui/textarea.tsx +26 -26
  105. package/dist/kits/blocks/components/ui/theme-selector.tsx +243 -243
  106. package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -74
  107. package/dist/kits/blocks/components/ui/toaster.tsx +7 -7
  108. package/dist/kits/blocks/lib/themes.ts +400 -400
  109. package/dist/kits/blocks/lib/utils.ts +6 -6
  110. package/dist/kits/blocks/package-deps.json +3 -3
  111. package/package.json +1 -1
@@ -1,549 +1,549 @@
1
- "use client";
2
-
3
- import React, { useState } from "react";
4
- import { motion } from "motion/react";
5
- import { cn } from "@/lib/utils";
6
- import { CTAButton } from "@/components/ui/cta-button";
7
- import { ExternalLink, TrendingUp } from "lucide-react";
8
- import Image from "next/image";
9
-
10
- export interface PortfolioProject {
11
- id: number;
12
- title: string;
13
- category: string;
14
- industry: string;
15
- result: string;
16
- description: string;
17
- image?: string;
18
- tags: string[];
19
- color: string;
20
- url?: string;
21
- }
22
-
23
- /**
24
- * Props for the PortfolioSimple section component.
25
- *
26
- * @remarks
27
- * - Styling: slot-style className overrides are merged after defaults via cn().
28
- * - Motion: entrance animations respect enableMotion; prefers-reduced-motion is supported.
29
- *
30
- * @public
31
- */
32
- interface PortfolioSimpleProps {
33
- /** Optional id on root section */
34
- id?: string;
35
- /** Root className merged into section slot */
36
- className?: string;
37
-
38
- // Content
39
- projects?: PortfolioProject[];
40
- /**
41
- * List of filter labels. Filtering matches project.category exactly.
42
- * The first item is selected by default; a value of "All Projects" disables filtering.
43
- */
44
- filters?: string[];
45
- /** When false, disables entrance animations and hover transitions. */
46
- enableMotion?: boolean;
47
-
48
- // Section Content
49
- sectionTitle?: string;
50
- sectionSubtitle?: string;
51
- ctaTitle?: string;
52
- ctaDescription?: string;
53
-
54
- /** Label for the first call-to-action button */
55
- cta1Label?: string;
56
- /** URL or anchor target for the first CTA button */
57
- cta1Href?: string;
58
- /** Label for the second call-to-action button */
59
- cta2Label?: string;
60
- /** URL or anchor target for the second CTA button */
61
- cta2Href?: string;
62
-
63
- /** Styling configuration objects */
64
- section?: {
65
- className?: string;
66
- };
67
- container?: {
68
- className?: string;
69
- };
70
- header?: {
71
- className?: string;
72
- };
73
- title?: {
74
- className?: string;
75
- };
76
- subtitle?: {
77
- className?: string;
78
- };
79
- filterContainer?: {
80
- className?: string;
81
- };
82
- filterButton?: {
83
- className?: string;
84
- };
85
- activeFilterButton?: {
86
- className?: string;
87
- };
88
- grid?: {
89
- className?: string;
90
- };
91
- projectCard?: {
92
- className?: string;
93
- };
94
- imageContainer?: {
95
- className?: string;
96
- };
97
- projectInfo?: {
98
- className?: string;
99
- };
100
- projectTitle?: {
101
- className?: string;
102
- };
103
- projectDescription?: {
104
- className?: string;
105
- };
106
- tagsContainer?: {
107
- className?: string;
108
- };
109
- tagStyle?: {
110
- className?: string;
111
- };
112
- result?: {
113
- className?: string;
114
- };
115
- ctaSection?: {
116
- className?: string;
117
- };
118
- ctaTitleStyle?: {
119
- className?: string;
120
- };
121
- ctaDescriptionStyle?: {
122
- className?: string;
123
- };
124
- ctaButtons?: {
125
- className?: string;
126
- };
127
- cta1Button?: {
128
- className?: string;
129
- };
130
- cta2Button?: {
131
- className?: string;
132
- };
133
-
134
- // Callbacks
135
- /** Called when a project image or card is clicked. */
136
- onProjectClick?: (project: PortfolioProject) => void;
137
- onPrimaryCtaClick?: () => void;
138
- onSecondaryCtaClick?: () => void;
139
-
140
- /** ARIA label for the portfolio section */
141
- ariaLabel?: string;
142
- }
143
-
144
- // Simple project image component
145
- interface ProjectImageProps {
146
- project: PortfolioProject;
147
- onClick?: () => void;
148
- imageContainer?: {
149
- className?: string;
150
- };
151
- }
152
-
153
- const ProjectImage: React.FC<ProjectImageProps> = ({
154
- project,
155
- onClick,
156
- imageContainer = {
157
- className:
158
- "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]",
159
- },
160
- }) => {
161
- const colorClasses = {
162
- blue: "bg-blue-100 dark:bg-blue-900",
163
- green: "bg-green-100 dark:bg-green-900",
164
- purple: "bg-purple-100 dark:bg-purple-900",
165
- red: "bg-red-100 dark:bg-red-900",
166
- yellow: "bg-yellow-100 dark:bg-yellow-900",
167
- indigo: "bg-indigo-100 dark:bg-indigo-900",
168
- } as const;
169
-
170
- const fallbackBg =
171
- colorClasses[project.color as keyof typeof colorClasses] ||
172
- colorClasses.blue;
173
-
174
- return (
175
- <div className={imageContainer.className} onClick={onClick}>
176
- {project.image ? (
177
- <Image
178
- src={project.image}
179
- alt={project.title}
180
- fill
181
- className="object-cover"
182
- sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
183
- />
184
- ) : (
185
- <div
186
- className={`flex h-full w-full items-center justify-center ${fallbackBg}`}
187
- >
188
- <div className="p-8 text-center">
189
- <div className="bg-background/20 dark:bg-foreground/20 mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full">
190
- <ExternalLink className="h-8 w-8 text-[var(--card-muted-fg)]" />
191
- </div>
192
- <h3 className="mb-2 text-lg font-semibold text-[var(--card-title-fg)]">
193
- {project.title}
194
- </h3>
195
- <p className="text-sm text-[var(--card-muted-fg)]">
196
- {project.category}
197
- </p>
198
- </div>
199
- </div>
200
- )}
201
- </div>
202
- );
203
- };
204
-
205
- const defaultProjects = [
206
- {
207
- id: 1,
208
- title: "TechStartup Growth Campaign",
209
- category: "Digital Marketing",
210
- industry: "Technology",
211
- result: "+300% Leads",
212
- description:
213
- "Comprehensive digital marketing campaign that increased qualified leads by 300% through targeted SEO, social media marketing, and conversion optimization strategies.",
214
- tags: ["SEO", "Social Media", "PPC", "Analytics"],
215
- color: "blue",
216
- url: "#",
217
- },
218
- {
219
- id: 2,
220
- title: "E-Commerce Brand Launch",
221
- category: "Brand Marketing",
222
- industry: "Retail",
223
- result: "+250% Revenue",
224
- description:
225
- "Complete brand launch and digital marketing strategy for a new e-commerce platform, resulting in 250% revenue growth within the first 6 months.",
226
- tags: ["Brand Strategy", "Content Marketing", "Influencer", "Email"],
227
- color: "green",
228
- url: "#",
229
- },
230
- {
231
- id: 3,
232
- title: "Healthcare Practice Expansion",
233
- category: "Local Marketing",
234
- industry: "Healthcare",
235
- result: "+180% Patients",
236
- description:
237
- "Local SEO and digital marketing campaign that helped a healthcare practice expand to three new locations and increase patient acquisition by 180%.",
238
- tags: ["Local SEO", "Google Ads", "Reputation", "Content"],
239
- color: "purple",
240
- url: "#",
241
- },
242
- {
243
- id: 4,
244
- title: "SaaS Product Launch",
245
- category: "B2B Marketing",
246
- industry: "Software",
247
- result: "+400% Signups",
248
- description:
249
- "Strategic B2B marketing campaign for a SaaS product launch, achieving 400% increase in trial signups through targeted content marketing and account-based marketing.",
250
- tags: ["B2B Strategy", "Content", "LinkedIn Ads", "Webinars"],
251
- color: "indigo",
252
- url: "#",
253
- },
254
- {
255
- id: 5,
256
- title: "Restaurant Chain Rebrand",
257
- category: "Brand Marketing",
258
- industry: "Food & Beverage",
259
- result: "+220% Foot Traffic",
260
- description:
261
- "Complete rebrand and digital marketing transformation for a restaurant chain, resulting in 220% increase in foot traffic and 150% growth in online orders.",
262
- tags: ["Rebranding", "Social Media", "Local SEO", "Delivery"],
263
- color: "red",
264
- url: "#",
265
- },
266
- {
267
- id: 6,
268
- title: "Fitness App User Acquisition",
269
- category: "Mobile Marketing",
270
- industry: "Health & Fitness",
271
- result: "+500% Downloads",
272
- description:
273
- "Mobile-first marketing campaign that achieved 500% increase in app downloads through app store optimization, influencer partnerships, and targeted social media advertising.",
274
- tags: ["ASO", "Influencer", "Social Ads", "Retention"],
275
- color: "yellow",
276
- url: "#",
277
- },
278
- ];
279
-
280
- const defaultFilters = [
281
- "All Projects",
282
- "Digital Marketing",
283
- "Brand Marketing",
284
- "B2B Marketing",
285
- "Local Marketing",
286
- "Mobile Marketing",
287
- ];
288
-
289
- /**
290
- * Responsive portfolio/gallery grid with simple category filtering and CTA block.
291
- *
292
- * @remarks
293
- * - Filtering uses exact category match; include "All Projects" to disable filtering.
294
- * - Accessibility: Renders a semantic <section> with aria-label; ensure images have informative titles or alt text.
295
- *
296
- * @example
297
- * <PortfolioSimple sectionTitle="Our Work" />
298
- */
299
- export function PortfolioSimple({
300
- id,
301
- className,
302
- projects = defaultProjects,
303
- filters = defaultFilters,
304
- enableMotion = true,
305
- sectionTitle = "Our Recent Work",
306
- sectionSubtitle = "Take a look at some of our successful projects that have helped businesses transform their digital presence and achieve remarkable growth.",
307
- ctaTitle = "Ready to See Your Project Here?",
308
- ctaDescription = "Let's discuss how we can help transform your business with a custom digital solution.",
309
- cta1Label = "Get Free Quote",
310
- cta1Href = "#contact",
311
- cta2Label,
312
- cta2Href,
313
- section = {
314
- className: "py-16 md:py-24 bg-background",
315
- },
316
- container = {
317
- className: "max-w-7xl mx-auto px-6",
318
- },
319
- header = {
320
- className: "space-y-6 text-center mb-12",
321
- },
322
- title = {
323
- className:
324
- "text-3xl md:text-4xl font-bold font-poppins text-foreground text-[var(--heading-fg)]",
325
- },
326
- subtitle = {
327
- className:
328
- "text-xl font-inter text-muted-foreground max-w-2xl mx-auto leading-relaxed text-[var(--subheading-fg)]",
329
- },
330
- filterContainer = {
331
- className: "flex gap-4 flex-wrap justify-center mt-8",
332
- },
333
- filterButton = {
334
- className:
335
- "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)]",
336
- },
337
- activeFilterButton = {
338
- className:
339
- "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)]",
340
- },
341
- grid = {
342
- className:
343
- "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 md:gap-10 mt-12",
344
- },
345
- projectCard = {
346
- className: "group cursor-pointer transition-all duration-300",
347
- },
348
- imageContainer = {
349
- className:
350
- "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]",
351
- },
352
- projectInfo = {
353
- className: "space-y-4 px-2 mt-4",
354
- },
355
- projectTitle = {
356
- className:
357
- "text-xl font-bold font-poppins transition-colors duration-200 text-[var(--card-title-fg)] group-hover:text-[var(--card-title-hover-fg)]",
358
- },
359
- projectDescription = {
360
- className: "text-base font-inter text-[var(--card-muted-fg)]",
361
- },
362
- tagsContainer = {
363
- className: "flex gap-2 flex-wrap",
364
- },
365
- tagStyle = {
366
- className:
367
- "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)]",
368
- },
369
- result = {
370
- className:
371
- "font-bold text-[var(--metric-fg)] text-sm whitespace-nowrap ml-4",
372
- },
373
- ctaSection = {
374
- className: "space-y-6 text-center mt-16 pt-12 border-t border-border",
375
- },
376
- ctaTitleStyle = {
377
- className: "text-xl font-bold text-foreground text-[var(--heading-fg)]",
378
- },
379
- ctaDescriptionStyle = {
380
- className:
381
- "text-muted-foreground max-w-md mx-auto text-[var(--subheading-fg)]",
382
- },
383
- ctaButtons = {
384
- className: "flex gap-4 justify-center",
385
- },
386
- cta1Button = {
387
- className:
388
- "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)]",
389
- },
390
- cta2Button = {
391
- className:
392
- "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)]",
393
- },
394
- onProjectClick,
395
- onPrimaryCtaClick,
396
- onSecondaryCtaClick,
397
- ariaLabel = "Portfolio showcase section",
398
- }: PortfolioSimpleProps) {
399
- const [activeFilter, setActiveFilter] = useState(
400
- filters[0] || "All Projects",
401
- );
402
-
403
- const filteredProjects = projects.filter(
404
- (project) =>
405
- activeFilter === "All Projects" || project.category === activeFilter,
406
- );
407
-
408
- return (
409
- <section
410
- id={id}
411
- className={cn(section.className, className)}
412
- aria-label={ariaLabel}
413
- >
414
- <div className={container.className}>
415
- {/* Section Header */}
416
- <div className={header.className}>
417
- <h2 className={title.className}>{sectionTitle}</h2>
418
- <p className={subtitle.className}>{sectionSubtitle}</p>
419
-
420
- {/* Filter Buttons */}
421
- <div className={filterContainer.className}>
422
- {filters.map((filter) => (
423
- <button
424
- key={filter}
425
- className={
426
- activeFilter === filter
427
- ? activeFilterButton.className
428
- : filterButton.className
429
- }
430
- onClick={() => setActiveFilter(filter)}
431
- >
432
- {filter}
433
- </button>
434
- ))}
435
- </div>
436
- </div>
437
-
438
- {/* Portfolio Grid */}
439
- <div className={grid.className}>
440
- {filteredProjects.map((project, index) => (
441
- <motion.div
442
- key={project.id}
443
- initial={
444
- enableMotion ? { opacity: 0, y: 12 } : { opacity: 1, y: 0 }
445
- }
446
- whileInView={
447
- enableMotion ? { opacity: 1, y: 0 } : { opacity: 1, y: 0 }
448
- }
449
- viewport={
450
- enableMotion
451
- ? { once: true, amount: 0.2 }
452
- : { once: true, amount: 0 }
453
- }
454
- transition={
455
- enableMotion
456
- ? {
457
- type: "spring",
458
- stiffness: 125,
459
- damping: 50,
460
- mass: 1,
461
- delay: 0.1 + index * 0.05,
462
- }
463
- : { type: "tween", duration: 0 }
464
- }
465
- className="motion-reduce:transform-none motion-reduce:transition-none"
466
- >
467
- <div
468
- className={cn(
469
- projectCard.className,
470
- enableMotion
471
- ? "transition-all duration-200 hover:-translate-y-1"
472
- : "cursor-default transition-none hover:!translate-y-0 hover:shadow-none",
473
- )}
474
- >
475
- <div className="space-y-4">
476
- {/* Project Image */}
477
- <ProjectImage
478
- project={project}
479
- onClick={() => onProjectClick?.(project)}
480
- imageContainer={imageContainer}
481
- />
482
-
483
- {/* Project Info */}
484
- <div className={projectInfo.className}>
485
- <div className="flex w-full items-start justify-between">
486
- <div className="flex-1 space-y-2">
487
- <h3 className={projectTitle.className}>
488
- {project.title}
489
- </h3>
490
- <p className={projectDescription.className}>
491
- {project.description}
492
- </p>
493
- </div>
494
- </div>
495
-
496
- {/* Tags & Result */}
497
- <div className="flex w-full items-center justify-between">
498
- <div className={tagsContainer.className}>
499
- {project.tags.map((tag, index) => (
500
- <span key={index} className={tagStyle.className}>
501
- {tag}
502
- </span>
503
- ))}
504
- </div>
505
- <div className="flex items-center gap-2">
506
- <TrendingUp className="h-4 w-4 text-[var(--metric-fg)]" />
507
- <span className={result.className}>
508
- {project.result}
509
- </span>
510
- </div>
511
- </div>
512
- </div>
513
- </div>
514
- </div>
515
- </motion.div>
516
- ))}
517
- </div>
518
-
519
- {/* CTA Section */}
520
- <div className={ctaSection.className}>
521
- <h3 className={ctaTitleStyle.className}>{ctaTitle}</h3>
522
- <p className={ctaDescriptionStyle.className}>{ctaDescription}</p>
523
- <div className={ctaButtons.className}>
524
- <CTAButton
525
- ctaButtonLabel={cta1Label}
526
- ctaButtonHref={cta1Href}
527
- button={{
528
- className: cta1Button.className,
529
- }}
530
- onClick={onPrimaryCtaClick}
531
- />
532
- {cta2Label && (
533
- <CTAButton
534
- ctaButtonLabel={cta2Label}
535
- ctaButtonHref={cta2Href}
536
- button={{
537
- variant: "outline",
538
- size: "lg",
539
- className: cta2Button.className,
540
- }}
541
- onClick={onSecondaryCtaClick}
542
- />
543
- )}
544
- </div>
545
- </div>
546
- </div>
547
- </section>
548
- );
549
- }
1
+ "use client";
2
+
3
+ import React, { useState } from "react";
4
+ import { motion } from "motion/react";
5
+ import { cn } from "@/lib/utils";
6
+ import { CTAButton } from "@/components/ui/cta-button";
7
+ import { ExternalLink, TrendingUp } from "lucide-react";
8
+ import Image from "next/image";
9
+
10
+ export interface PortfolioProject {
11
+ id: number;
12
+ title: string;
13
+ category: string;
14
+ industry: string;
15
+ result: string;
16
+ description: string;
17
+ image?: string;
18
+ tags: string[];
19
+ color: string;
20
+ url?: string;
21
+ }
22
+
23
+ /**
24
+ * Props for the PortfolioSimple section component.
25
+ *
26
+ * @remarks
27
+ * - Styling: slot-style className overrides are merged after defaults via cn().
28
+ * - Motion: entrance animations respect enableMotion; prefers-reduced-motion is supported.
29
+ *
30
+ * @public
31
+ */
32
+ interface PortfolioSimpleProps {
33
+ /** Optional id on root section */
34
+ id?: string;
35
+ /** Root className merged into section slot */
36
+ className?: string;
37
+
38
+ // Content
39
+ projects?: PortfolioProject[];
40
+ /**
41
+ * List of filter labels. Filtering matches project.category exactly.
42
+ * The first item is selected by default; a value of "All Projects" disables filtering.
43
+ */
44
+ filters?: string[];
45
+ /** When false, disables entrance animations and hover transitions. */
46
+ enableMotion?: boolean;
47
+
48
+ // Section Content
49
+ sectionTitle?: string;
50
+ sectionSubtitle?: string;
51
+ ctaTitle?: string;
52
+ ctaDescription?: string;
53
+
54
+ /** Label for the first call-to-action button */
55
+ cta1Label?: string;
56
+ /** URL or anchor target for the first CTA button */
57
+ cta1Href?: string;
58
+ /** Label for the second call-to-action button */
59
+ cta2Label?: string;
60
+ /** URL or anchor target for the second CTA button */
61
+ cta2Href?: string;
62
+
63
+ /** Styling configuration objects */
64
+ section?: {
65
+ className?: string;
66
+ };
67
+ container?: {
68
+ className?: string;
69
+ };
70
+ header?: {
71
+ className?: string;
72
+ };
73
+ title?: {
74
+ className?: string;
75
+ };
76
+ subtitle?: {
77
+ className?: string;
78
+ };
79
+ filterContainer?: {
80
+ className?: string;
81
+ };
82
+ filterButton?: {
83
+ className?: string;
84
+ };
85
+ activeFilterButton?: {
86
+ className?: string;
87
+ };
88
+ grid?: {
89
+ className?: string;
90
+ };
91
+ projectCard?: {
92
+ className?: string;
93
+ };
94
+ imageContainer?: {
95
+ className?: string;
96
+ };
97
+ projectInfo?: {
98
+ className?: string;
99
+ };
100
+ projectTitle?: {
101
+ className?: string;
102
+ };
103
+ projectDescription?: {
104
+ className?: string;
105
+ };
106
+ tagsContainer?: {
107
+ className?: string;
108
+ };
109
+ tagStyle?: {
110
+ className?: string;
111
+ };
112
+ result?: {
113
+ className?: string;
114
+ };
115
+ ctaSection?: {
116
+ className?: string;
117
+ };
118
+ ctaTitleStyle?: {
119
+ className?: string;
120
+ };
121
+ ctaDescriptionStyle?: {
122
+ className?: string;
123
+ };
124
+ ctaButtons?: {
125
+ className?: string;
126
+ };
127
+ cta1Button?: {
128
+ className?: string;
129
+ };
130
+ cta2Button?: {
131
+ className?: string;
132
+ };
133
+
134
+ // Callbacks
135
+ /** Called when a project image or card is clicked. */
136
+ onProjectClick?: (project: PortfolioProject) => void;
137
+ onPrimaryCtaClick?: () => void;
138
+ onSecondaryCtaClick?: () => void;
139
+
140
+ /** ARIA label for the portfolio section */
141
+ ariaLabel?: string;
142
+ }
143
+
144
+ // Simple project image component
145
+ interface ProjectImageProps {
146
+ project: PortfolioProject;
147
+ onClick?: () => void;
148
+ imageContainer?: {
149
+ className?: string;
150
+ };
151
+ }
152
+
153
+ const ProjectImage: React.FC<ProjectImageProps> = ({
154
+ project,
155
+ onClick,
156
+ imageContainer = {
157
+ className:
158
+ "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]",
159
+ },
160
+ }) => {
161
+ const colorClasses = {
162
+ blue: "bg-blue-100 dark:bg-blue-900",
163
+ green: "bg-green-100 dark:bg-green-900",
164
+ purple: "bg-purple-100 dark:bg-purple-900",
165
+ red: "bg-red-100 dark:bg-red-900",
166
+ yellow: "bg-yellow-100 dark:bg-yellow-900",
167
+ indigo: "bg-indigo-100 dark:bg-indigo-900",
168
+ } as const;
169
+
170
+ const fallbackBg =
171
+ colorClasses[project.color as keyof typeof colorClasses] ||
172
+ colorClasses.blue;
173
+
174
+ return (
175
+ <div className={imageContainer.className} onClick={onClick}>
176
+ {project.image ? (
177
+ <Image
178
+ src={project.image}
179
+ alt={project.title}
180
+ fill
181
+ className="object-cover"
182
+ sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
183
+ />
184
+ ) : (
185
+ <div
186
+ className={`flex h-full w-full items-center justify-center ${fallbackBg}`}
187
+ >
188
+ <div className="p-8 text-center">
189
+ <div className="bg-background/20 dark:bg-foreground/20 mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full">
190
+ <ExternalLink className="h-8 w-8 text-[var(--card-muted-fg)]" />
191
+ </div>
192
+ <h3 className="mb-2 text-lg font-semibold text-[var(--card-title-fg)]">
193
+ {project.title}
194
+ </h3>
195
+ <p className="text-sm text-[var(--card-muted-fg)]">
196
+ {project.category}
197
+ </p>
198
+ </div>
199
+ </div>
200
+ )}
201
+ </div>
202
+ );
203
+ };
204
+
205
+ const defaultProjects = [
206
+ {
207
+ id: 1,
208
+ title: "TechStartup Growth Campaign",
209
+ category: "Digital Marketing",
210
+ industry: "Technology",
211
+ result: "+300% Leads",
212
+ description:
213
+ "Comprehensive digital marketing campaign that increased qualified leads by 300% through targeted SEO, social media marketing, and conversion optimization strategies.",
214
+ tags: ["SEO", "Social Media", "PPC", "Analytics"],
215
+ color: "blue",
216
+ url: "#",
217
+ },
218
+ {
219
+ id: 2,
220
+ title: "E-Commerce Brand Launch",
221
+ category: "Brand Marketing",
222
+ industry: "Retail",
223
+ result: "+250% Revenue",
224
+ description:
225
+ "Complete brand launch and digital marketing strategy for a new e-commerce platform, resulting in 250% revenue growth within the first 6 months.",
226
+ tags: ["Brand Strategy", "Content Marketing", "Influencer", "Email"],
227
+ color: "green",
228
+ url: "#",
229
+ },
230
+ {
231
+ id: 3,
232
+ title: "Healthcare Practice Expansion",
233
+ category: "Local Marketing",
234
+ industry: "Healthcare",
235
+ result: "+180% Patients",
236
+ description:
237
+ "Local SEO and digital marketing campaign that helped a healthcare practice expand to three new locations and increase patient acquisition by 180%.",
238
+ tags: ["Local SEO", "Google Ads", "Reputation", "Content"],
239
+ color: "purple",
240
+ url: "#",
241
+ },
242
+ {
243
+ id: 4,
244
+ title: "SaaS Product Launch",
245
+ category: "B2B Marketing",
246
+ industry: "Software",
247
+ result: "+400% Signups",
248
+ description:
249
+ "Strategic B2B marketing campaign for a SaaS product launch, achieving 400% increase in trial signups through targeted content marketing and account-based marketing.",
250
+ tags: ["B2B Strategy", "Content", "LinkedIn Ads", "Webinars"],
251
+ color: "indigo",
252
+ url: "#",
253
+ },
254
+ {
255
+ id: 5,
256
+ title: "Restaurant Chain Rebrand",
257
+ category: "Brand Marketing",
258
+ industry: "Food & Beverage",
259
+ result: "+220% Foot Traffic",
260
+ description:
261
+ "Complete rebrand and digital marketing transformation for a restaurant chain, resulting in 220% increase in foot traffic and 150% growth in online orders.",
262
+ tags: ["Rebranding", "Social Media", "Local SEO", "Delivery"],
263
+ color: "red",
264
+ url: "#",
265
+ },
266
+ {
267
+ id: 6,
268
+ title: "Fitness App User Acquisition",
269
+ category: "Mobile Marketing",
270
+ industry: "Health & Fitness",
271
+ result: "+500% Downloads",
272
+ description:
273
+ "Mobile-first marketing campaign that achieved 500% increase in app downloads through app store optimization, influencer partnerships, and targeted social media advertising.",
274
+ tags: ["ASO", "Influencer", "Social Ads", "Retention"],
275
+ color: "yellow",
276
+ url: "#",
277
+ },
278
+ ];
279
+
280
+ const defaultFilters = [
281
+ "All Projects",
282
+ "Digital Marketing",
283
+ "Brand Marketing",
284
+ "B2B Marketing",
285
+ "Local Marketing",
286
+ "Mobile Marketing",
287
+ ];
288
+
289
+ /**
290
+ * Responsive portfolio/gallery grid with simple category filtering and CTA block.
291
+ *
292
+ * @remarks
293
+ * - Filtering uses exact category match; include "All Projects" to disable filtering.
294
+ * - Accessibility: Renders a semantic <section> with aria-label; ensure images have informative titles or alt text.
295
+ *
296
+ * @example
297
+ * <PortfolioSimple sectionTitle="Our Work" />
298
+ */
299
+ export function PortfolioSimple({
300
+ id,
301
+ className,
302
+ projects = defaultProjects,
303
+ filters = defaultFilters,
304
+ enableMotion = true,
305
+ sectionTitle = "Our Recent Work",
306
+ sectionSubtitle = "Take a look at some of our successful projects that have helped businesses transform their digital presence and achieve remarkable growth.",
307
+ ctaTitle = "Ready to See Your Project Here?",
308
+ ctaDescription = "Let's discuss how we can help transform your business with a custom digital solution.",
309
+ cta1Label = "Get Free Quote",
310
+ cta1Href = "#contact",
311
+ cta2Label,
312
+ cta2Href,
313
+ section = {
314
+ className: "py-16 md:py-24 bg-background",
315
+ },
316
+ container = {
317
+ className: "max-w-7xl mx-auto px-6",
318
+ },
319
+ header = {
320
+ className: "space-y-6 text-center mb-12",
321
+ },
322
+ title = {
323
+ className:
324
+ "text-3xl md:text-4xl font-bold font-poppins text-foreground text-[var(--heading-fg)]",
325
+ },
326
+ subtitle = {
327
+ className:
328
+ "text-xl font-inter text-muted-foreground max-w-2xl mx-auto leading-relaxed text-[var(--subheading-fg)]",
329
+ },
330
+ filterContainer = {
331
+ className: "flex gap-4 flex-wrap justify-center mt-8",
332
+ },
333
+ filterButton = {
334
+ className:
335
+ "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)]",
336
+ },
337
+ activeFilterButton = {
338
+ className:
339
+ "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)]",
340
+ },
341
+ grid = {
342
+ className:
343
+ "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 md:gap-10 mt-12",
344
+ },
345
+ projectCard = {
346
+ className: "group cursor-pointer transition-all duration-300",
347
+ },
348
+ imageContainer = {
349
+ className:
350
+ "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]",
351
+ },
352
+ projectInfo = {
353
+ className: "space-y-4 px-2 mt-4",
354
+ },
355
+ projectTitle = {
356
+ className:
357
+ "text-xl font-bold font-poppins transition-colors duration-200 text-[var(--card-title-fg)] group-hover:text-[var(--card-title-hover-fg)]",
358
+ },
359
+ projectDescription = {
360
+ className: "text-base font-inter text-[var(--card-muted-fg)]",
361
+ },
362
+ tagsContainer = {
363
+ className: "flex gap-2 flex-wrap",
364
+ },
365
+ tagStyle = {
366
+ className:
367
+ "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)]",
368
+ },
369
+ result = {
370
+ className:
371
+ "font-bold text-[var(--metric-fg)] text-sm whitespace-nowrap ml-4",
372
+ },
373
+ ctaSection = {
374
+ className: "space-y-6 text-center mt-16 pt-12 border-t border-border",
375
+ },
376
+ ctaTitleStyle = {
377
+ className: "text-xl font-bold text-foreground text-[var(--heading-fg)]",
378
+ },
379
+ ctaDescriptionStyle = {
380
+ className:
381
+ "text-muted-foreground max-w-md mx-auto text-[var(--subheading-fg)]",
382
+ },
383
+ ctaButtons = {
384
+ className: "flex gap-4 justify-center",
385
+ },
386
+ cta1Button = {
387
+ className:
388
+ "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)]",
389
+ },
390
+ cta2Button = {
391
+ className:
392
+ "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)]",
393
+ },
394
+ onProjectClick,
395
+ onPrimaryCtaClick,
396
+ onSecondaryCtaClick,
397
+ ariaLabel = "Portfolio showcase section",
398
+ }: PortfolioSimpleProps) {
399
+ const [activeFilter, setActiveFilter] = useState(
400
+ filters[0] || "All Projects",
401
+ );
402
+
403
+ const filteredProjects = projects.filter(
404
+ (project) =>
405
+ activeFilter === "All Projects" || project.category === activeFilter,
406
+ );
407
+
408
+ return (
409
+ <section
410
+ id={id}
411
+ className={cn(section.className, className)}
412
+ aria-label={ariaLabel}
413
+ >
414
+ <div className={container.className}>
415
+ {/* Section Header */}
416
+ <div className={header.className}>
417
+ <h2 className={title.className}>{sectionTitle}</h2>
418
+ <p className={subtitle.className}>{sectionSubtitle}</p>
419
+
420
+ {/* Filter Buttons */}
421
+ <div className={filterContainer.className}>
422
+ {filters.map((filter) => (
423
+ <button
424
+ key={filter}
425
+ className={
426
+ activeFilter === filter
427
+ ? activeFilterButton.className
428
+ : filterButton.className
429
+ }
430
+ onClick={() => setActiveFilter(filter)}
431
+ >
432
+ {filter}
433
+ </button>
434
+ ))}
435
+ </div>
436
+ </div>
437
+
438
+ {/* Portfolio Grid */}
439
+ <div className={grid.className}>
440
+ {filteredProjects.map((project, index) => (
441
+ <motion.div
442
+ key={project.id}
443
+ initial={
444
+ enableMotion ? { opacity: 0, y: 12 } : { opacity: 1, y: 0 }
445
+ }
446
+ whileInView={
447
+ enableMotion ? { opacity: 1, y: 0 } : { opacity: 1, y: 0 }
448
+ }
449
+ viewport={
450
+ enableMotion
451
+ ? { once: true, amount: 0.2 }
452
+ : { once: true, amount: 0 }
453
+ }
454
+ transition={
455
+ enableMotion
456
+ ? {
457
+ type: "spring",
458
+ stiffness: 125,
459
+ damping: 50,
460
+ mass: 1,
461
+ delay: 0.1 + index * 0.05,
462
+ }
463
+ : { type: "tween", duration: 0 }
464
+ }
465
+ className="motion-reduce:transform-none motion-reduce:transition-none"
466
+ >
467
+ <div
468
+ className={cn(
469
+ projectCard.className,
470
+ enableMotion
471
+ ? "transition-all duration-200 hover:-translate-y-1"
472
+ : "cursor-default transition-none hover:!translate-y-0 hover:shadow-none",
473
+ )}
474
+ >
475
+ <div className="space-y-4">
476
+ {/* Project Image */}
477
+ <ProjectImage
478
+ project={project}
479
+ onClick={() => onProjectClick?.(project)}
480
+ imageContainer={imageContainer}
481
+ />
482
+
483
+ {/* Project Info */}
484
+ <div className={projectInfo.className}>
485
+ <div className="flex w-full items-start justify-between">
486
+ <div className="flex-1 space-y-2">
487
+ <h3 className={projectTitle.className}>
488
+ {project.title}
489
+ </h3>
490
+ <p className={projectDescription.className}>
491
+ {project.description}
492
+ </p>
493
+ </div>
494
+ </div>
495
+
496
+ {/* Tags & Result */}
497
+ <div className="flex w-full items-center justify-between">
498
+ <div className={tagsContainer.className}>
499
+ {project.tags.map((tag, index) => (
500
+ <span key={index} className={tagStyle.className}>
501
+ {tag}
502
+ </span>
503
+ ))}
504
+ </div>
505
+ <div className="flex items-center gap-2">
506
+ <TrendingUp className="h-4 w-4 text-[var(--metric-fg)]" />
507
+ <span className={result.className}>
508
+ {project.result}
509
+ </span>
510
+ </div>
511
+ </div>
512
+ </div>
513
+ </div>
514
+ </div>
515
+ </motion.div>
516
+ ))}
517
+ </div>
518
+
519
+ {/* CTA Section */}
520
+ <div className={ctaSection.className}>
521
+ <h3 className={ctaTitleStyle.className}>{ctaTitle}</h3>
522
+ <p className={ctaDescriptionStyle.className}>{ctaDescription}</p>
523
+ <div className={ctaButtons.className}>
524
+ <CTAButton
525
+ ctaButtonLabel={cta1Label}
526
+ ctaButtonHref={cta1Href}
527
+ button={{
528
+ className: cta1Button.className,
529
+ }}
530
+ onClick={onPrimaryCtaClick}
531
+ />
532
+ {cta2Label && (
533
+ <CTAButton
534
+ ctaButtonLabel={cta2Label}
535
+ ctaButtonHref={cta2Href}
536
+ button={{
537
+ variant: "outline",
538
+ size: "lg",
539
+ className: cta2Button.className,
540
+ }}
541
+ onClick={onSecondaryCtaClick}
542
+ />
543
+ )}
544
+ </div>
545
+ </div>
546
+ </div>
547
+ </section>
548
+ );
549
+ }