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,268 +1,268 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import { motion } from "motion/react";
5
- import { cn } from "@/lib/utils";
6
- import { FeatureCard } from "@/components/ui/feature-card";
7
-
8
- /**
9
- * Data used to render a FeatureCard within the Features grid.
10
- * @public
11
- */
12
- export interface FeatureCardData {
13
- imageSrc: string;
14
- imageAlt: string;
15
- headingText: string;
16
- subheadingText: string;
17
- }
18
-
19
- /**
20
- * Props for the Features section component.
21
- *
22
- * @remarks
23
- * - Styling: slot-style className overrides are merged after defaults via cn().
24
- * - Motion: entrance animations respect enableMotion; prefers-reduced-motion
25
- * disables transforms and transitions where possible.
26
- *
27
- * @public
28
- */
29
- type MotionTransition = React.ComponentProps<typeof motion.div>["transition"];
30
-
31
- export interface FeaturesProps {
32
- /**
33
- * Optional id to attach to the root section element.
34
- * @defaultValue "features"
35
- */
36
- id?: string;
37
-
38
- /** Main section heading text */
39
- sectionHeading?: string;
40
- /** Subheading text displayed below the main heading */
41
- sectionSubheading?: string;
42
-
43
- /** Array of feature card data objects */
44
- featuresData?: FeatureCardData[];
45
-
46
- /** Optional top-level class to override the section root */
47
- className?: string;
48
-
49
- /** Styling configuration objects (slots) */
50
- section?: { className?: string };
51
- container?: { className?: string };
52
- header?: { className?: string };
53
- heading?: { className?: string };
54
- subheading?: { className?: string };
55
- grid?: { className?: string };
56
- /** Wrapper around each FeatureCard (the animated container) */
57
- cardWrapper?: { className?: string };
58
- /** Styles passed down to FeatureCard slots */
59
- card?: { className?: string };
60
- image?: { className?: string };
61
- cardHeading?: { className?: string };
62
- cardSubheading?: { className?: string };
63
-
64
- /** When false, disables entrance animations and hover transitions. */
65
- enableMotion?: boolean;
66
-
67
- /** Motion configuration for the feature items */
68
- motionConfig?: {
69
- initial?: { opacity?: number; y?: number };
70
- whileInView?: { opacity?: number; y?: number };
71
- viewport?: { once?: boolean; amount?: number };
72
- transition?: MotionTransition;
73
- };
74
-
75
- /** ARIA label for the features section */
76
- ariaLabel?: string;
77
- }
78
-
79
- const defaultFeaturesData: FeatureCardData[] = [
80
- {
81
- imageSrc: "/feature_1.png",
82
- imageAlt: "Advanced Analytics Dashboard",
83
- headingText: "Advanced Analytics",
84
- subheadingText:
85
- "Get deep insights into your business performance with our comprehensive analytics dashboard that tracks key metrics and provides actionable recommendations.",
86
- },
87
- {
88
- imageSrc: "/feature_2.png",
89
- imageAlt: "Real-time Collaboration Tools",
90
- headingText: "Real-time Collaboration",
91
- subheadingText:
92
- "Work seamlessly with your team using our real-time collaboration tools that keep everyone in sync and boost productivity across all projects.",
93
- },
94
- {
95
- imageSrc: "/feature_3.png",
96
- imageAlt: "Secure Data Management",
97
- headingText: "Secure Data Management",
98
- subheadingText:
99
- "Protect your sensitive information with enterprise-grade security features including encryption, access controls, and compliance monitoring.",
100
- },
101
- {
102
- imageSrc: "/feature_4.png",
103
- imageAlt: "Mobile-First Design",
104
- headingText: "Mobile-First Design",
105
- subheadingText:
106
- "Access your data and manage your workflow from anywhere with our responsive, mobile-optimized interface that works perfectly on all devices.",
107
- },
108
- ];
109
-
110
- /**
111
- * Responsive Features section that renders a heading, optional subheading,
112
- * and a grid of FeatureCard items with configurable entrance animations.
113
- *
114
- * @remarks
115
- * - Styling: slot-style className overrides are merged after defaults via cn().
116
- * - Motion: Controlled by enableMotion and motionConfig; animations are reduced
117
- * or disabled when users prefer reduced motion.
118
- * - Accessibility: Uses a semantic <section> with an aria-label.
119
- *
120
- * @example
121
- * <Features
122
- * sectionHeading="Key Features"
123
- * featuresData={[{ imageSrc: "/a.png", imageAlt: "", headingText: "Fast", subheadingText: "Blazing" }]}
124
- * />
125
- */
126
- export function Features({
127
- id = "features",
128
- sectionHeading = "Key Features",
129
- sectionSubheading = "Discover what makes our platform unique and powerful",
130
- featuresData = defaultFeaturesData,
131
-
132
- className,
133
-
134
- section = { className: "py-16 md:py-20 lg:py-24 bg-background" },
135
- container = { className: "max-w-7xl mx-auto px-4 md:px-6 lg:px-8" },
136
- header = { className: "text-center mb-12 md:mb-16" },
137
- heading = {
138
- className:
139
- "text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mb-4",
140
- },
141
- subheading = {
142
- className:
143
- "text-lg md:text-xl text-muted-foreground max-w-3xl mx-auto leading-relaxed",
144
- },
145
- grid = {
146
- className:
147
- "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-4 gap-6 md:gap-8",
148
- },
149
- cardWrapper = {
150
- className: "motion-reduce:transform-none motion-reduce:transition-none",
151
- },
152
- card = {
153
- className:
154
- "h-full bg-card border border-border rounded-lg shadow-md transition-all duration-200 hover:-translate-y-1 hover:shadow-lg overflow-hidden motion-reduce:transition-none motion-reduce:transform-none",
155
- },
156
- image = {
157
- className:
158
- "w-full h-48 md:h-56 object-cover transition-none hover:!scale-100 group-hover:!scale-100 [transform:none]",
159
- },
160
- cardHeading = {
161
- className:
162
- "text-xl md:text-2xl font-semibold text-card-foreground mb-3 leading-tight",
163
- },
164
- cardSubheading = {
165
- className: "text-sm md:text-base text-muted-foreground leading-relaxed",
166
- },
167
-
168
- enableMotion = true,
169
- motionConfig = {
170
- initial: { opacity: 0, y: 12 },
171
- whileInView: { opacity: 1, y: 0 },
172
- viewport: { once: true, amount: 0.2 },
173
- transition: {
174
- type: "tween",
175
- stiffness: 0,
176
- damping: 50,
177
- mass: 1,
178
- delay: 0.15,
179
- },
180
- },
181
- ariaLabel = "Features section",
182
- }: FeaturesProps) {
183
- return (
184
- <section
185
- id={id}
186
- className={cn(section.className, className)}
187
- aria-label={ariaLabel}
188
- >
189
- <div className={cn(container.className)}>
190
- <div className={cn(header.className)}>
191
- <h2 className={cn(heading.className)}>{sectionHeading}</h2>
192
- {sectionSubheading && (
193
- <p className={cn(subheading.className)}>{sectionSubheading}</p>
194
- )}
195
- </div>
196
-
197
- <div className={cn(grid.className)}>
198
- {featuresData.map((feature, index) => {
199
- const mConfig: NonNullable<FeaturesProps["motionConfig"]> =
200
- enableMotion
201
- ? (motionConfig as NonNullable<FeaturesProps["motionConfig"]>)
202
- : {
203
- initial: { opacity: 1, y: 0 },
204
- whileInView: { opacity: 1, y: 0 },
205
- viewport: { once: true, amount: 0 },
206
- transition: {
207
- type: "tween",
208
- duration: 0,
209
- } as const satisfies MotionTransition,
210
- };
211
-
212
- // Ensure we always spread a defined object into transition
213
- const baseTransition: MotionTransition =
214
- mConfig.transition ??
215
- ({
216
- type: "tween",
217
- duration: 0,
218
- } as const);
219
-
220
- const noMotionCard =
221
- "transition-none hover:!translate-y-0 hover:shadow-none motion-reduce:transition-none motion-reduce:transform-none";
222
- const noMotionImage =
223
- "transition-none hover:!scale-100 transform-none motion-reduce:transform-none group-hover:!scale-100";
224
-
225
- return (
226
- <motion.div
227
- key={index}
228
- initial={mConfig.initial}
229
- whileInView={mConfig.whileInView}
230
- viewport={mConfig.viewport}
231
- transition={{
232
- ...baseTransition,
233
- // Stagger based on index while preserving provided delay if any
234
- delay:
235
- (mConfig.transition?.delay ?? 0.15) +
236
- index * (enableMotion ? 0.06 : 0),
237
- }}
238
- className={cn(cardWrapper.className)}
239
- >
240
- <FeatureCard
241
- cardImageSrc={feature.imageSrc}
242
- cardImageAlt={feature.imageAlt}
243
- cardHeadingText={feature.headingText}
244
- cardSubheadingText={feature.subheadingText}
245
- card={{
246
- className: cn(
247
- card.className,
248
- !enableMotion && noMotionCard,
249
- ),
250
- }}
251
- image={{
252
- className: cn(
253
- image.className,
254
- !enableMotion && noMotionImage,
255
- ),
256
- }}
257
- heading={{ className: cn(cardHeading.className) }}
258
- subheading={{ className: cn(cardSubheading.className) }}
259
- className={cn("h-full")}
260
- />
261
- </motion.div>
262
- );
263
- })}
264
- </div>
265
- </div>
266
- </section>
267
- );
268
- }
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import { motion } from "motion/react";
5
+ import { cn } from "@/lib/utils";
6
+ import { FeatureCard } from "@/components/ui/feature-card";
7
+
8
+ /**
9
+ * Data used to render a FeatureCard within the Features grid.
10
+ * @public
11
+ */
12
+ export interface FeatureCardData {
13
+ imageSrc: string;
14
+ imageAlt: string;
15
+ headingText: string;
16
+ subheadingText: string;
17
+ }
18
+
19
+ /**
20
+ * Props for the Features section component.
21
+ *
22
+ * @remarks
23
+ * - Styling: slot-style className overrides are merged after defaults via cn().
24
+ * - Motion: entrance animations respect enableMotion; prefers-reduced-motion
25
+ * disables transforms and transitions where possible.
26
+ *
27
+ * @public
28
+ */
29
+ type MotionTransition = React.ComponentProps<typeof motion.div>["transition"];
30
+
31
+ export interface FeaturesProps {
32
+ /**
33
+ * Optional id to attach to the root section element.
34
+ * @defaultValue "features"
35
+ */
36
+ id?: string;
37
+
38
+ /** Main section heading text */
39
+ sectionHeading?: string;
40
+ /** Subheading text displayed below the main heading */
41
+ sectionSubheading?: string;
42
+
43
+ /** Array of feature card data objects */
44
+ featuresData?: FeatureCardData[];
45
+
46
+ /** Optional top-level class to override the section root */
47
+ className?: string;
48
+
49
+ /** Styling configuration objects (slots) */
50
+ section?: { className?: string };
51
+ container?: { className?: string };
52
+ header?: { className?: string };
53
+ heading?: { className?: string };
54
+ subheading?: { className?: string };
55
+ grid?: { className?: string };
56
+ /** Wrapper around each FeatureCard (the animated container) */
57
+ cardWrapper?: { className?: string };
58
+ /** Styles passed down to FeatureCard slots */
59
+ card?: { className?: string };
60
+ image?: { className?: string };
61
+ cardHeading?: { className?: string };
62
+ cardSubheading?: { className?: string };
63
+
64
+ /** When false, disables entrance animations and hover transitions. */
65
+ enableMotion?: boolean;
66
+
67
+ /** Motion configuration for the feature items */
68
+ motionConfig?: {
69
+ initial?: { opacity?: number; y?: number };
70
+ whileInView?: { opacity?: number; y?: number };
71
+ viewport?: { once?: boolean; amount?: number };
72
+ transition?: MotionTransition;
73
+ };
74
+
75
+ /** ARIA label for the features section */
76
+ ariaLabel?: string;
77
+ }
78
+
79
+ const defaultFeaturesData: FeatureCardData[] = [
80
+ {
81
+ imageSrc: "/feature_1.png",
82
+ imageAlt: "Advanced Analytics Dashboard",
83
+ headingText: "Advanced Analytics",
84
+ subheadingText:
85
+ "Get deep insights into your business performance with our comprehensive analytics dashboard that tracks key metrics and provides actionable recommendations.",
86
+ },
87
+ {
88
+ imageSrc: "/feature_2.png",
89
+ imageAlt: "Real-time Collaboration Tools",
90
+ headingText: "Real-time Collaboration",
91
+ subheadingText:
92
+ "Work seamlessly with your team using our real-time collaboration tools that keep everyone in sync and boost productivity across all projects.",
93
+ },
94
+ {
95
+ imageSrc: "/feature_3.png",
96
+ imageAlt: "Secure Data Management",
97
+ headingText: "Secure Data Management",
98
+ subheadingText:
99
+ "Protect your sensitive information with enterprise-grade security features including encryption, access controls, and compliance monitoring.",
100
+ },
101
+ {
102
+ imageSrc: "/feature_4.png",
103
+ imageAlt: "Mobile-First Design",
104
+ headingText: "Mobile-First Design",
105
+ subheadingText:
106
+ "Access your data and manage your workflow from anywhere with our responsive, mobile-optimized interface that works perfectly on all devices.",
107
+ },
108
+ ];
109
+
110
+ /**
111
+ * Responsive Features section that renders a heading, optional subheading,
112
+ * and a grid of FeatureCard items with configurable entrance animations.
113
+ *
114
+ * @remarks
115
+ * - Styling: slot-style className overrides are merged after defaults via cn().
116
+ * - Motion: Controlled by enableMotion and motionConfig; animations are reduced
117
+ * or disabled when users prefer reduced motion.
118
+ * - Accessibility: Uses a semantic <section> with an aria-label.
119
+ *
120
+ * @example
121
+ * <Features
122
+ * sectionHeading="Key Features"
123
+ * featuresData={[{ imageSrc: "/a.png", imageAlt: "", headingText: "Fast", subheadingText: "Blazing" }]}
124
+ * />
125
+ */
126
+ export function Features({
127
+ id = "features",
128
+ sectionHeading = "Key Features",
129
+ sectionSubheading = "Discover what makes our platform unique and powerful",
130
+ featuresData = defaultFeaturesData,
131
+
132
+ className,
133
+
134
+ section = { className: "py-16 md:py-20 lg:py-24 bg-background" },
135
+ container = { className: "max-w-7xl mx-auto px-4 md:px-6 lg:px-8" },
136
+ header = { className: "text-center mb-12 md:mb-16" },
137
+ heading = {
138
+ className:
139
+ "text-3xl md:text-4xl lg:text-5xl font-bold text-foreground mb-4",
140
+ },
141
+ subheading = {
142
+ className:
143
+ "text-lg md:text-xl text-muted-foreground max-w-3xl mx-auto leading-relaxed",
144
+ },
145
+ grid = {
146
+ className:
147
+ "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-4 gap-6 md:gap-8",
148
+ },
149
+ cardWrapper = {
150
+ className: "motion-reduce:transform-none motion-reduce:transition-none",
151
+ },
152
+ card = {
153
+ className:
154
+ "h-full bg-card border border-border rounded-lg shadow-md transition-all duration-200 hover:-translate-y-1 hover:shadow-lg overflow-hidden motion-reduce:transition-none motion-reduce:transform-none",
155
+ },
156
+ image = {
157
+ className:
158
+ "w-full h-48 md:h-56 object-cover transition-none hover:!scale-100 group-hover:!scale-100 [transform:none]",
159
+ },
160
+ cardHeading = {
161
+ className:
162
+ "text-xl md:text-2xl font-semibold text-card-foreground mb-3 leading-tight",
163
+ },
164
+ cardSubheading = {
165
+ className: "text-sm md:text-base text-muted-foreground leading-relaxed",
166
+ },
167
+
168
+ enableMotion = true,
169
+ motionConfig = {
170
+ initial: { opacity: 0, y: 12 },
171
+ whileInView: { opacity: 1, y: 0 },
172
+ viewport: { once: true, amount: 0.2 },
173
+ transition: {
174
+ type: "tween",
175
+ stiffness: 0,
176
+ damping: 50,
177
+ mass: 1,
178
+ delay: 0.15,
179
+ },
180
+ },
181
+ ariaLabel = "Features section",
182
+ }: FeaturesProps) {
183
+ return (
184
+ <section
185
+ id={id}
186
+ className={cn(section.className, className)}
187
+ aria-label={ariaLabel}
188
+ >
189
+ <div className={cn(container.className)}>
190
+ <div className={cn(header.className)}>
191
+ <h2 className={cn(heading.className)}>{sectionHeading}</h2>
192
+ {sectionSubheading && (
193
+ <p className={cn(subheading.className)}>{sectionSubheading}</p>
194
+ )}
195
+ </div>
196
+
197
+ <div className={cn(grid.className)}>
198
+ {featuresData.map((feature, index) => {
199
+ const mConfig: NonNullable<FeaturesProps["motionConfig"]> =
200
+ enableMotion
201
+ ? (motionConfig as NonNullable<FeaturesProps["motionConfig"]>)
202
+ : {
203
+ initial: { opacity: 1, y: 0 },
204
+ whileInView: { opacity: 1, y: 0 },
205
+ viewport: { once: true, amount: 0 },
206
+ transition: {
207
+ type: "tween",
208
+ duration: 0,
209
+ } as const satisfies MotionTransition,
210
+ };
211
+
212
+ // Ensure we always spread a defined object into transition
213
+ const baseTransition: MotionTransition =
214
+ mConfig.transition ??
215
+ ({
216
+ type: "tween",
217
+ duration: 0,
218
+ } as const);
219
+
220
+ const noMotionCard =
221
+ "transition-none hover:!translate-y-0 hover:shadow-none motion-reduce:transition-none motion-reduce:transform-none";
222
+ const noMotionImage =
223
+ "transition-none hover:!scale-100 transform-none motion-reduce:transform-none group-hover:!scale-100";
224
+
225
+ return (
226
+ <motion.div
227
+ key={index}
228
+ initial={mConfig.initial}
229
+ whileInView={mConfig.whileInView}
230
+ viewport={mConfig.viewport}
231
+ transition={{
232
+ ...baseTransition,
233
+ // Stagger based on index while preserving provided delay if any
234
+ delay:
235
+ (mConfig.transition?.delay ?? 0.15) +
236
+ index * (enableMotion ? 0.06 : 0),
237
+ }}
238
+ className={cn(cardWrapper.className)}
239
+ >
240
+ <FeatureCard
241
+ cardImageSrc={feature.imageSrc}
242
+ cardImageAlt={feature.imageAlt}
243
+ cardHeadingText={feature.headingText}
244
+ cardSubheadingText={feature.subheadingText}
245
+ card={{
246
+ className: cn(
247
+ card.className,
248
+ !enableMotion && noMotionCard,
249
+ ),
250
+ }}
251
+ image={{
252
+ className: cn(
253
+ image.className,
254
+ !enableMotion && noMotionImage,
255
+ ),
256
+ }}
257
+ heading={{ className: cn(cardHeading.className) }}
258
+ subheading={{ className: cn(cardSubheading.className) }}
259
+ className={cn("h-full")}
260
+ />
261
+ </motion.div>
262
+ );
263
+ })}
264
+ </div>
265
+ </div>
266
+ </section>
267
+ );
268
+ }