{
  "timestamp": "2026-11-19T09:33:56",
  "compiler": {
    "name": "@stencil/core",
    "version": "4.45.4",
    "typescriptVersion": "5.8.3"
  },
  "storybook": "https://magma-design-system.github.io/magma/storybook/",
  "studio": "https://magma-design-system.github.io/magma/studio/",
  "components": [
    {
      "filePath": "src/components/mds-calendar-cell/mds-calendar-cell.tsx",
      "encapsulation": "shadow",
      "tag": "mds-calendar-cell",
      "docs": "",
      "docsTags": [
        {
          "name": "parent",
          "text": "mds-calendar"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-calendar-cell>` web component represents a single selectable day inside the [`<mds-calendar>`](../mds-calendar/AGENTS.md) grid. It is a presentational child that renders the day number and exposes attributes the parent calendar drives to express the day's role and its position within a selection range.\n\n#### Semantic Behavior\n\n- **Compound child only**: It is rendered only by `<mds-calendar>`, which generates one cell per day of the visible month grid inside its own shadow DOM (the calendar has no default slot): consumers never write it, neither standalone nor as a child of the calendar.\n- **Parent-driven selection**: The cell holds no internal selection state. The parent calendar drives the `date`, `selection` and `preview` attributes to paint range boundaries and intermediate days; the cell only reflects what it is given.\n- **No own events**: Clicks and hover are handled by the parent (range building, preview, and the `mdsCalendarChange` / `mdsCalendarPreselect` events from `<mds-calendar>`). The cell itself emits nothing.\n- **Disabled state**: When `disabled` is set the day cannot be activated; the parent applies this for days outside the calendar's `min`/`max` range.\n- **Today marker**: `today` is a presentational flag the parent sets on the cell matching the current date, used only for styling emphasis.\n\n#### Properties & Visual Configurations\n\nMost props are state mirrors written by the parent rather than knobs a consumer tunes directly.\n\n- **`month`**: Distinguishes how the day relates to the displayed month - `current` for in-month days, `other` for leading/trailing days spilling in from adjacent months. The type also allows `weekend`, which is deprecated: the calendar never sets it and it has no styling of its own, since the weekend color comes from the cell's position (the last two columns of the week).\n- **`selection`**: Marks the cell's position within an active range - `start`, `end`, `middle`, or `single` (a day alone: a one-day range, the start of a range waiting for its end, the day of a single picker); absence or `none` means unselected. A chosen `start`, `end` or `single` is a full dot, the same mark for both ends; `middle` and the halves of the ends that reach it are the band of the range.\n- **`preview`**: When `true`, the selection is a preview of the day under the pointer rather than a chosen one: a paler band, and the `end` (or a `single`) drawn as a ring, not chosen yet. The `start` of a preview is the day already chosen and keeps its full dot.\n- **`orientation`**: Selection-connector direction. The type allows `horizontal`, `vertical`, and `both`, but only `horizontal` is currently supported.\n- **`date`**: The cell's ISO `YYYY-MM-DD` date; the parent matches against it to compute selection state, so it is required for the cell to participate in range logic.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-calendar-cell>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n`<mds-calendar-cell>` is an internal subpart: its real parent [`<mds-calendar>`](../mds-calendar/AGENTS.md) renders one cell per day inside its own shadow DOM and has no default slot, so cells written as its children are never shown. Every pattern below shows the `<mds-calendar>` markup that puts the cells in each state.\n\n#### Basic Cell Inside a Calendar\n\nThe typical form - let the parent render the cells and drive all their attributes (`date` in ISO `YYYY-MM-DD` format, `label`, `month`, `selection`, ...).\n\n```html\n<mds-calendar start-date=\"2024-06-01\" end-date=\"2024-06-15\"></mds-calendar>\n```\n\n#### Today Marker\n\nThe parent sets the `today` boolean attribute on the cell that matches the current date, which applies the accent-tinted styling that distinguishes today from other days. Set `hide-today` on the calendar to drop it.\n\n```html\n<mds-calendar></mds-calendar>\n<mds-calendar hide-today></mds-calendar>\n```\n\n#### Selection Range - Start, Middle, and End Positions\n\nThe parent sets `selection` to express where a cell falls inside the active range. The `start` and `end` values are full dots, the same mark, with the band rounded around them; `middle` fills the span between them; `single` is a full dot with no band.\n\n```html\n<!-- 3 June: start, 4 June: middle, 5 June: end -->\n<mds-calendar start-date=\"2024-06-03\" end-date=\"2024-06-05\"></mds-calendar>\n```\n\n#### Single-Day Selection\n\nThe parent uses `selection=\"single\"` for the day of a single picker, for a range whose two ends are the same day, and for the start of a range still waiting for its end. The day is a full dot, with no band, as it reaches no other day.\n\n```html\n<mds-calendar single-picker start-date=\"2024-06-10\"></mds-calendar>\n```\n\n#### Preview (Hover) Selection\n\nWhile the user hovers toward the end of a range, the parent sets `preview` on the cells from the start to the hovered day: the band is paler, the hovered day is a ring, and the start keeps the full dot of a chosen day. A hovered day that a click would make the new start, one before the start, is a `single` `preview` alone: a ring with no band.\n\n```html\n<!-- range mode with a start and no end: hovering a later day previews the range -->\n<mds-calendar start-date=\"2024-06-07\"></mds-calendar>\n```\n\n#### Days from Adjacent Months\n\nThe parent renders the leading and trailing days that fill the grid but belong to the previous or next month with `month=\"other\"`. Inside `<mds-calendar>` these cells are dimmed and visible; set `--mds-calendar-cell-other-month-visibility: hidden` on the calendar to hide them.\n\n```html\n<mds-calendar view-date=\"2024-06-01\" style=\"--mds-calendar-cell-other-month-visibility: hidden;\"></mds-calendar>\n```\n\n#### Disabled Day\n\nThe parent sets the `disabled` boolean attribute on days that cannot be selected - the dates outside its `min`/`max` range. A disabled cell removes pointer events and applies the disabled color automatically.\n\n```html\n<mds-calendar view-date=\"2024-06-01\" min=\"2024-06-10\"></mds-calendar>\n```\n\n#### Styling Customization\n\nThe cells live in the calendar's shadow DOM, so their public `--mds-calendar-cell-*` CSS custom properties reach them by inheritance: set them on the `<mds-calendar>` host (or on a parent selector), next to the public custom properties the calendar documents for them. The colors of the weekend, selected, preselected, disabled and adjacent-month days are not public: they follow the theme. Use the semantic color roles so dark mode, named themes and high contrast keep working.\n\n```css\n.booking-calendar mds-calendar {\n  --mds-calendar-cell-other-month-visibility: hidden;\n  --mds-calendar-cell-background: rgb(var(--magma-wash-soft));\n  --mds-calendar-cell-color: rgb(var(--magma-text-muted));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-calendar-cell>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind color utilities, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Use the Cell Outside Its Parent Calendar\n\n`<mds-calendar-cell>` is rendered by [`<mds-calendar>`](../mds-calendar/AGENTS.md) itself, one per day inside its shadow DOM. Used in isolation it loses the gap context that drives range connector geometry and no parent coordinates selection across cells; slotted into `<mds-calendar>`, which has no default slot, it is never shown. Let the calendar generate the cells.\n\n```html\n<!-- INCORRECT -->\n<mds-calendar-cell date=\"2024-06-10\" label=\"10\" month=\"current\" selection=\"single\"></mds-calendar-cell>\n\n<!-- CORRECT -->\n<mds-calendar single-picker start-date=\"2024-06-10\"></mds-calendar>\n```\n\n#### Do Not Manage Selection State Locally in the Cell\n\nThe cell is purely presentational - it holds no internal state. Setting `selection` directly on isolated cells and keeping them in sync by hand duplicates the logic the parent calendar already owns and will diverge on re-renders.\n\n```html\n<!-- INCORRECT: manually wiring selection outside mds-calendar -->\n<div class=\"custom-grid\">\n  <mds-calendar-cell date=\"2024-06-03\" label=\"3\" selection=\"start\"></mds-calendar-cell>\n  <mds-calendar-cell date=\"2024-06-04\" label=\"4\" selection=\"middle\"></mds-calendar-cell>\n  <mds-calendar-cell date=\"2024-06-05\" label=\"5\" selection=\"end\"></mds-calendar-cell>\n</div>\n\n<!-- CORRECT: let mds-calendar own range state and drive cell props -->\n<mds-calendar start-date=\"2024-06-03\" end-date=\"2024-06-05\"></mds-calendar>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internals\n\nThe cells live in the shadow DOM of `<mds-calendar>`: from outside they are adjusted only through their public `--mds-calendar-cell-*` custom properties, set on the calendar, which the cells inherit. Targeting the internal `.action`, `.inner-dot`, or `.area-background` elements via `>>>` or undocumented class selectors couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-calendar-cell >>> .area-background {\n  background: hotpink;\n}\nmds-calendar-cell >>> .inner-dot {\n  display: none;\n}\n\n/* CORRECT */\nmds-calendar {\n  --mds-calendar-cell-other-month-visibility: hidden;\n  --mds-calendar-cell-background: rgb(var(--magma-wash-soft));\n}\n```\n"
      },
      "props": [
        {
          "name": "date",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "date",
          "reflectToAttr": true,
          "docs": "Specifies the date of the cell",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-06-15'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean | undefined",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Specifies if the cell is disabled",
          "docsTags": [
            {
              "name": "default",
              "text": "undefined"
            }
          ],
          "default": "undefined",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": true,
          "docs": "Specifies the label of the cell",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "month",
          "type": "\"current\" | \"other\" | \"weekend\" | undefined",
          "complexType": {
            "original": "CalendarCellType",
            "resolved": "\"current\" | \"other\" | \"weekend\" | undefined",
            "references": {
              "CalendarCellType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-calendar-cell/meta/types.ts::CalendarCellType",
                "referenceLocation": "CalendarCellType"
              }
            }
          },
          "mutable": false,
          "attr": "month",
          "reflectToAttr": true,
          "docs": "Specifies if the day belongs to the displayed month, `current`, or to an adjacent one,\n`other`. `weekend` is deprecated and does nothing: the weekend days are styled by their\ncolumn of the week",
          "docsTags": [
            {
              "name": "default",
              "text": "'current'"
            }
          ],
          "default": "'current'",
          "values": [
            {
              "value": "current",
              "type": "string"
            },
            {
              "value": "other",
              "type": "string"
            },
            {
              "value": "weekend",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "orientation",
          "type": "\"both\" | \"horizontal\" | \"vertical\" | undefined",
          "complexType": {
            "original": "CalendarCellSelectionOrieintationType",
            "resolved": "\"both\" | \"horizontal\" | \"vertical\" | undefined",
            "references": {
              "CalendarCellSelectionOrieintationType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-calendar-cell/meta/types.ts::CalendarCellSelectionOrieintationType",
                "referenceLocation": "CalendarCellSelectionOrieintationType"
              }
            }
          },
          "mutable": false,
          "attr": "orientation",
          "reflectToAttr": true,
          "docs": "Specifies the selection orientation of the cell",
          "docsTags": [
            {
              "name": "description",
              "text": "It can be 'horizontal' or 'vertical', but currently only 'horizontal' is supported"
            },
            {
              "name": "default",
              "text": "'horizontal'"
            }
          ],
          "default": "'horizontal'",
          "values": [
            {
              "value": "both",
              "type": "string"
            },
            {
              "value": "horizontal",
              "type": "string"
            },
            {
              "value": "vertical",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "preview",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "preview",
          "reflectToAttr": true,
          "docs": "Specifies if the selection is a preview or the final selection",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selection",
          "type": "\"end\" | \"middle\" | \"none\" | \"single\" | \"start\" | undefined",
          "complexType": {
            "original": "CalendarCellSelectionPositionType",
            "resolved": "\"end\" | \"middle\" | \"none\" | \"single\" | \"start\" | undefined",
            "references": {
              "CalendarCellSelectionPositionType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-calendar-cell/meta/types.ts::CalendarCellSelectionPositionType",
                "referenceLocation": "CalendarCellSelectionPositionType"
              }
            }
          },
          "mutable": false,
          "attr": "selection",
          "reflectToAttr": true,
          "docs": "Specifies the point of selection of the cell",
          "docsTags": [
            {
              "name": "description",
              "text": "It can be `end`, `middle`, `none`, `single`, `start`"
            }
          ],
          "values": [
            {
              "value": "end",
              "type": "string"
            },
            {
              "value": "middle",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "single",
              "type": "string"
            },
            {
              "value": "start",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "today",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean | undefined",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "today",
          "reflectToAttr": true,
          "docs": "Specifies if the cell is today",
          "docsTags": [
            {
              "name": "default",
              "text": "undefined"
            }
          ],
          "default": "undefined",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-calendar-cell-background",
          "annotation": "prop",
          "docs": "Background of calendar cells.",
          "visibility": "public"
        },
        {
          "name": "--mds-calendar-cell-boundaries-background",
          "annotation": "prop",
          "docs": "Deprecated, read by nothing: the selection boundaries take the `-selection-*-boundaries-background` and `-preselection-*-boundaries-background` properties.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-boundaries-color",
          "annotation": "prop",
          "docs": "Deprecated, read by nothing: the selection boundaries take the `-selection-*-boundaries-color` and `-preselection-*-boundaries-color` properties.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-boundaries-padding",
          "annotation": "prop",
          "docs": "Padding inside selection boundaries.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-color",
          "annotation": "prop",
          "docs": "Text color of calendar cells.",
          "visibility": "public"
        },
        {
          "name": "--mds-calendar-cell-disabled-background",
          "annotation": "prop",
          "docs": "Background for disabled days.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-disabled-color",
          "annotation": "prop",
          "docs": "Text color for disabled days.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-other-month-background",
          "annotation": "prop",
          "docs": "Background of days from adjacent months.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-other-month-color",
          "annotation": "prop",
          "docs": "Text color of days from adjacent months.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-current-month-background",
          "annotation": "prop",
          "docs": "Background of the band of a preview, from the start to the day under the pointer (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-current-month-boundaries-background",
          "annotation": "prop",
          "docs": "Fill of the ring of the day under the pointer (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-current-month-boundaries-border-color",
          "annotation": "prop",
          "docs": "Ring of the day under the pointer, not chosen yet (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-current-month-boundaries-color",
          "annotation": "prop",
          "docs": "Text color of the day under the pointer, the end a click there would pick (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-current-month-color",
          "annotation": "prop",
          "docs": "Text color of the band of a preview (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-other-month-background",
          "annotation": "prop",
          "docs": "Background of the band of a preview (other months).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-other-month-boundaries-background",
          "annotation": "prop",
          "docs": "Fill of the ring of the day under the pointer (other months).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-other-month-boundaries-border-color",
          "annotation": "prop",
          "docs": "Ring of the day under the pointer, not chosen yet (other months).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-other-month-boundaries-color",
          "annotation": "prop",
          "docs": "Text color of the day under the pointer (other months).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-other-month-color",
          "annotation": "prop",
          "docs": "Text color of the band of a preview (other months).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-today-background",
          "annotation": "prop",
          "docs": "Background for today's date in preselection state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-preselection-today-color",
          "annotation": "prop",
          "docs": "Text color for today's date in preselection state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-boundaries-border-radius",
          "annotation": "prop",
          "docs": "Border radius for day selection boundaries.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-current-month-background",
          "annotation": "prop",
          "docs": "Background of the band of a range, between and behind its ends (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-current-month-boundaries-background",
          "annotation": "prop",
          "docs": "Fill of the dot of a chosen day: either end of a range, or the day of a single picker (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-current-month-boundaries-color",
          "annotation": "prop",
          "docs": "Text color of the dot of a chosen day (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-current-month-color",
          "annotation": "prop",
          "docs": "Text color of the band of a range (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-current-month-weekend-background",
          "annotation": "prop",
          "docs": "Background of the band of a range on weekend days (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-current-month-weekend-boundaries-background",
          "annotation": "prop",
          "docs": "Background of the band behind an end of a range on a weekend day.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-current-month-weekend-boundaries-color",
          "annotation": "prop",
          "docs": "Text color of the dot of an end of a range on a weekend day.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-current-month-weekend-color",
          "annotation": "prop",
          "docs": "Text color of the band of a range on weekend days (current month).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-other-month-background",
          "annotation": "prop",
          "docs": "Background of the band of a range (other months).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-other-month-boundaries-background",
          "annotation": "prop",
          "docs": "Fill of the dot of a chosen day (other months).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-other-month-boundaries-color",
          "annotation": "prop",
          "docs": "Text color of the dot of a chosen day (other months).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-other-month-color",
          "annotation": "prop",
          "docs": "Text color of the band of a range (other months).",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-selection-week-boundaries-border-radius",
          "annotation": "prop",
          "docs": "Border radius for week selection boundaries.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-size",
          "annotation": "prop",
          "docs": "Deprecated, read by nothing: a cell takes the width of its column in the calendar, and is square.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-weekend-background",
          "annotation": "prop",
          "docs": "Background for weekend days.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-weekend-color",
          "annotation": "prop",
          "docs": "Text color for weekend days.",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-calendar"
      ],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-calendar-cell": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-calendar": [
          "mds-calendar-cell"
        ]
      },
      "storybook": "ui-calendar-cell--docs"
    }
  ]
}
