import "./components/ui/tidal.css"; import { CircleDot, Waves } from "lucide-react"; import { useState, type MouseEvent as ReactMouseEvent } from "react"; import { TidalFooter, type TidalFooterGroup, type TidalFooterLinkItem } from "./components/ui/footer"; import "./components/ui/footer.css"; const tidalExampleStyles = ".tidal-scope .footer-demo-specimen {\n width: 100%;\n min-width: 0;\n padding: clamp(14px, 3vw, 36px);\n color: var(--t-ink);\n background: var(--t-subtle);\n container: footer-demo / inline-size;\n}\n\n.tidal-scope .footer-demo-brand {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n width: fit-content;\n max-width: 100%;\n min-height: 44px;\n color: var(--t-ink);\n text-decoration: none;\n border-radius: var(--t-radius-control);\n}\n\n.tidal-scope .footer-demo-brand > svg {\n flex: none;\n}\n\n.tidal-scope .footer-demo-brand > span {\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .footer-demo-brand small {\n display: block;\n margin-top: 7px;\n color: var(--t-muted);\n font-size: 11px;\n font-weight: 650;\n line-height: 1.4;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.tidal-scope .footer-demo-brand:focus-visible,\n.tidal-scope .footer-demo-legal-links a:focus-visible,\n.tidal-scope .footer-demo-destinations summary:focus-visible {\n outline: 2px solid var(--t-ink);\n outline-offset: 3px;\n}\n\n.tidal-scope .footer-demo-status {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .footer-demo-status > svg {\n flex: none;\n fill: currentColor;\n}\n\n.tidal-scope .footer-demo-legal-links {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px 16px;\n min-width: 0;\n}\n\n.tidal-scope .footer-demo-legal-links a {\n display: inline-flex;\n align-items: center;\n min-width: 44px;\n min-height: 44px;\n color: var(--t-muted);\n text-decoration: none;\n border-radius: 6px;\n}\n\n.tidal-scope .footer-demo-legal-links a:hover {\n color: var(--t-ink);\n}\n\n.tidal-scope .footer-demo-destinations {\n min-width: 0;\n margin-top: 14px;\n padding: clamp(18px, 3vw, 28px);\n background: var(--t-surface);\n border: 1px solid var(--t-border);\n border-radius: var(--t-radius-card);\n}\n\n.tidal-scope .footer-demo-destination-grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 0 18px;\n min-width: 0;\n padding-top: 6px;\n}\n\n.tidal-scope .footer-demo-destinations details {\n min-width: 0;\n border-bottom: 1px solid var(--t-border);\n}\n\n.tidal-scope .footer-demo-destinations summary {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n min-width: 44px;\n min-height: 44px;\n color: var(--t-ink);\n font-size: 11px;\n font-weight: 560;\n list-style: none;\n cursor: pointer;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .footer-demo-destinations summary::-webkit-details-marker {\n display: none;\n}\n\n.tidal-scope .footer-demo-destinations summary::after {\n flex: none;\n content: \"+\";\n color: var(--t-muted);\n font-size: 14px;\n transition: transform 240ms var(--t-ease-spring);\n}\n\n.tidal-scope .footer-demo-destinations details[open] summary::after {\n transform: rotate(45deg);\n}\n\n.tidal-scope .footer-demo-destinations details:target summary {\n text-decoration: underline;\n text-underline-offset: 4px;\n}\n\n.tidal-scope .footer-demo-destinations details > p {\n margin: 0;\n padding: 0 0 14px;\n padding-inline-end: 24px;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.6;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .footer-demo-note {\n margin: 14px 0 0;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.55;\n overflow-wrap: anywhere;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .tidal-scope .footer-demo-destinations details[open] > p {\n animation: footer-demo-detail-in 260ms var(--t-ease-out) both;\n }\n}\n\n@keyframes footer-demo-detail-in {\n from {\n opacity: 0;\n transform: translateY(-5px);\n }\n to {\n opacity: 1;\n transform: none;\n }\n}\n\n@container footer-demo (max-width: 520px) {\n .tidal-scope .footer-demo-destination-grid {\n grid-template-columns: minmax(0, 1fr);\n }\n\n .tidal-scope .footer-demo-destinations details > p {\n padding-inline-end: 10px;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tidal-scope .footer-demo-destinations summary::after,\n .tidal-scope .footer-demo-destinations details[open] > p {\n animation: none;\n transition: none;\n transform: none;\n }\n\n .tidal-scope .footer-demo-destinations details[open] summary::after {\n content: \"−\";\n }\n}"; const SAMPLE_GROUPS: readonly TidalFooterGroup[] = [ { id: "product", title: "Product", links: [ { href: "#footer-sample-overview", label: "Workspace overview" }, { href: "#footer-sample-updates", label: "Sample updates" }, ], }, { id: "resources", title: "Resources", links: [ { href: "#footer-sample-guide", label: "Getting started" }, { href: "#footer-sample-accessibility", label: "Accessibility notes" }, ], }, { id: "company", title: "About this sample", links: [ { href: "#footer-sample-about", label: "Fictional product" }, { href: "#footer-sample-privacy", label: "Local data boundary" }, ], }, ]; const REFERENCE_LINKS: readonly TidalFooterLinkItem[] = [ { href: "https://react.dev/", label: "React documentation", target: "_blank", rel: "noreferrer", }, { href: "https://www.typescriptlang.org/docs/", label: "TypeScript documentation", target: "_blank", rel: "noreferrer", }, ]; const SAMPLE_DESTINATIONS = [ { id: "footer-sample-overview", title: "Workspace overview", detail: "Northstar is a fictional workspace used only to demonstrate this footer's local destinations.", }, { id: "footer-sample-updates", title: "Sample updates", detail: "The sample has no release feed. This panel is the complete local destination for the updates link.", }, { id: "footer-sample-guide", title: "Getting started", detail: "Choose a sample view, inspect its labels, and use the native links without creating an account.", }, { id: "footer-sample-accessibility", title: "Accessibility notes", detail: "Footer links keep native destinations, visible focus, readable wrapping, and forty-four pixel targets.", }, { id: "footer-sample-about", title: "Fictional product", detail: "Northstar, its workspace, and every statement in this scene are original sample content.", }, { id: "footer-sample-privacy", title: "Local data boundary", detail: "This demonstration sends no form data, creates no profile, and stores no visitor information.", }, { id: "footer-sample-terms", title: "Sample terms", detail: "There is no account, purchase, subscription, or binding service attached to this fictional sample.", }, ] as const; export function FooterDemo() { const [openDestinations, setOpenDestinations] = useState( [], ); function revealLinkedDestination(event: ReactMouseEvent) { if ( event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.altKey || event.shiftKey ) return; const anchor = (event.target as HTMLElement).closest( 'a[href^="#footer-sample-"]', ); if (!anchor) return; const id = anchor.hash.slice(1); if (!SAMPLE_DESTINATIONS.some((destination) => destination.id === id)) return; // The disclosure must be open before the browser performs native fragment // navigation, otherwise the destination text remains hidden. const details = event.currentTarget.querySelector( `details#${id}`, ); if (details) details.open = true; setOpenDestinations((current) => current.includes(id) ? current : [...current, id], ); } return (
); } export default function AgentExample() { return (
); }