@georapbox/a-tab-group
Version:
A custom element to create a group of tabs and tab panels.
68 lines • 2.44 kB
TypeScript
/**
* @summary
* This is a tab for a <a-tab-group> tab panel.
* `<a-tab>` should always be used with `role=heading` in the markup so that the semantics remain useable when JavaScript is failing.
* @documentation https://github.com/georapbox/a-tab-group
*
* @tagname a-tab
* @extends HTMLElement
*
* @property {boolean} selected - Whether the tab is selected.
* @property {boolean} disabled - Whether the tab is disabled.
* @property {boolean} closable - Whether the tab is closable.
*
* @attribute selected - Reflects the selected property.
* @attribute disabled - Reflects the disabled property.
* @attribute closable - Reflects the closable property.
*
* @csspart base - The component's base wrapper.
* @csspart close-tab - The close button.
* @csspart close-tab-icon - The close button icon.
*
* @slot - The tab's content.
*
* @event a-tab-close - Fires when the tab's close button is clicked.
*/
export class ATab extends HTMLElement {
static get observedAttributes(): string[];
static defineCustomElement(elementName?: string): void;
/**
* Lifecycle method that is called when attributes are changed, added, removed, or replaced.
*
* @param {string} name - The name of the attribute.
* @param {string} oldValue - The old value of the attribute.
* @param {string} newValue - The new value of the attribute.
*/
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
/**
* Lifecycle method that is called when the element is first connected to the DOM.
*/
connectedCallback(): void;
/**
* Lifecycle method that is called when the element is disconnected from the DOM.
*/
disconnectedCallback(): void;
set selected(value: boolean);
/**
* @type {boolean} - Whether the tab is selected.
* @default false
* @attribute selected - Reflects the selected property.
*/
get selected(): boolean;
set disabled(value: boolean);
/**
* @type {boolean} - Whether the tab is disabled.
* @default false
* @attribute disabled - Reflects the disabled property.
*/
get disabled(): boolean;
set closable(value: boolean);
/**
* @type {boolean} - Whether the tab is closable.
* @default false
* @attribute closable - Reflects the closable property.
*/
get closable(): boolean;
#private;
}
//# sourceMappingURL=a-tab.d.ts.map