"use client"; import "./components/ui/tidal.css"; import { useId, useRef, useState, type FormEvent } from "react"; import { TidalNativeSelect } from "./components/ui/native-select"; import "./components/ui/native-select.css"; const tidalExampleStyles = ".tidal-scope .native-select-demo {\n container: native-select-demo / inline-size;\n width: min(100%, 520px);\n min-width: 0;\n color: var(--t-ink);\n}\n\n.tidal-scope .native-select-demo form {\n display: grid;\n gap: 24px;\n}\n\n.tidal-scope .native-select-demo-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 14px;\n min-width: 0;\n padding-top: 18px;\n border-top: 1px solid var(--t-border);\n}\n\n.tidal-scope .native-select-demo-footer > p {\n min-width: 0;\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 .native-select-demo-footer > div {\n display: flex;\n flex: none;\n gap: 8px;\n}\n\n.tidal-scope .native-select-demo-footer button {\n min-height: 44px;\n padding: 9px 14px;\n border: 1px solid var(--t-border);\n border-radius: var(--t-radius-control);\n background: var(--t-surface);\n color: var(--t-ink);\n font: inherit;\n font-size: 12px;\n font-weight: 640;\n cursor: pointer;\n transition:\n background-color 140ms,\n color 140ms,\n transform 140ms var(--t-ease-out);\n}\n\n.tidal-scope .native-select-demo-footer button[type=\"submit\"] {\n border-color: var(--t-ink);\n background: var(--t-ink);\n color: var(--t-surface);\n}\n\n.tidal-scope .native-select-demo-footer button:hover {\n border-color: var(--t-ink);\n}\n\n.tidal-scope .native-select-demo-footer button[type=\"submit\"]:hover {\n background: var(--t-surface);\n color: var(--t-ink);\n}\n\n.tidal-scope .native-select-demo-footer button:active {\n transform: scale(0.98);\n}\n\n.tidal-scope .native-select-demo-footer button:focus-visible {\n outline: 2px solid var(--t-accent);\n outline-offset: 3px;\n}\n\n@container native-select-demo (max-width: 420px) {\n .tidal-scope .native-select-demo-footer {\n align-items: stretch;\n flex-direction: column;\n }\n\n .tidal-scope .native-select-demo-footer > div {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n}\n\n@container native-select-demo (max-width: 300px) {\n .tidal-scope .native-select-demo-footer > div {\n grid-template-columns: minmax(0, 1fr);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tidal-scope .native-select-demo-footer button {\n transition: none;\n }\n\n .tidal-scope .native-select-demo-footer button:active {\n transform: none;\n }\n}"; export function NativeSelectDemo() { const generatedId = useId().replace(/:/g, ""); const selectRef = useRef(null); const [visibility, setVisibility] = useState("team"); const [error, setError] = useState(""); const [status, setStatus] = useState( "Choose who can open this fictional workspace.", ); function submitSelection(event: FormEvent) { event.preventDefault(); const node = selectRef.current; if (!node?.checkValidity()) { setError("Choose a workspace visibility."); node?.focus({ preventScroll: true }); return; } setError(""); setStatus(`Local visibility preview: ${node.selectedOptions[0]?.text}.`); } return (
{ setVisibility("team"); setError(""); setStatus("The local sample was reset."); }} noValidate > { setVisibility(event.currentTarget.value); setError(""); setStatus("The sample selection changed locally."); }} required description="Uses the platform select menu and prepares no request." error={error || undefined} >

{status}

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