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

tabsheetpackage.src.vaadin-tabsheet.d.ts Maven / Gradle / Ivy

The newest version!
/**
 * @license
 * Copyright (c) 2022 - 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 type { Tab } from '@vaadin/tabs/src/vaadin-tab.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import { TabSheetMixin } from './vaadin-tabsheet-mixin.js';

/**
 * Fired when the `items` property changes.
 */
export type TabSheetItemsChangedEvent = CustomEvent<{ value: Tab[] }>;

/**
 * Fired when the `selected` property changes.
 */
export type TabSheetSelectedChangedEvent = CustomEvent<{ value: number }>;

export interface TabSheetCustomEventMap {
  'items-changed': TabSheetItemsChangedEvent;

  'selected-changed': TabSheetSelectedChangedEvent;
}

export interface TabSheetEventMap extends HTMLElementEventMap, TabSheetCustomEventMap {}

/**
 * `` is a Web Component for organizing and grouping content
 * into scrollable panels. The panels can be switched between by using tabs.
 *
 * ```
 *  
 *    
Prefix
*
Suffix
* * * Tab 1 * Tab 2 * Tab 3 * * *
Panel 1
*
Panel 2
*
Panel 3
*
* ``` * * ### Styling * * The following shadow DOM parts are exposed for styling: * * Part name | Description * --------- | --------------- * `tabs-container` | The container for the slotted prefix, tabs and suffix * `content` | The container for the slotted panels * * The following state attributes are available for styling: * * Attribute | Description * ------------------|------------- * `loading` | Set when a tab without associated content is selected * `overflow` | Set to `top`, `bottom`, `start`, `end`, all of them, or none. * * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation. * * @fires {CustomEvent} items-changed - Fired when the `items` property changes. * @fires {CustomEvent} selected-changed - Fired when the `selected` property changes. */ declare class TabSheet extends ThemableMixin(TabSheetMixin(ControllerMixin(ElementMixin(HTMLElement)))) { addEventListener( type: K, listener: (this: TabSheet, ev: TabSheetEventMap[K]) => void, options?: AddEventListenerOptions | boolean, ): void; removeEventListener( type: K, listener: (this: TabSheet, ev: TabSheetEventMap[K]) => void, options?: EventListenerOptions | boolean, ): void; } declare global { interface HTMLElementTagNameMap { 'vaadin-tabsheet': TabSheet; } } export { TabSheet };




© 2015 - 2024 Weber Informatics LLC | Privacy Policy