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