nextworks 0.2.0-alpha.2 → 0.2.0-alpha.21

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 (145) hide show
  1. package/README.md +280 -228
  2. package/dist/cli_manifests/blocks_manifest.json +193 -194
  3. package/dist/commands/blocks.d.ts +3 -0
  4. package/dist/commands/blocks.d.ts.map +1 -1
  5. package/dist/commands/blocks.js +128 -19
  6. package/dist/commands/blocks.js.map +1 -1
  7. package/dist/commands/doctor.d.ts +136 -0
  8. package/dist/commands/doctor.d.ts.map +1 -0
  9. package/dist/commands/doctor.js +696 -0
  10. package/dist/commands/doctor.js.map +1 -0
  11. package/dist/commands/remove-blocks.d.ts +4 -1
  12. package/dist/commands/remove-blocks.d.ts.map +1 -1
  13. package/dist/commands/remove-blocks.js +24 -6
  14. package/dist/commands/remove-blocks.js.map +1 -1
  15. package/dist/index.js +125 -4
  16. package/dist/index.js.map +1 -1
  17. package/dist/kits/blocks/.nextworks/docs/BLOCKS_QUICKSTART.md +104 -194
  18. package/dist/kits/blocks/.nextworks/docs/BLOCKS_README.md +115 -75
  19. package/dist/kits/blocks/.nextworks/docs/THEME_GUIDE.md +269 -251
  20. package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -80
  21. package/dist/kits/blocks/app/templates/digitalagency/README.md +42 -36
  22. package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +71 -99
  23. package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +40 -74
  24. package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +123 -227
  25. package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -89
  26. package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +83 -90
  27. package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +121 -168
  28. package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +288 -297
  29. package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -157
  30. package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -114
  31. package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -59
  32. package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -55
  33. package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -28
  34. package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -65
  35. package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -38
  36. package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +130 -85
  37. package/dist/kits/blocks/app/templates/gallery/page.tsx +357 -303
  38. package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +75 -74
  39. package/dist/kits/blocks/app/templates/productlaunch/README.md +62 -55
  40. package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +84 -178
  41. package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +50 -93
  42. package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -231
  43. package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +86 -93
  44. package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +83 -84
  45. package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -132
  46. package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +88 -89
  47. package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +116 -162
  48. package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -106
  49. package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -110
  50. package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -68
  51. package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -104
  52. package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +90 -89
  53. package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -76
  54. package/dist/kits/blocks/app/templates/productlaunch/page.tsx +43 -43
  55. package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -80
  56. package/dist/kits/blocks/app/templates/saasdashboard/README.md +44 -38
  57. package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +129 -176
  58. package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -293
  59. package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -55
  60. package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +90 -91
  61. package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -77
  62. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +104 -105
  63. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +126 -127
  64. package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +117 -159
  65. package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -90
  66. package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +96 -97
  67. package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -72
  68. package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -53
  69. package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -39
  70. package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -183
  71. package/dist/kits/blocks/components/providers/BlocksAppProviders.tsx +27 -27
  72. package/dist/kits/blocks/components/sections/About.tsx +291 -291
  73. package/dist/kits/blocks/components/sections/CTA.tsx +257 -258
  74. package/dist/kits/blocks/components/sections/CommandShowcase.tsx +517 -0
  75. package/dist/kits/blocks/components/sections/Contact.tsx +267 -267
  76. package/dist/kits/blocks/components/sections/FAQ.tsx +214 -225
  77. package/dist/kits/blocks/components/sections/FeaturedProjectShowcase.tsx +687 -0
  78. package/dist/kits/blocks/components/sections/Features.tsx +268 -270
  79. package/dist/kits/blocks/components/sections/Footer.tsx +302 -302
  80. package/dist/kits/blocks/components/sections/HeroMotion.tsx +308 -308
  81. package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -358
  82. package/dist/kits/blocks/components/sections/HeroProductDemo.tsx +246 -0
  83. package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -352
  84. package/dist/kits/blocks/components/sections/HeroWithVideo.tsx +495 -0
  85. package/dist/kits/blocks/components/sections/Navbar.tsx +352 -353
  86. package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +549 -550
  87. package/dist/kits/blocks/components/sections/Pricing.tsx +264 -264
  88. package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -325
  89. package/dist/kits/blocks/components/sections/ProjectDeepDive.tsx +805 -0
  90. package/dist/kits/blocks/components/sections/SelectedWorkRail.tsx +485 -0
  91. package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -210
  92. package/dist/kits/blocks/components/sections/Team.tsx +309 -309
  93. package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -158
  94. package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -162
  95. package/dist/kits/blocks/components/sections/product-demo/ApprovalInboxPanel.tsx +128 -0
  96. package/dist/kits/blocks/components/sections/product-demo/DemoStage.tsx +519 -0
  97. package/dist/kits/blocks/components/sections/product-demo/DemoWindow.tsx +140 -0
  98. package/dist/kits/blocks/components/sections/product-demo/KnowledgePanel.tsx +130 -0
  99. package/dist/kits/blocks/components/sections/product-demo/RunConsolePanel.tsx +430 -0
  100. package/dist/kits/blocks/components/sections/product-demo/TaskListPanel.tsx +302 -0
  101. package/dist/kits/blocks/components/sections/product-demo/WorkflowStudioPanel.tsx +744 -0
  102. package/dist/kits/blocks/components/sections/product-demo/types.ts +262 -0
  103. package/dist/kits/blocks/components/theme-provider.tsx +1 -34
  104. package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -134
  105. package/dist/kits/blocks/components/ui/brand-node.tsx +121 -121
  106. package/dist/kits/blocks/components/ui/button.tsx +122 -122
  107. package/dist/kits/blocks/components/ui/card.tsx +95 -95
  108. package/dist/kits/blocks/components/ui/checkbox.tsx +30 -30
  109. package/dist/kits/blocks/components/ui/cta-button.tsx +125 -125
  110. package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -201
  111. package/dist/kits/blocks/components/ui/feature-card.tsx +91 -91
  112. package/dist/kits/blocks/components/ui/input.tsx +27 -27
  113. package/dist/kits/blocks/components/ui/label.tsx +29 -29
  114. package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -120
  115. package/dist/kits/blocks/components/ui/select.tsx +25 -25
  116. package/dist/kits/blocks/components/ui/skeleton.tsx +13 -13
  117. package/dist/kits/blocks/components/ui/table.tsx +98 -98
  118. package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -108
  119. package/dist/kits/blocks/components/ui/textarea.tsx +26 -26
  120. package/dist/kits/blocks/components/ui/theme-selector.tsx +243 -247
  121. package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -74
  122. package/dist/kits/blocks/components/ui/toaster.tsx +7 -7
  123. package/dist/kits/blocks/lib/themes.ts +400 -400
  124. package/dist/kits/blocks/lib/utils.ts +6 -9
  125. package/dist/kits/blocks/package-deps.json +40 -28
  126. package/dist/kits/blocks/tsconfig.json +11 -0
  127. package/dist/kits/blocks/tsconfig.tsbuildinfo +1 -0
  128. package/dist/utils/file-operations.d.ts +3 -1
  129. package/dist/utils/file-operations.d.ts.map +1 -1
  130. package/dist/utils/file-operations.js +84 -12
  131. package/dist/utils/file-operations.js.map +1 -1
  132. package/dist/utils/installation-tracker.d.ts +2 -2
  133. package/dist/utils/installation-tracker.d.ts.map +1 -1
  134. package/dist/utils/installation-tracker.js +11 -11
  135. package/dist/utils/installation-tracker.js.map +1 -1
  136. package/dist/utils/package-manager.d.ts +6 -0
  137. package/dist/utils/package-manager.d.ts.map +1 -0
  138. package/dist/utils/package-manager.js +58 -0
  139. package/dist/utils/package-manager.js.map +1 -0
  140. package/dist/utils/yarn-pnp.d.ts +6 -0
  141. package/dist/utils/yarn-pnp.d.ts.map +1 -0
  142. package/dist/utils/yarn-pnp.js +39 -0
  143. package/dist/utils/yarn-pnp.js.map +1 -0
  144. package/package.json +5 -2
  145. package/dist/kits/blocks/notes/THEME_GUIDE.md +0 -29
@@ -1,258 +1,257 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import Link from "next/link";
5
- import { Button } from "@/components/ui/button";
6
- import { cn } from "@/lib/utils";
7
-
8
- /**
9
- * Props for the CTA section component.
10
- *
11
- * @remarks
12
- * Uses a slot-style API for Tailwind className overrides. Each slot's
13
- * className is merged with component defaults via cn().
14
- *
15
- * Prefer customizing spacing via headingText.className and other slot
16
- * classNames rather than legacy spacing props.
17
- *
18
- * @public
19
- */
20
- interface CTAProps {
21
- /**
22
- * Optional id for the section.
23
- * @defaultValue "cta"
24
- */
25
- id?: string;
26
- /** Optional top-level class to override the section root */
27
- className?: string;
28
-
29
- /** Styling configuration objects (slot-style pattern like Navbar) */
30
- section?: { className?: string };
31
- container?: { className?: string };
32
- contentWrapper?: { className?: string };
33
- headingText?: {
34
- text?: string;
35
- className?: string;
36
- };
37
- subheadingText?: {
38
- text?: string;
39
- className?: string;
40
- };
41
- descriptionText?: {
42
- text?: string;
43
- className?: string;
44
- };
45
- actionsWrapper?: { className?: string };
46
-
47
- /**
48
- * Primary CTA config or null to hide it (mirrors Navbar ctaButton pattern)
49
- * Example: { label: "Get Started", href: "#contact" }
50
- */
51
- ctaButton?: { label: string; href: string } | null;
52
- /** Primary CTA button styles */
53
- ctaButtonStyle?: {
54
- unstyled?: boolean;
55
- style?: React.CSSProperties;
56
- variant?:
57
- | "default"
58
- | "destructive"
59
- | "outline"
60
- | "secondary"
61
- | "ghost"
62
- | "link";
63
- size?: "default" | "sm" | "lg" | "icon";
64
- className?: string;
65
- };
66
- /** Optional wrapper slot for the primary CTA */
67
- ctaButtonWrapper?: { className?: string };
68
-
69
- /** Optional secondary action */
70
- secondaryButton?: { label: string; href: string } | null;
71
- /** Secondary CTA button styles */
72
- secondaryButtonStyle?: {
73
- unstyled?: boolean;
74
- style?: React.CSSProperties;
75
- variant?:
76
- | "default"
77
- | "destructive"
78
- | "outline"
79
- | "secondary"
80
- | "ghost"
81
- | "link";
82
- size?: "default" | "sm" | "lg" | "icon";
83
- className?: string;
84
- };
85
- /** Optional wrapper slot for the secondary CTA */
86
- secondaryButtonWrapper?: { className?: string };
87
-
88
- /**
89
- * Legacy spacing hook applied to the heading.
90
- * @deprecated Prefer margin utilities via headingText.className
91
- */
92
- spacing?: { topMargin?: string };
93
-
94
- /** Accessibility */
95
- ariaLabel?: string;
96
- role?: string;
97
- }
98
-
99
- /**
100
- * Call-to-Action section with a heading, optional subheading/description,
101
- * and up to two actions (primary and secondary).
102
- *
103
- * @remarks
104
- * - Styling: exposes slot-style className overrides (section, container,
105
- * contentWrapper, headingText, subheadingText, descriptionText, actionsWrapper,
106
- * ctaButtonStyle, secondaryButtonStyle). Consumer classes are merged after
107
- * defaults via cn().
108
- * - Accessibility: rendered as a semantic <section> with aria-label. The role
109
- * defaults to "region" but can be customized with the role prop.
110
- * - Motion: subtle hover lift effects on buttons are included by default.
111
- *
112
- * @example
113
- * <CTA
114
- * headingText={{ text: "Join The Launch Today!" }}
115
- * descriptionText={{ text: "Start your free trial in minutes." }}
116
- * ctaButton={{ label: "Sign Up", href: "#contact" }}
117
- * secondaryButton={{ label: "Learn More", href: "#features" }}
118
- * />
119
- */
120
- export function CTA({
121
- id = "cta",
122
- className,
123
-
124
- section = {
125
- className: "bg-background text-foreground",
126
- },
127
- container = {
128
- className:
129
- "mx-auto flex min-h-[42vh] w-full max-w-6xl flex-col items-center justify-center overflow-hidden px-4 pb-7",
130
- },
131
- contentWrapper = {
132
- className: "flex w-full flex-col items-center text-center",
133
- },
134
- headingText = {
135
- text: "Join The Launch Today!",
136
- className:
137
- "text-3xl font-bold leading-[1.1] text-primary sm:text-4xl md:text-5xl text-[var(--heading-fg)]",
138
- },
139
- subheadingText = {
140
- text: "",
141
- className:
142
- "mt-2 text-lg font-medium text-muted-foreground sm:text-xl text-[var(--subheading-fg)]",
143
- },
144
- descriptionText = {
145
- text: "",
146
- className:
147
- "mt-3 max-w-2xl text-base text-foreground/80 sm:text-lg text-[var(--description-fg)]",
148
- },
149
- actionsWrapper = {
150
- className: "mt-6 flex flex-col items-center gap-3 sm:flex-row",
151
- },
152
-
153
- ctaButton = { label: "Sign Up Now", href: "#contact" },
154
- ctaButtonStyle = {
155
- variant: "default",
156
- size: "default",
157
- className:
158
- "shadow-lg transition-all duration-200 hover:-translate-y-0.5 hover:shadow-xl border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
159
- },
160
- ctaButtonWrapper = { className: "" },
161
-
162
- secondaryButton = null,
163
- secondaryButtonStyle = {
164
- variant: "outline",
165
- size: "default",
166
- className:
167
- "transition-transform duration-200 hover:-translate-y-0.5 border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
168
- },
169
- secondaryButtonWrapper = { className: "" },
170
-
171
- spacing = { topMargin: "mt-0 sm:mt-12" },
172
- // spacing = { topMargin: "mt-[17vh]" },
173
-
174
- ariaLabel = "Call to action section",
175
- role = "region",
176
- }: CTAProps) {
177
- // default class for actions wrapper (keeps a gap and responsive row layout)
178
- const actionsWrapperDefault =
179
- "mt-6 flex flex-col items-center gap-3 sm:flex-row";
180
-
181
- return (
182
- <section
183
- id={id}
184
- role={role}
185
- aria-label={ariaLabel}
186
- className={cn("w-full", section.className, className)}
187
- >
188
- <div className={cn(container.className)}>
189
- <div className={cn(contentWrapper.className)}>
190
- {headingText?.text ? (
191
- <h2
192
- className={cn(
193
- "text-center",
194
- spacing?.topMargin,
195
- headingText.className,
196
- )}
197
- >
198
- {headingText.text}
199
- </h2>
200
- ) : null}
201
-
202
- {subheadingText?.text ? (
203
- <p className={cn(subheadingText.className)}>
204
- {subheadingText.text}
205
- </p>
206
- ) : null}
207
-
208
- {descriptionText?.text ? (
209
- <p className={cn(descriptionText.className)}>
210
- {descriptionText.text}
211
- </p>
212
- ) : null}
213
-
214
- <div className={cn(actionsWrapperDefault, actionsWrapper.className)}>
215
- {ctaButton && (
216
- <Button
217
- asChild
218
- unstyled={ctaButtonStyle.unstyled}
219
- variant={ctaButtonStyle.variant}
220
- size={ctaButtonStyle.size}
221
- className={cn(
222
- ctaButtonWrapper.className,
223
- ctaButtonStyle.className,
224
- )}
225
- style={ctaButtonStyle.style}
226
- >
227
- <Link href={ctaButton.href} aria-label={ctaButton.label}>
228
- {ctaButton.label}
229
- </Link>
230
- </Button>
231
- )}
232
-
233
- {secondaryButton && (
234
- <Button
235
- asChild
236
- unstyled={secondaryButtonStyle.unstyled}
237
- variant={secondaryButtonStyle.variant}
238
- size={secondaryButtonStyle.size}
239
- className={cn(
240
- secondaryButtonWrapper.className,
241
- secondaryButtonStyle.className,
242
- )}
243
- style={secondaryButtonStyle.style}
244
- >
245
- <Link
246
- href={secondaryButton.href}
247
- aria-label={secondaryButton.label}
248
- >
249
- {secondaryButton.label}
250
- </Link>
251
- </Button>
252
- )}
253
- </div>
254
- </div>
255
- </div>
256
- </section>
257
- );
258
- }
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Link from "next/link";
5
+ import { Button } from "@/components/ui/button";
6
+ import { cn } from "@/lib/utils";
7
+
8
+ /**
9
+ * Props for the CTA section component.
10
+ *
11
+ * @remarks
12
+ * Uses a slot-style API for Tailwind className overrides. Each slot's
13
+ * className is merged with component defaults via cn().
14
+ *
15
+ * Prefer customizing spacing via headingText.className and other slot
16
+ * classNames rather than legacy spacing props.
17
+ *
18
+ * @public
19
+ */
20
+ interface CTAProps {
21
+ /**
22
+ * Optional id for the section.
23
+ * @defaultValue "cta"
24
+ */
25
+ id?: string;
26
+ /** Optional top-level class to override the section root */
27
+ className?: string;
28
+
29
+ /** Styling configuration objects (slot-style pattern like Navbar) */
30
+ section?: { className?: string };
31
+ container?: { className?: string };
32
+ contentWrapper?: { className?: string };
33
+ headingText?: {
34
+ text?: string;
35
+ className?: string;
36
+ };
37
+ subheadingText?: {
38
+ text?: string;
39
+ className?: string;
40
+ };
41
+ descriptionText?: {
42
+ text?: string;
43
+ className?: string;
44
+ };
45
+ actionsWrapper?: { className?: string };
46
+
47
+ /**
48
+ * Primary CTA config or null to hide it (mirrors Navbar ctaButton pattern)
49
+ * Example: { label: "Get Started", href: "#contact" }
50
+ */
51
+ ctaButton?: { label: string; href: string } | null;
52
+ /** Primary CTA button styles */
53
+ ctaButtonStyle?: {
54
+ unstyled?: boolean;
55
+ style?: React.CSSProperties;
56
+ variant?:
57
+ | "default"
58
+ | "destructive"
59
+ | "outline"
60
+ | "secondary"
61
+ | "ghost"
62
+ | "link";
63
+ size?: "default" | "sm" | "lg" | "icon";
64
+ className?: string;
65
+ };
66
+ /** Optional wrapper slot for the primary CTA */
67
+ ctaButtonWrapper?: { className?: string };
68
+
69
+ /** Optional secondary action */
70
+ secondaryButton?: { label: string; href: string } | null;
71
+ /** Secondary CTA button styles */
72
+ secondaryButtonStyle?: {
73
+ unstyled?: boolean;
74
+ style?: React.CSSProperties;
75
+ variant?:
76
+ | "default"
77
+ | "destructive"
78
+ | "outline"
79
+ | "secondary"
80
+ | "ghost"
81
+ | "link";
82
+ size?: "default" | "sm" | "lg" | "icon";
83
+ className?: string;
84
+ };
85
+ /** Optional wrapper slot for the secondary CTA */
86
+ secondaryButtonWrapper?: { className?: string };
87
+
88
+ /**
89
+ * Legacy spacing hook applied to the heading.
90
+ * @deprecated Prefer margin utilities via headingText.className
91
+ */
92
+ spacing?: { topMargin?: string };
93
+
94
+ /** Accessibility */
95
+ ariaLabel?: string;
96
+ role?: string;
97
+ }
98
+
99
+ /**
100
+ * Call-to-Action section with a heading, optional subheading/description,
101
+ * and up to two actions (primary and secondary).
102
+ *
103
+ * @remarks
104
+ * - Styling: exposes slot-style className overrides (section, container,
105
+ * contentWrapper, headingText, subheadingText, descriptionText, actionsWrapper,
106
+ * ctaButtonStyle, secondaryButtonStyle). Consumer classes are merged after
107
+ * defaults via cn().
108
+ * - Accessibility: rendered as a semantic <section> with aria-label. The role
109
+ * defaults to "region" but can be customized with the role prop.
110
+ * - Motion: subtle hover lift effects on buttons are included by default.
111
+ *
112
+ * @example
113
+ * <CTA
114
+ * headingText={{ text: "Join The Launch Today!" }}
115
+ * descriptionText={{ text: "Start your free trial in minutes." }}
116
+ * ctaButton={{ label: "Sign Up", href: "#contact" }}
117
+ * secondaryButton={{ label: "Learn More", href: "#features" }}
118
+ * />
119
+ */
120
+ export function CTA({
121
+ id = "cta",
122
+ className,
123
+
124
+ section = {
125
+ className: "bg-background text-foreground",
126
+ },
127
+ container = {
128
+ className:
129
+ "mx-auto flex min-h-[42vh] w-full max-w-6xl flex-col items-center justify-center overflow-hidden px-4 pb-7",
130
+ },
131
+ contentWrapper = {
132
+ className: "flex w-full flex-col items-center text-center",
133
+ },
134
+ headingText = {
135
+ text: "Join The Launch Today!",
136
+ className:
137
+ "text-3xl font-bold leading-[1.1] text-primary sm:text-4xl md:text-5xl text-[var(--heading-fg)]",
138
+ },
139
+ subheadingText = {
140
+ text: "",
141
+ className:
142
+ "mt-2 text-lg font-medium text-muted-foreground sm:text-xl text-[var(--subheading-fg)]",
143
+ },
144
+ descriptionText = {
145
+ text: "",
146
+ className:
147
+ "mt-3 max-w-2xl text-base text-foreground/80 sm:text-lg text-[var(--description-fg)]",
148
+ },
149
+ actionsWrapper = {
150
+ className: "mt-6 flex flex-col items-center gap-3 sm:flex-row",
151
+ },
152
+
153
+ ctaButton = { label: "Sign Up Now", href: "#contact" },
154
+ ctaButtonStyle = {
155
+ variant: "default",
156
+ size: "default",
157
+ className:
158
+ "shadow-lg transition-all duration-200 hover:-translate-y-0.5 hover:shadow-xl border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
159
+ },
160
+ ctaButtonWrapper = { className: "" },
161
+
162
+ secondaryButton = null,
163
+ secondaryButtonStyle = {
164
+ variant: "outline",
165
+ size: "default",
166
+ className:
167
+ "transition-transform duration-200 hover:-translate-y-0.5 border-[var(--btn-border)] focus-visible:ring-[var(--btn-ring)]",
168
+ },
169
+ secondaryButtonWrapper = { className: "" },
170
+
171
+ spacing = { topMargin: "mt-0 sm:mt-12" },
172
+
173
+ ariaLabel = "Call to action section",
174
+ role = "region",
175
+ }: CTAProps) {
176
+ // default class for actions wrapper (keeps a gap and responsive row layout)
177
+ const actionsWrapperDefault =
178
+ "mt-6 flex flex-col items-center gap-3 sm:flex-row";
179
+
180
+ return (
181
+ <section
182
+ id={id}
183
+ role={role}
184
+ aria-label={ariaLabel}
185
+ className={cn("w-full", section.className, className)}
186
+ >
187
+ <div className={cn(container.className)}>
188
+ <div className={cn(contentWrapper.className)}>
189
+ {headingText?.text ? (
190
+ <h2
191
+ className={cn(
192
+ "text-center",
193
+ spacing?.topMargin,
194
+ headingText.className,
195
+ )}
196
+ >
197
+ {headingText.text}
198
+ </h2>
199
+ ) : null}
200
+
201
+ {subheadingText?.text ? (
202
+ <p className={cn(subheadingText.className)}>
203
+ {subheadingText.text}
204
+ </p>
205
+ ) : null}
206
+
207
+ {descriptionText?.text ? (
208
+ <p className={cn(descriptionText.className)}>
209
+ {descriptionText.text}
210
+ </p>
211
+ ) : null}
212
+
213
+ <div className={cn(actionsWrapperDefault, actionsWrapper.className)}>
214
+ {ctaButton && (
215
+ <Button
216
+ asChild
217
+ unstyled={ctaButtonStyle.unstyled}
218
+ variant={ctaButtonStyle.variant}
219
+ size={ctaButtonStyle.size}
220
+ className={cn(
221
+ ctaButtonWrapper.className,
222
+ ctaButtonStyle.className,
223
+ )}
224
+ style={ctaButtonStyle.style}
225
+ >
226
+ <Link href={ctaButton.href} aria-label={ctaButton.label}>
227
+ {ctaButton.label}
228
+ </Link>
229
+ </Button>
230
+ )}
231
+
232
+ {secondaryButton && (
233
+ <Button
234
+ asChild
235
+ unstyled={secondaryButtonStyle.unstyled}
236
+ variant={secondaryButtonStyle.variant}
237
+ size={secondaryButtonStyle.size}
238
+ className={cn(
239
+ secondaryButtonWrapper.className,
240
+ secondaryButtonStyle.className,
241
+ )}
242
+ style={secondaryButtonStyle.style}
243
+ >
244
+ <Link
245
+ href={secondaryButton.href}
246
+ aria-label={secondaryButton.label}
247
+ >
248
+ {secondaryButton.label}
249
+ </Link>
250
+ </Button>
251
+ )}
252
+ </div>
253
+ </div>
254
+ </div>
255
+ </section>
256
+ );
257
+ }