{
  "component": {
    "id": "issue-list",
    "name": "Issue list",
    "tier": "pro",
    "exampleId": "issue-list",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/issue-list-demo.tsx",
    "exportName": "IssueListDemo",
    "sha256": "5eda9b90b4f090fbde8be35583476afcfa8c7723d6d55c61d3a2805d40836f62",
    "helperImports": [],
    "directComponentImports": [
      "issue-list"
    ],
    "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/issue-list",
    "registryUrl": "https://tidalui.com/r/pro/issue-list.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/issue-list",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/issue-list",
      "registryUrl": "https://tidalui.com/r/pro/issue-list.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/issue-list.tsx",
    "exports": [
      "TidalIssue",
      "TidalIssueFilter",
      "TidalIssueList"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/issue-list.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "issue-list"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/issue-list.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/issue-list.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/issue-list-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useEffect, useLayoutEffect, useMemo, useRef, useState, type MouseEvent } from \"react\";\n\nimport { TidalIssueList, type TidalIssue, type TidalIssueFilter } from \"./components/ui/issue-list\";\n\nimport \"./components/ui/issue-list.css\";\n\nfunction tidalExampleAvatarDataUri(seed: unknown) {\n  const text = String(seed).replace(/[^a-z0-9]/gi, \"\").slice(-2) || \"UI\";\n  const palette = [\"#333333\", \"#555555\", \"#777777\", \"#999999\", \"#bbbbbb\"];\n  const color = palette[Array.from(text).reduce((sum, character) => sum + character.charCodeAt(0), 0) % palette.length];\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\"><rect width=\"96\" height=\"96\" rx=\"48\" fill=\"${color}\"/><circle cx=\"48\" cy=\"38\" r=\"17\" fill=\"white\" fill-opacity=\".92\"/><path d=\"M18 92c3-22 15-34 30-34s27 12 30 34\" fill=\"white\" fill-opacity=\".92\"/></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nfunction tidalExampleImageDataUri(label: string) {\n  const safeLabel = label.replace(/[<>&]/g, \"\").slice(0, 28) || \"Sample image\";\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1200 675\"><defs><linearGradient id=\"g\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"1\"><stop stop-color=\"#171717\"/><stop offset=\"1\" stop-color=\"#555555\"/></linearGradient></defs><rect width=\"1200\" height=\"675\" fill=\"url(#g)\"/><circle cx=\"950\" cy=\"100\" r=\"260\" fill=\"white\" fill-opacity=\".08\"/><text x=\"80\" y=\"570\" fill=\"white\" font-family=\"system-ui,sans-serif\" font-size=\"64\" font-weight=\"700\">${safeLabel}</text></svg>`;\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nconst tidalExampleStyles = \".tidal-scope .issue-list-demo {\\n  width: 100%;\\n  max-width: 820px;\\n  min-width: 0;\\n}\\n.tidal-scope .issue-list-demo > .tidal-issue-list {\\n  padding: 26px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  background: var(--t-surface);\\n  box-shadow:\\n    0 2px 3px #00000003,\\n    0 18px 46px #00000007;\\n}\\n.tidal-scope .issue-list-demo-detail {\\n  margin-top: 14px;\\n  padding: 18px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 14px;\\n  background: var(--t-subtle);\\n}\\n.tidal-scope .issue-list-demo-detail > div {\\n  display: flex;\\n  justify-content: space-between;\\n  gap: 12px;\\n  font:\\n    11px/1.4 ui-monospace,\\n    monospace;\\n}\\n.tidal-scope .issue-list-demo-detail h3 {\\n  margin: 10px 0 5px;\\n  font-size: 16px;\\n  line-height: 1.35;\\n  overflow-wrap: anywhere;\\n}\\n.tidal-scope .issue-list-demo-detail p {\\n  margin: 0;\\n  color: var(--t-muted);\\n  font-size: 12px;\\n  line-height: 1.55;\\n  overflow-wrap: anywhere;\\n}\\n.tidal-scope .issue-list-demo-detail button {\\n  min-width: 44px;\\n  min-height: 44px;\\n  margin-top: 14px;\\n  padding: 8px 14px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 9px;\\n  background: var(--t-surface);\\n  color: var(--t-ink);\\n  font: 600 12px/1.2 inherit;\\n  cursor: pointer;\\n}\\n.tidal-scope .issue-list-demo-detail:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 4px;\\n}\\n@media (max-width: 500px) {\\n  .tidal-scope .issue-list-demo > .tidal-issue-list {\\n    padding: 16px;\\n  }\\n}\\n@media (prefers-reduced-motion: reduce) {\\n  .tidal-scope .issue-list-demo-detail {\\n    scroll-behavior: auto;\\n  }\\n}\";\n\ntype DemoIssue = Omit<TidalIssue, \"selected\">;\n\nconst BASE_ISSUES: readonly DemoIssue[] = [\n  {\n    id: \"search-keyboard\",\n    key: \"PRO-128\",\n    title: \"Search focus skips the saved filter\",\n    accessibleTitle: \"Search focus skips the saved filter\",\n    href: \"#issue-list-sample-search-keyboard\",\n    status: { id: \"open\", label: \"Open\" },\n    priority: { id: \"high\", label: \"High\" },\n    assignee: {\n      name: \"Ava Stone\",\n      accessibleName: \"Ava Stone\",\n      avatar: {\n        src: tidalExampleAvatarDataUri(\"01\"),\n        alt: \"Ava Stone, fictional teammate\",\n      },\n    },\n    updatedDateTime: \"2026-10-15T09:20:00-05:00\",\n    updatedLabel: \"Today, 9:20 AM\",\n    labels: [\"Search\", \"Keyboard\"],\n  },\n  {\n    id: \"export-copy\",\n    key: \"PRO-121\",\n    title: \"Clarify the export confirmation copy\",\n    accessibleTitle: \"Clarify the export confirmation copy\",\n    href: \"#issue-list-sample-export-copy\",\n    status: { id: \"review\", label: \"In review\" },\n    priority: { id: \"medium\", label: \"Medium\" },\n    assignee: {\n      name: \"Noah Park\",\n      accessibleName: \"Noah Park\",\n      avatar: {\n        src: tidalExampleAvatarDataUri(\"02\"),\n        alt: \"Noah Park, fictional teammate\",\n      },\n    },\n    updatedDateTime: \"2026-10-14T16:45:00-05:00\",\n    updatedLabel: \"Yesterday, 4:45 PM\",\n    labels: [\"Content\"],\n  },\n  {\n    id: \"mobile-density\",\n    key: \"PRO-116\",\n    title: \"Phone cards need a clearer priority signal\",\n    accessibleTitle: \"Phone cards need a clearer priority signal\",\n    href: \"#issue-list-sample-mobile-density\",\n    status: { id: \"open\", label: \"Open\" },\n    priority: { id: \"low\", label: \"Low\" },\n    updatedDateTime: \"2026-10-13T11:05:00-05:00\",\n    updatedLabel: \"Oct 13, 11:05 AM\",\n    labels: [\"Mobile\"],\n  },\n];\n\nfunction primary(event: MouseEvent<HTMLAnchorElement>) {\n  return (\n    event.button === 0 &&\n    !event.metaKey &&\n    !event.ctrlKey &&\n    !event.shiftKey &&\n    !event.altKey\n  );\n}\n\nfunction revealWithinDocument(node: HTMLElement) {\n  const ownerWindow = node.ownerDocument.defaultView;\n  if (!ownerWindow) return;\n  const rect = node.getBoundingClientRect();\n  const visibleTop = 90;\n  const visibleBottom = ownerWindow.innerHeight - 16;\n  if (rect.top < visibleTop) {\n    ownerWindow.scrollBy({ top: rect.top - visibleTop });\n  } else if (rect.bottom > visibleBottom) {\n    ownerWindow.scrollBy({ top: rect.bottom - visibleBottom });\n  }\n}\n\nexport function IssueListDemo() {\n  const [selected, setSelected] = useState<string[]>([\"search-keyboard\"]);\n  const [status, setStatus] = useState(\"all\");\n  const [priority, setPriority] = useState(\"all\");\n  const [assignee, setAssignee] = useState(\"all\");\n  const [sort, setSort] = useState(\"updated\");\n  const [detail, setDetail] = useState<DemoIssue | null>(() =>\n    typeof window === \"undefined\"\n      ? null\n      : (BASE_ISSUES.find((issue) => issue.href === window.location.hash) ??\n        null),\n  );\n  const [outcome, setOutcome] = useState(\"1 issue selected.\");\n  const listRef = useRef<HTMLElement>(null);\n  const detailRef = useRef<HTMLElement>(null);\n  const openerRef = useRef<HTMLAnchorElement | null>(null);\n  const focusDetail = useRef(false);\n  const restoreFrame = useRef<number | null>(null);\n\n  useLayoutEffect(() => {\n    if (!detail || !focusDetail.current) return;\n    focusDetail.current = false;\n    const node = detailRef.current;\n    if (!node) return;\n    node.focus({ preventScroll: true });\n    revealWithinDocument(node);\n  }, [detail]);\n\n  useEffect(\n    () => () => {\n      if (restoreFrame.current !== null)\n        cancelAnimationFrame(restoreFrame.current);\n    },\n    [],\n  );\n\n  const visible = useMemo(() => {\n    const filtered = BASE_ISSUES.filter(\n      (issue) =>\n        (status === \"all\" || issue.status.id === status) &&\n        (priority === \"all\" || issue.priority.id === priority) &&\n        (assignee === \"all\" ||\n          (assignee === \"unassigned\"\n            ? !issue.assignee\n            : issue.assignee?.accessibleName === assignee)),\n    );\n    return [...filtered].sort((a, b) =>\n      sort === \"priority\"\n        ? [\"high\", \"medium\", \"low\"].indexOf(a.priority.id) -\n          [\"high\", \"medium\", \"low\"].indexOf(b.priority.id)\n        : b.updatedDateTime.localeCompare(a.updatedDateTime),\n    );\n  }, [assignee, priority, sort, status]);\n\n  const filters: TidalIssueFilter[] = [\n    {\n      id: \"status\",\n      label: \"Status\",\n      value: status,\n      options: [\n        { value: \"all\", label: \"All statuses\" },\n        { value: \"open\", label: \"Open\" },\n        { value: \"review\", label: \"In review\" },\n      ],\n      onValueChange: setStatus,\n    },\n    {\n      id: \"priority\",\n      label: \"Priority\",\n      value: priority,\n      options: [\n        { value: \"all\", label: \"All priorities\" },\n        { value: \"high\", label: \"High\" },\n        { value: \"medium\", label: \"Medium\" },\n        { value: \"low\", label: \"Low\" },\n      ],\n      onValueChange: setPriority,\n    },\n    {\n      id: \"assignee\",\n      label: \"Assignee\",\n      value: assignee,\n      options: [\n        { value: \"all\", label: \"Everyone\" },\n        { value: \"Ava Stone\", label: \"Ava Stone\" },\n        { value: \"Noah Park\", label: \"Noah Park\" },\n        { value: \"unassigned\", label: \"Unassigned\" },\n      ],\n      onValueChange: setAssignee,\n    },\n  ];\n\n  const issues: TidalIssue[] = visible.map((issue) => ({\n    ...issue,\n    selected: selected.includes(issue.id),\n    linkProps: {\n      onClick: (event: import(\"react\").MouseEvent<HTMLAnchorElement>) => {\n        if (!primary(event)) return;\n        event.preventDefault();\n        openerRef.current = event.currentTarget;\n        focusDetail.current = true;\n        setDetail(issue);\n        setOutcome(`Opened ${issue.key} locally.`);\n      },\n    },\n  }));\n\n  const resetFilters = () => {\n    setStatus(\"all\");\n    setPriority(\"all\");\n    setAssignee(\"all\");\n    setOutcome(\"Filters reset.\");\n  };\n\n  return (\n    <div className=\"issue-list-demo\">\n      <TidalIssueList\n        ref={listRef}\n        tabIndex={-1}\n        title=\"Product issues\"\n        summary={`${visible.length} shown`}\n        description=\"Filter the sample queue, select rows, or open an issue.\"\n        issues={issues}\n        filters={filters}\n        sort={{\n          label: \"Sort\",\n          value: sort,\n          options: [\n            { value: \"updated\", label: \"Recently updated\" },\n            { value: \"priority\", label: \"Priority\" },\n          ],\n          onValueChange: setSort,\n        }}\n        onSelectionChange={(issue, checked) => {\n          setSelected((current) =>\n            checked\n              ? [...new Set([...current, issue.id])]\n              : current.filter((id) => id !== issue.id),\n          );\n          setOutcome(`${checked ? \"Selected\" : \"Cleared\"} ${issue.key}.`);\n        }}\n        bulkActions={[\n          {\n            id: \"review\",\n            label: \"Mark for review\",\n            onAction: (ids) =>\n              setOutcome(\n                `${ids.length} issue${ids.length === 1 ? \"\" : \"s\"} marked for local review.`,\n              ),\n          },\n          {\n            id: \"clear\",\n            label: \"Clear selection\",\n            onAction: () => {\n              setSelected([]);\n              setOutcome(\"Selection cleared.\");\n            },\n          },\n        ]}\n        emptyContent={<p>No sample issues match these filters.</p>}\n        emptyAction={{ label: \"Reset filters\", onAction: resetFilters }}\n        footer={\n          <span>{outcome} Sample data. Changes stay in this preview.</span>\n        }\n      />\n      {detail ? (\n        <section\n          className=\"issue-list-demo-detail\"\n          id={`issue-list-sample-${detail.id}`}\n          ref={detailRef}\n          tabIndex={-1}\n          aria-label={`Issue ${detail.key} details`}\n        >\n          <div>\n            <span>{detail.key}</span>\n            <strong>{detail.status.label}</strong>\n          </div>\n          <h3>{detail.title}</h3>\n          <p>\n            This local detail confirms the native issue destination without\n            connecting to a tracker.\n          </p>\n          <button\n            type=\"button\"\n            onClick={() => {\n              setDetail(null);\n              setOutcome(\"Issue detail closed.\");\n              if (restoreFrame.current !== null)\n                cancelAnimationFrame(restoreFrame.current);\n              restoreFrame.current = requestAnimationFrame(() => {\n                restoreFrame.current = null;\n                const target = openerRef.current?.isConnected\n                  ? openerRef.current\n                  : (listRef.current?.querySelector<HTMLAnchorElement>(\n                      \".tidal-issue-link[href]\",\n                    ) ?? listRef.current);\n                target?.focus({ preventScroll: true });\n                if (target) revealWithinDocument(target);\n              });\n            }}\n          >\n            Close details\n          </button>\n        </section>\n      ) : null}\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      <IssueListDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/issue-list.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": "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."
    }
  ],
  "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": "server-gated"
  },
  "exceptions": []
}
