"use client"; import "./components/ui/tidal.css"; import { useId, useState } from "react"; import { TidalSheet, type TidalSheetPlacement } from "./components/ui/sheet-drawer"; import "./components/ui/sheet-drawer.css"; const tidalExampleStyles = ".tidal-scope .sheet-demo,\n.tidal-scope .sheet-demo * {\n box-sizing: border-box;\n}\n\n.tidal-scope .sheet-demo {\n display: grid;\n width: min(100%, 980px);\n min-width: 0;\n gap: 24px;\n margin-inline: auto;\n padding: clamp(16px, 4vw, 42px);\n}\n\n\n.tidal-scope .sheet-demo-status {\n margin: 0;\n overflow-wrap: anywhere;\n}\n\n\n.tidal-scope .sheet-demo-status {\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.55;\n}\n\n.tidal-scope .sheet-demo-toolbar {\n display: flex;\n min-width: 0;\n align-items: end;\n justify-content: space-between;\n gap: 16px;\n padding: 18px;\n background: var(--t-subtle);\n border: 1px solid var(--t-border);\n border-radius: 18px;\n flex-wrap: wrap;\n}\n\n.tidal-scope .sheet-demo-toolbar > fieldset {\n display: flex;\n min-width: 0;\n gap: 5px;\n padding: 0;\n margin: 0;\n border: 0;\n flex-wrap: wrap;\n}\n\n.tidal-scope .sheet-demo-toolbar > fieldset > legend {\n width: 100%;\n margin-bottom: 6px;\n font-size: 11px;\n font-weight: 700;\n}\n\n.tidal-scope .sheet-demo-toolbar > fieldset label {\n position: relative;\n min-width: 0;\n}\n\n.tidal-scope .sheet-demo-toolbar > fieldset input {\n position: absolute;\n opacity: 0;\n}\n\n.tidal-scope .sheet-demo-toolbar > fieldset span {\n display: inline-flex;\n min-width: 72px;\n min-height: 44px;\n align-items: center;\n justify-content: center;\n padding: 8px 10px;\n color: var(--t-muted);\n background: var(--t-surface);\n border: 1px solid var(--t-border);\n border-radius: 10px;\n font-size: 11px;\n font-weight: 680;\n text-transform: capitalize;\n cursor: pointer;\n}\n\n.tidal-scope .sheet-demo-toolbar > fieldset input:checked + span {\n color: var(--t-surface);\n background: var(--t-ink);\n border-color: var(--t-ink);\n}\n\n.tidal-scope .sheet-demo-toolbar > fieldset input:focus-visible + span {\n outline: 2px solid var(--t-accent);\n outline-offset: 3px;\n}\n\n.tidal-scope .sheet-demo-fields {\n display: grid;\n gap: 18px;\n}\n\n.tidal-scope .sheet-demo-fields fieldset {\n display: grid;\n gap: 8px;\n padding: 0;\n margin: 0;\n border: 0;\n}\n\n.tidal-scope .sheet-demo-fields legend {\n margin-bottom: 3px;\n font-size: 11px;\n font-weight: 700;\n}\n\n.tidal-scope .sheet-demo-fields fieldset label,\n.tidal-scope .sheet-demo-check {\n display: flex;\n min-width: 0;\n min-height: 54px;\n align-items: center;\n gap: 10px;\n padding: 10px;\n border: 1px solid var(--t-border);\n border-radius: 10px;\n cursor: pointer;\n}\n\n.tidal-scope .sheet-demo-fields input {\n width: 20px;\n height: 20px;\n flex: none;\n accent-color: var(--t-ink);\n}\n\n.tidal-scope .sheet-demo-fields label > span {\n display: grid;\n min-width: 0;\n gap: 2px;\n}\n\n.tidal-scope .sheet-demo-fields label :is(strong, small) {\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .sheet-demo-fields label strong {\n font-size: 11px;\n}\n\n.tidal-scope .sheet-demo-fields label small {\n color: var(--t-muted);\n font-size: 11px;\n line-height: 1.45;\n}\n\n.tidal-scope .sheet-demo-fields dl {\n display: grid;\n gap: 1px;\n margin: 0;\n overflow: hidden;\n background: var(--t-border);\n border: 1px solid var(--t-border);\n border-radius: 10px;\n}\n\n.tidal-scope .sheet-demo-fields dl > div {\n display: flex;\n min-width: 0;\n justify-content: space-between;\n gap: 14px;\n padding: 11px;\n background: var(--t-surface);\n}\n\n.tidal-scope .sheet-demo-fields :is(dt, dd) {\n min-width: 0;\n margin: 0;\n font-size: 11px;\n overflow-wrap: anywhere;\n}\n\n.tidal-scope .sheet-demo-fields dt {\n color: var(--t-muted);\n}\n\n.tidal-scope .sheet-demo-actions {\n display: flex;\n min-width: 0;\n justify-content: flex-end;\n gap: 8px;\n flex-wrap: wrap;\n}\n\n.tidal-scope .sheet-demo-actions button {\n min-width: 116px;\n min-height: 44px;\n padding: 8px 12px;\n color: var(--t-ink);\n background: var(--t-surface);\n border: 1px solid var(--t-border);\n border-radius: 10px;\n font: inherit;\n font-size: 11px;\n font-weight: 680;\n}\n\n.tidal-scope .sheet-demo-actions button:last-child {\n color: var(--t-surface);\n background: var(--t-ink);\n border-color: var(--t-ink);\n}\n\n@media (max-width: 390px) {\n .tidal-scope .sheet-demo {\n padding: 12px;\n }\n\n .tidal-scope .sheet-demo-toolbar > fieldset {\n display: grid;\n width: 100%;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n\n .tidal-scope .sheet-demo-toolbar > fieldset > legend {\n grid-column: 1 / -1;\n }\n\n .tidal-scope .sheet-demo-toolbar > fieldset span,\n .tidal-scope .sheet-demo-actions button {\n width: 100%;\n }\n\n .tidal-scope .sheet-demo-actions {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n width: 100%;\n }\n .tidal-scope .sheet-demo-actions button {\n min-width: 0;\n }\n}\n\n@media (hover: none) and (pointer: coarse) {\n .tidal-scope .sheet-demo-toolbar > fieldset span,\n .tidal-scope .sheet-demo-actions button {\n font-size: 16px;\n }\n}"; export function SheetDrawerDemo({ theme = "light", }: { theme?: "light" | "dark"; }) { const generatedId = useId().replace(/:/g, ""); const [open, setOpen] = useState(false); const [placement, setPlacement] = useState("right"); const [density, setDensity] = useState("comfortable"); const [draftDensity, setDraftDensity] = useState("comfortable"); const [showHints, setShowHints] = useState(true); const [draftShowHints, setDraftShowHints] = useState(true); const [status, setStatus] = useState("Choose a placement and open settings."); return (
Desktop placement {(["left", "right", "top", "bottom"] as const).map((value) => ( ))}
{ if (nextOpen) { setDraftDensity(density); setDraftShowHints(showHints); } setOpen(nextOpen); }} title="View settings" description="Choose how your workspace appears." placement={placement} mobilePlacement="bottom" defaultTriggerLabel="Open settings" onEscapeKeyDown={() => setStatus("Settings closed.")} onPointerDownOutside={() => setStatus("Settings closed.")} footer={
} >
Row density
Density
{draftDensity}
Hints
{draftShowHints ? "Shown" : "Hidden"}

{status} Sample data. Changes stay in this preview.

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