{
  "component": {
    "id": "stats-grid",
    "name": "Stats grid",
    "tier": "pro",
    "exampleId": "stats-grid",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/stats-grid-demo.tsx",
    "exportName": "StatsGridDemo",
    "sha256": "9ef2116e6e9571454e42328d6551a4ce6916e5d12fd3d6b8795d9845f416aedf",
    "helperImports": [],
    "directComponentImports": [
      "stats-grid"
    ],
    "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/stats-grid",
    "registryUrl": "https://tidalui.com/r/pro/stats-grid.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/stats-grid",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/stats-grid",
      "registryUrl": "https://tidalui.com/r/pro/stats-grid.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/stats-grid.tsx",
    "exports": [
      "TidalStatsGrid",
      "TidalStatsGridMetric"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/stats-grid.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "stats-grid"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/stats-grid.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/stats-grid.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/stats-grid-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useState } from \"react\";\n\nimport { RotateCcw } from \"lucide-react\";\n\nimport { TidalStatsGrid, type TidalStatsGridMetric } from \"./components/ui/stats-grid\";\n\nimport \"./components/ui/stats-grid.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .stats-grid-demo {\\n  width: 100%;\\n  max-width: 1160px;\\n  min-width: 0;\\n  overflow: hidden;\\n  border: 1px solid var(--t-border);\\n  border-radius: 22px;\\n  background: var(--t-subtle);\\n  color: var(--t-ink);\\n  box-shadow: 0 30px 66px -46px #00000070;\\n  container-type: inline-size;\\n}\\n\\n.tidal-scope .stats-grid-demo,\\n.tidal-scope .stats-grid-demo * {\\n  box-sizing: border-box;\\n}\\n\\n.tidal-scope .stats-grid-demo-layout {\\n  display: grid;\\n  grid-template-columns: minmax(0, 1fr);\\n  min-width: 0;\\n}\\n\\n\\n.tidal-scope .stats-grid-demo-stage-head,\\n.tidal-scope .stats-grid-demo-table-head {\\n  display: flex;\\n  align-items: center;\\n  justify-content: space-between;\\n  gap: 14px;\\n  min-width: 0;\\n}\\n\\n.tidal-scope .stats-grid-demo-kicker {\\n  display: block;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  font-weight: 650;\\n  letter-spacing: 0.12em;\\n  line-height: 1.4;\\n  text-transform: uppercase;\\n}\\n\\n.tidal-scope .stats-grid-demo-stage {\\n  display: grid;\\n  min-width: 0;\\n  gap: 20px;\\n  padding: 27px;\\n  background:\\n    linear-gradient(var(--t-border) 1px, transparent 1px),\\n    linear-gradient(90deg, var(--t-border) 1px, transparent 1px),\\n    var(--t-subtle);\\n  background-size: 22px 22px;\\n}\\n\\n.tidal-scope .stats-grid-demo-stage-head {\\n  align-items: flex-start;\\n}\\n\\n.tidal-scope .stats-grid-demo-table-head > div {\\n  min-width: 0;\\n}\\n\\n.tidal-scope .stats-grid-demo-stage-head p {\\n  max-width: 530px;\\n  margin: 5px 0 0;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.5;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .stats-grid-demo-stage-head button,\\n.tidal-scope .stats-grid-demo-periods button {\\n  display: inline-flex;\\n  min-width: 44px;\\n  min-height: 44px;\\n  align-items: center;\\n  justify-content: center;\\n  gap: 7px;\\n  padding: 8px 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: 650;\\n  cursor: pointer;\\n  transition:\\n    background 160ms,\\n    border-color 160ms,\\n    transform 140ms var(--t-ease-out);\\n}\\n\\n.tidal-scope .stats-grid-demo-stage-head button {\\n  flex: none;\\n}\\n\\n.tidal-scope .stats-grid-demo-stage-head button:hover,\\n.tidal-scope .stats-grid-demo-periods button:hover {\\n  background: var(--t-wash);\\n}\\n\\n.tidal-scope .stats-grid-demo-stage-head button:active,\\n.tidal-scope .stats-grid-demo-periods button:active {\\n  transform: scale(0.98);\\n}\\n\\n.tidal-scope .stats-grid-demo-stage-head button:focus-visible,\\n.tidal-scope .stats-grid-demo-periods button:focus-visible {\\n  outline: 2px solid var(--t-accent);\\n  outline-offset: 3px;\\n}\\n\\n.tidal-scope .stats-grid-demo-periods {\\n  display: grid;\\n  grid-template-columns: repeat(3, minmax(0, 1fr));\\n  gap: 7px;\\n  min-width: 0;\\n}\\n\\n.tidal-scope .stats-grid-demo-periods button {\\n  min-width: 0;\\n}\\n\\n.tidal-scope .stats-grid-demo-periods button[aria-pressed=\\\"true\\\"] {\\n  border-color: var(--t-ink);\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n}\\n\\n.tidal-scope .stats-grid-demo-table-wrap {\\n  min-width: 0;\\n  padding: 21px 22px 19px;\\n  border: 1px solid var(--t-border);\\n  border-radius: 18px;\\n  background: var(--t-surface);\\n}\\n\\n.tidal-scope .stats-grid-demo-table-head {\\n  align-items: end;\\n  padding-bottom: 16px;\\n  border-bottom: 1px solid var(--t-border);\\n}\\n\\n.tidal-scope .stats-grid-demo-table-head h3 {\\n  margin: 7px 0 0;\\n  font-size: 20px;\\n  font-weight: 500;\\n  letter-spacing: -0.04em;\\n  line-height: 1.05;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .stats-grid-demo-table-note {\\n  max-width: 190px;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.45;\\n  text-align: end;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .stats-grid-demo-table-scroll {\\n  min-width: 0;\\n  overflow-x: auto;\\n}\\n\\n.tidal-scope .stats-grid-demo-table-scroll table {\\n  width: 100%;\\n  min-width: 0;\\n  table-layout: fixed;\\n  border-collapse: collapse;\\n  color: var(--t-ink);\\n  font-size: 11px;\\n  text-align: start;\\n}\\n\\n.tidal-scope .stats-grid-demo-table-scroll th,\\n.tidal-scope .stats-grid-demo-table-scroll td {\\n  padding: 13px 10px;\\n  border-bottom: 1px solid var(--t-border);\\n  text-align: start;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .stats-grid-demo-table-scroll thead th {\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  font-weight: 650;\\n  letter-spacing: 0.1em;\\n  text-transform: uppercase;\\n}\\n\\n.tidal-scope .stats-grid-demo-table-scroll tbody th {\\n  font-weight: 650;\\n}\\n\\n.tidal-scope .stats-grid-demo-table-scroll tr:last-child > * {\\n  border-bottom: 0;\\n}\\n\\n.tidal-scope .stats-grid-demo-disclosure {\\n  margin: 15px 0 0;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.55;\\n  overflow-wrap: anywhere;\\n}\\n\\n.tidal-scope .stats-grid-demo-visually-hidden {\\n  position: absolute;\\n  width: 1px;\\n  height: 1px;\\n  margin: -1px;\\n  padding: 0;\\n  overflow: hidden;\\n  border: 0;\\n  clip: rect(0 0 0 0);\\n  clip-path: inset(50%);\\n  white-space: nowrap;\\n}\\n\\n@container (max-width: 760px) {\\n  .tidal-scope .stats-grid-demo-layout {\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n}\\n\\n@container (max-width: 500px) {\\n  .tidal-scope .stats-grid-demo-stage {\\n    gap: 15px;\\n    padding: 14px;\\n    background-size: 18px 18px;\\n  }\\n\\n  .tidal-scope .stats-grid-demo-stage-head {\\n    display: block;\\n  }\\n\\n  .tidal-scope .stats-grid-demo-stage-head button {\\n    width: 100%;\\n    margin-top: 12px;\\n  }\\n\\n  .tidal-scope .stats-grid-demo-periods {\\n    grid-template-columns: minmax(0, 1fr);\\n  }\\n\\n  .tidal-scope .stats-grid-demo-table-wrap {\\n    padding: 18px 16px 16px;\\n  }\\n\\n  .tidal-scope .stats-grid-demo-table-head {\\n    align-items: flex-start;\\n    flex-direction: column;\\n    gap: 8px;\\n  }\\n\\n  .tidal-scope .stats-grid-demo-table-note {\\n    max-width: none;\\n    text-align: start;\\n  }\\n}\\n\\n@media (prefers-reduced-motion: reduce) {\\n  .tidal-scope .stats-grid-demo-stage-head button,\\n  .tidal-scope .stats-grid-demo-periods button {\\n    transition: none;\\n    transform: none;\\n  }\\n}\";\n\ntype PeriodId = \"current\" | \"previous\" | \"baseline\";\n\ninterface PeriodData {\n  label: string;\n  note: string;\n  metrics: readonly TidalStatsGridMetric[];\n  rows: readonly [string, string, string][];\n}\n\nconst PERIODS: Record<PeriodId, PeriodData> = {\n  current: {\n    label: \"Current month\",\n    note: \"Sample workspace / current month\",\n    metrics: [\n      {\n        id: \"active-work\",\n        label: \"Active work\",\n        value: \"28\",\n        comparison: \"+6 sample items\",\n        detail: \"Open items across three fictional lanes.\",\n        trend: \"positive\",\n        valueKey: \"current-active\",\n        href: \"#stats-grid-demo-table\",\n      },\n      {\n        id: \"review-ready\",\n        label: \"Review ready\",\n        value: \"12\",\n        comparison: \"4 awaiting a read\",\n        detail: \"Prepared items in the local review queue.\",\n        trend: \"neutral\",\n        valueKey: \"current-review\",\n      },\n      {\n        id: \"planned-hours\",\n        label: \"Planned hours\",\n        value: \"86h\",\n        comparison: \"+14h in sample plan\",\n        detail: \"A display value supplied by the workspace owner.\",\n        trend: \"positive\",\n        valueKey: \"current-hours\",\n      },\n      {\n        id: \"open-questions\",\n        label: \"Open questions\",\n        value: \"07\",\n        comparison: \"2 marked urgent\",\n        detail: \"Questions still visible in the local handoff list.\",\n        trend: \"negative\",\n        valueKey: \"current-questions\",\n      },\n    ],\n    rows: [\n      [\"Planning\", \"In review\", \"Ava\"],\n      [\"Build\", \"On track\", \"Noah\"],\n      [\"Handoff\", \"2 questions\", \"Mila\"],\n    ],\n  },\n  previous: {\n    label: \"Previous month\",\n    note: \"Sample workspace / previous month\",\n    metrics: [\n      {\n        id: \"active-work\",\n        label: \"Active work\",\n        value: \"22\",\n        comparison: \"5 sample items\",\n        detail: \"Open items in the previous local snapshot.\",\n        trend: \"neutral\",\n        valueKey: \"previous-active\",\n        href: \"#stats-grid-demo-table\",\n      },\n      {\n        id: \"review-ready\",\n        label: \"Review ready\",\n        value: \"08\",\n        comparison: \"3 awaiting a read\",\n        detail: \"Prepared items in the previous sample queue.\",\n        trend: \"neutral\",\n        valueKey: \"previous-review\",\n      },\n      {\n        id: \"planned-hours\",\n        label: \"Planned hours\",\n        value: \"72h\",\n        comparison: \"9h in sample plan\",\n        detail: \"The earlier display value supplied by the workspace owner.\",\n        trend: \"neutral\",\n        valueKey: \"previous-hours\",\n      },\n      {\n        id: \"open-questions\",\n        label: \"Open questions\",\n        value: \"09\",\n        comparison: \"3 marked urgent\",\n        detail: \"Questions visible in the previous local handoff list.\",\n        trend: \"negative\",\n        valueKey: \"previous-questions\",\n      },\n    ],\n    rows: [\n      [\"Planning\", \"Draft\", \"Ava\"],\n      [\"Build\", \"In progress\", \"Noah\"],\n      [\"Handoff\", \"3 questions\", \"Mila\"],\n    ],\n  },\n  baseline: {\n    label: \"Baseline snapshot\",\n    note: \"Sample workspace / baseline snapshot\",\n    metrics: [\n      {\n        id: \"active-work\",\n        label: \"Active work\",\n        value: \"18\",\n        comparison: \"Baseline sample\",\n        detail: \"A fixed local comparison snapshot.\",\n        trend: \"neutral\",\n        valueKey: \"baseline-active\",\n        href: \"#stats-grid-demo-table\",\n      },\n      {\n        id: \"review-ready\",\n        label: \"Review ready\",\n        value: \"06\",\n        comparison: \"Baseline sample\",\n        detail: \"A fixed local comparison snapshot.\",\n        trend: \"neutral\",\n        valueKey: \"baseline-review\",\n      },\n      {\n        id: \"planned-hours\",\n        label: \"Planned hours\",\n        value: \"64h\",\n        comparison: \"Baseline sample\",\n        detail: \"A fixed local comparison snapshot.\",\n        trend: \"neutral\",\n        valueKey: \"baseline-hours\",\n      },\n      {\n        id: \"open-questions\",\n        label: \"Open questions\",\n        value: \"11\",\n        comparison: \"Baseline sample\",\n        detail: \"A fixed local comparison snapshot.\",\n        trend: \"neutral\",\n        valueKey: \"baseline-questions\",\n      },\n    ],\n    rows: [\n      [\"Planning\", \"Open\", \"Ava\"],\n      [\"Build\", \"Not started\", \"Noah\"],\n      [\"Handoff\", \"4 questions\", \"Mila\"],\n    ],\n  },\n};\n\nconst PERIOD_OPTIONS: readonly { id: PeriodId; label: string }[] = [\n  { id: \"current\", label: \"Current\" },\n  { id: \"previous\", label: \"Previous\" },\n  { id: \"baseline\", label: \"Baseline\" },\n];\n\nexport function StatsGridDemo() {\n  const [period, setPeriod] = useState<PeriodId>(\"current\");\n  const [message, setMessage] = useState(\"Current month sample selected.\");\n  const active = PERIODS[period];\n\n  function choosePeriod(next: PeriodId) {\n    setPeriod(next);\n    setMessage(`${PERIODS[next].label} sample selected.`);\n  }\n\n  function resetSample() {\n    setPeriod(\"current\");\n    setMessage(\"Current month sample restored.\");\n  }\n\n  return (\n    <section className=\"stats-grid-demo\" aria-label=\"Stats grid preview\">\n      <div className=\"stats-grid-demo-layout\">\n        <div className=\"stats-grid-demo-stage\">\n          <div className=\"stats-grid-demo-stage-head\">\n            <p>{active.note}. Switching updates the cards and detail table.</p>\n            <button type=\"button\" onClick={resetSample}>\n              <RotateCcw size={14} aria-hidden=\"true\" />\n              Reset\n            </button>\n          </div>\n\n          <div\n            className=\"stats-grid-demo-periods\"\n            role=\"group\"\n            aria-label=\"Sample period\"\n          >\n            {PERIOD_OPTIONS.map((option) => (\n              <button\n                key={option.id}\n                type=\"button\"\n                aria-pressed={period === option.id}\n                onClick={() => choosePeriod(option.id)}\n              >\n                {option.label}\n              </button>\n            ))}\n          </div>\n\n          <TidalStatsGrid\n            eyebrow=\"Sample workspace\"\n            title=\"Workspace overview\"\n            description=\"Every value below is explicit local sample content. Consumers provide the metric meaning, comparison text, and any destination.\"\n            metrics={active.metrics}\n            action={{\n              label: \"View sample ledger\",\n              href: \"#stats-grid-demo-table\",\n            }}\n          />\n\n          <div\n            className=\"stats-grid-demo-table-wrap\"\n            id=\"stats-grid-demo-table\"\n          >\n            <div className=\"stats-grid-demo-table-head\">\n              <div>\n                <span className=\"stats-grid-demo-kicker\">DETAIL TABLE</span>\n                <h3>{active.label} lanes</h3>\n              </div>\n              <span\n                className=\"stats-grid-demo-table-note\"\n                role=\"status\"\n                aria-live=\"polite\"\n              >\n                {message}\n              </span>\n            </div>\n            <div className=\"stats-grid-demo-table-scroll\">\n              <table>\n                <caption className=\"stats-grid-demo-visually-hidden\">\n                  {active.label} fictional sample workspace lanes\n                </caption>\n                <thead>\n                  <tr>\n                    <th scope=\"col\">Lane</th>\n                    <th scope=\"col\">State</th>\n                    <th scope=\"col\">Owner</th>\n                  </tr>\n                </thead>\n                <tbody>\n                  {active.rows.map(([lane, state, owner]) => (\n                    <tr key={lane}>\n                      <th scope=\"row\">{lane}</th>\n                      <td>{state}</td>\n                      <td>{owner}</td>\n                    </tr>\n                  ))}\n                </tbody>\n              </table>\n            </div>\n            <p className=\"stats-grid-demo-disclosure\">\n              Fictional sample values for local component review only. This\n              preview makes no customer, adoption, performance, revenue, or\n              live-data claim.\n            </p>\n          </div>\n        </div>\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      <StatsGridDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/stats-grid.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": false,
      "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": []
}
