"use client"; import "./components/ui/tidal.css"; import { useState } from "react"; import { TidalFeatureTabs, type TidalFeatureTab } from "./components/ui/feature-tabs"; import "./components/ui/feature-tabs.css"; const tidalExampleStyles = ".tidal-scope.feature-tabs-demo {\n width: min(100%, 1080px);\n min-width: 0;\n display: grid;\n gap: 12px;\n}\n\n.tidal-scope .feature-tabs-scene {\n min-width: 0;\n color: var(--t-ink);\n}\n\n.tidal-scope .feature-tabs-route-scene {\n display: grid;\n gap: 8px;\n}\n\n.tidal-scope .feature-tabs-route-scene > div {\n min-width: 0;\n min-height: 52px;\n display: grid;\n grid-template-columns: 30px minmax(0, 1fr) auto;\n align-items: center;\n gap: 10px;\n padding: 8px 10px;\n border: 1px solid var(--t-border);\n border-radius: 9px;\n background: var(--t-subtle);\n}\n\n.tidal-scope .feature-tabs-route-scene > div[data-complete=\"true\"] {\n background: var(--t-surface);\n}\n\n.tidal-scope .feature-tabs-route-scene span,\n.tidal-scope .feature-tabs-plan-scene > li > span {\n color: var(--t-muted);\n font:\n 11px/1.2 ui-monospace,\n monospace;\n}\n\n.tidal-scope .feature-tabs-route-scene strong,\n.tidal-scope .feature-tabs-plan-scene strong {\n min-width: 0;\n font-size: 12px;\n line-height: 1.4;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .feature-tabs-route-scene small,\n.tidal-scope .feature-tabs-plan-scene small {\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.35;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .feature-tabs-route-scene label {\n min-width: 0;\n display: grid;\n gap: 6px;\n margin-top: 4px;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.4;\n}\n\n.tidal-scope .feature-tabs-route-scene input {\n width: 100%;\n min-width: 0;\n min-height: 44px;\n padding: 9px 11px;\n border: 1px solid var(--t-border);\n border-radius: 9px;\n color: var(--t-ink);\n background: var(--t-surface);\n font: inherit;\n font-size: 16px;\n}\n\n.tidal-scope .feature-tabs-route-scene input:focus-visible {\n outline: 2px solid var(--t-accent);\n outline-offset: 2px;\n}\n\n.tidal-scope .feature-tabs-plan-scene {\n list-style: none;\n display: grid;\n gap: 0;\n margin: 0;\n padding: 0;\n}\n\n.tidal-scope .feature-tabs-plan-scene > li {\n position: relative;\n min-width: 0;\n min-height: 64px;\n display: grid;\n grid-template-columns: 34px minmax(0, 1fr);\n align-items: center;\n gap: 12px;\n padding: 8px 0;\n border-bottom: 1px solid var(--t-border);\n}\n\n.tidal-scope .feature-tabs-plan-scene > li::before {\n content: \"\";\n width: 8px;\n height: 8px;\n position: absolute;\n inset-inline-start: 14px;\n top: 6px;\n border: 1px solid var(--t-ink);\n border-radius: 50%;\n background: var(--t-surface);\n}\n\n.tidal-scope .feature-tabs-plan-scene > li[data-state=\"complete\"]::before,\n.tidal-scope .feature-tabs-plan-scene > li[data-state=\"current\"]::before {\n background: var(--t-ink);\n}\n\n.tidal-scope .feature-tabs-plan-scene > li > div {\n min-width: 0;\n display: grid;\n gap: 3px;\n}\n\n.tidal-scope .feature-tabs-review-scene {\n display: grid;\n gap: 14px;\n}\n\n.tidal-scope .feature-tabs-review-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n font-size: 11px;\n line-height: 1.4;\n}\n\n.tidal-scope .feature-tabs-review-header span {\n color: var(--t-muted);\n}\n\n.tidal-scope .feature-tabs-review-paper {\n display: grid;\n gap: 10px;\n min-height: 144px;\n padding: 20px;\n border: 1px solid var(--t-border);\n border-radius: 10px;\n background: var(--t-subtle);\n}\n\n.tidal-scope .feature-tabs-review-paper span {\n height: 10px;\n border-radius: 2px;\n background: var(--t-border);\n}\n\n.tidal-scope .feature-tabs-review-paper span:nth-child(2) {\n width: 78%;\n}\n\n.tidal-scope .feature-tabs-review-paper span:nth-child(3) {\n width: 91%;\n}\n\n.tidal-scope .feature-tabs-review-paper span:nth-child(4) {\n width: 58%;\n}\n\n.tidal-scope .feature-tabs-review-scene > p {\n margin: 0;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.55;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .feature-tabs-demo-note {\n margin: 0;\n padding-inline: 4px;\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.5;\n overflow-wrap: anywhere;\n}\n\n@container tidal-feature-tabs (max-width: 420px) {\n .tidal-scope .feature-tabs-route-scene > div {\n grid-template-columns: 28px minmax(0, 1fr);\n }\n\n .tidal-scope .feature-tabs-route-scene > div > small {\n grid-column: 2;\n }\n\n .tidal-scope .feature-tabs-review-header {\n align-items: flex-start;\n flex-direction: column;\n }\n}"; export function FeatureTabsDemo() { const [value, setValue] = useState("route"); const [routed, setRouted] = useState(2); const [planned, setPlanned] = useState(false); const [approved, setApproved] = useState(false); const [note, setNote] = useState(""); const items: readonly TidalFeatureTab[] = [ { id: "route", label: "Route requests", eyebrow: "Intake", title: "Put the next request in the right hands.", description: "Assign an owner and keep the latest context beside the work instead of forwarding another thread.", detail: `${routed} of 3 sample requests are routed.`, visualLabel: "Sample request routing queue", visual: (
{approved ? "Approved locally. No external workflow was changed." : "The final headline and mobile crop are ready to inspect."}
Sample data. Changes stay in this preview.