UNPKG

2.53 kBTypeScriptView Raw
1import { VirtualElement } from '@lumino/virtualdom';
2import { DockPanel, TabBar, TabPanel, Widget } from '@lumino/widgets';
3import { ITranslator } from '@jupyterlab/translation';
4/**
5 * a widget which displays titles as a single row or column of tabs.
6 * Tweaked to use an inline svg as the close icon
7 */
8export declare class TabBarSvg<T> extends TabBar<T> {
9 /**
10 * Construct a new tab bar. Overrides the default renderer.
11 *
12 * @param options - The options for initializing the tab bar.
13 */
14 constructor(options?: TabBarSvg.IOptions<T>);
15}
16export declare namespace TabBarSvg {
17 /**
18 * A modified implementation of the TabBar Renderer.
19 */
20 class Renderer extends TabBar.Renderer {
21 /**
22 * Render the close icon element for a tab.
23 *
24 * @param data - The data to use for rendering the tab.
25 *
26 * @returns A virtual element representing the tab close icon.
27 */
28 renderCloseIcon(data: TabBar.IRenderData<any>): VirtualElement;
29 }
30 const defaultRenderer: Renderer;
31 interface IOptions<T> extends TabBar.IOptions<T> {
32 /**
33 * The application language translator.
34 */
35 translator?: ITranslator;
36 }
37}
38/**
39 * a widget which provides a flexible docking area for widgets.
40 * Tweaked to use an inline svg as the close icon
41 */
42export declare class DockPanelSvg extends DockPanel {
43 /**
44 * Construct a new dock panel.
45 *
46 * @param options - The options for initializing the panel.
47 */
48 constructor(options?: DockPanelSvg.IOptions);
49}
50export declare namespace DockPanelSvg {
51 /**
52 * A modified implementation of the DockPanel Renderer.
53 */
54 class Renderer extends DockPanel.Renderer {
55 /**
56 * Create a new tab bar (with inline svg icons enabled
57 * for use with a dock panel.
58 *
59 * @returns A new tab bar for a dock panel.
60 */
61 createTabBar(): TabBarSvg<Widget>;
62 }
63 const defaultRenderer: Renderer;
64 interface IOptions extends DockPanel.IOptions {
65 /**
66 * The application language translator.
67 */
68 translator?: ITranslator;
69 }
70}
71/**
72 * A widget which combines a `TabBar` and a `StackedPanel`.
73 * Tweaked to use an inline svg as the close icon
74 */
75export declare class TabPanelSvg extends TabPanel {
76 /**
77 * Construct a new tab panel.
78 *
79 * @param options - The options for initializing the tab panel.
80 */
81 constructor(options?: TabPanel.IOptions);
82}