{
  "component": {
    "id": "filter-bar",
    "name": "Filter bar",
    "tier": "pro",
    "exampleId": "filter-bar",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/filter-bar-demo.tsx",
    "exportName": "FilterBarDemo",
    "sha256": "fdb07af5886ede166b7e7431128720c725656916df0f5952273203dc0542f5c8",
    "helperImports": [],
    "directComponentImports": [
      "filter-bar"
    ],
    "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/filter-bar",
    "registryUrl": "https://tidalui.com/r/pro/filter-bar.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/filter-bar",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/filter-bar",
      "registryUrl": "https://tidalui.com/r/pro/filter-bar.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/filter-bar.tsx",
    "exports": [
      "TidalFilterBar",
      "TidalFilterGroup"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/filter-bar.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "@radix-ui/react-compose-refs"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "filter-bar"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/filter-bar.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/filter-bar.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/filter-bar-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useId, useMemo, useRef, useState, type CSSProperties } from \"react\";\n\nimport { TidalFilterBar, type TidalFilterGroup } from \"./components/ui/filter-bar\";\n\nimport \"./components/ui/filter-bar.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .filter-bar-demo,\\n.tidal-scope .filter-bar-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .filter-bar-demo {\\n  container: filter-bar-demo / inline-size;\\n  display: grid;\\n  width: min(100%, 1080px);\\n  min-width: 0;\\n  gap: 18px;\\n  margin-inline: auto;\\n  padding: clamp(16px, 4vw, 42px);\\n  color: var(--t-ink);\\n}\\n\\n.tidal-scope .filter-bar-demo-heading {\\n  display: grid;\\n  min-width: 0;\\n  gap: 7px;\\n}\\n\\n.tidal-scope .filter-bar-demo-heading :is(h2, p),\\n.tidal-scope .filter-bar-demo footer {\\n  margin: 0;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .filter-bar-demo-heading h2 {\\n  font-size: clamp(28px, 5vw, 44px);\\n  font-weight: 570;\\n  letter-spacing: -0.05em;\\n  line-height: 1;\\n}\\n\\n.tidal-scope .filter-bar-demo-heading p,\\n.tidal-scope .filter-bar-demo footer {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.5;\\n}\\n\\n.tidal-scope .filter-bar-demo-results {\\n  min-width: 0;\\n}\\n\\n.tidal-scope .filter-bar-demo-results ul {\\n  display: grid;\\n  grid-template-columns: repeat(2, minmax(0, 1fr));\\n  min-width: 0;\\n  gap: 8px;\\n  margin: 0;\\n  padding: 0;\\n  list-style: none;\\n}\\n\\n.tidal-scope .filter-bar-demo-results li {\\n  min-width: 0;\\n  animation: filter-demo-result-in 360ms var(--t-ease-out) both;\\n  animation-delay: calc(min(var(--filter-result-index), 7) * 45ms);\\n}\\n\\n.tidal-scope .filter-bar-demo-results article {\\n  display: grid;\\n  grid-template-columns: minmax(0, 1fr) auto;\\n  min-width: 0;\\n  height: 100%;\\n  gap: 18px;\\n  padding: 18px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 14px;\\n  background: var(--t-surface);\\n}\\n\\n.tidal-scope .filter-bar-demo-results article > div {\\n  min-width: 0;\\n}\\n\\n.tidal-scope .filter-bar-demo-results :is(h3, p, dl, dt, dd) {\\n  margin: 0;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .filter-bar-demo-results h3 {\\n  font-size: 15px;\\n  font-weight: 650;\\n  letter-spacing: -0.02em;\\n}\\n\\n.tidal-scope .filter-bar-demo-results p {\\n  margin-top: 6px;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.5;\\n}\\n\\n.tidal-scope .filter-bar-demo-results dl {\\n  display: grid;\\n  grid-template-columns: repeat(2, minmax(58px, auto));\\n  align-content: start;\\n  gap: 8px;\\n}\\n\\n.tidal-scope .filter-bar-demo-results dl > div {\\n  min-width: 0;\\n  padding-inline-start: 9px;\\n  border-inline-start: 1px solid var(--t-border);\\n}\\n\\n.tidal-scope .filter-bar-demo-results dt {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  font-weight: 700;\\n  letter-spacing: 0.08em;\\n  text-transform: uppercase;\\n}\\n\\n.tidal-scope .filter-bar-demo-results dd {\\n  margin-top: 4px;\\n  font-size: 11px;\\n  font-weight: 620;\\n}\\n\\n.tidal-scope .filter-bar-demo-empty {\\n  display: grid;\\n  min-width: 0;\\n  justify-items: start;\\n  gap: 8px;\\n  padding: 28px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  background: var(--t-subtle);\\n}\\n\\n.tidal-scope .filter-bar-demo-empty button {\\n  min-width: 44px;\\n  min-height: 44px;\\n  margin-top: 6px;\\n  padding: 9px 13px;\\n  border: 1px solid var(--t-ink);\\n  border-radius: 10px;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  font: inherit;\\n  font-size: 11px;\\n  font-weight: 650;\\n  cursor: pointer;\\n}\\n\\n.tidal-scope .filter-bar-demo-empty button:focus-visible {\\n  outline: 2px solid var(--t-ink);\\n  outline-offset: 3px;\\n}\\n\\n@container filter-bar-demo (max-width: 620px) {\\n  .tidal-scope .filter-bar-demo-results ul {\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n\\n  .tidal-scope .filter-bar-demo-results article {\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n\\n  .tidal-scope .filter-bar-demo-results dl {\\n    grid-template-columns: repeat(2, minmax(0, 1fr));\\n  }\\n\\n  .tidal-scope .filter-bar-demo-empty button {\\n    font-size: 16px;\\n  }\\n}\\n\\n@keyframes filter-demo-result-in {\\n  from {\\n    opacity: 0;\\n    transform: translateY(6px);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: none;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .tidal-scope .filter-bar-demo-results li {\\n    animation: none;\\n  }\\n}\";\n\ntype ProjectStatus = \"Active\" | \"Paused\" | \"Review\";\n\ntype ProjectOwner = \"Ava\" | \"Noah\" | \"Mila\";\n\ninterface SampleProject {\n  id: string;\n  title: string;\n  description: string;\n  status: ProjectStatus;\n  owner: ProjectOwner;\n}\n\ntype IndexedResultStyle = CSSProperties & { \"--filter-result-index\": number };\n\nconst SAMPLE_PROJECTS: readonly SampleProject[] = [\n  {\n    id: \"field-notes\",\n    title: \"Field notes\",\n    description: \"Organize research from the latest site visit.\",\n    status: \"Active\",\n    owner: \"Ava\",\n  },\n  {\n    id: \"launch-brief\",\n    title: \"Launch brief\",\n    description: \"Resolve the final review comments before handoff.\",\n    status: \"Review\",\n    owner: \"Noah\",\n  },\n  {\n    id: \"archive-plan\",\n    title: \"Archive plan\",\n    description: \"Map the folders that move into the shared archive.\",\n    status: \"Paused\",\n    owner: \"Mila\",\n  },\n  {\n    id: \"support-guide\",\n    title: \"Support guide\",\n    description: \"Write a concise guide for common workspace questions.\",\n    status: \"Active\",\n    owner: \"Mila\",\n  },\n  {\n    id: \"release-checklist\",\n    title: \"Release checklist\",\n    description: \"Confirm ownership for the remaining release checks.\",\n    status: \"Review\",\n    owner: \"Ava\",\n  },\n  {\n    id: \"brand-library\",\n    title: \"Brand library\",\n    description: \"Sort approved marks and usage notes for the team.\",\n    status: \"Active\",\n    owner: \"Noah\",\n  },\n  {\n    id: \"workspace-audit\",\n    title: \"Workspace audit\",\n    description: \"Review inactive boards and document their owners.\",\n    status: \"Paused\",\n    owner: \"Ava\",\n  },\n  {\n    id: \"meeting-notes\",\n    title: \"Meeting notes\",\n    description: \"Prepare the decisions and follow-up list for review.\",\n    status: \"Review\",\n    owner: \"Mila\",\n  },\n];\n\nconst FILTER_GROUPS: readonly TidalFilterGroup[] = [\n  {\n    id: \"status\",\n    label: \"Status\",\n    accessibleLabel: \"Filter by project status\",\n    options: [\"Active\", \"Paused\", \"Review\"].map((status) => ({\n      value: status.toLowerCase(),\n      label: status,\n      accessibleLabel: status,\n      inputProps: { name: \"status\" },\n    })),\n  },\n  {\n    id: \"owner\",\n    label: \"Owner\",\n    accessibleLabel: \"Filter by project owner\",\n    options: [\"Ava\", \"Noah\", \"Mila\"].map((owner) => ({\n      value: owner.toLowerCase(),\n      label: owner,\n      accessibleLabel: owner,\n      inputProps: { name: \"owner\" },\n    })),\n  },\n];\n\nexport function FilterBarDemo() {\n  const demoId = useId().replace(/:/g, \"\");\n  const headingId = `${demoId}-work-queue`;\n  const resultsId = `${demoId}-projects`;\n  const searchRef = useRef<HTMLInputElement>(null);\n  const [query, setQuery] = useState(\"\");\n  const [values, setValues] = useState<Record<string, readonly string[]>>({\n    status: [],\n    owner: [],\n  });\n\n  const visibleProjects = useMemo(() => {\n    const normalizedQuery = query.trim().toLowerCase();\n    return SAMPLE_PROJECTS.filter((project) => {\n      const matchesQuery =\n        !normalizedQuery ||\n        `${project.title} ${project.description} ${project.owner} ${project.status}`\n          .toLowerCase()\n          .includes(normalizedQuery);\n      const selectedStatuses = values.status ?? [];\n      const selectedOwners = values.owner ?? [];\n      const matchesStatus =\n        !selectedStatuses.length ||\n        selectedStatuses.includes(project.status.toLowerCase());\n      const matchesOwner =\n        !selectedOwners.length ||\n        selectedOwners.includes(project.owner.toLowerCase());\n      return matchesQuery && matchesStatus && matchesOwner;\n    });\n  }, [query, values]);\n\n  const hasFilters =\n    Boolean(query) || Object.values(values).some((selected) => selected.length);\n\n  function clearFilters() {\n    setQuery(\"\");\n    setValues({ status: [], owner: [] });\n    searchRef.current?.focus({ preventScroll: true });\n  }\n\n  return (\n    <section className=\"filter-bar-demo\" aria-labelledby={headingId}>\n      <header className=\"filter-bar-demo-heading\">\n        <h2 id={headingId}>Work queue</h2>\n        <p>Find projects by title, status, or owner.</p>\n      </header>\n\n      <TidalFilterBar\n        accessibleLabel=\"Project filters\"\n        search={{\n          label: \"Search projects\",\n          value: query,\n          placeholder: \"Search the queue\",\n          onValueChange: setQuery,\n          inputProps: { autoComplete: \"off\" },\n          inputRef: searchRef,\n        }}\n        groups={FILTER_GROUPS}\n        values={values}\n        onFilterChange={(group, option, selected) => {\n          setValues((current) => {\n            const groupValues = current[group.id] ?? [];\n            return {\n              ...current,\n              [group.id]: selected\n                ? groupValues.includes(option.value)\n                  ? groupValues\n                  : [...groupValues, option.value]\n                : groupValues.filter((value) => value !== option.value),\n            };\n          });\n        }}\n        clearAction={{\n          label: \"Clear\",\n          accessibleLabel: \"Clear search and filters\",\n          disabled: !hasFilters,\n          onAction: clearFilters,\n        }}\n        resultSummary={`${visibleProjects.length} ${\n          visibleProjects.length === 1 ? \"project\" : \"projects\"\n        } shown`}\n      />\n\n      <div className=\"filter-bar-demo-results\" id={resultsId}>\n        {visibleProjects.length ? (\n          <ul aria-label=\"Filtered projects\">\n            {visibleProjects.map((project, index) => (\n              <li\n                key={project.id}\n                style={{ \"--filter-result-index\": index } as IndexedResultStyle}\n              >\n                <article>\n                  <div>\n                    <h3>{project.title}</h3>\n                    <p>{project.description}</p>\n                  </div>\n                  <dl>\n                    <div>\n                      <dt>Status</dt>\n                      <dd>{project.status}</dd>\n                    </div>\n                    <div>\n                      <dt>Owner</dt>\n                      <dd>{project.owner}</dd>\n                    </div>\n                  </dl>\n                </article>\n              </li>\n            ))}\n          </ul>\n        ) : (\n          <div className=\"filter-bar-demo-empty\">\n            <h3>No matching projects</h3>\n            <p>Clear the current search and filters to see the full queue.</p>\n            <button type=\"button\" onClick={clearFilters}>\n              Show all projects\n            </button>\n          </div>\n        )}\n      </div>\n\n      <footer>Fictional project data changes only on this page.</footer>\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      <FilterBarDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/filter-bar.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [],
  "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": "onFilterChange",
      "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": "No error announcement path is present in this demo; the consumer owns validation messaging.",
    "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": []
}
