{
  "timestamp": "2026-11-19T09:33:56",
  "compiler": {
    "name": "@stencil/core",
    "version": "4.45.4",
    "typescriptVersion": "5.8.3"
  },
  "storybook": "https://magma-design-system.github.io/magma/storybook/",
  "studio": "https://magma-design-system.github.io/magma/studio/",
  "components": [
    {
      "filePath": "src/components/mds-input-tip-item/mds-input-tip-item.tsx",
      "encapsulation": "shadow",
      "tag": "mds-input-tip-item",
      "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"
    }
  ]
}
