{
  "$schema": "https://www.digitaltableteur.com/schemas/contract-spec/1.0/contract.schema.json",
  "specVersion": "1.0",
  "name": "DataTable",
  "status": "beta",
  "description": "Accessible data table with typed columns, three-state sortable headings, optional row selection and pagination, and density variants. Composes the Table primitives and the useTable* hooks.",
  "package": {
    "name": "@digitaltableteur/react",
    "import": "import { DataTable } from \"@digitaltableteur/react\";"
  },
  "props": {
    "data": {
      "type": "Row[]",
      "optional": false,
      "description": "Table rows."
    },
    "columns": {
      "type": "DataTableColumn<Row>[]",
      "optional": false,
      "description": "Ordered column definitions."
    },
    "getRowId": {
      "type": "(row: Row) => string",
      "optional": false,
      "description": "Stable row identifier."
    },
    "caption": {
      "type": "string",
      "optional": false,
      "description": "Accessible table name rendered as a caption."
    },
    "hideCaption": {
      "type": "boolean",
      "optional": true,
      "description": "Visually hides the caption while retaining the accessible name."
    },
    "sort": {
      "type": "DataTableSort | null",
      "optional": true,
      "description": "Controlled sort state."
    },
    "defaultSort": {
      "type": "DataTableSort | null",
      "optional": true,
      "description": "Initial uncontrolled sort state."
    },
    "onSortChange": {
      "type": "(sort: DataTableSort | null) => void",
      "optional": true,
      "description": "Receives sort changes."
    },
    "selectedRowIds": {
      "type": "string[]",
      "optional": true,
      "description": "Controlled selected row identifiers; enables selection."
    },
    "defaultSelectedRowIds": {
      "type": "string[]",
      "optional": true,
      "description": "Initial uncontrolled selection; also enables selection."
    },
    "onSelectionChange": {
      "type": "(rowIds: string[]) => void",
      "optional": true,
      "description": "Receives selected row identifiers; also enables selection."
    },
    "getRowLabel": {
      "type": "(row: Row) => string",
      "optional": true,
      "description": "Accessible row label used by selection checkboxes."
    },
    "pageSize": {
      "type": "number",
      "optional": true,
      "description": "Rows per page; enables pagination when set."
    },
    "emptyState": {
      "type": "React.ReactNode",
      "optional": true,
      "description": "Empty-state cell content."
    },
    "striped": {
      "type": "boolean",
      "optional": true,
      "description": "Alternating row surfaces."
    },
    "stickyHeader": {
      "type": "boolean",
      "optional": true,
      "description": "Pin the header row while the body scrolls."
    },
    "size": {
      "type": "union",
      "values": [
        "sm",
        "md",
        "lg"
      ],
      "optional": true,
      "description": "Density scale."
    },
    "className": {
      "type": "string",
      "optional": true
    }
  },
  "accessibility": {
    "criteria": [
      {
        "id": "axe-no-violations",
        "statement": "Required stories produce no axe violations at the configured severity.",
        "verification": "automated",
        "wcag": [
          "2.5.8"
        ],
        "check": "npm run test:stories:matrix:ci",
        "evidence": [
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-default.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:25:21.204Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-default.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:12:02.409Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-default.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:18:48.684Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-example.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:25:21.790Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-example.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:12:03.007Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-example.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:18:49.342Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-forced-colors.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:25:22.078Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:12:03.288Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-forced-colors.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:18:49.623Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-playground.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:25:21.503Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-playground.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:12:02.693Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-playground.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:18:49.012Z",
            "passed": true,
            "runner": "local-audit-fixes"
          }
        ]
      },
      {
        "id": "accessibility-tree",
        "statement": "The accessibility tree (role, name, state) matches the committed snapshot for every required story.",
        "verification": "automated",
        "wcag": [
          "1.3.1",
          "4.1.2"
        ],
        "check": "npm run test:stories:matrix:ci",
        "evidence": [
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-default.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:25:21.204Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-default.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:31:55.839Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-default.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:12:02.409Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-default.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:18:48.684Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-example.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:25:21.790Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-example.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:31:56.356Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-example.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:12:03.007Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-example.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:18:49.342Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-forced-colors.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:25:22.078Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-forced-colors.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:31:56.609Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:12:03.288Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-forced-colors.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:18:49.623Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-playground.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:25:21.503Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-playground.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:31:56.089Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-playground.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:12:02.693Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-playground.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:18:49.012Z",
            "passed": true,
            "runner": "local-audit-fixes"
          }
        ]
      },
      {
        "id": "forced-colors-real-browser",
        "statement": "The component remains legible and operable under a real browser forced-colors: active pass.",
        "verification": "automated",
        "check": "npm run test:stories:hc",
        "evidence": [
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-default.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:31:55.839Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-example.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:31:56.356Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-forced-colors.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:31:56.609Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/DataTable/__a11y-evidence__/data-display-datatable-playground.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:31:56.089Z",
            "passed": true,
            "runner": "local-audit-fixes"
          }
        ]
      },
      {
        "id": "keyboard-contract",
        "statement": "Every documented keyboard interaction works as specified.",
        "verification": "unverified",
        "wcag": [
          "2.1.1",
          "2.1.2"
        ],
        "note": "No exportable evidence record for this check; re-run the check to capture one."
      },
      {
        "id": "aria-requirements",
        "statement": "Documented ARIA roles, states, and properties are present on the rendered output.",
        "verification": "unverified",
        "wcag": [
          "4.1.2"
        ],
        "note": "No exportable evidence record for this check; re-run the check to capture one."
      },
      {
        "id": "human-a11y-review",
        "statement": "A human completed an end-to-end accessibility review of this component.",
        "verification": "manual",
        "note": "2026-07-26 — native table, caption, sorting, selection labels, keyboard behavior, and axe result reviewed in unit tests. 2026-08-03 — Phase 1 pass: light/dark/forced-colors verified in a real browser; keyboard contract (Tab/Space/Enter) driven by a play story; axe clean across 9 stories x 3 modes; AT-tree and real-browser forced-colors evidence captured.",
        "reviewedAt": "2026-07-26"
      }
    ]
  },
  "source": [
    "../../../nextjs-app/shared/components/DataTable/DataTable.module.css",
    "../../../nextjs-app/shared/components/DataTable/DataTable.tsx"
  ]
}
