UNPKG

@synergy-design-system/angular

Version:
87 lines (84 loc) 4.58 kB
import * as i0 from '@angular/core'; import { ElementRef, NgZone, EventEmitter } from '@angular/core'; import { SynTabGroup, SynTabShowEvent, SynTabHideEvent } from '@synergy-design-system/components'; export { SynTabHideEvent, SynTabShowEvent } from '@synergy-design-system/components'; /** * @summary Tab groups organize content into a container that shows one section at a time. * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-tab-group--docs * @status stable * @since 2.0 * * @dependency syn-icon-button * * @slot - Used for grouping tab panels in the tab group. Must be `<syn-tab-panel>` elements. * @slot nav - Used for grouping tabs in the tab group. Must be `<syn-tab>` elements. * * @event {{ name: String }} syn-tab-show - Emitted when a tab is shown. The payload of the event returns the "panel" attribute of the shown tab. * @event {{ name: String }} syn-tab-hide - Emitted when a tab is hidden. The payload of the event returns the "panel" attribute of the hidden tab. * * @csspart base - The component's base wrapper. * @csspart nav - The tab group's navigation container where tabs are slotted in. * @csspart tabs - The container that wraps the tabs. * @csspart active-tab-indicator - The line that highlights the currently selected tab. * @csspart body - The tab group's body where tab panels are slotted in. * @csspart scroll-button - The previous/next scroll buttons that show when tabs are scrollable, an `<syn-icon-button>`. * @csspart scroll-button--start - The starting scroll button. * @csspart scroll-button--end - The ending scroll button. * @csspart scroll-button__base - The scroll button's exported `base` part. * * @cssproperty --indicator-color - The color of the active tab indicator. * @cssproperty --indicator-width - The width of the active tab indicator. * @cssproperty --track-color - The color of the indicator's track (the line that separates tabs from panels). * @cssproperty --track-width - The width of the indicator's track (the line that separates tabs from panels). */ declare class SynTabGroupComponent { nativeElement: SynTabGroup; private _ngZone; constructor(e: ElementRef, ngZone: NgZone); /** * The placement of the tabs. */ set placement(v: SynTabGroup['placement']); get placement(): SynTabGroup['placement']; /** * When set to auto, navigating tabs with the arrow keys will instantly show the corresponding tab panel. * When set to manual, the tab will receive focus but will not show until the user presses spacebar or enter. */ set activation(v: SynTabGroup['activation']); get activation(): SynTabGroup['activation']; /** * Disables the scroll arrows that appear when tabs overflow. */ set noScrollControls(v: '' | SynTabGroup['noScrollControls']); get noScrollControls(): SynTabGroup['noScrollControls']; /** * Draws the tab group as a contained element. */ set contained(v: '' | SynTabGroup['contained']); get contained(): SynTabGroup['contained']; /** * Draws the tab group with edges instead of roundings. * Takes only effect if used with the 'contained' property */ set sharp(v: '' | SynTabGroup['sharp']); get sharp(): SynTabGroup['sharp']; /** * Prevent scroll buttons from being hidden when inactive. */ set fixedScrollControls(v: '' | SynTabGroup['fixedScrollControls']); get fixedScrollControls(): SynTabGroup['fixedScrollControls']; /** * Emitted when a tab is shown. * The payload of the event returns the "panel" attribute of the shown tab. */ synTabShowEvent: EventEmitter<SynTabShowEvent>; /** * Emitted when a tab is hidden. * The payload of the event returns the "panel" attribute of the hidden tab. */ synTabHideEvent: EventEmitter<SynTabHideEvent>; static ɵfac: i0.ɵɵFactoryDeclaration<SynTabGroupComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<SynTabGroupComponent, "syn-tab-group", never, { "placement": { "alias": "placement"; "required": false; }; "activation": { "alias": "activation"; "required": false; }; "noScrollControls": { "alias": "noScrollControls"; "required": false; }; "contained": { "alias": "contained"; "required": false; }; "sharp": { "alias": "sharp"; "required": false; }; "fixedScrollControls": { "alias": "fixedScrollControls"; "required": false; }; }, { "synTabShowEvent": "synTabShowEvent"; "synTabHideEvent": "synTabHideEvent"; }, never, ["*"], true, never>; } export { SynTabGroupComponent };