{
  "component": {
    "id": "combobox",
    "name": "Combobox",
    "tier": "pro",
    "exampleId": "combobox",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/combobox-demo.tsx",
    "exportName": "ComboboxDemo",
    "sha256": "fe9201ceaf7629737ba7cbe99c9f202d1cf9ac11af3fa67058bd511cd6bc4d29",
    "helperImports": [],
    "directComponentImports": [
      "combobox"
    ],
    "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 @tidal-pro/combobox",
    "registryUrl": "https://tidalui.com/r/pro/combobox.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/combobox",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/combobox",
      "registryUrl": "https://tidalui.com/r/pro/combobox.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/combobox.tsx",
    "exports": [
      "TidalCombobox",
      "TidalComboboxOption"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/combobox.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "combobox"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/combobox.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/combobox.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/combobox-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useId, useMemo, useRef, useState } from \"react\";\n\nimport { TidalCombobox, type TidalComboboxOption } from \"./components/ui/combobox\";\n\nimport \"./components/ui/combobox.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .combobox-demo,\\n.tidal-scope .combobox-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .combobox-demo {\\n  width: 100%;\\n  min-width: 0;\\n  container: combobox-demo / inline-size;\\n}\\n\\n.tidal-scope .combobox-demo-frame {\\n  display: grid;\\n  min-width: 0;\\n  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.38fr);\\n  align-items: start;\\n  gap: 14px;\\n  padding: 20px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 22px;\\n  background: var(--t-subtle);\\n  color: var(--t-ink);\\n}\\n\\n.tidal-scope .combobox-demo-frame form {\\n  min-width: 0;\\n  margin: 0;\\n}\\n\\n.tidal-scope .combobox-demo-actions {\\n  display: grid;\\n  grid-template-columns: repeat(2, minmax(0, 1fr));\\n  gap: 8px;\\n  margin-top: 10px;\\n}\\n\\n.tidal-scope .combobox-demo-actions button {\\n  min-width: 0;\\n  min-height: 44px;\\n  padding: 9px 12px;\\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  font-size: 11px;\\n  font-weight: 670;\\n  line-height: 1.35;\\n  overflow-wrap: anywhere;\\n  cursor: pointer;\\n}\\n\\n.tidal-scope .combobox-demo-actions button:first-child {\\n  border-color: var(--t-ink);\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n}\\n\\n.tidal-scope .combobox-demo-actions button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n.tidal-scope .combobox-demo-summary {\\n  min-width: 0;\\n  padding: 22px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n}\\n\\n.tidal-scope .combobox-demo-summary > span {\\n  color: color-mix(in srgb, var(--t-surface) 62%, var(--t-ink));\\n  font-size: 11px;\\n  font-weight: 700;\\n  letter-spacing: 0.1em;\\n  line-height: 1.35;\\n  text-transform: uppercase;\\n}\\n\\n.tidal-scope .combobox-demo-summary > strong {\\n  display: block;\\n  margin-top: 22px;\\n  font-size: 22px;\\n  font-weight: 570;\\n  letter-spacing: -0.04em;\\n  line-height: 1.1;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .combobox-demo-summary > p,\\n.tidal-scope .combobox-demo-summary > small {\\n  color: color-mix(in srgb, var(--t-surface) 70%, var(--t-ink));\\n  font-size: 11px;\\n  line-height: 1.55;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .combobox-demo-summary > p {\\n  margin: 10px 0 0;\\n}\\n\\n.tidal-scope .combobox-demo-summary dl {\\n  display: grid;\\n  gap: 1px;\\n  margin: 18px 0;\\n  overflow: hidden;\\n  border: 1px solid color-mix(in srgb, var(--t-surface) 22%, var(--t-ink));\\n  border-radius: 10px;\\n  background: color-mix(in srgb, var(--t-surface) 22%, var(--t-ink));\\n}\\n\\n.tidal-scope .combobox-demo-summary dl > div {\\n  min-width: 0;\\n  padding: 9px 10px;\\n  background: var(--t-ink);\\n}\\n\\n.tidal-scope .combobox-demo-summary dt {\\n  color: color-mix(in srgb, var(--t-surface) 58%, var(--t-ink));\\n  font-size: 11px;\\n  line-height: 1.35;\\n}\\n\\n.tidal-scope .combobox-demo-summary dd {\\n  margin: 4px 0 0;\\n  font-size: 11px;\\n  line-height: 1.4;\\n  overflow-wrap: anywhere;\\n}\\n\\n@container combobox-demo (max-width: 720px) {\\n  .tidal-scope .combobox-demo-frame {\\n    grid-template-columns: minmax(0, 1fr);\\n    padding: 10px;\\n  }\\n}\\n\\n@container combobox-demo (max-width: 390px) {\\n  .tidal-scope .combobox-demo-frame {\\n    gap: 9px;\\n    padding: 7px;\\n  }\\n\\n  .tidal-scope .combobox-demo-actions {\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n\\n  .tidal-scope .combobox-demo-actions button {\\n    font-size: 16px;\\n  }\\n\\n  .tidal-scope .combobox-demo-summary {\\n    padding: 18px 16px;\\n  }\\n}\\n\\n@media (hover: none) and (pointer: coarse) {\\n  .tidal-scope .combobox-demo-actions button {\\n    font-size: 16px;\\n  }\\n}\";\n\nconst OPTIONS: readonly TidalComboboxOption[] = [\n  {\n    id: \"ava\",\n    value: \"ava-stone\",\n    label: \"Ava Stone\",\n    accessibleLabel: \"Ava Stone, product design\",\n    description: \"Product design\",\n    meta: \"Available\",\n  },\n  {\n    id: \"noah\",\n    value: \"noah-park\",\n    label: \"Noah Park\",\n    accessibleLabel: \"Noah Park, engineering\",\n    description: \"Engineering\",\n    meta: \"Available\",\n  },\n  {\n    id: \"mila\",\n    value: \"mila-santos\",\n    label: \"Mila Santos\",\n    accessibleLabel: \"Mila Santos, research\",\n    description: \"Research\",\n    meta: \"Reviewing\",\n  },\n  {\n    id: \"eli\",\n    value: \"eli-brooks\",\n    label: \"Eli Brooks\",\n    accessibleLabel: \"Eli Brooks, editorial, unavailable\",\n    description: \"Editorial\",\n    meta: \"Unavailable\",\n    disabled: true,\n  },\n  {\n    id: \"rhea\",\n    value: \"rhea-kim\",\n    label: \"Rhea Kim\",\n    accessibleLabel: \"Rhea Kim, operations\",\n    description: \"Operations\",\n    meta: \"Available\",\n  },\n];\n\nexport function ComboboxDemo() {\n  const generatedId = useId().replace(/:/g, \"\");\n  const formId = `combobox-${generatedId}-form`;\n  const inputRef = useRef<HTMLInputElement>(null);\n  const [query, setQuery] = useState(\"\");\n  const [open, setOpen] = useState(false);\n  const [activeOptionId, setActiveOptionId] = useState<string | undefined>();\n  const [selectedOptionId, setSelectedOptionId] = useState<\n    string | undefined\n  >();\n  const [message, setMessage] = useState(\"Choose a reviewer for this brief.\");\n  const normalizedQuery = query.trim().toLocaleLowerCase();\n  const visibleOptions = useMemo(\n    () =>\n      OPTIONS.filter((option) =>\n        `${String(option.label)} ${String(option.description ?? \"\")}`\n          .toLocaleLowerCase()\n          .includes(normalizedQuery),\n      ),\n    [normalizedQuery],\n  );\n  const selectedOption = OPTIONS.find(\n    (option) => option.id === selectedOptionId,\n  );\n\n  function resetLocalForm() {\n    setQuery(\"\");\n    setOpen(false);\n    setActiveOptionId(undefined);\n    setSelectedOptionId(undefined);\n    setMessage(\"Reviewer cleared.\");\n  }\n\n  return (\n    <section className=\"combobox-demo\" aria-label=\"Combobox preview\">\n      <div className=\"combobox-demo-frame\">\n        <form\n          id={formId}\n          onSubmit={(event) => {\n            event.preventDefault();\n            setMessage(\n              selectedOption\n                ? `Review choice: ${String(selectedOption.label)}.`\n                : \"Choose a reviewer before reviewing this brief.\",\n            );\n          }}\n          onReset={resetLocalForm}\n        >\n          <TidalCombobox\n            label=\"Reviewer\"\n            description=\"Find the person who should review this brief.\"\n            query={query}\n            open={open}\n            activeOptionId={activeOptionId}\n            selectedOptionId={selectedOptionId}\n            selectedLabel={selectedOption?.label}\n            formValue={selectedOption?.value ?? \"\"}\n            name=\"sampleReviewer\"\n            form={formId}\n            options={visibleOptions}\n            placeholder=\"Search people\"\n            inputRef={inputRef}\n            onQueryChange={(value) => {\n              setQuery(value);\n              const nextOptions = OPTIONS.filter((option) =>\n                `${String(option.label)} ${String(option.description ?? \"\")}`\n                  .toLocaleLowerCase()\n                  .includes(value.trim().toLocaleLowerCase()),\n              );\n              setActiveOptionId(\n                nextOptions.find((option) => !option.disabled)?.id,\n              );\n              setMessage(\n                value\n                  ? `Showing reviewer matches for “${value}”.`\n                  : \"Showing every reviewer.\",\n              );\n            }}\n            onOpenChange={(nextOpen) => {\n              setOpen(nextOpen);\n              if (nextOpen && !activeOptionId) {\n                setActiveOptionId(\n                  visibleOptions.find((option) => !option.disabled)?.id,\n                );\n              }\n            }}\n            onActiveOptionChange={setActiveOptionId}\n            onSelectionChange={(option) => {\n              setSelectedOptionId(option.id);\n              setQuery(String(option.label));\n              setMessage(`${String(option.label)} is ready to review.`);\n            }}\n            hint=\"Arrow keys move through enabled options. Enter selects; Escape closes.\"\n            emptyMessage=\"No reviewers match this search.\"\n          />\n\n          <div className=\"combobox-demo-actions\">\n            <button type=\"submit\">Review choice</button>\n            <button type=\"reset\">Clear reviewer</button>\n          </div>\n        </form>\n\n        <aside className=\"combobox-demo-summary\" aria-live=\"polite\">\n          <span>Brief review</span>\n          <strong>{selectedOption?.label ?? \"No reviewer selected\"}</strong>\n          <p>{message}</p>\n          <dl>\n            <div>\n              <dt>Reviewer key</dt>\n              <dd>{selectedOption?.value ?? \"Empty\"}</dd>\n            </div>\n            <div>\n              <dt>Roster</dt>\n              <dd>Sample team</dd>\n            </div>\n          </dl>\n          <small>Sample data. Changes stay in this preview.</small>\n        </aside>\n      </div>\n    </section>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <ComboboxDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/combobox.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "query",
      "type": "inferred-from-existing-demo",
      "initial": "\"\"",
      "setter": "setQuery",
      "proposalCanBeRejected": false
    },
    {
      "prop": "open",
      "type": "inferred-from-existing-demo",
      "initial": "false",
      "setter": "setOpen",
      "proposalCanBeRejected": false
    },
    {
      "prop": "activeOptionId",
      "type": "inferred-from-existing-demo",
      "initial": "undefined",
      "setter": "setActiveOptionId",
      "proposalCanBeRejected": false
    },
    {
      "prop": "selectedOptionId",
      "type": "inferred-from-existing-demo",
      "initial": "undefined",
      "setter": "setSelectedOptionId",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onActiveOptionChange",
      "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": "onOpenChange",
      "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": "onQueryChange",
      "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": "onReset",
      "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": "onSelectionChange",
      "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": "onSubmit",
      "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."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [
      "sampleReviewer"
    ],
    "expectedFormData": {
      "sampleReviewer": "fixture value"
    },
    "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": "server-gated"
  },
  "exceptions": []
}
