{
  "$schema": "https://design.senvenli.com/schema/component.full.json",
  "kind": "component",
  "family": "date",
  "status": "alpha",
  "import": "@senvenli/react/date",
  "name": "calendar",
  "title": "Calendar",
  "exports": [
    "Calendar"
  ],
  "description": "A month grid to pick a date or a range, with markers, unavailable days and several visible months.",
  "keywords": [
    "month",
    "date",
    "range",
    "availability"
  ],
  "usage": {
    "when": [
      "Showing availability or picking dates in place, without a field."
    ],
    "instead": [
      {
        "use": "date-picker",
        "when": "A form field opens the calendar."
      }
    ]
  },
  "a11y": {
    "keyboard": [
      {
        "keys": "Arrow keys",
        "does": "Moves between days."
      },
      {
        "keys": "Page Up / Page Down",
        "does": "Moves a month."
      }
    ],
    "builtIn": [
      "Each day is announced with its markers and why it is unavailable.",
      "Month and weekday names follow the locale."
    ],
    "youProvide": [
      "A label for the calendar."
    ]
  },
  "related": [
    "date-picker"
  ],
  "genui": {
    "expose": false
  },
  "source": [
    "src/date/public.tsx"
  ],
  "props": {
    "Calendar": [
      {
        "name": "minValue",
        "type": "CalendarDate",
        "required": false,
        "origin": "own"
      },
      {
        "name": "maxValue",
        "type": "CalendarDate",
        "required": false,
        "origin": "own"
      },
      {
        "name": "isDateUnavailable",
        "type": "(date: CalendarDate) => boolean",
        "required": false,
        "origin": "own",
        "description": "Days that cannot be picked; they stay focusable and say why (`unavailableReason`)."
      },
      {
        "name": "unavailableReason",
        "type": "(date: CalendarDate) => string | undefined",
        "required": false,
        "origin": "own",
        "description": "Why a day is unavailable (\"Closed\", \"Sold out\"); read with the day."
      },
      {
        "name": "locale",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "Locale override; the DesignSystemProvider locale by default. Month and weekday names come from Intl.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "firstDayOfWeek",
        "type": "FirstDayOfWeek",
        "required": false,
        "origin": "own",
        "description": "Overrides the locale's first day of the week.",
        "schema": {
          "type": "string",
          "enum": [
            "sun",
            "mon",
            "tue",
            "wed",
            "thu",
            "fri",
            "sat"
          ]
        }
      },
      {
        "name": "timeZone",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "The time zone \"today\" is computed in (the location's); the device's by default.",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "aria-label",
        "type": "string",
        "required": false,
        "origin": "own",
        "description": "Names the calendar (\"Start date\").",
        "schema": {
          "type": "string"
        }
      },
      {
        "name": "defaultFocusedValue",
        "type": "CalendarDate",
        "required": false,
        "origin": "own",
        "description": "The month that opens while nothing is chosen (any day in it). A prerendered page passes a fixed one, so the HTML\ndoes not depend on the build day; left out, the month of \"today\" (in `timeZone` when given)."
      },
      {
        "name": "value",
        "type": "CalendarDate | DateRange",
        "required": false,
        "origin": "own"
      },
      {
        "name": "defaultValue",
        "type": "CalendarDate | DateRange",
        "required": false,
        "origin": "own"
      },
      {
        "name": "onChange",
        "type": "(value: CalendarDate) => void | (value: DateRange) => void",
        "required": false,
        "origin": "own"
      },
      {
        "name": "getDateMarkers",
        "type": "(date: CalendarDate) => DateMarker | undefined",
        "required": false,
        "origin": "own",
        "description": "A dot under a day (events on it); a string is also said to screen readers."
      },
      {
        "name": "visibleMonths",
        "type": "1 | 2",
        "required": false,
        "origin": "own",
        "schema": {
          "enum": [
            1,
            2
          ]
        }
      },
      {
        "name": "selectionMode",
        "type": "\"single\" | \"range\"",
        "required": false,
        "origin": "own",
        "description": "`single` (default): one day.",
        "schema": {
          "type": "string",
          "enum": [
            "single",
            "range"
          ]
        }
      },
      {
        "name": "allowsNonContiguousRanges",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "description": "Keep this false when a range may not cross an unavailable day (stays, trips, equipment hire).",
        "schema": {
          "type": "boolean"
        }
      },
      {
        "name": "minDuration",
        "type": "number",
        "required": false,
        "origin": "own",
        "description": "Shortest and longest range in days (end − start).",
        "schema": {
          "type": "number"
        }
      },
      {
        "name": "maxDuration",
        "type": "number",
        "required": false,
        "origin": "own",
        "schema": {
          "type": "number"
        }
      },
      {
        "name": "action",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "In a popover: the footer shows the chosen range and its length beside this action (\"Apply dates\")."
      }
    ]
  },
  "tokens": [
    "ds-background-brand-bold",
    "ds-background-brand-bold-hovered",
    "ds-background-neutral-subtle-hovered",
    "ds-background-selected",
    "ds-background-selected-hovered",
    "ds-border",
    "ds-border-focused",
    "ds-border-selected",
    "ds-icon",
    "ds-icon-brand",
    "ds-radius-control-medium",
    "ds-radius-full",
    "ds-radius-large",
    "ds-radius-small",
    "ds-shadow-raised",
    "ds-size-control",
    "ds-size-control-compact",
    "ds-space-050",
    "ds-space-100",
    "ds-space-150",
    "ds-space-200",
    "ds-space-400",
    "ds-surface-raised",
    "ds-text",
    "ds-text-disabled",
    "ds-text-on-brand",
    "ds-text-subtle",
    "ds-text-subtlest"
  ],
  "strings": [
    "clear",
    "dateIncomplete",
    "dateMax",
    "dateMin",
    "dateTimeIncomplete",
    "dateUnavailable",
    "monthHasDays",
    "monthMax",
    "monthMin",
    "nextMonth",
    "nextYear",
    "optional",
    "previousMonth",
    "previousYear",
    "rangeCrossesClosed",
    "rangeEnd",
    "rangeEndTime",
    "rangeStart",
    "rangeStartTime",
    "rangeTooLong",
    "rangeTooShort",
    "required",
    "thisMonth",
    "thisMonthHasDays",
    "timeIncomplete",
    "today"
  ],
  "quality": {
    "tests": true,
    "a11y": false,
    "docs": false,
    "visual": false,
    "dark": false,
    "rtl": false,
    "mcp": true,
    "generic": true
  }
}
