All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.vaadin-lit-confirm-dialog.js Maven / Gradle / Ivy

There is a newer version: 24.6.2
Show newest version
/**
 * @license
 * Copyright (c) 2018 - 2024 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */
import '@vaadin/button/src/vaadin-lit-button.js';
import './vaadin-lit-confirm-dialog-overlay.js';
import { css, html, LitElement } from 'lit';
import { ifDefined } from 'lit/directives/if-defined.js';
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
import { ConfirmDialogMixin } from './vaadin-confirm-dialog-mixin.js';

/**
 * LitElement based version of `` web component.
 *
 * ## Disclaimer
 *
 * This component is an experiment and not yet a part of Vaadin platform.
 * There is no ETA regarding specific Vaadin version where it'll land.
 * Feel free to try this code in your apps as per Apache 2.0 license.
 *
 * @extends HTMLElement
 * @mixes ConfirmDialogMixin
 * @mixes ElementMixin
 * @mixes ThemePropertyMixin
 */
class ConfirmDialog extends ConfirmDialogMixin(ElementMixin(ThemePropertyMixin(PolylitMixin(LitElement)))) {
  static get is() {
    return 'vaadin-confirm-dialog';
  }

  static get styles() {
    return css`
      :host,
      [hidden] {
        display: none !important;
      }
    `;
  }

  /** @protected */
  render() {
    return html`
      

      
    `;
  }

  /** @protected */
  async ready() {
    super.ready();

    await this.$.dialog.updateComplete;

    this._overlayElement = this.$.dialog.$.overlay;

    this._initOverlay(this._overlayElement);
  }

  /** @private */
  _onOpenedChanged(event) {
    this.opened = event.detail.value;
  }
}

defineCustomElement(ConfirmDialog);

export { ConfirmDialog };




© 2015 - 2025 Weber Informatics LLC | Privacy Policy