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,127 +1,126 @@
1
- "use client";
2
-
3
- import React from "react";
4
- import { HeroSplit as SharedHeroSplit } from "@/components/sections/HeroSplit";
5
- import { Dashboard } from "./Dashboard";
6
- import { cn } from "@/lib/utils";
7
-
8
- const stats = [
9
- { value: "$124K", label: "Monthly Revenue" },
10
- { value: "+23%", label: "Growth Rate" },
11
- { value: "847", label: "Active Users" },
12
- ];
13
-
14
- const projects = ["Website Redesign", "Mobile App v2.0", "Marketing Campaign"];
15
-
16
- const floatingCards = [
17
- { position: "card-1", icon: "📊", text: "Real-time Analytics" },
18
- { position: "card-2", icon: "👥", text: "Team Collaboration" },
19
- ];
20
-
21
- const activeTab = "Analytics";
22
- const navItems = ["Analytics", "Projects", "Team"];
23
-
24
- export function Hero() {
25
- const sectionRef = React.useRef<HTMLDivElement>(null);
26
- const dashRef = React.useRef<HTMLDivElement>(null);
27
-
28
- React.useLayoutEffect(() => {
29
- const measure = () => {
30
- const sec = sectionRef.current;
31
- const dash = dashRef.current;
32
- if (!sec || !dash) return;
33
- const sr = sec.getBoundingClientRect();
34
- const dr = dash.getBoundingClientRect();
35
- sec.style.setProperty("--hole-x", `${dr.left - sr.left}px`);
36
- sec.style.setProperty("--hole-y", `${dr.top - sr.top}px`);
37
- sec.style.setProperty("--hole-w", `${dr.width}px`);
38
- sec.style.setProperty("--hole-h", `${dr.height}px`);
39
- };
40
-
41
- measure();
42
- const ro = new ResizeObserver(measure);
43
- if (sectionRef.current) ro.observe(sectionRef.current);
44
- if (dashRef.current) ro.observe(dashRef.current);
45
- window.addEventListener("resize", measure);
46
- return () => {
47
- ro.disconnect();
48
- window.removeEventListener("resize", measure);
49
- };
50
- }, []);
51
- return (
52
- <div className="relative">
53
- {/* Ambient gradient blobs behind hero */}
54
- <div className="pointer-events-none absolute inset-0 -z-20 overflow-hidden">
55
- <div className="absolute -top-10 -left-10 h-72 w-72 rounded-full bg-blue-500/20 blur-3xl" />
56
- <div className="absolute right-0 bottom-0 h-72 w-72 rounded-full bg-purple-500/20 blur-3xl" />
57
- </div>
58
- <div
59
- ref={sectionRef}
60
- className="relative before:absolute before:inset-0 before:-z-10 before:bg-gradient-to-br before:from-white before:via-blue-50 before:to-white before:[mask-image:linear-gradient(#000,#000),linear-gradient(#000,#000)] before:[mask-composite:exclude] before:[mask-size:auto,var(--hole-w)_var(--hole-h)] before:[mask-position:0_0,var(--hole-x)_var(--hole-y)] before:[mask-repeat:no-repeat] before:content-[''] before:[-webkit-mask-composite:xor] dark:before:from-gray-900 dark:before:via-blue-950/20 dark:before:to-gray-900"
61
- >
62
- <SharedHeroSplit
63
- className={cn("relative")}
64
- heading={{
65
- text: "Manage Your Entire Business From One Powerful Dashboard",
66
- className:
67
- "text-3xl md:text-4xl lg:text-5xl font-bold leading-tight text-black dark:text-white font-inter",
68
- }}
69
- subheading={{
70
- text: "Stop switching between 12 different apps. DashFlow combines project management, analytics, team chat, and customer insights in one beautiful interface.",
71
- className:
72
- "text-base md:text-lg text-gray-700 dark:text-gray-100 mt-6 mb-8 max-w-2xl font-inter font-normal",
73
- }}
74
- section={{
75
- className: "relative bg-none bg-transparent pt-0 px-8 pb-8",
76
- }}
77
- cta1={{
78
- label: "Start Free Trial",
79
- href: "#contact",
80
- variant: "default",
81
- size: "lg",
82
- className:
83
- "bg-blue-600 hover:bg-blue-700 text-white text-base font-semibold font-inter shadow-lg hover:shadow-xl hover:-translate-y-0.5 transition-all duration-200 border-0 px-8 py-3",
84
- }}
85
- cta2={{
86
- label: "Watch demo",
87
- href: "#demo",
88
- variant: "outline",
89
- size: "lg",
90
- className:
91
- "border-blue-600 text-blue-600 hover:bg-blue-50 dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-950 text-base font-semibold font-inter shadow-lg hover:shadow-xl hover:-translate-y-0.5 transition-all duration-200 px-8 py-3",
92
- }}
93
- image={{ src: undefined, alt: "Dashboard preview" }}
94
- imageLayout="padded"
95
- fallback={
96
- <div
97
- ref={dashRef}
98
- className="relative z-10 flex h-full w-full items-center justify-center pl-0"
99
- >
100
- <div className="relative h-full w-[min(100%,720px)] overflow-hidden p-2">
101
- <Dashboard
102
- stats={stats}
103
- projects={projects}
104
- floatingCards={floatingCards}
105
- navItems={navItems}
106
- activeTab={activeTab}
107
- />
108
- </div>
109
- </div>
110
- }
111
- imageContainer={{
112
- className:
113
- "relative self-start md:self-start md:flex-none md:shrink-0 w-full h-[24rem] sm:h-[26rem] md:h-[31rem] md:w-1/2 mb-6 md:mb-0",
114
- // "relative self-start md:self-start md:flex-none md:shrink-0 w-full h-[24rem] sm:h-[26rem] md:h-[28rem] md:w-1/2 mb-6 md:mb-0",
115
- }}
116
- textContainer={{ className: "flex-1 p-5 lg:p-8" }}
117
- buttonsContainer={{
118
- className:
119
- "flex flex-col sm:flex-row gap-4 mt-8 justify-center lg:justify-start",
120
- }}
121
- textAlign="center"
122
- ariaLabel="DashFlow hero section"
123
- />
124
- </div>
125
- </div>
126
- );
127
- }
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import { HeroSplit as SharedHeroSplit } from "@/components/sections/HeroSplit";
5
+ import { Dashboard } from "./Dashboard";
6
+ import { cn } from "@/lib/utils";
7
+
8
+ const stats = [
9
+ { value: "$124K", label: "Monthly Revenue" },
10
+ { value: "+23%", label: "Growth Rate" },
11
+ { value: "847", label: "Active Users" },
12
+ ];
13
+
14
+ const projects = ["Website Redesign", "Mobile App v2.0", "Marketing Campaign"];
15
+
16
+ const floatingCards = [
17
+ { position: "card-1", icon: "📊", text: "Real-time Analytics" },
18
+ { position: "card-2", icon: "👥", text: "Team Collaboration" },
19
+ ];
20
+
21
+ const activeTab = "Analytics";
22
+ const navItems = ["Analytics", "Projects", "Team"];
23
+
24
+ export function Hero() {
25
+ const sectionRef = React.useRef<HTMLDivElement>(null);
26
+ const dashRef = React.useRef<HTMLDivElement>(null);
27
+
28
+ React.useLayoutEffect(() => {
29
+ const measure = () => {
30
+ const sec = sectionRef.current;
31
+ const dash = dashRef.current;
32
+ if (!sec || !dash) return;
33
+ const sr = sec.getBoundingClientRect();
34
+ const dr = dash.getBoundingClientRect();
35
+ sec.style.setProperty("--hole-x", `${dr.left - sr.left}px`);
36
+ sec.style.setProperty("--hole-y", `${dr.top - sr.top}px`);
37
+ sec.style.setProperty("--hole-w", `${dr.width}px`);
38
+ sec.style.setProperty("--hole-h", `${dr.height}px`);
39
+ };
40
+
41
+ measure();
42
+ const ro = new ResizeObserver(measure);
43
+ if (sectionRef.current) ro.observe(sectionRef.current);
44
+ if (dashRef.current) ro.observe(dashRef.current);
45
+ window.addEventListener("resize", measure);
46
+ return () => {
47
+ ro.disconnect();
48
+ window.removeEventListener("resize", measure);
49
+ };
50
+ }, []);
51
+ return (
52
+ <div className="relative">
53
+ {/* Ambient gradient blobs behind hero */}
54
+ <div className="pointer-events-none absolute inset-0 -z-20 overflow-hidden">
55
+ <div className="absolute -top-10 -left-10 h-72 w-72 rounded-full bg-blue-500/20 blur-3xl" />
56
+ <div className="absolute right-0 bottom-0 h-72 w-72 rounded-full bg-purple-500/20 blur-3xl" />
57
+ </div>
58
+ <div
59
+ ref={sectionRef}
60
+ className="relative before:absolute before:inset-0 before:-z-10 before:bg-gradient-to-br before:from-white before:via-blue-50 before:to-white before:[mask-image:linear-gradient(#000,#000),linear-gradient(#000,#000)] before:[mask-composite:exclude] before:[mask-size:auto,var(--hole-w)_var(--hole-h)] before:[mask-position:0_0,var(--hole-x)_var(--hole-y)] before:[mask-repeat:no-repeat] before:content-[''] before:[-webkit-mask-composite:xor] dark:before:from-gray-900 dark:before:via-blue-950/20 dark:before:to-gray-900"
61
+ >
62
+ <SharedHeroSplit
63
+ className={cn("relative")}
64
+ heading={{
65
+ text: "Manage Your Entire Business From One Powerful Dashboard",
66
+ className:
67
+ "text-3xl md:text-4xl lg:text-5xl font-bold leading-tight text-black dark:text-white font-inter",
68
+ }}
69
+ subheading={{
70
+ text: "Stop switching between 12 different apps. DashFlow combines project management, analytics, team chat, and customer insights in one beautiful interface.",
71
+ className:
72
+ "text-base md:text-lg text-gray-700 dark:text-gray-100 mt-6 mb-8 max-w-2xl font-inter font-normal",
73
+ }}
74
+ section={{
75
+ className: "relative bg-none bg-transparent pt-0 px-8 pb-8",
76
+ }}
77
+ cta1={{
78
+ label: "Start Free Trial",
79
+ href: "#contact",
80
+ variant: "default",
81
+ size: "lg",
82
+ className:
83
+ "bg-blue-600 hover:bg-blue-700 text-white text-base font-semibold font-inter shadow-lg hover:shadow-xl hover:-translate-y-0.5 transition-all duration-200 border-0 px-8 py-3",
84
+ }}
85
+ cta2={{
86
+ label: "Watch demo",
87
+ href: "#demo",
88
+ variant: "outline",
89
+ size: "lg",
90
+ className:
91
+ "border-blue-600 text-blue-600 hover:bg-blue-50 dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-950 text-base font-semibold font-inter shadow-lg hover:shadow-xl hover:-translate-y-0.5 transition-all duration-200 px-8 py-3",
92
+ }}
93
+ image={{ src: undefined, alt: "Dashboard preview" }}
94
+ imageLayout="padded"
95
+ fallback={
96
+ <div
97
+ ref={dashRef}
98
+ className="relative z-10 flex h-full w-full items-center justify-center pl-0"
99
+ >
100
+ <div className="relative h-full w-[min(100%,720px)] overflow-hidden p-2">
101
+ <Dashboard
102
+ stats={stats}
103
+ projects={projects}
104
+ floatingCards={floatingCards}
105
+ navItems={navItems}
106
+ activeTab={activeTab}
107
+ />
108
+ </div>
109
+ </div>
110
+ }
111
+ imageContainer={{
112
+ className:
113
+ "relative self-start md:self-start md:flex-none md:shrink-0 w-full h-[24rem] sm:h-[26rem] md:h-[31rem] md:w-1/2 mb-6 md:mb-0",
114
+ }}
115
+ textContainer={{ className: "flex-1 p-5 lg:p-8" }}
116
+ buttonsContainer={{
117
+ className:
118
+ "flex flex-col sm:flex-row gap-4 mt-8 justify-center lg:justify-start",
119
+ }}
120
+ textAlign="center"
121
+ ariaLabel="DashFlow hero section"
122
+ />
123
+ </div>
124
+ </div>
125
+ );
126
+ }
@@ -1,159 +1,117 @@
1
- "use client";
2
-
3
- import type { ComponentProps } from "react";
4
- import { Navbar as SharedNavbar } from "@/components/sections/Navbar";
5
-
6
- /**
7
- * SaaS Dashboard preset Navbar
8
- *
9
- * - DashFlow branding with blue/purple gradient logo square (brandNode)
10
- * - Inter font for brand and links
11
- * - No CTA button (ctaButton = null)
12
- * - Blue hover states for links and theme toggle
13
- * - Glassy background with backdrop blur (light/dark)
14
- *
15
- * This preset exposes the Shared Navbar API so devs can override any prop/slot:
16
- *
17
- * Example:
18
- * <Navbar
19
- * brand="My SaaS"
20
- * links={{ className: "hover:text-emerald-600" }}
21
- * container={{ className: "max-w-6xl mx-auto" }}
22
- * />
23
- */
24
- type SharedNavbarProps = ComponentProps<typeof SharedNavbar>;
25
- type PresetOverrides = Partial<SharedNavbarProps>;
26
-
27
- const defaultProps: SharedNavbarProps = {
28
- brand: "DashFlow",
29
- // Preserve custom gradient logo block
30
- brandNode: (
31
- <div className="flex h-8 w-8 items-center justify-center rounded-md bg-gradient-to-br from-blue-600 to-purple-600 font-bold text-white shadow-sm ring-1 ring-white/40">
32
- DF
33
- </div>
34
- ),
35
- menuItems: [
36
- { label: "Home", href: "#home" },
37
- { label: "Features", href: "#features" },
38
- { label: "Pricing", href: "#pricing" },
39
- { label: "Contact", href: "#contact" },
40
- ],
41
- ctaButton: null,
42
- showColorModeToggle: true,
43
- navHeight: "h-16",
44
- sticky: true,
45
- ariaLabel: "DashFlow main navigation",
46
- // Allow layout constraints to be added at page-level
47
- className: "",
48
-
49
- // Style slots tuned for the blue SaaS theme
50
- nav: {
51
- className:
52
- "bg-white/60 dark:bg-gray-900/60 backdrop-blur supports-[backdrop-filter]:bg-white/60 supports-[backdrop-filter]:dark:bg-gray-900/60 text-gray-800 dark:text-white " +
53
- // Accent variables for this preset (read by toggle, links, mobile links)
54
- "[--navbar-accent:theme(colors.blue.700)] dark:[--navbar-accent:theme(colors.blue.400)] " +
55
- "[--navbar-toggle-bg:theme(colors.white)] dark:[--navbar-toggle-bg:theme(colors.gray.900)] " +
56
- "[--navbar-hover-bg:theme(colors.blue.50)] dark:[--navbar-hover-bg:color-mix(in oklab,oklch(0.23 0.05 264) 20%, transparent)] " +
57
- "[--navbar-ring:theme(colors.blue.500)] dark:[--navbar-ring:theme(colors.blue.400)] " +
58
- "[--navbar-border:theme(colors.gray.200)] dark:[--navbar-border:theme(colors.gray.800)]",
59
- },
60
- brandText: {
61
- className: "text-xl font-bold font-inter text-blue-700 dark:text-blue-500",
62
- },
63
- links: {
64
- className:
65
- "text-sm font-medium font-inter text-gray-800 dark:text-white hover:text-blue-700 dark:hover:text-blue-400 " +
66
- "focus:ring-[var(--navbar-ring)]",
67
- },
68
- // Preset keeps CTA hidden; if enabled, provide subtle interactive defaults
69
- ctaButtonStyle: {
70
- variant: "default",
71
- size: "default",
72
- className:
73
- "shadow-lg hover:shadow-xl transition-all duration-200 hover:-translate-y-0.5",
74
- },
75
- // Additional slots that weren't styled before, now aligned to the theme
76
- mobileMenu: {
77
- className: "border-t border-gray-200/80 dark:border-gray-800/80",
78
- },
79
- container: {
80
- className: "max-w-7xl mx-auto",
81
- },
82
- brandWrapper: {
83
- className: "",
84
- },
85
- desktopMenu: {
86
- className: "hidden items-center space-x-1 md:flex lg:space-x-6",
87
- },
88
- toggleButton: {
89
- className:
90
- "md:hidden flex items-center justify-center rounded-md p-2 transition-colors " +
91
- "hover:bg-blue-50 dark:hover:bg-blue-900/20 " +
92
- "focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",
93
- },
94
- colorModeWrapper: {
95
- className: "ml-2",
96
- },
97
- // With variables above, ThemeToggle can rely on them; explicit override optional
98
- // themeToggle: { ... }
99
- ctaButtonWrapper: {
100
- className: "ml-2",
101
- },
102
- mobileMenuInner: {
103
- className: "space-y-2 px-4 pt-2 pb-4",
104
- },
105
- // Mobile links will read --navbar-hover-bg; explicit class optional
106
- mobileLinks: {
107
- className: "hover:bg-[var(--navbar-hover-bg)]",
108
- },
109
- };
110
-
111
- export function Navbar(overrides: PresetOverrides = {}) {
112
- // Shallow-merge: passing a style-slot object (e.g., links, nav, etc.)
113
- // replaces the default for that slot. Keeps the API simple and predictable.
114
- const props: SharedNavbarProps = {
115
- ...defaultProps,
116
- ...overrides,
117
- };
118
- return <SharedNavbar {...props} />;
119
- }
120
-
121
- // "use client";
122
-
123
- // import { Navbar as SharedNavbar } from "@/components/sections/Navbar";
124
-
125
- // export function Navbar() {
126
- // return (
127
- // <SharedNavbar
128
- // brand="DashFlow"
129
- // brandNode={
130
- // <div className="flex h-8 w-8 items-center justify-center rounded-md bg-gradient-to-br from-blue-600 to-purple-600 font-bold text-white shadow-sm ring-1 ring-white/40">
131
- // DF
132
- // </div>
133
- // }
134
- // menuItems={[
135
- // { label: "Home", href: "#home" },
136
- // { label: "Features", href: "#features" },
137
- // { label: "Pricing", href: "#pricing" },
138
- // { label: "Contact", href: "#contact" },
139
- // ]}
140
- // ctaButton={null}
141
- // showColorModeToggle={true}
142
- // navHeight="h-16"
143
- // sticky={true}
144
- // ariaLabel="DashFlow main navigation"
145
- // nav={{
146
- // className:
147
- // "bg-white/60 dark:bg-gray-900/60 backdrop-blur supports-[backdrop-filter]:bg-white/60 supports-[backdrop-filter]:dark:bg-gray-900/60 text-gray-800 dark:text-white",
148
- // }}
149
- // brandText={{
150
- // className:
151
- // "text-xl font-bold font-inter text-blue-700 dark:text-blue-500",
152
- // }}
153
- // links={{
154
- // className:
155
- // "text-sm font-medium font-inter text-gray-800 dark:text-white hover:text-blue-700 dark:hover:text-blue-400",
156
- // }}
157
- // />
158
- // );
159
- // }
1
+ "use client";
2
+
3
+ import type { ComponentProps } from "react";
4
+ import { Navbar as SharedNavbar } from "@/components/sections/Navbar";
5
+
6
+ /**
7
+ * SaaS Dashboard preset Navbar
8
+ *
9
+ * - DashFlow branding with blue/purple gradient logo square (brandNode)
10
+ * - Inter font for brand and links
11
+ * - No CTA button (ctaButton = null)
12
+ * - Blue hover states for links and theme toggle
13
+ * - Glassy background with backdrop blur (light/dark)
14
+ *
15
+ * This preset exposes the Shared Navbar API, allowing full customization of any prop or slot.
16
+ *
17
+ * Example:
18
+ * <Navbar
19
+ * brand="My SaaS"
20
+ * links={{ className: "hover:text-emerald-600" }}
21
+ * container={{ className: "max-w-6xl mx-auto" }}
22
+ * />
23
+ */
24
+ type SharedNavbarProps = ComponentProps<typeof SharedNavbar>;
25
+ type PresetOverrides = Partial<SharedNavbarProps>;
26
+
27
+ const defaultProps: SharedNavbarProps = {
28
+ brand: "DashFlow",
29
+ // Gradient logo block
30
+ brandNode: (
31
+ <div className="flex h-8 w-8 items-center justify-center rounded-md bg-gradient-to-br from-blue-600 to-purple-600 font-bold text-white shadow-sm ring-1 ring-white/40">
32
+ DF
33
+ </div>
34
+ ),
35
+ menuItems: [
36
+ { label: "Home", href: "#home" },
37
+ { label: "Features", href: "#features" },
38
+ { label: "Pricing", href: "#pricing" },
39
+ { label: "Contact", href: "#contact" },
40
+ ],
41
+ ctaButton: null,
42
+ showColorModeToggle: true,
43
+ navHeight: "h-16",
44
+ sticky: true,
45
+ ariaLabel: "DashFlow main navigation",
46
+ // Allow layout constraints to be added at page-level
47
+ className: "",
48
+ // Style slots tuned for the blue SaaS theme
49
+ nav: {
50
+ className:
51
+ "bg-white/60 dark:bg-gray-900/60 backdrop-blur supports-[backdrop-filter]:bg-white/60 supports-[backdrop-filter]:dark:bg-gray-900/60 text-gray-800 dark:text-white " +
52
+ // Accent variables for this preset (read by toggle, links, mobile links)
53
+ "[--navbar-accent:theme(colors.blue.700)] dark:[--navbar-accent:theme(colors.blue.400)] " +
54
+ "[--navbar-toggle-bg:theme(colors.white)] dark:[--navbar-toggle-bg:theme(colors.gray.900)] " +
55
+ "[--navbar-hover-bg:theme(colors.blue.50)] dark:[--navbar-hover-bg:color-mix(in oklab,oklch(0.23 0.05 264) 20%, transparent)] " +
56
+ "[--navbar-ring:theme(colors.blue.500)] dark:[--navbar-ring:theme(colors.blue.400)] " +
57
+ "[--navbar-border:theme(colors.gray.200)] dark:[--navbar-border:theme(colors.gray.800)]",
58
+ },
59
+ brandText: {
60
+ className: "text-xl font-bold font-inter text-blue-700 dark:text-blue-500",
61
+ },
62
+ links: {
63
+ className:
64
+ "text-sm font-medium font-inter text-gray-800 dark:text-white hover:text-blue-700 dark:hover:text-blue-400 " +
65
+ "focus:ring-[var(--navbar-ring)]",
66
+ },
67
+ // Preset keeps CTA hidden; if enabled, provide subtle interactive defaults
68
+ ctaButtonStyle: {
69
+ variant: "default",
70
+ size: "default",
71
+ className:
72
+ "shadow-lg hover:shadow-xl transition-all duration-200 hover:-translate-y-0.5",
73
+ },
74
+ mobileMenu: {
75
+ className: "border-t border-gray-200/80 dark:border-gray-800/80",
76
+ },
77
+ container: {
78
+ className: "max-w-7xl mx-auto",
79
+ },
80
+ brandWrapper: {
81
+ className: "",
82
+ },
83
+ desktopMenu: {
84
+ className: "hidden items-center space-x-1 md:flex lg:space-x-6",
85
+ },
86
+ toggleButton: {
87
+ className:
88
+ "md:hidden flex items-center justify-center rounded-md p-2 transition-colors " +
89
+ "hover:bg-blue-50 dark:hover:bg-blue-900/20 " +
90
+ "focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400",
91
+ },
92
+ colorModeWrapper: {
93
+ className: "ml-2",
94
+ },
95
+ // ThemeToggle reads the CSS vars defined in `nav.className`; override via `themeToggle` if needed.
96
+ // themeToggle: { ... }
97
+ ctaButtonWrapper: {
98
+ className: "ml-2",
99
+ },
100
+ mobileMenuInner: {
101
+ className: "space-y-2 px-4 pt-2 pb-4",
102
+ },
103
+ // Mobile links will read --navbar-hover-bg; explicit class optional
104
+ mobileLinks: {
105
+ className: "hover:bg-[var(--navbar-hover-bg)]",
106
+ },
107
+ };
108
+
109
+ export function Navbar(overrides: PresetOverrides = {}) {
110
+ // Shallow-merge: passing a style-slot object (e.g., links, nav, etc.)
111
+ // replaces the default for that slot.
112
+ const props: SharedNavbarProps = {
113
+ ...defaultProps,
114
+ ...overrides,
115
+ };
116
+ return <SharedNavbar {...props} />;
117
+ }