"use client"; import "./components/ui/tidal.css"; import { useId, useState } from "react"; import { TidalSaasLandingTemplate, type TidalSaasLandingHeroConfig } from "./components/ui/saas-landing-template"; import "./components/ui/saas-landing-template.css"; import "./components/ui/navigation-bar.css"; import "./components/ui/hero-section.css"; import "./components/ui/feature-grid.css"; import "./components/ui/testimonial-grid.css"; import "./components/ui/call-to-action-section.css"; import "./components/ui/footer.css"; function tidalExampleAvatarDataUri(seed: unknown) { const text = String(seed).replace(/[^a-z0-9]/gi, "").slice(-2) || "UI"; const palette = ["#333333", "#555555", "#777777", "#999999", "#bbbbbb"]; const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length]; const svg = ``; return `data:image/svg+xml,${encodeURIComponent(svg)}`; } function tidalExampleImageDataUri(label: string) { const safeLabel = label.replace(/[<>&]/g, "").slice(0, 28) || "Sample image"; const svg = `${safeLabel}`; return `data:image/svg+xml,${encodeURIComponent(svg)}`; } export interface SaasLandingTemplateDemoProps { theme?: "light" | "dark"; } const FEATURE_ITEMS = [ { id: "plan", title: "Plan with the whole team", description: "Keep briefs, owners, and next steps together in one readable workspace.", size: "wide" as const, tone: "ink" as const, children: ( ), }, { id: "review", title: "Review the work", description: "Bring feedback and decisions into the same view as the work they affect.", children: ( ), }, { id: "deliver", title: "See what ships next", description: "Use a concise delivery view to understand what is ready and what needs attention.", children: ( ), }, ] as const; export function SaasLandingTemplateDemo({ theme = "light", }: SaasLandingTemplateDemoProps) { const instanceId = useId().replace(/:/g, ""); const topId = `saas-sample-top-${instanceId}`; const featuresId = `saas-sample-features-${instanceId}`; const storiesId = `saas-sample-stories-${instanceId}`; const nextStepId = `saas-sample-next-step-${instanceId}`; const [preview, setPreview] = useState<"overview" | "workspace">("overview"); const hero: TidalSaasLandingHeroConfig = { eyebrow: "Fictional product sample", title: "Move every project forward.", description: "Northstar gives product teams one calm place to plan work, review decisions, and prepare the next release.", actions: [ { id: "features", kind: "link", label: "Explore the workflow", href: `#${featuresId}`, linkProps: { variant: "primary" }, }, { id: "preview", kind: "button", label: preview === "overview" ? "Preview workspace" : "Show overview", buttonProps: { variant: "secondary", "aria-pressed": preview === "workspace", onClick: () => setPreview((current) => current === "overview" ? "workspace" : "overview", ), }, }, ], visualLabel: "Fictional workspace summary", visual: (
{preview === "overview" ? "Sample portfolio overview" : "Sample workspace selected"}
Active projects
{preview === "overview" ? "08" : "03"}
Reviews ready
{preview === "overview" ? "04" : "02"}
Decisions this week
{preview === "overview" ? "12" : "05"}
Open questions
{preview === "overview" ? "06" : "01"}
), }; return ( setPreview("overview"), }, ], }} hero={hero} features={{ title: "A clearer rhythm for product work", description: "Each section is supplied by the page consumer and can connect to real product state and destinations.", items: FEATURE_ITEMS, }} testimonials={{ eyebrow: null, title: "How the sample team works", description: "These statements and identities are fictional and demonstrate the layout only.", items: [ { id: "ava", quote: "The weekly plan stays short enough to read, and every decision has a visible owner.", name: "Ava Brooks", role: "Fictional product lead", context: "Sample teammate statement", featured: true, avatar: { src: tidalExampleAvatarDataUri("01"), alt: "Fictional portrait of Ava Brooks", }, }, { id: "noah", quote: "Reviews are easier when the brief, open questions, and next step sit together.", name: "Noah Reed", role: "Fictional design lead", context: "Sample teammate statement", avatar: { src: tidalExampleAvatarDataUri("02"), alt: "Fictional portrait of Noah Reed", }, }, { id: "mila", quote: "I can see what is ready without rebuilding the same status update in another document.", name: "Mila Chen", role: "Fictional engineering lead", context: "Sample teammate statement", avatar: { src: tidalExampleAvatarDataUri("03"), alt: "Fictional portrait of Mila Chen", }, }, ], }} callToAction={{ eyebrow: "Sample next step", title: "Review the workspace before connecting your product.", description: "Use the local preview to inspect the assembled page and its native destinations.", detailLabel: "Current preview", detail: preview === "overview" ? "Portfolio overview" : "Workspace view", actions: [ { id: "preview", kind: "button", label: "Change sample view", onAction: () => setPreview((current) => current === "overview" ? "workspace" : "overview", ), }, { id: "features", kind: "link", label: "Review the features", href: `#${featuresId}`, }, ], footer: "No account, workspace, request, or stored record is created.", }} footer={{ brand: Northstar, description: "A fictional SaaS landing page sample.", groups: [ { id: "product", title: "Product", links: [ { href: `#${featuresId}`, label: "Features" }, { href: `#${storiesId}`, label: "Team stories" }, ], }, { id: "page", title: "Page", links: [ { href: `#${topId}`, label: "Overview" }, { href: `#${nextStepId}`, label: "Next step" }, ], }, ], legal: Fictional sample content for local review., }} sampleNote={ {preview === "overview" ? "Local sample view: portfolio overview." : "Local sample view: workspace selected."} } /> ); } export default function AgentExample() { return (
); }