{
  "format": "ui-contract-component-draft",
  "id": "shadcn:Calendar",
  "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": {
    "calendar": "Named local-date calendar root",
    "months": "One or more month layout container",
    "month": "Independent displayed month",
    "navigation": "Month navigation landmark",
    "previous": "Native previous-month boundary control",
    "next": "Native next-month boundary control",
    "month-caption": "Caption layout container",
    "caption-label": "Live displayed-month label",
    "grid": "Named native month table/grid",
    "weekday-row": "Weekday header row",
    "weekday": "Column weekday heading",
    "weeks": "Month body",
    "week": "Seven-day row",
    "day-cell": "Date gridcell with real selection/modifier classes",
    "footer": "Polite primitive status footer",
    "dropdowns": "Optional caption dropdown layout",
    "dropdown-root": "Native select with visible label overlay",
    "dropdown": "Actual accessible month select",
    "dropdown-label": "Decorative select display label",
    "week-number-header": "Optional week-number column header",
    "week-number": "Optional week number cell",
    "day-button": "Exported source Button with local-date label and modifiers; explicit attached-ref adapter repairs source focus omission"
  },
  "stories": "stories.json",
  "ux": "ux.json",
  "composition": {
    "button": {
      "component": "../button/component.json"
    }
  },
  "convention": "semantic-component/1",
  "partBindings": {
    "calendar": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": "[data-slot=\"calendar\"]",
      "description": "Named local-date calendar root",
      "ownership": "actual Calendar/DayPicker output"
    },
    "months": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-months",
      "description": "One or more month layout container",
      "ownership": "actual Calendar/DayPicker output"
    },
    "month": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-month",
      "description": "Independent displayed month",
      "ownership": "actual Calendar/DayPicker output"
    },
    "navigation": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-nav",
      "description": "Month navigation landmark",
      "ownership": "actual Calendar/DayPicker output"
    },
    "previous": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-button_previous",
      "description": "Native previous-month boundary control",
      "ownership": "actual Calendar/DayPicker output"
    },
    "next": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-button_next",
      "description": "Native next-month boundary control",
      "ownership": "actual Calendar/DayPicker output"
    },
    "month-caption": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-month_caption",
      "description": "Caption layout container",
      "ownership": "actual Calendar/DayPicker output"
    },
    "caption-label": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-caption_label",
      "description": "Live displayed-month label",
      "ownership": "actual Calendar/DayPicker output"
    },
    "grid": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-month_grid",
      "description": "Named native month table/grid",
      "ownership": "actual Calendar/DayPicker output"
    },
    "weekday-row": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-weekdays",
      "description": "Weekday header row",
      "ownership": "actual Calendar/DayPicker output"
    },
    "weekday": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-weekday",
      "description": "Column weekday heading",
      "ownership": "actual Calendar/DayPicker output"
    },
    "weeks": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-weeks",
      "description": "Month body",
      "ownership": "actual Calendar/DayPicker output"
    },
    "week": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-week",
      "description": "Seven-day row",
      "ownership": "actual Calendar/DayPicker output"
    },
    "day-cell": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": "td.rdp-day",
      "description": "Date gridcell with real selection/modifier classes",
      "ownership": "actual Calendar/DayPicker output"
    },
    "footer": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-footer",
      "description": "Polite primitive status footer",
      "ownership": "actual Calendar/DayPicker output"
    },
    "dropdowns": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-dropdowns",
      "description": "Optional caption dropdown layout",
      "ownership": "actual Calendar/DayPicker output"
    },
    "dropdown-root": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-dropdown_root",
      "description": "Native select with visible label overlay",
      "ownership": "actual Calendar/DayPicker output"
    },
    "dropdown": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-dropdown",
      "description": "Actual accessible month select",
      "ownership": "actual Calendar/DayPicker output"
    },
    "dropdown-label": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".cn-calendar-caption-label",
      "description": "Decorative select display label",
      "ownership": "actual Calendar/DayPicker output"
    },
    "week-number-header": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-week_number_header",
      "description": "Optional week-number column header",
      "ownership": "actual Calendar/DayPicker output"
    },
    "week-number": {
      "kind": "element",
      "declaration": "Calendar",
      "selector": ".rdp-week_number",
      "description": "Optional week number cell",
      "ownership": "actual Calendar/DayPicker output"
    },
    "day-button": {
      "kind": "element",
      "declaration": "CalendarDayButton",
      "selector": ".cn-calendar-day-button",
      "description": "Exported source Button with local-date label and modifiers; explicit attached-ref adapter repairs source focus omission",
      "ownership": "actual Calendar/DayPicker output"
    }
  },
  "visualContract": {
    "tokens": {
      "border-width": "semantic.border.width",
      "calendar-border-width": "components.calendar.borderWidth",
      "calendar-caption-size": "components.calendar.captionSize",
      "calendar-cell-lg": "components.calendar.cellLg",
      "calendar-cell-size": "components.calendar.cellSize",
      "calendar-cell-sm": "components.calendar.cellSm",
      "calendar-gap": "components.calendar.gap",
      "calendar-inset": "components.calendar.inset",
      "calendar-navigation-radius": "components.calendar.navigationRadius",
      "calendar-radius": "components.calendar.radius",
      "calendar-row-gap": "components.calendar.rowGap",
      "calendar-weekday-size": "components.calendar.weekdaySize",
      "color-background": "semantic.color.background",
      "color-border": "semantic.color.border",
      "color-foreground": "semantic.color.foreground",
      "color-muted": "semantic.color.muted",
      "color-muted-foreground": "semantic.color.mutedForeground",
      "color-primary": "semantic.color.primary",
      "color-primary-foreground": "semantic.color.primaryForeground",
      "color-ring": "semantic.color.ring",
      "focus-shadow": "semantic.focus.shadow",
      "focus-spread": "semantic.focus.spread",
      "font-fallback": "semantic.typography.fallbackFamily",
      "font-family": "semantic.typography.fontFamily",
      "font-size-body": "semantic.typography.bodySize",
      "font-weight-medium": "semantic.typography.mediumWeight",
      "font-weight-normal": "semantic.typography.normalWeight",
      "line-height-body": "semantic.typography.bodyLineHeight"
    },
    "runtimeProperties": {},
    "layoutPolicy": "Stable actual Calendar slot, exported DayButton and DayPicker classNames identify parts, never locale-formatted data-day values or native node IDs. Native 38/28/48px day sizes and 10px corners remain semantic role tokens; source 6px calendar-navigation corner is retained. Default 38px cells,8px root inset and explicit week/caption spacing make a reusable intrinsic calendar; compact 28px is an explicit data-calendar-size caller attribute, not a new upstream size prop. Calendar Root is unframed by default; a surrounding Popover/Card owns its frame. Optional dropdowns/week numbers and noninteractive mode retain actual source DOM. Native range/today/outside/disabled/hidden/selected states use actual DayPicker modifier classes and exported Button data-range attributes. One roving native day tabstop and an attached-ref components.DayButton reference repair preserve source handlers while fixing the pinned wrapper omission; unchanged raw wrapper remains a negative runtime regression. Date selection, keyboard focus, displayed month and caller validation remain separate. Local dates and meaningful names are explicit reference usage. No fixed specimen dimensions or universal AT claim.",
    "variants": {
      "density": {
        "attribute": "data-calendar-size",
        "values": [
          "sm",
          "default",
          "lg"
        ],
        "origin": "explicit caller attribute through public rest props"
      },
      "selection": {
        "source": "DayPicker mode and modifiers",
        "values": [
          "single",
          "multiple",
          "range"
        ]
      },
      "state": {
        "source": "DayPicker modifier classNames and native disabled",
        "values": [
          "selected",
          "today",
          "outside",
          "disabled",
          "hidden",
          "range_start",
          "range_middle",
          "range_end"
        ]
      }
    },
    "sourceTraceability": "figma/traceability.json"
  }
}
