nextworks 0.0.1 → 0.1.0-alpha.1

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 (277) hide show
  1. package/README.md +209 -30
  2. package/dist/.gitkeep +0 -0
  3. package/dist/cli_manifests/auth_manifest.json +86 -0
  4. package/dist/cli_manifests/blocks_manifest.json +185 -0
  5. package/dist/cli_manifests/data_manifest.json +51 -0
  6. package/dist/cli_manifests/forms_manifest.json +61 -0
  7. package/dist/commands/admin-posts.d.ts +2 -0
  8. package/dist/commands/admin-posts.d.ts.map +1 -0
  9. package/dist/commands/admin-posts.js +15 -0
  10. package/dist/commands/admin-posts.js.map +1 -0
  11. package/dist/commands/admin-users.d.ts +2 -0
  12. package/dist/commands/admin-users.d.ts.map +1 -0
  13. package/dist/commands/admin-users.js +15 -0
  14. package/dist/commands/admin-users.js.map +1 -0
  15. package/dist/commands/auth-core.d.ts +2 -0
  16. package/dist/commands/auth-core.d.ts.map +1 -0
  17. package/dist/commands/auth-core.js +83 -0
  18. package/dist/commands/auth-core.js.map +1 -0
  19. package/dist/commands/auth-forms.d.ts +2 -0
  20. package/dist/commands/auth-forms.d.ts.map +1 -0
  21. package/dist/commands/auth-forms.js +15 -0
  22. package/dist/commands/auth-forms.js.map +1 -0
  23. package/dist/commands/blocks-options.d.ts +7 -0
  24. package/dist/commands/blocks-options.d.ts.map +1 -0
  25. package/dist/commands/blocks-options.js +19 -0
  26. package/dist/commands/blocks-options.js.map +1 -0
  27. package/dist/commands/blocks.d.ts +7 -0
  28. package/dist/commands/blocks.d.ts.map +1 -0
  29. package/dist/commands/blocks.js +145 -0
  30. package/dist/commands/blocks.js.map +1 -0
  31. package/dist/commands/data.d.ts +3 -0
  32. package/dist/commands/data.d.ts.map +1 -0
  33. package/dist/commands/data.js +88 -0
  34. package/dist/commands/data.js.map +1 -0
  35. package/dist/commands/forms.d.ts +6 -0
  36. package/dist/commands/forms.d.ts.map +1 -0
  37. package/dist/commands/forms.js +107 -0
  38. package/dist/commands/forms.js.map +1 -0
  39. package/dist/commands/remove-auth-core.d.ts +2 -0
  40. package/dist/commands/remove-auth-core.d.ts.map +1 -0
  41. package/dist/commands/remove-auth-core.js +69 -0
  42. package/dist/commands/remove-auth-core.js.map +1 -0
  43. package/dist/commands/remove-blocks.d.ts +2 -0
  44. package/dist/commands/remove-blocks.d.ts.map +1 -0
  45. package/dist/commands/remove-blocks.js +36 -0
  46. package/dist/commands/remove-blocks.js.map +1 -0
  47. package/dist/index.d.ts +3 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/index.js +109 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/kits/auth-core/README.md +106 -0
  52. package/dist/kits/auth-core/app/(protected)/dashboard/page.tsx +8 -0
  53. package/dist/kits/auth-core/app/(protected)/layout.tsx +18 -0
  54. package/dist/kits/auth-core/app/(protected)/settings/profile/page.tsx +15 -0
  55. package/dist/kits/auth-core/app/(protected)/settings/profile/profile-form.tsx +114 -0
  56. package/dist/kits/auth-core/app/api/auth/[...nextauth]/route.ts +1 -0
  57. package/dist/kits/auth-core/app/api/auth/forgot-password/route.ts +114 -0
  58. package/dist/kits/auth-core/app/api/auth/providers/route.ts +6 -0
  59. package/dist/kits/auth-core/app/api/auth/reset-password/route.ts +63 -0
  60. package/dist/kits/auth-core/app/api/auth/send-verify-email/route.ts +6 -0
  61. package/dist/kits/auth-core/app/api/signup/route.ts +41 -0
  62. package/dist/kits/auth-core/app/auth/forgot-password/page.tsx +21 -0
  63. package/dist/kits/auth-core/app/auth/login/page.tsx +5 -0
  64. package/dist/kits/auth-core/app/auth/reset-password/page.tsx +187 -0
  65. package/dist/kits/auth-core/app/auth/signup/page.tsx +5 -0
  66. package/dist/kits/auth-core/app/auth/verify-email/page.tsx +11 -0
  67. package/dist/kits/auth-core/components/admin/admin-header.tsx +57 -0
  68. package/dist/kits/auth-core/components/auth/dashboard.tsx +237 -0
  69. package/dist/kits/auth-core/components/auth/forgot-password-form.tsx +90 -0
  70. package/dist/kits/auth-core/components/auth/login-form.tsx +467 -0
  71. package/dist/kits/auth-core/components/auth/logout-button.tsx +50 -0
  72. package/dist/kits/auth-core/components/auth/minimal-logout-button.tsx +40 -0
  73. package/dist/kits/auth-core/components/auth/signup-form.tsx +468 -0
  74. package/dist/kits/auth-core/components/require-auth.tsx +59 -0
  75. package/dist/kits/auth-core/components/session-provider.tsx +11 -0
  76. package/dist/kits/auth-core/components/ui/README.txt +1 -0
  77. package/dist/kits/auth-core/components/ui/button.tsx +55 -0
  78. package/dist/kits/auth-core/components/ui/input.tsx +25 -0
  79. package/dist/kits/auth-core/components/ui/label.tsx +23 -0
  80. package/dist/kits/auth-core/lib/api/errors.ts +14 -0
  81. package/dist/kits/auth-core/lib/auth-helpers.ts +29 -0
  82. package/dist/kits/auth-core/lib/auth.ts +142 -0
  83. package/dist/kits/auth-core/lib/email/dev-transport.ts +42 -0
  84. package/dist/kits/auth-core/lib/email/index.ts +28 -0
  85. package/dist/kits/auth-core/lib/email/provider-smtp.ts +36 -0
  86. package/dist/kits/auth-core/lib/forms/map-errors.ts +11 -0
  87. package/dist/kits/auth-core/lib/hash.ts +6 -0
  88. package/dist/kits/auth-core/lib/prisma.ts +15 -0
  89. package/dist/kits/auth-core/lib/server/result.ts +45 -0
  90. package/dist/kits/auth-core/lib/utils.ts +6 -0
  91. package/dist/kits/auth-core/lib/validation/forms.ts +88 -0
  92. package/dist/kits/auth-core/package-deps.json +19 -0
  93. package/dist/kits/auth-core/prisma/auth-models.prisma +81 -0
  94. package/dist/kits/auth-core/prisma/schema.prisma +81 -0
  95. package/dist/kits/auth-core/scripts/populate-tokenhash.mjs +26 -0
  96. package/dist/kits/auth-core/scripts/promote-admin.mjs +33 -0
  97. package/dist/kits/auth-core/scripts/seed-demo.mjs +40 -0
  98. package/dist/kits/auth-core/types/next-auth.d.ts +25 -0
  99. package/dist/kits/blocks/README.md +53 -0
  100. package/dist/kits/blocks/app/globals.css +175 -0
  101. package/dist/kits/blocks/app/templates/digitalagency/PresetThemeVars.tsx +80 -0
  102. package/dist/kits/blocks/app/templates/digitalagency/README.md +36 -0
  103. package/dist/kits/blocks/app/templates/digitalagency/components/About.tsx +99 -0
  104. package/dist/kits/blocks/app/templates/digitalagency/components/CTA.tsx +74 -0
  105. package/dist/kits/blocks/app/templates/digitalagency/components/Contact.tsx +227 -0
  106. package/dist/kits/blocks/app/templates/digitalagency/components/Footer.tsx +89 -0
  107. package/dist/kits/blocks/app/templates/digitalagency/components/Hero.tsx +90 -0
  108. package/dist/kits/blocks/app/templates/digitalagency/components/Navbar.tsx +168 -0
  109. package/dist/kits/blocks/app/templates/digitalagency/components/NetworkPattern.tsx +297 -0
  110. package/dist/kits/blocks/app/templates/digitalagency/components/Portfolio.tsx +157 -0
  111. package/dist/kits/blocks/app/templates/digitalagency/components/Pricing.tsx +114 -0
  112. package/dist/kits/blocks/app/templates/digitalagency/components/Process.tsx +59 -0
  113. package/dist/kits/blocks/app/templates/digitalagency/components/Services.tsx +55 -0
  114. package/dist/kits/blocks/app/templates/digitalagency/components/Team.tsx +28 -0
  115. package/dist/kits/blocks/app/templates/digitalagency/components/Testimonials.tsx +65 -0
  116. package/dist/kits/blocks/app/templates/digitalagency/page.tsx +38 -0
  117. package/dist/kits/blocks/app/templates/gallery/PresetThemeVars.tsx +85 -0
  118. package/dist/kits/blocks/app/templates/gallery/page.tsx +303 -0
  119. package/dist/kits/blocks/app/templates/productlaunch/PresetThemeVars.tsx +74 -0
  120. package/dist/kits/blocks/app/templates/productlaunch/README.md +55 -0
  121. package/dist/kits/blocks/app/templates/productlaunch/components/About.tsx +178 -0
  122. package/dist/kits/blocks/app/templates/productlaunch/components/CTA.tsx +93 -0
  123. package/dist/kits/blocks/app/templates/productlaunch/components/Contact.tsx +231 -0
  124. package/dist/kits/blocks/app/templates/productlaunch/components/FAQ.tsx +93 -0
  125. package/dist/kits/blocks/app/templates/productlaunch/components/Features.tsx +84 -0
  126. package/dist/kits/blocks/app/templates/productlaunch/components/Footer.tsx +132 -0
  127. package/dist/kits/blocks/app/templates/productlaunch/components/Hero.tsx +89 -0
  128. package/dist/kits/blocks/app/templates/productlaunch/components/Navbar.tsx +162 -0
  129. package/dist/kits/blocks/app/templates/productlaunch/components/Pricing.tsx +106 -0
  130. package/dist/kits/blocks/app/templates/productlaunch/components/ProcessTimeline.tsx +110 -0
  131. package/dist/kits/blocks/app/templates/productlaunch/components/ServicesGrid.tsx +68 -0
  132. package/dist/kits/blocks/app/templates/productlaunch/components/Team.tsx +104 -0
  133. package/dist/kits/blocks/app/templates/productlaunch/components/Testimonials.tsx +89 -0
  134. package/dist/kits/blocks/app/templates/productlaunch/components/TrustBadges.tsx +76 -0
  135. package/dist/kits/blocks/app/templates/productlaunch/page.tsx +45 -0
  136. package/dist/kits/blocks/app/templates/saasdashboard/PresetThemeVars.tsx +80 -0
  137. package/dist/kits/blocks/app/templates/saasdashboard/README.md +38 -0
  138. package/dist/kits/blocks/app/templates/saasdashboard/components/Contact.tsx +176 -0
  139. package/dist/kits/blocks/app/templates/saasdashboard/components/Dashboard.tsx +293 -0
  140. package/dist/kits/blocks/app/templates/saasdashboard/components/FAQ.tsx +55 -0
  141. package/dist/kits/blocks/app/templates/saasdashboard/components/Features.tsx +91 -0
  142. package/dist/kits/blocks/app/templates/saasdashboard/components/Footer.tsx +77 -0
  143. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero.tsx +105 -0
  144. package/dist/kits/blocks/app/templates/saasdashboard/components/Hero_mask.tsx +127 -0
  145. package/dist/kits/blocks/app/templates/saasdashboard/components/Navbar.tsx +159 -0
  146. package/dist/kits/blocks/app/templates/saasdashboard/components/Pricing.tsx +90 -0
  147. package/dist/kits/blocks/app/templates/saasdashboard/components/SmoothScroll.tsx +97 -0
  148. package/dist/kits/blocks/app/templates/saasdashboard/components/Testimonials.tsx +72 -0
  149. package/dist/kits/blocks/app/templates/saasdashboard/components/TrustBadges.tsx +53 -0
  150. package/dist/kits/blocks/app/templates/saasdashboard/page.tsx +39 -0
  151. package/dist/kits/blocks/components/app-providers.tsx +1 -0
  152. package/dist/kits/blocks/components/enhanced-theme-provider.tsx +195 -0
  153. package/dist/kits/blocks/components/sections/About.tsx +291 -0
  154. package/dist/kits/blocks/components/sections/CTA.tsx +258 -0
  155. package/dist/kits/blocks/components/sections/Contact.tsx +267 -0
  156. package/dist/kits/blocks/components/sections/FAQ.tsx +226 -0
  157. package/dist/kits/blocks/components/sections/Features.tsx +269 -0
  158. package/dist/kits/blocks/components/sections/Footer.tsx +302 -0
  159. package/dist/kits/blocks/components/sections/HeroMotion.tsx +307 -0
  160. package/dist/kits/blocks/components/sections/HeroOverlay.tsx +358 -0
  161. package/dist/kits/blocks/components/sections/HeroSplit.tsx +352 -0
  162. package/dist/kits/blocks/components/sections/Navbar.tsx +353 -0
  163. package/dist/kits/blocks/components/sections/Newsletter.tsx +156 -0
  164. package/dist/kits/blocks/components/sections/PortfolioSimple.tsx +550 -0
  165. package/dist/kits/blocks/components/sections/Pricing.tsx +264 -0
  166. package/dist/kits/blocks/components/sections/ProcessTimeline.tsx +325 -0
  167. package/dist/kits/blocks/components/sections/ServicesGrid.tsx +210 -0
  168. package/dist/kits/blocks/components/sections/Team.tsx +309 -0
  169. package/dist/kits/blocks/components/sections/Testimonials.tsx +158 -0
  170. package/dist/kits/blocks/components/sections/TrustBadges.tsx +162 -0
  171. package/dist/kits/blocks/components/theme-provider.tsx +34 -0
  172. package/dist/kits/blocks/components/ui/alert-dialog.tsx +134 -0
  173. package/dist/kits/blocks/components/ui/brand-node.tsx +121 -0
  174. package/dist/kits/blocks/components/ui/button.tsx +122 -0
  175. package/dist/kits/blocks/components/ui/button_bck.tsx +93 -0
  176. package/dist/kits/blocks/components/ui/card.tsx +95 -0
  177. package/dist/kits/blocks/components/ui/checkbox.tsx +30 -0
  178. package/dist/kits/blocks/components/ui/cta-button.tsx +125 -0
  179. package/dist/kits/blocks/components/ui/dropdown-menu.tsx +201 -0
  180. package/dist/kits/blocks/components/ui/feature-card.tsx +91 -0
  181. package/dist/kits/blocks/components/ui/input.tsx +27 -0
  182. package/dist/kits/blocks/components/ui/label.tsx +29 -0
  183. package/dist/kits/blocks/components/ui/pricing-card.tsx +120 -0
  184. package/dist/kits/blocks/components/ui/select.tsx +25 -0
  185. package/dist/kits/blocks/components/ui/skeleton.tsx +13 -0
  186. package/dist/kits/blocks/components/ui/switch.tsx +78 -0
  187. package/dist/kits/blocks/components/ui/table.tsx +98 -0
  188. package/dist/kits/blocks/components/ui/testimonial-card.tsx +108 -0
  189. package/dist/kits/blocks/components/ui/textarea.tsx +26 -0
  190. package/dist/kits/blocks/components/ui/theme-selector.tsx +247 -0
  191. package/dist/kits/blocks/components/ui/theme-toggle.tsx +74 -0
  192. package/dist/kits/blocks/components/ui/toaster.tsx +7 -0
  193. package/dist/kits/blocks/lib/themes.ts +399 -0
  194. package/dist/kits/blocks/lib/themes_old.ts +37 -0
  195. package/dist/kits/blocks/lib/utils.ts +9 -0
  196. package/dist/kits/blocks/next.config.ts +11 -0
  197. package/dist/kits/blocks/notes/THEME_GUIDE.md +29 -0
  198. package/dist/kits/blocks/notes/THEMING_CONVERSION_SUMMARY.md +14 -0
  199. package/dist/kits/blocks/package-deps.json +22 -0
  200. package/dist/kits/blocks/public/placeholders/gallery/hero-pexels-broken-9945014.avif +0 -0
  201. package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626431.jpg +0 -0
  202. package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626432.jpg +0 -0
  203. package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626434.jpg +0 -0
  204. package/dist/kits/blocks/public/placeholders/gallery/pexels-googledeepmind-25626436.jpg +0 -0
  205. package/dist/kits/blocks/public/placeholders/product_launch/feature_1.png +0 -0
  206. package/dist/kits/blocks/public/placeholders/product_launch/feature_2.png +0 -0
  207. package/dist/kits/blocks/public/placeholders/product_launch/feature_3.png +0 -0
  208. package/dist/kits/blocks/public/placeholders/product_launch/feature_4.png +0 -0
  209. package/dist/kits/blocks/public/placeholders/product_launch/hero.png +0 -0
  210. package/dist/kits/blocks/public/placeholders/saas_dashboard/analytics.png +0 -0
  211. package/dist/kits/blocks/public/placeholders/saas_dashboard/chat.png +0 -0
  212. package/dist/kits/blocks/public/placeholders/saas_dashboard/projectBoard.png +0 -0
  213. package/dist/kits/data/.gitkeep +0 -0
  214. package/dist/kits/data/README.md +104 -0
  215. package/dist/kits/data/app/(protected)/admin/posts/page.tsx +5 -0
  216. package/dist/kits/data/app/(protected)/admin/users/page.tsx +5 -0
  217. package/dist/kits/data/app/api/posts/[id]/route.ts +83 -0
  218. package/dist/kits/data/app/api/posts/route.ts +138 -0
  219. package/dist/kits/data/app/api/seed-demo/route.ts +45 -0
  220. package/dist/kits/data/app/api/users/[id]/route.ts +127 -0
  221. package/dist/kits/data/app/api/users/check-email/route.ts +18 -0
  222. package/dist/kits/data/app/api/users/check-unique/route.ts +27 -0
  223. package/dist/kits/data/app/api/users/route.ts +79 -0
  224. package/dist/kits/data/app/examples/demo/README.md +4 -0
  225. package/dist/kits/data/app/examples/demo/create-post-form.tsx +106 -0
  226. package/dist/kits/data/app/examples/demo/page.tsx +118 -0
  227. package/dist/kits/data/app/examples/demo/seed-demo-button.tsx +37 -0
  228. package/dist/kits/data/components/admin/posts-manager.tsx +719 -0
  229. package/dist/kits/data/components/admin/users-manager.tsx +432 -0
  230. package/dist/kits/data/lib/prisma.ts +15 -0
  231. package/dist/kits/data/lib/server/result.ts +90 -0
  232. package/dist/kits/data/package-deps.json +11 -0
  233. package/dist/kits/data/scripts/seed-demo.mjs +41 -0
  234. package/dist/kits/forms/.gitkeep +0 -0
  235. package/dist/kits/forms/README.md +49 -0
  236. package/dist/kits/forms/app/.gitkeep +0 -0
  237. package/dist/kits/forms/app/api/wizard/route.ts +71 -0
  238. package/dist/kits/forms/app/examples/forms/basic/page.tsx +124 -0
  239. package/dist/kits/forms/app/examples/forms/server-action/form-client.tsx +28 -0
  240. package/dist/kits/forms/app/examples/forms/server-action/page.tsx +71 -0
  241. package/dist/kits/forms/app/examples/forms/wizard/page.tsx +15 -0
  242. package/dist/kits/forms/app/examples/forms/wizard/wizard-client.tsx +2 -0
  243. package/dist/kits/forms/components/.gitkeep +0 -0
  244. package/dist/kits/forms/components/examples/wizard-client.tsx +231 -0
  245. package/dist/kits/forms/components/hooks/useCheckUnique.ts +79 -0
  246. package/dist/kits/forms/components/ui/button.tsx +122 -0
  247. package/dist/kits/forms/components/ui/checkbox.tsx +30 -0
  248. package/dist/kits/forms/components/ui/form/context.ts +33 -0
  249. package/dist/kits/forms/components/ui/form/form-control.tsx +28 -0
  250. package/dist/kits/forms/components/ui/form/form-description.tsx +22 -0
  251. package/dist/kits/forms/components/ui/form/form-field.tsx +36 -0
  252. package/dist/kits/forms/components/ui/form/form-item.tsx +21 -0
  253. package/dist/kits/forms/components/ui/form/form-label.tsx +24 -0
  254. package/dist/kits/forms/components/ui/form/form-message.tsx +29 -0
  255. package/dist/kits/forms/components/ui/form/form.tsx +26 -0
  256. package/dist/kits/forms/components/ui/input.tsx +27 -0
  257. package/dist/kits/forms/components/ui/label.tsx +29 -0
  258. package/dist/kits/forms/components/ui/select.tsx +25 -0
  259. package/dist/kits/forms/components/ui/switch.tsx +78 -0
  260. package/dist/kits/forms/components/ui/textarea.tsx +26 -0
  261. package/dist/kits/forms/lib/.gitkeep +0 -0
  262. package/dist/kits/forms/lib/forms/map-errors.ts +29 -0
  263. package/dist/kits/forms/lib/prisma.ts +16 -0
  264. package/dist/kits/forms/lib/utils.ts +9 -0
  265. package/dist/kits/forms/lib/validation/forms.ts +88 -0
  266. package/dist/kits/forms/lib/validation/wizard.ts +32 -0
  267. package/dist/kits/forms/package-deps.json +17 -0
  268. package/dist/utils/file-operations.d.ts +18 -0
  269. package/dist/utils/file-operations.d.ts.map +1 -0
  270. package/dist/utils/file-operations.js +327 -0
  271. package/dist/utils/file-operations.js.map +1 -0
  272. package/dist/utils/installation-tracker.d.ts +26 -0
  273. package/dist/utils/installation-tracker.d.ts.map +1 -0
  274. package/dist/utils/installation-tracker.js +98 -0
  275. package/dist/utils/installation-tracker.js.map +1 -0
  276. package/package.json +51 -21
  277. package/index.js +0 -1
@@ -0,0 +1,302 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Link from "next/link";
5
+ import { cn } from "@/lib/utils";
6
+ import { Facebook, Twitter, Instagram, Linkedin } from "lucide-react";
7
+
8
+ /**
9
+ * Navigation link item interface representing a single link in the footer.
10
+ */
11
+ export interface NavLinkItem {
12
+ /** Display name of the link */
13
+ name: string;
14
+ /** URL or anchor for the navigation link */
15
+ href: string;
16
+ /** Whether the link should open in a new tab */
17
+ external?: boolean;
18
+ }
19
+
20
+ /**
21
+ * Grouping for navigation link items under a section heading.
22
+ */
23
+ export interface NavLinkGroup {
24
+ /** Section heading/title */
25
+ heading: string;
26
+ /** Collection of links under this section */
27
+ links: NavLinkItem[];
28
+ }
29
+
30
+ /**
31
+ * Social media link interface for footer social icons.
32
+ */
33
+ /**
34
+ * Social media link interface for footer social icons.
35
+ * @public
36
+ */
37
+ export interface SocialLink {
38
+ /** Name of the social media platform */
39
+ name: string;
40
+ /** SVG icon component (e.g., Lucide). Should respect currentColor. */
41
+ icon: React.ComponentType<React.SVGProps<SVGSVGElement>>;
42
+ /** URL to the social profile */
43
+ url: string;
44
+ /** Optional aria-label for accessibility */
45
+ label?: string;
46
+ /** Whether the link should open in a new tab */
47
+ external?: boolean;
48
+ }
49
+
50
+ /**
51
+ * Props for the Footer component.
52
+ *
53
+ * @remarks
54
+ * Exposes slot-style className overrides for layout and typography. External
55
+ * links automatically receive target and rel attributes for security.
56
+ *
57
+ * @public
58
+ */
59
+ export interface FooterProps {
60
+ /** Optional id to attach to the root footer element */
61
+ id?: string;
62
+
63
+ /** Brand name or logo text displayed in the footer */
64
+ footerBrandName?: string;
65
+ /** Optional custom brand node (e.g., logo). Rendered left of brand text */
66
+ brandNode?: React.ReactNode;
67
+ /** Optional link for the brand (wraps brand text) */
68
+ brandHref?: string;
69
+
70
+ /** Navigation link groups shown in the footer */
71
+ footerNavLinks?: NavLinkGroup[];
72
+ /** Social media links and icons shown in the footer */
73
+ footerSocialLinks?: SocialLink[];
74
+
75
+ /** Optional top-level class to override the footer root */
76
+ className?: string;
77
+
78
+ /** Styling configuration objects (slot-based API) */
79
+ section?: { className?: string };
80
+ container?: { className?: string };
81
+ brand?: { className?: string };
82
+ brandWrapper?: { className?: string };
83
+ navSection?: { className?: string };
84
+ navGroup?: { className?: string };
85
+ navHeading?: { className?: string };
86
+ navLink?: { className?: string };
87
+ linksList?: { className?: string };
88
+ socialSection?: { className?: string };
89
+ socialLink?: { className?: string };
90
+ socialIcon?: { className?: string };
91
+ copyright?: { className?: string };
92
+
93
+ /** Optional overrides for copyright */
94
+ copyrightYear?: number;
95
+ copyrightOverride?: React.ReactNode;
96
+
97
+ /** ARIA label for the footer section */
98
+ ariaLabel?: string;
99
+ }
100
+
101
+ /**
102
+ * Default navigation link groups with common footer sections
103
+ */
104
+ const defaultNavLinks: NavLinkGroup[] = [
105
+ {
106
+ heading: "Product",
107
+ links: [
108
+ { name: "Features", href: "#features" },
109
+ { name: "Pricing", href: "#pricing" },
110
+ { name: "Documentation", href: "#documentation" },
111
+ { name: "FAQ", href: "#faq" },
112
+ ],
113
+ },
114
+ {
115
+ heading: "Company",
116
+ links: [
117
+ { name: "About", href: "#about" },
118
+ { name: "Careers", href: "#careers" },
119
+ { name: "Blog", href: "#blog" },
120
+ { name: "Contact", href: "#contact" },
121
+ ],
122
+ },
123
+ {
124
+ heading: "Resources",
125
+ links: [
126
+ { name: "Help Center", href: "#help" },
127
+ { name: "Terms of Service", href: "#terms" },
128
+ { name: "Privacy Policy", href: "#privacy" },
129
+ { name: "Status", href: "#status" },
130
+ ],
131
+ },
132
+ ];
133
+
134
+ /**
135
+ * Default social media links shown in the footer
136
+ */
137
+ const defaultSocialLinks: SocialLink[] = [
138
+ {
139
+ name: "Facebook",
140
+ icon: Facebook,
141
+ url: "https://facebook.com",
142
+ external: true,
143
+ },
144
+ {
145
+ name: "Twitter",
146
+ icon: Twitter,
147
+ url: "https://twitter.com",
148
+ external: true,
149
+ },
150
+ {
151
+ name: "Instagram",
152
+ icon: Instagram,
153
+ url: "https://instagram.com",
154
+ external: true,
155
+ },
156
+ {
157
+ name: "LinkedIn",
158
+ icon: Linkedin,
159
+ url: "https://linkedin.com",
160
+ external: true,
161
+ },
162
+ ];
163
+
164
+ /**
165
+ * Site footer with brand, grouped navigation links, social icons, and copyright.
166
+ *
167
+ * @remarks
168
+ * - Styling: slot-style className overrides are merged after defaults via cn().
169
+ * - Accessibility: renders a semantic <footer> with aria-label and clear link
170
+ * names; external links open in a new tab with rel security attributes.
171
+ *
172
+ * @example
173
+ * <Footer footerBrandName="Acme" />
174
+ */
175
+ export function Footer({
176
+ id,
177
+ footerBrandName = "Brand Name",
178
+ brandNode,
179
+ brandHref,
180
+ footerNavLinks = defaultNavLinks,
181
+ footerSocialLinks = defaultSocialLinks,
182
+ className,
183
+ section = {
184
+ className:
185
+ "w-full bg-muted text-foreground bg-[var(--footer-bg)] text-[var(--footer-fg)]",
186
+ },
187
+ container = { className: "max-w-7xl mx-auto px-6" },
188
+ brand = { className: "text-lg font-bold font-poppins text-foreground" },
189
+ brandWrapper = {
190
+ className: "flex flex-col items-center lg:items-start lg:pr-8",
191
+ },
192
+ navSection = {
193
+ className:
194
+ "flex flex-col lg:flex-row items-start justify-center gap-8 lg:gap-12 pt-6.5 pb-8",
195
+ },
196
+ navGroup = {
197
+ className:
198
+ "flex flex-col items-center lg:items-start text-center lg:text-left pt-1.5",
199
+ },
200
+ navHeading = {
201
+ className:
202
+ "font-bold font-poppins text-foreground mb-3 text-sm uppercase tracking-wider text-[var(--footer-heading-fg)]",
203
+ },
204
+ navLink = {
205
+ className:
206
+ "text-muted-foreground hover:text-primary transition-colors duration-200 text-sm mb-2 block font-inter text-[var(--footer-link-fg)] hover:text-[var(--footer-link-hover-fg)]",
207
+ },
208
+ linksList = { className: "space-y-2" },
209
+ socialSection = { className: "flex items-center justify-center gap-4 py-4" },
210
+ socialLink = {
211
+ className:
212
+ "text-muted-foreground hover:text-primary transition-colors duration-200 p-2 rounded-md hover:bg-accent text-[var(--footer-link-fg)] hover:text-[var(--footer-link-hover-fg)] hover:bg-[var(--footer-link-hover-bg)]",
213
+ },
214
+ socialIcon = { className: "h-5 w-5" },
215
+ copyright = {
216
+ className:
217
+ "text-center text-xs text-muted-foreground py-4 border-t border-border font-inter text-[var(--footer-muted-fg)] border-[var(--footer-border)]",
218
+ },
219
+ copyrightYear,
220
+ copyrightOverride,
221
+ ariaLabel = "Footer section",
222
+ }: FooterProps) {
223
+ const year = copyrightYear ?? new Date().getFullYear();
224
+
225
+ return (
226
+ <footer
227
+ id={id}
228
+ className={cn("w-full", section.className, className)}
229
+ aria-label={ariaLabel}
230
+ >
231
+ <div className={cn(container.className)}>
232
+ {/* Navigation link sections */}
233
+ <div className={cn(navSection.className)}>
234
+ {/* Brand name displayed in footer */}
235
+ <div className={cn(brandWrapper.className)}>
236
+ {brandNode}
237
+ {footerBrandName &&
238
+ (brandHref ? (
239
+ <Link
240
+ href={brandHref}
241
+ className={cn(brand.className)}
242
+ aria-label={footerBrandName}
243
+ >
244
+ {footerBrandName}
245
+ </Link>
246
+ ) : (
247
+ <h3 className={cn(brand.className)}>{footerBrandName}</h3>
248
+ ))}
249
+ </div>
250
+
251
+ {/* Iterate over nav link groups */}
252
+ {footerNavLinks.map((group) => (
253
+ <div key={group.heading} className={cn(navGroup.className)}>
254
+ <h3 className={cn(navHeading.className)}>{group.heading}</h3>
255
+ <div className={cn(linksList.className)}>
256
+ {group.links.map((link) => (
257
+ <Link
258
+ key={link.name}
259
+ href={link.href}
260
+ target={link.external ? "_blank" : undefined}
261
+ rel={link.external ? "noopener noreferrer" : undefined}
262
+ className={cn(navLink.className)}
263
+ >
264
+ {link.name}
265
+ </Link>
266
+ ))}
267
+ </div>
268
+ </div>
269
+ ))}
270
+ </div>
271
+
272
+ {/* Social media icon links */}
273
+ <div className={cn(socialSection.className)}>
274
+ {footerSocialLinks.map((social) => {
275
+ const IconComponent = social.icon;
276
+ return (
277
+ <Link
278
+ key={social.name}
279
+ href={social.url}
280
+ target={social.external ? "_blank" : undefined}
281
+ rel={social.external ? "noopener noreferrer" : undefined}
282
+ aria-label={social.label || social.name}
283
+ className={cn(socialLink.className)}
284
+ >
285
+ <IconComponent className={cn(socialIcon.className)} />
286
+ </Link>
287
+ );
288
+ })}
289
+ </div>
290
+
291
+ {/* Copyright notice */}
292
+ <div className={cn(copyright.className)}>
293
+ {copyrightOverride ?? (
294
+ <>
295
+ © {year} {footerBrandName}. All rights reserved.
296
+ </>
297
+ )}
298
+ </div>
299
+ </div>
300
+ </footer>
301
+ );
302
+ }
@@ -0,0 +1,307 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import Link from "next/link";
5
+ import { motion } from "motion/react";
6
+ import type { Transition } from "motion";
7
+ import { Button } from "@/components/ui/button";
8
+ import { cn } from "@/lib/utils";
9
+
10
+ /**
11
+ * Props for the HeroMotion component.
12
+ *
13
+ * @remarks
14
+ * - Styling: exposes slot-style className overrides merged via cn().
15
+ * - Motion: controlled by enableMotion and motionOptions; respects
16
+ * prefers-reduced-motion by allowing disabling transforms.
17
+ * - Accessibility: rendered as a semantic <section> with aria-label.
18
+ * - CTA: primary/secondary CTA can be links (href provided) or buttons.
19
+ */
20
+ export interface HeroMotionProps {
21
+ /** Optional id to attach to the section root */
22
+ id?: string;
23
+ /** ARIA label for the section. @defaultValue "Hero section" */
24
+ ariaLabel?: string;
25
+ /** Optional top-level class to override the root */
26
+ className?: string;
27
+
28
+ /** Primary heading text. Ignored when headingNode is provided. */
29
+ heading?: string;
30
+ /** Custom heading node; use for advanced layouts or styling. */
31
+ headingNode?: React.ReactNode;
32
+ /** Inline highlight node rendered next to heading text. */
33
+ highlight?: React.ReactNode;
34
+ /** Optional description paragraph/node */
35
+ description?: React.ReactNode;
36
+
37
+ /** Primary call to action config or null to hide */
38
+ primaryCta?: { label: string; href?: string } | null;
39
+ /** Secondary call to action config or null to hide */
40
+ secondaryCta?: { label: string; href?: string } | null;
41
+
42
+ /** Slot-style overrides */
43
+ section?: { className?: string };
44
+ container?: { className?: string };
45
+ content?: { className?: string };
46
+ headingText?: { className?: string };
47
+ highlightText?: { className?: string };
48
+ descriptionText?: { className?: string };
49
+ actions?: { className?: string };
50
+ primaryButtonStyle?: {
51
+ unstyled?: boolean;
52
+ style?: React.CSSProperties;
53
+ variant?:
54
+ | "default"
55
+ | "destructive"
56
+ | "outline"
57
+ | "secondary"
58
+ | "ghost"
59
+ | "link";
60
+ size?: "default" | "sm" | "lg" | "icon";
61
+ className?: string;
62
+ };
63
+ secondaryButtonStyle?: {
64
+ unstyled?: boolean;
65
+ style?: React.CSSProperties;
66
+ variant?:
67
+ | "default"
68
+ | "destructive"
69
+ | "outline"
70
+ | "secondary"
71
+ | "ghost"
72
+ | "link";
73
+ size?: "default" | "sm" | "lg" | "icon";
74
+ className?: string;
75
+ };
76
+
77
+ /** Optional background node (e.g., SVGs, gradients, images) */
78
+ backgroundNode?: React.ReactNode;
79
+
80
+ /** When false, disables entrance animations */
81
+ enableMotion?: boolean;
82
+
83
+ /** Motion configuration for entrance sequences */
84
+ motionOptions?: {
85
+ viewport?: { once?: boolean; amount?: number };
86
+ headingDelay?: number;
87
+ descriptionDelay?: number;
88
+ actionsDelay?: number;
89
+ transition: Transition;
90
+ };
91
+ }
92
+
93
+ const defaultChildTransition: Transition = {
94
+ type: "tween",
95
+ duration: 0.5,
96
+ ease: [0.22, 1, 0.36, 1], // smooth easeOut
97
+ };
98
+
99
+ /**
100
+ * Motion-first hero with heading/highlight, optional description and CTAs.
101
+ *
102
+ * @remarks
103
+ * - Styling: slot-style className overrides are merged after defaults via cn().
104
+ * - Motion: enableMotion toggles entrance transitions; motionOptions controls
105
+ * delays and viewport.
106
+ * - Accessibility: semantic <section> with aria-label.
107
+ *
108
+ * @example
109
+ * <HeroMotion
110
+ * heading="Supercharge growth with"
111
+ * highlight="AI-powered insights"
112
+ * primaryCta={{ label: 'Get Started', href: '#contact' }}
113
+ * />
114
+ */
115
+ export function HeroMotion({
116
+ id,
117
+ ariaLabel = "Hero section",
118
+ className,
119
+ heading = "Supercharge growth with",
120
+ headingNode,
121
+ highlight = "AI-powered insights",
122
+ description = (
123
+ <>
124
+ Real-time trends, accurate user signals, and smarter, data-driven
125
+ decisions.
126
+ </>
127
+ ),
128
+ primaryCta = { label: "Get Started" },
129
+ secondaryCta = { label: "See Demo" },
130
+ section = { className: "bg-background relative overflow-hidden" },
131
+ container = { className: "mx-auto max-w-7xl px-6 py-24 sm:py-28 lg:py-32" },
132
+ content = { className: "mx-auto max-w-3xl text-center" },
133
+ headingText = {
134
+ className:
135
+ "transform-gpu will-change-transform text-foreground text-4xl font-semibold tracking-tight text-balance sm:text-5xl md:text-6xl",
136
+ },
137
+ highlightText = {
138
+ className:
139
+ "from-primary via-primary/80 to-primary/60 bg-gradient-to-r bg-clip-text text-transparent",
140
+ },
141
+ descriptionText = {
142
+ className:
143
+ "transform-gpu will-change-transform text-muted-foreground mt-5 text-base text-pretty sm:text-lg",
144
+ },
145
+ actions = { className: "mt-8 flex items-center justify-center gap-3" },
146
+ primaryButtonStyle = { size: "lg", variant: "default", className: "" },
147
+ secondaryButtonStyle = { size: "lg", variant: "outline", className: "" },
148
+ enableMotion = true,
149
+ motionOptions = {
150
+ viewport: { once: true, amount: 0.25 },
151
+ headingDelay: 0.5,
152
+ descriptionDelay: 0.58,
153
+ actionsDelay: 0.66,
154
+ transition: defaultChildTransition,
155
+ },
156
+ backgroundNode,
157
+ }: HeroMotionProps) {
158
+ const viewport = enableMotion
159
+ ? {
160
+ once: motionOptions?.viewport?.once ?? true,
161
+ amount: motionOptions?.viewport?.amount ?? 0.25,
162
+ }
163
+ : { once: true, amount: 0 };
164
+
165
+ const transition: Transition = {
166
+ ...defaultChildTransition,
167
+ ...(motionOptions?.transition ?? {}),
168
+ };
169
+
170
+ return (
171
+ <section
172
+ id={id}
173
+ aria-label={ariaLabel}
174
+ className={cn(section.className, className)}
175
+ >
176
+ {backgroundNode}
177
+ <div className={cn(container.className)}>
178
+ <motion.div className={cn(content.className)}>
179
+ <motion.h1
180
+ initial={
181
+ enableMotion ? { opacity: 0, y: 12 } : { opacity: 1, y: 0 }
182
+ }
183
+ whileInView={{ opacity: 1, y: 0 }}
184
+ viewport={viewport}
185
+ transition={
186
+ enableMotion
187
+ ? { ...transition, delay: motionOptions?.headingDelay ?? 0.5 }
188
+ : { type: "tween", duration: 0 }
189
+ }
190
+ className={cn(headingText.className)}
191
+ >
192
+ {headingNode ? (
193
+ headingNode
194
+ ) : (
195
+ <>
196
+ {heading}
197
+ {highlight ? (
198
+ <span className={cn(highlightText.className)}>
199
+ {" "}
200
+ {highlight}
201
+ </span>
202
+ ) : null}
203
+ </>
204
+ )}
205
+ </motion.h1>
206
+
207
+ {description ? (
208
+ <motion.p
209
+ initial={
210
+ enableMotion ? { opacity: 0, y: 10 } : { opacity: 1, y: 0 }
211
+ }
212
+ whileInView={{ opacity: 1, y: 0 }}
213
+ viewport={viewport}
214
+ transition={
215
+ enableMotion
216
+ ? {
217
+ ...transition,
218
+ delay: motionOptions?.descriptionDelay ?? 0.58,
219
+ }
220
+ : { type: "tween", duration: 0 }
221
+ }
222
+ className={cn(descriptionText.className)}
223
+ >
224
+ {description}
225
+ </motion.p>
226
+ ) : null}
227
+
228
+ {(primaryCta || secondaryCta) && (
229
+ <motion.div
230
+ initial={
231
+ enableMotion ? { opacity: 0, y: 10 } : { opacity: 1, y: 0 }
232
+ }
233
+ whileInView={{ opacity: 1, y: 0 }}
234
+ viewport={viewport}
235
+ transition={
236
+ enableMotion
237
+ ? {
238
+ ...transition,
239
+ delay: motionOptions?.actionsDelay ?? 0.66,
240
+ }
241
+ : { type: "tween", duration: 0 }
242
+ }
243
+ className={cn(actions.className)}
244
+ >
245
+ {primaryCta &&
246
+ (primaryCta.href ? (
247
+ <Button
248
+ asChild
249
+ unstyled={primaryButtonStyle.unstyled}
250
+ variant={primaryButtonStyle.variant}
251
+ size={primaryButtonStyle.size}
252
+ className={cn(primaryButtonStyle.className)}
253
+ style={primaryButtonStyle.style}
254
+ >
255
+ <Link href={primaryCta.href} aria-label={primaryCta.label}>
256
+ {primaryCta.label}
257
+ </Link>
258
+ </Button>
259
+ ) : (
260
+ <Button
261
+ variant={primaryButtonStyle.variant}
262
+ size={primaryButtonStyle.size}
263
+ className={cn(primaryButtonStyle.className)}
264
+ unstyled={primaryButtonStyle.unstyled}
265
+ style={primaryButtonStyle.style}
266
+ aria-label={primaryCta.label}
267
+ >
268
+ {primaryCta.label}
269
+ </Button>
270
+ ))}
271
+
272
+ {secondaryCta &&
273
+ (secondaryCta.href ? (
274
+ <Button
275
+ asChild
276
+ unstyled={secondaryButtonStyle.unstyled}
277
+ variant={secondaryButtonStyle.variant}
278
+ size={secondaryButtonStyle.size}
279
+ className={cn(secondaryButtonStyle.className)}
280
+ style={secondaryButtonStyle.style}
281
+ >
282
+ <Link
283
+ href={secondaryCta.href}
284
+ aria-label={secondaryCta.label}
285
+ >
286
+ {secondaryCta.label}
287
+ </Link>
288
+ </Button>
289
+ ) : (
290
+ <Button
291
+ variant={secondaryButtonStyle.variant}
292
+ size={secondaryButtonStyle.size}
293
+ className={cn(secondaryButtonStyle.className)}
294
+ unstyled={secondaryButtonStyle.unstyled}
295
+ style={secondaryButtonStyle.style}
296
+ aria-label={secondaryCta.label}
297
+ >
298
+ {secondaryCta.label}
299
+ </Button>
300
+ ))}
301
+ </motion.div>
302
+ )}
303
+ </motion.div>
304
+ </div>
305
+ </section>
306
+ );
307
+ }