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