import { UiElement } from '../shared/element.js'; import '../tooltip/tooltip.js'; /** * A tab in ``. `panel` must match the `name` of a ``. * role / aria-selected / aria-controls are set on the host so the id references * stay in the same (light) DOM tree as the panels. * * Carbon `Tab` extras: an icon (`slot="icon"`, Carbon `renderIcon`: 16px after the label, before it * in dismissable tabs), `secondary-label` (contained tabs: a second line, the strip grows to 64px) * and `icon-only` + `label` (Carbon `IconTab`: a square tab named by `label`, shown as its tooltip * below on hover after 100ms and on keyboard focus). In `` a close button sits * at the end of the tab. * * @slot - Tab label * @slot icon - A 16px icon (20px in icon-only tabs of `size="lg"`), coloured like the label * @csspart secondary-label - The second line of a contained tab * @csspart close-button - The close button of a dismissable tab (no tab stop: Delete closes the focused tab) * @csspart tooltip - The `` of an `icon-only` tab * @fires ui-request-close - Dismissable tabs: its close button or Delete; cancelable; detail: { name } (its `panel`) * @fires ui-close - Dismissable tabs: after it closed (now `hidden`); detail: { name } * @cssprop --ui-tab-line - The underline of every tab (default `2px solid --ui-hairline`; Kanok: transparent, the strip draws one line) * @cssprop --ui-tab-selected-line - The selected tab's mark (default `--ui-border-interactive`, as in Kanok) * @cssprop --ui-tab-hover-line - Underline colour on hover (default `--ui-ink-subtle`) * @cssprop --ui-tab-disabled-line - Underline colour when disabled (default `--ui-hairline`) * @cssprop --ui-tab-background - Fill of a line tab (default `--ui-canvas`; Kanok: transparent) * @cssprop --ui-tab-contained-background / --ui-tab-contained-hover / --ui-tab-contained-selected - Fills of a contained tab at rest, hovered and selected (Carbon: layer-accent, its hover, the layer) * @cssprop --ui-tab-contained-selected-shadow - `box-shadow` of the selected contained tab (default: a 2px top bar in `--ui-tab-selected-line`) * @cssprop --ui-tab-contained-radius - Corner radius of a contained tab (default 0; Kanok: 6px) * @cssprop --ui-tab-contained-divider - The 1px line between contained tabs (default `--ui-hairline-strong`; Kanok: none) * @cssprop --ui-tab-focus-radius - Corner radius of the focus ring (default 0; Kanok: 6px) * @cssprop --ui-tab-focus-offset / --ui-tab-contained-focus-offset - Where the focus ring sits, line and contained tabs (default -2px, over the selected underline; Kanok: -5px, clear of it, and 1px around the chip) * @cssprop --ui-tab-vertical-background / --ui-tab-vertical-selected / --ui-tab-vertical-bar / --ui-tab-vertical-hover-bar / --ui-tab-vertical-divider / --ui-tab-vertical-inset / --ui-tab-vertical-radius - Vertical tabs: fill, the chosen tab's fill, the side bars, the rule between tabs, inset and corners (default Carbon's layer fill with bars and rules; Kanok: inset rounded rows, the chosen one tinted) * @cssprop --ui-tab-vertical-mark - The chosen vertical tab's 3px start bar (default `--ui-tab-selected-line`; Kanok: none, the tint alone) * @cssprop --ui-icon-control-radius - Corners of its small icon buttons, their hover fill and ring (default 0; Kanok: round) */ export declare class UiTab extends UiElement { static readonly styles: import("lit").CSSResult; panel: string; selected: boolean; /** Disables the control; a disabled `
` ancestor does the same. */ disabled: boolean; /** A second line under the label (Carbon `secondaryLabel`); contained tabs only. */ secondaryLabel: string; /** Only the `icon` slot shows (Carbon `IconTab`); `label` names the tab and is its tooltip. */ iconOnly: boolean; /** Accessible name and tooltip of an `icon-only` tab — required with it. */ label: string; /** The slotted label's text, for the close button's title. */ private text; private readonly localize; /** `hidden` too (a closed tab the app shows again): the tab list re-syncs when it changes. */ static get observedAttributes(): string[]; attributeChangedCallback(name: string, old: string | null, value: string | null): void; /** The tab list derives the selection, the roving tab stop and the edge marks from its tabs: it syncs again. */ private notifyTabs; connectedCallback(): void; protected updated(changed: Map): void; private onLabelChange; /** Carbon `hover-off`: the pointer on the close button isn't on the tab. */ private closeHover; render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'ui-tab': UiTab; } }