{
  "schemaVersion": "1.0.0",
  "readme": "",
  "modules": [
    {
      "kind": "javascript-module",
      "path": "src/modal-element.js",
      "declarations": [
        {
          "kind": "class",
          "description": "",
          "name": "ModalElement",
          "cssProperties": [
            {
              "description": "The width of the modal.",
              "name": "--me-width"
            },
            {
              "description": "The height of the modal.",
              "name": "--me-height"
            },
            {
              "description": "The border color of the modal.",
              "name": "--me-border-color"
            },
            {
              "description": "The border style of the modal.",
              "name": "--me-border-style"
            },
            {
              "description": "The border width of the modal.",
              "name": "--me-border-width"
            },
            {
              "description": "The border radius of the modal.",
              "name": "--me-border-radius"
            },
            {
              "description": "The box shadow of the modal.",
              "name": "--me-box-shadow"
            },
            {
              "description": "The background color of the modal.",
              "name": "--me-background-color"
            },
            {
              "description": "The foreground color of the modal.",
              "name": "--me-color"
            },
            {
              "description": "The spacing of the header.",
              "name": "--me-header-spacing"
            },
            {
              "description": "The background color of the header.",
              "name": "--me-header-background-color"
            },
            {
              "description": "The foreground color of the header.",
              "name": "--me-header-color"
            },
            {
              "description": "The spacing of the body.",
              "name": "--me-body-spacing"
            },
            {
              "description": "The background color of the body.",
              "name": "--me-body-background-color"
            },
            {
              "description": "The foreground color of the body.",
              "name": "--me-body-color"
            },
            {
              "description": "The spacing of the footer.",
              "name": "--me-footer-spacing"
            },
            {
              "description": "The background color of the footer.",
              "name": "--me-footer-background-color"
            },
            {
              "description": "The foreground color of the footer.",
              "name": "--me-footer-color"
            },
            {
              "description": "The padding of the close button.",
              "name": "--me-close-padding"
            },
            {
              "description": "The border shorthand property of the close button.",
              "name": "--me-close-border"
            },
            {
              "description": "The border radius shorthand property of the close button.",
              "name": "--me-close-border-radius"
            },
            {
              "description": "The background color of the close button.",
              "name": "--me-close-background-color"
            },
            {
              "description": "The foreground color of the close button.",
              "name": "--me-close-color"
            },
            {
              "description": "The font size of the close button.",
              "name": "--me-close-font-size"
            },
            {
              "description": "The background shorthand property of the backdrop.",
              "name": "--me-backdrop-background"
            },
            {
              "description": "The backdrop filter property of the backdrop.",
              "name": "--me-backdrop-filter"
            }
          ],
          "cssParts": [
            {
              "description": "The base wrapper of the modal.",
              "name": "base"
            },
            {
              "description": "The panel wrapper of the modal.",
              "name": "panel"
            },
            {
              "description": "The header wrapper of the modal.",
              "name": "header"
            },
            {
              "description": "The title wrapper of the modal.",
              "name": "title"
            },
            {
              "description": "The default close button rendered in the modal's header.",
              "name": "close"
            },
            {
              "description": "The close icon of the default close button.",
              "name": "close-icon"
            },
            {
              "description": "The body wrapper of the modal.",
              "name": "body"
            },
            {
              "description": "The footer wrapper of the modal.",
              "name": "footer"
            }
          ],
          "slots": [
            {
              "description": "The modal's main content (default/unnamed slot).",
              "name": ""
            },
            {
              "description": "The modal's header content, usually a title.",
              "name": "header"
            },
            {
              "description": "The modals' footer content. Usually used for buttons or other actions.",
              "name": "footer"
            },
            {
              "description": "The content of the close button that appears in the modal's header.",
              "name": "close"
            }
          ],
          "members": [
            {
              "kind": "field",
              "name": "CLOSE_REQUEST_REASONS",
              "static": true,
              "default": "({ CLOSE_BUTTON: 'close-button', ESCAPE_KEY: 'escape-key', BACKDROP_CLICK: 'backdrop-click', EXTERNAL_INVOKER: 'external-invoker' })",
              "description": "Central list of all possible reasons that the modal is about to close.",
              "readonly": true
            },
            {
              "kind": "field",
              "name": "#dialogEl",
              "privacy": "private",
              "type": {
                "text": "Nullable<HTMLDialogElement>"
              },
              "default": "null"
            },
            {
              "kind": "field",
              "name": "#footerSlotEl",
              "privacy": "private",
              "type": {
                "text": "Nullable<HTMLSlotElement>"
              },
              "default": "null"
            },
            {
              "kind": "field",
              "name": "#closeSlotEl",
              "privacy": "private",
              "type": {
                "text": "Nullable<HTMLSlotElement>"
              },
              "default": "null"
            },
            {
              "kind": "field",
              "name": "#pulseAnimation",
              "privacy": "private",
              "type": {
                "text": "Nullable<Animation>"
              },
              "default": "null"
            },
            {
              "kind": "field",
              "name": "open",
              "description": "Determines whether the modal is open or not.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "attribute": "open"
            },
            {
              "kind": "field",
              "name": "staticBackdrop",
              "description": "Determines whether the modal should close when the backdrop is clicked.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "attribute": "static-backdrop"
            },
            {
              "kind": "field",
              "name": "noHeader",
              "description": "Determines whether the modal should have a header or not.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "attribute": "no-header"
            },
            {
              "kind": "field",
              "name": "noAnimations",
              "description": "Determines whether the modal should have animations or not when opening and closing.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "attribute": "no-animations"
            },
            {
              "kind": "field",
              "name": "noCloseButton",
              "description": "Determines whether the modal should have a default close button or not.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "attribute": "no-close-button"
            },
            {
              "kind": "field",
              "name": "fullscreen",
              "description": "Determines whether the modal should be fullscreen or not.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "attribute": "fullscreen"
            },
            {
              "kind": "field",
              "name": "preserveOverflow",
              "description": "Determines whether the overflow of the body should be preserved when the modal is open.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "attribute": "preserve-overflow"
            },
            {
              "kind": "field",
              "name": "placement",
              "description": "Determines the placement of the modal.",
              "type": {
                "text": "string"
              },
              "default": "'center'",
              "attribute": "placement"
            },
            {
              "kind": "field",
              "name": "closeLabel",
              "description": "The label of the default close button, used as the aria-label attribute of the close button.",
              "type": {
                "text": "string"
              },
              "default": "'Close'",
              "attribute": "close-label"
            },
            {
              "kind": "method",
              "name": "#updateCloseLabel",
              "privacy": "private",
              "description": "Updates the aria-label attribute of the close button.\nIf the slot for the close button has text content, the aria-label attribute is removed to allow the text content to be used as the label.\nOtherwise, the aria-label attribute is set to the `closeLabel` property."
            },
            {
              "kind": "method",
              "name": "#pulseDialog",
              "privacy": "private",
              "description": "Applies a pulse effect on the dialog to indicate that the\nmodal is about to close but the close action was blocked."
            },
            {
              "kind": "field",
              "name": "#handleDialogClose",
              "privacy": "private",
              "description": "Handles the close event of the dialog."
            },
            {
              "kind": "field",
              "name": "#handleDialogCancel",
              "privacy": "private",
              "description": "Handles the cancel event of the dialog.\nThis event is fired when the user presses the escape key.",
              "parameters": [
                {
                  "description": "The cancel event.",
                  "name": "evt",
                  "type": {
                    "text": "Event"
                  }
                }
              ]
            },
            {
              "kind": "field",
              "name": "#handleCloseButtonClick",
              "privacy": "private",
              "description": "Handles the click event of the close button.",
              "parameters": [
                {
                  "description": "The click event.",
                  "name": "evt",
                  "type": {
                    "text": "Event"
                  }
                }
              ]
            },
            {
              "kind": "field",
              "name": "#handleDialogClick",
              "privacy": "private",
              "description": "Handles the click event of the dialog.",
              "parameters": [
                {
                  "description": "The click event.",
                  "name": "evt",
                  "type": {
                    "text": "MouseEvent"
                  }
                }
              ]
            },
            {
              "kind": "field",
              "name": "#handleCommandEvent",
              "privacy": "private",
              "description": "Handles the command event. Allows external invokers, such as buttons outside the modal,\nto trigger certain actions on the modal, such as opening or closing it, by dispatching\na command event with the corresponding command.",
              "parameters": [
                {
                  "description": "The command event.",
                  "name": "evt",
                  "type": {
                    "text": "CommandEvent"
                  }
                }
              ]
            },
            {
              "kind": "field",
              "name": "#handleFooterSlotChange",
              "privacy": "private",
              "description": "Handles the slotchange event of the footer slot."
            },
            {
              "kind": "field",
              "name": "#handleCloseSlotChange",
              "privacy": "private",
              "description": "Handles the slotchange event of the close slot."
            },
            {
              "kind": "method",
              "name": "#createRequestCloseEvent",
              "privacy": "private",
              "parameters": [
                {
                  "name": "reason",
                  "description": "The reason that the modal is about to close.",
                  "type": {
                    "text": "CloseRequestReason"
                  }
                }
              ],
              "description": "Creates a request close event."
            },
            {
              "kind": "method",
              "name": "#upgradeProperty",
              "privacy": "private",
              "parameters": [
                {
                  "name": "prop",
                  "description": "The property to upgrade.",
                  "type": {
                    "text": "'open' | 'staticBackdrop' | 'noHeader' | 'noAnimations' | 'noCloseButton' | 'fullscreen' | 'preserveOverflow' | 'placement' | 'closeLabel'"
                  }
                }
              ],
              "description": "This is to safe guard against cases where, for instance, a framework may have added the element to the page and set a\nvalue on one of its properties, but lazy loaded its definition. Without this guard, the upgraded element would miss that\nproperty and the instance property would prevent the class property setter from ever being called.\n\nhttps://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties"
            },
            {
              "kind": "method",
              "name": "show",
              "description": "Opens the modal if it is closed, otherwise does nothing.\nMake sure that the custom element is defined before calling this method."
            },
            {
              "kind": "method",
              "name": "hide",
              "description": "Closes the modal if it is open, otherwise does nothing.\nMake sure that the custom element is defined before calling this method."
            },
            {
              "kind": "method",
              "name": "defineCustomElement",
              "static": true,
              "parameters": [
                {
                  "name": "elementName",
                  "default": "'modal-element'",
                  "description": "The name of the custom element.",
                  "optional": true,
                  "type": {
                    "text": "string"
                  }
                }
              ],
              "description": "Defines the custom element with the given name.\nThe name must contain a dash (-)."
            }
          ],
          "events": [
            {
              "name": "me-open",
              "type": {
                "text": "CustomEvent"
              },
              "description": "Dispatched when the modal is opened."
            },
            {
              "description": "Dispatched when the modal is closed.",
              "name": "me-close"
            },
            {
              "description": "Dispatched when the modal is about to close.",
              "name": "me-request-close"
            }
          ],
          "attributes": [
            {
              "name": "open",
              "description": "Determines whether the modal is open or not.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "fieldName": "open"
            },
            {
              "name": "no-header",
              "description": "Determines whether the modal should have a header or not.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "fieldName": "noHeader"
            },
            {
              "name": "no-animations",
              "description": "Determines whether the modal should have animations or not when opening and closing.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "fieldName": "noAnimations"
            },
            {
              "name": "no-close-button",
              "description": "Determines whether the modal should have a default close button or not.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "fieldName": "noCloseButton"
            },
            {
              "name": "close-label",
              "description": "The label of the default close button, used as the aria-label attribute of the close button.",
              "type": {
                "text": "string"
              },
              "default": "'Close'",
              "fieldName": "closeLabel"
            },
            {
              "name": "static-backdrop",
              "description": "Determines whether the modal should close when the backdrop is clicked.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "fieldName": "staticBackdrop"
            },
            {
              "name": "fullscreen",
              "description": "Determines whether the modal should be fullscreen or not.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "fieldName": "fullscreen"
            },
            {
              "name": "preserve-overflow",
              "description": "Determines whether the overflow of the body should be preserved when the modal is open.",
              "type": {
                "text": "boolean"
              },
              "default": "false",
              "fieldName": "preserveOverflow"
            },
            {
              "name": "placement",
              "description": "Determines the placement of the modal.",
              "type": {
                "text": "string"
              },
              "default": "'center'",
              "fieldName": "placement"
            }
          ],
          "superclass": {
            "name": "HTMLElement"
          },
          "tagName": "modal-element",
          "customElement": true,
          "summary": "A custom element that renders a modal dialog."
        }
      ],
      "exports": [
        {
          "kind": "custom-element-definition",
          "name": "modal-element",
          "declaration": {
            "name": "ModalElement",
            "module": "src/modal-element.js"
          }
        },
        {
          "kind": "js",
          "name": "ModalElement",
          "declaration": {
            "name": "ModalElement",
            "module": "src/modal-element.js"
          }
        }
      ]
    }
  ]
}
