{
  "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-radial-progress/mds-radial-progress.tsx",
      "encapsulation": "shadow",
      "tag": "mds-radial-progress",
      "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"
    }
  ]
}
