{
  "format": "ui-contract-component-draft",
  "id": "shadcn:DataTable",
  "version": "0.4.1",
  "status": "complete",
  "domains": {
    "interface": "interface.json",
    "visual": {
      "tokens": "../../tokens.json",
      "css": "layout.css"
    },
    "behavior": "behavior.scxml",
    "accessibility": {
      "html": "accessibility.html",
      "rules": "accessibility.rules.json"
    }
  },
  "anatomy": {
    "recipe": "Caller Table/TanStack composition boundary",
    "toolbar": "Named native filter/visibility controls",
    "filter": "Controlled native email filter input",
    "table": "Native Table delegates all table head/body/row/cell/caption geometry",
    "sort": "Native column action, separate from aria-sort on header",
    "selection": "Native named row selection checkbox keyed by stable payment ID",
    "empty": "Real empty cell spans visible columns",
    "pages": "Named native page actions with actual boundary disabled",
    "status": "Polite derived filtered count",
    "error": "Caller data failure feedback, separate from empty model",
    "dashboard-block": "Frozen dashboard-01 application block, source inventory retained; no generic extra DataTable widget or implicit drag/detail requirement."
  },
  "stories": "stories.json",
  "ux": "ux.json",
  "composition": {
    "table": {
      "component": "../table/component.json"
    },
    "button": {
      "component": "../button/component.json"
    },
    "input": {
      "component": "../input/component.json"
    },
    "checkbox": {
      "component": "../checkbox/component.json"
    },
    "pagination": {
      "component": "../pagination/component.json"
    },
    "dropdown-menu": {
      "component": "../dropdown-menu/component.json"
    }
  },
  "convention": "semantic-component/1",
  "partBindings": {
    "recipe": {
      "kind": "element",
      "declaration": "DataTableRecipe",
      "selector": "[data-part=\"data-table\"]",
      "description": "Caller Table/TanStack composition boundary",
      "ownership": "explicit documented guide recipe"
    },
    "toolbar": {
      "kind": "element",
      "declaration": "DataTableRecipe",
      "selector": "[data-part=\"data-table-toolbar\"]",
      "description": "Named native filter/visibility controls",
      "ownership": "actual source output"
    },
    "filter": {
      "kind": "element",
      "declaration": "DataTableRecipe",
      "selector": "[data-part=\"data-table-filter\"]",
      "description": "Controlled native email filter input",
      "ownership": "actual source output"
    },
    "table": {
      "kind": "element",
      "declaration": "DataTableRecipe",
      "selector": "[data-slot=\"table\"]",
      "description": "Native Table delegates all table head/body/row/cell/caption geometry",
      "ownership": "actual source output"
    },
    "sort": {
      "kind": "element",
      "declaration": "DataTableRecipe",
      "selector": "[data-part=\"data-table-sort\"]",
      "description": "Native column action, separate from aria-sort on header",
      "ownership": "actual source output"
    },
    "selection": {
      "kind": "element",
      "declaration": "DataTableRecipe",
      "selector": "[data-part=\"data-table-selection\"]",
      "description": "Native named row selection checkbox keyed by stable payment ID",
      "ownership": "actual source output"
    },
    "empty": {
      "kind": "element",
      "declaration": "DataTableRecipe",
      "selector": "[data-part=\"data-table-empty\"]",
      "description": "Real empty cell spans visible columns",
      "ownership": "actual source output"
    },
    "pages": {
      "kind": "element",
      "declaration": "DataTableRecipe",
      "selector": "[data-part=\"data-table-pages\"]",
      "description": "Named native page actions with actual boundary disabled",
      "ownership": "actual source output"
    },
    "status": {
      "kind": "element",
      "declaration": "DataTableRecipe",
      "selector": "[data-part=\"data-table-status\"]",
      "description": "Polite derived filtered count",
      "ownership": "actual source output"
    },
    "error": {
      "kind": "element",
      "declaration": "DataTableRecipe",
      "selector": "[data-part=\"data-table-error\"]",
      "description": "Caller data failure feedback, separate from empty model",
      "ownership": "actual source output"
    },
    "dashboard-block": {
      "kind": "controller",
      "declaration": "DashboardDataTableBlock",
      "source": "Frozen dashboard-01 application block, source inventory retained; no generic extra DataTable widget or implicit drag/detail requirement.",
      "description": "Frozen dashboard-01 application block, source inventory retained; no generic extra DataTable widget or implicit drag/detail requirement."
    }
  },
  "visualContract": {
    "tokens": {
      "color-destructive": "semantic.color.destructive",
      "color-foreground": "semantic.color.foreground",
      "color-muted-foreground": "semantic.color.mutedForeground",
      "color-primary": "semantic.color.primary",
      "data-table-filter-width": "components.data-table.filterWidth",
      "data-table-gap": "components.data-table.gap",
      "data-table-selection-size": "components.data-table.selectionSize",
      "font-fallback": "semantic.typography.fallbackFamily",
      "font-family": "semantic.typography.fontFamily"
    },
    "runtimeProperties": {},
    "layoutPolicy": "DataTable is the official Table+TanStack guide recipe, not an invented exported widget root. Caller semantic data-part marks only recipe-owned toolbar, filter, selection, sort action, empty/error/count and page navigation. Complete Table CSS explicitly owns all native table row/cell/head/caption geometry; Button/Input CSS own those actual source controls. The recipe retains native compact 16px selection affordance and uses bounded readable spacing/filter width decisions instead of558px native specimen width. Actual selected row data-state and native checkbox are independent from sorting/filtering/paging/visibility states. Stable getRowId binds checkbox names and state to records; current aria-sort belongs to real scoped header. Empty colSpan follows visible column count. Error is caller feedback and does not erase controlled feature state. DashboardDataTableBlock is explicitly a separate frozen application composition, not rendered extra anatomy. Native table semantics stay native; no fictitious ARIA grid navigation, record schema or backend lifecycle.",
    "variants": {
      "sorting": {
        "source": "TanStack sorting",
        "attribute": "aria-sort on actual th"
      },
      "selected": {
        "source": "row.getIsSelected",
        "attribute": "data-state=selected"
      },
      "empty": {
        "source": "visible derived row model"
      },
      "visibility": {
        "source": "controlled columnVisibility"
      }
    },
    "sourceTraceability": "figma/traceability.json"
  }
}
