{
  "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-card-content/mds-card-content.tsx",
      "encapsulation": "shadow",
      "tag": "mds-card-content",
      "docs": "This is a web-component from Maggioli Design System [Magma](https://magma.maggiolicloud.it), built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScript framework you are using.",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "parent",
          "text": "mds-card"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-card-content>` web component is the body region of a [`<mds-card>`](../mds-card/AGENTS.md), grouping the primary textual or component content of a card. It is a thin layout wrapper with no HTML primitive equivalent: it exposes a single default slot and assigns itself to the parent card's `content` region automatically.\n\n#### Semantic Behavior\n\n- **Compound child only**: `<mds-card-content>` must be placed as a direct child of `<mds-card>`; it is not used standalone, and a card's content region is expected to be a dedicated `mds-card-*` child rather than mixed loose markup.\n- **Automatic slot targeting**: It lands in the parent's `content` region without the developer having to set the `slot` attribute manually.\n- **Presence affects parent layout**: The parent card adapts its responsive layout to whichever `mds-card-*` regions are present, so including or omitting the content region changes how the card arranges itself.\n- **No state, events, or ARIA**: The component declares no props or emitted events and applies no role or ARIA attributes; it is purely structural and inherits semantics from whatever is slotted into it.\n\n#### Slot semantics and layout role\n\nThis component is intentionally prop-free. Its only API is the **default slot**, which accepts text strings, HTML elements, or other components that make up the card's main content. All visual configuration (responsive behavior, grid layout) is governed by the parent `<mds-card>` through its `disableAutoGrid` prop and the `--mds-card-gap` / `--mds-card-padding` custom properties; see the compound-component and slot rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-card-content>` 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#### Basic Card with Content\n\nThe most common use: a card with only a content region. Place `<mds-card-content>` as a direct child of `<mds-card>` - no `slot` attribute needed, the component self-assigns to the parent's `content` region.\n\n```html\n<mds-card>\n  <mds-card-content>\n    <mds-text typography=\"label\">Comune di Roma</mds-text>\n    <mds-text typography=\"paragraph\">Aggiornato il 5 giugno 2026</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Full Card Composition\n\nUse `<mds-card-content>` alongside [`<mds-card-header>`](../mds-card-header/AGENTS.md), [`<mds-card-media>`](../mds-card-media/AGENTS.md), and [`<mds-card-footer>`](../mds-card-footer/AGENTS.md) to build a complete card. The parent arranges them in a responsive grid automatically by default (unless `disable-auto-grid` is set on the parent).\n\n```html\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"copertina.jpg\" alt=\"Immagine documento\"></mds-img>\n  </mds-card-media>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Delibera n. 42</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text typography=\"paragraph\">\n      Approvazione del piano triennale delle opere pubbliche per il periodo 2026-2028.\n    </mds-text>\n  </mds-card-content>\n  <mds-card-footer>\n    <mds-button label=\"Scarica PDF\" icon=\"mi/baseline/download\" variant=\"primary\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Mixed Rich Content\n\nThe default slot accepts any HTML or components. Use it for structured content like lists, banners, or data visualizations that make up the card body.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Riepilogo pratiche</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-banner variant=\"warning\" tone=\"weak\">3 pratiche in scadenza oggi</mds-banner>\n    <mds-list>\n      <mds-list-item>Pratica SUAP 2026-001</mds-list-item>\n      <mds-list-item>Pratica SUAP 2026-002</mds-list-item>\n      <mds-list-item>Pratica SUAP 2026-003</mds-list-item>\n    </mds-list>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Content-Only Card Without a Header\n\nOmitting sibling regions is valid. A card holding only `<mds-card-content>` renders the content at full height in the grid's single-column layout. This is common for KPI panels or compact info tiles.\n\n```html\n<mds-card>\n  <mds-card-content>\n    <mds-kpi>\n      <mds-kpi-item label=\"142\" description=\"Pratiche aperte\"></mds-kpi-item>\n    </mds-kpi>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Adjusting Card Spacing via Parent Custom Properties\n\n`<mds-card-content>` has no CSS custom properties and no padding of its own: the card pads its regions with one inset (`--mds-card-padding`, `--magma-rhythm-inset` by default) and sets them `--mds-card-gap` apart (`--magma-rhythm-title-content`). Inside, the content sets its children `--magma-rhythm-title-content` apart, since a card with no header opens its content with its title; rows of data written inside it take their own `gap-between-fields`. Set the card's properties on the `<mds-card>` host or on a parent selector, with a rhythm role.\n\n```css\n.scheda-dati mds-card {\n  --mds-card-gap: var(--magma-rhythm-between-fields);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-card-content>`. 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 `<mds-card-content>` Outside `<mds-card>`\n\n`<mds-card-content>` is a compound child and relies on `<mds-card>`'s slot infrastructure and grid layout. Used standalone it renders with no container context and produces unpredictable visual output.\n\n```html\n<!-- INCORRECT -->\n<mds-card-content>\n  <mds-text typography=\"paragraph\">Testo senza contesto.</mds-text>\n</mds-card-content>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-content>\n    <mds-text typography=\"paragraph\">Testo senza contesto.</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Do Not Set the `slot` Attribute Manually\n\n`<mds-card-content>` self-assigns `slot=\"content\"` in its `Host` render. Adding the attribute externally is redundant: the component writes it itself, overwriting any other value when it renders.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-content slot=\"content\">\n    <mds-text typography=\"paragraph\">Intestazione sezione principale.</mds-text>\n  </mds-card-content>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-content>\n    <mds-text typography=\"paragraph\">Intestazione sezione principale.</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Do Not Replace `<mds-card-content>` with a Raw `<div slot=\"content\">`\n\nA raw element placed directly in `slot=\"content\"` bypasses the card-content component's internal grid and the rhythm of its children, and the card, which infers its grid from the tag names of its children, does not recognise it as the content region: the managed layout breaks.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <div slot=\"content\" style=\"padding: 16px;\">\n    <p>Descrizione pratica edilizia.</p>\n  </div>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-content>\n    <mds-text typography=\"paragraph\">Descrizione pratica edilizia.</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Do Not Try to Style Spacing via `<mds-card-content>` CSS Vars\n\n`<mds-card-content>` exposes no `--mds-card-content-*` custom properties. Setting them has no effect: it has no padding (the inset is the card's) and its gap is `--magma-rhythm-title-content`. The spacing you can set is the card's, through `--mds-card-gap` (between the regions) and `--mds-card-padding` (around them) on the parent `<mds-card>`, with a rhythm role.\n\n```css\n/* INCORRECT - has no effect */\nmds-card-content {\n  --mds-card-content-padding: calc(var(--spacing) * 600);\n  --mds-card-content-gap: calc(var(--spacing) * 400);\n}\n\n/* CORRECT - set on the parent card host, with a rhythm role */\nmds-card {\n  --mds-card-gap: var(--magma-rhythm-between-fields);\n}\n```\n\n#### Do Not Place Multiple `<mds-card-content>` Elements in One Card\n\nOnly one content region per card is supported. Multiple instances produce overlapping slot assignments and unpredictable grid output; consolidate all body content inside a single `<mds-card-content>`.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-content>\n    <mds-text typography=\"label\">Sezione A</mds-text>\n  </mds-card-content>\n  <mds-card-content>\n    <mds-text typography=\"label\">Sezione B</mds-text>\n  </mds-card-content>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-content>\n    <mds-text typography=\"label\">Sezione A</mds-text>\n    <mds-text typography=\"label\">Sezione B</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "layout-card-content--docs"
    }
  ]
}
