{
  "timestamp": "2026-11-19T09:33:56",
  "compiler": {
    "name": "@stencil/core",
    "version": "4.45.4",
    "typescriptVersion": "5.8.3"
  },
  "components": [
    {
      "filePath": "src/components/mds-accordion/mds-accordion.tsx",
      "encapsulation": "shadow",
      "tag": "mds-accordion",
      "readme": "# mds-accordion\n\n\nThis 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.\n",
      "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 `mds-accordion-item` element/s."
        },
        {
          "name": "category",
          "text": "structure"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-accordion>` web component is the compound container of the Magma Design System that groups and orchestrates a set of collapsible `<mds-accordion-item>` panels. It acts as the coordination layer that decides which children are selected.\n\n#### Semantic Behavior\n\n- **Compound parent/child**: The default slot accepts only `<mds-accordion-item>` elements.\n- **Single vs. multiple selection**: By default opening one item collapses the others. With `multiple` set, any number of children may stay open at once and selection state is reported as a comma-separated list of indices.\n- **Mandatory selection**: When `disable-close` is set, the user cannot collapse the currently open item by clicking it again - one panel always remains open.\n- **Emitted event**: `mdsAccordionChange` once for every change of the open items, opening and closing alike, carrying the live `children` NodeList and the `selected` index/indices as a string (empty when none is open). A click that `disable-close` turns down changes nothing and emits nothing.\n\n#### Properties & Visual Configurations\n\nThis component has no shared `variant` / `tone` / `size` props; its two booleans control selection semantics rather than appearance.\n\n#### Other behavioral props\n\n- **`multiple`** switches the group from accordion behavior (one panel at a time) to independent toggles, allowing several panels open simultaneously.\n- **`disableClose`** prevents the active panel from being dismissed; set it to force at least one panel to stay expanded at all times.\n\nPer-panel presentation - the visible `label`, the title style `typography`, the level `tag` of the title in the outline of the page, and the slotted body content - is configured on each `<mds-accordion-item>` child, not on the accordion itself.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-accordion>` 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 Accordion\n\nThe canonical form. Place one or more [`mds-accordion-item`](../mds-accordion-item/AGENTS.md) elements as direct children. Each item requires a `label` for its always-visible header.\n\n```html\n<mds-accordion>\n  <mds-accordion-item label=\"Informazioni generali\">\n    <mds-text>Contenuto della prima sezione.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Requisiti tecnici\">\n    <mds-text>Contenuto della seconda sezione.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Contatti\">\n    <mds-text>Contenuto della terza sezione.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Pre-selected Item on Load\n\nSet the `selected` attribute on a child to have that panel start open. Only one item should be pre-selected in single-selection mode (the default).\n\n```html\n<mds-accordion>\n  <mds-accordion-item label=\"Panoramica\" selected>\n    <mds-text>Questa sezione e' aperta per impostazione predefinita.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Dettagli\">\n    <mds-text>Questa sezione e' chiusa inizialmente.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Multiple Selection Mode\n\nSet `multiple` to allow any number of panels to be open at the same time. The `mdsAccordionChange` event then reports a comma-separated list of open indices.\n\n```html\n<mds-accordion multiple>\n  <mds-accordion-item label=\"Documentazione\" selected>\n    <mds-text>Scarica la guida utente in formato PDF.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Video tutorial\" selected>\n    <mds-text>Guarda i video di formazione nel portale.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"FAQ\">\n    <mds-text>Consulta le domande frequenti.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Mandatory Selection (Non-closable)\n\nSet `disable-close` to prevent the open panel from being collapsed. The currently expanded item stays open even when the user clicks its header again - exactly one panel is always visible.\n\n```html\n<mds-accordion disable-close>\n  <mds-accordion-item label=\"Passaggio 1 - Dati anagrafici\" selected>\n    <mds-text>Inserisci nome, cognome e codice fiscale.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Passaggio 2 - Residenza\">\n    <mds-text>Inserisci indirizzo e comune di residenza.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Passaggio 3 - Riepilogo\">\n    <mds-text>Verifica i dati inseriti prima di inviare.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### A Title Above, Parts Inside\n\nThe accordion stands under the title of its section, written by its role; each item is a part, whose title is styled as `h6` (`titles/part`): write `typography=\"h6\"` until the default moves from `h5` with the next major (#1218). `typography` is the style of an item; its `tag` is the level in the outline, one below the title of the section (`h3` under an `h2`), and the heading wraps the button that opens the item, as the Accordion pattern of the WAI-ARIA Authoring Practices does.\n\n```html\n<mds-text typography=\"section\" tag=\"h2\">Documenti richiesti</mds-text>\n<mds-accordion>\n  <mds-accordion-item label=\"Documento di identita'\" typography=\"h6\" tag=\"h3\">\n    <mds-text>Carta d'identita' o passaporto in corso di validita'.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Codice fiscale\" typography=\"h6\" tag=\"h3\">\n    <mds-text>La tessera sanitaria o il certificato di attribuzione.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Listening to the Change Event\n\nListen for `mdsAccordionChange` to react when the active panel changes. The event detail carries `children` (the full NodeList) and `selected` (a string index or comma-separated indices when `multiple` is set).\n\n```html\n<mds-accordion id=\"faq-accordion\">\n  <mds-accordion-item label=\"Cos'e' Magma?\">\n    <mds-text>Magma e' il design system di Maggioli.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Come si installa?\">\n    <mds-text>Segui le istruzioni nel file README del pacchetto.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n\n<script>\n  document.getElementById('faq-accordion').addEventListener('mdsAccordionChange', (event) => {\n    console.log('Pannello aperto:', event.detail.selected);\n  });\n</script>\n```\n\n#### Rich Slotted Content in Items\n\nThe default slot of each `mds-accordion-item` accepts text, HTML elements, and other Magma components - use this to build complex content panels.\n\n```html\n<mds-accordion>\n  <mds-accordion-item label=\"Dettagli del documento\">\n    <mds-text typography=\"label\">Nome file</mds-text>\n    <mds-text>Relazione_annuale_2024.pdf</mds-text>\n    <mds-hr></mds-hr>\n    <mds-text typography=\"label\">Dimensione</mds-text>\n    <mds-text>2,4 MB</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Azioni disponibili\">\n    <mds-button label=\"Scarica\" icon=\"mi/baseline/download\" variant=\"primary\"></mds-button>\n    <mds-button label=\"Condividi\" icon=\"mi/baseline/share\" variant=\"primary\" tone=\"outline\"></mds-button>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Styling Customization\n\nStyle the accordion only through its public `--mds-accordion-*` CSS custom properties. The properties cascade into all child `mds-accordion-item` elements from the host.\n\n```css\n.custom-faq mds-accordion {\n  --mds-accordion-color: rgb(var(--magma-text-default));\n  --mds-accordion-padding-selected: calc(var(--spacing) * 600) 0 calc(var(--spacing) * 800) 0;\n  --mds-accordion-padding-unselected: calc(var(--spacing) * 400) 0;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-accordion>`. 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 Place Non-Item Children Directly in the Accordion Slot\n\nThe default slot of `<mds-accordion>` is designed exclusively for `<mds-accordion-item>` elements. Placing raw HTML or other components there bypasses the parent's selection coordination and breaks the compound component communication.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion>\n  <div>\n    <h3>Sezione uno</h3>\n    <p>Contenuto della sezione.</p>\n  </div>\n</mds-accordion>\n\n<!-- CORRECT -->\n<mds-accordion>\n  <mds-accordion-item label=\"Sezione uno\">\n    <mds-text>Contenuto della sezione.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Do Not Use `mds-accordion-item` Outside `mds-accordion`\n\n`<mds-accordion-item>` is a compound child and relies on the parent to give it an `id` when it has none and to manage selection state. Used standalone it has no coordinator and its `mdsAccordionItemSelect` / `mdsAccordionItemUnselect` events go unanswered.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-item label=\"Domanda frequente\">\n  <mds-text>Risposta alla domanda.</mds-text>\n</mds-accordion-item>\n\n<!-- CORRECT -->\n<mds-accordion>\n  <mds-accordion-item label=\"Domanda frequente\">\n    <mds-text>Risposta alla domanda.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Do Not Listen to Native `click` or `toggle` Instead of `mdsAccordionChange`\n\nA native `click` bubbles up from anywhere inside the accordion, panel content included, and carries no selection state; there is no native `toggle` event on this component. Listen for `mdsAccordionChange`, whose `detail.selected` holds the open index/indices.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion id=\"my-accordion\">\n  <mds-accordion-item label=\"Sezione A\">\n    <mds-text>Contenuto A.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n<script>\n  document.getElementById('my-accordion').addEventListener('click', (e) => {\n    // fires on any click, panel content included, and says nothing about the selection\n    console.log('clicked');\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-accordion id=\"my-accordion\">\n  <mds-accordion-item label=\"Sezione A\">\n    <mds-text>Contenuto A.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n<script>\n  document.getElementById('my-accordion').addEventListener('mdsAccordionChange', (e) => {\n    console.log('Selezione corrente:', e.detail.selected);\n  });\n</script>\n```\n\n#### Do Not Mix `mds-accordion-item` and `mds-accordion-timer-item`\n\n[`mds-accordion-timer`](../mds-accordion-timer/AGENTS.md) and its child [`mds-accordion-timer-item`](../mds-accordion-timer-item/AGENTS.md) are a separate compound pair. Slotting timer items into a plain accordion (or vice versa) breaks internal event wiring because each parent only listens for its own child's events.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion>\n  <mds-accordion-timer-item description=\"Avanzamento automatico\">\n    <mds-text>Contenuto con timer.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion>\n\n<!-- CORRECT - use mds-accordion-timer with mds-accordion-timer-item -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Avanzamento automatico\">\n    <mds-text>Contenuto con timer.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Do Not Pierce Shadow DOM to Style Internals\n\nThe only supported customization surface is the public `--mds-accordion-*` CSS custom properties and the documented `::part()` names on `mds-accordion-item` (`content`, `icon`, `label`). Targeting undocumented internals via `>>>` or deep class selectors couples code to the Shadow DOM implementation and breaks on minor releases.\n\n```css\n/* INCORRECT */\nmds-accordion >>> .action {\n  font-weight: bold;\n}\nmds-accordion-item::part(spinner) {\n  display: none;\n}\n\n/* CORRECT */\nmds-accordion {\n  --mds-accordion-color: rgb(var(--magma-text-default));\n}\nmds-accordion-item::part(label) {\n  font-style: italic;\n}\n```\n"
      },
      "props": [
        {
          "name": "disableClose",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disable-close",
          "reflectToAttr": false,
          "docs": "Prevents the user from closing the currently open item, forcing at least one panel to stay expanded",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "multiple",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "multiple",
          "reflectToAttr": false,
          "docs": "Choose if multiple siblings can be selected simultaneously",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsAccordionChange",
          "detail": "MdsAccordionEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsAccordionEventDetail",
            "resolved": "MdsAccordionEventDetail",
            "references": {
              "MdsAccordionEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-accordion/meta/event-detail.ts::MdsAccordionEventDetail",
                "referenceLocation": "MdsAccordionEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component attribute selected is changed",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "mdsAccordionItemSelect",
          "capture": false,
          "passive": false
        },
        {
          "event": "mdsAccordionItemUnselect",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [
        {
          "name": "--mds-accordion-border-color",
          "annotation": "prop",
          "docs": "Sets the border-color of the component children mds-accordion-item",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-border-width",
          "annotation": "prop",
          "docs": "Sets the border-width of the separators of the component children mds-accordion-item",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-color",
          "annotation": "prop",
          "docs": "Sets the text-color of the component children mds-accordion-item",
          "visibility": "public"
        },
        {
          "name": "--mds-accordion-description-color",
          "annotation": "prop",
          "docs": "Sets the color of the always visible title description",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-duration",
          "annotation": "prop",
          "docs": "Sets the transition duration of the close/open animation of the component children mds-accordion-item",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-padding-selected",
          "annotation": "prop",
          "docs": "Sets the vertical padding of the component children mds-accordion-item when it's selected",
          "visibility": "public"
        },
        {
          "name": "--mds-accordion-padding-unselected",
          "annotation": "prop",
          "docs": "Sets the vertical padding of the component children mds-accordion-item when it's unselected",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-accordion-item` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-accordion--docs"
    },
    {
      "filePath": "src/components/mds-accordion-item/mds-accordion-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-accordion-item",
      "readme": "# mds-accordion-item\n\n\n\nThis 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.\n",
      "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 contents like `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "part",
          "text": "content - the content wrapper of the `default` slot"
        },
        {
          "name": "part",
          "text": "icon - The arrow icon of the component"
        },
        {
          "name": "part",
          "text": "label - The text label of the component"
        },
        {
          "name": "parent",
          "text": "mds-accordion"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-accordion-item>` web component is a single collapsible panel of the Magma Design System, designed to be slotted inside its parent [`<mds-accordion>`](../mds-accordion/AGENTS.md). It renders a header button paired with an expandable content region; the parent controls which items are open.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct default-slot child of `<mds-accordion>`; it is not used standalone, and the parent's slot should hold only `mds-accordion-item` elements, not mixed child types.\n- **Parent-driven selection**: Clicking the header requests a toggle, but the authoritative open/closed state is resolved by the parent - in single mode opening one item closes its siblings, while in `multiple` mode each item toggles independently.\n- **Emitted events**: `mdsAccordionItemSelect` on open, `mdsAccordionItemUnselect` on close, and `mdsAccordionItemChange` on any toggle, each carrying `{ id, selected }`.\n- **Default slot**: Holds the collapsible body content (text, HTML, or components).\n\n#### Properties & Visual Configurations\n\n- **`label`** sets the always-visible header text shown whether the item is open or closed.\n- **`selected`** controls whether the panel is expanded; leave it to the parent to manage in coordinated accordions, or set it initially to have a panel start open.\n- **`typography`** picks the title style applied to the header label, defaulting to `h5`. An item is a part of the page, and the title of a part is styled as `h6` (`titles/part` of the design language): write `typography=\"h6\"` until the default moves with the next major (#1218). `action` gives a compact, control-like header. The value is a style only: the label is a `<span>` inside the `<button>` that opens the item, whatever its style.\n- **`tag`** puts the title in the outline of the page, at the level of its place: `tag=\"h3\"` under a section titled `h2`. The heading wraps the button, as the Accordion pattern of the WAI-ARIA Authoring Practices does, so whoever navigates by headings reaches each item. Left out, the item is not a heading: the component cannot know its place, and the level of its style (`h6`) would skip the levels in between.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-accordion-item>` 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 Accordion\n\nThe canonical form. Place one or more `<mds-accordion-item>` elements as direct children of [`<mds-accordion>`](../mds-accordion/AGENTS.md). Provide `label` for the header text and put the body content in the default slot.\n\n```html\n<mds-accordion>\n  <mds-accordion-item label=\"Cos'e' Magma?\">\n    <mds-text>Magma e' il design system di Maggioli, basato su web components.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Come si installa?\">\n    <mds-text>Importa il loader e chiama defineCustomElements() nell'entry point.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"E' compatibile con React?\">\n    <mds-text>Si', usa il pacchetto @maggioli-design-system/magma-react.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Panel Open by Default\n\nSet `selected` on the item you want pre-expanded. The parent does not resolve conflicts on load, so in single mode set it on one item only, unless `multiple` is also set on the parent.\n\n```html\n<mds-accordion>\n  <mds-accordion-item label=\"Introduzione\" selected>\n    <mds-text>Questa sezione e' aperta per impostazione predefinita.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Prerequisiti\">\n    <mds-text>Node.js 18+ e un package manager npm o pnpm.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Multiple Panels Open Simultaneously\n\nAdd `multiple` to `<mds-accordion>` so the user can expand more than one panel at once. Individual items do not change - the parent mode governs the behaviour.\n\n```html\n<mds-accordion multiple>\n  <mds-accordion-item label=\"Configurazione di base\">\n    <mds-text>Imposta i token di colore e il tema nell'entry point dell'applicazione.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Configurazione avanzata\" selected>\n    <mds-text>Personalizza i CSS custom properties per adattare il tema al brand.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Integrazione CI/CD\" selected>\n    <mds-text>Configura il job di build per generare documentation.json e readme.md.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Non-closable Accordion\n\nSet the parent `disable-close` attribute to prevent the user from collapsing an open panel. An open item then stays open until another item is clicked; with `multiple`, the last open item cannot be closed. Because `disableClose` defaults to `false`, just add the boolean attribute to enable mandatory selection.\n\n```html\n<mds-accordion disable-close>\n  <mds-accordion-item label=\"Passo 1 - Installazione\" selected>\n    <mds-text>Esegui npm install @maggioli-design-system/magma per aggiungere il pacchetto.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Passo 2 - Configurazione\">\n    <mds-text>Importa defineCustomElements e registra i componenti nell'app.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### The Title of an Item Is a Part\n\nAn item is a part of the page, whose title is styled as `h6` (`titles/part`): write `typography=\"h6\"`, until the default moves from `h5` with the next major (#1218). `typography` is the style only; `tag` gives the level of the title in the outline, one below the title of the section that holds the accordion (`h3` under an `h2`). Use `action` for a compact, control-like header.\n\n```html\n<mds-text typography=\"section\" tag=\"h2\">Domande frequenti</mds-text>\n<mds-accordion>\n  <mds-accordion-item label=\"Come gestisco gli aggiornamenti?\" typography=\"h6\" tag=\"h3\">\n    <mds-text>Ogni release e' documentata nel changelog con note di migrazione.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Posso personalizzare i colori?\" typography=\"h6\" tag=\"h3\">\n    <mds-text>Si', tramite i CSS custom properties esposti da ogni componente.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\nThe heading wraps the button that opens the item, as the Accordion pattern of the WAI-ARIA Authoring Practices does: a screen reader lists the questions among the headings of the page, under Domande frequenti. Left out, `tag` leaves the item a button only, out of the outline; never write the level of the style (`tag=\"h6\"` under an `h2`), which skips the levels in between.\n\n#### Rich Slot Content\n\nThe default slot accepts any HTML or components - not just text. Use it for structured content such as lists, forms, or nested components.\n\n```html\n<mds-accordion>\n  <mds-accordion-item label=\"Dettagli del progetto\">\n    <mds-text typography=\"h6\">Tecnologie utilizzate</mds-text>\n    <mds-list>\n      <mds-list-item>StencilJS</mds-list-item>\n      <mds-list-item>TypeScript</mds-list-item>\n      <mds-list-item>Storybook</mds-list-item>\n    </mds-list>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Contatti del team\">\n    <mds-text>Scrivi a design-system@maggioli.it per supporto tecnico.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Listening to Item Events\n\n`mdsAccordionItemChange` fires on every toggle; `mdsAccordionItemSelect` fires only on open; `mdsAccordionItemUnselect` fires only on close. Use `mdsAccordionItemChange` when you only need to react to any state change, or the specific event when you need to handle open and close differently. The parent overwrites each item's `id` with `item-<index>` on load, and that is the `detail.id`: do not select items by an `id` of your own.\n\n```html\n<mds-accordion id=\"faq\">\n  <mds-accordion-item label=\"Domanda frequente 1\">\n    <mds-text>Risposta alla prima domanda.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-item label=\"Domanda frequente 2\">\n    <mds-text>Risposta alla seconda domanda.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n\n<script>\n  document.querySelector('#faq').addEventListener('mdsAccordionItemChange', (e) => {\n    console.log('item changed:', e.detail.id, 'selected:', e.detail.selected);\n  });\n\n  document.querySelector('#faq mds-accordion-item').addEventListener('mdsAccordionItemSelect', (e) => {\n    console.log('faq-1 opened');\n  });\n</script>\n```\n\n#### Styling Customization\n\nStyle each item only through its public `--mds-accordion-item-*` CSS custom properties. Setting the public `--mds-accordion-*` properties on the parent `<mds-accordion>` propagates to all children via the cascade variables the items consume.\n\n```css\n/* Customize all items via the parent */\nmds-accordion {\n  --mds-accordion-padding-selected: calc(var(--spacing) * 600) 0 calc(var(--spacing) * 800) 0;\n  --mds-accordion-padding-unselected: calc(var(--spacing) * 400) 0;\n}\n\n/* Or target a single item directly */\n.sidebar mds-accordion-item {\n  --mds-accordion-item-color: rgb(var(--magma-text-default));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-accordion-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-accordion-item` Outside `mds-accordion`\n\nThe item relies on the parent to give it an `id` when it has none, manage sibling state, and emit coordinated change events. Placed standalone it still toggles, but nothing coordinates it, no `mdsAccordionChange` is emitted, and its events carry an empty `id`.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-item label=\"Sezione autonoma\">\n  <mds-text>Contenuto senza accordeon genitore.</mds-text>\n</mds-accordion-item>\n\n<!-- CORRECT -->\n<mds-accordion>\n  <mds-accordion-item label=\"Sezione autonoma\">\n    <mds-text>Contenuto all'interno del genitore corretto.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Do Not Wrap `mds-accordion-item` in Extra Elements\n\nItems are direct children of `mds-accordion` by contract (see [`agents/conventions.md`](../../../../agents/conventions.md)). The parent still finds wrapped items, since it queries every descendant, but the borders of an open item depend on its position among its siblings (`:first-child` / `:last-child`), which a wrapper changes.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion>\n  <div class=\"group\">\n    <mds-accordion-item label=\"FAQ 1\">\n      <mds-text>Risposta alla prima domanda.</mds-text>\n    </mds-accordion-item>\n  </div>\n</mds-accordion>\n\n<!-- CORRECT -->\n<mds-accordion>\n  <mds-accordion-item label=\"FAQ 1\">\n    <mds-text>Risposta alla prima domanda.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Do Not Set `label` via the Default Slot\n\n`label` is a required prop that renders the header button text, which is also the button's accessible name; the default slot holds only the collapsible body content. Putting header text in the slot places it inside the body region and leaves the required `label` prop empty, breaking both layout and accessibility.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion>\n  <mds-accordion-item>\n    Dettagli dell'ordine\n  </mds-accordion-item>\n</mds-accordion>\n\n<!-- CORRECT -->\n<mds-accordion>\n  <mds-accordion-item label=\"Dettagli dell'ordine\">\n    <mds-text>Numero ordine: 12345, data: 01/06/2026.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n\n#### Do Not Override Open/Close State by Piercing the Shadow DOM\n\n`selected` is reflected as a host attribute and is writable via JavaScript. Targeting the internal `.content` div or `.icon` element via `>>>` or undocumented class names to show/hide content manually bypasses the coordinated state machine and breaks sibling sync. The documented `content` part styles the panel body; it does not open it. Setting `selected` from JavaScript emits no event and does not close the siblings: in single mode, unset the open item yourself.\n\n```css\n/* INCORRECT */\nmds-accordion-item >>> .content {\n  grid-template-rows: 1fr;\n}\n```\n\n```js\n/* CORRECT - toggle via the reflected property */\nconst item = document.querySelector('mds-accordion-item#shipping'); // the id you gave the item\nitem.selected = true;\n```\n\n#### Do Not Listen for Native `click` or `change` Events Instead of the Documented `mds*` Events\n\nA native `click` bubbles up from anywhere inside the item, body content included, and carries no state; there is no native `change` event on this component. The documented events `mdsAccordionItemChange`, `mdsAccordionItemSelect`, and `mdsAccordionItemUnselect` are the designed surface.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion id=\"faq\">\n  <mds-accordion-item label=\"Domanda 1\">\n    <mds-text>Risposta 1.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n\n<script>\n  document.querySelector('#faq mds-accordion-item').addEventListener('click', () => {\n    console.log('clicked - also fires for clicks inside the body');\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('#faq mds-accordion-item').addEventListener('mdsAccordionItemChange', (e) => {\n    console.log('stato:', e.detail.selected);\n  });\n</script>\n```\n\n#### Do Not Use `<details>`/`<summary>` Inside the Slot as a Second Disclosure Layer\n\nThe item already is a styled disclosure widget. Nesting a native `<details>` inside the slot creates redundant expand/collapse semantics, duplicates keyboard interactions, and produces conflicting visual states.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion>\n  <mds-accordion-item label=\"Configurazione\">\n    <details>\n      <summary>Mostra dettagli</summary>\n      <p>Parametri avanzati di configurazione.</p>\n    </details>\n  </mds-accordion-item>\n</mds-accordion>\n\n<!-- CORRECT - put content directly in the slot -->\n<mds-accordion>\n  <mds-accordion-item label=\"Configurazione\">\n    <mds-text typography=\"h6\">Parametri avanzati</mds-text>\n    <mds-text>Descrizione dei parametri di configurazione avanzata.</mds-text>\n  </mds-accordion-item>\n</mds-accordion>\n```\n"
      },
      "props": [
        {
          "name": "label",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": false,
          "docs": "Specifies the title shown when the component is closed or selected",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Specifies if the component item is selected or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tag",
          "type": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | undefined",
          "complexType": {
            "original": "TypographyHeadingTagType",
            "resolved": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | undefined",
            "references": {
              "TypographyHeadingTagType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyHeadingTagType",
                "referenceLocation": "TypographyHeadingTagType"
              }
            }
          },
          "mutable": false,
          "attr": "tag",
          "reflectToAttr": false,
          "docs": "Specifies the heading level of the title, the level of its place in the outline of the\npage (`h3` under a section titled `h2`): the heading wraps the button that opens the item,\nas the Accordion pattern of the WAI-ARIA Authoring Practices does. Left out, the item is\nnot a heading: only the page knows its place, and the level of the style would skip the\nlevels in between",
          "docsTags": [],
          "values": [
            {
              "value": "h1",
              "type": "string"
            },
            {
              "value": "h2",
              "type": "string"
            },
            {
              "value": "h3",
              "type": "string"
            },
            {
              "value": "h4",
              "type": "string"
            },
            {
              "value": "h5",
              "type": "string"
            },
            {
              "value": "h6",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"action\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | undefined",
          "complexType": {
            "original": "TypographyTitleType",
            "resolved": "\"action\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | undefined",
            "references": {
              "TypographyTitleType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyTitleType",
                "referenceLocation": "TypographyTitleType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "Specifies the typography of the title. An item is a part of the page, whose title is\nstyled as `h6` (`titles/part`, #1189): write `h6` until the default moves with the next\nmajor (#1218). It is the style only: the level of the title in the outline is `tag`",
          "docsTags": [
            {
              "name": "default",
              "text": "'h5'"
            }
          ],
          "default": "'h5'",
          "values": [
            {
              "value": "action",
              "type": "string"
            },
            {
              "value": "h1",
              "type": "string"
            },
            {
              "value": "h2",
              "type": "string"
            },
            {
              "value": "h3",
              "type": "string"
            },
            {
              "value": "h4",
              "type": "string"
            },
            {
              "value": "h5",
              "type": "string"
            },
            {
              "value": "h6",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsAccordionItemChange",
          "detail": "MdsAccordionItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsAccordionItemEventDetail",
            "resolved": "MdsAccordionItemEventDetail",
            "references": {
              "MdsAccordionItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-accordion-item/meta/event-detail.ts::MdsAccordionItemEventDetail",
                "referenceLocation": "MdsAccordionItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component attribute selected is changed",
          "docsTags": []
        },
        {
          "event": "mdsAccordionItemSelect",
          "detail": "MdsAccordionItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsAccordionItemEventDetail",
            "resolved": "MdsAccordionItemEventDetail",
            "references": {
              "MdsAccordionItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-accordion-item/meta/event-detail.ts::MdsAccordionItemEventDetail",
                "referenceLocation": "MdsAccordionItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is selected",
          "docsTags": []
        },
        {
          "event": "mdsAccordionItemUnselect",
          "detail": "MdsAccordionItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsAccordionItemEventDetail",
            "resolved": "MdsAccordionItemEventDetail",
            "references": {
              "MdsAccordionItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-accordion-item/meta/event-detail.ts::MdsAccordionItemEventDetail",
                "referenceLocation": "MdsAccordionItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is unselected",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-accordion-item-border-color",
          "annotation": "prop",
          "docs": "Sets the border-color of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-item-border-width",
          "annotation": "prop",
          "docs": "Sets the border-width of the separators of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-item-color",
          "annotation": "prop",
          "docs": "Sets the text-color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-accordion-item-description-color",
          "annotation": "prop",
          "docs": "Sets the color of the always visible title description",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-item-duration",
          "annotation": "prop",
          "docs": "Sets the transition duration of the close/open animation of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-item-padding-selected",
          "annotation": "prop",
          "docs": "Sets the vertical padding of the component when it's selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-item-padding-unselected",
          "annotation": "prop",
          "docs": "Sets the vertical padding of the component when it's unselected",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add contents like `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "content",
          "docs": "the content wrapper of the `default` slot"
        },
        {
          "name": "icon",
          "docs": "The arrow icon of the component"
        },
        {
          "name": "label",
          "docs": "The text label of the component"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-accordion-item": [
          "mds-text"
        ]
      },
      "storybook": "ui-accordion-accordion-item--docs"
    },
    {
      "filePath": "src/components/mds-accordion-timer/mds-accordion-timer.tsx",
      "encapsulation": "shadow",
      "tag": "mds-accordion-timer",
      "readme": "# mds-accordion-timer\n\n\n\nThis 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.\n",
      "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 `mds-accordion-timer-item` element/s."
        },
        {
          "name": "category",
          "text": "structure"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-accordion-timer>` web component is the orchestrating parent of an auto-advancing accordion in the Magma Design System. It groups one or more `<mds-accordion-timer-item>` children, runs a timed progress cycle over them, and automatically opens the next item when the current one elapses - a behaviour with no native HTML primitive.\n\n#### Semantic Behavior\n\n- **Compound parent**: Drives selection across its slotted `<mds-accordion-timer-item>` children; it is meaningless without item children.\n- **Initial selection**: The child carrying `selected` (the last one, if several do) becomes the active item and starts the timer on load; if none is selected, the timer stays idle until an item is activated.\n- **Auto-advance cycle**: When the active item elapses, the next item opens, wrapping back to the first after the last - producing a continuous loop.\n- **Per-item duration override**: Each item uses its own `duration` when set, otherwise falling back to the parent `duration`.\n- **Pause on hover**: Hovering the active item pauses the countdown and resumes on mouse-leave; this is suppressed while `paused` is set.\n- **Manual selection**: Clicking an item selects it and holds its countdown at the start until the pointer leaves the item, while programmatic selection restarts the timer from the beginning of that item. Both clear `paused`.\n- **Emitted event**: `mdsAccordionTimerChange` with the new item `index` whenever the active item changes, once for a click and once for an auto-advance.\n\n#### Properties & Visual Configurations\n\nThis component exposes only timing controls; it has no `variant` / `tone` / `size` ladder of its own.\n\n#### Other behavioral props\n\n- **`duration`** is the fallback cycle length in milliseconds applied to every item that does not declare its own `duration`; it is the global pacing knob for the whole accordion.\n- **`paused`** freezes the countdown at its current remaining time when set and resumes it when cleared. While paused, hover-driven pause/resume is disabled; selecting an item, by click or from code, clears it.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-accordion-timer>` 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 Auto-Advancing Accordion\n\nThe canonical form. Place `<mds-accordion-timer-item>` children inside the parent, mark exactly one with `selected` to define the initial panel, and provide a `description` for each header. The timer starts automatically on load and cycles through items continuously.\n\n```html\n<mds-accordion-timer>\n  <mds-accordion-timer-item selected description=\"Introduzione\">\n    <mds-text>Contenuto del primo pannello.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Caratteristiche\">\n    <mds-text>Contenuto del secondo pannello.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Conclusioni\">\n    <mds-text>Contenuto del terzo pannello.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Controlling the Global Cycle Duration\n\nUse the `duration` prop (in milliseconds) to set how long each item stays open before the accordion auto-advances. The default is 10000 ms (10 seconds). This applies to all items that do not declare their own `duration`.\n\n```html\n<mds-accordion-timer duration=\"5000\">\n  <mds-accordion-timer-item selected description=\"Passo 1\">\n    <mds-text>Primo contenuto.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Passo 2\">\n    <mds-text>Secondo contenuto.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Per-Item Duration Override\n\nSet `duration` on individual `<mds-accordion-timer-item>` children to give each item its own display time. An item-level `duration` takes precedence over the parent's global `duration` for that item only.\n\n```html\n<mds-accordion-timer duration=\"4000\">\n  <mds-accordion-timer-item selected description=\"Introduzione rapida\" duration=\"2000\">\n    <mds-text>Questo pannello rimane aperto per 2 secondi.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Approfondimento\" duration=\"8000\">\n    <mds-text>Questo pannello rimane aperto per 8 secondi.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Riepilogo\">\n    <mds-text>Questo pannello usa la durata globale (4 secondi).</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Starting in a Paused State\n\nSet the `paused` attribute on the parent to start the accordion with the timer frozen. The selected item will display without advancing until `paused` is removed or the user selects an item. Use this when the auto-advance should not begin until a user action occurs.\n\n```html\n<mds-accordion-timer paused>\n  <mds-accordion-timer-item selected description=\"In attesa di avvio\">\n    <mds-text>Il timer e' in pausa. Rimuovere l'attributo \"paused\" per avviarlo.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Secondo pannello\">\n    <mds-text>Secondo contenuto.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Toggling Pause Programmatically\n\nToggle the `paused` prop from JavaScript to freeze and resume the countdown at runtime - for example in response to a user preference or a visibility-change event. Set the prop to `undefined` or `false` (or remove the attribute) to resume; in markup never write `paused=\"false\"`.\n\n```html\n<mds-accordion-timer id=\"slideshow\">\n  <mds-accordion-timer-item selected description=\"Novita' del mese\">\n    <mds-text>Contenuto del primo pannello.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Offerte speciali\">\n    <mds-text>Contenuto del secondo pannello.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n\n<mds-button id=\"btn-pause\" label=\"Metti in pausa\" variant=\"primary\" tone=\"outline\"></mds-button>\n<mds-button id=\"btn-resume\" label=\"Riprendi\" variant=\"primary\" tone=\"strong\"></mds-button>\n```\n\n```javascript\nconst accordion = document.getElementById('slideshow');\ndocument.getElementById('btn-pause').addEventListener('click', () => {\n  accordion.paused = true;\n});\ndocument.getElementById('btn-resume').addEventListener('click', () => {\n  accordion.paused = undefined;\n});\n```\n\n#### Listening for Item Changes\n\nListen to the `mdsAccordionTimerChange` event to react whenever the active item changes - for example to synchronise an external indicator or analytics counter. The event detail carries the zero-based `index` of the newly selected item.\n\n```javascript\ndocument.querySelector('mds-accordion-timer').addEventListener('mdsAccordionTimerChange', (e) => {\n  console.log('Pannello attivo:', e.detail.index);\n});\n```\n\n#### Programmatic Item Selection\n\nTo jump to a specific item from code, set `selected = true` on that `<mds-accordion-timer-item>` element directly. The parent intercepts the resulting `mdsAccordionTimerItemSelect` event, clears `paused`, and restarts the timer from the beginning of that item.\n\n```javascript\nconst items = document.querySelectorAll('mds-accordion-timer-item');\n// Apre il terzo pannello e riavvia il timer\nitems[2].selected = true;\n```\n\n#### Customizing the Text Color via CSS Custom Properties\n\nStyle the component only through its public `--mds-accordion-timer-color` CSS custom property, which sets the text color of every item. Set it on the parent host or a parent selector; use semantic color roles via `rgb(var(--magma-<role>))` so dark mode continues to work. The colors and the thickness of the progress bar are not public: the bar follows the theme. Each item exposes it as its `progress` part, and its header text as the `label` part.\n\n```css\n.promo-slider mds-accordion-timer {\n  --mds-accordion-timer-color: rgb(var(--magma-accent-fg));\n}\n.promo-slider mds-accordion-timer-item::part(label) {\n  font-weight: 600;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-accordion-timer>`. 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-accordion-timer-item Outside mds-accordion-timer\n\n`<mds-accordion-timer-item>` is a compound child that only works when discovered by the parent at load time; the parent assigns `uuid` values, drives the selection, and feeds `progress`. Outside its parent the item has no timer, no auto-advance, and no sibling coordination.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-timer-item selected description=\"Elemento isolato\">\n  <mds-text>Questo elemento non avra' mai un timer.</mds-text>\n</mds-accordion-timer-item>\n\n<!-- CORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item selected description=\"Elemento corretto\">\n    <mds-text>Il timer funziona correttamente all'interno del genitore.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Do Not Mix Child Types Inside mds-accordion-timer\n\nThe parent discovers children via `querySelectorAll('mds-accordion-timer-item')` and indexes them by position. A mixed-in `<mds-accordion-item>` or other component is left out of the rotation and toggles on its own; [`agents/conventions.md`](../../../../agents/conventions.md) forbids mixing child types in compound components.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item selected description=\"Timed item\">\n    <mds-text>Pannello a timer.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-item label=\"Static item\">\n    <mds-text>Pannello statico non supportato qui.</mds-text>\n  </mds-accordion-item>\n</mds-accordion-timer>\n\n<!-- CORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item selected description=\"Primo pannello\">\n    <mds-text>Pannello a timer.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Secondo pannello\">\n    <mds-text>Altro pannello a timer.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Do Not Set paused=\"false\" to Resume the Timer\n\n`paused` is a boolean prop, and a false boolean is an absent attribute ([`agents/mistakes.md`](../../../../agents/mistakes.md)). Stencil reads the string `\"false\"` as `false` here, but the attribute stays on the element, so anything that checks `[paused]` still sees the timer as paused. Remove the attribute entirely (or set the property to `undefined` or `false`) to resume.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-timer paused=\"false\">\n  <mds-accordion-timer-item selected description=\"Primo pannello\">\n    <mds-text>L'attributo paused resta sull'elemento.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n\n<!-- CORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item selected description=\"Primo pannello\">\n    <mds-text>Il timer e' in esecuzione.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n```javascript\n// CORRECT (from code)\naccordion.paused = undefined; // or false: the property takes a real boolean\n```\n\n#### Do Not Set uuid or progress Manually\n\n`uuid` (item position index) and `progress` (0-1 fill value) are owned and continuously rewritten by the parent at runtime. Setting them from outside produces race conditions between your values and the parent's interval writes, leading to erratic progress bars and broken rotation.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item uuid=\"0\" progress=\"50\" selected description=\"Progresso manuale\">\n    <mds-text>La barra di progresso verra' sovrascritta dal genitore.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n\n<!-- CORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item selected description=\"Progresso gestito\">\n    <mds-text>Il genitore gestisce uuid e progress automaticamente.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Do Not Pierce the Shadow DOM to Restyle the Progress Bar\n\nThe progress bar and the label are exposed on each item only as the documented `progress` and `label` parts. Use the public `--mds-accordion-timer-color` CSS custom property on the host (or a parent selector) to change the text color, and those parts for the rest of their appearance. Targeting internal class names or undocumented parts couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-accordion-timer >>> .progress-bar {\n  background: red;\n}\nmds-accordion-timer-item::part(unknown-part) {\n  height: 4px;\n}\n\n/* CORRECT */\nmds-accordion-timer {\n  --mds-accordion-timer-color: rgb(var(--magma-accent-fg));\n}\nmds-accordion-timer-item::part(label) {\n  font-weight: 600;\n}\n```\n\n#### Do Not Listen for Native change Events Instead of mdsAccordionTimerChange\n\nThe component emits `mdsAccordionTimerChange` when the active item changes; it emits no native `change` event. Listen to the documented `mds*` event name.\n\n```javascript\n// INCORRECT\naccordion.addEventListener('change', (e) => { /* never fires */ });\n\n// CORRECT\naccordion.addEventListener('mdsAccordionTimerChange', (e) => {\n  console.log('Indice attivo:', e.detail.index);\n});\n```\n"
      },
      "props": [
        {
          "name": "duration",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "duration",
          "reflectToAttr": true,
          "docs": "Sets the duration of the single accordion item",
          "docsTags": [
            {
              "name": "default",
              "text": "10000"
            }
          ],
          "default": "10000",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "paused",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "paused",
          "reflectToAttr": true,
          "docs": "When paused is defined, the timer stops run",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsAccordionTimerChange",
          "detail": "MdsAccordionTimerEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsAccordionTimerEventDetail",
            "resolved": "MdsAccordionTimerEventDetail",
            "references": {
              "MdsAccordionTimerEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-accordion-timer/meta/event-detail.ts::MdsAccordionTimerEventDetail",
                "referenceLocation": "MdsAccordionTimerEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the accordion changes it's item",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "mdsAccordionTimerItemClickSelect",
          "capture": false,
          "passive": false
        },
        {
          "event": "mdsAccordionTimerItemSelect",
          "capture": false,
          "passive": false
        },
        {
          "event": "mdsAccordionTimerItemMouseEnterSelect",
          "capture": false,
          "passive": false
        },
        {
          "event": "mdsAccordionTimerItemMouseLeaveSelect",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [
        {
          "name": "--mds-accordion-timer-color",
          "annotation": "prop",
          "docs": "Sets the text color of the component mds-accordion-timer-item",
          "visibility": "public"
        },
        {
          "name": "--mds-accordion-timer-duration",
          "annotation": "prop",
          "docs": "Sets the transition duration of open/close animation of the mds-accordion-timer-item",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-timer-progress-bar-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the progress bar when the mds-accordion-timer-item is selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-timer-progress-bar-color",
          "annotation": "prop",
          "docs": "Sets the color of the progress bar when the mds-accordion-timer-item is selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-timer-progress-bar-thickness",
          "annotation": "prop",
          "docs": "Sets thickness of the progress bar of the mds-accordion-timer-item",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-accordion-timer-item` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-accordion-timer--docs"
    },
    {
      "filePath": "src/components/mds-accordion-timer-item/mds-accordion-timer-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-accordion-timer-item",
      "readme": "# mds-accordion-timer-item\n\n\n\nThis 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.\n",
      "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 content like `text string`, `HTML elements` or `components` to this slot"
        },
        {
          "name": "part",
          "text": "content - the content wrapper of the `default` slot"
        },
        {
          "name": "part",
          "text": "icon - The arrow icon of the component"
        },
        {
          "name": "part",
          "text": "label - The text label of the component"
        },
        {
          "name": "part",
          "text": "progress - The progress bar of the component"
        },
        {
          "name": "parent",
          "text": "mds-accordion-timer"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-accordion-timer-item>` web component is the single collapsible panel of a timed, auto-advancing accordion, designed to live exclusively inside its parent [`<mds-accordion-timer>`](../mds-accordion-timer/AGENTS.md). It renders a header button paired with a progress bar and a region that reveals the slotted content while the item is selected.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct default-slot child of `<mds-accordion-timer>`, alongside other `<mds-accordion-timer-item>` siblings. It is not used standalone or mixed with other child types, since the parent drives the rotating timer across the items.\n- **Selection is parent-orchestrated**: `selected` represents the open state, but only one sibling is open at a time - the parent advances selection on the timer or on a user click.\n- **Click reports up**: Clicking the header of a closed item emits `mdsAccordionTimerItemClickSelect`, and the parent opens it, pauses and re-anchors its timer on it. Clicking the open item does nothing: it stays open.\n- **Programmatic selection**: Setting `selected` to `true` emits `mdsAccordionTimerItemSelect`, and the parent restarts the countdown from the beginning of that item. A click reaches `selected` through the parent, so it emits this event as well, which the parent does not take as a second selection.\n- **Hover pauses the countdown**: While selected, pointer enter/leave emit `mdsAccordionTimerItemMouseEnterSelect` / `mdsAccordionTimerItemMouseLeaveSelect`, which the parent uses to pause and resume the timer. These fire only when the item is currently selected.\n\n#### Properties & Visual Configurations\n\n- **`description`** (required): the title text shown on the header in both open and closed states; it also supplies the accessible label of the content region.\n- **`typography`**: picks the title style of the header text, defaulting to `h5`. An item is a part of the page, styled as `h6` (`titles/part` of the design language): write `typography=\"h6\"` until the default moves with the next major (#1218). The value is a style only: the header is a `<span>` inside the `<button>` that opens the item, whatever its style.\n- **`tag`**: puts the title in the outline of the page, at the level of its place: `tag=\"h3\"` under a section titled `h2`. The heading wraps the button, as the Accordion pattern of the WAI-ARIA Authoring Practices does. Left out, the item is not a heading: the component cannot know its place, and the level of its style (`h6`) would skip the levels in between.\n- **`selected`**: marks this item as the open one. You normally set it on a single item to define the initial open panel; thereafter the parent owns it.\n- **`duration`**: an optional per-item override (in ms) for how long this item stays open before the parent auto-advances, overriding the parent's global `duration` for this item only.\n- **`progress`** and **`uuid`** are managed by the parent at runtime; do not set them manually.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-accordion-timer-item>` 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 Timed Accordion\n\nThe canonical form. Always place `<mds-accordion-timer-item>` as a direct child of [`<mds-accordion-timer>`](../mds-accordion-timer/AGENTS.md). Provide a `description` for each item - it becomes the header label and the accessible name for the content region. Mark one item `selected`: without it the timer does not start.\n\n```html\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Introduzione al progetto\" selected>\n    <mds-text>Contenuto dell'introduzione al progetto.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Obiettivi principali\">\n    <mds-text>Elenco degli obiettivi principali del progetto.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Conclusioni\">\n    <mds-text>Riepilogo e prossimi passi.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Setting the Initially Open Item\n\nMark one item `selected` to define which panel is open on load. The parent reads this state at `componentDidLoad` to anchor its timer on that item. Mark at most one item; the parent will enforce exclusive selection after load.\n\n```html\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Fase uno\" selected>\n    <mds-text>Descrizione della fase uno.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Fase due\">\n    <mds-text>Descrizione della fase due.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Per-Item Duration Override\n\nSet `duration` (in milliseconds) on a single item to give it a different display time than the global `duration` set on the parent. Omit `duration` on items that should use the parent's default.\n\n```html\n<mds-accordion-timer duration=\"5000\">\n  <mds-accordion-timer-item description=\"Panoramica rapida\" duration=\"2000\" selected>\n    <mds-text>Questa sezione scorre piu velocemente delle altre.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Dettagli tecnici\" duration=\"12000\">\n    <mds-text>Questa sezione richiede piu tempo per la lettura.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Contatti\">\n    <mds-text>Usa la durata globale di 5000 ms.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### The Title of an Item Is a Part\n\nAn item is a part of the page, whose title is styled as `h6` (`titles/part`): write `typography=\"h6\"`, until the default moves from `h5` with the next major (#1218). `typography` is the style only; `tag` gives the level of the title in the outline, one below the title of the section that holds the accordion (`h3` under an `h2`).\n\n```html\n<mds-text typography=\"section\" tag=\"h2\">Come funziona</mds-text>\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Argomento principale\" typography=\"h6\" tag=\"h3\">\n    <mds-text>Contenuto dell'argomento principale.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Sotto-argomento\" typography=\"h6\" tag=\"h3\">\n    <mds-text>Approfondimento del sotto-argomento.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\nThe heading wraps the button that opens the item, as the Accordion pattern of the WAI-ARIA Authoring Practices does. Left out, `tag` leaves the item a button only, out of the outline; never write the level of the style (`tag=\"h6\"` under an `h2`), which skips the levels in between.\n\n#### Rich Slotted Content\n\nThe default slot accepts HTML elements and components, not only plain text. Use it to compose images, lists, or nested components inside the disclosure panel.\n\n```html\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Caratteristiche del prodotto\">\n    <mds-img src=\"/images/prodotto.jpg\" alt=\"Foto del prodotto\"></mds-img>\n    <mds-text>\n      Il prodotto include le seguenti funzionalita: gestione utenti, reportistica avanzata e\n      integrazione con i sistemi esistenti.\n    </mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Prezzi e licenze\">\n    <mds-text>Contatta il nostro team commerciale per un preventivo personalizzato.</mds-text>\n    <mds-button label=\"Richiedi preventivo\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Reacting to Item Changes\n\nListen for `mdsAccordionTimerItemClickSelect` to detect user-initiated selection (it fires only when a click opens the item). `mdsAccordionTimerItemSelect` on the item fires on every selection - click, code or timer - and `mdsAccordionTimerChange` on the parent reports the new index.\n\n```html\n<mds-accordion-timer id=\"timer\">\n  <mds-accordion-timer-item description=\"Notizie in evidenza\" id=\"item-0\" selected>\n    <mds-text>Prima notizia in evidenza della giornata.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Aggiornamenti recenti\" id=\"item-1\">\n    <mds-text>Ultimi aggiornamenti disponibili.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n\n<script>\n  document.getElementById('item-0').addEventListener('mdsAccordionTimerItemClickSelect', (e) => {\n    console.log('selezione manuale', e.detail);\n  });\n\n  document.getElementById('timer').addEventListener('mdsAccordionTimerChange', (e) => {\n    console.log('avanzamento automatico, indice:', e.detail.index);\n  });\n</script>\n```\n\n#### Styling Customization\n\nStyle the item only through its public `--mds-accordion-timer-item-*` CSS custom properties. Use semantic color roles wrapped in `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working. Note that `--mds-accordion-timer-item-color` is also inherited from the parent's `--mds-accordion-timer-color` counterpart - setting it on the parent applies to all items at once.\n\n```css\n/* Customise a single item by targeting its host */\n.featured-section mds-accordion-timer-item {\n  --mds-accordion-timer-item-color: rgb(var(--magma-accent-fg));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-accordion-timer-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 the Item Outside Its Parent\n\n`<mds-accordion-timer-item>` is a compound child and relies on [`<mds-accordion-timer>`](../mds-accordion-timer/AGENTS.md) to assign `uuid`, write `progress`, and drive selection. Standalone use produces a static, non-advancing disclosure with no progress bar updates.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-timer-item description=\"Dettagli\">\n  <mds-text>Contenuto.</mds-text>\n</mds-accordion-timer-item>\n\n<!-- CORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Dettagli\">\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Do Not Mix with `mds-accordion-item`\n\n`<mds-accordion-timer-item>` and [`<mds-accordion-item>`](../mds-accordion-item/AGENTS.md) are siblings in different compound families and must not be placed in the same parent. The timer accordion indexes only `mds-accordion-timer-item` children; a mixed-in `mds-accordion-item` is left out of the rotation and toggles on its own.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-item label=\"Primo\">\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-item>\n  <mds-accordion-timer-item description=\"Secondo\">\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n\n<!-- CORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Primo\">\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Secondo\">\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Do Not Set `progress` or `uuid` Manually\n\nBoth props are reserved for the parent's runtime orchestration. Setting them by hand breaks the timer's internal state tracking and produces incorrect progress bar rendering.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Primo\" uuid=\"0\" progress=\"50\">\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n\n<!-- CORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Primo\">\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Do Not Mark More Than One Item `selected`\n\nThe parent does not enforce single selection at load: every item marked `selected` renders open, and the last one drives the timer until the first change closes the others.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Primo\" selected>\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Secondo\" selected>\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n\n<!-- CORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Primo\" selected>\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-timer-item>\n  <mds-accordion-timer-item description=\"Secondo\">\n    <mds-text>Contenuto.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n\n#### Do Not Pierce Shadow Parts for Styling\n\nThe documented customization surface is the public `--mds-accordion-timer-item-*` CSS custom properties plus the four shadow parts (`content`, `icon`, `label`, `progress`). Targeting undocumented internals couples code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-accordion-timer-item >>> .action {\n  font-weight: bold;\n}\nmds-accordion-timer-item::part(spinner) {\n  color: red;\n}\n\n/* CORRECT */\nmds-accordion-timer-item {\n  --mds-accordion-timer-item-color: rgb(var(--magma-accent-fg));\n}\nmds-accordion-timer-item::part(label) {\n  font-weight: 600;\n}\n```\n\n#### Do Not Omit `description`\n\n`description` is a required prop. It is the only text source for the header label and the accessible name of the content region. Omitting it leaves the button unlabelled and fails accessibility audits.\n\n```html\n<!-- INCORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item>\n    <mds-text>Contenuto senza titolo.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n\n<!-- CORRECT -->\n<mds-accordion-timer>\n  <mds-accordion-timer-item description=\"Titolo della sezione\">\n    <mds-text>Contenuto della sezione.</mds-text>\n  </mds-accordion-timer-item>\n</mds-accordion-timer>\n```\n"
      },
      "props": [
        {
          "name": "description",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "description",
          "reflectToAttr": false,
          "docs": "Specifies the title shown when the accordion is closed or opened",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        },
        {
          "name": "duration",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "duration",
          "reflectToAttr": true,
          "docs": "Specifies the duration of the single component when selected, it overrides the global duration of itself only",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "progress",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "progress",
          "reflectToAttr": false,
          "docs": "The progress of the item's countdown, from 0 to 1: mds-accordion-timer writes it while the\nitem is selected and sets it back to 0 when the next item takes over",
          "docsTags": [
            {
              "name": "default",
              "text": "0"
            }
          ],
          "default": "0",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Specifies if the accordion item is opened or not",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tag",
          "type": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | undefined",
          "complexType": {
            "original": "TypographyHeadingTagType",
            "resolved": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | undefined",
            "references": {
              "TypographyHeadingTagType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyHeadingTagType",
                "referenceLocation": "TypographyHeadingTagType"
              }
            }
          },
          "mutable": false,
          "attr": "tag",
          "reflectToAttr": false,
          "docs": "Specifies the heading level of the title, the level of its place in the outline of the\npage (`h3` under a section titled `h2`): the heading wraps the button that opens the item,\nas the Accordion pattern of the WAI-ARIA Authoring Practices does. Left out, the item is\nnot a heading: only the page knows its place, and the level of the style would skip the\nlevels in between",
          "docsTags": [],
          "values": [
            {
              "value": "h1",
              "type": "string"
            },
            {
              "value": "h2",
              "type": "string"
            },
            {
              "value": "h3",
              "type": "string"
            },
            {
              "value": "h4",
              "type": "string"
            },
            {
              "value": "h5",
              "type": "string"
            },
            {
              "value": "h6",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"action\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
          "complexType": {
            "original": "TypographyTitleType",
            "resolved": "\"action\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
            "references": {
              "TypographyTitleType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyTitleType",
                "referenceLocation": "TypographyTitleType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "Specifies the typography of the title. An item is a part of the page, whose title is\nstyled as `h6` (`titles/part`, #1189): write `h6` until the default moves with the next\nmajor (#1218). It is the style only: the level of the title in the outline is `tag`",
          "docsTags": [
            {
              "name": "default",
              "text": "'h5'"
            }
          ],
          "default": "'h5'",
          "values": [
            {
              "value": "action",
              "type": "string"
            },
            {
              "value": "h1",
              "type": "string"
            },
            {
              "value": "h2",
              "type": "string"
            },
            {
              "value": "h3",
              "type": "string"
            },
            {
              "value": "h4",
              "type": "string"
            },
            {
              "value": "h5",
              "type": "string"
            },
            {
              "value": "h6",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "uuid",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "uuid",
          "reflectToAttr": false,
          "docs": "Used automatically by MdsAccordionTimer wrapper to handle it's siblings",
          "docsTags": [
            {
              "name": "default",
              "text": "0"
            }
          ],
          "default": "0",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsAccordionTimerItemClickSelect",
          "detail": "MdsAccordionTimerItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsAccordionTimerItemEventDetail",
            "resolved": "MdsAccordionTimerItemEventDetail",
            "references": {
              "MdsAccordionTimerItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-accordion-timer-item/meta/event-detail.ts::MdsAccordionTimerItemEventDetail",
                "referenceLocation": "MdsAccordionTimerItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the accordion is clicked by the mouse",
          "docsTags": []
        },
        {
          "event": "mdsAccordionTimerItemMouseEnterSelect",
          "detail": "MdsAccordionTimerItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsAccordionTimerItemEventDetail",
            "resolved": "MdsAccordionTimerItemEventDetail",
            "references": {
              "MdsAccordionTimerItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-accordion-timer-item/meta/event-detail.ts::MdsAccordionTimerItemEventDetail",
                "referenceLocation": "MdsAccordionTimerItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the accordion is hovered by the mouse",
          "docsTags": []
        },
        {
          "event": "mdsAccordionTimerItemMouseLeaveSelect",
          "detail": "MdsAccordionTimerItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsAccordionTimerItemEventDetail",
            "resolved": "MdsAccordionTimerItemEventDetail",
            "references": {
              "MdsAccordionTimerItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-accordion-timer-item/meta/event-detail.ts::MdsAccordionTimerItemEventDetail",
                "referenceLocation": "MdsAccordionTimerItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the accordion is hovered by the mouse",
          "docsTags": []
        },
        {
          "event": "mdsAccordionTimerItemSelect",
          "detail": "MdsAccordionTimerItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsAccordionTimerItemEventDetail",
            "resolved": "MdsAccordionTimerItemEventDetail",
            "references": {
              "MdsAccordionTimerItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-accordion-timer-item/meta/event-detail.ts::MdsAccordionTimerItemEventDetail",
                "referenceLocation": "MdsAccordionTimerItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the accordion is changed from code",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-accordion-timer-item-color",
          "annotation": "prop",
          "docs": "Sets the text color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-accordion-timer-item-duration",
          "annotation": "prop",
          "docs": "Sets the transition duration of open/close animation",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-timer-item-progress-bar-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the progress bar when the item is selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-timer-item-progress-bar-color",
          "annotation": "prop",
          "docs": "Sets the color of the progress bar when the item is selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-accordion-timer-item-progress-bar-thickness",
          "annotation": "prop",
          "docs": "Sets thickness of the progress bar",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add content like `text string`, `HTML elements` or `components` to this slot"
        }
      ],
      "parts": [
        {
          "name": "content",
          "docs": "the content wrapper of the `default` slot"
        },
        {
          "name": "icon",
          "docs": "The arrow icon of the component"
        },
        {
          "name": "label",
          "docs": "The text label of the component"
        },
        {
          "name": "progress",
          "docs": "The progress bar of the component"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-progress"
      ],
      "dependencyGraph": {
        "mds-accordion-timer-item": [
          "mds-text",
          "mds-progress"
        ],
        "mds-progress": [
          "mds-radial-progress"
        ],
        "mds-radial-progress": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "ui-accordion-timer-accordion-timer-item--docs"
    },
    {
      "filePath": "src/components/mds-author/mds-author.tsx",
      "encapsulation": "shadow",
      "tag": "mds-author",
      "readme": "# mds-author\n\n\n\nThis 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.\n",
      "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. Insert author information, name, role or other useful author infos."
        },
        {
          "name": "slot",
          "text": "avatar - Insert an avatar image, it is **recommended** to add `mds-avatar` element."
        },
        {
          "name": "category",
          "text": "data"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-author>` web component is the layout primitive of the Magma Design System for presenting a person's identity: it pairs an avatar with author information (name, role, or any related details). It exposes no props and acts purely as a slotted container, arranging an optional `avatar` slot beside a default content slot.\n\n#### Semantic Behavior\n\n- **Conditional avatar rendering**: The avatar column appears only while a direct child assigned to `slot=\"avatar\"` is present, also when it is added after the first render, so omitting it produces no empty column.\n- **Default slot is content, not text**: The default slot is meant to hold structured author information (typically stacked `mds-text` elements for name and role) rather than a single inline label.\n- **Responsive collapse**: Below ~200px wide the avatar stacks above the info and they center, so the same markup adapts from a horizontal row to a compact vertical card.\n- **Compound usage**: It is designed to wrap an `mds-avatar` in the `avatar` slot; the avatar element owns initials/image fallback logic, while `<mds-author>` only positions it.\n\n#### Properties & Visual Configurations\n\nThis component has no properties. All configuration is expressed through its two slots:\n\n- **`avatar` slot**: the leading element, recommended to be an `mds-avatar`. Its presence is what toggles the two-column layout.\n- **default slot**: the trailing block holding the author's textual details, laid out so multiple lines stack cleanly and shrink to the available width (set `truncate` on an `mds-text` to cut a long line).\n\nSee [`agents/conventions.md`](../../../../agents/conventions.md) for the shared compound-component conventions and the usage contract.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-author>` component, ordered from most common to most specialized. The examples assume a working knowledge of compound-component conventions documented in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Full Byline with Avatar\n\nThe canonical form. Place an [`mds-avatar`](../mds-avatar/AGENTS.md) in the `avatar` slot and stack the author's name and role in the default slot using [`mds-text`](../mds-text/AGENTS.md).\n\n```html\n<mds-author>\n  <mds-avatar slot=\"avatar\" initials=\"mg\" src=\"/assets/avatars/mario-gomez.webp\"></mds-avatar>\n  <mds-text typography=\"h6\">Mario Gomez</mds-text>\n  <mds-text typography=\"caption\">Responsabile editoriale</mds-text>\n</mds-author>\n```\n\n#### Avatar with Initials Fallback\n\nWhen no profile image is available, omit `src` and rely on `initials`. The avatar component derives a deterministic identity color from the initials, keeping people visually distinguishable.\n\n```html\n<mds-author>\n  <mds-avatar slot=\"avatar\" initials=\"ag\"></mds-avatar>\n  <mds-text typography=\"h6\">Anna Grandi</mds-text>\n  <mds-text typography=\"caption\">Giornalista</mds-text>\n</mds-author>\n```\n\n#### Multiple Info Lines\n\nThe default slot is a grid container - any number of stacked lines render cleanly and shrink to the available width; set `truncate` on an `mds-text` to cut a long line.\n\n```html\n<mds-author>\n  <mds-avatar slot=\"avatar\" initials=\"fb\" src=\"/assets/avatars/fred-brooks.webp\"></mds-avatar>\n  <mds-text typography=\"h6\">Fred Brooks</mds-text>\n  <mds-text typography=\"caption\">Ingegnere del software</mds-text>\n  <mds-text typography=\"caption\">Dipartimento IT</mds-text>\n</mds-author>\n```\n\n#### Text-Only Author (No Avatar)\n\nOmitting the `avatar` slot entirely collapses the avatar column. No empty space is left - the info block fills the full width.\n\n```html\n<mds-author>\n  <mds-text typography=\"h6\">Luca Ferretti</mds-text>\n  <mds-text typography=\"caption\">Redattore capo</mds-text>\n</mds-author>\n```\n\n#### Author Card Inside an Article Header\n\n`<mds-author>` is typically embedded inside a card or article header, paired with a date or category label.\n\n```html\n<mds-card>\n  <mds-card-header slot=\"header\">\n    <mds-author>\n      <mds-avatar slot=\"avatar\" initials=\"cs\" src=\"/assets/avatars/chiara-sala.webp\"></mds-avatar>\n      <mds-text typography=\"h6\">Chiara Sala</mds-text>\n      <mds-text typography=\"caption\">Pubblicato il 3 giugno 2026</mds-text>\n    </mds-author>\n  </mds-card-header>\n</mds-card>\n```\n\n#### Avatar with Icon for Non-Human Entities\n\nWhen the author represents an organization or system - rather than a person - pass an icon slug to `mds-avatar` instead of initials or a photo.\n\n```html\n<mds-author>\n  <mds-avatar slot=\"avatar\" icon=\"mi/baseline/business\"></mds-avatar>\n  <mds-text typography=\"h6\">Redazione Magma</mds-text>\n  <mds-text typography=\"caption\">Contenuto istituzionale</mds-text>\n</mds-author>\n```\n\n#### Narrow-Container Responsive Behavior\n\n`<mds-author>` uses a CSS container query: inside a container narrower than 200px the avatar stacks above the info and both center automatically. No extra markup is needed - size the parent container to trigger it.\n\n```html\n<!-- In a sidebar widget constrained to ~160px wide, the layout collapses automatically -->\n<aside style=\"width: 160px;\">\n  <mds-author>\n    <mds-avatar slot=\"avatar\" initials=\"gv\"></mds-avatar>\n    <mds-text typography=\"label\">Giulia Verdi</mds-text>\n    <mds-text typography=\"caption\">Moderatrice</mds-text>\n  </mds-author>\n</aside>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-author>`. 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 Put Plain Text Directly in the Default Slot\n\nThe default slot is a grid container designed for structured elements like `mds-text`. Bare text nodes render without typography tokens, scale inconsistently, and cannot be truncated reliably.\n\n```html\n<!-- INCORRECT -->\n<mds-author>\n  <mds-avatar slot=\"avatar\" initials=\"lr\"></mds-avatar>\n  Luca Rossi\n  Redattore\n</mds-author>\n\n<!-- CORRECT -->\n<mds-author>\n  <mds-avatar slot=\"avatar\" initials=\"lr\"></mds-avatar>\n  <mds-text typography=\"h6\">Luca Rossi</mds-text>\n  <mds-text typography=\"caption\">Redattore</mds-text>\n</mds-author>\n```\n\n#### Do Not Place the Avatar in the Default Slot\n\nAssigning an `mds-avatar` without `slot=\"avatar\"` puts it in the text/info region. The component only wires up the two-column layout when a child is assigned to the named `avatar` slot.\n\n```html\n<!-- INCORRECT -->\n<mds-author>\n  <mds-avatar initials=\"ab\"></mds-avatar>\n  <mds-text typography=\"h6\">Anna Bianchi</mds-text>\n</mds-author>\n\n<!-- CORRECT -->\n<mds-author>\n  <mds-avatar slot=\"avatar\" initials=\"ab\"></mds-avatar>\n  <mds-text typography=\"h6\">Anna Bianchi</mds-text>\n</mds-author>\n```\n\n#### Do Not Inline an `<img>` Instead of `mds-avatar`\n\nUsing a raw `<img>` in the avatar slot skips the image-load error handling (a person glyph replaces a broken image), the loading placeholder, and the consistent sizing that `mds-avatar` provides.\n\n```html\n<!-- INCORRECT -->\n<mds-author>\n  <img slot=\"avatar\" src=\"/assets/foto.jpg\" alt=\"Foto autore\" />\n  <mds-text typography=\"h6\">Paolo Neri</mds-text>\n</mds-author>\n\n<!-- CORRECT -->\n<mds-author>\n  <mds-avatar slot=\"avatar\" src=\"/assets/foto.jpg\" initials=\"pn\"></mds-avatar>\n  <mds-text typography=\"h6\">Paolo Neri</mds-text>\n</mds-author>\n```\n\n#### Do Not Force Layout via Inline Styles\n\n`<mds-author>` manages its own flex and container-query layout. Overriding `display`, `flex-direction`, or `align-items` on the host breaks the responsive collapse at narrow widths.\n\n```html\n<!-- INCORRECT -->\n<mds-author style=\"flex-direction: column; align-items: flex-start;\">\n  <mds-avatar slot=\"avatar\" initials=\"sv\"></mds-avatar>\n  <mds-text typography=\"h6\">Sara Vitale</mds-text>\n</mds-author>\n\n<!-- CORRECT -->\n<!-- Constrain the parent container width to let the built-in container query handle the collapse -->\n<div style=\"width: 160px;\">\n  <mds-author>\n    <mds-avatar slot=\"avatar\" initials=\"sv\"></mds-avatar>\n    <mds-text typography=\"h6\">Sara Vitale</mds-text>\n  </mds-author>\n</div>\n```\n\n#### Do Not Use `<mds-author>` as a Generic Flex Row\n\n`<mds-author>` is specifically designed for author bylines. For other avatar-plus-text combinations (entity cards, mention chips, user list rows) use [`mds-entity`](../mds-entity/AGENTS.md) or [`mds-mention`](../mds-mention/AGENTS.md) instead.\n\n```html\n<!-- INCORRECT - using mds-author to display a product or file entry -->\n<mds-author>\n  <mds-avatar slot=\"avatar\" icon=\"mi/baseline/folder\"></mds-avatar>\n  <mds-text typography=\"h6\">Documento strategico.pdf</mds-text>\n  <mds-text typography=\"caption\">1.2 MB</mds-text>\n</mds-author>\n\n<!-- CORRECT -->\n<mds-entity icon=\"mi/baseline/folder\">\n  <mds-text typography=\"h6\">Documento strategico.pdf</mds-text>\n  <mds-text slot=\"detail\" typography=\"caption\">1.2 MB</mds-text>\n</mds-entity>\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot. Insert author information, name, role or other useful author infos."
        },
        {
          "name": "avatar",
          "docs": "Insert an avatar image, it is **recommended** to add `mds-avatar` element."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-author--docs"
    },
    {
      "filePath": "src/components/mds-avatar/mds-avatar.tsx",
      "encapsulation": "shadow",
      "tag": "mds-avatar",
      "readme": "# mds-avatar\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "icon - The selected icon of the avatar"
        },
        {
          "name": "part",
          "text": "wrapper - The wrapper which contains media displayed"
        },
        {
          "name": "part",
          "text": "media - The media displayed"
        },
        {
          "name": "category",
          "text": "data"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-avatar>` web component renders a compact, circular representation of a user or entity in the Magma Design System. It resolves a single visual from whichever input is provided - a profile image, textual initials, a numeric overflow count, or an icon - and falls back to a generic person glyph when nothing usable is supplied.\n\n#### Semantic Behavior\n\n- **Content resolution**: Exactly one visual is shown at a time, picked in one order: `count`, then the `src` image, then `initials`, then `icon`, then the generic person fallback. A source hides the ones after it, so `initials` or `icon` next to `src` are the fallbacks of the image.\n- **Deterministic identity color**: When `initials` is set, the component derives the color from its characters, so the same person always maps to the same color and stays distinguishable from others. Any explicit `variant` is ignored in this case; `count` derives no color and keeps the `variant`.\n- **Image load fallback**: If the `src` image fails to load, the avatar shows the next source in the order: `initials`, then `icon`, then the generic person fallback icon. A new `src` is tried again.\n- **Auto-fitting initials**: Initials and count text scale to fit the avatar, so they stay legible across every size.\n- **Initials display**: The first two characters of `initials` are displayed as they are, uppercased, so pass the initials (`MR`), not the full name. Non-alphanumeric characters are stripped only to compute the color.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` / `tone` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md). Note that `tone` is limited to the minimal set (`'strong'` / `'weak'`), and any explicit `variant` is ignored whenever `initials` is present, since identity color takes precedence.\n\n#### Other behavioral props\n\n- **`src`** is the path to a profile image; prefer it when a real photo is available. Only `count` hides it; `initials` and `icon` set as well show when the image fails to load.\n- **`initials`** carries the textual stand-in for a user when no image exists; it drives the deterministic identity color.\n- **`count`** renders a `+N` overflow badge and is intended for stacked/grouped avatar scenarios rather than individual users.\n- **`icon`** is an SVG filename slug from the Magma icon library, used when the avatar represents a non-personal entity rather than a human.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-avatar>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Profile Image via `src`\n\nThe most common form: supply a URL and the component loads the image lazily. If the image fails to load the component falls back to `initials` (or `icon`) when set, else to the generic person glyph - no extra wiring needed.\n\n```html\n<!-- the initials show if the photo fails to load -->\n<mds-avatar src=\"https://example.com/foto-utente.jpg\" initials=\"MR\"></mds-avatar>\n```\n\n```html\n<mds-avatar src=\"https://example.com/foto-utente.jpg\"></mds-avatar>\n```\n\n#### Initials Fallback\n\nWhen no photo is available, provide the user's initials. The component displays the first two characters, uppercased, so pass the initials rather than the full name. It also derives a deterministic color from the characters (ignoring non-alphanumeric ones) so the same person always maps to the same hue.\n\n```html\n<mds-avatar initials=\"MR\"></mds-avatar>\n<!-- displayed as \"MR\" with a stable identity color -->\n\n<mds-avatar initials=\"ab\"></mds-avatar>\n<!-- displayed as \"AB\" -->\n```\n\n#### Manual Variant and Tone (no initials)\n\nWhen `initials` is not set, you can control the avatar background and icon color through `variant` and `tone`. Use this for non-personal entity avatars where identity color is not required.\n\n```html\n<!-- Primary brand color, filled -->\n<mds-avatar variant=\"primary\" tone=\"strong\" icon=\"mi/baseline/support-agent\"></mds-avatar>\n\n<!-- Success semantic, weak tint -->\n<mds-avatar variant=\"success\" tone=\"weak\"></mds-avatar>\n```\n\n#### Icon Avatar for Non-Personal Entities\n\nUse `icon` when the avatar represents a system, service, or non-human entity. Reference icons by their slug (no `.svg` extension). The generic person fallback is replaced by the provided icon.\n\n```html\n<mds-avatar icon=\"mi/baseline/business\" variant=\"primary\"></mds-avatar>\n<mds-avatar icon=\"mi/baseline/pets\" variant=\"info\"></mds-avatar>\n```\n\n#### Overflow Count in Stacked Groups\n\nUse `count` to render a \"+N\" overflow badge for the last slot in an avatar stack (e.g. \"3 more\"). The count display overrides every other source (`src`, `initials`, `icon`) and, unlike `initials`, derives no color: it keeps the `variant`. Use inside [`mds-avatar-stack`](../mds-avatar-stack/AGENTS.md) and [`mds-avatar-stack-item`](../mds-avatar-stack-item/AGENTS.md).\n\n```html\n<mds-avatar-stack>\n  <mds-avatar-stack-item src=\"https://example.com/foto-01.jpg\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item src=\"https://example.com/foto-02.jpg\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item count=\"3\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Sizing via Utility Classes\n\n`<mds-avatar>` does not expose a `size` prop - its size is controlled by the host element's `width` (the component uses `aspect-ratio: 1/1` internally). Apply a Magma spacing utility class on the host.\n\n```html\n<!-- Small avatar -->\n<mds-avatar src=\"https://example.com/foto.jpg\" class=\"w-600\"></mds-avatar>\n\n<!-- Default / medium avatar -->\n<mds-avatar src=\"https://example.com/foto.jpg\" class=\"w-1200\"></mds-avatar>\n\n<!-- Large avatar -->\n<mds-avatar src=\"https://example.com/foto.jpg\" class=\"w-2400\"></mds-avatar>\n```\n\n#### Styling Customization\n\nStyle the avatar only through its public `--mds-avatar-*` CSS custom properties. Use semantic color roles wrapped in `rgb(var(--magma-<role>))` so dark mode and high-contrast modes work correctly.\n\n```css\n.profilo-utente mds-avatar {\n  --mds-avatar-background-color: rgb(var(--magma-accent-emphasis));\n  --mds-avatar-color: rgb(var(--magma-accent-on-emphasis));\n  --mds-avatar-radius: var(--magma-radius-md);\n\n  corner-shape: var(--magma-corner-shape);\n}\n```\n\n#### Square Avatar via `--mds-avatar-radius`\n\nThe default shape is fully circular. Override the CSS custom property to get a square or rounded-square avatar - for example when representing a product or brand logo rather than a person.\n\nThe circle stays out of the corner axis, so the host declares no corner shape. A step of the `--magma-radius-*` scale is tuned for the shape of the axis: give the host `corner-shape: var(--magma-corner-shape)` with it, and the inner image and initials follow.\n\n```css\n.logo-azienda mds-avatar {\n  --mds-avatar-radius: var(--magma-radius-md);\n\n  corner-shape: var(--magma-corner-shape);\n}\n```\n\n```html\n<mds-avatar\n  class=\"logo-azienda w-1600\"\n  src=\"https://example.com/logo-azienda.png\"\n></mds-avatar>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-avatar>`. 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 Set `variant` When `initials` Is Present\n\nThe component derives the background color deterministically from the characters when `initials` is set, and silently overrides any explicit `variant`. Setting `variant` alongside these props is a no-op and misleads readers of the markup.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar initials=\"MR\" variant=\"error\"></mds-avatar>\n\n<!-- CORRECT -->\n<mds-avatar initials=\"MR\"></mds-avatar>\n```\n\n#### Do Not Use `count` for Individual Users\n\n`count` is designed for overflow badges in stacked avatar groups (\"+3 more\"). Using it to represent a single user's identity (e.g. an ID number) produces a \"+N\" label, which is semantically wrong. Use `initials` for individual users.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar count=\"42\"></mds-avatar>\n\n<!-- CORRECT - use initials for individual users -->\n<mds-avatar initials=\"GV\"></mds-avatar>\n```\n\n#### Do Not Override Size with Inline `width` / `height` Styles\n\n`<mds-avatar>` keeps a 1:1 aspect ratio internally. Forcing `width` or `height` via inline styles or arbitrary CSS bypasses the design token grid and can distort the shape. Use a Magma spacing utility class on the host element instead.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar src=\"https://example.com/foto.jpg\" style=\"width: 73px; height: 73px;\"></mds-avatar>\n\n<!-- CORRECT -->\n<mds-avatar src=\"https://example.com/foto.jpg\" class=\"w-1600\"></mds-avatar>\n```\n\n#### Do Not Slot `<img>` to Supply a Profile Photo\n\n`<mds-avatar>` has no slots - it is a self-contained shadow component. Putting a raw `<img>` inside it will have no effect; the component will ignore it and show the fallback person glyph. Use the `src` prop instead.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar>\n  <img src=\"https://example.com/foto.jpg\" alt=\"Mario Bianchi\" />\n</mds-avatar>\n\n<!-- CORRECT -->\n<mds-avatar src=\"https://example.com/foto.jpg\"></mds-avatar>\n```\n\n#### Do Not Pierce Shadow DOM to Change Internal Colors\n\nThe supported customization surface is the three public `--mds-avatar-*` CSS custom properties and, for a deep customisation, the documented parts `wrapper`, `media` and `icon`. Using undocumented part names, `>>>`, or internal class names to target internals couples your code to the Shadow DOM implementation and breaks on minor releases.\n\n```css\n/* INCORRECT */\nmds-avatar::part(initials) {\n  background-color: hotpink;\n}\nmds-avatar >>> .initials-text {\n  color: white;\n}\n\n/* CORRECT */\nmds-avatar {\n  --mds-avatar-background-color: rgb(var(--magma-accent-emphasis));\n  --mds-avatar-color: rgb(var(--magma-accent-on-emphasis));\n}\n```\n\n#### Do Not Use a Raw `<img>` or `<div>` as an Avatar\n\nWhen an avatar-style UI element is needed, reach for `<mds-avatar>` rather than hand-rolling a circular `<img>` or `<div>` with CSS. The component handles lazy loading, load errors, initials fallback, pending state, dark mode, and high-contrast mode automatically.\n\n```html\n<!-- INCORRECT -->\n<img\n  src=\"https://example.com/foto.jpg\"\n  alt=\"Foto di Luca\"\n  style=\"border-radius: 50%; width: 48px; height: 48px;\"\n/>\n\n<!-- CORRECT -->\n<mds-avatar src=\"https://example.com/foto.jpg\" class=\"w-1200\"></mds-avatar>\n```\n"
      },
      "props": [
        {
          "name": "count",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "count",
          "reflectToAttr": true,
          "docs": "The user's inizials displayed if there's no image available, initials will override tone and variant senttings to keep user recognizable from others",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string | undefined",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "Specifies the path to the icon",
          "docsTags": [
            {
              "name": "see",
              "text": "https://magma.maggiolicloud.it/storybook/?path=/story/design-icon--default"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "initials",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "initials",
          "reflectToAttr": true,
          "docs": "The user's inizials displayed if there's no image available, initials will override tone and variant senttings to keep user recognizable from others",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "src",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "src",
          "reflectToAttr": true,
          "docs": "Specifies the path to the image",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"strong\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneMinimalVariantType",
            "resolved": "\"strong\" | \"weak\" | undefined",
            "references": {
              "ToneMinimalVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneMinimalVariantType",
                "referenceLocation": "ToneMinimalVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Specifies the color tone of the component",
          "docsTags": [],
          "values": [
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
          "complexType": {
            "original": "ThemeFullVariantAvatarType",
            "resolved": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
            "references": {
              "ThemeFullVariantAvatarType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeFullVariantAvatarType",
                "referenceLocation": "ThemeFullVariantAvatarType"
              }
            }
          },
          "mutable": true,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the color variant of the component",
          "docsTags": [],
          "values": [
            {
              "value": "amaranth",
              "type": "string"
            },
            {
              "value": "aqua",
              "type": "string"
            },
            {
              "value": "blue",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "green",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "lime",
              "type": "string"
            },
            {
              "value": "orange",
              "type": "string"
            },
            {
              "value": "orchid",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "purple",
              "type": "string"
            },
            {
              "value": "red",
              "type": "string"
            },
            {
              "value": "sky",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "violet",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "value": "yellow",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-avatar-background-color",
          "annotation": "prop",
          "docs": "The background-color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-avatar-background-color-pending",
          "annotation": "prop",
          "docs": "The background-color when an image is loading",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-color",
          "annotation": "prop",
          "docs": "The color of the placeholder icon",
          "visibility": "public"
        },
        {
          "name": "--mds-avatar-initials-padding",
          "annotation": "prop",
          "docs": "Sets the padding of the initials inside the avatar",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-radius",
          "annotation": "prop",
          "docs": "The border-radius of the element",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "icon",
          "docs": "The selected icon of the avatar"
        },
        {
          "name": "media",
          "docs": "The media displayed"
        },
        {
          "name": "wrapper",
          "docs": "The wrapper which contains media displayed"
        }
      ],
      "states": [],
      "dependents": [
        "mds-avatar-stack-item",
        "mds-entity",
        "mds-push-notification-item"
      ],
      "dependencies": [
        "mds-img",
        "mds-icon"
      ],
      "dependencyGraph": {
        "mds-avatar": [
          "mds-img",
          "mds-icon"
        ],
        "mds-img": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-avatar-stack-item": [
          "mds-avatar"
        ],
        "mds-entity": [
          "mds-avatar"
        ],
        "mds-push-notification-item": [
          "mds-avatar"
        ]
      },
      "storybook": "ui-avatar--docs"
    },
    {
      "filePath": "src/components/mds-avatar-stack/mds-avatar-stack.tsx",
      "encapsulation": "shadow",
      "tag": "mds-avatar-stack",
      "readme": "# mds-avatar-stack\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `mds-avatar-stack-item` elements to display in the stack."
        },
        {
          "name": "category",
          "text": "data"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-avatar-stack>` web component groups a set of overlapping `<mds-avatar-stack-item>` children into a single horizontal cluster, the Magma Design System pattern for showing the people associated with an entity (assignees, participants, collaborators) in a compact, space-saving row.\n\n#### Semantic Behavior\n\n- **Compound parent**: It is the container half of a compound component; its visible content is the default slot of `<mds-avatar-stack-item>` children, each of which wraps an `<mds-avatar>`.\n- **Size propagation**: `size` drives the dimensions, border, and horizontal overlap of every slotted item, so the whole stack stays visually consistent without sizing each avatar individually.\n- **Overflow counter**: When `total` is set and exceeds the number of slotted children, the stack appends one extra item rendering the remainder (e.g. \"+3\"), so it can represent a larger group than it physically shows.\n- **Live composition**: Children are counted again whenever they change: the overflow indicator follows both `total` and the items added or removed after load.\n\n#### Properties & Visual Configurations\n\n- **`size`** selects the avatar scale (`'sm'`, `'md'`, `'lg'`) for the entire stack; pick it to match the surrounding density, since it governs not just avatar diameter but also the overlap offset and ring border between stacked avatars.\n- **`total`** is the logical headcount of the represented group. Set it higher than the number of slotted avatars to surface a trailing count item for the hidden members; leave it unset (or equal to the child count) to show only the avatars in the markup with no counter.\n\nThis component does not use the shared `variant` / `tone` ladders; per-avatar appearance (tone, variant, initials, image source) is configured on each `<mds-avatar-stack-item>` instead.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-avatar-stack>` 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 Avatar Stack\n\nThe canonical form. Slot one [`<mds-avatar-stack-item>`](../mds-avatar-stack-item/AGENTS.md) per person directly inside the stack. Each item wraps an internal avatar; no extra wrapper elements are needed.\n\n```html\n<mds-avatar-stack>\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"er\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Avatar Stack with Profile Images\n\nUse `src` on each item when real user photos are available. If the image fails to load, the avatar shows the generic person glyph; while `src` is set, `initials` is not displayed.\n\n```html\n<mds-avatar-stack>\n  <mds-avatar-stack-item\n    src=\"/avatars/mario-rossi.jpg\"\n    initials=\"mr\"\n    tone=\"weak\"\n  ></mds-avatar-stack-item>\n  <mds-avatar-stack-item\n    src=\"/avatars/anna-conti.jpg\"\n    initials=\"ac\"\n    tone=\"weak\"\n  ></mds-avatar-stack-item>\n  <mds-avatar-stack-item\n    src=\"/avatars/elena-ricci.jpg\"\n    initials=\"er\"\n    tone=\"weak\"\n  ></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Sizing the Stack\n\nUse the `size` prop on the parent to scale the whole stack at once. Do not set individual sizes on the items - the parent drives dimensions, overlap, and border for all children.\n\n```html\n<!-- Small - compact lists, comment threads -->\n<mds-avatar-stack size=\"sm\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n\n<!-- Medium (default) -->\n<mds-avatar-stack size=\"md\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n\n<!-- Large - hero areas, team pages -->\n<mds-avatar-stack size=\"lg\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Overflow Counter via `total`\n\nWhen the represented group is larger than the number of visible avatars, set `total` to the real headcount. The component automatically appends a trailing \"+N\" badge for the hidden members.\n\n```html\n<!-- 5 visible avatars out of a team of 12: shows \"+7\" badge -->\n<mds-avatar-stack total=\"12\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"er\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"mt\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"jb\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Per-Item Variant Colors\n\nEach [`<mds-avatar-stack-item>`](../mds-avatar-stack-item/AGENTS.md) accepts its own `variant`, which colors the avatar when it has no `initials`: initials derive their own color and override it. `tone` accepts `strong` or `weak` (default).\n\n```html\n<mds-avatar-stack>\n  <mds-avatar-stack-item variant=\"primary\" tone=\"strong\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item variant=\"success\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item variant=\"warning\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item variant=\"info\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Size and Overflow Combined\n\nCombine `size` and `total` to produce a large, labelled stack for team-overview sections.\n\n```html\n<mds-avatar-stack size=\"lg\" total=\"25\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"er\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"mt\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Styling Customization\n\nStyle the stack only through its public `--mds-avatar-stack-*` CSS custom properties. Set them on the host or a parent selector; use semantic color roles via `rgb(var(--magma-<role>))` so dark mode keeps working.\n\n```css\n/* Custom ring color for a card-hero section */\n.team-hero mds-avatar-stack {\n  --mds-avatar-stack-background: rgb(var(--magma-accent-emphasis));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-avatar-stack>`. 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 Place `<mds-avatar-stack-item>` Inside a Wrapper Element\n\nThe parent counts only its **direct** `mds-avatar-stack-item` children. An intermediate wrapper breaks that count, so the overflow counter is wrong, and the parent's `size` (applied with `::slotted`) does not reach the wrapped items.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar-stack total=\"10\">\n  <div class=\"group\">\n    <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n    <mds-avatar-stack-item initials=\"ac\"></mds-avatar-stack-item>\n  </div>\n</mds-avatar-stack>\n\n<!-- CORRECT -->\n<mds-avatar-stack total=\"10\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Do Not Slot a Raw `<mds-avatar>` Directly\n\n[`<mds-avatar-stack-item>`](../mds-avatar-stack-item/AGENTS.md) is the correct child for this compound component - it handles sizing, border, overlap offset, and count badge rendering. Slotting a bare `<mds-avatar>` skips all of that wiring.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar-stack>\n  <mds-avatar initials=\"mr\"></mds-avatar>\n  <mds-avatar initials=\"ac\"></mds-avatar>\n</mds-avatar-stack>\n\n<!-- CORRECT -->\n<mds-avatar-stack>\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Do Not Set `total` Lower Than or Equal to the Child Count\n\nWhen `total` does not exceed the number of slotted items, no overflow badge is rendered. Setting `total` lower than the child count is also misleading about group size and produces no visible effect.\n\n```html\n<!-- INCORRECT - total equals child count, badge never appears -->\n<mds-avatar-stack total=\"3\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"er\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n\n<!-- CORRECT - total exceeds slotted count by the hidden members -->\n<mds-avatar-stack total=\"10\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"er\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Do Not Add `count` Manually When `total` Is Set\n\n`count` on `<mds-avatar-stack-item>` is reserved for the auto-generated overflow badge; the parent computes and appends it when `total` is provided. Adding a `count` item by hand alongside `total` results in a duplicate badge.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar-stack total=\"10\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item count=\"8\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n\n<!-- CORRECT - let the parent handle the badge -->\n<mds-avatar-stack total=\"10\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Do Not Size Individual Items - Size the Parent\n\n[`<mds-avatar-stack-item>`](../mds-avatar-stack-item/AGENTS.md) exposes no `size` prop; dimensions are driven by the parent's `size`. Overriding size with inline CSS on individual items breaks the uniform overlap geometry the component calculates.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar-stack>\n  <mds-avatar-stack-item initials=\"mr\" style=\"width: 48px; height: 48px;\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" style=\"width: 48px; height: 48px;\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n\n<!-- CORRECT -->\n<mds-avatar-stack size=\"lg\">\n  <mds-avatar-stack-item initials=\"mr\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\" tone=\"weak\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Customize via Documented Vars, Not Internal Selectors\n\nThe supported customization surface is the public `--mds-avatar-stack-*` CSS custom properties on the parent. Targeting shadow internals via `>>>` or undocumented `::part()` names couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-avatar-stack >>> .avatar {\n  border-color: blue;\n}\n\n/* CORRECT */\nmds-avatar-stack {\n  --mds-avatar-stack-background: rgb(var(--magma-accent-emphasis));\n}\n```\n"
      },
      "props": [
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "AvatarSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | undefined",
            "references": {
              "AvatarSizeType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-avatar-stack/meta/types.ts::AvatarSizeType",
                "referenceLocation": "AvatarSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the size of the slotted avatars elements",
          "docsTags": [],
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "total",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "total",
          "reflectToAttr": true,
          "docs": "Specifies the size of the slotted avatars elements",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-avatar-stack-background",
          "annotation": "prop",
          "docs": "Background color for the avatar stack container",
          "visibility": "public"
        },
        {
          "name": "--mds-avatar-stack-count-background-color",
          "annotation": "prop",
          "docs": "Background color of the count indicator (e.g., \"+3\")",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-count-color",
          "annotation": "prop",
          "docs": "Text color of the count indicator",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-lg-border",
          "annotation": "prop",
          "docs": "Border width for large avatar stack items",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-lg-offset",
          "annotation": "prop",
          "docs": "Horizontal overlap offset for large avatars",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-lg-size",
          "annotation": "prop",
          "docs": "Size of large avatars in the stack",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-md-border",
          "annotation": "prop",
          "docs": "Border width for medium avatar stack items",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-md-offset",
          "annotation": "prop",
          "docs": "Horizontal overlap offset for medium avatars",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-md-size",
          "annotation": "prop",
          "docs": "Size of medium avatars in the stack",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-sm-border",
          "annotation": "prop",
          "docs": "Border width for small avatar stack items",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-sm-offset",
          "annotation": "prop",
          "docs": "Horizontal overlap offset for small avatars",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-sm-size",
          "annotation": "prop",
          "docs": "Size of small avatars in the stack",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-avatar-stack-item` elements to display in the stack."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-avatar-stack-item"
      ],
      "dependencyGraph": {
        "mds-avatar-stack": [
          "mds-avatar-stack-item"
        ],
        "mds-avatar-stack-item": [
          "mds-avatar"
        ],
        "mds-avatar": [
          "mds-img",
          "mds-icon"
        ],
        "mds-img": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-avatar-stack--docs"
    },
    {
      "filePath": "src/components/mds-avatar-stack-item/mds-avatar-stack-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-avatar-stack-item",
      "readme": "# mds-avatar-stack-item\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "parent",
          "text": "mds-avatar-stack"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-avatar-stack-item>` web component is a compound child that represents a single avatar inside an [`<mds-avatar-stack>`](../mds-avatar-stack/AGENTS.md), wrapping an internal `<mds-avatar>` so individual avatars can be overlapped, sized, and counted as a group rather than rendered standalone.\n\n#### Semantic Behavior\n\n- **Compound child only**: It must be a direct slot child of `<mds-avatar-stack>`. It is not meant to be used standalone or mixed with other child types in the stack.\n- **Parent-driven sizing**: The visual size of each item is governed by the parent's `size` (`sm` / `md` / `lg`) - the child exposes no `size` prop of its own.\n- **Overflow / count badge**: When `count` is set, the item renders as a numeric badge instead of a person. The parent uses this for the trailing \"+N\" indicator, computed from its `total`.\n- **Pass-through to mds-avatar**: It forwards `count`, `initials`, `src`, `tone`, and `variant` straight to its internal `<mds-avatar>`; it adds no events, state, focus, or ARIA of its own.\n- **Initials override color**: When `initials` are shown (no image available), they take precedence over `tone` and `variant` so each user stays visually distinguishable within the stack.\n\n#### Properties & Visual Configurations\n\nThe shared `tone` / `variant` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md); `tone` accepts only the minimal set (`weak` default, `strong`) and `variant` accepts the avatar color set.\n\n- **`src`**: Use for the primary case - a real user photo. When absent the avatar falls back to `initials`, and only when neither is provided do `tone` / `variant` define the placeholder appearance.\n- **`initials`**: Provide a short identifier when no image exists; prefer it over relying on color alone, since it both labels and visually separates users in a dense stack.\n- **`count`**: Set only to render an explicit overflow badge manually. In most cases this is computed for you by the parent's `total`, so set it directly only when building the overflow indicator yourself.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-avatar-stack-item>` 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 Stack with Initials\n\nThe most common form: place one item per participant inside [`mds-avatar-stack`](../mds-avatar-stack/AGENTS.md). Use `initials` for users without a photo; the stack applies uniform sizing and overlap automatically.\n\n```html\n<mds-avatar-stack>\n  <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"er\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Stack with Photos\n\nUse `src` when a real user photo is available. While `src` is set, `initials` is not displayed: an image that cannot be loaded is replaced by the generic person glyph. Items without `src` show their `initials`, and the tone/variant placeholder when neither is provided.\n\n```html\n<mds-avatar-stack>\n  <mds-avatar-stack-item src=\"/avatars/mario-rossi.jpg\" initials=\"mr\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item src=\"/avatars/anna-conti.jpg\" initials=\"ac\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"er\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Tone and Variant for Placeholder Color\n\nWhen no image or initials are provided, `tone` and `variant` determine the placeholder background. Use distinct variant values to keep users visually distinguishable. `tone` defaults to `weak`; use `strong` for higher contrast.\n\n```html\n<mds-avatar-stack>\n  <mds-avatar-stack-item variant=\"blue\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item variant=\"green\" tone=\"weak\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item variant=\"orchid\" tone=\"strong\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Overflow Counter via Parent `total`\n\nSet `total` on the parent to let it append the overflow badge automatically. The badge value is `total` minus the number of slotted items - do not set `count` on the items yourself for this use case.\n\n```html\n<mds-avatar-stack total=\"12\">\n  <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"er\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Manual Overflow Badge via `count`\n\nUse `count` directly on a trailing item only when you are building the overflow indicator yourself and the parent does not own the total. This is rarely needed outside of fully custom stacks.\n\n```html\n<mds-avatar-stack>\n  <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item count=\"8\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Size Controlled by the Parent\n\nSize is not set per item - it is set once on the parent with `size` (`sm`, `md`, `lg`). All items in the stack scale together.\n\n```html\n<!-- Small stack: dense lists, table cells -->\n<mds-avatar-stack size=\"sm\">\n  <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n\n<!-- Large stack: profile overviews, hero sections -->\n<mds-avatar-stack size=\"lg\">\n  <mds-avatar-stack-item initials=\"er\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"mt\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Styling Customization\n\nStyle individual items through their public `--mds-avatar-stack-item-*` CSS custom properties, or control the whole stack at once via the parent's public `--mds-avatar-stack-background` (the item ring color inherits from it). Use semantic color roles with `rgb(var(--magma-<role>))` so dark mode keeps working.\n\n```css\n/* Override the separator ring color for the whole stack */\n.collab-panel mds-avatar-stack {\n  --mds-avatar-stack-background: rgb(var(--magma-surface-raised));\n}\n\n/* Override the separator ring color of a single item */\n.collab-panel mds-avatar-stack-item.highlight {\n  --mds-avatar-stack-item-background: rgb(var(--magma-accent-emphasis));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-avatar-stack-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 Outside `mds-avatar-stack`\n\n`<mds-avatar-stack-item>` is a compound child and relies on its parent for sizing, overlap and the overflow counter. Used standalone, it falls back to the medium size, with no stack container and no `size` / `total` control.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n\n<!-- CORRECT -->\n<mds-avatar-stack>\n  <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Do Not Set `size` on the Item\n\nThe child has no `size` prop; setting it as an attribute has no effect. Control the scale of every item in the stack with the `size` prop on the parent.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar-stack>\n  <mds-avatar-stack-item initials=\"mr\" size=\"lg\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n\n<!-- CORRECT -->\n<mds-avatar-stack size=\"lg\">\n  <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Do Not Duplicate `count` When Using `total`\n\nWhen `total` is set on the parent it auto-appends the overflow item. Adding a manual `count` item on top produces a double overflow indicator.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar-stack total=\"12\">\n  <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item count=\"10\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n\n<!-- CORRECT - let the parent compute and render the overflow badge -->\n<mds-avatar-stack total=\"12\">\n  <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Do Not Wrap Items in a Div\n\nThe parent counts only its direct `mds-avatar-stack-item` children to compute the overflow. Wrapping items in a `<div>` or any other element breaks that count, and the parent's `size` (applied with `::slotted`) no longer reaches the items.\n\n```html\n<!-- INCORRECT -->\n<mds-avatar-stack total=\"5\">\n  <div>\n    <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n    <mds-avatar-stack-item initials=\"ac\"></mds-avatar-stack-item>\n  </div>\n</mds-avatar-stack>\n\n<!-- CORRECT - items must be direct slot children -->\n<mds-avatar-stack total=\"5\">\n  <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Do Not Use `tone` and `variant` as the Only Differentiator\n\n`tone` and `variant` style the placeholder background but are overridden by `initials` and ignored when `src` is present. Relying on color alone to identify users is not accessible. Always provide `initials` or `src`.\n\n```html\n<!-- INCORRECT - color-only identity, no label for screen readers -->\n<mds-avatar-stack>\n  <mds-avatar-stack-item variant=\"blue\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item variant=\"green\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n\n<!-- CORRECT - initials provide a visible and screen-reader-friendly label -->\n<mds-avatar-stack>\n  <mds-avatar-stack-item initials=\"mr\"></mds-avatar-stack-item>\n  <mds-avatar-stack-item initials=\"ac\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n\n#### Do Not Use an Invalid `tone` Value\n\n`tone` on this component accepts only `weak` (default) and `strong` - the `ToneMinimalVariantType` set. Values like `outline` or `text`, valid on other components, match no style here: the avatar renders as with `strong`, not with the `weak` default.\n\n```html\n<!-- INCORRECT (tone=\"outline\" is not in ToneMinimalVariantType) -->\n<mds-avatar-stack>\n  <mds-avatar-stack-item initials=\"mr\" tone=\"outline\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n\n<!-- CORRECT -->\n<mds-avatar-stack>\n  <mds-avatar-stack-item initials=\"mr\" tone=\"strong\"></mds-avatar-stack-item>\n</mds-avatar-stack>\n```\n"
      },
      "props": [
        {
          "name": "count",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "count",
          "reflectToAttr": true,
          "docs": "Specifies number of total avatars, the total number will be subtracted by the slotted ones",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "initials",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "initials",
          "reflectToAttr": true,
          "docs": "The user's inizials displayed if there's no image available, initials will override tone and variant senttings to keep user recognizable from others",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "src",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "src",
          "reflectToAttr": true,
          "docs": "Specifies the path to the image",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"strong\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneMinimalVariantType",
            "resolved": "\"strong\" | \"weak\" | undefined",
            "references": {
              "ToneMinimalVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneMinimalVariantType",
                "referenceLocation": "ToneMinimalVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Specifies the color tone of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'weak'"
            }
          ],
          "default": "'weak'",
          "values": [
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
          "complexType": {
            "original": "ThemeFullVariantAvatarType",
            "resolved": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
            "references": {
              "ThemeFullVariantAvatarType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeFullVariantAvatarType",
                "referenceLocation": "ThemeFullVariantAvatarType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the color variant of the component",
          "docsTags": [],
          "values": [
            {
              "value": "amaranth",
              "type": "string"
            },
            {
              "value": "aqua",
              "type": "string"
            },
            {
              "value": "blue",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "green",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "lime",
              "type": "string"
            },
            {
              "value": "orange",
              "type": "string"
            },
            {
              "value": "orchid",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "purple",
              "type": "string"
            },
            {
              "value": "red",
              "type": "string"
            },
            {
              "value": "sky",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "violet",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "value": "yellow",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-avatar-stack-item-background",
          "annotation": "prop",
          "docs": "The background color of each avatar in the stack",
          "visibility": "public"
        },
        {
          "name": "--mds-avatar-stack-item-border",
          "annotation": "prop",
          "docs": "Computed active border (based on selected size)",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-item-count-background-color",
          "annotation": "prop",
          "docs": "Background color of the count badge in the stack",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-item-count-color",
          "annotation": "prop",
          "docs": "Text color for the count badge in the stack",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-item-offset",
          "annotation": "prop",
          "docs": "Computed active offset (based on selected size)",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-item-offset-margin",
          "annotation": "prop",
          "docs": "Computed margin for overlapping avatars",
          "visibility": "internal"
        },
        {
          "name": "--mds-avatar-stack-item-size",
          "annotation": "prop",
          "docs": "Computed active size (based on selected size)",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-avatar-stack"
      ],
      "dependencies": [
        "mds-avatar"
      ],
      "dependencyGraph": {
        "mds-avatar-stack-item": [
          "mds-avatar"
        ],
        "mds-avatar": [
          "mds-img",
          "mds-icon"
        ],
        "mds-img": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-avatar-stack": [
          "mds-avatar-stack-item"
        ]
      },
      "storybook": "ui-avatar-stack-item--docs"
    },
    {
      "filePath": "src/components/mds-badge/mds-badge.tsx",
      "encapsulation": "shadow",
      "tag": "mds-badge",
      "readme": "# mds-badge\n\n\n\nThis 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.\n",
      "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": "- **Deprecated**, use the `label` property instead. Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        },
        {
          "name": "category",
          "text": "tags"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-badge>` web component is the Magma Design System's compact status and label indicator, used to attach a short categorical signal (count, state, tag) to other content. It is purely presentational and has no HTML primitive equivalent.\n\n#### Semantic Behavior\n\n- **Text-only content**: The badge is meant to carry a short text string, not markup; the `label` prop is the supported source of that text.\n- **Deprecated default slot**: Slotted text is still read as a legacy fallback, but only when `label` is empty - once `label` is set it always wins. HTML elements or components in the slot are unsupported.\n- **No interactivity**: The component emits no events, has no form association, no focus management, and no disabled/active state - it is a static visual marker.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` / `tone` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md); `<mds-badge>` consumes them directly and does not add any component-specific values. The default appearance is `variant=\"green\"` with `tone=\"weak\"`.\n\n- **`tone`** selects the chrome treatment: `'weak'` for a subtle tinted fill (the default, best for dense lists and tables), `'strong'` for a saturated high-emphasis fill, and `'outline'` for a bordered, transparent-fill badge that reads as the lightest emphasis.\n\n#### Other behavioral props\n\n- **`typography`** chooses the internal text scale - `'option'` (default, the smaller one) or `'label'` - to align the badge's text size with the surrounding context (e.g. inside a denser table cell vs. a standalone label).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-badge>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Badge via `label` Prop\n\nThe canonical form. Use the `label` prop for the badge's text content - it is the preferred source and the slot is deprecated.\n\n```html\n<mds-badge label=\"Attivo\" variant=\"success\" tone=\"weak\"></mds-badge>\n```\n\n#### Variant and Tone for Emphasis\n\nPair the same `variant` with a different `tone` to control visual weight. `tone=\"weak\"` (default) is the lightest fill; `tone=\"strong\"` is a saturated solid; `tone=\"outline\"` adds a visible border with a transparent background.\n\n```html\n<!-- Low emphasis: subtle tinted fill (default) -->\n<mds-badge label=\"Bozza\" variant=\"warning\" tone=\"weak\"></mds-badge>\n\n<!-- High emphasis: solid saturated fill -->\n<mds-badge label=\"Urgente\" variant=\"error\" tone=\"strong\"></mds-badge>\n\n<!-- Minimal emphasis: bordered, no fill -->\n<mds-badge label=\"Archiviato\" variant=\"dark\" tone=\"outline\"></mds-badge>\n```\n\n#### Status Variants\n\nUse status variants (`info`, `success`, `warning`, `error`) to communicate state. Match the variant to the meaning, not to the colour you want.\n\n```html\n<mds-badge label=\"Completato\" variant=\"success\" tone=\"weak\"></mds-badge>\n<mds-badge label=\"In attesa\" variant=\"info\" tone=\"weak\"></mds-badge>\n<mds-badge label=\"Attenzione\" variant=\"warning\" tone=\"weak\"></mds-badge>\n<mds-badge label=\"Errore\" variant=\"error\" tone=\"weak\"></mds-badge>\n```\n\n#### Decorative Label Variants\n\nUse decorative label variants (`green`, `blue`, `violet`, `red`, `orange`, `yellow`, `lime`, `aqua`, `sky`, `orchid`, `purple`, `amaranth`) for categorical tags, topics, or visual grouping that carries no semantic state meaning. The default variant is `green`.\n\n```html\n<mds-badge label=\"Ambiente\" variant=\"green\"></mds-badge>\n<mds-badge label=\"Tecnologia\" variant=\"blue\"></mds-badge>\n<mds-badge label=\"Design\" variant=\"violet\"></mds-badge>\n<mds-badge label=\"Marketing\" variant=\"orange\"></mds-badge>\n```\n\n#### Neutral Variants\n\n`variant=\"dark\"` and `variant=\"light\"` are painted with neutral roles that follow the mode, so neither is tied to a light or dark background. They differ only with `tone=\"strong\"`: `dark` is the inverse chip (dark on a light UI, light on a dark UI), `light` is the paper of the mode (white in light, black in dark). With `weak` and `outline` the two render the same.\n\n```html\n<!-- Inverse chip, flips with the mode -->\n<mds-badge label=\"Categoria\" variant=\"dark\" tone=\"strong\"></mds-badge>\n\n<!-- Paper of the mode -->\n<mds-badge label=\"Categoria\" variant=\"light\" tone=\"strong\"></mds-badge>\n```\n\n#### Typography Scale\n\nThe default `\"option\"` is the smaller scale and suits dense contexts such as table cells; use `typography=\"label\"`, which is larger, when the badge needs more presence.\n\n```html\n<!-- Default, smaller scale - inside tables or tight UI rows -->\n<mds-badge label=\"Nuovo\" variant=\"sky\" typography=\"option\"></mds-badge>\n\n<!-- Larger scale - standalone labels, cards, sidebars -->\n<mds-badge label=\"Nuovo\" variant=\"sky\" typography=\"label\"></mds-badge>\n```\n\n#### Badge Inside a Table Cell\n\n`<mds-badge>` is commonly used as a status indicator inside [`mds-table`](../mds-table/AGENTS.md) cells.\n\n```html\n<mds-table>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>\n        <mds-badge label=\"Approvato\" variant=\"success\" tone=\"weak\"></mds-badge>\n      </mds-table-cell>\n      <mds-table-cell>\n        <mds-badge label=\"In revisione\" variant=\"warning\" tone=\"weak\"></mds-badge>\n      </mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Badge Inside a File Listing\n\n[`mds-file`](../mds-file/AGENTS.md) and [`mds-file-preview`](../mds-file-preview/AGENTS.md) render a badge internally to show the file type; you do not slot a badge into them. When adding a badge alongside file content elsewhere, compose it in the surrounding markup.\n\n```html\n<div class=\"file-meta\">\n  <mds-file filename=\"relazione-2024.pdf\"></mds-file>\n  <mds-badge label=\"Firmato\" variant=\"success\" tone=\"weak\"></mds-badge>\n</div>\n```\n\n#### Styling Customization\n\nStyle the badge only through its public `--mds-badge-*` CSS custom properties. Use Magma color tokens via `rgb(var(--<token>))` so dark mode and high-contrast modes keep working.\n\n```css\n.custom-tag mds-badge {\n  --mds-badge-background: rgb(var(--label-orchid-09));\n  --mds-badge-color: rgb(var(--label-orchid-02));\n}\n```\n\nFor `tone=\"outline\"`, the border is not a public custom property: its color follows the `variant` prop. The outline badge is always transparent, so `--mds-badge-background` has no effect on it:\n\n```html\n<mds-badge label=\"Archiviato\" variant=\"orchid\" tone=\"outline\"></mds-badge>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-badge>`. 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 Put HTML in the Default Slot\n\nThe default slot is deprecated and accepts plain text only; nested elements are stripped or break layout. Use the `label` prop instead.\n\n```html\n<!-- INCORRECT -->\n<mds-badge>\n  <strong>Urgente</strong>\n</mds-badge>\n\n<!-- CORRECT -->\n<mds-badge label=\"Urgente\" variant=\"error\" tone=\"strong\"></mds-badge>\n```\n\n#### Do Not Use the Slot When `label` Is Available\n\nSlotted text still works as a legacy fallback but will be removed in a future release. The `label` prop is the documented API going forward.\n\n```html\n<!-- INCORRECT -->\n<mds-badge>Approvato</mds-badge>\n\n<!-- CORRECT -->\n<mds-badge label=\"Approvato\" variant=\"success\" tone=\"weak\"></mds-badge>\n```\n\n#### Do Not Apply a `tone` Value Outside the Allowed Set\n\n`<mds-badge>` uses `ToneSmartVariantType`, which allows only `strong`, `weak`, and `outline`. Values like `text` or `box` are not accepted: no tone style matches them, so the badge renders as with `strong`, not with the `weak` default.\n\n```html\n<!-- INCORRECT -->\n<mds-badge label=\"Bozza\" variant=\"warning\" tone=\"text\"></mds-badge>\n<mds-badge label=\"Bozza\" variant=\"warning\" tone=\"box\"></mds-badge>\n\n<!-- CORRECT -->\n<mds-badge label=\"Bozza\" variant=\"warning\" tone=\"outline\"></mds-badge>\n```\n\n#### Do Not Use Legacy `ghost` or `quiet` Tone Values\n\n`tone=\"ghost\"` and `tone=\"quiet\"` are Magma 1 names: on `<mds-badge>` Magma 2.0 renamed them to `outline` and `weak` (the codemod applies the rename). Neither old name is valid any more.\n\n```html\n<!-- INCORRECT (Magma 1.x naming) -->\n<mds-badge label=\"Archiviato\" tone=\"ghost\" variant=\"dark\"></mds-badge>\n\n<!-- CORRECT (Magma 2.x) -->\n<mds-badge label=\"Archiviato\" tone=\"outline\" variant=\"dark\"></mds-badge>\n```\n\n#### Do Not Pick a Variant for Its Color Alone\n\n`variant` carries semantic meaning - status variants (`error`, `warning`, `success`, `info`) communicate state; label variants (`green`, `blue`, `violet`, etc.) communicate category. Do not choose a variant just because its color looks right.\n\n```html\n<!-- INCORRECT: using \"error\" to get a red tag for a topic, not an error state -->\n<mds-badge label=\"Ruby\" variant=\"error\" tone=\"weak\"></mds-badge>\n\n<!-- CORRECT: use a decorative label variant for non-state tags -->\n<mds-badge label=\"Ruby\" variant=\"red\" tone=\"weak\"></mds-badge>\n```\n\n#### Do Not Customize via Undocumented Selectors\n\nThe supported customization surface is the public `--mds-badge-*` CSS custom properties. Targeting shadow-DOM internals via `>>>`, `/deep/`, or undocumented `::part()` names couples your code to implementation details that can change on any release.\n\n```css\n/* INCORRECT */\nmds-badge >>> span {\n  font-weight: bold;\n  letter-spacing: 0.1em;\n}\n\n/* CORRECT */\nmds-badge {\n  --mds-badge-background: rgb(var(--label-violet-09));\n  --mds-badge-color: rgb(var(--label-violet-02));\n}\n```\n\n#### Do Not Use `<mds-badge>` for Interactive Controls\n\n`<mds-badge>` is purely presentational - it emits no events and has no focus management. For a selectable or dismissible tag, use [`mds-chip`](../mds-chip/AGENTS.md) instead.\n\n```html\n<!-- INCORRECT: listening to a click on a non-interactive component -->\n<mds-badge label=\"Rimuovi\" variant=\"error\" onclick=\"removeTag()\"></mds-badge>\n\n<!-- CORRECT: use mds-chip for interactive tag behavior -->\n<mds-chip label=\"Rimuovi\" variant=\"error\" deletable></mds-chip>\n```\n"
      },
      "props": [
        {
          "name": "label",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "label",
          "reflectToAttr": true,
          "docs": "The label of the badge",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"outline\" | \"strong\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneSmartVariantType",
            "resolved": "\"outline\" | \"strong\" | \"weak\" | undefined",
            "references": {
              "ToneSmartVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneSmartVariantType",
                "referenceLocation": "ToneSmartVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Sets the tone of the color variant",
          "docsTags": [
            {
              "name": "default",
              "text": "'weak'"
            }
          ],
          "default": "'weak'",
          "values": [
            {
              "value": "outline",
              "type": "string"
            },
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"label\" | \"option\"",
          "complexType": {
            "original": "TypographyLabelType",
            "resolved": "\"label\" | \"option\"",
            "references": {
              "TypographyLabelType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyLabelType",
                "referenceLocation": "TypographyLabelType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": true,
          "docs": "Specifies the typography of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'option'"
            }
          ],
          "default": "'option'",
          "values": [
            {
              "value": "label",
              "type": "string"
            },
            {
              "value": "option",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"amaranth\" | \"aqua\" | \"blue\" | \"dark\" | \"error\" | \"green\" | \"info\" | \"light\" | \"lime\" | \"orange\" | \"orchid\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
          "complexType": {
            "original": "ThemeFullVariantType",
            "resolved": "\"amaranth\" | \"aqua\" | \"blue\" | \"dark\" | \"error\" | \"green\" | \"info\" | \"light\" | \"lime\" | \"orange\" | \"orchid\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
            "references": {
              "ThemeFullVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeFullVariantType",
                "referenceLocation": "ThemeFullVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the theme variant colors",
          "docsTags": [
            {
              "name": "default",
              "text": "'green'"
            }
          ],
          "default": "'green'",
          "values": [
            {
              "value": "amaranth",
              "type": "string"
            },
            {
              "value": "aqua",
              "type": "string"
            },
            {
              "value": "blue",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "green",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "lime",
              "type": "string"
            },
            {
              "value": "orange",
              "type": "string"
            },
            {
              "value": "orchid",
              "type": "string"
            },
            {
              "value": "purple",
              "type": "string"
            },
            {
              "value": "red",
              "type": "string"
            },
            {
              "value": "sky",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "violet",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "value": "yellow",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-badge-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-badge-border-color",
          "annotation": "prop",
          "docs": "Sets the border color of the component when tone is \"outline\"",
          "visibility": "internal"
        },
        {
          "name": "--mds-badge-border-width",
          "annotation": "prop",
          "docs": "Sets the border width of the component when tone is \"outline\"",
          "visibility": "internal"
        },
        {
          "name": "--mds-badge-color",
          "annotation": "prop",
          "docs": "Sets the text color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-badge-radius",
          "annotation": "prop",
          "docs": "Sets the border-radius of the component",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "**Deprecated**, use the `label` property instead. Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-file",
        "mds-file-preview",
        "mds-stepper-bar-item",
        "mds-table"
      ],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-badge": [
          "mds-text"
        ],
        "mds-file": [
          "mds-badge"
        ],
        "mds-file-preview": [
          "mds-badge"
        ],
        "mds-stepper-bar-item": [
          "mds-badge"
        ],
        "mds-table": [
          "mds-badge"
        ]
      },
      "storybook": "ui-badge--docs"
    },
    {
      "filePath": "src/components/mds-banner/mds-banner.tsx",
      "encapsulation": "shadow",
      "tag": "mds-banner",
      "readme": "# mds-banner\n\n\n\nThis 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.\n",
      "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": "slot",
          "text": "action - Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "part",
          "text": "text - The text wrapper of the `default` and `content` slots"
        },
        {
          "name": "category",
          "text": "feedback"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-banner>` web component is the Magma Design System surface for contextual, in-page messages - informational notices, status callouts, and alerts - pairing an optional icon, headline, body text, and inline actions inside a single themed box.\n\n#### Semantic Behavior\n\n- **Variant-driven ARIA**: The announcement role is derived from `variant`, not set manually. `error` and `warning` announce assertively (`role=\"alert\"`); `ai`, `info`, `primary`, and `success` announce politely (`role=\"status\"`); `light` and `dark` are decorative and silent.\n- **Headline as label**: When `headline` is set it also becomes the banner's accessible label.\n- **The headline follows its place**: in the page it is the title of a part, `h6`; as the window of a dialog (`slot=\"window\"` on a child of `mds-modal`) it is the title of the dialog, `h5`, above the `h6` of the parts and the groups of fields the dialog holds (`titles/part` and `titles/dialog` of the design language). A banner moved in or out of a modal after the load, or given the slot `window` there, takes the style of its new place.\n- **Dismissal**: When `dismissible` is true a close button is rendered; activating it emits `mdsBannerClose` and, if the banner sits inside an `mds-modal`, closes that modal.\n- **Localized close button**: The close button title is localized (el/en/es/it) from the host language.\n- **Action slot**: The `action` region is rendered only when a direct `[slot=\"action\"]` child is present, so banners without actions produce no empty container.\n\n- **The row of actions stacks when the banner is narrow**: under `--magma-container-actions` of its content (380px) every action of the `action` slot takes the full width, in the order of the row, the main action at the bottom (`actions/stacked`).\n- **Fields take the step below**: a neutral banner paints `surface-overlay`, so a field inside it paints `surface-default` (`--magma-field-fill`); a banner of a status with `tone=\"strong\"` paints a tint, and its fields keep `overlay`.\n\n#### Properties & Visual Configurations\n\nThis component uses the shared `variant` / `tone` ladders defined in [`agents/variants.md`](../../../../agents/variants.md); pick the `variant` according to the message's semantic weight, since it also governs the ARIA behavior described above. `tone` is limited to the minimal-box set (`'weak'`, `'strong'`, `'box'`), defaulting to `'weak'`.\n\n#### Other behavioral props\n\n- **`hideCockade`** (default `false`) removes the colored decorative badge wrapping the leading `icon`; set it for a flatter icon presentation.\n- **`typography`** writes the style of the headline instead of its place: `h6` or `h5`, nothing larger, since `h4` is too large for a banner. A value it does not know falls back to the style of the place. Left out, the style is the role of the title of the place (`part`, `dialog`), so a theme that moves the role moves the headline too.\n- **`icon`** is a Magma icon library slug shown at the top-left, surfaced as decorative.\n- **`dismissible`** shows the close button - choose it for transient or user-acknowledged messages rather than persistent context.\n- **`deletable`** is the old name of `dismissible`, deprecated: the button dismisses the message, it deletes nothing. It still works, and goes in the next major.\n- The **default slot** carries the body text/markup; the **`action` slot** holds inline controls, with `mds-button` the recommended element.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-banner>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Informational Banner\n\nThe baseline usage. Provide `variant=\"info\"` and place the body copy in the default slot. The component derives `role=\"status\"` and `aria-live=\"polite\"` automatically from the variant.\n\n```html\n<mds-banner variant=\"info\">\n  <mds-text typography=\"detail\">\n    Il sistema e in manutenzione programmata dalle 22:00 alle 23:00.\n  </mds-text>\n</mds-banner>\n```\n\n#### Status Variants\n\nPick the variant that matches the message's semantic weight. `error` and `warning` set `role=\"alert\"` with assertive live region; the others use `role=\"status\"` with polite announcement.\n\n```html\n<!-- Esito positivo -->\n<mds-banner variant=\"success\">\n  <mds-text typography=\"detail\">Dati salvati correttamente.</mds-text>\n</mds-banner>\n\n<!-- Avviso non bloccante -->\n<mds-banner variant=\"warning\">\n  <mds-text typography=\"detail\">La sessione scadra tra 5 minuti.</mds-text>\n</mds-banner>\n\n<!-- Errore bloccante -->\n<mds-banner variant=\"error\">\n  <mds-text typography=\"detail\">Impossibile completare l'operazione. Riprovare.</mds-text>\n</mds-banner>\n```\n\n#### Banner with Headline\n\nUse the `headline` prop to add a title above the body text. The headline is also used as the banner's accessible label (`aria-label`).\n\n```html\n<mds-banner variant=\"warning\" headline=\"Licenza in scadenza\">\n  <mds-text typography=\"detail\">\n    La licenza del servizio scadra tra 7 giorni. Rinnova ora per non interrompere il servizio.\n  </mds-text>\n</mds-banner>\n```\n\n#### Banner with Icon\n\nSet `icon` to a Magma icon slug. The icon is decorative (`aria-hidden=\"true\"`). The colored badge wrapping the icon is shown by default; add `hide-cockade` for a flatter look.\n\n```html\n<!-- Con cockade (default) -->\n<mds-banner variant=\"info\" icon=\"mi/baseline/info\" headline=\"Aggiornamento disponibile\">\n  <mds-text typography=\"detail\">E disponibile una nuova versione dell'applicazione.</mds-text>\n</mds-banner>\n\n<!-- Senza cockade -->\n<mds-banner variant=\"success\" icon=\"mi/baseline/check-circle\" hide-cockade>\n  <mds-text typography=\"detail\">Operazione completata.</mds-text>\n</mds-banner>\n```\n\n#### Dismissible Banner\n\nSet `dismissible` to show a close button. The button emits `mdsBannerClose` when activated. Listen for the event to remove the banner from the DOM or update application state.\n\n```html\n<mds-banner variant=\"info\" dismissible id=\"promo-banner\">\n  <mds-text typography=\"detail\">\n    Scopri le nuove funzioni premium disponibili nel tuo piano.\n  </mds-text>\n</mds-banner>\n\n<script>\n  document.querySelector('#promo-banner').addEventListener('mdsBannerClose', () => {\n    document.querySelector('#promo-banner').remove();\n  });\n</script>\n```\n\n#### Banner with Action Buttons\n\nSlot `<mds-button>` elements with `slot=\"action\"` to add inline controls. The action region is shown only while at least one `[slot=\"action\"]` child is present, and it follows the actions added or removed after the first render. Match the button variant to the banner variant for visual consistency.\n\n```html\n<mds-banner variant=\"warning\" headline=\"Abbonamento scaduto\">\n  <mds-text typography=\"detail\">\n    La licenza di questo servizio e scaduta. Il servizio continua a funzionare\n    ma non puoi utilizzare le funzioni premium.\n  </mds-text>\n  <mds-button slot=\"action\" variant=\"warning\" tone=\"outline\">Annulla</mds-button>\n  <mds-button slot=\"action\" variant=\"warning\" tone=\"strong\">Rinnova abbonamento</mds-button>\n</mds-banner>\n```\n\n#### Tone for Visual Emphasis\n\n`tone` controls emphasis without changing the semantic variant. `strong` paints the status tint on the whole banner, `weak` (default) keeps a neutral raised surface and colours only the icon, and `box` adds a solid box shadow for high-contrast placements. `mds-banner` accepts only `weak`, `strong`, and `box` - not `outline` or `text`.\n\n```html\n<!-- Bassa enfasi (default) -->\n<mds-banner variant=\"error\" tone=\"weak\">\n  <mds-text typography=\"detail\">Errore di validazione nei campi del modulo.</mds-text>\n</mds-banner>\n\n<!-- Alta enfasi -->\n<mds-banner variant=\"error\" tone=\"strong\">\n  <mds-text typography=\"detail\">Account bloccato per attivita sospetta. Contatta il supporto.</mds-text>\n</mds-banner>\n```\n\n#### Dark and Light Decorative Variants\n\n`variant=\"dark\"` and `variant=\"light\"` are neutral, decorative banners without an ARIA live region (`role=\"presentation\"`). Use them for non-critical UI chrome - announcements or promotional content that does not require immediate attention.\n\n```html\n<mds-banner variant=\"dark\" tone=\"strong\" headline=\"Novita del mese\">\n  <mds-text typography=\"detail\">\n    Tre nuovi moduli sono stati aggiunti alla piattaforma.\n  </mds-text>\n  <mds-button slot=\"action\" variant=\"light\" tone=\"text\">Scopri</mds-button>\n</mds-banner>\n```\n\n#### AI Variant\n\nUse `variant=\"ai\"` to mark banners that present AI-generated content or AI-powered suggestions. The variant emits a polite `role=\"status\"` live announcement.\n\n```html\n<mds-banner variant=\"ai\" icon=\"mi/baseline/auto-awesome\" headline=\"Suggerimento IA\">\n  <mds-text typography=\"detail\">\n    L'analisi ha rilevato tre anomalie nel documento caricato.\n  </mds-text>\n  <mds-button slot=\"action\" variant=\"ai\" tone=\"outline\">Visualizza dettagli</mds-button>\n</mds-banner>\n```\n\n#### The Window of a Dialog\n\nSlotted as the `window` of an `<mds-modal>`, the banner is the dialog: `variant=\"light\"` `tone=\"box\"` `dismissible`, its close button closes the modal with no extra JavaScript, and its headline is the title of the dialog, in `h5`, with no attribute to write. The headline is hidden from screen readers, so `aria-label` on `mds-modal` names the dialog, with the same text.\n\n```html\n<mds-modal aria-label=\"Eliminare Contratto di servizio?\">\n  <mds-banner slot=\"window\" variant=\"light\" tone=\"box\" dismissible headline=\"Eliminare Contratto di servizio?\">\n    <mds-text typography=\"detail\">Il documento non potra' essere recuperato.</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\" tone=\"outline\" autofocus>Annulla</mds-button>\n    <mds-button slot=\"action\" variant=\"error\" tone=\"strong\">Elimina</mds-button>\n  </mds-banner>\n</mds-modal>\n```\n\nIn the page the same banner keeps its headline in `h6`, the title of a part. `typography` writes the style when the place does not say it: `h6` or `h5`, nothing larger.\n\n```html\n<mds-banner variant=\"info\" typography=\"h5\" headline=\"Nuova versione del servizio\">\n  <mds-text typography=\"detail\">Da oggi puoi firmare i documenti dall'app.</mds-text>\n</mds-banner>\n```\n\n#### CSS Custom Property Customization\n\nOverride appearance only through the public `--mds-banner-*` custom properties. Set them on the host or a parent selector; use semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.featured-notice mds-banner {\n  --mds-banner-background: rgb(var(--magma-accent-emphasis));\n  --mds-banner-color: rgb(var(--magma-accent-on-emphasis));\n  --mds-banner-radius: var(--magma-radius-sm);\n  --mds-banner-shadow: 0 4px 16px rgb(var(--magma-shadow-ink) / 0.15);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-banner>`. 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 an Invalid `tone` Value\n\n`mds-banner.tone` is typed as `ToneMinimalBoxVariantType`, which allows only `weak`, `strong`, and `box`. Values like `outline` or `text` are not accepted: no tone style matches them, so the banner renders as with `strong`, not with the `weak` default.\n\n```html\n<!-- INCORRECT -->\n<mds-banner variant=\"info\" tone=\"outline\">\n  <mds-text typography=\"detail\">Informazione di sistema.</mds-text>\n</mds-banner>\n\n<!-- CORRECT -->\n<mds-banner variant=\"info\" tone=\"weak\">\n  <mds-text typography=\"detail\">Informazione di sistema.</mds-text>\n</mds-banner>\n```\n\n#### Do Not Ask the Headline for a Style Larger Than `h5`\n\n`typography` takes `h6` and `h5` only: a value it does not know, such as `h4`, falls back to the style of the place. A title written in the default slot instead of `headline` is no headline either: it is not the accessible label of the banner, and it keeps its style wherever the banner goes. Write the title in `headline` and leave its style to the place, or write `h6` or `h5`.\n\n```html\n<!-- INCORRECT -->\n<mds-banner variant=\"info\" typography=\"h4\" headline=\"Nuovo servizio\">\n  <mds-text typography=\"detail\">Da oggi puoi firmare i documenti dall'app.</mds-text>\n</mds-banner>\n<mds-banner variant=\"info\">\n  <mds-text typography=\"h4\">Nuovo servizio</mds-text>\n  <mds-text typography=\"detail\">Da oggi puoi firmare i documenti dall'app.</mds-text>\n</mds-banner>\n\n<!-- CORRECT -->\n<mds-banner variant=\"info\" headline=\"Nuovo servizio\">\n  <mds-text typography=\"detail\">Da oggi puoi firmare i documenti dall'app.</mds-text>\n</mds-banner>\n```\n\n#### Do Not Override the ARIA Role Manually\n\nThe component derives `role` and `aria-live` from `variant` (`error`/`warning` assertive, others polite) and writes them on the host when it renders, overwriting a manual value. To change the announcement, change the `variant`.\n\n```html\n<!-- INCORRECT -->\n<mds-banner variant=\"info\" role=\"alert\" aria-live=\"assertive\">\n  <mds-text typography=\"detail\">Aggiornamento disponibile.</mds-text>\n</mds-banner>\n\n<!-- CORRECT - let variant drive the ARIA behavior -->\n<mds-banner variant=\"info\">\n  <mds-text typography=\"detail\">Aggiornamento disponibile.</mds-text>\n</mds-banner>\n```\n\n#### Do Not Slot an `mds-button` into the Default Slot to Add Actions\n\nThe `action` named slot is the correct place for inline controls. Placing buttons in the default slot renders them inside the text region, breaks layout, and loses the flex wrapping the action row provides.\n\n```html\n<!-- INCORRECT -->\n<mds-banner variant=\"warning\">\n  <mds-text typography=\"detail\">La licenza sta per scadere.</mds-text>\n  <mds-button variant=\"warning\">Rinnova</mds-button>\n</mds-banner>\n\n<!-- CORRECT -->\n<mds-banner variant=\"warning\">\n  <mds-text typography=\"detail\">La licenza sta per scadere.</mds-text>\n  <mds-button slot=\"action\" variant=\"warning\" tone=\"strong\">Rinnova</mds-button>\n</mds-banner>\n```\n\n#### Do Not Set `dismissible=\"false\"` to Hide the Close Button\n\n`dismissible` is a boolean prop, and a false boolean is an absent attribute ([`agents/mistakes.md`](../../../../agents/mistakes.md)). Stencil reads the string `\"false\"` as `false` here, so the button is hidden, but the attribute stays on the element and any `[dismissible]` selector still matches it. Remove the attribute (or omit it) to hide the button.\n\n```html\n<!-- INCORRECT -->\n<mds-banner variant=\"error\" dismissible=\"false\">\n  <mds-text typography=\"detail\">Errore permanente - non dismissibile.</mds-text>\n</mds-banner>\n\n<!-- CORRECT -->\n<mds-banner variant=\"error\">\n  <mds-text typography=\"detail\">Errore permanente - non dismissibile.</mds-text>\n</mds-banner>\n```\n\n#### Do Not Use `dark` or `light` for Status Messages\n\n`variant=\"dark\"` and `variant=\"light\"` produce `role=\"presentation\"` with no live region - they are silent to assistive tech. Using them for error, warning, or informational content means screen reader users never receive the announcement.\n\n```html\n<!-- INCORRECT - errore silenzioso per tecnologie assistive -->\n<mds-banner variant=\"dark\">\n  <mds-text typography=\"detail\">Errore: impossibile caricare il documento.</mds-text>\n</mds-banner>\n\n<!-- CORRECT -->\n<mds-banner variant=\"error\">\n  <mds-text typography=\"detail\">Errore: impossibile caricare il documento.</mds-text>\n</mds-banner>\n```\n\n#### Do Not Pierce Shadow DOM to Style Internals\n\nThe only supported customization surface is the public `--mds-banner-*` CSS custom properties plus the `::part(text)` shadow part. Targeting internal class names with `>>>` or undocumented `::part()` names couples your code to the implementation and breaks on minor releases.\n\n```css\n/* INCORRECT */\nmds-banner >>> .headline {\n  font-size: 1.5rem;\n}\nmds-banner::part(content) {\n  padding: 0;\n}\n\n/* CORRECT */\nmds-banner {\n  --mds-banner-radius: var(--magma-radius-sm);\n}\nmds-banner::part(text) {\n  line-height: 1.6;\n}\n```\n\n#### Do Not Listen to the Native `click` Event for Dismissal\n\nThe component fires `mdsBannerClose` only when the close button is activated (both pointer and keyboard). A native `click` listener on the host fires for a click anywhere in the banner, body text and action buttons included.\n\n```html\n<!-- INCORRECT -->\n<mds-banner variant=\"info\" dismissible id=\"notice\">\n  <mds-text typography=\"detail\">Avviso temporaneo.</mds-text>\n</mds-banner>\n<script>\n  document.querySelector('#notice').addEventListener('click', () => {\n    document.querySelector('#notice').remove();\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-banner variant=\"info\" dismissible id=\"notice\">\n  <mds-text typography=\"detail\">Avviso temporaneo.</mds-text>\n</mds-banner>\n<script>\n  document.querySelector('#notice').addEventListener('mdsBannerClose', () => {\n    document.querySelector('#notice').remove();\n  });\n</script>\n```\n"
      },
      "props": [
        {
          "name": "deletable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "deletable",
          "reflectToAttr": false,
          "docs": "Shows the close button, as `dismissible` does.",
          "docsTags": [
            {
              "name": "deprecated",
              "text": "Use `dismissible`: the button dismisses the message, it deletes nothing.\nGoes in the next major."
            }
          ],
          "deprecation": "Use `dismissible`: the button dismisses the message, it deletes nothing.\nGoes in the next major.",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "dismissible",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "dismissible",
          "reflectToAttr": false,
          "docs": "Shows a close button that dismisses the banner: activating it emits `mdsBannerClose`",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "headline",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "headline",
          "reflectToAttr": false,
          "docs": "The title on the top of the banner",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hideCockade",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-cockade",
          "reflectToAttr": true,
          "docs": "Hides the decoration around the banner icon",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "An icon displayed at the top left of the banner",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"box\" | \"strong\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneMinimalBoxVariantType",
            "resolved": "\"box\" | \"strong\" | \"weak\" | undefined",
            "references": {
              "ToneMinimalBoxVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneMinimalBoxVariantType",
                "referenceLocation": "ToneMinimalBoxVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Sets the tone of the color variant",
          "docsTags": [
            {
              "name": "default",
              "text": "'weak'"
            }
          ],
          "default": "'weak'",
          "values": [
            {
              "value": "box",
              "type": "string"
            },
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"h5\" | \"h6\" | undefined",
          "complexType": {
            "original": "BannerTypographyType",
            "resolved": "\"h5\" | \"h6\" | undefined",
            "references": {
              "BannerTypographyType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-banner/meta/types.ts::BannerTypographyType",
                "referenceLocation": "BannerTypographyType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "The style of the headline: `h6`, the title of a part, or `h5`, the title of a dialog\n(#1189, titles). Left out, it follows the place of the banner: `h6` in the page, `h5` as\nthe window of a dialog (`slot=\"window\"` on a child of `mds-modal`), above the `h6` of the\nparts and the groups of fields it holds. Nothing larger: `h4` is too large for a banner",
          "docsTags": [],
          "values": [
            {
              "value": "h5",
              "type": "string"
            },
            {
              "value": "h6",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ThemeVariantType",
            "resolved": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ThemeVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeVariantType",
                "referenceLocation": "ThemeVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the theme variant colors",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsBannerClose",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the url view is closed",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-banner-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-banner-cockade-background",
          "annotation": "prop",
          "docs": "When cockade attribute is set, the icon will be wrapper with a colored area, this is it's background",
          "visibility": "internal"
        },
        {
          "name": "--mds-banner-cockade-distance",
          "annotation": "prop",
          "docs": "When cockade attribute is set, the icon will be wrapper with a colored area, this is it's icon color",
          "visibility": "internal"
        },
        {
          "name": "--mds-banner-color",
          "annotation": "prop",
          "docs": "Sets the text color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-banner-content-gap",
          "annotation": "prop",
          "docs": "Sets gap between banner elements",
          "visibility": "internal"
        },
        {
          "name": "--mds-banner-headline-color",
          "annotation": "prop",
          "docs": "The text color of the headline",
          "visibility": "internal"
        },
        {
          "name": "--mds-banner-icon-color",
          "annotation": "prop",
          "docs": "Sets the close icon fill color of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-banner-radius",
          "annotation": "prop",
          "docs": "Sets the border-radius of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-banner-shadow",
          "annotation": "prop",
          "docs": "Sets the box-shadow of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-banner-transition-duration",
          "annotation": "prop",
          "docs": "Sets the transition duration",
          "visibility": "internal"
        },
        {
          "name": "--mds-banner-transition-timing-function",
          "annotation": "prop",
          "docs": "Sets the transition timing function",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "action",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        }
      ],
      "parts": [
        {
          "name": "text",
          "docs": "The text wrapper of the `default` and `content` slots"
        }
      ],
      "states": [],
      "dependents": [
        "mds-policy-ai"
      ],
      "dependencies": [
        "mds-icon",
        "mds-text",
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-banner": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-policy-ai": [
          "mds-banner"
        ]
      },
      "storybook": "ui-banner--docs"
    },
    {
      "filePath": "src/components/mds-benchmark-bar/mds-benchmark-bar.tsx",
      "encapsulation": "shadow",
      "tag": "mds-benchmark-bar",
      "readme": "# mds-benchmark-bar\n\n\n\nThis 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.\n",
      "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": "- **Deprecated**, use the `label` property instead. Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        },
        {
          "name": "part",
          "text": "progress-bar - The progress bar element"
        },
        {
          "name": "category",
          "text": "data"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-benchmark-bar>` web component is a read-only data-visualization element of the Magma Design System that pairs a labelled caption with a horizontal progress bar to express a single benchmark value on a 0-100 scale. It is a presentational compound that composes `<mds-text>` and `<mds-progress>`; it has no native HTML primitive equivalent.\n\n#### Semantic Behavior\n\n- **Display-only**: The component is non-interactive - it emits no events, has no form association, and is not part of the tab sequence.\n- **Text-only label**: The label caption is meant to carry a plain text string, not markup; the `label` prop is the supported source of that text.\n- **Deprecated default slot**: Slotted text is still read as a legacy fallback, but only when `label` is empty - once `label` is set it always wins. HTML elements or components in the slot are unsupported.\n- **Shadow part**: The inner progress bar is exposed as the `progress-bar` part for external styling.\n\n#### Properties & Visual Configurations\n\n- **`value`** drives the rendered value text, the value screen readers announce (the same text) and the fill of the progress bar; supply it on a 0-100 scale.\n- **`alias`** overrides how the value is displayed: when present it replaces the numeric `value` in the caption (and in the announced value), letting you show formatted or qualitative text (e.g. a graded label) instead of the raw number.\n- **`typography`** selects the text scale applied to both the label and value captions, choosing between `'label'` (the default, larger caption) and `'option'` (smaller, for compact contexts).\n\nThe shared `variant` and `size` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md); `variant` sets the progress bar theme colors (defaulting to `'dark'`), and `size` controls the progress bar height (defaulting to `'md'`). This component does not add values beyond the shared sets.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-benchmark-bar>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Benchmark via `label` and `value`\n\nThe canonical form. Set `label` for the caption text and `value` (0-100) for the fill. `label` is reflected as an attribute; `value` is not, so a value set from JavaScript does not show up in attribute selectors.\n\n```html\n<mds-benchmark-bar label=\"Soddisfazione clienti\" value=\"72\"></mds-benchmark-bar>\n```\n\n#### Multiple Bars in a List\n\nRender several bars together to compare metrics. Each bar stands on its own; no parent wrapper is required.\n\n```html\n<mds-benchmark-bar label=\"Qualita del servizio\" value=\"85\"></mds-benchmark-bar>\n<mds-benchmark-bar label=\"Tempi di risposta\" value=\"61\"></mds-benchmark-bar>\n<mds-benchmark-bar label=\"Risoluzione al primo contatto\" value=\"44\"></mds-benchmark-bar>\n```\n\n#### Alias to Replace the Numeric Value\n\nUse `alias` when you need to display a formatted or qualitative string instead of the raw number. The alias also becomes the accessible `aria-valuetext` announced to screen readers; without it they announce the number, as shown.\n\n```html\n<!-- Show a grade label instead of the raw score -->\n<mds-benchmark-bar\n  label=\"Punteggio complessivo\"\n  value=\"68\"\n  alias=\"Buono\"\n></mds-benchmark-bar>\n\n<!-- Show a ratio string -->\n<mds-benchmark-bar\n  label=\"Attivita completate\"\n  value=\"33\"\n  alias=\"1 di 3\"\n></mds-benchmark-bar>\n```\n\n#### Variant for Semantic Color\n\n`variant` controls the color theme of the progress bar. Pick the value that matches the meaning of the metric, not the color you want.\n\n```html\n<!-- Neutral / default -->\n<mds-benchmark-bar label=\"Utilizzo CPU\" value=\"55\" variant=\"dark\"></mds-benchmark-bar>\n\n<!-- Primary brand emphasis -->\n<mds-benchmark-bar label=\"Avanzamento progetto\" value=\"70\" variant=\"primary\"></mds-benchmark-bar>\n\n<!-- Status: healthy -->\n<mds-benchmark-bar label=\"Uptime mensile\" value=\"99\" variant=\"success\"></mds-benchmark-bar>\n\n<!-- Status: under threshold -->\n<mds-benchmark-bar label=\"Scorte disponibili\" value=\"18\" variant=\"warning\"></mds-benchmark-bar>\n\n<!-- Status: critical -->\n<mds-benchmark-bar label=\"Errori rilevati\" value=\"82\" variant=\"error\"></mds-benchmark-bar>\n```\n\n#### Size\n\n`size` controls the height of the progress bar. Use `sm` for dense lists, `lg` / `xl` for hero metrics.\n\n```html\n<mds-benchmark-bar label=\"Piccolo\" value=\"40\" size=\"sm\"></mds-benchmark-bar>\n<mds-benchmark-bar label=\"Medio (default)\" value=\"40\" size=\"md\"></mds-benchmark-bar>\n<mds-benchmark-bar label=\"Grande\" value=\"40\" size=\"lg\"></mds-benchmark-bar>\n<mds-benchmark-bar label=\"Extra grande\" value=\"40\" size=\"xl\"></mds-benchmark-bar>\n```\n\n#### Typography Scale\n\n`typography` applies to both the label caption and the value text. Use `option` for compact contexts where the default `label` scale is too heavy.\n\n```html\n<!-- Default scale -->\n<mds-benchmark-bar label=\"Punteggio\" value=\"76\" typography=\"label\"></mds-benchmark-bar>\n\n<!-- Compact / denser scale -->\n<mds-benchmark-bar label=\"Punteggio\" value=\"76\" typography=\"option\"></mds-benchmark-bar>\n```\n\n#### Styling Customization via `::part(progress-bar)`\n\nThe inner progress bar is exposed as the `progress-bar` shadow part. Use it to apply targeted overrides when the documented variant colors are insufficient - for example, to enforce a brand-specific fill in a narrow context.\n\n```css\n.hero-metric mds-benchmark-bar::part(progress-bar) {\n  --mds-progress-color: rgb(var(--magma-accent-ai-fg));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-benchmark-bar>`. 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 Put HTML in the Default Slot\n\nThe default slot is deprecated and accepts plain text only; HTML elements are unsupported and will not render correctly. Use the `label` prop for the caption.\n\n```html\n<!-- INCORRECT -->\n<mds-benchmark-bar value=\"60\">\n  <strong>Completamento attivita</strong>\n</mds-benchmark-bar>\n\n<!-- CORRECT -->\n<mds-benchmark-bar label=\"Completamento attivita\" value=\"60\"></mds-benchmark-bar>\n```\n\n#### Do Not Set `value` Outside the 0-100 Range\n\nThe inner `<mds-progress>` reads a value above 100 as 100 and a negative one as 0, but the caption still shows the raw number, which then contradicts the bar. Clamp the value in your data layer before binding.\n\n```html\n<!-- INCORRECT -->\n<mds-benchmark-bar label=\"Richieste elaborate\" value=\"1540\"></mds-benchmark-bar>\n\n<!-- CORRECT -->\n<!-- normalize to 0-100 in your controller before binding -->\n<mds-benchmark-bar label=\"Richieste elaborate\" value=\"100\"></mds-benchmark-bar>\n```\n\n#### Do Not Use `alias` for Structurally Different Content\n\n`alias` replaces the numeric value with a plain string in both the visual caption and the accessible `aria-valuetext`. It is not a slot - do not attempt to bind rich HTML or icon markup to it.\n\n```html\n<!-- INCORRECT -->\n<mds-benchmark-bar label=\"Stato\" value=\"80\" alias=\"<mds-badge variant='success'>OK</mds-badge>\"></mds-benchmark-bar>\n\n<!-- CORRECT -->\n<mds-benchmark-bar label=\"Stato\" value=\"80\" alias=\"Ottimo\"></mds-benchmark-bar>\n```\n\n#### Do Not Override `variant` to Express Visual Weight Alone\n\n`variant` is a semantic role (`primary`, `error`, `success`, `warning`, etc.). Do not choose it purely for the color it produces - choose it for what the metric means. Mixing semantic values for aesthetic reasons makes the chart misleading.\n\n```html\n<!-- INCORRECT: error red chosen because it \"looks bold\", not because it signals a problem -->\n<mds-benchmark-bar label=\"Popolarita del prodotto\" value=\"88\" variant=\"error\"></mds-benchmark-bar>\n\n<!-- CORRECT -->\n<mds-benchmark-bar label=\"Popolarita del prodotto\" value=\"88\" variant=\"success\"></mds-benchmark-bar>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Progress Bar\n\nUse the documented `::part(progress-bar)` surface to style the inner bar. Reaching into the shadow DOM via `>>>` or undocumented class selectors couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-benchmark-bar >>> mds-progress {\n  background-color: hotpink;\n}\n\n/* CORRECT */\n.my-context mds-benchmark-bar::part(progress-bar) {\n  --mds-progress-color: rgb(var(--magma-accent-fg));\n}\n```\n"
      },
      "props": [
        {
          "name": "alias",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "alias",
          "reflectToAttr": false,
          "docs": "An alias to custom how value is represented",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "label",
          "reflectToAttr": true,
          "docs": "The label of the benchmark bar",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | \"xl\" | undefined",
          "complexType": {
            "original": "ProgressBarSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\" | undefined",
            "references": {
              "ProgressBarSizeType": {
                "location": "import",
                "path": "@type/progress",
                "id": "src/type/progress.ts::ProgressBarSizeType",
                "referenceLocation": "ProgressBarSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'md'"
            }
          ],
          "default": "'md'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "value": "xl",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"label\" | \"option\" | undefined",
          "complexType": {
            "original": "BenchmarkBarTypographyType",
            "resolved": "\"label\" | \"option\" | undefined",
            "references": {
              "BenchmarkBarTypographyType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-benchmark-bar/meta/types.ts::BenchmarkBarTypographyType",
                "referenceLocation": "BenchmarkBarTypographyType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "The typography of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'label'"
            }
          ],
          "default": "'label'",
          "values": [
            {
              "value": "label",
              "type": "string"
            },
            {
              "value": "option",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "value",
          "reflectToAttr": false,
          "docs": "A value between 0 and 100 that rapresents the benchmark",
          "docsTags": [
            {
              "name": "default",
              "text": "0"
            }
          ],
          "default": "0",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ThemeVariantType",
            "resolved": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ThemeVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeVariantType",
                "referenceLocation": "ThemeVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the theme variant colors",
          "docsTags": [
            {
              "name": "default",
              "text": "'dark'"
            }
          ],
          "default": "'dark'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "**Deprecated**, use the `label` property instead. Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        }
      ],
      "parts": [
        {
          "name": "progress-bar",
          "docs": "The progress bar element"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-progress"
      ],
      "dependencyGraph": {
        "mds-benchmark-bar": [
          "mds-text",
          "mds-progress"
        ],
        "mds-progress": [
          "mds-radial-progress"
        ],
        "mds-radial-progress": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "ui-benchmark-bar--docs"
    },
    {
      "filePath": "src/components/mds-bibliography/mds-bibliography.tsx",
      "encapsulation": "shadow",
      "tag": "mds-bibliography",
      "readme": "# mds-bibliography\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-bibliography>` web component renders a single citation entry formatted according to a recognized academic style. It is a presentational component that takes structured metadata (author, title, publisher, date, location, URL) and composes it into a styled, correctly-punctuated reference line, replacing the manual assembly of a bibliography string.\n\n#### Semantic Behavior\n\n- **Citation formatting**: The `format` prop drives the entire output - field ordering, punctuation, separators, author-name abbreviation, and date layout. Switching formats re-composes the same metadata rather than just restyling it.\n- **Author parsing**: `author` is parsed, not displayed verbatim. Names are split on commas into multiple authors, first/last names are detected by position (first name first: `Mario Rossi`; the spaces around each name are ignored), and composite first or last names can be grouped with single or double quotation marks (e.g. `'Jhon Arthur' Doe`). Each author is then abbreviated per the active format (APA initials, MLA full first name).\n- **Date handling**: `date` accepts an ISO string or a numeric timestamp and renders inside a semantic `<time>` element; an invalid date renders as an empty date (APA keeps empty parentheses), and month names are localized in Italian.\n- **Link vs. plain title**: When both `name` and `url` are set, the title renders as a link (`target=\"_blank\"`) carrying the `rel` value; with `name` alone it renders as plain emphasized text, and without `name` there is no title at all.\n- **No slots**: Content is built entirely from props; the component does not project slotted children.\n\n#### Properties & Visual Configurations\n\n- **`format`** selects the citation standard (`'apa'`, `'mla'`, `'turabian'`) and is the primary behavioral switch; pick it to match the referencing convention required by the document. APA puts the date in parentheses right after the authors, MLA/Turabian place the date at the end, and each applies its own punctuation between location, publisher, and date.\n- **`rel`** sets the relationship attribute applied to the generated title link (`'external'` or `'author'`); it only takes effect when the title is rendered as a hyperlink.\n\n#### Other behavioral props\n\n- **`typography`** and **`variant`** set the text role and styling of the rendered citation; they affect appearance only, not the citation structure.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-bibliography>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic APA Citation (Default Format)\n\nThe default `format` is `'apa'`. Supply author, date, name, location, and publisher to produce a correctly punctuated APA reference line. APA places the date in parentheses immediately after the author list.\n\n```html\n<mds-bibliography\n  author=\"Mario Rossi\"\n  date=\"2021-03-15\"\n  name=\"Fondamenti di diritto amministrativo\"\n  location=\"Milano\"\n  publisher=\"Maggioli Editore\"\n></mds-bibliography>\n```\n\n#### APA Citation With a Linked Title\n\nWhen both `name` and `url` are provided the title renders as a hyperlink opening in a new tab. The `rel` prop defaults to `'external'`; change it to `'author'` only when the URL points to an author profile.\n\n```html\n<mds-bibliography\n  author=\"Mario Rossi\"\n  date=\"2021-03-15\"\n  name=\"Fondamenti di diritto amministrativo\"\n  location=\"Milano\"\n  publisher=\"Maggioli Editore\"\n  url=\"https://www.maggioli.com/catalogo/fondamenti\"\n></mds-bibliography>\n```\n\n#### MLA Format\n\nSet `format=\"mla\"` for Modern Language Association style. The date moves to the end, after the publisher, and author names are formatted with the full first name rather than initials.\n\n```html\n<mds-bibliography\n  format=\"mla\"\n  author=\"Mario Rossi\"\n  date=\"2021-03-15\"\n  name=\"Fondamenti di diritto amministrativo\"\n  location=\"Milano\"\n  publisher=\"Maggioli Editore\"\n></mds-bibliography>\n```\n\n#### Turabian Format\n\n`format=\"turabian\"` follows the Kate Turabian style - same field order and punctuation as MLA when a publisher is given; without a publisher, the location ends with a comma instead of a period.\n\n```html\n<mds-bibliography\n  format=\"turabian\"\n  author=\"Mario Rossi\"\n  date=\"2021-03-15\"\n  name=\"Fondamenti di diritto amministrativo\"\n  location=\"Milano\"\n  publisher=\"Maggioli Editore\"\n></mds-bibliography>\n```\n\n#### Multiple Authors\n\nSeparate multiple authors with a comma, writing each name first name first; a space after the comma is fine. Composite first or last names that contain spaces must be wrapped in single or double quotation marks so the parser groups them correctly. The component joins authors with the format-appropriate separator (APA and Turabian: `&`, MLA: `e`).\n\n```html\n<!-- Two authors, both single-word first and last names -->\n<mds-bibliography\n  author=\"Mario Rossi, Luigi Verdi\"\n  date=\"2019-06-01\"\n  name=\"Gestione del territorio\"\n  publisher=\"Giuffre Editore\"\n></mds-bibliography>\n\n<!-- Composite first name and composite last name -->\n<mds-bibliography\n  author=\"'Maria Grazia' Bianchi, Enrico 'De Luca'\"\n  date=\"2020-11-20\"\n  name=\"Appalti pubblici\"\n  publisher=\"Il Sole 24 Ore\"\n></mds-bibliography>\n```\n\n#### Date From a Numeric Timestamp\n\n`date` accepts either an ISO date string or a numeric Unix timestamp (milliseconds as a string). The component parses both forms identically and renders the result inside a semantic `<time>` element.\n\n```html\n<!-- ISO string -->\n<mds-bibliography\n  author=\"Luca Ferrari\"\n  date=\"2018-09-10\"\n  name=\"Intelligenza artificiale e diritto\"\n  publisher=\"Giuffre Editore\"\n></mds-bibliography>\n\n<!-- Numeric timestamp (milliseconds) -->\n<mds-bibliography\n  author=\"Luca Ferrari\"\n  date=\"1536537600000\"\n  name=\"Intelligenza artificiale e diritto\"\n  publisher=\"Giuffre Editore\"\n></mds-bibliography>\n```\n\n#### Adjusting Typography\n\nThe `typography` prop controls the text role (`'caption'`, `'detail'` [default], `'label'`, `'option'`, `'paragraph'`, `'tip'`). Use `variant` to apply a style variant inside that role. Change these when the citation must match its surrounding body copy.\n\n```html\n<!-- Use paragraph size inside a long-form article -->\n<mds-bibliography\n  format=\"apa\"\n  author=\"Francesca Conti\"\n  date=\"2022-05-18\"\n  name=\"Sociologia del lavoro pubblico\"\n  publisher=\"Laterza\"\n  typography=\"paragraph\"\n  variant=\"read\"\n></mds-bibliography>\n```\n\n#### Styling Customization\n\nStyle the link color through the public `--mds-bibliography-color` CSS custom property; the underline colors are not public and follow the theme. Use semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.riferimenti mds-bibliography {\n  --mds-bibliography-color: rgb(var(--magma-accent-fg));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-bibliography>`. 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 Slot Content - The Component Has No Slots\n\n`<mds-bibliography>` builds its output entirely from props; it has no default slot and no named slots. Any children placed inside the tag are ignored.\n\n```html\n<!-- INCORRECT -->\n<mds-bibliography>\n  Rossi, M. (2021). <em>Fondamenti di diritto amministrativo</em>. Maggioli Editore.\n</mds-bibliography>\n\n<!-- CORRECT -->\n<mds-bibliography\n  author=\"Mario Rossi\"\n  date=\"2021-03-15\"\n  name=\"Fondamenti di diritto amministrativo\"\n  publisher=\"Maggioli Editore\"\n></mds-bibliography>\n```\n\n#### Do Not Use `url` Without `name`\n\nWhen `name` is absent the component renders no title element, so `url` has nowhere to attach and the hyperlink is never created. Always supply `name` together with `url`.\n\n```html\n<!-- INCORRECT -->\n<mds-bibliography\n  author=\"Giulia Bianchi\"\n  date=\"2020-06-01\"\n  url=\"https://www.maggioli.com/catalogo/appalti\"\n></mds-bibliography>\n\n<!-- CORRECT -->\n<mds-bibliography\n  author=\"Giulia Bianchi\"\n  date=\"2020-06-01\"\n  name=\"Appalti pubblici: guida pratica\"\n  url=\"https://www.maggioli.com/catalogo/appalti\"\n></mds-bibliography>\n```\n\n#### Do Not Pass an Author Array as a JavaScript Array Literal in HTML\n\nThe `author` prop expects a plain comma-separated string. In HTML the bracket or JSON syntax is not a supported format, even where the parser happens to read it. Set from JavaScript, an array is read as one author per entry, but the prop is typed as a string: prefer the comma-separated form there too.\n\n```html\n<!-- INCORRECT -->\n<mds-bibliography\n  author=\"['Mario Rossi', 'Luigi Verdi']\"\n  name=\"Gestione del territorio\"\n></mds-bibliography>\n\n<!-- CORRECT -->\n<mds-bibliography\n  author=\"Mario Rossi,Luigi Verdi\"\n  name=\"Gestione del territorio\"\n></mds-bibliography>\n```\n\n#### Do Not Use `rel` Without a URL\n\nThe `rel` attribute only takes effect when the title is rendered as a hyperlink (i.e. when both `name` and `url` are set). Setting `rel=\"author\"` alone has no semantic effect and may confuse automated link checkers that scan for `rel` on anchors.\n\n```html\n<!-- INCORRECT -->\n<mds-bibliography\n  author=\"Enrico 'De Luca'\"\n  name=\"Sociologia delle organizzazioni\"\n  rel=\"author\"\n></mds-bibliography>\n\n<!-- CORRECT -->\n<mds-bibliography\n  author=\"Enrico 'De Luca'\"\n  name=\"Sociologia delle organizzazioni\"\n  url=\"https://www.maggioli.com/catalogo/sociologia\"\n  rel=\"author\"\n></mds-bibliography>\n```\n\n#### Do Not Invent a `format` Value Outside the Three Accepted Styles\n\nOnly `'apa'`, `'mla'`, and `'turabian'` are valid. Passing an unrecognised string leaves the format branch unmatched and renders only the author portion (no date, title, location, or publisher).\n\n```html\n<!-- INCORRECT -->\n<mds-bibliography\n  format=\"chicago\"\n  author=\"Francesca Conti\"\n  name=\"Sociologia del lavoro pubblico\"\n></mds-bibliography>\n\n<!-- CORRECT -->\n<mds-bibliography\n  format=\"turabian\"\n  author=\"Francesca Conti\"\n  name=\"Sociologia del lavoro pubblico\"\n></mds-bibliography>\n```\n\n#### Customize via Documented CSS Vars, Not Internal Selectors\n\nThe supported customization surface is the public `--mds-bibliography-color` CSS custom property. Targeting the `.link` class or other internals via shadow-piercing selectors or undocumented `::part()` names couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-bibliography >>> .link {\n  color: blue;\n}\nmds-bibliography::part(link) {\n  text-decoration: none;\n}\n\n/* CORRECT */\n.sezione-riferimenti mds-bibliography {\n  --mds-bibliography-color: rgb(var(--magma-accent-fg));\n}\n```\n"
      },
      "props": [
        {
          "name": "author",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "author",
          "reflectToAttr": false,
          "docs": "Specifies one or more authors, as a string.\nFirst name and Last name: \"Jhon Doe\",\nyou can wrap first name or last name to crop them correctly: \"'Jhon Arthur' Doe\", \"'Jhon Arthur' 'Doe Jhonson'\",\nand for multiple authors, separated by commas, \"'Jhon Arthur' 'Doe Jhonson', 'Mike Collins', Erik 'Ross Anderson'\",\nyou can use single or double quotation marks for composite names",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "date",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "date",
          "reflectToAttr": false,
          "docs": "Specifies the date of the bibliography",
          "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": "format",
          "type": "\"apa\" | \"mla\" | \"turabian\"",
          "complexType": {
            "original": "BibliographyFormatType",
            "resolved": "\"apa\" | \"mla\" | \"turabian\"",
            "references": {
              "BibliographyFormatType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-bibliography/meta/types.ts::BibliographyFormatType",
                "referenceLocation": "BibliographyFormatType"
              }
            }
          },
          "mutable": false,
          "attr": "format",
          "reflectToAttr": false,
          "docs": "Specifies the bibliography format to rapresent the bibliography content",
          "docsTags": [
            {
              "name": "default",
              "text": "'apa'"
            }
          ],
          "default": "'apa'",
          "values": [
            {
              "value": "apa",
              "type": "string"
            },
            {
              "value": "mla",
              "type": "string"
            },
            {
              "value": "turabian",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "location",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "location",
          "reflectToAttr": false,
          "docs": "Specifies the location of the bibliography",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": false,
          "docs": "Specifies the name of the bibliography",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "publisher",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "publisher",
          "reflectToAttr": false,
          "docs": "Specifies the publisher of the bibliography",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "rel",
          "type": "\"author\" | \"external\"",
          "complexType": {
            "original": "BibliographyRelationshipType",
            "resolved": "\"author\" | \"external\"",
            "references": {
              "BibliographyRelationshipType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-bibliography/meta/types.ts::BibliographyRelationshipType",
                "referenceLocation": "BibliographyRelationshipType"
              }
            }
          },
          "mutable": false,
          "attr": "rel",
          "reflectToAttr": false,
          "docs": "Specifies relationship between the current document and the URL",
          "docsTags": [
            {
              "name": "default",
              "text": "'external'"
            }
          ],
          "default": "'external'",
          "values": [
            {
              "value": "author",
              "type": "string"
            },
            {
              "value": "external",
              "type": "string"
            }
          ],
          "optional": false,
          "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": false,
          "docs": "Specifies the font 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": "url",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "url",
          "reflectToAttr": false,
          "docs": "Specifies the URL of the bibliography",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"code\" | \"info\" | \"read\" | \"title\" | undefined",
          "complexType": {
            "original": "TypographyVariants",
            "resolved": "\"code\" | \"info\" | \"read\" | \"title\" | undefined",
            "references": {
              "TypographyVariants": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyVariants",
                "referenceLocation": "TypographyVariants"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": false,
          "docs": "Specifies the variant for `typography`",
          "docsTags": [],
          "values": [
            {
              "value": "code",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "read",
              "type": "string"
            },
            {
              "value": "title",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-bibliography-color",
          "annotation": "prop",
          "docs": "Sets the text color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-bibliography-text-decoration",
          "annotation": "prop",
          "docs": "Sets the text decoration color of the link",
          "visibility": "internal"
        },
        {
          "name": "--mds-bibliography-text-decoration-hover",
          "annotation": "prop",
          "docs": "Sets the text decoration color of the link when the mouse is over it",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-bibliography": [
          "mds-text"
        ]
      },
      "storybook": "ui-bibliography--docs"
    },
    {
      "filePath": "src/components/mds-book/mds-book.tsx",
      "encapsulation": "shadow",
      "tag": "mds-book",
      "readme": "# mds-book\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "part",
          "text": "cover - The native `<img>` that shows the front cover"
        },
        {
          "name": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-book>` web component shows a book as a physical object, from the image of its front cover alone: front cover, spine and page block drawn in CSS 3D, turned a little so the spine shows. It is the catalogue and product-page counterpart of `<mds-img>`, for publications rather than pictures.\n\n#### Semantic Behavior\n\n- **One image of the book**: The host is a single `role=\"img\"` named by `alt`, or by `name` and `author` (\"Title by Author\", localised in el/en/es/it), or by a generic \"Book\" when there is neither. An empty `alt` marks the book as decorative (`role=\"presentation\"`). The text printed on the spine and on a drawn cover is hidden from assistive technologies, since it repeats that name.\n- **The sides come from the cover**: The spine continues the left edge of the cover image and the board edges its top and right edges, as a wraparound cover prints its design on, so no spine or back cover image is needed. Without an image they take the colour of the drawn cover.\n- **A drawn cover instead of a broken image**: Without `src`, or when the image fails to load, the front shows the author, the title and the publisher, or its mark, on `--mds-book-color`, which paints the drawn cover only. A new `src` tries again.\n- **Printed on paper**: A book with `src` is bound in the colour of paper, the same in light and dark mode, as the image is: a blank book until its image arrives, then the paper wherever the image does not reach (its transparent parts, the spine and the edges until they paint it). So neither a lazy catalogue nor a cover that has just arrived flashes in the colour of drawn covers, and one library can mix books with and without a cover image with no setting.\n- **Light and shadow**: The book is seen a little from above. Each face takes the light by how it turns toward it, in a light touch that shows the volume without drawing the eye. Its shadow falls on the surface it rests on, under its tail when it stands and under its back cover when it lies, darkest where it touches and soon gone; around its outline only a halo faint enough to part a light cover from a light page.\n- **Movement**: The book rests in its `pose`. On hover it rises off the surface, its shadow fading there, and leans a little toward the pointer, with a faint sheen on the cover. A drag (mouse, pen or finger) turns it further, within limits, to show the spine or the pages, never the back, or spins a lying book on its surface; it settles back when released, or when the pointer leaves the window or the frame of the page, where its release could not reach the book. A vertical swipe still scrolls the page.\n- **Not a control**: The book has no action of its own. To make it a link, wrap it: the click that ends a drag does not follow the link, a plain click does.\n- **Reduced motion**: With the animation preference set to reduce (or the system asking for it, when there is no controller), the book keeps its resting pose: no lean, no lift, no drag.\n- **Consumption**: The consumption preference sets how much the book costs to draw. At `high` (the default, and on a page without the controller) it does everything; at `medium` it moves without the sheen and without the halo, a filter computed again on every frame; at `low` it is drawn once, in its pose, and never animated. While it moves, only opacities and transforms change, which the compositor applies without painting the faces again.\n\n#### Properties & Visual Configurations\n\n- **`pose`**: how the book is shown, after the usual shots of product photography. A drag turns it from there, and it goes back to it when released.\n  - `'spine'`: standing, turned to show its spine; the default, and the one for a catalogue.\n  - `'fore-edge'`: standing, turned the other way to show its pages.\n  - `'front'`: facing the reader, flat, the cover as it is; the light still shows the binding when it moves.\n  - `'lying'`: lying on its back, seen from above, its tail toward the reader: a book on a desk.\n  - `'lying-turned'`: lying, spun on the surface to show its spine and its tail.\n\n- **`format`**: the proportions of the book, in one field that also carries the orientation.\n  - `'auto'`: the proportions of the image, read once it has loaded (a square cover gives a square book); before that, and without an image, 17x24. Pick it when the image already has the true proportions.\n  - `'a4'`, `'a5'`, `'b5'`: the ISO formats, portrait. Any other format is `WxH` in centimetres, the order of the two numbers being the orientation: `'17x24'` portrait, `'24x17'` landscape, `'21x21'` square. A fixed format keeps its shape before the image loads and crops small differences of the image.\n- **`pages`**: the number of pages, from the catalogue record, which sets how deep the book is against the width of its format (17 cm for `'auto'`). A short book is printed on bulky paper and a long volume on thin paper, so a page goes from 0.1 mm at 1 page to 0.05 mm at 1000 pages and beyond, in proportion: 64 pages make 6 mm, 300 pages 2.5 cm, 1000 pages 5 cm, and an A4 of the same pages looks thinner than a 17x24. A spine under 5 mm carries no text.\n- **`binding`**: how the book is built, which shows on its head, its fore edge and its spine.\n  - `'paperback'`: cut flush, the cover a hairline on the same edge as the pages, a flat spine.\n  - `'hardcover'`: rigid boards about 2.5 mm thick, overhanging a page block set in from them by about 3 mm, the endpapers showing in the gap, a headband, a rounded spine and a hinge groove on the front.\n  - `'none'`: not bound, a stack of loose sheets cut flush, as a document is. The cover, image or drawn (author, title, publisher and its colour), is only the sheet on top, with no fold and no gloss; the pages show on all four sides, the side of the spine too, which carries no text.\n- **`name`**, **`author`**, **`publisher`**: the same names as on `<mds-bibliography>`, so one catalogue record feeds both.\n- **The spine**: the title, then the author, at the head, and the publisher at the foot. Where the spine has room for two lines, at least 13.5% as deep as the book is wide (about 23 mm on a 17x24, some 270 pages in paperback), the author goes under the title, smaller, as on a thick volume.\n- **`publisher-logo`**: the mark of the publisher, printed instead of its name at the foot of the spine and of a drawn cover (a cover image carries its own). Only its shape is printed, as a mask, in `--mds-book-publisher-color`, which is the colour of the text unless set, so a mark of any colour prints in the ink of the book. Give an svg, or a png on a transparent ground; an image from another origin needs CORS headers, as any mask does. The place stays empty while the mark loads, and the name of the publisher is printed if it fails.\n- **Size**: the book is sized as an image is, in the proportions of its format: give it a width, and its height follows; give it a height, and its width follows. With neither, it fills the width of its container, as a block does; where nothing gives it a width (a row of a flex layout) it is 200 px wide. Its box is the front cover at rest: the turned book reaches a little beyond it, by a few percent of its width on each side standing, by up to a third lying spun round, so leave it some room inside a container that clips.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-book>` 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#### A Book from Its Cover\n\nThe canonical form: the cover image and the catalogue data. The title and the author name the book for assistive technologies and are printed on the spine.\n\n```html\n<mds-book\n  src=\"/covers/operazioni-straordinarie.webp\"\n  name=\"Operazioni straordinarie\"\n  author=\"Antonio D'Amico e Sara Orlando\"\n  publisher=\"Maggioli Editore\"\n></mds-book>\n```\n\n#### Pages and Binding from the Catalogue Record\n\nPass the page count and the binding of the record as they are: the book takes its true depth, so a booklet and a large manual do not look alike.\n\n```html\n<mds-book src=\"/covers/guida-rapida.webp\" name=\"Guida rapida al GDPR\" pages=\"64\"></mds-book>\n\n<mds-book\n  src=\"/covers/codice-appalti.webp\"\n  name=\"Codice dei contratti pubblici\"\n  pages=\"1000\"\n  binding=\"hardcover\"\n></mds-book>\n```\n\n#### A Catalogue Grid\n\nThe book takes the width of its cell. Give the grid some gap: the turned books reach a little beyond their boxes.\n\n```html\n<div class=\"grid grid-cols-4 gap-1200\">\n  <mds-book src=\"/covers/1.webp\" name=\"Creare la holding\" author=\"Ennio Vial\"></mds-book>\n  <mds-book src=\"/covers/2.webp\" name=\"Chief AI Officer\" pages=\"480\"></mds-book>\n  <mds-book src=\"/covers/3.webp\" name=\"Aste immobiliari e vendita forzata\"></mds-book>\n  <mds-book src=\"/covers/4.webp\" name=\"Agenda dei servizi demografici 2027\"></mds-book>\n</div>\n```\n\n#### A Pose for the Layout\n\nPick the pose that suits where the book sits: `spine` in a catalogue, `front` beside a description, `lying` or `lying-turned` for a book on a desk in a hero or a banner.\n\n```html\n<mds-book src=\"/covers/manuale.webp\" name=\"Manuale\" pose=\"front\"></mds-book>\n\n<mds-book\n  src=\"/covers/codice-appalti.webp\"\n  name=\"Codice dei contratti pubblici\"\n  binding=\"hardcover\"\n  pages=\"640\"\n  pose=\"lying-turned\"\n></mds-book>\n```\n\n#### A Fixed Format\n\nWith `format=\"auto\"` (the default) the book takes the proportions of its image once it loads. Set the format when the catalogue knows it, so the book has its shape before the image arrives; write any format as `WxH` in centimetres, the width first.\n\n```html\n<mds-book src=\"/covers/modulistica.webp\" name=\"Modulistica\" format=\"a4\"></mds-book>\n\n<mds-book src=\"/covers/atlante.webp\" name=\"Atlante dei comuni\" format=\"29.7x21\"></mds-book>\n```\n\n#### A Book Without a Cover Image\n\nWithout `src`, the component draws a cover with the title, the author and the publisher. Give it the colour of the series: `--mds-book-color` paints only the drawn cover, also when an image fails, so it can be set on every book of a library, the books with an image keep the colours of their cover.\n\n```html\n<mds-book\n  name=\"Agenda dei servizi demografici 2027\"\n  publisher=\"Maggioli Editore\"\n  style=\"--mds-book-color: #f2a93b; --mds-book-text-color: #ffffff\"\n></mds-book>\n```\n\n#### A Document\n\nA document is not bound: give it `binding=\"none\"` and it is a stack of sheets, its pages showing on every side, its cover (the image, or the one the component draws) the sheet on top. A library of books and documents keeps one record shape: only the binding changes.\n\n```html\n<mds-book\n  binding=\"none\"\n  name=\"Circolare n. 122\"\n  author=\"Direzione centrale entrate\"\n  publisher=\"INPS\"\n  pages=\"24\"\n></mds-book>\n```\n\n#### The Mark of the Publisher\n\nGive the mark of the publisher instead of printing its name: it goes at the foot of the spine, and of the cover when the component draws it. Its shape is printed in the colour of the text, or in `--mds-book-publisher-color`; keep `publisher`, printed if the mark does not load.\n\n```html\n<mds-book\n  name=\"Agenda dei servizi demografici 2027\"\n  author=\"Redazione Maggioli\"\n  publisher=\"Maggioli Editore\"\n  publisher-logo=\"/logos/maggioli-editore.svg\"\n  style=\"--mds-book-color: #f2a93b; --mds-book-text-color: #ffffff\"\n></mds-book>\n```\n\n#### A Solid Spine\n\nWhen the left edge of the cover does not continue well onto the spine (a photo, a thin white border), give the spine and the board edges a colour of their own.\n\n```html\n<mds-book\n  src=\"/covers/manuale.webp\"\n  name=\"Manuale\"\n  style=\"--mds-book-spine-color: #123a6b\"\n></mds-book>\n```\n\n#### A Book That Opens Its Product Page\n\nThe book is an image, not a control: wrap it in a link, with the link named by the book. Turning the book with a drag does not open the link; a click does.\n\n```html\n<a href=\"/catalogo/creare-la-holding\">\n  <mds-book src=\"/covers/creare-la-holding.webp\" name=\"Creare la holding\" author=\"Ennio Vial\"></mds-book>\n</a>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-book>`. 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 `title` Attribute for the Title\n\n`title` is the native tooltip of every element: it shows a tooltip and prints nothing on the book. The title of the book is `name`.\n\n```html\n<!-- INCORRECT -->\n<mds-book src=\"/covers/manuale.webp\" title=\"Manuale\"></mds-book>\n\n<!-- CORRECT -->\n<mds-book src=\"/covers/manuale.webp\" name=\"Manuale\"></mds-book>\n```\n\n#### Do Not Draw the 3D With `<mds-img>` and CSS Transforms\n\nA transformed `<mds-img>` is a tilted flat picture: no spine, no pages, no drawn cover when the image fails, no reduced-motion handling.\n\n```html\n<!-- INCORRECT -->\n<mds-img src=\"/covers/manuale.webp\" alt=\"Manuale\" style=\"transform: perspective(600px) rotateY(25deg)\"></mds-img>\n\n<!-- CORRECT -->\n<mds-book src=\"/covers/manuale.webp\" name=\"Manuale\"></mds-book>\n```\n\n#### Do Not Turn the Book With a Transform\n\nA transform on the host turns the flat box the book is drawn in: the light on the faces, the shadow and the drag still work from the pose, which no longer matches. Pick a `pose`.\n\n```html\n<!-- INCORRECT -->\n<mds-book src=\"/covers/manuale.webp\" name=\"Manuale\" style=\"transform: rotateX(60deg)\"></mds-book>\n\n<!-- CORRECT -->\n<mds-book src=\"/covers/manuale.webp\" name=\"Manuale\" pose=\"lying\"></mds-book>\n```\n\n#### Do Not Set Both a Width and a Height\n\nThe book keeps the proportions of its format, as an image does: one dimension sets the other. Two that disagree leave the book as wide as its box and the box with a gap or an overflow.\n\n```html\n<!-- INCORRECT -->\n<mds-book src=\"/covers/manuale.webp\" name=\"Manuale\" style=\"width: 220px; height: 220px\"></mds-book>\n\n<!-- CORRECT -->\n<mds-book src=\"/covers/manuale.webp\" name=\"Manuale\" style=\"height: 320px\"></mds-book>\n```\n\n#### Do Not Write a Landscape Format as a Separate Orientation\n\nThere is no orientation prop: the order of the two numbers of `format` is the orientation.\n\n```html\n<!-- INCORRECT -->\n<mds-book name=\"Atlante\" format=\"a4\" orientation=\"landscape\"></mds-book>\n\n<!-- CORRECT -->\n<mds-book name=\"Atlante\" format=\"29.7x21\"></mds-book>\n```\n\n#### Do Not Repeat the Name Next to the Book for Assistive Technologies\n\nThe book is already named after `name` and `author`. A visible caption that repeats them makes screen readers read the title twice: mark the book decorative with `alt=\"\"` when a caption names it.\n\n```html\n<!-- INCORRECT -->\n<figure>\n  <mds-book src=\"/covers/manuale.webp\" name=\"Manuale\"></mds-book>\n  <figcaption>Manuale</figcaption>\n</figure>\n\n<!-- CORRECT -->\n<figure>\n  <mds-book src=\"/covers/manuale.webp\" name=\"Manuale\" alt=\"\"></mds-book>\n  <figcaption>Manuale</figcaption>\n</figure>\n```\n"
      },
      "props": [
        {
          "name": "alt",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "alt",
          "reflectToAttr": false,
          "docs": "The accessible name of the book. Without it the name is built from `name` and `author`;\nan empty `alt` marks the book as decorative, left out by assistive technologies",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "author",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "author",
          "reflectToAttr": false,
          "docs": "The author, printed on the cover drawn when there is no image, above the title, and on the\nspine after the title, or under it where the spine has room for two lines",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "binding",
          "type": "\"hardcover\" | \"none\" | \"paperback\"",
          "complexType": {
            "original": "BookBindingType",
            "resolved": "\"hardcover\" | \"none\" | \"paperback\"",
            "references": {
              "BookBindingType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-book/meta/types.ts::BookBindingType",
                "referenceLocation": "BookBindingType"
              }
            }
          },
          "mutable": false,
          "attr": "binding",
          "reflectToAttr": true,
          "docs": "How the book is bound: a thin flexible cover flush with the pages, rigid boards a little\nlarger than the page block, with a rounded spine, or not at all (`none`), a stack of loose\nsheets, a document: its cover is only the sheet on top, and the pages show on every side,\nthe side of the spine too, where nothing is printed",
          "docsTags": [
            {
              "name": "default",
              "text": "'paperback'"
            }
          ],
          "default": "'paperback'",
          "values": [
            {
              "value": "hardcover",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "paperback",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "format",
          "type": "\"a4\" | \"a5\" | \"auto\" | \"b5\" | `${number}x${number}`",
          "complexType": {
            "original": "BookFormatType",
            "resolved": "\"a4\" | \"a5\" | \"auto\" | \"b5\" | `${number}x${number}`",
            "references": {
              "BookFormatType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-book/meta/types.ts::BookFormatType",
                "referenceLocation": "BookFormatType"
              }
            }
          },
          "mutable": false,
          "attr": "format",
          "reflectToAttr": true,
          "docs": "The proportions of the book. `auto` takes them from the image; a named format (`a4`, `a5`,\n`b5`) is portrait; any other one is `WxH` in centimetres, the order of the two numbers being\nthe orientation (`17x24` portrait, `24x17` landscape, `21x21` square)",
          "docsTags": [
            {
              "name": "example",
              "text": "'17x24'"
            },
            {
              "name": "default",
              "text": "'auto'"
            }
          ],
          "default": "'auto'",
          "values": [
            {
              "value": "a4",
              "type": "string"
            },
            {
              "value": "a5",
              "type": "string"
            },
            {
              "value": "auto",
              "type": "string"
            },
            {
              "value": "b5",
              "type": "string"
            },
            {
              "type": "`${number}x${number}`"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "loading",
          "type": "\"eager\" | \"lazy\" | undefined",
          "complexType": {
            "original": "LoadingType",
            "resolved": "\"eager\" | \"lazy\" | undefined",
            "references": {
              "LoadingType": {
                "location": "import",
                "path": "@type/loading",
                "id": "src/type/loading.ts::LoadingType",
                "referenceLocation": "LoadingType"
              }
            }
          },
          "mutable": false,
          "attr": "loading",
          "reflectToAttr": false,
          "docs": "Specifies whether a browser should load the cover immediately or defer it until it is near\nthe viewport",
          "docsTags": [
            {
              "name": "default",
              "text": "'lazy'"
            }
          ],
          "default": "'lazy'",
          "values": [
            {
              "value": "eager",
              "type": "string"
            },
            {
              "value": "lazy",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": false,
          "docs": "The title of the book, printed on the spine and on the cover drawn when there is no image",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "pages",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "pages",
          "reflectToAttr": false,
          "docs": "The number of pages, which sets how deep the book is, against the width of its format (17 cm\nfor `auto`). A page is as thick as `--mds-book-page-weight-min` at 1 page, going to\n`--mds-book-page-weight-max` at 1000 pages and more, in proportion: by default from 0.1 mm,\nthe bulky paper of a short book, to 0.05 mm, the thin paper of a volume, so 64 pages make\n6 mm, 300 pages 2.5 cm and 1000 pages 5 cm. A spine under 5 mm deep carries no text",
          "docsTags": [
            {
              "name": "default",
              "text": "300"
            }
          ],
          "default": "300",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "pose",
          "type": "\"fore-edge\" | \"front\" | \"lying\" | \"lying-turned\" | \"spine\"",
          "complexType": {
            "original": "BookPoseType",
            "resolved": "\"fore-edge\" | \"front\" | \"lying\" | \"lying-turned\" | \"spine\"",
            "references": {
              "BookPoseType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-book/meta/types.ts::BookPoseType",
                "referenceLocation": "BookPoseType"
              }
            }
          },
          "mutable": false,
          "attr": "pose",
          "reflectToAttr": true,
          "docs": "How the book is shown: standing, turned to show its spine (`spine`) or its pages\n(`fore-edge`), or facing the reader (`front`); lying on its back, seen from above, its tail\ntoward the reader (`lying`) or spun on the surface (`lying-turned`). A drag turns it from\nthere, and it goes back when released",
          "docsTags": [
            {
              "name": "default",
              "text": "'spine'"
            }
          ],
          "default": "'spine'",
          "values": [
            {
              "value": "fore-edge",
              "type": "string"
            },
            {
              "value": "front",
              "type": "string"
            },
            {
              "value": "lying",
              "type": "string"
            },
            {
              "value": "lying-turned",
              "type": "string"
            },
            {
              "value": "spine",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "publisher",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "publisher",
          "reflectToAttr": false,
          "docs": "The publisher, printed at the foot of the spine and of the cover drawn when there is no\nimage, unless its `publisher-logo` is printed there instead",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "publisherLogo",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "publisher-logo",
          "reflectToAttr": false,
          "docs": "The mark of the publisher, printed instead of its name at the foot of the spine and of the\ncover drawn when there is no image: the path to an svg, or a png on a transparent ground.\nIts shape is printed, not its colours, in `--mds-book-publisher-color`. An image from\nanother origin needs CORS headers, as any mask does; one that does not load leaves the name",
          "docsTags": [
            {
              "name": "example",
              "text": "'/logos/maggioli-editore.svg'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "src",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "src",
          "reflectToAttr": false,
          "docs": "Specifies the path to the image of the front cover",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [
        {
          "event": "pointerenter",
          "capture": false,
          "passive": true
        },
        {
          "event": "pointermove",
          "capture": false,
          "passive": true
        },
        {
          "event": "pointerdown",
          "capture": false,
          "passive": true
        },
        {
          "event": "pointerup",
          "capture": false,
          "passive": true
        },
        {
          "event": "pointercancel",
          "capture": false,
          "passive": true
        },
        {
          "event": "lostpointercapture",
          "capture": false,
          "passive": false
        },
        {
          "event": "pointerleave",
          "capture": false,
          "passive": true
        },
        {
          "event": "click",
          "capture": true,
          "passive": false
        }
      ],
      "styles": [
        {
          "name": "--mds-book-color",
          "annotation": "prop",
          "docs": "The colour of the cover drawn when there is no image (no src, or one that fails), with its spine and board edges. A book with an image does not take it: it is printed on paper.",
          "visibility": "public",
          "static": true
        },
        {
          "name": "--mds-book-page-weight-max",
          "annotation": "prop",
          "docs": "The thickness of a page, in millimetres (a number), on a book of 1000 pages and more: the thin paper of a volume.",
          "visibility": "internal"
        },
        {
          "name": "--mds-book-page-weight-min",
          "annotation": "prop",
          "docs": "The thickness of a page, in millimetres (a number), on a book of 1 page; between 1 and 1000 pages it goes to --mds-book-page-weight-max in proportion.",
          "visibility": "internal"
        },
        {
          "name": "--mds-book-paper-color",
          "annotation": "prop",
          "docs": "The colour of paper: the page block, and the binding of a book with an image, under it.",
          "visibility": "internal"
        },
        {
          "name": "--mds-book-publisher-color",
          "annotation": "prop",
          "docs": "The colour of the publisher at the foot of the spine and of the cover drawn when there is no image, its mark or its name. Unset, the colour of the text.",
          "visibility": "public",
          "static": true
        },
        {
          "name": "--mds-book-spine-color",
          "annotation": "prop",
          "docs": "A solid colour for the spine and the board edges. Unset, they continue the edges of the cover image.",
          "visibility": "public",
          "static": true
        },
        {
          "name": "--mds-book-text-color",
          "annotation": "prop",
          "docs": "The colour of the text on the spine and on the cover drawn when there is no image.",
          "visibility": "public",
          "static": true
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "cover",
          "docs": "The native `<img>` that shows the front cover"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-book--docs"
    },
    {
      "filePath": "src/components/mds-breadcrumb/mds-breadcrumb.tsx",
      "encapsulation": "shadow",
      "tag": "mds-breadcrumb",
      "readme": "# mds-breadcrumb\n\n\n\nThis 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.\n",
      "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 `mds-breadcrumb-item` element/s."
        },
        {
          "name": "category",
          "text": "navigation"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-breadcrumb>` web component is the navigation-trail container of the Magma Design System. It is a compound parent that arranges a sequence of slotted `<mds-breadcrumb-item>` children into a hierarchical path and adds an optional back-navigation control.\n\n#### Semantic Behavior\n\n- **Compound parent/child**: The default slot accepts only `<mds-breadcrumb-item>` children.\n- **Selection tracking**: When the user selects a child it becomes the single current depth and the others are cleared. Setting `selected` from code emits nothing, so the parent does not react to it.\n- **Back button**: Unless `hide-back` is set the host renders a leading arrow that steps selection to the previous item; it auto-disables whenever the first item is current (or, on load, when no item is).\n- **Change event**: `mdsBreadcrumbChange` fires after any selection change - via a child click or the back arrow - carrying the new index `id` and a `caller` item: the item now selected, the clicked one or the one the back arrow steps to.\n- **Localized back button**: The back button's `title` is resolved per document language (el/en/es/it).\n\n#### Properties & Visual Configurations\n\nThis component exposes a single behavioral prop:\n\n- **`hideBack`** removes the leading arrow control. Leave it off (the default) for multi-level trails where users benefit from a one-tap step backwards; set it for shallow or display-only breadcrumbs where reverse navigation adds no value.\n\nVisual styling (item button colors, separator arrow color) is not driven by props, and `mds-breadcrumb` has no public CSS custom property: the colors follow the semantic roles of the theme, the selected item's included. To restyle the buttons, target the `button` part of the child [`mds-breadcrumb-item`](../mds-breadcrumb-item/AGENTS.md): it is the item's `<mds-button>`, so it takes the public `--mds-button-*` custom properties. The shared `variant` / `tone` / `size` ladders defined in [`agents/variants.md`](../../../../agents/variants.md) do not apply here; per-item labels and selection state live on the `<mds-breadcrumb-item>` children.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-breadcrumb>` 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 Navigation Trail\n\nThe canonical form. Slot one `<mds-breadcrumb-item>` per level and mark the current depth with `selected`. The back arrow is shown by default.\n\n```html\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio pratiche\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Pratica 2024/001\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Without the Back Arrow\n\nAdd the `hide-back` attribute for display-only or shallow breadcrumbs where reverse navigation adds no value. The back arrow is shown by default, so this is an explicit opt-out.\n\n```html\n<mds-breadcrumb hide-back>\n  <mds-breadcrumb-item label=\"Impostazioni\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Profilo utente\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Listening for Navigation Changes\n\n`mdsBreadcrumbChange` fires whenever a child item is clicked or the back arrow is activated. The detail carries the zero-based `id` string of the newly selected item and a `caller` element: the clicked item, or for the back arrow the item that was current before the step.\n\n```html\n<mds-breadcrumb id=\"nav\">\n  <mds-breadcrumb-item label=\"Dashboard\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Documenti\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Fatture\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n\n<script>\n  document.getElementById('nav').addEventListener('mdsBreadcrumbChange', (e) => {\n    console.log('Livello selezionato:', e.detail.id);\n    console.log('Elemento:', e.detail.caller);\n  });\n</script>\n```\n\n#### Programmatic Selection\n\nSet `selected` in the markup on the item you want active on load: the parent reads it to set the back button state (disabled on the first item). Setting `selected` later from JavaScript emits no event, so the parent neither clears the other items nor updates the back button.\n\n```html\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Progetto Alpha\" selected></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Sprint 3\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Attivita\"></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Item Label via `label` Prop\n\nAlways set the text with the `label` prop on `<mds-breadcrumb-item>`: the item has no slot. The prop is reflected as an HTML attribute, enabling CSS attribute selectors and framework bindings.\n\n```html\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Area riservata\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Gestione utenti\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Nuovo utente\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Styling Customization via CSS Custom Properties\n\n`mds-breadcrumb` has no public CSS custom property: style it with its props, the `button` part of its items and the semantic roles. The item colors, the selected item's included, and the separator arrow follow the semantic color roles of the theme, so dark mode and high-contrast modes keep working with no override. To retheme the whole trail at once, target the `button` part of every child `<mds-breadcrumb-item>` from a parent selector: the part is the item's `<mds-button>`, so it takes the public `--mds-button-*` custom properties. Use semantic color roles wrapped in `rgb(var(--magma-<role>))`.\n\n```css\n.sidebar-nav mds-breadcrumb-item::part(button) {\n  --mds-button-color: rgb(var(--magma-accent-fg));\n}\n.sidebar-nav mds-breadcrumb-item[selected]::part(button) {\n  --mds-button-color: rgb(var(--magma-text-default));\n}\n```\n\n#### Per-Item Styling via `::part(button)`\n\nWhen you need to restyle a single item's inner button beyond what the CSS vars allow, target the documented `::part(button)` on `<mds-breadcrumb-item>`. This is the only supported shadow-part surface on the child component.\n\n```css\nmds-breadcrumb-item[selected]::part(button) {\n  font-weight: bold;\n  letter-spacing: 0.02em;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-breadcrumb>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, raw native event listening) live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Slot Raw HTML Inside `<mds-breadcrumb>`\n\nThe default slot accepts only `<mds-breadcrumb-item>` elements; slotting arbitrary HTML breaks the internal selection-tracking and back-button logic.\n\n```html\n<!-- INCORRECT -->\n<mds-breadcrumb>\n  <a href=\"/home\">Home</a>\n  <span>Archivio</span>\n  <strong>Documento corrente</strong>\n</mds-breadcrumb>\n\n<!-- CORRECT -->\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Documento corrente\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Do Not Use `<mds-breadcrumb-item>` Outside `<mds-breadcrumb>`\n\nChild items rely on the parent for an ID when they have none and for selection-state management. Rendered standalone they get no back button, no sibling deselection and no `mdsBreadcrumbChange`.\n\n```html\n<!-- INCORRECT -->\n<div class=\"my-nav\">\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Sezione\" selected></mds-breadcrumb-item>\n</div>\n\n<!-- CORRECT -->\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Sezione\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Do Not Pass Text or HTML as `<mds-breadcrumb-item>` Children\n\n`<mds-breadcrumb-item>` has no default slot; the `label` prop is the only way to set the visible text. Text or HTML placed between the tags is ignored and never rendered.\n\n```html\n<!-- INCORRECT -->\n<mds-breadcrumb>\n  <mds-breadcrumb-item>\n    <strong>Categoria</strong>\n  </mds-breadcrumb-item>\n  <mds-breadcrumb-item selected>\n    <span class=\"active\">Sottocategoria</span>\n  </mds-breadcrumb-item>\n</mds-breadcrumb>\n\n<!-- CORRECT -->\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Categoria\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Sottocategoria\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Do Not Manage Selection State Manually by Toggling Classes\n\nThe parent tracks which item is selected internally; toggling CSS classes or `aria-current` on the host bypasses that logic and leaves the back button in an inconsistent state. Use the `selected` prop instead.\n\n```html\n<!-- INCORRECT -->\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Home\" class=\"is-active\" aria-current=\"page\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio\"></mds-breadcrumb-item>\n</mds-breadcrumb>\n\n<!-- CORRECT -->\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Home\" selected></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio\"></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Internal Back Button\n\nThe back button rendered inside `<mds-breadcrumb>` is a private implementation detail: it exposes no part and no public custom property. To remove it, set `hide-back`.\n\n```css\n/* INCORRECT */\nmds-breadcrumb >>> .back {\n  background: red;\n}\nmds-breadcrumb::part(back) {\n  display: none;\n}\n\n/* CORRECT - no part reaches the back button: remove it with hide-back */\n```\n\n```html\n<!-- CORRECT -->\n<mds-breadcrumb hide-back>\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n"
      },
      "props": [
        {
          "name": "hideBack",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-back",
          "reflectToAttr": false,
          "docs": "Hides the back arrow button",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsBreadcrumbChange",
          "detail": "MdsBreadcrumbEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsBreadcrumbEventDetail",
            "resolved": "MdsBreadcrumbEventDetail",
            "references": {
              "MdsBreadcrumbEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-breadcrumb/meta/event-detail.ts::MdsBreadcrumbEventDetail",
                "referenceLocation": "MdsBreadcrumbEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the breadcrumb is changed",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "mdsBreadcrumbItemSelect",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [
        {
          "name": "--mds-breadcrumb-arrow-depth-color",
          "annotation": "prop",
          "docs": "Sets the color of the arrow icon that separates buttons",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-button-background",
          "annotation": "prop",
          "docs": "Sets the background color of the button",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-button-background-disabled",
          "annotation": "prop",
          "docs": "Sets the background color of the back arrow button when it's disabled, on the first item",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-button-background-hover",
          "annotation": "prop",
          "docs": "Sets the background color of the button when the mouse is over it",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-button-background-selected",
          "annotation": "prop",
          "docs": "Sets the background color of the button of the selected item",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-button-color",
          "annotation": "prop",
          "docs": "Sets the text color of the button",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-button-color-current",
          "annotation": "prop",
          "docs": "Deprecated, use `--mds-breadcrumb-button-color-selected`; read only when that one is not set",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-button-color-hover",
          "annotation": "prop",
          "docs": "Sets the text color of the button when the mouse is over it",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-button-color-selected",
          "annotation": "prop",
          "docs": "Sets the text color of the button of the selected item",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-current-button-color",
          "annotation": "prop",
          "docs": "Deprecated, use `--mds-breadcrumb-button-color-selected`; read only when neither that one nor `--mds-breadcrumb-button-color-current` is set",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-breadcrumb-item` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-breadcrumb": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-breadcrumb--docs"
    },
    {
      "filePath": "src/components/mds-breadcrumb-item/mds-breadcrumb-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-breadcrumb-item",
      "readme": "# mds-breadcrumb-item\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "button - The `mds-button` of the item, which shows its `label`"
        },
        {
          "name": "parent",
          "text": "mds-breadcrumb"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-breadcrumb-item>` web component represents a single navigable depth in a breadcrumb trail. It is a compound child of [`<mds-breadcrumb>`](../mds-breadcrumb/AGENTS.md) and renders a clickable label followed by a separator arrow.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct default-slot child of `<mds-breadcrumb>`; it is not used standalone and the parent's slot should contain only `mds-breadcrumb-item` elements, not mixed child types.\n- **Selection is parent-orchestrated**: Clicking the item emits `mdsBreadcrumbItemSelect` with `{ id, selected }`; the parent then marks the matching item selected and clears the others, so only one item is selected at a time.\n- **Selected item is the current page**: While `selected` is true the item ignores pointer clicks and keyboard activation, and its button carries `aria-current=\"page\"`. Non-selected items remain clickable.\n- **Keyboard activation**: The item responds to Enter and Space in addition to pointer clicks.\n- **Decorative separator**: The trailing arrow is decorative and carries no semantic meaning.\n\n#### Properties & Visual Configurations\n\nThis child exposes essentially no visual configuration of its own - appearance is inherited from `<mds-breadcrumb>` and the shared button system, and it has no public CSS custom property: styling overrides are done through its `button` part, the item's `<mds-button>`, with the public `--mds-button-*` custom properties.\n\n- **`label`**: The item's visible text. This is the only way to set the text - the component renders it through an internal `<mds-button>` and exposes no default slot. It matches the `label` prop convention used across Magma components.\n- **`selected`**: Marks this item as the current depth. In normal use you set it on at most one item as the initial state; thereafter the parent manages it in response to navigation. Use it only to seed which depth is active on first render.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-breadcrumb-item>` 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 Breadcrumb Trail\n\nThe canonical form. Place `<mds-breadcrumb-item>` elements as direct children of [`<mds-breadcrumb>`](../mds-breadcrumb/AGENTS.md). Use the `label` prop for each step's text.\n\n```html\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Dettaglio documento\"></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Seeding the Active Depth with `selected`\n\nSet `selected` on the item that represents the user's current location on first render. The parent [`<mds-breadcrumb>`](../mds-breadcrumb/AGENTS.md) takes over selection management after that; do not set `selected` on more than one item at a time.\n\n```html\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Documenti\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Listening for Navigation Changes\n\nListen to `mdsBreadcrumbItemSelect` on the item, or to `mdsBreadcrumbChange`, which the parent [`<mds-breadcrumb>`](../mds-breadcrumb/AGENTS.md) emits after updating the selection, to react when the user navigates to a different depth.\n\n```html\n<mds-breadcrumb id=\"nav\">\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Pratiche\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Dettaglio\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n\n<script>\n  document.querySelector('#nav').addEventListener('mdsBreadcrumbChange', (e) => {\n    console.log('profondita selezionata:', e.detail.id);\n  });\n</script>\n```\n\n#### Styling the Arrow Separator\n\n`mds-breadcrumb-item` has no public CSS custom property, and the separator icon exposes no part: it takes the subtle text color of the theme, so it keeps working in dark mode and high-contrast modes with no override. Restyle the button of the item instead, through its `button` part.\n\n#### Styling Button States\n\nRestyle the button through the `button` part: it is the item's `<mds-button>`, so it takes the public `--mds-button-*` custom properties. Target the hover state with `:hover` on the part and the selected one with the item's `selected` attribute, and use semantic color roles wrapped in `rgb(var(--magma-<role>))` so dark mode keeps working.\n\n```css\n.sidebar-nav mds-breadcrumb-item::part(button) {\n  --mds-button-color: rgb(var(--magma-text-muted));\n}\n.sidebar-nav mds-breadcrumb-item::part(button):hover {\n  --mds-button-color: rgb(var(--magma-text-default));\n}\n.sidebar-nav mds-breadcrumb-item[selected]::part(button) {\n  --mds-button-background: rgb(var(--magma-accent-surface-subtle));\n  --mds-button-color: rgb(var(--magma-accent-fg));\n}\n```\n\n#### Styling the Internal Button via `::part(button)`\n\nThe internal `<mds-button>` is exposed as `::part(button)`. Use it for what the item does not expose - for example to adjust padding or border radius for a product-specific surface.\n\n```css\n.compact-nav mds-breadcrumb-item::part(button) {\n  --mds-button-radius: var(--magma-radius-sm);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-breadcrumb-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 Outside `<mds-breadcrumb>`\n\n`<mds-breadcrumb-item>` is a compound child; it communicates with its parent through internal events and relies on the parent to assign IDs, manage selection, and control the back button. Outside the parent it renders an isolated button with no selection management.\n\n```html\n<!-- INCORRECT -->\n<nav>\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio\"></mds-breadcrumb-item>\n</nav>\n\n<!-- CORRECT -->\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio\"></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Do Not Pass Text or HTML as Children\n\n`<mds-breadcrumb-item>` has no default slot - it renders its text through an internal `<mds-button>` driven by the `label` prop. Anything placed between the tags (plain text or HTML) is ignored and never rendered. Always use the `label` prop.\n\n```html\n<!-- INCORRECT -->\n<mds-breadcrumb-item>Dettaglio</mds-breadcrumb-item>\n<mds-breadcrumb-item><strong>Dettaglio</strong></mds-breadcrumb-item>\n\n<!-- CORRECT -->\n<mds-breadcrumb-item label=\"Dettaglio\"></mds-breadcrumb-item>\n```\n\n#### Do Not Select More Than One Item at Initialisation\n\n`selected` should be set on at most one item as the initial active depth. Marking multiple items selected puts the breadcrumb in an inconsistent state that the parent cannot resolve until the next click.\n\n```html\n<!-- INCORRECT -->\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Home\" selected></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio\" selected></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Dettaglio\"></mds-breadcrumb-item>\n</mds-breadcrumb>\n\n<!-- CORRECT -->\n<mds-breadcrumb>\n  <mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Archivio\"></mds-breadcrumb-item>\n  <mds-breadcrumb-item label=\"Dettaglio\" selected></mds-breadcrumb-item>\n</mds-breadcrumb>\n```\n\n#### Do Not Set `selected=\"false\"` to Deselect\n\n`selected` is a boolean attribute. Stencil reads the string `\"false\"` as `false`, but the attribute stays on the element: the item keeps the selected styling and ignores pointer clicks (`:host([selected])`), and the parent's `[selected]` query still counts it. Remove the attribute entirely to deselect.\n\n```html\n<!-- INCORRECT -->\n<mds-breadcrumb-item label=\"Home\" selected=\"false\"></mds-breadcrumb-item>\n\n<!-- CORRECT -->\n<mds-breadcrumb-item label=\"Home\"></mds-breadcrumb-item>\n```\n\n#### Do Not Listen for Native `click` to Track Navigation\n\nThe component emits `mdsBreadcrumbItemSelect` when a step is activated and the parent emits `mdsBreadcrumbChange`. A native `click` carries no depth, and it fires even on the already-selected (inert) item and on the separator arrow.\n\n```html\n<!-- INCORRECT -->\n<script>\n  document.querySelector('mds-breadcrumb-item').addEventListener('click', (e) => {\n    // no depth in the event; fires even on the selected/inert item\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('mds-breadcrumb').addEventListener('mdsBreadcrumbChange', (e) => {\n    console.log('nuovo passo attivo:', e.detail.id);\n  });\n</script>\n```\n\n#### Do Not Pierce Shadow DOM to Style Internals\n\n`mds-breadcrumb-item` has no public CSS custom property: the supported customization surface is the `::part(button)` export, the item's `<mds-button>` with its public `--mds-button-*` custom properties. The separator icon follows the theme. Targeting internal classes directly couples your code to the shadow DOM implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-breadcrumb-item >>> .icon {\n  fill: red;\n}\n\n/* CORRECT */\nmds-breadcrumb-item::part(button) {\n  --mds-button-color: rgb(var(--magma-accent-fg));\n}\n```\n"
      },
      "props": [
        {
          "name": "label",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": true,
          "docs": "Sets the label of the breadcrumb item",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Choose if the component is selected or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsBreadcrumbItemSelect",
          "detail": "MdsBreadcrumbItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsBreadcrumbItemEventDetail",
            "resolved": "MdsBreadcrumbItemEventDetail",
            "references": {
              "MdsBreadcrumbItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-breadcrumb-item/meta/event-detail.ts::MdsBreadcrumbItemEventDetail",
                "referenceLocation": "MdsBreadcrumbItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the breadcrumb is active",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-breadcrumb-item-arrow-depth-color",
          "annotation": "prop",
          "docs": "Sets the color of the arrow icon that separates buttons",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-item-button-background",
          "annotation": "prop",
          "docs": "Sets the background color of the button",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-item-button-background-hover",
          "annotation": "prop",
          "docs": "Sets the background color of the button when the mouse is over it",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-item-button-background-selected",
          "annotation": "prop",
          "docs": "Sets the background color of the button when it's active",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-item-button-color",
          "annotation": "prop",
          "docs": "Sets the text color of the button",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-item-button-color-hover",
          "annotation": "prop",
          "docs": "Sets the text color of the button when the mouse is over it",
          "visibility": "internal"
        },
        {
          "name": "--mds-breadcrumb-item-button-color-selected",
          "annotation": "prop",
          "docs": "Sets the text color of the button when it's active",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "button",
          "docs": "The `mds-button` of the item, which shows its `label`"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-breadcrumb-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-breadcrumb-breadcrumb-item--docs"
    },
    {
      "filePath": "src/components/mds-button/mds-button.tsx",
      "encapsulation": "shadow",
      "tag": "mds-button",
      "readme": "# mds-button\n\n\n\nThis 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.\n",
      "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": "slot",
          "text": "notification - Add `HTML elements` or `components`, it is **recommended** to use `mds-notification` element."
        },
        {
          "name": "part",
          "text": "icon - The icon inside the component"
        },
        {
          "name": "part",
          "text": "label - The text of the button: the `label`, or the default slot when `label` is not set"
        },
        {
          "name": "category",
          "text": "actions"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-button>` web component is the primary interactive action control of the Magma Design System. It renders as a button, or as a link when `href` is set, handling form association, accessibility, loading state, and iconography natively.\n\n#### Semantic Behavior\n\n- **Button vs. link**: Providing `href` renders a real anchor inside the component and gives the host `role=\"link\"`. The browser follows the link, so a modifier or middle click opens it in a new tab and the context menu offers the link actions; `target=\"blank\"` opens a new tab on a plain click too. A `click` listener on the host cancels the navigation with `preventDefault()`, which is how a client-side router takes over. A click from the keyboard, a script or an assistive technology lands on the host and is followed the same way, unless cancelled.\n- **Download**: with `href`, `download` saves the file instead of opening it, as on a native `<a download>`: with no value the file keeps the name the server gives it, a value names the saved file. Browsers apply it to the URLs of the origin of the page, `blob:` and `data:` only. A download never goes to the router: the click of the pointer, of the keyboard and of a script all reach the anchor, which saves the file.\n- **Form association**: Inside a `<form>` the component submits (`type=\"submit\"`, default) or resets (`type=\"reset\"`) it like a native button, with no extra wiring; use `type=\"button\"` to opt out. With `name` set, a submit sends `name=value`, so buttons that submit the same form tell the receiver which one was chosen. A custom element cannot be a submitter, so `event.submitter` is a hidden native button that stands in for the component: it carries the same `name` and `value`, but it is not the `mds-button` element.\n- **Active state**: Mirrors a visual pressed state through the `active` attribute, safe to drive from CSS attribute selectors. It is cleared when the pointer is released: it does not mark the view you are in, `current` does.\n- **Current state**: `current` marks the button that leads to the view you are in, the current section of a bar or the current view of a switcher. `current` (or `current=\"page\"`) is that view: the button takes no pointer, Enter does nothing, and a click from a script neither navigates nor submits, so going there again never reloads it; it stays in the Tab order, announced with `aria-current=\"page\"` on a link and `aria-current=\"true\"` otherwise. `current=\"section\"` is a view inside it, a record of its list: the same look, but the button stays a link that brings you back, announced with `aria-current=\"true\"`. An `aria-current` written on the host (`step`, `date`) stays as written. The look: an area that weighs less than the hover of the tone, never its ring, so the hover of the other buttons still weighs more. `weak` takes the selected wash of its family (`--magma-accent-surface-selected`, `-wash-soft` for a status variant), `strong` keeps its fill, `outline` and `text` take the wash of their hover, and a variant whose hover keeps the area (`dark` and `light` weak, `light` strong) keeps it too. The label is one weight heavier (`xl` is black already), which marks the state where the area stays under 3:1; the look holds on hover. Never mark the current button with `disabled`, `aria-disabled` or a style of your own.\n- **Disabled state**: Blocks pointer and keyboard activation and removes the host from the tab sequence. A disabled `<fieldset>` around the button disables it the same way, as it does a native button, without setting `disabled`.\n- **Await state**: Renders an inline spinner, blocks pointer and keyboard activation, and sets `aria-busy=\"true\"` for assistive tech. The button keeps the focus it had, and a click from a script or an assistive technology neither submits nor resets its form again. Remove the attribute when done - do not set `await=\"false\"`.\n- **Keyboard**: Enter activates the button as a click does, and so does Space, on release, as on a native button; a button with `href` is a link, which Enter follows and Space does not.\n- **Accessibility**: Sets `role=\"button\"` on the host, `role=\"link\"` when `href` is set, whatever the format of the icon; the `label` prop (or slotted text) is rendered as the button text, which names it. Without a label, an `aria-label` or a `title`, the component sets `title` from the last segment of the icon slug (`mi/baseline/delete` -> \"delete\"), which names the icon, not the action; an icon given as inline SVG or base64 has no slug, and leaves the button with no name at all: icon-only buttons need an explicit `aria-label` (or `title`), or an `mds-tooltip` with `relation=\"label\"`. A host with `aria-labelledby` gets no name from the slug, and loses the one it had when the attribute comes later, as it does from the tooltip.\n- **Sizing**: The `size` prop drives padding, font size, and minimum hit area. Do not override dimensions with inline `width` / `height`.\n- **Linking constraint**: `target` is effective only when `href` is set.\n\n#### Component-specific variants and tones\n\nThe shared `variant` / `tone` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md). `<mds-button>` adds:\n\n- **`variant=\"google\"` / `variant=\"apple\"`**: brand-correct chrome for SSO entry points. Do not reuse them for non-SSO buttons.\n- **`tone=\"box\"`**: the `strong` fill with an embossed, raised shadow (`--shadow-box-solid-strong`) and a brighter hover: more marked than `strong`, not less.\n\n#### Other behavioral props\n\n- **`icon`** is an SVG filename slug from the Magma icon library; **`iconPosition`** places the glyph relative to the label (use `right` for forward-motion CTAs).\n- **`iconCurrent`** and **`iconHover`** take the place of `icon` in their state: `iconCurrent` on the current button, `iconHover` under the pointer, which falls back on `iconCurrent`. One attribute gives the common pair, an outline icon at rest and the filled one on the current button, which the pointer previews on the others. Set `iconHover` to the `icon` to keep the icon still under the pointer, when `iconCurrent` says something the click does not do (a check). A pointer that cannot hover, a finger, never shows `iconHover`; the current button shows `iconCurrent` under the pointer too. Both need `icon`, which gives the icon its room, and the name taken from the slug stays the one of `icon`. Write every slug out whole, as for `icon`: the icons a product serves are the ones read in its sources.\n- **`truncate`**: `word` (default) keeps the label on one line and cuts it with an ellipsis, `all` clamps it with `line-clamp` (one line in the button), `none` lets it wrap onto more lines.\n- **`animation`**: `yugop` progressively reveals characters; otherwise text renders immediately.\n- **The first letter** of the label is uppercased. For a name or an identifier that must stay as written (`rdsysadmin`), set `--mds-button-label-transform: none` on the button or on any ancestor: the property inherits, so it also reaches the buttons that other components, `mds-button-dropdown` among them, render in their shadow root.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-button>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Text Button via `label` Prop\n\nThe canonical form. Use the `label` prop for the button's text; it is rendered inside the button and is its accessible name, so screen readers work without extra wiring.\n\n```html\n<mds-button label=\"Conferma azione\" variant=\"primary\" tone=\"strong\"></mds-button>\n```\n\n#### Variant and Tone for Emphasis\n\nPair the same `variant` with a different `tone` to express importance. Do not invent custom colors to dim or saturate.\n\n```html\n<!-- High emphasis: primary call to action -->\n<mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n\n<!-- Medium emphasis: supporting action -->\n<mds-button label=\"Modifica\" variant=\"primary\" tone=\"outline\"></mds-button>\n\n<!-- Low emphasis: in-text or destructive secondary action -->\n<mds-button label=\"Annulla\" variant=\"error\" tone=\"text\"></mds-button>\n```\n\n#### Sizing\n\nUse the `size` prop. Do not override dimensions with inline `width` / `height`.\n\n```html\n<mds-button label=\"Small\" size=\"sm\" variant=\"primary\"></mds-button>\n<mds-button label=\"Medium\" size=\"md\" variant=\"primary\"></mds-button>\n<mds-button label=\"Large\" size=\"lg\" variant=\"primary\"></mds-button>\n<mds-button label=\"Extra large\" size=\"xl\" variant=\"primary\"></mds-button>\n```\n\n#### Button with Icon\n\nReference icons by their filename slug (no `.svg` extension). `icon-position` defaults to `left`; set it to `right` for forward-motion CTAs.\n\n```html\n<!-- Left icon (default) -->\n<mds-button label=\"Aggiungi\" icon=\"mi/baseline/add\" variant=\"primary\" tone=\"weak\"></mds-button>\n\n<!-- Right icon -->\n<mds-button\n  label=\"Avanti\"\n  icon=\"mi/baseline/arrow-forward\"\n  icon-position=\"right\"\n  variant=\"primary\"\n></mds-button>\n```\n\n#### Icon-Only Button\n\nOmit `label` and provide `aria-label` (or `title`) explicitly. Without one, the component names the button after the last segment of the icon slug (\"delete\"), which names the icon, not the action.\n\n```html\n<mds-button\n  icon=\"mi/baseline/delete\"\n  aria-label=\"Elimina elemento\"\n  variant=\"error\"\n  tone=\"text\"\n></mds-button>\n```\n\nWhen an `mds-tooltip` shows the name of the button, let the tooltip be the name with `relation=\"label\"` instead: the button then needs no `aria-label`, and gets no `title` from the icon slug.\n\n```html\n<mds-button id=\"elimina-btn\" icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\"></mds-button>\n<mds-tooltip target=\"#elimina-btn\" relation=\"label\">Elimina elemento</mds-tooltip>\n```\n\n#### Hyperlink via `href`\n\nSetting `href` renders a real link: the browser follows it, in a new tab on a modifier or middle click, and the context menu offers the link actions. Use `target=\"blank\"` to open in a new tab on a plain click too; default is `self`.\n\n```html\n<mds-button\n  label=\"Visita il sito\"\n  href=\"https://example.com\"\n  target=\"blank\"\n  variant=\"primary\"\n  tone=\"outline\"\n></mds-button>\n```\n\n#### Download via `download`\n\nWith `href`, `download` saves the file instead of opening it in the tab, a file the browser can show (JSON, XML, a PDF) included; its value is the name of the saved file. The URL has to be on the origin of the page.\n\n```html\n<mds-button\n  label=\"Scarica i colori\"\n  href=\"/downloads/colors.xml\"\n  download=\"colors.xml\"\n  icon=\"mi/baseline/download\"\n  tone=\"outline\"\n></mds-button>\n```\n\n#### Client-Side Routing via `href`\n\nIn a single-page app keep `href` for the link it gives (new tab, context menu, crawlers) and register the router once with `NavigationService`, from `@maggioli-design-system/magma/services`: every component link is then routed on the client on a plain click, with no listener per button. A modifier or middle click, `target=\"blank\"`, `download` and a link to another origin stay with the browser; return `false` from the handler for a link the browser is to load.\n\n```html\n<mds-button label=\"Pratiche\" href=\"/pratiche\" variant=\"primary\" tone=\"text\"></mds-button>\n\n<script type=\"module\">\n  import { NavigationService } from '@maggioli-design-system/magma/services';\n\n  NavigationService.setHandler((href) => router.navigate(href));\n</script>\n```\n\nWithout a registered router, cancel the click on the button and route by hand: the component honours `preventDefault()`. Leave a modifier click alone, so that the browser opens the link in a new tab.\n\n```html\n<script>\n  document.querySelector('mds-button[href]').addEventListener('click', (event) => {\n    if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n    event.preventDefault();\n    router.navigate(event.currentTarget.href);\n  });\n</script>\n```\n\n#### The Current Section via `current`\n\nMark the button that leads to the view you are in with `current`: the section of the bar of the page on screen, the view of a switcher. It does nothing when clicked, so it never reloads the page, and it is announced as the current page. On a page inside a section, a record of its list, write `current=\"section\"`: the same look, and the button stays a link back to the list.\n\n```html\n<!-- the list of the records: Pratiche is the page on screen -->\n<mds-header-bar>\n  <mds-text typography=\"h6\" tag=\"p\">Servizi demografici</mds-text>\n  <mds-button slot=\"nav\" href=\"/pratiche\" variant=\"dark\" tone=\"text\" current>Pratiche</mds-button>\n  <mds-button slot=\"nav\" href=\"/contatti\" variant=\"dark\" tone=\"text\">Contatti</mds-button>\n</mds-header-bar>\n\n<!-- one record of the list: Pratiche brings you back to it -->\n<mds-button slot=\"nav\" href=\"/pratiche\" variant=\"dark\" tone=\"text\" current=\"section\">Pratiche</mds-button>\n\n<!-- the view of a switcher, with no page of its own: aria-current=\"true\" -->\n<mds-button label=\"Lista\" tone=\"weak\" type=\"button\" current></mds-button>\n<mds-button label=\"Mappa\" tone=\"weak\" type=\"button\"></mds-button>\n```\n\n#### The Icon of Each State via `icon-current` and `icon-hover`\n\n`icon-current` takes the place of `icon` on the current button, and under the pointer too, which previews it on the other buttons: one attribute gives an outline icon at rest and the filled one on the view you are in. `icon-hover` sets the icon under the pointer on its own; set it to the `icon` to keep the icon still, when the icon of the current button says something the click does not do. Write the slugs out whole.\n\n```html\n<!-- outline at rest, filled on the current section and under the pointer -->\n<mds-button\n  slot=\"nav\"\n  href=\"/pratiche\"\n  variant=\"dark\"\n  tone=\"text\"\n  icon=\"mi/outline/folder\"\n  icon-current=\"mi/baseline/folder\"\n  current\n>Pratiche</mds-button>\n<mds-button\n  slot=\"nav\"\n  href=\"/contatti\"\n  variant=\"dark\"\n  tone=\"text\"\n  icon=\"mi/outline/contacts\"\n  icon-current=\"mi/baseline/contacts\"\n>Contatti</mds-button>\n\n<!-- a check on the current view, and none under the pointer: it would say the view is chosen -->\n<mds-button\n  label=\"Elenco\"\n  tone=\"weak\"\n  type=\"button\"\n  icon=\"mi/baseline/view-list\"\n  icon-current=\"mi/baseline/check\"\n  icon-hover=\"mi/baseline/view-list\"\n  current\n></mds-button>\n<mds-button\n  label=\"Griglia\"\n  tone=\"weak\"\n  type=\"button\"\n  icon=\"mi/baseline/grid-view\"\n  icon-current=\"mi/baseline/check\"\n  icon-hover=\"mi/baseline/grid-view\"\n></mds-button>\n\n<!-- another icon under the pointer only -->\n<mds-button\n  icon=\"mi/baseline/close\"\n  icon-hover=\"mi/outline/close\"\n  aria-label=\"Chiudi\"\n  variant=\"dark\"\n  tone=\"text\"\n></mds-button>\n```\n\n#### Async Loading via `await`\n\nSet the `await` boolean attribute while a request is in flight. The component renders an inline spinner, blocks pointer activation, and sets `aria-busy=\"true\"`. Remove the attribute when done - do not set `await=\"false\"`.\n\n```html\n<mds-button label=\"Salvataggio in corso...\" await variant=\"primary\"></mds-button>\n```\n\n#### Form Participation\n\n`<mds-button>` is form-associated. Inside a `<form>` it natively triggers submit (`type=\"submit\"`, default) or reset (`type=\"reset\"`). Use `type=\"button\"` for any action that must not submit the form.\n\n```html\n<form action=\"/save\" method=\"post\">\n  <mds-input-field label=\"Titolo\">\n    <mds-input name=\"title\"></mds-input>\n  </mds-input-field>\n\n  <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n  <mds-button type=\"reset\" label=\"Reimposta\" variant=\"dark\" tone=\"outline\"></mds-button>\n  <mds-button type=\"button\" label=\"Anteprima\" variant=\"primary\" tone=\"text\"></mds-button>\n</form>\n```\n\n#### Several Actions That Submit One Form\n\nGive the buttons the same `name` and a different `value`, as with native submit buttons: the receiver reads which action was chosen from `name`.\n\n```html\n<form action=\"/mail\" method=\"post\">\n  <mds-input-field label=\"Oggetto\">\n    <mds-input name=\"subject\"></mds-input>\n  </mds-input-field>\n\n  <!-- the receiver gets action=send or action=draft -->\n  <mds-button name=\"action\" value=\"send\" label=\"Invia\" variant=\"primary\"></mds-button>\n  <mds-button name=\"action\" value=\"draft\" label=\"Salva come bozza\" tone=\"outline\"></mds-button>\n</form>\n```\n\nWhen your code handles the submit, build the form data with `event.submitter`, as for a native button: it carries the `name` / `value` of the button that was clicked.\n\n```js\nform.addEventListener('submit', (event) => {\n  event.preventDefault();\n  const data = new FormData(form, event.submitter);\n  data.get('action'); // 'send' or 'draft'\n});\n```\n\nTo show one action and keep the others in a menu, use [`mds-button-dropdown`](../mds-button-dropdown/AGENTS.md) with `type=\"submit\"`: its primary action and its menu items send `name` / `value` the same way.\n\n#### Notification Badge via Named Slot\n\nThe `notification` slot accepts an `<mds-notification>`. This is the documented exception to the default-slot-is-text rule.\n\n```html\n<mds-button label=\"Notifiche\" icon=\"mi/baseline/notifications\" variant=\"primary\" tone=\"weak\">\n  <mds-notification slot=\"notification\" value=\"12\"></mds-notification>\n</mds-button>\n```\n\n#### SSO Identity Variants\n\n`variant=\"google\"` and `variant=\"apple\"` apply the brand-correct chrome for SSO entry points. Do not reuse them for non-SSO buttons.\n\n```html\n<mds-button label=\"Accedi con Google\" variant=\"google\"></mds-button>\n<mds-button label=\"Accedi con Apple\" variant=\"apple\"></mds-button>\n```\n\n#### Styling Customization\n\nStyle the button only through its documented `--mds-button-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode, named themes and high contrast keep working.\n\n```css\n.featured-action mds-button {\n  --mds-button-background: rgb(var(--magma-accent-emphasis));\n  --mds-button-color: rgb(var(--magma-accent-on-emphasis));\n  --mds-button-radius: var(--magma-radius-lg);\n  --mds-button-gap: calc(var(--spacing) * 300);\n}\n\n/* labels that are names or identifiers, shown as written: it inherits, so it reaches the\n   buttons inside other components too */\n.tenant-switcher {\n  --mds-button-label-transform: none;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-button>`. 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 Put HTML in the Default Slot\n\nThe default slot accepts plain text only; nested elements are stripped or break layout. Use the `label` prop for text and the dedicated props/slots for everything else.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n  <span class=\"bold\">Scarica</span>\n  <small>(PDF)</small>\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Scarica (PDF)\" icon=\"mi/baseline/download\" variant=\"primary\"></mds-button>\n```\n\n#### Do Not Nest `<mds-button>` Inside an Anchor\n\nWrapping the button in `<a>` creates nested interactive controls, breaks keyboard semantics, and fails accessibility audits. Use the `href` prop on the component instead - it renders the link itself.\n\n```html\n<!-- INCORRECT -->\n<a href=\"/login\">\n  <mds-button label=\"Accedi\"></mds-button>\n</a>\n\n<!-- CORRECT -->\n<mds-button label=\"Accedi\" href=\"/login\"></mds-button>\n```\n\n#### Do Not Use `mds-button` for a Link Inside a Sentence\n\n`mds-button` is a block-level control with its own typography and padding: inside a sentence it breaks the line and the font. A word or a phrase that links belongs to `<mds-link>`, which takes the font of the text around it.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n  Leggi l'<mds-button href=\"/privacy\" tone=\"text\" label=\"informativa\"></mds-button> prima di continuare.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">\n  Leggi l'<mds-link href=\"/privacy\">informativa</mds-link> prima di continuare.\n</mds-text>\n```\n\n#### Do Not Follow the `href` Yourself in a Click Listener\n\nWith `href` set the component already renders a link the browser follows. Assigning `window.location` in a click listener loads the page a second time and takes a modifier click, which the browser would open in a new tab, into the current one. Either let the browser follow the link, or cancel the click and route on the client.\n\n```js\n// INCORRECT\nbutton.addEventListener('click', () => {\n  window.location.href = button.href;\n});\n\n// CORRECT: a client-side router cancels the click and routes\nbutton.addEventListener('click', (event) => {\n  if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n  event.preventDefault();\n  router.navigate(button.href);\n});\n```\n\n#### Icon-Only Buttons Without an Accessible Name\n\nWhen `label` is empty, the component derives a `title` from the last segment of the icon slug (\"delete\"), which names the icon, not the action. Always supply an explicit `aria-label` (or `title`) for icon-only buttons, or an `mds-tooltip` with `relation=\"label\"`.\n\n```html\n<!-- INCORRECT -->\n<mds-button icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\"></mds-button>\n\n<!-- CORRECT -->\n<mds-button\n  icon=\"mi/baseline/delete\"\n  aria-label=\"Elimina elemento\"\n  variant=\"error\"\n  tone=\"text\"\n></mds-button>\n```\n\n#### Do Not Build the Form Data Without the Submitter\n\n`new FormData(form)` leaves out the `name` / `value` of the button that submitted the form, as it does for a native submit button. Pass `event.submitter` to read which action was chosen; do not track the clicked button in a variable or a hidden input.\n\n```js\n// INCORRECT: action is missing\nform.addEventListener('submit', (event) => {\n  event.preventDefault();\n  const data = new FormData(form);\n});\n\n// CORRECT\nform.addEventListener('submit', (event) => {\n  event.preventDefault();\n  const data = new FormData(form, event.submitter);\n});\n```\n\n#### Do Not Slot `<mds-icon>` to Add an Icon\n\nThe component's `icon` prop renders the SVG through the shared icon-set service and positions it correctly via `icon-position`. Slotting `<mds-icon>` puts it in the text-only default slot, where it is stripped or misaligned.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n  <mds-icon name=\"mi/baseline/add\"></mds-icon>\n  Aggiungi\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Aggiungi\" icon=\"mi/baseline/add\" variant=\"primary\" tone=\"weak\"></mds-button>\n```\n\n#### Do Not Mark the Current Button by Hand, Nor Disable It\n\nThe button of the view you are in takes `current`. A tone switched by hand with `aria-current` gives every product its own look (and `tone=\"weak\"` alone stays under the 3:1 of a state), `active` is the pressed look and is cleared when the pointer is released, and `disabled` takes the button out of the Tab order and announces it as unavailable, so the keyboard never learns where it is.\n\n```html\n<!-- INCORRECT -->\n<mds-button href=\"/pratiche\" variant=\"dark\" tone=\"weak\" aria-current=\"page\">Pratiche</mds-button>\n<mds-button href=\"/pratiche\" variant=\"dark\" tone=\"text\" active>Pratiche</mds-button>\n<mds-button href=\"/pratiche\" variant=\"dark\" tone=\"text\" disabled>Pratiche</mds-button>\n\n<!-- CORRECT -->\n<mds-button href=\"/pratiche\" variant=\"dark\" tone=\"text\" current>Pratiche</mds-button>\n```\n\n#### Do Not Swap the Icon by Hand\n\nA listener that changes `icon` under the pointer fetches the new icon the first time it comes, so the button shows no icon until it arrives, and leaves it on what a finger tapped. A slug built at runtime is never served: the icons a product serves are the ones written in its sources. Use `icon-current` and `icon-hover`, with the slugs written out whole.\n\n```js\n// INCORRECT\nbutton.addEventListener('mouseenter', () => (button.icon = 'mi/baseline/folder'));\nbutton.addEventListener('mouseleave', () => (button.icon = 'mi/outline/folder'));\nbutton.icon = `mi/${here ? 'baseline' : 'outline'}/folder`;\n```\n\n```html\n<!-- CORRECT -->\n<mds-button\n  href=\"/pratiche\"\n  icon=\"mi/outline/folder\"\n  icon-current=\"mi/baseline/folder\"\n  current\n>Pratiche</mds-button>\n```\n\n#### Do Not Use Legacy `ghost` or `quiet` Tone Values\n\n`tone=\"ghost\"` and `tone=\"quiet\"` were renamed in Magma 2.0 to `outline` and `text`. The old values are no longer accepted by the typed `ToneBoxVariantType` and silently fall back to the default tone.\n\n```html\n<!-- INCORRECT (Magma 1.x naming) -->\n<mds-button label=\"Modifica\" tone=\"ghost\" variant=\"primary\"></mds-button>\n<mds-button label=\"Annulla\" tone=\"quiet\" variant=\"error\"></mds-button>\n\n<!-- CORRECT (Magma 2.x) -->\n<mds-button label=\"Modifica\" tone=\"outline\" variant=\"primary\"></mds-button>\n<mds-button label=\"Annulla\" tone=\"text\" variant=\"error\"></mds-button>\n```\n\n#### Customize via Documented Vars and Parts, Not Internal Selectors\n\nThe supported customization surface is `--mds-button-*` CSS custom properties plus the two documented shadow parts (`icon`, `label`). Targeting other internals via `::part()`, `>>>`, or undocumented class names couples your code to the Shadow DOM implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-button >>> .text {\n  font-weight: bold;\n}\nmds-button::part(spinner) {\n  color: red;\n}\n\n/* CORRECT */\nmds-button {\n  --mds-button-color: rgb(var(--magma-accent-on-emphasis));\n  --mds-button-radius: var(--magma-radius-lg);\n}\nmds-button::part(icon) {\n  fill: rgb(var(--magma-warning-fg));\n}\n```\n"
      },
      "props": [
        {
          "name": "active",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": true,
          "attr": "active",
          "reflectToAttr": true,
          "docs": "Specifies if the button is active or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "animation",
          "type": "\"none\" | \"yugop\" | undefined",
          "complexType": {
            "original": "TextAnimationType",
            "resolved": "\"none\" | \"yugop\" | undefined",
            "references": {
              "TextAnimationType": {
                "location": "import",
                "path": "@component/mds-text/meta/types",
                "id": "src/components/mds-text/meta/types.ts::TextAnimationType",
                "referenceLocation": "TextAnimationType"
              }
            }
          },
          "mutable": false,
          "attr": "animation",
          "reflectToAttr": true,
          "docs": "Specifies if the text is animated when it is rendered",
          "docsTags": [
            {
              "name": "default",
              "text": "'none'"
            }
          ],
          "default": "'none'",
          "values": [
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "yugop",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "autoFocus",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "auto-focus",
          "reflectToAttr": false,
          "docs": "Specifies if the component is focused when is loaded on the viewport",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "await",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "await",
          "reflectToAttr": true,
          "docs": "Specifies if the button is awaiting for a response",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "current",
          "type": "\"page\" | \"section\" | boolean | undefined",
          "complexType": {
            "original": "ButtonCurrentType",
            "resolved": "\"page\" | \"section\" | boolean | undefined",
            "references": {
              "ButtonCurrentType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonCurrentType",
                "referenceLocation": "ButtonCurrentType"
              }
            }
          },
          "mutable": false,
          "attr": "current",
          "reflectToAttr": true,
          "docs": "Marks the button that leads to the view you are in, as the current section of a bar or the\ncurrent view of a switcher, with a look of its own: an area that weighs less than the hover of\nits tone, never its ring, and a heavier label. `current`, or\n`current=\"page\"`, is that view: the button neither navigates nor submits, a click and Enter do\nnothing, but it stays in the Tab order, announced with `aria-current` (`\"page\"` on a link,\n`\"true\"` otherwise). `current=\"section\"` is a view inside it, as a record of its list: the\nsame look, and the button stays a link that brings you back, announced with\n`aria-current=\"true\"`. An `aria-current` written on the host stays as written.",
          "docsTags": [],
          "values": [
            {
              "value": "page",
              "type": "string"
            },
            {
              "value": "section",
              "type": "string"
            },
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Specifies if the component is disabled or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "download",
          "type": "boolean | string | undefined",
          "complexType": {
            "original": "boolean | string",
            "resolved": "boolean | string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "download",
          "reflectToAttr": false,
          "docs": "With `href`, saves its file instead of opening it, as the `download` attribute of `<a>`:\npresent with no value, or `true`, the file takes the name the server gives it; a string is\nthe name of the saved file. Browsers apply it to the URLs of the origin of the page, `blob:`\nand `data:`: a link to another origin opens the file as without it. A download never goes to\nthe router registered with `NavigationService`",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "href",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "href",
          "reflectToAttr": true,
          "docs": "Turns the button into a link to this URL: a real anchor in its shadow root, so the browser\ngives it what it gives every link (new tab on a modifier or middle click, the context menu,\ndrag). A client-side router takes the plain clicks over once registered with\n`NavigationService.setHandler()` (from `@maggioli-design-system/magma/services`); without\none, a click listener on the host can still cancel the navigation with `preventDefault()`.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "The icon displayed in the button; `iconCurrent` and `iconHover` take its place in their\nstates",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "iconCurrent",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon-current",
          "reflectToAttr": false,
          "docs": "The icon of the current button, in place of `icon`: the filled icon, say, of an `icon` drawn\nas an outline. It is the icon under the pointer too, unless `iconHover` says otherwise, so\nthe pointer previews it on the buttons that are not current. It takes the place of `icon`:\nwithout `icon` it shows nothing",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "iconHover",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon-hover",
          "reflectToAttr": false,
          "docs": "The icon under the pointer, in place of `icon`, and `iconCurrent` when it is not set. Set it\nto the `icon` to keep the icon still under the pointer, when `iconCurrent` says something\nthe click does not do (a check, say). A pointer that cannot hover, as a finger, never shows\nit. It takes the place of `icon`: without `icon` it shows nothing",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "iconPosition",
          "type": "\"left\" | \"right\" | undefined",
          "complexType": {
            "original": "ButtonIconPositionType",
            "resolved": "\"left\" | \"right\" | undefined",
            "references": {
              "ButtonIconPositionType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonIconPositionType",
                "referenceLocation": "ButtonIconPositionType"
              }
            }
          },
          "mutable": false,
          "attr": "icon-position",
          "reflectToAttr": true,
          "docs": "Specifies the horizontal position of the icon displayed in the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'left'"
            }
          ],
          "default": "'left'",
          "values": [
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "label",
          "reflectToAttr": true,
          "docs": "The label of the button",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "The name sent with `value` to the form the button submits, as a native submit button\ndoes: buttons that submit the same form tell the receiver which one was chosen",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | \"xl\"",
          "complexType": {
            "original": "ButtonSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\"",
            "references": {
              "ButtonSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonSizeType",
                "referenceLocation": "ButtonSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the size for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'md'"
            }
          ],
          "default": "'md'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "value": "xl",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "target",
          "type": "\"blank\" | \"self\"",
          "complexType": {
            "original": "ButtonTargetType",
            "resolved": "\"blank\" | \"self\"",
            "references": {
              "ButtonTargetType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonTargetType",
                "referenceLocation": "ButtonTargetType"
              }
            }
          },
          "mutable": false,
          "attr": "target",
          "reflectToAttr": false,
          "docs": "Specifies the target of the URL, if self or blank",
          "docsTags": [
            {
              "name": "default",
              "text": "'self'"
            }
          ],
          "default": "'self'",
          "values": [
            {
              "value": "blank",
              "type": "string"
            },
            {
              "value": "self",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"box\" | \"outline\" | \"strong\" | \"text\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneBoxVariantType",
            "resolved": "\"box\" | \"outline\" | \"strong\" | \"text\" | \"weak\" | undefined",
            "references": {
              "ToneBoxVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneBoxVariantType",
                "referenceLocation": "ToneBoxVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Specifies the tone variant for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'strong'"
            }
          ],
          "default": "'strong'",
          "values": [
            {
              "value": "box",
              "type": "string"
            },
            {
              "value": "outline",
              "type": "string"
            },
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "text",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "truncate",
          "type": "\"all\" | \"none\" | \"word\" | undefined",
          "complexType": {
            "original": "TypographyTruncateType",
            "resolved": "\"all\" | \"none\" | \"word\" | undefined",
            "references": {
              "TypographyTruncateType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyTruncateType",
                "referenceLocation": "TypographyTruncateType"
              }
            }
          },
          "mutable": false,
          "attr": "truncate",
          "reflectToAttr": true,
          "docs": "Specifies if the text shoud be truncated or should behave as a normal text",
          "docsTags": [
            {
              "name": "default",
              "text": "'word'"
            }
          ],
          "default": "'word'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "word",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "type",
          "type": "\"a\" | \"button\" | \"reset\" | \"submit\" | undefined",
          "complexType": {
            "original": "ButtonType",
            "resolved": "\"a\" | \"button\" | \"reset\" | \"submit\" | undefined",
            "references": {
              "ButtonType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonType",
                "referenceLocation": "ButtonType"
              }
            }
          },
          "mutable": false,
          "attr": "type",
          "reflectToAttr": true,
          "docs": "The type of the button element",
          "docsTags": [
            {
              "name": "default",
              "text": "'submit'"
            }
          ],
          "default": "'submit'",
          "values": [
            {
              "value": "a",
              "type": "string"
            },
            {
              "value": "button",
              "type": "string"
            },
            {
              "value": "reset",
              "type": "string"
            },
            {
              "value": "submit",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "The value sent under `name` to the form the button submits",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"apple\" | \"dark\" | \"error\" | \"google\" | \"info\" | \"light\" | \"primary\" | \"secondary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ButtonVariantType",
            "resolved": "\"ai\" | \"apple\" | \"dark\" | \"error\" | \"google\" | \"info\" | \"light\" | \"primary\" | \"secondary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ButtonVariantType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonVariantType",
                "referenceLocation": "ButtonVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the color variant for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "apple",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "google",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "secondary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-button-await-duration",
          "annotation": "prop",
          "docs": "Sets the duration of the rotation of the spinner await component",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-button-border-color-rgb",
          "annotation": "prop",
          "docs": "Sets the color of the border of the component (based on box-shadow declaration)",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-border-default-opacity",
          "annotation": "prop",
          "docs": "Sets the default opacity of the border color of the component (based on box-shadow declaration)",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-border-high-contrast-hover-width",
          "annotation": "prop",
          "docs": "Deprecated, read by nothing: the button has no high contrast border of its own, the contrast preference acts on the colour roles.",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-border-high-contrast-width",
          "annotation": "prop",
          "docs": "Deprecated, read by nothing: the button has no high contrast border of its own, the contrast preference acts on the colour roles.",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-border-hover-opacity",
          "annotation": "prop",
          "docs": "Sets the opacity of the border color when the component is hovered (based on box-shadow declaration)",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-border-opacity",
          "annotation": "prop",
          "docs": "Sets the border opacity of the component (based on box-shadow declaration)",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-border-tone-outline-hover-width",
          "annotation": "prop",
          "docs": "Sets the width of the border when the component is hovered when the tone is set to `outline` (based on box-shadow declaration)",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-border-tone-strong-hover-width",
          "annotation": "prop",
          "docs": "Sets the width of the border when the component is hovered when the tone is set to `strong` (based on box-shadow declaration)",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-border-tone-weak-hover-width",
          "annotation": "prop",
          "docs": "Sets the width of the border when the component is hovered when the tone is set to `weak` (based on box-shadow declaration)",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-border-width",
          "annotation": "prop",
          "docs": "Sets the border width of the component (based on box-shadow declaration)",
          "visibility": "internal"
        },
        {
          "name": "--mds-button-color",
          "annotation": "prop",
          "docs": "Sets the text color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-button-gap",
          "annotation": "prop",
          "docs": "Sets the distance betwen element inside the components, use it instead of setting gap property directly.",
          "visibility": "public"
        },
        {
          "name": "--mds-button-label-transform",
          "annotation": "prop",
          "docs": "Sets the text-transform of the first letter of the label, `uppercase` by default; `none` shows the label as written. It inherits: set on `mds-button-dropdown` or any ancestor, it reaches the buttons inside other components too",
          "visibility": "public"
        },
        {
          "name": "--mds-button-radius",
          "annotation": "prop",
          "docs": "Sets the border-radius of the component",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        },
        {
          "name": "notification",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-notification` element."
        }
      ],
      "parts": [
        {
          "name": "icon",
          "docs": "The icon inside the component"
        },
        {
          "name": "label",
          "docs": "The text of the button: the `label`, or the default slot when `label` is not set"
        }
      ],
      "states": [],
      "dependents": [
        "mds-banner",
        "mds-breadcrumb",
        "mds-breadcrumb-item",
        "mds-button-dropdown",
        "mds-calendar",
        "mds-calendar-cell",
        "mds-chip",
        "mds-file-preview",
        "mds-header-bar",
        "mds-horizontal-scroll",
        "mds-img",
        "mds-input",
        "mds-input-date",
        "mds-input-date-range",
        "mds-input-date-range-preselection",
        "mds-input-upload",
        "mds-keyboard",
        "mds-label",
        "mds-mention",
        "mds-modal",
        "mds-note",
        "mds-policy-ai",
        "mds-pref-language-item",
        "mds-pref-theme-item",
        "mds-push-notification",
        "mds-push-notification-item",
        "mds-radial-menu",
        "mds-radial-menu-item",
        "mds-tab-item",
        "mds-table-header-cell",
        "mds-toast",
        "mds-tree-item",
        "mds-url-view"
      ],
      "dependencies": [
        "mds-icon",
        "mds-spinner",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-banner": [
          "mds-button"
        ],
        "mds-breadcrumb": [
          "mds-button"
        ],
        "mds-breadcrumb-item": [
          "mds-button"
        ],
        "mds-button-dropdown": [
          "mds-button"
        ],
        "mds-calendar": [
          "mds-button"
        ],
        "mds-calendar-cell": [
          "mds-button"
        ],
        "mds-chip": [
          "mds-button"
        ],
        "mds-file-preview": [
          "mds-button"
        ],
        "mds-header-bar": [
          "mds-button"
        ],
        "mds-horizontal-scroll": [
          "mds-button"
        ],
        "mds-img": [
          "mds-button"
        ],
        "mds-input": [
          "mds-button"
        ],
        "mds-input-date": [
          "mds-button"
        ],
        "mds-input-date-range": [
          "mds-button"
        ],
        "mds-input-date-range-preselection": [
          "mds-button"
        ],
        "mds-input-upload": [
          "mds-button"
        ],
        "mds-keyboard": [
          "mds-button"
        ],
        "mds-label": [
          "mds-button"
        ],
        "mds-mention": [
          "mds-button"
        ],
        "mds-modal": [
          "mds-button"
        ],
        "mds-note": [
          "mds-button"
        ],
        "mds-policy-ai": [
          "mds-button"
        ],
        "mds-pref-language-item": [
          "mds-button"
        ],
        "mds-pref-theme-item": [
          "mds-button"
        ],
        "mds-push-notification": [
          "mds-button"
        ],
        "mds-push-notification-item": [
          "mds-button"
        ],
        "mds-radial-menu": [
          "mds-button"
        ],
        "mds-radial-menu-item": [
          "mds-button"
        ],
        "mds-tab-item": [
          "mds-button"
        ],
        "mds-table-header-cell": [
          "mds-button"
        ],
        "mds-toast": [
          "mds-button"
        ],
        "mds-tree-item": [
          "mds-button"
        ],
        "mds-url-view": [
          "mds-button"
        ]
      },
      "storybook": "ui-button--docs"
    },
    {
      "filePath": "src/components/mds-button-dropdown/mds-button-dropdown.tsx",
      "encapsulation": "shadow",
      "tag": "mds-button-dropdown",
      "readme": "# mds-button-dropdown\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "part",
          "text": "dropdown - The `mds-dropdown` that the arrow opens, with the default slot inside"
        },
        {
          "name": "category",
          "text": "actions"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-button-dropdown>` web component is a split-button control of the Magma Design System: it pairs a primary `<mds-button>` action with a secondary chevron button that opens an attached `<mds-dropdown>`, giving users a default action plus a menu of related choices in a single, visually unified control.\n\n#### Semantic Behavior\n\n- **Default slot is the menu**: Whatever you place in the default slot becomes the dropdown panel content; it is not treated as the button label (the visible label comes from the `label` prop).\n- **Chevron trigger**: The second button is icon-only (chevron) and toggles the dropdown; it carries `aria-haspopup` and `aria-expanded` for the menu it opens. It is named in the page language (the `lang` of `<html>`) after the label (\"More actions for Export\", or \"More actions\" without a label), so two split buttons of one page name their chevrons apart; `dropdown-label` gives it a name of the page's instead.\n- **Shared configuration**: `active`, `disabled`, `size`, `tone` and `variant` are forwarded identically to both internal buttons, so the two halves always stay visually and behaviorally in sync. `await` belongs to the primary action, the one in progress. `href`, `target` and `autoFocus` belong to the primary action alone: the chevron only opens the menu.\n- **Current state**: `current` marks the primary action as the one that leads to the view you are in, as on `<mds-button>`. Both halves take the look of the current button; only the primary action is announced with `aria-current` and, with `current` (or `current=\"page\"`), neither navigates, nor submits, nor fires `mdsButtonDropdownClick`. With `current=\"section\"`, a view inside it, the primary action stays a link back. The chevron keeps opening the menu either way. A menu item that leads to the view you are in takes `current` itself.\n- **Form association**: The host is form-associated. With `type=\"submit\"` the primary action submits the enclosing `<form>` (or the one its `form` attribute names) and sends `name=value`, like a native submit button; with `type=\"reset\"` it resets it. The chevron never submits. Unlike `<mds-button>`, `type` defaults to `'button'`: a dropdown in a form submits it only when asked. The menu items are slotted `<mds-button>`, so they follow their own `type` (default `'submit'`), `name` and `value`, and the receiver tells all the actions apart by `name`.\n- **Disabled / await states**: `disabled` passes through to both buttons, so it disables the action and the trigger together; a disabled `<fieldset>` around the component disables both halves the same way, without setting `disabled`. `await` shows one spinner, on the primary action, which alone is announced as busy; the chevron keeps its arrow and is disabled until the component stops awaiting, so the menu does not open meanwhile.\n- **Primary action event**: `mdsButtonDropdownClick` fires when the primary action is clicked or activated from the keyboard, and not while the component is `disabled` or awaiting. The chevron and the menu items do not fire it. A native `click` listener on the component also runs for the menu items, whose clicks bubble to it, so listen for `mdsButtonDropdownClick` to run the primary action in JavaScript.\n- **Dropdown part**: The internal dropdown is exposed as the `dropdown` shadow part for external styling of the menu surface.\n- **Corners**: The two halves take their outer corners from the host, the radius of `--mds-button-dropdown-radius`, and meet with flat inner corners. A row that joins the component flattens its corners on the host: in an `<mds-button-group>` the side that touches the next member is flat, on the primary action or on the chevron.\n- **Width**: The component keeps its own width, its primary action as wide as an `<mds-button>` with the same label. A row that stretches it, as `actions/stacked` does under `--magma-container-actions` (380px) in `<mds-card-footer>`, `<mds-banner>`, `<mds-status-bar>` or a row of your own (`align-self: stretch`, a `width`, a `flex-basis`), gives the free width to the primary action, its label in the middle, and keeps the chevron at its own size at the end: the two halves still read as one button, with no fill past them.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` / `tone` / `size` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md); they apply here as in `<mds-button>`, narrowed to `tone` `strong` / `weak` and without the `google` / `apple` variants, and are forwarded to both internal buttons. `variant` defaults to `'primary'`, `tone` defaults to `'strong'`, and `size` defaults to `'md'`.\n\n- **`label`** sets the text of the primary action button only; the chevron trigger is icon-only.\n- **`type`** (default `'button'`), **`name`** and **`value`** apply to the primary action only, as described under Form association. The menu items follow their own `type`: inside a `<form>`, give `type=\"button\"` to the ones that must not submit it.\n- **`href`** makes the primary action a link that navigates instead of submitting, with `target` choosing `'self'` vs `'blank'`; the chevron still opens the menu.\n\n#### Other behavioral props\n\n- **`autoFocus`** focuses the primary action once the component is loaded.\n- **`icon`** is an SVG filename slug from the Magma icon library, applied to the primary action button (the chevron icon on the trigger is fixed and not configurable).\n- **`iconCurrent`** and **`iconHover`** take the place of `icon` on the primary action, when it is current and under the pointer, as on `<mds-button>`: `iconHover` falls back on `iconCurrent`, and both need `icon`. The chevron keeps its arrow.\n- **`truncate`** sets how the label of the primary action truncates, as on `mds-button` (default `'word'`).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-button-dropdown>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Split Button with Menu Items\n\nThe canonical form: a `label` prop for the primary action and one or more [`mds-button`](../mds-button/AGENTS.md) elements in the default slot as menu choices. Give the slot items `variant=\"dark\" tone=\"text\"` to keep them visually neutral inside the dropdown panel.\n\n```html\n<mds-button-dropdown label=\"Salva come bozza\" variant=\"success\" tone=\"weak\">\n  <mds-button icon=\"mi/baseline/send\" variant=\"dark\" tone=\"text\" label=\"Invia subito\"></mds-button>\n  <mds-button icon=\"mi/baseline/delete\" variant=\"dark\" tone=\"text\" label=\"Elimina\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Variant and Tone for Emphasis\n\nUse `variant` to express meaning and `tone` to express weight - the same pair applies to both internal buttons automatically.\n\n```html\n<!-- High emphasis: primary action -->\n<mds-button-dropdown label=\"Pubblica\" variant=\"primary\" tone=\"strong\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Pubblica come bozza\"></mds-button>\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Pianifica pubblicazione\"></mds-button>\n</mds-button-dropdown>\n\n<!-- Status emphasis: destructive action group -->\n<mds-button-dropdown label=\"Elimina voce\" variant=\"error\" tone=\"weak\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Elimina e archivia\"></mds-button>\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Annulla eliminazione\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Sizing\n\nUse the `size` prop. Both internal buttons track it automatically.\n\n```html\n<mds-button-dropdown label=\"Azione\" size=\"sm\" variant=\"primary\" tone=\"strong\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione A\"></mds-button>\n</mds-button-dropdown>\n\n<mds-button-dropdown label=\"Azione\" size=\"md\" variant=\"primary\" tone=\"strong\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione A\"></mds-button>\n</mds-button-dropdown>\n\n<mds-button-dropdown label=\"Azione\" size=\"lg\" variant=\"primary\" tone=\"strong\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione A\"></mds-button>\n</mds-button-dropdown>\n\n<mds-button-dropdown label=\"Azione\" size=\"xl\" variant=\"primary\" tone=\"strong\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione A\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Primary Action with an Icon\n\nSupply the `icon` prop to add an icon to the primary action button. The chevron trigger icon is fixed and not configurable.\n\n```html\n<mds-button-dropdown\n  label=\"Carica documento\"\n  icon=\"mi/baseline/upload\"\n  variant=\"primary\"\n  tone=\"weak\"\n>\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Carica da URL\"></mds-button>\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Carica da Drive\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Naming the Chevron\n\nThe chevron is named after the label in the language of the page (\"Altre azioni per Esporta\" on an Italian page), so two split buttons of one page are told apart by a screen reader. Set `dropdown-label` when the menu deserves a name of its own.\n\n```html\n<mds-button-dropdown label=\"Esporta\" dropdown-label=\"Formati di esportazione\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"PDF\"></mds-button>\n  <mds-button variant=\"dark\" tone=\"text\" label=\"CSV\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Async Loading via `await`\n\nSet the `await` boolean attribute while a request is in flight. The primary action shows the spinner and is announced as busy; the chevron keeps its arrow and is disabled, so the menu does not open until the request ends. Remove the attribute when done - do not set `await=\"false\"`.\n\n```html\n<mds-button-dropdown label=\"Salvataggio in corso...\" await variant=\"primary\" tone=\"strong\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Salva e chiudi\"></mds-button>\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Salva come copia\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Disabled State\n\nThe `disabled` attribute blocks both halves of the control together.\n\n```html\n<mds-button-dropdown label=\"Invia richiesta\" disabled variant=\"primary\" tone=\"strong\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Invia in bozza\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Primary Action Handled in JavaScript\n\nListen for `mdsButtonDropdownClick` to run the primary action: it comes from the primary action only, from a click or the keyboard, and not while the component is `disabled` or awaiting. Handle each menu item with its own `click`.\n\n```html\n<mds-button-dropdown id=\"save\" label=\"Salva\" variant=\"primary\">\n  <mds-button id=\"save-copy\" variant=\"dark\" tone=\"text\" label=\"Salva come copia\"></mds-button>\n</mds-button-dropdown>\n\n<script>\n  document.getElementById('save').addEventListener('mdsButtonDropdownClick', () => save());\n  document.getElementById('save-copy').addEventListener('click', () => saveCopy());\n</script>\n```\n\n#### Several Actions That Submit One Form\n\nSet `type=\"submit\"` on the component and give the primary action and the menu items the same `name` with a different `value`: each action submits the form, and the receiver reads which one was chosen from `name`, as with native submit buttons. Give `type=\"button\"` to the menu items that must not submit.\n\n```html\n<form action=\"/mail\" method=\"post\">\n  <mds-input-field label=\"Oggetto\">\n    <mds-input name=\"subject\"></mds-input>\n  </mds-input-field>\n\n  <!-- the receiver gets action=send, action=draft or action=schedule -->\n  <mds-button-dropdown type=\"submit\" name=\"action\" value=\"send\" label=\"Invia\" variant=\"primary\">\n    <mds-button name=\"action\" value=\"draft\" variant=\"dark\" tone=\"text\" label=\"Salva come bozza\"></mds-button>\n    <mds-button name=\"action\" value=\"schedule\" variant=\"dark\" tone=\"text\" label=\"Invio programmato\"></mds-button>\n    <mds-button type=\"button\" variant=\"dark\" tone=\"text\" label=\"Anteprima\"></mds-button>\n  </mds-button-dropdown>\n</form>\n```\n\nWhen your code handles the submit, build the form data with `event.submitter`, as for [`mds-button`](../mds-button/AGENTS.md): `new FormData(form, event.submitter)`.\n\n#### Hyperlink Split Button via `href`\n\n`href` and `target` on the component make the primary action a link; the chevron keeps opening the menu. Put the other links on the menu items (`target=\"blank\"` opens them in a new tab).\n\n```html\n<mds-button-dropdown\n  label=\"Apri documento\"\n  href=\"https://example.com/doc\"\n  variant=\"primary\"\n  tone=\"weak\"\n>\n  <mds-button href=\"https://example.com/doc/edit\" target=\"blank\" variant=\"dark\" tone=\"text\" label=\"Modifica\"></mds-button>\n  <mds-button href=\"https://example.com/doc/history\" target=\"blank\" variant=\"dark\" tone=\"text\" label=\"Cronologia\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### In a Row of Actions That Stacks\n\nStretch the component as any other action of the row: under `--magma-container-actions` of its container (`@max-actions:`), `actions/stacked` puts every labelled button at the full width, and the component gives that width to its primary action, the chevron staying at the end. No part or custom property is needed.\n\n```html\n<div class=\"@container\">\n  <div class=\"flex justify-end gap-inline @max-actions:flex-col @max-actions:*:self-stretch\">\n    <mds-button variant=\"dark\" tone=\"outline\" label=\"Copia JSON\"></mds-button>\n    <mds-button-dropdown label=\"Scarica\" icon=\"mi/baseline/download\">\n      <mds-button variant=\"dark\" tone=\"text\" label=\"Scarica come CSS\"></mds-button>\n      <mds-button variant=\"dark\" tone=\"text\" label=\"Scarica come JSON\"></mds-button>\n    </mds-button-dropdown>\n  </div>\n</div>\n```\n\n#### Styling Customization\n\nStyle the component through its documented `--mds-button-dropdown-*` CSS custom properties or the `dropdown` shadow part. Use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and named themes keep working.\n\nThe `--mds-button-*` properties that inherit reach the two inner buttons too: `--mds-button-label-transform: none` on the component keeps a label such as a tenant name as written, without the uppercase first letter.\n\n```css\n.custom-toolbar mds-button-dropdown {\n  --mds-button-dropdown-radius: var(--magma-radius-md);\n}\n\n.tenant-switcher mds-button-dropdown {\n  --mds-button-label-transform: none;\n}\n\n/* Style the dropdown panel surface through the documented shadow part */\n.custom-toolbar mds-button-dropdown::part(dropdown) {\n  box-shadow: var(--shadow-lg);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-button-dropdown>`. 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 Put the Label in the Default Slot\n\nThe default slot feeds the `<mds-dropdown>` panel, not the button label. Text placed in the slot ends up as menu content, not as the button's visible text. Use the `label` prop.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown variant=\"primary\" tone=\"strong\">\n  Salva\n</mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown label=\"Salva\" variant=\"primary\" tone=\"strong\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Salva come bozza\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Do Not Slot Non-Button Content as Menu Items\n\nThe dropdown panel is designed for [`mds-button`](../mds-button/AGENTS.md) elements. Slotting raw `<button>`, `<a>`, or arbitrary HTML bypasses the Magma theming, focus styles and button API (`icon`, `await`, `disabled`) of the menu entries.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown label=\"Esporta\" variant=\"primary\" tone=\"weak\">\n  <button onclick=\"exportPDF()\">PDF</button>\n  <a href=\"/export/csv\">CSV</a>\n</mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown label=\"Esporta\" variant=\"primary\" tone=\"weak\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Esporta PDF\" icon=\"mi/baseline/picture-as-pdf\"></mds-button>\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Esporta CSV\" icon=\"mi/baseline/table-chart\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Do Not Count on the Default `type` to Submit a Form\n\nUnlike `<mds-button>`, the component defaults to `type=\"button\"`: inside a form, the primary action submits nothing until you set `type=\"submit\"`.\n\n```html\n<!-- INCORRECT: the primary action does not submit -->\n<form action=\"/mail\" method=\"post\">\n  <mds-button-dropdown name=\"action\" value=\"send\" label=\"Invia\">\n    <mds-button name=\"action\" value=\"draft\" variant=\"dark\" tone=\"text\" label=\"Salva come bozza\"></mds-button>\n  </mds-button-dropdown>\n</form>\n\n<!-- CORRECT -->\n<form action=\"/mail\" method=\"post\">\n  <mds-button-dropdown type=\"submit\" name=\"action\" value=\"send\" label=\"Invia\">\n    <mds-button name=\"action\" value=\"draft\" variant=\"dark\" tone=\"text\" label=\"Salva come bozza\"></mds-button>\n  </mds-button-dropdown>\n</form>\n```\n\n#### Do Not Submit the Form from a `click` Listener\n\nA `click` listener on the component also runs for the menu items, whose clicks bubble to it: picking a menu item that submits (\"Salva come bozza\") submits the form twice, once with its `name` / `value` and once without, and the receiver cannot tell which action was chosen. Use `type=\"submit\"` with `name` / `value`.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown id=\"send\" label=\"Invia\"></mds-button-dropdown>\n<script>\n  document.getElementById('send').addEventListener('click', () => form.requestSubmit());\n</script>\n\n<!-- CORRECT -->\n<mds-button-dropdown type=\"submit\" name=\"action\" value=\"send\" label=\"Invia\"></mds-button-dropdown>\n```\n\n#### Do Not Listen to `click` for the Primary Action\n\nA `click` on the component also comes from the menu items, whose clicks bubble to it: the primary action would run whenever the user picks an entry of the menu. Listen for `mdsButtonDropdownClick`, which only the primary action emits.\n\n```js\n// INCORRECT: also runs for \"Salva come copia\"\ndropdown.addEventListener('click', () => save());\n\n// CORRECT\ndropdown.addEventListener('mdsButtonDropdownClick', () => save());\n```\n\n#### Do Not Leave a Menu Item That Must Not Submit on the Default `type`\n\nThe menu items are slotted `<mds-button>`, whose `type` defaults to `'submit'`: inside a form, an item that runs your own code (a preview, a copy) submits the form too. Give it `type=\"button\"`.\n\n```html\n<!-- INCORRECT: \"Anteprima\" submits the form -->\n<mds-button-dropdown type=\"submit\" name=\"action\" value=\"send\" label=\"Invia\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Anteprima\"></mds-button>\n</mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown type=\"submit\" name=\"action\" value=\"send\" label=\"Invia\">\n  <mds-button type=\"button\" variant=\"dark\" tone=\"text\" label=\"Anteprima\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Do Not Use Unsupported `tone` Values\n\n`<mds-button-dropdown>` accepts `ToneMinimalVariantType`, which is `strong` and `weak` only. Passing `outline`, `text`, or `box` is not valid for this component: the value reaches the internal buttons unchecked, without the split-button styling that only `strong` and `weak` have.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown label=\"Azione\" variant=\"primary\" tone=\"outline\"></mds-button-dropdown>\n<mds-button-dropdown label=\"Azione\" variant=\"primary\" tone=\"text\"></mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown label=\"Azione\" variant=\"primary\" tone=\"strong\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione\"></mds-button>\n</mds-button-dropdown>\n<mds-button-dropdown label=\"Azione\" variant=\"primary\" tone=\"weak\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Opzione\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Do Not Try to Customize the Chevron Icon\n\nThe chevron trigger icon is internal and fixed. There is no prop to change it. Do not attempt to override it with CSS property hacks or shadow-DOM selectors.\n\n```css\n/* INCORRECT */\nmds-button-dropdown .dropdown-action mds-icon {\n  content: url('custom-arrow.svg');\n}\n\n/* CORRECT - style only through documented custom properties and the dropdown part */\nmds-button-dropdown {\n  --mds-button-dropdown-radius: var(--magma-radius-md);\n}\nmds-button-dropdown::part(dropdown) {\n  box-shadow: var(--shadow-lg);\n}\n```\n\n#### Do Not Name the Chevron with `aria-label` on the Host\n\nThe host has no role, so an `aria-label` on it names nothing, and it never reaches the chevron inside. The chevron is already named after `label` (\"Altre azioni per Esporta\"); give it a name of your own with `dropdown-label`.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown label=\"Esporta\" aria-label=\"Formati di esportazione\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"PDF\"></mds-button>\n</mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown label=\"Esporta\" dropdown-label=\"Formati di esportazione\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"PDF\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Do Not Set Boolean Attributes to `\"false\"`\n\n`await`, `disabled`, and `active` are boolean attributes and `mds-button-dropdown` is form-associated: as on a native control, any value turns them on, `\"false\"` included, so this markup renders a disabled button that is waiting. Remove the attribute to turn it off.\n\n```html\n<!-- INCORRECT -->\n<mds-button-dropdown label=\"Invia\" await=\"false\" disabled=\"false\" variant=\"primary\"></mds-button-dropdown>\n\n<!-- CORRECT -->\n<mds-button-dropdown label=\"Invia\" variant=\"primary\" tone=\"strong\">\n  <mds-button variant=\"dark\" tone=\"text\" label=\"Invia come bozza\"></mds-button>\n</mds-button-dropdown>\n```\n"
      },
      "props": [
        {
          "name": "active",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": true,
          "attr": "active",
          "reflectToAttr": true,
          "docs": "Specifies if the button is active or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "autoFocus",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "auto-focus",
          "reflectToAttr": false,
          "docs": "Focuses the primary action once the component is loaded",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "await",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "await",
          "reflectToAttr": true,
          "docs": "Specifies if the button is awaiting for a response",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "current",
          "type": "\"page\" | \"section\" | boolean | undefined",
          "complexType": {
            "original": "ButtonCurrentType",
            "resolved": "\"page\" | \"section\" | boolean | undefined",
            "references": {
              "ButtonCurrentType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonCurrentType",
                "referenceLocation": "ButtonCurrentType"
              }
            }
          },
          "mutable": false,
          "attr": "current",
          "reflectToAttr": true,
          "docs": "Marks the primary action as the one that leads to the view you are in, as `current` does on\n`mds-button`: `current` (or `current=\"page\"`) is that view, and the primary action neither\nnavigates nor submits nor emits `mdsButtonDropdownClick`; `current=\"section\"` is a view inside\nit, and the primary action stays a link back. Both halves take the look; only the primary\naction is announced with `aria-current`, the chevron keeps opening the menu",
          "docsTags": [],
          "values": [
            {
              "value": "page",
              "type": "string"
            },
            {
              "value": "section",
              "type": "string"
            },
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Specifies if the component is disabled or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "dropdownLabel",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "dropdown-label",
          "reflectToAttr": false,
          "docs": "The accessible name of the chevron, the button that opens the menu, in place of the one the\ncomponent builds in the language of the page: \"More actions for\" and `label`, or \"More\nactions\" without a label. Two split buttons of one page then name their chevrons apart",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "href",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "href",
          "reflectToAttr": true,
          "docs": "The URL the primary action navigates to, instead of submitting; the chevron only opens the\nmenu",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "The icon displayed in the button; `iconCurrent` and `iconHover` take its place in their\nstates",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "iconCurrent",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon-current",
          "reflectToAttr": false,
          "docs": "The icon of the primary action when it is current, in place of `icon`, as `iconCurrent` does\non `mds-button`: under the pointer too, unless `iconHover` says otherwise. Without `icon` it\nshows nothing",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "iconHover",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon-hover",
          "reflectToAttr": false,
          "docs": "The icon of the primary action under the pointer, in place of `icon`, and `iconCurrent` when\nit is not set, as `iconHover` does on `mds-button`. Without `icon` it shows nothing",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": false,
          "docs": "Specifies le text label of the component",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "The name sent with `value` to the form the primary action submits, as a native submit\nbutton does",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | \"xl\"",
          "complexType": {
            "original": "ButtonSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\"",
            "references": {
              "ButtonSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonSizeType",
                "referenceLocation": "ButtonSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the size for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'md'"
            }
          ],
          "default": "'md'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "value": "xl",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "target",
          "type": "\"blank\" | \"self\"",
          "complexType": {
            "original": "ButtonTargetType",
            "resolved": "\"blank\" | \"self\"",
            "references": {
              "ButtonTargetType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonTargetType",
                "referenceLocation": "ButtonTargetType"
              }
            }
          },
          "mutable": false,
          "attr": "target",
          "reflectToAttr": false,
          "docs": "Where the primary action opens `href`, `'self'` or `'blank'`",
          "docsTags": [
            {
              "name": "default",
              "text": "'self'"
            }
          ],
          "default": "'self'",
          "values": [
            {
              "value": "blank",
              "type": "string"
            },
            {
              "value": "self",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"strong\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneMinimalVariantType",
            "resolved": "\"strong\" | \"weak\" | undefined",
            "references": {
              "ToneMinimalVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneMinimalVariantType",
                "referenceLocation": "ToneMinimalVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Specifies the tone variant for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'strong'"
            }
          ],
          "default": "'strong'",
          "values": [
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "truncate",
          "type": "\"all\" | \"none\" | \"word\" | undefined",
          "complexType": {
            "original": "TypographyTruncateType",
            "resolved": "\"all\" | \"none\" | \"word\" | undefined",
            "references": {
              "TypographyTruncateType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyTruncateType",
                "referenceLocation": "TypographyTruncateType"
              }
            }
          },
          "mutable": false,
          "attr": "truncate",
          "reflectToAttr": true,
          "docs": "Specifies if the text shoud be truncated or should behave as a normal text",
          "docsTags": [
            {
              "name": "default",
              "text": "'word'"
            }
          ],
          "default": "'word'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "word",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "type",
          "type": "\"a\" | \"button\" | \"reset\" | \"submit\" | undefined",
          "complexType": {
            "original": "ButtonType",
            "resolved": "\"a\" | \"button\" | \"reset\" | \"submit\" | undefined",
            "references": {
              "ButtonType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonType",
                "referenceLocation": "ButtonType"
              }
            }
          },
          "mutable": false,
          "attr": "type",
          "reflectToAttr": true,
          "docs": "The type of the primary action: with `'submit'` or `'reset'` it submits or resets the form\nthe component is in, the chevron never does. Unlike `mds-button` it defaults to `'button'`",
          "docsTags": [
            {
              "name": "default",
              "text": "'button'"
            }
          ],
          "default": "'button'",
          "values": [
            {
              "value": "a",
              "type": "string"
            },
            {
              "value": "button",
              "type": "string"
            },
            {
              "value": "reset",
              "type": "string"
            },
            {
              "value": "submit",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "The value sent under `name` to the form the primary action submits",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"secondary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ButtonDropdownVariantType",
            "resolved": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"secondary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ButtonDropdownVariantType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonDropdownVariantType",
                "referenceLocation": "ButtonDropdownVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the color variant for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "secondary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsButtonDropdownClick",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the primary action is clicked or activated from the keyboard, unless the\ncomponent is disabled or awaiting. The chevron and the menu items do not emit it, while a\nnative `click` on the component also comes from the menu items",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-button-dropdown-radius",
          "annotation": "prop",
          "docs": "Sets the border-radius of the component",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "dropdown",
          "docs": "The `mds-dropdown` that the arrow opens, with the default slot inside"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button",
        "mds-dropdown"
      ],
      "dependencyGraph": {
        "mds-button-dropdown": [
          "mds-button",
          "mds-dropdown"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-button-dropdown--docs"
    },
    {
      "filePath": "src/components/mds-button-group/mds-button-group.tsx",
      "encapsulation": "shadow",
      "tag": "mds-button-group",
      "readme": "# mds-button-group\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `mds-button` or `mds-button-dropdown` elements to this slot."
        },
        {
          "name": "category",
          "text": "actions"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-button-group>` web component is a layout container of the Magma Design System that clusters related `<mds-button>` controls into a single, evenly-spaced horizontal group such as toolbars, action bars, or segmented sets of actions. It is a presentation-only wrapper with no props, events, or state - its sole job is to arrange its slotted children consistently.\n\n#### Semantic Behavior\n\n- **Default slot is content**: Whatever buttons (or button-like controls) you place inside are projected in source order. The group joins its `<mds-button>` / `<mds-button-dropdown>` members: it flattens their inner corners and sets them 2px apart, so only the outer corners of the cluster stay rounded.\n- **Inline layout**: The group shrinks to fit its content with consistent spacing and stays inline with surrounding elements; on its own it never takes the full row width.\n- **Width in a stretched row**: A row that stretches the group, as `actions/stacked` does under `--magma-container-actions` (380px) in `<mds-card-footer>`, `<mds-banner>`, `<mds-status-bar>` or a row of your own (`align-self: stretch`, a `width`, a `flex-basis`), gets the cluster across the whole row, as every other labelled action of it: each labelled member keeps its own width plus the same share of the free width, its label in the middle, so a long label is never cut for a short one; an `<mds-button-dropdown>` member gives its share to its primary action, and an icon-only member keeps its size.\n- **No own semantics**: It exposes no role, ARIA attributes, form association, focus management, or keyboard handling of its own - accessibility and interaction live entirely in the slotted children. It is purely a visual grouping primitive.\n\n#### Properties & Visual Configurations\n\nThis component has no configurable properties. Visual outcome is determined entirely by the slotted children - typically a set of `<mds-button>` elements sharing a common `variant` / `tone` (see the shared ladder in [`agents/variants.md`](../../../../agents/variants.md)) so the group reads as a cohesive cluster of actions.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-button-group>` 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#### Toolbar of Icon-Only Actions\n\nThe primary use case. Group icon-only `<mds-button>` elements that act on the same target - a text selection, a table row, or an editor surface. Each button must carry an explicit `aria-label` because no visible label is present.\n\n```html\n<mds-button-group>\n  <mds-button icon=\"mi/baseline/format-bold\" aria-label=\"Grassetto\" variant=\"dark\" tone=\"text\"></mds-button>\n  <mds-button icon=\"mi/baseline/format-italic\" aria-label=\"Corsivo\" variant=\"dark\" tone=\"text\"></mds-button>\n  <mds-button icon=\"mi/baseline/format-underlined\" aria-label=\"Sottolineato\" variant=\"dark\" tone=\"text\"></mds-button>\n</mds-button-group>\n```\n\n#### Segmented Set of Labelled Actions\n\nUse labelled buttons when the actions benefit from visible text - for example a primary / secondary / destructive trio at the bottom of a form section.\n\n```html\n<mds-button-group>\n  <mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n  <mds-button label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n</mds-button-group>\n```\n\n#### Mixed Emphasis Within a Group\n\nPair a high-emphasis primary button with lower-emphasis supporting actions. Keep the same `variant` family and vary only the `tone` so the group reads as a cohesive cluster, not a random set of buttons.\n\n```html\n<mds-button-group>\n  <mds-button label=\"Pubblica\" variant=\"primary\" tone=\"strong\"></mds-button>\n  <mds-button label=\"Salva come bozza\" variant=\"primary\" tone=\"outline\"></mds-button>\n  <mds-button label=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n</mds-button-group>\n```\n\n#### Inside a Toolbar or Action Bar\n\n`<mds-button-group>` is `inline-flex` by default, so multiple groups sit naturally beside other inline controls in a toolbar without extra CSS.\n\n```html\n<div class=\"toolbar\">\n  <mds-button-group>\n    <mds-button icon=\"mi/baseline/undo\" aria-label=\"Annulla\" variant=\"dark\" tone=\"text\"></mds-button>\n    <mds-button icon=\"mi/baseline/redo\" aria-label=\"Ripristina\" variant=\"dark\" tone=\"text\"></mds-button>\n  </mds-button-group>\n\n  <mds-button-group>\n    <mds-button icon=\"mi/baseline/format-bold\" aria-label=\"Grassetto\" variant=\"dark\" tone=\"text\"></mds-button>\n    <mds-button icon=\"mi/baseline/format-italic\" aria-label=\"Corsivo\" variant=\"dark\" tone=\"text\"></mds-button>\n    <mds-button icon=\"mi/baseline/format-underlined\" aria-label=\"Sottolineato\" variant=\"dark\" tone=\"text\"></mds-button>\n  </mds-button-group>\n</div>\n```\n\n#### Including a `<mds-button-dropdown>` in the Group\n\nThe default slot accepts any `<mds-button>` or `<mds-button-dropdown>` sibling component. Place the dropdown last or first depending on visual priority.\n\n```html\n<mds-button-group>\n  <mds-button label=\"Esporta CSV\" variant=\"primary\" tone=\"weak\"></mds-button>\n  <mds-button-dropdown label=\"Altre opzioni\" variant=\"primary\" tone=\"weak\">\n    <mds-button variant=\"dark\" tone=\"text\" label=\"Esporta PDF\"></mds-button>\n    <mds-button variant=\"dark\" tone=\"text\" label=\"Esporta Excel\"></mds-button>\n  </mds-button-dropdown>\n</mds-button-group>\n```\n\n#### In a Row of Actions That Stacks\n\nStretch the group as any other action of the row: under `--magma-container-actions` of its container (`@max-actions:`), `actions/stacked` puts every labelled action at the full width, and the group shares that width among its labelled members, the joined corners as before. No part or custom property is needed.\n\n```html\n<div class=\"@container\">\n  <div class=\"flex justify-end gap-inline @max-actions:flex-col @max-actions:*:self-stretch\">\n    <mds-button variant=\"dark\" tone=\"outline\" label=\"Annulla\"></mds-button>\n    <mds-button-group>\n      <mds-button variant=\"primary\" tone=\"outline\" label=\"Salva come bozza\"></mds-button>\n      <mds-button variant=\"primary\" label=\"Pubblica\"></mds-button>\n    </mds-button-group>\n  </div>\n</div>\n```\n\n#### Disabled Buttons Inside a Group\n\nDisable individual buttons with the `disabled` boolean attribute. Never use `disabled=\"false\"` - remove the attribute to re-enable. The group itself has no `disabled` prop.\n\n```html\n<mds-button-group>\n  <mds-button label=\"Approva\" variant=\"success\" tone=\"strong\"></mds-button>\n  <mds-button label=\"Rifiuta\" variant=\"error\" tone=\"outline\" disabled></mds-button>\n</mds-button-group>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-button-group>`. 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 Nest Raw `<button>` Elements Inside the Group\n\nThe group is part of the Magma component system and is designed to host `<mds-button>` (and sibling `mds-*` action) components. Raw `<button>` elements bypass theming, focus styles, and accessibility defaults.\n\n```html\n<!-- INCORRECT -->\n<mds-button-group>\n  <button class=\"btn\">Salva</button>\n  <button class=\"btn\">Annulla</button>\n</mds-button-group>\n\n<!-- CORRECT -->\n<mds-button-group>\n  <mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n  <mds-button label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n</mds-button-group>\n```\n\n#### Do Not Wrap the Group in an Anchor\n\n`<mds-button-group>` contains interactive controls; nesting the whole group inside `<a>` creates nested interactives, breaks keyboard semantics, and fails accessibility audits. Use the `href` prop on individual `<mds-button>` elements instead.\n\n```html\n<!-- INCORRECT -->\n<a href=\"/azioni\">\n  <mds-button-group>\n    <mds-button label=\"Vai\" variant=\"primary\"></mds-button>\n  </mds-button-group>\n</a>\n\n<!-- CORRECT -->\n<mds-button-group>\n  <mds-button label=\"Vai\" href=\"/azioni\" variant=\"primary\"></mds-button>\n</mds-button-group>\n```\n\n#### Do Not Omit `aria-label` on Icon-Only Buttons Inside a Group\n\nGrouping icon-only buttons does not remove the requirement for an accessible name on each child. Without it `mds-button` falls back to the last segment of the icon slug (\"undo\"), which names the icon, not the action.\n\n```html\n<!-- INCORRECT -->\n<mds-button-group>\n  <mds-button icon=\"mi/baseline/undo\" variant=\"dark\" tone=\"text\"></mds-button>\n  <mds-button icon=\"mi/baseline/redo\" variant=\"dark\" tone=\"text\"></mds-button>\n</mds-button-group>\n\n<!-- CORRECT -->\n<mds-button-group>\n  <mds-button icon=\"mi/baseline/undo\" aria-label=\"Annulla\" variant=\"dark\" tone=\"text\"></mds-button>\n  <mds-button icon=\"mi/baseline/redo\" aria-label=\"Ripristina\" variant=\"dark\" tone=\"text\"></mds-button>\n</mds-button-group>\n```\n\n#### Do Not Nest `<mds-button-group>` Inside Another Group\n\nThe component is a flat layout primitive; nesting groups creates redundant flex containers that break the consistent spacing and group visual coherence. Keep the hierarchy flat.\n\n```html\n<!-- INCORRECT -->\n<mds-button-group>\n  <mds-button-group>\n    <mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n    <mds-button label=\"Bozza\" variant=\"primary\" tone=\"outline\"></mds-button>\n  </mds-button-group>\n  <mds-button label=\"Annulla\" variant=\"dark\" tone=\"text\"></mds-button>\n</mds-button-group>\n\n<!-- CORRECT -->\n<mds-button-group>\n  <mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n  <mds-button label=\"Bozza\" variant=\"primary\" tone=\"outline\"></mds-button>\n  <mds-button label=\"Annulla\" variant=\"dark\" tone=\"text\"></mds-button>\n</mds-button-group>\n```\n\n#### Do Not Override Spacing with Inline Styles\n\nThe component manages its own gap via a design-token-backed CSS value. Setting inline `gap`, `margin`, or `padding` on the host or child buttons breaks the token contract and may produce inconsistent spacing across themes.\n\n```css\n/* INCORRECT */\nmds-button-group {\n  gap: 16px;\n}\nmds-button-group mds-button {\n  margin-right: 8px;\n}\n\n/* CORRECT - let the component handle spacing; style only what it exposes */\nmds-button-group {\n  /* no gap or margin overrides needed */\n}\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-button` or `mds-button-dropdown` elements to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-button-group--docs"
    },
    {
      "filePath": "src/components/mds-calendar/mds-calendar.tsx",
      "encapsulation": "shadow",
      "tag": "mds-calendar",
      "readme": "# mds-calendar\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "preselection - Add `HTML elements` or `components` shown in the calendar preselection area."
        },
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-calendar>` web component is the date-selection surface of the Magma Design System: a localized month grid that lets users pick either a single day or a date range. It is the visual engine behind `mds-input-date` and `mds-input-date-range`.\n\n#### Semantic Behavior\n\n- **Range vs. single mode**: range selection is the default; set `singlePicker` to pick one day. In range mode the first click sets the start, the second sets the end, and a third click starts a new range from the clicked day; in single mode each click replaces the prior choice.\n- **Active end**: a parent that lets the user choose which end to change, as [`mds-input-date-range`](../mds-input-date-range/AGENTS.md) does, names it in `activeEnd` (`start` or `end`): a click then changes that end only, also on a complete range, instead of starting a new one. With no start, a click picks the start whatever `activeEnd` says.\n- **Never backwards**: a click never swaps the ends. A day before the start, clicked while the end is picked, becomes the new start and the end is still to pick; a day after the end, clicked while the start is picked (`activeEnd=\"start\"`), becomes the new start and the end is emptied. A `startDate` / `endDate` pair given backwards, in the markup or from code, is put in order (with a console warning); a parent that sets the two props one after the other is read once both have arrived, so a start moved past the old end is not taken for a range given backwards.\n- **Hover preview**: While a range waits for its end, the day under the pointer is previewed: the band from the start to that day when a click there would end the range, that day alone when it would become a new start. The preview is dropped with the click that changes the range.\n- **Marks**: a chosen day, either end of a range or the day of a single picker, is a full dot, the start and the end alike, and the days between them a band; the day under the pointer, not chosen yet, is a ring on a paler band.\n- **Min/max bounds**: `min` and `max` mark out-of-range day cells as disabled, blocking their selection.\n- **Multi-view navigation**: The header toggles between the day grid, a month picker, and a year picker; the year view pages in decades while the calendar view pages month by month. The two arrows are icon-only buttons named in the page language (the `lang` of `<html>`): previous / next month on the day grid, previous / next years in the year view; the month picker has nothing to page through, so there they are disabled. The header is a navigation landmark named after the month and year it shows, so two calendars side by side are two distinct landmarks.\n- **Localization**: Weekday names, month names, and cell titles are formatted in the page language (the `lang` attribute of `<html>`, `en` when absent).\n- **Emitted events**: `mdsCalendarChange` fires on every pick with `{ startDate, endDate? }`: in range mode the first click emits `{ startDate }` alone, the second the full range; `mdsCalendarPreselect` fires only with a completed range, to let preselection shortcuts re-evaluate their state.\n- **Preselection slot**: A `preselection` named slot hosts quick-pick shortcuts. The area appears while the slot holds an element, one added after load included; `hidePreselection` collapses it. The `date-preselection--has-preselection` class earlier versions required is no longer needed (it still shows the area).\n\n#### Properties & Visual Configurations\n\nDates are exchanged as ISO 8601 strings (`YYYY-MM-DD`). `startDate` and `endDate` seed the selection (a click updates the internal selection and emits `mdsCalendarChange`, it does not rewrite the attributes); on load, a valid `startDate` also determines which month is shown first.\n\n- **`singlePicker`** is the mode switch: omit it for two-ended range selection, set it for single-day pickers. When set, any `endDate` is ignored and cleared with a warning.\n- **`activeEnd`** names the end the next click picks, for a parent that shows the user which one it is; leave it unset on a calendar standing alone.\n- **`hidePreviousButton`** / **`hideNextButton`** remove one of the header navigation buttons, typically on calendars paired side by side; **`disableMonthYearSelection`** keeps the header on the day grid; **`hideToday`** removes the highlight on today's date.\n- Every boolean prop defaults to `false`: the feature is on until the bare attribute turns it off.\n- **`min`** / **`max`** define the selectable window; days outside it render disabled rather than being hidden.\n\nThis component does not use the shared `variant` / `tone` ladders on its host - those are defined in [`agents/variants.md`](../../../../agents/variants.md) and are applied internally to the navigation buttons it renders.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-calendar>` 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#### Single-Day Picker\n\nSet the bare `single-picker` attribute for a plain single-date selector. `mdsCalendarChange` fires once with `{ startDate }` and no `endDate`. Seed an initial date via `start-date`.\n\n```html\n<mds-calendar single-picker start-date=\"2025-06-10\"></mds-calendar>\n\n<script>\n  document.querySelector('mds-calendar').addEventListener('mdsCalendarChange', (e) => {\n    console.log('Data selezionata:', e.detail.startDate);\n  });\n</script>\n```\n\n#### Range Picker (default mode)\n\nRange selection is the default: omit `single-picker`. The first click sets the start date, the second sets the end date; a second click before the start makes that day the new start, and the end is still to pick. A click on a complete range starts a new range from the clicked day. `mdsCalendarChange` fires on every click: while the end is missing `endDate` is absent. Preload a range by supplying both `start-date` and `end-date`.\n\n```html\n<mds-calendar start-date=\"2025-09-01\" end-date=\"2025-09-15\"></mds-calendar>\n\n<script>\n  document.querySelector('mds-calendar').addEventListener('mdsCalendarChange', (e) => {\n    const { startDate, endDate } = e.detail;\n    console.log('Intervallo selezionato:', startDate, '-', endDate);\n  });\n</script>\n```\n\n#### Naming the End a Click Picks\n\nA parent that lets the user choose which end to change sets `active-end` to `start` or `end`, and keeps it in step with what the user picks: a click then changes that end only, also on a complete range. A click never puts the range backwards: picking the end, a day before the start becomes the new start; picking the start, a day after the end becomes the new start and empties the end. [`mds-input-date-range`](../mds-input-date-range/AGENTS.md) drives its calendars this way from its fields and from the header of its panel; prefer it to a calendar of your own.\n\n```html\n<mds-calendar id=\"periodo\" start-date=\"2025-09-01\" end-date=\"2025-09-15\" active-end=\"start\"></mds-calendar>\n\n<script>\n  const calendar = document.querySelector('#periodo');\n  calendar.addEventListener('mdsCalendarChange', () => {\n    // the start is picked: the end comes next\n    calendar.activeEnd = 'end';\n  });\n</script>\n```\n\n#### Restricting the Selectable Window with `min` / `max`\n\nPass ISO 8601 strings to `min` and `max` to mark out-of-range days as disabled. Days outside the window are not hidden - they remain visible but cannot be clicked.\n\n```html\n<mds-calendar\n  single-picker\n  min=\"2025-01-01\"\n  max=\"2025-12-31\"\n></mds-calendar>\n```\n\n#### Navigating to a Specific Month Programmatically\n\nUse the `updateCurrentDate` method to jump the visible month without changing the current selection. Pass any ISO date string that falls within the target month.\n\n```html\n<mds-calendar id=\"cal\" single-picker></mds-calendar>\n\n<script>\n  document.querySelector('#cal').updateCurrentDate('2026-03-01');\n</script>\n```\n\n#### Quick-Pick Preselection Shortcuts\n\nThe `preselection` named slot hosts your own shortcuts, for example `mds-button` elements whose `click` sets `start-date` / `end-date` ([`mds-input-date-range-preselection`](../mds-input-date-range-preselection/AGENTS.md) works only inside `mds-input-date-range`). The slot panel becomes visible as soon as the slot holds an element, also one added after load; set `hide-preselection` to keep it collapsed. `mdsCalendarPreselect` fires after each completed range selection so the shortcuts can re-evaluate their active state.\n\n```html\n<mds-calendar start-date=\"2025-09-01\" end-date=\"2025-09-07\">\n  <div slot=\"preselection\">\n    <mds-button variant=\"dark\" tone=\"text\" label=\"Ultimi 7 giorni\"></mds-button>\n    <mds-button variant=\"dark\" tone=\"text\" label=\"Ultimi 30 giorni\"></mds-button>\n  </div>\n</mds-calendar>\n```\n\n#### Paired Calendars Without Duplicate Navigation\n\nTwo calendars shown side by side (the pattern used by `mds-input-date-range` on wide viewports) should expose one previous and one next button in total: hide the inner buttons with `hide-previous-button` / `hide-next-button` and lock the header on the day grid with `disable-month-year-selection`, then keep the two `view-date` values one month apart from the `mdsCalendarNavigate` event.\n\n```html\n<mds-calendar id=\"start\" view-date=\"2025-09-01\" hide-next-button disable-month-year-selection></mds-calendar>\n<mds-calendar id=\"end\" view-date=\"2025-10-01\" hide-previous-button disable-month-year-selection></mds-calendar>\n```\n\n#### Listening for Selection Changes\n\nListen on the documented `mdsCalendarChange` event - not the native `change` event - so the handler receives the structured `{ startDate, endDate? }` detail object directly from the Shadow DOM.\n\n```html\n<mds-calendar id=\"picker\" single-picker></mds-calendar>\n\n<script>\n  document.querySelector('#picker').addEventListener('mdsCalendarChange', (e) => {\n    const { startDate } = e.detail;\n    document.querySelector('#output').textContent = 'Scadenza: ' + startDate;\n  });\n</script>\n```\n\n#### Embedded inside `mds-input-date` or `mds-input-date-range`\n\n`<mds-calendar>` is the visual engine used internally by [`mds-input-date`](../mds-input-date/AGENTS.md) and [`mds-input-date-range`](../mds-input-date-range/AGENTS.md). In most product surfaces, reach for those higher-level components. Use `<mds-calendar>` directly only when you need a standalone always-visible date grid without an associated text input.\n\n```html\n<!-- Higher-level: input with calendar overlay -->\n<mds-input-field label=\"Scadenza\">\n  <mds-input-date name=\"scadenza\"></mds-input-date>\n</mds-input-field>\n\n<!-- Lower-level: always-visible standalone grid -->\n<mds-calendar single-picker></mds-calendar>\n```\n\n#### Styling Customization via CSS Custom Properties\n\nAdjust the calendar appearance only through the public `--mds-calendar-*` CSS custom properties. Set them on the host element or a parent selector; use the semantic color roles so dark mode, named themes and high contrast keep working. The day cells inherit from the calendar their own public `--mds-calendar-cell-*` properties, documented on [`mds-calendar-cell`](../mds-calendar-cell/AGENTS.md).\n\n```css\n.booking-widget mds-calendar {\n  --mds-calendar-background: rgb(var(--magma-surface-muted));\n  --mds-calendar-border-radius: var(--magma-radius-xl);\n  --mds-calendar-padding: calc(var(--spacing) * 500);\n  --mds-calendar-cell-other-month-visibility: hidden;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-calendar>`. 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 Toggle Single Mode with a Quoted Boolean String\n\n`singlePicker` is a boolean prop that defaults to `false`. The component reads the string `\"false\"` as `false`, but the prop is not reflected, so `single-picker=\"false\"` stays in the DOM and attribute selectors (`mds-calendar[single-picker]`) and any code reading the attribute still see it set. Use the bare attribute for single mode and omit it for the default range mode; toggle it at runtime by adding/removing the attribute or setting the property in JavaScript.\n\n```html\n<!-- INCORRECT -->\n<mds-calendar single-picker=\"false\"></mds-calendar>\n\n<!-- CORRECT -->\n<mds-calendar></mds-calendar>\n<mds-calendar id=\"cal\" single-picker></mds-calendar>\n<script>\n  document.querySelector('#cal').singlePicker = false; // back to range mode\n</script>\n```\n\n#### Do Not Set `end-date` When `single-picker` Is Set\n\nWhen `singlePicker` is set, the component rejects `endDate` with a console warning and clears it internally. Setting both `single-picker` and `end-date` is contradictory and produces no visible selection for the end date.\n\n```html\n<!-- INCORRECT -->\n<mds-calendar single-picker start-date=\"2025-06-01\" end-date=\"2025-06-15\"></mds-calendar>\n\n<!-- CORRECT -->\n<mds-calendar single-picker start-date=\"2025-06-01\"></mds-calendar>\n```\n\n#### Do Not Provide `startDate` After `endDate`\n\nDates must be chronologically ordered: `startDate` must precede `endDate`. The component puts a pair given backwards in order, with a console warning, but the warning is noise in the console of the page and the swap may not be the range the user meant. Always ensure `start-date <= end-date`; setting the two one after the other in the same task is fine, the calendar reads them once both have arrived.\n\n```html\n<!-- INCORRECT -->\n<mds-calendar start-date=\"2025-12-31\" end-date=\"2025-12-01\"></mds-calendar>\n\n<!-- CORRECT -->\n<mds-calendar start-date=\"2025-12-01\" end-date=\"2025-12-31\"></mds-calendar>\n```\n\n#### Do Not Listen for the Native `change` Event\n\n`<mds-calendar>` does not bubble a native `change` event from inside its Shadow DOM. Use the documented `mdsCalendarChange` custom event so the handler reliably receives the structured `{ startDate, endDate? }` payload.\n\n```html\n<!-- INCORRECT -->\n<mds-calendar id=\"cal\"></mds-calendar>\n<script>\n  document.querySelector('#cal').addEventListener('change', (e) => {\n    console.log(e.target.value); // undefined - wrong event\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-calendar id=\"cal\"></mds-calendar>\n<script>\n  document.querySelector('#cal').addEventListener('mdsCalendarChange', (e) => {\n    console.log(e.detail.startDate, e.detail.endDate);\n  });\n</script>\n```\n\n#### Do Not Use `<mds-calendar>` as a Drop-In Replacement for `mds-input-date`\n\n`<mds-calendar>` is not form-associated and emits no `name`/`value` pair for form submission. When you need a date picker tied to a form field, use [`mds-input-date`](../mds-input-date/AGENTS.md) (single date) or [`mds-input-date-range`](../mds-input-date-range/AGENTS.md) (range) instead.\n\n```html\n<!-- INCORRECT -->\n<form action=\"/prenota\" method=\"post\">\n  <mds-calendar name=\"check-in\" single-picker></mds-calendar>\n  <mds-button type=\"submit\" label=\"Prenota\"></mds-button>\n</form>\n\n<!-- CORRECT -->\n<form action=\"/prenota\" method=\"post\">\n  <mds-input-field label=\"Data di arrivo\">\n    <mds-input-date name=\"check-in\"></mds-input-date>\n  </mds-input-field>\n  <mds-button type=\"submit\" label=\"Prenota\"></mds-button>\n</form>\n```\n\n#### Do Not Style Internals via Undocumented `::part()` Selectors\n\nThe only supported customization surface is the set of public `--mds-calendar-*` CSS custom properties. Targeting shadow-DOM internals with `::part()` selectors that are not in the documentation couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-calendar::part(nav) {\n  background: red;\n}\nmds-calendar::part(cell) {\n  border: 1px solid blue;\n}\n\n/* CORRECT */\nmds-calendar {\n  --mds-calendar-background: rgb(var(--magma-surface-muted));\n  --mds-calendar-border-radius: var(--magma-radius-xl);\n  --mds-calendar-cell-other-month-visibility: hidden;\n}\n```\n"
      },
      "props": [
        {
          "name": "activeEnd",
          "type": "\"end\" | \"start\" | undefined",
          "complexType": {
            "original": "CalendarRangeEndType",
            "resolved": "\"end\" | \"start\" | undefined",
            "references": {
              "CalendarRangeEndType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-calendar/meta/types.ts::CalendarRangeEndType",
                "referenceLocation": "CalendarRangeEndType"
              }
            }
          },
          "mutable": false,
          "attr": "active-end",
          "reflectToAttr": true,
          "docs": "Specifies the end of the range the next click picks, `start` or `end`, for a parent that\nlets the user choose it, as `mds-input-date-range` does from its fields and from the header\nof its panel. A click never puts the range backwards: a day after the end, picked as the\nstart, becomes the new start and empties the end; a day before the start, picked as the end,\nbecomes the new start and leaves the end to pick. With no start, a click picks the start.\nLeft unset, the calendar picks the start, then the end, and a click on a complete range\nstarts a new one.",
          "docsTags": [],
          "values": [
            {
              "value": "end",
              "type": "string"
            },
            {
              "value": "start",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disableMonthYearSelection",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "disable-month-year-selection",
          "reflectToAttr": false,
          "docs": "Disables switching to month or year selection views from the calendar header.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "endDate",
          "type": "null | string",
          "complexType": {
            "original": "string | null",
            "resolved": "null | string",
            "references": {}
          },
          "mutable": false,
          "attr": "end-date",
          "reflectToAttr": true,
          "docs": "Specifies the end date of the selection",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2023-10-01'"
            },
            {
              "name": "default",
              "text": "null"
            }
          ],
          "default": "null",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hideNextButton",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-next-button",
          "reflectToAttr": false,
          "docs": "If set, the component hides the next navigation button in the calendar header.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hidePreselection",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-preselection",
          "reflectToAttr": false,
          "docs": "If set, the component hides the preselection area above the calendar view even when the\n`preselection` slot has content.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hidePreviousButton",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-previous-button",
          "reflectToAttr": false,
          "docs": "If set, the component hides the previous navigation button in the calendar header.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hideToday",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-today",
          "reflectToAttr": false,
          "docs": "Hides the highlight on today's date in the calendar view.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hoverDate",
          "type": "null | string",
          "complexType": {
            "original": "string | null",
            "resolved": "null | string",
            "references": {}
          },
          "mutable": false,
          "attr": "hover-date",
          "reflectToAttr": true,
          "docs": "Specifies the date used to preview the range selection across multiple visible calendars.",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2023-10-15'"
            },
            {
              "name": "default",
              "text": "null"
            }
          ],
          "default": "null",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "max",
          "type": "null | string",
          "complexType": {
            "original": "string | null",
            "resolved": "null | string",
            "references": {}
          },
          "mutable": false,
          "attr": "max",
          "reflectToAttr": true,
          "docs": "Specifies the minimum date of the selection",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2023-10-01'"
            },
            {
              "name": "default",
              "text": "null"
            }
          ],
          "default": "null",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "min",
          "type": "null | string",
          "complexType": {
            "original": "string | null",
            "resolved": "null | string",
            "references": {}
          },
          "mutable": false,
          "attr": "min",
          "reflectToAttr": true,
          "docs": "Specifies the minimum date of the selection",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2023-10-01'"
            },
            {
              "name": "default",
              "text": "null"
            }
          ],
          "default": "null",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "singlePicker",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "single-picker",
          "reflectToAttr": false,
          "docs": "If set, the component selects a single date instead of a date range (start and end date).",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "startDate",
          "type": "null | string",
          "complexType": {
            "original": "string | null",
            "resolved": "null | string",
            "references": {}
          },
          "mutable": false,
          "attr": "start-date",
          "reflectToAttr": true,
          "docs": "Specifies the start date of the selection",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2023-10-01'"
            },
            {
              "name": "default",
              "text": "null"
            }
          ],
          "default": "null",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "viewDate",
          "type": "null | string",
          "complexType": {
            "original": "string | null",
            "resolved": "null | string",
            "references": {}
          },
          "mutable": false,
          "attr": "view-date",
          "reflectToAttr": true,
          "docs": "Specifies the date used to determine the visible month without changing the selection.",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2023-10-01'"
            },
            {
              "name": "default",
              "text": "null"
            }
          ],
          "default": "null",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "updateCurrentDate",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(date: string) => Promise<void>",
            "parameters": [
              {
                "name": "date",
                "type": "string",
                "docs": "the date to display, in ISO format (YYYY-MM-DD)"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "updateCurrentDate(date: string) => Promise<void>",
          "parameters": [
            {
              "name": "date",
              "type": "string",
              "docs": "the date to display, in ISO format (YYYY-MM-DD)"
            }
          ],
          "docs": "Sets the calendar's current date and re-renders the calendar accordingly.",
          "docsTags": [
            {
              "name": "param",
              "text": "date the date to display, in ISO format (YYYY-MM-DD)"
            }
          ]
        }
      ],
      "events": [
        {
          "event": "mdsCalendarChange",
          "detail": "{ startDate: string; endDate?: string | undefined; }",
          "bubbles": true,
          "complexType": {
            "original": "{\n    startDate: string;\n    endDate?: string;\n  }",
            "resolved": "{ startDate: string; endDate?: string | undefined; }",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emitted when the selected date or date range changes.",
          "docsTags": []
        },
        {
          "event": "mdsCalendarHover",
          "detail": "{ hoverDate: string | null; }",
          "bubbles": true,
          "complexType": {
            "original": "{\n    hoverDate: string | null;\n  }",
            "resolved": "{ hoverDate: string | null; }",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emitted when the user hovers over a day, used to preview a range selection.",
          "docsTags": []
        },
        {
          "event": "mdsCalendarNavigate",
          "detail": "{ currentDate: string; delta: number; }",
          "bubbles": true,
          "complexType": {
            "original": "{\n    currentDate: string;\n    delta: number;\n  }",
            "resolved": "{ currentDate: string; delta: number; }",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emitted when the user navigates to a different month or year.",
          "docsTags": []
        },
        {
          "event": "mdsCalendarPreselect",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emitted when the calendar's preselection options need to be re-evaluated.",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-calendar-background",
          "annotation": "prop",
          "docs": "The background color of the calendar container.",
          "visibility": "public"
        },
        {
          "name": "--mds-calendar-border-radius",
          "annotation": "prop",
          "docs": "The border-radius of the calendar container.",
          "visibility": "public"
        },
        {
          "name": "--mds-calendar-cell-gap",
          "annotation": "prop",
          "docs": "The spacing between calendar day cells.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-cell-other-month-visibility",
          "annotation": "prop",
          "docs": "Controls visibility of days from other months (e.g. \"visible\", \"hidden\").",
          "visibility": "public"
        },
        {
          "name": "--mds-calendar-day-number-color",
          "annotation": "prop",
          "docs": "The color of the day numbers of the current month, weekend days aside (`--mds-calendar-cell-weekend-color`); `--mds-calendar-cell-color` wins over it.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-max-width",
          "annotation": "prop",
          "docs": "The maximum inline size of the calendar; it fills its container up to this width.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-padding",
          "annotation": "prop",
          "docs": "The internal padding of the calendar container.",
          "visibility": "public"
        },
        {
          "name": "--mds-calendar-select-month-or-year-height",
          "annotation": "prop",
          "docs": "The height of the month/year selector in the calendar header.",
          "visibility": "internal"
        },
        {
          "name": "--mds-calendar-select-month-or-year-width",
          "annotation": "prop",
          "docs": "The width of the month/year selector in the calendar header.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "preselection",
          "docs": "Add `HTML elements` or `components` shown in the calendar preselection area."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-input-date",
        "mds-input-date-range"
      ],
      "dependencies": [
        "mds-button",
        "mds-calendar-cell"
      ],
      "dependencyGraph": {
        "mds-calendar": [
          "mds-button",
          "mds-calendar-cell"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-calendar-cell": [
          "mds-button"
        ],
        "mds-input-date": [
          "mds-calendar"
        ],
        "mds-input-date-range": [
          "mds-calendar"
        ]
      },
      "storybook": "ui-calendar--docs"
    },
    {
      "filePath": "src/components/mds-calendar-cell/mds-calendar-cell.tsx",
      "encapsulation": "shadow",
      "tag": "mds-calendar-cell",
      "readme": "# mds-calendar-cell\n\n\n",
      "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"
    },
    {
      "filePath": "src/components/mds-card/mds-card.tsx",
      "encapsulation": "shadow",
      "tag": "mds-card",
      "readme": "# mds-card\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "layout - The layout element that wraps the slotted content"
        },
        {
          "name": "slot",
          "text": "media - Add `HTML elements` or `components`Add `HTML elements` or `components`, it is **recommended** to use `mds-img` element or other component to represent media contents, used for images or videos, it's responsive behaviour based on container queries is handled with `auto-grid` enabled"
        },
        {
          "name": "slot",
          "text": "header - Add `HTML elements` or `components`, it's responsive behaviour based on container queries is handled with `auto-grid` enabled"
        },
        {
          "name": "slot",
          "text": "content - Add `HTML elements` or `components`, it's responsive behaviour based on container queries is handled with `auto-grid` enabled"
        },
        {
          "name": "slot",
          "text": "footer - Add `HTML elements` or `components`, it's responsive behaviour based on container queries is handled with `auto-grid` enabled"
        },
        {
          "name": "category",
          "text": "structure"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-card>` web component is the surface container of the Magma Design System: a styled, self-contained panel that groups related media, heading, body and action content into a single bounded region. It is a pure layout shell built on named slots and compound children rather than a replacement for any single HTML primitive.\n\n#### Semantic Behavior\n\n- **Layout is inferred, not declared**: The card detects which of the `media` / `header` / `content` / `footer` regions are present, again whenever its content changes, and reshapes itself to whatever content you provide.\n- **Compound parent/child relationship**: `<mds-card-media>`, `<mds-card-header>`, `<mds-card-content>` and `<mds-card-footer>` are recognized by tag name and mapped onto the corresponding region, so they slot in without an explicit `slot` attribute. Plain elements given the matching `slot` value land in that region and take part in the managed grid the same way.\n- **Responsive by width**: The card's internal layout switches between stacked and media-beside-content arrangements based on the card's own width, independent of viewport or theme.\n- **One inset, shared by the regions**: The card pads its regions once, with `--magma-rhythm-inset` (600), and sets them `--magma-rhythm-title-content` (300) apart, so the title of a card stands nearer to its content than to the edge. The regions pad nothing of their own (`rhythm/inset`, `rhythm/shared-inset` in the design language).\n- **The media reaches the edges it touches**: `<mds-card-media>` leaves the inset on the sides where it meets the edge of the card: both sides when the regions are stacked, the top too when no header stands above it, the top, the bottom and the start when it stands beside the content. From the other regions it stands 300, as they do from each other (`rhythm/media-bleed`).\n- **The actions stand apart**: The footer stands `--magma-rhythm-content-actions` (600) from the region before it, as the row of actions of a form or of a dialog: the actions act on the whole card, not on its last line (`rhythm/content-actions`).\n- **The footer closes the card**: The footer region sits at the bottom of the card whatever the other regions are. When the card is taller than its parts (a media taller than header and footer together, or a grid row that stretches a set of cards to one height) and there is no content to take the free space, that space stays above the footer, in the card's background.\n- **The card sets the text of its own surface**: It paints `surface-raised` and sets its `color` to `text-default`, the pair the contrast gate measures, so its regions inherit the text of the card, not the colour of what the card stands on: on a band of colour (`surfaces/intro-band`) its text keeps reading without a reset. A `text-*` class or a `color` on the host still wins.\n- **Slot regions are fixed**: Only the four named regions are rendered; there is no default (unnamed) slot, so loose text or elements without a recognized slot/tag are not laid out.\n\n#### Properties & Visual Configurations\n\n`<mds-card>` does not use the shared `variant` / `tone` ladders defined in [`agents/variants.md`](../../../../agents/variants.md); it exposes a single behavioral prop.\n\n- **`disableAutoGrid`** (default `false`) toggles the intrinsic responsive grid. Leave it off to let the card own the placement and reflow of its regions; set it to opt out of the managed grid and lay the slotted content out yourself.\n\nThe inset and the gap follow the rhythm roles, so a density theme moves them with every other space. `--mds-card-padding` and `--mds-card-gap` override them for a set of cards, with another rhythm role, never a step; the background of the card and of its regions is `--mds-card-background`, its text `--mds-card-color`: set them together, so the text keeps reading on the surface.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-card>` 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#### Full Card with All Four Regions\n\nThe most common form. Use `<mds-card-header>`, `<mds-card-media>`, `<mds-card-content>`, and `<mds-card-footer>` as direct children. Each compound child self-assigns to its slot - no explicit `slot` attribute needed.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Titolo della scheda</mds-text>\n  </mds-card-header>\n  <mds-card-media>\n    <mds-img src=\"/immagini/copertina.jpg\" alt=\"Copertina del contenuto della scheda\" class=\"object-cover\"></mds-img>\n  </mds-card-media>\n  <mds-card-content>\n    <mds-text>\n      Descrizione dettagliata del contenuto della scheda.\n    </mds-text>\n  </mds-card-content>\n  <mds-card-footer>\n    <mds-button variant=\"dark\" tone=\"text\" label=\"Annulla\"></mds-button>\n    <mds-button variant=\"primary\" tone=\"strong\" label=\"Conferma\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Header + Content (No Media)\n\nOmit the regions you do not need - the card detects which regions are present and adapts its grid layout accordingly. A header-and-content-only card stays single-column.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Riepilogo ordine</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>\n      Il tuo ordine e' stato elaborato correttamente.\n    </mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Media + Content + Footer (No Header)\n\nOmitting the header region shifts media to the top and content immediately below. Useful for image-led catalog cards.\n\n```html\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/immagini/prodotto.jpg\" alt=\"Il prodotto della gamma autunnale\" class=\"object-cover\"></mds-img>\n  </mds-card-media>\n  <mds-card-content>\n    <mds-text>Descrizione prodotto disponibile nella gamma autunnale.</mds-text>\n  </mds-card-content>\n  <mds-card-footer>\n    <mds-button variant=\"primary\" label=\"Aggiungi al carrello\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Header with Action Button via `mds-card-header`\n\n`<mds-card-header>` has a dedicated `action` slot for icon buttons placed in the trailing position. Use it instead of laying out the button manually.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Profilo utente</mds-text>\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/round/more-vert\"\n      aria-label=\"Altre azioni\"\n      variant=\"dark\"\n      tone=\"text\"\n    ></mds-button>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Mario Rossi - Amministratore di sistema</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Media with Overlay Content via `mds-card-media`\n\n`<mds-card-media>` exposes a `content` slot that renders in front of the media element. Use it for captions, badges, or status chips overlaid on an image.\n\n```html\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/immagini/evento.jpg\" alt=\"Il palco della conferenza annuale\" class=\"object-cover\"></mds-img>\n    <mds-badge slot=\"content\" variant=\"info\" tone=\"strong\">In corso</mds-badge>\n  </mds-card-media>\n  <mds-card-content>\n    <mds-text typography=\"h6\">Conferenza annuale 2025</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Using Raw Slot Attributes Instead of Compound Children\n\nWhen the compound children (`mds-card-*`) do not fit the use case, assign the `slot` attribute directly on any element, with the same four values: `media`, `header`, `content`, and `footer`. The card reads the regions from the `slot` values, so plain elements get the same managed grid and the same inset as the compound children: do not pad them.\n\n```html\n<mds-card>\n  <div slot=\"header\" class=\"flex items-center gap-inline\">\n    <mds-avatar initials=\"LB\"></mds-avatar>\n    <mds-text typography=\"h6\">Luca Bianchi</mds-text>\n  </div>\n  <mds-img slot=\"media\" src=\"/immagini/lavoro.jpg\" alt=\"Luca Bianchi in cantiere\" class=\"object-cover\"></mds-img>\n  <mds-text slot=\"content\">\n    Responsabile del progetto infrastrutture.\n  </mds-text>\n</mds-card>\n```\n\n#### Disabling the Auto-Grid\n\nSet `disable-auto-grid` to opt out of the managed responsive grid. The regions stack in slot order (media, header, content, footer), whatever their order in the markup, and you own all layout decisions.\n\n```html\n<mds-card disable-auto-grid>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Layout personalizzato</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Il contenuto e' disposto senza griglia automatica.</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Styling Customization via CSS Custom Properties\n\nThe card already takes its inset and its gap from the rhythm roles (`--magma-rhythm-inset`, `--magma-rhythm-title-content`), and a density theme moves them. Set `--mds-card-gap` and `--mds-card-padding` on the host or a parent selector only to give a set of cards another relation of the rhythm, written as its role, never as a step. `--mds-card-background` recolors the card and its regions together, `--mds-card-color` their text (`text-default` by default); name a surface role and the text role that reads on it, so dark mode keeps working.\n\n```css\n.scheda-dati mds-card {\n  --mds-card-gap: var(--magma-rhythm-between-fields);\n  --mds-card-background: rgb(var(--magma-surface-overlay));\n}\n\n.scheda-invertita mds-card {\n  --mds-card-background: rgb(var(--magma-surface-inverse));\n  --mds-card-color: rgb(var(--magma-on-inverse));\n}\n```\n\n#### Customizing the Layout Part\n\nThe inner grid element is exposed as `::part(layout)`. Use it only for layout-level overrides that the CSS custom properties cannot cover, such as overriding the `border-radius` of the inner container.\n\n```css\n.scheda-highlight mds-card::part(layout) {\n  border-radius: var(--magma-radius-xl);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-card>`. 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 Put Content Outside the Four Named Slots\n\n`<mds-card>` has no default (unnamed) slot. Loose text or elements placed without a recognized `slot` attribute - or without using an `mds-card-*` compound child - are silently ignored and never rendered.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <p>Questo testo non verra' mai visualizzato.</p>\n  <mds-button label=\"Azione\"></mds-button>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-content>\n    <mds-text>Questo testo e' correttamente posizionato nel content slot.</mds-text>\n  </mds-card-content>\n  <mds-card-footer>\n    <mds-button label=\"Azione\" variant=\"primary\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Do Not Use `mds-card-*` Children Outside `<mds-card>`\n\nCompound children (`mds-card-header`, `mds-card-media`, `mds-card-content`, `mds-card-footer`) rely on `<mds-card>` for layout context. Used standalone they render without the managed grid and without the card's visual chrome.\n\n```html\n<!-- INCORRECT -->\n<div class=\"mia-sezione\">\n  <mds-card-header>\n    <mds-text typography=\"h6\">Titolo standalone</mds-text>\n  </mds-card-header>\n</div>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Titolo nella scheda</mds-text>\n  </mds-card-header>\n</mds-card>\n```\n\n#### Do Not Pierce the Shadow DOM with Undocumented Selectors\n\nThe only supported customization surface is `--mds-card-background`, `--mds-card-color`, `--mds-card-gap`, `--mds-card-padding`, and `::part(layout)`. Targeting internal class names with `>>>`, `/deep/`, or any selector that reaches inside the shadow root couples your code to implementation details and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-card >>> .layout {\n  padding: 16px;\n}\nmds-card .layout--cfhm {\n  grid-template-columns: 1fr 1fr;\n}\n\n/* CORRECT */\nmds-card {\n  --mds-card-padding: calc(var(--spacing) * 400);\n}\nmds-card::part(layout) {\n  border-radius: var(--magma-radius-xl);\n}\n```\n\n#### Do Not Assign an Explicit `slot` Attribute to `mds-card-*` Children\n\n`mds-card-header`, `mds-card-media`, `mds-card-content`, and `mds-card-footer` already set their own `slot` attribute on the host element from inside the component. Adding it again from the outside is redundant and may conflict with internal wiring.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-header slot=\"header\">...</mds-card-header>\n  <mds-card-content slot=\"content\">...</mds-card-content>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-header>...</mds-card-header>\n  <mds-card-content>...</mds-card-content>\n</mds-card>\n```\n\n#### Do Not Put Media Elements Directly in the `header` Slot\n\nThe `header` slot is intended for title and action controls. Placing an `<mds-img>` or `<img>` directly there bypasses the media region's responsive two-column behavior. Use the `media` slot (or `<mds-card-media>`) for images and videos.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-header>\n    <mds-img src=\"/immagini/banner.jpg\" alt=\"Banner della campagna\"></mds-img>\n  </mds-card-header>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/immagini/banner.jpg\" alt=\"Banner della campagna\" class=\"object-cover\"></mds-img>\n  </mds-card-media>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Titolo della scheda</mds-text>\n  </mds-card-header>\n</mds-card>\n```\n\n#### Do Not Pad the Regions of a Card\n\nThe card pads its regions once, with its inset. A padding on a region, or on a plain element in a slot, adds to the inset: the title moves away from the edge and from its content, as when every region padded `p-400` of its own and the title stood 800 from its text. A padding on the media also takes it away from the edges it should reach.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-header class=\"p-400\">\n    <mds-text typography=\"h6\">Riepilogo ordine</mds-text>\n  </mds-card-header>\n  <mds-text slot=\"content\" class=\"px-400\">Il tuo ordine e' stato elaborato correttamente.</mds-text>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Riepilogo ordine</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Il tuo ordine e' stato elaborato correttamente.</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Do Not Override Card Dimensions with Inline Styles\n\n`<mds-card>` manages its own min-height and responsive grid. A fixed `height` clips the regions (the card hides its overflow), and a fixed `width` pins the container-query layout instead of letting it follow the space its container gives.\n\n```html\n<!-- INCORRECT -->\n<mds-card style=\"width: 300px; height: 200px;\">\n  ...\n</mds-card>\n\n<!-- CORRECT: size the card from a parent container or CSS custom properties -->\n<div class=\"w-[300px]\">\n  <mds-card>\n    ...\n  </mds-card>\n</div>\n```\n"
      },
      "props": [
        {
          "name": "disableAutoGrid",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "disable-auto-grid",
          "reflectToAttr": true,
          "docs": "Disables the automatic responsive behavior based on container queries",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-card-background",
          "annotation": "prop",
          "docs": "Sets the background color of the card and of its regions (`mds-card-header`, `mds-card-media`, `mds-card-content`, `mds-card-footer`)",
          "visibility": "public"
        },
        {
          "name": "--mds-card-color",
          "annotation": "prop",
          "docs": "Sets the text color of the card, inherited by its regions, `--magma-text-default` by default: set it together with `--mds-card-background`, so the text keeps reading on the surface",
          "visibility": "public"
        },
        {
          "name": "--mds-card-gap",
          "annotation": "prop",
          "docs": "Sets the space between the regions of the card, `--magma-rhythm-title-content` by default; the footer keeps at least `--magma-rhythm-content-actions` from the region before it",
          "visibility": "public"
        },
        {
          "name": "--mds-card-padding",
          "annotation": "prop",
          "docs": "Sets the inset of the card, shared by its regions, `--magma-rhythm-inset` by default; the media region reaches out of it to the edges it touches",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "content",
          "docs": "Add `HTML elements` or `components`, it's responsive behaviour based on container queries is handled with `auto-grid` enabled"
        },
        {
          "name": "footer",
          "docs": "Add `HTML elements` or `components`, it's responsive behaviour based on container queries is handled with `auto-grid` enabled"
        },
        {
          "name": "header",
          "docs": "Add `HTML elements` or `components`, it's responsive behaviour based on container queries is handled with `auto-grid` enabled"
        },
        {
          "name": "media",
          "docs": "Add `HTML elements` or `components`Add `HTML elements` or `components`, it is **recommended** to use `mds-img` element or other component to represent media contents, used for images or videos, it's responsive behaviour based on container queries is handled with `auto-grid` enabled"
        }
      ],
      "parts": [
        {
          "name": "layout",
          "docs": "The layout element that wraps the slotted content"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "layout-card--docs"
    },
    {
      "filePath": "src/components/mds-card-content/mds-card-content.tsx",
      "encapsulation": "shadow",
      "tag": "mds-card-content",
      "readme": "# mds-card-content\n\n\n\nThis 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.\n",
      "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"
    },
    {
      "filePath": "src/components/mds-card-footer/mds-card-footer.tsx",
      "encapsulation": "shadow",
      "tag": "mds-card-footer",
      "readme": "# mds-card-footer\n\n\n\nThis 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.\n",
      "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-footer>` web component is the footer region of a [`<mds-card>`](../mds-card/AGENTS.md), grouping the trailing content of a card (typically actions such as buttons or supplementary metadata) into the card's bottom region.\n\n#### Semantic Behavior\n\n- **Compound child only**: `<mds-card-footer>` must be a direct slot child of `<mds-card>`; it is not used standalone, nor mixed in as a different child type.\n- **Self-slotting**: Simply placing it inside `<mds-card>` routes it into the parent's footer region without the author setting the slot manually.\n- **Pure layout wrapper**: It has a single default slot and no props, no state, no events, and no ARIA role of its own. It contributes only structural placement, not semantics.\n- **A row of actions**: the actions stand `rhythm/inline` apart at the end of the card; under `--magma-container-actions` of the footer (380px) they stack, each at the full width, in the order of the row, the main action at the bottom (`actions/stacked`). A lone action has no order to keep: it stays at its own width at the end of the row at every width, as an `<mds-button-dropdown>` alone does, so a grid of narrow cards does not repeat a band of buttons.\n- **Presence affects parent layout**: Including or omitting the footer changes how the card arranges its regions.\n\n#### Slot semantics\n\nThis component exposes a single default slot and has no configurable properties. Pass any `text`, `HTML elements`, or other components (commonly `<mds-button>` actions) into the default slot; they will be rendered in the card's footer region. The footer lays its children out in a row aligned to the end, with a fixed gap and padding; the placement of the region and the responsive behavior are owned by the parent `<mds-card>`.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-card-footer>` 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#### Action Row Inside a Full Card\n\nThe typical use: a card with header, content, and footer regions, the footer holding the primary and secondary actions. Place `<mds-card-footer>` as a direct child of `<mds-card>` - it routes itself to the footer region automatically.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Riepilogo pratica</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Verifica i dati prima di procedere.</mds-text>\n  </mds-card-content>\n  <mds-card-footer>\n    <mds-button label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n    <mds-button label=\"Conferma\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Single Call-to-Action\n\nA card with only a media region and a footer is a valid minimal composition. The footer carries a lone action, which keeps its own width at the end of the row even when the footer is under `--magma-container-actions` (380px): with one action the stack has no order to keep, so it does not stretch it.\n\n```html\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/images/documento.jpg\" alt=\"Anteprima documento\"></mds-img>\n  </mds-card-media>\n  <mds-card-footer>\n    <mds-button label=\"Scarica\" icon=\"mi/baseline/download\" variant=\"primary\" tone=\"weak\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Destructive Action Pattern\n\nUse a `variant=\"error\"` button for destructive operations. Keep the cancel action to the left and the destructive action to the right - the footer's `justify-content: flex-end` naturally aligns both.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Elimina archivio</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Questa operazione non puo essere annullata.</mds-text>\n  </mds-card-content>\n  <mds-card-footer>\n    <mds-button label=\"Annulla\" variant=\"dark\" tone=\"text\"></mds-button>\n    <mds-button label=\"Elimina\" variant=\"error\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Supplementary Metadata Alongside an Action\n\nThe default slot accepts any slottable content - mix an informational label with a button when status context belongs at the bottom of the card.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Stato richiesta</mds-text>\n  </mds-card-header>\n  <mds-card-footer>\n    <mds-badge label=\"In attesa\" variant=\"warning\" tone=\"weak\"></mds-badge>\n    <mds-button label=\"Visualizza dettagli\" variant=\"primary\" tone=\"outline\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Explicit `slot` Attribute on a Plain Element\n\nWhen you prefer a plain `<div>` or need to place a non-`mds-card-*` wrapper in the footer region, set `slot=\"footer\"` explicitly. The element lands in the footer region, but `<mds-card>` infers its managed grid from the tag names of its children: add `disable-auto-grid` to the card, otherwise the regions overlap.\n\n```html\n<mds-card disable-auto-grid>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Nota operativa</mds-text>\n  </mds-card-header>\n  <div slot=\"footer\" style=\"display: flex; gap: calc(var(--spacing) * 300);\">\n    <mds-button label=\"Chiudi\" variant=\"dark\" tone=\"outline\"></mds-button>\n    <mds-button label=\"Salva nota\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </div>\n</mds-card>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-card-footer>`. 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-footer>` Outside `<mds-card>`\n\n`<mds-card-footer>` self-routes to the `footer` slot of `<mds-card>` via `<Host slot=\"footer\">`. Outside a card it renders as a bare flex row with no visual context and communicates nothing to screen readers.\n\n```html\n<!-- INCORRECT -->\n<mds-card-footer>\n  <mds-button label=\"Conferma\" variant=\"primary\"></mds-button>\n</mds-card-footer>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Conferma\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Do Not Assign `slot=\"footer\"` on `<mds-card-footer>` Manually\n\n`<mds-card-footer>` already sets `slot=\"footer\"` on its host via its own render output. Adding it again as an attribute in your markup 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-footer slot=\"footer\">\n    <mds-button label=\"Salva\" variant=\"primary\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Do Not Nest `<mds-card-footer>` Inside a Wrapper Element\n\nCompound component children must be direct slot children of the parent - `<mds-card>` has no default slot, so a `<div>` wrapper without a `slot` is not rendered at all, and the `<mds-card-footer>` inside it with it.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <div class=\"azioni\">\n    <mds-card-footer>\n      <mds-button label=\"Annulla\" variant=\"dark\"></mds-button>\n    </mds-card-footer>\n  </div>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Do Not Place Multiple `<mds-card-footer>` in One Card\n\n`<mds-card>` maps all children with the footer tag to the same grid area; multiple footers stack or overlap unpredictably. Consolidate all footer content into a single `<mds-card-footer>`.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Annulla\" variant=\"dark\"></mds-button>\n  </mds-card-footer>\n  <mds-card-footer>\n    <mds-button label=\"Conferma\" variant=\"primary\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n    <mds-button label=\"Conferma\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Do Not Override Footer Layout via Inline Styles or Undocumented Selectors\n\n`<mds-card-footer>` owns its internal flex layout (the alignment at the end, the actions `--magma-rhythm-inline` apart); its inset is the card's, and the card sets it `--magma-rhythm-content-actions` from the region before it. Overriding it with inline `style` or by targeting shadow internals breaks theme consistency and couples code to implementation details. If the parent card's spacing must change, use `<mds-card>`'s documented `--mds-card-gap` and `--mds-card-padding` custom properties on the card host, with a rhythm role.\n\n```html\n<!-- INCORRECT -->\n<mds-card-footer style=\"justify-content: flex-start; padding: 0;\">\n  <mds-button label=\"Salva\" variant=\"primary\"></mds-button>\n</mds-card-footer>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-footer>\n    <mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\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-footer--docs"
    },
    {
      "filePath": "src/components/mds-card-header/mds-card-header.tsx",
      "encapsulation": "shadow",
      "tag": "mds-card-header",
      "readme": "# mds-card-header\n\n\n\nThis 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.\n",
      "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": "slot",
          "text": "action - Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "parent",
          "text": "mds-card"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-card-header>` web component is the header region of a [`<mds-card>`](../mds-card/AGENTS.md), grouping the card's title, supporting text, and optional inline actions. It carries no styling of its own beyond layout: its job is to occupy the parent card's `header` region and arrange its content alongside any action controls.\n\n#### Semantic Behavior\n\n- **Compound child only**: `<mds-card-header>` must be placed as a direct child of `<mds-card>`; it is not used standalone, and a card expects at most one header alongside its sibling card regions (`mds-card-media`, `mds-card-content`, `mds-card-footer`), not mixed with arbitrary elements.\n- **Self-slotting into the parent**: It automatically lands in the card's `header` region without the author setting any `slot` attribute, and its presence is factored into the card's responsive layout.\n- **Action slot presence**: The dedicated actions wrapper is shown only while a direct child assigned to the `action` slot exists, also when it is added after the first render, so a header without actions produces no empty action container.\n- **No role/ARIA of its own**: It exposes no implicit role, state, or events; it is a passive layout grouping.\n\n#### Properties & Visual Configurations\n\n`<mds-card-header>` has no configurable properties - it is a pure layout child driven entirely by its two slots:\n\n- **Default (unnamed) slot**: Holds the primary header content (title text, HTML, or components such as a heading element).\n- **`action` slot**: Holds inline action controls, rendered in a separate region next to the header content; `mds-button` is the recommended element here. Provide content to this slot only when the header needs actions, since the wrapper is shown only while children are present.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-card-header>` 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#### Plain Title in the Default Slot\n\nThe most common use: pass heading text (or a heading element) into the default slot to set the card's title. The header arranges it in the card's top region automatically.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h5\">Dettagli account</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Contenuto principale della card.</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Header with Inline Action\n\nPlace one or more `<mds-button>` elements in the `action` slot when the header needs an inline control. The actions wrapper is only rendered when at least one element is assigned to this slot - omit the slot entirely when no actions are needed.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h5\">Impostazioni notifiche</mds-text>\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/edit\"\n      aria-label=\"Modifica impostazioni\"\n      variant=\"primary\"\n      tone=\"text\"\n    ></mds-button>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Gestisci le preferenze di notifica.</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Header with Multiple Actions\n\nAdd multiple elements to the `action` slot when several inline controls are needed. They are rendered in the single actions region next to the header content.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h5\">Documento di progetto</mds-text>\n    <mds-button\n      slot=\"action\"\n      label=\"Modifica\"\n      icon=\"mi/baseline/edit\"\n      variant=\"primary\"\n      tone=\"outline\"\n    ></mds-button>\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/delete\"\n      aria-label=\"Elimina documento\"\n      variant=\"error\"\n      tone=\"text\"\n    ></mds-button>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Specifiche tecniche rev. 3.</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Header with Supporting Text\n\nPass additional descriptive text below the title by wrapping title and text in one element in the default slot. The header lays its default-slot children out in a row, spread apart (`justify-content: space-between`), so two loose elements would sit side by side.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <div class=\"flex flex-col\">\n      <mds-text typography=\"h5\">Report mensile</mds-text>\n      <mds-text typography=\"caption\">Aggiornato il 1 giugno 2026</mds-text>\n    </div>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Riepilogo delle attivita del mese.</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Full Card Composition\n\n`<mds-card-header>` is designed to compose with the other card sub-parts. Each sub-part self-slots into its region; the card infers which regions are present and adjusts its layout accordingly.\n\n```html\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/images/copertina.jpg\" alt=\"Copertina articolo\"></mds-img>\n  </mds-card-media>\n  <mds-card-header>\n    <mds-text typography=\"h4\">Novita dal team</mds-text>\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/share\"\n      aria-label=\"Condividi\"\n      variant=\"primary\"\n      tone=\"text\"\n    ></mds-button>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Aggiornamenti sul rilascio di Magma 3.0.</mds-text>\n  </mds-card-content>\n  <mds-card-footer>\n    <mds-button label=\"Leggi di piu\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Header Without a Title - Using the Action Slot Alone\n\nWhen the card header exists only to host action controls and carries no title text, leave the default slot empty and place the controls in the `action` slot. The component renders just the actions container.\n\n```html\n<mds-card>\n  <mds-card-header>\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/more-vert\"\n      aria-label=\"Altre opzioni\"\n      variant=\"dark\"\n      tone=\"text\"\n    ></mds-button>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Scheda con solo azione nell'intestazione.</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-card-header>`. 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-header>` Outside `<mds-card>`\n\n`<mds-card-header>` is a compound child; it must be a direct child of `<mds-card>`. Using it standalone renders nothing useful - the host card's slot plumbing drives all layout.\n\n```html\n<!-- INCORRECT -->\n<mds-card-header>\n  <mds-text typography=\"h5\">Titolo</mds-text>\n</mds-card-header>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h5\">Titolo</mds-text>\n  </mds-card-header>\n</mds-card>\n```\n\n#### Do Not Set `slot=\"header\"` Manually on `<mds-card-header>`\n\nThe component sets its own `slot=\"header\"` in its `render()` host binding. Adding the attribute again on the element in the light DOM 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-header slot=\"header\">\n    <mds-text typography=\"h5\">Titolo</mds-text>\n  </mds-card-header>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h5\">Titolo</mds-text>\n  </mds-card-header>\n</mds-card>\n```\n\n#### Do Not Put Action Controls in the Default Slot\n\n`<mds-button>` and other action controls belong in the `action` named slot, not in the default slot. Placing them in the default slot breaks the layout - no actions wrapper groups them, and the header spreads every default-slot child along the row (`justify-content: space-between`), so the controls land wherever the number of siblings puts them rather than together at the far end.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h5\">Rapporto annuale</mds-text>\n    <mds-button label=\"Modifica\" variant=\"primary\"></mds-button>\n  </mds-card-header>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h5\">Rapporto annuale</mds-text>\n    <mds-button slot=\"action\" label=\"Modifica\" variant=\"primary\" tone=\"outline\"></mds-button>\n  </mds-card-header>\n</mds-card>\n```\n\n#### Do Not Use a Raw `<div>` as the Card Header Instead of `<mds-card-header>`\n\nUsing a plain `<div slot=\"header\">` bypasses the component's conditional action wrapper, its shadow layout, and the parent's compound-child detection. The component also ensures correct alignment and spacing between title and actions.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <div slot=\"header\">\n    <h5>Riepilogo ordini</h5>\n    <button>Modifica</button>\n  </div>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h5\">Riepilogo ordini</mds-text>\n    <mds-button slot=\"action\" label=\"Modifica\" variant=\"primary\" tone=\"outline\"></mds-button>\n  </mds-card-header>\n</mds-card>\n```\n\n#### Do Not Invent a Custom `slot` Name on Children of `<mds-card-header>`\n\n`<mds-card-header>` exposes exactly two slots: the default (unnamed) slot and `action`. Assigning any other slot name silently discards the element.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h5\">Dashboard</mds-text>\n    <mds-button slot=\"actions\" label=\"Aggiungi\" variant=\"primary\"></mds-button>\n  </mds-card-header>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-header>\n    <mds-text typography=\"h5\">Dashboard</mds-text>\n    <mds-button slot=\"action\" label=\"Aggiungi\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-header>\n</mds-card>\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "action",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "layout-card-header--docs"
    },
    {
      "filePath": "src/components/mds-card-media/mds-card-media.tsx",
      "encapsulation": "shadow",
      "tag": "mds-card-media",
      "readme": "# mds-card-media\n\n\n\nThis 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.\n",
      "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 `HTML elements` or `components` to this slot, it is **recommended** to add `mds-img` element or other component which represents media contents."
        },
        {
          "name": "slot",
          "text": "content - Add `text string`, `HTML elements` or `components` to this slot, contents will be shown in front of the media element."
        },
        {
          "name": "part",
          "text": "content - The layer in front of the media that holds the `content` slot"
        },
        {
          "name": "parent",
          "text": "mds-card"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-card-media>` web component is the media region of a [`<mds-card>`](../mds-card/AGENTS.md): it wraps an image, video or other visual asset and provides an optional overlay layer for text or controls rendered on top of that asset. It is a layout child with no HTML primitive equivalent - it exists purely to occupy and style the card's `media` region.\n\n#### Semantic Behavior\n\n- **Compound child only**: `<mds-card-media>` is designed to live as a direct child of `<mds-card>` and must not be used standalone or mixed in as a different card region.\n- **Self-slotting into the parent**: It lands in the card's `media` region automatically without the author setting any `slot`, and its presence is factored into the card layout.\n- **Two-layer composition**: The default slot holds the media asset itself (recommended `mds-img` or another media component), while the named `content` slot overlays that asset, bottom-aligned and centered, so overlay text/actions float in front of the media.\n- **No interactive state**: The component holds no props, state, events, ARIA roles or focus behavior of its own - it is a passive presentational wrapper, and any semantics come from the elements slotted into it.\n\n#### Slot semantics and layout role\n\n`<mds-card-media>` exposes no configurable properties; its behavior is entirely defined by its two slots and its position inside the card.\n\n- **default slot**: the media surface. Place the actual visual asset here (an `mds-img`, video, or equivalent component). This layer fills the host.\n- **`content` slot**: an overlay layer (exposed as the `content` shadow part) positioned over the media, aligned to the bottom and horizontally centered, intended for captions, titles, or action controls that should appear in front of the media rather than beside it.\n\nThe host paints a neutral background, so the media region keeps a defined surface even before its asset loads. Neither this component nor the parent card uses the shared variant/tone system of [`agents/variants.md`](../../../../agents/variants.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-card-media>` 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 Media Region with `mds-img`\n\nPlace `<mds-card-media>` as a direct child of `<mds-card>`. No `slot` attribute is needed - the component self-assigns into the card's `media` region. Put the visual asset in the default slot; `mds-img` is the recommended choice.\n\n```html\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/img/copertina.jpg\" alt=\"Copertina articolo\"></mds-img>\n  </mds-card-media>\n</mds-card>\n```\n\n#### Media with an Overlay Caption via the `content` Slot\n\nUse the named `content` slot for text or controls that should float in front of the media asset. The overlay is absolutely positioned over the media, bottom-aligned and horizontally centered.\n\n```html\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/img/evento.jpg\" alt=\"Evento annuale\"></mds-img>\n    <mds-text slot=\"content\" typography=\"label\">12 giugno 2026</mds-text>\n  </mds-card-media>\n</mds-card>\n```\n\n#### Media with an Overlay Action Control\n\nThe `content` slot accepts any element or component. Use it to place a badge, chip, or button on top of the media when the design calls for an interactive overlay.\n\n```html\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/img/prodotto.jpg\" alt=\"Scheda prodotto\"></mds-img>\n    <mds-badge slot=\"content\" label=\"Novita'\" variant=\"info\" tone=\"strong\"></mds-badge>\n  </mds-card-media>\n</mds-card>\n```\n\n#### Card with All Regions Composed Together\n\n`<mds-card-media>` composes alongside `mds-card-header`, `mds-card-content`, and `mds-card-footer` inside `mds-card`. Each region self-assigns its slot; the card drives the responsive layout automatically unless `disable-auto-grid` is set.\n\n```html\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/img/notizia.jpg\" alt=\"Immagine della notizia\"></mds-img>\n  </mds-card-media>\n  <mds-card-header>\n    <mds-text typography=\"h6\">Titolo della notizia</mds-text>\n  </mds-card-header>\n  <mds-card-content>\n    <mds-text>Descrizione breve della notizia.</mds-text>\n  </mds-card-content>\n  <mds-card-footer>\n    <mds-button label=\"Leggi di piu'\" variant=\"primary\" tone=\"text\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Video in the Default Slot\n\nThe default slot accepts any media element or component. Use a native `<video>` when the design calls for motion content rather than a still image.\n\n```html\n<mds-card>\n  <mds-card-media>\n    <video src=\"/media/presentazione.mp4\" autoplay muted loop playsinline></video>\n  </mds-card-media>\n</mds-card>\n```\n\n#### Styling the Overlay Part via `::part(content)`\n\nThe `content` overlay div is exposed as the `content` shadow part. Use it for layout adjustments that the host's positioning rules do not cover - for example, changing alignment or adding a gradient scrim. Set the style on the host or a parent selector; do not pierce shadow DOM with `>>>` or undocumented class names.\n\n```css\n.card-destacada mds-card-media::part(content) {\n  align-items: flex-start;\n  background: linear-gradient(to top, rgb(var(--magma-backdrop-color) / 0.7), transparent);\n  padding: calc(var(--spacing) * 600);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-card-media>`. 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-media>` Outside `<mds-card>`\n\n`<mds-card-media>` is a compound child designed to live inside `<mds-card>`. Using it standalone produces unstyled output and breaks the card layout algorithm, which derives its responsive grid from the presence of its region children.\n\n```html\n<!-- INCORRECT -->\n<mds-card-media>\n  <mds-img src=\"/img/foto.jpg\" alt=\"Foto\"></mds-img>\n</mds-card-media>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/img/foto.jpg\" alt=\"Foto\"></mds-img>\n  </mds-card-media>\n</mds-card>\n```\n\n#### Do Not Set `slot=\"media\"` Manually\n\n`<mds-card-media>` self-assigns into the card's `media` region via its internal `Host slot=\"media\"`. Adding `slot=\"media\"` on the element is redundant and signals a misunderstanding of the component's self-slotting contract.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-media slot=\"media\">\n    <mds-img src=\"/img/copertina.jpg\" alt=\"Copertina\"></mds-img>\n  </mds-card-media>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/img/copertina.jpg\" alt=\"Copertina\"></mds-img>\n  </mds-card-media>\n</mds-card>\n```\n\n#### Do Not Put the Overlay Text in the Default Slot\n\nText or controls that should appear in front of the media must go in the `content` named slot. Content placed in the default slot is stacked below the media asset (the host is a grid), not overlaid on it.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/img/foto.jpg\" alt=\"Foto\"></mds-img>\n    <mds-text>Didascalia</mds-text>\n  </mds-card-media>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/img/foto.jpg\" alt=\"Foto\"></mds-img>\n    <mds-text slot=\"content\">Didascalia</mds-text>\n  </mds-card-media>\n</mds-card>\n```\n\n#### Do Not Place `<mds-card-media>` Inside a Wrapper Element\n\n`mds-card` reads its direct children to compute the layout grid and has no default slot. Wrapping `<mds-card-media>` in a `<div>` or any other element without a `slot` hides it from that detection pass and leaves it out of every region: it is not rendered at all.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <div class=\"media-wrapper\">\n    <mds-card-media>\n      <mds-img src=\"/img/foto.jpg\" alt=\"Foto\"></mds-img>\n    </mds-card-media>\n  </div>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/img/foto.jpg\" alt=\"Foto\"></mds-img>\n  </mds-card-media>\n</mds-card>\n```\n\n#### Do Not Use a Raw `<img>` Instead of `<mds-img>`\n\nPlacing a raw `<img>` in the default slot works visually but bypasses the lazy loading, error state, consumption-preference handling, and accessible-name fallback that `mds-img` provides.\n\n```html\n<!-- INCORRECT -->\n<mds-card>\n  <mds-card-media>\n    <img src=\"/img/prodotto.jpg\" alt=\"Prodotto\">\n  </mds-card-media>\n</mds-card>\n\n<!-- CORRECT -->\n<mds-card>\n  <mds-card-media>\n    <mds-img src=\"/img/prodotto.jpg\" alt=\"Prodotto\"></mds-img>\n  </mds-card-media>\n</mds-card>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Overlay Container\n\nThe `content` div inside the shadow root is exposed as the `content` shadow part. Use `::part(content)` for style overrides, not `>>>`, `/deep/`, or internal class selectors - the latter couple your code to the implementation and break on minor releases.\n\n```css\n/* INCORRECT */\nmds-card-media >>> .content {\n  align-items: flex-start;\n}\n\n/* CORRECT */\nmds-card-media::part(content) {\n  align-items: flex-start;\n}\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `HTML elements` or `components` to this slot, it is **recommended** to add `mds-img` element or other component which represents media contents."
        },
        {
          "name": "content",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot, contents will be shown in front of the media element."
        }
      ],
      "parts": [
        {
          "name": "content",
          "docs": "The layer in front of the media that holds the `content` slot"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "layout-card-media--docs"
    },
    {
      "filePath": "src/components/mds-chip/mds-chip.tsx",
      "encapsulation": "shadow",
      "tag": "mds-chip",
      "readme": "# mds-chip\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "tags"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-chip>` web component is the Magma Design System's compact element for representing a discrete piece of information, a filter, a selection, or a removable token. It renders a label with an optional leading icon or colour swatch and an optional delete affordance, and can be made interactive (clickable or selectable) to act as a lightweight button-like control rather than a static tag.\n\n#### Semantic Behavior\n\n- **Static by default**: With no interaction props the chip is a passive, non-focusable label; it becomes a focusable, button-like control only when `clickable` is set.\n- **Selectable implies clickable**: Setting `selectable` automatically turns on `clickable`, so a selectable chip is always keyboard- and pointer-interactive.\n- **Selection toggle**: When `selectable`, activating the chip flips `selected`; an unselected chip carries no `selected` attribute (rather than `selected=\"false\"`).\n- **Keyboard activation**: When interactive, Enter and Space activate the chip just like a pointer click.\n- **Delete affordance**: When `deletable`, a trailing delete button is rendered with a localized title (el/en/es/it) and emits the delete event on activation.\n- **Emitted events**: `mdsChipClickLabel` fires on activation for non-selectable chips, `mdsChipSelect` fires (carrying the new `selected` value) for selectable chips, and `mdsChipDelete` fires from the delete button - all carrying the originating event and host element.\n- **Label is text, on one line**: Long labels do not wrap (`truncate=\"word\"` on the inner text).\n- **One leading mark**: `swatch` takes the place of `icon`; when both are set the chip draws the swatch. The swatch is decorative and hidden from assistive technologies, so the label has to name the colour.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` / `tone` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md); the chip defaults to `variant=\"primary\"` and `tone=\"strong\"`, and accepts only the minimal `'strong'` / `'weak'` tone set. `variant` and `tone` paint the leading icon badge and the border of a selected chip; the body of the chip stays neutral for every variant.\n\n#### Other behavioral props\n\n- **`clickable`** opts the chip into interactivity (focus, keyboard and click handling) without changing its state on activation - use it for chips that act as actions rather than toggles.\n- **`selectable`** makes the chip a toggle whose `selected` state flips on each activation; pick it for filter/choice chips where the visual selected state matters.\n- **`selected`** drives the selected visual treatment and can be set externally to pre-select a chip; an unselected chip carries no attribute.\n- **`deletable`** adds the trailing cancel button for removable tokens; reserve it for chips the user is meant to dismiss.\n- **`icon`** is an SVG filename slug from the Magma icon library, shown decoratively to the left of the label.\n- **`swatch`** is a colour of the product, any CSS colour, drawn as a round swatch where the icon goes: for chips whose label names a colour (a family of colours, a category, a calendar). It is not a role and does not follow `variant` or the mode: the chip draws it as given, inside a ring that keeps it visible on the chip at rest and selected, in light and dark. A value that is not a colour draws the empty ring.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-chip>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Static Tag (Label Only)\n\nThe simplest form. Use the required `label` prop to display a read-only tag. With no interaction props the chip is passive and non-focusable.\n\n```html\n<mds-chip label=\"In lavorazione\" variant=\"warning\" tone=\"strong\"></mds-chip>\n```\n\n#### Variant and Tone for Semantic Emphasis\n\nPair the same `variant` with a different `tone` to express importance or category. Do not invent custom colors to dim or saturate. The variant paints the leading icon badge (and the border of a selected chip), not the body of the chip: give the chip an `icon` when its color has to carry meaning.\n\n```html\n<!-- Status chips -->\n<mds-chip label=\"Completato\" icon=\"mi/baseline/check-circle\" variant=\"success\" tone=\"strong\"></mds-chip>\n<mds-chip label=\"In attesa\" icon=\"mi/baseline/schedule\" variant=\"warning\" tone=\"weak\"></mds-chip>\n<mds-chip label=\"Errore\" icon=\"mi/baseline/error\" variant=\"error\" tone=\"strong\"></mds-chip>\n\n<!-- Decorative label chips -->\n<mds-chip label=\"Natura\" icon=\"mi/baseline/eco\" variant=\"green\" tone=\"weak\"></mds-chip>\n<mds-chip label=\"Tecnologia\" icon=\"mi/baseline/computer\" variant=\"blue\" tone=\"strong\"></mds-chip>\n```\n\n#### Chip with Leading Icon\n\nReference icons by their filename slug (no `.svg` extension). The icon is rendered decoratively to the left of the label inside a circular badge.\n\n```html\n<mds-chip\n  label=\"Animali\"\n  icon=\"mi/baseline/pets\"\n  variant=\"primary\"\n  tone=\"strong\"\n></mds-chip>\n```\n\n#### Chip with a Colour Swatch\n\nUse `swatch` when the label names a colour of the product: a family of colours to turn on and off, a category, a calendar. The value is the product's own, any CSS colour (`#a89586`, `rgb(47 111 208)`, `oklch(70% 0.19 50)`), not a token: the chip draws it as given in every mode, round and where the icon goes, inside a ring that keeps a colour as light or as dark as the chip visible. The swatch is hidden from assistive technologies, so the label names the colour; it takes the place of `icon`.\n\n```html\n<mds-chip label=\"kaolin\" swatch=\"#9aa3ad\" selectable selected></mds-chip>\n<mds-chip label=\"fireclay\" swatch=\"#a89586\" selectable></mds-chip>\n<mds-chip label=\"Calendario ferie\" swatch=\"#2f6fd0\" clickable></mds-chip>\n```\n\n#### Clickable Chip (Action, No Toggle)\n\nUse `clickable` when the chip triggers an action but does not need a persistent selected state. The component adds `role=\"button\"`, focus handling, and keyboard activation. Listen for `mdsChipClickLabel`.\n\n```html\n<mds-chip\n  label=\"Apri dettagli\"\n  clickable\n  icon=\"mi/baseline/open-in-new\"\n  variant=\"primary\"\n  tone=\"weak\"\n></mds-chip>\n\n<script>\n  document.querySelector('mds-chip').addEventListener('mdsChipClickLabel', (e) => {\n    console.log('clicked', e.detail.element);\n  });\n</script>\n```\n\n#### Selectable Chip (Toggle)\n\nUse `selectable` for filter or choice chips where the visual selected state matters. `selectable` implies `clickable` automatically. Activating the chip flips `selected`; the event `mdsChipSelect` carries the new value in `e.detail.selected` (`true`, or `undefined` when deselected).\n\n```html\n<mds-chip\n  label=\"Vegetariano\"\n  selectable\n  icon=\"mi/baseline/eco\"\n  variant=\"success\"\n  tone=\"weak\"\n></mds-chip>\n\n<script>\n  document.querySelector('mds-chip').addEventListener('mdsChipSelect', (e) => {\n    console.log('selezionato:', e.detail.selected);\n  });\n</script>\n```\n\n#### Pre-selected Chip\n\nSet `selected` externally to initialize a selectable chip in the selected state (e.g. when restoring saved filter state). An unselected chip carries no `selected` attribute.\n\n```html\n<mds-chip\n  label=\"Urgente\"\n  selectable\n  selected\n  variant=\"error\"\n  tone=\"strong\"\n></mds-chip>\n```\n\n#### Deletable Chip (Removable Token)\n\nUse `deletable` for chips the user is meant to dismiss - for example tags on an entity or active filters. A trailing cancel button emits `mdsChipDelete` on activation.\n\n```html\n<mds-chip\n  label=\"Mario Rossi\"\n  deletable\n  icon=\"mi/baseline/person\"\n  variant=\"primary\"\n  tone=\"weak\"\n></mds-chip>\n\n<script>\n  document.querySelector('mds-chip').addEventListener('mdsChipDelete', (e) => {\n    e.detail.element.remove();\n  });\n</script>\n```\n\n#### Fully Interactive Chip\n\nCombine `clickable` (or `selectable`) with `deletable` for chips that can both be activated and removed independently.\n\n```html\n<mds-chip\n  label=\"Sport invernali\"\n  clickable\n  deletable\n  icon=\"mi/baseline/downhill-skiing\"\n  variant=\"info\"\n  tone=\"weak\"\n></mds-chip>\n```\n\n#### Disabled Chip\n\nSet `disabled` to dim the chip and block it: a clickable label leaves the tab order and takes `aria-disabled=\"true\"`, the delete button is disabled, and neither the pointer nor the keyboard fires an event. The prop is reflected, so setting it from code styles the chip too. Do not use `disabled=\"false\"` - remove the attribute to re-enable.\n\n```html\n<mds-chip\n  label=\"Non disponibile\"\n  disabled\n  variant=\"dark\"\n  tone=\"strong\"\n></mds-chip>\n```\n\n#### Styling Customization\n\nStyle the chip only through its public `--mds-chip-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode, named themes and high contrast keep working. When `selected` is set the component swaps each property for a selected value of its own, which is not public. A property set on the host from outside wins over that swap: scope the resting values to `:not([selected])`, and set the same public properties on `[selected]` to restyle the selected state.\n\n```css\n.filtri-categoria mds-chip:not([selected]) {\n  --mds-chip-background: rgb(var(--magma-accent-surface));\n  --mds-chip-color: rgb(var(--magma-accent-fg));\n}\n\n.filtri-categoria mds-chip[selected] {\n  --mds-chip-background: rgb(var(--magma-accent-emphasis));\n  --mds-chip-color: rgb(var(--magma-accent-on-emphasis));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-chip>`. 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 a Clickable Chip Without `clickable` or `selectable`\n\nWithout `clickable`, the chip has no `role`, no focus management, and no keyboard activation. Listening for click events on a static chip is a silent accessibility failure.\n\n```html\n<!-- INCORRECT -->\n<mds-chip label=\"Apri\" variant=\"primary\" onclick=\"doSomething()\"></mds-chip>\n\n<!-- CORRECT -->\n<mds-chip label=\"Apri\" clickable variant=\"primary\"></mds-chip>\n<script>\n  document.querySelector('mds-chip').addEventListener('mdsChipClickLabel', doSomething);\n</script>\n```\n\n#### Do Not Use `selected` Without `selectable`\n\n`selected` only has visual and semantic meaning when `selectable` is also set. On a non-selectable chip the attribute renders the selected style but the selection can never be toggled and no event fires, misleading users.\n\n```html\n<!-- INCORRECT -->\n<mds-chip label=\"Attivo\" selected variant=\"success\"></mds-chip>\n\n<!-- CORRECT -->\n<mds-chip label=\"Attivo\" selectable selected variant=\"success\"></mds-chip>\n```\n\n#### Do Not Apply `tone` Values Outside the Minimal Ladder\n\n`mds-chip` accepts only `ToneMinimalVariantType`: `strong` and `weak`. Passing `outline`, `text`, or `box` is invalid: no style matches it, so the chip silently loses its variant colors.\n\n```html\n<!-- INCORRECT -->\n<mds-chip label=\"Categoria\" tone=\"outline\" variant=\"primary\"></mds-chip>\n<mds-chip label=\"Categoria\" tone=\"text\" variant=\"primary\"></mds-chip>\n\n<!-- CORRECT -->\n<mds-chip label=\"Categoria\" tone=\"weak\" variant=\"primary\"></mds-chip>\n<mds-chip label=\"Categoria\" tone=\"strong\" variant=\"primary\"></mds-chip>\n```\n\n#### Do Not Slot Content Into the Chip\n\n`<mds-chip>` has no default or named slots - all content is driven by props (`label`, `icon`, `swatch`, `deletable`). Slotting HTML children is ignored by the Shadow DOM.\n\n```html\n<!-- INCORRECT -->\n<mds-chip>\n  <span>Etichetta</span>\n  <mds-icon name=\"mi/baseline/close\"></mds-icon>\n</mds-chip>\n\n<!-- CORRECT -->\n<mds-chip\n  label=\"Etichetta\"\n  icon=\"mi/baseline/pets\"\n  deletable\n  variant=\"primary\"\n></mds-chip>\n```\n\n#### Do Not Draw a Colour Through the Icon\n\nA circle icon painted with the colour, or the markup of an `<svg>` given to `icon`, sits on the disc of the icon, has no ring to keep a colour as light or as dark as the chip visible, and leans on custom properties that are not public. Give the colour to `swatch`.\n\n```html\n<!-- INCORRECT -->\n<mds-chip label=\"fireclay\" icon=\"mdi/circle\" style=\"--mds-chip-icon-color: #a89586\"></mds-chip>\n\n<!-- CORRECT -->\n<mds-chip label=\"fireclay\" swatch=\"#a89586\"></mds-chip>\n```\n\n#### Do Not Say a State With a Swatch\n\nThe swatch draws its colour as given: a status painted there does not follow the mode, the named theme or the contrast preference as a variant does, and, hidden from assistive technologies, it adds nothing a screen reader hears. Say a status with `variant` and an icon; keep `swatch` for a colour the label names.\n\n```html\n<!-- INCORRECT -->\n<mds-chip label=\"Errore\" swatch=\"#d32f2f\"></mds-chip>\n\n<!-- CORRECT -->\n<mds-chip label=\"Errore\" icon=\"mi/baseline/error\" variant=\"error\" tone=\"strong\"></mds-chip>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Delete Button\n\nThe inner `mds-button` used for the delete affordance is a Shadow DOM implementation detail with no styling API of its own: targeting it with `>>>` or undocumented `::part()` names will break on minor releases. Restyle the chip and its leading icon through the public `--mds-chip-*` properties.\n\n```css\n/* INCORRECT */\nmds-chip >>> .button-delete {\n  color: red;\n}\n\n/* CORRECT */\nmds-chip {\n  --mds-chip-icon-background: rgb(var(--magma-danger-emphasis));\n}\n```\n\n#### Do Not Forget to Remove `await`-Pattern Analogue: Removing `selected` by Setting It to `false`\n\nWith `selected=\"false\"` the component reads the prop as `false` and drops the attribute when it renders, but until then the attribute is in the DOM and attribute selectors (`mds-chip[selected]`) match it. Remove the attribute; from JavaScript both `false` and `undefined` deselect the chip (the component turns `false` into `undefined` and drops the attribute).\n\n```html\n<!-- INCORRECT -->\n<mds-chip label=\"Filtro\" selectable selected=\"false\" variant=\"primary\"></mds-chip>\n\n<!-- CORRECT -->\n<mds-chip label=\"Filtro\" selectable variant=\"primary\"></mds-chip>\n```\n\n#### Do Not Use `<mds-chip>` as a Navigation Link\n\n`<mds-chip>` has no `href` prop. Wrapping it in an `<a>` creates a nested interactive element, breaks keyboard semantics, and fails accessibility audits. Use [`mds-button`](../mds-button/AGENTS.md) with `href` instead.\n\n```html\n<!-- INCORRECT -->\n<a href=\"/categoria/sport\">\n  <mds-chip label=\"Sport\" variant=\"primary\"></mds-chip>\n</a>\n\n<!-- CORRECT -->\n<mds-button\n  label=\"Sport\"\n  href=\"/categoria/sport\"\n  variant=\"primary\"\n  tone=\"weak\"\n></mds-button>\n```\n"
      },
      "props": [
        {
          "name": "clickable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "clickable",
          "reflectToAttr": true,
          "docs": "Adds ARIA support to the element if has interaction",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "deletable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "deletable",
          "reflectToAttr": false,
          "docs": "Shows the cross icon to perform cancel/delete action on element",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Sets the component disabled status: neither the label nor the delete button can be focused\nor activated",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "The icon displayed to the left of the component's label",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": true,
          "docs": "The label displayed to the right of the component's icon",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        },
        {
          "name": "selectable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "selectable",
          "reflectToAttr": true,
          "docs": "Sets if the component change is status to selected when is clicked",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Sets the component selected",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "swatch",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "swatch",
          "reflectToAttr": false,
          "docs": "A colour drawn as a round swatch where the icon goes, in place of `icon`: any CSS colour\n(`#2f6fd0`, `rgb(47 111 208)`, `oklch(55% 0.2 260)`). It is a value of the product, the\ncolour the label names (a family of colours, a category, a calendar), not a role of Magma:\nthe chip draws it as it is given in every mode and theme, inside a ring that keeps it visible\non the chip, at rest and selected. Decorative: hidden from assistive technologies, since the\nlabel names it. A value that is not a colour draws the empty ring.",
          "docsTags": [
            {
              "name": "example",
              "text": "'#2f6fd0'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"strong\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneMinimalVariantType",
            "resolved": "\"strong\" | \"weak\" | undefined",
            "references": {
              "ToneMinimalVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneMinimalVariantType",
                "referenceLocation": "ToneMinimalVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Sets the color variant tone of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'strong'"
            }
          ],
          "default": "'strong'",
          "values": [
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"amaranth\" | \"aqua\" | \"blue\" | \"dark\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"secondary\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
          "complexType": {
            "original": "ChipVariantType",
            "resolved": "\"ai\" | \"amaranth\" | \"aqua\" | \"blue\" | \"dark\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"secondary\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
            "references": {
              "ChipVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ChipVariantType",
                "referenceLocation": "ChipVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the color variant of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "amaranth",
              "type": "string"
            },
            {
              "value": "aqua",
              "type": "string"
            },
            {
              "value": "blue",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "green",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "lime",
              "type": "string"
            },
            {
              "value": "orange",
              "type": "string"
            },
            {
              "value": "orchid",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "purple",
              "type": "string"
            },
            {
              "value": "red",
              "type": "string"
            },
            {
              "value": "secondary",
              "type": "string"
            },
            {
              "value": "sky",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "violet",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "value": "yellow",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsChipClickLabel",
          "detail": "MdsChipEvent",
          "bubbles": true,
          "complexType": {
            "original": "MdsChipEvent",
            "resolved": "MdsChipEvent",
            "references": {
              "MdsChipEvent": {
                "location": "import",
                "path": "./meta/interface",
                "id": "src/components/mds-chip/meta/interface.ts::MdsChipEvent",
                "referenceLocation": "MdsChipEvent"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component's label is clicked",
          "docsTags": []
        },
        {
          "event": "mdsChipDelete",
          "detail": "MdsChipEvent",
          "bubbles": true,
          "complexType": {
            "original": "MdsChipEvent",
            "resolved": "MdsChipEvent",
            "references": {
              "MdsChipEvent": {
                "location": "import",
                "path": "./meta/interface",
                "id": "src/components/mds-chip/meta/interface.ts::MdsChipEvent",
                "referenceLocation": "MdsChipEvent"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component's delete button is clicked",
          "docsTags": []
        },
        {
          "event": "mdsChipSelect",
          "detail": "MdsChipEvent",
          "bubbles": true,
          "complexType": {
            "original": "MdsChipEvent",
            "resolved": "MdsChipEvent",
            "references": {
              "MdsChipEvent": {
                "location": "import",
                "path": "./meta/interface",
                "id": "src/components/mds-chip/meta/interface.ts::MdsChipEvent",
                "referenceLocation": "MdsChipEvent"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component's label is clicked and when `selectable` attribute is set to `true`",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-chip-background",
          "annotation": "prop",
          "docs": "Sets the `background-color` of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-chip-background-selected",
          "annotation": "prop",
          "docs": "Sets the `background-color` of the component when it's selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-chip-border",
          "annotation": "prop",
          "docs": "Sets the `border-color` of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-chip-border-selected",
          "annotation": "prop",
          "docs": "Sets the `border-color` of the component when it's selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-chip-color",
          "annotation": "prop",
          "docs": "Sets the `color` of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-chip-color-selected",
          "annotation": "prop",
          "docs": "Sets the `color` of the component when it's selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-chip-icon-background",
          "annotation": "prop",
          "docs": "Sets the `background-color` of the icon",
          "visibility": "public"
        },
        {
          "name": "--mds-chip-icon-background-selected",
          "annotation": "prop",
          "docs": "Sets the `background-color` of the icon when the component is selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-chip-icon-color",
          "annotation": "prop",
          "docs": "Sets the `fill` color of the icon of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-chip-icon-color-selected",
          "annotation": "prop",
          "docs": "Sets the `fill` color of the icon of the component when it's selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-chip-opacity-disabled",
          "annotation": "prop",
          "docs": "Sets the `opacity` of the component when it's disabled",
          "visibility": "internal"
        },
        {
          "name": "--mds-chip-shadow",
          "annotation": "prop",
          "docs": "Sets the `box-shadow` of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-chip-shadow-selected",
          "annotation": "prop",
          "docs": "Sets the `box-shadow` of the component when it's selected",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-policy-ai"
      ],
      "dependencies": [
        "mds-icon",
        "mds-text",
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-chip": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-policy-ai": [
          "mds-chip"
        ]
      },
      "storybook": "ui-chip--docs"
    },
    {
      "filePath": "src/components/mds-details/mds-details.tsx",
      "encapsulation": "shadow",
      "tag": "mds-details",
      "readme": "# mds-details\n\n\n\nThis 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.\n",
      "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": "slot",
          "text": "action - Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "slot",
          "text": "icon - Insert an icon image, it can be `HTML elements` or `components`, it is **recommended** to add `mds-icon` element."
        },
        {
          "name": "slot",
          "text": "title - Add a `text string`, `HTML elements` or `components`, it is **recommended** to use `mds-text` element."
        },
        {
          "name": "part",
          "text": "header - The header of the component"
        },
        {
          "name": "part",
          "text": "title - The title of the component"
        },
        {
          "name": "part",
          "text": "content - The content wrapper of the default and `action` slots"
        },
        {
          "name": "category",
          "text": "structure"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-details>` web component is the disclosure widget of the Magma Design System: a collapsible block with a clickable header that shows or hides its content on demand. It is the styled, accessible equivalent of the native HTML `<details>`/`<summary>` pair, structured into dedicated `title`, `icon`, `action` and content regions.\n\n#### Semantic Behavior\n\n- **Open/closed state**: The `opened` prop expands or collapses the content region with a transition.\n- **Header activation**: Clicking the header or the leading icon toggles the open state, and the header is keyboard-activatable with Enter and Space.\n- **Closed content**: While closed, the content is hidden from the tab order and from assistive technologies, not only from the eye; it shows for the whole opening and closing animation.\n- **Change event**: Each user toggle emits `mdsDetailsChange` carrying the new boolean open state; changing `opened` from code emits nothing.\n- **Icon slot presence**: The leading icon area auto-hides when no `icon` slot is provided.\n- **Default slot vs. named slots**: The default (unnamed) slot is the collapsible body. The `title` slot is the always-visible header label, `icon` is the optional leading glyph, and `action` is a footer region inside the expandable content meant for action controls.\n\n#### Properties & Visual Configurations\n\nThis component intentionally exposes a single behavioral prop. Visual surface is driven through slots and the documented shadow parts (`header`, `title`, `content`) rather than through variant/tone props: the component has no public CSS custom property.\n\n- **`opened`** sets the expanded state. Set it to pre-expand the block on first render, or change it to open / close the block from code. A user toggle writes it back too (property and reflected attribute), so it always holds the current state.\n\n#### Other behavioral props\n\n- The **`title`** slot is recommended to hold an `mds-text`; the **`icon`** slot an `mds-icon`; and the **`action`** slot an `mds-button` for the primary action tied to the disclosed content.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-details>` 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 Disclosure Block\n\nThe minimal form: a `title` slot for the always-visible header and a default slot for the collapsible body. Use `mds-text` in both slots so typography tokens are applied consistently.\n\n```html\n<mds-details>\n  <mds-text typography=\"h6\" slot=\"title\">Descrizione del progetto</mds-text>\n  <mds-text typography=\"detail\">\n    Questa sezione raccoglie le informazioni principali relative all'ambito e agli obiettivi del\n    progetto.\n  </mds-text>\n</mds-details>\n```\n\n#### Pre-expanded State via `opened`\n\nPass the `opened` boolean attribute to expand the block on first render. User toggles update it, and emit `mdsDetailsChange`.\n\n```html\n<mds-details opened>\n  <mds-text typography=\"h6\" slot=\"title\">Note operative</mds-text>\n  <mds-text typography=\"paragraph\">\n    Le note operative sono visibili fin dal caricamento della pagina per garantire una lettura\n    immediata.\n  </mds-text>\n</mds-details>\n```\n\n#### Leading Icon via the `icon` Slot\n\nPlace an `mds-icon` in the `icon` slot to add a leading glyph that also acts as a toggle. The icon area auto-hides when the slot is empty, so leaving it out does not leave an empty gap.\n\n```html\n<mds-details>\n  <mds-icon slot=\"icon\" name=\"mi/baseline/info\"></mds-icon>\n  <mds-text typography=\"h6\" slot=\"title\">Requisiti di accesso</mds-text>\n  <mds-text typography=\"detail\">\n    Per accedere al servizio e necessario disporre di credenziali SPID di livello 2 o superiore.\n  </mds-text>\n</mds-details>\n```\n\n#### Action Button via the `action` Slot\n\nThe `action` slot sits at the bottom of the expandable content region. Use `mds-button` (recommended) for the primary action tied to the disclosed content.\n\n```html\n<mds-details>\n  <mds-icon slot=\"icon\" name=\"mi/baseline/check-circle\"></mds-icon>\n  <mds-text typography=\"h6\" slot=\"title\">Modulistica richiesta</mds-text>\n  <mds-text typography=\"detail\">\n    Scarica e compila il modulo A3 prima di procedere con la richiesta.\n  </mds-text>\n  <mds-button slot=\"action\" size=\"sm\" variant=\"primary\" tone=\"outline\" label=\"Scarica il modulo\"></mds-button>\n</mds-details>\n```\n\n#### Listening to Toggle Events\n\nSubscribe to `mdsDetailsChange` to react to open/close transitions. The event detail carries the new boolean state. Do not listen for native `click` on the host.\n\n```html\n<mds-details id=\"faq-1\">\n  <mds-text typography=\"h6\" slot=\"title\">Come posso rinnovare il contratto?</mds-text>\n  <mds-text typography=\"detail\">\n    Il rinnovo puo essere effettuato online dall'area personale almeno 30 giorni prima della\n    scadenza.\n  </mds-text>\n</mds-details>\n\n<script>\n  document.getElementById('faq-1').addEventListener('mdsDetailsChange', (event) => {\n    console.log('Stato apertura:', event.detail); // true | false\n  });\n</script>\n```\n\n#### Programmatic Control\n\nAssign the `opened` property to drive the disclosure from code - for example to expand all items at once or to implement accordion logic manually. User toggles write `opened` back, so it always holds the current state: `opened = true` opens a block the user had closed.\n\n```html\n<mds-details id=\"step-1\">\n  <mds-text typography=\"h6\" slot=\"title\">Passo 1: Verifica dei dati</mds-text>\n  <mds-text typography=\"detail\">\n    Controlla che tutti i dati anagrafici siano corretti prima di procedere.\n  </mds-text>\n</mds-details>\n\n<mds-button id=\"expand-btn\" label=\"Espandi tutti\" variant=\"primary\" tone=\"text\"></mds-button>\n\n<script>\n  document.getElementById('expand-btn').addEventListener('click', () => {\n    document.querySelectorAll('mds-details').forEach((el) => {\n      el.opened = true;\n    });\n  });\n</script>\n```\n\n#### CSS Customization\n\n`mds-details` has no public CSS custom property: style it with its props, its parts and the semantic roles. The icon colors and the open/close transition follow the theme. Set colors on the documented parts with the semantic color roles via `rgb(var(--magma-<role>))` so dark mode, named themes and high contrast keep working.\n\n```css\n.custom-faq mds-details::part(header) {\n  background: rgb(var(--magma-surface-muted));\n}\n```\n\n#### Styling Shadow Parts\n\nUse the documented shadow `::part()` names: `header`, `title`, and `content`. Do not target undocumented internals.\n\n```css\n/* Increase header padding for a spacious FAQ layout */\n.faq-section mds-details::part(header) {\n  padding: calc(var(--spacing) * 300) 0;\n}\n\n/* Give the title extra weight */\n.faq-section mds-details::part(title) {\n  font-weight: 600;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-details>`. 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 Put the Title Text in the Default Slot\n\nThe default slot is the collapsible body. Text placed there is hidden until the user expands the block, so it cannot serve as the visible header. Use the `title` slot for the header label.\n\n```html\n<!-- INCORRECT -->\n<mds-details>\n  Requisiti di accesso\n</mds-details>\n\n<!-- CORRECT -->\n<mds-details>\n  <mds-text typography=\"h6\" slot=\"title\">Requisiti di accesso</mds-text>\n</mds-details>\n```\n\n#### Do Not Replace `<mds-details>` with a Raw `<details>` Element\n\nThe native `<details>` lacks Magma theming, the leading icon slot, the `action` slot, smooth CSS grid transitions, preference support (reduced-motion, high-contrast), and the `mdsDetailsChange` event contract. Always use `<mds-details>` inside a Magma application.\n\n```html\n<!-- INCORRECT -->\n<details>\n  <summary>Modulistica richiesta</summary>\n  <p>Scarica il modulo A3 prima di procedere.</p>\n</details>\n\n<!-- CORRECT -->\n<mds-details>\n  <mds-text typography=\"h6\" slot=\"title\">Modulistica richiesta</mds-text>\n  <mds-text typography=\"detail\">Scarica il modulo A3 prima di procedere.</mds-text>\n</mds-details>\n```\n\n#### Do Not Set `opened=\"false\"` to Collapse the Component\n\n`opened` is a boolean attribute. The component reads the string `\"false\"` as `false` and drops the attribute when it renders, but until then the attribute is in the DOM and attribute selectors (`mds-details[opened]`) see the block as open. Remove the attribute entirely to collapse it, or set the property to `undefined` / `false` in JavaScript.\n\n```html\n<!-- INCORRECT -->\n<mds-details opened=\"false\">\n  <mds-text typography=\"h6\" slot=\"title\">Note operative</mds-text>\n</mds-details>\n\n<!-- CORRECT -->\n<mds-details>\n  <mds-text typography=\"h6\" slot=\"title\">Note operative</mds-text>\n</mds-details>\n```\n\n#### Do Not Inline an `<mds-icon>` in the `title` Slot to Fake a Leading Glyph\n\nThe `icon` slot is the dedicated region for the leading glyph; it also participates in the toggle click area. Putting `mds-icon` inside the `title` slot bypasses this layout: the icon area stays hidden and the glyph sits in the title text.\n\n```html\n<!-- INCORRECT -->\n<mds-details>\n  <span slot=\"title\">\n    <mds-icon name=\"mi/baseline/info\"></mds-icon>\n    Informazioni sul servizio\n  </span>\n</mds-details>\n\n<!-- CORRECT -->\n<mds-details>\n  <mds-icon slot=\"icon\" name=\"mi/baseline/info\"></mds-icon>\n  <mds-text typography=\"h6\" slot=\"title\">Informazioni sul servizio</mds-text>\n</mds-details>\n```\n\n#### Do Not Listen for Native `click` to Detect Toggle\n\nClicking the header triggers `mdsDetailsChange` with the new state. Listening for raw `click` on the host or its shadow parts is fragile - it fires on every sub-element click, may not bubble out of shadow DOM as expected, and gives you no reliable open/closed state.\n\n```html\n<!-- INCORRECT -->\n<mds-details id=\"det\">\n  <mds-text typography=\"h6\" slot=\"title\">Dettaglio</mds-text>\n</mds-details>\n\n<script>\n  // Do not do this - fires on any click, no open/closed state\n  document.getElementById('det').addEventListener('click', () => {\n    console.log('click rilevato');\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.getElementById('det').addEventListener('mdsDetailsChange', (e) => {\n    console.log('Aperto:', e.detail); // true | false\n  });\n</script>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internals\n\n`mds-details` has no public CSS custom property: the only supported customization surface is the three documented shadow parts (`header`, `title`, `content`). Targeting undocumented class names or using `>>>` couples your code to the internal implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-details >>> .helper-icon {\n  fill: red;\n}\nmds-details >>> .header {\n  background: yellow;\n}\n\n/* CORRECT */\nmds-details::part(header) {\n  background: rgb(var(--magma-surface-muted));\n}\n```\n"
      },
      "props": [
        {
          "name": "opened",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": true,
          "attr": "opened",
          "reflectToAttr": true,
          "docs": "Specifies if the component is opened",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsDetailsChange",
          "detail": "boolean",
          "bubbles": true,
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is opened",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-details-duration",
          "annotation": "prop",
          "docs": "Sets the transition duration for details component",
          "visibility": "internal"
        },
        {
          "name": "--mds-details-helper-icon-color",
          "annotation": "prop",
          "docs": "Sets the color of the helper icon in the details component",
          "visibility": "internal"
        },
        {
          "name": "--mds-details-icon-color",
          "annotation": "prop",
          "docs": "Sets the color of the details icon",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "action",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "icon",
          "docs": "Insert an icon image, it can be `HTML elements` or `components`, it is **recommended** to add `mds-icon` element."
        },
        {
          "name": "title",
          "docs": "Add a `text string`, `HTML elements` or `components`, it is **recommended** to use `mds-text` element."
        }
      ],
      "parts": [
        {
          "name": "content",
          "docs": "The content wrapper of the default and `action` slots"
        },
        {
          "name": "header",
          "docs": "The header of the component"
        },
        {
          "name": "title",
          "docs": "The title of the component"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-details--docs"
    },
    {
      "filePath": "src/components/mds-dropdown/mds-dropdown.tsx",
      "encapsulation": "shadow",
      "tag": "mds-dropdown",
      "readme": "# mds-dropdown\n\n\n\nThis 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.\n",
      "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, elements will be shown when the component is triggered."
        },
        {
          "name": "category",
          "text": "overlays"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-dropdown>` web component is a floating overlay surface of the Magma Design System that anchors arbitrary slotted content next to an external trigger element. It has no built-in trigger of its own: it attaches to a separate caller resolved via `target` and positions, flips and shifts itself around that element.\n\n#### Semantic Behavior\n\n- **Caller binding**: The dropdown does not render a trigger; it resolves its caller from the `target` selector and wires the chosen interaction onto that external element. Changing `target` re-binds the caller.\n- **Visibility is the single source of truth**: The `visible` prop drives the whole lifecycle - it positions the floating element, optionally shows the backdrop, and emits the events; setting it back to `false` dismisses it.\n- **Outside-click dismissal**: While open, clicking outside both the host and the caller closes the dropdown.\n- **Escape to close**: Pressing Escape hides the dropdown, and hands the focus back to the caller when the panel was holding it.\n- **Keyboard, when the panel is a `menu`**: the arrows on the caller open the panel and land on the first entry (Up on the last), Enter does the same; inside the panel the arrows walk the entries and wrap at the ends, Home and End go to the first and to the last, Tab closes and lets the focus leave from the caller. A panel that declares another role is left alone: the arrows of a calendar or of a form belong to what the panel holds.\n- **Backdrop**: When `backdrop` is set, a backdrop is shown while the dropdown is visible and removed on close.\n- **Emitted events**: `mdsDropdownChange` fires on every visibility transition; `mdsDropdownVisible` and `mdsDropdownHide` fire on open and close respectively. Each detail carries the resolved `caller` and the current `visible` state.\n- **Default slot is the panel content**: Anything in the default slot (text, HTML, or other components) is the surface shown when the dropdown is triggered.\n- **ARIA wiring**: The panel declares itself a `menu` and names the elements the slot receives as its entries (`role=\"menuitem\"`, a role of their own other than `button` being left alone); the caller receives `aria-haspopup`, an `aria-controls` pointing at the panel and an `aria-expanded` that follows `visible`. A panel that is not a list of actions declares its own `role` in the markup and keeps it, its contents then being left alone. A caller that exposes no role of its own - a generic host that keeps its control inside its shadow root, such as `mds-tab-item` - is left unwired, none of those attributes being valid on it.\n\n#### Properties & Visual Configurations\n\n- **`interaction`** decides how the caller opens the panel: `'click'` toggles on caller click (with outside-click and Escape dismissal), `'mouseover'` opens on hover and closes on mouse leave, and `'none'` wires nothing on the caller, so visibility is controlled programmatically through `visible` (an open panel still closes on outside click and Escape).\n- **`target`** (required) is the CSS selector of the external element the dropdown attaches to and positions against.\n\n#### Other behavioral props\n\n- **`placement`** sets the side relative to the caller, taken whenever it has room: by default (auto-placement) the panel moves to the opposite side, then to the sides across, only when it does not fit there. **`disableAutoPlacement`** pins it to `placement`, and **`flip`** then allows the fallback to the opposite side only. The panel is shifted to stay inside the viewport with a safe margin by default - **`disableShift`** opts out of this and **`shiftPadding`** tunes the margin.\n- **`offset`** controls the gap between the panel and the caller; the pointer toward the caller is shown by default (**`hideArrow`** removes it) and **`arrowPadding`** insets it from the panel edges.\n- the panel tracks the caller smoothly as the page scrolls by default (**`disableSmooth`** opts out); **`strategy`** chooses the CSS positioning mode (`'absolute'` vs `'fixed'`) and **`zIndex`** sets the stacking order.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-dropdown>` 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 Dropdown Menu\n\nThe minimal required setup: a trigger element with a unique `id` and a `<mds-dropdown>` with `target` pointing at it. The dropdown binds to the caller on `click` by default and dismisses on outside-click or Escape.\n\n```html\n<mds-button id=\"menu-utente\" label=\"Profilo\" icon=\"mi/baseline/account-circle\" variant=\"primary\" tone=\"weak\"></mds-button>\n\n<mds-dropdown target=\"#menu-utente\">\n  <mds-button icon=\"mi/baseline/settings\" variant=\"dark\" tone=\"text\" label=\"Impostazioni account\"></mds-button>\n  <mds-button icon=\"mi/baseline/logout\" variant=\"error\" tone=\"text\" label=\"Esci\"></mds-button>\n</mds-dropdown>\n```\n\n#### Panel That Is Not a Menu\n\nThe dropdown is a `menu` by default, a list of actions being what it holds most of the time. A panel that holds anything else - a calendar, a form, a paragraph with a link - declares its own `role`, which the component never overwrites: its contents are then left alone instead of being named entries of a menu.\n\n```html\n<mds-button id=\"info-policy\" label=\"Come usiamo i tuoi dati\" variant=\"primary\" tone=\"weak\"></mds-button>\n\n<mds-dropdown target=\"#info-policy\" role=\"group\">\n  <mds-text typography=\"tip\">I dati restano sui server di Maggioli.</mds-text>\n  <mds-button href=\"/policy\" label=\"Leggi la policy\" variant=\"dark\" tone=\"text\" size=\"sm\"></mds-button>\n</mds-dropdown>\n```\n\n#### Dropdown with Arrow Pointer\n\nThe arrow pointer is shown by default to visually connect the panel to its caller; add `hide-arrow` to remove it. Adjust `arrow-padding` when the panel is narrow and the arrow would clip the rounded corners.\n\n```html\n<mds-button id=\"aiuto-contestuale\" label=\"Aiuto\" icon=\"mi/baseline/help-outline\" variant=\"primary\" tone=\"outline\"></mds-button>\n\n<mds-dropdown target=\"#aiuto-contestuale\" arrow-padding=\"16\">\n  <mds-text typography=\"h6\">Come funziona?</mds-text>\n  <mds-text typography=\"detail\">Seleziona un campo per vedere la guida contestuale.</mds-text>\n</mds-dropdown>\n```\n\n#### Dropdown with Backdrop\n\nUse `backdrop` to dim the rest of the page while the panel is open. This is appropriate for panels with a higher modal weight, such as user-account menus or multi-step pickers.\n\nThe backdrop is appended to `<body>`, out of reach of the CSS inheritance of the dropdown: when it opens, the dropdown hands it the value it resolves for `--mds-dropdown-backdrop-z-index` and its fade duration, by default the ones of the page backdrop (`--magma-backdrop-z-index`, `--magma-backdrop-animation-duration`). With the animation preference set to reduce, the backdrop appears and goes without a fade.\n\n```html\n<mds-button id=\"selezione-filtri\" label=\"Filtra risultati\" icon=\"mi/baseline/filter-list\" variant=\"primary\"></mds-button>\n\n<mds-dropdown target=\"#selezione-filtri\" backdrop>\n  <mds-text typography=\"h6\">Filtra per categoria</mds-text>\n  <mds-filter>\n    <mds-filter-item label=\"Documenti\"></mds-filter-item>\n    <mds-filter-item label=\"Immagini\"></mds-filter-item>\n    <mds-filter-item label=\"Video\"></mds-filter-item>\n  </mds-filter>\n</mds-dropdown>\n```\n\n#### Mouseover Interaction\n\nSet `interaction=\"mouseover\"` for navigation mega-menus or info tooltips that should open on hover. The component adds a configurable delay (default 0.5 s, controlled by `--mds-dropdown-mouseover-delay`) before opening and closing.\n\n```html\n<mds-button id=\"info-progetto\" label=\"Dettagli progetto\" variant=\"dark\" tone=\"text\"></mds-button>\n\n<mds-dropdown target=\"#info-progetto\" interaction=\"mouseover\">\n  <mds-entity icon=\"mi/baseline/folder\">\n    <mds-text>Progetto Alfa - In corso</mds-text>\n  </mds-entity>\n</mds-dropdown>\n```\n\n#### Programmatic Control via `visible`\n\nSet `interaction=\"none\"` to disable automatic wiring and drive visibility yourself. This is useful when the trigger logic lives in app code - for example, opening on a keyboard shortcut or a programmatic state change.\n\n```html\n<mds-button id=\"apri-manuale\" label=\"Apri pannello\" variant=\"primary\"></mds-button>\n\n<mds-dropdown id=\"pannello-opzioni\" target=\"#apri-manuale\" interaction=\"none\">\n  <mds-text typography=\"detail\">Pannello gestito dal codice applicativo.</mds-text>\n</mds-dropdown>\n\n<script>\n  const dropdown = document.querySelector('#pannello-opzioni');\n  document.querySelector('#apri-manuale').addEventListener('click', () => {\n    dropdown.visible = !dropdown.visible;\n  });\n</script>\n```\n\n#### Placement and Auto-Placement\n\nUse `placement` to choose the side of the caller the panel opens on. Auto-placement is on by default: the panel takes `placement` whenever it has room there, and moves to the opposite side, then to the sides across, only when it does not fit; add `disable-auto-placement` to pin the panel strictly to `placement`.\n\n```html\n<!-- Pinned right-start placement (auto-placement disabled) -->\n<mds-button id=\"azioni-riga\" label=\"Azioni\" icon=\"mi/baseline/more-vert\" variant=\"dark\" tone=\"text\"></mds-button>\n\n<mds-dropdown target=\"#azioni-riga\" placement=\"right-start\" disable-auto-placement>\n  <mds-button icon=\"mi/baseline/edit\" variant=\"dark\" tone=\"text\" label=\"Modifica\"></mds-button>\n  <mds-button icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\" label=\"Elimina\"></mds-button>\n</mds-dropdown>\n\n<!-- Auto-placement (default) for constrained viewports -->\n<mds-button id=\"opzioni-voce\" label=\"Opzioni\" variant=\"primary\" tone=\"weak\"></mds-button>\n<mds-dropdown target=\"#opzioni-voce\">\n  <mds-button label=\"Duplica\" icon=\"mi/baseline/content-copy\" variant=\"dark\" tone=\"text\"></mds-button>\n</mds-dropdown>\n```\n\n#### Flip and Shift for Viewport Safety\n\nEnable `flip` together with `disable-auto-placement` to let the pinned panel jump to the opposite side, and to no other, when there is not enough space in the preferred direction; auto-placement already includes that fallback. Shifting the panel to keep it inside the viewport is on by default; tune the safe margin with `shift-padding` (or set `disable-shift` to opt out).\n\n```html\n<mds-button id=\"btn-edge\" label=\"Vicino al bordo\" variant=\"primary\"></mds-button>\n\n<mds-dropdown target=\"#btn-edge\" placement=\"top\" disable-auto-placement flip shift-padding=\"16\">\n  <mds-text typography=\"detail\">Questo pannello si sposta automaticamente se manca spazio.</mds-text>\n</mds-dropdown>\n```\n\n#### Listening to Visibility Events\n\nListen for `mdsDropdownVisible`, `mdsDropdownHide`, or `mdsDropdownChange` to react to open/close transitions. Each event detail contains `caller` (the resolved trigger element) and `visible` (the new state).\n\n```html\n<mds-button id=\"btn-notifica\" label=\"Notifiche\" icon=\"mi/baseline/notifications\" variant=\"primary\"></mds-button>\n\n<mds-dropdown id=\"pannello-notifiche\" target=\"#btn-notifica\">\n  <mds-text typography=\"detail\">Nessuna nuova notifica.</mds-text>\n</mds-dropdown>\n\n<script>\n  document.querySelector('#pannello-notifiche').addEventListener('mdsDropdownVisible', (e) => {\n    console.log('Aperto. Trigger:', e.detail.caller);\n  });\n  document.querySelector('#pannello-notifiche').addEventListener('mdsDropdownHide', () => {\n    console.log('Chiuso.');\n  });\n</script>\n```\n\n#### Strategy `fixed` Inside Scrolling or Stacked Containers\n\nUse `strategy=\"fixed\"` when the dropdown is placed inside a scroll container, a sticky header, or a modal. With `strategy=\"absolute\"` (the default) the panel may be clipped by `overflow: hidden` ancestors.\n\n```html\n<!-- Inside a modal or a sticky nav - use fixed positioning -->\n<mds-button id=\"menu-header\" label=\"Menu\" variant=\"primary\" tone=\"weak\"></mds-button>\n\n<mds-dropdown target=\"#menu-header\" strategy=\"fixed\">\n  <mds-button label=\"Pagina principale\" icon=\"mi/baseline/home\" variant=\"dark\" tone=\"text\"></mds-button>\n  <mds-button label=\"Impostazioni\" icon=\"mi/baseline/settings\" variant=\"dark\" tone=\"text\"></mds-button>\n</mds-dropdown>\n```\n\n#### DOM Placement at the Document Root\n\nPlace `<mds-dropdown>` as a direct child of `<body>` (or as close as possible to the root) when the caller lives deep inside a stacking context. Nesting the dropdown inside the same transformed or `overflow: hidden` ancestor as the caller can break positioning and backdrop rendering.\n\n```html\n<body>\n  <!-- Trigger lives inside a complex layout -->\n  <div class=\"app-layout\">\n    <nav>\n      <mds-button id=\"btn-profilo\" label=\"Profilo\" variant=\"primary\"></mds-button>\n    </nav>\n  </div>\n\n  <!-- Dropdown is a sibling of the layout root, not nested inside it -->\n  <mds-dropdown target=\"#btn-profilo\" strategy=\"fixed\" backdrop>\n    <mds-text typography=\"h6\">Mario Rossi</mds-text>\n    <mds-button label=\"Esci\" icon=\"mi/baseline/logout\" variant=\"error\" tone=\"text\"></mds-button>\n  </mds-dropdown>\n</body>\n```\n\n#### Styling Customization\n\nCustomize the dropdown only through its public `--mds-dropdown-*` CSS custom properties. Use the semantic color roles via `rgb(var(--magma-<role>))` to preserve dark-mode, named-theme and high-contrast behavior.\n\n```css\n.my-context mds-dropdown {\n  --mds-dropdown-background: rgb(var(--magma-surface-overlay));\n  --mds-dropdown-mouseover-delay: 0.2s;\n  --mds-dropdown-z-index: 5000;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-dropdown>`. 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 Place the Dropdown Deep Inside a Scroll or Stacking Context\n\nNesting `<mds-dropdown>` inside a transformed, sticky, or `overflow: hidden` ancestor breaks floating positioning and backdrop rendering. Place it as close to `<body>` as the page structure allows, or switch to `strategy=\"fixed\"`.\n\n```html\n<!-- INCORRECT -->\n<div style=\"overflow: hidden; position: relative;\">\n  <mds-button id=\"trigger\" label=\"Apri\" variant=\"primary\"></mds-button>\n  <mds-dropdown target=\"#trigger\" backdrop>\n    <mds-text>Contenuto</mds-text>\n  </mds-dropdown>\n</div>\n\n<!-- CORRECT -->\n<div style=\"overflow: hidden; position: relative;\">\n  <mds-button id=\"trigger\" label=\"Apri\" variant=\"primary\"></mds-button>\n</div>\n<mds-dropdown target=\"#trigger\" strategy=\"fixed\" backdrop>\n  <mds-text>Contenuto</mds-text>\n</mds-dropdown>\n```\n\n#### Do Not Use `visible=\"false\"` to Close the Dropdown\n\n`visible` is a boolean prop. The component reads the string `\"false\"` as `false` and drops the attribute when it renders, but until then the attribute is in the DOM and attribute selectors (`mds-dropdown[visible]`) match it. Remove the attribute or set the property to `false` in JavaScript to close it.\n\n```html\n<!-- INCORRECT -->\n<mds-dropdown target=\"#btn\" visible=\"false\">\n  <mds-text>Contenuto</mds-text>\n</mds-dropdown>\n\n<!-- CORRECT -->\n<mds-dropdown target=\"#btn\">\n  <mds-text>Contenuto</mds-text>\n</mds-dropdown>\n```\n\n```js\n// CORRECT - closing programmatically\ndocument.querySelector('mds-dropdown').visible = false;\n```\n\n#### Do Not Listen for Native `click` on the Target Instead of Dropdown Events\n\nThe dropdown manages its own interaction and emits `mdsDropdownVisible`, `mdsDropdownHide`, and `mdsDropdownChange`. Attaching a raw `click` listener to the caller can interfere with inside-click handling and may fire before the dropdown has updated its state.\n\n```html\n<!-- INCORRECT -->\n<mds-button id=\"btn-info\" label=\"Info\" variant=\"primary\"></mds-button>\n<mds-dropdown target=\"#btn-info\">...</mds-dropdown>\n\n<script>\n  // raw native event on the caller - races with dropdown internals\n  document.querySelector('#btn-info').addEventListener('click', () => {\n    console.log('cliccato');\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-button id=\"btn-info\" label=\"Info\" variant=\"primary\"></mds-button>\n<mds-dropdown id=\"dd-info\" target=\"#btn-info\">...</mds-dropdown>\n\n<script>\n  document.querySelector('#dd-info').addEventListener('mdsDropdownVisible', (e) => {\n    console.log('dropdown aperto', e.detail.visible);\n  });\n</script>\n```\n\n#### Do Not Use `target` Without a Matching Element in the DOM\n\n`target` is resolved with `querySelector` when the dropdown loads, again whenever `target` changes, and when the dropdown comes back to the page after being moved. If the selector does not match any element the dropdown has no caller and cannot position or open itself. Always verify the `id` is present in the DOM before the component loads.\n\n```html\n<!-- INCORRECT - typo: button has id \"btn-salva\", target points to \"#salva\" -->\n<mds-button id=\"btn-salva\" label=\"Salva\" variant=\"primary\"></mds-button>\n<mds-dropdown target=\"#salva\">\n  <mds-text>Opzioni di salvataggio</mds-text>\n</mds-dropdown>\n\n<!-- CORRECT -->\n<mds-button id=\"btn-salva\" label=\"Salva\" variant=\"primary\"></mds-button>\n<mds-dropdown target=\"#btn-salva\">\n  <mds-text>Opzioni di salvataggio</mds-text>\n</mds-dropdown>\n```\n\n#### Do Not Use `<mds-button-dropdown>` and `<mds-dropdown>` Interchangeably\n\n[`mds-button-dropdown`](../mds-button-dropdown/AGENTS.md) is a compound component that already embeds a trigger button and a dropdown. Use it for a simple action-button-plus-menu. Use `<mds-dropdown>` directly only when the caller is not an `mds-button`, or when you need full control over the trigger element.\n\n```html\n<!-- INCORRECT - re-implementing what mds-button-dropdown already does -->\n<mds-button id=\"btn-azioni\" label=\"Azioni\" icon=\"mi/baseline/expand-more\" variant=\"primary\"></mds-button>\n<mds-dropdown target=\"#btn-azioni\">\n  <mds-button label=\"Modifica\" variant=\"dark\" tone=\"text\"></mds-button>\n  <mds-button label=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n</mds-dropdown>\n\n<!-- CORRECT - use the dedicated compound component -->\n<mds-button-dropdown label=\"Azioni\" variant=\"primary\">\n  <mds-button label=\"Modifica\" variant=\"dark\" tone=\"text\"></mds-button>\n  <mds-button label=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n</mds-button-dropdown>\n```\n\n#### Do Not Customize via Undocumented Shadow Internals\n\nThe supported customization surface is the public `--mds-dropdown-*` CSS custom properties. Targeting internal elements via `::part()` on non-documented parts, `>>>`, or class-name selectors couples your code to the Shadow DOM structure and breaks on any internal refactor.\n\n```css\n/* INCORRECT */\nmds-dropdown::part(panel) {\n  border: 2px solid red;\n}\nmds-dropdown >>> .arrow {\n  display: none;\n}\n\n/* CORRECT */\nmds-dropdown {\n  --mds-dropdown-background: rgb(var(--magma-surface-overlay));\n  --mds-dropdown-z-index: 6000;\n}\n```\n"
      },
      "props": [
        {
          "name": "arrowPadding",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "arrow-padding",
          "reflectToAttr": false,
          "docs": "Sets the distance between arrow and dropdown margins.",
          "docsTags": [
            {
              "name": "default",
              "text": "24"
            }
          ],
          "default": "24",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "backdrop",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "backdrop",
          "reflectToAttr": true,
          "docs": "Specifies if the component has a backdrop background",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disableAutoPlacement",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "disable-auto-placement",
          "reflectToAttr": false,
          "docs": "Pins the component to `placement`: without it, the component moves to another side of the\ncaller when `placement` has no room.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disableShift",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "disable-shift",
          "reflectToAttr": false,
          "docs": "If set, the component will not be kept inside the viewport.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disableSmooth",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "disable-smooth",
          "reflectToAttr": false,
          "docs": "If set, the component will not follow the caller smoothly when the page scrolls.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "flip",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "flip",
          "reflectToAttr": false,
          "docs": "With `disableAutoPlacement`, moves the component to the opposite side of the caller when\n`placement` has no room. Auto-placement, the default, already does it.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hideArrow",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-arrow",
          "reflectToAttr": true,
          "docs": "If set, the component will not have an arrow pointing to the caller.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "interaction",
          "type": "\"click\" | \"mouseover\" | \"none\"",
          "complexType": {
            "original": "DropdownInteractionType",
            "resolved": "\"click\" | \"mouseover\" | \"none\"",
            "references": {
              "DropdownInteractionType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-dropdown/meta/types.ts::DropdownInteractionType",
                "referenceLocation": "DropdownInteractionType"
              }
            }
          },
          "mutable": false,
          "attr": "interaction",
          "reflectToAttr": true,
          "docs": "Specifies if the component is triggered from the caller on mouseover or click event",
          "docsTags": [
            {
              "name": "default",
              "text": "'click'"
            }
          ],
          "default": "'click'",
          "values": [
            {
              "value": "click",
              "type": "string"
            },
            {
              "value": "mouseover",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "offset",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "offset",
          "reflectToAttr": false,
          "docs": "Sets distance between the dropdown and the caller.",
          "docsTags": [
            {
              "name": "default",
              "text": "24"
            }
          ],
          "default": "24",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "placement",
          "type": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
          "complexType": {
            "original": "FloatingUIPlacement",
            "resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
            "references": {
              "FloatingUIPlacement": {
                "location": "import",
                "path": "@type/floating-ui",
                "id": "src/type/floating-ui.ts::FloatingUIPlacement",
                "referenceLocation": "FloatingUIPlacement"
              }
            }
          },
          "mutable": false,
          "attr": "placement",
          "reflectToAttr": false,
          "docs": "Specifies where the component should be placed relative to the caller: the side it takes\nwhenever it has room there.",
          "docsTags": [
            {
              "name": "default",
              "text": "'bottom'"
            }
          ],
          "default": "'bottom'",
          "values": [
            {
              "value": "bottom",
              "type": "string"
            },
            {
              "value": "bottom-end",
              "type": "string"
            },
            {
              "value": "bottom-start",
              "type": "string"
            },
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "left-end",
              "type": "string"
            },
            {
              "value": "left-start",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            },
            {
              "value": "right-end",
              "type": "string"
            },
            {
              "value": "right-start",
              "type": "string"
            },
            {
              "value": "top",
              "type": "string"
            },
            {
              "value": "top-end",
              "type": "string"
            },
            {
              "value": "top-start",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "shiftPadding",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "shift-padding",
          "reflectToAttr": false,
          "docs": "Sets a safe area distance between the dropdown and the viewport.",
          "docsTags": [
            {
              "name": "default",
              "text": "24"
            }
          ],
          "default": "24",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "strategy",
          "type": "\"absolute\" | \"fixed\"",
          "complexType": {
            "original": "FloatingUIStrategy",
            "resolved": "\"absolute\" | \"fixed\"",
            "references": {
              "FloatingUIStrategy": {
                "location": "import",
                "path": "@type/floating-ui",
                "id": "src/type/floating-ui.ts::FloatingUIStrategy",
                "referenceLocation": "FloatingUIStrategy"
              }
            }
          },
          "mutable": false,
          "attr": "strategy",
          "reflectToAttr": false,
          "docs": "Sets the CSS position strategy of the component.",
          "docsTags": [
            {
              "name": "default",
              "text": "'absolute'"
            }
          ],
          "default": "'absolute'",
          "values": [
            {
              "value": "absolute",
              "type": "string"
            },
            {
              "value": "fixed",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "target",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "target",
          "reflectToAttr": false,
          "docs": "Specifies the selector of the target element, this attribute is used with `querySelector` method.",
          "docsTags": [
            {
              "name": "example",
              "text": "'#profile-button'"
            }
          ],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        },
        {
          "name": "visible",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": true,
          "attr": "visible",
          "reflectToAttr": true,
          "docs": "Specifies the visibility of the component.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "zIndex",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "z-index",
          "reflectToAttr": false,
          "docs": "Specifies the visibility of the component.",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsDropdownChange",
          "detail": "MdsDropdownEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsDropdownEventDetail",
            "resolved": "MdsDropdownEventDetail",
            "references": {
              "MdsDropdownEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-dropdown/meta/event-detail.ts::MdsDropdownEventDetail",
                "referenceLocation": "MdsDropdownEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is visible or hidden",
          "docsTags": []
        },
        {
          "event": "mdsDropdownHide",
          "detail": "MdsDropdownEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsDropdownEventDetail",
            "resolved": "MdsDropdownEventDetail",
            "references": {
              "MdsDropdownEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-dropdown/meta/event-detail.ts::MdsDropdownEventDetail",
                "referenceLocation": "MdsDropdownEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is hidden",
          "docsTags": []
        },
        {
          "event": "mdsDropdownVisible",
          "detail": "MdsDropdownEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsDropdownEventDetail",
            "resolved": "MdsDropdownEventDetail",
            "references": {
              "MdsDropdownEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-dropdown/meta/event-detail.ts::MdsDropdownEventDetail",
                "referenceLocation": "MdsDropdownEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is visible",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-dropdown-arrow-background",
          "annotation": "prop",
          "docs": "Sets the fill color of the arrow.",
          "visibility": "internal"
        },
        {
          "name": "--mds-dropdown-backdrop-duration",
          "annotation": "prop",
          "docs": "Sets the duration of the fade of the backdrop shown with the `backdrop` attribute, the one of the page backdrop by default.",
          "visibility": "internal"
        },
        {
          "name": "--mds-dropdown-backdrop-z-index",
          "annotation": "prop",
          "docs": "Sets the z-index of the backdrop shown with the `backdrop` attribute, the one of the page backdrop by default.",
          "visibility": "public"
        },
        {
          "name": "--mds-dropdown-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the dropdown.",
          "visibility": "public"
        },
        {
          "name": "--mds-dropdown-drop-shadow",
          "annotation": "prop",
          "docs": "Sets the drop-shadow of the dropdown.",
          "visibility": "internal"
        },
        {
          "name": "--mds-dropdown-drop-shadow-color-rgb",
          "annotation": "prop",
          "docs": "Sets the color used for the dropdown shadow",
          "visibility": "internal"
        },
        {
          "name": "--mds-dropdown-duration",
          "annotation": "prop",
          "docs": "Sets the duration of the dropdown animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-dropdown-ease",
          "annotation": "prop",
          "docs": "Sets the easing of the dropdown animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-dropdown-mouseover-delay",
          "annotation": "prop",
          "docs": "Sets the delay duration of the component when the caller trigger mouseover event, it's used by the javascript code.",
          "visibility": "public"
        },
        {
          "name": "--mds-dropdown-transform-from",
          "annotation": "prop",
          "docs": "Sets the from animation transform of the dropdown.",
          "visibility": "internal"
        },
        {
          "name": "--mds-dropdown-transform-to",
          "annotation": "prop",
          "docs": "Sets the to animation transform of the dropdown.",
          "visibility": "internal"
        },
        {
          "name": "--mds-dropdown-z-index",
          "annotation": "prop",
          "docs": "Sets the z-index of the component.",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot, elements will be shown when the component is triggered."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-button-dropdown",
        "mds-input-date",
        "mds-input-date-range",
        "mds-policy-ai",
        "mds-pref-language",
        "mds-pref-theme"
      ],
      "dependencies": [],
      "dependencyGraph": {
        "mds-button-dropdown": [
          "mds-dropdown"
        ],
        "mds-input-date": [
          "mds-dropdown"
        ],
        "mds-input-date-range": [
          "mds-dropdown"
        ],
        "mds-policy-ai": [
          "mds-dropdown"
        ],
        "mds-pref-language": [
          "mds-dropdown"
        ],
        "mds-pref-theme": [
          "mds-dropdown"
        ]
      },
      "storybook": "ui-dropdown--docs"
    },
    {
      "filePath": "src/components/mds-emoji/mds-emoji.tsx",
      "encapsulation": "shadow",
      "tag": "mds-emoji",
      "readme": "# mds-emoji\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-emoji>` web component renders one of the Magma Design System's animated mascot illustrations (`mia` or `simi`) as an interactive SVG. It is a decorative, expressive element with no native HTML equivalent: its personality is driven entirely through imperative animation methods rather than markup or props. The illustrations are drawn in the [Magma Emoji](https://www.figma.com/design/09SuDQMZYyOKGyomr87G9c/Emoji?node-id=0-1&t=U3txjHfdwaMIRRAC-1) Figma file.\n\n#### Semantic Behavior\n\n- **Mouse following**: When started, the emoji tracks the pointer with a 3D head rotation and parallax on each facial part; it is off by default and only reacts after `startFollowMouse()` is called. It turns toward the pointer: the direction is the direction of the pointer from the centre of the emoji, and the turn grows with the distance until the pointer is half the short side of the viewport away, the same at every size of the emoji. An emoji placed in a slot its host renders later, or moved in the page, follows the pointer at its usual speed all the same. When the user prefers reduced motion, neither the pointer tracking nor the blinking moves the face, and the expressions (`agree`, `smile`, `disagree`, `startThinking`) show their face - a smile, a frown, the thinking hand - without moving the head or the features, for as long as they would have lasted.\n- **Single-animation lock**: Only one expression plays at a time - `agree`, `smile`, `disagree`, and `startThinking` take the face over: each stops whatever is playing (a thinking pose included) and starts from the neutral face, so a later call cuts an earlier one short. `startThinking` is a no-op only while the emoji is already thinking.\n- **Promise-based methods**: Every expressive action returns a `Promise<void>` that resolves when its animation finishes, letting callers await one expression before chaining the next.\n- **State restoration**: An expression pauses mouse-following and, when it completes, restarts it if it was on: `startFollowMouse()` called and not stopped by a later `stopFollowMouse()`.\n- **Idle blinking**: `startBlinking()` runs a random blink loop on the eyes; blinks are suppressed while the emoji is busy with another animation.\n\n#### Properties & Visual Configurations\n\nThe only public prop is `name`, which selects the mascot identity. It accepts `'mia'` (the default) or `'simi'`; changing it at runtime swaps the mascot.\n\n#### Other behavioral props\n\nThere are no variant, tone, or size props. The expression is configured imperatively through method calls (`agree`, `smile`, `disagree`, `startThinking` / `stopThinking`, `startBlinking` / `stopBlinking`, `startFollowMouse` / `stopFollowMouse`), and the reach of the mouse following is tuned through the public `--mds-emoji-expression-max-rotation` CSS custom property, and Simi's skin tones through `--mds-emoji-simi-skin`, `--mds-emoji-simi-skin-dark` and `--mds-emoji-simi-skin-light`, rather than through attributes.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-emoji>` 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 Mascot Display\n\nDrop the component anywhere to render the default mascot, Mia. The element is a square and sizes itself to the value applied via CSS `width` / `height` (it has its own default). No props are required for a static illustration.\n\n```html\n<mds-emoji></mds-emoji>\n```\n\n#### Choosing a Mascot with `name`\n\nThe `name` prop selects between the two available mascots. Use `\"mia\"` (default) for the AI-branded identity and `\"simi\"` for the human-like character. Changing `name` at runtime swaps the mascot without a page reload.\n\n```html\n<!-- Mia - the AI mascot (default) -->\n<mds-emoji name=\"mia\"></mds-emoji>\n\n<!-- Simi - the human-like mascot -->\n<mds-emoji name=\"simi\"></mds-emoji>\n```\n\n#### Sizing via CSS\n\nControl the rendered size with CSS `width` and `height` on the host - the SVG fills 100% of the host's box. The component keeps a 1:1 aspect ratio automatically.\n\n```html\n<mds-emoji name=\"mia\" style=\"width: 128px; height: 128px;\"></mds-emoji>\n```\n\n```css\n.mascot-hero mds-emoji {\n  width: 240px;\n  height: 240px;\n}\n```\n\n#### Mouse-Following Interaction\n\nCall `startFollowMouse()` to activate the 3D head-rotation that tracks the pointer. The feature is off by default. Call `stopFollowMouse()` to deactivate it cleanly.\n\n```html\n<mds-emoji id=\"mascot\" name=\"mia\"></mds-emoji>\n\n<script>\n  const emoji = document.querySelector('#mascot');\n  emoji.startFollowMouse();\n\n  // later, e.g. when leaving a focused section:\n  emoji.stopFollowMouse();\n</script>\n```\n\n#### Idle Blinking\n\nStart the automatic random-interval blink loop with `startBlinking()`. The blink is suppressed while another animation owns the eyes and resumes automatically afterwards.\n\n```html\n<mds-emoji id=\"mascot\" name=\"simi\"></mds-emoji>\n\n<script>\n  const emoji = document.querySelector('#mascot');\n  emoji.startBlinking();\n</script>\n```\n\n#### Expressing Agreement or Confirmation\n\nCall `agree()` after a successful form submission or confirmed action. The emoji nods and briefly smiles. The returned `Promise` resolves when the animation completes.\n\n```html\n<mds-emoji id=\"mascot\" name=\"mia\"></mds-emoji>\n<mds-button id=\"save-btn\" label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n\n<script>\n  const emoji = document.querySelector('#mascot');\n  document.querySelector('#save-btn').addEventListener('click', async () => {\n    await fetch('/api/save');\n    emoji.agree();\n  });\n</script>\n```\n\n#### Expressing a Smile\n\nCall `smile()` for lighter positive feedback - a bounce and closed-eyes smile without the full nod. Useful on hover or focus of a featured element.\n\n```html\n<mds-emoji id=\"mascot\" name=\"mia\"></mds-emoji>\n\n<script>\n  const emoji = document.querySelector('#mascot');\n  document.querySelector('.feature-card').addEventListener('mouseenter', () => {\n    emoji.smile();\n  });\n</script>\n```\n\n#### Expressing Disagreement or Errors\n\nCall `disagree()` on validation failure or destructive confirmation. An optional `turnHappyDelay` number (in milliseconds) delays the return to the neutral face - useful when you want the serious expression to linger while an error message is visible.\n\n```html\n<mds-emoji id=\"mascot\" name=\"mia\"></mds-emoji>\n\n<script>\n  const emoji = document.querySelector('#mascot');\n\n  formEl.addEventListener('submit', async (e) => {\n    e.preventDefault();\n    const ok = await submitForm();\n    if (!ok) {\n      emoji.disagree(2000); // stay serious for 2 s while the error banner is visible\n    }\n  });\n</script>\n```\n\n#### Thinking State During Async Operations\n\nCall `startThinking()` while a request is in flight - the emoji raises a thinking hand and shifts its gaze. Call `stopThinking()` when the operation settles. Both methods accept an optional `duration` (seconds) for the transition animation.\n\n```html\n<mds-emoji id=\"mascot\" name=\"mia\"></mds-emoji>\n\n<script>\n  const emoji = document.querySelector('#mascot');\n\n  async function caricaDati() {\n    await emoji.startThinking();\n    const data = await fetch('/api/data').then((r) => r.json());\n    await emoji.stopThinking();\n    return data;\n  }\n</script>\n```\n\n#### Chaining Expressions\n\nBecause every method returns a `Promise<void>`, you can `await` one before triggering the next. Without awaiting they still never overlap, but each call takes the face over and cuts the previous expression short.\n\n```html\n<mds-emoji id=\"mascot\" name=\"simi\"></mds-emoji>\n\n<script>\n  const emoji = document.querySelector('#mascot');\n\n  async function onSave() {\n    await emoji.startThinking(0.4); // mostri caricamento\n    await fetch('/api/salva');\n    await emoji.stopThinking(0.4);\n    await emoji.agree();           // conferma riuscita\n  }\n</script>\n```\n\n#### CSS Customization - Mouse-Follow Rotation\n\nTune how far the head turns toward the pointer with the public `--mds-emoji-expression-max-rotation` custom property on the host or a parent selector, always with an angle unit. The initial value of `16deg` is reasonable for most placements; reduce it for a subtler movement. The follow-mouse durations are not public.\n\n```css\n.mascot-container mds-emoji {\n  --mds-emoji-expression-max-rotation: 10deg;\n}\n```\n\n#### CSS Customization - Mascot Colors\n\nOverride Simi's public skin tones to adapt the character to a custom palette: Simi's skin tones are data, so hex values are fine there. Simi's other colors are not public, and neither are Mia's: they follow the AI accent roles of the theme, so dark mode and named themes keep working.\n\n```css\n/* Theming Simi: a skin tone is the palette of an illustration, not a role */\nmds-emoji[name='simi'] {\n  --mds-emoji-simi-skin: #f5c8a0;\n  --mds-emoji-simi-skin-dark: #c8895e;\n  --mds-emoji-simi-skin-light: #fdebd8;\n}\n```\n\n#### CSS Customization - Parallax Offsets\n\nThe per-layer parallax offsets and the perspective are not public: the component tunes the depth effect of each mascot. To make the movement subtler or more pronounced, set `--mds-emoji-expression-max-rotation` (see above); to flatten the effect entirely, leave mouse following off (the default) or stop it with `stopFollowMouse()`.\n\n```css\n/* Subtle movement for compact placements */\n.compact mds-emoji {\n  --mds-emoji-expression-max-rotation: 6deg;\n}\n\n/* Pronounced movement for hero sections */\n.hero mds-emoji {\n  --mds-emoji-expression-max-rotation: 24deg;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-emoji>`. 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 an Unknown `name` Value\n\nOnly `\"mia\"` and `\"simi\"` are valid values for the `name` prop. Any other string falls outside the `EmojiNames` type and is ignored with a console warning: on load no mascot is rendered, after load the mascot on screen stays.\n\n```html\n<!-- INCORRECT -->\n<mds-emoji name=\"luigi\"></mds-emoji>\n<mds-emoji name=\"robot\"></mds-emoji>\n\n<!-- CORRECT -->\n<mds-emoji name=\"mia\"></mds-emoji>\n<mds-emoji name=\"simi\"></mds-emoji>\n```\n\n#### Do Not Put Content in the Component - It Has No Slots\n\n`<mds-emoji>` renders a self-contained SVG through its shadow root and exposes no slots. Any child nodes placed between the tags are ignored entirely.\n\n```html\n<!-- INCORRECT -->\n<mds-emoji name=\"mia\">\n  <span>Ciao!</span>\n</mds-emoji>\n\n<!-- CORRECT - place sibling elements outside the component -->\n<div class=\"mascot-wrapper\">\n  <mds-emoji name=\"mia\"></mds-emoji>\n  <p>Ciao!</p>\n</div>\n```\n\n#### Do Not Trigger Expressions Without Awaiting a Running Animation\n\n`agree()`, `smile()`, `disagree()`, and `startThinking()` each take the face over: they stop whatever is playing (a thinking pose included) and start from the neutral face. Firing them without awaiting the previous call cuts the earlier expression short.\n\n```html\n<!-- INCORRECT - the second call cuts the first one short -->\n<script>\n  emoji.startThinking(); // starts thinking\n  emoji.agree();         // takes over: the thinking pose is dropped at once\n</script>\n\n<!-- CORRECT - await each expression before chaining the next -->\n<script type=\"module\">\n  const emoji = document.querySelector('mds-emoji');\n  await emoji.startThinking(0.5);\n  await fetch('/api/salva');\n  await emoji.stopThinking(0.5);\n  await emoji.agree();\n</script>\n```\n\n#### Do Not Use `stopThinking()` to Cancel Mid-Expression\n\n`stopThinking()` is the paired counterpart to `startThinking()`. Calling it to interrupt `agree()`, `smile()`, or `disagree()` has no effect: `stopThinking()` returns at once unless the emoji is thinking. An expression runs to completion unless another expression takes the face over.\n\n```html\n<!-- INCORRECT - stopThinking() won't cut short an agree() animation -->\n<script>\n  emoji.agree();\n  emoji.stopThinking(); // no-op\n</script>\n\n<!-- CORRECT - let the animation complete (await it), or accept that expressions run to completion -->\n<script type=\"module\">\n  const emoji = document.querySelector('mds-emoji');\n  await emoji.agree();\n  // now the emoji is idle and ready for the next call\n</script>\n```\n\n#### Do Not Pierce Shadow DOM to Animate SVG Parts Directly\n\nThe internal SVG elements (eyes, mouth, head, etc.) are part of the shadow DOM and are managed by GSAP inside the component. Querying them from outside and applying CSS transforms or animations creates conflicting tweens and breaks the component's state machine.\n\n```css\n/* INCORRECT */\nmds-emoji >>> #eyes-default {\n  transform: scaleY(0.5);\n}\n```\n\n```html\n<!-- CORRECT - use the documented imperative methods instead -->\n<script>\n  const emoji = document.querySelector('mds-emoji');\n  emoji.startBlinking(); // let the component own eye animations\n</script>\n```\n\n#### Do Not Set `--mds-emoji-expression-max-rotation` Without an Angle Unit\n\n`--mds-emoji-expression-max-rotation` is declared as `<angle>`. A bare number is invalid and the property falls back to the initial value of `16deg`, so the constraint you intended is silently ignored.\n\n```css\n/* INCORRECT */\nmds-emoji {\n  --mds-emoji-expression-max-rotation: 8;\n}\n\n/* CORRECT */\nmds-emoji {\n  --mds-emoji-expression-max-rotation: 8deg;\n}\n```\n"
      },
      "props": [
        {
          "name": "name",
          "type": "\"mia\" | \"simi\"",
          "complexType": {
            "original": "EmojiNames",
            "resolved": "\"mia\" | \"simi\"",
            "references": {
              "EmojiNames": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-emoji/meta/types.ts::EmojiNames",
                "referenceLocation": "EmojiNames"
              }
            }
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Specifies which emoji to display.",
          "docsTags": [
            {
              "name": "default",
              "text": "'mia'"
            }
          ],
          "default": "'mia'",
          "values": [
            {
              "value": "mia",
              "type": "string"
            },
            {
              "value": "simi",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "agree",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "agree() => Promise<void>",
          "parameters": [],
          "docs": "Emoji agrees, useful for confirm actions.",
          "docsTags": []
        },
        {
          "name": "disagree",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(turnHappyDelay?: number) => Promise<void>",
            "parameters": [
              {
                "name": "turnHappyDelay",
                "type": "number",
                "docs": "how long the mouth stays serious after the head shake, in\nmilliseconds; 0 brings the smile back at once"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "disagree(turnHappyDelay?: number) => Promise<void>",
          "parameters": [
            {
              "name": "turnHappyDelay",
              "type": "number",
              "docs": "how long the mouth stays serious after the head shake, in\nmilliseconds; 0 brings the smile back at once"
            }
          ],
          "docs": "Emoji disagrees, useful for errors or unwanted results.",
          "docsTags": [
            {
              "name": "param",
              "text": "turnHappyDelay how long the mouth stays serious after the head shake, in\nmilliseconds; 0 brings the smile back at once"
            }
          ]
        },
        {
          "name": "smile",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "smile() => Promise<void>",
          "parameters": [],
          "docs": "Emoji smiles, useful for confirm actions.",
          "docsTags": []
        },
        {
          "name": "startBlinking",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "startBlinking() => Promise<void>",
          "parameters": [],
          "docs": "Eyes start blinking.",
          "docsTags": []
        },
        {
          "name": "startFollowMouse",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "startFollowMouse() => Promise<void>",
          "parameters": [],
          "docs": "Starts following mouse with CSS 3D transform.",
          "docsTags": []
        },
        {
          "name": "startThinking",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(duration?: number) => Promise<void>",
            "parameters": [
              {
                "name": "duration",
                "type": "number",
                "docs": "the duration of the entrance of the hand, in seconds"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "startThinking(duration?: number) => Promise<void>",
          "parameters": [
            {
              "name": "duration",
              "type": "number",
              "docs": "the duration of the entrance of the hand, in seconds"
            }
          ],
          "docs": "Emoji starts thinking, useful for pending requests.",
          "docsTags": [
            {
              "name": "param",
              "text": "duration the duration of the entrance of the hand, in seconds"
            }
          ]
        },
        {
          "name": "stopBlinking",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "stopBlinking() => Promise<void>",
          "parameters": [],
          "docs": "Eyes stop blinking.",
          "docsTags": []
        },
        {
          "name": "stopFollowMouse",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "stopFollowMouse() => Promise<void>",
          "parameters": [],
          "docs": "Stops following mouse with CSS 3D transform.",
          "docsTags": []
        },
        {
          "name": "stopThinking",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(duration?: number) => Promise<void>",
            "parameters": [
              {
                "name": "duration",
                "type": "number",
                "docs": "the animation duration, in seconds"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "stopThinking(duration?: number) => Promise<void>",
          "parameters": [
            {
              "name": "duration",
              "type": "number",
              "docs": "the animation duration, in seconds"
            }
          ],
          "docs": "Stops the \"thinking\" animation after the given duration.",
          "docsTags": [
            {
              "name": "param",
              "text": "duration the animation duration, in seconds"
            }
          ]
        }
      ],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-emoji-expression-follow-mouse-head-duration",
          "annotation": "prop",
          "docs": "Sets the duration for the head to follow the mouse",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-expression-follow-mouse-traits-duration",
          "annotation": "prop",
          "docs": "Sets the duration for facial traits to follow the mouse",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-expression-max-rotation",
          "annotation": "prop",
          "docs": "Sets the maximum rotation angle for the emoji expression",
          "visibility": "public"
        },
        {
          "name": "--mds-emoji-mia-eyes-color",
          "annotation": "prop",
          "docs": "Sets the color of Mia's eyes",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-mia-hands-color",
          "annotation": "prop",
          "docs": "Sets the color of Mia's hands",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-mia-head-color",
          "annotation": "prop",
          "docs": "Sets the color of Mia's head",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-mia-head-stroke-color",
          "annotation": "prop",
          "docs": "Sets the stroke color of Mia's head",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-mia-head-stroke-width",
          "annotation": "prop",
          "docs": "Sets the stroke width of Mia's head",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-mia-mouth-color",
          "annotation": "prop",
          "docs": "Sets the color of Mia's mouth",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-offset-ears",
          "annotation": "prop",
          "docs": "Sets the positional offset for the ears",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-offset-eyebrows",
          "annotation": "prop",
          "docs": "Sets the positional offset for eyebrows",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-offset-eyes",
          "annotation": "prop",
          "docs": "Sets the positional offset for eyes",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-offset-gadget",
          "annotation": "prop",
          "docs": "Sets the positional offset for gadgets",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-offset-hands",
          "annotation": "prop",
          "docs": "Sets the positional offset for the hands",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-offset-head",
          "annotation": "prop",
          "docs": "Sets the positional offset for the head",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-offset-mouth",
          "annotation": "prop",
          "docs": "Sets the positional offset for the mouth",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-perspective",
          "annotation": "prop",
          "docs": "Sets the perspective distance for 3D transformations of the emoji",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-eye",
          "annotation": "prop",
          "docs": "Sets the color of Simi's eyes",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-eye-light",
          "annotation": "prop",
          "docs": "Sets the light color of Simi's eyes",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-eyebrow",
          "annotation": "prop",
          "docs": "Sets the color of Simi's eyebrows",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-gadget",
          "annotation": "prop",
          "docs": "Sets the color of Simi's gadget",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-mouth",
          "annotation": "prop",
          "docs": "Sets the color of Simi's mouth",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-mouth-teeth",
          "annotation": "prop",
          "docs": "Sets the color of Simi's teeth",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-mouth-throat",
          "annotation": "prop",
          "docs": "Sets the color of Simi's throat",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-nose",
          "annotation": "prop",
          "docs": "Sets the color of Simi's nose",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-nose-light",
          "annotation": "prop",
          "docs": "Sets the light color of Simi's nose",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-outline",
          "annotation": "prop",
          "docs": "Sets the color of Simi's outline",
          "visibility": "internal"
        },
        {
          "name": "--mds-emoji-simi-skin",
          "annotation": "prop",
          "docs": "Sets the base color of Simi's skin",
          "visibility": "public",
          "static": true
        },
        {
          "name": "--mds-emoji-simi-skin-dark",
          "annotation": "prop",
          "docs": "Sets the dark shade of Simi's skin",
          "visibility": "public",
          "static": true
        },
        {
          "name": "--mds-emoji-simi-skin-light",
          "annotation": "prop",
          "docs": "Sets the light shade of Simi's skin",
          "visibility": "public",
          "static": true
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-emoji--docs"
    },
    {
      "filePath": "src/components/mds-entity/mds-entity.tsx",
      "encapsulation": "shadow",
      "tag": "mds-entity",
      "readme": "# mds-entity\n\n\n\nThis 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.\n",
      "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": "slot",
          "text": "action - Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "slot",
          "text": "detail - Add `HTML elements` or `components` to this slot."
        },
        {
          "name": "part",
          "text": "spinner - The spinner element"
        },
        {
          "name": "part",
          "text": "avatar - The avatar element"
        },
        {
          "name": "part",
          "text": "infos - The column that stacks the name (default slot) and the `detail` row"
        },
        {
          "name": "category",
          "text": "data"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-entity>` web component represents a person, organization, or resource as a compact identity block in the Magma Design System, pairing an avatar with a name, optional secondary details, and contextual actions. It has no native HTML equivalent; it standardises how entities are surfaced in lists, headers, and cards.\n\n#### Semantic Behavior\n\n- **Avatar resolution**: The leading avatar renders only when one of `src`, `icon`, or `initials` is provided. The inner `mds-avatar` resolves a combination pairwise: `icon` hides the `src` image, `initials` hide the `icon`, `src` hides the `initials`, and with all three set it shows none of them.\n- **Await state**: While `await` is set the avatar is suppressed and a spinner is shown in its place, signalling that the entity is still loading.\n- **Conditional regions**: The `detail` and `action` regions are shown only while content is projected into those slots, also when it is added after the first render.\n- **Default slot is the name**: The default slot carries the entity's primary label (text, HTML, or components) and is always rendered inside the info column (the `infos` part), above the `detail` row.\n\n#### Properties & Visual Configurations\n\n- **`src`** is the path to an entity image; **`icon`** is a Magma icon library slug; **`initials`** is the text shown when no image or icon fits. Provide only the one that best identifies the entity - they are not combined.\n- **`await`** marks the entity as loading and takes visual precedence over any avatar source.\n\nThe shared `tone` / `variant` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md) and color the inner avatar. `tone` is limited to the minimal `'strong'` / `'weak'` pair, and `variant` accepts the avatar colour set; pick them to colour the avatar chip in line with the entity's category. With `initials` the avatar derives its colour from the letters and ignores `variant`.\n\n#### Slots\n\n- **`detail`** holds secondary information (role, email, status) rendered beneath the name.\n- **`action`** holds trailing controls; `mds-button` is the recommended element here.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-entity>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Person Entity with Image\n\nThe most common form. Supply `src` for the avatar image and put the entity name in the default slot. Use `<mds-text>` with `typography=\"h6\"` for the primary label so typography tokens are applied consistently.\n\n```html\n<mds-entity src=\"/avatars/mario-rossi.png\">\n  <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Entity with Initials Fallback\n\nWhen no image is available, provide `initials` instead of `src`. The avatar chip renders the initials text.\n\n```html\n<mds-entity initials=\"mr\">\n  <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Entity with Icon\n\nUse `icon` for non-person entities (locations, files, organizations). Reference icons by their slug from the Magma icon library.\n\n```html\n<mds-entity icon=\"mi/baseline/location-on\">\n  <mds-text truncate=\"word\" typography=\"h6\">Maggioli Headquarters</mds-text>\n</mds-entity>\n```\n\n#### Secondary Details via `detail` Slot\n\nProject additional information (role, email, status) into the `detail` slot. It renders below the primary name in a subdued color. Use `<mds-text typography=\"caption\">` for plain text details.\n\n```html\n<mds-entity src=\"/avatars/giulia-bianchi.png\">\n  <mds-text truncate=\"word\" typography=\"h6\">Giulia Bianchi</mds-text>\n  <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">giulia@example.com</mds-text>\n  <mds-badge slot=\"detail\" variant=\"success\" tone=\"weak\" label=\"Attiva\"></mds-badge>\n</mds-entity>\n```\n\n#### Trailing Action Buttons via `action` Slot\n\nUse the `action` slot for icon-only `<mds-button>` elements. Each button is sized and spaced automatically by the component. Always provide `title` on icon-only buttons for accessibility.\n\n```html\n<mds-entity src=\"/avatars/luca-verdi.png\">\n  <mds-text truncate=\"word\" typography=\"h6\">Luca Verdi</mds-text>\n  <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">luca@example.com</mds-text>\n  <mds-button slot=\"action\" icon=\"mdi/pencil\" variant=\"primary\" tone=\"strong\" title=\"Modifica\"></mds-button>\n  <mds-button slot=\"action\" icon=\"mdi/delete\" variant=\"error\" tone=\"strong\" title=\"Elimina\"></mds-button>\n</mds-entity>\n```\n\n#### Colored Avatar with `variant` and `tone`\n\nPair `variant` and `tone` to color the avatar chip by entity category. `tone` is limited to `strong` and `weak`; `variant` accepts the full avatar color set.\n\n```html\n<!-- Strong fill, primary variant -->\n<mds-entity icon=\"mi/baseline/business\" variant=\"primary\" tone=\"strong\">\n  <mds-text truncate=\"word\" typography=\"h6\">Divisione Commerciale</mds-text>\n</mds-entity>\n\n<!-- Weak tint, warning variant -->\n<mds-entity icon=\"mi/baseline/warning\" variant=\"warning\" tone=\"weak\">\n  <mds-text truncate=\"word\" typography=\"h6\">Alert configurazione</mds-text>\n</mds-entity>\n```\n\n#### Await / Loading State\n\nSet the `await` boolean attribute while the entity data is being fetched. The avatar is hidden and a spinner appears in its place. Remove the attribute when loading is complete - do not set `await=\"false\"`.\n\n```html\n<mds-entity await icon=\"mi/baseline/done\" variant=\"success\">\n  <mds-text truncate=\"word\" typography=\"h6\">Caricamento in corso...</mds-text>\n  <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">Attendere prego</mds-text>\n</mds-entity>\n```\n\n#### Upload / Async Workflow\n\nCombine `await` with `icon` and `variant` to drive a state machine: show the spinner while uploading, then reveal the result icon when done.\n\n```html\n<!-- While uploading -->\n<mds-entity await>\n  <mds-text truncate=\"word\" typography=\"h6\">Report finanziario 2024.docx</mds-text>\n  <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">Upload in corso...</mds-text>\n  <mds-button slot=\"action\" icon=\"mi/baseline/cancel\" variant=\"light\" title=\"Annulla upload\"></mds-button>\n</mds-entity>\n\n<!-- After success -->\n<mds-entity icon=\"mi/baseline/done\" variant=\"success\" tone=\"weak\">\n  <mds-text truncate=\"word\" typography=\"h6\">Report finanziario 2024.docx</mds-text>\n  <mds-text truncate=\"word\" slot=\"detail\" typography=\"caption\">Upload completato con successo</mds-text>\n</mds-entity>\n```\n\n#### Styling Customization\n\nStyle the entity only through its public `--mds-entity-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working. The avatar takes its colours from `variant` and `tone`, not from a custom property.\n\n```css\n.entity-highlight mds-entity {\n  --mds-entity-background: rgb(var(--magma-accent-surface));\n  --mds-entity-color: rgb(var(--magma-accent-fg));\n}\n```\n\n#### Spacing Between the Name and the Details\n\nThe name and the `detail` row stack in the `infos` part, 2px apart, so a badge or a caption in `detail` never touches the name. When a layout needs more room between them, set the gap of the part; the nodes inside it are not API.\n\n```css\n.entity-roomy mds-entity::part(infos) {\n  gap: calc(var(--spacing) * 100);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-entity>`. 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 Put the Name as a Plain Text String in the Default Slot\n\nThe default slot accepts HTML elements and components, and the component applies truncation to slotted nodes. Passing a bare string bypasses `<mds-text>` typography tokens and truncation utilities; the result may overflow or render with inconsistent styles.\n\n```html\n<!-- INCORRECT -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n  Mario Rossi\n</mds-entity>\n\n<!-- CORRECT -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n  <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Do Not Use `await=\"false\"` to Cancel the Loading State\n\n`await` is a boolean attribute: turn it off by removing it (or setting the prop to `undefined`), as for every boolean ([`agents/mistakes.md`](../../../../agents/mistakes.md)). The runtime happens to read the string `\"false\"` as `false`, but the attribute stays in the markup until the component renders, and HTML, `[await]` selectors and `hasAttribute()` read a present attribute as set.\n\n```html\n<!-- INCORRECT -->\n<mds-entity await=\"false\" src=\"/avatars/mario-rossi.png\">\n  <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n\n<!-- CORRECT -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n  <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Do Not Put Non-Button Elements in the `action` Slot\n\nThe `action` slot is sized and spaced for icon-only `<mds-button>` elements. Projecting arbitrary elements (raw `<button>`, `<a>`, large widgets) breaks the fixed square dimensions applied by `::slotted([slot='action'])`.\n\n```html\n<!-- INCORRECT -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n  <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n  <button slot=\"action\">Modifica</button>\n</mds-entity>\n\n<!-- CORRECT -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n  <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n  <mds-button slot=\"action\" icon=\"mdi/pencil\" variant=\"primary\" tone=\"strong\" title=\"Modifica\"></mds-button>\n</mds-entity>\n```\n\n#### Do Not Combine `src`, `icon`, and `initials` Expecting All Three to Show\n\nThe component resolves to a single avatar representation. Setting all three does not create a layered avatar: the inner `mds-avatar` lets `icon` hide the image, `initials` hide the icon and `src` hide the initials, so the chip renders none of them.\n\n```html\n<!-- INCORRECT (expects image, icon, and initials to all appear) -->\n<mds-entity src=\"/avatars/mario-rossi.png\" icon=\"mi/baseline/person\" initials=\"mr\">\n  <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n\n<!-- CORRECT - provide the most specific source available -->\n<mds-entity src=\"/avatars/mario-rossi.png\">\n  <mds-text truncate=\"word\" typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n```\n\n#### Do Not Apply an Invalid `tone` Value\n\n`<mds-entity>` uses `ToneMinimalVariantType`, which accepts only `strong` and `weak`. Passing other tone values like `outline` or `text` is a type error and is silently ignored: the avatar renders with the `strong` colours.\n\n```html\n<!-- INCORRECT -->\n<mds-entity icon=\"mi/baseline/business\" variant=\"primary\" tone=\"outline\">\n  <mds-text truncate=\"word\" typography=\"h6\">Divisione Commerciale</mds-text>\n</mds-entity>\n\n<!-- CORRECT -->\n<mds-entity icon=\"mi/baseline/business\" variant=\"primary\" tone=\"strong\">\n  <mds-text truncate=\"word\" typography=\"h6\">Divisione Commerciale</mds-text>\n</mds-entity>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Avatar\n\nThe component exposes a `::part(avatar)` surface for styling the inner `<mds-avatar>`, but the part is the limit: the nodes inside it are not API. Color the avatar with the `variant` and `tone` props, and the entity with its public `--mds-entity-background` and `--mds-entity-color` custom properties; do not target undocumented internals.\n\n```css\n/* INCORRECT */\nmds-entity::part(avatar) .inner-circle {\n  background: hotpink;\n}\nmds-entity >>> mds-avatar {\n  width: 80px;\n}\n\n/* CORRECT */\nmds-entity {\n  --mds-entity-background: rgb(var(--magma-accent-surface));\n  --mds-entity-color: rgb(var(--magma-accent-fg));\n}\n```\n\n```html\n<!-- CORRECT -->\n<mds-entity icon=\"mi/baseline/business\" variant=\"primary\" tone=\"weak\">\n  <mds-text truncate=\"word\" typography=\"h6\">Divisione Commerciale</mds-text>\n</mds-entity>\n```\n"
      },
      "props": [
        {
          "name": "await",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "await",
          "reflectToAttr": true,
          "docs": "Specifies if the component is awaiting a response from an external resource",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "Specifies the icon to be displayed if src propery is not used",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "initials",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "initials",
          "reflectToAttr": true,
          "docs": "The user's inizials displayed if there's no image available and icon is not set",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "src",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "src",
          "reflectToAttr": true,
          "docs": "Specifies the path to the image",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"strong\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneMinimalVariantType",
            "resolved": "\"strong\" | \"weak\" | undefined",
            "references": {
              "ToneMinimalVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneMinimalVariantType",
                "referenceLocation": "ToneMinimalVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Specifies the color tone of the component",
          "docsTags": [],
          "values": [
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
          "complexType": {
            "original": "ThemeFullVariantAvatarType",
            "resolved": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
            "references": {
              "ThemeFullVariantAvatarType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeFullVariantAvatarType",
                "referenceLocation": "ThemeFullVariantAvatarType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the color variant of the component",
          "docsTags": [],
          "values": [
            {
              "value": "amaranth",
              "type": "string"
            },
            {
              "value": "aqua",
              "type": "string"
            },
            {
              "value": "blue",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "green",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "lime",
              "type": "string"
            },
            {
              "value": "orange",
              "type": "string"
            },
            {
              "value": "orchid",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "purple",
              "type": "string"
            },
            {
              "value": "red",
              "type": "string"
            },
            {
              "value": "sky",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "violet",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "value": "yellow",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-entity-background",
          "annotation": "prop",
          "docs": "The background-color of the entity",
          "visibility": "public"
        },
        {
          "name": "--mds-entity-color",
          "annotation": "prop",
          "docs": "The color of the entity name",
          "visibility": "public"
        },
        {
          "name": "--mds-entity-detail-color",
          "annotation": "prop",
          "docs": "The color of the text details",
          "visibility": "internal"
        },
        {
          "name": "--mds-entity-icon-background",
          "annotation": "prop",
          "docs": "The background-color of the icon",
          "visibility": "internal"
        },
        {
          "name": "--mds-entity-icon-color",
          "annotation": "prop",
          "docs": "The color of the icon",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "action",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "detail",
          "docs": "Add `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "avatar",
          "docs": "The avatar element"
        },
        {
          "name": "infos",
          "docs": "The column that stacks the name (default slot) and the `detail` row"
        },
        {
          "name": "spinner",
          "docs": "The spinner element"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-spinner",
        "mds-avatar"
      ],
      "dependencyGraph": {
        "mds-entity": [
          "mds-spinner",
          "mds-avatar"
        ],
        "mds-avatar": [
          "mds-img",
          "mds-icon"
        ],
        "mds-img": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-entity--docs"
    },
    {
      "filePath": "src/components/mds-file/mds-file.tsx",
      "encapsulation": "shadow",
      "tag": "mds-file",
      "readme": "# mds-file\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-file>` web component is the Magma Design System control for representing a downloadable file as a rich, clickable card. It pairs a filename with an auto-detected file-type icon, badge, and human-readable description, and tracks whether the file has already been downloaded.\n\n#### Semantic Behavior\n\n- **Clickable card**: The whole host is a button (`role=\"button\"`, unless you set another role) in the tab order: a click, Enter or Space emits `mdsFileDownload`; the component itself does not fetch or download - the consumer wires the actual download to that event.\n- **Download event payload**: `mdsFileDownload` carries `description` (the `description` prop, or else the description of the detected type in the page language, the text the card shows), `extension` (empty for a filename without one), `filename`, the host element as `target`, and the detected `type`/format.\n- **Downloaded persistence**: On click the component records the file as downloaded in `localStorage`, under a key derived from the filename with a small non-cryptographic hash. Every later render of the same filename on the same origin shows the \"done\" indicator.\n- **Automatic file-type recognition**: From `filename` it derives the format icon, badge variant, and default description; `suffix` overrides this detection.\n- **Localization**: Descriptions and the \"already downloaded\" tooltip are resolved against the active locale.\n\n#### Properties & Visual Configurations\n\n- **`filename`** is the primary input: it provides the displayed title and drives icon, badge, suffix, and description detection. The name and extension are rendered separately, split at the last dot so the dots inside the name are kept (`report.v2.final.docx` shows `report.v2.final` and `.docx`; a leading dot belongs to the name, as in `.env`); the extension is shown only when not explicitly overridden by `suffix`, and a filename without one shows no extension and no badge.\n- **`suffix`** forces a specific file type from the supported format set when the filename's extension is missing or wrong; it bypasses automatic recognition.\n- **`description`** overrides the derived, localized file-type description when a custom label is needed.\n- **`preview`** supplies an image URL (logo or thumbnail) rendered as the preview surface instead of the generic format icon - use it when a meaningful visual of the file exists.\n- **`hideDownloadedIcon`** (default `false`) suppresses the persisted \"already downloaded\" indicator; set it when that affordance is not appropriate.\n- **`format`** is normally populated by the component itself from detection rather than set by the consumer.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-file>` 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 File Card\n\nThe minimal form. Pass `filename` with a real filename (including extension) and the component auto-detects the format icon, badge color, and localized description.\n\n```html\n<mds-file filename=\"relazione-annuale.pdf\"></mds-file>\n```\n\n#### Handling the Download Event\n\nThe component does not fetch or download anything by itself. Listen for `mdsFileDownload` and trigger the actual download in the event handler. The event detail carries `filename`, `extension`, `type`, `description`, and `target`.\n\n```html\n<mds-file filename=\"contratto-servizio.docx\" id=\"file-card\"></mds-file>\n\n<script>\n  document.getElementById('file-card').addEventListener('mdsFileDownload', (event) => {\n    const { filename, extension, type } = event.detail;\n    console.log(`Download avviato: ${filename} (${type})`);\n    // avvia il download effettivo dal server\n  });\n</script>\n```\n\n#### Forcing a File Type with `suffix`\n\nWhen the filename lacks an extension or carries a misleading one, use `suffix` to force a specific format from the supported set.\n\n```html\n<!-- filename senza estensione - forza il riconoscimento come PDF -->\n<mds-file filename=\"documento-firmato\" suffix=\"pdf\"></mds-file>\n\n<!-- estensione sconosciuta - forzata come archivio ZIP -->\n<mds-file filename=\"backup.bkp\" suffix=\"zip\"></mds-file>\n```\n\n#### Custom Description\n\nOverride the localized auto-generated description with a specific label relevant to the document context. Use `description` when the default type label (e.g. \"Documento Adobe\" for a PDF) is not informative enough.\n\n```html\n<mds-file\n  filename=\"verbale-cda-2024.pdf\"\n  description=\"Verbale approvato dal Consiglio di Amministrazione\"\n></mds-file>\n```\n\n#### Image Preview\n\nProvide `preview` with an image URL when a meaningful visual thumbnail is available - a logo, a reduced version of an image file, or a document cover. The preview replaces the generic format icon in the left panel.\n\n```html\n<mds-file\n  filename=\"logo-aziendale.png\"\n  preview=\"https://cdn.example.com/thumbnails/logo-aziendale-128.png\"\n></mds-file>\n```\n\n#### Hiding the \"Already Downloaded\" Indicator\n\nThe component shows a \"done\" indicator once the file has been downloaded, on every later render of the same filename. Add `hide-downloaded-icon` to suppress it when the affordance is not appropriate for the context (e.g. a list where every file is always shown as fresh).\n\n```html\n<mds-file filename=\"modulo-richiesta.xlsx\" hide-downloaded-icon></mds-file>\n```\n\nNote: this is the only valid way to turn the indicator off. Magma 1 used `show-downloaded-icon=\"false\"`; that prop no longer exists (the codemod turns it into `hide-downloaded-icon`).\n\n#### Rendering a List of Files\n\nPlace multiple `<mds-file>` cards inside a container and attach a single delegated event listener when the file list is dynamic.\n\n```html\n<div class=\"file-list\">\n  <mds-file filename=\"allegato-1.pdf\"></mds-file>\n  <mds-file filename=\"allegato-2.docx\"></mds-file>\n  <mds-file filename=\"allegato-3.xlsx\"></mds-file>\n</div>\n\n<script>\n  document.querySelector('.file-list').addEventListener('mdsFileDownload', (event) => {\n    const { filename } = event.detail;\n    avviaDownload(filename);\n  });\n</script>\n```\n\n#### Styling Customization\n\nStyle the preview panel only through its public `--mds-file-preview-color` CSS custom property. Use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.archivio-documenti mds-file {\n  --mds-file-preview-color: rgb(var(--magma-accent-fg));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-file>`. 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 Expect the Component to Perform the Download\n\n`<mds-file>` is a display card, not a download trigger: it has no `href`. It emits `mdsFileDownload` and the consumer must wire the actual download logic to that event.\n\n```html\n<!-- INCORRECT - expecting the component to handle the download itself -->\n<mds-file filename=\"report.pdf\" href=\"/files/report.pdf\"></mds-file>\n\n<!-- CORRECT - consumer listens to the event and handles the download -->\n<mds-file filename=\"report.pdf\" id=\"card-report\"></mds-file>\n\n<script>\n  document.getElementById('card-report').addEventListener('mdsFileDownload', (e) => {\n    window.location.href = '/files/' + e.detail.filename;\n  });\n</script>\n```\n\n#### Do Not Set `format` Manually\n\n`format` is an internal reflected attribute automatically derived from the filename and suffix. Setting it directly has no guaranteed effect because the component overwrites it during `componentWillLoad` and on every `filename` change. Use `suffix` to control type detection.\n\n```html\n<!-- INCORRECT -->\n<mds-file filename=\"archivio\" format=\"document\"></mds-file>\n\n<!-- CORRECT - use suffix to override file-type detection -->\n<mds-file filename=\"archivio\" suffix=\"pdf\"></mds-file>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Preview Panel\n\nThe supported customization surface is the public `--mds-file-preview-color` CSS custom property. Targeting internal elements with `>>>`, `/deep/`, or undocumented selectors couples your code to the Shadow DOM structure and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-file >>> .preview {\n  background-color: blue;\n}\n\n/* CORRECT */\nmds-file {\n  --mds-file-preview-color: rgb(var(--magma-accent-fg));\n}\n```\n\n#### Do Not Wrap `<mds-file>` in a Native Anchor or Button\n\nThe host is already focusable (`tabindex=\"0\"`) and emits its own interaction event. Wrapping it in `<a>` or `<button>` creates nested interactive controls and breaks keyboard semantics.\n\n```html\n<!-- INCORRECT -->\n<a href=\"/download/report.pdf\">\n  <mds-file filename=\"report.pdf\"></mds-file>\n</a>\n\n<!-- CORRECT - use the mdsFileDownload event to trigger navigation or download -->\n<mds-file filename=\"report.pdf\" id=\"file-report\"></mds-file>\n\n<script>\n  document.getElementById('file-report').addEventListener('mdsFileDownload', () => {\n    window.location.href = '/download/report.pdf';\n  });\n</script>\n```\n\n#### Do Not Use a Raw `<div>` or `<li>` as a File Row When `<mds-file>` Exists\n\n`<mds-file>` handles format detection, theming, accessibility focus, download persistence, and localization. Rolling a custom file row loses all of these affordances.\n\n```html\n<!-- INCORRECT -->\n<div class=\"file-row\" onclick=\"download('report.pdf')\">\n  <img src=\"pdf-icon.svg\" alt=\"PDF\" />\n  <span>report.pdf</span>\n</div>\n\n<!-- CORRECT -->\n<mds-file filename=\"report.pdf\"></mds-file>\n```\n"
      },
      "props": [
        {
          "name": "description",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "description",
          "reflectToAttr": false,
          "docs": "Overrides the default filetype description",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "filename",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "filename",
          "reflectToAttr": false,
          "docs": "The filename shown as component title, is used to auto assign one of the filetype known in the filetype dictionary",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "format",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "format",
          "reflectToAttr": true,
          "docs": "The kind of file, recognised from the extension of `filename` or from `suffix`: it selects\nthe colours of the icon. The component writes it on load and whenever `filename` changes,\nset `suffix` to choose it",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hideDownloadedIcon",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-downloaded-icon",
          "reflectToAttr": false,
          "docs": "Hides the download icon",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "preview",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "preview",
          "reflectToAttr": false,
          "docs": "The image preview src if available of a file, useful if you have a logo to display, or a smaller version of a bigger image",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "suffix",
          "type": "\"7z\" | \"ace\" | \"ai\" | \"db\" | \"default\" | \"dmg\" | \"doc\" | \"docm\" | \"docx\" | \"eml\" | \"eps\" | \"exe\" | \"flac\" | \"gif\" | \"heic\" | \"htm\" | \"html\" | \"jpe\" | \"jpeg\" | \"jpg\" | \"js\" | \"json\" | \"jsx\" | \"m2v\" | \"mp2\" | \"mp3\" | \"mp4\" | \"mp4v\" | \"mpeg\" | \"mpg\" | \"mpg4\" | \"mpga\" | \"odf\" | \"odp\" | \"ods\" | \"odt\" | \"ole\" | \"p7m\" | \"pdf\" | \"php\" | \"png\" | \"ppt\" | \"rar\" | \"rtf\" | \"sass\" | \"shtml\" | \"svg\" | \"tar\" | \"tiff\" | \"ts\" | \"tsd\" | \"txt\" | \"wav\" | \"webp\" | \"xar\" | \"xls\" | \"xlsx\" | \"xml\" | \"zip\" | undefined",
          "complexType": {
            "original": "ExtensionSuffixType",
            "resolved": "\"7z\" | \"ace\" | \"ai\" | \"db\" | \"default\" | \"dmg\" | \"doc\" | \"docm\" | \"docx\" | \"eml\" | \"eps\" | \"exe\" | \"flac\" | \"gif\" | \"heic\" | \"htm\" | \"html\" | \"jpe\" | \"jpeg\" | \"jpg\" | \"js\" | \"json\" | \"jsx\" | \"m2v\" | \"mp2\" | \"mp3\" | \"mp4\" | \"mp4v\" | \"mpeg\" | \"mpg\" | \"mpg4\" | \"mpga\" | \"odf\" | \"odp\" | \"ods\" | \"odt\" | \"ole\" | \"p7m\" | \"pdf\" | \"php\" | \"png\" | \"ppt\" | \"rar\" | \"rtf\" | \"sass\" | \"shtml\" | \"svg\" | \"tar\" | \"tiff\" | \"ts\" | \"tsd\" | \"txt\" | \"wav\" | \"webp\" | \"xar\" | \"xls\" | \"xlsx\" | \"xml\" | \"zip\" | undefined",
            "references": {
              "ExtensionSuffixType": {
                "location": "import",
                "path": "@type/file-types",
                "id": "src/type/file-types.ts::ExtensionSuffixType",
                "referenceLocation": "ExtensionSuffixType"
              }
            }
          },
          "mutable": false,
          "attr": "suffix",
          "reflectToAttr": true,
          "docs": "Overrides the automatic filetype recongition by forcing the suffix to one of the available formats choosen",
          "docsTags": [],
          "values": [
            {
              "value": "7z",
              "type": "string"
            },
            {
              "value": "ace",
              "type": "string"
            },
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "db",
              "type": "string"
            },
            {
              "value": "default",
              "type": "string"
            },
            {
              "value": "dmg",
              "type": "string"
            },
            {
              "value": "doc",
              "type": "string"
            },
            {
              "value": "docm",
              "type": "string"
            },
            {
              "value": "docx",
              "type": "string"
            },
            {
              "value": "eml",
              "type": "string"
            },
            {
              "value": "eps",
              "type": "string"
            },
            {
              "value": "exe",
              "type": "string"
            },
            {
              "value": "flac",
              "type": "string"
            },
            {
              "value": "gif",
              "type": "string"
            },
            {
              "value": "heic",
              "type": "string"
            },
            {
              "value": "htm",
              "type": "string"
            },
            {
              "value": "html",
              "type": "string"
            },
            {
              "value": "jpe",
              "type": "string"
            },
            {
              "value": "jpeg",
              "type": "string"
            },
            {
              "value": "jpg",
              "type": "string"
            },
            {
              "value": "js",
              "type": "string"
            },
            {
              "value": "json",
              "type": "string"
            },
            {
              "value": "jsx",
              "type": "string"
            },
            {
              "value": "m2v",
              "type": "string"
            },
            {
              "value": "mp2",
              "type": "string"
            },
            {
              "value": "mp3",
              "type": "string"
            },
            {
              "value": "mp4",
              "type": "string"
            },
            {
              "value": "mp4v",
              "type": "string"
            },
            {
              "value": "mpeg",
              "type": "string"
            },
            {
              "value": "mpg",
              "type": "string"
            },
            {
              "value": "mpg4",
              "type": "string"
            },
            {
              "value": "mpga",
              "type": "string"
            },
            {
              "value": "odf",
              "type": "string"
            },
            {
              "value": "odp",
              "type": "string"
            },
            {
              "value": "ods",
              "type": "string"
            },
            {
              "value": "odt",
              "type": "string"
            },
            {
              "value": "ole",
              "type": "string"
            },
            {
              "value": "p7m",
              "type": "string"
            },
            {
              "value": "pdf",
              "type": "string"
            },
            {
              "value": "php",
              "type": "string"
            },
            {
              "value": "png",
              "type": "string"
            },
            {
              "value": "ppt",
              "type": "string"
            },
            {
              "value": "rar",
              "type": "string"
            },
            {
              "value": "rtf",
              "type": "string"
            },
            {
              "value": "sass",
              "type": "string"
            },
            {
              "value": "shtml",
              "type": "string"
            },
            {
              "value": "svg",
              "type": "string"
            },
            {
              "value": "tar",
              "type": "string"
            },
            {
              "value": "tiff",
              "type": "string"
            },
            {
              "value": "ts",
              "type": "string"
            },
            {
              "value": "tsd",
              "type": "string"
            },
            {
              "value": "txt",
              "type": "string"
            },
            {
              "value": "wav",
              "type": "string"
            },
            {
              "value": "webp",
              "type": "string"
            },
            {
              "value": "xar",
              "type": "string"
            },
            {
              "value": "xls",
              "type": "string"
            },
            {
              "value": "xlsx",
              "type": "string"
            },
            {
              "value": "xml",
              "type": "string"
            },
            {
              "value": "zip",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsFileDownload",
          "detail": "MdsFileEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsFileEventDetail",
            "resolved": "MdsFileEventDetail",
            "references": {
              "MdsFileEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-file/meta/event-detail.ts::MdsFileEventDetail",
                "referenceLocation": "MdsFileEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is clicked, returning file infos",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-file-preview-color",
          "annotation": "prop",
          "docs": "Sets the text color used in the file preview",
          "visibility": "public"
        },
        {
          "name": "--mds-file-preview-icon-background",
          "annotation": "prop",
          "docs": "Sets the background color of the file preview icon",
          "visibility": "internal"
        },
        {
          "name": "--mds-file-preview-icon-color",
          "annotation": "prop",
          "docs": "Sets the color of the file preview icon",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-text",
        "mds-badge"
      ],
      "dependencyGraph": {
        "mds-file": [
          "mds-icon",
          "mds-text",
          "mds-badge"
        ],
        "mds-badge": [
          "mds-text"
        ]
      },
      "storybook": "ui-file--docs"
    },
    {
      "filePath": "src/components/mds-file-preview/mds-file-preview.tsx",
      "encapsulation": "shadow",
      "tag": "mds-file-preview",
      "readme": "# mds-file-preview\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "part",
          "text": "card - The preview of the file: its thumbnail or format icon, its name and its details"
        },
        {
          "name": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-file-preview>` web component is the Magma Design System card that previews an uploaded or referenced file, surfacing its name, size, type, and a format-aware icon or thumbnail. It pairs with `<mds-input-upload>` to represent each attached file and adds download/delete affordances around the bare file metadata.\n\n#### Semantic Behavior\n\n- **Format auto-detection**: The `filename` extension determines the icon, badge colour, and human-readable description; `suffix` forces a specific known format and `format` is the resolved category.\n- **Download interaction**: With `downloadable` the card is a button in the tab order: a click, Enter or Space emits `mdsFileDownload` with `{ target, filename, extension }`, once. Without it the card is not interactive and emits nothing. `downloadable` renders no download icon.\n- **Delete affordance**: When `deletable` is set, a light icon button renders in the corner and emits `mdsFileDelete` with the same detail payload, leaving the actual removal to the consumer.\n- **Filesize formatting**: A numeric `filesize` string is treated as bytes and formatted automatically; any non-numeric string is shown verbatim.\n- **Preview vs. icon vs. status**: A thumbnail renders only when `src` is set, the format supports preview, and no `message` is present; otherwise a format icon is shown, and when `message` is present the card switches to a status layout displaying that feedback text.\n- **Localization**: Default type descriptions and action titles resolve through the locale system (el/en/es/it).\n\n#### Properties & Visual Configurations\n\n- **`filename`** is the source of truth: beyond being the title, it drives icon, badge, and description inference, so prefer a real name with extension over a cosmetic label.\n- **`suffix`** overrides extension detection when the filename is unreliable or missing an extension; pick from the known format set rather than passing the description directly.\n- **`description`** overrides only the textual filetype caption, leaving icon and badge inference intact. The caption is shown only without `filesize`; with a size it stays as the badge tooltip.\n- **`src`** supplies a thumbnail (e.g. a logo or downscaled image) shown in place of the generic icon when the format is previewable and no message is active.\n- **`message`** turns the card into a feedback/status state (validation, error, progress text) and suppresses the thumbnail.\n\n#### Component-specific variants and tones\n\nThe shared `variant` / `tone` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md). `variant` here is an avatar-flavored value and is rendered **only when `message` is set**, coloring the status layout; the format badge derives its own colour from the detected filetype independently (its tone is always `weak`).\n\n#### Other behavioral props\n\n- **`icon`** overrides the auto-detected glyph with a Magma icon slug, an inline `<svg ...>` string or a `data:image/svg+xml;base64,` URI.\n- **`truncate`** controls how the filename is shortened when it overflows, defaulting to `'word'`.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-file-preview>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Minimal File Card\n\nThe required prop is `filename`. The component infers icon, badge colour, and type description automatically from the extension. Always pass a real filename with extension.\n\n```html\n<mds-file-preview filename=\"relazione-annuale.pdf\"></mds-file-preview>\n```\n\n#### File Card with Size\n\nPass `filesize` as a numeric byte count and the component formats it automatically (JEDEC: KB, MB, GB). Pass a plain string to show a pre-formatted label verbatim.\n\n```html\n<!-- Numeric bytes - auto-formatted to \"9.77 MB\" -->\n<mds-file-preview filename=\"contratto.docx\" filesize=\"10248594\"></mds-file-preview>\n\n<!-- Pre-formatted string - shown verbatim -->\n<mds-file-preview filename=\"archivio.zip\" filesize=\"12 MB\"></mds-file-preview>\n```\n\n#### Download Interaction\n\nAdd `downloadable` to make the whole card a button: the component emits `mdsFileDownload` with `{ target, filename, extension }` on a click, Enter or Space. Without `downloadable` the card emits nothing. Listen to the event; do not add a click handler on a wrapper element.\n\n```html\n<mds-file-preview\n  filename=\"documento.pdf\"\n  filesize=\"2048000\"\n  downloadable\n></mds-file-preview>\n```\n\n```javascript\ndocument.querySelector('mds-file-preview').addEventListener('mdsFileDownload', (e) => {\n  const { filename, extension } = e.detail;\n  console.log('Download richiesto:', filename, extension);\n});\n```\n\n#### Delete Affordance\n\nAdd `deletable` to show a dismiss button in the top-right corner. The component emits `mdsFileDelete` with `{ target, filename, extension }`. The consumer is responsible for removing the element from the DOM.\n\n```html\n<mds-file-preview\n  filename=\"bozza.docx\"\n  filesize=\"512000\"\n  deletable\n></mds-file-preview>\n```\n\n```javascript\ndocument.querySelector('mds-file-preview').addEventListener('mdsFileDelete', (e) => {\n  e.detail.target.remove();\n});\n```\n\n#### Image Thumbnail\n\nSet `src` to show a thumbnail instead of the generic icon. The thumbnail renders only when the format supports preview (images) and no `message` is set; other formats fall back to the icon.\n\n```html\n<mds-file-preview\n  filename=\"foto-profilo.jpg\"\n  filesize=\"84791746\"\n  src=\"./thumbnails/foto-profilo-thumb.webp\"\n></mds-file-preview>\n```\n\n#### Status / Feedback State\n\nSet `message` to switch the card to a feedback layout - the thumbnail is suppressed and the text is displayed alongside the icon. Pair with `variant` to colour the status region semantically. `variant` has no visual effect without `message`.\n\n```html\n<!-- Errore di formato -->\n<mds-file-preview\n  filename=\"documento.exe\"\n  message=\"Formato file non consentito\"\n  variant=\"error\"\n></mds-file-preview>\n\n<!-- Caricamento in corso -->\n<mds-file-preview\n  filename=\"video.mp4\"\n  filesize=\"52428800\"\n  message=\"Caricamento in corso...\"\n  variant=\"info\"\n></mds-file-preview>\n```\n\n#### Overriding Format Detection\n\nUse `suffix` to force a known extension category when the filename has no extension or the extension is ambiguous. Use `description` to override only the textual type caption while leaving icon and badge inference intact.\n\n```html\n<!-- Force suffix when filename has no extension -->\n<mds-file-preview filename=\"report\" suffix=\"pdf\"></mds-file-preview>\n\n<!-- Custom description label, icon unchanged -->\n<mds-file-preview\n  filename=\"modulo.pdf\"\n  description=\"Modulo di iscrizione\"\n></mds-file-preview>\n```\n\n#### Custom Icon\n\nSet `icon` to override the auto-detected glyph with any icon slug from the Magma library, or a `data:image/svg+xml;base64,` URI for a dynamic icon from an API.\n\n```html\n<!-- Named icon slug -->\n<mds-file-preview\n  filename=\"report.csv\"\n  filesize=\"32768\"\n  icon=\"mi/baseline/table-chart\"\n></mds-file-preview>\n```\n\n#### Filename Truncation\n\n`truncate` defaults to `word`, which keeps the filename on one line with an ellipsis. Use `all` to clamp it to two lines with an ellipsis. Use `none` to allow the filename to wrap freely.\n\n```html\n<mds-file-preview\n  filename=\"Questo-e-uno-dei-nomi-file-piu-lunghi-che-lumanita-abbia-mai-visto.docx\"\n  filesize=\"84791746\"\n  truncate=\"all\"\n></mds-file-preview>\n```\n\n#### Inside `mds-input-upload`\n\n`<mds-file-preview>` is the child card rendered by [`mds-input-upload`](../mds-input-upload/AGENTS.md). When integrating with the upload component, let `mds-input-upload` manage the cards rather than instantiating `mds-file-preview` directly.\n\n```html\n<mds-input-upload\n  max-files=\"5\"\n  accept=\".pdf,.docx\"\n></mds-input-upload>\n```\n\n#### Styling Customization\n\nStyle the card only through its public `--mds-file-preview-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` and the `--magma-radius-*` scale so dark mode and the corner geometry keep working.\n\n```css\n.carta-allegato mds-file-preview {\n  --mds-file-preview-background-color: rgb(var(--magma-accent-surface-subtle));\n  --mds-file-preview-border-radius: var(--magma-radius-md);\n  --mds-file-preview-color: rgb(var(--magma-accent-fg));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-file-preview>`. 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 Pass a Label Instead of a Real Filename\n\n`filename` drives automatic icon, badge, and description inference. Passing a cosmetic label without an extension produces the generic fallback icon and no badge, losing all format-aware information.\n\n```html\n<!-- INCORRECT -->\n<mds-file-preview filename=\"Contratto\"></mds-file-preview>\n\n<!-- CORRECT -->\n<mds-file-preview filename=\"contratto-2024.pdf\"></mds-file-preview>\n```\n\n#### Do Not Set `variant` Without `message`\n\n`variant` colours the status layout that is only rendered when `message` is set. Setting `variant` alone has no visual effect and misleads readers of the code into thinking the card is themed.\n\n```html\n<!-- INCORRECT -->\n<mds-file-preview filename=\"report.pdf\" variant=\"error\"></mds-file-preview>\n\n<!-- CORRECT -->\n<mds-file-preview\n  filename=\"report.pdf\"\n  message=\"File danneggiato\"\n  variant=\"error\"\n></mds-file-preview>\n```\n\n#### Do Not Listen for Native `click` to Handle Downloads\n\nThe component emits `mdsFileDownload` with the file detail when the card is clicked. Attaching an outer `click` handler bypasses the detail payload and also fires for clicks on the delete button.\n\n```html\n<!-- INCORRECT -->\n<div onclick=\"handleClick()\">\n  <mds-file-preview filename=\"documento.docx\" downloadable></mds-file-preview>\n</div>\n\n<!-- CORRECT -->\n<mds-file-preview filename=\"documento.docx\" downloadable></mds-file-preview>\n```\n\n```javascript\n// INCORRECT - native click on a wrapper\ndocument.querySelector('div').addEventListener('click', handleClick);\n\n// CORRECT - documented mdsFileDownload event\ndocument.querySelector('mds-file-preview').addEventListener('mdsFileDownload', (e) => {\n  download(e.detail.filename);\n});\n```\n\n#### Do Not Remove the Element Yourself Without Listening to `mdsFileDelete`\n\n`deletable` makes the delete button visible but leaves removal to the consumer. Removing the element from a `click` listener on the host - rather than `mdsFileDelete` - fires on any click inside the card, not only on the delete button, and bypasses the detail payload.\n\n```html\n<!-- INCORRECT -->\n<mds-file-preview filename=\"allegato.zip\" deletable onclick=\"this.remove()\"></mds-file-preview>\n\n<!-- CORRECT -->\n<mds-file-preview filename=\"allegato.zip\" deletable></mds-file-preview>\n```\n\n```javascript\ndocument.querySelector('mds-file-preview').addEventListener('mdsFileDelete', (e) => {\n  e.detail.target.remove();\n});\n```\n\n#### Do Not Wrap `mds-file-preview` in an Anchor to Add Download\n\nWrapping a card in `<a href=\"...\">` nests an already-interactive card (and its delete button, when `deletable`) inside a link, which fails accessibility audits. Use `downloadable` and handle `mdsFileDownload` instead.\n\n```html\n<!-- INCORRECT -->\n<a href=\"/files/documento.pdf\" download>\n  <mds-file-preview filename=\"documento.pdf\"></mds-file-preview>\n</a>\n\n<!-- CORRECT -->\n<mds-file-preview filename=\"documento.pdf\" downloadable></mds-file-preview>\n```\n\n#### Do Not Use `suffix` to Pass a Free-Form String\n\n`suffix` accepts only values from the documented `ExtensionSuffixType` union (e.g. `\"pdf\"`, `\"docx\"`, `\"jpg\"`). Passing an unsupported string silently falls back to the default icon and loses format inference.\n\n```html\n<!-- INCORRECT -->\n<mds-file-preview filename=\"report\" suffix=\"documento-word\"></mds-file-preview>\n\n<!-- CORRECT -->\n<mds-file-preview filename=\"report\" suffix=\"docx\"></mds-file-preview>\n```\n\n#### Customize via Documented Vars and the `card` Part Only\n\nThe only documented shadow part is `card`. Targeting inner selectors via `::part()`, `>>>`, or attribute hacks couples code to internal Shadow DOM structure and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-file-preview::part(icon) {\n  width: 48px;\n}\nmds-file-preview >>> .file-name {\n  font-size: 1rem;\n}\n\n/* CORRECT */\nmds-file-preview {\n  --mds-file-preview-color: rgb(var(--magma-accent-fg));\n  --mds-file-preview-background-color: rgb(var(--magma-accent-surface-subtle));\n}\nmds-file-preview::part(card) {\n  padding: calc(var(--spacing) * 600);\n}\n```\n"
      },
      "props": [
        {
          "name": "deletable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "deletable",
          "reflectToAttr": true,
          "docs": "Enables the cross icon to perform cancel/delete action on element",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "description",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "description",
          "reflectToAttr": true,
          "docs": "Overrides the default filetype description",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "downloadable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "downloadable",
          "reflectToAttr": true,
          "docs": "Turns the card into a button that asks for the download: a tab stop that the pointer, Enter\nand Space activate, emitting `mdsFileDownload`. Without it the card is not interactive",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "filename",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "filename",
          "reflectToAttr": true,
          "docs": "The filename shown as component title, is used to auto assign one of the filetype known in the filetype dictionary",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        },
        {
          "name": "filesize",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "filesize",
          "reflectToAttr": true,
          "docs": "The filesize shown, if you pass a string you can write whathever you want, if you pass a number it expect filesize in bytes, the component will format it automatically.",
          "docsTags": [
            {
              "name": "example",
              "text": "'2.4 MB'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "format",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "format",
          "reflectToAttr": true,
          "docs": "The kind of file, recognised from the extension of `filename` or from `suffix`: it selects\nthe colours of the icon. The component writes it on load and whenever `filename` changes,\nset `suffix` to choose it",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "The name of the icon or a base64 string to render it as an svg",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "message",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "message",
          "reflectToAttr": true,
          "docs": "Sets a feedback message related to the component",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "src",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "src",
          "reflectToAttr": true,
          "docs": "The image preview src if available of a file, useful if you have a logo to display, or a smaller version of a bigger image",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "suffix",
          "type": "\"7z\" | \"ace\" | \"ai\" | \"db\" | \"default\" | \"dmg\" | \"doc\" | \"docm\" | \"docx\" | \"eml\" | \"eps\" | \"exe\" | \"flac\" | \"gif\" | \"heic\" | \"htm\" | \"html\" | \"jpe\" | \"jpeg\" | \"jpg\" | \"js\" | \"json\" | \"jsx\" | \"m2v\" | \"mp2\" | \"mp3\" | \"mp4\" | \"mp4v\" | \"mpeg\" | \"mpg\" | \"mpg4\" | \"mpga\" | \"odf\" | \"odp\" | \"ods\" | \"odt\" | \"ole\" | \"p7m\" | \"pdf\" | \"php\" | \"png\" | \"ppt\" | \"rar\" | \"rtf\" | \"sass\" | \"shtml\" | \"svg\" | \"tar\" | \"tiff\" | \"ts\" | \"tsd\" | \"txt\" | \"wav\" | \"webp\" | \"xar\" | \"xls\" | \"xlsx\" | \"xml\" | \"zip\" | undefined",
          "complexType": {
            "original": "ExtensionSuffixType",
            "resolved": "\"7z\" | \"ace\" | \"ai\" | \"db\" | \"default\" | \"dmg\" | \"doc\" | \"docm\" | \"docx\" | \"eml\" | \"eps\" | \"exe\" | \"flac\" | \"gif\" | \"heic\" | \"htm\" | \"html\" | \"jpe\" | \"jpeg\" | \"jpg\" | \"js\" | \"json\" | \"jsx\" | \"m2v\" | \"mp2\" | \"mp3\" | \"mp4\" | \"mp4v\" | \"mpeg\" | \"mpg\" | \"mpg4\" | \"mpga\" | \"odf\" | \"odp\" | \"ods\" | \"odt\" | \"ole\" | \"p7m\" | \"pdf\" | \"php\" | \"png\" | \"ppt\" | \"rar\" | \"rtf\" | \"sass\" | \"shtml\" | \"svg\" | \"tar\" | \"tiff\" | \"ts\" | \"tsd\" | \"txt\" | \"wav\" | \"webp\" | \"xar\" | \"xls\" | \"xlsx\" | \"xml\" | \"zip\" | undefined",
            "references": {
              "ExtensionSuffixType": {
                "location": "import",
                "path": "@type/file-types",
                "id": "src/type/file-types.ts::ExtensionSuffixType",
                "referenceLocation": "ExtensionSuffixType"
              }
            }
          },
          "mutable": false,
          "attr": "suffix",
          "reflectToAttr": true,
          "docs": "Overrides the automatic filetype recongition by forcing the suffix to one of the available formats choosen",
          "docsTags": [],
          "values": [
            {
              "value": "7z",
              "type": "string"
            },
            {
              "value": "ace",
              "type": "string"
            },
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "db",
              "type": "string"
            },
            {
              "value": "default",
              "type": "string"
            },
            {
              "value": "dmg",
              "type": "string"
            },
            {
              "value": "doc",
              "type": "string"
            },
            {
              "value": "docm",
              "type": "string"
            },
            {
              "value": "docx",
              "type": "string"
            },
            {
              "value": "eml",
              "type": "string"
            },
            {
              "value": "eps",
              "type": "string"
            },
            {
              "value": "exe",
              "type": "string"
            },
            {
              "value": "flac",
              "type": "string"
            },
            {
              "value": "gif",
              "type": "string"
            },
            {
              "value": "heic",
              "type": "string"
            },
            {
              "value": "htm",
              "type": "string"
            },
            {
              "value": "html",
              "type": "string"
            },
            {
              "value": "jpe",
              "type": "string"
            },
            {
              "value": "jpeg",
              "type": "string"
            },
            {
              "value": "jpg",
              "type": "string"
            },
            {
              "value": "js",
              "type": "string"
            },
            {
              "value": "json",
              "type": "string"
            },
            {
              "value": "jsx",
              "type": "string"
            },
            {
              "value": "m2v",
              "type": "string"
            },
            {
              "value": "mp2",
              "type": "string"
            },
            {
              "value": "mp3",
              "type": "string"
            },
            {
              "value": "mp4",
              "type": "string"
            },
            {
              "value": "mp4v",
              "type": "string"
            },
            {
              "value": "mpeg",
              "type": "string"
            },
            {
              "value": "mpg",
              "type": "string"
            },
            {
              "value": "mpg4",
              "type": "string"
            },
            {
              "value": "mpga",
              "type": "string"
            },
            {
              "value": "odf",
              "type": "string"
            },
            {
              "value": "odp",
              "type": "string"
            },
            {
              "value": "ods",
              "type": "string"
            },
            {
              "value": "odt",
              "type": "string"
            },
            {
              "value": "ole",
              "type": "string"
            },
            {
              "value": "p7m",
              "type": "string"
            },
            {
              "value": "pdf",
              "type": "string"
            },
            {
              "value": "php",
              "type": "string"
            },
            {
              "value": "png",
              "type": "string"
            },
            {
              "value": "ppt",
              "type": "string"
            },
            {
              "value": "rar",
              "type": "string"
            },
            {
              "value": "rtf",
              "type": "string"
            },
            {
              "value": "sass",
              "type": "string"
            },
            {
              "value": "shtml",
              "type": "string"
            },
            {
              "value": "svg",
              "type": "string"
            },
            {
              "value": "tar",
              "type": "string"
            },
            {
              "value": "tiff",
              "type": "string"
            },
            {
              "value": "ts",
              "type": "string"
            },
            {
              "value": "tsd",
              "type": "string"
            },
            {
              "value": "txt",
              "type": "string"
            },
            {
              "value": "wav",
              "type": "string"
            },
            {
              "value": "webp",
              "type": "string"
            },
            {
              "value": "xar",
              "type": "string"
            },
            {
              "value": "xls",
              "type": "string"
            },
            {
              "value": "xlsx",
              "type": "string"
            },
            {
              "value": "xml",
              "type": "string"
            },
            {
              "value": "zip",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "truncate",
          "type": "\"all\" | \"none\" | \"word\" | undefined",
          "complexType": {
            "original": "TypographyTruncateType",
            "resolved": "\"all\" | \"none\" | \"word\" | undefined",
            "references": {
              "TypographyTruncateType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyTruncateType",
                "referenceLocation": "TypographyTruncateType"
              }
            }
          },
          "mutable": false,
          "attr": "truncate",
          "reflectToAttr": true,
          "docs": "Truncates the filename shown",
          "docsTags": [
            {
              "name": "default",
              "text": "'word'"
            }
          ],
          "default": "'word'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "word",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
          "complexType": {
            "original": "ThemeFullVariantAvatarType",
            "resolved": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
            "references": {
              "ThemeFullVariantAvatarType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeFullVariantAvatarType",
                "referenceLocation": "ThemeFullVariantAvatarType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "The variant of the component, is shown only if the message attribute is defined",
          "docsTags": [],
          "values": [
            {
              "value": "amaranth",
              "type": "string"
            },
            {
              "value": "aqua",
              "type": "string"
            },
            {
              "value": "blue",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "green",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "lime",
              "type": "string"
            },
            {
              "value": "orange",
              "type": "string"
            },
            {
              "value": "orchid",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "purple",
              "type": "string"
            },
            {
              "value": "red",
              "type": "string"
            },
            {
              "value": "sky",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "violet",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "value": "yellow",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsFileDelete",
          "detail": "MdsFilePreviewEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsFilePreviewEventDetail",
            "resolved": "MdsFilePreviewEventDetail",
            "references": {
              "MdsFilePreviewEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail",
                "referenceLocation": "MdsFilePreviewEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is removed, returning file infos",
          "docsTags": []
        },
        {
          "event": "mdsFileDownload",
          "detail": "MdsFilePreviewEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsFilePreviewEventDetail",
            "resolved": "MdsFilePreviewEventDetail",
            "references": {
              "MdsFilePreviewEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail",
                "referenceLocation": "MdsFilePreviewEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is clicked, returning file infos",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-file-preview-background-color",
          "annotation": "prop",
          "docs": "Sets the background color of the file preview container",
          "visibility": "public"
        },
        {
          "name": "--mds-file-preview-border-radius",
          "annotation": "prop",
          "docs": "Sets the border-radius of the file preview container",
          "visibility": "public"
        },
        {
          "name": "--mds-file-preview-color",
          "annotation": "prop",
          "docs": "Sets the text color used inside the file preview",
          "visibility": "public"
        },
        {
          "name": "--mds-file-preview-icon-background",
          "annotation": "prop",
          "docs": "Sets the background color of the file preview icon",
          "visibility": "internal"
        },
        {
          "name": "--mds-file-preview-icon-color",
          "annotation": "prop",
          "docs": "Sets the color of the file preview icon",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "card",
          "docs": "The preview of the file: its thumbnail or format icon, its name and its details"
        }
      ],
      "states": [],
      "dependents": [
        "mds-input-upload"
      ],
      "dependencies": [
        "mds-button",
        "mds-img",
        "mds-icon",
        "mds-text",
        "mds-badge"
      ],
      "dependencyGraph": {
        "mds-file-preview": [
          "mds-button",
          "mds-img",
          "mds-icon",
          "mds-text",
          "mds-badge"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-img": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-badge": [
          "mds-text"
        ],
        "mds-input-upload": [
          "mds-file-preview"
        ]
      },
      "storybook": "ui-file-preview--docs"
    },
    {
      "filePath": "src/components/mds-filter/mds-filter.tsx",
      "encapsulation": "shadow",
      "tag": "mds-filter",
      "readme": "# mds-filter\n\n\n\nThis 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.\n",
      "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 `mds-filter-item` element/s."
        },
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-filter>` web component is a compound container that groups a set of `<mds-filter-item>` chips into a single, scrollable filter bar, coordinating their selection state and exposing the active values as one combined change event. It has no native HTML equivalent: it orchestrates its children rather than rendering a control of its own.\n\n#### Semantic Behavior\n\n- **Compound parent**: Acts as the controller for slotted `<mds-filter-item>` children, driving their state in response to selection events.\n- **Group of toggles**: The host is a `group` named by `label`, and each item is a toggle button whose pressed state follows its selection: a screen reader hears which filters are on and how many results each one shows. Every item is a Tab stop; there is no arrow-key navigation.\n- **Selection coordination**: In single mode it enforces exclusive selection (selecting one deselects the others); in `multiple` mode it keeps every selected child active and tracks how many are selected.\n- **Selection set by the application**: The selection lives on the items' `selected`. Setting or clearing it from the application, or rendering an item already selected, is taken in as after a click: in single mode only the last item set stays selected, the reset button shows or hides, the strip scrolls to the item. No `mdsFilterChange` is emitted for it, and `autoReset` does not apply: the application already knows. Two items `selected` in the markup of a single-mode bar leave the last one selected, as a `<select>` does.\n- **Combined change event**: `mdsFilterChange` fires whenever the user changes the selection (an item, or the reset button), carrying both the `NodeList` of the children and a comma-joined string of the selected items' `value`s.\n- **Reset control**: When `reset` is set, a clear-all button appears once a filter is active, named in the page language (the `lang` of `<html>`) (\"Clear filters\"). A click clears all selections and emits `mdsFilterChange` with an empty `value`. While no filter is active the button is scaled away, out of the tab order and of the accessibility tree; without `reset` it is not rendered at all.\n- **Auto-scroll**: On each selection the bar scrolls horizontally to center the most recently selected item.\n- **Default slot**: The default slot is for `<mds-filter-item>` elements only, not arbitrary text or markup.\n\n#### Properties & Visual Configurations\n\n- **`multiple`** switches the bar from exclusive single-select behavior to allowing several items active at once; choose it when filters are additive rather than mutually exclusive.\n- **`reset`** opts the bar into showing a dedicated clear-all control whenever one or more filters are active.\n- **`autoReset`** automatically clears all selections once every item has been selected - useful in `multiple` mode where \"all selected\" is equivalent to \"no filter applied\".\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-filter>` 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 Single-Select Filter Bar\n\nThe canonical form. Slot `<mds-filter-item>` children directly; the parent enforces exclusive selection in single mode - selecting one item deselects all others. Always provide `value` on each item so the `mdsFilterChange` event carries meaningful data.\n\n```html\n<mds-filter label=\"Categoria\">\n  <mds-filter-item label=\"Tutti\" value=\"all\"></mds-filter-item>\n  <mds-filter-item label=\"Notizie\" value=\"news\"></mds-filter-item>\n  <mds-filter-item label=\"Comunicati\" value=\"press\" count=\"14\"></mds-filter-item>\n  <mds-filter-item label=\"Aggiornamenti\" value=\"updates\" count=\"3\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Listening to Selection Changes\n\nListen to `mdsFilterChange` on the parent. The event detail carries `value` (comma-joined string of selected `value` attributes) and `children` (the `NodeList` of the items, for advanced inspection).\n\n```html\n<mds-filter id=\"filter-stato\" label=\"Stato\">\n  <mds-filter-item label=\"Bozza\" value=\"draft\"></mds-filter-item>\n  <mds-filter-item label=\"Pubblicato\" value=\"published\"></mds-filter-item>\n  <mds-filter-item label=\"Archiviato\" value=\"archived\"></mds-filter-item>\n</mds-filter>\n\n<script>\n  document.getElementById('filter-stato').addEventListener('mdsFilterChange', (event) => {\n    console.log('Filtro attivo:', event.detail.value);\n  });\n</script>\n```\n\n#### Multi-Select Filter Bar\n\nSet `multiple` when filters are additive rather than mutually exclusive. All selected items stay active simultaneously; `mdsFilterChange` fires after each toggle.\n\n```html\n<mds-filter label=\"Etichette\" multiple>\n  <mds-filter-item label=\"Urgente\" value=\"urgent\" count=\"2\"></mds-filter-item>\n  <mds-filter-item label=\"In revisione\" value=\"review\" count=\"7\"></mds-filter-item>\n  <mds-filter-item label=\"Completato\" value=\"done\" count=\"31\"></mds-filter-item>\n  <mds-filter-item label=\"Annullato\" value=\"cancelled\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Reset Button\n\nSet `reset` to show a clear-all control whenever at least one item is active. The reset control is hidden when no filter is selected and becomes visible automatically when a selection is made. It is named in the page language (\"Clear filters\") and emits `mdsFilterChange` with an empty `value` when it clears the selection.\n\n```html\n<mds-filter label=\"Tipo documento\" multiple reset>\n  <mds-filter-item label=\"PDF\" value=\"pdf\" count=\"5\"></mds-filter-item>\n  <mds-filter-item label=\"Word\" value=\"doc\" count=\"12\"></mds-filter-item>\n  <mds-filter-item label=\"Immagine\" value=\"image\" count=\"8\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Auto-Reset on Full Selection\n\nUse `auto-reset` together with `multiple` when selecting all items is semantically identical to \"no filter applied\". Once every item is selected, the component clears all selections automatically.\n\n```html\n<mds-filter label=\"Priorita\" multiple auto-reset>\n  <mds-filter-item label=\"Alta\" value=\"high\"></mds-filter-item>\n  <mds-filter-item label=\"Media\" value=\"medium\"></mds-filter-item>\n  <mds-filter-item label=\"Bassa\" value=\"low\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Filter Item with Icon\n\nSupply `icon` on individual `<mds-filter-item>` children to add a glyph alongside the label. The icon slug follows iconsauce conventions; the spoken name comes from `label`, or from the icon slug when no label is present (`grid view` for `mi/baseline/grid-view`).\n\n```html\n<mds-filter label=\"Formato\">\n  <mds-filter-item label=\"Video\" value=\"video\" icon=\"mi/baseline/videocam\"></mds-filter-item>\n  <mds-filter-item label=\"Audio\" value=\"audio\" icon=\"mi/baseline/headset\"></mds-filter-item>\n  <mds-filter-item label=\"Testo\" value=\"text\" icon=\"mi/baseline/article\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Pre-Selected Item\n\nSet `selected` on a child at page load to reflect a filter that is already active (e.g. restored from a URL parameter or user preference). The parent picks up the initial state when it loads.\n\n```html\n<mds-filter label=\"Periodo\">\n  <mds-filter-item label=\"Oggi\" value=\"today\"></mds-filter-item>\n  <mds-filter-item label=\"Settimana corrente\" value=\"week\" selected></mds-filter-item>\n  <mds-filter-item label=\"Mese corrente\" value=\"month\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Setting the Selection from the Application\n\nWhen the filters live somewhere else - in the address, in a store, behind a \"Clear filters\" button outside the bar - set `selected` on the items: the bar follows as after the same clicks (single mode, reset button), without emitting `mdsFilterChange`. In a framework, bind `selected` on each item to the state.\n\n```html\n<mds-filter id=\"status\" label=\"Stato\" reset>\n  <mds-filter-item label=\"Nuove\" value=\"new\"></mds-filter-item>\n  <mds-filter-item label=\"Aperte\" value=\"open\"></mds-filter-item>\n  <mds-filter-item label=\"Chiuse\" value=\"closed\"></mds-filter-item>\n</mds-filter>\n<mds-button id=\"clear\" label=\"Rimuovi i filtri\" variant=\"dark\" tone=\"text\"></mds-button>\n```\n\n```js\nconst items = [...document.querySelectorAll('#status mds-filter-item')];\n\n// restore the filter from the address on load\nconst status = new URLSearchParams(location.search).get('status');\nitems.forEach((item) => {\n  item.selected = item.value === status;\n});\n\n// clear it from a button outside the bar\ndocument.querySelector('#clear').addEventListener('click', () => {\n  items.forEach((item) => {\n    item.selected = false;\n  });\n});\n```\n\n#### Disabled Item\n\nSet `disabled` on individual `<mds-filter-item>` children to block them: a disabled item leaves the tab order, ignores clicks and keys, is announced as unavailable (`aria-disabled`) and is painted in the disabled text colour.\n\n```html\n<mds-filter label=\"Stato pratica\">\n  <mds-filter-item label=\"Aperta\" value=\"open\" count=\"9\"></mds-filter-item>\n  <mds-filter-item label=\"In attesa\" value=\"pending\" count=\"2\"></mds-filter-item>\n  <mds-filter-item label=\"Chiusa\" value=\"closed\" disabled></mds-filter-item>\n</mds-filter>\n```\n\n#### Styling Customization\n\nStyle the filter bar only through its public `--mds-filter-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` and the `--spacing` scale so dark mode and high-contrast modes keep working.\n\n```css\n.filtri-personalizzati mds-filter {\n  --mds-filter-items-background: rgb(var(--magma-wash-strong));\n  --mds-filter-items-background-active: rgb(var(--magma-accent-surface));\n  --mds-filter-wrapper-shadow: 0 0 0 calc(var(--spacing) * 50) rgb(var(--magma-accent-border)) inset;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-filter>`. 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 Slot Arbitrary Elements Instead of `mds-filter-item`\n\nThe default slot accepts only `<mds-filter-item>` elements. The parent wires its coordination logic - exclusive selection, scroll-centering, value aggregation - by querying for `mds-filter-item` children. Slotting plain buttons, spans, or any other element breaks all of that coordination.\n\n```html\n<!-- INCORRECT -->\n<mds-filter label=\"Tipo\">\n  <button>Notizie</button>\n  <button>Comunicati</button>\n</mds-filter>\n\n<!-- CORRECT -->\n<mds-filter label=\"Tipo\">\n  <mds-filter-item label=\"Notizie\" value=\"news\"></mds-filter-item>\n  <mds-filter-item label=\"Comunicati\" value=\"press\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Do Not Use `mds-filter-item` Outside `mds-filter`\n\n`<mds-filter-item>` communicates state upward via the `mdsFilterItemSelect` event, which `<mds-filter>` listens for internally. Used standalone, the item has no parent to coordinate selection, no auto-scroll, and no combined `mdsFilterChange` output.\n\n```html\n<!-- INCORRECT -->\n<div class=\"my-filter-bar\">\n  <mds-filter-item label=\"Tutti\" value=\"all\"></mds-filter-item>\n  <mds-filter-item label=\"Attivi\" value=\"active\"></mds-filter-item>\n</div>\n\n<!-- CORRECT -->\n<mds-filter>\n  <mds-filter-item label=\"Tutti\" value=\"all\"></mds-filter-item>\n  <mds-filter-item label=\"Attivi\" value=\"active\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Do Not Listen to Native `change` Instead of `mdsFilterChange`\n\n`<mds-filter>` emits the documented `mdsFilterChange` custom event. It contains no native form control, so no `change` or `input` event is ever fired; listening for them produces no result.\n\n```html\n<!-- INCORRECT -->\n<mds-filter id=\"f\" label=\"Stato\">\n  <mds-filter-item label=\"Aperto\" value=\"open\"></mds-filter-item>\n</mds-filter>\n<script>\n  document.getElementById('f').addEventListener('change', handler);\n</script>\n\n<!-- CORRECT -->\n<mds-filter id=\"f\" label=\"Stato\">\n  <mds-filter-item label=\"Aperto\" value=\"open\"></mds-filter-item>\n</mds-filter>\n<script>\n  document.getElementById('f').addEventListener('mdsFilterChange', handler);\n</script>\n```\n\n#### Do Not Set Boolean Props to the String `\"false\"`\n\n`auto-reset`, `multiple`, and `reset` are boolean attributes: remove the attribute entirely to deactivate it, as for every boolean. The runtime happens to read the string `\"false\"` as `false`, but the attribute stays in the markup until the component renders, and HTML, `[multiple]` selectors and `hasAttribute()` read a present attribute as set.\n\n```html\n<!-- INCORRECT -->\n<mds-filter multiple=\"false\" reset=\"false\" label=\"Tipo\">\n  <mds-filter-item label=\"Tutti\" value=\"all\"></mds-filter-item>\n</mds-filter>\n\n<!-- CORRECT -->\n<mds-filter label=\"Tipo\">\n  <mds-filter-item label=\"Tutti\" value=\"all\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Do Not Use `auto-reset` Without `multiple`\n\n`auto-reset` is meaningful only in `multiple` mode - it triggers when all items are simultaneously selected. In single-select mode only one item can ever be active, so the \"all selected\" condition is never reached and `auto-reset` has no effect.\n\n```html\n<!-- INCORRECT -->\n<mds-filter auto-reset label=\"Priorita\">\n  <mds-filter-item label=\"Alta\" value=\"high\"></mds-filter-item>\n  <mds-filter-item label=\"Bassa\" value=\"low\"></mds-filter-item>\n</mds-filter>\n\n<!-- CORRECT -->\n<mds-filter multiple auto-reset label=\"Priorita\">\n  <mds-filter-item label=\"Alta\" value=\"high\"></mds-filter-item>\n  <mds-filter-item label=\"Bassa\" value=\"low\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Do Not Omit `value` on `mds-filter-item`\n\nThe `mdsFilterChange` event's `value` field is a comma-joined string of the selected items' `value` attributes. Items without a `value` contribute an empty string to the output, making the combined value ambiguous and hard to parse in application code.\n\n```html\n<!-- INCORRECT -->\n<mds-filter label=\"Formato\">\n  <mds-filter-item label=\"PDF\"></mds-filter-item>\n  <mds-filter-item label=\"Word\"></mds-filter-item>\n</mds-filter>\n\n<!-- CORRECT -->\n<mds-filter label=\"Formato\">\n  <mds-filter-item label=\"PDF\" value=\"pdf\"></mds-filter-item>\n  <mds-filter-item label=\"Word\" value=\"doc\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Do Not Customize Via Undocumented Shadow Selectors\n\nThe supported customization surface for `<mds-filter>` is its public `--mds-filter-*` CSS custom properties. Piercing the shadow DOM via `>>>` or undocumented `::part()` names couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-filter >>> .items {\n  background: white;\n}\nmds-filter::part(items-wrapper) {\n  border: 2px solid red;\n}\n\n/* CORRECT */\nmds-filter {\n  --mds-filter-items-background: rgb(var(--magma-wash-strong));\n  --mds-filter-wrapper-shadow: 0 0 0 calc(var(--spacing) * 50) rgb(var(--magma-accent-border)) inset;\n}\n```\n"
      },
      "props": [
        {
          "name": "autoReset",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "auto-reset",
          "reflectToAttr": true,
          "docs": "Sets an automatic reset of active filters if all filters are triggered",
          "docsTags": [],
          "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": false,
          "docs": "Sets the label of the filter group",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "multiple",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "multiple",
          "reflectToAttr": true,
          "docs": "Sets if the filter group can filter multiple filters simultaneously",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "reset",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "reset",
          "reflectToAttr": true,
          "docs": "Shows a reset button if one or more filters are active",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsFilterChange",
          "detail": "MdsFilterEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsFilterEventDetail",
            "resolved": "MdsFilterEventDetail",
            "references": {
              "MdsFilterEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-filter/meta/event-detail.ts::MdsFilterEventDetail",
                "referenceLocation": "MdsFilterEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the one of the children is changed",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "mdsFilterItemSelect",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [
        {
          "name": "--mds-filter-items-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the items row area",
          "visibility": "public"
        },
        {
          "name": "--mds-filter-items-background-active",
          "annotation": "prop",
          "docs": "Sets the background-color of the items row area when a filter is active",
          "visibility": "public"
        },
        {
          "name": "--mds-filter-items-gap",
          "annotation": "prop",
          "docs": "Sets the gap between items",
          "visibility": "internal"
        },
        {
          "name": "--mds-filter-items-padding",
          "annotation": "prop",
          "docs": "Sets the padding of the items row area",
          "visibility": "internal"
        },
        {
          "name": "--mds-filter-items-radius",
          "annotation": "prop",
          "docs": "Sets the border-radius of the items row area",
          "visibility": "internal"
        },
        {
          "name": "--mds-filter-items-scroll-behavior",
          "annotation": "prop",
          "docs": "Sets the scroll-behavior animation;",
          "visibility": "internal"
        },
        {
          "name": "--mds-filter-label-gap",
          "annotation": "prop",
          "docs": "Sets the gap between the label and the items row area",
          "visibility": "internal"
        },
        {
          "name": "--mds-filter-label-padding",
          "annotation": "prop",
          "docs": "Sets the padding of the label",
          "visibility": "internal"
        },
        {
          "name": "--mds-filter-wrapper-shadow",
          "annotation": "prop",
          "docs": "Sets the shadow used as outline border",
          "visibility": "public"
        },
        {
          "name": "--mds-filter-wrapper-shadow-color",
          "annotation": "prop",
          "docs": "Sets the effect of the outline border",
          "visibility": "internal"
        },
        {
          "name": "--mds-filter-wrapper-shadow-opacity",
          "annotation": "prop",
          "docs": "Sets the opacity of the outline border",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-filter-item` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-filter-item"
      ],
      "dependencyGraph": {
        "mds-filter": [
          "mds-text",
          "mds-filter-item"
        ],
        "mds-filter-item": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "ui-filter--docs"
    },
    {
      "filePath": "src/components/mds-filter-item/mds-filter-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-filter-item",
      "readme": "# mds-filter-item\n\n\n\nThis 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.\n",
      "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": "parent",
          "text": "mds-filter"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-filter-item>` web component is a single selectable option inside the [`<mds-filter>`](../mds-filter/AGENTS.md) container of the Magma Design System. It renders as a toggle button (icon, label, and an optional count badge) and acts as the toggleable unit that drives the parent's filter selection - it has no standalone HTML primitive equivalent.\n\n#### Semantic Behavior\n\n- **Compound child only**: `<mds-filter-item>` must be a direct slot child of `<mds-filter>`; it is not used standalone and should not be mixed with other child types.\n- **Self-toggling + event**: Clicking (or activating via the keyboard) flips `selected` and emits `mdsFilterItemSelect` with `{ id, selected }`. The `id` is the one set in the markup; an item without one gets `item-<index>` from the parent on load. The parent enforces single vs. multiple selection and re-emits `mdsFilterChange` with the aggregated value list.\n- **State owned with the parent**: `selected` doubles as a styling hook and as the flag the parent reads/writes - in single-select mode the parent clears the other items' selection, and on reset it clears the whole group. The parent also follows a `selected` set by the application, without emitting `mdsFilterChange`.\n- **Toggle button**: The host is a `button` whose `aria-pressed` follows `selected`. Its name is the `label` followed by the `count` as a number of results in the page language (the `lang` of `<html>`): \"Nuove, 11 results\" in English, \"Nuove, 11 risultati\" in Italian. The name contains the text the item shows, the label and the count as separate words, so a speech-input user can say what they see (WCAG 2.5.3, Label in Name). An `aria-label` written on the host by the author stays, as written: it must contain that text too, and follow the count when it changes.\n- **Keyboard activation**: Enter (and numpad Enter) and Space activate the item like a pointer click.\n- **Focus management**: The item is focusable unless `disabled`, in which case it drops out of the tab order.\n\n#### Properties & Visual Configurations\n\n- **`selected`**: The selection state of the item. Set it on initial markup to pre-select a filter, or at runtime from the application (a filter restored from the address, a clear button outside the bar): the parent follows, in single mode clearing the others.\n- **`value`**: The form/data value contributed to the parent's aggregated `mdsFilterChange` payload when the item is selected. Provide a meaningful value distinct from the human-readable `label`.\n- **`count`**: An optional badge showing how many results the filter would yield. Use it only when the count is meaningful to the user; omit it for purely categorical filters.\n- **`icon`**: Optional leading icon (an icon name string). Without a `label` the item is named after the last segment of the slug (`map` for `mi/baseline/map`); give it an `aria-label` of your own when the slug does not say what the filter does.\n- **`disabled`**: Blocks the item: it leaves the tab order, ignores clicks and keys, is announced as unavailable (`aria-disabled`) and is painted in the disabled text colour.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-filter-item>` 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 Filter Group\n\nThe canonical form. Place one or more `<mds-filter-item>` elements as direct children of `<mds-filter>`. Every item requires a `label` (the visible text) and a `value` (the machine-readable token emitted by the parent's `mdsFilterChange` event).\n\n```html\n<mds-filter label=\"Stato\">\n  <mds-filter-item label=\"Attivo\" value=\"active\"></mds-filter-item>\n  <mds-filter-item label=\"In attesa\" value=\"pending\"></mds-filter-item>\n  <mds-filter-item label=\"Archiviato\" value=\"archived\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Pre-selecting an Item on Load\n\nSet `selected` on an item in the initial markup to make it active before any user interaction. The parent reads `selected` on mount and reflects the aggregated state correctly.\n\n```html\n<mds-filter label=\"Categoria\">\n  <mds-filter-item label=\"Tutti\" value=\"all\" selected></mds-filter-item>\n  <mds-filter-item label=\"Notizie\" value=\"news\"></mds-filter-item>\n  <mds-filter-item label=\"Eventi\" value=\"events\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Count Badge\n\nPass a `count` string to show how many results each filter would yield. Use it when the number is meaningful to the user; omit it for purely categorical filters to keep the UI uncluttered.\n\n```html\n<mds-filter label=\"Priorita\">\n  <mds-filter-item label=\"Alta\" value=\"high\" count=\"12\"></mds-filter-item>\n  <mds-filter-item label=\"Media\" value=\"medium\" count=\"34\"></mds-filter-item>\n  <mds-filter-item label=\"Bassa\" value=\"low\" count=\"5\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Icon-Only Item\n\nOmit `label` and provide only `icon`. Without a label the item is named after the last segment of the icon slug (`grid view` for `mi/baseline/grid-view`); an `aria-label` of your own takes its place and stays. Use a recognizable icon so the purpose is clear without text, and give each item an `aria-label` when the slug does not say what it filters.\n\n```html\n<mds-filter label=\"Vista\">\n  <mds-filter-item aria-label=\"Griglia\" icon=\"mi/baseline/grid-view\" value=\"grid\"></mds-filter-item>\n  <mds-filter-item aria-label=\"Elenco\" icon=\"mi/baseline/view-list\" value=\"list\"></mds-filter-item>\n  <mds-filter-item aria-label=\"Mappa\" icon=\"mi/baseline/map\" value=\"map\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Item with Icon and Label\n\nCombine `icon` and `label` for a filter item that pairs a glyph with a text description.\n\n```html\n<mds-filter label=\"Tipo documento\">\n  <mds-filter-item icon=\"mi/baseline/picture-as-pdf\" label=\"PDF\" value=\"pdf\"></mds-filter-item>\n  <mds-filter-item icon=\"mi/baseline/image\" label=\"Immagini\" value=\"image\"></mds-filter-item>\n  <mds-filter-item icon=\"mi/baseline/video-library\" label=\"Video\" value=\"video\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Multiple Selection\n\nAdd `multiple` to `<mds-filter>` to allow several items to be selected at the same time. The parent aggregates the selected `value`s into a comma-separated string and emits it via `mdsFilterChange`.\n\n```html\n<mds-filter label=\"Settore\" multiple>\n  <mds-filter-item label=\"Sanita\" value=\"health\"></mds-filter-item>\n  <mds-filter-item label=\"Istruzione\" value=\"education\"></mds-filter-item>\n  <mds-filter-item label=\"Trasporti\" value=\"transport\"></mds-filter-item>\n  <mds-filter-item label=\"Ambiente\" value=\"environment\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Listening for Selection Events\n\nListen to `mdsFilterItemSelect` on a single item for per-item reactions, or to `mdsFilterChange` on the parent for the aggregated selection. The event detail for `mdsFilterItemSelect` is `{ id: string, selected: boolean }`.\n\n```html\n<mds-filter id=\"tipo-filter\" label=\"Tipo\">\n  <mds-filter-item label=\"Bozza\" value=\"draft\"></mds-filter-item>\n  <mds-filter-item label=\"Pubblicato\" value=\"published\"></mds-filter-item>\n</mds-filter>\n\n<script>\n  document.getElementById('tipo-filter').addEventListener('mdsFilterChange', (e) => {\n    console.log('Valori selezionati:', e.detail.value);\n  });\n</script>\n```\n\n#### Reset Affordance\n\nAdd `reset` to `<mds-filter>` to show an automatic reset button when at least one item is active. The button is rendered by the parent internally - no extra `<mds-filter-item>` is needed - and named in the page language (\"Clear filters\").\n\n```html\n<mds-filter label=\"Regione\" reset>\n  <mds-filter-item label=\"Nord\" value=\"north\"></mds-filter-item>\n  <mds-filter-item label=\"Centro\" value=\"center\"></mds-filter-item>\n  <mds-filter-item label=\"Sud\" value=\"south\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Styling the Count Badge\n\n`<mds-filter-item>` has no public CSS custom property and no shadow part: the count badge takes its colours from the item's `selected` state. To restyle the bar the items sit in, set the public `--mds-filter-*` properties on the parent `<mds-filter>`; use the semantic color roles via `rgb(var(--magma-<role>))`.\n\n```css\n.priority-filter mds-filter {\n  --mds-filter-items-background: rgb(var(--magma-wash-strong));\n  --mds-filter-items-background-active: rgb(var(--magma-accent-surface));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-filter-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-filter-item>` Outside `<mds-filter>`\n\n`<mds-filter-item>` is a compound child component. Without its parent it has no selection management, no auto-scroll, and no `mdsFilterChange` aggregation. Always wrap it in `<mds-filter>`.\n\n```html\n<!-- INCORRECT -->\n<div class=\"my-filters\">\n  <mds-filter-item label=\"Attivo\" value=\"active\"></mds-filter-item>\n  <mds-filter-item label=\"Archiviato\" value=\"archived\"></mds-filter-item>\n</div>\n\n<!-- CORRECT -->\n<mds-filter label=\"Stato\">\n  <mds-filter-item label=\"Attivo\" value=\"active\"></mds-filter-item>\n  <mds-filter-item label=\"Archiviato\" value=\"archived\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Do Not Set `selected=\"false\"` to Deselect\n\n`selected` is a boolean prop: remove the attribute entirely to deselect, as for every boolean. The runtime happens to read the string `\"false\"` as `false`, but the attribute stays in the markup until the component renders, and HTML, `[selected]` selectors and `hasAttribute()` read a present attribute as set.\n\n```html\n<!-- INCORRECT -->\n<mds-filter label=\"Stato\">\n  <mds-filter-item label=\"Attivo\" value=\"active\" selected=\"false\"></mds-filter-item>\n</mds-filter>\n\n<!-- CORRECT -->\n<mds-filter label=\"Stato\">\n  <mds-filter-item label=\"Attivo\" value=\"active\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Do Not Omit `value`\n\n`value` is the machine-readable token the parent aggregates into `mdsFilterChange`. Without it the parent's event payload is empty or meaningless for consumers - always provide a distinct, meaningful value.\n\n```html\n<!-- INCORRECT -->\n<mds-filter label=\"Priorita\">\n  <mds-filter-item label=\"Alta\"></mds-filter-item>\n  <mds-filter-item label=\"Bassa\"></mds-filter-item>\n</mds-filter>\n\n<!-- CORRECT -->\n<mds-filter label=\"Priorita\">\n  <mds-filter-item label=\"Alta\" value=\"high\"></mds-filter-item>\n  <mds-filter-item label=\"Bassa\" value=\"low\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Do Not Leave the Count Out of an `aria-label` of Your Own\n\nThe item names itself after its label and its count. An `aria-label` written on the host replaces that name as it is, and the count the item shows is visible text too: a name without it fails WCAG 2.5.3 (Label in Name), and a speech-input user saying the number does not reach the item. Put the count in the name, or leave the name to the item.\n\n```html\n<!-- INCORRECT -->\n<mds-filter label=\"Vista\">\n  <mds-filter-item aria-label=\"Vista a griglia\" icon=\"mi/baseline/grid-view\" value=\"grid\" count=\"3\"></mds-filter-item>\n</mds-filter>\n\n<!-- CORRECT -->\n<mds-filter label=\"Vista\">\n  <mds-filter-item aria-label=\"Vista a griglia, 3 risultati\" icon=\"mi/baseline/grid-view\" value=\"grid\" count=\"3\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Do Not Slot Content Inside `<mds-filter-item>`\n\n`<mds-filter-item>` has no publicly documented default or named slots. Icon, label, and count are all props. Slotting arbitrary HTML has no effect - use the dedicated props instead.\n\n```html\n<!-- INCORRECT -->\n<mds-filter label=\"Formato\">\n  <mds-filter-item value=\"pdf\">\n    <mds-icon name=\"mi/baseline/picture-as-pdf\"></mds-icon>\n    PDF\n  </mds-filter-item>\n</mds-filter>\n\n<!-- CORRECT -->\n<mds-filter label=\"Formato\">\n  <mds-filter-item icon=\"mi/baseline/picture-as-pdf\" label=\"PDF\" value=\"pdf\"></mds-filter-item>\n</mds-filter>\n```\n\n#### Do Not Listen for Native `click` Instead of `mdsFilterItemSelect`\n\nThe component handles its own toggle internally and emits `mdsFilterItemSelect` when selection changes. A native `click` listener added before the component has loaded runs before the internal toggle (listeners run in the order they were added), so it reads the old `selected` state.\n\n```html\n<!-- INCORRECT -->\n<mds-filter label=\"Stato\">\n  <mds-filter-item label=\"Attivo\" value=\"active\"></mds-filter-item>\n</mds-filter>\n<script>\n  document.querySelector('mds-filter-item[value=\"active\"]').addEventListener('click', (e) => {\n    console.log('selected?', e.target.selected); // state not yet updated\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-filter label=\"Stato\">\n  <mds-filter-item label=\"Attivo\" value=\"active\"></mds-filter-item>\n</mds-filter>\n<script>\n  document.querySelector('mds-filter-item[value=\"active\"]').addEventListener('mdsFilterItemSelect', (e) => {\n    console.log('selected:', e.detail.selected);\n  });\n</script>\n```\n\n#### Do Not Customize via Undocumented Shadow Parts or Internal Selectors\n\n`<mds-filter-item>` has no public CSS custom property and no shadow part: the count badge follows the `selected` state, and the bar is styled through the parent's public `--mds-filter-*` properties. Targeting shadow internals via `::part()`, `>>>`, or other selectors couples code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-filter-item >>> .count {\n  border-radius: 4px;\n}\nmds-filter-item::part(count) {\n  background: red;\n}\n\n/* CORRECT */\nmds-filter {\n  --mds-filter-items-background: rgb(var(--magma-wash-strong));\n  --mds-filter-items-background-active: rgb(var(--magma-accent-surface));\n}\n```\n"
      },
      "props": [
        {
          "name": "count",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "count",
          "reflectToAttr": true,
          "docs": "Shows the number of items will be filtered by the component, also read out after the label\nas a number of results",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Sets if the component is disabled or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "Sets the icon of the filter item",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": true,
          "docs": "Sets the label of the filter item",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Sets the component to selected state",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "Sets the value of the component to be used with forms",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsFilterItemSelect",
          "detail": "MdsFilterItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsFilterItemEventDetail",
            "resolved": "MdsFilterItemEventDetail",
            "references": {
              "MdsFilterItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-filter-item/meta/event-detail.ts::MdsFilterItemEventDetail",
                "referenceLocation": "MdsFilterItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the element is active",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-filter-item-count-background-default",
          "annotation": "prop",
          "docs": "Sets the default `background-color` of the count element",
          "visibility": "internal"
        },
        {
          "name": "--mds-filter-item-count-background-selected",
          "annotation": "prop",
          "docs": "Sets the `background-color` of the count element when it's selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-filter-item-count-color-default",
          "annotation": "prop",
          "docs": "Sets the default text `color` of the count element",
          "visibility": "internal"
        },
        {
          "name": "--mds-filter-item-count-color-selected",
          "annotation": "prop",
          "docs": "Sets the `color` of the count element when it's selected",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-filter"
      ],
      "dependencies": [
        "mds-icon",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-filter-item": [
          "mds-icon",
          "mds-text"
        ],
        "mds-filter": [
          "mds-filter-item"
        ]
      },
      "storybook": "ui-filter-filter-item--docs"
    },
    {
      "filePath": "src/components/mds-header/mds-header.tsx",
      "encapsulation": "shadow",
      "tag": "mds-header",
      "readme": "# mds-header\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "menu - The container element of the modal"
        },
        {
          "name": "slot",
          "text": "- Add `mds-header-bar` element/s."
        },
        {
          "name": "slot",
          "text": "menu - Put actions and other contents that will be shown as mobile menu. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "category",
          "text": "structure"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-header>` web component is the top-level page header container of the Magma Design System. It is a compound parent that wraps one or more `<mds-header-bar>` elements, orchestrating their scroll-driven appearance, auto-hide visibility, and an optional mobile menu rendered as a side modal.\n\n#### Semantic Behavior\n\n- **Compound parent**: Hosts `<mds-header-bar>` children in the default slot and relays its `menu` and `nav` settings down to the bar.\n- **In the flow, and it stays put**: The header takes the room of its bar at the top of the page, so the page starts under it with no padding of its own, and it stays at the top of the window while the page scrolls (`position: sticky`, `surfaces/band` of the design language). The room is the bar alone, whatever the appearance: the floating bar (`'inline'`) stands its margin lower, over the space under the header, so the page never moves when `appearanceSet` changes the appearance. Sticky holds inside the box of the parent: place the header first in the element that holds the whole page (`body`, or the root of the application); an ancestor with `overflow: hidden` or `auto` that does not scroll the page stops it (`overflow: clip` does not).\n- **Room for the focus**: While a header is on the page, the styles of Magma (`base.css`) stop a field reached with Shift+Tab under the bar, `rhythm/between-fields` lower (`scroll-padding-top`, WCAG 2.4.11), with no script that measures it: the bar is one row, its inset and a button. Content taller than a button (a logo over two lines of text) makes the bar taller than that room.\n- **Clicks**: The box of the header takes no click, only its bar, its backdrop and its menu do: the space around the floating bar and where the bar was before auto-hide hid it leave the page under them usable.\n- **Mobile menu**: A `[slot=\"menu\"]` child is rendered inside a right-positioned modal. When it is absent there is no modal, and the bar receives `menu=\"none\"` whatever `menu` says, so no hamburger shows that would open nothing.\n- **Open/close control**: The menu modal is opened by the bar's hamburger or programmatically via the `setOpened()` method; when the user closes it, `mdsHeaderClose` is emitted (with the bound bar).\n- **Scroll-driven appearance**: When `appearanceSet` names two appearances, `appearance` swaps between them as the page scrolls past its pixel threshold (300 when the third token is omitted).\n- **Auto-hide on scroll**: When `autoHide` is set, scrolling down past that pixel offset hides the bar and scrolling up reveals it again, governed by `threshold` as the directional margin.\n- **Visibility event**: Any change to `visibility` (`'visible'`/`'hidden'`) emits `mdsHeaderVisibilityChange`, whose `detail.visibility` is that string.\n\n#### Properties & Visual Configurations\n\n- **`appearance`** is the bar's current visual mode (`'stripe'` or `'inline'`) and is mutable because the component rewrites it as the page scrolls. `'inline'` floats the bar, at most as wide as the frame of the page (`--magma-width-page`) with its padding outside it, so on a wide window its content stays on the frame, as in `'stripe'`.\n- **`appearanceSet`** is a space/comma-separated string declaring scroll behavior as three tokens: initial appearance, changed appearance, and the `scrollY` pixel threshold (e.g. `\"stripe, inline 200\"`). Use it instead of `appearance` when the header should transform on scroll; `appearance` alone keeps a fixed look.\n- **`autoHide`** is the pixel offset past which the bar starts hiding on downward scroll; leave it unset to keep the bar always present.\n- **`threshold`** tunes how many pixels of opposite-direction scroll are required to flip the auto-hide state - raise it to make hide/show less twitchy.\n- **`menu`** and **`nav`** select on which viewports the hamburger menu and the navigation are shown (`'all'`, `'desktop'`, `'mobile'`, `'none'`); they are relayed to the child bar.\n- **`hideBackdrop`** removes the blurred backdrop layer shown behind the bar when its appearance is `'inline'`.\n- **`visibility`** reflects the current shown/hidden state of the bar and can be set to force it.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-header>` 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#### Minimal Header with Navigation Bar\n\nThe default form. Place the header first in the page and exactly one `<mds-header-bar>` in its default slot: the header stands in the flow and stays put as the page scrolls, so the page starts under the bar with no padding of its own. The bar receives the `menu` and `nav` breakpoint settings from the parent automatically; without a `menu` slot it receives `menu=\"none\"`, so it shows no hamburger that would open nothing.\n\n```html\n<mds-header>\n  <mds-header-bar>\n    <mds-img class=\"w-800\" src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n    <mds-button slot=\"nav\" label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n    <mds-button slot=\"nav\" label=\"Registrati\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-header-bar>\n</mds-header>\n```\n\n#### Mobile Menu via the `menu` Slot\n\nProvide a `[slot=\"menu\"]` child to enable the hamburger-triggered side modal. When this slot is filled, the mobile menu icon is shown according to the `menu` breakpoint prop; without it the bar receives `menu=\"none\"` whatever `menu` says, and shows no hamburger.\n\n```html\n<mds-header menu=\"mobile\">\n  <mds-header-bar>\n    <mds-img class=\"w-800\" src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n    <mds-button slot=\"nav\" label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n  </mds-header-bar>\n\n  <div slot=\"menu\">\n    <div class=\"p-600\">\n      <mds-button label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n      <mds-button label=\"Registrati\" variant=\"primary\" tone=\"strong\"></mds-button>\n    </div>\n  </div>\n</mds-header>\n```\n\n#### Inline Appearance (Floating Bar)\n\nSet `appearance=\"inline\"` to detach the bar from the top edge and give it a rounded, floating look. A blurred backdrop is shown by default; add `hide-backdrop` to remove it.\n\n```html\n<mds-header appearance=\"inline\">\n  <mds-header-bar>\n    <mds-img class=\"w-800\" src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n    <mds-button slot=\"nav\" label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n  </mds-header-bar>\n</mds-header>\n```\n\n#### Scroll-Driven Appearance Change via `appearance-set`\n\nUse `appearance-set` to declare an initial appearance, a changed appearance, and a scroll threshold in pixels. The component swaps `appearance` automatically as the page scrolls past the threshold - no JavaScript needed. Do not combine `appearance-set` with manual writes to `appearance`.\n\n```html\n<!-- Starts inline (floating), switches to stripe (full-width) after 300 px of scroll -->\n<mds-header appearance-set=\"inline, stripe 300\" appearance=\"inline\">\n  <mds-header-bar>\n    <mds-img class=\"w-800\" src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n  </mds-header-bar>\n</mds-header>\n```\n\n#### Auto-Hide on Downward Scroll\n\nSet `auto-hide` to the pixel offset at which the bar should start hiding when the user scrolls down. The bar reappears when the user scrolls back up. Use `threshold` (default `1`) to control how many pixels of reverse-scroll are required before the bar snaps back - raise it to reduce twitchiness.\n\n```html\n<mds-header auto-hide=\"300\" threshold=\"10\">\n  <mds-header-bar>\n    <mds-img class=\"w-800\" src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n    <mds-button slot=\"nav\" label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n  </mds-header-bar>\n</mds-header>\n```\n\n#### Controlling Menu and Nav Breakpoints\n\n`menu` controls on which viewports the hamburger icon is visible; `nav` controls on which viewports the inline navigation is visible. Both accept `'all'`, `'desktop'`, `'mobile'`, or `'none'`.\n\n```html\n<!-- Hamburger shown on all screen sizes; inline nav shown only on desktop -->\n<mds-header menu=\"all\" nav=\"desktop\">\n  <mds-header-bar>\n    <mds-img class=\"w-800\" src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n    <mds-button slot=\"nav\" label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n  </mds-header-bar>\n\n  <div slot=\"menu\">\n    <div class=\"p-600\">\n      <mds-button label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n    </div>\n  </div>\n</mds-header>\n```\n\n#### Reacting to Visibility Changes\n\nListen for `mdsHeaderVisibilityChange` to know when the bar is hidden or shown by auto-hide. The event detail carries `visibility` as the string `'visible'` or `'hidden'`.\n\n```html\n<mds-header auto-hide=\"200\" id=\"siteHeader\">\n  <mds-header-bar>\n    <mds-img class=\"w-800\" src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n  </mds-header-bar>\n</mds-header>\n\n<script>\n  document.getElementById('siteHeader').addEventListener('mdsHeaderVisibilityChange', (e) => {\n    console.log('header visibile:', e.detail.visibility);\n  });\n</script>\n```\n\n#### Reacting to Mobile Menu Close\n\nListen for `mdsHeaderClose` to run cleanup logic when the side modal is dismissed. The event detail carries the bound `<mds-header-bar>` reference.\n\n```html\n<mds-header id=\"siteHeader\">\n  <mds-header-bar>\n    <mds-img class=\"w-800\" src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n  </mds-header-bar>\n  <div slot=\"menu\">\n    <mds-button label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n  </div>\n</mds-header>\n\n<script>\n  document.getElementById('siteHeader').addEventListener('mdsHeaderClose', (e) => {\n    console.log('menu chiuso, bar:', e.detail.bar);\n  });\n</script>\n```\n\n#### Programmatic Open/Close via `setOpened()`\n\nUse the `setOpened()` method to open or close the mobile menu from JavaScript - for example after a navigation event inside the menu panel.\n\n```html\n<mds-header id=\"siteHeader\">\n  <mds-header-bar>\n    <mds-img class=\"w-800\" src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n  </mds-header-bar>\n  <div slot=\"menu\">\n    <mds-button label=\"Vai alla home\" id=\"homeBtn\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </div>\n</mds-header>\n\n<script>\n  document.getElementById('homeBtn').addEventListener('click', async () => {\n    window.location.href = '/';\n    await document.getElementById('siteHeader').setOpened(false);\n  });\n</script>\n```\n\n#### Styling Customization\n\nCustomize the header through its public `--mds-header-*` CSS custom properties. Use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast continue to work. `--mds-header-color` also colors the icons, the hamburger of the child `mds-header-bar` included.\n\n```css\nmds-header {\n  --mds-header-color: rgb(var(--magma-text-muted));\n  --mds-header-z-index: 200;\n}\n\n/* Inline appearance: wider floating margin on desktop */\nmds-header[appearance='inline'] {\n  --mds-header-inline-margin: 2rem;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-header>`. 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 Place `<mds-header-bar>` Outside `<mds-header>`\n\n`<mds-header-bar>` is a compound child; it must be a direct slot child of `<mds-header>`, which relays breakpoint and appearance state down to it. Using the bar standalone breaks that communication: its hamburger has no menu to open, and appearance and auto-hide do not apply.\n\n```html\n<!-- INCORRECT -->\n<mds-header-bar>\n  <mds-img src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n</mds-header-bar>\n\n<!-- CORRECT -->\n<mds-header>\n  <mds-header-bar>\n    <mds-img src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n  </mds-header-bar>\n</mds-header>\n```\n\n#### Do Not Reserve the Room of the Bar by Hand\n\nThe header stands in the flow at the top of the page and stays put as it scrolls: the page already starts under its bar. A `padding-top` or a margin that made room for a fixed bar doubles it.\n\n```html\n<!-- INCORRECT -->\n<body class=\"pt-1700\">\n  <mds-header>\n    <mds-header-bar>...</mds-header-bar>\n  </mds-header>\n  <main class=\"page-frame\">...</main>\n</body>\n\n<!-- CORRECT -->\n<body>\n  <mds-header>\n    <mds-header-bar>...</mds-header-bar>\n  </mds-header>\n  <main class=\"page-frame\">...</main>\n</body>\n```\n\n#### Do Not Wrap the Header Alone or Place It After the Content\n\nSticky holds inside the box of the parent: a header alone in a wrapper scrolls away with it, and a header placed after the content stands at the end of the page. Make it the first child of the element that holds the whole page.\n\n```html\n<!-- INCORRECT -->\n<div class=\"top\">\n  <mds-header>\n    <mds-header-bar>...</mds-header-bar>\n  </mds-header>\n</div>\n<main class=\"page-frame\">...</main>\n\n<!-- CORRECT -->\n<mds-header>\n  <mds-header-bar>...</mds-header-bar>\n</mds-header>\n<main class=\"page-frame\">...</main>\n```\n\n#### Do Not Drive Scroll Appearance with JavaScript When `appearance-set` Is Available\n\nManually toggling `appearance` on a scroll listener duplicates what `appearance-set` already handles declaratively, and once `appearance-set` is also set the component's own scroll handler rewrites `appearance` on every scroll.\n\n```html\n<!-- INCORRECT -->\n<mds-header id=\"hdr\" appearance=\"inline\">\n  <mds-header-bar>...</mds-header-bar>\n</mds-header>\n<script>\n  window.addEventListener('scroll', () => {\n    document.getElementById('hdr').appearance = window.scrollY > 300 ? 'stripe' : 'inline';\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-header appearance-set=\"inline, stripe 300\" appearance=\"inline\">\n  <mds-header-bar>...</mds-header-bar>\n</mds-header>\n```\n\n#### Do Not Omit the `menu` Slot When Providing a Hamburger-Only Nav\n\nIf no `[slot=\"menu\"]` child is present there is no modal to open, so the bar shows no hamburger icon whatever `menu` says: on the viewports where `nav` hides the navigation, nothing is left to navigate with. Always provide menu content when you want the mobile toggle to be visible.\n\n```html\n<!-- INCORRECT: no hamburger and, on mobile, no navigation -->\n<mds-header menu=\"mobile\">\n  <mds-header-bar>\n    <mds-img src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n    <mds-button slot=\"nav\" label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n  </mds-header-bar>\n</mds-header>\n\n<!-- CORRECT -->\n<mds-header menu=\"mobile\">\n  <mds-header-bar>\n    <mds-img src=\"/logo.svg\" alt=\"Logo\"></mds-img>\n    <mds-button slot=\"nav\" label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n  </mds-header-bar>\n  <div slot=\"menu\">\n    <mds-button label=\"Accedi\" variant=\"dark\" tone=\"outline\"></mds-button>\n  </div>\n</mds-header>\n```\n\n#### Do Not Listen to Native `scroll` Events to Detect Auto-Hide State\n\nThe component already emits `mdsHeaderVisibilityChange` when the bar flips between hidden and visible. Attaching a second `scroll` listener couples your code to the same threshold logic and risks running out of sync.\n\n```html\n<!-- INCORRECT -->\n<mds-header auto-hide=\"300\" id=\"hdr\">\n  <mds-header-bar>...</mds-header-bar>\n</mds-header>\n<script>\n  window.addEventListener('scroll', () => {\n    const hidden = window.scrollY > 300;\n    document.body.classList.toggle('header-hidden', hidden);\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-header auto-hide=\"300\" id=\"hdr\">\n  <mds-header-bar>...</mds-header-bar>\n</mds-header>\n<script>\n  document.getElementById('hdr').addEventListener('mdsHeaderVisibilityChange', (e) => {\n    document.body.classList.toggle('header-hidden', e.detail.visibility === 'hidden');\n  });\n</script>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Internal Modal\n\nThe side-modal container is exposed as `::part(menu)` and its stacking is controllable via `--mds-header-z-index`. Do not use `>>>`, `/deep/`, or undocumented internal selectors.\n\n```css\n/* INCORRECT */\nmds-header >>> .menu mds-modal {\n  background: red;\n}\n\n/* CORRECT */\nmds-header {\n  --mds-header-z-index: 500;\n}\nmds-header::part(menu) {\n  /* documented part - safe to target */\n}\n```\n"
      },
      "props": [
        {
          "name": "appearance",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": true,
          "attr": "appearance",
          "reflectToAttr": true,
          "docs": "Sets the appearance of the header bar element when loaded,\nit can be changed depending on how `appearance-set` attribute is set",
          "docsTags": [
            {
              "name": "default",
              "text": "'stripe'"
            }
          ],
          "default": "'stripe'",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "appearanceSet",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "appearance-set",
          "reflectToAttr": true,
          "docs": "Sets the appearance of the header bar element depending on the scroll position: three values,\nthe initial appearance, the appearance once scrolled and the `window.scrollY` threshold.\n`stripe, inline 200` starts with the stripe appearance and changes to inline once the page is\nscrolled more than 199 pixels",
          "docsTags": [
            {
              "name": "example",
              "text": "'stripe, inline 200'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "autoHide",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "auto-hide",
          "reflectToAttr": true,
          "docs": "When the page is scrolled down, the component mds-header-bar is hidden starting\nfrom the `autoHide` attribute's value, then if the page is scrolled up it is shown again",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hideBackdrop",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-backdrop",
          "reflectToAttr": true,
          "docs": "Hides the backdrop shown when the mds-header-bar attribute appearace is set to `inline`",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "menu",
          "type": "\"all\" | \"desktop\" | \"mobile\" | \"none\"",
          "complexType": {
            "original": "HeaderBarMenuType",
            "resolved": "\"all\" | \"desktop\" | \"mobile\" | \"none\"",
            "references": {
              "HeaderBarMenuType": {
                "location": "import",
                "path": "@type/header-bar",
                "id": "src/type/header-bar.ts::HeaderBarMenuType",
                "referenceLocation": "HeaderBarMenuType"
              }
            }
          },
          "mutable": false,
          "attr": "menu",
          "reflectToAttr": true,
          "docs": "Sets the visibility type of the hamburger menu of mds-header-bar",
          "docsTags": [
            {
              "name": "default",
              "text": "'mobile'"
            }
          ],
          "default": "'mobile'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "desktop",
              "type": "string"
            },
            {
              "value": "mobile",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "nav",
          "type": "\"all\" | \"desktop\" | \"mobile\" | \"none\"",
          "complexType": {
            "original": "HeaderBarNavType",
            "resolved": "\"all\" | \"desktop\" | \"mobile\" | \"none\"",
            "references": {
              "HeaderBarNavType": {
                "location": "import",
                "path": "@type/header-bar",
                "id": "src/type/header-bar.ts::HeaderBarNavType",
                "referenceLocation": "HeaderBarNavType"
              }
            }
          },
          "mutable": false,
          "attr": "nav",
          "reflectToAttr": true,
          "docs": "Sets the visibility type of the navigation menu of mds-header-bar",
          "docsTags": [
            {
              "name": "default",
              "text": "'desktop'"
            }
          ],
          "default": "'desktop'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "desktop",
              "type": "string"
            },
            {
              "value": "mobile",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "threshold",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "threshold",
          "reflectToAttr": true,
          "docs": "Sets the threshold margin to trigger hide or show status of the `mds-header-bar` when the page is scrolled",
          "docsTags": [
            {
              "name": "default",
              "text": "1"
            }
          ],
          "default": "1",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "visibility",
          "type": "\"hidden\" | \"visible\" | undefined",
          "complexType": {
            "original": "'hidden' | 'visible'",
            "resolved": "\"hidden\" | \"visible\" | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "visibility",
          "reflectToAttr": true,
          "docs": "Sets the visibility type of the navigation menu of mds-header-bar",
          "docsTags": [
            {
              "name": "default",
              "text": "'visible'"
            }
          ],
          "default": "'visible'",
          "values": [
            {
              "value": "hidden",
              "type": "string"
            },
            {
              "value": "visible",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "setOpened",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(isOpened?: boolean) => Promise<void>",
            "parameters": [
              {
                "name": "isOpened",
                "type": "boolean",
                "docs": "whether the header should be opened"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "setOpened(isOpened?: boolean) => Promise<void>",
          "parameters": [
            {
              "name": "isOpened",
              "type": "boolean",
              "docs": "whether the header should be opened"
            }
          ],
          "docs": "Opens or closes the header.",
          "docsTags": [
            {
              "name": "param",
              "text": "isOpened whether the header should be opened"
            }
          ]
        }
      ],
      "events": [
        {
          "event": "mdsHeaderClose",
          "detail": "MdsHeaderEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsHeaderEventDetail",
            "resolved": "MdsHeaderEventDetail",
            "references": {
              "MdsHeaderEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-header/meta/event-detail.ts::MdsHeaderEventDetail",
                "referenceLocation": "MdsHeaderEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is closed",
          "docsTags": []
        },
        {
          "event": "mdsHeaderVisibilityChange",
          "detail": "MdsHeaderVisibilityEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsHeaderVisibilityEventDetail",
            "resolved": "MdsHeaderVisibilityEventDetail",
            "references": {
              "MdsHeaderVisibilityEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-header/meta/event-detail.ts::MdsHeaderVisibilityEventDetail",
                "referenceLocation": "MdsHeaderVisibilityEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component mds-header-bar is shown or hidden",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-header-backdrop-background-image",
          "annotation": "prop",
          "docs": "Sets the background-image of the backdrop element visibile when the component attribute `appearance` is set to `inline`, by default is shown when mds-pref-consumtion is set to `medium`",
          "visibility": "public"
        },
        {
          "name": "--mds-header-backdrop-blur-strength",
          "annotation": "prop",
          "docs": "Sets the blur strength of the backdrop element visibile when the component attribute `appearance` is set to `inline`, by default is shown when mds-pref-consumtion is set to `high`",
          "visibility": "internal"
        },
        {
          "name": "--mds-header-backdrop-height",
          "annotation": "prop",
          "docs": "Sets the height of the backdrop element visibile when the component attribute `appearance` is set to `inline`",
          "visibility": "internal"
        },
        {
          "name": "--mds-header-backdrop-show",
          "annotation": "prop",
          "docs": "Sets if the backdrop element is visible or not, only visible when the component attribute `appearance` is set to `inline`",
          "visibility": "internal"
        },
        {
          "name": "--mds-header-color",
          "annotation": "prop",
          "docs": "Sets the text color of the header and the color of its icons, the hamburger toggler of `mds-header-bar` included",
          "visibility": "public"
        },
        {
          "name": "--mds-header-hidden-bar-translate-inline",
          "annotation": "prop",
          "docs": "Sets translateY value for the appearance inline `mds-header-bar` element",
          "visibility": "internal"
        },
        {
          "name": "--mds-header-hidden-bar-translate-stripe",
          "annotation": "prop",
          "docs": "Sets translateY value for the appearance stripe `mds-header-bar` element",
          "visibility": "internal"
        },
        {
          "name": "--mds-header-icon-color",
          "annotation": "prop",
          "docs": "Sets the color of the icons of the header, the hamburger toggler of `mds-header-bar` included",
          "visibility": "internal"
        },
        {
          "name": "--mds-header-inline-margin",
          "annotation": "prop",
          "docs": "Sets inline margin of `the mds-header-bar` when attribute `appearance` is set to `inline`",
          "visibility": "public"
        },
        {
          "name": "--mds-header-inline-margin-mobile",
          "annotation": "prop",
          "docs": "Sets inline margin on mobile viewport of `the mds-header-bar` when attribute `appearance` is set to `inline`",
          "visibility": "public"
        },
        {
          "name": "--mds-header-z-index",
          "annotation": "prop",
          "docs": "Sets the z-index of the modal",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-header-bar` element/s."
        },
        {
          "name": "menu",
          "docs": "Put actions and other contents that will be shown as mobile menu. Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "menu",
          "docs": "The container element of the modal"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-modal"
      ],
      "dependencyGraph": {
        "mds-header": [
          "mds-modal"
        ],
        "mds-modal": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-header--docs"
    },
    {
      "filePath": "src/components/mds-header-bar/mds-header-bar.tsx",
      "encapsulation": "shadow",
      "tag": "mds-header-bar",
      "readme": "# mds-header-bar\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "actions - Selects the element which wraps `nav` and `hamburger` parts"
        },
        {
          "name": "part",
          "text": "content - The row that holds the default slot, on the left, and the `actions`"
        },
        {
          "name": "part",
          "text": "hamburger - Selects the `hamburger` menu action element"
        },
        {
          "name": "part",
          "text": "nav - Selects the `nav` element that contains the horizontal menu"
        },
        {
          "name": "slot",
          "text": "- Put contents, like logo and a small description shown on the left of the component. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "slot",
          "text": "nav - Put the actions shown when the component is on desktop mode. Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "parent",
          "text": "mds-header"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-header-bar>` web component is the top bar of a Magma application layout: it holds the product branding on the left and the primary navigation actions on the right, collapsing those actions into a hamburger menu on smaller viewports. It is a structural compound element, typically nested inside an `<mds-header>`, with no native HTML primitive equivalent.\n\n#### Semantic Behavior\n\n- **Branding region**: The default (unnamed) slot is the logo/branding area on the left; place text, HTML, or components such as a logo with a short description here.\n- **Navigation region**: The `nav` named slot holds the horizontal desktop actions, wrapped in a real `<nav>` element; `mds-button` elements are the recommended children.\n- **Conditional nav rendering**: The `<nav>` is shown only when `nav` is not `'none'` and a `slot=\"nav\"` child is present, also when it is added after the first render, so an empty header collapses cleanly.\n- **Hamburger trigger**: When `menu` is not `'none'` the component renders a menu button that opens the menu on click, icon-only and named in the page language (the `lang` of `<html>`) (\"Open menu\").\n- **Open event**: Clicking the hamburger emits the bubbling `mdsHeaderBarOpen` event and opens the drawer on the surrounding `mds-header`.\n- **Imperative open control**: The public `setOpened(isOpened = true)` method opens or closes the drawer of the surrounding `mds-header`, as the hamburger does; outside an `mds-header` it does nothing.\n- **The frame of the page**: The content of the bar stops at the width of the page, `--magma-width-page` (1280px), centred, with the gutter of the page, `--magma-width-page-gutter` (`600`), outside it: it starts where the content of an element with the `page-frame` utility starts, at every width (`widths/page` of the design language). A theme that moves the two tokens moves the bar and the page together.\n\n#### Properties & Visual Configurations\n\nThe two props are both responsive visibility switches sharing the value set `'all' | 'desktop' | 'mobile' | 'none'`, where the value names the breakpoint(s) at which the region is shown (`'none'` hides it entirely, `'all'` always shows it).\n\n- **`menu`** controls when the hamburger button appears. It defaults to `'mobile'`, so the collapsed menu surfaces only on small screens; set it to `'all'` to always expose the menu trigger or `'none'` to suppress it.\n- **`nav`** controls when the inline horizontal navigation is shown. It defaults to `'desktop'`, the typical complement to `menu`: links sit inline on wide viewports and fold into the hamburger on narrow ones.\n\nInside `mds-header` both are written by the header from its own `menu` and `nav` when it loads, replacing the values set on the bar: set them on `mds-header` there.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-header-bar>` 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#### Standard Header Bar with Logo and Navigation\n\nThe canonical form. Place branding content in the default slot (left side) and `<mds-button>` elements in the `nav` slot (right side). With the defaults (`menu=\"mobile\"` and `nav=\"desktop\"`) the nav is visible on desktop and the hamburger appears only on mobile.\n\n```html\n<mds-header-bar>\n  <div class=\"flex gap-200 items-center\">\n    <mds-img src=\"./logo.svg\" alt=\"Maggioli\"></mds-img>\n    <mds-text typography=\"h6\">Portale Enti</mds-text>\n  </div>\n  <mds-button slot=\"nav\" variant=\"dark\" tone=\"outline\">Accedi</mds-button>\n  <mds-button slot=\"nav\" variant=\"primary\" tone=\"strong\">Registrati</mds-button>\n</mds-header-bar>\n```\n\n#### Nested Inside `mds-header`\n\n`<mds-header-bar>` is a structural sub-component of [`mds-header`](../mds-header/AGENTS.md). Place it inside `<mds-header>` so that the hamburger click is wired to the drawer automatically; the component calls `mds-header.setOpened(true)` on its nearest `mds-header` ancestor.\n\n```html\n<mds-header>\n  <mds-header-bar>\n    <mds-text typography=\"h6\">Gestione Pratiche</mds-text>\n    <mds-button slot=\"nav\" variant=\"dark\" tone=\"text\" icon=\"mi/baseline/person\">Account</mds-button>\n    <mds-button slot=\"nav\" variant=\"primary\" tone=\"strong\">Nuovo documento</mds-button>\n  </mds-header-bar>\n  <!-- drawer and other header regions go here -->\n</mds-header>\n```\n\n#### On the Frame of the Page\n\nThe content of the bar stands on the frame of the page. Put the `page-frame` utility on the content of the page, one element, and its edges meet the edges of the content of the bar at every width; write no width or gutter of your own.\n\n```html\n<mds-header>\n  <mds-header-bar>\n    <mds-text typography=\"h6\">Gestione Pratiche</mds-text>\n  </mds-header-bar>\n</mds-header>\n<main class=\"page-frame\">\n  <h1 class=\"text-title-page\">Pratiche</h1>\n</main>\n```\n\n#### Controlling Hamburger Visibility\n\nUse the `menu` prop to decide when the hamburger button is shown (inside `mds-header`, set `menu` and `nav` on `mds-header`: it overwrites the bar's values when it loads). The default `mobile` is correct for most apps. Use `all` when you always want a drawer-style menu regardless of viewport, or `none` to remove the hamburger entirely (e.g. a public marketing bar with no drawer).\n\n```html\n<!-- Always show the hamburger (single-column layout, any viewport) -->\n<mds-header-bar menu=\"all\">\n  <mds-text typography=\"h6\">Area Personale</mds-text>\n</mds-header-bar>\n\n<!-- No hamburger at all (branding-only bar) -->\n<mds-header-bar menu=\"none\">\n  <mds-img src=\"./logo.svg\" alt=\"Maggioli\"></mds-img>\n</mds-header-bar>\n```\n\n#### Controlling Inline Navigation Visibility\n\nUse the `nav` prop symmetrically with `menu`. The default `desktop` shows the nav slot only on wide viewports. Set `nav=\"all\"` to always show inline links, `nav=\"mobile\"` to show them only on small screens, or `nav=\"none\"` to suppress the nav region entirely.\n\n```html\n<!-- Always show inline nav (no responsive collapsing) -->\n<mds-header-bar menu=\"none\" nav=\"all\">\n  <mds-img src=\"./logo.svg\" alt=\"Maggioli\"></mds-img>\n  <mds-button slot=\"nav\" variant=\"dark\" tone=\"text\">Chi siamo</mds-button>\n  <mds-button slot=\"nav\" variant=\"dark\" tone=\"text\">Servizi</mds-button>\n  <mds-button slot=\"nav\" variant=\"primary\" tone=\"strong\">Contatti</mds-button>\n</mds-header-bar>\n```\n\n#### Listening for the Hamburger Open Event\n\nListen to `mdsHeaderBarOpen` (bubbles) to react when the user taps the hamburger - for example to track analytics or to open a custom side panel not managed by `mds-header`.\n\n```html\n<mds-header-bar id=\"main-bar\">\n  <mds-text typography=\"h6\">Applicazione</mds-text>\n</mds-header-bar>\n\n<script>\n  document.getElementById('main-bar').addEventListener('mdsHeaderBarOpen', () => {\n    console.log('menu aperto');\n  });\n</script>\n```\n\n#### Programmatic Open via `setOpened`\n\nTo open or close the drawer from external code - for instance after route navigation in a single-page app - call `setOpened` on the surrounding `mds-header`, or on the bar, which hands it to its `mds-header`.\n\n```html\n<mds-header id=\"main-header\">\n  <mds-header-bar>\n    <mds-text typography=\"h6\">Dashboard</mds-text>\n  </mds-header-bar>\n  <div slot=\"menu\">\n    <mds-button label=\"Pratiche\" variant=\"dark\" tone=\"text\"></mds-button>\n  </div>\n</mds-header>\n\n<script>\n  // Close the drawer after the user selects a menu item\n  const header = document.getElementById('main-header');\n  header.setOpened(false);\n</script>\n```\n\n#### Styling the Hamburger Icon Color\n\n`mds-header-bar` has no public CSS custom property. Inside an `mds-header`, the hamburger takes the header's public `--mds-header-color`: set it on the header. To color the hamburger of a bar used on its own, set `fill` on its documented `hamburger` part. Use a semantic color role wrapped with `rgb(var(--magma-<role>))` so dark-mode works automatically.\n\n```css\nmds-header {\n  --mds-header-color: rgb(var(--magma-accent-fg));\n}\n\nmds-header-bar::part(hamburger) {\n  fill: rgb(var(--magma-accent-fg));\n}\n```\n\n#### Styling via Shadow Parts\n\nThe four documented shadow parts (`content`, `actions`, `nav`, `hamburger`) let you adjust layout without piercing the shadow DOM. Target only these documented parts.\n\n```css\n/* Increase the gap between the nav buttons and the hamburger */\nmds-header-bar::part(actions) {\n  gap: calc(var(--spacing) * 600);\n}\n\n/* Visually highlight the hamburger button in a branded theme */\nmds-header-bar::part(hamburger) {\n  border-radius: var(--magma-radius-md);\n  background-color: rgb(var(--magma-accent-surface));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-header-bar>`. 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-header-bar` Standalone Outside `mds-header`\n\n`<mds-header-bar>` is a structural sub-component of [`mds-header`](../mds-header/AGENTS.md). Used alone, the hamburger click has no `mds-header` ancestor to call `setOpened` on, so the drawer never opens. Always place it inside `<mds-header>` unless you have fully replaced drawer management with `mdsHeaderBarOpen` listeners.\n\n```html\n<!-- INCORRECT -->\n<mds-header-bar>\n  <mds-text typography=\"h6\">Portale</mds-text>\n</mds-header-bar>\n\n<!-- CORRECT -->\n<mds-header>\n  <mds-header-bar>\n    <mds-text typography=\"h6\">Portale</mds-text>\n  </mds-header-bar>\n</mds-header>\n```\n\n#### Do Not Put Navigation Links in the Default Slot\n\nThe default slot is the branding region (left side). Navigation actions must go in the `nav` named slot so the component can apply responsive visibility rules and wrap them in the `<nav>` element for landmark semantics.\n\n```html\n<!-- INCORRECT -->\n<mds-header-bar>\n  <mds-img src=\"./logo.svg\" alt=\"Maggioli\"></mds-img>\n  <mds-button variant=\"dark\" tone=\"text\">Servizi</mds-button>\n  <mds-button variant=\"primary\" tone=\"strong\">Accedi</mds-button>\n</mds-header-bar>\n\n<!-- CORRECT -->\n<mds-header-bar>\n  <mds-img src=\"./logo.svg\" alt=\"Maggioli\"></mds-img>\n  <mds-button slot=\"nav\" variant=\"dark\" tone=\"text\">Servizi</mds-button>\n  <mds-button slot=\"nav\" variant=\"primary\" tone=\"strong\">Accedi</mds-button>\n</mds-header-bar>\n```\n\n#### Do Not Set Both `menu` and `nav` to `none` Without a Replacement\n\nSetting both to `none` hides all interactive regions and leaves a branding-only bar with no way to navigate, which is rarely the intended result. If the design truly needs a pure branding strip, be explicit about it and confirm it is intentional; otherwise keep at least one region visible.\n\n```html\n<!-- INCORRECT (navigation is invisible and unreachable) -->\n<mds-header-bar menu=\"none\" nav=\"none\">\n  <mds-img src=\"./logo.svg\" alt=\"Maggioli\"></mds-img>\n  <mds-button slot=\"nav\" variant=\"dark\" tone=\"text\">Servizi</mds-button>\n</mds-header-bar>\n\n<!-- CORRECT (at least one region stays visible) -->\n<mds-header-bar menu=\"none\" nav=\"all\">\n  <mds-img src=\"./logo.svg\" alt=\"Maggioli\"></mds-img>\n  <mds-button slot=\"nav\" variant=\"dark\" tone=\"text\">Servizi</mds-button>\n</mds-header-bar>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Hamburger or Nav\n\n`mds-header-bar` has no public CSS custom property: the documented customization hooks are the shadow parts `content`, `actions`, `nav`, `hamburger`, and, inside an `mds-header`, the header's public `--mds-header-color`, which colors the hamburger too. Targeting undocumented internal classes couples your code to implementation details that can change at any minor release.\n\n```css\n/* INCORRECT */\nmds-header-bar >>> .menu {\n  fill: red;\n}\nmds-header-bar::part(icon) {\n  fill: blue;\n}\n\n/* CORRECT */\nmds-header-bar::part(hamburger) {\n  background-color: rgb(var(--magma-wash-base));\n  fill: rgb(var(--magma-accent-fg));\n}\n```\n\n#### Do Not Listen to `click` on the Hamburger Instead of `mdsHeaderBarOpen`\n\nA `click` listener on the host fires for every click inside the bar (logo, nav buttons), not only on the hamburger. Use the documented `mdsHeaderBarOpen` event, which bubbles and fires only when the hamburger is pressed.\n\n```html\n<!-- INCORRECT -->\n<mds-header-bar id=\"bar\">...</mds-header-bar>\n<script>\n  document.getElementById('bar').addEventListener('click', handleMenu);\n</script>\n\n<!-- CORRECT -->\n<mds-header-bar id=\"bar\">...</mds-header-bar>\n<script>\n  document.getElementById('bar').addEventListener('mdsHeaderBarOpen', handleMenu);\n</script>\n```\n\n#### Do Not Set `menu` or `nav` to an Undocumented String Value\n\nThe accepted values for both props are `'all' | 'desktop' | 'mobile' | 'none'`. Strings outside that set are not validated: any value other than `none` shows the region on every viewport, as `all` does, producing unexpected layout.\n\n```html\n<!-- INCORRECT -->\n<mds-header-bar menu=\"always\" nav=\"never\">...</mds-header-bar>\n<mds-header-bar menu=\"true\" nav=\"false\">...</mds-header-bar>\n\n<!-- CORRECT -->\n<mds-header-bar menu=\"all\" nav=\"none\">...</mds-header-bar>\n```\n"
      },
      "props": [
        {
          "name": "menu",
          "type": "\"all\" | \"desktop\" | \"mobile\" | \"none\"",
          "complexType": {
            "original": "HeaderBarMenuType",
            "resolved": "\"all\" | \"desktop\" | \"mobile\" | \"none\"",
            "references": {
              "HeaderBarMenuType": {
                "location": "import",
                "path": "@type/header-bar",
                "id": "src/type/header-bar.ts::HeaderBarMenuType",
                "referenceLocation": "HeaderBarMenuType"
              }
            }
          },
          "mutable": false,
          "attr": "menu",
          "reflectToAttr": true,
          "docs": "Sets the visibility type of the hamburger menu",
          "docsTags": [
            {
              "name": "default",
              "text": "'mobile'"
            }
          ],
          "default": "'mobile'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "desktop",
              "type": "string"
            },
            {
              "value": "mobile",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "nav",
          "type": "\"all\" | \"desktop\" | \"mobile\" | \"none\"",
          "complexType": {
            "original": "HeaderBarNavType",
            "resolved": "\"all\" | \"desktop\" | \"mobile\" | \"none\"",
            "references": {
              "HeaderBarNavType": {
                "location": "import",
                "path": "@type/header-bar",
                "id": "src/type/header-bar.ts::HeaderBarNavType",
                "referenceLocation": "HeaderBarNavType"
              }
            }
          },
          "mutable": false,
          "attr": "nav",
          "reflectToAttr": true,
          "docs": "Sets the visibility type of the navigation menu",
          "docsTags": [
            {
              "name": "default",
              "text": "'desktop'"
            }
          ],
          "default": "'desktop'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "desktop",
              "type": "string"
            },
            {
              "value": "mobile",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "setOpened",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(isOpened?: boolean) => Promise<void>",
            "parameters": [
              {
                "name": "isOpened",
                "type": "boolean",
                "docs": "whether the menu should be opened"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "setOpened(isOpened?: boolean) => Promise<void>",
          "parameters": [
            {
              "name": "isOpened",
              "type": "boolean",
              "docs": "whether the menu should be opened"
            }
          ],
          "docs": "Opens or closes the menu of the surrounding `mds-header`, as the hamburger does.",
          "docsTags": [
            {
              "name": "param",
              "text": "isOpened whether the menu should be opened"
            }
          ]
        }
      ],
      "events": [
        {
          "event": "mdsHeaderBarOpen",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is opened",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-header-bar-hamburger-color",
          "annotation": "prop",
          "docs": "The color of the hamburger icon used in the header bar; inside an `mds-header` it defaults to the `--mds-header-icon-color` or `--mds-header-color` set on it.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Put contents, like logo and a small description shown on the left of the component. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "nav",
          "docs": "Put the actions shown when the component is on desktop mode. Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        }
      ],
      "parts": [
        {
          "name": "actions",
          "docs": "Selects the element which wraps `nav` and `hamburger` parts"
        },
        {
          "name": "content",
          "docs": "The row that holds the default slot, on the left, and the `actions`"
        },
        {
          "name": "hamburger",
          "docs": "Selects the `hamburger` menu action element"
        },
        {
          "name": "nav",
          "docs": "Selects the `nav` element that contains the horizontal menu"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-header-bar": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-header-header-bar--docs"
    },
    {
      "filePath": "src/components/mds-help/mds-help.tsx",
      "encapsulation": "shadow",
      "tag": "mds-help",
      "readme": "# mds-help\n\n\n\nThis 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.\n",
      "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** `HTML elements` or `components`."
        },
        {
          "name": "part",
          "text": "icon - The icon that shows the help text in a tooltip"
        },
        {
          "name": "category",
          "text": "overlays"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-help>` web component is a contextual help affordance of the Magma Design System: a small help icon that reveals an explanatory tooltip on interaction. It composes [`mds-icon`](../mds-icon/AGENTS.md) and [`mds-tooltip`](../mds-tooltip/AGENTS.md) into a single drop-in element, so there is no native HTML primitive it replaces.\n\n#### Semantic Behavior\n\n- **Tooltip-on-icon**: The host always renders a help icon and anchors a tooltip to it; the slotted text becomes the tooltip body and is shown while the pointer hovers the icon or the icon has the focus. The icon is a tab stop named by the tooltip text (`role=\"img\"` with `aria-labelledby`), so a screen reader reads the help on it.\n- **Auto-placement**: Unless `disableAutoPlacement` is set (auto-placement is on by default), the tooltip takes `placement` whenever it has room there, and moves to another side of the icon only when it does not fit.\n- **Default-slot is text**: The default slot is intended for a plain text string only; HTML elements or components in the slot are discouraged because the content is rendered inside the tooltip.\n\n#### Properties & Visual Configurations\n\n- **`icon`** is an SVG filename slug from the Magma icon library; when omitted, the component falls back to the standard outline help glyph, so set it only to convey a help affordance other than the default question mark.\n- **`placement`** sets the preferred side of the icon on which the tooltip appears (e.g. `'top'`, `'bottom-start'`). It is kept whenever it has room; auto-placement moves the tooltip away from it only when it does not fit.\n- **`disableAutoPlacement`** turns off dynamic repositioning. Leave it off in scrollable or edge-of-viewport contexts; set it only when you need the tooltip pinned strictly to the `placement` side.\n\nThe tooltip's dimensions and reveal timing are tuned via the CSS custom properties documented in [`AGENTS.md`](AGENTS.md) (`--mds-help-tooltip-width`, `--mds-help-tooltip-min-width`, `--mds-help-tooltip-max-width`, `--mds-help-tooltip-delay`).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-help>` 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 Inline Help\n\nThe canonical form. Drop `<mds-help>` inline next to a label or piece of text and slot in a plain string explaining the concept. The tooltip appears on hover and on keyboard focus of the help icon.\n\n```html\n<p>\n  Periodo di fatturazione\n  <mds-help>Il ciclo di fatturazione inizia il primo giorno del mese e termina l'ultimo.</mds-help>\n</p>\n```\n\n#### Placement Preference\n\nUse the `placement` prop to suggest a preferred side for the tooltip. The default is `top`; change it when the element sits near a viewport edge.\n\n```html\n<!-- Default: tooltip above the icon -->\n<mds-help placement=\"top\">Inserire il codice fiscale a 16 caratteri.</mds-help>\n\n<!-- Tooltip to the right, useful for left-aligned form labels -->\n<mds-help placement=\"right\">Il campo e' obbligatorio per la registrazione.</mds-help>\n\n<!-- Tooltip below, e.g. inside a sticky header bar -->\n<mds-help placement=\"bottom\">Clicca per espandere il pannello dei filtri.</mds-help>\n```\n\n#### Disabling Auto-Placement\n\nAuto-placement is enabled by default and moves the tooltip away from `placement` only when it has no room there. Add `disable-auto-placement` only when you need the tooltip pinned strictly to one side - for example in a fixed overlay where you control the available space.\n\n```html\n<!-- Add disable-auto-placement to pin the tooltip to placement=\"bottom\" -->\n<mds-help placement=\"bottom\" disable-auto-placement>\n  Questa descrizione deve sempre apparire in basso.\n</mds-help>\n```\n\n#### Custom Icon\n\nOverride the default question-mark glyph with any slug from the Magma icon library by setting the `icon` prop. Use this to match a specific visual context - for example a warning glyph when the help text explains a potentially destructive action.\n\n```html\n<mds-help icon=\"mi/baseline/info\">\n  Questa operazione puo' richiedere alcuni minuti.\n</mds-help>\n\n<mds-help icon=\"mi/baseline/warning\">\n  Attenzione: la modifica sara' applicata a tutti i documenti selezionati.\n</mds-help>\n```\n\n#### Tooltip Width Customization\n\nControl the tooltip dimensions with `--mds-help-tooltip-width`, `--mds-help-tooltip-min-width`, and `--mds-help-tooltip-max-width`. Useful when the help text is very short (narrow the tooltip) or contains several sentences (widen it).\n\n```css\n/* Wider tooltip for a multi-sentence explanation */\n.configurazione-avanzata mds-help {\n  --mds-help-tooltip-max-width: 480px;\n  --mds-help-tooltip-min-width: 300px;\n}\n\n/* Narrow tooltip for a short label */\n.campo-codice mds-help {\n  --mds-help-tooltip-max-width: 180px;\n  --mds-help-tooltip-min-width: 120px;\n}\n```\n\n#### Reveal Delay Customization\n\nIncrease `--mds-help-tooltip-delay` to prevent accidental tooltip flicker when users move their pointer across a dense form, or decrease it for touch-primary interfaces where hover is not applicable.\n\n```css\n/* Slower reveal for dense data tables */\n.tabella-dati mds-help {\n  --mds-help-tooltip-delay: 0.6s;\n}\n\n/* Faster reveal in a step-by-step wizard */\n.wizard-step mds-help {\n  --mds-help-tooltip-delay: 0.1s;\n}\n```\n\n#### Icon Part Customization\n\nTint the help icon to match a surrounding context using the documented `::part(icon)` surface. Keep using the semantic color roles so dark mode and high-contrast modes continue to work.\n\n```css\n/* Match the icon color to a warning banner context */\n.banner-warning mds-help::part(icon) {\n  fill: rgb(var(--magma-warning-text-default));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-help>`. 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 Put HTML Elements in the Default Slot\n\nThe default slot is text-only; the content is rendered inside [`mds-tooltip`](../mds-tooltip/AGENTS.md), which expects a plain string. Nested elements or components may be stripped or break the tooltip layout.\n\n```html\n<!-- INCORRECT -->\n<mds-help>\n  <strong>Attenzione:</strong> il limite massimo e' <em>100 caratteri</em>.\n</mds-help>\n\n<!-- CORRECT -->\n<mds-help>Attenzione: il limite massimo e' 100 caratteri.</mds-help>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Icon\n\nThe only supported customization surface is `--mds-help-*` CSS custom properties and the documented `::part(icon)` shadow part. Targeting internal elements via `>>>` or undocumented selectors couples your code to the shadow DOM implementation.\n\n```css\n/* INCORRECT */\nmds-help >>> mds-icon {\n  fill: red;\n}\n\n/* CORRECT */\nmds-help::part(icon) {\n  fill: rgb(var(--magma-warning-text-default));\n}\n```\n\n#### Do Not Use `<mds-help>` as a Generic Tooltip Anchor\n\n`<mds-help>` always renders its own help icon and wraps [`mds-tooltip`](../mds-tooltip/AGENTS.md) internally. It is not a generic popover wrapper. If you need a tooltip on an arbitrary element, use [`mds-tooltip`](../mds-tooltip/AGENTS.md) directly with a `target` selector.\n\n```html\n<!-- INCORRECT: slotting a custom trigger to replace the icon -->\n<mds-help>\n  <mds-button slot=\"default\" label=\"Dettagli\"></mds-button>\n  Testo di spiegazione.\n</mds-help>\n\n<!-- CORRECT: use mds-tooltip with a target for a custom trigger -->\n<mds-button id=\"info-btn\" label=\"Dettagli\"></mds-button>\n<mds-tooltip target=\"#info-btn\">Testo di spiegazione.</mds-tooltip>\n```\n\n#### Do Not Override Width with Inline Styles Instead of CSS Custom Properties\n\nSetting `style=\"width: ...\"` on the host bypasses the component's layout contract. Use the documented `--mds-help-tooltip-*` CSS custom properties to size the tooltip, and leave the host dimensions alone.\n\n```html\n<!-- INCORRECT -->\n<mds-help style=\"width: 400px;\">Descrizione del campo.</mds-help>\n\n<!-- CORRECT -->\n<style>\n  mds-help.sezione-avanzata {\n    --mds-help-tooltip-max-width: 400px;\n  }\n</style>\n<mds-help class=\"sezione-avanzata\">Descrizione del campo.</mds-help>\n```\n"
      },
      "props": [
        {
          "name": "disableAutoPlacement",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disable-auto-placement",
          "reflectToAttr": true,
          "docs": "Pins the tooltip to `placement`: without it, the tooltip moves to another side of the icon\nwhen `placement` has no room.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "Set the name of the icon.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "placement",
          "type": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\" | undefined",
          "complexType": {
            "original": "FloatingUIPlacement",
            "resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\" | undefined",
            "references": {
              "FloatingUIPlacement": {
                "location": "import",
                "path": "@type/floating-ui",
                "id": "src/type/floating-ui.ts::FloatingUIPlacement",
                "referenceLocation": "FloatingUIPlacement"
              }
            }
          },
          "mutable": false,
          "attr": "placement",
          "reflectToAttr": true,
          "docs": "Specifies where the tooltip should be placed relative to the icon: the side it takes\nwhenever it has room there.",
          "docsTags": [
            {
              "name": "default",
              "text": "'top'"
            }
          ],
          "default": "'top'",
          "values": [
            {
              "value": "bottom",
              "type": "string"
            },
            {
              "value": "bottom-end",
              "type": "string"
            },
            {
              "value": "bottom-start",
              "type": "string"
            },
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "left-end",
              "type": "string"
            },
            {
              "value": "left-start",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            },
            {
              "value": "right-end",
              "type": "string"
            },
            {
              "value": "right-start",
              "type": "string"
            },
            {
              "value": "top",
              "type": "string"
            },
            {
              "value": "top-end",
              "type": "string"
            },
            {
              "value": "top-start",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-help-tooltip-delay",
          "annotation": "prop",
          "docs": "The delay before the tooltip becomes visible.",
          "visibility": "public"
        },
        {
          "name": "--mds-help-tooltip-max-width",
          "annotation": "prop",
          "docs": "The maximum allowed width of the tooltip.",
          "visibility": "public"
        },
        {
          "name": "--mds-help-tooltip-min-width",
          "annotation": "prop",
          "docs": "The minimum allowed width of the tooltip.",
          "visibility": "public"
        },
        {
          "name": "--mds-help-tooltip-width",
          "annotation": "prop",
          "docs": "The width of the tooltip element.",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string` to this slot, **avoid** `HTML elements` or `components`."
        }
      ],
      "parts": [
        {
          "name": "icon",
          "docs": "The icon that shows the help text in a tooltip"
        }
      ],
      "states": [],
      "dependents": [
        "mds-policy-ai"
      ],
      "dependencies": [
        "mds-icon",
        "mds-tooltip"
      ],
      "dependencyGraph": {
        "mds-help": [
          "mds-icon",
          "mds-tooltip"
        ],
        "mds-tooltip": [
          "mds-text"
        ],
        "mds-policy-ai": [
          "mds-help"
        ]
      },
      "storybook": "ui-help--docs"
    },
    {
      "filePath": "src/components/mds-horizontal-scroll/mds-horizontal-scroll.tsx",
      "encapsulation": "shadow",
      "tag": "mds-horizontal-scroll",
      "readme": "# mds-horizontal-scroll\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "content - The track that scrolls, with the default slot inside"
        },
        {
          "name": "category",
          "text": "structure"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-horizontal-scroll>` web component is a horizontally scrolling container of the Magma Design System. It wraps any slotted content in a snap-scrolling viewport and overlays optional navigation controls, replacing the manual overflow/scroll-snap CSS plumbing you would otherwise write around a `<div>`.\n\n#### Semantic Behavior\n\n- **Slotted children drive scrolling**: The default slot's children are the scrollable items.\n- **Navigation buttons**: When `controls` resolves to a viewport other than `'none'`, two arrow buttons are rendered, icon-only and named in the page language (the `lang` of `<html>`) (\"Scroll back\", \"Scroll forward\"); each advances the scroll position to the next/previous item not fully in the viewport. Browsers without the `scrollend` event get no arrows: the component clears `controls` there.\n- **Auto-disabled arrows**: The back arrow hides/disables when the first item is fully visible and the forward arrow when the last item is.\n- **Position indicator**: With `navigation=\"position\"` a proportional dot is rendered; its width reflects the visible/total ratio and it translates along its track as the container scrolls.\n- **No focus or form semantics**: This is a presentational scroll container - it is not form-associated, exposes no implicit ARIA role, and emits no custom events.\n\n#### Properties & Visual Configurations\n\n- **`controls`** selects the smallest viewport breakpoint at which the arrow navigation appears (default `'desktop'`); pick a wider tier like `'large'` or `'wide'` to show arrows only on big screens, or `'none'` to suppress them entirely. The chosen value is the threshold, not a single device.\n- **`navigation`** chooses the scroll-progress affordance: `'position'` renders the translating dot indicator, `'scrollbar'` defers to the styled native browser scrollbar, and `'none'` shows neither.\n- **`snap`** sets the scroll-snap alignment of each item against the viewport - `'start'` (default) aligns items to the leading edge, `'center'` keeps them centred, `'end'` to the trailing edge, and `'none'` disables snapping for free scrolling.\n\nThis component does not use the shared `variant` / `tone` ladders defined in [`agents/variants.md`](../../../../agents/variants.md); its public CSS custom properties set the layout (the width of the items area and the margin of the controls) and its colours follow the theme (see [`AGENTS.md`](AGENTS.md)).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-horizontal-scroll>` 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 Horizontal Scroll with Cards\n\nThe canonical form. Slot any fixed-width children directly into the component; it wraps them in a snap-scrolling viewport with a proportional dot indicator and arrow buttons automatically.\n\n```html\n<mds-horizontal-scroll>\n  <mds-card class=\"min-w-[320px]\">\n    <mds-card-header>Servizio 1</mds-card-header>\n    <mds-card-content>Descrizione del primo servizio.</mds-card-content>\n  </mds-card>\n  <mds-card class=\"min-w-[320px]\">\n    <mds-card-header>Servizio 2</mds-card-header>\n    <mds-card-content>Descrizione del secondo servizio.</mds-card-content>\n  </mds-card>\n  <mds-card class=\"min-w-[320px]\">\n    <mds-card-header>Servizio 3</mds-card-header>\n    <mds-card-content>Descrizione del terzo servizio.</mds-card-content>\n  </mds-card>\n</mds-horizontal-scroll>\n```\n\n#### Controlling Navigation Arrow Visibility\n\nUse `controls` to restrict arrow buttons to specific viewport tiers. The value is the minimum breakpoint at which arrows appear - `'desktop'` (default) shows them only on desktop and above; `'all'` shows them at every viewport size; `'none'` suppresses them entirely.\n\n```html\n<!-- Arrows only on desktop and above (default) -->\n<mds-horizontal-scroll controls=\"desktop\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n\n<!-- Arrows on all viewports, including mobile -->\n<mds-horizontal-scroll controls=\"all\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n\n<!-- No arrows - touch / keyboard scroll only -->\n<mds-horizontal-scroll controls=\"none\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n```\n\n#### Scroll Progress Indicator\n\nUse `navigation` to choose the scroll-position affordance shown below the items. `'position'` (default) renders a proportional translating dot; `'scrollbar'` defers to the styled native browser scrollbar; `'none'` hides both.\n\n```html\n<!-- Dot indicator (default) -->\n<mds-horizontal-scroll navigation=\"position\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n\n<!-- Native scrollbar instead of dot -->\n<mds-horizontal-scroll navigation=\"scrollbar\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n\n<!-- No progress indicator -->\n<mds-horizontal-scroll navigation=\"none\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n```\n\n#### Snap Alignment\n\n`snap` controls how each item aligns to the viewport edge when the scroll settles. Use `'start'` (default) for left-aligned cards, `'center'` for centred carousels, `'end'` for right-aligned layouts, or `'none'` to allow free scrolling without snapping.\n\n```html\n<!-- Leading-edge alignment (default, most common) -->\n<mds-horizontal-scroll snap=\"start\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n\n<!-- Centred alignment - good for full-bleed hero carousels -->\n<mds-horizontal-scroll snap=\"center\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n\n<!-- Free scroll - no snapping -->\n<mds-horizontal-scroll snap=\"none\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n```\n\n#### Combining Props for a Mobile-Friendly Carousel\n\nPair `controls=\"all\"` with `snap=\"center\"` and `navigation=\"position\"` to produce a touch-and-arrow carousel that works at every breakpoint.\n\n```html\n<mds-horizontal-scroll controls=\"all\" snap=\"center\" navigation=\"position\">\n  <mds-card class=\"min-w-[280px]\">\n    <mds-card-media>\n      <mds-img src=\"https://example.com/img1.jpg\" alt=\"\"></mds-img>\n    </mds-card-media>\n    <mds-card-content>\n      <mds-text typography=\"h5\">Categoria A</mds-text>\n    </mds-card-content>\n  </mds-card>\n  <mds-card class=\"min-w-[280px]\">\n    <mds-card-media>\n      <mds-img src=\"https://example.com/img2.jpg\" alt=\"\"></mds-img>\n    </mds-card-media>\n    <mds-card-content>\n      <mds-text typography=\"h5\">Categoria B</mds-text>\n    </mds-card-content>\n  </mds-card>\n</mds-horizontal-scroll>\n```\n\n#### Styling Customization\n\nStyle the component only through its public `--mds-horizontal-scroll-*` CSS custom properties, which set its layout: the width of the items area and how far the controls sit outside it. Set them on the host or a parent selector. The dot indicator and the controls take their colours from the semantic roles, so they follow dark mode without overrides.\n\n```css\n.sezione-evidenza mds-horizontal-scroll {\n  --mds-horizontal-scroll-max-width: 1200px;\n}\n```\n\n#### Styling the Scrollbar\n\nWhen `navigation=\"scrollbar\"` is used, the component styles the native scrollbar itself, from the semantic color roles, so it follows dark mode; its size and colours have no public custom property. When the scrollbar does not suit the layout, pick another affordance with `navigation` instead of restyling it.\n\n#### Customizing the Content Part\n\nThe inner scroll container is exposed as `::part(content)`. Use it sparingly - only when a CSS custom property cannot satisfy your requirement - to apply layout overrides without piercing undocumented internals.\n\n```css\nmds-horizontal-scroll::part(content) {\n  padding-block: calc(var(--spacing) * 800);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-horizontal-scroll>`. 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 Set `controls` to a Boolean\n\n`controls` is a `ViewportType` string prop, not a boolean. Setting it without a value (or as `\"\"`) gives an empty string, which renders no arrows at all - the opposite of what a bare boolean attribute suggests. Always supply an explicit string value.\n\n```html\n<!-- INCORRECT -->\n<mds-horizontal-scroll controls>\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n\n<!-- CORRECT -->\n<mds-horizontal-scroll controls=\"desktop\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n```\n\n#### Do Not Wrap Slotted Items in an Extra Div\n\nAdding a single wrapper `<div>` around all children collapses the scroll track to one item. The component's arrow and snap logic iterates over the direct slot children - each scrollable item must be a direct child, not grandchildren inside a wrapper.\n\n```html\n<!-- INCORRECT -->\n<mds-horizontal-scroll>\n  <div>\n    <mds-card class=\"min-w-[320px]\">...</mds-card>\n    <mds-card class=\"min-w-[320px]\">...</mds-card>\n  </div>\n</mds-horizontal-scroll>\n\n<!-- CORRECT -->\n<mds-horizontal-scroll>\n  <mds-card class=\"min-w-[320px]\">...</mds-card>\n  <mds-card class=\"min-w-[320px]\">...</mds-card>\n</mds-horizontal-scroll>\n```\n\n#### Do Not Set `controls=\"none\"` as Boolean False\n\n`controls` has no boolean semantic. Removing arrow buttons is done with `controls=\"none\"`, not by writing `controls=\"false\"` or `disabled`. The string `\"false\"` is not a `ViewportType`: the arrows end up hidden only because no breakpoint rule matches it, and a type check rejects it.\n\n```html\n<!-- INCORRECT -->\n<mds-horizontal-scroll controls=\"false\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n\n<!-- CORRECT -->\n<mds-horizontal-scroll controls=\"none\">\n  <!-- slotted items -->\n</mds-horizontal-scroll>\n```\n\n#### Do Not Use a Raw `<div>` Scroll Container Instead\n\nReplacing `<mds-horizontal-scroll>` with a manually styled `<div style=\"overflow-x: auto\">` loses the managed arrow buttons, the dot indicator, scroll-snap wiring, and the `controls` breakpoint logic. Use the component.\n\n```html\n<!-- INCORRECT -->\n<div style=\"overflow-x: auto; display: flex; gap: 16px;\">\n  <mds-card class=\"min-w-[320px]\">...</mds-card>\n  <mds-card class=\"min-w-[320px]\">...</mds-card>\n</div>\n\n<!-- CORRECT -->\n<mds-horizontal-scroll>\n  <mds-card class=\"min-w-[320px]\">...</mds-card>\n  <mds-card class=\"min-w-[320px]\">...</mds-card>\n</mds-horizontal-scroll>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internal Elements\n\nThe navigation buttons and dot indicator live inside the shadow DOM. Targeting them via `>>>`, `/deep/`, or undocumented class names (`.navigation`, `.dot`) will break on future releases. Use the public `--mds-horizontal-scroll-*` CSS custom properties and the `content` part instead; the dot and the controls take their colours from the theme.\n\n```css\n/* INCORRECT */\nmds-horizontal-scroll >>> .dot {\n  background: red;\n}\nmds-horizontal-scroll >>> .navigation {\n  border-radius: 0;\n}\n\n/* CORRECT */\nmds-horizontal-scroll {\n  --mds-horizontal-scroll-controls-margin: 0px;\n}\nmds-horizontal-scroll::part(content) {\n  padding-block: calc(var(--spacing) * 800);\n}\n```\n\n#### Do Not Provide Slotted Items Without a Fixed Width\n\nSlotted items without a declared width collapse to zero or stretch unpredictably. Always give direct children an explicit `min-width` or `width` so the container has measurable items to snap and scroll among.\n\n```html\n<!-- INCORRECT: card has no fixed width, items will collapse -->\n<mds-horizontal-scroll>\n  <mds-card>...</mds-card>\n  <mds-card>...</mds-card>\n</mds-horizontal-scroll>\n\n<!-- CORRECT: each card has a declared minimum width -->\n<mds-horizontal-scroll>\n  <mds-card class=\"min-w-[320px]\">...</mds-card>\n  <mds-card class=\"min-w-[320px]\">...</mds-card>\n</mds-horizontal-scroll>\n```\n"
      },
      "props": [
        {
          "name": "controls",
          "type": "\"all\" | \"desktop\" | \"large\" | \"none\" | \"tablet\" | \"tv\" | \"wide\" | \"xlarge\" | undefined",
          "complexType": {
            "original": "ViewportType",
            "resolved": "\"all\" | \"desktop\" | \"large\" | \"none\" | \"tablet\" | \"tv\" | \"wide\" | \"xlarge\" | undefined",
            "references": {
              "ViewportType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-horizontal-scroll/meta/types.ts::ViewportType",
                "referenceLocation": "ViewportType"
              }
            }
          },
          "mutable": true,
          "attr": "controls",
          "reflectToAttr": true,
          "docs": "Specifies the viewport which will display navigation controls",
          "docsTags": [
            {
              "name": "default",
              "text": "'desktop'"
            }
          ],
          "default": "'desktop'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "desktop",
              "type": "string"
            },
            {
              "value": "large",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "tablet",
              "type": "string"
            },
            {
              "value": "tv",
              "type": "string"
            },
            {
              "value": "wide",
              "type": "string"
            },
            {
              "value": "xlarge",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "navigation",
          "type": "\"none\" | \"position\" | \"scrollbar\" | undefined",
          "complexType": {
            "original": "NavigationType",
            "resolved": "\"none\" | \"position\" | \"scrollbar\" | undefined",
            "references": {
              "NavigationType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-horizontal-scroll/meta/types.ts::NavigationType",
                "referenceLocation": "NavigationType"
              }
            }
          },
          "mutable": false,
          "attr": "navigation",
          "reflectToAttr": true,
          "docs": "Specifies the box’s snap position as an alignment of its snap area",
          "docsTags": [
            {
              "name": "default",
              "text": "'position'"
            }
          ],
          "default": "'position'",
          "values": [
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "position",
              "type": "string"
            },
            {
              "value": "scrollbar",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "snap",
          "type": "\"center\" | \"end\" | \"none\" | \"start\" | undefined",
          "complexType": {
            "original": "SnapType",
            "resolved": "\"center\" | \"end\" | \"none\" | \"start\" | undefined",
            "references": {
              "SnapType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-horizontal-scroll/meta/types.ts::SnapType",
                "referenceLocation": "SnapType"
              }
            }
          },
          "mutable": false,
          "attr": "snap",
          "reflectToAttr": true,
          "docs": "Specifies the box’s snap position as an alignment of its snap area",
          "docsTags": [
            {
              "name": "default",
              "text": "'start'"
            }
          ],
          "default": "'start'",
          "values": [
            {
              "value": "center",
              "type": "string"
            },
            {
              "value": "end",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "start",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-horizontal-scroll-behavior",
          "annotation": "prop",
          "docs": "Sets the scroll-behavior animation",
          "visibility": "internal"
        },
        {
          "name": "--mds-horizontal-scroll-controls-margin",
          "annotation": "prop",
          "docs": "Sets how far the back and forward controls sit outside the area of the slotted elements, 48px by default; `0px` keeps them on its edges",
          "visibility": "public"
        },
        {
          "name": "--mds-horizontal-scroll-dot-area-background",
          "annotation": "prop",
          "docs": "Sets the dot container area color",
          "visibility": "internal"
        },
        {
          "name": "--mds-horizontal-scroll-dot-background",
          "annotation": "prop",
          "docs": "Sets the navigation dot color",
          "visibility": "internal"
        },
        {
          "name": "--mds-horizontal-scroll-dot-max-width",
          "annotation": "prop",
          "docs": "Sets the navigation dot max-width, if you want to avoid is scales in proportion of the container",
          "visibility": "internal"
        },
        {
          "name": "--mds-horizontal-scroll-max-width",
          "annotation": "prop",
          "docs": "Sets the max-width of the slotted elements container, to keep layout limited as the rest of the sections",
          "visibility": "public"
        },
        {
          "name": "--mds-horizontal-scroll-scrollbar-margin",
          "annotation": "prop",
          "docs": "Sets the margin of the browser scroll bar (if supported)",
          "visibility": "internal"
        },
        {
          "name": "--mds-horizontal-scroll-scrollbar-radius",
          "annotation": "prop",
          "docs": "Sets the border-radius of the browser scroll bar (if supported)",
          "visibility": "internal"
        },
        {
          "name": "--mds-horizontal-scroll-scrollbar-size",
          "annotation": "prop",
          "docs": "Sets the height and width of the browser scroll bar (if supported)",
          "visibility": "internal"
        },
        {
          "name": "--mds-horizontal-scroll-scrollbar-thumb-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the browser scroll bar thumb (if supported)",
          "visibility": "internal"
        },
        {
          "name": "--mds-horizontal-scroll-scrollbar-track-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the browser scroll bar track (if supported)",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "content",
          "docs": "The track that scrolls, with the default slot inside"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-horizontal-scroll": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "layout-horizontal-scroll--docs"
    },
    {
      "filePath": "src/components/mds-hr/mds-hr.tsx",
      "encapsulation": "shadow",
      "tag": "mds-hr",
      "readme": "# mds-hr\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "structure"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-hr>` web component is the horizontal rule of the Magma Design System. It is a purely presentational separator that replaces the native `<hr>` element, rendering a thin themed divider line to split content into visual sections.\n\n#### Semantic Behavior\n\n- **No interactivity**: The component has no props, slots, events, or state; it is decorative and takes no part in focus order, form association, or keyboard interaction.\n- **Full-width line**: It always spans the full inline width of its container and is sized purely by layout context.\n- **Theme-aware color**: The rule is painted with the `wash-strong` neutral role and adapts automatically between light and dark preference themes, so it stays legible without configuration.\n\n#### Properties & Visual Configurations\n\n`<mds-hr>` exposes no props. Visual variation is achieved entirely through standard utility classes on the host - for example overriding the background color with a semantic color utility (`class=\"bg-border-default\"`) - rather than through component-specific attributes.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-hr>` 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#### Default Divider\n\nThe simplest use - no attributes required. Drop it between content blocks to draw a full-width neutral rule that adapts automatically to light and dark themes.\n\n```html\n<section>\n  <mds-text typography=\"h4\">Dati personali</mds-text>\n  <mds-text typography=\"paragraph\">Nome, cognome e data di nascita.</mds-text>\n</section>\n\n<mds-hr></mds-hr>\n\n<section>\n  <mds-text typography=\"h4\">Dati di contatto</mds-text>\n  <mds-text typography=\"paragraph\">Indirizzo e-mail e numero di telefono.</mds-text>\n</section>\n```\n\n#### Divider Inside a Card\n\nUse `<mds-hr>` to split regions inside a compound component such as `<mds-card>`. It stretches to the full width of its parent slot, so no extra sizing is needed.\n\n```html\n<mds-card>\n  <mds-card-header slot=\"header\">\n    <mds-text typography=\"h6\">Riepilogo ordine</mds-text>\n  </mds-card-header>\n  <mds-card-content slot=\"content\">\n    <mds-text typography=\"paragraph\">Articolo 1 - Servizio annuale</mds-text>\n    <mds-hr></mds-hr>\n    <mds-text typography=\"paragraph\">Articolo 2 - Supporto prioritario</mds-text>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Color Tint via Utility Class\n\n`<mds-hr>` exposes no CSS custom properties. To change the line color, apply a semantic color utility class (`bg-<role>`) directly on the host element. Use `rgb(var(--magma-<role>))` values in CSS only when no matching utility class exists.\n\n```html\n<!-- Stronger neutral rule -->\n<mds-hr class=\"bg-border-default\"></mds-hr>\n\n<!-- Branded primary tint -->\n<mds-hr class=\"bg-accent-border\"></mds-hr>\n```\n\n#### Divider Inside a Form\n\nUse `<mds-hr>` to visually group related form fields without adding semantic structure (use `<fieldset>` for the semantic grouping; `<mds-hr>` is purely presentational).\n\n```html\n<form>\n  <mds-input-field label=\"Nome\">\n    <mds-input name=\"nome\"></mds-input>\n  </mds-input-field>\n  <mds-input-field label=\"Cognome\">\n    <mds-input name=\"cognome\"></mds-input>\n  </mds-input-field>\n\n  <mds-hr></mds-hr>\n\n  <mds-input-field label=\"E-mail\">\n    <mds-input name=\"email\" type=\"email\"></mds-input>\n  </mds-input-field>\n</form>\n```\n\n#### Width Constraint via Parent Layout\n\n`<mds-hr>` always fills `width: 100%` of its container. To produce an inset or centered rule, constrain it through the parent's padding or a wrapping element - do not apply `width` inline on the component itself.\n\n```html\n<div style=\"padding-inline: 2rem;\">\n  <mds-hr></mds-hr>\n</div>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-hr>`. 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 Raw `<hr>` Element\n\nThe native `<hr>` element does not pick up Magma tokens, so it renders with browser-default styling that does not adapt to themes or high-contrast preferences. Replace it with `<mds-hr>` inside any Magma-themed page.\n\n```html\n<!-- INCORRECT -->\n<hr />\n\n<!-- CORRECT -->\n<mds-hr></mds-hr>\n```\n\n#### Do Not Set `width` or `height` Directly on the Component\n\n`<mds-hr>` manages its own `width: 100%` and `height: 1px` internally. Overriding these via inline styles or CSS produces inconsistent results across layouts and breaks the visual system contract. Use parent padding to create inset rules instead.\n\n```html\n<!-- INCORRECT -->\n<mds-hr style=\"width: 50%; height: 2px;\"></mds-hr>\n\n<!-- CORRECT -->\n<div style=\"padding-inline: 2rem;\">\n  <mds-hr></mds-hr>\n</div>\n```\n\n#### Do Not Pierce Shadow DOM to Change the Line Color\n\n`<mds-hr>` exposes no `::part()` surface and no `--mds-hr-*` CSS custom properties. Targeting its `:host` internals via `>>>` or `/deep/` will break on updates. Apply a semantic color utility class (`bg-<role>`) on the host element instead.\n\n```css\n/* INCORRECT */\nmds-hr >>> :host {\n  background-color: red;\n}\n\n/* CORRECT */\n```\n\n```html\n<mds-hr class=\"bg-border-default\"></mds-hr>\n```\n\n#### Do Not Slot Content Into `<mds-hr>`\n\n`<mds-hr>` is an empty presentational rule with no slot. Any children placed inside the tags are silently ignored and do not render.\n\n```html\n<!-- INCORRECT -->\n<mds-hr>\n  <span>oppure</span>\n</mds-hr>\n\n<!-- CORRECT -->\n<mds-text typography=\"caption\" class=\"text-center\">oppure</mds-text>\n<mds-hr></mds-hr>\n```\n\n#### Do Not Use `<mds-separator>` as a Horizontal Rule\n\n[`mds-separator`](../mds-separator/AGENTS.md) is a **vertical** divider intended for inline or flex contexts such as toolbars and breadcrumbs. Using it to separate stacked content blocks produces incorrect orientation and layout.\n\n```html\n<!-- INCORRECT -->\n<section>Sezione A</section>\n<mds-separator></mds-separator>\n<section>Sezione B</section>\n\n<!-- CORRECT -->\n<section>Sezione A</section>\n<mds-hr></mds-hr>\n<section>Sezione B</section>\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-hr--docs"
    },
    {
      "filePath": "src/components/mds-icon/mds-icon.tsx",
      "encapsulation": "shadow",
      "tag": "mds-icon",
      "readme": "# mds-icon\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "svg - The svg container of the icon"
        },
        {
          "name": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-icon>` web component is the single glyph primitive of the Magma Design System: it inlines an SVG into the DOM so the artwork inherits color and sizing from CSS, and it is the building block that nearly every other component (button, chip, input, banner, list-item, etc.) composes to render its iconography. It replaces a raw `<img>`/`<svg>` tag and centralizes how icon artwork is resolved.\n\n#### Semantic Behavior\n\n- **Decorative by default**: The icon contributes no accessible name; meaning must come from the surrounding labelled control or text.\n- **Source resolution**: `name` is interpreted three ways - a string starting with `data:image/svg+xml;base64,` is decoded inline (as UTF-8; a payload that is not base64 draws nothing and logs a console warning), a markup string starting with the `<svg` element, or with the XML declaration, doctype or comments a saved `.svg` file opens with, is used verbatim, and anything else is treated as an icon filename slug fetched as `<svg directory><slug>.svg` (a name starting with `http` is fetched as it is). Without a `name` (attribute missing or empty, property `undefined` or `null`) the icon renders nothing, sends no request and logs nothing; removing `name` clears the icon.\n- **Async load**: When `name` is a slug the icon paints once the SVG arrives; a failed fetch renders empty rather than throwing. Only the latest `name` and SVG path count: a request that finishes after a newer one is discarded.\n- **Path configuration**: The SVG directory is set programmatically via the shared `IconsSetService.setSvgPath()` singleton (imported from `@maggioli-design-system/magma`), with the `mdsIconSvgPath` `sessionStorage` key as an optional fallback and the `setSvgPath` instance method as an alternative; icons that mounted before the path was configured reload themselves once it is set. An icon removed from the page stops listening for path changes; once it is put back it picks up a path set in the meantime.\n\n#### Properties & Visual Configurations\n\n- **`name`** is the only configurable input and is overloaded: pass an icon filename slug to pull artwork from the shared library, a base64-encoded SVG `data:` URI for inline/dynamic artwork, or a full raw SVG string when the markup is generated at runtime.\n\nThis component does not use the shared `variant` / `tone` / `size` ladders defined in [`agents/variants.md`](../../../../agents/variants.md); the color comes from the inherited CSS `fill` and the size from the host `width` (24px by default, the height follows the square aspect ratio), which is how parent components tint and scale their icons.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-icon>` component, ordered from most common to most specialized. The examples assume a working knowledge of the icon slug conventions documented in [`agents/conventions.md`](../../../../agents/conventions.md) and the icon setup in [`agents/assets.md`](../../../../agents/assets.md).\n\n#### Icon Slug from the Shared Library\n\nThe canonical form. Pass a slug string as `name`; the component fetches the matching SVG from the configured assets directory. Slugs follow the convention of the active iconsauce plugin: `mi/<variant>/<name>` for Material Icons, `mdi/<name>` for Material Design Icons, and `mgg/<name>` for the internal Maggioli set.\n\n```html\n<!-- Material Icons baseline variant -->\n<mds-icon name=\"mi/baseline/search\"></mds-icon>\n\n<!-- Material Design Icons -->\n<mds-icon name=\"mdi/alien\"></mds-icon>\n\n<!-- Internal Maggioli set -->\n<mds-icon name=\"mgg/action-email-send-wait\"></mds-icon>\n```\n\n#### Configuring the SVG Base Path via `IconsSetService` (recommended)\n\nImport the shared `IconsSetService` singleton from the package root, `@maggioli-design-system/magma` (`@maggioli-design-system/magma/services` is the same module), and call `setSvgPath()`. It updates the shared, in-memory icon path - kept on `globalThis` so every bundled copy of the service (lazy chunks, `esm`/`esm-es5` variants, `dist/components`) agrees on it - and notifies all mounted icons to (re)load immediately. **No `sessionStorage` is involved**, which makes it the safest option when storage is blocked (incognito, sandboxed iframes, storage partitioning). Pass an absolute path (starting with `/`) or a full URL. The icons are downloaded with `fetch`: under a Content Security Policy the origin of the path must be allowed by `connect-src` (or `default-src`), which `'self'` already does for a path on the page's own origin, while a CDN must be listed.\n\n```javascript\nimport { IconsSetService } from '@maggioli-design-system/magma';\n\nIconsSetService.setSvgPath('/assets/img/svg/');\n```\n\nIt can be called before or after the icons mount: instances mounted earlier re-fetch automatically once the path is set. A path set this way wins over the `mdsIconSvgPath` key of `sessionStorage`, read before or after it. On a server (no `window`) the call stores nothing: with SSR, call it in code the browser runs. Always use the exported `IconsSetService`; do not construct your own controller, which would keep a separate icon cache and listener list.\n\n#### Configuring the SVG Base Path via sessionStorage (optional)\n\nSet `mdsIconSvgPath` in `sessionStorage` before any `<mds-icon>` mounts; every icon instance falls back to this key when no path has been set programmatically. This one-liner is convenient but **may be blocked** by some browsers, privacy/incognito modes, storage partitioning, or sandboxed iframes - when that happens, use `IconsSetService.setSvgPath()` above instead.\n\n```javascript\nwindow.sessionStorage.setItem('mdsIconSvgPath', '/assets/img/svg/');\n```\n\n#### Forcing a Reload After Late Path Configuration\n\nIf icons are already in the DOM when the SVG path is set (for example, inside a lazy-loaded module), dispatch `mdsIconSvgPathUpdate` after configuring the path. Every mounted instance listens for this event and re-fetches.\n\n```javascript\nwindow.sessionStorage.setItem('mdsIconSvgPath', '/assets/img/svg/');\nwindow.dispatchEvent(new CustomEvent('mdsIconSvgPathUpdate'));\n```\n\n#### Configuring the SVG Base Path via the Instance Method\n\nAn alternative to `IconsSetService` when you already hold an `<mds-icon>` element: call its `setSvgPath` `@Method`. It delegates to the same singleton, so the effect is identical - prefer `IconsSetService` unless creating an element is more convenient (for example, in isolated testing environments).\n\n```javascript\nawait customElements.whenDefined('mds-icon');\nconst tmp = document.createElement('mds-icon');\ndocument.body.appendChild(tmp);\nif ('setSvgPath' in tmp) {\n  tmp.setSvgPath('/assets/img/svg/');\n}\ndocument.body.removeChild(tmp);\n```\n\n#### Inline Raw SVG String\n\nPass a full SVG markup string as `name` when the artwork is generated or received at runtime and does not have a slug in the library. The component uses the string verbatim - no network request is made.\n\n```html\n<mds-icon\n  name='<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 2L2 22h20L12 2z\"/></svg>'\n></mds-icon>\n```\n\n#### Base64-encoded SVG Data URI\n\nPass a `data:image/svg+xml;base64,...` string when the icon is delivered from an API as a Base64 payload. The component decodes it inline, padding included - no external fetch occurs.\n\n```html\n<mds-icon name=\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEyIDJMMiAyMmgyMHoiLz48L3N2Zz4=\"></mds-icon>\n```\n\n#### Sizing via CSS Width\n\n`<mds-icon>` is `display: inline-flex` with `aspect-ratio: 1` and a default width of `--spacing(600)`. Override size by setting a `width` on the host - height scales automatically via the aspect ratio. Use Magma spacing tokens to stay on-grid.\n\n```html\n<!-- Small icon using a Tailwind spacing utility -->\n<mds-icon name=\"mi/baseline/info\" class=\"w-400\"></mds-icon>\n\n<!-- Large icon -->\n<mds-icon name=\"mi/baseline/star\" class=\"w-1200\"></mds-icon>\n```\n\n#### Coloring via `fill` Utility or `currentColor`\n\nThe inlined SVG paints with the inherited CSS `fill`, so a Tailwind `fill-*` utility on the host, or `fill: currentColor` on a parent to follow its text color, is enough to tint the artwork; `color` alone does not tint it. Use Magma color roles, or a `label-*` colour for a category.\n\n```html\n<!-- Tint with a Magma label token -->\n<mds-icon name=\"mi/baseline/check-circle\" class=\"fill-label-green-06\"></mds-icon>\n\n<!-- Follow the current text color of a parent -->\n<p class=\"text-success-fg fill-current\">\n  <mds-icon name=\"mi/baseline/check\"></mds-icon>\n  Operazione completata\n</p>\n```\n\n#### Standalone Decorative Icon Inside a Labelled Control\n\n`<mds-icon>` renders with `aria-hidden=\"true\"` on its inner element; it carries no accessible name itself. When used standalone next to visible text, no extra ARIA is needed. When used as the only visual indicator inside an interactive control, the control must supply the accessible name.\n\n```html\n<!-- Decorative: the adjacent text provides the meaning -->\n<span class=\"flex items-center gap-200\">\n  <mds-icon name=\"mi/baseline/email\"></mds-icon>\n  Invia messaggio\n</span>\n```\n\n#### Styling via `::part(svg)`\n\nThe single documented shadow part is `svg` - the `<i>` wrapper around the inlined SVG. Use `::part(svg)` only for deep SVG styling not achievable through `fill` or `color`. Keep to documented parts; undocumented internals can change on minor releases.\n\n```css\nmds-icon::part(svg) {\n  filter: drop-shadow(0 1px 2px rgb(var(--magma-shadow-ink) / 0.3));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-icon>`. 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 `<img>` or Inline `<svg>` Instead of `<mds-icon>`\n\nUsing a raw `<img src=\"...svg\">` or a hardcoded `<svg>` literal bypasses the shared path management and cache (in memory and IndexedDB) and the shared theming surface. Use `<mds-icon name=\"...\">` with the slug so the icon is cached and takes its color from CSS.\n\n```html\n<!-- INCORRECT -->\n<img src=\"/assets/img/svg/mi/baseline/add.svg\" alt=\"\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"...\"/></svg>\n\n<!-- CORRECT -->\n<mds-icon name=\"mi/baseline/add\"></mds-icon>\n```\n\n#### Do Not Slot `<mds-icon>` to Add an Icon to Another Component\n\n`<mds-icon>` has no slot and accepts no children. Other Magma components expose an `icon` prop that renders the SVG through the shared service with correct positioning. Slotting `<mds-icon>` into the default slot of another component is stripped or misaligned.\n\n```html\n<!-- INCORRECT -->\n<mds-button>\n  <mds-icon name=\"mi/baseline/add\"></mds-icon>\n  Aggiungi\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button label=\"Aggiungi\" icon=\"mi/baseline/add\" variant=\"primary\" tone=\"weak\"></mds-button>\n```\n\n#### Do Not Configure the Path with a Bare Relative Value\n\n`setSvgPath` (on `IconsSetService` or the element) treats an absolute path (starting with `/`) as relative to `window.location.origin`, and accepts full URLs. A bare relative value like `assets/svg/` is *accepted* but resolved against the **current page URL** (or the `<base href>`, when the page has one) on each request, so it silently breaks on nested routes (e.g. `/users/42/`). Always pass an absolute path or a full URL. Only an empty/whitespace value, or one that is not a URL (e.g. `http://`), throws (`Svg path not recognize ...`).\n\n```javascript\n// FRAGILE - resolved relative to the current page, breaks on nested routes\nIconsSetService.setSvgPath('assets/svg/');\n\n// CORRECT - absolute path (prefixed with the origin)\nIconsSetService.setSvgPath('/assets/svg/');\n\n// CORRECT - full URL (for example a CDN)\nIconsSetService.setSvgPath('https://cdn.example.com/svg/');\n```\n\n#### Do Not Rely on `<mds-icon>` for an Accessible Label\n\n`<mds-icon>` renders its inner element with `aria-hidden=\"true\"`. An icon used as the sole indicator inside an interactive control or next to no visible text provides no accessible name by itself. The surrounding control must carry the accessible name.\n\n```html\n<!-- INCORRECT - button has no accessible name -->\n<button>\n  <mds-icon name=\"mi/baseline/delete\"></mds-icon>\n</button>\n\n<!-- CORRECT - use mds-button with aria-label -->\n<mds-button\n  icon=\"mi/baseline/delete\"\n  aria-label=\"Elimina elemento\"\n  variant=\"error\"\n  tone=\"text\"\n></mds-button>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the SVG\n\nThe only supported styling surface is `::part(svg)` and the inherited CSS `fill` set on the host. Using `>>>`, `/deep/`, or descendant selectors on `.icon` or internal class names couples code to the Shadow DOM structure and breaks on minor releases.\n\n```css\n/* INCORRECT */\nmds-icon >>> .icon svg path {\n  fill: red;\n}\nmds-icon .icon {\n  transform: rotate(45deg);\n}\n\n/* CORRECT */\nmds-icon {\n  fill: rgb(var(--magma-danger-fg));\n}\nmds-icon::part(svg) {\n  transform: rotate(45deg);\n}\n```\n\n#### Do Not Add `.svg` Extension to a Slug\n\nThe slug passed to `name` must not include the `.svg` extension - the service appends it when building the fetch URL. Adding the extension causes a double-`.svg` path (`mi/baseline/close.svg.svg`) that returns a 404.\n\n```html\n<!-- INCORRECT -->\n<mds-icon name=\"mi/baseline/close.svg\"></mds-icon>\n\n<!-- CORRECT -->\n<mds-icon name=\"mi/baseline/close\"></mds-icon>\n```\n\n#### Do Not Override Size with Fixed `width` and `height` HTML Attributes\n\n`<mds-icon>` is a custom element - HTML `width` and `height` attributes have no effect on it. Size is controlled by the CSS `width` property on the host (height follows from `aspect-ratio: 1`). Use a Tailwind width utility or a custom CSS rule.\n\n```html\n<!-- INCORRECT - attributes are ignored -->\n<mds-icon name=\"mi/baseline/star\" width=\"32\" height=\"32\"></mds-icon>\n\n<!-- CORRECT - CSS width drives the size -->\n<mds-icon name=\"mi/baseline/star\" class=\"w-1200\"></mds-icon>\n```\n"
      },
      "props": [
        {
          "name": "name",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "The name of the icon or a base64 string to render it as an svg",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "setSvgPath",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(svgPath: string) => Promise<void>",
            "parameters": [
              {
                "name": "svgPath",
                "type": "string",
                "docs": "path to the directory of svg files"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "setSvgPath(svgPath: string) => Promise<void>",
          "parameters": [
            {
              "name": "svgPath",
              "type": "string",
              "docs": "path to the directory of svg files"
            }
          ],
          "docs": "Set the path to the directory of svg files",
          "docsTags": [
            {
              "name": "param",
              "text": "svgPath path to the directory of svg files"
            }
          ]
        }
      ],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [],
      "parts": [
        {
          "name": "svg",
          "docs": "The svg container of the icon"
        }
      ],
      "states": [],
      "dependents": [
        "mds-avatar",
        "mds-banner",
        "mds-button",
        "mds-chip",
        "mds-file",
        "mds-file-preview",
        "mds-filter-item",
        "mds-help",
        "mds-img",
        "mds-input",
        "mds-input-field",
        "mds-input-select",
        "mds-input-switch",
        "mds-input-upload",
        "mds-keyboard-key",
        "mds-kpi-item",
        "mds-link",
        "mds-list-item",
        "mds-mention",
        "mds-paginator-item",
        "mds-policy-ai",
        "mds-radial-progress",
        "mds-stepper-bar-item",
        "mds-tab-bar-item",
        "mds-url-view",
        "mds-usage"
      ],
      "dependencies": [],
      "dependencyGraph": {
        "mds-avatar": [
          "mds-icon"
        ],
        "mds-banner": [
          "mds-icon"
        ],
        "mds-button": [
          "mds-icon"
        ],
        "mds-chip": [
          "mds-icon"
        ],
        "mds-file": [
          "mds-icon"
        ],
        "mds-file-preview": [
          "mds-icon"
        ],
        "mds-filter-item": [
          "mds-icon"
        ],
        "mds-help": [
          "mds-icon"
        ],
        "mds-img": [
          "mds-icon"
        ],
        "mds-input": [
          "mds-icon"
        ],
        "mds-input-field": [
          "mds-icon"
        ],
        "mds-input-select": [
          "mds-icon"
        ],
        "mds-input-switch": [
          "mds-icon"
        ],
        "mds-input-upload": [
          "mds-icon"
        ],
        "mds-keyboard-key": [
          "mds-icon"
        ],
        "mds-kpi-item": [
          "mds-icon"
        ],
        "mds-link": [
          "mds-icon"
        ],
        "mds-list-item": [
          "mds-icon"
        ],
        "mds-mention": [
          "mds-icon"
        ],
        "mds-paginator-item": [
          "mds-icon"
        ],
        "mds-policy-ai": [
          "mds-icon"
        ],
        "mds-radial-progress": [
          "mds-icon"
        ],
        "mds-stepper-bar-item": [
          "mds-icon"
        ],
        "mds-tab-bar-item": [
          "mds-icon"
        ],
        "mds-url-view": [
          "mds-icon"
        ],
        "mds-usage": [
          "mds-icon"
        ]
      },
      "storybook": "design-icon--docs"
    },
    {
      "filePath": "src/components/mds-img/mds-img.tsx",
      "encapsulation": "shadow",
      "tag": "mds-img",
      "readme": "# mds-img\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "media - The native `<img>` that shows the picture"
        },
        {
          "name": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-img>` web component is the responsive image primitive of the Magma Design System. It wraps the native `<img>` element, adding accessible defaults, a built-in error/fallback state, and data-consumption-aware source selection driven by the user's bandwidth preference.\n\n#### Semantic Behavior\n\n- **Automatic alt fallback**: When `alt` is omitted, it is derived from the trailing filename segment of `src`. An empty `alt` (`alt=\"\"`) marks the image as decorative: the host takes `role=\"presentation\"` and no name, and assistive technologies skip it.\n- **Error state**: A failed load swaps the picture for a broken-image icon plus the `alt` text, emitting `mdsImgLoadError`; changing `src` clears the error and retries.\n- **Load events**: `mdsImgLoadSuccess` and `mdsImgLoadError` both carry the underlying `HTMLImageElement` in their detail, letting consumers read natural dimensions or react to failures.\n- **Consumption-aware loading**: When `srcsetConsumption` is set, the component reads the consumption preference the page applies, the one `mds-pref-consumption` publishes, and follows a change; on a page without that controller it reads the stored choice (the `mdsPrefConsumption` key). It picks the matching source; under the `low` preference the image is deferred behind a \"click to load\" placeholder until the user opts in.\n- **The box before hydration**: on a page that does not render the components on the server, `hydrated.css` gives the host its box before the component hydrates, as a native `<img>` reserves its room before the picture loads: as wide as its container, and with `width` and `height`, as tall as their ratio says. The page below it does not move when the component hydrates. The ratio needs typed `attr()`, in Chromium since 133; in a browser without it the host stays 0 px tall until it hydrates, and a page that needs the room there too gives the host the ratio itself (`aspect-ratio`).\n- **Localized placeholder**: The deferred-load placeholder label is resolved through the shared locale system (el/en/es/it).\n\n#### Properties & Visual Configurations\n\nMost props are pass-throughs to the native image attributes of the same name (`src`, `srcset`, `sizes`, `width`, `height`, `loading`, `decoding`, `crossorigin`, `referrerpolicy`) and behave as in HTML; pick values as you would for a plain `<img>`. `crossorigin`, `referrerpolicy` and `decoding` have no default: unset, the image is fetched without CORS and with the referrer policy of the page, and the browser chooses how to decode it. `loading` defaults to `'lazy'`, so opt into `'eager'` only for above-the-fold imagery.\n\n#### Other behavioral props\n\n- **`srcsetConsumption`** is a comma-separated map of sources tagged `low` / `medium` / `high` (e.g. `\"img-bw.jpg low, img.jpg medium, img@2x.jpg high\"`). Unlike native `srcset`, the bucket is chosen by the stored consumption preference rather than viewport, letting low-bandwidth users save data by deferring or downgrading the image.\n- **`alt`** supply meaningful text for content images, since it doubles as both the accessible name and the visible label in the error and deferred-load states.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-img>` 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 Image with Alt Text\n\nThe canonical form. Always supply a meaningful `alt` value for content images - it doubles as the accessible name and as the visible label in both the error state and the deferred-load placeholder.\n\n```html\n<mds-img src=\"/assets/img/copertina-corso.jpg\" alt=\"Copertina del corso di formazione\"></mds-img>\n```\n\n#### Responsive Image with `srcset` and `sizes`\n\nPass the standard `srcset` and `sizes` attributes exactly as you would on a native `<img>`. The browser picks the best source based on viewport and device pixel ratio.\n\n```html\n<mds-img\n  src=\"/assets/img/hero-800.jpg\"\n  srcset=\"/assets/img/hero-400.jpg 400w, /assets/img/hero-800.jpg 800w, /assets/img/hero-1600.jpg 1600w\"\n  sizes=\"(max-width: 600px) 400px, (max-width: 1200px) 800px, 1600px\"\n  alt=\"Vista panoramica del centro storico\"\n></mds-img>\n```\n\n#### Eager Loading for Above-the-Fold Images\n\n`loading` defaults to `\"lazy\"`. Set it to `\"eager\"` only for images that are immediately visible on page load, such as hero images or content at the top of the first screen.\n\n```html\n<mds-img\n  src=\"/assets/img/hero-principale.jpg\"\n  alt=\"Hero della pagina principale\"\n  loading=\"eager\"\n></mds-img>\n```\n\n#### A Large Picture Lower on the Page\n\n`decoding=\"async\"` lets the browser decode the picture apart from the rest of the page, which then shows without waiting for it. With `width` and `height` the host keeps the room of the picture before the component hydrates and before the picture loads.\n\n```html\n<mds-img\n  src=\"/assets/img/studio.webp\"\n  alt=\"Magma Studio\"\n  width=\"1440\"\n  height=\"900\"\n  decoding=\"async\"\n></mds-img>\n```\n\n#### Consumption-Aware Sources with `srcset-consumption`\n\nUse `srcset-consumption` to serve a different image source depending on the user's bandwidth preference stored via `mds-pref-consumption`. Tag each source with `low`, `medium`, or `high`. Under the `low` preference the image is deferred behind a \"Carica immagine\" placeholder until the user clicks.\n\n```html\n<mds-img\n  src=\"/assets/img/copertina-libro.jpg\"\n  srcset-consumption=\"/assets/img/copertina-bw-1x.jpg low, /assets/img/copertina-1x.jpg medium, /assets/img/copertina-2x.jpg high\"\n  alt=\"Il nuovo codice dei contratti pubblici\"\n></mds-img>\n```\n\n#### Consumption-Aware with Fallback `src`\n\nProvide `src` alongside `srcset-consumption` as the fallback used when a bucket is missing from the consumption map. Here `src` is the high-resolution file; only `low` and `medium` buckets are overridden.\n\n```html\n<mds-img\n  src=\"/assets/img/copertina-2x.jpg\"\n  srcset-consumption=\"/assets/img/copertina-bw-1x.jpg low, /assets/img/copertina-1x.jpg medium\"\n  alt=\"Manuale pratico degli appalti pubblici\"\n></mds-img>\n```\n\n#### Reacting to Load Events\n\nListen to `mdsImgLoadSuccess` and `mdsImgLoadError` to react to image load outcomes. Both events carry the underlying `HTMLImageElement` in `event.detail.image`, allowing you to read natural dimensions or show fallback UI.\n\n```html\n<mds-img\n  id=\"hero\"\n  src=\"/assets/img/hero-principale.jpg\"\n  alt=\"Immagine principale\"\n></mds-img>\n\n<script>\n  document.getElementById('hero').addEventListener('mdsImgLoadSuccess', (event) => {\n    const img = event.detail.image;\n    console.log('Caricata:', img.naturalWidth, 'x', img.naturalHeight);\n  });\n\n  document.getElementById('hero').addEventListener('mdsImgLoadError', (event) => {\n    console.warn('Immagine non disponibile:', event.detail.image.src);\n  });\n</script>\n```\n\n#### Fixed Dimensions\n\nSet `width` and `height` (as string pixel values) to reserve layout space and prevent content reflow during load: they give the inner image its aspect ratio, and the host the same box before the component hydrates. They do not fix the rendered size - the inner image follows the host, which is `display: flex; width: 100%` by default - so size the host with CSS when a fixed pixel size is intended.\n\n```html\n<mds-img\n  src=\"/assets/img/thumbnail.jpg\"\n  alt=\"Anteprima documento\"\n  width=\"320\"\n  height=\"240\"\n></mds-img>\n```\n\n#### Styling Customization\n\nStyle the component through its public `--mds-img-*` CSS custom properties. Use the semantic color roles wrapped in `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.card-copertina mds-img {\n  --mds-img-background: rgb(var(--magma-accent-emphasis-hover));\n  --mds-img-color: rgb(var(--magma-accent-surface));\n}\n```\n\n#### Styling the Inner `<img>` via `::part(media)`\n\nWhen a CSS property must be applied directly to the inner `<img>` element (for example `object-fit` or `border-radius`) use the documented `media` shadow part. This is the only supported way to pierce the shadow boundary.\n\n```css\n.copertina-libro mds-img::part(media) {\n  border-radius: var(--magma-radius-md);\n  object-fit: cover;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-img>`. 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 Replace `<mds-img>` with a Raw `<img>` Element\n\nUsing a plain `<img>` bypasses the built-in error fallback, consumption-aware loading, and accessible-name defaults that `<mds-img>` provides.\n\n```html\n<!-- INCORRECT -->\n<img src=\"/assets/img/copertina.jpg\" alt=\"Copertina\" loading=\"lazy\">\n\n<!-- CORRECT -->\n<mds-img src=\"/assets/img/copertina.jpg\" alt=\"Copertina\"></mds-img>\n```\n\n#### Do Not Omit `alt` When the Image Conveys Information\n\n`<mds-img>` derives a fallback `alt` from the filename when none is supplied, but a raw filename slug is not a meaningful description. Supply a descriptive `alt` for every content image.\n\n```html\n<!-- INCORRECT -->\n<mds-img src=\"/assets/img/report-annuale-2024.jpg\"></mds-img>\n\n<!-- CORRECT -->\n<mds-img src=\"/assets/img/report-annuale-2024.jpg\" alt=\"Report annuale 2024\"></mds-img>\n```\n\n#### Do Not Listen to the Native `load` or `error` Events\n\nThe inner `<img>` lives in shadow DOM, and its native `load` and `error` events do not bubble, so a listener on the host never receives them. Use the documented `mdsImgLoadSuccess` and `mdsImgLoadError` custom events instead.\n\n```html\n<!-- INCORRECT -->\n<mds-img id=\"foto\" src=\"/assets/img/foto.jpg\" alt=\"Foto\"></mds-img>\n<script>\n  document.getElementById('foto').addEventListener('load', handler);\n  document.getElementById('foto').addEventListener('error', handler);\n</script>\n\n<!-- CORRECT -->\n<mds-img id=\"foto\" src=\"/assets/img/foto.jpg\" alt=\"Foto\"></mds-img>\n<script>\n  document.getElementById('foto').addEventListener('mdsImgLoadSuccess', handler);\n  document.getElementById('foto').addEventListener('mdsImgLoadError', handler);\n</script>\n```\n\n#### Do Not Use `srcset-consumption` Without a Meaningful Bucket Tag\n\nEach entry in `srcset-consumption` must end with `low`, `medium`, or `high`. Entries with any other tag, or none, are ignored with a console warning, leaving that consumption level without a source.\n\n```html\n<!-- INCORRECT -->\n<mds-img\n  srcset-consumption=\"/assets/img/small.jpg 1x, /assets/img/large.jpg 2x\"\n  alt=\"Immagine\"\n></mds-img>\n\n<!-- CORRECT -->\n<mds-img\n  srcset-consumption=\"/assets/img/small.jpg low, /assets/img/medium.jpg medium, /assets/img/large.jpg high\"\n  alt=\"Immagine\"\n></mds-img>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Inner `<img>`\n\nTargeting internal selectors with `>>>`, `/deep/`, or undocumented class names couples your code to the shadow DOM structure and will break on minor releases. Use the public `--mds-img-*` CSS custom properties for color theming, and the documented `::part(media)` for geometry/object-fit overrides.\n\n```css\n/* INCORRECT */\nmds-img >>> img {\n  border-radius: 8px;\n  object-fit: cover;\n}\n\n/* CORRECT */\nmds-img::part(media) {\n  border-radius: var(--magma-radius-md);\n  object-fit: cover;\n}\n```\n\n#### Do Not Set `loading=\"eager\"` for Every Image\n\n`loading` defaults to `\"lazy\"`, which is the correct behavior for most images. Setting `\"eager\"` on all images forces the browser to download every image immediately, degrading performance. Reserve `\"eager\"` for images that are visible on first paint.\n\n```html\n<!-- INCORRECT -->\n<mds-img src=\"/assets/img/thumbnail-1.jpg\" alt=\"Anteprima 1\" loading=\"eager\"></mds-img>\n<mds-img src=\"/assets/img/thumbnail-2.jpg\" alt=\"Anteprima 2\" loading=\"eager\"></mds-img>\n<mds-img src=\"/assets/img/thumbnail-3.jpg\" alt=\"Anteprima 3\" loading=\"eager\"></mds-img>\n\n<!-- CORRECT -->\n<mds-img src=\"/assets/img/hero.jpg\" alt=\"Hero principale\" loading=\"eager\"></mds-img>\n<mds-img src=\"/assets/img/thumbnail-1.jpg\" alt=\"Anteprima 1\"></mds-img>\n<mds-img src=\"/assets/img/thumbnail-2.jpg\" alt=\"Anteprima 2\"></mds-img>\n```\n"
      },
      "props": [
        {
          "name": "alt",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": true,
          "attr": "alt",
          "reflectToAttr": true,
          "docs": "Specifies an alternate text for an image. An empty `alt` marks the image as decorative, left\nout by assistive technologies; without `alt` the image is named after its file",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "crossorigin",
          "type": "\"anonymous\" | \"use-credentials\" | undefined",
          "complexType": {
            "original": "CrossoriginType",
            "resolved": "\"anonymous\" | \"use-credentials\" | undefined",
            "references": {
              "CrossoriginType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-img/meta/types.ts::CrossoriginType",
                "referenceLocation": "CrossoriginType"
              }
            }
          },
          "mutable": false,
          "attr": "crossorigin",
          "reflectToAttr": false,
          "docs": "Fetches the image with CORS, as the `crossorigin` attribute of `<img>`: a third-party image\ncan then be used with canvas, if its site allows it. Unset, the image is fetched without CORS",
          "docsTags": [],
          "values": [
            {
              "value": "anonymous",
              "type": "string"
            },
            {
              "value": "use-credentials",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "decoding",
          "type": "\"async\" | \"auto\" | \"sync\" | undefined",
          "complexType": {
            "original": "DecodingType",
            "resolved": "\"async\" | \"auto\" | \"sync\" | undefined",
            "references": {
              "DecodingType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-img/meta/types.ts::DecodingType",
                "referenceLocation": "DecodingType"
              }
            }
          },
          "mutable": false,
          "attr": "decoding",
          "reflectToAttr": false,
          "docs": "How the browser decodes the picture, as the `decoding` attribute of `<img>`: `async` apart\nfrom the rest of the page, which then shows without waiting for it, as a large picture lower\non the page can; `sync` with it; `auto` as the browser chooses. Unset, the browser chooses",
          "docsTags": [],
          "values": [
            {
              "value": "async",
              "type": "string"
            },
            {
              "value": "auto",
              "type": "string"
            },
            {
              "value": "sync",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "height",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "height",
          "reflectToAttr": false,
          "docs": "The height of the picture, in pixels, as the `height` attribute of `<img>`. With `width`, its\nratio gives the host its box before the component hydrates, as a native `<img>` reserves its\nroom before the picture loads (hydrated.css, where the browser supports typed `attr()`)",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "loading",
          "type": "\"eager\" | \"lazy\" | undefined",
          "complexType": {
            "original": "LoadingType",
            "resolved": "\"eager\" | \"lazy\" | undefined",
            "references": {
              "LoadingType": {
                "location": "import",
                "path": "@type/loading",
                "id": "src/type/loading.ts::LoadingType",
                "referenceLocation": "LoadingType"
              }
            }
          },
          "mutable": false,
          "attr": "loading",
          "reflectToAttr": false,
          "docs": "Specifies whether a browser should load an image immediately\nor to defer loading of images until some conditions are met.",
          "docsTags": [
            {
              "name": "default",
              "text": "'lazy'"
            }
          ],
          "default": "'lazy'",
          "values": [
            {
              "value": "eager",
              "type": "string"
            },
            {
              "value": "lazy",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "referrerpolicy",
          "type": "\"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin\" | \"origin-when-cross-origin\" | \"unsafe-url\" | undefined",
          "complexType": {
            "original": "ReferrerpolicyType",
            "resolved": "\"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin\" | \"origin-when-cross-origin\" | \"unsafe-url\" | undefined",
            "references": {
              "ReferrerpolicyType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-img/meta/types.ts::ReferrerpolicyType",
                "referenceLocation": "ReferrerpolicyType"
              }
            }
          },
          "mutable": false,
          "attr": "referrerpolicy",
          "reflectToAttr": false,
          "docs": "Specifies which referrer information to use when fetching an image, as the `referrerpolicy`\nattribute of `<img>`. Unset, the policy of the page applies",
          "docsTags": [],
          "values": [
            {
              "value": "no-referrer",
              "type": "string"
            },
            {
              "value": "no-referrer-when-downgrade",
              "type": "string"
            },
            {
              "value": "origin",
              "type": "string"
            },
            {
              "value": "origin-when-cross-origin",
              "type": "string"
            },
            {
              "value": "unsafe-url",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "sizes",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "sizes",
          "reflectToAttr": false,
          "docs": "One or more strings separated by commas, indicating a set of source sizes.\nhttps://medium.com/@MRWwebDesign/responsive-images-the-sizes-attribute-and-unexpected-image-sizes-882a2eadb6db",
          "docsTags": [
            {
              "name": "example",
              "text": "'(max-width: 600px) 480px, 960px'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "src",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "src",
          "reflectToAttr": false,
          "docs": "Specifies the path to the image",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "srcset",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "srcset",
          "reflectToAttr": false,
          "docs": "Specifies a list of image files to use in different situations.\nDefines multiple sizes of the same image, allowing the browser\nto select the appropriate image source.",
          "docsTags": [
            {
              "name": "example",
              "text": "'photo-480.jpg 480w, photo-960.jpg 960w'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "srcsetConsumption",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "srcset-consumption",
          "reflectToAttr": false,
          "docs": "Specifies a list of image files to use in different situations: comma-separated, each file\nfollowed by the consumption level it is for (`low`, `medium`, `high`), so the component picks\nthe image source that matches the consumption configuration.",
          "docsTags": [
            {
              "name": "example",
              "text": "'photo-bw-1x.jpg low, photo-1x.jpg medium, photo-2x.jpg high'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "width",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "width",
          "reflectToAttr": false,
          "docs": "The width of the picture, in pixels, as the `width` attribute of `<img>`. With `height`, its\nratio gives the host its box before the component hydrates",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsImgLoadError",
          "detail": "MdsImgEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsImgEventDetail",
            "resolved": "MdsImgEventDetail",
            "references": {
              "MdsImgEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-img/meta/event-detail.ts::MdsImgEventDetail",
                "referenceLocation": "MdsImgEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the image is not loaded",
          "docsTags": []
        },
        {
          "event": "mdsImgLoadSuccess",
          "detail": "MdsImgEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsImgEventDetail",
            "resolved": "MdsImgEventDetail",
            "references": {
              "MdsImgEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-img/meta/event-detail.ts::MdsImgEventDetail",
                "referenceLocation": "MdsImgEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the image is successfully loaded",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-img-background",
          "annotation": "prop",
          "docs": "The background color of the image container.",
          "visibility": "public"
        },
        {
          "name": "--mds-img-color",
          "annotation": "prop",
          "docs": "The foreground/text color used inside the image component.",
          "visibility": "public"
        },
        {
          "name": "--mds-img-error-background",
          "annotation": "prop",
          "docs": "The background color shown when the image fails to load.",
          "visibility": "internal"
        },
        {
          "name": "--mds-img-error-color",
          "annotation": "prop",
          "docs": "The text or foreground color shown in the error state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-img-error-icon-color",
          "annotation": "prop",
          "docs": "The icon color used in the error state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-img-icon-color",
          "annotation": "prop",
          "docs": "The color applied to icons displayed within the image element.",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "media",
          "docs": "The native `<img>` that shows the picture"
        }
      ],
      "states": [],
      "dependents": [
        "mds-avatar",
        "mds-file-preview",
        "mds-push-notification-item"
      ],
      "dependencies": [
        "mds-icon",
        "mds-text",
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-img": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-avatar": [
          "mds-img"
        ],
        "mds-file-preview": [
          "mds-img"
        ],
        "mds-push-notification-item": [
          "mds-img"
        ]
      },
      "storybook": "ui-image--docs"
    },
    {
      "filePath": "src/components/mds-input/mds-input.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input",
      "readme": "# mds-input\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "color-picker-button - Selects the button that opens the colour picker of a `color` field"
        },
        {
          "name": "part",
          "text": "counter-button-decrease - Selects the button used to decrease the input value"
        },
        {
          "name": "part",
          "text": "counter-button-increase - Selects the button used to increase the input value"
        },
        {
          "name": "part",
          "text": "field - Selects the native input field used by the component"
        },
        {
          "name": "part",
          "text": "mic-toggle-button - Selects the button that starts and stops the speech to text"
        },
        {
          "name": "part",
          "text": "password-toggle-button - Selects the button used to show or hide password"
        },
        {
          "name": "part",
          "text": "password-mask-items - Selects the items wrapper used to mask the password"
        },
        {
          "name": "part",
          "text": "password-mask-item - Selects the item used to mask the password"
        },
        {
          "name": "part",
          "text": "tip-count - Selects the mds-input-tip-item shown when maxlength attribute is set, can be used to hide it if needed"
        },
        {
          "name": "part",
          "text": "tip-top - Selects the verbose status of input on top of element"
        },
        {
          "name": "part",
          "text": "tip-bottom - Selects the verbose status of input on bottom of element"
        },
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input>` web component is the primary single- and multi-line text entry control of the Magma Design System. It wraps a native `<input>` (or `<textarea>` when `type=\"textarea\"`) and layers on form association, validation, inline tips, iconography, password masking, numeric steppers, colour codes with a swatch and the picker of the platform, datalist suggestions and speech-to-text dictation.\n\n#### Semantic Behavior\n\n- **Form association**: The component reports its value to the surrounding `<form>`, so it submits natively. On `disabled` the reported value is cleared. A form reset brings back the value the field had at load, both shown and submitted, and drops the `'success'` or `'error'` look of a past blur, like a native input.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables it as `disabled` does, like a native control: it cannot be changed and its value is left out of the form, until the fieldset is enabled.\n- **Form validity**: The validators below also decide the validity reported to the form, on every change of the value or of the rules: like a native control, an invalid field matches `:invalid` and stops the submit, the browser shows a message in the page language next to the field and focuses it, and the field switches to `'error'` as on blur. Disabled and read-only fields are left out, and `novalidate` on the `<form>` turns the check off. `type=\"email\"` and `type=\"url\"` check the format of the value as a native input does.\n- **Validation on blur**: Validation runs when the field loses focus (and re-runs on input once invalid). A `required` field waits for that first blur too: until then, typing only updates its required tip. It drives the `variant` automatically to `'success'` or `'error'`, emits `mdsInputValidation` with the boolean result, and reverts to `'primary'` when an optional field is emptied.\n- **Type-aware validators**: The active validator set is derived from `type` - `email` and `url` install the format validators of the native types, `cf` the codice fiscale format and length validators, `isbn` a checksum validator, `piva` the partita IVA one (11 digits, the last one the check digit) and `cc` the card number one (13 to 19 digits, in groups split by spaces or dashes, that pass the Luhn check) and `color` the colour code one (see Colour field); no type applies an input mask, while `required`, `min`/`max` (any number, `0` included), `minlength`/`maxlength` and `pattern` add the corresponding constraint validators. As on a native input, `pattern` has to match the whole value, an expression that does not compile sets no rule, and `number`, `date`, `time`, `textarea` and `color` ignore it. The set is rebuilt whenever one of these props changes, also after load, as with the React wrappers under SSR: a pristine field only updates its required tip, a field already validated on blur is validated again. Custom validators can be attached at runtime through the `addValidator`/`removeValidator`/`hasValidator`/`getErrors` methods.\n- **Localized messages**: The messages of the built-in validators, the ones `getErrors()` returns and `mds-input-field` shows, are in the language of the page when the value is validated (`el`, `en`, `es`, `it`, English for any other).\n- **Error keys**: `getErrors()` reports each failed rule under its own key: `required`, `max`, `min`, `maxlength`, `minlength`, `pattern`, `email`, `url`, `piva`, `cc`, `color`, `isbn-error`, `cf-regex` and `cf-length`, plus the keys the custom validators return. Up to 2.5.0, `maxlength` and `minlength` were both reported as `minLenght`.\n- **Disabled / read-only tips**: `disabled` and `readonly` surface a persistent top tip describing the state; read-only fields also auto-select their text on focus. The top tip (this badge, and the dot of `required`) stands on the top border of the field, half outside, clear of its rounded corner by its radius plus a margin, and stays there while the field has the focus: inside the field it covered the button at its end.\n- **No action that changes the value on a field the user cannot change**: a read-only or disabled field (a disabled `<fieldset>` included) has none of the buttons at its end that change the value (the steppers of a number, the dictation button, the picker of a colour); its text takes their room and its end is left to the badge of its state. The password toggle stays, since it shows the value without changing it (disabled with the field).\n- **Character counter**: When `maxlength` is set a bottom counter tip shows `current / max` and shifts through fullness variants as the value approaches the limit. A `maxlength` of `0` or less is treated as unset.\n- **Password masking**: With `type=\"password\"` a toggle button reveals/hides the value; it is disabled with the field.\n- **Colour field**: `type=\"color\"` keeps a text field, where a colour code is typed and validated, with a swatch of the colour at its start and a button at its end that opens the colour picker of the platform; it keeps the sizes, the variants, `readonly`, `required`, the form and the validation, and the label and message of `mds-input-field`. The value, in `mdsInputChange` and in the form, is the colour as `#rrggbb` in lower case, the valid lowercase simple colour of HTML, without alpha. The text also takes `#rgb` and the code without `#`, in upper or lower case (what Figma copies), and the field writes it back as `#rrggbb` when it is left. Any other text, a name or `rgb()` among them, is an error under the key `color` whose message says what to write: the text stays for the user to correct and the value becomes `''`, as a native number input does with a text that is no number (the form gets `''` and the field reports `badInput`), so the event and the form only ever carry a colour or `''`. A value set by code is read the same way: `#ABC` becomes `#aabbcc`, `red` is shown with its error and the value becomes `''`. A field that is not `required` can stay empty, where a native colour input always holds `#000000`.\n- **The swatch and the picker button**: the swatch is a disc of the colour of the value, as large as the glyph of an icon and where the icon goes, so it scales with `size`; while the text names no colour it is empty, its ring alone. The ring is the `border-strong` role, the 3:1 contrast a graphic needs on the fill of the field to show a white or a black colour. The button at the end, where the microphone of a text field goes, has a palette icon and the name \"Choose a colour for\" the name of the field in the page language, and comes after the text in the order of the keyboard: it opens the colour picker of the platform (a native `<input type=\"color\">` hidden under it) on the colour of the value, black for an empty field; the colour picked writes the text and the value and emits `mdsInputChange` as typing does. A click on the swatch opens it too, a shortcut for the pointer: the swatch is hidden from assistive technologies and out of the order of the keyboard, the button is the control. A read-only or disabled field (a disabled `<fieldset>` included) has no button: it offers no way to change the value, the swatch still shows the colour and opens nothing, and the end of the field is left to the badge of its state. Next to the other props: the swatch takes the place of `icon`, which a colour field ignores (one mark at the start, as on `mds-chip`), with the icon `variant=\"ai\"` adds; `await` leaves the swatch, which shows the value, and puts its spinner at the end, before the button (at the very end of a read-only or disabled field); `mic` is ignored, since a colour code is typed or picked, not dictated, and the end holds the button.\n- **Number steppers**: With `type=\"number\"` increment/decrement buttons are rendered; their placement follows `controlsLayout` and their glyphs follow `controlsIcon`. The side buttons of the horizontal layout are as tall as the field, with the icon of an `sm` button at `md` and `sm`, as the other buttons inside the field. A read-only or disabled number has no steppers: it is a plain field, with the padding of any field and its text at the start (the centring of the horizontal layout belongs to the buttons on its sides). The arrow keys still step the value of a field the user can change.\n- **A fill a step off its surface**: on a page the field paints `surface-overlay`; inside a surface that paints `overlay` (the window of a dialog, `mds-banner`, `mds-status-bar`, `mds-dropdown`, `mds-table`) it paints `surface-default`, the step below, passed down as `--magma-field-fill`, so the field never melts into the window. `--mds-input-background` still sets the fill outright.\n- **Speech-to-text**: When `mic` is set a dictation button transcribes speech into the value, replacing what was there, and emits `mdsInputSpeechEnd` when the user stops the dictation; when the Web Speech API is unavailable the button switches to an error state and the value is left as it is. A disabled or read-only field (a disabled `<fieldset>` included), which the user cannot change, has no dictation button, and leaves the end of the field to the badge of its state; a dictation in progress stops at once, emitting `mdsInputSpeechEnd`, when the field becomes so.\n- **Emitted events**: `mdsInputChange` carries the new value, `mdsInputKeydown` fires on every key pressed in the field with the native `KeyboardEvent` as detail (before the value changes: read the value from `mdsInputChange`), and `mdsInputFocus`/`mdsInputBlur` fire on focus transitions.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` ladder (color role) is defined in [`agents/variants.md`](../../../../agents/variants.md); `<mds-input>` consumes it for both intent styling and validation feedback, but does not expose a `tone` prop. It accepts `primary` (default), `ai`, `info`, `success`, `warning` and `error`.\n\n- **`type`** selects both the rendered control and the validation profile: it covers the native HTML types (`color` as a text field with a swatch and a picker button, see Colour field) plus format types (`'cf'`, `'piva'`, `'isbn'`, `'cc'`) and switches the host to a multi-line `<textarea>` for `'textarea'`.\n- **`variant=\"ai\"`** auto-assigns the AI chatbot icon when no `icon` is otherwise provided, signposting AI-assisted fields.\n- **`size`** sets the height of the field, the same as [`<mds-button>`](../mds-button/AGENTS.md): `sm` 28px, `md` 36px, `lg` 48px (default). Match it to the buttons next to the field, or go smaller in dense layouts (filter bars, table toolbars); the text style stays the same, the padding and the inner icon, stepper buttons and password and microphone toggles scale with it. A `textarea` keeps its own height (`--mds-input-textarea-min-height`).\n\n#### Other behavioral props\n\n- **`icon`** is an SVG filename slug from the Magma icon library shown at the leading (left) edge of the field; it is suppressed while `await` is active, since the spinner takes its place. A `color` field ignores it: its swatch stands there.\n- **`controlsLayout`** chooses between stacked (`'vertical'`) and split (`'horizontal'`) stepper buttons, and **`controlsIcon`** picks arrow vs. plus/minus glyphs - both apply only to `type=\"number\"`.\n- **`datalist`** supplies suggestion options for `type=\"search\"` style autocompletion.\n- **`tip`** renders inline helper text below the field, and **`typography`** selects the field's text scale.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Text Input\n\nThe simplest form: set `name` for form participation and `placeholder` for a visual hint. Wrap the component in [`mds-input-field`](../mds-input-field/AGENTS.md) to add a visible label and associated tip.\n\n```html\n<mds-input\n  name=\"cognome\"\n  placeholder=\"Inserisci il tuo cognome\"\n></mds-input>\n```\n\n#### Required Field with `tip` Helper Text\n\nUse `required` to validate that the field is not empty and `tip` to explain the constraint. The component surfaces a top-tip when focused and drives `variant` to `'error'` or `'success'` on blur. When the field collects the user's own data, set the matching `autocomplete` token (`email`, `given-name`, `tel`, ...) so browsers can identify its purpose (WCAG 2.1 SC 1.3.5) and offer autofill; without it the component default `autocomplete=\"off\"` applies.\n\n```html\n<mds-input\n  name=\"email\"\n  type=\"email\"\n  autocomplete=\"email\"\n  placeholder=\"nome@esempio.it\"\n  required\n  tip=\"Inserisci un indirizzo email valido\"\n></mds-input>\n```\n\n#### Textarea for Multi-line Content\n\nSet `type=\"textarea\"` to render a `<textarea>` instead of a single-line `<input>`. Use the `--mds-input-textarea-*` custom properties to control height and resize behaviour.\n\n```html\n<mds-input\n  name=\"descrizione\"\n  type=\"textarea\"\n  placeholder=\"Descrivi il problema...\"\n  maxlength=\"500\"\n></mds-input>\n```\n\n#### Character Counter via `maxlength`\n\nWhen `maxlength` is set the component renders a live `current / max` counter below the field. The counter shifts through fullness variants as the limit approaches. A value of `0` or less is treated as unset.\n\n```html\n<mds-input\n  name=\"titolo\"\n  placeholder=\"Titolo dell'articolo\"\n  maxlength=\"120\"\n></mds-input>\n```\n\n#### Numeric Input with Steppers\n\nSet `type=\"number\"` to enable built-in increment/decrement buttons. Use `controlsLayout` to choose between stacked (`'vertical'`, default) and split (`'horizontal'`) placement, and `controlsIcon` to pick arrow vs. plus/minus glyphs. Use `min`, `max`, and `step` to constrain the legal range. A `readonly` or `disabled` number shows no steppers: the value cannot change there.\n\n```html\n<!-- Stacked (default) - arrow glyphs -->\n<mds-input\n  name=\"quantita\"\n  type=\"number\"\n  min=\"1\"\n  max=\"99\"\n  step=\"1\"\n  placeholder=\"1\"\n></mds-input>\n\n<!-- Horizontal split - arithmetic glyphs -->\n<mds-input\n  name=\"quantita\"\n  type=\"number\"\n  min=\"0\"\n  max=\"100\"\n  controls-layout=\"horizontal\"\n  controls-icon=\"arithmetic\"\n  placeholder=\"0\"\n></mds-input>\n```\n\n#### Password Input\n\nSet `type=\"password\"` to render a masked field with a built-in visibility toggle. The component renders a custom dot-mask overlay and a show/hide button - no extra wiring is needed. Always set `autocomplete` to `new-password` (sign-up, password change) or `current-password` (login): the component default is `autocomplete=\"off\"`, which browsers and password managers ignore on credential fields, but the explicit token is what lets them pair the password with its username field and fill or generate the right value.\n\n```html\n<mds-input\n  name=\"password\"\n  type=\"password\"\n  autocomplete=\"new-password\"\n  placeholder=\"Scegli una password\"\n  required\n></mds-input>\n```\n\n#### Login Form\n\nPair a username field carrying `autocomplete=\"username\"` with a password field carrying `autocomplete=\"current-password\"` inside a `<form>`, and submit through `<mds-button type=\"submit\">`. The native fields live in the Shadow DOM of each `<mds-input>`: among the password managers tested, Bitwarden, LastPass, Chrome and Edge detect and fill them, Firefox's built-in manager and KeePassXC-Browser do not (they only look at the light DOM).\n\n```html\n<form action=\"/login\" method=\"post\">\n  <mds-input-field label=\"Email\">\n    <mds-input name=\"username\" type=\"email\" autocomplete=\"username\" required></mds-input>\n  </mds-input-field>\n  <mds-input-field label=\"Password\">\n    <mds-input name=\"password\" type=\"password\" autocomplete=\"current-password\" required></mds-input>\n  </mds-input-field>\n\n  <mds-button type=\"submit\" label=\"Accedi\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Italian-Specific Masked Types\n\n`type=\"cf\"` installs the codice fiscale format and length validators and `type=\"isbn\"` a checksum validator. `type=\"piva\"` accepts 11 digits whose last one is the check digit, without the `IT` prefix or spaces, and `type=\"cc\"` 13 to 19 digits, in groups split by spaces or dashes, that pass the Luhn check of card numbers. A value that breaks the format stops the submit of the form. No type applies a keyboard mask.\n\n```html\n<mds-input name=\"codice_fiscale\" type=\"cf\" placeholder=\"RSSMRA80A01H501Z\"></mds-input>\n<mds-input name=\"partita_iva\"    type=\"piva\" placeholder=\"01234567890\"></mds-input>\n```\n\n#### Colour Field\n\nSet `type=\"color\"` to ask for a colour: the code is typed in the field, or picked with the button at its end (or a click on the swatch at its start), which opens the picker of the platform. The value is `#rrggbb` in lower case, in `mdsInputChange` and in the form; the field also takes `#rgb` and the code without `#`, in any case, and writes it as `#rrggbb` when it is left. Wrap it in `mds-input-field`: the label names the field and its picker button, the message shows the error of a text that names no colour. A field that is not `required` can stay empty.\n\n```html\n<mds-input-field label=\"Colore di base\">\n  <mds-input name=\"base\" type=\"color\" value=\"#2f6fd0\" placeholder=\"#rrggbb\" required></mds-input>\n</mds-input-field>\n```\n\n```javascript\ndocument.querySelector('mds-input[type=\"color\"]').addEventListener('mdsInputChange', (e) => {\n  // a colour as #rrggbb, or '' while the field is empty or its text names no colour\n  if (e.detail.value) applyColour(e.detail.value);\n});\n```\n\n#### Search Input with Datalist\n\nUse `type=\"search\"` combined with the `datalist` prop to offer autocomplete suggestions from a fixed list. The list is rendered inside the shadow DOM and wired automatically.\n\n```html\n<mds-input\n  name=\"comune\"\n  type=\"search\"\n  placeholder=\"Cerca comune...\"\n></mds-input>\n```\n\n```javascript\n// Pass suggestions as a JavaScript array\ndocument.querySelector('mds-input').datalist = ['Roma', 'Milano', 'Napoli', 'Torino'];\n```\n\n#### Icon Decoration\n\nThe `icon` prop renders an SVG slug from the Magma icon library at the leading edge of the field. The icon is suppressed while `await` is active and the spinner takes its place.\n\n```html\n<mds-input\n  name=\"cerca\"\n  type=\"search\"\n  icon=\"mi/baseline/search\"\n  placeholder=\"Cerca...\"\n></mds-input>\n```\n\n#### AI-Assisted Field\n\nSet `variant=\"ai\"` to signal an AI-powered field. When no `icon` prop is present, the component auto-assigns the AI chatbot icon.\n\n```html\n<mds-input\n  name=\"prompt\"\n  type=\"text\"\n  variant=\"ai\"\n  placeholder=\"Chiedi qualcosa all'assistente...\"\n></mds-input>\n```\n\n#### Async Loading via `await`\n\nSet the `await` boolean attribute while an async operation (e.g. a lookup) is in flight. The component renders an inline spinner in place of the icon. Remove the attribute when done - do not set `await=\"false\"`.\n\n```html\n<mds-input name=\"codice\" placeholder=\"Verifica in corso...\" await></mds-input>\n```\n\n#### Speech-to-Text Dictation\n\nSet the `mic` boolean attribute to render a dictation button. Starting a dictation clears the current value and writes the recognized speech in its place; the component emits `mdsInputSpeechEnd` when the user stops the dictation. If the Web Speech API is unavailable the button switches to an error state and the value is kept. A read-only or disabled field has no dictation button.\n\n```html\n<mds-input\n  name=\"note_vocali\"\n  type=\"text\"\n  mic\n  placeholder=\"Parla o scrivi...\"\n></mds-input>\n```\n\n#### Listening to Events\n\nListen for `mdsInputChange` instead of native `input` or `change`: `change` does not cross the shadow boundary, and `input` reports only typing, not the values set by the steppers, the dictation or a script.\n\n```javascript\ndocument.querySelector('mds-input').addEventListener('mdsInputChange', (e) => {\n  console.log(e.detail.value);\n});\n\ndocument.querySelector('mds-input').addEventListener('mdsInputValidation', (e) => {\n  console.log('valido:', e.detail);\n});\n```\n\n#### Form Participation\n\n`<mds-input>` is form-associated. It submits natively inside a `<form>`; set `name` so the value is included in form data. Its validation is reported to the form too: an empty `required` field, or one that breaks another rule, stops the submit like a native input and shows the error. Add `novalidate` to the `<form>` when your own code validates on submit. A reset brings every field back to its value at load and to its pristine look.\n\n```html\n<form action=\"/salva\" method=\"post\">\n  <mds-input name=\"nome\"    type=\"text\"  placeholder=\"Nome\"   required></mds-input>\n  <mds-input name=\"cognome\" type=\"text\"  placeholder=\"Cognome\" required></mds-input>\n  <mds-input name=\"email\"   type=\"email\" placeholder=\"Email\"   required></mds-input>\n\n  <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n  <mds-button type=\"reset\"  label=\"Annulla\" variant=\"dark\" tone=\"outline\"></mds-button>\n</form>\n```\n\n#### Read-Only Display\n\nUse `readonly` when the value should be visible but not editable. A persistent top tip, on the top border of the field, describes the state, and the field text is auto-selected on focus for easy copying. The buttons that change the value (steppers, dictation, colour picker) are not shown; the password toggle stays.\n\n```html\n<mds-input\n  name=\"codice_riferimento\"\n  value=\"REF-2024-00123\"\n  readonly\n></mds-input>\n```\n\n#### Styling Customization\n\nStyle the input only through its public `--mds-input-*` CSS custom properties. Set them on the host or a parent selector. Use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.search-bar mds-input {\n  --mds-input-background: rgb(var(--magma-wash-base));\n}\n\n/* Textarea: fixed height, allow resize */\n.notes-area mds-input {\n  --mds-input-textarea-min-height: 8rem;\n  --mds-input-textarea-max-height: 24rem;\n  --mds-input-textarea-resize: vertical;\n}\n```\n\n#### Sizing a Field to the Controls Next to It\n\nGive the fields of a row the `size` of the buttons beside them, so they share one height: `sm` 28px, `md` 36px, `lg` 48px (default), the sizes of [`<mds-button>`](../mds-button/AGENTS.md). `<mds-input-select>`, `<mds-input-date>` and `<mds-input-date-range>` take the same values.\n\n```html\n<div class=\"flex items-center gap-200\">\n  <mds-input size=\"md\" type=\"search\" icon=\"mi/baseline/search\" placeholder=\"Cerca\"></mds-input>\n  <mds-input-select size=\"md\" placeholder=\"Stato\">\n    <option value=\"open\">Aperte</option>\n    <option value=\"closed\">Chiuse</option>\n  </mds-input-select>\n  <mds-button size=\"md\" label=\"Filtra\"></mds-button>\n</div>\n```\n\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input>`. 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 a Raw `<input>` When `<mds-input>` Exists\n\nReaching for a plain `<input>` bypasses theming, validation, tips, accessible state announcements, and form-reset behavior provided by the component.\n\n```html\n<!-- INCORRECT -->\n<input type=\"text\" name=\"nome\" placeholder=\"Nome\" class=\"my-input\">\n\n<!-- CORRECT -->\n<mds-input name=\"nome\" type=\"text\" placeholder=\"Nome\"></mds-input>\n```\n\n#### Do Not Use a Native `<input type=\"color\">` in a Form of Magma\n\nThe native colour input looks like no other field of the form, has no text to type or paste a code into, no message, no variant and no label of `mds-input-field`, and always holds a colour (`#000000`), so it cannot be left empty. `type=\"color\"` gives the field of Magma with the picker of the platform on the button at its end.\n\n```html\n<!-- INCORRECT -->\n<label>Colore di base <input type=\"color\" name=\"base\" value=\"#2f6fd0\"></label>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Colore di base\">\n  <mds-input type=\"color\" name=\"base\" value=\"#2f6fd0\"></mds-input>\n</mds-input-field>\n```\n\n#### Do Not Set Boolean Attributes to the String `\"false\"`\n\n`disabled`, `required`, `readonly`, `mic` and `await` are boolean attributes: remove the attribute entirely to turn it off. `mds-input` is form-associated, so as on a native control any value turns them on, `\"false\"` included: this markup renders a disabled, required field.\n\n```html\n<!-- INCORRECT -->\n<mds-input name=\"note\" disabled=\"false\" required=\"false\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input name=\"note\"></mds-input>\n```\n\n#### Do Not Force `variant` for Validation Feedback\n\nThe component drives `variant` to `'success'` or `'error'` automatically on blur when validators are active. Setting `variant` manually overrides the feedback and breaks the visual contract.\n\n```html\n<!-- INCORRECT -->\n<mds-input name=\"codice\" variant=\"error\" tip=\"Valore non valido\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input name=\"codice\" required tip=\"Inserisci un valore valido\"></mds-input>\n```\n\n#### Do Not Listen to Native `input` or `change` Events\n\nThe native `change` event does not cross the shadow boundary, and `input` reports only typing, not the values set by the steppers, the dictation or a script. Use the documented `mdsInputChange` event instead, which fires for every value change.\n\n```javascript\n// INCORRECT\ndocument.querySelector('mds-input').addEventListener('input', (e) => {\n  console.log(e.target.value);\n});\n\n// CORRECT\ndocument.querySelector('mds-input').addEventListener('mdsInputChange', (e) => {\n  console.log(e.detail.value);\n});\n```\n\n#### Do Not Use `type=\"number\"` Native Browser Spinners and Then Override the Input\n\nThe component renders its own increment/decrement buttons and hides the native browser spinners. Do not try to re-enable them via CSS, and do not add inline JS `stepUp`/`stepDown` calls - use the `controlsLayout` and `controlsIcon` props to configure the built-in controls.\n\n```html\n<!-- INCORRECT -->\n<mds-input type=\"number\" style=\"-moz-appearance: auto;\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input\n  type=\"number\"\n  controls-layout=\"horizontal\"\n  controls-icon=\"arithmetic\"\n  min=\"0\"\n  max=\"100\"\n></mds-input>\n```\n\n#### Do Not Use a Legacy or Invalid `type` Value\n\n`<mds-input>` accepts a specific set of `type` values: `text`, `email`, `number`, `password`, `search`, `tel`, `url`, `date`, `time`, `textarea`, `cf`, `piva`, `cc`, `isbn`. Supplying anything else (e.g. `\"checkbox\"`, `\"radio\"`, `\"file\"`) is passed straight to the inner native `<input>`, which renders a bare native control that the component neither styles nor reports correctly to the form. Use the dedicated Magma component for those controls.\n\n```html\n<!-- INCORRECT -->\n<mds-input type=\"checkbox\" name=\"accetto\"></mds-input>\n<mds-input type=\"file\"     name=\"allegato\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input-switch name=\"accetto\"></mds-input-switch>\n<mds-input-upload name=\"allegato\"></mds-input-upload>\n```\n\n#### Do Not Use `placeholder` as the Accessible Label\n\n`placeholder` disappears on input and is never read as a label by assistive tech. Always pair `<mds-input>` with [`mds-input-field`](../mds-input-field/AGENTS.md) (which shows a visible label and passes it down as the accessible name) or supply `aria-label` directly on the host.\n\n```html\n<!-- INCORRECT -->\n<mds-input name=\"ricerca\" placeholder=\"Cerca per nome\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Cerca per nome\">\n  <mds-input name=\"ricerca\" placeholder=\"Cerca per nome\"></mds-input>\n</mds-input-field>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internal Parts\n\nThe supported customization surface is the public `--mds-input-*` CSS custom properties plus the documented shadow parts (`field`, `tip-top`, `tip-bottom`, `tip-count`, `password-toggle-button`, `counter-button-increase`, `counter-button-decrease`, `mic-toggle-button`, `color-picker-button`). Targeting undocumented internals via `>>>` or arbitrary class names couples your code to the Shadow DOM implementation.\n\n```css\n/* INCORRECT */\nmds-input >>> .input {\n  border: 2px solid red;\n}\n\n/* CORRECT */\nmds-input {\n  --mds-input-ring: 0 0 0 2px rgb(var(--magma-danger-border));\n  --mds-input-background: rgb(var(--magma-danger-wash-base));\n}\nmds-input::part(field) {\n  font-style: italic;\n}\n```\n"
      },
      "props": [
        {
          "name": "accessibleName",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "aria-label",
          "reflectToAttr": false,
          "docs": "The accessible name of the native control: the label a screen reader announces. An\n`mds-input-field` around the component passes its own label down here, so the attribute\nis only written by hand when the input stands on its own. The placeholder is deliberately\nnot a fallback: it disappears as soon as the field is filled.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "autocomplete",
          "type": "\"additional-name\" | \"address\" | \"address-level1\" | \"address-level2\" | \"address-level3\" | \"address-level4\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"cc-additional-name\" | \"cc-csc\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-family-name\" | \"cc-given-name\" | \"cc-name\" | \"cc-number\" | \"cc-type\" | \"country\" | \"country-name\" | \"current-password\" | \"email\" | \"family-name\" | \"given-name\" | \"honorific-prefix\" | \"honorific-suffix\" | \"impp\" | \"language\" | \"name\" | \"new-password\" | \"nickname\" | \"off\" | \"on\" | \"one-time-code\" | \"organization\" | \"organization-title\" | \"photo\" | \"postal-code\" | \"sex\" | \"street-address\" | \"tel\" | \"tel-area-code\" | \"tel-country-code\" | \"tel-extension\" | \"tel-local\" | \"tel-national\" | \"transaction-amount\" | \"transaction-currency\" | \"url\" | \"username\" | undefined",
          "complexType": {
            "original": "AutocompleteType",
            "resolved": "\"additional-name\" | \"address\" | \"address-level1\" | \"address-level2\" | \"address-level3\" | \"address-level4\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"cc-additional-name\" | \"cc-csc\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-family-name\" | \"cc-given-name\" | \"cc-name\" | \"cc-number\" | \"cc-type\" | \"country\" | \"country-name\" | \"current-password\" | \"email\" | \"family-name\" | \"given-name\" | \"honorific-prefix\" | \"honorific-suffix\" | \"impp\" | \"language\" | \"name\" | \"new-password\" | \"nickname\" | \"off\" | \"on\" | \"one-time-code\" | \"organization\" | \"organization-title\" | \"photo\" | \"postal-code\" | \"sex\" | \"street-address\" | \"tel\" | \"tel-area-code\" | \"tel-country-code\" | \"tel-extension\" | \"tel-local\" | \"tel-national\" | \"transaction-amount\" | \"transaction-currency\" | \"url\" | \"username\" | undefined",
            "references": {
              "AutocompleteType": {
                "location": "import",
                "path": "@type/autocomplete",
                "id": "src/type/autocomplete.ts::AutocompleteType",
                "referenceLocation": "AutocompleteType"
              }
            }
          },
          "mutable": false,
          "attr": "autocomplete",
          "reflectToAttr": true,
          "docs": "Specifies whether the element should have autocomplete enabled",
          "docsTags": [
            {
              "name": "default",
              "text": "'off'"
            }
          ],
          "default": "'off'",
          "values": [
            {
              "value": "additional-name",
              "type": "string"
            },
            {
              "value": "address",
              "type": "string"
            },
            {
              "value": "address-level1",
              "type": "string"
            },
            {
              "value": "address-level2",
              "type": "string"
            },
            {
              "value": "address-level3",
              "type": "string"
            },
            {
              "value": "address-level4",
              "type": "string"
            },
            {
              "value": "address-line1",
              "type": "string"
            },
            {
              "value": "address-line2",
              "type": "string"
            },
            {
              "value": "address-line3",
              "type": "string"
            },
            {
              "value": "bday",
              "type": "string"
            },
            {
              "value": "bday-day",
              "type": "string"
            },
            {
              "value": "bday-month",
              "type": "string"
            },
            {
              "value": "bday-year",
              "type": "string"
            },
            {
              "value": "cc-additional-name",
              "type": "string"
            },
            {
              "value": "cc-csc",
              "type": "string"
            },
            {
              "value": "cc-exp",
              "type": "string"
            },
            {
              "value": "cc-exp-month",
              "type": "string"
            },
            {
              "value": "cc-exp-year",
              "type": "string"
            },
            {
              "value": "cc-family-name",
              "type": "string"
            },
            {
              "value": "cc-given-name",
              "type": "string"
            },
            {
              "value": "cc-name",
              "type": "string"
            },
            {
              "value": "cc-number",
              "type": "string"
            },
            {
              "value": "cc-type",
              "type": "string"
            },
            {
              "value": "country",
              "type": "string"
            },
            {
              "value": "country-name",
              "type": "string"
            },
            {
              "value": "current-password",
              "type": "string"
            },
            {
              "value": "email",
              "type": "string"
            },
            {
              "value": "family-name",
              "type": "string"
            },
            {
              "value": "given-name",
              "type": "string"
            },
            {
              "value": "honorific-prefix",
              "type": "string"
            },
            {
              "value": "honorific-suffix",
              "type": "string"
            },
            {
              "value": "impp",
              "type": "string"
            },
            {
              "value": "language",
              "type": "string"
            },
            {
              "value": "name",
              "type": "string"
            },
            {
              "value": "new-password",
              "type": "string"
            },
            {
              "value": "nickname",
              "type": "string"
            },
            {
              "value": "off",
              "type": "string"
            },
            {
              "value": "on",
              "type": "string"
            },
            {
              "value": "one-time-code",
              "type": "string"
            },
            {
              "value": "organization",
              "type": "string"
            },
            {
              "value": "organization-title",
              "type": "string"
            },
            {
              "value": "photo",
              "type": "string"
            },
            {
              "value": "postal-code",
              "type": "string"
            },
            {
              "value": "sex",
              "type": "string"
            },
            {
              "value": "street-address",
              "type": "string"
            },
            {
              "value": "tel",
              "type": "string"
            },
            {
              "value": "tel-area-code",
              "type": "string"
            },
            {
              "value": "tel-country-code",
              "type": "string"
            },
            {
              "value": "tel-extension",
              "type": "string"
            },
            {
              "value": "tel-local",
              "type": "string"
            },
            {
              "value": "tel-national",
              "type": "string"
            },
            {
              "value": "transaction-amount",
              "type": "string"
            },
            {
              "value": "transaction-currency",
              "type": "string"
            },
            {
              "value": "url",
              "type": "string"
            },
            {
              "value": "username",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "autofocus",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "autofocus",
          "reflectToAttr": true,
          "docs": "Specifies that the element should automatically get focus when the page loads",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "await",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "await",
          "reflectToAttr": true,
          "docs": "Specifies if the spinner icon is shown, replacing the icon if present. A `color` field keeps\nits swatch, which shows the value, and shows the spinner at its end, before the picker button\n(read-only or disabled, the field has no picker button and the spinner takes the end)",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "controlsIcon",
          "type": "\"arithmetic\" | \"arrow\" | undefined",
          "complexType": {
            "original": "InputControlsIconType",
            "resolved": "\"arithmetic\" | \"arrow\" | undefined",
            "references": {
              "InputControlsIconType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputControlsIconType",
                "referenceLocation": "InputControlsIconType"
              }
            }
          },
          "mutable": false,
          "attr": "controls-icon",
          "reflectToAttr": true,
          "docs": "Specifies the icon type of the counter buttons when the input type is set to `number`",
          "docsTags": [
            {
              "name": "default",
              "text": "'arrow'"
            }
          ],
          "default": "'arrow'",
          "values": [
            {
              "value": "arithmetic",
              "type": "string"
            },
            {
              "value": "arrow",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "controlsLayout",
          "type": "\"horizontal\" | \"vertical\" | undefined",
          "complexType": {
            "original": "InputControlsLayoutType",
            "resolved": "\"horizontal\" | \"vertical\" | undefined",
            "references": {
              "InputControlsLayoutType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputControlsLayoutType",
                "referenceLocation": "InputControlsLayoutType"
              }
            }
          },
          "mutable": false,
          "attr": "controls-layout",
          "reflectToAttr": true,
          "docs": "Specifies the layout of the counter buttons when the input type is set to `number`: stacked at\nthe end (`vertical`) or one at each end (`horizontal`). A read-only or disabled field has no\ncounter buttons, and its text takes the room they leave",
          "docsTags": [
            {
              "name": "default",
              "text": "'vertical'"
            }
          ],
          "default": "'vertical'",
          "values": [
            {
              "value": "horizontal",
              "type": "string"
            },
            {
              "value": "vertical",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "datalist",
          "type": "string[] | undefined",
          "complexType": {
            "original": "string[]",
            "resolved": "string[] | undefined",
            "references": {}
          },
          "mutable": false,
          "reflectToAttr": false,
          "docs": "A list of search terms to be searched from the input field,\nit should be used with type=\"search\" input.",
          "docsTags": [],
          "values": [
            {
              "type": "string[]"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "If true, the element is displayed as disabled. The buttons that change the value (the counter\nbuttons of a number, the microphone, the picker of a colour) are not shown: the end of the\nfield is left to the badge of its state",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "An icon displayed at the left of the input, inside the field; the spinner of `await` takes\nits place. A `color` field ignores it: its swatch stands there, one mark at the start",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "max",
          "type": "number | string | undefined",
          "complexType": {
            "original": "string | number",
            "resolved": "number | string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "max",
          "reflectToAttr": true,
          "docs": "Specifies the maximum value, with `type=\"number\"` or `type=\"date\"`: a number, or a date in ISO\nformat (YYYY-MM-DD) such as `2046-12-04`",
          "docsTags": [
            {
              "name": "example",
              "text": "'180'"
            }
          ],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "maxlength",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "maxlength",
          "reflectToAttr": true,
          "docs": "Specifies the maximum number of characters allowed in an element.\nUse it with input type=\"text\".\nIf maxlength is set to 0 or a negative number it will be considered as undefined.",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "mic",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "mic",
          "reflectToAttr": true,
          "docs": "Toggles text recognition. A read-only or disabled field has no dictation button. A `color`\nfield ignores it: a colour code is typed or picked, not dictated, and its end holds the button\nof the picker",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "min",
          "type": "number | string | undefined",
          "complexType": {
            "original": "string | number",
            "resolved": "number | string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "min",
          "reflectToAttr": true,
          "docs": "Specifies the minimum value, with `type=\"number\"` or `type=\"date\"`: a number, or a date in ISO\nformat (YYYY-MM-DD) such as `1988-04-15`",
          "docsTags": [
            {
              "name": "example",
              "text": "'-3'"
            }
          ],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "minlength",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "minlength",
          "reflectToAttr": true,
          "docs": "Specifies the minimum number of characters allowed in an element\nuse it with input type=\"number\"",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Is needed to reference the form data after the form is submitted",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "pattern",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "pattern",
          "reflectToAttr": true,
          "docs": "Specifies a regular expression the whole value has to match, as the pattern attribute of a\nnative input: a value that does not match stops the submit of the form",
          "docsTags": [
            {
              "name": "example",
              "text": "'[0-9]{5}'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "placeholder",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "placeholder",
          "reflectToAttr": true,
          "docs": "Specifies a short hint that describes the expected value of the element",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "readonly",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "readonly",
          "reflectToAttr": true,
          "docs": "Specifies that the element is read-only. The buttons that change the value (the counter\nbuttons of a number, the microphone, the picker of a colour) are not shown, as on a disabled\nfield; the password toggle stays, since it shows the value without changing it",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "required",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "required",
          "reflectToAttr": true,
          "docs": "Specifies that the element must be filled out before submitting the form",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "InputSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | undefined",
            "references": {
              "InputSizeType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputSizeType",
                "referenceLocation": "InputSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the height of the field, the same as `mds-button`: `sm` 28px, `md` 36px, `lg` 48px.\nA textarea keeps its own height (`--mds-input-textarea-min-height`)",
          "docsTags": [
            {
              "name": "default",
              "text": "'lg'"
            }
          ],
          "default": "'lg'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "step",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "step",
          "reflectToAttr": true,
          "docs": "Specifies the interval between legal numbers in an input field",
          "docsTags": [
            {
              "name": "example",
              "text": "'0.01'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tip",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "tip",
          "reflectToAttr": true,
          "docs": "Sets the word(s) of the tip of the input field",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "type",
          "type": "\"cc\" | \"cf\" | \"color\" | \"date\" | \"email\" | \"isbn\" | \"number\" | \"password\" | \"piva\" | \"search\" | \"tel\" | \"text\" | \"textarea\" | \"time\" | \"url\" | undefined",
          "complexType": {
            "original": "InputTextType",
            "resolved": "\"cc\" | \"cf\" | \"color\" | \"date\" | \"email\" | \"isbn\" | \"number\" | \"password\" | \"piva\" | \"search\" | \"tel\" | \"text\" | \"textarea\" | \"time\" | \"url\" | undefined",
            "references": {
              "InputTextType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputTextType",
                "referenceLocation": "InputTextType"
              }
            }
          },
          "mutable": false,
          "attr": "type",
          "reflectToAttr": true,
          "docs": "Specifies the type of input element. `color` holds a colour: the field stays a text field,\nwhere the code is typed and validated, with a swatch of the colour at its start and a button\nat its end that opens the colour picker of the platform. Its value, in the change event and\nin the form, is the colour as\n`#rrggbb` in lower case, or `''` while the text is empty or names no colour, which is a\nvalidation error; the text also takes `#rgb` and the code without `#`, in any case, and is\nwritten back as `#rrggbb` when the field is left",
          "docsTags": [
            {
              "name": "default",
              "text": "'text'"
            }
          ],
          "default": "'text'",
          "values": [
            {
              "value": "cc",
              "type": "string"
            },
            {
              "value": "cf",
              "type": "string"
            },
            {
              "value": "color",
              "type": "string"
            },
            {
              "value": "date",
              "type": "string"
            },
            {
              "value": "email",
              "type": "string"
            },
            {
              "value": "isbn",
              "type": "string"
            },
            {
              "value": "number",
              "type": "string"
            },
            {
              "value": "password",
              "type": "string"
            },
            {
              "value": "piva",
              "type": "string"
            },
            {
              "value": "search",
              "type": "string"
            },
            {
              "value": "tel",
              "type": "string"
            },
            {
              "value": "text",
              "type": "string"
            },
            {
              "value": "textarea",
              "type": "string"
            },
            {
              "value": "time",
              "type": "string"
            },
            {
              "value": "url",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"detail\" | \"snippet\"",
          "complexType": {
            "original": "TypographyInputType",
            "resolved": "\"detail\" | \"snippet\"",
            "references": {
              "TypographyInputType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyInputType",
                "referenceLocation": "TypographyInputType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": true,
          "docs": "Specifies the typography of input element",
          "docsTags": [
            {
              "name": "default",
              "text": "'detail'"
            }
          ],
          "default": "'detail'",
          "values": [
            {
              "value": "detail",
              "type": "string"
            },
            {
              "value": "snippet",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": true,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "Specifies the value of the input element. With `type=\"color\"`, a colour as `#rrggbb`: a value\nset as `#rgb`, without `#` or in upper case is written so, and one that names no colour is\nshown as it is, with its error, while the value becomes `''`",
          "docsTags": [
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"error\" | \"info\" | \"primary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ThemeInputVariantType",
            "resolved": "\"ai\" | \"error\" | \"info\" | \"primary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ThemeInputVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeInputVariantType",
                "referenceLocation": "ThemeInputVariantType"
              }
            }
          },
          "mutable": true,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the variant of the input field",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "addValidator",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(validator: MdsValidatorFn) => Promise<void>",
            "parameters": [
              {
                "name": "validator",
                "type": "(input: string) => MdsValidationErrors | null",
                "docs": "the validator function to add"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "MdsValidatorFn": {
                "location": "import",
                "path": "./meta/validators",
                "id": "src/components/mds-input/meta/validators.ts::MdsValidatorFn",
                "referenceLocation": "MdsValidatorFn"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "addValidator(validator: MdsValidatorFn) => Promise<void>",
          "parameters": [
            {
              "name": "validator",
              "type": "(input: string) => MdsValidationErrors | null",
              "docs": "the validator function to add"
            }
          ],
          "docs": "Adds a validator to the input.",
          "docsTags": [
            {
              "name": "param",
              "text": "validator the validator function to add"
            }
          ]
        },
        {
          "name": "getErrors",
          "returns": {
            "type": "Promise<MdsValidationErrors | null>",
            "docs": "the validation errors, or `null` when valid"
          },
          "complexType": {
            "signature": "() => Promise<MdsValidationErrors | null>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "MdsValidationErrors": {
                "location": "import",
                "path": "./meta/validators",
                "id": "src/components/mds-input/meta/validators.ts::MdsValidationErrors",
                "referenceLocation": "MdsValidationErrors"
              }
            },
            "return": "Promise<MdsValidationErrors | null>"
          },
          "signature": "getErrors() => Promise<MdsValidationErrors | null>",
          "parameters": [],
          "docs": "Returns the current validation errors, or `null` if the value is valid.",
          "docsTags": [
            {
              "name": "returns",
              "text": "the validation errors, or `null` when valid"
            }
          ]
        },
        {
          "name": "getInputElement",
          "returns": {
            "type": "Promise<HTMLTextAreaElement | HTMLInputElement>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<HTMLInputElement | HTMLTextAreaElement>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "HTMLTextAreaElement": {
                "location": "global",
                "id": "global::HTMLTextAreaElement"
              },
              "HTMLInputElement": {
                "location": "global",
                "id": "global::HTMLInputElement"
              }
            },
            "return": "Promise<HTMLTextAreaElement | HTMLInputElement>"
          },
          "signature": "getInputElement() => Promise<HTMLInputElement | HTMLTextAreaElement>",
          "parameters": [],
          "docs": "Returns the native `<input>` element used under the hood.",
          "docsTags": []
        },
        {
          "name": "hasValidator",
          "returns": {
            "type": "Promise<boolean>",
            "docs": "if a validator is present or not, if no validator given, return if there are at least one validator"
          },
          "complexType": {
            "signature": "(validator?: MdsValidatorFn) => Promise<boolean>",
            "parameters": [
              {
                "name": "validator",
                "type": "MdsValidatorFn | undefined",
                "docs": "validator to check if it is present"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "MdsValidatorFn": {
                "location": "import",
                "path": "./meta/validators",
                "id": "src/components/mds-input/meta/validators.ts::MdsValidatorFn",
                "referenceLocation": "MdsValidatorFn"
              }
            },
            "return": "Promise<boolean>"
          },
          "signature": "hasValidator(validator?: MdsValidatorFn) => Promise<boolean>",
          "parameters": [
            {
              "name": "validator",
              "type": "MdsValidatorFn | undefined",
              "docs": "validator to check if it is present"
            }
          ],
          "docs": "Returns if validator is presen",
          "docsTags": [
            {
              "name": "param",
              "text": "validator validator to check if it is present"
            },
            {
              "name": "returns",
              "text": "if a validator is present or not, if no validator given, return if there are at least one validator"
            }
          ]
        },
        {
          "name": "removeValidator",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(validator: MdsValidatorFn) => Promise<void>",
            "parameters": [
              {
                "name": "validator",
                "type": "(input: string) => MdsValidationErrors | null",
                "docs": "the validator function to remove"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "MdsValidatorFn": {
                "location": "import",
                "path": "./meta/validators",
                "id": "src/components/mds-input/meta/validators.ts::MdsValidatorFn",
                "referenceLocation": "MdsValidatorFn"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "removeValidator(validator: MdsValidatorFn) => Promise<void>",
          "parameters": [
            {
              "name": "validator",
              "type": "(input: string) => MdsValidationErrors | null",
              "docs": "the validator function to remove"
            }
          ],
          "docs": "Removes a previously added validator from the input.",
          "docsTags": [
            {
              "name": "param",
              "text": "validator the validator function to remove"
            }
          ]
        },
        {
          "name": "setFocus",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "setFocus() => Promise<void>",
          "parameters": [],
          "docs": "Sets focus on the specified `my-input`.\nUse this method instead\nof the global `input.focus()`.",
          "docsTags": []
        }
      ],
      "events": [
        {
          "event": "mdsInputBlur",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a void event when input element is blurred",
          "docsTags": []
        },
        {
          "event": "mdsInputChange",
          "detail": "MdsInputEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsInputEventDetail",
            "resolved": "MdsInputEventDetail",
            "references": {
              "MdsInputEventDetail": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::MdsInputEventDetail",
                "referenceLocation": "MdsInputEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits an InputChangeEventDetail when the value of the input element changes",
          "docsTags": []
        },
        {
          "event": "mdsInputFocus",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a void event when input element is focused",
          "docsTags": []
        },
        {
          "event": "mdsInputKeydown",
          "detail": "KeyboardEvent",
          "bubbles": true,
          "complexType": {
            "original": "KeyboardEvent",
            "resolved": "KeyboardEvent",
            "references": {
              "KeyboardEvent": {
                "location": "global",
                "id": "global::KeyboardEvent"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a KeyboardEvent when a keyboard key is pressed on the focused input element",
          "docsTags": []
        },
        {
          "event": "mdsInputSpeechEnd",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a void event when input speech recognition ends",
          "docsTags": []
        },
        {
          "event": "mdsInputValidation",
          "detail": "boolean",
          "bubbles": true,
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a boolean event when a input execute validation",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "invalid",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [
        {
          "name": "--mds-input-background",
          "annotation": "prop",
          "docs": "The background color of the input field.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-icon-color",
          "annotation": "prop",
          "docs": "The color of the icons inside the input.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-placeholder-default-color",
          "annotation": "prop",
          "docs": "The placeholder color in the default state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-placeholder-focus-color",
          "annotation": "prop",
          "docs": "The placeholder color when the input is focused.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-placeholder-hover-color",
          "annotation": "prop",
          "docs": "The placeholder color when the input is hovered.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-ring",
          "annotation": "prop",
          "docs": "The outline ring applied to the input on interactive states.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-shadow",
          "annotation": "prop",
          "docs": "The box-shadow applied to the input component.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-textarea-field-sizing",
          "annotation": "prop",
          "docs": "The field-sizing behavior of the textarea.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-textarea-max-height",
          "annotation": "prop",
          "docs": "The max-height applied to the textarea.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-textarea-min-height",
          "annotation": "prop",
          "docs": "The min-height applied to the textarea.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-textarea-resize",
          "annotation": "prop",
          "docs": "Controls whether the textarea is resizable.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-tip-background",
          "annotation": "prop",
          "docs": "The background color of the input tip/inline help.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-tip-horizontal-offset",
          "annotation": "prop",
          "docs": "The default horizontal offset applied to the bottom tip",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-tip-horizontal-offset-focused",
          "annotation": "prop",
          "docs": "The horizontal offset applied to the bottom tip when the input is focused",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-tip-vertical-offset",
          "annotation": "prop",
          "docs": "The vertical offset applied to the bottom tip",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-variant-color-rgb",
          "annotation": "prop",
          "docs": "The raw RGB channels used for variant-driven styling.",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "color-picker-button",
          "docs": "Selects the button that opens the colour picker of a `color` field"
        },
        {
          "name": "counter-button-decrease",
          "docs": "Selects the button used to decrease the input value"
        },
        {
          "name": "counter-button-increase",
          "docs": "Selects the button used to increase the input value"
        },
        {
          "name": "field",
          "docs": "Selects the native input field used by the component"
        },
        {
          "name": "mic-toggle-button",
          "docs": "Selects the button that starts and stops the speech to text"
        },
        {
          "name": "password-mask-item",
          "docs": "Selects the item used to mask the password"
        },
        {
          "name": "password-mask-items",
          "docs": "Selects the items wrapper used to mask the password"
        },
        {
          "name": "password-toggle-button",
          "docs": "Selects the button used to show or hide password"
        },
        {
          "name": "tip-bottom",
          "docs": "Selects the verbose status of input on bottom of element"
        },
        {
          "name": "tip-count",
          "docs": "Selects the mds-input-tip-item shown when maxlength attribute is set, can be used to hide it if needed"
        },
        {
          "name": "tip-top",
          "docs": "Selects the verbose status of input on top of element"
        }
      ],
      "states": [],
      "dependents": [
        "mds-input-otp"
      ],
      "dependencies": [
        "mds-button",
        "mds-input-tip",
        "mds-input-tip-item",
        "mds-icon",
        "mds-spinner"
      ],
      "dependencyGraph": {
        "mds-input": [
          "mds-button",
          "mds-input-tip",
          "mds-input-tip-item",
          "mds-icon",
          "mds-spinner"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-input-tip-item": [
          "mds-text"
        ],
        "mds-input-otp": [
          "mds-input"
        ]
      },
      "storybook": "form-input--docs"
    },
    {
      "filePath": "src/components/mds-input-date/mds-input-date.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-date",
      "readme": "# mds-input-date\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "part",
          "text": "input-date - The native date input"
        },
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-date>` web component is the Magma Design System control for capturing a single calendar date. It wraps a native `<input type=\"date\">`, adding form association, ISO value validation against an optional `min`/`max` range, contextual tips, and a button-triggered calendar dropdown for visual date picking.\n\n#### Semantic Behavior\n\n- **Form association**: The host participates natively in form submission and exposes its `value` under `name`; a form reset brings back the date the field had at load, both shown and submitted, and its pristine look, like a native input. An invalid value submits nothing, and its invalid state is reported to the form: like a native control, the field matches `:invalid` and stops the submit, with a message in the page language (a missing required date, a date out of the range, an unreadable one). A disabled or read-only field is left out, and `novalidate` on the `<form>` turns the check off.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables it as `disabled` does, like a native control: it cannot be changed and its value is left out of the form, until the fieldset is enabled.\n- **ISO value contract**: `value`, `min`, and `max` are all ISO date strings (`YYYY-MM-DD`); other formats are not accepted.\n- **Validation on change**: The value is checked when the component loads, on every value change and whenever `required`, `min` or `max` change (also after load, as with the React wrappers under SSR). The validity reported to the form, the submitted value and the required tip follow every check: a date invalid, missing while `required` or outside the `min`/`max` range submits no value. The look follows once the field is touched, like `:user-invalid` on a native control: after the user edits or leaves the field, picks a date from the calendar, or a stopped submit points at it, each check sets `variant` to `'error'` or `'primary'` and emits `mdsInputValidation` with a boolean. An empty `required` field therefore loads in its own variant, not in `'error'`.\n- **Range self-correction**: If `max` is earlier than `min`, at load or after a later change of either, `max` is snapped to equal `min`.\n- **Selection event**: `mdsInputDateSelect` fires with the new string value whenever `value` changes, whether typed or picked from the calendar.\n- **Calendar dropdown**: The trailing calendar button, icon-only and named in the page language (the `lang` of `<html>`) (\"Open calendar\"), opens a single-date calendar; picking a day writes back the value and, after `delay`, auto-closes. It is shown only while the user can change the date: a read-only or disabled field (a disabled `<fieldset>` included) has no calendar button, its text takes its room and its end is left to the badge of its state; a calendar open on a field that becomes so closes.\n- **Slotted mode**: When the host carries a `slot` attribute it is treated as embedded - the calendar button, dropdown, and calendar are not rendered, leaving only the bare input for composition inside a larger field.\n- **Contextual tips**: A tip surfaces `disabled`, `readonly`, and `required` states; the required tip expands on focus and reflects success once the value is valid. It stands on the top border of the field, half outside, clear of its rounded corner, and stays there while the field has the focus, as on `mds-input`.\n- **Read-only**: A read-only field shows its tip and auto-selects its text on focus; its native input is read-only and it has no calendar button, so the value cannot be changed.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` ladder is defined in [`agents/variants.md`](../../../../agents/variants.md). Note that `variant` is mutable here: once the field is touched, the component overrides it to `'error'` / `'primary'` as validation dictates, so a variant set in the markup or from script lasts until the user edits or leaves the field.\n\n- **`size`** sets the height of the field, the same as [`<mds-button>`](../mds-button/AGENTS.md): `sm` 28px, `md` 36px, `lg` 48px (default). Match it to the buttons next to the field, or go smaller in dense layouts (filter bars, table toolbars); the text style stays the same, the padding and the inner calendar button scale with it.\n\n#### Other behavioral props\n\n- **`min`** / **`max`** bound the selectable range; dates outside it invalidate the field rather than being silently clamped.\n- **`delay`** is the milliseconds to wait before auto-closing the calendar dropdown after a pick; setting it to `0` keeps the dropdown open.\n- **`required`** makes an empty or invalid value fail validation and drives the required/required-success tip.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-date>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant ladder documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Date Input\n\nThe simplest form. Wrap in [`mds-input-field`](../mds-input-field/AGENTS.md) to attach a visible label. Use `name` so the value is submitted with the form.\n\n```html\n<mds-input-field label=\"Data di nascita\">\n  <mds-input-date name=\"birthdate\"></mds-input-date>\n</mds-input-field>\n```\n\n#### Pre-filled Value\n\nSet `value` to an ISO date string (`YYYY-MM-DD`) to initialize the picker with a known date. Do not use other date formats.\n\n```html\n<mds-input-date name=\"dataScadenza\" value=\"2026-12-31\"></mds-input-date>\n```\n\n#### Required Field\n\nAdd `required` to make an empty or invalid date fail validation. The component surfaces a tip on focus; the field stops the submit while empty, and turns to `'error'` once the user leaves it empty or a stopped submit points at it, until a valid date is entered.\n\n```html\n<mds-input-field label=\"Data di inizio *\">\n  <mds-input-date name=\"startDate\" required></mds-input-date>\n</mds-input-field>\n```\n\n#### Bounded Date Range\n\nUse `min` and `max` (both ISO strings) to restrict the selectable range. Dates outside the range invalidate the field and, once it is touched, emit `mdsInputValidation` with `false`. If `max` is earlier than `min` at load time, the component snaps `max` to equal `min`.\n\n```html\n<mds-input-date\n  name=\"dataSopralluogo\"\n  min=\"2026-01-01\"\n  max=\"2026-12-31\"\n></mds-input-date>\n```\n\n#### Listening to Value Changes\n\nListen to `mdsInputDateSelect` (fires with the new ISO string) for every value change - whether typed or picked from the calendar. Listen to `mdsInputValidation` to react to validity changes.\n\n```html\n<mds-input-date id=\"picker\" name=\"dataEvento\"></mds-input-date>\n\n<script>\n  const picker = document.getElementById('picker');\n\n  picker.addEventListener('mdsInputDateSelect', (e) => {\n    console.log('Data selezionata:', e.detail); // \"2026-06-15\"\n  });\n\n  picker.addEventListener('mdsInputValidation', (e) => {\n    console.log('Valido:', e.detail); // true | false\n  });\n</script>\n```\n\n#### Programmatic Value via `setValue`\n\nUse the `setValue` method to set the value from JavaScript; it emits `mdsInputDateSelect` and checks the value. Unlike a user interaction it does not touch the field: on a pristine field the validity reaches the form, but the variant and `mdsInputValidation` wait for the user.\n\n```html\n<mds-input-date id=\"datePicker\" name=\"dataConsegna\"></mds-input-date>\n\n<script>\n  document.getElementById('datePicker').setValue('2026-09-01');\n</script>\n```\n\n#### Controlling Calendar Auto-close Delay\n\nThe calendar dropdown closes `delay` milliseconds after a date is picked (default 500 ms). Set `delay=\"0\"` to keep it open after selection - useful when the picker is used inside a form where the user might want to confirm before the overlay disappears.\n\n```html\n<!-- Default: closes 500 ms after pick -->\n<mds-input-date name=\"dataRiunione\" delay=\"500\"></mds-input-date>\n\n<!-- Keep open until the user dismisses manually -->\n<mds-input-date name=\"dataRiunione\" delay=\"0\"></mds-input-date>\n```\n\n#### Disabled and Read-only States\n\n`disabled` blocks all interaction and removes the field from the tab sequence. `readonly` keeps the field in the tab sequence and selects its text on focus, but the date cannot be changed: the native input is read-only and there is no calendar button. Both surface a contextual tip on the top border, and leave the end of the field to it.\n\n```html\n<!-- Disabled: no interaction at all -->\n<mds-input-date name=\"dataArchiviazione\" disabled value=\"2025-01-01\"></mds-input-date>\n\n<!-- Read-only: focusable, not editable -->\n<mds-input-date name=\"dataCreazione\" readonly value=\"2024-06-01\"></mds-input-date>\n```\n\n#### Form Participation\n\n`<mds-input-date>` is form-associated and submits its ISO value under `name`. A missing `required` date, or one out of the `min`/`max` range, stops the submit like a native control. A form reset brings back the date of load, both shown and submitted.\n\n```html\n<form action=\"/prenota\" method=\"post\">\n  <mds-input-field label=\"Data prenotazione\">\n    <mds-input-date name=\"bookingDate\" required></mds-input-date>\n  </mds-input-field>\n  <mds-button type=\"submit\" label=\"Conferma\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Slotted Mode Inside a Compound Field\n\nWhen the host carries a `slot` attribute, the component renders only the bare native input - the calendar button, dropdown, and calendar are suppressed. This is the correct way to embed the date input inside [`mds-input-date-range`](../mds-input-date-range/AGENTS.md) or a custom compound field.\n\n```html\n<mds-input-date-range>\n  <mds-input-date slot=\"start\" name=\"rangeStart\"></mds-input-date>\n  <mds-input-date slot=\"end\" name=\"rangeEnd\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Variant Override for External State Signalling\n\n`variant` is driven automatically by validation (`'error'` on invalid, `'primary'` on valid) once the field is touched. To communicate an external state, write it in the markup or set it from script: it lasts until the user edits or leaves the field. Values follow the theme input ladder: `primary` (default), `error`, `success`, `warning`, `info`, `ai`.\n\n```html\n<mds-input-date id=\"dataConferma\" name=\"dataConferma\" value=\"2026-03-15\"></mds-input-date>\n\n<script>\n  // Pre-mark as success when the date was already validated server-side\n  const field = document.getElementById('dataConferma');\n  field.componentOnReady().then(() => {\n    field.variant = 'success';\n  });\n</script>\n```\n\n#### Styling Customization\n\nStyle the component only through its public `--mds-input-date-*` CSS custom properties. Use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast work automatically.\n\n```css\n.booking-widget mds-input-date {\n  --mds-input-date-background: rgb(var(--magma-wash-base));\n  --mds-input-date-ring: 0 0 0 2px rgb(var(--magma-border-focus) / 0.5);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-date>`. 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 Non-ISO Date Strings\n\n`value`, `min`, and `max` must be ISO 8601 date strings (`YYYY-MM-DD`). Any other format is passed to `DateTime.fromISO`, which marks the date invalid: a non-ISO `value` immediately trips validation, and a non-ISO `min` / `max` is silently ignored.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date value=\"31/12/2026\" max=\"31-12-2026\"></mds-input-date>\n\n<!-- CORRECT -->\n<mds-input-date value=\"2026-12-31\" max=\"2026-12-31\"></mds-input-date>\n```\n\n#### Do Not Hardcode `variant=\"error\"` to Signal Validation\n\nThe component manages `variant` automatically: it sets `'error'` when validation fails and restores `'primary'` when it passes. Hardcoding `variant=\"error\"` shows an error before the user has done anything, does not stop the submit, and is overwritten as soon as the user touches the field.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date name=\"dataScadenza\" variant=\"error\"></mds-input-date>\n\n<!-- CORRECT - let validation drive variant; listen to mdsInputValidation instead -->\n<mds-input-date name=\"dataScadenza\" required></mds-input-date>\n```\n\n#### Do Not Listen to the Native `change` or `input` Events\n\nThe component emits `mdsInputDateSelect` (value string) and `mdsInputValidation` (boolean). The native `change` event does not cross the shadow boundary, and `input` misses calendar-driven picks and values set from script.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date id=\"picker\" name=\"data\"></mds-input-date>\n<script>\n  document.getElementById('picker').addEventListener('change', handler);\n</script>\n\n<!-- CORRECT -->\n<mds-input-date id=\"picker\" name=\"data\"></mds-input-date>\n<script>\n  document.getElementById('picker').addEventListener('mdsInputDateSelect', handler);\n</script>\n```\n\n#### Do Not Use a Raw `<input type=\"date\">` as a Drop-in Replacement\n\nReplacing `<mds-input-date>` with a plain `<input type=\"date\">` loses form-association conventions, theming, the calendar overlay, the contextual tip, and all Magma accessibility defaults.\n\n```html\n<!-- INCORRECT -->\n<input type=\"date\" name=\"dataEvento\" />\n\n<!-- CORRECT -->\n<mds-input-date name=\"dataEvento\"></mds-input-date>\n```\n\n#### Do Not Set `disabled=\"false\"` or `readonly=\"false\"` to Remove the State\n\nBoolean attributes must be absent to be off. `mds-input-date` is form-associated, so as on a native control any value turns them on, `\"false\"` included: this markup renders a disabled, read-only field.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date name=\"data\" disabled=\"false\" readonly=\"false\"></mds-input-date>\n\n<!-- CORRECT - remove the attribute entirely -->\n<mds-input-date name=\"data\"></mds-input-date>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Inner Input\n\nThe documented customization surface is the public `--mds-input-date-*` CSS custom properties plus the `::part(input-date)` part. Targeting internals with `>>>`, `/deep/`, or undocumented selectors will break on any minor release.\n\n```css\n/* INCORRECT */\nmds-input-date >>> .input {\n  border: 2px solid red;\n}\n\n/* CORRECT */\nmds-input-date {\n  --mds-input-date-ring: 0 0 0 2px rgb(var(--magma-danger-border) / 0.8);\n}\nmds-input-date::part(input-date) {\n  font-size: var(--text-size-info-caption);\n}\n```\n\n#### Do Not Set `value` to Clear the Field\n\nSetting `value=\"\"` is the correct way to clear; do not set `value` to a non-ISO string expecting the component to silently ignore it - it passes through validation and trips an error state.\n\n```html\n<!-- INCORRECT (non-ISO value to \"reset\") -->\n<mds-input-date name=\"data\" value=\"clear\"></mds-input-date>\n\n<!-- CORRECT -->\n<mds-input-date name=\"data\" value=\"\"></mds-input-date>\n```\n"
      },
      "props": [
        {
          "name": "accessibleName",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "aria-label",
          "reflectToAttr": false,
          "docs": "The accessible name of the native control: the label a screen reader announces. An\n`mds-input-field` around the component passes its own label down here, so the attribute\nis only written by hand when the control stands on its own. The placeholder is deliberately\nnot a fallback: it disappears as soon as the field is filled.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "delay",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "delay",
          "reflectToAttr": true,
          "docs": "Specifies the delay in milliseconds before closing the calendar dropdown, if the value is 0 the dropdown will not close",
          "docsTags": [
            {
              "name": "description",
              "text": "Default is 500"
            },
            {
              "name": "default",
              "text": "500"
            }
          ],
          "default": "500",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "If true, the element is displayed as disabled. The calendar button is not shown: the end of\nthe field is left to the badge of its state",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hideToday",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-today",
          "reflectToAttr": true,
          "docs": "Hides the highlight on today's date in the calendar.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "max",
          "type": "null | string",
          "complexType": {
            "original": "string | null",
            "resolved": "null | string",
            "references": {}
          },
          "mutable": true,
          "attr": "max",
          "reflectToAttr": true,
          "docs": "Specifies the max date of the range, user cannot set dates after this date",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-12-31'"
            },
            {
              "name": "default",
              "text": "null"
            }
          ],
          "default": "null",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "min",
          "type": "null | string",
          "complexType": {
            "original": "string | null",
            "resolved": "null | string",
            "references": {}
          },
          "mutable": true,
          "attr": "min",
          "reflectToAttr": true,
          "docs": "Specifies the min date of the range, user cannot set dates before this date",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-01-01'"
            },
            {
              "name": "default",
              "text": "null"
            }
          ],
          "default": "null",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Is needed to reference the form data after the form is submitted",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "readonly",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "readonly",
          "reflectToAttr": true,
          "docs": "Specifies that the element is read-only: the date cannot be typed, and the calendar button is\nnot shown, as on a disabled field",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "required",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "required",
          "reflectToAttr": true,
          "docs": "Specifies that the element must be filled out before submitting the form",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "InputSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | undefined",
            "references": {
              "InputSizeType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputSizeType",
                "referenceLocation": "InputSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the height of the field, the same as `mds-button`: `sm` 28px, `md` 36px, `lg` 48px",
          "docsTags": [
            {
              "name": "default",
              "text": "'lg'"
            }
          ],
          "default": "'lg'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "Specifies the value of the input",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-06-15'"
            },
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"error\" | \"info\" | \"primary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ThemeInputVariantType",
            "resolved": "\"ai\" | \"error\" | \"info\" | \"primary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ThemeInputVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeInputVariantType",
                "referenceLocation": "ThemeInputVariantType"
              }
            }
          },
          "mutable": true,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the variant of the input field",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "focusInput",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "HTMLInputElement": {
                "location": "global",
                "id": "global::HTMLInputElement"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "focusInput() => Promise<void>",
          "parameters": [],
          "docs": "Sets focus on the underlying input element.",
          "docsTags": []
        },
        {
          "name": "getErrors",
          "returns": {
            "type": "Promise<MdsValidationErrors | null>",
            "docs": "the validation errors, or `null` when valid"
          },
          "complexType": {
            "signature": "() => Promise<MdsValidationErrors | null>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "MdsValidationErrors": {
                "location": "import",
                "path": "src/components",
                "id": "src/components.d.ts::MdsValidationErrors",
                "referenceLocation": "MdsValidationErrors"
              }
            },
            "return": "Promise<MdsValidationErrors | null>"
          },
          "signature": "getErrors() => Promise<MdsValidationErrors | null>",
          "parameters": [],
          "docs": "Returns the current validation errors, or `null` if the value is valid.",
          "docsTags": [
            {
              "name": "returns",
              "text": "the validation errors, or `null` when valid"
            }
          ]
        },
        {
          "name": "setValue",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(value: string) => Promise<void>",
            "parameters": [
              {
                "name": "value",
                "type": "string",
                "docs": "the value to set, in ISO format (YYYY-MM-DD)"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "setValue(value: string) => Promise<void>",
          "parameters": [
            {
              "name": "value",
              "type": "string",
              "docs": "the value to set, in ISO format (YYYY-MM-DD)"
            }
          ],
          "docs": "Sets the input value.",
          "docsTags": [
            {
              "name": "param",
              "text": "value the value to set, in ISO format (YYYY-MM-DD)"
            }
          ]
        }
      ],
      "events": [
        {
          "event": "mdsInputDateSelect",
          "detail": "string",
          "bubbles": true,
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emitted when the selected date value changes.",
          "docsTags": []
        },
        {
          "event": "mdsInputValidation",
          "detail": "boolean",
          "bubbles": true,
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits a boolean event when a input execute validation",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "invalid",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [
        {
          "name": "--mds-input-date-background",
          "annotation": "prop",
          "docs": "The background of the date input",
          "visibility": "public"
        },
        {
          "name": "--mds-input-date-field-background-empty",
          "annotation": "prop",
          "docs": "The background when the date field is empty",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-date-field-color-empty",
          "annotation": "prop",
          "docs": "The text/icon color when the date field is empty",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-date-icon-color",
          "annotation": "prop",
          "docs": "The color of the date input icon",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-date-icon-color-rgb",
          "annotation": "prop",
          "docs": "Deprecated, read by nothing: the icon takes `--mds-input-date-icon-color`.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-date-ring",
          "annotation": "prop",
          "docs": "The focus ring of the date input",
          "visibility": "public"
        },
        {
          "name": "--mds-input-date-shadow",
          "annotation": "prop",
          "docs": "The shadow applied to the date input",
          "visibility": "public"
        },
        {
          "name": "--mds-input-date-variant-color-rgb",
          "annotation": "prop",
          "docs": "The base RGB value for the date input variant",
          "visibility": "public"
        },
        {
          "name": "--mds-input-tip-background",
          "annotation": "prop",
          "docs": "The background of the input tip",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "input-date",
          "docs": "The native date input"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button",
        "mds-input-tip",
        "mds-input-tip-item",
        "mds-dropdown",
        "mds-calendar"
      ],
      "dependencyGraph": {
        "mds-input-date": [
          "mds-button",
          "mds-input-tip",
          "mds-input-tip-item",
          "mds-dropdown",
          "mds-calendar"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-input-tip-item": [
          "mds-text"
        ],
        "mds-calendar": [
          "mds-button",
          "mds-calendar-cell"
        ],
        "mds-calendar-cell": [
          "mds-button"
        ]
      },
      "storybook": "form-input-date--docs"
    },
    {
      "filePath": "src/components/mds-input-date-range/mds-input-date-range.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-date-range",
      "readme": "# mds-input-date-range\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "calendar-preselection - Add `HTML elements` or `components` to this slot."
        },
        {
          "name": "slot",
          "text": "start - Add `HTML elements` or `components` to this slot."
        },
        {
          "name": "slot",
          "text": "end - Add `HTML elements` or `components` to this slot."
        },
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-date-range>` web component is the Magma Design System control for capturing a start/end date pair, composing two slotted `<mds-input-date>` fields with a shared pop-up `mds-calendar` (in range mode) and optional quick-pick presets. It is a form-associated compound parent that orchestrates its children rather than rendering its own native inputs.\n\n#### Semantic Behavior\n\n- **Compound parent**: Expects exactly two `<mds-input-date>` children assigned to the `start` and `end` named slots; the host keeps both in sync as a single range - it is not meant to be used with a default (text) slot.\n- **Form association**: The submitted value is a JSON string `{ startDate, endDate }`; an empty range submits no value. On form reset it restores the start/end dates present at first load.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables its calendar button as `disabled` does, while the slotted fields, being inside the fieldset too, follow it themselves: the range cannot be changed and is left out of the form, until the fieldset is enabled.\n- **Range coercion**: When both dates are valid and the end falls before the start, the end is snapped to equal the start, also for a preselection that ends before it starts, so the committed range is never inverted.\n- **Min/max guard**: If `max` is earlier than `min` at load, `max` is clamped up to `min`; both bounds are forwarded to the calendar to block out-of-range selection, and to the slotted fields, which flag a date typed outside them and stop the submit; such a range is not emitted.\n- **Commit on blur**: Leaving the component validates the range, syncs the form value, and - when both dates are valid - emits selection.\n- **Active end**: the calendar picks one end of the range at a time, the active one. The field the user goes into names it, by focus or by a click: the \"from\" field the start, the \"to\" field the end. With no field named yet, it is the end the range lacks (the start of an empty range, the end of a range with its start alone), else the start. With no start the calendar always picks the start: a range is picked from its start.\n- **Header**: the top of the panel shows the two ends, \"Start\" and \"End\", each with its date or \"Pick a date\", as an [`mds-tab`](../mds-tab/AGENTS.md) of two voices; the voice of the active end is selected, and a click or Enter / Space on a voice makes its end the active one. The end has nothing to pick, and its voice is disabled, until the range has a start. The words follow the page language, as \"from\" and \"to\".\n- **Calendar selection**: a click in the calendar changes the active end only, also on a complete range, which is no longer started again from scratch; then the end is the active one, so a range is picked with two clicks, start then end, and a second click corrects the end. A click never swaps the ends: a day before the start, while the end is picked, becomes the new start and the end is still to pick; a day after the end, while the start is picked, becomes the new start and the end is emptied. A click that completes the range emits selection; when it picks the end it also closes the dropdown after `delay`, unless `delay` is `0`, while one that picks the start leaves it open for the end.\n- **Preselection sync**: Slotted `mds-input-date-range-preselection` children act as quick-picks; activating one applies its range, and any external/calendar change re-evaluates which preset (if any) is marked selected; a preset matching the dates of load is marked selected from the start.\n- **Emitted events**: `mdsInputDateRangeValueChange` fires when a full, valid range is committed (calendar pick, preset, or focus-out with two valid dates) and either bound actually changed since the last emit.\n- **Focus management**: Clicking the host or either field label focuses the corresponding date input, and makes its end the active one; a built-in calendar icon button, named in the page language (the `lang` of `<html>`) (\"Open calendar\"), toggles the calendar dropdown. A pick in the calendar leaves the focus where it is: the header says which end comes next.\n- **Localization**: The \"from\"/\"to\" field labels, the words of the header and the calendar honor the resolved language (el/en/es/it).\n\n#### Properties & Visual Configurations\n\n- **`startDate` / `endDate`** are the controlled range bounds in ISO `YYYY-MM-DD` form; changing them externally re-syncs the slotted inputs and the calendar.\n- **`min` / `max`** define the selectable window: the calendar blocks the dates outside it, and the host passes both bounds to the slotted fields, which check a typed date against them. A bound the range does not set leaves the one written on a field alone; one changed after load reaches both fields.\n- **`disabled`** disables the range, like a disabled native input: the calendar button is disabled, a calendar left open closes, and the dates are left out of the form. It disables the two slotted fields too: at load only when it is set, so a field disabled on its own stays disabled; a change after load reaches both fields.\n- **`size`** sets the height of the field, the same as [`<mds-button>`](../mds-button/AGENTS.md): `sm` 28px, `md` 36px, `lg` 48px (default). Match it to the buttons next to the field, or go smaller in dense layouts (filter bars, table toolbars); the text style stays the same, the padding and the inner calendar button scale with it.\n- **`delay`** is the auto-close grace period (ms) after the click that picks the end of the range; set it to `0` to keep the calendar open until the user dismisses it manually.\n- **`dualCalendar`** shows two consecutive months side by side instead of one, whatever the width of the page; the grids of the two months start at the same height, a month of five weeks next to one of six.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-date-range>` 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#### Minimal Range Picker\n\nThe canonical form. Slot one [`mds-input-date`](../mds-input-date/AGENTS.md) as `start` and another as `end`; the host wires them together, drives the shared calendar, and handles range validation automatically.\n\n```html\n<mds-input-date-range>\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Picking a Range in the Calendar\n\nThe calendar picks one end at a time: the one of the field the user went into, or the one selected in the header at the top of the panel. In an empty range the first click picks the start and the header passes to the end; the second click picks the end and, after `delay`, closes the panel. To change one end of a complete range, go into its field (or select its voice in the header) and click the new day: the other end stays. A day before the start, picked as the end, becomes the new start; a day after the end, picked as the start, becomes the new start and empties the end. Nothing needs configuring: the markup is the one of the minimal picker.\n\n```html\n<mds-input-date-range start-date=\"2026-03-10\" end-date=\"2026-03-19\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Pre-filling the Range\n\nUse the `start-date` and `end-date` attributes to set an initial selection. Both expect ISO `YYYY-MM-DD` strings. Changing them later re-syncs the slotted inputs and the calendar automatically.\n\n```html\n<mds-input-date-range start-date=\"2026-01-01\" end-date=\"2026-01-31\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Constraining the Selectable Window\n\nUse `min` and `max` to block out-of-window dates in the calendar. Both are ISO `YYYY-MM-DD` strings. The host passes them to the slotted fields too: a date typed out of the window turns its field to error, stops the submit of the form and is not emitted as a range.\n\n```html\n<mds-input-date-range min=\"2026-01-01\" max=\"2026-12-31\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Listening to Range Events\n\n`mdsInputDateRangeValueChange` fires when a full, valid range is committed (calendar pick, preset, or focus-out with two valid dates) and either bound actually changed since the last emit. It delivers `{ startDate, endDate }` in `event.detail`.\n\n```html\n<mds-input-date-range id=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n\n<script>\n  document.querySelector('#periodo').addEventListener('mdsInputDateRangeValueChange', (e) => {\n    console.log('Intervallo selezionato:', e.detail.startDate, '-', e.detail.endDate);\n  });\n</script>\n```\n\n#### Form Participation\n\n`<mds-input-date-range>` is form-associated. Add `name` and place it inside a `<form>`; the submitted value is a JSON string `{ startDate, endDate }`. An empty range submits no value. Form reset restores the dates set at first load.\n\n```html\n<form action=\"/filtra\" method=\"get\">\n  <mds-input-date-range name=\"periodo\" start-date=\"2026-01-01\" end-date=\"2026-01-31\">\n    <mds-input-date slot=\"start\"></mds-input-date>\n    <mds-input-date slot=\"end\"></mds-input-date>\n  </mds-input-date-range>\n  <mds-button type=\"submit\" label=\"Applica filtro\" variant=\"primary\" tone=\"strong\"></mds-button>\n  <mds-button type=\"reset\" label=\"Reimposta\" variant=\"dark\" tone=\"outline\"></mds-button>\n</form>\n```\n\n#### Quick-Pick Preselections\n\nSlot one or more [`mds-input-date-range-preselection`](../mds-input-date-range-preselection/AGENTS.md) elements into the component. They appear inside the calendar dropdown and act as one-click range shortcuts. The host marks the matching preset as selected, from load on and whenever the range changes to match it. A preset whose end comes before its start applies its start as both ends.\n\n```html\n<mds-input-date-range>\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2026-06-02\" end=\"2026-06-08\">\n    Questa settimana\n  </mds-input-date-range-preselection>\n  <mds-input-date-range-preselection start=\"2026-06-01\" end=\"2026-06-30\">\n    Questo mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n\n#### Controlling the Auto-Close Delay\n\nBy default the calendar closes 500 ms after the click that picks the end of the range; a click that picks the start leaves it open for the end. Set `delay=\"0\"` to keep it open until the user dismisses it manually, or increase the value for a longer grace period.\n\n```html\n<!-- Keep the calendar open after selection -->\n<mds-input-date-range delay=\"0\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n\n<!-- Longer grace period: 1 second -->\n<mds-input-date-range delay=\"1000\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Styling Customization\n\nStyle the component only through its public `--mds-input-date-range-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)) so dark mode and themes keep working.\n\n```css\n.filtro-avanzato mds-input-date-range {\n  --mds-input-date-range-background: rgb(var(--magma-surface-sunken));\n  --mds-input-date-range-fields-gap: 0 calc(var(--spacing) * 400);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-date-range>`. 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 Omit the Named Slots\n\nThe host renders two named slots (`start` and `end`) and wires them together internally. Without slotted `<mds-input-date>` children the component has no visible inputs and no data to commit.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range start-date=\"2026-01-01\" end-date=\"2026-01-31\">\n</mds-input-date-range>\n\n<!-- CORRECT -->\n<mds-input-date-range start-date=\"2026-01-01\" end-date=\"2026-01-31\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Do Not Slot Raw `<input>` Elements\n\nThe `start` and `end` slots expect [`mds-input-date`](../mds-input-date/AGENTS.md) children. The host calls `.setValue()` and `.focusInput()` on the assigned element; a native `<input>` does not expose those methods and will break internal orchestration.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range>\n  <input type=\"date\" slot=\"start\" />\n  <input type=\"date\" slot=\"end\" />\n</mds-input-date-range>\n\n<!-- CORRECT -->\n<mds-input-date-range>\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Do Not Disable the Fields Instead of the Range\n\nDisabling the slotted fields leaves the calendar button of the range enabled, and the user can still change the dates from the calendar. Set `disabled` on the range: it disables its calendar button and the two fields, and leaves the dates out of the form.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range name=\"period\">\n  <mds-input-date slot=\"start\" disabled></mds-input-date>\n  <mds-input-date slot=\"end\" disabled></mds-input-date>\n</mds-input-date-range>\n\n<!-- CORRECT -->\n<mds-input-date-range name=\"period\" disabled>\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Do Not Use Non-ISO Date Strings\n\n`startDate`, `endDate`, `min`, and `max` all require `YYYY-MM-DD` ISO format. Passing a locale-formatted string (e.g. `\"01/06/2026\"`) is silently invalid for Luxon's `DateTime.fromISO()` and leaves the range empty or unguarded.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range start-date=\"01/06/2026\" end-date=\"30/06/2026\" min=\"01/01/2026\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n\n<!-- CORRECT -->\n<mds-input-date-range start-date=\"2026-06-01\" end-date=\"2026-06-30\" min=\"2026-01-01\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Do Not Listen to Native `change` or `input` Events\n\nThe component emits `mdsInputDateRangeValueChange` as a documented custom event. Native `change` / `input` events originate from inside the shadow DOM and do not bubble out reliably.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range id=\"range\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n<script>\n  document.querySelector('#range').addEventListener('change', handler);\n</script>\n\n<!-- CORRECT -->\n<mds-input-date-range id=\"range\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n<script>\n  document.querySelector('#range').addEventListener('mdsInputDateRangeValueChange', handler);\n</script>\n```\n\n#### Do Not Set `delay=\"false\"` to Disable Auto-Close\n\n`delay` is a numeric prop, not a boolean. The string `\"false\"` is parsed as `NaN`, which is not `0`: the dropdown then closes at once instead of staying open. Use `delay=\"0\"` to keep the calendar open after selection.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range delay=\"false\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n\n<!-- CORRECT -->\n<mds-input-date-range delay=\"0\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n```\n\n#### Do Not Slot Preselection Elements Without the Component's Calendar\n\n[`mds-input-date-range-preselection`](../mds-input-date-range-preselection/AGENTS.md) children must be direct children of `<mds-input-date-range>`. Outside the component a click finds no range to apply (the preset looks for its closest `mds-input-date-range`); inside a wrapper div the preset is not slotted into the calendar dropdown and never shows.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range>\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n</mds-input-date-range>\n<mds-input-date-range-preselection start=\"2026-06-01\" end=\"2026-06-30\">\n  Questo mese\n</mds-input-date-range-preselection>\n\n<!-- CORRECT -->\n<mds-input-date-range>\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2026-06-01\" end=\"2026-06-30\">\n    Questo mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n\n#### Do Not Omit `name` When Inside a Form\n\nWithout `name` the component is form-associated but submits no named field, so the date range is invisible to the server and to `FormData`.\n\n```html\n<!-- INCORRECT -->\n<form action=\"/filtra\" method=\"get\">\n  <mds-input-date-range>\n    <mds-input-date slot=\"start\"></mds-input-date>\n    <mds-input-date slot=\"end\"></mds-input-date>\n  </mds-input-date-range>\n</form>\n\n<!-- CORRECT -->\n<form action=\"/filtra\" method=\"get\">\n  <mds-input-date-range name=\"periodo\">\n    <mds-input-date slot=\"start\"></mds-input-date>\n    <mds-input-date slot=\"end\"></mds-input-date>\n  </mds-input-date-range>\n</form>\n```\n"
      },
      "props": [
        {
          "name": "accessibleName",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "aria-label",
          "reflectToAttr": false,
          "docs": "The accessible name of the range: each of the two fields is named after it and after the\nend of the range it covers, the visible \"from\" and \"to\" labels living in this shadow root,\nwhere no IDREF of the slotted fields could reach them.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "delay",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "delay",
          "reflectToAttr": true,
          "docs": "Specifies the delay in milliseconds before closing the calendar dropdown after the click that\npicks the end of the range, if the value is 0 the dropdown will not close; a click that picks\nthe start leaves it open for the end",
          "docsTags": [
            {
              "name": "description",
              "text": "Default is 500"
            },
            {
              "name": "default",
              "text": "500"
            }
          ],
          "default": "500",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Disables the range, like a disabled native input: the dates cannot be changed, from the fields\nor from the calendar, and are left out of the form. It disables the two slotted fields too. A\ndisabled `<fieldset>` around the component does the same.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "dualCalendar",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "dual-calendar",
          "reflectToAttr": true,
          "docs": "Enables the linked dual-calendar range picker behavior.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "endDate",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "end-date",
          "reflectToAttr": true,
          "docs": "Specifies the end date of the range",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-06-30'"
            },
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hideToday",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "hide-today",
          "reflectToAttr": true,
          "docs": "Hides the highlight on today's date in the calendar.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "max",
          "type": "null | string",
          "complexType": {
            "original": "string | null",
            "resolved": "null | string",
            "references": {}
          },
          "mutable": false,
          "attr": "max",
          "reflectToAttr": true,
          "docs": "Specifies the max date of the range, user cannot set dates after this date",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-12-31'"
            },
            {
              "name": "default",
              "text": "null"
            }
          ],
          "default": "null",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "min",
          "type": "null | string",
          "complexType": {
            "original": "string | null",
            "resolved": "null | string",
            "references": {}
          },
          "mutable": false,
          "attr": "min",
          "reflectToAttr": true,
          "docs": "Specifies the min date of the range, user cannot set dates before this date",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-01-01'"
            },
            {
              "name": "default",
              "text": "null"
            }
          ],
          "default": "null",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Is needed to reference the form data after the form is submitted",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "InputSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | undefined",
            "references": {
              "InputSizeType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputSizeType",
                "referenceLocation": "InputSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the height of the field, the same as `mds-button`: `sm` 28px, `md` 36px, `lg` 48px",
          "docsTags": [
            {
              "name": "default",
              "text": "'lg'"
            }
          ],
          "default": "'lg'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "startDate",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "start-date",
          "reflectToAttr": true,
          "docs": "Specifies the start date of the range",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-06-01'"
            },
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "preselect",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(event: EventDate) => Promise<void>",
            "parameters": [
              {
                "name": "event",
                "type": "EventDate",
                "docs": "the preselection range to apply"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "EventDate": {
                "location": "local",
                "path": "/home/runner/work/magma/magma/projects/stencil/src/components/mds-input-date-range/mds-input-date-range.tsx",
                "id": "src/components/mds-input-date-range/mds-input-date-range.tsx::EventDate"
              },
              "HTMLMdsInputDateRangePreselectionElement": {
                "location": "global",
                "id": "global::HTMLMdsInputDateRangePreselectionElement"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "preselect(event: EventDate) => Promise<void>",
          "parameters": [
            {
              "name": "event",
              "type": "EventDate",
              "docs": "the preselection range to apply"
            }
          ],
          "docs": "Applies the given preselection range to the input.",
          "docsTags": [
            {
              "name": "param",
              "text": "event the preselection range to apply"
            }
          ]
        }
      ],
      "events": [
        {
          "event": "mdsInputDateRangeValueChange",
          "detail": "{ startDate: string; endDate: string; }",
          "bubbles": true,
          "complexType": {
            "original": "{\n    startDate: string;\n    endDate: string;\n  }",
            "resolved": "{ startDate: string; endDate: string; }",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emitted when the selected start or end date changes.",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-input-date-range-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-input-date-range-calendar-width",
          "annotation": "prop",
          "docs": "Sets the width of each calendar shown in the dropdown",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-date-range-fields-firefox-justify-content",
          "annotation": "prop",
          "docs": "Sets the justify-content of the component in Firefox",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-date-range-fields-gap",
          "annotation": "prop",
          "docs": "Sets the gap between the fields of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-input-date-range-icon-color",
          "annotation": "prop",
          "docs": "Sets the icon color of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-date-range-ring",
          "annotation": "prop",
          "docs": "Sets the box-shadow of the component's input to perform the ring effect",
          "visibility": "public"
        },
        {
          "name": "--mds-input-date-range-shadow",
          "annotation": "prop",
          "docs": "Sets the box-shadow of the component's input",
          "visibility": "public"
        },
        {
          "name": "--mds-input-date-range-variant-color-rgb",
          "annotation": "prop",
          "docs": "Sets the variant colors of the component",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "calendar-preselection",
          "docs": "Add `HTML elements` or `components` to this slot."
        },
        {
          "name": "end",
          "docs": "Add `HTML elements` or `components` to this slot."
        },
        {
          "name": "start",
          "docs": "Add `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-tab",
        "mds-tab-item",
        "mds-calendar",
        "mds-text",
        "mds-button",
        "mds-dropdown"
      ],
      "dependencyGraph": {
        "mds-input-date-range": [
          "mds-tab",
          "mds-tab-item",
          "mds-calendar",
          "mds-text",
          "mds-button",
          "mds-dropdown"
        ],
        "mds-tab-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-calendar": [
          "mds-button",
          "mds-calendar-cell"
        ],
        "mds-calendar-cell": [
          "mds-button"
        ]
      },
      "storybook": "form-input-date-range--docs"
    },
    {
      "filePath": "src/components/mds-input-date-range-preselection/mds-input-date-range-preselection.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-date-range-preselection",
      "readme": "# mds-input-date-range-preselection\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add the `text string` of the preselection, as `Last 7 days`: it becomes the label of\nthe button that applies the range. **Avoid** `HTML elements` or `components`, which end up\ninside an `mds-button`."
        },
        {
          "name": "parent",
          "text": "mds-input-date-range"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-date-range-preselection>` web component is a compound child of [`<mds-input-date-range>`](../mds-input-date-range/AGENTS.md). It renders a clickable shortcut button (a quick range like \"Last 7 days\" or \"This month\") that, when activated, fills the parent's date range with a predefined `start`/`end` pair instead of requiring the user to pick dates manually on the calendar.\n\n#### Semantic Behavior\n\n- **Compound child**: Placed as a direct child of `<mds-input-date-range>`, it assigns itself to the parent's `calendar-preselection` slot. A `slot` set by the author is kept, so it can also sit in the `preselection` slot of [`<mds-calendar>`](../mds-calendar/AGENTS.md): there it applies nothing itself, and its click reaches the page, which sets the range.\n- **Click drives the parent**: On click it applies its `start`/`end` range to the parent, which populates and validates the range, syncs the form value, emits the parent's `mdsInputDateRangeValueChange` if the range changed, and closes the dropdown after the parent's `delay` (unless it is `0`).\n- **Selection is parent-managed**: Choosing one preselection clears the active state on its siblings and marks the active one; the parent also re-marks a preselection as selected when the range changes to match its dates (including single-day matches where `end` is undefined); a range set at first load is not matched until it changes or the user leaves the component.\n\n#### Properties & Visual Configurations\n\n- **`start`** (required) and **`end`**: Define the ISO date range this shortcut applies. Provide both for a true range; omit `end` to express a single-day preselection.\n- **`selected`**: Reflects whether this preselection is currently the active one. Treat it as read-only in normal use - the parent sets it; do not hand-toggle it to drive selection.\n\nThe default slot holds the human-readable label. Visual states (default, hover, selected) follow the theme: the component has no public CSS custom property and does not expose `variant`/`tone` props of its own.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-date-range-preselection>` 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 Preset Range Shortcuts\n\nPlace one or more `<mds-input-date-range-preselection>` elements as direct children of [`<mds-input-date-range>`](../mds-input-date-range/AGENTS.md). Each element needs a `start` date (ISO format) and a human-readable label in its default slot. The component auto-assigns itself to the parent's `calendar-preselection` slot.\n\n```html\n<mds-input-date-range name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\">\n    Questo mese\n  </mds-input-date-range-preselection>\n  <mds-input-date-range-preselection start=\"2025-05-01\" end=\"2025-05-31\">\n    Mese scorso\n  </mds-input-date-range-preselection>\n  <mds-input-date-range-preselection start=\"2025-01-01\" end=\"2025-12-31\">\n    Anno corrente\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n\n#### Single-Day Shortcut (omit `end`)\n\nOmit the `end` attribute to create a single-day preselection. The parent matches it as active whenever its current range is a single day equal to `start`.\n\n```html\n<mds-input-date-range name=\"data-singola\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-05\">\n    Oggi\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n\n#### Multiple Preset Windows Together\n\nGroup semantically related shortcuts - short-term, medium-term, and long-term - so users can jump to the most common reporting windows without picking the dates on the calendar (the presets sit in the calendar dropdown, next to the calendar). Only one item carries `selected` at a time; the parent manages it automatically.\n\n```html\n<mds-input-date-range name=\"finestra-report\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-05-29\" end=\"2025-06-04\">\n    Ultima settimana\n  </mds-input-date-range-preselection>\n  <mds-input-date-range-preselection start=\"2025-05-01\" end=\"2025-05-31\">\n    Ultimo mese\n  </mds-input-date-range-preselection>\n  <mds-input-date-range-preselection start=\"2025-01-01\" end=\"2025-06-30\">\n    Ultimo semestre\n  </mds-input-date-range-preselection>\n  <mds-input-date-range-preselection start=\"2024-01-01\" end=\"2024-12-31\">\n    Anno precedente\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n\n#### Reading the Selected Value via Parent Events\n\nListen to the parent's `mdsInputDateRangeValueChange` event to read the chosen range. The preselection component itself fires no event - the parent owns the value contract.\n\n```html\n<mds-input-date-range id=\"date-range\" name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\">\n    Questo mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n\n<script>\n  document.getElementById('date-range').addEventListener('mdsInputDateRangeValueChange', (e) => {\n    console.log(e.detail.startDate, e.detail.endDate);\n  });\n</script>\n```\n\n#### Styling Customization\n\n`<mds-input-date-range-preselection>` has no public CSS custom property and no shadow part: it paints its three visual states - default, hover, and selected - from the semantic color roles ([`agents/color.md`](../../../../agents/color.md)), so dark mode and themes keep working without overrides. The parent marks the active shortcut with `selected`; do not restyle the states by hand.\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-date-range-preselection>`. 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 Outside `<mds-input-date-range>`\n\nThe component applies its range only as a direct child of [`<mds-input-date-range>`](../mds-input-date-range/AGENTS.md). Used standalone it renders a button that applies nothing: `closest('mds-input-date-range')` returns null, and the click only reaches the listeners of the page.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\">\n  Questo mese\n</mds-input-date-range-preselection>\n\n<!-- CORRECT -->\n<mds-input-date-range name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\">\n    Questo mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n\n#### Do Not Set `selected` Manually to Drive Selection\n\n`selected` is a read-only output attribute managed entirely by the parent. Setting it by hand does not apply the range, does not clear sibling active states, and will be overwritten by the parent on the next range change.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\" selected>\n    Questo mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n\n<!-- CORRECT: set the range on the parent; it marks the matching preset when the range changes -->\n<mds-input-date-range name=\"periodo\" start-date=\"2025-06-01\" end-date=\"2025-06-30\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\">\n    Questo mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n\n#### Do Not Set `selected` as a Boolean String\n\n`selected` is a boolean attribute: remove it to deselect the item - but again, prefer letting the parent control it. A string value is fragile: `\"false\"` is read as `false` on this component, but the attribute stays on the element until the component renders (attribute selectors and scripts reading it see it set). Never write a boolean as a string.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\" selected=\"false\">\n    Questo mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n\n<!-- CORRECT: remove the attribute entirely -->\n<mds-input-date-range name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\">\n    Questo mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n\n#### Do Not Use HTML in the Default Slot\n\nThe default slot is the plain-text label read by the internal `<mds-button>`. Placing HTML elements inside it breaks button layout and may be stripped by the shadow DOM projection.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\">\n    <strong>Questo mese</strong>\n    <small>(giu)</small>\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n\n<!-- CORRECT -->\n<mds-input-date-range name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\">\n    Questo mese (giu)\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n\n#### Do Not Provide Only the `end` Date Without `start`\n\n`start` is a required prop; omitting it leaves the component without a valid range anchor and the parent cannot apply any preselection. `end` is optional and meaningful only together with `start`.\n\n```html\n<!-- INCORRECT -->\n<mds-input-date-range name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection end=\"2025-06-30\">\n    Fine mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n\n<!-- CORRECT -->\n<mds-input-date-range name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\">\n    Questo mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n\n#### Do Not Customize via Undocumented Shadow Parts or Internal Selectors\n\nThe component has no public CSS custom property and no shadow part: its three visual states come from the semantic color roles and the `selected` state the parent sets. Targeting the inner `mds-button` or its shadow internals couples your code to implementation details that can change without notice.\n\n```css\n/* INCORRECT */\nmds-input-date-range-preselection .action {\n  background: blue;\n}\nmds-input-date-range-preselection::part(button) {\n  border-radius: 0;\n}\n```\n\n```html\n<!-- CORRECT: no override, the states follow the theme and the parent sets selected -->\n<mds-input-date-range name=\"periodo\">\n  <mds-input-date slot=\"start\"></mds-input-date>\n  <mds-input-date slot=\"end\"></mds-input-date>\n  <mds-input-date-range-preselection start=\"2025-06-01\" end=\"2025-06-30\">\n    Questo mese\n  </mds-input-date-range-preselection>\n</mds-input-date-range>\n```\n"
      },
      "props": [
        {
          "name": "end",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "end",
          "reflectToAttr": true,
          "docs": "Sets the end date of the preselection",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-06-30'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Sets the preselection date range",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "start",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "start",
          "reflectToAttr": true,
          "docs": "Sets the start date of the preselection",
          "docsTags": [
            {
              "name": "description",
              "text": "It's in ISO format (YYYY-MM-DD)."
            },
            {
              "name": "example",
              "text": "'2025-06-01'"
            }
          ],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-date-range-preselection-default-background",
          "annotation": "prop",
          "docs": "Background used for the default (unselected) preselection state",
          "visibility": "internal"
        },
        {
          "name": "--mds-date-range-preselection-default-border",
          "annotation": "prop",
          "docs": "Border color used for the default preselection state",
          "visibility": "internal"
        },
        {
          "name": "--mds-date-range-preselection-default-color",
          "annotation": "prop",
          "docs": "Text color used in the default preselection state",
          "visibility": "internal"
        },
        {
          "name": "--mds-date-range-preselection-hover-background",
          "annotation": "prop",
          "docs": "Background used when a preselection item is hovered",
          "visibility": "internal"
        },
        {
          "name": "--mds-date-range-preselection-hover-border",
          "annotation": "prop",
          "docs": "Border color used on hover state",
          "visibility": "internal"
        },
        {
          "name": "--mds-date-range-preselection-hover-color",
          "annotation": "prop",
          "docs": "Text color used on hover state",
          "visibility": "internal"
        },
        {
          "name": "--mds-date-range-preselection-selected-background",
          "annotation": "prop",
          "docs": "Background used for the selected preselection state",
          "visibility": "internal"
        },
        {
          "name": "--mds-date-range-preselection-selected-border",
          "annotation": "prop",
          "docs": "Border color used for the selected preselection state",
          "visibility": "internal"
        },
        {
          "name": "--mds-date-range-preselection-selected-color",
          "annotation": "prop",
          "docs": "Text color used in the selected preselection state",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add the `text string` of the preselection, as `Last 7 days`: it becomes the label of\nthe button that applies the range. **Avoid** `HTML elements` or `components`, which end up\ninside an `mds-button`."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-input-date-range-preselection": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "form-input-date-range-preselection--docs"
    },
    {
      "filePath": "src/components/mds-input-field/mds-input-field.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-field",
      "readme": "# mds-input-field\n\n\n\nThis 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.\n",
      "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 one `mds-input` or `mds-input-date`: the field names it with `label` and shows its\nvalidation errors in `message`. Another control, a native `<input>` among them, gets the name\nbut no validation messages."
        },
        {
          "name": "part",
          "text": "content - The wrapper of the default slot, above the message"
        },
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-field>` web component is the form-field wrapper of the Magma Design System. It does not render an input itself; instead it decorates a slotted `<mds-input>` (or similar control) with a top label and a bottom message area, and reacts to the control's validation lifecycle. It plays the role the native `<label>` + helper-text grouping plays around an `<input>`.\n\n#### Semantic Behavior\n\n- **Compound parent**: The interactive control is supplied through the default slot; the field is not used standalone. Validation is wired to the first slotted element; with an empty slot the field only logs a console warning at load.\n- **Form association**: The field participates in the surrounding `<form>` through the control it wraps, requiring no extra wiring.\n- **Validation-driven state**: It listens for the slotted control's `mdsInputValidation` event. When the control reports errors it switches `variant` to `'error'` and shows the joined error strings in `message`; otherwise it sets `variant` to `'success'` and clears `message`.\n- **Message rendering**: `message` is split on `;` and each segment is rendered as a separate caption line, so multiple validation messages stack vertically.\n\n#### Properties & Visual Configurations\n\n- **`message`** is the helper/error text shown under the control. It is author-set initially but is overwritten by the validation cycle once the slotted control emits validation (replaced by the errors, or cleared when there are none), so a manually set message persists only until the first validation.\n- **`icon`** draws an icon before the label, in the emphasis colour of the `variant` (muted while the variant is `'primary'`): the state the message tells, seen at a glance, such as a verdict on the value the field holds. It takes the name of an icon or its SVG, as `mds-icon`. The icon is decorative and hidden from assistive technologies: the message says the state in words, and the label alone names the control. Without `icon` the label stands alone, as it always did.\n- **`short`** states that the answer of the field is short: a house number, a postcode, a tax code, a date. It says the meaning, and the `field-group` utility of the styles package lays it out: from a column of `28rem` a short field takes half of it and two in a row share it, under it each takes the whole column (`widths/field` of the design language). Out of a `field-group` the field keeps its width.\n- **`variant`** drives the field's status colouring. It is not the full theme ladder: the allowed set is the input-specific variant ladder (`'ai'`, `'primary'`, plus the status values `'error'`, `'info'`, `'success'`, `'warning'`), drawn from the families in [`agents/variants.md`](../../../../agents/variants.md). It defaults to `'primary'` and is normally managed automatically by validation rather than set by hand.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-field>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Labeled Input\n\nThe canonical form. Wrap [`mds-input`](../mds-input/AGENTS.md) in `<mds-input-field>` and set `label` for the visible field caption. The `<mds-input>` must be the first slotted element: the field wires validation to it, and with an empty slot it only logs a console warning.\n\n```html\n<mds-input-field label=\"Nome e cognome\">\n  <mds-input name=\"fullName\" placeholder=\"Es: Mario Rossi\"></mds-input>\n</mds-input-field>\n```\n\n#### Input with a Static Helper Message\n\nSet `message` to show a persistent hint below the control. The message disappears once the slotted input emits its first `mdsInputValidation` event, so use this only for pre-validation guidance.\n\n```html\n<mds-input-field label=\"Codice fiscale\" message=\"16 caratteri alfanumerici\">\n  <mds-input name=\"cf\" type=\"cf\" placeholder=\"Es: MRCRSS83B21D704L\"></mds-input>\n</mds-input-field>\n```\n\n#### A Verdict with Its Icon\n\nWhen the page judges the value of the field (a choice that holds or not, a check the value passes), set `variant` to the verdict, say it in `message` and give `icon` the mark of the verdict: it stands before the label, in the colour of the variant. The words stay in the message; the icon only lets the eye find the state.\n\n```html\n<mds-input-field\n  label=\"Spazio colore\"\n  variant=\"warning\"\n  icon=\"mi/baseline/warning\"\n  message=\"La tonalità ruota di 25 gradi nei gradini scuri;OKLAB tiene meglio questo colore\"\n>\n  <mds-input-select>\n    <option value=\"OKLCH\" selected>OKLCH</option>\n    <option value=\"OKLAB\">OKLAB</option>\n  </mds-input-select>\n</mds-input-field>\n```\n\n#### Validation-Driven State\n\nWhen `<mds-input>` carries validation rules (e.g. `required`, `type=\"cf\"`, or `pattern`), `<mds-input-field>` listens for `mdsInputValidation` and automatically sets `variant` to `'error'` (showing joined error messages) or `'success'` (clearing the message). No event wiring is needed - just add the validation attributes to the slotted input.\n\n```html\n<mds-input-field label=\"Indirizzo email\">\n  <mds-input name=\"email\" type=\"email\" required placeholder=\"Es: mario@esempio.it\"></mds-input>\n</mds-input-field>\n```\n\n#### Explicit Variant for Initial Status\n\nIf the field must start in a known non-default state - for example a server-side validation result rendered on page load - set `variant` directly. The validation cycle overwrites it at the first `mdsInputValidation` of the slotted input, which an `<mds-input>` emits on blur only when it has validation rules.\n\n```html\n<!-- Server returned an error before page load -->\n<mds-input-field\n  label=\"Username\"\n  variant=\"error\"\n  message=\"Username gia in uso\"\n>\n  <mds-input name=\"username\" value=\"mario.rossi\"></mds-input>\n</mds-input-field>\n```\n\n#### Field with an Action Button\n\nThe default slot accepts multiple elements. The first child grows to fill the available width; subsequent children shrink to their natural size. Use this to pair an input with a companion [`mds-button`](../mds-button/AGENTS.md).\n\n```html\n<mds-input-field label=\"Cerca per nome\">\n  <mds-input name=\"query\" placeholder=\"Es: Mario Rossi\"></mds-input>\n  <mds-button icon=\"mi/baseline/search\" size=\"lg\" aria-label=\"Cerca\"></mds-button>\n</mds-input-field>\n```\n\n#### Inside a Form\n\nThe slotted `<mds-input>` is itself form-associated and submits under its own `name`. Place the field inside a `<form>` with a submit button; the field requires no extra wiring.\n\n```html\n<form action=\"/registrazione\" method=\"post\">\n  <mds-input-field label=\"Nome\">\n    <mds-input name=\"firstName\" required placeholder=\"Es: Mario\"></mds-input>\n  </mds-input-field>\n\n  <mds-input-field label=\"Cognome\">\n    <mds-input name=\"lastName\" required placeholder=\"Es: Rossi\"></mds-input>\n  </mds-input-field>\n\n  <mds-button type=\"submit\" label=\"Registrati\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Short Answers in a Group of Fields\n\nSet `short` on a field whose answer is short (a house number, a postcode, a tax code, a date), and put the fields of one subject in a `fieldset` with the `field-group` utility of the styles package. A short field takes half the column and two in a row share it, in reading order: number and postcode, tax code and date of birth. Every other field takes the whole column, and under a column of `28rem` the halves take it too. The group reads its direct children: a framework component that wraps the field carries `short` on its own host.\n\n```html\n<form class=\"max-w-form\">\n  <fieldset class=\"field-group\">\n    <legend>Residenza</legend>\n    <mds-input-field label=\"Via\">\n      <mds-input name=\"street\"></mds-input>\n    </mds-input-field>\n    <mds-input-field label=\"Numero civico\" short>\n      <mds-input name=\"number\"></mds-input>\n    </mds-input-field>\n    <mds-input-field label=\"CAP\" short>\n      <mds-input name=\"postcode\"></mds-input>\n    </mds-input-field>\n  </fieldset>\n</form>\n```\n\n#### Styling Customization\n\nAdjust the message area colors through the two documented `--mds-input-field-*` CSS custom properties. Use the semantic color roles via `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)) so dark mode and high-contrast modes keep working.\n\n```css\n.field-highlight mds-input-field {\n  --mds-input-field-message-color: rgb(var(--magma-accent-fg));\n  --mds-input-field-message-background: rgb(var(--magma-accent-surface));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-field>`. 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 It Without a Slotted Input\n\n`<mds-input-field>` requires a slotted input element. With an empty slot it only logs a console warning at load and has no control to label or validate. Always slot an [`mds-input`](../mds-input/AGENTS.md) as the first child.\n\n```html\n<!-- INCORRECT -->\n<mds-input-field label=\"Nome\"></mds-input-field>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Nome\">\n  <mds-input name=\"firstName\" placeholder=\"Es: Mario\"></mds-input>\n</mds-input-field>\n```\n\n#### Do Not Use a Native `<input>` in the Slot\n\nThe component binds to `mdsInputValidation`, which only the Magma inputs (`<mds-input>`, `<mds-input-date>`) emit. Slotting a raw `<input>` skips the validation lifecycle entirely - the field will never switch to `error` or `success`.\n\n```html\n<!-- INCORRECT -->\n<mds-input-field label=\"Email\">\n  <input type=\"email\" name=\"email\" required>\n</mds-input-field>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Email\">\n  <mds-input type=\"email\" name=\"email\" required></mds-input>\n</mds-input-field>\n```\n\n#### Do Not Manage `variant` and `message` Manually During Validation\n\n`variant` and `message` are mutable and will be overwritten by the validation cycle the moment the slotted control emits `mdsInputValidation`. Trying to manage them via script in parallel leads to race conditions. Set validation attributes on `<mds-input>` and let the field drive state automatically.\n\n```html\n<!-- INCORRECT -->\n<mds-input-field id=\"nameField\" label=\"Nome\">\n  <mds-input name=\"firstName\" required></mds-input>\n</mds-input-field>\n<script>\n  document.getElementById('nameField').variant = 'error';\n  document.getElementById('nameField').message = 'Campo obbligatorio';\n</script>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Nome\">\n  <mds-input name=\"firstName\" required></mds-input>\n</mds-input-field>\n```\n\n#### Do Not Listen for Native `change` or `input` Events to Detect Validation\n\nNative DOM events (`change`, `input`) do not carry validation state and may not bubble out of shadow DOM as expected. Listen for the documented `mdsInputValidation` event on the slotted `<mds-input>` if you need to react to validation results in your own code.\n\n```html\n<!-- INCORRECT -->\n<mds-input-field label=\"Codice fiscale\">\n  <mds-input id=\"cfInput\" name=\"cf\" type=\"cf\" required></mds-input>\n</mds-input-field>\n<script>\n  document.getElementById('cfInput').addEventListener('change', handleChange);\n</script>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Codice fiscale\">\n  <mds-input id=\"cfInput\" name=\"cf\" type=\"cf\" required></mds-input>\n</mds-input-field>\n<script>\n  document.getElementById('cfInput').addEventListener('mdsInputValidation', handleValidation);\n</script>\n```\n\n#### Do Not Apply an Invalid `variant` Value\n\n`<mds-input-field>` uses `ThemeInputVariantType`, which only accepts `'ai'`, `'primary'`, `'error'`, `'info'`, `'success'`, and `'warning'`. Values from the broader variant ladder (e.g. `'secondary'`, `'dark'`) silently fall back to the default and produce no coloring change.\n\n```html\n<!-- INCORRECT (variant from the full theme ladder) -->\n<mds-input-field label=\"Stato\" variant=\"secondary\" message=\"Valore non valido\">\n  <mds-input name=\"stato\"></mds-input>\n</mds-input-field>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Stato\" variant=\"warning\" message=\"Valore non valido\">\n  <mds-input name=\"stato\"></mds-input>\n</mds-input-field>\n```\n\n#### Do Not Narrow a Short Field by Hand\n\nA width written on the field, or a wrapper per pair, gives every field an edge of its own and copies the threshold under which the halves take the whole column. `short` in a `field-group` keeps two widths, the whole column and half of it, and the threshold in one place.\n\n```html\n<!-- INCORRECT -->\n<div class=\"flex flex-wrap gap-between-fields\">\n  <mds-input-field label=\"Numero civico\" class=\"w-32\">\n    <mds-input name=\"number\"></mds-input>\n  </mds-input-field>\n  <mds-input-field label=\"CAP\" class=\"w-1/2\">\n    <mds-input name=\"postcode\"></mds-input>\n  </mds-input-field>\n</div>\n\n<!-- CORRECT -->\n<fieldset class=\"field-group\">\n  <legend>Residenza</legend>\n  <mds-input-field label=\"Numero civico\" short>\n    <mds-input name=\"number\"></mds-input>\n  </mds-input-field>\n  <mds-input-field label=\"CAP\" short>\n    <mds-input name=\"postcode\"></mds-input>\n  </mds-input-field>\n</fieldset>\n```\n\n#### Do Not Tell the State with the Icon Alone\n\n`icon` is decorative: hidden from assistive technologies, it only lets the eye find a state the message says in words. A field that shows a warning icon with no message tells a screen reader nothing; a symbol written into `label` instead reaches the name of the control, read before its label.\n\n```html\n<!-- INCORRECT -->\n<mds-input-field label=\"Spazio colore\" variant=\"warning\" icon=\"mi/baseline/warning\">\n  <mds-input-select>...</mds-input-select>\n</mds-input-field>\n\n<!-- CORRECT -->\n<mds-input-field\n  label=\"Spazio colore\"\n  variant=\"warning\"\n  icon=\"mi/baseline/warning\"\n  message=\"La tonalità ruota di 25 gradi nei gradini scuri\"\n>\n  <mds-input-select>...</mds-input-select>\n</mds-input-field>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Message Area\n\nThe only supported customization surface is `--mds-input-field-message-color` and `--mds-input-field-message-background`, plus the `content` shadow part. Targeting internal elements via `>>>` or undocumented class names couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-input-field >>> .message {\n  color: red;\n}\n\n/* CORRECT */\nmds-input-field {\n  --mds-input-field-message-color: rgb(var(--magma-danger-text-muted));\n  --mds-input-field-message-background: rgb(var(--magma-danger-wash-base));\n}\n```\n"
      },
      "props": [
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "An icon before the label, in the colour of the variant: the state the message tells, seen at a\nglance (a verdict on the value, a check passed). Decorative: the message says the state in\nwords, and the label stays the name of the control",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "label",
          "reflectToAttr": false,
          "docs": "Display a text on the top of the input text field",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "message",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "message",
          "reflectToAttr": false,
          "docs": "Display a message at the bottom of the input text field",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "short",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "short",
          "reflectToAttr": true,
          "docs": "States that the answer of the field is short, such as a house number, a postcode, a tax code\nor a date: in a `field-group` the field takes half the column, and two short fields in a row\nshare it (#1189, widths/field). The group lays it out; on its own the field keeps its width",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"error\" | \"info\" | \"primary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ThemeInputVariantType",
            "resolved": "\"ai\" | \"error\" | \"info\" | \"primary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ThemeInputVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeInputVariantType",
                "referenceLocation": "ThemeInputVariantType"
              }
            }
          },
          "mutable": true,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Display the variant of a message at the bottom of the input text field",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-input-field-message-background",
          "annotation": "prop",
          "docs": "Sets the message background color of the component, will be visible only if there is a text defined by `message` component attribute",
          "visibility": "public"
        },
        {
          "name": "--mds-input-field-message-color",
          "annotation": "prop",
          "docs": "Sets the message text color of the component",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add one `mds-input` or `mds-input-date`: the field names it with `label` and shows its\nvalidation errors in `message`. Another control, a native `<input>` among them, gets the name\nbut no validation messages."
        }
      ],
      "parts": [
        {
          "name": "content",
          "docs": "The wrapper of the default slot, above the message"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-input-field": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "form-input-field--docs"
    },
    {
      "filePath": "src/components/mds-input-otp/mds-input-otp.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-otp",
      "readme": "# mds-input-otp\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-otp>` web component is the Magma Design System control for entering one-time passcodes, rendering a row of single-digit fields that together compose a single form value. It is form-associated, so it behaves like a native input whose value is the concatenated OTP code.\n\n#### Semantic Behavior\n\n- **Form association**: The joined digits are exposed as the form value, so it submits with the surrounding `<form>` with no extra wiring. A form reset brings back the code of load, in the cells and in the form, like a native input.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables it as `disabled` does, like a native control: the code cannot be changed and is left out of the form, until the fieldset is enabled.\n- **Single-digit cells**: Renders `length` digit cells, each capped at one character; the host value is the concatenation of every cell.\n- **Numeric-only entry**: A key that writes anything but a digit (a letter, Space) changes nothing; a digit typed on a filled cell overwrites it.\n- **Keyboard**: Backspace empties the cell, or the previous one from an empty cell, and moves there; Delete empties the cell; the left and right arrows move between the cells. Tab and Shift+Tab leave the field, and the shortcuts (paste with Ctrl+V or Cmd+V among them) keep what the browser does with them.\n- **Auto-advance focus**: After a valid digit, focus moves to the next cell automatically; entering a digit in the last cell blurs it.\n- **Paste handling**: Pasting a code of digits (the spaces around it are dropped) distributes the digits across consecutive cells starting from the focused one; a paste with anything else in it, signs and decimal points included, is ignored.\n- **Completion + submit**: When a digit typed or pasted in the last cell completes all `length` digits and `autosubmit` is set, the owning form is submitted; digits pasted past the last cell are dropped.\n\n#### Properties & Visual Configurations\n\n- **`length`** sets how many digit cells are rendered and therefore the expected code length; it doubles as the completeness threshold for auto-submit. Defaults to `6`.\n- **`disabled`** disables every cell, like a disabled native input: the code cannot be changed and is left out of the form. The cells take the disabled look without the disabled tip, which a single-digit cell has no room for.\n- **`autosubmit`** opts into automatic form submission the moment the code is complete - use it for flows where the OTP is the only field and no explicit confirm button is needed; leave it off when the user should review or trigger submission manually.\n- **`value`** holds the current concatenated code; read it to observe progress. A value written in the markup or set by code fills the cells from the first one, as many digits as there are cells, and reaches the form.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-otp>` 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#### Default Six-Digit Code\n\nThe component renders six single-digit cells by default. Drop it into a form with a `name` attribute so the concatenated value is submitted as a named field; the server behind the form's `action` checks the code.\n\n```html\n<form action=\"/verify\" method=\"post\">\n  <mds-input-otp name=\"otp\"></mds-input-otp>\n  <mds-button type=\"submit\" label=\"Verifica\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Custom Code Length\n\nSet `length` to match the expected OTP length - 4 digits for a short PIN, 8 for a longer token.\n\n```html\n<!-- Four-digit PIN -->\n<mds-input-otp name=\"pin\" length=\"4\"></mds-input-otp>\n\n<!-- Eight-digit token -->\n<mds-input-otp name=\"token\" length=\"8\"></mds-input-otp>\n```\n\n#### Auto-Submit on Completion\n\nAdd the `autosubmit` boolean attribute when the OTP is the only field and no explicit confirm button is needed. The owning form is submitted when a digit typed or pasted in the last cell completes the code - do not set `autosubmit=\"false\"` to disable it; remove the attribute instead.\n\n```html\n<form action=\"/verify\" method=\"post\">\n  <mds-input-otp name=\"otp\" autosubmit></mds-input-otp>\n</form>\n```\n\n#### Reading the Value Programmatically\n\n`value` is a reflected attribute that updates as the user types. Read it directly from the element or listen for form data. Set it to fill the cells from code, for example to prefill a code the page already knows; a form reset brings back the value of load.\n\n```javascript\nconst otp = document.querySelector('mds-input-otp');\n\n// Poll current state\nconsole.log(otp.value); // e.g. \"124\" while in progress: empty cells add nothing\n\n// React on form submit\ndocument.querySelector('form').addEventListener('submit', (e) => {\n  e.preventDefault();\n  const data = new FormData(e.target);\n  console.log('Codice OTP:', data.get('otp'));\n});\n```\n\n#### Full Authentication Flow\n\nCombine `autosubmit` with a submit handler to verify the code and reflect the result - pair with [`mds-button`](../mds-button/AGENTS.md) in await state while the request is in flight.\n\n```html\n<form id=\"otp-form\" action=\"/auth/otp\" method=\"post\">\n  <mds-input-otp name=\"otp\" length=\"6\" autosubmit></mds-input-otp>\n\n  <mds-button\n    id=\"submit-btn\"\n    type=\"submit\"\n    label=\"Conferma codice\"\n    variant=\"primary\"\n    tone=\"strong\"\n    disabled\n  ></mds-button>\n</form>\n\n<script>\n  const form = document.getElementById('otp-form');\n  const btn = document.getElementById('submit-btn');\n  const otpEl = form.querySelector('mds-input-otp');\n\n  // Enable the button only once all digits are entered\n  setInterval(() => {\n    btn.disabled = otpEl.value.length < 6 ? true : undefined;\n  }, 100);\n\n  form.addEventListener('submit', async (e) => {\n    e.preventDefault();\n    btn.setAttribute('await', '');\n    // ... send request, then remove await\n  });\n</script>\n```\n\n#### Layout Alignment\n\nThe host is an `inline-flex` container. Use a utility class to center it inside a card or modal.\n\n```html\n<div class=\"flex justify-center py-600\">\n  <mds-input-otp name=\"otp\"></mds-input-otp>\n</div>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-otp>`. 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 Set `autosubmit=\"false\"` to Disable Auto-Submit\n\n`autosubmit` is a boolean attribute and `mds-input-otp` is form-associated: as on a native control, any value turns it on, `\"false\"` included, so this markup submits the form as soon as the code is complete. Remove the attribute entirely to opt out.\n\n```html\n<!-- INCORRECT -->\n<mds-input-otp name=\"otp\" autosubmit=\"false\"></mds-input-otp>\n\n<!-- CORRECT -->\n<mds-input-otp name=\"otp\"></mds-input-otp>\n```\n\n#### Do Not Build a Row of Native `<input>` Elements Instead\n\nHand-rolling digit cells with native `<input type=\"text\" maxlength=\"1\">` elements duplicates focus management, paste handling, and form association that `<mds-input-otp>` already provides, and breaks Magma theming.\n\n```html\n<!-- INCORRECT -->\n<div class=\"otp-row\">\n  <input type=\"text\" maxlength=\"1\">\n  <input type=\"text\" maxlength=\"1\">\n  <input type=\"text\" maxlength=\"1\">\n  <input type=\"text\" maxlength=\"1\">\n  <input type=\"text\" maxlength=\"1\">\n  <input type=\"text\" maxlength=\"1\">\n</div>\n\n<!-- CORRECT -->\n<mds-input-otp name=\"otp\"></mds-input-otp>\n```\n\n#### Do Not Pierce Shadow DOM to Style Inner Cells\n\nThe inner `mds-input` cells are Shadow DOM internals. Targeting them with descendant selectors or `>>>` will break silently on any internal refactor.\n\n```css\n/* INCORRECT */\nmds-input-otp mds-input {\n  --mds-input-background: red;\n}\nmds-input-otp >>> .input {\n  border-radius: 0;\n}\n\n/* CORRECT - style the host layout only */\nmds-input-otp {\n  gap: calc(var(--spacing) * 600);\n}\n```\n\n#### Do Not Use `autosubmit` Without a Parent `<form>`\n\n`autosubmit` calls `internals.form.requestSubmit()`. Outside a `<form>` there is no owning form, so the call is silently ignored and the expected submission never fires.\n\n```html\n<!-- INCORRECT - no owning form, submit never fires -->\n<mds-input-otp name=\"otp\" autosubmit></mds-input-otp>\n\n<!-- CORRECT - wrapped in a form that handles the submit -->\n<form action=\"/verify\" method=\"post\">\n  <mds-input-otp name=\"otp\" autosubmit></mds-input-otp>\n</form>\n```\n\n#### Do Not Listen for the Native `input` or `change` Event\n\nNative DOM events may not propagate out of shadow DOM the way you expect. Read the reflected `value` attribute or use form data on submit instead.\n\n```javascript\n// INCORRECT\ndocument.querySelector('mds-input-otp').addEventListener('input', (e) => {\n  console.log(e.target.value); // unreliable from outside shadow DOM\n});\n\n// CORRECT - read the reflected prop directly\nconst otpEl = document.querySelector('mds-input-otp');\ndocument.querySelector('form').addEventListener('submit', (e) => {\n  e.preventDefault();\n  console.log('Codice OTP:', otpEl.value);\n});\n```\n\n#### Do Not Set `length` as a Non-Integer or to Zero\n\n`length` controls how many cells are rendered. A fractional or zero value produces no cells or the wrong number. Always pass a positive integer.\n\n```html\n<!-- INCORRECT -->\n<mds-input-otp name=\"otp\" length=\"0\"></mds-input-otp>\n<mds-input-otp name=\"otp\" length=\"4.5\"></mds-input-otp>\n\n<!-- CORRECT -->\n<mds-input-otp name=\"otp\" length=\"4\"></mds-input-otp>\n```\n"
      },
      "props": [
        {
          "name": "accessibleName",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "aria-label",
          "reflectToAttr": false,
          "docs": "The accessible name of the code: each digit is announced as a position inside it, the\nfields being separate controls a screen reader reaches one at a time.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "autosubmit",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "autosubmit",
          "reflectToAttr": true,
          "docs": "Automatically submits the form when the OTP code is complete",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Disables every cell of the code, like a disabled native input: the code cannot be changed and\nis left out of the form. A disabled `<fieldset>` around the component does the same.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "length",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "length",
          "reflectToAttr": false,
          "docs": "Number of digits in the OTP code",
          "docsTags": [
            {
              "name": "default",
              "text": "6"
            }
          ],
          "default": "6",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "The current value of the OTP code: a value set in the markup or by code fills the cells from\nthe first one",
          "docsTags": [
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-input"
      ],
      "dependencyGraph": {
        "mds-input-otp": [
          "mds-input"
        ],
        "mds-input": [
          "mds-button",
          "mds-input-tip",
          "mds-input-tip-item",
          "mds-icon",
          "mds-spinner"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-input-tip-item": [
          "mds-text"
        ]
      },
      "storybook": "form-otp--docs"
    },
    {
      "filePath": "src/components/mds-input-range/mds-input-range.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-range",
      "readme": "# mds-input-range\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "header - The element containing the labels displayed over the input element"
        },
        {
          "name": "part",
          "text": "track - The element containing the track of the input range"
        },
        {
          "name": "slot",
          "text": "- The label of the range, as text. Add an `mds-input-range-value` per value to hold\nseveral values, a thumb each, on one track"
        },
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-range>` web component is the Magma Design System slider control for picking a numeric value from a continuous interval, or several values on one track. It wraps a native `<input type=\"range\">` per thumb, adding a labelled header, a styled track with a live progress fill, form association, and value formatting.\n\n#### Semantic Behavior\n\n- **Form association**: Inside a `<form>` the selected number is reported under `name` with no extra wiring. A form reset brings back the value of load, thumb and progress included, or the middle of the range when the markup sets no `value`, like a native input.\n- **Value clamping and snapping**: On input the value is clamped into `[min, max]` and snapped to the nearest `step` increment, so the committed `value` is always valid even when set programmatically out of range.\n- **Decimal awareness**: The number of decimal places is derived from `step`, letting fractional steps snap correctly; as on a native input, a `step` that is not a positive number, from the start or set later, falls back to the default step, `1`.\n- **Disabled state**: Blocks interaction and clears the reported form value while disabled; enabled again, the range reports its value again. A disabled `<fieldset>` around the component does the same, as it does a native input.\n- **Emitted event**: `mdsInputRangeChange` carries the new numeric value whenever `value` actually changes.\n- **Accessibility**: The control takes its accessible name from the slotted label text; with `formatValue` it also announces the formatted value (`aria-valuetext`). The ring of the focus goes round the thumb.\n- **Default slot is the label**: The default slot holds the field's text label, rendered in the header alongside the formatted current value.\n- **Tip over the thumb**: while the pointer is on the slider, while the thumb is dragged and while it has the focus of the keyboard, the thumb shows its value, formatted as in the header, in a tip over it; the header keeps the value, for when nothing moves, and a header hidden through its `header` part leaves the tip. The tip follows its thumb, its arrow on the thumb and its bubble inside the track at the ends; it lies on the line of the header, its value on the line of the header value, and covers whole the part of the header it meets. It is drawn only, since the thumb already announces its value.\n- **Width**: The slider takes the width its container gives it, a narrow grid cell too: the track gets shorter and a label longer than the room left by the value ends in an ellipsis.\n\n#### Several Values on One Track\n\nAn [`<mds-input-range-value>`](../mds-input-range-value/AGENTS.md) child per value turns the range into a slider with a thumb per value, as an `<option>` per choice turns a `<select>` into a list: a minimum and a maximum, or the stops of a scale.\n\n- **From the first child on**: with one child or more, the values are the children's, one child included; `value` and `mdsInputRangeChange` are left out, and keep the one value of a range without children.\n- **One native input per thumb**: each thumb is a native range input, all of them stacked on the track. The native input gives the slider role, the value, the name, the focus and the drag; a component of `role=\"slider\"` elements would rewrite them, and leave the one value on another control.\n- **Neighbours bound each other**: a thumb never passes the thumbs next to it, but can reach them. The arrows move the thumb with the focus by one `step`, Page Up and Page Down by a tenth of the range, Home and End take it to its neighbours (or to `min` and `max`): the component handles these keys itself, because a native input knows only `min` and `max`.\n- **Order and limits of the markup**: the thumbs follow the values from the lowest, whatever the order of the children; each keeps the name of its own child. A value outside `min` and `max`, or off the step, is brought inside and onto the step, as a native input sanitizes it, and written back on its child; a child without a value starts in the middle.\n- **Names**: the text of the range names the group of thumbs, the text of each child names its thumb, as in the multi-thumb slider of the WAI-ARIA APG. A child without text gets the label and the position of its thumb (\"Prezzo, 1 di 2\", in the language of the page).\n- **Header**: the values in order, formatted as the one value: two are an interval joined by an en dash (\"20 - 80\" with a long dash), more a list joined by a middle dot.\n- **Tip over each thumb**: each thumb has its own tip, with its own value. The one value shows its tip with the pointer anywhere on the track, its input taking the whole track; with two thumbs or more, the pointer finds a thumb only on the thumb, and its tip shows then.\n- **Fill**: from the first thumb to the last.\n- **Overlap**: a thumb is as wide as the track is tall, so two near values lie on each other: the thumb with the focus lies on top and the keys move it alone. Without the focus, a thumb held by its neighbours lies under them, so that the one on top can move.\n- **Pointer**: a thumb drags itself; a press on the track moves the nearest thumb there.\n- **Adding and removing**: adding a value is adding a child, removing one is removing it; the range watches its children, their values and their text.\n- **Form**: an entry per value under `name`, in order, as a native `<select multiple>`; a form reset gives each child back the value it had when the range first read it.\n- **Event**: `mdsInputRangeValuesChange` carries `{ values }`, in order, whenever the list changes: from a thumb, from code, as a child comes or goes, on a reset. The values of load are not a change.\n\n#### Properties & Visual Configurations\n\n- **`min` / `max` / `step`** define the permitted interval and granularity; `step` also controls how fractional values are snapped and how many decimals are preserved.\n- **`value`** is the committed numeric selection of a range without `<mds-input-range-value>` children, kept clamped and snapped - set it programmatically to move the thumb. With children, each child holds the value of its thumb.\n- **`formatValue`** is a function `(value: number) => string` for presentation only: use it to render the header value as currency, a percentage, or a unit-suffixed label without changing the underlying numeric `value`.\n\nThis component does not use the shared `variant` / `tone` ladders ([`agents/variants.md`](../../../../agents/variants.md)); it has no public CSS custom property: the thumb and the track follow the theme, and the `header` and `track` parts listed in [`AGENTS.md`](AGENTS.md) are its styling hooks.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-range>` 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 Slider with a Label\n\nThe minimum viable form. Put the field's text label in the default slot - it is rendered in the header and used as the accessible name for the underlying input. The default range is 0-100 with a step of 1.\n\n```html\n<mds-input-range name=\"volume\">Volume</mds-input-range>\n```\n\n#### Setting `min`, `max`, and `step`\n\nConstrain the range to a meaningful interval. Use `step` to enforce granularity - the component snaps the selected value to the nearest multiple automatically.\n\n```html\n<!-- Percentage slider, 5-point increments -->\n<mds-input-range name=\"completamento\" min=\"0\" max=\"100\" step=\"5\">Completamento (%)</mds-input-range>\n\n<!-- Temperature slider, half-degree steps -->\n<mds-input-range name=\"temperatura\" min=\"16\" max=\"30\" step=\"0.5\">Temperatura (C)</mds-input-range>\n```\n\n#### Pre-selected Value via `value`\n\nPass `value` to initialize the thumb at a specific position. The prop is reflected, so it also stays in sync when the user drags.\n\n```html\n<mds-input-range name=\"priorita\" min=\"1\" max=\"10\" value=\"7\">Priorita</mds-input-range>\n```\n\n#### Listening to `mdsInputRangeChange`\n\nThe component emits `mdsInputRangeChange` with the new numeric value in `event.detail` whenever the committed value changes. Do not listen to the raw `input` or `change` events - they may not bubble out of shadow DOM as expected.\n\n```html\n<mds-input-range id=\"rating\" name=\"valutazione\" min=\"1\" max=\"5\">Valutazione</mds-input-range>\n\n<script>\n  document.querySelector('#rating').addEventListener('mdsInputRangeChange', (event) => {\n    console.log('Nuovo valore:', event.detail);\n  });\n</script>\n```\n\n#### Custom Value Display with `formatValue`\n\nSupply a `(value: number) => string` function to `formatValue` to change how the current value is shown in the header label - for example to add a unit suffix, format as currency, or humanize byte counts. The underlying numeric `value` is not affected.\n\n```html\n<mds-input-range id=\"prezzo\" name=\"prezzo\" min=\"0\" max=\"10000\" step=\"50\">Prezzo massimo</mds-input-range>\n\n<script>\n  document.querySelector('#prezzo').formatValue = (v) =>\n    v.toLocaleString('it-IT', { style: 'currency', currency: 'EUR' });\n</script>\n```\n\n#### Disabled Slider\n\nSet the boolean `disabled` attribute to prevent interaction. The component applies disabled visual tokens and clears the reported form value automatically. Do not use `disabled=\"false\"` to re-enable - remove the attribute instead.\n\n```html\n<mds-input-range name=\"soglia\" min=\"0\" max=\"100\" value=\"40\" disabled>Soglia (disabilitato)</mds-input-range>\n```\n\n#### Form Participation\n\n`<mds-input-range>` is form-associated. Place it inside a `<form>` with a `name` attribute and the selected value is submitted automatically alongside other fields.\n\n```html\n<form action=\"/impostazioni\" method=\"post\">\n  <mds-input-range name=\"luminosita\" min=\"0\" max=\"100\" value=\"75\">Luminosita</mds-input-range>\n  <mds-input-range name=\"contrasto\" min=\"0\" max=\"100\" value=\"50\">Contrasto</mds-input-range>\n\n  <mds-button type=\"submit\" label=\"Salva impostazioni\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Several Values: an Interval\n\nPut an [`<mds-input-range-value>`](../mds-input-range-value/AGENTS.md) per value inside the range: a thumb each. The text of the range is the label of the group, the text of each value names its thumb. The header shows the two values as an interval, formatted by `formatValue` as the one value.\n\n```html\n<mds-input-range id=\"prezzo-intervallo\" min=\"0\" max=\"500\" step=\"10\" name=\"prezzo\">\n  Prezzo\n  <mds-input-range-value value=\"100\">Minimo</mds-input-range-value>\n  <mds-input-range-value value=\"400\">Massimo</mds-input-range-value>\n</mds-input-range>\n\n<script>\n  document.querySelector('#prezzo-intervallo').formatValue = (v) =>\n    v.toLocaleString('it-IT', { style: 'currency', currency: 'EUR' });\n</script>\n```\n\nThe form receives one entry per value under `name`, in order: `prezzo=100&prezzo=400`, read on the server as a list, as the entries of a `<select multiple>`.\n\n#### Several Values: Listening to `mdsInputRangeValuesChange`\n\nWith values, the range emits `mdsInputRangeValuesChange`, whose `detail.values` lists them in order from the lowest. It fires whenever the list changes: a thumb moved, a value set from code, a value added or removed, a form reset.\n\n```html\n<mds-input-range id=\"scala\" min=\"1\" max=\"21\" step=\"0.5\" name=\"contrasto\">\n  Scala di contrasto\n  <mds-input-range-value value=\"3\"></mds-input-range-value>\n  <mds-input-range-value value=\"4.5\"></mds-input-range-value>\n  <mds-input-range-value value=\"7\"></mds-input-range-value>\n  <mds-input-range-value value=\"12\"></mds-input-range-value>\n</mds-input-range>\n\n<script>\n  document.querySelector('#scala').addEventListener('mdsInputRangeValuesChange', (event) => {\n    console.log('Passi:', event.detail.values); // [3, 4.5, 7, 12]\n  });\n</script>\n```\n\nThe values without text are named after the label and their position (\"Scala di contrasto, 2 di 4\"). Adding a stop is appending an `<mds-input-range-value>`, removing one is removing it.\n\n#### Hiding the Header via `::part(header)`\n\nUse `::part(header)` to hide the label-and-value header when the surrounding UI already provides that context - for example in a compact settings row where the label lives outside the component.\n\n```css\n.slider-compatto mds-input-range::part(header) {\n  display: none;\n}\n```\n\n#### Styling Customization\n\n`<mds-input-range>` has no public CSS custom property: the thumb and the track take their sizes from the component and their colours from the semantic color roles ([`agents/color.md`](../../../../agents/color.md)), the progress from the accent, so themes and dark mode recolour it without overrides. Adjust the slider only through its documented `header` and `track` parts, as in the example above.\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-range>`. 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 a Raw `<input type=\"range\">` Instead of the Component\n\nReaching for the native element bypasses the Magma-styled track, the progress fill, the labelled header, form association wiring, and the snapping logic.\n\n```html\n<!-- INCORRECT -->\n<label for=\"v\">Volume</label>\n<input type=\"range\" id=\"v\" name=\"volume\" min=\"0\" max=\"100\">\n\n<!-- CORRECT -->\n<mds-input-range name=\"volume\" min=\"0\" max=\"100\">Volume</mds-input-range>\n```\n\n#### Do Not Omit the Label Slot\n\nWithout slotted text the slider has no accessible name - screen readers cannot announce the control's purpose. Always put a meaningful text label in the default slot.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range name=\"luminosita\" min=\"0\" max=\"100\"></mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range name=\"luminosita\" min=\"0\" max=\"100\">Luminosita</mds-input-range>\n```\n\n#### Do Not Use `disabled=\"false\"` to Enable the Slider\n\n`disabled` is a boolean attribute and `mds-input-range` is form-associated: as on a native control, any value turns it on, `\"false\"` included, so this markup disables the slider. Remove the attribute entirely to enable it.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range name=\"soglia\" disabled=\"false\">Soglia</mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range name=\"soglia\">Soglia</mds-input-range>\n```\n\n#### Do Not Listen to Raw `input` / `change` Events\n\nNative events may not bubble out of shadow DOM the way you expect. Listen to `mdsInputRangeChange`, which the component emits on every committed value change.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range id=\"r\" name=\"valore\">Valore</mds-input-range>\n<script>\n  document.querySelector('#r').addEventListener('change', (e) => {\n    console.log(e.target.value); // unreliable across shadow DOM\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-input-range id=\"r\" name=\"valore\">Valore</mds-input-range>\n<script>\n  document.querySelector('#r').addEventListener('mdsInputRangeChange', (e) => {\n    console.log(e.detail); // numeric value, always reliable\n  });\n</script>\n```\n\n#### Do Not Set `step` to Zero or a Negative Number\n\nA `step` of zero or negative is invalid: as on a native input it is ignored and the default step, `1`, applies instead, which is rarely the granularity you meant. Use a positive integer or decimal.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range name=\"q\" step=\"0\">Quantita</mds-input-range>\n<mds-input-range name=\"q\" step=\"-1\">Quantita</mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range name=\"q\" step=\"1\">Quantita</mds-input-range>\n```\n\n#### Do Not Put Several Ranges Side by Side for One Interval\n\nTwo ranges for a minimum and a maximum let the minimum pass the maximum, and give the form two names. Put both values on one range.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range name=\"prezzo-min\" value=\"100\">Prezzo minimo</mds-input-range>\n<mds-input-range name=\"prezzo-max\" value=\"400\">Prezzo massimo</mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range name=\"prezzo\">\n  Prezzo\n  <mds-input-range-value value=\"100\">Minimo</mds-input-range-value>\n  <mds-input-range-value value=\"400\">Massimo</mds-input-range-value>\n</mds-input-range>\n```\n\n#### Do Not Set `value` on a Range with Values\n\nWith `<mds-input-range-value>` children, the values are theirs: `value` of the range and `mdsInputRangeChange` are left out. Set and read the values on the children, or listen to `mdsInputRangeValuesChange`.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range value=\"20\">\n  Prezzo\n  <mds-input-range-value>Minimo</mds-input-range-value>\n  <mds-input-range-value>Massimo</mds-input-range-value>\n</mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range>\n  Prezzo\n  <mds-input-range-value value=\"20\">Minimo</mds-input-range-value>\n  <mds-input-range-value value=\"80\">Massimo</mds-input-range-value>\n</mds-input-range>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Track or Thumb\n\nThe component exposes `::part(header)` and `::part(track)` for all supported customization; it has no public CSS custom property, and the thumb and the track take their colours from the theme. Targeting internal class names via `>>>` or undocumented `::part()` names couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-input-range >>> .track-progress {\n  background-color: hotpink;\n}\nmds-input-range::part(thumb) { /* \"thumb\" is not a documented part */\n  border-radius: 0;\n}\n\n/* CORRECT */\nmds-input-range::part(track) { /* \"track\" is a documented part */\n  opacity: 0.8;\n}\n```\n\n#### Do Not Use `formatValue` to Change the Submitted Form Value\n\n`formatValue` is purely presentational - it only changes the header display string. The submitted form value is always the raw number. Do not rely on it for data transformation.\n\n```html\n<!-- INCORRECT: expecting the form to submit the formatted string -->\n<mds-input-range id=\"p\" name=\"prezzo\">Prezzo</mds-input-range>\n<script>\n  // This changes what is shown but NOT what is submitted\n  document.querySelector('#p').formatValue = (v) => v + ' EUR';\n  // form.submit() still sends a plain number for \"prezzo\"\n</script>\n\n<!-- CORRECT: format on the server or in a submit handler using event.detail -->\n<mds-input-range id=\"p\" name=\"prezzo\">Prezzo</mds-input-range>\n<script>\n  document.querySelector('#p').formatValue = (v) =>\n    v.toLocaleString('it-IT', { style: 'currency', currency: 'EUR' });\n  // The display is formatted; handle raw numeric value on submit separately\n</script>\n```\n"
      },
      "props": [
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Sets if the component is disabled",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "formatValue",
          "type": "((value: number) => string) | undefined",
          "complexType": {
            "original": "(value: number) => string",
            "resolved": "((value: number) => string) | undefined",
            "references": {}
          },
          "mutable": false,
          "reflectToAttr": false,
          "docs": "A function to custom how value is represented",
          "docsTags": [],
          "values": [
            {
              "type": "((value: number) => string)"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "max",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "max",
          "reflectToAttr": false,
          "docs": "The greatest value in the range of permitted values",
          "docsTags": [
            {
              "name": "default",
              "text": "100"
            }
          ],
          "default": "100",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "min",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "min",
          "reflectToAttr": false,
          "docs": "The lowest value in the range of permitted values",
          "docsTags": [
            {
              "name": "default",
              "text": "0"
            }
          ],
          "default": "0",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Is needed to reference the form data after the form is submitted",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "step",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "step",
          "reflectToAttr": false,
          "docs": "The step attribute is a number that specifies the granularity that\nthe value must adhere to, or the special value any, which is described below.",
          "docsTags": [
            {
              "name": "default",
              "text": "1"
            }
          ],
          "default": "1",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": true,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "The value attribute contains a number which contains a representation of the selected number.\nIt holds the one value of a range without `mds-input-range-value` children: with children the\nvalues are theirs, and this one is left out",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsInputRangeChange",
          "detail": "number",
          "bubbles": true,
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the input range is changed: the value of a range without\n`mds-input-range-value` children",
          "docsTags": []
        },
        {
          "event": "mdsInputRangeValuesChange",
          "detail": "MdsInputRangeValuesEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsInputRangeValuesEventDetail",
            "resolved": "MdsInputRangeValuesEventDetail",
            "references": {
              "MdsInputRangeValuesEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-input-range/meta/event-detail.ts::MdsInputRangeValuesEventDetail",
                "referenceLocation": "MdsInputRangeValuesEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the values of a range with `mds-input-range-value` children change: from a thumb,\nfrom code, as a child comes or goes, or on a form reset. `values` holds them in order, from\nthe lowest. The values of load are not a change",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-input-range-thumb-background",
          "annotation": "prop",
          "docs": "Sets the thumb background color",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-range-thumb-background-disabled",
          "annotation": "prop",
          "docs": "Sets the thumb background color when the component is disabled",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-range-thumb-cursor",
          "annotation": "prop",
          "docs": "Sets the thumb cursor",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-range-thumb-size",
          "annotation": "prop",
          "docs": "Sets the thumb width and height of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-range-track-background",
          "annotation": "prop",
          "docs": "Sets the track background color",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-range-track-background-disabled",
          "annotation": "prop",
          "docs": "Sets the track background color when the component is disabled",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-range-track-progress-background",
          "annotation": "prop",
          "docs": "Sets the track progress background color",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-range-track-progress-background-disabled",
          "annotation": "prop",
          "docs": "Sets the track progress background color when the component is disabled",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-range-track-size",
          "annotation": "prop",
          "docs": "Sets the track width and height",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "The label of the range, as text. Add an `mds-input-range-value` per value to hold\nseveral values, a thumb each, on one track"
        }
      ],
      "parts": [
        {
          "name": "header",
          "docs": "The element containing the labels displayed over the input element"
        },
        {
          "name": "track",
          "docs": "The element containing the track of the input range"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-input-range": [
          "mds-text"
        ]
      },
      "storybook": "form-range--docs"
    },
    {
      "filePath": "src/components/mds-input-range-value/mds-input-range-value.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-range-value",
      "readme": "# mds-input-range-value\n\n\n",
      "docs": "One value of an `mds-input-range` that holds several, as an `<option>` is one choice of a\n`<select>`: the range draws a thumb for it, and its text names that thumb. It draws nothing\nitself. Adding or removing a value is adding or removing one of these elements: the range\nwatches its children.",
      "docsTags": [
        {
          "name": "slot",
          "text": "- The name of the value, as text (\"Minimo\", \"Massimo\"): the accessible name of its thumb.\nWithout text the thumb is named after the label of the range and its position (\"Prezzo, 1 di 2\")"
        },
        {
          "name": "parent",
          "text": "mds-input-range"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-range-value>` web component is one value of a [`<mds-input-range>`](../mds-input-range/AGENTS.md) that holds several values on one track, as an `<option>` is one choice of a `<select>`. The range draws a thumb for each of its `<mds-input-range-value>` children; the child itself draws nothing.\n\n#### Semantic Behavior\n\n- **Compound child only**: it works only as a direct child of `<mds-input-range>`. Outside a range it is hidden and does nothing.\n- **One child, one thumb**: adding a value is adding a child, removing one is removing its child. The range watches its children, their values and their text.\n- **The text names the thumb**: the text of the child is the accessible name of its thumb (\"Minimo\", \"Massimo\"), as each thumb of the multi-thumb slider of the WAI-ARIA APG. A child without text gets a name made of the label of the range and its position (\"Prezzo, 1 di 2\", in the language of the page).\n- **The range keeps the value valid**: it brings a value outside `min` and `max`, or off the `step`, inside the range and onto the step, as a native range input does, and writes it back here. A child without a value starts in the middle of the range.\n- **The order is the order of the values**: the thumbs follow their values from the lowest, whatever the order of the children in the markup; each keeps the name of its own child.\n- **The value follows the thumb**: as the thumb moves, the range writes its value on `value`, which is reflected. Setting `value` moves the thumb.\n\n#### Properties & Visual Configurations\n\nThe only prop is `value`, the number of the thumb. The thumb is styled by its range: the child has no `variant` / `tone` ([`agents/variants.md`](../../../../agents/variants.md)), no part and no public CSS custom property.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-range-value>` 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#### An Interval: Two Values\n\nThe canonical form: a minimum and a maximum on one track. The text of the range is its label, the text of each value names its thumb.\n\n```html\n<mds-input-range min=\"0\" max=\"500\" step=\"10\" name=\"prezzo\">\n  Prezzo\n  <mds-input-range-value value=\"100\">Minimo</mds-input-range-value>\n  <mds-input-range-value value=\"400\">Massimo</mds-input-range-value>\n</mds-input-range>\n```\n\n#### A Scale of Stops\n\nMore than two values: each stops at its neighbours, which it can reach but not pass. The header lists them, separated by a middle dot.\n\n```html\n<mds-input-range min=\"1\" max=\"21\" step=\"0.5\" name=\"contrasto\">\n  Scala di contrasto\n  <mds-input-range-value value=\"3\">Passo 1</mds-input-range-value>\n  <mds-input-range-value value=\"4.5\">Passo 2</mds-input-range-value>\n  <mds-input-range-value value=\"7\">Passo 3</mds-input-range-value>\n  <mds-input-range-value value=\"12\">Passo 4</mds-input-range-value>\n</mds-input-range>\n```\n\n#### Adding and Removing a Value\n\nA value is an element: append a child to add a thumb, remove it to take the thumb away. The range emits `mdsInputRangeValuesChange` with the new list.\n\n```html\n<mds-input-range id=\"scala\" min=\"0\" max=\"100\" name=\"passi\">\n  Passi\n  <mds-input-range-value value=\"20\"></mds-input-range-value>\n  <mds-input-range-value value=\"80\"></mds-input-range-value>\n</mds-input-range>\n\n<script>\n  const scala = document.querySelector('#scala');\n  const passo = document.createElement('mds-input-range-value');\n  passo.value = 50;\n  scala.append(passo); // a third thumb at 50\n  passo.remove(); // back to two\n</script>\n```\n\n#### Reading and Setting a Value\n\n`value` follows its thumb, so the children are where the page reads the values; setting `value` moves the thumb, within its neighbours.\n\n```js\nconst [minimo, massimo] = document.querySelectorAll('#prezzo mds-input-range-value');\nconsole.log(minimo.value, massimo.value);\nmassimo.value = 300;\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-range-value>`. 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 It Outside `<mds-input-range>`\n\nA value draws nothing: only its range draws its thumb.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range-value value=\"20\">Minimo</mds-input-range-value>\n\n<!-- CORRECT -->\n<mds-input-range min=\"0\" max=\"100\">\n  Prezzo\n  <mds-input-range-value value=\"20\">Minimo</mds-input-range-value>\n</mds-input-range>\n```\n\n#### Do Not Put the Label of the Range in a Value\n\nThe text of the range is its label, the text of a value names its own thumb. A value that carries the label leaves the range unnamed and names one thumb after the whole group.\n\n```html\n<!-- INCORRECT -->\n<mds-input-range>\n  <mds-input-range-value value=\"20\">Prezzo</mds-input-range-value>\n  <mds-input-range-value value=\"80\"></mds-input-range-value>\n</mds-input-range>\n\n<!-- CORRECT -->\n<mds-input-range>\n  Prezzo\n  <mds-input-range-value value=\"20\">Minimo</mds-input-range-value>\n  <mds-input-range-value value=\"80\">Massimo</mds-input-range-value>\n</mds-input-range>\n```\n\n#### Do Not Read the Values from `value` of the Range\n\nWith values, `value` and `mdsInputRangeChange` of the range are left out: they hold the one value of a range without children. Read the children, `mdsInputRangeValuesChange` or the form.\n\n```js\n// INCORRECT\nrange.addEventListener('mdsInputRangeChange', (e) => console.log(e.detail));\n\n// CORRECT\nrange.addEventListener('mdsInputRangeValuesChange', (e) => console.log(e.detail.values));\n```\n"
      },
      "props": [
        {
          "name": "value",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "The value of the thumb. The range keeps it inside its `min` and `max`, on its `step` and\nbetween the values next to it, and writes it here as the thumb moves; set it to move the\nthumb. Without a value the thumb starts in the middle of the range, as a native range input",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "The name of the value, as text (\"Minimo\", \"Massimo\"): the accessible name of its thumb.\nWithout text the thumb is named after the label of the range and its position (\"Prezzo, 1 di 2\")"
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-forms-range-value--docs"
    },
    {
      "filePath": "src/components/mds-input-select/mds-input-select.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-select",
      "readme": "# mds-input-select\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "select - The select HTML element"
        },
        {
          "name": "part",
          "text": "tip-top - Selects the verbose status of input on top of element"
        },
        {
          "name": "slot",
          "text": "- Add `option` `HTML elements` or `components` to this slot."
        },
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-select>` web component is the Magma Design System single- and multi-choice dropdown control. It wraps a native `<select>` element, adding form association, accessible status feedback, and themed chrome while accepting plain `<option>` elements through its default slot.\n\n#### Semantic Behavior\n\n- **Native select wrapping**: It renders a real `<select>` (exposed as the `select` part) so keyboard, type-ahead, and platform option lists work natively; the host owns theming and status only.\n- **Slotted options**: The default slot accepts `<option>` (and `<optgroup>`) markup; the current selection re-syncs whenever the slotted content changes.\n- **Form association**: The selection is pushed to the host form: a single select submits its `value`, a `multiple` one an entry per selected option under `name`, as a native select. A form reset brings back the selection of load, like a native select: the options the markup marks `selected` (or the placeholder), with the `value` of load on top. Toggling `disabled` removes the value from the submitted form data.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables it as `disabled` does, like a native control: it cannot be changed and its value is left out of the form, until the fieldset is enabled.\n- **Form validity**: A `required` select left empty is reported to the form as a native one: it matches `:invalid` and stops the submit, with a message in the page language. A disabled select is left out, and `novalidate` on the `<form>` turns the check off.\n- **Value syncing**: Changing the selection (by user input, the `setValue()` method, or the prop) emits `mdsInputSelectChange` with `{ value, values }` in `detail`: `value` is the first selected option as a string, `values` the values of every selected option, the placeholder left out. Like a native `<select>`, it is not emitted on load: the selection the component starts with reaches the form, not the event. A `value` set by code selects its `<option>` alone, as `select.value` does, and a value cleared by code goes back to the placeholder.\n- **Placeholder option**: When `placeholder` is set, a leading empty-value `<option>` is injected as the first entry; if `required` is set that placeholder is disabled so it cannot be re-selected after a valid choice.\n- **Default selection fallback**: With no explicit value, the options the markup marks `selected` become the selection; without them, the placeholder or, with no placeholder, the first option of a single select. A `defaultValue` seeds `value` at load.\n- **Status tip**: A status tip surfaces verbose state - a disabled notice, and for required fields a `required` / `required-success` message that expands while the control has focus. It stands on the top border of the field, half outside, clear of its rounded corner, and stays there while the control has the focus, as on `mds-input`: the arrow keeps its place.\n\n#### Properties & Visual Configurations\n\nThe `variant` prop applies a status appearance drawn from the shared status ladder in [`agents/variants.md`](../../../../agents/variants.md) - use it to reflect validation outcome (`'error'`, `'success'`, `'warning'`, `'info'`) rather than decorative styling. This component exposes no separate `tone` prop.\n\n- **`size`** sets the height of the field, the same as [`<mds-button>`](../mds-button/AGENTS.md): `sm` 28px, `md` 36px, `lg` 48px (default). Match it to the buttons next to the field, or go smaller in dense layouts (filter bars, table toolbars); the text style stays the same, the padding and the inner arrow scale with it.\n\n#### Other behavioral props\n\n- **`multiple`** turns the control into a multi-select list box: the form gets an entry per selected option and `values` in the `mdsInputSelectChange` detail lists them all, while `value` holds the first one, as `select.value` does. **`rows`** sets how many option rows are visible at once, as the `size` of a native `<select>`: above `1` it shows a list box even without `multiple`. A number in `size`, the row count it used to set, still works as `rows` but warns: it is deprecated and goes in the next major.\n- **`defaultValue`** is the initial selection used to seed the value at load (notably for the React wrapper), distinct from the live `value` that reflects the current choice.\n- **`required`** both enforces a non-empty submission and locks the placeholder option so the empty entry cannot be chosen again.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-select>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Select with Placeholder\n\nThe canonical form. Slot plain `<option>` elements as direct children. Set `placeholder` to inject a leading empty-value entry that prompts the user before a choice is made.\n\n```html\n<mds-input-select name=\"categoria\" placeholder=\"Seleziona una categoria...\">\n  <option value=\"news\">Notizie</option>\n  <option value=\"eventi\">Eventi</option>\n  <option value=\"avvisi\">Avvisi</option>\n</mds-input-select>\n```\n\n#### Required Select Inside a Form\n\nAdding `required` enforces a non-empty submission - an empty select stops the submit like a native one - and disables the placeholder option once a valid choice exists, so users cannot revert to the empty entry. Place the component inside a `<form>` - it is form-associated and submits natively.\n\n```html\n<form action=\"/salva\" method=\"post\">\n  <mds-input-select name=\"regione\" required placeholder=\"Scegli la regione...\">\n    <option value=\"lombardia\">Lombardia</option>\n    <option value=\"veneto\">Veneto</option>\n    <option value=\"toscana\">Toscana</option>\n  </mds-input-select>\n  <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Pre-selected Value via `value`\n\nPass `value` to open the component with a specific option already chosen. The matching `<option>` is marked selected automatically. Use `default-value` instead when the initial selection is set once at load and you do not need live two-way binding (notably in the React wrapper).\n\n```html\n<!-- Live controlled value -->\n<mds-input-select name=\"priorita\" value=\"alta\">\n  <option value=\"bassa\">Bassa</option>\n  <option value=\"media\">Media</option>\n  <option value=\"alta\">Alta</option>\n</mds-input-select>\n\n<!-- Initial seed value for React / SSR -->\n<mds-input-select name=\"priorita\" default-value=\"media\">\n  <option value=\"bassa\">Bassa</option>\n  <option value=\"media\">Media</option>\n  <option value=\"alta\">Alta</option>\n</mds-input-select>\n```\n\n#### Listening to Value Changes\n\nListen to `mdsInputSelectChange` - do not rely on the native `change` event, which may not bubble out of shadow DOM reliably. The event detail carries the chosen value as a string in `value`, and the values of every selected option in `values`.\n\n```html\n<mds-input-select id=\"stato-pratica\" name=\"stato\" placeholder=\"Seleziona stato...\">\n  <option value=\"bozza\">Bozza</option>\n  <option value=\"in-lavorazione\">In lavorazione</option>\n  <option value=\"chiusa\">Chiusa</option>\n</mds-input-select>\n\n<script>\n  document.getElementById('stato-pratica')\n    .addEventListener('mdsInputSelectChange', (event) => {\n      console.log('Nuovo stato:', event.detail.value);\n    });\n</script>\n```\n\n#### Programmatic Value via `setValue()`\n\nUse the `setValue()` async method when you need to change the selection from JavaScript after the component has rendered - for example when a related control resets the form state.\n\n```html\n<mds-input-select id=\"provincia\" name=\"provincia\" placeholder=\"Seleziona provincia...\">\n  <option value=\"MI\">Milano</option>\n  <option value=\"RM\">Roma</option>\n  <option value=\"TO\">Torino</option>\n</mds-input-select>\n\n<script>\n  async function resetSelezione() {\n    const el = document.getElementById('provincia');\n    await el.setValue('MI');\n  }\n</script>\n```\n\n#### Disabled State\n\nSet `disabled` as a boolean attribute to block interaction and remove the value from the submitted form data. A status tip is shown automatically while the component is disabled.\n\n```html\n<mds-input-select name=\"tipo-contratto\" disabled placeholder=\"Non disponibile\">\n  <option value=\"td\">Tempo determinato</option>\n  <option value=\"ti\">Tempo indeterminato</option>\n</mds-input-select>\n```\n\n#### Multi-select List Box\n\n`multiple` switches the component to a scrollable list that allows zero or more simultaneous selections. Use `rows` to control how many rows are visible without scrolling (`size` sets the height of the field). Mark the options to preselect with `selected`, as in a native `<select multiple>`. The form submits an entry per selected option under `name`, and `values` in the `mdsInputSelectChange` detail lists them all; `value` holds only the first one, as `select.value` does.\n\n```html\n<mds-input-select name=\"competenze\" multiple rows=\"4\">\n  <option value=\"js\" selected>JavaScript</option>\n  <option value=\"ts\" selected>TypeScript</option>\n  <option value=\"css\">CSS</option>\n  <option value=\"html\">HTML</option>\n  <option value=\"react\">React</option>\n</mds-input-select>\n```\n\n#### Grouped Options via `<optgroup>`\n\nThe default slot also accepts `<optgroup>` elements. Use them to group related options under a visible label.\n\n```html\n<mds-input-select name=\"comune\" placeholder=\"Seleziona comune...\">\n  <optgroup label=\"Lombardia\">\n    <option value=\"MI\">Milano</option>\n    <option value=\"BS\">Brescia</option>\n  </optgroup>\n  <optgroup label=\"Veneto\">\n    <option value=\"VE\">Venezia</option>\n    <option value=\"VR\">Verona</option>\n  </optgroup>\n</mds-input-select>\n```\n\n#### Variant for Validation Feedback\n\nSet `variant` to one of the status values (`error`, `success`, `warning`, `info`) to communicate the validation outcome visually. Use this after a form submission or inline validation, not as decorative styling.\n\n```html\n<!-- Errore di validazione -->\n<mds-input-select name=\"tipologia\" variant=\"error\" required placeholder=\"Seleziona tipologia...\">\n  <option value=\"A\">Tipo A</option>\n  <option value=\"B\">Tipo B</option>\n</mds-input-select>\n\n<!-- Selezione valida confermata -->\n<mds-input-select name=\"tipologia\" variant=\"success\" value=\"A\">\n  <option value=\"A\">Tipo A</option>\n  <option value=\"B\">Tipo B</option>\n</mds-input-select>\n```\n\n#### Styling Customization\n\nCustomize the component only through its public `--mds-input-select-*` CSS custom properties. Set them on the host or a parent selector; use the semantic color roles ([`agents/color.md`](../../../../agents/color.md)) so dark mode and high-contrast modes continue to work correctly. `--mds-input-select-variant-color-rgb` takes a bare RGB triplet (`var(--magma-<role>)`, no `rgb()`); `--mds-input-select-ring` and `--mds-input-select-shadow` take a box-shadow, its color written as `rgb(var(--magma-<role>))`. `--mds-input-select-ring` is the ring at rest: on hover and focus the select draws its own 3px ring in the variant color, so the focus stays visible whatever the ring at rest, in dark mode and with more contrast too; change its color through `--mds-input-select-variant-color-rgb`.\n\n```css\n.sidebar-filter mds-input-select {\n  --mds-input-select-variant-color-rgb: var(--magma-accent-emphasis);\n  --mds-input-select-ring: 0 0 0 2px rgb(var(--magma-accent-emphasis) / 0.8);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-select>`. 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 Slot Non-Option Elements\n\nThe default slot is reserved for `<option>` and `<optgroup>` elements. The component clones slot children into the inner `<select>`; any other element is copied verbatim and makes the native select malformed.\n\n```html\n<!-- INCORRECT -->\n<mds-input-select name=\"categoria\">\n  <div class=\"option-group\">\n    <span>Notizie</span>\n    <span>Eventi</span>\n  </div>\n</mds-input-select>\n\n<!-- CORRECT -->\n<mds-input-select name=\"categoria\" placeholder=\"Seleziona...\">\n  <option value=\"news\">Notizie</option>\n  <option value=\"eventi\">Eventi</option>\n</mds-input-select>\n```\n\n#### Do Not Listen to the Native `change` Event\n\n`<mds-input-select>` wraps a shadow-DOM `<select>`; the native `change` event does not bubble out of shadow DOM reliably. Always listen to the documented `mdsInputSelectChange` custom event instead.\n\n```html\n<!-- INCORRECT -->\n<mds-input-select id=\"sel\" name=\"tipo\"></mds-input-select>\n<script>\n  document.getElementById('sel').addEventListener('change', (e) => {\n    console.log(e.target.value); // may be undefined or stale\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-input-select id=\"sel\" name=\"tipo\"></mds-input-select>\n<script>\n  document.getElementById('sel').addEventListener('mdsInputSelectChange', (e) => {\n    console.log(e.detail.value);\n  });\n</script>\n```\n\n#### Do Not Use `variant` for Decorative Styling\n\n`variant` maps to `ThemeStatusVariantType` (`error`, `success`, `warning`, `info`). It is meant to communicate a validation outcome, not to apply a brand color. Using a status variant to make the component visually match a section's color theme misleads users about the control's validation state.\n\n```html\n<!-- INCORRECT - using 'info' just for a blue accent -->\n<mds-input-select name=\"argomento\" variant=\"info\">\n  <option value=\"A\">Argomento A</option>\n</mds-input-select>\n\n<!-- CORRECT - set variant only to reflect real validation state -->\n<mds-input-select name=\"argomento\" variant=\"error\" required placeholder=\"Obbligatorio\">\n  <option value=\"A\">Argomento A</option>\n</mds-input-select>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Inner `<select>`\n\nThe supported customization surface is the public `--mds-input-select-*` CSS custom properties and the two shadow parts (`select`, `tip-top`). Targeting internal elements with `>>>` or undocumented selectors couples your code to the implementation and breaks on minor releases.\n\n```css\n/* INCORRECT */\nmds-input-select >>> select {\n  font-size: 1rem;\n  border: 2px solid red;\n}\n\n/* CORRECT */\nmds-input-select {\n  --mds-input-select-ring: 0 0 0 2px rgb(var(--magma-danger-emphasis));\n  --mds-input-select-variant-color-rgb: var(--magma-danger-emphasis);\n}\nmds-input-select::part(select) {\n  font-size: 1rem;\n}\n```\n\n#### Do Not Set `placeholder` When You Need a Real Default Selection\n\n`placeholder` injects an empty-value leading option that disappears from valid choices once `required` is set. If you want the component to open with a specific option pre-selected, use `value` or `default-value` instead.\n\n```html\n<!-- INCORRECT - a real value supplied as placeholder text -->\n<mds-input-select name=\"priorita\" placeholder=\"Media\">\n  <option value=\"bassa\">Bassa</option>\n  <option value=\"media\">Media</option>\n  <option value=\"alta\">Alta</option>\n</mds-input-select>\n\n<!-- CORRECT - use value to pre-select a real option -->\n<mds-input-select name=\"priorita\" value=\"media\">\n  <option value=\"bassa\">Bassa</option>\n  <option value=\"media\">Media</option>\n  <option value=\"alta\">Alta</option>\n</mds-input-select>\n```\n\n#### Do Not Replace with a Raw `<select>`\n\n`<mds-input-select>` provides theming, accessible status tips, form-reset integration, and dark/high-contrast support. Reaching for a plain `<select>` bypasses all of that and breaks visual consistency across themes.\n\n```html\n<!-- INCORRECT -->\n<select name=\"categoria\" class=\"form-select\">\n  <option value=\"\">Seleziona...</option>\n  <option value=\"A\">Categoria A</option>\n</select>\n\n<!-- CORRECT -->\n<mds-input-select name=\"categoria\" placeholder=\"Seleziona...\">\n  <option value=\"A\">Categoria A</option>\n</mds-input-select>\n```\n"
      },
      "props": [
        {
          "name": "accessibleName",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "aria-label",
          "reflectToAttr": false,
          "docs": "The accessible name of the native control: the label a screen reader announces. An\n`mds-input-field` around the component passes its own label down here, so the attribute\nis only written by hand when the control stands on its own. The placeholder is deliberately\nnot a fallback: it disappears as soon as the field is filled.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "autoFocus",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "auto-focus",
          "reflectToAttr": true,
          "docs": "Specifies a short hint that describes the expected value of the element",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "autocomplete",
          "type": "\"on\" | undefined",
          "complexType": {
            "original": "'on'",
            "resolved": "\"on\" | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "autocomplete",
          "reflectToAttr": true,
          "docs": "Specifies a short hint that describes the expected value of the element",
          "docsTags": [],
          "values": [
            {
              "value": "on",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "defaultValue",
          "type": "null | number | string | undefined",
          "complexType": {
            "original": "string | number | null",
            "resolved": "null | number | string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "default-value",
          "reflectToAttr": true,
          "docs": "Specifies the default value of the component",
          "docsTags": [],
          "values": [
            {
              "type": "null"
            },
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "If true, the element is displayed as disabled",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "multiple",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "multiple",
          "reflectToAttr": true,
          "docs": "Specifies if the select should allow multiple options to be selected in the list",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Is needed to reference the form data after the form is submitted",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "placeholder",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "placeholder",
          "reflectToAttr": true,
          "docs": "Specifies a short hint that describes the expected value of the element",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "required",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "required",
          "reflectToAttr": true,
          "docs": "Specifies that the element must be filled out before submitting the form",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "rows",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "rows",
          "reflectToAttr": true,
          "docs": "The number of option rows the list shows at once, as the `size` of a native `<select>`:\nwith `multiple`, or above `1`, the select shows a list box",
          "docsTags": [
            {
              "name": "default",
              "text": "0"
            }
          ],
          "default": "0",
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | number | undefined",
          "complexType": {
            "original": "InputSizeType | number",
            "resolved": "\"lg\" | \"md\" | \"sm\" | number | undefined",
            "references": {
              "InputSizeType": {
                "location": "import",
                "path": "@type/input",
                "id": "src/type/input.ts::InputSizeType",
                "referenceLocation": "InputSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the height of the field, the same as `mds-button`: `sm` 28px, `md` 36px, `lg` 48px.\nA number is still read as `rows`, the row count this prop used to set: that use is deprecated\nand goes in the next major",
          "docsTags": [
            {
              "name": "default",
              "text": "'lg'"
            }
          ],
          "default": "'lg'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "null | number | string | undefined",
          "complexType": {
            "original": "string | number | null",
            "resolved": "null | number | string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "Specifies the value of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "null"
            },
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"error\" | \"info\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ThemeStatusVariantType",
            "resolved": "\"error\" | \"info\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ThemeStatusVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeStatusVariantType",
                "referenceLocation": "ThemeStatusVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the variant of the component",
          "docsTags": [],
          "values": [
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "setValue",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(value: string | number | null) => Promise<void>",
            "parameters": [
              {
                "name": "value",
                "type": "string | number | null",
                "docs": ""
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "setValue(value: string | number | null) => Promise<void>",
          "parameters": [
            {
              "name": "value",
              "type": "string | number | null",
              "docs": ""
            }
          ],
          "docs": "Sets the value of the component",
          "docsTags": []
        }
      ],
      "events": [
        {
          "event": "mdsInputSelectChange",
          "detail": "MdsInputSelectEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsInputSelectEventDetail",
            "resolved": "MdsInputSelectEventDetail",
            "references": {
              "MdsInputSelectEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-input-select/meta/event-detail.ts::MdsInputSelectEventDetail",
                "referenceLocation": "MdsInputSelectEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the selection changes: `value` is the first selected option, `values` every\nselected one",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-input-select-arrow-icon-background-color",
          "annotation": "prop",
          "docs": "Background color behind the arrow icon",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-select-arrow-icon-blur-background-color",
          "annotation": "prop",
          "docs": "Transparent background used for blurred states of the arrow icon",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-select-arrow-icon-blur-color",
          "annotation": "prop",
          "docs": "Color applied to the arrow icon in blurred states",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-select-arrow-icon-color",
          "annotation": "prop",
          "docs": "Default arrow icon color",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-select-arrow-icon-hover-background-color",
          "annotation": "prop",
          "docs": "Background color of the arrow icon when hovered",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-select-arrow-icon-hover-color",
          "annotation": "prop",
          "docs": "Color of the arrow icon when hovered",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-select-ring",
          "annotation": "prop",
          "docs": "Ring applied around the select at rest; hover and focus draw a 3px ring in the variant color",
          "visibility": "public"
        },
        {
          "name": "--mds-input-select-shadow",
          "annotation": "prop",
          "docs": "Shadow applied to the select component",
          "visibility": "public"
        },
        {
          "name": "--mds-input-select-variant-color-rgb",
          "annotation": "prop",
          "docs": "Base color used to derive all select component visual states",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `option` `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "select",
          "docs": "The select HTML element"
        },
        {
          "name": "tip-top",
          "docs": "Selects the verbose status of input on top of element"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-input-tip",
        "mds-input-tip-item"
      ],
      "dependencyGraph": {
        "mds-input-select": [
          "mds-icon",
          "mds-input-tip",
          "mds-input-tip-item"
        ],
        "mds-input-tip-item": [
          "mds-text"
        ]
      },
      "storybook": "form-select--docs"
    },
    {
      "filePath": "src/components/mds-input-switch/mds-input-switch.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-switch",
      "readme": "# mds-input-switch\n\n\n\nThis 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.\n",
      "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": "- Put text string or elements here"
        },
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-switch>` web component is the binary/selectable input control of the Magma Design System. A single tag covers three native primitives - it renders as a toggle switch by default and re-renders as a native `checkbox` or `radio` depending on `type`, wrapping `<input type=\"checkbox|radio\">` with form association, accessibility, and iconography handled natively.\n\n#### Semantic Behavior\n\n- **Type-driven rendering**: `type` selects the visual primitive. `'switch'` (default) renders the sliding toggle, whose knob slides only when `checked` changes (by the user or by code) and is already in place on load or when shown again after being hidden; `'checkbox'` and `'radio'` render the corresponding native control.\n- **Form association**: The host participates in a `<form>` natively - the form value is `value` while `checked` and enabled, nothing otherwise, and it follows every change of `checked`, `value` or `disabled`, by the user or by code. A form reset brings back the `checked` state of load, like a native input.\n- **Radio grouping**: When `type=\"radio\"`, checking one instance, by the user or by code, unchecks the other radios with the same `name` in the same form (or, outside a form, in the same document or shadow root), as native radios do, so the group submits one value. A radio without a `name` is a group of its own.\n- **Checked / indeterminate**: `checked` reflects selection; toggling it always clears `indeterminate`. The indeterminate glyph is only meaningful for `checkbox`.\n- **Disabled state**: Blocks interaction and clears the submitted form value while disabled. A disabled `<fieldset>` around the component does the same, as it does a native input.\n- **Keyboard operable**: The control responds to keyboard activation in addition to pointer clicks.\n- **Accessibility**: The control exposes a localized accessible label (\"select\"/\"unselect\") derived from slotted text (it/en/es/el).\n- **Change event**: `mdsInputSwitchChange` fires with `{ name, checked, value }` whenever the user changes the selection; setting `checked` from code does not emit it.\n- **Default slot**: The default slot is the visible text label rendered beside the control; when empty, the label region collapses.\n\n#### Properties & Visual Configurations\n\n- **`type`** is the primary configuration: pick `'switch'` for on/off settings, `'checkbox'` for multi-select selections, `'radio'` for mutually exclusive choices within a `name` group.\n- **`explicit`** applies only to `type=\"switch\"`: it surfaces a check/remove glyph inside the toggle knob so the on/off state is readable without relying on color alone.\n- **`size`** (`'sm'` / `'md'` / `'lg'`) scales the toggle and is honored only when `type=\"switch\"`.\n- **`icon`** overrides the default checked glyph (checkbox/radio variants); leave empty to use the type's built-in icon set.\n\n#### Other behavioral props\n\n- **`typography`** and **`variant`** style the slotted text label; they map to the shared typography ladders rather than the system tone/variant ladder defined in [`agents/variants.md`](../../../../agents/variants.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-switch>` 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#### Toggle Switch with a Text Label\n\nThe canonical form. Slot a plain text string as the visible label. The component collapses the label region automatically when the slot is empty.\n\n```html\n<mds-input-switch name=\"notifiche\" value=\"1\">Notifiche via e-mail</mds-input-switch>\n```\n\n#### Pre-selected and Disabled States\n\nUse `checked` to pre-select the control on load. Use `disabled` to block interaction. Both are boolean attributes - remove them to turn them off; never write `checked=\"false\"` or `disabled=\"false\"`.\n\n```html\n<!-- Pre-selected -->\n<mds-input-switch name=\"newsletter\" value=\"1\" checked>Iscrizione alla newsletter</mds-input-switch>\n\n<!-- Disabled and unchecked -->\n<mds-input-switch name=\"sms\" value=\"1\" disabled>Notifiche via SMS (non disponibili)</mds-input-switch>\n\n<!-- Disabled and checked -->\n<mds-input-switch name=\"email\" value=\"1\" checked disabled>Notifiche via e-mail (obbligatorio)</mds-input-switch>\n```\n\n#### Explicit Icon Mode\n\nAdd `explicit` to surface a check/remove glyph inside the toggle knob. This makes the on/off state readable without relying on color alone, which is required in high-contrast contexts. Only effective when `type=\"switch\"`.\n\n```html\n<mds-input-switch name=\"modalita\" value=\"1\" explicit>Modalita scura</mds-input-switch>\n<mds-input-switch name=\"animazioni\" value=\"1\" explicit checked>Animazioni ridotte</mds-input-switch>\n```\n\n#### Sizing the Toggle\n\nUse the `size` prop to scale the switch knob. Sizing only applies to `type=\"switch\"`.\n\n```html\n<mds-input-switch name=\"sm\" value=\"1\" size=\"sm\">Piccolo</mds-input-switch>\n<mds-input-switch name=\"md\" value=\"1\" size=\"md\">Medio (predefinito)</mds-input-switch>\n<mds-input-switch name=\"lg\" value=\"1\" size=\"lg\">Grande</mds-input-switch>\n```\n\n#### Checkbox Type\n\nSet `type=\"checkbox\"` for multi-select use cases. The component renders the standard checkbox glyph set; `indeterminate` shows the partial-selection glyph, which is meaningful only for this type.\n\n```html\n<!-- Basic checkboxes -->\n<mds-input-switch type=\"checkbox\" name=\"opt\" value=\"a\">Opzione A</mds-input-switch>\n<mds-input-switch type=\"checkbox\" name=\"opt\" value=\"b\" checked>Opzione B</mds-input-switch>\n\n<!-- Indeterminate (parent of a mixed selection) -->\n<mds-input-switch type=\"checkbox\" name=\"tutti\" value=\"all\" indeterminate>Seleziona tutto</mds-input-switch>\n```\n\n#### Radio Group\n\nSet `type=\"radio\"` and share the same `name` across instances. Checking one automatically unchecks the others with the same name in the same form, and the form submits the value of the checked one.\n\n```html\n<mds-input-switch type=\"radio\" name=\"piano\" value=\"base\">Piano base</mds-input-switch>\n<mds-input-switch type=\"radio\" name=\"piano\" value=\"pro\" checked>Piano Pro</mds-input-switch>\n<mds-input-switch type=\"radio\" name=\"piano\" value=\"enterprise\">Piano Enterprise</mds-input-switch>\n```\n\n#### Form Participation\n\n`<mds-input-switch>` is form-associated. The form receives `value` when `checked`; if unchecked, no value is submitted. A form reset brings back the `checked` state each switch had at load.\n\n```html\n<form action=\"/preferenze\" method=\"post\">\n  <mds-input-switch name=\"notifiche\" value=\"attivo\" checked>Notifiche push</mds-input-switch>\n  <mds-input-switch name=\"newsletter\" value=\"attivo\">Newsletter settimanale</mds-input-switch>\n  <mds-button type=\"submit\" label=\"Salva preferenze\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\n#### Listening to Changes\n\nListen for the `mdsInputSwitchChange` event - it carries `{ name, checked, value }` in `event.detail`. Do not listen for the native `change` event; it does not bubble out of Shadow DOM reliably.\n\n```html\n<mds-input-switch id=\"toggle\" name=\"tema\" value=\"scuro\">Tema scuro</mds-input-switch>\n\n<script>\n  document.querySelector('#toggle').addEventListener('mdsInputSwitchChange', (e) => {\n    console.log(e.detail.name, e.detail.checked, e.detail.value);\n  });\n</script>\n```\n\n#### Custom Checked Icon (Checkbox / Radio)\n\nSet `icon` to any slug from the Magma icon library to override the default checked glyph for `type=\"checkbox\"` or `type=\"radio\"`. Leave `icon` empty to use the built-in glyph.\n\n```html\n<mds-input-switch type=\"checkbox\" name=\"preferito\" value=\"1\" icon=\"mi/baseline/star\" checked>\n  Segna come preferito\n</mds-input-switch>\n```\n\n#### Typography Customization of the Label\n\n`typography` and `variant` style the slotted text label and map to the shared typography ladder - not the tone/variant system.\n\n```html\n<mds-input-switch name=\"opzione\" value=\"1\" typography=\"caption\">Testo piccolo</mds-input-switch>\n<mds-input-switch name=\"lettura\" value=\"1\" typography=\"paragraph\" variant=\"read\">Testo di lettura</mds-input-switch>\n```\n\n#### Styling Customization\n\n`<mds-input-switch>` has no public CSS custom property and no shadow part: the box and the toggle take their checked colour from the accent role ([`agents/color.md`](../../../../agents/color.md)), so themes and dark mode recolour them without overrides. Size the toggle with `size`, set the checked icon with `icon` or `explicit` and the label with `typography`, as in the patterns above.\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-switch>`. 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 Set Boolean Props to the String \"false\"\n\n`checked`, `disabled`, `explicit`, and `indeterminate` are boolean attributes and `mds-input-switch` is form-associated: as on a native control, any value turns them on, `\"false\"` included, so this markup renders a checked, disabled switch. Remove the attribute entirely to turn it off.\n\n```html\n<!-- INCORRECT -->\n<mds-input-switch checked=\"false\" disabled=\"false\">Notifiche</mds-input-switch>\n\n<!-- CORRECT -->\n<mds-input-switch>Notifiche</mds-input-switch>\n```\n\n#### Do Not Use a Native `<input>` Instead of `<mds-input-switch>`\n\nReplacing the component with a raw `<input type=\"checkbox\">` or `<input type=\"radio\">` bypasses the design system's theming, accessibility defaults, label layout, and form integration.\n\n```html\n<!-- INCORRECT -->\n<label>\n  <input type=\"checkbox\" name=\"notifiche\" value=\"1\"> Notifiche via e-mail\n</label>\n\n<!-- CORRECT -->\n<mds-input-switch name=\"notifiche\" value=\"1\">Notifiche via e-mail</mds-input-switch>\n```\n\n#### Do Not Use `explicit` or `size` with `type=\"checkbox\"` or `type=\"radio\"`\n\n`explicit` surfaces a glyph inside the switch knob and `size` scales the knob - both are only honored when `type=\"switch\"`. They are silently ignored on other types.\n\n```html\n<!-- INCORRECT -->\n<mds-input-switch type=\"checkbox\" name=\"opt\" value=\"1\" explicit size=\"lg\">Opzione</mds-input-switch>\n\n<!-- CORRECT -->\n<mds-input-switch type=\"checkbox\" name=\"opt\" value=\"1\">Opzione</mds-input-switch>\n\n<!-- correct use of explicit and size: only with type=\"switch\" -->\n<mds-input-switch type=\"switch\" name=\"opt\" value=\"1\" explicit size=\"lg\">Opzione</mds-input-switch>\n```\n\n#### Do Not Listen for Native `change` Instead of `mdsInputSwitchChange`\n\nThe component stops and prevents the native `change` event internally. Listen for the documented `mdsInputSwitchChange` event, which carries `{ name, checked, value }` in `event.detail`.\n\n```html\n<!-- INCORRECT -->\n<mds-input-switch id=\"toggle\" name=\"tema\" value=\"scuro\">Tema scuro</mds-input-switch>\n<script>\n  document.querySelector('#toggle').addEventListener('change', handler);\n</script>\n\n<!-- CORRECT -->\n<mds-input-switch id=\"toggle\" name=\"tema\" value=\"scuro\">Tema scuro</mds-input-switch>\n<script>\n  document.querySelector('#toggle').addEventListener('mdsInputSwitchChange', (e) => {\n    console.log(e.detail.checked);\n  });\n</script>\n```\n\n#### Do Not Use `indeterminate` on `type=\"switch\"` or `type=\"radio\"`\n\nThe indeterminate glyph (`indeterminate-check-box`) is part of the checkbox icon variant only. Setting `indeterminate` on a switch has no visual effect, on a radio it blanks the radio glyph, and on both it misleads consumers about the control state.\n\n```html\n<!-- INCORRECT -->\n<mds-input-switch type=\"switch\" name=\"opt\" value=\"1\" indeterminate>Tutti i permessi</mds-input-switch>\n\n<!-- CORRECT -->\n<mds-input-switch type=\"checkbox\" name=\"tutti\" value=\"all\" indeterminate>Seleziona tutto</mds-input-switch>\n```\n\n#### Do Not Omit `name` in a Radio Group\n\nWithout a shared `name`, the radios do not form a group: as with native radios, each nameless radio is a group of its own, so several can be checked at once, and none of them is submitted with the form.\n\n```html\n<!-- INCORRECT -->\n<mds-input-switch type=\"radio\" value=\"a\" checked>Opzione A</mds-input-switch>\n<mds-input-switch type=\"radio\" value=\"b\">Opzione B</mds-input-switch>\n\n<!-- CORRECT -->\n<mds-input-switch type=\"radio\" name=\"scelta\" value=\"a\" checked>Opzione A</mds-input-switch>\n<mds-input-switch type=\"radio\" name=\"scelta\" value=\"b\">Opzione B</mds-input-switch>\n```\n\n#### Do Not Customize with Undocumented CSS Parts or Internal Selectors\n\n`<mds-input-switch>` has no public CSS custom property and no shadow part: style it with its `size`, `icon`, `explicit` and `typography` props, and let the checked colour follow the accent role. Targeting shadow internals via `::part()` on undocumented parts or via `>>>` will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-input-switch >>> .switch {\n  border-radius: 4px;\n}\nmds-input-switch::part(toggle) {\n  box-shadow: none;\n}\n```\n\n```html\n<!-- CORRECT -->\n<mds-input-switch name=\"notifiche\" value=\"1\" size=\"lg\" checked>Notifiche</mds-input-switch>\n```\n"
      },
      "props": [
        {
          "name": "autofocus",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "autofocus",
          "reflectToAttr": true,
          "docs": "Sets or returns whether a checkbox should automatically\nget focus when the page loads",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "checked",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "checked",
          "reflectToAttr": true,
          "docs": "Specifies that an `<input>` element should be pre-selected\nwhen the page loads (for `type=\"checkbox\"` or `type=\"radio\"`)",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Sets or returns whether a checkbox is disabled, or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "explicit",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "explicit",
          "reflectToAttr": true,
          "docs": "Sets if the type switch mode shows explicit icons",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "The checked icon displayed",
          "docsTags": [
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "indeterminate",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "indeterminate",
          "reflectToAttr": true,
          "docs": "Sets or returns the indeterminate state of the checkbox",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Specifies the name of an `<input>` element",
          "docsTags": [
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\"",
          "complexType": {
            "original": "InputSwitchSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\"",
            "references": {
              "InputSwitchSizeType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-input-switch/meta/types.ts::InputSwitchSizeType",
                "referenceLocation": "InputSwitchSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the size for the switch toggle, it works only if attribute 'type' is set to 'switch'",
          "docsTags": [
            {
              "name": "default",
              "text": "'md'"
            }
          ],
          "default": "'md'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "type",
          "type": "\"checkbox\" | \"radio\" | \"switch\"",
          "complexType": {
            "original": "InputSwitchType",
            "resolved": "\"checkbox\" | \"radio\" | \"switch\"",
            "references": {
              "InputSwitchType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-input-switch/meta/types.ts::InputSwitchType",
                "referenceLocation": "InputSwitchType"
              }
            }
          },
          "mutable": false,
          "attr": "type",
          "reflectToAttr": true,
          "docs": "Specifies switch type: switch (default), checkbox and radio",
          "docsTags": [
            {
              "name": "default",
              "text": "'switch'"
            }
          ],
          "default": "'switch'",
          "values": [
            {
              "value": "checkbox",
              "type": "string"
            },
            {
              "value": "radio",
              "type": "string"
            },
            {
              "value": "switch",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"caption\" | \"detail\" | \"label\" | \"option\" | \"paragraph\" | \"tip\" | undefined",
          "complexType": {
            "original": "TypographyInfoType | TypographyReadType",
            "resolved": "\"caption\" | \"detail\" | \"label\" | \"option\" | \"paragraph\" | \"tip\" | undefined",
            "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 font 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"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "Specifies the value of the input element",
          "docsTags": [
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"code\" | \"info\" | \"read\" | \"title\" | undefined",
          "complexType": {
            "original": "TypographyVariants",
            "resolved": "\"code\" | \"info\" | \"read\" | \"title\" | undefined",
            "references": {
              "TypographyVariants": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyVariants",
                "referenceLocation": "TypographyVariants"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the variant for `typography`",
          "docsTags": [],
          "values": [
            {
              "value": "code",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "read",
              "type": "string"
            },
            {
              "value": "title",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsInputSwitchChange",
          "detail": "MdsInputSwitchEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsInputSwitchEventDetail",
            "resolved": "MdsInputSwitchEventDetail",
            "references": {
              "MdsInputSwitchEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-input-switch/meta/event-detail.ts::MdsInputSwitchEventDetail",
                "referenceLocation": "MdsInputSwitchEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the value changes",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-input-switch-animation-timing-adjust",
          "annotation": "prop",
          "docs": "Multiplier used to fine-tune animation timing",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-animation-timing-function",
          "annotation": "prop",
          "docs": "Easing function applied to switch animations",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-box-color-disabled-checked",
          "annotation": "prop",
          "docs": "Background color of the switch box when disabled and checked",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-box-color-disabled-unchecked",
          "annotation": "prop",
          "docs": "Background color of the switch box when disabled and unchecked",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-box-color-enabled-checked",
          "annotation": "prop",
          "docs": "Background color of the switch box when enabled and checked",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-box-color-enabled-unchecked",
          "annotation": "prop",
          "docs": "Background color of the switch box when enabled and unchecked",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-box-padding",
          "annotation": "prop",
          "docs": "Effective padding used for the switch box",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-box-padding-lg",
          "annotation": "prop",
          "docs": "Padding of the switch container (large size)",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-box-padding-md",
          "annotation": "prop",
          "docs": "Padding of the switch container (medium size)",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-box-padding-sm",
          "annotation": "prop",
          "docs": "Padding of the switch container (small size)",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-duration",
          "annotation": "prop",
          "docs": "Duration of switch state transitions",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-icon-color-checked",
          "annotation": "prop",
          "docs": "Icon color when checked",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-icon-color-checked-disabled",
          "annotation": "prop",
          "docs": "Icon color when checked and disabled",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-icon-color-indeterminate",
          "annotation": "prop",
          "docs": "Icon color for indeterminate state",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-icon-color-indeterminate-disabled",
          "annotation": "prop",
          "docs": "Icon color for indeterminate state when disabled",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-icon-color-unchecked",
          "annotation": "prop",
          "docs": "Icon color when unchecked",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-icon-color-unchecked-disabled",
          "annotation": "prop",
          "docs": "Icon color when unchecked and disabled",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-icon-explicit-color",
          "annotation": "prop",
          "docs": "Explicitly forced icon color",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-toggle-color-disabled-checked",
          "annotation": "prop",
          "docs": "Toggle color when disabled and checked",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-toggle-color-disabled-unchecked",
          "annotation": "prop",
          "docs": "Toggle color when disabled and unchecked",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-toggle-color-enabled-checked",
          "annotation": "prop",
          "docs": "Toggle color when enabled and checked",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-toggle-color-enabled-unchecked",
          "annotation": "prop",
          "docs": "Toggle color when enabled and unchecked",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-toggle-container-size",
          "annotation": "prop",
          "docs": "Computed size of the toggle container",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-toggle-size",
          "annotation": "prop",
          "docs": "Effective toggle size currently in use",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-toggle-size-lg",
          "annotation": "prop",
          "docs": "Toggle size for large variant",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-toggle-size-md",
          "annotation": "prop",
          "docs": "Toggle size for medium variant",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-switch-toggle-size-sm",
          "annotation": "prop",
          "docs": "Toggle size for small variant",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Put text string or elements here"
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-table-header",
        "mds-table-row"
      ],
      "dependencies": [
        "mds-icon",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-input-switch": [
          "mds-icon",
          "mds-text"
        ],
        "mds-table-header": [
          "mds-input-switch"
        ],
        "mds-table-row": [
          "mds-input-switch"
        ]
      },
      "storybook": "form-switch--docs"
    },
    {
      "filePath": "src/components/mds-input-tip/mds-input-tip.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-tip",
      "readme": "# mds-input-tip\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `mds-input-tip-item` elements or `components` to this slot."
        },
        {
          "name": "parent",
          "text": "mds-input mds-input-date mds-input-select"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-tip>` web component is the floating helper container of the Magma Design System input family: it overlays an input field and carries supplementary content (slotted `mds-input-tip-item` chips: status labels, hints, counters) that slides into place when the field becomes active. It is a presentational compound child positioned against its parent input rather than a standalone control.\n\n#### Semantic Behavior\n\n- **Floating overlay**: The tip floats over the parent input's edge without intercepting interaction (`pointer-events: none`, which `mds-input-tip-item` keeps too).\n- **Active expansion**: Setting `active` slides a bottom tip onto the edge of the input; clearing it collapses the tip back flush with the input. A top tip stays where it stands, on the top border. It does not expand the items: each `mds-input-tip-item` shows its text only when its own `expanded` is set.\n- **On the top border**: A top tip stands on the top border of its field, half outside, so that it never covers the button at the end of the field. It keeps clear of the rounded corner by the radius of the field, which the field passes down to it, plus a margin, and sits on the straight part of the border.\n- **Empty collapse**: When the host has no slotted content it is hidden entirely, so an unused tip occupies no space.\n- **Default slot is content**: The single default slot carries the tip's arbitrary children; there are no named slots, events, form association, or focus management of its own.\n\n#### Properties & Visual Configurations\n\n- **`active`** drives the expanded vs. collapsed state and is normally toggled by the parent input in response to focus, not set manually.\n- **`position`** selects which edge of the input the tip anchors to: `'top'` (default) stands on the top border of the field, half outside, and stays there on focus; `'bottom'` sits inside the bottom edge and slides onto it when `active`.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-tip>` 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-input-tip>` is an internal compound child used inside [`mds-input`](../mds-input/AGENTS.md), [`mds-input-date`](../mds-input-date/AGENTS.md), and [`mds-input-select`](../mds-input-select/AGENTS.md). It is not meant for standalone use. The patterns below show what the parent components render internally, which is useful when building a custom input wrapper that needs the same behavior.\n\n#### Status Chips Above the Field (position=\"top\")\n\nPosition the tip on the top border of the input with `position=\"top\"` (the default), half outside, where it never covers the button at the end of the field. Slot [`mds-input-tip-item`](../mds-input-tip-item/AGENTS.md) children for each status badge to show. The parent inputs pass down the radius of their field, so that the tip keeps clear of its rounded corner. The top tip stays on the border when the field is focused; each item shows its label only when its own `expanded` is set, which the parent inputs set together with `active`.\n\n```html\n<div style=\"position: relative;\">\n  <mds-input-tip position=\"top\" active>\n    <mds-input-tip-item variant=\"required\" expanded></mds-input-tip-item>\n  </mds-input-tip>\n  <input type=\"text\" placeholder=\"Campo obbligatorio\" />\n</div>\n```\n\n#### Hint and Counter Below the Field (position=\"bottom\")\n\nUse `position=\"bottom\"` to anchor the tip below the input. This is the canonical placement for inline helper text and character-count feedback.\n\n```html\n<div style=\"position: relative;\">\n  <mds-input-tip position=\"bottom\" active>\n    <mds-input-tip-item variant=\"text\" expanded>\n      Inserisci almeno 8 caratteri\n    </mds-input-tip-item>\n    <mds-input-tip-item variant=\"count-incomplete\" expanded>\n      3 / 8\n    </mds-input-tip-item>\n  </mds-input-tip>\n  <input type=\"text\" />\n</div>\n```\n\n#### Toggling the Active State on Focus\n\nDrive `active`, and the `expanded` of the items that should open on focus, from a focus/blur handler to animate the tip in and out. Setting `active` slides a bottom tip onto the edge of the input, and removing it (or leaving it unset) collapses it back flush with it; a top tip stays on the border, and only its items expand.\n\n```html\n<div style=\"position: relative;\" id=\"wrapper\">\n  <mds-input-tip position=\"top\" id=\"tip\">\n    <mds-input-tip-item variant=\"required\"></mds-input-tip-item>\n  </mds-input-tip>\n  <input\n    type=\"text\"\n    id=\"field\"\n    placeholder=\"Nome utente\"\n  />\n</div>\n\n<script>\n  const field = document.getElementById('field');\n  const tip   = document.getElementById('tip');\n  const item  = tip.querySelector('mds-input-tip-item');\n  field.addEventListener('focus', () => { tip.active = true; item.expanded = true; });\n  field.addEventListener('blur',  () => { tip.active = undefined; item.expanded = undefined; });\n</script>\n```\n\n#### Disabled and Read-only State Chips\n\nWhen the parent input is disabled or read-only, pass the matching `variant` to show a system-translated label. The `expanded` prop on the item keeps it permanently visible even without focus.\n\n```html\n<div style=\"position: relative;\">\n  <mds-input-tip position=\"top\">\n    <mds-input-tip-item variant=\"disabled\" expanded></mds-input-tip-item>\n  </mds-input-tip>\n  <input type=\"text\" disabled placeholder=\"Campo disabilitato\" />\n</div>\n```\n\n#### Required-field Success Feedback\n\nSwitch the `<mds-input-tip-item>` variant to `required-success` once the field passes validation. The item renders a checkmark icon instead of the \"obbligatorio\" label.\n\n```html\n<div style=\"position: relative;\">\n  <mds-input-tip position=\"top\" active>\n    <mds-input-tip-item variant=\"required-success\" expanded></mds-input-tip-item>\n  </mds-input-tip>\n  <input type=\"text\" value=\"Valore valido\" />\n</div>\n```\n\n#### Multiple Tip Items in One Container\n\nSlot several `<mds-input-tip-item>` elements inside a single `<mds-input-tip>`. The container lays them out in a row and hides itself automatically when it has no children.\n\n```html\n<div style=\"position: relative;\">\n  <mds-input-tip position=\"bottom\" active>\n    <mds-input-tip-item variant=\"text\" expanded>\n      Solo lettere e numeri\n    </mds-input-tip-item>\n    <mds-input-tip-item variant=\"count-almost\" expanded>\n      18 / 20\n    </mds-input-tip-item>\n  </mds-input-tip>\n  <input type=\"text\" />\n</div>\n```\n\n#### CSS Customization\n\nStyle the tip only through its public `--mds-input-tip-background` CSS custom property; its offsets come from `position` and `active`. Set it on the host or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)) so dark mode keeps working.\n\n```css\n.custom-input-wrapper mds-input-tip {\n  --mds-input-tip-background: rgb(var(--magma-surface-inverse));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-tip>`. 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-input-tip as a Standalone Tooltip\n\n`<mds-input-tip>` is an internal compound child of [`mds-input`](../mds-input/AGENTS.md), [`mds-input-date`](../mds-input-date/AGENTS.md), and [`mds-input-select`](../mds-input-select/AGENTS.md). It relies on absolute positioning inside a relatively-positioned input shell; outside that context it has no anchor. Use [`mds-tooltip`](../mds-tooltip/AGENTS.md) or [`mds-help`](../mds-help/AGENTS.md) for standalone floating hints.\n\n```html\n<!-- INCORRECT -->\n<mds-input-tip active>\n  <mds-input-tip-item variant=\"text\">Suggerimento generico</mds-input-tip-item>\n</mds-input-tip>\n\n<!-- CORRECT -->\n<mds-help>Suggerimento generico</mds-help>\n```\n\n#### Do Not Put Plain Text Directly in the Default Slot\n\nThe default slot of `<mds-input-tip>` accepts only [`mds-input-tip-item`](../mds-input-tip-item/AGENTS.md) elements. Plain text nodes are not styled or accessible. Use `<mds-input-tip-item variant=\"text\">` to carry freeform hint copy.\n\n```html\n<!-- INCORRECT -->\n<mds-input-tip position=\"bottom\" active>\n  Inserisci la tua email aziendale\n</mds-input-tip>\n\n<!-- CORRECT -->\n<mds-input-tip position=\"bottom\" active>\n  <mds-input-tip-item variant=\"text\">\n    Inserisci la tua email aziendale\n  </mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Do Not Set active=\"false\" to Collapse the Tip\n\n`active` is a boolean attribute: remove it (or set the prop to `undefined`) to collapse. A string value is fragile: `\"false\"` is read as `false` on this component, but the attribute stays on the element until the component renders (attribute selectors and scripts reading it see it set). Never write a boolean as a string.\n\n```html\n<!-- INCORRECT -->\n<mds-input-tip position=\"top\" active=\"false\">\n  <mds-input-tip-item variant=\"required\"></mds-input-tip-item>\n</mds-input-tip>\n\n<!-- CORRECT -->\n<mds-input-tip position=\"top\">\n  <mds-input-tip-item variant=\"required\"></mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Do Not Use an Undocumented position Value\n\n`position` accepts only `\"top\"` and `\"bottom\"`. Any other value (e.g. `\"left\"`, `\"right\"`) is not typed and has no matching CSS rule; the tip falls back to the initial-value behavior silently.\n\n```html\n<!-- INCORRECT -->\n<mds-input-tip position=\"left\" active>\n  <mds-input-tip-item variant=\"text\">Aiuto</mds-input-tip-item>\n</mds-input-tip>\n\n<!-- CORRECT -->\n<mds-input-tip position=\"bottom\" active>\n  <mds-input-tip-item variant=\"text\">Aiuto</mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Do Not Slot Non-tip-item Elements for Custom Styles\n\nSlotting arbitrary HTML or other Magma components (e.g. `<mds-badge>`, `<span>`) bypasses the item's own layout, color tokens, and border-radius joining logic. Always wrap content in `<mds-input-tip-item>`.\n\n```html\n<!-- INCORRECT -->\n<mds-input-tip position=\"bottom\" active>\n  <span style=\"color: red;\">Testo personalizzato</span>\n</mds-input-tip>\n\n<!-- CORRECT -->\n<mds-input-tip position=\"bottom\" active>\n  <mds-input-tip-item variant=\"text\">Testo personalizzato</mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Do Not Override Positioning via Inline Styles\n\nThe tip is absolutely positioned by its own CSS, driven by its `position` and `active` props. Setting `position`, `top`, `left`, or `right` inline breaks the animation transform and the active-state offset calculation.\n\n```css\n/* INCORRECT */\nmds-input-tip {\n  position: relative;\n  top: 10px;\n}\n```\n\n```html\n<!-- CORRECT -->\n<div style=\"position: relative;\">\n  <mds-input-tip position=\"bottom\" active>\n    <mds-input-tip-item variant=\"text\" expanded>Inserisci almeno 8 caratteri</mds-input-tip-item>\n  </mds-input-tip>\n  <input type=\"text\" />\n</div>\n```\n"
      },
      "props": [
        {
          "name": "active",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "active",
          "reflectToAttr": true,
          "docs": "Moves the bottom tip onto the edge of the input, as the parent input does while it has the\nfocus; the top tip stays on the border of the field. It does not expand the items: each\n`mds-input-tip-item` opens on its own `expanded`",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "position",
          "type": "\"bottom\" | \"top\" | undefined",
          "complexType": {
            "original": "InputTipPositionType",
            "resolved": "\"bottom\" | \"top\" | undefined",
            "references": {
              "InputTipPositionType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-input-tip/meta/types.ts::InputTipPositionType",
                "referenceLocation": "InputTipPositionType"
              }
            }
          },
          "mutable": false,
          "attr": "position",
          "reflectToAttr": true,
          "docs": "Specifies the position of the element relative to its container: `top` stands on the top\nborder of the field, half outside, clear of its corner by the radius the field passes down plus\na margin; `bottom` sits inside the bottom edge",
          "docsTags": [
            {
              "name": "default",
              "text": "'top'"
            }
          ],
          "default": "'top'",
          "values": [
            {
              "value": "bottom",
              "type": "string"
            },
            {
              "value": "top",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-input-tip-active-translate",
          "annotation": "prop",
          "docs": "Transform applied to the bottom tip when active",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-tip-background",
          "annotation": "prop",
          "docs": "Background color of the input tip",
          "visibility": "public"
        },
        {
          "name": "--mds-input-tip-field-radius",
          "annotation": "prop",
          "docs": "The corner radius of the field the tip stands on: the top tip keeps clear of the corner by it, plus a margin",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-tip-horizontal-offset",
          "annotation": "prop",
          "docs": "Default horizontal offset of the bottom tip",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-tip-horizontal-offset-focused",
          "annotation": "prop",
          "docs": "Horizontal offset of the bottom tip when the input is focused",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-tip-vertical-offset",
          "annotation": "prop",
          "docs": "Vertical offset of the bottom tip",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-input-tip-item` elements or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-input",
        "mds-input-date",
        "mds-input-select"
      ],
      "dependencies": [],
      "dependencyGraph": {
        "mds-input": [
          "mds-input-tip"
        ],
        "mds-input-date": [
          "mds-input-tip"
        ],
        "mds-input-select": [
          "mds-input-tip"
        ]
      },
      "storybook": "form-input-tip--docs"
    },
    {
      "filePath": "src/components/mds-input-tip-item/mds-input-tip-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-tip-item",
      "readme": "# mds-input-tip-item\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "parent",
          "text": "mds-input-tip"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-tip-item>` web component is a single contextual hint row rendered inside the [`<mds-input-tip>`](../mds-input-tip/AGENTS.md) container. It represents one validation/status message of a form field (required, read-only, disabled, character count, or free text) and is orchestrated by the input components (`<mds-input>`, `<mds-input-date>`, `<mds-input-select>`) that own the tip; it has no standalone HTML equivalent.\n\n#### Semantic Behavior\n\n- **Compound child only**: It must be a direct slot child of `<mds-input-tip>` and is not used standalone; the host input decides which items exist and toggles their `expanded` state.\n- **Variant drives the entire render**: The `variant` is not a style modifier but a content switch - each value produces a different body (slotted text, a localized status label, or the `done` success icon), so changing `variant` changes what the item shows, not just how it looks.\n- **Self-localized labels**: For `required`, `readonly`, and `disabled` the visible text comes from the component's own i18n dictionary (en/it/es/el); these variants ignore slotted content. `text` and the `count-*` variants instead render the default slot provided by the parent.\n- **Expanded toggling**: `expanded` is driven by the parent (often bound to the field's focus state).\n- **No interactivity**: It carries no role, ARIA state, focus handling, or emitted events - it is a passive display row whose state is fully driven from above.\n\n#### Properties & Visual Configurations\n\n- **`variant`** is the only meaningful prop and selects both the message type and its source of text. Use `required` / `required-success` for required-field feedback (the success value swaps the label for a checkmark icon), `readonly` and `disabled` for field-state notices (auto-labeled from the dictionary), `text` for an arbitrary slotted hint, and the `count-*` family (`count-empty`, `count-incomplete`, `count-almost`, `count-almost-full`, `count-full`) for character-count feedback whose label text is slotted in by the parent. The full enumerated list lives in [`AGENTS.md`](AGENTS.md).\n- **`expanded`** controls the expansion within the tip (collapsed, the item shrinks to a small colored dot without text) and is intended to be driven by the parent rather than set by hand.\n\nIts public styling hooks (`--mds-input-tip-item-background`, `--mds-input-tip-item-color`) are documented in [`AGENTS.md`](AGENTS.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-tip-item>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant system documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Required-Field Hint\n\nThe most common use. Place one `<mds-input-tip-item variant=\"required\">` inside the parent [`<mds-input-tip>`](../mds-input-tip/AGENTS.md) to signal that the field is mandatory. The localized label (\"Required\" / \"Obbligatorio\" / ...) comes from the component's own i18n dictionary - do not slot text.\n\n```html\n<mds-input-tip active>\n  <mds-input-tip-item variant=\"required\" expanded></mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Required Field Satisfied (Success State)\n\nWhen the required condition is met, switch to `variant=\"required-success\"`. The text label is replaced by a checkmark icon - no slot is needed or expected.\n\n```html\n<mds-input-tip active>\n  <mds-input-tip-item variant=\"required-success\" expanded></mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Read-Only and Disabled State Notices\n\nUse `variant=\"readonly\"` or `variant=\"disabled\"` to communicate field-state context. Both are self-labeled from the i18n dictionary and ignore any slotted content.\n\n```html\n<!-- Campo in sola lettura -->\n<mds-input-tip active>\n  <mds-input-tip-item variant=\"readonly\" expanded></mds-input-tip-item>\n</mds-input-tip>\n\n<!-- Campo disabilitato -->\n<mds-input-tip active>\n  <mds-input-tip-item variant=\"disabled\" expanded></mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Arbitrary Hint Text via `variant=\"text\"`\n\nUse `variant=\"text\"` when you need to show a free-form helper message. Slot the text string directly; no nested HTML is accepted.\n\n```html\n<mds-input-tip active>\n  <mds-input-tip-item variant=\"text\" expanded>Inserisci il tuo nome completo</mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Character-Count Feedback\n\nThe `count-*` variants express how full a character-limited field is. The parent input computes the label text and slots it in; you choose the variant that matches the fill stage.\n\n```html\n<mds-input-tip active>\n  <!-- Campo vuoto -->\n  <mds-input-tip-item variant=\"count-empty\" expanded>0 / 100</mds-input-tip-item>\n\n  <!-- In corso, entro i limiti -->\n  <mds-input-tip-item variant=\"count-incomplete\" expanded>42 / 100</mds-input-tip-item>\n\n  <!-- Vicino al limite -->\n  <mds-input-tip-item variant=\"count-almost\" expanded>80 / 100</mds-input-tip-item>\n\n  <!-- Quasi al limite -->\n  <mds-input-tip-item variant=\"count-almost-full\" expanded>95 / 100</mds-input-tip-item>\n\n  <!-- Limite raggiunto -->\n  <mds-input-tip-item variant=\"count-full\" expanded>100 / 100</mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Toggling Visibility with `expanded`\n\nThe `expanded` attribute controls the reveal animation. Drive it from the parent's logic - for example, expand the required hint only while the field is focused. Collapsed, the item shrinks to a small colored dot without text.\n\n```html\n<!-- Espanso: campo focalizzato -->\n<mds-input-tip active>\n  <mds-input-tip-item variant=\"required\" expanded></mds-input-tip-item>\n</mds-input-tip>\n\n<!-- Compresso: campo non focalizzato (rimuovere l'attributo, non impostarlo a false) -->\n<mds-input-tip>\n  <mds-input-tip-item variant=\"required\"></mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Styling Customization\n\nOverride the visual appearance only through its two public CSS custom properties. Set them on the host element or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)) so dark mode keeps working.\n\n```css\n.campo-personalizzato mds-input-tip-item {\n  --mds-input-tip-item-background: rgb(var(--magma-accent-emphasis));\n  --mds-input-tip-item-color: rgb(var(--magma-accent-on-emphasis));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-tip-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 Slot Text into Auto-Labeled Variants\n\n`variant=\"required\"`, `variant=\"readonly\"`, and `variant=\"disabled\"` each produce their own localized label from the internal i18n dictionary. Slotted text is silently ignored for these variants, so any copy inside the element is dead markup.\n\n```html\n<!-- INCORRECT -->\n<mds-input-tip-item variant=\"required\" expanded>Obbligatorio</mds-input-tip-item>\n\n<!-- CORRECT -->\n<mds-input-tip-item variant=\"required\" expanded></mds-input-tip-item>\n```\n\n#### Do Not Slot Content into `required-success`\n\n`variant=\"required-success\"` renders a hardcoded checkmark icon (no text). Any slot content is also silently ignored, just like the auto-labeled variants above.\n\n```html\n<!-- INCORRECT -->\n<mds-input-tip-item variant=\"required-success\" expanded>\n  <mds-icon name=\"mi/baseline/done\"></mds-icon>\n</mds-input-tip-item>\n\n<!-- CORRECT -->\n<mds-input-tip-item variant=\"required-success\" expanded></mds-input-tip-item>\n```\n\n#### Do Not Set `expanded=\"false\"` to Hide the Item\n\n`expanded` is a boolean attribute: remove it entirely to collapse the item. A string value is fragile: `\"false\"` is read as `false` on this component, but the attribute stays on the element until the component renders (attribute selectors and scripts reading it see it set). Never write a boolean as a string.\n\n```html\n<!-- INCORRECT -->\n<mds-input-tip-item variant=\"required\" expanded=\"false\"></mds-input-tip-item>\n\n<!-- CORRECT -->\n<mds-input-tip-item variant=\"required\"></mds-input-tip-item>\n```\n\n#### Do Not Use Outside `<mds-input-tip>`\n\n`<mds-input-tip-item>` is a compound child - it is designed to live as a direct slot child of [`<mds-input-tip>`](../mds-input-tip/AGENTS.md). Used standalone it renders a loose chip with no input to anchor to and nothing driving its state.\n\n```html\n<!-- INCORRECT -->\n<div class=\"hint-area\">\n  <mds-input-tip-item variant=\"text\" expanded>Suggerimento</mds-input-tip-item>\n</div>\n\n<!-- CORRECT -->\n<mds-input-tip active>\n  <mds-input-tip-item variant=\"text\" expanded>Suggerimento</mds-input-tip-item>\n</mds-input-tip>\n```\n\n#### Do Not Put HTML Elements in the Default Slot\n\nThe default slot accepts plain text only (`variant=\"text\"` and the `count-*` variants). The chip is a single truncated line of fixed height: nested elements such as `<span>` or `<strong>` add nothing and can break it.\n\n```html\n<!-- INCORRECT -->\n<mds-input-tip-item variant=\"text\" expanded>\n  <strong>Nota:</strong> massimo 100 caratteri\n</mds-input-tip-item>\n\n<!-- CORRECT -->\n<mds-input-tip-item variant=\"text\" expanded>Nota: massimo 100 caratteri</mds-input-tip-item>\n```\n\n#### Do Not Pierce the Shadow DOM to Change Appearance\n\nThe only supported customization surface is the two public `--mds-input-tip-item-*` CSS custom properties. Targeting internal elements with `::part()`, `>>>`, or undocumented selectors will break on future releases.\n\n```css\n/* INCORRECT */\nmds-input-tip-item >>> .content {\n  border-radius: 0;\n}\nmds-input-tip-item::part(icon) {\n  fill: hotpink;\n}\n\n/* CORRECT */\nmds-input-tip-item {\n  --mds-input-tip-item-background: rgb(var(--magma-accent-emphasis));\n  --mds-input-tip-item-color: rgb(var(--magma-accent-on-emphasis));\n}\n```\n"
      },
      "props": [
        {
          "name": "expanded",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "expanded",
          "reflectToAttr": true,
          "docs": "Specifies if the element is expanded",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"count-almost\" | \"count-almost-full\" | \"count-empty\" | \"count-full\" | \"count-incomplete\" | \"disabled\" | \"readonly\" | \"required\" | \"required-success\" | \"text\" | undefined",
          "complexType": {
            "original": "InputTipItemVariantType",
            "resolved": "\"count-almost\" | \"count-almost-full\" | \"count-empty\" | \"count-full\" | \"count-incomplete\" | \"disabled\" | \"readonly\" | \"required\" | \"required-success\" | \"text\" | undefined",
            "references": {
              "InputTipItemVariantType": {
                "location": "import",
                "path": "@type/input-tip",
                "id": "src/type/input-tip.ts::InputTipItemVariantType",
                "referenceLocation": "InputTipItemVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the variant of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'required'"
            }
          ],
          "default": "'required'",
          "values": [
            {
              "value": "count-almost",
              "type": "string"
            },
            {
              "value": "count-almost-full",
              "type": "string"
            },
            {
              "value": "count-empty",
              "type": "string"
            },
            {
              "value": "count-full",
              "type": "string"
            },
            {
              "value": "count-incomplete",
              "type": "string"
            },
            {
              "value": "disabled",
              "type": "string"
            },
            {
              "value": "readonly",
              "type": "string"
            },
            {
              "value": "required",
              "type": "string"
            },
            {
              "value": "required-success",
              "type": "string"
            },
            {
              "value": "text",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-input-tip-item-background",
          "annotation": "prop",
          "docs": "Sets the background color of the tip item.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-tip-item-color",
          "annotation": "prop",
          "docs": "Sets the text color of the tip item.",
          "visibility": "public"
        },
        {
          "name": "--mds-input-tip-item-icon-color",
          "annotation": "prop",
          "docs": "Sets the icon color fill of the tip item.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-input",
        "mds-input-date",
        "mds-input-select"
      ],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-input-tip-item": [
          "mds-text"
        ],
        "mds-input": [
          "mds-input-tip-item"
        ],
        "mds-input-date": [
          "mds-input-tip-item"
        ],
        "mds-input-select": [
          "mds-input-tip-item"
        ]
      },
      "storybook": "form-input-tip-item--docs"
    },
    {
      "filePath": "src/components/mds-input-upload/mds-input-upload.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-upload",
      "readme": "# mds-input-upload\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "category",
          "text": "forms"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-input-upload>` web component is the Magma Design System file-upload control. It wraps a hidden native `<input type=\"file\">` in a drag-and-drop drop zone with progress, per-file previews, validation and optional sorting, exposing the selected files to a surrounding `<form>` through form association.\n\n#### Semantic Behavior\n\n- **Form association**: Like a native `<input type=\"file\" multiple>`, the form submits every accepted file under `name`, one entry per file, in the order they were added; rejected files are not submitted, and without `name` nothing is. Post the form as `multipart/form-data` to send the file contents. A form reset clears every selected file.\n- **Disabled fieldset**: A disabled `<fieldset>` around the component disables it as `disabled` does, like a native control: no file can be added or removed and the files are left out of the form, until the fieldset is enabled.\n- **Validity reporting**: Per-file errors are reported as native validity flags - too many files, oversize, or wrong type - and the joined messages become the validation message.\n- **Drag-and-drop**: The drop zone reacts to drag events; on dragenter the prompt text swaps to a drag hint, restoring on dragleave or drop.\n- **Per-file validation**: Each added file is checked against `accept` (MIME, wildcard MIME, or extension), `maxFileSize`, and `maxFiles`; valid files render as success previews, invalid ones render as error previews with a localized message and are excluded from the form value.\n- **Change event**: `mdsInputUploadChange` fires with the current valid `FileList` (or `null`) on every add, cancel, or reset.\n- **Imperative API**: Exposes `getFiles()`, `getFilesError()`, and `reset()` methods for host-driven control.\n- **Localization**: All UI strings resolve against the host language (el / en / es / it).\n\n#### Properties & Visual Configurations\n\n- **`accept`** declares the allowed file types as a comma-separated list of MIME types, wildcard MIME types (e.g. `image/*`), or extensions; it both filters the native picker and drives the human-readable extension hint shown to the user.\n- **`maxFileSize`** caps the size of any single file in MB (default `20`); files above it are rejected with a size error.\n- **`maxFiles`** caps how many files may be uploaded (default `1`) and enables multi-file selection when greater than one.\n- **`disabled`** disables the component, like a disabled native file input: the picker and cancel buttons, the sort tabs and the delete action of the previews are disabled, a dropped file is refused, and the files are left out of the form. Code can still set the files through `initialValue` or clear them with `reset()`.\n- **`name`** is the name the accepted files are submitted under with the form.\n- **`initialValue`** seeds the control with files already present, before or after the first render; reassigning it re-runs the add pipeline.\n- **`sort`** controls whether the sort chooser is shown. When `sort` is set to `'date'` or `'status'`, the files start in that order and the sort tab bar appears once more than one file is present; the user's choice from the tab bar then stays in place as files are added, the highlighted tab is always the order applied, and the choice persists to `localStorage`. Changing `sort` applies the new order. When `sort` is omitted, no tab bar is shown and the last `localStorage` preference (defaulting to `'date'`) is applied silently.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-input-upload>` 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#### Single-File Upload (Default)\n\nThe simplest form. Without any attributes the drop zone accepts one file of any type up to 20 MB. Inside a `<form>` it submits the accepted files under its `name`, as a native file input does: post the form as `multipart/form-data` to send their contents.\n\n```html\n<form action=\"/upload\" method=\"post\" enctype=\"multipart/form-data\">\n  <mds-input-upload name=\"allegato\"></mds-input-upload>\n  <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n```\n\nTo send the form with your own code, `new FormData(form)` carries the files too.\n\n```html\n<form id=\"modulo-upload\" action=\"/upload\">\n  <mds-input-upload name=\"allegato\"></mds-input-upload>\n  <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n</form>\n\n<script>\n  document.querySelector('#modulo-upload').addEventListener('submit', async (e) => {\n    e.preventDefault();\n    await fetch(e.target.action, { method: 'POST', body: new FormData(e.target) });\n  });\n</script>\n```\n\n#### Restricting Accepted File Types\n\nSet `accept` to a comma-separated list of MIME types, wildcard MIME types, or extensions. The native file picker and the per-file validator both respect the same value.\n\n```html\n<!-- Solo PDF -->\n<mds-input-upload accept=\".pdf\"></mds-input-upload>\n\n<!-- Immagini di qualsiasi formato -->\n<mds-input-upload accept=\"image/*\"></mds-input-upload>\n\n<!-- Mix di MIME esplicito ed estensione -->\n<mds-input-upload accept=\"application/pdf, image/jpeg, .png\"></mds-input-upload>\n```\n\n#### Limiting File Size\n\nSet `max-file-size` (in MB) to reject files above that threshold. Each oversized file is shown as an error preview with a localized message and excluded from the form value.\n\n```html\n<mds-input-upload accept=\"image/*\" max-file-size=\"5\"></mds-input-upload>\n```\n\n#### Multi-File Upload\n\nSet `max-files` to a number greater than one to enable multiple selection. The native picker switches to multi-select mode automatically; the progress bar tracks how many slots are filled. The form submits one `name` entry per accepted file.\n\n```html\n<mds-input-upload\n  name=\"allegati\"\n  accept=\".pdf, image/jpeg, image/png\"\n  max-file-size=\"70\"\n  max-files=\"3\"\n></mds-input-upload>\n```\n\n#### Seeding with Initial Files\n\nPass a `FileList` or `File[]` to `initialValue` to prepopulate the control - useful when editing an existing record that already has attachments. The files reach the previews, `getFiles()`, the form value and `mdsInputUploadChange` whether you assign them before or after the first render. Reassigning the prop re-runs the add pipeline, including validation.\n\n```html\n<mds-input-upload id=\"allegati\"></mds-input-upload>\n<script>\n  const upload = document.querySelector('#allegati');\n  // seed with files already loaded from the server as File objects\n  upload.initialValue = existingFiles;\n</script>\n```\n\n#### Listening for File Changes\n\nThe `mdsInputUploadChange` event fires with the current valid `FileList` (or `null`) on every add, remove, or reset. Use it to drive UI outside the component - for example to enable a submit button only when files are present.\n\n```html\n<mds-input-upload id=\"doc-upload\" accept=\".pdf\" max-files=\"5\"></mds-input-upload>\n<script>\n  document.querySelector('#doc-upload').addEventListener('mdsInputUploadChange', (e) => {\n    const files = e.detail;\n    console.log('File selezionati:', files ? files.length : 0);\n  });\n</script>\n```\n\n#### Programmatic Control via Methods\n\nUse the imperative API for host-driven workflows. `getFiles()` returns the accepted files (an empty `FileList` when there are none), `getFilesError()` returns any validation errors, and `reset()` clears all selections.\n\n```html\n<mds-input-upload id=\"upload-contratto\" accept=\".pdf\" max-file-size=\"10\"></mds-input-upload>\n<mds-button id=\"btn-verifica\" label=\"Verifica\"></mds-button>\n<mds-button id=\"btn-annulla\" label=\"Annulla\" tone=\"outline\"></mds-button>\n<script>\n  const upload = document.querySelector('#upload-contratto');\n\n  document.querySelector('#btn-verifica').addEventListener('click', async () => {\n    const errors = await upload.getFilesError();\n    if (errors) {\n      console.warn('Errori nei file:', errors);\n      return;\n    }\n    const files = await upload.getFiles();\n    console.log('Pronti per il caricamento:', files);\n  });\n\n  document.querySelector('#btn-annulla').addEventListener('click', () => {\n    upload.reset();\n  });\n</script>\n```\n\n#### Exposing the Sort Chooser\n\nSetting `sort` to `\"date\"` or `\"status\"` makes the sort tab bar visible once more than one file is present. The files start in the `sort` order; once the user picks another order from the tab bar, it stays in place as files are added, and the choice is persisted to `localStorage`. The highlighted tab is always the order applied. When `sort` is omitted, no tab bar is shown and the last `localStorage` preference is applied silently.\n\n```html\n<!-- Mostra il selettore di ordinamento, avviato su \"per data\" -->\n<mds-input-upload sort=\"date\" max-files=\"5\"></mds-input-upload>\n\n<!-- Mostra il selettore di ordinamento, avviato su \"per stato\" -->\n<mds-input-upload sort=\"status\" max-files=\"5\"></mds-input-upload>\n```\n\n#### Form Reset Behavior\n\nThe component is form-associated: a form reset clears every selected file automatically, without calling `reset()` explicitly.\n\n```html\n<form id=\"modulo-allegati\">\n  <mds-input-upload name=\"allegati\" accept=\".pdf\" max-files=\"3\"></mds-input-upload>\n  <mds-button type=\"submit\" label=\"Invia\" variant=\"primary\" tone=\"strong\"></mds-button>\n  <mds-button type=\"reset\" label=\"Cancella tutto\" variant=\"error\" tone=\"outline\"></mds-button>\n</form>\n```\n\n#### CSS Customization\n\nStyle the component only through its public `--mds-input-upload-min-cols` CSS custom property, the minimum number of columns of the file list. Set it on the host or a parent selector. The drag area takes its colours from the semantic color roles ([`agents/color.md`](../../../../agents/color.md)), so dark mode keeps working without overrides.\n\n```css\n.upload-area-evidenziata mds-input-upload {\n  --mds-input-upload-min-cols: 2;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-input-upload>`. 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 Replace the Component with a Raw `<input type=\"file\">`\n\n`<input type=\"file\">` gives you no drag-drop, no per-file validation, no progress bar, and no consistent styling. Use `<mds-input-upload>` whenever a file upload is needed.\n\n```html\n<!-- INCORRECT -->\n<input type=\"file\" accept=\".pdf\" multiple>\n\n<!-- CORRECT -->\n<mds-input-upload accept=\".pdf\" max-files=\"5\"></mds-input-upload>\n```\n\n#### Do Not Listen to the Native `change` Event\n\nThe internal `<input type=\"file\">` lives inside shadow DOM; its native `change` event may not bubble out or may fire before internal validation completes. Always listen to the documented `mdsInputUploadChange` event instead.\n\n```html\n<!-- INCORRECT -->\n<mds-input-upload id=\"uploader\"></mds-input-upload>\n<script>\n  document.querySelector('#uploader').addEventListener('change', (e) => {\n    console.log(e.target.files); // undefined - input is in shadow DOM\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-input-upload id=\"uploader\"></mds-input-upload>\n<script>\n  document.querySelector('#uploader').addEventListener('mdsInputUploadChange', (e) => {\n    console.log(e.detail); // valid FileList or null\n  });\n</script>\n```\n\n#### Do Not Append the Files to a `FormData` Built from the Form\n\nThe component already submits its accepted files under `name`: a `FormData` built from the form carries them, and appending them again sends every file twice. Give the component a `name` and let the form carry the files.\n\n```html\n<!-- INCORRECT - every file is sent twice -->\n<form id=\"modulo\">\n  <mds-input-upload name=\"allegati\" max-files=\"3\"></mds-input-upload>\n</form>\n<script type=\"module\">\n  const form = document.querySelector('#modulo');\n  const data = new FormData(form);\n  const files = await form.querySelector('mds-input-upload').getFiles();\n  Array.from(files).forEach((file) => data.append('allegati', file));\n</script>\n\n<!-- CORRECT -->\n<form id=\"modulo\">\n  <mds-input-upload name=\"allegati\" max-files=\"3\"></mds-input-upload>\n</form>\n<script type=\"module\">\n  const data = new FormData(document.querySelector('#modulo'));\n</script>\n```\n\n#### Do Not Reach into Shadow DOM for the Hidden Input\n\nThe hidden `<input type=\"file\">` is an implementation detail inside shadow DOM. Do not query it or read `.files` directly. Use the `getFiles()` method or listen to `mdsInputUploadChange`.\n\n```html\n<!-- INCORRECT -->\n<mds-input-upload id=\"upload\"></mds-input-upload>\n<script>\n  const input = document.querySelector('#upload').shadowRoot.querySelector('input[type=\"file\"]');\n  console.log(input.files); // fragile - implementation detail\n</script>\n\n<!-- CORRECT -->\n<mds-input-upload id=\"upload\"></mds-input-upload>\n<script type=\"module\">\n  const files = await document.querySelector('#upload').getFiles();\n  console.log(files);\n</script>\n```\n\n#### Do Not Omit `sort` When You Want the Sort Chooser Visible\n\nThe sort tab bar only appears when `sort` is explicitly set to `\"date\"` or `\"status\"` and more than one file is present. Omitting `sort` silently applies the user's last `localStorage` preference and hides the chooser. Set `sort` when you want users to be able to switch the order interactively.\n\n```html\n<!-- INCORRECT - sort chooser never appears because sort is omitted -->\n<mds-input-upload max-files=\"10\"></mds-input-upload>\n\n<!-- CORRECT - sort chooser appears once more than one file is added -->\n<mds-input-upload max-files=\"10\" sort=\"date\"></mds-input-upload>\n```\n\n#### Do Not Customize Through Undocumented Internal Selectors\n\nThe only supported customization surface is the public `--mds-input-upload-min-cols` CSS custom property. Do not target internal classes or parts not listed in the API.\n\n```css\n/* INCORRECT */\nmds-input-upload >>> .drag-area {\n  background: lightblue;\n}\nmds-input-upload .main-action {\n  display: none;\n}\n\n/* CORRECT */\nmds-input-upload {\n  --mds-input-upload-min-cols: 2;\n}\n```\n\n#### Do Not Use `initialValue` for Each New File Added by the User\n\n`initialValue` is for seeding the control once with pre-existing data - for example files already saved to a server. Every assignment re-runs the add pipeline, which emits `mdsInputUploadChange` again (files already accepted are skipped by name, so nothing is added): reassigning it from that event, as below, loops without end. Let the component manage user-selected files through its own UI.\n\n```html\n<!-- INCORRECT - misusing initialValue as a live file binding -->\n<mds-input-upload id=\"uploader\"></mds-input-upload>\n<script>\n  document.querySelector('#uploader').addEventListener('mdsInputUploadChange', (e) => {\n    document.querySelector('#uploader').initialValue = e.detail; // causes re-processing\n  });\n</script>\n\n<!-- CORRECT - just read the value when you need it -->\n<mds-input-upload id=\"uploader\"></mds-input-upload>\n<script>\n  document.querySelector('#uploader').addEventListener('mdsInputUploadChange', (e) => {\n    const files = e.detail; // use directly without re-assigning initialValue\n    console.log('File correnti:', files ? files.length : 0);\n  });\n</script>\n```\n"
      },
      "props": [
        {
          "name": "accept",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "accept",
          "reflectToAttr": true,
          "docs": "Defines the file types the file input should accept, as the accept attribute of a native\nfile input: MIME types (`image/*` included) and extensions, separated by commas",
          "docsTags": [
            {
              "name": "example",
              "text": "'.pdf,image/*'"
            },
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Disables the component, like a disabled native file input: no file can be added, dropped or\nremoved, and the files are left out of the form. A disabled `<fieldset>` around the component\ndoes the same.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "initialValue",
          "type": "FileList | File[] | undefined",
          "complexType": {
            "original": "FileList | File[]",
            "resolved": "FileList | File[] | undefined",
            "references": {
              "FileList": {
                "location": "global",
                "id": "global::FileList"
              },
              "File": {
                "location": "global",
                "id": "global::File"
              }
            }
          },
          "mutable": false,
          "reflectToAttr": false,
          "docs": "Specifies initial files uploaded",
          "docsTags": [],
          "values": [
            {
              "type": "FileList"
            },
            {
              "type": "File[]"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "maxFileSize",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "max-file-size",
          "reflectToAttr": true,
          "docs": "Specifies the max size of a single file that can be uploaded in MB",
          "docsTags": [
            {
              "name": "default",
              "text": "20"
            }
          ],
          "default": "20",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "maxFiles",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "max-files",
          "reflectToAttr": true,
          "docs": "Specifies the max number of files that can be uploaded",
          "docsTags": [
            {
              "name": "default",
              "text": "1"
            }
          ],
          "default": "1",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "The name the accepted files are submitted under with the form, one entry per file",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "sort",
          "type": "\"date\" | \"status\" | undefined",
          "complexType": {
            "original": "AttachmentSort",
            "resolved": "\"date\" | \"status\" | undefined",
            "references": {
              "AttachmentSort": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-input-upload/meta/types.ts::AttachmentSort",
                "referenceLocation": "AttachmentSort"
              }
            }
          },
          "mutable": false,
          "attr": "sort",
          "reflectToAttr": true,
          "docs": "Specifies the order the files start sorted by, status or date of upload, and shows the sort tabs that let the user change it; if not defined the tabs are hidden and the order is the user's last choice",
          "docsTags": [],
          "values": [
            {
              "value": "date",
              "type": "string"
            },
            {
              "value": "status",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "getFiles",
          "returns": {
            "type": "Promise<FileList | null>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<FileList | null>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "FileList": {
                "location": "global",
                "id": "global::FileList"
              }
            },
            "return": "Promise<FileList | null>"
          },
          "signature": "getFiles() => Promise<FileList | null>",
          "parameters": [],
          "docs": "Returns a promise of the accepted files as a FileList, empty if there's none",
          "docsTags": []
        },
        {
          "name": "getFilesError",
          "returns": {
            "type": "Promise<FileError[] | null>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<FileError[] | null>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "FileError": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-input-upload/meta/types.ts::FileError",
                "referenceLocation": "FileError"
              }
            },
            "return": "Promise<FileError[] | null>"
          },
          "signature": "getFilesError() => Promise<FileError[] | null>",
          "parameters": [],
          "docs": "Returns a promise of files error or null if there's none",
          "docsTags": []
        },
        {
          "name": "reset",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "reset() => Promise<void>",
          "parameters": [],
          "docs": "Reset component's files",
          "docsTags": []
        }
      ],
      "events": [
        {
          "event": "mdsInputUploadChange",
          "detail": "FileList | null",
          "bubbles": true,
          "complexType": {
            "original": "FileList | null",
            "resolved": "FileList | null",
            "references": {
              "FileList": {
                "location": "global",
                "id": "global::FileList"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component files are changed",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-input-upload-drag-area-background-color",
          "annotation": "prop",
          "docs": "Sets the background-color of the drag area.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-upload-drag-area-background-color-on-drag",
          "annotation": "prop",
          "docs": "Set the background color of the drag area when a file is dragged over it.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-upload-drag-area-border",
          "annotation": "prop",
          "docs": "Sets the border of the drag area.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-upload-drag-area-border-on-drag",
          "annotation": "prop",
          "docs": "Set the border of the drag area when a file is dragged over it.",
          "visibility": "internal"
        },
        {
          "name": "--mds-input-upload-min-cols",
          "annotation": "prop",
          "docs": "Set the minimum number of columns for the file list.",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-text",
        "mds-button",
        "mds-progress",
        "mds-tab",
        "mds-tab-item",
        "mds-file-preview"
      ],
      "dependencyGraph": {
        "mds-input-upload": [
          "mds-icon",
          "mds-text",
          "mds-button",
          "mds-progress",
          "mds-tab",
          "mds-tab-item",
          "mds-file-preview"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-progress": [
          "mds-radial-progress"
        ],
        "mds-radial-progress": [
          "mds-icon",
          "mds-text"
        ],
        "mds-tab-item": [
          "mds-button"
        ],
        "mds-file-preview": [
          "mds-button",
          "mds-img",
          "mds-icon",
          "mds-text",
          "mds-badge"
        ],
        "mds-img": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-badge": [
          "mds-text"
        ]
      },
      "storybook": "form-input-upload--docs"
    },
    {
      "filePath": "src/components/mds-keyboard/mds-keyboard.tsx",
      "encapsulation": "shadow",
      "tag": "mds-keyboard",
      "readme": "# mds-keyboard\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `mds-keyboard-key` elements or `components` to this slot."
        },
        {
          "name": "category",
          "text": "tags"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-keyboard>` web component renders a keyboard shortcut as a row of physical-looking keycaps, acting as the compound parent for one or more slotted `<mds-keyboard-key>` children. It has no direct HTML equivalent; it visualizes a key combination (e.g. `Ctrl + C`) and can optionally let the user verify that combination by typing it.\n\n#### Semantic Behavior\n\n- **Default slot is the key sequence**: The component projects slotted `<mds-keyboard-key>` elements and automatically inserts a `+` separator between consecutive keys.\n- **Compound parent**: It reads each child key's `name` to build the expected combination; during a test the children are toggled to their `pressed` state.\n- **Test mode (`try`)**: When enabled the component appends a trigger button and a tooltip; clicking the button (or pressing Enter or Space on it) captures keystrokes and, at the first release of a key pressed during the test, compares the typed combination against the slotted keys, in any order. The release of the key that started the test is not part of it.\n- **Result feedback**: A pass shows a \"done\" icon, a fail shows a \"close\" icon, and the tooltip surfaces the localized success or error message; the outcome is also reflected on the host via the `test` attribute.\n- **Localization**: Trigger label, tooltip copy, and error messages resolve through the locale system (el/en/es/it).\n\n#### Properties & Visual Configurations\n\nThis component does not use the shared `variant` / `tone` ladders from [`agents/variants.md`](../../../../agents/variants.md).\n\n#### Other behavioral props\n\n- **`try`** opts the keyboard into interactive verification mode. Enable it only when you want the user to be able to confirm a shortcut by typing it; leave it unset for a purely presentational shortcut display.\n- **`test`** reflects the verification outcome (`'pass'` / `'fail'`) onto the host. It is primarily driven by the test flow and is mainly useful as a styling/state hook rather than a value you set yourself.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-keyboard>` 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#### Single Key Display\n\nThe simplest use: one `<mds-keyboard-key>` child inside `<mds-keyboard>`. The `name` attribute selects a key from the built-in key dictionary; the component renders the physical-looking keycap with the key's alias (e.g. `F1`, `Ctrl`).\n\n```html\n<mds-keyboard>\n  <mds-keyboard-key name=\"f1\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Multi-Key Shortcut Combination\n\nSlot two or more `<mds-keyboard-key>` elements. The component automatically inserts a `+` separator between consecutive keys, so you never need to add it manually.\n\n```html\n<mds-keyboard>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"s\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Specifying Key Side (Left / Right Modifier)\n\nUse the side-specific `name` values (`controlleft`, `controlright`, `shiftleft`, `shiftright`, `commandleft`, `commandright`, etc.) when the shortcut must be typed with a specific hand. The keycap renders a small positional indicator.\n\n```html\n<!-- Only the left Shift key is accepted during a test -->\n<mds-keyboard try>\n  <mds-keyboard-key name=\"shiftleft\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"d\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Interactive Verification Mode (`try`)\n\nAdd the `try` attribute to let the user confirm the shortcut by typing it. A trigger button appears; clicking it puts the component into capture mode. The keys can be pressed in any order, all held down together: at the first key release the component reflects the outcome (`pass` / `fail`) on the `test` attribute and shows a localized tooltip.\n\n```html\n<mds-keyboard try>\n  <mds-keyboard-key name=\"command\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"z\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Shortcut Reference Table\n\nEmbed `<mds-keyboard>` inside a `<mds-table>` to build a keyboard-shortcut reference sheet. Each row pairs the visual shortcut with its description.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Combinazione\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Azione\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>\n        <mds-keyboard>\n          <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n          <mds-keyboard-key name=\"c\"></mds-keyboard-key>\n        </mds-keyboard>\n      </mds-table-cell>\n      <mds-table-cell><mds-text>Copia</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell>\n        <mds-keyboard>\n          <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n          <mds-keyboard-key name=\"v\"></mds-keyboard-key>\n        </mds-keyboard>\n      </mds-table-cell>\n      <mds-table-cell><mds-text>Incolla</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell>\n        <mds-keyboard>\n          <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n          <mds-keyboard-key name=\"z\"></mds-keyboard-key>\n        </mds-keyboard>\n      </mds-table-cell>\n      <mds-table-cell><mds-text>Annulla</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Reading the `test` Outcome Attribute\n\nWhen `try` is set the `test` attribute is reflected onto the host as `\"pass\"` or `\"fail\"` after each attempt. Use it as a CSS attribute selector, or observe the attribute from JavaScript to drive follow-on UI (the component emits no event).\n\n```html\n<mds-keyboard id=\"shortcut-ctrl-s\" try>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"s\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n```javascript\nconst keyboard = document.querySelector('#shortcut-ctrl-s');\nnew MutationObserver(() => {\n  if (keyboard.getAttribute('test') === 'pass') {\n    console.log('Combinazione corretta!');\n  }\n}).observe(keyboard, { attributes: true, attributeFilter: ['test'] });\n```\n\n#### Styling Customization\n\nAdjust colors and padding only through the public `--mds-keyboard-*` CSS custom properties; the keys take their colours from the theme. Use the semantic color roles via `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)) so dark mode continues to work.\n\n```css\n.custom-keyboard mds-keyboard {\n  --mds-keyboard-background: rgb(var(--magma-surface-inverse));\n  --mds-keyboard-color: rgb(var(--magma-on-inverse));\n  --mds-keyboard-padding: calc(var(--spacing) * 300);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-keyboard>`. 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 Slot Raw Text or `<kbd>` Elements\n\nThe default slot expects `<mds-keyboard-key>` children only. Slotting plain text, `<kbd>`, or other HTML breaks the separator injection logic and the test-mode key matching.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard>\n  <kbd>Ctrl</kbd>\n  <kbd>S</kbd>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"s\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Add `+` Separators Manually\n\nThe component inserts a styled `+` between consecutive keys automatically. Adding your own separator duplicates it and breaks the visual rhythm.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n  <span>+</span>\n  <mds-keyboard-key name=\"c\"></mds-keyboard-key>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"c\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Set `try=\"false\"` to Disable Test Mode\n\n`try` is a boolean attribute: remove it (or leave it unset) to keep the component in display-only mode. A string value is fragile: `\"false\"` is read as `false` on this component, but the attribute stays on the element until the component renders (attribute selectors and scripts reading it see it set). Never write a boolean as a string.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard try=\"false\">\n  <mds-keyboard-key name=\"escape\"></mds-keyboard-key>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"escape\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Set `test` as a Static Attribute to Signal State\n\n`test` is a reflected output prop driven by the component's own verification flow. Setting it as a static HTML attribute paints the pass / fail state without any attempt behind it, and the next attempt overwrites it.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard test=\"pass\">\n  <mds-keyboard-key name=\"enter\"></mds-keyboard-key>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard try>\n  <mds-keyboard-key name=\"enter\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Use `<mds-keyboard-key>` Outside `<mds-keyboard>`\n\n`<mds-keyboard-key>` is a compound child and communicates with the parent via the Stencil DOM tree. Rendering it standalone loses the compound layout, the `+` separator, and test-mode driven `pressed` toggling.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard-key name=\"tab\"></mds-keyboard-key>\n\n<!-- CORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"tab\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Customize Colors with Raw CSS Values Instead of Tokens\n\nSetting `--mds-keyboard-background` or `--mds-keyboard-color` to a raw hex or `rgba()` literal bypasses the palette layer and breaks dark mode. Always use a semantic color role, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)).\n\n```css\n/* INCORRECT */\nmds-keyboard {\n  --mds-keyboard-background: #1a1a2e;\n  --mds-keyboard-color: #e0e0e0;\n}\n\n/* CORRECT */\nmds-keyboard {\n  --mds-keyboard-background: rgb(var(--magma-surface-inverse));\n  --mds-keyboard-color: rgb(var(--magma-on-inverse));\n}\n```\n"
      },
      "props": [
        {
          "name": "test",
          "type": "\"fail\" | \"pass\" | undefined",
          "complexType": {
            "original": "KeyboardTest",
            "resolved": "\"fail\" | \"pass\" | undefined",
            "references": {
              "KeyboardTest": {
                "location": "import",
                "path": "./meta/type",
                "id": "src/components/mds-keyboard/meta/type.ts::KeyboardTest",
                "referenceLocation": "KeyboardTest"
              }
            }
          },
          "mutable": true,
          "attr": "test",
          "reflectToAttr": true,
          "docs": "Shows the keyboard key combination test result",
          "docsTags": [],
          "values": [
            {
              "value": "fail",
              "type": "string"
            },
            {
              "value": "pass",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "try",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "try",
          "reflectToAttr": true,
          "docs": "Sets if the keyboard key combination test is enabled",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-keyboard-background",
          "annotation": "prop",
          "docs": "Set the background color of the keyboard area.",
          "visibility": "public"
        },
        {
          "name": "--mds-keyboard-background-default",
          "annotation": "prop",
          "docs": "`private` Set the default background color of the keyboard area.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-background-fail",
          "annotation": "prop",
          "docs": "Set the background color of the keyboard area when the test fails.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-background-pass",
          "annotation": "prop",
          "docs": "Set the background color of the keyboard area when the test passes.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-color",
          "annotation": "prop",
          "docs": "Set the text color of the keyboard area, will impact on `mds-keyboard-key` component.",
          "visibility": "public"
        },
        {
          "name": "--mds-keyboard-fill-fail",
          "annotation": "prop",
          "docs": "Set the fill color of the combination-checker button when the test fails.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-fill-pass",
          "annotation": "prop",
          "docs": "Set the fill color of the combination-checker button when the test passes.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-illumination-dark",
          "annotation": "prop",
          "docs": "Set the dark illumination.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-illumination-dark-opacity",
          "annotation": "prop",
          "docs": "Set the opacity of the dark illumination.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-illumination-dark-size",
          "annotation": "prop",
          "docs": "Set the size of the dark illumination.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-illumination-light",
          "annotation": "prop",
          "docs": "Set the light illumination.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-illumination-light-opacity",
          "annotation": "prop",
          "docs": "Set the opacity of the light illumination.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-illumination-light-size",
          "annotation": "prop",
          "docs": "Set the size of the light illumination.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-illumination-shadow",
          "annotation": "prop",
          "docs": "Set the shadow of the keyboard area.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-key-background",
          "annotation": "prop",
          "docs": "Set the background color of the keyboard key.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-key-illumination-dark-opacity",
          "annotation": "prop",
          "docs": "Set the opacity of the dark illumination of the keyboard key.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-key-illumination-light-opacity",
          "annotation": "prop",
          "docs": "Set the opacity of the light illumination of the keyboard key.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-key-illumination-shadow",
          "annotation": "prop",
          "docs": "Set the shadow of the keyboard key.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-padding",
          "annotation": "prop",
          "docs": "Set the padding of the keyboard area.",
          "visibility": "public"
        },
        {
          "name": "--mds-keyboard-spinner-duration",
          "annotation": "prop",
          "docs": "Set the duration of the spinner animation.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-keyboard-key` elements or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-button",
        "mds-tooltip"
      ],
      "dependencyGraph": {
        "mds-keyboard": [
          "mds-text",
          "mds-button",
          "mds-tooltip"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-tooltip": [
          "mds-text"
        ]
      },
      "storybook": "ui-keyboard--docs"
    },
    {
      "filePath": "src/components/mds-keyboard-key/mds-keyboard-key.tsx",
      "encapsulation": "shadow",
      "tag": "mds-keyboard-key",
      "readme": "# mds-keyboard-key\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "parent",
          "text": "mds-keyboard"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-keyboard-key>` web component renders a single physical-looking keycap inside a [`<mds-keyboard>`](../mds-keyboard/AGENTS.md) parent, supplying the visual unit for one key of a shortcut combination (e.g. the `Ctrl` or `C` in `Ctrl + C`). It has no direct HTML equivalent - it is a presentational glyph whose meaning and test behavior are orchestrated by the parent.\n\n#### Semantic Behavior\n\n- **Compound child only**: It must be a direct slot child of `<mds-keyboard>`; it is not used standalone or mixed with other element types, since the parent reads its `name` to build the key combination and inserts `+` separators between keys.\n- **Glyph resolution from `name`**: When `name` maps to a known icon (arrows, command, shift, enter, tab, space, etc.) it renders that icon; otherwise it renders the key's alias from the dictionary (e.g. `Ctrl`, `Esc`). The `space` key is drawn at least twice as wide as the others.\n- **Keyboard-side indicator**: For the side-specific names (`shiftleft`, `controlright`, ...), it appends an `l` / `r` label.\n- **Pressed state is parent-driven**: The `pressed` prop is toggled by `<mds-keyboard>` during a verification test as the user types; it is not meant to be set manually for presentational use.\n- **Localized title**: The host receives a localized `title` describing the key (el/en/es/it).\n- **No interactive role**: The keycap is purely visual - it exposes no role, focus handling, or emitted events of its own.\n\n#### Properties & Visual Configurations\n\nThis child has essentially no presentational configuration; it does not use the shared `variant` / `tone` ladders from [`agents/variants.md`](../../../../agents/variants.md).\n\n- **`name`** is the only meaningful authoring prop: set it to the canonical key code (one value from the keyboard key dictionary, e.g. `control`, `arrowup`, `c`) for the key this cap represents. It selects the displayed glyph or alias and feeds the parent's combination matching.\n- **`pressed`** is a state hook, not an authoring choice - let the parent set it during a test. Leave it unset for a static shortcut display.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-keyboard-key>` 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#### Single Key Inside `<mds-keyboard>`\n\nAlways nest `<mds-keyboard-key>` inside [`<mds-keyboard>`](../mds-keyboard/AGENTS.md). The parent inserts the `+` separators and wires up key-combination testing; the key is meaningless outside this context.\n\n```html\n<mds-keyboard>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Multi-Key Shortcut Combination\n\nList every key in the combination as a direct child. The parent inserts `+` separators automatically - do not add them manually.\n\n```html\n<mds-keyboard>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"s\"></mds-keyboard-key>\n</mds-keyboard>\n\n<mds-keyboard>\n  <mds-keyboard-key name=\"command\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"shift\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"z\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Icon-Resolved Keys\n\nKeys such as arrows, enter, tab, space, command, shift, backspace, and others resolve to an icon automatically. No extra configuration is needed - `name` alone is sufficient.\n\n```html\n<mds-keyboard>\n  <mds-keyboard-key name=\"arrowup\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"enter\"></mds-keyboard-key>\n</mds-keyboard>\n\n<mds-keyboard>\n  <mds-keyboard-key name=\"tab\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"space\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Keyboard-Side Disambiguation\n\nFor keys that exist on both sides of a physical keyboard, use the directional variant (`shiftleft`, `shiftright`, `controlleft`, etc.). The component appends an `l` / `r` indicator to disambiguate.\n\n```html\n<mds-keyboard>\n  <mds-keyboard-key name=\"shiftleft\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"controlleft\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"a\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Interactive Combination Test via `try`\n\nAdd `try` to `<mds-keyboard>` to let users verify they can type the shortcut. The parent drives `pressed` on child keys as the user types - do not set `pressed` yourself in this mode.\n\n```html\n<mds-keyboard try>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"z\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Styling Customization via CSS Custom Properties\n\nAdjust the keycap only through its public `--mds-keyboard-key-padding` CSS custom property. Set it on the host element or a parent selector; the press animation and the keycap depth come from the component, its text colour from the parent's public `--mds-keyboard-color`.\n\n```css\n/* Increase padding for a larger keycap feel */\n.keycap-large mds-keyboard-key {\n  --mds-keyboard-key-padding: calc(var(--spacing) * 300);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-keyboard-key>`. 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-keyboard-key>` Outside `<mds-keyboard>`\n\nThe key is a compound child component and must be a direct slot child of [`<mds-keyboard>`](../mds-keyboard/AGENTS.md). Used standalone it renders visually but has no separator wiring, no test capability, and violates the compound component contract.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard-key name=\"control\"></mds-keyboard-key>\n<span>+</span>\n<mds-keyboard-key name=\"c\"></mds-keyboard-key>\n\n<!-- CORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"c\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Add `+` Separators Manually\n\nThe parent `<mds-keyboard>` inserts `+` separators between child keys automatically. Adding them manually results in duplicate or misaligned separators.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"command\"></mds-keyboard-key>\n  <span>+</span>\n  <mds-keyboard-key name=\"v\"></mds-keyboard-key>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"command\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"v\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Set `pressed` Manually When `try` Is Active\n\nWhen `<mds-keyboard try>` is enabled, the parent owns `pressed` and sets it as the user types. Setting it manually conflicts with the parent state machine and produces incorrect visual feedback.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard try>\n  <mds-keyboard-key name=\"control\" pressed></mds-keyboard-key>\n  <mds-keyboard-key name=\"z\"></mds-keyboard-key>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard try>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"z\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Use a Generic `name` String Outside the Key Dictionary\n\n`name` is a `KeyboardKeyName` union type. Passing an arbitrary string (e.g. `\"ctrl\"`, `\"cmd\"`, `\"esc\"`) that is not in the dictionary causes a runtime lookup failure because the component reads `keyboardKeysData[name]` without a guard.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"ctrl\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"cmd\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"esc\"></mds-keyboard-key>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"command\"></mds-keyboard-key>\n  <mds-keyboard-key name=\"escape\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Do Not Slot Content Inside `<mds-keyboard-key>`\n\n`<mds-keyboard-key>` exposes no default or named slot. Any slotted content is ignored; the glyph is derived entirely from the `name` prop.\n\n```html\n<!-- INCORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"control\">Ctrl</mds-keyboard-key>\n</mds-keyboard>\n\n<!-- CORRECT -->\n<mds-keyboard>\n  <mds-keyboard-key name=\"control\"></mds-keyboard-key>\n</mds-keyboard>\n```\n\n#### Customize via CSS Custom Properties, Not Shadow-Piercing Selectors\n\nThe supported customization surface is the public `--mds-keyboard-key-padding` CSS custom property. Piercing shadow DOM via `::part()` on undocumented internals, `>>>`, or class hacks couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-keyboard-key >>> .physical-key {\n  background-color: blue;\n}\n\n/* CORRECT */\nmds-keyboard-key {\n  --mds-keyboard-key-padding: calc(var(--spacing) * 300);\n}\n```\n"
      },
      "props": [
        {
          "name": "name",
          "type": "\"0\" | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\" | \"a\" | \"alt\" | \"altleft\" | \"altright\" | \"arrowdown\" | \"arrowleft\" | \"arrowright\" | \"arrowup\" | \"b\" | \"backspace\" | \"c\" | \"capslock\" | \"command\" | \"commandleft\" | \"commandright\" | \"control\" | \"controlleft\" | \"controlright\" | \"d\" | \"delete\" | \"e\" | \"end\" | \"enter\" | \"escape\" | \"f\" | \"f1\" | \"f10\" | \"f11\" | \"f12\" | \"f2\" | \"f3\" | \"f4\" | \"f5\" | \"f6\" | \"f7\" | \"f8\" | \"f9\" | \"g\" | \"h\" | \"home\" | \"i\" | \"j\" | \"k\" | \"l\" | \"m\" | \"n\" | \"o\" | \"option\" | \"optionleft\" | \"optionright\" | \"p\" | \"pagedown\" | \"pageup\" | \"q\" | \"r\" | \"s\" | \"shift\" | \"shiftleft\" | \"shiftright\" | \"space\" | \"t\" | \"tab\" | \"u\" | \"v\" | \"w\" | \"windows\" | \"windowsleft\" | \"windowsright\" | \"x\" | \"y\" | \"z\"",
          "complexType": {
            "original": "KeyboardKeyName",
            "resolved": "\"0\" | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"8\" | \"9\" | \"a\" | \"alt\" | \"altleft\" | \"altright\" | \"arrowdown\" | \"arrowleft\" | \"arrowright\" | \"arrowup\" | \"b\" | \"backspace\" | \"c\" | \"capslock\" | \"command\" | \"commandleft\" | \"commandright\" | \"control\" | \"controlleft\" | \"controlright\" | \"d\" | \"delete\" | \"e\" | \"end\" | \"enter\" | \"escape\" | \"f\" | \"f1\" | \"f10\" | \"f11\" | \"f12\" | \"f2\" | \"f3\" | \"f4\" | \"f5\" | \"f6\" | \"f7\" | \"f8\" | \"f9\" | \"g\" | \"h\" | \"home\" | \"i\" | \"j\" | \"k\" | \"l\" | \"m\" | \"n\" | \"o\" | \"option\" | \"optionleft\" | \"optionright\" | \"p\" | \"pagedown\" | \"pageup\" | \"q\" | \"r\" | \"s\" | \"shift\" | \"shiftleft\" | \"shiftright\" | \"space\" | \"t\" | \"tab\" | \"u\" | \"v\" | \"w\" | \"windows\" | \"windowsleft\" | \"windowsright\" | \"x\" | \"y\" | \"z\"",
            "references": {
              "KeyboardKeyName": {
                "location": "import",
                "path": "@type/keyboard",
                "id": "src/type/keyboard.ts::KeyboardKeyName",
                "referenceLocation": "KeyboardKeyName"
              }
            }
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Sets the code of the keyboard key for combination tests if `try` attribute is set from `mds-keyboard` parent component",
          "docsTags": [],
          "values": [
            {
              "value": "0",
              "type": "string"
            },
            {
              "value": "1",
              "type": "string"
            },
            {
              "value": "2",
              "type": "string"
            },
            {
              "value": "3",
              "type": "string"
            },
            {
              "value": "4",
              "type": "string"
            },
            {
              "value": "5",
              "type": "string"
            },
            {
              "value": "6",
              "type": "string"
            },
            {
              "value": "7",
              "type": "string"
            },
            {
              "value": "8",
              "type": "string"
            },
            {
              "value": "9",
              "type": "string"
            },
            {
              "value": "a",
              "type": "string"
            },
            {
              "value": "alt",
              "type": "string"
            },
            {
              "value": "altleft",
              "type": "string"
            },
            {
              "value": "altright",
              "type": "string"
            },
            {
              "value": "arrowdown",
              "type": "string"
            },
            {
              "value": "arrowleft",
              "type": "string"
            },
            {
              "value": "arrowright",
              "type": "string"
            },
            {
              "value": "arrowup",
              "type": "string"
            },
            {
              "value": "b",
              "type": "string"
            },
            {
              "value": "backspace",
              "type": "string"
            },
            {
              "value": "c",
              "type": "string"
            },
            {
              "value": "capslock",
              "type": "string"
            },
            {
              "value": "command",
              "type": "string"
            },
            {
              "value": "commandleft",
              "type": "string"
            },
            {
              "value": "commandright",
              "type": "string"
            },
            {
              "value": "control",
              "type": "string"
            },
            {
              "value": "controlleft",
              "type": "string"
            },
            {
              "value": "controlright",
              "type": "string"
            },
            {
              "value": "d",
              "type": "string"
            },
            {
              "value": "delete",
              "type": "string"
            },
            {
              "value": "e",
              "type": "string"
            },
            {
              "value": "end",
              "type": "string"
            },
            {
              "value": "enter",
              "type": "string"
            },
            {
              "value": "escape",
              "type": "string"
            },
            {
              "value": "f",
              "type": "string"
            },
            {
              "value": "f1",
              "type": "string"
            },
            {
              "value": "f10",
              "type": "string"
            },
            {
              "value": "f11",
              "type": "string"
            },
            {
              "value": "f12",
              "type": "string"
            },
            {
              "value": "f2",
              "type": "string"
            },
            {
              "value": "f3",
              "type": "string"
            },
            {
              "value": "f4",
              "type": "string"
            },
            {
              "value": "f5",
              "type": "string"
            },
            {
              "value": "f6",
              "type": "string"
            },
            {
              "value": "f7",
              "type": "string"
            },
            {
              "value": "f8",
              "type": "string"
            },
            {
              "value": "f9",
              "type": "string"
            },
            {
              "value": "g",
              "type": "string"
            },
            {
              "value": "h",
              "type": "string"
            },
            {
              "value": "home",
              "type": "string"
            },
            {
              "value": "i",
              "type": "string"
            },
            {
              "value": "j",
              "type": "string"
            },
            {
              "value": "k",
              "type": "string"
            },
            {
              "value": "l",
              "type": "string"
            },
            {
              "value": "m",
              "type": "string"
            },
            {
              "value": "n",
              "type": "string"
            },
            {
              "value": "o",
              "type": "string"
            },
            {
              "value": "option",
              "type": "string"
            },
            {
              "value": "optionleft",
              "type": "string"
            },
            {
              "value": "optionright",
              "type": "string"
            },
            {
              "value": "p",
              "type": "string"
            },
            {
              "value": "pagedown",
              "type": "string"
            },
            {
              "value": "pageup",
              "type": "string"
            },
            {
              "value": "q",
              "type": "string"
            },
            {
              "value": "r",
              "type": "string"
            },
            {
              "value": "s",
              "type": "string"
            },
            {
              "value": "shift",
              "type": "string"
            },
            {
              "value": "shiftleft",
              "type": "string"
            },
            {
              "value": "shiftright",
              "type": "string"
            },
            {
              "value": "space",
              "type": "string"
            },
            {
              "value": "t",
              "type": "string"
            },
            {
              "value": "tab",
              "type": "string"
            },
            {
              "value": "u",
              "type": "string"
            },
            {
              "value": "v",
              "type": "string"
            },
            {
              "value": "w",
              "type": "string"
            },
            {
              "value": "windows",
              "type": "string"
            },
            {
              "value": "windowsleft",
              "type": "string"
            },
            {
              "value": "windowsright",
              "type": "string"
            },
            {
              "value": "x",
              "type": "string"
            },
            {
              "value": "y",
              "type": "string"
            },
            {
              "value": "z",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "pressed",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "pressed",
          "reflectToAttr": true,
          "docs": "Sets if the key is pressed or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-keyboard-key-illumination-dark",
          "annotation": "prop",
          "docs": "Set the dark illumination of the keyboard key.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-key-illumination-dark-size",
          "annotation": "prop",
          "docs": "Set the size of the dark illumination of the keyboard key.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-key-illumination-light",
          "annotation": "prop",
          "docs": "Set the light illumination of the keyboard key.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-key-illumination-light-size",
          "annotation": "prop",
          "docs": "Set the size of the light illumination of the keyboard key.",
          "visibility": "internal"
        },
        {
          "name": "--mds-keyboard-key-padding",
          "annotation": "prop",
          "docs": "Set the padding of the keyboard key.",
          "visibility": "public"
        },
        {
          "name": "--mds-keyboard-key-transition-duration",
          "annotation": "prop",
          "docs": "Set the transition duration of the keyboard key.",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-keyboard-key": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "ui-keyboard-key--docs"
    },
    {
      "filePath": "src/components/mds-kpi/mds-kpi.tsx",
      "encapsulation": "shadow",
      "tag": "mds-kpi",
      "readme": "# mds-kpi\n\n\n\nThis 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.\n",
      "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 `mds-kpi-item` element/s."
        },
        {
          "name": "category",
          "text": "data"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-kpi>` web component is the layout container of the Magma Design System for presenting groups of key performance indicators. It is a compound parent with no props of its own: it establishes an accessible list region and hosts one or more `<mds-kpi-item>` children that render the actual figures.\n\n#### Semantic Behavior\n\n- **List semantics**: The host exposes its `<mds-kpi-item>` children as a single semantic list group to assistive technology.\n- **Compound relationship**: It carries no value or configuration itself; every metric - label, description, icon, and on-scroll animation - is defined on the slotted `<mds-kpi-item>` children.\n- **Default slot is content**: The default slot is meant exclusively for `<mds-kpi-item>` elements; anything else has no styled placement.\n\n#### Properties & Visual Configurations\n\n`<mds-kpi>` itself exposes no props. Configuration happens on the `<mds-kpi-item>` children and through the CSS custom properties this component publishes for them.\n\n#### Other behavioral props\n\n- **`--mds-kpi-text-animation-speed`** and **`--mds-kpi-text-animation-placeholder-char`**: tune the scramble/reveal text effect used by children. The animation only runs when a child sets a non-zero `threshold`, which animates the value in once the item scrolls into view; with the default `threshold` of `0` the figure renders statically.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-kpi>` 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 KPI Panel\n\nThe canonical form. Place one or more [`mds-kpi-item`](../mds-kpi-item/AGENTS.md) elements as direct children. `mds-kpi` provides the responsive grid; `mds-kpi-item` owns every visible value.\n\n```html\n<mds-kpi>\n  <mds-kpi-item label=\"1.240\" description=\"Pratiche aperte\"></mds-kpi-item>\n  <mds-kpi-item label=\"387\" description=\"In lavorazione\"></mds-kpi-item>\n  <mds-kpi-item label=\"56\" description=\"Scadute\"></mds-kpi-item>\n</mds-kpi>\n```\n\n#### KPI Item with Icon\n\nSet `icon` to an icon slug to display a glyph above the value. Use slugs from the Magma icon library - `mi/baseline/*` for Material Icons or an `mgg/` Maggioli slug.\n\n```html\n<mds-kpi>\n  <mds-kpi-item\n    icon=\"mi/baseline/folder-open\"\n    label=\"1.240\"\n    description=\"Pratiche aperte\"\n  ></mds-kpi-item>\n  <mds-kpi-item\n    icon=\"mi/baseline/pending-actions\"\n    label=\"387\"\n    description=\"In lavorazione\"\n  ></mds-kpi-item>\n  <mds-kpi-item\n    icon=\"mi/baseline/warning\"\n    label=\"56\"\n    description=\"Scadute\"\n  ></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Scroll-Triggered Animation\n\nSet `threshold` to a value between `0` (exclusive) and `1` to activate the scramble/reveal animation when the item scrolls into the viewport. A threshold of `0.5` triggers once at least half the element is visible. Omit `threshold` (or leave it at the default `0`) for static rendering.\n\n```html\n<mds-kpi>\n  <mds-kpi-item\n    icon=\"mi/baseline/groups\"\n    label=\"4.512\"\n    description=\"Dipendenti\"\n    threshold=\"0.5\"\n  ></mds-kpi-item>\n  <mds-kpi-item\n    icon=\"mi/baseline/location-city\"\n    label=\"38\"\n    description=\"Sedi operative\"\n    threshold=\"0.5\"\n  ></mds-kpi-item>\n  <mds-kpi-item\n    icon=\"mi/baseline/stars\"\n    label=\"12\"\n    description=\"Anni di attivita\"\n    threshold=\"0.5\"\n  ></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Tuning the Animation Speed Globally\n\nUse `--mds-kpi-text-animation-speed` on the `<mds-kpi>` host to slow down or speed up the scramble effect for all children at once. The default is `0.15`. The placeholder character during the scramble phase is controlled by `--mds-kpi-text-animation-placeholder-char` (default: a space).\n\n```css\n.hero-section mds-kpi {\n  --mds-kpi-text-animation-speed: 0.08;\n  --mds-kpi-text-animation-placeholder-char: '-';\n}\n```\n\n#### Styling Individual Items\n\n`<mds-kpi-item>` has no public CSS custom property: customize a single item through its documented shadow parts, painted with the semantic color roles via `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)) so dark mode keeps working.\n\n```css\n.progetto-kpi mds-kpi-item::part(icon) {\n  fill: rgb(var(--magma-accent-emphasis));\n}\n\n.progetto-kpi mds-kpi-item::part(content) {\n  background-color: rgb(var(--magma-surface-overlay));\n}\n```\n\n#### Targeting Shadow Parts\n\nWhen a CSS custom property is not enough, target the documented shadow parts of `<mds-kpi-item>` - `icon`, `icon-container`, and `content` - via `::part()`. Use this only when deeper visual control is required.\n\n```css\nmds-kpi-item::part(icon) {\n  width: 30%;\n}\n\nmds-kpi-item::part(content) {\n  text-align: left;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-kpi>`. 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 Place Raw HTML in the Default Slot\n\nThe default slot of `<mds-kpi>` is meant exclusively for [`mds-kpi-item`](../mds-kpi-item/AGENTS.md) elements. Arbitrary HTML has no styled placement inside the grid and breaks the list semantics the component exposes to assistive technology.\n\n```html\n<!-- INCORRECT -->\n<mds-kpi>\n  <div class=\"metric\">\n    <h2>1.240</h2>\n    <p>Pratiche aperte</p>\n  </div>\n</mds-kpi>\n\n<!-- CORRECT -->\n<mds-kpi>\n  <mds-kpi-item label=\"1.240\" description=\"Pratiche aperte\"></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Do Not Use `mds-kpi-item` Outside `mds-kpi`\n\n`<mds-kpi-item>` is a compound child and relies on the grid context and CSS custom property cascade provided by its parent. Using it as a standalone element loses the responsive layout and the shared animation-speed variables.\n\n```html\n<!-- INCORRECT -->\n<mds-kpi-item label=\"387\" description=\"In lavorazione\"></mds-kpi-item>\n\n<!-- CORRECT -->\n<mds-kpi>\n  <mds-kpi-item label=\"387\" description=\"In lavorazione\"></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Do Not Set `threshold=\"0\"` Explicitly to Disable Animation\n\n`threshold` defaults to `0`, which means static rendering. Writing `threshold=\"0\"` is redundant: it changes nothing. Simply omit the attribute.\n\n```html\n<!-- INCORRECT -->\n<mds-kpi-item label=\"56\" description=\"Scadute\" threshold=\"0\"></mds-kpi-item>\n\n<!-- CORRECT -->\n<mds-kpi-item label=\"56\" description=\"Scadute\"></mds-kpi-item>\n```\n\n#### Do Not Slot `mds-icon` to Display an Icon\n\nThe `icon` prop on `<mds-kpi-item>` renders the glyph in its own styled container above the value. `mds-kpi-item` renders no slot, so an `<mds-icon>` or any other element slotted into it is not displayed.\n\n```html\n<!-- INCORRECT -->\n<mds-kpi>\n  <mds-kpi-item label=\"75\" description=\"Allenatori\">\n    <mds-icon name=\"mi/baseline/directions-walk\"></mds-icon>\n  </mds-kpi-item>\n</mds-kpi>\n\n<!-- CORRECT -->\n<mds-kpi>\n  <mds-kpi-item\n    icon=\"mi/baseline/directions-walk\"\n    label=\"75\"\n    description=\"Allenatori\"\n  ></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Do Not Override the Animation Speed by Targeting Internal Text Components\n\n`<mds-kpi-item>` forwards `--mds-kpi-text-animation-speed` and `--mds-kpi-text-animation-placeholder-char` to its internal `<mds-text>` elements. Setting `--mds-text-animation-speed` from outside has no effect: the item sets it on its inner texts from its own variables. Use the published `--mds-kpi-*` or `--mds-kpi-item-*` variables instead.\n\n```css\n/* INCORRECT */\nmds-kpi-item {\n  --mds-text-animation-speed: 0.05;\n}\n\n/* CORRECT */\nmds-kpi {\n  --mds-kpi-text-animation-speed: 0.05;\n}\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-kpi-text-animation-placeholder-char",
          "annotation": "prop",
          "docs": "Sets the animation placeholder char of the text",
          "visibility": "public"
        },
        {
          "name": "--mds-kpi-text-animation-speed",
          "annotation": "prop",
          "docs": "Sets the animation speed of the text",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-kpi-item` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-kpi--docs"
    },
    {
      "filePath": "src/components/mds-kpi-item/mds-kpi-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-kpi-item",
      "readme": "# mds-kpi-item\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "content - Selects the label and description wrapper element"
        },
        {
          "name": "part",
          "text": "icon - Selects the icon element"
        },
        {
          "name": "part",
          "text": "icon-container - Selects the icon wrapper element"
        },
        {
          "name": "parent",
          "text": "mds-kpi"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-kpi-item>` web component is a compound child that represents a single key-performance-indicator entry - a prominent numeric `label` with an optional `description` and `icon` - inside its parent container [`<mds-kpi>`](../mds-kpi/AGENTS.md). It carries no native HTML primitive of its own; it is a presentational list row that `<mds-kpi>` exposes as a list.\n\n#### Semantic Behavior\n\n- **Compound constraint**: Must be placed as a direct default-slot child of [`<mds-kpi>`](../mds-kpi/AGENTS.md); it is not used standalone, and the parent's list semantics only make sense when its children are `mds-kpi-item` elements (do not mix in other child types).\n- **Accessible name**: Each item is announced as one list entry, with its spoken text consolidated as `\"{label}: {description}\"`, leaving out the one that is missing; an `aria-label` on the host replaces it and stays.\n- **Scroll-triggered animation**: When `threshold` is greater than `0`, the `label`/`description` reveal with the `yugop` text animation once the item scrolls into the viewport. With `threshold === 0` (the default) the text is rendered immediately with no animation.\n- **Conditional rendering**: The icon, value, and description each render only when their respective prop is provided, so an item can show any subset of icon, value, and caption.\n\n#### Properties & Visual Configurations\n\n- **`threshold`**: Controls the reveal-on-scroll behavior. Leave at `0` for static KPIs that should be visible immediately; set a value between `0` and `1` (the fraction of the element that must enter the viewport) to defer the scramble-in animation until the item is scrolled into view - useful for KPI strips lower on a page.\n- **`label`** holds the headline figure (rendered as `h2` typography) and **`description`** the supporting caption (rendered as `label` typography); together they form the item's spoken accessible name, so prefer concise, self-explanatory values.\n- **`icon`** takes an `mds-icon` name and adds a leading visual marker above the figure; omit it for text-only KPIs.\n\n`<mds-kpi-item>` has no public CSS custom property of its own: the animation pacing comes from the public `--mds-kpi-text-animation-speed` and `--mds-kpi-text-animation-placeholder-char` of the parent [`<mds-kpi>`](../mds-kpi/AGENTS.md), and colors are tuned through the shadow parts documented in [`AGENTS.md`](AGENTS.md) (`icon-container`, `icon`, `content`).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-kpi-item>` 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 KPI Entry with Label and Description\n\nThe canonical form: a headline figure in `label` and a supporting caption in `description`, placed inside [`<mds-kpi>`](../mds-kpi/AGENTS.md). Both props feed the item's accessible spoken name automatically.\n\n```html\n<mds-kpi>\n  <mds-kpi-item\n    label=\"1.240\"\n    description=\"Pratiche elaborate\"\n  ></mds-kpi-item>\n</mds-kpi>\n```\n\n#### KPI Entry with an Icon\n\nAdd `icon` to display a visual marker above the figure. Use an icon slug from the Magma icon library - no `.svg` extension.\n\n```html\n<mds-kpi>\n  <mds-kpi-item\n    label=\"98%\"\n    description=\"Soddisfazione clienti\"\n    icon=\"mi/baseline/thumb-up\"\n  ></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Multiple KPI Items in a Panel\n\nGroup related metrics by placing several `<mds-kpi-item>` elements as direct children of `<mds-kpi>`. The parent sets up the `list` role; each item registers as a `listitem`.\n\n```html\n<mds-kpi>\n  <mds-kpi-item label=\"3.500\" description=\"Utenti attivi\" icon=\"mi/baseline/group\"></mds-kpi-item>\n  <mds-kpi-item label=\"128\" description=\"Servizi erogati\" icon=\"mi/baseline/work\"></mds-kpi-item>\n  <mds-kpi-item label=\"99,9%\" description=\"Disponibilita del sistema\" icon=\"mi/baseline/check-circle\"></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Scroll-Triggered Reveal Animation\n\nSet `threshold` to a value between `0` and `1` to defer the yugop text animation until the item enters the viewport. A value of `0.5` means at least 50 % of the item must be visible before the animation starts. Use this for KPI strips placed lower on a landing page.\n\n```html\n<mds-kpi>\n  <mds-kpi-item\n    label=\"45.000\"\n    description=\"Documenti archiviati\"\n    icon=\"mi/baseline/folder\"\n    threshold=\"0.5\"\n  ></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Label-Only KPI (No Description)\n\nOmit `description` only when the figure is self-explanatory. The accessible name is then the figure alone (`2026`); ensure the surrounding context provides enough meaning.\n\n```html\n<mds-kpi>\n  <mds-kpi-item label=\"2026\"></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Icon-Only Visual Accent (No Numeric Value)\n\nOmit `label` and `description` to display only the icon as a decorative tile. In this case the item has no name - add an explicit `aria-label` on the host to describe the tile to screen-reader users. The component keeps it at first render but writes its own name back at its next re-render (for example when a user preference changes).\n\n```html\n<mds-kpi>\n  <mds-kpi-item\n    icon=\"mi/baseline/star\"\n    aria-label=\"Valutazione eccellente\"\n  ></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Styling Customization\n\n`<mds-kpi-item>` has no public CSS custom property. Tune the animation timing on the parent with the public `--mds-kpi-text-animation-*` properties of [`<mds-kpi>`](../mds-kpi/AGENTS.md), which every item inherits; icon color and text-area background go through the shadow parts below.\n\n```css\n.highlight-kpi mds-kpi {\n  --mds-kpi-text-animation-speed: 0.08;\n  --mds-kpi-text-animation-placeholder-char: \"0\";\n}\n```\n\n#### Targeting Shadow Parts for Deep Customization\n\nStyle the item through its three documented shadow parts: `icon-container`, `icon`, and `content`. Use the semantic color roles via `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)) so dark mode keeps working.\n\n```css\nmds-kpi-item::part(icon-container) {\n  background-color: rgb(var(--magma-accent-surface));\n  border-radius: var(--magma-radius-2xl);\n}\n\nmds-kpi-item::part(icon) {\n  fill: rgb(var(--magma-accent-fg));\n}\n\nmds-kpi-item::part(content) {\n  background-color: rgb(var(--magma-surface-overlay));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-kpi-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-kpi-item` Outside `mds-kpi`\n\n`<mds-kpi-item>` is a compound child designed to be a direct slot child of [`<mds-kpi>`](../mds-kpi/AGENTS.md). Using it standalone strips the list semantics that `<mds-kpi>` provides and breaks the expected visual layout.\n\n```html\n<!-- INCORRECT -->\n<mds-kpi-item label=\"1.240\" description=\"Pratiche elaborate\"></mds-kpi-item>\n\n<!-- CORRECT -->\n<mds-kpi>\n  <mds-kpi-item label=\"1.240\" description=\"Pratiche elaborate\"></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Do Not Slot HTML Content for the Label or Description\n\n`<mds-kpi-item>` has no default slot - all text content is driven by the `label` and `description` props. Slotting child nodes produces no output because the component renders nothing from its slot.\n\n```html\n<!-- INCORRECT -->\n<mds-kpi>\n  <mds-kpi-item>\n    <span>1.240</span>\n    <small>Pratiche elaborate</small>\n  </mds-kpi-item>\n</mds-kpi>\n\n<!-- CORRECT -->\n<mds-kpi>\n  <mds-kpi-item label=\"1.240\" description=\"Pratiche elaborate\"></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Do Not Slot `<mds-icon>` to Add an Icon\n\nThe `icon` prop passes the slug to the internal `<mds-icon>` instance. Slotting an `<mds-icon>` directly has no effect because the component has no named slot for icons.\n\n```html\n<!-- INCORRECT -->\n<mds-kpi>\n  <mds-kpi-item label=\"98%\" description=\"Soddisfazione clienti\">\n    <mds-icon name=\"mi/baseline/thumb-up\"></mds-icon>\n  </mds-kpi-item>\n</mds-kpi>\n\n<!-- CORRECT -->\n<mds-kpi>\n  <mds-kpi-item\n    label=\"98%\"\n    description=\"Soddisfazione clienti\"\n    icon=\"mi/baseline/thumb-up\"\n  ></mds-kpi-item>\n</mds-kpi>\n```\n\n#### Do Not Set `threshold=\"0\"` to Disable Animation - Omit It\n\n`threshold` defaults to `0`, so setting it explicitly to `\"0\"` is a no-op. More importantly, `threshold=\"false\"` or `threshold=\"none\"` is parsed to `NaN`, which the IntersectionObserver rejects with an error at runtime.\n\n```html\n<!-- INCORRECT -->\n<mds-kpi-item label=\"3.500\" description=\"Utenti\" threshold=\"false\"></mds-kpi-item>\n<mds-kpi-item label=\"3.500\" description=\"Utenti\" threshold=\"none\"></mds-kpi-item>\n\n<!-- CORRECT - omit threshold entirely for no animation (defaults to 0) -->\n<mds-kpi-item label=\"3.500\" description=\"Utenti\"></mds-kpi-item>\n```\n\n#### Do Not Pierce Shadow DOM to Style Internal Elements\n\nThe supported customization surface is the three documented shadow parts (`icon-container`, `icon`, `content`), plus the public `--mds-kpi-text-animation-*` properties of the parent `<mds-kpi>`. Reaching inside the shadow DOM via `>>>` or undocumented class names couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-kpi-item >>> .info {\n  background: white;\n}\nmds-kpi-item >>> .value {\n  font-size: 3rem;\n}\n\n/* CORRECT */\nmds-kpi-item::part(content) {\n  background-color: rgb(var(--magma-surface-overlay));\n  padding: calc(var(--spacing) * 600);\n}\n```\n\n#### Do Not Leave Icon-Only Items Without an Accessible Name\n\nWhen both `label` and `description` are omitted the item has no accessible name at all. Supply an explicit `aria-label` on the host when the item carries no text props (the component keeps it at first render, but writes its own name back at its next re-render).\n\n```html\n<!-- INCORRECT -->\n<mds-kpi>\n  <mds-kpi-item icon=\"mi/baseline/star\"></mds-kpi-item>\n</mds-kpi>\n\n<!-- CORRECT -->\n<mds-kpi>\n  <mds-kpi-item\n    icon=\"mi/baseline/star\"\n    aria-label=\"Valutazione eccellente\"\n  ></mds-kpi-item>\n</mds-kpi>\n```\n"
      },
      "props": [
        {
          "name": "description",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "description",
          "reflectToAttr": false,
          "docs": "Specifies the description under the value in the KPI element",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "Specifies the icon on the top of the KPI element",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "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": false,
          "docs": "Specifies the number to be displayed in the KPI element",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "threshold",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "threshold",
          "reflectToAttr": false,
          "docs": "Specifies the page threshold which starts the text animation",
          "docsTags": [
            {
              "name": "default",
              "text": "0"
            }
          ],
          "default": "0",
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-kpi-item-icon-color",
          "annotation": "prop",
          "docs": "Set the fill color of the icon element",
          "visibility": "internal"
        },
        {
          "name": "--mds-kpi-item-info-background",
          "annotation": "prop",
          "docs": "Set the `background-color` of the text area element",
          "visibility": "internal"
        },
        {
          "name": "--mds-kpi-item-text-animation-placeholder-char",
          "annotation": "prop",
          "docs": "Sets the animation placeholder char of the text",
          "visibility": "internal"
        },
        {
          "name": "--mds-kpi-item-text-animation-speed",
          "annotation": "prop",
          "docs": "Sets the animation speed of the text",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "content",
          "docs": "Selects the label and description wrapper element"
        },
        {
          "name": "icon",
          "docs": "Selects the icon element"
        },
        {
          "name": "icon-container",
          "docs": "Selects the icon wrapper element"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-kpi-item": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "ui-kpi-kpi-item--docs"
    },
    {
      "filePath": "src/components/mds-label/mds-label.tsx",
      "encapsulation": "shadow",
      "tag": "mds-label",
      "readme": "# mds-label\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "tags"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-label>` web component is the Magma Design System tag/chip used to display a short, non-interactive piece of text such as a status, a category, or a removable selection.\n\n#### Semantic Behavior\n\n- **Text content**: The visible text comes from the `label` prop only; the component renders no `<slot>`, so content placed between the tags is not displayed.\n- **Deletable affordance**: When `deletable` is set, the component renders a trailing close button and emits the `mdsLabelDelete` event on activation; the click is stopped at the close button, so it does not reach a surrounding clickable container.\n- **Keyboard interaction**: While `deletable`, the close button can be triggered by keyboard as well as pointer.\n- **Localization**: The close button's `title` is localized (el/en/it; `es` currently gets the English string).\n\n#### Properties & Visual Configurations\n\nThe `variant` and `tone` props follow the shared ladders defined in [`agents/variants.md`](../../../../agents/variants.md); `tone` is limited to the minimal `'strong'` / `'weak'` set and defaults to `'weak'`.\n\n#### Component-specific variants and tones\n\n`variant` accepts both the theme label palette (e.g. `'sky'`, the default) and the status palette (`'error'`, `'warning'`, `'success'`, `'info'`). Pick a status value when the label communicates an outcome or state; pick a theme color when it is a neutral category or decorative tag.\n\n#### Other behavioral props\n\n- **`truncate`** controls overflow handling of the inner text: `'word'` (default) keeps it on one line, `'all'` wraps and clamps it to three lines with an ellipsis, and `'none'` allows multiline wrapping. In every mode the label is as wide as its text, up to the width it is given (its own `width` or its container's), and `'all'` and `'none'` wrap the text at that width.\n- **`typography`** selects a compact type scale (`'caption'`, `'detail'`, `'tip'`) appropriate to the label's small footprint, defaulting to `'caption'`.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-label>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Label via `label` Prop\n\nThe canonical form. Use the `label` prop for the text; it is the only way to set visible content because the component renders no `<slot>` element.\n\n```html\n<mds-label label=\"Categoria\"></mds-label>\n```\n\n#### Decorative Color via `variant`\n\nPick from the twelve label palette colors for neutral, decorative tags. Default is `sky`; change only when the color carries meaning to the user.\n\n```html\n<mds-label label=\"Ambiente\" variant=\"green\"></mds-label>\n<mds-label label=\"Priorita'\" variant=\"orange\"></mds-label>\n<mds-label label=\"Archivio\" variant=\"violet\"></mds-label>\n<mds-label label=\"Bozza\" variant=\"sky\"></mds-label>\n```\n\n#### Status Variant for Outcome Communication\n\nUse a status variant when the label communicates a system outcome or validation state, not just a decorative category.\n\n```html\n<mds-label label=\"Approvato\" variant=\"success\"></mds-label>\n<mds-label label=\"In attesa\" variant=\"warning\"></mds-label>\n<mds-label label=\"Rifiutato\" variant=\"error\"></mds-label>\n<mds-label label=\"Informazione\" variant=\"info\"></mds-label>\n```\n\n#### Tone for Emphasis\n\nPair `tone=\"strong\"` for higher-contrast situations; the default `weak` is lighter and suits most inline contexts.\n\n```html\n<!-- Default: subtle tinted background -->\n<mds-label label=\"Etichetta\" variant=\"blue\" tone=\"weak\"></mds-label>\n\n<!-- Higher contrast: solid background -->\n<mds-label label=\"Etichetta\" variant=\"blue\" tone=\"strong\"></mds-label>\n```\n\n#### Deletable Label with `mdsLabelDelete` Event\n\nSet `deletable` to render the trailing close button. Listen to `mdsLabelDelete` to remove the label from your model; the close button stops event propagation so clicks do not reach a surrounding interactive container.\n\n```html\n<mds-label label=\"Tag rimovibile\" variant=\"purple\" deletable></mds-label>\n```\n\n```javascript\ndocument.querySelector('mds-label').addEventListener('mdsLabelDelete', () => {\n  // rimuovi il tag dal modello\n});\n```\n\n#### Truncation Control via `truncate`\n\nUse `truncate=\"word\"` (default) to keep the text on one line, cut with an ellipsis. Use `truncate=\"none\"` to allow multiline wrapping inside a constrained container.\n\n```html\n<!-- Single-line truncation (default) -->\n<mds-label\n  label=\"Testo molto lungo che supera il limite\"\n  truncate=\"word\"\n  variant=\"lime\"\n  class=\"w-3200\"\n></mds-label>\n\n<!-- Multiline inside a narrow container -->\n<mds-label\n  label=\"Testo molto lungo che supera il limite\"\n  truncate=\"none\"\n  variant=\"lime\"\n  class=\"w-3200\"\n></mds-label>\n```\n\n#### Typography Scale\n\nChoose `typography` to match the surrounding text hierarchy. The default `caption` suits most label contexts; use `detail` (larger) next to body-size text and `tip` (smaller) only when the label sits alongside even smaller text.\n\n```html\n<mds-label label=\"Caption (default)\" variant=\"aqua\" typography=\"caption\"></mds-label>\n<mds-label label=\"Detail\" variant=\"aqua\" typography=\"detail\"></mds-label>\n<mds-label label=\"Tip\" variant=\"aqua\" typography=\"tip\"></mds-label>\n```\n\n#### Styling Customization\n\nStyle the label only through its public `--mds-label-*` CSS custom properties. Set them on the host or a parent selector; use Magma color tokens via `rgb(var(--<token>))` so dark mode and high-contrast modes keep working.\n\n```css\n.categoria-speciale mds-label {\n  --mds-label-background: rgb(var(--label-orchid-08));\n  --mds-label-color: rgb(var(--label-orchid-02));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-label>`. 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 Rely on the Default Slot for Visible Text\n\nThe component's `render()` method does not include a `<slot>` element, so content placed in the default slot is never rendered. Use the `label` prop exclusively.\n\n```html\n<!-- INCORRECT -->\n<mds-label>Stato documento</mds-label>\n\n<!-- CORRECT -->\n<mds-label label=\"Stato documento\"></mds-label>\n```\n\n#### Do Not Use `<mds-label>` as a Form Input Label\n\n`<mds-label>` is a standalone decorative tag for categories and statuses. It is not a replacement for `<label>` or for the `label` prop of `mds-input-field`, and it has no `for` / `htmlFor` association with form controls.\n\n```html\n<!-- INCORRECT -->\n<mds-label label=\"Nome utente\"></mds-label>\n<mds-input name=\"username\"></mds-input>\n\n<!-- CORRECT -->\n<mds-input-field label=\"Nome utente\">\n  <mds-input name=\"username\"></mds-input>\n</mds-input-field>\n```\n\n#### Do Not Set `deletable=\"false\"` as a String\n\n`deletable` is a boolean prop, and a false boolean is an absent attribute ([`agents/conventions.md`](../../../../agents/conventions.md)). The runtime parses the string `\"false\"` as `false`, but the prop is not reflected, so the attribute stays on the element and `[deletable]` selectors or any code that reads the markup see a deletable tag. Remove the attribute entirely to disable the affordance.\n\n```html\n<!-- INCORRECT -->\n<mds-label label=\"Tag\" deletable=\"false\"></mds-label>\n\n<!-- CORRECT -->\n<mds-label label=\"Tag\"></mds-label>\n```\n\n#### Do Not Use a Status Variant for Decorative Tags\n\nStatus variants (`error`, `warning`, `success`, `info`) communicate system outcomes. Using them for neutral categories misleads users about the meaning of the label.\n\n```html\n<!-- INCORRECT: \"Fauna\" is a category, not an error state -->\n<mds-label label=\"Fauna\" variant=\"error\"></mds-label>\n\n<!-- CORRECT: use a decorative palette color -->\n<mds-label label=\"Fauna\" variant=\"green\"></mds-label>\n```\n\n#### Do Not Nest Interactive Elements Inside `<mds-label>`\n\nThe component renders no slot; placing buttons or links in the default slot position has no effect. For a deletable label use `deletable` and listen to `mdsLabelDelete`.\n\n```html\n<!-- INCORRECT -->\n<mds-label label=\"Categoria\">\n  <button onclick=\"remove()\">x</button>\n</mds-label>\n\n<!-- CORRECT -->\n<mds-label label=\"Categoria\" deletable></mds-label>\n```\n\n#### Customize via Documented Vars, Not Internal Selectors\n\nThe supported customization surface is `--mds-label-*` CSS custom properties. Targeting shadow internals via `::part()`, `>>>`, or undocumented class names couples your code to the Shadow DOM implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-label >>> .text {\n  font-weight: bold;\n}\n\n/* CORRECT */\nmds-label {\n  --mds-label-background: rgb(var(--label-blue-08));\n  --mds-label-color: rgb(var(--label-blue-02));\n}\n```\n"
      },
      "props": [
        {
          "name": "deletable",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "deletable",
          "reflectToAttr": false,
          "docs": "Enables the cross icon to perform cancel/delete action on element",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "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": "The label of the component",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"strong\" | \"weak\"",
          "complexType": {
            "original": "ToneMinimalVariantType",
            "resolved": "\"strong\" | \"weak\"",
            "references": {
              "ToneMinimalVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneMinimalVariantType",
                "referenceLocation": "ToneMinimalVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Sets the tone of the color variant",
          "docsTags": [
            {
              "name": "default",
              "text": "'weak'"
            }
          ],
          "default": "'weak'",
          "values": [
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "truncate",
          "type": "\"all\" | \"none\" | \"word\" | undefined",
          "complexType": {
            "original": "TypographyTruncateType",
            "resolved": "\"all\" | \"none\" | \"word\" | undefined",
            "references": {
              "TypographyTruncateType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyTruncateType",
                "referenceLocation": "TypographyTruncateType"
              }
            }
          },
          "mutable": false,
          "attr": "truncate",
          "reflectToAttr": true,
          "docs": "Truncates text inside the label or displays it in multiline if needed",
          "docsTags": [
            {
              "name": "default",
              "text": "'word'"
            }
          ],
          "default": "'word'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "word",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"caption\" | \"detail\" | \"tip\"",
          "complexType": {
            "original": "TypographyTooltipType",
            "resolved": "\"caption\" | \"detail\" | \"tip\"",
            "references": {
              "TypographyTooltipType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyTooltipType",
                "referenceLocation": "TypographyTooltipType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "Specifies the typography of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'caption'"
            }
          ],
          "default": "'caption'",
          "values": [
            {
              "value": "caption",
              "type": "string"
            },
            {
              "value": "detail",
              "type": "string"
            },
            {
              "value": "tip",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\"",
          "complexType": {
            "original": "MdsLabelVariantType",
            "resolved": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\"",
            "references": {
              "MdsLabelVariantType": {
                "location": "local",
                "path": "/home/runner/work/magma/magma/projects/stencil/src/components/mds-label/mds-label.tsx",
                "id": "src/components/mds-label/mds-label.tsx::MdsLabelVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the theme variant colors",
          "docsTags": [
            {
              "name": "default",
              "text": "'sky'"
            }
          ],
          "default": "'sky'",
          "values": [
            {
              "value": "amaranth",
              "type": "string"
            },
            {
              "value": "aqua",
              "type": "string"
            },
            {
              "value": "blue",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "green",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "lime",
              "type": "string"
            },
            {
              "value": "orange",
              "type": "string"
            },
            {
              "value": "orchid",
              "type": "string"
            },
            {
              "value": "purple",
              "type": "string"
            },
            {
              "value": "red",
              "type": "string"
            },
            {
              "value": "sky",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "violet",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "value": "yellow",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsLabelDelete",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the label has to be cancelled",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-label-background",
          "annotation": "prop",
          "docs": "The background color of the label component.",
          "visibility": "public"
        },
        {
          "name": "--mds-label-button-background",
          "annotation": "prop",
          "docs": "The background color of a button inside the label.",
          "visibility": "internal"
        },
        {
          "name": "--mds-label-button-background-hover",
          "annotation": "prop",
          "docs": "The background color of the button when hovered.",
          "visibility": "internal"
        },
        {
          "name": "--mds-label-button-icon-color",
          "annotation": "prop",
          "docs": "The color of the icon inside the button.",
          "visibility": "internal"
        },
        {
          "name": "--mds-label-color",
          "annotation": "prop",
          "docs": "The text color of the label.",
          "visibility": "public"
        },
        {
          "name": "--mds-label-icon-color",
          "annotation": "prop",
          "docs": "The color applied to any icon inside the label.",
          "visibility": "internal"
        },
        {
          "name": "--mds-label-selection-background",
          "annotation": "prop",
          "docs": "The background color applied when the label is selected.",
          "visibility": "internal"
        },
        {
          "name": "--mds-label-selection-color",
          "annotation": "prop",
          "docs": "The text color applied when the label is selected.",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-label": [
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-label--docs"
    },
    {
      "filePath": "src/components/mds-link/mds-link.tsx",
      "encapsulation": "shadow",
      "tag": "mds-link",
      "readme": "# mds-link\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `text string` to this slot, the text of the link when `label` is not set; **avoid** to add `HTML elements` or `components` here."
        },
        {
          "name": "part",
          "text": "link - The element that carries the link and the focus: an anchor with `href`, an inline button without it"
        },
        {
          "name": "part",
          "text": "icon - The icon of the link"
        },
        {
          "name": "category",
          "text": "actions"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-link>` web component is the inline link of Magma: a word or a phrase inside running text, usually inside an `<mds-text>`, that opens a URL or runs an inline action. It replaces a raw `<a>` styled by hand, so links look and behave the same in every app, focus ring included.\n\n#### Semantic Behavior\n\n- **A word of the sentence**: the host is inline and has no typography of its own. It takes the font of the text around it (family, size, weight, line height, letter spacing), whatever the `typography` of the `<mds-text>` it sits in, and wraps across lines with the rest of the text.\n- **A real anchor with `href`**: the link is an `<a href>` in the shadow root, and it is the element that takes the focus. The browser gives it what it gives every link: a new tab on a modifier or middle click, the context menu, drag. A click listener on the host can cancel the navigation with `preventDefault()`, and a client-side router registered with `NavigationService.setHandler()` (from `@maggioli-design-system/magma/services`) takes the plain clicks over. A `click()` from a script follows the link too, unless a listener cancels it.\n- **An inline button without `href`**: the link becomes an element with `role=\"button\"` in the tab order; a click, Enter and Space each fire one native `click` on the host. It never submits the form it sits in. It is not a native `<button>`, which cannot wrap across lines.\n- **New tab**: `target=\"blank\"` opens the URL in a new tab without giving it access to the page (`rel=\"noopener noreferrer\"`) and adds a hidden \"(opens in a new tab)\", in the language of the page, to the name the assistive technology reads. No icon is added: pick one with `icon` if the design wants it.\n- **Download**: `download` saves the file of `href` instead of opening it, as on a native `<a download>`: with no value the file keeps the name the server gives it, a value names the saved file. A file the browser can show (JSON, XML, a PDF) opens in the tab without it. Browsers apply it to the URLs of the origin of the page, `blob:` and `data:` only: a link to another origin opens the file. A download never goes to the router: the browser saves the file on a click, on Enter and on the `click()` of a script.\n- **Icon**: `icon` draws an icon, hidden from the assistive technology, sized on a step of the spacing scale, the same in every typography. It stays on the line of the word next to it: it never wraps to a line of its own.\n- **Underline always visible**: the underline is what tells the link from the text without its color (WCAG 1.4.1), so every style keeps one, and its weight never changes. Under the pointer every link fills with a faint background that rises from the bottom, and a `weak` one also gives its line the whole color; under high contrast the tints take the full color.\n\n#### Properties & Visual Configurations\n\n- **`href`** decides what the link is: with it, a link to a page; without it, an inline action that the host's `click` listener runs. Navigation always goes through `href`, never through a click handler that changes the location.\n- **`label`** sets the text of the link; without it the link shows its default slot, which is the usual form in running text.\n- **`variant`** sets the color: `primary` (the default) paints the link with the accent, the color of links and actions on a neutral surface; `inherit` takes the color of the text around it, for a link on a colored surface (a status message, a filled banner), where the accent would lose contrast.\n- **`underline`** sets the style of the underline:\n  - `solid` (the default): a thin line;\n  - `dotted`: a dotted line;\n  - `marker`: a tinted band under the text, lighter with `weak`, which rises under the pointer to fill the line like a highlighter, with the same faint background in both tones.\n- **`tone`** sets how much of the color the line takes: `strong` (the default) the whole color; `weak` a light tint of it, which steps back in a text dense with links and takes the whole color under the pointer. The text of the link keeps the whole color in both tones.\n- **`icon-position`** puts the icon after the text (`right`, the default: an external link, a download, a forward arrow) or before it (`left`: a back arrow).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-link>` 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#### A Link Inside a Sentence\n\nThe canonical form: the link sits in the default slot of an `<mds-text>`, with its text in its own default slot, and takes the font of the paragraph.\n\n```html\n<mds-text typography=\"paragraph\">\n  Leggi l'<mds-link href=\"/privacy\">informativa sulla privacy</mds-link> prima di continuare.\n</mds-text>\n```\n\n#### Any Typography\n\nThe link has no typography of its own: the same markup works in a caption, a title or the reading variant.\n\n```html\n<mds-text typography=\"caption\">\n  Fonte: <mds-link href=\"/report\">rapporto annuale 2025</mds-link>\n</mds-text>\n<mds-text typography=\"paragraph\" variant=\"read\">\n  Il testo completo e' nell'<mds-link href=\"/regolamento\">allegato A</mds-link>.\n</mds-text>\n```\n\n#### An Inline Action\n\nWithout `href` the link is an inline button: listen for `click` on the host, which a click, Enter and Space all fire.\n\n```html\n<mds-text typography=\"paragraph\">\n  Non trovi quello che cerchi? <mds-link id=\"help\">Chiedi aiuto</mds-link> al supporto.\n</mds-text>\n\n<script>\n  document.getElementById('help').addEventListener('click', () => openHelp());\n</script>\n```\n\n#### A Link That Opens a New Tab\n\nWith `target=\"blank\"` the component adds `rel=\"noopener noreferrer\"` and tells the assistive technology the link opens a new tab; the icon is a choice of the design.\n\n```html\n<mds-text typography=\"detail\">\n  Consulta il\n  <mds-link href=\"https://example.com/report.pdf\" target=\"blank\" icon=\"mi/baseline/open-in-new\">rapporto completo</mds-link>.\n</mds-text>\n```\n\n#### A Link That Downloads Its File\n\n`download` saves the file instead of showing it in the tab; its value is the name of the saved file. The URL has to be on the origin of the page.\n\n```html\n<mds-text typography=\"detail\">\n  Scarica i colori come\n  <mds-link href=\"/downloads/colors.xml\" download=\"colors.xml\" icon=\"mi/baseline/download\">file XML</mds-link>.\n</mds-text>\n```\n\n#### An Icon Before the Text\n\nUse `icon-position=\"left\"` for an icon that leads, such as a back arrow.\n\n```html\n<mds-text typography=\"paragraph\">\n  <mds-link href=\"/indice\" icon=\"mi/baseline/arrow-back\" icon-position=\"left\">Torna all'indice</mds-link>\n</mds-text>\n```\n\n#### A Link on a Colored Surface\n\nOn a status or filled surface the accent loses contrast: `variant=\"inherit\"` takes the color of the text, and the underline still marks the link.\n\n```html\n<mds-banner variant=\"error\" headline=\"Pagamento rifiutato\">\n  <mds-text typography=\"detail\">\n    <mds-link href=\"/carta\" variant=\"inherit\">Aggiorna la carta</mds-link> per riprovare.\n  </mds-text>\n</mds-banner>\n```\n\n#### Routing in a Single-Page App\n\nRegister the router once: plain clicks on every `mds-link` (and `mds-button` with `href`) go to it, with the browser navigation already cancelled; modifier clicks, other origins, `target=\"blank\"` and `download` stay with the browser.\n\n```javascript\nimport { NavigationService } from '@maggioli-design-system/magma/services';\n\nNavigationService.setHandler((href) => router.push(href));\n```\n\n#### Styling Customization\n\nChange the color through `--mds-link-color`, with a semantic role, so dark mode, named themes and high contrast keep working - see [`agents/color.md`](../../../../agents/color.md).\n\n```css\n.legal-note mds-link {\n  --mds-link-color: rgb(var(--magma-text-muted));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-link>`. 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-button` for a Link Inside a Sentence\n\n`mds-button` is a block-level control with its own typography and padding: inside a sentence it breaks the line and the font. A word that links belongs to `mds-link`.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n  Leggi l'<mds-button href=\"/privacy\" tone=\"text\" label=\"informativa\"></mds-button> prima di continuare.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">\n  Leggi l'<mds-link href=\"/privacy\">informativa</mds-link> prima di continuare.\n</mds-text>\n```\n\n#### Do Not Use `mds-link` for a Standalone Action\n\nA call to action, a form submit or a step of a flow is a control, not a word of a sentence: it needs the size, the variants and the form participation of `mds-button`.\n\n```html\n<!-- INCORRECT -->\n<form>\n  <mds-link>Invia la richiesta</mds-link>\n</form>\n\n<!-- CORRECT -->\n<form>\n  <mds-button type=\"submit\" label=\"Invia la richiesta\"></mds-button>\n</form>\n```\n\n#### Do Not Navigate From a Click Handler\n\nA link without `href` is a button for the browser: no new tab on a modifier click, no context menu, no address to copy, and the assistive technology announces a button. Give the URL to `href`.\n\n```html\n<!-- INCORRECT -->\n<mds-link onclick=\"location.href = '/privacy'\">informativa</mds-link>\n\n<!-- CORRECT -->\n<mds-link href=\"/privacy\">informativa</mds-link>\n```\n\n#### Do Not Style a Raw Anchor Inside `mds-text`\n\nA hand-styled `<a>` drifts from app to app in color, underline and hover, and usually loses the focus ring.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n  Leggi l'<a href=\"/privacy\" class=\"text-accent-fg underline\">informativa</a>.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">\n  Leggi l'<mds-link href=\"/privacy\">informativa</mds-link>.\n</mds-text>\n```\n\n#### Do Not Write the New-Tab Notice Yourself\n\nWith `target=\"blank\"` the component already tells the assistive technology the link opens a new tab, in the language of the page: a notice in the text is read twice.\n\n```html\n<!-- INCORRECT -->\n<mds-link href=\"/report.pdf\" target=\"blank\">Rapporto (si apre in una nuova scheda)</mds-link>\n\n<!-- CORRECT -->\n<mds-link href=\"/report.pdf\" target=\"blank\">Rapporto</mds-link>\n```\n\n#### Do Not Remove the Underline\n\nWithout the underline the link is told from the text only by its color, which fails users who cannot see it (WCAG 1.4.1). For a quieter line, lower the `tone`.\n\n```css\n/* INCORRECT */\nmds-link::part(link) {\n  text-decoration: none;\n}\n\n/* CORRECT */\n/* <mds-link href=\"/privacy\" tone=\"weak\">informativa</mds-link> */\n```\n"
      },
      "props": [
        {
          "name": "download",
          "type": "boolean | string | undefined",
          "complexType": {
            "original": "boolean | string",
            "resolved": "boolean | string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "download",
          "reflectToAttr": false,
          "docs": "Saves the file of `href` instead of opening it, as the `download` attribute of `<a>`: present\nwith no value, or `true`, the file takes the name the server gives it; a string is the name\nof the saved file. Browsers apply it to the URLs of the origin of the page, `blob:` and\n`data:`: a link to another origin opens the file as without it. A download never goes to the\nrouter registered with `NavigationService`",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "href",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "href",
          "reflectToAttr": true,
          "docs": "The URL of the link: a real anchor in its shadow root, so the browser gives it what it gives\nevery link (new tab on a modifier or middle click, the context menu, drag). A client-side\nrouter takes the plain clicks over once registered with `NavigationService.setHandler()`\n(from `@maggioli-design-system/magma/services`); without one, a click listener on the host can\nstill cancel the navigation with `preventDefault()`. Without `href` the link is an inline\nbutton: it answers to click, Enter and Space with a `click` event and never submits a form.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "The icon displayed in the link",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "iconPosition",
          "type": "\"left\" | \"right\" | undefined",
          "complexType": {
            "original": "ButtonIconPositionType",
            "resolved": "\"left\" | \"right\" | undefined",
            "references": {
              "ButtonIconPositionType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonIconPositionType",
                "referenceLocation": "ButtonIconPositionType"
              }
            }
          },
          "mutable": false,
          "attr": "icon-position",
          "reflectToAttr": true,
          "docs": "Specifies the horizontal position of the icon, which never wraps to a line of its own",
          "docsTags": [
            {
              "name": "default",
              "text": "'right'"
            }
          ],
          "default": "'right'",
          "values": [
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            },
            {
              "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": "The text of the link; without it, the text of the default slot",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "target",
          "type": "\"blank\" | \"self\"",
          "complexType": {
            "original": "ButtonTargetType",
            "resolved": "\"blank\" | \"self\"",
            "references": {
              "ButtonTargetType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonTargetType",
                "referenceLocation": "ButtonTargetType"
              }
            }
          },
          "mutable": false,
          "attr": "target",
          "reflectToAttr": false,
          "docs": "Specifies the target of the URL, if self or blank: blank opens a new tab, without giving it\naccess to the page (`rel=\"noopener noreferrer\"`), and tells the assistive technology so",
          "docsTags": [
            {
              "name": "default",
              "text": "'self'"
            }
          ],
          "default": "'self'",
          "values": [
            {
              "value": "blank",
              "type": "string"
            },
            {
              "value": "self",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"strong\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneMinimalVariantType",
            "resolved": "\"strong\" | \"weak\" | undefined",
            "references": {
              "ToneMinimalVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneMinimalVariantType",
                "referenceLocation": "ToneMinimalVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Specifies the tone of the underline: `strong` draws it in the color of the link, `weak` in\na tint of it, which takes the full color under the pointer",
          "docsTags": [
            {
              "name": "default",
              "text": "'strong'"
            }
          ],
          "default": "'strong'",
          "values": [
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "underline",
          "type": "\"dotted\" | \"marker\" | \"solid\" | undefined",
          "complexType": {
            "original": "LinkUnderlineType",
            "resolved": "\"dotted\" | \"marker\" | \"solid\" | undefined",
            "references": {
              "LinkUnderlineType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-link/meta/types.ts::LinkUnderlineType",
                "referenceLocation": "LinkUnderlineType"
              }
            }
          },
          "mutable": false,
          "attr": "underline",
          "reflectToAttr": true,
          "docs": "Specifies the style of the underline, which is always visible",
          "docsTags": [
            {
              "name": "default",
              "text": "'solid'"
            }
          ],
          "default": "'solid'",
          "values": [
            {
              "value": "dotted",
              "type": "string"
            },
            {
              "value": "marker",
              "type": "string"
            },
            {
              "value": "solid",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"inherit\" | \"primary\" | undefined",
          "complexType": {
            "original": "LinkVariantType",
            "resolved": "\"inherit\" | \"primary\" | undefined",
            "references": {
              "LinkVariantType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-link/meta/types.ts::LinkVariantType",
                "referenceLocation": "LinkVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the color of the link: `primary` paints it with the accent, `inherit` takes the\ncolor of the text around it, for a link on a colored surface",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "inherit",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-link-background-hover",
          "annotation": "prop",
          "docs": "The background that fills the link from the bottom under the pointer.",
          "visibility": "internal"
        },
        {
          "name": "--mds-link-color",
          "annotation": "prop",
          "docs": "The color of the text, the underline and the icon of the link.",
          "visibility": "public"
        },
        {
          "name": "--mds-link-icon-gap",
          "annotation": "prop",
          "docs": "The distance between the icon and the text.",
          "visibility": "internal"
        },
        {
          "name": "--mds-link-icon-size",
          "annotation": "prop",
          "docs": "The size of the icon.",
          "visibility": "internal"
        },
        {
          "name": "--mds-link-transition-duration",
          "annotation": "prop",
          "docs": "The duration of the background filling the link under the pointer, and of the focus ring closing in on it.",
          "visibility": "internal"
        },
        {
          "name": "--mds-link-underline-color",
          "annotation": "prop",
          "docs": "The color of the underline, of which tone `weak` takes a tint; the tint of the band with the `marker` style.",
          "visibility": "internal"
        },
        {
          "name": "--mds-link-underline-offset",
          "annotation": "prop",
          "docs": "The distance between the text and the underline.",
          "visibility": "internal"
        },
        {
          "name": "--mds-link-underline-thickness",
          "annotation": "prop",
          "docs": "The thickness of the underline, thicker for the `dotted` style, the height of the band with the `marker` style.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string` to this slot, the text of the link when `label` is not set; **avoid** to add `HTML elements` or `components` here."
        }
      ],
      "parts": [
        {
          "name": "icon",
          "docs": "The icon of the link"
        },
        {
          "name": "link",
          "docs": "The element that carries the link and the focus: an anchor with `href`, an inline button without it"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon"
      ],
      "dependencyGraph": {
        "mds-link": [
          "mds-icon"
        ]
      },
      "storybook": "ui-link--docs"
    },
    {
      "filePath": "src/components/mds-list/mds-list.tsx",
      "encapsulation": "shadow",
      "tag": "mds-list",
      "readme": "# mds-list\n\n\n\nThis 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.\n",
      "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 `mds-list-item` element/s."
        },
        {
          "name": "category",
          "text": "data"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-list>` web component is the structural container of the Magma Design System list family. It is a thin compound parent that groups one or more `<mds-list-item>` children and replaces the native `<ul>`/`<ol>` primitive with an accessible, design-system-aware wrapper.\n\n#### Semantic Behavior\n\n- **List role**: Exposes the group as a semantic list to assistive technology regardless of the surrounding markup.\n- **Compound parent**: Acts purely as the container; the visual rows (leading glyph and text) live in the slotted `<mds-list-item>` children.\n- **Default slot is structural**: The default slot is meant to receive `<mds-list-item>` element(s) rather than free text.\n\n#### Properties & Visual Configurations\n\nThis component exposes no configurable props; it carries no `variant`, `tone`, `size` or text colour of its own: the items take the colour of the container, and a class such as `text-fg-muted` on `<mds-list>` makes the whole list secondary. All appearance and behavior are delegated to the slotted `<mds-list-item>` children. For the shared ladders that govern the children, see [`agents/variants.md`](../../../../agents/variants.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-list>` 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\n\nThe canonical form. Place `<mds-list-item>` children directly inside `<mds-list>`. Each item renders a leading bullet glyph (the default list-dot icon) and the slotted text.\n\n```html\n<mds-list>\n  <mds-list-item>Rinnova la licenza annuale</mds-list-item>\n  <mds-list-item>Verifica i dati di fatturazione</mds-list-item>\n  <mds-list-item>Scarica la ricevuta in PDF</mds-list-item>\n</mds-list>\n```\n\n#### Overriding the Item Icon\n\nPass an icon slug to `<mds-list-item>` via the `icon` prop to replace the default bullet with a meaningful glyph. Leave the prop unset to keep the standard dot.\n\n```html\n<mds-list>\n  <mds-list-item icon=\"mi/baseline/check-circle\">Profilo aggiornato</mds-list-item>\n  <mds-list-item icon=\"mi/baseline/check-circle\">Password modificata</mds-list-item>\n  <mds-list-item icon=\"mi/baseline/pending\">Verifica email in attesa</mds-list-item>\n</mds-list>\n```\n\n#### Choosing the Typography Scale\n\nUse the `typography` prop on each `<mds-list-item>` to match the visual density of the surrounding content. The default is `detail`; use `paragraph` for body-copy contexts and `caption` or `tip` for compact secondary lists.\n\n```html\n<!-- Body-copy density - long paragraphs nearby -->\n<mds-list>\n  <mds-list-item typography=\"paragraph\">Seleziona il piano adatto alle tue esigenze</mds-list-item>\n  <mds-list-item typography=\"paragraph\">Inserisci i dati di pagamento</mds-list-item>\n  <mds-list-item typography=\"paragraph\">Conferma l'ordine e ricevi la ricevuta</mds-list-item>\n</mds-list>\n\n<!-- Compact secondary list -->\n<mds-list>\n  <mds-list-item typography=\"caption\">Aggiornato il 01/06/2026</mds-list-item>\n  <mds-list-item typography=\"caption\">Versione 3.2.1</mds-list-item>\n</mds-list>\n```\n\n#### Reading Variant for Long-Form Content\n\nSet `variant=\"read\"` when list items appear inside a reading-optimized context (article, tutorial, legal text). Use the default `variant=\"info\"` for compact informational lists.\n\n```html\n<mds-list>\n  <mds-list-item typography=\"paragraph\" variant=\"read\">\n    Il servizio e' disponibile per tutti gli enti pubblici italiani\n  </mds-list-item>\n  <mds-list-item typography=\"paragraph\" variant=\"read\">\n    L'accesso avviene tramite credenziali SPID o CIE\n  </mds-list-item>\n  <mds-list-item typography=\"paragraph\" variant=\"read\">\n    I dati sono trattati in conformita' al GDPR\n  </mds-list-item>\n</mds-list>\n```\n\n#### Mixed Icon and Default Bullet in the Same List\n\nYou can mix items with an explicit `icon` and items that fall back to the default bullet within the same `<mds-list>`. Each item is independent.\n\n```html\n<mds-list>\n  <mds-list-item icon=\"mi/baseline/warning\">Modulo non compilato</mds-list-item>\n  <mds-list-item>Campo facoltativo ignorato</mds-list-item>\n  <mds-list-item icon=\"mi/baseline/error\">Firma digitale mancante</mds-list-item>\n</mds-list>\n```\n\n#### Adjusting the Icon Spacing\n\n`<mds-list>` and `<mds-list-item>` have no public CSS custom property: the item 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)` of `<mds-list-item>`; use Magma spacing tokens.\n\n```css\n.sidebar-checklist mds-list-item::part(icon) {\n  margin-inline-end: calc(var(--spacing) * 300);\n}\n```\n\n#### Shadow Part Customization\n\nReach the icon or text nodes through the documented `::part(icon)` and `::part(text)` parts of `<mds-list-item>`. Do not pierce the shadow DOM via `>>>` or undocumented selectors.\n\n```css\n/* Tint the leading icon of every item in a warning context */\n.alert-list mds-list-item::part(icon) {\n  fill: rgb(var(--magma-warning-fg));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-list>` and `<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 Replace `<mds-list>` with a Native `<ul>` or `<ol>`\n\nUsing a raw list element bypasses the design-system layout, typography defaults, and FOUC handling built into the component pair.\n\n```html\n<!-- INCORRECT -->\n<ul>\n  <li>Primo elemento</li>\n  <li>Secondo elemento</li>\n</ul>\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 of `<mds-list-item>`\n\nThe default slot of `<mds-list-item>` accepts a plain text string only; placing HTML elements or other components there is explicitly discouraged in the component's API and can break layout and compound-component communication.\n\n```html\n<!-- INCORRECT -->\n<mds-list>\n  <mds-list-item>\n    <strong>Allegato 1</strong> - Contratto firmato\n  </mds-list-item>\n</mds-list>\n\n<!-- CORRECT -->\n<mds-list>\n  <mds-list-item>Allegato 1 - Contratto firmato</mds-list-item>\n</mds-list>\n```\n\n#### Do Not Use `<mds-list-item>` Outside `<mds-list>`\n\n`<mds-list-item>` is a compound child designed to work exclusively inside `<mds-list>`. Using it standalone or wrapping it in a plain `<div>` breaks the accessible list context.\n\n```html\n<!-- INCORRECT -->\n<div class=\"my-list\">\n  <mds-list-item>Voce autonoma</mds-list-item>\n</div>\n\n<!-- CORRECT -->\n<mds-list>\n  <mds-list-item>Voce autonoma</mds-list-item>\n</mds-list>\n```\n\n#### Do Not Slot `<mds-icon>` to Override the Bullet\n\nThe `icon` prop on `<mds-list-item>` is the supported way to change the leading glyph. Slotting `<mds-icon>` into the default slot puts it inline in a text-only slot, misaligned, while 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    Voce completata\n  </mds-list-item>\n</mds-list>\n\n<!-- CORRECT -->\n<mds-list>\n  <mds-list-item icon=\"mi/baseline/check\">Voce completata</mds-list-item>\n</mds-list>\n```\n\n#### Do Not Add Non-Item Children Directly to `<mds-list>`\n\nThe default slot of `<mds-list>` is documented to receive `<mds-list-item>` elements. Mixing in headings, paragraphs, or other components breaks the expected structure and removes the semantic list context.\n\n```html\n<!-- INCORRECT -->\n<mds-list>\n  <mds-text typography=\"h6\">Documenti richiesti</mds-text>\n  <mds-list-item>Documento d'identita'</mds-list-item>\n  <mds-list-item>Codice fiscale</mds-list-item>\n</mds-list>\n\n<!-- CORRECT -->\n<mds-text typography=\"h6\">Documenti richiesti</mds-text>\n<mds-list>\n  <mds-list-item>Documento d'identita'</mds-list-item>\n  <mds-list-item>Codice fiscale</mds-list-item>\n</mds-list>\n```\n\n#### Do Not Apply an Invalid `typography` Value to `<mds-list-item>`\n\n`mds-list-item.typography` accepts `TypographyInfoType | TypographyReadType` - the allowed values are `caption`, `detail`, `label`, `option`, `paragraph`, and `tip`. Heading values such as `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 non valido</mds-list-item>\n</mds-list>\n\n<!-- CORRECT -->\n<mds-list>\n  <mds-list-item typography=\"paragraph\">Testo valido</mds-list-item>\n</mds-list>\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-list-item` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-list--docs"
    },
    {
      "filePath": "src/components/mds-list-item/mds-list-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-list-item",
      "readme": "# mds-list-item\n\n\n\nThis 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.\n",
      "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"
    },
    {
      "filePath": "src/components/mds-mention/mds-mention.tsx",
      "encapsulation": "shadow",
      "tag": "mds-mention",
      "readme": "# mds-mention\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "category",
          "text": "tags"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-mention>` web component renders a compact inline chip that references a person or entity - the kind of token produced when you type `@name` in an editor or comment field. It pairs an icon, a text label, and a removable action into a single self-contained pill.\n\n#### Semantic Behavior\n\n- **Props-only**: It has no default slot and exposes its content exclusively through props.\n- **Default icon**: When `icon` is not set the component falls back to the `alternate-email` (`@`) glyph, reinforcing the mention metaphor.\n- **Opt-in remove affordance**: `deletable` adds a trailing remove button; its click emits `mdsMentionDelete`, and the component leaves the removal itself to the application.\n- **Size-driven typography**: `size` maps to a fixed typography ramp (`sm` -> `caption`, `md` -> `detail`, `lg` -> `h6`); the label is wrapped in `<b>` at `sm` and `md`, and at `lg` it takes the bold `h6` title style.\n\n#### Properties & Visual Configurations\n\n- **`deletable`** turns on the trailing remove button. Without it the mention is a read-only token: no button, no event.\n- **`icon`** is an SVG filename slug from the Magma icon library, shown at the left of the label; omit it to keep the default `@` mention glyph.\n- **`size`** controls both the physical scale and the typography of the label - pick `sm` for dense inline contexts, `lg` for prominent, headline-adjacent placements. The label is bold at every size (a `<b>` below `lg`, the `h6` title style at `lg`).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-mention>` 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 Inline Mention\n\nThe canonical form. Provide `label` with the user handle or display name. The component renders the default `@` glyph; the mention is read-only until `deletable` is set.\n\n```html\n<mds-text>\n  Ciao <mds-mention label=\"mario.rossi\"></mds-mention>, sei riuscito a inviare il messaggio?\n</mds-text>\n```\n\n#### Removable Mention\n\nSet `deletable` to show the remove button, then listen for `mdsMentionDelete` on the element. The\nevent carries the mention that was dismissed, so one handler can serve a whole list.\n\n```html\n<mds-mention id=\"m1\" label=\"mario.rossi\" deletable></mds-mention>\n<script>\n  document.querySelector('#m1').addEventListener('mdsMentionDelete', ({ detail }) => {\n    detail.element.remove();\n  });\n</script>\n```\n\n#### Custom Icon\n\nOverride the default `@` glyph with any Magma icon slug via the `icon` prop. Use this when the mention refers to a team, group, or entity that has a dedicated icon.\n\n```html\n<mds-mention label=\"team-design\" icon=\"mi/baseline/group\"></mds-mention>\n```\n\n#### Sizing\n\nUse the `size` prop to match the mention's visual weight to its context. `sm` is the default for dense inline use; `md` scales up the icon and typography; `lg` uses headline-weight typography for prominent placements.\n\n```html\n<!-- Dense list or comment thread -->\n<mds-mention label=\"anna.verdi\" size=\"sm\"></mds-mention>\n\n<!-- Standard body text -->\n<mds-mention label=\"anna.verdi\" size=\"md\"></mds-mention>\n\n<!-- Heading-adjacent or featured mention -->\n<mds-mention label=\"anna.verdi\" size=\"lg\"></mds-mention>\n```\n\n#### Mention Inside a Comment or Message\n\nPlace `<mds-mention>` inline within `<mds-text>` to embed it naturally in body copy, preserving vertical alignment.\n\n```html\n<mds-text>\n  Il documento e' stato approvato da\n  <mds-mention label=\"lucia.ferrari\" icon=\"mi/baseline/person\"></mds-mention>\n  e sara' pubblicato domani.\n</mds-text>\n```\n\n#### Multiple Mentions in One Sentence\n\nDrop several `<mds-mention>` tokens in the same text flow. Each is a self-contained pill; they line-wrap independently.\n\n```html\n<mds-text>\n  <mds-mention label=\"marco.bianchi\"></mds-mention> e\n  <mds-mention label=\"giulia.conti\"></mds-mention>\n  sono stati assegnati alla revisione.\n</mds-text>\n```\n\n#### Styling Customization\n\n`<mds-mention>` has no public CSS custom property and no shadow parts: the icon size follows the `size` prop (see Sizing above), which keeps the icon, the padding and the typography in step. For a larger icon, pick the next size instead of resizing the icon by hand.\n\n```html\n<mds-mention label=\"lucia.ferrari\" icon=\"mi/baseline/person\" size=\"md\"></mds-mention>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-mention>`. 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 Slot Content Into the Component\n\n`<mds-mention>` has no default slot and no named slots. Any child nodes placed inside the tag are silently ignored. Pass all content through the `label` and `icon` props.\n\n```html\n<!-- INCORRECT -->\n<mds-mention>\n  <mds-icon name=\"mi/baseline/person\"></mds-icon>\n  mario.rossi\n</mds-mention>\n\n<!-- CORRECT -->\n<mds-mention label=\"mario.rossi\" icon=\"mi/baseline/person\"></mds-mention>\n```\n\n#### Do Not Use a Raw `<span>` Chip Instead of the Component\n\nWrapping text in a styled `<span>` misses the remove affordance, icon handling, size ramp, and dark-mode token cascade. Use `<mds-mention>` whenever the UI needs an @-mention token.\n\n```html\n<!-- INCORRECT -->\n<span class=\"pill\">@mario.rossi</span>\n\n<!-- CORRECT -->\n<mds-mention label=\"mario.rossi\"></mds-mention>\n```\n\n#### Do Not Override Size with Inline CSS\n\nThe `size` prop drives icon dimensions, padding, and typography together as a coordinated unit. Setting `font-size`, `width`, or `height` inline breaks that coordination and can misalign the icon and label.\n\n```html\n<!-- INCORRECT -->\n<mds-mention label=\"anna.verdi\" style=\"font-size: 20px; height: 40px;\"></mds-mention>\n\n<!-- CORRECT -->\n<mds-mention label=\"anna.verdi\" size=\"lg\"></mds-mention>\n```\n\n#### Do Not Customize Style by Piercing the Shadow DOM\n\n`<mds-mention>` has no public CSS custom property and no shadow parts: the icon size comes from the `size` prop. Targeting internal elements via `>>>`, `/deep/`, or undocumented `::part()` names couples your code to implementation details and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-mention >>> mds-icon {\n  width: 32px;\n}\n```\n\n```html\n<!-- CORRECT -->\n<mds-mention label=\"anna.verdi\" size=\"md\"></mds-mention>\n```\n\n#### Do Not Listen for `click` on the Remove Button Directly\n\nThe remove button lives inside the shadow DOM and stops its own `click` from propagating: a `click`\nlistener on the host never sees the remove action (it fires only for clicks on the rest of the\npill), and reaching into the shadow root ties your code to an internal class name. Listen for `mdsMentionDelete` instead - it is the contract, and it names the mention that was\ndismissed.\n\n```html\n<!-- INCORRECT -->\n<mds-mention id=\"m1\" label=\"marco.bianchi\" deletable></mds-mention>\n<script>\n  document.querySelector('#m1').addEventListener('click', removeMention);\n</script>\n\n<!-- CORRECT -->\n<mds-mention id=\"m1\" label=\"marco.bianchi\" deletable></mds-mention>\n<script>\n  document.querySelector('#m1').addEventListener('mdsMentionDelete', removeMention);\n</script>\n```\n"
      },
      "props": [
        {
          "name": "deletable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "deletable",
          "reflectToAttr": true,
          "docs": "Shows the cross icon to perform cancel/delete action on element",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "Sets the icon shown at the left of the label",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "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": "Sets the label of the component",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "MentionSize",
            "resolved": "\"lg\" | \"md\" | \"sm\" | undefined",
            "references": {
              "MentionSize": {
                "location": "import",
                "path": "./meta/type",
                "id": "src/components/mds-mention/meta/type.ts::MentionSize",
                "referenceLocation": "MentionSize"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component: the typography of the label (`sm` caption, `md` detail,\n`lg` h6) and the size of the icon",
          "docsTags": [
            {
              "name": "default",
              "text": "'sm'"
            }
          ],
          "default": "'sm'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsMentionDelete",
          "detail": "MdsMentionEvent",
          "bubbles": true,
          "complexType": {
            "original": "MdsMentionEvent",
            "resolved": "MdsMentionEvent",
            "references": {
              "MdsMentionEvent": {
                "location": "import",
                "path": "./meta/interface",
                "id": "src/components/mds-mention/meta/interface.ts::MdsMentionEvent",
                "referenceLocation": "MdsMentionEvent"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component's delete button is clicked",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-mention-icon-size",
          "annotation": "prop",
          "docs": "Sets the size (width and height) of the mention icon.",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-text",
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-mention": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-mention--docs"
    },
    {
      "filePath": "src/components/mds-modal/mds-modal.tsx",
      "encapsulation": "shadow",
      "tag": "mds-modal",
      "readme": "# mds-modal\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "action-close - Selects the close button of the modal."
        },
        {
          "name": "part",
          "text": "dialog - The native `<dialog>` that covers the viewport and places the window in it"
        },
        {
          "name": "part",
          "text": "window - Selects the default window element of the modal when used."
        },
        {
          "name": "slot",
          "text": "bottom - Contents that will be placed on bottom of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "slot",
          "text": "- Contents that will be placed in the center of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "slot",
          "text": "top - Contents that will be placed on top of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "slot",
          "text": "window - Use directly a window component if you need it. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "category",
          "text": "overlays"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-modal>` web component is the Magma Design System overlay container for dialogs, presenting content in a windowed surface layered above the page with an optional backdrop. It is the system equivalent of the native `<dialog>` element, adding managed open/close animations, body scroll locking, positioning, and a built-in close affordance.\n\n#### Semantic Behavior\n\n- **Open state**: Visibility is driven by the `opened` prop. Setting it `true` runs the intro animation and emits `mdsModalOpen`; clearing it runs the outro animation and emits `mdsModalClose`.\n- **Programmatic close**: Exposes an async `close()` method that dismisses the modal regardless of `interaction`, mirroring the close-button action.\n- **Show/hide events**: `mdsModalShow` fires when the intro finishes (fully visible) and `mdsModalHide` when the outro finishes (fully hidden), the latter being the safe point to detach the modal to reclaim memory.\n- **Backdrop dismissal**: With `interaction=\"relaxed\"` (default) a click on the backdrop or `Esc` closes the modal. The click counts when it is pressed and released on the backdrop once the window has stopped: a text selection dragged out of a field, a drag from the backdrop into the window or a click while the window is still coming in leave the modal open. With `interaction=\"strict\"` both are ignored, and the touch swipe too (below): only the close button or `close()` can dismiss it.\n- **Body scroll lock**: When `overflow=\"auto\"` the component locks body scroll while open and restores it on close.\n- **Touch dismissal**: On touch devices a horizontal swipe past a threshold closes a `relaxed` modal, respecting the swipe direction implied by edge `position` values.\n- **Slot-driven layout**: With no `window` slot, the default slot renders centered content framed by optional `top` (header) and `bottom` (footer) slots, and a close button is rendered automatically, icon-only and named in the page language (the `lang` of `<html>`) (\"Close\"). Slotting a `window` element suppresses the built-in chrome and close button so the consumer supplies the entire surface.\n- **Title of a banner window**: An `mds-banner` slotted as the `window` draws its `headline` in `h5`, the title of a dialog (`titles/dialog` of the design language), above the `h6` of the parts and the groups of fields the dialog holds; in the page the banner keeps `h6`. The headline is hidden from screen readers: the dialog takes its name from `aria-label` on the host.\n- **Width of a slotted window**: The `window` element stops at the width of a dialog, `--magma-width-dialog` (the column of a form plus its inset, 580px at 16px: `widths/dialog` of the design language), and shrinks with a narrower screen, its margin around it. A class on the element wins over it, for a bespoke surface.\n- **Close button placement**: The built-in close button sits on the backdrop, in a strip the window always leaves free, so a `strict` modal can be closed whatever its content. `left` and `right` leave it at their side at every width.\n- **Narrow screens**: At a viewport of 480px or less a window that would fill the screen (`center` and the four corners) leaves a strip of backdrop at the top, where the close button shows, as `left` and `right` leave one at their side; `top` and `bottom` stay as tall as their content but never taller than the screen less that strip, which stays on their free side with the close button at its edge (top right for `bottom`, bottom right for `top`).\n- **Wide screens**: Above 480px every window leaves a strip of backdrop at its side, with the close button at its top: `center`, `top` and `bottom` one on each side, the button at the top right; the corners one on the side away from their own, the button there.\n\n#### Properties & Visual Configurations\n\nThis component does not use the shared `variant` / `tone` ladders; its configuration is structural and motion-oriented.\n\n#### Other behavioral props\n\n- **`position`** sets where the window animates from and rests, from `'center'` to edge and corner anchors (`'top'`, `'bottom-left'`, etc.); edge positions also define the valid swipe-to-dismiss direction.\n- **`animation`** selects the motion style of the window: `'slide'` (default), `'3d'`, or `'custom'` (driven entirely by CSS custom properties).\n- **`interaction`** governs how forgiving dismissal is - `'relaxed'` allows backdrop clicks, `'strict'` requires the close button.\n- **`overflow`** chooses whether the component manages body scroll locking (`'auto'`) or leaves it to the consumer (`'manual'`).\n- **`hideBackdrop`** removes the dimmed overlay behind the window (shown by default).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-modal>` 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 Modal with Inline Content\n\nThe simplest form: toggle `opened` from JavaScript to show the dialog. The built-in close button and backdrop dismiss the modal automatically with `interaction=\"relaxed\"` (default). React to the `mdsModalClose` event to sync your state.\n\n```html\n<mds-button id=\"btn-apri\">Apri dialogo</mds-button>\n\n<mds-modal id=\"dialogo\">\n  <div class=\"p-400\">\n    <mds-text>Sei sicuro di voler continuare?</mds-text>\n  </div>\n</mds-modal>\n\n<script>\n  const btn = document.getElementById('btn-apri');\n  const modal = document.getElementById('dialogo');\n  btn.addEventListener('click', () => { modal.opened = true; });\n  modal.addEventListener('mdsModalClose', () => { modal.opened = undefined; });\n</script>\n```\n\n#### Fixed Header and Footer via `top` / `bottom` Slots\n\nUse the `top` slot for a sticky header and the `bottom` slot for a sticky footer (e.g. action buttons). The default slot renders scrollable body content between them.\n\n```html\n<mds-modal id=\"modifica-utente\" position=\"right\">\n  <header slot=\"top\" class=\"p-400 bg-surface-overlay shadow-ring-weak\">\n    <mds-text typography=\"h5\">Modifica utente</mds-text>\n  </header>\n\n  <div class=\"p-400 grid gap-400\">\n    <mds-input-field label=\"Nome\">\n      <mds-input name=\"nome\"></mds-input>\n    </mds-input-field>\n    <mds-input-field label=\"Cognome\">\n      <mds-input name=\"cognome\"></mds-input>\n    </mds-input-field>\n  </div>\n\n  <footer slot=\"bottom\" class=\"p-400 flex gap-300 justify-end bg-surface-overlay shadow-ring-weak\">\n    <mds-button variant=\"dark\" tone=\"outline\" id=\"btn-annulla\">Annulla</mds-button>\n    <mds-button variant=\"primary\" tone=\"strong\" id=\"btn-salva\">Salva</mds-button>\n  </footer>\n</mds-modal>\n```\n\n#### Edge and Corner Positions\n\n`position` anchors the window to an edge or corner and drives the slide-in direction. Use `right` or `left` for side panels, `bottom` for mobile drawers.\n\n```html\n<!-- Side panel from the right (default in most app shells) -->\n<mds-modal id=\"pannello-laterale\" position=\"right\">\n  <div class=\"p-400\">\n    <mds-text>Dettagli del documento</mds-text>\n  </div>\n</mds-modal>\n\n<!-- Drawer from the bottom (mobile) -->\n<mds-modal id=\"drawer-mobile\" position=\"bottom\">\n  <div class=\"p-400\">\n    <mds-text>Azioni disponibili</mds-text>\n  </div>\n</mds-modal>\n```\n\n#### Strict Interaction Mode\n\nSet `interaction=\"strict\"` when the user must explicitly confirm or cancel before the dialog closes - for example, a form with unsaved changes. Backdrop clicks, `Esc` and touch swipes are ignored; only the close button or the `close()` method can dismiss the modal.\n\n```html\n<mds-modal id=\"conferma-elimina\" interaction=\"strict\">\n  <div class=\"p-400 grid gap-400\">\n    <mds-text typography=\"h5\">Eliminare il documento?</mds-text>\n    <mds-text>Questa operazione non e' reversibile.</mds-text>\n    <div class=\"flex gap-300 justify-end\">\n      <mds-button variant=\"dark\" tone=\"outline\" id=\"btn-no\">Annulla</mds-button>\n      <mds-button variant=\"error\" tone=\"strong\" id=\"btn-si\">Elimina</mds-button>\n    </div>\n  </div>\n</mds-modal>\n\n<script>\n  document.getElementById('btn-no').addEventListener('click', () => {\n    document.getElementById('conferma-elimina').close();\n  });\n</script>\n```\n\n#### Programmatic Close via `close()` Method\n\nCall the async `close()` method from JavaScript when you need to dismiss the modal from outside its UI - for example, after a successful async operation.\n\n```html\n<mds-modal id=\"salvataggio\">\n  <div class=\"p-400\">\n    <mds-text>Salvataggio in corso...</mds-text>\n  </div>\n</mds-modal>\n\n<script>\n  async function salva() {\n    const modal = document.getElementById('salvataggio');\n    modal.opened = true;\n    await salvaRisorsa();\n    await modal.close();\n  }\n</script>\n```\n\n#### Listening to Animation Events\n\n`mdsModalShow` fires when the intro animation completes (the modal is fully visible). Use it to focus the first interactive element. `mdsModalHide` fires when the outro animation completes; use it to detach the element or reset content.\n\n```html\n<mds-modal id=\"modal-focus\" position=\"right\">\n  <div class=\"p-400\">\n    <mds-input-field label=\"Cerca\">\n      <mds-input id=\"input-ricerca\" name=\"ricerca\"></mds-input>\n    </mds-input-field>\n  </div>\n</mds-modal>\n\n<script>\n  const modal = document.getElementById('modal-focus');\n  const input = document.getElementById('input-ricerca');\n\n  modal.addEventListener('mdsModalShow', () => {\n    input.setFocus();\n  });\n  modal.addEventListener('mdsModalHide', () => {\n    // safe point to detach or reset content\n    modal.opened = undefined;\n  });\n</script>\n```\n\n#### Custom Animation Styles\n\n`animation` selects the motion style. `'slide'` (default) translates from the entry edge; `'3d'` adds a perspective tilt; `'custom'` delegates entirely to the CSS custom properties `--mds-modal-custom-closed-transform` and `--mds-modal-custom-window-distance`.\n\n```html\n<!-- 3D perspective tilt animation -->\n<mds-modal id=\"modal-3d\" animation=\"3d\" position=\"center\">\n  <div class=\"p-400\">\n    <mds-text>Animazione 3D</mds-text>\n  </div>\n</mds-modal>\n\n<!-- Custom animation driven by CSS vars -->\n<mds-modal id=\"modal-custom\" animation=\"custom\" position=\"center\">\n  <div class=\"p-400\">\n    <mds-text>Animazione personalizzata</mds-text>\n  </div>\n</mds-modal>\n```\n\n#### The Window of a Dialog via the `window` Slot\n\nSlot an element with `slot=\"window\"` to replace the built-in chrome (the window surface and the close button). A dialog slots an [`mds-banner`](../mds-banner/AGENTS.md) `variant=\"light\"` `tone=\"box\"` `dismissible`: its own close button closes the modal. The slotted element gets no `role` of its own: the `<dialog>` the component renders is already the dialog, named by the `aria-label` of the host. The actions follow the rules of a dialog: the secondary one `dark` `outline`, the main one last.\n\nThe window stops at the width of a dialog, the column of a form plus its inset (`--magma-width-dialog`, 580px at 16px, `widths/dialog` of the design language), and shrinks with a narrower screen. Write no width on it: a form keeps in the window the shape it has in the page.\n\nThe headline of the banner is the title of the dialog, in `h5` (`titles/dialog`): the banner takes the style from its place, so write no `typography` on it. It is hidden from screen readers, so the `aria-label` of the host carries the same text.\n\n```html\n<mds-modal id=\"modal-banner\" aria-label=\"Azione richiesta\">\n  <mds-banner slot=\"window\" variant=\"light\" tone=\"box\" dismissible headline=\"Azione richiesta\">\n    <mds-text typography=\"detail\">Conferma la tua identita' per procedere.</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\" tone=\"outline\">Annulla</mds-button>\n    <mds-button slot=\"action\" variant=\"primary\" tone=\"strong\">Conferma</mds-button>\n  </mds-banner>\n</mds-modal>\n```\n\nA bespoke surface, such as a banner as wide as the screen, writes its own width with a class: from the light DOM it wins over the width of a dialog.\n\n```html\n<mds-modal id=\"modal-novita\" aria-label=\"Novita'\">\n  <mds-banner slot=\"window\" class=\"max-w-none\" variant=\"light\" tone=\"box\" dismissible headline=\"Novita'\">\n    <mds-text typography=\"detail\">Da oggi puoi firmare i documenti dall'app.</mds-text>\n  </mds-banner>\n</mds-modal>\n```\n\n#### Disabling the Backdrop\n\nAdd `hide-backdrop` to render the modal without the dimmed overlay - useful for non-blocking side panels that coexist with interactive page content.\n\n```html\n<mds-modal id=\"pannello-info\" position=\"right\" hide-backdrop>\n  <div class=\"p-400\">\n    <mds-text>Informazioni contestuali</mds-text>\n  </div>\n</mds-modal>\n```\n\n```javascript\n// Remove the backdrop from JavaScript (it applies from the next opening)\ndocument.getElementById('pannello-info').hideBackdrop = true;\n```\n\n#### CSS Customization\n\nSize and place the window only through the public `--mds-modal-*` CSS custom properties. Set them on the host element; the window takes its background, radius and shadow from the component. They size the built-in window: a slotted window takes the width of a dialog, or the one its class gives it.\n\n```css\n/* Narrow center modal */\n#modal-card {\n  --mds-modal-window-distance: calc(var(--spacing) * 600);\n  --mds-modal-window-overflow: hidden;\n  --mds-modal-window-max-width: 480px;\n}\n\n/* Full-width drawer */\n#drawer-bottom {\n  --mds-modal-window-max-width: 100%;\n  --mds-modal-window-min-width: 100%;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-modal>`. 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 Set `opened=\"false\"` to Close the Modal\n\nA false boolean is an absent attribute ([`agents/conventions.md`](../../../../agents/conventions.md)). The runtime does parse the string `\"false\"` as `false`, so the modal stays closed, but the attribute is still on the element until the first render, so `[opened]` attribute selectors and any code that reads the attribute see it set. Remove the attribute; from JavaScript set the prop to `undefined` (`false` works too: the component turns it into `undefined`).\n\n```html\n<!-- INCORRECT -->\n<mds-modal id=\"dialogo\" opened=\"false\"></mds-modal>\n\n<!-- CORRECT -->\n<mds-modal id=\"dialogo\"></mds-modal>\n```\n\n#### Do Not Put Content in the `window` Slot Without Replacing the Entire Chrome\n\nThe `window` slot completely bypasses the built-in surface, header/footer regions, and close button. Do not use it to add a header element while expecting the default content area and close button to still render - they will not.\n\n```html\n<!-- INCORRECT: only the slotted header renders; default slot and close button are suppressed -->\n<mds-modal id=\"modal\">\n  <header slot=\"window\" class=\"p-400\">Titolo</header>\n  <div>Contenuto del dialogo</div>\n</mds-modal>\n\n<!-- CORRECT: use slot=\"top\" for a sticky header, default slot for body -->\n<mds-modal id=\"modal\">\n  <header slot=\"top\" class=\"p-400 bg-surface-overlay\">Titolo</header>\n  <div class=\"p-400\">Contenuto del dialogo</div>\n</mds-modal>\n```\n\n#### Do Not Size the Window of a Dialog by Hand\n\nA slotted window already stops at the width of a dialog, the column of a form plus its inset (`widths/dialog`), and shrinks with the screen. A width written by hand copies a value the theme no longer moves, and a narrower one breaks the form inside: at `max-w-md` (448px) the body of the window is under the `28rem` of `field-group`, so its short fields stack as on a phone.\n\n```html\n<!-- INCORRECT -->\n<mds-modal aria-label=\"Nuovo referente\">\n  <mds-banner slot=\"window\" class=\"max-w-md w-full mx-400\" variant=\"light\" tone=\"box\" dismissible headline=\"Nuovo referente\">\n    <fieldset class=\"field-group\">...</fieldset>\n  </mds-banner>\n</mds-modal>\n\n<!-- CORRECT -->\n<mds-modal aria-label=\"Nuovo referente\">\n  <mds-banner slot=\"window\" variant=\"light\" tone=\"box\" dismissible headline=\"Nuovo referente\">\n    <fieldset class=\"field-group\">...</fieldset>\n  </mds-banner>\n</mds-modal>\n```\n\n#### Do Not Reach Into Shadow Parts to Style the Window\n\nThe only supported customization surface is the public `--mds-modal-*` CSS custom properties and the documented shadow parts (`dialog`, `window`, `action-close`). Targeting internal shadow selectors couples your code to implementation details that will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-modal >>> .window-content {\n  padding: 0;\n}\nmds-modal::part(window) > div {\n  border: 2px solid red;\n}\n\n/* CORRECT */\nmds-modal {\n  --mds-modal-window-distance: calc(var(--spacing) * 400);\n}\n```\n\n#### Do Not Listen for Native `click` on the Backdrop to Close\n\n`mds-modal` emits `mdsModalClose` when it closes (and `mdsModalHide` when the animation finishes). Listening for a raw `click` on the host or backdrop is fragile - the event target varies by browser and shadow DOM boundary, and your handler ignores `interaction=\"strict\"`.\n\n```javascript\n// INCORRECT\ndocument.getElementById('modal').addEventListener('click', (e) => {\n  if (e.target === e.currentTarget) modal.opened = undefined;\n});\n\n// CORRECT\ndocument.getElementById('modal').addEventListener('mdsModalClose', () => {\n  modal.opened = undefined;\n});\n```\n\n#### Do Not Use `<dialog>` Directly When `<mds-modal>` Is Available\n\nUsing a raw `<dialog>` element bypasses the system's managed animation, body-scroll locking, touch-swipe dismissal, and design-token theming. Always use `<mds-modal>` for overlays in a Magma application.\n\n```html\n<!-- INCORRECT -->\n<dialog id=\"raw-dialog\">\n  <p>Contenuto del dialogo</p>\n  <button>Chiudi</button>\n</dialog>\n\n<!-- CORRECT -->\n<mds-modal id=\"modal\">\n  <div class=\"p-400\">\n    <mds-text>Contenuto del dialogo</mds-text>\n  </div>\n</mds-modal>\n```\n"
      },
      "props": [
        {
          "name": "accessibleName",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "aria-label",
          "reflectToAttr": false,
          "docs": "The accessible name of the modal: the name a screen reader announces when the window\nopens. The `<dialog>` this component renders is the dialog, so the name goes there.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "animation",
          "type": "\"3d\" | \"custom\" | \"slide\" | undefined",
          "complexType": {
            "original": "ModalAnimationStyleType",
            "resolved": "\"3d\" | \"custom\" | \"slide\" | undefined",
            "references": {
              "ModalAnimationStyleType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-modal/meta/types.ts::ModalAnimationStyleType",
                "referenceLocation": "ModalAnimationStyleType"
              }
            }
          },
          "mutable": false,
          "attr": "animation",
          "reflectToAttr": true,
          "docs": "Specifies the animation style of the modal window",
          "docsTags": [
            {
              "name": "default",
              "text": "'slide'"
            }
          ],
          "default": "'slide'",
          "values": [
            {
              "value": "3d",
              "type": "string"
            },
            {
              "value": "custom",
              "type": "string"
            },
            {
              "value": "slide",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hideBackdrop",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "hide-backdrop",
          "reflectToAttr": true,
          "docs": "Hides the modal backdrop",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "interaction",
          "type": "\"relaxed\" | \"strict\"",
          "complexType": {
            "original": "ModalInteractionType",
            "resolved": "\"relaxed\" | \"strict\"",
            "references": {
              "ModalInteractionType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-modal/meta/types.ts::ModalInteractionType",
                "referenceLocation": "ModalInteractionType"
              }
            }
          },
          "mutable": false,
          "attr": "interaction",
          "reflectToAttr": true,
          "docs": "Specifies if the component can be closed with close button, or also if the backdrop background is cliccked.\nIf `strict` is selected only the close button can dismiss the component via UI.\nIf `relaxed` is selected the component can be dismissed also by clicking the backdrop area: a click\npressed and released on the backdrop, once the window has finished its entry.",
          "docsTags": [
            {
              "name": "default",
              "text": "'relaxed'"
            }
          ],
          "default": "'relaxed'",
          "values": [
            {
              "value": "relaxed",
              "type": "string"
            },
            {
              "value": "strict",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "opened",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "opened",
          "reflectToAttr": true,
          "docs": "Specifies if the modal is opened or not",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "overflow",
          "type": "\"auto\" | \"manual\"",
          "complexType": {
            "original": "ModalOverflowType",
            "resolved": "\"auto\" | \"manual\"",
            "references": {
              "ModalOverflowType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-modal/meta/types.ts::ModalOverflowType",
                "referenceLocation": "ModalOverflowType"
              }
            }
          },
          "mutable": false,
          "attr": "overflow",
          "reflectToAttr": true,
          "docs": "Specifies if the component prevents the body from scrolling when modal window is opened",
          "docsTags": [
            {
              "name": "default",
              "text": "'auto'"
            }
          ],
          "default": "'auto'",
          "values": [
            {
              "value": "auto",
              "type": "string"
            },
            {
              "value": "manual",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "position",
          "type": "\"bottom\" | \"bottom-left\" | \"bottom-right\" | \"center\" | \"left\" | \"right\" | \"top\" | \"top-left\" | \"top-right\" | undefined",
          "complexType": {
            "original": "ModalPositionType",
            "resolved": "\"bottom\" | \"bottom-left\" | \"bottom-right\" | \"center\" | \"left\" | \"right\" | \"top\" | \"top-left\" | \"top-right\" | undefined",
            "references": {
              "ModalPositionType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-modal/meta/types.ts::ModalPositionType",
                "referenceLocation": "ModalPositionType"
              }
            }
          },
          "mutable": true,
          "attr": "position",
          "reflectToAttr": true,
          "docs": "Specifies the animation position of the modal window",
          "docsTags": [
            {
              "name": "default",
              "text": "'center'"
            }
          ],
          "default": "'center'",
          "values": [
            {
              "value": "bottom",
              "type": "string"
            },
            {
              "value": "bottom-left",
              "type": "string"
            },
            {
              "value": "bottom-right",
              "type": "string"
            },
            {
              "value": "center",
              "type": "string"
            },
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            },
            {
              "value": "top",
              "type": "string"
            },
            {
              "value": "top-left",
              "type": "string"
            },
            {
              "value": "top-right",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "close",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "close() => Promise<void>",
          "parameters": [],
          "docs": "Closes the modal.",
          "docsTags": []
        }
      ],
      "events": [
        {
          "event": "mdsModalClose",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is closed",
          "docsTags": []
        },
        {
          "event": "mdsModalHide",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is totally invisible, can be useful to detach the component when it's hidden and gain memory",
          "docsTags": []
        },
        {
          "event": "mdsModalOpen",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is opened, as its intro animation starts: `mdsModalShow` follows once it\nis totally visible",
          "docsTags": []
        },
        {
          "event": "mdsModalShow",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is totally visible, when the modal intro animation is finished",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-modal-custom-closed-transform",
          "annotation": "prop",
          "docs": "Sets the transform position of the custom window when it's outside the viewport, to it's default position",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-custom-window-distance",
          "annotation": "prop",
          "docs": "Set the distance between the slotted modal window and the screen bounds",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-overlay-color",
          "annotation": "prop",
          "docs": "Set the overlay color of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-overlay-opacity",
          "annotation": "prop",
          "docs": "Set the overlay color opacity of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-transition-duration",
          "annotation": "prop",
          "docs": "Sets the `transition-duration` of the modal elements",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-transition-timing-funciton",
          "annotation": "prop",
          "docs": "Deprecated, misspelled name of `--mds-modal-transition-timing-function`; read only when that one is not set",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-transition-timing-function",
          "annotation": "prop",
          "docs": "Sets the `transition-timing-function` of the modal elements",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-window-background",
          "annotation": "prop",
          "docs": "Set the background color of the window",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-window-distance",
          "annotation": "prop",
          "docs": "Set the distance between the modal window and the screen bounds",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-window-max-width",
          "annotation": "prop",
          "docs": "If the viewport is greather than mobile, max-width will be considered with this value;",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-window-min-width",
          "annotation": "prop",
          "docs": "If the viewport is greather than mobile, min-width will be considered with this value;",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-window-overflow",
          "annotation": "prop",
          "docs": "Set the overflow of the window",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-window-radius",
          "annotation": "prop",
          "docs": "Set the border radius of the window",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-window-shadow",
          "annotation": "prop",
          "docs": "Set the box shadow of the window",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-z-index",
          "annotation": "prop",
          "docs": "Set the z-index of the window when the component is opened",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Contents that will be placed in the center of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "bottom",
          "docs": "Contents that will be placed on bottom of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "top",
          "docs": "Contents that will be placed on top of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "window",
          "docs": "Use directly a window component if you need it. Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "action-close",
          "docs": "Selects the close button of the modal."
        },
        {
          "name": "dialog",
          "docs": "The native `<dialog>` that covers the viewport and places the window in it"
        },
        {
          "name": "window",
          "docs": "Selects the default window element of the modal when used."
        }
      ],
      "states": [],
      "dependents": [
        "mds-header",
        "mds-status-bar"
      ],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-modal": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-header": [
          "mds-modal"
        ],
        "mds-status-bar": [
          "mds-modal"
        ]
      },
      "storybook": "ui-modal--docs"
    },
    {
      "filePath": "src/components/mds-note/mds-note.tsx",
      "encapsulation": "shadow",
      "tag": "mds-note",
      "readme": "# mds-note\n\n\n\nThis 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.\n",
      "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": "slot",
          "text": "title - Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-note>` web component is the annotation surface of the Magma Design System: a short, colored sticky-note block used to attach a remark, reminder, or callout to surrounding content. It has no native HTML primitive - it renders as a semantic note region with an optional title and a decorative folded corner.\n\n#### Semantic Behavior\n\n- **Note role**: Exposed to assistive technology as a standalone annotation (`role=\"note\"`) regardless of theme or variant.\n- **Deletable mode**: When `deletable` is set, the component renders an embedded close button; activating it emits the delete event without removing the note itself, leaving the host application in control of dismissal.\n- **Delete event**: `mdsNoteDelete` fires when the close control is activated, signalling intent to cancel or remove the note.\n- **Keyboard handling**: While `deletable`, the close action is keyboard-reachable.\n- **Localized close label**: The close button's accessible title is resolved in the active language (el/en/es/it).\n- **Title vs. body slots**: The named `title` slot holds the note heading; the default slot holds the note body text, HTML, or nested components.\n\n#### Properties & Visual Configurations\n\n- **`deletable`** turns the note from a static annotation into a dismissible one by exposing the close control and its delete event; pick it only when the consuming application is prepared to handle `mdsNoteDelete`.\n\n#### Component-specific variants and tones\n\n`<mds-note>` does **not** use the shared `tone` / `variant` ladders from [`agents/variants.md`](../../../../agents/variants.md). Instead, its `variant` prop selects a flat **color palette** for the note paper (the `ThemeLabelVariantType` set, e.g. `'yellow'`, `'blue'`, `'green'`, `'red'`), defaulting to `'yellow'`. Choose the color to convey the note's category, not a state or a hierarchy of emphasis: a label color never communicates state, for a warning or an error use [`mds-banner`](../mds-banner/AGENTS.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-note>` component, ordered from most common to most specialized. The examples assume a working knowledge of the label-color variants documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Plain Note with Body Text\n\nThe minimal form: a sticky-note block with only body content in the default slot. `variant` defaults to `'yellow'`; omit it when yellow suits the context.\n\n```html\n<mds-note>\n  <mds-text typography=\"detail\">Ricordare di aggiornare le credenziali prima del 30 giugno.</mds-text>\n</mds-note>\n```\n\n#### Note with a Title\n\nUse the named `title` slot for the heading and the default slot for the body. Both slots accept text, HTML elements, and components.\n\n```html\n<mds-note variant=\"blue\">\n  <mds-text typography=\"h5\" slot=\"title\">Nota riunione del 5 giugno</mds-text>\n  <mds-text typography=\"detail\">Confermare la disponibilita' di sala entro venerdi'.</mds-text>\n  <mds-text typography=\"detail\">Invitare anche il responsabile del progetto Synbee.</mds-text>\n</mds-note>\n```\n\n#### Color Variant for Category\n\nChoose `variant` based on the note's category, not on aesthetic preference; a label color never communicates state ([`agents/variants.md`](../../../../agents/variants.md)). All twelve label colors are available.\n\n```html\n<!-- Category: reminders -->\n<mds-note variant=\"yellow\">\n  <mds-text typography=\"detail\">Scadenza domani: inviare il report trimestrale.</mds-text>\n</mds-note>\n\n<!-- Category: approvals -->\n<mds-note variant=\"orange\">\n  <mds-text typography=\"detail\">Approvazione in attesa - contattare il responsabile.</mds-text>\n</mds-note>\n\n<!-- Category: review notes -->\n<mds-note variant=\"sky\">\n  <mds-text typography=\"detail\">Questo blocco e' in sola lettura fino al completamento della revisione.</mds-text>\n</mds-note>\n\n<!-- Category: configuration -->\n<mds-note variant=\"green\">\n  <mds-text typography=\"detail\">Configurazione del modulo fatture: usare il profilo standard.</mds-text>\n</mds-note>\n```\n\n#### Dismissible Note via `deletable`\n\nSet `deletable` to expose the close button. The component emits `mdsNoteDelete` when the button is activated but does not remove itself - the host application is responsible for removal.\n\n```html\n<mds-note variant=\"amaranth\" deletable>\n  <mds-text typography=\"h5\" slot=\"title\">Attenzione</mds-text>\n  <mds-text typography=\"detail\">Questo avviso sparira' una volta confermata l'azione.</mds-text>\n</mds-note>\n```\n\n```javascript\ndocument.querySelector('mds-note').addEventListener('mdsNoteDelete', () => {\n  document.querySelector('mds-note').remove();\n});\n```\n\n#### Styling Customization via CSS Custom Properties\n\nCustomize the note only through the public `--mds-note-*` CSS custom properties. Set them on the host or a parent selector; use Magma color tokens via `rgb(var(--<token>))` so dark mode and high-contrast modes keep working.\n\n```css\n.featured-note mds-note {\n  --mds-note-background: rgb(var(--label-orchid-09));\n  --mds-note-color: rgb(var(--label-orchid-02));\n}\n```\n\n#### Multiple Notes in a Grid\n\nPlace several notes in a layout container; each note is independent and carries its own variant and deletable state.\n\n```html\n<div style=\"display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem;\">\n  <mds-note variant=\"yellow\" deletable>\n    <mds-text typography=\"h6\" slot=\"title\">Da fare</mds-text>\n    <mds-text typography=\"detail\">Revisionare il capitolato prima di lunedi'.</mds-text>\n  </mds-note>\n  <mds-note variant=\"lime\">\n    <mds-text typography=\"h6\" slot=\"title\">Completato</mds-text>\n    <mds-text typography=\"detail\">Migrazione database eseguita con successo.</mds-text>\n  </mds-note>\n  <mds-note variant=\"red\" deletable>\n    <mds-text typography=\"h6\" slot=\"title\">Bloccante</mds-text>\n    <mds-text typography=\"detail\">Servizio di autenticazione non raggiungibile in produzione.</mds-text>\n  </mds-note>\n</div>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-note>`. 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 Remove the Note Directly - Listen for `mdsNoteDelete`\n\nThe component emits `mdsNoteDelete` when the close button is activated; it never removes itself. Removing the element without listening to the event means deletable notes can never be dismissed, while bypassing the event skips any cleanup logic the host application needs to run.\n\n```html\n<!-- INCORRECT: close button present but nothing removes the note -->\n<mds-note variant=\"yellow\" deletable>\n  <mds-text typography=\"detail\">Questa nota non sparira' mai.</mds-text>\n</mds-note>\n\n<!-- CORRECT: listen for the event and remove programmatically -->\n<mds-note id=\"nota-avviso\" variant=\"yellow\" deletable>\n  <mds-text typography=\"detail\">Chiudi per rimuovere questa nota.</mds-text>\n</mds-note>\n<script>\n  document.getElementById('nota-avviso').addEventListener('mdsNoteDelete', (e) => {\n    e.target.remove();\n  });\n</script>\n```\n\n#### Do Not Use `variant` Values from the Status or Brand Ladders\n\n`<mds-note>` uses `ThemeLabelVariantType` - the twelve decorative label colors (`yellow`, `blue`, `green`, `red`, `orange`, `sky`, `violet`, `lime`, `aqua`, `orchid`, `purple`, `amaranth`). Status values (`info`, `success`, `warning`, `error`) and brand values (`primary`, `secondary`) are not part of this type and silently fall back to the yellow base, breaking the intended color. A label color never communicates state: a status message is an [`mds-banner`](../mds-banner/AGENTS.md).\n\n```html\n<!-- INCORRECT: status variant not accepted by mds-note -->\n<mds-note variant=\"warning\">\n  <mds-text typography=\"detail\">Operazione in corso.</mds-text>\n</mds-note>\n\n<!-- CORRECT: a state is a banner with a status variant -->\n<mds-banner variant=\"warning\">\n  <mds-text typography=\"detail\">Operazione in corso.</mds-text>\n</mds-banner>\n```\n\n#### Do Not Put the Title in the Default Slot\n\nThe component provides a dedicated named `title` slot for the note heading. Placing a heading element in the default slot renders it inside the body content area, without the fixed position of the `title` slot, which is always rendered before the body whatever the source order.\n\n```html\n<!-- INCORRECT: heading mixed into default body slot -->\n<mds-note variant=\"blue\">\n  <mds-text typography=\"h5\">Nota importante</mds-text>\n  <mds-text typography=\"detail\">Dettagli dell'annotazione qui.</mds-text>\n</mds-note>\n\n<!-- CORRECT: heading goes in the title slot -->\n<mds-note variant=\"blue\">\n  <mds-text typography=\"h5\" slot=\"title\">Nota importante</mds-text>\n  <mds-text typography=\"detail\">Dettagli dell'annotazione qui.</mds-text>\n</mds-note>\n```\n\n#### Do Not Set `deletable=\"false\"` to Disable the Close Button\n\n`deletable` is a boolean attribute, and a false boolean is an absent attribute ([`agents/conventions.md`](../../../../agents/conventions.md)). The runtime parses the string `\"false\"` as `false` and hides the button, but the prop is not reflected, so the attribute stays on the element and `[deletable]` selectors or any code that reads the markup see a deletable note. Remove the attribute entirely to hide it.\n\n```html\n<!-- INCORRECT: the attribute still says the note is deletable -->\n<mds-note variant=\"green\" deletable=\"false\">\n  <mds-text typography=\"detail\">Questa nota dovrebbe essere fissa.</mds-text>\n</mds-note>\n\n<!-- CORRECT: omit the attribute -->\n<mds-note variant=\"green\">\n  <mds-text typography=\"detail\">Questa nota e' fissa.</mds-text>\n</mds-note>\n```\n\n#### Do Not Style the Note with Arbitrary CSS or Tailwind Utilities\n\nThe only supported customization surface is the documented `--mds-note-*` CSS custom properties. Applying Tailwind background utilities or raw color values couples the note's appearance to the utility layer and breaks dark mode and high-contrast handling.\n\n```css\n/* INCORRECT */\nmds-note {\n  background-color: #fffacd;\n  color: #3a3000;\n}\n\n/* CORRECT */\nmds-note {\n  --mds-note-background: rgb(var(--label-yellow-09));\n  --mds-note-color: rgb(var(--label-yellow-02));\n}\n```\n"
      },
      "props": [
        {
          "name": "deletable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "deletable",
          "reflectToAttr": false,
          "docs": "Enables the cross icon to perform cancel/delete action on element",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"amaranth\" | \"aqua\" | \"blue\" | \"green\" | \"lime\" | \"orange\" | \"orchid\" | \"purple\" | \"red\" | \"sky\" | \"violet\" | \"yellow\" | undefined",
          "complexType": {
            "original": "ThemeLabelVariantType",
            "resolved": "\"amaranth\" | \"aqua\" | \"blue\" | \"green\" | \"lime\" | \"orange\" | \"orchid\" | \"purple\" | \"red\" | \"sky\" | \"violet\" | \"yellow\" | undefined",
            "references": {
              "ThemeLabelVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeLabelVariantType",
                "referenceLocation": "ThemeLabelVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the color variant for the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'yellow'"
            }
          ],
          "default": "'yellow'",
          "values": [
            {
              "value": "amaranth",
              "type": "string"
            },
            {
              "value": "aqua",
              "type": "string"
            },
            {
              "value": "blue",
              "type": "string"
            },
            {
              "value": "green",
              "type": "string"
            },
            {
              "value": "lime",
              "type": "string"
            },
            {
              "value": "orange",
              "type": "string"
            },
            {
              "value": "orchid",
              "type": "string"
            },
            {
              "value": "purple",
              "type": "string"
            },
            {
              "value": "red",
              "type": "string"
            },
            {
              "value": "sky",
              "type": "string"
            },
            {
              "value": "violet",
              "type": "string"
            },
            {
              "value": "yellow",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsNoteDelete",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the note has to be cancelled",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-note-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-note-color",
          "annotation": "prop",
          "docs": "Sets the text color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-note-fold-color",
          "annotation": "prop",
          "docs": "Sets the color of the fold decoration at the bottom right of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-note-fold-size",
          "annotation": "prop",
          "docs": "Sets the size of the fold decoration at the bottom right of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-note-selection-background",
          "annotation": "prop",
          "docs": "Sets the selection text background-color of the component",
          "visibility": "internal"
        },
        {
          "name": "--mds-note-selection-color",
          "annotation": "prop",
          "docs": "Sets the selection text color of the component",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "title",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-note": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-note--docs"
    },
    {
      "filePath": "src/components/mds-notification/mds-notification.tsx",
      "encapsulation": "shadow",
      "tag": "mds-notification",
      "readme": "# mds-notification\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "feedback"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-notification>` web component is a numeric badge/dot indicator of the Magma Design System that attaches to another element (an icon, a button, an avatar) to signal a count of pending items. It has no HTML primitive equivalent: it positions itself relative to a target element rather than wrapping content of its own.\n\n#### Semantic Behavior\n\n- **Target attachment**: The component anchors to the element matched by the `target` selector and tracks it as it scrolls or resizes.\n- **Missing target falls back**: If `target` is not set, positioning is disabled; if `target` is set but resolves to no element, it logs a console warning (`mds-notification: no valid target found`) and falls back to `strategy=\"disabled\"` as well.\n- **Zero value**: When `value` is `0` the badge renders without a number, as a plain dot; it is not hidden.\n- **Count overflow**: When `max` is set and `value` exceeds it, the displayed text becomes `+max` (e.g. `+9`) instead of the raw number; otherwise the value is locale-formatted.\n- **Pulse**: With `pulse`, the dot calls attention when `value` grows: a ring grows from it and fades, three beats and then still (3 seconds, under the 5 of WCAG 2.2.2). It never plays on the first render, nor when the count goes down, nor with a reduced animation (`pref-animation=\"reduce\"`, or the reduced motion of the system); a growth while it plays does not start it over.\n- **Accessibility**: The count describes the target (`aria-describedby` on it, next to the descriptions it already has), so a screen reader reads it with the element it sits on; the badge itself is then hidden from assistive technologies, or the count would be read twice. A dismissed badge, a plain dot and a target in another shadow tree describe nothing. Without a target the count is plain text, read with whatever contains it (the name of the `mds-button` it sits in).\n\n#### Properties & Visual Configurations\n\n- **`target`** is the CSS selector of the element the badge anchors to; it is effectively mandatory for positioned rendering.\n- **`value`** is the count shown in the badge and also the description of the target; `0` shows a plain dot without a number.\n- **`max`** caps the visible number - pick it when raw counts could grow large and you want a compact `+N` ceiling.\n- **`variant`** is the colour of the dot and of the badge, a status (`docs/agents/variants.md`): `error`, the danger colour, by default; `info` for something new that is not wrong, such as the items others added to a list; `success` and `warning`. The ink of the count follows the fill.\n- **`pulse`** makes the dot pulse when its count grows; leave it off on a count that grows all the time, where every message would call attention.\n- **`dismissed`** hides the badge independently of its value (the badge is shown by default): with the floating strategies (`fixed`, `absolute`) it scales out, with `disabled` it is taken out of the layout at once.\n\n#### Other behavioral props\n\n- **`strategy`** selects the positioning mode (`'fixed'` by default, `'absolute'`, or `'disabled'`). Use `'disabled'` to opt out of dynamic tracking; it is also set automatically when no `target` is provided.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-notification>` 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#### Badge Inside `mds-button` via Named Slot\n\nThe most common usage. Drop `<mds-notification>` into the `notification` slot of [`mds-button`](../mds-button/AGENTS.md) so the badge is positioned and animated automatically by the button's internal layout. Set `strategy=\"disabled\"` because the button handles placement (without a `target` the component also switches to it by itself); the component is no longer responsible for floating positioning.\n\n```html\n<mds-button label=\"Messaggi\" icon=\"mdi/email\" variant=\"primary\" tone=\"weak\">\n  <mds-notification slot=\"notification\" value=\"5\" strategy=\"disabled\"></mds-notification>\n</mds-button>\n```\n\n#### Floating Badge Anchored to an Arbitrary Element\n\nUse the `target` prop with a CSS selector to attach a floating badge to any element on the page. The component uses `position: fixed` by default and tracks the target through scroll and resize automatically.\n\n```html\n<mds-notification target=\"#icona-notifiche\" value=\"12\"></mds-notification>\n<mds-icon id=\"icona-notifiche\" name=\"mi/baseline/notifications\"></mds-icon>\n```\n\n#### Count Overflow via `max`\n\nWhen raw counts can grow large, set `max` to cap the visible number. Values above the cap display as `+max` (e.g. `+99`), keeping the badge compact.\n\n```html\n<mds-notification target=\"#posta-in-arrivo\" value=\"127\" max=\"99\"></mds-notification>\n<mds-icon id=\"posta-in-arrivo\" name=\"mi/baseline/mail\"></mds-icon>\n```\n\n#### Hiding and Showing the Badge\n\nAdd the `dismissed` prop to hide the badge independently of its count. This is useful when the notification state is known but should not be displayed yet - for example while a panel is already open.\n\n```html\n<!-- Badge nascosto anche se ha un valore -->\n<mds-notification target=\"#avatar-utente\" value=\"3\" dismissed></mds-notification>\n\n<!-- Badge visibile (valore predefinito) -->\n<mds-notification target=\"#avatar-utente\" value=\"3\"></mds-notification>\n```\n\n#### Zero Value Produces an Empty Dot\n\nWhen `value` is `0` the badge renders without a number, appearing as a plain dot. Use this when you need an unread marker without a count - for example to signal new activity without exposing a specific number.\n\n```html\n<mds-notification target=\"#attivita-recente\" value=\"0\"></mds-notification>\n<mds-button id=\"attivita-recente\" label=\"Attivita\" variant=\"primary\" tone=\"weak\"></mds-button>\n```\n\n#### Info Dot That Pulses When the Count Grows, in a Line of Text\n\nUse `variant=\"info\"` with `pulse` to call attention to new items without moving anything on screen, such as the items others added to a list while the person works through it. Without a `target` the badge sits in the line, and its count is read with the words around it: keep it inside the text that says what is new, the one with `role=\"status\"`, so the number is read out when it changes, and the action outside it. The dot pulses each time `value` grows, three beats and then still.\n\n```html\n<div class=\"flex items-center gap-200\">\n  <p role=\"status\" class=\"flex items-center gap-100\">\n    <mds-notification variant=\"info\" value=\"3\" pulse></mds-notification>\n    <mds-text typography=\"detail\">nuove pratiche</mds-text>\n  </p>\n  <mds-button variant=\"info\" tone=\"outline\" size=\"sm\">Mostra</mds-button>\n</div>\n```\n\n```js\n// the count grows: the dot pulses\ndocument.querySelector('mds-notification').value = 5;\n```\n\n#### Absolute Positioning Strategy\n\nUse `strategy=\"absolute\"` when the badge must be positioned relative to a scrolling container rather than the viewport. The target element must have `position: relative` (or another non-static position) set on its nearest containing block.\n\n```html\n<div style=\"position: relative; overflow: auto;\">\n  <mds-notification target=\"#elemento-lista\" value=\"2\" strategy=\"absolute\"></mds-notification>\n  <mds-button id=\"elemento-lista\" label=\"Documenti\" variant=\"primary\"></mds-button>\n</div>\n```\n\n#### Disabled Strategy for Manual Placement\n\nUse `strategy=\"disabled\"` when you want to position the badge yourself with utility classes or CSS instead of delegating to the floating-UI engine. This is the right choice whenever the badge lives inside a slot (the slot's host already controls layout) or when you use Tailwind position utilities.\n\n```html\n<mds-button label=\"Avvisi\" icon=\"mi/baseline/notifications\" variant=\"primary\" tone=\"strong\">\n  <mds-notification\n    slot=\"notification\"\n    value=\"4\"\n    strategy=\"disabled\"\n  ></mds-notification>\n</mds-button>\n```\n\n#### Styling Customization via CSS Custom Properties\n\nCustomize the badge only through its public `--mds-notification-*` CSS custom properties, the ink color and the size; the fill and the ring of the dot come from the component, the fill from its `variant`. Set them on the host element or a parent selector. Use the Magma color tokens with `rgb(var(--<token>))` so dark mode and high-contrast stay consistent.\n\n```css\n/* Badge piu' grande, inchiostro abbinato al riempimento di stato */\n.header-nav mds-notification {\n  --mds-notification-color: rgb(var(--magma-danger-on-emphasis));\n  --mds-notification-size: 18px;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-notification>`. 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 a Floating Strategy When Slotted Inside `mds-button`\n\nWhen `<mds-notification>` sits inside the `notification` slot of [`mds-button`](../mds-button/AGENTS.md), the button's own layout handles placement. Without a `target` the component switches itself to `strategy=\"disabled\"`; giving it a `target` turns floating positioning back on, so the badge escapes the slot and positions itself relative to the viewport instead.\n\n```html\n<!-- INCORRECT -->\n<mds-button id=\"btn-messaggi\" label=\"Messaggi\" icon=\"mdi/email\" variant=\"primary\">\n  <mds-notification slot=\"notification\" target=\"#btn-messaggi\" value=\"5\"></mds-notification>\n</mds-button>\n\n<!-- CORRECT -->\n<mds-button id=\"btn-messaggi\" label=\"Messaggi\" icon=\"mdi/email\" variant=\"primary\">\n  <mds-notification slot=\"notification\" value=\"5\" strategy=\"disabled\"></mds-notification>\n</mds-button>\n```\n\n#### Do Not Omit `target` When Using a Floating Strategy\n\nWithout `target`, the component cannot locate its anchor, automatically falls back to `strategy=\"disabled\"`, and renders in document flow wherever the tag appears - usually in the wrong place.\n\n```html\n<!-- INCORRECT -->\n<mds-notification value=\"3\"></mds-notification>\n<mds-icon id=\"icona-posta\" name=\"mi/baseline/mail\"></mds-icon>\n\n<!-- CORRECT -->\n<mds-notification target=\"#icona-posta\" value=\"3\"></mds-notification>\n<mds-icon id=\"icona-posta\" name=\"mi/baseline/mail\"></mds-icon>\n```\n\n#### Do Not Use `<mds-notification>` as a Status Dot Without a Count\n\n`<mds-notification>` is a numeric counter badge. For a purely visual status indicator with no count, use [`mds-badge`](../mds-badge/AGENTS.md) instead, which is designed for short status labels.\n\n```html\n<!-- INCORRECT - abusing notification as a plain dot indicator -->\n<mds-notification target=\"#utente-online\" value=\"0\"></mds-notification>\n\n<!-- CORRECT - use mds-badge for status dots -->\n<mds-badge variant=\"success\" label=\"Online\"></mds-badge>\n```\n\n#### Do Not Animate the Dot Yourself\n\nA pulse written by the page, with a keyframe, a scale and an opacity of its own, ignores the animation preference and never stops. `pulse` plays three beats when the count grows, and none with a reduced animation.\n\n```html\n<!-- INCORRECT -->\n<mds-notification class=\"animate-ping\" variant=\"info\" value=\"3\"></mds-notification>\n\n<!-- CORRECT -->\n<mds-notification variant=\"info\" value=\"3\" pulse></mds-notification>\n```\n\n#### Do Not Wrap the Target in a Relative Container and Use `strategy=\"fixed\"`\n\n`strategy=\"fixed\"` anchors the badge to the viewport coordinate system. If the target sits inside a CSS-transformed or `position: relative` parent, `fixed` positioning will not track it correctly. Switch to `strategy=\"absolute\"` and ensure the containing block has a non-static position.\n\n```html\n<!-- INCORRECT - fixed badge inside transformed container -->\n<div style=\"transform: translateX(0);\">\n  <mds-notification target=\"#btn-azioni\" value=\"2\" strategy=\"fixed\"></mds-notification>\n  <mds-button id=\"btn-azioni\" label=\"Azioni\"></mds-button>\n</div>\n\n<!-- CORRECT - absolute strategy with positioned containing block -->\n<div style=\"position: relative;\">\n  <mds-notification target=\"#btn-azioni\" value=\"2\" strategy=\"absolute\"></mds-notification>\n  <mds-button id=\"btn-azioni\" label=\"Azioni\"></mds-button>\n</div>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Inner Dot\n\nThe internal `.dot` element is not a documented `::part()`. Targeting it with `::part(dot)` or deep-selector hacks breaks on any internal refactor. The dot keeps the fill the component gives it, from its `variant`: adjust only what the public `--mds-notification-color` and `--mds-notification-size` CSS custom properties expose.\n\n```css\n/* INCORRECT */\nmds-notification::part(dot) {\n  background-color: purple;\n}\n\n/* CORRECT */\nmds-notification {\n  --mds-notification-size: calc(var(--spacing) * 600);\n}\n```\n"
      },
      "props": [
        {
          "name": "dismissed",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": true,
          "attr": "dismissed",
          "reflectToAttr": true,
          "docs": "Specifies if the notification is dismissed",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "max",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "max",
          "reflectToAttr": true,
          "docs": "Specifies the maximum number that can be seen, assuming that the number is for example 9 and that this is exceeded with 15, the component shows +9",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "pulse",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "pulse",
          "reflectToAttr": false,
          "docs": "Specifies if the dot pulses when `value` grows: a ring that grows from it and fades, three\nbeats and then still. Never on the first render, nor with a reduced animation",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "strategy",
          "type": "\"absolute\" | \"disabled\" | \"fixed\"",
          "complexType": {
            "original": "StrategyType",
            "resolved": "\"absolute\" | \"disabled\" | \"fixed\"",
            "references": {
              "StrategyType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-notification/meta/types.ts::StrategyType",
                "referenceLocation": "StrategyType"
              }
            }
          },
          "mutable": true,
          "attr": "strategy",
          "reflectToAttr": true,
          "docs": "Specifies the position strategy of the notification",
          "docsTags": [
            {
              "name": "default",
              "text": "'fixed'"
            }
          ],
          "default": "'fixed'",
          "values": [
            {
              "value": "absolute",
              "type": "string"
            },
            {
              "value": "disabled",
              "type": "string"
            },
            {
              "value": "fixed",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "target",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "target",
          "reflectToAttr": false,
          "docs": "Specifies the selector of the target element, this attribute is used with `querySelector` method.",
          "docsTags": [
            {
              "name": "example",
              "text": "'#profile-button'"
            }
          ],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": true,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "Specifies the number of notifications to display. At 0 the badge shows no number, as an\nempty dot: it is not hidden, `dismissed` takes it off its target",
          "docsTags": [
            {
              "name": "default",
              "text": "0"
            }
          ],
          "default": "0",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"error\" | \"info\" | \"success\" | \"warning\"",
          "complexType": {
            "original": "ThemeStatusVariantType",
            "resolved": "\"error\" | \"info\" | \"success\" | \"warning\"",
            "references": {
              "ThemeStatusVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeStatusVariantType",
                "referenceLocation": "ThemeStatusVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the colour of the dot and of the badge, a status: `error`, the danger colour, by\ndefault; `info` for something new that is not wrong, `success` and `warning`",
          "docsTags": [
            {
              "name": "default",
              "text": "'error'"
            }
          ],
          "default": "'error'",
          "values": [
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-notification-color",
          "annotation": "prop",
          "docs": "The text/icon color of the notification component.",
          "visibility": "public"
        },
        {
          "name": "--mds-notification-dot-background",
          "annotation": "prop",
          "docs": "The background color of the notification dot.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-dot-padding",
          "annotation": "prop",
          "docs": "The padding around the notification dot.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-min-width",
          "annotation": "prop",
          "docs": "The minimum width of the notification component.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-pulse-duration",
          "annotation": "prop",
          "docs": "Duration of one beat of the pulse.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-pulse-spread",
          "annotation": "prop",
          "docs": "How far the ring of the pulse grows past the ring of the dot.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-ring-color",
          "annotation": "prop",
          "docs": "The color of the notification ring.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-ring-size",
          "annotation": "prop",
          "docs": "The thickness of the notification ring.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-size",
          "annotation": "prop",
          "docs": "The base size of the notification element.",
          "visibility": "public"
        },
        {
          "name": "--mds-notification-transition-duration",
          "annotation": "prop",
          "docs": "Duration of notification transitions.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-transition-timing-function",
          "annotation": "prop",
          "docs": "Timing function for notification transitions.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-translate",
          "annotation": "prop",
          "docs": "The CSS transform applied for notification positioning.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-translate-offset-x",
          "annotation": "prop",
          "docs": "X-axis offset factor for notification translation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-notification-translate-offset-y",
          "annotation": "prop",
          "docs": "Y-axis offset factor for notification translation.",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-notification": [
          "mds-text"
        ]
      },
      "storybook": "ui-notification--docs"
    },
    {
      "filePath": "src/components/mds-paginator/mds-paginator.tsx",
      "encapsulation": "shadow",
      "tag": "mds-paginator",
      "readme": "# mds-paginator\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "navigation"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-paginator>` web component is the page-navigation control of the Magma Design System. It renders a horizontal strip of numbered page items framed by previous/next arrows, replacing an ad-hoc set of links or buttons with a single self-managing control.\n\n#### Semantic Behavior\n\n- **Self-rendered children**: The paginator generates its own page items internally from `pages`; authors do not slot the items.\n- **Page change event**: Selecting a page (or an arrow) emits `mdsPaginatorChange` with a detail of `{ page, caller }`, where `caller` is the `mds-paginator-item` that triggered the change.\n- **Bounds clamping**: Navigation requests below `1` or above `pages` are ignored, so the arrows can never move past the valid range.\n- **Arrow disabling**: The back arrow is disabled on the first page and the forward arrow on the last page; a disabled arrow leaves the tab order.\n- **Arrow names**: The arrows are icon-only buttons, named in the page language (the `lang` of `<html>`): \"Previous page\" and \"Next page\".\n- **Auto-scroll into view**: When `pages` exceeds two, the strip scrolls so the active page is centered; selecting an item re-centers it, and so does focusing an item from the keyboard (tabbing through the pages). Pointer interaction never scrolls the strip before the click lands, so the clicked page is always the one selected. Scroll motion is themeable via `--mds-paginator-scroll-behavior`.\n- **Initial sync**: On load the component navigates to the provided `currentPage`, emitting the change event and scrolling the strip to match.\n\n#### Properties & Visual Configurations\n\n- **`pages`** is the total number of pages the control should represent and drives how many items are rendered; with `0` only the arrows appear.\n- **`currentPage`** marks which item is selected and which arrows are disabled; set it to control the paginator from outside, or read it back after a `mdsPaginatorChange` to follow user navigation.\n\nThis component does not use the shared `variant` / `tone` ladders defined in [`agents/variants.md`](../../../../agents/variants.md); its appearance is tuned only through the CSS custom properties documented in [`AGENTS.md`](AGENTS.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-paginator>` 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 Paginator\n\nProvide `pages` with the total number of pages. The component renders all items and the previous/next arrows automatically. The `pages` prop is all that is required for a working paginator.\n\n```html\n<mds-paginator pages=\"20\"></mds-paginator>\n```\n\n#### Starting on a Specific Page\n\nSet `current-page` to pre-select an initial page. On load the component emits `mdsPaginatorChange` and scrolls the strip to center the active item.\n\n```html\n<mds-paginator pages=\"32\" current-page=\"16\"></mds-paginator>\n```\n\n#### Listening to Page Changes\n\nListen for `mdsPaginatorChange` to react to navigation. The event detail carries `{ page, caller }` where `page` is the newly selected page number and `caller` is the `mds-paginator-item` that triggered the change.\n\n```html\n<mds-paginator id=\"pager\" pages=\"10\"></mds-paginator>\n\n<script>\n  document.getElementById('pager').addEventListener('mdsPaginatorChange', (e) => {\n    const nuovaPagina = e.detail.page;\n    // Aggiorna la tabella o la lista con i dati della nuova pagina\n    caricaDati(nuovaPagina);\n  });\n</script>\n```\n\n#### Controlled Navigation from Outside\n\nWrite `current-page` programmatically to drive the paginator from application state - for example when a search resets pagination to page 1.\n\n```html\n<mds-paginator id=\"pager\" pages=\"15\" current-page=\"1\"></mds-paginator>\n\n<script>\n  function resettaPaginazione() {\n    document.getElementById('pager').currentPage = 1;\n  }\n</script>\n```\n\n#### Single-Page and Two-Page Edge Cases\n\nWhen `pages` is `1` only the first/last item and the arrows appear (the scrollable strip is omitted). When `pages` is `2` both the first and last items render without the strip. Both are valid states - pass the real page count without special-casing.\n\n```html\n<!-- Una sola pagina: solo gli arrow e la pagina 1 -->\n<mds-paginator pages=\"1\"></mds-paginator>\n\n<!-- Due pagine: pagina 1 e pagina 2, nessuna strip -->\n<mds-paginator pages=\"2\"></mds-paginator>\n```\n\n#### Styling the Page Strip Background\n\nOverride `--mds-paginator-background` on the host to change the background of the scrollable pages area. Use a Magma color token wrapped in `rgb(var(...))` so dark mode keeps working.\n\n```css\n.mia-tabella mds-paginator {\n  --mds-paginator-background: rgb(var(--magma-wash-strong));\n}\n```\n\n#### Disabling Scroll Animation\n\nSet `--mds-paginator-scroll-behavior` to `auto` to remove the animated scroll when jumping between pages - useful for contexts that already honour `prefers-reduced-motion` at application level.\n\n```css\n.stampa mds-paginator {\n  --mds-paginator-scroll-behavior: auto;\n}\n```\n\n#### Styling Individual Items\n\nThe items the paginator renders live in its shadow DOM and expose no shadow parts, but they inherit their public `--mds-paginator-item-*` CSS custom properties, documented on [`mds-paginator-item`](../mds-paginator-item/AGENTS.md): set them on the `mds-paginator` host (or a parent selector) to restyle every page item at once. Use the semantic color roles so dark mode keeps working.\n\n```css\n.archivio mds-paginator {\n  --mds-paginator-item-radius: var(--magma-radius-md);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-paginator>`. 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 Slot `mds-paginator-item` Manually\n\n`<mds-paginator>` generates all its child items from the `pages` prop and accepts no slots. Manually added `<mds-paginator-item>` children are never rendered, so they have no effect.\n\n```html\n<!-- INCORRECT -->\n<mds-paginator pages=\"5\">\n  <mds-paginator-item selected>3</mds-paginator-item>\n</mds-paginator>\n\n<!-- CORRECT -->\n<mds-paginator pages=\"5\" current-page=\"3\"></mds-paginator>\n```\n\n#### Do Not Use `mds-paginator-item` Outside `mds-paginator`\n\n`<mds-paginator-item>` is an internal sub-part. Its `disabled`, `selected`, and `icon` props are managed exclusively by the parent. Using it standalone produces controls that look like page items but do nothing: the page logic lives in the parent.\n\n```html\n<!-- INCORRECT -->\n<mds-paginator-item>1</mds-paginator-item>\n<mds-paginator-item selected>2</mds-paginator-item>\n\n<!-- CORRECT -->\n<mds-paginator pages=\"5\" current-page=\"2\"></mds-paginator>\n```\n\n#### Do Not Set `pages` to Zero to \"Hide\" the Paginator\n\nWhen `pages` is `0` only the two arrows render, which is visually incomplete and confusing. To conditionally hide the paginator, remove it from the DOM entirely or set `display: none` on the host.\n\n```html\n<!-- INCORRECT -->\n<mds-paginator pages=\"0\"></mds-paginator>\n\n<!-- CORRECT: create the paginator only when there are pages -->\n<div id=\"paginazione\"></div>\n<script>\n  if (totalePagine > 0) {\n    const pager = document.createElement('mds-paginator');\n    pager.pages = totalePagine;\n    document.getElementById('paginazione').append(pager);\n  }\n</script>\n```\n\n#### Do Not Listen for Native `click` to Detect Page Changes\n\nA native `click` bubbles out of the shadow DOM for any click on the control, but it carries no page number. Use the documented `mdsPaginatorChange` event instead, which carries the selected page number in `event.detail.page`.\n\n```html\n<!-- INCORRECT -->\n<mds-paginator id=\"pager\" pages=\"10\"></mds-paginator>\n<script>\n  document.getElementById('pager').addEventListener('click', (e) => {\n    // detail.page is undefined - this is the wrong event\n    console.log(e.detail?.page);\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-paginator id=\"pager\" pages=\"10\"></mds-paginator>\n<script>\n  document.getElementById('pager').addEventListener('mdsPaginatorChange', (e) => {\n    console.log(e.detail.page);\n  });\n</script>\n```\n\n#### Do Not Pierce Shadow DOM to Style Items\n\nInternal `mds-paginator-item` elements live in shadow DOM. Targeting them with `>>>`, `/deep/`, or unrecognised `::part()` names breaks on any release. Use the documented `--mds-paginator-*` CSS custom properties on the host instead, the `--mds-paginator-item-*` ones included: the items inherit them.\n\n```css\n/* INCORRECT */\nmds-paginator >>> mds-paginator-item {\n  border-radius: 4px;\n}\n\n/* CORRECT */\nmds-paginator {\n  --mds-paginator-background: rgb(var(--magma-wash-strong));\n  --mds-paginator-item-radius: var(--magma-radius-sm);\n}\n```\n"
      },
      "props": [
        {
          "name": "currentPage",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": true,
          "attr": "current-page",
          "reflectToAttr": true,
          "docs": "Specifies the current page selected in the paginator",
          "docsTags": [
            {
              "name": "default",
              "text": "1"
            }
          ],
          "default": "1",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "pages",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "pages",
          "reflectToAttr": false,
          "docs": "Specifies the number of total pages to be handled",
          "docsTags": [
            {
              "name": "default",
              "text": "0"
            }
          ],
          "default": "0",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsPaginatorChange",
          "detail": "MdsPaginatorEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPaginatorEventDetail",
            "resolved": "MdsPaginatorEventDetail",
            "references": {
              "MdsPaginatorEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-paginator/meta/event-detail.ts::MdsPaginatorEventDetail",
                "referenceLocation": "MdsPaginatorEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a page is changed",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-paginator-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the pages area, behind the items",
          "visibility": "public"
        },
        {
          "name": "--mds-paginator-scroll-behavior",
          "annotation": "prop",
          "docs": "Sets the scroll-behavior animation",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-paginator-item"
      ],
      "dependencyGraph": {
        "mds-paginator": [
          "mds-paginator-item"
        ],
        "mds-paginator-item": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "ui-paginator--docs"
    },
    {
      "filePath": "src/components/mds-paginator-item/mds-paginator-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-paginator-item",
      "readme": "# mds-paginator-item\n\n\n\nThis 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.\n",
      "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": "parent",
          "text": "mds-paginator"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-paginator-item>` web component is a compound child of [`<mds-paginator>`](../mds-paginator/AGENTS.md) that renders a single clickable cell of the pagination control: either a numbered page or a navigation arrow. It has no standalone meaning and exists only to be orchestrated by its parent, which owns page state and emits the page-change event.\n\n#### Semantic Behavior\n\n- **Compound child only**: It is rendered exclusively by `<mds-paginator>` (one per page number plus the back/forward arrows) and is not used standalone or mixed with other child types; the parent manages count, ordering, scrolling, and selection.\n- **State is parent-driven**: `selected` and `disabled` are not set by the consumer - the parent reflects them based on `currentPage` and the page boundaries, and the item only renders the resulting visual state.\n- **Click reported upward**: The item carries no internal page logic; clicking it is resolved by the parent, which emits `mdsPaginatorChange`.\n- **Keyboard activation**: The item is a button (`role=\"button\"`) that Enter and Space activate, but only while it is neither `disabled` nor `selected`. A `disabled` item leaves the tab order and carries `aria-disabled=\"true\"`; the `selected` one stays in it, as the current page (`aria-current=\"page\"`), and ignores activation.\n- **Icon vs. text rendering**: When `icon` is set the item renders an icon (used for the back/forward arrows); otherwise it renders the default slot as the page number.\n- **Text-only slot**: The default slot is meant for a plain text string (a page number); HTML elements or nested components should not be placed in it.\n\n#### Properties & Visual Configurations\n\nThis child exposes only three props, none of which a consumer normally sets directly:\n\n- **`icon`**: Provide an icon name to turn the cell into a navigation control (the parent passes the back/forward arrows); leave it unset for a numbered page that uses the text slot instead.\n- **`selected`**: Marks the cell as the current page. Set by the parent only; it switches the item to its selected visual treatment and makes it inert.\n- **`disabled`**: Marks the cell as unavailable (e.g. the back arrow on page 1, the forward arrow on the last page). Set by the parent only; it blocks activation and applies the disabled styling.\n\nVisual appearance (size, radius, colors, shadows for the default, hover, selected, and disabled states) is set through the `--mds-paginator-item-*` CSS custom properties listed in [`AGENTS.md`](AGENTS.md) rather than through props. The items live in the shadow DOM of `mds-paginator`, so set them on the paginator (or a parent selector): the items inherit them.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-paginator-item>` 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> **Note:** `<mds-paginator-item>` is an internal sub-part of [`mds-paginator`](../mds-paginator/AGENTS.md). The idiomatic way to display page navigation is to use `<mds-paginator>` directly - it renders and manages all items automatically. The patterns below document the component's surface to show how the parent assembles it.\n\n#### Using mds-paginator (the normal case)\n\nRender a paginator by setting `pages` and `current-page` on the parent. The parent creates one `<mds-paginator-item>` per page number plus the back and forward arrow items; you never instantiate them yourself.\n\n```html\n<mds-paginator pages=\"12\" current-page=\"1\"></mds-paginator>\n```\n\n#### Listening for Page Changes\n\nThe page-change event is emitted by the parent `<mds-paginator>` as `mdsPaginatorChange`. Do not listen for click events on individual items.\n\n```html\n<mds-paginator id=\"paginatore\" pages=\"20\" current-page=\"1\"></mds-paginator>\n\n<script>\n  document.querySelector('#paginatore').addEventListener('mdsPaginatorChange', (e) => {\n    console.log('Pagina selezionata:', e.detail.page);\n  });\n</script>\n```\n\n#### Numbered Page Item (text slot)\n\nWhen `icon` is not set, the item renders the default slot content as the page number label. The slot expects a plain text string - no HTML elements or components.\n\n```html\n<!-- Rendered internally by mds-paginator; shown here for reference only -->\n<mds-paginator-item>7</mds-paginator-item>\n```\n\n#### Icon-Based Navigation Item\n\nWhen `icon` is set, the item renders an icon instead of the text slot and is used for the back and forward arrow controls. The parent passes its own back and forward arrow icons, bundled in the component, and names each arrow with an `aria-label`: an icon alone gives the item no accessible name.\n\n```html\n<!-- Rendered internally by mds-paginator; shown here for reference only -->\n<mds-paginator-item icon=\"mi/baseline/arrow-back\" aria-label=\"Pagina precedente\" disabled></mds-paginator-item>\n<mds-paginator-item icon=\"mi/baseline/arrow-forward\" aria-label=\"Pagina successiva\"></mds-paginator-item>\n```\n\n#### Selected and Disabled States\n\n`selected` marks the current page and makes the item inert. `disabled` marks a navigation arrow as unavailable (e.g. back arrow on page 1) and also blocks activation. Both are boolean attributes that the parent manages.\n\n```html\n<!-- Current page - selected, inert -->\n<mds-paginator-item selected>3</mds-paginator-item>\n\n<!-- Back arrow on page 1 - disabled, inert -->\n<mds-paginator-item icon=\"mi/baseline/arrow-back\" aria-label=\"Pagina precedente\" disabled></mds-paginator-item>\n```\n\n#### CSS Customization\n\nThe items live in the shadow DOM of the parent `mds-paginator`, so the public `--mds-paginator-item-*` CSS custom properties reach them by inheritance: set them on the `mds-paginator` host or on a containing selector, next to the parent's own `--mds-paginator-background` and `--mds-paginator-scroll-behavior`. Use the semantic color roles so dark mode keeps working.\n\n```css\nmds-paginator {\n  --mds-paginator-background: rgb(var(--magma-wash-strong));\n  --mds-paginator-item-size: calc(var(--spacing) * 800);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-paginator-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-paginator-item Standalone\n\n`<mds-paginator-item>` is an internal sub-part rendered exclusively by `<mds-paginator>`. It has no standalone meaning; it relies on the parent to supply state (`selected`, `disabled`) and to handle page logic and the `mdsPaginatorChange` event.\n\n```html\n<!-- INCORRECT -->\n<mds-paginator-item>1</mds-paginator-item>\n<mds-paginator-item selected>2</mds-paginator-item>\n<mds-paginator-item>3</mds-paginator-item>\n\n<!-- CORRECT -->\n<mds-paginator pages=\"10\" current-page=\"2\"></mds-paginator>\n```\n\n#### Do Not Put HTML in the Default Slot\n\nThe default slot accepts a plain text string - the page number. Nested elements are not supported and break the item's layout.\n\n```html\n<!-- INCORRECT -->\n<mds-paginator-item>\n  <strong>5</strong>\n</mds-paginator-item>\n\n<!-- CORRECT -->\n<mds-paginator-item>5</mds-paginator-item>\n```\n\n#### Do Not Set selected or disabled From Consumer Code\n\nBoth `selected` and `disabled` are driven by the parent paginator based on `currentPage` and page boundaries. Setting them manually from consumer code creates state conflicts with the parent's rendering logic.\n\n```html\n<!-- INCORRECT - consumer forcing selected state -->\n<mds-paginator pages=\"10\" current-page=\"3\">\n  <!-- attempting to override individual item state externally -->\n</mds-paginator>\n<script>\n  document.querySelector('mds-paginator')\n    .shadowRoot.querySelectorAll('mds-paginator-item')[2]\n    .setAttribute('selected', '');\n</script>\n\n<!-- CORRECT - drive state through the parent prop -->\n<mds-paginator pages=\"10\" current-page=\"3\"></mds-paginator>\n```\n\n#### Do Not Listen for Click Events on Items\n\nIndividual item clicks are handled internally by `<mds-paginator>`. Listening for `click` on items reaches into shadow DOM and bypasses the parent's page validation and scroll logic. Use the documented `mdsPaginatorChange` event on the parent.\n\n```html\n<!-- INCORRECT -->\n<mds-paginator id=\"pag\" pages=\"10\" current-page=\"1\"></mds-paginator>\n<script>\n  document.querySelector('#pag').shadowRoot\n    .querySelectorAll('mds-paginator-item')\n    .forEach((item) => item.addEventListener('click', handleClick));\n</script>\n\n<!-- CORRECT -->\n<mds-paginator id=\"pag\" pages=\"10\" current-page=\"1\"></mds-paginator>\n<script>\n  document.querySelector('#pag').addEventListener('mdsPaginatorChange', (e) => {\n    console.log('Pagina:', e.detail.page);\n  });\n</script>\n```\n\n#### Do Not Pierce Shadow DOM to Style Items\n\nFrom outside, the supported customization surface is the documented `--mds-paginator-*` and `--mds-paginator-item-*` CSS custom properties, set on `mds-paginator`: the items inherit them. Targeting internals via `::part()`, `>>>`, or undocumented selectors couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-paginator-item >>> .text {\n  font-weight: 900;\n}\n\n/* CORRECT */\nmds-paginator {\n  --mds-paginator-background: rgb(var(--magma-wash-strong));\n  --mds-paginator-item-color: rgb(var(--magma-text-muted));\n}\n```\n"
      },
      "props": [
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Specifies if the item is disabled or not, is handled from the parent paginator",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "Specifies the icon used inside the paginator item",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Specifies if the item is selected or not, is handled from the parent paginator",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-paginator-item-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the item",
          "visibility": "public"
        },
        {
          "name": "--mds-paginator-item-background-disabled",
          "annotation": "prop",
          "docs": "Sets the background-color of the item when is disabled",
          "visibility": "internal"
        },
        {
          "name": "--mds-paginator-item-background-hover",
          "annotation": "prop",
          "docs": "Sets the background-color of the item when the mouse is over it",
          "visibility": "internal"
        },
        {
          "name": "--mds-paginator-item-background-selected",
          "annotation": "prop",
          "docs": "Sets the background-color of the item when is selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-paginator-item-color",
          "annotation": "prop",
          "docs": "Sets the text color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-paginator-item-color-disabled",
          "annotation": "prop",
          "docs": "Sets the color of the item when is disabled",
          "visibility": "internal"
        },
        {
          "name": "--mds-paginator-item-color-hover",
          "annotation": "prop",
          "docs": "Sets the text color of the item when the mouse is over it",
          "visibility": "internal"
        },
        {
          "name": "--mds-paginator-item-color-selected",
          "annotation": "prop",
          "docs": "Sets the text color of the item when is selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-paginator-item-radius",
          "annotation": "prop",
          "docs": "Sets the border-radius of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-paginator-item-shadow",
          "annotation": "prop",
          "docs": "Sets the box-shadow of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-paginator-item-shadow-disabled",
          "annotation": "prop",
          "docs": "Sets the box-shadow of the item when is disabled",
          "visibility": "internal"
        },
        {
          "name": "--mds-paginator-item-shadow-hover",
          "annotation": "prop",
          "docs": "Sets the box-shadow of the item when the mouse is over it",
          "visibility": "internal"
        },
        {
          "name": "--mds-paginator-item-shadow-selected",
          "annotation": "prop",
          "docs": "Sets the box-shadow of the item when is selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-paginator-item-size",
          "annotation": "prop",
          "docs": "Sets the height and the min-width of the paginator item",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-paginator"
      ],
      "dependencies": [
        "mds-icon",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-paginator-item": [
          "mds-icon",
          "mds-text"
        ],
        "mds-paginator": [
          "mds-paginator-item"
        ]
      },
      "storybook": "ui-paginator-item--docs"
    },
    {
      "filePath": "src/components/mds-policy-ai/mds-policy-ai.tsx",
      "encapsulation": "shadow",
      "tag": "mds-policy-ai",
      "readme": "# mds-policy-ai\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "part",
          "text": "icon - Selects the `icon` component wrapped in shadowDOM, will be found only if attirbute `variant` is set to `icon`."
        },
        {
          "name": "part",
          "text": "chip - Selects the `mds-chip` wrapped in shadowDOM, will be found only if attirbute `variant` is set to `chip`."
        },
        {
          "name": "part",
          "text": "chip-wrapper - Selects the wrapper of the chip and of its dropdown, will be found only if attirbute `variant` is set to `chip`."
        },
        {
          "name": "part",
          "text": "card - Selects the `card` component wrapped in shadowDOM, will be found only if attirbute `variant` is set to `card`."
        },
        {
          "name": "part",
          "text": "banner - Selects the `banner` component wrapped in shadowDOM, will be found only if attirbute `variant` is set to `banner`."
        },
        {
          "name": "category",
          "text": "tags"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-policy-ai>` web component is the Magma Design System disclosure marker that flags AI-generated content as produced by MIA (Maggioli's artificial intelligence) and links to the official AI usage policy. It is a presentational compound component with no native HTML primitive, rendering one of four interchangeable surfaces (icon, chip, card, banner).\n\n#### Semantic Behavior\n\n- **Variant-exclusive rendering**: Exactly one surface is mounted per the `variant` value, exposed through the matching shadow part (`icon`, `chip`, `card`, `banner`).\n- **Localization**: Supplies all default copy (headline, description, link labels) in `el`, `en`, `es`, `it`, resolved from the host language.\n- **Policy navigation**: Every variant routes the user to the policy `href` - the `icon` variant opens it in a new tab on click, while the other variants embed a button link to it.\n- **Content fallbacks**: `headline` and `description` override the localized defaults where the active variant uses them; otherwise the built-in MIA disclosure text is shown.\n\n#### Properties & Visual Configurations\n\n- **`variant`** selects the disclosure surface and is the primary configuration knob. Each value carries a distinct placement intent:\n  - **`'chip'`** (default): a compact \"Generated with MIA\" chip with a hover dropdown holding the disclaimer and policy link - for inline placement next to generated text.\n  - **`'icon'`**: a minimal help glyph with a tooltip - for the most space-constrained contexts.\n  - **`'card'`**: a small card pairing the disclaimer with a policy button - for sidebars or standalone blocks.\n  - **`'banner'`**: a full-width banner with title, description, and action - for prominent page-level notices.\n- **`headline`** sets the short title used by the `chip`, `icon`, and `banner` surfaces; **`description`** sets the longer disclaimer body shown across the variants that expose it.\n- **`href`** points to the AI policy page and defaults to the Maggioli EU AI-regulation article; override it to target a tenant-specific policy.\n\nThe internal surfaces are fixed to `variant=\"ai\"` of their underlying Magma components (the chip at its default `strong` tone, the banner and the buttons at `tone=\"weak\"`) and are not configurable from this component; the shared variant/tone ladder is documented in [`agents/variants.md`](../../../../agents/variants.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-policy-ai>` 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#### Default Chip - Inline Disclosure Next to Generated Text\n\nThe default form. Drop the component directly after AI-generated content with no additional attributes. The built-in \"Generato con MIA\" chip appears with a hover dropdown linking to the policy page.\n\n```html\n<mds-text typography=\"paragraph\">\n  Il presente estratto e' stato generato automaticamente dall'intelligenza artificiale MIA.\n</mds-text>\n<mds-policy-ai></mds-policy-ai>\n```\n\n#### Explicit Chip Variant\n\nDeclare `variant=\"chip\"` explicitly when component selection is driven by configuration or template logic. Behavior is identical to the default.\n\n```html\n<mds-policy-ai variant=\"chip\"></mds-policy-ai>\n```\n\n#### Custom Headline and Description on the Chip\n\nOverride the localized defaults with `headline` and `description` when the tenant's disclosure copy differs from the built-in MIA text. Both attributes reflect on the host element and are safe to drive from CSS attribute selectors.\n\n```html\n<mds-policy-ai\n  variant=\"chip\"\n  headline=\"Estratto generato con AI\"\n  description=\"L'estratto che stai leggendo e' stato generato tramite i nostri servizi di intelligenza artificiale e potrebbe contenere inesattezze.\"\n></mds-policy-ai>\n```\n\n#### Icon Variant - Space-Constrained Placement\n\nUse `variant=\"icon\"` when available space is too narrow for a chip - for example, overlaid on a thumbnail image. The icon opens the policy URL in a new tab on click and shows a tooltip with the disclosure text on hover.\n\n```html\n<div class=\"relative\">\n  <mds-policy-ai variant=\"icon\" class=\"absolute bottom-200 right-200 z-10\"></mds-policy-ai>\n  <mds-img src=\"./copertina-documento.webp\" alt=\"Copertina del documento\" class=\"rounded-(--magma-radius-md) shadow-sm\"></mds-img>\n</div>\n```\n\n#### Card Variant - Sidebar or Standalone Block\n\nUse `variant=\"card\"` when the disclosure needs more visual weight than a chip but is not a page-level notice. A compact card renders the disclaimer text and a policy button. Supply `description` to replace the default body copy.\n\n```html\n<mds-policy-ai\n  variant=\"card\"\n  description=\"Le FAQ che stai leggendo sono generate tramite i nostri servizi di intelligenza artificiale e potrebbero contenere inesattezze.\"\n></mds-policy-ai>\n```\n\n#### Banner Variant - Page-Level Notice\n\nUse `variant=\"banner\"` at the top or bottom of AI-heavy pages where a prominent notice is required. The banner renders a full-width tile with headline, description, and a policy action button. Override both props to match the page context.\n\n```html\n<mds-policy-ai\n  variant=\"banner\"\n  headline=\"Contenuto generato con intelligenza artificiale\"\n  description=\"Questo testo e' stato generato automaticamente tramite MIA e potrebbe contenere inesattezze. Ti invitiamo a verificarne l'accuratezza e a consultare fonti ufficiali.\"\n></mds-policy-ai>\n```\n\n#### Custom Policy URL via `href`\n\nThe default `href` points to the Maggioli EU AI-regulation article. Override it to link to a tenant-specific policy page. All four variants route the user to the same `href`.\n\n```html\n<mds-policy-ai\n  variant=\"banner\"\n  href=\"https://example.com/informativa-intelligenza-artificiale\"\n></mds-policy-ai>\n```\n\n#### Styling via Shadow Parts\n\nEach variant exposes a named `::part()`: `icon`, `chip` and `banner` are the inner [`mds-help`](../mds-help/AGENTS.md), [`mds-chip`](../mds-chip/AGENTS.md) and [`mds-banner`](../mds-banner/AGENTS.md) elements, so their public CSS custom properties can be set there; `card` is the card container, and the chip variant adds `chip-wrapper`, the wrapper around the chip and its dropdown. Use these only for a deep customization.\n\n```css\n/* Increase the border radius of the card surface */\nmds-policy-ai::part(card) {\n  border-radius: var(--magma-radius-xl);\n}\n\n/* A border on the chip itself: chip-wrapper would reach its dropdown too */\nmds-policy-ai::part(chip) {\n  border: 1px solid rgb(var(--magma-accent-ai-border));\n}\n\n/* An AI tint for the banner surface */\nmds-policy-ai::part(banner) {\n  --mds-banner-background: rgb(var(--magma-accent-ai-surface));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-policy-ai>`. 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 Slot Custom Content Into the Component\n\n`<mds-policy-ai>` has no public slots. All customization is done through the `headline`, `description`, and `href` props. Placing children inside the element has no effect - the shadow DOM ignores them entirely.\n\n```html\n<!-- INCORRECT -->\n<mds-policy-ai>\n  <p>Contenuto generato con intelligenza artificiale.</p>\n</mds-policy-ai>\n\n<!-- CORRECT -->\n<mds-policy-ai\n  description=\"Contenuto generato con intelligenza artificiale.\"\n></mds-policy-ai>\n```\n\n#### Do Not Use `variant` to Choose a Color - Use It to Choose a Surface\n\n`variant` is not a color knob. It selects the entire rendering surface (`icon`, `chip`, `card`, `banner`), each carrying a distinct placement intent. Choosing a value because it looks lighter or darker will produce the wrong layout for the context.\n\n```html\n<!-- INCORRECT - choosing \"icon\" because the space is small while also expecting the description on the page: the icon shows it only in a hover tooltip -->\n<mds-policy-ai\n  variant=\"icon\"\n  description=\"Questo testo e' stato generato con AI e potrebbe contenere inesattezze. Verifica le informazioni.\"\n></mds-policy-ai>\n\n<!-- CORRECT - \"card\" renders the description body as intended in compact contexts -->\n<mds-policy-ai\n  variant=\"card\"\n  description=\"Questo testo e' stato generato con AI e potrebbe contenere inesattezze. Verifica le informazioni.\"\n></mds-policy-ai>\n```\n\n#### Do Not Pierce the Shadow DOM to Restyle Inner Components\n\nThe shadow parts `chip`, `icon`, `card`, and `banner` are the documented customization surface. Reaching into undocumented internals with `>>>`, `/deep/`, or class selectors will break on any minor release.\n\n```css\n/* INCORRECT */\nmds-policy-ai >>> mds-chip {\n  background-color: red;\n}\n\n/* CORRECT - target the part and set the inner component's own CSS custom property */\nmds-policy-ai::part(banner) {\n  --mds-banner-radius: var(--magma-radius-xl);\n}\n```\n\n#### Do Not Wrap in a Native `<a>` to Override the Policy Link\n\nThe component manages its own `href` routing on every variant. Nesting it inside an `<a>` creates overlapping interactive controls, breaks keyboard navigation, and does not override the internal link - it adds a second, outer link on top.\n\n```html\n<!-- INCORRECT -->\n<a href=\"https://example.com/policy-ai\">\n  <mds-policy-ai variant=\"chip\"></mds-policy-ai>\n</a>\n\n<!-- CORRECT - override the href prop to point to the tenant-specific page -->\n<mds-policy-ai\n  variant=\"chip\"\n  href=\"https://example.com/policy-ai\"\n></mds-policy-ai>\n```\n\n#### Do Not Use `headline` on the Card Variant - It Has No Effect There\n\nThe `card` variant does not render a headline - only `description` is shown. Passing `headline` to a card is silently ignored. Use `variant=\"banner\"` when both a title and a body are required.\n\n```html\n<!-- INCORRECT - headline is ignored by variant=\"card\" -->\n<mds-policy-ai\n  variant=\"card\"\n  headline=\"Contenuto generato con AI\"\n  description=\"Questo estratto e' stato generato automaticamente.\"\n></mds-policy-ai>\n\n<!-- CORRECT - use banner when both headline and description must appear -->\n<mds-policy-ai\n  variant=\"banner\"\n  headline=\"Contenuto generato con AI\"\n  description=\"Questo estratto e' stato generato automaticamente.\"\n></mds-policy-ai>\n```\n"
      },
      "props": [
        {
          "name": "description",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "description",
          "reflectToAttr": true,
          "docs": "Sets the description to custom component long text",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "headline",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "headline",
          "reflectToAttr": true,
          "docs": "Sets the headline to custom component text",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "href",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "href",
          "reflectToAttr": true,
          "docs": "Sets the pointing URL of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'https://www.maggiolieditore.it/il-regolamento-europeo-sull-intelligenza-artificiale.html'"
            }
          ],
          "default": "'https://www.maggiolieditore.it/il-regolamento-europeo-sull-intelligenza-artificiale.html'",
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"banner\" | \"card\" | \"chip\" | \"icon\" | undefined",
          "complexType": {
            "original": "PolicyAiVariant",
            "resolved": "\"banner\" | \"card\" | \"chip\" | \"icon\" | undefined",
            "references": {
              "PolicyAiVariant": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-policy-ai/meta/types.ts::PolicyAiVariant",
                "referenceLocation": "PolicyAiVariant"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the variant type of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'chip'"
            }
          ],
          "default": "'chip'",
          "values": [
            {
              "value": "banner",
              "type": "string"
            },
            {
              "value": "card",
              "type": "string"
            },
            {
              "value": "chip",
              "type": "string"
            },
            {
              "value": "icon",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [],
      "parts": [
        {
          "name": "banner",
          "docs": "Selects the `banner` component wrapped in shadowDOM, will be found only if attirbute `variant` is set to `banner`."
        },
        {
          "name": "card",
          "docs": "Selects the `card` component wrapped in shadowDOM, will be found only if attirbute `variant` is set to `card`."
        },
        {
          "name": "chip",
          "docs": "Selects the `mds-chip` wrapped in shadowDOM, will be found only if attirbute `variant` is set to `chip`."
        },
        {
          "name": "chip-wrapper",
          "docs": "Selects the wrapper of the chip and of its dropdown, will be found only if attirbute `variant` is set to `chip`."
        },
        {
          "name": "icon",
          "docs": "Selects the `icon` component wrapped in shadowDOM, will be found only if attirbute `variant` is set to `icon`."
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-help",
        "mds-text",
        "mds-chip",
        "mds-dropdown",
        "mds-button",
        "mds-icon",
        "mds-banner"
      ],
      "dependencyGraph": {
        "mds-policy-ai": [
          "mds-help",
          "mds-text",
          "mds-chip",
          "mds-dropdown",
          "mds-button",
          "mds-icon",
          "mds-banner"
        ],
        "mds-help": [
          "mds-icon",
          "mds-tooltip"
        ],
        "mds-tooltip": [
          "mds-text"
        ],
        "mds-chip": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-banner": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ]
      },
      "storybook": "ui-policy-ai--docs"
    },
    {
      "filePath": "src/components/mds-pref/mds-pref.tsx",
      "encapsulation": "shadow",
      "tag": "mds-pref",
      "readme": "# mds-pref\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "name",
          "text": "Pref"
        },
        {
          "name": "description",
          "text": "This component is based on MdsTab component pattern"
        },
        {
          "name": "overview",
          "text": " <mds-text>Accessibility preferences in web browsers allow users to customize their navigation to improve readability, interaction, and usability. Common options include dark mode, text resizing, screen reader support, keyboard navigation, and blocking animated content. These settings help people with visual, hearing, motor, or cognitive disabilities experience the web more effectively and inclusively.</mds-text>"
        },
        {
          "name": "tags",
          "text": "pattern, user, tab"
        },
        {
          "name": "slot",
          "text": "- Add `mds-pref-animation`, `mds-pref-consumption`, `mds-pref-contrast`, `mds-pref-language`, `mds-pref-mode` or `mds-pref-theme` element/s."
        },
        {
          "name": "example",
          "text": "<mds-pref>\n<mds-pref-animation></mds-pref-animation>\n<mds-pref-consumption></mds-pref-consumption>\n<mds-pref-contrast></mds-pref-contrast>\n<mds-pref-mode></mds-pref-mode>\n<mds-pref-theme></mds-pref-theme>\n<mds-pref-language>\n<mds-pref-language-item code=\"it\"></mds-pref-language-item>\n<mds-pref-language-item code=\"en\"></mds-pref-language-item>\n</mds-pref-language>\n</mds-pref>"
        },
        {
          "name": "category",
          "text": "preferences"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-pref>` web component is the accessibility-preferences panel of the Magma Design System: a compound parent that groups user-facing settings (animation, consumption, contrast, theme, language) so people can tune readability, motion, and language for their session. It acts as the coordinator for the `mds-pref-*` children slotted inside it.\n\n#### Semantic Behavior\n\n- **Compound parent**: Expects `mds-pref-animation`, `mds-pref-consumption`, `mds-pref-contrast`, `mds-pref-mode`, `mds-pref-theme` and/or `mds-pref-language` children in its default slot; it owns no preference UI of its own beyond coordination (it forwards `size`, flags the document and asks for a reload). The lock of a single-mode theme on `mds-pref-mode` needs no parent: the mode control reads it from `<html>`.\n- **Size propagation**: `size` cascades down to every nested `mds-pref-*` child, on load, on every change and to the children added later; without a `size` on the panel each child keeps its own.\n- **Reload notice**: The panel shows an inline caption prompting the user to refresh the page when a preference that cannot apply live (`consumption` or `language`) changes after load. A `controller` panel, which is hidden, shows none.\n- **Live language**: Magma components follow `<html lang>` at once; the content of the application may not, which is why a change of language asks for a reload. An application that translates its own content as `<html lang>` changes says so with `live-language`, and the panel asks for no reload after a change of language (a change of consumption still asks).\n- **Document flag**: While at least one `<mds-pref>` is on the page, `<html>` carries `data-magma-pref`, which turns off the styles' fallback to the OS preferences; it is removed only when the last instance leaves the page, so a settings page that unmounts its own panel leaves the app controller in charge. Moving a panel in the DOM (between a sidebar and a menu, or with a client router that keeps it across pages) keeps the flag and the reload notice.\n- **Live language sync**: When a `language` change is emitted, the panel re-resolves its own locale so the reload notice is shown in the newly selected language.\n\n#### Properties & Visual Configurations\n\n`size` is one of the shared tab sizes and is forwarded to children rather than styling the host directly - set it on the parent and it reaches every child.\n\n#### Other behavioral props\n\n- **`live-language`** tells the panel the application follows `<html lang>` on its own, so a change of language shows no reload notice.\n- **`controller`** switches the component from a visible on-DOM panel into a headless controller that applies and reacts to preferences without rendering UI; in this mode it drives document-level preference state without a visible panel.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-pref>` 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#### Full Preferences Panel\n\nThe canonical form: slot every `mds-pref-*` control directly inside `<mds-pref>`. No extra wiring is needed: the mode control follows the active theme by itself (a theme of one mode locks it to that mode).\n\n```html\n<mds-pref>\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-theme>\n    <mds-pref-theme-item name=\"default\"></mds-pref-theme-item>\n    <mds-pref-theme-item name=\"cool\"></mds-pref-theme-item>\n  </mds-pref-theme>\n  <mds-pref-contrast></mds-pref-contrast>\n  <mds-pref-animation></mds-pref-animation>\n  <mds-pref-consumption></mds-pref-consumption>\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n\n#### Partial Panel - Subset of Controls\n\nSlot only the controls your application needs. `<mds-pref>` renders whatever children are present; omitted controls are simply absent.\n\n```html\n<!-- Accessibility-only panel: contrast and animation controls -->\n<mds-pref>\n  <mds-pref-contrast></mds-pref-contrast>\n  <mds-pref-animation></mds-pref-animation>\n</mds-pref>\n```\n\n#### Controlling Size\n\nThe parent's `size` drives all child controls at once, on load and when it changes.\n\n```html\n<!-- Compact panel for a sidebar or popover -->\n<mds-pref size=\"sm\">\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-contrast></mds-pref-contrast>\n  <mds-pref-animation></mds-pref-animation>\n</mds-pref>\n```\n\n#### Headless Controller Mode\n\nSet the `controller` boolean attribute when you need the preference engine to apply saved preferences from `localStorage` on page load without rendering any visible UI. The host is hidden via CSS (`display: none`) and still activates all child preference controls.\n\n```html\n<!-- Place in <body>; the panel is invisible but activates stored preferences -->\n<mds-pref controller>\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-contrast></mds-pref-contrast>\n  <mds-pref-animation></mds-pref-animation>\n  <mds-pref-consumption></mds-pref-consumption>\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n\n#### Language Selector with Multiple Languages\n\n`<mds-pref-language>` requires its child `<mds-pref-language-item>` elements to be present; the items are not self-generating. Pass language codes supported by your application.\n\n```html\n<mds-pref>\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"el\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"es\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n\n#### Reload Notice Handling\n\n`<mds-pref>` shows an inline caption telling the user to refresh the page after a `consumption` or `language` change: nothing to wire. It shows for a change made after the panel loaded, so the stored choices the controls apply on load raise no notice; a `controller` panel is hidden and shows none.\n\n#### An Application That Follows the Language Live\n\nWhen the application translates its own content as `<html lang>` changes (it observes the attribute, or re-renders on `mdsPrefLanguageChange`), add `live-language`: a change of language then needs no reload, and the panel asks for none. A change of consumption still asks.\n\n```html\n<mds-pref live-language>\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-pref>`. 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 Place Non-Pref Children in the Default Slot\n\nThe default slot accepts only `mds-pref-animation`, `mds-pref-consumption`, `mds-pref-contrast`, `mds-pref-language`, `mds-pref-mode` and `mds-pref-theme` children. Other elements are outside the documented content: they render as extra rows of the panel and take part in no coordination.\n\n```html\n<!-- INCORRECT -->\n<mds-pref>\n  <div class=\"custom-section\">Tema</div>\n  <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref>\n  <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n```\n\n#### Do Not Use `mds-pref-*` Children Outside `<mds-pref>`\n\nEach control applies and stores its own preference, but the coordination between the controls of a panel lives in the parent: only the parent forwards `size` changes and sets the `data-magma-pref` flag that turns off the fallback to the OS preferences. Group the controls of a panel in `<mds-pref>`.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-mode></mds-pref-mode>\n<mds-pref-theme>\n  <mds-pref-theme-item name=\"default\"></mds-pref-theme-item>\n  <mds-pref-theme-item name=\"cool\"></mds-pref-theme-item>\n</mds-pref-theme>\n\n<!-- CORRECT -->\n<mds-pref>\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-theme>\n    <mds-pref-theme-item name=\"default\"></mds-pref-theme-item>\n    <mds-pref-theme-item name=\"cool\"></mds-pref-theme-item>\n  </mds-pref-theme>\n</mds-pref>\n```\n\n#### Do Not Set `controller=\"false\"` to Turn Off Controller Mode\n\n`controller` is a boolean attribute, and a false boolean is an absent attribute ([`agents/conventions.md`](../../../../agents/conventions.md)). The runtime parses the string `\"false\"` as `false`, so the panel shows, but the attribute is still on the element until the first render, so `[controller]` attribute selectors (the one that hides the panel included) and any code that reads the attribute see it set. Remove the attribute entirely to switch back to visible mode.\n\n```html\n<!-- INCORRECT -->\n<mds-pref controller=\"false\">\n  <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref>\n  <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n```\n\n#### Do Not Listen for the Native `change` Event to Detect Preference Changes\n\nThe controls fire no native `change` event. Use the documented `mdsPrefChange` event emitted by each `mds-pref-*` child: it fires once per change, not on page load, and carries only the `preference` name in `detail`, so read the new value from the child.\n\n```html\n<!-- INCORRECT -->\n<script>\n  document.querySelector('mds-pref').addEventListener('change', (e) => {\n    console.log(e);\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('mds-pref-mode').addEventListener('mdsPrefChange', (e) => {\n    console.log(e.detail.preference);\n  });\n</script>\n```\n"
      },
      "props": [
        {
          "name": "controller",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "controller",
          "reflectToAttr": true,
          "docs": "Sets if the component works as hidden element controller instead as UI element, visible on the DOM",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "liveLanguage",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "live-language",
          "reflectToAttr": true,
          "docs": "Tells the panel that the application follows `<html lang>` on its own, translating its\ncontent as the language changes, so a change of language needs no reload and shows no notice",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "TabSizeType",
            "resolved": "\"md\" | \"sm\" | undefined",
            "references": {
              "TabSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::TabSizeType",
                "referenceLocation": "TabSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component items nested inside it",
          "docsTags": [],
          "values": [
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [
        {
          "event": "mdsPrefChange",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-pref-animation`, `mds-pref-consumption`, `mds-pref-contrast`, `mds-pref-language`, `mds-pref-mode` or `mds-pref-theme` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-pref": [
          "mds-text"
        ]
      },
      "storybook": "ui-preferences--docs"
    },
    {
      "filePath": "src/components/mds-pref-animation/mds-pref-animation.tsx",
      "encapsulation": "shadow",
      "tag": "mds-pref-animation",
      "readme": "# mds-pref-animation\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "category",
          "text": "preferences"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-pref-animation>` web component is a preference control that lets users choose how animations are presented (reduced, system-driven, or fully enabled). It is usually a child of [`<mds-pref>`](../mds-pref/AGENTS.md) and renders a labelled three-option tab group rather than any native HTML primitive.\n\n#### Semantic Behavior\n\n- **Usually inside `<mds-pref>`**: Placed as a direct default-slot child of `<mds-pref>`, which groups the preference controls in one panel; it also works on its own, since it applies and stores the preference by itself.\n- **Tab-group selection**: Renders three options (reduce / system / no-preference); the active one is driven by the `mode` value, and clicking an option sets that mode.\n- **Applies the preference globally**: Choosing a mode applies it across the whole document and persists the choice, so it is restored on later visits.\n- **Initial mode resolution**: The effective mode is resolved in order from the `mode` prop, then the persisted value, then the `system` default.\n- **Change event**: `mdsPrefChange` (detail `{ preference: 'animation' }`) fires once per change, after the new mode is applied; a pick of the mode already active and the first application on load do not emit it. It bubbles up to `<mds-pref>`; an animation change needs no reload, so it raises no reload notice.\n- **Instances stay in sync**: Instances mounted together (a hidden `<mds-pref controller>` and a visible settings panel) share the applied animation: a pick in one is mirrored by the others, which neither apply it again nor emit `mdsPrefChange`. A `pref-animation-*` class written on `<html>` by other code is mirrored the same way.\n\n#### Properties & Visual Configurations\n\n- **`mode`**: Sets which animation preference is active - `reduce` to suppress motion, `no-preference` to fully enable animations, or `system` to defer to the user's OS setting. Leave unset to fall back to the persisted or default (`system`) value.\n- **`size`**: Sizes the nested tab items (`sm` or `md`). Inside `<mds-pref>`, set it on the parent instead: the parent's `size` reaches every `mds-pref-*` child on load and when it changes, and overwrites the child's own.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-pref-animation>` 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#### Default Usage Inside `mds-pref`\n\nThe standard form. Place `<mds-pref-animation>` as a direct slot child of [`<mds-pref>`](../mds-pref/AGENTS.md). No `mode` or `size` is required - the component restores the last persisted choice and defaults to `system` on a first visit.\n\n```html\n<mds-pref>\n  <mds-pref-animation></mds-pref-animation>\n</mds-pref>\n```\n\n#### Combined Preferences Panel\n\nPlace multiple `mds-pref-*` children inside the same `<mds-pref>`. The parent forwards its `size` to every child, on load and when it changes.\n\n```html\n<mds-pref>\n  <mds-pref-animation></mds-pref-animation>\n  <mds-pref-contrast></mds-pref-contrast>\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-consumption></mds-pref-consumption>\n</mds-pref>\n```\n\n#### Pre-selecting a Mode via `mode`\n\nPass `mode` to override the persisted value and start from a known state - for example, a first-run onboarding screen that starts with reduced motion.\n\n```html\n<mds-pref>\n  <mds-pref-animation mode=\"reduce\"></mds-pref-animation>\n</mds-pref>\n```\n\n#### Listening for Changes\n\nHandle `mdsPrefChange` when the host application needs to react - for example, to announce the new setting or trigger a soft refresh. The event fires once per change, after the new mode is applied, and not on page load: to know the mode a page starts with, read the `mode` property.\n\n```html\n<mds-pref id=\"prefs\">\n  <mds-pref-animation></mds-pref-animation>\n</mds-pref>\n\n<script>\n  document.getElementById('prefs').addEventListener('mdsPrefChange', (event) => {\n    // event.detail.preference === 'animation'\n    console.log('Preferenza animazioni aggiornata', event.detail);\n  });\n</script>\n```\n\n#### Compact Size\n\nSet `size=\"sm\"` on the parent `<mds-pref>` to shrink the tab items of every `mds-pref-*` child consistently: the parent forwards its `size` on load and on every change.\n\n```html\n<!-- In the panel: on the parent only -->\n<mds-pref size=\"sm\">\n  <mds-pref-animation></mds-pref-animation>\n  <mds-pref-contrast></mds-pref-contrast>\n</mds-pref>\n\n<!-- Acceptable when used standalone -->\n<mds-pref-animation size=\"sm\"></mds-pref-animation>\n```\n\n#### Silent Controller (Hidden Preference Sync)\n\nWhen a `<mds-pref controller>` element is placed in the DOM, it applies preferences silently without rendering any UI. `<mds-pref-animation>` inside it restores the persisted animation class on `<html>` on load without showing the tab group.\n\n```html\n<!-- Place once, near the root - no UI is rendered -->\n<mds-pref controller>\n  <mds-pref-animation></mds-pref-animation>\n</mds-pref>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-pref-animation>`. 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 Turn Off with `mode=\"false\"` or Remove the Attribute to Reset\n\n`mode` is a string union (`reduce | system | no-preference`), not a boolean. A value outside the union, such as `\"false\"` or `\"none\"`, does not disable the component: it has no entry in the component's mode table, so it is ignored with a console warning and never stored, and the component keeps the mode it has. Removing the attribute at runtime keeps the current mode too: it does not reset it. Without `mode`, the component restores the persisted choice or falls back to `system`.\n\n```html\n<!-- INCORRECT - not a valid mode value -->\n<mds-pref-animation mode=\"false\"></mds-pref-animation>\n<mds-pref-animation mode=\"none\"></mds-pref-animation>\n\n<!-- CORRECT - use an explicit valid mode -->\n<mds-pref-animation mode=\"system\"></mds-pref-animation>\n```\n\n#### Do Not Listen to Raw `change` Events\n\n`<mds-pref-animation>` emits `mdsPrefChange`; no native `change` event is fired.\n\n```html\n<!-- INCORRECT -->\n<mds-pref id=\"prefs\">\n  <mds-pref-animation></mds-pref-animation>\n</mds-pref>\n\n<script>\n  document.getElementById('prefs').addEventListener('change', handler);\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.getElementById('prefs').addEventListener('mdsPrefChange', handler);\n</script>\n```\n\n#### Do Not Hand-Roll Animation Preference Handling on `<html>`\n\nThe component already applies `pref-animation-reduce`, `pref-animation-system`, or `pref-animation-no-preference` to `<html>` and persists the choice in `localStorage`. Duplicating this logic conflicts with the component's state and causes double-writes.\n\n```css\n/* INCORRECT - duplicates the component's own logic */\nhtml.custom-reduce-motion * {\n  animation: none !important;\n}\n```\n\n```html\n<!-- CORRECT - rely on the class the component sets -->\n<!-- The component sets pref-animation-reduce on <html>;\n     target that class in your own CSS if needed -->\n```\n\n```css\n/* Extend, do not replace */\nhtml.pref-animation-reduce .my-widget {\n  transition: none;\n}\n```\n"
      },
      "props": [
        {
          "name": "mode",
          "type": "\"no-preference\" | \"reduce\" | \"system\" | undefined",
          "complexType": {
            "original": "AnimationModeType",
            "resolved": "\"no-preference\" | \"reduce\" | \"system\" | undefined",
            "references": {
              "AnimationModeType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-pref-animation/meta/types.ts::AnimationModeType",
                "referenceLocation": "AnimationModeType"
              }
            }
          },
          "mutable": true,
          "attr": "mode",
          "reflectToAttr": true,
          "docs": "Specifies the preference mode",
          "docsTags": [],
          "values": [
            {
              "value": "no-preference",
              "type": "string"
            },
            {
              "value": "reduce",
              "type": "string"
            },
            {
              "value": "system",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "TabSizeType",
            "resolved": "\"md\" | \"sm\" | undefined",
            "references": {
              "TabSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::TabSizeType",
                "referenceLocation": "TabSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component items nested inside it",
          "docsTags": [],
          "values": [
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsPrefChange",
          "detail": "MdsPrefChangeEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPrefChangeEventDetail",
            "resolved": "MdsPrefChangeEventDetail",
            "references": {
              "MdsPrefChangeEventDetail": {
                "location": "import",
                "path": "@event/preference",
                "id": "src/event-detail/preference.ts::MdsPrefChangeEventDetail",
                "referenceLocation": "MdsPrefChangeEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is triggered",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-tab",
        "mds-tab-item"
      ],
      "dependencyGraph": {
        "mds-pref-animation": [
          "mds-text",
          "mds-tab",
          "mds-tab-item"
        ],
        "mds-tab-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-preferences-animation--docs"
    },
    {
      "filePath": "src/components/mds-pref-consumption/mds-pref-consumption.tsx",
      "encapsulation": "shadow",
      "tag": "mds-pref-consumption",
      "readme": "# mds-pref-consumption\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "category",
          "text": "preferences"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-pref-consumption>` web component is a preference control of the Magma Design System that lets the user pick an energy-consumption mode (`low`, `medium`, `high`); it is usually a child of [`<mds-pref>`](../mds-pref/AGENTS.md) and renders as a tab group with one option per mode, so it has no native HTML primitive equivalent.\n\n#### Semantic Behavior\n\n- **Usually inside `<mds-pref>`**: Placed as a direct slot child of `<mds-pref>`, alongside the other `mds-pref-*` controls; it also works on its own, since it applies and stores the preference by itself.\n- **Mode resolution on load**: The active mode is resolved once, on load, in priority order - the `mode` prop, then the persisted value, then the `high` default - so the control restores the last user choice across reloads.\n- **Applies the preference globally**: Selecting a mode applies it across the whole document and persists the choice.\n- **Change event**: Each change emits `mdsPrefChange` with `{ preference: 'consumption' }`, once the new mode is applied and stored; a pick of the level already active and the first application on load do not emit it. `consumption` requires a reload to fully apply, so the parent `<mds-pref>` shows its \"reload required\" notice for it in a visible panel.\n- **Instances stay in sync**: Instances mounted together (a hidden `<mds-pref controller>` and a visible settings panel) share the applied consumption: a pick in one is mirrored by the others, which neither apply it again nor emit `mdsPrefChange`. A `pref-consumption-*` class written on `<html>` by other code is mirrored the same way.\n\n#### Properties & Visual Configurations\n\n- **`mode`**: The selected consumption preference (`low` / `medium` / `high`). Leave it unset to let the component restore the persisted value or fall back to `high`; set it explicitly only to force an initial mode.\n- **`size`**: Sizes the nested tab items (`sm` / `md`). Inside `<mds-pref>`, set it on the parent instead: the parent's `size` reaches every `mds-pref-*` child on load and when it changes, and overwrites the child's own.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-pref-consumption>` component, ordered from most common to most specialized. The examples assume a working knowledge of the preference system documented in [`agents/theming.md`](../../../../agents/theming.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Default Use Inside `mds-pref`\n\nThe canonical form. Place `<mds-pref-consumption>` as a direct slot child of [`<mds-pref>`](../mds-pref/AGENTS.md). Omit `mode` so the component restores the persisted user choice automatically; the parent forwards its own `size` to every `mds-pref-*` child.\n\n```html\n<mds-pref>\n  <mds-pref-consumption></mds-pref-consumption>\n</mds-pref>\n```\n\n#### Forcing an Initial Mode\n\nSet `mode` explicitly only when the application needs to override the persisted value - for example, when seeding preferences from a server-side profile. All three accepted values are `\"low\"`, `\"medium\"`, and `\"high\"`.\n\n```html\n<mds-pref>\n  <mds-pref-consumption mode=\"low\"></mds-pref-consumption>\n</mds-pref>\n```\n\n#### Controlling Size\n\nUse the `size` prop on the control itself when it stands outside `<mds-pref>`; inside it, set `size` on the parent, which forwards it to every child. Accepted values are `\"sm\"` and `\"md\"`.\n\n```html\n<mds-pref-consumption size=\"sm\"></mds-pref-consumption>\n```\n\n#### Reacting to Mode Changes\n\nListen for the `mdsPrefChange` event to detect when the user picks a new consumption level. The event detail always carries `{ preference: \"consumption\" }`; the event fires once per change, from a pick or from a new `mode` set by a script, and not on page load.\n\n```html\n<mds-pref-consumption id=\"consumption-pref\"></mds-pref-consumption>\n\n<script>\n  document\n    .querySelector('#consumption-pref')\n    .addEventListener('mdsPrefChange', (event) => {\n      console.log('Preferenza consumo cambiata:', event.detail.preference);\n    });\n</script>\n```\n\n#### Reading the Active Mode After a Change\n\nThe `mode` prop is mutable and reflected as an attribute. The event is emitted once the new mode is applied and stored, so inside the handler the element already holds the new value.\n\n```html\n<mds-pref-consumption id=\"consumption-pref\"></mds-pref-consumption>\n\n<script>\n  const pref = document.querySelector('#consumption-pref');\n  pref.addEventListener('mdsPrefChange', () => {\n    console.log('Modalita attiva:', pref.mode);\n  });\n</script>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-pref-consumption>`. 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 Outside `mds-pref` Without Acknowledging the Side Effects\n\n`<mds-pref-consumption>` applies its mode globally by adding a class to `<html>` and writing to `localStorage`, even when used standalone. Wrapping it in [`<mds-pref>`](../mds-pref/AGENTS.md) does not change that: use the control only where the user is meant to set the document-wide preference (the preferences panel), never as a local toggle for one widget or in a test harness.\n\n```html\n<!-- INCORRECT - a local toggle for one widget: it still changes the whole document -->\n<div class=\"settings-widget\">\n  <mds-pref-consumption></mds-pref-consumption>\n</div>\n\n<!-- CORRECT - in the preferences panel, where a document-wide choice is meant -->\n<mds-pref>\n  <mds-pref-consumption></mds-pref-consumption>\n</mds-pref>\n```\n\n#### Do Not Pass an Invalid `mode` Value\n\n`mode` is typed as `\"low\" | \"medium\" | \"high\"`. Any other string has no entry in the component's mode table: it is ignored with a console warning and never stored, and the component keeps the level it has (on load, the persisted choice or `high`).\n\n```html\n<!-- INCORRECT -->\n<mds-pref-consumption mode=\"auto\"></mds-pref-consumption>\n<mds-pref-consumption mode=\"none\"></mds-pref-consumption>\n\n<!-- CORRECT -->\n<mds-pref-consumption mode=\"low\"></mds-pref-consumption>\n<mds-pref-consumption mode=\"medium\"></mds-pref-consumption>\n<mds-pref-consumption mode=\"high\"></mds-pref-consumption>\n```\n\n#### Do Not Disable the Mode by Setting `mode=\"false\"` or `mode=\"\"`\n\nThe `mode` prop is not boolean. Setting it to an empty string or to the literal `\"false\"` does not clear or unset the preference - it corrupts the stored value. To defer mode resolution to the persisted value, leave the attribute absent entirely.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-consumption mode=\"false\"></mds-pref-consumption>\n<mds-pref-consumption mode=\"\"></mds-pref-consumption>\n\n<!-- CORRECT - omit the attribute to restore the persisted value or fall back to \"high\" -->\n<mds-pref-consumption></mds-pref-consumption>\n```\n\n#### Do Not Listen for Native `change` or `input` Events\n\n`<mds-pref-consumption>` does not emit `change` or `input`. The documented event is `mdsPrefChange`.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-consumption id=\"pref\"></mds-pref-consumption>\n<script>\n  document.querySelector('#pref').addEventListener('change', handler);\n</script>\n\n<!-- CORRECT -->\n<mds-pref-consumption id=\"pref\"></mds-pref-consumption>\n<script>\n  document.querySelector('#pref').addEventListener('mdsPrefChange', handler);\n</script>\n```\n\n#### Do Not Override Size via CSS Width or Height\n\nThe `size` prop controls the dimensions of the nested tab items. Overriding them with inline styles or external CSS breaks the internal layout and visual consistency of the preference group.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-consumption style=\"width: 300px;\"></mds-pref-consumption>\n\n<!-- CORRECT -->\n<mds-pref-consumption size=\"sm\"></mds-pref-consumption>\n```\n"
      },
      "props": [
        {
          "name": "mode",
          "type": "\"high\" | \"low\" | \"medium\" | undefined",
          "complexType": {
            "original": "ConsumptionModeType",
            "resolved": "\"high\" | \"low\" | \"medium\" | undefined",
            "references": {
              "ConsumptionModeType": {
                "location": "import",
                "path": "@type/preference",
                "id": "src/type/preference.ts::ConsumptionModeType",
                "referenceLocation": "ConsumptionModeType"
              }
            }
          },
          "mutable": true,
          "attr": "mode",
          "reflectToAttr": true,
          "docs": "Specifies the preference mode",
          "docsTags": [],
          "values": [
            {
              "value": "high",
              "type": "string"
            },
            {
              "value": "low",
              "type": "string"
            },
            {
              "value": "medium",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "TabSizeType",
            "resolved": "\"md\" | \"sm\" | undefined",
            "references": {
              "TabSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::TabSizeType",
                "referenceLocation": "TabSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component items nested inside it",
          "docsTags": [],
          "values": [
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsPrefChange",
          "detail": "MdsPrefChangeEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPrefChangeEventDetail",
            "resolved": "MdsPrefChangeEventDetail",
            "references": {
              "MdsPrefChangeEventDetail": {
                "location": "import",
                "path": "@event/preference",
                "id": "src/event-detail/preference.ts::MdsPrefChangeEventDetail",
                "referenceLocation": "MdsPrefChangeEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is triggered",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-tab",
        "mds-tab-item"
      ],
      "dependencyGraph": {
        "mds-pref-consumption": [
          "mds-text",
          "mds-tab",
          "mds-tab-item"
        ],
        "mds-tab-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-preferences-consumption--docs"
    },
    {
      "filePath": "src/components/mds-pref-contrast/mds-pref-contrast.tsx",
      "encapsulation": "shadow",
      "tag": "mds-pref-contrast",
      "readme": "# mds-pref-contrast\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "category",
          "text": "preferences"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-pref-contrast>` web component is a preference control that lets users switch the application's contrast mode (`more`, `system`, or `no-preference`). It is usually a child of the [`<mds-pref>`](../mds-pref/AGENTS.md) panel and renders as a segmented tab of icon options rather than any single native HTML primitive.\n\n#### Semantic Behavior\n\n- **Usually inside `<mds-pref>`**: It is designed to be placed as a direct slot child of `<mds-pref>` alongside the other preference children (`mds-pref-animation`, `mds-pref-consumption`, `mds-pref-language`, `mds-pref-mode`, `mds-pref-theme`); it also works on its own, since it applies and stores the preference by itself.\n- **Mode resolution on load**: The active mode is resolved once, on load, in order from the `mode` prop, the persisted value, then the `system` default, and applied immediately - so it acts on the document even before any user interaction.\n- **Applies the preference globally**: Selecting a mode applies it across the whole document and persists the choice.\n- **System resolution**: With `system` the component writes `pref-contrast-system` on `<html>`, and the styles follow the OS `prefers-contrast` setting through their own media query; the component does not map the OS value itself.\n- **Change event**: Every mode change emits `mdsPrefChange` with `{ preference: 'contrast' }`, once the new mode is applied; a pick of the mode already active and the first application on load do not emit it. It bubbles up to `<mds-pref>`; a contrast change needs no reload, so it raises no reload notice.\n- **Instances stay in sync**: Instances mounted together (a hidden `<mds-pref controller>` and a visible settings panel) share the applied contrast: a pick in one is mirrored by the others, which neither apply it again nor emit `mdsPrefChange`. A `pref-contrast-*` class written on `<html>` by other code is mirrored the same way.\n\n#### Properties & Visual Configurations\n\n- **`mode`** - the active contrast preference. Leave it unset to let the component restore the last persisted choice or fall back to `system`; set it explicitly (`more`, `system`, `no-preference`) only when the host wants to force a contrast level. Pick `more` for high-contrast output, `no-preference` for the default theme, and `system` to defer to the OS `prefers-contrast` setting.\n- **`size`** - sizes the nested tab items (`sm` / `md`). Inside `<mds-pref>`, set it on the parent instead: the parent's `size` reaches every `mds-pref-*` child on load and when it changes, and overwrites the child's own.\n\nThe component does not use the shared `variant` / `tone` ladders documented in [`agents/variants.md`](../../../../agents/variants.md); its visual states are driven entirely by the resolved `mode`.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-pref-contrast>` 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#### Inside the Full Preferences Panel\n\nThe canonical form. Slot `<mds-pref-contrast>` directly inside [`<mds-pref>`](../mds-pref/AGENTS.md) alongside the other preference controls. The parent panel forwards its `size` to every child.\n\n```html\n<mds-pref>\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-contrast></mds-pref-contrast>\n  <mds-pref-animation></mds-pref-animation>\n  <mds-pref-consumption></mds-pref-consumption>\n</mds-pref>\n```\n\n#### Accessibility-Only Panel\n\nWhen an application exposes only accessibility controls, slot `<mds-pref-contrast>` together with [`<mds-pref-animation>`](../mds-pref-animation/AGENTS.md) inside a minimal `<mds-pref>`. Omitted preference controls are simply absent - no extra configuration is required.\n\n```html\n<mds-pref>\n  <mds-pref-contrast></mds-pref-contrast>\n  <mds-pref-animation></mds-pref-animation>\n</mds-pref>\n```\n\n#### Forcing a Contrast Level Programmatically\n\nSet the `mode` prop explicitly when the host application needs to impose a contrast level regardless of the user's last persisted choice. Valid values are `more` (high contrast), `system` (defers to OS `prefers-contrast`), and `no-preference` (design-system default).\n\n```html\n<!-- Force high contrast: the class goes on <html>, so it applies to the whole document -->\n<mds-pref-contrast mode=\"more\"></mds-pref-contrast>\n```\n\n#### Reacting to Contrast Changes\n\nListen for `mdsPrefChange` to act whenever the user switches the contrast mode. The event detail carries `{ preference: 'contrast' }` so a single handler can distinguish between the different preference controls; the event fires once per change, and not on page load.\n\n```html\n<mds-pref-contrast id=\"contrast-ctrl\"></mds-pref-contrast>\n\n<script>\n  document\n    .getElementById('contrast-ctrl')\n    .addEventListener('mdsPrefChange', (event) => {\n      if (event.detail.preference === 'contrast') {\n        console.log('Preferenza contrasto aggiornata');\n      }\n    });\n</script>\n```\n\n#### Controlling Size\n\nUse the `size` prop when rendering `<mds-pref-contrast>` outside `<mds-pref>` and a specific tab-item size is required. Inside `<mds-pref>`, set `size` on the parent: it forwards it to this child, on load and when it changes.\n\n```html\n<!-- Compact size for a toolbar or narrow panel -->\n<mds-pref-contrast size=\"sm\"></mds-pref-contrast>\n\n<!-- Default (medium) size - equivalent to omitting the prop -->\n<mds-pref-contrast size=\"md\"></mds-pref-contrast>\n```\n\n#### Restoring the Last Persisted Choice on Page Load\n\nLeave `mode` unset. On load the component reads `localStorage` for the key `mdsPrefContrast` set during a previous session, falls back to `system` when nothing is stored, and applies the resolved class to `<html>` immediately - no application bootstrap code is needed.\n\n```html\n<!-- mode is intentionally absent: the component self-restores -->\n<mds-pref-contrast></mds-pref-contrast>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-pref-contrast>`. 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 Pass an Invalid `mode` Value\n\n`mode` accepts only `\"more\"`, `\"system\"`, or `\"no-preference\"`. Passing any other string (e.g. a legacy name or a boolean) matches no contrast entry: it is ignored with a console warning and never stored, and the component keeps the contrast it has (on load, the persisted choice or `system`).\n\n```html\n<!-- INCORRECT (not a valid ContrastModeType) -->\n<mds-pref-contrast mode=\"high\"></mds-pref-contrast>\n<mds-pref-contrast mode=\"true\"></mds-pref-contrast>\n\n<!-- CORRECT -->\n<mds-pref-contrast mode=\"more\"></mds-pref-contrast>\n```\n\n#### Do Not Listen for the Native `change` Event\n\nThe component emits the documented `mdsPrefChange` event; there is no native `change` event bubbling out of the shadow DOM. Listening for `change` on the host element will never fire.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-contrast id=\"cp\"></mds-pref-contrast>\n<script>\n  document.getElementById('cp').addEventListener('change', handler);\n</script>\n\n<!-- CORRECT -->\n<mds-pref-contrast id=\"cp\"></mds-pref-contrast>\n<script>\n  document.getElementById('cp').addEventListener('mdsPrefChange', handler);\n</script>\n```\n\n#### Do Not Write `@media (prefers-contrast: more)` Overrides in App Code\n\nThe design system manages high-contrast tokens automatically through the `pref-contrast-more` class (and `pref-contrast-system`, which follows the OS) applied to `<html>` by `<mds-pref-contrast>`: the semantic roles are promoted under both. Hand-rolling media query overrides duplicates that logic and breaks when the user picks `system` (OS-driven) vs. `more` (explicit choice), because the two code paths diverge.\n\n```css\n/* INCORRECT */\n@media (prefers-contrast: more) {\n  .my-card {\n    border: 2px solid black;\n  }\n}\n\n/* CORRECT - paint with a role: it is promoted under high contrast, explicit or OS-driven */\n.my-card {\n  border: 1px solid rgb(var(--magma-border-default));\n}\n```\n\n#### Do Not Set `mode=\"false\"` to Reset the Preference\n\nBoolean idioms do not apply here. `mode` is a string union - setting it to `\"false\"` is not a valid value and will not clear the preference. Leave the `mode` attribute out of the markup to let the component fall back to the last persisted value; unsetting it at runtime (removing the attribute or setting the prop to `undefined`) keeps the current contrast, like an invalid value.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-contrast mode=\"false\"></mds-pref-contrast>\n\n<!-- CORRECT (omit mode) -->\n<mds-pref-contrast></mds-pref-contrast>\n```\n"
      },
      "props": [
        {
          "name": "mode",
          "type": "\"more\" | \"no-preference\" | \"system\" | undefined",
          "complexType": {
            "original": "ContrastModeType",
            "resolved": "\"more\" | \"no-preference\" | \"system\" | undefined",
            "references": {
              "ContrastModeType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-pref-contrast/meta/types.ts::ContrastModeType",
                "referenceLocation": "ContrastModeType"
              }
            }
          },
          "mutable": true,
          "attr": "mode",
          "reflectToAttr": true,
          "docs": "Specifies the preference mode",
          "docsTags": [],
          "values": [
            {
              "value": "more",
              "type": "string"
            },
            {
              "value": "no-preference",
              "type": "string"
            },
            {
              "value": "system",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "TabSizeType",
            "resolved": "\"md\" | \"sm\" | undefined",
            "references": {
              "TabSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::TabSizeType",
                "referenceLocation": "TabSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component items nested inside it",
          "docsTags": [],
          "values": [
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsPrefChange",
          "detail": "MdsPrefChangeEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPrefChangeEventDetail",
            "resolved": "MdsPrefChangeEventDetail",
            "references": {
              "MdsPrefChangeEventDetail": {
                "location": "import",
                "path": "@event/preference",
                "id": "src/event-detail/preference.ts::MdsPrefChangeEventDetail",
                "referenceLocation": "MdsPrefChangeEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is triggered",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-tab",
        "mds-tab-item"
      ],
      "dependencyGraph": {
        "mds-pref-contrast": [
          "mds-text",
          "mds-tab",
          "mds-tab-item"
        ],
        "mds-tab-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-preferences-contrast--docs"
    },
    {
      "filePath": "src/components/mds-pref-language/mds-pref-language.tsx",
      "encapsulation": "shadow",
      "tag": "mds-pref-language",
      "readme": "# mds-pref-language\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `mds-pref-language-item` element/s."
        },
        {
          "name": "category",
          "text": "preferences"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-pref-language>` web component is the language-preference control of the Magma Design System, usually slotted inside the [`<mds-pref>`](../mds-pref/AGENTS.md) panel alongside the other preference children. It renders a labelled tab trigger that opens a dropdown of `<mds-pref-language-item>` entries, letting users switch the active document language and persisting that choice.\n\n#### Semantic Behavior\n\n- **Usually inside `<mds-pref>`**: Placed as a direct slot child of `<mds-pref>`, alongside the other `mds-pref-*` controls; it also works on its own, since it applies and stores the language by itself. What it gives up on its own is in its mistakes. In turn it hosts its own `<mds-pref-language-item>` children, supplied via its default slot.\n- **Default slot hosts the items**: The default slot accepts one or more `<mds-pref-language-item>` elements; when the control loads, and whenever its items change, the item whose `code` matches the resolved language is marked selected; an item added after load is picked like the others (a later change of `set` does not move the selection).\n- **Selection orchestration**: Selecting an item clears the others, closes the dropdown, and resolves the new language - the children report up to this component, which centralizes the single-selection state.\n- **Language resolution & persistence**: When `set` is `auto` the active language is resolved in priority order from the persisted value, then the `<html lang>` attribute, then `navigator.language`. The resolved value is persisted and written to `<html lang>` - the single page-wide source of truth for the language. Every localized Magma component (including ones nested in shadow DOM) reacts automatically through a shared reactive store; there is no per-element `lang` override and no imperative refresh method. Applications that manage the language themselves can simply set `<html lang>`: the store observes it.\n- **Events bubbled to the parent**: Emits `mdsPrefLanguageChange` on every item pick, also when the picked language is already active (detail carries the selected `language` code; it fires just before the language is applied), and `mdsPrefChange` (detail `{ preference: 'language' }`), fired only when the resolved language actually changes, from a pick or from a new `set` value (the initial application on load does not emit). The latter is the event `<mds-pref>` listens to for its \"reload required\" notice, since application-level content may still need a reload; an application that follows `<html lang>` live sets `live-language` on the panel, which then shows no notice for the language.\n- **Invalid codes are ignored**: A `set` value that is neither `auto` nor a language tag (a primary subtag of two or three letters, such as `it` or `haw`, optionally followed by others, such as `it-IT`) is ignored with a console warning: the language in place stays, and on load the one `auto` resolves. A stored value that is no language tag is dropped.\n- **Default-language hint**: When the resolved language differs from the built-in default (`en`), a caption noting the default language is rendered.\n\n#### Properties & Visual Configurations\n\n- **`set`**: The desired language as a BCP 47 short tag (e.g. `it`, `en`, `es-ES`); the special value `auto` (default) defers to the persisted/page/system resolution chain described above. Region subtags are sanitized down to the two-letter language. Set an explicit value only to force a starting language regardless of the user's environment. Supported display languages are Italiano, English, Español and ελληνικά.\n- **`size`**: Sizes the nested tab trigger (`sm` / `md`). Inside `<mds-pref>`, the parent's `size` reaches this control on load and when it changes, and overwrites its own: set it on the parent.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-pref-language>` 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 Language Selector Inside `mds-pref`\n\nThe canonical usage. Nest `<mds-pref-language>` as a direct child of [`<mds-pref>`](../mds-pref/AGENTS.md) and populate its default slot with one [`<mds-pref-language-item>`](../mds-pref-language-item/AGENTS.md) per supported locale. The `code` attribute on each item must be a valid BCP 47 short tag.\n\n```html\n<mds-pref>\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"el\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n\n#### Forcing a Starting Language with `set`\n\nPass an explicit BCP 47 tag to `set` to override the automatic resolution chain. Use this when the application dictates an initial language regardless of the user's browser setting or persisted preference.\n\n```html\n<mds-pref>\n  <mds-pref-language set=\"it\">\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"es\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n\n#### Automatic Language Resolution (default)\n\nOmit `set` (or pass `set=\"auto\"`) to let the component resolve the active language in priority order: persisted user choice, then the page `<html lang>` attribute, then `navigator.language`. This is the right choice for most applications.\n\n```html\n<mds-pref>\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n\n#### Sizing via `size`\n\nUse the `size` prop to size the tab trigger of a standalone control. Inside [`<mds-pref>`](../mds-pref/AGENTS.md), set `size` on the parent: it forwards it to every `mds-pref-*` child, so the group stays consistent.\n\n```html\n<mds-pref size=\"sm\">\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n\n#### Listening for Language Changes\n\nListen to `mdsPrefLanguageChange` to react when the user picks a language (for example, to reload the page or re-fetch translated content). The event detail carries the selected `language` code string. It fires on every pick, also when the picked language is already the active one.\n\n```html\n<mds-pref>\n  <mds-pref-language id=\"lang-selector\">\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n\n<script>\n  document.querySelector('#lang-selector').addEventListener('mdsPrefLanguageChange', (e) => {\n    console.log('Nuova lingua selezionata:', e.detail.language);\n    // e.g. reload the page to apply the new locale\n    window.location.reload();\n  });\n</script>\n```\n\n#### Full Preference Panel with Language\n\n`<mds-pref-language>` is one of several preference children accepted by [`<mds-pref>`](../mds-pref/AGENTS.md). Compose it alongside the other controls to offer a complete preferences UI.\n\n```html\n<mds-pref>\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-contrast></mds-pref-contrast>\n  <mds-pref-animation></mds-pref-animation>\n  <mds-pref-consumption></mds-pref-consumption>\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"es\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"el\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-pref-language>`. 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 Outside `mds-pref`\n\n`<mds-pref-language>` is a compound child designed to live inside [`<mds-pref>`](../mds-pref/AGENTS.md). As a standalone widget it still applies and persists the language, but it leaves the preference group: `<mds-pref>` forwards `size` changes to its `mds-pref-*` children and listens to their `mdsPrefChange` for the reload-required notice.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-language>\n  <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n</mds-pref-language>\n\n<!-- CORRECT -->\n<mds-pref>\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n\n#### Do Not Slot Arbitrary HTML Instead of `mds-pref-language-item`\n\nThe default slot accepts only `<mds-pref-language-item>` elements. Slotting raw `<button>`, `<li>`, or other elements bypasses the selection orchestration and event wiring the parent depends on.\n\n```html\n<!-- INCORRECT -->\n<mds-pref>\n  <mds-pref-language>\n    <button>Italiano</button>\n    <button>English</button>\n  </mds-pref-language>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref>\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n\n#### Do Not Pass an Unrecognized Language Code to `set`\n\nThe `set` prop must be either `\"auto\"` or a BCP 47 language tag: a primary subtag of two or three letters, the one of the item dictionary (`it`, `en`, `haw`), optionally followed by others (`it-IT`). Any other value - including language names like `\"italiano\"` or malformed strings like `\"en_US\"` - is ignored with a console warning and the language in place stays. Use the shortest primary subtag: `it`, not the ISO 639-2 `ita`, which has no item and no translation.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-language set=\"italiano\">...</mds-pref-language>\n<mds-pref-language set=\"en_US\">...</mds-pref-language>\n\n<!-- CORRECT -->\n<mds-pref-language set=\"it\">...</mds-pref-language>\n<mds-pref-language set=\"en\">...</mds-pref-language>\n<mds-pref-language set=\"es-ES\">...</mds-pref-language>\n```\n\n#### Do Not Set `selected` Manually on `mds-pref-language-item`\n\nThe parent `<mds-pref-language>` manages the `selected` state of each item automatically based on the active language: when it loads, and whenever its items change, it marks only the item whose `code` matches, and on each pick it clears the siblings. A `selected` written in the markup is overwritten on load; one set later from script leaves the visual selection out of step with the active language.\n\n```html\n<!-- INCORRECT -->\n<mds-pref>\n  <mds-pref-language set=\"it\">\n    <mds-pref-language-item code=\"it\" selected></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n\n<!-- CORRECT - the parent derives selection from `set` -->\n<mds-pref>\n  <mds-pref-language set=\"it\">\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n\n#### Do Not Listen to `mdsPrefLanguageItemSelect` Instead of `mdsPrefLanguageChange`\n\n`mdsPrefLanguageItemSelect` is the item's own event, emitted by `<mds-pref-language-item>` and consumed by its parent. Application code should listen to `mdsPrefLanguageChange` on `<mds-pref-language>`: one listener for the whole list, fired after the parent has committed the selection (the language is applied right after it, so read it from `e.detail.language`).\n\n```html\n<!-- INCORRECT -->\n<script>\n  document.querySelector('mds-pref-language-item').addEventListener('mdsPrefLanguageItemSelect', (e) => {\n    console.log(e.detail.language);\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('mds-pref-language').addEventListener('mdsPrefLanguageChange', (e) => {\n    console.log(e.detail.language);\n  });\n</script>\n```\n\n#### Do Not Set Size via CSS Instead of the `size` Prop\n\nThe `size` prop is the only supported way to resize the internal tab trigger. Overriding dimensions with inline styles or CSS custom properties not listed in the component's documented surface couples your code to internal implementation details.\n\n```css\n/* INCORRECT */\nmds-pref-language mds-tab-item {\n  font-size: 10px;\n}\n```\n\n```html\n<!-- CORRECT -->\n<mds-pref>\n  <mds-pref-language size=\"sm\">\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n"
      },
      "props": [
        {
          "name": "set",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": true,
          "attr": "set",
          "reflectToAttr": true,
          "docs": "Specifies the language code based on HTML `lang` attribute\n\nA string representing the language version as defined in {@link https://datatracker.ietf.org/doc/html/rfc5646 RFC 5646: Tags for Identifying Languages (also known as BCP 47)}.\n\nSupported languages are Italiano, English, Español, ελληνικά",
          "docsTags": [
            {
              "name": "example",
              "text": "'en-US'"
            },
            {
              "name": "default",
              "text": "'auto'"
            }
          ],
          "default": "'auto'",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "TabSizeType",
            "resolved": "\"md\" | \"sm\" | undefined",
            "references": {
              "TabSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::TabSizeType",
                "referenceLocation": "TabSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component items nested inside it",
          "docsTags": [],
          "values": [
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsPrefChange",
          "detail": "MdsPrefChangeEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPrefChangeEventDetail",
            "resolved": "MdsPrefChangeEventDetail",
            "references": {
              "MdsPrefChangeEventDetail": {
                "location": "import",
                "path": "@event/preference",
                "id": "src/event-detail/preference.ts::MdsPrefChangeEventDetail",
                "referenceLocation": "MdsPrefChangeEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is triggered",
          "docsTags": []
        },
        {
          "event": "mdsPrefLanguageChange",
          "detail": "MdsPrefLanguageEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPrefLanguageEventDetail",
            "resolved": "MdsPrefLanguageEventDetail",
            "references": {
              "MdsPrefLanguageEventDetail": {
                "location": "import",
                "path": "@event/language",
                "id": "src/event-detail/language.ts::MdsPrefLanguageEventDetail",
                "referenceLocation": "MdsPrefLanguageEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component changes the language selected from the click event of the dropdown list item",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "mdsPrefLanguageItemSelect",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-pref-language-item` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-tab",
        "mds-tab-item",
        "mds-dropdown"
      ],
      "dependencyGraph": {
        "mds-pref-language": [
          "mds-text",
          "mds-tab",
          "mds-tab-item",
          "mds-dropdown"
        ],
        "mds-tab-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-preferences-language--docs"
    },
    {
      "filePath": "src/components/mds-pref-language-item/mds-pref-language-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-pref-language-item",
      "readme": "# mds-pref-language-item\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "parent",
          "text": "mds-pref-language"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-pref-language-item>` web component represents a single selectable language option inside the language-preference picker [`<mds-pref-language>`](../mds-pref-language/AGENTS.md). It renders one row of the parent's dropdown and reports the user's choice up to the parent rather than changing the page language itself.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct default-slot child of `<mds-pref-language>`; it is not used standalone or mixed with other child types.\n- **Code validation**: `code` must match an entry in the bundled language dictionary; an unknown `code` logs a console warning and the item shows the code itself in place of a language name. When `code` is empty the item renders an error-toned fallback button instead of a language label.\n- **Label is derived, not authored**: The visible language name is looked up from `code` (e.g. `it` to `Italiano`), so consumers supply only the code, not the display text.\n- **Selection is parent-driven**: The `selected` prop is owned and toggled by `<mds-pref-language>`, which clears every sibling and sets only the active item.\n- **Click emits, does not commit**: Clicking the item emits the bubbling `mdsPrefLanguageItemSelect` event carrying `{ language: code }`. The parent updates selection state, persists the preference, applies the document language, and emits its own `mdsPrefLanguageChange` - this child performs none of that.\n\n#### Properties & Visual Configurations\n\nThe only meaningful prop is `code`: the BCP 47 / RFC 5646 language tag (such as `it`, `en`, `es`) that both keys the label lookup and is the payload emitted on selection. The accepted codes are the keys of the bundled language dictionary: the two-letter ISO 639-1 codes (`it`, `en`, `fr`, `de`, `zh`, ...) plus `ceb`, `haw` and `hmn`, which the parent cannot apply (its `set` accepts only `xx` / `xx-XX` codes).\n\n`selected` is a state flag managed by the parent rather than a configuration choice. Sizing and styling are fixed by the parent's layout, so this item exposes no `variant` / `tone` of its own; the shared ladders in [`agents/variants.md`](../../../../agents/variants.md) are applied internally and are not configurable from the host.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-pref-language-item>` 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 Language List Inside the Parent\n\nThe canonical form. Place one `<mds-pref-language-item>` per supported language as a direct child of [`<mds-pref-language>`](../mds-pref-language/AGENTS.md). Set `code` to a BCP 47 tag that exists in the bundled dictionary; the component resolves the display name automatically.\n\n```html\n<mds-pref-language>\n  <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"fr\"></mds-pref-language-item>\n</mds-pref-language>\n```\n\n#### Pre-selecting the Active Language\n\nPre-select through the parent, not through `selected`: `<mds-pref-language>` marks the item whose `code` matches its resolved language when it loads, and overwrites any `selected` written in the markup. Pass the language to the parent's `set` (or leave `set` on `auto`).\n\n```html\n<mds-pref-language set=\"it\">\n  <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"de\"></mds-pref-language-item>\n</mds-pref-language>\n```\n\n#### Listening for a Language Selection\n\nThe item emits `mdsPrefLanguageItemSelect` with `{ language: code }` when clicked. In most cases you should listen on the parent (`mdsPrefLanguageChange`) rather than on individual items - but listening on the item directly is valid when you need fine-grained control.\n\n```html\n<mds-pref-language>\n  <mds-pref-language-item code=\"it\" id=\"lang-it\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"en\" id=\"lang-en\"></mds-pref-language-item>\n</mds-pref-language>\n\n<script>\n  document.querySelectorAll('mds-pref-language-item').forEach((item) => {\n    item.addEventListener('mdsPrefLanguageItemSelect', (e) => {\n      console.log('Lingua scelta:', e.detail.language);\n    });\n  });\n</script>\n```\n\n#### Offering a Large Language Set\n\nAdd as many items as needed - the parent lists them all in its dropdown. Each item only needs a `code`; the visible label is derived automatically.\n\n```html\n<mds-pref-language>\n  <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"es\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"fr\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"de\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"pt\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"zh\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"ar\"></mds-pref-language-item>\n</mds-pref-language>\n```\n\n#### Inside a Full Preferences Panel\n\n`<mds-pref-language>` and its items compose inside [`<mds-pref>`](../mds-pref/AGENTS.md) alongside the other preference controls. Place them as direct children of `<mds-pref>`.\n\n```html\n<mds-pref>\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-contrast></mds-pref-contrast>\n  <mds-pref-language>\n    <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n    <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n  </mds-pref-language>\n</mds-pref>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-pref-language-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 the Item Outside Its Parent\n\n`<mds-pref-language-item>` is a compound child and relies on `<mds-pref-language>` for selection management, dropdown layout, and language persistence. Using it standalone leaves the click handler dangling and the selection state unmanaged.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-language-item code=\"it\"></mds-pref-language-item>\n\n<!-- CORRECT -->\n<mds-pref-language>\n  <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n</mds-pref-language>\n```\n\n#### Do Not Set the Display Label Manually\n\nThe item derives its label from the `code` prop via the bundled dictionary. Attempting to pass display text in the default slot or as an attribute is not supported and will be ignored by the render function.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-language-item code=\"it\">Italiano</mds-pref-language-item>\n\n<!-- CORRECT -->\n<mds-pref-language-item code=\"it\"></mds-pref-language-item>\n```\n\n#### Do Not Use an Undocumented or Misspelled Language Code\n\n`code` must exactly match a key in the bundled dictionary (e.g. `\"it\"`, `\"en\"`, `\"fr\"`). An unknown code logs a console warning when the item loads or its `code` changes, and the item shows the raw code instead of a language name. Use the two-letter BCP 47 tag, not a locale variant like `\"it-IT\"`.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-language-item code=\"it-IT\"></mds-pref-language-item>\n<mds-pref-language-item code=\"italian\"></mds-pref-language-item>\n\n<!-- CORRECT -->\n<mds-pref-language-item code=\"it\"></mds-pref-language-item>\n```\n\n#### Do Not Manage the `selected` Prop by Hand Across Items\n\nThe parent marks only the item matching the active language when it loads, overwriting the `selected` written in the markup, and clears every sibling on each pick. If you toggle `selected` yourself from script, several items can show as selected at once, out of step with the stored preference.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-language>\n  <mds-pref-language-item code=\"it\" selected></mds-pref-language-item>\n  <mds-pref-language-item code=\"en\" selected></mds-pref-language-item>\n</mds-pref-language>\n\n<!-- CORRECT -->\n<mds-pref-language set=\"it\">\n  <mds-pref-language-item code=\"it\"></mds-pref-language-item>\n  <mds-pref-language-item code=\"en\"></mds-pref-language-item>\n</mds-pref-language>\n```\n\n#### Do Not Listen for Native `click` to Detect Language Selection\n\nThe component emits `mdsPrefLanguageItemSelect` (or the parent emits `mdsPrefLanguageChange`). A native `click` carries no `detail`, so it skips the event payload that carries the selected language code, and it does not tell you that the parent has committed the pick.\n\n```html\n<!-- INCORRECT -->\n<script>\n  document.querySelector('mds-pref-language-item').addEventListener('click', () => {\n    // no language code available here\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('mds-pref-language').addEventListener('mdsPrefLanguageChange', (e) => {\n    console.log('Lingua selezionata:', e.detail.language);\n  });\n</script>\n```\n\n#### Do Not Set `selected=\"false\"` to Deselect\n\n`selected` is a boolean attribute: a false boolean is written by removing the attribute ([`agents/conventions.md`](../../../../agents/conventions.md)), or by setting the prop to `false` from script. Stencil does parse `\"false\"` as `false`, but the attribute stays in the markup until the component hydrates and its reflection removes it, so a `[selected]` selector or any code reading the attribute sees it set in the meantime. Inside `<mds-pref-language>` the parent owns `selected` anyway.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-language-item code=\"it\" selected=\"false\"></mds-pref-language-item>\n\n<!-- CORRECT -->\n<mds-pref-language-item code=\"it\"></mds-pref-language-item>\n```\n"
      },
      "props": [
        {
          "name": "code",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "code",
          "reflectToAttr": true,
          "docs": "Specifies the language code based on HTML `lang` attribute",
          "docsTags": [
            {
              "name": "example",
              "text": "'it'"
            }
          ],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Specifies if the element is selected",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsPrefLanguageItemSelect",
          "detail": "MdsPrefLanguageEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPrefLanguageEventDetail",
            "resolved": "MdsPrefLanguageEventDetail",
            "references": {
              "MdsPrefLanguageEventDetail": {
                "location": "import",
                "path": "@event/language",
                "id": "src/event-detail/language.ts::MdsPrefLanguageEventDetail",
                "referenceLocation": "MdsPrefLanguageEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component trigger the language",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-pref-language-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-preferences-language-item--docs"
    },
    {
      "filePath": "src/components/mds-pref-mode/mds-pref-mode.tsx",
      "encapsulation": "shadow",
      "tag": "mds-pref-mode",
      "readme": "# mds-pref-mode\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "category",
          "text": "preferences"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-pref-mode>` web component is the mode preference control of the Magma Design System, usually a direct child of the [`<mds-pref>`](../mds-pref/AGENTS.md) panel. It renders a labelled three-way tab (light / system / dark) that lets the user pick a color-scheme mode and applies it globally to the document.\n\n#### Semantic Behavior\n\n- **Usually inside `<mds-pref>`**: Placed as a direct slot child of `<mds-pref>`, alongside the other `mds-pref-*` controls; it also works on its own, since it applies and stores the mode by itself. What it gives up on its own is in its mistakes.\n- **Selection follows `mode`**: The active tab reflects whichever mode is currently applied, driven by the `mode` prop.\n- **Global mode application**: Selecting a mode applies it document-wide and persists the choice.\n- **Persistence on load**: The applied mode resolves from `mode` -> the stored value -> the `system` default, so a previously chosen mode is restored without an explicit prop.\n- **`mdsPrefChange` event**: Emits `mdsPrefChange` with `{ preference: 'mode' }` once per change, after the new mode is applied; a pick of the mode already active and the first application on load do not emit it. It bubbles up to `<mds-pref>`; a mode change needs no reload, so it raises no reload notice.\n- **Instances stay in sync**: Instances mounted together (a hidden `<mds-pref controller>` and a visible settings panel) share the applied mode: a pick in one is mirrored by the others, which neither apply it again nor emit `mdsPrefChange`. A `pref-mode-*` class written on `<html>` by other code is mirrored the same way.\n- **System mode**: The `system` choice follows the OS `prefers-color-scheme` media query to resolve the effective light/dark scheme.\n- **Theme lock**: Under a theme that can be used in one mode only (`pref-theme-scheme-light` or `-dark` on `<html>`, written by `mds-pref-theme` from the mode the theme declares), the control shows that mode selected and disables the other two items: the page is in that mode whatever was picked. The stored choice is left alone and comes back with a theme of both modes.\n\n#### Properties & Visual Configurations\n\n- **`mode`**: Sets and reflects the active mode (`light`, `dark`, `system`). Leave it unset to inherit the persisted/default mode; set it explicitly to force a starting mode.\n- **`transition`**: Controls the visual switch between schemes. Use `smooth` (default) for a fading neutral overlay that flips the mode mid-fade, `flash` for an instant switch with a brief overlay pulse, or `none` to apply the new mode with no overlay animation. The overlay timing and z-index are tunable through `--mds-pref-mode-overlay-*` CSS custom properties.\n- **`size`**: Sizes the nested tab items (`sm` / `md`). Inside `<mds-pref>`, set it on the parent instead: the parent's `size` reaches every `mds-pref-*` child on load and when it changes, and overwrites the child's own.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-pref-mode>` component, ordered from most common to most specialized. The examples assume a working knowledge of the shared preference system documented in [`agents/theming.md`](../../../../agents/theming.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Default Usage Inside `mds-pref`\n\nThe canonical form. Slot `<mds-pref-mode>` as a direct child of [`<mds-pref>`](../mds-pref/AGENTS.md) with no extra props. The component restores the user's previously persisted mode automatically on load.\n\n```html\n<mds-pref>\n  <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n```\n\n#### Setting an Initial Mode\n\nPass `mode` to force the selector to start on a specific mode rather than reading from `localStorage`. Useful when the host application controls preference state centrally. The forced mode is also written to `localStorage` on every load, replacing the user's last choice.\n\n```html\n<mds-pref>\n  <mds-pref-mode mode=\"dark\"></mds-pref-mode>\n</mds-pref>\n```\n\n#### Using `system` Mode for OS-Aware Default\n\n`mode=\"system\"` resolves to light or dark based on the OS `prefers-color-scheme` media query. Use this as the explicit starting point when you want the app to follow the OS without the user having to choose.\n\n```html\n<mds-pref>\n  <mds-pref-mode mode=\"system\"></mds-pref-mode>\n</mds-pref>\n```\n\n#### Choosing a Transition Style\n\n`transition` controls the visual effect when switching between schemes. Use `smooth` (default) for a mid-fade overlay that hides the color flip, `flash` for an instant switch with a brief full-screen pulse, or `none` for a hard switch with no animation.\n\n```html\n<!-- Smooth fade (default) -->\n<mds-pref-mode transition=\"smooth\"></mds-pref-mode>\n\n<!-- Instant flash pulse -->\n<mds-pref-mode transition=\"flash\"></mds-pref-mode>\n\n<!-- No animation -->\n<mds-pref-mode transition=\"none\"></mds-pref-mode>\n```\n\n#### Listening for Mode Changes\n\nThe component emits `mdsPrefChange` with `{ preference: 'mode' }` once per change, after the new mode is applied, and not on page load; another instance that mirrors the pick does not emit it. Listen for this event to react in application code - for example to sync a preference state store - and read the current value from the `mode` prop.\n\n```html\n<mds-pref>\n  <mds-pref-mode id=\"mode-selector\"></mds-pref-mode>\n</mds-pref>\n\n<script>\n  document.getElementById('mode-selector').addEventListener('mdsPrefChange', (e) => {\n    console.log('Modalita tema cambiata:', e.detail.preference);\n  });\n</script>\n```\n\n#### Controlling Size via the Parent\n\n`size` is forwarded to the internal tab items. [`<mds-pref>`](../mds-pref/AGENTS.md) forwards its own `size` to every `mds-pref-*` child, on load and when it changes: set it on the parent to keep the panel at one tab size.\n\n```html\n<mds-pref size=\"sm\">\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-contrast></mds-pref-contrast>\n</mds-pref>\n```\n\n#### Customizing the Transition Overlay\n\nTune the overlay stacking order via the public `--mds-pref-mode-overlay-z-index` CSS custom property, when the page has layers above the default one; the overlay timing is set by the component. Set it on the host or a parent selector.\n\n```css\nmds-pref-mode {\n  --mds-pref-mode-overlay-z-index: 9000;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-pref-mode>`. 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-pref-mode>` Outside `<mds-pref>`\n\n`<mds-pref-mode>` is a compound child: `<mds-pref>` forwards `size` changes to it. As a standalone widget it still applies and persists the mode, and it still follows a theme of one mode, which it reads from `<html>`; only the forwarding of `size` is lost.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-mode></mds-pref-mode>\n\n<!-- CORRECT -->\n<mds-pref>\n  <mds-pref-mode></mds-pref-mode>\n</mds-pref>\n```\n\n#### Do Not Set `transition=\"false\"` to Disable the Overlay\n\n`transition` is a string enum, not a boolean. `\"false\"` is not a valid value: it only happens to fall through to the no-overlay branch, with no guarantee across releases. Use `transition=\"none\"` to opt out of the overlay animation.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-mode transition=\"false\"></mds-pref-mode>\n\n<!-- CORRECT -->\n<mds-pref-mode transition=\"none\"></mds-pref-mode>\n```\n\n#### Do Not Listen for Native `change` Events Instead of `mdsPrefChange`\n\nThe component does not emit or bubble native `change` events out of the shadow DOM. Always listen for the documented `mdsPrefChange` custom event.\n\n```html\n<!-- INCORRECT -->\n<script>\n  document.querySelector('mds-pref-mode').addEventListener('change', handler);\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('mds-pref-mode').addEventListener('mdsPrefChange', handler);\n</script>\n```\n\n#### Do Not Override Mode Classes on `<html>` Directly\n\nThe component manages `pref-mode-light`, `pref-mode-dark`, and `pref-mode-system` classes on `<html>` itself. Adding or removing these by hand races with the component and will be overwritten on the next mode change. Drive the mode exclusively through the `mode` prop.\n\n```html\n<!-- INCORRECT -->\n<script>\n  document.documentElement.classList.add('pref-mode-dark');\n</script>\n\n<!-- CORRECT -->\n<mds-pref>\n  <mds-pref-mode mode=\"dark\"></mds-pref-mode>\n</mds-pref>\n```\n\n#### Do Not Size Only One Child of the Panel\n\nSetting `size` on `<mds-pref-mode>` alone when siblings exist produces inconsistent tab sizes across the panel. Set it on `<mds-pref>`, which forwards it to every preference child, on load and when it changes.\n\n```html\n<!-- INCORRECT -->\n<mds-pref>\n  <mds-pref-mode size=\"sm\"></mds-pref-mode>\n  <mds-pref-contrast></mds-pref-contrast>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref size=\"sm\">\n  <mds-pref-mode></mds-pref-mode>\n  <mds-pref-contrast></mds-pref-contrast>\n</mds-pref>\n```\n\n#### Do Not Target the Injected Overlay to Customize It\n\nThe overlay element is injected into `document.body` at runtime with inline styles, which win over a class selector anyway. Do not target it by class name or adjust its properties through JavaScript. Use the public `--mds-pref-mode-overlay-z-index` CSS custom property instead.\n\n```css\n/* INCORRECT */\n.mds-pref-mode-overlay {\n  background-color: black;\n  z-index: 99999;\n}\n\n/* CORRECT */\nmds-pref-mode {\n  --mds-pref-mode-overlay-z-index: 9000;\n}\n```\n"
      },
      "props": [
        {
          "name": "lockedScheme",
          "type": "\"all\" | \"dark\" | \"light\" | undefined",
          "complexType": {
            "original": "PreferenceThemeSchemeType",
            "resolved": "\"all\" | \"dark\" | \"light\" | undefined",
            "references": {
              "PreferenceThemeSchemeType": {
                "location": "import",
                "path": "@type/preference",
                "id": "src/type/preference.ts::PreferenceThemeSchemeType",
                "referenceLocation": "PreferenceThemeSchemeType"
              }
            }
          },
          "mutable": false,
          "attr": "locked-scheme",
          "reflectToAttr": true,
          "docs": "Locks the mode choice to one mode, `light` or `dark`: the control shows that mode\nselected and disables the other two items, without touching the stored preference,\nwhich comes back when the lock goes. `all` locks nothing. Unset, the control follows\nthe active theme: a theme that can be used in one mode only (`pref-theme-scheme-light`\nor `-dark` on `<html>`, written by `mds-pref-theme` from the mode the theme declares,\n#1274) locks it the same way. Not meant to be set directly.",
          "docsTags": [],
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "mode",
          "type": "\"dark\" | \"light\" | \"system\" | undefined",
          "complexType": {
            "original": "PreferenceModeType",
            "resolved": "\"dark\" | \"light\" | \"system\" | undefined",
            "references": {
              "PreferenceModeType": {
                "location": "import",
                "path": "@type/preference",
                "id": "src/type/preference.ts::PreferenceModeType",
                "referenceLocation": "PreferenceModeType"
              }
            }
          },
          "mutable": true,
          "attr": "mode",
          "reflectToAttr": true,
          "docs": "Specifies the preference mode",
          "docsTags": [],
          "values": [
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "system",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "TabSizeType",
            "resolved": "\"md\" | \"sm\" | undefined",
            "references": {
              "TabSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::TabSizeType",
                "referenceLocation": "TabSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component items nested inside it",
          "docsTags": [],
          "values": [
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "transition",
          "type": "\"flash\" | \"none\" | \"smooth\"",
          "complexType": {
            "original": "PreferenceThemeTransitionType",
            "resolved": "\"flash\" | \"none\" | \"smooth\"",
            "references": {
              "PreferenceThemeTransitionType": {
                "location": "import",
                "path": "@type/preference",
                "id": "src/type/preference.ts::PreferenceThemeTransitionType",
                "referenceLocation": "PreferenceThemeTransitionType"
              }
            }
          },
          "mutable": true,
          "attr": "transition",
          "reflectToAttr": true,
          "docs": "Specifies the transition of switching from a mode to another one",
          "docsTags": [
            {
              "name": "default",
              "text": "'smooth'"
            }
          ],
          "default": "'smooth'",
          "values": [
            {
              "value": "flash",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "smooth",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsPrefChange",
          "detail": "MdsPrefChangeEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPrefChangeEventDetail",
            "resolved": "MdsPrefChangeEventDetail",
            "references": {
              "MdsPrefChangeEventDetail": {
                "location": "import",
                "path": "@event/preference",
                "id": "src/event-detail/preference.ts::MdsPrefChangeEventDetail",
                "referenceLocation": "MdsPrefChangeEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is triggered",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-pref-mode-overlay-fadeout-duration",
          "annotation": "prop",
          "docs": "Sets the fadeout duration of the overlay which hides UI color flash on theme change",
          "visibility": "internal"
        },
        {
          "name": "--mds-pref-mode-overlay-show-duration",
          "annotation": "prop",
          "docs": "Sets the show duration of the overlay which hides UI color flash on theme change",
          "visibility": "internal"
        },
        {
          "name": "--mds-pref-mode-overlay-z-index",
          "annotation": "prop",
          "docs": "Sets the z-index of the overlay which hides UI color flash on theme change",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-tab",
        "mds-tab-item"
      ],
      "dependencyGraph": {
        "mds-pref-mode": [
          "mds-text",
          "mds-tab",
          "mds-tab-item"
        ],
        "mds-tab-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-preferences-mode--docs"
    },
    {
      "filePath": "src/components/mds-pref-theme/mds-pref-theme.tsx",
      "encapsulation": "shadow",
      "tag": "mds-pref-theme",
      "readme": "# mds-pref-theme\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `mds-pref-theme-item` element/s."
        },
        {
          "name": "category",
          "text": "preferences"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-pref-theme>` web component is the theme-switcher segment of the Magma accessibility preferences panel, usually a direct child of [`<mds-pref>`](../mds-pref/AGENTS.md). It renders a labelled tab trigger that opens a dropdown of selectable named themes and, when a theme is chosen, applies it globally to the document.\n\n#### Semantic Behavior\n\n- **Usually inside `<mds-pref>`**: Placed as a direct slot child of `<mds-pref>`, alongside the other `mds-pref-*` controls; it also works on its own, since it applies and stores the theme by itself. What it gives up on its own is in its mistakes.\n- **Acts as a sub-parent itself**: Its own default slot must contain one or more `mds-pref-theme-item` elements; it drives their selected state so only the active theme is marked selected.\n- **Global theme application**: Selecting an item applies the theme document-wide: it writes `data-theme-name` and the `pref-theme-scheme-*` class on `<html>`.\n- **The theme's own mode**: A theme file can list the colour modes it can be used in (`color.modes`); a theme of one mode declares it in its block of `themes.css`, and the component applies the theme in that mode (`pref-theme-scheme-dark` or `-light`) whatever the item's `scheme` says. The stylesheet of the theme must be on the page when the theme is applied. The storage keeps the item's `scheme`.\n- **Persistence and hydration**: The current name, scheme and corner shape are persisted and restored across reloads: a stored value outranks the matching prop.\n- **Validation**: An invalid theme name (not lowercase kebab-case matching `^[a-z]+(-[a-z]+)*$`) is ignored with a console warning when the theme is applied: nothing is written on `<html>` or stored. So are the reserved names `light`, `dark` and `system` (they are mode values) and `scheme` or `scheme-*` (they would collide with the `pref-theme-scheme-*` classes), a `scheme` other than `light`, `dark` or `all`, and a `corner-shape` outside its keywords. A stored value the component cannot apply is dropped, and the prop is used instead.\n- **Events bubbled up**: Emits `mdsPrefThemeChange` with the `{ name, scheme }` detail on each pick, `scheme` being the one the theme is applied with (the theme's own mode, when it declares one). `<mds-pref-mode>` follows the scheme from `<html>`, with no listener. It also emits `mdsPrefChange` once per change, after applying it: `preference: 'theme'` for a new name or scheme, `'corner-shape'` for a new corner shape. The first application on load and a re-render that changes nothing do not emit it.\n- **Props set after load**: A `name`, `scheme` or `cornerShape` set from a script after load is stored and applied, as a pick is: the stored value outranks the prop only on load. A value the component would not apply is not stored.\n- **Localized label**: The \"Theme\" heading follows the active interface language.\n- **Trigger text**: The closed control shows the `label` of the item for the active theme, the same text the open list shows (localize the items, the trigger follows); when no item matches the active theme it shows the label derived from the name (`dark-blue` -> \"Dark blue\").\n\n#### Properties & Visual Configurations\n\n- **`name`**: The active theme name; it is overridden at runtime by any persisted value. Use it to declare the initial theme when no preference has been stored yet. The named themes are `business`, the base theme, and `editorial` ([`agents/theming.md`](../../../../agents/theming.md)). The default `'default'` is the old name of `business`, kept until the next major, when the default becomes `'business'`: the two names stand for the same theme, so with `name` left out the item `business` is the one marked, and an item named `default` is marked under `business`. `cool` and `warm` are deprecated.\n- **`scheme`**: Constrains the colour modes of the theme to `'light'`, `'dark'`, or `'all'` (default). Pick `'all'` for themes that ship both light and dark palettes; pick `'light'` or `'dark'` to force a single mode for a theme offered in one mode only. A theme that declares its own mode (`color.modes` in its file) needs no `scheme`: its declaration wins.\n- **`size`**: Sets the size (`'sm'` / `'md'`) of the nested tab UI. Inside `<mds-pref>`, set it on the parent: it reaches every `mds-pref-*` segment on load and when it changes, and overwrites the segment's own.\n- **`cornerShape`** (attribute `corner-shape`): The corner geometry of the whole page - `round`, `squircle`, `bevel`, `notch`, `scoop`, `square`, or `default`. It writes `data-corner-shape` on `<html>` and is persisted like the theme; `default` removes the attribute, and leaving the prop unset touches nothing ([`agents/theming.md`](../../../../agents/theming.md)).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-pref-theme>` component, ordered from most common to most specialized. The examples assume a working knowledge of the preferences system documented in [`agents/theming.md`](../../../../agents/theming.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Theme Chooser\n\nThe canonical form. Place `<mds-pref-theme>` inside [`<mds-pref>`](../mds-pref/AGENTS.md) and populate its default slot with one [`<mds-pref-theme-item>`](../mds-pref-theme-item/AGENTS.md) per available theme. The item whose `name` matches the active theme (the stored choice, or the parent's `name` on a first visit) starts as selected. The named themes are `business`, the base theme of the management software, and `editorial`, the theme of the publishing side.\n\n```html\n<mds-pref>\n  <mds-pref-theme name=\"business\" scheme=\"all\">\n    <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n    <mds-pref-theme-item label=\"Editoriale\" name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n  </mds-pref-theme>\n</mds-pref>\n```\n\n#### Scheme-Constrained Themes\n\nA theme made for one colour mode says so in its file (`\"modes\": [\"dark\"]` in `color`), and the component applies it in that mode with no attribute on the item. For a theme whose file says nothing, use `scheme=\"light\"` or `scheme=\"dark\"` on a `<mds-pref-theme-item>`. Either way the component writes the scheme on `<html>` and forces that mode even if the user's OS or mode preference asks for the opposite, and `<mds-pref-mode>` shows that mode with its other items locked.\n\n```html\n<mds-pref>\n  <mds-pref-theme name=\"business\" scheme=\"all\">\n    <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n    <!-- light only - dark mode will not activate with this item -->\n    <mds-pref-theme-item label=\"Editoriale chiaro\" name=\"editorial\" scheme=\"light\"></mds-pref-theme-item>\n  </mds-pref-theme>\n</mds-pref>\n```\n\n#### Listening for the Change Event\n\nReact to the user's selection via `mdsPrefThemeChange`. The event detail carries `{ name, scheme }` - use them to update any app-level state that tracks the active theme.\n\n```html\n<mds-pref>\n  <mds-pref-theme id=\"theme-chooser\" name=\"business\" scheme=\"all\">\n    <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n    <mds-pref-theme-item label=\"Editoriale\" name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n  </mds-pref-theme>\n</mds-pref>\n\n<script>\n  document.querySelector('#theme-chooser').addEventListener('mdsPrefThemeChange', (e) => {\n    console.log('Tema attivo:', e.detail.name, '- Schema:', e.detail.scheme);\n  });\n</script>\n```\n\n#### Declaring the Initial Theme\n\nUse the `name` prop to declare which theme should be active before the user makes a selection. If `localStorage` already holds a persisted value it takes precedence; otherwise the component applies `name` on first render.\n\n```html\n<mds-pref>\n  <!-- First-visit default is \"editorial\" -->\n  <mds-pref-theme name=\"editorial\" scheme=\"all\">\n    <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n    <mds-pref-theme-item label=\"Editoriale\" name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n  </mds-pref-theme>\n</mds-pref>\n```\n\n#### Controlling Item Size\n\nPass `size=\"sm\"` when the preferences panel must fit a compact layout: on `<mds-pref>`, which forwards it to every preference control.\n\n```html\n<mds-pref size=\"sm\">\n  <mds-pref-theme name=\"business\" scheme=\"all\">\n    <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n    <mds-pref-theme-item label=\"Editoriale\" name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n  </mds-pref-theme>\n</mds-pref>\n```\n\n#### Styling Theme Items\n\nStyle theme items only through their public `--mds-pref-theme-item-*` CSS custom properties. Set them on the item host or on a parent selector; name a semantic role, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)), so the colours follow the mode, the theme and the contrast preference.\n\n```css\nmds-pref-theme-item {\n  --mds-pref-theme-item-color-background: rgb(var(--magma-surface-inverse));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-pref-theme>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules (boolean-as-string, shadow piercing, Tailwind colour 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 Component Outside `<mds-pref>`\n\n`<mds-pref-theme>` is a compound sub-part designed to slot inside [`<mds-pref>`](../mds-pref/AGENTS.md). As a standalone widget it still applies and persists the theme, but it leaves the panel: `<mds-pref>` can no longer forward `size` changes to it. The lock of a single-mode theme on `<mds-pref-mode>` holds either way.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-theme name=\"business\" scheme=\"all\">\n  <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n\n<!-- CORRECT -->\n<mds-pref>\n  <mds-pref-theme name=\"business\" scheme=\"all\">\n    <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n  </mds-pref-theme>\n</mds-pref>\n```\n\n#### Do Not Put Plain Text or Arbitrary HTML in the Default Slot\n\nThe default slot is reserved exclusively for `<mds-pref-theme-item>` elements. Any other content bypasses the component's internal selection management and will not trigger theme application.\n\n```html\n<!-- INCORRECT -->\n<mds-pref>\n  <mds-pref-theme name=\"business\" scheme=\"all\">\n    <button>Gestionale</button>\n    <span>Editoriale</span>\n  </mds-pref-theme>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref>\n  <mds-pref-theme name=\"business\" scheme=\"all\">\n    <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n    <mds-pref-theme-item label=\"Editoriale\" name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n  </mds-pref-theme>\n</mds-pref>\n```\n\n#### Do Not Use an Invalid Theme Name\n\nThe `name` prop must match the pattern `^[a-z]+(-[a-z]+)*$` (lowercase letters and hyphens only). Any other value - including uppercase, underscores, or spaces - is ignored with a console warning when the component tries to apply the theme on `<html>`: the theme is neither applied nor stored.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-theme name=\"My Theme\" scheme=\"all\">...</mds-pref-theme>\n<mds-pref-theme name=\"my_theme\" scheme=\"all\">...</mds-pref-theme>\n<mds-pref-theme name=\"MyTheme\" scheme=\"all\">...</mds-pref-theme>\n\n<!-- CORRECT -->\n<mds-pref-theme name=\"editorial\" scheme=\"all\">...</mds-pref-theme>\n```\n\n#### Do Not Listen for the Native `change` Event\n\n`<mds-pref-theme>` emits `mdsPrefThemeChange` - a documented custom event with a typed `{ name, scheme }` detail. Listening for the native `change` event will not fire because theme selection is handled entirely inside shadow DOM.\n\n```html\n<!-- INCORRECT -->\n<script>\n  document.querySelector('mds-pref-theme').addEventListener('change', (e) => {\n    console.log(e.target.value); // undefined - wrong event, wrong detail shape\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('mds-pref-theme').addEventListener('mdsPrefThemeChange', (e) => {\n    console.log(e.detail.name, e.detail.scheme);\n  });\n</script>\n```\n\n#### Do Not Give the Parent and the Child Different Sizes\n\n`<mds-pref>` forwards its own `size` to all `mds-pref-*` children, on load and when it changes, and overwrites theirs: a `size` on `<mds-pref-theme>` that differs from the parent's is never shown. Set the size on the parent only.\n\n```html\n<!-- INCORRECT -->\n<mds-pref size=\"sm\">\n  <mds-pref-theme size=\"md\" name=\"default\" scheme=\"all\">\n    <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n  </mds-pref-theme>\n</mds-pref>\n\n<!-- CORRECT -->\n<mds-pref size=\"sm\">\n  <mds-pref-theme name=\"business\" scheme=\"all\">\n    <mds-pref-theme-item label=\"Gestionale\" name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n  </mds-pref-theme>\n</mds-pref>\n```\n"
      },
      "props": [
        {
          "name": "cornerShape",
          "type": "\"bevel\" | \"default\" | \"notch\" | \"round\" | \"scoop\" | \"square\" | \"squircle\" | undefined",
          "complexType": {
            "original": "PreferenceCornerShapeChoiceType",
            "resolved": "\"bevel\" | \"default\" | \"notch\" | \"round\" | \"scoop\" | \"square\" | \"squircle\" | undefined",
            "references": {
              "PreferenceCornerShapeChoiceType": {
                "location": "import",
                "path": "@type/preference",
                "id": "src/type/preference.ts::PreferenceCornerShapeChoiceType",
                "referenceLocation": "PreferenceCornerShapeChoiceType"
              }
            }
          },
          "mutable": true,
          "attr": "corner-shape",
          "reflectToAttr": true,
          "docs": "Specifies the corner geometry of the whole page: one of the `corner-shape`\nkeywords, or `default`.\n\nCorner geometry is theme appearance rather than an accessibility preference,\nwhich is why it lives here next to the theme name and scheme instead of in\n`mds-pref-mode`. Setting it writes `data-corner-shape` on `<html>`, where\nthe generated axis picks both the shape and the radius scale tuned for it.\n\nLeaving it unset touches nothing. Setting it to `default` REMOVES the\nattribute rather than writing today's default into the page, so a project\nthat never chose keeps following the design system when the default changes.",
          "docsTags": [],
          "values": [
            {
              "value": "bevel",
              "type": "string"
            },
            {
              "value": "default",
              "type": "string"
            },
            {
              "value": "notch",
              "type": "string"
            },
            {
              "value": "round",
              "type": "string"
            },
            {
              "value": "scoop",
              "type": "string"
            },
            {
              "value": "square",
              "type": "string"
            },
            {
              "value": "squircle",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": true,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Specifies the theme name attribute\nA string representing the theme name, in lowercase kebab-case.",
          "docsTags": [
            {
              "name": "example",
              "text": "'maggioli-editore'"
            },
            {
              "name": "default",
              "text": "'default'"
            }
          ],
          "default": "'default'",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "scheme",
          "type": "\"all\" | \"dark\" | \"light\"",
          "complexType": {
            "original": "PreferenceThemeSchemeType",
            "resolved": "\"all\" | \"dark\" | \"light\"",
            "references": {
              "PreferenceThemeSchemeType": {
                "location": "import",
                "path": "@type/preference",
                "id": "src/type/preference.ts::PreferenceThemeSchemeType",
                "referenceLocation": "PreferenceThemeSchemeType"
              }
            }
          },
          "mutable": true,
          "attr": "scheme",
          "reflectToAttr": true,
          "docs": "Specifies the theme scheme which can be 'light', 'dark' or 'all'\nDefault is 'all' which means this theme supporto both light and dark.\nIf you set 'light' means this theme support only light mode and will be forced and shown light colors mode only.\nA theme whose stylesheet declares one mode (`--magma-color-modes`, from `color.modes` of its\nfile) is applied in that mode whatever this says: the theme's own lock wins.",
          "docsTags": [
            {
              "name": "default",
              "text": "'all'"
            }
          ],
          "default": "'all'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "TabSizeType",
            "resolved": "\"md\" | \"sm\" | undefined",
            "references": {
              "TabSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::TabSizeType",
                "referenceLocation": "TabSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component items nested inside it",
          "docsTags": [],
          "values": [
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsPrefChange",
          "detail": "MdsPrefChangeEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPrefChangeEventDetail",
            "resolved": "MdsPrefChangeEventDetail",
            "references": {
              "MdsPrefChangeEventDetail": {
                "location": "import",
                "path": "@event/preference",
                "id": "src/event-detail/preference.ts::MdsPrefChangeEventDetail",
                "referenceLocation": "MdsPrefChangeEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is triggered",
          "docsTags": []
        },
        {
          "event": "mdsPrefThemeChange",
          "detail": "MdsPrefThemeEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPrefThemeEventDetail",
            "resolved": "MdsPrefThemeEventDetail",
            "references": {
              "MdsPrefThemeEventDetail": {
                "location": "import",
                "path": "@event/theme",
                "id": "src/event-detail/theme.ts::MdsPrefThemeEventDetail",
                "referenceLocation": "MdsPrefThemeEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component changes the language selected from the click event of the dropdown list item.\nIts `scheme` is the one the theme is applied with: the mode the theme declares, when it\ndeclares one, or else the scheme of the item.",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "mdsPrefThemeItemSelect",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-pref-theme-item` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-tab",
        "mds-tab-item",
        "mds-dropdown"
      ],
      "dependencyGraph": {
        "mds-pref-theme": [
          "mds-text",
          "mds-tab",
          "mds-tab-item",
          "mds-dropdown"
        ],
        "mds-tab-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-preferences-theme--docs"
    },
    {
      "filePath": "src/components/mds-pref-theme-item/mds-pref-theme-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-pref-theme-item",
      "readme": "# mds-pref-theme-item\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "parent",
          "text": "mds-pref-theme"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-pref-theme-item>` web component is a single selectable theme entry inside the [`<mds-pref-theme>`](../mds-pref-theme/AGENTS.md) preference picker. It renders as a borderless button that pairs a color-swatch preview of the theme with its label.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct default-slot child of `<mds-pref-theme>`; it is not used standalone or mixed with other child component types.\n- **Selection is parent-driven**: On click each item emits `mdsPrefThemeItemSelect` (carrying `{ name, scheme }`), and the parent responds by clearing the siblings and selecting the clicked one. Setting `selected` directly on a single item does not coordinate the others.\n- **Click bubbles up**: The emitted event is what the parent listens to in order to apply the theme to the document and persist the choice.\n- **Auto-derived label**: If `label` is omitted, it is generated from `name` by capitalizing the first letter and replacing hyphens with spaces (e.g. `maggioli-editore` becomes `Maggioli editore`).\n- **Preview of the theme it names**: The preview background and the primary dot show the wash and the accent of the theme named by `name`, which the styles of that theme publish as `--magma-preview-<name>-wash` and `--magma-preview-<name>-accent` (`themes.css` does for every theme Magma ships), so each item of the picker shows its own theme whatever the active one. The success, warning and error dots are the page's status emphases, which no theme retints. A theme that publishes no preview shows the active theme. The `--mds-pref-theme-item-*` CSS custom properties paint all of it and still override it.\n\n#### Properties & Visual Configurations\n\n- **`name`**: The theme identifier reported to the parent and matched against the parent's active `name` to compute initial selection. Use a simple or kebab-case string; the named themes are `business`, the base theme, and `editorial` ([`agents/theming.md`](../../../../agents/theming.md)). `default`, `cool` and `warm` still work and are deprecated: they leave at the next major. The parent validates the lowercase/kebab format and ignores an invalid name with a console warning.\n- **`scheme`**: Declares which color schemes the theme supports - `all` (default, both light and dark), or `light` / `dark` to force a single mode. This value travels with the selection event and is applied by the parent when the item is chosen, unless the theme declares its own mode in its stylesheet (`color.modes` of its file), which wins.\n- **`selected`**: Reflects whether this item is the active theme. The parent sets it on every item when it loads and on each pick, so a value set by hand is overwritten.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-pref-theme-item>` 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 Usage Inside the Parent\n\n`<mds-pref-theme-item>` must always be a direct child of [`<mds-pref-theme>`](../mds-pref-theme/AGENTS.md). Each item represents one selectable colour theme; the parent manages selection state so all siblings stay in sync.\n\n```html\n<mds-pref-theme name=\"business\" scheme=\"all\">\n  <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n  <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### Auto-Derived Label\n\nOmit `label` and let the component generate it from `name`: the first letter is capitalised and hyphens are replaced with spaces. Use this shorthand when the theme name is already human-readable.\n\n```html\n<mds-pref-theme name=\"business\" scheme=\"all\">\n  <!-- renders \"Business\" and \"Editorial\" without explicit label props -->\n  <mds-pref-theme-item name=\"business\" scheme=\"all\"></mds-pref-theme-item>\n  <mds-pref-theme-item name=\"editorial\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### Scheme-Specific Themes\n\nSet `scheme` to `\"light\"` or `\"dark\"` when a theme must be offered in a single colour mode only. The parent applies the forced mode when the item is selected.\n\n```html\n<mds-pref-theme name=\"business\" scheme=\"all\">\n  <!-- this theme works in both modes -->\n  <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n\n  <!-- offered light-only; selecting it locks the UI in light mode -->\n  <mds-pref-theme-item name=\"editorial\" label=\"Editoriale chiaro\" scheme=\"light\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### Listening to the Selection Event\n\nAttach a listener for `mdsPrefThemeItemSelect` when you need to react to a selection at the item level - for example to log analytics. The detail carries `{ name, scheme }`. Normally the parent handles theme application automatically; only listen at this level for side-effects.\n\n```html\n<mds-pref-theme name=\"business\" scheme=\"all\">\n  <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n  <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n\n<script>\n  document.querySelectorAll('mds-pref-theme-item').forEach((item) => {\n    item.addEventListener('mdsPrefThemeItemSelect', (e) => {\n      console.log('Tema selezionato:', e.detail.name, 'schema:', e.detail.scheme);\n    });\n  });\n</script>\n```\n\n#### Setting the Initially Selected Item\n\nDeclare it on the parent, not with `selected`: when it loads, `<mds-pref-theme>` marks the item whose `name` matches the active theme (the stored choice, or its own `name` on a first visit) and overwrites any `selected` written in the markup.\n\n```html\n<mds-pref-theme name=\"editorial\" scheme=\"all\">\n  <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n  <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### CSS Customization via Documented Properties\n\nOverride the swatch only through the public `--mds-pref-theme-item-color-background` CSS custom property, the background behind the preview dots; the dots themselves are painted by the component. Set it on the host element or a parent selector and name a semantic role for the colour value, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)), so mode, theme and contrast keep working. It replaces the preview of the theme the item names.\n\n```css\n/* override the swatch background of one theme item */\nmds-pref-theme-item[name=\"editorial\"] {\n  --mds-pref-theme-item-color-background: rgb(var(--magma-wash-strong));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-pref-theme-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 the Item Outside Its Parent\n\n`<mds-pref-theme-item>` is a compound child that must be a direct slot child of [`<mds-pref-theme>`](../mds-pref-theme/AGENTS.md). Used standalone it emits selection events that are never handled, and it never receives coordinated deselection of siblings.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n\n<!-- CORRECT -->\n<mds-pref-theme name=\"business\" scheme=\"all\">\n  <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### Do Not Set `selected` Manually to Coordinate Multi-Item State\n\nSetting `selected` on one item does not deselect the others - the parent is the only actor that can coordinate the whole group. When it loads it marks only the item matching the active theme, overwriting the `selected` in the markup; a value set later from script leaves several items marked. Drive initial selection through the parent's `name` prop or by letting the user click.\n\n```html\n<!-- INCORRECT - the parent overwrites both on load and marks \"default\" -->\n<mds-pref-theme name=\"business\" scheme=\"all\">\n  <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n  <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\" selected></mds-pref-theme-item>\n</mds-pref-theme>\n\n<!-- CORRECT - set the active theme on the parent; it marks the matching child -->\n<mds-pref-theme name=\"editorial\" scheme=\"all\">\n  <mds-pref-theme-item name=\"business\" label=\"Gestionale\" scheme=\"all\"></mds-pref-theme-item>\n  <mds-pref-theme-item name=\"editorial\" label=\"Editoriale\" scheme=\"all\"></mds-pref-theme-item>\n</mds-pref-theme>\n```\n\n#### Do Not Listen for Native `click` Instead of the Component Event\n\nA raw `click` carries no `detail`: you have to read `name` back from the element, and you lose the `scheme`. Listen for the documented `mdsPrefThemeItemSelect` event instead, whose detail carries `{ name, scheme }`.\n\n```html\n<!-- INCORRECT -->\n<script>\n  document.querySelector('mds-pref-theme-item').addEventListener('click', (e) => {\n    applyTheme(e.target.getAttribute('name'));\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('mds-pref-theme-item').addEventListener('mdsPrefThemeItemSelect', (e) => {\n    applyTheme(e.detail.name);\n  });\n</script>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Inner Button\n\nThe supported customization surface is the public `--mds-pref-theme-item-color-background` CSS custom property. Targeting internal selectors or `::part()` names not present in this component's public API couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-pref-theme-item >>> mds-button {\n  font-weight: bold;\n}\nmds-pref-theme-item .theme-preview {\n  border: 2px solid red;\n}\n\n/* CORRECT */\nmds-pref-theme-item[name=\"editorial\"] {\n  --mds-pref-theme-item-color-background: rgb(var(--magma-wash-strong));\n}\n```\n\n#### Do Not Use an Invalid `scheme` Value\n\n`scheme` only accepts `\"all\"`, `\"light\"`, or `\"dark\"`. Other strings are ignored by the parent with a console warning: picking the item applies and stores nothing, so the theme does not change at all.\n\n```html\n<!-- INCORRECT -->\n<mds-pref-theme-item name=\"editorial\" scheme=\"light-only\"></mds-pref-theme-item>\n<mds-pref-theme-item name=\"business\" scheme=\"night\"></mds-pref-theme-item>\n\n<!-- CORRECT -->\n<mds-pref-theme-item name=\"editorial\" scheme=\"light\"></mds-pref-theme-item>\n<mds-pref-theme-item name=\"business\" scheme=\"dark\"></mds-pref-theme-item>\n```\n"
      },
      "props": [
        {
          "name": "label",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "label",
          "reflectToAttr": true,
          "docs": "Specifies the theme name",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "name",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "name",
          "reflectToAttr": true,
          "docs": "Specifies the theme name; the swatch shows the preview that theme publishes,\n`--magma-preview-<name>-wash` and `--magma-preview-<name>-accent`",
          "docsTags": [
            {
              "name": "example",
              "text": "'editorial'"
            },
            {
              "name": "default",
              "text": "'default'"
            }
          ],
          "default": "'default'",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "scheme",
          "type": "\"all\" | \"dark\" | \"light\" | undefined",
          "complexType": {
            "original": "PreferenceThemeSchemeType",
            "resolved": "\"all\" | \"dark\" | \"light\" | undefined",
            "references": {
              "PreferenceThemeSchemeType": {
                "location": "import",
                "path": "@type/preference",
                "id": "src/type/preference.ts::PreferenceThemeSchemeType",
                "referenceLocation": "PreferenceThemeSchemeType"
              }
            }
          },
          "mutable": false,
          "attr": "scheme",
          "reflectToAttr": true,
          "docs": "Specifies the theme scheme which can be 'light', 'dark' or 'all'",
          "docsTags": [
            {
              "name": "default",
              "text": "'all'"
            }
          ],
          "default": "'all'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Specifies if the element is selected",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsPrefThemeItemSelect",
          "detail": "MdsPrefThemeEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPrefThemeEventDetail",
            "resolved": "MdsPrefThemeEventDetail",
            "references": {
              "MdsPrefThemeEventDetail": {
                "location": "import",
                "path": "@event/theme",
                "id": "src/event-detail/theme.ts::MdsPrefThemeEventDetail",
                "referenceLocation": "MdsPrefThemeEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component trigger the language",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-pref-theme-item-color-background",
          "annotation": "prop",
          "docs": "Background color of a theme item: the wash of the theme it names.",
          "visibility": "public"
        },
        {
          "name": "--mds-pref-theme-item-color-status-error",
          "annotation": "prop",
          "docs": "Color representing an error status for a theme item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-pref-theme-item-color-status-success",
          "annotation": "prop",
          "docs": "Color representing a success status for a theme item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-pref-theme-item-color-status-warning",
          "annotation": "prop",
          "docs": "Color representing a warning status for a theme item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-pref-theme-item-color-variant-primary",
          "annotation": "prop",
          "docs": "Color for the primary variant item: the accent of the theme it names.",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-pref-theme-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-preferences-theme-item--docs"
    },
    {
      "filePath": "src/components/mds-price-table/mds-price-table.tsx",
      "encapsulation": "shadow",
      "tag": "mds-price-table",
      "readme": "# mds-price-table\n\n\n\nThis 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.\n",
      "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 `mds-price-table-list` elements or `components` to this slot."
        },
        {
          "name": "category",
          "text": "data"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-price-table>` web component is the layout container of the Magma Design System pricing-table family. It owns no logic or visual chrome of its own: it stacks its slotted compound children (the plan columns, header and feature matrix) into a coherent pricing comparison surface.\n\n#### Semantic Behavior\n\n- **Default slot only**: Any markup placed between the tags is projected verbatim. It expects the dedicated compound children (`mds-price-table-list`, `mds-price-table-header`, `mds-price-table-features`, which in turn holds the `mds-price-table-features-row` / `mds-price-table-features-cell` matrix) rather than free-form content.\n- **Grid layout host**: Projected blocks are spaced consistently regardless of how many plans or feature rows are supplied.\n- **Responsive composition**: It does not switch layouts internally. Two arrangements are expressed through the children and utility classes - a stacked, per-plan layout (each `mds-price-table-list` carrying its own feature matrix) for narrow viewports, and a shared `mds-price-table-header` + single `mds-price-table-features` matrix for wide viewports.\n- **No props, events, or state**: All configuration lives on the child components.\n\n#### Properties & Visual Configurations\n\nThis component is a pure compound parent and intentionally has no configurable props. Visual variation comes from the children it wraps - for example the `type` attribute on `mds-price-table-features-cell` (`'label'`, `'text'`, `'supported'`, `'unsupported'`) drives what each matrix cell renders, and the named slots on `mds-price-table-list` (`header`, `price`, `action`) position each plan's heading, price and call-to-action. Refer to those child components' own documentation for their value ladders.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-price-table>` family, 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#### Single-Plan Card (Mobile Layout)\n\nUse one `<mds-price-table>` per plan on narrow viewports. Each instance contains one `<mds-price-table-list>` (the plan card) followed by one `<mds-price-table-features>` (its feature matrix). The `header`, `price`, and `action` slots of `<mds-price-table-list>` position plan heading, price, and call-to-action respectively.\n\n```html\n<mds-price-table>\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" tag=\"h4\" slot=\"header\">Piano Base</mds-text>\n    <mds-text typography=\"detail\" slot=\"header\">Ideale per liberi professionisti.</mds-text>\n    <mds-text typography=\"h2\" tag=\"h4\" slot=\"price\">49 EUR</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Inizia ora</mds-button>\n  </mds-price-table-list>\n  <mds-price-table-features>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Supporto</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Report avanzati</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Multi-Plan Comparison (Desktop Layout)\n\nUse a single `<mds-price-table>` wrapping one `<mds-price-table-header>` and one shared `<mds-price-table-features>`. The header holds a heading element plus one `<mds-price-table-list>` per plan. Each `<mds-price-table-features-row>` then carries one `label` cell followed by one data cell per plan - the row component distributes them evenly.\n\n```html\n<mds-price-table>\n  <mds-price-table-header class=\"tablet:grid-cols-3 desktop:grid-cols-4\">\n    <mds-text typography=\"h1\" tag=\"h3\" class=\"desktop:py-600\">Scegli il tuo piano</mds-text>\n\n    <mds-price-table-list>\n      <mds-text typography=\"h5\" tag=\"h4\" slot=\"header\">Base</mds-text>\n      <mds-text typography=\"h2\" tag=\"h4\" slot=\"price\">49 EUR</mds-text>\n      <mds-button slot=\"action\" variant=\"dark\">Inizia</mds-button>\n    </mds-price-table-list>\n\n    <mds-price-table-list class=\"bg-label-amaranth-10\">\n      <mds-text typography=\"h5\" tag=\"h4\" slot=\"header\">Professional</mds-text>\n      <mds-text typography=\"h2\" tag=\"h4\" slot=\"price\">99 EUR</mds-text>\n      <mds-button slot=\"action\" variant=\"dark\">Inizia</mds-button>\n    </mds-price-table-list>\n  </mds-price-table-header>\n\n  <mds-price-table-features label=\"Caratteristiche\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">20</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Automazione</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Feature Matrix Section with a Label\n\nPass the `label` prop to `<mds-price-table-features>` to render a bold section heading above the feature rows. Use this when the comparison is split across multiple thematic groups (for example \"Funzionalita base\" and \"Report e analisi\").\n\n```html\n<mds-price-table-features label=\"Report e analisi\">\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Export report</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  </mds-price-table-features-row>\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Report avanzati</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  </mds-price-table-features-row>\n</mds-price-table-features>\n```\n\n#### Feature Cell Types\n\n`<mds-price-table-features-cell>` drives what each matrix cell renders through its `type` attribute. The five accepted values are: `label` (plain row heading), `text` (detail string), `supported` (check icon), `unsupported` (dash icon), and `custom` (arbitrary slotted content).\n\n```html\n<mds-price-table-features-row>\n  <!-- Row heading - typically the first cell -->\n  <mds-price-table-features-cell type=\"label\">Archiviazione</mds-price-table-features-cell>\n\n  <!-- Text value cell -->\n  <mds-price-table-features-cell type=\"text\">10 GB</mds-price-table-features-cell>\n\n  <!-- Supported / unsupported icon cells (no slotted content needed) -->\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n\n  <!-- Custom cell for arbitrary content -->\n  <mds-price-table-features-cell type=\"custom\">\n    <mds-badge variant=\"success\" tone=\"weak\">Nuovo</mds-badge>\n  </mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### Contextual Help on a Feature Cell\n\nSlot an `<mds-help>` inside a `label` or `text` cell to add an inline tooltip explaining a feature. Place it directly after the label text so the icon appears inline.\n\n```html\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">\n    Funzionalita automatizzate\n    <mds-help>Includono notifiche, workflow e integrazioni API.</mds-help>\n  </mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### List Items Inside a Plan Card\n\nUse `<mds-price-table-list-item>` for a bulleted feature list inside a plan card: the item assigns itself to the `item` slot, so it needs no `slot` attribute. Add the boolean `supported` attribute for included features and omit it (default `false`) for excluded ones. The `typography` prop controls the text size.\n\n```html\n<mds-price-table-list>\n  <mds-text typography=\"h5\" tag=\"h4\" slot=\"header\">Piano Base</mds-text>\n  <mds-text typography=\"h2\" tag=\"h4\" slot=\"price\">49 EUR</mds-text>\n\n  <mds-price-table-list-item supported>Accesso base</mds-price-table-list-item>\n  <mds-price-table-list-item supported>Supporto clienti</mds-price-table-list-item>\n  <mds-price-table-list-item>Automazione</mds-price-table-list-item>\n  <mds-price-table-list-item>Export report</mds-price-table-list-item>\n\n  <mds-button slot=\"action\" variant=\"dark\">Inizia ora</mds-button>\n</mds-price-table-list>\n```\n\n#### Highlighted Plan Card\n\nApply a Magma label-color utility class directly to `<mds-price-table-list>` to visually distinguish a recommended or featured plan. Do not set a background color through inline styles or custom CSS; use the documented background tokens.\n\n```html\n<mds-price-table>\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" tag=\"h4\" slot=\"header\">Base</mds-text>\n    <mds-text typography=\"h2\" tag=\"h4\" slot=\"price\">49 EUR</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Inizia</mds-button>\n  </mds-price-table-list>\n\n  <!-- Highlighted plan -->\n  <mds-price-table-list class=\"bg-label-amaranth-10\">\n    <mds-text typography=\"h5\" tag=\"h4\" slot=\"header\">Professional</mds-text>\n    <mds-text typography=\"h2\" tag=\"h4\" slot=\"price\">99 EUR</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Inizia</mds-button>\n  </mds-price-table-list>\n</mds-price-table>\n```\n\n#### Styling a Plan Column\n\n`<mds-price-table-list>` has no public CSS custom property: the horizontal rule that separates the header from the item list keeps the colour the component gives it, in every mode and contrast preference. Adjust the layout of a plan through its documented `header`, `content` and `footer` shadow parts, and name a semantic role ([`agents/color.md`](../../../../agents/color.md)) for any colour you set there.\n\n```css\n.featured-plan mds-price-table-list::part(header) {\n  padding-bottom: calc(var(--spacing) * 200);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of the `<mds-price-table>` family. 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 Child Components Outside Their Parent\n\n`<mds-price-table-features-row>` and `<mds-price-table-features-cell>` communicate with `<mds-price-table-features>` through the slot mechanism. Placing them in free-form HTML drops the `<table>` the parent renders around them (fixed layout, collapsed borders) and the cell padding it shares through `--mds-price-table-features-padding`.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n</mds-price-table-features-row>\n\n<!-- CORRECT -->\n<mds-price-table-features>\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n  </mds-price-table-features-row>\n</mds-price-table-features>\n```\n\n#### Do Not Omit the Slot Name on Plan Card Children\n\n`<mds-price-table-list>` routes content through named slots: `header`, `price`, and `action`. The component has no default slot: content without a `slot` attribute is not rendered at all (only `<mds-price-table-list-item>` assigns itself to the `item` slot).\n\n```html\n<!-- INCORRECT - none of these is rendered -->\n<mds-price-table-list>\n  <mds-text typography=\"h5\" tag=\"h4\">Piano Base</mds-text>\n  <mds-text typography=\"h2\" tag=\"h4\">49 EUR</mds-text>\n  <mds-button variant=\"dark\">Inizia</mds-button>\n</mds-price-table-list>\n\n<!-- CORRECT -->\n<mds-price-table-list>\n  <mds-text typography=\"h5\" tag=\"h4\" slot=\"header\">Piano Base</mds-text>\n  <mds-text typography=\"h2\" tag=\"h4\" slot=\"price\">49 EUR</mds-text>\n  <mds-button slot=\"action\" variant=\"dark\">Inizia</mds-button>\n</mds-price-table-list>\n```\n\n#### Do Not Pass `supported=\"false\"` as a String on `mds-price-table-list-item`\n\n`supported` is a boolean prop: express a missing feature by removing the attribute, the convention for every Magma boolean ([`agents/conventions.md`](../../../../agents/conventions.md)). Stencil does parse `\"false\"` as `false`, but the attribute stays in the markup until the component hydrates and its reflection removes it, so a `[supported]` selector or any code reading the attribute sees it set in the meantime.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-list-item supported=\"false\">Export report</mds-price-table-list-item>\n\n<!-- CORRECT -->\n<mds-price-table-list-item>Export report</mds-price-table-list-item>\n```\n\n#### Do Not Use an Invalid `type` on `mds-price-table-features-cell`\n\n`type` accepts exactly five values: `label`, `text`, `supported`, `unsupported`, `custom`. An unrecognised value silently renders nothing because the component matches each value with a conditional render branch.\n\n```html\n<!-- INCORRECT (not a valid type value) -->\n<mds-price-table-features-cell type=\"check\"></mds-price-table-features-cell>\n<mds-price-table-features-cell type=\"icon\"></mds-price-table-features-cell>\n\n<!-- CORRECT -->\n<mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n```\n\n#### Do Not Place Free-Form HTML Directly Inside `mds-price-table`\n\n`<mds-price-table>` is a pure layout host - its slot expects the dedicated compound children. Arbitrary HTML breaks the grid spacing contract and produces unstyled content because the component applies no visual treatment to unknown children.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table>\n  <div class=\"piano\">\n    <h3>Piano Base</h3>\n    <p>49 EUR/mese</p>\n  </div>\n</mds-price-table>\n\n<!-- CORRECT -->\n<mds-price-table>\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" tag=\"h4\" slot=\"header\">Piano Base</mds-text>\n    <mds-text typography=\"h2\" tag=\"h4\" slot=\"price\">49 EUR/mese</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Inizia</mds-button>\n  </mds-price-table-list>\n</mds-price-table>\n```\n\n#### Do Not Put Slotted Content Inside `supported` or `unsupported` Cells\n\n`<mds-price-table-features-cell type=\"supported\">` and `type=\"unsupported\"` render a fixed icon and ignore any slotted content. Only `type=\"text\"`, `type=\"label\"`, and `type=\"custom\"` project slotted nodes.\n\n```html\n<!-- INCORRECT - slotted text is silently ignored -->\n<mds-price-table-features-cell type=\"supported\">Si</mds-price-table-features-cell>\n<mds-price-table-features-cell type=\"unsupported\">No</mds-price-table-features-cell>\n\n<!-- CORRECT - leave icon cells empty or use text/custom for values -->\n<mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n<mds-price-table-features-cell type=\"text\">Non disponibile</mds-price-table-features-cell>\n```\n\n#### Do Not Pierce Shadow Parts of Child Components to Restyle Cells\n\n`<mds-price-table-features-cell>` exposes two documented shadow parts: `icon` (the check or dash icon) and `text` (the detail text wrapper). Targeting undocumented internals via `>>>` or unlisted `::part()` names couples app code to implementation details that may change.\n\n```css\n/* INCORRECT */\nmds-price-table-features-cell >>> .icon {\n  fill: red;\n}\nmds-price-table-features-cell::part(cell-wrapper) {\n  padding: 1rem;\n}\n\n/* CORRECT */\nmds-price-table-features-cell::part(icon) {\n  fill: rgb(var(--magma-success-fg));\n}\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-price-table-list` elements or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-price-table--docs"
    },
    {
      "filePath": "src/components/mds-price-table-features/mds-price-table-features.tsx",
      "encapsulation": "shadow",
      "tag": "mds-price-table-features",
      "readme": "# mds-price-table-features\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "header - Selects the HTML element wrapper of label text"
        },
        {
          "name": "slot",
          "text": "- Expects to slot `mds-price-table-features-row` component"
        },
        {
          "name": "parent",
          "text": "mds-price-table"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-price-table-features>` web component is the feature-matrix block of the Magma Design System pricing-table family. It is a compound child of [`<mds-price-table>`](../mds-price-table/AGENTS.md) and renders a table inside its shadow root, turning its slotted rows into the side-by-side feature comparison grid of a pricing table.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct slot child of `<mds-price-table>`; it is not used standalone. Its own default slot expects only `mds-price-table-features-row` elements, which in turn hold `mds-price-table-features-cell` children.\n- **Table wrapper, not a leaf**: The host owns the structural table; the slotted rows and their cells supply the actual row/cell semantics.\n- **Optional header band**: A header (shadow part `header`) is rendered only when `label` is set, displaying the title. With no `label` the header is omitted and the table starts at the first row.\n- **No state, events, or form association**: The component is purely presentational. Cell content and per-cell rendering (supported / unsupported / text / label) are decided entirely by the child cells.\n\n#### Properties & Visual Configurations\n\nThis component has essentially one configurable prop:\n\n- **`label`**: Sets an optional title rendered in the header band above the matrix. Provide it to name the feature group (e.g. a section heading shared across all plan columns); omit it when the matrix should appear without a heading.\n\nAll other variation comes from the slotted children rather than from props. Column widths are computed by each `mds-price-table-features-row`, and the visual treatment of each cell is driven by the `type` prop on `mds-price-table-features-cell`. Spacing can be tuned through the public `--mds-price-table-features-padding` (the header band and, by inheritance, every cell), listed in [`AGENTS.md`](AGENTS.md); the dividers of the header band and of the cells keep the colour the component gives them.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-price-table-features>` 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 Feature Matrix\n\nThe minimal form: place `<mds-price-table-features>` inside [`<mds-price-table>`](../mds-price-table/AGENTS.md) and slot [`<mds-price-table-features-row>`](../mds-price-table-features-row/AGENTS.md) children. Each row holds one [`<mds-price-table-features-cell>`](../mds-price-table-features-cell/AGENTS.md) per plan column. The first cell of every row conventionally uses `type=\"label\"` to identify the feature.\n\n```html\n<mds-price-table>\n  <mds-price-table-features>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">50</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">Illimitati</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Named Section with `label`\n\nSet the `label` prop to render a header band above the matrix. Use this to name a logical group of features - for example \"Report e analisi\" or \"Sicurezza\". Omit `label` when no group heading is needed.\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Report e analisi\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Esporta report</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Supported and Unsupported Cells\n\nUse `type=\"supported\"` and `type=\"unsupported\"` for boolean feature availability. The cell renders a built-in icon - no slot content is needed (and any content is ignored).\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Funzionalita' avanzate\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Autenticazione SSO</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Notifiche email</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Text Cells with Contextual Help\n\nUse `type=\"text\"` to display a value string. Mix inline components such as [`<mds-help>`](../mds-help/AGENTS.md) inside the cell slot for additional context.\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Archiviazione\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Spazio incluso</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">10 GB</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">100 GB</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">\n        1 TB\n        <mds-help placement=\"top\">Può variare in base allo stato del server.</mds-help>\n      </mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Custom Cell Content via `type=\"custom\"`\n\nUse `type=\"custom\"` when none of the standard rendering modes fits. The slot is rendered without wrapping markup, giving full control over layout and content.\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Componenti aggiuntivi\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Integrazioni API</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"custom\">\n        <mds-badge label=\"Su richiesta\" variant=\"info\"></mds-badge>\n      </mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Multiple Feature Sections in One Price Table\n\nCompose several `<mds-price-table-features>` blocks inside one [`<mds-price-table>`](../mds-price-table/AGENTS.md) to separate logical feature groups. Each block carries its own optional `label` heading.\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Funzioni di base\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">5</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">20</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">Illimitati</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n\n  <mds-price-table-features label=\"Report e analisi\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Dashboard</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Report avanzati</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Styling Customization\n\nTune the cell spacing through the public `--mds-price-table-features-padding` CSS custom property, set on the host or on a parent selector; the dividers of the header band and of the cells keep the colour the component gives them.\n\n```css\n.pricing-section mds-price-table-features {\n  --mds-price-table-features-padding: calc(var(--spacing) * 400);\n}\n```\n\nTo style the header band independently, target the documented `header` shadow part; name a semantic role, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)), so dark mode and high-contrast modes keep working:\n\n```css\n.pricing-section mds-price-table-features::part(header) {\n  background: rgb(var(--magma-wash-base));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-price-table-features>`. 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 Outside `<mds-price-table>`\n\n`<mds-price-table-features>` is a compound child; it belongs inside a [`<mds-price-table>`](../mds-price-table/AGENTS.md) parent, which stacks it with the plan header or cards it compares. Standalone it still renders its table, but it is cut off from the plans its columns refer to.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-features label=\"Funzioni di base\">\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n  </mds-price-table-features-row>\n</mds-price-table-features>\n\n<!-- CORRECT -->\n<mds-price-table>\n  <mds-price-table-features label=\"Funzioni di base\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Do Not Slot Arbitrary HTML Directly Into `<mds-price-table-features>`\n\nThe default slot of `<mds-price-table-features>` expects only `mds-price-table-features-row` elements. Slotting raw `<tr>`, `<div>`, or other markup bypasses the row-width calculation logic and breaks the table structure.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table>\n  <mds-price-table-features label=\"Funzioni\">\n    <tr>\n      <td>Utenti</td>\n      <td>10</td>\n    </tr>\n  </mds-price-table-features>\n</mds-price-table>\n\n<!-- CORRECT -->\n<mds-price-table>\n  <mds-price-table-features label=\"Funzioni\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Do Not Add Slot Content to `supported` or `unsupported` Cells\n\n`type=\"supported\"` and `type=\"unsupported\"` render a built-in icon and ignore any slotted content. Adding text or components inside these cells is silent dead markup.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-features-cell type=\"supported\">Incluso</mds-price-table-features-cell>\n<mds-price-table-features-cell type=\"unsupported\">Non disponibile</mds-price-table-features-cell>\n\n<!-- CORRECT -->\n<mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n<mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n```\n\n#### Do Not Use `type=\"text\"` as a Label Column\n\nThe `type=\"text\"` cell wraps its slot in a detail-typography `<mds-text>` element - it is meant for per-plan values, not for the feature name. Use `type=\"label\"` for the first (feature-name) cell of each row.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"text\">Spazio di archiviazione</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"text\">10 GB</mds-price-table-features-cell>\n</mds-price-table-features-row>\n\n<!-- CORRECT -->\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">Spazio di archiviazione</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"text\">10 GB</mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### Do Not Omit Consistent Column Count Across Rows\n\nEvery `mds-price-table-features-row` in the same section must have the same number of cells. The row component computes each cell width as `100% / cellCount`; mismatched counts produce misaligned columns.\n\n```html\n<!-- INCORRECT - first row has 4 cells, second has 3 -->\n<mds-price-table-features>\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"text\">5</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"text\">20</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"text\">Illimitati</mds-price-table-features-cell>\n  </mds-price-table-features-row>\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Supporto</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  </mds-price-table-features-row>\n</mds-price-table-features>\n\n<!-- CORRECT - every row has the same number of cells -->\n<mds-price-table-features>\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"text\">5</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"text\">20</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"text\">Illimitati</mds-price-table-features-cell>\n  </mds-price-table-features-row>\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Supporto</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  </mds-price-table-features-row>\n</mds-price-table-features>\n```\n\n#### Do Not Customize via Undocumented `::part()` Selectors\n\nThe only documented shadow part is `header`. Targeting internal elements (the `table`, `tbody`, or the `mds-text` inside the header) via other `::part()` selectors or `>>>` couples your code to the internal structure and will break on updates.\n\n```css\n/* INCORRECT */\nmds-price-table-features::part(table) {\n  border-radius: 8px;\n}\nmds-price-table-features >>> table {\n  border: 2px solid red;\n}\n\n/* CORRECT */\nmds-price-table-features {\n  --mds-price-table-features-padding: calc(var(--spacing) * 400);\n}\nmds-price-table-features::part(header) {\n  background: rgb(var(--magma-wash-base));\n}\n```\n"
      },
      "props": [
        {
          "name": "label",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": false,
          "docs": "Sets a header title for the entire table",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-price-table-features-border-color",
          "annotation": "prop",
          "docs": "Sets the border-color of the header and of the children cells, unless a cell sets its own `--mds-price-table-features-cell-border-color`",
          "visibility": "internal"
        },
        {
          "name": "--mds-price-table-features-padding",
          "annotation": "prop",
          "docs": "Sets the cell padding of the children components",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Expects to slot `mds-price-table-features-row` component"
        }
      ],
      "parts": [
        {
          "name": "header",
          "docs": "Selects the HTML element wrapper of label text"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-price-table-features": [
          "mds-text"
        ]
      },
      "storybook": "ui-price-table-price-table-features--docs"
    },
    {
      "filePath": "src/components/mds-price-table-features-cell/mds-price-table-features-cell.tsx",
      "encapsulation": "shadow",
      "tag": "mds-price-table-features-cell",
      "readme": "# mds-price-table-features-cell\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "icon - Selects the HTML element of the icon when `type` attribute when is `supported` or `unsupported`."
        },
        {
          "name": "part",
          "text": "text - Selects the HTML element wrapper of text when `type` attribute when is `text`."
        },
        {
          "name": "slot",
          "text": "- Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "parent",
          "text": "mds-price-table-features-row"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-price-table-features-cell>` web component is a single cell within a feature comparison row of the Magma price table, rendering one of several visual representations (a support icon, plain text, a label, or arbitrary custom content) depending on its `type`. It is a compound child of [`<mds-price-table-features-row>`](../mds-price-table-features-row/AGENTS.md), which orchestrates a set of cells and conceptually stands in for a table cell within the row.\n\n#### Semantic Behavior\n\n- **Compound child constraint**: Must be used as a direct slot child of `<mds-price-table-features-row>`; it is not standalone and a row is expected to contain only cells of this type.\n- **Width is parent-driven**: The cell does not size itself - the parent row distributes equal width across its cells so columns stay aligned across rows.\n- **Type-switched rendering**: A single `type` prop drives entirely different output: `supported`/`unsupported` render a check-circle or horizontal-rule icon, `text` wraps the default slot in `detail` typography, while `custom` and `label` pass the default slot straight through with no wrapper.\n- **No interactive state**: There is no selected/active/disabled/open state, no emitted events, no form association, and no custom role or ARIA - semantics come from the surrounding table structure.\n\n#### Properties & Visual Configurations\n\nThe only configurable prop is `type` (default `text`), which selects what the cell represents rather than just how it looks:\n\n- Use `supported` / `unsupported` for the boolean \"feature included / not included\" columns - these draw the built-in check-circle and horizontal-rule icons and require no slot content.\n- Use `text` for short descriptive values that should adopt the table's `detail` typography automatically.\n- Use `label` for the leading row-label cell describing the feature being compared.\n- Use `custom` when you need to slot arbitrary HTML or other components without the text wrapper, taking full control of the cell's content.\n\nThe full set of accepted values is in the Props table of [`AGENTS.md`](AGENTS.md); this component does not use the shared `variant` / `tone` ladders defined in [`agents/variants.md`](../../../../agents/variants.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-price-table-features-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#### Supported / Unsupported Icon Cells\n\nThe most common use: a boolean \"feature included\" or \"feature not included\" column. Use `type=\"supported\"` or `type=\"unsupported\"` and leave the slot empty - the component renders the built-in check-circle or horizontal-rule icon automatically.\n\n```html\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">Accesso API</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### Label Cell for the Row Feature Name\n\nPlace `type=\"label\"` on the first cell of every row to mark it as the feature descriptor. The slot accepts plain text or a combination of text and a help tooltip component.\n\n```html\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">\n    Larghezza di banda\n    <mds-help disable-auto-placement placement=\"top\">\n      Calcolata per singolo utente attivo al mese.\n    </mds-help>\n  </mds-price-table-features-cell>\n  <mds-price-table-features-cell>10 GB</mds-price-table-features-cell>\n  <mds-price-table-features-cell>50 GB</mds-price-table-features-cell>\n  <mds-price-table-features-cell>Illimitata</mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### Text Cell for Short Descriptive Values (default)\n\n`type=\"text\"` (the default) wraps slot content in `<mds-text typography=\"detail\">`, applying the table's standard detail typography. Use it for concise values such as storage limits or user counts.\n\n```html\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">Utenti inclusi</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"text\">5</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"text\">25</mds-price-table-features-cell>\n  <mds-price-table-features-cell>Illimitati</mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### Help Tooltip for an Icon Row\n\nEven when the icon speaks for itself, a help tooltip can add context. A `supported` / `unsupported` cell renders only its icon and drops any slotted content, so a tooltip slotted there never shows: put the `<mds-help>` in the row's `label` cell.\n\n```html\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">\n    Supporto dedicato\n    <mds-help disable-auto-placement placement=\"top\">\n      Disponibile nei giorni feriali dalle 9 alle 18, non incluso nel piano base.\n    </mds-help>\n  </mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### Custom Cell for Arbitrary Content\n\nUse `type=\"custom\"` when a plain-text or icon representation is insufficient and you need full control of the cell's content - for example a badge, a rating widget, or a formatted value with a unit.\n\n```html\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">Assistenza clienti</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"custom\">\n    <mds-chip label=\"E-mail\" variant=\"info\" tone=\"weak\"></mds-chip>\n  </mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"custom\">\n    <mds-chip label=\"Chat live\" variant=\"success\" tone=\"weak\"></mds-chip>\n  </mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"custom\">\n    <mds-chip label=\"Telefono 24/7\" variant=\"primary\" tone=\"strong\"></mds-chip>\n  </mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### Full Composition Inside the Price Table\n\nCells must always be children of [`<mds-price-table-features-row>`](../mds-price-table-features-row/AGENTS.md), which in turn lives inside [`<mds-price-table-features>`](../mds-price-table-features/AGENTS.md) and [`<mds-price-table>`](../mds-price-table/AGENTS.md). Do not use the cell outside this hierarchy.\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Funzionalita incluse\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Backup automatico</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Spazio di archiviazione</mds-price-table-features-cell>\n      <mds-price-table-features-cell>5 GB</mds-price-table-features-cell>\n      <mds-price-table-features-cell>20 GB</mds-price-table-features-cell>\n      <mds-price-table-features-cell>Illimitato</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Styling Customization\n\nStyle the cell only through its public `--mds-price-table-features-cell-*` CSS custom properties and its documented `icon` and `text` shadow parts. Set them on the host or a parent selector; the border and the icon colours (the categorical `label-green` palette for a supported feature) come from the component and follow dark mode and high-contrast modes by themselves. For any colour you set on a part, name a semantic role, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)).\n\n```css\nmds-price-table-features-cell {\n  --mds-price-table-features-cell-padding: calc(var(--spacing) * 400);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-price-table-features-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 Hierarchy\n\nThe cell is a compound subpart and renders as `display: table-cell`. Used outside [`<mds-price-table-features-row>`](../mds-price-table-features-row/AGENTS.md) it loses all layout context and column alignment breaks.\n\n```html\n<!-- INCORRECT -->\n<div>\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"text\">20 GB</mds-price-table-features-cell>\n</div>\n\n<!-- CORRECT -->\n<mds-price-table>\n  <mds-price-table-features label=\"Caratteristiche\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">20 GB</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Do Not Slot Content Into `supported` or `unsupported` Cells to Override the Icon\n\n`type=\"supported\"` and `type=\"unsupported\"` always render the built-in icon regardless of slot content; slotted markup is not rendered at all. Use `type=\"custom\"` if you need a different visual representation.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-features-cell type=\"supported\">\n  <mds-icon name=\"mi/baseline/star\"></mds-icon>\n</mds-price-table-features-cell>\n\n<!-- CORRECT -->\n<mds-price-table-features-cell type=\"custom\">\n  <mds-icon name=\"mi/baseline/star\"></mds-icon>\n</mds-price-table-features-cell>\n```\n\n#### Do Not Omit `type=\"label\"` on the Feature-Name Cell\n\nWithout `type=\"label\"`, the first cell falls back to `type=\"text\"` and its content is wrapped in `<mds-text typography=\"detail\">`. This produces the wrong typographic weight for a row header and breaks the visual hierarchy.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-features-row>\n  <mds-price-table-features-cell>Numero di utenti</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"text\">5</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"text\">25</mds-price-table-features-cell>\n</mds-price-table-features-row>\n\n<!-- CORRECT -->\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">Numero di utenti</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"text\">5</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"text\">25</mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### Do Not Add Rich HTML Into a `text` Cell\n\n`type=\"text\"` wraps content in `<mds-text typography=\"detail\">`; inserting block elements, interactive controls, or multiple children produces unpredictable layout inside that wrapper. Use `type=\"custom\"` for anything more complex than a plain text string.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-features-cell type=\"text\">\n  <strong>20 GB</strong>\n  <small> inclusi</small>\n</mds-price-table-features-cell>\n\n<!-- CORRECT -->\n<mds-price-table-features-cell type=\"custom\">\n  <strong>20 GB</strong>\n  <small> inclusi</small>\n</mds-price-table-features-cell>\n```\n\n#### Do Not Pierce the Shadow DOM to Restyle Icon or Text Parts\n\nThe only supported customization surface for this component is the public `--mds-price-table-features-cell-*` CSS custom properties and the two documented shadow parts (`icon`, `text`). Targeting undocumented internal selectors will break on any minor release.\n\n```css\n/* INCORRECT */\nmds-price-table-features-cell >>> .icon--supported {\n  fill: hotpink;\n}\n\n/* CORRECT */\nmds-price-table-features-cell[type=\"supported\"]::part(icon) {\n  fill: rgb(var(--label-orchid-06));\n}\nmds-price-table-features-cell::part(icon) {\n  opacity: 0.8;\n}\n```\n"
      },
      "props": [
        {
          "name": "type",
          "type": "\"custom\" | \"label\" | \"supported\" | \"text\" | \"unsupported\" | undefined",
          "complexType": {
            "original": "PriceTableFeaturesCellType",
            "resolved": "\"custom\" | \"label\" | \"supported\" | \"text\" | \"unsupported\" | undefined",
            "references": {
              "PriceTableFeaturesCellType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-price-table-features-cell/meta/types.ts::PriceTableFeaturesCellType",
                "referenceLocation": "PriceTableFeaturesCellType"
              }
            }
          },
          "mutable": false,
          "attr": "type",
          "reflectToAttr": true,
          "docs": "Specifies the support type which is represented",
          "docsTags": [
            {
              "name": "default",
              "text": "'text'"
            }
          ],
          "default": "'text'",
          "values": [
            {
              "value": "custom",
              "type": "string"
            },
            {
              "value": "label",
              "type": "string"
            },
            {
              "value": "supported",
              "type": "string"
            },
            {
              "value": "text",
              "type": "string"
            },
            {
              "value": "unsupported",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-price-table-features-cell-border-color",
          "annotation": "prop",
          "docs": "Border color of individual feature cells, defaults to the border color of the section.",
          "visibility": "internal"
        },
        {
          "name": "--mds-price-table-features-cell-icon-supported-color",
          "annotation": "prop",
          "docs": "Default color of the supported feature icon.",
          "visibility": "internal"
        },
        {
          "name": "--mds-price-table-features-cell-icon-supported-color-hover",
          "annotation": "prop",
          "docs": "Color of the supported feature icon on hover.",
          "visibility": "internal"
        },
        {
          "name": "--mds-price-table-features-cell-icon-unsupported-color",
          "annotation": "prop",
          "docs": "Default color of the unsupported feature icon.",
          "visibility": "internal"
        },
        {
          "name": "--mds-price-table-features-cell-icon-unsupported-color-hover",
          "annotation": "prop",
          "docs": "Color of the unsupported feature icon on hover.",
          "visibility": "internal"
        },
        {
          "name": "--mds-price-table-features-cell-padding",
          "annotation": "prop",
          "docs": "Padding applied to each feature cell, defaults to the section padding.",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "icon",
          "docs": "Selects the HTML element of the icon when `type` attribute when is `supported` or `unsupported`."
        },
        {
          "name": "text",
          "docs": "Selects the HTML element wrapper of text when `type` attribute when is `text`."
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-price-table-features-cell": [
          "mds-text"
        ]
      },
      "storybook": "ui-price-table-price-table-features-cell--docs"
    },
    {
      "filePath": "src/components/mds-price-table-features-row/mds-price-table-features-row.tsx",
      "encapsulation": "shadow",
      "tag": "mds-price-table-features-row",
      "readme": "# mds-price-table-features-row\n\n\n\nThis 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.\n",
      "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": "- Expects to slot `mds-price-table-features-cell` component"
        },
        {
          "name": "parent",
          "text": "mds-price-table-features"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-price-table-features-row>` web component is a layout child of [`<mds-price-table-features>`](../mds-price-table-features/AGENTS.md) that represents a single horizontal row inside the feature-comparison table, conceptually playing the role of a table row (`<tr>`).\n\n#### Semantic Behavior\n\n- **Compound constraint**: Must be a direct default-slot child of `<mds-price-table-features>`; it is not used standalone or mixed with other child component types.\n- **Default slot for cells**: Its default slot expects `<mds-price-table-features-cell>` children only - each cell becomes one column of the row.\n- **Automatic equal-width columns**: It distributes the available width equally across its cells so columns are aligned without manual sizing.\n- **No role/ARIA overrides**: It is a pure presentational/layout wrapper with no added role, state props, events, or focus handling.\n\n#### Properties & Visual Configurations\n\nThis component has no configurable props. Its only responsibility is layout: it groups one or more `<mds-price-table-features-cell>` elements into a single row and guarantees they share the available horizontal space equally. Visual appearance (background, text color, and their hover variants) is tuned through the CSS custom properties documented in [`AGENTS.md`](AGENTS.md) (`--mds-price-table-features-row-background`, `--mds-price-table-features-row-color`, and their `-hover` counterparts). For the shared design-system conventions on compound components, refer to [`agents/conventions.md`](../../../../agents/conventions.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-price-table-features-row>` 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#### Standard Feature Row with Supported / Unsupported Cells\n\nThe most common pattern: one label cell followed by one boolean cell per plan column. Use `type=\"label\"` for the feature name and `type=\"supported\"` or `type=\"unsupported\"` for each plan's availability. The row distributes the cells equally across the available width automatically.\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Funzionalita' incluse\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Supporto clienti</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Feature Row with Text Values\n\nWhen a feature has a measurable limit rather than a simple yes/no, use `type=\"text\"` cells to display the value as a formatted string. The cell wraps the text in `<mds-text typography=\"detail\">` automatically.\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Limiti di utilizzo\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Utenti massimi</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">50</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">Illimitati</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Spazio di archiviazione</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">5 GB</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">50 GB</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">1 TB</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Mixed Row with Text and Boolean Cells\n\nA single row can mix `type=\"text\"`, `type=\"supported\"`, and `type=\"unsupported\"` cells when some plans have a value and others have a boolean flag. All cells still receive equal widths.\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Reportistica\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Report avanzati</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">Solo esportazione</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Custom Cell Content with `type=\"custom\"`\n\nUse `type=\"custom\"` when none of the standard cell types is adequate - for example to embed a component or styled content. The cell renders its default slot as-is without any wrapping element.\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Assistenza\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Canale di supporto</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"custom\">\n        <mds-badge variant=\"info\" tone=\"weak\">Email</mds-badge>\n      </mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"custom\">\n        <mds-badge variant=\"success\" tone=\"weak\">Chat</mds-badge>\n      </mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"custom\">\n        <mds-badge variant=\"dark\" tone=\"strong\">Dedicato</mds-badge>\n      </mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Text Cell with Inline Help Tooltip\n\nA `type=\"text\"` cell accepts arbitrary HTML in its slot, so you can pair the value with an [`<mds-help>`](../mds-help/AGENTS.md) component when additional context is needed.\n\n```html\n<mds-price-table>\n  <mds-price-table-features label=\"Archiviazione\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Capacita' massima</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">5 GB</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">100 GB</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">\n        1 TB\n        <mds-help disable-auto-placement placement=\"top\">\n          La capacita' puo' variare in base allo stato del server.\n        </mds-help>\n      </mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Styling Customization\n\nOverride the row's resting background and text colors through the public `--mds-price-table-features-row-*` CSS custom properties; the hover state is set by the component. Always name a semantic role, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)), so dark mode and high-contrast modes keep working.\n\n```css\n.pricing-section mds-price-table-features-row {\n  --mds-price-table-features-row-background: rgb(var(--magma-surface-muted));\n  --mds-price-table-features-row-color: rgb(var(--magma-text-muted));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-price-table-features-row>`. 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 Row Outside Its Parent\n\n`<mds-price-table-features-row>` is a compound child that must be a direct slot child of [`<mds-price-table-features>`](../mds-price-table-features/AGENTS.md). Using it standalone or inside any other element breaks the layout: the row is a `display: table-row` box meant for the `<table>` that `<mds-price-table-features>` renders around its slot.\n\n```html\n<!-- INCORRECT -->\n<div class=\"my-table\">\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Funzione</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  </mds-price-table-features-row>\n</div>\n\n<!-- CORRECT -->\n<mds-price-table>\n  <mds-price-table-features label=\"Funzionalita'\">\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Funzione</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Do Not Slot Arbitrary HTML Directly into the Row\n\nThe row's default slot expects only [`<mds-price-table-features-cell>`](../mds-price-table-features-cell/AGENTS.md) children. Raw HTML elements bypass the automatic equal-width distribution and break column alignment across rows.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-features-row>\n  <span>Funzione avanzata</span>\n  <span>Si'</span>\n  <span>No</span>\n</mds-price-table-features-row>\n\n<!-- CORRECT -->\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">Funzione avanzata</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### Do Not Omit the Label Cell\n\nEvery row should begin with a `type=\"label\"` cell that names the feature. Omitting it leaves the row without a readable identifier, which makes the comparison table unusable for sighted users and screen readers alike.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n</mds-price-table-features-row>\n\n<!-- CORRECT -->\n<mds-price-table-features-row>\n  <mds-price-table-features-cell type=\"label\">Backup automatico</mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n  <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n</mds-price-table-features-row>\n```\n\n#### Do Not Customize via Inline Styles or Undocumented Parts\n\nThe only supported customization surface is the four `--mds-price-table-features-row-*` CSS custom properties. Applying inline `style` attributes or targeting shadow internals couples your code to the implementation and breaks on minor releases.\n\n```css\n/* INCORRECT */\nmds-price-table-features-row {\n  background-color: #f5f5f5;\n}\n\nmds-price-table-features-row >>> .internal-row-class {\n  color: red;\n}\n```\n\n```css\n/* CORRECT */\nmds-price-table-features-row {\n  --mds-price-table-features-row-background: rgb(var(--magma-surface-muted));\n  --mds-price-table-features-row-color: rgb(var(--magma-text-muted));\n}\n```\n\n#### Do Not Mismatch Cell Count Across Rows\n\nAll rows inside a [`<mds-price-table-features>`](../mds-price-table-features/AGENTS.md) must have the same number of cells. The equal-width calculation runs per row in isolation, so mismatched counts produce misaligned columns.\n\n```html\n<!-- INCORRECT - row A has 4 cells, row B has 3 -->\n<mds-price-table-features>\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Funzione A</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n  </mds-price-table-features-row>\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Funzione B</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n  </mds-price-table-features-row>\n</mds-price-table-features>\n\n<!-- CORRECT - every row has the same number of cells -->\n<mds-price-table-features>\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Funzione A</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n  </mds-price-table-features-row>\n  <mds-price-table-features-row>\n    <mds-price-table-features-cell type=\"label\">Funzione B</mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"supported\"></mds-price-table-features-cell>\n    <mds-price-table-features-cell type=\"unsupported\"></mds-price-table-features-cell>\n  </mds-price-table-features-row>\n</mds-price-table-features>\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-price-table-features-row-background",
          "annotation": "prop",
          "docs": "Default background color of a features row.",
          "visibility": "public"
        },
        {
          "name": "--mds-price-table-features-row-background-hover",
          "annotation": "prop",
          "docs": "Background color of a features row on hover.",
          "visibility": "internal"
        },
        {
          "name": "--mds-price-table-features-row-color",
          "annotation": "prop",
          "docs": "Default text color of a features row.",
          "visibility": "public"
        },
        {
          "name": "--mds-price-table-features-row-color-hover",
          "annotation": "prop",
          "docs": "Text color of a features row on hover.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Expects to slot `mds-price-table-features-cell` component"
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-price-table-price-table-features-row--docs"
    },
    {
      "filePath": "src/components/mds-price-table-header/mds-price-table-header.tsx",
      "encapsulation": "shadow",
      "tag": "mds-price-table-header",
      "readme": "# mds-price-table-header\n\n\n\nThis 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.\n",
      "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-price-table"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-price-table-header>` web component is the layout child that forms the top band of a [`<mds-price-table>`](../mds-price-table/AGENTS.md), aligning an optional leading title cell with the per-plan `<mds-price-table-list>` columns so the header sits in the same column grid as the feature rows below it. It is a pure presentational wrapper.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct slot child of `<mds-price-table>`; it is not used standalone, and it expects its own children to be the price-plan columns (typically a leading `<mds-text>` title plus one `<mds-price-table-list>` per plan) so they line up with the `<mds-price-table-features>` columns underneath.\n- **Auto-fit column grid**: Every direct child becomes an equal-width column by default.\n- **Layout overridden via classes**: Because the column count is content-driven, the explicit per-breakpoint layout (e.g. `tablet:grid-cols-3 desktop:grid-cols-4`, plus `col-span` on a leading title) is applied through utility classes on the host and its children rather than through props.\n- **Single default slot**: Passes content straight through; it has no named slots, no internal ARIA role, no state, and emits no events.\n\n#### Properties & Visual Configurations\n\nThis component exposes no configurable props. It is a layout-only child: its sole job is to project its slotted children into an equal-column grid that matches the rest of the price table. Control the arrangement through CSS utility classes (grid column counts per breakpoint, column spans on the leading title) on the host and on the slotted elements, not through component attributes. See the shared compound-component and layout conventions in [`agents/conventions.md`](../../../../agents/conventions.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-price-table-header>` 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#### Standard Three-Plan Header\n\nThe most common form: a leading title column followed by one [`<mds-price-table-list>`](../mds-price-table-list/AGENTS.md) per plan. Apply responsive grid-column utilities directly on the host to align the header with the feature rows below it.\n\n```html\n<mds-price-table-header class=\"tablet:grid-cols-3 desktop:grid-cols-4\">\n  <mds-text typography=\"h1\" class=\"tablet:col-span-3 desktop:col-span-1 desktop:py-600\">\n    Scegli il piano per te\n  </mds-text>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Piano Base</mds-text>\n    <mds-text typography=\"detail\" slot=\"header\">\n      Ideale per liberi professionisti.\n    </mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">49 EUR / mese</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Inizia ora</mds-button>\n  </mds-price-table-list>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Piano Professional</mds-text>\n    <mds-text typography=\"detail\" slot=\"header\">\n      Per studi di medie dimensioni.\n    </mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">99 EUR / mese</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Inizia ora</mds-button>\n  </mds-price-table-list>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Piano Enterprise</mds-text>\n    <mds-text typography=\"detail\" slot=\"header\">\n      Soluzioni su misura per grandi organizzazioni.\n    </mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">149 EUR / mese</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Inizia ora</mds-button>\n  </mds-price-table-list>\n</mds-price-table-header>\n```\n\n#### Header Without a Leading Title Column\n\nWhen the layout does not need a title column on the left, omit the leading element and let the auto-fit grid divide space equally among the plan columns. Update the grid-column count to match the number of plans.\n\n```html\n<mds-price-table-header class=\"tablet:grid-cols-2 desktop:grid-cols-3\">\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Starter</mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">Gratuito</mds-text>\n    <mds-button slot=\"action\" variant=\"primary\" tone=\"strong\">Registrati</mds-button>\n  </mds-price-table-list>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Business</mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">79 EUR / mese</mds-text>\n    <mds-button slot=\"action\" variant=\"primary\" tone=\"strong\">Abbonati</mds-button>\n  </mds-price-table-list>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Enterprise</mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">Su richiesta</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Contattaci</mds-button>\n  </mds-price-table-list>\n</mds-price-table-header>\n```\n\n#### Highlighted Plan Column\n\nApply a background utility class directly to an [`<mds-price-table-list>`](../mds-price-table-list/AGENTS.md) child to visually emphasize a recommended plan. No extra wrapper is needed.\n\n```html\n<mds-price-table-header class=\"tablet:grid-cols-3 desktop:grid-cols-4\">\n  <mds-text typography=\"h1\" class=\"tablet:col-span-3 desktop:col-span-1\">\n    Trova il piano giusto\n  </mds-text>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Base</mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">29 EUR / mese</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Inizia</mds-button>\n  </mds-price-table-list>\n\n  <!-- Recommended plan - highlighted via background utility -->\n  <mds-price-table-list class=\"bg-label-amaranth-10\">\n    <mds-text typography=\"h5\" slot=\"header\">Consigliato</mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">69 EUR / mese</mds-text>\n    <mds-button slot=\"action\" variant=\"primary\" tone=\"strong\">Inizia</mds-button>\n  </mds-price-table-list>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Premium</mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">129 EUR / mese</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Inizia</mds-button>\n  </mds-price-table-list>\n</mds-price-table-header>\n```\n\n#### Matching Column Count to Feature Rows\n\nWhen combined with [`<mds-price-table-features>`](../mds-price-table-features/AGENTS.md) below the header, give every feature row as many cells as the header has columns (one `label` cell for the title column, then one cell per plan): each row divides its width equally among its cells. Grid-column classes have no effect on `<mds-price-table-features>`, which renders a table.\n\n```html\n<mds-price-table>\n  <mds-price-table-header class=\"tablet:grid-cols-3 desktop:grid-cols-4\">\n    <mds-text typography=\"h1\" class=\"tablet:col-span-3 desktop:col-span-1\">\n      Prezzi e funzionalita\n    </mds-text>\n    <mds-price-table-list>\n      <mds-text typography=\"h5\" slot=\"header\">Base</mds-text>\n      <mds-text typography=\"h2\" slot=\"price\">49 EUR</mds-text>\n      <mds-button slot=\"action\" variant=\"dark\">Abbonati</mds-button>\n    </mds-price-table-list>\n    <mds-price-table-list>\n      <mds-text typography=\"h5\" slot=\"header\">Pro</mds-text>\n      <mds-text typography=\"h2\" slot=\"price\">99 EUR</mds-text>\n      <mds-button slot=\"action\" variant=\"dark\">Abbonati</mds-button>\n    </mds-price-table-list>\n    <mds-price-table-list>\n      <mds-text typography=\"h5\" slot=\"header\">Enterprise</mds-text>\n      <mds-text typography=\"h2\" slot=\"price\">199 EUR</mds-text>\n      <mds-button slot=\"action\" variant=\"dark\">Contattaci</mds-button>\n    </mds-price-table-list>\n  </mds-price-table-header>\n\n  <mds-price-table-features>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">20</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">Illimitati</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Mobile Collapse with Responsive Classes\n\nOn narrow viewports, collapse the multi-column header into a single-column stack using a `max-mobile:grid-cols-1` utility. The leading title then occupies the full row before the plan cards.\n\n```html\n<mds-price-table-header\n  class=\"max-mobile:grid-cols-1 tablet:grid-cols-3 desktop:grid-cols-4\"\n>\n  <mds-text typography=\"h1\" class=\"tablet:col-span-3 desktop:col-span-1\">\n    Confronta i piani\n  </mds-text>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Individuale</mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">19 EUR / mese</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Scegli</mds-button>\n  </mds-price-table-list>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Team</mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">49 EUR / mese</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Scegli</mds-button>\n  </mds-price-table-list>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Azienda</mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">149 EUR / mese</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Scegli</mds-button>\n  </mds-price-table-list>\n</mds-price-table-header>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-price-table-header>`. 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 Outside `<mds-price-table>`\n\n`<mds-price-table-header>` is a structural child of [`<mds-price-table>`](../mds-price-table/AGENTS.md). Used standalone it still lays out its columns, but it is cut off from the feature matrix it is meant to align with: `<mds-price-table>` is what stacks the header above the feature rows.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-header class=\"tablet:grid-cols-3\">\n  <mds-price-table-list>...</mds-price-table-list>\n</mds-price-table-header>\n\n<!-- CORRECT -->\n<mds-price-table>\n  <mds-price-table-header class=\"tablet:grid-cols-3\">\n    <mds-price-table-list>...</mds-price-table-list>\n  </mds-price-table-header>\n</mds-price-table>\n```\n\n#### Do Not Add Extra Wrapper Elements Around Plan Columns\n\nThe auto-fit grid counts direct children; adding `<div>` wrappers around plan cards breaks the equal-column distribution and misaligns the header with feature rows.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-header class=\"tablet:grid-cols-3\">\n  <div class=\"plans\">\n    <mds-price-table-list>...</mds-price-table-list>\n    <mds-price-table-list>...</mds-price-table-list>\n  </div>\n</mds-price-table-header>\n\n<!-- CORRECT -->\n<mds-price-table-header class=\"tablet:grid-cols-3\">\n  <mds-price-table-list>...</mds-price-table-list>\n  <mds-price-table-list>...</mds-price-table-list>\n  <mds-price-table-list>...</mds-price-table-list>\n</mds-price-table-header>\n```\n\n#### Do Not Set Column Layout With Inline Styles\n\nThe column count is expressed through Magma utility classes, not inline `style` attributes. Inline styles bypass the responsive utility cascade and are impossible to override with breakpoint tokens.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-header style=\"grid-template-columns: 1fr 1fr 1fr;\">\n  ...\n</mds-price-table-header>\n\n<!-- CORRECT -->\n<mds-price-table-header class=\"tablet:grid-cols-3 desktop:grid-cols-4\">\n  ...\n</mds-price-table-header>\n```\n\n#### Do Not Mismatch Column Count Between Header and Feature Section\n\nEach `<mds-price-table-features-row>` divides its width equally among its cells, while the header lays its children on its grid columns. If a feature row has fewer or more cells than the header has columns, plan columns do not line up. Grid-column classes on [`<mds-price-table-features>`](../mds-price-table-features/AGENTS.md) change nothing: it renders a table.\n\n```html\n<!-- INCORRECT: header has 4 columns, each feature row has 3 cells -->\n<mds-price-table>\n  <mds-price-table-header class=\"desktop:grid-cols-4\">\n    <mds-text typography=\"h1\">Piani</mds-text>\n    <mds-price-table-list>...</mds-price-table-list>\n    <mds-price-table-list>...</mds-price-table-list>\n    <mds-price-table-list>...</mds-price-table-list>\n  </mds-price-table-header>\n  <mds-price-table-features>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">20</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n\n<!-- CORRECT: one label cell plus one cell per plan, as many as the header columns -->\n<mds-price-table>\n  <mds-price-table-header class=\"tablet:grid-cols-3 desktop:grid-cols-4\">\n    <mds-text typography=\"h1\" class=\"tablet:col-span-3 desktop:col-span-1\">Piani</mds-text>\n    <mds-price-table-list>...</mds-price-table-list>\n    <mds-price-table-list>...</mds-price-table-list>\n    <mds-price-table-list>...</mds-price-table-list>\n  </mds-price-table-header>\n  <mds-price-table-features>\n    <mds-price-table-features-row>\n      <mds-price-table-features-cell type=\"label\">Utenti</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">10</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">20</mds-price-table-features-cell>\n      <mds-price-table-features-cell type=\"text\">Illimitati</mds-price-table-features-cell>\n    </mds-price-table-features-row>\n  </mds-price-table-features>\n</mds-price-table>\n```\n\n#### Do Not Place Non-Plan Content in the Header Without a Spanning Utility\n\nThe component places every direct child in its own equal-width column. A leading title or label that should span multiple columns must carry the appropriate `col-span` utility; without it, it shrinks to one narrow column and pushes the plan cards out of alignment.\n\n```html\n<!-- INCORRECT: leading title takes one column, disrupting plan alignment -->\n<mds-price-table-header class=\"desktop:grid-cols-4\">\n  <mds-text typography=\"h1\">Scegli il piano</mds-text>\n  <mds-price-table-list>...</mds-price-table-list>\n  <mds-price-table-list>...</mds-price-table-list>\n  <mds-price-table-list>...</mds-price-table-list>\n</mds-price-table-header>\n\n<!-- CORRECT: on tablet the title spans the full row; on desktop it takes one column -->\n<mds-price-table-header class=\"tablet:grid-cols-3 desktop:grid-cols-4\">\n  <mds-text\n    typography=\"h1\"\n    class=\"tablet:col-span-3 desktop:col-span-1 desktop:py-600\"\n  >\n    Scegli il piano\n  </mds-text>\n  <mds-price-table-list>...</mds-price-table-list>\n  <mds-price-table-list>...</mds-price-table-list>\n  <mds-price-table-list>...</mds-price-table-list>\n</mds-price-table-header>\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": "ui-price-table-price-table-header--docs"
    },
    {
      "filePath": "src/components/mds-price-table-list/mds-price-table-list.tsx",
      "encapsulation": "shadow",
      "tag": "mds-price-table-list",
      "readme": "# mds-price-table-list\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "content - Selects the element which wraps elements added via `default slot`"
        },
        {
          "name": "part",
          "text": "footer - Selects the element which wraps elements added via `slot=\"price\"` and `slot=\"action\"`"
        },
        {
          "name": "part",
          "text": "header - Selects the element which wraps elements added via `slot=\"header\"`"
        },
        {
          "name": "slot",
          "text": "action - Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "slot",
          "text": "item - Add `mds-price-table-list-item` component, `HTML elements` or other `components` to this slot."
        },
        {
          "name": "slot",
          "text": "header - Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "slot",
          "text": "price - Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "parent",
          "text": "mds-price-table mds-price-table-header"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-price-table-list>` web component is a single pricing-plan column inside the [`<mds-price-table>`](../mds-price-table/AGENTS.md) layout container. It is a compound child that arranges a plan's heading, feature list, price and call-to-action into a consistent card-like structure built entirely from slots - it has no configurable props.\n\n#### Semantic Behavior\n\n- **Compound child**: Designed to sit inside [`<mds-price-table>`](../mds-price-table/AGENTS.md), directly or in its `<mds-price-table-header>`; one instance represents one pricing plan, and several siblings line up to form the comparison table. It is not used standalone.\n- **Owns the feature-list child type**: Feature rows are provided as `<mds-price-table-list-item>` elements - they are the intended child type for the list body.\n- **Conditional list region**: The feature region and the separator above it render only while feature items are present, items rendered after load included; a plan with no features collapses to header plus footer.\n- **No interactive state**: It renders pure structure with no ARIA attributes and no landmark (the feature region is a plain box), no selected/active/disabled state and no emitted events; any interactivity (e.g. the CTA) comes from the components you slot in, such as `<mds-button>` in the `action` slot.\n- **Footer composition**: The `price` and `action` slots are grouped together at the bottom of the card.\n\n#### Properties & Visual Configurations\n\n`<mds-price-table-list>` exposes no props; it is a layout-only child whose appearance is driven entirely by what you slot into it. Use the named slots to compose a plan:\n\n- **`header`**: the plan title and supporting description (typically `<mds-text>` elements); rendered at the top.\n- **`item`**: the feature rows. `<mds-price-table-list-item>` children assign themselves to it; any other element needs `slot=\"item\"`. There is no default slot: content without a `slot` is not rendered.\n- **`price`**: the plan's price, shown in the grouped footer.\n- **`action`**: the call-to-action; `<mds-button>` is recommended.\n\n`<mds-price-table-list>` has no public CSS custom property: the style hooks are the `header`, `content` and `footer` shadow parts, while the divider drawn between the header and the feature list keeps the colour the component gives it.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-price-table-list>` 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#### Minimal Plan Column (Header + Price + Action)\n\nThe simplest form: a plan name, a price, and a call-to-action. Feature rows are optional - the separator and the item region are omitted automatically when no `<mds-price-table-list-item>` children are present.\n\n```html\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Base</mds-text>\n  <mds-text typography=\"detail\" slot=\"header\">Adatto a professionisti individuali.</mds-text>\n\n  <mds-text typography=\"h2\" slot=\"price\">49 &euro;/mese</mds-text>\n  <mds-button slot=\"action\" variant=\"dark\">Inizia ora</mds-button>\n</mds-price-table-list>\n```\n\n#### Full Plan Column with Feature List\n\nAdd `<mds-price-table-list-item>` children directly inside the component (no explicit `slot` attribute needed - the element self-assigns to the correct internal slot). Use `supported` to toggle the check / dash icon.\n\n```html\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Pro</mds-text>\n  <mds-text typography=\"detail\" slot=\"header\">Ideale per team di medie dimensioni.</mds-text>\n\n  <mds-price-table-list-item supported>Funzionalita di base</mds-price-table-list-item>\n  <mds-price-table-list-item supported>Fino a 50 utenti</mds-price-table-list-item>\n  <mds-price-table-list-item supported>100 GB di spazio per utente</mds-price-table-list-item>\n  <mds-price-table-list-item supported>Supporto via chat</mds-price-table-list-item>\n  <mds-price-table-list-item supported>Flussi automatici</mds-price-table-list-item>\n  <mds-price-table-list-item>Accesso API</mds-price-table-list-item>\n  <mds-price-table-list-item>Report avanzati</mds-price-table-list-item>\n\n  <mds-text typography=\"h2\" slot=\"price\">99 &euro;/mese</mds-text>\n  <mds-button slot=\"action\" variant=\"primary\" tone=\"strong\">Attiva piano</mds-button>\n</mds-price-table-list>\n```\n\n#### Composing Multiple Plans Inside `<mds-price-table>`\n\n`<mds-price-table-list>` is a compound child of [`<mds-price-table>`](../mds-price-table/AGENTS.md). Place one instance per pricing plan as a direct slot child of the parent.\n\n```html\n<mds-price-table>\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Piano Base</mds-text>\n    <mds-price-table-list-item supported>Funzionalita essenziali</mds-price-table-list-item>\n    <mds-price-table-list-item>API access</mds-price-table-list-item>\n    <mds-text typography=\"h2\" slot=\"price\">29 &euro;</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Scegli</mds-button>\n  </mds-price-table-list>\n\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Piano Pro</mds-text>\n    <mds-price-table-list-item supported>Funzionalita essenziali</mds-price-table-list-item>\n    <mds-price-table-list-item supported>API access</mds-price-table-list-item>\n    <mds-text typography=\"h2\" slot=\"price\">79 &euro;</mds-text>\n    <mds-button slot=\"action\" variant=\"primary\" tone=\"strong\">Scegli</mds-button>\n  </mds-price-table-list>\n</mds-price-table>\n```\n\n#### Feature Item with Contextual Help\n\nNest an [`<mds-help>`](../mds-help/AGENTS.md) component inside a `<mds-price-table-list-item>` to add an inline tooltip for features that need extra explanation. Place it after the label text in the default slot.\n\n```html\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Enterprise</mds-text>\n\n  <mds-price-table-list-item supported>\n    SLA garantito\n    <mds-help>Disponibilita del 99,9% con monitoraggio dedicato.</mds-help>\n  </mds-price-table-list-item>\n  <mds-price-table-list-item supported>\n    Archiviazione illimitata\n    <mds-help>Soggetta a policy di utilizzo equo.</mds-help>\n  </mds-price-table-list-item>\n  <mds-price-table-list-item supported>Supporto telefonico 24/7</mds-price-table-list-item>\n\n  <mds-text typography=\"h2\" slot=\"price\">Su richiesta</mds-text>\n  <mds-button slot=\"action\" variant=\"primary\" tone=\"strong\">Contattaci</mds-button>\n</mds-price-table-list>\n```\n\n#### Adjusting Feature-Item Typography\n\n`<mds-price-table-list-item>` accepts a `typography` prop (`\"caption\"`, `\"detail\"` (default), `\"paragraph\"`) to match the density of the surrounding layout. Apply a consistent value to all items in the same list.\n\n```html\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Starter</mds-text>\n\n  <mds-price-table-list-item supported typography=\"caption\">5 utenti</mds-price-table-list-item>\n  <mds-price-table-list-item supported typography=\"caption\">1 GB di spazio</mds-price-table-list-item>\n  <mds-price-table-list-item typography=\"caption\">Esportazione dati</mds-price-table-list-item>\n\n  <mds-text typography=\"h3\" slot=\"price\">Gratuito</mds-text>\n  <mds-button slot=\"action\" variant=\"dark\" tone=\"outline\">Registrati</mds-button>\n</mds-price-table-list>\n```\n\n#### Highlighting a Plan\n\n`<mds-price-table-list>` has no public CSS custom property: the divider between the header and the feature list keeps the colour the component gives it, in every mode and contrast preference. To set a recommended plan apart, apply a Magma label-color utility class to the host instead, as in [`<mds-price-table>`](../mds-price-table/AGENTS.md).\n\n```html\n<mds-price-table-list class=\"bg-label-amaranth-10\">\n  <mds-text typography=\"h5\" slot=\"header\">Piano Pro</mds-text>\n\n  <mds-price-table-list-item supported>Utenti illimitati</mds-price-table-list-item>\n\n  <mds-text typography=\"h3\" slot=\"price\">79 EUR</mds-text>\n  <mds-button slot=\"action\" variant=\"dark\">Attiva piano</mds-button>\n</mds-price-table-list>\n```\n\n#### Styling via Shadow Parts\n\nUse the documented `::part()` targets - `header`, `content`, and `footer` - when you need to override layout. Limit part overrides to layout-only changes; do not pierce the shadow DOM via `>>>` or undocumented class names.\n\n```css\nmds-price-table-list::part(footer) {\n  gap: calc(var(--spacing) * 300);\n}\n\nmds-price-table-list::part(header) {\n  padding-bottom: calc(var(--spacing) * 200);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-price-table-list>`. 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-price-table-list>` Outside `<mds-price-table>`\n\nThe component is a compound child of [`<mds-price-table>`](../mds-price-table/AGENTS.md) and relies on it (or on the `<mds-price-table-header>` inside it) for the stacking and the column grid it shares with the other plans. Using it standalone breaks the multi-column layout and misrepresents the pricing comparison.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Base</mds-text>\n  <mds-text typography=\"h2\" slot=\"price\">49 &euro;</mds-text>\n  <mds-button slot=\"action\" variant=\"dark\">Scegli</mds-button>\n</mds-price-table-list>\n\n<!-- CORRECT -->\n<mds-price-table>\n  <mds-price-table-list>\n    <mds-text typography=\"h5\" slot=\"header\">Piano Base</mds-text>\n    <mds-text typography=\"h2\" slot=\"price\">49 &euro;</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\">Scegli</mds-button>\n  </mds-price-table-list>\n</mds-price-table>\n```\n\n#### Do Not Place Feature Items in the `header` Slot\n\nThe `header` slot is for the plan title and description only. `<mds-price-table-list-item>` assigns itself to the `item` slot when it renders, overwriting `slot=\"header\"`: the attribute is dead markup that only holds the row in the header region until it hydrates, then the row moves to the `content` region anyway. Leave the `slot` attribute off.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Pro</mds-text>\n  <mds-price-table-list-item slot=\"header\" supported>Funzionalita avanzate</mds-price-table-list-item>\n  <mds-text typography=\"h2\" slot=\"price\">99 &euro;</mds-text>\n  <mds-button slot=\"action\" variant=\"primary\">Attiva</mds-button>\n</mds-price-table-list>\n\n<!-- CORRECT -->\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Pro</mds-text>\n  <mds-price-table-list-item supported>Funzionalita avanzate</mds-price-table-list-item>\n  <mds-text typography=\"h2\" slot=\"price\">99 &euro;</mds-text>\n  <mds-button slot=\"action\" variant=\"primary\">Attiva</mds-button>\n</mds-price-table-list>\n```\n\n#### Do Not Replace `<mds-price-table-list-item>` with Raw HTML List Elements\n\nThe component has no default slot, so a `<ul>` without a `slot` attribute is not rendered at all; and even in the `item` slot, raw `<li>` or `<span>` elements lose the consistent supported/unsupported icon and the typography sizing of `<mds-price-table-list-item>`.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Base</mds-text>\n  <ul>\n    <li>Funzionalita di base</li>\n    <li>10 utenti</li>\n  </ul>\n  <mds-text typography=\"h2\" slot=\"price\">29 &euro;</mds-text>\n  <mds-button slot=\"action\" variant=\"dark\">Scegli</mds-button>\n</mds-price-table-list>\n\n<!-- CORRECT -->\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Base</mds-text>\n  <mds-price-table-list-item supported>Funzionalita di base</mds-price-table-list-item>\n  <mds-price-table-list-item supported>10 utenti</mds-price-table-list-item>\n  <mds-text typography=\"h2\" slot=\"price\">29 &euro;</mds-text>\n  <mds-button slot=\"action\" variant=\"dark\">Scegli</mds-button>\n</mds-price-table-list>\n```\n\n#### Do Not Set `supported=\"false\"` as a String\n\n`supported` is a boolean attribute: remove it entirely to show the unsupported (dash) state, the convention for every Magma boolean ([`agents/conventions.md`](../../../../agents/conventions.md)). Stencil does parse `\"false\"` as `false`, but the attribute stays in the markup until the component hydrates and its reflection removes it, so a `[supported]` selector or any code reading the attribute sees it set in the meantime.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-list-item supported=\"false\">Esportazione dati</mds-price-table-list-item>\n\n<!-- CORRECT -->\n<mds-price-table-list-item>Esportazione dati</mds-price-table-list-item>\n```\n\n#### Do Not Put the CTA in the `price` Slot\n\nThe `price` slot is for the price text only; the `action` slot is where `<mds-button>` belongs. Mixing them breaks the vertical stacking order and the footer layout.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Pro</mds-text>\n  <mds-button slot=\"price\" variant=\"primary\">Attiva piano</mds-button>\n</mds-price-table-list>\n\n<!-- CORRECT -->\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Pro</mds-text>\n  <mds-text typography=\"h2\" slot=\"price\">79 &euro;/mese</mds-text>\n  <mds-button slot=\"action\" variant=\"primary\">Attiva piano</mds-button>\n</mds-price-table-list>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internal Regions\n\n`<mds-price-table-list>` has no public CSS custom property: the supported customization surface is the three documented `::part()` targets (`header`, `content`, `footer`). Targeting undocumented class names with `>>>` or deep selectors couples your code to the internal markup and breaks on minor releases.\n\n```css\n/* INCORRECT */\nmds-price-table-list >>> .main {\n  background-color: yellow;\n}\nmds-price-table-list::part(separator) {\n  height: 4px;\n}\n\n/* CORRECT */\nmds-price-table-list::part(content) {\n  gap: calc(var(--spacing) * 400);\n}\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-price-table-list-separator-color",
          "annotation": "prop",
          "docs": "Color of the separator line in the price table list.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "action",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "header",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "item",
          "docs": "Add `mds-price-table-list-item` component, `HTML elements` or other `components` to this slot."
        },
        {
          "name": "price",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "content",
          "docs": "Selects the element which wraps elements added via `default slot`"
        },
        {
          "name": "footer",
          "docs": "Selects the element which wraps elements added via `slot=\"price\"` and `slot=\"action\"`"
        },
        {
          "name": "header",
          "docs": "Selects the element which wraps elements added via `slot=\"header\"`"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-separator"
      ],
      "dependencyGraph": {
        "mds-price-table-list": [
          "mds-separator"
        ]
      },
      "storybook": "ui-price-table-price-table-list--docs"
    },
    {
      "filePath": "src/components/mds-price-table-list-item/mds-price-table-list-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-price-table-list-item",
      "readme": "# mds-price-table-list-item\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "icon - The check icon of a `supported` item, a dash when it is not"
        },
        {
          "name": "parent",
          "text": "mds-price-table-list"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-price-table-list-item>` web component represents a single feature row inside a [`<mds-price-table-list>`](../mds-price-table-list/AGENTS.md), pairing a supported/unsupported status icon with a textual feature label. It is a presentational compound child.\n\n#### Semantic Behavior\n\n- **Compound child only**: It auto-assigns itself to the parent's `item` slot, so it must be a direct child of `<mds-price-table-list>` and is not used standalone.\n- **Drives parent layout**: The presence of at least one item is what makes the parent render its separator and feature region.\n- **Status icon by `supported`**: When `supported` is `true` it renders a filled check-circle icon; when `false` it renders a horizontal-rule (dash) icon, indicating the feature is absent.\n- **Default slot is the label**: Text or markup placed in the default slot becomes the feature description, rendered next to the icon.\n- **No interactivity**: The component is purely presentational - it has no role, selection/active/disabled state, emitted events, or keyboard handling.\n\n#### Properties & Visual Configurations\n\n- **`supported`**: Choose `true` for features included in the plan (check icon) and `false` for features not included (dash icon). It is the only semantic switch that changes the rendered icon, and is themeable via the `--mds-price-table-list-item-supported-*` / `-unsupported-*` CSS custom properties.\n- **`typography`**: Selects the text scale applied to both the icon wrapper and the label (the icon itself keeps a fixed size), accepting one of the shared read typography tokens (default `detail`). Use a larger value such as `paragraph` when the list should read at body size, or `caption` for denser tables.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-price-table-list-item>` 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#### Supported Feature Row\n\nThe most common form. Place the component as a direct child of [`<mds-price-table-list>`](../mds-price-table-list/AGENTS.md) and set `supported` to show the check-circle icon. Text in the default slot becomes the feature label.\n\n```html\n<mds-price-table-list>\n  <mds-price-table-list-item supported>Accesso base</mds-price-table-list-item>\n</mds-price-table-list>\n```\n\n#### Unsupported Feature Row\n\nOmit `supported` (or leave it at its default `false`) to render the dash icon, indicating the feature is not included in the plan.\n\n```html\n<mds-price-table-list>\n  <mds-price-table-list-item>Accesso API</mds-price-table-list-item>\n</mds-price-table-list>\n```\n\n#### Mixed Feature List\n\nCombine supported and unsupported rows inside one `<mds-price-table-list>` to build the complete plan comparison column.\n\n```html\n<mds-price-table-list>\n  <mds-price-table-list-item supported>Utenti illimitati</mds-price-table-list-item>\n  <mds-price-table-list-item supported>Supporto via chat</mds-price-table-list-item>\n  <mds-price-table-list-item supported>Flussi automatizzati</mds-price-table-list-item>\n  <mds-price-table-list-item>Analisi avanzata</mds-price-table-list-item>\n  <mds-price-table-list-item>Esportazione report</mds-price-table-list-item>\n  <mds-price-table-list-item>Accesso API</mds-price-table-list-item>\n</mds-price-table-list>\n```\n\n#### Feature Row with Contextual Help\n\nThe default slot accepts more than plain text. Slot an [`<mds-help>`](../mds-help/AGENTS.md) inline next to the label when a feature needs a short explanation.\n\n```html\n<mds-price-table-list>\n  <mds-price-table-list-item supported>\n    20 GB di spazio per utente\n    <mds-help>Lo spazio viene condiviso fra tutti i membri del piano.</mds-help>\n  </mds-price-table-list-item>\n</mds-price-table-list>\n```\n\n#### Adjusting Typography Scale\n\nUse the `typography` prop to control the text size across the whole row; the icon keeps its fixed size. The default `detail` fits dense tables; switch to `paragraph` for a more readable presentation or `caption` for compact layouts.\n\n```html\n<!-- Default (detail) -->\n<mds-price-table-list-item supported>Funzionalita di base</mds-price-table-list-item>\n\n<!-- Body-size presentation -->\n<mds-price-table-list-item supported typography=\"paragraph\">Funzionalita di base</mds-price-table-list-item>\n\n<!-- Compact table -->\n<mds-price-table-list-item typography=\"caption\">Accesso API</mds-price-table-list-item>\n```\n\n#### Full Plan Column\n\nThe full compound pattern: `<mds-price-table-list>` with header, items, a price, and a call-to-action.\n\n```html\n<mds-price-table-list>\n  <mds-text typography=\"h5\" slot=\"header\">Piano Business</mds-text>\n  <mds-text typography=\"detail\" slot=\"header\">\n    Adatto a team di medie dimensioni con esigenze collaborative avanzate.\n  </mds-text>\n\n  <mds-price-table-list-item supported>Utenti illimitati</mds-price-table-list-item>\n  <mds-price-table-list-item supported>Supporto prioritario</mds-price-table-list-item>\n  <mds-price-table-list-item supported>Flussi automatizzati</mds-price-table-list-item>\n  <mds-price-table-list-item>Accesso API</mds-price-table-list-item>\n\n  <mds-text typography=\"h2\" slot=\"price\">99 EUR</mds-text>\n  <mds-button slot=\"action\" variant=\"primary\" tone=\"strong\">Inizia ora</mds-button>\n</mds-price-table-list>\n```\n\n#### Styling Customization\n\n`<mds-price-table-list-item>` has no public CSS custom property: the supported and unsupported icons take their colors from the component, the supported one also while the pointer is over the item. For a targeted override, style the documented `::part(icon)`, with the reflected `supported` attribute to tell the two apart. Name a semantic role, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)), so dark mode and high-contrast keep working.\n\n```css\n.promo-column mds-price-table-list-item[supported]::part(icon) {\n  fill: rgb(var(--magma-accent-fg));\n}\n\n.promo-column mds-price-table-list-item:not([supported])::part(icon) {\n  fill: rgb(var(--magma-text-subtle));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-price-table-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 Outside `<mds-price-table-list>`\n\nThe component auto-assigns itself to the parent's `item` slot and is designed exclusively as a child of [`<mds-price-table-list>`](../mds-price-table-list/AGENTS.md). Standalone it still renders its icon and label, but outside the plan card it loses the card's background, separator and spacing, and the `slot=\"item\"` it writes on itself points nowhere.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-list-item supported>Funzionalita inclusa</mds-price-table-list-item>\n\n<!-- CORRECT -->\n<mds-price-table-list>\n  <mds-price-table-list-item supported>Funzionalita inclusa</mds-price-table-list-item>\n</mds-price-table-list>\n```\n\n#### Do Not Pass `supported` as a String\n\n`supported` is a boolean prop: remove the attribute to turn the feature off, the convention for every Magma boolean ([`agents/conventions.md`](../../../../agents/conventions.md)). Stencil does parse `\"false\"` as `false`, but the attribute stays in the markup until the component hydrates and its reflection removes it, so a `[supported]` selector or any code reading the attribute sees it set in the meantime.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-list-item supported=\"false\">Accesso API</mds-price-table-list-item>\n\n<!-- CORRECT -->\n<mds-price-table-list-item>Accesso API</mds-price-table-list-item>\n```\n\n#### Do Not Use an Unsupported `typography` Value\n\n`typography` accepts only `\"caption\"`, `\"detail\"`, and `\"paragraph\"` (the `TypographyReadType` set). Passing a value outside that set - such as `\"h4\"` or `\"label\"` - produces no error in HTML: it is forwarded to the inner `mds-text`, which sets the row in that heading or label scale, out of step with the other rows.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-list-item typography=\"h4\" supported>Accesso base</mds-price-table-list-item>\n<mds-price-table-list-item typography=\"label\">Analytics</mds-price-table-list-item>\n\n<!-- CORRECT -->\n<mds-price-table-list-item typography=\"paragraph\" supported>Accesso base</mds-price-table-list-item>\n<mds-price-table-list-item typography=\"caption\">Analytics</mds-price-table-list-item>\n```\n\n#### Do Not Pierce the Shadow DOM to Restyle the Icon\n\n`<mds-price-table-list-item>` has no public CSS custom property: the only supported customization surface for the icon is the documented `::part(icon)` shadow part. Targeting internal selectors via `>>>`, `/deep/`, or undocumented class names couples your styles to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-price-table-list-item >>> .icon {\n  fill: green;\n}\n\n/* CORRECT */\nmds-price-table-list-item::part(icon) {\n  fill: rgb(var(--magma-success-fg));\n}\n```\n\n#### Do Not Put Block HTML in the Default Slot to Create Layout\n\nThe default slot is for the feature label - plain text plus inline helpers such as `<mds-help>`. Inserting block elements, additional icons, or wrapper `<div>` structures breaks the flex row layout that aligns the icon and label.\n\n```html\n<!-- INCORRECT -->\n<mds-price-table-list-item supported>\n  <div class=\"feature-row\">\n    <mds-icon name=\"mi/baseline/star\"></mds-icon>\n    <span>Analisi avanzata</span>\n  </div>\n</mds-price-table-list-item>\n\n<!-- CORRECT -->\n<mds-price-table-list-item supported>\n  Analisi avanzata\n  <mds-help>Disponibile solo nei piani premium.</mds-help>\n</mds-price-table-list-item>\n```\n"
      },
      "props": [
        {
          "name": "supported",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "supported",
          "reflectToAttr": true,
          "docs": "Specifies if the feature is supported or not",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"caption\" | \"detail\" | \"paragraph\"",
          "complexType": {
            "original": "TypographyReadType",
            "resolved": "\"caption\" | \"detail\" | \"paragraph\"",
            "references": {
              "TypographyReadType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyReadType",
                "referenceLocation": "TypographyReadType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": true,
          "docs": "Specifies if the feature is supported or not",
          "docsTags": [
            {
              "name": "default",
              "text": "'detail'"
            }
          ],
          "default": "'detail'",
          "values": [
            {
              "value": "caption",
              "type": "string"
            },
            {
              "value": "detail",
              "type": "string"
            },
            {
              "value": "paragraph",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-price-table-list-item-supported-icon-color",
          "annotation": "prop",
          "docs": "Default color of the supported icon in a list item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-price-table-list-item-supported-icon-color-hover",
          "annotation": "prop",
          "docs": "Color of the supported icon while the pointer is over the list item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-price-table-list-item-unsupported-icon-color",
          "annotation": "prop",
          "docs": "Default color of the unsupported icon in a list item.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "icon",
          "docs": "The check icon of a `supported` item, a dash when it is not"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-price-table-list-item": [
          "mds-text"
        ]
      },
      "storybook": "ui-price-table-price-table-list-item--docs"
    },
    {
      "filePath": "src/components/mds-progress/mds-progress.tsx",
      "encapsulation": "shadow",
      "tag": "mds-progress",
      "readme": "# mds-progress\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "progress - Selects the `div` element that contains the progress bar"
        },
        {
          "name": "part",
          "text": "radial-progress - Selects the `mds-radial-progress` element that contains the radial progress bar"
        },
        {
          "name": "category",
          "text": "feedback"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-progress>` web component is the progress indicator of the Magma Design System, rendering the completion state of a determinate task as a bar or ring. It is the system equivalent of the native HTML `<progress>` element, exposing the appropriate progressbar role and ARIA value attributes natively.\n\n#### Semantic Behavior\n\n- **Spoken step text**: As `progress` changes, the component maps the value onto the `steps` list and announces the matching label, so assistive technologies report a human-readable milestone rather than a raw number.\n- **Decorative opt-out**: While the host carries `aria-hidden=\"true\"`, all progressbar semantics are stripped so the indicator can be used as purely decorative chrome; removing it later restores them.\n- **Range**: A `progress` outside 0-1 reads as its nearest end, for the fill and for `aria-valuenow` / `aria-valuetext`. An `aria-valuetext` set on the host replaces the step and stays.\n- **Radial delegation**: With `direction=\"radial\"` the rendering is delegated to `mds-radial-progress`, which carries the typography and the textual percentage; the bar directions render a single fill instead.\n\n#### Properties & Visual Configurations\n\n- **`progress`** is the source of truth: a fractional value between `0` and `1` (not a percentage) that drives both the visual fill and the computed ARIA value.\n- **`steps`** is a comma-separated string of milestone labels (default Italian: `'Inizio,Un quarto,Metà,Tre quarti,Fine'`); the current `progress` is quantized across these labels to pick what screen readers announce. Provide labels that match the granularity of the task.\n- **`typography`** (`'option'` | `'label'`) selects the type scale applied to the textual percentage shown inside the radial variant; it has no effect on the bar directions.\n\n#### Other behavioral props\n\n- **`direction`** chooses the geometry: `'horizontal'` and `'vertical'` render a linear fill bar, while `'radial'` renders a circular ring with a centered percentage via `mds-radial-progress`.\n\n`variant` takes `primary` (default), `ai`, the status values (`info`, `success`, `warning`, `error`) and the neutral `dark` / `light`, as described in [`agents/variants.md`](../../../../agents/variants.md); `size` (`sm` default, `md`, `lg`, `xl`) sets the bar thickness.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-progress>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Horizontal Progress Bar\n\nThe default form. Pass `progress` as a fractional value between `0` and `1`. The component exposes `role=\"progressbar\"` and manages `aria-valuenow` automatically.\n\n```html\n<mds-progress progress=\"0.4\" aria-label=\"Caricamento documento\"></mds-progress>\n```\n\n#### Variant for Semantic Meaning\n\nUse `variant` to communicate the nature of the task - not just the colour you want. The component maps every `ThemeVariantType` value to a matching color pair for the fill and track.\n\n```html\n<!-- Operazione riuscita -->\n<mds-progress progress=\"1\" variant=\"success\" aria-label=\"Importazione completata\"></mds-progress>\n\n<!-- Operazione con avviso -->\n<mds-progress progress=\"0.6\" variant=\"warning\" aria-label=\"Quota disco in esaurimento\"></mds-progress>\n\n<!-- Errore -->\n<mds-progress progress=\"0.85\" variant=\"error\" aria-label=\"Errore di rete\"></mds-progress>\n\n<!-- Contenuto AI -->\n<mds-progress progress=\"0.5\" variant=\"ai\" aria-label=\"Elaborazione AI in corso\"></mds-progress>\n```\n\n#### Sizing\n\nUse the `size` prop to control the thickness of the bar. `sm` is the default and suits most inline uses; larger values give more visual weight in dashboard or hero contexts.\n\n```html\n<mds-progress progress=\"0.5\" size=\"sm\" aria-label=\"Piccola barra\"></mds-progress>\n<mds-progress progress=\"0.5\" size=\"md\" aria-label=\"Barra media\"></mds-progress>\n<mds-progress progress=\"0.5\" size=\"lg\" aria-label=\"Barra grande\"></mds-progress>\n<mds-progress progress=\"0.5\" size=\"xl\" aria-label=\"Barra extra grande\"></mds-progress>\n```\n\n#### Vertical Progress Bar\n\nSet `direction=\"vertical\"` for upward-fill layouts such as column charts or skill meters. Give the host an explicit height via CSS because the element stretches to fit its container.\n\n```html\n<mds-progress\n  progress=\"0.65\"\n  direction=\"vertical\"\n  variant=\"primary\"\n  aria-label=\"Utilizzo CPU\"\n  style=\"height: 120px;\"\n></mds-progress>\n```\n\n#### Radial Progress Bar\n\nSet `direction=\"radial\"` to render a circular ring with a centered percentage label via the internal `mds-radial-progress` component. Control the ring diameter through a CSS width on the host.\n\n```html\n<mds-progress\n  progress=\"0.72\"\n  direction=\"radial\"\n  variant=\"primary\"\n  aria-label=\"Completamento profilo\"\n  style=\"width: 80px;\"\n></mds-progress>\n```\n\n#### Radial with Typography Control\n\nWhen `direction=\"radial\"`, the `typography` prop selects the type scale applied to the centered percentage label. Use `'label'` for denser layouts and `'option'` (default) for standard sizing.\n\n```html\n<mds-progress\n  progress=\"0.5\"\n  direction=\"radial\"\n  typography=\"label\"\n  aria-label=\"Avanzamento attivita\"\n  style=\"width: 64px;\"\n></mds-progress>\n```\n\n#### Accessible Step Labels\n\nThe `steps` prop is a comma-separated list of milestone strings. As `progress` changes the component picks the nearest label and sets `aria-valuetext`, so screen readers announce a meaningful milestone rather than a raw number. Provide labels that match the granularity of your task.\n\n```html\n<mds-progress\n  progress=\"0.5\"\n  steps=\"Inizializzazione,Analisi,Elaborazione,Completamento\"\n  variant=\"primary\"\n  aria-label=\"Avanzamento analisi dati\"\n></mds-progress>\n```\n\n#### Decorative Use (aria-hidden)\n\nWhen `<mds-progress>` is used purely as a visual indicator alongside a separate text description, set `aria-hidden=\"true\"`. The component removes all progressbar ARIA attributes so assistive technologies skip it.\n\n```html\n<p>Progresso: 40%</p>\n<mds-progress progress=\"0.4\" aria-hidden=\"true\"></mds-progress>\n```\n\n#### Updating Progress Dynamically\n\nSet the `progress` property from JavaScript as the task advances. The component transitions the fill with `--mds-progress-duration` and updates `aria-valuenow` and `aria-valuetext` on each change.\n\n```javascript\nconst bar = document.querySelector('mds-progress');\n\nasync function runTask() {\n  for (let i = 0; i <= 10; i++) {\n    await doWork(i);\n    bar.progress = i / 10;\n  }\n}\n```\n\n#### Styling Customization\n\nOverride the documented `--mds-progress-*` CSS custom properties for one-off visual tweaks. Name a semantic role, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)), so dark mode keeps working.\n\n```css\n.upload-widget mds-progress {\n  --mds-progress-background: rgb(var(--magma-wash-base));\n  --mds-progress-color: rgb(var(--magma-accent-emphasis-hover));\n  --mds-progress-thickness: 16px;\n  --mds-progress-radius: var(--magma-radius-sm);\n  --mds-progress-duration: 400ms;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-progress>`. 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 a Raw `<progress>` Element\n\nReplacing `<mds-progress>` with the native element loses the Magma theme, the step-announcement system, and automatic `aria-valuenow` wiring.\n\n```html\n<!-- INCORRECT -->\n<progress value=\"40\" max=\"100\"></progress>\n\n<!-- CORRECT -->\n<mds-progress progress=\"0.4\" aria-label=\"Avanzamento operazione\"></mds-progress>\n```\n\n#### Do Not Pass `progress` as a Percentage Integer\n\n`progress` is a fractional value between `0` and `1`, not a percentage. Passing `40` instead of `0.4` pins the bar at 100% fill and sets `aria-valuenow` to `4000`.\n\n```html\n<!-- INCORRECT -->\n<mds-progress progress=\"40\"></mds-progress>\n\n<!-- CORRECT -->\n<mds-progress progress=\"0.4\" aria-label=\"Avanzamento caricamento\"></mds-progress>\n```\n\n#### Do Not Omit an Accessible Name\n\nWithout `aria-label` (or `aria-labelledby`) and without `aria-hidden=\"true\"`, the progressbar role has no text label and screen readers can only announce the numeric value with no context.\n\n```html\n<!-- INCORRECT -->\n<mds-progress progress=\"0.6\"></mds-progress>\n\n<!-- CORRECT - informative bar with a label -->\n<mds-progress progress=\"0.6\" aria-label=\"Invio email in corso\"></mds-progress>\n\n<!-- CORRECT - purely decorative, no label needed -->\n<mds-progress progress=\"0.6\" aria-hidden=\"true\"></mds-progress>\n```\n\n#### Do Not Use `direction=\"radial\"` Without a Width Constraint\n\nThe radial variant sizes itself from the host's width. Without an explicit width the ring expands to fill the container, often breaking the layout.\n\n```html\n<!-- INCORRECT -->\n<mds-progress progress=\"0.5\" direction=\"radial\"></mds-progress>\n\n<!-- CORRECT -->\n<mds-progress progress=\"0.5\" direction=\"radial\" style=\"width: 80px;\" aria-label=\"Completamento\"></mds-progress>\n```\n\n#### Do Not Use `typography` on Bar Directions\n\nThe `typography` prop controls the type scale of the centered percentage label rendered only when `direction=\"radial\"`. Setting it on `horizontal` or `vertical` bars has no visual effect and misleads readers.\n\n```html\n<!-- INCORRECT -->\n<mds-progress progress=\"0.5\" direction=\"horizontal\" typography=\"label\"></mds-progress>\n\n<!-- CORRECT -->\n<mds-progress progress=\"0.5\" direction=\"radial\" typography=\"label\" style=\"width: 64px;\" aria-label=\"Avanzamento\"></mds-progress>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Fill\n\n`::part(progress)` is the supported way to reach the fill element; `>>>` or undocumented class names are not. Prefer the `--mds-progress-*` CSS custom properties for the most common overrides.\n\n```css\n/* INCORRECT */\nmds-progress >>> .progress {\n  background: hotpink;\n}\n\n/* CORRECT - use the CSS custom property */\nmds-progress {\n  --mds-progress-color: rgb(var(--magma-accent-emphasis-hover));\n}\n\n/* CORRECT - use the documented part only when a property is insufficient */\nmds-progress::part(progress) {\n  border-radius: var(--magma-radius-none);\n}\n```\n"
      },
      "props": [
        {
          "name": "direction",
          "type": "\"horizontal\" | \"radial\" | \"vertical\" | undefined",
          "complexType": {
            "original": "DirectionType",
            "resolved": "\"horizontal\" | \"radial\" | \"vertical\" | undefined",
            "references": {
              "DirectionType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-progress/meta/types.ts::DirectionType",
                "referenceLocation": "DirectionType"
              }
            }
          },
          "mutable": false,
          "attr": "direction",
          "reflectToAttr": true,
          "docs": "Specifies the direction of the progress bar, if horizonatl or vertical",
          "docsTags": [
            {
              "name": "default",
              "text": "'horizontal'"
            }
          ],
          "default": "'horizontal'",
          "values": [
            {
              "value": "horizontal",
              "type": "string"
            },
            {
              "value": "radial",
              "type": "string"
            },
            {
              "value": "vertical",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "progress",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "progress",
          "reflectToAttr": false,
          "docs": "A value between 0 and 1 that rapresents the status progress",
          "docsTags": [
            {
              "name": "default",
              "text": "0"
            }
          ],
          "default": "0",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | \"xl\" | undefined",
          "complexType": {
            "original": "ProgressBarSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\" | undefined",
            "references": {
              "ProgressBarSizeType": {
                "location": "import",
                "path": "@type/progress",
                "id": "src/type/progress.ts::ProgressBarSizeType",
                "referenceLocation": "ProgressBarSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'sm'"
            }
          ],
          "default": "'sm'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "value": "xl",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "steps",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "steps",
          "reflectToAttr": false,
          "docs": "Sets the steps that can be pronounced by accessibility technologies",
          "docsTags": [
            {
              "name": "default",
              "text": "'Inizio,Un quarto,Metà,Tre quarti,Fine'"
            }
          ],
          "default": "'Inizio,Un quarto,Metà,Tre quarti,Fine'",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"label\" | \"option\" | undefined",
          "complexType": {
            "original": "TypographyTechnicalType",
            "resolved": "\"label\" | \"option\" | undefined",
            "references": {
              "TypographyTechnicalType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyTechnicalType",
                "referenceLocation": "TypographyTechnicalType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "The typography of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'option'"
            }
          ],
          "default": "'option'",
          "values": [
            {
              "value": "label",
              "type": "string"
            },
            {
              "value": "option",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ThemeVariantType",
            "resolved": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ThemeVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeVariantType",
                "referenceLocation": "ThemeVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the theme variant colors",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-progress-background",
          "annotation": "prop",
          "docs": "Background color of the progress bar.",
          "visibility": "public"
        },
        {
          "name": "--mds-progress-color",
          "annotation": "prop",
          "docs": "Foreground color of the progress indicator.",
          "visibility": "public"
        },
        {
          "name": "--mds-progress-duration",
          "annotation": "prop",
          "docs": "Duration of the progress animation.",
          "visibility": "public"
        },
        {
          "name": "--mds-progress-radius",
          "annotation": "prop",
          "docs": "Border-radius of the progress bar.",
          "visibility": "public"
        },
        {
          "name": "--mds-progress-thickness",
          "annotation": "prop",
          "docs": "Thickness (height) of the progress bar.",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "progress",
          "docs": "Selects the `div` element that contains the progress bar"
        },
        {
          "name": "radial-progress",
          "docs": "Selects the `mds-radial-progress` element that contains the radial progress bar"
        }
      ],
      "states": [],
      "dependents": [
        "mds-accordion-timer-item",
        "mds-benchmark-bar",
        "mds-input-upload",
        "mds-stepper-bar-item"
      ],
      "dependencies": [
        "mds-radial-progress"
      ],
      "dependencyGraph": {
        "mds-progress": [
          "mds-radial-progress"
        ],
        "mds-radial-progress": [
          "mds-icon",
          "mds-text"
        ],
        "mds-accordion-timer-item": [
          "mds-progress"
        ],
        "mds-benchmark-bar": [
          "mds-progress"
        ],
        "mds-input-upload": [
          "mds-progress"
        ],
        "mds-stepper-bar-item": [
          "mds-progress"
        ]
      },
      "storybook": "ui-progress--docs"
    },
    {
      "filePath": "src/components/mds-push-notification/mds-push-notification.tsx",
      "encapsulation": "shadow",
      "tag": "mds-push-notification",
      "readme": "# mds-push-notification\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "part",
          "text": "notifications - The container wrapper of the notifications."
        },
        {
          "name": "slot",
          "text": "- Add `HTML elements` or `components`, it is **recommended** to use `mds-push-notification` element."
        },
        {
          "name": "category",
          "text": "feedback"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-push-notification>` web component is the Magma Design System container that hosts and orchestrates a stack of transient notification items, managing their show/hide lifecycle, entry/exit animations, and overall visibility. It is a compound parent: its default slot holds `mds-push-notification-item` children, and it has no direct HTML primitive equivalent.\n\n#### Semantic Behavior\n\n- **Slot-driven lifecycle**: Items placed in the default slot are animated in automatically; each item animates out and is removed when closed (an item shows its close button only with `dismissible`).\n- **Built-in clear button**: The container always renders its own clear button, labelled in the page language (\"Clear notifications\", \"Cancella notifiche\"), which animates out every item and hides the container.\n- **Auto vs. manual behavior**: With `behavior=\"auto\"` the container shows itself as soon as one or more items are added; with `behavior=\"manual\"` visibility is driven only by the `visible` prop or the imperative methods.\n- **Empty-stack auto-hide**: When the last remaining item animates out, the container hides itself regardless of behavior; the clear button and `hide()` hide it too.\n- **Emitted events**: `mdsPushNotificationShow` fires when it becomes visible, `mdsPushNotificationHide` when hidden, and `mdsPushNotificationChange` on every transition carrying a `{ visible: boolean }` detail.\n- **Imperative API**: Exposes `show()` and `hide()` methods to control visibility programmatically, plus `removeNotification()` to dismiss one or an array of `mds-push-notification-item` elements with the standard outro animation.\n- **Animation timing**: The intro and outro motion of the items is set by the component; the fade-out delay and the gap between items are read from the public CSS custom properties `--mds-push-notification-fadeout-delay` and `--mds-push-notification-gap`, so they are themeable without code changes.\n\n#### Properties & Visual Configurations\n\nThe container intentionally exposes a minimal prop surface; most configuration is structural (which items you slot in) or stylistic (via CSS custom properties).\n\n#### Other behavioral props\n\n- **`behavior`** selects the visibility strategy: pick `'auto'` (default) when the stack should appear and disappear purely as a function of how many items it contains, and `'manual'` when you want explicit control over when the container is shown via `visible` or the `show()`/`hide()` methods.\n- **`visible`** is the controlled visibility flag; set it to drive the container open or closed, while reading it returns the current visibility.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-push-notification>` 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#### Minimal Auto-Managed Stack\n\nThe default `behavior=\"auto\"` configuration. Drop `mds-push-notification-item` children into the default slot and the container shows itself, animates each item in, and hides itself when all items have been dismissed. Set `dismissible` on an item to give it its own close button.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    dismissible\n    subject=\"Nuovo messaggio\"\n    message=\"Il documento e' pronto per la revisione.\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Items with Avatar Preview\n\nUse `preview=\"avatar\"` and `src` to show a user photo. Supply `initials` as a fallback when no image is available.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    preview=\"avatar\"\n    src=\"/avatars/marco.jpg\"\n    initials=\"MC\"\n    subject=\"Marco Cicognetti\"\n    message=\"Ci sei andato poi alla riunione?\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Items with Icon Preview\n\nUse `icon` (an icon slug with its set prefix) instead of `src` when the notification represents an event or system action rather than a person.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    icon=\"mi/baseline/attachment\"\n    subject=\"Documento allegato\"\n    message=\"E' stato caricato un nuovo allegato nella pratica 2024-1042.\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Item with Date and Timestamp\n\nPass an ISO 8601 datetime string to display a relative time-ago label (default) or a static formatted date.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    subject=\"Approvazione completata\"\n    message=\"La richiesta e' stata approvata.\"\n    datetime=\"2024-11-12T09:30:00Z\"\n  ></mds-push-notification-item>\n\n  <!-- Static date format -->\n  <mds-push-notification-item\n    subject=\"Scadenza contratto\"\n    message=\"Il contratto scade il giorno indicato.\"\n    datetime=\"2024-12-31T00:00:00Z\"\n    date-format=\"DD/MM/YYYY\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Item with Action Button\n\nSlot an `mds-button` into the `action` slot of the item to provide an inline CTA.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    preview=\"avatar\"\n    src=\"/avatars/sara.jpg\"\n    subject=\"Sara Ho\"\n    message=\"Hai ricevuto una nuova richiesta di collaborazione.\"\n  >\n    <mds-button slot=\"action\" variant=\"primary\" tone=\"weak\" size=\"sm\">\n      Rispondi\n    </mds-button>\n  </mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Manual Behavior with Programmatic Control\n\nSet `behavior=\"manual\"` when visibility should be controlled by your application logic rather than inferred from slot contents. Toggle the `visible` attribute or call `show()` / `hide()` on the element.\n\n```html\n<mds-push-notification behavior=\"manual\" id=\"notif-panel\">\n  <mds-push-notification-item\n    subject=\"Aggiornamento sistema\"\n    message=\"Un aggiornamento e' disponibile. Riavviare per applicarlo.\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n\n<script>\n  const panel = document.querySelector('#notif-panel');\n\n  // Show programmatically\n  panel.show();\n\n  // Hide programmatically\n  panel.hide();\n</script>\n```\n\n#### Programmatic Dismissal of a Single Item\n\nCall `removeNotification()` with an `mds-push-notification-item` element reference to animate it out and remove it without the user interacting with the close button.\n\n```html\n<mds-push-notification id=\"notif-panel\">\n  <mds-push-notification-item id=\"item-1\"\n    subject=\"Avviso temporaneo\"\n    message=\"Questa notifica viene rimossa dopo 5 secondi.\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n\n<script>\n  const panel = document.querySelector('#notif-panel');\n  const item = document.querySelector('#item-1');\n\n  setTimeout(() => {\n    panel.removeNotification(item);\n  }, 5000);\n</script>\n```\n\n#### Reacting to Visibility Events\n\nListen to `mdsPushNotificationShow`, `mdsPushNotificationHide`, or `mdsPushNotificationChange` to synchronize UI state when the panel opens or closes.\n\n```javascript\nconst panel = document.querySelector('mds-push-notification');\n\npanel.addEventListener('mdsPushNotificationShow', () => {\n  console.info('Pannello notifiche aperto');\n});\n\npanel.addEventListener('mdsPushNotificationHide', () => {\n  console.info('Pannello notifiche chiuso');\n});\n\npanel.addEventListener('mdsPushNotificationChange', (e) => {\n  console.info('Visibilita cambiata:', e.detail.visible);\n});\n```\n\n#### Item Tone and Variant\n\nUse `variant` and `tone` on the item to reflect the semantic nature of the notification (status or theme family). `tone` accepts `strong` or `weak` on this component. They paint the item's icon or avatar preview, so they show only together with `icon` (or `preview=\"avatar\"`).\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    icon=\"mi/baseline/check-circle\"\n    variant=\"success\"\n    tone=\"weak\"\n    subject=\"Operazione completata\"\n    message=\"Il file e' stato salvato con successo.\"\n  ></mds-push-notification-item>\n\n  <mds-push-notification-item\n    icon=\"mi/baseline/error\"\n    variant=\"error\"\n    tone=\"strong\"\n    subject=\"Errore critico\"\n    message=\"Impossibile completare l'operazione. Riprovare.\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Styling Customization via CSS Custom Properties\n\nOverride the fade-out delay, the gap between items, and the panel background through the public `--mds-push-notification-*` properties; the intro and outro motion of the items is set by the component. Set them on the host or a parent selector; for colours name a semantic role, `rgb(var(--magma-<role>))` ([`agents/color.md`](../../../../agents/color.md)).\n\n```css\nmds-push-notification {\n  --mds-push-notification-gap: calc(var(--spacing) * 300);\n  --mds-push-notification-fadeout-delay: 0.5s;\n  --mds-push-notification-background: linear-gradient(\n    to right,\n    rgb(var(--magma-surface-overlay) / 0) 0%,\n    rgb(var(--magma-surface-overlay) / 0.95) 100%\n  );\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-push-notification>`. 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 Put Arbitrary HTML in the Default Slot\n\nThe default slot is designed for `mds-push-notification-item` children only. Placing raw HTML or other components breaks the animation lifecycle, event wiring, and the intro/outro sequencing the container manages.\n\n```html\n<!-- INCORRECT -->\n<mds-push-notification>\n  <div class=\"my-notification\">\n    <strong>Avviso</strong>\n    <p>Il documento e' pronto.</p>\n  </div>\n</mds-push-notification>\n\n<!-- CORRECT -->\n<mds-push-notification>\n  <mds-push-notification-item\n    subject=\"Avviso\"\n    message=\"Il documento e' pronto.\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Do Not Set `visible=\"false\"` to Hide the Panel\n\n`visible` is a boolean prop: a false boolean is written by removing the attribute, the convention for every Magma boolean ([`agents/conventions.md`](../../../../agents/conventions.md)). Stencil does parse `\"false\"` as `false`, but the attribute stays in the markup until the component hydrates and its reflection removes it, so a `[visible]` selector or any code reading the attribute sees it set in the meantime. Remove the attribute entirely - or call `hide()` - to close the panel.\n\n```html\n<!-- INCORRECT -->\n<mds-push-notification visible=\"false\"></mds-push-notification>\n\n<!-- CORRECT: remove the attribute -->\n<mds-push-notification></mds-push-notification>\n```\n\n```javascript\n// CORRECT: via imperative method\ndocument.querySelector('mds-push-notification').hide();\n```\n\n#### Do Not Listen to the Native `close` Event Instead of `mdsPushNotificationHide`\n\nThe component emits `mdsPushNotificationHide` when the panel hides. Listening for a native `close` event will never fire because the component does not dispatch it, and native DOM events from inside the shadow root do not reliably bubble to the light DOM.\n\n```javascript\n// INCORRECT\npanel.addEventListener('close', () => updateUI());\n\n// CORRECT\npanel.addEventListener('mdsPushNotificationHide', () => updateUI());\n```\n\n#### Do Not Use `behavior=\"manual\"` and Then Forget to Call `show()` / `hide()`\n\nWith `behavior=\"manual\"` the container never auto-shows when items are added; you must explicitly call `show()` or set `visible`. Leaving it on `manual` without wiring visibility logic means notifications are silently queued but never displayed.\n\n```html\n<!-- INCORRECT: items never appear because manual mode needs explicit show() -->\n<mds-push-notification behavior=\"manual\" id=\"notif-panel\">\n  <mds-push-notification-item\n    subject=\"Nuovo messaggio\"\n    message=\"Messaggio ricevuto.\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n\n<!-- CORRECT: call show() after adding items -->\n<mds-push-notification behavior=\"manual\" id=\"notif-panel\">\n  <mds-push-notification-item\n    subject=\"Nuovo messaggio\"\n    message=\"Messaggio ricevuto.\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n\n<script>\n  document.querySelector('#notif-panel').show();\n</script>\n```\n\n#### Do Not Pierce Shadow DOM to Style Item Internals\n\nThe only supported customization surface for the container is the public `--mds-push-notification-*` CSS custom properties plus the documented `::part(notifications)` part. Use the public per-item CSS custom properties (prefixed `--mds-push-notification-item-*`) for item-level styling. Do not reach into shadow parts that are not documented.\n\n```css\n/* INCORRECT */\nmds-push-notification >>> .notifications {\n  background: white;\n}\nmds-push-notification::part(content) {\n  padding: 2rem;\n}\n\n/* CORRECT */\nmds-push-notification {\n  --mds-push-notification-background: rgb(var(--magma-surface-overlay) / 0.9);\n  --mds-push-notification-gap: calc(var(--spacing) * 300);\n}\nmds-push-notification::part(notifications) {\n  /* documented part - safe to target */\n  padding-block: calc(var(--spacing) * 200);\n}\n```\n\n#### Do Not Slot Actions in the Wrong Slot\n\nAction buttons belong in the `action` slot of `mds-push-notification-item`, not in the default slot of `mds-push-notification`. Placing a button in the parent's default slot treats it like a notification item, breaks the animation sequence, and the button will be styled and animated as if it were a notification. A clear-all button is not needed either: the container renders its own.\n\n```html\n<!-- INCORRECT: button lands in the parent's default slot -->\n<mds-push-notification>\n  <mds-button variant=\"dark\">Cancella tutto</mds-button>\n  <mds-push-notification-item subject=\"Avviso\" message=\"Nuovo messaggio.\"></mds-push-notification-item>\n</mds-push-notification>\n\n<!-- CORRECT: action belongs on the item's action slot -->\n<mds-push-notification>\n  <mds-push-notification-item subject=\"Avviso\" message=\"Nuovo messaggio.\">\n    <mds-button slot=\"action\" variant=\"primary\" tone=\"weak\" size=\"sm\">Apri</mds-button>\n  </mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Do Not Apply an Unsupported `tone` Value to Item\n\n`mds-push-notification-item` accepts `tone=\"strong\"` or `tone=\"weak\"` only (`ToneMinimalVariantType`). Using `tone=\"outline\"` (a tone of `mds-button` and `mds-badge`) silently falls back to the default `weak` look and the intended visual emphasis is lost. `variant` and `tone` paint only the item's icon or avatar, so pair them with `icon`.\n\n```html\n<!-- INCORRECT: outline and text are not supported tones for this component -->\n<mds-push-notification-item\n  icon=\"mi/baseline/error\"\n  variant=\"error\"\n  tone=\"outline\"\n  subject=\"Errore\"\n  message=\"Operazione fallita.\"\n></mds-push-notification-item>\n\n<!-- CORRECT -->\n<mds-push-notification-item\n  icon=\"mi/baseline/error\"\n  variant=\"error\"\n  tone=\"strong\"\n  subject=\"Errore\"\n  message=\"Operazione fallita.\"\n></mds-push-notification-item>\n```\n"
      },
      "props": [
        {
          "name": "behavior",
          "type": "\"auto\" | \"manual\" | undefined",
          "complexType": {
            "original": "'auto' | 'manual'",
            "resolved": "\"auto\" | \"manual\" | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "behavior",
          "reflectToAttr": false,
          "docs": "Specifies when the stack shows: with `auto` whenever notifications are added, with `manual`\nonly through `visible` or `show()`. In both, removing the last notification hides it; a\nclick outside does not.",
          "docsTags": [
            {
              "name": "default",
              "text": "'auto'"
            }
          ],
          "default": "'auto'",
          "values": [
            {
              "value": "auto",
              "type": "string"
            },
            {
              "value": "manual",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "visible",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "visible",
          "reflectToAttr": true,
          "docs": "Specifies if the component is visible or not.",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "hide",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "hide() => Promise<void>",
          "parameters": [],
          "docs": "Hides the notification container.",
          "docsTags": []
        },
        {
          "name": "removeNotification",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(notification: HTMLMdsPushNotificationItemElement | HTMLMdsPushNotificationItemElement[]) => Promise<void>",
            "parameters": [
              {
                "name": "notification",
                "type": "HTMLMdsPushNotificationItemElement | HTMLMdsPushNotificationItemElement[]",
                "docs": "the notification item or items to remove"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "HTMLMdsPushNotificationItemElement": {
                "location": "global",
                "id": "global::HTMLMdsPushNotificationItemElement"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "removeNotification(notification: HTMLMdsPushNotificationItemElement | HTMLMdsPushNotificationItemElement[]) => Promise<void>",
          "parameters": [
            {
              "name": "notification",
              "type": "HTMLMdsPushNotificationItemElement | HTMLMdsPushNotificationItemElement[]",
              "docs": "the notification item or items to remove"
            }
          ],
          "docs": "Removes the given notification item(s) from the stack.",
          "docsTags": [
            {
              "name": "param",
              "text": "notification the notification item or items to remove"
            }
          ]
        },
        {
          "name": "show",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "show() => Promise<void>",
          "parameters": [],
          "docs": "Shows the notification container.",
          "docsTags": []
        }
      ],
      "events": [
        {
          "event": "mdsPushNotificationChange",
          "detail": "MdsPushNotificationEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPushNotificationEventDetail",
            "resolved": "MdsPushNotificationEventDetail",
            "references": {
              "MdsPushNotificationEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-push-notification/meta/event-detail.ts::MdsPushNotificationEventDetail",
                "referenceLocation": "MdsPushNotificationEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component visibility changes",
          "docsTags": []
        },
        {
          "event": "mdsPushNotificationHide",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is hidden",
          "docsTags": []
        },
        {
          "event": "mdsPushNotificationShow",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is shown",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-push-notification-background",
          "annotation": "prop",
          "docs": "Background of the push notification, supports gradients.",
          "visibility": "public"
        },
        {
          "name": "--mds-push-notification-fadeout-delay",
          "annotation": "prop",
          "docs": "Delay before the push notification starts fading out.",
          "visibility": "public"
        },
        {
          "name": "--mds-push-notification-gap",
          "annotation": "prop",
          "docs": "Gap between multiple push notifications.",
          "visibility": "public"
        },
        {
          "name": "--mds-push-notification-items-duration",
          "annotation": "prop",
          "docs": "Duration of the item animation inside the notification.",
          "visibility": "internal"
        },
        {
          "name": "--mds-push-notification-items-gap",
          "annotation": "prop",
          "docs": "Gap between items inside the notification.",
          "visibility": "internal"
        },
        {
          "name": "--mds-push-notification-items-intro-delay",
          "annotation": "prop",
          "docs": "Delay before items inside the notification animate in.",
          "visibility": "internal"
        },
        {
          "name": "--mds-push-notification-items-outro-delay",
          "annotation": "prop",
          "docs": "Delay before items inside the notification animate out.",
          "visibility": "internal"
        },
        {
          "name": "--mds-push-notification-items-timing-function",
          "annotation": "prop",
          "docs": "Timing function used for item animations inside the notification.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-push-notification` element."
        }
      ],
      "parts": [
        {
          "name": "notifications",
          "docs": "The container wrapper of the notifications."
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-push-notification": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-push-notification--docs"
    },
    {
      "filePath": "src/components/mds-push-notification-item/mds-push-notification-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-push-notification-item",
      "readme": "# mds-push-notification-item\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "part",
          "text": "actions - The actions wrapper"
        },
        {
          "name": "part",
          "text": "avatar - The `mds-avatar` that shows the `icon`, the `initials` or, with `preview` set to `avatar`, the picture of `src`"
        },
        {
          "name": "part",
          "text": "content - The content wrapper of the message"
        },
        {
          "name": "part",
          "text": "picture - The picture image added by `src` attribute"
        },
        {
          "name": "slot",
          "text": "action - Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "slot",
          "text": "badge - Add `HTML elements` or `components`, it is **recommended** to use `mds-badge` element."
        },
        {
          "name": "parent",
          "text": "mds-push-notification"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-push-notification-item>` web component is a single notification card rendered inside its parent container [`<mds-push-notification>`](../mds-push-notification/AGENTS.md). It composes an avatar/image, a subject, a relative or formatted timestamp, a message body and an optional dismiss control into one toast-like row.\n\n#### Semantic Behavior\n\n- **Compound child only**: It must be placed as a direct default-slot child of `<mds-push-notification>`; it is not used standalone or mixed with other child types, since the parent animates intro/outro and manages stacking.\n- **Dismiss reports up, removal happens in the parent**: Clicking the built-in close button emits the bubbling `mdsPushNotificationItemClose` event, with the `id` of the item as `detail.id`; the parent runs the outro animation and removes the item. The item never removes itself.\n- **Parent-driven visibility lifecycle**: When the last item closes, the parent auto-hides the whole notification area.\n- **Timestamp rendering**: With `dateFormat=\"timeago\"` `datetime` shows a localized relative time (\"2 minutes ago\"); otherwise the value is treated as a date-format string for a static date.\n- **Localization**: The relative-time strings and the dismiss button title are localized (el/en/es/it).\n- **Conditional avatar vs. picture**: An `<mds-avatar>` is rendered when `icon` is set or `preview=\"avatar\"`; when `src` is set and `preview` is not `avatar`, an `<mds-img>` picture is rendered (next to the avatar when `icon` is also set).\n- **Slot detection**: The `badge` and `action` named slot wrappers stay hidden (`display: none`) until matching slotted children exist, so empty slots take no space.\n\n#### Properties & Visual Configurations\n\n- **`dismissible`**: Controls whether the dismiss button is shown. Add it to let the user close the notification manually; leave it off for items the user should not close.\n- **`deletable`** is the old name of `dismissible`, deprecated: the button dismisses the notification, it deletes nothing. It still works, and goes in the next major.\n- **`preview`**: Pick `avatar` to show the `src` image (or `initials`/`icon` fallback) as a compact round avatar, or `image` (default) to show `src` as a larger inline picture preview.\n- **`initials`**: Provided as the avatar fallback when no image is available; it overrides `tone`/`variant` styling so the user stays visually recognizable.\n- **`dateFormat`**: Use `timeago` for a live relative timestamp, or any date-format token string for a fixed display date.\n\nFor `tone` and `variant`, this component consumes the shared color ladders defined in [`agents/variants.md`](../../../../agents/variants.md); the values are forwarded to the underlying `<mds-avatar>` and follow the avatar tone/variant set rather than adding component-specific values.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-push-notification-item>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Message Notification\n\nThe minimal form: a message body with an icon and a relative timestamp. Always nest the item inside [`mds-push-notification`](../mds-push-notification/AGENTS.md), which manages stacking and animation.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    icon=\"mi/baseline/email\"\n    subject=\"Nuovo messaggio\"\n    message=\"Hai ricevuto 3 nuovi messaggi da account diversi\"\n    datetime=\"2024-06-01T10:30:00\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Variant for Semantic Status\n\nUse `variant` to communicate meaning - success, warning, error, info - and `tone` to set visual weight. The values are forwarded to the internal `<mds-avatar>`.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    icon=\"mi/baseline/check-circle\"\n    subject=\"Salvataggio completato\"\n    message=\"Il documento e' stato salvato con successo\"\n    datetime=\"2024-06-01T10:31:00\"\n    variant=\"success\"\n    tone=\"strong\"\n  ></mds-push-notification-item>\n\n  <mds-push-notification-item\n    icon=\"mi/baseline/warning\"\n    subject=\"Attenzione\"\n    message=\"La sessione scadra' tra 5 minuti\"\n    datetime=\"2024-06-01T10:32:00\"\n    variant=\"warning\"\n    tone=\"weak\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Dismissible Notification\n\nAdd the `dismissible` attribute to show the dismiss button, letting the user close the notification manually. Without it the notification cannot be dismissed by the user - keep it off for system notifications the user must not close.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    dismissible\n    icon=\"mi/baseline/email\"\n    subject=\"Nuovo messaggio\"\n    message=\"Hai ricevuto un nuovo messaggio\"\n    datetime=\"2024-06-01T09:00:00\"\n    variant=\"info\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Action Buttons via the `action` Slot\n\nSlot one or more `<mds-button>` elements into `slot=\"action\"` for in-notification CTAs. Use `size=\"sm\"` to keep the actions compact.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    icon=\"mi/baseline/person\"\n    subject=\"Mario Giannini\"\n    message=\"Ciao, sono Mario, questo e' il mio contatto, buona giornata!\"\n    datetime=\"2024-06-01T10:25:00\"\n    variant=\"primary\"\n    tone=\"strong\"\n  >\n    <mds-button slot=\"action\" variant=\"success\" tone=\"weak\" size=\"sm\" label=\"Accetta\"></mds-button>\n    <mds-button slot=\"action\" variant=\"error\" tone=\"weak\" size=\"sm\" label=\"Ignora\"></mds-button>\n  </mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Badge Label via the `badge` Slot\n\nSlot an `<mds-badge>` into `slot=\"badge\"` to show a category or type label above the subject line.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    icon=\"mi/baseline/attach-file\"\n    subject=\"Nuovo allegato\"\n    message=\"Hai ricevuto un nuovo file allegato da Luca Bianchi\"\n    datetime=\"2024-06-01T10:20:00\"\n    variant=\"primary\"\n  >\n    <mds-badge slot=\"badge\" variant=\"amaranth\" tone=\"weak\" label=\"pdf\"></mds-badge>\n    <mds-button slot=\"action\" tone=\"outline\" size=\"sm\" label=\"Scarica\"></mds-button>\n  </mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Avatar Mode with Image\n\nSet `src` and `preview=\"avatar\"` to display a user photo as a round avatar instead of the default full-width image preview.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    src=\"./avatar-sarah.jpeg\"\n    preview=\"avatar\"\n    subject=\"Sarah Ho\"\n    message=\"Ciao, sono Sarah, questo e' il mio contatto, buona giornata!\"\n    datetime=\"2024-06-01T10:15:00\"\n    variant=\"primary\"\n    tone=\"strong\"\n  >\n    <mds-button slot=\"action\" variant=\"success\" tone=\"weak\" size=\"sm\" label=\"Scrivi\"></mds-button>\n  </mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Avatar Mode with Initials Fallback\n\nWhen no image is available, set `initials` and `preview=\"avatar\"`. The initials override `tone` and `variant` coloring so the user stays visually distinguishable.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    initials=\"MG\"\n    preview=\"avatar\"\n    subject=\"Mario Giannini\"\n    message=\"Ha modificato il documento condiviso\"\n    datetime=\"2024-06-01T10:10:00\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Inline Image Preview\n\nOmit `preview=\"avatar\"` (or keep the default `image`) and supply `src` to show the image as a larger inline thumbnail - useful for file or media notifications.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    src=\"./book-cover-01.webp\"\n    subject=\"Anteprima immagine\"\n    message=\"La copertina e' stata aggiornata\"\n    datetime=\"2024-06-01T10:05:00\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Fixed Date Format\n\nUse any `dayjs`-compatible format string as `date-format` to show a static date instead of the default relative \"time ago\" display.\n\n```html\n<mds-push-notification>\n  <mds-push-notification-item\n    icon=\"mi/baseline/event\"\n    subject=\"Promemoria riunione\"\n    message=\"La riunione di progetto e' fissata per domani\"\n    datetime=\"2024-06-01T09:00:00\"\n    date-format=\"DD/MM/YYYY\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Listening to the Dismiss Event\n\nListen to `mdsPushNotificationItemClose` to handle cleanup when the user dismisses the item. The parent `<mds-push-notification>` does this automatically, but you can also add your own logic (e.g. marking the notification read in the server). The event carries the `id` of the item in `detail.id`.\n\n```javascript\ndocument\n  .querySelector('mds-push-notification-item')\n  .addEventListener('mdsPushNotificationItemClose', (event) => {\n    markNotificationRead(event.detail.id);\n  });\n```\n\n#### Styling Customization\n\nCustomize the item only through its public `--mds-push-notification-item-*` CSS custom properties.\n\n```css\n.app-notifications mds-push-notification-item {\n  --mds-push-notification-item-shadow: var(--shadow-md-sharp);\n  --mds-push-notification-item-message-line-clamp: 3;\n  --mds-push-notification-item-subject-line-clamp: 2;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-push-notification-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 the Item Outside Its Parent\n\n`<mds-push-notification-item>` is a compound child that must live inside [`<mds-push-notification>`](../mds-push-notification/AGENTS.md). The parent drives entry / exit animation, stacking, and auto-hide when the last item closes.\n\n```html\n<!-- INCORRECT -->\n<mds-push-notification-item\n  icon=\"mi/baseline/email\"\n  subject=\"Nuovo messaggio\"\n  message=\"Hai ricevuto un nuovo messaggio\"\n></mds-push-notification-item>\n\n<!-- CORRECT -->\n<mds-push-notification>\n  <mds-push-notification-item\n    icon=\"mi/baseline/email\"\n    subject=\"Nuovo messaggio\"\n    message=\"Hai ricevuto un nuovo messaggio\"\n  ></mds-push-notification-item>\n</mds-push-notification>\n```\n\n#### Do Not Put Content in the Default Slot\n\n`<mds-push-notification-item>` has no default slot. All text content goes through the `message` and `subject` props; interactive content goes into the named `action` or `badge` slots.\n\n```html\n<!-- INCORRECT -->\n<mds-push-notification-item>\n  Hai un nuovo messaggio\n</mds-push-notification-item>\n\n<!-- CORRECT -->\n<mds-push-notification-item\n  message=\"Hai un nuovo messaggio\"\n  subject=\"Posta in arrivo\"\n></mds-push-notification-item>\n```\n\n#### Do Not Slot Arbitrary Content Into `action` Without `mds-button`\n\nThe `action` slot is designed for `<mds-button>` elements at `size=\"sm\"`. Slotting raw `<button>` or large components breaks layout alignment and loses Magma theming and keyboard semantics.\n\n```html\n<!-- INCORRECT -->\n<mds-push-notification-item subject=\"Richiesta\" message=\"Approva la richiesta di accesso\">\n  <button slot=\"action\" class=\"btn\">Approva</button>\n</mds-push-notification-item>\n\n<!-- CORRECT -->\n<mds-push-notification-item subject=\"Richiesta\" message=\"Approva la richiesta di accesso\">\n  <mds-button slot=\"action\" variant=\"success\" tone=\"weak\" size=\"sm\" label=\"Approva\"></mds-button>\n</mds-push-notification-item>\n```\n\n#### Do Not Mix `icon` and `src` With `preview=\"image\"`\n\nWhen `icon` is set, the component always renders an `<mds-avatar>` for the icon. If `src` is also set and `preview` is not `\"avatar\"`, an `<mds-img>` picture is rendered as well - producing two media areas side by side, which is almost never the intended layout. Pick one visual mode per notification.\n\n```html\n<!-- INCORRECT - both an icon avatar and an image preview render simultaneously -->\n<mds-push-notification-item\n  icon=\"mi/baseline/photo\"\n  src=\"./cover.jpg\"\n  preview=\"image\"\n  subject=\"Nuova foto\"\n  message=\"La copertina e' stata aggiornata\"\n></mds-push-notification-item>\n\n<!-- CORRECT - icon only, no image -->\n<mds-push-notification-item\n  icon=\"mi/baseline/photo\"\n  subject=\"Nuova foto\"\n  message=\"La copertina e' stata aggiornata\"\n></mds-push-notification-item>\n\n<!-- CORRECT - image preview only, no icon -->\n<mds-push-notification-item\n  src=\"./cover.jpg\"\n  subject=\"Nuova foto\"\n  message=\"La copertina e' stata aggiornata\"\n></mds-push-notification-item>\n```\n\n#### Do Not Listen for the Native `close` DOM Event\n\nThe component emits `mdsPushNotificationItemClose`, not a native `close`. Listening for `close` never fires, and the `click` of the dismiss button does not leave the component (its handler calls `stopPropagation()`).\n\n```javascript\n// INCORRECT\nelement.addEventListener('close', handler);\n\n// CORRECT\nelement.addEventListener('mdsPushNotificationItemClose', handler);\n```\n\n#### Customize via Documented Vars, Not Internal Selectors\n\nThe supported customization surface is `--mds-push-notification-item-*` CSS custom properties and documented shadow parts (`actions`, `avatar`, `content`, `picture`). Targeting shadow-DOM internals via `::part()` on undocumented parts or via `>>>` will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-push-notification-item::part(header) {\n  font-weight: bold;\n}\nmds-push-notification-item >>> .message {\n  color: red;\n}\n\n/* CORRECT */\nmds-push-notification-item {\n  --mds-push-notification-item-message-line-clamp: 3;\n  --mds-push-notification-item-shadow: var(--shadow-md-sharp);\n}\nmds-push-notification-item::part(content) {\n  gap: calc(var(--spacing) * 200);\n}\n```\n"
      },
      "props": [
        {
          "name": "dateFormat",
          "type": "string",
          "complexType": {
            "original": "NotificationItemDateFormatType",
            "resolved": "string",
            "references": {
              "NotificationItemDateFormatType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-push-notification-item/meta/types.ts::NotificationItemDateFormatType",
                "referenceLocation": "NotificationItemDateFormatType"
              }
            }
          },
          "mutable": false,
          "attr": "date-format",
          "reflectToAttr": true,
          "docs": "Specifies how the notification date is written: `timeago` shows the time passed, any other\nvalue is the Day.js format of a static date",
          "docsTags": [
            {
              "name": "example",
              "text": "'DD/MM/YYYY HH:mm'"
            },
            {
              "name": "default",
              "text": "'timeago'"
            }
          ],
          "default": "'timeago'",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "datetime",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "datetime",
          "reflectToAttr": true,
          "docs": "Specifies the notification date based on [standard ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).",
          "docsTags": [
            {
              "name": "example",
              "text": "'2025-06-15T09:30:00+02:00'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "deletable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "deletable",
          "reflectToAttr": true,
          "docs": "Shows the dismiss button, as `dismissible` does.",
          "docsTags": [
            {
              "name": "deprecated",
              "text": "Use `dismissible`: the button dismisses the notification, it deletes nothing.\nGoes in the next major."
            },
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "deprecation": "Use `dismissible`: the button dismisses the notification, it deletes nothing.\nGoes in the next major.",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "dismissible",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "dismissible",
          "reflectToAttr": true,
          "docs": "Shows a dismiss button: activating it emits `mdsPushNotificationItemClose`, and a parent\n`mds-push-notification` takes the item out of the stack",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "Specifies the icon to be displayed",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "initials",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "initials",
          "reflectToAttr": true,
          "docs": "The user's inizials displayed if there's no image available, initials will override tone and variant senttings to keep user recognizable from others",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "message",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "message",
          "reflectToAttr": true,
          "docs": "Specifies the message of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'Nessun messaggio disponibile'"
            }
          ],
          "default": "'Nessun messaggio disponibile'",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "preview",
          "type": "\"avatar\" | \"image\" | undefined",
          "complexType": {
            "original": "NotificationItemPreviewType",
            "resolved": "\"avatar\" | \"image\" | undefined",
            "references": {
              "NotificationItemPreviewType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-push-notification-item/meta/types.ts::NotificationItemPreviewType",
                "referenceLocation": "NotificationItemPreviewType"
              }
            }
          },
          "mutable": false,
          "attr": "preview",
          "reflectToAttr": true,
          "docs": "Specifies if the `src` attribute is used to show a the image as avatar or full image",
          "docsTags": [
            {
              "name": "default",
              "text": "'image'"
            }
          ],
          "default": "'image'",
          "values": [
            {
              "value": "avatar",
              "type": "string"
            },
            {
              "value": "image",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "src",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "src",
          "reflectToAttr": true,
          "docs": "Specifies the path to the image",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "subject",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "subject",
          "reflectToAttr": true,
          "docs": "Specifies the subject of the component",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"strong\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneMinimalVariantType",
            "resolved": "\"strong\" | \"weak\" | undefined",
            "references": {
              "ToneMinimalVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneMinimalVariantType",
                "referenceLocation": "ToneMinimalVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Specifies the color tone of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'weak'"
            }
          ],
          "default": "'weak'",
          "values": [
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
          "complexType": {
            "original": "ThemeFullVariantAvatarType",
            "resolved": "\"amaranth\" | \"aqua\" | \"blue\" | \"error\" | \"green\" | \"info\" | \"lime\" | \"orange\" | \"orchid\" | \"primary\" | \"purple\" | \"red\" | \"sky\" | \"success\" | \"violet\" | \"warning\" | \"yellow\" | undefined",
            "references": {
              "ThemeFullVariantAvatarType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeFullVariantAvatarType",
                "referenceLocation": "ThemeFullVariantAvatarType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the color variant of the component",
          "docsTags": [],
          "values": [
            {
              "value": "amaranth",
              "type": "string"
            },
            {
              "value": "aqua",
              "type": "string"
            },
            {
              "value": "blue",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "green",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "lime",
              "type": "string"
            },
            {
              "value": "orange",
              "type": "string"
            },
            {
              "value": "orchid",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "purple",
              "type": "string"
            },
            {
              "value": "red",
              "type": "string"
            },
            {
              "value": "sky",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "violet",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "value": "yellow",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsPushNotificationItemClose",
          "detail": "MdsPushNotificationItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsPushNotificationItemEventDetail",
            "resolved": "MdsPushNotificationItemEventDetail",
            "references": {
              "MdsPushNotificationItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-push-notification-item/meta/event-detail.ts::MdsPushNotificationItemEventDetail",
                "referenceLocation": "MdsPushNotificationItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is closed",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-push-notification-item-duration",
          "annotation": "prop",
          "docs": "Duration of the individual push notification item animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-push-notification-item-icon-background-color",
          "annotation": "prop",
          "docs": "Background color of the item's icon.",
          "visibility": "internal"
        },
        {
          "name": "--mds-push-notification-item-icon-color",
          "annotation": "prop",
          "docs": "Color of the item's icon.",
          "visibility": "internal"
        },
        {
          "name": "--mds-push-notification-item-message-line-clamp",
          "annotation": "prop",
          "docs": "Number of lines to clamp the message text.",
          "visibility": "public"
        },
        {
          "name": "--mds-push-notification-item-shadow",
          "annotation": "prop",
          "docs": "Shadow applied to the push notification item.",
          "visibility": "public"
        },
        {
          "name": "--mds-push-notification-item-subject-line-clamp",
          "annotation": "prop",
          "docs": "Number of lines to clamp the subject text.",
          "visibility": "public"
        },
        {
          "name": "--mds-push-notification-item-timing-function",
          "annotation": "prop",
          "docs": "Timing function used for the item animation.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "action",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "badge",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-badge` element."
        }
      ],
      "parts": [
        {
          "name": "actions",
          "docs": "The actions wrapper"
        },
        {
          "name": "avatar",
          "docs": "The `mds-avatar` that shows the `icon`, the `initials` or, with `preview` set to `avatar`, the picture of `src`"
        },
        {
          "name": "content",
          "docs": "The content wrapper of the message"
        },
        {
          "name": "picture",
          "docs": "The picture image added by `src` attribute"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-avatar",
        "mds-img",
        "mds-text",
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-push-notification-item": [
          "mds-avatar",
          "mds-img",
          "mds-text",
          "mds-button"
        ],
        "mds-avatar": [
          "mds-img",
          "mds-icon"
        ],
        "mds-img": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-push-notification-push-notification-item--docs"
    },
    {
      "filePath": "src/components/mds-quote/mds-quote.tsx",
      "encapsulation": "shadow",
      "tag": "mds-quote",
      "readme": "# mds-quote\n\n\n\nThis 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.\n",
      "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": "slot",
          "text": "author - Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-quote>` web component is the Magma Design System primitive for rendering a stylized blockquote: it wraps quoted text in decorative typographic quotation marks (`❝ ... ❞`) and exposes an optional attribution slot, replacing a hand-styled `<blockquote>` + citation markup.\n\n#### Semantic Behavior\n\n- **Default slot is the quote body**: the unnamed slot holds the quoted text (string, HTML, or components) and is wrapped between the opening `❝` and closing `❞` glyphs.\n- **`author` named slot**: holds the attribution (text, HTML, or components) and renders directly beneath the quote body.\n- **Selection semantics**: selecting the quote body selects the whole quotation, while the decorative quote-mark glyphs stay out of any copied text.\n- **Heading semantics vs. visual size are decoupled**: the rendered tag and the applied typography are driven by two independent props, so the component can carry the correct document outline level without forcing a matching visual scale.\n\n#### Properties & Visual Configurations\n\n- **`tag`** sets the actual HTML heading element emitted for the quote body (`h1`-`h6`); pick the value that reflects the quote's real position in the document outline, independent of how large it should look.\n- **`typography`** sets the visual type scale applied to both the quote body and the decorative marks; choose it for visual weight, since it can differ from `tag`. Beyond the heading scales it also accepts `'action'` for cases where the quote should adopt the action type style rather than a heading scale.\n\n#### Notes\n\n`<mds-quote>` is a purely presentational component: it has no `variant` / `tone` ladder, no state props, no events, and no form association. The shared system rules live in [`agents/conventions.md`](../../../../agents/conventions.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-quote>` 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 Quote with Attribution\n\nThe minimal form: slot the quoted text into the default slot and slot the attribution into the `author` slot. Both slots accept plain text, HTML, or components.\n\n```html\n<mds-quote tag=\"h3\" typography=\"h3\">\n  Chi smette di migliorare, smette di essere buono.\n  <mds-author slot=\"author\">\n    <mds-text typography=\"h6\">Philip Rosenthal</mds-text>\n    <mds-text typography=\"caption\">Imprenditore</mds-text>\n  </mds-author>\n</mds-quote>\n```\n\n#### Quote Without Attribution\n\nOmit the `author` slot entirely when no attribution is needed. The decorative quotation marks still render correctly.\n\n```html\n<mds-quote tag=\"h4\" typography=\"h4\">\n  La semplicita' e' la massima sofisticazione.\n</mds-quote>\n```\n\n#### Decoupling Semantic Tag from Visual Scale\n\nSet `tag` to the heading level that correctly represents the quote in the document outline, and `typography` independently for the visual weight that suits the design. A large pull-quote may be visually `h2` but logically only an `h4` in the hierarchy.\n\n```html\n<!-- visually prominent (h2 scale) but semantically an h4 in the outline -->\n<mds-quote tag=\"h4\" typography=\"h2\">\n  Il futuro appartiene a chi crede nella bellezza dei propri sogni.\n  <mds-author slot=\"author\">\n    <mds-text typography=\"h6\">Eleanor Roosevelt</mds-text>\n  </mds-author>\n</mds-quote>\n```\n\n#### Using the `action` Typography Scale\n\nSet `typography=\"action\"` when the quote should adopt the action type style rather than any heading scale - for instance inside a callout card or a narrow testimonial widget.\n\n```html\n<mds-quote tag=\"h5\" typography=\"action\">\n  Ogni grande impresa inizia con un piccolo passo coraggioso.\n  <mds-author slot=\"author\">\n    <mds-text typography=\"caption\">Autore sconosciuto</mds-text>\n  </mds-author>\n</mds-quote>\n```\n\n#### Full Author Attribution with Avatar\n\nThe `author` slot accepts rich compound components. Use [`mds-author`](../mds-author/AGENTS.md) with a nested [`mds-avatar`](../mds-avatar/AGENTS.md) for a complete testimonial block.\n\n```html\n<mds-quote tag=\"h5\" typography=\"h5\">\n  Un programmatore e' una macchina che trasforma il caffe' in codice.\n  <mds-author slot=\"author\">\n    <mds-avatar\n      slot=\"avatar\"\n      initials=\"PW\"\n      src=\"./paul-washam.webp\"\n    ></mds-avatar>\n    <mds-text typography=\"h6\">Paul Washam</mds-text>\n    <mds-text typography=\"caption\">Software engineer</mds-text>\n  </mds-author>\n</mds-quote>\n```\n\n#### Composing Inside a Card\n\nPlace `<mds-quote>` inside [`mds-card-content`](../mds-card-content/AGENTS.md) to embed a testimonial in a card layout. Use a smaller typography scale to fit the card's visual hierarchy.\n\n```html\n<mds-card>\n  <mds-card-content slot=\"content\">\n    <mds-quote tag=\"h6\" typography=\"h6\">\n      La qualita' non e' mai un caso; e' sempre il risultato di uno sforzo intelligente.\n      <mds-author slot=\"author\">\n        <mds-text typography=\"h6\">John Ruskin</mds-text>\n        <mds-text typography=\"caption\">Critico d'arte</mds-text>\n      </mds-author>\n    </mds-quote>\n  </mds-card-content>\n</mds-card>\n```\n\n#### Color Customization via Host Styles\n\n`<mds-quote>` inherits `color` from its host context. Override the text color by setting a semantic color role on the host element. Always use `rgb(var(--magma-<role>))` so dark mode, named themes and high-contrast modes keep working.\n\n```css\n.featured-testimonial mds-quote {\n  color: rgb(var(--magma-text-default));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-quote>`. 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 Replace `<mds-quote>` with a Raw `<blockquote>`\n\nHand-rolling a blockquote loses the decorative quotation marks, the decoupled typography system, and the high-contrast preference support the component provides.\n\n```html\n<!-- INCORRECT -->\n<blockquote>\n  <p>La semplicita' e' la massima sofisticazione.</p>\n  <cite>Leonardo da Vinci</cite>\n</blockquote>\n\n<!-- CORRECT -->\n<mds-quote tag=\"h4\" typography=\"h4\">\n  La semplicita' e' la massima sofisticazione.\n  <mds-author slot=\"author\">\n    <mds-text typography=\"h6\">Leonardo da Vinci</mds-text>\n  </mds-author>\n</mds-quote>\n```\n\n#### Do Not Put Attribution in the Default Slot\n\nThe default slot is the quote body; attribution placed there renders as quoted text and is wrapped between the opening and closing quotation glyphs. Use the `author` named slot for attribution.\n\n```html\n<!-- INCORRECT -->\n<mds-quote tag=\"h4\" typography=\"h4\">\n  L'innovazione distingue il leader dal seguace.\n  Steve Jobs, Apple\n</mds-quote>\n\n<!-- CORRECT -->\n<mds-quote tag=\"h4\" typography=\"h4\">\n  L'innovazione distingue il leader dal seguace.\n  <mds-author slot=\"author\">\n    <mds-text typography=\"h6\">Steve Jobs</mds-text>\n    <mds-text typography=\"caption\">Apple</mds-text>\n  </mds-author>\n</mds-quote>\n```\n\n#### Do Not Omit `tag` and Rely on the Default Heading Level\n\nThe default `tag` is `h3`, which may be semantically wrong for the document outline. Always set `tag` explicitly to the level that matches the quote's real position in the heading hierarchy.\n\n```html\n<!-- INCORRECT - relies on h3 default regardless of page structure -->\n<mds-quote typography=\"h5\">\n  Ogni problema e' un'opportunita' travestita da difficolta'.\n</mds-quote>\n\n<!-- CORRECT - tag reflects the actual outline position -->\n<mds-quote tag=\"h5\" typography=\"h5\">\n  Ogni problema e' un'opportunita' travestita da difficolta'.\n</mds-quote>\n```\n\n#### Do Not Conflate `tag` and `typography`\n\n`tag` controls the semantic heading element; `typography` controls the visual scale. Setting only one and assuming the other adjusts automatically is wrong - they are independent props and must both be set intentionally.\n\n```html\n<!-- INCORRECT - sets tag but leaves typography at its h3 default,\n     producing an h5 semantic element that looks like an h3 -->\n<mds-quote tag=\"h5\">\n  Il coraggio non e' assenza di paura, ma la decisione che qualcosa e' piu' importante della paura.\n</mds-quote>\n\n<!-- CORRECT - both props set to the intended values -->\n<mds-quote tag=\"h5\" typography=\"h5\">\n  Il coraggio non e' assenza di paura, ma la decisione che qualcosa e' piu' importante della paura.\n</mds-quote>\n```\n\n#### Do Not Use an Invalid `typography` Value\n\n`typography` accepts only `action`, `h1`, `h2`, `h3`, `h4`, `h5`, `h6`. Passing any other value (e.g. a body or caption scale) silently matches no type style: the quote renders with no type scale at all.\n\n```html\n<!-- INCORRECT - \"body\" is not a valid TypographyTitleType value -->\n<mds-quote tag=\"h5\" typography=\"body\">\n  Il talento vince le partite, ma il lavoro di squadra vince i campionati.\n</mds-quote>\n\n<!-- CORRECT - use a valid title typography scale -->\n<mds-quote tag=\"h5\" typography=\"h5\">\n  Il talento vince le partite, ma il lavoro di squadra vince i campionati.\n</mds-quote>\n```\n\n#### Do Not Wrap `<mds-quote>` in a Native `<figure>` or `<cite>` to Add Attribution\n\nAdding a `<figure>` / `<figcaption>` or `<cite>` wrapper around or inside the component to bolt on attribution is redundant and leaves the attribution outside the component's layout. The `author` slot is the right extension point.\n\n```html\n<!-- INCORRECT -->\n<figure>\n  <mds-quote tag=\"h4\" typography=\"h4\">\n    La creativita' e' l'intelligenza che si diverte.\n  </mds-quote>\n  <figcaption>Albert Einstein</figcaption>\n</figure>\n\n<!-- CORRECT -->\n<mds-quote tag=\"h4\" typography=\"h4\">\n  La creativita' e' l'intelligenza che si diverte.\n  <mds-author slot=\"author\">\n    <mds-text typography=\"h6\">Albert Einstein</mds-text>\n  </mds-author>\n</mds-quote>\n```\n"
      },
      "props": [
        {
          "name": "tag",
          "type": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
          "complexType": {
            "original": "TypographyHeadingTagType",
            "resolved": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
            "references": {
              "TypographyHeadingTagType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyHeadingTagType",
                "referenceLocation": "TypographyHeadingTagType"
              }
            }
          },
          "mutable": false,
          "attr": "tag",
          "reflectToAttr": false,
          "docs": "Specifies the tag the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'h3'"
            }
          ],
          "default": "'h3'",
          "values": [
            {
              "value": "h1",
              "type": "string"
            },
            {
              "value": "h2",
              "type": "string"
            },
            {
              "value": "h3",
              "type": "string"
            },
            {
              "value": "h4",
              "type": "string"
            },
            {
              "value": "h5",
              "type": "string"
            },
            {
              "value": "h6",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"action\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
          "complexType": {
            "original": "TypographyTitleType",
            "resolved": "\"action\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
            "references": {
              "TypographyTitleType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyTitleType",
                "referenceLocation": "TypographyTitleType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "Specifies the font typography of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'h3'"
            }
          ],
          "default": "'h3'",
          "values": [
            {
              "value": "action",
              "type": "string"
            },
            {
              "value": "h1",
              "type": "string"
            },
            {
              "value": "h2",
              "type": "string"
            },
            {
              "value": "h3",
              "type": "string"
            },
            {
              "value": "h4",
              "type": "string"
            },
            {
              "value": "h5",
              "type": "string"
            },
            {
              "value": "h6",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "author",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-quote": [
          "mds-text"
        ]
      },
      "storybook": "ui-quote--docs"
    },
    {
      "filePath": "src/components/mds-radial-menu/mds-radial-menu.tsx",
      "encapsulation": "shadow",
      "tag": "mds-radial-menu",
      "readme": "# mds-radial-menu\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "item - Add `mds-radial-menu-item` elements or `components` to this slot."
        },
        {
          "name": "part",
          "text": "radial-menu - The ring that lays out the `item` slot around the trigger"
        },
        {
          "name": "category",
          "text": "actions"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-radial-menu>` web component is a floating action menu of the Magma Design System that arranges its child items along a circular arc around a central trigger button, expanding them outward when opened. It is the parent of a compound pair: it owns the trigger and the geometry, while each option is supplied as an `<mds-radial-menu-item>` in the `item` slot.\n\n#### Semantic Behavior\n\n- **Trigger button**: Renders a trigger button whose `tone`, `variant` and `size` are forwarded from the host; clicking it toggles the menu open and closed. It is icon-only and named in the page language (the `lang` of `<html>`) after what a click does: \"Open menu\", then \"Close menu\". There is no prop to give it a name of your own yet.\n- **Open state**: `opened` is the source of truth for visibility; when set the items animate out along the arc and the trigger icon swaps to a close glyph.\n- **Interaction mode**: With `interaction=\"rightclick\"` the trigger is hidden and the menu instead opens on right-click, centred on the cursor.\n- **Closing**: A click outside the menu or Escape closes the open menu; Escape gives the focus back to the trigger when it was inside the menu.\n- **Backdrop**: When `backdrop` is enabled a dimming overlay is shown while the menu is open. It is purely visual: it lets clicks through.\n- **Item registration**: Items are read from the `item` slot; the component assigns each item's position and propagates the host `size` down to every `<mds-radial-menu-item>`.\n\n#### Properties & Visual Configurations\n\nThe internal trigger consumes the shared `variant` / `tone` / `size` ladders defined in [`agents/variants.md`](../../../../agents/variants.md); they default to `'dark'` / `'strong'` / `'lg'` here.\n\n#### Other behavioral props\n\n- **`angleStart`** and **`angleEnd`** define the angular sweep (in degrees) over which items are distributed; a 360-degree span produces a full ring, while a narrower range produces a fan. Setting `angleStart` greater than `angleEnd` reverses the distribution. Unset, the sweep is a full ring from `0deg`.\n- **`radius`** sets the distance (in `rem`) of the items from the centre, controlling how far they travel when the menu opens. Unset, it leaves it to `--mds-radial-menu-radius` (`5rem` by default).\n- **`direction`** chooses whether items lay out `'clockwise'` or `'counterclockwise'` around the arc.\n- **`interaction`** selects how the menu is summoned: `'click'` shows the trigger button, `'rightclick'` hides it and opens at the cursor.\n- **`disc`** renders a decorative disc beneath the menu; **`icon`** overrides the default trigger glyph and defaults to the \"more-vert\" Material icon when unset.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-radial-menu>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n`<mds-radial-menu>` is a compound component: it always needs one or more [`mds-radial-menu-item`](../mds-radial-menu-item/AGENTS.md) children placed in the `item` slot.\n\n#### Basic Radial Menu\n\nThe minimal form: a trigger button with items arranged in a full ring. Each item requires `icon` (a slug from the Magma icon library) and `tooltip` (the accessible label shown on hover). The parent propagates its `size` down to every item automatically.\n\n```html\n<mds-radial-menu>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/favorite\" tooltip=\"Aggiungi ai preferiti\" variant=\"dark\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/email\" tooltip=\"Invia email\" variant=\"dark\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/print\" tooltip=\"Stampa\" variant=\"dark\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Trigger Button Variant and Tone\n\nUse `variant` and `tone` to style the central trigger button to match the surrounding UI. Defaults are `variant=\"dark\"` and `tone=\"strong\"`.\n\n```html\n<!-- Primary trigger in a content area -->\n<mds-radial-menu variant=\"primary\" tone=\"strong\">\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"primary\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/ios-share\" tooltip=\"Condividi\" variant=\"primary\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\" tone=\"weak\"></mds-radial-menu-item>\n</mds-radial-menu>\n\n<!-- Light trigger: painted in the paper of the mode (white in light mode, black in dark mode) -->\n<mds-radial-menu variant=\"light\" tone=\"weak\">\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/favorite\" tooltip=\"Aggiungi ai preferiti\" variant=\"light\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/ios-share\" tooltip=\"Condividi\" variant=\"light\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Fan Layout with Angle Range\n\nRestrict `angle-start` and `angle-end` to create a fan instead of a full ring. This is useful when the component is positioned in a corner of a card or image where a full ring would overlap content.\n\n```html\n<!-- Quarter-circle fan opening toward the top-left, placed at the bottom-right corner -->\n<mds-radial-menu angle-start=\"180\" angle-end=\"270\" direction=\"counterclockwise\" radius=\"5\">\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/favorite\" tooltip=\"Aggiungi ai preferiti\" variant=\"light\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/ios-share\" tooltip=\"Condividi\" variant=\"light\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Adjusting the Radius\n\nSet `radius` (in `rem`) to control how far items travel from the trigger when the menu opens. Increase it when items would otherwise overlap; decrease it in constrained layouts.\n\n```html\n<mds-radial-menu radius=\"7\" variant=\"primary\" tone=\"outline\">\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"primary\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/content-copy\" tooltip=\"Copia\" variant=\"primary\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\" tone=\"weak\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Controlling the Open State Programmatically\n\nThe `opened` attribute reflects the menu's open state and can be set from JavaScript to open or close the menu without a user interaction. Remove the attribute (or set the prop to `undefined`; `false` is normalized to `undefined` too) to close it - do not write `opened=\"false\"` in markup.\n\n```html\n<mds-radial-menu id=\"menu-azioni\">\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"dark\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\" tone=\"weak\"></mds-radial-menu-item>\n</mds-radial-menu>\n\n<script>\n  const menu = document.querySelector('#menu-azioni');\n  // open programmatically\n  menu.opened = true;\n  // close programmatically\n  menu.opened = undefined;\n</script>\n```\n\n#### Contextual (Right-Click) Menu with Backdrop\n\nSet `interaction=\"rightclick\"` to hide the trigger button and open the menu at the cursor position on a context-menu event. Add `backdrop` to dim the page while the menu is open (the overlay is visual only: it does not block clicks).\n\n```html\n<mds-radial-menu interaction=\"rightclick\" disc backdrop>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/favorite\" tooltip=\"Aggiungi ai preferiti\" variant=\"dark\" tone=\"text\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/email\" tooltip=\"Invia email\" variant=\"dark\" tone=\"text\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/insert-drive-file\" tooltip=\"Nuovo documento\" variant=\"dark\" tone=\"text\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/info\" tooltip=\"Informazioni\" variant=\"dark\" tone=\"text\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/print\" tooltip=\"Stampa\" variant=\"dark\" tone=\"text\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\" tone=\"text\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Disc Decoration\n\nEnable the `disc` attribute to render a decorative circular background beneath the items, visually grouping the open menu. Combine with `backdrop` for modal-style emphasis.\n\n```html\n<mds-radial-menu disc variant=\"dark\" tone=\"strong\">\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"dark\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/ios-share\" tooltip=\"Condividi\" variant=\"dark\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\" tone=\"weak\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Custom Trigger Icon\n\nOverride the default \"more-vert\" glyph with any slug from the Magma icon library using the `icon` prop. The trigger automatically switches to the close icon while the menu is open.\n\n```html\n<mds-radial-menu icon=\"mi/baseline/add\" variant=\"primary\" tone=\"strong\">\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"primary\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/content-copy\" tooltip=\"Duplica\" variant=\"primary\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\" tone=\"weak\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Sizing\n\nUse the `size` prop to resize the trigger button and all items simultaneously. Do not override dimensions with inline `width` / `height`.\n\n```html\n<mds-radial-menu size=\"sm\" variant=\"dark\" tone=\"strong\">\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"dark\" tone=\"weak\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\" tone=\"weak\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Styling Customization\n\nStyle the component through its public `--mds-radial-menu-*` CSS custom properties. Use semantic color roles wrapped in `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working. The radius can come from a stylesheet too, through `--mds-radial-menu-radius` set on the element: the `radius` prop, when set, writes the same property inline and wins over the stylesheet. The angles have no public CSS custom property: set them with the `angle-start` and `angle-end` props (see Fan Layout with Angle Range above).\n\n```css\n.my-context mds-radial-menu {\n  --mds-radial-menu-disc-size: 12rem;\n}\n\n/* a ring in the top right corner, on wide screens a larger one */\n.corner-actions mds-radial-menu {\n  --mds-radial-menu-radius: 5rem;\n}\n\n@media (min-width: 1024px) {\n  .corner-actions mds-radial-menu {\n    --mds-radial-menu-radius: 7rem;\n  }\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-radial-menu>`. 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 Close the Menu by Setting `opened=\"false\"`\n\n`opened` is a boolean prop. Stencil reads `\"false\"` as `false` and, since `opened` is reflected, removes the attribute at the first render, so this happens to work; but the markup says the opposite of what it does, and on a prop that is not reflected the attribute stays in the DOM, where `[attr]` selectors still match it. Remove the attribute or set the prop to `undefined` to close the menu.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-menu opened=\"false\">...</mds-radial-menu>\n\n<!-- CORRECT -->\n<mds-radial-menu>...</mds-radial-menu>\n```\n\n#### Do Not Place Non-Item Children in the `item` Slot\n\nOnly `<mds-radial-menu-item>` elements belong in the `item` slot. Slotting arbitrary HTML or other components breaks the positioning and size-propagation logic.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-menu>\n  <mds-button slot=\"item\" label=\"Azione\" variant=\"primary\"></mds-button>\n  <button slot=\"item\">Azione</button>\n</mds-radial-menu>\n\n<!-- CORRECT -->\n<mds-radial-menu>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/edit\" tooltip=\"Azione\" variant=\"primary\" tone=\"weak\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Do Not Set Item Size Individually\n\n`<mds-radial-menu>` propagates its `size` prop down to every `<mds-radial-menu-item>` automatically. Setting `size` on individual items is overridden on the next update and produces inconsistent results.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-menu size=\"lg\">\n  <mds-radial-menu-item slot=\"item\" size=\"sm\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"dark\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" size=\"xl\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\"></mds-radial-menu-item>\n</mds-radial-menu>\n\n<!-- CORRECT -->\n<mds-radial-menu size=\"lg\">\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"dark\"></mds-radial-menu-item>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina\" variant=\"error\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Do Not Listen for Native `contextmenu` to Drive `interaction=\"rightclick\"`\n\nWhen `interaction=\"rightclick\"` the component registers its own `contextmenu` listener on `document` and prevents the default browser menu. Adding a second listener from application code causes both to fire and may reopen the menu after it closes.\n\n```js\n// INCORRECT\ndocument.addEventListener('contextmenu', (e) => {\n  e.preventDefault();\n  menu.opened = true; // fights the component's own handler\n});\n\n// CORRECT - just set the prop and let the component manage it\nmenu.interaction = 'rightclick';\n```\n\n#### Do Not Override Geometry via Inline Styles\n\nThe arc geometry is driven by the `angle-start`, `angle-end`, `radius`, and `direction` props, or by the documented `--mds-radial-menu-angle-*` and `--mds-radial-menu-radius` custom properties - not by transforms or offsets. Applying `transform`, `top`, or `left` directly on the host or items conflicts with the component's own animation values.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-menu style=\"transform: rotate(45deg);\">\n  <mds-radial-menu-item slot=\"item\" style=\"transform: translateX(80px);\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"dark\"></mds-radial-menu-item>\n</mds-radial-menu>\n\n<!-- CORRECT -->\n<mds-radial-menu angle-start=\"45\" angle-end=\"315\" radius=\"6\" direction=\"clockwise\">\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"dark\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Do Not Use an Item Without a `tooltip`\n\n`<mds-radial-menu-item>` renders icon-only buttons. Without a `tooltip` there is no visible label and the accessible name falls back to the icon name (`delete`), which names the icon, not the item's purpose.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-menu>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" variant=\"error\"></mds-radial-menu-item>\n</mds-radial-menu>\n\n<!-- CORRECT -->\n<mds-radial-menu>\n  <mds-radial-menu-item slot=\"item\" icon=\"mi/baseline/delete\" tooltip=\"Elimina elemento\" variant=\"error\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n"
      },
      "props": [
        {
          "name": "angleEnd",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "angle-end",
          "reflectToAttr": true,
          "docs": "Specifies the ending angle of the menu, in degrees; when it is not set the menu takes\n`--mds-radial-menu-angle-end`, `360deg` by default",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "angleStart",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "angle-start",
          "reflectToAttr": true,
          "docs": "Specifies the starting angle of the menu, in degrees; when it is not set the menu takes\n`--mds-radial-menu-angle-start`, `0deg` by default",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "backdrop",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "backdrop",
          "reflectToAttr": true,
          "docs": "Specifies if the component has a backdrop background",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "direction",
          "type": "\"clockwise\" | \"counterclockwise\"",
          "complexType": {
            "original": "Direction",
            "resolved": "\"clockwise\" | \"counterclockwise\"",
            "references": {
              "Direction": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-radial-menu/meta/types.ts::Direction",
                "referenceLocation": "Direction"
              }
            }
          },
          "mutable": false,
          "attr": "direction",
          "reflectToAttr": true,
          "docs": "Specifies the direction of the menu elements",
          "docsTags": [
            {
              "name": "default",
              "text": "'clockwise'"
            }
          ],
          "default": "'clockwise'",
          "values": [
            {
              "value": "clockwise",
              "type": "string"
            },
            {
              "value": "counterclockwise",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disc",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "disc",
          "reflectToAttr": true,
          "docs": "Specifies if the menu has a disc beneath or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "The icon displayed in the button",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "interaction",
          "type": "\"click\" | \"rightclick\"",
          "complexType": {
            "original": "Interaction",
            "resolved": "\"click\" | \"rightclick\"",
            "references": {
              "Interaction": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-radial-menu/meta/types.ts::Interaction",
                "referenceLocation": "Interaction"
              }
            }
          },
          "mutable": false,
          "attr": "interaction",
          "reflectToAttr": true,
          "docs": "Specifies how to open the menu",
          "docsTags": [
            {
              "name": "default",
              "text": "'click'"
            }
          ],
          "default": "'click'",
          "values": [
            {
              "value": "click",
              "type": "string"
            },
            {
              "value": "rightclick",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "opened",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "opened",
          "reflectToAttr": true,
          "docs": "Specifies if the menu is opened or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "radius",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "radius",
          "reflectToAttr": true,
          "docs": "Specifies the radius of the menu, in `rem`; when it is not set the menu takes\n`--mds-radial-menu-radius`, `5rem` by default",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | \"xl\"",
          "complexType": {
            "original": "ButtonSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\"",
            "references": {
              "ButtonSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonSizeType",
                "referenceLocation": "ButtonSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the size for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'lg'"
            }
          ],
          "default": "'lg'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "value": "xl",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"outline\" | \"strong\" | \"text\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneVariantType",
            "resolved": "\"outline\" | \"strong\" | \"text\" | \"weak\" | undefined",
            "references": {
              "ToneVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneVariantType",
                "referenceLocation": "ToneVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Specifies the tone variant for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'strong'"
            }
          ],
          "default": "'strong'",
          "values": [
            {
              "value": "outline",
              "type": "string"
            },
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "text",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"apple\" | \"dark\" | \"error\" | \"google\" | \"info\" | \"light\" | \"primary\" | \"secondary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ButtonVariantType",
            "resolved": "\"ai\" | \"apple\" | \"dark\" | \"error\" | \"google\" | \"info\" | \"light\" | \"primary\" | \"secondary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ButtonVariantType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonVariantType",
                "referenceLocation": "ButtonVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the color variant for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'dark'"
            }
          ],
          "default": "'dark'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "apple",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "google",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "secondary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-radial-menu-angle-end",
          "annotation": "prop",
          "docs": "Ending angle of the radial menu; the `angle-end` prop, when set, wins over it.",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-menu-angle-start",
          "annotation": "prop",
          "docs": "Starting angle of the radial menu; the `angle-start` prop, when set, wins over it.",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-menu-context-menu-z-index",
          "annotation": "prop",
          "docs": "Z-index of the radial menu context.",
          "visibility": "public"
        },
        {
          "name": "--mds-radial-menu-delay",
          "annotation": "prop",
          "docs": "Delay before the radial menu opens.",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-menu-direction",
          "annotation": "prop",
          "docs": "Direction multiplier for menu expansion (-1 or 1).",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-menu-disc-background",
          "annotation": "prop",
          "docs": "Background color of the radial menu disc.",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-menu-disc-filter",
          "annotation": "prop",
          "docs": "Filter applied to the radial menu disc.",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-menu-disc-shadow",
          "annotation": "prop",
          "docs": "Shadow applied to the radial menu disc.",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-menu-disc-size",
          "annotation": "prop",
          "docs": "Size of the radial menu disc.",
          "visibility": "public"
        },
        {
          "name": "--mds-radial-menu-radius",
          "annotation": "prop",
          "docs": "Radius of the radial menu; the `radius` prop, when set, wins over it.",
          "visibility": "public"
        },
        {
          "name": "--mds-radial-menu-transition-duration",
          "annotation": "prop",
          "docs": "Duration of the radial menu open/close transition.",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-menu-transition-timing-function",
          "annotation": "prop",
          "docs": "Timing function of the radial menu transition.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "item",
          "docs": "Add `mds-radial-menu-item` elements or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "radial-menu",
          "docs": "The ring that lays out the `item` slot around the trigger"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-radial-menu": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-radial-menu--docs"
    },
    {
      "filePath": "src/components/mds-radial-menu-item/mds-radial-menu-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-radial-menu-item",
      "readme": "# mds-radial-menu-item\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "parent",
          "text": "mds-radial-menu"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-radial-menu-item>` web component is a single actionable spoke of the [`<mds-radial-menu>`](../mds-radial-menu/AGENTS.md) compound. It wraps an `<mds-button>` (rendered as a circular icon button) plus an optional `<mds-tooltip>`, and is positioned along the menu arc by its parent.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be a direct slot child of `<mds-radial-menu>`; it is not used standalone, and the radial menu's `item` slot should contain only `<mds-radial-menu-item>` elements.\n- **Parent-driven sizing and ordering**: The parent overrides each item's `size` to match the menu and assigns its angular position, so an item's `size` prop is effectively a fallback the menu normalizes.\n- **Open/close animation**: Items are hidden until the parent menu is opened, then translate outward along the arc - the item itself carries no `opened` state.\n- **Conditional tooltip**: An `<mds-tooltip>` is rendered only when `tooltip` is set.\n- **Accessibility**: The `tooltip` string is also used as the inner button's accessible name, so it doubles as the label of the icon-only action.\n- **No own events**: Activation is the inner `<mds-button>`'s native click, which the consumer wires up directly on the element.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` / `tone` / `size` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md); they are forwarded to the inner `<mds-button>`. Defaults are deliberately distinct from a standalone button: `variant` defaults to `dark` and `tone` to `weak` so items read as secondary spokes against the parent's trigger button (which defaults to the `strong` tone). Set `icon` to the glyph that represents the action - it is the primary content of each item since the label lives only in the `tooltip`. Use `tooltip` both to describe the action on hover and to supply the accessible name; omit it only when the icon is unambiguous and labelled elsewhere. Prefer leaving `size` unset and letting the parent menu drive it for visual consistency across all spokes.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-radial-menu-item>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Item with Icon and Tooltip\n\nThe canonical form. Always place `<mds-radial-menu-item>` as a direct child of [`<mds-radial-menu>`](../mds-radial-menu/AGENTS.md). Set `icon` to a slug from the Magma icon library and `tooltip` to the label of the action - it doubles as the inner button's accessible name.\n\n```html\n<mds-radial-menu>\n  <mds-radial-menu-item icon=\"mi/baseline/edit\" tooltip=\"Modifica\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Multiple Items Around the Arc\n\nAdd one `<mds-radial-menu-item>` per spoke. The parent assigns each item its angular position automatically; order in the DOM controls the arc sequence.\n\n```html\n<mds-radial-menu opened>\n  <mds-radial-menu-item icon=\"mi/baseline/edit\"   tooltip=\"Modifica\"></mds-radial-menu-item>\n  <mds-radial-menu-item icon=\"mi/baseline/delete\" tooltip=\"Elimina\"></mds-radial-menu-item>\n  <mds-radial-menu-item icon=\"mi/baseline/share\"  tooltip=\"Condividi\"></mds-radial-menu-item>\n  <mds-radial-menu-item icon=\"mi/baseline/download\" tooltip=\"Scarica\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Variant and Tone for Emphasis\n\nUse `variant` to convey the semantic meaning of the action and `tone` to control visual weight. The defaults (`variant=\"dark\"` + `tone=\"weak\"`) keep spokes visually subordinate to the trigger button, which defaults to `tone=\"strong\"`. Override them only when the action demands a different signal.\n\n```html\n<mds-radial-menu opened>\n  <!-- Default: neutral dark spoke -->\n  <mds-radial-menu-item icon=\"mi/baseline/share\" tooltip=\"Condividi\"></mds-radial-menu-item>\n\n  <!-- Destructive action: error variant -->\n  <mds-radial-menu-item\n    icon=\"mi/baseline/delete\"\n    tooltip=\"Elimina\"\n    variant=\"error\"\n    tone=\"strong\"\n  ></mds-radial-menu-item>\n\n  <!-- Primary call to action -->\n  <mds-radial-menu-item\n    icon=\"mi/baseline/save\"\n    tooltip=\"Salva\"\n    variant=\"primary\"\n    tone=\"strong\"\n  ></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Listening for Activation\n\n`<mds-radial-menu-item>` emits no own events. Wire the native `click` event directly on the element - it bubbles from the inner `<mds-button>`.\n\n```html\n<mds-radial-menu>\n  <mds-radial-menu-item id=\"edit-item\" icon=\"mi/baseline/edit\" tooltip=\"Modifica\"></mds-radial-menu-item>\n</mds-radial-menu>\n\n<script>\n  document.querySelector('#edit-item').addEventListener('click', () => {\n    console.log('Modifica attivato');\n  });\n</script>\n```\n\n#### Item Without a Tooltip (Unambiguous Icon)\n\nOmit `tooltip` only when the icon is self-evident in context and the action is labelled elsewhere (for example, via a screen-reader landmark). Without `tooltip`, the inner button's accessible name falls back to the icon name (`add`), which names the icon, not the action - reserve this for cases where the icon is genuinely unambiguous.\n\n```html\n<mds-radial-menu opened>\n  <mds-radial-menu-item icon=\"mi/baseline/add\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Styling a Spoke\n\n`<mds-radial-menu-item>` has no public CSS custom property and no shadow parts: how fast each spoke animates in and out is set by the component. Style a spoke with its `variant` and `tone` props (see Variant and Tone for Emphasis above); its size comes from the parent.\n\n```html\n<mds-radial-menu opened>\n  <mds-radial-menu-item icon=\"mi/baseline/star\" tooltip=\"Preferiti\" variant=\"primary\" tone=\"strong\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-radial-menu-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 Outside `<mds-radial-menu>`\n\n`<mds-radial-menu-item>` is a compound child; it relies on its parent to set angular position, size, and open/close animation. Rendering it standalone leaves it permanently hidden and incorrectly positioned.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-menu-item icon=\"mi/baseline/edit\" tooltip=\"Modifica\"></mds-radial-menu-item>\n\n<!-- CORRECT -->\n<mds-radial-menu>\n  <mds-radial-menu-item icon=\"mi/baseline/edit\" tooltip=\"Modifica\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Do Not Wrap Items in a Container Element\n\nThe parent queries direct slot children (`[slot=\"item\"]`) to assign positions and sizes. An intermediate wrapper breaks parent-child communication and the item never receives its angular placement.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-menu>\n  <div>\n    <mds-radial-menu-item icon=\"mi/baseline/share\" tooltip=\"Condividi\"></mds-radial-menu-item>\n  </div>\n</mds-radial-menu>\n\n<!-- CORRECT -->\n<mds-radial-menu>\n  <mds-radial-menu-item icon=\"mi/baseline/share\" tooltip=\"Condividi\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Do Not Put Text or HTML in a Slot\n\n`<mds-radial-menu-item>` has no default slot - any slotted content is ignored. The visible label lives exclusively in the `tooltip` prop.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-menu>\n  <mds-radial-menu-item icon=\"mi/baseline/edit\">Modifica</mds-radial-menu-item>\n</mds-radial-menu>\n\n<!-- CORRECT -->\n<mds-radial-menu>\n  <mds-radial-menu-item icon=\"mi/baseline/edit\" tooltip=\"Modifica\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Do Not Omit `tooltip` for an Icon-Only Item Without Another Label\n\nOmitting `tooltip` leaves the inner `<mds-button>` with no hover description and an accessible name that falls back to the icon name (`send`), which names the icon, not the action. Provide `tooltip` unless the icon's purpose is unambiguous and the action is described by a surrounding landmark or heading.\n\n```html\n<!-- INCORRECT: accessible name is just the icon name, no hover hint -->\n<mds-radial-menu>\n  <mds-radial-menu-item icon=\"mi/baseline/send\"></mds-radial-menu-item>\n</mds-radial-menu>\n\n<!-- CORRECT -->\n<mds-radial-menu>\n  <mds-radial-menu-item icon=\"mi/baseline/send\" tooltip=\"Invia messaggio\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Do Not Force `size` When the Parent Controls It\n\n`<mds-radial-menu>` overrides each item's `size` to match its own `size` prop. Setting `size` on the item is redundant: the parent overwrites it when it loads and whenever its own `size` changes.\n\n```html\n<!-- INCORRECT: size will be overridden by the parent anyway -->\n<mds-radial-menu size=\"md\">\n  <mds-radial-menu-item icon=\"mi/baseline/edit\" tooltip=\"Modifica\" size=\"xl\"></mds-radial-menu-item>\n</mds-radial-menu>\n\n<!-- CORRECT: let the parent drive size for all spokes -->\n<mds-radial-menu size=\"md\">\n  <mds-radial-menu-item icon=\"mi/baseline/edit\" tooltip=\"Modifica\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n\n#### Do Not Style via Undocumented Shadow Internals\n\n`<mds-radial-menu-item>` has no public CSS custom property and no shadow parts: its styling surface is the `variant` and `tone` props. Targeting shadow-internal classes or undocumented `::part()` names couples code to the implementation and breaks on minor releases.\n\n```css\n/* INCORRECT */\nmds-radial-menu-item >>> .button {\n  border-radius: 0;\n}\n```\n\n```html\n<!-- CORRECT: use the variant and tone props -->\n<mds-radial-menu>\n  <mds-radial-menu-item icon=\"mi/baseline/edit\" tooltip=\"Modifica\" variant=\"primary\" tone=\"weak\"></mds-radial-menu-item>\n</mds-radial-menu>\n```\n"
      },
      "props": [
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "The icon displayed in the button",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | \"xl\"",
          "complexType": {
            "original": "ButtonSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\"",
            "references": {
              "ButtonSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonSizeType",
                "referenceLocation": "ButtonSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the size of the menu item.",
          "docsTags": [
            {
              "name": "default",
              "text": "'lg'"
            }
          ],
          "default": "'lg'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "value": "xl",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"outline\" | \"strong\" | \"text\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneVariantType",
            "resolved": "\"outline\" | \"strong\" | \"text\" | \"weak\" | undefined",
            "references": {
              "ToneVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneVariantType",
                "referenceLocation": "ToneVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Specifies the tone variant for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'weak'"
            }
          ],
          "default": "'weak'",
          "values": [
            {
              "value": "outline",
              "type": "string"
            },
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "text",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tooltip",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "tooltip",
          "reflectToAttr": true,
          "docs": "The tooltip displayed when hovering over the button",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"apple\" | \"dark\" | \"error\" | \"google\" | \"info\" | \"light\" | \"primary\" | \"secondary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ButtonVariantType",
            "resolved": "\"ai\" | \"apple\" | \"dark\" | \"error\" | \"google\" | \"info\" | \"light\" | \"primary\" | \"secondary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ButtonVariantType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonVariantType",
                "referenceLocation": "ButtonVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the color variant for the button",
          "docsTags": [
            {
              "name": "default",
              "text": "'dark'"
            }
          ],
          "default": "'dark'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "apple",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "google",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "secondary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-radial-menu-item-transition-duration",
          "annotation": "prop",
          "docs": "Duration of individual radial menu item transitions.",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-menu-item-transition-timing-function",
          "annotation": "prop",
          "docs": "Timing function for individual radial menu item transitions.",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button",
        "mds-tooltip"
      ],
      "dependencyGraph": {
        "mds-radial-menu-item": [
          "mds-button",
          "mds-tooltip"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-tooltip": [
          "mds-text"
        ]
      },
      "storybook": "ui-radial-menu-radial-menu-item--docs"
    },
    {
      "filePath": "src/components/mds-radial-progress/mds-radial-progress.tsx",
      "encapsulation": "shadow",
      "tag": "mds-radial-progress",
      "readme": "# mds-radial-progress\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "part",
          "text": "value-container - Selects the value container of the radial progress."
        },
        {
          "name": "part",
          "text": "icon - Selects the icon of the radial progress."
        },
        {
          "name": "category",
          "text": "feedback"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-radial-progress>` web component renders a circular progress indicator that visualizes a completion ratio as a ring with a numeric percentage at its center. It is the radial counterpart of the linear bar exposed by `<mds-progress>`, which composes it internally, and it has no native HTML primitive equivalent.\n\n#### Semantic Behavior\n\n- **Progress semantics**: Exposed to assistive technology as a progress widget.\n- **Value clamping**: `progress` is interpreted as a 0 - 1 ratio and clamped to that range, so out-of-bounds values never overflow the ring or the displayed percentage.\n- **Centered readout**: The clamped ratio is shown as a whole-number percentage at the ring's center.\n- **Animated fill**: Changing `progress` at runtime animates the ring toward the new value (~500ms).\n- **Reduced motion**: When reduced motion is in effect (the Magma animation preference set to `reduce`, or the OS `prefers-reduced-motion: reduce` while the preference follows the system), the ring jumps directly to the target value with no tween.\n- **Icon prop**: Setting `icon` renders an icon above the percentage; the component has no slots.\n\n#### Properties & Visual Configurations\n\n- **`progress`** is the single source of truth for the indicator, expressed as a fraction between `0` and `1` (e.g. `0.42` shows \"42\"). It is the value to bind for live updates.\n\nThe shared `variant` ladder is defined in [`agents/variants.md`](../../../../agents/variants.md). On this component `variant` selects the ring color and is the only way to express status: pick a brand value (`'primary'`, `'ai'`) for neutral progress, or a status value (`'success'`, `'warning'`, `'error'`, `'info'`) to color the completion state. There is no separate `tone` prop.\n\n#### Other behavioral props\n\n- **`icon`** is an SVG filename slug from the Magma icon library; when present it is shown alongside the centered percentage rather than replacing it.\n- **`typography`** controls the type token of the centered percentage text, restricted to the technical scale (`'option'` by default, or `'label'`) so the readout stays sized for the ring.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-radial-progress>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant ladder documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Progress Indicator\n\nThe minimal form. Pass `progress` as a fraction between `0` and `1`; the component renders the ring and displays the whole-number percentage at its center.\n\n```html\n<mds-radial-progress progress=\"0.65\"></mds-radial-progress>\n```\n\n#### Variant for Semantic Coloring\n\nUse `variant` to communicate what kind of progress is being tracked. Pick a brand value for neutral steps and a status value to express the outcome color.\n\n```html\n<!-- Neutral brand progress -->\n<mds-radial-progress progress=\"0.4\" variant=\"primary\"></mds-radial-progress>\n\n<!-- Success state - caricamento completato -->\n<mds-radial-progress progress=\"1\" variant=\"success\"></mds-radial-progress>\n\n<!-- Warning - procedura parziale -->\n<mds-radial-progress progress=\"0.3\" variant=\"warning\"></mds-radial-progress>\n\n<!-- Error - operazione fallita -->\n<mds-radial-progress progress=\"0.15\" variant=\"error\"></mds-radial-progress>\n\n<!-- AI variant - elaborazione AI in corso -->\n<mds-radial-progress progress=\"0.72\" variant=\"ai\"></mds-radial-progress>\n```\n\n#### Progress with Icon\n\nSet `icon` to an icon slug to show a glyph above the percentage readout. The icon takes the same color as the ring.\n\n```html\n<!-- Caricamento file -->\n<mds-radial-progress\n  progress=\"0.55\"\n  icon=\"mi/baseline/cloud-upload\"\n  variant=\"primary\"\n></mds-radial-progress>\n\n<!-- Stato di salvataggio -->\n<mds-radial-progress\n  progress=\"0.9\"\n  icon=\"mi/baseline/save\"\n  variant=\"success\"\n></mds-radial-progress>\n```\n\n#### Typography Scale\n\n`typography` controls the type token used for the centered percentage. Use `'option'` (default) for most sizes and `'label'` when the ring is rendered at a smaller size and a tighter type scale is needed.\n\n```html\n<!-- Default - token \"option\" -->\n<mds-radial-progress progress=\"0.5\" typography=\"option\"></mds-radial-progress>\n\n<!-- Compact version - token \"label\" -->\n<mds-radial-progress progress=\"0.5\" typography=\"label\"></mds-radial-progress>\n```\n\n#### Controlling Size via CSS\n\n`<mds-radial-progress>` is sized by its `width` (the host uses a 1:1 `aspect-ratio`). Set the width on the host; do not set `height` separately.\n\n```css\n.dashboard-kpi mds-radial-progress {\n  width: 96px;\n}\n\n.compact-cell mds-radial-progress {\n  width: 32px;\n}\n```\n\n#### Live Updates and Animation\n\nBind `progress` to a reactive state value. When the prop changes, the component smoothly animates the ring to the new value over ~500 ms using an ease-out curve. Respects the reduced-motion preference (the Magma `pref-animation-*` choice, or the OS setting when it follows the system) automatically - no extra code needed.\n\n```html\n<mds-radial-progress id=\"upload-ring\" progress=\"0\"></mds-radial-progress>\n\n<script>\n  const ring = document.getElementById('upload-ring');\n  // Simulate upload progress\n  let value = 0;\n  const interval = setInterval(() => {\n    value = Math.min(1, value + 0.1);\n    ring.progress = value;\n    if (value >= 1) clearInterval(interval);\n  }, 300);\n</script>\n```\n\n#### Dark and Light Neutral Variants\n\n`variant=\"dark\"` paints an inverse ring (`surface-inverse`: dark on a light UI, light on a dark one); `variant=\"light\"` paints a neutral ring on the wash. Both use neutral roles that follow the mode, so they adapt without custom CSS and are not tied to a light or dark background.\n\n```html\n<!-- Anello invertito -->\n<mds-radial-progress progress=\"0.6\" variant=\"dark\"></mds-radial-progress>\n\n<!-- Anello neutro -->\n<mds-radial-progress progress=\"0.6\" variant=\"light\"></mds-radial-progress>\n```\n\n#### CSS Custom Property Customization\n\nColor the component with `variant` first. When a context needs its own colors, set the documented `--mds-radial-progress-*` CSS custom properties on the element itself (its defaults and its variants are declared on its own host, so a value set on an ancestor does not reach it), naming semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working. `--mds-radial-progress-text-suffix` is the text after the number, a CSS string (`'%'` by default).\n\n```css\n.storage-quota mds-radial-progress {\n  --mds-radial-progress-color: rgb(var(--magma-accent-emphasis));\n  --mds-radial-progress-background: rgb(var(--magma-wash-soft));\n  --mds-radial-progress-text-suffix: '';\n}\n```\n\n#### Shadow Part Customization\n\nThe two documented shadow parts - `value-container` and `icon` - allow deeper styling when the CSS custom properties are not sufficient.\n\n```css\n/* Adjust the inner circle shadow */\nmds-radial-progress::part(value-container) {\n  box-shadow: none;\n}\n\n/* Tint the icon independently from the ring color */\nmds-radial-progress::part(icon) {\n  fill: rgb(var(--magma-warning-text-default));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-radial-progress>`. 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 Pass `progress` Outside the 0-1 Range\n\n`progress` is a 0-1 fraction, not a 0-100 percentage. Values outside the range are silently clamped, so `progress=\"75\"` displays \"100%\" rather than \"75%\".\n\n```html\n<!-- INCORRECT -->\n<mds-radial-progress progress=\"75\"></mds-radial-progress>\n\n<!-- CORRECT -->\n<mds-radial-progress progress=\"0.75\"></mds-radial-progress>\n```\n\n#### Do Not Use Slots to Add Content\n\n`<mds-radial-progress>` has no slots - neither a default slot nor any named slot. Placing child elements inside the tag has no effect; they are not rendered.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-progress progress=\"0.5\">\n  <mds-icon name=\"mi/baseline/check\"></mds-icon>\n</mds-radial-progress>\n\n<!-- CORRECT -->\n<mds-radial-progress progress=\"0.5\" icon=\"mi/baseline/check\"></mds-radial-progress>\n```\n\n#### Do Not Set Both `width` and `height`\n\nThe component enforces a 1:1 `aspect-ratio` internally. Setting both dimensions independently can distort the circular ring into an ellipse.\n\n```css\n/* INCORRECT */\nmds-radial-progress {\n  width: 80px;\n  height: 60px;\n}\n\n/* CORRECT */\nmds-radial-progress {\n  width: 80px;\n}\n```\n\n#### Do Not Hard-Code Colors with Inline Styles\n\nInline `style` bypasses `variant` and the Magma color roles, breaking dark-mode and high-contrast adaptations.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-progress\n  progress=\"0.6\"\n  style=\"color: #FF5500; background: #eee;\"\n></mds-radial-progress>\n\n<!-- CORRECT -->\n<mds-radial-progress progress=\"0.6\" variant=\"warning\"></mds-radial-progress>\n```\n\n```css\n/* CORRECT for deeper customization: a documented property naming a color role */\n.my-context mds-radial-progress {\n  --mds-radial-progress-color: rgb(var(--magma-warning-fg));\n}\n```\n\n#### Do Not Use `variant` Values Not Accepted by the Component\n\n`<mds-radial-progress>` accepts `ThemeVariantType` (`primary`, `ai`, `dark`, `light`, `error`, `warning`, `success`, `info`). Decorative label variants (`'red'`, `'blue'`, `'orchid'`, etc.) defined in `ThemeFullVariantType` are not wired in this component and silently fall back to the default styling.\n\n```html\n<!-- INCORRECT -->\n<mds-radial-progress progress=\"0.4\" variant=\"red\"></mds-radial-progress>\n\n<!-- CORRECT - use a semantic status variant for color emphasis -->\n<mds-radial-progress progress=\"0.4\" variant=\"error\"></mds-radial-progress>\n```\n\n#### Do Not Pierce the Shadow DOM\n\nTargeting internal class names via `>>>` or undocumented `::part()` selectors couples your code to the component's implementation and breaks on future releases. Use `variant`, the documented `--mds-radial-progress-*` custom properties and the documented `value-container` / `icon` shadow parts only.\n\n```css\n/* INCORRECT */\nmds-radial-progress >>> .value {\n  font-size: 20px;\n}\nmds-radial-progress::part(value-container__text) {\n  display: none;\n}\n\n/* CORRECT */\nmds-radial-progress::part(value-container) {\n  box-shadow: none;\n}\n```\n"
      },
      "props": [
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string | undefined",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "Specifies if the component should display an icon",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "progress",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "progress",
          "reflectToAttr": false,
          "docs": "A value between 0 and 1 that rapresents the status progress",
          "docsTags": [
            {
              "name": "default",
              "text": "0"
            }
          ],
          "default": "0",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"label\" | \"option\" | undefined",
          "complexType": {
            "original": "TypographyTechnicalType",
            "resolved": "\"label\" | \"option\" | undefined",
            "references": {
              "TypographyTechnicalType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyTechnicalType",
                "referenceLocation": "TypographyTechnicalType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": true,
          "docs": "The typography of the component",
          "docsTags": [
            {
              "name": "default",
              "text": "'option'"
            }
          ],
          "default": "'option'",
          "values": [
            {
              "value": "label",
              "type": "string"
            },
            {
              "value": "option",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ThemeVariantType",
            "resolved": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ThemeVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeVariantType",
                "referenceLocation": "ThemeVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the theme variant colors",
          "docsTags": [
            {
              "name": "default",
              "text": "'primary'"
            }
          ],
          "default": "'primary'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-radial-progress-background",
          "annotation": "prop",
          "docs": "Color of the ring track, behind the progress arc",
          "visibility": "public"
        },
        {
          "name": "--mds-radial-progress-color",
          "annotation": "prop",
          "docs": "Color of the progress arc and of the icon",
          "visibility": "public"
        },
        {
          "name": "--mds-radial-progress-text-background",
          "annotation": "prop",
          "docs": "Background color of the inner circle that holds the value",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-progress-text-background-shadow",
          "annotation": "prop",
          "docs": "Box shadow of the inner circle that holds the value",
          "visibility": "internal"
        },
        {
          "name": "--mds-radial-progress-text-suffix",
          "annotation": "prop",
          "docs": "Text written after the value, as a CSS string (`'%'` by default)",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "icon",
          "docs": "Selects the icon of the radial progress."
        },
        {
          "name": "value-container",
          "docs": "Selects the value container of the radial progress."
        }
      ],
      "states": [],
      "dependents": [
        "mds-progress"
      ],
      "dependencies": [
        "mds-icon",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-radial-progress": [
          "mds-icon",
          "mds-text"
        ],
        "mds-progress": [
          "mds-radial-progress"
        ]
      },
      "storybook": "ui-radial-progress--docs"
    },
    {
      "filePath": "src/components/mds-separator/mds-separator.tsx",
      "encapsulation": "shadow",
      "tag": "mds-separator",
      "readme": "# mds-separator\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "structure"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-separator>` web component is the visual divider of the Magma Design System: a thin, full-radius horizontal rule used to partition content into distinct groups. It is a purely presentational primitive - the styled equivalent of an `<hr>` - with no props, slots, events, or interactive state.\n\n#### Semantic Behavior\n\n- **Presentational by default**: It exposes no role or ARIA attributes and accepts no children, so it is treated as decorative chrome rather than semantic content.\n- **Theme-reactive coloring**: The separator color adapts automatically to the active appearance - darker under dark themes and stronger under high-contrast preferences - with no consumer wiring required.\n- **No state or interaction**: There is no disabled, await, focus, or keyboard behavior - the element is inert and never enters the tab sequence.\n\n#### Properties & Visual Configurations\n\nThe component defines no configurable props. The only intended customization point is the CSS custom property **`--mds-separator-background`** (default `rgb(var(--magma-border-default))`) that overrides the divider color; set it to a semantic color role so the divider keeps following the mode and the contrast preference.\n\nFor the semantic color roles the default value draws from, see [`agents/color.md`](../../../../agents/color.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-separator>` 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#### Dividing Items in a List or Card\n\nThe most common use: place `<mds-separator>` between stacked rows or sections to create a thin visual boundary without adding semantic structure. The component is inert and carries no ARIA role, so it works as pure chrome.\n\n```html\n<div class=\"grid rounded-(--magma-radius-xl) bg-surface-raised overflow-hidden\">\n  <mds-entity icon=\"mi/baseline/person\">\n    <mds-text typography=\"h6\">Mario Rossi</mds-text>\n  </mds-entity>\n  <mds-separator></mds-separator>\n  <mds-entity icon=\"mi/baseline/person\">\n    <mds-text typography=\"h6\">Luigi Verdi</mds-text>\n  </mds-entity>\n  <mds-separator></mds-separator>\n  <mds-entity icon=\"mi/baseline/person\">\n    <mds-text typography=\"h6\">Wario</mds-text>\n  </mds-entity>\n</div>\n```\n\n#### Dividing Sections Inside a Card\n\nUse `<mds-separator>` to separate groups of content inside a card region. `<mds-card>` renders only its four named slots, so a separator placed directly in the card, between the regions, is not rendered: put it inside the region, as a direct sibling of the rows it divides - do not wrap it.\n\n```html\n<mds-card>\n  <mds-card-header slot=\"header\">\n    <mds-text typography=\"h6\">Riepilogo ordine</mds-text>\n  </mds-card-header>\n  <mds-card-content slot=\"content\">\n    <mds-text typography=\"paragraph\">Subtotale: 104,92 EUR</mds-text>\n    <mds-separator></mds-separator>\n    <mds-text typography=\"paragraph\">Totale: 128,00 EUR</mds-text>\n  </mds-card-content>\n  <mds-card-footer slot=\"footer\">\n    <mds-button label=\"Conferma\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-card-footer>\n</mds-card>\n```\n\n#### Dividing Items Inside a Price-Table List\n\n`<mds-separator>` is the internal divider used by [`mds-price-table-list`](../mds-price-table-list/AGENTS.md), between its header and its items. When building a custom feature list, place one separator between consecutive rows, never one before the first or after the last.\n\n```html\n<div class=\"grid\">\n  <mds-text typography=\"caption\">Archiviazione inclusa</mds-text>\n  <mds-separator></mds-separator>\n  <mds-text typography=\"caption\">Utenti illimitati</mds-text>\n  <mds-separator></mds-separator>\n  <mds-text typography=\"caption\">Supporto dedicato</mds-text>\n</div>\n```\n\n#### Custom Separator Color\n\nOverride the divider color through the single documented CSS custom property `--mds-separator-background`. Use a semantic color role wrapped in `rgb(var(--magma-<role>))` so dark-mode and high-contrast variants keep working.\n\n```css\n.sezione-speciale mds-separator {\n  --mds-separator-background: rgb(var(--magma-accent-border));\n}\n```\n\n```html\n<div class=\"sezione-speciale\">\n  <mds-text typography=\"h6\">Piano Pro</mds-text>\n  <mds-separator></mds-separator>\n  <mds-text typography=\"paragraph\">Accesso a tutte le funzionalita</mds-text>\n</div>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-separator>`. 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 a Raw `<hr>` Instead of `<mds-separator>`\n\nUsing a plain `<hr>` bypasses the Magma token system, so the divider will not adapt to dark mode or high-contrast preferences automatically. Use `<mds-separator>` for any themed divider inside a Magma layout.\n\n```html\n<!-- INCORRECT -->\n<mds-entity icon=\"mi/baseline/person\">\n  <mds-text typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n<hr>\n<mds-entity icon=\"mi/baseline/person\">\n  <mds-text typography=\"h6\">Luigi Verdi</mds-text>\n</mds-entity>\n\n<!-- CORRECT -->\n<mds-entity icon=\"mi/baseline/person\">\n  <mds-text typography=\"h6\">Mario Rossi</mds-text>\n</mds-entity>\n<mds-separator></mds-separator>\n<mds-entity icon=\"mi/baseline/person\">\n  <mds-text typography=\"h6\">Luigi Verdi</mds-text>\n</mds-entity>\n```\n\n#### Do Not Put Content Inside `<mds-separator>`\n\nThe component defines no slots and accepts no children. Placing text or elements inside it has no effect and may produce unexpected layout behavior.\n\n```html\n<!-- INCORRECT -->\n<mds-separator>oppure</mds-separator>\n\n<!-- CORRECT -->\n<!-- Use a dedicated labeled-divider pattern with a flex row if a label is needed -->\n<div class=\"flex items-center gap-300\">\n  <mds-separator class=\"grow\"></mds-separator>\n  <mds-text typography=\"caption\">oppure</mds-text>\n  <mds-separator class=\"grow\"></mds-separator>\n</div>\n```\n\n#### Do Not Override Color with a Raw CSS Value\n\nSetting `--mds-separator-background` to a literal hex or RGB value without using a semantic color role breaks dark mode and high-contrast adaptation. Always wrap the value in `rgb(var(--magma-<role>))`.\n\n```css\n/* INCORRECT */\nmds-separator {\n  --mds-separator-background: #cccccc;\n}\n\n/* CORRECT */\nmds-separator {\n  --mds-separator-background: rgb(var(--magma-border-muted));\n}\n```\n\n#### Do Not Pierce Shadow DOM to Style the Separator\n\nThere are no documented `::part()` names on `<mds-separator>`. The only supported customization surface is `--mds-separator-background`. Targeting internal elements via `>>>` or undocumented selectors will break on future releases.\n\n```css\n/* INCORRECT */\nmds-separator >>> :host {\n  height: 2px;\n  border-radius: 0;\n}\n\n/* CORRECT */\n/* Only --mds-separator-background is the supported override.\n   Layout constraints such as height are not part of its styling API. */\nmds-separator {\n  --mds-separator-background: rgb(var(--magma-accent-border));\n}\n```\n\n#### Do Not Add Semantic Roles to `<mds-separator>`\n\n`<mds-separator>` is purely decorative. Adding `role=\"separator\"` or `aria-orientation` introduces misleading semantics for assistive technology. `<mds-hr>` carries no role either: express a meaningful break through the document structure (headings, sections).\n\n```html\n<!-- INCORRECT -->\n<mds-separator role=\"separator\" aria-orientation=\"horizontal\"></mds-separator>\n\n<!-- CORRECT - decorative divider (no ARIA needed) -->\n<mds-separator></mds-separator>\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-separator-background",
          "annotation": "prop",
          "docs": "Background color of the separator element.",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-price-table-list"
      ],
      "dependencies": [],
      "dependencyGraph": {
        "mds-price-table-list": [
          "mds-separator"
        ]
      },
      "storybook": "ui-separator--docs"
    },
    {
      "filePath": "src/components/mds-spinner/mds-spinner.tsx",
      "encapsulation": "shadow",
      "tag": "mds-spinner",
      "readme": "# mds-spinner\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "feedback"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-spinner>` web component is the Magma Design System's loading/await indicator: a self-contained, animated SVG spinner used standalone or embedded inside host components (`mds-button`, `mds-input`, `mds-entity`) to signal an in-progress, indeterminate operation. It has no HTML primitive equivalent and exposes no text content.\n\n#### Semantic Behavior\n\n- **Visibility is gated by `running`**: When `running` is absent/false the spinner is hidden and its animation is paused; setting `running` reveals it and starts the animation. The animation never runs while hidden, for performance.\n- **No interactivity or accessibility role**: It is decorative - not focusable, emits no events, has no ARIA role, and is not form-associated. Any loading semantics (e.g. `aria-busy`) must be set by the surrounding context.\n- **Reduced-motion and contrast aware**: The animation slows down (8s per turn, it never stops) when the Magma animation preference reduces motion (`pref-animation-reduce`, `mds-pref-animation`, or the OS `prefers-reduced-motion` under `system`), and the color is strengthened under the contrast preference, without consumer intervention.\n\n#### Properties & Visual Configurations\n\nThe component exposes a single behavioral prop:\n\n- **`running`** is the master switch that both shows the spinner and runs its animation; treat it as a boolean presence attribute and drive it from the consuming component's loading/await state rather than toggling visibility manually.\n\n#### Other behavioral props\n\n- **`--mds-spinner-duration`** (CSS custom property, default `0.725s`) tunes the rotation speed of the spin animation; override it on the host to slow down or speed up the indicator without touching markup.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-spinner>` 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 Spinner\n\nA spinner shows and animates while `running` is set.\n\n```html\n<mds-spinner running></mds-spinner>\n```\n\nWithout `running` the component is invisible and its animation paused. Render it into the DOM early and set `running` when a request starts; removing the attribute (or setting the prop to `undefined`) hides it again when done.\n\n```html\n<!-- Rendered early, hidden until a request starts -->\n<mds-spinner></mds-spinner>\n```\n\n#### Inline Loading Indicator\n\nPlace the spinner next to a label to signal that a section is loading. The spinner is painted in the accent color (`--magma-accent-fg`) by default; set `color` on the host to match the surrounding text instead.\n\n```html\n<div class=\"loading-row\">\n  <mds-spinner running></mds-spinner>\n  <span>Caricamento dati in corso...</span>\n</div>\n```\n\n#### Full-Page or Overlay Loading State\n\nCentre the spinner over a region with a wrapper. Drive `running` programmatically - set it when the async operation starts, remove it when done.\n\n```html\n<div class=\"overlay\">\n  <mds-spinner running></mds-spinner>\n</div>\n```\n\n```css\n.overlay {\n  align-items: center;\n  display: flex;\n  inset: 0;\n  justify-content: center;\n  position: absolute;\n}\n```\n\n#### Inside `mds-button` (via `await`)\n\n`mds-button` manages its own internal `<mds-spinner>` automatically through its `await` prop. Do not add a separate `<mds-spinner>` next to a button - use `await` on the button itself.\n\n```html\n<!-- While an async operation is in flight -->\n<mds-button label=\"Salvataggio in corso...\" await variant=\"primary\" tone=\"strong\"></mds-button>\n```\n\n#### Controlling Animation Speed\n\nUse the `--mds-spinner-duration` CSS custom property to tune the rotation speed. Set it on the host element - shorter values spin faster, longer values spin slower. Reduced motion still slows the spinner down to 8s per turn, whatever this property says.\n\n```css\n.fast-indicator mds-spinner {\n  --mds-spinner-duration: 0.4s;\n}\n\n.slow-indicator mds-spinner {\n  --mds-spinner-duration: 1.5s;\n}\n```\n\n#### Accessible Loading Region\n\n`<mds-spinner>` is purely decorative and carries no ARIA role. Announce the loading state to screen readers by adding `aria-busy` and `aria-live` on the surrounding container, not on the spinner itself.\n\n```html\n<section aria-busy=\"true\" aria-live=\"polite\" aria-label=\"Ricerca in corso\">\n  <mds-spinner running></mds-spinner>\n</section>\n```\n\n#### Colour Customization via CSS Color\n\nThe spinner stroke inherits `color` from the host, so you can recolour it without touching shadow internals. Use a semantic colour role so dark mode and high-contrast modes keep working.\n\n```css\n.status-warning-spinner mds-spinner {\n  color: rgb(var(--magma-warning-text-default));\n}\n```\n\n```html\n<div class=\"status-warning-spinner\">\n  <mds-spinner running></mds-spinner>\n</div>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-spinner>`. 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 Set `running=\"false\"` to Hide the Spinner\n\nThe component's styles key on the presence of `running` (`:host([running])`). Stencil reads `\"false\"` as `false` and, since `running` is reflected, removes the attribute at the first render, so this happens to work; but the markup says the opposite of what it does, and on a prop that is not reflected the attribute stays in the DOM, where `[attr]` selectors still match it. Remove the attribute entirely - or set the prop to `undefined` - to stop and hide the spinner.\n\n```html\n<!-- INCORRECT -->\n<mds-spinner running=\"false\"></mds-spinner>\n\n<!-- CORRECT -->\n<mds-spinner></mds-spinner>\n```\n\n#### Do Not Show Spinner Without `running` and Expect It to Animate\n\nThe spinner renders as invisible (`opacity: 0`, `transform: scale(0)`) and with the animation paused when `running` is absent. Toggling CSS visibility or opacity from outside will not start the animation - you must set the `running` attribute.\n\n```html\n<!-- INCORRECT -->\n<mds-spinner style=\"opacity: 1; transform: none;\"></mds-spinner>\n\n<!-- CORRECT -->\n<mds-spinner running></mds-spinner>\n```\n\n#### Do Not Add ARIA Roles or Labels to the Spinner Itself\n\nThe spinner is decorative - it has no semantic content and must not become a labelled landmark or a status region. Screen readers should be informed of loading state through a parent container with `aria-busy` / `aria-live`, not through attributes placed on `<mds-spinner>`.\n\n```html\n<!-- INCORRECT -->\n<mds-spinner running role=\"status\" aria-label=\"Caricamento\"></mds-spinner>\n\n<!-- CORRECT -->\n<div role=\"status\" aria-live=\"polite\" aria-label=\"Caricamento\">\n  <mds-spinner running></mds-spinner>\n</div>\n```\n\n#### Do Not Add a Separate Spinner Alongside `mds-button`\n\n`mds-button` controls its own internal `<mds-spinner>` through the `await` prop. An extra spinner next to the button leaves the button clickable while the operation runs; `await` shows the button's own spinner and blocks interaction.\n\n```html\n<!-- INCORRECT -->\n<mds-button label=\"Salva\" variant=\"primary\"></mds-button>\n<mds-spinner running></mds-spinner>\n\n<!-- CORRECT -->\n<mds-button label=\"Salva\" await variant=\"primary\"></mds-button>\n```\n\n#### Do Not Pierce Shadow DOM to Change the SVG Colour\n\nThe only documented customization surface is the `color` CSS property on the host (inherited by the internal stroke) and the `--mds-spinner-duration` CSS custom property. Targeting internals via `>>>` or undocumented selectors couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-spinner >>> .await-icon svg {\n  stroke: red;\n}\n\n/* CORRECT */\nmds-spinner {\n  color: rgb(var(--magma-danger-text-default));\n}\n```\n\n#### Do Not Override `--mds-spinner-duration` to Pause or Stop the Animation\n\nSetting an extremely long or `infinite` duration is not a supported way to pause the spinner. Use the `running` attribute to start and stop the animation - the component manages animation-play-state itself.\n\n```css\n/* INCORRECT */\nmds-spinner {\n  --mds-spinner-duration: 9999s;\n}\n```\n\n```html\n<!-- CORRECT - remove the attribute to stop -->\n<mds-spinner></mds-spinner>\n```\n"
      },
      "props": [
        {
          "name": "running",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "running",
          "reflectToAttr": true,
          "docs": "Specifies if the animation is running or not, it's required for performance reasons",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-spinner-duration",
          "annotation": "prop",
          "docs": "Duration of the spinner animation.",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-button",
        "mds-entity",
        "mds-input"
      ],
      "dependencies": [],
      "dependencyGraph": {
        "mds-button": [
          "mds-spinner"
        ],
        "mds-entity": [
          "mds-spinner"
        ],
        "mds-input": [
          "mds-spinner"
        ]
      },
      "storybook": "ui-spinner--docs"
    },
    {
      "filePath": "src/components/mds-status-bar/mds-status-bar.tsx",
      "encapsulation": "shadow",
      "tag": "mds-status-bar",
      "readme": "# mds-status-bar\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "part",
          "text": "actions - Selects the `actions` container element wrapped in shadowDOM."
        },
        {
          "name": "part",
          "text": "status-bar - Selects the `status-bar` window component wrapped in shadowDOM."
        },
        {
          "name": "part",
          "text": "status-bar-area - Selects the `status-bar-area` which wraps `status-bar` element with darker area in shadowDOM."
        },
        {
          "name": "category",
          "text": "actions"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-status-bar>` web component is a persistent action bar of the Magma Design System that docks a small set of actions (typically `mds-button` elements) to an edge of the viewport, accompanied by an optional descriptive label. It is built on top of `<mds-modal>`, reusing its positioning and overflow handling without rendering a dismissable dialog.\n\n#### Semantic Behavior\n\n- **Floating surface**: The bar floats over content without a blocking overlay.\n- **Visibility control**: The bar shows only while `visible` is truthy; the exposed `hide()` method resets it to hidden.\n- **Overflow delegation**: The `overflow` prop governs whether body scrolling is locked while the bar is shown.\n- **Default slot is actions**: The default slot is intended for interactive content (recommended: `mds-button`), placed next to the optional description text.\n- **Reserves its room**: while the bar is visible, the styles of Magma (`base.css`) end the page above it and keep a field reached with Tab above it (WCAG 2.4.11): the room of its tallest content (one line of description, at most three actions) plus `rhythm/between-fields`, with no script that measures it. A page that scrolls in a box of its own puts `var(--magma-status-bar-room, 0px)` at the end of that box.\n- **Its actions keep the rhythm of a row**: `rhythm/inline` apart; on a window of 480px or less, where the bar takes the whole width, they stack under `--magma-container-actions` of the bar (380px), each at the full width, the main action at the bottom (`actions/stacked`).\n\n#### Properties & Visual Configurations\n\n- **`position`** anchors the bar to the bottom of the viewport, choosing the horizontal alignment: `'bottom-left'`, `'bottom'` (centered), or `'bottom-right'` (default).\n- **`description`** renders an optional caption beside the slotted actions; omit it when the actions are self-explanatory.\n\n#### Other behavioral props\n\n- **`overflow`** selects how page scrolling is treated while the bar is visible: `'manual'` (default) leaves the body scrollable, `'auto'` locks scroll.\n- **`visible`** can be toggled either declaratively via the attribute or imperatively via `hide()`.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-status-bar>` 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#### The Edit of a Page\n\nThe canonical form: when a form is the whole page, its row of actions docks in the bar for the whole edit (`surfaces/edit-actions`), Annulla `dark outline` and Salva `primary strong` last (`actions/order`). Show the bar by setting `visible`; it docks to the bottom-right corner of the viewport by default, and the page keeps its room. Inside the `<form>`, Salva submits it and Annulla resets it.\n\n```html\n<main class=\"page-frame\">\n  <form class=\"max-w-form grid gap-between-fields\">\n    <mds-input-field label=\"Oggetto\"><mds-input value=\"Rinnovo concessione suolo pubblico\"></mds-input></mds-input-field>\n    <mds-input-field label=\"Note per l'ufficio\"><mds-input type=\"textarea\"></mds-input></mds-input-field>\n\n    <mds-status-bar visible description=\"Modifiche non salvate\">\n      <mds-button type=\"reset\" variant=\"dark\" tone=\"outline\">Annulla</mds-button>\n      <mds-button>Salva</mds-button>\n    </mds-status-bar>\n  </form>\n</main>\n```\n\n#### Showing a Contextual Description\n\nUse `description` to render an optional caption beside the slotted actions when the context is not obvious from the buttons alone.\n\n```html\n<mds-status-bar visible description=\"Stai modificando 4 elementi\">\n  <mds-button variant=\"dark\" tone=\"outline\">Annulla</mds-button>\n  <mds-button variant=\"primary\" tone=\"strong\">Salva</mds-button>\n</mds-status-bar>\n```\n\n#### Controlling Position\n\nUse the `position` prop to anchor the bar to the bottom-left or to the bottom-center of the viewport. The default is `'bottom-right'`.\n\n```html\n<!-- Bottom-left -->\n<mds-status-bar visible position=\"bottom-left\" description=\"Selezione attiva\">\n  <mds-button variant=\"error\" tone=\"outline\">Elimina selezionati</mds-button>\n</mds-status-bar>\n\n<!-- Centered bottom -->\n<mds-status-bar visible position=\"bottom\" description=\"Azione in corso\">\n  <mds-button variant=\"primary\" tone=\"strong\">Applica</mds-button>\n</mds-status-bar>\n```\n\n#### Programmatic Show / Hide\n\nToggle the bar imperatively: set `visible = true` to show it and call `hide()` to dismiss it (`visible = false` works too: the component normalizes it to `undefined`). In markup remove the attribute, never write `visible=\"false\"`.\n\n```html\n<mds-button id=\"edit-trigger\">Modifica elementi</mds-button>\n\n<mds-status-bar id=\"bar\" description=\"Stai modificando la selezione\">\n  <mds-button id=\"cancel\" variant=\"dark\" tone=\"outline\">Annulla</mds-button>\n  <mds-button id=\"save\" variant=\"primary\" tone=\"strong\">Salva modifiche</mds-button>\n</mds-status-bar>\n\n<script>\n  const bar = document.getElementById('bar');\n  document.getElementById('edit-trigger').addEventListener('click', () => {\n    bar.visible = true;\n  });\n  document.getElementById('cancel').addEventListener('click', () => {\n    bar.hide();\n  });\n</script>\n```\n\n#### Async Confirm Flow\n\nShow an in-flight state on the confirm button using `await`, then call `hide()` when the operation completes. The cancel button should be disabled while the request is in progress.\n\n```html\n<mds-status-bar id=\"bar\" visible description=\"Stai modificando 3 elementi\">\n  <mds-button id=\"cancel\" variant=\"dark\" tone=\"outline\">Annulla</mds-button>\n  <mds-button id=\"confirm\" variant=\"primary\" tone=\"strong\">Conferma</mds-button>\n</mds-status-bar>\n\n<script>\n  const bar = document.getElementById('bar');\n  const cancel = document.getElementById('cancel');\n  const confirm = document.getElementById('confirm');\n\n  confirm.addEventListener('click', async () => {\n    cancel.disabled = true;\n    confirm.await = true;\n    confirm.label = 'Salvataggio in corso...';\n    await saveChanges();\n    bar.hide();\n  });\n</script>\n```\n\n#### Locking Body Scroll\n\nSet `overflow=\"auto\"` to prevent the page from scrolling while the status bar is open. The default `'manual'` leaves the body scrollable.\n\n```html\n<mds-status-bar visible overflow=\"auto\" description=\"Salvataggio in corso\">\n  <mds-button variant=\"dark\" tone=\"outline\">Annulla</mds-button>\n  <mds-button variant=\"primary\" tone=\"strong\" await>Salva</mds-button>\n</mds-status-bar>\n```\n\n#### Styling Customization\n\nCustomize the bar only through its public `--mds-status-bar-*` CSS custom properties and the exposed `::part()` names (`status-bar`, `status-bar-area`, `actions`); the backdrop behind the bar is set by the component. Use semantic color roles via `rgb(var(--magma-<role>))` so dark mode keeps working.\n\n```css\nmds-status-bar {\n  --mds-status-bar-max-width: 700px;\n}\n\nmds-status-bar::part(status-bar) {\n  border: 1px solid rgb(var(--magma-border-default));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-status-bar>`. 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 Set `visible=\"false\"` to Hide the Bar\n\n`visible` is a boolean prop. `visible=\"false\"` leaves a `visible` attribute on the element that contradicts the hidden state, so attribute selectors and checks still read the bar as visible. Remove the attribute or call the `hide()` method instead.\n\n```html\n<!-- INCORRECT -->\n<mds-status-bar visible=\"false\">\n  <mds-button variant=\"primary\" tone=\"strong\">Salva</mds-button>\n</mds-status-bar>\n\n<!-- CORRECT - remove the attribute -->\n<mds-status-bar>\n  <mds-button variant=\"primary\" tone=\"strong\">Salva</mds-button>\n</mds-status-bar>\n\n<!-- CORRECT - or call the method -->\n<script>\n  document.querySelector('mds-status-bar').hide();\n</script>\n```\n\n#### Do Not Put Plain Text in the Default Slot\n\nThe default slot is intended for interactive content (recommended: `mds-button`). Bare text nodes render but receive no layout treatment and produce inaccessible output. Use the `description` prop for contextual text.\n\n```html\n<!-- INCORRECT -->\n<mds-status-bar visible>\n  Stai modificando 4 elementi\n  <mds-button variant=\"primary\" tone=\"strong\">Salva</mds-button>\n</mds-status-bar>\n\n<!-- CORRECT -->\n<mds-status-bar visible description=\"Stai modificando 4 elementi\">\n  <mds-button variant=\"primary\" tone=\"strong\">Salva</mds-button>\n</mds-status-bar>\n```\n\n#### Do Not Use an Undocumented `position` Value\n\n`position` accepts only `'bottom'`, `'bottom-left'`, or `'bottom-right'`. An undocumented value (e.g. `top`, `center`) is passed unchecked to the inner `<mds-modal>`, which moves the window there, while the bar's styling and slide-in animation assume the bottom edge.\n\n```html\n<!-- INCORRECT -->\n<mds-status-bar visible position=\"top\">\n  <mds-button variant=\"primary\" tone=\"strong\">Conferma</mds-button>\n</mds-status-bar>\n\n<!-- CORRECT -->\n<mds-status-bar visible position=\"bottom-left\">\n  <mds-button variant=\"primary\" tone=\"strong\">Conferma</mds-button>\n</mds-status-bar>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internals\n\n`::part()` is supported only for the three documented parts: `status-bar`, `status-bar-area`, and `actions`. Using undocumented internal selectors or `>>>` couples your styles to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-status-bar::part(description) {\n  font-size: 14px;\n}\nmds-status-bar >>> .status-bar {\n  background: white;\n}\n\n/* CORRECT */\nmds-status-bar {\n  --mds-status-bar-max-width: 640px;\n}\nmds-status-bar::part(status-bar) {\n  border: 1px solid rgb(var(--magma-border-default));\n}\n```\n\n#### Do Not Slot `<mds-icon>` or Raw HTML for the Description\n\n`description` is a prop. Slotting an `<mds-text>` or `<span>` into the default slot to mimic a description clutters the actions area and will compete with the layout of the slotted buttons.\n\n```html\n<!-- INCORRECT -->\n<mds-status-bar visible>\n  <mds-text typography=\"caption\">Modifica in corso</mds-text>\n  <mds-button variant=\"primary\" tone=\"strong\">Salva</mds-button>\n</mds-status-bar>\n\n<!-- CORRECT -->\n<mds-status-bar visible description=\"Modifica in corso\">\n  <mds-button variant=\"primary\" tone=\"strong\">Salva</mds-button>\n</mds-status-bar>\n```\n\n#### Do Not Slot Non-Interactive Content as the Only Child\n\nThe default slot is designed for action controls. Placing only decorative or static elements (icons, images, plain text) provides no user action and wastes the status-bar pattern. Use `mds-banner` or `mds-note` for passive status messages.\n\n```html\n<!-- INCORRECT -->\n<mds-status-bar visible description=\"Operazione completata\">\n  <mds-icon name=\"mi/baseline/check-circle\"></mds-icon>\n</mds-status-bar>\n\n<!-- CORRECT - use mds-banner for passive messages -->\n<mds-banner variant=\"success\" tone=\"weak\" headline=\"Operazione completata\"></mds-banner>\n\n<!-- CORRECT - or combine icon-button with a real action -->\n<mds-status-bar visible description=\"Operazione completata\">\n  <mds-button\n    icon=\"mi/baseline/check-circle\"\n    variant=\"success\"\n    tone=\"strong\"\n    aria-label=\"Chiudi notifica\"\n  ></mds-button>\n</mds-status-bar>\n```\n"
      },
      "props": [
        {
          "name": "description",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "description",
          "reflectToAttr": true,
          "docs": "Specifies the description near the slotted actions",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "overflow",
          "type": "\"auto\" | \"manual\"",
          "complexType": {
            "original": "ModalOverflowType",
            "resolved": "\"auto\" | \"manual\"",
            "references": {
              "ModalOverflowType": {
                "location": "import",
                "path": "src/components",
                "id": "src/components.d.ts::ModalOverflowType",
                "referenceLocation": "ModalOverflowType"
              }
            }
          },
          "mutable": false,
          "attr": "overflow",
          "reflectToAttr": true,
          "docs": "Specifies if the component prevents the body from scrolling when modal window is opened",
          "docsTags": [
            {
              "name": "default",
              "text": "'manual'"
            }
          ],
          "default": "'manual'",
          "values": [
            {
              "value": "auto",
              "type": "string"
            },
            {
              "value": "manual",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "position",
          "type": "\"bottom\" | \"bottom-left\" | \"bottom-right\"",
          "complexType": {
            "original": "StatusBarPositionType",
            "resolved": "\"bottom\" | \"bottom-left\" | \"bottom-right\"",
            "references": {
              "StatusBarPositionType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-status-bar/meta/types.ts::StatusBarPositionType",
                "referenceLocation": "StatusBarPositionType"
              }
            }
          },
          "mutable": false,
          "attr": "position",
          "reflectToAttr": true,
          "docs": "Specifies the position of the status bar",
          "docsTags": [
            {
              "name": "default",
              "text": "'bottom-right'"
            }
          ],
          "default": "'bottom-right'",
          "values": [
            {
              "value": "bottom",
              "type": "string"
            },
            {
              "value": "bottom-left",
              "type": "string"
            },
            {
              "value": "bottom-right",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "visible",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "visible",
          "reflectToAttr": true,
          "docs": "Specifies if the component is visible",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "hide",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "hide() => Promise<void>",
          "parameters": [],
          "docs": "Hides the status bar.",
          "docsTags": []
        }
      ],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-status-bar-backdrop",
          "annotation": "prop",
          "docs": "Background color of the status bar backdrop.",
          "visibility": "internal"
        },
        {
          "name": "--mds-status-bar-backdrop-filter",
          "annotation": "prop",
          "docs": "Filter applied to the status bar backdrop.",
          "visibility": "internal"
        },
        {
          "name": "--mds-status-bar-max-width",
          "annotation": "prop",
          "docs": "Maximum width of the status bar.",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        }
      ],
      "parts": [
        {
          "name": "actions",
          "docs": "Selects the `actions` container element wrapped in shadowDOM."
        },
        {
          "name": "status-bar",
          "docs": "Selects the `status-bar` window component wrapped in shadowDOM."
        },
        {
          "name": "status-bar-area",
          "docs": "Selects the `status-bar-area` which wraps `status-bar` element with darker area in shadowDOM."
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-modal",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-status-bar": [
          "mds-modal",
          "mds-text"
        ],
        "mds-modal": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-status-bar--docs"
    },
    {
      "filePath": "src/components/mds-stepper-bar/mds-stepper-bar.tsx",
      "encapsulation": "shadow",
      "tag": "mds-stepper-bar",
      "readme": "# mds-stepper-bar\n\n\n\nThis 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.\n",
      "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 `mds-stepper-bar-item` element/s."
        },
        {
          "name": "slot",
          "text": "content - Add `HTML elements` or `components`, one per mds-stepper-bar-item added"
        },
        {
          "name": "part",
          "text": "items - Selects the `items` container element wrapped in shadowDOM."
        },
        {
          "name": "part",
          "text": "contents - Selects the `contents` container element wrapped in shadowDOM."
        },
        {
          "name": "category",
          "text": "navigation"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-stepper-bar>` web component is the Magma Design System container that orchestrates a multi-step progress flow, coordinating a set of slotted `<mds-stepper-bar-item>` children and revealing the matching content panel for the active step. It has no native HTML equivalent; it composes a stepper indicator track with a switchable content region.\n\n#### Semantic Behavior\n\n- **Compound parent**: It is the controlling parent of `<mds-stepper-bar-item>` children placed in the default slot, driving every child's `done`/`current` state - children do not manage their own progression.\n- **Active step derivation**: From `itemsDone` it marks all earlier items as `done`, the item at the current index as `current`, and clears the rest; the active step is `itemsDone - 1`.\n- **Content synchronization**: Each `slot=\"content\"` element is paired by position to a stepper item; only the panel matching the current index is shown. The other panels get the `hidden` attribute, so no style of the page is needed (a `display` the page sets on a panel overrides it). The panels are the direct children with `slot=\"content\"`, read again at every step and whenever the slot changes: a panel that a framework renders, replaces or removes after the load (conditional rendering, a keyed list) takes the state of its step at once.\n- **Child requests, page decides**: A step that is done emits `mdsStepperBarItemDone` when the user activates it; the bar does not move by itself, progress is driven by `itemsDone` only. To let the user go back, listen for the event and set `itemsDone` to the index of that item plus one.\n- **Auto-scroll**: When a step becomes current the indicator track scrolls horizontally to center the active item.\n- **Change event**: It emits `mdsStepperBarChange` when it loads and whenever `itemsDone` changes, with a detail of the active `step` index and a comma-joined `value` string collected from the completed items.\n\n#### Properties & Visual Configurations\n\n- **`itemsDone`** is the controlled entry point for progress: `0` means no step completed, `1` activates the first step, and `last + 1` marks the whole flow complete. Treat it as the single source of truth for which step is current rather than mutating children directly.\n\n#### Other behavioral props\n\n- **`navigation`** selects how the indicator track is traversed: `'none'` (default) keeps the track static, while `'scrollbar'` exposes a horizontal scrollbar (styleable through the `--mds-stepper-bar-scrollbar-*` custom properties) for flows with many steps.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-stepper-bar>` 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#### Minimal Stepper with Step Labels\n\nThe canonical form. Place `<mds-stepper-bar-item>` elements in the default slot, one per step. Every item requires `icon` and `label`; `badge` and `step` enable the status badge and step counter visuals. Set `items-done` to control which step is active - `1` activates the first step.\n\n```html\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item\n    badge\n    step\n    icon=\"mi/baseline/person\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Dati account\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    badge\n    step\n    icon=\"mi/baseline/badge\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Dati personali\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    badge\n    step\n    icon=\"mi/baseline/lock-open\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Attivazione\"\n  ></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Advancing Steps Programmatically\n\nDrive progress by updating `items-done` from outside. `itemsDone = 0` leaves all items pending; `itemsDone = N + 1` (where N is the total number of items) marks the whole flow as complete. Do not mutate the children's `done` or `current` attributes directly - only the parent controls those.\n\n```html\n<mds-stepper-bar id=\"reg-stepper\" items-done=\"1\">\n  <mds-stepper-bar-item badge step icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item badge step icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item badge step icon=\"mi/baseline/done\" icon-checked=\"mi/baseline/done\" label=\"Conferma\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n\n<mds-button label=\"Prossimo\" variant=\"primary\" tone=\"strong\" id=\"btn-next\"></mds-button>\n\n<script>\n  let step = 1;\n  document.getElementById('btn-next').addEventListener('click', () => {\n    step += 1;\n    document.getElementById('reg-stepper').setAttribute('items-done', String(step));\n  });\n</script>\n```\n\n#### Listening to the Change Event\n\nReact to step changes via `mdsStepperBarChange`. The event detail carries `step` (zero-based index of the current item) and `value` (comma-joined `value` attributes of all completed items).\n\n```html\n<mds-stepper-bar id=\"wizard\" items-done=\"1\">\n  <mds-stepper-bar-item value=\"account\" badge step icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item value=\"profilo\" badge step icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item value=\"conferma\" badge step icon=\"mi/baseline/done\" icon-checked=\"mi/baseline/done\" label=\"Conferma\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n\n<script>\n  document.getElementById('wizard').addEventListener('mdsStepperBarChange', (e) => {\n    console.log('Step corrente:', e.detail.step);\n    console.log('Passi completati:', e.detail.value); // es. \"account,profilo\"\n  });\n</script>\n```\n\n#### Content Panels Synchronized with Steps\n\nAdd elements with `slot=\"content\"` - one per step in the same order as the items. The component hides all panels except the one matching the active step, with the `hidden` attribute: no style of the page is needed. Nest navigation buttons inside each panel to let users move forward and back.\n\n```html\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item badge step icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item badge step icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n\n  <div slot=\"content\">\n    <mds-text>Inserisci i dati del tuo account.</mds-text>\n    <mds-button\n      label=\"Prossimo\"\n      variant=\"primary\"\n      tone=\"strong\"\n      onclick=\"document.querySelector('mds-stepper-bar').setAttribute('items-done', '2')\"\n    ></mds-button>\n  </div>\n\n  <div slot=\"content\">\n    <mds-text>Completa il tuo profilo.</mds-text>\n    <mds-button\n      label=\"Indietro\"\n      variant=\"dark\"\n      tone=\"outline\"\n      onclick=\"document.querySelector('mds-stepper-bar').setAttribute('items-done', '1')\"\n    ></mds-button>\n    <mds-button\n      label=\"Conferma\"\n      variant=\"primary\"\n      tone=\"strong\"\n      onclick=\"document.querySelector('mds-stepper-bar').setAttribute('items-done', '3')\"\n    ></mds-button>\n  </div>\n</mds-stepper-bar>\n```\n\n#### Scrollbar Navigation for Long Flows\n\nFor flows with many steps, set `navigation=\"scrollbar\"` to expose a styled horizontal scrollbar under the indicator track. The active item scrolls into view automatically; the scrollbar appearance is configurable through the `--mds-stepper-bar-scrollbar-*` custom properties.\n\n```html\n<mds-stepper-bar items-done=\"1\" navigation=\"scrollbar\">\n  <mds-stepper-bar-item badge step icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item badge step icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Dati personali\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item badge step icon=\"mi/round/email\" icon-checked=\"mi/baseline/done\" label=\"Newsletter\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item badge step icon=\"mi/baseline/lock-open\" icon-checked=\"mi/baseline/done\" label=\"Attivazione\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item badge step icon=\"mi/baseline/login\" icon-checked=\"mi/baseline/done\" label=\"Accedi\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item badge step icon=\"mi/baseline/done\" icon-checked=\"mi/baseline/done\" label=\"Completato\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Offset Margin inside a Padded Container\n\nWhen the stepper bar lives inside a padded card or panel, use `--mds-stepper-bar-offset-margin` to let the indicator track bleed into the padding without altering the outer container's spacing.\n\n```css\n.wizard-card mds-stepper-bar {\n  --mds-stepper-bar-offset-margin: 24px;\n}\n```\n\n```html\n<div class=\"wizard-card\" style=\"padding: 24px;\">\n  <mds-stepper-bar items-done=\"2\">\n    <mds-stepper-bar-item badge step icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n    <mds-stepper-bar-item badge step icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n    <mds-stepper-bar-item badge step icon=\"mi/baseline/done\" icon-checked=\"mi/baseline/done\" label=\"Conferma\"></mds-stepper-bar-item>\n  </mds-stepper-bar>\n</div>\n```\n\n#### Styling the Gap\n\nSet the item spacing through the public `--mds-stepper-bar-*` CSS custom properties; the scrollbar of the indicator track is styled by the component. Use semantic color roles via `rgb(var(--magma-<role>))` for any colour you set, so dark mode and high-contrast keep working.\n\n```css\nmds-stepper-bar {\n  --mds-stepper-bar-gap: calc(var(--spacing) * 700);\n}\n```\n\n#### Targeting Shadow Parts for Deep Customization\n\nThe two documented shadow parts - `items` (the indicator track wrapper) and `contents` (the content panel wrapper) - let you apply layout overrides that CSS custom properties cannot express. Limit `::part()` use to structural needs only; prefer the `--mds-stepper-bar-*` properties for everything else.\n\n```css\nmds-stepper-bar::part(items) {\n  padding-block: calc(var(--spacing) * 400);\n  border-bottom: 1px solid rgb(var(--magma-border-muted));\n}\n\nmds-stepper-bar::part(contents) {\n  padding-block: calc(var(--spacing) * 600);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-stepper-bar>`. 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 Mutate Child State Directly\n\n`done` and `current` on `<mds-stepper-bar-item>` are managed exclusively by the parent; writing them from outside bypasses the synchronization logic and breaks content panel visibility, scroll centering, and the `mdsStepperBarChange` event. Drive progress through `items-done` on the parent instead.\n\n```html\n<!-- INCORRECT -->\n<mds-stepper-bar>\n  <mds-stepper-bar-item done icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item current icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n\n<!-- CORRECT -->\n<mds-stepper-bar items-done=\"2\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Do Not Listen for Native `change` Events\n\n`<mds-stepper-bar>` emits `mdsStepperBarChange` - not a native `change` event. Native DOM events do not bubble out of shadow DOM reliably, so listening for `change` will silently never fire.\n\n```html\n<!-- INCORRECT -->\n<mds-stepper-bar id=\"stepper\" items-done=\"1\">...</mds-stepper-bar>\n<script>\n  document.getElementById('stepper').addEventListener('change', handler);\n</script>\n\n<!-- CORRECT -->\n<mds-stepper-bar id=\"stepper\" items-done=\"1\">...</mds-stepper-bar>\n<script>\n  document.getElementById('stepper').addEventListener('mdsStepperBarChange', handler);\n</script>\n```\n\n#### Do Not Use `<mds-stepper-bar-item>` Outside `<mds-stepper-bar>`\n\n`<mds-stepper-bar-item>` is a compound child; it relies on the parent to receive its `done`/`current` state. Outside the parent it renders without state management and will not advance any stepper.\n\n```html\n<!-- INCORRECT -->\n<div class=\"custom-steps\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n</div>\n\n<!-- CORRECT -->\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Do Not Wrap Items in Extra Elements\n\nThe indicator track lays out its direct slot children (flex row, `--mds-stepper-bar-gap`, scroll snapping): a wrapper becomes a single item of the track, so the steps lose that layout. Compound children must be direct children of the parent.\n\n```html\n<!-- INCORRECT -->\n<mds-stepper-bar items-done=\"1\">\n  <div class=\"step-group\">\n    <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n    <mds-stepper-bar-item icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n  </div>\n</mds-stepper-bar>\n\n<!-- CORRECT -->\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Do Not Supply Fewer `slot=\"content\"` Panels than Items\n\nThe component pairs panels to items by index position; if a panel is missing for a given index, the content region for that step will be empty with no warning. Always provide exactly one `slot=\"content\"` element per `<mds-stepper-bar-item>`.\n\n```html\n<!-- INCORRECT - three items, only two content panels -->\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/done\" icon-checked=\"mi/baseline/done\" label=\"Conferma\"></mds-stepper-bar-item>\n\n  <div slot=\"content\"><mds-text>Account</mds-text></div>\n  <div slot=\"content\"><mds-text>Profilo</mds-text></div>\n</mds-stepper-bar>\n\n<!-- CORRECT - one panel per item -->\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Account\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/badge\" icon-checked=\"mi/baseline/done\" label=\"Profilo\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/done\" icon-checked=\"mi/baseline/done\" label=\"Conferma\"></mds-stepper-bar-item>\n\n  <div slot=\"content\"><mds-text>Account</mds-text></div>\n  <div slot=\"content\"><mds-text>Profilo</mds-text></div>\n  <div slot=\"content\"><mds-text>Conferma</mds-text></div>\n</mds-stepper-bar>\n```\n\n#### Do Not Set `items-done` as a Boolean\n\n`items-done` is a number, not a flag. Setting it as a bare boolean attribute sends the string `\"\"`, which parses to `NaN`: no step is marked current or done. Always pass a numeric value.\n\n```html\n<!-- INCORRECT -->\n<mds-stepper-bar items-done>...</mds-stepper-bar>\n\n<!-- CORRECT -->\n<mds-stepper-bar items-done=\"1\">...</mds-stepper-bar>\n```\n"
      },
      "props": [
        {
          "name": "itemsDone",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "items-done",
          "reflectToAttr": false,
          "docs": "Sets the current item by its position, counted from 1: the items before it are done. 1 makes\nthe first item current with none done, 0 makes no item current, the number of items + 1 marks\nthem all done",
          "docsTags": [
            {
              "name": "default",
              "text": "1"
            }
          ],
          "default": "1",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "navigation",
          "type": "\"none\" | \"scrollbar\"",
          "complexType": {
            "original": "StepperBarNavigationType",
            "resolved": "\"none\" | \"scrollbar\"",
            "references": {
              "StepperBarNavigationType": {
                "location": "import",
                "path": "./meta/meta",
                "id": "src/components/mds-stepper-bar/meta/meta.ts::StepperBarNavigationType",
                "referenceLocation": "StepperBarNavigationType"
              }
            }
          },
          "mutable": false,
          "attr": "navigation",
          "reflectToAttr": true,
          "docs": "Specifies the navigation type",
          "docsTags": [
            {
              "name": "default",
              "text": "'none'"
            }
          ],
          "default": "'none'",
          "values": [
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "scrollbar",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsStepperBarChange",
          "detail": "MdsStepperBarEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsStepperBarEventDetail",
            "resolved": "MdsStepperBarEventDetail",
            "references": {
              "MdsStepperBarEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail",
                "referenceLocation": "MdsStepperBarEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a step is changed",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-stepper-bar-gap",
          "annotation": "prop",
          "docs": "Sets the gap between the stepper bar items.",
          "visibility": "public"
        },
        {
          "name": "--mds-stepper-bar-offset-margin",
          "annotation": "prop",
          "docs": "Sets the offset margin of the stepper bar.",
          "visibility": "public"
        },
        {
          "name": "--mds-stepper-bar-scroll-behavior",
          "annotation": "prop",
          "docs": "Sets the scroll behavior of the stepper bar.",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-scrollbar-margin",
          "annotation": "prop",
          "docs": "Sets the margin of the scrollbar.",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-scrollbar-radius",
          "annotation": "prop",
          "docs": "Sets the radius of the scrollbar.",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-scrollbar-size",
          "annotation": "prop",
          "docs": "Sets the size of the scrollbar.",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-scrollbar-thumb-background",
          "annotation": "prop",
          "docs": "Sets the background color of the scrollbar thumb.",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-scrollbar-track-background",
          "annotation": "prop",
          "docs": "Sets the background color of the scrollbar track.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-stepper-bar-item` element/s."
        },
        {
          "name": "content",
          "docs": "Add `HTML elements` or `components`, one per mds-stepper-bar-item added"
        }
      ],
      "parts": [
        {
          "name": "contents",
          "docs": "Selects the `contents` container element wrapped in shadowDOM."
        },
        {
          "name": "items",
          "docs": "Selects the `items` container element wrapped in shadowDOM."
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-stepper-bar--docs"
    },
    {
      "filePath": "src/components/mds-stepper-bar-item/mds-stepper-bar-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-stepper-bar-item",
      "readme": "# mds-stepper-bar-item\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "badge - The badge wrapper"
        },
        {
          "name": "parent",
          "text": "mds-stepper-bar"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-stepper-bar-item>` web component represents a single step inside a [`<mds-stepper-bar>`](../mds-stepper-bar/AGENTS.md) progress indicator, rendering the step's icon, optional ordinal label, descriptive text and status badge. It has no standalone meaning: it is the unit the parent stepper orchestrates to express a sequential, multi-step flow.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct default-slot child of `<mds-stepper-bar>`; it is not used standalone or mixed with other child types in that slot.\n- **State driven by the parent**: The `done` and `current` props are not set per item by the consumer - the parent's `itemsDone` prop drives `done`/`current` on each child, so an item's visual state is a function of its position relative to the active step.\n- **Index resolution**: The item computes its own ordinal from its position among the parent's children; this index feeds the localized \"step N\" caption rendered when `step` is enabled (\"Step 2\" in English, \"Passo 2\" in Italian), or the `{{ index }}` of the caption the page writes in `step-label`.\n- **Three-way status badge**: When `badge` is true the item renders a status badge whose variant and localized text reflect the resolved state - `success`/done, `info`/current, or `dark`/queued.\n- **Icon swap on completion**: The displayed icon switches from `icon` to `iconChecked` once the item is done and no longer current.\n- **Going back**: A step that is done (and not current) is a button in the tab order: a click or Enter emits `mdsStepperBarItemDone` with its `{ value }`. It asks, it does not move: the page goes back by setting `itemsDone` on the bar. The current and the following steps are not interactive.\n- **Localization**: Step, badge and status strings are localized (el/en/es/it); `step-label` replaces the step caption in any other language.\n\n#### Properties & Visual Configurations\n\nMost state props are managed by the parent rather than the consumer. The props worth configuring directly on each item are:\n\n- **`icon` / `iconChecked`**: Set `icon` for the default and current appearance; set `iconChecked` only when the completed step should show a different glyph (it defaults to `icon`).\n- **`step`**: Enable to surface the auto-numbered \"step N\" caption above the label - use it for explicitly ordered flows where the number aids orientation.\n- **`step-label`**: The text of that caption, when the page needs another word or a language the component has no texts for: `{{ index }}` in it becomes the position of the step (`step-label=\"Fase {{ index }}\"` gives \"Fase 1\", \"Fase 2\"), a text without it is shown as it is. `step` still decides whether the caption is shown.\n- **`badge`**: Enable to show the queued/current/done status pill; prefer it when status legibility matters more than horizontal compactness.\n- **`value`**: The token the parent collects from the completed items into the `value` of its `mdsStepperBarChange` detail (comma-joined); set it so the parent can aggregate which steps have been completed.\n- **`typography`**: Overrides the label's typography token (defaults to `h6`); lower it for denser bars.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-stepper-bar-item>` 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#### Minimal Step Inside a Stepper Bar\n\nPlace `<mds-stepper-bar-item>` elements as direct children of [`<mds-stepper-bar>`](../mds-stepper-bar/AGENTS.md). Each item requires `label` and `icon`. `items-done` on the parent drives the `done` and `current` state of each child automatically.\n\n```html\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item\n    icon=\"mi/baseline/person\"\n    label=\"Dati personali\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    icon=\"mi/baseline/location-on\"\n    label=\"Indirizzo\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    icon=\"mi/baseline/payment\"\n    label=\"Pagamento\"\n  ></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Distinct Icon for the Completed State\n\nSet `icon-checked` to a different slug when the done state should show a different glyph - for example a checkmark. When omitted, `icon-checked` defaults to `icon`.\n\n```html\n<mds-stepper-bar items-done=\"2\">\n  <mds-stepper-bar-item\n    icon=\"mi/baseline/person\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Dati personali\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    icon=\"mi/baseline/location-on\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Indirizzo\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    icon=\"mi/baseline/payment\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Pagamento\"\n  ></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Showing the Ordinal Caption with `step`\n\nSet the boolean `step` attribute to surface an auto-numbered \"Step N\" caption above the label. Use this for explicitly ordered flows where the ordinal number aids orientation.\n\n```html\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item\n    step\n    icon=\"mi/baseline/person\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Dati personali\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    step\n    icon=\"mi/baseline/location-on\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Indirizzo\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    step\n    icon=\"mi/baseline/payment\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Pagamento\"\n  ></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Status Badge via `badge`\n\nSet `badge` to show the localized status pill (Completato / In corso / In coda). Prefer this when status legibility matters more than horizontal compactness.\n\n```html\n<mds-stepper-bar items-done=\"2\">\n  <mds-stepper-bar-item\n    badge\n    icon=\"mi/baseline/person\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Dati personali\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    badge\n    icon=\"mi/baseline/location-on\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Indirizzo\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    badge\n    icon=\"mi/baseline/payment\"\n    label=\"Pagamento\"\n  ></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Carrying a Value for Event Handling\n\nSet `value` on each item: the parent collects the values of the completed items, comma-joined, into the `value` of its `mdsStepperBarChange` detail. Listen to that event on the parent or a common ancestor.\n\n```html\n<mds-stepper-bar id=\"stepper\" items-done=\"1\">\n  <mds-stepper-bar-item\n    value=\"dati-personali\"\n    icon=\"mi/baseline/person\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Dati personali\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    value=\"indirizzo\"\n    icon=\"mi/baseline/location-on\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Indirizzo\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    value=\"pagamento\"\n    icon=\"mi/baseline/payment\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Pagamento\"\n  ></mds-stepper-bar-item>\n</mds-stepper-bar>\n\n<script>\n  document.getElementById('stepper').addEventListener('mdsStepperBarChange', (e) => {\n    console.log('step completati:', e.detail.value, 'step corrente:', e.detail.step);\n  });\n</script>\n```\n\n#### Pairing Step Content via the `content` Slot\n\nPlace panel elements with `slot=\"content\"` inside `<mds-stepper-bar>` - one per item in order. The parent shows only the panel matching the current step (it puts the `hidden` attribute on the others, so no style of the page is needed; a `display` the page sets on a panel overrides it).\n\n```html\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Dati personali\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/location-on\" icon-checked=\"mi/baseline/done\" label=\"Indirizzo\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/payment\" label=\"Pagamento\"></mds-stepper-bar-item>\n\n  <div slot=\"content\">\n    <p>Inserisci il tuo nome e cognome.</p>\n  </div>\n  <div slot=\"content\">\n    <p>Inserisci il tuo indirizzo di spedizione.</p>\n  </div>\n  <div slot=\"content\">\n    <p>Scegli il metodo di pagamento.</p>\n  </div>\n</mds-stepper-bar>\n```\n\n#### Reducing Label Typography for Dense Bars\n\nLower the `typography` prop (default `h6`) when horizontal space is tight or when the label must blend with smaller surrounding text.\n\n```html\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item\n    typography=\"label\"\n    icon=\"mi/baseline/person\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Dati personali\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    typography=\"label\"\n    icon=\"mi/baseline/location-on\"\n    icon-checked=\"mi/baseline/done\"\n    label=\"Indirizzo\"\n  ></mds-stepper-bar-item>\n  <mds-stepper-bar-item\n    typography=\"label\"\n    icon=\"mi/baseline/payment\"\n    label=\"Pagamento\"\n  ></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Styling Customization\n\nStyle items only through the public `--mds-stepper-bar-item-*` CSS custom properties: the text colour and the minimum width. The minimum width applies to every item but the last: the last one draws no bar after its icon, so it takes the width of its texts and the bars of the others fill the rest of the row. The icon and progress colours follow the state the parent sets (queued, current, done) and are not set by the page. Use semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working. Target the `::part(badge)` surface only when a deep visual override of the badge wrapper is required.\n\n```css\n.checkout-flow mds-stepper-bar-item {\n  --mds-stepper-bar-item-color: rgb(var(--magma-text-muted));\n  --mds-stepper-bar-item-min-width: 160px;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-stepper-bar-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 Outside `<mds-stepper-bar>`\n\n`<mds-stepper-bar-item>` is a compound child - its state (`done`, `current`, index) is resolved by the parent. Using it standalone leaves `isDone`, `isCurrent` and `index` at their defaults and produces broken visual output.\n\n```html\n<!-- INCORRECT -->\n<mds-stepper-bar-item icon=\"mi/baseline/person\" label=\"Dati personali\"></mds-stepper-bar-item>\n\n<!-- CORRECT -->\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Dati personali\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/location-on\" icon-checked=\"mi/baseline/done\" label=\"Indirizzo\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Do Not Set `done=\"false\"` or `current=\"false\"` as Strings\n\n`done` and `current` are boolean props. Stencil reads `\"false\"` as `false` and, since both are reflected, removes the attribute at the first render, so this happens to work; but the markup says the opposite of what it does, and on a prop that is not reflected the attribute stays in the DOM, where `[attr]` selectors still match it. To turn them off, remove the attribute or let the parent manage state via `items-done`.\n\n```html\n<!-- INCORRECT -->\n<mds-stepper-bar-item done=\"false\" current=\"false\" icon=\"mi/baseline/payment\" label=\"Pagamento\"></mds-stepper-bar-item>\n\n<!-- CORRECT -->\n<mds-stepper-bar-item icon=\"mi/baseline/payment\" label=\"Pagamento\"></mds-stepper-bar-item>\n```\n\n#### Do Not Override State Manually When the Parent Manages It\n\n`done` and `current` are driven by `<mds-stepper-bar>`'s `items-done` prop. Setting them on individual items and also setting `items-done` creates conflicting state that the parent overwrites when it loads and whenever `items-done` changes.\n\n```html\n<!-- INCORRECT -->\n<mds-stepper-bar items-done=\"2\">\n  <mds-stepper-bar-item done current icon=\"mi/baseline/person\" label=\"Dati personali\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/location-on\" label=\"Indirizzo\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n\n<!-- CORRECT -->\n<mds-stepper-bar items-done=\"2\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Dati personali\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/location-on\" icon-checked=\"mi/baseline/done\" label=\"Indirizzo\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Do Not Wrap Items in Extra HTML Elements\n\nEach item numbers itself among its own siblings, and the parent's track lays out its direct children: a wrapper `<div>` or `<li>` turns every wrapped item into \"Step 1\" and breaks the track layout and scroll alignment.\n\n```html\n<!-- INCORRECT -->\n<mds-stepper-bar items-done=\"1\">\n  <div>\n    <mds-stepper-bar-item icon=\"mi/baseline/person\" label=\"Dati personali\"></mds-stepper-bar-item>\n  </div>\n  <div>\n    <mds-stepper-bar-item icon=\"mi/baseline/location-on\" label=\"Indirizzo\"></mds-stepper-bar-item>\n  </div>\n</mds-stepper-bar>\n\n<!-- CORRECT -->\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" icon-checked=\"mi/baseline/done\" label=\"Dati personali\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/location-on\" icon-checked=\"mi/baseline/done\" label=\"Indirizzo\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n\n#### Do Not Use Undocumented `::part()` Targets to Style the Icon or Progress\n\nThe only documented shadow part is `badge`. Targeting internals such as `::part(icon)` or `::part(progress)` couples code to the private Shadow DOM structure and will break on minor releases. The icon and the progress line take their colours from the step state; style the item through its public `--mds-stepper-bar-item-*` CSS custom properties instead.\n\n```css\n/* INCORRECT */\nmds-stepper-bar-item::part(icon) {\n  background-color: purple;\n}\nmds-stepper-bar-item::part(progress) {\n  height: 6px;\n}\n\n/* CORRECT */\nmds-stepper-bar-item {\n  --mds-stepper-bar-item-color: rgb(var(--magma-text-default));\n  --mds-stepper-bar-item-min-width: 160px;\n}\n```\n\n#### Do Not Omit `label` or `icon`\n\nBoth are required props. An item without `label` has no accessible or visual description; an item without `icon` leaves the icon area empty and breaks the progress-line layout.\n\n```html\n<!-- INCORRECT -->\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item label=\"Dati personali\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/location-on\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n\n<!-- CORRECT -->\n<mds-stepper-bar items-done=\"1\">\n  <mds-stepper-bar-item icon=\"mi/baseline/person\" label=\"Dati personali\"></mds-stepper-bar-item>\n  <mds-stepper-bar-item icon=\"mi/baseline/location-on\" label=\"Indirizzo\"></mds-stepper-bar-item>\n</mds-stepper-bar>\n```\n"
      },
      "props": [
        {
          "name": "badge",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": true,
          "attr": "badge",
          "reflectToAttr": true,
          "docs": "Specifies if the badge status is displayed",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "current",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": true,
          "attr": "current",
          "reflectToAttr": true,
          "docs": "Specifies if the component is the current or not",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "done",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "done",
          "reflectToAttr": true,
          "docs": "Specifies if the component is checked or not",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "Specifies the icon displayed of the component when is not checked or the current item",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        },
        {
          "name": "iconChecked",
          "type": "string | undefined",
          "complexType": {
            "original": "string | undefined",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon-checked",
          "reflectToAttr": false,
          "docs": "Specifies the icon displayed of the component when is checked",
          "docsTags": [
            {
              "name": "default",
              "text": "this.icon"
            }
          ],
          "default": "this.icon",
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": false,
          "docs": "Specifies a short description of the component",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        },
        {
          "name": "step",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "step",
          "reflectToAttr": false,
          "docs": "Shows the caption of the step above the label: \"Step 1\", \"Passo 1\", in the language of the\npage, or the text of `stepLabel`",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "stepLabel",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "step-label",
          "reflectToAttr": false,
          "docs": "The text of the caption that `step` shows, in place of the one the component writes in the\nlanguage of the page (\"Passo 2\"). `{{ index }}` in it becomes the position of the step, as in\nthe phrases of the component: `\"Fase {{ index }}\"` gives \"Fase 1\", \"Fase 2\"; a text without\nit is shown as it is. For another word, or a language the component has no texts for",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"action\" | \"caption\" | \"detail\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"hack\" | \"label\" | \"option\" | \"paragraph\" | \"snippet\" | \"tip\" | undefined",
          "complexType": {
            "original": "TypographyType",
            "resolved": "\"action\" | \"caption\" | \"detail\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"hack\" | \"label\" | \"option\" | \"paragraph\" | \"snippet\" | \"tip\" | undefined",
            "references": {
              "TypographyType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyType",
                "referenceLocation": "TypographyType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "Specifies the typography of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'h6'"
            }
          ],
          "default": "'h6'",
          "values": [
            {
              "value": "action",
              "type": "string"
            },
            {
              "value": "caption",
              "type": "string"
            },
            {
              "value": "detail",
              "type": "string"
            },
            {
              "value": "h1",
              "type": "string"
            },
            {
              "value": "h2",
              "type": "string"
            },
            {
              "value": "h3",
              "type": "string"
            },
            {
              "value": "h4",
              "type": "string"
            },
            {
              "value": "h5",
              "type": "string"
            },
            {
              "value": "h6",
              "type": "string"
            },
            {
              "value": "hack",
              "type": "string"
            },
            {
              "value": "label",
              "type": "string"
            },
            {
              "value": "option",
              "type": "string"
            },
            {
              "value": "paragraph",
              "type": "string"
            },
            {
              "value": "snippet",
              "type": "string"
            },
            {
              "value": "tip",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "Specifies the value of the step: once the step is done, mds-stepper-bar adds it to the\n`value` of `mdsStepperBarChange`, which joins the values of the done steps with commas",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsStepperBarItemDone",
          "detail": "MdsStepperBarItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsStepperBarItemEventDetail",
            "resolved": "MdsStepperBarItemEventDetail",
            "references": {
              "MdsStepperBarItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-stepper-bar-item/meta/event-detail.ts::MdsStepperBarItemEventDetail",
                "referenceLocation": "MdsStepperBarItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the user activates a step that is done, to go back to it: the page moves the\nstepper bar there through `itemsDone`",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-stepper-bar-item-color",
          "annotation": "prop",
          "docs": "Sets the color of the text",
          "visibility": "public"
        },
        {
          "name": "--mds-stepper-bar-item-duration",
          "annotation": "prop",
          "docs": "Sets the duration of the animation",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-item-icon-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the icon",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-item-icon-background-current",
          "annotation": "prop",
          "docs": "Sets the background-color of the icon when the component is current",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-item-icon-background-done",
          "annotation": "prop",
          "docs": "Sets the background-color of the icon when the component is done",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-item-icon-color",
          "annotation": "prop",
          "docs": "Sets the color of the icon",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-item-icon-color-current",
          "annotation": "prop",
          "docs": "Sets the color of the icon when the component is current",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-item-icon-color-done",
          "annotation": "prop",
          "docs": "Sets the color of the icon when the component is done",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-item-min-width",
          "annotation": "prop",
          "docs": "Sets the minimum width of the component; the last item, which has no bar, takes the width of its texts instead",
          "visibility": "public"
        },
        {
          "name": "--mds-stepper-bar-item-progress-background",
          "annotation": "prop",
          "docs": "Sets the background color of the progress bar",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-item-progress-color",
          "annotation": "prop",
          "docs": "Sets the color of the progress bar",
          "visibility": "internal"
        },
        {
          "name": "--mds-stepper-bar-item-progress-thickness",
          "annotation": "prop",
          "docs": "Sets the thickness of the progress bar",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "badge",
          "docs": "The badge wrapper"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-badge",
        "mds-icon",
        "mds-progress",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-stepper-bar-item": [
          "mds-badge",
          "mds-icon",
          "mds-progress",
          "mds-text"
        ],
        "mds-badge": [
          "mds-text"
        ],
        "mds-progress": [
          "mds-radial-progress"
        ],
        "mds-radial-progress": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "ui-stepper-bar-stepper-bar-item--docs"
    },
    {
      "filePath": "src/components/mds-tab/mds-tab.tsx",
      "encapsulation": "shadow",
      "tag": "mds-tab",
      "readme": "# mds-tab\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "contents - Selects the container of the tabbed contents elements."
        },
        {
          "name": "part",
          "text": "slider - Selects the slider element which is visible when attribute `animation` is set to `slide`."
        },
        {
          "name": "part",
          "text": "tabs - Selects the container of `mds-tab-item` list elements."
        },
        {
          "name": "slot",
          "text": "content - Add `HTML elements` or `components`, one per mds-tab-item added; or none, when the\nitems are links (`href`) to other pages or places and the page, not the component, shows the\ncontent."
        },
        {
          "name": "slot",
          "text": "- Add `mds-tab-item` element/s."
        },
        {
          "name": "category",
          "text": "navigation"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-tab>` web component is the compound container that orchestrates a tabbed navigation in the Magma Design System. It is the parent wrapper around a set of `<mds-tab-item>` triggers and, when the component shows the content itself, their content panels, providing the ARIA `tablist` structure, selection state, scrolling and the animated selection indicator.\n\n#### Semantic Behavior\n\n- **Compound parent**: Expects `<mds-tab-item>` elements in the default slot; each panel in the named `content` slot is wired up automatically and paired by document order; a panel past the last item has no tab to open it, so it stays hidden and the component logs a console warning. The panels are optional: without them the component shows the strip alone, and the page shows the content, driven by `mdsTabChange` or by navigation.\n- **Navigation strip**: When every item has `href`, the items are links (announced as such, the selected one as current) and the strip is no longer a `tablist`: the browser follows the links, in a new tab on a modifier or middle click, and the strip keeps the selected item highlighted. A client-side router cancels the click on the item with `preventDefault()` and routes; a modifier click leaves the selection alone.\n- **Selection ownership**: The active tab is whichever `<mds-tab-item>` carries `selected`; the parent flips `selected` across siblings, shows the corresponding content panel and hides the rest.\n- **Change event**: Emits `mdsTabChange` with the selected item's index (`id`) and `value` whenever the active child changes.\n- **Focus restoration**: After a keyboard activation it re-focuses the selected item's button, so the user does not have to re-locate the tab. An item selected from code (`selected` set by the page) leaves the focus where it is.\n- **Auto-scroll into view**: On selection or child focus, the active tab is scrolled to the center of its strip.\n- **Overflow tracking**: When `overflow` is enabled, left/right inset shadows appear while the tabs overflow their container.\n- **Size propagation**: The parent `size` is pushed down onto every nested `<mds-tab-item>`, so children should not be sized individually.\n\n#### Properties & Visual Configurations\n\n- **`direction`** chooses whether the tab strip is laid out `'horizontal'` (default) or `'vertical'`.\n- **`animation`** governs the transition between active items: `'slide'` (default) renders the moving slider indicator, while `'fade'` cross-fades without the slider. The slider slides only when the selection changes: on load, and when the strip is shown again after being hidden, it is already under the selected tab.\n- **`fill`** makes the tab strip stretch to occupy the full available width rather than hugging its content.\n- **`overflow`** enables the inset-shadow affordance that signals more tabs exist beyond the visible edges; **`scrollbar`** instead exposes the native horizontal scrollbar for accessibility.\n\n#### Other behavioral props\n\n- **`size`** sets the scale (`'sm'` / `'md'`) for the whole group and is forwarded to the child items; it is the only way to size the tabs consistently.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-tab>` 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 Tab Group with Managed Panels\n\nThe canonical form. Put `<mds-tab-item>` elements in the default slot and one content element per tab in the named `content` slot. Mark the initially-visible tab with `selected`. Panels are wired up by document order - the first `[slot=content]` element is paired with the first `<mds-tab-item>`.\n\n```html\n<mds-tab>\n  <mds-tab-item label=\"Panoramica\" selected></mds-tab-item>\n  <mds-tab-item label=\"Dettagli\"></mds-tab-item>\n  <mds-tab-item label=\"Allegati\"></mds-tab-item>\n\n  <div slot=\"content\">\n    <mds-text>Contenuto della scheda Panoramica.</mds-text>\n  </div>\n  <div slot=\"content\">\n    <mds-text>Contenuto della scheda Dettagli.</mds-text>\n  </div>\n  <div slot=\"content\">\n    <mds-text>Contenuto della scheda Allegati.</mds-text>\n  </div>\n</mds-tab>\n```\n\n#### Listening to Tab Changes\n\nListen to the `mdsTabChange` event to react when the active panel changes. The event detail carries the zero-based `id` (index) and the optional `value` of the newly selected `<mds-tab-item>`.\n\n```html\n<mds-tab id=\"schede-pratica\">\n  <mds-tab-item label=\"Anagrafica\" value=\"anagrafica\" selected></mds-tab-item>\n  <mds-tab-item label=\"Documenti\" value=\"documenti\"></mds-tab-item>\n  <mds-tab-item label=\"Pagamenti\" value=\"pagamenti\"></mds-tab-item>\n</mds-tab>\n\n<script>\n  document.querySelector('#schede-pratica').addEventListener('mdsTabChange', (e) => {\n    console.log('scheda attiva:', e.detail.id, e.detail.value);\n  });\n</script>\n```\n\n#### Tab Items with Icons\n\nPass an icon slug to `<mds-tab-item>` via the `icon` prop. Icon position defaults to `left`; use `icon-position=\"right\"` for forward-navigation tabs.\n\n```html\n<mds-tab>\n  <mds-tab-item label=\"Utente\" icon=\"mi/baseline/person\" selected></mds-tab-item>\n  <mds-tab-item label=\"Impostazioni\" icon=\"mi/baseline/settings\"></mds-tab-item>\n  <mds-tab-item label=\"Notifiche\" icon=\"mi/baseline/notifications\"></mds-tab-item>\n\n  <div slot=\"content\"><mds-text>Profilo utente.</mds-text></div>\n  <div slot=\"content\"><mds-text>Impostazioni account.</mds-text></div>\n  <div slot=\"content\"><mds-text>Cronologia notifiche.</mds-text></div>\n</mds-tab>\n```\n\n#### Fill the Available Width\n\nSet `fill` when the tab strip should stretch to occupy the full container width instead of hugging its content.\n\n```html\n<mds-tab fill>\n  <mds-tab-item label=\"Riepilogo\" selected></mds-tab-item>\n  <mds-tab-item label=\"Cronologia\"></mds-tab-item>\n  <mds-tab-item label=\"Statistiche\"></mds-tab-item>\n\n  <div slot=\"content\"><mds-text>Riepilogo pratica.</mds-text></div>\n  <div slot=\"content\"><mds-text>Registro modifiche.</mds-text></div>\n  <div slot=\"content\"><mds-text>Dati statistici.</mds-text></div>\n</mds-tab>\n```\n\n#### Vertical Direction\n\nUse `direction=\"vertical\"` to stack the tab strip on the side. Pair it with `--mds-tab-direction-vertical-columns` to control the column widths of the sidebar and the content area.\n\n```html\n<mds-tab direction=\"vertical\">\n  <mds-tab-item label=\"Dati generali\" selected></mds-tab-item>\n  <mds-tab-item label=\"Indirizzi\"></mds-tab-item>\n  <mds-tab-item label=\"Contatti\"></mds-tab-item>\n\n  <div slot=\"content\"><mds-text>Dati generali.</mds-text></div>\n  <div slot=\"content\"><mds-text>Indirizzi registrati.</mds-text></div>\n  <div slot=\"content\"><mds-text>Recapiti di contatto.</mds-text></div>\n</mds-tab>\n```\n\n#### Fade Animation\n\nSwitch to `animation=\"fade\"` to highlight the selected tab in place instead of moving the slider indicator. The panels switch without animation in both modes.\n\n```html\n<mds-tab animation=\"fade\">\n  <mds-tab-item label=\"Prima\" selected></mds-tab-item>\n  <mds-tab-item label=\"Seconda\"></mds-tab-item>\n\n  <div slot=\"content\"><mds-text>Pannello 1.</mds-text></div>\n  <div slot=\"content\"><mds-text>Pannello 2.</mds-text></div>\n</mds-tab>\n```\n\n#### Overflow Shadow for Many Tabs\n\nEnable `overflow` when the tab strip can contain more items than the viewport permits. Left and right inset shadows appear whenever tabs overflow their container, signalling that scrolling is possible.\n\n```html\n<mds-tab overflow>\n  <mds-tab-item label=\"Gennaio\" selected></mds-tab-item>\n  <mds-tab-item label=\"Febbraio\"></mds-tab-item>\n  <mds-tab-item label=\"Marzo\"></mds-tab-item>\n  <mds-tab-item label=\"Aprile\"></mds-tab-item>\n  <mds-tab-item label=\"Maggio\"></mds-tab-item>\n  <mds-tab-item label=\"Giugno\"></mds-tab-item>\n  <mds-tab-item label=\"Luglio\"></mds-tab-item>\n  <mds-tab-item label=\"Agosto\"></mds-tab-item>\n  <mds-tab-item label=\"Settembre\"></mds-tab-item>\n  <mds-tab-item label=\"Ottobre\"></mds-tab-item>\n  <mds-tab-item label=\"Novembre\"></mds-tab-item>\n  <mds-tab-item label=\"Dicembre\"></mds-tab-item>\n</mds-tab>\n```\n\n#### Scrollbar for Accessible Overflow\n\nUse `scrollbar` instead of (or alongside) `overflow` to expose the native horizontal scrollbar. This is the accessible complement for users who navigate via keyboard or who have motor difficulties.\n\n```html\n<mds-tab scrollbar overflow>\n  <mds-tab-item label=\"Sezione A\" selected></mds-tab-item>\n  <mds-tab-item label=\"Sezione B\"></mds-tab-item>\n  <mds-tab-item label=\"Sezione C\"></mds-tab-item>\n  <mds-tab-item label=\"Sezione D\"></mds-tab-item>\n  <mds-tab-item label=\"Sezione E\"></mds-tab-item>\n</mds-tab>\n```\n\n#### Sizing\n\nSet `size` on the parent to scale all tabs uniformly. Do not set `size` on individual `<mds-tab-item>` elements - the parent propagates the value automatically.\n\n```html\n<!-- Compact strip, e.g. inside a sidebar or dense toolbar -->\n<mds-tab size=\"sm\">\n  <mds-tab-item label=\"Vista elenco\" selected></mds-tab-item>\n  <mds-tab-item label=\"Vista griglia\"></mds-tab-item>\n</mds-tab>\n```\n\n#### Navigation Links (href on Tab Items)\n\nWhen each tab leads to an anchor, another page or a route, set `href` on every `<mds-tab-item>` and omit the `content` slot: the items render as links, the browser follows them (in a new tab on a modifier or middle click) and the strip keeps the selected item highlighted. The page content is driven by navigation, not by the managed-panels mechanism.\n\n```html\n<mds-tab>\n  <mds-tab-item href=\"#sezione-1\" label=\"Introduzione\" selected></mds-tab-item>\n  <mds-tab-item href=\"#sezione-2\" label=\"Requisiti\"></mds-tab-item>\n  <mds-tab-item href=\"#sezione-3\" label=\"Conclusioni\"></mds-tab-item>\n</mds-tab>\n```\n\n#### Client-Side Routing (href on Tab Items)\n\nIn a single-page app keep `href` on the items and register the router once with `NavigationService`, from `@maggioli-design-system/magma/services`: a plain click on an item is routed on the client and the selection still moves, with no listener per item. A modifier or middle click stays with the browser, which opens the link in a new tab while the strip stays as it is.\n\n```html\n<mds-tab id=\"sezioni\">\n  <mds-tab-item href=\"/pratiche\" label=\"Pratiche\" selected></mds-tab-item>\n  <mds-tab-item href=\"/documenti\" label=\"Documenti\"></mds-tab-item>\n  <mds-tab-item href=\"/pagamenti\" label=\"Pagamenti\"></mds-tab-item>\n</mds-tab>\n\n<script type=\"module\">\n  import { NavigationService } from '@maggioli-design-system/magma/services';\n\n  NavigationService.setHandler((href) => router.navigate(href));\n</script>\n```\n\nWithout a registered router, cancel the click on the items and route by hand: the component honours `preventDefault()` and still moves the selection. Leave a modifier click alone.\n\n```html\n<script>\n  document.querySelectorAll('#sezioni mds-tab-item').forEach((item) => {\n    item.addEventListener('click', (event) => {\n      if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n      event.preventDefault();\n      router.navigate(item.href);\n    });\n  });\n</script>\n```\n\n#### Disabled Tab Item\n\nMark an individual tab as unavailable with `disabled`. The parent's selection mechanism skips it; the tab is removed from the tab order automatically.\n\n```html\n<mds-tab>\n  <mds-tab-item label=\"Attivo\" selected></mds-tab-item>\n  <mds-tab-item label=\"Non disponibile\" disabled></mds-tab-item>\n  <mds-tab-item label=\"Altro\"></mds-tab-item>\n\n  <div slot=\"content\"><mds-text>Contenuto disponibile.</mds-text></div>\n  <div slot=\"content\"><mds-text>Contenuto non disponibile.</mds-text></div>\n  <div slot=\"content\"><mds-text>Altro contenuto.</mds-text></div>\n</mds-tab>\n```\n\n#### Styling Customization\n\nStyle the component only through its public `--mds-tab-*` CSS custom properties: the background, margin and shadow of the tab strip and the columns of the vertical layout. The colours and shadows of the items and the timing of the transitions are not part of them. Set them on the host or a parent selector; use semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.scheda-primaria mds-tab {\n  --mds-tab-tabs-background: rgb(var(--magma-accent-surface));\n  --mds-tab-tabs-wrapper-shadow: 0 0 0 calc(var(--spacing) * 50) rgb(var(--magma-accent-border)) inset;\n}\n```\n\nWith `animation=\"fade\"` every item paints its own states (resting, hover and selected). With the slider (`animation=\"slide\"`) the items stay transparent over it, and the slider (`::part(slider)`) paints the selected one.\n",
        "3. Mistakes": "Common incorrect uses of `<mds-tab>`. 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 Size Individual Tab Items\n\nSetting `size` on a `<mds-tab-item>` directly is overridden by the parent at render time. Use the `size` prop on `<mds-tab>` to size all tabs uniformly.\n\n```html\n<!-- INCORRECT -->\n<mds-tab>\n  <mds-tab-item label=\"Elenco\" size=\"sm\" selected></mds-tab-item>\n  <mds-tab-item label=\"Griglia\" size=\"sm\"></mds-tab-item>\n</mds-tab>\n\n<!-- CORRECT -->\n<mds-tab size=\"sm\">\n  <mds-tab-item label=\"Elenco\" selected></mds-tab-item>\n  <mds-tab-item label=\"Griglia\"></mds-tab-item>\n</mds-tab>\n```\n\n#### Do Not Mix Tab Items and Content Panels Out of Order\n\nPanels in `slot=\"content\"` are wired to `<mds-tab-item>` elements by document order. A missing panel leaves its tab with no content, a wrong ordering shows the wrong panel when a tab is selected.\n\n```html\n<!-- INCORRECT: only two content panels for three tab items -->\n<mds-tab>\n  <mds-tab-item label=\"A\" selected></mds-tab-item>\n  <mds-tab-item label=\"B\"></mds-tab-item>\n  <mds-tab-item label=\"C\"></mds-tab-item>\n\n  <div slot=\"content\"><mds-text>Pannello A.</mds-text></div>\n  <div slot=\"content\"><mds-text>Pannello B.</mds-text></div>\n</mds-tab>\n\n<!-- CORRECT: one content panel per tab item, same order -->\n<mds-tab>\n  <mds-tab-item label=\"A\" selected></mds-tab-item>\n  <mds-tab-item label=\"B\"></mds-tab-item>\n  <mds-tab-item label=\"C\"></mds-tab-item>\n\n  <div slot=\"content\"><mds-text>Pannello A.</mds-text></div>\n  <div slot=\"content\"><mds-text>Pannello B.</mds-text></div>\n  <div slot=\"content\"><mds-text>Pannello C.</mds-text></div>\n</mds-tab>\n```\n\n#### Do Not Mix Link Items and Panel Tabs in One Strip\n\nA strip is either a `tablist` of tabs, each controlling a panel, or a navigation of links (`href` on every item): a link inside a tablist is not a child the role allows, and assistive technology announces the strip wrong. Keep the link out of the strip, as an `<mds-button>` next to it.\n\n```html\n<!-- INCORRECT -->\n<mds-tab>\n  <mds-tab-item label=\"Dettagli\" selected></mds-tab-item>\n  <mds-tab-item label=\"Allegati\"></mds-tab-item>\n  <mds-tab-item label=\"Portale\" href=\"https://portale.example.com\"></mds-tab-item>\n\n  <div slot=\"content\"><mds-text>Dettagli.</mds-text></div>\n  <div slot=\"content\"><mds-text>Allegati.</mds-text></div>\n  <div slot=\"content\"></div>\n</mds-tab>\n\n<!-- CORRECT -->\n<mds-tab>\n  <mds-tab-item label=\"Dettagli\" selected></mds-tab-item>\n  <mds-tab-item label=\"Allegati\"></mds-tab-item>\n\n  <div slot=\"content\"><mds-text>Dettagli.</mds-text></div>\n  <div slot=\"content\"><mds-text>Allegati.</mds-text></div>\n</mds-tab>\n<mds-button label=\"Portale\" href=\"https://portale.example.com\" target=\"blank\" tone=\"text\"></mds-button>\n```\n\n#### Do Not Put Tab Items Outside `<mds-tab>`\n\n`<mds-tab-item>` communicates with its parent through internal Stencil events. Used outside `<mds-tab>` it renders as an inert button with no selection, panel, or keyboard management.\n\n```html\n<!-- INCORRECT -->\n<div class=\"my-tab-wrapper\">\n  <mds-tab-item label=\"Scheda uno\" selected></mds-tab-item>\n  <mds-tab-item label=\"Scheda due\"></mds-tab-item>\n</div>\n<div>...</div>\n\n<!-- CORRECT -->\n<mds-tab>\n  <mds-tab-item label=\"Scheda uno\" selected></mds-tab-item>\n  <mds-tab-item label=\"Scheda due\"></mds-tab-item>\n  <div slot=\"content\">...</div>\n  <div slot=\"content\">...</div>\n</mds-tab>\n```\n\n#### Do Not Listen to the `mdsTabItemSelect` Event from Outside\n\n`mdsTabItemSelect` is the item-level event that `<mds-tab-item>` fires to its parent `<mds-tab>`: its `detail` carries the item element (`target`) and `value`, not the position of the tab. To react to the active tab of the group listen to `mdsTabChange` on `<mds-tab>`, whose `detail` has the tab index (`id`) and `value`.\n\n```html\n<!-- INCORRECT -->\n<mds-tab id=\"schede\">\n  <mds-tab-item label=\"Prima\" selected></mds-tab-item>\n  <mds-tab-item label=\"Seconda\"></mds-tab-item>\n</mds-tab>\n\n<script>\n  document.querySelector('#schede').addEventListener('mdsTabItemSelect', handler);\n</script>\n\n<!-- CORRECT -->\n<mds-tab id=\"schede\">\n  <mds-tab-item label=\"Prima\" selected></mds-tab-item>\n  <mds-tab-item label=\"Seconda\"></mds-tab-item>\n</mds-tab>\n\n<script>\n  document.querySelector('#schede').addEventListener('mdsTabChange', handler);\n</script>\n```\n\n#### Do Not Use `scrollbar=\"false\"` or `overflow=\"false\"` to Turn Off Boolean Props\n\nStencil reads `\"false\"` as `false` and, since both props are reflected, removes the attribute at the first render, so this happens to work; but the markup says the opposite of what it does, and on a prop that is not reflected the attribute stays in the DOM, where `[attr]` selectors still match it. Remove the attribute entirely to turn a prop off.\n\n```html\n<!-- INCORRECT -->\n<mds-tab scrollbar=\"false\" overflow=\"false\">\n  <mds-tab-item label=\"Prima\" selected></mds-tab-item>\n</mds-tab>\n\n<!-- CORRECT -->\n<mds-tab>\n  <mds-tab-item label=\"Prima\" selected></mds-tab-item>\n</mds-tab>\n```\n\n#### Do Not Place Raw HTML Instead of `<mds-tab-item>` in the Default Slot\n\nThe default slot expects `<mds-tab-item>` elements only. Placing a raw `<button>` or `<a>` there bypasses the ARIA `tablist` structure, selection management, and keyboard handling that `<mds-tab>` provides.\n\n```html\n<!-- INCORRECT -->\n<mds-tab>\n  <button class=\"tab\">Documenti</button>\n  <button class=\"tab\">Messaggi</button>\n  <div slot=\"content\">...</div>\n  <div slot=\"content\">...</div>\n</mds-tab>\n\n<!-- CORRECT -->\n<mds-tab>\n  <mds-tab-item label=\"Documenti\" selected></mds-tab-item>\n  <mds-tab-item label=\"Messaggi\"></mds-tab-item>\n  <div slot=\"content\">...</div>\n  <div slot=\"content\">...</div>\n</mds-tab>\n```\n\n#### Do Not Customize via Undocumented Shadow Parts or Internal Selectors\n\nThe supported customization surface is the public `--mds-tab-*` CSS custom properties and the documented shadow parts (`tabs`, `contents`, `slider`). Targeting other internals via `>>>`, `/deep/`, or undocumented class names couples your code to the shadow DOM implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-tab >>> .tabs-wrapper {\n  background: red;\n}\nmds-tab::part(tabs-wrapper) {\n  padding: 0;\n}\n\n/* CORRECT */\nmds-tab {\n  --mds-tab-tabs-background: rgb(var(--magma-accent-surface));\n}\nmds-tab::part(tabs) {\n  outline: 2px solid rgb(var(--magma-accent-border));\n}\n```\n"
      },
      "props": [
        {
          "name": "animation",
          "type": "\"fade\" | \"slide\" | undefined",
          "complexType": {
            "original": "HorizontalActionsAnimationType",
            "resolved": "\"fade\" | \"slide\" | undefined",
            "references": {
              "HorizontalActionsAnimationType": {
                "location": "import",
                "path": "@type/animation",
                "id": "src/type/animation.ts::HorizontalActionsAnimationType",
                "referenceLocation": "HorizontalActionsAnimationType"
              }
            }
          },
          "mutable": false,
          "attr": "animation",
          "reflectToAttr": true,
          "docs": "Sets the animation type of the selection transition between `mds-tab-item` elements",
          "docsTags": [
            {
              "name": "default",
              "text": "'slide'"
            }
          ],
          "default": "'slide'",
          "values": [
            {
              "value": "fade",
              "type": "string"
            },
            {
              "value": "slide",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "direction",
          "type": "\"horizontal\" | \"vertical\" | undefined",
          "complexType": {
            "original": "DirectionType",
            "resolved": "\"horizontal\" | \"vertical\" | undefined",
            "references": {
              "DirectionType": {
                "location": "import",
                "path": "./meta/type",
                "id": "src/components/mds-tab/meta/type.ts::DirectionType",
                "referenceLocation": "DirectionType"
              }
            }
          },
          "mutable": true,
          "attr": "direction",
          "reflectToAttr": true,
          "docs": "Sets if the component distributes item vertically or horzontally",
          "docsTags": [
            {
              "name": "default",
              "text": "'horizontal'"
            }
          ],
          "default": "'horizontal'",
          "values": [
            {
              "value": "horizontal",
              "type": "string"
            },
            {
              "value": "vertical",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "fill",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "fill",
          "reflectToAttr": true,
          "docs": "Sets if the tab area should fill the entire width",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "overflow",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "overflow",
          "reflectToAttr": true,
          "docs": "Sets if the tab area should show an inset shadow when the tabs overflows it's container",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "scrollbar",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "scrollbar",
          "reflectToAttr": true,
          "docs": "Shows the horizontal scrollbar to maximize accessibility",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"md\" | \"sm\" | undefined",
          "complexType": {
            "original": "TabSizeType",
            "resolved": "\"md\" | \"sm\" | undefined",
            "references": {
              "TabSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::TabSizeType",
                "referenceLocation": "TabSizeType"
              }
            }
          },
          "mutable": true,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Sets the size of the component items nested inside it",
          "docsTags": [],
          "values": [
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsTabChange",
          "detail": "MdsTabEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsTabEventDetail",
            "resolved": "MdsTabEventDetail",
            "references": {
              "MdsTabEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-tab/meta/event-detail.ts::MdsTabEventDetail",
                "referenceLocation": "MdsTabEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a children is changed",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "mdsTabItemSelect",
          "capture": false,
          "passive": false
        },
        {
          "event": "mdsTabItemFocus",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [
        {
          "name": "--mds-tab-direction-vertical-columns",
          "annotation": "prop",
          "docs": "Defines the column layout for vertical tabs.",
          "visibility": "public"
        },
        {
          "name": "--mds-tab-item-default-background",
          "annotation": "prop",
          "docs": "Background color for default tab items.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-default-color",
          "annotation": "prop",
          "docs": "Text color for default tab items.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-default-shadow",
          "annotation": "prop",
          "docs": "Shadow for default tab items.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-hover-background",
          "annotation": "prop",
          "docs": "Background color for hovered tab items.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-hover-color",
          "annotation": "prop",
          "docs": "Text color for hovered tab items.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-hover-shadow",
          "annotation": "prop",
          "docs": "Shadow for hovered tab items, the default shadow when not set.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-radius",
          "annotation": "prop",
          "docs": "Border radius for tab items.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-selected-background",
          "annotation": "prop",
          "docs": "Background color for selected tab items.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-selected-color",
          "annotation": "prop",
          "docs": "Text color for selected tab items.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-selected-shadow",
          "annotation": "prop",
          "docs": "Shadow for selected tab items.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-scroll-behavior",
          "annotation": "prop",
          "docs": "Scroll behavior for tab container.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-scroll-scrollbar-margin",
          "annotation": "prop",
          "docs": "Margin for scrollbar.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-scroll-scrollbar-radius",
          "annotation": "prop",
          "docs": "Radius of scrollbar.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-scroll-scrollbar-size",
          "annotation": "prop",
          "docs": "Size of scrollbar.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-scroll-scrollbar-thumb-background",
          "annotation": "prop",
          "docs": "Background color of scrollbar thumb.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-scroll-scrollbar-track-background",
          "annotation": "prop",
          "docs": "Background color of scrollbar track.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-slide-delay",
          "annotation": "prop",
          "docs": "Delay before tab slide animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-tabs-background",
          "annotation": "prop",
          "docs": "Background color of the tabs container.",
          "visibility": "public"
        },
        {
          "name": "--mds-tab-tabs-gap",
          "annotation": "prop",
          "docs": "Gap between tabs.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-tabs-overflow-shadow",
          "annotation": "prop",
          "docs": "Shadow applied to overflowed tabs.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-tabs-overflow-shadow-size",
          "annotation": "prop",
          "docs": "Size of the overflow shadow.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-tabs-padding",
          "annotation": "prop",
          "docs": "Padding inside the tabs container.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-tabs-radius",
          "annotation": "prop",
          "docs": "Border radius of the tabs container.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-tabs-wrapper-margin",
          "annotation": "prop",
          "docs": "Margin for the tabs wrapper.",
          "visibility": "public"
        },
        {
          "name": "--mds-tab-tabs-wrapper-outline-opacity",
          "annotation": "prop",
          "docs": "Opacity of the wrapper outline.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-tabs-wrapper-shadow",
          "annotation": "prop",
          "docs": "Shadow for the tabs wrapper.",
          "visibility": "public"
        },
        {
          "name": "--mds-tab-tabs-wrapper-shadow-color",
          "annotation": "prop",
          "docs": "Color of the wrapper shadow.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-transition-duration",
          "annotation": "prop",
          "docs": "Duration of tab transition animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-transition-timing-function",
          "annotation": "prop",
          "docs": "Timing function for tab transition animation.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-tab-item` element/s."
        },
        {
          "name": "content",
          "docs": "Add `HTML elements` or `components`, one per mds-tab-item added; or none, when the\nitems are links (`href`) to other pages or places and the page, not the component, shows the\ncontent."
        }
      ],
      "parts": [
        {
          "name": "contents",
          "docs": "Selects the container of the tabbed contents elements."
        },
        {
          "name": "slider",
          "docs": "Selects the slider element which is visible when attribute `animation` is set to `slide`."
        },
        {
          "name": "tabs",
          "docs": "Selects the container of `mds-tab-item` list elements."
        }
      ],
      "states": [],
      "dependents": [
        "mds-input-date-range",
        "mds-input-upload",
        "mds-pref-animation",
        "mds-pref-consumption",
        "mds-pref-contrast",
        "mds-pref-language",
        "mds-pref-mode",
        "mds-pref-theme"
      ],
      "dependencies": [],
      "dependencyGraph": {
        "mds-input-date-range": [
          "mds-tab"
        ],
        "mds-input-upload": [
          "mds-tab"
        ],
        "mds-pref-animation": [
          "mds-tab"
        ],
        "mds-pref-consumption": [
          "mds-tab"
        ],
        "mds-pref-contrast": [
          "mds-tab"
        ],
        "mds-pref-language": [
          "mds-tab"
        ],
        "mds-pref-mode": [
          "mds-tab"
        ],
        "mds-pref-theme": [
          "mds-tab"
        ]
      },
      "storybook": "ui-tab--docs"
    },
    {
      "filePath": "src/components/mds-tab-bar/mds-tab-bar.tsx",
      "encapsulation": "shadow",
      "tag": "mds-tab-bar",
      "readme": "# mds-tab-bar\n\n\n\nThis 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.\n",
      "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 `mds-tab-bar-item` element/s."
        },
        {
          "name": "category",
          "text": "navigation"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-tab-bar>` web component is the compound container of the Magma Design System that groups a set of `<mds-tab-bar-item>` children into a single selectable navigation bar, owning the mutual-exclusion logic that keeps exactly one item active at a time. The bar is fixed to the bottom edge of the viewport (`position: fixed`), full width.\n\n#### Semantic Behavior\n\n- **Compound parent/child**: It accepts only `<mds-tab-bar-item>` elements in its default slot and acts purely as their coordinator.\n- **Single active selection**: When one item reports selection, the others are deselected - enforcing one-active-at-a-time behavior.\n- **Change notification**: After resolving the new selection it emits `mdsTabBarChange` whose detail carries the zero-based `index` of the newly selected item, intended to drive panel/view switching by the consumer.\n- **Default-slot semantics**: The slot is structural (it expects components, not text); the textual label lives inside each `<mds-tab-bar-item>` instead.\n\n#### Properties & Visual Configurations\n\n`<mds-tab-bar>` itself exposes no configuration props - its appearance and content are entirely determined by the `<mds-tab-bar-item>` children it wraps. The relevant intent lives on those children:\n\n- **`selected`** marks which item is active. The parent rewrites it during selection changes; set it on a single child to define the initial active tab.\n- **`icon`** is an SVG filename slug from the Magma icon library, rendered above the item's text label.\n- **`typography`** selects the text scale of the item label from the smaller-typography ladder (defaulting to `'tip'`), letting authors match tab density to surrounding chrome.\n\nThis component does not use the shared `variant` / `tone` ladders defined in [`agents/variants.md`](../../../../agents/variants.md).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-tab-bar>` 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 Navigation Bar\n\nThe canonical form. Place one `<mds-tab-bar-item>` per destination. Provide `icon` as a slug from the Magma icon library and the text via the `label` prop. Mark the initially active item with `selected`.\n\n```html\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" selected></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/search\" label=\"Cerca\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/notifications\" label=\"Notifiche\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/person\" label=\"Profilo\"></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Reacting to Tab Changes\n\nListen for `mdsTabBarChange` on the host. The event detail carries `index` - the zero-based position of the newly selected item - which you use to switch the visible view or panel.\n\n```html\n<mds-tab-bar id=\"app-nav\">\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" selected></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/inbox\" label=\"Messaggi\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/settings\" label=\"Impostazioni\"></mds-tab-bar-item>\n</mds-tab-bar>\n\n<script>\n  document.querySelector('#app-nav').addEventListener('mdsTabBarChange', (e) => {\n    const activeIndex = e.detail.index;\n    showView(activeIndex);\n  });\n</script>\n```\n\n#### Setting the Initial Active Tab Programmatically\n\nSet `selected` on exactly one child to control the starting state. If you later need to change the active item from outside - for example, after a router navigation - set `selected` on the new item and remove it from the previous one yourself: the parent syncs the siblings only when an item is clicked, and emits no `mdsTabBarChange` for a change made from code.\n\n```html\n<!-- Second item active on load -->\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/explore\" label=\"Scopri\" selected></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/favorite\" label=\"Preferiti\"></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Adjusting Label Typography\n\nUse `typography` on individual items to match the text density to the surrounding chrome. The prop accepts `\"tip\"` (default, smaller) or `\"option\"` (slightly larger). You can mix values if items carry different visual weight.\n\n```html\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" typography=\"option\" selected></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/inbox\" label=\"Posta\" typography=\"option\"></mds-tab-bar-item>\n  <mds-tab-bar-item\n    icon=\"mi/baseline/settings\"\n    label=\"Impostazioni\"\n    typography=\"option\"\n  ></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Styling Customization via CSS Custom Properties\n\nStyle individual items through the public `--mds-tab-bar-item-*` CSS custom properties: the background and the text colour of the item at rest (the selected item keeps its accent colouring). Set them on the specific item or on a parent selector. Use semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast keep working.\n\n```css\n/* A resting background for the whole bar */\nmds-tab-bar mds-tab-bar-item {\n  --mds-tab-bar-item-background: rgb(var(--magma-wash-base));\n}\n\n/* A single item with a distinct idle color */\nmds-tab-bar-item.priority {\n  --mds-tab-bar-item-color: rgb(var(--magma-warning-text-default));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-tab-bar>`. 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 Place HTML Elements or Text Directly in the Bar's Default Slot\n\n`<mds-tab-bar>` only coordinates `<mds-tab-bar-item>` children; arbitrary HTML or text in its slot breaks the mutual-exclusion logic and the change event.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-bar>\n  <button>Home</button>\n  <a href=\"/cerca\">Cerca</a>\n</mds-tab-bar>\n\n<!-- CORRECT -->\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" selected></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/search\" label=\"Cerca\"></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Do Not Use the Deprecated Default Slot for an Item's Text\n\nSetting an item's text via the default slot is deprecated. Slotted text is read into `label`, and nested HTML is stripped with a console warning - use the `label` prop for the text and the `icon` prop for the glyph.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-bar-item icon=\"mi/baseline/inbox\">Messaggi</mds-tab-bar-item>\n<mds-tab-bar-item>\n  <span class=\"bold\">Messaggi</span>\n  <small>(3)</small>\n</mds-tab-bar-item>\n\n<!-- CORRECT -->\n<mds-tab-bar-item icon=\"mi/baseline/inbox\" label=\"Messaggi\"></mds-tab-bar-item>\n```\n\n#### Do Not Slot `<mds-icon>` to Add an Icon\n\nThe item's `icon` prop renders the glyph through the shared icon service and positions it correctly above the label. Slotting `<mds-icon>` puts it in the deprecated default slot, where it is misaligned or stripped.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-bar-item>\n  <mds-icon name=\"mi/baseline/home\"></mds-icon>\n  Home\n</mds-tab-bar-item>\n\n<!-- CORRECT -->\n<mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\"></mds-tab-bar-item>\n```\n\n#### Do Not Set `selected=\"false\"` to Deselect an Item\n\n`selected` is a boolean attribute. The item happens to style `selected=\"false\"` as unselected, but the attribute stays on the element and contradicts the state for attribute selectors and checks. Remove the attribute entirely to deselect an item, or let the parent coordinate selection automatically.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" selected=\"false\"></mds-tab-bar-item>\n\n<!-- CORRECT -->\n<mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\"></mds-tab-bar-item>\n```\n\n#### Do Not Listen for the Item's Internal Event on the Bar's Children\n\n`mdsTabBarItemSelect` is the item-level event `<mds-tab-bar>` coordinates on: its `detail` is the item's `id`, the one you gave it or the `mds-tab-bar-item-<index>` the bar gives an item without one. To react to selection changes from outside, listen for `mdsTabBarChange` on the parent instead, whose `detail.index` is the position of the selected item.\n\n```html\n<!-- INCORRECT -->\n<script>\n  document.querySelector('mds-tab-bar-item').addEventListener('mdsTabBarItemSelect', handler);\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('mds-tab-bar').addEventListener('mdsTabBarChange', (e) => {\n    handler(e.detail.index);\n  });\n</script>\n```\n\n#### Do Not Style Items by Piercing Shadow DOM\n\nThe only supported customization surface is the two public `--mds-tab-bar-item-*` CSS custom properties, `--mds-tab-bar-item-background` and `--mds-tab-bar-item-color` (the icon follows the text colour). Targeting internal nodes via `::part()`, `>>>`, or undocumented class names couples your code to the Shadow DOM implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-tab-bar-item >>> mds-icon {\n  fill: hotpink;\n}\n\n/* CORRECT */\nmds-tab-bar mds-tab-bar-item {\n  --mds-tab-bar-item-color: rgb(var(--magma-text-muted));\n}\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [
        {
          "event": "mdsTabBarChange",
          "detail": "MdsTabBarEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsTabBarEventDetail",
            "resolved": "MdsTabBarEventDetail",
            "references": {
              "MdsTabBarEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-tab-bar/meta/event-detail.ts::MdsTabBarEventDetail",
                "referenceLocation": "MdsTabBarEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a step is changed",
          "docsTags": []
        }
      ],
      "listeners": [
        {
          "event": "mdsTabBarItemSelect",
          "capture": false,
          "passive": false
        }
      ],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-tab-bar-item` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-tab-bar--docs"
    },
    {
      "filePath": "src/components/mds-tab-bar-item/mds-tab-bar-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-tab-bar-item",
      "readme": "# mds-tab-bar-item\n\n\n\nThis 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.\n",
      "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": "- **Deprecated**, use the `label` property instead. Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        },
        {
          "name": "parent",
          "text": "mds-tab-bar"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-tab-bar-item>` web component is a single selectable tab within the [`<mds-tab-bar>`](../mds-tab-bar/AGENTS.md) container. It renders an icon stacked over a text label and acts as one option in the bar's mutually-exclusive selection group.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct default-slot child of `<mds-tab-bar>`; it is not used standalone or mixed with other child types.\n- **Parent-coordinated selection**: Clicking an item that is not selected selects it and emits `mdsTabBarItemSelect` carrying its own `id`; a click on the selected item changes nothing and emits nothing. The parent re-drives every sibling's `selected` so exactly one item is active at a time - items do not deselect each other on their own.\n- **Whole-host click target**: The entire item (icon + label) is the click surface, not just the text. It is a button (`role=\"button\"`, unless you set another role) in the tab order, activated by Enter and Space as by a click; the selected item carries `aria-current=\"true\"`.\n- **Label is text**: Set the visible text with the `label` prop. The default slot is a **deprecated** fallback kept for backward compatibility - slotted text is read into `label`, while nested HTML is stripped with a console warning; avoid placing HTML elements or other components there.\n\n#### Properties & Visual Configurations\n\n- **`icon`**: Icon name shown above the label; use it to give the tab a recognizable glyph. Optional - defaults to empty.\n- **`label`**: The tab's visible text. This is the preferred and idiomatic way to set the text, matching the `label` prop on [`mds-button`](../mds-button/AGENTS.md) and other Magma components.\n- **`selected`**: Marks this item as the active tab. You typically do not toggle it manually at runtime - the parent manages it - but you can set it on one item as the initial active tab.\n- **`typography`**: Controls the label's text style, constrained to the smaller typography set (`tip` by default, or `option`). Pick `option` for a slightly more prominent label.\n\nThe resting appearance is configured through the public `--mds-tab-bar-item-background` and `--mds-tab-bar-item-color` CSS custom properties listed in [`AGENTS.md`](AGENTS.md); the selected item keeps its own accent colouring.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-tab-bar-item>` 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 Tab Bar\n\nThe canonical form. Place all items directly inside `<mds-tab-bar>`. Give each item an `icon` and set its text with the `label` prop. The parent keeps the `id` you give an item, gives one to the items without, and coordinates selection.\n\n```html\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/search\" label=\"Cerca\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/notifications\" label=\"Notifiche\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/person\" label=\"Profilo\"></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Setting the Initial Active Tab\n\nMark one item as pre-selected on first render with the `selected` boolean attribute. Do not set more than one item as `selected` - the parent enforces mutual exclusivity once the first click event fires.\n\n```html\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" selected></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/search\" label=\"Cerca\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/notifications\" label=\"Notifiche\"></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Listening for Selection Changes\n\nListen to `mdsTabBarItemSelect` on the item to react when a specific tab becomes active, or listen to `mdsTabBarChange` on the parent to receive the zero-based index of the newly selected item.\n\n```html\n<mds-tab-bar id=\"main-nav\">\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/search\" label=\"Cerca\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/person\" label=\"Profilo\"></mds-tab-bar-item>\n</mds-tab-bar>\n\n<script>\n  document.querySelector('#main-nav').addEventListener('mdsTabBarChange', (e) => {\n    console.log('tab selezionato:', e.detail.index);\n  });\n</script>\n```\n\n#### Driving Selection Programmatically\n\nSet the `selected` prop on the desired item from JavaScript, and remove it from the previously selected one: the item updates its own visual state, but the parent syncs the siblings only on the next click and emits no `mdsTabBarChange` for a change made from code. Do not address the items by your own `id`: the bar replaces it with `mds-tab-bar-item-<index>` when it loads.\n\n```html\n<mds-tab-bar id=\"wizard-nav\">\n  <mds-tab-bar-item icon=\"mi/baseline/person\" label=\"Profilo\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/lock\" label=\"Sicurezza\"></mds-tab-bar-item>\n  <mds-tab-bar-item\n    icon=\"mi/baseline/notifications\"\n    label=\"Notifiche\"\n  ></mds-tab-bar-item>\n</mds-tab-bar>\n\n<script>\n  document.querySelectorAll('#wizard-nav mds-tab-bar-item')[1].selected = true;\n</script>\n```\n\n#### Larger Label Typography\n\nUse `typography=\"option\"` for a slightly more prominent label when the tab bar sits in a layout where `tip` (the default) reads too small.\n\n```html\n<mds-tab-bar>\n  <mds-tab-bar-item\n    icon=\"mi/baseline/dashboard\"\n    label=\"Dashboard\"\n    typography=\"option\"\n    selected\n  ></mds-tab-bar-item>\n  <mds-tab-bar-item\n    icon=\"mi/baseline/bar-chart\"\n    label=\"Statistiche\"\n    typography=\"option\"\n  ></mds-tab-bar-item>\n  <mds-tab-bar-item\n    icon=\"mi/baseline/settings\"\n    label=\"Impostazioni\"\n    typography=\"option\"\n  ></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Styling Customization\n\nOverride colors through the two public `--mds-tab-bar-item-*` CSS custom properties, the background and the text colour of the item at rest (the selected item keeps its accent colouring). Set them on the host or a parent selector; use semantic color roles via `rgb(var(--magma-<role>))` so dark mode keeps working.\n\n```css\n.app-bottom-nav mds-tab-bar-item {\n  --mds-tab-bar-item-background: rgb(var(--magma-wash-base));\n  --mds-tab-bar-item-color: rgb(var(--magma-text-muted));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-tab-bar-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 Outside `<mds-tab-bar>`\n\n`<mds-tab-bar-item>` relies on the parent to give it an `id` when it has none, listen for `mdsTabBarItemSelect`, and drive mutual exclusivity. Without the parent, an item without an `id` reports an empty one, selection does not propagate, and no other item is deselected when this one is clicked.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" selected></mds-tab-bar-item>\n\n<!-- CORRECT -->\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" selected></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/search\" label=\"Cerca\"></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Do Not Use the Deprecated Default Slot for Text\n\nSetting the text via the default slot is deprecated. Slotted text is read into `label`, and any nested HTML is stripped with a console warning. Use the `label` prop instead.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\">Home</mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/search\"><strong>Cerca</strong></mds-tab-bar-item>\n</mds-tab-bar>\n\n<!-- CORRECT -->\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\"></mds-tab-bar-item>\n  <mds-tab-bar-item icon=\"mi/baseline/search\" label=\"Cerca\"></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Do Not Slot `<mds-icon>` to Add an Icon\n\nThe `icon` prop renders the glyph through the shared icon service and positions it above the label automatically. Slotting `<mds-icon>` puts it in the deprecated default slot, where it is stripped and misaligns.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-bar>\n  <mds-tab-bar-item>\n    <mds-icon name=\"mi/baseline/home\"></mds-icon>\n    Home\n  </mds-tab-bar-item>\n</mds-tab-bar>\n\n<!-- CORRECT -->\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\"></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Do Not Set `selected=\"false\"` to Deselect\n\n`selected` is a boolean attribute. The item happens to style `selected=\"false\"` as unselected, but the attribute stays on the element and contradicts the state for attribute selectors and checks. Remove the attribute or set the property to `undefined` to deselect.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" selected=\"false\"></mds-tab-bar-item>\n</mds-tab-bar>\n\n<!-- CORRECT -->\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\"></mds-tab-bar-item>\n</mds-tab-bar>\n```\n\n#### Do Not Listen to Raw Click Events for Tab Changes\n\n`<mds-tab-bar-item>` emits `mdsTabBarItemSelect` when selected; `<mds-tab-bar>` re-emits `mdsTabBarChange` with the resolved index. Listening to the native `click` event gives you no index, and it also fires on clicks that select nothing (any click on the item that is already active).\n\n```html\n<!-- INCORRECT -->\n<mds-tab-bar id=\"nav\">\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\"></mds-tab-bar-item>\n</mds-tab-bar>\n<script>\n  document.querySelector('mds-tab-bar-item').addEventListener('click', handler);\n</script>\n\n<!-- CORRECT -->\n<mds-tab-bar id=\"nav\">\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\"></mds-tab-bar-item>\n</mds-tab-bar>\n<script>\n  document.querySelector('#nav').addEventListener('mdsTabBarChange', handler);\n</script>\n```\n\n#### Do Not Use an Invalid `typography` Value\n\n`typography` accepts only `\"tip\"` (default) or `\"option\"`. Passing any other value - such as `\"caption\"` or `\"label\"` - is outside the typed `TypographySmallerType`: it is passed unchecked to the inner `<mds-text>`, so the label silently leaves the tab bar's type scale.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" typography=\"caption\"></mds-tab-bar-item>\n</mds-tab-bar>\n\n<!-- CORRECT -->\n<mds-tab-bar>\n  <mds-tab-bar-item icon=\"mi/baseline/home\" label=\"Home\" typography=\"option\"></mds-tab-bar-item>\n</mds-tab-bar>\n```\n"
      },
      "props": [
        {
          "name": "icon",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "The icon displayed in the tab bar item.",
          "docsTags": [
            {
              "name": "default",
              "text": "''"
            }
          ],
          "default": "''",
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "label",
          "reflectToAttr": true,
          "docs": "Sets the label of the tab bar item",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": true,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Specifies if the component is selected or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"option\" | \"tip\" | undefined",
          "complexType": {
            "original": "TypographySmallerType",
            "resolved": "\"option\" | \"tip\" | undefined",
            "references": {
              "TypographySmallerType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographySmallerType",
                "referenceLocation": "TypographySmallerType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "Specifies the typography of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'tip'"
            }
          ],
          "default": "'tip'",
          "values": [
            {
              "value": "option",
              "type": "string"
            },
            {
              "value": "tip",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsTabBarItemSelect",
          "detail": "string",
          "bubbles": true,
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the component is selected",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-tab-bar-item-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-tab-bar-item-background-selected",
          "annotation": "prop",
          "docs": "Sets the background-color of the component when it's selected",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-bar-item-color",
          "annotation": "prop",
          "docs": "Sets the text color of the component",
          "visibility": "public"
        },
        {
          "name": "--mds-tab-bar-item-color-selected",
          "annotation": "prop",
          "docs": "Sets the text color of the component when it's selected",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "**Deprecated**, use the `label` property instead. Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-tab-bar-item": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "ui-tab-bar-tab-bar-item--docs"
    },
    {
      "filePath": "src/components/mds-tab-item/mds-tab-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-tab-item",
      "readme": "# mds-tab-item\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "button - The `mds-button` of the tab"
        },
        {
          "name": "parent",
          "text": "mds-tab"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-tab-item>` web component is the individual, clickable tab control of the Magma Design System, designed to be slotted into the default slot of its parent [`<mds-tab>`](../mds-tab/AGENTS.md). It acts as the trigger that switches the matching `content`-slotted panel inside the tab group.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be a direct child of `<mds-tab>` placed in its default slot; it is not used standalone, and the matching panel content is added separately into the parent's `content` slot (one per `<mds-tab-item>`, or none when the page shows the content itself). Mixing it with other child types breaks the parent's pairing.\n- **Link item**: With `href` the item renders a real link instead of a tab: it is announced as a link, with `aria-current` when selected, and the browser follows it, in a new tab on a modifier or middle click. A `click` listener on the item cancels the navigation with `preventDefault()` to route on the client; the selection still moves, except on a modifier click, which the browser opens elsewhere.\n- **Selection driven by the parent**: Clicking the item emits `mdsTabItemSelect`; `<mds-tab>` sets `selected` on the chosen item, clears it on the others, and reveals the corresponding panel.\n- **Initial selection**: Marking one item `selected` in markup tells the parent which tab is active on load.\n- **Focus reporting**: A key press emits `mdsTabItemFocus`, which the parent uses to scroll the focused tab into view; both events carry `{ target, value }` so the parent can resolve the item even with a custom `id`.\n- **Disabled guard**: When `disabled`, the item cannot be selected via pointer or keyboard.\n- **Sizing managed upstream**: `size` is pushed down from `<mds-tab>`, overriding the item's own `size` prop.\n\n#### Properties & Visual Configurations\n\nThis child does not use the shared `variant`/`tone` ladders; its props mirror the underlying `<mds-button>`.\n\n- **`value`**: Set this to identify the tab in the `mdsTabItemSelect` payload (and the parent's `mdsTabChange`) when you need to react to selection without relying on DOM index or `id`.\n- **`type`**: Defaults to `submit`; pick `button` for a plain tab that does not interact with a surrounding form. With `href` the item is a link and `type` has no effect.\n- **`icon`** / **`iconPosition`**: Add a leading (`left`, default) or trailing (`right`) glyph; use the trailing position for affordances like an external-link or dismiss hint.\n- **`await`**: Reflects the button's awaiting/loading state for tabs whose activation triggers an async operation.\n- **`size`**: Defaults to `md`, but is normally controlled by the parent's `size` prop, so set it on `<mds-tab>` for consistent sizing across all items.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-tab-item>` 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 Tab Group\n\nThe canonical form. Place `<mds-tab-item>` elements in the default slot of [`<mds-tab>`](../mds-tab/AGENTS.md), with one matching panel element per item in the `content` slot. Mark the initially active tab with `selected`.\n\n```html\n<mds-tab>\n  <mds-tab-item label=\"Dettagli\" selected></mds-tab-item>\n  <mds-tab-item label=\"Allegati\"></mds-tab-item>\n  <mds-tab-item label=\"Cronologia\"></mds-tab-item>\n\n  <div slot=\"content\">\n    <p>Contenuto della scheda Dettagli.</p>\n  </div>\n  <div slot=\"content\">\n    <p>Elenco degli allegati.</p>\n  </div>\n  <div slot=\"content\">\n    <p>Cronologia delle modifiche.</p>\n  </div>\n</mds-tab>\n```\n\n#### Tabs with Icons\n\nUse the `icon` prop to add a glyph. `icon-position` defaults to `left`; set it to `right` for affordance glyphs such as external-link hints.\n\n```html\n<mds-tab>\n  <mds-tab-item label=\"Profilo\" icon=\"mi/baseline/person\" selected></mds-tab-item>\n  <mds-tab-item label=\"Impostazioni\" icon=\"mi/baseline/settings\"></mds-tab-item>\n  <mds-tab-item label=\"Apri in nuova finestra\" icon=\"mi/baseline/open-in-new\" icon-position=\"right\"></mds-tab-item>\n\n  <div slot=\"content\"><p>Sezione profilo.</p></div>\n  <div slot=\"content\"><p>Sezione impostazioni.</p></div>\n  <div slot=\"content\"><p>Sezione apertura esterna.</p></div>\n</mds-tab>\n```\n\n#### Disabled Tab\n\nSet the `disabled` boolean attribute to block selection via pointer and keyboard.\n\n```html\n<mds-tab>\n  <mds-tab-item label=\"Attivo\" selected></mds-tab-item>\n  <mds-tab-item label=\"Non disponibile\" disabled></mds-tab-item>\n\n  <div slot=\"content\"><p>Contenuto attivo.</p></div>\n  <div slot=\"content\"><p>Contenuto non ancora disponibile.</p></div>\n</mds-tab>\n```\n\n#### Controlled Selection via `value` and Event\n\nUse `value` to identify which tab was activated in the `mdsTabItemSelect` (or the parent's `mdsTabChange`) payload, instead of relying on DOM index.\n\n```html\n<mds-tab id=\"schede-pratica\">\n  <mds-tab-item label=\"Dati generali\" value=\"dati\" selected></mds-tab-item>\n  <mds-tab-item label=\"Documenti\" value=\"documenti\"></mds-tab-item>\n  <mds-tab-item label=\"Note\" value=\"note\"></mds-tab-item>\n\n  <div slot=\"content\"><p>Dati generali.</p></div>\n  <div slot=\"content\"><p>Documenti allegati.</p></div>\n  <div slot=\"content\"><p>Note operative.</p></div>\n</mds-tab>\n\n<script>\n  document.getElementById('schede-pratica').addEventListener('mdsTabChange', (e) => {\n    console.log('Tab attiva:', e.detail.value); // 'dati' | 'documenti' | 'note'\n  });\n</script>\n```\n\n#### Consistent Sizing via the Parent\n\nSet `size` on `<mds-tab>` once; the parent propagates it to every child item automatically. Do not set `size` on individual items when they all share the same parent.\n\n```html\n<!-- Tutti i tab usano size=\"sm\" -->\n<mds-tab size=\"sm\">\n  <mds-tab-item label=\"Riepilogo\" selected></mds-tab-item>\n  <mds-tab-item label=\"Dettaglio\"></mds-tab-item>\n\n  <div slot=\"content\"><p>Riepilogo.</p></div>\n  <div slot=\"content\"><p>Dettaglio.</p></div>\n</mds-tab>\n```\n\n#### Link Items via `href`\n\nSet `href` on every item to make the strip a navigation: each item is a link the browser follows instead of a tab switching a panel, so omit the `content` slot. `<mds-tab-item>` has no `target` prop, so a plain click opens the link in the same window; a modifier or middle click opens it in a new tab. In a single-page app, register the router once with `NavigationService` (from `@maggioli-design-system/magma/services`): a plain click on an item is then routed on the client, and the selection still moves.\n\n```html\n<mds-tab>\n  <mds-tab-item label=\"Pratiche\" href=\"/pratiche\" selected></mds-tab-item>\n  <mds-tab-item label=\"Documenti\" href=\"/documenti\"></mds-tab-item>\n  <mds-tab-item label=\"Pagamenti\" href=\"/pagamenti\"></mds-tab-item>\n</mds-tab>\n\n<script type=\"module\">\n  import { NavigationService } from '@maggioli-design-system/magma/services';\n\n  NavigationService.setHandler((href) => router.navigate(href));\n</script>\n```\n\nWithout a registered router, cancel the click on the item and route by hand: the component honours `preventDefault()`. Leave a modifier click alone, so that the browser opens the link in a new tab.\n\n```html\n<script>\n  document.querySelectorAll('mds-tab-item[href]').forEach((item) => {\n    item.addEventListener('click', (event) => {\n      if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) return;\n      event.preventDefault();\n      router.navigate(item.href);\n    });\n  });\n</script>\n```\n\n#### Async Loading Tab via `await`\n\nSet `await` while the tab's content is loading. The item renders an inline spinner and blocks interaction until you remove the attribute.\n\n```html\n<mds-tab>\n  <mds-tab-item label=\"Anteprima\" await selected></mds-tab-item>\n  <mds-tab-item label=\"Sorgente\"></mds-tab-item>\n\n  <div slot=\"content\"><p>Caricamento in corso...</p></div>\n  <div slot=\"content\"><p>Sorgente del documento.</p></div>\n</mds-tab>\n```\n\n#### Vertical Layout\n\nSet `direction=\"vertical\"` on the parent to stack the tabs alongside the panels.\n\n```html\n<mds-tab direction=\"vertical\">\n  <mds-tab-item label=\"Generale\" selected></mds-tab-item>\n  <mds-tab-item label=\"Sicurezza\"></mds-tab-item>\n  <mds-tab-item label=\"Notifiche\"></mds-tab-item>\n\n  <div slot=\"content\"><p>Impostazioni generali.</p></div>\n  <div slot=\"content\"><p>Impostazioni di sicurezza.</p></div>\n  <div slot=\"content\"><p>Preferenze notifiche.</p></div>\n</mds-tab>\n```\n\n#### CSS Customization\n\n`mds-tab-item` has no public CSS custom property: style it with its props (`size`, `icon`, `icon-position`), its `button` part and the public `--mds-tab-*` properties of the parent `mds-tab`. The resting, hover and selected states follow the parent and its `animation`. Use semantic color roles via `rgb(var(--magma-<role>))` so dark mode keeps working.\n\n```css\n.schede-contratto mds-tab {\n  --mds-tab-tabs-background: rgb(var(--magma-wash-soft));\n}\n.schede-contratto mds-tab-item::part(button) {\n  border-radius: var(--magma-radius-lg);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-tab-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-tab-item>` Outside `<mds-tab>`\n\nThe item communicates with its parent through Stencil's internal listener (`mdsTabItemSelect`); used standalone it has no tab-switching behavior and no aria context.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-item label=\"Dettagli\" selected></mds-tab-item>\n\n<!-- CORRECT -->\n<mds-tab>\n  <mds-tab-item label=\"Dettagli\" selected></mds-tab-item>\n  <div slot=\"content\"><p>Contenuto dei dettagli.</p></div>\n</mds-tab>\n```\n\n#### Do Not Wrap `<mds-tab-item>` in a Div or Other Element\n\nThe parent finds the items anywhere inside it, but it lays out and styles only its direct slot children (`::slotted(mds-tab-item)`): a wrapper takes their place in the tab strip, so the items lose the strip layout and their stacking above the slider indicator.\n\n```html\n<!-- INCORRECT -->\n<mds-tab>\n  <div class=\"tab-group\">\n    <mds-tab-item label=\"Uno\" selected></mds-tab-item>\n    <mds-tab-item label=\"Due\"></mds-tab-item>\n  </div>\n  <div slot=\"content\">...</div>\n  <div slot=\"content\">...</div>\n</mds-tab>\n\n<!-- CORRECT -->\n<mds-tab>\n  <mds-tab-item label=\"Uno\" selected></mds-tab-item>\n  <mds-tab-item label=\"Due\"></mds-tab-item>\n  <div slot=\"content\">...</div>\n  <div slot=\"content\">...</div>\n</mds-tab>\n```\n\n#### Do Not Set `selected=\"false\"` to Deselect\n\n`selected` is a boolean attribute; `selected=\"false\"` leaves a `selected` attribute on the element that contradicts the state, so attribute selectors and checks still read the item as selected. Remove the attribute entirely to deselect.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-item label=\"Archivio\" selected=\"false\"></mds-tab-item>\n\n<!-- CORRECT -->\n<mds-tab-item label=\"Archivio\"></mds-tab-item>\n```\n\n#### Do Not Slot `<mds-icon>` or HTML to Add an Icon\n\n`<mds-tab-item>` has no documented default slot for content; it is a button-like leaf element. Use the `icon` prop to add a glyph.\n\n```html\n<!-- INCORRECT -->\n<mds-tab-item>\n  <mds-icon name=\"mi/baseline/settings\"></mds-icon>\n  Impostazioni\n</mds-tab-item>\n\n<!-- CORRECT -->\n<mds-tab-item label=\"Impostazioni\" icon=\"mi/baseline/settings\"></mds-tab-item>\n```\n\n#### Do Not Override `size` on Individual Items When a Parent Size Is Set\n\nThe parent pushes its `size` down to every child item on load and whenever `size` changes. Setting `size` on individual items is overwritten and creates confusion about the source of truth.\n\n```html\n<!-- INCORRECT -->\n<mds-tab size=\"sm\">\n  <mds-tab-item label=\"Uno\" size=\"lg\" selected></mds-tab-item>\n  <mds-tab-item label=\"Due\" size=\"sm\"></mds-tab-item>\n  <div slot=\"content\">...</div>\n  <div slot=\"content\">...</div>\n</mds-tab>\n\n<!-- CORRECT -->\n<mds-tab size=\"sm\">\n  <mds-tab-item label=\"Uno\" selected></mds-tab-item>\n  <mds-tab-item label=\"Due\"></mds-tab-item>\n  <div slot=\"content\">...</div>\n  <div slot=\"content\">...</div>\n</mds-tab>\n```\n\n#### Do Not Pierce the Shadow DOM to Style the Inner Button\n\n`mds-tab-item` has no public CSS custom property: the only supported customization surface is the documented `button` shadow part and the public `--mds-tab-*` properties of the parent `mds-tab`. Targeting internals via `::part(button) >>> .button` or undocumented selectors couples your code to the implementation.\n\n```css\n/* INCORRECT */\nmds-tab-item::part(button) >>> .text {\n  font-weight: 900;\n}\n\n/* CORRECT */\nmds-tab {\n  --mds-tab-tabs-background: rgb(var(--magma-accent-surface));\n}\nmds-tab-item::part(button) {\n  border-radius: var(--magma-radius-lg);\n}\n```\n\n#### Do Not Mix Content Panels and Tab Items Without a 1-to-1 Pairing\n\nThe parent resolves each content panel by index, matching it to the `mds-tab-item` at the same position. A mismatch breaks it: with fewer `slot=\"content\"` elements than tab items a tab shows no panel, with more the component throws while wiring them and no panel gets hidden. No panel at all is fine: the strip then only reports the selection, or navigates when the items have `href`.\n\n```html\n<!-- INCORRECT - two items, one content panel -->\n<mds-tab>\n  <mds-tab-item label=\"Uno\" selected></mds-tab-item>\n  <mds-tab-item label=\"Due\"></mds-tab-item>\n  <div slot=\"content\"><p>Contenuto unico.</p></div>\n</mds-tab>\n\n<!-- CORRECT - one content panel per tab item -->\n<mds-tab>\n  <mds-tab-item label=\"Uno\" selected></mds-tab-item>\n  <mds-tab-item label=\"Due\"></mds-tab-item>\n  <div slot=\"content\"><p>Contenuto del tab Uno.</p></div>\n  <div slot=\"content\"><p>Contenuto del tab Due.</p></div>\n</mds-tab>\n```\n\n#### Do Not Mix a Link Item with Panel Tabs\n\nA strip is either a `tablist` of tabs, each controlling a panel, or a navigation of links (`href` on every item): a link inside a tablist is not a child the role allows. Keep the link out of the strip, as an `<mds-button>` next to it (see [`mds-tab`](../mds-tab/AGENTS.md)).\n\n```html\n<!-- INCORRECT -->\n<mds-tab>\n  <mds-tab-item label=\"Locale\" selected></mds-tab-item>\n  <mds-tab-item label=\"Portale\" href=\"https://portale.example.com\"></mds-tab-item>\n  <div slot=\"content\"><p>Vista locale.</p></div>\n  <div slot=\"content\"></div>\n</mds-tab>\n\n<!-- CORRECT -->\n<mds-tab>\n  <mds-tab-item label=\"Locale\" selected></mds-tab-item>\n  <div slot=\"content\"><p>Vista locale.</p></div>\n</mds-tab>\n<mds-button label=\"Portale\" href=\"https://portale.example.com\" target=\"blank\" tone=\"text\"></mds-button>\n```\n"
      },
      "props": [
        {
          "name": "animation",
          "type": "\"fade\" | \"slide\" | undefined",
          "complexType": {
            "original": "HorizontalActionsAnimationType",
            "resolved": "\"fade\" | \"slide\" | undefined",
            "references": {
              "HorizontalActionsAnimationType": {
                "location": "import",
                "path": "@type/animation",
                "id": "src/type/animation.ts::HorizontalActionsAnimationType",
                "referenceLocation": "HorizontalActionsAnimationType"
              }
            }
          },
          "mutable": false,
          "attr": "animation",
          "reflectToAttr": true,
          "docs": "Reflects the parent tab selection animation (set by mds-tab); drives the\nslide-variant styling without :host-context",
          "docsTags": [],
          "values": [
            {
              "value": "fade",
              "type": "string"
            },
            {
              "value": "slide",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "await",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "await",
          "reflectToAttr": true,
          "docs": "Specifies if the button is awaiting for a response",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "direction",
          "type": "\"horizontal\" | \"vertical\" | undefined",
          "complexType": {
            "original": "DirectionType",
            "resolved": "\"horizontal\" | \"vertical\" | undefined",
            "references": {
              "DirectionType": {
                "location": "import",
                "path": "@component/mds-tab/meta/type",
                "id": "src/components/mds-tab/meta/type.ts::DirectionType",
                "referenceLocation": "DirectionType"
              }
            }
          },
          "mutable": false,
          "attr": "direction",
          "reflectToAttr": true,
          "docs": "Reflects the parent tab layout direction (set by mds-tab); drives the\nvertical layout without :host-context",
          "docsTags": [],
          "values": [
            {
              "value": "horizontal",
              "type": "string"
            },
            {
              "value": "vertical",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disabled",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "disabled",
          "reflectToAttr": true,
          "docs": "Specifies if the tab item is disabled or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "expanded",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "expanded",
          "reflectToAttr": false,
          "docs": "Specifies whether the popup the tab item opens is showing. Left unset the tab says nothing\nabout a popup, which is what a tab that opens none has to say.",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "href",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "href",
          "reflectToAttr": true,
          "docs": "Turns the tab into a link to this URL: the item renders a real anchor and is announced as a\nlink, not as a tab, with `aria-current` when selected. A client-side router registered with\n`NavigationService.setHandler()` (from `@maggioli-design-system/magma/services`) takes the\nplain clicks over; without one, a click listener on the host can still cancel the navigation\nwith `preventDefault()`.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "The icon displayed in the tab item",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "iconPosition",
          "type": "\"left\" | \"right\" | undefined",
          "complexType": {
            "original": "ButtonIconPositionType",
            "resolved": "\"left\" | \"right\" | undefined",
            "references": {
              "ButtonIconPositionType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonIconPositionType",
                "referenceLocation": "ButtonIconPositionType"
              }
            }
          },
          "mutable": false,
          "attr": "icon-position",
          "reflectToAttr": false,
          "docs": "Specifies the horizontal position of the icon displayed in the tab item",
          "docsTags": [
            {
              "name": "default",
              "text": "'left'"
            }
          ],
          "default": "'left'",
          "values": [
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            },
            {
              "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": "The label of the tab item",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Specifies if the tab item is selected or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "size",
          "type": "\"lg\" | \"md\" | \"sm\" | \"xl\" | undefined",
          "complexType": {
            "original": "ButtonSizeType",
            "resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\" | undefined",
            "references": {
              "ButtonSizeType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonSizeType",
                "referenceLocation": "ButtonSizeType"
              }
            }
          },
          "mutable": false,
          "attr": "size",
          "reflectToAttr": true,
          "docs": "Specifies the size for the tab item",
          "docsTags": [
            {
              "name": "default",
              "text": "'md'"
            }
          ],
          "default": "'md'",
          "values": [
            {
              "value": "lg",
              "type": "string"
            },
            {
              "value": "md",
              "type": "string"
            },
            {
              "value": "sm",
              "type": "string"
            },
            {
              "value": "xl",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "type",
          "type": "\"a\" | \"button\" | \"reset\" | \"submit\" | undefined",
          "complexType": {
            "original": "ButtonType",
            "resolved": "\"a\" | \"button\" | \"reset\" | \"submit\" | undefined",
            "references": {
              "ButtonType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonType",
                "referenceLocation": "ButtonType"
              }
            }
          },
          "mutable": false,
          "attr": "type",
          "reflectToAttr": false,
          "docs": "The type of the tab item element",
          "docsTags": [
            {
              "name": "default",
              "text": "'submit'"
            }
          ],
          "default": "'submit'",
          "values": [
            {
              "value": "a",
              "type": "string"
            },
            {
              "value": "button",
              "type": "string"
            },
            {
              "value": "reset",
              "type": "string"
            },
            {
              "value": "submit",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "Specifies an optional value to get from mdsTabItemSelect event",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsTabItemFocus",
          "detail": "MdsTabItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsTabItemEventDetail",
            "resolved": "MdsTabItemEventDetail",
            "references": {
              "MdsTabItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-tab-item/meta/event-detail.ts::MdsTabItemEventDetail",
                "referenceLocation": "MdsTabItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the tab item is selected",
          "docsTags": []
        },
        {
          "event": "mdsTabItemSelect",
          "detail": "MdsTabItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsTabItemEventDetail",
            "resolved": "MdsTabItemEventDetail",
            "references": {
              "MdsTabItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-tab-item/meta/event-detail.ts::MdsTabItemEventDetail",
                "referenceLocation": "MdsTabItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the tab item is selected",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-tab-item-default-background",
          "annotation": "prop",
          "docs": "Default background color of a tab item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-default-shadow",
          "annotation": "prop",
          "docs": "Default shadow of a tab item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-hover-background",
          "annotation": "prop",
          "docs": "Background color when hovering a tab item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-selected-background",
          "annotation": "prop",
          "docs": "Background color of a selected tab item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tab-item-selected-shadow",
          "annotation": "prop",
          "docs": "Shadow of a selected tab item.",
          "visibility": "internal"
        }
      ],
      "slots": [],
      "parts": [
        {
          "name": "button",
          "docs": "The `mds-button` of the tab"
        }
      ],
      "states": [],
      "dependents": [
        "mds-input-date-range",
        "mds-input-upload",
        "mds-pref-animation",
        "mds-pref-consumption",
        "mds-pref-contrast",
        "mds-pref-language",
        "mds-pref-mode",
        "mds-pref-theme"
      ],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-tab-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-input-date-range": [
          "mds-tab-item"
        ],
        "mds-input-upload": [
          "mds-tab-item"
        ],
        "mds-pref-animation": [
          "mds-tab-item"
        ],
        "mds-pref-consumption": [
          "mds-tab-item"
        ],
        "mds-pref-contrast": [
          "mds-tab-item"
        ],
        "mds-pref-language": [
          "mds-tab-item"
        ],
        "mds-pref-mode": [
          "mds-tab-item"
        ],
        "mds-pref-theme": [
          "mds-tab-item"
        ]
      },
      "storybook": "ui-tab-tab-item--docs"
    },
    {
      "filePath": "src/components/mds-table/mds-table.tsx",
      "encapsulation": "shadow",
      "tag": "mds-table",
      "readme": "# mds-table\n\n\n\nThis 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.\n",
      "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": "- Put `mds-table-header`, `mds-table-body`, `mds-table-footer` element/s."
        },
        {
          "name": "slot",
          "text": "batch-action - Put `mds-button` element/s."
        },
        {
          "name": "part",
          "text": "table-wrapper - Selects the element which wraps the table"
        },
        {
          "name": "part",
          "text": "table - Selects the table element"
        },
        {
          "name": "part",
          "text": "batch-actions - Selects the element which wraps the batch actions"
        },
        {
          "name": "part",
          "text": "batch-actions-wrapper - The bar of the batch actions, shown while the table is `selectable` and has `batch-action` content"
        },
        {
          "name": "category",
          "text": "data"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-table>` web component is the root container of the Magma Design System tabular data system. It wraps a native `<table>` and orchestrates a family of compound children (`mds-table-header`, `mds-table-body`, `mds-table-footer`, `mds-table-row`, `mds-table-cell`), propagating interaction, selection, and overflow state down to them.\n\n#### Semantic Behavior\n\n- **Compound parent**: The default slot must hold `mds-table-header` / `mds-table-body` / `mds-table-footer`; `<mds-table>` pushes its own `interactive` and `selectable` state onto every `mds-table-row` and the header/body. It is not used standalone.\n- **Selection model**: When `selectable` is set, rows expose a checkbox; the component aggregates the selected rows, mirrors the count to the header's tristate control, and flags that a selection exists so it is visible to CSS and consumers.\n- **Selection event**: Emits `mdsTableSelectionChange` (bubbles, composed) carrying `{ rows }`, an array of `{ index, value }` for every selected row. It follows every change of a row's `selected`, from its checkbox or from code, and `selectAll(select?)`; changes made together are announced once. Rows that arrive already `selected` (in the markup on load, or rendered later) are counted but not announced, as a native control fires no `change` for its initial value. Both are no-ops unless `selectable` is true.\n- **Live children**: Rows added or removed at runtime are re-wired with the table's interactive and selectable state and counted in the selection, so dynamically added rows behave consistently.\n- **Action overflow**: When rows carry a `[slot=\"action\"]`, rows flip into an overlaid-action mode once content exceeds the visible width. Rows and actions added after the first load are followed too: the header gains its Actions column and the new rows the overlay.\n- **Localization**: Resolves its display language from the page (`<html lang>`: `el`/`en`/`es`/`it`, otherwise `en`) for the batch-actions label.\n\n#### Properties & Visual Configurations\n\n- **`interactive`** highlights rows on mouseover; choose it for tables whose rows are clickable or navigable, not for purely static read-only data.\n- **`selectable`** turns on per-row checkbox selection and the aggregated header/batch-actions machinery; without it the selection methods and the `batch-action` slot are inert.\n- **`selection`** is a read-back flag that becomes true while at least one row is selected - it is managed internally, not something callers normally set.\n- **`sorting`** says who orders the rows when a sortable `mds-table-header-cell` changes direction. `internal` (default) moves the rows in the DOM; `external` leaves them where they are, so the application listens to `mdsTableHeaderCellSort` and renders the rows in the order asked. Choose `external` whenever the table shows one page of a larger set (with `mds-paginator`) or the order comes from a back end: sorting the DOM would only sort the page on screen.\n\n#### Other behavioral props\n\n- **`batch-action` slot** holds `mds-button` element/s; its bar renders only when `selectable` is on and at least one batch action is slotted, surfacing a live count badge of the current selection.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-table>` 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 Read-Only Table\n\nThe minimal structure: `mds-table-header` with one `mds-table-header-cell` per column, `mds-table-body` with `mds-table-row` children each containing `mds-table-cell` elements. All four subparts are required direct children - do not replace them with raw `<thead>`, `<tr>`, or `<td>` elements.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Email\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Data iscrizione\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Mario Rossi</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">mario.rossi@example.com</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">12 ottobre 1985</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Luigi Verdi</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">luigi.verdi@example.com</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">3 marzo 1993</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Layout: Fill the Container and Let the Table Scroll\n\n`<mds-table>` scrolls on its own: its rows sit in an inner wrapper with `overflow: auto`, so when the columns are wider than the table, the table scrolls horizontally inside its own border, and the row actions (`slot=\"action\"`) stay pinned to the visible right edge. It needs no `overflow-x-auto` wrapper of yours, but it needs two things from the page:\n\n- **All the width its container offers**: `w-full` on `<mds-table>`. When that container is a flex or grid item (a `main` next to a sidebar, a `1fr` column), also give the item `min-w-0`: a flex or grid item never shrinks below its content by default, so without it the item grows to the full width of the table and the whole page scrolls instead of the table.\n- **Cells on one line**: `text-wrap: nowrap` on the cells (`[&_mds-table-cell]:text-nowrap` on the table). Wrapping cells squeeze the columns into tall rows and the table never scrolls. `mds-text` with `typography` `paragraph`, `detail` or `caption` sets its own `text-wrap: pretty`, which wins over what it inherits from the cell, so target it too (`[&_mds-text]:text-nowrap`). A long free-text column can keep wrapping if it reads better.\n\n```html\n<div class=\"flex\">\n  <aside class=\"w-6400 shrink-0\">...</aside>\n  <main class=\"min-w-0 flex-1\">\n    <mds-table class=\"w-full [&_mds-table-cell]:text-nowrap [&_mds-text]:text-nowrap\">\n      <mds-table-header>\n        <mds-table-header-cell label=\"Protocollo\"></mds-table-header-cell>\n        <mds-table-header-cell label=\"Oggetto\"></mds-table-header-cell>\n        <mds-table-header-cell label=\"Ufficio\"></mds-table-header-cell>\n        <mds-table-header-cell label=\"Data\"></mds-table-header-cell>\n      </mds-table-header>\n      <mds-table-body>\n        <mds-table-row>\n          <mds-table-cell><mds-text typography=\"detail\">2026/0412</mds-text></mds-table-cell>\n          <mds-table-cell><mds-text typography=\"detail\">Contratto di fornitura servizi cloud 2026-2028</mds-text></mds-table-cell>\n          <mds-table-cell><mds-text typography=\"detail\">Ufficio acquisti e gare</mds-text></mds-table-cell>\n          <mds-table-cell><mds-text typography=\"detail\">12 marzo 2026</mds-text></mds-table-cell>\n        </mds-table-row>\n      </mds-table-body>\n    </mds-table>\n  </main>\n</div>\n```\n\nTo scroll vertically as well, bound the table's height: in a fixed-height panel, make the panel a flex column and give the table `flex-1 min-h-0` (or put `h-full` or a `max-h-*` on the table). The header row scrolls with the body, it is not sticky.\n\n```html\n<section class=\"flex h-9600 flex-col\">\n  <mds-table class=\"min-h-0 flex-1 [&_mds-table-cell]:text-nowrap [&_mds-text]:text-nowrap\">\n    ...\n  </mds-table>\n</section>\n```\n\nWithout Tailwind, the same rules in CSS:\n\n```css\n.content {\n  min-width: 0;\n}\n\n.content mds-table {\n  width: 100%;\n}\n\n.content mds-table-cell,\n.content mds-table-cell mds-text {\n  text-wrap: nowrap;\n}\n```\n\n#### Table with Footer\n\nAdd `mds-table-footer` after `mds-table-body` to show totals or summaries. Each cell inside the footer is an `mds-table-cell` - the same component used in body rows.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Voce\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Importo\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Servizio A</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">120,00 EUR</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Servizio B</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">80,00 EUR</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n  <mds-table-footer>\n    <mds-table-cell><mds-text typography=\"action\">Totale</mds-text></mds-table-cell>\n    <mds-table-cell><mds-text typography=\"action\">200,00 EUR</mds-text></mds-table-cell>\n  </mds-table-footer>\n</mds-table>\n```\n\n#### Interactive Rows\n\nSet `interactive` when rows are clickable or navigable. The prop propagates to every `mds-table-row` and highlights the hovered row. Do not reach into rows directly to set `interactive` - set it once on the parent.\n\n```html\n<mds-table interactive>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Utente\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Ruolo\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Anna Bianchi</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">Amministratore</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Carlo Neri</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">Operatore</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Row-Level Action Buttons\n\nSlot `mds-button` elements with `slot=\"action\"` directly inside `mds-table-row` (not inside `mds-table-cell`). The table detects the presence of action buttons and switches to overlay-action mode automatically when content overflows the visible width.\n\n```html\n<mds-table interactive>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Documento\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Stato\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Contratto 2024.pdf</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">Approvato</mds-text></mds-table-cell>\n      <mds-button\n        slot=\"action\"\n        icon=\"mi/baseline/download\"\n        title=\"Scarica documento\"\n        variant=\"dark\"\n        tone=\"text\"\n      ></mds-button>\n      <mds-button\n        slot=\"action\"\n        icon=\"mi/baseline/delete\"\n        title=\"Elimina documento\"\n        variant=\"error\"\n        tone=\"text\"\n      ></mds-button>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Row Selection and Selection Event\n\nSet `selectable` to add a checkbox to each row. Listen for `mdsTableSelectionChange` to receive the array of selected rows - each entry carries the row `index` and the optional `value` set on `mds-table-row`. Assign `value` to each row to distinguish selections in the event payload.\n\n```html\n<mds-table selectable id=\"tabella-utenti\">\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Reparto\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row value=\"usr-001\">\n      <mds-table-cell><mds-text typography=\"detail\">Giulia Russo</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">Contabilita</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"usr-002\">\n      <mds-table-cell><mds-text typography=\"detail\">Marco Ferrari</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">IT</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n\n<script>\n  document.getElementById('tabella-utenti').addEventListener('mdsTableSelectionChange', (e) => {\n    console.log('Righe selezionate:', e.detail.rows);\n    // e.detail.rows => [{ index: 0, value: 'usr-001' }, ...]\n  });\n</script>\n```\n\n#### Rows Selected on Load\n\nWrite `selected` on the rows that start selected, such as a selection the page restores. The table counts them when it loads, as after a click: the header box turns indeterminate (checked when every row is selected) and the bar of the batch actions shows how many. Rows rendered later already `selected` are counted the same way. `mdsTableSelectionChange` is not emitted for them, as a native control fires no `change` for its initial value: the application wrote them, so it already knows them.\n\n```html\n<mds-table selectable>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Pratica\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row value=\"2026/0097\" selected>\n      <mds-table-cell><mds-text typography=\"detail\">Iscrizione anagrafica</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"2026/0094\">\n      <mds-table-cell><mds-text typography=\"detail\">Certificato di residenza</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n  <mds-button slot=\"batch-action\" variant=\"primary\" tone=\"outline\" size=\"sm\">Archivia</mds-button>\n</mds-table>\n```\n\n#### Programmatic Select All\n\nCall the `selectAll()` method to select all rows at once; pass `false` to deselect. This is a no-op unless `selectable` is set.\n\n```html\n<mds-button id=\"btn-seleziona-tutti\" label=\"Seleziona tutti\" variant=\"primary\" tone=\"outline\"></mds-button>\n<mds-button id=\"btn-deseleziona\" label=\"Deseleziona tutti\" variant=\"dark\" tone=\"text\"></mds-button>\n\n<mds-table selectable id=\"tabella-doc\">\n  <mds-table-header>\n    <mds-table-header-cell label=\"Titolo\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row value=\"doc-1\">\n      <mds-table-cell><mds-text typography=\"detail\">Verbale assemblea</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"doc-2\">\n      <mds-table-cell><mds-text typography=\"detail\">Bilancio 2024</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n\n<script>\n  const table = document.getElementById('tabella-doc');\n  document.getElementById('btn-seleziona-tutti').addEventListener('click', () => table.selectAll());\n  document.getElementById('btn-deseleziona').addEventListener('click', () => table.selectAll(false));\n</script>\n```\n\n#### Batch Actions Bar\n\nSlot `mds-button` elements with `slot=\"batch-action\"` as direct children of `mds-table` alongside the body. The bar renders only when `selectable` is set and at least one batch-action button is present, a button added after load included; it shows a live count badge of the current selection and appears once a row is checked.\n\n```html\n<mds-table selectable>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Pratica\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Stato\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row value=\"prat-001\">\n      <mds-table-cell><mds-text typography=\"detail\">Pratica n. 1234</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">In lavorazione</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"prat-002\">\n      <mds-table-cell><mds-text typography=\"detail\">Pratica n. 5678</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">Chiusa</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n  <mds-button\n    slot=\"batch-action\"\n    icon=\"mi/outline/send\"\n    label=\"Invia selezionati\"\n    variant=\"dark\"\n    tone=\"text\"\n  ></mds-button>\n  <mds-button\n    slot=\"batch-action\"\n    icon=\"mi/outline/delete\"\n    label=\"Elimina selezionati\"\n    variant=\"error\"\n    tone=\"text\"\n  ></mds-button>\n</mds-table>\n```\n\n#### Sorting by the Back End, with Pages\n\nWhen the table shows one page of a larger set, set `sorting=\"external\"`: a click on a sortable header emits `mdsTableHeaderCellSort` with the column (`index`, and `sortKey` when the cell has `sort-key`) and the `direction`, and moves no row. The application asks the back end for the first page in that order and renders it; the header shows the direction (icon and `aria-sort`). A `direction` set by the application, for example restored from the address, is shown the same way.\n\n```html\n<mds-table id=\"practices\" sorting=\"external\">\n  <mds-table-header>\n    <mds-table-header-cell label=\"Numero\" sortable sort-key=\"number\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Ricevuta il\" sortable sort-key=\"received\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Oggetto\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <!-- the rows of the current page, rendered by the application -->\n  </mds-table-body>\n</mds-table>\n<mds-paginator id=\"pages\" pages=\"12\"></mds-paginator>\n```\n\n```js\nconst table = document.querySelector('#practices');\nconst pages = document.querySelector('#pages');\n\ntable.addEventListener('mdsTableHeaderCellSort', async (event) => {\n  const { sortKey, direction } = event.detail;\n  // direction \"none\" asks for the order of the back end\n  await loadPage({ page: 1, sort: direction === 'none' ? undefined : { sortKey, direction } });\n  pages.currentPage = 1;\n});\n```\n\n#### Styling Customization\n\nCustomize the table appearance only through its public `--mds-table-*` CSS custom properties: the background, the text colour and the cell padding. Set them on the host element or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and themes keep working.\n\n```css\n.tabella-contratti mds-table {\n  --mds-table-background: rgb(var(--magma-surface-raised));\n  --mds-table-cell-padding: calc(var(--spacing) * 500);\n  --mds-table-color: rgb(var(--magma-text-default));\n}\n```\n\nThe frame of the table and the lines inside it - between the rows, under the header, above the footer and at the edge of the batch actions panel - take the `--magma-border-muted` role, so frame and grid read as one and follow the theme and the colour mode.\n",
        "3. Mistakes": "Common incorrect uses of `<mds-table>`. 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 Replace Compound Subparts with Raw HTML Elements\n\n`<mds-table>` orchestrates its children via internal Stencil mechanisms. Substituting any subpart (`mds-table-header`, `mds-table-body`, `mds-table-row`, `mds-table-cell`) with a raw `<thead>`, `<tbody>`, `<tr>`, or `<td>` breaks propagation of `interactive`, `selectable`, and overflow state.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <thead>\n    <tr><th>Nome</th><th>Email</th></tr>\n  </thead>\n  <tbody>\n    <tr><td>Mario Rossi</td><td>mario.rossi@example.com</td></tr>\n  </tbody>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Email\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Mario Rossi</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">mario.rossi@example.com</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Do Not Slot Batch-Action Buttons Inside the Body\n\nThe `slot=\"batch-action\"` must be a direct child of `<mds-table>`, not nested inside `mds-table-body` or any row. The component looks for `:scope > [slot=\"batch-action\"]` on load and whenever its children change, and the bar will not appear if the slot is misplaced.\n\n```html\n<!-- INCORRECT -->\n<mds-table selectable>\n  <mds-table-body>\n    <mds-table-row>...</mds-table-row>\n    <mds-button slot=\"batch-action\" label=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n  </mds-table-body>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table selectable>\n  <mds-table-header>...</mds-table-header>\n  <mds-table-body>\n    <mds-table-row>...</mds-table-row>\n  </mds-table-body>\n  <mds-button slot=\"batch-action\" label=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n</mds-table>\n```\n\n#### Do Not Slot Row Action Buttons Inside `mds-table-cell`\n\nPer-row action buttons use `slot=\"action\"` on a direct child of `mds-table-row`, not wrapped inside an `mds-table-cell`. Placing them in a cell hides them (`mds-table-cell` has no `action` slot, so the button is not rendered) and breaks the overflow-detection logic that switches rows into overlay-action mode.\n\n```html\n<!-- INCORRECT -->\n<mds-table-row>\n  <mds-table-cell><mds-text typography=\"detail\">Contratto.pdf</mds-text></mds-table-cell>\n  <mds-table-cell>\n    <mds-button slot=\"action\" icon=\"mi/baseline/delete\" title=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n  </mds-table-cell>\n</mds-table-row>\n\n<!-- CORRECT -->\n<mds-table-row>\n  <mds-table-cell><mds-text typography=\"detail\">Contratto.pdf</mds-text></mds-table-cell>\n  <mds-button slot=\"action\" icon=\"mi/baseline/delete\" title=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n</mds-table-row>\n```\n\n#### Do Not Enable Batch Actions Without `selectable`\n\nThe batch-action bar only renders when `selectable` is set. Slotting batch-action buttons on a non-selectable table silently produces no bar and no selection count, causing the buttons to never appear.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-header>...</mds-table-header>\n  <mds-table-body>...</mds-table-body>\n  <mds-button slot=\"batch-action\" label=\"Esporta\" variant=\"primary\"></mds-button>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table selectable>\n  <mds-table-header>...</mds-table-header>\n  <mds-table-body>...</mds-table-body>\n  <mds-button slot=\"batch-action\" label=\"Esporta\" variant=\"primary\"></mds-button>\n</mds-table>\n```\n\n#### Do Not Set `interactive` on Individual Rows\n\n`interactive` is a table-level prop that propagates automatically to every `mds-table-row`. Setting it directly on individual rows bypasses the table's state management and leads to inconsistent behavior when rows are added or removed at runtime.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-body>\n    <mds-table-row interactive>...</mds-table-row>\n    <mds-table-row>...</mds-table-row>\n  </mds-table-body>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table interactive>\n  <mds-table-body>\n    <mds-table-row>...</mds-table-row>\n    <mds-table-row>...</mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Do Not Listen for Native `change` Events to Track Selection\n\nSelection state is communicated via the `mdsTableSelectionChange` custom event. Native `change` events from the internal checkboxes do not bubble out of the shadow DOM reliably; always use the documented Magma event.\n\n```html\n<!-- INCORRECT -->\n<mds-table selectable id=\"tbl\">...</mds-table>\n<script>\n  document.getElementById('tbl').addEventListener('change', (e) => {\n    // unreliable - native events do not bubble from shadow DOM\n  });\n</script>\n\n<!-- CORRECT -->\n<mds-table selectable id=\"tbl\">...</mds-table>\n<script>\n  document.getElementById('tbl').addEventListener('mdsTableSelectionChange', (e) => {\n    console.log('Righe selezionate:', e.detail.rows);\n  });\n</script>\n```\n\n#### Do Not Set `selection` Manually\n\n`selection` is a reflected read-back attribute managed internally by the table. It becomes `true` when at least one row is selected and is intended for CSS attribute selectors or conditional logic in the host app. Setting it from outside does not change which rows are selected and will be overwritten on the next selection update. The table emits `mdsTableSelectionChange` before it updates `selection`, so inside that listener read `e.detail.rows`, not the attribute.\n\n```html\n<!-- INCORRECT -->\n<mds-table selectable selection>\n  ...\n</mds-table>\n\n<!-- CORRECT - read it back, do not set it -->\n<mds-table selectable id=\"tbl\">\n  ...\n</mds-table>\n<script>\n  document.getElementById('tbl').addEventListener('mdsTableSelectionChange', (e) => {\n    const hasSelection = e.detail.rows.length > 0;\n    document.getElementById('panel-azioni').hidden = !hasSelection;\n  });\n</script>\n```\n"
      },
      "props": [
        {
          "name": "interactive",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "interactive",
          "reflectToAttr": false,
          "docs": "Specifies if the table rows are higlighted on mouseover event",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selectable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "selectable",
          "reflectToAttr": false,
          "docs": "Specifies if the table rows are selectable by a checkbox",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selection",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "selection",
          "reflectToAttr": true,
          "docs": "Indicates whether row selection is currently active in the table.",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "sorting",
          "type": "\"external\" | \"internal\" | undefined",
          "complexType": {
            "original": "MdsTableSortingType",
            "resolved": "\"external\" | \"internal\" | undefined",
            "references": {
              "MdsTableSortingType": {
                "location": "import",
                "path": "./meta/type",
                "id": "src/components/mds-table/meta/type.ts::MdsTableSortingType",
                "referenceLocation": "MdsTableSortingType"
              }
            }
          },
          "mutable": false,
          "attr": "sorting",
          "reflectToAttr": true,
          "docs": "Specifies who sorts the rows when a sortable header cell changes direction: `internal` moves\nthem in the DOM, `external` leaves them to the application, which listens to\n`mdsTableHeaderCellSort` and renders the rows in the order asked (a table that shows one page\nof a larger set)",
          "docsTags": [
            {
              "name": "default",
              "text": "'internal'"
            }
          ],
          "default": "'internal'",
          "values": [
            {
              "value": "external",
              "type": "string"
            },
            {
              "value": "internal",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "selectAll",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(select?: boolean) => Promise<void>",
            "parameters": [
              {
                "name": "select",
                "type": "boolean",
                "docs": ""
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "HTMLMdsTableRowElement": {
                "location": "global",
                "id": "global::HTMLMdsTableRowElement"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "selectAll(select?: boolean) => Promise<void>",
          "parameters": [
            {
              "name": "select",
              "type": "boolean",
              "docs": ""
            }
          ],
          "docs": "Selects all elements or none, works only if `selectable` is true.",
          "docsTags": []
        },
        {
          "name": "updateActions",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "updateActions() => Promise<void>",
          "parameters": [],
          "docs": "`internal` Reads again whether the rows have `slot=\"action\"` content: shows or hides the\nActions column of the header and wires the overlay of the actions. Runs when rows come and\ngo, and mds-table-row calls it when the content of its `action` slot changes.",
          "docsTags": []
        },
        {
          "name": "updateSelection",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              },
              "MdsTableRowSelection": {
                "location": "import",
                "path": "./meta/type",
                "id": "src/components/mds-table/meta/type.ts::MdsTableRowSelection",
                "referenceLocation": "MdsTableRowSelection"
              },
              "HTMLMdsTableRowElement": {
                "location": "global",
                "id": "global::HTMLMdsTableRowElement"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "updateSelection() => Promise<void>",
          "parameters": [],
          "docs": "`internal` Updates the selection data event and emits it, it's used to avoid add event listener to the dom and lower performance, works only if `selectable` is true.",
          "docsTags": []
        }
      ],
      "events": [
        {
          "event": "mdsTableSelectionChange",
          "detail": "MdsTableSelectionEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsTableSelectionEventDetail",
            "resolved": "MdsTableSelectionEventDetail",
            "references": {
              "MdsTableSelectionEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-table/meta/event-detail.ts::MdsTableSelectionEventDetail",
                "referenceLocation": "MdsTableSelectionEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the selection of a `selectable` table changes, with the index and the value of each\nselected row. It announces changes only: not the rows that arrive already `selected` (in the\nmarkup on load, or rendered later), which the table counts all the same, as a native control\nfires no `change` for its initial value",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-table-actions-gap",
          "annotation": "prop",
          "docs": "Gap between table action elements.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-background",
          "annotation": "prop",
          "docs": "Default background color of the table.",
          "visibility": "public"
        },
        {
          "name": "--mds-table-background-alt",
          "annotation": "prop",
          "docs": "Background color of the rows while a column sorts the table, and of the table behind them.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-border-color",
          "annotation": "prop",
          "docs": "Color of the frame of the table; the lines inside it take --mds-table-separator-color.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-border-width",
          "annotation": "prop",
          "docs": "Width of the table border.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-cell-padding",
          "annotation": "prop",
          "docs": "Padding inside table cells.",
          "visibility": "public"
        },
        {
          "name": "--mds-table-color",
          "annotation": "prop",
          "docs": "Default text color of the table.",
          "visibility": "public"
        },
        {
          "name": "--mds-table-color-alt",
          "annotation": "prop",
          "docs": "Text color of the rows while a column sorts the table.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-separator-color",
          "annotation": "prop",
          "docs": "Color of the lines inside the table: between the rows, under the header, above the footer and at the edge of the batch actions panel.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Put `mds-table-header`, `mds-table-body`, `mds-table-footer` element/s."
        },
        {
          "name": "batch-action",
          "docs": "Put `mds-button` element/s."
        }
      ],
      "parts": [
        {
          "name": "batch-actions",
          "docs": "Selects the element which wraps the batch actions"
        },
        {
          "name": "batch-actions-wrapper",
          "docs": "The bar of the batch actions, shown while the table is `selectable` and has `batch-action` content"
        },
        {
          "name": "table",
          "docs": "Selects the table element"
        },
        {
          "name": "table-wrapper",
          "docs": "Selects the element which wraps the table"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-badge"
      ],
      "dependencyGraph": {
        "mds-table": [
          "mds-text",
          "mds-badge"
        ],
        "mds-badge": [
          "mds-text"
        ]
      },
      "storybook": "layout-table--docs"
    },
    {
      "filePath": "src/components/mds-table-body/mds-table-body.tsx",
      "encapsulation": "shadow",
      "tag": "mds-table-body",
      "readme": "# mds-table-body\n\n\n\nThis 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.\n",
      "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": "- Put `mds-table-row` element/s."
        },
        {
          "name": "parent",
          "text": "mds-table"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-table-body>` web component is the row-group container of the Magma Design System tabular data system, used inside [`<mds-table>`](../mds-table/AGENTS.md). It is the equivalent of the native HTML `<tbody>`, grouping the data `mds-table-row` elements and relaying the parent table's interaction and selection styling to those rows.\n\n#### Semantic Behavior\n\n- **Compound child**: Must be a direct slot child of `<mds-table>` and hold only `mds-table-row` elements; it is not used standalone nor interleaved with `mds-table-header` / `mds-table-footer` content.\n- **Parent-driven state**: Both `interactive` and `selection` are set by the parent table, so consumers normally do not toggle them by hand.\n- **Live rows**: Rows added or removed at runtime are detected and re-wired with the table's interactive/selectable state.\n- **Hover relay**: When `interactive` is set, hovering the body highlights its rows.\n- **Last-row border trimming**: The last `mds-table-body` in a table clears the bottom border of its final row, so the final row does not double the table's own outer border.\n\n#### Properties & Visual Configurations\n\nThis component exposes only two boolean flags, both intended to be managed by the parent `<mds-table>` rather than set directly:\n\n- **`interactive`** enables the mouseover row-highlight styling for the group; it mirrors the table's own `interactive` prop.\n- **`selection`** switches the body's default background to its alternate tone to signal that an active selection exists; the parent sets it true while at least one row is selected.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-table-body>` 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 Table Body with Data Rows\n\nThe canonical form. Place `<mds-table-body>` as a direct slot child of [`<mds-table>`](../mds-table/AGENTS.md) and populate it with [`<mds-table-row>`](../mds-table-row/AGENTS.md) elements. The parent table wires `interactive` and `selection` automatically - do not set them by hand in most cases.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Ruolo\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Stato\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Marco Rossi</mds-table-cell>\n      <mds-table-cell>Amministratore</mds-table-cell>\n      <mds-table-cell>Attivo</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell>Laura Bianchi</mds-table-cell>\n      <mds-table-cell>Operatore</mds-table-cell>\n      <mds-table-cell>Inattivo</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Interactive Table (Row Hover Highlight)\n\nSet `interactive` on the parent `<mds-table>`. The table propagates the flag down to `<mds-table-body>` and every `<mds-table-row>`, applying the hover background without any extra wiring in the body markup.\n\n```html\n<mds-table interactive>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Documento\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Data\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Delibera n. 42</mds-table-cell>\n      <mds-table-cell>12/05/2025</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell>Determina n. 07</mds-table-cell>\n      <mds-table-cell>03/06/2025</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Selectable Table (Row Checkboxes)\n\nSet `selectable` on `<mds-table>`. The table equips every row with a checkbox and manages the `selection` state on `<mds-table-body>` - switching the body background to the alternate tone while at least one row is checked. Listen to `mdsTableSelectionChange` on the table for the current selection.\n\n```html\n<mds-table selectable id=\"tabella-utenti\">\n  <mds-table-header>\n    <mds-table-header-cell label=\"Utente\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Reparto\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row value=\"u1\">\n      <mds-table-cell>Giulia Verdi</mds-table-cell>\n      <mds-table-cell>Risorse Umane</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"u2\">\n      <mds-table-cell>Andrea Neri</mds-table-cell>\n      <mds-table-cell>Contabilita</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n\n<script>\n  document.querySelector('#tabella-utenti').addEventListener('mdsTableSelectionChange', (e) => {\n    console.log('Righe selezionate:', e.detail.rows);\n  });\n</script>\n```\n\n#### Selectable Table with Batch Actions\n\nWhen `selectable` is set and at least one `<mds-button>` is assigned to the `batch-action` slot on `<mds-table>`, the table renders a batch-action bar whenever rows are selected. The `<mds-table-body>` does not require any extra attributes for this.\n\n```html\n<mds-table selectable>\n  <mds-button slot=\"batch-action\" label=\"Archivia selezionati\" variant=\"primary\" tone=\"strong\"></mds-button>\n  <mds-button slot=\"batch-action\" label=\"Elimina selezionati\" variant=\"error\" tone=\"text\"></mds-button>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Pratica\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Richiedente\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row value=\"p1\">\n      <mds-table-cell>SUAP-2025-001</mds-table-cell>\n      <mds-table-cell>Mario Conti</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"p2\">\n      <mds-table-cell>SUAP-2025-002</mds-table-cell>\n      <mds-table-cell>Silvia Ricci</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Table with Header, Body, and Footer\n\nUse [`<mds-table-header>`](../mds-table-header/AGENTS.md), `<mds-table-body>`, and [`<mds-table-footer>`](../mds-table-footer/AGENTS.md) together inside `<mds-table>`. The body's last-row border is automatically trimmed where it meets the footer, so no manual border removal is needed.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Voce\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Importo\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Compenso servizio</mds-table-cell>\n      <mds-table-cell>1.200,00 EUR</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell>Rimborso spese</mds-table-cell>\n      <mds-table-cell>85,50 EUR</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n  <mds-table-footer>\n    <mds-table-cell>Totale</mds-table-cell>\n    <mds-table-cell>1.285,50 EUR</mds-table-cell>\n  </mds-table-footer>\n</mds-table>\n```\n\n#### Styling Customization via CSS Custom Properties\n\nOverride the two public `--mds-table-body-*` CSS custom properties, the default background and text colour of the rows, on the host or a parent selector. The hover highlight and the alternate tone shown during a selection follow the `interactive` and `selection` states. Use the semantic color roles wrapped in `rgb(var(--magma-<role>))` so dark mode and high-contrast modes stay consistent.\n\n```css\n.tabella-evidenziata mds-table-body {\n  --mds-table-body-background: rgb(var(--magma-surface-raised));\n  --mds-table-body-color: rgb(var(--magma-text-default));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-table-body>`. 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-table-body>` Outside `<mds-table>`\n\n`<mds-table-body>` is a compound child and relies on the parent table for `display: table-row-group` context and for receiving the `interactive` / `selection` flags. Used standalone, layout and state wiring both break.\n\n```html\n<!-- INCORRECT -->\n<mds-table-body>\n  <mds-table-row>\n    <mds-table-cell>Mario Rossi</mds-table-cell>\n  </mds-table-row>\n</mds-table-body>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Mario Rossi</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Do Not Put Raw `<tr>` / `<td>` Inside `<mds-table-body>`\n\nThe component's slot accepts only [`<mds-table-row>`](../mds-table-row/AGENTS.md) elements. Raw `<tr>` elements are not styled by the design-system tokens, do not receive hover or selection state, and skip accessibility roles.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-body>\n    <tr>\n      <td>Laura Bianchi</td>\n      <td>Operatore</td>\n    </tr>\n  </mds-table-body>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Laura Bianchi</mds-table-cell>\n      <mds-table-cell>Operatore</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Do Not Set `interactive` or `selection` Directly on the Body\n\nBoth flags are managed by the parent `<mds-table>`. Setting them by hand on `<mds-table-body>` will be overwritten the next time the table propagates its own state - and it creates a mismatch between the body state and the individual row states, which are also wired by the table.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-body interactive selection>\n    <mds-table-row>\n      <mds-table-cell>Giulia Verdi</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table interactive selectable>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Giulia Verdi</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Do Not Set Boolean Props as Strings\n\nStencil reads the exact string `\"false\"` as `false`, but `interactive=\"false\"` and `selection=\"false\"` leave the attribute on the element, and the body styles its hover and selection states on the attribute (`:host([interactive]:hover)`, `:host([selection])`), so they still apply. Remove the attribute to turn it off; never assign the string `\"false\"`.\n\n```html\n<!-- INCORRECT -->\n<mds-table-body interactive=\"false\" selection=\"false\">\n  ...\n</mds-table-body>\n\n<!-- CORRECT (attribute absent = prop is undefined / false) -->\n<mds-table-body>\n  ...\n</mds-table-body>\n```\n\n#### Do Not Customize via Undocumented Internal Selectors\n\nThe supported customization surface is the two public `--mds-table-body-*` CSS custom properties, `--mds-table-body-background` and `--mds-table-body-color`. Piercing the shadow DOM or targeting undocumented internal classes couples your code to the implementation and breaks on minor releases.\n\n```css\n/* INCORRECT */\nmds-table-body >>> tr {\n  background: lightyellow;\n}\n\n/* CORRECT */\nmds-table-body {\n  --mds-table-body-background: rgb(var(--magma-surface-muted));\n}\n```\n"
      },
      "props": [
        {
          "name": "interactive",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "interactive",
          "reflectToAttr": true,
          "docs": "Specifies whether the rows react to user interaction (hover/focus).",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selection",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "selection",
          "reflectToAttr": true,
          "docs": "Enables the selection column for the rows in this table body.",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-table-body-background",
          "annotation": "prop",
          "docs": "Default background color of table body rows.",
          "visibility": "public"
        },
        {
          "name": "--mds-table-body-background-alt",
          "annotation": "prop",
          "docs": "Alternate background color for table body rows.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-body-background-hover",
          "annotation": "prop",
          "docs": "Background color for table body rows on hover.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-body-color",
          "annotation": "prop",
          "docs": "Default text color for table body rows.",
          "visibility": "public"
        },
        {
          "name": "--mds-table-body-color-alt",
          "annotation": "prop",
          "docs": "Text color for alternate table body rows.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Put `mds-table-row` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "layout-table-body--docs"
    },
    {
      "filePath": "src/components/mds-table-cell/mds-table-cell.tsx",
      "encapsulation": "shadow",
      "tag": "mds-table-cell",
      "readme": "# mds-table-cell\n\n\n\nThis 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.\n",
      "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-table-row mds-table-footer"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-table-cell>` web component is the data-cell building block of the Magma table, designed to be slotted inside [`<mds-table-row>`](../mds-table-row/AGENTS.md). It plays the role of a single table cell (the equivalent of an HTML `<td>`) and wraps arbitrary content with the correct table semantics and styling.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct slot child of `<mds-table-row>` (or of `<mds-table-footer>`, which is itself a row). It is not used standalone, and a row should not mix cells with unrelated child types. The parent also injects its own `mds-table-cell` instances for the selection checkbox and row actions.\n- **Sorting contribution**: The cell does not sort anything itself, but its `value` is read by `mds-table-header-cell` when sorting a column. If `value` is unset, the header cell falls back to the cell's trimmed text content.\n- **Default slot passthrough**: Any text, HTML or component placed inside is projected as-is; there is no internal layout beyond styling.\n\n#### Properties & Visual Configurations\n\nThis component is essentially a layout/semantic child and exposes a single non-obvious prop:\n\n- **`value`**: Provide this when the cell's visible content is not directly comparable for sorting, when the displayed text differs from the value you want to sort by (e.g. a formatted date or currency string), or to get a numeric sort (two values that both read as numbers, such as `value=\"1250.50\"`, are compared numerically). When omitted, the column sort uses the rendered text content instead.\n\nThere are no `variant` or `tone` props; visual presentation is controlled through the public CSS custom properties listed in [`AGENTS.md`](AGENTS.md): the background and text colors. The cells of the sorted column (the column whose `mds-table-header-cell` has a `direction`) take an alternate tone of their own.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-table-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#### Plain Text Cell\n\nThe most common form. Wrap the text in [`<mds-text>`](../mds-text/AGENTS.md) to apply the correct typography style; do not put a bare string directly if you need semantic styling.\n\n```html\n<mds-table-row>\n  <mds-table-cell>\n    <mds-text typography=\"detail\">Mario Rossi</mds-text>\n  </mds-table-cell>\n  <mds-table-cell>\n    <mds-text typography=\"detail\">mario.rossi@esempio.it</mds-text>\n  </mds-table-cell>\n  <mds-table-cell>\n    <mds-text typography=\"detail\">12 ottobre 1985</mds-text>\n  </mds-table-cell>\n</mds-table-row>\n```\n\n#### Sortable Column - Value Matches Displayed Text\n\nWhen the column header is `sortable` and the displayed text is directly sortable as a string, no `value` prop is needed - the sort reads the cell's rendered text content automatically.\n\n```html\n<mds-table-header>\n  <mds-table-header-cell sortable label=\"Cognome\"></mds-table-header-cell>\n  <mds-table-header-cell sortable label=\"Nome\"></mds-table-header-cell>\n</mds-table-header>\n<mds-table-body>\n  <mds-table-row>\n    <mds-table-cell><mds-text typography=\"detail\">Rossi</mds-text></mds-table-cell>\n    <mds-table-cell><mds-text typography=\"detail\">Mario</mds-text></mds-table-cell>\n  </mds-table-row>\n  <mds-table-row>\n    <mds-table-cell><mds-text typography=\"detail\">Verdi</mds-text></mds-table-cell>\n    <mds-table-cell><mds-text typography=\"detail\">Luigi</mds-text></mds-table-cell>\n  </mds-table-row>\n</mds-table-body>\n```\n\n#### Sortable Column - Explicit `value` for Formatted Data\n\nWhen the cell displays a formatted string (currency, localized date, percentage) that does not sort lexicographically, set `value` to the raw comparable form. Values that both read as numbers are compared numerically.\n\n```html\n<mds-table-header>\n  <mds-table-header-cell sortable label=\"Importo\"></mds-table-header-cell>\n  <mds-table-header-cell sortable label=\"Data registrazione\"></mds-table-header-cell>\n</mds-table-header>\n<mds-table-body>\n  <mds-table-row>\n    <!-- numeric value for numeric sort -->\n    <mds-table-cell value=\"1250.50\">\n      <mds-text typography=\"detail\">1.250,50 EUR</mds-text>\n    </mds-table-cell>\n    <!-- value as ISO date string for correct chronological sort -->\n    <mds-table-cell value=\"2024-03-15\">\n      <mds-text typography=\"detail\">15 marzo 2024</mds-text>\n    </mds-table-cell>\n  </mds-table-row>\n  <mds-table-row>\n    <mds-table-cell value=\"340.00\">\n      <mds-text typography=\"detail\">340,00 EUR</mds-text>\n    </mds-table-cell>\n    <mds-table-cell value=\"2023-11-02\">\n      <mds-text typography=\"detail\">2 novembre 2023</mds-text>\n    </mds-table-cell>\n  </mds-table-row>\n</mds-table-body>\n```\n\n#### Cell Containing a Component\n\nThe default slot accepts any HTML or component. Use this to embed status badges, avatars, buttons, or other Magma components inside a cell.\n\n```html\n<mds-table-row>\n  <mds-table-cell>\n    <mds-text typography=\"detail\">Piano Pro</mds-text>\n  </mds-table-cell>\n  <mds-table-cell>\n    <mds-badge variant=\"success\" tone=\"weak\" label=\"Attivo\"></mds-badge>\n  </mds-table-cell>\n  <mds-table-cell>\n    <mds-avatar initials=\"MR\"></mds-avatar>\n  </mds-table-cell>\n</mds-table-row>\n```\n\n#### Footer Cell\n\n`<mds-table-cell>` is used inside [`<mds-table-footer>`](../mds-table-footer/AGENTS.md) for summary rows (totals, counts). The footer is never sorted, so `value` has no effect there.\n\n```html\n<mds-table-footer>\n  <mds-table-cell>\n    <mds-text typography=\"action\">Totale</mds-text>\n  </mds-table-cell>\n  <mds-table-cell>\n    <mds-text typography=\"action\">42 record</mds-text>\n  </mds-table-cell>\n</mds-table-footer>\n```\n\n#### Full Table Composition\n\nThe canonical structure. Each cell sits inside an `mds-table-row` of `mds-table-body`, or directly inside `mds-table-footer` (the header holds `mds-table-header-cell` elements instead), all wrapped by [`<mds-table>`](../mds-table/AGENTS.md).\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell sortable label=\"Utente\"></mds-table-header-cell>\n    <mds-table-header-cell sortable label=\"Email\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Stato\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell value=\"Mario Rossi\">\n        <mds-text typography=\"detail\">Mario Rossi</mds-text>\n      </mds-table-cell>\n      <mds-table-cell value=\"mario.rossi@esempio.it\">\n        <mds-text typography=\"detail\">mario.rossi@esempio.it</mds-text>\n      </mds-table-cell>\n      <mds-table-cell>\n        <mds-badge variant=\"success\" tone=\"weak\" label=\"Attivo\"></mds-badge>\n      </mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell value=\"Luigi Verdi\">\n        <mds-text typography=\"detail\">Luigi Verdi</mds-text>\n      </mds-table-cell>\n      <mds-table-cell value=\"luigi.verdi@esempio.it\">\n        <mds-text typography=\"detail\">luigi.verdi@esempio.it</mds-text>\n      </mds-table-cell>\n      <mds-table-cell>\n        <mds-badge variant=\"error\" tone=\"weak\" label=\"Disabilitato\"></mds-badge>\n      </mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n  <mds-table-footer>\n    <mds-table-cell><mds-text typography=\"action\">2 utenti</mds-text></mds-table-cell>\n    <mds-table-cell></mds-table-cell>\n    <mds-table-cell></mds-table-cell>\n  </mds-table-footer>\n</mds-table>\n```\n\n#### Styling Customization\n\nCustomize cell colors through the public `--mds-table-cell-*` CSS custom properties, the background and the text colour. Set them on the host or on a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode keeps working. The cells of the column the table is sorted by take an alternate tone of their own.\n\n```css\n/* Highlight a column of cells with a custom background */\n.tabella-fatture mds-table-cell.colonna-importo {\n  --mds-table-cell-background: rgb(var(--magma-info-emphasis));\n  --mds-table-cell-color: rgb(var(--magma-info-on-emphasis));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-table-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 `<mds-table-cell>` Outside Its Parent Hierarchy\n\n`<mds-table-cell>` is a compound child; it must be placed inside `<mds-table-row>` or `<mds-table-footer>` (themselves inside `<mds-table>`). Rendering it standalone breaks the table layout and ARIA semantics entirely.\n\n```html\n<!-- INCORRECT -->\n<div class=\"my-grid\">\n  <mds-table-cell>Nome</mds-table-cell>\n  <mds-table-cell>Email</mds-table-cell>\n</div>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Nome</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">Email</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Do Not Use `<td>` in Place of `<mds-table-cell>`\n\nUsing raw `<td>` inside `<mds-table-row>` bypasses Magma theming, the `sorted` state styles, and the sort-value integration. Always use `<mds-table-cell>`.\n\n```html\n<!-- INCORRECT -->\n<mds-table-row>\n  <td>Mario Rossi</td>\n  <td>mario.rossi@esempio.it</td>\n</mds-table-row>\n\n<!-- CORRECT -->\n<mds-table-row>\n  <mds-table-cell><mds-text typography=\"detail\">Mario Rossi</mds-text></mds-table-cell>\n  <mds-table-cell><mds-text typography=\"detail\">mario.rossi@esempio.it</mds-text></mds-table-cell>\n</mds-table-row>\n```\n\n#### Do Not Skip `value` When Displaying Formatted Data in a Sortable Column\n\nIf a cell shows a formatted value (localized date, currency, percentage) and the column is sortable, omitting `value` causes the sort to compare the human-readable strings lexicographically, producing wrong order.\n\n```html\n<!-- INCORRECT: \"12 marzo 2024\" sorts before \"2 gennaio 2024\" lexicographically -->\n<mds-table-cell>\n  <mds-text typography=\"detail\">12 marzo 2024</mds-text>\n</mds-table-cell>\n\n<!-- CORRECT: ISO date in value drives sort; display string is for humans -->\n<mds-table-cell value=\"2024-03-12\">\n  <mds-text typography=\"detail\">12 marzo 2024</mds-text>\n</mds-table-cell>\n```\n\n#### Do Not Style Cells by Piercing Shadow DOM\n\n`<mds-table-cell>` does not expose named `::part()` targets; the supported customization surface is the public `--mds-table-cell-background` and `--mds-table-cell-color`. Targeting internals via `>>>` or undocumented selectors couples your code to implementation details that can change.\n\n```css\n/* INCORRECT */\nmds-table-cell >>> span {\n  color: red;\n}\n\n/* CORRECT */\nmds-table-cell {\n  --mds-table-cell-color: rgb(var(--magma-danger-fg));\n}\n```\n\n#### Do Not Wrap `<mds-table-cell>` in Extra Structural Elements\n\nInserting a `<div>` or `<span>` wrapper around `<mds-table-cell>` inside `<mds-table-row>` breaks the `display: table-cell` layout model and disrupts the column alignment.\n\n```html\n<!-- INCORRECT -->\n<mds-table-row>\n  <div class=\"cell-wrapper\">\n    <mds-table-cell><mds-text typography=\"detail\">Cognome</mds-text></mds-table-cell>\n  </div>\n</mds-table-row>\n\n<!-- CORRECT -->\n<mds-table-row>\n  <mds-table-cell><mds-text typography=\"detail\">Cognome</mds-text></mds-table-cell>\n</mds-table-row>\n```\n"
      },
      "props": [
        {
          "name": "value",
          "type": "number | string | undefined",
          "complexType": {
            "original": "string | number",
            "resolved": "number | string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "Sets a value to help the sorting function from `mds-table-header-cell`, if not set it will be used the content of the cell.",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-table-cell-background",
          "annotation": "prop",
          "docs": "Default background color of table cells.",
          "visibility": "public"
        },
        {
          "name": "--mds-table-cell-background-alt",
          "annotation": "prop",
          "docs": "Background color of the cells of the sorted column.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-cell-color",
          "annotation": "prop",
          "docs": "Default text color of table cells.",
          "visibility": "public"
        },
        {
          "name": "--mds-table-cell-color-alt",
          "annotation": "prop",
          "docs": "Text color of the cells of the sorted column.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-table-footer",
        "mds-table-header",
        "mds-table-row"
      ],
      "dependencies": [],
      "dependencyGraph": {
        "mds-table-footer": [
          "mds-table-cell"
        ],
        "mds-table-header": [
          "mds-table-cell"
        ],
        "mds-table-row": [
          "mds-table-cell"
        ]
      },
      "storybook": "layout-table-cell--docs"
    },
    {
      "filePath": "src/components/mds-table-footer/mds-table-footer.tsx",
      "encapsulation": "shadow",
      "tag": "mds-table-footer",
      "readme": "# mds-table-footer\n\n\n\nThis 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.\n",
      "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 `mds-table-cell` element/s: the footer is itself a row, for totals and counts."
        },
        {
          "name": "parent",
          "text": "mds-table"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-table-footer>` web component is a structural child of [`<mds-table>`](../mds-table/AGENTS.md) that renders the footer row of a table - typically used for totals or summaries. Unlike the native `<tfoot>`, it is itself a row (`role=\"row\"`, `display: table-row`): its single slot takes `mds-table-cell` children directly, one per column.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct slot child of `<mds-table>`, alongside `mds-table-header` and `mds-table-body`; it is not used standalone or nested inside another child type.\n- **Structural passthrough**: It renders nothing but a single default slot - a purely structural wrapper with no rendered chrome of its own.\n- **Lines up with the rows**: The footer is no selectable data row, but it keeps the columns of one: in a `selectable` table the parent sets the footer's `selectable` and the footer adds an empty first cell, where the rows have their checkbox; when the rows have `slot=\"action\"` content on load, it adds an empty last cell, where the rows have their actions.\n\n#### Properties & Visual Configurations\n\n`<mds-table-footer>` has one prop, `selectable`, which `<mds-table>` sets: leave it to the parent. Its main API is its **default slot**, into which you place one `mds-table-cell` per column of your data, not counting the selection and actions columns. Visual styling (background, borders, cell padding) is inherited from the CSS custom properties defined on the parent `<mds-table>`.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-table-footer>` 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#### Summary Row with Column Labels\n\nThe most common pattern: a footer row that repeats the column headings as a visual anchor at the bottom of a long table. Place `mds-table-footer` as a direct child of [`mds-table`](../mds-table/AGENTS.md), after `mds-table-body`, containing one `mds-table-cell` per column.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Cognome e nome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Email\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Data\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Rossi Mario</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">m.rossi@example.it</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">12 ott 1985</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Verdi Luigi</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">l.verdi@example.it</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">3 mar 1993</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n  <mds-table-footer>\n    <mds-table-cell><mds-text typography=\"action\">Cognome e nome</mds-text></mds-table-cell>\n    <mds-table-cell><mds-text typography=\"action\">Email</mds-text></mds-table-cell>\n    <mds-table-cell><mds-text typography=\"action\">Data</mds-text></mds-table-cell>\n  </mds-table-footer>\n</mds-table>\n```\n\n#### Totals Row\n\nUse the footer to display computed totals or aggregated values that summarize the body rows. Cell content can be any component accepted by `mds-table-cell`.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Voce di spesa\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Importo\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Stato\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Licenze software</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">1.200,00 EUR</mds-text></mds-table-cell>\n      <mds-table-cell><mds-badge variant=\"success\" tone=\"weak\" label=\"Approvato\"></mds-badge></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Consulenza</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">3.500,00 EUR</mds-text></mds-table-cell>\n      <mds-table-cell><mds-badge variant=\"warning\" tone=\"weak\" label=\"In attesa\"></mds-badge></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n  <mds-table-footer>\n    <mds-table-cell><mds-text typography=\"action\">Totale</mds-text></mds-table-cell>\n    <mds-table-cell><mds-text typography=\"action\">4.700,00 EUR</mds-text></mds-table-cell>\n    <mds-table-cell></mds-table-cell>\n  </mds-table-footer>\n</mds-table>\n```\n\n#### Multiple Footer Rows\n\n`mds-table-footer` is a single row, so it never wraps `mds-table-row` (a row nested in a row breaks the column layout). When you need more than one footer row - for example a subtotal row followed by a grand total row - place one `mds-table-footer` per row, one after the other.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Descrizione\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Imponibile\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"IVA 22%\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Servizio A</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">800,00 EUR</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">176,00 EUR</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n  <mds-table-footer>\n    <mds-table-cell><mds-text typography=\"detail\">Subtotale</mds-text></mds-table-cell>\n    <mds-table-cell><mds-text typography=\"detail\">800,00 EUR</mds-text></mds-table-cell>\n    <mds-table-cell><mds-text typography=\"detail\">176,00 EUR</mds-text></mds-table-cell>\n  </mds-table-footer>\n  <mds-table-footer>\n    <mds-table-cell><mds-text typography=\"action\">Totale</mds-text></mds-table-cell>\n    <mds-table-cell><mds-text typography=\"action\">976,00 EUR</mds-text></mds-table-cell>\n    <mds-table-cell></mds-table-cell>\n  </mds-table-footer>\n</mds-table>\n```\n\n#### Cell-Level Styling via Parent `--mds-table-*` Custom Properties\n\n`mds-table-footer` has no public CSS custom property: it inherits visual styling from the public CSS custom properties defined on the parent `mds-table`. Set those properties on `mds-table` (or a wrapping selector) to restyle the background, the text colour and the cell padding uniformly across the whole table - including the footer. The line above the footer is part of the grid, so it takes the same colour as the other lines of the table. `--mds-table-cell-padding` takes a single length: the table also halves it and adds it to other measures.\n\n```css\n.bilancio-table mds-table {\n  --mds-table-background: rgb(var(--magma-surface-raised));\n  --mds-table-cell-padding: calc(var(--spacing) * 300);\n  --mds-table-color: rgb(var(--magma-text-default));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-table-footer>`. 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-table-footer` Outside `mds-table`\n\n`mds-table-footer` is a compound child and must be a direct slot child of [`mds-table`](../mds-table/AGENTS.md). Using it outside its parent breaks the internal layout communication and produces unstyled, structurally invalid output.\n\n```html\n<!-- INCORRECT -->\n<div class=\"table-wrapper\">\n  <mds-table-footer>\n    <mds-table-cell>Totale</mds-table-cell>\n  </mds-table-footer>\n</div>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-body><!-- ... --></mds-table-body>\n  <mds-table-footer>\n    <mds-table-cell><mds-text typography=\"action\">Totale</mds-text></mds-table-cell>\n  </mds-table-footer>\n</mds-table>\n```\n\n#### Do Not Put Raw Text or `<td>` Elements in the Footer Slot\n\nThe default slot of `mds-table-footer` accepts `mds-table-cell` elements. Raw text, `<td>`, or arbitrary HTML bypasses the shared border and padding tokens and yields a visually broken footer.\n\n```html\n<!-- INCORRECT -->\n<mds-table-footer>\n  <td>Cognome e nome</td>\n  <td>Email</td>\n</mds-table-footer>\n\n<!-- CORRECT -->\n<mds-table-footer>\n  <mds-table-cell><mds-text typography=\"action\">Cognome e nome</mds-text></mds-table-cell>\n  <mds-table-cell><mds-text typography=\"action\">Email</mds-text></mds-table-cell>\n</mds-table-footer>\n```\n\n#### Do Not Replace `mds-table-footer` with a `<tfoot>` Element\n\nUsing the native `<tfoot>` inside `mds-table` bypasses the shared CSS token cascade, border transition, and reduced-motion handling that `mds-table-footer` wires up. Always use the Magma component.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-body><!-- ... --></mds-table-body>\n  <tfoot>\n    <tr><td>Totale</td><td>4.700,00 EUR</td></tr>\n  </tfoot>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-body><!-- ... --></mds-table-body>\n  <mds-table-footer>\n    <mds-table-cell><mds-text typography=\"action\">Totale</mds-text></mds-table-cell>\n    <mds-table-cell><mds-text typography=\"action\">4.700,00 EUR</mds-text></mds-table-cell>\n  </mds-table-footer>\n</mds-table>\n```\n\n#### Do Not Style the Footer by Piercing Shadow DOM\n\n`mds-table-footer` has no public CSS custom property. Styling changes (background, text colour, cell spacing) must go through the public `--mds-table-*` custom properties on the parent `mds-table`. Targeting internals via `>>>` or undocumented selectors will break on future releases.\n\n```css\n/* INCORRECT */\nmds-table-footer >>> :host {\n  background: rgb(var(--magma-surface-raised));\n}\n\n/* CORRECT */\nmds-table {\n  --mds-table-background: rgb(var(--magma-surface-raised));\n  --mds-table-cell-padding: calc(var(--spacing) * 300);\n}\n```\n\n#### Do Not Use `mds-table-footer` as the Only Section of a Table\n\n`mds-table-footer` provides summary or totals context and is meaningful only when accompanied by `mds-table-body` (and usually `mds-table-header`). A footer-only table has no data for the summary to refer to.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-footer>\n    <mds-table-cell>Nessun dato disponibile</mds-table-cell>\n  </mds-table-footer>\n</mds-table>\n\n<!-- CORRECT: use mds-zero for empty states, or include mds-table-body -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Voce\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Nessun record</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n"
      },
      "props": [
        {
          "name": "selectable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "selectable",
          "reflectToAttr": false,
          "docs": "Adds an empty cell in the selection column, so that the cells of the footer line up with the\nones of the rows: `mds-table` sets it from its own `selectable`",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-table-cell` element/s: the footer is itself a row, for totals and counts."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-table-cell"
      ],
      "dependencyGraph": {
        "mds-table-footer": [
          "mds-table-cell"
        ]
      },
      "storybook": "layout-table-footer--docs"
    },
    {
      "filePath": "src/components/mds-table-header/mds-table-header.tsx",
      "encapsulation": "shadow",
      "tag": "mds-table-header",
      "readme": "# mds-table-header\n\n\n\nThis 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.\n",
      "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 `mds-table-header-cell` element/s, one per column: the header is itself the row of\nthe column headings."
        },
        {
          "name": "part",
          "text": "actions - The heading of the Actions column, shown while rows have `slot=\"action\"` content"
        },
        {
          "name": "parent",
          "text": "mds-table"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-table-header>` web component is the header region of a Magma table, used exclusively as a direct slot child of its parent [`<mds-table>`](../mds-table/AGENTS.md). It plays the role of an HTML `<thead>`/header row, hosting the column-header cells and, when selection is enabled, the master \"select all\" control.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be slotted directly inside `<mds-table>` alongside `mds-table-body` (and optionally `mds-table-footer`); it is not used standalone. It is itself the header row: its own default slot accepts `mds-table-header-cell` element(s), one per column.\n- **Parent-driven selection state**: When `selectable` is true the header renders a master checkbox that the parent keeps in sync - `indeterminate` for partial selection and `checked` when all rows are selected, rows selected in the markup on load included.\n- **Selection reported upward**: Toggling the master checkbox selects or deselects every row, after which the table re-emits its own `mdsTableSelectionChange` event.\n- **Automatic actions column**: When any row exposes a `[slot=\"action\"]`, the header appends an extra header cell (exposed as the `actions` shadow part) labelled with the localized \"actions\" string.\n- **Localized labels**: The select-all/select-none switch title and the actions label are localized (el/en/es/it). The title says what a click on the switch does: select every row, or deselect them once every row is selected, however they got selected.\n\n#### Properties & Visual Configurations\n\nThis child is configured almost entirely by its parent rather than by author-set attributes.\n\n- **`selectable`**: Toggles rendering of the leading master-checkbox column. It is not normally set by hand - `<mds-table>` propagates its own `selectable` prop down to the header, so enabling selection on the table is what surfaces this control here.\n\nBeyond `selectable`, content is provided through the default slot (`mds-table-header-cell` elements); there are no shared `variant`/`tone` ladders on this component.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-table-header>` 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 Column Headers\n\nPlace `<mds-table-header>` as a direct child of `<mds-table>` and fill its default slot with one `<mds-table-header-cell>` per column. Use the `label` prop on each cell - it is the only text source the cell needs.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Email\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Data registrazione\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <!-- mds-table-row elements -->\n  </mds-table-body>\n</mds-table>\n```\n\n#### Sortable Columns\n\nAdd the `sortable` attribute on the `<mds-table-header-cell>` elements whose column should be sortable. The cell cycles through `none`, `ascending`, and `descending` on each click and re-orders the corresponding body rows automatically.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell sortable label=\"Cognome\"></mds-table-header-cell>\n    <mds-table-header-cell sortable label=\"Data\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Note\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <!-- mds-table-row elements -->\n  </mds-table-body>\n</mds-table>\n```\n\n#### Selectable Table with Master Checkbox\n\nEnable row selection by adding `selectable` on `<mds-table>`. The table propagates the prop down to `<mds-table-header>`, which automatically renders the master \"select all\" checkbox as the first column. Never set `selectable` directly on `<mds-table-header>` - drive it from the table.\n\n```html\n<mds-table selectable>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Utente\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Ruolo\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row value=\"1\">\n      <mds-table-cell>Mario Rossi</mds-table-cell>\n      <mds-table-cell>Amministratore</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"2\">\n      <mds-table-cell>Giulia Bianchi</mds-table-cell>\n      <mds-table-cell>Editor</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Reacting to Selection Changes\n\nListen for `mdsTableSelectionChange` on `<mds-table>` to receive the array of selected rows whenever the master checkbox or any individual row checkbox changes.\n\n```html\n<mds-table selectable id=\"tabella-utenti\">\n  <mds-table-header>\n    <mds-table-header-cell label=\"Utente\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Stato\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row value=\"alice\">\n      <mds-table-cell>Alice Verdi</mds-table-cell>\n      <mds-table-cell>Attivo</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"bob\">\n      <mds-table-cell>Bob Neri</mds-table-cell>\n      <mds-table-cell>Sospeso</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n\n<script>\n  document.getElementById('tabella-utenti').addEventListener('mdsTableSelectionChange', (e) => {\n    console.log('Righe selezionate:', e.detail.rows);\n  });\n</script>\n```\n\n#### Actions Column - Automatic Header Cell\n\nWhen any `<mds-table-row>` exposes a `[slot=\"action\"]`, `<mds-table-header>` automatically appends a right-aligned, localized header cell (\"Action\", \"Azione\" in Italian). No extra markup is required in the header - just place your action buttons in the row slots. The column follows the rows at any time, not only on load: a table mounted empty and filled after a fetch gets it when the first row with actions arrives, and loses it when the last one goes (`<mds-table>` tells the header).\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Documento\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Dimensione\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Relazione annuale.pdf</mds-table-cell>\n      <mds-table-cell>2,4 MB</mds-table-cell>\n      <mds-button\n        slot=\"action\"\n        icon=\"mi/baseline/download\"\n        title=\"Scarica\"\n        variant=\"primary\"\n        tone=\"text\"\n      ></mds-button>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Batch Actions with Selection\n\nWhen `selectable` is set and the table has a `batch-action` slot, a batch-actions toolbar slides in whenever rows are selected. The toolbar is owned by `<mds-table>`: every selection change, from a row checkbox or from the master checkbox in `<mds-table-header>`, updates its count and visibility.\n\n```html\n<mds-table selectable>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome file\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Tipo\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row value=\"doc1\">\n      <mds-table-cell>contratto.pdf</mds-table-cell>\n      <mds-table-cell>PDF</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"doc2\">\n      <mds-table-cell>allegato.docx</mds-table-cell>\n      <mds-table-cell>Word</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n  <mds-button slot=\"batch-action\" label=\"Elimina selezionati\" variant=\"error\" tone=\"text\"></mds-button>\n  <mds-button slot=\"batch-action\" label=\"Esporta\" variant=\"primary\" tone=\"outline\"></mds-button>\n</mds-table>\n```\n\n#### Styling the Actions Part\n\nThe auto-generated actions header cell is exposed as the `actions` shadow part. Target it with `::part(actions)` to adjust alignment or other visual properties.\n\n```css\nmds-table-header::part(actions) {\n  text-align: center;\n  min-width: 8rem;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-table-header>`. 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-table-header>` Outside `<mds-table>`\n\n`<mds-table-header>` calls `this.host.closest('mds-table')` during load to wire up selection and action-column detection. Used standalone or inside a raw `<table>` it finds no table: the actions column is never detected, the master checkbox selects nothing, and every selection and sorting feature breaks.\n\n```html\n<!-- INCORRECT -->\n<table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n  </mds-table-header>\n</table>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body><!-- rows --></mds-table-body>\n</mds-table>\n```\n\n#### Do Not Slot `<mds-table-row>` Inside `<mds-table-header>`\n\nThe default slot of `<mds-table-header>` expects `<mds-table-header-cell>` elements - one per column. Slotting `<mds-table-row>` (a body-row component) into the header produces broken layout and wrong ARIA roles.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-row>\n      <mds-table-cell>Cognome</mds-table-cell>\n      <mds-table-cell>Email</mds-table-cell>\n    </mds-table-row>\n  </mds-table-header>\n  <mds-table-body><!-- rows --></mds-table-body>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Cognome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Email\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body><!-- rows --></mds-table-body>\n</mds-table>\n```\n\n#### Do Not Set `selectable` Directly on `<mds-table-header>`\n\n`selectable` on the header is an internal prop driven by `<mds-table>` - when the table loads and whenever its `selectable` changes, it pushes its own value down. Setting it by hand on the header bypasses that synchronisation path and can leave rows and the master checkbox out of sync.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-header selectable>\n    <mds-table-header-cell label=\"Utente\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body><!-- rows --></mds-table-body>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table selectable>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Utente\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body><!-- rows --></mds-table-body>\n</mds-table>\n```\n\n#### Do Not Add a Manual \"Actions\" Header Cell\n\nThe component detects `[slot=\"action\"]` children in the table body and appends the localized \"Azione\" header cell automatically. Adding your own header cell for actions doubles the column and misaligns the grid.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Azioni\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Mario Rossi</mds-table-cell>\n      <mds-button slot=\"action\" icon=\"mi/baseline/delete\" title=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Mario Rossi</mds-table-cell>\n      <mds-button slot=\"action\" icon=\"mi/baseline/delete\" title=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Do Not Call `setSelection` from Application Code\n\n`setSelection(selectedItems, totalItems)` is an internal method called by `<mds-table>` every time it counts the selected rows: on load, after each row selection change and when rows come and go. Calling it from application code duplicates the table's internal bookkeeping and can leave the checkbox in an inconsistent state. React to selection results via the `mdsTableSelectionChange` event instead.\n\n```html\n<!-- INCORRECT -->\n<script>\n  const header = document.querySelector('mds-table-header');\n  header.setSelection(2, 5); // do not call this from app code\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('mds-table').addEventListener('mdsTableSelectionChange', (e) => {\n    console.log('Selezione corrente:', e.detail.rows);\n  });\n</script>\n```\n\n#### Do Not Use Raw `<thead>` / `<th>` Instead of the Component\n\nMixing raw HTML table elements with the Magma compound disrupts the selection wiring, the automatic actions column, and the localized labels that `<mds-table-header>` provides.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <thead>\n    <tr>\n      <th>Nome</th>\n      <th>Email</th>\n    </tr>\n  </thead>\n  <mds-table-body><!-- rows --></mds-table-body>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Email\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body><!-- rows --></mds-table-body>\n</mds-table>\n```\n"
      },
      "props": [
        {
          "name": "selectable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "selectable",
          "reflectToAttr": false,
          "docs": "Enables the select-all checkbox in the header.",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "setActions",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(hasActions: boolean) => Promise<void>",
            "parameters": [
              {
                "name": "hasActions",
                "type": "boolean",
                "docs": "whether any row has actions"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "setActions(hasActions: boolean) => Promise<void>",
          "parameters": [
            {
              "name": "hasActions",
              "type": "boolean",
              "docs": "whether any row has actions"
            }
          ],
          "docs": "`internal` Shows or hides the Actions column: mds-table calls it whenever its rows gain or\nlose `slot=\"action\"` content, the header itself reads them only on load",
          "docsTags": [
            {
              "name": "param",
              "text": "hasActions whether any row has actions"
            }
          ]
        },
        {
          "name": "setSelection",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "(selectedItems: number, totalItems: number) => Promise<void>",
            "parameters": [
              {
                "name": "selectedItems",
                "type": "number",
                "docs": "the number of currently selected rows"
              },
              {
                "name": "totalItems",
                "type": "number",
                "docs": "the total number of selectable rows"
              }
            ],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "setSelection(selectedItems: number, totalItems: number) => Promise<void>",
          "parameters": [
            {
              "name": "selectedItems",
              "type": "number",
              "docs": "the number of currently selected rows"
            },
            {
              "name": "totalItems",
              "type": "number",
              "docs": "the total number of selectable rows"
            }
          ],
          "docs": "Updates the header's select-all state from the number of selected rows.",
          "docsTags": [
            {
              "name": "param",
              "text": "selectedItems the number of currently selected rows"
            },
            {
              "name": "param",
              "text": "totalItems the total number of selectable rows"
            }
          ]
        }
      ],
      "events": [],
      "listeners": [],
      "styles": [],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-table-header-cell` element/s, one per column: the header is itself the row of\nthe column headings."
        }
      ],
      "parts": [
        {
          "name": "actions",
          "docs": "The heading of the Actions column, shown while rows have `slot=\"action\"` content"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-table-cell",
        "mds-input-switch",
        "mds-table-header-cell"
      ],
      "dependencyGraph": {
        "mds-table-header": [
          "mds-table-cell",
          "mds-input-switch",
          "mds-table-header-cell"
        ],
        "mds-input-switch": [
          "mds-icon",
          "mds-text"
        ],
        "mds-table-header-cell": [
          "mds-button",
          "mds-text"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "layout-table-header--docs"
    },
    {
      "filePath": "src/components/mds-table-header-cell/mds-table-header-cell.tsx",
      "encapsulation": "shadow",
      "tag": "mds-table-header-cell",
      "readme": "# mds-table-header-cell\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "part",
          "text": "action - The `mds-button` that sorts the column, with the `label`: only when `sortable`"
        },
        {
          "name": "part",
          "text": "label - The `label` of a column that is not `sortable`"
        },
        {
          "name": "parent",
          "text": "mds-table-header"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-table-header-cell>` web component is the column-header cell of a Magma data table. It is a compound child of [`<mds-table-header>`](../mds-table-header/AGENTS.md) and plays the role of a native `<th>` (`columnheader`), rendering the column label and, when enabled, acting as the interactive sort control for its column.\n\n#### Semantic Behavior\n\n- **Compound child only**: Must be placed as a direct slot child of `<mds-table-header>`; it is not used standalone, and its sorting acts on the body rows within the enclosing `mds-table`.\n- **Header role and ARIA sort**: Reflects its current sort state through `aria-sort`, mirroring the `direction` prop (`none` / `ascending` / `descending`).\n- **Position-based sorting**: The cell sorts the matching `mds-table-cell` of every body row by column position; values come from each cell's `value` (falling back to trimmed text), with numeric values compared numerically and others compared alphabetically. With `sorting=\"external\"` on the table it moves no row: the application renders them in the order asked.\n- **Tri-state sort cycle**: Each activation advances the column through `none` -> `ascending` -> `descending` and back to `none`; the `none` state restores the order the rows had before any column sorted them (rows removed in the meantime stay out, rows added go last).\n- **Sort event**: Every click emits `mdsTableHeaderCellSort`, which bubbles to the table, with `{ direction, index, sortKey }`: the new direction, the position of the column and its `sort-key`. A `direction` set by the application emits nothing, the application already knows it.\n- **Single active sort column**: Sorting a column resets every sibling header cell to `none`, so only one column drives the order at a time.\n- **Conditional rendering**: When `sortable` is set the cell renders a clickable sorter (with an up / down / unfold-more icon reflecting `direction`); otherwise it renders a plain label with no interaction.\n\n#### Properties & Visual Configurations\n\n- **`sortable`**: Opt a column into interactive sorting. Leave it unset for purely descriptive columns (label only); set it when the column's values should be reorderable by the user.\n- **`direction`**: The reflected sort state of the column (`none`, `ascending`, `descending`), which drives the sort icon and `aria-sort`. Set from outside (or in the markup) it acts like the clicks that lead there: it sorts the rows, or only shows the order with `sorting=\"external\"`, resets the other columns to `none`, and the next click goes on from it.\n- **`sortKey`** (`sort-key`): Names the column in `mdsTableHeaderCellSort`, typically the field the back end sorts by, so the application does not depend on the position of the column.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-table-header-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#### Plain Header Cell\n\nThe simplest form: a non-sortable column header that renders a styled label. Omit `sortable` for columns whose values should not be reordered.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Ruolo\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Stato\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Mario Rossi</mds-table-cell>\n      <mds-table-cell>Amministratore</mds-table-cell>\n      <mds-table-cell>Attivo</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Sortable Column Header\n\nAdd the `sortable` boolean attribute to enable the tri-state click cycle (`none` -> `ascending` -> `descending` -> `none`). The component manages sorting internally - no JavaScript wiring is required.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Cognome\" sortable></mds-table-header-cell>\n    <mds-table-header-cell label=\"Dipartimento\" sortable></mds-table-header-cell>\n    <mds-table-header-cell label=\"Note\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Bianchi</mds-table-cell>\n      <mds-table-cell>Risorse Umane</mds-table-cell>\n      <mds-table-cell>-</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell>Amendola</mds-table-cell>\n      <mds-table-cell>Informatica</mds-table-cell>\n      <mds-table-cell>-</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Mixing Sortable and Non-Sortable Columns\n\nPlace `sortable` only on columns whose values are meaningfully orderable. Action columns or complex-content columns should remain non-sortable.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"ID\" sortable></mds-table-header-cell>\n    <mds-table-header-cell label=\"Descrizione\" sortable></mds-table-header-cell>\n    <mds-table-header-cell label=\"Importo\" sortable></mds-table-header-cell>\n    <mds-table-header-cell label=\"Azioni\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell value=\"1\">1</mds-table-cell>\n      <mds-table-cell>Abbonamento annuale</mds-table-cell>\n      <mds-table-cell value=\"120\">120,00 EUR</mds-table-cell>\n      <mds-table-cell><mds-button label=\"Modifica\" tone=\"text\" variant=\"primary\"></mds-button></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell value=\"2\">2</mds-table-cell>\n      <mds-table-cell>Licenza mensile</mds-table-cell>\n      <mds-table-cell value=\"15\">15,00 EUR</mds-table-cell>\n      <mds-table-cell><mds-button label=\"Modifica\" tone=\"text\" variant=\"primary\"></mds-button></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Providing Numeric Values for Correct Sort Order\n\nWhen a column displays formatted text (currency, percentages) but should sort numerically, set the `value` prop on each `<mds-table-cell>` to the raw numeric string. The header cell reads `value` first and falls back to text content.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Prodotto\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Punteggio\" sortable></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell>Prodotto A</mds-table-cell>\n      <mds-table-cell value=\"8.5\">8,5 / 10</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell>Prodotto B</mds-table-cell>\n      <mds-table-cell value=\"10\">10 / 10</mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell>Prodotto C</mds-table-cell>\n      <mds-table-cell value=\"2.3\">2,3 / 10</mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Setting the Direction from Outside\n\nSet `direction` to sort by a column without a click - for example from a sort order kept in the address. It sorts the rows as the clicks that lead there would, resets the other columns to `none`, and the next click goes on with the cycle from it. `none` brings back the original order. No `mdsTableHeaderCellSort` is emitted: the application set it.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Data\" sortable direction=\"descending\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Categoria\" sortable></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <!-- rows -->\n  </mds-table-body>\n</mds-table>\n```\n\n```js\ndocument.querySelector('mds-table-header-cell').direction = 'none';\n```\n\n#### Sorting by the Back End\n\nWhen the table shows one page of a larger set, give the table `sorting=\"external\"` and each sortable column a `sort-key`. A click then moves no row: listen to `mdsTableHeaderCellSort` and load the rows in the order asked. See the pattern with `mds-paginator` in [`mds-table`](../mds-table/AGENTS.md).\n\n```html\n<mds-table sorting=\"external\">\n  <mds-table-header>\n    <mds-table-header-cell label=\"Numero\" sortable sort-key=\"number\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Ricevuta il\" sortable sort-key=\"received\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <!-- the rows of the current page -->\n  </mds-table-body>\n</mds-table>\n```\n\n```js\ndocument.querySelector('mds-table').addEventListener('mdsTableHeaderCellSort', (event) => {\n  const { sortKey, direction } = event.detail; // 'received', 'descending'\n  loadFirstPage(direction === 'none' ? undefined : { sortKey, direction });\n});\n```\n\n#### Styling Customization\n\nTarget the `label` or `action` shadow parts for glyph-level overrides. Set them on the host or a parent selector.\n\n```css\nmds-table-header-cell::part(label) {\n  font-weight: var(--font-weight-semibold);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-table-header-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 Outside `mds-table-header`\n\n`<mds-table-header-cell>` is a compound child component and relies on traversing the DOM to locate its sibling cells and the `<mds-table-body>` for sorting. Using it outside `<mds-table-header>` breaks both the layout and the sort logic.\n\n```html\n<!-- INCORRECT -->\n<div class=\"table-head\">\n  <mds-table-header-cell label=\"Nome\" sortable></mds-table-header-cell>\n</div>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\" sortable></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body><!-- rows --></mds-table-body>\n</mds-table>\n```\n\n#### Do Not Let the Cells Sort a Table with Pages\n\nBy default a sortable header cell reorders the rows in the DOM. On a table that shows one page of a larger set that sorts the page on screen, not the data: the first row is not the first of the set.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Numero\" sortable></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body><!-- one page of rows --></mds-table-body>\n</mds-table>\n<mds-paginator pages=\"12\"></mds-paginator>\n\n<!-- CORRECT - the back end sorts, after mdsTableHeaderCellSort -->\n<mds-table sorting=\"external\">\n  <mds-table-header>\n    <mds-table-header-cell label=\"Numero\" sortable sort-key=\"number\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body><!-- one page of rows --></mds-table-body>\n</mds-table>\n<mds-paginator pages=\"12\"></mds-paginator>\n```\n\n#### Do Not Use `sortable=\"false\"` to Disable Sorting\n\n`sortable` is a boolean attribute. Stencil reads the exact string `\"false\"` as `false`, but the attribute stays on the element, where attribute selectors and any code that tests for its presence still read it as set. Remove the attribute entirely to produce a non-sortable header cell.\n\n```html\n<!-- INCORRECT -->\n<mds-table-header-cell label=\"Stato\" sortable=\"false\"></mds-table-header-cell>\n\n<!-- CORRECT -->\n<mds-table-header-cell label=\"Stato\"></mds-table-header-cell>\n```\n\n#### Do Not Slot Content Instead of Using the `label` Prop\n\nThe component renders its label through the `label` prop; there is no documented slot. Placing text or elements as children of the host puts them in an unsupported slot and they will not appear.\n\n```html\n<!-- INCORRECT -->\n<mds-table-header-cell sortable>\n  <span>Cognome</span>\n</mds-table-header-cell>\n\n<!-- CORRECT -->\n<mds-table-header-cell label=\"Cognome\" sortable></mds-table-header-cell>\n```\n\n#### Do Not Pierce Shadow DOM to Style the Sort Button\n\nThe sort button is an internal `<mds-button>` inside the shadow root. Use the documented `::part(action)` instead of undocumented selectors.\n\n```css\n/* INCORRECT */\nmds-table-header-cell >>> .action {\n  background-color: red;\n}\n\n/* CORRECT */\nmds-table-header-cell::part(action) {\n  /* use only documented part-level overrides */\n}\n```\n\n#### Do Not Wrap the Cell in a Native `<th>`\n\n`<mds-table-header-cell>` already carries `role=\"columnheader\"` and manages `aria-sort`. Wrapping it inside a native `<th>` doubles the ARIA semantics and produces invalid table structure.\n\n```html\n<!-- INCORRECT -->\n<thead>\n  <tr>\n    <th><mds-table-header-cell label=\"Nome\"></mds-table-header-cell></th>\n  </tr>\n</thead>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n  </mds-table-header>\n</mds-table>\n```\n"
      },
      "props": [
        {
          "name": "direction",
          "type": "\"ascending\" | \"descending\" | \"none\"",
          "complexType": {
            "original": "SortDirectionType",
            "resolved": "\"ascending\" | \"descending\" | \"none\"",
            "references": {
              "SortDirectionType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-table-header-cell/meta/types.ts::SortDirectionType",
                "referenceLocation": "SortDirectionType"
              }
            }
          },
          "mutable": true,
          "attr": "direction",
          "reflectToAttr": true,
          "docs": "Specifies the current sort direction of the column. Set from outside, it sorts the rows like a\nclick, or only shows the order when the table has `sorting=\"external\"`.",
          "docsTags": [
            {
              "name": "default",
              "text": "'none'"
            }
          ],
          "default": "'none'",
          "values": [
            {
              "value": "ascending",
              "type": "string"
            },
            {
              "value": "descending",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            }
          ],
          "optional": false,
          "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": "Sets a label for the cell",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "sortKey",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "sort-key",
          "reflectToAttr": true,
          "docs": "Names the column in the `mdsTableHeaderCellSort` event, for example the field the back end\nsorts by",
          "docsTags": [
            {
              "name": "example",
              "text": "'createdAt'"
            }
          ],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "sortable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "sortable",
          "reflectToAttr": true,
          "docs": "Tells the component to make the cell able to sort the table columns items",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsTableHeaderCellSort",
          "detail": "MdsTableHeaderCellSortEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsTableHeaderCellSortEventDetail",
            "resolved": "MdsTableHeaderCellSortEventDetail",
            "references": {
              "MdsTableHeaderCellSortEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-table-header-cell/meta/event-detail.ts::MdsTableHeaderCellSortEventDetail",
                "referenceLocation": "MdsTableHeaderCellSortEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the user changes the sort direction of the column, at every step of the cycle. With\n`sorting=\"external\"` on the table the rows are not moved: the application renders them in the\norder asked.",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [],
      "slots": [],
      "parts": [
        {
          "name": "action",
          "docs": "The `mds-button` that sorts the column, with the `label`: only when `sortable`"
        },
        {
          "name": "label",
          "docs": "The `label` of a column that is not `sortable`"
        }
      ],
      "states": [],
      "dependents": [
        "mds-table-header"
      ],
      "dependencies": [
        "mds-button",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-table-header-cell": [
          "mds-button",
          "mds-text"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-table-header": [
          "mds-table-header-cell"
        ]
      },
      "storybook": "layout-table-header-cell--docs"
    },
    {
      "filePath": "src/components/mds-table-row/mds-table-row.tsx",
      "encapsulation": "shadow",
      "tag": "mds-table-row",
      "readme": "# mds-table-row\n\n\n\nThis 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.\n",
      "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": "- Put `mds-table-cell` element/s."
        },
        {
          "name": "slot",
          "text": "action - Put `mds-button` element/s or other kind of actions as aside menu for the single row."
        },
        {
          "name": "parent",
          "text": "mds-table-body"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-table-row>` web component represents a single data row inside a [`<mds-table>`](../mds-table/AGENTS.md) (slotted through `mds-table-body`; `mds-table-header` and `mds-table-footer` are rows themselves). It wraps a set of `mds-table-cell` children, and optionally exposes a per-row selection checkbox and an aside actions menu.\n\n#### Semantic Behavior\n\n- **Compound child only**: `<mds-table-row>` must be slotted inside the `mds-table-body` of an `<mds-table>`; it is not used standalone and its default slot must contain `mds-table-cell` elements, not arbitrary markup.\n- **Parent-driven configuration**: `interactive`, `selectable`, and `overlayActions` are set by the parent `<mds-table>` on every row, so rows stay in sync with table state rather than being configured one by one.\n- **Selection reporting**: When `selectable` is on, the row renders a leading selection checkbox; toggling it updates the row's `selected` prop and tells the table to recompute and emit the table-level selection event.\n- **Selected as two-way state**: `selected` can be read and set by the parent to drive bulk select-all behavior.\n- **Actions menu**: An `action`-named slot, when present, renders an actions cell that floats correctly over the scrolling row.\n- **Localized accessibility labels**: The selection switch's title is localized (Select/Deselect row) across el/en/es/it.\n\n#### Properties & Visual Configurations\n\nMost props are orchestrated by the parent table rather than set directly by consumers:\n\n- **`interactive`**: mirrors the table's interactive mode (hover highlight); normally inherited from `<mds-table>` rather than set per row.\n- **`selectable`**: enables the leading selection switch; toggled by the table so all rows gain or lose selection together.\n- **`overlayActions`**: set by the table when the row content overflows horizontally, switching the actions menu to an overlay rendering so it stays reachable while scrolling.\n- **`selected`**: the row's current selection state; read and written by the parent for select-all and batch operations. Write it in the markup for a row that starts selected: the table counts it on load, without an `mdsTableSelectionChange`.\n- **`value`**: the identifying payload reported back in the table's selection event for this row - set this to the business key (e.g. record id) you need when handling selections.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-table-row>` 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 Row with Data Cells\n\nThe minimal form: slot one or more [`mds-table-cell`](../mds-table-cell/AGENTS.md) elements into the default slot. Always place `<mds-table-row>` inside [`mds-table-body`](../mds-table-body/AGENTS.md) - never standalone, and never inside `mds-table-header` / `mds-table-footer`, which are rows themselves.\n\n```html\n<mds-table>\n  <mds-table-header>\n    <mds-table-header-cell label=\"Nome\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Email\"></mds-table-header-cell>\n    <mds-table-header-cell label=\"Data\"></mds-table-header-cell>\n  </mds-table-header>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Mario Rossi</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">mario.rossi@example.com</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">12 ottobre 1985</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Luigi Verdi</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">luigi.verdi@example.com</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">3 marzo 1993</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Row with Per-Row Actions\n\nSlot one or more [`mds-button`](../mds-button/AGENTS.md) elements into the `action` slot to add a contextual actions menu that slides in on row hover. Use icon-only buttons with `aria-label` (or `title`) because the label has no space.\n\n```html\n<mds-table-row value=\"42\">\n  <mds-table-cell><mds-text typography=\"detail\">Documento riservato.pdf</mds-text></mds-table-cell>\n  <mds-table-cell><mds-text typography=\"detail\">2 MB</mds-text></mds-table-cell>\n  <mds-button\n    slot=\"action\"\n    icon=\"mi/baseline/download\"\n    title=\"Scarica\"\n    variant=\"primary\"\n    tone=\"text\"\n  ></mds-button>\n  <mds-button\n    slot=\"action\"\n    icon=\"mi/baseline/delete\"\n    title=\"Elimina\"\n    variant=\"error\"\n    tone=\"text\"\n  ></mds-button>\n</mds-table-row>\n```\n\n#### Row with Identifying `value`\n\nSet `value` to the business key (record id or slug) that the parent table should include in the `mdsTableSelectionChange` event detail. This wires the visual row to the data layer without any manual DOM traversal.\n\n```html\n<mds-table selectable>\n  <mds-table-body>\n    <mds-table-row value=\"user-101\">\n      <mds-table-cell><mds-text typography=\"detail\">Carla Bianchi</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">carla.bianchi@example.com</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"user-102\">\n      <mds-table-cell><mds-text typography=\"detail\">Federica Neri</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">federica.neri@example.com</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Selectable Table - Reading the Selection Event\n\nWhen the parent `<mds-table>` sets `selectable`, each row renders a leading checkbox automatically. Listen for `mdsTableSelectionChange` on the table - do not wire per-row events.\n\n```html\n<mds-table id=\"utenti\" selectable>\n  <mds-table-body>\n    <mds-table-row value=\"101\">\n      <mds-table-cell><mds-text typography=\"detail\">Mario Rossi</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"102\">\n      <mds-table-cell><mds-text typography=\"detail\">Luigi Verdi</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n\n<script>\n  document.getElementById('utenti').addEventListener('mdsTableSelectionChange', (e) => {\n    console.log('Righe selezionate:', e.detail.rows);\n  });\n</script>\n```\n\n#### Programmatic Selection\n\n`selected` is mutable and reflected. Set it from JavaScript to restore a previously saved selection state. The parent table follows it: it emits `mdsTableSelectionChange` and updates the header checkbox and the batch-action bar, once for the rows changed together. For bulk \"select all\" use the table's `selectAll()`.\n\n```html\n<mds-table selectable id=\"tabella-record\">\n  <mds-table-body>\n    <mds-table-row id=\"riga-principale\" value=\"rec-1\">\n      <mds-table-cell><mds-text typography=\"detail\">Record principale</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n\n<script>\n  // Select the row programmatically (e.g. after restoring from storage)\n  document.getElementById('riga-principale').selected = true;\n</script>\n```\n\n#### Interactive Table (Hover Highlight)\n\nSet `interactive` on the parent `<mds-table>` to enable per-row hover highlights. The prop is mirrored to each row by the table - do not set it on individual rows.\n\n```html\n<mds-table interactive>\n  <mds-table-body>\n    <mds-table-row value=\"p-01\">\n      <mds-table-cell><mds-text typography=\"detail\">Pratica 01</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">In lavorazione</mds-text></mds-table-cell>\n    </mds-table-row>\n    <mds-table-row value=\"p-02\">\n      <mds-table-cell><mds-text typography=\"detail\">Pratica 02</mds-text></mds-table-cell>\n      <mds-table-cell><mds-text typography=\"detail\">Completata</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Styling Customization\n\nA row takes its colours from the parent `mds-table-body` (and `mds-table`), and its hover, selected and sorted colours and the spacing of its actions follow its states. Restyle the rows through the public `--mds-table-body-*` or `--mds-table-*` properties of the parents. Use the semantic color roles wrapped in `rgb(var(--magma-<role>))` so dark mode and high-contrast modes stay consistent.\n\n```css\n/* Branded colours for the rows of a table */\n.tabella-brand mds-table-body {\n  --mds-table-body-background: rgb(var(--magma-surface-raised));\n  --mds-table-body-color: rgb(var(--magma-text-default));\n}\n```\n\nThe one public custom property of the row, `--mds-table-row-actions-background`, is read-only: it is the background the actions box paints in the current state of the row (at rest, on hover, while a column sorts a selectable table). Content of the `action` slot reads it to paint the same colour when it moves out of the box, for example a status that follows the part of a tall row on screen. Read it, never set it: the box sets it itself, so a value set from outside changes nothing.\n\n```html\n<mds-table interactive>\n  <mds-table-body>\n    <mds-table-row value=\"p-01\">\n      <mds-table-cell><mds-text typography=\"detail\">Pratica 01</mds-text></mds-table-cell>\n      <mds-text slot=\"action\" typography=\"detail\" class=\"bg-(--mds-table-row-actions-background)\">Copiato</mds-text>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-table-row>`. 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-table-row>` Standalone\n\n`<mds-table-row>` is a compound child component and must be slotted inside the [`mds-table-body`](../mds-table-body/AGENTS.md) of an [`mds-table`](../mds-table/AGENTS.md). Using it outside the table subtree breaks layout and the internal parent-child communication that drives selection and interactive state.\n\n```html\n<!-- INCORRECT -->\n<div class=\"my-list\">\n  <mds-table-row>\n    <mds-table-cell>Mario Rossi</mds-table-cell>\n  </mds-table-row>\n</div>\n\n<!-- CORRECT -->\n<mds-table>\n  <mds-table-body>\n    <mds-table-row>\n      <mds-table-cell><mds-text typography=\"detail\">Mario Rossi</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Do Not Put Arbitrary HTML in the Default Slot\n\nThe default slot of `<mds-table-row>` accepts only [`mds-table-cell`](../mds-table-cell/AGENTS.md) elements. Slotting raw `<td>`, `<div>`, or other markup breaks the table layout model and the sort/selection logic that relies on `mds-table-cell` identity.\n\n```html\n<!-- INCORRECT -->\n<mds-table-row>\n  <td>Mario Rossi</td>\n  <div>mario.rossi@example.com</div>\n</mds-table-row>\n\n<!-- CORRECT -->\n<mds-table-row>\n  <mds-table-cell><mds-text typography=\"detail\">Mario Rossi</mds-text></mds-table-cell>\n  <mds-table-cell><mds-text typography=\"detail\">mario.rossi@example.com</mds-text></mds-table-cell>\n</mds-table-row>\n```\n\n#### Do Not Set `interactive` or `selectable` Directly on Individual Rows\n\nBoth props are orchestrated by the parent `<mds-table>` and propagated to every row automatically. Setting them per-row creates a desynchronized state where some rows behave differently from others, and the table's own state machine does not know about the override.\n\n```html\n<!-- INCORRECT -->\n<mds-table>\n  <mds-table-body>\n    <mds-table-row interactive selectable>\n      <mds-table-cell><mds-text typography=\"detail\">Pratica 01</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n\n<!-- CORRECT -->\n<mds-table interactive selectable>\n  <mds-table-body>\n    <mds-table-row value=\"p-01\">\n      <mds-table-cell><mds-text typography=\"detail\">Pratica 01</mds-text></mds-table-cell>\n    </mds-table-row>\n  </mds-table-body>\n</mds-table>\n```\n\n#### Do Not Listen for Row Events to Track Selection - Use the Table Event\n\n`<mds-table-row>` does not emit a public selection event. The table-level `mdsTableSelectionChange` event is the single aggregated source of truth for which rows are selected. Polling each row's `selected` attribute via MutationObserver or querying the DOM on every click is fragile and bypasses the table's own selection bookkeeping.\n\n```html\n<!-- INCORRECT -->\n<script>\n  document.querySelectorAll('mds-table-row').forEach((row) => {\n    row.addEventListener('click', () => {\n      console.log('selezionato:', row.selected);\n    });\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.querySelector('mds-table').addEventListener('mdsTableSelectionChange', (e) => {\n    console.log('Righe selezionate:', e.detail.rows);\n  });\n</script>\n```\n\n#### Do Not Slot Icon-Only Action Buttons Without an Accessible Name\n\nButtons in the `action` slot render without visible labels. An `<mds-button>` that has neither `label` nor `aria-label` / `title` falls back to the last segment of its icon slug (`delete`), which names the icon, not the action. Always provide `title` or `aria-label` on every action button.\n\n```html\n<!-- INCORRECT -->\n<mds-table-row>\n  <mds-table-cell><mds-text typography=\"detail\">Documento.pdf</mds-text></mds-table-cell>\n  <mds-button slot=\"action\" icon=\"mi/baseline/delete\" variant=\"error\" tone=\"text\"></mds-button>\n</mds-table-row>\n\n<!-- CORRECT -->\n<mds-table-row>\n  <mds-table-cell><mds-text typography=\"detail\">Documento.pdf</mds-text></mds-table-cell>\n  <mds-button\n    slot=\"action\"\n    icon=\"mi/baseline/delete\"\n    title=\"Elimina documento\"\n    variant=\"error\"\n    tone=\"text\"\n  ></mds-button>\n</mds-table-row>\n```\n\n#### Do Not Override Row Appearance with Inline Styles or Undocumented Selectors\n\n`mds-table-row` has no public CSS custom property and no shadow part: restyle the rows through the public `--mds-table-body-*` or `--mds-table-*` properties of the parents. Targeting internal shadow parts or setting `background-color` / `color` directly on the host element bypasses the interactive and selected state logic and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-table-row {\n  background-color: rgb(var(--magma-surface-raised));\n  color: rgb(var(--magma-text-default));\n}\nmds-table-row::part(actions) {\n  gap: 4px;\n}\n\n/* CORRECT */\nmds-table-body {\n  --mds-table-body-background: rgb(var(--magma-surface-raised));\n  --mds-table-body-color: rgb(var(--magma-text-default));\n}\n```\n"
      },
      "props": [
        {
          "name": "interactive",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "interactive",
          "reflectToAttr": true,
          "docs": "Specifies whether the row reacts to user interaction (hover/focus).",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "overlayActions",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "overlay-actions",
          "reflectToAttr": true,
          "docs": "Specifies whether the row's actions are shown as an overlay.",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selectable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "selectable",
          "reflectToAttr": true,
          "docs": "Specifies whether the row can be selected via a checkbox.",
          "docsTags": [
            {
              "name": "default",
              "text": "undefined"
            }
          ],
          "default": "undefined",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selected",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "selected",
          "reflectToAttr": true,
          "docs": "Specifies whether the row is currently selected.",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "selection",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "selection",
          "reflectToAttr": true,
          "docs": "Reflects the parent table selection state (set by mds-table); drives the\nrow action background without :host-context",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "value",
          "type": "number | string | undefined",
          "complexType": {
            "original": "string | number",
            "resolved": "number | string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "value",
          "reflectToAttr": true,
          "docs": "The value associated with the row, emitted when the row is selected.",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-table-row-actions-background",
          "annotation": "prop",
          "docs": "Read-only: the background the actions box paints in the current state of the row (at rest, on hover, while a column sorts a selectable table), for content of the `action` slot that paints it too when it moves out of the box. The box sets it itself, so a value set from outside changes nothing.",
          "visibility": "public"
        },
        {
          "name": "--mds-table-row-actions-gap",
          "annotation": "prop",
          "docs": "Gap spacing for actions inside table rows.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-row-background-alt",
          "annotation": "prop",
          "docs": "Background color of the rows while a column sorts the table.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-row-background-hover",
          "annotation": "prop",
          "docs": "Background color for table row on hover.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-row-color-alt",
          "annotation": "prop",
          "docs": "Text color of the rows while a column sorts the table.",
          "visibility": "internal"
        },
        {
          "name": "--mds-table-row-color-hover",
          "annotation": "prop",
          "docs": "Text color for table row on hover.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Put `mds-table-cell` element/s."
        },
        {
          "name": "action",
          "docs": "Put `mds-button` element/s or other kind of actions as aside menu for the single row."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-table-cell",
        "mds-input-switch"
      ],
      "dependencyGraph": {
        "mds-table-row": [
          "mds-table-cell",
          "mds-input-switch"
        ],
        "mds-input-switch": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "layout-table-row--docs"
    },
    {
      "filePath": "src/components/mds-text/mds-text.tsx",
      "encapsulation": "shadow",
      "tag": "mds-text",
      "readme": "# mds-text\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-text>` web component is the foundational typography primitive of the Magma Design System. It decouples the _semantic typography role_ of a piece of text from the _HTML element_ that renders it, replacing raw heading, paragraph, label and inline tags (`<h1>`-`<h6>`, `<p>`, `<span>`, `<label>`, `<code>`, ...) with a single design-tokenized text node that is consumed internally by nearly every other Magma component.\n\n#### Semantic Behavior\n\n- **Typography drives the rendered tag**: when `tag` is left unset, a sensible default element is resolved from the chosen `typography` (e.g. `typography=\"h2\"` -> `<h2>`, `paragraph`/`detail` -> `<p>`, `label`/`option` -> `<label>`, `snippet`/`hack` -> `<code>`, `tip` -> `<div>`). Setting `tag` explicitly overrides this.\n- **A title is written by its role**: `page`, `section`, `dialog`, `part` and `group` are the titles of the design language (`titles/page` and the others). Each takes the style of its role, the level the role is styled as (the title of a page is styled as `h3`, of a section and a dialog as `h5`, of a part and a group as `h6`), so a theme moves a role in one place. Left without `tag`, a role renders the tag of that level; the outline of the page sets the tag (`titles/tag-is-structure`), so the title of a page is `typography=\"page\" tag=\"h1\"`.\n- **Semantics vs. visual style are independent**: `typography` controls the visual ramp and the default element, but you may pin any allowed `tag` to keep the correct document outline (accessibility) while choosing a different visual scale.\n- **Text to read stops at the reading measure**: with the tag `p`, `li` or `figcaption` (`p` is the default of `detail` and `paragraph`) the host is capped at `max-w-text`, the reading measure (`--spacing-text`, `56ch`), as the reset caps the plain tags. The cap sits on the host, which carries the type style, so the `ch` is that of its own text; every other tag leaves the host as wide as its container.\n- **Text source is slot or prop**: text is normally provided through the default slot. Passing the `text` prop renders that string instead of the slotted content - required for the animation path, since the animation watches the `text` value.\n- **Default-slot is text only**: the default slot is intended for a plain text string; HTML elements or other components should not be slotted in. The one exception is `<mds-link>`, made to sit inside the text: it takes the font of the typography role and wraps with the words around it.\n- **Animated reveal**: with `animation=\"yugop\"` the component runs a randomized character \"decode\" reveal whenever the `text` prop changes after load (the initial value is rendered as is); `animation=\"none\"` (the default) skips all animation. The revealed string is always painted as text, never parsed as HTML.\n- **Animation tuning via CSS**: the yugop reveal reads `--mds-text-animation-speed` and `--mds-text-animation-placeholder-char`, so speed and placeholder glyph are themeable through CSS custom properties rather than props. They are read each time a reveal starts, so a value changed after load applies to the next reveal. The placeholder is one character (a longer string keeps its first one); a speed that is not a positive number, or an empty placeholder, falls back to the defaults (`0.5` and a space).\n\n#### Properties & Visual Configurations\n\n- **`typography`** selects the semantic text role from the shared typography ramp (titles `h1`-`h6` and `action`; informational `detail`, `paragraph`, `caption`, `label`, `option`, `tip`; monospaced `snippet`, `hack`) or, for a title, its role in the design language (`page`, `section`, `dialog`, `part`, `group`, values of `mds-text` only). It is the primary prop and also determines the default rendered tag. Defaults to `'detail'`.\n- **`variant`** refines the _tone of a typography role_ and is specific to this component - it is the typography variation (`'title'`, `'info'`, `'read'`, `'code'`), not the shared component tone/variant ladder. Only `'read'` has a visual effect, and only on `paragraph`, `detail` and `caption` (it switches them to the reading family); the other values change nothing, and leaving it unset uses the role's default styling.\n- **`tag`** is an escape hatch to force a specific HTML element independently of `typography`, e.g. rendering a visually large heading as a `<span>` or marking text as `<strong>`/`<em>`/`<mark>` without changing the visual scale.\n- **`truncate`** governs overflow clipping: `'word'` forces single-line truncation (no wrapping), `'all'` clamps to a multi-line block whose line count is controlled by `--mds-text-line-clamp`, and `'none'` lets text flow normally. `'word'` and `'none'` clip only the end of the line, for the ellipsis, so the accents and the descenders of the `label` and `option` typographies (whose box is trimmed to the capitals) stay visible. `'all'` has to hide the lines after the clamp: the accents of its first line stay visible, while the descenders of its last visible line (a cedilla, the tail of a comma) are cut where the box ends.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-text>` component, ordered from most common to most specialized. The examples assume a working knowledge of the typography ramp documented in [`agents/typography.md`](../../../../agents/typography.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Body Text via Default Slot\n\nThe canonical form for body copy. Slot a plain text string; `typography` defaults to `'detail'`, which renders a `<p>` element with the detail style.\n\n```html\n<mds-text>Inserisci il testo del messaggio nel campo sottostante.</mds-text>\n```\n\n#### A Title by Its Role\n\nWrite a title by what it is: `page`, `section`, `dialog`, `part` or `group`. Each takes the style of its role (the page as `h3`, a section and a dialog as `h5`, a part and a group as `h6`), and `tag` gives the level of its place in the outline: one `h1`, the title of the page.\n\n```html\n<mds-text typography=\"page\" tag=\"h1\">Pratiche di residenza</mds-text>\n<mds-text typography=\"section\" tag=\"h2\">Dati del richiedente</mds-text>\n<mds-text typography=\"part\" tag=\"h3\">Indirizzo di residenza</mds-text>\n```\n\n#### Choosing a Typography Role\n\nSet `typography` to match the semantic role. The component resolves the correct HTML element automatically - `h1`-`h6` emit heading elements, a title role emits the heading of the level it is styled as, `paragraph`/`detail` emit `<p>`, `label`/`option` emit `<label>`, `snippet`/`hack` emit `<code>`, `tip` and `action` emit `<div>` and `<span>` respectively.\n\n```html\n<mds-text typography=\"page\" tag=\"h1\">Benvenuto nel portale</mds-text>\n<mds-text typography=\"section\" tag=\"h2\">Impostazioni account</mds-text>\n<mds-text typography=\"paragraph\">Questo e' il corpo principale della pagina.</mds-text>\n<mds-text typography=\"caption\">Nota: i campi obbligatori sono contrassegnati con *</mds-text>\n<mds-text typography=\"label\">Nome utente</mds-text>\n<mds-text typography=\"tip\">Usa almeno 8 caratteri</mds-text>\n```\n\n#### Text via `text` Prop\n\nUse the `text` prop when the string comes from a JavaScript expression or data binding. This is also required for the `yugop` animation (see below) since the animation watches the prop value.\n\n```html\n<mds-text typography=\"detail\" text=\"Ultimo accesso: 3 giugno 2026\"></mds-text>\n```\n\n#### Reading Variant\n\nApply `variant=\"read\"` to `paragraph`, `detail`, or `caption` when rendering long-form editorial content. The reading variant keeps the same sizes but switches to the serif reading font (lighter for `paragraph` and `detail`), optimized for sustained reading.\n\n```html\n<mds-text typography=\"paragraph\" variant=\"read\">\n  Il regolamento definisce le modalita' di accesso ai servizi digitali\n  dell'amministrazione pubblica, in conformita' con le vigenti normative europee.\n</mds-text>\n\n<mds-text typography=\"detail\" variant=\"read\">\n  Fonte: Gazzetta Ufficiale, serie generale n. 128 del 4 giugno 2026.\n</mds-text>\n```\n\n#### A Link Inside the Text\n\nThe default slot takes plain text and one component, `<mds-link>`: a word or a phrase that links, with the font of the typography role, wrapping with the text around it.\n\n```html\n<mds-text typography=\"paragraph\">\n  Leggi l'<mds-link href=\"/privacy\">informativa sulla privacy</mds-link> prima di continuare.\n</mds-text>\n```\n\n#### Monospaced Code Styles\n\nUse `typography=\"snippet\"` for inline code values or short terminal output. Use `typography=\"hack\"` for a smaller monospaced size suited to code-dense interfaces.\n\n```html\n<mds-text typography=\"snippet\">SELECT * FROM utenti WHERE attivo = true;</mds-text>\n<mds-text typography=\"hack\">npm install @maggioli-design-system/magma</mds-text>\n```\n\n#### Overriding the Rendered Tag\n\n`tag` is an escape hatch to pin a specific HTML element when the `typography` default is semantically wrong - for example, rendering a visually large heading as a `<span>` for a non-heading context, or marking inline text as `<strong>` or `<em>` without changing the visual scale.\n\n```html\n<!-- Visually h2 scale but not a landmark heading -->\n<mds-text typography=\"h2\" tag=\"span\">Sezione in evidenza</mds-text>\n\n<!-- Emphasized inline detail without changing scale -->\n<mds-text typography=\"detail\" tag=\"strong\">Attenzione: questa operazione e' irreversibile.</mds-text>\n\n<!-- Marked text using caption scale -->\n<mds-text typography=\"caption\" tag=\"mark\">Modificato il 3 giugno 2026</mds-text>\n```\n\n#### Single-Line Truncation\n\nUse `truncate=\"word\"` to clamp text to a single line with an ellipsis when layout space is constrained, for example inside a table cell or card header.\n\n```html\n<div style=\"width: 200px;\">\n  <mds-text typography=\"detail\" truncate=\"word\">\n    Titolo molto lungo che supera la larghezza disponibile del contenitore\n  </mds-text>\n</div>\n```\n\n#### Multi-Line Clamp\n\nUse `truncate=\"all\"` to clamp text to a fixed number of lines. Control the number of visible lines via `--mds-text-line-clamp` (default 3).\n\n```html\n<mds-text typography=\"paragraph\" truncate=\"all\" style=\"--mds-text-line-clamp: 2;\">\n  Questo paragrafo mostra solo le prime due righe di testo, troncando il resto\n  con i puntini di sospensione indipendentemente dai caratteri di confine.\n</mds-text>\n```\n\n#### Animated Character Reveal\n\nSet `animation=\"yugop\"` together with the `text` prop to run a randomized character-decode reveal each time `text` changes; the initial value is rendered without animation. Tune the speed via `--mds-text-animation-speed`.\n\n```html\n<mds-text\n  typography=\"h3\"\n  animation=\"yugop\"\n  text=\"Benvenuto nel sistema\"\n  style=\"--mds-text-animation-speed: 1;\"\n></mds-text>\n```\n\n#### Custom Line-Clamp Count\n\nSet `--mds-text-line-clamp` on the component host (or a parent selector) to vary the clamp depth per context without duplicating attributes.\n\n```css\n.abstract mds-text {\n  --mds-text-line-clamp: 4;\n}\n\n.anteprima mds-text {\n  --mds-text-line-clamp: 2;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-text>`. 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 Slot HTML Elements in the Default Slot\n\nThe default slot accepts plain text strings only. HTML elements or components slotted inside are outside the supported API: they keep their own browser and page styles instead of following the typography role. The one exception is `<mds-link>`, a word of the sentence that takes the font of the role.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"paragraph\">\n  <strong>Attenzione:</strong> questa operazione e' <em>irreversibile</em>.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\">Attenzione: questa operazione e' irreversibile.</mds-text>\n<mds-text typography=\"paragraph\" tag=\"strong\">Attenzione:</mds-text>\n```\n\n#### Do Not Mix `text` Prop and Slotted Content\n\nWhen `text` is set, the component renders that string and ignores the slot entirely. Do not provide both - the slotted content is silently discarded.\n\n```html\n<!-- INCORRECT -->\n<mds-text text=\"Titolo dal prop\">Titolo dallo slot</mds-text>\n\n<!-- CORRECT -->\n<!-- Use either the prop (preferred for dynamic / animated content) -->\n<mds-text text=\"Titolo dal prop\"></mds-text>\n<!-- or the slot (convenient for static markup) -->\n<mds-text>Titolo dallo slot</mds-text>\n```\n\n#### Do Not Use `animation=\"yugop\"` Without the `text` Prop\n\nThe yugop animation requires the `text` prop because it watches prop changes to retrigger. Slotted content is not observed; changing it will not re-run the animation.\n\n```html\n<!-- INCORRECT -->\n<mds-text animation=\"yugop\">Testo animato dallo slot</mds-text>\n\n<!-- CORRECT -->\n<mds-text animation=\"yugop\" text=\"Testo animato dal prop\"></mds-text>\n```\n\n#### Do Not Apply an Invalid `variant` for the Chosen `typography`\n\n`variant` is specific to the typography role: only `paragraph`, `detail`, and `caption` accept `variant=\"read\"`. Applying `variant=\"read\"` to heading or label roles silently has no visual effect and adds misleading markup.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"h2\" variant=\"read\">Impostazioni</mds-text>\n<mds-text typography=\"label\" variant=\"read\">Nome</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"h2\">Impostazioni</mds-text>\n<mds-text typography=\"paragraph\" variant=\"read\">Testo editoriale lungo.</mds-text>\n```\n\n#### Do Not Style a Title by Its Level\n\nA title is written by its role, not by the level it happens to look like: a level ties the title to one style, and a theme that moves the title of a page would have to move every `h3`. Nor does the tag choose the style: the title of a page is the one `h1` of the page and keeps the style of its role.\n\n```html\n<!-- INCORRECT -->\n<mds-text typography=\"h1\">Pratiche di residenza</mds-text>\n<mds-text typography=\"h3\" tag=\"h1\">Pratiche di residenza</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"page\" tag=\"h1\">Pratiche di residenza</mds-text>\n```\n\n#### Do Not Use Raw HTML Headings Instead of `<mds-text>`\n\nReplace raw `<h1>`-`<h6>`, `<p>`, `<span>`, `<label>`, and `<code>` styled with generic utilities with `<mds-text>` in Magma-managed views (or apply the typography utilities of [`agents/typography.md`](../../../../agents/typography.md)). Generic sizes and weights bypass the design-token typography ramp, causing visual inconsistency across themes and sizes.\n\n```html\n<!-- INCORRECT -->\n<h2 class=\"text-2xl font-bold\">Riepilogo ordine</h2>\n<p class=\"text-sm text-fg-muted\">Totale: 128,00 EUR</p>\n\n<!-- CORRECT -->\n<mds-text typography=\"section\" tag=\"h2\">Riepilogo ordine</mds-text>\n<mds-text typography=\"caption\">Totale: 128,00 EUR</mds-text>\n```\n\n#### Do Not Reach Into Shadow DOM to Style Internal Elements\n\nThe component exposes three public `--mds-text-*` CSS custom properties for customization (the animation speed, the animation placeholder character and the line clamp); the other text styles are set on the host. Do not pierce the shadow DOM via `::part()` or `>>>` selectors targeting the internal `.text` element - that implementation detail is not a documented part and may change.\n\n```css\n/* INCORRECT */\nmds-text >>> .text {\n  letter-spacing: 0.1em;\n}\n\n/* CORRECT - set via host; the host styles cascade into the shadow text node */\nmds-text {\n  letter-spacing: 0.1em;\n}\n```\n\n#### Do Not Confuse `truncate=\"word\"` and `truncate=\"all\"`\n\n`truncate=\"word\"` forces **single-line** truncation. `truncate=\"all\"` enables **multi-line** clamping controlled by `--mds-text-line-clamp`. Using `\"word\"` when you want multi-line clamp will collapse the text to one line unexpectedly.\n\n```html\n<!-- INCORRECT - collapses to one line when two lines were intended -->\n<mds-text typography=\"paragraph\" truncate=\"word\" style=\"--mds-text-line-clamp: 2;\">\n  Testo lungo che dovrebbe mostrare due righe prima del troncamento.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\" truncate=\"all\" style=\"--mds-text-line-clamp: 2;\">\n  Testo lungo che dovrebbe mostrare due righe prima del troncamento.\n</mds-text>\n```\n\n#### Do Not Center Only the Lines of a Paragraph\n\nA paragraph (the tag `p`, the default of `detail` and `paragraph`) stops at the reading measure. In a wider column, `text-center` centers its lines inside a box that still starts at the left edge, so the text looks pushed to one side: center the box as well.\n\n```html\n<!-- INCORRECT - the lines are centered in a 56ch box at the start of the column -->\n<mds-text typography=\"paragraph\" class=\"text-center\">\n  Nessun risultato corrisponde ai filtri scelti.\n</mds-text>\n\n<!-- CORRECT -->\n<mds-text typography=\"paragraph\" class=\"mx-auto text-center\">\n  Nessun risultato corrisponde ai filtri scelti.\n</mds-text>\n```\n"
      },
      "props": [
        {
          "name": "animation",
          "type": "\"none\" | \"yugop\" | undefined",
          "complexType": {
            "original": "TextAnimationType",
            "resolved": "\"none\" | \"yugop\" | undefined",
            "references": {
              "TextAnimationType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-text/meta/types.ts::TextAnimationType",
                "referenceLocation": "TextAnimationType"
              }
            }
          },
          "mutable": false,
          "attr": "animation",
          "reflectToAttr": true,
          "docs": "Specifies if the text is animated when it is rendered",
          "docsTags": [
            {
              "name": "default",
              "text": "'none'"
            }
          ],
          "default": "'none'",
          "values": [
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "yugop",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tag",
          "type": "\"abbr\" | \"address\" | \"article\" | \"b\" | \"bdo\" | \"blockquote\" | \"cite\" | \"code\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"figcaption\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"i\" | \"ins\" | \"kbd\" | \"label\" | \"legend\" | \"li\" | \"mark\" | \"ol\" | \"p\" | \"pre\" | \"q\" | \"rb\" | \"rt\" | \"ruby\" | \"s\" | \"samp\" | \"small\" | \"span\" | \"strong\" | \"sub\" | \"summary\" | \"sup\" | \"time\" | \"u\" | \"ul\" | \"var\"",
          "complexType": {
            "original": "TypographyTagType",
            "resolved": "\"abbr\" | \"address\" | \"article\" | \"b\" | \"bdo\" | \"blockquote\" | \"cite\" | \"code\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"figcaption\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"i\" | \"ins\" | \"kbd\" | \"label\" | \"legend\" | \"li\" | \"mark\" | \"ol\" | \"p\" | \"pre\" | \"q\" | \"rb\" | \"rt\" | \"ruby\" | \"s\" | \"samp\" | \"small\" | \"span\" | \"strong\" | \"sub\" | \"summary\" | \"sup\" | \"time\" | \"u\" | \"ul\" | \"var\"",
            "references": {
              "TypographyTagType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyTagType",
                "referenceLocation": "TypographyTagType"
              }
            }
          },
          "mutable": true,
          "attr": "tag",
          "reflectToAttr": true,
          "docs": "Specifies the HTML tag of the element. With `p`, `li` or `figcaption` the text stops at the\nreading measure (`max-w-text`), as the reset does for the plain tags",
          "docsTags": [],
          "values": [
            {
              "value": "abbr",
              "type": "string"
            },
            {
              "value": "address",
              "type": "string"
            },
            {
              "value": "article",
              "type": "string"
            },
            {
              "value": "b",
              "type": "string"
            },
            {
              "value": "bdo",
              "type": "string"
            },
            {
              "value": "blockquote",
              "type": "string"
            },
            {
              "value": "cite",
              "type": "string"
            },
            {
              "value": "code",
              "type": "string"
            },
            {
              "value": "dd",
              "type": "string"
            },
            {
              "value": "del",
              "type": "string"
            },
            {
              "value": "details",
              "type": "string"
            },
            {
              "value": "dfn",
              "type": "string"
            },
            {
              "value": "div",
              "type": "string"
            },
            {
              "value": "dl",
              "type": "string"
            },
            {
              "value": "dt",
              "type": "string"
            },
            {
              "value": "em",
              "type": "string"
            },
            {
              "value": "figcaption",
              "type": "string"
            },
            {
              "value": "h1",
              "type": "string"
            },
            {
              "value": "h2",
              "type": "string"
            },
            {
              "value": "h3",
              "type": "string"
            },
            {
              "value": "h4",
              "type": "string"
            },
            {
              "value": "h5",
              "type": "string"
            },
            {
              "value": "h6",
              "type": "string"
            },
            {
              "value": "i",
              "type": "string"
            },
            {
              "value": "ins",
              "type": "string"
            },
            {
              "value": "kbd",
              "type": "string"
            },
            {
              "value": "label",
              "type": "string"
            },
            {
              "value": "legend",
              "type": "string"
            },
            {
              "value": "li",
              "type": "string"
            },
            {
              "value": "mark",
              "type": "string"
            },
            {
              "value": "ol",
              "type": "string"
            },
            {
              "value": "p",
              "type": "string"
            },
            {
              "value": "pre",
              "type": "string"
            },
            {
              "value": "q",
              "type": "string"
            },
            {
              "value": "rb",
              "type": "string"
            },
            {
              "value": "rt",
              "type": "string"
            },
            {
              "value": "ruby",
              "type": "string"
            },
            {
              "value": "s",
              "type": "string"
            },
            {
              "value": "samp",
              "type": "string"
            },
            {
              "value": "small",
              "type": "string"
            },
            {
              "value": "span",
              "type": "string"
            },
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "sub",
              "type": "string"
            },
            {
              "value": "summary",
              "type": "string"
            },
            {
              "value": "sup",
              "type": "string"
            },
            {
              "value": "time",
              "type": "string"
            },
            {
              "value": "u",
              "type": "string"
            },
            {
              "value": "ul",
              "type": "string"
            },
            {
              "value": "var",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "text",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "text",
          "reflectToAttr": true,
          "docs": "Specifies the text string to the component instead of passing an HTML node",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "truncate",
          "type": "\"all\" | \"none\" | \"word\" | undefined",
          "complexType": {
            "original": "TypographyTruncateType",
            "resolved": "\"all\" | \"none\" | \"word\" | undefined",
            "references": {
              "TypographyTruncateType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyTruncateType",
                "referenceLocation": "TypographyTruncateType"
              }
            }
          },
          "mutable": false,
          "attr": "truncate",
          "reflectToAttr": true,
          "docs": "Specifies if the text shoud be truncated or should behave as a normal text",
          "docsTags": [],
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "word",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"action\" | \"caption\" | \"detail\" | \"dialog\" | \"group\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"hack\" | \"label\" | \"option\" | \"page\" | \"paragraph\" | \"part\" | \"section\" | \"snippet\" | \"tip\"",
          "complexType": {
            "original": "TextTypographyType",
            "resolved": "\"action\" | \"caption\" | \"detail\" | \"dialog\" | \"group\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"hack\" | \"label\" | \"option\" | \"page\" | \"paragraph\" | \"part\" | \"section\" | \"snippet\" | \"tip\"",
            "references": {
              "TextTypographyType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-text/meta/types.ts::TextTypographyType",
                "referenceLocation": "TextTypographyType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": true,
          "docs": "Specifies the font typography of the element. A title is written by its role (`page`,\n`section`, `dialog`, `part`, `group`), which takes the style of that role, and the tag of\nthe level it is styled as unless `tag` gives the level of its place in the outline",
          "docsTags": [
            {
              "name": "default",
              "text": "'detail'"
            }
          ],
          "default": "'detail'",
          "values": [
            {
              "value": "action",
              "type": "string"
            },
            {
              "value": "caption",
              "type": "string"
            },
            {
              "value": "detail",
              "type": "string"
            },
            {
              "value": "dialog",
              "type": "string"
            },
            {
              "value": "group",
              "type": "string"
            },
            {
              "value": "h1",
              "type": "string"
            },
            {
              "value": "h2",
              "type": "string"
            },
            {
              "value": "h3",
              "type": "string"
            },
            {
              "value": "h4",
              "type": "string"
            },
            {
              "value": "h5",
              "type": "string"
            },
            {
              "value": "h6",
              "type": "string"
            },
            {
              "value": "hack",
              "type": "string"
            },
            {
              "value": "label",
              "type": "string"
            },
            {
              "value": "option",
              "type": "string"
            },
            {
              "value": "page",
              "type": "string"
            },
            {
              "value": "paragraph",
              "type": "string"
            },
            {
              "value": "part",
              "type": "string"
            },
            {
              "value": "section",
              "type": "string"
            },
            {
              "value": "snippet",
              "type": "string"
            },
            {
              "value": "tip",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"code\" | \"info\" | \"read\" | \"title\" | undefined",
          "complexType": {
            "original": "TypographyVariants",
            "resolved": "\"code\" | \"info\" | \"read\" | \"title\" | undefined",
            "references": {
              "TypographyVariants": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyVariants",
                "referenceLocation": "TypographyVariants"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the variant for `typography`",
          "docsTags": [],
          "values": [
            {
              "value": "code",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "read",
              "type": "string"
            },
            {
              "value": "title",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-text-animation-placeholder-char",
          "annotation": "prop",
          "docs": "Placeholder character used during text animation.",
          "visibility": "public"
        },
        {
          "name": "--mds-text-animation-speed",
          "annotation": "prop",
          "docs": "Speed of text animation.",
          "visibility": "public"
        },
        {
          "name": "--mds-text-line-clamp",
          "annotation": "prop",
          "docs": "Number of lines to clamp text to (line-clamp).",
          "visibility": "public"
        },
        {
          "name": "--mds-text-selection-background",
          "annotation": "prop",
          "docs": "Background color used when text is selected.",
          "visibility": "internal"
        },
        {
          "name": "--mds-text-selection-color",
          "annotation": "prop",
          "docs": "Text color used when text is selected.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [
        "mds-accordion-item",
        "mds-accordion-timer-item",
        "mds-badge",
        "mds-banner",
        "mds-benchmark-bar",
        "mds-bibliography",
        "mds-button",
        "mds-chip",
        "mds-file",
        "mds-file-preview",
        "mds-filter",
        "mds-filter-item",
        "mds-img",
        "mds-input-date-range",
        "mds-input-field",
        "mds-input-range",
        "mds-input-switch",
        "mds-input-tip-item",
        "mds-input-upload",
        "mds-keyboard",
        "mds-keyboard-key",
        "mds-kpi-item",
        "mds-label",
        "mds-list-item",
        "mds-mention",
        "mds-notification",
        "mds-paginator-item",
        "mds-policy-ai",
        "mds-pref",
        "mds-pref-animation",
        "mds-pref-consumption",
        "mds-pref-contrast",
        "mds-pref-language",
        "mds-pref-mode",
        "mds-pref-theme",
        "mds-price-table-features",
        "mds-price-table-features-cell",
        "mds-price-table-list-item",
        "mds-push-notification-item",
        "mds-quote",
        "mds-radial-progress",
        "mds-status-bar",
        "mds-stepper-bar-item",
        "mds-tab-bar-item",
        "mds-table",
        "mds-table-header-cell",
        "mds-toast",
        "mds-tooltip",
        "mds-url-view",
        "mds-usage"
      ],
      "dependencies": [],
      "dependencyGraph": {
        "mds-accordion-item": [
          "mds-text"
        ],
        "mds-accordion-timer-item": [
          "mds-text"
        ],
        "mds-badge": [
          "mds-text"
        ],
        "mds-banner": [
          "mds-text"
        ],
        "mds-benchmark-bar": [
          "mds-text"
        ],
        "mds-bibliography": [
          "mds-text"
        ],
        "mds-button": [
          "mds-text"
        ],
        "mds-chip": [
          "mds-text"
        ],
        "mds-file": [
          "mds-text"
        ],
        "mds-file-preview": [
          "mds-text"
        ],
        "mds-filter": [
          "mds-text"
        ],
        "mds-filter-item": [
          "mds-text"
        ],
        "mds-img": [
          "mds-text"
        ],
        "mds-input-date-range": [
          "mds-text"
        ],
        "mds-input-field": [
          "mds-text"
        ],
        "mds-input-range": [
          "mds-text"
        ],
        "mds-input-switch": [
          "mds-text"
        ],
        "mds-input-tip-item": [
          "mds-text"
        ],
        "mds-input-upload": [
          "mds-text"
        ],
        "mds-keyboard": [
          "mds-text"
        ],
        "mds-keyboard-key": [
          "mds-text"
        ],
        "mds-kpi-item": [
          "mds-text"
        ],
        "mds-label": [
          "mds-text"
        ],
        "mds-list-item": [
          "mds-text"
        ],
        "mds-mention": [
          "mds-text"
        ],
        "mds-notification": [
          "mds-text"
        ],
        "mds-paginator-item": [
          "mds-text"
        ],
        "mds-policy-ai": [
          "mds-text"
        ],
        "mds-pref": [
          "mds-text"
        ],
        "mds-pref-animation": [
          "mds-text"
        ],
        "mds-pref-consumption": [
          "mds-text"
        ],
        "mds-pref-contrast": [
          "mds-text"
        ],
        "mds-pref-language": [
          "mds-text"
        ],
        "mds-pref-mode": [
          "mds-text"
        ],
        "mds-pref-theme": [
          "mds-text"
        ],
        "mds-price-table-features": [
          "mds-text"
        ],
        "mds-price-table-features-cell": [
          "mds-text"
        ],
        "mds-price-table-list-item": [
          "mds-text"
        ],
        "mds-push-notification-item": [
          "mds-text"
        ],
        "mds-quote": [
          "mds-text"
        ],
        "mds-radial-progress": [
          "mds-text"
        ],
        "mds-status-bar": [
          "mds-text"
        ],
        "mds-stepper-bar-item": [
          "mds-text"
        ],
        "mds-tab-bar-item": [
          "mds-text"
        ],
        "mds-table": [
          "mds-text"
        ],
        "mds-table-header-cell": [
          "mds-text"
        ],
        "mds-toast": [
          "mds-text"
        ],
        "mds-tooltip": [
          "mds-text"
        ],
        "mds-url-view": [
          "mds-text"
        ],
        "mds-usage": [
          "mds-text"
        ]
      },
      "storybook": "design-typography--docs"
    },
    {
      "filePath": "src/components/mds-toast/mds-toast.tsx",
      "encapsulation": "shadow",
      "tag": "mds-toast",
      "readme": "# mds-toast\n\nThis 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.\n",
      "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": "slot",
          "text": "icon - Insert an icon image, it can be `HTML elements` or `components`, it is **recommended** to add `mds-icon` element."
        },
        {
          "name": "slot",
          "text": "action - Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "category",
          "text": "feedback"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-toast>` web component is the transient notification surface of the Magma Design System, used to surface brief, non-blocking feedback messages that appear over the viewport and auto-dismiss after a timeout. It has no native HTML equivalent and orchestrates its own visibility, positioning, and auto-close lifecycle.\n\n#### Semantic Behavior\n\n- **Announced**: The host is a status region (`role=\"status\"`): the message is read out when the toast shows it, without moving the focus. While not visible, the message is hidden from assistive technologies too, not only moved out of the viewport. Inside an `<mds-toast-region>` the region is the status region and the toast has no role of its own.\n- **Inside a region**: In an `<mds-toast-region>` the toast is laid out by the region, in a column with the other toasts visible at the same time, instead of being fixed at its edge on its own; the region gives it its `position`. A hidden toast in a region takes no room once its exit is over, and its entrance and exit are a short fade towards the edge.\n- **Auto-dismiss timer**: When `visible` is true and `duration` is a positive number, an internal timer counts down and then sets `visible` back to `false`; setting `duration` to `0` (or falsy) keeps the toast on screen until it is closed intentionally.\n- **The timer waits for the person**: The countdown stops while the pointer is over the toast or the focus is inside it (on its action, on its hide button), and goes on with the time that was left once both have left: the toast does not take its action away while the person is reading it or reaching the action.\n- **Hide button**: With `dismissible`, the toast shows at its end a button with an arrow towards the edge it leaves by (down at the bottom, up at the top), named in the current language and reachable with the keyboard; it hides the toast. It is an arrow and not a cross because the action next to it may itself be a cancel (\"Annulla\"): the arrow only sends the message away.\n- **Close event**: Whenever the toast hides, the component emits `mdsToastClose` once, after the outro animation - consumers should listen for this to remove the toast from the DOM or update queue state. The `reason` of its detail says who hid it: `timeout` (the `duration` ran out), `close` (the person, with the hide button) or `hide` (your code removed `visible`). A toast shown again before the outro is over emits nothing for that hiding.\n- **Reactive timer**: Showing the toast again (`visible` back to true) or changing `duration` at runtime restarts the countdown; hiding it stops the countdown, so a toast hidden by your code closes once, as `hide`, and never again as `timeout`.\n- **Conditional regions**: The text region renders only when the host has inner content, and the action region is shown only while a `[slot=\"action\"]` child is present, following the children added or removed later - empty slots produce no layout.\n- **Default-slot is text**: The default slot is intended for a plain text string only; icons go in the `icon` slot and interactive controls in the `action` slot.\n\n#### Properties & Visual Configurations\n\nThe shared `variant` / `tone` ladders are defined in [`agents/variants.md`](../../../../agents/variants.md); `<mds-toast>` consumes the theme variant set and the minimal tone set (`'strong'` / `'weak'`) without adding component-specific values.\n\n#### Other behavioral props\n\n- **`position`** anchors the toast to one of the six viewport corners/edges (top or bottom, left/center/right), driving both placement and the direction of the entry/exit animation; pick the edge that matches where users expect ephemeral feedback to surface.\n- **`visible`** is the controlled on/off switch for the toast; toggling it drives the show/hide animation and the auto-dismiss timer rather than mounting or unmounting the element.\n- **`duration`** is the visibility window in milliseconds before auto-dismiss; use a longer value for messages that carry an action the user must reach, and `0` for toasts that must stay until explicitly closed.\n- **`dismissible`** shows the hide button; give it to a toast that stays (`duration=\"0\"`) when its action is not what every person wants (\"Riprova\"), so the person can send the message away without using it.\n- **`deletable`** is the old name of `dismissible`, deprecated: the button dismisses the message, it deletes nothing. It still works, and goes in the next major.\n\n#### Slots\n\n- **`icon`** holds a leading glyph (recommended `mds-icon`); **`action`** holds interactive follow-ups (recommended `mds-button`) and, when present, renders inside a dedicated actions container.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-toast>` component, ordered from most common to most specialized. The examples assume a working knowledge of the variant / tone ladders documented in [`agents/variants.md`](../../../../agents/variants.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Text Toast\n\nThe simplest form. Set `visible` to show the toast; the default slot holds the message text only. The component auto-dismisses after the default 5000 ms.\n\n```html\n<mds-toast visible>\n  Operazione completata con successo\n</mds-toast>\n```\n\n#### Status Variants\n\nUse `variant` to communicate the meaning of the feedback. The status family (`error`, `warning`, `info`, `success`) maps directly to the nature of the event. Do not pick a variant for its color alone.\n\n```html\n<!-- Conferma positiva -->\n<mds-toast visible variant=\"success\">\n  Documento salvato correttamente\n</mds-toast>\n\n<!-- Errore bloccante -->\n<mds-toast visible variant=\"error\">\n  Errore durante il salvataggio. Riprova.\n</mds-toast>\n\n<!-- Avviso non bloccante -->\n<mds-toast visible variant=\"warning\">\n  La sessione scade tra 5 minuti\n</mds-toast>\n\n<!-- Informazione neutrale -->\n<mds-toast visible variant=\"info\">\n  Aggiornamento disponibile\n</mds-toast>\n```\n\n#### Tone for Emphasis\n\nPair `variant` with `tone` to adjust visual weight. `strong` (default) uses the stronger tint of the variant and a larger shadow; `weak` uses a softer tint and a smaller shadow for lower emphasis.\n\n```html\n<!-- Forte enfasi: errore urgente -->\n<mds-toast visible variant=\"error\" tone=\"strong\">\n  Connessione persa\n</mds-toast>\n\n<!-- Enfasi ridotta: info secondaria -->\n<mds-toast visible variant=\"info\" tone=\"weak\">\n  Sincronizzazione in background\n</mds-toast>\n```\n\n#### Toast with Icon\n\nUse the `icon` slot with an `<mds-icon>` to add a leading glyph. The icon color is tuned per variant.\n\n```html\n<mds-toast visible variant=\"success\">\n  <mds-icon slot=\"icon\" name=\"mi/baseline/check-circle\"></mds-icon>\n  File caricato con successo\n</mds-toast>\n```\n\n#### Toast with Action\n\nUse the `action` slot with an `<mds-button>` to offer a follow-up. The action region appears only while a `[slot=\"action\"]` child is present, also when it is added after the first render - no empty layout is produced otherwise.\n\n```html\n<mds-toast visible variant=\"error\">\n  <mds-icon slot=\"icon\" name=\"mi/baseline/error-outline\"></mds-icon>\n  Invio non riuscito\n  <mds-button slot=\"action\" size=\"sm\" variant=\"error\" tone=\"weak\">\n    Riprova\n  </mds-button>\n</mds-toast>\n```\n\n#### Persistent Toast (No Auto-Dismiss)\n\nSet `duration=\"0\"` to keep the toast visible until the user explicitly acts. Use this when the message carries an action the user must not miss. Hide it from your action handler by removing `visible`, and add `dismissible` so the person can send the message away without using the action.\n\n```html\n<mds-toast visible variant=\"warning\" duration=\"0\" dismissible>\n  <mds-icon slot=\"icon\" name=\"mi/baseline/warning\"></mds-icon>\n  Sessione in scadenza\n  <mds-button slot=\"action\" size=\"sm\" variant=\"warning\" tone=\"weak\">\n    Rinnova\n  </mds-button>\n</mds-toast>\n```\n\n#### Custom Auto-Dismiss Duration\n\nOverride the 5000 ms default when the message needs more reading time (e.g. it carries an action) or can disappear faster (e.g. a trivial confirmation). Duration is in milliseconds.\n\n```html\n<!-- Messaggio breve: 2 secondi -->\n<mds-toast visible variant=\"success\" duration=\"2000\">\n  Copiato negli appunti\n</mds-toast>\n\n<!-- Con azione: 8 secondi -->\n<mds-toast visible variant=\"info\" duration=\"8000\">\n  Importazione completata con 3 avvisi\n  <mds-button slot=\"action\" size=\"sm\" variant=\"info\" tone=\"weak\">\n    Vedi report\n  </mds-button>\n</mds-toast>\n```\n\n#### Several Toasts at Once\n\nTwo toasts visible at the same time with the same `position` are drawn at the same place, one over the other. Append the toasts of the application to one `<mds-toast-region>`, placed once in its shell: it lines them up at its edge, announces them, and makes room when too many show at once.\n\n```html\n<mds-toast-region position=\"bottom-center\">\n  <mds-toast visible variant=\"success\">Documento salvato</mds-toast>\n  <mds-toast visible variant=\"success\">Link copiato negli appunti</mds-toast>\n</mds-toast-region>\n```\n\n#### Positioning\n\nUse `position` to anchor the toast to one of the six viewport edges. Pick the edge that matches the application's layout convention - bottom-center is the default and works for most surfaces.\n\n```html\n<!-- Predefinito: centro in basso -->\n<mds-toast visible variant=\"info\" position=\"bottom-center\">\n  Messaggio salvato\n</mds-toast>\n\n<!-- Angolo in alto a destra (toolbar / panel) -->\n<mds-toast visible variant=\"success\" position=\"top-right\">\n  Impostazioni aggiornate\n</mds-toast>\n```\n\n#### Listening for the Close Event\n\nListen for `mdsToastClose` to remove the toast from the DOM or update queue state after the outro animation completes. It is emitted once for every hiding, whoever hid the toast, and `event.detail.reason` says who: `timeout`, `close` (the hide button) or `hide` (your code). Do not react to `visible` becoming `false` directly - the animation is still running at that point.\n\n```javascript\ndocument.querySelector('mds-toast').addEventListener('mdsToastClose', (event) => {\n  // rimuovi il toast dalla coda o aggiorna lo stato dell'applicazione\n  toastQueue.shift();\n  if (event.detail.reason === 'close') {\n    // la persona ha mandato via il messaggio senza usare l'azione\n  }\n});\n```\n\n#### Styling Customization\n\nStyle the toast only through its public `--mds-toast-*` CSS custom properties: the background, the text colour, the width and the shadow. Set them on the host element or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.app-notifications mds-toast {\n  --mds-toast-background: rgb(var(--magma-surface-inverse));\n  --mds-toast-color: rgb(var(--magma-on-inverse));\n  --mds-toast-width: 480px;\n  --mds-toast-shadow: var(--shadow-xl);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-toast>`. 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 Put HTML in the Default Slot\n\nThe default slot accepts plain text only; nested elements are rendered inside the caption text and break the layout. Use the `icon` slot for an icon and the `action` slot for buttons.\n\n```html\n<!-- INCORRECT -->\n<mds-toast visible variant=\"error\">\n  <strong>Errore:</strong> salvataggio fallito\n  <mds-button>Riprova</mds-button>\n</mds-toast>\n\n<!-- CORRECT -->\n<mds-toast visible variant=\"error\">\n  <mds-icon slot=\"icon\" name=\"mi/baseline/error-outline\"></mds-icon>\n  Salvataggio fallito\n  <mds-button slot=\"action\" size=\"sm\" variant=\"error\" tone=\"weak\">Riprova</mds-button>\n</mds-toast>\n```\n\n#### Do Not Leave a Persistent Toast Without a Way to Send It Away\n\nA toast with `duration=\"0\"` stays until something hides it. When its action is not what the person wants, nothing makes it go away: it covers the page until your code removes it. Add `dismissible`.\n\n```html\n<!-- INCORRECT - only \"Riprova\" makes it go away -->\n<mds-toast visible variant=\"error\" duration=\"0\">\n  Invio non riuscito\n  <mds-button slot=\"action\" size=\"sm\" variant=\"error\" tone=\"weak\">Riprova</mds-button>\n</mds-toast>\n\n<!-- CORRECT - the arrow sends the message away -->\n<mds-toast visible variant=\"error\" duration=\"0\" dismissible>\n  Invio non riuscito\n  <mds-button slot=\"action\" size=\"sm\" variant=\"error\" tone=\"weak\">Riprova</mds-button>\n</mds-toast>\n```\n\n#### Do Not Set `duration=\"0\"` to Mean \"Use the Default\"\n\nSetting `duration=\"0\"` explicitly disables auto-dismiss and keeps the toast on screen until the user closes it. To use the 5000 ms default, omit the attribute entirely.\n\n```html\n<!-- INCORRECT - disables auto-dismiss unintentionally -->\n<mds-toast visible variant=\"success\" duration=\"0\">\n  Documento salvato\n</mds-toast>\n\n<!-- CORRECT - default 5000 ms applies -->\n<mds-toast visible variant=\"success\">\n  Documento salvato\n</mds-toast>\n```\n\n#### Do Not Use `visible=\"false\"` to Hide the Toast\n\nSetting a boolean attribute to the string `\"false\"` leaves the attribute on the element. The toast itself reads it as hidden, but every presence check (`[visible]`, `hasAttribute('visible')`, as in the cleanup code below) still reads it as visible. Remove the attribute entirely (or set the prop to `undefined`) to hide the toast.\n\n```html\n<!-- INCORRECT - presence checks still read the toast as visible -->\n<mds-toast visible=\"false\" variant=\"info\">\n  Sincronizzazione in corso\n</mds-toast>\n\n<!-- CORRECT - attribute absent means hidden -->\n<mds-toast variant=\"info\">\n  Sincronizzazione in corso\n</mds-toast>\n```\n\n#### Do Not React to `visible` Becoming `false` to Clean Up\n\nWhen the timer fires it sets `visible` to `false`, but the outro animation is still running. Listening to that attribute change too early removes the element mid-animation. Wait for `mdsToastClose`, which fires after the animation completes.\n\n```javascript\n// INCORRECT - element may still be animating\nconst toast = document.querySelector('mds-toast');\nconst observer = new MutationObserver(() => {\n  if (!toast.hasAttribute('visible')) {\n    toast.remove();\n  }\n});\nobserver.observe(toast, { attributes: true });\n\n// CORRECT - fires after the outro animation\ntoast.addEventListener('mdsToastClose', () => {\n  toast.remove();\n});\n```\n\n#### Do Not Use a Variant Without Checking Its Acceptance\n\n`<mds-toast>` accepts `variant` values from `ThemeVariantType` but ships CSS overrides only for `light`, `dark`, `error`, `warning`, `info`, and `success`. Using `variant=\"primary\"` or `variant=\"ai\"` is valid by type but produces no themed color overrides - the toast falls back to its base inverse colors, the same as `dark`. Stick to the six variants above.\n\n```html\n<!-- INCORRECT - no color override; looks identical to variant=\"dark\" -->\n<mds-toast visible variant=\"primary\">\n  Azione confermata\n</mds-toast>\n\n<!-- CORRECT - uses a variant with full CSS support -->\n<mds-toast visible variant=\"success\">\n  Azione confermata\n</mds-toast>\n```\n\n#### Do Not Use `tone=\"outline\"` or `tone=\"text\"`\n\n`<mds-toast>` uses `ToneMinimalVariantType`, which accepts only `strong` and `weak`. Passing `tone=\"outline\"` or `tone=\"text\"` silently falls back to the default and produces no visual difference.\n\n```html\n<!-- INCORRECT - value not in ToneMinimalVariantType -->\n<mds-toast visible variant=\"info\" tone=\"outline\">\n  Aggiornamento disponibile\n</mds-toast>\n\n<!-- CORRECT -->\n<mds-toast visible variant=\"info\" tone=\"weak\">\n  Aggiornamento disponibile\n</mds-toast>\n```\n\n#### Do Not Customize via Undocumented Shadow Parts or Internal Selectors\n\nThe supported surface is the public `--mds-toast-*` CSS custom properties. There are no documented `::part()` targets for `<mds-toast>`; targeting internal class names with `::part()`, `>>>`, or attribute-selector hacks couples your code to the shadow DOM implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-toast >>> .dialog {\n  border-radius: 0;\n}\n\n/* CORRECT - use the public custom properties */\nmds-toast {\n  --mds-toast-background: rgb(var(--magma-surface-inverse));\n  --mds-toast-color: rgb(var(--magma-on-inverse));\n  --mds-toast-width: 360px;\n}\n```\n"
      },
      "props": [
        {
          "name": "deletable",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "deletable",
          "reflectToAttr": false,
          "docs": "Shows the hide button, as `dismissible` does.",
          "docsTags": [
            {
              "name": "deprecated",
              "text": "Use `dismissible`: the button dismisses the message, it deletes nothing.\nGoes in the next major."
            }
          ],
          "deprecation": "Use `dismissible`: the button dismisses the message, it deletes nothing.\nGoes in the next major.",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "dismissible",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "dismissible",
          "reflectToAttr": false,
          "docs": "Shows a button that hides the toast, an arrow towards the edge the toast leaves by",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "duration",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "duration",
          "reflectToAttr": true,
          "docs": "If set, specifies the visibility duration in milliseconds of the element inside the viewport, when the time is up the visible property will be set to false. The countdown waits while the pointer is over the toast or the focus is inside it. If the duration is set to 0 the toast stays until it is hidden: give it `dismissible` so the person can hide it too.",
          "docsTags": [
            {
              "name": "default",
              "text": "5000"
            }
          ],
          "default": "5000",
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "position",
          "type": "\"bottom-center\" | \"bottom-left\" | \"bottom-right\" | \"top-center\" | \"top-left\" | \"top-right\"",
          "complexType": {
            "original": "ToastPosition",
            "resolved": "\"bottom-center\" | \"bottom-left\" | \"bottom-right\" | \"top-center\" | \"top-left\" | \"top-right\"",
            "references": {
              "ToastPosition": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-toast/meta/types.ts::ToastPosition",
                "referenceLocation": "ToastPosition"
              }
            }
          },
          "mutable": true,
          "attr": "position",
          "reflectToAttr": true,
          "docs": "Sets position of toast",
          "docsTags": [
            {
              "name": "default",
              "text": "'bottom-center'"
            }
          ],
          "default": "'bottom-center'",
          "values": [
            {
              "value": "bottom-center",
              "type": "string"
            },
            {
              "value": "bottom-left",
              "type": "string"
            },
            {
              "value": "bottom-right",
              "type": "string"
            },
            {
              "value": "top-center",
              "type": "string"
            },
            {
              "value": "top-left",
              "type": "string"
            },
            {
              "value": "top-right",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "tone",
          "type": "\"strong\" | \"weak\" | undefined",
          "complexType": {
            "original": "ToneMinimalVariantType",
            "resolved": "\"strong\" | \"weak\" | undefined",
            "references": {
              "ToneMinimalVariantType": {
                "location": "import",
                "path": "@type/tone",
                "id": "src/type/tone.ts::ToneMinimalVariantType",
                "referenceLocation": "ToneMinimalVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "tone",
          "reflectToAttr": true,
          "docs": "Sets the tone of the color variant",
          "docsTags": [
            {
              "name": "default",
              "text": "'strong'"
            }
          ],
          "default": "'strong'",
          "values": [
            {
              "value": "strong",
              "type": "string"
            },
            {
              "value": "weak",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"success\" | \"warning\" | undefined",
          "complexType": {
            "original": "ThemeVariantType",
            "resolved": "\"ai\" | \"dark\" | \"error\" | \"info\" | \"light\" | \"primary\" | \"success\" | \"warning\" | undefined",
            "references": {
              "ThemeVariantType": {
                "location": "import",
                "path": "@type/variant",
                "id": "src/type/variant.ts::ThemeVariantType",
                "referenceLocation": "ThemeVariantType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Sets the theme variant colours",
          "docsTags": [
            {
              "name": "default",
              "text": "'light'"
            }
          ],
          "default": "'light'",
          "values": [
            {
              "value": "ai",
              "type": "string"
            },
            {
              "value": "dark",
              "type": "string"
            },
            {
              "value": "error",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "light",
              "type": "string"
            },
            {
              "value": "primary",
              "type": "string"
            },
            {
              "value": "success",
              "type": "string"
            },
            {
              "value": "warning",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "visible",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "visible",
          "reflectToAttr": true,
          "docs": "Specifies if toast is visible at the bottom or not",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsToastClose",
          "detail": "MdsToastCloseEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsToastCloseEventDetail",
            "resolved": "MdsToastCloseEventDetail",
            "references": {
              "MdsToastCloseEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-toast/meta/event-detail.ts::MdsToastCloseEventDetail",
                "referenceLocation": "MdsToastCloseEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits once the toast is hidden and its exit animation is over, whoever hid it: the `reason` of\nthe detail says who, `timeout`, `close` (the person, with the hide button) or `hide` (the application)",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-toast-background",
          "annotation": "prop",
          "docs": "Background color of the toast component.",
          "visibility": "public"
        },
        {
          "name": "--mds-toast-color",
          "annotation": "prop",
          "docs": "Text color inside the toast.",
          "visibility": "public"
        },
        {
          "name": "--mds-toast-duration",
          "annotation": "prop",
          "docs": "Duration of the transition that shows and hides the toast; `mdsToastClose` is emitted when the hiding one is over. How long the toast stays visible is the `duration` prop.",
          "visibility": "internal"
        },
        {
          "name": "--mds-toast-icon-color",
          "annotation": "prop",
          "docs": "Color of the icon inside the toast.",
          "visibility": "internal"
        },
        {
          "name": "--mds-toast-shadow",
          "annotation": "prop",
          "docs": "Shadow applied to the toast container.",
          "visibility": "public"
        },
        {
          "name": "--mds-toast-width",
          "annotation": "prop",
          "docs": "Width of the toast component.",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        },
        {
          "name": "action",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "icon",
          "docs": "Insert an icon image, it can be `HTML elements` or `components`, it is **recommended** to add `mds-icon` element."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-text",
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-toast": [
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-toast--docs"
    },
    {
      "filePath": "src/components/mds-toast-region/mds-toast-region.tsx",
      "encapsulation": "shadow",
      "tag": "mds-toast-region",
      "readme": "# mds-toast-region\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `mds-toast` elements, one per message: the region lines up the visible ones at its edge."
        },
        {
          "name": "category",
          "text": "feedback"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-toast-region>` web component is the place where an application shows its toasts: placed once in the application shell, at an edge of the viewport, it lines up the `<mds-toast>` elements visible at the same time, each one readable, and announces them to assistive technologies. It has no native HTML equivalent.\n\n#### Semantic Behavior\n\n- **One place for the toasts**: The region is fixed at the edge named by `position`; the toasts inside it are laid out in its flow, in a column with a gap, instead of each one being fixed on its own. The newest toast (the last one in the page) sits at the edge, where the toasts come in.\n- **The others close the gap**: A hidden toast in the region takes no room once its exit is over, so the toasts left move up to the edge; the exit itself is a short fade towards the edge, not a slide over the other toasts.\n- **Position of the toasts**: The region gives its `position` to every toast inside it, the ones added later too, and again when its own `position` changes.\n- **Live region**: The host is a status region (`role=\"status\"`, `aria-live=\"polite\"`, not atomic) that is in the page before any message, so a toast added or shown inside it is read out without moving the focus, and only that toast. The toasts inside it drop their own status role.\n- **The most toasts at once**: When a toast shows while `max` toasts are already visible, the region hides the oldest ones with a `duration`, in the order they were shown, and each one emits `mdsToastClose` with `reason: 'hide'`. A toast that stays (`duration=\"0\"`) and the toast just shown are never hidden, so the region may hold more than `max` until one of them goes.\n- **Below the dialogs**: The region is a fixed layer of the page, not a top layer element: an `<mds-modal>` opened later covers it and makes it inert, toasts and announcements included. A message about an open dialog belongs inside the dialog.\n- **Toasts outside the region**: A toast that is not inside a region keeps placing itself at its own `position`, as before.\n\n#### Properties & Visual Configurations\n\n- **`position`** picks the edge and the alignment of the column: top or bottom, left, center or right. Pick the edge where the application expects transient feedback; one region per application is the rule.\n- **`max`** is how many toasts may be visible at once before the oldest one with a timer leaves to make room; keep it small, a column of toasts covers the page.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-toast-region>` component, ordered from most common to most specialized. The toasts follow the examples of `<mds-toast>`; the shared component rules live in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### One Region in the Application Shell\n\nThe region holds the `<mds-toast>` elements of the application: every toast of the application goes into it, and the region lines them up at its edge and announces them. A toast shown in it leaves after its `duration`.\n\n```html\n<mds-toast-region>\n  <mds-toast visible variant=\"success\">Documento salvato</mds-toast>\n</mds-toast-region>\n```\n\nPlace one region in the shell of the application, outside the content that changes from page to page, so it is in the page before any message; the toasts are added to it from code (see the next pattern).\n\n```html\n<body>\n  <main>\n    <!-- contenuto dell'applicazione -->\n  </main>\n  <mds-toast-region></mds-toast-region>\n</body>\n```\n\n#### Showing a Toast From Code\n\nCreate the toast, append it to the region and show it; remove it from the page once it has closed. The region places it, announces it, and makes room for it.\n\n```javascript\nconst region = document.querySelector('mds-toast-region');\n\nconst showToast = (text, variant = 'success') => {\n  const toast = document.createElement('mds-toast');\n  toast.variant = variant;\n  toast.textContent = text;\n  toast.addEventListener('mdsToastClose', () => toast.remove());\n  region.append(toast);\n  toast.visible = true;\n};\n\nshowToast('Documento salvato');\n```\n\n#### A Message That Stays Among Confirmations\n\nAn error that the person must act on stays (`duration=\"0\"`) with its action and the hide button, while the confirmations around it come and go: the region never hides a toast that stays to make room.\n\n```html\n<mds-toast-region>\n  <mds-toast visible variant=\"error\" duration=\"0\" dismissible>\n    Invio non riuscito\n    <mds-button slot=\"action\" size=\"sm\" variant=\"error\" tone=\"weak\">Riprova</mds-button>\n  </mds-toast>\n  <mds-toast visible variant=\"success\">Bozza salvata</mds-toast>\n</mds-toast-region>\n```\n\n#### At the Top Edge\n\nSet `position` on the region, not on the toasts: it lines the toasts up at that edge, the newest one at the top, and gives them the position, so they come in and leave from that edge.\n\n```html\n<mds-toast-region position=\"top-right\"></mds-toast-region>\n```\n\n#### Fewer Toasts at Once\n\nLower `max` for an application with frequent confirmations or little room: when one more toast shows, the oldest one with a timer leaves first.\n\n```html\n<mds-toast-region max=\"2\"></mds-toast-region>\n```\n\n#### Spacing Between the Toasts\n\nChange the space between the toasts with `--mds-toast-region-gap`.\n\n```css\nmds-toast-region {\n  --mds-toast-region-gap: 12px;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-toast-region>`. Each entry pairs the wrong form with the right one and a one-line reason. System-wide rules live in [`agents/mistakes.md`](../../../../agents/mistakes.md) - they apply here too but are not repeated.\n\n#### Do Not Place a Region in Every Page or Component\n\nTwo regions at the same edge draw their toasts at the same place, one over the other, which is the problem the region solves. A region created together with its message is also not in the page before it, so the message may not be announced.\n\n```html\n<!-- INCORRECT - one region per form, created with the message -->\n<form>\n  <mds-toast-region>\n    <mds-toast visible>Modulo inviato</mds-toast>\n  </mds-toast-region>\n</form>\n\n<!-- CORRECT - one region in the shell, the toasts appended to it -->\n<mds-toast-region></mds-toast-region>\n```\n\n#### Do Not Set `position` on the Toasts Inside a Region\n\nThe region gives its `position` to every toast inside it, so the one set on a toast is replaced. Set it on the region.\n\n```html\n<!-- INCORRECT - replaced by the region -->\n<mds-toast-region>\n  <mds-toast visible position=\"top-right\">Impostazioni aggiornate</mds-toast>\n</mds-toast-region>\n\n<!-- CORRECT -->\n<mds-toast-region position=\"top-right\">\n  <mds-toast visible>Impostazioni aggiornate</mds-toast>\n</mds-toast-region>\n```\n\n#### Do Not Send a Message About an Open Dialog to the Region\n\nWhile an `mds-modal` is open, everything outside it is inert, the region included: its toast cannot be used and is not announced. Show the message inside the dialog.\n\n```html\n<!-- INCORRECT - the error of the dialog goes behind it -->\n<mds-modal opened>\n  <form>...</form>\n</mds-modal>\n<mds-toast-region>\n  <mds-toast visible variant=\"error\" duration=\"0\">Salvataggio non riuscito</mds-toast>\n</mds-toast-region>\n\n<!-- CORRECT - the error is in the dialog -->\n<mds-modal opened>\n  <mds-banner variant=\"error\">Salvataggio non riuscito</mds-banner>\n  <form></form>\n</mds-modal>\n```\n"
      },
      "props": [
        {
          "name": "max",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "max",
          "reflectToAttr": true,
          "docs": "The most toasts visible at once: when one more shows, the oldest one with a `duration` is hidden. A toast that stays (`duration=\"0\"`) is never hidden by the region",
          "docsTags": [
            {
              "name": "default",
              "text": "3"
            }
          ],
          "default": "3",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "position",
          "type": "\"bottom-center\" | \"bottom-left\" | \"bottom-right\" | \"top-center\" | \"top-left\" | \"top-right\"",
          "complexType": {
            "original": "ToastPosition",
            "resolved": "\"bottom-center\" | \"bottom-left\" | \"bottom-right\" | \"top-center\" | \"top-left\" | \"top-right\"",
            "references": {
              "ToastPosition": {
                "location": "import",
                "path": "@component/mds-toast/meta/types",
                "id": "src/components/mds-toast/meta/types.ts::ToastPosition",
                "referenceLocation": "ToastPosition"
              }
            }
          },
          "mutable": false,
          "attr": "position",
          "reflectToAttr": true,
          "docs": "Sets the edge of the viewport where the toasts line up, and the `position` of every toast inside the region",
          "docsTags": [
            {
              "name": "default",
              "text": "'bottom-center'"
            }
          ],
          "default": "'bottom-center'",
          "values": [
            {
              "value": "bottom-center",
              "type": "string"
            },
            {
              "value": "bottom-left",
              "type": "string"
            },
            {
              "value": "bottom-right",
              "type": "string"
            },
            {
              "value": "top-center",
              "type": "string"
            },
            {
              "value": "top-left",
              "type": "string"
            },
            {
              "value": "top-right",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-toast-region-gap",
          "annotation": "prop",
          "docs": "Space between the toasts lined up in the region.",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-toast` elements, one per message: the region lines up the visible ones at its edge."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-toast-toast-region--docs"
    },
    {
      "filePath": "src/components/mds-tooltip/mds-tooltip.tsx",
      "encapsulation": "shadow",
      "tag": "mds-tooltip",
      "readme": "# mds-tooltip\n\n\n\nThis 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.\n",
      "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": "text - The text of the tooltip, around the default slot"
        },
        {
          "name": "category",
          "text": "overlays"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-tooltip>` web component is the floating contextual hint of the Magma Design System. It renders a small text bubble that attaches to a separate trigger element identified by a CSS selector, rather than relying on the native `title` attribute.\n\n#### Semantic Behavior\n\n- **Detached trigger model**: The tooltip is not wrapped around its trigger; the required `target` selector is resolved and the component binds itself to the first matching caller.\n- **Hover and focus visibility**: The bubble shows while the pointer is over the trigger or the trigger has a focus the browser rings (`:focus-visible`, the focus of the keyboard), and hides when neither holds; Escape hides it until the trigger is hovered or focused again. The focus of a click, or one a script moves to the trigger after a click, does not keep it open: it closes when the pointer leaves. The tooltip takes `role=\"tooltip\"` and, when it shares a DOM tree with the trigger, writes `aria-describedby` on it, or `aria-labelledby` with `relation=\"label\"`; an attribute the trigger already has is left alone.\n- **Visibility is the source of truth**: Setting `visible` programmatically shows or dismisses the bubble, allowing the tooltip to be controlled without a hover.\n- **Live repositioning**: Changing any layout prop (`placement`, `offset`, `disableShift`, `shiftPadding`, `strategy`, `flip`, `disableAutoPlacement`) recomputes the floating position on the fly.\n- **Text-only default slot**: The default slot is meant for a plain text string (exposed as the `text` shadow part); HTML elements or components should not be slotted in.\n\n#### Properties & Visual Configurations\n\n- **`target`** (required) is the CSS selector of the trigger element the tooltip listens to and anchors against; the first match wins.\n- **`placement`** chooses the preferred side and alignment relative to the caller (e.g. `'top'`, `'bottom-start'`), taken whenever it has room; by default the tooltip moves to the opposite side, then to the sides across, only when it does not fit there (**`disableAutoPlacement`** opts out and pins to `placement`, and **`flip`** then allows the fallback to the opposite side only).\n- the bubble is kept inside the viewport by default (**`disableShift`** opts out), with **`shiftPadding`** reserving a safe gap from the viewport edges; **`offset`** sets the distance between the bubble and the caller.\n- **`strategy`** selects the CSS positioning strategy: `'fixed'` (default) escapes clipping ancestors, `'absolute'` anchors within the nearest positioned ancestor.\n- **`relation`** says what the tooltip is to its trigger: its `'description'` (default, `aria-describedby`), or its `'label'` (`aria-labelledby`), when the tooltip text is the only visible name of the trigger, as on an icon-only button. Changing it moves the attribute on the trigger.\n- **`typography`** picks the text scale of the bubble (`'tip'`, `'caption'`, `'detail'`), where `'tip'` is the default compact hint sizing.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-tooltip>` 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 Tooltip on a Button\n\nThe most common form. Give the trigger element an `id` (or any unique CSS selector) and point `target` at it. The tooltip listens for the hover and the keyboard focus of the trigger and positions itself automatically.\n\n```html\n<mds-button id=\"salva-btn\" label=\"Salva documento\" variant=\"primary\" tone=\"strong\"></mds-button>\n<mds-tooltip target=\"#salva-btn\">Salva le modifiche correnti</mds-tooltip>\n```\n\n#### Naming an Icon-Only Button\n\nOn an icon-only button the tooltip usually shows the name of the button. Set `relation=\"label\"` so that the tooltip is the name (`aria-labelledby`) and not a description: the button needs no `aria-label`, and a screen reader does not read the same text twice. Use it only on an interactive trigger, a button or a link: ARIA does not allow a name on a generic element.\n\n```html\n<mds-button id=\"tokens-btn\" icon=\"mi/baseline/palette\" variant=\"dark\" tone=\"text\"></mds-button>\n<mds-tooltip target=\"#tokens-btn\" relation=\"label\">Tokens</mds-tooltip>\n```\n\n#### Tooltip on a Non-Interactive Element\n\n`target` accepts any CSS selector, not just `#id`. Use a class or attribute selector when the trigger is a static element such as a status icon.\n\n```html\n<mds-icon class=\"stato-icona\" name=\"mi/baseline/info\"></mds-icon>\n<mds-tooltip target=\".stato-icona\">Ultima sincronizzazione: oggi alle 08:30</mds-tooltip>\n```\n\n#### Placement and Preferred Side\n\nOverride the default `top` placement with `placement` when layout requires a different side. Auto placement is on by default: the tooltip takes `placement` whenever it has room and moves to another side only when it does not fit; `disable-auto-placement` locks the side.\n\n```html\n<mds-button id=\"dettagli-btn\" label=\"Dettagli\" variant=\"primary\" tone=\"outline\"></mds-button>\n<mds-tooltip target=\"#dettagli-btn\" placement=\"right\" disable-auto-placement>\n  Apre il pannello laterale con i dettagli completi\n</mds-tooltip>\n```\n\nAccepted values: `top`, `top-start`, `top-end`, `bottom`, `bottom-start`, `bottom-end`, `left`, `left-start`, `left-end`, `right`, `right-start`, `right-end`.\n\n#### Flip Fallback When Space is Tight\n\nEnable `flip` together with `disable-auto-placement` so the pinned tooltip moves to the opposite side, and to no other, if the preferred placement collides with the viewport edge. Auto placement already includes that fallback.\n\n```html\n<mds-button id=\"azione-btn\" label=\"Azione\" variant=\"primary\"></mds-button>\n<mds-tooltip target=\"#azione-btn\" placement=\"top\" disable-auto-placement flip>\n  Esegui l'operazione selezionata\n</mds-tooltip>\n```\n\n#### Viewport-Safe Shift\n\nBy default the tooltip slides along its axis so it stays inside the viewport (set `disable-shift` to opt out). Increase `shift-padding` to keep a wider safe margin from the viewport edges.\n\n```html\n<mds-button id=\"bordo-btn\" label=\"Vicino al bordo\" variant=\"dark\" tone=\"outline\"></mds-button>\n<mds-tooltip target=\"#bordo-btn\" shift-padding=\"24\">\n  Questa azione e' irreversibile\n</mds-tooltip>\n```\n\n#### Custom Offset Distance\n\nIncrease `offset` when additional breathing room between the trigger and the bubble is required - for example inside dense toolbars or on elements with large focus rings.\n\n```html\n<mds-button id=\"info-btn\" label=\"Info\" variant=\"info\" tone=\"weak\"></mds-button>\n<mds-tooltip target=\"#info-btn\" offset=\"20\">\n  Informazioni aggiuntive sul campo\n</mds-tooltip>\n```\n\n#### Programmatic Visibility\n\nSet the `visible` attribute (or property) to control the tooltip without hover. Useful for guided tours, onboarding hints, or error annotations that appear on demand.\n\n```html\n<mds-button id=\"primo-accesso\" label=\"Inizia\" variant=\"primary\"></mds-button>\n<mds-tooltip id=\"hint\" target=\"#primo-accesso\" visible>\n  Benvenuto! Clicca qui per iniziare la configurazione.\n</mds-tooltip>\n\n<script>\n  const hint = document.querySelector('#hint');\n  // Dismiss programmatically when the user acknowledges the hint\n  document.querySelector('#primo-accesso').addEventListener('click', () => {\n    hint.visible = false;\n  });\n</script>\n```\n\n#### Typography Scale\n\n`typography` adjusts the text scale inside the bubble. Use `'tip'` (default) for compact hints, `'caption'` for slightly larger labels, and `'detail'` for the largest, body-size text.\n\n```html\n<!-- Default compact hint -->\n<mds-tooltip target=\"#campo-nome\" typography=\"tip\">Massimo 64 caratteri</mds-tooltip>\n\n<!-- Slightly larger label -->\n<mds-tooltip target=\"#campo-data\" typography=\"caption\">Formato: GG/MM/AAAA</mds-tooltip>\n```\n\n#### Positioning Strategy\n\nUse `strategy=\"absolute\"` when the tooltip must be contained within a scrolling ancestor instead of the viewport. The default `strategy=\"fixed\"` escapes any clipping or overflow-hidden parent.\n\n```html\n<!-- Inside a scrollable panel with overflow:hidden ancestors -->\n<mds-tooltip target=\"#voce-lista\" strategy=\"absolute\">Trascina per riordinare</mds-tooltip>\n```\n\n#### Styling Customization\n\nStyle the tooltip only through its public `--mds-tooltip-*` CSS custom properties: the background (the arrow follows it), the delay and the z-index. Set them on the host element or a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.onboarding-hint mds-tooltip {\n  --mds-tooltip-background: rgb(var(--magma-accent-surface));\n  --mds-tooltip-delay: 0.25s;\n  --mds-tooltip-z-index: 5000;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-tooltip>`. 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 a Bare ID String as `target`\n\nThe value of `target` is passed directly to `querySelector`, so a CSS selector is required: a bare id (`hint-trigger`) looks for an element named `<hint-trigger>`, finds nothing, and the tooltip never attaches.\n\n```html\n<!-- INCORRECT -->\n<span id=\"hint-trigger\">Aiuto</span>\n<mds-tooltip target=\"hint-trigger\">Testo di aiuto</mds-tooltip>\n\n<!-- CORRECT -->\n<span id=\"hint-trigger\">Aiuto</span>\n<mds-tooltip target=\"#hint-trigger\">Testo di aiuto</mds-tooltip>\n```\n\n#### Do Not Slot HTML Elements or Components\n\nThe default slot is text-only. Nesting HTML elements or Magma components breaks the inner layout and may produce unexpected rendering because the slot is wrapped in `<mds-text>`.\n\n```html\n<!-- INCORRECT -->\n<mds-tooltip target=\"#voce\">\n  <mds-icon name=\"mi/baseline/warning\"></mds-icon>\n  <strong>Attenzione:</strong> campo obbligatorio\n</mds-tooltip>\n\n<!-- CORRECT -->\n<mds-tooltip target=\"#voce\">Attenzione: campo obbligatorio</mds-tooltip>\n```\n\n#### Do Not Wrap the Trigger Inside the Tooltip\n\n`<mds-tooltip>` uses a detached trigger model - the tooltip is placed as a sibling in the DOM and linked via `target`, not wrapped around its trigger. Nesting the trigger breaks the floating position logic.\n\n```html\n<!-- INCORRECT -->\n<mds-tooltip target=\"#btn\">\n  <mds-button id=\"btn\" label=\"Elimina\"></mds-button>\n  Elimina il record selezionato\n</mds-tooltip>\n\n<!-- CORRECT -->\n<mds-button id=\"btn\" label=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n<mds-tooltip target=\"#btn\">Elimina il record selezionato</mds-tooltip>\n```\n\n#### Do Not Set `visible=\"false\"` to Hide the Tooltip\n\n`visible` is a boolean attribute; setting it to the string `\"false\"` leaves the attribute on the element. The tooltip itself reads it as hidden, but every presence check (`[visible]`, `hasAttribute('visible')`) still reads it as visible. Remove the attribute (or set the property to `false`) to hide it.\n\n```html\n<!-- INCORRECT -->\n<mds-tooltip target=\"#campo\" visible=\"false\">Testo nascosto</mds-tooltip>\n\n<!-- CORRECT -->\n<mds-tooltip target=\"#campo\">Testo nascosto</mds-tooltip>\n```\n\n```js\n// CORRECT (programmatic)\ndocument.querySelector('mds-tooltip').visible = false;\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internal Parts\n\nThe only supported customization surface is the set of public `--mds-tooltip-*` CSS custom properties and the documented `text` shadow part. Targeting undocumented internal selectors couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-tooltip >>> .text {\n  font-style: italic;\n}\nmds-tooltip::part(arrow) {\n  fill: red;\n}\n\n/* CORRECT */\nmds-tooltip {\n  --mds-tooltip-background: rgb(var(--magma-accent-surface));\n  --mds-tooltip-delay: 0.5s;\n}\nmds-tooltip::part(text) {\n  font-style: italic;\n}\n```\n\n#### Do Not Repeat the Name of the Trigger as Its Description\n\nA tooltip describes its trigger by default. When its text is the name of the trigger, as on an icon-only button, an `aria-label` with the same text makes a screen reader read it twice, as the name and as the description. Make the tooltip the name instead.\n\n```html\n<!-- INCORRECT -->\n<mds-button id=\"tokens-btn\" icon=\"mi/baseline/palette\" aria-label=\"Tokens\"></mds-button>\n<mds-tooltip target=\"#tokens-btn\">Tokens</mds-tooltip>\n\n<!-- CORRECT -->\n<mds-button id=\"tokens-btn\" icon=\"mi/baseline/palette\"></mds-button>\n<mds-tooltip target=\"#tokens-btn\" relation=\"label\">Tokens</mds-tooltip>\n```\n\n#### Do Not Replace `<mds-tooltip>` with a Native `title` Attribute\n\nThe native `title` tooltip is not styleable and not announced consistently by screen readers on touch devices. Use `<mds-tooltip>` for all contextual hints.\n\n```html\n<!-- INCORRECT -->\n<mds-button label=\"Elimina\" title=\"Elimina il record selezionato\"></mds-button>\n\n<!-- CORRECT -->\n<mds-button id=\"elimina-btn\" label=\"Elimina\" variant=\"error\" tone=\"text\"></mds-button>\n<mds-tooltip target=\"#elimina-btn\">Elimina il record selezionato</mds-tooltip>\n```\n"
      },
      "props": [
        {
          "name": "disableAutoPlacement",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "disable-auto-placement",
          "reflectToAttr": true,
          "docs": "Pins the component to `placement`: without it, the component moves to another side of the\ncaller when `placement` has no room.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "disableShift",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "disable-shift",
          "reflectToAttr": false,
          "docs": "If set, the component will not be kept inside the viewport.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "flip",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "flip",
          "reflectToAttr": false,
          "docs": "With `disableAutoPlacement`, moves the component to the opposite side of the caller when\n`placement` has no room. Auto-placement, the default, already does it.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "offset",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "offset",
          "reflectToAttr": false,
          "docs": "Sets distance between the tooltip and the caller.",
          "docsTags": [
            {
              "name": "default",
              "text": "12"
            }
          ],
          "default": "12",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "placement",
          "type": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
          "complexType": {
            "original": "FloatingUIPlacement",
            "resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
            "references": {
              "FloatingUIPlacement": {
                "location": "import",
                "path": "@type/floating-ui",
                "id": "src/type/floating-ui.ts::FloatingUIPlacement",
                "referenceLocation": "FloatingUIPlacement"
              }
            }
          },
          "mutable": false,
          "attr": "placement",
          "reflectToAttr": true,
          "docs": "Specifies where the component should be placed relative to the caller: the side it takes\nwhenever it has room there.",
          "docsTags": [
            {
              "name": "default",
              "text": "'top'"
            }
          ],
          "default": "'top'",
          "values": [
            {
              "value": "bottom",
              "type": "string"
            },
            {
              "value": "bottom-end",
              "type": "string"
            },
            {
              "value": "bottom-start",
              "type": "string"
            },
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "left-end",
              "type": "string"
            },
            {
              "value": "left-start",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            },
            {
              "value": "right-end",
              "type": "string"
            },
            {
              "value": "right-start",
              "type": "string"
            },
            {
              "value": "top",
              "type": "string"
            },
            {
              "value": "top-end",
              "type": "string"
            },
            {
              "value": "top-start",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "relation",
          "type": "\"description\" | \"label\"",
          "complexType": {
            "original": "FloatingUIRelation",
            "resolved": "\"description\" | \"label\"",
            "references": {
              "FloatingUIRelation": {
                "location": "import",
                "path": "@type/floating-ui",
                "id": "src/type/floating-ui.ts::FloatingUIRelation",
                "referenceLocation": "FloatingUIRelation"
              }
            }
          },
          "mutable": false,
          "attr": "relation",
          "reflectToAttr": true,
          "docs": "Sets what the tooltip is to its caller: its `description` (`aria-describedby`), or its\n`label` (`aria-labelledby`), when the tooltip holds the only visible name of the caller, as on\nan icon-only button.",
          "docsTags": [
            {
              "name": "default",
              "text": "'description'"
            }
          ],
          "default": "'description'",
          "values": [
            {
              "value": "description",
              "type": "string"
            },
            {
              "value": "label",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "shiftPadding",
          "type": "number",
          "complexType": {
            "original": "number",
            "resolved": "number",
            "references": {}
          },
          "mutable": false,
          "attr": "shift-padding",
          "reflectToAttr": false,
          "docs": "Sets a safe area distance between the tooltip and the viewport.",
          "docsTags": [
            {
              "name": "default",
              "text": "12"
            }
          ],
          "default": "12",
          "values": [
            {
              "type": "number"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "strategy",
          "type": "\"absolute\" | \"fixed\"",
          "complexType": {
            "original": "FloatingUIStrategy",
            "resolved": "\"absolute\" | \"fixed\"",
            "references": {
              "FloatingUIStrategy": {
                "location": "import",
                "path": "@type/floating-ui",
                "id": "src/type/floating-ui.ts::FloatingUIStrategy",
                "referenceLocation": "FloatingUIStrategy"
              }
            }
          },
          "mutable": false,
          "attr": "strategy",
          "reflectToAttr": true,
          "docs": "Sets the CSS position strategy of the component.",
          "docsTags": [
            {
              "name": "default",
              "text": "'fixed'"
            }
          ],
          "default": "'fixed'",
          "values": [
            {
              "value": "absolute",
              "type": "string"
            },
            {
              "value": "fixed",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "target",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "target",
          "reflectToAttr": true,
          "docs": "Specifies the selector of the target element, this attribute is used with `querySelector` method.",
          "docsTags": [
            {
              "name": "example",
              "text": "'#profile-button'"
            }
          ],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        },
        {
          "name": "typography",
          "type": "\"caption\" | \"detail\" | \"tip\"",
          "complexType": {
            "original": "TypographyTooltipType",
            "resolved": "\"caption\" | \"detail\" | \"tip\"",
            "references": {
              "TypographyTooltipType": {
                "location": "import",
                "path": "@type/typography",
                "id": "src/type/typography.ts::TypographyTooltipType",
                "referenceLocation": "TypographyTooltipType"
              }
            }
          },
          "mutable": false,
          "attr": "typography",
          "reflectToAttr": false,
          "docs": "Specifies the font typography of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'tip'"
            }
          ],
          "default": "'tip'",
          "values": [
            {
              "value": "caption",
              "type": "string"
            },
            {
              "value": "detail",
              "type": "string"
            },
            {
              "value": "tip",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "visible",
          "type": "boolean",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": true,
          "attr": "visible",
          "reflectToAttr": true,
          "docs": "Specifies the visibility of the component.",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-tooltip-arrow-background",
          "annotation": "prop",
          "docs": "Background color of the tooltip arrow.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tooltip-background",
          "annotation": "prop",
          "docs": "Background color of the tooltip body.",
          "visibility": "public"
        },
        {
          "name": "--mds-tooltip-delay",
          "annotation": "prop",
          "docs": "Delay before showing the tooltip.",
          "visibility": "public"
        },
        {
          "name": "--mds-tooltip-dot-padding",
          "annotation": "prop",
          "docs": "Padding around the tooltip dot (if present).",
          "visibility": "internal"
        },
        {
          "name": "--mds-tooltip-drop-shadow",
          "annotation": "prop",
          "docs": "Drop shadow applied to the tooltip.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tooltip-duration",
          "annotation": "prop",
          "docs": "Duration of the tooltip animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tooltip-ease",
          "annotation": "prop",
          "docs": "Timing function for the tooltip animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tooltip-transform-from",
          "annotation": "prop",
          "docs": "Transform applied at the start of the tooltip animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tooltip-transform-to",
          "annotation": "prop",
          "docs": "Transform applied at the end of the tooltip animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tooltip-z-index",
          "annotation": "prop",
          "docs": "z-index of the tooltip container.",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here."
        }
      ],
      "parts": [
        {
          "name": "text",
          "docs": "The text of the tooltip, around the default slot"
        }
      ],
      "states": [],
      "dependents": [
        "mds-help",
        "mds-keyboard",
        "mds-radial-menu-item"
      ],
      "dependencies": [
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-tooltip": [
          "mds-text"
        ],
        "mds-help": [
          "mds-tooltip"
        ],
        "mds-keyboard": [
          "mds-tooltip"
        ],
        "mds-radial-menu-item": [
          "mds-tooltip"
        ]
      },
      "storybook": "ui-tooltip--docs"
    },
    {
      "filePath": "src/components/mds-tree/mds-tree.tsx",
      "encapsulation": "shadow",
      "tag": "mds-tree",
      "readme": "# mds-tree\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `mds-tree-item` element/s."
        },
        {
          "name": "category",
          "text": "navigation"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-tree>` web component is the root container of the Magma Design System tree view, organizing a hierarchy of slotted `<mds-tree-item>` nodes into an expandable/collapsible structure. It owns no visual row of its own: it is a compound parent that configures, stacks, and propagates state to its children.\n\n#### Semantic Behavior\n\n- **Compound parent**: The default slot accepts only `<mds-tree-item>` elements; the tree itself renders nothing but the slot and acts as the configuration and coordination root for the hierarchy.\n- **Accessibility**: The tree is a list of its items (`role=\"list\"`, named by `label`), and the items of a branch are a list inside their item, so a screen reader announces the level and the size of every branch. It is not a `role=\"tree\"`, which promises arrow-key navigation and leaves no room for the actions of an item: every button stays a Tab stop. The items of a closed branch are out of the tab order.\n- **Depth seeding**: Its direct children are assigned `depth = 0`, which removes the branch connector lines from the first level; deeper levels are indented by their nesting.\n- **Cascading `expanded`**: `expanded` on the tree, set in the markup or changed at runtime, propagates to every descendant item, opening or collapsing the whole hierarchy at once - except children marked `async`, which are left for on-demand resolution. Items added later, a branch loaded on demand, take the tree's `expanded`, `toggle`, `togglePosition`, `appearance` and `truncate` when they arrive; the items already there keep the state the user gave them.\n- **Cascading `toggle` and `truncate`**: Changing the toggle icon or the truncation mode on the tree pushes the value down to all descendant items so the whole tree stays visually consistent.\n- **Async branches**: When `async` is set on an item, its branch is expected to resolve its children after the click rather than expanding from pre-rendered content; such items are excluded from the bulk `expanded` cascade.\n\n#### Properties & Visual Configurations\n\n- **`appearance`** controls whether the depth-indicating branch decorations (connector lines and dots) are drawn: `'depth'` shows the guide lines that visualize nesting; `'none'` removes them for a flat look.\n- **`actions`** governs how per-item action controls are surfaced: `'auto'` reveals them on hover, `'visible'` keeps them always shown.\n- **`toggle`** selects the expand/collapse glyph for every item - `'chevron'` for a generic disclosure arrow, `'folder'` for a file-explorer metaphor; **`togglePosition`** places that glyph at the `'left'` or `'right'` of the label.\n\n#### Other behavioral props\n\n- **`truncate`** sets how item labels overflow: `'word'` truncates the line, `'all'` clamps to multiple lines (paired with the `--mds-tree-line-clamp` custom property), `'none'` lets text wrap freely.\n- **`expanded`** is the only mutable, reflected state prop; set it on the root to open the entire tree on first render, or change it to open or close the entire tree programmatically.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-tree>` 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#### Nested Hierarchy\n\nThe canonical form: the root-level `<mds-tree-item>` elements are direct children of `<mds-tree>`, and `<mds-tree-item>` elements placed inside other `<mds-tree-item>` elements build depth. The tree seeds `depth = 0` on direct children, which drops their branch connector lines; nested items are indented by their nesting.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Direzione generale\">\n    <mds-tree-item label=\"Segreteria\">\n      <mds-tree-item label=\"Protocollo\"></mds-tree-item>\n      <mds-tree-item label=\"Archivio\"></mds-tree-item>\n    </mds-tree-item>\n    <mds-tree-item label=\"Risorse umane\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Flat List\n\nRoot-level nodes with no nesting are valid too, every `<mds-tree-item>` a direct child of `<mds-tree>`. With no branch to open the tree reads as a plain list.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Bacheca\"></mds-tree-item>\n  <mds-tree-item label=\"Documenti\"></mds-tree-item>\n  <mds-tree-item label=\"Impostazioni\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Programmatic Expand / Collapse\n\nChange `expanded` on `<mds-tree>` at runtime to open or close the entire hierarchy at once. This cascades to all descendant items except those marked `async`, also when `expanded` is set in the markup; to start with a single branch open set `expanded` on that item instead.\n\n```html\n<!-- A branch expanded on mount -->\n<mds-tree id=\"albero-pratiche\">\n  <mds-tree-item label=\"Pratiche in corso\" expanded>\n    <mds-tree-item label=\"Pratica 001/2025\"></mds-tree-item>\n    <mds-tree-item label=\"Pratica 002/2025\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n\n<script>\n  // Open or close the whole hierarchy later\n  document.getElementById('albero-pratiche').expanded = true;\n</script>\n```\n\n#### Folder Toggle Style\n\nUse `toggle=\"folder\"` for file-explorer metaphors. The toggle icon switches between a closed and open folder glyph when the item is expanded or collapsed.\n\n```html\n<mds-tree toggle=\"folder\" actions=\"visible\">\n  <mds-tree-item label=\"Fascicoli\">\n    <mds-tree-item label=\"2025\">\n      <mds-tree-item label=\"Fascicolo 001\"></mds-tree-item>\n      <mds-tree-item label=\"Fascicolo 002\"></mds-tree-item>\n    </mds-tree-item>\n    <mds-tree-item label=\"2024\">\n      <mds-tree-item label=\"Fascicolo 099\"></mds-tree-item>\n    </mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Right-Positioned Toggle for Navigation Menus\n\nSet `toggle-position=\"right\"` and `appearance=\"none\"` for a flat navigation-menu look where the expand chevron sits at the trailing edge of the row.\n\n```html\n<mds-tree toggle=\"chevron\" toggle-position=\"right\" appearance=\"none\">\n  <mds-tree-item label=\"Protocollazione documenti\">\n    <mds-tree-item label=\"Nuovo protocollo in arrivo\"></mds-tree-item>\n    <mds-tree-item label=\"Nuovo protocollo in partenza\"></mds-tree-item>\n  </mds-tree-item>\n  <mds-tree-item label=\"Gestione allegati\">\n    <mds-tree-item label=\"Scansione multipla\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Per-Item Actions via the `action` Slot\n\nSlot `<mds-button>` or `<mds-icon>` elements into each `<mds-tree-item>` with `slot=\"action\"`. Use `actions=\"auto\"` (default) to reveal them on hover, or `actions=\"visible\"` to always show them.\n\n```html\n<mds-tree actions=\"auto\">\n  <mds-tree-item label=\"Relazione annuale 2025\">\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/download\"\n      variant=\"dark\"\n      tone=\"text\"\n      title=\"Scarica\"\n    ></mds-button>\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/more-vert\"\n      variant=\"dark\"\n      tone=\"text\"\n      title=\"Altre opzioni\"\n    ></mds-button>\n    <mds-tree-item label=\"Capitolo 1\"></mds-tree-item>\n    <mds-tree-item label=\"Capitolo 2\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Listening to Expand and Collapse Events\n\n`<mds-tree-item>` emits `mdsTreeItemCollapse` when it closes, and `mdsTreeItemExpand` only when an item marked `async` is asked to open (see below): opening a regular item emits nothing. Both events bubble, so one listener on the tree catches them. Listen via `addEventListener` - do not rely on native `change` / `click` bubbling through shadow DOM.\n\n```html\n<mds-tree id=\"albero-categorie\">\n  <mds-tree-item label=\"Categoria A\">\n    <mds-tree-item label=\"Sottocategoria A1\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n\n<script>\n  // emitted only by items marked async\n  document.getElementById('albero-categorie').addEventListener('mdsTreeItemExpand', (event) => {\n    console.log('espanso:', event.detail.element.label);\n  });\n\n  document.getElementById('albero-categorie').addEventListener('mdsTreeItemCollapse', (event) => {\n    console.log('collassato:', event.detail.element.label);\n  });\n</script>\n```\n\n#### Async Lazy-Loading Branches\n\nMark a `<mds-tree-item>` with `async` when its children must be fetched on demand. The item shows a loading spinner on click and emits `mdsTreeItemExpand`. Resolve the branch by calling `element.expand()` on the item once data is ready, then remove `async` so that reopening the branch later does not fetch it again. An item looks for child items only when it first renders: one that has none then shows no toggle (and no spinner), and children appended later do not add it.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Comune di Rimini\" icon=\"mgg/historic-building\">\n    <mds-tree-item label=\"Ufficio\" async class=\"ufficio-item\" icon=\"mi/baseline/desk\">\n      <!-- children appended by the script below -->\n    </mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n\n<script>\n  document.querySelector('.ufficio-item').addEventListener('mdsTreeItemExpand', async (event) => {\n    const { element } = event.detail;\n    if (!element.async) return;\n    const children = await fetchChildren(element.label);\n    children.forEach((nome) => {\n      const item = document.createElement('mds-tree-item');\n      item.label = nome;\n      element.appendChild(item);\n    });\n    element.expand();\n    element.async = false;\n  });\n</script>\n```\n\n#### Icon on Individual Items\n\nUse the `icon` prop on `<mds-tree-item>` to show a glyph next to the label. Reference icons by their slug from the Magma icon library.\n\n```html\n<mds-tree toggle=\"chevron\">\n  <mds-tree-item label=\"Comune di Rimini\" icon=\"mgg/historic-building\">\n    <mds-tree-item label=\"Sindaco\" icon=\"mdi/handshake\">\n      <mds-tree-item label=\"Segretario generale\" icon=\"mi/baseline/draw\"></mds-tree-item>\n    </mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Styling Customization\n\nThe only public CSS custom property of the tree is `--mds-tree-line-clamp`, the number of lines a label keeps with `truncate=\"all\"` (2 by default). The colours of the labels, branches and toggles, their spacing and the transitions follow the semantic roles, so dark mode and high-contrast modes keep working: shape the tree with its props (`appearance`, `toggle`, `toggle-position`, `truncate`, `actions`) instead. Set the property on the host element or a parent selector.\n\n```css\n.navigazione-laterale mds-tree {\n  --mds-tree-line-clamp: 3;\n}\n```\n\nThe toggle of an open item takes its expanded colours, and the connectors of the branches follow the distance between the toggle and the label of every item.\n",
        "3. Mistakes": "Common incorrect uses of `<mds-tree>`. 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 Put Non-`mds-tree-item` Elements Directly in `<mds-tree>`\n\nThe default slot of `<mds-tree>` accepts only `<mds-tree-item>` elements. Placing raw HTML or other components as direct children breaks depth seeding and compound communication.\n\n```html\n<!-- INCORRECT -->\n<mds-tree>\n  <li>Voce uno</li>\n  <li>Voce due</li>\n</mds-tree>\n\n<!-- CORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Voce uno\"></mds-tree-item>\n  <mds-tree-item label=\"Voce due\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Slot `<mds-tree-item>` Outside `<mds-tree>`\n\n`<mds-tree-item>` is a compound child and depends on `<mds-tree>` for depth seeding and prop cascading. Using it standalone produces undefined indentation and no toggle coordination.\n\n```html\n<!-- INCORRECT -->\n<div class=\"menu\">\n  <mds-tree-item label=\"Impostazioni\">\n    <mds-tree-item label=\"Profilo\"></mds-tree-item>\n  </mds-tree-item>\n</div>\n\n<!-- CORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Impostazioni\">\n    <mds-tree-item label=\"Profilo\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Use the `action` Slot on `<mds-tree>` Itself\n\nThe `action` slot is defined on `<mds-tree-item>`, not on `<mds-tree>`. Placing content with `slot=\"action\"` on the root container has no effect; the slot is silently discarded.\n\n```html\n<!-- INCORRECT -->\n<mds-tree>\n  <mds-button slot=\"action\" icon=\"mi/baseline/add\" title=\"Aggiungi\"></mds-button>\n  <mds-tree-item label=\"Documenti\"></mds-tree-item>\n</mds-tree>\n\n<!-- CORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Documenti\">\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/add\"\n      variant=\"dark\"\n      tone=\"text\"\n      title=\"Aggiungi\"\n    ></mds-button>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Listen for Native `click` or `change` to Detect Expand/Collapse\n\nA native `click` tells you neither which item changed nor whether it opened or closed. Use the documented events emitted by `<mds-tree-item>`: `mdsTreeItemCollapse` when an item closes, `mdsTreeItemExpand` when an item marked `async` is asked to open.\n\n```html\n<!-- INCORRECT -->\n<mds-tree id=\"albero\">\n  <mds-tree-item label=\"Sezione A\">\n    <mds-tree-item label=\"Voce 1\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n\n<script>\n  // unreliable - a click says nothing about the expanded state\n  document.getElementById('albero').addEventListener('click', handler);\n</script>\n\n<!-- CORRECT -->\n<script>\n  document.getElementById('albero').addEventListener('mdsTreeItemCollapse', (event) => {\n    console.log('collassato:', event.detail.element.label);\n  });\n</script>\n```\n\n#### Do Not Set `expanded=\"false\"` to Collapse\n\nStencil reads the exact string `\"false\"` as `false`, but the attribute stays on the element, where attribute selectors and presence checks (`hasAttribute('expanded')`) still read the tree as expanded. Remove the attribute (or set the prop to `undefined`) to collapse.\n\n```html\n<!-- INCORRECT -->\n<mds-tree expanded=\"false\">\n  <mds-tree-item label=\"Sezione\"></mds-tree-item>\n</mds-tree>\n\n<!-- CORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Sezione\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Use Undocumented `::part()` Targets or `>>>` to Style Internals\n\nThe supported customization surface for `<mds-tree>` is its props and its public `--mds-tree-line-clamp` CSS custom property. Shadow-DOM piercing (`>>>`, `/deep/`) is not supported and `<mds-tree>` exposes no `::part()`. Coupling to internal selectors will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-tree >>> .header {\n  background: red;\n}\n\n/* CORRECT */\nmds-tree {\n  --mds-tree-line-clamp: 3;\n}\n```\n\n#### Do Not Wrap `<mds-tree-item>` in an Extra Div to Add Spacing\n\nInserting wrapper elements breaks the compound slot protocol - `<mds-tree>` communicates with items via `querySelectorAll` and slot assignment, and wrappers interrupt both. Keep the items as direct children: the tree sets their spacing itself, and it has no public CSS custom property for it.\n\n```html\n<!-- INCORRECT -->\n<mds-tree>\n  <div style=\"margin-bottom: 8px;\">\n    <mds-tree-item label=\"Categoria A\"></mds-tree-item>\n  </div>\n  <div style=\"margin-bottom: 8px;\">\n    <mds-tree-item label=\"Categoria B\"></mds-tree-item>\n  </div>\n</mds-tree>\n\n<!-- CORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Categoria A\"></mds-tree-item>\n  <mds-tree-item label=\"Categoria B\"></mds-tree-item>\n</mds-tree>\n```\n"
      },
      "props": [
        {
          "name": "actions",
          "type": "\"auto\" | \"visible\" | undefined",
          "complexType": {
            "original": "TreeActions",
            "resolved": "\"auto\" | \"visible\" | undefined",
            "references": {
              "TreeActions": {
                "location": "import",
                "path": "@type/tree",
                "id": "src/type/tree.ts::TreeActions",
                "referenceLocation": "TreeActions"
              }
            }
          },
          "mutable": false,
          "attr": "actions",
          "reflectToAttr": true,
          "docs": "Show actions on the every tree item on hover or by default.",
          "docsTags": [
            {
              "name": "default",
              "text": "'auto'"
            }
          ],
          "default": "'auto'",
          "values": [
            {
              "value": "auto",
              "type": "string"
            },
            {
              "value": "visible",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "appearance",
          "type": "\"depth\" | \"none\"",
          "complexType": {
            "original": "TreeAppearance",
            "resolved": "\"depth\" | \"none\"",
            "references": {
              "TreeAppearance": {
                "location": "import",
                "path": "@type/tree",
                "id": "src/type/tree.ts::TreeAppearance",
                "referenceLocation": "TreeAppearance"
              }
            }
          },
          "mutable": false,
          "attr": "appearance",
          "reflectToAttr": true,
          "docs": "Specifies if the branches depth decorations are visible.",
          "docsTags": [
            {
              "name": "default",
              "text": "'depth'"
            }
          ],
          "default": "'depth'",
          "values": [
            {
              "value": "depth",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "async",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "async",
          "reflectToAttr": true,
          "docs": "Has no effect on the tree: `async` is read on each `mds-tree-item`.",
          "docsTags": [
            {
              "name": "deprecated",
              "text": "Set `async` on the items that load their children on demand. Goes in the next\nmajor."
            }
          ],
          "deprecation": "Set `async` on the items that load their children on demand. Goes in the next\nmajor.",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "expanded",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "expanded",
          "reflectToAttr": true,
          "docs": "Specifies if the tree is expanded.",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": false,
          "docs": "Names the tree for assistive technologies: the tree is a list of its items, and the label\nis what that list is called",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "toggle",
          "type": "\"chevron\" | \"folder\"",
          "complexType": {
            "original": "TreeIcon",
            "resolved": "\"chevron\" | \"folder\"",
            "references": {
              "TreeIcon": {
                "location": "import",
                "path": "@type/tree",
                "id": "src/type/tree.ts::TreeIcon",
                "referenceLocation": "TreeIcon"
              }
            }
          },
          "mutable": false,
          "attr": "toggle",
          "reflectToAttr": true,
          "docs": "Specifies the toggle icon of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'chevron'"
            }
          ],
          "default": "'chevron'",
          "values": [
            {
              "value": "chevron",
              "type": "string"
            },
            {
              "value": "folder",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "togglePosition",
          "type": "\"left\" | \"right\"",
          "complexType": {
            "original": "ButtonIconPositionType",
            "resolved": "\"left\" | \"right\"",
            "references": {
              "ButtonIconPositionType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonIconPositionType",
                "referenceLocation": "ButtonIconPositionType"
              }
            }
          },
          "mutable": false,
          "attr": "toggle-position",
          "reflectToAttr": true,
          "docs": "Specifies the toggle icon position of the element",
          "docsTags": [
            {
              "name": "default",
              "text": "'left'"
            }
          ],
          "default": "'left'",
          "values": [
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "truncate",
          "type": "\"all\" | \"none\" | \"word\"",
          "complexType": {
            "original": "TypographyTruncateType",
            "resolved": "\"all\" | \"none\" | \"word\"",
            "references": {
              "TypographyTruncateType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyTruncateType",
                "referenceLocation": "TypographyTruncateType"
              }
            }
          },
          "mutable": false,
          "attr": "truncate",
          "reflectToAttr": true,
          "docs": "Truncate the text of the element on one single line.",
          "docsTags": [
            {
              "name": "default",
              "text": "'word'"
            }
          ],
          "default": "'word'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "word",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-tree-actions-border-radius",
          "annotation": "prop",
          "docs": "Sets the border-radius of the wrapper container of the actions.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-actions-gap",
          "annotation": "prop",
          "docs": "Sets the gap between the actions.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-branch-border-color",
          "annotation": "prop",
          "docs": "Sets the border color of the tree branch.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-branch-border-size",
          "annotation": "prop",
          "docs": "Sets the border size of the tree branch.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-branch-dot-default-color",
          "annotation": "prop",
          "docs": "Sets the default color of the tree branch dot.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-branch-dot-expanded-color",
          "annotation": "prop",
          "docs": "Sets the color of the tree branch dot when the item is expanded.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-branch-use-rounded-border",
          "annotation": "prop",
          "docs": "Sets the tree branch has rounded connectors or not, use it as a boolean value `true` or `false`.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-label-default-background",
          "annotation": "prop",
          "docs": "Sets the default text color of the icon used at the near right of the label.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-label-hover-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the label when the mouse is over the item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-label-icon-default-color",
          "annotation": "prop",
          "docs": "Sets the default text color of the icon used at the near right of the label.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-label-icon-hover-color",
          "annotation": "prop",
          "docs": "Sets the text color of the icon used at the near right of the label when the mouse is over the item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-line-clamp",
          "annotation": "prop",
          "docs": "Sets the number of lines to show before truncating the text, it only works when attribute `truncate` is set to `all`.",
          "visibility": "public"
        },
        {
          "name": "--mds-tree-toggle-gap",
          "annotation": "prop",
          "docs": "Sets the gap between the toggle icon and the label.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-async-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the icon when the attribute `async` is set.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-async-color",
          "annotation": "prop",
          "docs": "Sets the text color of the icon when the attribute `async` is set.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-chevron-default-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the chevron icon when the item is collapsed.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-chevron-default-color",
          "annotation": "prop",
          "docs": "Sets the text color of the chevron icon when the item is collapsed.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-chevron-expanded-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the chevron icon when the item is expanded.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-chevron-expanded-color",
          "annotation": "prop",
          "docs": "Sets the text color of the chevron icon when the item is expanded.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-folder-default-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the folder icon when the item is collapsed.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-folder-default-color",
          "annotation": "prop",
          "docs": "Sets the text color of the folder icon when the item is collapsed.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-folder-expanded-color",
          "annotation": "prop",
          "docs": "Sets the text color of the folder icon when the item is expanded.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-position-right-default-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the icon when the attribute `toggle-position` is set to `right`.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-position-right-default-color",
          "annotation": "prop",
          "docs": "Sets the text color of the icon when the attribute `toggle-position` is set to `right`.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-position-right-expanded-background",
          "annotation": "prop",
          "docs": "Sets the background-color of the icon when the attribute `toggle-position` is set to `right` and the item is expanded.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-toggle-icon-position-right-expanded-color",
          "annotation": "prop",
          "docs": "Sets the text color of the icon when the attribute `toggle-position` is set to `right` and the item is expanded.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-transition-duration",
          "annotation": "prop",
          "docs": "Sets the duration of the transition effect.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-transition-timing-function",
          "annotation": "prop",
          "docs": "Sets the timing function of the transition effect.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-tree-item` element/s."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-tree--docs"
    },
    {
      "filePath": "src/components/mds-tree-item/mds-tree-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-tree-item",
      "readme": "# mds-tree-item\n\n\n",
      "docs": "",
      "docsTags": [
        {
          "name": "slot",
          "text": "- Add `mds-tree-item` element/s."
        },
        {
          "name": "slot",
          "text": "action - Add `mds-button`, `mds-icon` or other types component and HTML element/s."
        },
        {
          "name": "part",
          "text": "actions-container - Selects the wrapper of the container of the actions."
        },
        {
          "name": "part",
          "text": "actions-list - Selects the container of the actions."
        },
        {
          "name": "parent",
          "text": "mds-tree mds-tree-item"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-tree-item>` web component is the node primitive of the Magma Design System tree view: it represents a single labeled, expandable/collapsible entry inside an [`<mds-tree>`](../mds-tree/AGENTS.md) and is also the recursive container for its own descendants. It replaces the role of an `<li>` within a nested disclosure list.\n\n#### Semantic Behavior\n\n- **Compound child only**: It must be a direct slot child of `<mds-tree>` (first-level nodes) or of another `<mds-tree-item>` (nested nodes). It is not used standalone, and the default slot is reserved for further `<mds-tree-item>` children - not arbitrary content.\n- **Parent-driven defaults**: The parent `<mds-tree>` writes `toggle`, `togglePosition`, `appearance` and `truncate` onto its descendant items when it loads and onto the items that arrive later (overwriting their own values), and `expanded` when it is set; `actions` is inherited from the nearest ancestor that sets it. These props are therefore orchestrated by the tree rather than set per-item. First-level items receive `depth = 0`.\n- **Self-managed expansion**: Clicking the toggle or label flips `expanded`, swaps the toggle icon, and animates the children container; on collapse it emits `mdsTreeItemCollapse`. Both buttons carry `aria-expanded` on an item with children (or `async`); a leaf has none. The item is a `listitem`, its children a nested `list`, and the children of a closed branch are out of the tab order.\n- **Asynchronous expansion**: While `async` is set, an expand click does not open the node - it shows a spinner and emits `mdsTreeItemExpand` so the application can lazy-load children; the application then calls the public `expand()` method to finalize opening. Without `async`, opening emits no event.\n- **Bubbled events**: `mdsTreeItemExpand` and `mdsTreeItemCollapse` both carry `{ element }` (the host item) so the tree or application can react to node lifecycle.\n- **Leaf vs. branch**: It detects whether it contains nested items (again whenever they change, so a branch loaded on demand gets its toggle) and whether it has slotted actions, adjusting the connector/branch rendering and actions visibility accordingly.\n- **Public method**: `expand()` opens the node and clears the awaiting state (used to resolve async loads).\n\n#### Properties & Visual Configurations\n\n- **`toggle`**: Picks the disclosure affordance - `chevron` (default arrow) or `folder` (closed/open folder icons that swap as the user opens and closes the node). Normally inherited from the parent tree for visual consistency.\n- **`actions`**: Controls when slotted `action` controls appear - `auto` reveals them on hover, `visible` keeps them always shown. Place those controls in the named `action` slot.\n- **`async`**: Enable when a node's children are loaded on demand; pair it with a listener on `mdsTreeItemExpand` and a call to `expand()` once data is ready.\n- **`expanded`**: Mutable open/closed state; set it directly to pre-open a node, but expect the parent tree to override it when the whole tree expands or collapses.\n- **`truncate`**: Governs label overflow (`word`, `all`, `none`); `all` enables multi-line clamping. Usually inherited from the tree.\n- **`icon`**: Optional leading icon rendered inside the label button, independent of the toggle affordance.\n- **`depth`**: Internal/parent-assigned; drives branch-line decoration and should not normally be set by consumers.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-tree-item>` component, ordered from most common to most specialized. The examples assume a working knowledge of the compound parent [`<mds-tree>`](../mds-tree/AGENTS.md) and the shared component rules in [`agents/conventions.md`](../../../../agents/conventions.md).\n\n#### Basic Node Inside a Tree\n\nThe minimal form: a labeled item nested inside its parent `<mds-tree>`. The tree orchestrates `toggle`, `truncate`, and `actions` for all descendants, so you rarely need to set them per item.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Documenti\"></mds-tree-item>\n  <mds-tree-item label=\"Immagini\"></mds-tree-item>\n  <mds-tree-item label=\"Video\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Nested Hierarchy\n\nPlace `<mds-tree-item>` elements in the default slot of another `<mds-tree-item>` to build a hierarchy. The component detects nested children automatically and renders the branch connector.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Ufficio Tecnico\">\n    <mds-tree-item label=\"Pratiche edilizie\">\n      <mds-tree-item label=\"Domanda 2024-001\"></mds-tree-item>\n      <mds-tree-item label=\"Domanda 2024-002\"></mds-tree-item>\n    </mds-tree-item>\n    <mds-tree-item label=\"Concessioni\"></mds-tree-item>\n  </mds-tree-item>\n  <mds-tree-item label=\"Ragioneria\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Pre-Opened Node\n\nSet `expanded` to open a node on first render. Useful for landing pages where a specific branch should already be visible.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Pratiche in corso\" expanded>\n    <mds-tree-item label=\"Richiesta #1042\"></mds-tree-item>\n    <mds-tree-item label=\"Richiesta #1043\"></mds-tree-item>\n  </mds-tree-item>\n  <mds-tree-item label=\"Archivio\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Node with a Leading Icon\n\nUse the `icon` prop to add an icon before the label text. Reference icons by their slug - no `.svg` extension. The icon is independent of the toggle affordance.\n\n```html\n<mds-tree>\n  <mds-tree-item label=\"Segreteria\" icon=\"mi/baseline/desk\">\n    <mds-tree-item label=\"Genoveffo Baci\" icon=\"mi/baseline/person\"></mds-tree-item>\n    <mds-tree-item label=\"Donaldo Trombetta\" icon=\"mi/baseline/person\"></mds-tree-item>\n  </mds-tree-item>\n  <mds-tree-item label=\"Archivio\" icon=\"mi/baseline/archive\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Folder Toggle Style\n\nWhen the tree uses `toggle=\"folder\"`, each item swaps between a closed-folder and open-folder icon as it expands. Set `toggle` on the parent `<mds-tree>` and all items inherit it automatically: the tree writes its own value (default `chevron`) onto every item when it loads and onto the items added later, so a `toggle` set on a single item is overwritten. The icon follows the branch however it opens: a click, `expand()` or the tree's `expanded`.\n\n```html\n<mds-tree toggle=\"folder\">\n  <mds-tree-item label=\"Modulistica\">\n    <mds-tree-item label=\"Modulo A\"></mds-tree-item>\n    <mds-tree-item label=\"Modulo B\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Per-Item Action Controls\n\nSlot `<mds-button>` or `<mds-icon>` elements into the `action` slot to attach contextual controls to a node. Use the `actions` prop (inherited from the tree) to choose when they appear: `\"auto\"` shows them on hover, `\"visible\"` keeps them always visible.\n\n```html\n<mds-tree actions=\"auto\">\n  <mds-tree-item label=\"Contratto 2024\">\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/attach-file\"\n      variant=\"primary\"\n      tone=\"text\"\n      title=\"Allega documento\"\n    ></mds-button>\n    <mds-button\n      slot=\"action\"\n      icon=\"mi/baseline/more-vert\"\n      variant=\"primary\"\n      tone=\"text\"\n      title=\"Altre opzioni\"\n    ></mds-button>\n    <mds-tree-item label=\"Allegato 1\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Asynchronous (Lazy-Load) Node\n\nSet `async` on a node when its children must be fetched on demand. On expand the item shows a spinner on its toggle and emits `mdsTreeItemExpand`; call `expand()` on the element once data is ready to finalize opening. The toggle (and so the spinner) shows only if the item already had child items at first render; children appended later do not add it. After resolving, set `async` to `undefined` (or remove the attribute) so subsequent toggles work synchronously.\n\n```html\n<mds-tree>\n  <mds-tree-item async label=\"Dipendenti\" icon=\"mi/baseline/group\" id=\"dept-node\">\n    <!-- children injected after fetch -->\n  </mds-tree-item>\n</mds-tree>\n\n<script>\n  document.getElementById('dept-node').addEventListener(\n    'mdsTreeItemExpand',\n    async (event) => {\n      const node = event.detail.element;\n      if (!node.async) return;\n      const people = await fetchDepartmentPeople();\n      people.forEach((name) => {\n        const item = document.createElement('mds-tree-item');\n        item.label = name;\n        item.icon = 'mi/baseline/person';\n        node.appendChild(item);\n      });\n      await node.expand();\n      node.async = undefined;\n    },\n  );\n</script>\n```\n\n#### Reacting to Expand and Collapse Events\n\nListen to `mdsTreeItemExpand` and `mdsTreeItemCollapse` to keep external state (e.g. a sidebar breadcrumb or a selection store) in sync. `mdsTreeItemCollapse` fires whenever an item closes; `mdsTreeItemExpand` fires only for items marked `async`, when they are asked to open. Both events carry `{ element }` - the host `<mds-tree-item>` - so you can read its `label` or any other prop.\n\n```html\n<mds-tree id=\"struttura-tree\">\n  <mds-tree-item label=\"Ufficio A\">\n    <mds-tree-item label=\"Sezione 1\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n\n<script>\n  // emitted only by items marked async\n  document.getElementById('struttura-tree').addEventListener('mdsTreeItemExpand', (event) => {\n    console.log('Espanso:', event.detail.element.label);\n  });\n  document.getElementById('struttura-tree').addEventListener('mdsTreeItemCollapse', (event) => {\n    console.log('Compresso:', event.detail.element.label);\n  });\n</script>\n```\n\n#### Multi-Line Label with Clamping\n\nSet `truncate=\"all\"` on the tree (it overwrites the items' own value) to allow multi-line text with clamping controlled by the tree's public `--mds-tree-line-clamp`. Use this for long file paths or descriptive labels.\n\n```html\n<mds-tree truncate=\"all\">\n  <mds-tree-item label=\"Delibera di Giunta Comunale n. 42 del 15 marzo 2024 - approvazione bilancio\">\n  </mds-tree-item>\n  <mds-tree-item label=\"Verbale seduta straordinaria del Consiglio Comunale del 22 aprile 2024\">\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### CSS Customization\n\n`mds-tree-item` has no public CSS custom property: the colours of its label, branch and toggle, its spacing and its transitions follow the semantic roles, so they stay compatible with dark mode and high-contrast. Shape the items with their props (`icon`, and the `toggle`, `toggle-position`, `appearance` and `truncate` the tree passes down), the public `--mds-tree-line-clamp` of the parent `mds-tree` and the two documented parts below.\n\n```css\n.archivio-tree mds-tree {\n  --mds-tree-line-clamp: 3;\n}\n```\n\n#### Styling the Actions Container via Shadow Parts\n\nUse `::part(actions-container)` and `::part(actions-list)` to style the wrapper and inner list of action controls. They are the only documented parts - do not target other internal parts.\n\n```css\nmds-tree-item::part(actions-container) {\n  background: rgb(var(--magma-wash-soft));\n  border-radius: var(--magma-radius-md);\n}\n\nmds-tree-item::part(actions-list) {\n  gap: calc(var(--spacing) * 200);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-tree-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 the Default Slot for Arbitrary Content\n\nThe default slot accepts only `<mds-tree-item>` children. Slotting arbitrary HTML (text, icons, buttons) into the default slot does not produce a label or a nested item - use the `label` prop for text and the `action` slot for action controls.\n\n```html\n<!-- INCORRECT -->\n<mds-tree-item>\n  <span>Documenti</span>\n  <mds-button icon=\"mi/baseline/add\" title=\"Aggiungi documento\"></mds-button>\n</mds-tree-item>\n\n<!-- CORRECT -->\n<mds-tree-item label=\"Documenti\">\n  <mds-button\n    slot=\"action\"\n    icon=\"mi/baseline/add\"\n    title=\"Aggiungi documento\"\n    variant=\"primary\"\n    tone=\"text\"\n  ></mds-button>\n</mds-tree-item>\n```\n\n#### Do Not Use the `action` Slot for Child Nodes\n\nThe `action` slot is for contextual controls (buttons, icons). Putting a `<mds-tree-item>` in the `action` slot removes it from the expand/collapse tree hierarchy and breaks branch rendering.\n\n```html\n<!-- INCORRECT -->\n<mds-tree-item label=\"Cartella\">\n  <mds-tree-item slot=\"action\" label=\"Figlio\"></mds-tree-item>\n</mds-tree-item>\n\n<!-- CORRECT -->\n<mds-tree-item label=\"Cartella\">\n  <mds-tree-item label=\"Figlio\"></mds-tree-item>\n</mds-tree-item>\n```\n\n#### Do Not Set `expanded=\"false\"` to Close a Node\n\nStencil reads the exact string `\"false\"` as `false`, so the node renders closed, but the attribute stays on the element: the chevron, styled on the attribute, points open, and presence checks (`hasAttribute('expanded')`) read the node as open. Remove the attribute (or set the property to `undefined`) to close.\n\n```html\n<!-- INCORRECT -->\n<mds-tree-item label=\"Archivio\" expanded=\"false\"></mds-tree-item>\n\n<!-- CORRECT -->\n<mds-tree-item label=\"Archivio\"></mds-tree-item>\n```\n\n#### Do Not Use `mds-tree-item` Outside a Tree Context\n\n`<mds-tree-item>` is a compound child - it must be a direct slot child of `<mds-tree>` or of another `<mds-tree-item>`. Using it in isolation removes the branch context, depth assignments, and coordinated expand/collapse behavior.\n\n```html\n<!-- INCORRECT -->\n<div class=\"my-list\">\n  <mds-tree-item label=\"Voce 1\"></mds-tree-item>\n  <mds-tree-item label=\"Voce 2\"></mds-tree-item>\n</div>\n\n<!-- CORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Voce 1\"></mds-tree-item>\n  <mds-tree-item label=\"Voce 2\"></mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Set `depth` Manually\n\n`depth` is an internal prop set by the parent `<mds-tree>`: it marks first-level items with `0`, which removes their branch connector lines (indentation comes from the nesting, not from `depth`). A hand-set value is useless at best, and a `0` on a nested item strips the connectors from the wrong level.\n\n```html\n<!-- INCORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Primo livello\" depth=\"0\">\n    <mds-tree-item label=\"Secondo livello\" depth=\"1\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n\n<!-- CORRECT -->\n<mds-tree>\n  <mds-tree-item label=\"Primo livello\">\n    <mds-tree-item label=\"Secondo livello\"></mds-tree-item>\n  </mds-tree-item>\n</mds-tree>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internals\n\n`mds-tree-item` has no public CSS custom property: the only supported customization surface is its props, the two documented shadow parts (`actions-container`, `actions-list`) and the public `--mds-tree-line-clamp` of the parent `mds-tree`. Targeting internal classes via `>>>`, `/deep/`, or undocumented `::part()` names couples your code to implementation details that can change on any minor release.\n\n```css\n/* INCORRECT */\nmds-tree-item >>> .label-action {\n  font-weight: bold;\n}\nmds-tree-item::part(toggle-icon) {\n  color: red;\n}\n\n/* CORRECT */\nmds-tree-item::part(actions-list) {\n  gap: calc(var(--spacing) * 200);\n}\n```\n\n#### Do Not Call `expand()` Instead of Handling Async Correctly\n\n`expand()` is the public method for resolving an async load - it opens the node and clears the spinner. Calling it immediately on the `mdsTreeItemExpand` event (before data is fetched) opens an empty branch and discards the loading affordance. Always await the data before calling `expand()`.\n\n```html\n<!-- INCORRECT -->\n<script>\n  node.addEventListener('mdsTreeItemExpand', (event) => {\n    event.detail.element.expand(); // opens immediately, before data arrives\n    fetchChildren().then((data) => { /* too late */ });\n  });\n</script>\n\n<!-- CORRECT -->\n<script>\n  node.addEventListener('mdsTreeItemExpand', async (event) => {\n    const el = event.detail.element;\n    if (!el.async) return;\n    const data = await fetchChildren();\n    data.forEach((name) => {\n      const child = document.createElement('mds-tree-item');\n      child.label = name;\n      el.appendChild(child);\n    });\n    await el.expand();\n    el.async = undefined;\n  });\n</script>\n```\n"
      },
      "props": [
        {
          "name": "actions",
          "type": "\"auto\" | \"visible\" | undefined",
          "complexType": {
            "original": "TreeActions",
            "resolved": "\"auto\" | \"visible\" | undefined",
            "references": {
              "TreeActions": {
                "location": "import",
                "path": "@type/tree",
                "id": "src/type/tree.ts::TreeActions",
                "referenceLocation": "TreeActions"
              }
            }
          },
          "mutable": false,
          "attr": "actions",
          "reflectToAttr": true,
          "docs": "Show actions on the tree item on hover or by default.",
          "docsTags": [],
          "values": [
            {
              "value": "auto",
              "type": "string"
            },
            {
              "value": "visible",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "appearance",
          "type": "\"depth\" | \"none\" | undefined",
          "complexType": {
            "original": "TreeAppearance",
            "resolved": "\"depth\" | \"none\" | undefined",
            "references": {
              "TreeAppearance": {
                "location": "import",
                "path": "@type/tree",
                "id": "src/type/tree.ts::TreeAppearance",
                "referenceLocation": "TreeAppearance"
              }
            }
          },
          "mutable": false,
          "attr": "appearance",
          "reflectToAttr": true,
          "docs": "Reflects the parent tree appearance (set by mds-tree); drives the depth/none\nlayout without :host-context",
          "docsTags": [],
          "values": [
            {
              "value": "depth",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "async",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "async",
          "reflectToAttr": true,
          "docs": "Loads the children on demand: a click on the closed item shows a spinner and emits\n`mdsTreeItemExpand` instead of opening it; call `expand()` once the children are in place",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "depth",
          "type": "number | undefined",
          "complexType": {
            "original": "number",
            "resolved": "number | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "depth",
          "reflectToAttr": true,
          "docs": "Specifies the tree branch depth. Internal: used by CSS to remove branch lines on first-level elements.",
          "docsTags": [],
          "values": [
            {
              "type": "number"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "expanded",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "expanded",
          "reflectToAttr": true,
          "docs": "Specifies if the tree is expanded.",
          "docsTags": [],
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": false,
          "docs": "The icon displayed in the button",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "label",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "label",
          "reflectToAttr": false,
          "docs": "Specifies the label of the tree item",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "toggle",
          "type": "\"chevron\" | \"folder\" | undefined",
          "complexType": {
            "original": "TreeIcon",
            "resolved": "\"chevron\" | \"folder\" | undefined",
            "references": {
              "TreeIcon": {
                "location": "import",
                "path": "@type/tree",
                "id": "src/type/tree.ts::TreeIcon",
                "referenceLocation": "TreeIcon"
              }
            }
          },
          "mutable": false,
          "attr": "toggle",
          "reflectToAttr": true,
          "docs": "Specifies the icon of the element",
          "docsTags": [],
          "values": [
            {
              "value": "chevron",
              "type": "string"
            },
            {
              "value": "folder",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "togglePosition",
          "type": "\"left\" | \"right\" | undefined",
          "complexType": {
            "original": "ButtonIconPositionType",
            "resolved": "\"left\" | \"right\" | undefined",
            "references": {
              "ButtonIconPositionType": {
                "location": "import",
                "path": "@type/button",
                "id": "src/type/button.ts::ButtonIconPositionType",
                "referenceLocation": "ButtonIconPositionType"
              }
            }
          },
          "mutable": false,
          "attr": "toggle-position",
          "reflectToAttr": true,
          "docs": "Reflects the parent tree toggle icon position (set by mds-tree); drives the\ntoggle-icon layout without :host-context",
          "docsTags": [],
          "values": [
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "truncate",
          "type": "\"all\" | \"none\" | \"word\" | undefined",
          "complexType": {
            "original": "TypographyTruncateType",
            "resolved": "\"all\" | \"none\" | \"word\" | undefined",
            "references": {
              "TypographyTruncateType": {
                "location": "import",
                "path": "@type/text",
                "id": "src/type/text.ts::TypographyTruncateType",
                "referenceLocation": "TypographyTruncateType"
              }
            }
          },
          "mutable": false,
          "attr": "truncate",
          "reflectToAttr": true,
          "docs": "Truncate the text of the element on one single line.",
          "docsTags": [
            {
              "name": "default",
              "text": "'word'"
            }
          ],
          "default": "'word'",
          "values": [
            {
              "value": "all",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "word",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "expand",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "expand() => Promise<void>",
          "parameters": [],
          "docs": "Expands the tree item, revealing its children.",
          "docsTags": []
        },
        {
          "name": "refreshActions",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "refreshActions() => Promise<void>",
          "parameters": [],
          "docs": "`internal` Re-resolves the effective actions; called by mds-tree when its own\nactions changes so items that inherit it stay in sync.",
          "docsTags": []
        }
      ],
      "events": [
        {
          "event": "mdsTreeItemCollapse",
          "detail": "MdsTreeItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsTreeItemEventDetail",
            "resolved": "MdsTreeItemEventDetail",
            "references": {
              "MdsTreeItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-tree-item/meta/event-detail.ts::MdsTreeItemEventDetail",
                "referenceLocation": "MdsTreeItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the item closes, once its children have finished hiding",
          "docsTags": []
        },
        {
          "event": "mdsTreeItemExpand",
          "detail": "MdsTreeItemEventDetail",
          "bubbles": true,
          "complexType": {
            "original": "MdsTreeItemEventDetail",
            "resolved": "MdsTreeItemEventDetail",
            "references": {
              "MdsTreeItemEventDetail": {
                "location": "import",
                "path": "./meta/event-detail",
                "id": "src/components/mds-tree-item/meta/event-detail.ts::MdsTreeItemEventDetail",
                "referenceLocation": "MdsTreeItemEventDetail"
              }
            }
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the user opens an `async` item, to load its children: opening any other item emits\nnothing",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-tree-item-actions-border-radius",
          "annotation": "prop",
          "docs": "Inherits the border-radius used for tree action containers.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-actions-gap",
          "annotation": "prop",
          "docs": "Spacing between tree item action elements.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-branch-border-color",
          "annotation": "prop",
          "docs": "The border color of the branch connector for the item.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-branch-border-radius",
          "annotation": "prop",
          "docs": "The border-radius applied to the branch connector.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-branch-border-size",
          "annotation": "prop",
          "docs": "The thickness of the branch connector line.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-branch-dot-default-color",
          "annotation": "prop",
          "docs": "Default color of the branch dot indicator.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-branch-dot-expanded-color",
          "annotation": "prop",
          "docs": "Color of the branch dot when expanded.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-label-default-background",
          "annotation": "prop",
          "docs": "Background color of the label in default state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-label-hover-background",
          "annotation": "prop",
          "docs": "Background color of the label in hover state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-label-icon-default-color",
          "annotation": "prop",
          "docs": "Default icon color inside the label.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-label-icon-hover-color",
          "annotation": "prop",
          "docs": "Icon color inside the label when hovering.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-line-clamp",
          "annotation": "prop",
          "docs": "Defines the number of lines before text is truncated.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-gap",
          "annotation": "prop",
          "docs": "Spacing between the label and the toggle control.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-async-background",
          "annotation": "prop",
          "docs": "Background color for async-loading toggle icons.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-async-color",
          "annotation": "prop",
          "docs": "Icon color for async-loading toggles.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-chevron-default-background",
          "annotation": "prop",
          "docs": "Background for the default chevron toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-chevron-default-color",
          "annotation": "prop",
          "docs": "Icon color for the default chevron toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-chevron-expanded-background",
          "annotation": "prop",
          "docs": "Background for the expanded chevron toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-chevron-expanded-color",
          "annotation": "prop",
          "docs": "Icon color for the expanded chevron toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-folder-default-background",
          "annotation": "prop",
          "docs": "Background for the default folder toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-folder-default-color",
          "annotation": "prop",
          "docs": "Icon color for the default folder toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-folder-expanded-background",
          "annotation": "prop",
          "docs": "Background for the expanded folder toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-folder-expanded-color",
          "annotation": "prop",
          "docs": "Icon color for the expanded folder toggle.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-position-right-default-background",
          "annotation": "prop",
          "docs": "Background for right-positioned toggle in default state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-position-right-default-color",
          "annotation": "prop",
          "docs": "Icon color for right-positioned toggle in default state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-position-right-expanded-background",
          "annotation": "prop",
          "docs": "Background for right-positioned toggle in expanded state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-icon-position-right-expanded-color",
          "annotation": "prop",
          "docs": "Icon color for right-positioned toggle in expanded state.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-toggle-size",
          "annotation": "prop",
          "docs": "Size of the toggle control.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-transition-duration",
          "annotation": "prop",
          "docs": "Transition duration for tree item animation.",
          "visibility": "internal"
        },
        {
          "name": "--mds-tree-item-transition-timing-function",
          "annotation": "prop",
          "docs": "Transition easing function for tree item animation.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `mds-tree-item` element/s."
        },
        {
          "name": "action",
          "docs": "Add `mds-button`, `mds-icon` or other types component and HTML element/s."
        }
      ],
      "parts": [
        {
          "name": "actions-container",
          "docs": "Selects the wrapper of the container of the actions."
        },
        {
          "name": "actions-list",
          "docs": "Selects the container of the actions."
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-tree-item": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-tree-tree-item--docs"
    },
    {
      "filePath": "src/components/mds-url-view/mds-url-view.tsx",
      "encapsulation": "shadow",
      "tag": "mds-url-view",
      "readme": "# mds-url-view\n\n\n\nThis 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.\n",
      "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": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-url-view>` web component renders an embedded preview of an external web page inside a framed browser-like window, wrapping a native `<iframe>` with a titled header, an identifying icon, and a dismiss control. It is the Magma way to surface remote content (typically inside a `mds-modal`) without hand-building chrome around the raw iframe.\n\n#### Semantic Behavior\n\n- **Iframe preview**: The required `src` is loaded into an internal `<iframe>`; the component is purely a presentational frame and does not proxy or sandbox the embedded document beyond the browser defaults.\n- **Domain labelling**: When no explicit `label` is provided, the header title falls back to the page's hostname (with a leading `www.` stripped), derived from `src`.\n- **Close action**: The header dismiss button emits the `mdsUrlViewClose` event and, when the component is nested inside a `mds-modal`, automatically closes that ancestor modal.\n- **Keyboard activation**: The close control can be triggered by keyboard the same way as a pointer click.\n- **Localization**: Header tooltip and ARIA strings are resolved in the active language (el / en / es / it).\n\n#### Properties & Visual Configurations\n\n- **`src`** is the only required prop and drives everything else - the iframe source, the fallback header title, and the ARIA descriptions.\n- **`label`** overrides the auto-derived hostname shown in the header when a friendlier title is wanted.\n- **`icon`** is an SVG filename slug from the Magma icon library shown at the left of the header; it defaults to a generic \"explore\" glyph when omitted.\n- **`loading`** controls iframe fetch timing: `'lazy'` (the default) defers loading until the frame approaches the viewport, while `'eager'` requests the content immediately.\n\nThis component does not expose the shared `variant` / `tone` ladders ([`agents/variants.md`](../../../../agents/variants.md)) on its own host; those props are applied internally to the child `mds-button` close control.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-url-view>` 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#### Minimal Embed Inside a Modal\n\nThe most common use: pass only the required `src` and place the component in the `window` slot of [`mds-modal`](../mds-modal/AGENTS.md). The header title falls back to the hostname extracted from `src`.\n\n```html\n<mds-modal id=\"modal-anteprima\" position=\"center\" opened>\n  <mds-url-view\n    slot=\"window\"\n    class=\"max-w-screen-tablet w-full\"\n    src=\"https://www.comune.bologna.it/\"\n  ></mds-url-view>\n</mds-modal>\n```\n\n#### Custom Header Label\n\nOverride the auto-derived hostname with a human-readable title via `label`. Use this when the URL is not self-describing or when the UI language differs from the domain name.\n\n```html\n<mds-modal id=\"modal-modulo\" position=\"center\" opened>\n  <mds-url-view\n    slot=\"window\"\n    class=\"max-w-screen-tablet w-full\"\n    src=\"https://forms.example.com/richiesta-certificato\"\n    label=\"Modulo di richiesta certificato\"\n  ></mds-url-view>\n</mds-modal>\n```\n\n#### Custom Header Icon\n\nProvide `icon` with an icon slug to replace the default \"explore\" glyph with a context-appropriate symbol.\n\n```html\n<mds-modal id=\"modal-libro\" position=\"center\" opened>\n  <mds-url-view\n    slot=\"window\"\n    class=\"max-w-screen-tablet w-full\"\n    src=\"https://books.example.com/catalogo\"\n    label=\"Catalogo libri\"\n    icon=\"mgg/google-book-large\"\n  ></mds-url-view>\n</mds-modal>\n```\n\n#### Eager Loading\n\nSet `loading=\"eager\"` when the content should start fetching immediately - for example, when the modal is already open on page load and the iframe is immediately visible.\n\n```html\n<mds-modal position=\"center\" opened>\n  <mds-url-view\n    slot=\"window\"\n    src=\"https://dashboard.example.com/\"\n    label=\"Dashboard\"\n    loading=\"eager\"\n  ></mds-url-view>\n</mds-modal>\n```\n\n#### Reacting to the Close Event\n\nListen for `mdsUrlViewClose` to update application state when the user clicks the dismiss control. When the component is inside `mds-modal` the ancestor modal is also closed automatically, but you may still need to sync your own state.\n\n```html\n<mds-modal id=\"modal-url\" position=\"center\" opened>\n  <mds-url-view\n    id=\"url-view\"\n    slot=\"window\"\n    src=\"https://servizi.example.it/portale\"\n    label=\"Portale servizi\"\n  ></mds-url-view>\n</mds-modal>\n\n<script>\n  document.querySelector('#url-view').addEventListener('mdsUrlViewClose', () => {\n    // aggiorna lo stato dell'applicazione\n    appState.urlViewOpen = false;\n  });\n</script>\n```\n\n#### Styling Customization\n\nStyle the component only through its public `--mds-url-view-*` CSS custom properties: the background, the text colour, the radius and the shadow of the container. Set them on the host or on a parent selector; use the semantic color roles via `rgb(var(--magma-<role>))` so dark mode and high-contrast modes keep working.\n\n```css\n.anteprima-documento mds-url-view {\n  --mds-url-view-background: rgb(var(--magma-wash-base));\n  --mds-url-view-color: rgb(var(--magma-text-default));\n  --mds-url-view-radius: var(--magma-radius-lg);\n  --mds-url-view-shadow: var(--shadow-xl);\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-url-view>`. 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 a Raw `<iframe>` When Magma Chrome Is Needed\n\nReaching for a bare `<iframe>` skips the header, dismiss control, accessibility labels, keyboard handling, and modal integration that `<mds-url-view>` provides. Use the component instead.\n\n```html\n<!-- INCORRECT -->\n<mds-modal position=\"center\" opened>\n  <iframe slot=\"window\" src=\"https://servizi.example.it/\" style=\"width:100%;height:80vh;\"></iframe>\n</mds-modal>\n\n<!-- CORRECT -->\n<mds-modal position=\"center\" opened>\n  <mds-url-view\n    slot=\"window\"\n    class=\"max-w-screen-tablet w-full\"\n    src=\"https://servizi.example.it/\"\n    label=\"Portale servizi\"\n  ></mds-url-view>\n</mds-modal>\n```\n\n#### Do Not Omit `src`\n\n`src` is the only required prop. Without it the iframe loads nothing, and the header title and the ARIA labels, derived from `src`, are left empty.\n\n```html\n<!-- INCORRECT -->\n<mds-url-view slot=\"window\"></mds-url-view>\n\n<!-- CORRECT -->\n<mds-url-view slot=\"window\" src=\"https://servizi.example.it/\"></mds-url-view>\n```\n\n#### Do Not Use Outside `mds-modal` Without an Explicit Close Handler\n\n`<mds-url-view>` auto-closes the nearest `mds-modal` ancestor on dismiss. Used outside a modal, the close button fires `mdsUrlViewClose` but nothing hides the component - you must listen for the event and handle visibility yourself.\n\n```html\n<!-- INCORRECT - dismiss button fires but nothing hides the component -->\n<mds-url-view src=\"https://servizi.example.it/\" label=\"Portale\"></mds-url-view>\n\n<!-- CORRECT - listen and hide manually when used standalone -->\n<div id=\"url-wrapper\">\n  <mds-url-view id=\"url-view\" src=\"https://servizi.example.it/\" label=\"Portale\"></mds-url-view>\n</div>\n<script>\n  document.querySelector('#url-view').addEventListener('mdsUrlViewClose', () => {\n    document.querySelector('#url-wrapper').hidden = true;\n  });\n</script>\n```\n\n#### Do Not Pierce the Shadow DOM to Style Internals\n\nThe supported customization surface is the four public `--mds-url-view-*` CSS custom properties. Targeting shadow internals via `::part()` on undocumented parts, `>>>`, or class-name hacks couples your code to the implementation and will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-url-view >>> .header {\n  background: navy;\n}\nmds-url-view >>> .iframe {\n  border: 2px solid red;\n}\n\n/* CORRECT */\nmds-url-view {\n  --mds-url-view-background: rgb(var(--magma-accent-surface));\n  --mds-url-view-color: rgb(var(--magma-accent-fg));\n}\n```\n\n#### Do Not Pass a Relative URL to `src`\n\nThe component calls `new URL(src)` to extract the hostname for the fallback title and ARIA labels. A relative path has no hostname, so the header and the ARIA labels show the raw path instead of the domain. Always pass an absolute URL.\n\n```html\n<!-- INCORRECT -->\n<mds-url-view slot=\"window\" src=\"/portale/servizi\"></mds-url-view>\n\n<!-- CORRECT -->\n<mds-url-view slot=\"window\" src=\"https://servizi.example.it/portale\"></mds-url-view>\n```\n\n#### Do Not Use `loading=\"false\"` to Disable Lazy Loading\n\n`loading` accepts the string values `\"lazy\"` and `\"eager\"`, not booleans. `loading=\"false\"` is outside the type and is passed to the iframe as is: it loads eagerly only because the browser treats any unknown value as `eager`. Write the value you mean.\n\n```html\n<!-- INCORRECT -->\n<mds-url-view slot=\"window\" src=\"https://example.com/\" loading=\"false\"></mds-url-view>\n\n<!-- CORRECT -->\n<mds-url-view slot=\"window\" src=\"https://example.com/\" loading=\"eager\"></mds-url-view>\n```\n"
      },
      "props": [
        {
          "name": "icon",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "icon",
          "reflectToAttr": true,
          "docs": "Specifies the icon shown in the header, before the label or the domain; without it the\nheader shows the explore icon",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "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 if the window has a label",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "loading",
          "type": "\"eager\" | \"lazy\" | undefined",
          "complexType": {
            "original": "LoadingType",
            "resolved": "\"eager\" | \"lazy\" | undefined",
            "references": {
              "LoadingType": {
                "location": "import",
                "path": "@type/loading",
                "id": "src/type/loading.ts::LoadingType",
                "referenceLocation": "LoadingType"
              }
            }
          },
          "mutable": false,
          "attr": "loading",
          "reflectToAttr": true,
          "docs": "Specifies whether a browser should load an iframe immediately\nor to defer loading of images until some conditions are met.",
          "docsTags": [
            {
              "name": "default",
              "text": "'lazy'"
            }
          ],
          "default": "'lazy'",
          "values": [
            {
              "value": "eager",
              "type": "string"
            },
            {
              "value": "lazy",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "src",
          "type": "string",
          "complexType": {
            "original": "string",
            "resolved": "string",
            "references": {}
          },
          "mutable": false,
          "attr": "src",
          "reflectToAttr": true,
          "docs": "Specifies the URL to the web page",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            }
          ],
          "optional": false,
          "required": true,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [
        {
          "event": "mdsUrlViewClose",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when the close button is clicked",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-url-view-background",
          "annotation": "prop",
          "docs": "Background color of the URL view container.",
          "visibility": "public"
        },
        {
          "name": "--mds-url-view-color",
          "annotation": "prop",
          "docs": "Text color used inside the URL view.",
          "visibility": "public"
        },
        {
          "name": "--mds-url-view-header-shadow",
          "annotation": "prop",
          "docs": "Box-shadow applied to the header area of the URL view.",
          "visibility": "internal"
        },
        {
          "name": "--mds-url-view-radius",
          "annotation": "prop",
          "docs": "Border-radius applied to the URL view container.",
          "visibility": "public"
        },
        {
          "name": "--mds-url-view-shadow",
          "annotation": "prop",
          "docs": "Box-shadow applied to the entire URL view container.",
          "visibility": "public"
        }
      ],
      "slots": [],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-text",
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-url-view": [
          "mds-icon",
          "mds-text",
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ]
      },
      "storybook": "ui-url-view--docs"
    },
    {
      "filePath": "src/components/mds-usage/mds-usage.tsx",
      "encapsulation": "shadow",
      "tag": "mds-usage",
      "readme": "# mds-usage\n\n\n\nThis 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.\n",
      "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": "part",
          "text": "header - The header that holds the `icon` and the `label`"
        },
        {
          "name": "part",
          "text": "icon - The icon of the header, the one of `variant` unless `icon` is set"
        },
        {
          "name": "part",
          "text": "label - The label of the header, the name of `variant` unless `alias` is set"
        },
        {
          "name": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-usage>` web component is a documentation-oriented annotation block of the Magma Design System used to frame example content as a recommendation, a warning, or an informational note. It wraps slotted content in a labelled, status-colored container and has no native HTML primitive equivalent - it is a presentational guidance device, typically used inside design-system docs and Storybook.\n\n#### Semantic Behavior\n\n- **Status semantics via `variant`**: The chosen `variant` drives the border and header color from the shared status palette (success / info / error / warning) and the header icon (a tick for `do`, an X for `dont`, an info sign for `info`, a warning triangle for `warn`), so the container reads as the matching guidance category even without its color.\n- **Label first**: The header label (the `alias`, or the name of the `variant` in the page language) is what tells assistive technology the kind of guidance; the content region has no role of its own.\n- **Localized header label**: When `alias` is not provided, the header text is resolved from the bundled locale dictionary (el / en / es / it) keyed by `variant`, so the label follows the document language.\n- **Default slot is content**: The default (unnamed) slot accepts a text string, HTML elements, or other components - it is the body of the usage block, not the label.\n\n#### Properties & Visual Configurations\n\n`variant` is the primary configuration prop. Unlike most Magma components, this is NOT the shared variant/tone ladder defined in [`agents/variants.md`](../../../../agents/variants.md); it is a component-specific guidance category:\n\n- **`variant=\"do\"`**: marks recommended / allowed usage (success styling).\n- **`variant=\"dont\"`**: marks discouraged / disallowed usage (error styling).\n- **`variant=\"info\"`**: neutral informational note (info styling); this is the default.\n- **`variant=\"warn\"`**: cautionary note (warning styling).\n\nThe `variant` is reflected on the host, where the styles read it, so it colors the block when it is set as a property too (as the React and Angular wrappers set it); without one the host gets `info`.\n\n#### Other behavioral props\n\n- **`alias`** overrides the auto-generated, localized header phrase with a custom string when the default category label is not specific enough for the example being shown.\n- **`icon`** replaces the header icon of the `variant` with any icon slug; colors and label still follow the `variant`. When not set or empty, the icon follows the `variant`. The header icon is decorative: the label carries the meaning.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-usage>` 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#### Default Informational Note\n\nThe simplest form. Omit `variant` to get the `info` default - a neutral, blue-tinted container that draws attention to a usage note without implying correctness or incorrectness.\n\n```html\n<mds-usage>\n  <mds-text>\n    Utilizzare sempre il colore primario del tema per le azioni principali.\n  </mds-text>\n</mds-usage>\n```\n\n#### Recommended Pattern (`variant=\"do\"`)\n\nUse `variant=\"do\"` to mark a component usage or design pattern as explicitly recommended. The container adopts success styling and the header reads the variant label.\n\n```html\n<mds-usage variant=\"do\">\n  <mds-button label=\"Salva\" variant=\"primary\" tone=\"strong\"></mds-button>\n</mds-usage>\n```\n\n#### Discouraged Pattern (`variant=\"dont\"`)\n\nUse `variant=\"dont\"` to mark a usage as explicitly forbidden or inadvisable. The container adopts error styling.\n\n```html\n<mds-usage variant=\"dont\">\n  <button style=\"background: blue; color: white;\">Salva</button>\n</mds-usage>\n```\n\n#### Cautionary Note (`variant=\"warn\"`)\n\nUse `variant=\"warn\"` when a pattern is not forbidden but requires care - for example when a prop combination is valid but has side effects, or when a rare edge case exists. The container adopts warning styling.\n\n```html\n<mds-usage variant=\"warn\">\n  <mds-text>\n    Impostare type=\"button\" su ogni pulsante all'interno di un form\n    per evitare invii accidentali.\n  </mds-text>\n</mds-usage>\n```\n\n#### Custom Header Label via `alias`\n\nWhen the auto-generated, localized header (\"Consentito\", \"Non consentito\", etc.) is not specific enough for the context, pass `alias` to replace it with a custom string. The locale dictionary is bypassed entirely.\n\n```html\n<mds-usage variant=\"do\" alias=\"Struttura consigliata\">\n  <mds-text>Usare mds-card con header, content e footer separati.</mds-text>\n</mds-usage>\n\n<mds-usage variant=\"dont\" alias=\"Struttura da evitare\">\n  <mds-text>Non annidare mds-card all'interno di un'altra mds-card.</mds-text>\n</mds-usage>\n```\n\n#### Custom Header Icon via `icon`\n\nEach `variant` has its own header icon. When a custom `alias` names a more specific category, pass `icon` with a slug that illustrates it; the `variant` still drives the colors and the label fallback. Keep the icon coherent with the `variant`.\n\n```html\n<mds-usage variant=\"do\" alias=\"Struttura consigliata\" icon=\"mi/baseline/account-tree\">\n  <mds-text>Usare mds-card con header, content e footer separati.</mds-text>\n</mds-usage>\n```\n\n#### Side-by-Side Do / Dont Pair\n\nPair a `do` block with a `dont` block to illustrate a correct and an incorrect approach in the same documentation section. No extra wrapper is needed - use a CSS grid or flex container.\n\n```html\n<div style=\"display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;\">\n  <mds-usage variant=\"do\">\n    <mds-button label=\"Conferma\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </mds-usage>\n\n  <mds-usage variant=\"dont\">\n    <mds-button label=\"Conferma\" tone=\"strong\" style=\"--mds-button-background: green;\"></mds-button>\n  </mds-usage>\n</div>\n```\n\n#### Rich Slotted Content\n\nThe default slot accepts any HTML or Magma components. Use this to annotate a fully composed UI fragment rather than a single element.\n\n```html\n<mds-usage variant=\"do\" alias=\"Composizione corretta di mds-card\">\n  <mds-card>\n    <mds-card-header slot=\"header\">\n      <mds-text typography=\"h5\">Titolo scheda</mds-text>\n    </mds-card-header>\n    <mds-card-content slot=\"content\">\n      <mds-text>Contenuto principale della scheda.</mds-text>\n    </mds-card-content>\n    <mds-card-footer slot=\"footer\">\n      <mds-button label=\"Azione\" variant=\"primary\"></mds-button>\n    </mds-card-footer>\n  </mds-card>\n</mds-usage>\n```\n\n#### Styling Customization\n\n`mds-usage` has no public CSS custom property: its border and header colours follow the `variant` (`do`, `dont`, `info`, `warn`). When an annotation needs other colours, style the documented `header`, `icon` and `label` parts, and use the semantic color roles via `rgb(var(--magma-<role>))` to keep dark mode working.\n\n```css\n.docs-callout mds-usage::part(header) {\n  background-color: rgb(var(--magma-accent-ai-emphasis));\n}\n.docs-callout mds-usage::part(icon) {\n  fill: rgb(var(--magma-accent-ai-on-emphasis));\n}\n.docs-callout mds-usage::part(label) {\n  color: rgb(var(--magma-accent-ai-on-emphasis));\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-usage>`. 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 `variant` as the Shared Tone/Variant Ladder\n\n`<mds-usage>` does not use the system-wide `variant` ladder (`primary`, `secondary`, `error`, etc.). Its `variant` prop is component-specific (`do`, `dont`, `info`, `warn`). Passing a system variant silently falls back to the base info-like styling and the info icon, with an empty header label (the locale has no entry for it).\n\n```html\n<!-- INCORRECT -->\n<mds-usage variant=\"error\">\n  <mds-text>Non consentito.</mds-text>\n</mds-usage>\n\n<!-- CORRECT -->\n<mds-usage variant=\"dont\">\n  <mds-text>Non consentito.</mds-text>\n</mds-usage>\n```\n\n#### Do Not Use an `icon` That Contradicts the `variant`\n\n`icon` replaces only the glyph: colors and label still follow the `variant`. An icon that means the opposite (a tick on a `dont` block, a cross on a `do` block) sends two conflicting signals. To change the meaning, change the `variant`; use `icon` only to make the same meaning more specific.\n\n```html\n<!-- INCORRECT -->\n<mds-usage variant=\"dont\" icon=\"mi/baseline/check-circle\">\n  <mds-text>Non annidare mds-card all'interno di un'altra mds-card.</mds-text>\n</mds-usage>\n\n<!-- CORRECT -->\n<mds-usage variant=\"dont\">\n  <mds-text>Non annidare mds-card all'interno di un'altra mds-card.</mds-text>\n</mds-usage>\n```\n\n#### Do Not Omit the Slot Content\n\n`<mds-usage>` renders a labeled container; without slotted content the block displays only the colored header strip with no body - producing a visually broken annotation. Always provide meaningful content in the default slot.\n\n```html\n<!-- INCORRECT -->\n<mds-usage variant=\"do\"></mds-usage>\n\n<!-- CORRECT -->\n<mds-usage variant=\"do\">\n  <mds-text>Usare sempre il colore del tema per i pulsanti primari.</mds-text>\n</mds-usage>\n```\n\n#### Do Not Put the Label in the Default Slot\n\nThe default slot is the body of the block. Placing a heading or label string there makes it look like body text, not a header. Use the `alias` prop to supply a custom header label.\n\n```html\n<!-- INCORRECT -->\n<mds-usage variant=\"do\">\n  Struttura consigliata\n</mds-usage>\n\n<!-- CORRECT -->\n<mds-usage variant=\"do\" alias=\"Struttura consigliata\">\n  <mds-text>Comporre mds-card con i suoi sotto-componenti dedicati.</mds-text>\n</mds-usage>\n```\n\n#### Do Not Pierce the Shadow DOM to Restyle the Header\n\n`::part(header)`, `::part(icon)`, and `::part(label)` are the only documented extension points for shadow internals. Targeting undocumented class names or using `>>>` couples code to implementation details that may change. `mds-usage` has no public CSS custom property: for color overrides, pick the `variant` or style these parts instead.\n\n```css\n/* INCORRECT */\nmds-usage >>> .header {\n  background: rgb(var(--magma-accent-ai-emphasis));\n}\n\n/* CORRECT */\nmds-usage::part(header) {\n  background-color: rgb(var(--magma-accent-ai-emphasis));\n}\nmds-usage::part(label) {\n  color: rgb(var(--magma-accent-ai-on-emphasis));\n}\n```\n\n#### Do Not Use `<mds-usage>` as a General-Purpose Card\n\n`<mds-usage>` is a documentation/Storybook annotation primitive - it is not a card, callout, or alert for production UIs. For in-app status messages use [`mds-banner`](../mds-banner/AGENTS.md), [`mds-note`](../mds-note/AGENTS.md), or [`mds-toast`](../mds-toast/AGENTS.md).\n\n```html\n<!-- INCORRECT - using mds-usage as a production alert -->\n<mds-usage variant=\"warn\">\n  <mds-text>La sessione sta per scadere.</mds-text>\n</mds-usage>\n\n<!-- CORRECT - use the appropriate production component -->\n<mds-banner variant=\"warning\" tone=\"weak\">La sessione sta per scadere.</mds-banner>\n```\n"
      },
      "props": [
        {
          "name": "alias",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "alias",
          "reflectToAttr": false,
          "docs": "Specifies the alias of the usage phrase on the top of the component",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "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 header; when not set or empty, the icon follows the `variant`",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "variant",
          "type": "\"do\" | \"dont\" | \"info\" | \"warn\"",
          "complexType": {
            "original": "UsageType",
            "resolved": "\"do\" | \"dont\" | \"info\" | \"warn\"",
            "references": {
              "UsageType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-usage/meta/types.ts::UsageType",
                "referenceLocation": "UsageType"
              }
            }
          },
          "mutable": false,
          "attr": "variant",
          "reflectToAttr": true,
          "docs": "Specifies the guidance category of the content, which drives colors, header label and icon",
          "docsTags": [
            {
              "name": "default",
              "text": "'info'"
            }
          ],
          "default": "'info'",
          "values": [
            {
              "value": "do",
              "type": "string"
            },
            {
              "value": "dont",
              "type": "string"
            },
            {
              "value": "info",
              "type": "string"
            },
            {
              "value": "warn",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-usage-border-color",
          "annotation": "prop",
          "docs": "The border-color applied to the usage container or indicator.",
          "visibility": "internal"
        },
        {
          "name": "--mds-usage-header-background",
          "annotation": "prop",
          "docs": "The background-color of the usage header.",
          "visibility": "internal"
        },
        {
          "name": "--mds-usage-header-color",
          "annotation": "prop",
          "docs": "The text/icon color of the usage header.",
          "visibility": "internal"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "header",
          "docs": "The header that holds the `icon` and the `label`"
        },
        {
          "name": "icon",
          "docs": "The icon of the header, the one of `variant` unless `icon` is set"
        },
        {
          "name": "label",
          "docs": "The label of the header, the name of `variant` unless `alias` is set"
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [
        "mds-icon",
        "mds-text"
      ],
      "dependencyGraph": {
        "mds-usage": [
          "mds-icon",
          "mds-text"
        ]
      },
      "storybook": "ui-usage--docs"
    },
    {
      "filePath": "src/components/mds-video-wall/mds-video-wall.tsx",
      "encapsulation": "shadow",
      "tag": "mds-video-wall",
      "readme": "# mds-video-wall\n\n\n\nThis 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.\n",
      "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": "- Write browser support missing message here."
        },
        {
          "name": "slot",
          "text": "content - Add video content overlay here, add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "category",
          "text": "content"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-video-wall>` web component is the Magma Design System's full-bleed background video surface, used to render an autoplaying, looping ambient video behind foreground content. It wraps the native `<video>` element, adding an optional grain/noise overlay and a dedicated content layer for captions or call-to-action overlays.\n\n#### Semantic Behavior\n\n- **Ambient by default**: `autoplay`, `loop` and `muted` are all `true` out of the box, producing a self-contained background loop with no controls and no audio - the configuration browsers require for autoplay to be honored. When the Magma animation preference reduces motion (`pref-animation-reduce`, `mds-pref-animation`, or the OS `prefers-reduced-motion` under `system`), the video is hidden.\n- **Decorative video**: The footage is treated as presentation only; meaningful information must live in the `content` slot, not in the video itself.\n- **Noise overlay**: When `noise` is anything other than `'none'`, a decorative grain layer is rendered above the video; with `noise=\"none\"` the layer is omitted entirely.\n- **Conditional content layer**: The `content` overlay wrapper is shown only while a `slot=\"content\"` child is present, also when it is added after the first render, so an empty overlay never affects layout.\n- **Default slot is fallback text**: The default (unnamed) slot is projected inside the `<video>` element and is intended for the browser-support fallback message shown when video playback is unavailable.\n- **Preload is conditional**: `preload` only takes effect when autoplay is disabled; the browser ignores it while `autoplay` is active.\n\n#### Properties & Visual Configurations\n\nThis component does not use the shared `variant` / `tone` ladders; its props map closely to the underlying native `<video>` attributes plus the Magma-specific overlay.\n\n#### Other behavioral props\n\n- **`noise`** selects the texture/strength of the grain overlay (`'classic'`, `'sharp'`, `'soft'`, `'tv'`); choose the style that matches the intended mood, or `'none'` to disable the effect.\n- **`poster`** is the still image shown before the footage is ready - pick a frame that reads well on its own, since it is the first thing users see.\n- **`preload`** hints how aggressively the file is fetched on page load; relevant only when autoplay is off.\n- **`src`** is the URL of the video file driving the wall.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-video-wall>` 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#### Minimal Ambient Background\n\nThe simplest and most common use: a full-bleed autoplaying video loop with no extra configuration needed, because `autoplay`, `loop`, and `muted` are all `true` by default.\n\n```html\n<mds-video-wall src=\"/assets/video/ambient.mp4\"></mds-video-wall>\n```\n\n#### Poster Image for Initial Frame\n\nSupply a `poster` image so users see a meaningful still frame before the video loads, or on devices where autoplay is suppressed by the browser.\n\n```html\n<mds-video-wall\n  src=\"/assets/video/ambient.mp4\"\n  poster=\"/assets/video/ambient-preview.webp\"\n></mds-video-wall>\n```\n\n#### Noise Overlay for Texture\n\nAdd a grain overlay with `noise` to give the video a cinematic or retro feel. Choose the texture that fits the intended mood: `classic`, `sharp`, `soft`, or `tv`.\n\n```html\n<!-- Subtle classic grain -->\n<mds-video-wall src=\"/assets/video/ambient.mp4\" noise=\"classic\"></mds-video-wall>\n\n<!-- High-contrast TV static -->\n<mds-video-wall src=\"/assets/video/ambient.mp4\" noise=\"tv\"></mds-video-wall>\n```\n\n#### Foreground Content Overlay via the `content` Slot\n\nPlace any text, HTML elements, or Magma components in the `content` slot to render them centered above the video. The overlay wrapper is shown only while this slot is populated, also when the content is added after the first render, so an empty overlay never affects layout.\n\n```html\n<mds-video-wall src=\"/assets/video/ambient.mp4\" noise=\"soft\">\n  <div slot=\"content\" class=\"text-on-inverse text-center\">\n    <mds-text typography=\"h1\">Benvenuto in Magma</mds-text>\n    <mds-button label=\"Scopri di piu\" variant=\"primary\" tone=\"strong\"></mds-button>\n  </div>\n</mds-video-wall>\n```\n\n#### Browser Fallback via the Default Slot\n\nThe default (unnamed) slot is projected inside the native `<video>` element. Use it for the message displayed when the browser does not support video playback.\n\n```html\n<mds-video-wall src=\"/assets/video/ambient.mp4\">\n  Il tuo browser non supporta la riproduzione video. Aggiorna il browser per continuare.\n</mds-video-wall>\n```\n\n#### Disabling Autoplay with Controlled Preload\n\nWhen the video should not play automatically - for example on a media showcase page - set `autoplay` and `loop` to `false` via a framework binding or a JS property assignment, and use `preload` to control how eagerly the file is fetched. Note: `preload` is ignored by the browser while `autoplay` is active.\n\n```html\n<!--\n  autoplay and loop default to true: turn them off with a framework\n  property binding or the JS properties below.\n  Do NOT write autoplay=\"false\" in plain HTML - see mistakes.md.\n-->\n<mds-video-wall\n  src=\"/assets/video/showcase.mp4\"\n  poster=\"/assets/video/showcase-preview.webp\"\n  preload=\"metadata\"\n></mds-video-wall>\n```\n\n```javascript\n// Disable autoplay and loop via JS property when not using a framework\nconst wall = document.querySelector('mds-video-wall');\nwall.autoplay = false;\nwall.loop = false;\n```\n\n#### CSS Customization via Documented Properties\n\nSet the video fit through the public `--mds-video-wall-video-fit` CSS custom property, on the host element or a parent selector. The noise overlay has no public CSS custom property: pick its texture with the `noise` prop (`classic`, `sharp`, `soft`, `tv`) or turn it off with `noise=\"none\"`.\n\n```css\n/* Contained fit for a non-16:9 source */\n.hero-section mds-video-wall {\n  --mds-video-wall-video-fit: contain;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-video-wall>`. 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 `autoplay=\"false\"` or `loop=\"false\"` to Disable Boolean Props\n\nThese props default to `true`, so removing the attribute keeps them on, and a boolean attribute is never written as the string `\"false\"`: the attribute stays on the element, where attribute selectors and presence checks still read it as set. Set the JS property to `false`, or use a framework property binding, to turn these off.\n\n```html\n<!-- INCORRECT -->\n<mds-video-wall src=\"/assets/video/ambient.mp4\" autoplay=\"false\" loop=\"false\"></mds-video-wall>\n\n<!-- CORRECT (via JS property) -->\n<mds-video-wall src=\"/assets/video/ambient.mp4\"></mds-video-wall>\n<script>\n  const wall = document.querySelector('mds-video-wall');\n  wall.autoplay = false;\n  wall.loop = false;\n</script>\n```\n\n#### Do Not Put Meaningful Content in the Default Slot\n\nThe default slot is projected inside the native `<video>` element and is shown only by browsers that cannot play video. Captions, headlines, CTAs, and any real UI must go in the `content` slot instead.\n\n```html\n<!-- INCORRECT -->\n<mds-video-wall src=\"/assets/video/ambient.mp4\">\n  <mds-text typography=\"h1\">Benvenuto</mds-text>\n</mds-video-wall>\n\n<!-- CORRECT -->\n<mds-video-wall src=\"/assets/video/ambient.mp4\">\n  Il tuo browser non supporta la riproduzione video.\n  <div slot=\"content\">\n    <mds-text typography=\"h1\">Benvenuto</mds-text>\n  </div>\n</mds-video-wall>\n```\n\n#### Do Not Wrap `<mds-video-wall>` in a Raw `<video>` Element\n\n`<mds-video-wall>` already wraps a `<video>` internally. Nesting it inside another `<video>` is invalid HTML, produces no visible output, and makes the fallback slot unreachable.\n\n```html\n<!-- INCORRECT -->\n<video src=\"/assets/video/ambient.mp4\" autoplay muted loop>\n  <mds-video-wall src=\"/assets/video/ambient.mp4\"></mds-video-wall>\n</video>\n\n<!-- CORRECT -->\n<mds-video-wall src=\"/assets/video/ambient.mp4\"></mds-video-wall>\n```\n\n#### Do Not Override Shadow DOM Internals Directly\n\nThe noise overlay is inside the Shadow DOM and has no public CSS custom property. Choose its texture with the `noise` prop (or remove it with `noise=\"none\"`); do not pierce the shadow with `>>>` or undocumented selectors.\n\n```css\n/* INCORRECT */\nmds-video-wall >>> .noise {\n  background-color: rgb(var(--magma-danger-emphasis-hover) / 0.5);\n}\n```\n\n```html\n<!-- CORRECT -->\n<mds-video-wall src=\"/assets/video/ambient.mp4\" noise=\"soft\"></mds-video-wall>\n```\n\n#### Do Not Rely on `preload` While `autoplay` Is Active\n\nThe browser ignores the `preload` hint entirely when `autoplay` is set (which is the default). Only set `preload` after disabling `autoplay` via a JS property or framework binding.\n\n```html\n<!-- INCORRECT (preload is silently ignored because autoplay is true by default) -->\n<mds-video-wall\n  src=\"/assets/video/ambient.mp4\"\n  preload=\"metadata\"\n></mds-video-wall>\n\n<!-- CORRECT: disable autoplay first, then preload is honoured by the browser -->\n<mds-video-wall\n  src=\"/assets/video/showcase.mp4\"\n  poster=\"/assets/video/showcase-preview.webp\"\n  preload=\"metadata\"\n>\n  <!-- set wall.autoplay = false via JS or framework binding -->\n</mds-video-wall>\n```\n"
      },
      "props": [
        {
          "name": "autoplay",
          "type": "boolean",
          "complexType": {
            "original": "true",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "autoplay",
          "reflectToAttr": false,
          "docs": "Specifies that the video will start playing as soon as it is ready",
          "docsTags": [
            {
              "name": "default",
              "text": "true"
            }
          ],
          "default": "true",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "loop",
          "type": "boolean",
          "complexType": {
            "original": "true",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "loop",
          "reflectToAttr": false,
          "docs": "Specifies that the video will start over again, every time it is finished",
          "docsTags": [
            {
              "name": "default",
              "text": "true"
            }
          ],
          "default": "true",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "muted",
          "type": "boolean",
          "complexType": {
            "original": "true",
            "resolved": "boolean",
            "references": {}
          },
          "mutable": false,
          "attr": "muted",
          "reflectToAttr": false,
          "docs": "Specifies that the audio output of the video should be muted",
          "docsTags": [
            {
              "name": "default",
              "text": "true"
            }
          ],
          "default": "true",
          "values": [
            {
              "type": "boolean"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "noise",
          "type": "\"classic\" | \"none\" | \"sharp\" | \"soft\" | \"tv\" | undefined",
          "complexType": {
            "original": "NoiseType",
            "resolved": "\"classic\" | \"none\" | \"sharp\" | \"soft\" | \"tv\" | undefined",
            "references": {
              "NoiseType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-video-wall/meta/types.ts::NoiseType",
                "referenceLocation": "NoiseType"
              }
            }
          },
          "mutable": false,
          "attr": "noise",
          "reflectToAttr": false,
          "docs": "Specifies if the video has a noise overlay effect",
          "docsTags": [
            {
              "name": "default",
              "text": "'none'"
            }
          ],
          "default": "'none'",
          "values": [
            {
              "value": "classic",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "value": "sharp",
              "type": "string"
            },
            {
              "value": "soft",
              "type": "string"
            },
            {
              "value": "tv",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "poster",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "poster",
          "reflectToAttr": false,
          "docs": "Specifies an image to be shown while the video is downloading",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "preload",
          "type": "\"auto\" | \"metadata\" | \"none\" | undefined",
          "complexType": {
            "original": "PreloadType",
            "resolved": "\"auto\" | \"metadata\" | \"none\" | undefined",
            "references": {
              "PreloadType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-video-wall/meta/types.ts::PreloadType",
                "referenceLocation": "PreloadType"
              }
            }
          },
          "mutable": false,
          "attr": "preload",
          "reflectToAttr": false,
          "docs": "Specifies if and how the author thinks the video should be loaded when the page loads. Note: The preload attribute is ignored if autoplay is present",
          "docsTags": [
            {
              "name": "default",
              "text": "'auto'"
            }
          ],
          "default": "'auto'",
          "values": [
            {
              "value": "auto",
              "type": "string"
            },
            {
              "value": "metadata",
              "type": "string"
            },
            {
              "value": "none",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "src",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "src",
          "reflectToAttr": false,
          "docs": "Specifies the URL of the video file",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-video-wall-noise-background-color",
          "annotation": "prop",
          "docs": "The background color applied to the noise layer of the video wall.",
          "visibility": "internal"
        },
        {
          "name": "--mds-video-wall-noise-background-size",
          "annotation": "prop",
          "docs": "The background-size used for the noise texture.",
          "visibility": "internal"
        },
        {
          "name": "--mds-video-wall-noise-filter",
          "annotation": "prop",
          "docs": "The CSS filter applied to the noise layer (e.g., blur, brightness).",
          "visibility": "internal"
        },
        {
          "name": "--mds-video-wall-video-fit",
          "annotation": "prop",
          "docs": "Defines how the video content should scale to fit its container (e.g., cover, contain).",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Write browser support missing message here."
        },
        {
          "name": "content",
          "docs": "Add video content overlay here, add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-video-wall--docs"
    },
    {
      "filePath": "src/components/mds-zero/mds-zero.tsx",
      "encapsulation": "shadow",
      "tag": "mds-zero",
      "readme": "# mds-zero\n\n\n\nThis 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.\n",
      "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 `HTML elements` or `components` to this slot, it is **recommended** to use `mds-img` or `img` element."
        },
        {
          "name": "slot",
          "text": "content - Put text elements here,"
        },
        {
          "name": "slot",
          "text": "action - Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "part",
          "text": "contents - Selects the wrapper of the elements with attribute `slot=\"content\"`."
        },
        {
          "name": "part",
          "text": "actions - Selects the wrapper of the elements with attribute `slot=\"action\"`."
        },
        {
          "name": "category",
          "text": "feedback"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-zero>` web component is the empty-state (zero-data) panel of the Magma Design System: a centered, vertically stacked layout that pairs an illustration, explanatory copy, and a call-to-action to guide users when a list, search, or section has no content to show. It is a pure structural container with no props - composition happens entirely through its slots.\n\n#### Semantic Behavior\n\n- **Three-zone layout**: The host stacks its content vertically and centered - the default slot (the visual) on top, the `content` zone in the middle, and the `action` zone in a footer at the bottom - with `--magma-rhythm-content-actions` (600) between the zones.\n- **One inset, shared by the zones**: The host pads its zones once, with `--magma-rhythm-inset` (600) on every side, the inset of a container of a part (`rhythm/inset`, `rhythm/shared-inset` in the design language). With no action the footer takes no room, so the inset stays the same at the bottom.\n- **Default slot is the visual**: The unnamed default slot holds the illustration or image; it is meant for an `mds-img`/`img`, not text.\n- **Content zone is centered text**: The `content` slot is centered, constrained by a max-width, and sets its children `--magma-rhythm-title-content` (300) apart, so a title and its description read as one message with no wrapper of yours (`rhythm/title-content`).\n- **Action zone auto-centers children**: Elements placed in `slot=\"action\"` are horizontally centered within the footer, `--magma-rhythm-inline` (300) apart, so a single primary button sits centered by default.\n- **A muted surface**: The host paints `--magma-surface-muted`, a step under the page in light and in dark, on the plane where the items would stand; it needs no dark correction, and it picks up the contrast (a ring) and reduced-motion preferences.\n\n#### Properties & Visual Configurations\n\n`<mds-zero>` exposes no props; all configuration is done through slot composition and one CSS custom property.\n\n- **`content` vs. `action` slots**: Put the message in `slot=\"content\"`: a title by its role, `mds-text typography=\"part\"` with the `tag` of its place in the outline (`h2` under the title of the page, `h3` in a section, `h1` with `typography=\"page\"` when the panel takes the place of the page), then the description in `typography=\"detail\"`. Put the recovery action (typically a single `mds-button`) in `slot=\"action\"`. Use the default slot only for the illustration.\n- **`--mds-zero-contents-max-width`**: Caps the width of the centered text block (default `400px`) so long descriptions wrap into a balanced column rather than spanning the full panel.\n\nThe `contents` and `actions` shadow parts expose the two wrapper zones for consumers that need to override their layout from outside the shadow boundary.\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-zero>` 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). Which panel an empty part takes, and what it says, is the pattern `empty-state`.\n\nThe title of the panel is written by its role, `typography=\"part\"` (`titles/part` of the design language), with the `tag` of its place in the outline: `h2` under the title of the page, `h3` inside a section. Put the title and the description straight in `slot=\"content\"`: the panel sets them apart itself.\n\n#### Full Empty-State Panel\n\nThe canonical form, the first use: an illustration in the default slot, a title and a description in `slot=\"content\"`, and the action that adds the first item in `slot=\"action\"`.\n\n```html\n<mds-zero>\n  <mds-img src=\"./assets/illustrations/empty-list.svg\" alt=\"\"></mds-img>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessuna delega</mds-text>\n  <mds-text typography=\"detail\" tag=\"p\" slot=\"content\">\n    Con una delega un familiare o un professionista presenta le richieste a tuo nome.\n    Aggiungi la prima per iniziare.\n  </mds-text>\n  <mds-button\n    slot=\"action\"\n    label=\"Nuova delega\"\n    variant=\"primary\"\n    tone=\"strong\"\n    size=\"lg\"\n  ></mds-button>\n</mds-zero>\n```\n\n#### Filled by Others (No Action)\n\nWhen the person has nothing to do here, omit `slot=\"action\"` entirely and say who fills the part, and when. The action zone takes no room, so the inset stays the same on every side.\n\n```html\n<mds-zero>\n  <mds-img src=\"./assets/illustrations/empty-folder.svg\" alt=\"\"></mds-img>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessun documento</mds-text>\n  <mds-text typography=\"detail\" tag=\"p\" slot=\"content\">\n    L'ufficio anagrafe aggiunge qui i documenti della pratica quando la prende in carico.\n  </mds-text>\n</mds-zero>\n```\n\n#### Message Without Illustration\n\nWhen no illustration asset is available, omit the default slot. The component stacks the content and action zones directly.\n\n```html\n<mds-zero>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessun file</mds-text>\n  <mds-text typography=\"detail\" tag=\"p\" slot=\"content\">\n    Carica i tuoi file per iniziare a condividerli con il team.\n  </mds-text>\n  <mds-button\n    slot=\"action\"\n    label=\"Carica file\"\n    icon=\"mi/baseline/upload\"\n    variant=\"primary\"\n    tone=\"strong\"\n  ></mds-button>\n</mds-zero>\n```\n\n#### Multiple Actions\n\nWhen two peer actions are offered - for example a primary and a secondary CTA - place both `<mds-button>` elements in `slot=\"action\"`. The action zone centers them and sets them `--magma-rhythm-inline` apart.\n\n```html\n<mds-zero>\n  <mds-img src=\"./assets/illustrations/empty-inbox.svg\" alt=\"\"></mds-img>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessun messaggio</mds-text>\n  <mds-text typography=\"detail\" tag=\"p\" slot=\"content\">\n    Inizia una nuova conversazione o invita i tuoi colleghi.\n  </mds-text>\n  <mds-button\n    slot=\"action\"\n    label=\"Nuovo messaggio\"\n    variant=\"primary\"\n    tone=\"strong\"\n  ></mds-button>\n  <mds-button\n    slot=\"action\"\n    label=\"Invita colleghi\"\n    variant=\"primary\"\n    tone=\"outline\"\n  ></mds-button>\n</mds-zero>\n```\n\n#### In Place of a Missing Page\n\nWhen the panel takes the place of the whole page (the thing asked for does not exist), its title is the title of the page: `typography=\"page\"` with `tag=\"h1\"`, and its action leads back to the list.\n\n```html\n<main class=\"page-frame py-between-sections\">\n  <mds-zero>\n    <mds-text typography=\"page\" tag=\"h1\" slot=\"content\">Richiesta non trovata</mds-text>\n    <mds-text typography=\"detail\" tag=\"p\" slot=\"content\">\n      La richiesta 2026/0412 non esiste: cercala nell'elenco delle richieste.\n    </mds-text>\n    <mds-button slot=\"action\" label=\"Vai alle richieste\" href=\"/richieste\"></mds-button>\n  </mds-zero>\n</main>\n```\n\n#### Constraining the Text Block Width\n\nUse `--mds-zero-contents-max-width` when the panel is wide and the default `400px` cap produces too narrow a text column, or when you want a tighter column on a compact layout.\n\n```css\n.wide-dashboard mds-zero {\n  --mds-zero-contents-max-width: 560px;\n}\n\n.compact-sidebar mds-zero {\n  --mds-zero-contents-max-width: 280px;\n}\n```\n\n#### Overriding Zone Layout via Shadow Parts\n\nUse `::part(contents)` or `::part(actions)` only when you need to change the zone's layout itself - for example aligning the content left inside a side-panel context. Prefer `--mds-zero-contents-max-width` for width adjustments.\n\n```css\n/* Left-align content for a narrow side panel */\n.side-panel mds-zero::part(contents) {\n  align-items: flex-start;\n  text-align: left;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-zero>`. 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 Put Text in the Default Slot\n\nThe default slot is reserved for the illustration or image. Text placed there is not constrained by the `contents` max-width, is not centered consistently, and falls outside the structured three-zone layout. Put headings and descriptions in `slot=\"content\"`.\n\n```html\n<!-- INCORRECT -->\n<mds-zero>\n  <mds-text typography=\"part\" tag=\"h2\">Nessun elemento</mds-text>\n  <mds-text typography=\"detail\">Crea il primo elemento per iniziare.</mds-text>\n</mds-zero>\n\n<!-- CORRECT -->\n<mds-zero>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessun elemento</mds-text>\n  <mds-text typography=\"detail\" slot=\"content\">Crea il primo elemento per iniziare.</mds-text>\n</mds-zero>\n```\n\n#### Do Not Title the Panel by Level\n\nA level picked by its size (`h5`, `h6`) says nothing of what the title names, and its tag follows the style instead of the outline of the page. The title of the panel is a part (`titles/part` of the design language): `typography=\"part\"`, with the `tag` of its place, `h2` under the title of the page, `h3` in a section.\n\n```html\n<!-- INCORRECT -->\n<mds-zero>\n  <mds-text typography=\"h5\" slot=\"content\">Nessuna richiesta da gestire</mds-text>\n  <mds-text typography=\"detail\" slot=\"content\">Le nuove arrivano qui appena un cittadino le invia.</mds-text>\n</mds-zero>\n\n<!-- CORRECT -->\n<mds-zero>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessuna richiesta da gestire</mds-text>\n  <mds-text typography=\"detail\" tag=\"p\" slot=\"content\">Le nuove arrivano qui appena un cittadino le invia.</mds-text>\n</mds-zero>\n```\n\n#### Do Not Wrap the Content to Space It\n\nThe content zone already sets its children `--magma-rhythm-title-content` apart. A wrapper with its own gap adds nothing but a second place where the space is decided; put the title and the description straight in `slot=\"content\"`.\n\n```html\n<!-- INCORRECT -->\n<mds-zero>\n  <div slot=\"content\" class=\"grid gap-title-content\">\n    <mds-text typography=\"part\" tag=\"h2\">Nessuna delega</mds-text>\n    <mds-text typography=\"detail\" tag=\"p\">Aggiungi la prima per iniziare.</mds-text>\n  </div>\n</mds-zero>\n\n<!-- CORRECT -->\n<mds-zero>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessuna delega</mds-text>\n  <mds-text typography=\"detail\" tag=\"p\" slot=\"content\">Aggiungi la prima per iniziare.</mds-text>\n</mds-zero>\n```\n\n#### Do Not Put the Illustration in `slot=\"content\"`\n\nPlacing an image or `<mds-img>` inside `slot=\"content\"` wraps it in the max-width-constrained, centered-text zone. The default slot renders above that zone with full layout freedom and is the correct home for illustrations.\n\n```html\n<!-- INCORRECT -->\n<mds-zero>\n  <mds-img src=\"./assets/illustrations/empty.svg\" alt=\"\" slot=\"content\"></mds-img>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessun documento</mds-text>\n</mds-zero>\n\n<!-- CORRECT -->\n<mds-zero>\n  <mds-img src=\"./assets/illustrations/empty.svg\" alt=\"\"></mds-img>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessun documento</mds-text>\n</mds-zero>\n```\n\n#### Do Not Put the CTA in `slot=\"content\"`\n\nA button placed in `slot=\"content\"` ends up inside the centered-text block rather than the footer zone; it loses the auto-centering and the correct spacing the `actions` zone provides. Use `slot=\"action\"` for any interactive control.\n\n```html\n<!-- INCORRECT -->\n<mds-zero>\n  <mds-img src=\"./assets/illustrations/empty.svg\" alt=\"\"></mds-img>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessun progetto</mds-text>\n  <mds-button label=\"Nuovo progetto\" variant=\"primary\" slot=\"content\"></mds-button>\n</mds-zero>\n\n<!-- CORRECT -->\n<mds-zero>\n  <mds-img src=\"./assets/illustrations/empty.svg\" alt=\"\"></mds-img>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessun progetto</mds-text>\n  <mds-button label=\"Nuovo progetto\" variant=\"primary\" slot=\"action\"></mds-button>\n</mds-zero>\n```\n\n#### Do Not Use a Raw `<button>` or `<a>` in the Action Slot\n\nThe action slot is designed for `<mds-button>`. A raw `<button>` or `<a>` will not inherit Magma theming, focus styles, or size tokens. Use `<mds-button>` with `href` if link behavior is needed.\n\n```html\n<!-- INCORRECT -->\n<mds-zero>\n  <mds-img src=\"./assets/illustrations/empty.svg\" alt=\"\"></mds-img>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessun report</mds-text>\n  <button slot=\"action\" class=\"btn-primary\">Crea report</button>\n</mds-zero>\n\n<!-- CORRECT -->\n<mds-zero>\n  <mds-img src=\"./assets/illustrations/empty.svg\" alt=\"\"></mds-img>\n  <mds-text typography=\"part\" tag=\"h2\" slot=\"content\">Nessun report</mds-text>\n  <mds-button slot=\"action\" label=\"Crea report\" variant=\"primary\" tone=\"strong\"></mds-button>\n</mds-zero>\n```\n\n#### Do Not Pierce Shadow DOM to Style Internal Zones\n\n`::part(contents)` and `::part(actions)` are the documented customization surface for the wrapper zones. Do not target internal class names (`.contents`, `.actions`) via `>>>` or `/deep/` - those are implementation details that can change without notice.\n\n```css\n/* INCORRECT */\nmds-zero >>> .contents {\n  max-width: 600px;\n}\n\n/* CORRECT */\nmds-zero {\n  --mds-zero-contents-max-width: 600px;\n}\n/* or, for layout overrides: */\nmds-zero::part(contents) {\n  align-items: flex-start;\n}\n```\n"
      },
      "props": [],
      "methods": [],
      "events": [],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-zero-contents-max-width",
          "annotation": "prop",
          "docs": "Set if the contents has a max width to be centered in the component",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Add `HTML elements` or `components` to this slot, it is **recommended** to use `mds-img` or `img` element."
        },
        {
          "name": "action",
          "docs": "Add `HTML elements` or `components`, it is **recommended** to use `mds-button` element."
        },
        {
          "name": "content",
          "docs": "Put text elements here,"
        }
      ],
      "parts": [
        {
          "name": "actions",
          "docs": "Selects the wrapper of the elements with attribute `slot=\"action\"`."
        },
        {
          "name": "contents",
          "docs": "Selects the wrapper of the elements with attribute `slot=\"content\"`."
        }
      ],
      "states": [],
      "dependents": [],
      "dependencies": [],
      "dependencyGraph": {},
      "storybook": "ui-zero--docs"
    }
  ],
  "typeLibrary": {
    "src/type/input.ts::InputSizeType": {
      "declaration": "\"sm\" | \"md\" | \"lg\"",
      "docstring": "",
      "path": "src/type/input.ts"
    },
    "src/components/mds-input-date-range/mds-input-date-range.tsx::EventDate": {
      "declaration": "export interface EventDate {\n  caller: HTMLMdsInputDateRangePreselectionElement;\n  start: string;\n  end?: string;\n}",
      "docstring": "",
      "path": "src/components/mds-input-date-range/mds-input-date-range.tsx"
    },
    "src/components/mds-label/mds-label.tsx::MdsLabelVariantType": {
      "declaration": "export type MdsLabelVariantType = ThemeLabelVariantType | ThemeStatusVariantType;",
      "docstring": "",
      "path": "src/components/mds-label/mds-label.tsx"
    },
    "src/type/tone.ts::ToneMinimalVariantType": {
      "declaration": "\"strong\" | \"weak\"",
      "docstring": "",
      "path": "src/type/tone.ts"
    },
    "src/type/text.ts::TypographyTruncateType": {
      "declaration": "\"all\" | \"none\" | \"word\"",
      "docstring": "",
      "path": "src/type/text.ts"
    },
    "src/type/typography.ts::TypographyTooltipType": {
      "declaration": "\"caption\" | \"detail\" | \"tip\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/components/mds-accordion/meta/event-detail.ts::MdsAccordionEventDetail": {
      "declaration": "export interface MdsAccordionEventDetail {\n  children: NodeListOf<HTMLMdsAccordionItemElement>;\n  selected: string;\n}",
      "docstring": "",
      "path": "src/components/mds-accordion/meta/event-detail.ts"
    },
    "src/type/typography.ts::TypographyTitleType": {
      "declaration": "\"action\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/type/text.ts::TypographyHeadingTagType": {
      "declaration": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\"",
      "docstring": "",
      "path": "src/type/text.ts"
    },
    "src/components/mds-accordion-item/meta/event-detail.ts::MdsAccordionItemEventDetail": {
      "declaration": "export interface MdsAccordionItemEventDetail {\n  id: string;\n  selected: boolean;\n}",
      "docstring": "",
      "path": "src/components/mds-accordion-item/meta/event-detail.ts"
    },
    "src/components/mds-accordion-timer/meta/event-detail.ts::MdsAccordionTimerEventDetail": {
      "declaration": "export interface MdsAccordionTimerEventDetail {\n  index: number;\n}",
      "docstring": "",
      "path": "src/components/mds-accordion-timer/meta/event-detail.ts"
    },
    "src/components/mds-accordion-timer-item/meta/event-detail.ts::MdsAccordionTimerItemEventDetail": {
      "declaration": "export interface MdsAccordionTimerItemEventDetail {\n  selected: boolean;\n  uuid: number;\n}",
      "docstring": "",
      "path": "src/components/mds-accordion-timer-item/meta/event-detail.ts"
    },
    "src/type/variant.ts::ThemeFullVariantAvatarType": {
      "declaration": "\"info\" | \"error\" | \"success\" | \"warning\" | \"amaranth\" | \"red\" | \"aqua\" | \"blue\" | \"green\" | \"lime\" | \"orange\" | \"orchid\" | \"purple\" | \"sky\" | \"violet\" | \"yellow\" | \"primary\"",
      "docstring": "",
      "path": "src/type/variant.ts"
    },
    "src/components/mds-avatar-stack/meta/types.ts::AvatarSizeType": {
      "declaration": "export type AvatarSizeType = 'sm' | 'md' | 'lg';",
      "docstring": "",
      "path": "src/components/mds-avatar-stack/meta/types.ts"
    },
    "src/type/variant.ts::ThemeFullVariantType": {
      "declaration": "\"info\" | \"error\" | \"success\" | \"warning\" | \"amaranth\" | \"red\" | \"aqua\" | \"blue\" | \"green\" | \"lime\" | \"orange\" | \"orchid\" | \"purple\" | \"sky\" | \"violet\" | \"yellow\" | \"dark\" | \"light\"",
      "docstring": "",
      "path": "src/type/variant.ts"
    },
    "src/type/tone.ts::ToneSmartVariantType": {
      "declaration": "\"strong\" | \"weak\" | \"outline\"",
      "docstring": "",
      "path": "src/type/tone.ts"
    },
    "src/type/typography.ts::TypographyLabelType": {
      "declaration": "\"label\" | \"option\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/type/variant.ts::ThemeVariantType": {
      "declaration": "\"info\" | \"error\" | \"success\" | \"warning\" | \"dark\" | \"light\" | \"ai\" | \"primary\"",
      "docstring": "",
      "path": "src/type/variant.ts"
    },
    "src/type/tone.ts::ToneMinimalBoxVariantType": {
      "declaration": "\"strong\" | \"weak\" | \"box\"",
      "docstring": "",
      "path": "src/type/tone.ts"
    },
    "src/components/mds-banner/meta/types.ts::BannerTypographyType": {
      "declaration": "\"h5\" | \"h6\"",
      "docstring": "",
      "path": "src/components/mds-banner/meta/types.ts"
    },
    "src/components/mds-benchmark-bar/meta/types.ts::BenchmarkBarTypographyType": {
      "declaration": "export type BenchmarkBarTypographyType = 'option' | 'label';",
      "docstring": "",
      "path": "src/components/mds-benchmark-bar/meta/types.ts"
    },
    "src/type/progress.ts::ProgressBarSizeType": {
      "declaration": "\"sm\" | \"md\" | \"lg\" | \"xl\"",
      "docstring": "",
      "path": "src/type/progress.ts"
    },
    "src/components/mds-bibliography/meta/types.ts::BibliographyFormatType": {
      "declaration": "export type BibliographyFormatType =\n  | 'apa' // American Psychological Association - Simmons, B. (2015, January 9). The tale of two Flaccos. Grantland. http://grantland.com/the-triangle/the-tale-of-two-flaccos/\n  | 'mla' // Modern Language Association - Author's Last name, First name. \"Title of Source.\" Title of Container, Other contributors, Version, Numbers, Publisher, Publication Date, Location.\n  | 'turabian';",
      "docstring": "",
      "path": "src/components/mds-bibliography/meta/types.ts"
    },
    "src/components/mds-bibliography/meta/types.ts::BibliographyRelationshipType": {
      "declaration": "export type BibliographyRelationshipType = 'author' | 'external';",
      "docstring": "",
      "path": "src/components/mds-bibliography/meta/types.ts"
    },
    "src/type/typography.ts::TypographyInfoType": {
      "declaration": "\"caption\" | \"detail\" | \"label\" | \"option\" | \"paragraph\" | \"tip\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/type/typography.ts::TypographyReadType": {
      "declaration": "\"caption\" | \"detail\" | \"paragraph\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/type/typography.ts::TypographyVariants": {
      "declaration": "\"title\" | \"info\" | \"read\" | \"code\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/components/mds-book/meta/types.ts::BookBindingType": {
      "declaration": "export type BookBindingType = 'paperback' | 'hardcover' | 'none';",
      "docstring": "",
      "path": "src/components/mds-book/meta/types.ts"
    },
    "src/components/mds-book/meta/types.ts::BookFormatType": {
      "declaration": "export type BookFormatType = 'auto' | 'a4' | 'a5' | 'b5' | `${number}x${number}`;",
      "docstring": "",
      "path": "src/components/mds-book/meta/types.ts"
    },
    "src/type/loading.ts::LoadingType": {
      "declaration": "\"eager\" | \"lazy\"",
      "docstring": "",
      "path": "src/type/loading.ts"
    },
    "src/components/mds-book/meta/types.ts::BookPoseType": {
      "declaration": "export type BookPoseType = 'spine' | 'fore-edge' | 'front' | 'lying' | 'lying-turned';",
      "docstring": "",
      "path": "src/components/mds-book/meta/types.ts"
    },
    "src/components/mds-breadcrumb/meta/event-detail.ts::MdsBreadcrumbEventDetail": {
      "declaration": "export interface MdsBreadcrumbEventDetail {\n  caller: HTMLMdsBreadcrumbItemElement;\n  id: string;\n  selected?: boolean;\n}",
      "docstring": "",
      "path": "src/components/mds-breadcrumb/meta/event-detail.ts"
    },
    "src/components/mds-breadcrumb-item/meta/event-detail.ts::MdsBreadcrumbItemEventDetail": {
      "declaration": "export interface MdsBreadcrumbItemEventDetail {\n  id: string;\n  selected: boolean;\n}",
      "docstring": "",
      "path": "src/components/mds-breadcrumb-item/meta/event-detail.ts"
    },
    "src/components/mds-text/meta/types.ts::TextAnimationType": {
      "declaration": "export type TextAnimationType = 'none' | 'yugop';",
      "docstring": "",
      "path": "src/components/mds-text/meta/types.ts"
    },
    "src/type/button.ts::ButtonIconPositionType": {
      "declaration": "\"left\" | \"right\"",
      "docstring": "",
      "path": "src/type/button.ts"
    },
    "src/type/button.ts::ButtonType": {
      "declaration": "export type ButtonType = (typeof buttonTypeDictionary)[number] | 'a';",
      "docstring": "",
      "path": "src/type/button.ts"
    },
    "src/type/button.ts::ButtonVariantType": {
      "declaration": "export type ButtonVariantType =\n  'apple' | 'google' | ThemeLuminanceVariantType | ThemeBrandVariantType | ThemeStatusVariantType;",
      "docstring": "",
      "path": "src/type/button.ts"
    },
    "src/type/tone.ts::ToneBoxVariantType": {
      "declaration": "\"strong\" | \"weak\" | \"box\" | \"outline\" | \"text\"",
      "docstring": "",
      "path": "src/type/tone.ts"
    },
    "src/type/button.ts::ButtonSizeType": {
      "declaration": "\"sm\" | \"md\" | \"lg\" | \"xl\"",
      "docstring": "",
      "path": "src/type/button.ts"
    },
    "src/type/button.ts::ButtonTargetType": {
      "declaration": "\"blank\" | \"self\"",
      "docstring": "",
      "path": "src/type/button.ts"
    },
    "src/type/button.ts::ButtonCurrentType": {
      "declaration": "export type ButtonCurrentType = boolean | (typeof buttonCurrentDictionary)[number];",
      "docstring": "",
      "path": "src/type/button.ts"
    },
    "src/type/button.ts::ButtonDropdownVariantType": {
      "declaration": "export type ButtonDropdownVariantType =\n  ThemeLuminanceVariantType | ThemeBrandVariantType | ThemeStatusVariantType;",
      "docstring": "",
      "path": "src/type/button.ts"
    },
    "src/components/mds-calendar/meta/types.ts::CalendarRangeEndType": {
      "declaration": "export type CalendarRangeEndType = 'start' | 'end';",
      "docstring": "",
      "path": "src/components/mds-calendar/meta/types.ts"
    },
    "src/components/mds-calendar-cell/meta/types.ts::CalendarCellType": {
      "declaration": "export type CalendarCellType = 'other' | 'current' | 'weekend';",
      "docstring": "",
      "path": "src/components/mds-calendar-cell/meta/types.ts"
    },
    "src/components/mds-calendar-cell/meta/types.ts::CalendarCellSelectionOrieintationType": {
      "declaration": "export type CalendarCellSelectionOrieintationType = 'both' | 'horizontal' | 'vertical';",
      "docstring": "",
      "path": "src/components/mds-calendar-cell/meta/types.ts"
    },
    "src/components/mds-calendar-cell/meta/types.ts::CalendarCellSelectionPositionType": {
      "declaration": "export type CalendarCellSelectionPositionType = 'end' | 'middle' | 'none' | 'start' | 'single';",
      "docstring": "",
      "path": "src/components/mds-calendar-cell/meta/types.ts"
    },
    "src/type/variant.ts::ChipVariantType": {
      "declaration": "\"info\" | \"error\" | \"success\" | \"warning\" | \"amaranth\" | \"red\" | \"aqua\" | \"blue\" | \"green\" | \"lime\" | \"orange\" | \"orchid\" | \"purple\" | \"sky\" | \"violet\" | \"yellow\" | \"dark\" | \"ai\" | \"primary\" | \"secondary\"",
      "docstring": "",
      "path": "src/type/variant.ts"
    },
    "src/components/mds-chip/meta/interface.ts::MdsChipEvent": {
      "declaration": "interface MdsChipEvent {\n  event: Event;\n  selected?: boolean;\n  element: HTMLMdsChipElement;\n}",
      "docstring": "",
      "path": "src/components/mds-chip/meta/interface.ts"
    },
    "src/components/mds-dropdown/meta/types.ts::DropdownInteractionType": {
      "declaration": "export type DropdownInteractionType = 'click' | 'none' | 'mouseover';",
      "docstring": "",
      "path": "src/components/mds-dropdown/meta/types.ts"
    },
    "src/type/floating-ui.ts::FloatingUIPlacement": {
      "declaration": "\"left\" | \"right\" | \"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left-end\" | \"left-start\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
      "docstring": "",
      "path": "src/type/floating-ui.ts"
    },
    "src/type/floating-ui.ts::FloatingUIStrategy": {
      "declaration": "\"absolute\" | \"fixed\"",
      "docstring": "",
      "path": "src/type/floating-ui.ts"
    },
    "src/components/mds-dropdown/meta/event-detail.ts::MdsDropdownEventDetail": {
      "declaration": "export interface MdsDropdownEventDetail {\n  caller: HTMLElement;\n  visible: boolean;\n}",
      "docstring": "",
      "path": "src/components/mds-dropdown/meta/event-detail.ts"
    },
    "src/components/mds-emoji/meta/types.ts::EmojiNames": {
      "declaration": "export type EmojiNames = 'mia' | 'simi';",
      "docstring": "",
      "path": "src/components/mds-emoji/meta/types.ts"
    },
    "src/type/file-types.ts::ExtensionSuffixType": {
      "declaration": "\"ai\" | \"7z\" | \"ace\" | \"db\" | \"default\" | \"dmg\" | \"doc\" | \"docm\" | \"docx\" | \"eml\" | \"eps\" | \"exe\" | \"flac\" | \"gif\" | \"heic\" | \"htm\" | \"html\" | \"jpe\" | \"jpeg\" | \"jpg\" | \"js\" | \"json\" | \"jsx\" | \"m2v\" | \"mp2\" | \"mp3\" | \"mp4\" | \"mp4v\" | \"mpeg\" | \"mpg4\" | \"mpg\" | \"mpga\" | \"odf\" | \"odp\" | \"ods\" | \"odt\" | \"ole\" | \"p7m\" | \"pdf\" | \"php\" | \"png\" | \"ppt\" | \"rar\" | \"rtf\" | \"sass\" | \"shtml\" | \"svg\" | \"tar\" | \"tiff\" | \"ts\" | \"tsd\" | \"txt\" | \"wav\" | \"webp\" | \"xar\" | \"xls\" | \"xlsx\" | \"xml\" | \"zip\"",
      "docstring": "",
      "path": "src/type/file-types.ts"
    },
    "src/components/mds-file/meta/event-detail.ts::MdsFileEventDetail": {
      "declaration": "export interface MdsFileEventDetail {\n  description: string;\n  extension: string;\n  filename: string;\n  target: HTMLMdsFileElement;\n  type: string;\n}",
      "docstring": "",
      "path": "src/components/mds-file/meta/event-detail.ts"
    },
    "src/components/mds-file-preview/meta/event-detail.ts::MdsFilePreviewEventDetail": {
      "declaration": "export interface MdsFilePreviewEventDetail {\n  extension: string;\n  filename: string;\n  target: HTMLMdsFilePreviewElement;\n}",
      "docstring": "",
      "path": "src/components/mds-file-preview/meta/event-detail.ts"
    },
    "src/components/mds-filter/meta/event-detail.ts::MdsFilterEventDetail": {
      "declaration": "export interface MdsFilterEventDetail {\n  children: NodeListOf<HTMLMdsFilterItemElement>;\n  value: string;\n}",
      "docstring": "",
      "path": "src/components/mds-filter/meta/event-detail.ts"
    },
    "src/components/mds-filter-item/meta/event-detail.ts::MdsFilterItemEventDetail": {
      "declaration": "export interface MdsFilterItemEventDetail {\n  id: string;\n  selected: boolean;\n}",
      "docstring": "",
      "path": "src/components/mds-filter-item/meta/event-detail.ts"
    },
    "src/type/header-bar.ts::HeaderBarMenuType": {
      "declaration": "\"all\" | \"none\" | \"desktop\" | \"mobile\"",
      "docstring": "",
      "path": "src/type/header-bar.ts"
    },
    "src/type/header-bar.ts::HeaderBarNavType": {
      "declaration": "\"all\" | \"none\" | \"desktop\" | \"mobile\"",
      "docstring": "",
      "path": "src/type/header-bar.ts"
    },
    "src/components/mds-header/meta/event-detail.ts::MdsHeaderEventDetail": {
      "declaration": "export interface MdsHeaderEventDetail {\n  bar: HTMLMdsHeaderBarElement;\n}",
      "docstring": "",
      "path": "src/components/mds-header/meta/event-detail.ts"
    },
    "src/components/mds-header/meta/event-detail.ts::MdsHeaderVisibilityEventDetail": {
      "declaration": "export interface MdsHeaderVisibilityEventDetail {\n  /** The visibility the header has now, the value of its `visibility` prop */\n  visibility: 'hidden' | 'visible';\n}",
      "docstring": "",
      "path": "src/components/mds-header/meta/event-detail.ts"
    },
    "src/components/mds-horizontal-scroll/meta/types.ts::ViewportType": {
      "declaration": "export type ViewportType =\n  | 'all'\n  | 'tv'\n  | 'xlarge'\n  | 'large'\n  | 'wide'\n  | 'desktop'\n  | 'tablet'\n  | 'none';",
      "docstring": "",
      "path": "src/components/mds-horizontal-scroll/meta/types.ts"
    },
    "src/components/mds-horizontal-scroll/meta/types.ts::NavigationType": {
      "declaration": "export type NavigationType = 'none' | 'scrollbar' | 'position';",
      "docstring": "",
      "path": "src/components/mds-horizontal-scroll/meta/types.ts"
    },
    "src/components/mds-horizontal-scroll/meta/types.ts::SnapType": {
      "declaration": "export type SnapType = 'center' | 'end' | 'none' | 'start';",
      "docstring": "",
      "path": "src/components/mds-horizontal-scroll/meta/types.ts"
    },
    "src/components/mds-img/meta/types.ts::CrossoriginType": {
      "declaration": "export type CrossoriginType = 'anonymous' | 'use-credentials';",
      "docstring": "",
      "path": "src/components/mds-img/meta/types.ts"
    },
    "src/components/mds-img/meta/types.ts::DecodingType": {
      "declaration": "\"auto\" | \"async\" | \"sync\"",
      "docstring": "",
      "path": "src/components/mds-img/meta/types.ts"
    },
    "src/components/mds-img/meta/types.ts::ReferrerpolicyType": {
      "declaration": "export type ReferrerpolicyType =\n  | 'no-referrer'\n  | 'no-referrer-when-downgrade'\n  | 'origin'\n  | 'origin-when-cross-origin'\n  | 'unsafe-url';",
      "docstring": "",
      "path": "src/components/mds-img/meta/types.ts"
    },
    "src/components/mds-img/meta/event-detail.ts::MdsImgEventDetail": {
      "declaration": "export interface MdsImgEventDetail {\n  image: HTMLImageElement;\n}",
      "docstring": "",
      "path": "src/components/mds-img/meta/event-detail.ts"
    },
    "src/type/autocomplete.ts::AutocompleteType": {
      "declaration": "\"address\" | \"email\" | \"additional-name\" | \"address-level1\" | \"address-level2\" | \"address-level3\" | \"address-level4\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"cc-additional-name\" | \"cc-csc\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-family-name\" | \"cc-given-name\" | \"cc-name\" | \"cc-number\" | \"cc-type\" | \"country\" | \"country-name\" | \"current-password\" | \"family-name\" | \"given-name\" | \"honorific-prefix\" | \"honorific-suffix\" | \"impp\" | \"language\" | \"name\" | \"new-password\" | \"nickname\" | \"off\" | \"on\" | \"one-time-code\" | \"organization\" | \"organization-title\" | \"photo\" | \"postal-code\" | \"sex\" | \"street-address\" | \"tel\" | \"tel-area-code\" | \"tel-country-code\" | \"tel-extension\" | \"tel-local\" | \"tel-national\" | \"transaction-amount\" | \"transaction-currency\" | \"url\" | \"username\"",
      "docstring": "",
      "path": "src/type/autocomplete.ts"
    },
    "src/type/input.ts::InputControlsLayoutType": {
      "declaration": "\"horizontal\" | \"vertical\"",
      "docstring": "",
      "path": "src/type/input.ts"
    },
    "src/type/input.ts::InputControlsIconType": {
      "declaration": "\"arrow\" | \"arithmetic\"",
      "docstring": "",
      "path": "src/type/input.ts"
    },
    "src/type/variant.ts::ThemeInputVariantType": {
      "declaration": "\"info\" | \"error\" | \"success\" | \"warning\" | \"ai\" | \"primary\"",
      "docstring": "",
      "path": "src/type/variant.ts"
    },
    "src/type/input.ts::InputTextType": {
      "declaration": "\"number\" | \"time\" | \"text\" | \"email\" | \"tel\" | \"url\" | \"date\" | \"password\" | \"search\" | \"textarea\" | \"color\" | \"cc\" | \"cf\" | \"isbn\" | \"piva\"",
      "docstring": "",
      "path": "src/type/input.ts"
    },
    "src/type/typography.ts::TypographyInputType": {
      "declaration": "\"snippet\" | \"detail\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/type/input.ts::MdsInputEventDetail": {
      "declaration": "export interface MdsInputEventDetail {\n  value?: File | string | FormData | null;\n}",
      "docstring": "",
      "path": "src/type/input.ts"
    },
    "src/components/mds-input/meta/validators.ts::MdsValidatorFn": {
      "declaration": "(input: string) => null | MdsValidationErrors",
      "docstring": "",
      "path": "src/components/mds-input/meta/validators.ts"
    },
    "src/components/mds-input/meta/validators.ts::MdsValidationErrors": {
      "declaration": "export interface MdsValidationErrors {\n  [key: string]: string;\n}",
      "docstring": "",
      "path": "src/components/mds-input/meta/validators.ts"
    },
    "src/components.d.ts::MdsValidationErrors": {
      "declaration": "any",
      "docstring": "",
      "path": "src/components.d.ts"
    },
    "src/components/mds-input-range/meta/event-detail.ts::MdsInputRangeValuesEventDetail": {
      "declaration": "export interface MdsInputRangeValuesEventDetail {\n  /**\n   * The values of the `mds-input-range-value` children, one per thumb, in order from the lowest:\n   * the order of their thumbs on the track and of their entries in the form.\n   */\n  values: number[];\n}",
      "docstring": "",
      "path": "src/components/mds-input-range/meta/event-detail.ts"
    },
    "src/type/variant.ts::ThemeStatusVariantType": {
      "declaration": "\"info\" | \"error\" | \"success\" | \"warning\"",
      "docstring": "",
      "path": "src/type/variant.ts"
    },
    "src/components/mds-input-select/meta/event-detail.ts::MdsInputSelectEventDetail": {
      "declaration": "export interface MdsInputSelectEventDetail extends MdsInputEventDetail {\n  /**\n   * The values of the selected options, the placeholder left out: one with a single select, every\n   * selected one with `multiple`, where `value` holds only the first, as `select.value` does.\n   */\n  values: string[];\n}",
      "docstring": "",
      "path": "src/components/mds-input-select/meta/event-detail.ts"
    },
    "src/components/mds-input-switch/meta/types.ts::InputSwitchSizeType": {
      "declaration": "export type InputSwitchSizeType = 'sm' | 'md' | 'lg';",
      "docstring": "",
      "path": "src/components/mds-input-switch/meta/types.ts"
    },
    "src/components/mds-input-switch/meta/types.ts::InputSwitchType": {
      "declaration": "export type InputSwitchType = 'checkbox' | 'radio' | 'switch';",
      "docstring": "",
      "path": "src/components/mds-input-switch/meta/types.ts"
    },
    "src/components/mds-input-switch/meta/event-detail.ts::MdsInputSwitchEventDetail": {
      "declaration": "export interface MdsInputSwitchEventDetail {\n  name: string;\n  checked: boolean;\n  value: string;\n}",
      "docstring": "",
      "path": "src/components/mds-input-switch/meta/event-detail.ts"
    },
    "src/components/mds-input-tip/meta/types.ts::InputTipPositionType": {
      "declaration": "export type InputTipPositionType = 'top' | 'bottom';",
      "docstring": "",
      "path": "src/components/mds-input-tip/meta/types.ts"
    },
    "src/type/input-tip.ts::InputTipItemVariantType": {
      "declaration": "\"text\" | \"required\" | \"disabled\" | \"count-almost\" | \"count-almost-full\" | \"count-empty\" | \"count-full\" | \"count-incomplete\" | \"readonly\" | \"required-success\"",
      "docstring": "",
      "path": "src/type/input-tip.ts"
    },
    "src/components/mds-input-upload/meta/types.ts::AttachmentSort": {
      "declaration": "type AttachmentSort = 'status' | 'date';",
      "docstring": "",
      "path": "src/components/mds-input-upload/meta/types.ts"
    },
    "src/components/mds-input-upload/meta/types.ts::FileError": {
      "declaration": "interface FileError {\n  filename: string;\n  errorMessage: string;\n}",
      "docstring": "",
      "path": "src/components/mds-input-upload/meta/types.ts"
    },
    "src/components/mds-keyboard/meta/type.ts::KeyboardTest": {
      "declaration": "export type KeyboardTest = 'pass' | 'fail';",
      "docstring": "",
      "path": "src/components/mds-keyboard/meta/type.ts"
    },
    "src/type/keyboard.ts::KeyboardKeyName": {
      "declaration": "\"option\" | \"b\" | \"i\" | \"p\" | \"q\" | \"s\" | \"u\" | \"a\" | \"1\" | \"2\" | \"end\" | \"0\" | \"3\" | \"4\" | \"5\" | \"6\" | \"7\" | \"escape\" | \"v\" | \"shift\" | \"g\" | \"8\" | \"9\" | \"alt\" | \"altleft\" | \"altright\" | \"arrowdown\" | \"arrowleft\" | \"arrowright\" | \"arrowup\" | \"backspace\" | \"c\" | \"capslock\" | \"command\" | \"commandleft\" | \"commandright\" | \"control\" | \"controlleft\" | \"controlright\" | \"d\" | \"delete\" | \"e\" | \"enter\" | \"f\" | \"f1\" | \"f10\" | \"f11\" | \"f12\" | \"f2\" | \"f3\" | \"f4\" | \"f5\" | \"f6\" | \"f7\" | \"f8\" | \"f9\" | \"h\" | \"home\" | \"j\" | \"k\" | \"l\" | \"m\" | \"n\" | \"o\" | \"optionleft\" | \"optionright\" | \"pagedown\" | \"pageup\" | \"r\" | \"shiftleft\" | \"shiftright\" | \"space\" | \"t\" | \"tab\" | \"w\" | \"windows\" | \"windowsleft\" | \"windowsright\" | \"x\" | \"y\" | \"z\"",
      "docstring": "",
      "path": "src/type/keyboard.ts"
    },
    "src/components/mds-link/meta/types.ts::LinkVariantType": {
      "declaration": "\"primary\" | \"inherit\"",
      "docstring": "",
      "path": "src/components/mds-link/meta/types.ts"
    },
    "src/components/mds-link/meta/types.ts::LinkUnderlineType": {
      "declaration": "\"marker\" | \"solid\" | \"dotted\"",
      "docstring": "",
      "path": "src/components/mds-link/meta/types.ts"
    },
    "src/type/typography.ts::TypographyReadingVariants": {
      "declaration": "\"info\" | \"read\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/components/mds-mention/meta/type.ts::MentionSize": {
      "declaration": "export type MentionSize = 'sm' | 'md' | 'lg';",
      "docstring": "",
      "path": "src/components/mds-mention/meta/type.ts"
    },
    "src/components/mds-mention/meta/interface.ts::MdsMentionEvent": {
      "declaration": "interface MdsMentionEvent {\n  event: Event;\n  element: HTMLMdsMentionElement;\n}",
      "docstring": "",
      "path": "src/components/mds-mention/meta/interface.ts"
    },
    "src/components/mds-modal/meta/types.ts::ModalPositionType": {
      "declaration": "export type ModalPositionType =\n  | 'bottom'\n  | 'bottom-left'\n  | 'bottom-right'\n  | 'center'\n  | 'left'\n  | 'right'\n  | 'top'\n  | 'top-left'\n  | 'top-right';",
      "docstring": "",
      "path": "src/components/mds-modal/meta/types.ts"
    },
    "src/components/mds-modal/meta/types.ts::ModalAnimationStyleType": {
      "declaration": "export type ModalAnimationStyleType = 'slide' | 'custom' | '3d';",
      "docstring": "",
      "path": "src/components/mds-modal/meta/types.ts"
    },
    "src/components/mds-modal/meta/types.ts::ModalOverflowType": {
      "declaration": "export type ModalOverflowType = 'auto' | 'manual';",
      "docstring": "",
      "path": "src/components/mds-modal/meta/types.ts"
    },
    "src/components/mds-modal/meta/types.ts::ModalInteractionType": {
      "declaration": "export type ModalInteractionType = 'strict' | 'relaxed';",
      "docstring": "",
      "path": "src/components/mds-modal/meta/types.ts"
    },
    "src/type/variant.ts::ThemeLabelVariantType": {
      "declaration": "\"amaranth\" | \"red\" | \"aqua\" | \"blue\" | \"green\" | \"lime\" | \"orange\" | \"orchid\" | \"purple\" | \"sky\" | \"violet\" | \"yellow\"",
      "docstring": "",
      "path": "src/type/variant.ts"
    },
    "src/components/mds-notification/meta/types.ts::StrategyType": {
      "declaration": "export type StrategyType = 'absolute' | 'fixed' | 'disabled';",
      "docstring": "",
      "path": "src/components/mds-notification/meta/types.ts"
    },
    "src/components/mds-paginator/meta/event-detail.ts::MdsPaginatorEventDetail": {
      "declaration": "export interface MdsPaginatorEventDetail {\n  caller?: HTMLMdsPaginatorItemElement;\n  page: number;\n}",
      "docstring": "",
      "path": "src/components/mds-paginator/meta/event-detail.ts"
    },
    "src/components/mds-policy-ai/meta/types.ts::PolicyAiVariant": {
      "declaration": "export type PolicyAiVariant = 'icon' | 'chip' | 'card' | 'banner';",
      "docstring": "",
      "path": "src/components/mds-policy-ai/meta/types.ts"
    },
    "src/type/button.ts::TabSizeType": {
      "declaration": "\"sm\" | \"md\"",
      "docstring": "",
      "path": "src/type/button.ts"
    },
    "src/components/mds-pref-animation/meta/types.ts::AnimationModeType": {
      "declaration": "export type AnimationModeType = 'reduce' | 'no-preference' | 'system';",
      "docstring": "",
      "path": "src/components/mds-pref-animation/meta/types.ts"
    },
    "src/event-detail/preference.ts::MdsPrefChangeEventDetail": {
      "declaration": "export interface MdsPrefChangeEventDetail {\n  preference: UIPreferenceType;\n}",
      "docstring": "",
      "path": "src/event-detail/preference.ts"
    },
    "src/type/preference.ts::ConsumptionModeType": {
      "declaration": "\"low\" | \"medium\" | \"high\"",
      "docstring": "",
      "path": "src/type/preference.ts"
    },
    "src/components/mds-pref-contrast/meta/types.ts::ContrastModeType": {
      "declaration": "export type ContrastModeType = 'more' | 'no-preference' | 'system';",
      "docstring": "",
      "path": "src/components/mds-pref-contrast/meta/types.ts"
    },
    "src/event-detail/language.ts::MdsPrefLanguageEventDetail": {
      "declaration": "export interface MdsPrefLanguageEventDetail {\n  /* A string representing the language version as defined in {@link https://datatracker.ietf.org/doc/html/rfc5646 RFC 5646: Tags for Identifying Languages (also known as BCP 47)}.\n   *\n   * `Examples of valid language codes include \"en\", \"en-US\", \"fr\", \"fr-FR\", \"es-ES\", etc.`\n   */\n  language?: string;\n}",
      "docstring": "",
      "path": "src/event-detail/language.ts"
    },
    "src/type/preference.ts::PreferenceModeType": {
      "declaration": "\"dark\" | \"light\" | \"system\"",
      "docstring": "",
      "path": "src/type/preference.ts"
    },
    "src/type/preference.ts::PreferenceThemeTransitionType": {
      "declaration": "\"none\" | \"flash\" | \"smooth\"",
      "docstring": "",
      "path": "src/type/preference.ts"
    },
    "src/type/preference.ts::PreferenceThemeSchemeType": {
      "declaration": "\"all\" | \"dark\" | \"light\"",
      "docstring": "",
      "path": "src/type/preference.ts"
    },
    "src/type/preference.ts::PreferenceCornerShapeChoiceType": {
      "declaration": "\"default\" | \"bevel\" | \"notch\" | \"round\" | \"scoop\" | \"square\" | \"squircle\"",
      "docstring": "",
      "path": "src/type/preference.ts"
    },
    "src/event-detail/theme.ts::MdsPrefThemeEventDetail": {
      "declaration": "export interface MdsPrefThemeEventDetail {\n  name?: string;\n  scheme?: PreferenceThemeSchemeType;\n}",
      "docstring": "",
      "path": "src/event-detail/theme.ts"
    },
    "src/components/mds-price-table-features-cell/meta/types.ts::PriceTableFeaturesCellType": {
      "declaration": "export type PriceTableFeaturesCellType = 'custom' | 'label' | 'supported' | 'text' | 'unsupported';",
      "docstring": "",
      "path": "src/components/mds-price-table-features-cell/meta/types.ts"
    },
    "src/components/mds-progress/meta/types.ts::DirectionType": {
      "declaration": "export type DirectionType = 'horizontal' | 'vertical' | 'radial';",
      "docstring": "",
      "path": "src/components/mds-progress/meta/types.ts"
    },
    "src/type/typography.ts::TypographyTechnicalType": {
      "declaration": "\"label\" | \"option\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/components/mds-push-notification/meta/event-detail.ts::MdsPushNotificationEventDetail": {
      "declaration": "export interface MdsPushNotificationEventDetail {\n  visible: boolean;\n}",
      "docstring": "",
      "path": "src/components/mds-push-notification/meta/event-detail.ts"
    },
    "src/components/mds-push-notification-item/meta/types.ts::NotificationItemDateFormatType": {
      "declaration": "string",
      "docstring": "",
      "path": "src/components/mds-push-notification-item/meta/types.ts"
    },
    "src/components/mds-push-notification-item/meta/types.ts::NotificationItemPreviewType": {
      "declaration": "export type NotificationItemPreviewType = 'avatar' | 'image';",
      "docstring": "",
      "path": "src/components/mds-push-notification-item/meta/types.ts"
    },
    "src/components/mds-push-notification-item/meta/event-detail.ts::MdsPushNotificationItemEventDetail": {
      "declaration": "export interface MdsPushNotificationItemEventDetail {\n  id: string;\n}",
      "docstring": "",
      "path": "src/components/mds-push-notification-item/meta/event-detail.ts"
    },
    "src/components/mds-radial-menu/meta/types.ts::Direction": {
      "declaration": "export type Direction = 'clockwise' | 'counterclockwise';",
      "docstring": "",
      "path": "src/components/mds-radial-menu/meta/types.ts"
    },
    "src/components/mds-radial-menu/meta/types.ts::Interaction": {
      "declaration": "export type Interaction = 'click' | 'rightclick';",
      "docstring": "",
      "path": "src/components/mds-radial-menu/meta/types.ts"
    },
    "src/type/tone.ts::ToneVariantType": {
      "declaration": "\"strong\" | \"weak\" | \"outline\" | \"text\"",
      "docstring": "",
      "path": "src/type/tone.ts"
    },
    "src/components.d.ts::ModalOverflowType": {
      "declaration": "export type ModalOverflowType = 'auto' | 'manual';",
      "docstring": "",
      "path": "src/components.d.ts"
    },
    "src/components/mds-status-bar/meta/types.ts::StatusBarPositionType": {
      "declaration": "export type StatusBarPositionType = 'bottom' | 'bottom-left' | 'bottom-right';",
      "docstring": "",
      "path": "src/components/mds-status-bar/meta/types.ts"
    },
    "src/components/mds-stepper-bar/meta/meta.ts::StepperBarNavigationType": {
      "declaration": "export type StepperBarNavigationType = 'none' | 'scrollbar';",
      "docstring": "",
      "path": "src/components/mds-stepper-bar/meta/meta.ts"
    },
    "src/components/mds-stepper-bar/meta/event-detail.ts::MdsStepperBarEventDetail": {
      "declaration": "export interface MdsStepperBarEventDetail {\n  step: number;\n  value: string;\n}",
      "docstring": "",
      "path": "src/components/mds-stepper-bar/meta/event-detail.ts"
    },
    "src/type/typography.ts::TypographyType": {
      "declaration": "\"action\" | \"caption\" | \"snippet\" | \"detail\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"hack\" | \"label\" | \"option\" | \"paragraph\" | \"tip\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/components/mds-stepper-bar-item/meta/event-detail.ts::MdsStepperBarItemEventDetail": {
      "declaration": "export interface MdsStepperBarItemEventDetail {\n  value: string;\n}",
      "docstring": "",
      "path": "src/components/mds-stepper-bar-item/meta/event-detail.ts"
    },
    "src/components/mds-tab/meta/type.ts::DirectionType": {
      "declaration": "export type DirectionType = 'horizontal' | 'vertical';",
      "docstring": "",
      "path": "src/components/mds-tab/meta/type.ts"
    },
    "src/type/animation.ts::HorizontalActionsAnimationType": {
      "declaration": "\"slide\" | \"fade\"",
      "docstring": "",
      "path": "src/type/animation.ts"
    },
    "src/components/mds-tab/meta/event-detail.ts::MdsTabEventDetail": {
      "declaration": "export interface MdsTabEventDetail {\n  id: number;\n  value?: string;\n}",
      "docstring": "",
      "path": "src/components/mds-tab/meta/event-detail.ts"
    },
    "src/components/mds-tab-bar/meta/event-detail.ts::MdsTabBarEventDetail": {
      "declaration": "export interface MdsTabBarEventDetail {\n  index: number;\n}",
      "docstring": "",
      "path": "src/components/mds-tab-bar/meta/event-detail.ts"
    },
    "src/type/typography.ts::TypographySmallerType": {
      "declaration": "\"option\" | \"tip\"",
      "docstring": "",
      "path": "src/type/typography.ts"
    },
    "src/components/mds-tab-item/meta/event-detail.ts::MdsTabItemEventDetail": {
      "declaration": "export interface MdsTabItemEventDetail {\n  target: HTMLMdsTabItemElement;\n  value?: string;\n}",
      "docstring": "",
      "path": "src/components/mds-tab-item/meta/event-detail.ts"
    },
    "src/components/mds-table/meta/type.ts::MdsTableSortingType": {
      "declaration": "export type MdsTableSortingType = 'internal' | 'external';",
      "docstring": "",
      "path": "src/components/mds-table/meta/type.ts"
    },
    "src/components/mds-table/meta/event-detail.ts::MdsTableSelectionEventDetail": {
      "declaration": "export interface MdsTableSelectionEventDetail {\n  rows: MdsTableRowSelection[];\n}",
      "docstring": "",
      "path": "src/components/mds-table/meta/event-detail.ts"
    },
    "src/components/mds-table/meta/type.ts::MdsTableRowSelection": {
      "declaration": "{\n  index: number;\n  value?: string | number;\n}",
      "docstring": "",
      "path": "src/components/mds-table/meta/type.ts"
    },
    "src/components/mds-table-header-cell/meta/types.ts::SortDirectionType": {
      "declaration": "export type SortDirectionType = 'ascending' | 'descending' | 'none';",
      "docstring": "",
      "path": "src/components/mds-table-header-cell/meta/types.ts"
    },
    "src/components/mds-table-header-cell/meta/event-detail.ts::MdsTableHeaderCellSortEventDetail": {
      "declaration": "export interface MdsTableHeaderCellSortEventDetail {\n  direction: SortDirectionType;\n  index: number;\n  sortKey?: string;\n}",
      "docstring": "",
      "path": "src/components/mds-table-header-cell/meta/event-detail.ts"
    },
    "src/type/text.ts::TypographyTagType": {
      "declaration": "\"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"label\" | \"code\" | \"abbr\" | \"address\" | \"article\" | \"b\" | \"bdo\" | \"blockquote\" | \"cite\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"figcaption\" | \"i\" | \"ins\" | \"kbd\" | \"legend\" | \"li\" | \"mark\" | \"ol\" | \"p\" | \"pre\" | \"q\" | \"rb\" | \"rt\" | \"ruby\" | \"s\" | \"samp\" | \"small\" | \"span\" | \"strong\" | \"sub\" | \"summary\" | \"sup\" | \"time\" | \"u\" | \"ul\" | \"var\"",
      "docstring": "",
      "path": "src/type/text.ts"
    },
    "src/components/mds-text/meta/types.ts::TextTypographyType": {
      "declaration": "export type TextTypographyType = TypographyType | TextTitleRoleType;",
      "docstring": "",
      "path": "src/components/mds-text/meta/types.ts"
    },
    "src/components/mds-toast/meta/types.ts::ToastPosition": {
      "declaration": "export type ToastPosition =\n  | 'top-left'\n  | 'top-center'\n  | 'top-right'\n  | 'bottom-left'\n  | 'bottom-center'\n  | 'bottom-right';",
      "docstring": "",
      "path": "src/components/mds-toast/meta/types.ts"
    },
    "src/components/mds-toast/meta/event-detail.ts::MdsToastCloseEventDetail": {
      "declaration": "export interface MdsToastCloseEventDetail {\n  reason: 'close' | 'hide' | 'timeout';\n}",
      "docstring": "",
      "path": "src/components/mds-toast/meta/event-detail.ts"
    },
    "src/type/floating-ui.ts::FloatingUIRelation": {
      "declaration": "\"label\" | \"description\"",
      "docstring": "",
      "path": "src/type/floating-ui.ts"
    },
    "src/type/tree.ts::TreeAppearance": {
      "declaration": "\"none\" | \"depth\"",
      "docstring": "",
      "path": "src/type/tree.ts"
    },
    "src/type/tree.ts::TreeIcon": {
      "declaration": "\"folder\" | \"chevron\"",
      "docstring": "",
      "path": "src/type/tree.ts"
    },
    "src/type/tree.ts::TreeActions": {
      "declaration": "\"auto\" | \"visible\"",
      "docstring": "",
      "path": "src/type/tree.ts"
    },
    "src/components/mds-tree-item/meta/event-detail.ts::MdsTreeItemEventDetail": {
      "declaration": "export interface MdsTreeItemEventDetail {\n  element: HTMLMdsTreeItemElement;\n}",
      "docstring": "",
      "path": "src/components/mds-tree-item/meta/event-detail.ts"
    },
    "src/components/mds-usage/meta/types.ts::UsageType": {
      "declaration": "export type UsageType = 'do' | 'dont' | 'info' | 'warn';",
      "docstring": "",
      "path": "src/components/mds-usage/meta/types.ts"
    },
    "src/components/mds-video-wall/meta/types.ts::NoiseType": {
      "declaration": "export type NoiseType = 'classic' | 'none' | 'sharp' | 'soft' | 'tv';",
      "docstring": "",
      "path": "src/components/mds-video-wall/meta/types.ts"
    },
    "src/components/mds-video-wall/meta/types.ts::PreloadType": {
      "declaration": "export type PreloadType = 'auto' | 'metadata' | 'none';",
      "docstring": "",
      "path": "src/components/mds-video-wall/meta/types.ts"
    }
  },
  "storybook": "https://magma-design-system.github.io/magma/storybook/",
  "studio": "https://magma-design-system.github.io/magma/studio/"
}
