{
  "component": {
    "id": "search-field",
    "name": "Search input",
    "tier": "free",
    "exampleId": "search-field",
    "access": "free",
    "requiresAuthorization": false
  },
  "source": {
    "demoModule": "src/search-field-demo.tsx",
    "exportName": "SearchFieldDemo",
    "sha256": "b368894ac0c9988bf4cb94d491bf7bb78f47a33f3853657044e73057f172e8d5",
    "helperImports": [],
    "directComponentImports": [
      "search-field",
      "tidal-button"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add https://tidalui.com/r/search-field.json",
    "registryUrl": "https://tidalui.com/r/search-field.json",
    "access": "free",
    "sourceDelivery": "public-registry",
    "requiresAuthorization": false,
    "tokenSource": "none",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "https://tidalui.com/r/search-field.json",
      "purpose": "component",
      "command": "npx shadcn@latest add https://tidalui.com/r/search-field.json",
      "registryUrl": "https://tidalui.com/r/search-field.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    },
    {
      "order": 2,
      "kind": "demo-only-additional",
      "dependency": "https://tidalui.com/r/tidal-button.json",
      "purpose": "complete-example-demo-dependency",
      "command": "npx shadcn@latest add https://tidalui.com/r/tidal-button.json",
      "registryUrl": "https://tidalui.com/r/tidal-button.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    }
  ],
  "imports": {
    "componentPath": "components/ui/search-field.tsx",
    "exports": [
      "TidalButton",
      "TidalSearchField"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/search-field.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [
      "https://tidalui.com/r/tidal-button.json"
    ],
    "installClosure": [
      "search-field",
      "tidal-button"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/search-field.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/search-field.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/search-field-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useEffect, useId, useLayoutEffect, useRef, useState, type CSSProperties } from \"react\";\n\nimport { ArrowUpRight, FileText, Folder, Layers, Search, UserRound, X } from \"lucide-react\";\n\nimport { TidalSearchField } from \"./components/ui/search-field\";\n\nimport { TidalButton } from \"./components/ui/tidal-button\";\n\nimport \"./components/ui/search-field.css\";\n\n\n\nconst tidalExampleStyles = \".search-field-specimen {\\n  width: 100%;\\n  max-width: 670px;\\n  padding: 28px;\\n  border: 1px solid var(--t-border);\\n  border-radius: var(--t-radius-card);\\n  background: var(--t-surface);\\n  box-shadow:\\n    0 24px 40px -28px #00000035,\\n    0 2px 4px #00000008;\\n}\\n.search-field-specimen > h3 {\\n  font-size: 29px;\\n  line-height: 1.08;\\n  letter-spacing: -1px;\\n  font-weight: 500;\\n  margin: 13px 0 26px;\\n}\\n.search-field-specimen > h3 > em {\\n  font-family: \\\"Instrument Serif\\\", serif;\\n  font-size: 1.2em;\\n  font-weight: 400;\\n}\\n.search-demo-window {\\n  border: 1px solid var(--t-border);\\n  border-radius: 13px;\\n  background: var(--t-subtle);\\n  overflow: hidden;\\n}\\n.search-demo-top {\\n  display: flex;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 12px;\\n  padding: 16px 20px;\\n  border-bottom: 1px solid var(--t-border);\\n  font-size: 11px;\\n  color: var(--t-muted);\\n  letter-spacing: 0.7px;\\n}\\n.search-demo-top > span:first-child {\\n  display: flex;\\n  align-items: center;\\n  gap: 8px;\\n}\\n.search-demo-top > span:last-child {\\n  font-size: 11px;\\n  letter-spacing: 0;\\n}\\n.search-demo-input {\\n  padding: 22px 20px 12px;\\n  background: var(--t-surface);\\n}\\n.search-demo-suggestions {\\n  display: flex;\\n  gap: 6px;\\n  padding: 0 20px 15px;\\n  background: var(--t-surface);\\n}\\n.search-demo-suggestions > button {\\n  display: inline-flex;\\n  align-items: center;\\n  gap: 6px;\\n  min-height: 44px;\\n  padding: 0 12px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 8px;\\n  background: var(--t-subtle);\\n  color: var(--t-muted);\\n  font: inherit;\\n  font-size: 11px;\\n  transition:\\n    background 180ms,\\n    color 180ms,\\n    transform 140ms;\\n}\\n.search-demo-suggestions > button:hover {\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n}\\n.search-demo-suggestions > button:active {\\n  transform: translateY(1px);\\n}\\n.search-demo-results-top {\\n  display: flex;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 12px;\\n  padding: 14px 20px 5px;\\n  border-top: 1px solid var(--t-border);\\n  font-size: 11px;\\n  letter-spacing: 0.7px;\\n  color: var(--t-muted);\\n}\\n.search-demo-results-top > span:last-child {\\n  font-size: 11px;\\n  letter-spacing: 0;\\n}\\n.search-demo-stage {\\n  padding: 6px 0;\\n  overflow: hidden;\\n  transition: height 420ms var(--t-ease-out);\\n}\\n.search-demo-content {\\n  display: flow-root;\\n}\\n.search-demo-results {\\n  list-style: none;\\n  margin: 0;\\n  padding: 7px 14px;\\n  display: grid;\\n  gap: 7px;\\n}\\n.search-demo-results > li {\\n  animation: search-result-in 420ms var(--t-ease-out) var(--search-delay) both;\\n}\\n.search-demo-results button {\\n  display: flex;\\n  align-items: center;\\n  gap: 12px;\\n  min-height: 65px;\\n  width: 100%;\\n  padding: 11px 13px;\\n  text-align: left;\\n  border: 1px solid var(--t-border);\\n  border-radius: 10px;\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  font: inherit;\\n  transition:\\n    border-color 180ms,\\n    box-shadow 180ms,\\n    transform 180ms var(--t-ease-out);\\n}\\n.search-demo-results button:hover,\\n.search-demo-results button[aria-expanded=\\\"true\\\"] {\\n  border-color: var(--t-muted);\\n  box-shadow: 0 3px 8px #00000008;\\n}\\n.search-demo-results button:active {\\n  transform: scale(0.99);\\n}\\n.search-demo-record-icon {\\n  display: grid;\\n  place-items: center;\\n  width: 34px;\\n  height: 36px;\\n  border-radius: 7px;\\n  background: var(--t-wash);\\n  flex-shrink: 0;\\n  transition:\\n    background 180ms,\\n    color 180ms,\\n    transform 320ms var(--t-ease-spring);\\n}\\n.search-demo-results button:hover .search-demo-record-icon,\\n.search-demo-results button[aria-expanded=\\\"true\\\"] .search-demo-record-icon {\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  transform: rotate(-5deg);\\n}\\n.search-demo-results button > span:nth-child(2) {\\n  flex: 1;\\n  min-width: 0;\\n}\\n.search-demo-results strong {\\n  display: block;\\n  font-size: 12px;\\n  line-height: 1.5;\\n  font-weight: 500;\\n}\\n.search-demo-results small {\\n  display: block;\\n  font-size: 11px;\\n  line-height: 1.5;\\n  color: var(--t-muted);\\n  margin-top: 2px;\\n}\\n.search-demo-kind {\\n  font-size: 11px;\\n  color: var(--t-muted);\\n  padding: 3px 6px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 4px;\\n}\\n.search-demo-results mark {\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  border-radius: 3px;\\n  padding: 1px 2px;\\n  margin: 0 -2px;\\n}\\n.tidal-scope .search-demo-expand {\\n  display: flex;\\n  align-items: center;\\n  justify-content: center;\\n  gap: 8px;\\n  width: 100%;\\n  min-height: 44px;\\n  margin: 0;\\n  padding: 0 12px;\\n  border: 0;\\n  border-top: 1px solid var(--t-border);\\n  background: var(--t-surface);\\n  color: var(--t-muted);\\n  font: inherit;\\n  font-size: 11px;\\n  transition:\\n    background 180ms,\\n    color 180ms;\\n}\\n.search-demo-expand:hover {\\n  background: var(--t-wash);\\n  color: var(--t-ink);\\n}\\n.search-demo-expand:focus-visible {\\n  outline-offset: -5px;\\n}\\n.search-demo-empty {\\n  padding: 22px 20px;\\n  text-align: center;\\n  animation: search-result-in 420ms var(--t-ease-out) both;\\n}\\n.search-demo-empty > svg {\\n  color: var(--t-muted);\\n  margin-bottom: 10px;\\n}\\n.search-demo-empty > strong {\\n  display: block;\\n  font-size: 16px;\\n  font-weight: 500;\\n  letter-spacing: -0.3px;\\n}\\n.search-demo-empty > p {\\n  font-size: 11px;\\n  line-height: 1.7;\\n  color: var(--t-muted);\\n  margin: 9px auto 17px;\\n  overflow-wrap: anywhere;\\n  max-width: 340px;\\n}\\n.search-demo-empty .tidal-button {\\n  font-size: 11px;\\n}\\n.search-demo-detail {\\n  position: relative;\\n  margin: 7px 14px;\\n  padding: 21px 20px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 10px;\\n  background: var(--t-surface);\\n  animation: search-detail-in 420ms var(--t-ease-out) both;\\n}\\n.search-demo-detail > h4 {\\n  font-size: 19px;\\n  font-weight: 500;\\n  letter-spacing: -0.5px;\\n  margin: 13px 40px 8px 0;\\n  line-height: 1.3;\\n}\\n.search-demo-detail > p {\\n  font-size: 11px;\\n  line-height: 1.8;\\n  color: var(--t-muted);\\n  margin: 0;\\n}\\n.search-demo-detail > button {\\n  position: absolute;\\n  top: 7px;\\n  right: 7px;\\n  width: 44px;\\n  height: 44px;\\n  border: 0;\\n  border-radius: 8px;\\n  background: transparent;\\n  color: var(--t-muted);\\n  display: grid;\\n  place-items: center;\\n}\\n.search-demo-detail > button:hover {\\n  background: var(--t-wash);\\n}\\n.search-demo-note {\\n  font-size: 11px;\\n  color: var(--t-muted);\\n  line-height: 1.7;\\n  margin: 16px 0 0;\\n}\\n@keyframes search-result-in {\\n  from {\\n    opacity: 0;\\n    transform: translateY(6px);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: none;\\n  }\\n}\\n@keyframes search-detail-in {\\n  from {\\n    opacity: 0;\\n    transform: translateY(-5px);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: none;\\n  }\\n}\\n@media (max-width: 480px) {\\n  .search-field-specimen {\\n    padding: 20px;\\n  }\\n  .search-demo-top {\\n    padding: 14px 15px;\\n  }\\n  .search-demo-input {\\n    padding: 19px 15px 12px;\\n  }\\n  .search-demo-suggestions {\\n    padding: 0 15px 14px;\\n  }\\n  .search-demo-results-top {\\n    padding: 13px 15px 4px;\\n    flex-wrap: wrap;\\n    gap: 6px;\\n  }\\n  .search-demo-kind {\\n    display: none;\\n  }\\n  .search-demo-results {\\n    padding: 7px 10px;\\n  }\\n  .search-demo-results button {\\n    padding: 10px;\\n    gap: 10px;\\n  }\\n  .search-demo-results strong {\\n    font-size: 11px;\\n  }\\n  .search-demo-results small {\\n    font-size: 11px;\\n  }\\n  .search-demo-detail {\\n    margin: 7px 10px;\\n    padding: 19px 15px;\\n  }\\n}\\n@media (prefers-reduced-motion: reduce) {\\n  .search-demo-suggestions > button:active,\\n  .search-demo-results button:active,\\n  .search-demo-results button:hover .search-demo-record-icon,\\n  .search-demo-results button[aria-expanded=\\\"true\\\"] .search-demo-record-icon {\\n    transform: none;\\n  }\\n}\\n\\n.search-demo-results[aria-busy=\\\"true\\\"] {\\n  opacity: 0.55;\\n  transition: opacity 180ms;\\n}\\n.search-demo-results button:disabled {\\n  cursor: wait;\\n}\\n.search-demo-expand:disabled {\\n  opacity: 0.55;\\n  cursor: wait;\\n}\";\n\nconst records = [\n  {\n    id: \"launch-plan\",\n    title: \"Launch plan\",\n    kind: \"Document\",\n    detail: \"Northstar · Product team\",\n    body: \"The sample launch starts with a clear welcome, a useful overview and one shared visual language.\",\n  },\n  {\n    id: \"launch-workspace\",\n    title: \"Launch workspace\",\n    kind: \"Project\",\n    detail: \"Northstar · 8 sample tasks\",\n    body: \"This fictional workspace gathers the product brief, release notes and interface studies.\",\n  },\n  {\n    id: \"launch-notes\",\n    title: \"Launch notes\",\n    kind: \"Document\",\n    detail: \"Northstar · Original sample\",\n    body: \"Review the small screens, check keyboard paths and make the next step obvious.\",\n  },\n  {\n    id: \"ava\",\n    title: \"Ava Reed\",\n    kind: \"Person\",\n    detail: \"Fictional teammate · Design\",\n    body: \"Ava is a fictional member of the sample design team. No personal or customer records are used.\",\n  },\n  {\n    id: \"interface\",\n    title: \"Interface studies\",\n    kind: \"Project\",\n    detail: \"Northstar · 6 sample studies\",\n    body: \"Six fictional interface studies explore hierarchy, space and connected transitions.\",\n  },\n  {\n    id: \"motion\",\n    title: \"Motion notes\",\n    kind: \"Document\",\n    detail: \"Northstar · Design team\",\n    body: \"Use motion to connect stable elements, reveal new context and make progress understandable.\",\n  },\n  {\n    id: \"billing\",\n    title: \"Billing overview\",\n    kind: \"Document\",\n    detail: \"Northstar · Product team\",\n    body: \"This sample outlines a clear billing interface. It contains no financial account or payment data.\",\n  },\n  {\n    id: \"noah\",\n    title: \"Noah Kim\",\n    kind: \"Person\",\n    detail: \"Fictional teammate · Engineering\",\n    body: \"Noah is a fictional member of the sample engineering team.\",\n  },\n  {\n    id: \"elan\",\n    title: \"Élan research\",\n    kind: \"Project\",\n    detail: \"Original sample · Research\",\n    body: \"An original research sample with a name that includes an accented character.\",\n  },\n  {\n    id: \"tokyo\",\n    title: \"東京 workspace\",\n    kind: \"Project\",\n    detail: \"Original sample · International\",\n    body: \"A fictional workspace for checking international search input.\",\n  },\n  {\n    id: \"welcome\",\n    title: \"The welcome screen\",\n    kind: \"Document\",\n    detail: \"Northstar · Experience\",\n    body: \"Welcome people with a clear purpose and a small, useful next step.\",\n  },\n  {\n    id: \"elio\",\n    title: \"Eli Morgan\",\n    kind: \"Person\",\n    detail: \"Fictional teammate · Product\",\n    body: \"Eli is a fictional member of the sample product team.\",\n  },\n];\n\nconst normalize = (text: string) => text.normalize(\"NFC\").toLowerCase();\n\nfunction Highlight({ text, query }: { text: string; query: string }) {\n  const phrase = normalize(query.trim());\n  const start = phrase ? normalize(text).indexOf(phrase) : -1;\n  if (start < 0) return <>{text}</>;\n  return (\n    <>\n      {text.slice(0, start)}\n      <mark>{text.slice(start, start + phrase.length)}</mark>\n      {text.slice(start + phrase.length)}\n    </>\n  );\n}\n\nexport function SearchFieldDemo() {\n  const [state, setState] = useState({\n    query: \"\",\n    settled: \"\",\n    pending: false,\n  });\n  const [expanded, setExpanded] = useState(false);\n  const [composing, setComposing] = useState(false);\n  const detailId = useId();\n  const [selected, setSelected] = useState<string | null>(null);\n  const [height, setHeight] = useState<number>();\n  const input = useRef<HTMLInputElement>(null);\n  const content = useRef<HTMLDivElement>(null);\n  const detailTitle = useRef<HTMLHeadingElement>(null);\n  const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n  const phrase = normalize(state.settled.trim());\n  const matches = phrase\n    ? records.filter((record) =>\n        normalize(\n          record.title + \" \" + record.kind + \" \" + record.detail,\n        ).includes(phrase),\n      )\n    : records;\n  const shown = matches.slice(0, expanded ? matches.length : 2);\n  const active = records.find((record) => record.id === selected);\n  useEffect(() => {\n    if (composing || !state.query.trim()) return;\n    timer.current = setTimeout(\n      () =>\n        setState((old) =>\n          old.query === state.query\n            ? { ...old, settled: state.query, pending: false }\n            : old,\n        ),\n      550,\n    );\n    return () => clearTimeout(timer.current);\n  }, [state.query, composing]);\n  useEffect(() => () => clearTimeout(timer.current), []);\n  useLayoutEffect(() => {\n    const node = content.current;\n    if (selected && node && node.scrollHeight > node.clientHeight) {\n      node.scrollTop = node.scrollHeight - node.clientHeight;\n      detailTitle.current?.focus({ preventScroll: true });\n    }\n  }, [selected]);\n  useLayoutEffect(() => {\n    const node = content.current;\n    if (!node) return;\n    const measure = () => {\n      const parent = getComputedStyle(node.parentElement!);\n      setHeight(\n        node.offsetHeight +\n          Number.parseFloat(parent.paddingTop) +\n          Number.parseFloat(parent.paddingBottom),\n      );\n    };\n    measure();\n    const observer = new ResizeObserver(measure);\n    observer.observe(node);\n    return () => observer.disconnect();\n  }, []);\n  function change(query: string) {\n    clearTimeout(timer.current);\n    setSelected(null);\n    setExpanded(false);\n    setState((old) => ({\n      query,\n      settled: query.trim() ? old.settled : \"\",\n      pending: !!query.trim(),\n    }));\n  }\n  function submit(query: string) {\n    clearTimeout(timer.current);\n    setState({ query, settled: query, pending: false });\n    setSelected(null);\n    setExpanded(false);\n  }\n  return (\n    <div className=\"search-field-specimen\">\n      <div className=\"search-demo-window\">\n        <div className=\"search-demo-top\">\n          <span>\n            <Layers size={14} aria-hidden=\"true\" /> NORTHSTAR / WORKSPACE\n          </span>\n          <span>12 sample records</span>\n        </div>\n        <div className=\"search-demo-input\">\n          <TidalSearchField\n            ref={input}\n            label=\"Search the sample workspace\"\n            placeholder=\"Projects, notes or people…\"\n            value={state.query}\n            onValueChange={change}\n            onSearch={submit}\n            pending={state.pending}\n            resultCount={state.query.trim() ? matches.length : undefined}\n            description=\"Search by name or topic.\"\n            autoComplete=\"off\"\n            onCompositionStart={() => setComposing(true)}\n            onCompositionEnd={() => setComposing(false)}\n          />\n        </div>\n        <div className=\"search-demo-suggestions\" aria-label=\"Sample queries\">\n          {[\"Launch\", \"Motion\", \"Élan\"].map((query) => (\n            <button\n              type=\"button\"\n              key={query}\n              onClick={() => {\n                change(query);\n                input.current?.focus({ preventScroll: true });\n              }}\n            >\n              <Search size={11} aria-hidden=\"true\" />\n              {query}\n            </button>\n          ))}\n        </div>\n        <div className=\"search-demo-results-top\">\n          <span>{phrase ? \"SEARCH MATCHES\" : \"RECENT RECORDS\"}</span>\n          <span role=\"status\">\n            {state.pending\n              ? \"Looking through the sample…\"\n              : `${matches.length} ${phrase ? (matches.length === 1 ? \"match\" : \"matches\") : \"records\"} · Showing ${shown.length}`}\n          </span>\n        </div>\n        <div className=\"search-demo-stage\" style={{ height }}>\n          <div ref={content} className=\"search-demo-content\">\n            <ul\n              className=\"search-demo-results\"\n              aria-label=\"Sample workspace records\"\n              aria-busy={state.pending}\n            >\n              {shown.map((record, index) => {\n                const Icon =\n                  record.kind === \"Document\"\n                    ? FileText\n                    : record.kind === \"Project\"\n                      ? Folder\n                      : UserRound;\n                return (\n                  <li\n                    key={record.id}\n                    style={\n                      { \"--search-delay\": `${index * 55}ms` } as CSSProperties\n                    }\n                  >\n                    <button\n                      type=\"button\"\n                      disabled={state.pending}\n                      onClick={() =>\n                        setSelected((old) =>\n                          old === record.id ? null : record.id,\n                        )\n                      }\n                      aria-expanded={selected === record.id}\n                      aria-controls={\n                        selected === record.id ? detailId : undefined\n                      }\n                    >\n                      <span\n                        className=\"search-demo-record-icon\"\n                        aria-hidden=\"true\"\n                      >\n                        <Icon size={18} />\n                      </span>\n                      <span>\n                        <strong>\n                          <Highlight\n                            text={record.title}\n                            query={state.settled}\n                          />\n                        </strong>\n                        <small>{record.detail}</small>\n                      </span>\n                      <span className=\"search-demo-kind\">{record.kind}</span>\n                      <ArrowUpRight size={14} aria-hidden=\"true\" />\n                    </button>\n                  </li>\n                );\n              })}\n            </ul>\n            {!matches.length && (\n              <div className=\"search-demo-empty\">\n                <Search size={21} aria-hidden=\"true\" />\n                <strong>No results</strong>\n                <p>\n                  No sample records match “{state.settled}”. Try another search.\n                </p>\n                <TidalButton\n                  variant=\"secondary\"\n                  onClick={() => {\n                    change(\"\");\n                    input.current?.focus({ preventScroll: true });\n                  }}\n                >\n                  Clear and explore\n                </TidalButton>\n              </div>\n            )}\n            {active && (\n              <article\n                className=\"search-demo-detail\"\n                key={active.id}\n                id={detailId}\n                aria-labelledby={detailId + \"-title\"}\n              >\n                <span className=\"demo-eyebrow\">ORIGINAL FICTIONAL RECORD</span>\n                <h4 ref={detailTitle} tabIndex={-1} id={detailId + \"-title\"}>\n                  {active.title}\n                </h4>\n                <p>{active.body}</p>\n                <button\n                  type=\"button\"\n                  aria-label=\"Close sample detail\"\n                  onClick={() => {\n                    setSelected(null);\n                    if (content.current) content.current.scrollTop = 0;\n                    input.current?.focus({ preventScroll: true });\n                  }}\n                >\n                  <X size={15} aria-hidden=\"true\" />\n                </button>\n              </article>\n            )}\n          </div>\n        </div>\n        {matches.length > 2 && (\n          <button\n            className=\"search-demo-expand\"\n            type=\"button\"\n            disabled={state.pending}\n            aria-expanded={expanded}\n            onClick={() => setExpanded(!expanded)}\n          >\n            {expanded\n              ? \"Show fewer records\"\n              : `Show all ${matches.length} ${phrase ? \"matches\" : \"sample records\"}`}\n            <ArrowUpRight size={12} aria-hidden=\"true\" />\n          </button>\n        )}\n      </div>\n      <p className=\"search-demo-note\">\n        Search and open original sample records. This preview runs in your\n        browser.\n      </p>\n    </div>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <SearchFieldDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/search-field.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "expanded",
      "type": "inferred-from-existing-demo",
      "initial": "false",
      "setter": "setExpanded",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onClick",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onCompositionEnd",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onCompositionStart",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onSearch",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onValueChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "The existing demo's native form callback receives the submit event.",
    "resetBehavior": "Native reset behavior remains available where the demo renders a resettable control.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Existing demo label or ARIA prop",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "The existing error or alert path remains consumer-owned and should be announced by the rendered semantics.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "present-local"
  },
  "exceptions": []
}
