tab-group.d.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import { LitElement } from 'lit';
  2. import { EventEmitter } from '../../internal/decorators';
  3. import type SlTab from '../tab/tab';
  4. import type SlTabPanel from '../tab-panel/tab-panel';
  5. export default class SlTabGroup extends LitElement {
  6. static styles: import("lit").CSSResult;
  7. tabGroup: HTMLElement;
  8. body: HTMLElement;
  9. nav: HTMLElement;
  10. indicator: HTMLElement;
  11. private activeTab;
  12. private mutationObserver;
  13. private resizeObserver;
  14. private tabs;
  15. private panels;
  16. private hasScrollControls;
  17. placement: 'top' | 'bottom' | 'start' | 'end';
  18. activation: 'auto' | 'manual';
  19. noScrollControls: boolean;
  20. slTabShow: EventEmitter<{
  21. tab: string;
  22. }>;
  23. slTabHide: EventEmitter<{
  24. tab: string;
  25. }>;
  26. connectedCallback(): void;
  27. disconnectedCallback(): void;
  28. show(panel: string): void;
  29. getAllTabs(includeDisabled?: boolean): SlTab[];
  30. getAllPanels(): [SlTabPanel];
  31. getActiveTab(): SlTab | undefined;
  32. handleClick(event: MouseEvent): void;
  33. handleKeyDown(event: KeyboardEvent): void;
  34. handleScrollToStart(): void;
  35. handleScrollToEnd(): void;
  36. updateScrollControls(): void;
  37. setActiveTab(tab: SlTab, options?: {
  38. emitEvents?: boolean;
  39. scrollBehavior?: 'auto' | 'smooth';
  40. }): void;
  41. setAriaLabels(): void;
  42. syncIndicator(): void;
  43. repositionIndicator(): void;
  44. preventIndicatorTransition(): void;
  45. syncTabsAndPanels(): void;
  46. render(): import("lit-html").TemplateResult<1>;
  47. }
  48. declare global {
  49. interface HTMLElementTagNameMap {
  50. 'sl-tab-group': SlTabGroup;
  51. }
  52. }