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