import "./components/ui/tidal.css"; import { useState, type ChangeEvent, type MouseEvent } from "react"; import { TidalFooterDirectory, type TidalFooterDirectoryGroup, type TidalFooterDirectoryLinkItem } from "./components/ui/footer-directory"; import "./components/ui/footer-directory.css"; const tidalExampleStyles = ".tidal-scope .footer-pilot-demo,\n.tidal-scope .footer-pilot-demo * {\n box-sizing: border-box;\n}\n\n.tidal-scope .footer-pilot-demo {\n inline-size: min(100%, 1240px);\n min-inline-size: 0;\n margin-inline: auto;\n}"; function isPlainPrimary(event: MouseEvent) { return ( event.button === 0 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey ); } export function FooterDirectoryDemo() { const [query, setQuery] = useState(""); const [notice, setNotice] = useState( "Directory ready. Search or open a group.", ); const [openGroups, setOpenGroups] = useState(["product"]); function sampleLink( id: string, label: string, searchText: string, description: string, ): TidalFooterDirectoryLinkItem { return { id, label, description, searchText, href: "#footer-directory-demo", onClick: (event: import("react").MouseEvent) => { if (!isPlainPrimary(event)) return; event.preventDefault(); setNotice(`${label} selected locally. No navigation occurred.`); }, }; } const groups: readonly TidalFooterDirectoryGroup[] = [ { id: "product", title: "Product", description: "Core surfaces and capabilities.", links: [ sampleLink( "components", "Components", "components library blocks", "Browse the component library", ), sampleLink( "templates", "Templates", "templates page layouts", "Start from a full page", ), sampleLink( "release-notes", "Release notes", "release notes updates", "Review shipped changes", ), ], }, { id: "resources", title: "Resources", description: "Practical material for teams.", links: [ sampleLink( "docs", "Documentation", "docs guides usage", "Read implementation guidance", ), sampleLink( "examples", "Examples", "examples demos", "See complete working patterns", ), sampleLink( "support", "Support", "support help contact", "Find help for a project", ), ], }, { id: "company", title: "Company", description: "The people and operating notes.", links: [ sampleLink( "about", "About TidalUI", "about company team", "Learn how the library is made", ), sampleLink( "journal", "Journal", "journal writing notes", "Read product notes", ), sampleLink( "contact", "Contact", "contact email", "Start a useful conversation", ), ], }, { id: "legal", title: "Legal", description: "Policies and access terms.", links: [ sampleLink( "license", "License", "license terms usage", "Review usage terms", ), sampleLink( "privacy", "Privacy", "privacy data", "Read the privacy policy", ), sampleLink( "accessibility", "Accessibility", "accessibility inclusion", "Review accessibility commitments", ), ], }, ]; function handleSearch(event: ChangeEvent) { setQuery(event.currentTarget.value); setNotice( event.currentTarget.value ? "Filtering destinations locally." : "Directory ready. Search or open a group.", ); } return ( ); } export default function AgentExample() { return (
); }