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

package.src.vaadin-details.d.ts Maven / Gradle / Ivy

There is a newer version: 24.6.0-alpha7
Show newest version
/**
 * @license
 * Copyright (c) 2019 - 2024 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import { DetailsBaseMixin } from './vaadin-details-base-mixin.js';

/**
 * Fired when the `opened` property changes.
 */
export type DetailsOpenedChangedEvent = CustomEvent<{ value: boolean }>;

export interface DetailsCustomEventMap {
  'opened-changed': DetailsOpenedChangedEvent;
}

export type DetailsEventMap = DetailsCustomEventMap & HTMLElementEventMap;

/**
 * `` is a Web Component which the creates an
 * expandable panel similar to `
` HTML element. * * ``` * * Expandable Details *
* Toggle using mouse, Enter and Space keys. *
*
* ``` * * ### Styling * * The following shadow DOM parts are exposed for styling: * * Part name | Description * -----------------|---------------- * `content` | The wrapper for the collapsible details content. * * The following attributes are exposed for styling: * * Attribute | Description * -------------| ----------- * `opened` | Set when the collapsible content is expanded and visible. * `disabled` | Set when the element is disabled. * `focus-ring` | Set when the element is focused using the keyboard. * `focused` | Set when the element is focused. * * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation. * * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes. */ declare class Details extends DetailsBaseMixin(ElementMixin(ThemableMixin(ControllerMixin(HTMLElement)))) { addEventListener( type: K, listener: (this: Details, ev: DetailsEventMap[K]) => void, options?: AddEventListenerOptions | boolean, ): void; removeEventListener( type: K, listener: (this: Details, ev: DetailsEventMap[K]) => void, options?: EventListenerOptions | boolean, ): void; } declare global { interface HTMLElementTagNameMap { 'vaadin-details': Details; } } export { Details };




© 2015 - 2024 Weber Informatics LLC | Privacy Policy