"use client"; import "./components/ui/tidal.css"; import { useState } from "react"; import { ArrowRight, Check } from "lucide-react"; import { TidalPricingSection, type TidalPricingBillingOption, type TidalPricingPlan } from "./components/ui/pricing-section"; import "./components/ui/pricing-section.css"; const tidalExampleStyles = ".tidal-scope .pricing-section-demo {\n container-type: inline-size;\n width: 100%;\n min-width: 0;\n}\n\n.tidal-scope .pricing-section-demo-selection {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n min-width: 0;\n margin-top: 14px;\n padding: 14px 16px;\n border: 1px solid var(--t-border);\n border-radius: 12px;\n background: var(--t-subtle);\n}\n\n.tidal-scope .pricing-section-demo-selection-mark {\n display: grid;\n flex: none;\n width: 30px;\n height: 30px;\n place-items: center;\n border-radius: 50%;\n background: var(--t-ink);\n color: var(--t-surface);\n}\n\n.tidal-scope .pricing-section-demo-selection > div:last-child {\n min-width: 0;\n}\n\n.tidal-scope .pricing-section-demo-selection > div:last-child > span {\n display: block;\n color: var(--t-muted);\n font-size: 11px;\n letter-spacing: 0.8px;\n text-transform: uppercase;\n}\n\n.tidal-scope .pricing-section-demo-selection p {\n margin: 5px 0 0;\n color: var(--t-ink);\n font-size: 11px;\n line-height: 1.5;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .pricing-section-demo-note {\n margin: 12px 2px 0;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.55;\n overflow-wrap: anywhere;\n}"; const SAMPLE_BILLING_OPTIONS = [ { id: "monthly", label: "Monthly", period: "sample / month", note: "Illustrative monthly figure", }, { id: "annual", label: "Annual", period: "sample / year", note: "Illustrative annual total", }, ] as const satisfies readonly TidalPricingBillingOption[]; const SAMPLE_PLANS = [ { id: "maker", name: "Maker", description: "A focused home for one small product team.", prices: { monthly: { amount: "$18", period: "sample / month", note: "Illustrative sample price", }, annual: { amount: "$180", period: "sample / year", note: "Illustrative sample total", }, }, features: [ { id: "projects", label: "Unlimited project spaces" }, { id: "reviews", label: "Review-ready sharing", detail: "Comment and resolve in one place", }, { id: "history", label: "Activity history", detail: "30 days" }, { id: "roles", label: "Advanced team roles", included: false }, ], action: { label: "Preview Maker", type: "button", "aria-label": "Select Maker sample plan", }, }, { id: "studio", name: "Studio", description: "A roomy operating layer for an active product studio.", badge: "Sample favorite", featured: true, prices: { monthly: { amount: "$42", period: "sample / month", note: "Illustrative sample price", }, annual: { amount: "$420", period: "sample / year", note: "Illustrative sample total", }, }, features: [ { id: "projects", label: "Unlimited project spaces" }, { id: "reviews", label: "Review-ready sharing", detail: "Comment and resolve in one place", }, { id: "history", label: "Activity history", detail: "1 year" }, { id: "roles", label: "Advanced team roles" }, ], action: { label: "Preview Studio", type: "button", "aria-label": "Select Studio sample plan", }, }, { id: "scale", name: "Scale", description: "A deliberate system for several connected teams.", prices: { monthly: { amount: "$78", period: "sample / month", note: "Illustrative sample price", }, annual: { amount: "$780", period: "sample / year", note: "Illustrative sample total", }, }, features: [ { id: "projects", label: "Unlimited project spaces" }, { id: "reviews", label: "Review-ready sharing", detail: "Comment and resolve in one place", }, { id: "history", label: "Activity history", detail: "Unlimited" }, { id: "roles", label: "Advanced team roles" }, ], action: { label: "See Scale details", href: "#sample-selection", "aria-label": "Select Scale sample plan and view local details", }, }, ] as const satisfies readonly TidalPricingPlan[]; export function PricingSectionDemo() { const [billing, setBilling] = useState("monthly"); const [selectedPlanId, setSelectedPlanId] = useState(null); const selectedPlan = SAMPLE_PLANS.find((plan) => plan.id === selectedPlanId); const selectedPrice = selectedPlan?.prices[billing as keyof typeof selectedPlan.prices]; return (
setBilling(option.id)} onPlanSelect={(plan) => setSelectedPlanId(plan.id)} />
Local selection

{selectedPlan && selectedPrice ? `${selectedPlan.name} selected for this preview: ${selectedPrice.amount} ${selectedPrice.period}. ${selectedPrice.note}. No checkout is connected.` : "Select a sample plan to see its supplied value here. No checkout is connected."}

Fictional plan values for local comparison. No checkout or account action is connected.

); } export default function AgentExample() { return (
); }