{
  "componentId": "shadcn:Calendar",
  "projectionState": "single-selected-November12-disabled-November13",
  "sourceRule": "Calendar forwards the full React DayPicker9.14.0 discriminated prop union (mode absent|single|multiple|range, required variants) plus buttonVariant. shadcn defaults showOutsideDays=true, captionLayout=label, buttonVariant=ghost; locale, formatters, classNames and components are explicit overrides. CalendarDayButton is the exported native shadcn Button adapter, attempting to synchronize focus when modifiers.focused changes, but the pinned wrapper omits attaching its ref: raw keyboard focus is broken while internal focused modifiers advance; data-day is locale-formatted, never a stable ISO identifier. DayPicker selection is Date|Date[]|DateRange|undefined according to mode/required. Supplying onSelect makes the selected prop authoritative even when undefined; without onSelect the primitive owns internal selection. onSelect(selected,triggerDate,modifiers,event) is separate from onDayClick(date,modifiers,event); the source calls selection first, onDayClick afterward. DayPicker itself prevents default and propagation on day click; defaultPrevented is not a generic veto/cancellable eventDetails API. Optional single may clear by selecting the same date; required single does not clear. Multiple min/max and range min/max/excludeDisabled/resetOnSelect are source algorithms, not assumed to be the same toggle. excludeDisabled resets a candidate range crossing a disabled date to its new start. disabled is a Matcher or Matcher[], hidden differs from disabled, and no synthetic root disabled boolean is invented. Displayed month/defaultMonth/onMonthChange is independent from selected date; startMonth/endMonth bound month navigation, not selection by themselves. Selection need not submit a form. Root is a named div by default, each month table is the source named grid, with native day buttons, registered roving tabIndex and labelled selected/today dates. Noninteractive mode omits day buttons. Footer is the primitive polite status; essential validation instructions remain persistent outside it.",
  "keyboardAndFocus": "The explicit reference components.DayButton adapter forwards an attached ref through exported CalendarDayButton rest props and focuses it on modifiers.focused, preserving original styling and handlers. This repairs the observed pinned source omission; raw wrapper behavior is preserved as a negative browser regression. The active day has one tabIndex=0; source focus navigation skips disabled/hidden dates. Left/Right move a day (RTL reverses), Up/Down a week; Shift+Left/Right move a month and Shift+Up/Down a year. PageUp/PageDown move month, Shift adds year; Home/End move to week boundaries. Native Enter/Space selects the focused eligible day. Keyboard focus can move without selection. Navigation arrows have source native disabled boundaries. Calendar alone has no Escape dismissal or focus trap. Caller-provided components/labels must preserve the source refs, event handlers, names and native semantics.",
  "referenceDecision": "Reference locale is en-US with local dates (no UTC string conversion), fixed November2026 and today November21, selected November12, disabled November13, November–December navigation bounds. The attached focus-ref components.DayButton adapter is an explicit caller repair, not falsely attributed to unchanged upstream. These concrete values and Delivery date name are chosen reference usage, separate from native FIG visual samples. Single and range are exercised, required/multiple remain exact source-described API variants. A typed date input, time, natural-language parsing, remote availability and submit persistence are separate optional application compositions, not promised Calendar or DatePicker exports.",
  "protocol": "SCXML observes actual source callbacks, retaining original Date/range/modifiers/event objects. It delegates date normalization, disabled matching, range construction and detailed focus to pinned DayPicker; no fake DatePicker export, generic selection event or defaultPrevented veto is added. Popover remains an independent completed actor. HTML is an actual pinned wrapper SSR projection plus explicitly named caller composition.",
  "semanticParts": {
    "calendar": {
      "kind": "element",
      "selector": "[data-slot=\"calendar\"]",
      "description": "Named local-date calendar root"
    },
    "months": {
      "kind": "element",
      "selector": ".rdp-months",
      "description": "One or more month layout container"
    },
    "month": {
      "kind": "element",
      "selector": ".rdp-month",
      "description": "Independent displayed month"
    },
    "navigation": {
      "kind": "element",
      "selector": ".rdp-nav",
      "description": "Month navigation landmark"
    },
    "previous": {
      "kind": "element",
      "selector": ".rdp-button_previous",
      "description": "Native previous-month boundary control"
    },
    "next": {
      "kind": "element",
      "selector": ".rdp-button_next",
      "description": "Native next-month boundary control"
    },
    "month-caption": {
      "kind": "element",
      "selector": ".rdp-month_caption",
      "description": "Caption layout container"
    },
    "caption-label": {
      "kind": "element",
      "selector": ".rdp-caption_label",
      "description": "Live displayed-month label"
    },
    "grid": {
      "kind": "element",
      "selector": ".rdp-month_grid",
      "description": "Named native month table/grid"
    },
    "weekday-row": {
      "kind": "element",
      "selector": ".rdp-weekdays",
      "description": "Weekday header row"
    },
    "weekday": {
      "kind": "element",
      "selector": ".rdp-weekday",
      "description": "Column weekday heading"
    },
    "weeks": {
      "kind": "element",
      "selector": ".rdp-weeks",
      "description": "Month body"
    },
    "week": {
      "kind": "element",
      "selector": ".rdp-week",
      "description": "Seven-day row"
    },
    "day-cell": {
      "kind": "element",
      "selector": "td.rdp-day",
      "description": "Date gridcell with real selection/modifier classes"
    },
    "footer": {
      "kind": "element",
      "selector": ".rdp-footer",
      "description": "Polite primitive status footer"
    },
    "dropdowns": {
      "kind": "element",
      "selector": ".rdp-dropdowns",
      "description": "Optional caption dropdown layout"
    },
    "dropdown-root": {
      "kind": "element",
      "selector": ".rdp-dropdown_root",
      "description": "Native select with visible label overlay"
    },
    "dropdown": {
      "kind": "element",
      "selector": ".rdp-dropdown",
      "description": "Actual accessible month select"
    },
    "dropdown-label": {
      "kind": "element",
      "selector": ".cn-calendar-caption-label",
      "description": "Decorative select display label"
    },
    "week-number-header": {
      "kind": "element",
      "selector": ".rdp-week_number_header",
      "description": "Optional week-number column header"
    },
    "week-number": {
      "kind": "element",
      "selector": ".rdp-week_number",
      "description": "Optional week number cell"
    },
    "day-button": {
      "kind": "element",
      "selector": ".cn-calendar-day-button",
      "description": "Exported source Button with local-date label and modifiers; explicit attached-ref adapter repairs source focus omission"
    }
  },
  "visualStateMapping": {
    "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"
      ]
    }
  }
}
