{
  "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-list-item/mds-list-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-list-item",
      "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` to this slot, **avoid** to add `HTML elements` or `components` here."
        },
        {
          "name": "part",
          "text": "icon - The bullet icon before the text, the one `icon` sets"
        },
        {
          "name": "part",
          "text": "text - The text of the item, around the default slot"
        },
        {
          "name": "parent",
          "text": "mds-list"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-list-item>` web component is the single entry of a Magma list, designed to be slotted exclusively inside its parent [`<mds-list>`](../mds-list/AGENTS.md). It plays the role of a native `<li>`, pairing a leading icon with a text string so that the parent `<mds-list>` can present a coherent, accessible list.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct default-slot child of `<mds-list>`; it is not used standalone or mixed with other element types.\n- **Leading icon is always present**: The component renders an icon before its text; when no `icon` is supplied it falls back to a built-in list-dot glyph, which is decorative.\n- **Text-only default slot**: The default slot is intended for a plain text string; adding HTML elements or other components here is discouraged.\n- **Inherited text colour**: The item sets no colour of its own: its text and its leading icon take the colour of the container, as `<mds-text>` does, so a list reads like the paragraphs around it and follows a container that sets its own colour (a tinted card, a banner). For a secondary list, set the muted role on `<mds-list>` or on its container (`text-fg-muted`).\n\n#### Properties & Visual Configurations\n\n- **`typography`**: Selects the text style of the item (default `detail`), drawn from the shared typography scale; pick the value that matches the density and hierarchy of the surrounding list content.\n- **`variant`**: Refines the chosen `typography` (default `info`); use `read` for long-form reading contexts and `info` for compact informational lists.\n- **`icon`**: Overrides the default list-dot with a named icon when a list entry benefits from a meaningful leading glyph; leave unset to keep the standard bullet.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-list-item>` component, ordered from most common to most specialized. The examples assume a working knowledge of the typography scale documented in [`agents/typography.md`](../../../../agents/typography.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic List with Default Bullet\n\nThe canonical form. Place one or more `<mds-list-item>` elements as direct children of [`<mds-list>`](../mds-list/AGENTS.md). Text content goes in the default slot. When no `icon` is provided the component renders the built-in list-dot glyph automatically.\n\n```html\n<mds-list>\n  <mds-list-item>Pane</mds-list-item>\n  <mds-list-item>Acqua</mds-list-item>\n  <mds-list-item>Pasta</mds-list-item>\n</mds-list>\n```\n\n#### Typography Scale\n\nUse the `typography` prop to match the text density of the surrounding content. The default is `detail`; switch to `paragraph` for body-text contexts or `caption` / `tip` for fine-print lists.\n\n```html\n<mds-list>\n  <!-- Body-text list -->\n  <mds-list-item typography=\"paragraph\">Seleziona un elemento dalla lista</mds-list-item>\n  <mds-list-item typography=\"paragraph\">Conferma la scelta effettuata</mds-list-item>\n  <mds-list-item typography=\"paragraph\">Salva le modifiche apportate</mds-list-item>\n</mds-list>\n\n<mds-list>\n  <!-- Fine-print annotation list -->\n  <mds-list-item typography=\"caption\">I campi contrassegnati sono obbligatori</mds-list-item>\n  <mds-list-item typography=\"caption\">La password deve contenere almeno 8 caratteri</mds-list-item>\n</mds-list>\n```\n\n#### Reading Variant\n\nUse `variant=\"read\"` for long-form reading contexts (articles, documentation); keep the default `variant=\"info\"` for compact informational lists in UI panels.\n\n```html\n<!-- Long-form reading context -->\n<mds-list>\n  <mds-list-item typography=\"paragraph\" variant=\"read\">\n    Il servizio e disponibile dal lunedi al venerdi, dalle 9 alle 18.\n  </mds-list-item>\n  <mds-list-item typography=\"paragraph\" variant=\"read\">\n    Per assistenza urgente contattare il numero verde dedicato.\n  </mds-list-item>\n</mds-list>\n```\n\n#### Custom Leading Icon\n\nSupply an icon slug via the `icon` prop to replace the default bullet with a meaningful glyph. Use this when each entry maps to a distinct category or action.\n\n```html\n<mds-list>\n  <mds-list-item icon=\"mi/baseline/check-circle\">Account verificato</mds-list-item>\n  <mds-list-item icon=\"mi/baseline/lock\">Accesso sicuro attivato</mds-list-item>\n  <mds-list-item icon=\"mi/baseline/notifications\">Notifiche abilitate</mds-list-item>\n</mds-list>\n```\n\n#### Uniform Icon Across All Items\n\nWhen every item shares the same icon - for example a checklist or a feature list - set the same `icon` on each item for visual consistency.\n\n```html\n<mds-list>\n  <mds-list-item icon=\"mi/baseline/check\">Supporto multilingua incluso</mds-list-item>\n  <mds-list-item icon=\"mi/baseline/check\">Aggiornamenti automatici</mds-list-item>\n  <mds-list-item icon=\"mi/baseline/check\">Assistenza prioritaria 24/7</mds-list-item>\n</mds-list>\n```\n\n#### Muted List\n\nThe items take the colour of their container. When a list is secondary information (an address, a list of contacts under a title), give the muted role to `<mds-list>` or to its container rather than to each item.\n\n```html\n<mds-list class=\"text-fg-muted\">\n  <mds-list-item>Via Carlo Farini 1, Santarcangelo di Romagna</mds-list-item>\n  <mds-list-item>0541 628111</mds-list-item>\n</mds-list>\n```\n\n#### Adjusting the Icon Spacing\n\n`<mds-list-item>` has no public CSS custom property: it aligns its icon to the text of its `typography` by itself. When a layout needs a different gap between icon and text, set it on the documented `::part(icon)`; use Magma spacing tokens for consistency.\n\n```css\n.compact-list mds-list-item::part(icon) {\n  margin-inline-end: calc(var(--spacing) * 100);\n}\n```\n\n#### Styling the Icon Part\n\nUse the documented `::part(icon)` surface to tint or resize the leading icon. Prefer Magma color tokens to keep dark-mode compatibility.\n\n```css\n.status-list mds-list-item::part(icon) {\n  fill: rgb(var(--magma-success-fg));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-list-item>`. 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-list-item>` Outside `<mds-list>`\n\n`<mds-list-item>` is a compound child; it must be a direct default-slot child of [`<mds-list>`](../mds-list/AGENTS.md). Using it standalone removes the list context that assistive technology relies on.\n\n```html\n<!-- INCORRECT -->\n<div>\n  <mds-list-item>Primo elemento</mds-list-item>\n  <mds-list-item>Secondo elemento</mds-list-item>\n</div>\n\n<!-- CORRECT -->\n<mds-list>\n  <mds-list-item>Primo elemento</mds-list-item>\n  <mds-list-item>Secondo elemento</mds-list-item>\n</mds-list>\n```\n\n#### Do Not Put HTML Elements in the Default Slot\n\nThe default slot is meant for plain text only; nested elements are not stripped, they render inline and can break layout. Use the `typography` and `variant` props to control text style instead.\n\n```html\n<!-- INCORRECT -->\n<mds-list>\n  <mds-list-item>\n    <strong>Titolo voce</strong>\n    <small> - descrizione aggiuntiva</small>\n  </mds-list-item>\n</mds-list>\n\n<!-- CORRECT -->\n<mds-list>\n  <mds-list-item typography=\"detail\">Titolo voce - descrizione aggiuntiva</mds-list-item>\n</mds-list>\n```\n\n#### Do Not Slot `<mds-icon>` to Add a Leading Icon\n\nThe `icon` prop renders the glyph through the shared icon service and positions it correctly. Slotting `<mds-icon>` puts it in the text-only default slot, where it is misaligned and the default bullet still renders.\n\n```html\n<!-- INCORRECT -->\n<mds-list>\n  <mds-list-item>\n    <mds-icon name=\"mi/baseline/check\"></mds-icon>\n    Servizio attivo\n  </mds-list-item>\n</mds-list>\n\n<!-- CORRECT -->\n<mds-list>\n  <mds-list-item icon=\"mi/baseline/check\">Servizio attivo</mds-list-item>\n</mds-list>\n```\n\n#### Do Not Use a `typography` Value Outside the Accepted Set\n\n`<mds-list-item>` accepts only `TypographyInfoType | TypographyReadType`: `caption`, `detail`, `label`, `option`, `paragraph`, `tip`. Heading values like `h1`-`h6` or `action` are outside the type and are not checked at runtime: the inner text renders the heading style next to a bullet aligned for body text.\n\n```html\n<!-- INCORRECT -->\n<mds-list>\n  <mds-list-item typography=\"h3\">Titolo sezione</mds-list-item>\n  <mds-list-item typography=\"action\">Azione</mds-list-item>\n</mds-list>\n\n<!-- CORRECT -->\n<mds-list>\n  <mds-list-item typography=\"detail\">Voce elenco</mds-list-item>\n  <mds-list-item typography=\"paragraph\">Descrizione estesa della voce</mds-list-item>\n</mds-list>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Icon or Text\n\n`<mds-list-item>` has no public CSS custom property: the supported customization surface is `::part(icon)` / `::part(text)`, the two documented shadow parts. Targeting internals via `>>>` or undocumented class names couples code to the implementation.\n\n```css\n/* INCORRECT */\nmds-list-item >>> .icon {\n  fill: red;\n}\n\n/* CORRECT */\nmds-list-item::part(icon) {\n  fill: rgb(var(--magma-danger-fg));\n}\n```\n\n#### Do Not Replace `<mds-list>` + `<mds-list-item>` with a Raw `<ul>` + `<li>`\n\nWhen a Magma list is needed, use the component pair - not raw HTML. Raw elements bypass the design-system theming, token integration, and high-contrast support.\n\n```html\n<!-- INCORRECT -->\n<ul>\n  <li>Documento ricevuto</li>\n  <li>In attesa di approvazione</li>\n</ul>\n\n<!-- CORRECT -->\n<mds-list>\n  <mds-list-item>Documento ricevuto</mds-list-item>\n  <mds-list-item>In attesa di approvazione</mds-list-item>\n</mds-list>\n```\n"
      },
      "props": [
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "Specifies the icon displayed in the element",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"caption\" | \"detail\" | \"label\" | \"option\" | \"paragraph\" | \"tip\"",
          "complexType": {
            "original": "TypographyInfoType | TypographyReadType",
            "resolved": "\"caption\" | \"detail\" | \"label\" | \"option\" | \"paragraph\" | \"tip\"",
            "references": {
              "TypographyInfoType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyInfoType",
                "referenceLocation": "TypographyInfoType"
              },
              "TypographyReadType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyReadType",
                "referenceLocation": "TypographyReadType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": true,
          "docs": "Specifies the typography of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'detail'"
            }
          ],
          "default": "'detail'",
          "values": [
            {
              "value": "caption",
              "type": "string"
            },
            {
              "value": "detail",
              "type": "string"
            },
            {
              "value": "label",
              "type": "string"
            },
            {
              "value": "option",
              "type": "string"
            },
            {
              "value": "paragraph",
              "type": "string"
            },
            {
              "value": "tip",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"info\" | \"read\" | undefined",
          "complexType": {
            "original": "TypographyReadingVariants",
            "resolved": "\"info\" | \"read\" | undefined",
            "references": {
              "TypographyReadingVariants": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyReadingVariants",
                "referenceLocation": "TypographyReadingVariants"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": false,
          "docs": "Specifies the variant for `typography`",
          "docsTags": [
            {
              "name": "default",
              "text": "'info'"
            }
          ],
          "default": "'info'",
          "values": [
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "read",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-list-item-icon-margin",
          "annotation": "prop",
          "docs": "Sets the margin of the component's icon",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        }
      ],
      "parts": [
        {
          "name": "icon",
          "docs": "The bullet icon before the text, the one `icon` sets"
        },
        {
          "name": "text",
          "docs": "The text of the item, around the default slot"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-list-item": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "ui-list-list-item--docs"
    }
  ]
}
