{
  "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-modal/mds-modal.tsx",
      "encapsulation": "shadow",
      "tag": "mds-modal",
      "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": "action-close - Selects the close button of the modal."
        },
        {
          "name": "part",
          "text": "dialog - The native `<dialog>` that covers the viewport and places the window in it"
        },
        {
          "name": "part",
          "text": "window - Selects the default window element of the modal when used."
        },
        {
          "name": "slot",
          "text": "bottom - Contents that will be placed on bottom of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "slot",
          "text": "- Contents that will be placed in the center of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "slot",
          "text": "top - Contents that will be placed on top of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "slot",
          "text": "window - Use directly a window component if you need it. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "category",
          "text": "overlays"
        }
      ],
      "usage": {
        "1. Description": "The `<mds-modal>` web component is the Magma Design System overlay container for dialogs, presenting content in a windowed surface layered above the page with an optional backdrop. It is the system equivalent of the native `<dialog>` element, adding managed open/close animations, body scroll locking, positioning, and a built-in close affordance.\n\n#### Semantic Behavior\n\n- **Open state**: Visibility is driven by the `opened` prop. Setting it `true` runs the intro animation and emits `mdsModalOpen`; clearing it runs the outro animation and emits `mdsModalClose`.\n- **Programmatic close**: Exposes an async `close()` method that dismisses the modal regardless of `interaction`, mirroring the close-button action.\n- **Show/hide events**: `mdsModalShow` fires when the intro finishes (fully visible) and `mdsModalHide` when the outro finishes (fully hidden), the latter being the safe point to detach the modal to reclaim memory.\n- **Backdrop dismissal**: With `interaction=\"relaxed\"` (default) a click on the backdrop or `Esc` closes the modal. The click counts when it is pressed and released on the backdrop once the window has stopped: a text selection dragged out of a field, a drag from the backdrop into the window or a click while the window is still coming in leave the modal open. With `interaction=\"strict\"` both are ignored, and the touch swipe too (below): only the close button or `close()` can dismiss it.\n- **Body scroll lock**: When `overflow=\"auto\"` the component locks body scroll while open and restores it on close.\n- **Touch dismissal**: On touch devices a horizontal swipe past a threshold closes a `relaxed` modal, respecting the swipe direction implied by edge `position` values.\n- **Slot-driven layout**: With no `window` slot, the default slot renders centered content framed by optional `top` (header) and `bottom` (footer) slots, and a close button is rendered automatically, icon-only and named in the page language (the `lang` of `<html>`) (\"Close\"). Slotting a `window` element suppresses the built-in chrome and close button so the consumer supplies the entire surface.\n- **Title of a banner window**: An `mds-banner` slotted as the `window` draws its `headline` in `h5`, the title of a dialog (`titles/dialog` of the design language), above the `h6` of the parts and the groups of fields the dialog holds; in the page the banner keeps `h6`. The headline is hidden from screen readers: the dialog takes its name from `aria-label` on the host.\n- **Width of a slotted window**: The `window` element stops at the width of a dialog, `--magma-width-dialog` (the column of a form plus its inset, 580px at 16px: `widths/dialog` of the design language), and shrinks with a narrower screen, its margin around it. A class on the element wins over it, for a bespoke surface.\n- **Close button placement**: The built-in close button sits on the backdrop, in a strip the window always leaves free, so a `strict` modal can be closed whatever its content. `left` and `right` leave it at their side at every width.\n- **Narrow screens**: At a viewport of 480px or less a window that would fill the screen (`center` and the four corners) leaves a strip of backdrop at the top, where the close button shows, as `left` and `right` leave one at their side; `top` and `bottom` stay as tall as their content but never taller than the screen less that strip, which stays on their free side with the close button at its edge (top right for `bottom`, bottom right for `top`).\n- **Wide screens**: Above 480px every window leaves a strip of backdrop at its side, with the close button at its top: `center`, `top` and `bottom` one on each side, the button at the top right; the corners one on the side away from their own, the button there.\n\n#### Properties & Visual Configurations\n\nThis component does not use the shared `variant` / `tone` ladders; its configuration is structural and motion-oriented.\n\n#### Other behavioral props\n\n- **`position`** sets where the window animates from and rests, from `'center'` to edge and corner anchors (`'top'`, `'bottom-left'`, etc.); edge positions also define the valid swipe-to-dismiss direction.\n- **`animation`** selects the motion style of the window: `'slide'` (default), `'3d'`, or `'custom'` (driven entirely by CSS custom properties).\n- **`interaction`** governs how forgiving dismissal is - `'relaxed'` allows backdrop clicks, `'strict'` requires the close button.\n- **`overflow`** chooses whether the component manages body scroll locking (`'auto'`) or leaves it to the consumer (`'manual'`).\n- **`hideBackdrop`** removes the dimmed overlay behind the window (shown by default).\n",
        "2. Examples": "Correct and idiomatic ways to use the `<mds-modal>` 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#### Basic Modal with Inline Content\n\nThe simplest form: toggle `opened` from JavaScript to show the dialog. The built-in close button and backdrop dismiss the modal automatically with `interaction=\"relaxed\"` (default). React to the `mdsModalClose` event to sync your state.\n\n```html\n<mds-button id=\"btn-apri\">Apri dialogo</mds-button>\n\n<mds-modal id=\"dialogo\">\n  <div class=\"p-400\">\n    <mds-text>Sei sicuro di voler continuare?</mds-text>\n  </div>\n</mds-modal>\n\n<script>\n  const btn = document.getElementById('btn-apri');\n  const modal = document.getElementById('dialogo');\n  btn.addEventListener('click', () => { modal.opened = true; });\n  modal.addEventListener('mdsModalClose', () => { modal.opened = undefined; });\n</script>\n```\n\n#### Fixed Header and Footer via `top` / `bottom` Slots\n\nUse the `top` slot for a sticky header and the `bottom` slot for a sticky footer (e.g. action buttons). The default slot renders scrollable body content between them.\n\n```html\n<mds-modal id=\"modifica-utente\" position=\"right\">\n  <header slot=\"top\" class=\"p-400 bg-surface-overlay shadow-ring-weak\">\n    <mds-text typography=\"h5\">Modifica utente</mds-text>\n  </header>\n\n  <div class=\"p-400 grid gap-400\">\n    <mds-input-field label=\"Nome\">\n      <mds-input name=\"nome\"></mds-input>\n    </mds-input-field>\n    <mds-input-field label=\"Cognome\">\n      <mds-input name=\"cognome\"></mds-input>\n    </mds-input-field>\n  </div>\n\n  <footer slot=\"bottom\" class=\"p-400 flex gap-300 justify-end bg-surface-overlay shadow-ring-weak\">\n    <mds-button variant=\"dark\" tone=\"outline\" id=\"btn-annulla\">Annulla</mds-button>\n    <mds-button variant=\"primary\" tone=\"strong\" id=\"btn-salva\">Salva</mds-button>\n  </footer>\n</mds-modal>\n```\n\n#### Edge and Corner Positions\n\n`position` anchors the window to an edge or corner and drives the slide-in direction. Use `right` or `left` for side panels, `bottom` for mobile drawers.\n\n```html\n<!-- Side panel from the right (default in most app shells) -->\n<mds-modal id=\"pannello-laterale\" position=\"right\">\n  <div class=\"p-400\">\n    <mds-text>Dettagli del documento</mds-text>\n  </div>\n</mds-modal>\n\n<!-- Drawer from the bottom (mobile) -->\n<mds-modal id=\"drawer-mobile\" position=\"bottom\">\n  <div class=\"p-400\">\n    <mds-text>Azioni disponibili</mds-text>\n  </div>\n</mds-modal>\n```\n\n#### Strict Interaction Mode\n\nSet `interaction=\"strict\"` when the user must explicitly confirm or cancel before the dialog closes - for example, a form with unsaved changes. Backdrop clicks, `Esc` and touch swipes are ignored; only the close button or the `close()` method can dismiss the modal.\n\n```html\n<mds-modal id=\"conferma-elimina\" interaction=\"strict\">\n  <div class=\"p-400 grid gap-400\">\n    <mds-text typography=\"h5\">Eliminare il documento?</mds-text>\n    <mds-text>Questa operazione non e' reversibile.</mds-text>\n    <div class=\"flex gap-300 justify-end\">\n      <mds-button variant=\"dark\" tone=\"outline\" id=\"btn-no\">Annulla</mds-button>\n      <mds-button variant=\"error\" tone=\"strong\" id=\"btn-si\">Elimina</mds-button>\n    </div>\n  </div>\n</mds-modal>\n\n<script>\n  document.getElementById('btn-no').addEventListener('click', () => {\n    document.getElementById('conferma-elimina').close();\n  });\n</script>\n```\n\n#### Programmatic Close via `close()` Method\n\nCall the async `close()` method from JavaScript when you need to dismiss the modal from outside its UI - for example, after a successful async operation.\n\n```html\n<mds-modal id=\"salvataggio\">\n  <div class=\"p-400\">\n    <mds-text>Salvataggio in corso...</mds-text>\n  </div>\n</mds-modal>\n\n<script>\n  async function salva() {\n    const modal = document.getElementById('salvataggio');\n    modal.opened = true;\n    await salvaRisorsa();\n    await modal.close();\n  }\n</script>\n```\n\n#### Listening to Animation Events\n\n`mdsModalShow` fires when the intro animation completes (the modal is fully visible). Use it to focus the first interactive element. `mdsModalHide` fires when the outro animation completes; use it to detach the element or reset content.\n\n```html\n<mds-modal id=\"modal-focus\" position=\"right\">\n  <div class=\"p-400\">\n    <mds-input-field label=\"Cerca\">\n      <mds-input id=\"input-ricerca\" name=\"ricerca\"></mds-input>\n    </mds-input-field>\n  </div>\n</mds-modal>\n\n<script>\n  const modal = document.getElementById('modal-focus');\n  const input = document.getElementById('input-ricerca');\n\n  modal.addEventListener('mdsModalShow', () => {\n    input.setFocus();\n  });\n  modal.addEventListener('mdsModalHide', () => {\n    // safe point to detach or reset content\n    modal.opened = undefined;\n  });\n</script>\n```\n\n#### Custom Animation Styles\n\n`animation` selects the motion style. `'slide'` (default) translates from the entry edge; `'3d'` adds a perspective tilt; `'custom'` delegates entirely to the CSS custom properties `--mds-modal-custom-closed-transform` and `--mds-modal-custom-window-distance`.\n\n```html\n<!-- 3D perspective tilt animation -->\n<mds-modal id=\"modal-3d\" animation=\"3d\" position=\"center\">\n  <div class=\"p-400\">\n    <mds-text>Animazione 3D</mds-text>\n  </div>\n</mds-modal>\n\n<!-- Custom animation driven by CSS vars -->\n<mds-modal id=\"modal-custom\" animation=\"custom\" position=\"center\">\n  <div class=\"p-400\">\n    <mds-text>Animazione personalizzata</mds-text>\n  </div>\n</mds-modal>\n```\n\n#### The Window of a Dialog via the `window` Slot\n\nSlot an element with `slot=\"window\"` to replace the built-in chrome (the window surface and the close button). A dialog slots an [`mds-banner`](../mds-banner/AGENTS.md) `variant=\"light\"` `tone=\"box\"` `dismissible`: its own close button closes the modal. The slotted element gets no `role` of its own: the `<dialog>` the component renders is already the dialog, named by the `aria-label` of the host. The actions follow the rules of a dialog: the secondary one `dark` `outline`, the main one last.\n\nThe window stops at the width of a dialog, the column of a form plus its inset (`--magma-width-dialog`, 580px at 16px, `widths/dialog` of the design language), and shrinks with a narrower screen. Write no width on it: a form keeps in the window the shape it has in the page.\n\nThe headline of the banner is the title of the dialog, in `h5` (`titles/dialog`): the banner takes the style from its place, so write no `typography` on it. It is hidden from screen readers, so the `aria-label` of the host carries the same text.\n\n```html\n<mds-modal id=\"modal-banner\" aria-label=\"Azione richiesta\">\n  <mds-banner slot=\"window\" variant=\"light\" tone=\"box\" dismissible headline=\"Azione richiesta\">\n    <mds-text typography=\"detail\">Conferma la tua identita' per procedere.</mds-text>\n    <mds-button slot=\"action\" variant=\"dark\" tone=\"outline\">Annulla</mds-button>\n    <mds-button slot=\"action\" variant=\"primary\" tone=\"strong\">Conferma</mds-button>\n  </mds-banner>\n</mds-modal>\n```\n\nA bespoke surface, such as a banner as wide as the screen, writes its own width with a class: from the light DOM it wins over the width of a dialog.\n\n```html\n<mds-modal id=\"modal-novita\" aria-label=\"Novita'\">\n  <mds-banner slot=\"window\" class=\"max-w-none\" variant=\"light\" tone=\"box\" dismissible headline=\"Novita'\">\n    <mds-text typography=\"detail\">Da oggi puoi firmare i documenti dall'app.</mds-text>\n  </mds-banner>\n</mds-modal>\n```\n\n#### Disabling the Backdrop\n\nAdd `hide-backdrop` to render the modal without the dimmed overlay - useful for non-blocking side panels that coexist with interactive page content.\n\n```html\n<mds-modal id=\"pannello-info\" position=\"right\" hide-backdrop>\n  <div class=\"p-400\">\n    <mds-text>Informazioni contestuali</mds-text>\n  </div>\n</mds-modal>\n```\n\n```javascript\n// Remove the backdrop from JavaScript (it applies from the next opening)\ndocument.getElementById('pannello-info').hideBackdrop = true;\n```\n\n#### CSS Customization\n\nSize and place the window only through the public `--mds-modal-*` CSS custom properties. Set them on the host element; the window takes its background, radius and shadow from the component. They size the built-in window: a slotted window takes the width of a dialog, or the one its class gives it.\n\n```css\n/* Narrow center modal */\n#modal-card {\n  --mds-modal-window-distance: calc(var(--spacing) * 600);\n  --mds-modal-window-overflow: hidden;\n  --mds-modal-window-max-width: 480px;\n}\n\n/* Full-width drawer */\n#drawer-bottom {\n  --mds-modal-window-max-width: 100%;\n  --mds-modal-window-min-width: 100%;\n}\n```\n",
        "3. Mistakes": "Common incorrect uses of `<mds-modal>`. 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 `opened=\"false\"` to Close the Modal\n\nA false boolean is an absent attribute ([`agents/conventions.md`](../../../../agents/conventions.md)). The runtime does parse the string `\"false\"` as `false`, so the modal stays closed, but the attribute is still on the element until the first render, so `[opened]` attribute selectors and any code that reads the attribute see it set. Remove the attribute; from JavaScript set the prop to `undefined` (`false` works too: the component turns it into `undefined`).\n\n```html\n<!-- INCORRECT -->\n<mds-modal id=\"dialogo\" opened=\"false\"></mds-modal>\n\n<!-- CORRECT -->\n<mds-modal id=\"dialogo\"></mds-modal>\n```\n\n#### Do Not Put Content in the `window` Slot Without Replacing the Entire Chrome\n\nThe `window` slot completely bypasses the built-in surface, header/footer regions, and close button. Do not use it to add a header element while expecting the default content area and close button to still render - they will not.\n\n```html\n<!-- INCORRECT: only the slotted header renders; default slot and close button are suppressed -->\n<mds-modal id=\"modal\">\n  <header slot=\"window\" class=\"p-400\">Titolo</header>\n  <div>Contenuto del dialogo</div>\n</mds-modal>\n\n<!-- CORRECT: use slot=\"top\" for a sticky header, default slot for body -->\n<mds-modal id=\"modal\">\n  <header slot=\"top\" class=\"p-400 bg-surface-overlay\">Titolo</header>\n  <div class=\"p-400\">Contenuto del dialogo</div>\n</mds-modal>\n```\n\n#### Do Not Size the Window of a Dialog by Hand\n\nA slotted window already stops at the width of a dialog, the column of a form plus its inset (`widths/dialog`), and shrinks with the screen. A width written by hand copies a value the theme no longer moves, and a narrower one breaks the form inside: at `max-w-md` (448px) the body of the window is under the `28rem` of `field-group`, so its short fields stack as on a phone.\n\n```html\n<!-- INCORRECT -->\n<mds-modal aria-label=\"Nuovo referente\">\n  <mds-banner slot=\"window\" class=\"max-w-md w-full mx-400\" variant=\"light\" tone=\"box\" dismissible headline=\"Nuovo referente\">\n    <fieldset class=\"field-group\">...</fieldset>\n  </mds-banner>\n</mds-modal>\n\n<!-- CORRECT -->\n<mds-modal aria-label=\"Nuovo referente\">\n  <mds-banner slot=\"window\" variant=\"light\" tone=\"box\" dismissible headline=\"Nuovo referente\">\n    <fieldset class=\"field-group\">...</fieldset>\n  </mds-banner>\n</mds-modal>\n```\n\n#### Do Not Reach Into Shadow Parts to Style the Window\n\nThe only supported customization surface is the public `--mds-modal-*` CSS custom properties and the documented shadow parts (`dialog`, `window`, `action-close`). Targeting internal shadow selectors couples your code to implementation details that will break on minor releases.\n\n```css\n/* INCORRECT */\nmds-modal >>> .window-content {\n  padding: 0;\n}\nmds-modal::part(window) > div {\n  border: 2px solid red;\n}\n\n/* CORRECT */\nmds-modal {\n  --mds-modal-window-distance: calc(var(--spacing) * 400);\n}\n```\n\n#### Do Not Listen for Native `click` on the Backdrop to Close\n\n`mds-modal` emits `mdsModalClose` when it closes (and `mdsModalHide` when the animation finishes). Listening for a raw `click` on the host or backdrop is fragile - the event target varies by browser and shadow DOM boundary, and your handler ignores `interaction=\"strict\"`.\n\n```javascript\n// INCORRECT\ndocument.getElementById('modal').addEventListener('click', (e) => {\n  if (e.target === e.currentTarget) modal.opened = undefined;\n});\n\n// CORRECT\ndocument.getElementById('modal').addEventListener('mdsModalClose', () => {\n  modal.opened = undefined;\n});\n```\n\n#### Do Not Use `<dialog>` Directly When `<mds-modal>` Is Available\n\nUsing a raw `<dialog>` element bypasses the system's managed animation, body-scroll locking, touch-swipe dismissal, and design-token theming. Always use `<mds-modal>` for overlays in a Magma application.\n\n```html\n<!-- INCORRECT -->\n<dialog id=\"raw-dialog\">\n  <p>Contenuto del dialogo</p>\n  <button>Chiudi</button>\n</dialog>\n\n<!-- CORRECT -->\n<mds-modal id=\"modal\">\n  <div class=\"p-400\">\n    <mds-text>Contenuto del dialogo</mds-text>\n  </div>\n</mds-modal>\n```\n"
      },
      "props": [
        {
          "name": "accessibleName",
          "type": "string | undefined",
          "complexType": {
            "original": "string",
            "resolved": "string | undefined",
            "references": {}
          },
          "mutable": false,
          "attr": "aria-label",
          "reflectToAttr": false,
          "docs": "The accessible name of the modal: the name a screen reader announces when the window\nopens. The `<dialog>` this component renders is the dialog, so the name goes there.",
          "docsTags": [],
          "values": [
            {
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "animation",
          "type": "\"3d\" | \"custom\" | \"slide\" | undefined",
          "complexType": {
            "original": "ModalAnimationStyleType",
            "resolved": "\"3d\" | \"custom\" | \"slide\" | undefined",
            "references": {
              "ModalAnimationStyleType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-modal/meta/types.ts::ModalAnimationStyleType",
                "referenceLocation": "ModalAnimationStyleType"
              }
            }
          },
          "mutable": false,
          "attr": "animation",
          "reflectToAttr": true,
          "docs": "Specifies the animation style of the modal window",
          "docsTags": [
            {
              "name": "default",
              "text": "'slide'"
            }
          ],
          "default": "'slide'",
          "values": [
            {
              "value": "3d",
              "type": "string"
            },
            {
              "value": "custom",
              "type": "string"
            },
            {
              "value": "slide",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "hideBackdrop",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "hide-backdrop",
          "reflectToAttr": true,
          "docs": "Hides the modal backdrop",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "interaction",
          "type": "\"relaxed\" | \"strict\"",
          "complexType": {
            "original": "ModalInteractionType",
            "resolved": "\"relaxed\" | \"strict\"",
            "references": {
              "ModalInteractionType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-modal/meta/types.ts::ModalInteractionType",
                "referenceLocation": "ModalInteractionType"
              }
            }
          },
          "mutable": false,
          "attr": "interaction",
          "reflectToAttr": true,
          "docs": "Specifies if the component can be closed with close button, or also if the backdrop background is cliccked.\nIf `strict` is selected only the close button can dismiss the component via UI.\nIf `relaxed` is selected the component can be dismissed also by clicking the backdrop area: a click\npressed and released on the backdrop, once the window has finished its entry.",
          "docsTags": [
            {
              "name": "default",
              "text": "'relaxed'"
            }
          ],
          "default": "'relaxed'",
          "values": [
            {
              "value": "relaxed",
              "type": "string"
            },
            {
              "value": "strict",
              "type": "string"
            }
          ],
          "optional": false,
          "required": false,
          "getter": false,
          "setter": false
        },
        {
          "name": "opened",
          "type": "boolean | undefined",
          "complexType": {
            "original": "boolean",
            "resolved": "boolean | undefined",
            "references": {}
          },
          "mutable": true,
          "attr": "opened",
          "reflectToAttr": true,
          "docs": "Specifies if the modal is opened or not",
          "docsTags": [
            {
              "name": "default",
              "text": "false"
            }
          ],
          "default": "false",
          "values": [
            {
              "type": "boolean"
            },
            {
              "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": "./meta/types",
                "id": "src/components/mds-modal/meta/types.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": "'auto'"
            }
          ],
          "default": "'auto'",
          "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\" | \"center\" | \"left\" | \"right\" | \"top\" | \"top-left\" | \"top-right\" | undefined",
          "complexType": {
            "original": "ModalPositionType",
            "resolved": "\"bottom\" | \"bottom-left\" | \"bottom-right\" | \"center\" | \"left\" | \"right\" | \"top\" | \"top-left\" | \"top-right\" | undefined",
            "references": {
              "ModalPositionType": {
                "location": "import",
                "path": "./meta/types",
                "id": "src/components/mds-modal/meta/types.ts::ModalPositionType",
                "referenceLocation": "ModalPositionType"
              }
            }
          },
          "mutable": true,
          "attr": "position",
          "reflectToAttr": true,
          "docs": "Specifies the animation position of the modal window",
          "docsTags": [
            {
              "name": "default",
              "text": "'center'"
            }
          ],
          "default": "'center'",
          "values": [
            {
              "value": "bottom",
              "type": "string"
            },
            {
              "value": "bottom-left",
              "type": "string"
            },
            {
              "value": "bottom-right",
              "type": "string"
            },
            {
              "value": "center",
              "type": "string"
            },
            {
              "value": "left",
              "type": "string"
            },
            {
              "value": "right",
              "type": "string"
            },
            {
              "value": "top",
              "type": "string"
            },
            {
              "value": "top-left",
              "type": "string"
            },
            {
              "value": "top-right",
              "type": "string"
            },
            {
              "type": "undefined"
            }
          ],
          "optional": true,
          "required": false,
          "getter": false,
          "setter": false
        }
      ],
      "methods": [
        {
          "name": "close",
          "returns": {
            "type": "Promise<void>",
            "docs": ""
          },
          "complexType": {
            "signature": "() => Promise<void>",
            "parameters": [],
            "references": {
              "Promise": {
                "location": "global",
                "id": "global::Promise"
              }
            },
            "return": "Promise<void>"
          },
          "signature": "close() => Promise<void>",
          "parameters": [],
          "docs": "Closes the modal.",
          "docsTags": []
        }
      ],
      "events": [
        {
          "event": "mdsModalClose",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is closed",
          "docsTags": []
        },
        {
          "event": "mdsModalHide",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is totally invisible, can be useful to detach the component when it's hidden and gain memory",
          "docsTags": []
        },
        {
          "event": "mdsModalOpen",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is opened, as its intro animation starts: `mdsModalShow` follows once it\nis totally visible",
          "docsTags": []
        },
        {
          "event": "mdsModalShow",
          "detail": "void",
          "bubbles": true,
          "complexType": {
            "original": "void",
            "resolved": "void",
            "references": {}
          },
          "cancelable": true,
          "composed": true,
          "docs": "Emits when a modal is totally visible, when the modal intro animation is finished",
          "docsTags": []
        }
      ],
      "listeners": [],
      "styles": [
        {
          "name": "--mds-modal-custom-closed-transform",
          "annotation": "prop",
          "docs": "Sets the transform position of the custom window when it's outside the viewport, to it's default position",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-custom-window-distance",
          "annotation": "prop",
          "docs": "Set the distance between the slotted modal window and the screen bounds",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-overlay-color",
          "annotation": "prop",
          "docs": "Set the overlay color of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-overlay-opacity",
          "annotation": "prop",
          "docs": "Set the overlay color opacity of the background when the component is opened, this property can be inherited from `globals.css` in `styles^8.0.0`.",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-transition-duration",
          "annotation": "prop",
          "docs": "Sets the `transition-duration` of the modal elements",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-transition-timing-funciton",
          "annotation": "prop",
          "docs": "Deprecated, misspelled name of `--mds-modal-transition-timing-function`; read only when that one is not set",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-transition-timing-function",
          "annotation": "prop",
          "docs": "Sets the `transition-timing-function` of the modal elements",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-window-background",
          "annotation": "prop",
          "docs": "Set the background color of the window",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-window-distance",
          "annotation": "prop",
          "docs": "Set the distance between the modal window and the screen bounds",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-window-max-width",
          "annotation": "prop",
          "docs": "If the viewport is greather than mobile, max-width will be considered with this value;",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-window-min-width",
          "annotation": "prop",
          "docs": "If the viewport is greather than mobile, min-width will be considered with this value;",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-window-overflow",
          "annotation": "prop",
          "docs": "Set the overflow of the window",
          "visibility": "public"
        },
        {
          "name": "--mds-modal-window-radius",
          "annotation": "prop",
          "docs": "Set the border radius of the window",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-window-shadow",
          "annotation": "prop",
          "docs": "Set the box shadow of the window",
          "visibility": "internal"
        },
        {
          "name": "--mds-modal-z-index",
          "annotation": "prop",
          "docs": "Set the z-index of the window when the component is opened",
          "visibility": "public"
        }
      ],
      "slots": [
        {
          "name": "",
          "docs": "Contents that will be placed in the center of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "bottom",
          "docs": "Contents that will be placed on bottom of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "top",
          "docs": "Contents that will be placed on top of the window. Add `text string`, `HTML elements` or `components` to this slot."
        },
        {
          "name": "window",
          "docs": "Use directly a window component if you need it. Add `text string`, `HTML elements` or `components` to this slot."
        }
      ],
      "parts": [
        {
          "name": "action-close",
          "docs": "Selects the close button of the modal."
        },
        {
          "name": "dialog",
          "docs": "The native `<dialog>` that covers the viewport and places the window in it"
        },
        {
          "name": "window",
          "docs": "Selects the default window element of the modal when used."
        }
      ],
      "states": [],
      "dependents": [
        "mds-header",
        "mds-status-bar"
      ],
      "dependencies": [
        "mds-button"
      ],
      "dependencyGraph": {
        "mds-modal": [
          "mds-button"
        ],
        "mds-button": [
          "mds-icon",
          "mds-spinner",
          "mds-text"
        ],
        "mds-header": [
          "mds-modal"
        ],
        "mds-status-bar": [
          "mds-modal"
        ]
      },
      "storybook": "ui-modal--docs"
    }
  ]
}
