@nextworks/blocks-templates 0.1.0-alpha.0
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.
- package/README.md +42 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/templates/digitalagency/Page.d.ts +3 -0
- package/dist/templates/digitalagency/Page.d.ts.map +1 -0
- package/dist/templates/digitalagency/Page.js +18 -0
- package/dist/templates/digitalagency/Page.jsx +33 -0
- package/dist/templates/digitalagency/PresetThemeVars.d.ts +11 -0
- package/dist/templates/digitalagency/PresetThemeVars.d.ts.map +1 -0
- package/dist/templates/digitalagency/PresetThemeVars.js +29 -0
- package/dist/templates/digitalagency/PresetThemeVars.jsx +31 -0
- package/dist/templates/digitalagency/components/About.d.ts +3 -0
- package/dist/templates/digitalagency/components/About.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/About.js +45 -0
- package/dist/templates/digitalagency/components/About.jsx +43 -0
- package/dist/templates/digitalagency/components/CTA.d.ts +3 -0
- package/dist/templates/digitalagency/components/CTA.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/CTA.js +33 -0
- package/dist/templates/digitalagency/components/CTA.jsx +31 -0
- package/dist/templates/digitalagency/components/Contact.d.ts +3 -0
- package/dist/templates/digitalagency/components/Contact.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/Contact.js +91 -0
- package/dist/templates/digitalagency/components/Contact.jsx +91 -0
- package/dist/templates/digitalagency/components/Footer.d.ts +8 -0
- package/dist/templates/digitalagency/components/Footer.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/Footer.js +58 -0
- package/dist/templates/digitalagency/components/Footer.jsx +58 -0
- package/dist/templates/digitalagency/components/Hero.d.ts +7 -0
- package/dist/templates/digitalagency/components/Hero.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/Hero.js +69 -0
- package/dist/templates/digitalagency/components/Hero.jsx +71 -0
- package/dist/templates/digitalagency/components/Navbar.d.ts +21 -0
- package/dist/templates/digitalagency/components/Navbar.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/Navbar.js +86 -0
- package/dist/templates/digitalagency/components/Navbar.jsx +85 -0
- package/dist/templates/digitalagency/components/NetworkPattern.d.ts +8 -0
- package/dist/templates/digitalagency/components/NetworkPattern.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/NetworkPattern.js +38 -0
- package/dist/templates/digitalagency/components/NetworkPattern.jsx +128 -0
- package/dist/templates/digitalagency/components/Portfolio.d.ts +3 -0
- package/dist/templates/digitalagency/components/Portfolio.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/Portfolio.js +108 -0
- package/dist/templates/digitalagency/components/Portfolio.jsx +110 -0
- package/dist/templates/digitalagency/components/Pricing.d.ts +3 -0
- package/dist/templates/digitalagency/components/Pricing.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/Pricing.js +82 -0
- package/dist/templates/digitalagency/components/Pricing.jsx +84 -0
- package/dist/templates/digitalagency/components/Process.d.ts +3 -0
- package/dist/templates/digitalagency/components/Process.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/Process.js +38 -0
- package/dist/templates/digitalagency/components/Process.jsx +40 -0
- package/dist/templates/digitalagency/components/Services.d.ts +3 -0
- package/dist/templates/digitalagency/components/Services.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/Services.js +34 -0
- package/dist/templates/digitalagency/components/Services.jsx +36 -0
- package/dist/templates/digitalagency/components/Team.d.ts +3 -0
- package/dist/templates/digitalagency/components/Team.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/Team.js +14 -0
- package/dist/templates/digitalagency/components/Team.jsx +14 -0
- package/dist/templates/digitalagency/components/Testimonials.d.ts +3 -0
- package/dist/templates/digitalagency/components/Testimonials.d.ts.map +1 -0
- package/dist/templates/digitalagency/components/Testimonials.js +38 -0
- package/dist/templates/digitalagency/components/Testimonials.jsx +40 -0
- package/dist/templates/gallery/PresetThemeVars.d.ts +15 -0
- package/dist/templates/gallery/PresetThemeVars.d.ts.map +1 -0
- package/dist/templates/gallery/PresetThemeVars.js +31 -0
- package/dist/templates/gallery/PresetThemeVars.jsx +33 -0
- package/dist/templates/gallery/page.d.ts +2 -0
- package/dist/templates/gallery/page.d.ts.map +1 -0
- package/dist/templates/gallery/page.js +151 -0
- package/dist/templates/gallery/page.jsx +216 -0
- package/dist/templates/productlaunch/Page.d.ts +2 -0
- package/dist/templates/productlaunch/Page.d.ts.map +1 -0
- package/dist/templates/productlaunch/Page.js +20 -0
- package/dist/templates/productlaunch/Page.jsx +42 -0
- package/dist/templates/productlaunch/PresetThemeVars.d.ts +16 -0
- package/dist/templates/productlaunch/PresetThemeVars.d.ts.map +1 -0
- package/dist/templates/productlaunch/PresetThemeVars.js +28 -0
- package/dist/templates/productlaunch/PresetThemeVars.jsx +30 -0
- package/dist/templates/productlaunch/components/About.d.ts +15 -0
- package/dist/templates/productlaunch/components/About.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/About.js +59 -0
- package/dist/templates/productlaunch/components/About.jsx +57 -0
- package/dist/templates/productlaunch/components/CTA.d.ts +3 -0
- package/dist/templates/productlaunch/components/CTA.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/CTA.js +39 -0
- package/dist/templates/productlaunch/components/CTA.jsx +37 -0
- package/dist/templates/productlaunch/components/Contact.d.ts +3 -0
- package/dist/templates/productlaunch/components/Contact.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/Contact.js +93 -0
- package/dist/templates/productlaunch/components/Contact.jsx +93 -0
- package/dist/templates/productlaunch/components/FAQ.d.ts +7 -0
- package/dist/templates/productlaunch/components/FAQ.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/FAQ.js +64 -0
- package/dist/templates/productlaunch/components/FAQ.jsx +63 -0
- package/dist/templates/productlaunch/components/Features.d.ts +6 -0
- package/dist/templates/productlaunch/components/Features.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/Features.js +52 -0
- package/dist/templates/productlaunch/components/Features.jsx +51 -0
- package/dist/templates/productlaunch/components/Footer.d.ts +5 -0
- package/dist/templates/productlaunch/components/Footer.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/Footer.js +103 -0
- package/dist/templates/productlaunch/components/Footer.jsx +102 -0
- package/dist/templates/productlaunch/components/Hero.d.ts +6 -0
- package/dist/templates/productlaunch/components/Hero.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/Hero.js +70 -0
- package/dist/templates/productlaunch/components/Hero.jsx +69 -0
- package/dist/templates/productlaunch/components/Navbar.d.ts +25 -0
- package/dist/templates/productlaunch/components/Navbar.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/Navbar.js +82 -0
- package/dist/templates/productlaunch/components/Navbar.jsx +81 -0
- package/dist/templates/productlaunch/components/Pricing.d.ts +5 -0
- package/dist/templates/productlaunch/components/Pricing.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/Pricing.js +77 -0
- package/dist/templates/productlaunch/components/Pricing.jsx +76 -0
- package/dist/templates/productlaunch/components/ProcessTimeline.d.ts +5 -0
- package/dist/templates/productlaunch/components/ProcessTimeline.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/ProcessTimeline.js +63 -0
- package/dist/templates/productlaunch/components/ProcessTimeline.jsx +62 -0
- package/dist/templates/productlaunch/components/ServicesGrid.d.ts +5 -0
- package/dist/templates/productlaunch/components/ServicesGrid.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/ServicesGrid.js +41 -0
- package/dist/templates/productlaunch/components/ServicesGrid.jsx +40 -0
- package/dist/templates/productlaunch/components/Team.d.ts +5 -0
- package/dist/templates/productlaunch/components/Team.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/Team.js +72 -0
- package/dist/templates/productlaunch/components/Team.jsx +71 -0
- package/dist/templates/productlaunch/components/Testimonials.d.ts +5 -0
- package/dist/templates/productlaunch/components/Testimonials.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/Testimonials.js +55 -0
- package/dist/templates/productlaunch/components/Testimonials.jsx +54 -0
- package/dist/templates/productlaunch/components/TrustBadges.d.ts +5 -0
- package/dist/templates/productlaunch/components/TrustBadges.d.ts.map +1 -0
- package/dist/templates/productlaunch/components/TrustBadges.js +50 -0
- package/dist/templates/productlaunch/components/TrustBadges.jsx +49 -0
- package/dist/templates/saasdashboard/Page.d.ts +2 -0
- package/dist/templates/saasdashboard/Page.d.ts.map +1 -0
- package/dist/templates/saasdashboard/Page.js +15 -0
- package/dist/templates/saasdashboard/Page.jsx +35 -0
- package/dist/templates/saasdashboard/PresetThemeVars.d.ts +11 -0
- package/dist/templates/saasdashboard/PresetThemeVars.d.ts.map +1 -0
- package/dist/templates/saasdashboard/PresetThemeVars.js +27 -0
- package/dist/templates/saasdashboard/PresetThemeVars.jsx +29 -0
- package/dist/templates/saasdashboard/components/Contact.d.ts +3 -0
- package/dist/templates/saasdashboard/components/Contact.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/Contact.js +83 -0
- package/dist/templates/saasdashboard/components/Contact.jsx +90 -0
- package/dist/templates/saasdashboard/components/Dashboard.d.ts +21 -0
- package/dist/templates/saasdashboard/components/Dashboard.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/Dashboard.js +120 -0
- package/dist/templates/saasdashboard/components/Dashboard.jsx +168 -0
- package/dist/templates/saasdashboard/components/FAQ.d.ts +2 -0
- package/dist/templates/saasdashboard/components/FAQ.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/FAQ.js +35 -0
- package/dist/templates/saasdashboard/components/FAQ.jsx +34 -0
- package/dist/templates/saasdashboard/components/Features.d.ts +2 -0
- package/dist/templates/saasdashboard/components/Features.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/Features.js +55 -0
- package/dist/templates/saasdashboard/components/Features.jsx +54 -0
- package/dist/templates/saasdashboard/components/Footer.d.ts +2 -0
- package/dist/templates/saasdashboard/components/Footer.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/Footer.js +52 -0
- package/dist/templates/saasdashboard/components/Footer.jsx +51 -0
- package/dist/templates/saasdashboard/components/Hero.d.ts +2 -0
- package/dist/templates/saasdashboard/components/Hero.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/Hero.js +65 -0
- package/dist/templates/saasdashboard/components/Hero.jsx +70 -0
- package/dist/templates/saasdashboard/components/Hero_mask.d.ts +3 -0
- package/dist/templates/saasdashboard/components/Hero_mask.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/Hero_mask.js +73 -0
- package/dist/templates/saasdashboard/components/Hero_mask.jsx +85 -0
- package/dist/templates/saasdashboard/components/Navbar.d.ts +25 -0
- package/dist/templates/saasdashboard/components/Navbar.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/Navbar.js +83 -0
- package/dist/templates/saasdashboard/components/Navbar.jsx +84 -0
- package/dist/templates/saasdashboard/components/Pricing.d.ts +2 -0
- package/dist/templates/saasdashboard/components/Pricing.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/Pricing.js +65 -0
- package/dist/templates/saasdashboard/components/Pricing.jsx +64 -0
- package/dist/templates/saasdashboard/components/SmoothScroll.d.ts +2 -0
- package/dist/templates/saasdashboard/components/SmoothScroll.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/SmoothScroll.js +87 -0
- package/dist/templates/saasdashboard/components/SmoothScroll.jsx +87 -0
- package/dist/templates/saasdashboard/components/Testimonials.d.ts +2 -0
- package/dist/templates/saasdashboard/components/Testimonials.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/Testimonials.js +35 -0
- package/dist/templates/saasdashboard/components/Testimonials.jsx +39 -0
- package/dist/templates/saasdashboard/components/TrustBadges.d.ts +2 -0
- package/dist/templates/saasdashboard/components/TrustBadges.d.ts.map +1 -0
- package/dist/templates/saasdashboard/components/TrustBadges.js +37 -0
- package/dist/templates/saasdashboard/components/TrustBadges.jsx +36 -0
- package/package.json +27 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Navbar } from "./components/Navbar";
|
|
3
|
+
import { Hero } from "./components/Hero";
|
|
4
|
+
import { Features } from "./components/Features";
|
|
5
|
+
import { Testimonials } from "./components/Testimonials";
|
|
6
|
+
import { TrustBadges } from "./components/TrustBadges";
|
|
7
|
+
import { Contact } from "./components/Contact";
|
|
8
|
+
import { Pricing } from "./components/Pricing";
|
|
9
|
+
import { FAQ } from "./components/FAQ";
|
|
10
|
+
import { Footer } from "./components/Footer";
|
|
11
|
+
import { SmoothScroll } from "./components/SmoothScroll";
|
|
12
|
+
import { PresetThemeVars } from "./PresetThemeVars";
|
|
13
|
+
export function SaaSDashboard() {
|
|
14
|
+
return (_jsx(PresetThemeVars, { children: _jsxs("div", { children: [_jsx(SmoothScroll, {}), _jsx(Navbar, {}), _jsx("section", { id: "home", children: _jsx(Hero, {}) }), _jsx(Features, {}), _jsx(Testimonials, {}), _jsx(TrustBadges, {}), _jsx("section", { id: "pricing", children: _jsx(Pricing, {}) }), _jsx("section", { id: "contact", children: _jsx(Contact, {}) }), _jsx("section", { id: "faq", children: _jsx(FAQ, {}) }), _jsx(Footer, {})] }) }));
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Navbar } from "./components/Navbar";
|
|
2
|
+
import { Hero } from "./components/Hero";
|
|
3
|
+
import { Features } from "./components/Features";
|
|
4
|
+
import { Testimonials } from "./components/Testimonials";
|
|
5
|
+
import { TrustBadges } from "./components/TrustBadges";
|
|
6
|
+
import { Contact } from "./components/Contact";
|
|
7
|
+
import { Pricing } from "./components/Pricing";
|
|
8
|
+
import { FAQ } from "./components/FAQ";
|
|
9
|
+
import { Footer } from "./components/Footer";
|
|
10
|
+
import { SmoothScroll } from "./components/SmoothScroll";
|
|
11
|
+
import { PresetThemeVars } from "./PresetThemeVars";
|
|
12
|
+
export function SaaSDashboard() {
|
|
13
|
+
return (<PresetThemeVars>
|
|
14
|
+
<div>
|
|
15
|
+
<SmoothScroll />
|
|
16
|
+
<Navbar />
|
|
17
|
+
<section id="home">
|
|
18
|
+
<Hero />
|
|
19
|
+
</section>
|
|
20
|
+
<Features />
|
|
21
|
+
<Testimonials />
|
|
22
|
+
<TrustBadges />
|
|
23
|
+
<section id="pricing">
|
|
24
|
+
<Pricing />
|
|
25
|
+
</section>
|
|
26
|
+
<section id="contact">
|
|
27
|
+
<Contact />
|
|
28
|
+
</section>
|
|
29
|
+
<section id="faq">
|
|
30
|
+
<FAQ />
|
|
31
|
+
</section>
|
|
32
|
+
<Footer />
|
|
33
|
+
</div>
|
|
34
|
+
</PresetThemeVars>);
|
|
35
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Props = React.PropsWithChildren<{
|
|
3
|
+
className?: string;
|
|
4
|
+
}>;
|
|
5
|
+
/**
|
|
6
|
+
* SaaSDashboard template theme variables wrapper.
|
|
7
|
+
* Sky/blue leaning palette; adjust values to your preset branding.
|
|
8
|
+
*/
|
|
9
|
+
export declare function PresetThemeVars({ className, children }: Props): React.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=PresetThemeVars.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PresetThemeVars.d.ts","sourceRoot":"","sources":["../../../src/templates/saasdashboard/PresetThemeVars.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,KAAK,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,KAAK,qBAsE7D"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "@nextworks/blocks-core";
|
|
3
|
+
/**
|
|
4
|
+
* SaaSDashboard template theme variables wrapper.
|
|
5
|
+
* Sky/blue leaning palette; adjust values to your preset branding.
|
|
6
|
+
*/
|
|
7
|
+
export function PresetThemeVars({ className, children }) {
|
|
8
|
+
return (_jsx("div", { className: cn(
|
|
9
|
+
// Shared button ring
|
|
10
|
+
"[--btn-ring:theme(colors.sky.500)] dark:[--btn-ring:theme(colors.sky.400)]",
|
|
11
|
+
// Inputs
|
|
12
|
+
"[--input-bg:theme(colors.white)] dark:[--input-bg:theme(colors.gray.900)]", "[--input-fg:theme(colors.gray.900)] dark:[--input-fg:theme(colors.gray.100)]", "[--input-placeholder:theme(colors.gray.400)] dark:[--input-placeholder:theme(colors.gray.500)]", "[--input-border:theme(colors.sky.200)] dark:[--input-border:theme(colors.sky.700)]", "[--input-focus-ring:theme(colors.sky.500)] dark:[--input-focus-ring:theme(colors.sky.400)]", "[--input-ring-offset:theme(colors.white)] dark:[--input-ring-offset:theme(colors.gray.900)]",
|
|
13
|
+
// Cards
|
|
14
|
+
"[--card-bg:theme(colors.white)] dark:[--card-bg:theme(colors.gray.900)]", "[--card-fg:theme(colors.gray.900)] dark:[--card-fg:theme(colors.gray.100)]", "[--card-title-fg:theme(colors.gray.900)] dark:[--card-title-fg:theme(colors.gray.100)]", "[--card-muted-fg:theme(colors.gray.500)] dark:[--card-muted-fg:theme(colors.gray.400)]", "[--card-border:theme(colors.gray.200)] dark:[--card-border:theme(colors.gray.800)]", "[--card-shadow:0_6px_20px_rgba(0,0,0,0.06)]",
|
|
15
|
+
// Badges/Chips
|
|
16
|
+
"[--badge-bg:theme(colors.sky.50)] dark:[--badge-bg:theme(colors.sky.950)]", "[--badge-fg:theme(colors.sky.700)] dark:[--badge-fg:theme(colors.sky.300)]", "[--badge-border:theme(colors.sky.200)] dark:[--badge-border:theme(colors.sky.800)]", "[--badge-active-bg:theme(colors.sky.600)] dark:[--badge-active-bg:theme(colors.sky.500)]", "[--badge-active-fg:theme(colors.white)] dark:[--badge-active-fg:theme(colors.white)]", "[--badge-active-border:theme(colors.sky.700)] dark:[--badge-active-border:theme(colors.sky.400)]",
|
|
17
|
+
// Headings/Subheadings
|
|
18
|
+
"[--heading-fg:theme(colors.gray.900)] dark:[--heading-fg:theme(colors.gray.100)]", "[--subheading-fg:theme(colors.gray.600)] dark:[--subheading-fg:theme(colors.gray.300)]", "[--description-fg:theme(colors.gray.700)] dark:[--description-fg:theme(colors.gray.200)]",
|
|
19
|
+
// Hero background (optional)
|
|
20
|
+
"[--hero-bg:theme(colors.white)] dark:[--hero-bg:theme(colors.slate.950)]",
|
|
21
|
+
// Footer
|
|
22
|
+
"[--footer-bg:transparent] dark:[--footer-bg:transparent]", "[--footer-fg:theme(colors.gray.800)] dark:[--footer-fg:theme(colors.gray.100)]", "[--footer-heading-fg:theme(colors.gray.900)] dark:[--footer-heading-fg:theme(colors.gray.100)]", "[--footer-link-fg:theme(colors.gray.700)] dark:[--footer-link-fg:theme(colors.gray.300)]", "[--footer-link-hover-fg:theme(colors.sky.700)] dark:[--footer-link-hover-fg:theme(colors.sky.400)]", "[--footer-link-hover-bg:theme(colors.sky.50)] dark:[--footer-link-hover-bg:color-mix(in_oklab,oklch(0.18_0.05_235)_20%,transparent)]", "[--footer-muted-fg:theme(colors.gray.500)] dark:[--footer-muted-fg:theme(colors.gray.400)]", "[--footer-border:theme(colors.gray.200)] dark:[--footer-border:theme(colors.gray.800)]",
|
|
23
|
+
// Table (optional)
|
|
24
|
+
"[--table-fg:inherit]", "[--table-muted-fg:theme(colors.gray.500)] dark:[--table-muted-fg:theme(colors.gray.400)]", "[--table-head-fg:theme(colors.gray.700)] dark:[--table-head-fg:theme(colors.gray.300)]", "[--table-border:theme(colors.gray.200)] dark:[--table-border:theme(colors.gray.800)]", "[--table-row-hover-bg:theme(colors.gray.50)] dark:[--table-row-hover-bg:theme(colors.gray.900)]",
|
|
25
|
+
// FAQ specific (optional overrides; fall back to --btn-* and --card-*)
|
|
26
|
+
"[--faq-btn-bg:var(--btn-bg)] dark:[--faq-btn-bg:var(--btn-bg)]", "[--faq-btn-fg:var(--btn-fg)] dark:[--faq-btn-fg:var(--btn-fg)]", "[--faq-btn-hover-bg:var(--btn-hover-bg)] dark:[--faq-btn-hover-bg:var(--btn-hover-bg)]", "[--faq-btn-hover-fg:var(--btn-hover-fg)] dark:[--faq-btn-hover-fg:var(--btn-hover-fg)]", "[--faq-answer-bg:var(--card-bg)] dark:[--faq-answer-bg:var(--card-bg)]", "[--faq-answer-fg:var(--card-fg)] dark:[--faq-answer-fg:var(--card-fg)]", className), children: children }));
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn } from "@nextworks/blocks-core";
|
|
3
|
+
/**
|
|
4
|
+
* SaaSDashboard template theme variables wrapper.
|
|
5
|
+
* Sky/blue leaning palette; adjust values to your preset branding.
|
|
6
|
+
*/
|
|
7
|
+
export function PresetThemeVars({ className, children }) {
|
|
8
|
+
return (<div className={cn(
|
|
9
|
+
// Shared button ring
|
|
10
|
+
"[--btn-ring:theme(colors.sky.500)] dark:[--btn-ring:theme(colors.sky.400)]",
|
|
11
|
+
// Inputs
|
|
12
|
+
"[--input-bg:theme(colors.white)] dark:[--input-bg:theme(colors.gray.900)]", "[--input-fg:theme(colors.gray.900)] dark:[--input-fg:theme(colors.gray.100)]", "[--input-placeholder:theme(colors.gray.400)] dark:[--input-placeholder:theme(colors.gray.500)]", "[--input-border:theme(colors.sky.200)] dark:[--input-border:theme(colors.sky.700)]", "[--input-focus-ring:theme(colors.sky.500)] dark:[--input-focus-ring:theme(colors.sky.400)]", "[--input-ring-offset:theme(colors.white)] dark:[--input-ring-offset:theme(colors.gray.900)]",
|
|
13
|
+
// Cards
|
|
14
|
+
"[--card-bg:theme(colors.white)] dark:[--card-bg:theme(colors.gray.900)]", "[--card-fg:theme(colors.gray.900)] dark:[--card-fg:theme(colors.gray.100)]", "[--card-title-fg:theme(colors.gray.900)] dark:[--card-title-fg:theme(colors.gray.100)]", "[--card-muted-fg:theme(colors.gray.500)] dark:[--card-muted-fg:theme(colors.gray.400)]", "[--card-border:theme(colors.gray.200)] dark:[--card-border:theme(colors.gray.800)]", "[--card-shadow:0_6px_20px_rgba(0,0,0,0.06)]",
|
|
15
|
+
// Badges/Chips
|
|
16
|
+
"[--badge-bg:theme(colors.sky.50)] dark:[--badge-bg:theme(colors.sky.950)]", "[--badge-fg:theme(colors.sky.700)] dark:[--badge-fg:theme(colors.sky.300)]", "[--badge-border:theme(colors.sky.200)] dark:[--badge-border:theme(colors.sky.800)]", "[--badge-active-bg:theme(colors.sky.600)] dark:[--badge-active-bg:theme(colors.sky.500)]", "[--badge-active-fg:theme(colors.white)] dark:[--badge-active-fg:theme(colors.white)]", "[--badge-active-border:theme(colors.sky.700)] dark:[--badge-active-border:theme(colors.sky.400)]",
|
|
17
|
+
// Headings/Subheadings
|
|
18
|
+
"[--heading-fg:theme(colors.gray.900)] dark:[--heading-fg:theme(colors.gray.100)]", "[--subheading-fg:theme(colors.gray.600)] dark:[--subheading-fg:theme(colors.gray.300)]", "[--description-fg:theme(colors.gray.700)] dark:[--description-fg:theme(colors.gray.200)]",
|
|
19
|
+
// Hero background (optional)
|
|
20
|
+
"[--hero-bg:theme(colors.white)] dark:[--hero-bg:theme(colors.slate.950)]",
|
|
21
|
+
// Footer
|
|
22
|
+
"[--footer-bg:transparent] dark:[--footer-bg:transparent]", "[--footer-fg:theme(colors.gray.800)] dark:[--footer-fg:theme(colors.gray.100)]", "[--footer-heading-fg:theme(colors.gray.900)] dark:[--footer-heading-fg:theme(colors.gray.100)]", "[--footer-link-fg:theme(colors.gray.700)] dark:[--footer-link-fg:theme(colors.gray.300)]", "[--footer-link-hover-fg:theme(colors.sky.700)] dark:[--footer-link-hover-fg:theme(colors.sky.400)]", "[--footer-link-hover-bg:theme(colors.sky.50)] dark:[--footer-link-hover-bg:color-mix(in_oklab,oklch(0.18_0.05_235)_20%,transparent)]", "[--footer-muted-fg:theme(colors.gray.500)] dark:[--footer-muted-fg:theme(colors.gray.400)]", "[--footer-border:theme(colors.gray.200)] dark:[--footer-border:theme(colors.gray.800)]",
|
|
23
|
+
// Table (optional)
|
|
24
|
+
"[--table-fg:inherit]", "[--table-muted-fg:theme(colors.gray.500)] dark:[--table-muted-fg:theme(colors.gray.400)]", "[--table-head-fg:theme(colors.gray.700)] dark:[--table-head-fg:theme(colors.gray.300)]", "[--table-border:theme(colors.gray.200)] dark:[--table-border:theme(colors.gray.800)]", "[--table-row-hover-bg:theme(colors.gray.50)] dark:[--table-row-hover-bg:theme(colors.gray.900)]",
|
|
25
|
+
// FAQ specific (optional overrides; fall back to --btn-* and --card-*)
|
|
26
|
+
"[--faq-btn-bg:var(--btn-bg)] dark:[--faq-btn-bg:var(--btn-bg)]", "[--faq-btn-fg:var(--btn-fg)] dark:[--faq-btn-fg:var(--btn-fg)]", "[--faq-btn-hover-bg:var(--btn-hover-bg)] dark:[--faq-btn-hover-bg:var(--btn-hover-bg)]", "[--faq-btn-hover-fg:var(--btn-hover-fg)] dark:[--faq-btn-hover-fg:var(--btn-hover-fg)]", "[--faq-answer-bg:var(--card-bg)] dark:[--faq-answer-bg:var(--card-bg)]", "[--faq-answer-fg:var(--card-fg)] dark:[--faq-answer-fg:var(--card-fg)]", className)}>
|
|
27
|
+
{children}
|
|
28
|
+
</div>);
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Contact.d.ts","sourceRoot":"","sources":["../../../../src/templates/saasdashboard/components/Contact.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAmD1B,wBAAgB,OAAO,sBA2EtB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Contact as SharedContact, } from "@nextworks/blocks-sections";
|
|
4
|
+
const saasContactFormData = [
|
|
5
|
+
{
|
|
6
|
+
id: "name",
|
|
7
|
+
label: "Full Name",
|
|
8
|
+
placeholder: "Jane Doe",
|
|
9
|
+
required: true,
|
|
10
|
+
type: "text",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "email",
|
|
14
|
+
label: "Work Email",
|
|
15
|
+
placeholder: "jane@company.com",
|
|
16
|
+
required: true,
|
|
17
|
+
type: "email",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "company",
|
|
21
|
+
label: "Company",
|
|
22
|
+
placeholder: "Acme Inc.",
|
|
23
|
+
required: false,
|
|
24
|
+
type: "text",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "teamSize",
|
|
28
|
+
label: "Team Size",
|
|
29
|
+
placeholder: "e.g. 10–50",
|
|
30
|
+
required: false,
|
|
31
|
+
type: "text",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "useCase",
|
|
35
|
+
label: "Primary Use Case",
|
|
36
|
+
placeholder: "e.g. Product analytics, Ops dashboards",
|
|
37
|
+
required: false,
|
|
38
|
+
type: "text",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "message",
|
|
42
|
+
label: "What would you like to see in the demo?",
|
|
43
|
+
placeholder: "Share goals, data sources, timeline…",
|
|
44
|
+
required: true,
|
|
45
|
+
type: "textarea",
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
export function Contact() {
|
|
49
|
+
const handleFormSubmit = (e) => {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
const data = Object.fromEntries(new FormData(e.currentTarget).entries());
|
|
52
|
+
console.log("Contact form submitted:", data);
|
|
53
|
+
};
|
|
54
|
+
return (_jsxs("div", { className: "relative", children: [_jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 -z-10 [background-image:radial-gradient(60rem_60rem_at_0%_0%,rgba(59,130,246,0.08),transparent_40%),radial-gradient(50rem_50rem_at_100%_100%,rgba(168,85,247,0.06),transparent_40%)] opacity-20" }), _jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 -z-10 [background-image:radial-gradient(rgba(255,255,255,0.07)_1px,transparent_1px)] [background-size:14px_14px] opacity-[0.05]" }), _jsx(SharedContact, { id: "contact", ariaLabel: "SaaS dashboard contact section", fields: saasContactFormData, contactHeaderText: "Ready to See DashFlow in Action?", contactSubHeaderText: "Tell us a bit about your team and we'll reach out with a tailored demo.",
|
|
55
|
+
// Root and section
|
|
56
|
+
className: "w-full", section: {
|
|
57
|
+
className: "py-16 px-6 bg-gradient-to-b from-slate-900/95 via-slate-950 to-slate-900/95 dark:from-slate-950 dark:via-slate-900 dark:to-slate-950",
|
|
58
|
+
}, container: { className: "mx-auto max-w-4xl" },
|
|
59
|
+
// Header slots
|
|
60
|
+
headerWrapper: { className: "mb-10 text-center" }, headerText: {
|
|
61
|
+
className: "text-3xl font-bold font-inter text-white",
|
|
62
|
+
}, subheaderText: {
|
|
63
|
+
className: "mt-3 text-base text-white/90 max-w-2xl mx-auto font-inter",
|
|
64
|
+
},
|
|
65
|
+
// Form container
|
|
66
|
+
form: {
|
|
67
|
+
className: "bg-card p-8 rounded-xl shadow-xl border border-border bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)]",
|
|
68
|
+
},
|
|
69
|
+
// Fields and inputs
|
|
70
|
+
fieldsWrapper: { className: "space-y-4" }, field: { className: "space-y-2" }, label: {
|
|
71
|
+
className: "text-card-foreground text-sm font-medium font-poppins block",
|
|
72
|
+
}, input: {
|
|
73
|
+
className: "w-full p-3 rounded-md font-inter border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)] focus-visible:ring-2 focus-visible:ring-[var(--input-focus-ring)] focus-visible:ring-offset-[var(--input-ring-offset)]",
|
|
74
|
+
}, textarea: {
|
|
75
|
+
className: "w-full p-3 rounded-md resize-vertical min-h-[120px] font-inter border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)] focus-visible:ring-2 focus-visible:ring-[var(--input-focus-ring)] focus-visible:ring-offset-[var(--input-ring-offset)]",
|
|
76
|
+
},
|
|
77
|
+
// Submit button (wrapper/style/text split)
|
|
78
|
+
submitButtonWrapper: { className: "pt-2" }, submitButtonStyle: {
|
|
79
|
+
variant: "default",
|
|
80
|
+
size: "lg",
|
|
81
|
+
className: "w-full bg-blue-600 hover:bg-blue-700 dark:bg-blue-600 dark:hover:bg-blue-400 text-white font-semibold font-inter shadow-lg hover:shadow-xl transition-all duration-200 hover:-translate-y-0.5",
|
|
82
|
+
}, submitButtonText: "Send Request", onSubmit: handleFormSubmit })] }));
|
|
83
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Contact as SharedContact, } from "@nextworks/blocks-sections";
|
|
4
|
+
const saasContactFormData = [
|
|
5
|
+
{
|
|
6
|
+
id: "name",
|
|
7
|
+
label: "Full Name",
|
|
8
|
+
placeholder: "Jane Doe",
|
|
9
|
+
required: true,
|
|
10
|
+
type: "text",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "email",
|
|
14
|
+
label: "Work Email",
|
|
15
|
+
placeholder: "jane@company.com",
|
|
16
|
+
required: true,
|
|
17
|
+
type: "email",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "company",
|
|
21
|
+
label: "Company",
|
|
22
|
+
placeholder: "Acme Inc.",
|
|
23
|
+
required: false,
|
|
24
|
+
type: "text",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "teamSize",
|
|
28
|
+
label: "Team Size",
|
|
29
|
+
placeholder: "e.g. 10–50",
|
|
30
|
+
required: false,
|
|
31
|
+
type: "text",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "useCase",
|
|
35
|
+
label: "Primary Use Case",
|
|
36
|
+
placeholder: "e.g. Product analytics, Ops dashboards",
|
|
37
|
+
required: false,
|
|
38
|
+
type: "text",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: "message",
|
|
42
|
+
label: "What would you like to see in the demo?",
|
|
43
|
+
placeholder: "Share goals, data sources, timeline…",
|
|
44
|
+
required: true,
|
|
45
|
+
type: "textarea",
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
export function Contact() {
|
|
49
|
+
const handleFormSubmit = (e) => {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
const data = Object.fromEntries(new FormData(e.currentTarget).entries());
|
|
52
|
+
console.log("Contact form submitted:", data);
|
|
53
|
+
};
|
|
54
|
+
return (<div className="relative">
|
|
55
|
+
{/* Gradient mesh overlay */}
|
|
56
|
+
<div aria-hidden className="pointer-events-none absolute inset-0 -z-10 [background-image:radial-gradient(60rem_60rem_at_0%_0%,rgba(59,130,246,0.08),transparent_40%),radial-gradient(50rem_50rem_at_100%_100%,rgba(168,85,247,0.06),transparent_40%)] opacity-20"/>
|
|
57
|
+
{/* Fine noise/dots texture */}
|
|
58
|
+
<div aria-hidden className="pointer-events-none absolute inset-0 -z-10 [background-image:radial-gradient(rgba(255,255,255,0.07)_1px,transparent_1px)] [background-size:14px_14px] opacity-[0.05]"/>
|
|
59
|
+
|
|
60
|
+
<SharedContact id="contact" ariaLabel="SaaS dashboard contact section" fields={saasContactFormData} contactHeaderText="Ready to See DashFlow in Action?" contactSubHeaderText="Tell us a bit about your team and we'll reach out with a tailored demo."
|
|
61
|
+
// Root and section
|
|
62
|
+
className="w-full" section={{
|
|
63
|
+
className: "py-16 px-6 bg-gradient-to-b from-slate-900/95 via-slate-950 to-slate-900/95 dark:from-slate-950 dark:via-slate-900 dark:to-slate-950",
|
|
64
|
+
}} container={{ className: "mx-auto max-w-4xl" }}
|
|
65
|
+
// Header slots
|
|
66
|
+
headerWrapper={{ className: "mb-10 text-center" }} headerText={{
|
|
67
|
+
className: "text-3xl font-bold font-inter text-white",
|
|
68
|
+
}} subheaderText={{
|
|
69
|
+
className: "mt-3 text-base text-white/90 max-w-2xl mx-auto font-inter",
|
|
70
|
+
}}
|
|
71
|
+
// Form container
|
|
72
|
+
form={{
|
|
73
|
+
className: "bg-card p-8 rounded-xl shadow-xl border border-border bg-[var(--card-bg)] text-[var(--card-fg)] border-[var(--card-border)]",
|
|
74
|
+
}}
|
|
75
|
+
// Fields and inputs
|
|
76
|
+
fieldsWrapper={{ className: "space-y-4" }} field={{ className: "space-y-2" }} label={{
|
|
77
|
+
className: "text-card-foreground text-sm font-medium font-poppins block",
|
|
78
|
+
}} input={{
|
|
79
|
+
className: "w-full p-3 rounded-md font-inter border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)] focus-visible:ring-2 focus-visible:ring-[var(--input-focus-ring)] focus-visible:ring-offset-[var(--input-ring-offset)]",
|
|
80
|
+
}} textarea={{
|
|
81
|
+
className: "w-full p-3 rounded-md resize-vertical min-h-[120px] font-inter border-[var(--input-border)] bg-[var(--input-bg)] text-[var(--input-fg)] placeholder:text-[var(--input-placeholder)] focus-visible:ring-2 focus-visible:ring-[var(--input-focus-ring)] focus-visible:ring-offset-[var(--input-ring-offset)]",
|
|
82
|
+
}}
|
|
83
|
+
// Submit button (wrapper/style/text split)
|
|
84
|
+
submitButtonWrapper={{ className: "pt-2" }} submitButtonStyle={{
|
|
85
|
+
variant: "default",
|
|
86
|
+
size: "lg",
|
|
87
|
+
className: "w-full bg-blue-600 hover:bg-blue-700 dark:bg-blue-600 dark:hover:bg-blue-400 text-white font-semibold font-inter shadow-lg hover:shadow-xl transition-all duration-200 hover:-translate-y-0.5",
|
|
88
|
+
}} submitButtonText="Send Request" onSubmit={handleFormSubmit}/>
|
|
89
|
+
</div>);
|
|
90
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type FloatingCard = {
|
|
3
|
+
position: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
text: string;
|
|
6
|
+
};
|
|
7
|
+
type Stat = {
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
11
|
+
interface DashboardProps {
|
|
12
|
+
stats: Stat[];
|
|
13
|
+
projects: string[];
|
|
14
|
+
floatingCards: FloatingCard[];
|
|
15
|
+
activeTab?: string;
|
|
16
|
+
navItems?: string[];
|
|
17
|
+
}
|
|
18
|
+
export declare function Dashboard({ stats, projects, floatingCards, activeTab, navItems, }: DashboardProps): React.JSX.Element;
|
|
19
|
+
declare function FloatingCard({ position, icon, text }: FloatingCard): React.JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=Dashboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dashboard.d.ts","sourceRoot":"","sources":["../../../../src/templates/saasdashboard/components/Dashboard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,KAAK,YAAY,GAAG;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,IAAI,GAAG;IACV,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,UAAU,cAAc;IACtB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,SAAuB,EACvB,QAA4C,GAC7C,EAAE,cAAc,qBA2DhB;AAoLD,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,YAAY,qBAwB3D"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
export function Dashboard({ stats, projects, floatingCards, activeTab = "Analytics", navItems = ["Analytics", "Projects", "Team"], }) {
|
|
5
|
+
return (_jsxs("div", { className: "relative isolate", children: [_jsx(DashboardMockup, { stats: stats, projects: projects, activeTab: activeTab, navItems: navItems }), floatingCards.map(({ position, icon, text }) => (_jsx(FloatingCard, { position: position, icon: icon, text: text }, position))), _jsx("style", { children: `
|
|
6
|
+
.dashboard-mockup {
|
|
7
|
+
transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
|
|
8
|
+
transition: transform 0.3s ease;
|
|
9
|
+
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
|
|
10
|
+
}
|
|
11
|
+
.dashboard-mockup:hover {
|
|
12
|
+
transform: perspective(1000px) rotateY(-2deg) rotateX(2deg);
|
|
13
|
+
}
|
|
14
|
+
.trend-line {
|
|
15
|
+
clip-path: polygon(
|
|
16
|
+
0 100%,
|
|
17
|
+
20% 80%,
|
|
18
|
+
40% 85%,
|
|
19
|
+
60% 60%,
|
|
20
|
+
80% 50%,
|
|
21
|
+
100% 20%
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
@keyframes growUp {
|
|
25
|
+
0% {
|
|
26
|
+
height: 0;
|
|
27
|
+
opacity: 0;
|
|
28
|
+
}
|
|
29
|
+
100% {
|
|
30
|
+
opacity: 1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
@keyframes floatAnim {
|
|
34
|
+
0%,
|
|
35
|
+
100% {
|
|
36
|
+
transform: translateY(0px);
|
|
37
|
+
}
|
|
38
|
+
50% {
|
|
39
|
+
transform: translateY(-20px);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
` })] }));
|
|
43
|
+
}
|
|
44
|
+
function DashboardMockup({ stats, projects, activeTab, navItems, }) {
|
|
45
|
+
const [tilt, setTilt] = useState({ rx: 0, ry: 0 });
|
|
46
|
+
const targetTilt = useRef({ rx: 0, ry: 0 });
|
|
47
|
+
const rafId = useRef(null);
|
|
48
|
+
const animate = () => {
|
|
49
|
+
setTilt((prev) => {
|
|
50
|
+
const smoothing = 0.15;
|
|
51
|
+
const nextRx = prev.rx + (targetTilt.current.rx - prev.rx) * smoothing;
|
|
52
|
+
const nextRy = prev.ry + (targetTilt.current.ry - prev.ry) * smoothing;
|
|
53
|
+
return { rx: nextRx, ry: nextRy };
|
|
54
|
+
});
|
|
55
|
+
rafId.current = requestAnimationFrame(animate);
|
|
56
|
+
};
|
|
57
|
+
const handleMove = (e) => {
|
|
58
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
59
|
+
const x = e.clientX - rect.left;
|
|
60
|
+
const y = e.clientY - rect.top;
|
|
61
|
+
const rx = (y / rect.height - 0.5) * -6; // rotateX up to ~±3deg
|
|
62
|
+
const ry = (x / rect.width - 0.5) * 6; // rotateY up to ~±3deg
|
|
63
|
+
targetTilt.current = { rx, ry };
|
|
64
|
+
if (rafId.current == null)
|
|
65
|
+
rafId.current = requestAnimationFrame(animate);
|
|
66
|
+
};
|
|
67
|
+
const handleLeave = () => {
|
|
68
|
+
targetTilt.current = { rx: 0, ry: 0 };
|
|
69
|
+
};
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
return () => {
|
|
72
|
+
if (rafId.current != null)
|
|
73
|
+
cancelAnimationFrame(rafId.current);
|
|
74
|
+
};
|
|
75
|
+
}, []);
|
|
76
|
+
return (_jsxs("div", { className: "dashboard-mockup transform-gpu rounded-2xl border border-blue-500/20 p-6 shadow-2xl ring-1 ring-blue-500/10 backdrop-blur transition-transform duration-150 ease-out motion-reduce:transition-none " +
|
|
77
|
+
"bg-slate-900/80 dark:bg-slate-900/80", style: {
|
|
78
|
+
willChange: "transform",
|
|
79
|
+
transform: `perspective(1000px) rotateX(${tilt.rx}deg) rotateY(${tilt.ry}deg)`,
|
|
80
|
+
}, onMouseMove: handleMove, onMouseLeave: handleLeave, children: [_jsx(DashboardHeader, { activeTab: activeTab, navItems: navItems }), _jsx(DashboardGrid, { stats: stats, projects: projects })] }));
|
|
81
|
+
}
|
|
82
|
+
function DashboardHeader({ activeTab = "Analytics", navItems = ["Analytics", "Projects", "Team"], }) {
|
|
83
|
+
return (_jsxs("div", { className: "mb-6 flex items-center justify-between border-b border-blue-500/10 pb-4", children: [_jsx("div", { className: "text-[1.1rem] font-semibold text-slate-200", children: "Business Overview" }), _jsx("div", { className: "hidden gap-3 md:flex", children: navItems.map((item) => (_jsx("div", { className: "rounded-md px-3 py-2 text-sm " +
|
|
84
|
+
(item === activeTab
|
|
85
|
+
? "bg-gradient-to-br from-blue-500 to-purple-500 text-white"
|
|
86
|
+
: "bg-blue-500/10 text-blue-400"), children: item }, item))) })] }));
|
|
87
|
+
}
|
|
88
|
+
function DashboardGrid({ stats, projects, }) {
|
|
89
|
+
return (_jsxs("div", { className: "mb-4 grid grid-cols-[2fr_1fr] gap-4", children: [_jsx(ChartArea, {}), _jsx(StatsPanel, { stats: stats }), _jsx(ProjectList, { projects: projects })] }));
|
|
90
|
+
}
|
|
91
|
+
function ChartArea() {
|
|
92
|
+
const barHeights = [30, 45, 35, 60, 55, 75, 70, 85, 90, 100];
|
|
93
|
+
return (_jsxs("div", { className: "relative overflow-hidden rounded-lg border border-blue-500/10 bg-slate-900/50 p-4", children: [_jsx("div", { className: "mb-2 text-sm text-slate-300", children: "Revenue Growth" }), _jsxs("div", { className: "relative h-32 overflow-hidden rounded-md", style: {
|
|
94
|
+
background: "linear-gradient(45deg, transparent 20%, rgba(59,130,246,0.1) 20%, rgba(59,130,246,0.1) 40%, transparent 40%, transparent 60%, rgba(139,92,246,0.1) 60%, rgba(139,92,246,0.1) 80%, transparent 80%)",
|
|
95
|
+
}, children: [_jsx("div", { className: "absolute inset-[10px] flex items-end gap-[3px]", children: barHeights.map((h, i) => (_jsx("div", { className: "flex-1 rounded-t bg-gradient-to-b from-blue-500 to-purple-500", style: {
|
|
96
|
+
minHeight: "20px",
|
|
97
|
+
height: `${h}%`,
|
|
98
|
+
animation: "growUp 2s ease-out both",
|
|
99
|
+
animationDelay: `${(i + 1) * 0.1}s`,
|
|
100
|
+
} }, i))) }), _jsx("div", { className: "trend-line absolute top-5 right-[5%] left-[5%] h-[2px] rounded bg-gradient-to-r from-emerald-500 to-blue-500 opacity-80" })] })] }));
|
|
101
|
+
}
|
|
102
|
+
function StatsPanel({ stats }) {
|
|
103
|
+
return (_jsx("div", { className: "flex flex-col gap-2", children: stats.map((s, i) => (_jsxs("div", { className: "rounded-lg border border-blue-500/10 bg-slate-900/50 p-3", children: [_jsx("div", { className: "text-lg font-bold text-blue-500", children: s.value }), _jsx("div", { className: "text-[0.7rem] text-slate-400 uppercase", children: s.label })] }, i))) }));
|
|
104
|
+
}
|
|
105
|
+
function ProjectList({ projects }) {
|
|
106
|
+
return (_jsxs("div", { className: "col-span-2 rounded-lg border border-blue-500/10 bg-slate-900/50 p-4", children: [_jsx("div", { className: "mb-2 text-sm text-slate-300", children: "Active Projects" }), _jsx("div", { className: "flex flex-wrap gap-2", children: projects.map((p, i) => (_jsx("div", { className: "rounded border border-blue-500/30 bg-gradient-to-br from-blue-500/20 to-purple-500/10 px-2 py-2 text-[0.8rem] text-slate-200", children: p }, i))) })] }));
|
|
107
|
+
}
|
|
108
|
+
function FloatingCard({ position, icon, text }) {
|
|
109
|
+
const positionClasses = position === "card-1"
|
|
110
|
+
? "top-[10%] right-[6%]"
|
|
111
|
+
: position === "card-2"
|
|
112
|
+
? "bottom-[20%] left-[2%]"
|
|
113
|
+
: "top-0 left-0";
|
|
114
|
+
return (_jsxs("div", { className: [
|
|
115
|
+
"absolute z-10 transform-gpu rounded-lg border border-blue-500/20 p-4 shadow-lg",
|
|
116
|
+
"animate-[floatAnim_6s_ease-in-out_infinite]",
|
|
117
|
+
"bg-slate-800 dark:bg-slate-900",
|
|
118
|
+
positionClasses,
|
|
119
|
+
].join(" "), style: { willChange: "transform" }, children: [_jsx("div", { className: "mb-2 flex h-[30px] w-[30px] items-center justify-center rounded-md bg-gradient-to-br from-blue-500 to-purple-500 text-sm text-white", children: icon }), _jsx("div", { className: "text-sm text-slate-300", children: text })] }));
|
|
120
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
3
|
+
export function Dashboard({ stats, projects, floatingCards, activeTab = "Analytics", navItems = ["Analytics", "Projects", "Team"], }) {
|
|
4
|
+
return (<div className="relative isolate">
|
|
5
|
+
<DashboardMockup stats={stats} projects={projects} activeTab={activeTab} navItems={navItems}/>
|
|
6
|
+
|
|
7
|
+
{floatingCards.map(({ position, icon, text }) => (<FloatingCard key={position} position={position} icon={icon} text={text}/>))}
|
|
8
|
+
|
|
9
|
+
<style>{`
|
|
10
|
+
.dashboard-mockup {
|
|
11
|
+
transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
|
|
12
|
+
transition: transform 0.3s ease;
|
|
13
|
+
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
|
|
14
|
+
}
|
|
15
|
+
.dashboard-mockup:hover {
|
|
16
|
+
transform: perspective(1000px) rotateY(-2deg) rotateX(2deg);
|
|
17
|
+
}
|
|
18
|
+
.trend-line {
|
|
19
|
+
clip-path: polygon(
|
|
20
|
+
0 100%,
|
|
21
|
+
20% 80%,
|
|
22
|
+
40% 85%,
|
|
23
|
+
60% 60%,
|
|
24
|
+
80% 50%,
|
|
25
|
+
100% 20%
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
@keyframes growUp {
|
|
29
|
+
0% {
|
|
30
|
+
height: 0;
|
|
31
|
+
opacity: 0;
|
|
32
|
+
}
|
|
33
|
+
100% {
|
|
34
|
+
opacity: 1;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
@keyframes floatAnim {
|
|
38
|
+
0%,
|
|
39
|
+
100% {
|
|
40
|
+
transform: translateY(0px);
|
|
41
|
+
}
|
|
42
|
+
50% {
|
|
43
|
+
transform: translateY(-20px);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`}</style>
|
|
47
|
+
</div>);
|
|
48
|
+
}
|
|
49
|
+
function DashboardMockup({ stats, projects, activeTab, navItems, }) {
|
|
50
|
+
const [tilt, setTilt] = useState({ rx: 0, ry: 0 });
|
|
51
|
+
const targetTilt = useRef({ rx: 0, ry: 0 });
|
|
52
|
+
const rafId = useRef(null);
|
|
53
|
+
const animate = () => {
|
|
54
|
+
setTilt((prev) => {
|
|
55
|
+
const smoothing = 0.15;
|
|
56
|
+
const nextRx = prev.rx + (targetTilt.current.rx - prev.rx) * smoothing;
|
|
57
|
+
const nextRy = prev.ry + (targetTilt.current.ry - prev.ry) * smoothing;
|
|
58
|
+
return { rx: nextRx, ry: nextRy };
|
|
59
|
+
});
|
|
60
|
+
rafId.current = requestAnimationFrame(animate);
|
|
61
|
+
};
|
|
62
|
+
const handleMove = (e) => {
|
|
63
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
64
|
+
const x = e.clientX - rect.left;
|
|
65
|
+
const y = e.clientY - rect.top;
|
|
66
|
+
const rx = (y / rect.height - 0.5) * -6; // rotateX up to ~±3deg
|
|
67
|
+
const ry = (x / rect.width - 0.5) * 6; // rotateY up to ~±3deg
|
|
68
|
+
targetTilt.current = { rx, ry };
|
|
69
|
+
if (rafId.current == null)
|
|
70
|
+
rafId.current = requestAnimationFrame(animate);
|
|
71
|
+
};
|
|
72
|
+
const handleLeave = () => {
|
|
73
|
+
targetTilt.current = { rx: 0, ry: 0 };
|
|
74
|
+
};
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
return () => {
|
|
77
|
+
if (rafId.current != null)
|
|
78
|
+
cancelAnimationFrame(rafId.current);
|
|
79
|
+
};
|
|
80
|
+
}, []);
|
|
81
|
+
return (<div className={"dashboard-mockup transform-gpu rounded-2xl border border-blue-500/20 p-6 shadow-2xl ring-1 ring-blue-500/10 backdrop-blur transition-transform duration-150 ease-out motion-reduce:transition-none " +
|
|
82
|
+
"bg-slate-900/80 dark:bg-slate-900/80"} style={{
|
|
83
|
+
willChange: "transform",
|
|
84
|
+
transform: `perspective(1000px) rotateX(${tilt.rx}deg) rotateY(${tilt.ry}deg)`,
|
|
85
|
+
}} onMouseMove={handleMove} onMouseLeave={handleLeave}>
|
|
86
|
+
<DashboardHeader activeTab={activeTab} navItems={navItems}/>
|
|
87
|
+
<DashboardGrid stats={stats} projects={projects}/>
|
|
88
|
+
</div>);
|
|
89
|
+
}
|
|
90
|
+
function DashboardHeader({ activeTab = "Analytics", navItems = ["Analytics", "Projects", "Team"], }) {
|
|
91
|
+
return (<div className="mb-6 flex items-center justify-between border-b border-blue-500/10 pb-4">
|
|
92
|
+
<div className="text-[1.1rem] font-semibold text-slate-200">
|
|
93
|
+
Business Overview
|
|
94
|
+
</div>
|
|
95
|
+
<div className="hidden gap-3 md:flex">
|
|
96
|
+
{navItems.map((item) => (<div key={item} className={"rounded-md px-3 py-2 text-sm " +
|
|
97
|
+
(item === activeTab
|
|
98
|
+
? "bg-gradient-to-br from-blue-500 to-purple-500 text-white"
|
|
99
|
+
: "bg-blue-500/10 text-blue-400")}>
|
|
100
|
+
{item}
|
|
101
|
+
</div>))}
|
|
102
|
+
</div>
|
|
103
|
+
</div>);
|
|
104
|
+
}
|
|
105
|
+
function DashboardGrid({ stats, projects, }) {
|
|
106
|
+
return (<div className="mb-4 grid grid-cols-[2fr_1fr] gap-4">
|
|
107
|
+
<ChartArea />
|
|
108
|
+
<StatsPanel stats={stats}/>
|
|
109
|
+
<ProjectList projects={projects}/>
|
|
110
|
+
</div>);
|
|
111
|
+
}
|
|
112
|
+
function ChartArea() {
|
|
113
|
+
const barHeights = [30, 45, 35, 60, 55, 75, 70, 85, 90, 100];
|
|
114
|
+
return (<div className="relative overflow-hidden rounded-lg border border-blue-500/10 bg-slate-900/50 p-4">
|
|
115
|
+
<div className="mb-2 text-sm text-slate-300">Revenue Growth</div>
|
|
116
|
+
<div className="relative h-32 overflow-hidden rounded-md" style={{
|
|
117
|
+
background: "linear-gradient(45deg, transparent 20%, rgba(59,130,246,0.1) 20%, rgba(59,130,246,0.1) 40%, transparent 40%, transparent 60%, rgba(139,92,246,0.1) 60%, rgba(139,92,246,0.1) 80%, transparent 80%)",
|
|
118
|
+
}}>
|
|
119
|
+
<div className="absolute inset-[10px] flex items-end gap-[3px]">
|
|
120
|
+
{barHeights.map((h, i) => (<div key={i} className="flex-1 rounded-t bg-gradient-to-b from-blue-500 to-purple-500" style={{
|
|
121
|
+
minHeight: "20px",
|
|
122
|
+
height: `${h}%`,
|
|
123
|
+
animation: "growUp 2s ease-out both",
|
|
124
|
+
animationDelay: `${(i + 1) * 0.1}s`,
|
|
125
|
+
}}/>))}
|
|
126
|
+
</div>
|
|
127
|
+
<div className="trend-line absolute top-5 right-[5%] left-[5%] h-[2px] rounded bg-gradient-to-r from-emerald-500 to-blue-500 opacity-80"/>
|
|
128
|
+
</div>
|
|
129
|
+
</div>);
|
|
130
|
+
}
|
|
131
|
+
function StatsPanel({ stats }) {
|
|
132
|
+
return (<div className="flex flex-col gap-2">
|
|
133
|
+
{stats.map((s, i) => (<div key={i} className="rounded-lg border border-blue-500/10 bg-slate-900/50 p-3">
|
|
134
|
+
<div className="text-lg font-bold text-blue-500">{s.value}</div>
|
|
135
|
+
<div className="text-[0.7rem] text-slate-400 uppercase">
|
|
136
|
+
{s.label}
|
|
137
|
+
</div>
|
|
138
|
+
</div>))}
|
|
139
|
+
</div>);
|
|
140
|
+
}
|
|
141
|
+
function ProjectList({ projects }) {
|
|
142
|
+
return (<div className="col-span-2 rounded-lg border border-blue-500/10 bg-slate-900/50 p-4">
|
|
143
|
+
<div className="mb-2 text-sm text-slate-300">Active Projects</div>
|
|
144
|
+
<div className="flex flex-wrap gap-2">
|
|
145
|
+
{projects.map((p, i) => (<div key={i} className="rounded border border-blue-500/30 bg-gradient-to-br from-blue-500/20 to-purple-500/10 px-2 py-2 text-[0.8rem] text-slate-200">
|
|
146
|
+
{p}
|
|
147
|
+
</div>))}
|
|
148
|
+
</div>
|
|
149
|
+
</div>);
|
|
150
|
+
}
|
|
151
|
+
function FloatingCard({ position, icon, text }) {
|
|
152
|
+
const positionClasses = position === "card-1"
|
|
153
|
+
? "top-[10%] right-[6%]"
|
|
154
|
+
: position === "card-2"
|
|
155
|
+
? "bottom-[20%] left-[2%]"
|
|
156
|
+
: "top-0 left-0";
|
|
157
|
+
return (<div className={[
|
|
158
|
+
"absolute z-10 transform-gpu rounded-lg border border-blue-500/20 p-4 shadow-lg",
|
|
159
|
+
"animate-[floatAnim_6s_ease-in-out_infinite]",
|
|
160
|
+
"bg-slate-800 dark:bg-slate-900",
|
|
161
|
+
positionClasses,
|
|
162
|
+
].join(" ")} style={{ willChange: "transform" }}>
|
|
163
|
+
<div className="mb-2 flex h-[30px] w-[30px] items-center justify-center rounded-md bg-gradient-to-br from-blue-500 to-purple-500 text-sm text-white">
|
|
164
|
+
{icon}
|
|
165
|
+
</div>
|
|
166
|
+
<div className="text-sm text-slate-300">{text}</div>
|
|
167
|
+
</div>);
|
|
168
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FAQ.d.ts","sourceRoot":"","sources":["../../../../src/templates/saasdashboard/components/FAQ.tsx"],"names":[],"mappings":"AA6BA,wBAAgB,GAAG,gCAyBlB"}
|